@ac-kit/model-chart 0.2.0 → 0.4.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.
Files changed (162) hide show
  1. package/CHANGELOG.md +311 -0
  2. package/README.md +174 -4
  3. package/dist/geographic/index.d.ts +2 -0
  4. package/dist/geographic/index.d.ts.map +1 -0
  5. package/dist/geographic/index.js +2 -0
  6. package/dist/geographic/index.js.map +1 -0
  7. package/dist/geographic/project-geographic-layer.d.ts +54 -0
  8. package/dist/geographic/project-geographic-layer.d.ts.map +1 -0
  9. package/dist/geographic/project-geographic-layer.js +214 -0
  10. package/dist/geographic/project-geographic-layer.js.map +1 -0
  11. package/dist/index.d.ts +12 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +12 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/layout/_fit.d.ts +12 -0
  16. package/dist/layout/_fit.d.ts.map +1 -0
  17. package/dist/layout/_fit.js +52 -0
  18. package/dist/layout/_fit.js.map +1 -0
  19. package/dist/layout/index.d.ts +4 -0
  20. package/dist/layout/index.d.ts.map +1 -0
  21. package/dist/layout/index.js +4 -0
  22. package/dist/layout/index.js.map +1 -0
  23. package/dist/layout/layout-hierarchy.d.ts +35 -0
  24. package/dist/layout/layout-hierarchy.d.ts.map +1 -0
  25. package/dist/layout/layout-hierarchy.js +98 -0
  26. package/dist/layout/layout-hierarchy.js.map +1 -0
  27. package/dist/layout/layout-network.d.ts +45 -0
  28. package/dist/layout/layout-network.d.ts.map +1 -0
  29. package/dist/layout/layout-network.js +197 -0
  30. package/dist/layout/layout-network.js.map +1 -0
  31. package/dist/layout/options.d.ts +29 -0
  32. package/dist/layout/options.d.ts.map +1 -0
  33. package/dist/layout/options.js +2 -0
  34. package/dist/layout/options.js.map +1 -0
  35. package/dist/render/_fallback-chain.d.ts +13 -0
  36. package/dist/render/_fallback-chain.d.ts.map +1 -0
  37. package/dist/render/_fallback-chain.js +41 -0
  38. package/dist/render/_fallback-chain.js.map +1 -0
  39. package/dist/render/capabilities.d.ts +26 -0
  40. package/dist/render/capabilities.d.ts.map +1 -1
  41. package/dist/render/capabilities.js +48 -10
  42. package/dist/render/capabilities.js.map +1 -1
  43. package/dist/resolve/__fixtures__/vega-lite-views.json +4727 -0
  44. package/dist/resolve/_calendar-interval.d.ts +10 -0
  45. package/dist/resolve/_calendar-interval.d.ts.map +1 -0
  46. package/dist/resolve/_calendar-interval.js +27 -0
  47. package/dist/resolve/_calendar-interval.js.map +1 -0
  48. package/dist/resolve/_coords.d.ts +35 -0
  49. package/dist/resolve/_coords.d.ts.map +1 -0
  50. package/dist/resolve/_coords.js +354 -0
  51. package/dist/resolve/_coords.js.map +1 -0
  52. package/dist/resolve/_grid-field.d.ts +16 -0
  53. package/dist/resolve/_grid-field.d.ts.map +1 -0
  54. package/dist/resolve/_grid-field.js +23 -0
  55. package/dist/resolve/_grid-field.js.map +1 -0
  56. package/dist/resolve/_guides.d.ts +19 -0
  57. package/dist/resolve/_guides.d.ts.map +1 -0
  58. package/dist/resolve/_guides.js +75 -0
  59. package/dist/resolve/_guides.js.map +1 -0
  60. package/dist/resolve/_options.d.ts +17 -0
  61. package/dist/resolve/_options.d.ts.map +1 -0
  62. package/dist/resolve/_options.js +38 -0
  63. package/dist/resolve/_options.js.map +1 -0
  64. package/dist/resolve/color-scheme.d.ts +21 -0
  65. package/dist/resolve/color-scheme.d.ts.map +1 -0
  66. package/dist/resolve/color-scheme.js +42 -0
  67. package/dist/resolve/color-scheme.js.map +1 -0
  68. package/dist/resolve/errors.d.ts +63 -0
  69. package/dist/resolve/errors.d.ts.map +1 -0
  70. package/dist/resolve/errors.js +91 -0
  71. package/dist/resolve/errors.js.map +1 -0
  72. package/dist/resolve/mark-geometry.d.ts +154 -0
  73. package/dist/resolve/mark-geometry.d.ts.map +1 -0
  74. package/dist/resolve/mark-geometry.js +517 -0
  75. package/dist/resolve/mark-geometry.js.map +1 -0
  76. package/dist/resolve/options.d.ts +30 -0
  77. package/dist/resolve/options.d.ts.map +1 -0
  78. package/dist/resolve/options.js +2 -0
  79. package/dist/resolve/options.js.map +1 -0
  80. package/dist/resolve/scale-tick-labels.d.ts +39 -0
  81. package/dist/resolve/scale-tick-labels.d.ts.map +1 -0
  82. package/dist/resolve/scale-tick-labels.js +158 -0
  83. package/dist/resolve/scale-tick-labels.js.map +1 -0
  84. package/dist/resolve/scale-ticks.d.ts +91 -0
  85. package/dist/resolve/scale-ticks.d.ts.map +1 -0
  86. package/dist/resolve/scale-ticks.js +231 -0
  87. package/dist/resolve/scale-ticks.js.map +1 -0
  88. package/dist/resolve/scale-transform.d.ts +102 -0
  89. package/dist/resolve/scale-transform.d.ts.map +1 -0
  90. package/dist/resolve/scale-transform.js +466 -0
  91. package/dist/resolve/scale-transform.js.map +1 -0
  92. package/dist/resolve/scale.d.ts +147 -0
  93. package/dist/resolve/scale.d.ts.map +1 -0
  94. package/dist/resolve/scale.js +730 -0
  95. package/dist/resolve/scale.js.map +1 -0
  96. package/dist/resolve/series.d.ts +26 -0
  97. package/dist/resolve/series.d.ts.map +1 -0
  98. package/dist/resolve/series.js +105 -0
  99. package/dist/resolve/series.js.map +1 -0
  100. package/dist/resolve/view-types.d.ts +226 -0
  101. package/dist/resolve/view-types.d.ts.map +1 -0
  102. package/dist/resolve/view-types.js +2 -0
  103. package/dist/resolve/view-types.js.map +1 -0
  104. package/dist/resolve/view.d.ts +43 -0
  105. package/dist/resolve/view.d.ts.map +1 -0
  106. package/dist/resolve/view.js +709 -0
  107. package/dist/resolve/view.js.map +1 -0
  108. package/dist/spec/channel.d.ts +3 -1
  109. package/dist/spec/channel.d.ts.map +1 -1
  110. package/dist/spec/channel.js +2 -0
  111. package/dist/spec/channel.js.map +1 -1
  112. package/dist/spec/coord.d.ts +17 -0
  113. package/dist/spec/coord.d.ts.map +1 -1
  114. package/dist/spec/data-sources.js.map +1 -1
  115. package/dist/spec/mark.d.ts +6 -1
  116. package/dist/spec/mark.d.ts.map +1 -1
  117. package/dist/spec/scale.d.ts +21 -2
  118. package/dist/spec/scale.d.ts.map +1 -1
  119. package/dist/spec/transform.d.ts +32 -6
  120. package/dist/spec/transform.d.ts.map +1 -1
  121. package/dist/testing/__fixtures__/vega-geometry.json +1434 -0
  122. package/dist/testing/index.d.ts +2 -0
  123. package/dist/testing/index.d.ts.map +1 -0
  124. package/dist/testing/index.js +2 -0
  125. package/dist/testing/index.js.map +1 -0
  126. package/dist/testing/vega-lite-cases.d.ts +164 -0
  127. package/dist/testing/vega-lite-cases.d.ts.map +1 -0
  128. package/dist/testing/vega-lite-cases.js +143 -0
  129. package/dist/testing/vega-lite-cases.js.map +1 -0
  130. package/dist/transform/aggregate.d.ts +28 -0
  131. package/dist/transform/aggregate.d.ts.map +1 -0
  132. package/dist/transform/aggregate.js +463 -0
  133. package/dist/transform/aggregate.js.map +1 -0
  134. package/dist/transform/apply-transforms.d.ts +26 -0
  135. package/dist/transform/apply-transforms.d.ts.map +1 -0
  136. package/dist/transform/apply-transforms.js +66 -0
  137. package/dist/transform/apply-transforms.js.map +1 -0
  138. package/dist/transform/bin.d.ts +30 -0
  139. package/dist/transform/bin.d.ts.map +1 -0
  140. package/dist/transform/bin.js +169 -0
  141. package/dist/transform/bin.js.map +1 -0
  142. package/dist/transform/columns.d.ts +24 -0
  143. package/dist/transform/columns.d.ts.map +1 -0
  144. package/dist/transform/columns.js +77 -0
  145. package/dist/transform/columns.js.map +1 -0
  146. package/dist/transform/filter.d.ts +11 -0
  147. package/dist/transform/filter.d.ts.map +1 -0
  148. package/dist/transform/filter.js +64 -0
  149. package/dist/transform/filter.js.map +1 -0
  150. package/dist/transform/group-rows.d.ts +25 -0
  151. package/dist/transform/group-rows.d.ts.map +1 -0
  152. package/dist/transform/group-rows.js +52 -0
  153. package/dist/transform/group-rows.js.map +1 -0
  154. package/dist/transform/sort.d.ts +10 -0
  155. package/dist/transform/sort.d.ts.map +1 -0
  156. package/dist/transform/sort.js +63 -0
  157. package/dist/transform/sort.js.map +1 -0
  158. package/dist/transform/stack.d.ts +37 -0
  159. package/dist/transform/stack.d.ts.map +1 -0
  160. package/dist/transform/stack.js +218 -0
  161. package/dist/transform/stack.js.map +1 -0
  162. package/package.json +26 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,316 @@
