@elaraai/e3-ui-components 1.0.83 → 1.0.85

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 (190) hide show
  1. package/README.md +113 -6
  2. package/dist/components/DataTaskPreview.d.ts +35 -1
  3. package/dist/components/DataTaskPreview.d.ts.map +1 -1
  4. package/dist/components/DatasetPreview.d.ts +16 -0
  5. package/dist/components/DatasetPreview.d.ts.map +1 -1
  6. package/dist/components/InputPreview.d.ts +12 -0
  7. package/dist/components/InputPreview.d.ts.map +1 -1
  8. package/dist/components/PagedDatasetPreview.d.ts +15 -0
  9. package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
  10. package/dist/components/TaskLogs.d.ts +19 -0
  11. package/dist/components/TaskLogs.d.ts.map +1 -1
  12. package/dist/components/TaskPreview.d.ts +24 -0
  13. package/dist/components/TaskPreview.d.ts.map +1 -1
  14. package/dist/components/UITaskPreview.d.ts +4 -1
  15. package/dist/components/UITaskPreview.d.ts.map +1 -1
  16. package/dist/components/VirtualizedLogViewer.d.ts +29 -1
  17. package/dist/components/VirtualizedLogViewer.d.ts.map +1 -1
  18. package/dist/components/controlled-search.d.ts +22 -0
  19. package/dist/components/controlled-search.d.ts.map +1 -0
  20. package/dist/components/preview-controls.d.ts +73 -0
  21. package/dist/components/preview-controls.d.ts.map +1 -0
  22. package/dist/diff/index.d.ts.map +1 -1
  23. package/dist/experiment/index.d.ts.map +1 -1
  24. package/dist/hooks/executions.d.ts +17 -0
  25. package/dist/hooks/executions.d.ts.map +1 -1
  26. package/dist/hooks/index.d.ts +1 -1
  27. package/dist/hooks/index.d.ts.map +1 -1
  28. package/dist/hooks/useDatasetValue.d.ts +19 -1
  29. package/dist/hooks/useDatasetValue.d.ts.map +1 -1
  30. package/dist/hooks/useTaskLogsHook.d.ts +67 -3
  31. package/dist/hooks/useTaskLogsHook.d.ts.map +1 -1
  32. package/dist/in-memory-call-7_3frW52.js +615 -0
  33. package/dist/in-memory-call-7_3frW52.js.map +1 -0
  34. package/dist/in-memory-call-_r5DJotS.cjs +614 -0
  35. package/dist/in-memory-call-_r5DJotS.cjs.map +1 -0
  36. package/dist/index.cjs +25860 -5731
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.ts +14 -2
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +28383 -8253
  41. package/dist/index.js.map +1 -1
  42. package/dist/platform/bind-runtime.d.ts +18 -3
  43. package/dist/platform/bind-runtime.d.ts.map +1 -1
  44. package/dist/platform/dataset-hooks.d.ts +15 -3
  45. package/dist/platform/dataset-hooks.d.ts.map +1 -1
  46. package/dist/platform/dataset-store.d.ts +35 -7
  47. package/dist/platform/dataset-store.d.ts.map +1 -1
  48. package/dist/platform/e3-config.d.ts +26 -2
  49. package/dist/platform/e3-config.d.ts.map +1 -1
  50. package/dist/platform/func-runtime.d.ts +11 -5
  51. package/dist/platform/func-runtime.d.ts.map +1 -1
  52. package/dist/platform/index.d.ts +2 -2
  53. package/dist/platform/index.d.ts.map +1 -1
  54. package/dist/platform/paged-runtime.d.ts +46 -9
  55. package/dist/platform/paged-runtime.d.ts.map +1 -1
  56. package/dist/platform/record-runtime.d.ts +45 -7
  57. package/dist/platform/record-runtime.d.ts.map +1 -1
  58. package/dist/platform/recovery.d.ts +44 -0
  59. package/dist/platform/recovery.d.ts.map +1 -0
  60. package/dist/platform/staged-store.d.ts +16 -0
  61. package/dist/platform/staged-store.d.ts.map +1 -1
  62. package/dist/platform/tracked-channel.d.ts +12 -0
  63. package/dist/platform/tracked-channel.d.ts.map +1 -1
  64. package/dist/query/about.d.ts +50 -0
  65. package/dist/query/about.d.ts.map +1 -0
  66. package/dist/query/autocomplete.d.ts +112 -0
  67. package/dist/query/autocomplete.d.ts.map +1 -0
  68. package/dist/query/builder.d.ts +29 -0
  69. package/dist/query/builder.d.ts.map +1 -0
  70. package/dist/query/calls.d.ts +46 -0
  71. package/dist/query/calls.d.ts.map +1 -0
  72. package/dist/query/datasets-tab.d.ts +52 -0
  73. package/dist/query/datasets-tab.d.ts.map +1 -0
  74. package/dist/query/downloads.d.ts +29 -0
  75. package/dist/query/downloads.d.ts.map +1 -0
  76. package/dist/query/drops.d.ts +28 -0
  77. package/dist/query/drops.d.ts.map +1 -0
  78. package/dist/query/foot.d.ts +22 -0
  79. package/dist/query/foot.d.ts.map +1 -0
  80. package/dist/query/hooks.d.ts +265 -0
  81. package/dist/query/hooks.d.ts.map +1 -0
  82. package/dist/query/in-memory-call.d.ts +150 -0
  83. package/dist/query/in-memory-call.d.ts.map +1 -0
  84. package/dist/query/jq-editor.d.ts +34 -0
  85. package/dist/query/jq-editor.d.ts.map +1 -0
  86. package/dist/query/library-tab.d.ts +33 -0
  87. package/dist/query/library-tab.d.ts.map +1 -0
  88. package/dist/query/library.d.ts +20 -0
  89. package/dist/query/library.d.ts.map +1 -0
  90. package/dist/query/model/cards.d.ts +179 -0
  91. package/dist/query/model/cards.d.ts.map +1 -0
  92. package/dist/query/model/index.d.ts +19 -0
  93. package/dist/query/model/index.d.ts.map +1 -0
  94. package/dist/query/model/messages.d.ts +1253 -0
  95. package/dist/query/model/messages.d.ts.map +1 -0
  96. package/dist/query/model/refs.d.ts +92 -0
  97. package/dist/query/model/refs.d.ts.map +1 -0
  98. package/dist/query/model/slots.d.ts +213 -0
  99. package/dist/query/model/slots.d.ts.map +1 -0
  100. package/dist/query/model/summaries.d.ts +104 -0
  101. package/dist/query/model/summaries.d.ts.map +1 -0
  102. package/dist/query/model/words.d.ts +331 -0
  103. package/dist/query/model/words.d.ts.map +1 -0
  104. package/dist/query/one-shot.d.ts +266 -0
  105. package/dist/query/one-shot.d.ts.map +1 -0
  106. package/dist/query/open-query.d.ts +214 -0
  107. package/dist/query/open-query.d.ts.map +1 -0
  108. package/dist/query/parts.d.ts +115 -0
  109. package/dist/query/parts.d.ts.map +1 -0
  110. package/dist/query/plan-popover.d.ts +22 -0
  111. package/dist/query/plan-popover.d.ts.map +1 -0
  112. package/dist/query/plan.d.ts +353 -0
  113. package/dist/query/plan.d.ts.map +1 -0
  114. package/dist/query/query-east.d.ts +21 -0
  115. package/dist/query/query-east.d.ts.map +1 -0
  116. package/dist/query/query-tab.d.ts +21 -0
  117. package/dist/query/query-tab.d.ts.map +1 -0
  118. package/dist/query/results-table.d.ts +153 -0
  119. package/dist/query/results-table.d.ts.map +1 -0
  120. package/dist/query/results.d.ts +137 -0
  121. package/dist/query/results.d.ts.map +1 -0
  122. package/dist/query/run.d.ts +199 -0
  123. package/dist/query/run.d.ts.map +1 -0
  124. package/dist/query/save-popover.d.ts +29 -0
  125. package/dist/query/save-popover.d.ts.map +1 -0
  126. package/dist/query/session.d.ts +409 -0
  127. package/dist/query/session.d.ts.map +1 -0
  128. package/dist/query/shape-line.d.ts +21 -0
  129. package/dist/query/shape-line.d.ts.map +1 -0
  130. package/dist/query/source.d.ts +21 -0
  131. package/dist/query/source.d.ts.map +1 -0
  132. package/dist/query/status-line.d.ts +48 -0
  133. package/dist/query/status-line.d.ts.map +1 -0
  134. package/dist/query/step-card.d.ts +30 -0
  135. package/dist/query/step-card.d.ts.map +1 -0
  136. package/dist/query/steps/check.d.ts +162 -0
  137. package/dist/query/steps/check.d.ts.map +1 -0
  138. package/dist/query/steps/count.d.ts +49 -0
  139. package/dist/query/steps/count.d.ts.map +1 -0
  140. package/dist/query/steps/edit.d.ts +108 -0
  141. package/dist/query/steps/edit.d.ts.map +1 -0
  142. package/dist/query/steps/fields.d.ts +101 -0
  143. package/dist/query/steps/fields.d.ts.map +1 -0
  144. package/dist/query/steps/index.d.ts +22 -0
  145. package/dist/query/steps/index.d.ts.map +1 -0
  146. package/dist/query/steps/jq.d.ts +188 -0
  147. package/dist/query/steps/jq.d.ts.map +1 -0
  148. package/dist/query/steps/parse.d.ts +38 -0
  149. package/dist/query/steps/parse.d.ts.map +1 -0
  150. package/dist/query/steps/print.d.ts +195 -0
  151. package/dist/query/steps/print.d.ts.map +1 -0
  152. package/dist/query/steps/shape.d.ts +90 -0
  153. package/dist/query/steps/shape.d.ts.map +1 -0
  154. package/dist/query/steps/values.d.ts +85 -0
  155. package/dist/query/steps/values.d.ts.map +1 -0
  156. package/dist/query/toolbar.d.ts +56 -0
  157. package/dist/query/toolbar.d.ts.map +1 -0
  158. package/dist/query/use-query-editor.d.ts +153 -0
  159. package/dist/query/use-query-editor.d.ts.map +1 -0
  160. package/dist/query/use-query-session.d.ts +55 -0
  161. package/dist/query/use-query-session.d.ts.map +1 -0
  162. package/dist/query/words.d.ts +60 -0
  163. package/dist/query/words.d.ts.map +1 -0
  164. package/dist/query.cjs +16 -0
  165. package/dist/query.cjs.map +1 -0
  166. package/dist/query.js +16 -0
  167. package/dist/query.js.map +1 -0
  168. package/dist/shared/name-popover.d.ts +38 -0
  169. package/dist/shared/name-popover.d.ts.map +1 -0
  170. package/dist/studio/builder.d.ts +20 -0
  171. package/dist/studio/builder.d.ts.map +1 -0
  172. package/dist/studio/inspector.d.ts +18 -0
  173. package/dist/studio/inspector.d.ts.map +1 -0
  174. package/dist/studio/library.d.ts +20 -0
  175. package/dist/studio/library.d.ts.map +1 -0
  176. package/dist/studio/messages.d.ts +318 -0
  177. package/dist/studio/messages.d.ts.map +1 -0
  178. package/dist/studio/open-page.d.ts +13 -0
  179. package/dist/studio/open-page.d.ts.map +1 -0
  180. package/dist/studio/page.d.ts +61 -0
  181. package/dist/studio/page.d.ts.map +1 -0
  182. package/dist/studio/palette.d.ts +41 -0
  183. package/dist/studio/palette.d.ts.map +1 -0
  184. package/dist/studio/publish.d.ts +21 -0
  185. package/dist/studio/publish.d.ts.map +1 -0
  186. package/dist/studio/save-template.d.ts +18 -0
  187. package/dist/studio/save-template.d.ts.map +1 -0
  188. package/dist/studio/studio-east.d.ts +45 -0
  189. package/dist/studio/studio-east.d.ts.map +1 -0
  190. package/package.json +19 -14
