ol 9.0.0-dev.1707154322322 → 9.0.0-dev.1707413332477
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/Map.d.ts +5 -10
- package/Map.d.ts.map +1 -1
- package/Map.js +3 -17
- package/VectorRenderTile.d.ts +0 -7
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorRenderTile.js +0 -6
- package/dist/ol.d.ts +2 -0
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/layer/BaseVector.d.ts +7 -22
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +12 -20
- package/layer/Layer.d.ts +12 -0
- package/layer/Layer.d.ts.map +1 -1
- package/layer/Layer.js +23 -0
- package/layer/VectorImage.d.ts +10 -6
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +5 -3
- package/layer/VectorTile.d.ts +22 -30
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +10 -14
- package/package.json +1 -1
- package/render/VectorContext.d.ts +22 -11
- package/render/VectorContext.d.ts.map +1 -1
- package/render/VectorContext.js +22 -11
- package/render/canvas/Builder.d.ts +2 -1
- package/render/canvas/Builder.d.ts.map +1 -1
- package/render/canvas/Builder.js +19 -3
- package/render/canvas/Executor.d.ts +18 -7
- package/render/canvas/Executor.d.ts.map +1 -1
- package/render/canvas/Executor.js +101 -57
- package/render/canvas/ExecutorGroup.d.ts +39 -9
- package/render/canvas/ExecutorGroup.d.ts.map +1 -1
- package/render/canvas/ExecutorGroup.js +96 -25
- package/render/canvas/ImageBuilder.d.ts +1 -1
- package/render/canvas/ImageBuilder.d.ts.map +1 -1
- package/render/canvas/ImageBuilder.js +30 -8
- package/render/canvas/Immediate.d.ts +11 -0
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/LineStringBuilder.d.ts.map +1 -1
- package/render/canvas/LineStringBuilder.js +6 -4
- package/render/canvas/PolygonBuilder.d.ts.map +1 -1
- package/render/canvas/PolygonBuilder.js +9 -6
- package/render/canvas/TextBuilder.d.ts +4 -0
- package/render/canvas/TextBuilder.d.ts.map +1 -1
- package/render/canvas/TextBuilder.js +15 -6
- package/render/canvas/ZIndexContext.d.ts +56 -0
- package/render/canvas/ZIndexContext.d.ts.map +1 -0
- package/render/canvas/ZIndexContext.js +112 -0
- package/render/canvas/style.d.ts.map +1 -1
- package/render/canvas/style.js +9 -2
- package/render/canvas.d.ts +2 -2
- package/render/canvas.d.ts.map +1 -1
- package/render/canvas.js +6 -2
- package/renderer/Composite.d.ts +3 -2
- package/renderer/Composite.d.ts.map +1 -1
- package/renderer/Composite.js +26 -19
- package/renderer/Layer.d.ts +4 -0
- package/renderer/Layer.d.ts.map +1 -1
- package/renderer/Layer.js +5 -0
- package/renderer/Map.d.ts +0 -4
- package/renderer/Map.d.ts.map +1 -1
- package/renderer/Map.js +0 -5
- package/renderer/canvas/Layer.d.ts +4 -0
- package/renderer/canvas/Layer.d.ts.map +1 -1
- package/renderer/canvas/Layer.js +32 -0
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorImageLayer.js +8 -1
- package/renderer/canvas/VectorLayer.d.ts +6 -5
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.js +55 -58
- package/renderer/canvas/VectorTileLayer.d.ts +14 -3
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +129 -60
- package/renderer/vector.d.ts +3 -2
- package/renderer/vector.d.ts.map +1 -1
- package/renderer/vector.js +68 -126
- package/renderer/webgl/PointsLayer.d.ts +1 -0
- package/renderer/webgl/PointsLayer.d.ts.map +1 -1
- package/renderer/webgl/PointsLayer.js +2 -0
- package/source/Raster.js +1 -1
- package/source/WMTS.js +1 -1
- package/style/Circle.d.ts +2 -2
- package/style/Circle.d.ts.map +1 -1
- package/style/Circle.js +1 -1
- package/style/Icon.d.ts +1 -1
- package/style/Icon.d.ts.map +1 -1
- package/style/Icon.js +1 -1
- package/style/Image.d.ts +7 -6
- package/style/Image.d.ts.map +1 -1
- package/style/Image.js +4 -3
- package/style/RegularShape.d.ts +2 -2
- package/style/RegularShape.d.ts.map +1 -1
- package/style/RegularShape.js +1 -1
- package/style/Style.d.ts +17 -0
- package/style/Style.d.ts.map +1 -1
- package/style/Style.js +10 -0
- package/style/Text.d.ts +16 -0
- package/style/Text.d.ts.map +1 -1
- package/style/Text.js +17 -0
- package/style/flat.d.ts +11 -6
- package/style/flat.d.ts.map +1 -1
- package/style/flat.js +4 -3
- package/util.js +1 -1
package/renderer/vector.js
CHANGED
|
@@ -70,15 +70,8 @@ export function getTolerance(resolution, pixelRatio) {
|
|
|
70
70
|
* @param {import("../geom/Circle.js").default} geometry Geometry.
|
|
71
71
|
* @param {import("../style/Style.js").default} style Style.
|
|
72
72
|
* @param {import("../Feature.js").default} feature Feature.
|
|
73
|
-
* @param {import("../render/canvas/BuilderGroup.js").default} [declutterBuilderGroup] Builder for decluttering.
|
|
74
73
|
*/
|
|
75
|
-
function renderCircleGeometry(
|
|
76
|
-
builderGroup,
|
|
77
|
-
geometry,
|
|
78
|
-
style,
|
|
79
|
-
feature,
|
|
80
|
-
declutterBuilderGroup,
|
|
81
|
-
) {
|
|
74
|
+
function renderCircleGeometry(builderGroup, geometry, style, feature) {
|
|
82
75
|
const fillStyle = style.getFill();
|
|
83
76
|
const strokeStyle = style.getStroke();
|
|
84
77
|
if (fillStyle || strokeStyle) {
|
|
@@ -88,10 +81,7 @@ function renderCircleGeometry(
|
|
|
88
81
|
}
|
|
89
82
|
const textStyle = style.getText();
|
|
90
83
|
if (textStyle && textStyle.getText()) {
|
|
91
|
-
const textReplay =
|
|
92
|
-
style.getZIndex(),
|
|
93
|
-
'Text',
|
|
94
|
-
);
|
|
84
|
+
const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
95
85
|
textReplay.setTextStyle(textStyle);
|
|
96
86
|
textReplay.drawText(geometry, feature);
|
|
97
87
|
}
|
|
@@ -104,7 +94,8 @@ function renderCircleGeometry(
|
|
|
104
94
|
* @param {number} squaredTolerance Squared tolerance.
|
|
105
95
|
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
106
96
|
* @param {import("../proj.js").TransformFunction} [transform] Transform from user to view projection.
|
|
107
|
-
* @param {
|
|
97
|
+
* @param {boolean} [declutter] Enable decluttering.
|
|
98
|
+
* @param {number} [index] Render order index..
|
|
108
99
|
* @return {boolean} `true` if style is loading.
|
|
109
100
|
*/
|
|
110
101
|
export function renderFeature(
|
|
@@ -114,7 +105,8 @@ export function renderFeature(
|
|
|
114
105
|
squaredTolerance,
|
|
115
106
|
listener,
|
|
116
107
|
transform,
|
|
117
|
-
|
|
108
|
+
declutter,
|
|
109
|
+
index,
|
|
118
110
|
) {
|
|
119
111
|
const loadingPromises = [];
|
|
120
112
|
const imageStyle = style.getImage();
|
|
@@ -146,7 +138,8 @@ export function renderFeature(
|
|
|
146
138
|
style,
|
|
147
139
|
squaredTolerance,
|
|
148
140
|
transform,
|
|
149
|
-
|
|
141
|
+
declutter,
|
|
142
|
+
index,
|
|
150
143
|
);
|
|
151
144
|
|
|
152
145
|
return loading;
|
|
@@ -158,7 +151,8 @@ export function renderFeature(
|
|
|
158
151
|
* @param {import("../style/Style.js").default} style Style.
|
|
159
152
|
* @param {number} squaredTolerance Squared tolerance.
|
|
160
153
|
* @param {import("../proj.js").TransformFunction} [transform] Optional transform function.
|
|
161
|
-
* @param {
|
|
154
|
+
* @param {boolean} [declutter] Enable decluttering.
|
|
155
|
+
* @param {number} [index] Render order index..
|
|
162
156
|
*/
|
|
163
157
|
function renderFeatureInternal(
|
|
164
158
|
replayGroup,
|
|
@@ -166,7 +160,8 @@ function renderFeatureInternal(
|
|
|
166
160
|
style,
|
|
167
161
|
squaredTolerance,
|
|
168
162
|
transform,
|
|
169
|
-
|
|
163
|
+
declutter,
|
|
164
|
+
index,
|
|
170
165
|
) {
|
|
171
166
|
const geometry = style.getGeometryFunction()(feature);
|
|
172
167
|
if (!geometry) {
|
|
@@ -178,7 +173,7 @@ function renderFeatureInternal(
|
|
|
178
173
|
);
|
|
179
174
|
const renderer = style.getRenderer();
|
|
180
175
|
if (renderer) {
|
|
181
|
-
renderGeometry(replayGroup, simplifiedGeometry, style, feature);
|
|
176
|
+
renderGeometry(replayGroup, simplifiedGeometry, style, feature, index);
|
|
182
177
|
} else {
|
|
183
178
|
const geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];
|
|
184
179
|
geometryRenderer(
|
|
@@ -186,7 +181,8 @@ function renderFeatureInternal(
|
|
|
186
181
|
simplifiedGeometry,
|
|
187
182
|
style,
|
|
188
183
|
feature,
|
|
189
|
-
|
|
184
|
+
index,
|
|
185
|
+
declutter,
|
|
190
186
|
);
|
|
191
187
|
}
|
|
192
188
|
}
|
|
@@ -196,15 +192,16 @@ function renderFeatureInternal(
|
|
|
196
192
|
* @param {import("../geom/Geometry.js").default|import("../render/Feature.js").default} geometry Geometry.
|
|
197
193
|
* @param {import("../style/Style.js").default} style Style.
|
|
198
194
|
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
|
195
|
+
* @param {number} [index] Render order index.
|
|
199
196
|
*/
|
|
200
|
-
function renderGeometry(replayGroup, geometry, style, feature) {
|
|
197
|
+
function renderGeometry(replayGroup, geometry, style, feature, index) {
|
|
201
198
|
if (geometry.getType() == 'GeometryCollection') {
|
|
202
199
|
const geometries =
|
|
203
200
|
/** @type {import("../geom/GeometryCollection.js").default} */ (
|
|
204
201
|
geometry
|
|
205
202
|
).getGeometries();
|
|
206
203
|
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
207
|
-
renderGeometry(replayGroup, geometries[i], style, feature);
|
|
204
|
+
renderGeometry(replayGroup, geometries[i], style, feature, index);
|
|
208
205
|
}
|
|
209
206
|
return;
|
|
210
207
|
}
|
|
@@ -214,6 +211,7 @@ function renderGeometry(replayGroup, geometry, style, feature) {
|
|
|
214
211
|
feature,
|
|
215
212
|
style.getRenderer(),
|
|
216
213
|
style.getHitDetectionRenderer(),
|
|
214
|
+
index,
|
|
217
215
|
);
|
|
218
216
|
}
|
|
219
217
|
|
|
@@ -223,6 +221,7 @@ function renderGeometry(replayGroup, geometry, style, feature) {
|
|
|
223
221
|
* @param {import("../style/Style.js").default} style Style.
|
|
224
222
|
* @param {import("../Feature.js").default} feature Feature.
|
|
225
223
|
* @param {import("../render/canvas/BuilderGroup.js").default} [declutterBuilderGroup] Builder for decluttering.
|
|
224
|
+
* @param {number} [index] Render order index.
|
|
226
225
|
*/
|
|
227
226
|
function renderGeometryCollectionGeometry(
|
|
228
227
|
replayGroup,
|
|
@@ -230,6 +229,7 @@ function renderGeometryCollectionGeometry(
|
|
|
230
229
|
style,
|
|
231
230
|
feature,
|
|
232
231
|
declutterBuilderGroup,
|
|
232
|
+
index,
|
|
233
233
|
) {
|
|
234
234
|
const geometries = geometry.getGeometriesArray();
|
|
235
235
|
let i, ii;
|
|
@@ -241,6 +241,7 @@ function renderGeometryCollectionGeometry(
|
|
|
241
241
|
style,
|
|
242
242
|
feature,
|
|
243
243
|
declutterBuilderGroup,
|
|
244
|
+
index,
|
|
244
245
|
);
|
|
245
246
|
}
|
|
246
247
|
}
|
|
@@ -250,14 +251,14 @@ function renderGeometryCollectionGeometry(
|
|
|
250
251
|
* @param {import("../geom/LineString.js").default|import("../render/Feature.js").default} geometry Geometry.
|
|
251
252
|
* @param {import("../style/Style.js").default} style Style.
|
|
252
253
|
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
|
253
|
-
* @param {
|
|
254
|
+
* @param {number} [index] Render order index.
|
|
254
255
|
*/
|
|
255
256
|
function renderLineStringGeometry(
|
|
256
257
|
builderGroup,
|
|
257
258
|
geometry,
|
|
258
259
|
style,
|
|
259
260
|
feature,
|
|
260
|
-
|
|
261
|
+
index,
|
|
261
262
|
) {
|
|
262
263
|
const strokeStyle = style.getStroke();
|
|
263
264
|
if (strokeStyle) {
|
|
@@ -266,16 +267,13 @@ function renderLineStringGeometry(
|
|
|
266
267
|
'LineString',
|
|
267
268
|
);
|
|
268
269
|
lineStringReplay.setFillStrokeStyle(null, strokeStyle);
|
|
269
|
-
lineStringReplay.drawLineString(geometry, feature);
|
|
270
|
+
lineStringReplay.drawLineString(geometry, feature, index);
|
|
270
271
|
}
|
|
271
272
|
const textStyle = style.getText();
|
|
272
273
|
if (textStyle && textStyle.getText()) {
|
|
273
|
-
const textReplay =
|
|
274
|
-
style.getZIndex(),
|
|
275
|
-
'Text',
|
|
276
|
-
);
|
|
274
|
+
const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
277
275
|
textReplay.setTextStyle(textStyle);
|
|
278
|
-
textReplay.drawText(geometry, feature);
|
|
276
|
+
textReplay.drawText(geometry, feature, index);
|
|
279
277
|
}
|
|
280
278
|
}
|
|
281
279
|
|
|
@@ -284,14 +282,14 @@ function renderLineStringGeometry(
|
|
|
284
282
|
* @param {import("../geom/MultiLineString.js").default|import("../render/Feature.js").default} geometry Geometry.
|
|
285
283
|
* @param {import("../style/Style.js").default} style Style.
|
|
286
284
|
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
|
287
|
-
* @param {
|
|
285
|
+
* @param {number} [index] Render order index.
|
|
288
286
|
*/
|
|
289
287
|
function renderMultiLineStringGeometry(
|
|
290
288
|
builderGroup,
|
|
291
289
|
geometry,
|
|
292
290
|
style,
|
|
293
291
|
feature,
|
|
294
|
-
|
|
292
|
+
index,
|
|
295
293
|
) {
|
|
296
294
|
const strokeStyle = style.getStroke();
|
|
297
295
|
if (strokeStyle) {
|
|
@@ -300,16 +298,13 @@ function renderMultiLineStringGeometry(
|
|
|
300
298
|
'LineString',
|
|
301
299
|
);
|
|
302
300
|
lineStringReplay.setFillStrokeStyle(null, strokeStyle);
|
|
303
|
-
lineStringReplay.drawMultiLineString(geometry, feature);
|
|
301
|
+
lineStringReplay.drawMultiLineString(geometry, feature, index);
|
|
304
302
|
}
|
|
305
303
|
const textStyle = style.getText();
|
|
306
304
|
if (textStyle && textStyle.getText()) {
|
|
307
|
-
const textReplay =
|
|
308
|
-
style.getZIndex(),
|
|
309
|
-
'Text',
|
|
310
|
-
);
|
|
305
|
+
const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
311
306
|
textReplay.setTextStyle(textStyle);
|
|
312
|
-
textReplay.drawText(geometry, feature);
|
|
307
|
+
textReplay.drawText(geometry, feature, index);
|
|
313
308
|
}
|
|
314
309
|
}
|
|
315
310
|
|
|
@@ -318,30 +313,27 @@ function renderMultiLineStringGeometry(
|
|
|
318
313
|
* @param {import("../geom/MultiPolygon.js").default} geometry Geometry.
|
|
319
314
|
* @param {import("../style/Style.js").default} style Style.
|
|
320
315
|
* @param {import("../Feature.js").default} feature Feature.
|
|
321
|
-
* @param {
|
|
316
|
+
* @param {number} [index] Render order index.
|
|
322
317
|
*/
|
|
323
318
|
function renderMultiPolygonGeometry(
|
|
324
319
|
builderGroup,
|
|
325
320
|
geometry,
|
|
326
321
|
style,
|
|
327
322
|
feature,
|
|
328
|
-
|
|
323
|
+
index,
|
|
329
324
|
) {
|
|
330
325
|
const fillStyle = style.getFill();
|
|
331
326
|
const strokeStyle = style.getStroke();
|
|
332
327
|
if (strokeStyle || fillStyle) {
|
|
333
328
|
const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');
|
|
334
329
|
polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);
|
|
335
|
-
polygonReplay.drawMultiPolygon(geometry, feature);
|
|
330
|
+
polygonReplay.drawMultiPolygon(geometry, feature, index);
|
|
336
331
|
}
|
|
337
332
|
const textStyle = style.getText();
|
|
338
333
|
if (textStyle && textStyle.getText()) {
|
|
339
|
-
const textReplay =
|
|
340
|
-
style.getZIndex(),
|
|
341
|
-
'Text',
|
|
342
|
-
);
|
|
334
|
+
const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
343
335
|
textReplay.setTextStyle(textStyle);
|
|
344
|
-
textReplay.drawText(geometry, feature);
|
|
336
|
+
textReplay.drawText(geometry, feature, index);
|
|
345
337
|
}
|
|
346
338
|
}
|
|
347
339
|
|
|
@@ -350,56 +342,35 @@ function renderMultiPolygonGeometry(
|
|
|
350
342
|
* @param {import("../geom/Point.js").default|import("../render/Feature.js").default} geometry Geometry.
|
|
351
343
|
* @param {import("../style/Style.js").default} style Style.
|
|
352
344
|
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
|
353
|
-
* @param {
|
|
345
|
+
* @param {number} [index] Render order index.
|
|
346
|
+
* @param {boolean} [declutter] Enable decluttering.
|
|
354
347
|
*/
|
|
355
348
|
function renderPointGeometry(
|
|
356
349
|
builderGroup,
|
|
357
350
|
geometry,
|
|
358
351
|
style,
|
|
359
352
|
feature,
|
|
360
|
-
|
|
353
|
+
index,
|
|
354
|
+
declutter,
|
|
361
355
|
) {
|
|
362
356
|
const imageStyle = style.getImage();
|
|
363
357
|
const textStyle = style.getText();
|
|
358
|
+
const hasText = textStyle && textStyle.getText();
|
|
364
359
|
/** @type {import("../render/canvas.js").DeclutterImageWithText} */
|
|
365
|
-
|
|
360
|
+
const declutterImageWithText =
|
|
361
|
+
declutter && imageStyle && hasText ? {} : undefined;
|
|
366
362
|
if (imageStyle) {
|
|
367
363
|
if (imageStyle.getImageState() != ImageState.LOADED) {
|
|
368
364
|
return;
|
|
369
365
|
}
|
|
370
|
-
|
|
371
|
-
if (declutterBuilderGroup) {
|
|
372
|
-
const declutterMode = imageStyle.getDeclutterMode();
|
|
373
|
-
if (declutterMode !== 'none') {
|
|
374
|
-
imageBuilderGroup = declutterBuilderGroup;
|
|
375
|
-
if (declutterMode === 'obstacle') {
|
|
376
|
-
// draw in non-declutter group:
|
|
377
|
-
const imageReplay = builderGroup.getBuilder(
|
|
378
|
-
style.getZIndex(),
|
|
379
|
-
'Image',
|
|
380
|
-
);
|
|
381
|
-
imageReplay.setImageStyle(imageStyle, declutterImageWithText);
|
|
382
|
-
imageReplay.drawPoint(geometry, feature);
|
|
383
|
-
} else if (textStyle && textStyle.getText()) {
|
|
384
|
-
declutterImageWithText = {};
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
const imageReplay = imageBuilderGroup.getBuilder(
|
|
389
|
-
style.getZIndex(),
|
|
390
|
-
'Image',
|
|
391
|
-
);
|
|
366
|
+
const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');
|
|
392
367
|
imageReplay.setImageStyle(imageStyle, declutterImageWithText);
|
|
393
|
-
imageReplay.drawPoint(geometry, feature);
|
|
368
|
+
imageReplay.drawPoint(geometry, feature, index);
|
|
394
369
|
}
|
|
395
|
-
if (
|
|
396
|
-
|
|
397
|
-
if (declutterBuilderGroup) {
|
|
398
|
-
textBuilderGroup = declutterBuilderGroup;
|
|
399
|
-
}
|
|
400
|
-
const textReplay = textBuilderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
370
|
+
if (hasText) {
|
|
371
|
+
const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
401
372
|
textReplay.setTextStyle(textStyle, declutterImageWithText);
|
|
402
|
-
textReplay.drawText(geometry, feature);
|
|
373
|
+
textReplay.drawText(geometry, feature, index);
|
|
403
374
|
}
|
|
404
375
|
}
|
|
405
376
|
|
|
@@ -408,56 +379,36 @@ function renderPointGeometry(
|
|
|
408
379
|
* @param {import("../geom/MultiPoint.js").default|import("../render/Feature.js").default} geometry Geometry.
|
|
409
380
|
* @param {import("../style/Style.js").default} style Style.
|
|
410
381
|
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
|
411
|
-
* @param {
|
|
382
|
+
* @param {number} [index] Render order index.
|
|
383
|
+
* @param {boolean} [declutter] Enable decluttering.
|
|
412
384
|
*/
|
|
413
385
|
function renderMultiPointGeometry(
|
|
414
386
|
builderGroup,
|
|
415
387
|
geometry,
|
|
416
388
|
style,
|
|
417
389
|
feature,
|
|
418
|
-
|
|
390
|
+
index,
|
|
391
|
+
declutter,
|
|
419
392
|
) {
|
|
420
393
|
const imageStyle = style.getImage();
|
|
394
|
+
const hasImage = imageStyle && imageStyle.getOpacity() !== 0;
|
|
421
395
|
const textStyle = style.getText();
|
|
396
|
+
const hasText = textStyle && textStyle.getText();
|
|
422
397
|
/** @type {import("../render/canvas.js").DeclutterImageWithText} */
|
|
423
|
-
|
|
424
|
-
|
|
398
|
+
const declutterImageWithText =
|
|
399
|
+
declutter && hasImage && hasText ? {} : undefined;
|
|
400
|
+
if (hasImage) {
|
|
425
401
|
if (imageStyle.getImageState() != ImageState.LOADED) {
|
|
426
402
|
return;
|
|
427
403
|
}
|
|
428
|
-
|
|
429
|
-
if (declutterBuilderGroup) {
|
|
430
|
-
const declutterMode = imageStyle.getDeclutterMode();
|
|
431
|
-
if (declutterMode !== 'none') {
|
|
432
|
-
imageBuilderGroup = declutterBuilderGroup;
|
|
433
|
-
if (declutterMode === 'obstacle') {
|
|
434
|
-
// draw in non-declutter group:
|
|
435
|
-
const imageReplay = builderGroup.getBuilder(
|
|
436
|
-
style.getZIndex(),
|
|
437
|
-
'Image',
|
|
438
|
-
);
|
|
439
|
-
imageReplay.setImageStyle(imageStyle, declutterImageWithText);
|
|
440
|
-
imageReplay.drawMultiPoint(geometry, feature);
|
|
441
|
-
} else if (textStyle && textStyle.getText()) {
|
|
442
|
-
declutterImageWithText = {};
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
const imageReplay = imageBuilderGroup.getBuilder(
|
|
447
|
-
style.getZIndex(),
|
|
448
|
-
'Image',
|
|
449
|
-
);
|
|
404
|
+
const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');
|
|
450
405
|
imageReplay.setImageStyle(imageStyle, declutterImageWithText);
|
|
451
|
-
imageReplay.drawMultiPoint(geometry, feature);
|
|
406
|
+
imageReplay.drawMultiPoint(geometry, feature, index);
|
|
452
407
|
}
|
|
453
|
-
if (
|
|
454
|
-
|
|
455
|
-
if (declutterBuilderGroup) {
|
|
456
|
-
textBuilderGroup = declutterBuilderGroup;
|
|
457
|
-
}
|
|
458
|
-
const textReplay = textBuilderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
408
|
+
if (hasText) {
|
|
409
|
+
const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
459
410
|
textReplay.setTextStyle(textStyle, declutterImageWithText);
|
|
460
|
-
textReplay.drawText(geometry, feature);
|
|
411
|
+
textReplay.drawText(geometry, feature, index);
|
|
461
412
|
}
|
|
462
413
|
}
|
|
463
414
|
|
|
@@ -466,29 +417,20 @@ function renderMultiPointGeometry(
|
|
|
466
417
|
* @param {import("../geom/Polygon.js").default|import("../render/Feature.js").default} geometry Geometry.
|
|
467
418
|
* @param {import("../style/Style.js").default} style Style.
|
|
468
419
|
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
|
469
|
-
* @param {
|
|
420
|
+
* @param {number} [index] Render order index.
|
|
470
421
|
*/
|
|
471
|
-
function renderPolygonGeometry(
|
|
472
|
-
builderGroup,
|
|
473
|
-
geometry,
|
|
474
|
-
style,
|
|
475
|
-
feature,
|
|
476
|
-
declutterBuilderGroup,
|
|
477
|
-
) {
|
|
422
|
+
function renderPolygonGeometry(builderGroup, geometry, style, feature, index) {
|
|
478
423
|
const fillStyle = style.getFill();
|
|
479
424
|
const strokeStyle = style.getStroke();
|
|
480
425
|
if (fillStyle || strokeStyle) {
|
|
481
426
|
const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');
|
|
482
427
|
polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);
|
|
483
|
-
polygonReplay.drawPolygon(geometry, feature);
|
|
428
|
+
polygonReplay.drawPolygon(geometry, feature, index);
|
|
484
429
|
}
|
|
485
430
|
const textStyle = style.getText();
|
|
486
431
|
if (textStyle && textStyle.getText()) {
|
|
487
|
-
const textReplay =
|
|
488
|
-
style.getZIndex(),
|
|
489
|
-
'Text',
|
|
490
|
-
);
|
|
432
|
+
const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');
|
|
491
433
|
textReplay.setTextStyle(textStyle);
|
|
492
|
-
textReplay.drawText(geometry, feature);
|
|
434
|
+
textReplay.drawText(geometry, feature, index);
|
|
493
435
|
}
|
|
494
436
|
}
|
|
@@ -292,6 +292,7 @@ declare class WebGLPointsLayerRenderer extends WebGLLayerRenderer<any> {
|
|
|
292
292
|
* @param {number} worldWidth the width of the worlds being rendered
|
|
293
293
|
*/
|
|
294
294
|
renderWorlds(frameState: import("../../Map.js").FrameState, forHitDetection: boolean, startWorld: number, endWorld: number, worldWidth: number): void;
|
|
295
|
+
renderDeclutter(): void;
|
|
295
296
|
}
|
|
296
297
|
import WebGLLayerRenderer from './Layer.js';
|
|
297
298
|
import WebGLArrayBuffer from '../../webgl/Buffer.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointsLayer.d.ts","sourceRoot":"","sources":["PointsLayer.js"],"names":[],"mappings":";;;;;;;;;UA+Bc,MAAM;;;;;qBACG,OAAO,eAAe,EAAE,OAAO;YAAS,MAAM;UAAM,MAAM;;;;;;;;;;aAOnE,OAAO,eAAe,EAAE,OAAO;;;;;YACxB,MAAM;;;;;cACb,OAAO,YAAY,EAAE,QAAQ;;;;;;;;;;;;;;;;;;kBAW7B,MAAM;;;;oBACN,MAAM;;;;;;;;;;;;;;;;;AAzBpB;;;;;;GAMG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH;IACE;;;OAGG;IACH,mBAHW,OAAO,sBAAsB,EAAE,OAAO,WACtC,OAAO,EAqNjB;IAzMC,wBAAyB;IAEzB,kCAAuE;IACvE,iCAGC;IAED;;OAEG;IACH,sBAAyC;IAEzC;;OAEG;IACH,wBAA6C;IAE7C;;;OAGG;IACH,iBAAa;IAE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OAAO,sBAAsB,EAAE,OAAO,WACtC,OAAO,EAqNjB;IAzMC,wBAAyB;IAEzB,kCAAuE;IACvE,iCAGC;IAED;;OAEG;IACH,sBAAyC;IAEzC;;OAEG;IACH,wBAA6C;IAE7C;;;OAGG;IACH,iBAAa;IAEb;;;OAGG;IACH,6BAA+D;IAY/D;;;;OAIG;IACH,YAFU,MAAM,OAAO,uBAAuB,EAAE,oBAAoB,CAAC,CAapE;IAgBD,oCAAoE;IAEpE,kDAAoC;IAEpC;;;;;;OAMG;IACH,0BAAkD;IAElD;;;;OAIG;IACH,yBAAyC;IAEzC;;;OAGG;IACH,+BAA+C;IAE/C;;;OAGG;IACH,4BAA8C;IAE9C;;;OAGG;IACH,yBAAqB;IAErB;;;;OAIG;IACH,mBAAmB;IAEnB;;OAEG;IACH,gBAAkC;IAgClC;;;;OAIG;IACH,sBAAuB;IAEvB;;;;OAIG;IACH,sBAAsB;IAGtB,yDAyBC;IAsBH;;;OAGG;IACH,kCAQC;IAED;;;OAGG;IACH,oCAOC;IAED;;;OAGG;IACH,mCAIC;IAED;;OAEG;IACH,kCAGC;IAED;;;;OAIG;IACH,wBAHW,OAAO,cAAc,EAAE,UAAU,GAChC,WAAW,CA4BtB;IA6CD;;;;OAIG;IACH,wBAgFC;IA6CD;;;;;;;OAOG;IACH,yBANW,OAAO,cAAc,EAAE,UAAU,mBACjC,OAAO,cACP,MAAM,YACN,MAAM,cACN,MAAM,QAgChB;IAeD,wBAAoB;CACrB;+BA1oB8B,YAAY;6BADd,uBAAuB"}
|
package/source/Raster.js
CHANGED
package/source/WMTS.js
CHANGED
|
@@ -361,7 +361,7 @@ export default WMTS;
|
|
|
361
361
|
*/
|
|
362
362
|
export function optionsFromCapabilities(wmtsCap, config) {
|
|
363
363
|
const layers = wmtsCap['Contents']['Layer'];
|
|
364
|
-
const l = layers
|
|
364
|
+
const l = layers?.find(function (elt) {
|
|
365
365
|
return elt['Identifier'] == config['layer'];
|
|
366
366
|
});
|
|
367
367
|
if (!l) {
|
package/style/Circle.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type Options = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Declutter mode
|
|
36
36
|
*/
|
|
37
|
-
declutterMode?: "
|
|
37
|
+
declutterMode?: import("./Style.js").DeclutterMode | undefined;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
40
|
* @typedef {Object} Options
|
|
@@ -48,7 +48,7 @@ export type Options = {
|
|
|
48
48
|
* (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).
|
|
49
49
|
* @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view
|
|
50
50
|
* (meaningful only when used in conjunction with a two dimensional scale).
|
|
51
|
-
* @property {
|
|
51
|
+
* @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode
|
|
52
52
|
*/
|
|
53
53
|
/**
|
|
54
54
|
* @classdesc
|
package/style/Circle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["Circle.js"],"names":[],"mappings":";;;;;;;;;YASc,MAAM
|
|
1
|
+
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["Circle.js"],"names":[],"mappings":";;;;;;;;;YASc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHpB;;;;;;;;;;;;;GAaG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,2CAgBC;IAED;;;;OAIG;IACH,SAHY,WAAW,CAiBtB;IAED;;;;;OAKG;IACH,kBAHW,MAAM,QAMhB;CACF;yBA3EwB,mBAAmB"}
|
package/style/Circle.js
CHANGED
|
@@ -16,7 +16,7 @@ import RegularShape from './RegularShape.js';
|
|
|
16
16
|
* (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).
|
|
17
17
|
* @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view
|
|
18
18
|
* (meaningful only when used in conjunction with a two dimensional scale).
|
|
19
|
-
* @property {
|
|
19
|
+
* @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
/**
|
package/style/Icon.d.ts
CHANGED
package/style/Icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":";;;;8BAYa,UAAU,GAAG,QAAQ;;;;yBAKrB,aAAa,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":";;;;8BAYa,UAAU,GAAG,QAAQ;;;;yBAKrB,aAAa,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DtE;;;;GAIG;AACH;IACE;;OAEG;IACH,2CAmMC;IAjKC;;;OAGG;IACH,gBAAyE;IAEzE;;;OAGG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,qBACgE;IA0ChE;;;OAGG;IACH,eAAyE;IAEzE;;;OAGG;IACH,mBAMC;IAED;;;OAGG;IACH,gBAAqE;IACrE;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,gBAAmB;IAEnB;;;OAGG;IACH,cAA6D;IAevD,qCAA8B;IA4BtC;;;;OAIG;IACH,SAHY,IAAI,CAmCf;IA6DD;;;;;;OAMG;IACH,kBAHW,MAAM,MAAM,CAAC,QAMvB;IAED;;;;OAIG;IACH,YAHY,OAAO,aAAa,EAAE,KAAK,CAKtC;IAED;;;;;;OAMG;IACH,qBALW,MAAM,GACL,gBAAgB,GAAC,iBAAiB,GAAC,WAAW,CAMzD;IA0BD;;OAEG;IACH,wBAFY,gBAAgB,GAAC,iBAAiB,GAAC,WAAW,CAIzD;IAqCD;;;;OAIG;IACH,UAHY,MAAM,GAAC,SAAS,CAK3B;IAWD;;;;OAIG;IACH,YAHY,MAAM,CAYjB;IAED;;;;OAIG;IACH,aAHY,MAAM,CAYjB;CAyCF;uBAljBsB,YAAY"}
|
package/style/Icon.js
CHANGED
|
@@ -51,7 +51,7 @@ import {getUid} from '../util.js';
|
|
|
51
51
|
* @property {import("../size.js").Size} [size] Icon size in pixels. Used together with `offset` to define the
|
|
52
52
|
* sub-rectangle to use from the original (sprite) image.
|
|
53
53
|
* @property {string} [src] Image source URI.
|
|
54
|
-
* @property {"
|
|
54
|
+
* @property {import("./Style.js").DeclutterMode} [declutterMode] Declutter mode.
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
/**
|
package/style/Image.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ export type Options = {
|
|
|
21
21
|
*/
|
|
22
22
|
displacement: Array<number>;
|
|
23
23
|
/**
|
|
24
|
-
* Declutter mode: `declutter`, `obstacle`,
|
|
24
|
+
* Declutter mode: `declutter`, `obstacle`, `none`.
|
|
25
25
|
*/
|
|
26
|
-
declutterMode:
|
|
26
|
+
declutterMode: import('../style/Style.js').DeclutterMode;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
29
|
* @typedef {Object} Options
|
|
@@ -32,7 +32,8 @@ export type Options = {
|
|
|
32
32
|
* @property {number} rotation Rotation.
|
|
33
33
|
* @property {number|import("../size.js").Size} scale Scale.
|
|
34
34
|
* @property {Array<number>} displacement Displacement.
|
|
35
|
-
* @property {
|
|
35
|
+
* @property {import('../style/Style.js').DeclutterMode} declutterMode Declutter mode: `declutter`, `obstacle`, `none`.
|
|
36
|
+
*/
|
|
36
37
|
/**
|
|
37
38
|
* @classdesc
|
|
38
39
|
* A base class used for creating subclasses and not instantiated in
|
|
@@ -78,7 +79,7 @@ declare class ImageStyle {
|
|
|
78
79
|
private displacement_;
|
|
79
80
|
/**
|
|
80
81
|
* @private
|
|
81
|
-
* @type {
|
|
82
|
+
* @type {import('../style/Style.js').DeclutterMode}
|
|
82
83
|
*/
|
|
83
84
|
private declutterMode_;
|
|
84
85
|
/**
|
|
@@ -124,10 +125,10 @@ declare class ImageStyle {
|
|
|
124
125
|
getDisplacement(): Array<number>;
|
|
125
126
|
/**
|
|
126
127
|
* Get the declutter mode of the shape
|
|
127
|
-
* @return {"
|
|
128
|
+
* @return {import("./Style.js").DeclutterMode} Shape's declutter mode
|
|
128
129
|
* @api
|
|
129
130
|
*/
|
|
130
|
-
getDeclutterMode(): "
|
|
131
|
+
getDeclutterMode(): import("./Style.js").DeclutterMode;
|
|
131
132
|
/**
|
|
132
133
|
* Get the anchor point in pixels. The anchor determines the center point for the
|
|
133
134
|
* symbolizer.
|
package/style/Image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["Image.js"],"names":[],"mappings":";;;;;aAQc,MAAM;;;;oBACN,OAAO;;;;cACP,MAAM;;;;WACN,MAAM,GAAC,OAAO,YAAY,EAAE,IAAI;;;;kBAChC,MAAM,MAAM,CAAC;;;;mBACb,
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["Image.js"],"names":[],"mappings":";;;;;aAQc,MAAM;;;;oBACN,OAAO;;;;cACP,MAAM;;;;WACN,MAAM,GAAC,OAAO,YAAY,EAAE,IAAI;;;;kBAChC,MAAM,MAAM,CAAC;;;;mBACb,OAAO,mBAAmB,EAAE,aAAa;;AAPvD;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA4CjB;IAzCC;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,wBAA6C;IAE7C;;;OAGG;IACH,kBAAiC;IAEjC;;;OAGG;IACH,eAA2B;IAE3B;;;OAGG;IACH,oBAAwC;IAExC;;;OAGG;IACH,sBAAyC;IAEzC;;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AG,IAAI,QAI9D;IAED;;OAEG;IACH,SAFY,QAAQ,IAAI,CAAC,CAIxB;CACF"}
|
package/style/Image.js
CHANGED
|
@@ -11,7 +11,8 @@ import {toSize} from '../size.js';
|
|
|
11
11
|
* @property {number} rotation Rotation.
|
|
12
12
|
* @property {number|import("../size.js").Size} scale Scale.
|
|
13
13
|
* @property {Array<number>} displacement Displacement.
|
|
14
|
-
* @property {
|
|
14
|
+
* @property {import('../style/Style.js').DeclutterMode} declutterMode Declutter mode: `declutter`, `obstacle`, `none`.
|
|
15
|
+
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* @classdesc
|
|
@@ -64,7 +65,7 @@ class ImageStyle {
|
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
67
|
* @private
|
|
67
|
-
* @type {
|
|
68
|
+
* @type {import('../style/Style.js').DeclutterMode}
|
|
68
69
|
*/
|
|
69
70
|
this.declutterMode_ = options.declutterMode;
|
|
70
71
|
}
|
|
@@ -141,7 +142,7 @@ class ImageStyle {
|
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
144
|
* Get the declutter mode of the shape
|
|
144
|
-
* @return {"
|
|
145
|
+
* @return {import("./Style.js").DeclutterMode} Shape's declutter mode
|
|
145
146
|
* @api
|
|
146
147
|
*/
|
|
147
148
|
getDeclutterMode() {
|
package/style/RegularShape.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export type Options = {
|
|
|
49
49
|
/**
|
|
50
50
|
* Declutter mode.
|
|
51
51
|
*/
|
|
52
|
-
declutterMode?: "
|
|
52
|
+
declutterMode?: import("./Style.js").DeclutterMode | undefined;
|
|
53
53
|
};
|
|
54
54
|
export type RenderOptions = {
|
|
55
55
|
/**
|
|
@@ -101,7 +101,7 @@ export type RenderOptions = {
|
|
|
101
101
|
* @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.
|
|
102
102
|
* @property {number|import("../size.js").Size} [scale=1] Scale. Unless two dimensional scaling is required a better
|
|
103
103
|
* result may be obtained with appropriate settings for `radius` and `radius2`.
|
|
104
|
-
* @property {
|
|
104
|
+
* @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode.
|
|
105
105
|
*/
|
|
106
106
|
/**
|
|
107
107
|
* @typedef {Object} RenderOptions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegularShape.d.ts","sourceRoot":"","sources":["RegularShape.js"],"names":[],"mappings":";;;;;;;;;;;;;YAsBc,MAAM;;;;YAEN,MAAM
|
|
1
|
+
{"version":3,"file":"RegularShape.d.ts","sourceRoot":"","sources":["RegularShape.js"],"names":[],"mappings":";;;;;;;;;;;;;YAsBc,MAAM;;;;YAEN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAeN,OAAO,iBAAiB,EAAE,SAAS,GAAC,SAAS;;;;iBAC7C,MAAM;;;;UACN,MAAM;;;;aACN,aAAa;;;;cACb,MAAM,MAAM,CAAC,GAAC,IAAI;;;;oBAClB,MAAM;;;;cACN,cAAc;;;;gBACd,MAAM;;AA5BpB;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAwFjB;IA1EC;;;OAGG;IACH,kBAAc;IAEd;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,cAA6D;IAE7D;;;OAGG;IACH,gBAAqB;IAErB;;;OAGG;IACH,gBAA6B;IAE7B;;;OAGG;IACH,mBAFU,MAAM,CAEa;IAE7B;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,eAA6D;IAE7D;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,cAAU;IAEV;;;OAGG;IACH,uBAAmB;IAEnB,oBAGuB;IAOzB;;;;OAIG;IACH,SAHY,YAAY,CAoBvB;IAoBD;;;;OAIG;IACH,YAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,WAHY,OAAO,WAAW,EAAE,OAAO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