@datarecce/ui 1.43.0 → 1.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/AuthModal-CPEPKSbq.js +7 -0
  2. package/dist/AuthModal-CPEPKSbq.js.map +1 -0
  3. package/dist/{RunProgress-CUH5MGf2.d.ts → RunProgress-x8azUu6w.d.ts} +8 -2
  4. package/dist/RunProgress-x8azUu6w.d.ts.map +1 -0
  5. package/dist/{SplitPane-BSbw-X0w.d.ts → SplitPane-DBg4tXuc.d.ts} +47 -29
  6. package/dist/SplitPane-DBg4tXuc.d.ts.map +1 -0
  7. package/dist/advanced.d.ts +32 -6
  8. package/dist/advanced.d.ts.map +1 -1
  9. package/dist/advanced.js +1 -1
  10. package/dist/advanced.js.map +1 -1
  11. package/dist/{api-BLPTlb5F.d.ts → api-Df2fnbPC.d.ts} +2 -2
  12. package/dist/{api-BLPTlb5F.d.ts.map → api-Df2fnbPC.d.ts.map} +1 -1
  13. package/dist/api.d.ts +2 -2
  14. package/dist/components-run.d.ts +3 -3
  15. package/dist/components-run.js +1 -1
  16. package/dist/components.d.ts +8 -8
  17. package/dist/components.js +1 -1
  18. package/dist/contexts.d.ts +3 -3
  19. package/dist/contexts.js +1 -1
  20. package/dist/hooks.d.ts +1 -1
  21. package/dist/hooks.js +1 -1
  22. package/dist/{index-Cj6jBlI5.d.ts → index-BPwq5bDS.d.ts} +4 -4
  23. package/dist/{index-Cj6jBlI5.d.ts.map → index-BPwq5bDS.d.ts.map} +1 -1
  24. package/dist/{index-BqEL56ty.d.ts → index-BU4oA57l.d.ts} +4 -2
  25. package/dist/index-BU4oA57l.d.ts.map +1 -0
  26. package/dist/{index-B5IDqiH5.d.ts → index-CsQ6F_RH.d.ts} +3 -3
  27. package/dist/{index-B5IDqiH5.d.ts.map → index-CsQ6F_RH.d.ts.map} +1 -1
  28. package/dist/{index-CN00J7hU.d.ts → index-etWB_qj5.d.ts} +5 -5
  29. package/dist/{index-CN00J7hU.d.ts.map → index-etWB_qj5.d.ts.map} +1 -1
  30. package/dist/{index-BaX9Yro_.d.ts → index-hrkIDdSw.d.ts} +3 -3
  31. package/dist/{index-BaX9Yro_.d.ts.map → index-hrkIDdSw.d.ts.map} +1 -1
  32. package/dist/{index-DHyGyyCa.d.ts → index-zrsz0il0.d.ts} +8 -3
  33. package/dist/index-zrsz0il0.d.ts.map +1 -0
  34. package/dist/index.d.ts +11 -11
  35. package/dist/index.js +1 -1
  36. package/dist/{instanceInfo-CFaMqagF.d.ts → instanceInfo-py6tIhW6.d.ts} +3 -1
  37. package/dist/{instanceInfo-CFaMqagF.d.ts.map → instanceInfo-py6tIhW6.d.ts.map} +1 -1
  38. package/dist/keepAlive-DbC0X4zr.js.map +1 -1
  39. package/dist/lib/api/track.d.ts +13 -1
  40. package/dist/lib/api/track.d.ts.map +1 -1
  41. package/dist/lib/api/track.js +1 -1
  42. package/dist/lib/api/track.js.map +1 -1
  43. package/dist/{lineage-DNT0kUP_.d.ts → lineage-BVy6uQ02.d.ts} +18 -8
  44. package/dist/lineage-BVy6uQ02.d.ts.map +1 -0
  45. package/dist/{primitives-BvIkb0y2.d.ts → primitives-CeiwiPV-.d.ts} +2 -2
  46. package/dist/{primitives-BvIkb0y2.d.ts.map → primitives-CeiwiPV-.d.ts.map} +1 -1
  47. package/dist/primitives.d.ts +4 -4
  48. package/dist/primitives.js +1 -1
  49. package/dist/result.js +1 -1
  50. package/dist/src-BPeVRx-t.js +12 -0
  51. package/dist/src-BPeVRx-t.js.map +1 -0
  52. package/dist/style.css +18 -44
  53. package/dist/styles.css +1 -1
  54. package/dist/{types-B2yU6e4d.d.ts → types-MJ4kKF5U.d.ts} +10 -2
  55. package/dist/types-MJ4kKF5U.d.ts.map +1 -0
  56. package/dist/{types-hvCteREC.d.ts → types-Mk-rmevv.d.ts} +2 -2
  57. package/dist/{types-hvCteREC.d.ts.map → types-Mk-rmevv.d.ts.map} +1 -1
  58. package/dist/types.d.ts +7 -7
  59. package/dist/utils-SEuNIttT.js +3 -0
  60. package/dist/utils-SEuNIttT.js.map +1 -0
  61. package/dist/utils.d.ts +1 -1
  62. package/package.json +11 -4
  63. package/dist/AuthModal-CXrikA-g.js +0 -7
  64. package/dist/AuthModal-CXrikA-g.js.map +0 -1
  65. package/dist/RunProgress-CUH5MGf2.d.ts.map +0 -1
  66. package/dist/SplitPane-BSbw-X0w.d.ts.map +0 -1
  67. package/dist/index-BqEL56ty.d.ts.map +0 -1
  68. package/dist/index-DHyGyyCa.d.ts.map +0 -1
  69. package/dist/lineage-DNT0kUP_.d.ts.map +0 -1
  70. package/dist/src-_Brn8OkY.js +0 -12
  71. package/dist/src-_Brn8OkY.js.map +0 -1
  72. package/dist/types-B2yU6e4d.d.ts.map +0 -1
  73. package/dist/utils-BJxZkzLz.js +0 -3
  74. package/dist/utils-BJxZkzLz.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
 
2
- import { C as Run, J as ValueDiffDetailViewOptions, Jt as ColumnLineageData, X as ValueDiffResult, Y as ValueDiffParams, dt as ProfileDiffViewOptions, ft as TopKDiffParams, ht as TopKViewOptions, it as RowCountResult, l as Check, nt as RowCountDiffResult, on as NodeData, ot as HistogramDiffParams, pt as TopKDiffResult, rn as ManifestMetadata, st as HistogramDiffResult, ut as ProfileDiffResult, wt as QueryViewOptions, yt as QueryDiffViewOptions } from "./instanceInfo-CFaMqagF.js";
3
- import { i as LineageGraph, l as LineageGraphNodes, s as LineageGraphEdge } from "./types-B2yU6e4d.js";
4
- import { u as NodeColumnSetMap } from "./index-B5IDqiH5.js";
5
- import { X as CheckDetailTab, at as CheckActionType, it as CheckAction, p as SchemaDiffRow } from "./SplitPane-BSbw-X0w.js";
6
- import { m as Check$1 } from "./index-Cj6jBlI5.js";
7
- import { o as RunFormProps } from "./types-hvCteREC.js";
2
+ import { C as Run, J as ValueDiffDetailViewOptions, Jt as ColumnLineageData, X as ValueDiffResult, Y as ValueDiffParams, dt as ProfileDiffViewOptions, ft as TopKDiffParams, ht as TopKViewOptions, it as RowCountResult, l as Check, nt as RowCountDiffResult, on as NodeData, ot as HistogramDiffParams, pt as TopKDiffResult, rn as ManifestMetadata, st as HistogramDiffResult, ut as ProfileDiffResult, wt as QueryViewOptions, yt as QueryDiffViewOptions } from "./instanceInfo-py6tIhW6.js";
3
+ import { i as LineageGraph, l as LineageGraphNodes, s as LineageGraphEdge } from "./types-MJ4kKF5U.js";
4
+ import { u as NodeColumnSetMap } from "./index-CsQ6F_RH.js";
5
+ import { X as CheckDetailTab, at as CheckActionType, it as CheckAction, p as SchemaDiffRow } from "./SplitPane-DBg4tXuc.js";
6
+ import { m as Check$1 } from "./index-BPwq5bDS.js";
7
+ import { o as RunFormProps } from "./types-Mk-rmevv.js";
8
8
  import { r as DataGridHandle } from "./ScreenshotDataGrid-BAsPWcde.js";
9
9
  import { n as CreatedResultViewProps } from "./index-BJOCIgE1.js";
10
10
  import * as React$2 from "react";
@@ -15,6 +15,14 @@ import { ColDef, ColGroupDef, ICellRendererParams } from "ag-grid-community";
15
15
  import { EdgeProps } from "@xyflow/react";
16
16
  import { FallbackRender } from "@sentry/react";
17
17
 
18
+ //#region src/components/lineage/computeColumnLineage.d.ts
19
+ interface ColumnAnnotation {
20
+ column: string;
21
+ isImpacted: boolean;
22
+ transformationType?: string;
23
+ changeStatus?: "added" | "removed" | "modified";
24
+ }
25
+ //#endregion
18
26
  //#region src/components/lineage/config/zoomConstants.d.ts
19
27
  /**
20
28
  * Zoom and display constants for the lineage view.
@@ -1282,6 +1290,8 @@ declare function toReactFlow(lineageGraph: LineageGraph, options?: {
1282
1290
  x: number;
1283
1291
  y: number;
1284
1292
  }>;
1293
+ newCllExperience?: boolean;
1294
+ columnAncestry?: Map<string, ColumnAnnotation[]>;
1285
1295
  }): [LineageGraphNodes[], LineageGraphEdge[], NodeColumnSetMap];
1286
1296
  /**
1287
1297
  * Apply dagre layout to lineage graph nodes and edges
@@ -1295,5 +1305,5 @@ declare function toReactFlow(lineageGraph: LineageGraph, options?: {
1295
1305
  */
1296
1306
  declare const layout: (nodes: LineageGraphNodes[], edges: LineageGraphEdge[], direction?: string) => void;
1297
1307
  //#endregion
1298
- export { SetupConnectionGuide as $, getIconForChangeStatus as A, CheckPageLoadingOss as At, SchemaView$1 as B, FIT_VIEW_PADDING as Bt, TopKDiffResultView as C, LineagePageOss as Ct, IdleTimeoutBadge as D, HistogramDiffForm as Dt, TopKDiffForm as E, HistogramResultViewProps as Et, ChangeSummaryResult as F, Main as Ft, RowCountDiffRun as G, ColumnNameCell as H, ColumnChangeResult as I, MainLayout as It, RowCountRun as J, RowCountResultView as K, NODE_CHANGE_STATUS_MSGS as L, EnvInfo as Lt, ChangeSummary as M, CheckListOss as Mt, ChangeStatus as N, CheckEmptyStateOss as Nt, calculateChangeSummary as O, supportsHistogramDiff as Ot, ChangeSummaryProps as P, CheckDetailOss as Pt, SqlEditorProps as Q, HistoryToggle as R, DIM_FILTER as Rt, classifyType as S, SchemaViewProps$1 as St, TopKDiffRun as T, HistogramDiffRun as Tt, ColumnNameCellProps as U, SingleEnvSchemaView$1 as V, LEGIBLE_MIN_ZOOM as Vt, RowCountDiffResultView as W, DualSqlEditorProps as X, DualSqlEditor as Y, SqlEditor as Z, DataTypeIcon as _, LineageViewNotification as _t, ChecksView as a, QueryFormProps as at, buildColumnTooltip as b, NodeViewNodeData as bt, ValueDiffResultViewProps as c, ProfileDiffResultView as ct, ValueDiffFormParams as d, ProfileResultViewProps as dt, SetupConnectionGuideProps as et, ValueDiffDetailResultView as f, ProfileRun as ft, SquareIconProps as g, RecceNotification as gt, SquareIcon as h, LearnHowLink as ht, useRecceTheme as i, QueryForm$1 as it, SchemaSummary as j, CheckPageContentOss as jt, calculateColumnChange as k, ErrorBoundary$1 as kt, ValueDiffRun as l, ProfileDiffRun as lt, ValueDiffDetailRun as m, ProfileDiffFormParams as mt, toReactFlow as n, QueryResultViewProps as nt, ChecksViewProps as o, QueryDiffResultView as ot, ValueDiffDetailResultViewProps as p, ProfileDiffForm as pt, RowCountResultViewProps as q, VERSION as r, QueryPageOss as rt, ValueDiffResultView as s, QueryDiffResultViewProps as st, layout as t, QueryResultView as tt, ValueDiffForm as u, ProfileResultView as ut, DataTypeIconProps as v, NotificationProps as vt, TopKDiffResultViewProps as w, HistogramDiffResultView as wt, TypeCategory as x, NodeViewProps as xt, ColumnTooltipInput as y, NodeView as yt, SchemaLegend as z, EXPLORE_MIN_ZOOM as zt };
1299
- //# sourceMappingURL=lineage-DNT0kUP_.d.ts.map
1308
+ export { SetupConnectionGuide as $, getIconForChangeStatus as A, CheckPageLoadingOss as At, SchemaView$1 as B, FIT_VIEW_PADDING as Bt, TopKDiffResultView as C, LineagePageOss as Ct, IdleTimeoutBadge as D, HistogramDiffForm as Dt, TopKDiffForm as E, HistogramResultViewProps as Et, ChangeSummaryResult as F, Main as Ft, RowCountDiffRun as G, ColumnNameCell as H, ColumnAnnotation as Ht, ColumnChangeResult as I, MainLayout as It, RowCountRun as J, RowCountResultView as K, NODE_CHANGE_STATUS_MSGS as L, EnvInfo as Lt, ChangeSummary as M, CheckListOss as Mt, ChangeStatus as N, CheckEmptyStateOss as Nt, calculateChangeSummary as O, supportsHistogramDiff as Ot, ChangeSummaryProps as P, CheckDetailOss as Pt, SqlEditorProps as Q, HistoryToggle as R, DIM_FILTER as Rt, classifyType as S, SchemaViewProps$1 as St, TopKDiffRun as T, HistogramDiffRun as Tt, ColumnNameCellProps as U, SingleEnvSchemaView$1 as V, LEGIBLE_MIN_ZOOM as Vt, RowCountDiffResultView as W, DualSqlEditorProps as X, DualSqlEditor as Y, SqlEditor as Z, DataTypeIcon as _, LineageViewNotification as _t, ChecksView as a, QueryFormProps as at, buildColumnTooltip as b, NodeViewNodeData as bt, ValueDiffResultViewProps as c, ProfileDiffResultView as ct, ValueDiffFormParams as d, ProfileResultViewProps as dt, SetupConnectionGuideProps as et, ValueDiffDetailResultView as f, ProfileRun as ft, SquareIconProps as g, RecceNotification as gt, SquareIcon as h, LearnHowLink as ht, useRecceTheme as i, QueryForm$1 as it, SchemaSummary as j, CheckPageContentOss as jt, calculateColumnChange as k, ErrorBoundary$1 as kt, ValueDiffRun as l, ProfileDiffRun as lt, ValueDiffDetailRun as m, ProfileDiffFormParams as mt, toReactFlow as n, QueryResultViewProps as nt, ChecksViewProps as o, QueryDiffResultView as ot, ValueDiffDetailResultViewProps as p, ProfileDiffForm as pt, RowCountResultViewProps as q, VERSION as r, QueryPageOss as rt, ValueDiffResultView as s, QueryDiffResultViewProps as st, layout as t, QueryResultView as tt, ValueDiffForm as u, ProfileResultView as ut, DataTypeIconProps as v, NotificationProps as vt, TopKDiffResultViewProps as w, HistogramDiffResultView as wt, TypeCategory as x, NodeViewProps as xt, ColumnTooltipInput as y, NodeView as yt, SchemaLegend as z, EXPLORE_MIN_ZOOM as zt };
1309
+ //# sourceMappingURL=lineage-BVy6uQ02.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineage-BVy6uQ02.d.ts","names":[],"sources":["../src/components/lineage/computeColumnLineage.ts","../src/components/lineage/config/zoomConstants.ts","../src/components/app/EnvInfo.tsx","../src/components/app/MainLayout.tsx","../src/components/check/CheckDetailOss.tsx","../src/components/check/CheckEmptyStateOss.tsx","../src/components/check/CheckListOss.tsx","../src/components/check/CheckPageContentOss.tsx","../src/components/check/CheckPageLoadingOss.tsx","../src/components/errorboundary/ErrorBoundary.tsx","../src/components/histogram/HistogramDiffForm.tsx","../src/components/histogram/HistogramResultView.tsx","../src/components/lineage/LineagePageOss.tsx","../src/components/lineage/NodeView.tsx","../src/components/lineage/styles.tsx","../src/components/notifications/LineageViewNotification.tsx","../src/components/onboarding-guide/Notification.tsx","../src/components/profile/ProfileDiffForm.tsx","../src/components/profile/ProfileResultView.tsx","../src/components/query/QueryDiffResultView.tsx","../src/components/query/QueryForm.tsx","../src/components/query/QueryPageOss.tsx","../src/components/query/QueryResultView.tsx","../src/components/query/SetupConnectionGuide.tsx","../src/components/query/SqlEditor.tsx","../src/components/rowcount/RowCountResultView.tsx","../src/components/schema/ColumnNameCell.tsx","../src/components/schema/SchemaView.tsx","../src/components/shared/HistoryToggle.tsx","../src/components/summary/types.ts","../src/components/summary/ChangeSummary.tsx","../src/components/summary/SchemaSummary.tsx","../src/components/summary/utils.ts","../src/components/timeout/IdleTimeoutBadge.tsx","../src/components/top-k/TopKDiffForm.tsx","../src/components/top-k/TopKDiffResultView.tsx","../src/components/ui/DataTypeIcon/classifyType.ts","../src/components/ui/DataTypeIcon/tooltipText.ts","../src/components/ui/DataTypeIcon/index.tsx","../src/components/ui/SquareIcon.tsx","../src/components/valuediff/ValueDiffDetailResultView.tsx","../src/components/valuediff/ValueDiffForm.tsx","../src/components/valuediff/ValueDiffResultView.tsx","../src/components/views/ChecksView.tsx","../src/providers/contexts/ThemeContext.tsx","../src/index.ts","../src/components/lineage/lineage.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAEiB,gBAAA;EACf,MAAA;EACA,UAAA;EACA,kBAAA;EACA,YAAA;AAAA;;;;;;;;;;;;;;;;;;;cCWW,gBAAA;;cAGA,gBAAA;;cAGA,gBAAA;;cAGA,UAAA;;;iBC2EG,OAAA,CAAA,GAAO,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UCzEb,eAAA;EACR,QAAA,EAAU,SAAA;;EAEV,OAAA,EAAS,SAAA;AAAA;AAAA,iBA4BK,UAAA,CAAA;EAAa,QAAA;EAAU;AAAA,GAAW,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,UAqCvD,SAAA;EACR,QAAA,EAAU,SAAA;EACV,OAAA,EAAS,SAAA;EACT,cAAA;;EAEA,sBAAA;AAAA;AAAA,iBAGc,IAAA,CAAA;EACd,QAAA;EACA,OAAA;EACA,cAAA;EACA;AAAA,GACC,SAAA,GAAS,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UCXF,gBAAA;EACR,OAAA;EACA,gBAAA;AAAA;AAAA,iBAKc,cAAA,CA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;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;EACA,iBAAA;EACA,mBAAA;EACA,eAAA;EACA,uBAAA;EACA,MAAA;EACA,YAAA;EACA,WAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA;;;;cAmML,UAAA,EAAU,OAAA,CAAA,mBAAA,QAAA,mBAAA;;;;;;KC3YlB,SAAA;;;;UAKK,iBAAA;EACR,IAAA,EAAM,SAAA;EACN,YAAA;EACA,OAAA,GAAU,IAAA,EAAM,SAAA;AAAA;;;;;;iBAWF,aAAA,CAAA,GAAiB,iBAAA;;;cC7BpB,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBCmCG,WAAA,CACd,YAAA,EAAc,YAAA,EACd,OAAA;EACE,aAAA;EACA,GAAA,GAAM,iBAAA;EACN,iBAAA,GAAoB,GAAA;IAAc,CAAA;IAAW,CAAA;EAAA;EAC7C,gBAAA;EACA,cAAA,GAAiB,GAAA,SAAY,gBAAA;AAAA,KAE7B,iBAAA,IAAqB,gBAAA,IAAoB,gBAAA;;;;;A7C9B7C;;;;;AAGA;c6CgUa,MAAA,GACX,KAAA,EAAO,iBAAA,IACP,KAAA,EAAO,gBAAA,IACP,SAAA"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { U as LineageViewRef } from "./SplitPane-BSbw-X0w.js";
2
+ import { U as LineageViewRef } from "./SplitPane-DBg4tXuc.js";
3
3
  import * as _$react from "react";
4
4
  import { ReactNode } from "react";
