@loaders.gl/core 5.0.0-beta.1 → 5.0.0-beta.2

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 (117) hide show
  1. package/README.md +3 -1
  2. package/dist/cluster-source.cjs +7228 -0
  3. package/dist/cluster-source.cjs.map +6 -0
  4. package/dist/cluster-source.d.ts +2 -0
  5. package/dist/cluster-source.d.ts.map +1 -0
  6. package/dist/cluster-source.js +2 -0
  7. package/dist/cluster-source.js.map +1 -0
  8. package/dist/dist.dev.js +894 -273
  9. package/dist/dist.min.js +3 -3
  10. package/dist/federated-table-scan-source.cjs +2677 -0
  11. package/dist/federated-table-scan-source.cjs.map +6 -0
  12. package/dist/federated-table-scan-source.d.ts +2 -0
  13. package/dist/federated-table-scan-source.d.ts.map +1 -0
  14. package/dist/federated-table-scan-source.js +2 -0
  15. package/dist/federated-table-scan-source.js.map +1 -0
  16. package/dist/index.cjs +12 -1045
  17. package/dist/index.cjs.map +3 -3
  18. package/dist/lib/init.js +1 -1
  19. package/dist/loader-utils/index.cjs +43 -1331
  20. package/dist/loader-utils/index.cjs.map +3 -3
  21. package/dist/loader-utils/json-loader.js +1 -1
  22. package/dist/loader-utils/lib/log-utils/log.js +1 -1
  23. package/dist/null-loader.js +1 -1
  24. package/dist/null-worker-node.js +169 -79
  25. package/dist/null-worker.js +166 -55
  26. package/dist/polyfills/images/encode-image-node.d.ts +18 -15
  27. package/dist/polyfills/images/encode-image-node.d.ts.map +1 -1
  28. package/dist/polyfills/images/encode-image-node.js +19 -33
  29. package/dist/polyfills/images/encode-image-node.js.map +1 -1
  30. package/dist/polyfills/images/image-codecs-node.d.ts +2 -6
  31. package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -1
  32. package/dist/polyfills/images/image-codecs-node.js +2 -24
  33. package/dist/polyfills/images/image-codecs-node.js.map +1 -1
  34. package/dist/polyfills/images/load-sharp.d.ts +3 -0
  35. package/dist/polyfills/images/load-sharp.d.ts.map +1 -0
  36. package/dist/polyfills/images/load-sharp.js +11 -0
  37. package/dist/polyfills/images/load-sharp.js.map +1 -0
  38. package/dist/polyfills/images/node-image-bitmap.d.ts +1 -1
  39. package/dist/polyfills/images/node-image-bitmap.js +1 -1
  40. package/dist/polyfills/images/node-image-formats.d.ts +1 -1
  41. package/dist/polyfills/images/node-image-formats.d.ts.map +1 -1
  42. package/dist/polyfills/images/node-image-formats.js +10 -4
  43. package/dist/polyfills/images/node-image-formats.js.map +1 -1
  44. package/dist/polyfills/images/parse-image-node.d.ts +10 -2
  45. package/dist/polyfills/images/parse-image-node.d.ts.map +1 -1
  46. package/dist/polyfills/images/parse-image-node.js +20 -32
  47. package/dist/polyfills/images/parse-image-node.js.map +1 -1
  48. package/dist/polyfills/index.cjs +73 -149
  49. package/dist/vector-table-scan-source.cjs +1703 -0
  50. package/dist/vector-table-scan-source.cjs.map +6 -0
  51. package/dist/vector-table-scan-source.d.ts +2 -0
  52. package/dist/vector-table-scan-source.d.ts.map +1 -0
  53. package/dist/vector-table-scan-source.js +2 -0
  54. package/dist/vector-table-scan-source.js.map +1 -0
  55. package/dist/worker-utils/index.cjs +72 -1225
  56. package/dist/worker-utils/index.cjs.map +3 -3
  57. package/dist/worker-utils/lib/async-queue/async-queue.d.ts +1 -31
  58. package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +1 -1
  59. package/dist/worker-utils/lib/async-queue/async-queue.js +1 -87
  60. package/dist/worker-utils/lib/async-queue/async-queue.js.map +1 -1
  61. package/dist/worker-utils/lib/env-utils/version.js +1 -1
  62. package/dist/worker-utils/lib/worker-api/create-worker.d.ts +1 -8
  63. package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -1
  64. package/dist/worker-utils/lib/worker-api/create-worker.js +1 -157
  65. package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -1
  66. package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +2 -49
  67. package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
  68. package/dist/worker-utils/lib/worker-api/process-on-worker.js +1 -345
  69. package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
  70. package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +1 -19
  71. package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +1 -1
  72. package/dist/worker-utils/lib/worker-farm/worker-body.js +1 -127
  73. package/dist/worker-utils/lib/worker-farm/worker-body.js.map +1 -1
  74. package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +1 -57
  75. package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +1 -1
  76. package/dist/worker-utils/lib/worker-farm/worker-farm.js +1 -112
  77. package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +1 -1
  78. package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +1 -33
  79. package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +1 -1
  80. package/dist/worker-utils/lib/worker-farm/worker-job.js +1 -70
  81. package/dist/worker-utils/lib/worker-farm/worker-job.js.map +1 -1
  82. package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +1 -93
  83. package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +1 -1
  84. package/dist/worker-utils/lib/worker-farm/worker-pool.js +1 -242
  85. package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +1 -1
  86. package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +1 -66
  87. package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +1 -1
  88. package/dist/worker-utils/lib/worker-farm/worker-thread.js +1 -171
  89. package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +1 -1
  90. package/dist/worker-utils/null-worker-node.js +234 -144
  91. package/dist/worker-utils/null-worker-node.js.map +4 -4
  92. package/dist/worker-utils/null-worker.js +232 -121
  93. package/dist/worker-utils/null-worker.js.map +4 -4
  94. package/dist/worker-utils/types.d.ts +1 -99
  95. package/dist/worker-utils/types.d.ts.map +1 -1
  96. package/package.json +27 -29
  97. package/src/cluster-source.ts +1 -0
  98. package/src/federated-table-scan-source.ts +1 -0
  99. package/src/polyfills/README.md +2 -2
  100. package/src/polyfills/images/encode-image-node.ts +44 -37
  101. package/src/polyfills/images/image-codecs-node.ts +2 -37
  102. package/src/polyfills/images/load-sharp.ts +13 -0
  103. package/src/polyfills/images/node-image-bitmap.ts +1 -1
  104. package/src/polyfills/images/node-image-formats.ts +10 -4
  105. package/src/polyfills/images/parse-image-node.ts +31 -40
  106. package/src/vector-table-scan-source.ts +1 -0
  107. package/src/worker-utils/lib/async-queue/async-queue.ts +1 -96
  108. package/src/worker-utils/lib/worker-api/create-worker.ts +1 -201
  109. package/src/worker-utils/lib/worker-api/process-on-worker.ts +8 -464
  110. package/src/worker-utils/lib/worker-farm/worker-body.ts +1 -141
  111. package/src/worker-utils/lib/worker-farm/worker-farm.ts +1 -140
  112. package/src/worker-utils/lib/worker-farm/worker-job.ts +1 -81
  113. package/src/worker-utils/lib/worker-farm/worker-pool.ts +1 -312
  114. package/src/worker-utils/lib/worker-farm/worker-thread.ts +1 -202
  115. package/src/worker-utils/types.ts +14 -144
  116. package/src/polyfills/images/encode-image.node.ts.disabled +0 -41
  117. package/src/polyfills/images/parse-image.node.ts.disabled +0 -55
