@cratis/scene.engine 4.14.0 → 4.16.0
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.
- package/QueryBindingState.ts +43 -0
- package/QueryBindingTicket.ts +8 -0
- package/dist/cjs/QueryBindingState.js +38 -0
- package/dist/cjs/QueryBindingState.js.map +1 -0
- package/dist/cjs/editing/resolveEffectiveConfiguration.js +11 -0
- package/dist/cjs/editing/resolveEffectiveConfiguration.js.map +1 -1
- package/dist/cjs/editing/validateValue.js +17 -1
- package/dist/cjs/editing/validateValue.js.map +1 -1
- package/dist/cjs/forms/CommandFormLayoutKey.js +14 -0
- package/dist/cjs/forms/CommandFormLayoutKey.js.map +1 -0
- package/dist/cjs/forms/applyCommandFormLayoutKey.js +72 -0
- package/dist/cjs/forms/applyCommandFormLayoutKey.js.map +1 -0
- package/dist/cjs/forms/stackCommandFormLayout.js +37 -0
- package/dist/cjs/forms/stackCommandFormLayout.js.map +1 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/nestBindingScope.js +26 -0
- package/dist/cjs/nestBindingScope.js.map +1 -0
- package/dist/cjs/removeComponentOutputs.js +19 -0
- package/dist/cjs/removeComponentOutputs.js.map +1 -0
- package/dist/cjs/resolveArgumentSource.js +36 -0
- package/dist/cjs/resolveArgumentSource.js.map +1 -0
- package/dist/cjs/resolveBindingExpression.js +12 -8
- package/dist/cjs/resolveBindingExpression.js.map +1 -1
- package/dist/esm/QueryBindingState.d.ts +10 -0
- package/dist/esm/QueryBindingState.d.ts.map +1 -0
- package/dist/esm/QueryBindingState.js +36 -0
- package/dist/esm/QueryBindingState.js.map +1 -0
- package/dist/esm/QueryBindingTicket.d.ts +5 -0
- package/dist/esm/QueryBindingTicket.d.ts.map +1 -0
- package/dist/esm/QueryBindingTicket.js +2 -0
- package/dist/esm/QueryBindingTicket.js.map +1 -0
- package/dist/esm/editing/resolveEffectiveConfiguration.d.ts.map +1 -1
- package/dist/esm/editing/resolveEffectiveConfiguration.js +11 -0
- package/dist/esm/editing/resolveEffectiveConfiguration.js.map +1 -1
- package/dist/esm/editing/validateValue.d.ts.map +1 -1
- package/dist/esm/editing/validateValue.js +18 -2
- package/dist/esm/editing/validateValue.js.map +1 -1
- package/dist/esm/forms/CommandFormLayoutKey.d.ts +7 -0
- package/dist/esm/forms/CommandFormLayoutKey.d.ts.map +1 -0
- package/dist/esm/forms/CommandFormLayoutKey.js +12 -0
- package/dist/esm/forms/CommandFormLayoutKey.js.map +1 -0
- package/dist/esm/forms/applyCommandFormLayoutKey.d.ts +5 -0
- package/dist/esm/forms/applyCommandFormLayoutKey.d.ts.map +1 -0
- package/dist/esm/forms/applyCommandFormLayoutKey.js +70 -0
- package/dist/esm/forms/applyCommandFormLayoutKey.js.map +1 -0
- package/dist/esm/forms/index.d.ts +3 -0
- package/dist/esm/forms/index.d.ts.map +1 -1
- package/dist/esm/forms/index.js +3 -0
- package/dist/esm/forms/index.js.map +1 -1
- package/dist/esm/forms/stackCommandFormLayout.d.ts +3 -0
- package/dist/esm/forms/stackCommandFormLayout.d.ts.map +1 -0
- package/dist/esm/forms/stackCommandFormLayout.js +35 -0
- package/dist/esm/forms/stackCommandFormLayout.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/nestBindingScope.d.ts +3 -0
- package/dist/esm/nestBindingScope.d.ts.map +1 -0
- package/dist/esm/nestBindingScope.js +24 -0
- package/dist/esm/nestBindingScope.js.map +1 -0
- package/dist/esm/removeComponentOutputs.d.ts +3 -0
- package/dist/esm/removeComponentOutputs.d.ts.map +1 -0
- package/dist/esm/removeComponentOutputs.js +17 -0
- package/dist/esm/removeComponentOutputs.js.map +1 -0
- package/dist/esm/resolveArgumentSource.d.ts +4 -0
- package/dist/esm/resolveArgumentSource.d.ts.map +1 -0
- package/dist/esm/resolveArgumentSource.js +33 -0
- package/dist/esm/resolveArgumentSource.js.map +1 -0
- package/dist/esm/resolveBindingExpression.d.ts.map +1 -1
- package/dist/esm/resolveBindingExpression.js +12 -8
- package/dist/esm/resolveBindingExpression.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/editing/resolveEffectiveConfiguration.ts +11 -0
- package/editing/validateValue.ts +21 -1
- package/forms/CommandFormLayoutKey.ts +10 -0
- package/forms/applyCommandFormLayoutKey.ts +47 -0
- package/forms/index.ts +3 -0
- package/forms/stackCommandFormLayout.ts +22 -0
- package/index.ts +5 -0
- package/nestBindingScope.ts +19 -0
- package/package.json +3 -3
- package/removeComponentOutputs.ts +15 -0
- package/resolveArgumentSource.ts +33 -0
- package/resolveBindingExpression.ts +14 -7
|
@@ -10,4 +10,7 @@ export * from './preserveDirtyCommandValues';
|
|
|
10
10
|
export * from './resizeCommandFormColumn';
|
|
11
11
|
export * from './updateCommandFormFieldPlacement';
|
|
12
12
|
export * from './validateCommandFormLayout';
|
|
13
|
+
export * from './CommandFormLayoutKey';
|
|
14
|
+
export * from './applyCommandFormLayoutKey';
|
|
15
|
+
export * from './stackCommandFormLayout';
|
|
13
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../forms/index.ts"],"names":[],"mappings":"AAGA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../forms/index.ts"],"names":[],"mappings":"AAGA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC"}
|
package/dist/esm/forms/index.js
CHANGED
|
@@ -10,4 +10,7 @@ export * from './preserveDirtyCommandValues';
|
|
|
10
10
|
export * from './resizeCommandFormColumn';
|
|
11
11
|
export * from './updateCommandFormFieldPlacement';
|
|
12
12
|
export * from './validateCommandFormLayout';
|
|
13
|
+
export * from './CommandFormLayoutKey';
|
|
14
|
+
export * from './applyCommandFormLayoutKey';
|
|
15
|
+
export * from './stackCommandFormLayout';
|
|
13
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../forms/index.ts"],"names":[],"mappings":"AAGA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../forms/index.ts"],"names":[],"mappings":"AAGA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stackCommandFormLayout.d.ts","sourceRoot":"","sources":["../../../forms/stackCommandFormLayout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,qBAAqB,CAAC;AAQvE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAUnF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FormWidthUnit } from '@cratis/scene.model';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* The layout a command form uses at a compact width: one full-width column, every field on its own row,
|
|
7
|
+
* in reading order - row first, then column, then authored order. Spans and per-field widths are dropped
|
|
8
|
+
* because there is nothing to span. The authored layout is not changed, so the form returns to its columns
|
|
9
|
+
* at a regular width.
|
|
10
|
+
*/ function stackCommandFormLayout(layout) {
|
|
11
|
+
const ordered = layout.placements.map((placement, order)=>({
|
|
12
|
+
placement,
|
|
13
|
+
order
|
|
14
|
+
})).sort((left, right)=>left.placement.row - right.placement.row || left.placement.column - right.placement.column || left.order - right.order);
|
|
15
|
+
return {
|
|
16
|
+
...layout,
|
|
17
|
+
columns: [
|
|
18
|
+
{
|
|
19
|
+
index: 1,
|
|
20
|
+
width: {
|
|
21
|
+
unit: FormWidthUnit.Fraction,
|
|
22
|
+
value: 1
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
placements: ordered.map(({ placement }, index)=>({
|
|
27
|
+
field: placement.field,
|
|
28
|
+
row: index + 1,
|
|
29
|
+
column: 1
|
|
30
|
+
}))
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { stackCommandFormLayout };
|
|
35
|
+
//# sourceMappingURL=stackCommandFormLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stackCommandFormLayout.js","sources":["../../../forms/stackCommandFormLayout.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CommandFormLayout, FormWidthUnit } from '@cratis/scene.model';\n\n/**\n * The layout a command form uses at a compact width: one full-width column, every field on its own row,\n * in reading order - row first, then column, then authored order. Spans and per-field widths are dropped\n * because there is nothing to span. The authored layout is not changed, so the form returns to its columns\n * at a regular width.\n */\nexport function stackCommandFormLayout(layout: CommandFormLayout): CommandFormLayout {\n const ordered = layout.placements\n .map((placement, order) => ({ placement, order }))\n .sort((left, right) => left.placement.row - right.placement.row || left.placement.column - right.placement.column || left.order - right.order);\n\n return {\n ...layout,\n columns: [{ index: 1, width: { unit: FormWidthUnit.Fraction, value: 1 } }],\n placements: ordered.map(({ placement }, index) => ({ field: placement.field, row: index + 1, column: 1 })),\n };\n}\n"],"names":["stackCommandFormLayout","layout","ordered","placements","map","placement","order","sort","left","right","row","column","columns","index","width","unit","FormWidthUnit","Fraction","value","field"],"mappings":";;AAAA;AACA;AAIA;;;;;IAMO,SAASA,sBAAAA,CAAuBC,MAAyB,EAAA;IAC5D,MAAMC,OAAAA,GAAUD,OAAOE,UAAU,CAC5BC,GAAG,CAAC,CAACC,SAAAA,EAAWC,KAAAA,IAAW;AAAED,YAAAA,SAAAA;AAAWC,YAAAA;AAAM,SAAA,CAAA,CAAA,CAC9CC,IAAI,CAAC,CAACC,IAAAA,EAAMC,KAAAA,GAAUD,IAAAA,CAAKH,SAAS,CAACK,GAAG,GAAGD,KAAAA,CAAMJ,SAAS,CAACK,GAAG,IAAIF,IAAAA,CAAKH,SAAS,CAACM,MAAM,GAAGF,KAAAA,CAAMJ,SAAS,CAACM,MAAM,IAAIH,IAAAA,CAAKF,KAAK,GAAGG,MAAMH,KAAK,CAAA;IAEjJ,OAAO;AACH,QAAA,GAAGL,MAAM;QACTW,OAAAA,EAAS;AAAC,YAAA;gBAAEC,KAAAA,EAAO,CAAA;gBAAGC,KAAAA,EAAO;AAAEC,oBAAAA,IAAAA,EAAMC,cAAcC,QAAQ;oBAAEC,KAAAA,EAAO;AAAE;AAAE;AAAE,SAAA;QAC1Ef,UAAAA,EAAYD,OAAAA,CAAQE,GAAG,CAAC,CAAC,EAAEC,SAAS,EAAE,EAAEQ,KAAAA,IAAW;AAAEM,gBAAAA,KAAAA,EAAOd,UAAUc,KAAK;AAAET,gBAAAA,GAAAA,EAAKG,KAAAA,GAAQ,CAAA;gBAAGF,MAAAA,EAAQ;aAAE,CAAA;AAC3G,KAAA;AACJ;;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export * from './BindingResolver';
|
|
|
3
3
|
export * from './BindingScope';
|
|
4
4
|
export * from './BindingDiagnostic';
|
|
5
5
|
export * from './resolveBindingExpression';
|
|
6
|
+
export * from './nestBindingScope';
|
|
7
|
+
export * from './resolveArgumentSource';
|
|
8
|
+
export * from './removeComponentOutputs';
|
|
9
|
+
export * from './QueryBindingState';
|
|
10
|
+
export * from './QueryBindingTicket';
|
|
6
11
|
export * from './validateBindingExpression';
|
|
7
12
|
export * from './renderElement';
|
|
8
13
|
export * from './forms';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,WAAW,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { createBindingResolver, resolveBindingExpression } from './resolveBindingExpression.js';
|
|
2
|
+
export { nestBindingScope } from './nestBindingScope.js';
|
|
3
|
+
export { componentArgumentSourcePrefix, resolveArgumentSource } from './resolveArgumentSource.js';
|
|
4
|
+
export { removeComponentOutputs } from './removeComponentOutputs.js';
|
|
5
|
+
export { QueryBindingState } from './QueryBindingState.js';
|
|
2
6
|
export { validateBindingExpression } from './validateBindingExpression.js';
|
|
3
7
|
export { renderElement } from './renderElement.js';
|
|
4
8
|
export { CommandFormLayoutDiagnosticCode } from './forms/CommandFormLayoutDiagnosticCode.js';
|
|
@@ -11,6 +15,9 @@ export { preserveDirtyCommandValues } from './forms/preserveDirtyCommandValues.j
|
|
|
11
15
|
export { resizeCommandFormColumn } from './forms/resizeCommandFormColumn.js';
|
|
12
16
|
export { updateCommandFormFieldPlacement } from './forms/updateCommandFormFieldPlacement.js';
|
|
13
17
|
export { validateCommandFormLayout } from './forms/validateCommandFormLayout.js';
|
|
18
|
+
export { CommandFormLayoutKey } from './forms/CommandFormLayoutKey.js';
|
|
19
|
+
export { applyCommandFormLayoutKey } from './forms/applyCommandFormLayoutKey.js';
|
|
20
|
+
export { stackCommandFormLayout } from './forms/stackCommandFormLayout.js';
|
|
14
21
|
export { isContentControl, isExternalComponent, isItemsControl, isPanel } from './elementKind.js';
|
|
15
22
|
export { isCanvas, isDockPanel, isGrid, isStackPanel, isWrapPanel } from './panelKind.js';
|
|
16
23
|
export { isFlowColumn, isFlowContainer, isFlowGrid, isFlowLeaf, isFlowRow, isFlowSlotLeaf } from './flowNodeKind.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestBindingScope.d.ts","sourceRoot":"","sources":["../../nestBindingScope.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAS9C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,GAAG,YAAY,CAMzF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* The scope a nested template or region sees. A data context it declares replaces the inherited one - a
|
|
5
|
+
* detail region bound to the selected row reads that row, not the screen's - while query results and
|
|
6
|
+
* component outputs are inherited, with its own entries shadowing the parent's of the same name. A null
|
|
7
|
+
* data context inherits, as in the C# engine, which cannot tell null from absent. The parent scope is not
|
|
8
|
+
* changed.
|
|
9
|
+
*/ function nestBindingScope(parent, nested) {
|
|
10
|
+
return {
|
|
11
|
+
dataContext: nested.dataContext ?? parent.dataContext,
|
|
12
|
+
queryResults: {
|
|
13
|
+
...parent.queryResults ?? {},
|
|
14
|
+
...nested.queryResults ?? {}
|
|
15
|
+
},
|
|
16
|
+
componentOutputs: {
|
|
17
|
+
...parent.componentOutputs ?? {},
|
|
18
|
+
...nested.componentOutputs ?? {}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { nestBindingScope };
|
|
24
|
+
//# sourceMappingURL=nestBindingScope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestBindingScope.js","sources":["../../nestBindingScope.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingScope } from './BindingScope';\n\n/**\n * The scope a nested template or region sees. A data context it declares replaces the inherited one - a\n * detail region bound to the selected row reads that row, not the screen's - while query results and\n * component outputs are inherited, with its own entries shadowing the parent's of the same name. A null\n * data context inherits, as in the C# engine, which cannot tell null from absent. The parent scope is not\n * changed.\n */\nexport function nestBindingScope(parent: BindingScope, nested: BindingScope): BindingScope {\n return {\n dataContext: nested.dataContext ?? parent.dataContext,\n queryResults: { ...(parent.queryResults ?? {}), ...(nested.queryResults ?? {}) },\n componentOutputs: { ...(parent.componentOutputs ?? {}), ...(nested.componentOutputs ?? {}) },\n };\n}\n"],"names":["nestBindingScope","parent","nested","dataContext","queryResults","componentOutputs"],"mappings":"AAAA;AACA;AAIA;;;;;;AAMC,IACM,SAASA,gBAAAA,CAAiBC,MAAoB,EAAEC,MAAoB,EAAA;IACvE,OAAO;AACHC,QAAAA,WAAAA,EAAaD,MAAAA,CAAOC,WAAW,IAAIF,MAAAA,CAAOE,WAAW;QACrDC,YAAAA,EAAc;AAAE,YAAA,GAAIH,MAAAA,CAAOG,YAAY,IAAI,EAAE;AAAG,YAAA,GAAIF,MAAAA,CAAOE,YAAY,IAAI;AAAI,SAAA;QAC/EC,gBAAAA,EAAkB;AAAE,YAAA,GAAIJ,MAAAA,CAAOI,gBAAgB,IAAI,EAAE;AAAG,YAAA,GAAIH,MAAAA,CAAOG,gBAAgB,IAAI;AAAI;AAC/F,KAAA;AACJ;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeComponentOutputs.d.ts","sourceRoot":"","sources":["../../removeComponentOutputs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAO9C,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAI9F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* The scope after elements leave the tree - unmounted, deleted or renamed to a new id. Their output
|
|
5
|
+
* properties are removed, so a binding to them resolves as absent and validates as `unknownComponent`
|
|
6
|
+
* instead of reading a value from an element that no longer exists.
|
|
7
|
+
*/ function removeComponentOutputs(scope, elementIds) {
|
|
8
|
+
const removed = new Set(elementIds);
|
|
9
|
+
const componentOutputs = Object.fromEntries(Object.entries(scope.componentOutputs ?? {}).filter(([id])=>!removed.has(id)));
|
|
10
|
+
return {
|
|
11
|
+
...scope,
|
|
12
|
+
componentOutputs
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { removeComponentOutputs };
|
|
17
|
+
//# sourceMappingURL=removeComponentOutputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeComponentOutputs.js","sources":["../../removeComponentOutputs.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingScope } from './BindingScope';\n\n/**\n * The scope after elements leave the tree - unmounted, deleted or renamed to a new id. Their output\n * properties are removed, so a binding to them resolves as absent and validates as `unknownComponent`\n * instead of reading a value from an element that no longer exists.\n */\nexport function removeComponentOutputs(scope: BindingScope, elementIds: string[]): BindingScope {\n const removed = new Set(elementIds);\n const componentOutputs = Object.fromEntries(Object.entries(scope.componentOutputs ?? {}).filter(([id]) => !removed.has(id)));\n return { ...scope, componentOutputs };\n}\n"],"names":["removeComponentOutputs","scope","elementIds","removed","Set","componentOutputs","Object","fromEntries","entries","filter","id","has"],"mappings":"AAAA;AACA;AAIA;;;;AAIC,IACM,SAASA,sBAAAA,CAAuBC,KAAmB,EAAEC,UAAoB,EAAA;IAC5E,MAAMC,OAAAA,GAAU,IAAIC,GAAAA,CAAIF,UAAAA,CAAAA;IACxB,MAAMG,gBAAAA,GAAmBC,OAAOC,WAAW,CAACD,OAAOE,OAAO,CAACP,MAAMI,gBAAgB,IAAI,EAAC,CAAA,CAAGI,MAAM,CAAC,CAAC,CAACC,GAAG,GAAK,CAACP,OAAAA,CAAQQ,GAAG,CAACD,EAAAA,CAAAA,CAAAA,CAAAA;IACvH,OAAO;AAAE,QAAA,GAAGT,KAAK;AAAEI,QAAAA;AAAiB,KAAA;AACxC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveArgumentSource.d.ts","sourceRoot":"","sources":["../../resolveArgumentSource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,eAAO,MAAM,6BAA6B,eAAe,CAAC;AAa1D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAWlF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BindingSourceKind } from '@cratis/scene.model';
|
|
2
|
+
import { resolveBindingExpression } from './resolveBindingExpression.js';
|
|
3
|
+
|
|
4
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
5
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
6
|
+
/** The prefix of an argument source that reads another element's output. */ const componentArgumentSourcePrefix = 'component.';
|
|
7
|
+
/**
|
|
8
|
+
* Resolves where a command argument comes from, as an action's argument mapping writes it.
|
|
9
|
+
*
|
|
10
|
+
* `component.<id>.<output>` reads an output another element publishes - an input's `value`, a table's
|
|
11
|
+
* `selectedItem.id` - from the same output scope a `componentProperty` binding reads. Element ids may contain
|
|
12
|
+
* dots, so the longest id with outputs in scope wins: `component.order.lines.value` reads `value` of
|
|
13
|
+
* `order.lines` when that element exists. Any other source is a path in the data context. An empty source,
|
|
14
|
+
* or an element with no outputs in scope, resolves as absent.
|
|
15
|
+
*
|
|
16
|
+
* The C# engine (`ArgumentSources.Resolve`) behaves identically; both run `argument-source-fixtures.json`.
|
|
17
|
+
*/ function resolveArgumentSource(source, scope) {
|
|
18
|
+
if (!source) return undefined;
|
|
19
|
+
if (!source.startsWith(componentArgumentSourcePrefix)) return resolveBindingExpression({
|
|
20
|
+
path: source
|
|
21
|
+
}, scope);
|
|
22
|
+
const reference = source.substring(componentArgumentSourcePrefix.length);
|
|
23
|
+
const componentId = Object.keys(scope.componentOutputs ?? {}).filter((id)=>reference === id || reference.startsWith(`${id}.`)).sort((left, right)=>right.length - left.length)[0];
|
|
24
|
+
if (componentId === undefined) return undefined;
|
|
25
|
+
return resolveBindingExpression({
|
|
26
|
+
kind: BindingSourceKind.ComponentProperty,
|
|
27
|
+
componentId,
|
|
28
|
+
path: reference.substring(componentId.length + 1)
|
|
29
|
+
}, scope);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { componentArgumentSourcePrefix, resolveArgumentSource };
|
|
33
|
+
//# sourceMappingURL=resolveArgumentSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveArgumentSource.js","sources":["../../resolveArgumentSource.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingSourceKind } from '@cratis/scene.model';\nimport { BindingScope } from './BindingScope';\nimport { resolveBindingExpression } from './resolveBindingExpression';\n\n/** The prefix of an argument source that reads another element's output. */\nexport const componentArgumentSourcePrefix = 'component.';\n\n/**\n * Resolves where a command argument comes from, as an action's argument mapping writes it.\n *\n * `component.<id>.<output>` reads an output another element publishes - an input's `value`, a table's\n * `selectedItem.id` - from the same output scope a `componentProperty` binding reads. Element ids may contain\n * dots, so the longest id with outputs in scope wins: `component.order.lines.value` reads `value` of\n * `order.lines` when that element exists. Any other source is a path in the data context. An empty source,\n * or an element with no outputs in scope, resolves as absent.\n *\n * The C# engine (`ArgumentSources.Resolve`) behaves identically; both run `argument-source-fixtures.json`.\n */\nexport function resolveArgumentSource(source: string, scope: BindingScope): unknown {\n if (!source) return undefined;\n if (!source.startsWith(componentArgumentSourcePrefix)) return resolveBindingExpression({ path: source }, scope);\n\n const reference = source.substring(componentArgumentSourcePrefix.length);\n const componentId = Object.keys(scope.componentOutputs ?? {})\n .filter(id => reference === id || reference.startsWith(`${id}.`))\n .sort((left, right) => right.length - left.length)[0];\n if (componentId === undefined) return undefined;\n\n return resolveBindingExpression({ kind: BindingSourceKind.ComponentProperty, componentId, path: reference.substring(componentId.length + 1) }, scope);\n}\n"],"names":["componentArgumentSourcePrefix","resolveArgumentSource","source","scope","undefined","startsWith","resolveBindingExpression","path","reference","substring","length","componentId","Object","keys","componentOutputs","filter","id","sort","left","right","kind","BindingSourceKind","ComponentProperty"],"mappings":";;;AAAA;AACA;AAMA,6EACO,MAAMA,6BAAAA,GAAgC;AAE7C;;;;;;;;;;AAUC,IACM,SAASC,qBAAAA,CAAsBC,MAAc,EAAEC,KAAmB,EAAA;IACrE,IAAI,CAACD,QAAQ,OAAOE,SAAAA;AACpB,IAAA,IAAI,CAACF,MAAAA,CAAOG,UAAU,CAACL,6BAAAA,CAAAA,EAAgC,OAAOM,wBAAAA,CAAyB;QAAEC,IAAAA,EAAML;KAAO,EAAGC,KAAAA,CAAAA;AAEzG,IAAA,MAAMK,SAAAA,GAAYN,MAAAA,CAAOO,SAAS,CAACT,8BAA8BU,MAAM,CAAA;AACvE,IAAA,MAAMC,WAAAA,GAAcC,MAAAA,CAAOC,IAAI,CAACV,MAAMW,gBAAgB,IAAI,EAAC,CAAA,CACtDC,MAAM,CAACC,CAAAA,EAAAA,GAAMR,SAAAA,KAAcQ,MAAMR,SAAAA,CAAUH,UAAU,CAAC,CAAA,EAAGW,GAAG,CAAC,CAAC,CAAA,CAAA,CAC9DC,IAAI,CAAC,CAACC,IAAAA,EAAMC,KAAAA,GAAUA,KAAAA,CAAMT,MAAM,GAAGQ,IAAAA,CAAKR,MAAM,CAAC,CAAC,CAAA,CAAE;IACzD,IAAIC,WAAAA,KAAgBP,WAAW,OAAOA,SAAAA;AAEtC,IAAA,OAAOE,wBAAAA,CAAyB;AAAEc,QAAAA,IAAAA,EAAMC,kBAAkBC,iBAAiB;AAAEX,QAAAA,WAAAA;AAAaJ,QAAAA,IAAAA,EAAMC,SAAAA,CAAUC,SAAS,CAACE,WAAAA,CAAYD,MAAM,GAAG,CAAA;KAAG,EAAGP,KAAAA,CAAAA;AACnJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBindingExpression.d.ts","sourceRoot":"","sources":["../../resolveBindingExpression.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAA0C,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"resolveBindingExpression.d.ts","sourceRoot":"","sources":["../../resolveBindingExpression.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAA0C,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAajG;AAKD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAElG"}
|
|
@@ -6,9 +6,9 @@ import { BindingSourceKind, BindingNullBehavior } from '@cratis/scene.model';
|
|
|
6
6
|
* Resolves a typed binding against the shared runtime binding scope.
|
|
7
7
|
*/ function resolveBindingExpression(binding, scope) {
|
|
8
8
|
const kind = binding.kind ?? BindingSourceKind.DataContext;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const value = readPath(
|
|
9
|
+
// A literal without a value is absent, whether the author wrote `null` or nothing: the C# model cannot
|
|
10
|
+
// tell the two apart, and both engines must resolve the same document to the same value.
|
|
11
|
+
const value = kind === BindingSourceKind.Literal ? binding.value ?? undefined : readPath(sourceValue(binding, scope, kind), sourcePath(binding, kind));
|
|
12
12
|
if (value !== null && value !== undefined) return value;
|
|
13
13
|
if (binding.nullBehavior === BindingNullBehavior.Preserve) return undefined;
|
|
14
14
|
if (binding.nullBehavior === BindingNullBehavior.Clear) return null;
|
|
@@ -22,7 +22,7 @@ import { BindingSourceKind, BindingNullBehavior } from '@cratis/scene.model';
|
|
|
22
22
|
function sourceValue(binding, scope, kind) {
|
|
23
23
|
switch(kind){
|
|
24
24
|
case BindingSourceKind.DataContext:
|
|
25
|
-
return scope.dataContext;
|
|
25
|
+
return scope.dataContext ?? undefined;
|
|
26
26
|
case BindingSourceKind.QueryResult:
|
|
27
27
|
return binding.query ? scope.queryResults?.[binding.query] : undefined;
|
|
28
28
|
case BindingSourceKind.ComponentProperty:
|
|
@@ -35,12 +35,16 @@ function sourcePath(binding, kind) {
|
|
|
35
35
|
if (kind === BindingSourceKind.ComponentProperty) return binding.componentPropertyPath ?? binding.path;
|
|
36
36
|
return binding.path;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Reads a dotted path. Only own properties and array indexes are read - never inherited members such as
|
|
40
|
+
* `constructor` - and anything that is not an object or array ends the walk, so the C# engine can follow
|
|
41
|
+
* exactly the same rule over JSON.
|
|
42
|
+
*/ function readPath(source, path) {
|
|
39
43
|
if (!path) return source;
|
|
40
44
|
return path.split('.').reduce((current, segment)=>{
|
|
41
|
-
if (current === null || current === undefined) return undefined;
|
|
42
|
-
if (
|
|
43
|
-
return current[segment];
|
|
45
|
+
if (current === null || current === undefined || typeof current !== 'object') return undefined;
|
|
46
|
+
if (Array.isArray(current)) return /^(0|[1-9][0-9]*)$/.test(segment) ? current[Number(segment)] : undefined;
|
|
47
|
+
return Object.hasOwn(current, segment) ? current[segment] : undefined;
|
|
44
48
|
}, source);
|
|
45
49
|
}
|
|
46
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBindingExpression.js","sources":["../../resolveBindingExpression.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingExpression, BindingNullBehavior, BindingSourceKind } from '@cratis/scene.model';\nimport { BindingScope } from './BindingScope';\n\n/**\n * Resolves a typed binding against the shared runtime binding scope.\n */\nexport function resolveBindingExpression(binding: BindingExpression, scope: BindingScope): unknown {\n const kind = binding.kind ?? BindingSourceKind.DataContext;\n
|
|
1
|
+
{"version":3,"file":"resolveBindingExpression.js","sources":["../../resolveBindingExpression.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingExpression, BindingNullBehavior, BindingSourceKind } from '@cratis/scene.model';\nimport { BindingScope } from './BindingScope';\n\n/**\n * Resolves a typed binding against the shared runtime binding scope.\n */\nexport function resolveBindingExpression(binding: BindingExpression, scope: BindingScope): unknown {\n const kind = binding.kind ?? BindingSourceKind.DataContext;\n\n // A literal without a value is absent, whether the author wrote `null` or nothing: the C# model cannot\n // tell the two apart, and both engines must resolve the same document to the same value.\n const value = kind === BindingSourceKind.Literal\n ? binding.value ?? undefined\n : readPath(sourceValue(binding, scope, kind), sourcePath(binding, kind));\n if (value !== null && value !== undefined) return value;\n\n if (binding.nullBehavior === BindingNullBehavior.Preserve) return undefined;\n if (binding.nullBehavior === BindingNullBehavior.Clear) return null;\n return value;\n}\n\n/**\n * Creates a legacy resolver function from a binding scope.\n */\nexport function createBindingResolver(scope: BindingScope): (binding: BindingExpression) => unknown {\n return binding => resolveBindingExpression(binding, scope);\n}\n\nfunction sourceValue(binding: BindingExpression, scope: BindingScope, kind: BindingSourceKind): unknown {\n switch (kind) {\n case BindingSourceKind.DataContext:\n return scope.dataContext ?? undefined;\n case BindingSourceKind.QueryResult:\n return binding.query ? scope.queryResults?.[binding.query] : undefined;\n case BindingSourceKind.ComponentProperty:\n return binding.componentId ? scope.componentOutputs?.[binding.componentId] : undefined;\n case BindingSourceKind.Literal:\n return binding.value;\n }\n}\n\nfunction sourcePath(binding: BindingExpression, kind: BindingSourceKind): string {\n if (kind === BindingSourceKind.ComponentProperty) return binding.componentPropertyPath ?? binding.path;\n return binding.path;\n}\n\n/**\n * Reads a dotted path. Only own properties and array indexes are read - never inherited members such as\n * `constructor` - and anything that is not an object or array ends the walk, so the C# engine can follow\n * exactly the same rule over JSON.\n */\nfunction readPath(source: unknown, path: string): unknown {\n if (!path) return source;\n return path.split('.').reduce<unknown>((current, segment) => {\n if (current === null || current === undefined || typeof current !== 'object') return undefined;\n if (Array.isArray(current)) return /^(0|[1-9][0-9]*)$/.test(segment) ? current[Number(segment)] : undefined;\n return Object.hasOwn(current, segment) ? (current as Record<string, unknown>)[segment] : undefined;\n }, source);\n}\n"],"names":["resolveBindingExpression","binding","scope","kind","BindingSourceKind","DataContext","value","Literal","undefined","readPath","sourceValue","sourcePath","nullBehavior","BindingNullBehavior","Preserve","Clear","createBindingResolver","dataContext","QueryResult","query","queryResults","ComponentProperty","componentId","componentOutputs","componentPropertyPath","path","source","split","reduce","current","segment","Array","isArray","test","Number","Object","hasOwn"],"mappings":";;AAAA;AACA;AAKA;;AAEC,IACM,SAASA,wBAAAA,CAAyBC,OAA0B,EAAEC,KAAmB,EAAA;AACpF,IAAA,MAAMC,IAAAA,GAAOF,OAAAA,CAAQE,IAAI,IAAIC,kBAAkBC,WAAW;;;AAI1D,IAAA,MAAMC,KAAAA,GAAQH,IAAAA,KAASC,iBAAAA,CAAkBG,OAAO,GAC1CN,OAAAA,CAAQK,KAAK,IAAIE,SAAAA,GACjBC,SAASC,WAAAA,CAAYT,OAAAA,EAASC,KAAAA,EAAOC,IAAAA,CAAAA,EAAOQ,WAAWV,OAAAA,EAASE,IAAAA,CAAAA,CAAAA;AACtE,IAAA,IAAIG,KAAAA,KAAU,IAAA,IAAQA,KAAAA,KAAUE,SAAAA,EAAW,OAAOF,KAAAA;AAElD,IAAA,IAAIL,QAAQW,YAAY,KAAKC,mBAAAA,CAAoBC,QAAQ,EAAE,OAAON,SAAAA;AAClE,IAAA,IAAIP,QAAQW,YAAY,KAAKC,mBAAAA,CAAoBE,KAAK,EAAE,OAAO,IAAA;IAC/D,OAAOT,KAAAA;AACX;AAEA;;IAGO,SAASU,qBAAAA,CAAsBd,KAAmB,EAAA;IACrD,OAAOD,CAAAA,OAAAA,GAAWD,wBAAAA,CAAyBC,OAAAA,EAASC,KAAAA,CAAAA;AACxD;AAEA,SAASQ,WAAAA,CAAYT,OAA0B,EAAEC,KAAmB,EAAEC,IAAuB,EAAA;IACzF,OAAQA,IAAAA;AACJ,QAAA,KAAKC,kBAAkBC,WAAW;YAC9B,OAAOH,KAAAA,CAAMe,WAAW,IAAIT,SAAAA;AAChC,QAAA,KAAKJ,kBAAkBc,WAAW;YAC9B,OAAOjB,OAAAA,CAAQkB,KAAK,GAAGjB,KAAAA,CAAMkB,YAAY,GAAGnB,OAAAA,CAAQkB,KAAK,CAAC,GAAGX,SAAAA;AACjE,QAAA,KAAKJ,kBAAkBiB,iBAAiB;YACpC,OAAOpB,OAAAA,CAAQqB,WAAW,GAAGpB,KAAAA,CAAMqB,gBAAgB,GAAGtB,OAAAA,CAAQqB,WAAW,CAAC,GAAGd,SAAAA;AACjF,QAAA,KAAKJ,kBAAkBG,OAAO;AAC1B,YAAA,OAAON,QAAQK,KAAK;AAC5B;AACJ;AAEA,SAASK,UAAAA,CAAWV,OAA0B,EAAEE,IAAuB,EAAA;IACnE,IAAIA,IAAAA,KAASC,kBAAkBiB,iBAAiB,EAAE,OAAOpB,OAAAA,CAAQuB,qBAAqB,IAAIvB,OAAAA,CAAQwB,IAAI;AACtG,IAAA,OAAOxB,QAAQwB,IAAI;AACvB;AAEA;;;;AAIC,IACD,SAAShB,QAAAA,CAASiB,MAAe,EAAED,IAAY,EAAA;IAC3C,IAAI,CAACA,MAAM,OAAOC,MAAAA;AAClB,IAAA,OAAOD,KAAKE,KAAK,CAAC,KAAKC,MAAM,CAAU,CAACC,OAAAA,EAASC,OAAAA,GAAAA;AAC7C,QAAA,IAAID,YAAY,IAAA,IAAQA,OAAAA,KAAYrB,aAAa,OAAOqB,OAAAA,KAAY,UAAU,OAAOrB,SAAAA;AACrF,QAAA,IAAIuB,KAAAA,CAAMC,OAAO,CAACH,OAAAA,CAAAA,EAAU,OAAO,mBAAA,CAAoBI,IAAI,CAACH,OAAAA,CAAAA,GAAWD,OAAO,CAACK,MAAAA,CAAOJ,SAAS,GAAGtB,SAAAA;QAClG,OAAO2B,MAAAA,CAAOC,MAAM,CAACP,OAAAA,EAASC,WAAW,OAAoC,CAACA,OAAAA,CAAQ,GAAGtB,SAAAA;IAC7F,CAAA,EAAGkB,MAAAA,CAAAA;AACP;;"}
|