5
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
@@ -1086,4 +1086,4 @@ declare function ToggleSwitch({
1086
1086
  declare const PRIMITIVES_API_VERSION = "0.1.0";
1087
1087
  //#endregion
1088
1088
  export { LineageDiffViewOptions as $, ChangedOnlyCheckboxProps as A, TimelineEvent as B, DiffTextWithToastProps as C, DiffDisplayModeSwitch as D, DiffDisplayMode as E, buildCheckDescription as F, CommentInputProps as G, TimelineEventProps as H, buildCheckTitle as I, GenerateCheckTemplateOptions as J, NodeTag as K, formatSqlAsMarkdown as L, CodeEditorLanguage as M, CodeEditorProps as N, DiffDisplayModeSwitchProps as O, CodeEditorTheme as P, LineageDiffView as Q, isDisabledByNoResult as R, DiffTextWithToast as S, DiffTextProps as T, TimelineEventType as U, TimelineEventData as V, CommentInput as W, PresetCheckTemplateViewProps as X, PresetCheckTemplateView as Y, generateCheckTemplate as Z, ExternalLinkConfirmDialogProps as _, Toaster as a, DropdownValuesInputProps as b, useToaster as c, VSplit as d, LineageDiffViewProps as et, ScreenshotBox as f, ExternalLinkConfirmDialog as g, MarkdownContentProps as h, ToastOptions as i, CodeEditor as j, ChangedOnlyCheckbox as k, HSplit as l, MarkdownContent as m, ToggleSwitch as n, CheckBreadcrumbProps as nt, ToasterProvider as o, ScreenshotBoxProps as p, NodeTagProps as q, ToggleSwitchProps as r, toaster as s, PRIMITIVES_API_VERSION as t, CheckBreadcrumb as tt, SplitProps$1 as u, truncateUrl as v, DiffText as w, DropdownValuesInputSize as x, DropdownValuesInput as y, TimelineActor as z };
1089
- //# sourceMappingURL=primitives-BvIkb0y2.d.ts.map
1089
+ //# sourceMappingURL=primitives-CeiwiPV-.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"primitives-BvIkb0y2.d.ts","names":[],"sources":["../src/components/check/CheckBreadcrumb.tsx","../src/components/check/LineageDiffView.tsx","../src/components/check/PresetCheckTemplateView.tsx","../src/components/lineage/tags/NodeTag.tsx","../src/components/check/timeline/CommentInput.tsx","../src/components/check/timeline/TimelineEvent.tsx","../src/components/check/utils.ts","../src/components/editor/CodeEditor.tsx","../src/components/ui/ChangedOnlyCheckbox.tsx","../src/components/ui/DiffDisplayModeSwitch.tsx","../src/components/ui/DiffText.tsx","../src/components/ui/DiffTextWithToast.tsx","../src/components/ui/DropdownValuesInput.tsx","../src/components/ui/ExternalLinkConfirmDialog.tsx","../src/components/ui/MarkdownContent.tsx","../src/components/ui/ScreenshotBox.tsx","../src/components/ui/Split.tsx","../src/components/ui/Toaster.tsx","../src/components/ui/ToggleSwitch.tsx","../src/primitives.ts"],"mappings":";;;;;;;;;;;;UAgBiB,oBAAA;;EAEf,IAAA;;EAEA,YAAA,IAAgB,IAAA;;EAEhB,WAAA;;EAEA,QAAA;;EAEA,SAAA;AAAA;;;;;;;;;;;;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwKD;iBA/HS,wBAAA,CAAA;EACP,IAAA;EACA,YAAA;EACA,WAAA;EACA,QAAA;EACA;AAAA,GACC,oBAAA,GAAoB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAyHV,eAAA,EAAe,OAAA,CAAA,mBAAA,QAAA,wBAAA;;;;;;UCxLX,sBAAA;EACf,SAAA;EACA,QAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,oBAAA;IACE,OAAA;IACA,MAAA;IACA,eAAA;EAAA;AAAA;;;;UAOa,oBAAA;EDPC;;;ECWhB,MAAA,GAAS,MAAA;EDLA;;AACV;ECSC,WAAA,GAAc,sBAAA;;;;;EAMd,WAAA;ED+BA;;;EC1BA,MAAA;ED2BqB;;;ECrBrB,KAAA;AAAA;AAAA,cA6EW,eAAA,EAAe,OAAA,CAAA,yBAAA,CAAA,oBAAA,GAAA,OAAA,CAAA,aAAA,CAAA,cAAA;;;;;;UCxHX,4BAAA;;EAEf,IAAA;;EAEA,WAAA;;EAEA,IAAA;;EAEA,MAAA,EAAQ,MAAA;;EAER,WAAA,GAAc,MAAA;AAAA;;;;;;;;;;;;AFOf;;;;;;;;;;iBEiBe,qBAAA,CAAA;EACd,IAAA;EACA,WAAA;EACA,IAAA;EACA,MAAA;EACA;AAAA,GACC,4BAAA;;;;UAac,4BAAA;EFOf;EELA,YAAA;EFMA;EEJA,MAAA;AAAA;;;;;;;;AFgIF;;;;;;;;ACxLA;;;;;;;;;;;;;;iBCwFS,gCAAA,CAAA;EACP,YAAA;EACA;AAAA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","../src/components/check/LineageDiffView.tsx","../src/components/check/PresetCheckTemplateView.tsx","../src/components/lineage/tags/NodeTag.tsx","../src/components/check/timeline/CommentInput.tsx","../src/components/check/timeline/TimelineEvent.tsx","../src/components/check/utils.ts","../src/components/editor/CodeEditor.tsx","../src/components/ui/ChangedOnlyCheckbox.tsx","../src/components/ui/DiffDisplayModeSwitch.tsx","../src/components/ui/DiffText.tsx","../src/components/ui/DiffTextWithToast.tsx","../src/components/ui/DropdownValuesInput.tsx","../src/components/ui/ExternalLinkConfirmDialog.tsx","../src/components/ui/MarkdownContent.tsx","../src/components/ui/ScreenshotBox.tsx","../src/components/ui/Split.tsx","../src/components/ui/Toaster.tsx","../src/components/ui/ToggleSwitch.tsx","../src/primitives.ts"],"mappings":";;;;;;;;;;;;UAgBiB,oBAAA;;EAEf,IAAA;;EAEA,YAAA,IAAgB,IAAA;;EAEhB,WAAA;;EAEA,QAAA;;EAEA,SAAA;AAAA;;;;;;;;;;;;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwKD;iBA/HS,wBAAA,CAAA;EACP,IAAA;EACA,YAAA;EACA,WAAA;EACA,QAAA;EACA;AAAA,GACC,oBAAA,GAAoB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAyHV,eAAA,EAAe,OAAA,CAAA,mBAAA,QAAA,wBAAA;;;;;;UCxLX,sBAAA;EACf,SAAA;EACA,QAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,oBAAA;IACE,OAAA;IACA,MAAA;IACA,eAAA;EAAA;AAAA;;;;UAOa,oBAAA;EDPC;;;ECWhB,MAAA,GAAS,MAAA;EDLA;;AACV;ECSC,WAAA,GAAc,sBAAA;;;;;EAMd,WAAA;ED+BA;;;EC1BA,MAAA;ED2BqB;;;ECrBrB,KAAA;AAAA;AAAA,cA6EW,eAAA,EAAe,OAAA,CAAA,yBAAA,CAAA,oBAAA,GAAA,OAAA,CAAA,aAAA,CAAA,cAAA;;;;;;UCxHX,4BAAA;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AAO,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UC3LN,iBAAA;;EAEf,KAAA;;EAEA,QAAA,GAAW,KAAA;;EAEX,MAAA;;EAEA,OAAA;AAAA;;;;;AlBRF;;;;;;;;;iBkB4BgB,YAAA,CAAA;EACd,KAAA;EACA,QAAA;EACA,MAAA;EACA;AAAA,GACC,iBAAA,GAAiB,oBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;cCzCP,sBAAA"}
@@ -1,8 +1,8 @@
1
1
 
2
- import { $ as CheckCard, A as getChartThemeColors, B as LineageColumnNodeProps, C as ChartBarColors, D as HistogramDataType, E as HistogramChartProps, F as COLUMN_NODE_HEIGHT, G as CheckListProps, I as COLUMN_NODE_WIDTH, J as CheckDetail, K as CheckEmptyState, L as ColumnTransformationType, M as LineageLegend, N as LineageLegendProps, O as HistogramDataset, P as TransformationLegendItem, Q as CheckDescriptionProps, R as LineageColumnNode, S as TopKItem, T as HistogramChart, U as LineageViewRef, W as CheckList, X as CheckDetailTab, Y as CheckDetailProps, Z as CheckDescription, a as EmptyStateProps, at as CheckActionType, b as TopKBarChartProps, c as DiffEditorProps, ct as LineageNode, dt as NodeChangeStatus, et as CheckCardData, ft as EdgeChangeStatus, ht as LineageEdgeProps, i as EmptyState, it as CheckAction, j as ChangeStatusLegendItem, k as getChartBarColors, l as DiffEditorTheme, lt as LineageNodeData, mt as LineageEdgeData, n as SplitPane, nt as CheckRunStatus, o as DiffEditor, ot as CheckActions, p as SchemaDiffRow, pt as LineageEdge, q as CheckEmptyStateProps, r as SplitPaneProps, rt as CheckType, s as DiffEditorLanguage, st as CheckActionsProps, t as SplitDirection, tt as CheckCardProps, u as SchemaDiffStatus, ut as LineageNodeProps, w as ChartThemeColors, x as TopKDataset, y as TopKBarChart, z as LineageColumnNodeData } from "./SplitPane-BSbw-X0w.js";
3
- import { $ as LineageDiffViewOptions, A as ChangedOnlyCheckboxProps, B as TimelineEvent, C as DiffTextWithToastProps, D as DiffDisplayModeSwitch, E as DiffDisplayMode, F as buildCheckDescription, G as CommentInputProps, H as TimelineEventProps, I as buildCheckTitle, J as GenerateCheckTemplateOptions, K as NodeTag, L as formatSqlAsMarkdown, M as CodeEditorLanguage, N as CodeEditorProps, O as DiffDisplayModeSwitchProps, P as CodeEditorTheme, Q as LineageDiffView, R as isDisabledByNoResult, S as DiffTextWithToast, T as DiffTextProps, U as TimelineEventType, V as TimelineEventData, W as CommentInput, X as PresetCheckTemplateViewProps, Y as PresetCheckTemplateView, Z as generateCheckTemplate, _ as ExternalLinkConfirmDialogProps, a as Toaster, b as DropdownValuesInputProps, c as useToaster, d as VSplit, et as LineageDiffViewProps, f as ScreenshotBox, g as ExternalLinkConfirmDialog, h as MarkdownContentProps, i as ToastOptions, j as CodeEditor, k as ChangedOnlyCheckbox, l as HSplit, m as MarkdownContent, n as ToggleSwitch, nt as CheckBreadcrumbProps, o as ToasterProvider, p as ScreenshotBoxProps, q as NodeTagProps, r as ToggleSwitchProps, s as toaster, t as PRIMITIVES_API_VERSION, tt as CheckBreadcrumb, u as SplitProps, v as truncateUrl, w as DiffText, x as DropdownValuesInputSize, y as DropdownValuesInput, z as TimelineActor } from "./primitives-BvIkb0y2.js";
4
- import { _ as RunStatusWithDateProps, a as RunProgressVariant, b as inferRunStatus, c as RunListItemData, d as RunStatus, f as RunStatusAndDate, g as RunStatusWithDate, h as RunStatusBadgeProps, i as RunProgressProps, l as RunListItemProps, m as RunStatusBadge, n as RunProgressOverlay, o as RunList, p as RunStatusAndDateProps, r as RunProgressOverlayProps, s as RunListItem, t as RunProgress, u as RunListProps, v as formatRunDate, y as formatRunDateTime } from "./RunProgress-CUH5MGf2.js";
5
- import { a as RunFormParamTypes, d as ViewOptionTypes, f as DiffViewOptions, i as RegistryEntry, m as RunToolbarProps, o as RunFormProps, p as RunToolbar, r as RefTypes, s as RunResultViewProps } from "./types-hvCteREC.js";
2
+ import { $ as CheckCard, A as getChartThemeColors, B as LineageColumnNodeProps, C as ChartBarColors, D as HistogramDataType, E as HistogramChartProps, F as COLUMN_NODE_HEIGHT, G as CheckListProps, I as COLUMN_NODE_WIDTH, J as CheckDetail, K as CheckEmptyState, L as ColumnTransformationType, M as LineageLegend, N as LineageLegendProps, O as HistogramDataset, P as TransformationLegendItem, Q as CheckDescriptionProps, R as LineageColumnNode, S as TopKItem, T as HistogramChart, U as LineageViewRef, W as CheckList, X as CheckDetailTab, Y as CheckDetailProps, Z as CheckDescription, a as EmptyStateProps, at as CheckActionType, b as TopKBarChartProps, c as DiffEditorProps, ct as EdgeChangeStatus, dt as LineageEdgeProps, et as CheckCardData, ft as LineageNode, ht as NodeChangeStatus, i as EmptyState, it as CheckAction, j as ChangeStatusLegendItem, k as getChartBarColors, l as DiffEditorTheme, lt as LineageEdge, mt as LineageNodeProps, n as SplitPane, nt as CheckRunStatus, o as DiffEditor, ot as CheckActions, p as SchemaDiffRow, pt as LineageNodeData, q as CheckEmptyStateProps, r as SplitPaneProps, rt as CheckType, s as DiffEditorLanguage, st as CheckActionsProps, t as SplitDirection, tt as CheckCardProps, u as SchemaDiffStatus, ut as LineageEdgeData, w as ChartThemeColors, x as TopKDataset, y as TopKBarChart, z as LineageColumnNodeData } from "./SplitPane-DBg4tXuc.js";
3
+ import { $ as LineageDiffViewOptions, A as ChangedOnlyCheckboxProps, B as TimelineEvent, C as DiffTextWithToastProps, D as DiffDisplayModeSwitch, E as DiffDisplayMode, F as buildCheckDescription, G as CommentInputProps, H as TimelineEventProps, I as buildCheckTitle, J as GenerateCheckTemplateOptions, K as NodeTag, L as formatSqlAsMarkdown, M as CodeEditorLanguage, N as CodeEditorProps, O as DiffDisplayModeSwitchProps, P as CodeEditorTheme, Q as LineageDiffView, R as isDisabledByNoResult, S as DiffTextWithToast, T as DiffTextProps, U as TimelineEventType, V as TimelineEventData, W as CommentInput, X as PresetCheckTemplateViewProps, Y as PresetCheckTemplateView, Z as generateCheckTemplate, _ as ExternalLinkConfirmDialogProps, a as Toaster, b as DropdownValuesInputProps, c as useToaster, d as VSplit, et as LineageDiffViewProps, f as ScreenshotBox, g as ExternalLinkConfirmDialog, h as MarkdownContentProps, i as ToastOptions, j as CodeEditor, k as ChangedOnlyCheckbox, l as HSplit, m as MarkdownContent, n as ToggleSwitch, nt as CheckBreadcrumbProps, o as ToasterProvider, p as ScreenshotBoxProps, q as NodeTagProps, r as ToggleSwitchProps, s as toaster, t as PRIMITIVES_API_VERSION, tt as CheckBreadcrumb, u as SplitProps, v as truncateUrl, w as DiffText, x as DropdownValuesInputSize, y as DropdownValuesInput, z as TimelineActor } from "./primitives-CeiwiPV-.js";
4
+ import { _ as RunStatusWithDateProps, a as RunProgressVariant, b as inferRunStatus, c as RunListItemData, d as RunStatus, f as RunStatusAndDate, g as RunStatusWithDate, h as RunStatusBadgeProps, i as RunProgressProps, l as RunListItemProps, m as RunStatusBadge, n as RunProgressOverlay, o as RunList, p as RunStatusAndDateProps, r as RunProgressOverlayProps, s as RunListItem, t as RunProgress, u as RunListProps, v as formatRunDate, y as formatRunDateTime } from "./RunProgress-x8azUu6w.js";
5
+ import { a as RunFormParamTypes, d as ViewOptionTypes, f as DiffViewOptions, i as RegistryEntry, m as RunToolbarProps, o as RunFormProps, p as RunToolbar, r as RefTypes, s as RunResultViewProps } from "./types-Mk-rmevv.js";
6
6
  import { a as EmptyRowsRenderer, c as GridReadyEvent, i as DataGridRow, l as ScreenshotDataGrid, n as ColGroupDef, o as EmptyRowsRendererProps, r as DataGridHandle, s as GetRowIdParams, t as ColDef, u as ScreenshotDataGridProps } from "./ScreenshotDataGrid-BAsPWcde.js";
7
7
  import { a as ResultViewProps, c as ScreenshotWrapperType, i as ResultViewData, n as CreatedResultViewProps, o as ResultViewRef, r as ResultViewConfig, s as ResultViewTransformOptions, t as createResultView } from "./index-BJOCIgE1.js";
8
8
  export { COLUMN_NODE_HEIGHT, COLUMN_NODE_WIDTH, ChangeStatusLegendItem, ChangedOnlyCheckbox, ChangedOnlyCheckboxProps, ChartBarColors, ChartThemeColors, CheckAction, CheckActionType, CheckActions, CheckActionsProps, CheckBreadcrumb, CheckBreadcrumbProps, CheckCard, CheckCardData, CheckCardProps, CheckDescription, CheckDescriptionProps, CheckDetail, CheckDetailProps, CheckDetailTab, CheckEmptyState, CheckEmptyStateProps, CheckList, CheckListProps, CheckRunStatus, CheckType, CodeEditor, CodeEditorLanguage, CodeEditorProps, CodeEditorTheme, ColDef, ColGroupDef, ColumnTransformationType, CommentInput, CommentInputProps, CreatedResultViewProps, DataGridHandle, DataGridHandle as RecceDataGridHandle, DataGridRow, DiffDisplayMode, DiffDisplayModeSwitch, DiffDisplayModeSwitchProps, DiffEditor, DiffEditorLanguage, DiffEditorProps, DiffEditorTheme, DiffText, DiffTextProps, DiffTextWithToast, DiffTextWithToastProps, DiffViewOptions, DropdownValuesInput, DropdownValuesInputProps, DropdownValuesInputSize, EdgeChangeStatus, EmptyRowsRenderer, EmptyRowsRendererProps, EmptyState, EmptyStateProps, ExternalLinkConfirmDialog, ExternalLinkConfirmDialogProps, GenerateCheckTemplateOptions, GetRowIdParams, GridReadyEvent, HSplit, HistogramChart, HistogramChartProps, HistogramDataType, HistogramDataset, LineageColumnNode, LineageColumnNodeData, LineageColumnNodeProps, LineageDiffView, LineageDiffViewOptions, LineageDiffViewProps, LineageEdge, LineageEdgeData, LineageEdgeProps, LineageLegend, LineageLegendProps, LineageNode, LineageNodeData, LineageNodeProps, LineageViewRef, MarkdownContent, MarkdownContentProps, NodeChangeStatus, NodeTag, NodeTagProps, PRIMITIVES_API_VERSION, PresetCheckTemplateView, PresetCheckTemplateViewProps, RefTypes, RegistryEntry, ResultViewConfig, ResultViewData, ResultViewProps, ResultViewRef, ResultViewTransformOptions, RunFormParamTypes, RunFormProps, RunList, RunListItem, RunListItemData, RunListItemProps, RunListProps, RunProgress, RunProgressOverlay, RunProgressOverlayProps, RunProgressProps, RunProgressVariant, RunResultViewProps, RunStatus, RunStatusAndDate, RunStatusAndDateProps, RunStatusBadge, RunStatusBadgeProps, RunStatusWithDate, RunStatusWithDateProps, RunToolbar, RunToolbarProps, SchemaDiffRow, SchemaDiffStatus, ScreenshotBox, ScreenshotBoxProps, ScreenshotDataGrid, ScreenshotDataGridProps, ScreenshotWrapperType, SplitDirection, SplitPane, SplitPaneProps, SplitProps, TimelineActor, TimelineEvent, TimelineEventData, TimelineEventProps, TimelineEventType, ToastOptions, Toaster, ToasterProvider, ToggleSwitch, ToggleSwitchProps, TopKBarChart, TopKBarChartProps, TopKDataset, TopKItem, TransformationLegendItem, VSplit, ViewOptionTypes, buildCheckDescription, buildCheckTitle, createResultView, formatRunDate, formatRunDateTime, formatSqlAsMarkdown, generateCheckTemplate, getChartBarColors, getChartThemeColors, inferRunStatus, isDisabledByNoResult, toaster, truncateUrl, useToaster };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use client";import{At as e,Bt as t,Cn as n,Ct as r,Dt as i,Et as a,Ft as o,Gt as s,It as c,Kt as l,Lt as u,Mt as d,Nt as f,Ot as p,Pt as m,Qt as h,Rt as g,Sn as _,St as v,Tt as y,Ut as b,Wt as x,Xt as S,Yt as C,Zt as w,_t as T,bt as E,ct as D,dn as O,dt as k,en as A,fn as j,ft as M,gt as N,ht as P,jt as F,kt as I,lt as L,mn as R,mt as z,nn as B,on as V,pn as H,pt as U,rn as W,sn as G,st as K,tn as q,un as J,ut as Y,vt as X,wt as Z,xn as Q,xt as $,yt as ee,zt as te}from"./AuthModal-CXrikA-g.js";import{dt as ne,ft as re,lt as ie,pt as ae,st as oe,ut as se}from"./utils-Crcz1Rb5.js";export{Q as COLUMN_NODE_HEIGHT,_ as COLUMN_NODE_WIDTH,H as ChangedOnlyCheckbox,B as CheckActions,q as CheckBreadcrumb,A as CheckCard,h as CheckDescription,w as CheckDetail,S as CheckEmptyState,C as CheckList,s as CodeEditor,t as CommentInput,O as DiffDisplayModeSwitch,T as DiffEditor,ae as DiffText,oe as DiffTextWithToast,J as DropdownValuesInput,ee as EmptyRowsRenderer,N as EmptyState,z as ExternalLinkConfirmDialog,L as HSplit,$ as HistogramChart,n as LineageColumnNode,l as LineageDiffView,R as LineageEdge,G as LineageLegend,V as LineageNode,U as MarkdownContent,W as NodeTag,K as PRIMITIVES_API_VERSION,b as PresetCheckTemplateView,i as RunList,p as RunListItem,y as RunProgress,a as RunProgressOverlay,I as RunStatusAndDate,e as RunStatusBadge,F as RunStatusWithDate,Z as RunToolbar,M as ScreenshotBox,E as ScreenshotDataGrid,k as SplitPane,te as TimelineEvent,ie as Toaster,se as ToasterProvider,j as ToggleSwitch,X as TopKBarChart,Y as VSplit,o as buildCheckDescription,c as buildCheckTitle,D as createResultView,d as formatRunDate,f as formatRunDateTime,u as formatSqlAsMarkdown,x as generateCheckTemplate,v as getChartBarColors,r as getChartThemeColors,m as inferRunStatus,g as isDisabledByNoResult,ne as toaster,P as truncateUrl,re as useToaster};
2
+ "use client";import{At as e,Bt as t,Ct as n,Dt as r,Et as i,Ft as a,Gt as o,It as s,Kt as c,Lt as l,Mt as u,Nt as d,Ot as f,Pt as p,Qt as m,Rt as h,St as g,Tt as _,Ut as v,Wt as y,Xt as b,Yt as x,Zt as S,_n as C,_t as w,bt as T,ct as E,dn as D,dt as O,en as k,fn as A,ft as j,gn as M,gt as N,hn as P,ht as F,jt as I,kt as L,lt as R,mn as z,mt as B,nn as V,on as H,pn as U,pt as W,rn as G,sn as K,st as q,tn as J,un as Y,ut as X,vt as Z,wt as Q,xt as $,yt as ee,zt as te}from"./AuthModal-CPEPKSbq.js";import{dt as ne,ft as re,lt as ie,pt as ae,st as oe,ut as se}from"./utils-Crcz1Rb5.js";export{P as COLUMN_NODE_HEIGHT,M as COLUMN_NODE_WIDTH,U as ChangedOnlyCheckbox,V as CheckActions,J as CheckBreadcrumb,k as CheckCard,m as CheckDescription,S as CheckDetail,b as CheckEmptyState,x as CheckList,o as CodeEditor,t as CommentInput,D as DiffDisplayModeSwitch,w as DiffEditor,ae as DiffText,oe as DiffTextWithToast,Y as DropdownValuesInput,ee as EmptyRowsRenderer,N as EmptyState,B as ExternalLinkConfirmDialog,R as HSplit,$ as HistogramChart,C as LineageColumnNode,c as LineageDiffView,z as LineageEdge,K as LineageLegend,H as LineageNode,W as MarkdownContent,G as NodeTag,q as PRIMITIVES_API_VERSION,v as PresetCheckTemplateView,r as RunList,f as RunListItem,_ as RunProgress,i as RunProgressOverlay,L as RunStatusAndDate,e as RunStatusBadge,I as RunStatusWithDate,Q as RunToolbar,j as ScreenshotBox,T as ScreenshotDataGrid,O as SplitPane,te as TimelineEvent,ie as Toaster,se as ToasterProvider,A as ToggleSwitch,Z as TopKBarChart,X as VSplit,a as buildCheckDescription,s as buildCheckTitle,E as createResultView,u as formatRunDate,d as formatRunDateTime,l as formatSqlAsMarkdown,y as generateCheckTemplate,g as getChartBarColors,n as getChartThemeColors,p as inferRunStatus,h as isDisabledByNoResult,ne as toaster,F as truncateUrl,re as useToaster};
package/dist/result.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use client";import{ct as e}from"./AuthModal-CXrikA-g.js";export{e as createResultView};
2
+ "use client";import{ct as e}from"./AuthModal-CPEPKSbq.js";export{e as createResultView};
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import{$ as e,A as t,D as n,G as r,J as i,K as a,M as o,N as s,O as c,R as l,W as u,X as d,_t as f,a as p,c as m,d as h,et as g,gt as _,h as v,it as y,j as b,k as x,l as S,lt as C,m as w,mt as ee,n as T,nt as E,o as D,p as O,s as te,u as ne,w as re,x as ie}from"./api-E1dkaTi_.js";import{c as k,f as A}from"./keepAlive-DbC0X4zr.js";import{r as ae,t as j}from"./fetchClient-BVyYwVMf.js";import{C as oe,O as se,T as ce,_ as M,a as le,b as N,d as ue,f as de,g as P,h as fe,j as pe,k as me,l as he,m as ge,o as _e,p as ve,s as ye,u as be,v as xe,w as Se,y as Ce}from"./utils-SEuNIttT.js";import{i as we,n as F}from"./colors-BbPSDR1X.js";import{$t as Te,A as Ee,Bt as De,Cn as Oe,Dn as ke,E as Ae,En as je,Fn as Me,Ft as Ne,Gt as Pe,Ht as Fe,In as Ie,It as Le,L as Re,Lt as ze,M as Be,Mn as I,Nn as L,Nt as Ve,O as He,Qt as Ue,Rt as We,S as R,Sn as Ge,T as Ke,Tn as qe,Ut as Je,V as z,Vt as Ye,Wt as Xe,Xt as Ze,Yt as Qe,Zt as $e,_n as et,_t as tt,an as nt,bn as rt,bt as it,c as at,d as ot,dt as st,en as ct,f as lt,in as ut,j as dt,k as ft,ln as pt,lt as mt,m as ht,n as gt,o as _t,on as vt,p as yt,pt as bt,r as xt,rn as St,s as Ct,sn as wt,t as Tt,tn as Et,tt as Dt,un as Ot,ut as kt,v as At,vn as jt,w as Mt,wn as Nt,xn as Pt,yn as Ft,yt as It}from"./AuthModal-CPEPKSbq.js";import{Ft as Lt,Pt as Rt,Q as zt,a as Bt,ct as Vt,dt as Ht,i as Ut,m as Wt,n as Gt,o as Kt,r as qt,s as Jt,t as Yt}from"./utils-Crcz1Rb5.js";import{fetchGitHubAvatar as Xt,fetchUser as Zt}from"./lib/api/user.js";import{PUBLIC_CLOUD_WEB_URL as Qt,RECCE_SUPPORT_CALENDAR_URL as $t}from"./lib/const.js";import{EXPLORE_ACTION as en,EXPLORE_FORM_EVENT as tn,EXPLORE_SOURCE as nn,trackColumnLevelLineage as rn,trackCopyToClipboard as an,trackEnvironmentConfig as on,trackExploreAction as sn,trackExploreActionForm as cn,trackHistoryAction as ln,trackInit as un,trackLineageSelection as dn,trackLineageViewRender as fn,trackMultiNodesAction as pn,trackNavigation as mn,trackPreviewChange as hn,trackPreviewChangeFeedback as gn,trackShareState as _n,trackSingleEnvironment as vn,trackStateAction as yn}from"./lib/api/track.js";import{t as bn}from"./constants-D-hOGDbU.js";import{QueryClient as xn,QueryClientProvider as Sn,useMutation as Cn,useQuery as wn,useQueryClient as Tn}from"@tanstack/react-query";import{Suspense as En,createContext as Dn,forwardRef as On,memo as kn,useCallback as B,useContext as An,useEffect as jn,useImperativeHandle as Mn,useLayoutEffect as Nn,useMemo as V,useRef as Pn,useState as H}from"react";import{Fragment as U,jsx as W,jsxs as G}from"react/jsx-runtime";import K from"@mui/material/Box";import q from"@mui/material/Button";import Fn from"@mui/material/Dialog";import In from"@mui/material/DialogActions";import Ln from"@mui/material/DialogContent";import Rn from"@mui/material/DialogTitle";import zn from"@mui/material/Link";import J from"@mui/material/Stack";import Y from"@mui/material/Typography";import{LuExternalLink as Bn,LuSave as Vn}from"react-icons/lu";import{alpha as Hn,useTheme as Un}from"@mui/material/styles";import{useTheme as Wn}from"next-themes";import X from"@mui/material/IconButton";import Gn from"next/link";import{IoBookmarksOutline as Kn,IoClose as qn,IoSync as Jn,IoWarning as Yn}from"react-icons/io5";import Xn from"@mui/material/Divider";import Zn from"@mui/material/CircularProgress";import Z from"@mui/material/Tooltip";import{FaCloud as Qn,FaExpandArrowsAlt as $n,FaGithub as er,FaQuestionCircle as tr,FaRegDotCircle as nr,FaSlack as rr,FaUser as ir}from"react-icons/fa";import{PiBookmarkSimple as ar,PiCaretDown as or,PiChatText as sr,PiCheckCircle as cr,PiCircle as lr,PiCopy as ur,PiExport as dr,PiInfo as fr,PiInfoFill as pr,PiMoon as mr,PiNotePencil as hr,PiPencil as gr,PiPencilSimple as _r,PiPlusCircle as vr,PiRepeat as yr,PiSun as br,PiTrashFill as xr,PiTrashSimple as Sr,PiX as Cr}from"react-icons/pi";import wr from"@mui/material/Chip";import{Background as Tr,BackgroundVariant as Er,BaseEdge as Dr,ControlButton as Or,Controls as kr,MiniMap as Ar,Panel as jr,Position as Mr,ReactFlow as Nr,ReactFlowProvider as Pr,getBezierPath as Fr,getNodesBounds as Ir,useEdgesState as Lr,useNodesState as Rr,useReactFlow as zr,useStore as Br}from"@xyflow/react";import Vr from"file-saver";import Hr from"@mui/material/Checkbox";import Ur from"@mui/material/FormControlLabel";import{useCopyToClipboard as Wr,useInterval as Gr}from"usehooks-ts";import Kr from"@mui/material/Alert";import qr from"@mui/material/Menu";import Q from"@mui/material/MenuItem";import{isEmpty as Jr}from"lodash";import{VscCircleLarge as Yr,VscFeedback as Xr,VscGitPullRequest as Zr,VscHistory as Qr,VscKebabVertical as $r}from"react-icons/vsc";import ei from"@mui/material/ListSubheader";import ti from"@mui/material/TextField";import{format as ni,formatDistanceToNow as ri,parseISO as ii}from"date-fns";import ai from"@mui/material/Tab";import oi from"@mui/material/Tabs";import si from"@mui/material/List";import ci from"@mui/material/ListItem";import"@xyflow/react/dist/style.css";import{Box as li,Typography as ui}from"@mui/material";import di from"@mui/material/Avatar";import fi from"@mui/material/Popover";import{usePathname as pi,useRouter as mi,useSearchParams as hi}from"next/navigation";import{TbChecklist as gi,TbCloudUpload as _i,TbEdit as vi}from"react-icons/tb";import yi from"@mui/material/ListItemIcon";import bi from"@mui/material/ListItemText";import{FiArrowRight as xi,FiCopy as Si,FiInfo as Ci,FiPackage as wi}from"react-icons/fi";import Ti from"@mui/material/Switch";import{RiArrowDownSFill as Ei,RiArrowUpSFill as Di,RiMindMap as Oi,RiSwapLine as ki,RiTerminalBoxLine as Ai}from"react-icons/ri";import{FaBookmark as ji,FaFileImport as Mi}from"react-icons/fa6";import{BiArrowFromBottom as Ni,BiArrowToBottom as Pi}from"react-icons/bi";import Fi from"@dagrejs/dagre";import Ii from"@mui/material/Skeleton";import{AiOutlineExperiment as Li}from"react-icons/ai";import Ri from"@mui/material/Radio";import zi from"@mui/material/RadioGroup";import Bi from"@mui/material/Table";import Vi from"@mui/material/TableBody";import $ from"@mui/material/TableCell";import Hi from"@mui/material/TableContainer";import Ui from"@mui/material/TableHead";import Wi from"@mui/material/TableRow";import Gi from"@mui/material/Badge";import Ki from"@mui/material/Grid";import{stripIndents as qi}from"common-tags";import{IoMdCodeWorking as Ji}from"react-icons/io";import{DragDropContext as Yi,Draggable as Xi,Droppable as Zi}from"@hello-pangea/dnd";import Qi from"@mui/material/Card";import $i from"@mui/material/CardContent";import ea from"@mui/material/CardHeader";const ta=Dn(null);ta.displayName=`RecceRoutingContext`;function na(){return An(ta)||{basePath:``,buildPath:e=>e,pathname:``,navigate:e=>{typeof window<`u`&&(window.location.href=e)}}}function ra(){let{pathname:e,navigate:t}=na();return[e,t]}function ia({children:e,config:t}){let n=t?.basePath??``,r=t?.pathname??``,i=t?.onNavigate,a=B(e=>n?`${n}${e.startsWith(`/`)?e:`/${e}`}`:e,[n]),o=B((e,t)=>{i?i(e,t):typeof window<`u`&&(t?.replace?(window.history.replaceState(null,``,e),window.dispatchEvent(new PopStateEvent(`popstate`))):window.location.href=e)},[i]),s=V(()=>({basePath:n,buildPath:a,pathname:r,navigate:o}),[n,a,r,o]);return W(ta.Provider,{value:s,children:e})}const aa=e=>new xn({defaultOptions:{queries:{staleTime:e?.staleTime??1e3*60,gcTime:e?.gcTime??1e3*60*5,retry:1,refetchOnWindowFocus:!1}}});function oa({children:e,api:t,theme:n=`system`,routing:r,queryClient:i,runActions:a,lineage:o,checks:s,query:c,features:l={}}){let u=i?.staleTime,d=i?.gcTime,f=V(()=>aa({staleTime:u,gcTime:d}),[u,d]),{enableInstance:p=!0,enableIdleTimeout:m=!0,enableLineage:h=!0,enableRunActions:g=!0,enableChecks:_=!0,enableQuery:v=!0}=l,y=e;return y=W(ia,{config:r,children:y}),y=W(Lt,{defaultMode:n,children:y}),y=W(k,{config:t,children:y}),y=W(Sn,{client:f,children:y}),v&&(y=W(L,{sql:c?.sql,isExecuting:c?.isExecuting,error:c?.error,baseResult:c?.baseResult,currentResult:c?.currentResult,onSqlChange:c?.onSqlChange,onExecute:c?.onExecute,onCancel:c?.onCancel,children:y})),_&&(y=W(Me,{checks:s?.checks,isLoading:s?.isLoading,error:s?.error,selectedCheckId:s?.selectedCheckId,onSelectCheck:s?.onSelectCheck,onCreateCheck:s?.onCreateCheck,onUpdateCheck:s?.onUpdateCheck,onDeleteCheck:s?.onDeleteCheck,onReorderChecks:s?.onReorderChecks,refetchChecks:s?.refetchChecks,children:y})),g&&(y=W(se,{onRunAction:a?.onRunAction,onShowRunId:a?.onShowRunId,initialRunId:a?.initialRunId,initialHistoryOpen:a?.initialHistoryOpen,children:y})),h&&(y=W(P,{lineageGraph:o?.lineageGraph,envInfo:o?.envInfo,reviewMode:o?.reviewMode,cloudMode:o?.cloudMode,fileMode:o?.fileMode,fileName:o?.fileName,isDemoSite:o?.isDemoSite,isCodespace:o?.isCodespace,isLoading:o?.isLoading,error:o?.error,supportTasks:o?.supportTasks,onRefetchLineageGraph:o?.onRefetchLineageGraph,runsAggregated:o?.runsAggregated,onRefetchRunsAggregated:o?.onRefetchRunsAggregated,children:y})),m&&(y=W(Ce,{children:y})),p&&(y=W(oe,{children:y})),y}function sa({actionState:e,onCancel:t,onClose:n}){let r=()=>e.mode===`per_node`?`${e.completed} / ${e.total}`:e.currentRun?.progress?.percentage?`${e.currentRun.progress.percentage*100}%`:e.status===`completed`?`100%`:`0%`,i=e.status===`running`||e.status===`canceling`;return W(K,{sx:{bgcolor:`background.paper`,borderRadius:1,boxShadow:6},children:G(J,{direction:`row`,divider:W(Xn,{orientation:`vertical`,flexItem:!0}),spacing:2,sx:{p:`5px 15px`,mt:2},children:[G(K,{sx:{fontSize:`10pt`},children:[`Progress: `,r(),` `,e.status===`canceled`?` (canceled)`:``]}),i?W(q,{size:`small`,variant:`outlined`,onClick:t,disabled:e.status===`canceling`,children:e.status===`canceling`?`Canceling`:`Cancel`}):W(J,{direction:`row`,children:W(q,{size:`small`,variant:`outlined`,onClick:n,children:`Close`})})]})})}const ca=({lineageGraph:e,cllInput:t,onCenterNode:n})=>{let r={cursor:`pointer`,fontFamily:`monospace`,bgcolor:Rt()?`grey.700`:`grey.100`,px:.5,borderRadius:.5};if(!e)return W(U,{});if(!t)return W(U,{children:`Default View`});if(t.node_id===void 0)return W(Y,{component:`span`,children:`Impact Radius for All Changed Models`});let i=t.node_id in e.nodes?e.nodes[t.node_id].data.name:t.node_id;if(!t.column){let e=t.node_id;return G(U,{children:[W(Y,{component:`span`,sx:{mr:`5px`},children:`Impact Radius for`}),W(K,{component:`code`,onClick:()=>{n(e)},sx:r,children:i})]})}let a=`${t.node_id}_${t.column}`;return G(U,{children:[G(Y,{component:`span`,sx:{mr:`5px`},children:[`Column Lineage for`,` `]}),G(K,{component:`code`,onClick:()=>{n(a)},sx:r,children:[i,`.`,t.column]})]})},la=({action:e,interactive:t,viewOptions:n,lineageGraph:r,singleEnvMode:i=!1,changeAnalysisAvailable:a=!0,onShowCll:o,onResetCll:s,onCenterNode:c,setChangeAnalysisMode:l,newCllExperience:u=!1,changeAnalysisMode:d=!1})=>{let f=n.column_level_lineage,p=!r?.catalogMetadata.current,m=u&&d,h=f&&!(u&&!f.column);return G(J,{direction:`row`,spacing:`5px`,children:[!i&&!m&&W(K,{sx:{borderRadius:1,boxShadow:3},children:W(Z,{enterDelay:50,title:a?p?`Please provide catalog.json to enable Impact Radius`:``:`Requires warehouse connection`,placement:`top`,children:W(`span`,{children:W(q,{size:`small`,variant:`outlined`,color:`neutral`,sx:{whiteSpace:`nowrap`,display:`inline-flex`,bgcolor:`background.paper`},disabled:!t||p||!a||e.isPending,startIcon:W(nr,{}),onClick:()=>{l?.(!0),o({no_upstream:!0,change_analysis:!0})},children:`Impact Radius`})})})}),h&&G(J,{direction:`row`,alignItems:`center`,sx:{borderRadius:1,boxShadow:3,border:`1px solid`,borderColor:`divider`,bgcolor:`background.paper`,fontSize:`0.8rem`,p:`0 0.625rem`},children:[W(ca,{lineageGraph:r,cllInput:f,onCenterNode:c}),e.isError&&W(Z,{title:`Error: ${e.error.message}`,placement:`bottom`,children:W(Y,{component:`span`,sx:{color:`error.main`,ml:`2px`,display:`inline-flex`,alignItems:`center`},children:W(K,{component:fr,sx:{color:`error.main`,fontSize:`14px`}})})}),e.isPending?W(Zn,{size:12,sx:{ml:`2px`}}):W(X,{size:`small`,sx:{ml:`2px`},"aria-label":`Reset Column Level Lineage`,onClick:()=>{s()},children:W(Cr,{size:`10px`})})]})]})};function ua({onClose:e}){let{cancel:t,actionState:n}=fe();return W(sa,{actionState:n,onCancel:t,onClose:e})}const da=({action:e})=>{let{showColumnLevelLineage:t,resetColumnLevelLineage:n,interactive:r,viewOptions:i,centerNode:a,setChangeAnalysisMode:o,newCllExperience:s,changeAnalysisMode:c}=fe(),{data:l}=be(),u=l?.single_env_onboarding??!1,{lineageGraph:d,isActionAvailable:f}=M();return W(la,{action:e,interactive:r,viewOptions:i,lineageGraph:d,singleEnvMode:u,changeAnalysisAvailable:f(`change_analysis`),onShowCll:t,onResetCll:()=>n(),onCenterNode:a,setChangeAnalysisMode:o,newCllExperience:s,changeAnalysisMode:c})};function fa(e){let{id:t,data:n}=e,{id:r}=n.node,{column:i,type:a,transformationType:o,changeStatus:s,isImpacted:c}=n,l=Br(e=>e.transform[2]>.3),{isDark:u}=gt(),{viewOptions:d,showContextMenu:f,isNodeHighlighted:p,isNodeShowingChangeAnalysis:m}=fe(),h=d.column_level_lineage?.node_id,g=i===d.column_level_lineage?.column&&r===h,_=p(t),v=m(r);return W(et,{id:t,data:{column:i,type:a,nodeId:r,transformationType:o,changeStatus:s,isHighlighted:_,isFocused:g,isImpacted:c},showContent:l,showChangeAnalysis:v,isDark:u,onContextMenu:(t,n)=>{f(t,e)}})}const pa=kn(fa);pa.displayName=`GraphColumnNode`;function ma(e){let{source:t,target:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,style:l={},markerEnd:u,data:d,isEdgeHighlighted:f}=e,p={...l};d?.changeStatus&&(p.stroke=Ge(d.changeStatus).hexColor,p.strokeDasharray=`5`),!f||f(t,n)||(p.filter=Nt);let[m]=Fr({sourceX:r,sourceY:i,sourcePosition:s,targetX:a,targetY:o,targetPosition:c});return W(U,{children:W(Dr,{path:m,markerEnd:u,style:{...p,...l}})})}const ha=kn(ma);ha.displayName=`GraphEdge`;function ga(e){let{isEdgeHighlighted:t}=fe();return W(ha,{...e,isEdgeHighlighted:t})}const _a=()=>W(`svg`,{stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`,viewBox:`0 0 256 256`,height:`1em`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`,children:W(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`})}),va=()=>W(`svg`,{stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`,viewBox:`0 0 256 256`,height:`1em`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`,children:W(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`})});function ya({skipReason:e}){return W(wr,{size:`small`,label:G(J,{direction:`row`,sx:{fontSize:`10pt`,color:`grey.500`,alignItems:`center`,gap:`3px`},children:[W(K,{children:`Skipped`}),e&&W(Z,{title:e,children:W(K,{component:`span`,sx:{display:`flex`},children:W(_a,{})})})]}),sx:{bgcolor:`grey.100`}})}function ba({errorMessage:e}){return G(J,{direction:`row`,sx:{fontSize:`10pt`,color:`gray`,alignItems:`center`},children:[W(K,{children:`Error`}),e&&W(Z,{title:e,children:W(K,{component:`span`,sx:{display:`flex`},children:W(va,{})})})]})}function xa({result:e}){let{mismatchedColumns:t}=e,n=t>0;return W(wr,{size:`small`,sx:{bgcolor:n?`error.light`:`success.light`},label:W(J,{direction:`row`,sx:{fontSize:`10pt`,color:n?`error.main`:`success.main`,alignItems:`center`,gap:`3px`},children:n?`${t} columns mismatched`:`All columns match`})})}function Sa({result:e}){let{base:t,current:n}=e,r=t===null?`N/A`:t.toLocaleString(),i=n===null?`N/A`:n.toLocaleString(),a=``,o=`grey.500`;return t!==null&&n!==null&&(n>t?(a=`↑`,o=`success.main`):n<t?(a=`↓`,o=`error.main`):a=`=`),W(wr,{size:`small`,sx:{bgcolor:`grey.100`},label:G(J,{direction:`row`,sx:{fontSize:`10pt`,alignItems:`center`,gap:`3px`},children:[W(K,{children:r}),W(K,{children:`→`}),W(K,{children:i}),a&&W(K,{component:`span`,sx:{color:o,ml:.5},children:a})]})})}function Ca({status:e,skipReason:t,errorMessage:n,progress:r,valueDiffResult:i,rowCountDiffResult:a,runId:o,"data-testid":s}){return e===`pending`?W(Zn,{size:16,"data-testid":s,"data-status":`pending`}):e===`skipped`?W(K,{"data-testid":s,"data-status":`skipped`,children:W(ya,{skipReason:t})}):e===`running`?r?.percentage===void 0?W(Zn,{size:16,"data-testid":s,"data-status":`running`}):W(Zn,{variant:`determinate`,value:r.percentage*100,size:16,"data-testid":s,"data-status":`running`}):e===`error`?W(K,{"data-testid":s,"data-status":`error`,children:W(ba,{errorMessage:n})}):i?W(K,{"data-testid":s,"data-status":`success`,children:W(xa,{result:i})}):a?W(K,{"data-testid":s,"data-status":`success`,children:W(Sa,{result:a})}):W(K,{"data-testid":s,"data-status":`success`,children:o||`Complete`})}const wa=kn(Ca);wa.displayName=`ActionTag`;const Ta={success:`#059669`,failure:`#ef4444`,error:`#ef4444`,warning:`#f59e0b`},Ea={success:`PASSED`,failure:`FAILED`,error:`ERROR`,warning:`WARNING`};function Da(e){return Ta[e]??`#6b7280`}function Oa(e){return Ea[e]??e.toUpperCase()}function ka({run:e,index:t,onClick:n}){let r=Da(e.status),i=Oa(e.status),a=ri(new Date(e.run_at),{addSuffix:!0}),o=!!n;return G(li,{component:o?`button`:`div`,type:o?`button`:void 0,onClick:o?()=>n?.(e.run_id):void 0,"aria-label":o?`View run #${t} — ${i}`:void 0,sx:{p:1,border:`none`,borderLeft:`3px solid ${r}`,borderRadius:1,bgcolor:`action.hover`,cursor:o?`pointer`:`default`,"&:hover":o?{bgcolor:`action.selected`}:{},textAlign:`left`,width:`100%`,font:`inherit`,color:`inherit`},children:[G(ui,{variant:`body2`,sx:{fontWeight:600,fontSize:`0.75rem`},children:[`Run #`,t,` — `,i,e.triggered_by===`recce_ai`&&W(ui,{component:`span`,sx:{ml:.75,fontSize:`0.65rem`,fontWeight:500,color:`#7c3aed`},children:`by AI`})]}),e.summary&&W(ui,{variant:`body2`,sx:{color:`text.secondary`,fontSize:`0.7rem`,mt:.25},children:e.summary}),W(ui,{variant:`body2`,sx:{color:`text.secondary`,fontSize:`0.65rem`,mt:.25},children:a})]})}function Aa({event:e}){let t=l(e),n={create:vr,comment:sr,approve:cr,unapprove:lr,edit:hr,preset:ar},r={create:`primary.main`,comment:`grey.500`,approve:`success.main`,unapprove:`grey.400`,edit:`warning.main`,preset:`secondary.main`},i=n[t],a=r[t];return W(K,{component:i,sx:{color:a,fontSize:16}})}function ja({event:e}){let{actor:t}=e,{avatarUrl:n}=Ye({userId:t.user_id}),r=(t.fullname||t.login||`User`).charAt(0).toUpperCase();return W(di,{src:n||void 0,sx:{width:24,height:24,fontSize:`0.75rem`},children:r})}function Ma({event:e}){let{actor:t}=e,n=t.fullname||t.login||`Someone`,r=ri(new Date(e.created_at),{addSuffix:!0}),i=``;switch(e.event_type){case`check_created`:i=`created this check`;break;case`approval_change`:i=e.new_value===`true`?`approved this check`:`unapproved this check`;break;case`description_change`:i=`updated the description`;break;case`name_change`:i=`renamed this check`;break;case`preset_applied`:i=`applied a preset`;break;default:i=`made a change`}return G(K,{sx:{display:`flex`,gap:1,alignItems:`flex-start`,py:1},children:[W(K,{sx:{pt:`2px`},children:W(Aa,{event:e})}),W(K,{sx:{flex:1},children:G(J,{direction:`row`,spacing:.5,flexWrap:`wrap`,alignItems:`center`,children:[W(ja,{event:e}),W(Y,{variant:`body2`,fontWeight:`500`,children:n}),W(Y,{variant:`body2`,color:`text.secondary`,children:i}),W(Y,{variant:`caption`,color:`text.disabled`,children:r})]})})]})}function Na({event:e,currentUserId:t,onEdit:n,onDelete:r}){let i=Rt(),[a,o]=H(!1),[s,c]=H(e.content||``),[l,u]=H(!1),[d,f]=H(!1),[p,m]=H(null),h=!!p,{actor:g}=e,_=g.fullname||g.login||`Someone`,v=ri(new Date(e.created_at),{addSuffix:!0}),y=t&&String(g.user_id)===String(t),b=()=>{c(e.content||``),o(!0)},x=()=>{c(e.content||``),o(!1)},S=async()=>{let t=s.trim();if(!t||t===e.content){x();return}if(n){u(!0);try{await n(e.id,t),o(!1)}finally{u(!1)}}},C=e=>{e.key===`Escape`?x():e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S())},w=e=>{m(e.currentTarget)},ee=()=>{m(null)},T=async()=>{if(r){f(!0);try{await r(e.id),ee()}finally{f(!1)}}};return e.is_deleted?G(K,{sx:{display:`flex`,gap:1,alignItems:`center`,py:1},children:[W(K,{sx:{pt:`2px`,display:`flex`,alignItems:`center`},children:W(Aa,{event:e})}),W(K,{sx:{display:`flex`,flex:1,alignItems:`center`},children:W(Y,{variant:`body2`,color:`text.disabled`,fontStyle:`italic`,children:`Comment deleted`})})]}):G(K,{sx:{display:`flex`,gap:1,alignItems:`flex-start`,py:1},children:[W(K,{sx:{pt:`2px`},children:W(Aa,{event:e})}),G(K,{sx:{flex:1},children:[G(J,{direction:`row`,spacing:.5,sx:{mb:.5},flexWrap:`wrap`,alignItems:`center`,children:[W(ja,{event:e}),G(Y,{variant:`body2`,fontWeight:`500`,children:[_,y&&G(Y,{component:`span`,variant:`body2`,color:`text.secondary`,children:[` `,`(Author)`]})]}),W(Y,{variant:`caption`,color:`text.disabled`,children:v}),e.is_edited&&W(Y,{variant:`caption`,color:`text.disabled`,children:`(edited)`})]}),a?G(K,{children:[W(ti,{value:s,onChange:e=>c(e.target.value),onKeyDown:C,size:`small`,multiline:!0,minRows:3,fullWidth:!0,disabled:l,autoFocus:!0,sx:{"& .MuiOutlinedInput-root":{bgcolor:`background.paper`,"&:focus-within":{borderColor:`primary.main`}}}}),G(J,{direction:`row`,spacing:1,sx:{mt:1},justifyContent:`flex-end`,children:[W(q,{size:`small`,variant:`text`,onClick:x,disabled:l,children:`Cancel`}),W(q,{size:`small`,variant:`contained`,onClick:S,disabled:!s.trim()||l,children:l?`Saving...`:`Save`})]})]}):G(K,{sx:{bgcolor:i?`grey.800`:`grey.50`,borderRadius:1,p:1,border:`1px solid`,borderColor:i?`grey.700`:`grey.200`,position:`relative`,"&:hover .comment-actions":{opacity:1}},children:[W(bt,{content:e.content||``,fontSize:`sm`}),y&&(n||r)&&G(J,{className:`comment-actions`,direction:`row`,spacing:0,sx:{position:`absolute`,top:4,right:4,opacity:0,transition:`opacity 0.2s`},children:[n&&W(Z,{title:`Edit comment`,children:W(X,{"aria-label":`Edit comment`,size:`small`,onClick:b,children:W(_r,{})})}),r&&G(U,{children:[W(Z,{title:`Delete comment`,children:W(X,{"aria-label":`Delete comment`,size:`small`,color:`error`,onClick:w,children:W(Sr,{})})}),W(fi,{open:h,anchorEl:p,onClose:ee,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},children:G(K,{sx:{p:2},children:[W(Y,{variant:`body2`,sx:{mb:2},children:`Delete this comment?`}),G(J,{direction:`row`,spacing:1,justifyContent:`flex-end`,children:[W(q,{size:`small`,variant:`text`,onClick:ee,disabled:d,children:`Cancel`}),W(q,{size:`small`,variant:`contained`,color:`error`,onClick:T,disabled:d,children:d?`Deleting...`:`Delete`})]})]})})]})]})]})]})]})}function Pa({event:e,currentUserId:t,onEdit:n,onDelete:r}){return e.event_type===`comment`?W(Na,{event:e,currentUserId:t,onEdit:n,onDelete:r}):W(Ma,{event:e})}function Fa(e,t){let n=e?.toLowerCase();return n===`finished`?t?`error`:`success`:n===`failed`?`error`:e??`unknown`}function Ia(e,t){let n=[];for(let t of e)n.push({kind:`event`,event:t,at:t.created_at});if(t){let e=[...t].sort((e,t)=>new Date(e.run_at).getTime()-new Date(t.run_at).getTime());for(let t=0;t<e.length;t++)n.push({kind:`run`,run:e[t],index:t+1,at:e[t].run_at})}return n.sort((e,t)=>new Date(t.at).getTime()-new Date(e.at).getTime()),n}function La({checkId:e}){let t=Rt(),{apiClient:n,authToken:r}=Fe(),{events:i,isLoading:a,error:o,createComment:s,isCreatingComment:c,updateComment:l,deleteComment:u}=ot(e),{data:f}=wn({queryKey:A.user(),queryFn:()=>Zt(n),retry:!1}),{data:p}=wn({queryKey:[`check-runs`,e],queryFn:async()=>(await d(n)).filter(t=>t.check_id===e).map(e=>({run_id:e.run_id,run_at:e.run_at,status:Fa(e.status,e.error),summary:e.error||void 0,triggered_by:e.triggered_by})),enabled:!!r,staleTime:3e4}),m=V(()=>Ia(i,p),[i,p]),h=e=>{s(e)},g=async(e,t)=>{await l({eventId:e,content:t})},_=async e=>{await u(e)};return a?W(K,{sx:{height:`100%`,p:4,display:`flex`,justifyContent:`center`,alignItems:`center`},children:W(Zn,{size:20})}):o?W(K,{sx:{height:`100%`,p:4,display:`flex`,justifyContent:`center`,alignItems:`center`},children:W(Y,{sx:{fontSize:`0.875rem`,color:`error.main`},children:`Failed to load timeline`})}):G(J,{sx:{height:`100%`,alignItems:`stretch`,borderLeft:`1px solid`,borderColor:t?`grey.700`:`grey.200`},spacing:0,children:[W(K,{sx:{px:3,py:2,borderBottom:`1px solid`,borderColor:t?`grey.700`:`grey.200`},children:W(Y,{variant:`subtitle2`,sx:{fontWeight:500},children:`Activity`})}),W(K,{sx:{flex:1,overflowY:`auto`,px:3,py:2},children:m.length===0?W(Y,{sx:{fontSize:`0.875rem`,color:`grey.500`},children:`No activity yet`}):W(J,{sx:{alignItems:`stretch`},spacing:0,children:m.map((e,n)=>G(K,{children:[e.kind===`event`?W(Pa,{event:e.event,currentUserId:f?.id,onEdit:g,onDelete:_}):W(ka,{run:e.run,index:e.index}),n<m.length-1&&W(Xn,{sx:{borderColor:t?`grey.700`:`grey.100`}})]},e.kind===`event`?e.event.id:e.run.run_id))})}),W(K,{sx:{px:3,py:3,borderTop:`1px solid`,borderColor:t?`grey.700`:`grey.200`,bgcolor:t?`grey.900`:`grey.50`},children:W(De,{onSubmit:h,isSubmitting:c})})]})}function Ra({color:e}){return W(K,{component:`span`,sx:{display:`inline-block`,width:`10px`,height:`10px`,bgcolor:e,mr:1,borderRadius:`4px`}})}const za=({defaultPrimaryKeys:e,onPrimaryKeysChange:t,...n})=>{let{lineageGraph:r,isActionAvailable:i}=M(),a=V(()=>{if(!r)return[];let e=new Set;for(let t in r.nodes){let n=r.nodes[t],i={...n.data.data.base?.columns??{},...n.data.data.current?.columns??{}};Object.entries(i).forEach(([t,n])=>{n?.unique&&e.add(t)})}return Array.from(e).sort()},[r]);return W(K,{sx:{display:`flex`},...n,children:G(J,{spacing:0,sx:{m:`0 0.5rem`},children:[G(J,{direction:`row`,alignItems:`center`,spacing:.5,children:[W(Y,{component:`label`,sx:{fontSize:`0.625rem`,color:`text.secondary`},children:`Diff with Primary Key(s) (suggested)`}),W(Z,{title:`Provide a primary key to perform query diff in data warehouse and only return changed rows.`,placement:`bottom-end`,children:W(K,{component:`span`,sx:{display:`flex`,color:`grey.600`,cursor:`help`},children:W(fr,{fontSize:`0.75rem`})})})]}),W(Ot,{className:`no-track-pii-safe`,unitName:`key`,defaultValues:e,suggestionList:a,onValuesChange:t,size:`2xs`,width:`240px`,placeholder:`Select or type to add keys`,disabled:!i(`query_diff_with_primary_key`)})]})})};function Ba({supportCalendarUrl:e=`https://cal.com/team/recce/chat`}){let{data:t}=ce();return W(`div`,{className:`flex flex-1 h-full min-h-0 m-2 p-4 bg-blue-50 rounded-lg shadow-md justify-center`,children:G(`div`,{className:`w-4/5 flex flex-col overflow-y-auto gap-6 px-8 pb-8`,children:[G(J,{alignItems:`center`,spacing:2,children:[W(K,{sx:{p:1,bgcolor:`background.paper`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:2},children:W(K,{component:Ai,sx:{fontSize:28,color:`iochmara.500`}})}),W(Y,{variant:`h5`,sx:{mt:2},children:`Wait, there's more!`}),G(Y,{sx:{fontSize:`1rem`,textAlign:`center`},children:[`Query functions disabled without a`,` `,W(Y,{component:`span`,sx:{fontWeight:`bold`},children:`data warehouse connection`})]})]}),W(J,{sx:{width:`50%`,mt:3,mx:`auto`},children:W(q,{color:`iochmara`,variant:`contained`,size:`large`,onClick:()=>{window.open(Yt(t,e),`_blank`)},children:`Connect to Data Warehouse`})})]})})}const Va=()=>{let{isCustomQueries:e,setCustomQueries:t,sqlQuery:n,setBaseSqlQuery:r}=R();return G(K,{children:[G(J,{direction:`row`,spacing:.5,alignItems:`center`,fontSize:`0.75rem`,children:[W(Y,{variant:`body2`,sx:{fontSize:`0.75rem`},children:`Custom Queries`}),W(Z,{title:`Custom queries allow you to use two SQL queries to compare results between current and base environments.`,children:W(K,{component:`span`,sx:{display:`flex`,color:`grey.600`},children:W(pr,{fontSize:`1rem`})})})]}),W(Ti,{size:`small`,checked:e,onChange:()=>{!e&&r&&r(n),t(!e)},color:`primary`})]})},Ha=()=>{let{sqlQuery:e,baseSqlQuery:t,setSqlQuery:n,setBaseSqlQuery:i,primaryKeys:o,setPrimaryKeys:s,isCustomQueries:c}=R(),{lineageGraph:l,envInfo:d}=M(),{featureToggles:f,singleEnv:p}=Se(),m=e;d?.adapterType===`sqlmesh`&&e===`select * from {{ ref("mymodel") }}`&&(m=`select * from db.mymodel`),f.mode===`read only`&&(m=`--- Would like to do query here? Book a demo with us at ${$t}\n${m}`);let{showRunId:h}=me(),{apiClient:_}=Fe(),{mutate:v,isPending:y}=Cn({mutationFn:async e=>{function n(e){switch(e){case`query`:return u;case`query_base`:return r;case`query_diff`:return a;default:throw Error(`Unknown query type: ${e}`)}}let i=e===`query_base`?t??``:m,s=n(e),l={sql_template:i},d={nowait:!0};e===`query_diff`&&(l.primary_keys=o,c&&(l.base_sql_template=t));let{run_id:f}=await s(l,d,_);return h(f),await g(f,void 0,_)}}),b=V(()=>{let e={};if(!l)return`N/A`;for(let t in l.nodes){let n=l.nodes[t].data.data.current?.schema;n&&(e[n]=(e[n]||0)+1)}return Object.keys(e).reduce((t,n)=>e[n]>(e[t]||0)?n:t,`N/A`)},[l]);return p||f.mode===`metadata only`?G(K,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[G(K,{sx:{display:`flex`,justifyContent:`right`,alignItems:`center`,padding:`4pt 8pt`,gap:`5px`,height:`54px`,borderBottom:`1px solid`,borderColor:`divider`},children:[W(ss,{}),W(K,{sx:{flexGrow:1}}),p?W(Z,{title:`Please configure the base environment before running the diff`,placement:`left`,children:W(`span`,{children:W(q,{variant:`contained`,disabled:!0,size:`small`,sx:{fontSize:`14px`,mt:`16px`},children:`Run Diff`})})}):W(Zs,{display:f.mode===`metadata only`,children:W(q,{variant:`contained`,disabled:!0,size:`small`,sx:{fontSize:`14px`,mt:`16px`},children:`Run Diff`})})]}),W(ft,{value:m,onChange:n,onRun:()=>{v(`query`)},labels:[`base (production)`,`current (${b})`],SetupGuide:f.mode===`metadata only`?W(Ba,{}):W(ns,{})})]}):G(K,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[G(K,{sx:{display:`flex`,justifyContent:`right`,alignItems:`flex-end`,padding:`4pt 8pt`,gap:`5px`,height:`54px`,borderBottom:`1px solid`,borderColor:`divider`,flex:`0 0 54px`},children:[W(ss,{}),W(Va,{}),W(K,{sx:{flexGrow:1}}),W(za,{defaultPrimaryKeys:o,onPrimaryKeysChange:s}),W(q,{variant:`contained`,onClick:()=>{v(`query_diff`)},disabled:y||f.disableDatabaseQuery,size:`small`,children:`Run Diff`})]}),W(K,{sx:{width:`100%`,flex:1,overflowY:`auto`},children:c?W(ft,{value:m,baseValue:t,onChange:n,onChangeBase:i,onRun:()=>{v(`query`)},onRunBase:()=>{v(`query_base`)},onRunDiff:()=>{v(`query_diff`)}}):W(Ee,{value:m,onChange:n,onRun:()=>{v(`query`)},onRunDiff:()=>{v(`query_diff`)}})})]})};function Ua({rowCount:e}){let t=e.base,n=e.curr,r=e.base===null?`N/A`:`${e.base} Rows`,i=e.curr===null?`N/A`:`${e.curr} Rows`,a,o;t===null&&n===null?(a=`Failed to load`,o=`default`):t===null||n===null?(a=`${r} -> ${i}`,o=t===null?`success`:`error`):t===n?(a=`=`,o=`default`):(a=`${Wt(t,n)} Rows`,o=t<n?`success`:`error`);let s=z(`row_count_diff`).icon;return W(wr,{size:`small`,color:o,icon:s?W(s,{}):void 0,label:a,sx:{height:20,fontSize:`0.7rem`}})}function Wa({id:e,inverted:t}){let{lineageGraph:n,runsAggregated:r}=M(),{text:i,isDark:a}=gt(),o=r?.[e],s=n?.nodes[e];if(!o&&!s)return null;let c;if(s?.data.data.base&&s.data.data.current){let e=s.data.data.base.columns,t=s.data.data.current.columns;c=Gt(e,t)}let l;if(o?.row_count_diff){let e=o.row_count_diff.result;l=e.curr!==e.base}let u=t?i.inverted:Ge(`modified`).color,d=t?i.secondary:a?`grey.700`:`grey.100`,f=z(`schema_diff`).icon;return G(K,{sx:{display:`flex`,flex:1,alignItems:`center`},children:[c!==void 0&&W(Z,{title:`Schema (${c?`changed`:`no change`})`,enterDelay:500,children:W(K,{sx:{height:16},children:f&&W(K,{component:f,sx:{color:c?u:d}})})}),W(K,{sx:{flexGrow:1}}),o?.row_count_diff&&l!==void 0&&W(Z,{title:`Row count (${l?`changed`:`=`})`,enterDelay:500,children:W(K,{children:W(Ua,{rowCount:o.row_count_diff.result})})})]})}function Ga({nodeId:e,nodeName:t}){let{getNodeAction:n}=fe(),r=n(e);if(!r)return null;let{status:i,skipReason:a,run:o}=r;if(i===`pending`)return W(wa,{status:`pending`});if(i===`skipped`)return W(wa,{status:`skipped`,skipReason:a});if(!o)return W(wa,{status:`pending`});let{error:s,run_id:c,progress:l}=o;if(i===`running`)return W(wa,{status:`running`,progress:{percentage:l?.percentage}});if(s)return W(wa,{status:`error`,errorMessage:s});if(o.type===`value_diff`&&o.result){let e=o.result,t=0,n=e.data.data.length;for(let n of e.data.data)n[2]<1&&t++;return W(wa,{status:`success`,valueDiffResult:{mismatchedColumns:t,totalColumns:n}})}if(C(o)&&o.result){let e=o.result[t];if(e)return W(Ua,{rowCount:e})}if(o.type===`row_count`&&o.result){let e=o.result[t];if(e?.curr!==void 0&&e.curr!==null)return W(wr,{size:`small`,label:`${e.curr.toLocaleString()} Rows`,sx:{height:20,fontSize:`0.7rem`}})}return W(wa,{status:`success`,runId:c})}function Ka(e){let{data:t}=e,{id:n,resourceType:r,changeStatus:i,name:a}=t,o=Br(e=>e.transform[2]>.3),{isDark:s}=gt(),{interactive:c,selectNode:l,selectMode:u,focusedNode:d,getNodeAction:f,getNodeColumnSet:p,isNodeHighlighted:m,isNodeSelected:h,isNodeShowingChangeAnalysis:g,showContextMenu:_,viewOptions:v,cll:y,impactedNodeIds:b,newCllExperience:x,showColumnLevelLineage:S,setChangeAnalysisMode:C}=fe(),{isActionAvailable:w}=M(),ee=x?b.has(n):!1,T=y?.current.nodes[n]?.change_category,E=m(n),D=h(n),O=v.column_level_lineage?.node_id===n&&v.column_level_lineage.column===void 0,te=d?.id===n||O,ne=g(n),re=p(t.id),ie=u===`action_result`?f(t.id):void 0,k=i,A=u,ae=u===`action_result`&&ie?W(Ga,{nodeId:n,nodeName:a}):void 0,j=u!==`action_result`&&t.resourceType===`model`?W(Wa,{id:t.id,inverted:u===`selecting`&&D}):void 0;return W(vt,{id:n,data:{label:a,changeStatus:k,resourceType:r,materialized:t.data?.current?.config?.materialized??t.data?.base?.config?.materialized},newCllExperience:x,isImpacted:ee,interactive:c,selectMode:A,isNodeSelected:D,isFocused:te,isHighlighted:E,showContent:o,actionTag:ae,showChangeAnalysis:ne,changeCategory:T,runsAggregatedTag:j,hasParents:Object.keys(t.parents).length>0,hasChildren:Object.keys(t.children).length>0,columnCount:re.size,columnHeight:24,isDark:s,onSelect:e=>{l(e)},onContextMenu:(t,n)=>{_(t,e)},onShowImpactRadius:i===`modified`&&w(`change_analysis`)?e=>{C(!0),S({node_id:e,change_analysis:!0,no_upstream:!0})}:void 0})}const qa=kn(Ka);qa.displayName=`GraphNode`;const Ja={lineageGraphNode:qa,lineageGraphColumnNode:pa},Ya={lineageGraphEdge:ga},Xa=[],Za=e=>e.data.changeStatus?Ge(e.data.changeStatus).hexColor:F.neutral[400],Qa={ROW_COUNT:`row_count`,ROW_COUNT_DIFF:`row_count_diff`,PROFILE:`profile`,PROFILE_DIFF:`profile_diff`,VALUE_DIFF:`value_diff`,HISTOGRAM_DIFF:`histogram_diff`,TOP_K_DIFF:`top_k_diff`},$a={LINEAGE_VIEW_CONTEXT_MENU:`lineage_view_context_menu`},eo={SELECT_PARENT_NODES:`select_parent_nodes`,SELECT_CHILD_NODES:`select_child_nodes`,SELECT_ALL_UPSTREAM:`select_all_upstream`,SELECT_ALL_DOWNSTREAM:`select_all_downstream`},to=({menuItems:e,open:t,onClose:n,x:r,y:i,featureToggles:a,DisabledItemWrapper:o})=>{let s=o??(({children:e})=>W(U,{children:e})),c=a?.mode===`metadata only`;return W(qr,{open:t,onClose:n,anchorReference:`anchorPosition`,anchorPosition:{top:i,left:r},slotProps:{paper:{sx:{fontSize:`0.85rem`,width:`250px`}}},children:e.length===0?W(Q,{disabled:!0,children:`No action available`},`no action`):e.map(({isSeparator:e,label:t,isDisabled:r,action:i,itemIcon:a})=>{if(e)return W(Xn,{},t);let l=G(Q,{disabled:r,onClick:()=>{i&&i(),n()},children:[a,` `,t]},t);return r&&o?W(s,{display:c,children:l},t):l})})},no=({isOpen:e,onClose:t,x:n,y:r,node:i,deps:a={},viewOptions:o={},featureToggles:s={},serverFlags:c={},noCatalogCurrent:l=!1,isActionAvailable:u=()=>!0})=>{let d=[],{runAction:f,onNavigate:p,onTrack:m,findByRunType:h,setSqlQuery:g,setPrimaryKeys:_,getPrimaryKey:v,DisabledItemWrapper:y}=a,{selectMode:b,cll:x,showColumnLevelLineage:S,setChangeAnalysisMode:C,selectParentNodes:w,selectChildNodes:ee,getNodeColumnSet:T}=o,E=c.single_env_onboarding??!1,D=s.disableDatabaseQuery??!1;if(!i?.data)return W(U,{});let O=i.data,te=O.resourceType,ne=T?Array.from(T(i.id)):[],re={source:`lineage_model_node`},ie=O.changeStatus,k=v?.(O.name);if(ie===`modified`&&d.push({label:`Show Impact Radius`,itemIcon:W(nr,{}),isDisabled:l||!u(`change_analysis`),action:()=>{C?.(!0),S?.({node_id:i.id,change_analysis:!0,no_upstream:!0})}}),!b&&te&&[`model`,`seed`,`snapshot`].includes(te)){d.length>0&&d.push({label:`select group one`,isSeparator:!0});let e=h?.(E?`query`:`query_diff`),t=Kt(Object.keys(O.data.base?.columns??{}),Object.keys(O.data.current?.columns??{})),n=`select * from {{ ref("${O.name}") }}`;if(t.length&&(n=`select \n ${t.join(`
3
+ `)}\nfrom {{ ref("${O.name}") }}`),e&&d.push({label:`Query`,itemIcon:W(K,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:D,action:()=>{g?.(n),u(`query_diff_with_primary_key`)&&_?.(k===void 0?void 0:[k]),p?.(`/query`)}}),ne.length>0&&e)if(x!==void 0){let t=new Set;k&&t.add(k),ne.forEach(e=>{t.add(e)}),d.push({label:`Query Related Columns`,itemIcon:W(K,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:D,action:()=>{let e=`select \n ${Array.from(t).join(`,
4
+ `)}\nfrom {{ ref("${O.name}") }}`;g?.(e),u(`query_diff_with_primary_key`)&&_?.(k===void 0?void 0:[k]),p?.(`/query`)}})}else{let t=Object.entries(O.change?.columns??{}).filter(([,e])=>e===`modified`).map(([e])=>e);if(t.length>0){let n=new Set;k&&n.add(k),t.forEach(e=>{n.add(e)}),d.push({label:`Query Modified Columns`,itemIcon:W(K,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:D,action:()=>{let e=`select \n ${Array.from(n).join(`,
5
+ `)}\nfrom {{ ref("${O.name}") }}`;g?.(e),u(`query_diff_with_primary_key`)&&_?.(k===void 0?void 0:[k]),p?.(`/query`)}})}}let r=E?`row_count`:`row_count_diff`,a=h?.(r);a&&d.push({label:a.title,itemIcon:W(K,{component:a.icon,sx:{display:`inline-flex`}}),isDisabled:D,action:()=>{m?.(`explore_action`,{action:E?Qa.ROW_COUNT:Qa.ROW_COUNT_DIFF,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),f?.(r,{node_names:[O.name]},{showForm:!1,trackProps:re})}});let o=E?`profile`:`profile_diff`,s=h?.(o);if(s&&d.push({label:s.title,itemIcon:W(K,{component:s.icon,sx:{display:`inline-flex`}}),isDisabled:D,action:()=>{let e=T?Array.from(T(i.id)):[];m?.(`explore_action`,{action:E?Qa.PROFILE:Qa.PROFILE_DIFF,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),f?.(o,{model:O.name,columns:e},{showForm:!0,trackProps:re})}}),!E){let e=h?.(`value_diff`);e&&d.push({label:e.title,itemIcon:W(K,{component:e.icon,sx:{display:`inline-flex`}}),isDisabled:D,action:()=>{let e=T?Array.from(T(i.id)):[];m?.(`explore_action`,{action:Qa.VALUE_DIFF,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),f?.(`value_diff`,{model:O.name,columns:e},{showForm:!0,trackProps:re})}})}}return E||(d.length>0&&d.push({label:`select group two`,isSeparator:!0}),d.push({label:`Select Parent Nodes`,itemIcon:W(Ni,{}),action:()=>{m?.(`lineage_selection`,{action:eo.SELECT_PARENT_NODES}),w?.(i.id,1)}}),d.push({label:`Select Child Nodes`,itemIcon:W(Pi,{}),action:()=>{m?.(`lineage_selection`,{action:eo.SELECT_CHILD_NODES}),ee?.(i.id,1)}}),d.push({label:`Select All Upstream Nodes`,itemIcon:W(Ni,{}),action:()=>{m?.(`lineage_selection`,{action:eo.SELECT_ALL_UPSTREAM}),w?.(i.id)}}),d.push({label:`Select All Downstream Nodes`,itemIcon:W(Pi,{}),action:()=>{m?.(`lineage_selection`,{action:eo.SELECT_ALL_DOWNSTREAM}),ee?.(i.id)}})),W(to,{x:n,y:r,menuItems:d,open:e,onClose:t,featureToggles:s,DisabledItemWrapper:y})},ro=({isOpen:e,onClose:t,x:n,y:r,node:i,deps:a={},featureToggles:o={},serverFlags:s={},isActionAvailable:c=()=>!0})=>{let l=[],{runAction:u,onTrack:d,findByRunType:f,supportsHistogramDiff:p,DisabledItemWrapper:m}=a,h=s.single_env_onboarding??!1,g=o.disableDatabaseQuery??!1;if(i?.data===void 0)return W(U,{});let _=i.data,v=_.node,y=_.column,b=_.type,x={source:`lineage_column_node`},S=()=>{d?.(`explore_action`,{action:Qa.PROFILE_DIFF,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`profile_diff`,{model:v.name,columns:[y]},{showForm:!1,trackProps:x})},C=()=>{d?.(`explore_action`,{action:Qa.HISTOGRAM_DIFF,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`histogram_diff`,{model:v.name,column_name:y,column_type:b},{showForm:!1,trackProps:x})},w=()=>{d?.(`explore_action`,{action:Qa.TOP_K_DIFF,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`top_k_diff`,{model:v.name,column_name:y,k:50},{showForm:!1,trackProps:x})},ee=()=>{d?.(`explore_action`,{action:Qa.VALUE_DIFF,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:1}),u?.(`value_diff`,{model:v.name,columns:[y]},{showForm:!0,trackProps:x})},T=v.data.base?.columns?.[y]===void 0||v.data.current?.columns?.[y]===void 0,E=f?.(h?`profile`:`profile_diff`);if(E&&l.push({label:E.title,itemIcon:W(K,{component:E.icon,sx:{display:`inline-flex`}}),action:S,isDisabled:T||!c(`profile_diff`)||g}),!h){let e=f?.(`histogram_diff`);if(e){let t=p?.(b)??!0;l.push({label:e.title,itemIcon:W(K,{component:e.icon,sx:{display:`inline-flex`}}),action:C,isDisabled:T||!t||g})}let t=f?.(`top_k_diff`);t&&l.push({label:t.title,itemIcon:W(K,{component:t.icon,sx:{display:`inline-flex`}}),action:w,isDisabled:T||g});let n=f?.(`value_diff`);n&&l.push({label:n.title,itemIcon:W(K,{component:n.icon,sx:{display:`inline-flex`}}),action:ee,isDisabled:T||g})}return W(to,{x:n,y:r,menuItems:l,open:e,onClose:t,featureToggles:o,DisabledItemWrapper:m})},io=({isOpen:e,onClose:t,x:n,y:r,node:i,deps:a={},viewOptions:o={},featureToggles:s={},serverFlags:c={},noCatalogCurrent:l=!1,isActionAvailable:u=()=>!0})=>s.disableViewActionDropdown?W(to,{menuItems:[],open:e,onClose:t,x:n,y:r,featureToggles:s,DisabledItemWrapper:a.DisabledItemWrapper}):i&&de(i)?W(no,{x:n,y:r,isOpen:e,onClose:t,node:i,deps:a,viewOptions:o,featureToggles:s,serverFlags:c,noCatalogCurrent:l,isActionAvailable:u}):i&&ue(i)?W(ro,{x:n,y:r,isOpen:e,onClose:t,node:i,deps:a,featureToggles:s,serverFlags:c,isActionAvailable:u}):null,ao=()=>{let[e,t]=H(!1),n=()=>t(!0),r=()=>t(!1),[i,a]=H({x:0,y:0}),[o,s]=H();return{props:{x:i.x,y:i.y,node:o,isOpen:e,onClose:r},showContextMenu:(e,t,r)=>{a({x:e,y:t}),s(r),n()},closeContextMenu:()=>{a({x:0,y:0}),s(void 0),r()}}},oo=()=>{let{isDark:e}=gt(),{successToast:t,failToast:n}=Vt();return yt({renderLibrary:`html-to-image`,imageType:`png`,shadowEffect:!0,backgroundColor:e?F.neutral[900]:F.neutral[50],ignoreElements:e=>{try{return e.classList.contains(lt)}catch{return e.className?e.className.includes(lt):!1}},onSuccess:()=>{t(`Copied the Lineage View as an image to clipboard`)},onError:e=>{console.error(`Error taking screenshot`,e),n(`Failed to copy image to clipboard`,e)}})},so=()=>{let e=mi(),{basePath:t}=pe();return B(n=>{n.check_id&&e.push(`${t}/checks/?id=${n.check_id}`)},[e.push,t])},co=(e,t)=>{let n=Pn({width:0,height:0});jn(()=>{let r=e.current,i=new ResizeObserver(e=>{for(let r of e){let e=r.contentRect.width,i=r.contentRect.height;(Math.abs(i-n.current.height)>10||Math.abs(e-n.current.width)>10)&&n.current.height>0&&i>0&&n.current.width>0&&e>0&&t(),n.current={width:e,height:i}}});return r&&i.observe(r),()=>{r&&i.unobserve(r)}},[t,e])},lo=()=>B((e,t,n,r,i)=>{let a=e.filter(de),o=Object.groupBy(a,e=>e.data.changeStatus??`unchanged`),s=Object.fromEntries(Object.entries(o).map(([e,t])=>[`nodes_${e}`,t?.length??0])),c={node_count:a.length,view_mode:t,impact_radius_enabled:n,right_sidebar_open:i,...s};r&&(c.cll_column_active=!0),fn(c)},[]),uo={row_count:en.ROW_COUNT,row_count_diff:en.ROW_COUNT_DIFF,value_diff:en.VALUE_DIFF},fo=e=>{let t=uo[e.action];t&&sn({action:t,source:nn.LINEAGE_VIEW_TOP_BAR,node_count:e.node_count})},po=(e,t)=>Ke(e,{...t,onTrackAction:fo,trackingSource:nn.LINEAGE_VIEW_TOP_BAR});function mo(){return Mt({onConfirm:()=>cn({action:en.VALUE_DIFF,event:tn.EXECUTE}),onCancel:()=>cn({action:en.VALUE_DIFF,event:tn.CANCEL})})}function ho({notification:e,type:t}){let n=D.lineageNotificationDismissed,[r,i]=H(()=>sessionStorage.getItem(n)!==`true`);if(e===null||!r)return null;let a={info:`iochmara.light`,success:`success.light`,warning:`warning.light`,error:`error.light`}[t];return G(K,{sx:{width:`100%`,display:`flex`,flexDirection:`row`,p:`5px 10px`,gap:`5px`,alignItems:`flex-start`,borderRadius:1,boxShadow:4,border:`1px solid`,borderColor:`neutral.light`,bgcolor:a},children:[e,W(K,{sx:{flex:1}}),W(X,{size:`small`,onClick:()=>{sessionStorage.setItem(n,`true`),i(!1)},children:W(qn,{})})]})}function go(e,t,n,r){let{parent_map:i,child_map:a,columns:o}=e.current,s=new Map,c=new Set;function l(e,t){if(c.has(e))return;c.add(e);let n=o[e];if(n){let t=e.slice(0,-(n.name.length+1)),i=s.get(t)??[];i.push({column:n.name,isImpacted:r.has(e),transformationType:n.transformation_type,changeStatus:n.change_status}),s.set(t,i)}let i=t[e]??[];for(let e of i)l(e,t)}let u=`${t}_${n}`,d=o[u];if(d){let e=u.slice(0,-(d.name.length+1));s.set(e,[{column:d.name,isImpacted:r.has(u),transformationType:d.transformation_type,changeStatus:d.change_status}])}c.add(u);for(let e of i[u]??[])l(e,i);for(let e of a[u]??[])l(e,a);return s}function _o(e){let{columns:t,parent_map:n}=e.current,r=new Map;function i(e){let a=r.get(e);if(a===`pending`)return!1;if(a!==void 0)return a;if(r.set(e,`pending`),t[e]?.change_status)return r.set(e,!0),!0;let o=n[e]??[];for(let t of o)if(i(t))return r.set(e,!0),!0;return r.set(e,!1),!1}let a=new Set;for(let e of Object.keys(t))i(e)&&a.add(e);return a}function vo(e,t,n,r){if(n)return!0;if(!t)return!1;if(t.current.nodes[e]?.impacted)return!0;let i=r,a=`${e}_`;for(let e of i)if(e.startsWith(a))return!0;return!1}const yo=e=>{let{runAction:t}=me(),{setSqlQuery:n,setPrimaryKeys:r}=R(),i=mi(),{primaryKey:a}=_t(e),{basePath:o}=pe();return{runAction:(e,n,r)=>{t(e,n,r)},onNavigate:e=>{i.push(`${o}${e}`)},onTrack:(e,t)=>{e===`explore_action`?sn({action:t.action,source:$a.LINEAGE_VIEW_CONTEXT_MENU,node_count:t.node_count}):e===`lineage_selection`&&dn({action:t.action})},supportsHistogramDiff:pt,findByRunType:e=>{let t=z(e);return t?{title:t.title,icon:t.icon}:void 0},setSqlQuery:n,setPrimaryKeys:r,getPrimaryKey:()=>a,DisabledItemWrapper:Zs}},bo=({isOpen:e,onClose:t,x:n,y:r,node:i})=>{let{selectParentNodes:a,selectChildNodes:o,getNodeColumnSet:s,selectMode:c,cll:l,showColumnLevelLineage:u,setChangeAnalysisMode:d}=fe(),{featureToggles:f}=Se(),{isActionAvailable:p,lineageGraph:m}=M(),{data:h}=be(),g=!m?.catalogMetadata.current;return W(io,{x:n,y:r,node:i,isOpen:e,onClose:t,deps:yo(i?.type===`lineageGraphNode`?i.data?.name:i?.type===`lineageGraphColumnNode`?i.data?.node?.name:void 0),viewOptions:{selectMode:c,cll:l,showColumnLevelLineage:u,setChangeAnalysisMode:d,selectParentNodes:a,selectChildNodes:o,getNodeColumnSet:s},featureToggles:{disableDatabaseQuery:f.disableDatabaseQuery,disableViewActionDropdown:f.disableViewActionDropdown,mode:f.mode??void 0},serverFlags:{single_env_onboarding:h?.single_env_onboarding},noCatalogCurrent:g,isActionAvailable:p})},xo=ao;function So(e,t){let n=[],r=[],{selectedNodes:i,cll:a,existingPositions:o,newCllExperience:s,columnAncestry:c}=t??{},l={};function u(e){return e===`base`?0:e===`current`?2:1}function d(e,t){let n=u(e.data?.from),r=u(t.data?.from);return n<r?-1:n>r?1:0}let f=i===void 0?void 0:new Set(i),p=Object.values(e.nodes).sort(d);for(let e of p){if(f&&!f.has(e.id))continue;let t=new Set,i=0;if(a&&!s){let o=a.current?.parent_map[e.id]??new Set;for(let t of o){let n=t,i=e.id;r.push({id:`m2c_${n}_${i}`,source:n,target:i,style:{zIndex:9999}})}for(let o of Object.keys(e.data.data.current?.columns??{})){let s=`${e.id}_${o}`,c=a.current,l=c?.columns[s],u=c?.parent_map[s]??new Set;if(l!=null){n.push({id:s,position:{x:10,y:70+i*24},parentId:e.id,extent:`parent`,draggable:!1,className:`no-track-pii-safe`,data:{node:e.data,column:l.name,type:l.type,transformationType:l.transformation_type,changeStatus:l.change_status},style:{zIndex:9999},type:`lineageGraphColumnNode`,targetPosition:Mr.Left,sourcePosition:Mr.Right});for(let e of u){let t=e,n=s;r.push({id:`${t}_${n}`,source:t,target:n,style:{zIndex:9999}})}i++,t.add(l.name)}}}l[e.id]=t;let c=60;i>0&&(c+=20+i*24);let u=o?.get(e.id);n.unshift({id:e.id,position:u??{x:0,y:0},width:300,height:c,className:`no-track-pii-safe`,data:{...e.data},type:`lineageGraphNode`,targetPosition:Mr.Left,sourcePosition:Mr.Right,style:{width:300,height:c}})}let m=Object.values(e.edges).sort(d);for(let e of m)f&&(!f.has(e.source)||!f.has(e.target))||r.push({id:e.id,type:`lineageGraphEdge`,source:e.source,target:e.target,data:{...e.data}});return s&&c&&a&&Co(n,r,c,a,f),n.some(e=>e.type===`lineageGraphNode`&&!o?.has(e.id))&&wo(n,r),[n,r,l]}function Co(e,t,n,r,i){let a=new Set,o=new Map;for(let[t,s]of n)if(!(i&&!i.has(t))){for(let n=0;n<s.length;n++){let i=s[n],c=`${t}_${i.column}`;a.add(c),o.set(c,{modelId:t,isImpacted:i.isImpacted});let l=r.current.columns[c];e.push({id:c,position:{x:10,y:64+n*24},parentId:t,draggable:!1,className:`no-track-pii-safe`,data:{node:{id:t},column:i.column,type:l?.type,transformationType:i.transformationType,changeStatus:i.changeStatus,isHighlighted:!0,isFocused:!1,isImpacted:i.isImpacted},style:{zIndex:9999},type:`lineageGraphColumnNode`,targetPosition:Mr.Left,sourcePosition:Mr.Right})}if(s.length>0){let n=e.find(e=>e.id===t&&e.type===`lineageGraphNode`);n&&(n.height=80+s.length*24)}}for(let e of a){let n=r.current.parent_map[e]??[];for(let r of n)if(a.has(r)){let n=o.get(r)?.isImpacted??!1;t.push({id:`ancestry_${r}_${e}`,source:r,target:e,style:{zIndex:9999,strokeWidth:2,stroke:n?`#fbbf24`:`#9ca3af`}})}}}const wo=(e,t,n=`LR`)=>{le(Fi,e,t,n)};function To(){return G(K,{sx:{display:`flex`,gap:2,px:1,py:.5,fontSize:`0.75rem`,color:`text.secondary`},children:[G(`span`,{children:[W(`span`,{className:`schema-change-badge schema-change-badge-added`,children:`+`}),` `,`added`]}),G(`span`,{children:[W(`span`,{className:`schema-change-badge schema-change-badge-removed`,children:`-`}),` `,`removed`]}),G(`span`,{children:[W(`span`,{className:`schema-change-badge schema-change-badge-changed`,children:`~`}),` `,`changed`]})]})}function Eo({current:e,showMenu:t=!0},n){let r=ge(),[i,a]=H(null),[o,s]=H(new Map),{columns:c,rows:l}=V(()=>Dt({type:`schema_single`,columns:e?.columns},{node:e,cllRunningMap:o,showMenu:t}),[e,o,t]),{lineageGraph:u,isActionAvailable:d}=M(),f=d(`change_analysis`),p=!u?.catalogMetadata.current,m;p&&(m="catalog.json not found. Run `recce debug` to troubleshoot.");let h=e&&e.columns===void 0,g;h&&(g=`Node schema not found in catalog.json. Please regenerate your catalog.json to update.`);let _=async t=>{if(!f)return;rn({action:`view`,source:`schema_column`}),s(e=>new Map(e).set(t,!0));let n=e?.id;n&&await r?.showColumnLevelLineage({node_id:n,column:t}),s(e=>new Map(e).set(t,!1))},v=B(t=>`${e?.id}-${t.data.name}`,[e?.id]),y=r?.viewOptions.column_level_lineage,b=y?`${y.node_id}-${y.column}`:null;jn(()=>{if(i&&(i.deselectAll(),b)){let e=i.getRowNode(b);e&&e.setSelected(!0)}},[i,b]);let x=B(e=>{a(e.api)},[]);return G(K,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[m?W(Kr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:m}):g?W(Kr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:g}):W(U,{}),l.length>0&&W(it,{style:{blockSize:`auto`,maxHeight:`100%`,overflow:`auto`,fontSize:`10pt`,borderWidth:1},columns:c,rows:l,renderers:{noRowsFallback:W(It,{})},ref:n,getRowId:v,getRowClass:e=>r!==void 0&&f?`row-normal row-selectable`:`row-normal`,onCellClicked:async e=>{if((e.event?.target)?.closest(`.row-context-menu`))return;let t=e.data;t&&await _(t.name)},onGridReady:x,rowSelection:{mode:`singleRow`,checkboxes:!1},containerClassName:`no-track-pii-safe`,rowClassName:`no-track-pii-safe`})]})}function Do({base:e,current:t,showMenu:n=!0,columnChanges:r,onViewCode:i},a){let o=ge(),{data:s}=be(),c=s?.new_cll_experience??!1,[l,u]=H(null),[d,f]=H(new Map),p=V(()=>{if(!c)return;let e=o?.impactedColumnIds;return e?.size?e:void 0},[c,o?.impactedColumnIds]),{columns:m,rows:h}=V(()=>{let a=t?.resource_type??e?.resource_type,o=a&&[`model`,`seed`,`snapshot`,`source`].includes(a)?t??e:void 0,s=t?.id??e?.id;return Dt({type:`schema_diff`,base:e?.columns,current:t?.columns},{node:o,cllRunningMap:d,showMenu:n,columnChanges:r,onViewCode:i,impactedColumns:p,nodeId:s})},[e,t,d,n,r,i,p]),{lineageGraph:g,isActionAvailable:_}=M(),v=_(`change_analysis`),y=!g?.catalogMetadata.base,b=!g?.catalogMetadata.current,x;y&&b?x="catalog.json not found on both environments. Run `recce debug` to troubleshoot.":y?x="catalog.json not found on base environment. Run `recce debug` to troubleshoot.":b&&(x="catalog.json not found on current environment. Run `recce debug` to troubleshoot.");let S=e&&e.columns===void 0,C=t&&t.columns===void 0,w;S&&C?w=`Node schema not found in catalog.json on both environments. Please regenerate your catalog.json to update.`:C?w=`Node schema not found in catalog.json on current environment. Please regenerate your catalog.json to update.`:S&&(w=`Node schema not found in catalog.json on base environment. Please regenerate your catalog.json to update.`);let ee=async n=>{if(!v)return;rn({action:`view`,source:`schema_column`}),f(e=>new Map(e).set(n,!0));let r=t?.id??e?.id;r&&await o?.showColumnLevelLineage({node_id:r,column:n}),f(e=>new Map(e).set(n,!1))},T=B(n=>`${t?.id??e?.id}-${n.data.name}`,[t?.id,e?.id]),E=o?.viewOptions.column_level_lineage,D=E?`${E.node_id}-${E.column}`:null;jn(()=>{if(l&&(l.deselectAll(),D)){let e=l.getRowNode(D);e&&e.setSelected(!0)}},[l,D]);let O=B(e=>{u(e.api)},[]);return G(K,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[x?W(Kr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:x}):w?W(Kr,{severity:`warning`,sx:{fontSize:`12px`,p:1},children:w}):W(U,{}),W(To,{}),h.length>0&&W(it,{style:{blockSize:`auto`,maxHeight:`100%`,overflow:`auto`,fontSize:`0.8rem`,borderWidth:1},columns:m,rows:h,rowHeight:35,renderers:{noRowsFallback:W(It,{})},className:`rdg-light no-track-pii-safe`,ref:a,getRowId:T,getRowClass:e=>{let t=e.data;if(!t)return`row-normal`;let n;if(t.baseIndex===void 0)n=`row-added`;else if(t.currentIndex===void 0)return`row-removed`;else n=t.baseType!==t.currentType||t.reordered===!0||t.definitionChanged===!0?`row-changed`:t.isImpacted?`row-impacted`:`row-normal`;return o!==void 0&&v&&(n+=` row-selectable`),n},onCellClicked:async e=>{if((e.event?.target)?.closest(`.row-context-menu`))return;let t=e.data;t&&(t.baseIndex!==void 0&&t.currentIndex===void 0||await ee(t.name))},onGridReady:O,rowSelection:{mode:`singleRow`,checkboxes:!1},containerClassName:`no-track-pii-safe`,rowClassName:`no-track-pii-safe`})]})}const Oo=On(Do),ko=On(Eo),Ao=({node:e,isSingleEnv:t,CodeEditor:n,DiffEditor:r,isDark:i=!1})=>{let[a,o]=H(!1),[s,c]=H(!1);if(e.data.resourceType!==`model`&&e.data.resourceType!==`snapshot`)return`Not available`;let l=e.data.data.base?.raw_code,u=e.data.data.current?.raw_code,d=e.data.data.base?.name??e.data.data.current?.name??``;return G(K,{className:`no-track-pii-safe`,sx:{position:`relative`,height:`100%`},onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},children:[t?W(n,{language:`sql`,value:l??``,readOnly:!0,lineNumbers:!0,wordWrap:!1,theme:i?`dark`:`light`}):W(r,{original:l??``,modified:u??``,language:`sql`,readOnly:!0,lineNumbers:!0,sideBySide:!1,theme:i?`dark`:`light`,height:`100%`}),W(X,{onClick:()=>o(!0),size:`medium`,"aria-label":`Expand`,sx:{position:`absolute`,top:`5px`,right:`20px`,opacity:s?.5:.1,transition:`opacity 0.3s ease-in-out`},children:W($n,{})}),G(Fn,{open:a,onClose:()=>o(!1),maxWidth:`sm`,fullWidth:!0,slotProps:{paper:{sx:{height:`75%`,overflowY:`auto`}}},children:[G(Rn,{sx:{display:`flex`,alignItems:`center`},children:[t?G(U,{children:[W(`code`,{children:d}),`\xA0Model Code`]}):G(U,{children:[W(`code`,{children:d}),`\xA0Model Code Diff`]}),W(K,{sx:{flex:1}}),W(X,{size:`small`,onClick:()=>o(!1),children:W(qn,{})})]}),W(Ln,{children:t?W(n,{language:`sql`,value:l??``,fontSize:16,readOnly:!0,lineNumbers:!0,wordWrap:!1,theme:i?`dark`:`light`}):W(r,{original:l??``,modified:u??``,language:`sql`,theme:i?`dark`:`light`,className:`text-base`})})]})]})},jo=({node:e})=>{let{data:t,isLoading:n}=be(),r=Rt();return n?W(U,{}):W(Ao,{node:e,isSingleEnv:t?.single_env_onboarding??!1,CodeEditor:Pe,DiffEditor:tt,isDark:r})};function Mo({rowCount:e}){let t=e.base,n=e.curr,r=e.base===null?`N/A`:`${e.base} rows`,i=e.curr===null?`N/A`:`${e.curr} rows`;return t===null&&n===null?W(U,{children:` Failed to load`}):t===null||n===null?G(J,{direction:`row`,alignItems:`center`,spacing:.5,children:[W(Y,{variant:`body2`,component:`span`,children:r}),W(xi,{}),W(Y,{variant:`body2`,component:`span`,children:i})]}):t===n?G(J,{direction:`row`,alignItems:`center`,spacing:.5,children:[W(Y,{variant:`body2`,component:`span`,children:i}),W(K,{component:`span`,sx:{color:`grey.500`,display:`flex`},children:W(ki,{})}),W(Y,{variant:`body2`,component:`span`,sx:{color:`grey.500`},children:`No Change`})]}):t<n?G(J,{direction:`row`,alignItems:`center`,spacing:.5,children:[W(Y,{variant:`body2`,component:`span`,children:i}),W(K,{component:`span`,sx:{color:`success.main`,display:`flex`},children:W(Di,{})}),W(Y,{variant:`body2`,component:`span`,sx:{color:`success.main`},children:Wt(t,n)})]}):G(J,{direction:`row`,alignItems:`center`,spacing:.5,children:[W(Y,{variant:`body2`,component:`span`,children:i}),W(K,{component:`span`,sx:{color:`error.main`,display:`flex`},children:W(Ei,{})}),W(Y,{variant:`body2`,component:`span`,sx:{color:`error.main`},children:Wt(t,n)})]})}function No({rowCount:e,node:t,onRefresh:n,isFetching:r}){let i=Rt(),{featureToggles:a}=Se(),{runsAggregated:o}=M(),s=o?.[t.id]?.row_count_diff.result,c=z(`row_count_diff`).icon,l=e??s,u=l;return W(Z,{title:l?`${l.base??`N/A`} -> ${l.curr??`N/A`} rows`:``,children:W(Zs,{display:a.mode===`metadata only`,children:G(K,{component:`span`,sx:{...ut(i),gap:.5},children:[W(c,{}),u!=null||r?r?W(Ii,{width:30,height:16}):u==null?W(Y,{variant:`caption`,children:`row count`}):W(Mo,{rowCount:u}):W(Y,{variant:`caption`,children:`row count`}),n&&W(X,{"aria-label":`Query Row Count`,size:`small`,onClick:n,disabled:a.disableDatabaseQuery,sx:{p:0,ml:.5},children:W(yr,{size:12})})]})})})}function Po({rowCount:e,node:t,onRefresh:n,isFetching:r}){let i=Rt(),{runsAggregated:a}=M(),o=a?.[t.id]?.row_count.result,s=z(`row_count`).icon,c,l=e??o;return l&&(c=`${l.curr??`N/A`} rows`),G(K,{component:`span`,sx:ut(i),children:[W(K,{component:`span`,sx:nt,children:W(s,{})}),l||r?r?W(Ii,{width:30,height:16}):W(Y,{variant:`caption`,children:c}):W(Y,{variant:`caption`,children:`row count`}),n&&W(X,{"aria-label":`Query Row Count`,size:`small`,onClick:n,disabled:t.data.from===`base`,sx:{p:0,ml:.5},children:W(yr,{size:12})})]})}function Fo({children:e,value:t,index:n}){return t===n?W(U,{children:e}):null}const Io=()=>W(`span`,{}),Lo=({children:e})=>W(U,{children:e}),Ro=()=>!0;function zo(e,t,n){return e?bn.add_or_remove:n(t)?``:`This action is not supported yet.`}function Bo({node:e,actionCallbacks:t,runTypeIcons:n,isActionAvailable:r}){let i=e.data.changeStatus===`added`||e.data.changeStatus===`removed`,a=n?.query??Io,o=n?.row_count??Io,s=n?.profile??Io;return G(J,{direction:`row`,alignItems:`center`,flexWrap:`wrap`,gap:1,children:[W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(a,{fontSize:`small`}),onClick:t?.onQueryClick,sx:{textTransform:`none`},children:`Query`}),W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(o,{fontSize:`small`}),onClick:t?.onRowCountClick,sx:{textTransform:`none`},children:`Row Count`}),W(Z,{title:zo(i,`profile`,r),placement:`top`,children:W(`span`,{children:W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(s,{fontSize:`small`}),onClick:t?.onProfileClick,disabled:i,sx:{textTransform:`none`},children:`Profile`})})})]})}function Vo({actionCallbacks:e,runTypeIcons:t,featureToggles:n,ConnectionPopoverWrapper:r}){let i=n?.mode===`metadata only`,a=t?.schema_diff??Io,o=t?.sandbox??Io;return G(J,{direction:`row`,alignItems:`center`,sx:{mr:1},flexWrap:`wrap`,gap:1,children:[W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(a,{fontSize:`small`}),onClick:e?.onAddSchemaDiffClick,sx:{textTransform:`none`},children:`Add schema diff to checklist`}),W(r,{display:i,children:W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(o,{fontSize:`small`}),onClick:e?.onSandboxClick,disabled:n?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Sandbox`})})]})}function Ho({node:e,actionCallbacks:t,runTypeIcons:n,featureToggles:r,isActionAvailable:i,ConnectionPopoverWrapper:a}){let o=r?.mode===`metadata only`,s=e.data.changeStatus===`added`||e.data.changeStatus===`removed`,c=n?.query_diff??Io,l=n?.row_count_diff??Io,u=n?.profile_diff??Io,d=n?.value_diff??Io,f=n?.top_k_diff??Io,p=n?.histogram_diff??Io,m=(e,t)=>o?W(a,{display:!0,children:e}):W(Z,{title:zo(s,t,i),placement:`top`,children:W(`span`,{children:e})});return G(J,{direction:`row`,alignItems:`center`,flexWrap:`wrap`,gap:2,children:[W(Y,{variant:`caption`,fontWeight:`bold`,children:`Diff`}),G(J,{direction:`row`,alignItems:`center`,flexWrap:`wrap`,gap:1,width:`93%`,children:[W(a,{display:o,children:W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(l,{fontSize:`small`}),onClick:t?.onRowCountDiffClick,disabled:r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Row Count`})}),m(W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(u,{fontSize:`small`}),onClick:t?.onProfileDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Profile`}),`profile_diff`),m(W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(d,{fontSize:`small`}),onClick:t?.onValueDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Value`}),`value_diff`),m(W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(f,{fontSize:`small`}),onClick:t?.onTopKDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Top-K`}),`top_k_diff`),m(W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(p,{fontSize:`small`}),onClick:t?.onHistogramDiffClick,disabled:s||r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Histogram`}),`histogram_diff`),W(a,{display:o,children:W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(c,{fontSize:`small`}),onClick:t?.onQueryDiffClick,disabled:r?.disableDatabaseQuery,sx:{textTransform:`none`},children:`Query`})})]})]})}function Uo({node:e,onCloseNode:t,isSingleEnv:n,featureToggles:r,SchemaView:i,SingleEnvSchemaView:a,NodeSqlView:o,RowCountDiffTag:s,RowCountTag:c,ResourceTypeTag:l,NotificationComponent:u,ConnectionPopoverWrapper:d=Lo,SandboxDialog:f,runTypeIcons:p,actionCallbacks:m,isActionAvailable:h=Ro}){let g=e.data.resourceType===`model`||e.data.resourceType===`seed`||e.data.resourceType===`source`||e.data.resourceType===`snapshot`,[_,v]=H(!1),[y,b]=H(!0),[x,S]=H(0),{base:C,current:w}=e.data.data,ee=!n&&Gt(C?.columns,w?.columns)===!0,T=!n&&C?.raw_code!=null&&w?.raw_code!=null&&C.raw_code!==w.raw_code,E=e.data.resourceType===`model`||e.data.resourceType===`seed`||e.data.resourceType===`snapshot`,D={...m,onSandboxClick:()=>{m?.onSandboxClick?.(),v(!0)}};return G(K,{sx:{height:`100%`,display:`flex`,flexDirection:`column`},children:[G(J,{direction:`row`,alignItems:`center`,children:[W(K,{sx:{flex:`0 1 20%`,p:2},children:W(Y,{variant:`subtitle1`,fontWeight:600,className:`no-track-pii-safe`,children:e.data.name})}),W(K,{sx:{flexGrow:1}}),!n&&E&&W(Vo,{node:e,actionCallbacks:D,runTypeIcons:p,featureToggles:r,ConnectionPopoverWrapper:d}),W(K,{sx:{flex:`0 1 1%`},children:W(X,{size:`small`,onClick:t,children:W(qn,{})})})]}),W(K,{sx:{color:`text.secondary`,pl:2},children:G(J,{direction:`row`,spacing:1,children:[l&&W(l,{node:e}),E&&(n?c&&W(c,{node:e,onRefresh:m?.onRowCountClick}):s&&W(s,{node:e,onRefresh:m?.onRowCountDiffClick}))]})}),E&&W(K,{sx:{pl:2,py:1},children:n?W(Bo,{node:e,actionCallbacks:m,runTypeIcons:p,isActionAvailable:h}):W(Ho,{node:e,actionCallbacks:D,runTypeIcons:p,featureToggles:r,isActionAvailable:h,ConnectionPopoverWrapper:d})}),g&&G(K,{sx:{overflow:`auto`,display:`flex`,flexDirection:`column`,flex:1,minHeight:0},children:[n&&y&&u&&W(K,{sx:{p:1.5},children:W(u,{onClose:()=>b(!1),children:W(Y,{variant:`body2`,children:`Enable the Recce Checklist and start adding checks for better data validation and review.`})})}),G(oi,{value:x,onChange:(e,t)=>S(t),sx:{borderBottom:1,borderColor:`divider`},children:[W(ai,{label:G(K,{component:`span`,sx:{display:`flex`,alignItems:`center`,gap:.75},children:[`Columns`,ee&&W(K,{component:`span`,sx:{color:`amber.main`,fontSize:`0.5rem`,lineHeight:1},children:`●`})]})}),W(ai,{label:G(K,{component:`span`,sx:{display:`flex`,alignItems:`center`,gap:.75},children:[`Code`,T&&W(K,{component:`span`,sx:{color:`amber.main`,fontSize:`0.5rem`,lineHeight:1},children:`●`})]})})]}),G(K,{sx:{overflow:`auto`,height:`calc(100% - 48px)`},children:[W(Fo,{value:x,index:0,children:W(K,{sx:{overflowY:`auto`,height:`100%`},children:n?a&&W(a,{current:e.data.data.current}):i&&W(i,{base:e.data.data.base,current:e.data.data.current,columnChanges:e.data.change?.columns,onViewCode:()=>S(1)})})}),W(Fo,{value:x,index:1,children:W(K,{sx:{height:`100%`},children:o&&W(o,{node:e})})})]})]}),f&&W(f,{isOpen:_,onClose:()=>v(!1),current:e.data.data.current})]})}function Wo(e){return ni(ii(e),`yyyy-MM-dd'T'HH:mm:ss`)}function Go({current:e,primaryKeys:t,onPrimaryKeysChange:n,onRunResultOpen:r,runQuery:i,isPending:a,QueryForm:o}){return G(J,{direction:`row`,justifyContent:`flex-end`,alignItems:`center`,sx:{p:`4pt 8pt`,gap:`5px`,height:`54px`,borderBottom:`1px solid`,borderBottomColor:`divider`,flex:`0 0 54px`},children:[G(K,{children:[G(Y,{variant:`h6`,component:`h2`,sx:{display:`flex`,alignItems:`center`,gap:`5px`},children:[W(K,{component:Li,sx:{fontSize:`1.2em`}}),`Sandbox`]}),G(Y,{sx:{fontSize:`0.75rem`,color:`grey.500`},children:[`Compare the run results based on the modified SQL code of model`,` `,W(`b`,{children:e?.name})]})]}),W(K,{sx:{flexGrow:1}}),W(o,{defaultPrimaryKeys:t,onPrimaryKeysChange:n}),W(Z,{title:`Run diff to see the changes`,children:W(q,{size:`small`,sx:{mt:`16px`,fontSize:`14px`},onClick:()=>{r(),i()},color:`iochmara`,variant:`contained`,disabled:a,children:a?`Running...`:`Run Diff`})})]})}function Ko({currentModelID:e,height:t=`32px`,flex:n=`0 0 auto`,isDark:r=!1}){let{lineageGraph:i,envInfo:a}=M(),o=`0 16px`,s=ri(Wo(a?.dbt?.current?.generated_at??``),{addSuffix:!0}),c=`N/A`;if(i?.nodes[e]){let t=i.nodes[e];t.data.data.current?.schema&&(c=t.data.data.current.schema)}return G(J,{direction:`row`,sx:{gap:0,height:t,flex:n,fontSize:`14px`,alignItems:`center`,m:0,bgcolor:Hn(r?F.neutral[700]:F.neutral[100],.5)},children:[W(J,{sx:{width:`50%`},children:G(Y,{sx:{fontWeight:`bold`,margin:o},children:[`ORIGINAL (Schema: `,c,`, Last Updated: `,s,`)`]})}),W(J,{sx:{width:`50%`},children:W(Y,{sx:{fontWeight:`bold`,margin:o},children:`SANDBOX EDITOR`})})]})}function qo({current:e,onChange:t,isDark:n,DiffEditor:r}){return W(r,{original:e?.raw_code??``,modified:e?.raw_code??``,language:`sql`,readOnly:!1,lineNumbers:!0,sideBySide:!0,theme:n?`dark`:`light`,height:`100%`,onModifiedChange:t})}function Jo({isOpen:e,onClose:t,current:n,DiffEditor:r,QueryForm:i,RunResultPane:a,isDark:o=!1,primaryKeys:s=[],onPrimaryKeysChange:c,isPending:l=!1,onRunQuery:u,onRunResultOpen:d,onModifiedCodeChange:f,onShowFeedback:p,tracking:m,logoUrl:h=`/logo/recce-logo-white.png`,brandName:g=`RECCE`}){let[_,v]=H(!1),y=e=>{f?.(e)},b=()=>{v(!0),d?.()},x=()=>{u?.()},S=()=>{t(),v(!1),m?.onPreviewChange?.({action:`close`,node:n?.name})},C=e=>{c?.(e)};return G(Fn,{open:e,onClose:S,maxWidth:!1,fullWidth:!0,slotProps:{paper:{sx:{width:`100%`,height:`100%`,maxWidth:`100%`,maxHeight:`100%`,m:0}}},children:[G(K,{sx:{height:`40px`,bgcolor:`cyan.600`,px:0,py:2,display:`flex`,alignItems:`center`},children:[G(J,{direction:`row`,alignItems:`center`,sx:{height:`100%`,gap:`10px`},children:[W(K,{component:`img`,sx:{width:`20px`,height:`20px`,ml:`18px`},src:h,alt:`logo`}),W(Y,{variant:`h6`,component:`h1`,sx:{fontFamily:`"Montserrat", sans-serif`,fontSize:`1.125rem`,color:`common.white`},children:g}),W(wr,{label:`Experiment`,size:`small`,variant:`outlined`,sx:{fontSize:`0.875rem`,color:`common.white`,borderColor:`rgba(255,255,255,0.5)`}})]}),W(X,{"aria-label":`close`,onClick:S,sx:{position:`absolute`,right:8,top:4,color:`common.white`},children:W(qn,{})})]}),W(Ln,{sx:{p:0},children:G(kt,{sizes:_?[50,50]:[100,0],minSize:0,gutterSize:5,className:_?void 0:`split-gutter-hidden`,style:{flex:`1`,contain:`size`,height:`100%`},children:[G(J,{sx:{height:`100%`,m:0,p:0},children:[W(Go,{current:n,primaryKeys:s,onPrimaryKeysChange:C,onRunResultOpen:b,runQuery:x,isPending:l,QueryForm:i}),W(Ko,{height:`32px`,flex:`0 0 auto`,currentModelID:n?.id??``,isDark:o}),W(qo,{current:n,onChange:y,isDark:o,DiffEditor:r})]}),_?W(a,{onClose:()=>v(!1),disableAddToChecklist:!0}):W(K,{})]})}),W(K,{sx:{position:`fixed`,bottom:16,right:16,opacity:.5},children:W(Z,{title:`Give us feedback`,children:W(X,{"aria-label":`feedback`,size:`medium`,onClick:()=>{p?.()},children:W(Xr,{})})})})]})}function Yo({isOpen:e,onClose:t,current:n}){let[r,i]=H(n?.raw_code??``),[o,s]=H(e),{showRunId:c,clearRunResult:l}=me(),{primaryKeys:u,setPrimaryKeys:d}=R(),{data:f,isLoading:m}=be(),{apiClient:h}=Fe(),_=Rt();e!==o&&(s(e),e&&i(n?.raw_code??``));let{mutate:v,isPending:y}=Cn({mutationFn:async()=>{let e=r,{run_id:t}=await a({current_model:n?.name??``,primary_keys:u,sql_template:e},{nowait:!0},h);return c(t),await g(t,void 0,h)},onSuccess(e){e.error?hn({action:`run`,node:n?.name,status:`failure`}):(hn({action:`run`,node:n?.name,status:`success`}),setTimeout(()=>{b()},1e3),!m&&f?.single_env_onboarding&&setTimeout(()=>{S()},2e3))}}),{feedbackToast:b,closeToast:x}=at({feedbackId:p.previewChangeFeedbackID,description:`Enjoy preview change?`,onFeedbackSubmit:e=>{switch(e){case`like`:gn({feedback:`like`,node:n?.name});break;case`dislike`:gn({feedback:`dislike`,node:n?.name});break;case`link`:gn({feedback:`form`,node:n?.name});break;default:console.log(`Not support feedback type`)}},externalLink:`https://docs.google.com/forms/d/e/1FAIpQLSd7Lei7Ijwo7MinWaI0K6rzZi_21gV1BKetmiNEX254kDziDA/viewform?usp=header`,externalLinkText:`Give us feedback`}),{guideToast:S,closeGuideToast:C}=Ct({guideId:p.prepareEnvGuideID,description:`Want to compare data changes with production data?`,externalLink:`https://docs.reccehq.com/get-started/#prepare-dbt-artifacts`,externalLinkText:`Learn how.`,onExternalLinkClick:()=>{vn({action:`external_link`,from:`preview_changes`,node:n?.name})}});return W(Jo,{isOpen:e,onClose:()=>{t(),l(),x(),C()},current:n,DiffEditor:tt,QueryForm:za,RunResultPane:He,isDark:_,primaryKeys:u??[],onPrimaryKeysChange:d,isPending:y,onRunQuery:v,onModifiedCodeChange:i,onShowFeedback:()=>b(!0),tracking:{onPreviewChange:hn}})}const Xo=({node:e})=>{let t=e.data.data.current?.config?.materialized??e.data.data.base?.config?.materialized;return W(St,{resourceType:e.data.resourceType,materialized:t})};function Zo({onClose:e}){return W(Be,{onClose:e,align:`flex-start`,children:G(Y,{variant:`body2`,children:[`Enable the Recce Checklist and start adding checks for better data validation and review.`,W(`br`,{}),W(dt,{})]})})}function Qo({node:e,onCloseNode:t}){let n=mi(),{runAction:r}=me(),{isActionAvailable:i,envInfo:a}=M(),{singleEnv:o,featureToggles:s}=Se(),{setSqlQuery:c,setPrimaryKeys:l}=R(),{primaryKey:u}=_t(e.data.name),{apiClient:d}=Fe(),{basePath:f}=pe(),p=V(()=>({query:z(`query`).icon,row_count:z(`row_count`).icon,row_count_diff:z(`row_count_diff`).icon,profile:z(`profile`).icon,profile_diff:z(`profile_diff`).icon,query_diff:z(`query_diff`).icon,value_diff:z(`value_diff`).icon,top_k_diff:z(`top_k_diff`).icon,histogram_diff:z(`histogram_diff`).icon,schema_diff:z(`schema_diff`).icon,sandbox:z(`sandbox`).icon}),[]),m=Kt(Object.keys(e.data.data.base?.columns??{}),Object.keys(e.data.data.current?.columns??{})),h=V(()=>m.length?`select \n ${m.join(`
6
+ `)}\nfrom {{ ref("${e.data.name}") }}`:`select * from {{ ref("${e.data.name}") }}`,[m,e.data.name]),g=V(()=>({onQueryClick:()=>{a?.adapterType===`dbt`?c(h):a?.adapterType===`sqlmesh`&&c(`select * from ${e.data.name}`),n.push(`${f}/query`)},onRowCountClick:()=>{sn({action:en.ROW_COUNT,source:nn.SCHEMA_ROW_COUNT_BUTTON,node_count:1}),r(`row_count`,{node_names:[e.data.name]},{showForm:!1,showLast:!1})},onRowCountDiffClick:()=>{sn({action:en.ROW_COUNT_DIFF,source:nn.SCHEMA_ROW_COUNT_BUTTON,node_count:1}),r(`row_count_diff`,{node_names:[e.data.name]},{showForm:!1,showLast:!1})},onProfileClick:()=>{sn({action:en.PROFILE,source:nn.NODE_SIDEBAR_SINGLE_ENV,node_count:1}),r(`profile`,{model:e.data.name},{showForm:!0,showLast:!1})},onProfileDiffClick:()=>{sn({action:en.PROFILE_DIFF,source:nn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`profile_diff`,{model:e.data.name},{showForm:!0,showLast:!1})},onQueryDiffClick:()=>{a?.adapterType===`dbt`?c(h):a?.adapterType===`sqlmesh`&&c(`select * from ${e.data.name}`),i(`query_diff_with_primary_key`)&&l(u===void 0?void 0:[u]),n.push(`${f}/query`)},onValueDiffClick:()=>{sn({action:en.VALUE_DIFF,source:nn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`value_diff`,{model:e.data.name},{showForm:!0,showLast:!1})},onTopKDiffClick:()=>{sn({action:en.TOP_K_DIFF,source:nn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`top_k_diff`,{model:e.data.name,column_name:``,k:50},{showForm:!0})},onHistogramDiffClick:()=>{sn({action:en.HISTOGRAM_DIFF,source:nn.NODE_SIDEBAR_MULTI_ENV,node_count:1}),r(`histogram_diff`,{model:e.data.name,column_name:``,column_type:``},{showForm:!0})},onAddSchemaDiffClick:async()=>{let t=await v({node_id:e.id},d);n.push(`${f}/checks/?id=${t.check_id}`)},onSandboxClick:()=>{i(`query_diff_with_primary_key`)&&l(u===void 0?void 0:[u]),hn({action:`explore`,node:e.data.name})}}),[e,h,a,c,r,i,l,u,d,n.push,f]);return W(Uo,{node:e,onCloseNode:t,isSingleEnv:o??!1,featureToggles:s,SchemaView:Oo,SingleEnvSchemaView:ko,NodeSqlView:jo,ResourceTypeTag:Xo,RowCountDiffTag:No,RowCountTag:Po,NotificationComponent:Zo,ConnectionPopoverWrapper:Zs,SandboxDialog:Yo,runTypeIcons:p,actionCallbacks:g,isActionAvailable:i})}function $o(e,t){let n={...e};for(let[e,r]of Object.entries(t.current.nodes)){if(!r.change_status)continue;let t=null;if(r.columns){let e={},n=!1;for(let t of Object.values(r.columns))t.change_status&&(e[t.name]=t.change_status,n=!0);n&&(t=e)}n[e]={change_status:r.change_status,change:r.change_category?{category:r.change_category,columns:t}:null}}return n}function es({featureToggles:e,settingsUrl:t}){return e.mode===`metadata only`?W(K,{sx:{display:`flex`,alignItems:`center`,width:`100%`,px:1,py:.25,bgcolor:`cyan.50`},children:G(J,{direction:`row`,alignItems:`center`,sx:{flex:1,fontSize:`0.875rem`,color:`cyan.600`},spacing:1,children:[W(K,{component:fr}),W(Y,{sx:{fontSize:`inherit`,color:`inherit`},children:`Query functions disabled without a data warehouse connection.`}),W(q,{sx:{bgcolor:`iochmara.400`},size:`small`,variant:`contained`,onClick:()=>{window.open(t,`_blank`)},children:`Connect to Data Warehouse`})]})}):null}function ts(e){let{featureToggles:t}=Se(),{data:n}=ce();return W(es,{featureToggles:e.featureToggles??t,settingsUrl:e.settingsUrl??Yt(n,$t)})}function ns({docsUrl:e=`https://docs.reccehq.com/get-started/#prepare-dbt-artifacts`,onStartClick:t}={}){return W(J,{sx:{flex:1,height:`100%`,minHeight:0,m:1,p:2,bgcolor:`iochmara.50`,borderRadius:2,boxShadow:2,justifyContent:`center`},children:G(J,{sx:{width:`80%`,overflowY:`auto`,gap:3,px:4,pb:4},alignSelf:`center`,children:[G(J,{alignItems:`center`,spacing:2,children:[W(K,{sx:{p:1,bgcolor:`background.paper`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:2},children:W(K,{component:Ai,sx:{fontSize:28,color:`iochmara.500`}})}),W(Y,{variant:`h5`,sx:{mt:2},children:`Wait, there's more!`}),G(Y,{sx:{textAlign:`center`},children:[`Recce is currently running in`,` `,W(Y,{component:`span`,sx:{fontWeight:`bold`},children:`limited functionality mode`}),` `,`so you can run queries but`,` `,W(Y,{component:`span`,sx:{fontWeight:`bold`},children:`can't diff the results yet!`})]})]}),G(J,{spacing:1,children:[W(Y,{children:`To unlock the full power of Recce, set up a base environment of dbt artifacts for comparison.`}),W(Y,{children:`Once configured, you'll be able to:`}),G(si,{sx:{listStyleType:`disc`,pl:2},children:[W(ci,{sx:{display:`list-item`,p:0},children:W(Y,{children:`Run statistical data diffs`})}),W(ci,{sx:{display:`list-item`,p:0},children:W(Y,{children:`Run query diffs`})}),W(ci,{sx:{display:`list-item`,p:0},children:W(Y,{children:`Save checks to your Recce Checklist`})}),W(ci,{sx:{display:`list-item`,p:0},children:W(Y,{children:`...and more!`})})]}),W(Y,{children:`Take the next step toward better data impact assessment.`})]}),W(J,{sx:{width:`100%`,mt:3},children:W(q,{color:`iochmara`,variant:`contained`,size:`large`,onClick:()=>{t?t():window.open(e,`_blank`)},children:`Start Now`})})]})})}function rs({docsUrl:e=`https://docs.reccehq.com/configure-diff/`}={}){return G(J,{direction:`row`,spacing:`10px`,alignItems:`flex-start`,children:[W(K,{component:Oi,sx:{color:`iochmara.main`,fontSize:20}}),G(J,{spacing:`5px`,children:[G(Y,{sx:{fontWeight:700},children:[`Single Environment Mode`,` `,W(Y,{component:`span`,sx:{color:`error.main`,fontWeight:600},children:`Limited Functionality`})]}),W(Y,{sx:{fontSize:`0.875rem`},children:`Single Environment Mode allows you to explore your dbt project but won't show data comparisons between environments.`}),W(Y,{sx:{fontSize:`0.875rem`},children:`To set up full environment comparison:`}),G(si,{sx:{pl:2},children:[W(ci,{sx:{p:0,display:`list-item`},children:W(Y,{sx:{fontSize:`0.875rem`},children:"Run `recce debug` for setup assistance"})}),W(ci,{sx:{p:0,display:`list-item`},children:G(Y,{sx:{fontSize:`0.875rem`},children:[`Visit`,` `,W(zn,{sx:{color:`primary.main`,fontWeight:500},target:`_blank`,href:e,children:`docs`}),` `,`for configuration details`]})})]})]})]})}function is(){return W(K,{sx:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W(Zn,{size:48})})}function as({error:e,onRetry:t}){return W(K,{sx:{height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(J,{alignItems:`center`,spacing:1,children:[W(K,{children:`Failed to load lineage data. This could be because the server has been terminated or there is a network error.`}),G(K,{children:[`[Reason: `,e,`]`]}),W(q,{color:`iochmara`,variant:`contained`,onClick:()=>{t&&t()},children:`Retry`})]})})}function os({viewOptions:e,onViewOptionsChanged:t}){return W(K,{sx:{height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:G(J,{alignItems:`center`,spacing:1,children:[W(U,{children:`No change detected`}),W(q,{color:`iochmara`,variant:`contained`,onClick:async()=>{await t({...e,view_mode:`all`})},children:`Show all nodes`})]})})}function ss(){let{isHistoryOpen:e,showHistory:t}=me();if(!e)return G(K,{children:[W(K,{sx:{fontSize:`8pt`},children:`History`}),W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(Qr,{}),onClick:()=>{ln({name:e?`hide`:`show`}),t()},children:`Show`})]})}const cs=e=>({fontSize:`8pt`,bgcolor:e?`grey.700`:`grey.100`,px:.5,borderRadius:1}),ls=()=>{let e=cs(Rt());return G(J,{alignItems:`flex-start`,spacing:0,children:[W(Y,{fontSize:`10pt`,color:`text.secondary`,pb:1,children:`Select nodes by dbt node selector syntax`}),G(Y,{fontSize:`8pt`,children:[W(K,{component:`code`,sx:e,children:`model_name`}),` `,`Select a node`]}),G(Y,{fontSize:`8pt`,children:[W(K,{component:`code`,sx:e,children:`model_name+`}),` `,`Select downstream nodes`]}),G(Y,{fontSize:`8pt`,children:[W(K,{component:`code`,sx:e,children:`+model_name`}),` `,`Select upstream nodes`]}),G(Y,{fontSize:`8pt`,children:[W(K,{component:`code`,sx:e,children:`model*`}),` `,`Select by wildcard`]})]})},us=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n})=>{let[r,i]=H(null),a=!!r,o=t.view_mode??`changed_models`,s=o===`changed_models`?`Changed Models`:`All`,c=e=>{i(e.currentTarget)},l=()=>{i(null)},u=e=>{n({...t,view_mode:e}),l()},d=Oe(`model`).icon;return G(U,{children:[W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,onClick:c,disabled:e,startIcon:d&&W(d,{}),endIcon:W(or,{}),sx:{minWidth:100,textTransform:`none`,fontSize:`0.75rem`},children:s}),G(qr,{anchorEl:r,open:a,onClose:l,children:[W(ei,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`mode`}),G(zi,{value:o,children:[W(Q,{onClick:()=>u(`changed_models`),children:W(Ur,{value:`changed_models`,control:W(Ri,{size:`small`,sx:{py:0}}),label:`Changed Models`,sx:{m:0}})}),W(Q,{onClick:()=>u(`all`),children:W(Ur,{value:`all`,control:W(Ri,{size:`small`,sx:{py:0}}),label:`All`,sx:{m:0}})})]})]})]})},ds=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n,lineageGraph:r})=>{let[i,a]=H(null),o=!!i,s=new Set,c=Object.values(r?.nodes??{});for(let e of c)e.data.packageName&&s.add(e.data.packageName);let l=r?.manifestMetadata.current?.project_name,u=t.packages?new Set(t.packages):l?new Set([l]):s,d=u.size===s.size,f=u.size===0,p=u.size===1?Array.from(u)[0]:d?`All Packages`:f?`No Package`:`${u.size} Packages`,m=e=>{a(e.currentTarget)},h=()=>{a(null)},g=()=>{n(d?{...t,packages:[]}:{...t,packages:Array.from(s)})},_=e=>{let r=new Set(u);r.has(e)?r.delete(e):r.add(e),n({...t,packages:Array.from(r)})};return G(U,{children:[W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,onClick:m,disabled:e,startIcon:W(wi,{}),endIcon:W(or,{}),sx:{minWidth:100,textTransform:`none`,fontSize:`0.75rem`},children:p}),G(qr,{anchorEl:i,open:o,onClose:h,children:[W(ei,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`Select Packages`}),G(Q,{onClick:g,children:[W(Hr,{checked:d,indeterminate:!d&&!f,size:`small`,sx:{py:0}}),W(bi,{children:`Select All`})]}),W(Xn,{}),Array.from(s).map(e=>G(Q,{onClick:()=>_(e),children:[W(Hr,{checked:u.has(e),size:`small`,sx:{py:0}}),W(bi,{className:`no-track-pii-safe`,children:e})]},e))]})]})},fs=({value:e,onChange:t,isDisabled:n,tooltipComponent:r,showTooltip:i=!0})=>{let[a,o]=H(e),s=Pn(null);return jn(()=>{s.current&&(s.current.value=e)},[e]),W(Z,{title:i?r:``,placement:`bottom-start`,slotProps:{tooltip:{sx:{width:`18.75rem`,p:2,boxShadow:3,border:1,borderRadius:1,color:`text.primary`,bgcolor:`background.paper`}}},children:W(ti,{inputRef:s,size:`small`,placeholder:`with selectors`,disabled:n,value:a,onChange:e=>{o(e.target.value)},onKeyUp:n=>{n.key===`Enter`?t(a):n.key===`Escape`&&(n.preventDefault(),o(e),s.current&&s.current.blur())},onBlur:()=>{o(e)},sx:{"& .MuiInputBase-root":{width:`18.75rem`,height:24,fontSize:`0.75rem`},"& .MuiInputBase-input":{py:.5,px:1}}})})},ps=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n,showTooltip:r})=>W(fs,{isDisabled:e,value:t.select??``,onChange:e=>{n({...t,select:e||void 0})},tooltipComponent:W(ls,{}),showTooltip:r}),ms=({isDisabled:e,viewOptions:t,onViewOptionsChanged:n})=>W(fs,{isDisabled:e,value:t.exclude??``,onChange:e=>{n({...t,exclude:e||void 0})}}),hs=({label:e,children:t,style:n})=>G(K,{style:n,sx:{maxWidth:300},children:[W(Y,{fontSize:`8pt`,children:(e??``).trim()||W(U,{children:`\xA0`})}),t]}),gs=({children:e})=>W(U,{children:e}),_s=({viewOptions:e,onViewOptionsChanged:t,lineageGraph:n,featureToggles:r,serverFlags:i,focusedNode:a,selectedNodes:o,onDeselect:s,onRunRowCount:c,onRunRowCountDiff:l,onRunValueDiff:u,onAddLineageDiffCheck:d,onAddSchemaDiffCheck:f,runTypeIcons:p,historyToggleSlot:m,SetupConnectionPopoverSlot:h=gs})=>{let g=i?.single_env_onboarding,[_,v]=H(null),y=!!_,b=o.length>0,x=b,S=e=>{v(e.currentTarget)},C=()=>{v(null)},w=p.rowCountDiff,ee=p.valueDiff,T=p.lineageDiff,E=p.schemaDiff;return W(J,{direction:`row`,alignItems:`center`,borderBottom:1,borderColor:`neutral.light`,sx:{width:`100%`,p:`4pt 8pt`,gap:`0.5rem`},children:G(J,{direction:`row`,alignItems:`center`,sx:{flex:1,gap:`0.5rem`},children:[m,W(hs,{label:`Mode`,style:{flexShrink:1},children:W(us,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t})}),W(hs,{label:`Package`,style:{flexShrink:1},children:W(ds,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t,lineageGraph:n})}),W(hs,{label:`Select`,style:{flexShrink:1},children:W(ps,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t,showTooltip:g})}),W(hs,{label:`Exclude`,style:{flexShrink:1},children:W(ms,{isDisabled:x,viewOptions:e,onViewOptionsChanged:t})}),W(K,{sx:{flexGrow:1}}),b&&G(U,{children:[W(hs,{label:``,style:{flexShrink:0},children:W(Y,{fontSize:`9pt`,color:`text.secondary`,children:o.length>1?`${o.length} nodes selected`:`${o.length} node selected`})}),W(hs,{label:``,children:W(q,{variant:`outlined`,color:`neutral`,size:`xsmall`,onClick:()=>{s()},sx:{textTransform:`none`,fontSize:`9pt`},children:`Deselect`})}),g&&W(hs,{label:`Explore`,children:G(K,{sx:{display:`inline-flex`},children:[W(q,{size:`xsmall`,color:`neutral`,variant:`outlined`,onClick:S,endIcon:W(or,{}),sx:{textTransform:`none`,fontSize:`0.75rem`},children:`Actions`}),W(qr,{anchorEl:_,open:y,onClose:C,anchorOrigin:{vertical:`bottom`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`right`},children:G(Q,{disabled:r.disableDatabaseQuery,onClick:async()=>{await c?.(),C()},children:[W(yi,{children:W(w,{fontSize:`small`})}),W(bi,{children:`Row Count`})]})})]})})]}),!g&&W(hs,{label:`Explore`,children:G(K,{sx:{display:`inline-flex`},children:[W(q,{size:`xsmall`,color:`neutral`,variant:`outlined`,disabled:r.disableViewActionDropdown,onClick:S,endIcon:W(or,{}),sx:{textTransform:`none`,fontSize:`0.75rem`},children:`Actions`}),G(qr,{anchorEl:_,open:y,onClose:C,anchorOrigin:{vertical:`bottom`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`right`},children:[W(ei,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`Diff`}),W(h,{display:r.mode===`metadata only`,children:G(Q,{disabled:r.disableDatabaseQuery,onClick:async()=>{await l?.(),C()},children:[W(yi,{children:W(w,{fontSize:`small`})}),W(bi,{children:`Row Count Diff`})]})}),W(h,{display:r.mode===`metadata only`,children:G(Q,{disabled:r.disableDatabaseQuery,onClick:async()=>{await u?.(),C()},children:[W(yi,{children:W(ee,{fontSize:`small`})}),W(bi,{children:`Value Diff`})]})}),(!r.disableUpdateChecklist||r.checklistPermissionDenied)&&[W(Xn,{},`checklist-divider`),W(ei,{sx:{lineHeight:`32px`,bgcolor:`transparent`},children:`Add to Checklist`},`checklist-header`),W(Z,{title:r.checklistPermissionDenied?`You don't have permission to add checks`:``,placement:`left`,children:W(`span`,{children:G(Q,{disabled:r.checklistPermissionDenied,onClick:()=>{r.checklistPermissionDenied||(d?.(e.view_mode),C())},children:[W(yi,{children:W(T,{fontSize:`small`})}),W(bi,{children:`Lineage Diff`})]})})},`add-lineage-diff`),W(Z,{title:r.checklistPermissionDenied?`You don't have permission to add checks`:``,placement:`left`,children:W(`span`,{children:G(Q,{disabled:r.checklistPermissionDenied,onClick:()=>{r.checklistPermissionDenied||(f?.(),C())},children:[W(yi,{children:W(E,{fontSize:`small`})}),W(bi,{children:`Schema Diff`})]})})},`add-schema-diff`)]]})]})})]})})},vs=({display:e,children:t})=>W(Zs,{display:e,children:t}),ys=()=>{let{deselect:e,focusedNode:t,selectedNodes:n,viewOptions:r,onViewOptionsChanged:i,runRowCount:a,runRowCountDiff:o,runValueDiff:s,addLineageDiffCheck:c,addSchemaDiffCheck:l}=fe(),{lineageGraph:u}=M(),{featureToggles:d}=Se(),{data:f}=be();return W(_s,{viewOptions:r,onViewOptionsChanged:i,lineageGraph:u,featureToggles:d,serverFlags:f,focusedNode:t,selectedNodes:n,onDeselect:e,onRunRowCount:a,onRunRowCountDiff:o,onRunValueDiff:s,onAddLineageDiffCheck:c,onAddSchemaDiffCheck:l,runTypeIcons:{rowCountDiff:z(`row_count_diff`).icon,valueDiff:z(`value_diff`).icon,lineageDiff:z(`lineage_diff`).icon,schemaDiff:z(`schema_diff`).icon},historyToggleSlot:W(ss,{}),SetupConnectionPopoverSlot:vs})};function bs(e,t){let n=_o(t),r=new Set;for(let i of Object.keys(e.nodes)){let a=e.nodes[i];vo(i,t,a.data.changeStatus,n)&&r.add(i)}return{nodeIds:r,columnIds:n}}function xs(e,t,n,r){return e&&t&&n?.node_id&&n?.column?go(t,n.node_id,n.column,r??new Set):void 0}async function Ss(e,t,n,r,i){let a={...e,change_analysis:e.change_analysis??t},o=await n.mutateAsync(a);return a.change_analysis&&o&&(r.current={pending:!0,cllData:o},i.setQueryData(A.lineage(),e=>e&&{...e,lineage:{...e.lineage,diff:$o(e.lineage.diff,o)}})),o}function Cs({interactive:e=!1,...t},n){let{isDark:r}=gt(),{apiClient:i}=Fe(),a=Tn(),o=zr(),s=Pn(null),{copyToClipboard:c,ImageDownloadModal:l,ref:u}=oo(),[d,p,m]=Rr(Xa),[h,g,b]=Lr([]),{lineageGraph:x,refetchLineageGraph:S,isLoading:C,error:T,refetchRunsAggregated:D}=M(),{featureToggles:O,singleEnv:te}=Se(),{data:ne}=be(),k=ne?.new_cll_experience??!1,{runId:ae,showRunId:oe,closeRunResult:se,runAction:ce,isRunResultOpen:le}=me(),{run:N}=xt(ae),[P,fe]=H({...t.viewOptions}),pe=lo(),ge=Pn([]).current,[xe,Ce]=H(void 0),[we,Te]=H(!1),Ee=Pn(!1);Ee.current=we;let De=Cn({mutationFn:e=>re(e,i)}),Oe=Pn({pending:!1}),[Ae,Me]=H({}),Ne=B(e=>d.filter(de).find(t=>t.data.name===e),[d]);Mn(n,()=>({copyToClipboard:c}));let Pe=V(()=>!!(x&&x.modifiedSet.length>0),[x]),Ie=P.view_mode??`changed_models`,Le=V(()=>d.filter(e=>e.type===`lineageGraphNode`).map(e=>e.id),[d]),Re=V(()=>x?Le.map(e=>x.nodes[e]):[],[x,Le]),[ze,Be]=H(),I=ze?x?.nodes[ze]:void 0,[L,Ve]=H(),[He,Ue]=H(new Set),We=V(()=>x?Array.from(He).map(e=>x.nodes[e]):[],[x,He]),R=po(We.length>0?We:Re,{onActionStarted:()=>{Ve(`action_result`)},onActionNodeUpdated:e=>{p(t=>t.map(t=>t.id===e.id?{...t}:t))},onActionCompleted:()=>{}}),Ge=B(()=>{let e=new Map,t=o.getNodes();for(let n of t)!n.parentId&&n.position&&e.set(n.id,{x:n.position.x,y:n.position.y});return e},[o]),Ke=V(()=>{if(!x)return new Set;let e=new Set;if(xe){for(let[t,n]of Object.entries(xe.current.nodes))n.impacted!==!1&&e.add(t);for(let t of Object.keys(xe.current.columns))e.add(t)}else if(L===`action_result`){let t=Object.keys(R.actionState.actions);e=new Set(t)}else e=I?he(ye(x,[I.id]),_e(x,[I.id])):Pe?_e(x,x.modifiedSet):new Set(Le);return new Set(e)},[x,xe,L,I,Pe,R.actionState.actions,Le]),Je=xo(),z=()=>{Je.closeContextMenu()},Ye=Pn(!1),Xe=Pn(new Set),Ze=Pn(new Set);Nn(()=>{(async()=>{let e;if(!x)return;if(P.node_ids)e=P.node_ids;else{let n=x.manifestMetadata.current?.project_name,r={view_mode:P.view_mode??(Pe?`changed_models`:`all`),packages:n?[n]:void 0,...t.viewOptions};try{e=(await w({select:r.select,exclude:r.exclude,packages:r.packages,view_mode:r.view_mode},i)).nodes}catch{r.view_mode=`all`,e=(await w({select:r.select,exclude:r.exclude,packages:r.packages,view_mode:r.view_mode},i)).nodes}fe(r)}let n=P.column_level_lineage,r=!1;ne?.impact_at_startup&&!Ye.current&&!n&&(Ye.current=!0,r=!0,Ee.current=!0,Te(!0),n={change_analysis:!0,no_upstream:!0},fe(e=>({...e,column_level_lineage:n})));let o;if(n)if(Oe.current.pending)o=Oe.current.cllData,Oe.current={pending:!1};else try{o=await Ss(n,Ee.current,De,Oe,a)}catch(e){if(r&&(Ee.current=!1,Te(!1),fe(e=>({...e,column_level_lineage:void 0})),n=void 0),e instanceof j){Ht.create({title:`Column Level Lineage error`,description:e.data?.detail??e.message,type:`error`,closable:!0});return}}else Oe.current={pending:!1};let s=k&&o?bs(x,o):void 0,[c,l,u]=await So(x,{selectedNodes:e,cll:o,newCllExperience:k,columnAncestry:xs(k,o,n,s?.columnIds)});p(c),g(l),Me(u),Ce(o),s&&n?.change_analysis&&!n?.column&&(Xe.current=s.nodeIds,Ze.current=s.columnIds),pe(c,P.view_mode??`changed_models`,Ee.current,!!n?.column,!!ze||!!N)})()},[x,ne?.impact_at_startup]);let Qe=()=>{Be(void 0)},$e=async e=>{let t=d.find(t=>t.id===e);if(t){if(t.parentId){let e=t.parentId;t=d.find(t=>t.id===e)??t}if(t.measured!=null){let{width:e,height:n}=t.measured;if(e&&n){let r=t.position.x+e/2,i=t.position.y+n/2,a=o.getZoom();await o.setCenter(r,i,{zoom:a,duration:200})}}}},et=so();co(s,async()=>{L!==`selecting`&&(ze?await $e(ze):await o.fitView({nodes:d,duration:200,padding:je,minZoom:ke,maxZoom:1}))});let tt=async(e,t=!1)=>{let n=P.column_level_lineage;!e&&!k&&Te(!1);let r=n!==void 0;await ot({...P,column_level_lineage:e},!1,r),t||ge.push(n),e?.node_id?Be(e.node_id):e||Be(void 0)},nt=async e=>{if(e){if(ge.length===0)return;let e=ge.pop();e?await tt(e,!0):await tt(void 0,!0)}else k&&we?await tt({change_analysis:!0,no_upstream:!0},!0):await tt(void 0,!0)},rt=(e,t)=>{L||tt({node_id:t.data.node.id,column:t.data.column})},it=(t,n)=>{if(e&&x){if(ue(n)){rt(t,n);return}if(z(),!L)Be(n.id);else if(L===`action_result`){let e=R.actionState.actions[n.id];e.run?.run_id&&oe(e.run.run_id),Be(n.id)}else{let e=new Set(He);He.has(n.id)?e.delete(n.id):e.add(n.id),Ue(e),e.size===0&&Ve(void 0)}}},at=async e=>{let{viewOptions:t=P}=e,{fitView:n,preservePositions:r=!1}=e,s;if(!x)return;if(P.select!==t.select||P.exclude!==t.exclude||P.packages!==t.packages||P.view_mode!==t.view_mode){try{let e=await w({select:t.select,exclude:t.exclude,packages:t.packages,view_mode:t.view_mode},i);t={...t,column_level_lineage:void 0},s=e.nodes}catch(e){e instanceof j&&Ht.create({title:`Select node error`,description:e.data?.detail??e.message,type:`error`,closable:!0});return}Be(void 0)}else s=d.map(e=>e.id);let c;if(t.column_level_lineage)try{c=await Ss(t.column_level_lineage,we,De,Oe,a)}catch(e){if(e instanceof j){Ht.create({title:`Column Level Lineage error`,description:e.data?.detail??e.message,type:`error`,closable:!0});return}}else k||Te(!1);let l;(r||k)&&(l=Ge());let u=t.column_level_lineage,m=k&&c?bs(x,c):void 0,[h,v,b]=await So(x,{selectedNodes:s,cll:c,existingPositions:l,newCllExperience:k,columnAncestry:xs(k,c,u,m?.columnIds)});p(h),g(v),Me(b),Ce(c),m&&!u?.column&&(Xe.current=m.nodeIds,Ze.current=m.columnIds),pe(h,t.view_mode??`changed_models`,we,!!t.column_level_lineage?.column,!!ze||!!N),N&&(ee(N)||y(N)||E(N)||f(N)||_(N))&&N.params?.model&&!Ne(N.params.model)&&se(),n&&(await new Promise(e=>setTimeout(e,1)),o.fitView({nodes:h,duration:200,padding:je,minZoom:ke,maxZoom:1}))},ot=async(e,t=!0,n=!1)=>{fe(e),await at({viewOptions:e,fitView:t,preservePositions:n})},st=mo();jn(()=>{let t=N?.type;if(e&&le&&!(!t||[`query_diff`,`query`,`row_count`,`row_count_diff`].includes(t))&&!L){let e;(ee(N)||y(N)||E(N)||f(N)||_(N))&&(e=N.params?.model);let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window});if(e){let n=Ne(e);n?de(n)&&I!==n.data.data&&it(t,n):ot({...P,view_mode:`all`})}else Qe()}},[N,P,le,L,Ne,I,e]);let ct=(e,t=1e3)=>{L===`action_result`||x===void 0||(L||(Ve(`selecting`),R.reset(),P.column_level_lineage&&ot({...P,column_level_lineage:void 0})),Ue(he(He,ye(x,[e],t))))},ut=(e,t=1e3)=>{L===`action_result`||x===void 0||(L||(Ve(`selecting`),R.reset(),P.column_level_lineage&&ot({...P,column_level_lineage:void 0})),Ue(he(He,_e(x,[e],t))))},dt=(t,n)=>{if(!e||L===`action_result`)return;t.preventDefault();let r=u.current,i=r.getBoundingClientRect(),a=t.clientX-i.left,o=t.clientY-i.top+r.offsetTop;Je.showContextMenu(a,o,n)},ft=e=>{if(!L){if(!x)return;Ue(new Set([e])),Ve(`selecting`),Be(void 0),R.reset()}else if(L===`selecting`){let t=new Set(He);He.has(e)?t.delete(e):t.add(e),Ue(t),t.size===0&&Ve(void 0)}},pt=()=>{Ve(void 0),Ue(new Set),Be(void 0),se(),D?.()},ht={interactive:e,nodes:d,focusedNode:I,selectedNodes:We,viewOptions:P,showContextMenu:dt,onViewOptionsChanged:ot,selectMode:L,selectNode:ft,selectParentNodes:ct,selectChildNodes:ut,deselect:pt,impactedNodeIds:Xe.current,impactedColumnIds:Ze.current,isNodeHighlighted:e=>Ke.has(e),isNodeSelected:e=>He.has(e),isEdgeHighlighted:(e,t)=>xe?e in xe.current.parent_map?t in xe.current.parent_map[e]:!1:Ke.has(e)&&Ke.has(t),isNodeShowingChangeAnalysis:e=>{if(!x||!we)return!1;let t=e in x.nodes?x.nodes[e]:void 0,n=P.column_level_lineage;return n?.node_id&&!n.column?n.node_id===e&&!!t?.data.changeStatus:!!t?.data.changeStatus},changeAnalysisMode:we,newCllExperience:k,setChangeAnalysisMode:Te,getNodeAction:e=>R.actionState.actions[e],getNodeColumnSet:e=>e in Ae?new Set(Ae[e]):new Set,runRowCount:async()=>{L===`selecting`?(await R.runRowCount(),pn({type:`row_count`,selected:`multi`})):I?(ce(`row_count`,{node_names:[I.data.name]},{showForm:!1,showLast:!1}),pn({type:`row_count`,selected:`single`})):(ce(`row_count`,{select:P.select,exclude:P.exclude,packages:P.packages,view_mode:P.view_mode}),pn({type:`row_count`,selected:`none`}))},runRowCountDiff:async()=>{L===`selecting`?(await R.runRowCountDiff(),pn({type:`row_count_diff`,selected:`multi`})):I?(ce(`row_count_diff`,{node_names:[I.data.name]},{showForm:!1,showLast:!1}),pn({type:`row_count_diff`,selected:`single`})):(ce(`row_count_diff`,{select:P.select,exclude:P.exclude,packages:P.packages,view_mode:P.view_mode}),pn({type:`row_count_diff`,selected:`none`}))},runValueDiff:async()=>{if(I)ce(`value_diff`,{model:I.data.name},{showForm:!0,showLast:!1}),pn({type:`value_diff`,selected:`single`});else{let e=L===`selecting`?We.length:Le.length;await st.confirm(e)&&(await R.runValueDiff(),pn({type:`value_diff`,selected:L===`selecting`?`multi`:`none`}))}},addLineageDiffCheck:async()=>{let e=await ie(P,i),t;t=L===`selecting`?`multi`:I?`single`:`none`,pn({type:`lineage_diff`,selected:t}),e&&(await a.invalidateQueries({queryKey:A.checks()}),et(e))},addSchemaDiffCheck:async()=>{let e;L===`selecting`?We.length>0&&(e=await R.addSchemaDiffCheck(),pt(),pn({type:`schema_diff`,selected:`multi`})):I?(e=await v({node_id:I.id},i),pn({type:`schema_diff`,selected:`single`})):(e=await v({select:P.select,exclude:P.exclude,packages:P.packages,view_mode:P.view_mode},i),pn({type:`schema_diff`,selected:`none`})),e&&(await a.invalidateQueries({queryKey:A.checks()}),et(e))},cancel:R.cancel,actionState:R.actionState,centerNode:$e,cll:xe,showColumnLevelLineage:tt,resetColumnLevelLineage:nt};return C?W(is,{}):T?W(as,{error:T,onRetry:S}):!x||d==Xa?W(U,{}):Ie===`changed_models`&&!x.modifiedSet.length?W(os,{viewOptions:P,onViewOptionsChanged:ot}):G(ve.Provider,{value:ht,children:[G(mt,{sizes:I?[70,30]:[100,0],minSize:0,gutterSize:5,className:I?void 0:`split-gutter-hidden`,style:{height:`100%`,width:`100%`},children:[G(J,{ref:s,divider:W(Xn,{sx:{borderColor:`grey.200`}}),spacing:0,sx:{contain:`strict`,position:`relative`},children:[e&&G(U,{children:[W(ys,{}),O.mode===`metadata only`&&W(ts,{})]}),G(Nr,{proOptions:{hideAttribution:!0},nodeTypes:Ja,edgeTypes:Ya,nodes:d,edges:h,onNodesChange:m,onEdgesChange:b,onNodeClick:it,onNodeContextMenu:dt,onClick:z,onInit:async()=>{if(Pe){let e=d.filter(e=>de(e)&&e.data.changeStatus!==void 0),t=e.length>0?e:d;await o.fitView({nodes:t,duration:200,padding:je,minZoom:ke,maxZoom:1})}else{let e=Ir(d,{});await o.setCenter(e.x+e.width/2,e.y+e.height/2,{zoom:1})}},maxZoom:1,minZoom:qe,nodesDraggable:e,ref:u,colorMode:r?`dark`:`light`,children:[W(Tr,{id:`lineage-bg`,variant:Er.Dots,color:r?F.neutral[700]:F.neutral[300],gap:20,size:2}),W(kr,{showInteractive:!1,position:`top-right`,className:lt,style:{backgroundColor:r?F.neutral[700]:void 0,borderColor:r?F.neutral[600]:void 0},children:W(Or,{title:`copy image`,onClick:async()=>{await c(),an({type:Ie,from:`lineage_view`})},style:{backgroundColor:r?F.neutral[700]:void 0,color:r?F.neutral[200]:void 0},children:W(K,{component:Si})})}),W(l,{}),W(jr,{position:`bottom-left`,children:G(J,{spacing:`5px`,children:[Pe&&W(wt,{variant:`changeStatus`}),P.column_level_lineage&&W(wt,{variant:`transformation`})]})}),W(jr,{position:`top-center`,children:W(ho,{notification:te?W(rs,{}):null,type:`info`})}),W(jr,{position:`top-left`,children:G(J,{spacing:`5px`,children:[W(da,{action:De}),d.length==0&&W(Y,{sx:{fontSize:`1.25rem`,color:`grey`,opacity:.5},children:`No nodes`})]})}),W(Ar,{nodeColor:Za,nodeStrokeWidth:3,zoomable:!0,pannable:!0,bgColor:r?F.neutral[800]:void 0,maskColor:r?`${F.neutral[900]}99`:`${F.neutral[100]}99`}),L===`action_result`&&W(jr,{position:`bottom-center`,className:`ignore-screenshot`,children:W(ua,{onClose:()=>{pt()}})})]}),W(bo,{...Je.props})]}),I?W(K,{sx:{borderLeft:`solid 1px`,borderColor:`divider`,height:`100%`},children:W(Qo,{node:I,onCloseNode:Qe})}):W(K,{})]}),st.AlertDialog]})}const ws=On(Cs);function Ts(){return W(Pr,{children:W(ws,{interactive:!0})})}function Es(){let{apiClient:e}=Fe(),{data:t,isLoading:n,error:r}=wn({queryKey:A.user(),queryFn:()=>Zt(e),retry:!1}),{data:i}=wn({queryKey:[`github-avatar`,t?.id],queryFn:()=>t?Xt(t.id):Promise.resolve(null),enabled:!!t?.id&&t.login_type===`github`,retry:!1,staleTime:300*1e3}),[a,o]=H(null),s=!!a,c=e=>{o(e.currentTarget)},l=()=>{o(null)},u=!n&&!r&&t;return G(U,{children:[n?W(K,{onClick:c,sx:{width:32,height:32,borderRadius:`50%`,bgcolor:`background.paper`,color:`primary.main`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:W(Zn,{size:16})}):W(di,{onClick:c,src:i||void 0,sx:{width:28,height:28,cursor:`pointer`,outline:`1px solid white`,fontSize:`0.875rem`},children:(e=>e?e.charAt(0).toUpperCase():`U`)(t?.login)}),G(qr,{anchorEl:a,open:s,onClose:l,slotProps:{paper:{sx:{bgcolor:`background.paper`,borderColor:`divider`,boxShadow:3,minWidth:180}}},children:[G(K,{sx:{px:2,py:1.5},children:[n&&G(K,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[W(Y,{variant:`body2`,color:`text.primary`,children:`Loading...`}),W(Zn,{size:16})]}),r&&W(Y,{variant:`caption`,color:`error`,children:`Failed to load user information`}),u&&G(U,{children:[W(Y,{variant:`body2`,fontWeight:`600`,color:`text.primary`,children:t.login}),t.email&&W(Y,{variant:`caption`,color:`text.secondary`,children:t.email})]})]}),W(Xn,{}),G(Q,{onClick:()=>{window.open(Qt,`_blank`),l()},children:[W(yi,{children:W(Qn,{})}),W(bi,{children:`Recce Cloud`})]}),G(Q,{onClick:()=>{window.open($t,`_blank`),l()},children:[W(yi,{children:W(ir,{})}),W(bi,{children:`Get live support`})]})]})]})}const Ds=()=>{let{setTheme:e,resolvedTheme:t}=Wn(),[n,r]=H(!1);jn(()=>{r(!0)},[]);let i=()=>{e(t===`dark`?`light`:`dark`)};if(!n)return W(X,{size:`small`,sx:{color:`rgba(255, 255, 255, 0.8)`,"&:hover":{bgcolor:`rgba(255, 255, 255, 0.1)`}},disabled:!0,children:W(br,{style:{width:18,height:18}})});let a=t===`dark`;return W(Z,{title:a?`Switch to light mode`:`Switch to dark mode`,children:W(X,{size:`small`,onClick:i,sx:{color:`rgba(255, 255, 255, 0.8)`,"&:hover":{bgcolor:`rgba(255, 255, 255, 0.1)`}},"aria-label":a?`Switch to light mode`:`Switch to dark mode`,children:W(a?br:mr,{style:{width:18,height:18}})})})};function Os(e,t,n,r){let i=e?.git,a=e?.pullRequest,o=e?.dbt?.base,s=e?.dbt?.current,c={review_mode:t||!1,adapter_type:e?.adapterType||null,has_git_info:!Jr(i),has_pr_info:!Jr(a)};return e?.adapterType===`dbt`&&(c.base={schema_count:n.size,dbt_version:o?.dbt_version||null,timestamp:o?.generated_at||null},c.current={schema_count:r.size,dbt_version:s?.dbt_version||null,timestamp:s?.generated_at||null},c.schemas_match=n.size===r.size&&Array.from(n).every(e=>r.has(e))),e?.adapterType===`sqlmesh`&&(c.base={has_env:!!e.sqlmesh?.base_env},c.current={has_env:!!e.sqlmesh?.current_env}),c}function ks(e){return Object.values(e).every(e=>e===null)?[W(K,{sx:{ml:`10px`},children:`No information`},`no info`)]:Object.entries(e).filter(([e,t])=>e!==`url`&&t!=null).map(([e,t])=>G(`li`,{style:{marginLeft:`10px`},children:[e,`: `,t]},e))}function As(){let{envInfo:e,reviewMode:t,lineageGraph:n}=M(),[r,i]=H(!1),a=e?.git,o=e?.pullRequest,s={...a,...o},c=e?.dbt?.base,l=e?.dbt?.current,u=c?.generated_at?Bt(c.generated_at):``,d=l?.generated_at?Bt(l.generated_at):``,f=``,p=``;c&&(f=c.generated_at?Ut(c.generated_at):``),l&&(p=l.generated_at?Ut(l.generated_at):``);let[m,h]=Jt(n),g=Pn(!1);jn(()=>{!g.current&&e&&(g.current=!0,on(Os(e,t,m,h)))},[e,t,m,h]);let _=()=>i(!0),v=()=>i(!1);return G(U,{children:[W(Z,{title:`Environment Info`,placement:`bottom-end`,children:G(K,{sx:{display:`flex`,alignItems:`center`,cursor:`pointer`,"&:hover":{color:`text.primary`}},onClick:_,children:[G(J,{direction:`column`,sx:{display:{xs:`none`,lg:`flex`},fontSize:`0.875rem`},children:[G(K,{sx:{display:`flex`,alignItems:`baseline`,gap:.5},children:[W(Y,{component:`span`,noWrap:!0,sx:{color:`warning.main`,maxWidth:128},className:`no-track-pii-safe`,children:Array.from(m).join(`, `)}),G(Y,{component:`span`,noWrap:!0,children:[`(`,f,`)`]})]}),G(K,{sx:{display:`flex`,alignItems:`baseline`,gap:.5},children:[W(Y,{component:`span`,noWrap:!0,sx:{color:`primary.main`,maxWidth:128},className:`no-track-pii-safe`,children:Array.from(h).join(`, `)}),G(Y,{component:`span`,noWrap:!0,children:[`(`,p,`)`]})]})]}),W(X,{size:`small`,"aria-label":`Environment Info`,children:W(K,{component:fr,sx:{fontSize:16,verticalAlign:`middle`}})})]})}),G(Fn,{open:r,onClose:v,maxWidth:`sm`,fullWidth:!0,children:[G(Rn,{sx:{display:`flex`,alignItems:`center`},children:[`Environment Information`,W(K,{sx:{flexGrow:1}}),W(X,{size:`small`,onClick:v,children:W(qn,{})})]}),W(Ln,{children:G(J,{direction:`column`,spacing:1,children:[t?G(J,{direction:`column`,spacing:.5,children:[W(Y,{variant:`h6`,sx:{fontSize:`1rem`},children:`Review Information`}),G(`ul`,{style:{margin:0,paddingLeft:`20px`},children:[s.url&&G(`li`,{style:{marginLeft:`10px`},children:[`url:`,` `,G(zn,{href:s.url,target:`_blank`,sx:{color:`primary.main`},children:[s.url,` `,W(Bn,{})]})]}),!Jr(s)&&ks(s)]})]}):G(J,{direction:`column`,spacing:.5,children:[W(Y,{variant:`h6`,sx:{fontSize:`1rem`},children:`Dev Information`}),W(`ul`,{style:{margin:0,paddingLeft:`20px`},children:a&&ks(a)})]}),W(Xn,{}),e?.adapterType===`dbt`&&G(J,{direction:`column`,spacing:.5,children:[W(Y,{variant:`h6`,sx:{fontSize:`1rem`},children:`DBT`}),W(Hi,{sx:{border:1,borderColor:`divider`,maxHeight:`30rem`},children:G(Bi,{size:`small`,stickyHeader:!0,children:[W(Ui,{children:G(Wi,{children:[W($,{}),W($,{children:`base`}),W($,{children:`current`})]})}),G(Vi,{children:[G(Wi,{children:[W($,{children:`schema`}),W($,{className:`no-track-pii-safe`,children:Array.from(m).map(e=>W(Z,{title:e,placement:`bottom`,children:W(`div`,{className:`max-w-72 truncate`,children:e})},e))}),W($,{className:`no-track-pii-safe`,children:Array.from(h).map(e=>W(Z,{title:e,placement:`bottom`,children:W(`div`,{className:`max-w-72 truncate`,children:e})},e))})]}),G(Wi,{children:[W($,{children:`version`}),W($,{children:c?.dbt_version}),W($,{children:l?.dbt_version})]}),G(Wi,{children:[W($,{children:`timestamp`}),W($,{children:u}),W($,{children:d})]})]})]})})]}),e?.adapterType===`sqlmesh`&&G(J,{direction:`column`,spacing:.5,children:[W(Y,{variant:`h6`,sx:{fontSize:`1rem`},children:`SQLMesh`}),W(Hi,{sx:{border:1,borderColor:`divider`,maxHeight:`30rem`},children:G(Bi,{stickyHeader:!0,children:[W(Ui,{children:G(Wi,{children:[W($,{}),W($,{children:`base`}),W($,{children:`current`})]})}),W(Vi,{children:G(Wi,{children:[W($,{children:`Environment`}),W($,{className:`no-track-pii-safe`,children:e.sqlmesh?.base_env}),W($,{className:`no-track-pii-safe`,children:e.sqlmesh?.current_env})]})})]})})]})]})}),W(In,{children:W(q,{color:`iochmara`,onClick:v,children:`Close`})})]})]})}const js=()=>({toastSuccess:e=>{Ht.create({description:e,type:`success`,duration:5e3,closable:!0})},toastError:(e,t)=>{let n=e;t!=null&&(n=ae(t)?`${e}. ${String(t.data?.detail)}`:`${e}. ${t}`),Ht.create({description:n,type:`error`,duration:5e3,closable:!0})}}),Ms=e=>{jn(()=>{let t=e=>{e.preventDefault()};return e&&window.addEventListener(`beforeunload`,t),()=>{e&&window.removeEventListener(`beforeunload`,t)}},[e])},Ns=()=>{let{featureToggles:e}=Se(),{fileName:t,cloudMode:n,isDemoSite:r,envInfo:i}=M(),{apiClient:a}=Fe(),[o,c]=H(!1),[l,u]=H(!1),d=!t&&!n&&!r,{data:f}=s(d),m=f!=null&&f.filter(e=>!e.is_preset).length>0;Ms(d&&m);let[{newFileName:g,errorMessage:_,modified:v,overwriteWithMethod:y,bypass:b},x]=H({newFileName:t??`recce_state.json`,bypass:!1}),S=Pn(null),{toastSuccess:C,toastError:w}=js(),ee=Tn(),T=()=>{x({newFileName:t??`recce_state.json`,modified:!t,bypass:!1}),c(!0)},E=()=>c(!1),D=()=>u(!1),O=async(e,t)=>{if(!g)return;let n=localStorage.getItem(p.bypassSaveOverwrite)===`true`;try{e===`save`?await h({filename:g,overwrite:t??n},a):await ne({filename:g,overwrite:t??n},a),C(e===`save`?`Save file successfully`:`Rename file successfully`),await ee.invalidateQueries({queryKey:A.lineage()}),b&&localStorage.setItem(p.bypassSaveOverwrite,`true`)}catch(t){if(ae(t)&&t.status===409){x(t=>({...t,overwriteWithMethod:e})),u(!0);return}w(e===`save`?`Save file failed`:`Rename file failed`,t)}finally{E()}},te=()=>{D(),c(!0),x(e=>({...e,overwriteWithMethod:void 0}))};if(n||r)return W(U,{});let re=`New Instance`+(m?` (unsaved)`:``),ie;if(e.disableSaveToFile&&t){let e=i?.stateMetadata?.generated_at,n=e?Ve(new Date(e)):null;ie=n?`${t} (${n})`:null}return G(U,{children:[G(J,{direction:`row`,alignItems:`center`,justifyContent:`center`,children:[W(K,{sx:{fontWeight:600},children:ie??t??re}),!e.disableSaveToFile&&W(Z,{title:t?`Change Filename`:`Save`,enterDelay:1e3,children:W(X,{onClick:T,"aria-label":t?`Change Filename`:`Save`,size:`small`,children:W(K,{component:t?gr:Vn,sx:{fontSize:16,verticalAlign:`middle`}})})})]}),G(Fn,{open:o,onClose:E,children:[G(Rn,{sx:{display:`flex`,alignItems:`center`},children:[t?`Change Filename`:`Save File`,W(K,{sx:{flexGrow:1}}),W(X,{size:`small`,onClick:E,children:W(qn,{})})]}),W(Ln,{onKeyDown:e=>{e.stopPropagation()},children:W(ti,{inputRef:S,value:g,label:`File name`,placeholder:`Enter filename`,error:!!_,helperText:_,fullWidth:!0,size:`small`,sx:{mt:1},onChange:e=>{let n=e.target.value,r;n?n.endsWith(`.json`)?/^[a-zA-Z0-9 _-]+\.json$/.test(n)?t&&n===t&&(r=`Filename is the same as the current one.`):r=`Invalid filename. Only alphanumeric, space, _ and - are allowed.`:r=`Filename must end with .json.`:r=`Filename cannot be empty.`,x(e=>({...e,modified:!0,newFileName:n,errorMessage:r}))},onKeyDown:e=>{if(e.key===`Enter`){if(_)return;O(t?`rename`:`save`)}else e.key===`Escape`&&E()}})}),G(In,{sx:{gap:`5px`},children:[W(q,{size:`small`,color:t?`inherit`:`iochmara`,variant:`contained`,onClick:async()=>{await O(`save`)},disabled:!g||!!_||!v,children:t?`Save as New File`:`Confirm`}),t&&W(q,{size:`small`,color:`iochmara`,variant:`contained`,onClick:async()=>{await O(`rename`)},disabled:!g||!!_||!v,children:`Rename`})]})]}),G(Fn,{open:l,onClose:D,children:[G(Rn,{sx:{display:`flex`,alignItems:`center`},children:[`Overwrite File?`,W(K,{sx:{flexGrow:1}}),W(X,{size:`small`,onClick:D,children:W(qn,{})})]}),G(Ln,{sx:{borderTop:`solid 1px`,borderBottom:`solid 1px`,borderColor:`divider`},onKeyDown:e=>{e.stopPropagation()},children:[W(Y,{sx:{fontSize:`12pt`},children:y===`save`?`Saving a file with this name will overwrite the existing file. Are you sure you wish to continue?`:`Renaming the file with this name will overwrite the existing file. Are you sure you wish to continue?`}),W(Ur,{control:W(Hr,{size:`small`,checked:b,onChange:e=>{x(t=>({...t,bypass:e.target.checked}))}}),label:W(Y,{sx:{fontWeight:`bold`,pt:`8px`},children:`Don't show this again`})})]}),G(In,{sx:{gap:`5px`},children:[W(q,{variant:`outlined`,onClick:te,size:`small`,children:`Back`}),W(q,{size:`small`,color:`iochmara`,variant:`contained`,onClick:()=>{y&&(O(y,!0),D())},children:`Overwrite`})]})]})]})};function Ps(){let{featureToggles:e}=Se(),{apiClient:t}=Fe(),n=async()=>{try{let e=await te(t),n=JSON.stringify(e,null,2);Vr(new Blob([n],{type:`application/json`}),`recce-state-${ni(new Date,`yyyy-MM-dd-HH-mm-ss`)}.json`)}catch(e){console.error(`Export failed`,e),Ht.create({title:`Export failed`,description:String(e),type:`error`,duration:5e3,closable:!0})}};return W(Z,{title:`Export`,children:W(X,{size:`small`,"aria-label":`Export state`,onClick:async()=>{await n(),yn({name:`export`})},disabled:e.disableExportStateFile,children:W(K,{component:dr,sx:{verticalAlign:`middle`,width:`16px`,height:`16px`}})})})}const Fs=[`Processing...`,`Still processing, please wait...`,`Almost there, thanks for your patience...`];function Is(){let{successToast:e,failToast:t}=Vt(),[,n]=Wr(),{authed:r}=Se(),{shareUrl:i,isLoading:a,error:o,handleShareClick:s}=At(),[c,l]=H(!1),[u,d]=H(0),[f,p]=H(a);a!==f&&(p(a),a&&d(0)),Gr(()=>{d(e=>Math.min(e+1,Fs.length-1))},a?3e4:null),jn(()=>{o&&t(`Failed to share state`,o)},[o,t]);let m=async()=>{try{await n(String(i)),e(`Copied the link to clipboard`)}catch(e){t(`Failed to copy the link`,e)}};return r?G(J,{direction:`row`,sx:{flex:1,alignItems:`center`,gap:`5px`},children:[W(q,{size:`xsmall`,variant:`outlined`,color:`neutral`,startIcon:W(_i,{}),endIcon:i?W(K,{component:cr,sx:{color:`success.main`}}):void 0,onClick:async()=>{await s(),_n({name:`create`})},disabled:a,children:a?`Sharing...`:`Share`}),a&&W(Y,{sx:{fontSize:14,color:`grey.500`},children:Fs[u]}),W(J,{direction:`row`,spacing:.5,alignItems:`center`,children:i&&G(U,{children:[W(K,{sx:{overflowX:`auto`,whiteSpace:`nowrap`,maxWidth:`350px`},children:W(Y,{sx:{fontSize:14},children:i})}),W(X,{size:`small`,"aria-label":`Copy the share URL`,onClick:async()=>{await m(),_n({name:`copy`})},children:W(ur,{})})]})})]}):G(J,{direction:`row`,sx:{flex:1,alignItems:`center`},children:[W(q,{size:`xsmall`,color:`neutral`,variant:`outlined`,onClick:()=>{l(!0)},startIcon:W(_i,{}),children:`Share`}),c&&W(Tt,{parentOpen:c,handleParentClose:l,ignoreCookie:!0,variant:`enable-share`})]})}function Ls(e){return/^\/checks\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/.test(e)}function Rs(){return W(Z,{title:`Syncing`,children:W(K,{sx:{mx:`10px`},children:W(Zn,{size:20})})})}function zs(){let[e,t]=H(!1),n=Tn(),{apiClient:r}=Fe(),i=mi(),a=pi(),{basePath:o}=pe(),[s,c]=H(!1),[l,u]=H(``),{data:d}=ce(),f=()=>c(!1),p=B(async e=>{if(c(!1),t(!0),(await O(e,r)).status===`conflict`){c(!0),t(!1);return}for(;await S(r);)await new Promise(e=>setTimeout(e,1e3));Ht.create({description:`Sync Completed`,type:`success`,duration:5e3,closable:!0}),t(!1),u(``),await n.invalidateQueries({queryKey:A.lineage()}),await n.invalidateQueries({queryKey:A.checks()}),await n.invalidateQueries({queryKey:A.runs()}),Ls(a)&&i.push(`${o}/checks`)},[n,a,r,i.push,o]);return e?W(Rs,{}):G(U,{children:[W(Z,{title:`Sync with Cloud`,children:W(X,{size:`small`,"aria-label":`Sync state`,onClick:()=>p(d?.session_id?{method:`merge`}:{}),children:W(K,{component:Jn,sx:{fontSize:16,verticalAlign:`middle`}})})}),G(Fn,{open:s,onClose:f,children:[G(Rn,{sx:{display:`flex`,alignItems:`center`,fontWeight:`bold`},children:[`Sync with Cloud`,W(K,{sx:{flexGrow:1}}),W(X,{size:`small`,onClick:f,children:W(qn,{})})]}),G(Ln,{children:[W(Y,{children:`New changes have been detected in the cloud. Please choose a method to sync your state`}),W(K,{sx:{mt:`5px`},children:W(zi,{value:l,onChange:e=>{u(e.target.value)},children:G(J,{direction:`column`,children:[W(Ur,{value:`merge`,control:W(Ri,{}),label:G(J,{direction:`row`,alignItems:`center`,children:[`Merge`,W(Z,{title:`This will merge the local and remote states.`,children:W(K,{component:fr,sx:{ml:2,cursor:`pointer`}})})]})}),W(Ur,{value:`overwrite`,control:W(Ri,{}),label:G(J,{direction:`row`,alignItems:`center`,children:[`Overwrite`,W(Z,{title:`This will overwrite the remote state file with the local state.`,children:W(K,{component:fr,sx:{ml:2,cursor:`pointer`}})})]})}),W(Ur,{value:`revert`,control:W(Ri,{}),label:G(J,{direction:`row`,alignItems:`center`,children:[`Revert`,W(Z,{title:`This will discard local changes and revert to the cloud state.`,children:W(K,{component:fr,sx:{ml:2,cursor:`pointer`}})})]})})]})})})]}),G(In,{children:[W(q,{onClick:f,sx:{mr:1},children:`Cancel`}),W(q,{color:`iochmara`,variant:`contained`,onClick:()=>p({method:l||void 0}),disabled:!l,children:`Sync`})]})]})]})}const Bs=[{path:`/lineage`,name:`Lineage`},{path:`/query`,name:`Query`},{path:`/checks`,name:`Checklist`}];function Vs({queryKey:e,fetchCallback:t,selectCallback:n}){let{data:r,isLoading:i,error:a}=wn({queryKey:e,queryFn:t,select:n});return i||a||r===0?W(U,{}):W(K,{bgcolor:`brand.main`,display:`flex`,justifyContent:`center`,alignItems:`center`,p:1,borderRadius:`100%`,color:`white`,fontWeight:700,fontSize:`0.75rem`,children:W(`span`,{children:r})})}function Hs(){let{apiClient:e}=Fe();return W(Vs,{queryKey:A.checks(),fetchCallback:()=>x(e),selectCallback:e=>e.filter(e=>!e.is_checked).length})}const Us=()=>{let e=pi(),{isDemoSite:t,isLoading:n,cloudMode:r}=M(),{featureToggles:i}=Se(),{data:a,isLoading:o}=be(),s=Pn(null);return jn(()=>{s.current&&s.current!==e&&mn({from:s.current,to:e}),s.current=e},[e]),W(K,{sx:{borderBottom:`1px solid lightgray`,px:`12px`},children:G(K,{sx:{display:`grid`,gridTemplateColumns:`1fr auto 1fr`,width:`100%`,alignItems:`center`},children:[W(oi,{value:V(()=>e.startsWith(`/checks`)?`/checks`:e.startsWith(`/query`)?`/query`:e.startsWith(`/runs`)?`/runs`:`/lineage`,[e]),sx:{borderBottom:`none`,minHeight:`auto`},children:Bs.map(({path:e,name:t})=>t===`Query`&&a?.single_env_onboarding?null:t===`Checklist`&&Hs?W(ai,{value:e,disabled:n||o,sx:{p:0},label:W(K,{sx:{display:`flex`,alignItems:`center`,gap:`4px`},children:G(Gn,{href:e,style:{textDecoration:`none`,color:`inherit`,padding:`0.875rem 1.1875rem`,display:`flex`,gap:3,alignItems:`center`},children:[t,` `,W(Hs,{})]})})},e):W(ai,{value:e,disabled:n||o,sx:{p:0},label:W(K,{sx:{display:`flex`,alignItems:`center`,gap:`4px`},children:W(Gn,{href:e,style:{textDecoration:`none`,color:`inherit`,padding:`0.875rem 1.1875rem`},children:t})})},e))}),G(K,{sx:{display:`flex`,alignItems:`center`,gap:`12px`,justifyContent:`center`},children:[!n&&!t&&W(Ns,{}),!n&&!t&&!a?.single_env_onboarding&&!i.disableShare&&W(Is,{})]}),!n&&G(K,{sx:{display:`flex`,justifyContent:`right`,alignItems:`center`,mr:`8px`},children:[W(As,{}),r&&W(zs,{}),W(Ps,{})]})]})})};function Ws(){let{remainingSeconds:e,isEnabled:t}=N();return!t||e===null||e>60?null:G(Gi,{color:`warning`,variant:`standard`,sx:{display:`flex`,alignItems:`center`,gap:1,fontSize:`0.75rem`,mr:2},children:[W(K,{component:Yn,sx:{display:`inline-flex`}}),`Idle timeout: `,qt(e,`compact`)]})}const Gs=()=>{let{version:e,latestVersion:t}=T(),n=V(()=>RegExp(`^\\d+\\.\\d+\\.\\d+$`),[]);return jn(()=>{if(n.test(e)&&e!==t){let e=`recce-update-toast-shown`;if(sessionStorage.getItem(e))return;setTimeout(()=>{Ht.create({id:`recce-update-available`,title:`Update available`,description:G(`span`,{children:[`A new version of Recce (v`,t,`) is available.`,W(`br`,{}),`Please run`,` `,W(K,{component:`code`,sx:{bgcolor:`grey.200`,px:.5,py:.25,borderRadius:.5,fontFamily:`monospace`,fontSize:`0.875em`},children:`pip install --upgrade recce`}),` `,`to update Recce.`,W(`br`,{}),W(zn,{sx:{color:`primary.main`,fontWeight:`bold`,"&:hover":{textDecoration:`underline`}},href:`https://github.com/DataRecce/recce/releases/tag/v${t}`,target:`_blank`,children:`Click here to view the detail of latest release`})]}),duration:60*1e3,closable:!0}),sessionStorage.setItem(e,`true`)},0)}},[e,t,n]),n.test(e)?W(zn,{href:`https://github.com/DataRecce/recce/releases/tag/v${e}`,sx:{"&:hover":{textDecoration:`none`},fontSize:`sm`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75},target:`_blank`,children:e}):W(Y,{component:`span`,sx:{fontSize:`sm`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75},children:e})};function Ks({icon:e,href:t,sx:n,...r}){let i=Un();return W(zn,{sx:{height:`20px`,color:`common.white`,...n},href:t,target:`_blank`,...r,children:W(e,{style:{color:i.palette.common.white,width:20,height:20}})})}const qs=()=>{let{reviewMode:e,isDemoSite:t,envInfo:n,cloudMode:r}=M(),{featureToggles:i,authed:a}=Se(),{url:o,id:s}=n?.pullRequest??{},c=o?o.split(`/`).pop():null,l=r||a?Qt:`https://reccehq.com/`,[u,d]=H(!1);return G(K,{sx:{display:`flex`,gap:`10px`,minHeight:`40px`,alignItems:`center`,bgcolor:F.brand[400]},children:[W(zn,{href:l,target:`_blank`,sx:{"&:hover":{textDecoration:`none`}},children:G(K,{sx:{display:`flex`,gap:`10px`,alignItems:`center`},children:[W(K,{component:`img`,sx:{width:20,height:20,ml:`18px`},src:`/logo/recce-logo-white.png`,alt:`recce-logo-white`}),W(Y,{variant:`h4`,sx:{fontFamily:`"Montserrat", sans-serif`,color:`common.white`,fontSize:`1.25rem`},children:`RECCE`})]})}),W(Ds,{}),W(Gs,{}),(i.mode??e)&&W(Gi,{sx:{fontSize:`0.875rem`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75,borderColor:`rgba(255,255,255,0.8)`},children:i.mode??`review mode`}),r&&s&&W(Gi,{sx:{fontSize:`0.875rem`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75,borderColor:`rgba(255,255,255,0.8)`},children:G(J,{direction:`row`,spacing:1,alignItems:`center`,children:[W(K,{children:`cloud mode`}),W(K,{sx:{borderLeft:`1px solid rgba(255,255,255,0.8)`,pl:`8px`},children:G(zn,{href:o,sx:{"&:hover":{textDecoration:`none`}},target:`_blank`,children:[W(Zr,{style:{color:`rgba(255,255,255,0.8)`,width:12,height:12,marginRight:2,display:`inline`,verticalAlign:`middle`}}),W(Y,{component:`span`,sx:{color:`rgba(255,255,255,0.8)`,display:`inline`},children:`#${String(s)}`})]})})]})}),t&&o&&c&&W(Gi,{sx:{fontSize:`0.875rem`,color:`rgba(255,255,255,0.8)`,textTransform:`uppercase`,borderWidth:1,px:1,borderRadius:.75,borderColor:`rgba(255,255,255,0.8)`},children:G(J,{direction:`row`,spacing:1,alignItems:`center`,children:[W(K,{children:`demo mode`}),W(K,{sx:{borderLeft:`1px solid rgba(255,255,255,0.8)`,pl:`8px`},children:G(zn,{href:o,sx:{"&:hover":{textDecoration:`none`}},target:`_blank`,children:[W(Zr,{style:{color:`rgba(255,255,255,0.8)`,width:12,height:12,marginRight:2,display:`inline`,verticalAlign:`middle`}}),W(Y,{component:`span`,sx:{color:`rgba(255,255,255,0.8)`,display:`inline`},children:`#${c}`})]})})]})}),W(K,{sx:{flex:1}}),(t||i.mode===`read only`)&&G(U,{children:[W(Ks,{icon:er,href:`https://github.com/DataRecce/recce`}),W(Ks,{icon:rr,href:`https://getdbt.slack.com/archives/C05C28V7CPP`}),W(Ks,{sx:{mr:2},icon:tr,href:`https://docs.reccehq.com`})]}),!t&&i.mode!==`read only`&&G(U,{children:[W(Ws,{}),a||r?W(K,{sx:{mr:2},children:W(Es,{})}):G(U,{children:[W(K,{component:`button`,sx:{color:`common.white`,fontSize:`0.875rem`,fontWeight:600,bgcolor:`brand.700`,borderRadius:1,px:3,py:1,mr:2,cursor:`pointer`,border:`none`},onClick:()=>{d(!0)},children:`Connect to Cloud`}),u&&W(Tt,{parentOpen:u,handleParentClose:d,ignoreCookie:!0,variant:`user-profile`})]})]})]})};function Js(){return W(K,{sx:{display:`flex`,height:`100%`,alignItems:`center`,justifyContent:`center`,contain:`size`},children:W(K,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`},children:W(Zn,{size:48})})})}function Ys({children:e,lineage:t}){let n=pi(),{isDemoSite:r,isLoading:i,isCodespace:a}=M(),{featureToggles:o}=Se(),s=n.replace(/\/$/,``)||`/`,c=s===`/lineage`||s===`/`;return jn(()=>{un()},[]),G(K,{sx:{display:`flex`,flexDirection:`column`,height:`100vh`,overflow:`hidden`},children:[W(qs,{}),W(Us,{}),W(Xs,{isLineageRoute:c,lineage:t,children:e}),!i&&!r&&!a&&o.mode===null&&W(Tt,{})]})}function Xs({children:e,lineage:t,isLineageRoute:n,disableInternalHistory:r=!1}){let{isRunResultOpen:i,isHistoryOpen:a,closeRunResult:o}=me(),{basePath:s}=pe(),{data:c}=be(),l=pi(),u=Rt(),d=i&&!l.startsWith(`${s}/checks`),f=r?!1:a&&!l.startsWith(`${s}/checks`);return G(mt,{sizes:f?[20,80]:[0,100],minSize:0,gutterSize:5,className:f?void 0:`split-gutter-hidden`,style:{height:`100%`},children:[W(K,{style:{contain:`size`},suppressHydrationWarning:!0,children:f&&W(Re,{})}),G(kt,{sizes:d?[50,50]:[100,0],minSize:0,gutterSize:5,className:d?void 0:`split-gutter-hidden`,style:{flex:`1`,contain:`size`},children:[W(En,{fallback:W(Js,{}),children:G(K,{sx:{p:0,contain:`content`,height:`100%`,position:`relative`},suppressHydrationWarning:!0,children:[W(K,{sx:{display:n?`block`:`none`,height:`100%`,position:n?`relative`:`absolute`,inset:0},children:t}),!n&&e]})}),W(K,{sx:{height:`100%`,bgcolor:u?`grey.900`:`grey.50`},suppressHydrationWarning:!0,children:d?W(He,{onClose:o,isSingleEnvironment:!!c?.single_env_onboarding}):null})]})]})}function Zs({children:e,display:t}){let[n,r]=H(!1),i=Pn(null),a=Pn(null),o=B(()=>{i.current&&=(clearTimeout(i.current),null),r(!0)},[]),s=B(()=>{i.current=setTimeout(()=>{r(!1)},100)},[]);return t?G(U,{children:[W(K,{ref:a,onMouseEnter:o,onMouseLeave:s,sx:{display:`contents`},children:e}),G(fi,{open:n,anchorEl:a.current,onClose:()=>r(!1),anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableAutoFocus:!0,disableEnforceFocus:!0,sx:{pointerEvents:`none`},slotProps:{paper:{onMouseEnter:o,onMouseLeave:s,sx:{bgcolor:`grey.600`,color:`white`,p:1.5,pointerEvents:`auto`}}},children:[`Connect to a data warehouse to unlock Diff.`,` `,W(zn,{href:$t,target:`_blank`,sx:{color:`white`,textDecoration:`underline`},children:`Learn more`}),`.`]})]}):e}function Qs({checksOnly:e=!0}){let t=Rt(),{featureToggles:n}=Se(),r=Tn(),{apiClient:i}=Fe(),a=Pn(null),o=Pn(null),[s,c]=H(null),[l,u]=H(!1),d=mi(),f=pi(),{basePath:p}=pe(),[,h]=xe(),g=B(async()=>{if(s){try{let{runs:t,checks:n}=await m(s,e,i);h?.(),await r.invalidateQueries({queryKey:A.checks()}),await r.invalidateQueries({queryKey:A.runs()}),f.includes(`/checks`)&&d.push(`${p}/checks`);let a=e?`${n} checks imported successfully`:`${t} runs and ${n} checks imported successfully`;Ht.create({description:a,type:`info`,duration:5e3,closable:!0})}catch(e){console.error(`Import failed`,e),Ht.create({title:`Import failed`,description:String(e),type:`error`,duration:5e3,closable:!0})}u(!1)}},[r,s,f,h,e,i,d.push,p]),_=()=>{a.current&&a.current.click()},v=e=>{e.target.files?.length===1&&(c(e.target.files[0]),u(!0)),a.current&&(a.current.value=``)},y=()=>u(!1),b=e?`checks`:`runs and checks`,{isDemoSite:x}=M();return G(U,{children:[W(Z,{title:`Import Checklist from State File`+(x?` (Disabled in the demo site)`:``),children:W(X,{sx:{pt:`6px`,color:t?`grey.300`:`grey.600`,"&:hover":{color:t?`grey.100`:`grey.800`},fontSize:20},"aria-label":`Import state`,onClick:()=>{_(),yn({name:`import`})},disabled:n.disableImportStateFile||x,children:W(Mi,{})})}),W(`input`,{type:`file`,style:{display:`none`},ref:a,onChange:v}),G(Fn,{open:l,onClose:y,maxWidth:`sm`,fullWidth:!0,"aria-labelledby":`import-dialog-title`,children:[G(Rn,{id:`import-dialog-title`,sx:{display:`flex`,alignItems:`center`,fontWeight:`bold`},children:[`Import state`,W(K,{sx:{flexGrow:1}}),W(X,{size:`small`,onClick:y,children:W(qn,{})})]}),W(Ln,{children:G(J,{direction:`column`,spacing:1,sx:{px:`5px`,borderRadius:1},children:[G(J,{direction:`row`,alignItems:`center`,spacing:.5,children:[W(K,{component:fr,sx:{color:`error.main`}}),W(Y,{component:`span`,sx:{fontWeight:500,color:`error.main`},children:`Caution!`})]}),G(Y,{children:[`The current `,b,` will be`,` `,W(Y,{component:`span`,sx:{fontWeight:600},children:`merged`}),` `,`with the imported state`]})]})}),G(In,{children:[W(q,{ref:o,onClick:y,children:`Cancel`}),W(q,{color:`iochmara`,variant:`contained`,onClick:g,sx:{ml:`5px`},children:`Import`})]})]})]})}function $s({check:e},t){return W(K,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:W(Pr,{children:W(ws,{viewOptions:{...e.params,...e.view_options},interactive:!1,ref:t})})})}const ec=On($s),tc=({node:e,selected:t,onSelect:n,schemaChanged:r,isDark:i})=>{let{icon:a}=Oe(e.data.resourceType),{base:o,current:s}=e.data.data,c,l;return r?(c=z(`schema_diff`).icon,l=Ge(`modified`).color):!o&&s?(c=Ge(`added`).icon,l=Ge(`added`).color):o&&!s&&(c=Ge(`removed`).icon,l=Ge(`removed`).color),W(ci,{disablePadding:!0,children:G(K,{sx:{display:`flex`,width:`100%`,fontSize:`10pt`,p:`5px 8px`,cursor:`pointer`,"&:hover":{bgcolor:i?`grey.700`:`grey.200`},bgcolor:t?i?`grey.800`:`grey.100`:`inherit`,alignItems:`center`,gap:`5px`},onClick:()=>{n(e.id)},children:[a&&W(K,{component:a}),W(K,{sx:{flex:1,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`},children:e.data.name}),c&&l&&W(K,{component:c,sx:{color:l}})]})})};function nc({check:e},t){let n=Rt(),{apiClient:r}=Fe(),{lineageGraph:i}=M(),a=e.params,{isLoading:o,error:s,data:c}=wn({queryKey:[...A.check(e.check_id),`select`],queryFn:async()=>w({select:a.select,exclude:a.exclude,packages:a.packages,view_mode:a.view_mode},r),refetchOnMount:!0,enabled:!a.node_id}),[l,u]=V(()=>{let e=[],t=[],n=[],r=[];if(a.node_id){let t=a.node_id instanceof Array?a.node_id:[a.node_id];for(let n of t){let t=i?.nodes[n];t&&e.push(t)}}else for(let t of c?.nodes??[]){let n=i?.nodes[t];n&&e.push(n)}let o=e.filter(e=>e.data.resourceType===`model`||e.data.resourceType===`seed`||e.data.resourceType===`source`||e.data.resourceType===`snapshot`);for(let e of o)Gt(e.data.data.base?.columns,e.data.data.current?.columns)?t.push(e.id):!e.data.data.base&&e.data.data.current?n.push(e.id):e.data.data.base&&!e.data.data.current&&r.push(e.id);function s(e){return t.includes(e.id)?3:n.includes(e.id)?2:r.includes(e.id)?1:0}return o.sort((e,t)=>{let n=s(e),r=s(t);return n===r?e.data.name.localeCompare(t.data.name):r-n}),[o,t]},[a.node_id,c?.nodes,i]),[d,f]=H(0);if(o)return W(K,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:n?`grey.900`:`grey.50`,height:`100%`},children:`Loading...`});if(s)return G(K,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:n?`grey.900`:`grey.50`,height:`100%`},className:`no-track-pii-safe`,children:[`Error: `,s.message]});if(l.length==0)return W(K,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:n?`grey.900`:`grey.50`,height:`100%`},children:`No nodes matched`});if(d<l.length){let e=l[d];return G(mt,{sizes:[80,20],minSize:30,style:{height:`100%`},children:[W(Oo,{base:e.data.data.base,current:e.data.data.current,columnChanges:e.data.change?.columns,enableScreenshot:!0,showMenu:!1,ref:t}),W(si,{sx:{overflow:`auto`,bgcolor:`background.paper`,listStyle:`none`},children:l.map((e,t)=>W(tc,{node:e,schemaChanged:u.includes(e.id),selected:t===d,isDark:n,onSelect:()=>{f(t)}},e.id))})]})}return W(U,{})}const rc=On(nc);function ic({checkId:r,refreshCheckList:a}){let s=Un(),l=Rt(),{apiClient:u}=Fe(),{featureToggles:d,sessionId:f}=Se(),{setLatestSelectedCheckId:p}=I(),{cloudMode:m}=M(),h=Tn(),g=mi(),{basePath:_}=pe(),{setSqlQuery:v,setBaseSqlQuery:y,setCustomQueries:b,setPrimaryKeys:x}=R(),{successToast:S,failToast:C}=Vt(),[w,ee]=H(),[T]=H(),[E,D]=H(!1),[O,te]=H(!1),[ne,re]=H(null),ie=!!ne,{isLoading:k,error:ae,data:j}=wn({queryKey:A.check(r),queryFn:async()=>c(r,u),refetchOnMount:!0}),oe=w??j?.last_run?.run_id,{run:se,error:ce}=xt(oe),le=w?!se||se.status===`Running`:se?.status===`Running`,N=j?.type?z(j.type):void 0,ue;N&&(ue=N.RunResultView);let de=j?.is_preset??!1,P=Pn(null),{mutate:fe}=Cn({mutationFn:e=>o(r,e,u),onSuccess:async()=>{await h.invalidateQueries({queryKey:A.check(r)}),await h.invalidateQueries({queryKey:A.checks()})}}),{mutate:me}=Cn({mutationFn:()=>n(r,u),onSuccess:async()=>{p(``),await h.invalidateQueries({queryKey:A.checks()}),g.push(`${_}/checks`)}}),{mutate:he,isPending:ge}=Cn({mutationFn:async()=>{if(!j)throw Error(`Check not found`);return await t(r,u)},onSuccess:async()=>{S(`Check marked as preset successfully`),await h.invalidateQueries({queryKey:A.check(r)})},onError:e=>{C(`Failed to mark check as preset`,e)}}),_e=B(async()=>{j?.type&&(ee((await e(r,{nowait:!0},u)).run_id),await h.invalidateQueries({queryKey:A.check(r)}),a&&a())},[j,r,h,a,u]),ve=B(async()=>{if(D(!0),oe)return await i(oe,u)},[oe,u]),ye=async()=>{if(!j)return;let e=ac(j);if(!window.isSecureContext){C(`Failed to copy the check to clipboard`,Error(`Copy to clipboard is available only in secure contexts (HTTPS)`));return}try{await navigator.clipboard.writeText(e),S(`Copied the check to the clipboard`)}catch(e){C(`Failed to copy the check to clipboard`,e)}},be=B(()=>{let e=j?.is_checked;fe({is_checked:!e}),e||Ht.create({title:`Marked as approved`,type:`success`,duration:2e3})},[j?.is_checked,fe]),xe=e=>{fe({view_options:e})},Ce=e=>{fe({description:e})},we=e=>{re(e.currentTarget)},F=()=>{re(null)},De=B(()=>{if(!j)return;let e=j.params;v(e?.sql_template||``),`base_sql_template`in e&&e.base_sql_template?(y(e.base_sql_template),b(!0)):(y(``),b(!1)),`primary_keys`in e&&e.primary_keys?x(e.primary_keys):x(void 0),g.push(`${_}/query`)},[j,g,_,v,y,b,x]),[Oe,ke]=H(`result`),{ref:je,onCopyToClipboard:Me,onMouseEnter:Ne,onMouseLeave:Pe}=ht(),Ie=Xe({name:j?.name??``,description:j?.description??``,type:j?.type??``,params:j?.params,viewOptions:j?.view_options});if(k)return W(K,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`},children:`Loading`});if(ae)return G(K,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`},children:[`Error: `,W(`span`,{className:`no-track-pii-safe`,children:ae.message})]});if(!j)return W(kt,{minSize:100,sizes:[30,70],style:{height:`100%`,width:`100%`,maxHeight:`100%`},children:W(K,{style:{contain:`strict`},sx:{display:`flex`,flexDirection:`column`},children:W(K,{sx:{display:`flex`,p:`0px 16px`,alignItems:`center`,height:40},children:W(Et,{name:`Check not found`,disabled:!0})})})});let Le=se?.run_at?ri(new Date(se.run_at),{addSuffix:!0}):null,Re=N?.icon;return G(Ki,{spacing:0,container:!0,sx:{height:`100%`,width:`100%`},children:[W(Ki,{size:{xs:12,md:m?9:12},sx:{height:`100%`},children:G(kt,{minSize:100,sizes:[40,60],style:{height:`100%`,width:`100%`,maxHeight:`100%`},children:[W(K,{sx:{height:`100%`,contain:`strict`,display:`flex`,flexDirection:`row`},children:G(K,{sx:{flex:1,height:`100%`,display:`flex`,flexDirection:`column`,overflow:`hidden`,minWidth:0},children:[G(K,{sx:{display:`flex`,p:`0px 16px`,alignItems:`center`,height:40,borderBottom:`2px solid`,borderColor:l?`grey.700`:`grey.300`},children:[Re&&W(K,{component:Re,sx:{fontSize:20,mr:1,flexShrink:0}}),W(Et,{name:j.name,onNameChange:e=>{fe({name:e})}}),W(K,{sx:{flexGrow:1}}),G(J,{direction:`row`,spacing:2,sx:{mr:`10px`},children:[de&&W(Z,{title:`This is a preset check`,children:W(K,{display:`flex`,alignItems:`center`,justifyContent:`center`,children:W(ji,{size:`1rem`,color:s.palette.iochmara.dark})})}),j?.actor_type&&!j.is_preset&&Te[j.actor_type]&&W(wr,{label:Te[j.actor_type].label,size:`small`,sx:{height:20,fontSize:`0.65rem`,fontWeight:500,backgroundColor:Te[j.actor_type].bg,color:Te[j.actor_type].color,flexShrink:0,"& .MuiChip-label":{px:.75}}}),W(X,{size:`small`,onClick:we,children:W($r,{})}),G(qr,{anchorEl:ne,open:ie,onClose:F,children:[f&&G(Q,{onClick:()=>{he(),F()},disabled:ge||de,children:[W(yi,{children:W(Kn,{})}),W(bi,{children:`Mark as Preset Check`})]}),G(Q,{onClick:()=>{te(!0),F()},children:[W(yi,{children:W(Ji,{})}),W(bi,{children:`Get Preset Check Template`})]}),G(Q,{onClick:()=>{ye(),F()},children:[W(yi,{children:W(ur,{})}),W(bi,{children:`Copy Markdown`})]}),W(Xn,{}),G(Q,{onClick:()=>{me(),F()},disabled:d.disableUpdateChecklist,sx:{color:`error.main`},children:[W(yi,{sx:{color:`error.main`},children:W(xr,{})}),W(bi,{children:`Delete`})]})]}),W(Z,{title:We({type:j.type,hasResult:!!se?.result,hasError:!!se?.error})?`Run the check first`:j.is_checked?`Remove approval`:`Mark as approved`,placement:`bottom-end`,children:W(q,{size:`small`,color:j.is_checked?`success`:`neutral`,variant:j.is_checked?`contained`:`outlined`,onClick:()=>{be()},disabled:We({type:j.type,hasResult:!!se?.result,hasError:!!se?.error})||d.disableUpdateChecklist,startIcon:j.is_checked?W(cr,{}):W(Yr,{style:{color:l?s.palette.grey[600]:s.palette.grey[400]}}),sx:{flex:`0 0 auto`,textTransform:`none`},children:j.is_checked?`Approved`:`Pending`})})]})]}),W(K,{sx:{flex:1,p:`8px 16px`,minHeight:100},children:W(Ue,{value:j.description,onChange:Ce,disabled:d.disableUpdateChecklist},j.check_id)})]})}),W(K,{style:{contain:`strict`},children:G(K,{sx:{height:`100%`,display:`flex`,flexDirection:`column`},children:[G(K,{sx:{display:`flex`,alignItems:`center`,borderBottom:1,borderColor:`divider`,height:50},children:[G(oi,{value:Oe,onChange:(e,t)=>ke(t),children:[W(ai,{label:`Result`,value:`result`,sx:{fontSize:`0.75rem`,textTransform:`none`}}),(j.type===`query`||j.type===`query_diff`)&&W(ai,{label:`Query`,value:`query`,sx:{fontSize:`0.75rem`,textTransform:`none`}})]}),Le&&W(Y,{variant:`caption`,color:`text.secondary`,sx:{ml:1,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,minWidth:0,display:`flex`,alignItems:`center`},children:Le}),W(K,{sx:{flexGrow:1}}),G(J,{direction:`row`,spacing:1,sx:{mr:`10px`},children:[(j.type===`query`||j.type===`query_base`||j.type===`query_diff`)&&W(Z,{title:`Open in Query tab`,children:W(q,{variant:`outlined`,color:`neutral`,size:`small`,onClick:De,disabled:d.disableDatabaseQuery,startIcon:W(vi,{}),sx:{textTransform:`none`},children:`Open Query`})}),ue&&W(Z,{title:`Rerun`,children:W(q,{variant:`outlined`,color:`neutral`,size:`small`,onClick:()=>_e(),disabled:d.disableDatabaseQuery||le,startIcon:W(yr,{}),sx:{textTransform:`none`},children:le?`Running...`:`Rerun`})}),W(q,{variant:`outlined`,color:`neutral`,disabled:We({type:j.type,hasResult:!!se?.result,hasError:!!se?.error})||Oe!==`result`,onMouseEnter:Ne,onMouseLeave:Pe,size:`small`,onClick:async()=>{j.type===`lineage_diff`?P.current?.copyToClipboard():await Me(),an({type:j.type,from:`check`})},startIcon:W(ur,{}),sx:{textTransform:`none`},children:`Copy to Clipboard`})]})]}),G(K,{sx:{flex:1,contain:`strict`},children:[Oe===`result`&&G(K,{sx:{width:`100%`,height:`100%`},children:[ue&&(j.last_run||oe?W(Ae,{ref:je,isRunning:le,isAborting:E,run:oe?se:j.last_run,error:ce,progress:T,RunResultView:ue,viewOptions:j.view_options,onViewOptionsChanged:xe,onCancel:ve,onExecuteRun:_e}):W(K,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:l?`grey.900`:`grey.50`,height:`100%`},children:G(J,{spacing:2,alignItems:`center`,children:[W(K,{children:`This action is part of the initial preset and has not been performed yet. Once performed, the result will be shown here.`}),W(Zs,{display:d.mode===`metadata only`,children:W(q,{onClick:_e,variant:`contained`,size:`small`,disabled:d.disableDatabaseQuery,children:`Run Query`})})]})})),j.type===`schema_diff`&&W(rc,{check:j,ref:je},j.check_id),j.type===`lineage_diff`&&W(ec,{check:j,ref:P},j.check_id)]}),Oe===`query`&&(j.type===`query`||j.type===`query_diff`||j.type===`query_base`)&&W(K,{sx:{height:`100%`,width:`100%`},children:j.params.base_sql_template?W(ft,{value:j.params.sql_template||``,baseValue:j.params.base_sql_template??``,options:{readOnly:!0}}):W(Ee,{value:j.params.sql_template||``,options:{readOnly:!0}})})]})]})}),G(Fn,{open:O,onClose:()=>te(!1),maxWidth:`md`,fullWidth:!0,children:[W(Rn,{children:`Preset Check Template`}),G(Ln,{children:[G(Y,{variant:`subtitle2`,fontWeight:`bold`,sx:{mb:2},children:[`Please`,` `,W(Y,{component:`span`,sx:{cursor:`pointer`,"&:hover":{textDecoration:`underline`},color:`primary.main`},onClick:async()=>{await navigator.clipboard.writeText(Ie),S(`Copied the template to the clipboard`)},children:`copy`}),` `,`the following template and paste it into the`,` `,W(K,{component:`span`,sx:{px:.5,bgcolor:`error.light`,borderRadius:.5},children:`recce.yml`}),` `,`file.`]}),W(Je,{yamlTemplate:Ie})]}),W(In,{children:W(X,{size:`small`,onClick:()=>te(!1),sx:{position:`absolute`,top:8,right:8},children:W(qn,{})})})]})]})}),m&&W(Ki,{size:3,sx:{height:`100%`,overflow:`hidden`,flexShrink:0,display:{xs:`none`,md:`block`}},children:W(La,{checkId:r})})]})}function ac(e){return qi`
7
+ <details><summary>${Le({name:e.name,isChecked:e.is_checked})}</summary>
8
+
9
+ ${oc(e)}
10
+
11
+ </details>`}function oc(e){let t=Ne({description:e.description});if(e.type===`query`||e.type===`query_diff`){let n=e.params;return`${t}\n\n${ze({sql:n&&`sql_template`in n?n.sql_template:``})}`}return t}const sc=()=>{let e=Tn(),t=mi(),{apiClient:n}=Fe(),{basePath:r}=pe(),{mutate:i,isPending:a}=Cn({mutationFn:()=>v({select:`state:modified`},n),onSuccess:async n=>{await e.invalidateQueries({queryKey:A.checks()}),t.push(`${r}/checks/?id=${n.check_id}`)}});return W(Ze,{title:`No checks yet`,description:`Checks help you validate data quality and catch issues.`,icon:W(gi,{size:48}),actionText:`Create Schema Diff Check`,onAction:()=>{i()},isLoading:a,helperText:`The schema checks compare modified models between environments to detect changes, additions, or removals.`})},cc=({check:e,selected:t,onSelect:n,onApprovalChange:r})=>{let{featureToggles:i}=Se(),a=e.last_run?.run_id,{run:o}=xt(a),s=We({type:e.type,hasResult:!!o?.result,hasError:!!o?.error}),c=s||i.disableUpdateChecklist;return W(ct,{check:{id:e.check_id,name:e.name,type:e.type,isApproved:e.is_checked,runStatus:(()=>{if(o){if(o.error)return`error`;if(o.result)return`success`}})(),isPreset:e.is_preset,isOutdated:e.is_outdated,lastRunAt:e.last_run?.run_at,actorType:e.actor_type},isSelected:t,onClick:n,onApprovalChange:r,disableApproval:c,disabledApprovalTooltip:s?`Run the check first`:void 0})},lc=({checks:e,selectedItem:t,onCheckSelected:n,onChecksReordered:r})=>{let[i,a]=H(!1),[s,c]=H(!1),[l,u]=H(null),d=Tn(),{apiClient:f}=Fe(),{mutate:p}=Cn({mutationFn:({checkId:e,isChecked:t})=>o(e,{is_checked:t},f),onSuccess:async(e,{checkId:t})=>{await d.invalidateQueries({queryKey:A.check(t)}),await d.invalidateQueries({queryKey:A.checks()})}}),m=e=>{e.destination&&r(e.source.index,e.destination.index)},h=()=>c(!0),g=()=>{c(!1),u(null)},_=()=>{Ht.create({title:`Marked as approved`,type:`success`,duration:2e3})},v=(e,t)=>{t?localStorage.getItem(`bypassMarkAsApprovedWarning`)===`true`?(p({checkId:e,isChecked:!0}),_()):(u(e),h()):p({checkId:e,isChecked:!1})};return G(U,{children:[W(Yi,{onDragEnd:m,children:W(Zi,{droppableId:`checklist`,children:r=>G(J,{...r.droppableProps,ref:r.innerRef,className:`no-track-pii-safe`,sx:{width:`100%`,flex:1,overflow:`auto`},spacing:0,children:[e.map((e,r)=>W(Xi,{draggableId:e.check_id,index:r,children:(r,i)=>{let a=r.draggableProps.style;if(i.isDragging&&a&&`left`in a){let e={x:0,y:80};a={...a,left:a.left-e.x,top:a.top-e.y}}return W(K,{ref:r.innerRef,...r.draggableProps,...r.dragHandleProps,style:a,sx:{width:`100%`},borderBottom:`1px solid`,borderColor:`divider`,children:W(cc,{check:e,selected:e.check_id===t,onSelect:n,onApprovalChange:v},e.check_id)})}},e.check_id)),r.placeholder]})})}),G(Fn,{open:s,onClose:g,maxWidth:`xs`,fullWidth:!0,children:[G(Rn,{sx:{display:`flex`,alignItems:`center`},children:[`Mark as Approved?`,W(K,{sx:{flexGrow:1}}),W(X,{size:`small`,onClick:g,children:W(qn,{})})]}),W(Xn,{}),G(Ln,{sx:{fontSize:`0.875rem`},children:[W(Y,{children:`Please ensure you have reviewed the contents of this check before marking it as approved.`}),W(Ur,{control:W(Hr,{checked:i,onChange:e=>{a(e.target.checked)},size:`small`}),label:W(Y,{sx:{fontWeight:`bold`,pt:`8px`},children:`Don't show this again`})})]}),W(Xn,{}),G(In,{sx:{gap:0},children:[W(q,{variant:`outlined`,size:`small`,onClick:g,children:`Cancel`}),W(q,{color:`iochmara`,variant:`contained`,size:`small`,onClick:()=>{l&&(p({checkId:l,isChecked:!0}),i&&localStorage.setItem(`bypassMarkAsApprovedWarning`,`true`),_(),g(),u(null))},children:`Mark as approved`})]})]})]})},uc=()=>{let e=Un().palette.mode===`dark`?`grey.700`:`grey.300`,t=mi(),n=hi().get(`id`),{latestSelectedCheckId:r,setLatestSelectedCheckId:i}=I(),a=Tn(),{apiClient:o}=Fe(),{basePath:s}=pe(),c=n;jn(()=>{c&&i(c)},[c,i]);let{isLoading:l,error:u,data:d,status:f,refetch:p}=wn({queryKey:A.checks(),queryFn:()=>x(o),refetchOnMount:!0}),m=B(e=>{t.push(`${s}/checks/?id=${e}`)},[t.push,s]),[h,g]=H(d??[]),[_,v]=H(d);d!==_&&(v(d),g(d??[]));let{mutate:y}=Cn({mutationFn:e=>b(e,o),onSuccess:async()=>{await a.invalidateQueries({queryKey:A.checks()})}}),S=B((e,t)=>{let n=[...h],[r]=n.splice(e,1);n.splice(t,0,r),y({source:e,destination:t}),g(n)},[h,y]),C=V(()=>!!(c&&d?.some(e=>e.check_id===c)),[c,d]);return jn(()=>{f!==`success`||d.length===0||C||(r&&d.some(e=>e.check_id===r)?t.replace(`${s}/checks/?id=${r}`):t.replace(`${s}/checks/?id=${d[0].check_id}`))},[f,C,d,r,t.replace,s]),l?null:u?G(K,{children:[`Error: `,W(`span`,{className:`no-track-pii-safe`,children:u.message})]}):d?.length?G(mt,{style:{height:`100%`},minSize:50,sizes:[20,80],children:[W(K,{sx:{height:`100%`},style:{contain:`size`},children:G(J,{sx:{height:`100%`,alignItems:`stretch`},style:{contain:`strict`},spacing:0,children:[W(K,{sx:{display:`flex`,justifyContent:`flex-end`,p:`0px 10px`},children:W(Qs,{checksOnly:!0})}),W(Xn,{}),W(lc,{checks:h,selectedItem:c,onCheckSelected:m,onChecksReordered:S})]})}),W(K,{sx:{height:`100%`},children:C&&c&&W(ic,{checkId:c,refreshCheckList:p},c)})]}):G(mt,{style:{height:`100%`},minSize:50,sizes:[20,80],children:[W(K,{sx:{borderRight:`1px solid`,borderRightColor:e,height:`100%`},style:{contain:`size`},children:G(J,{sx:{height:`100%`,alignItems:`stretch`},style:{contain:`strict`},spacing:0,children:[W(K,{sx:{display:`flex`,justifyContent:`flex-end`,p:`0px 10px`},children:W(Qs,{checksOnly:!0})}),W(Xn,{}),W(K,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:W(K,{sx:{textAlign:`center`,color:`grey.500`},children:`No checks`})})]})}),W(K,{children:W(K,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:W(sc,{})})})]})},dc=()=>G(mt,{style:{height:`100%`},minSize:50,sizes:[20,80],children:[W(K,{sx:{borderRight:`1px solid`,borderRightColor:Un().palette.mode===`dark`?`grey.700`:`grey.300`,height:`100%`},style:{contain:`size`},children:W(K,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:W(Zn,{size:20})})}),W(K,{children:W(K,{sx:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:W(Zn,{size:20})})})]}),fc={added:[`Model Added`,`Added resource`],removed:[`Model Removed`,`Removed resource`],modified:[`Model Modified`,`Modified resource`],col_added:[`Column Added`,`Added column`],col_removed:[`Column Removed`,`Removed column`],col_changed:[`Column Modified`,`Modified column`],folder_changed:[`Modified`,`Modified folder`]};function pc(e){let t=String(we(`colors.green.solid`)),n=String(we(`colors.red.solid`)),r=String(we(`colors.amber.emphasized`));return e===`added`?{color:t,icon:jt}:e===`removed`?{color:n,icon:Pt}:e===`modified`?{color:r,icon:rt}:e===`col_added`?{color:t,icon:jt}:e===`col_removed`?{color:n,icon:Pt}:e===`col_changed`?{color:r,icon:rt}:e===`folder_changed`?{color:r,icon:Ft}:{color:`inherit`,icon:void 0}}function mc(e,t){let n=0,r=0,i=0;return!e&&!t?{adds:n,removes:r,modifies:i}:(t&&Object.keys(t.columns??{}).forEach(t=>{e?.columns?.[t]||n++}),e&&Object.keys(e.columns??{}).forEach(e=>{t?.columns?.[e]||r++}),t&&e&&Object.keys(t.columns??{}).forEach(n=>{e.columns&&t.columns?.[n]&&e.columns[n]&&e.columns[n].type!==t.columns[n].type&&i++}),{adds:n,removes:r,modifies:i})}function hc(e){let t=e.modifiedSet,n=0,r=0,i=0,a=0,o=0,s=0;return t.forEach(t=>{e.nodes[t].data.changeStatus===`added`?n++:e.nodes[t].data.changeStatus===`removed`?r++:e.nodes[t].data.changeStatus===`modified`&&i++;let c=e.nodes[t].data.data.base,l=e.nodes[t].data.data.current,u=mc(c,l);a+=u.adds,o+=u.removes,s+=u.modifies}),{adds:n,removes:r,modifies:i,col_added:a,col_removed:o,col_changed:s}}function gc({name:e,value:t,tip:n}){return G(J,{alignItems:`stretch`,children:[G(Y,{sx:{fontSize:`0.875rem`,color:`grey.600`},children:[e,n&&W(Z,{title:n,children:W(K,{sx:{display:`inline-block`},children:W(K,{component:Ci,sx:{mx:`2px`,fontSize:12,verticalAlign:`middle`}})})})]}),t]})}function _c({changeStatus:e,value:t}){let[n]=e?fc[e]:[``],{icon:r,color:i}=pc(e);return G(J,{alignItems:`stretch`,children:[G(J,{direction:`row`,alignItems:`center`,sx:{fontSize:`0.875rem`,color:`grey.600`},children:[r&&W(K,{component:r,sx:{mr:`5px`,color:i,fontSize:`1rem`}}),n]}),W(Y,{sx:{fontSize:`0.875rem`},children:t})]})}function vc({lineageGraph:e}){let{adds:t,removes:n,modifies:r,col_added:i,col_removed:a,col_changed:o}=hc(e);return G(Ki,{container:!0,sx:{mb:`10px`,borderTop:`1px solid`,borderColor:`divider`,p:`2.5vw`},children:[W(Ki,{size:6,sx:{borderColor:`divider`},children:W(gc,{name:`Code Changes`,value:G(Ki,{container:!0,sx:{width:`100%`},children:[W(Ki,{size:4,children:W(_c,{changeStatus:`added`,value:t})}),W(Ki,{size:4,children:W(_c,{changeStatus:`removed`,value:n})}),W(Ki,{size:4,children:W(_c,{changeStatus:`modified`,value:r})})]})})}),W(Ki,{size:6,sx:{borderLeft:`1px solid`,borderLeftColor:`divider`,pl:`12px`},children:W(gc,{name:`Column Changes`,value:G(Ki,{container:!0,sx:{width:`100%`},children:[W(Ki,{size:4,children:W(_c,{changeStatus:`col_added`,value:i})}),W(Ki,{size:4,children:W(_c,{changeStatus:`col_removed`,value:a})}),W(Ki,{size:4,children:W(_c,{changeStatus:`col_changed`,value:o})})]})})})]})}function yc({node:e,...t}){return G(Qi,{sx:{maxWidth:500},children:[W(ea,{title:W(Y,{sx:{fontSize:18,fontWeight:`bold`},children:t.title}),subheader:G(J,{direction:`row`,spacing:`8px`,sx:{p:`16px`},children:[W(St,{resourceType:e.data.resourceType,materialized:e.data.data.current?.config?.materialized??e.data.data.base?.config?.materialized}),e.data.resourceType===`model`&&W(No,{node:e})]})}),W($i,{children:W(K,{sx:{display:`flex`},children:W(Oo,{base:e.data.data.base,current:e.data.data.current,columnChanges:e.data.change?.columns})})})]})}function bc(e){let t=[],n=e.nodes;return e.modifiedSet.forEach(e=>{let r=n[e],i=zt(Object.keys(r.data.data.base?.columns??{}),Object.keys(r.data.data.current?.columns??{}));!Object.values(i).every(e=>e===void 0)&&r.data.data.base&&r.data.data.current&&t.push(r)}),t}function xc({lineageGraph:e}){let[t,n]=H([]);return jn(()=>{n(bc(e))},[e]),G(U,{children:[W(K,{sx:{width:`100%`,pb:`10px`,mb:`20px`,mt:`20px`},children:W(Y,{variant:`h5`,sx:{fontSize:24},children:`Schema Summary`})}),W(K,{sx:{width:`100%`,pb:`10px`,mb:`20px`},children:t.length===0?W(Y,{sx:{fontSize:18,color:`grey.600`},children:`No schema changes detected.`}):W(K,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(400px, 1fr))`,gap:`2vw`,p:`2.5vw`,width:`100%`,bgcolor:`lightgray`},children:t.map(e=>W(yc,{title:e.data.name,node:e},e.id))})})]})}function Sc({checks:e,isLoading:t,error:n,selectedCheckId:r,onCheckSelect:i,onApprovalChange:a,onAction:o,onReorder:s,onDescriptionChange:c,onNameChange:l,onCreateCheck:u,getCheckTabs:d,getPrimaryActions:f,getSecondaryActions:p,disableApproval:m=!1,disabledApprovalTooltip:h,height:g=`100%`,listPaneSize:_=30,minListSize:v=200,maxListSize:y=500,listTitle:b,className:x}){let S=Ie(),C=e??S.checks,w=t===void 0?S.isLoading:t,ee=n??S.error,T=r??S.selectedCheckId,E=i??S.onSelectCheck,D=V(()=>C.map(e=>({id:e.check_id,name:e.name,type:e.type,description:e.description,isApproved:e.is_checked})),[C]),O=V(()=>C.find(e=>e.check_id===T),[C,T]),te=B(e=>{E?.(e)},[E]),ne=B((e,t)=>{o?.(e,t)},[o]),re=B(e=>{T&&c?.(T,e)},[T,c]),ie=B(e=>{T&&l?.(T,e)},[T,l]);if(w)return W(K,{className:x,sx:{width:`100%`,height:g,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W(Zn,{})});if(ee)return W(K,{className:x,sx:{width:`100%`,height:g,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W(Y,{color:`error`,children:ee})});if(C.length===0)return W(K,{className:x,sx:{width:`100%`,height:g,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W(Ze,{title:`No checks yet`,description:`Create your first check to start validating your data.`,actionText:`Create Check`,onAction:u})});let k=O?d?.(O):void 0,A=O?f?.(O):void 0,ae=O?p?.(O):void 0;return W(K,{className:x,sx:{width:`100%`,height:g},children:G(st,{direction:`horizontal`,sizes:[_,100-_],minSizes:[v,200],maxSizes:[y,1/0],children:[W(K,{sx:{height:`100%`,overflow:`auto`},children:W(Qe,{checks:D,selectedId:T,onCheckSelect:te,onApprovalChange:a,onReorder:s,disableApproval:m,disabledApprovalTooltip:h,title:b})}),W(K,{sx:{height:`100%`,overflow:`auto`},children:O?W($e,{checkId:O.check_id,name:O.name,type:O.type,description:O.description,isApproved:O.is_checked,tabs:k,primaryActions:A,secondaryActions:ae,onAction:ne,onDescriptionChange:re,onNameChange:ie}):W(K,{sx:{height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:W(Y,{color:`text.secondary`,children:`Select a check from the list to view details`})})})]})})}const Cc=kn(Sc);Cc.displayName=`ChecksView`;const wc=`0.2.0`;export{Ba as A,ko as C,_o as D,vo as E,na as F,Ra as M,oa as N,ho as O,ra as P,Oo as S,So as T,As as _,hc as a,Uo as b,fc as c,lc as d,sc as f,Ws as g,Ys as h,vc as i,za as j,Ha as k,dc as l,Xs as m,Cc as n,mc as o,ic as p,xc as r,pc as s,wc as t,uc as u,Ts as v,wo as w,To as x,ss as y};
12
+ //# sourceMappingURL=src-BPeVRx-t.js.map