1
1
  # @ac-kit/model-chart
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5c203e7: `RendererCapabilities.coordMarks` maps a coordinate system to the marks a
8
+ renderer draws in it: a spec with a mark its coordinate system leaves out
9
+ (`mark "polygon" in polar coordinates`) falls back or declines like any
10
+ other unsupported feature, instead of reaching a renderer that cannot draw
11
+ it. A coordinate system the map leaves out, and a renderer that does not
12
+ declare the map, keep every mark of `marks`.
13
+
14
+ Theta and radius axes now default to gridlines (spokes and rings), discrete
15
+ or continuous; `axis.grid: false` still turns them off. A nominal or ordinal
16
+ field on theta or radius now gets a position scale as on x and y — `band`
17
+ for bars, rectangles and arcs, `point` for the other marks — instead of an
18
+ `ordinal` one, so radial bars and radars of categories have their places.
19
+
20
+ `@ac-kit/model-chart/testing` adds two polar Vega-Lite cases, `donut` and
21
+ `radial`, with the sectors Vega drew (`VegaLiteCase.arcs`), and
22
+ `VEGA_HIERARCHY_CASES` with `vegaHierarchyFrame()`: Vega's squarified
23
+ treemap, partition, tidy tree and cluster over one tree, as fractions of the
24
+ layout box.
25
+ - 5c203e7: `RendererCapabilities.dimensionMarks` declares the marks a renderer draws in
26
+ each dimension: a spec encoding `z` with a mark its renderer draws only in 2D
27
+ (an `area`, say) now declines with the reason `mark "area" in 3D` and falls
28
+ back along its chain, instead of reaching the renderer.
29
+ - 5c203e7: `@ac-kit/model-chart/testing` adds maps recorded from Vega-Lite
30
+ (`VEGA_LITE_MAPS`): eight cities and three regions (one across the
31
+ antimeridian, one with a hole) through Equal Earth, Mercator, Natural Earth, a
32
+ rotated equirectangular, a conformal conic, Albers and two globes, each with
33
+ the places and shape bounds Vega-Lite drew, fitted to the data; and their
34
+ frames (`vegaLiteMapCitiesFrame`, `vegaLiteMapRegionsFrame`), for a renderer
35
+ of geographic panels to check its maps against.
36
+ - 5c203e7: Mark geometry, tick labels and colour scheme names for renderers, in the
37
+ panel's unit square as the rest of the pipeline.
38
+
39
+ - `layerPositions(layer, channel, { part, edge })`: a position channel's
40
+ normalised position per mark — band and point scales at the `start`,
41
+ `center` or `end` of their band, `xOffset`/`yOffset` fields laid across the
42
+ parent's band (a point parent's step, a continuous parent's
43
+ `CONTINUOUS_BAND_FILL` of its least gap), a constant on its axis' scale, an
44
+ offset without a parent across the plot; `undefined` without a position.
45
+ `layerChannelNumbers` gives a channel's numbers in data units (a grid's
46
+ lattice at cell centres, shifted by `edge` cells), `scaleValuePosition` one
47
+ value's position, `layerBaseline` where a value axis' bars start (0 when the
48
+ domain holds it, else its low end).
49
+ - `layerBoxes(layer)`: the box of every `bar`, `rect` and `arc` mark drawn
50
+ (`rows`, `boxes` as `x0, y0, x1, y1`, `grows`): bands, `2` channels, bars
51
+ from their baseline, a grid's cells, a continuous rect's share of the least
52
+ gap; marks with a missing side, or a NaN grid cell, left out; `{ rows }`
53
+ limits it to the marks shown, the least gap taken among them.
54
+ `layerSegments(layer)` gives every rule's segment. `polarSpaceLayer(layer)`
55
+ reads theta and radius as x and y so both apply to polar panels.
56
+ - `scaleTickPositions(scale, ticks)` places the ticks `scaleTicks` returns
57
+ (band centres, ordinal slots, thresholds along a binning domain) and
58
+ `scaleTickFormatter(scale, ticks, { locale, timeZone })` labels them: the
59
+ field's own format, numeric ticks at their step's precision, time ticks at
60
+ their unit with d3's multi-scale labels ("2024", "Feb", "Mar 12").
61
+ - `namedColorScheme(name)`: the `@ac-kit/math-color` palette or ramp a
62
+ `ColorSchemeSpec.name` names, compared without case or separators, Vega's
63
+ and ColorBrewer's short names included (`"rdbu"`, `"ylgnbu"`); `undefined`
64
+ for an unknown name. model-chart now depends on `@ac-kit/math-color`.
65
+ - 5c203e7: Grouped bars within one band: the `xOffset` and `yOffset` channels (Vega-Lite
66
+ 5's) place a mark within the band of `x` or `y`. Each resolves a scale of its
67
+ own (`ScaleChannel` gains `"xOffset"` and `"yOffset"`): a band scale for a
68
+ nominal or ordinal field, its sub-bands touching unless a `padding` is given,
69
+ or a continuous one that jitters marks; offsets get no guide. A categorical
70
+ axis whose offset is encoded takes a band scale whatever the mark
71
+ (`ScaleInput.offset`). A renderer that does not declare the channels declines
72
+ the spec with `channel "xOffset"` and falls back as before.
73
+ - 5c203e7: In cartesian coordinates, a layer's `geometry` field is planar: the x and y
74
+ coordinates of its shapes now join the continuous `x` and `y` domains of its
75
+ panel, so polygons layered with points, lines or other marks are drawn whole
76
+ instead of being cut at the other layers' extent.
77
+ - 5c203e7: `@ac-kit/model-chart/testing` holds Vega-Lite's examples as Vega-Lite and
78
+ Vega computed them — each case's spec, its rows and its scale domains
79
+ (`VEGA_LITE_CASES`) — and `vegaLiteCaseFrame(name)`, the rows as a data
80
+ frame, so a renderer of model-chart can check what it draws against them.
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [5c203e7]
85
+ - Updated dependencies [5c203e7]
86
+ - Updated dependencies [5c203e7]
87
+ - Updated dependencies [5c203e7]
88
+ - Updated dependencies [5c203e7]
89
+ - Updated dependencies [5c203e7]
90
+ - Updated dependencies [5c203e7]
91
+ - Updated dependencies [5c203e7]
92
+ - Updated dependencies [5c203e7]
93
+ - Updated dependencies [5c203e7]
94
+ - Updated dependencies [5c203e7]
95
+ - Updated dependencies [5c203e7]
96
+ - Updated dependencies [5c203e7]
97
+ - Updated dependencies [5c203e7]
98
+ - Updated dependencies [5c203e7]
99
+ - Updated dependencies [5c203e7]
100
+ - Updated dependencies [5c203e7]
101
+ - Updated dependencies [5c203e7]
102
+ - Updated dependencies [5c203e7]
103
+ - Updated dependencies [5c203e7]
104
+ - Updated dependencies [5c203e7]
105
+ - Updated dependencies [5c203e7]
106
+ - Updated dependencies [5c203e7]
107
+ - Updated dependencies [5c203e7]
108
+ - Updated dependencies [5c203e7]
109
+ - @ac-kit/algo@0.7.0
110
+ - @ac-kit/core@0.14.0
111
+ - @ac-kit/math-color@0.4.0
112
+ - @ac-kit/math-geometry@0.5.0
113
+ - @ac-kit/math-linear@0.5.0
114
+ - @ac-kit/math-map-projection@0.3.0
115
+ - @ac-kit/math-scalar@0.5.0
116
+ - @ac-kit/math-stats@0.7.0
117
+ - @ac-kit/math-graph@0.2.1
118
+ - @ac-kit/model-dataset@0.3.1
119
+
120
+ ## 0.3.0
121
+
122
+ ### Minor Changes
123
+
124
+ - 0b4fe43: `applyTransforms(transforms, frame, options)` runs a spec's `filter`, `sort`,
125
+ `aggregate`, `bin` and `stack` transforms in order and never mutates the frame;
126
+ untouched columns are shared and new numeric columns are `Float64Array` when
127
+ complete. `null` and `NaN` fail every `filter` comparison and come last in a
128
+ `sort`. `aggregate` outputs groups in first-appearance order (one row for an
129
+ empty `groupBy`), skips missing cells, and gives `null` for an empty group or a
130
+ `variance` of fewer than two values. `distinct` counts the non-`null` cells by
131
+ SameValueZero, as a `Set` would: `NaN` once, `0` and `-0` as one, `1n` and `1`
132
+ as two, and geometries by identity; unlike Vega, `null` is not counted.
133
+ An `aggregate` allocates its output columns and nothing per group or per row,
134
+ whatever the source column holds: a numeric field in a boxed or `Int32Array`
135
+ column is read group by group, not converted whole.
136
+ `bin` takes math-stats `histogramEdges`' nice edges: the width of its `rule`
137
+ (any `HistogramBinRule`, `"freedman-diaconis"` by default, Sturges' where the
138
+ rule finds none) rounded up to 1, 2 or 5 times a power of ten within `maxBins`,
139
+ edges on its multiples (calendar edges in `options.timeZone` for temporal
140
+ fields), the last bin closed; a temporal field's `step` may be a calendar
141
+ interval (`"month"`, `{ unit: "day", step: 7 }`), whose boundaries in the zone
142
+ are the edges. Edges that would leave the double range throw
143
+ `InvalidTransformError`, math-stats' `RangeError` as its `cause`
144
+ (`InvalidTransformError` takes `ErrorOptions`).
145
+ A `null` or `NaN` value adds nothing to its stack and gets `null` edges, so no
146
+ segment is drawn for it (Vega-Lite's default `invalid: "filter"`).
147
+ `stack` offsets are `zero`, `normalize`, `center` (every stack centred on the
148
+ tallest one's middle, as Vega's `center`), `silhouette` (each stack centred on
149
+ 0, as d3's) and `wiggle` (the streamgraph baseline that minimises the layers'
150
+ weighted wiggle, Byron and Wattenberg 2008, as d3's). `stack`'s `series`
151
+ fields name each row's layer: every offset then matches layers by key, stacks
152
+ them bottom up in the order their keys first appear and counts a layer missing
153
+ from a stack as zero; `wiggle` requires it.
154
+ Other kinds throw `InvalidTransformError`; `RESOLVABLE_TRANSFORMS` lists the
155
+ supported ones.
156
+ - 0b4fe43: `resolveScale(inputs, options)` resolves the scale every input of one scale
157
+ channel shares, by Vega-Lite's documented defaults: kind from the field and the
158
+ mark (`band` for bars, rects and surfaces, `point` otherwise, `ordinal` off the
159
+ position channels), `zero` for linear, pow and symlog position and size scales,
160
+ `nice` for linear, pow, symlog and log x, y and z scales (an angle or a radius
161
+ keeps its extent, so a pie closes at its total), band and point paddings, and
162
+ the `sort` order of categories. `ScaleSpec.nice` takes `true`, a tick count, or
163
+ a calendar interval for a time scale (`"month"`, `{ unit: "month", step: 3 }`,
164
+ Vega-Lite's `TimeInterval`), whose boundaries in the chart's time zone the
165
+ domain is widened to. Continuous domains are the union of the finite
166
+ extents (log keeps one sign), widened by `include` (annotation positions) and a
167
+ diverging midpoint, and a single value stays `[v, v]`. An explicit domain is
168
+ final. Binned or stacked inputs are flagged with `ScaleInput.binned` and
169
+ `stacked`. Data grids give lattice domains (cell edges for `rect`, centres
170
+ otherwise). `scaleChannelOf` folds `x2`, `y2`, `theta2` and `radius2` onto their
171
+ scale channel, and `ResolveOptions` carries the time zone (default `"UTC"`),
172
+ week start, tick, bin and class counts. Scales a spec makes impossible throw
173
+ `InvalidScaleError`.
174
+ - 0b4fe43: The spec grows the vocabulary the resolver needs. `Mark` gains `"surface"` (a
175
+ surface over a data grid, height `z`) and `Channel` gains `"parent"` (a
176
+ hierarchy row's parent key, `null` for the root). `CoordSpec` gains
177
+ `parallel.axes` (one `FieldEncoding` per axis, in order) and `hierarchy.radial`
178
+ (x → angle, y → radius). Polar angles are radians, clockwise from 12 o'clock,
179
+ and `innerRadius` is a fraction of the outer radius in [0, 1).
180
+ `RESOLVER_SUPPORT` lists the transforms, projections and layouts model-chart
181
+ itself can resolve, and the `Invalid…Error` classes (`InvalidScaleError`,
182
+ `InvalidTransformError`, `InvalidEncodingError`, `InvalidCoordError`,
183
+ `InvalidLayerSourceError`, `InvalidHierarchyError`, `InvalidNetworkError`) are
184
+ exported. `resolvePlot` gives a `surface` that nothing in its fallback chain can
185
+ draw one last candidate: a `rect` over the same grid, coloured by
186
+ `color ?? z`.
187
+
188
+ Migration: the `Mark` and `Channel` unions are widened, so an exhaustive
189
+ `switch` (or a `Record<Mark, …>` / `Record<Channel, …>`) over either needs a
190
+ case for `"surface"` and `"parent"`. A `{ kind: "parallel" }` and a
191
+ `{ kind: "hierarchy", layout }` coordinate system stay valid. `ScaleSpec.nice`
192
+ widens from `boolean` to `boolean | number | CalendarIntervalSpec` and
193
+ `BinTransform.step` from `number` to `number | CalendarIntervalSpec`
194
+ (`CalendarIntervalSpec` is a calendar unit or `{ unit, step? }`): code that
195
+ reads either from a spec must handle the new forms.
196
+ - 0b4fe43: `resolveView(spec, data, capabilities, options)` resolves a whole view for a
197
+ renderer: each plot through its fallback chain against the renderer's
198
+ capabilities and what model-chart can resolve (`RESOLVER_SUPPORT`), with the
199
+ inherited coordinate system, `maxMarks` checked after transforms
200
+ (`mark count N (limit M)`) and a `crs` other than WGS 84 declined
201
+ (`crs X`); transforms applied; scales shared across a layer composition and,
202
+ unless `sharedScales` is false, across a facet's cells; guides (axes and
203
+ legends with their titles, gridlines and tick settings); and the coordinate
204
+ system (`cartesian` with its dimension, `polar` angles, the checked
205
+ `geographic` projection, `parallel` axes with their own scales, `hierarchy`
206
+ parent rows and `network` node and link index tables). The result is a tree of
207
+ `panel`, `facet`, `concat` and `table` nodes, plus every panel depth-first; a
208
+ root it cannot draw gives `kind: "table"` with the reasons and the frames, and
209
+ an undrawable concatenated view becomes a `table` node. A plot encoding `row`
210
+ or `column` is faceted by those fields; an `arc` with `theta` and no `theta2`
211
+ in polar coordinates stacks `theta` (the pie); annotations widen continuous
212
+ domains. `layerSeries(layer, panel)` gives a line or area layer's paths.
213
+
214
+ Two subpaths keep their dependencies away from the root:
215
+ `@ac-kit/model-chart/layout` lays hierarchy and network panels out in the
216
+ plot's unit square with `@ac-kit/math-graph` (`layoutHierarchy`,
217
+ `layoutNetwork`, `layoutNetworkAsync`, which takes an `AbortSignal`), and
218
+ `@ac-kit/model-chart/geographic` projects a map layer's points and GeoJSON
219
+ geometries with `@ac-kit/math-map-projection` (`projectGeographicLayer`), cut
220
+ at the map's edge, with the bounds a renderer fits. `RESOLVER_SUPPORT`
221
+ includes the `transverse-mercator` projection.
222
+
223
+ Migration: `resolvePlot` is unchanged; a renderer that resolved scales itself
224
+ can call `resolveView` instead.
225
+ - 0b4fe43: Resolved scales come with allocation-free kernels. `scaleTransform` and
226
+ `scaleInvertTransform` map a value into and out of the space where a position
227
+ scale is affine (identity for linear and time, `log_b`, signed power, signed
228
+ `log1p`); a value outside the transform's domain gives NaN and nothing throws.
229
+ `scaleNormalize` gives the `[0, 1]` position, piecewise about a diverging
230
+ midpoint, clamped in data space like d3, mirrored by `reverse`, and ½ for a zero
231
+ span. The array forms (`scaleTransformArray`, `scaleNormalizeArray`,
232
+ `scaleDiscreteIndexArray`, `scaleClassIndexArray`) take `out` first, accept
233
+ `out` as the input for in-place use, and throw `RangeError` on unequal lengths.
234
+ They allocate nothing per pass, whatever mix of scale kinds a caller
235
+ alternates: the first call for a scale object caches its constants (resolved
236
+ scales are immutable records). `scaleBandGeometry` gives the start, step and
237
+ bandwidth of band and point scales. All match d3-scale's log, pow, symlog, band, point, quantile, quantize
238
+ and threshold scales.
239
+ - 0b4fe43: `scaleTicks(scale, { count, visible, values })` gives a resolved scale's axis
240
+ ticks, each with its value, transformed-space position and whether it is major.
241
+ Linear and pow scales give d3's `ticks` with the decimal `precision` to format
242
+ them; symlog scales give `symlogTicks` with the scale's constant (decades
243
+ beyond `±constant`, linear ticks inside) and the `precision` that prints every
244
+ tick exactly; log scales give `logTicks` (a tick is major exactly when it is a
245
+ whole power of the base, with no tolerance); time
246
+ scales give calendar ticks in the scale's time zone and week start, with their
247
+ `unit` and `step`; discrete scales give the band indices and binning scales
248
+ their thresholds; identity gives `{ kind: "none" }`. `visible` (a zoomed range
249
+ in transformed space, ends in either order) restricts the ticks to those whose
250
+ transformed position lies in it, without rounding through the inverse
251
+ transform: a `visible` equal to the transformed domain gives exactly the
252
+ domain's ticks. `values` replaces them with exactly those inside `visible`,
253
+ with the `precision` that prints each one returned exactly. A
254
+ non-positive `count` throws `RangeError`.
255
+
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies [0b4fe43]
259
+ - Updated dependencies [0b4fe43]
260
+ - Updated dependencies [0b4fe43]
261
+ - Updated dependencies [0b4fe43]
262
+ - Updated dependencies [0b4fe43]
263
+ - Updated dependencies [0b4fe43]
264
+ - Updated dependencies [0b4fe43]
265
+ - Updated dependencies [0b4fe43]
266
+ - Updated dependencies [0b4fe43]
267
+ - Updated dependencies [0b4fe43]
268
+ - Updated dependencies [0b4fe43]
269
+ - Updated dependencies [0b4fe43]
270
+ - Updated dependencies [0b4fe43]
271
+ - Updated dependencies [0b4fe43]
272
+ - Updated dependencies [0b4fe43]
273
+ - Updated dependencies [0b4fe43]
274
+ - Updated dependencies [0b4fe43]
275
+ - Updated dependencies [0b4fe43]
276
+ - Updated dependencies [0b4fe43]
277
+ - Updated dependencies [0b4fe43]
278
+ - Updated dependencies [0b4fe43]
279
+ - Updated dependencies [0b4fe43]
280
+ - Updated dependencies [0b4fe43]
281
+ - Updated dependencies [0b4fe43]
282
+ - Updated dependencies [0b4fe43]
283
+ - Updated dependencies [0b4fe43]
284
+ - Updated dependencies [0b4fe43]
285
+ - Updated dependencies [0b4fe43]
286
+ - Updated dependencies [0b4fe43]
287
+ - Updated dependencies [0b4fe43]
288
+ - Updated dependencies [0b4fe43]
289
+ - Updated dependencies [0b4fe43]
290
+ - Updated dependencies [0b4fe43]
291
+ - Updated dependencies [0b4fe43]
292
+ - Updated dependencies [0b4fe43]
293
+ - Updated dependencies [0b4fe43]
294
+ - Updated dependencies [0b4fe43]
295
+ - Updated dependencies [0b4fe43]
296
+ - Updated dependencies [0b4fe43]
297
+ - Updated dependencies [0b4fe43]
298
+ - Updated dependencies [0b4fe43]
299
+ - Updated dependencies [0b4fe43]
300
+ - Updated dependencies [0b4fe43]
301
+ - Updated dependencies [0b4fe43]
302
+ - Updated dependencies [0b4fe43]
303
+ - Updated dependencies [0b4fe43]
304
+ - @ac-kit/algo@0.6.0
305
+ - @ac-kit/core@0.13.0
306
+ - @ac-kit/math-geometry@0.4.0
307
+ - @ac-kit/math-graph@0.2.0
308
+ - @ac-kit/math-linear@0.4.0
309
+ - @ac-kit/math-map-projection@0.2.0
310
+ - @ac-kit/math-scalar@0.4.0
311
+ - @ac-kit/math-stats@0.6.0
312
+ - @ac-kit/model-dataset@0.3.0
313
+
3
314
  ## 0.2.0
4
315
 
5
316
  ### Minor Changes
package/README.md CHANGED
@@ -29,6 +29,12 @@ the primitive rather than the picture is what keeps the catalogue open: a chart
29
29
  nobody anticipated is a combination of marks and channels that already exist,
30
30
  not a new type someone has to add.
31
31
 
32
+ A grouped bar chart is `mark: "bar"` with a categorical `x` and the
33
+ subcategory on `xOffset` (or `y` and `yOffset`): the offset has a band scale of
34
+ its own, its sub-bands touching, that a renderer lays across each band of the
35
+ parent axis; it has no guide, the parent's axis and the colour legend telling
36
+ the bars apart. A quantitative offset jitters marks within the band.
37
+
32
38
  ## Contents
33
39
 
34
40
  | Group | Exports |
@@ -43,6 +49,13 @@ not a new type someone has to add.
43
49
  | Data | `DataSources`, `resolveDataSource`, `assertDataReferences`, `UnknownDataSourceError`, `InvalidNodeSourceError` |
44
50
  | Annotations | `AnnotationSpec` |
45
51
  | Rendering | `RendererCapabilities`, `canRender`, `resolvePlot`, `unsupportedFeatures` |
52
+ | Resolve | `resolveScale`, `scaleChannelOf`, `ScaleInput`, `ResolvedScale` and its kinds, `ResolveOptions`; the scale kernels `scaleTransform`, `scaleNormalizeArray`, `scaleDiscreteIndexArray`, `scaleClassIndexArray`, `scaleBandGeometry`; the ticks `scaleTicks`, `ScaleTicks`, `ScaleTick`, `ScaleTicksOptions` |
53
+ | View | `resolveView`, `ResolveViewResult`, `ResolvedView`, `ResolvedNode`, `ResolvedPanel`, `ResolvedLayer`, `ResolvedChannel`, `ResolvedGuide`, `ResolvedCoord`, `ResolvedTable`; `layerSeries`, `LayerSeries` |
54
+ | Mark geometry | `layerPositions`, `layerChannelNumbers`, `layerBaseline`, `layerBoxes`, `LayerBoxes`, `LayerBoxesOptions`, `layerSegments`, `LayerSegments`, `polarSpaceLayer`, `scaleValuePosition`, `BandPart`, `CONTINUOUS_BAND_FILL`; tick labels `scaleTickPositions`, `scaleTickFormatter`, `ScaleTickFormatOptions`; colour schemes `namedColorScheme`, `NamedColorScheme` |
55
+ | Transforms (run) | `applyTransforms`, `ApplyTransformsOptions`, `RESOLVABLE_TRANSFORMS` |
56
+ | `./layout` | `layoutHierarchy`, `layoutNetwork`, `layoutNetworkAsync`, `ChartLayoutOptions` |
57
+ | `./geographic` | `projectGeographicLayer`, `GeographicLayerProjection`, `GeographicShape` |
58
+ | `./testing` | `VEGA_LITE_CASES`, `vegaLiteCaseFrame`, `VegaLiteCase`, `VegaLiteCaseName`, `VegaLiteArc`; `VEGA_HIERARCHY_CASES`, `vegaHierarchyFrame`, `VegaHierarchyCase`, `VegaHierarchyCaseName`, `VegaHierarchyNode`; `VEGA_LITE_MAPS`, `vegaLiteMapCitiesFrame`, `vegaLiteMapRegionsFrame`, `VegaLiteMapCase`, `VegaLiteMapCaseName`, `VegaLiteMapPoint`, `VegaLiteMapBounds`, `VegaLiteMapRegion` |
46
59
 
47
60
  ## Nothing here is in output units
48
61
 
@@ -64,10 +77,12 @@ result is the signal to apply the universal fallback and render the underlying
64
77
  frame as a table. Every spec carries a `description` so a renderer that declines
65
78
  still has something to say.
66
79
 
67
- `dimensions`, `projections` and `layouts` are optional: absent means no
68
- restriction, so a renderer that predates them is unaffected. Declared, they make
69
- `unsupportedFeatures` report `dimension 3`, `projection albers-usa` or
70
- `layout pack` for a spec that needs what the renderer lacks.
80
+ `dimensions`, `projections`, `layouts` and `coordMarks` are optional: absent
81
+ means no restriction, so a renderer that predates them is unaffected. Declared,
82
+ they make `unsupportedFeatures` report `dimension 3`, `projection albers-usa`,
83
+ `layout pack` or `mark "polygon" in polar coordinates` for a spec that needs
84
+ what the renderer lacks. `coordMarks` maps a coordinate system to the marks
85
+ drawn in it; one it leaves out takes every mark of `marks`.
71
86
 
72
87
  ## Named data sources
73
88
 
@@ -107,3 +122,158 @@ which one to apply, not how.
107
122
  See the
108
123
  [generated API docs](https://anthochamp.pages.grenadine.io/node-essentials/api/model-chart/)
109
124
  for the full reference.
125
+
126
+ ## Resolving a view
127
+
128
+ `resolveView(spec, data, capabilities, options)` does what every renderer would
129
+ otherwise repeat: it walks each plot's fallback chain against the renderer's
130
+ capabilities and what model-chart can resolve (`RESOLVER_SUPPORT`), applies the
131
+ transforms, resolves the scales (shared across a layer composition, and across
132
+ a facet's cells unless `sharedScales` is false), the guides and the coordinate
133
+ system, and returns a tree of panels. A root it cannot draw comes back as
134
+ `kind: "table"` with the reasons and the frames to show instead; inside a
135
+ concatenation, an undrawable view becomes a `table` node. Spec and data errors
136
+ throw; renderer limits decline.
137
+
138
+ ```ts
139
+ import { dataFrameFromColumns } from "@ac-kit/model-dataset";
140
+ import { resolveView, scaleNormalizeArray } from "@ac-kit/model-chart";
141
+
142
+ const frame = dataFrameFromColumns(
143
+ [
144
+ { name: "speed", kind: "quantitative" },
145
+ { name: "cost", kind: "quantitative" },
146
+ ],
147
+ [Float64Array.of(6, 18, 48), Float64Array.of(1.5, 9, 4)],
148
+ );
149
+ const result = resolveView(
150
+ { mark: "point", encoding: { x: { field: "speed" }, y: { field: "cost" } } },
151
+ frame,
152
+ {
153
+ marks: new Set(["point"]),
154
+ coords: new Set(["cartesian"]),
155
+ channels: new Set(["x", "y"]),
156
+ transforms: new Set(),
157
+ colorDepth: 24,
158
+ continuous: true,
159
+ },
160
+ );
161
+ if (result.kind === "chart") {
162
+ const [panel] = result.view.panels;
163
+ const x = panel!.scales.get("x")!; // linear, domain [0, 50]: zero and nice
164
+ if (x.kind === "linear") {
165
+ // [0.12, 0.36, 0.96], ready for any output's own units.
166
+ scaleNormalizeArray(new Float64Array(3), Float64Array.of(6, 18, 48), x);
167
+ }
168
+ }
169
+ ```
170
+
171
+ ### Normalised positions
172
+
173
+ Scales declare domains, never ranges. A renderer maps a value to `[0, 1]` with
174
+ `scaleNormalize` or, for a whole column, `scaleNormalizeArray` into a buffer it
175
+ owns (0 B per pass), then to pixels, cells or radians itself; band and point
176
+ scales give `scaleBandGeometry`, binning scales `scaleClassIndexArray`, and
177
+ `scaleTicks` the ticks of an axis, including those of a zoomed range.
178
+
179
+ ### Placing marks
180
+
181
+ The geometry every renderer would otherwise repeat is resolved here too, still
182
+ in the panel's unit square. `layerPositions(layer, channel, { part })` gives a
183
+ position channel per mark — band and point scales at the start, centre or end
184
+ of their band, offsets (`xOffset`, `yOffset`) laid across the parent's band, a
185
+ constant on its axis' scale, a grid's lattice at cell centres or edges.
186
+ `layerBoxes` gives the box of every bar, rect and arc (a bar grows from
187
+ `layerBaseline`, a rect without its `2` channel spans
188
+ `CONTINUOUS_BAND_FILL` of the least gap; `{ rows }` keeps only the marks a
189
+ legend shows), `layerSegments` every rule;
190
+ `polarSpaceLayer` reads a polar layer's theta and radius as x and y so the
191
+ same geometry applies. `scaleTickPositions` and `scaleTickFormatter` place
192
+ and label the ticks `scaleTicks` returns (d3's multi-scale labels for time),
193
+ and `namedColorScheme` finds a spec's scheme name among
194
+ `@ac-kit/math-color`'s, Vega's short names included. `@ac-kit/format-svg/chart`
195
+ draws with these alone.
196
+
197
+ ### Time zones
198
+
199
+ Domains are epoch milliseconds and never depend on a zone. The zone
200
+ (`options.timeZone`, default `"UTC"`) and week start are fixed once on each time
201
+ scale; they decide only calendar ticks, a time scale's `nice` and temporal
202
+ bins. `nice` takes `true`, a tick count, or a calendar interval (`"month"`,
203
+ `{ unit: "month", step: 3 }`), and a temporal `bin` takes a calendar `step`
204
+ the same way, as Vega-Lite's `TimeInterval`.
205
+
206
+ ### Grids
207
+
208
+ A layer may read a `DataGrid` (`@ac-kit/model-dataset`): its x and y fields are
209
+ continuous lattice axes (cell edges for `rect`, centres otherwise) and its value
210
+ field feeds `z`, `color` or any other channel. `rect`, `surface`, `point` and
211
+ `text` read grids; a `surface` that a 2D renderer cannot draw falls back to a
212
+ `rect` coloured by its height.
213
+
214
+ ### Layouts and maps
215
+
216
+ Hierarchy and network panels carry index tables (parent rows, node keys, link
217
+ ends); `@ac-kit/model-chart/layout` turns them into positions in the plot's
218
+ unit square with `@ac-kit/math-graph`'s layouts (`layoutHierarchy`,
219
+ `layoutNetwork` and its cancellable `layoutNetworkAsync`).
220
+ `@ac-kit/model-chart/geographic` projects a map layer's points and GeoJSON
221
+ geometries with `@ac-kit/math-map-projection` (`projectGeographicLayer`), cut
222
+ at the map's edge. Both are subpaths, so terminal and SVG renderers that need
223
+ neither don't load them.
224
+
225
+ ### Stack offsets
226
+
227
+ `applyTransforms` runs `stack` with five offsets. `zero` stacks positives up
228
+ and negatives down from 0, and `normalize` divides each stack by its total.
229
+ The three others stack magnitudes and differ only in where each stack sits:
230
+
231
+ | Offset | Baseline of each stack | As |
232
+ | ------------ | -------------------------------------------------------- | ------------------------------- |
233
+ | `center` | half of what it lacks to match the tallest stack | Vega's `center` |
234
+ | `silhouette` | −total/2, so every stack centres on 0 | d3's `stackOffsetSilhouette` |
235
+ | `wiggle` | the one minimising the layers' thickness-weighted wiggle | d3's `stackOffsetWiggle` |
236
+
237
+ `wiggle` is Byron and Wattenberg's streamgraph baseline ("Stacked Graphs –
238
+ Geometry & Aesthetics", 2008). It reads the stacks in the order their groups
239
+ first appear, so sort by the position field first. It needs `series`, the
240
+ fields naming each row's layer. With `series`, every offset matches layers by
241
+ key, so a layer sits at the same height in every stack and counts as zero
242
+ where it has no row. Layers stack bottom up in the order their keys first
243
+ appear.
244
+
245
+ ## Testing a renderer against Vega-Lite
246
+
247
+ `@ac-kit/model-chart/testing` holds Vega-Lite's examples as Vega-Lite 5.23
248
+ compiled them and Vega 5.33 ran them: each case's spec, its rows and the
249
+ scale domains Vega computed, and for the polar cases (`donut`, `radial`) the
250
+ sectors Vega drew (`arcs`). A renderer translates a case to a model-chart spec
251
+ and checks the axes, legends and marks it draws against them.
252
+ `VEGA_HIERARCHY_CASES` holds Vega's `treemap`, `partition` and `tree` (tidy and
253
+ cluster) transforms over one tree (`vegaHierarchyFrame()`), as fractions of
254
+ the layout box, for checking a hierarchy's nodes. `VEGA_LITE_MAPS` holds maps
255
+ of eight cities and three regions (one across the antimeridian, one with a
256
+ hole) in eight projections, globes included, with the places and shape bounds
257
+ Vega-Lite drew as fractions of the box of everything drawn
258
+ (`vegaLiteMapCitiesFrame(name)`, `vegaLiteMapRegionsFrame(name)`), for checking
259
+ a geographic panel.
260
+
261
+ ```ts
262
+ import { resolveView } from "@ac-kit/model-chart";
263
+ import { VEGA_LITE_CASES, vegaLiteCaseFrame } from "@ac-kit/model-chart/testing";
264
+
265
+ const result = resolveView(
266
+ { mark: "point", encoding: { x: { field: "u" }, y: { field: "v" } } },
267
+ vegaLiteCaseFrame("scatter"),
268
+ {
269
+ marks: new Set(["point"]),
270
+ coords: new Set(["cartesian"]),
271
+ channels: new Set(["x", "y"]),
272
+ transforms: new Set(),
273
+ colorDepth: 24,
274
+ continuous: true,
275
+ },
276
+ );
277
+ // Vega's x domain: [0, 100]
278
+ console.log(VEGA_LITE_CASES.scatter.scales.x, result.kind);
279
+ ```
@@ -0,0 +1,2 @@
1
+ export * from "./project-geographic-layer.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/geographic/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./project-geographic-layer.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/geographic/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { type GeometryOptions, type Projection, type VertexRuns } from "@ac-kit/math-map-projection";
2
+ import type { ResolvedGeographicCoord, ResolvedLayer } from "../resolve/view-types.js";
3
+ /**
4
+ * One row's geometry in the plane, by the way it is drawn: points (2 numbers
5
+ * each), polylines to stroke and polygon rings to fill with the non-zero
6
+ * winding rule. A collection fills all three; a ring or a line cut by the map's
7
+ * edge comes back as several runs.
8
+ */
9
+ export type GeographicShape = {
10
+ readonly points: Float64Array;
11
+ readonly lines: VertexRuns;
12
+ readonly polygons: VertexRuns;
13
+ };
14
+ /** A geographic layer projected onto its map's plane (x east, y north). */
15
+ export type GeographicLayerProjection = {
16
+ readonly projection: Projection;
17
+ /**
18
+ * 2 per row from the `longitude` and `latitude` channels (degrees); NaN for a
19
+ * missing coordinate or a point off the map (outside the projection's domain
20
+ * or beyond an azimuthal projection's clip angle). `undefined` without them.
21
+ */
22
+ readonly positions: Float64Array | undefined;
23
+ /** Per row of a `geometry` channel; `undefined` for a missing geometry. */
24
+ readonly shapes: readonly (GeographicShape | undefined)[] | undefined;
25
+ /**
26
+ * `[minX, minY, maxX, maxY]` of every finite point projected, the box a
27
+ * renderer fits; `[∞, ∞, −∞, −∞]` when nothing landed on the map.
28
+ */
29
+ readonly bounds: Float64Array;
30
+ };
31
+ /** Options of {@link projectGeographicLayer}. */
32
+ export type ProjectGeographicLayerOptions = GeometryOptions & {
33
+ /**
34
+ * Angular radius, radians, of an azimuthal projection's map (its default
35
+ * otherwise); see math-map-projection's `ProjectionOptions`.
36
+ */
37
+ readonly clipAngle?: number;
38
+ };
39
+ /**
40
+ * Projects a layer of a geographic panel: `projectionCreate` of the panel's
41
+ * projection, then the `longitude`/`latitude` channels as points (degrees, as
42
+ * GeoJSON) and each row of the `geometry` channel cut at the map's edge and
43
+ * resampled (`projectionPolylineProject`, `projectionPolygonProject`; GeoJSON
44
+ * positions in degrees, closed rings with their repeated last position, RFC
45
+ * 7946 winding).
46
+ *
47
+ * O(points + vertices × samples per arc).
48
+ *
49
+ * @throws {RangeError} From `projectionCreate` or the geometry functions (bad
50
+ * options, too many vertices); `UnsupportedError` for a projection not
51
+ * built.
52
+ */
53
+ export declare function projectGeographicLayer(layer: ResolvedLayer, coord: ResolvedGeographicCoord, options?: ProjectGeographicLayerOptions): GeographicLayerProjection;
54
+ //# sourceMappingURL=project-geographic-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-geographic-layer.d.ts","sourceRoot":"","sources":["../../src/geographic/project-geographic-layer.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,UAAU,EAIf,KAAK,UAAU,EACf,MAAM,6BAA6B,CAAC;AAUrC,OAAO,KAAK,EACX,uBAAuB,EACvB,aAAa,EACb,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;CAC9B,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,yBAAyB,GAAG;IACvC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,YAAY,GAAG,SAAS,CAAC;IAC7C,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC;IACtE;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC9B,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,6BAA6B,GAAG,eAAe,GAAG;IAC7D;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AA6GF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,uBAAuB,EAC9B,OAAO,GAAE,6BAAkC,GACzC,yBAAyB,CA8D3B"}