@mailwoman/react 8.1.0 → 8.2.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/common/ClientOnly.tsx +6 -2
- package/common/CopyButton.tsx +9 -3
- package/common/KindBadge.tsx +1 -1
- package/common/LoadingIndicator.tsx +22 -7
- package/common/PresetChips.tsx +6 -2
- package/common/cx.ts +3 -1
- package/common/useClipboard.ts +7 -2
- package/index.ts +5 -0
- package/map/BackendControl.tsx +12 -4
- package/map/CompareToggle.tsx +27 -9
- package/map/DemoControls.tsx +31 -11
- package/map/DemoMap.tsx +33 -11
- package/map/GeocoderDemo.tsx +25 -8
- package/map/OverlayLayers.tsx +7 -3
- package/map/PlaceAutocomplete.tsx +25 -9
- package/map/PlaceMarker.tsx +18 -6
- package/map/ResolvedPlaceLayers.tsx +15 -5
- package/map/ResultCamera.tsx +6 -2
- package/map/ResultOverlay.tsx +18 -6
- package/map/ResultPanel.tsx +21 -7
- package/map/VersionPicker.tsx +18 -6
- package/map/geometry.ts +28 -8
- package/map/index.ts +3 -0
- package/map/place-render.ts +36 -12
- package/map/types.ts +132 -44
- package/map/useCompareState.ts +15 -5
- package/map/useDemoGeocode.ts +12 -4
- package/map/useMapPlaceRender.ts +3 -1
- package/map/usePlaceAutocomplete.ts +52 -18
- package/out/common/ClientOnly.d.ts +6 -2
- package/out/common/ClientOnly.d.ts.map +1 -1
- package/out/common/ClientOnly.js.map +1 -1
- package/out/common/CopyButton.d.ts +9 -3
- package/out/common/CopyButton.d.ts.map +1 -1
- package/out/common/CopyButton.js.map +1 -1
- package/out/common/KindBadge.js +1 -1
- package/out/common/KindBadge.js.map +1 -1
- package/out/common/LoadingIndicator.d.ts +21 -6
- package/out/common/LoadingIndicator.d.ts.map +1 -1
- package/out/common/LoadingIndicator.js +4 -1
- package/out/common/LoadingIndicator.js.map +1 -1
- package/out/common/PresetChips.d.ts +6 -2
- package/out/common/PresetChips.d.ts.map +1 -1
- package/out/common/PresetChips.js.map +1 -1
- package/out/common/cx.d.ts +3 -1
- package/out/common/cx.d.ts.map +1 -1
- package/out/common/cx.js +3 -1
- package/out/common/cx.js.map +1 -1
- package/out/common/useClipboard.d.ts +3 -1
- package/out/common/useClipboard.d.ts.map +1 -1
- package/out/common/useClipboard.js +6 -2
- package/out/common/useClipboard.js.map +1 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js.map +1 -1
- package/out/map/BackendControl.d.ts +12 -4
- package/out/map/BackendControl.d.ts.map +1 -1
- package/out/map/BackendControl.js +3 -1
- package/out/map/BackendControl.js.map +1 -1
- package/out/map/CompareToggle.d.ts +27 -9
- package/out/map/CompareToggle.d.ts.map +1 -1
- package/out/map/CompareToggle.js +3 -1
- package/out/map/CompareToggle.js.map +1 -1
- package/out/map/DemoControls.d.ts +30 -10
- package/out/map/DemoControls.d.ts.map +1 -1
- package/out/map/DemoControls.js +4 -2
- package/out/map/DemoControls.js.map +1 -1
- package/out/map/DemoMap.d.ts +33 -11
- package/out/map/DemoMap.d.ts.map +1 -1
- package/out/map/DemoMap.js.map +1 -1
- package/out/map/GeocoderDemo.d.ts +16 -6
- package/out/map/GeocoderDemo.d.ts.map +1 -1
- package/out/map/GeocoderDemo.js +9 -3
- package/out/map/GeocoderDemo.js.map +1 -1
- package/out/map/OverlayLayers.d.ts +6 -2
- package/out/map/OverlayLayers.d.ts.map +1 -1
- package/out/map/OverlayLayers.js +4 -2
- package/out/map/OverlayLayers.js.map +1 -1
- package/out/map/PlaceAutocomplete.d.ts +24 -8
- package/out/map/PlaceAutocomplete.d.ts.map +1 -1
- package/out/map/PlaceAutocomplete.js +4 -2
- package/out/map/PlaceAutocomplete.js.map +1 -1
- package/out/map/PlaceMarker.d.ts +15 -5
- package/out/map/PlaceMarker.d.ts.map +1 -1
- package/out/map/PlaceMarker.js +6 -2
- package/out/map/PlaceMarker.js.map +1 -1
- package/out/map/ResolvedPlaceLayers.d.ts +15 -5
- package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
- package/out/map/ResolvedPlaceLayers.js +3 -1
- package/out/map/ResolvedPlaceLayers.js.map +1 -1
- package/out/map/ResultCamera.d.ts +6 -2
- package/out/map/ResultCamera.d.ts.map +1 -1
- package/out/map/ResultCamera.js +3 -1
- package/out/map/ResultCamera.js.map +1 -1
- package/out/map/ResultOverlay.d.ts +15 -5
- package/out/map/ResultOverlay.d.ts.map +1 -1
- package/out/map/ResultOverlay.js +3 -1
- package/out/map/ResultOverlay.js.map +1 -1
- package/out/map/ResultPanel.d.ts +21 -7
- package/out/map/ResultPanel.d.ts.map +1 -1
- package/out/map/ResultPanel.js +3 -1
- package/out/map/ResultPanel.js.map +1 -1
- package/out/map/VersionPicker.d.ts +18 -6
- package/out/map/VersionPicker.d.ts.map +1 -1
- package/out/map/VersionPicker.js +3 -1
- package/out/map/VersionPicker.js.map +1 -1
- package/out/map/geometry.d.ts +12 -4
- package/out/map/geometry.d.ts.map +1 -1
- package/out/map/geometry.js +17 -5
- package/out/map/geometry.js.map +1 -1
- package/out/map/index.d.ts.map +1 -1
- package/out/map/index.js.map +1 -1
- package/out/map/place-render.d.ts +27 -9
- package/out/map/place-render.d.ts.map +1 -1
- package/out/map/place-render.js +9 -3
- package/out/map/place-render.js.map +1 -1
- package/out/map/types.d.ts +132 -44
- package/out/map/types.d.ts.map +1 -1
- package/out/map/useCompareState.d.ts +15 -5
- package/out/map/useCompareState.d.ts.map +1 -1
- package/out/map/useCompareState.js.map +1 -1
- package/out/map/useDemoGeocode.d.ts +12 -4
- package/out/map/useDemoGeocode.d.ts.map +1 -1
- package/out/map/useDemoGeocode.js.map +1 -1
- package/out/map/useMapPlaceRender.d.ts +3 -1
- package/out/map/useMapPlaceRender.d.ts.map +1 -1
- package/out/map/useMapPlaceRender.js +3 -1
- package/out/map/useMapPlaceRender.js.map +1 -1
- package/out/map/usePlaceAutocomplete.d.ts +45 -15
- package/out/map/usePlaceAutocomplete.d.ts.map +1 -1
- package/out/map/usePlaceAutocomplete.js +7 -3
- package/out/map/usePlaceAutocomplete.js.map +1 -1
- package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
- package/out/pipeline/ConfidenceCell.js +9 -1
- package/out/pipeline/ConfidenceCell.js.map +1 -1
- package/out/pipeline/PipelineExplorer.d.ts +12 -4
- package/out/pipeline/PipelineExplorer.d.ts.map +1 -1
- package/out/pipeline/PipelineExplorer.js +6 -2
- package/out/pipeline/PipelineExplorer.js.map +1 -1
- package/out/pipeline/QueryForm.d.ts +6 -2
- package/out/pipeline/QueryForm.d.ts.map +1 -1
- package/out/pipeline/QueryForm.js +1 -1
- package/out/pipeline/QueryForm.js.map +1 -1
- package/out/pipeline/ResolvedPlace.js +1 -1
- package/out/pipeline/ResolvedPlace.js.map +1 -1
- package/out/pipeline/presets.d.ts +7 -0
- package/out/pipeline/presets.d.ts.map +1 -1
- package/out/pipeline/presets.js +7 -0
- package/out/pipeline/presets.js.map +1 -1
- package/out/pipeline/types.d.ts +60 -20
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/useParsePipeline.d.ts +12 -4
- package/out/pipeline/useParsePipeline.d.ts.map +1 -1
- package/out/pipeline/useParsePipeline.js +2 -2
- package/out/pipeline/useParsePipeline.js.map +1 -1
- package/out/poi/LiveResultsBlock.d.ts +6 -2
- package/out/poi/LiveResultsBlock.d.ts.map +1 -1
- package/out/poi/LiveResultsBlock.js +1 -1
- package/out/poi/LiveResultsBlock.js.map +1 -1
- package/out/poi/POIExplorer.d.ts +12 -4
- package/out/poi/POIExplorer.d.ts.map +1 -1
- package/out/poi/POIExplorer.js.map +1 -1
- package/out/poi/SubjectPanel.d.ts.map +1 -1
- package/out/poi/SubjectPanel.js +4 -2
- package/out/poi/SubjectPanel.js.map +1 -1
- package/out/poi/runtime.d.ts +9 -2
- package/out/poi/runtime.d.ts.map +1 -1
- package/out/poi/runtime.js +10 -3
- package/out/poi/runtime.js.map +1 -1
- package/out/poi/types.d.ts +40 -15
- package/out/poi/types.d.ts.map +1 -1
- package/out/poi/usePOISearch.d.ts +27 -9
- package/out/poi/usePOISearch.d.ts.map +1 -1
- package/out/poi/usePOISearch.js +5 -3
- package/out/poi/usePOISearch.js.map +1 -1
- package/out/runtime/useDemoRuntime.d.ts +81 -27
- package/out/runtime/useDemoRuntime.d.ts.map +1 -1
- package/out/runtime/useDemoRuntime.js.map +1 -1
- package/package.json +4 -4
- package/pipeline/ConfidenceCell.tsx +11 -1
- package/pipeline/PipelineExplorer.tsx +19 -6
- package/pipeline/QueryForm.tsx +7 -3
- package/pipeline/ResolvedPlace.tsx +2 -2
- package/pipeline/presets.ts +7 -0
- package/pipeline/types.ts +60 -20
- package/pipeline/useParsePipeline.ts +14 -6
- package/poi/LiveResultsBlock.tsx +7 -3
- package/poi/POIExplorer.tsx +14 -4
- package/poi/SubjectPanel.tsx +4 -2
- package/poi/runtime.ts +11 -3
- package/poi/types.ts +41 -15
- package/poi/usePOISearch.ts +34 -12
- package/runtime/useDemoRuntime.ts +82 -27
package/out/map/ResultPanel.d.ts
CHANGED
|
@@ -16,19 +16,33 @@
|
|
|
16
16
|
import type { ReactNode } from "react";
|
|
17
17
|
import type { ParseResult, ResolvedPlaceView } from "../pipeline/types.ts";
|
|
18
18
|
export interface ResultPanelProps {
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The parse+resolve result to render.
|
|
21
|
+
*/
|
|
20
22
|
result: ParseResult;
|
|
21
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The selected candidate (falls back to the first), used for the resolved-place detail + copy payload.
|
|
25
|
+
*/
|
|
22
26
|
selectedCandidate: ResolvedPlaceView | null;
|
|
23
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* The selected candidate index, for the picker's active state.
|
|
29
|
+
*/
|
|
24
30
|
selectedCandidateIndex: number;
|
|
25
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Fired when a candidate in the picker is chosen.
|
|
33
|
+
*/
|
|
26
34
|
onSelectCandidate: (index: number) => void;
|
|
27
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Host-injected heavy visualizers (span highlight, tree, timing, …), rendered from the result.
|
|
37
|
+
*/
|
|
28
38
|
extras?: (result: ParseResult) => ReactNode;
|
|
29
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Host-injected no-resolve diagnostic, rendered when nothing resolved.
|
|
41
|
+
*/
|
|
30
42
|
failure?: (result: ParseResult) => ReactNode;
|
|
31
43
|
}
|
|
32
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* The composed result block for the geocoder demo.
|
|
46
|
+
*/
|
|
33
47
|
export declare function ResultPanel({ result, selectedCandidate, selectedCandidateIndex, onSelectCandidate, extras, failure, }: ResultPanelProps): ReactNode;
|
|
34
48
|
//# sourceMappingURL=ResultPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../map/ResultPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE1E,MAAM,WAAW,gBAAgB;IAChC
|
|
1
|
+
{"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../map/ResultPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE1E,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,WAAW,CAAA;IACnB;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3C;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;CAC5C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,OAAO,GACP,EAAE,gBAAgB,GAAG,SAAS,CAkC9B"}
|
package/out/map/ResultPanel.js
CHANGED
|
@@ -5,7 +5,9 @@ import { CandidatePicker } from "../pipeline/CandidatePicker.js";
|
|
|
5
5
|
import { ComponentTable } from "../pipeline/ComponentTable.js";
|
|
6
6
|
import { buildParsePayload } from "../pipeline/copy.js";
|
|
7
7
|
import { ResolvedPlace } from "../pipeline/ResolvedPlace.js";
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The composed result block for the geocoder demo.
|
|
10
|
+
*/
|
|
9
11
|
export function ResultPanel({ result, selectedCandidate, selectedCandidateIndex, onSelectCandidate, extras, failure, }) {
|
|
10
12
|
return (_jsxs("div", { className: "mw-result", children: [_jsxs("div", { className: "mw-result__header", children: [_jsx("h2", { children: "Parsed components" }), _jsx(CopyButton, { value: () => buildParsePayload(result, selectedCandidate), label: "Copy JSON", copiedLabel: "\u2713 Copied" })] }), result.kindResult ? _jsx(KindBadge, { kindResult: result.kindResult }) : null, extras ? extras(result) : null, _jsx(ComponentTable, { nodes: result.nodes }), selectedCandidate ? (_jsxs(_Fragment, { children: [_jsx(ResolvedPlace, { place: selectedCandidate, dualRoles: result.dualRoles }), result.candidates.length > 1 ? (_jsx(CandidatePicker, { candidates: result.candidates, selectedIndex: selectedCandidateIndex, onSelect: onSelectCandidate })) : null] })) : failure ? (failure(result)) : null] }));
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPanel.js","sourceRoot":"","sources":["../../map/ResultPanel.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAyB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAiC,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAAgC,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"ResultPanel.js","sourceRoot":"","sources":["../../map/ResultPanel.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAyB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAiC,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAAgC,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA+B,CAAA;AA8B7D;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,EAC3B,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,OAAO,GACW;IAClB,OAAO,CACN,eAAK,SAAS,EAAC,WAAW,aACzB,eAAK,SAAS,EAAC,mBAAmB,aACjC,6CAA0B,EAC1B,KAAC,UAAU,IACV,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACzD,KAAK,EAAC,WAAW,EACjB,WAAW,EAAC,eAAU,GACrB,IACG,EAEL,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAI,CAAC,CAAC,CAAC,IAAI,EAEvE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAE/B,KAAC,cAAc,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,EAEtC,iBAAiB,CAAC,CAAC,CAAC,CACpB,8BACC,KAAC,aAAa,IAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,GAAI,EACvE,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/B,KAAC,eAAe,IACf,UAAU,EAAE,MAAM,CAAC,UAAU,EAC7B,aAAa,EAAE,sBAAsB,EACrC,QAAQ,EAAE,iBAAiB,GAC1B,CACF,CAAC,CAAC,CAAC,IAAI,IACN,CACH,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACb,OAAO,CAAC,MAAM,CAAC,CACf,CAAC,CAAC,CAAC,IAAI,IACH,CACN,CAAA;AACF,CAAC"}
|
|
@@ -14,17 +14,29 @@
|
|
|
14
14
|
import type { ReactNode } from "react";
|
|
15
15
|
import type { DemoVersionOption } from "./types.ts";
|
|
16
16
|
export interface VersionPickerProps {
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The selectable model bundles.
|
|
19
|
+
*/
|
|
18
20
|
versions: ReadonlyArray<DemoVersionOption>;
|
|
19
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The currently-selected version tag.
|
|
23
|
+
*/
|
|
20
24
|
selected: string | null;
|
|
21
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Fired with the chosen version tag.
|
|
27
|
+
*/
|
|
22
28
|
onSelect: (version: string) => void;
|
|
23
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Disable the control (e.g. while a parse is running).
|
|
31
|
+
*/
|
|
24
32
|
disabled?: boolean;
|
|
25
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Field label. @default "Model version"
|
|
35
|
+
*/
|
|
26
36
|
label?: string;
|
|
27
37
|
}
|
|
28
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The model-version selector. Renders `null` when there is nothing meaningful to pick.
|
|
40
|
+
*/
|
|
29
41
|
export declare function VersionPicker({ versions, selected, onSelect, disabled, label, }: VersionPickerProps): ReactNode;
|
|
30
42
|
//# sourceMappingURL=VersionPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../map/VersionPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,WAAW,kBAAkB;IAClC
|
|
1
|
+
{"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../map/VersionPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB;;OAEG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAuB,GACvB,EAAE,kBAAkB,GAAG,SAAS,CAuBhC"}
|
package/out/map/VersionPicker.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* The model-version selector. Renders `null` when there is nothing meaningful to pick.
|
|
4
|
+
*/
|
|
3
5
|
export function VersionPicker({ versions, selected, onSelect, disabled, label = "Model version", }) {
|
|
4
6
|
if (versions.length < 2)
|
|
5
7
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPicker.js","sourceRoot":"","sources":["../../map/VersionPicker.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"VersionPicker.js","sourceRoot":"","sources":["../../map/VersionPicker.tsx"],"names":[],"mappings":";AAyCA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,eAAe,GACH;IACpB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAEpC,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC/B,gBAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,iBAAiB,YACjE,KAAK,GACC,EACR,iBACC,EAAE,EAAC,iBAAiB,EACpB,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,QAAQ,IAAI,EAAE,EACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,iBAAwB,KAAK,EAAE,CAAC,CAAC,OAAO,YACtC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,IADT,CAAC,CAAC,OAAO,CAEb,CACT,CAAC,GACM,IACJ,CACN,CAAA;AACF,CAAC"}
|
package/out/map/geometry.d.ts
CHANGED
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
* `_map-helpers.ts` made the same call: a planar `kmPerDeg` approximation, local, no dependency. We
|
|
16
16
|
* preserve it so the ported behavior is byte-identical and the browser graph stays clean.
|
|
17
17
|
*/
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* A GeoJSON Polygon / MultiPolygon — what the polygon DB stores and the map draws as the place outline.
|
|
20
|
+
*/
|
|
19
21
|
export type PlaceGeometry = {
|
|
20
22
|
type: "Polygon";
|
|
21
23
|
coordinates: number[][][];
|
|
@@ -23,14 +25,18 @@ export type PlaceGeometry = {
|
|
|
23
25
|
type: "MultiPolygon";
|
|
24
26
|
coordinates: number[][][][];
|
|
25
27
|
};
|
|
26
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* A place bounding box in the demo's object form (the WOF points DB carries only these four numbers).
|
|
30
|
+
*/
|
|
27
31
|
export interface PlaceBBox {
|
|
28
32
|
minLat: number;
|
|
29
33
|
maxLat: number;
|
|
30
34
|
minLon: number;
|
|
31
35
|
maxLon: number;
|
|
32
36
|
}
|
|
33
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* A `[west, south, east, north]` → `[[minLon, minLat], [maxLon, maxLat]]` pair, the shape `fitBounds` wants.
|
|
39
|
+
*/
|
|
34
40
|
export type BoundsTuple = [[number, number], [number, number]];
|
|
35
41
|
/**
|
|
36
42
|
* Approximate-extent circle for places without a crisp polygon: centered on the place point, radius from the bbox
|
|
@@ -50,6 +56,8 @@ export declare function radiusCircleGeometry(lat: number, lon: number, radiusM:
|
|
|
50
56
|
* min/max is returned) — matching the ported behavior; callers that need a wrapped bbox must handle it upstream.
|
|
51
57
|
*/
|
|
52
58
|
export declare function geomBounds(geometry: PlaceGeometry): PlaceBBox;
|
|
53
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Reshape a {@link PlaceBBox} into the `[[minLon, minLat], [maxLon, maxLat]]` pair `fitBounds` expects.
|
|
61
|
+
*/
|
|
54
62
|
export declare function bboxToBounds(bbox: PlaceBBox): BoundsTuple;
|
|
55
63
|
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../map/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../map/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH;;GAEG;AACH,MAAM,MAAM,aAAa,GACtB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAA;CAAE,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAyB9D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,CAQ9F;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,CAI7F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,aAAa,GAAG,SAAS,CAwC7D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,CAKzD"}
|
package/out/map/geometry.js
CHANGED
|
@@ -15,17 +15,27 @@
|
|
|
15
15
|
* `_map-helpers.ts` made the same call: a planar `kmPerDeg` approximation, local, no dependency. We
|
|
16
16
|
* preserve it so the ported behavior is byte-identical and the browser graph stays clean.
|
|
17
17
|
*/
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Segments used to approximate a circle as a polygon ring.
|
|
20
|
+
*/
|
|
21
|
+
const CIRCLE_SEGMENTS = 64;
|
|
22
|
+
/**
|
|
23
|
+
* Mean km per degree of latitude (WGS84 average).
|
|
24
|
+
*/
|
|
19
25
|
const KM_PER_DEG_LAT = 111.32;
|
|
20
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Km per degree of longitude at a given latitude — the meridians converge toward the poles.
|
|
28
|
+
*/
|
|
21
29
|
function kmPerDegLon(lat) {
|
|
22
30
|
return KM_PER_DEG_LAT * Math.cos((lat * Math.PI) / 180);
|
|
23
31
|
}
|
|
24
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* A closed 64-segment (65-point) GeoJSON ring of `radiusKm` around `[lon, lat]`, with latitude correction.
|
|
34
|
+
*/
|
|
25
35
|
function circleRing(lat, lon, radiusKm) {
|
|
26
36
|
const perLon = kmPerDegLon(lat);
|
|
27
37
|
const ring = [];
|
|
28
|
-
for (let i = 0; i <=
|
|
38
|
+
for (let i = 0; i <= CIRCLE_SEGMENTS; i++) {
|
|
29
39
|
const theta = (2 * Math.PI * i) / 64;
|
|
30
40
|
ring.push([lon + (radiusKm * Math.cos(theta)) / perLon, lat + (radiusKm * Math.sin(theta)) / KM_PER_DEG_LAT]);
|
|
31
41
|
}
|
|
@@ -89,7 +99,9 @@ export function geomBounds(geometry) {
|
|
|
89
99
|
visit(geometry.coordinates);
|
|
90
100
|
return { minLon, minLat, maxLon, maxLat };
|
|
91
101
|
}
|
|
92
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Reshape a {@link PlaceBBox} into the `[[minLon, minLat], [maxLon, maxLat]]` pair `fitBounds` expects.
|
|
104
|
+
*/
|
|
93
105
|
export function bboxToBounds(bbox) {
|
|
94
106
|
return [
|
|
95
107
|
[bbox.minLon, bbox.minLat],
|
package/out/map/geometry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../map/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,
|
|
1
|
+
{"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../map/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,eAAe,GAAG,EAAE,CAAA;AAE1B;;GAEG;AACH,MAAM,cAAc,GAAG,MAAM,CAAA;AAwB7B;;GAEG;AACH,SAAS,WAAW,CAAC,GAAW;IAC/B,OAAO,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;AACxD,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,GAAW,EAAE,GAAW,EAAE,QAAgB;IAC7D,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;IAC/B,MAAM,IAAI,GAAe,EAAE,CAAA;IAE3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QAEpC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,GAA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
|
package/out/map/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../map/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../map/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAElF,YAAY,EACX,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,GACV,MAAM,YAAY,CAAA;AAGnB,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACpG,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAChF,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACjH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,YAAY,EAAE,gBAAgB,EAAE,MAAM,mB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EhE,YAAY,EACX,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,GAC3B,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/out/map/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../map/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../map/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAA;AAgBvC,gFAAgF;AAChF,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAEpG,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAEhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,gFAAgF;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA2B,CAAA;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA;AAGnD,+EAA+E;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAA;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAA;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAQhE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA"}
|
|
@@ -20,9 +20,13 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import type { ResolvedPlaceView } from "../pipeline/types.ts";
|
|
22
22
|
import type { BoundsTuple, PlaceBBox, PlaceGeometry } from "./geometry.ts";
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* `[longitude, latitude]`.
|
|
25
|
+
*/
|
|
24
26
|
export type LngLat = [number, number];
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* The street-level resolution tier (#377): `address_point` = exact building; `interpolated` = TIGER estimate.
|
|
29
|
+
*/
|
|
26
30
|
export type PlaceTier = "address_point" | "interpolated";
|
|
27
31
|
/**
|
|
28
32
|
* The resolved-place shape the map render consumes — the pipeline {@link ResolvedPlaceView} plus the map-only extras the
|
|
@@ -30,11 +34,17 @@ export type PlaceTier = "address_point" | "interpolated";
|
|
|
30
34
|
* `ResolvedPlaceView` keeps the map render aligned with the shared parse result; the extras are additive.
|
|
31
35
|
*/
|
|
32
36
|
export interface ResolvedMapPlace extends ResolvedPlaceView {
|
|
33
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The place's bounding box, when the gazetteer carries one (admin places). Absent for anchor-centroid postcodes.
|
|
39
|
+
*/
|
|
34
40
|
bbox?: PlaceBBox;
|
|
35
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Street-level tier, when this hit came from the situs/interp tier rather than the WOF admin cascade.
|
|
43
|
+
*/
|
|
36
44
|
tier?: PlaceTier;
|
|
37
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Honest uncertainty radius in meters for a street-level tier (10 m situs floor; calibrated interp).
|
|
47
|
+
*/
|
|
38
48
|
uncertaintyM?: number;
|
|
39
49
|
/**
|
|
40
50
|
* The crisp admin polygon, when the host has ALREADY fetched it from the sibling polygon DB. Its presence drives the
|
|
@@ -56,13 +66,21 @@ export type MapCameraTarget = {
|
|
|
56
66
|
bounds: BoundsTuple;
|
|
57
67
|
padding: number;
|
|
58
68
|
};
|
|
59
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* The declarative render spec for one resolved place — the pure output of {@link computeMapPlaceRenderSpec}.
|
|
71
|
+
*/
|
|
60
72
|
export interface MapPlaceRenderSpec {
|
|
61
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Marker position(s) as `[lon, lat]`. Single-element today; an array leaves room for multi-marker later.
|
|
75
|
+
*/
|
|
62
76
|
markers: LngLat[];
|
|
63
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* The outline geometry (polygon / circle) to draw, or `null` when the place renders as a bare point.
|
|
79
|
+
*/
|
|
64
80
|
outline: PlaceGeometry | null;
|
|
65
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* The camera target — animate or fit to this.
|
|
83
|
+
*/
|
|
66
84
|
camera: MapCameraTarget;
|
|
67
85
|
}
|
|
68
86
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-render.d.ts","sourceRoot":"","sources":["../../map/place-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE1E
|
|
1
|
+
{"version":3,"file":"place-render.d.ts","sourceRoot":"","sources":["../../map/place-render.ts"],"names":[],"mappings":"AAAA;;;;;;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AI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI9D"}
|
package/out/map/place-render.js
CHANGED
|
@@ -19,16 +19,22 @@
|
|
|
19
19
|
* 5. bare point → no outline, fly to zoom 12
|
|
20
20
|
*/
|
|
21
21
|
import { approxCircleGeometry, bboxToBounds, geomBounds, radiusCircleGeometry } from "./geometry.js";
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Zoom levels the imperative effect flew to, kept named so the cascade reads as intent, not magic numbers.
|
|
24
|
+
*/
|
|
23
25
|
const ZOOM = {
|
|
24
26
|
addressPoint: 17,
|
|
25
27
|
interpolated: 15,
|
|
26
28
|
postcode: 11,
|
|
27
29
|
point: 12,
|
|
28
30
|
};
|
|
29
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Padding (px) `fitBounds` insets a fitted box by, matching the ported effect.
|
|
33
|
+
*/
|
|
30
34
|
const FIT_PADDING = 40;
|
|
31
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* The minimum lat/lon span (degrees) a bbox must exceed to be treated as a real extent rather than a point.
|
|
37
|
+
*/
|
|
32
38
|
const MIN_EXTENT_DEG = 0.001;
|
|
33
39
|
/**
|
|
34
40
|
* Map a resolved place to its declarative render spec. Pure — same input, same output, no side effects. The `place`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-render.js","sourceRoot":"","sources":["../../map/place-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"place-render.js","sourceRoot":"","sources":["../../map/place-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAiEpG;;GAEG;AACH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