@@ -0,0 +1,22 @@
1
+ import { StepOption } from './model/slots.js';
2
+ import { StepKind } from './steps/values.js';
3
+ import { PartActions, PartStyles } from './parts.js';
4
+ /** Props of {@link QueryFoot}. */
5
+ export interface QueryFootProps {
6
+ /** The Quick add buttons, each saying whether its step fits. */
7
+ readonly options: readonly StepOption[];
8
+ /** The parts' styles, and the words. */
9
+ readonly ps: PartStyles;
10
+ /** What "Add a step at the end" asks: the add-step list, hanging from it. */
11
+ readonly onSlot: PartActions["onSlot"];
12
+ /** A Quick add button pressed: its step, added at the end. */
13
+ readonly onQuick: (kind: StepKind) => void;
14
+ }
15
+ /**
16
+ * Renders the foot — see the module docs.
17
+ *
18
+ * @param props - The Quick add buttons, and what the foot asks ({@link QueryFootProps})
19
+ * @returns The foot
20
+ */
21
+ export declare const QueryFoot: import('react').NamedExoticComponent<QueryFootProps>;
22
+ //# sourceMappingURL=foot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foot.d.ts","sourceRoot":"","sources":["../../src/query/foot.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAgB,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7E,kCAAkC;AAClC,MAAM,WAAW,cAAc;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvC,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC9C;AAKD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,sDA2BpB,CAAC"}
@@ -0,0 +1,265 @@
1
+ import { ReactNode } from 'react';
2
+ import { ValueTypeOf } from '@elaraai/east';
3
+ import { DataSourceType, SavedQueryType } from '@elaraai/e3-ui/internal';
4
+ import { SplitCallAnswer } from '@elaraai/e3-api-client';
5
+ import { DatasetStatusDetail, ExecuteResult, OneShotRequest, SplitCallPlan, SplitCallProgress, SplitCallRequest, TreePath } from '@elaraai/e3-types';
6
+ import { E3Config } from '../platform/e3-config.js';
7
+ import { SummaryCache } from './model/summaries.js';
8
+ import { QueryWords } from './model/words.js';
9
+ import { QueryRoot } from './one-shot.js';
10
+ import { PlanOptions } from './plan.js';
11
+ /** A data source the builder is handed. */
12
+ export type DataSource = ValueTypeOf<typeof DataSourceType>;
13
+ /** A saved query, or a recent run of one. */
14
+ type SavedQuery = ValueTypeOf<typeof SavedQueryType>;
15
+ /**
16
+ * The root a builder's queries read: each bound data source as a root field,
17
+ * in the order given — or why it cannot be queried, in the builder's words.
18
+ *
19
+ * @remarks
20
+ * A `Data.bind` source is its dataset's path, a record `[records, name]`, and a
21
+ * `Data.bindPaged` source the path its handle was bound with, which the paged
22
+ * runtime that built it holds. A paged source read through one of a record's
23
+ * indexes is refused: its rows are the index's, not the record's a query reads.
24
+ *
25
+ * @param datasets - The data sources, as the payload holds them
26
+ * @param words - The words, for a refusal
27
+ * @returns The root, or the refusal
28
+ */
29
+ export declare function useQueryRoot(datasets: DataSource[], words: QueryWords): QueryRoot | string;
30
+ /**
31
+ * Makes a one-shot call: the request, answered by the call's result.
32
+ *
33
+ * @param request - The request — a query's or a summary's, platform-free
34
+ * @returns The result
35
+ */
36
+ export type QueryCall = (request: OneShotRequest) => Promise<ExecuteResult>;
37
+ /** Props of {@link QueryCallProvider}. */
38
+ export interface QueryCallProviderProps {
39
+ /** How a one-shot call is made for the subtree. */
40
+ call: QueryCall;
41
+ /** The subtree. */
42
+ children?: ReactNode;
43
+ }
44
+ /**
45
+ * Makes the query builder's one-shot calls with a host's own function — a
46
+ * test's, or a host that reaches e3 another way.
47
+ *
48
+ * @param props - The call and the subtree
49
+ * @returns The provider
50
+ */
51
+ export declare function QueryCallProvider({ call, children }: QueryCallProviderProps): import('react').FunctionComponentElement<import('react').ProviderProps<QueryCall | null>>;
52
+ /**
53
+ * How the builder makes a one-shot call: a {@link QueryCallProvider}'s, else
54
+ * e3-api-client's `oneShotExecute` against the `E3Provider`'s server and
55
+ * workspace, with its token and through its `fetch`.
56
+ *
57
+ * @returns The call, or `undefined` when there is no server to call
58
+ */
59
+ export declare function useQueryCall(): QueryCall | undefined;
60
+ /** What a split call is given: the signal that abandons it, and where its progress goes. */
61
+ export interface QuerySplitCallOptions {
62
+ /** Abandons the call: it stops polling, and rejects with the signal's reason. Its job runs on. */
63
+ readonly signal: AbortSignal;
64
+ /** Told the call's progress each time e3 reports it: its stage, and the units of it done of all. */
65
+ readonly onProgress: (progress: SplitCallProgress) => void;
66
+ }
67
+ /**
68
+ * Makes a split call: the request, answered once its job ends by the call's
69
+ * result — read as a one-shot call's is — and the hash of its assembled
70
+ * output, which a re-keyed join's second call reads (#942).
71
+ *
72
+ * @param request - The request — a plan's, platform-free (`splitCallRequest`,
73
+ * `rekeyCallRequests`)
74
+ * @param options - The signal that abandons it, and where its progress goes
75
+ * @returns The call's result, and its assembled output's hash once its pieces
76
+ * ran (`null` before)
77
+ *
78
+ * @remarks
79
+ * It rejects with e3-api-client's `ApiError` or `AuthError` when the server
80
+ * refuses the call, with a `TypeError` when the server cannot be reached, as
81
+ * `fetch` does, and with any other error when e3 could not run it (a job that
82
+ * ended `failed`); and with the signal's reason once it is abandoned.
83
+ */
84
+ export type QuerySplitCall = (request: SplitCallRequest, options: QuerySplitCallOptions) => Promise<SplitCallAnswer>;
85
+ /**
86
+ * Plans a split call's pieces without running it: e3's explain, a job that
87
+ * plans them as the call's run plans them and runs no unit, so the count is
88
+ * the run's (#1132).
89
+ *
90
+ * @param request - The call, as its run sent it
91
+ * @param options - The signal that abandons it
92
+ * @returns How many pieces, the argument they are cut over, by its position,
93
+ * and what that argument weighs in the store
94
+ *
95
+ * @remarks
96
+ * It rejects as a split call does ({@link QuerySplitCall}), and with an
97
+ * `Error` naming what is wrong when e3 finds the call wrong.
98
+ */
99
+ export type QuerySplitExplain = (request: SplitCallRequest, options: {
100
+ readonly signal: AbortSignal;
101
+ }) => Promise<SplitCallPlan>;
102
+ /** Props of {@link QuerySplitCallProvider}. */
103
+ export interface QuerySplitCallProviderProps {
104
+ /** How a split call is made for the subtree. */
105
+ call: QuerySplitCall;
106
+ /**
107
+ * How the subtree's split calls' pieces are counted when a run answered
108
+ * before its call reported them (#1132): the in-memory call's `explain`,
109
+ * say. Without it, such a run's pieces go uncounted.
110
+ */
111
+ explain?: QuerySplitExplain;
112
+ /** The subtree. */
113
+ children?: ReactNode;
114
+ }
115
+ /**
116
+ * Makes the query builder's split calls with a host's own function — a
117
+ * test's (`createInMemorySplitCall`), or a host that reaches e3 another way —
118
+ * and counts their pieces with the host's explain, when it gives one.
119
+ *
120
+ * @param props - The call, its explain and the subtree
121
+ * @returns The provider
122
+ */
123
+ export declare function QuerySplitCallProvider({ call, explain, children }: QuerySplitCallProviderProps): import('react').FunctionComponentElement<import('react').ProviderProps<QuerySplitCall | null>>;
124
+ /**
125
+ * How the builder makes a split call: a {@link QuerySplitCallProvider}'s, else
126
+ * e3-api-client's `splitCall` against the `E3Provider`'s server and workspace,
127
+ * with its token and through its `fetch`, which launches the call, polls it —
128
+ * 100 ms apart at first, backing off to a second — and reports each progress
129
+ * it finds.
130
+ *
131
+ * @returns The call, or `undefined` when there is no server to call
132
+ */
133
+ export declare function useQuerySplitCall(): QuerySplitCall | undefined;
134
+ /**
135
+ * How the builder counts a split call's pieces when its run answered before
136
+ * e3 reported them (#1132): a {@link QuerySplitCallProvider}'s explain — a
137
+ * host's split calls are explained by the host, or not at all — else
138
+ * e3-api-client's `splitCallExplain` against the `E3Provider`'s server and
139
+ * workspace, with its token and through its `fetch`, which launches the
140
+ * explain and polls it until it has planned.
141
+ *
142
+ * @returns The explain, or `undefined` when there is none to make
143
+ */
144
+ export declare function useQuerySplitExplain(): QuerySplitExplain | undefined;
145
+ /** What e3's status says of a data source: how many rows it holds, its hash, and what it weighs. */
146
+ export interface SourceStatus {
147
+ /** How many elements a stored list or lookup table holds; `undefined` for a value that is not a collection, or not known. */
148
+ readonly rows: number | undefined;
149
+ /** The hash of its value; `undefined` when it has none, or it is not known. */
150
+ readonly hash: string | undefined;
151
+ /** What its value weighs in the store, in bytes — a collection's segments and its manifest; `undefined` when not known. */
152
+ readonly bytes: number | undefined;
153
+ }
154
+ /**
155
+ * Reads a data source's status: what a run weighs before it plans.
156
+ *
157
+ * @param path - The dataset's path, as the root holds it
158
+ * @returns Its status
159
+ */
160
+ export type QuerySourceStatus = (path: TreePath) => Promise<SourceStatus>;
161
+ /** Props of {@link QuerySourceStatusProvider}. */
162
+ export interface QuerySourceStatusProviderProps {
163
+ /** How a data source's status is read for the subtree. */
164
+ status: QuerySourceStatus;
165
+ /** The subtree. */
166
+ children?: ReactNode;
167
+ }
168
+ /**
169
+ * Reads the data sources' statuses with a host's own function — a test's, or
170
+ * a host's over datasets in memory (`createInMemorySourceStatus`).
171
+ *
172
+ * @param props - The status and the subtree
173
+ * @returns The provider
174
+ */
175
+ export declare function QuerySourceStatusProvider({ status, children }: QuerySourceStatusProviderProps): import('react').FunctionComponentElement<import('react').ProviderProps<QuerySourceStatus | null>>;
176
+ /** A data source's status query, as TanStack Query takes it: its key, and its function. */
177
+ export interface SourceStatusQuery {
178
+ /** Its key: the server, the repository, the workspace and the dataset's path. */
179
+ readonly queryKey: readonly unknown[];
180
+ /** Its function: e3-api-client's `datasetGetStatus`. */
181
+ readonly queryFn: () => Promise<DatasetStatusDetail>;
182
+ }
183
+ /**
184
+ * A data source's status query on e3, as TanStack Query takes it: the Datasets
185
+ * tab polls it, and a run reads it through the same cache before it plans.
186
+ *
187
+ * @param config - The server: its token, and the `fetch` its requests go through
188
+ * @param workspace - The workspace
189
+ * @param path - The dataset's path
190
+ * @returns The query's key, and its function: e3-api-client's `datasetGetStatus`
191
+ */
192
+ export declare function sourceStatusQuery(config: E3Config, workspace: string, path: TreePath): SourceStatusQuery;
193
+ /**
194
+ * A data source's status, as e3's dataset status gives it.
195
+ *
196
+ * @param detail - The dataset's status detail
197
+ * @returns Its rows, hash and stored bytes
198
+ */
199
+ export declare function sourceStatusOf(detail: DatasetStatusDetail): SourceStatus;
200
+ /**
201
+ * How the builder reads a data source's status: a
202
+ * {@link QuerySourceStatusProvider}'s, else e3's dataset status against the
203
+ * `E3Provider`'s server and workspace, through the TanStack Query cache the
204
+ * Datasets tab polls, a status read in the last 5 seconds serving again.
205
+ *
206
+ * @returns The status, or `undefined` when there is no server to ask
207
+ */
208
+ export declare function useQuerySourceStatus(): QuerySourceStatus | undefined;
209
+ /** Props of {@link QueryPlanOptionsProvider}. */
210
+ export interface QueryPlanOptionsProviderProps {
211
+ /**
212
+ * The most a dataset may weigh, in stored bytes, and still be read by one
213
+ * call: e3's smallest piece (`PIECE_SIZES.min`, 16 MiB) when omitted. A
214
+ * host over a server that cuts small pieces (`E3_TEST_PIECE_BYTES`) sets
215
+ * it small, so its runs split.
216
+ */
217
+ pieceBytes?: number;
218
+ /** The subtree. */
219
+ children?: ReactNode;
220
+ }
221
+ /**
222
+ * Sets how the query builder plans its runs for a subtree: the most a dataset
223
+ * may weigh and still be read by one call.
224
+ *
225
+ * @param props - The options and the subtree
226
+ * @returns The provider
227
+ */
228
+ export declare function QueryPlanOptionsProvider({ pieceBytes, children }: QueryPlanOptionsProviderProps): import('react').FunctionComponentElement<import('react').ProviderProps<PlanOptions>>;
229
+ /**
230
+ * How the builder plans its runs: a {@link QueryPlanOptionsProvider}'s options,
231
+ * else the defaults.
232
+ *
233
+ * @returns The options
234
+ */
235
+ export declare function useQueryPlanOptions(): PlanOptions;
236
+ /**
237
+ * The builder's summaries: #934's summary programs, each run as a one-shot
238
+ * call with small limits when a slot that needs it opens, and kept by prefix
239
+ * and the hashes of the datasets it read. A summary that fails leaves the
240
+ * slot's offers without values.
241
+ *
242
+ * @param root - The root, or why it cannot be queried
243
+ * @param call - How a one-shot call is made
244
+ * @returns The cache, and the latest hash of each data source a run has read
245
+ */
246
+ export declare function useQuerySummaries(root: QueryRoot | string, call: QueryCall | undefined): {
247
+ cache: SummaryCache;
248
+ hashes: ReadonlyMap<string, string>;
249
+ };
250
+ /** How many recent runs a viewer keeps. */
251
+ export declare const RECENT_RUNS = 10;
252
+ /**
253
+ * This viewer's recent runs, newest first, kept in the browser under the
254
+ * builder's key — each a saved query's form, printed as East text. A query run
255
+ * again moves to the front.
256
+ *
257
+ * @param key - The builder's recent-runs key (`queryKeys(id).recent`)
258
+ * @returns The runs, and `remember(run)`
259
+ */
260
+ export declare function useRecentQueries(key: string): {
261
+ recent: readonly SavedQuery[];
262
+ remember: (run: SavedQuery) => void;
263
+ };
264
+ export {};
265
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/query/hooks.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAA4E,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjH,OAAO,EAEH,KAAK,WAAW,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC7H,OAAO,EAEH,KAAK,mBAAmB,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,QAAQ,EACtJ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAyC,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEhG,OAAO,EAAkB,YAAY,EAAqC,MAAM,sBAAsB,CAAC;AACvG,OAAO,KAAK,EAAE,UAAU,EAAE,MAA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,CAAA;CAAE,CAepH"}
@@ -0,0 +1,150 @@
1
+ import { EastType } from '@elaraai/east';
2
+ import { TreePath } from '@elaraai/e3-types';
3
+ import { QueryCall, QuerySourceStatus, QuerySplitCall, QuerySplitExplain } from './hooks.js';
4
+ /**
5
+ * A dataset an in-memory call may read.
6
+ *
7
+ * @property path - Its path in the workspace, as a call's argument names it
8
+ * @property type - Its East type
9
+ * @property value - Its value
10
+ * @property hash - The hash a run pins it at; the SHA-256 of its beast2 bytes when omitted
11
+ * @property bytes - What it weighs in the store, as its status says; its beast2 bytes' length when omitted
12
+ */
13
+ export interface InMemoryDataset {
14
+ /** Its path in the workspace, as a call's argument names it. */
15
+ readonly path: TreePath;
16
+ /** Its East type. */
17
+ readonly type: EastType;
18
+ /** Its value. */
19
+ readonly value: unknown;
20
+ /** The hash a run pins it at; the SHA-256 of its beast2 bytes when omitted. */
21
+ readonly hash?: string;
22
+ /** What it weighs in the store, in bytes, as its status says; its beast2 bytes' length when omitted. A test weighs a small dataset as a large one with it. */
23
+ readonly bytes?: number;
24
+ }
25
+ /**
26
+ * Builds a one-shot call answered in memory, as e3 answers one: the request's
27
+ * body decoded from its IR and compiled with no platform function — a query's
28
+ * call is platform-free — then called with the value of each dataset its
29
+ * arguments name, each pinned at its hash.
30
+ *
31
+ * @param datasets - The datasets a call may read
32
+ * @returns The call
33
+ *
34
+ * @remarks
35
+ * - **Success**: the answer, beast2 at the body's output type, and each
36
+ * dataset read with its hash.
37
+ * - **Failed**: a body that raises an East error fails as a runner's run does —
38
+ * exit code 1, and on stderr `Error: <message>` with each place it was
39
+ * raised, so the builder places it in the jq.
40
+ * - **Invalid**: an argument naming no dataset here is refused as e3 refuses
41
+ * an unassigned one ("Dataset argument 0 is not assigned"), and an inline
42
+ * value as one this stand-in does not take.
43
+ * - **Too large**: an answer over the request's `maxResultBytes`.
44
+ *
45
+ * The time limit is not kept: a body runs to its end.
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * const call = createInMemoryQueryCall([
50
+ * { path: [variant("field", "inputs"), variant("field", "orders")], type: ArrayType(Order), value: orders },
51
+ * ]);
52
+ * return <QueryCallProvider call={call}>{surface}</QueryCallProvider>;
53
+ * ```
54
+ */
55
+ export declare function createInMemoryQueryCall(datasets: readonly InMemoryDataset[]): QueryCall;
56
+ /** Options for {@link createInMemorySplitCall}. */
57
+ export interface InMemorySplitCallOptions {
58
+ /**
59
+ * How many pieces the partitioned dataset is cut into, in order: as near
60
+ * equal runs of its rows as can be, some empty when there are more pieces
61
+ * than rows.
62
+ */
63
+ readonly pieces: number;
64
+ }
65
+ /**
66
+ * A split call answered in memory ({@link createInMemorySplitCall}), and its
67
+ * explain (#1132): what e3's explain of the same call answers, with no piece
68
+ * run.
69
+ */
70
+ export type InMemorySplitCall = QuerySplitCall & {
71
+ /** How many pieces a call cuts, the argument they are cut over and what it weighs. */
72
+ readonly explain: QuerySplitExplain;
73
+ };
74
+ /**
75
+ * Builds a split call answered in memory, run as e3 runs one: the request's
76
+ * programs decoded and compiled with no platform function — a plan's are
77
+ * platform-free — the partitioned dataset cut into a given number of pieces,
78
+ * each piece's program run with an `emit` that collects what it emits, the
79
+ * pieces' outputs assembled by the output kind, and the final function run
80
+ * once over the assembled output and the arguments.
81
+ *
82
+ * @param datasets - The datasets a call may read
83
+ * @param options - How many pieces the partitioned dataset is cut into
84
+ * @returns The call, and its `explain`
85
+ *
86
+ * @remarks
87
+ * Each output kind assembles as e3 assembles it (`e3-data-architecture.md`
88
+ * §3.7), a piece at a time and then across the pieces in input order:
89
+ * - `array`: each piece's rows, concatenated;
90
+ * - `set`: their union, in East's order;
91
+ * - `dict`: by key, a key emitted again folded with `merge(key, a, b)` in
92
+ * emission order — within a piece, then across the pieces; without `merge`,
93
+ * a key emitted twice fails, naming it;
94
+ * - `fold`: every value a piece emits folded with `combine`, starting from
95
+ * `zero`; then the pieces' partials folded the same way.
96
+ *
97
+ * Arguments partitioned together — dicts keyed alike (#942) — are cut at the
98
+ * same keys: the first key of each run of the one whose beast2 bytes weigh
99
+ * the most. The assembled output is kept by the SHA-256 of its beast2 bytes,
100
+ * which the answer gives, and a later call of this stand-in reads it by that
101
+ * hash as an `object` argument, as e3 reads an earlier call's output.
102
+ *
103
+ * With no `then`, the call's value is the assembled output. Its answer is as a
104
+ * one-shot call's: beast2 at the value's type with each dataset argument
105
+ * pinned at its hash, `failed` for an East error with its places on stderr,
106
+ * `invalid` for an argument naming nothing here — a dataset, or an object no
107
+ * call of this stand-in assembled — or for arguments that cannot be cut
108
+ * together, and `too_large` over the request's `maxResultBytes`. It reports
109
+ * each piece done, then the merge or the fold, to `onProgress`, yielding
110
+ * between pieces, and rejects with the signal's reason once abandoned. The
111
+ * time limit is not kept.
112
+ *
113
+ * Its `explain` answers what e3's explain of the same call does, and runs no
114
+ * piece (#1132): how many pieces the call cuts — `pieces`, whatever the data —
115
+ * the argument it cuts them over, by its position — the one partitioned, or of
116
+ * several, the one whose beast2 bytes weigh the most — and what that argument
117
+ * weighs: a dataset's weight as its status says it, else its beast2 bytes. It
118
+ * rejects with an `Error` what the call answers `invalid`, as e3-api-client's
119
+ * `splitCallExplain` does — "Split call explain refused: …" — reads an object
120
+ * argument an earlier call of this stand-in assembled, and rejects with the
121
+ * signal's reason once abandoned.
122
+ *
123
+ * @example
124
+ * ```tsx
125
+ * const split = createInMemorySplitCall([{ path: ORDERS, type: OrdersType, value: orders }], { pieces: 7 });
126
+ * return <QuerySplitCallProvider call={split} explain={split.explain}>{surface}</QuerySplitCallProvider>;
127
+ * ```
128
+ */
129
+ export declare function createInMemorySplitCall(datasets: readonly InMemoryDataset[], options: InMemorySplitCallOptions): InMemorySplitCall;
130
+ /**
131
+ * Builds a data source's status answered in memory: how many rows each
132
+ * dataset holds, its hash, and what it weighs — its beast2 bytes' length, or
133
+ * the weight a test gives it.
134
+ *
135
+ * @param datasets - The datasets
136
+ * @returns The status
137
+ *
138
+ * @remarks
139
+ * A list's, a set's or a lookup table's rows are its elements; any other
140
+ * value's are not counted. A path with nothing in memory is refused, as e3
141
+ * refuses a dataset it does not hold.
142
+ *
143
+ * @example
144
+ * ```tsx
145
+ * const status = createInMemorySourceStatus([{ path: ORDERS, type: OrdersType, value: orders }]);
146
+ * return <QuerySourceStatusProvider status={status}>{surface}</QuerySourceStatusProvider>;
147
+ * ```
148
+ */
149
+ export declare function createInMemorySourceStatus(datasets: readonly InMemoryDataset[]): QuerySourceStatus;
150
+ //# sourceMappingURL=in-memory-call.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-call.d.ts","sourceRoot":"","sources":["../../src/query/in-memory-call.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAGH,KAAK,QAAQ,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAEqF,KAAK,QAAQ,EACxG,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAElG;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,iBAAiB;IACjB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,8JAA8J;IAC9J,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAC3B;AAuDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,SAAS,CAwBvF;AAED,mDAAmD;AACnD,MAAM,WAAW,wBAAwB;IACrC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AA8FD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG;IAC7C,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACvC,CAAC;AAOF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,EAAE,OAAO,EAAE,wBAAwB,GAAG,iBAAiB,CA0IlI;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,iBAAiB,CAOlG"}
@@ -0,0 +1,34 @@
1
+ import { CheckJqResult } from '@elaraai/east';
2
+ import { SummaryCache } from './model/summaries.js';
3
+ import { QueryRoot } from './one-shot.js';
4
+ import { PartStyles } from './parts.js';
5
+ /** Props of {@link JqEditor}. */
6
+ export interface JqEditorProps {
7
+ /** The jq as typed. */
8
+ readonly text: string;
9
+ /** Its check: east's checker over the root. */
10
+ readonly checked: CheckJqResult;
11
+ /** The root: what completions offer, and what the text is read as steps over. */
12
+ readonly root: QueryRoot;
13
+ /** The builder's summaries: the values completions offer, where one is held. */
14
+ readonly summaries: {
15
+ readonly cache: SummaryCache;
16
+ readonly hashes: ReadonlyMap<string, string>;
17
+ };
18
+ /** The parts' styles, and the words. */
19
+ readonly ps: PartStyles;
20
+ /** Told each change of the text. */
21
+ readonly onText: (text: string) => void;
22
+ /** Told the focus left the editor: the jq typed, one gesture. */
23
+ readonly onLeave: () => void;
24
+ /** Told a fix taken: the text it makes, and its label — one gesture of its own. */
25
+ readonly onFix: (text: string, label: string) => void;
26
+ }
27
+ /**
28
+ * Renders the jq view's editor — see the module docs.
29
+ *
30
+ * @param props - The text and its check, the root, the summaries, the words and what it tells ({@link JqEditorProps})
31
+ * @returns The editor
32
+ */
33
+ export declare const JqEditor: import('react').NamedExoticComponent<JqEditorProps>;
34
+ //# sourceMappingURL=jq-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jq-editor.d.ts","sourceRoot":"","sources":["../../src/query/jq-editor.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAuCH,OAAO,EAEH,KAAK,aAAa,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,YAAY,CAAC;AAoMrD,iCAAiC;AACjC,MAAM,WAAW,aAAa;IAC1B,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;IACnG,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,qDAwWnB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { QueryRoot } from './one-shot.js';
2
+ import { QueryOpen } from './open-query.js';
3
+ import { PartStyles } from './parts.js';
4
+ import { SavedQueries, SavedQuery } from './session.js';
5
+ /** Props of {@link LibraryTab}. */
6
+ export interface LibraryTabProps {
7
+ /** The saved queries. */
8
+ readonly record: SavedQueries;
9
+ /** This viewer's recent runs, the most recent first. */
10
+ readonly recent: readonly SavedQuery[];
11
+ /** The root the builder's data sources make. */
12
+ readonly root: QueryRoot;
13
+ /** The open query. */
14
+ readonly open: QueryOpen;
15
+ /** Opens a saved query. */
16
+ readonly onOpenSaved: (name: string) => void;
17
+ /** Opens a recent run never saved, as a new query begun as it. */
18
+ readonly onOpenRun: (run: SavedQuery) => void;
19
+ /** The tab's library's id. */
20
+ readonly id: string;
21
+ /** The parts' styles, and the words. */
22
+ readonly ps: PartStyles;
23
+ /** Where the library keeps its state. */
24
+ readonly storageKey: string;
25
+ }
26
+ /**
27
+ * Renders the Library tab — see the module docs.
28
+ *
29
+ * @param props - The saved queries, the recent runs, the root, the open query and what a click does ({@link LibraryTabProps})
30
+ * @returns The tab's notice, and its library
31
+ */
32
+ export declare const LibraryTab: import('react').NamedExoticComponent<LibraryTabProps>;
33
+ //# sourceMappingURL=library-tab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library-tab.d.ts","sourceRoot":"","sources":["../../src/query/library-tab.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK7D,mCAAmC;AACnC,MAAM,WAAW,eAAe;IAC5B,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,2BAA2B;IAC3B,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kEAAkE;IAClE,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,yCAAyC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,uDA+FrB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ValueTypeOf } from '@elaraai/east';
2
+ import { QueryLibraryComponent } from '@elaraai/e3-ui/internal';
3
+ /** The renderer's payload, decoded. */
4
+ type QueryLibraryValue = ValueTypeOf<typeof QueryLibraryComponent.schema>;
5
+ /** Props of {@link EastChakraQueryLibrary}. */
6
+ export interface EastChakraQueryLibraryProps {
7
+ /** The payload, decoded. */
8
+ value: QueryLibraryValue;
9
+ /** The structural storage key. */
10
+ storageKey: string;
11
+ }
12
+ /**
13
+ * Renders the query library — see the module docs.
14
+ *
15
+ * @param props - The payload and its storage key
16
+ * @returns The query library
17
+ */
18
+ export declare const EastChakraQueryLibrary: import('react').NamedExoticComponent<EastChakraQueryLibraryProps>;
19
+ export {};
20
+ //# sourceMappingURL=library.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/query/library.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAiDH,OAAO,EACoG,KAAK,WAAW,EAC1H,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAsD,MAAM,yBAAyB,CAAC;AAmBpH,uCAAuC;AACvC,KAAK,iBAAiB,GAAG,WAAW,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AA6C1E,+CAA+C;AAC/C,MAAM,WAAW,2BAA2B;IACxC,4BAA4B;IAC5B,KAAK,EAAE,iBAAiB,CAAC;IACzB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;CACtB;AAsHD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,mEAgBiE,CAAC"}