@@ -1,22 +1,35 @@
1
1
  "use strict";
2
2
  (() => {
3
- // src/worker-utils/lib/node/worker_threads-browser.ts
3
+ // ../../node_modules/@math.gl/core/dist/worker-utils/lib/node/worker_threads-browser.js
4
4
  var parentPort = null;
5
5
 
6
- // src/worker-utils/lib/worker-utils/get-transfer-list.ts
6
+ // ../../node_modules/@math.gl/core/dist/worker-utils/lib/worker-utils/get-transfer-list.js
7
7
  function getTransferList(object, recursive = true, transfers) {
8
8
  const transfersSet = transfers || /* @__PURE__ */ new Set();
9
- if (!object) {
10
- } else if (isTransferable(object)) {
11
- transfersSet.add(object);
12
- } else if (isTransferable(object.buffer)) {
13
- transfersSet.add(object.buffer);
14
- } else if (ArrayBuffer.isView(object)) {
15
- } else if (recursive && typeof object === "object") {
16
- for (const key in object) {
17
- getTransferList(object[key], recursive, transfersSet);
9
+ const seen = /* @__PURE__ */ new Set();
10
+ function visit(value) {
11
+ if (!value || typeof value !== "object" || seen.has(value))
12
+ return;
13
+ seen.add(value);
14
+ if (isTransferable(value))
15
+ transfersSet.add(value);
16
+ else if (ArrayBuffer.isView(value)) {
17
+ if (isTransferable(value.buffer))
18
+ transfersSet.add(value.buffer);
19
+ } else if (recursive && value instanceof Map) {
20
+ for (const [key, item] of value) {
21
+ visit(key);
22
+ visit(item);
23
+ }
24
+ } else if (recursive && value instanceof Set) {
25
+ for (const item of value)
26
+ visit(item);
27
+ } else if (recursive) {
28
+ for (const key of Object.keys(value))
29
+ visit(value[key]);
18
30
  }
19
31
  }
32
+ visit(object);
20
33
  return transfers === void 0 ? Array.from(transfersSet) : [];
21
34
  }
22
35
  function isTransferable(object) {
@@ -38,7 +51,7 @@
38
51
  return false;
39
52
  }
40
53
 
41
- // src/worker-utils/lib/worker-farm/worker-body.ts
54
+ // ../../node_modules/@math.gl/core/dist/worker-utils/lib/worker-farm/worker-body.js
42
55
  async function getParentPort() {
43
56
  return parentPort;
44
57
  }
@@ -46,7 +59,8 @@
46
59
  var WorkerBody = class {
47
60
  /** Check that we are actually in a worker thread */
48
61
  static async inWorkerThread() {
49
- return typeof self !== "undefined" || Boolean(await getParentPort());
62
+ const workerGlobalScope = globalThis.WorkerGlobalScope;
63
+ return typeof workerGlobalScope === "function" && globalThis instanceof workerGlobalScope || Boolean(await getParentPort());
50
64
  }
51
65
  /*
52
66
  * (type: WorkerMessageType, payload: WorkerMessagePayload) => any
@@ -124,11 +138,8 @@
124
138
  return messageData && typeof messageData.source === "string" && messageData.source.startsWith("loaders.gl") ? messageData : null;
125
139
  }
126
140
 
127
- // src/worker-utils/lib/async-queue/async-queue.ts
141
+ // ../../node_modules/@math.gl/core/dist/worker-utils/lib/async-queue/async-queue.js
128
142
  var AsyncQueue = class {
129
- _values;
130
- _settlers;
131
- _closed;
132
143
  constructor() {
133
144
  this._values = [];
134
145
  this._settlers = [];
@@ -194,8 +205,48 @@
194
205
  }
195
206
  };
196
207
 
197
- // src/worker-utils/lib/worker-api/create-worker.ts
208
+ // ../../node_modules/@math.gl/core/dist/worker-utils/lib/worker-api/shared-state.js
209
+ var SharedWorkerState = class {
210
+ constructor(buffer) {
211
+ if (typeof SharedArrayBuffer === "undefined" || !(buffer instanceof SharedArrayBuffer) || buffer.byteLength !== 16)
212
+ throw new Error("Expected a 16-byte shared worker control buffer");
213
+ this.buffer = buffer;
214
+ this.values = new Int32Array(buffer);
215
+ }
216
+ get snapshot() {
217
+ return {
218
+ cancelled: Atomics.load(this.values, 0) !== 0,
219
+ completed: Atomics.load(this.values, 1),
220
+ total: Atomics.load(this.values, 2),
221
+ revision: Atomics.load(this.values, 3)
222
+ };
223
+ }
224
+ cancel() {
225
+ Atomics.store(this.values, 0, 1);
226
+ Atomics.add(this.values, 3, 1);
227
+ Atomics.notify(this.values, 0);
228
+ }
229
+ throwIfCancelled() {
230
+ if (Atomics.load(this.values, 0) !== 0) {
231
+ const error = new Error("Shared worker task was cancelled");
232
+ error.name = "AbortError";
233
+ throw error;
234
+ }
235
+ }
236
+ /** Integer counters for application-defined work; messages still carry phase names and units. */
237
+ setProgress(completed, total = -1) {
238
+ if (!Number.isInteger(completed) || completed < 0 || completed > 2147483647 || !Number.isInteger(total) || total < -1 || total > 2147483647) {
239
+ throw new RangeError("Shared progress requires nonnegative int32 counts (or total -1)");
240
+ }
241
+ Atomics.store(this.values, 1, completed);
242
+ Atomics.store(this.values, 2, total);
243
+ Atomics.add(this.values, 3, 1);
244
+ }
245
+ };
246
+
247
+ // ../../node_modules/@math.gl/core/dist/worker-utils/lib/worker-api/create-worker.js
198
248
  var requestId = 0;
249
+ var activeController = null;
199
250
  var activeInputBatches = null;
200
251
  var activeOutputAcknowledgements = null;
201
252
  async function createWorker(process, processInBatches) {
@@ -206,27 +257,56 @@
206
257
  process: processOnMainThread
207
258
  };
208
259
  WorkerBody.onmessage = async (type, payload) => {
260
+ if (type === "cancel") {
261
+ activeController?.abort();
262
+ activeInputBatches?.close();
263
+ activeOutputAcknowledgements?.close();
264
+ return;
265
+ }
266
+ const controller = type === "process" || type === "process-in-batches" ? new AbortController() : void 0;
267
+ if (controller)
268
+ activeController = controller;
269
+ const startedAt = performance.now();
209
270
  const reporter = type === "process" || type === "process-in-batches" ? createProgressReporter() : void 0;
210
- const jobContext = { ...context, reportProgress: reporter?.report };
271
+ let sharedState;
272
+ const throwIfAborted = () => {
273
+ controller?.signal.throwIfAborted();
274
+ sharedState?.throwIfCancelled();
275
+ };
276
+ const jobContext = {
277
+ ...context,
278
+ signal: controller?.signal,
279
+ sharedState,
280
+ throwIfAborted,
281
+ reportProgress: (progress) => {
282
+ if (!controller?.signal.aborted && !sharedState?.snapshot.cancelled)
283
+ reporter?.report(progress);
284
+ }
285
+ };
211
286
  try {
287
+ if (controller && payload.options?.["sharedState"]) {
288
+ sharedState = new SharedWorkerState(payload.options["sharedState"]);
289
+ jobContext.sharedState = sharedState;
290
+ }
212
291
  switch (type) {
213
292
  case "preload":
214
293
  WorkerBody.postMessage("done", {});
215
294
  break;
216
295
  case "process":
296
+ throwIfAborted();
217
297
  if (!process) {
218
298
  throw new Error("Worker does not support atomic processing");
219
299
  }
220
- const result = await process(
221
- payload.input,
222
- payload.options || {},
223
- jobContext,
224
- payload.context || {}
225
- );
300
+ const result = await process(payload.input, payload.options || {}, jobContext, payload.context || {});
301
+ throwIfAborted();
226
302
  reporter?.finish();
227
- WorkerBody.postMessage("done", { result });
303
+ await WorkerBody.postMessage("done", {
304
+ result,
305
+ executionMs: performance.now() - startedAt
306
+ });
228
307
  break;
229
308
  case "process-in-batches":
309
+ throwIfAborted();
230
310
  if (!processInBatches) {
231
311
  throw new Error("Worker does not support batched processing");
232
312
  }
@@ -235,18 +315,15 @@
235
315
  activeInputBatches = inputBatches;
236
316
  activeOutputAcknowledgements = outputAcknowledgements;
237
317
  try {
238
- const resultIterator = processInBatches(
239
- createDemandDrivenIterator(inputBatches),
240
- payload.options || {},
241
- jobContext,
242
- payload.context || {}
243
- );
318
+ const resultIterator = processInBatches(createDemandDrivenIterator(inputBatches), payload.options || {}, jobContext, payload.context || {});
244
319
  for await (const batch of resultIterator) {
320
+ throwIfAborted();
245
321
  await WorkerBody.postMessage("output-batch", { result: batch });
246
322
  await outputAcknowledgements.next();
247
323
  }
324
+ throwIfAborted();
248
325
  reporter?.finish();
249
- await WorkerBody.postMessage("done", {});
326
+ await WorkerBody.postMessage("done", { executionMs: performance.now() - startedAt });
250
327
  } finally {
251
328
  activeInputBatches = null;
252
329
  activeOutputAcknowledgements = null;
@@ -273,11 +350,18 @@
273
350
  default:
274
351
  }
275
352
  } catch (error) {
276
- reporter?.finish();
353
+ reporter?.finish(controller?.signal.aborted || sharedState?.snapshot.cancelled);
277
354
  const message = error instanceof Error ? error.message : "";
278
- WorkerBody.postMessage("error", { error: message });
355
+ await WorkerBody.postMessage("error", {
356
+ error: message,
357
+ errorName: error instanceof Error ? error.name : "Error"
358
+ });
359
+ } finally {
360
+ if (controller && activeController === controller)
361
+ activeController = null;
279
362
  }
280
363
  };
364
+ await WorkerBody.postMessage("ready", {});
281
365
  }
282
366
  async function* createDemandDrivenIterator(inputBatches) {
283
367
  while (true) {
@@ -290,27 +374,45 @@
290
374
  }
291
375
  }
292
376
  function processOnMainThread(arrayBuffer, options = {}, jobContext = {}) {
377
+ const signal = activeController?.signal;
378
+ signal?.throwIfAborted();
293
379
  return new Promise((resolve, reject) => {
294
380
  const id = requestId++;
295
- const onMessage = (type, payload2) => {
296
- if (payload2.id !== id) {
381
+ const cleanup = () => {
382
+ signal?.removeEventListener("abort", abort);
383
+ void WorkerBody.removeEventListener(onMessage);
384
+ };
385
+ const abort = () => {
386
+ cleanup();
387
+ reject(signal?.reason);
388
+ };
389
+ const onMessage = (type, payload) => {
390
+ if (payload.id !== id)
297
391
  return;
298
- }
299
- switch (type) {
300
- case "done":
301
- WorkerBody.removeEventListener(onMessage);
302
- resolve(payload2.result);
303
- break;
304
- case "error":
305
- WorkerBody.removeEventListener(onMessage);
306
- reject(payload2.error);
307
- break;
308
- default:
392
+ if (type === "done") {
393
+ cleanup();
394
+ resolve(payload.result);
395
+ } else if (type === "error") {
396
+ cleanup();
397
+ reject(payload.error);
309
398
  }
310
399
  };
311
- WorkerBody.addEventListener(onMessage);
312
- const payload = { id, input: arrayBuffer, options, context: jobContext };
313
- WorkerBody.postMessage("process", payload);
400
+ void WorkerBody.addEventListener(onMessage).then(async () => {
401
+ if (signal?.aborted) {
402
+ abort();
403
+ return;
404
+ }
405
+ signal?.addEventListener("abort", abort, { once: true });
406
+ await WorkerBody.postMessage("process", {
407
+ id,
408
+ input: arrayBuffer,
409
+ options,
410
+ context: jobContext
411
+ });
412
+ }).catch((error) => {
413
+ cleanup();
414
+ reject(error);
415
+ });
314
416
  });
315
417
  }
316
418
  function createProgressReporter() {
@@ -327,8 +429,10 @@
327
429
  return {
328
430
  /** Records progress while retaining phase transitions. */
329
431
  report(progress) {
330
- if (finished) return;
331
- if (pending && pending.phase !== progress.phase) flush();
432
+ if (finished)
433
+ return;
434
+ if (pending && pending.phase !== progress.phase)
435
+ flush();
332
436
  pending = { ...progress };
333
437
  if (!scheduled) {
334
438
  scheduled = true;
@@ -336,13 +440,20 @@
336
440
  }
337
441
  },
338
442
  /** Flushes final progress and suppresses reports from stale callbacks. */
339
- finish() {
443
+ finish(discard = false) {
444
+ if (discard)
445
+ pending = void 0;
340
446
  flush();
341
447
  finished = true;
342
448
  }
343
449
  };
344
450
  }
345
451
 
452
+ // ../../node_modules/@math.gl/core/dist/worker-utils/index.js
453
+ var import_meta = {};
454
+ var path = typeof __filename === "string" ? __filename.replace(/\\/g, "/") : "";
455
+ var moduleUrl = path ? `file://${path.startsWith("/") ? "" : "/"}${encodeURI(path).replace(/#/g, "%23").replace(/\?/g, "%3F")}` : import_meta.url;
456
+
346
457
  // src/loader-utils/lib/worker-loader-utils/create-loader-worker.ts
347
458
  async function createLoaderWorker(loader, selectLoader = () => loader) {
348
459
  await createWorker(
@@ -482,7 +593,7 @@
482
593
  }
483
594
 
484
595
  // src/null-loader.ts
485
- var VERSION = true ? "5.0.0-beta.1" : "latest";
596
+ var VERSION = true ? "5.0.0-beta.2" : "latest";
486
597
  var NullLoader = {
487
598
  dataType: null,
488
599
  batchType: null,
@@ -1,20 +1,23 @@
1
- /**
2
- * Returns data bytes representing a compressed image in PNG or JPG format,
3
- * This data can be saved using file system (f) methods or
4
- * used in a request.
5
- * @param image to save
6
- * @param options
7
- * @param options.type='png' - png, jpg or image/png, image/jpg are valid
8
- * @param options.dataURI - Whether to include a data URI header
9
- * @return {*} bytes
10
- */
11
- export declare function encodeImageToStreamNode(image: {
12
- data: any;
1
+ import { PassThrough } from 'node:stream';
2
+ /** Raw RGBA image accepted by the Node encoder. */
3
+ type NodeImageData = {
4
+ /** Interleaved RGBA pixels. */
5
+ data: Uint8Array;
6
+ /** Width in pixels. */
13
7
  width: number;
8
+ /** Height in pixels. */
14
9
  height: number;
15
- }, options: {
10
+ };
11
+ /** Options for the Node image encoder. */
12
+ type NodeImageEncoderOptions = {
13
+ /** Output format name or MIME type; defaults to JPEG. */
16
14
  type?: string;
15
+ /** Legacy option retained for callers. */
17
16
  dataURI?: string;
18
- }): any;
19
- export declare function encodeImageNode(image: any, options: any): Promise<unknown>;
17
+ };
18
+ /** Encodes raw RGBA pixels with the optional Sharp backend. */
19
+ export declare function encodeImageNode(image: NodeImageData, options?: NodeImageEncoderOptions): Promise<ArrayBuffer>;
20
+ /** Streams an encoded image and forwards codec loading and encoding failures. */
21
+ export declare function encodeImageToStreamNode(image: NodeImageData, options?: NodeImageEncoderOptions): PassThrough;
22
+ export {};
20
23
  //# sourceMappingURL=encode-image-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"encode-image-node.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/encode-image-node.ts"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE;IAAC,IAAI,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,EACjD,OAAO,EAAE;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,OAQ3C;AAED,wBAAgB,eAAe,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA,oBAY7C"}
1
+ {"version":3,"file":"encode-image-node.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/encode-image-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAIxC,mDAAmD;AACnD,KAAK,aAAa,GAAG;IACnB,+BAA+B;IAC/B,IAAI,EAAE,UAAU,CAAC;IACjB,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,0CAA0C;AAC1C,KAAK,uBAAuB,GAAG;IAC7B,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,+DAA+D;AAC/D,wBAAsB,eAAe,CACnC,KAAK,EAAE,aAAa,EACpB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,WAAW,CAAC,CAUtB;AAED,iFAAiF;AACjF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,EACpB,OAAO,GAAE,uBAA4B,GACpC,WAAW,CAOb"}
@@ -1,37 +1,23 @@
1
- // loaders.gl
2
1
  // SPDX-License-Identifier: MIT
3
- // Copyright (c) vis.gl contributors
4
- // Use stackgl modules for DOM-less reading and writing of images
5
- import savePixels from 'save-pixels';
6
- import ndarray from 'ndarray';
7
- import { bufferToArrayBuffer } from '../buffer/to-array-buffer.node.js';
8
- /**
9
- * Returns data bytes representing a compressed image in PNG or JPG format,
10
- * This data can be saved using file system (f) methods or
11
- * used in a request.
12
- * @param image to save
13
- * @param options
14
- * @param options.type='png' - png, jpg or image/png, image/jpg are valid
15
- * @param options.dataURI - Whether to include a data URI header
16
- * @return {*} bytes
17
- */
18
- export function encodeImageToStreamNode(image, options) {
19
- // Support MIME type strings
20
- const type = options.type ? options.type.replace('image/', '') : 'jpeg';
21
- const pixels = ndarray(image.data, [image.width, image.height, 4], [4, image.width * 4, 1], 0);
22
- // Note: savePixels returns a stream
23
- return savePixels(pixels, type, options);
2
+ import { PassThrough } from 'node:stream';
3
+ import { loadSharp } from "./load-sharp.js";
4
+ import { toArrayBuffer } from "../utils/buffer-utils.js";
5
+ /** Encodes raw RGBA pixels with the optional Sharp backend. */
6
+ export async function encodeImageNode(image, options = {}) {
7
+ const sharp = await loadSharp();
8
+ const requestedFormat = (options.type || 'jpeg').toLowerCase().replace(/^image\//, '');
9
+ const format = requestedFormat === 'jpg' ? 'jpeg' : requestedFormat;
10
+ const encodedImage = await sharp(Buffer.from(image.data), {
11
+ raw: { width: image.width, height: image.height, channels: 4 }
12
+ })
13
+ .toFormat(format)
14
+ .toBuffer();
15
+ return toArrayBuffer(encodedImage);
24
16
  }
25
- export function encodeImageNode(image, options) {
26
- const imageStream = encodeImageToStreamNode(image, options);
27
- return new Promise(resolve => {
28
- const buffers = [];
29
- imageStream.on('data', buffer => buffers.push(buffer));
30
- // TODO - convert to arraybuffer?
31
- imageStream.on('end', () => {
32
- const buffer = Buffer.concat(buffers);
33
- resolve(bufferToArrayBuffer(buffer));
34
- });
35
- });
17
+ /** Streams an encoded image and forwards codec loading and encoding failures. */
18
+ export function encodeImageToStreamNode(image, options = {}) {
19
+ const stream = new PassThrough();
20
+ void encodeImageNode(image, options).then(arrayBuffer => stream.end(Buffer.from(arrayBuffer)), error => stream.destroy(error));
21
+ return stream;
36
22
  }
37
23
  //# sourceMappingURL=encode-image-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"encode-image-node.js","sourceRoot":"","sources":["../../../src/polyfills/images/encode-image-node.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,iEAAiE;AAEjE,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AAEtE;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAiD,EACjD,OAA0C;IAE1C,4BAA4B;IAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACxE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAE/F,oCAAoC;IACpC,OAAO,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAK,EAAE,OAAO;IAC5C,MAAM,WAAW,GAAG,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAE5D,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,MAAM,OAAO,GAAU,EAAE,CAAC;QAC1B,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,iCAAiC;QACjC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACtC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"encode-image-node.js","sourceRoot":"","sources":["../../../src/polyfills/images/encode-image-node.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,wBAAqB;AACvC,OAAO,EAAC,aAAa,EAAC,iCAA8B;AAoBpD,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAAoB,EACpB,UAAmC,EAAE;IAErC,MAAM,KAAK,GAAG,MAAM,SAAS,EAAE,CAAC;IAChC,MAAM,eAAe,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACvF,MAAM,MAAM,GAAG,eAAe,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;IACpE,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACxD,GAAG,EAAE,EAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAC;KAC7D,CAAC;SACC,QAAQ,CAAC,MAA0C,CAAC;SACpD,QAAQ,EAAE,CAAC;IACd,OAAO,aAAa,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,uBAAuB,CACrC,KAAoB,EACpB,UAAmC,EAAE;IAErC,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;IACjC,KAAK,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CACvC,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,EACnD,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAC/B,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,8 +1,4 @@
1
- import type { parseImageNode as parseImageImplementation } from "./parse-image-node.js";
2
- import type { encodeImageNode as encodeImageImplementation } from "./encode-image-node.js";
1
+ export { parseImageNode } from "./parse-image-node.js";
2
+ export { encodeImageNode } from "./encode-image-node.js";
3
3
  export { NODE_FORMAT_SUPPORT } from "./node-image-formats.js";
4
- /** Loads the optional image decoder only when pixel decoding is requested. */
5
- export declare function parseImageNode(...parameters: Parameters<typeof parseImageImplementation>): Promise<Awaited<ReturnType<typeof parseImageImplementation>>>;
6
- /** Loads the optional image encoder only when image encoding is requested. */
7
- export declare function encodeImageNode(...parameters: Parameters<typeof encodeImageImplementation>): Promise<Awaited<ReturnType<typeof encodeImageImplementation>>>;
8
4
  //# sourceMappingURL=image-codecs-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-codecs-node.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/image-codecs-node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,cAAc,IAAI,wBAAwB,EAAC,8BAA2B;AACnF,OAAO,KAAK,EAAC,eAAe,IAAI,yBAAyB,EAAC,+BAA4B;AAEtF,OAAO,EAAC,mBAAmB,EAAC,gCAA6B;AAEzD,8EAA8E;AAC9E,wBAAsB,cAAc,CAClC,GAAG,UAAU,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,GACzD,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAW/D;AAED,8EAA8E;AAC9E,wBAAsB,eAAe,CACnC,GAAG,UAAU,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAWhE"}
1
+ {"version":3,"file":"image-codecs-node.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/image-codecs-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,8BAA2B;AAClD,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,OAAO,EAAC,mBAAmB,EAAC,gCAA6B"}
@@ -1,27 +1,5 @@
1
- // loaders.gl
2
1
  // SPDX-License-Identifier: MIT
3
- // Copyright (c) vis.gl contributors
2
+ export { parseImageNode } from "./parse-image-node.js";
3
+ export { encodeImageNode } from "./encode-image-node.js";
4
4
  export { NODE_FORMAT_SUPPORT } from "./node-image-formats.js";
5
- /** Loads the optional image decoder only when pixel decoding is requested. */
6
- export async function parseImageNode(...parameters) {
7
- let decoder;
8
- try {
9
- decoder = await import("./parse-image-node.js");
10
- }
11
- catch (error) {
12
- throw new Error('Node image decoding requires get-pixels. Install get-pixels to decode images.', { cause: error });
13
- }
14
- return decoder.parseImageNode(...parameters);
15
- }
16
- /** Loads the optional image encoder only when image encoding is requested. */
17
- export async function encodeImageNode(...parameters) {
18
- let encoder;
19
- try {
20
- encoder = await import("./encode-image-node.js");
21
- }
22
- catch (error) {
23
- throw new Error('Node image encoding requires save-pixels and ndarray. Install save-pixels and ndarray to encode images.', { cause: error });
24
- }
25
- return encoder.encodeImageNode(...parameters);
26
- }
27
5
  //# sourceMappingURL=image-codecs-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-codecs-node.js","sourceRoot":"","sources":["../../../src/polyfills/images/image-codecs-node.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAKpC,OAAO,EAAC,mBAAmB,EAAC,gCAA6B;AAEzD,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,GAAG,UAAuD;IAE1D,IAAI,OAA4C,CAAC;IACjD,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,MAAM,yBAAsB,CAAC;IAC/C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,+EAA+E,EAC/E,EAAC,KAAK,EAAE,KAAK,EAAC,CACf,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,CAAC;AAC/C,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,GAAG,UAAwD;IAE3D,IAAI,OAA6C,CAAC;IAClD,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,MAAM,0BAAuB,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,yGAAyG,EACzG,EAAC,KAAK,EAAE,KAAK,EAAC,CACf,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,CAAC;AAChD,CAAC"}
1
+ {"version":3,"file":"image-codecs-node.js","sourceRoot":"","sources":["../../../src/polyfills/images/image-codecs-node.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,OAAO,EAAC,cAAc,EAAC,8BAA2B;AAClD,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,OAAO,EAAC,mBAAmB,EAAC,gCAA6B"}
@@ -0,0 +1,3 @@
1
+ /** Loads the optional Node image codec only when image processing is requested. */
2
+ export declare function loadSharp(): Promise<typeof import('sharp').default>;
3
+ //# sourceMappingURL=load-sharp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-sharp.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/load-sharp.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,wBAAsB,SAAS,IAAI,OAAO,CAAC,cAAc,OAAO,EAAE,OAAO,CAAC,CASzE"}
@@ -0,0 +1,11 @@
1
+ // SPDX-License-Identifier: MIT
2
+ /** Loads the optional Node image codec only when image processing is requested. */
3
+ export async function loadSharp() {
4
+ try {
5
+ return (await import('sharp')).default;
6
+ }
7
+ catch (error) {
8
+ throw new Error("Node image decoding and encoding require the optional 'sharp' package. Install it with 'npm install sharp'.", { cause: error });
9
+ }
10
+ }
11
+ //# sourceMappingURL=load-sharp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-sharp.js","sourceRoot":"","sources":["../../../src/polyfills/images/load-sharp.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,6GAA6G,EAC7G,EAAC,KAAK,EAAE,KAAK,EAAC,CACf,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -5,7 +5,7 @@ type NodeImageData = {
5
5
  };
6
6
  /**
7
7
  * Minimal Node.js `ImageBitmap` polyfill backed by decoded pixel data.
8
- * This is intentionally limited to the functionality needed by `ImageBitmapLoader`
8
+ * This is intentionally limited to the functionality needed by `ImageLoader`
9
9
  * and `getImageBitmapData()`.
10
10
  */
11
11
  export declare class NodeImageBitmap {
@@ -3,7 +3,7 @@
3
3
  // Copyright (c) vis.gl contributors
4
4
  /**
5
5
  * Minimal Node.js `ImageBitmap` polyfill backed by decoded pixel data.
6
- * This is intentionally limited to the functionality needed by `ImageBitmapLoader`
6
+ * This is intentionally limited to the functionality needed by `ImageLoader`
7
7
  * and `getImageBitmapData()`.
8
8
  */
9
9
  export class NodeImageBitmap {
@@ -1,3 +1,3 @@
1
- /** Image MIME types supported when the optional Node decoder is installed. */
1
+ /** Image MIME types supported by the optional Sharp Node backend. */
2
2
  export declare const NODE_FORMAT_SUPPORT: string[];
3
3
  //# sourceMappingURL=node-image-formats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-image-formats.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/node-image-formats.ts"],"names":[],"mappings":"AAIA,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,UAA2C,CAAC"}
1
+ {"version":3,"file":"node-image-formats.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/node-image-formats.ts"],"names":[],"mappings":"AAEA,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,UAQ/B,CAAC"}
@@ -1,6 +1,12 @@
1
- // loaders.gl
2
1
  // SPDX-License-Identifier: MIT
3
- // Copyright (c) vis.gl contributors
4
- /** Image MIME types supported when the optional Node decoder is installed. */
5
- export const NODE_FORMAT_SUPPORT = ['image/png', 'image/jpeg', 'image/gif'];
2
+ /** Image MIME types supported by the optional Sharp Node backend. */
3
+ export const NODE_FORMAT_SUPPORT = [
4
+ 'image/png',
5
+ 'image/jpeg',
6
+ 'image/gif',
7
+ 'image/webp',
8
+ 'image/avif',
9
+ 'image/tiff',
10
+ 'image/svg+xml'
11
+ ];
6
12
  //# sourceMappingURL=node-image-formats.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-image-formats.js","sourceRoot":"","sources":["../../../src/polyfills/images/node-image-formats.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"node-image-formats.js","sourceRoot":"","sources":["../../../src/polyfills/images/node-image-formats.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,qEAAqE;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,WAAW;IACX,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,eAAe;CAChB,CAAC"}
@@ -1,11 +1,19 @@
1
1
  export { NODE_FORMAT_SUPPORT } from "./node-image-formats.js";
2
- type NDArray = {
2
+ /** Decoded Node image pixels and dimensions. */
3
+ type NodeImageData = {
4
+ /** Pixel layout, including a frame dimension for animations. */
3
5
  shape: number[];
6
+ /** Interleaved RGBA pixels. */
4
7
  data: Uint8Array;
8
+ /** Frame width in pixels. */
5
9
  width: number;
10
+ /** Frame height in pixels. */
6
11
  height: number;
12
+ /** Number of components per pixel. */
7
13
  components: number;
14
+ /** Number of animation frames. */
8
15
  layers: number[];
9
16
  };
10
- export declare function parseImageNode(arrayBuffer: ArrayBuffer, mimeType: string): Promise<NDArray>;
17
+ /** Decodes encoded image bytes into RGBA pixels, detecting the format from the bytes. */
18
+ export declare function parseImageNode(arrayBuffer: ArrayBuffer, _mimeType?: string): Promise<NodeImageData>;
11
19
  //# sourceMappingURL=parse-image-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-image-node.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/parse-image-node.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,mBAAmB,EAAC,gCAA6B;AAGzD,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,wBAAsB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQjG"}
1
+ {"version":3,"file":"parse-image-node.d.ts","sourceRoot":"","sources":["../../../src/polyfills/images/parse-image-node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,mBAAmB,EAAC,gCAA6B;AAEzD,gDAAgD;AAChD,KAAK,aAAa,GAAG;IACnB,gEAAgE;IAChE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,UAAU,CAAC;IACjB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,yFAAyF;AACzF,wBAAsB,cAAc,CAClC,WAAW,EAAE,WAAW,EACxB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAkBxB"}