@chrtco/sdk 0.10.54 → 0.10.55

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/dist/index.js CHANGED
@@ -4220,12 +4220,12 @@ function deriveMarinerName(objnam, colourCode) {
4220
4220
  if (!objnam) return "";
4221
4221
  const m = objnam.match(/(\d+[A-Z]?)\s*$/);
4222
4222
  if (!m) return objnam;
4223
- const num2 = m[1];
4223
+ const num3 = m[1];
4224
4224
  const colourAbbr = colourCode ? COLOUR_TABLE[colourCode]?.abbr : null;
4225
4225
  if (colourAbbr && colourAbbr !== "W") {
4226
- return `${colourAbbr} "${num2}"`;
4226
+ return `${colourAbbr} "${num3}"`;
4227
4227
  }
4228
- return `"${num2}"`;
4228
+ return `"${num3}"`;
4229
4229
  }
4230
4230
  function getTopmarkMeaning(topshpCode, rawLayer) {
4231
4231
  if (topshpCode == null) return null;
@@ -4278,7 +4278,7 @@ function decodeNavAidProps(layerName, props, coords, opts = {}) {
4278
4278
  const dayboardColours = isDayboard ? [] : listNames(props._daymark_colour, COLOUR_NAME_TABLE);
4279
4279
  const dayboardPattern = isDayboard ? [] : listNames(props._daymark_colpat, COLPAT_TABLE);
4280
4280
  const dayboardCount = Number(props._daymark_count);
4281
- const dayboard = dayboardShapeCode || dayboardColours.length > 0 || dayboardPattern.length > 0 ? {
4281
+ const dayboard2 = dayboardShapeCode || dayboardColours.length > 0 || dayboardPattern.length > 0 ? {
4282
4282
  shape: dayboardShapeCode ? TOPSHP_TABLE[dayboardShapeCode] ?? null : null,
4283
4283
  colour: dayboardColours.length > 0 ? dayboardColours.join(", ") : null,
4284
4284
  pattern: dayboardPattern.length > 0 ? dayboardPattern.join(", ") : null,
@@ -4337,7 +4337,7 @@ function decodeNavAidProps(layerName, props, coords, opts = {}) {
4337
4337
  shape,
4338
4338
  topmark,
4339
4339
  topmarkMeaning,
4340
- dayboard,
4340
+ dayboard: dayboard2,
4341
4341
  colourPattern: colourPatternNames.length > 0 ? colourPatternNames.join(", ") : null,
4342
4342
  construction: constructionNames.length > 0 ? constructionNames.join(", ") : null,
4343
4343
  lightCharacter: litchrEntry?.abbr ?? null,
@@ -4432,9 +4432,9 @@ function buildFlashPattern(decoded) {
4432
4432
  break;
4433
4433
  }
4434
4434
  case "Iso": {
4435
- const half = period / 2;
4436
- phases.push({ on: true, duration: half, color: hex });
4437
- phases.push({ on: false, duration: half });
4435
+ const half2 = period / 2;
4436
+ phases.push({ on: true, duration: half2, color: hex });
4437
+ phases.push({ on: false, duration: half2 });
4438
4438
  break;
4439
4439
  }
4440
4440
  case "Q": {
@@ -5335,11 +5335,11 @@ function decodeClickedNavAid(map, feature, e, navAidLayers) {
5335
5335
  }
5336
5336
  if (rawLayer !== "DAYMAR" && !CHILD_LAYERS.has(rawLayer) && props._daymark_topshp == null && props._daymark_colour == null) {
5337
5337
  const boards = query(map, bboxAround(e.point, 10), existingLayers(map, ["enc-DAYMAR"]));
5338
- const board = pickSlaveOf(props, boards);
5339
- if (board?.properties) {
5340
- if (board.properties.TOPSHP != null) props._daymark_topshp = board.properties.TOPSHP;
5341
- if (board.properties.COLOUR != null) props._daymark_colour = board.properties.COLOUR;
5342
- if (board.properties.COLPAT != null) props._daymark_colpat = board.properties.COLPAT;
5338
+ const board2 = pickSlaveOf(props, boards);
5339
+ if (board2?.properties) {
5340
+ if (board2.properties.TOPSHP != null) props._daymark_topshp = board2.properties.TOPSHP;
5341
+ if (board2.properties.COLOUR != null) props._daymark_colour = board2.properties.COLOUR;
5342
+ if (board2.properties.COLPAT != null) props._daymark_colpat = board2.properties.COLPAT;
5343
5343
  }
5344
5344
  }
5345
5345
  const lightLayerIds = existingLayers(
@@ -6910,19 +6910,19 @@ function applyChrtSymbolSet(style, palette = "DAY") {
6910
6910
  continue;
6911
6911
  }
6912
6912
  if (layer.type !== "symbol") continue;
6913
- const objectClass2 = layer.metadata?.["s52:objectClass"];
6914
- if (!objectClass2 || !CHRT_ICON_EXPRESSIONS[objectClass2]) continue;
6913
+ const objectClass5 = layer.metadata?.["s52:objectClass"];
6914
+ if (!objectClass5 || !CHRT_ICON_EXPRESSIONS[objectClass5]) continue;
6915
6915
  if (layer.metadata?.["chrt:sectorLight"] === true) continue;
6916
6916
  const layout = layer.layout;
6917
6917
  if (!layout || layout["icon-image"] == null) continue;
6918
- layout["icon-image"] = CHRT_ICON_EXPRESSIONS[objectClass2]();
6918
+ layout["icon-image"] = CHRT_ICON_EXPRESSIONS[objectClass5]();
6919
6919
  const paint = layer.paint ?? {};
6920
6920
  const haloColor = palette === "EINK_MONO" ? chrtHouseColor(HOUSE_BLACK, palette) : palette === "EINK_NIGHT" ? "#000000" : CHRT_HALO.color;
6921
- if (CHRT_TINTED_CLASSES.has(objectClass2)) {
6921
+ if (CHRT_TINTED_CLASSES.has(objectClass5)) {
6922
6922
  paint["icon-color"] = chrtAtonTintExpression(palette);
6923
6923
  paint["icon-halo-color"] = haloColor;
6924
6924
  paint["icon-halo-width"] = CHRT_HALO.width;
6925
- } else if (objectClass2 === "LIGHTS") {
6925
+ } else if (objectClass5 === "LIGHTS") {
6926
6926
  paint["icon-color"] = chrtLightTintExpression(palette);
6927
6927
  paint["icon-halo-color"] = haloColor;
6928
6928
  paint["icon-halo-width"] = CHRT_HALO.width;
@@ -22135,10 +22135,10 @@ var ATTR_TYPES = {
22135
22135
  INFORM: "S"
22136
22136
  };
22137
22137
  function scalarMatch(attr, value) {
22138
- const num2 = Number(value);
22138
+ const num3 = Number(value);
22139
22139
  return [
22140
22140
  "any",
22141
- ["==", ["coalesce", ["get", attr], ["get", attr.toLowerCase()], -1], num2],
22141
+ ["==", ["coalesce", ["get", attr], ["get", attr.toLowerCase()], -1], num3],
22142
22142
  ["==", ["to-string", ["coalesce", ["get", attr], ["get", attr.toLowerCase()], ""]], value]
22143
22143
  ];
22144
22144
  }
@@ -22183,9 +22183,9 @@ function compileAtonExpression(lookup, mapSymbol = (name) => name) {
22183
22183
  expr.push(fallback);
22184
22184
  return expr;
22185
22185
  }
22186
- function atonIconExpression(objectClass2) {
22187
- const lookup = S52_ATON_LOOKUPS[objectClass2];
22188
- if (!lookup) throw new Error(`s52-aton-expressions: no generated lookup for ${objectClass2}`);
22186
+ function atonIconExpression(objectClass5) {
22187
+ const lookup = S52_ATON_LOOKUPS[objectClass5];
22188
+ if (!lookup) throw new Error(`s52-aton-expressions: no generated lookup for ${objectClass5}`);
22189
22189
  return compileAtonExpression(lookup);
22190
22190
  }
22191
22191
  function lightsIconExpression() {
@@ -29147,47 +29147,47 @@ var EXTINGUISHED_FLARE_OPACITY = 0.35;
29147
29147
  function buildLightLabelExpression(depthUnits) {
29148
29148
  return lightDescriptionExpression({ units: depthUnits });
29149
29149
  }
29150
- function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts = {}) {
29151
- if (!S52_LOOKUP[objectClass2]) return [];
29152
- const entry = S52_LOOKUP[objectClass2];
29150
+ function buildLayersForClass(objectClass5, ct, sourceId = DEFAULT_REGION, opts = {}) {
29151
+ if (!S52_LOOKUP[objectClass5]) return [];
29152
+ const entry = S52_LOOKUP[objectClass5];
29153
29153
  const layers = [];
29154
- const geomTypes = getGeomTypesForClass(objectClass2, entry?.style.type);
29154
+ const geomTypes = getGeomTypesForClass(objectClass5, entry?.style.type);
29155
29155
  for (const geomType of geomTypes) {
29156
- const resolved = resolveStyle(objectClass2, geomType, ct, { safetyContour: opts.safetyContour });
29157
- const layerId = `s52-${objectClass2}-${resolved.type}`;
29156
+ const resolved = resolveStyle(objectClass5, geomType, ct, { safetyContour: opts.safetyContour });
29157
+ const layerId = `s52-${objectClass5}-${resolved.type}`;
29158
29158
  const layer = {
29159
29159
  id: layerId,
29160
29160
  type: resolved.type,
29161
29161
  source: sourceId,
29162
- "source-layer": objectClass2,
29162
+ "source-layer": objectClass5,
29163
29163
  paint: resolved.paint,
29164
29164
  metadata: {
29165
- "s52:objectClass": objectClass2,
29165
+ "s52:objectClass": objectClass5,
29166
29166
  "s52:displayCategory": entry?.displayCategory ?? "OTHER",
29167
29167
  "s52:category": entry?.category ?? "Meta"
29168
29168
  }
29169
29169
  };
29170
- if (resolved.type === "line" && LINE_FROM_POLYGON_LAYERS.has(objectClass2)) {
29170
+ if (resolved.type === "line" && LINE_FROM_POLYGON_LAYERS.has(objectClass5)) {
29171
29171
  layer.filter = GEOM_FILTERS.fill;
29172
29172
  } else if (GEOM_FILTERS[resolved.type]) {
29173
29173
  layer.filter = GEOM_FILTERS[resolved.type];
29174
29174
  }
29175
- if (SCAMIN_DECLUTTER_CLASSES.has(objectClass2)) {
29175
+ if (SCAMIN_DECLUTTER_CLASSES.has(objectClass5)) {
29176
29176
  layer.filter = layer.filter ? ["all", layer.filter, scaminZoomGateFilter()] : ["all", scaminZoomGateFilter()];
29177
29177
  }
29178
29178
  if (resolved.minzoom) {
29179
29179
  layer.minzoom = resolved.minzoom;
29180
29180
  }
29181
- if (resolved.type === "fill" && OPAQUE_FILLS.has(objectClass2)) {
29181
+ if (resolved.type === "fill" && OPAQUE_FILLS.has(objectClass5)) {
29182
29182
  layer.paint["fill-opacity"] = 1;
29183
29183
  }
29184
- if (resolved.type === "line" && ZOOM_SCALED_LINES2[objectClass2]) {
29185
- const [z1, w1, z2, w2] = ZOOM_SCALED_LINES2[objectClass2];
29184
+ if (resolved.type === "line" && ZOOM_SCALED_LINES2[objectClass5]) {
29185
+ const [z1, w1, z2, w2] = ZOOM_SCALED_LINES2[objectClass5];
29186
29186
  layer.paint["line-width"] = ["interpolate", ["linear"], ["zoom"], z1, w1, z2, w2];
29187
29187
  }
29188
29188
  if (resolved.type === "symbol") {
29189
- const iconExpr = getIconExpression(objectClass2);
29190
- const childOffset = CHILD_ICON_OFFSETS[objectClass2];
29189
+ const iconExpr = getIconExpression(objectClass5);
29190
+ const childOffset = CHILD_ICON_OFFSETS[objectClass5];
29191
29191
  const isSafetyCritical = SAFETY_GROUPS.has(entry?.viewingGroup ?? 0);
29192
29192
  const safetyCriticalIconSize = [
29193
29193
  "interpolate",
@@ -29350,7 +29350,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29350
29350
  ]
29351
29351
  };
29352
29352
  }
29353
- if (objectClass2 === "LIGHTS") {
29353
+ if (objectClass5 === "LIGHTS") {
29354
29354
  layer.layout = {
29355
29355
  ...layer.layout,
29356
29356
  "icon-allow-overlap": true,
@@ -29400,14 +29400,14 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29400
29400
  } else if (resolved.layout) {
29401
29401
  layer.layout = resolved.layout;
29402
29402
  }
29403
- if (objectClass2 === "LNDMRK" && resolved.type === "symbol") {
29403
+ if (objectClass5 === "LNDMRK" && resolved.type === "symbol") {
29404
29404
  const baseFilterParts = layer.filter && layer.filter[0] === "all" ? layer.filter.slice(1) : layer.filter ? [layer.filter] : [];
29405
29405
  const isWind = listAttrHas("CATLMK", ["18", "19"]);
29406
29406
  const isLighthouse = listAttrHas("CATLMK", ["17"]);
29407
29407
  const scaminFloor = scaminToMinZoom(entry?.scamin);
29408
29408
  const windLayer = {
29409
29409
  ...layer,
29410
- id: `s52-${objectClass2}-wind-symbol`,
29410
+ id: `s52-${objectClass5}-wind-symbol`,
29411
29411
  filter: ["all", ...baseFilterParts, isWind],
29412
29412
  // Explicit, not inherited: turbines share exact coordinates with
29413
29413
  // their aviation-light LIGHTS feature; without allow-overlap the
@@ -29420,7 +29420,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29420
29420
  delete windLayer.minzoom;
29421
29421
  const lighthouseLayer = {
29422
29422
  ...layer,
29423
- id: `s52-${objectClass2}-lighthouse-symbol`,
29423
+ id: `s52-${objectClass5}-lighthouse-symbol`,
29424
29424
  filter: ["all", ...baseFilterParts, isLighthouse, ["!", isWind]],
29425
29425
  layout: {
29426
29426
  ...layer.layout ?? {},
@@ -29431,7 +29431,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29431
29431
  delete lighthouseLayer.minzoom;
29432
29432
  const otherLayer = {
29433
29433
  ...layer,
29434
- id: `s52-${objectClass2}-other-symbol`,
29434
+ id: `s52-${objectClass5}-other-symbol`,
29435
29435
  filter: ["all", ...baseFilterParts, ["!", isWind], ["!", isLighthouse]]
29436
29436
  };
29437
29437
  if (scaminFloor !== void 0) {
@@ -29446,10 +29446,10 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29446
29446
  const valsouNum = ["to-number", ["coalesce", ["get", "VALSOU"], ["get", "valsou"], 999], 999];
29447
29447
  const watlevNum = ["to-number", ["coalesce", ["get", "WATLEV"], ["get", "watlev"], 0], 0];
29448
29448
  layers.push({
29449
- id: `s52-${objectClass2}-danger-ring`,
29449
+ id: `s52-${objectClass5}-danger-ring`,
29450
29450
  type: "symbol",
29451
29451
  source: sourceId,
29452
- "source-layer": objectClass2,
29452
+ "source-layer": objectClass5,
29453
29453
  filter: [
29454
29454
  "all",
29455
29455
  GEOM_FILTERS.symbol,
@@ -29482,48 +29482,48 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29482
29482
  },
29483
29483
  paint: {},
29484
29484
  minzoom: 13,
29485
- metadata: { "s52:objectClass": objectClass2, "s52:role": "isolated-danger-ring" }
29485
+ metadata: { "s52:objectClass": objectClass5, "s52:role": "isolated-danger-ring" }
29486
29486
  });
29487
29487
  }
29488
- if (resolved.type === "fill" && FILL_OUTLINE_LAYERS.has(objectClass2)) {
29489
- const outlineColor = objectClass2 === "DEPARE" ? resolveColor("CHGRD", ct) : resolveColor("CHGRF", ct);
29488
+ if (resolved.type === "fill" && FILL_OUTLINE_LAYERS.has(objectClass5)) {
29489
+ const outlineColor = objectClass5 === "DEPARE" ? resolveColor("CHGRD", ct) : resolveColor("CHGRF", ct);
29490
29490
  layers.push({
29491
- id: `s52-${objectClass2}-outline`,
29491
+ id: `s52-${objectClass5}-outline`,
29492
29492
  type: "line",
29493
29493
  source: sourceId,
29494
- "source-layer": objectClass2,
29494
+ "source-layer": objectClass5,
29495
29495
  filter: GEOM_FILTERS.fill,
29496
29496
  paint: {
29497
29497
  "line-color": outlineColor,
29498
29498
  "line-width": 0.3,
29499
29499
  "line-opacity": 0.4
29500
29500
  },
29501
- metadata: { "s52:objectClass": objectClass2, "s52:role": "outline" }
29501
+ metadata: { "s52:objectClass": objectClass5, "s52:role": "outline" }
29502
29502
  });
29503
29503
  }
29504
- if (resolved.type === "fill" && REGULATED_AREA_BOUNDARY_LAYERS[objectClass2]) {
29505
- const lineStyle = REGULATED_AREA_BOUNDARY_LINESTYLES[objectClass2];
29504
+ if (resolved.type === "fill" && REGULATED_AREA_BOUNDARY_LAYERS[objectClass5]) {
29505
+ const lineStyle = REGULATED_AREA_BOUNDARY_LINESTYLES[objectClass5];
29506
29506
  const boundaryPaint = lineStyle ? lineStylePaint(lineStyle) : {
29507
- "line-color": resolveColor(REGULATED_AREA_BOUNDARY_LAYERS[objectClass2], ct),
29507
+ "line-color": resolveColor(REGULATED_AREA_BOUNDARY_LAYERS[objectClass5], ct),
29508
29508
  "line-width": 1,
29509
29509
  "line-dasharray": [4, 2],
29510
29510
  "line-opacity": 0.85
29511
29511
  };
29512
29512
  layers.push({
29513
- id: `s52-${objectClass2}-boundary`,
29513
+ id: `s52-${objectClass5}-boundary`,
29514
29514
  type: "line",
29515
29515
  source: sourceId,
29516
- "source-layer": objectClass2,
29516
+ "source-layer": objectClass5,
29517
29517
  filter: GEOM_FILTERS.fill,
29518
29518
  paint: boundaryPaint,
29519
29519
  metadata: {
29520
- "s52:objectClass": objectClass2,
29520
+ "s52:objectClass": objectClass5,
29521
29521
  "s52:role": "boundary",
29522
29522
  ...lineStyle ? { "s52:lineStyle": lineStyle } : {}
29523
29523
  }
29524
29524
  });
29525
29525
  }
29526
- if (objectClass2 === "ACHARE" && resolved.type === "fill") {
29526
+ if (objectClass5 === "ACHARE" && resolved.type === "fill") {
29527
29527
  layers.push({
29528
29528
  id: "s52-ACHARE-boundary",
29529
29529
  type: "line",
@@ -29539,7 +29539,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29539
29539
  metadata: { "s52:objectClass": "ACHARE", "s52:role": "boundary" }
29540
29540
  });
29541
29541
  }
29542
- if (objectClass2 === "DRGARE" && resolved.type === "fill") {
29542
+ if (objectClass5 === "DRGARE" && resolved.type === "fill") {
29543
29543
  layers.push({
29544
29544
  id: "s52-DRGARE-boundary",
29545
29545
  type: "line",
@@ -29555,7 +29555,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29555
29555
  metadata: { "s52:objectClass": "DRGARE", "s52:role": "boundary" }
29556
29556
  });
29557
29557
  }
29558
- if (objectClass2 === "ACHARE" && resolved.type === "fill") {
29558
+ if (objectClass5 === "ACHARE" && resolved.type === "fill") {
29559
29559
  layers.push({
29560
29560
  id: "s52-ACHARE-anchor-icon",
29561
29561
  type: "symbol",
@@ -29584,7 +29584,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29584
29584
  metadata: { "s52:objectClass": "ACHARE", "s52:role": "centroid-icon" }
29585
29585
  });
29586
29586
  }
29587
- if (objectClass2 === "LNDARE" && resolved.type === "fill") {
29587
+ if (objectClass5 === "LNDARE" && resolved.type === "fill") {
29588
29588
  layers.push({
29589
29589
  id: `s52-LNDARE-point`,
29590
29590
  type: "circle",
@@ -29600,7 +29600,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29600
29600
  metadata: { "s52:objectClass": "LNDARE", "s52:role": "point" }
29601
29601
  });
29602
29602
  }
29603
- if (objectClass2 === "LNDARE" && resolved.type === "fill") {
29603
+ if (objectClass5 === "LNDARE" && resolved.type === "fill") {
29604
29604
  layers.push({
29605
29605
  id: `s52-LNDARE-line`,
29606
29606
  type: "line",
@@ -29614,7 +29614,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29614
29614
  metadata: { "s52:objectClass": "LNDARE", "s52:role": "line" }
29615
29615
  });
29616
29616
  }
29617
- if (objectClass2 === "BUAARE" && resolved.type === "fill") {
29617
+ if (objectClass5 === "BUAARE" && resolved.type === "fill") {
29618
29618
  layers.push({
29619
29619
  id: `s52-BUAARE-point`,
29620
29620
  type: "circle",
@@ -29630,7 +29630,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29630
29630
  metadata: { "s52:objectClass": "BUAARE", "s52:role": "point" }
29631
29631
  });
29632
29632
  }
29633
- if (objectClass2 === "RIVERS" && resolved.type === "fill") {
29633
+ if (objectClass5 === "RIVERS" && resolved.type === "fill") {
29634
29634
  layers.push({
29635
29635
  id: `s52-RIVERS-line`,
29636
29636
  type: "line",
@@ -29644,7 +29644,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29644
29644
  metadata: { "s52:objectClass": "RIVERS", "s52:role": "line" }
29645
29645
  });
29646
29646
  }
29647
- if (objectClass2 === "BUISGL" && resolved.type === "circle") {
29647
+ if (objectClass5 === "BUISGL" && resolved.type === "circle") {
29648
29648
  layers.push({
29649
29649
  id: `s52-BUISGL-polygon`,
29650
29650
  type: "fill",
@@ -29670,7 +29670,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29670
29670
  metadata: { "s52:objectClass": "BUISGL", "s52:role": "polygon-outline" }
29671
29671
  });
29672
29672
  }
29673
- if (objectClass2 === "BRIDGE" && resolved.type === "line") {
29673
+ if (objectClass5 === "BRIDGE" && resolved.type === "line") {
29674
29674
  layers.push({
29675
29675
  id: `s52-BRIDGE-polygon`,
29676
29676
  type: "fill",
@@ -29696,7 +29696,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29696
29696
  metadata: { "s52:objectClass": "BRIDGE", "s52:role": "polygon-outline" }
29697
29697
  });
29698
29698
  }
29699
- if (objectClass2 === "PYLONS" && resolved.type === "fill") {
29699
+ if (objectClass5 === "PYLONS" && resolved.type === "fill") {
29700
29700
  layers.push({
29701
29701
  id: `s52-PYLONS-point`,
29702
29702
  type: "circle",
@@ -29712,7 +29712,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29712
29712
  metadata: { "s52:objectClass": "PYLONS", "s52:role": "point" }
29713
29713
  });
29714
29714
  }
29715
- if (objectClass2 === "WEDKLP" && resolved.type === "fill") {
29715
+ if (objectClass5 === "WEDKLP" && resolved.type === "fill") {
29716
29716
  layers.push({
29717
29717
  id: `s52-WEDKLP-point`,
29718
29718
  type: "circle",
@@ -29729,7 +29729,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29729
29729
  metadata: { "s52:objectClass": "WEDKLP", "s52:role": "point" }
29730
29730
  });
29731
29731
  }
29732
- if (objectClass2 === "SLOGRD" && resolved.type === "fill") {
29732
+ if (objectClass5 === "SLOGRD" && resolved.type === "fill") {
29733
29733
  layers.push({
29734
29734
  id: `s52-SLOGRD-point`,
29735
29735
  type: "circle",
@@ -29746,7 +29746,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29746
29746
  metadata: { "s52:objectClass": "SLOGRD", "s52:role": "point" }
29747
29747
  });
29748
29748
  }
29749
- if (objectClass2 === "RUNWAY" && resolved.type === "fill") {
29749
+ if (objectClass5 === "RUNWAY" && resolved.type === "fill") {
29750
29750
  layers.push({
29751
29751
  id: `s52-RUNWAY-line`,
29752
29752
  type: "line",
@@ -29760,7 +29760,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29760
29760
  metadata: { "s52:objectClass": "RUNWAY", "s52:role": "line" }
29761
29761
  });
29762
29762
  }
29763
- if (objectClass2 === "FORSTC" && resolved.type === "fill") {
29763
+ if (objectClass5 === "FORSTC" && resolved.type === "fill") {
29764
29764
  layers.push({
29765
29765
  id: `s52-FORSTC-line`,
29766
29766
  type: "line",
@@ -29774,7 +29774,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29774
29774
  metadata: { "s52:objectClass": "FORSTC", "s52:role": "line" }
29775
29775
  });
29776
29776
  }
29777
- if (objectClass2 === "FSHFAC" && resolved.type === "fill") {
29777
+ if (objectClass5 === "FSHFAC" && resolved.type === "fill") {
29778
29778
  layers.push({
29779
29779
  id: `s52-FSHFAC-point`,
29780
29780
  type: "circle",
@@ -29790,7 +29790,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29790
29790
  metadata: { "s52:objectClass": "FSHFAC", "s52:role": "point" }
29791
29791
  });
29792
29792
  }
29793
- if (objectClass2 === "OBSTRN" && resolved.type === "symbol") {
29793
+ if (objectClass5 === "OBSTRN" && resolved.type === "symbol") {
29794
29794
  layers.push({
29795
29795
  id: `s52-OBSTRN-polygon`,
29796
29796
  type: "fill",
@@ -29830,7 +29830,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29830
29830
  metadata: { "s52:objectClass": "OBSTRN", "s52:role": "line" }
29831
29831
  });
29832
29832
  }
29833
- if (objectClass2 === "SLCONS" && resolved.type === "line") {
29833
+ if (objectClass5 === "SLCONS" && resolved.type === "line") {
29834
29834
  layers.push({
29835
29835
  id: `s52-SLCONS-polygon`,
29836
29836
  type: "fill",
@@ -29870,7 +29870,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29870
29870
  metadata: { "s52:objectClass": "SLCONS", "s52:role": "point" }
29871
29871
  });
29872
29872
  }
29873
- if (objectClass2 === "PRDARE" && resolved.type === "line") {
29873
+ if (objectClass5 === "PRDARE" && resolved.type === "line") {
29874
29874
  layers.push({
29875
29875
  id: `s52-PRDARE-point`,
29876
29876
  type: "circle",
@@ -29887,7 +29887,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29887
29887
  metadata: { "s52:objectClass": "PRDARE", "s52:role": "point" }
29888
29888
  });
29889
29889
  }
29890
- if (objectClass2 === "CTNARE" && resolved.type === "line") {
29890
+ if (objectClass5 === "CTNARE" && resolved.type === "line") {
29891
29891
  layers.push({
29892
29892
  id: `s52-CTNARE-point`,
29893
29893
  type: "circle",
@@ -29903,7 +29903,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29903
29903
  metadata: { "s52:objectClass": "CTNARE", "s52:role": "point" }
29904
29904
  });
29905
29905
  }
29906
- if (objectClass2 === "PONTON" && resolved.type === "line") {
29906
+ if (objectClass5 === "PONTON" && resolved.type === "line") {
29907
29907
  layers.push({
29908
29908
  id: `s52-PONTON-polygon`,
29909
29909
  type: "fill",
@@ -29929,7 +29929,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29929
29929
  metadata: { "s52:objectClass": "PONTON", "s52:role": "polygon-outline" }
29930
29930
  });
29931
29931
  }
29932
- if (objectClass2 === "WRECKS" && resolved.type === "symbol") {
29932
+ if (objectClass5 === "WRECKS" && resolved.type === "symbol") {
29933
29933
  layers.push({
29934
29934
  id: `s52-WRECKS-polygon`,
29935
29935
  type: "fill",
@@ -29956,7 +29956,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29956
29956
  metadata: { "s52:objectClass": "WRECKS", "s52:role": "polygon-outline" }
29957
29957
  });
29958
29958
  }
29959
- if (objectClass2 === "WATTUR" && resolved.type === "symbol") {
29959
+ if (objectClass5 === "WATTUR" && resolved.type === "symbol") {
29960
29960
  layers.push({
29961
29961
  id: `s52-WATTUR-polygon`,
29962
29962
  type: "fill",
@@ -29970,7 +29970,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29970
29970
  metadata: { "s52:objectClass": "WATTUR", "s52:role": "polygon" }
29971
29971
  });
29972
29972
  }
29973
- if (objectClass2 === "MAGVAR" && resolved.type === "line") {
29973
+ if (objectClass5 === "MAGVAR" && resolved.type === "line") {
29974
29974
  layers.push({
29975
29975
  id: "s52-MAGVAR-point",
29976
29976
  type: "circle",
@@ -29987,7 +29987,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
29987
29987
  metadata: { "s52:objectClass": "MAGVAR", "s52:role": "point" }
29988
29988
  });
29989
29989
  }
29990
- if (objectClass2 === "DMPGRD" && resolved.type === "fill") {
29990
+ if (objectClass5 === "DMPGRD" && resolved.type === "fill") {
29991
29991
  layers.push({
29992
29992
  id: `s52-DMPGRD-point`,
29993
29993
  type: "circle",
@@ -30004,7 +30004,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30004
30004
  metadata: { "s52:objectClass": "DMPGRD", "s52:role": "point" }
30005
30005
  });
30006
30006
  }
30007
- if (objectClass2 === "DAMCON" && resolved.type === "line") {
30007
+ if (objectClass5 === "DAMCON" && resolved.type === "line") {
30008
30008
  layers.push({
30009
30009
  id: `s52-DAMCON-polygon`,
30010
30010
  type: "fill",
@@ -30030,7 +30030,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30030
30030
  metadata: { "s52:objectClass": "DAMCON", "s52:role": "outline" }
30031
30031
  });
30032
30032
  }
30033
- if (objectClass2 === "GATCON" && resolved.type === "line") {
30033
+ if (objectClass5 === "GATCON" && resolved.type === "line") {
30034
30034
  layers.push({
30035
30035
  id: `s52-GATCON-polygon`,
30036
30036
  type: "fill",
@@ -30056,7 +30056,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30056
30056
  metadata: { "s52:objectClass": "GATCON", "s52:role": "outline" }
30057
30057
  });
30058
30058
  }
30059
- if (objectClass2 === "CANALS" && resolved.type === "line") {
30059
+ if (objectClass5 === "CANALS" && resolved.type === "line") {
30060
30060
  layers.push({
30061
30061
  id: `s52-CANALS-polygon`,
30062
30062
  type: "fill",
@@ -30070,7 +30070,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30070
30070
  metadata: { "s52:objectClass": "CANALS", "s52:role": "polygon" }
30071
30071
  });
30072
30072
  }
30073
- if (objectClass2 === "PILBOP" && resolved.type === "symbol") {
30073
+ if (objectClass5 === "PILBOP" && resolved.type === "symbol") {
30074
30074
  layers.push({
30075
30075
  id: `s52-PILBOP-polygon`,
30076
30076
  type: "fill",
@@ -30097,7 +30097,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30097
30097
  metadata: { "s52:objectClass": "PILBOP", "s52:role": "outline" }
30098
30098
  });
30099
30099
  }
30100
- if (objectClass2 === "HRBFAC" && resolved.type === "circle") {
30100
+ if (objectClass5 === "HRBFAC" && resolved.type === "circle") {
30101
30101
  layers.push({
30102
30102
  id: `s52-HRBFAC-polygon`,
30103
30103
  type: "fill",
@@ -30111,7 +30111,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30111
30111
  metadata: { "s52:objectClass": "HRBFAC", "s52:role": "polygon" }
30112
30112
  });
30113
30113
  }
30114
- if (objectClass2 === "MARCUL" && resolved.type === "fill") {
30114
+ if (objectClass5 === "MARCUL" && resolved.type === "fill") {
30115
30115
  layers.push({
30116
30116
  id: `s52-MARCUL-point`,
30117
30117
  type: "circle",
@@ -30141,7 +30141,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30141
30141
  metadata: { "s52:objectClass": "MARCUL", "s52:role": "line" }
30142
30142
  });
30143
30143
  }
30144
- if (objectClass2 === "RECTRC" && resolved.type === "line") {
30144
+ if (objectClass5 === "RECTRC" && resolved.type === "line") {
30145
30145
  layers.push({
30146
30146
  id: `s52-RECTRC-polygon`,
30147
30147
  type: "fill",
@@ -30155,7 +30155,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30155
30155
  metadata: { "s52:objectClass": "RECTRC", "s52:role": "polygon" }
30156
30156
  });
30157
30157
  }
30158
- if (objectClass2 === "PONTON" && resolved.type === "fill") {
30158
+ if (objectClass5 === "PONTON" && resolved.type === "fill") {
30159
30159
  layers.push({
30160
30160
  id: `s52-PONTON-line`,
30161
30161
  type: "line",
@@ -30169,7 +30169,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30169
30169
  metadata: { "s52:objectClass": "PONTON", "s52:role": "line" }
30170
30170
  });
30171
30171
  }
30172
- if (objectClass2 === "SILTNK" && resolved.type === "symbol") {
30172
+ if (objectClass5 === "SILTNK" && resolved.type === "symbol") {
30173
30173
  layers.push({
30174
30174
  id: `s52-SILTNK-symbol-polygon`,
30175
30175
  type: "symbol",
@@ -30187,7 +30187,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30187
30187
  metadata: { "s52:objectClass": "SILTNK", "s52:role": "symbol-polygon" }
30188
30188
  });
30189
30189
  }
30190
- if (objectClass2 === "ACHBRT" && resolved.type === "symbol") {
30190
+ if (objectClass5 === "ACHBRT" && resolved.type === "symbol") {
30191
30191
  layers.push({
30192
30192
  id: `s52-ACHBRT-symbol-polygon`,
30193
30193
  type: "symbol",
@@ -30205,7 +30205,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30205
30205
  metadata: { "s52:objectClass": "ACHBRT", "s52:role": "symbol-polygon" }
30206
30206
  });
30207
30207
  }
30208
- if (objectClass2 === "BERTHS" && resolved.type === "line") {
30208
+ if (objectClass5 === "BERTHS" && resolved.type === "line") {
30209
30209
  layers.push({
30210
30210
  id: `s52-BERTHS-circle`,
30211
30211
  type: "circle",
@@ -30221,7 +30221,7 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
30221
30221
  metadata: { "s52:objectClass": "BERTHS", "s52:role": "point" }
30222
30222
  });
30223
30223
  }
30224
- if (objectClass2 === "TUNNEL" && resolved.type === "line") {
30224
+ if (objectClass5 === "TUNNEL" && resolved.type === "line") {
30225
30225
  layers.push({
30226
30226
  // NOT `s52-TUNNEL-line` — that id is already taken by the main layer
30227
30227
  // (`s52-${objectClass}-${resolved.type}`), and duplicate layer ids
@@ -30251,9 +30251,9 @@ function dangerDepthMetresDown() {
30251
30251
  ""
30252
30252
  ];
30253
30253
  }
30254
- function buildLabelLayer2(objectClass2, ct, sourceId = DEFAULT_REGION, depthUnits = "meters", labelOpts = {}) {
30255
- if (!LABELED_LAYERS.has(objectClass2)) return null;
30256
- const config = getLabelConfig(objectClass2, {
30254
+ function buildLabelLayer2(objectClass5, ct, sourceId = DEFAULT_REGION, depthUnits = "meters", labelOpts = {}) {
30255
+ if (!LABELED_LAYERS.has(objectClass5)) return null;
30256
+ const config = getLabelConfig(objectClass5, {
30257
30257
  colorTable: ct,
30258
30258
  safetyContour: labelOpts.safetyContour,
30259
30259
  twoShadeSoundings: labelOpts.twoShadeSoundings,
@@ -30261,7 +30261,7 @@ function buildLabelLayer2(objectClass2, ct, sourceId = DEFAULT_REGION, depthUnit
30261
30261
  });
30262
30262
  if (!config) return null;
30263
30263
  let textField = config.textField;
30264
- if (objectClass2 === "LIGHTS") {
30264
+ if (objectClass5 === "LIGHTS") {
30265
30265
  textField = buildLightLabelExpression(depthUnits);
30266
30266
  }
30267
30267
  if (typeof textField !== "string" && Array.isArray(textField)) {
@@ -30271,7 +30271,7 @@ function buildLabelLayer2(objectClass2, ct, sourceId = DEFAULT_REGION, depthUnit
30271
30271
  }
30272
30272
  }
30273
30273
  if (depthUnits === "feet") {
30274
- if (objectClass2 === "SOUNDG") {
30274
+ if (objectClass5 === "SOUNDG") {
30275
30275
  textField = [
30276
30276
  "concat",
30277
30277
  [
@@ -30288,13 +30288,13 @@ function buildLabelLayer2(objectClass2, ct, sourceId = DEFAULT_REGION, depthUnit
30288
30288
  ],
30289
30289
  ""
30290
30290
  ];
30291
- } else if (objectClass2 === "DEPCNT") {
30291
+ } else if (objectClass5 === "DEPCNT") {
30292
30292
  textField = [
30293
30293
  "concat",
30294
30294
  ["round", ["*", ["to-number", ["get", "VALDCO"]], 3.28084]],
30295
30295
  "ft"
30296
30296
  ];
30297
- } else if (objectClass2 === "UWTROC" || objectClass2 === "OBSTRN" || objectClass2 === "WRECKS") {
30297
+ } else if (objectClass5 === "UWTROC" || objectClass5 === "OBSTRN" || objectClass5 === "WRECKS") {
30298
30298
  const valsouFt = [
30299
30299
  "to-number",
30300
30300
  ["coalesce", ["get", "VALSOU"], ["get", "valsou"], 0],
@@ -30311,15 +30311,15 @@ function buildLabelLayer2(objectClass2, ct, sourceId = DEFAULT_REGION, depthUnit
30311
30311
  ""
30312
30312
  ];
30313
30313
  }
30314
- } else if (labelOpts.dangerDepthRounding === "down" && (objectClass2 === "UWTROC" || objectClass2 === "OBSTRN" || objectClass2 === "WRECKS")) {
30314
+ } else if (labelOpts.dangerDepthRounding === "down" && (objectClass5 === "UWTROC" || objectClass5 === "OBSTRN" || objectClass5 === "WRECKS")) {
30315
30315
  textField = dangerDepthMetresDown();
30316
30316
  }
30317
- const labelPriority = getLabelPriority(objectClass2);
30317
+ const labelPriority = getLabelPriority(objectClass5);
30318
30318
  const layer = {
30319
- id: `s52-${objectClass2}-label`,
30319
+ id: `s52-${objectClass5}-label`,
30320
30320
  type: "symbol",
30321
30321
  source: sourceId,
30322
- "source-layer": objectClass2,
30322
+ "source-layer": objectClass5,
30323
30323
  filter: GEOM_FILTERS.symbol,
30324
30324
  layout: {
30325
30325
  "text-field": textField,
@@ -30339,14 +30339,14 @@ function buildLabelLayer2(objectClass2, ct, sourceId = DEFAULT_REGION, depthUnit
30339
30339
  "text-halo-width": config.textHaloWidth
30340
30340
  },
30341
30341
  metadata: {
30342
- "s52:objectClass": objectClass2,
30342
+ "s52:objectClass": objectClass5,
30343
30343
  "chrt:labelPriority": labelPriority
30344
30344
  }
30345
30345
  };
30346
30346
  if (config.minzoom) {
30347
30347
  layer.minzoom = config.minzoom;
30348
30348
  }
30349
- if (objectClass2 === "LIGHTS") {
30349
+ if (objectClass5 === "LIGHTS") {
30350
30350
  layer.layout = {
30351
30351
  ...layer.layout,
30352
30352
  "text-offset": [
@@ -30357,28 +30357,28 @@ function buildLabelLayer2(objectClass2, ct, sourceId = DEFAULT_REGION, depthUnit
30357
30357
  ]
30358
30358
  };
30359
30359
  }
30360
- if (objectClass2 === "DEPCNT") {
30360
+ if (objectClass5 === "DEPCNT") {
30361
30361
  layer.filter = GEOM_FILTERS.line;
30362
30362
  }
30363
- if (objectClass2 === "CBLOHD" || objectClass2 === "PIPOHD") {
30363
+ if (objectClass5 === "CBLOHD" || objectClass5 === "PIPOHD") {
30364
30364
  layer.filter = GEOM_FILTERS.line;
30365
30365
  }
30366
- if (objectClass2 === "SBDARE") {
30366
+ if (objectClass5 === "SBDARE") {
30367
30367
  delete layer.filter;
30368
30368
  }
30369
- if (objectClass2 === "MAGVAR") {
30369
+ if (objectClass5 === "MAGVAR") {
30370
30370
  delete layer.filter;
30371
30371
  }
30372
- if (getLabelBehavior(objectClass2) === "orientation-cross-band") {
30372
+ if (getLabelBehavior(objectClass5) === "orientation-cross-band") {
30373
30373
  layer.filter = LABEL_ANCHOR_FILTER;
30374
30374
  }
30375
30375
  return layer;
30376
30376
  }
30377
- function getGeomTypesForClass(objectClass2, defaultType) {
30378
- if (SYMBOL_MAP[objectClass2] && defaultType === "symbol") {
30377
+ function getGeomTypesForClass(objectClass5, defaultType) {
30378
+ if (SYMBOL_MAP[objectClass5] && defaultType === "symbol") {
30379
30379
  return ["symbol"];
30380
30380
  }
30381
- if (objectClass2 === "SOUNDG") {
30381
+ if (objectClass5 === "SOUNDG") {
30382
30382
  return ["circle"];
30383
30383
  }
30384
30384
  if (defaultType) {
@@ -30460,9 +30460,9 @@ function arcSegmentSvg(token, sweepDeg) {
30460
30460
  const box = segmentBox(sweepDeg);
30461
30461
  const end = sweepDeg + JOINT_OVERLAP_DEG;
30462
30462
  const core = token === "CHBRN" ? OBSCURED_CORE_WIDTH : CORE_WIDTH;
30463
- const R = SECTOR_ARC_RADIUS;
30464
- const outline = annularSectorPath(end, R - OUTLINE_WIDTH / 2, R + OUTLINE_WIDTH / 2, box);
30465
- const inner = annularSectorPath(end, R - core / 2, R + core / 2, box);
30463
+ const R2 = SECTOR_ARC_RADIUS;
30464
+ const outline = annularSectorPath(end, R2 - OUTLINE_WIDTH / 2, R2 + OUTLINE_WIDTH / 2, box);
30465
+ const inner = annularSectorPath(end, R2 - core / 2, R2 + core / 2, box);
30466
30466
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${box.w}" height="${box.h}" viewBox="0 0 ${box.w} ${box.h}"><path d="${outline}" fill="CHBLK"/><path d="${inner}" fill="${token}"/></svg>`;
30467
30467
  }
30468
30468
  function legSvg() {
@@ -31002,9 +31002,9 @@ var RASTER_ATON_CLASSES = Object.keys(
31002
31002
  if (!s52) return true;
31003
31003
  return JSON.stringify({ r: paper.rows, d: paper.defaultSymbol }) !== JSON.stringify({ r: s52.rows, d: s52.defaultSymbol });
31004
31004
  });
31005
- function rasterAtonIconExpression(objectClass2) {
31006
- const lookup = S52_ATON_LOOKUPS_PAPER[objectClass2];
31007
- if (!lookup) throw new Error(`raster-style: no paper lookup for ${objectClass2}`);
31005
+ function rasterAtonIconExpression(objectClass5) {
31006
+ const lookup = S52_ATON_LOOKUPS_PAPER[objectClass5];
31007
+ if (!lookup) throw new Error(`raster-style: no paper lookup for ${objectClass5}`);
31008
31008
  return compileAtonExpression(lookup, resolveRasterImage);
31009
31009
  }
31010
31010
  function getRasterSvg(name, table = "DAY") {
@@ -31018,17 +31018,461 @@ function applyRasterSymbolSet(style) {
31018
31018
  const layout = layer.layout;
31019
31019
  if (!layout || layout["icon-image"] == null) continue;
31020
31020
  const metadata2 = layer.metadata;
31021
- const objectClass2 = metadata2?.["s52:objectClass"];
31022
- if (typeof objectClass2 !== "string" || !classes.has(objectClass2)) continue;
31023
- layout["icon-image"] = rasterAtonIconExpression(objectClass2);
31021
+ const objectClass5 = metadata2?.["s52:objectClass"];
31022
+ if (typeof objectClass5 !== "string" || !classes.has(objectClass5)) continue;
31023
+ layout["icon-image"] = rasterAtonIconExpression(objectClass5);
31024
31024
  }
31025
31025
  const metadata = style.metadata;
31026
- metadata["chrt:symbol-set"] = "raster";
31026
+ metadata["chrt:symbol-set"] = "int1";
31027
31027
  return style;
31028
31028
  }
31029
31029
 
31030
+ // src/atlas/symbol-family-ids.ts
31031
+ var LEGACY_SYMBOL_FAMILY_ALIASES = { raster: "int1" };
31032
+ function normalizeSymbolFamily(family) {
31033
+ return family === "raster" ? LEGACY_SYMBOL_FAMILY_ALIASES.raster : family;
31034
+ }
31035
+
31036
+ // src/atlas/look-painter.ts
31037
+ function painter(w, h) {
31038
+ const acc = new Float32Array(w * h * 4);
31039
+ const over = (x, y, c, cov) => {
31040
+ if (x < 0 || y < 0 || x >= w || y >= h || cov <= 0) return;
31041
+ const k = (y * w + x) * 4;
31042
+ const a = c[3] / 255 * Math.min(1, cov);
31043
+ acc[k] = c[0] * a + acc[k] * (1 - a);
31044
+ acc[k + 1] = c[1] * a + acc[k + 1] * (1 - a);
31045
+ acc[k + 2] = c[2] * a + acc[k + 2] * (1 - a);
31046
+ acc[k + 3] = a + acc[k + 3] * (1 - a);
31047
+ };
31048
+ const dot = (cx, cy, r, c) => {
31049
+ for (let y = Math.floor(cy - r - 1); y <= Math.ceil(cy + r + 1); y++) {
31050
+ for (let x = Math.floor(cx - r - 1); x <= Math.ceil(cx + r + 1); x++) over(x, y, c, r + 0.5 - Math.hypot(x + 0.5 - cx, y + 0.5 - cy));
31051
+ }
31052
+ };
31053
+ const stroke = (pts, r, c) => {
31054
+ const cov = new Float32Array(w * h);
31055
+ for (let i = 1; i < pts.length; i++) {
31056
+ const [x0, y0] = pts[i - 1];
31057
+ const [x1, y1] = pts[i];
31058
+ const n = Math.max(1, Math.ceil(Math.hypot(x1 - x0, y1 - y0) * 2));
31059
+ for (let t = 0; t <= n; t++) {
31060
+ const cx = x0 + (x1 - x0) * t / n;
31061
+ const cy = y0 + (y1 - y0) * t / n;
31062
+ for (let y = Math.floor(cy - r - 1); y <= Math.ceil(cy + r + 1); y++) {
31063
+ for (let x = Math.floor(cx - r - 1); x <= Math.ceil(cx + r + 1); x++) {
31064
+ if (x < 0 || y < 0 || x >= w || y >= h) continue;
31065
+ const v = Math.max(0, Math.min(1, r + 0.5 - Math.hypot(x + 0.5 - cx, y + 0.5 - cy)));
31066
+ if (v > cov[y * w + x]) cov[y * w + x] = v;
31067
+ }
31068
+ }
31069
+ }
31070
+ }
31071
+ for (let k = 0; k < cov.length; k++) if (cov[k] > 0) over(k % w, Math.floor(k / w), c, cov[k]);
31072
+ };
31073
+ const fill = (pts, c) => {
31074
+ const y0 = Math.max(0, Math.floor(Math.min(...pts.map((p) => p[1]))));
31075
+ const y1 = Math.min(h - 1, Math.ceil(Math.max(...pts.map((p) => p[1]))));
31076
+ const x0 = Math.max(0, Math.floor(Math.min(...pts.map((p) => p[0]))));
31077
+ const x1 = Math.min(w - 1, Math.ceil(Math.max(...pts.map((p) => p[0]))));
31078
+ for (let y = y0; y <= y1; y++) {
31079
+ for (let x = x0; x <= x1; x++) {
31080
+ let inside = 0;
31081
+ for (let sy = 0; sy < 4; sy++) for (let sx = 0; sx < 4; sx++) {
31082
+ const px = x + (sx + 0.5) / 4;
31083
+ const py = y + (sy + 0.5) / 4;
31084
+ let odd = false;
31085
+ for (let i = 0, j = pts.length - 1; i < pts.length; j = i++) {
31086
+ const [xi, yi] = pts[i];
31087
+ const [xj, yj] = pts[j];
31088
+ if (yi > py !== yj > py && px < (xj - xi) * (py - yi) / (yj - yi) + xi) odd = !odd;
31089
+ }
31090
+ if (odd) inside++;
31091
+ }
31092
+ over(x, y, c, inside / 16);
31093
+ }
31094
+ }
31095
+ };
31096
+ const data = () => {
31097
+ const out = new Uint8Array(w * h * 4);
31098
+ for (let k = 0; k < w * h; k++) {
31099
+ const a = acc[k * 4 + 3];
31100
+ if (a <= 0) continue;
31101
+ out[k * 4] = Math.round(acc[k * 4] / a);
31102
+ out[k * 4 + 1] = Math.round(acc[k * 4 + 1] / a);
31103
+ out[k * 4 + 2] = Math.round(acc[k * 4 + 2] / a);
31104
+ out[k * 4 + 3] = Math.round(a * 255);
31105
+ }
31106
+ return out;
31107
+ };
31108
+ return { dot, stroke, fill, data };
31109
+ }
31110
+ function turn([x, y], cx, cy, deg) {
31111
+ const r = deg * Math.PI / 180;
31112
+ const dx = x - cx;
31113
+ const dy = y - cy;
31114
+ return [cx + dx * Math.cos(r) - dy * Math.sin(r), cy + dx * Math.sin(r) + dy * Math.cos(r)];
31115
+ }
31116
+
31117
+ // src/atlas/uschart1-marks.ts
31118
+ var CLASSIC_MARK_TONES = {
31119
+ color: { magenta: "#953699", green: "#068b00", ink: "#000000", open: "#ffffff" },
31120
+ // A laser printer's greys: red lighter than green, so a banded mark still
31121
+ // shows its bands. The label (R, G) says which is which, as it always does.
31122
+ mono: { magenta: "#8c8c8c", green: "#4d4d4d", ink: "#000000", open: "#ffffff" }
31123
+ };
31124
+ var PREFIX = { color: "chrt-look-cl-", mono: "chrt-look-cm-" };
31125
+ function classicMarkId(ink, name) {
31126
+ return PREFIX[ink] + name;
31127
+ }
31128
+ function classicMarkInk(id) {
31129
+ for (const ink of ["color", "mono"]) {
31130
+ if (id.startsWith(PREFIX[ink]) && CLASSIC_MARK_NAMES.includes(id.slice(PREFIX[ink].length))) return ink;
31131
+ }
31132
+ return null;
31133
+ }
31134
+ var COLOURS = ["red", "green", "black", "yellow", "white"];
31135
+ var BOARDS = ["triangle-up", "triangle-down", "square", "rhombus"];
31136
+ var BOARD_TOPSHP_SHAPE = [
31137
+ [1, "triangle-up"],
31138
+ [24, "triangle-up"],
31139
+ [29, "triangle-up"],
31140
+ [2, "triangle-down"],
31141
+ [25, "triangle-down"],
31142
+ [12, "rhombus"],
31143
+ [11, "rhombus"],
31144
+ [31, "rhombus"]
31145
+ ];
31146
+ var paints = COLOURS.flatMap((a) => [
31147
+ a,
31148
+ ...COLOURS.filter((b) => b !== a).flatMap((b) => [`${a}-${b}-h`, `${a}-${b}-v`])
31149
+ ]);
31150
+ var BUOY_NAMES = paints.map((p) => `buoy-${p}`);
31151
+ var BOARD_NAMES = BOARDS.flatMap((s) => paints.map((p) => `board-${s}-${p}`));
31152
+ var CLASSIC_MARK_NAMES = ["flare", "disc", ...BUOY_NAMES, ...BOARD_NAMES];
31153
+ function objectClass2(l) {
31154
+ const m = l.metadata;
31155
+ const c = (typeof m === "object" && m !== null ? m["s52:objectClass"] : void 0) ?? l["source-layer"] ?? "";
31156
+ return String(c).toUpperCase();
31157
+ }
31158
+ var DROPPED = /^s52-LIGHTS-lamp-(glow|core)$/;
31159
+ var FLARES = /* @__PURE__ */ new Set(["LIGHTS11", "LIGHTS12", "LIGHTS13", "LITDEF11", "raster:LIGHTS11", "raster:LIGHTS12", "raster:LIGHTS13", "raster:LITDEF11"]);
31160
+ var BUOYS = /* @__PURE__ */ new Set(["BOYLAT", "BOYCAR", "BOYISD", "BOYSAW", "BOYSPP"]);
31161
+ var BEACONS = /* @__PURE__ */ new Set(["BCNLAT", "BCNCAR", "BCNISD", "BCNSAW", "BCNSPP"]);
31162
+ var HAS_HEIGHT = ["any", ["has", "HEIGHT"], ["has", "height"]];
31163
+ var num2 = (attr) => ["to-number", ["coalesce", ["get", attr], ["get", attr.toLowerCase()], 0], 0];
31164
+ var LOZENGE_BUOY = ["!", ["in", num2("BOYSHP"), ["literal", [7, 8]]]];
31165
+ var DAYBEACON = ["!", ["in", num2("BCNSHP"), ["literal", [3, 4, 6]]]];
31166
+ var SHAPE_LETTERS = [
31167
+ [1, "N"],
31168
+ [2, "C"],
31169
+ [3, "SP"],
31170
+ [4, "P"],
31171
+ [5, "S"]
31172
+ ];
31173
+ function withShapeLetter(field) {
31174
+ const lbl = ["var", "clLabel"];
31175
+ const shp = ["var", "clShape"];
31176
+ return [
31177
+ "let",
31178
+ "clLabel",
31179
+ ["to-string", field],
31180
+ [
31181
+ "let",
31182
+ "clShape",
31183
+ ["match", num2("BOYSHP"), ...SHAPE_LETTERS.flat(), ""],
31184
+ [
31185
+ "case",
31186
+ ["==", shp, ""],
31187
+ lbl,
31188
+ ["==", lbl, ""],
31189
+ shp,
31190
+ // A colour letter and a space first ("R \"2\""): the shape goes after it.
31191
+ ["all", [">=", ["length", lbl], 2], ["==", ["slice", lbl, 1, 2], " "], ["in", ["slice", lbl, 0, 1], "RGY"]],
31192
+ ["concat", ["slice", lbl, 0, 2], shp, " ", ["slice", lbl, 2]],
31193
+ ["concat", shp, " ", lbl]
31194
+ ]
31195
+ ]
31196
+ ];
31197
+ }
31198
+ function colourName(code) {
31199
+ return ["match", code, "1", "white", "2", "black", "3", "red", "4", "green", "6", "yellow", "white"];
31200
+ }
31201
+ function withColours(inner) {
31202
+ const raw = ["to-string", ["coalesce", ["get", "COLOUR"], ["get", "colour"], ""]];
31203
+ const body = ["case", ["==", ["slice", ["var", "raw"], 0, 2], '["'], ["slice", ["var", "raw"], 2], ["==", ["slice", ["var", "raw"], 0, 1], "["], ["slice", ["var", "raw"], 1], ["var", "raw"]];
31204
+ const firstOf = (s) => ["case", ["all", ["!=", ["slice", s, 1, 2], ""], ["in", ["slice", s, 1, 2], "0123456789"]], "x", ["slice", s, 0, 1]];
31205
+ const after = [
31206
+ "let",
31207
+ "at",
31208
+ ["index-of", ",", ["var", "body"]],
31209
+ ["case", ["<", ["var", "at"], 0], "", ["slice", ["var", "body"], ["+", ["var", "at"], 1]]]
31210
+ ];
31211
+ const second = ["case", ["==", ["slice", ["var", "rest"], 0, 1], '"'], ["slice", ["var", "rest"], 1], ["var", "rest"]];
31212
+ const pat = ["to-string", ["coalesce", ["get", "COLPAT"], ["get", "colpat"], ""]];
31213
+ const stripes = ["any", ["==", pat, "2"], [">=", ["index-of", "2", pat], 0]];
31214
+ return [
31215
+ "let",
31216
+ "raw",
31217
+ raw,
31218
+ [
31219
+ "let",
31220
+ "body",
31221
+ body,
31222
+ [
31223
+ "let",
31224
+ "rest",
31225
+ after,
31226
+ [
31227
+ "let",
31228
+ "c1",
31229
+ colourName(firstOf(["var", "body"])),
31230
+ [
31231
+ "let",
31232
+ "c2",
31233
+ ["case", ["==", ["var", "rest"], ""], ["var", "c1"], colourName(firstOf(second))],
31234
+ [
31235
+ "let",
31236
+ "split",
31237
+ ["case", stripes, "-v", "-h"],
31238
+ inner
31239
+ ]
31240
+ ]
31241
+ ]
31242
+ ]
31243
+ ]
31244
+ ];
31245
+ }
31246
+ function painted(prefix, kind) {
31247
+ return [
31248
+ "case",
31249
+ ["==", ["var", "c1"], ["var", "c2"]],
31250
+ ["concat", prefix, kind, "-", ["var", "c1"]],
31251
+ ["concat", prefix, kind, "-", ["var", "c1"], "-", ["var", "c2"], ["var", "split"]]
31252
+ ];
31253
+ }
31254
+ function lozenge(ink, plain) {
31255
+ return ["case", LOZENGE_BUOY, withColours(painted(PREFIX[ink], "buoy")), plain];
31256
+ }
31257
+ function daybeacon(ink, plain) {
31258
+ const lateral = ["any", ["==", ["var", "c1"], "red"], ["==", ["var", "c1"], "green"]];
31259
+ const shape = ["case", ["==", ["var", "c1"], "red"], "triangle-up", "square"];
31260
+ return withColours(["case", ["all", DAYBEACON, lateral], painted(PREFIX[ink], ["concat", "board-", shape]), plain]);
31261
+ }
31262
+ function dayboard(ink) {
31263
+ const shape = ["match", num2("TOPSHP"), ...BOARD_TOPSHP_SHAPE.flatMap(([code, s]) => [code, s]), "square"];
31264
+ return withColours(painted(PREFIX[ink], ["concat", "board-", shape]));
31265
+ }
31266
+ function withClassicMarks(style, ink) {
31267
+ const out = [];
31268
+ const discs = [];
31269
+ for (const layer of style.layers) {
31270
+ if (DROPPED.test(layer.id)) continue;
31271
+ const cls = objectClass2(layer);
31272
+ const layout = layer.layout;
31273
+ if (layer.type !== "symbol" || !layout) {
31274
+ out.push(layer);
31275
+ continue;
31276
+ }
31277
+ if (layout["text-field"] !== void 0 && BUOYS.has(cls) && /-label/.test(layer.id)) {
31278
+ out.push({ ...layer, layout: { ...layout, "text-field": withShapeLetter(layout["text-field"]) } });
31279
+ continue;
31280
+ }
31281
+ if (layout["icon-image"] === void 0 || !/-symbol/.test(layer.id)) {
31282
+ out.push(layer);
31283
+ continue;
31284
+ }
31285
+ if (BUOYS.has(cls)) out.push({ ...layer, layout: { ...layout, "icon-image": lozenge(ink, layout["icon-image"]) } });
31286
+ else if (BEACONS.has(cls)) out.push({ ...layer, layout: { ...layout, "icon-image": daybeacon(ink, layout["icon-image"]) } });
31287
+ else if (cls === "DAYMAR") out.push({ ...layer, layout: { ...layout, "icon-image": dayboard(ink), "icon-offset": [0, 0] } });
31288
+ else if (cls === "LIGHTS") {
31289
+ discs.push({
31290
+ ...layer,
31291
+ id: `${layer.id}-look-disc`,
31292
+ filter: ["all", layer.filter ?? true, ["!", HAS_HEIGHT]],
31293
+ layout: { ...layout, "icon-image": classicMarkId(ink, "disc"), "icon-offset": [0, 0], "icon-rotate": 0 }
31294
+ });
31295
+ out.push({
31296
+ ...layer,
31297
+ filter: ["all", layer.filter ?? true, HAS_HEIGHT],
31298
+ layout: { ...layout, "icon-image": replaceLiteral(layout["icon-image"], FLARES, classicMarkId(ink, "flare")) }
31299
+ });
31300
+ } else out.push(layer);
31301
+ }
31302
+ const at = out.findIndex((l) => /^s52-(BOY|BCN)[A-Z]{3}-symbol/.test(l.id));
31303
+ out.splice(at < 0 ? out.length : at, 0, ...discs);
31304
+ return {
31305
+ ...style,
31306
+ layers: out,
31307
+ metadata: { ...typeof style.metadata === "object" && style.metadata !== null ? style.metadata : {}, "chrt:classic-marks": ink }
31308
+ };
31309
+ }
31310
+ function classicInkFor(palette) {
31311
+ if (palette === "DAY" || palette === "EINK_COLOR") return "color";
31312
+ if (palette === "EINK_MONO") return "mono";
31313
+ return null;
31314
+ }
31315
+ function classicIconExpression(cls, ink, plain) {
31316
+ const c = cls.toUpperCase();
31317
+ if (BUOYS.has(c)) return lozenge(ink, plain);
31318
+ if (BEACONS.has(c)) return daybeacon(ink, plain);
31319
+ if (c === "DAYMAR") return dayboard(ink);
31320
+ return plain;
31321
+ }
31322
+ function replaceLiteral(v, from, to) {
31323
+ if (typeof v === "string") return from.has(v) ? to : v;
31324
+ if (Array.isArray(v)) return v.map((e) => replaceLiteral(e, from, to));
31325
+ return v;
31326
+ }
31327
+ var R = 2;
31328
+ var S = 64 * R;
31329
+ var C0 = S / 2;
31330
+ var BUOY_LENGTH = 12.5;
31331
+ var BUOY_HALF_WIDTH = 3.4;
31332
+ var DISC_RADIUS = 8.5;
31333
+ var BOARD_SIDE = 8;
31334
+ var SB = 96 * R;
31335
+ var CB = SB / 2;
31336
+ var FLARE_SCALE = 0.6;
31337
+ var FLARE_ANCHOR = 18;
31338
+ function paintOf(ink, c) {
31339
+ const t = CLASSIC_MARK_TONES[ink];
31340
+ return c === "red" ? t.magenta : c === "green" ? t.green : c === "black" ? t.ink : t.open;
31341
+ }
31342
+ function circle(cx, cy, r) {
31343
+ return Array.from({ length: 33 }, (_, i) => [cx + r * Math.cos(i / 32 * 2 * Math.PI), cy + r * Math.sin(i / 32 * 2 * Math.PI)]);
31344
+ }
31345
+ function flare(ink) {
31346
+ const path = [[16.3, 28], [11.8, 7.1], [11.8, 4.9], [12.4, 3.5], [13.2, 3], [14.3, 2.1], [16, 1.9], [17.4, 2.1], [18.5, 2.4], [19.6, 3.2], [20.2, 4.6], [20.4, 5.7], [20.4, 6.9]];
31347
+ const k = 0.9698;
31348
+ const place = ([x, y]) => {
31349
+ const [rx, ry] = turn([(x - 16.3) * 0.9 * FLARE_SCALE, (y - 28) * 0.9 * FLARE_SCALE], 0, 0, 135);
31350
+ return [((rx + 10 - 16.1) * k + 16) * 2 * R, ((ry + 10 - 14.95) * k + 16) * 2 * R];
31351
+ };
31352
+ const t = CLASSIC_MARK_TONES[ink];
31353
+ return { width: S, height: S, pixelRatio: R, ops: [{ fill: path.map(place), c: t.magenta }, { dot: [FLARE_ANCHOR * R, FLARE_ANCHOR * R], r: 2.6 * R, c: t.ink }] };
31354
+ }
31355
+ function disc(ink) {
31356
+ return { width: S, height: S, pixelRatio: R, ops: [{ fill: circle(C0, C0, DISC_RADIUS * R), c: CLASSIC_MARK_TONES[ink].magenta }] };
31357
+ }
31358
+ function buoy(ink, c1, c2, split) {
31359
+ const ops = [];
31360
+ const t = CLASSIC_MARK_TONES[ink];
31361
+ const L = BUOY_LENGTH;
31362
+ const W = BUOY_HALF_WIDTH;
31363
+ const lean = 45;
31364
+ const at = (a, b) => turn([CB + b * R, CB - a * R], CB, CB, lean);
31365
+ const foot = 1.6;
31366
+ const outline = [at(foot, 0), at(foot + L / 2, -W), at(foot + L, 0), at(foot + L / 2, W)];
31367
+ if (split === null) ops.push({ fill: outline, c: paintOf(ink, c1) });
31368
+ else if (split === "h") {
31369
+ ops.push({ fill: [at(foot, 0), at(foot + L / 2, -W), at(foot + L / 2, W)], c: paintOf(ink, c2) });
31370
+ ops.push({ fill: [at(foot + L / 2, -W), at(foot + L, 0), at(foot + L / 2, W)], c: paintOf(ink, c1) });
31371
+ } else {
31372
+ ops.push({ fill: [at(foot, 0), at(foot + L / 2, -W), at(foot + L, 0)], c: paintOf(ink, c1) });
31373
+ ops.push({ fill: [at(foot, 0), at(foot + L, 0), at(foot + L / 2, W)], c: paintOf(ink, c2) });
31374
+ }
31375
+ ops.push({ stroke: [...outline, outline[0]], r: 0.35 * R, c: t.ink });
31376
+ if (split === "v") ops.push({ stroke: [at(foot, 0), at(foot + L, 0)], r: 0.3 * R, c: t.ink });
31377
+ if (split === "h") ops.push({ stroke: [at(foot + L / 2, -W), at(foot + L / 2, W)], r: 0.3 * R, c: t.ink });
31378
+ const ring = circle(CB, CB, 2 * R);
31379
+ ops.push({ fill: ring, c: t.open });
31380
+ ops.push({ stroke: ring, r: 0.35 * R, c: t.ink });
31381
+ return { width: SB, height: SB, pixelRatio: R, ops };
31382
+ }
31383
+ function boardOutline(shape) {
31384
+ const h = BOARD_SIDE / 2 * R;
31385
+ switch (shape) {
31386
+ case "triangle-up":
31387
+ return [[C0 - h, C0 + h * 0.58], [C0 + h, C0 + h * 0.58], [C0, C0 - h * 1.15]];
31388
+ case "triangle-down":
31389
+ return [[C0 - h, C0 - h * 0.58], [C0, C0 + h * 1.15], [C0 + h, C0 - h * 0.58]];
31390
+ case "square":
31391
+ return [[C0 - h * 0.85, C0 - h * 0.85], [C0 + h * 0.85, C0 - h * 0.85], [C0 + h * 0.85, C0 + h * 0.85], [C0 - h * 0.85, C0 + h * 0.85]];
31392
+ case "rhombus":
31393
+ return [[C0, C0 - h * 1.2], [C0 + h * 1.2, C0], [C0, C0 + h * 1.2], [C0 - h * 1.2, C0]];
31394
+ }
31395
+ }
31396
+ function half(pts, axis, first) {
31397
+ const inside = (p) => first ? p[axis] <= C0 : p[axis] >= C0;
31398
+ const out = [];
31399
+ for (let i = 0; i < pts.length; i++) {
31400
+ const a = pts[i];
31401
+ const b = pts[(i + 1) % pts.length];
31402
+ if (inside(a)) out.push(a);
31403
+ if (inside(a) !== inside(b)) {
31404
+ const t = (C0 - a[axis]) / (b[axis] - a[axis]);
31405
+ out.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]);
31406
+ }
31407
+ }
31408
+ return out;
31409
+ }
31410
+ function chord(pts, axis) {
31411
+ const top = half(pts, axis, true);
31412
+ return top.filter((p) => Math.abs(p[axis] - C0) < 1e-9);
31413
+ }
31414
+ function board(ink, shape, c1, c2, split) {
31415
+ const pts = boardOutline(shape);
31416
+ const ops = [];
31417
+ if (split === null) ops.push({ fill: pts, c: paintOf(ink, c1) });
31418
+ else {
31419
+ const axis = split === "h" ? 1 : 0;
31420
+ ops.push({ fill: half(pts, axis, true), c: paintOf(ink, c1) });
31421
+ ops.push({ fill: half(pts, axis, false), c: paintOf(ink, c2) });
31422
+ }
31423
+ const ink0 = CLASSIC_MARK_TONES[ink].ink;
31424
+ ops.push({ stroke: [...pts, pts[0]], r: 0.45 * R, c: ink0 });
31425
+ if (split !== null) ops.push({ stroke: chord(pts, split === "h" ? 1 : 0), r: 0.3 * R, c: ink0 });
31426
+ return { width: S, height: S, pixelRatio: R, ops };
31427
+ }
31428
+ function classicDrawing(ink, name) {
31429
+ if (name === "flare") return flare(ink);
31430
+ if (name === "disc") return disc(ink);
31431
+ const m = /^(buoy|board-(triangle-up|triangle-down|square|rhombus))-([a-z]+)(?:-([a-z]+)-([hv]))?$/.exec(name);
31432
+ if (!m || !CLASSIC_MARK_NAMES.includes(name)) throw new Error(`classic-marks: no mark ${name}`);
31433
+ const c1 = m[3];
31434
+ const c2 = m[4] ?? m[3];
31435
+ const split = m[5] ?? null;
31436
+ return m[1] === "buoy" ? buoy(ink, c1, c2, split) : board(ink, m[2], c1, c2, split);
31437
+ }
31438
+ function rgba(hex) {
31439
+ return [parseInt(hex.slice(1, 3), 16), parseInt(hex.slice(3, 5), 16), parseInt(hex.slice(5, 7), 16), 255];
31440
+ }
31441
+ function paintDrawing(d) {
31442
+ const p = painter(d.width, d.height);
31443
+ for (const op of d.ops) {
31444
+ if ("fill" in op) p.fill(op.fill, rgba(op.c));
31445
+ else if ("stroke" in op) p.stroke(op.stroke, op.r, rgba(op.c));
31446
+ else p.dot(op.dot[0], op.dot[1], op.r, rgba(op.c));
31447
+ }
31448
+ return p.data();
31449
+ }
31450
+ function drawingSvg(d) {
31451
+ const f = (n) => String(Math.round(n * 100) / 100);
31452
+ const pts = (ps) => ps.map(([x, y]) => `${f(x)},${f(y)}`).join(" ");
31453
+ const body = d.ops.map(
31454
+ (op) => "fill" in op ? `<polygon points="${pts(op.fill)}" fill="${op.c}"/>` : "stroke" in op ? `<polyline points="${pts(op.stroke)}" fill="none" stroke="${op.c}" stroke-width="${f(op.r * 2)}" stroke-linecap="round" stroke-linejoin="round"/>` : `<circle cx="${f(op.dot[0])}" cy="${f(op.dot[1])}" r="${f(op.r)}" fill="${op.c}"/>`
31455
+ ).join("");
31456
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${d.width}" height="${d.height}" viewBox="0 0 ${d.width} ${d.height}">${body}</svg>`;
31457
+ }
31458
+ function classicMarkSvgs(ink) {
31459
+ return CLASSIC_MARK_NAMES.map((name) => {
31460
+ const d = classicDrawing(ink, name);
31461
+ return { id: classicMarkId(ink, name), svg: drawingSvg(d), width: d.width, height: d.height, pixelRatio: d.pixelRatio };
31462
+ });
31463
+ }
31464
+ function classicMarkImage(id) {
31465
+ const ink = classicMarkInk(id);
31466
+ if (!ink) throw new Error(`classic-marks: no mark ${id}`);
31467
+ const d = classicDrawing(ink, id.slice(PREFIX[ink].length));
31468
+ return { id, width: d.width, height: d.height, pixelRatio: d.pixelRatio, data: paintDrawing(d) };
31469
+ }
31470
+ function classicMarkImages(ink) {
31471
+ return CLASSIC_MARK_NAMES.map((name) => classicMarkImage(classicMarkId(ink, name)));
31472
+ }
31473
+
31030
31474
  // src/atlas/symbol-families.ts
31031
- var SYMBOL_FAMILIES = ["s52", "s101", "chrt", "raster"];
31475
+ var SYMBOL_FAMILIES = ["s52", "s101", "chrt", "int1", "uschart1"];
31032
31476
  var SYMBOL_FAMILY_META = {
31033
31477
  s52: {
31034
31478
  label: "S-52",
@@ -31042,32 +31486,908 @@ var SYMBOL_FAMILY_META = {
31042
31486
  label: "CHRT",
31043
31487
  description: "CHRT house set \u2014 colour-true, simplified, badged"
31044
31488
  },
31045
- raster: {
31046
- label: "CHRTraster",
31047
- description: "Paper-chart portrayal \u2014 the traditional raster-chart look"
31489
+ int1: {
31490
+ label: "INT-1",
31491
+ description: "Paper-chart portrayal \u2014 the IHO INT 1 symbols, as paper charts draw them"
31492
+ },
31493
+ uschart1: {
31494
+ label: "U.S. Chart No. 1",
31495
+ description: "INT-1 with the aids as U.S. Chart No. 1 draws them \u2014 diamond buoys, filled daybeacons"
31048
31496
  }
31049
31497
  };
31050
31498
  function parseSymbolFamily(raw) {
31051
31499
  if (!raw) return null;
31052
31500
  const lower = raw.toLowerCase();
31053
- return SYMBOL_FAMILIES.find((f) => f === lower) ?? null;
31501
+ const family = SYMBOL_FAMILIES.find((f) => f === lower);
31502
+ if (family) return family;
31503
+ return Object.hasOwn(LEGACY_SYMBOL_FAMILY_ALIASES, lower) ? LEGACY_SYMBOL_FAMILY_ALIASES[lower] : null;
31054
31504
  }
31055
- function iconExpressionForFamily(objectClass2, family) {
31056
- const s52 = getIconExpression(objectClass2);
31505
+ function iconExpressionForFamily(objectClass5, family, palette = "DAY") {
31506
+ const s52 = getIconExpression(objectClass5);
31507
+ const int1 = RASTER_ATON_CLASSES.includes(objectClass5) ? rasterAtonIconExpression(objectClass5) : s52;
31057
31508
  switch (family) {
31058
31509
  case "s52":
31059
31510
  return s52;
31060
31511
  case "s101":
31061
- return rewriteIconToS101(objectClass2 === "DAYMAR" ? daymarkShapeIconExpression() : s52);
31512
+ return rewriteIconToS101(objectClass5 === "DAYMAR" ? daymarkShapeIconExpression() : s52);
31062
31513
  case "chrt": {
31063
- const build = CHRT_ICON_EXPRESSIONS[objectClass2];
31514
+ const build = CHRT_ICON_EXPRESSIONS[objectClass5];
31064
31515
  return build ? build() : s52;
31065
31516
  }
31066
- case "raster":
31067
- return RASTER_ATON_CLASSES.includes(objectClass2) ? rasterAtonIconExpression(objectClass2) : s52;
31517
+ case "int1":
31518
+ return int1;
31519
+ case "uschart1": {
31520
+ const ink = classicInkFor(palette);
31521
+ return ink === null ? int1 : classicIconExpression(objectClass5, ink, int1);
31522
+ }
31068
31523
  }
31069
31524
  }
31070
31525
 
31526
+ // src/atlas/look-paper.ts
31527
+ var CLASSIC_TONES = {
31528
+ /** Land. */
31529
+ land: "#ebe2c8",
31530
+ /** The blue tint, to the 18 ft curve. */
31531
+ shallow: "#d8f0f5",
31532
+ /** Deep water: the paper. */
31533
+ deep: "#ffffff",
31534
+ /** The foreshore, and salt marsh. */
31535
+ drying: "#c1d1af",
31536
+ /** Magenta: lights, flares, discs, limits, cautions, red aids. */
31537
+ magenta: "#953699",
31538
+ /** Green aids. */
31539
+ green: "#068b00",
31540
+ /** Black: line-work, lettering, soundings, land contours. */
31541
+ ink: "#000000",
31542
+ /** Depth contours and their values. */
31543
+ contour: "#5f5f5f"
31544
+ };
31545
+ var CLASSIC_BLUE_TO_M = 5.5;
31546
+ var CLASSIC_FONTS = {
31547
+ roman: "Open Sans Regular",
31548
+ italic: "Open Sans Italic",
31549
+ bold: "Open Sans Semibold"
31550
+ };
31551
+ var CLASSIC_IMAGE_NAMES = ["hatch", ...CLASSIC_MARK_NAMES];
31552
+ var PREFIX2 = "chrt-look-cl-";
31553
+ function objectClass3(l) {
31554
+ const m = l.metadata;
31555
+ const c = (typeof m === "object" && m !== null ? m["s52:objectClass"] : void 0) ?? l["source-layer"] ?? "";
31556
+ return String(c).toUpperCase();
31557
+ }
31558
+ var DAY_TO_CLASSIC = {
31559
+ // Land: LANDA, CHRTland's land and its cover but wetland, slopes.
31560
+ "#d4c69d": CLASSIC_TONES.land,
31561
+ "#e6d1a1": CLASSIC_TONES.land,
31562
+ "#bcc5a1": CLASSIC_TONES.land,
31563
+ "#cac6bf": CLASSIC_TONES.land,
31564
+ "#dbd0af": CLASSIC_TONES.land,
31565
+ "#c8b078": CLASSIC_TONES.land,
31566
+ // Marsh.
31567
+ "#b6c0b1": CLASSIC_TONES.drying,
31568
+ // The drying foreshore (DEPIT).
31569
+ "#009678": CLASSIC_TONES.drying,
31570
+ // Inland water and the shallow depth tints (DEPVS, DEPMS, DEPMD) where
31571
+ // other classes use them: lakes, rivers, canals, locks, swept areas.
31572
+ "#7fbfdf": CLASSIC_TONES.shallow,
31573
+ "#a7d4e8": CLASSIC_TONES.shallow,
31574
+ "#cae7f3": CLASSIC_TONES.shallow,
31575
+ "#b9cfdd": CLASSIC_TONES.shallow,
31576
+ // Deep water (DEPDW).
31577
+ "#ecf7fc": CLASSIC_TONES.deep,
31578
+ // Magentas (CHMGD, CHMGF).
31579
+ "#d200d2": CLASSIC_TONES.magenta,
31580
+ "#c545c3": CLASSIC_TONES.magenta,
31581
+ // Brown structures (CHBRN): buildings, bridges, dams, in black.
31582
+ "#ab7948": CLASSIC_TONES.ink,
31583
+ // Black and the near-blacks of the lettering.
31584
+ "#000000": CLASSIC_TONES.ink,
31585
+ "#1a1d23": CLASSIC_TONES.ink,
31586
+ "#4a5560": CLASSIC_TONES.ink,
31587
+ "#5b4f3a": CLASSIC_TONES.ink,
31588
+ "#bfa88a": CLASSIC_TONES.ink,
31589
+ // Depth contours and area outlines.
31590
+ "#555555": CLASSIC_TONES.contour,
31591
+ // CHRTland's contours: black, as the paper chart's.
31592
+ "#958666": CLASSIC_TONES.ink,
31593
+ "#78694b": CLASSIC_TONES.ink
31594
+ };
31595
+ function recolour(v) {
31596
+ if (typeof v === "string") return DAY_TO_CLASSIC[v.toLowerCase()] ?? v;
31597
+ if (Array.isArray(v)) return v.map(recolour);
31598
+ return v;
31599
+ }
31600
+ var WATER_TEXT = /* @__PURE__ */ new Set(["SEAARE", "DEPCNT", "RIVERS", "LAKARE", "CANALS", "SBDARE", "WEDKLP", "DRGARE", "FAIRWY", "ACHARE"]);
31601
+ var LAND_NAMES = /^s52-(LNDARE|LNDRGN)-label-/;
31602
+ var SPACED_CAPS = /^s52-(SEAARE|LNDARE|LNDRGN)-label-.*-major$/;
31603
+ var INK_FILLS = /* @__PURE__ */ new Set(["BUISGL"]);
31604
+ var STRUCTURE_FILLS = /* @__PURE__ */ new Set(["SLCONS", "PONTON", "FLODOC", "DRYDOC", "BRIDGE", "PYLONS", "DAMCON", "GATCON", "FORSTC"]);
31605
+ var UNTINTED = /* @__PURE__ */ new Set([
31606
+ "ACHARE",
31607
+ "FAIRWY",
31608
+ "TSSLPT",
31609
+ "TSSRON",
31610
+ "ISTZNE",
31611
+ "PRCARE",
31612
+ "DMPGRD",
31613
+ "HRBARE",
31614
+ "TERMNL",
31615
+ "HRBFAC",
31616
+ "PILBOP",
31617
+ "RECTRC",
31618
+ "SBDARE",
31619
+ "AIRARE",
31620
+ "RUNWAY",
31621
+ "MARCUL",
31622
+ "FSHFAC",
31623
+ "OSPARE",
31624
+ "LOGPON",
31625
+ "SWPARE",
31626
+ "CBLARE",
31627
+ "PIPARE",
31628
+ "BUAARE"
31629
+ ]);
31630
+ var AIDS = /* @__PURE__ */ new Set([
31631
+ "BOYLAT",
31632
+ "BOYCAR",
31633
+ "BOYISD",
31634
+ "BOYSAW",
31635
+ "BOYSPP",
31636
+ "BOYINB",
31637
+ "BCNLAT",
31638
+ "BCNCAR",
31639
+ "BCNISD",
31640
+ "BCNSAW",
31641
+ "BCNSPP",
31642
+ "LIGHTS",
31643
+ "LITFLT",
31644
+ "LITVES",
31645
+ "FOGSIG",
31646
+ "RTPBCN",
31647
+ "RDOSTA"
31648
+ ]);
31649
+ function depthTint() {
31650
+ const d1 = ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1];
31651
+ const d2 = ["coalesce", ["get", "DRVAL2"], ["get", "drval2"], 0];
31652
+ const deepest = ["coalesce", ["get", "DRVAL2"], ["get", "drval2"], d1];
31653
+ return [
31654
+ "case",
31655
+ ["all", ["<", d1, 0], ["<=", d2, 0]],
31656
+ CLASSIC_TONES.drying,
31657
+ ["<=", deepest, CLASSIC_BLUE_TO_M + 0.05],
31658
+ CLASSIC_TONES.shallow,
31659
+ CLASSIC_TONES.deep
31660
+ ];
31661
+ }
31662
+ function withClassic(style) {
31663
+ const out = [];
31664
+ for (const layer of style.layers) {
31665
+ const cls = objectClass3(layer);
31666
+ const paint = {};
31667
+ for (const [k, v] of Object.entries(layer.paint ?? {})) paint[k] = /color$/.test(k) ? recolour(v) : v;
31668
+ const layout = { ...layer.layout ?? {} };
31669
+ switch (layer.type) {
31670
+ case "fill":
31671
+ if (INK_FILLS.has(cls)) {
31672
+ paint["fill-pattern"] = `${PREFIX2}hatch`;
31673
+ paint["fill-opacity"] = 1;
31674
+ } else if (cls === "DEPARE" && /-fill-band\d$/.test(layer.id)) {
31675
+ paint["fill-color"] = depthTint();
31676
+ } else if (cls === "DRGARE" && /-fill-band\d$/.test(layer.id)) {
31677
+ paint["fill-color"] = CLASSIC_TONES.deep;
31678
+ } else if (STRUCTURE_FILLS.has(cls)) {
31679
+ paint["fill-color"] = CLASSIC_TONES.land;
31680
+ paint["fill-opacity"] = 1;
31681
+ } else if (UNTINTED.has(cls)) {
31682
+ paint["fill-opacity"] = 0;
31683
+ delete paint["fill-pattern"];
31684
+ }
31685
+ break;
31686
+ case "line":
31687
+ if (layer.id === "chrtland-road") {
31688
+ out.push(...doubleRoad({ ...layer, paint, layout }));
31689
+ continue;
31690
+ }
31691
+ if (cls === "COALNE" || cls === "SLCONS") paint["line-color"] = CLASSIC_TONES.ink;
31692
+ if (cls === "DEPCNT") paint["line-width"] = 0.6;
31693
+ if (cls === "DRGARE" && /-boundary-/.test(layer.id)) {
31694
+ Object.assign(paint, { "line-color": CLASSIC_TONES.ink, "line-width": 1.1, "line-opacity": 0.8, "line-dasharray": [8, 6] });
31695
+ }
31696
+ break;
31697
+ case "symbol":
31698
+ if (paint["text-color"] !== void 0) paint["text-color"] = recolour(paint["text-color"]);
31699
+ if (paint["text-halo-width"] !== void 0) paint["text-halo-width"] = 0;
31700
+ if (layout["text-font"] !== void 0) {
31701
+ const was = JSON.stringify(layout["text-font"]);
31702
+ const italic = WATER_TEXT.has(cls) || AIDS.has(cls) && /-label/.test(layer.id) || was.includes("Italic");
31703
+ layout["text-font"] = [italic ? CLASSIC_FONTS.italic : SPACED_CAPS.test(layer.id) ? CLASSIC_FONTS.bold : CLASSIC_FONTS.roman];
31704
+ if (cls === "LIGHTS" && /-label/.test(layer.id)) layout["text-font"] = ["case", HAS_HEIGHT, ["literal", [CLASSIC_FONTS.roman]], ["literal", [CLASSIC_FONTS.italic]]];
31705
+ if (SPACED_CAPS.test(layer.id)) {
31706
+ layout["text-transform"] = "uppercase";
31707
+ layout["text-letter-spacing"] = 0.25;
31708
+ } else if (LAND_NAMES.test(layer.id)) {
31709
+ layout["text-letter-spacing"] = 0.12;
31710
+ }
31711
+ if (cls === "SOUNDG") paint["text-color"] = CLASSIC_TONES.ink;
31712
+ if (cls === "DEPCNT") {
31713
+ paint["text-color"] = CLASSIC_TONES.contour;
31714
+ layout["text-field"] = withoutUnit(layout["text-field"]);
31715
+ }
31716
+ }
31717
+ break;
31718
+ }
31719
+ out.push({ ...layer, paint, ...Object.keys(layout).length > 0 ? { layout } : {} });
31720
+ }
31721
+ return withClassicMarks({
31722
+ ...style,
31723
+ layers: out,
31724
+ metadata: { ...typeof style.metadata === "object" && style.metadata !== null ? style.metadata : {}, "chrt:look": "paper" }
31725
+ }, "color");
31726
+ }
31727
+ function withoutUnit(field) {
31728
+ if (Array.isArray(field) && field[0] === "concat" && field.length === 3 && (field[2] === "ft" || field[2] === "m")) return ["to-string", field[1]];
31729
+ return field;
31730
+ }
31731
+ function scaled(v, f) {
31732
+ if (typeof v === "number") return v * f;
31733
+ if (Array.isArray(v) && (v[0] === "interpolate" || v[0] === "step")) {
31734
+ const head = v[0] === "interpolate" ? 3 : 2;
31735
+ return v.map((e, i) => i >= head && (i - head) % 2 === 1 || v[0] === "step" && i === 2 ? scaled(e, f) : e);
31736
+ }
31737
+ return ["*", v, f];
31738
+ }
31739
+ function doubleRoad(l) {
31740
+ const w = l.paint?.["line-width"] ?? 1;
31741
+ return [
31742
+ { ...l, paint: { "line-color": CLASSIC_TONES.ink, "line-width": scaled(w, 1.6), "line-opacity": 1 } },
31743
+ { ...l, id: `${l.id}-look-core`, paint: { "line-color": CLASSIC_TONES.land, "line-width": scaled(w, 0.8), "line-opacity": 1 } }
31744
+ ];
31745
+ }
31746
+ var HATCH_RATIO = 4;
31747
+ function hatch() {
31748
+ const d = 12;
31749
+ const w = d * 2;
31750
+ const half2 = 0.9;
31751
+ const data = new Uint8Array(w * w * 4);
31752
+ for (let y = 0; y < w; y++) {
31753
+ for (let x = 0; x < w; x++) {
31754
+ const t = (x + y + 1) % d;
31755
+ const dist = Math.min(t, d - t) / Math.SQRT2;
31756
+ const cov = Math.max(0, Math.min(1, half2 + 0.5 - dist));
31757
+ data[(y * w + x) * 4 + 3] = Math.round(cov * 255);
31758
+ }
31759
+ }
31760
+ return { size: w, data };
31761
+ }
31762
+ function classicImages() {
31763
+ const h = hatch();
31764
+ return [
31765
+ { name: "hatch", width: h.size, height: h.size, pixelRatio: HATCH_RATIO, data: h.data },
31766
+ ...classicMarkImages("color").map((i) => ({ name: i.id.slice(PREFIX2.length), width: i.width, height: i.height, pixelRatio: i.pixelRatio, data: i.data }))
31767
+ ];
31768
+ }
31769
+
31770
+ // src/atlas/look-wash-tones.ts
31771
+ var SHALLOW_M = 5.49;
31772
+ var WASH_TONES = {
31773
+ paper: [250, 244, 222],
31774
+ land: [165, 186, 118],
31775
+ // A clear light blue against the shore (owner, 2026-11-02): the 1860 sheet's grey-blue read grey-green on the cream.
31776
+ water: [128, 178, 222],
31777
+ flat: [226, 206, 150],
31778
+ town: [186, 72, 52],
31779
+ road: [192, 124, 72]
31780
+ };
31781
+ function washOver(under, tone, a) {
31782
+ const k = Math.max(0, Math.min(1, a));
31783
+ return [0, 1, 2].map((i) => under[i] * (1 - k * (1 - tone[i] / 255)));
31784
+ }
31785
+ function rgbHex(rgb) {
31786
+ return `#${rgb.map((v) => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, "0")).join("")}`;
31787
+ }
31788
+ var WASH_TINTS = (() => {
31789
+ const paper = WASH_TONES.paper;
31790
+ const land = washOver(paper, WASH_TONES.land, 0.6);
31791
+ return {
31792
+ paper: rgbHex(paper),
31793
+ land: rgbHex(land),
31794
+ /** Water to the 18 ft curve. */
31795
+ shallow: rgbHex(washOver(paper, WASH_TONES.water, 0.4)),
31796
+ /** A pond or lake. */
31797
+ lake: rgbHex(washOver(paper, WASH_TONES.water, 0.26)),
31798
+ /** Drying flats. */
31799
+ flat: rgbHex(washOver(paper, WASH_TONES.flat, 0.375)),
31800
+ /** A town, laid over the land. */
31801
+ town: rgbHex(washOver(land, WASH_TONES.town, 0.42)),
31802
+ /** A road's core, over the land. */
31803
+ road: rgbHex(washOver(land, WASH_TONES.road, 0.45))
31804
+ };
31805
+ })();
31806
+
31807
+ // src/atlas/chart-look.ts
31808
+ var CHART_LOOKS = ["paper", "engraved", "handcolored"];
31809
+ var ENGRAVED_LOOKS = ["engraved", "handcolored"];
31810
+ function isEngravedLook(look) {
31811
+ return look === "engraved" || look === "handcolored";
31812
+ }
31813
+ function parseChartLook(raw) {
31814
+ if (!raw) return null;
31815
+ const lower = raw.toLowerCase();
31816
+ return CHART_LOOKS.find((l) => l === lower) ?? null;
31817
+ }
31818
+ function styleLook(style) {
31819
+ const m = style?.metadata?.["chrt:look"];
31820
+ return typeof m === "string" ? parseChartLook(m) : null;
31821
+ }
31822
+ var LOOK_TONES = {
31823
+ // Black on white: the sheet prints in black alone (DeviceGray).
31824
+ engraved: { ink: "#000000", paper: "#ffffff" },
31825
+ // The 1860 sheet's ink, a warm black (#382d20, sampled), on white; the wash,
31826
+ // multiplied over it, tones the paper and colours the land and water
31827
+ // (look-wash-tones.ts WASH_TONES).
31828
+ handcolored: { ink: "#382d20", paper: "#ffffff" }
31829
+ };
31830
+ var LOOK_FONTS = {
31831
+ roman: "Old Standard TT Regular",
31832
+ italic: "Old Standard TT Italic",
31833
+ bold: "Old Standard TT Bold"
31834
+ };
31835
+ var LOOK_WATERLINES_SOURCE = "chrt-look-waterlines";
31836
+ var LOOK_IMAGE_NAMES = [
31837
+ "stipple-flats",
31838
+ "stipple-1fm",
31839
+ "stipple-2fm",
31840
+ "stipple-3fm",
31841
+ "marsh",
31842
+ "woods",
31843
+ // The Survey's symbols (lookSymbols).
31844
+ "buoy-nun-red",
31845
+ "buoy-nun-green",
31846
+ "buoy-nun-black",
31847
+ "buoy-nun-yellow",
31848
+ "buoy-can-red",
31849
+ "buoy-can-green",
31850
+ "buoy-can-black",
31851
+ "buoy-can-yellow",
31852
+ "buoy-spar-red",
31853
+ "buoy-spar-green",
31854
+ "buoy-spar-black",
31855
+ "buoy-spar-yellow",
31856
+ "buoy-other-red",
31857
+ "buoy-other-green",
31858
+ "buoy-other-black",
31859
+ "buoy-other-yellow",
31860
+ "beacon",
31861
+ "light",
31862
+ "light-major",
31863
+ "lightship",
31864
+ "landmark",
31865
+ "anchor",
31866
+ "fog"
31867
+ ];
31868
+ var IMAGE_PREFIX = { engraved: "chrt-look-en-", handcolored: "chrt-look-hc-", paper: "chrt-look-cl-" };
31869
+ function lookImageId(look, name) {
31870
+ return IMAGE_PREFIX[look] + name;
31871
+ }
31872
+ function imageNames(look) {
31873
+ return look === "paper" ? CLASSIC_IMAGE_NAMES : LOOK_IMAGE_NAMES;
31874
+ }
31875
+ function lookOfImageId(id) {
31876
+ for (const look of Object.keys(IMAGE_PREFIX)) {
31877
+ if (id.startsWith(IMAGE_PREFIX[look]) && imageNames(look).includes(id.slice(IMAGE_PREFIX[look].length))) return look;
31878
+ }
31879
+ return null;
31880
+ }
31881
+ var FATHOM_M = 1.8288;
31882
+ var LINE_FINENESS = 0.62;
31883
+ var LINE_MAX = 1.15;
31884
+ var WATER_TEXT2 = /* @__PURE__ */ new Set(["SEAARE", "DEPCNT", "RIVERS", "LAKARE", "CANALS", "SBDARE", "WEDKLP", "DRGARE", "FAIRWY"]);
31885
+ var SPACED_CAPS2 = /^s52-(SEAARE|LNDARE|LNDRGN)-label-.*-major$/;
31886
+ var LAND_FILLS = /* @__PURE__ */ new Set(["LNDARE", "SLCONS", "PONTON", "HULKES", "FLODOC", "DRYDOC", "BRIDGE", "CAUSWY", "DYKCON", "LOKBSN", "BUAARE"]);
31887
+ var INK_FILLS2 = /* @__PURE__ */ new Set(["BUISGL"]);
31888
+ var DROPPED2 = /^s52-LIGHTS-lamp-(glow|core)$/;
31889
+ function objectClass4(l) {
31890
+ const m = l.metadata;
31891
+ const c = (typeof m === "object" && m !== null ? m["s52:objectClass"] : void 0) ?? l["source-layer"] ?? "";
31892
+ return String(c).toUpperCase();
31893
+ }
31894
+ function luminance(c) {
31895
+ let r, g2, b;
31896
+ const hex = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(c);
31897
+ if (hex) {
31898
+ const h = hex[1].length === 3 ? [...hex[1]].map((d) => d + d).join("") : hex[1];
31899
+ r = parseInt(h.slice(0, 2), 16);
31900
+ g2 = parseInt(h.slice(2, 4), 16);
31901
+ b = parseInt(h.slice(4, 6), 16);
31902
+ } else {
31903
+ const rgb = /^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(c);
31904
+ if (!rgb) return null;
31905
+ r = Number(rgb[1]);
31906
+ g2 = Number(rgb[2]);
31907
+ b = Number(rgb[3]);
31908
+ }
31909
+ return (0.2126 * r + 0.7152 * g2 + 0.0722 * b) / 255;
31910
+ }
31911
+ function mapColours(v, to) {
31912
+ if (typeof v === "string") {
31913
+ const lum = luminance(v);
31914
+ return lum === null ? v : to(lum);
31915
+ }
31916
+ if (Array.isArray(v)) return v.map((e) => mapColours(e, to));
31917
+ return v;
31918
+ }
31919
+ function scaled2(v, f, max = Infinity) {
31920
+ if (typeof v === "number") return Math.min(v * f, max);
31921
+ if (Array.isArray(v) && v[0] === "interpolate" && Array.isArray(v[2]) && v[2][0] === "zoom") {
31922
+ return [v[0], v[1], v[2], ...v.slice(3).map((e, i) => i % 2 === 1 ? scaled2(e, f, max) : e)];
31923
+ }
31924
+ if (Array.isArray(v) && v[0] === "step" && Array.isArray(v[1]) && v[1][0] === "zoom") {
31925
+ return [v[0], v[1], scaled2(v[2], f, max), ...v.slice(3).map((e, i) => i % 2 === 1 ? scaled2(e, f, max) : e)];
31926
+ }
31927
+ if (v === void 0) return v;
31928
+ return max === Infinity ? ["*", v, f] : ["min", ["*", v, f], max];
31929
+ }
31930
+ function washTint(cls, id, tints) {
31931
+ if (cls === "DEPARE" && /^s52-DEPARE-fill-band\d$/.test(id)) {
31932
+ const d1 = ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], 0];
31933
+ const d2 = ["coalesce", ["get", "DRVAL2"], ["get", "drval2"], 99];
31934
+ return ["case", ["<", d1, 0], tints.flat, ["<=", d2, SHALLOW_M + 0.01], tints.shallow, tints.paper];
31935
+ }
31936
+ if (cls === "LAKARE" || id === "chrtland-water" || id === "paper-base-lakes") return tints.lake;
31937
+ return null;
31938
+ }
31939
+ function withLook(style, look, opts = {}) {
31940
+ if (look === "paper") return withClassic(style);
31941
+ const tone = LOOK_TONES[look];
31942
+ const ink = tone.ink;
31943
+ const tints = look === "handcolored" && opts.tints !== false ? WASH_TINTS : null;
31944
+ const paper = tints ? tints.paper : tone.paper;
31945
+ const lineInk = (lum) => lum > 0.92 ? paper : ink;
31946
+ const out = [];
31947
+ for (const layer of style.layers) {
31948
+ if (DROPPED2.test(layer.id)) continue;
31949
+ const cls = objectClass4(layer);
31950
+ const paint = { ...layer.paint ?? {} };
31951
+ const layout = { ...layer.layout ?? {} };
31952
+ let next = layer;
31953
+ switch (layer.type) {
31954
+ case "background":
31955
+ paint["background-color"] = paper;
31956
+ break;
31957
+ case "hillshade":
31958
+ continue;
31959
+ case "fill": {
31960
+ if (paint["fill-pattern"] !== void 0) break;
31961
+ const land = LAND_FILLS.has(cls) || layer.id === "chrtland-base" || layer.id === "paper-base-earth";
31962
+ const wash = tints ? washTint(cls, layer.id, tints) : null;
31963
+ if (INK_FILLS2.has(cls) || land) {
31964
+ paint["fill-color"] = INK_FILLS2.has(cls) ? ink : tints ? cls === "BUAARE" ? tints.town : tints.land : paper;
31965
+ paint["fill-opacity"] = 1;
31966
+ } else if (wash !== null) {
31967
+ paint["fill-color"] = wash;
31968
+ paint["fill-opacity"] = 1;
31969
+ } else {
31970
+ paint["fill-opacity"] = 0;
31971
+ }
31972
+ if (paint["fill-outline-color"] !== void 0) paint["fill-outline-color"] = ink;
31973
+ break;
31974
+ }
31975
+ case "line":
31976
+ if (paint["line-pattern"] !== void 0 && layer.source !== void 0 && layer.source !== "CHRT_LAND") {
31977
+ delete paint["line-pattern"];
31978
+ paint["line-color"] = ink;
31979
+ paint["line-width"] = 0.55;
31980
+ paint["line-dasharray"] = [5, 2.5];
31981
+ break;
31982
+ }
31983
+ if (paint["line-color"] !== void 0) paint["line-color"] = mapColours(paint["line-color"], lineInk);
31984
+ if (paint["line-width"] !== void 0 && layer.id !== "chrtland-road") paint["line-width"] = scaled2(paint["line-width"], LINE_FINENESS, LINE_MAX);
31985
+ if (cls === "DEPCNT" || cls === "DEPARE" && /-outline-/.test(layer.id)) {
31986
+ paint["line-dasharray"] = [0.6, 2.2];
31987
+ layout["line-cap"] = "round";
31988
+ }
31989
+ break;
31990
+ case "circle":
31991
+ if (paint["circle-color"] !== void 0) paint["circle-color"] = mapColours(paint["circle-color"], (lum) => lum < 0.35 ? ink : paper);
31992
+ if (paint["circle-stroke-color"] !== void 0) paint["circle-stroke-color"] = ink;
31993
+ break;
31994
+ case "symbol":
31995
+ if (paint["text-color"] !== void 0) paint["text-color"] = mapColours(paint["text-color"], lineInk);
31996
+ if (paint["text-halo-color"] !== void 0) paint["text-halo-color"] = paper;
31997
+ if (layout["text-font"] !== void 0) {
31998
+ const italic = WATER_TEXT2.has(cls) || JSON.stringify(layout["text-font"]).includes("Italic");
31999
+ layout["text-font"] = [italic ? LOOK_FONTS.italic : LOOK_FONTS.roman];
32000
+ if (SPACED_CAPS2.test(layer.id)) {
32001
+ layout["text-transform"] = "uppercase";
32002
+ layout["text-letter-spacing"] = 0.14;
32003
+ }
32004
+ }
32005
+ if (layout["icon-image"] !== void 0) Object.assign(layout, oldSymbol(layer.id, cls, look, layout));
32006
+ break;
32007
+ }
32008
+ next = { ...layer, paint, ...Object.keys(layout).length > 0 ? { layout } : {} };
32009
+ if (layer.id === "chrtland-cover") {
32010
+ out.push(...landCover(next, look));
32011
+ continue;
32012
+ }
32013
+ if (layer.id === "chrtland-contour" || layer.id === "chrtland-contour-index") {
32014
+ out.push(contourLine(next, look), hachures(next, ink));
32015
+ continue;
32016
+ }
32017
+ if (layer.id === "chrtland-road") {
32018
+ out.push(...doubleRoad2(next, ink, tints ? tints.road : paper));
32019
+ continue;
32020
+ }
32021
+ if (cls === "DEPARE" && layer.type === "fill" && /^s52-DEPARE-fill-band\d$/.test(layer.id)) {
32022
+ out.push(next, flats(next, look));
32023
+ continue;
32024
+ }
32025
+ out.push(next);
32026
+ }
32027
+ const under = /* @__PURE__ */ new Set(["chrt-background", "paper-base-water", "paper-base-earth", "paper-base-lakes", "paper-base-coast", "paper-coverage-ground", "chrtland-base", "chrtland-water"]);
32028
+ let at = 0;
32029
+ for (const [i, l] of out.entries()) if (under.has(l.id) || l.type === "fill" && /^s52-(DEPARE|LNDARE|LAKARE|SEAARE|UNSARE|DRGARE)-fill-band\d$/.test(l.id)) at = i + 1;
32030
+ out.splice(at, 0, {
32031
+ id: LOOK_WATERLINES_SOURCE,
32032
+ type: "line",
32033
+ source: LOOK_WATERLINES_SOURCE,
32034
+ layout: { "line-join": "round", "line-cap": "round" },
32035
+ // Each line's width rides on it (engraving.ts): finer away from the shore.
32036
+ paint: { "line-color": ink, "line-width": ["coalesce", ["get", "w"], 0.3] }
32037
+ });
32038
+ return {
32039
+ ...style,
32040
+ // The black & white sheet's symbols, the same INT-1 shapes in black, on
32041
+ // both looks: the day sheet's magenta anchors and light flares read as a
32042
+ // modern chart under the wash.
32043
+ ...typeof style.sprite === "string" ? { sprite: style.sprite.replace(/-day$/, "-eink_mono") } : {},
32044
+ sources: {
32045
+ ...style.sources,
32046
+ [LOOK_WATERLINES_SOURCE]: { type: "geojson", data: { type: "FeatureCollection", features: [] } }
32047
+ },
32048
+ layers: out,
32049
+ metadata: { ...typeof style.metadata === "object" && style.metadata !== null ? style.metadata : {}, "chrt:look": look }
32050
+ };
32051
+ }
32052
+ function flats(l, look) {
32053
+ const id = (n) => lookImageId(look, n);
32054
+ const d1 = ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], 0];
32055
+ const d2 = ["coalesce", ["get", "DRVAL2"], ["get", "drval2"], 99];
32056
+ return {
32057
+ id: `${l.id}-look-flats`,
32058
+ type: "fill",
32059
+ source: l.source,
32060
+ "source-layer": l["source-layer"],
32061
+ ...l.minzoom !== void 0 ? { minzoom: l.minzoom } : {},
32062
+ filter: ["all", l.filter ?? true, ["any", ["<", d1, 0], ["<=", d2, FATHOM_M * 3 + 0.01]]],
32063
+ paint: {
32064
+ "fill-pattern": [
32065
+ "case",
32066
+ ["<", d1, 0],
32067
+ id("stipple-flats"),
32068
+ ["<=", d2, FATHOM_M + 0.01],
32069
+ id("stipple-1fm"),
32070
+ ["<=", d2, FATHOM_M * 2 + 0.01],
32071
+ id("stipple-2fm"),
32072
+ id("stipple-3fm")
32073
+ ]
32074
+ },
32075
+ metadata: l.metadata
32076
+ };
32077
+ }
32078
+ function landCover(l, look) {
32079
+ const sign = (cls, image) => ({
32080
+ id: `chrtland-cover-look-${cls}`,
32081
+ type: "fill",
32082
+ source: l.source,
32083
+ "source-layer": l["source-layer"],
32084
+ ...l.minzoom !== void 0 ? { minzoom: l.minzoom } : {},
32085
+ filter: ["all", l.filter ?? true, ["==", ["get", "class"], cls]],
32086
+ paint: { "fill-pattern": lookImageId(look, image) }
32087
+ });
32088
+ return [sign("wood", "woods"), sign("wetland", "marsh"), sign("sand", "stipple-2fm")];
32089
+ }
32090
+ function contourLine(l, look) {
32091
+ const index = l.id === "chrtland-contour-index";
32092
+ return {
32093
+ ...l,
32094
+ id: `${l.id}-look-line`,
32095
+ paint: {
32096
+ "line-color": look === "handcolored" ? CONTOUR_BROWN : LOOK_TONES[look].ink,
32097
+ "line-width": index ? 0.85 : 0.5,
32098
+ "line-opacity": 0.95
32099
+ },
32100
+ layout: { "line-join": "round", "line-cap": "round" }
32101
+ };
32102
+ }
32103
+ var CONTOUR_BROWN = "#8a5a34";
32104
+ function hachures(l, ink) {
32105
+ const index = l.id === "chrtland-contour-index";
32106
+ const width = index ? 7 : 6.5;
32107
+ return {
32108
+ ...l,
32109
+ paint: { "line-color": ink, "line-width": width, "line-dasharray": [0.07, 0.19], "line-opacity": index ? 0.75 : 0.65 },
32110
+ layout: { "line-join": "bevel", "line-cap": "butt" }
32111
+ };
32112
+ }
32113
+ function doubleRoad2(l, ink, paper) {
32114
+ const w = l.paint?.["line-width"] ?? 1;
32115
+ return [
32116
+ { ...l, paint: { "line-color": ink, "line-width": scaled2(w, 1.4), "line-opacity": 1 } },
32117
+ { ...l, id: `${l.id}-look-core`, paint: { "line-color": paper, "line-width": scaled2(w, 0.75), "line-opacity": 1 } }
32118
+ ];
32119
+ }
32120
+ var BUOYS2 = /* @__PURE__ */ new Set(["BOYLAT", "BOYCAR", "BOYISD", "BOYSAW", "BOYSPP", "BOYINB"]);
32121
+ var BEACONS2 = /* @__PURE__ */ new Set(["BCNLAT", "BCNCAR", "BCNISD", "BCNSAW", "BCNSPP"]);
32122
+ function holds(attr, code) {
32123
+ const v = ["to-string", ["coalesce", ["get", attr], ["get", attr.toLowerCase()], ""]];
32124
+ const c = String(code);
32125
+ return ["any", ["==", v, c], ...[`"${c}"`, `[${c},`, `[${c}]`, `,${c},`, `,${c}]`].map((frag) => [">=", ["index-of", frag, v], 0])];
32126
+ }
32127
+ function buoyColour() {
32128
+ return ["case", holds("COLOUR", 3), "red", holds("COLOUR", 4), "green", holds("COLOUR", 2), "black", "yellow"];
32129
+ }
32130
+ function oldSymbol(id, cls, look, layout) {
32131
+ const img = (name) => typeof name === "string" ? lookImageId(look, name) : ["concat", IMAGE_PREFIX[look], name];
32132
+ if (BUOYS2.has(cls)) {
32133
+ const shape = ["match", ["to-number", ["coalesce", ["get", "BOYSHP"], ["get", "boyshp"], 0], 0], 1, "nun", 2, "can", 5, "spar", "other"];
32134
+ return { "icon-image": img(["concat", "buoy-", shape, "-", buoyColour()]), "icon-offset": [0, 0] };
32135
+ }
32136
+ if (BEACONS2.has(cls)) return { "icon-image": img("beacon"), "icon-offset": [0, 0] };
32137
+ if (cls === "TOPMAR") return { "icon-offset": [6, -18] };
32138
+ if (cls === "LIGHTS" && /-symbol/.test(id)) return { "icon-image": img(/-major/.test(id) ? "light-major" : "light"), "icon-offset": [0, 0], "icon-rotate": 0 };
32139
+ if (cls === "LITFLT" || cls === "LITVES") return { "icon-image": img("lightship"), "icon-offset": [0, 0] };
32140
+ if (cls === "LNDMRK" && /-symbol/.test(id)) return { "icon-image": img("landmark"), "icon-offset": [0, 0] };
32141
+ if (cls === "ACHARE" && /anchor/.test(id)) return { "icon-image": img("anchor") };
32142
+ if (cls === "FOGSIG" && /-symbol/.test(id)) return { "icon-image": img("fog") };
32143
+ void layout;
32144
+ return {};
32145
+ }
32146
+ var PAINT = {
32147
+ red: [184, 69, 47, 255],
32148
+ green: [79, 122, 58, 255],
32149
+ yellow: [214, 176, 72, 255],
32150
+ light: [232, 196, 92, 210]
32151
+ };
32152
+ function lookSymbols(look, ink) {
32153
+ const R2 = 2;
32154
+ const S2 = 64 * R2;
32155
+ const c0 = S2 / 2;
32156
+ const out = [];
32157
+ const coloured = look === "handcolored";
32158
+ const tilt = 28;
32159
+ const line = 0.75 * R2;
32160
+ const B = 1.55;
32161
+ const shapes = {
32162
+ nun: [[0, 0], [-3.2, -6], [0, -16], [3.2, -6]],
32163
+ can: [[-3.4, 0], [-3.4, -9], [3.4, -9], [3.4, 0]],
32164
+ spar: [[-0.9, 0], [-0.9, -16], [0.9, -16], [0.9, 0]],
32165
+ other: Array.from({ length: 20 }, (_, i) => [4.2 * Math.sin(i / 20 * 2 * Math.PI), -5 - 4.6 * Math.cos(i / 20 * 2 * Math.PI)])
32166
+ };
32167
+ for (const shape of ["nun", "can", "spar", "other"]) {
32168
+ for (const colour of ["red", "green", "black", "yellow"]) {
32169
+ const p = painter(S2, S2);
32170
+ const pts = shapes[shape].map(([x, y]) => turn([c0 + x * B * R2, c0 + y * B * R2], c0, c0, tilt));
32171
+ const solid = colour === "black" || colour === "green";
32172
+ if (coloured) p.fill(pts, colour === "black" ? ink : PAINT[colour]);
32173
+ else if (solid) p.fill(pts, ink);
32174
+ p.stroke([...pts, pts[0]], line / 2, ink);
32175
+ p.dot(c0, c0, 1.1 * R2, ink);
32176
+ out.push({ name: `buoy-${shape}-${colour}`, data: p.data(), size: S2 });
32177
+ }
32178
+ }
32179
+ {
32180
+ const p = painter(S2, S2);
32181
+ p.stroke([[c0, c0], [c0, c0 - 22 * R2]], 0.6 * R2, ink);
32182
+ p.dot(c0, c0 - 22 * R2, 2.2 * R2, ink);
32183
+ p.dot(c0, c0, 1.2 * R2, ink);
32184
+ out.push({ name: "beacon", data: p.data(), size: S2 });
32185
+ }
32186
+ for (const [name, r, rays] of [["light", 13, 12], ["light-major", 18, 16]]) {
32187
+ const p = painter(S2, S2);
32188
+ if (coloured) p.dot(c0, c0, r * 0.75 * R2, PAINT.light);
32189
+ for (let i = 0; i < rays; i++) {
32190
+ const a = i / rays * 2 * Math.PI;
32191
+ const len = i % 2 === 0 ? r : r * 0.62;
32192
+ p.stroke([[c0 + Math.cos(a) * 3 * R2, c0 + Math.sin(a) * 3 * R2], [c0 + Math.cos(a) * len * R2, c0 + Math.sin(a) * len * R2]], 0.38 * R2, ink);
32193
+ }
32194
+ p.dot(c0, c0, 2.8 * R2, ink);
32195
+ out.push({ name, data: p.data(), size: S2 });
32196
+ }
32197
+ {
32198
+ const p = painter(S2, S2);
32199
+ const hull = [[-8, 0], [8, 0], [5.5, 3.2], [-5.5, 3.2]].map(([x, y]) => [c0 + x * R2, c0 + y * R2]);
32200
+ p.fill(hull, coloured ? PAINT.red : ink);
32201
+ p.stroke([...hull, hull[0]], 0.35 * R2, ink);
32202
+ p.stroke([[c0, c0], [c0, c0 - 11 * R2]], 0.45 * R2, ink);
32203
+ for (let i = 0; i < 8; i++) {
32204
+ const a = i / 8 * 2 * Math.PI;
32205
+ p.stroke([[c0, c0 - 11 * R2], [c0 + Math.cos(a) * 3.6 * R2, c0 - 11 * R2 + Math.sin(a) * 3.6 * R2]], 0.28 * R2, ink);
32206
+ }
32207
+ out.push({ name: "lightship", data: p.data(), size: S2 });
32208
+ }
32209
+ {
32210
+ const p = painter(S2, S2);
32211
+ const ring = Array.from({ length: 33 }, (_, i) => [c0 + 4.6 * R2 * Math.cos(i / 32 * 2 * Math.PI), c0 + 4.6 * R2 * Math.sin(i / 32 * 2 * Math.PI)]);
32212
+ p.stroke(ring, 0.45 * R2, ink);
32213
+ p.dot(c0, c0, 1.2 * R2, ink);
32214
+ out.push({ name: "landmark", data: p.data(), size: S2 });
32215
+ }
32216
+ {
32217
+ const p = painter(S2, S2);
32218
+ const y0 = c0 - 7 * R2;
32219
+ p.stroke([[c0, y0], [c0, c0 + 7 * R2]], 0.5 * R2, ink);
32220
+ p.stroke([[c0 - 3.5 * R2, y0 + 2.2 * R2], [c0 + 3.5 * R2, y0 + 2.2 * R2]], 0.45 * R2, ink);
32221
+ const ring = Array.from({ length: 17 }, (_, i) => [c0 + 1.3 * R2 * Math.cos(i / 16 * 2 * Math.PI), y0 - 1.3 * R2 + 1.3 * R2 * Math.sin(i / 16 * 2 * Math.PI)]);
32222
+ p.stroke(ring, 0.35 * R2, ink);
32223
+ const arm = Array.from({ length: 13 }, (_, i) => {
32224
+ const a = Math.PI * (0.15 + 0.7 * (i / 12));
32225
+ return [c0 + 5.5 * R2 * Math.cos(a), c0 + 1.5 * R2 + 5.5 * R2 * Math.sin(a)];
32226
+ });
32227
+ p.stroke(arm, 0.5 * R2, ink);
32228
+ p.stroke([arm[0], [arm[0][0] + 1.6 * R2, arm[0][1] - 1.4 * R2]], 0.45 * R2, ink);
32229
+ p.stroke([arm[12], [arm[12][0] - 1.6 * R2, arm[12][1] - 1.4 * R2]], 0.45 * R2, ink);
32230
+ out.push({ name: "anchor", data: p.data(), size: S2 });
32231
+ }
32232
+ {
32233
+ const p = painter(S2, S2);
32234
+ for (const r of [6, 9, 12]) {
32235
+ const arc = Array.from({ length: 13 }, (_, i) => {
32236
+ const a = (-115 + 50 * i / 12) * (Math.PI / 180);
32237
+ return [c0 + r * R2 * Math.cos(a), c0 + r * R2 * Math.sin(a)];
32238
+ });
32239
+ p.stroke(arc, 0.42 * R2, ink);
32240
+ }
32241
+ out.push({ name: "fog", data: p.data(), size: S2 });
32242
+ }
32243
+ return out;
32244
+ }
32245
+ var IMAGE_RATIO = 4;
32246
+ function hash(a, b, seed) {
32247
+ let h = a * 374761393 + b * 668265263 + seed * 2147483647 | 0;
32248
+ h = Math.imul(h ^ h >>> 13, 1274126177);
32249
+ return ((h ^ h >>> 16) >>> 0) / 4294967296;
32250
+ }
32251
+ function canvas(w, h) {
32252
+ const data = new Uint8Array(w * h * 4);
32253
+ const put = (x, y, a) => {
32254
+ const xi = (x % w + w) % w;
32255
+ const yi = (y % h + h) % h;
32256
+ const k = (yi * w + xi) * 4 + 3;
32257
+ data[k] = Math.min(255, Math.max(data[k], Math.round(a * 255)));
32258
+ };
32259
+ const dot = (cx, cy, r, a = 1) => {
32260
+ for (let y = Math.floor(cy - r - 1); y <= Math.ceil(cy + r + 1); y++) {
32261
+ for (let x = Math.floor(cx - r - 1); x <= Math.ceil(cx + r + 1); x++) {
32262
+ const d = Math.hypot(x + 0.5 - cx, y + 0.5 - cy);
32263
+ const cov = Math.max(0, Math.min(1, r + 0.5 - d));
32264
+ if (cov > 0) put(x, y, cov * a);
32265
+ }
32266
+ }
32267
+ };
32268
+ const line = (x0, y0, x1, y1, r) => {
32269
+ const n = Math.max(1, Math.ceil(Math.hypot(x1 - x0, y1 - y0) * 2));
32270
+ for (let i = 0; i <= n; i++) dot(x0 + (x1 - x0) * i / n, y0 + (y1 - y0) * i / n, r);
32271
+ };
32272
+ return { data, dot, line };
32273
+ }
32274
+ function lookImages(look) {
32275
+ if (look === "paper") return classicImages().map((i) => ({ ...i, id: lookImageId("paper", i.name) }));
32276
+ const [ir, ig, ib] = [1, 3, 5].map((i) => parseInt(LOOK_TONES[look].ink.slice(i, i + 2), 16));
32277
+ const finish = (name, w, h, data) => {
32278
+ for (let k = 0; k < data.length; k += 4) {
32279
+ data[k] = ir;
32280
+ data[k + 1] = ig;
32281
+ data[k + 2] = ib;
32282
+ }
32283
+ return { id: lookImageId(look, name), width: w, height: h, pixelRatio: IMAGE_RATIO, data };
32284
+ };
32285
+ const out = [];
32286
+ for (const [id, step, r, seed] of [
32287
+ ["stipple-flats", 5, 0.95, 1],
32288
+ ["stipple-1fm", 6, 0.9, 2],
32289
+ ["stipple-2fm", 8, 0.85, 3],
32290
+ ["stipple-3fm", 11, 0.8, 4]
32291
+ ]) {
32292
+ const n = 8;
32293
+ const w = step * n;
32294
+ const c = canvas(w, w);
32295
+ for (let j = 0; j < n; j++) for (let i = 0; i < n; i++) {
32296
+ c.dot((i + 0.2 + 0.6 * hash(i, j, seed)) * step, (j + 0.2 + 0.6 * hash(j, i, seed + 7)) * step, r * (0.8 + 0.4 * hash(i, j, seed + 3)));
32297
+ }
32298
+ out.push(finish(id, w, w, c.data));
32299
+ }
32300
+ {
32301
+ const w = 96;
32302
+ const h = 64;
32303
+ const c = canvas(w, h);
32304
+ for (const [x, y] of [[16, 22], [64, 22], [40, 54], [88, 54]]) {
32305
+ c.line(x - 9, y, x + 9, y, 0.55);
32306
+ c.line(x, y, x, y - 9, 0.5);
32307
+ c.line(x - 3, y, x - 7, y - 7, 0.45);
32308
+ c.line(x + 3, y, x + 7, y - 7, 0.45);
32309
+ }
32310
+ out.push(finish("marsh", w, h, c.data));
32311
+ }
32312
+ {
32313
+ const n = 6;
32314
+ const step = 12;
32315
+ const w = n * step;
32316
+ const c = canvas(w, w);
32317
+ for (let j = 0; j < n; j++) for (let i = 0; i < n; i++) {
32318
+ const x = (i + 0.25 + 0.5 * hash(i, j, 31)) * step;
32319
+ const y = (j + 0.25 + 0.5 * hash(j, i, 37)) * step;
32320
+ for (let a = 0; a < 2 * Math.PI; a += 0.25) c.dot(x + 2.4 * Math.cos(a), y + 2.4 * Math.sin(a), 0.4);
32321
+ c.line(x + 1.5, y + 3, x + 3, y + 2.4, 0.55);
32322
+ }
32323
+ out.push(finish("woods", w, w, c.data));
32324
+ }
32325
+ for (const sym of lookSymbols(look, [ir, ig, ib, 255])) {
32326
+ out.push({ id: lookImageId(look, sym.name), width: sym.size, height: sym.size, pixelRatio: 2, data: sym.data });
32327
+ }
32328
+ return out;
32329
+ }
32330
+ function withWaterLines(style, data) {
32331
+ if (!style.sources[LOOK_WATERLINES_SOURCE]) return style;
32332
+ return { ...style, sources: { ...style.sources, [LOOK_WATERLINES_SOURCE]: { type: "geojson", data } } };
32333
+ }
32334
+
32335
+ // src/atlas/style-catalogue.ts
32336
+ var STYLE_THEMES = [
32337
+ { id: "day", colorTable: "DAY", label: "Day", description: "The S-52 day palette", group: "screen" },
32338
+ { id: "dusk", colorTable: "DUSK", label: "Dusk", description: "The S-52 dusk palette, dimmed for twilight", group: "screen" },
32339
+ { id: "night", colorTable: "NIGHT", label: "Night", description: "The S-52 night palette, dark to keep night vision", group: "screen" },
32340
+ {
32341
+ id: "eink_color",
32342
+ colorTable: "EINK_COLOR",
32343
+ label: "E-ink color",
32344
+ description: "For colour e-ink screens: heavier lines and a heavy safety contour",
32345
+ group: "eink"
32346
+ },
32347
+ {
32348
+ id: "eink_mono",
32349
+ colorTable: "EINK_MONO",
32350
+ label: "E-ink",
32351
+ description: "For monochrome e-ink screens: four greys, depth steps by pattern",
32352
+ group: "eink"
32353
+ },
32354
+ {
32355
+ id: "eink_night",
32356
+ colorTable: "EINK_NIGHT",
32357
+ label: "E-ink night",
32358
+ description: "For any e-ink screen at night: the e-ink greys on a black page",
32359
+ group: "eink"
32360
+ }
32361
+ ];
32362
+ var STYLE_LOOKS = [
32363
+ {
32364
+ id: "paper",
32365
+ label: "Paper",
32366
+ description: "The U.S. paper chart as last printed: buff land, blue to the 18 ft curve, magenta lights and red aids",
32367
+ colorTable: "DAY",
32368
+ fonts: Object.values(CLASSIC_FONTS)
32369
+ },
32370
+ {
32371
+ id: "engraved",
32372
+ label: "Engraved",
32373
+ description: "The 1860s Coast Survey engraving, in black: stippled shallows, hachured hills, engraved lettering",
32374
+ colorTable: "DAY",
32375
+ fonts: Object.values(LOOK_FONTS)
32376
+ },
32377
+ {
32378
+ id: "handcolored",
32379
+ label: "Hand-colored",
32380
+ description: "The engraving in a warm ink, washed in the colourist's watercolours",
32381
+ colorTable: "DAY",
32382
+ fonts: Object.values(LOOK_FONTS)
32383
+ }
32384
+ ];
32385
+ var STYLE_CATALOGUE = {
32386
+ themes: STYLE_THEMES,
32387
+ looks: STYLE_LOOKS,
32388
+ symbolFamilies: SYMBOL_FAMILIES.map((id) => ({ id, ...SYMBOL_FAMILY_META[id] }))
32389
+ };
32390
+
31071
32391
  // src/atlas/chart-symbol-sizing.ts
31072
32392
  var CHART_SYMBOL_SIZES = ["landLabels", "waterLabels", "depthNumbers", "waypoints", "chartIcons"];
31073
32393
  var CHART_SYMBOL_SIZE_WIRE = {
@@ -31207,9 +32527,9 @@ function factsOf(layer) {
31207
32527
  const meta = l.metadata ?? {};
31208
32528
  const isBasemap = source !== void 0 && BASEMAP_SOURCES.has(source);
31209
32529
  const cls = meta["s52:objectClass"];
31210
- const objectClass2 = isBasemap ? void 0 : (typeof cls === "string" ? cls : sourceLayer)?.toUpperCase();
32530
+ const objectClass5 = isBasemap ? void 0 : (typeof cls === "string" ? cls : sourceLayer)?.toUpperCase();
31211
32531
  const p = meta["chrt:labelPriority"];
31212
- return { source, sourceLayer, objectClass: objectClass2, labelPriority: typeof p === "number" ? p : void 0 };
32532
+ return { source, sourceLayer, objectClass: objectClass5, labelPriority: typeof p === "number" ? p : void 0 };
31213
32533
  }
31214
32534
  function textSliderFor(layer) {
31215
32535
  const f = factsOf(layer);
@@ -32319,8 +33639,41 @@ var SYMBOL_SET_LABELS = {
32319
33639
  s52: "S-52",
32320
33640
  s101: "S-101",
32321
33641
  chrt: "House",
32322
- raster: "CHRTraster"
33642
+ int1: "INT-1",
33643
+ uschart1: "U.S. Chart No. 1"
33644
+ };
33645
+ var SPRITE_SHEET_FAMILY = {
33646
+ s52: "s52",
33647
+ chrt: "chrt",
33648
+ int1: "raster",
33649
+ uschart1: "raster"
32323
33650
  };
33651
+ function applySymbolFamily(style, family, palette) {
33652
+ switch (family) {
33653
+ case "s52":
33654
+ return style;
33655
+ case "s101":
33656
+ return applyS101SymbolSet(style);
33657
+ // `palette` is passed so the house dash can resolve its S-52 colour tokens
33658
+ // against the active table — the LC strips it replaces carry their colour in
33659
+ // the sprite, so there is no paint colour left to inherit.
33660
+ case "chrt":
33661
+ return applyChrtSymbolSet(style, palette);
33662
+ case "int1":
33663
+ return applyRasterSymbolSet(style);
33664
+ // INT-1's artwork here; its aids are redrawn once the style is portrayed
33665
+ // (withUsChart1Marks), as CHRTpaper draws them.
33666
+ case "uschart1": {
33667
+ const int1 = applyRasterSymbolSet(style);
33668
+ int1.metadata["chrt:symbol-set"] = "uschart1";
33669
+ return int1;
33670
+ }
33671
+ default: {
33672
+ const unhandled = family;
33673
+ throw new Error(`no symbol family ${String(unhandled)}`);
33674
+ }
33675
+ }
33676
+ }
32324
33677
  var DOMINANCE_EXEMPT_CLASSES = /* @__PURE__ */ new Set([
32325
33678
  "LNDARE",
32326
33679
  // Safety-critical nav-aid point classes (S-52 viewing groups 24020,
@@ -32425,7 +33778,7 @@ var ORIENTATION_OPACITY_SCALE = {
32425
33778
  };
32426
33779
  var ORIENTATION_OPACITY_MAX = 0.92;
32427
33780
  var ORIENTATION_BOOST_MINZOOM = 11;
32428
- function fanOrientationLabelByCellBand(label, bandFan, objectClass2) {
33781
+ function fanOrientationLabelByCellBand(label, bandFan, objectClass5) {
32429
33782
  const cellBandExpr = [
32430
33783
  "slice",
32431
33784
  ["coalesce", ["get", "_cell_id"], "??9???"],
@@ -32433,7 +33786,7 @@ function fanOrientationLabelByCellBand(label, bandFan, objectClass2) {
32433
33786
  3
32434
33787
  ];
32435
33788
  const variants = [];
32436
- const scale = objectClass2 ? ORIENTATION_OPACITY_SCALE[objectClass2] ?? 1 : 1;
33789
+ const scale = objectClass5 ? ORIENTATION_OPACITY_SCALE[objectClass5] ?? 1 : 1;
32437
33790
  for (const code of BAND_DRAW_ORDER) {
32438
33791
  const range = BAND_PRIORITY_RANGES[code];
32439
33792
  const curve = CELL_BAND_OPACITY_CURVE[code];
@@ -32597,6 +33950,9 @@ function makeCollapsedChartLabel(label, cascade, requestedSet, lockedBounds) {
32597
33950
  return collapsed;
32598
33951
  }
32599
33952
  function generateStyle(palette = "DAY", opts = {}) {
33953
+ if (opts.look !== void 0 && palette !== "DAY") {
33954
+ throw new RangeError(`generateStyle: the ${opts.look} look draws over the DAY palette, not ${palette}`);
33955
+ }
32600
33956
  const seafloor = Boolean(opts.seafloor && opts.land) && seafloorLayers(palette).length > 0;
32601
33957
  const sources = buildSources({ ...opts, seafloor });
32602
33958
  const sourceId = opts.region ?? DEFAULT_REGION;
@@ -32655,14 +34011,14 @@ function generateStyle(palette = "DAY", opts = {}) {
32655
34011
  const bandFan = opts.bandFan ?? "collapsed";
32656
34012
  const lockedBounds = opts.chartMode?.lockedBounds;
32657
34013
  const bundles = [];
32658
- for (const objectClass2 of orderedClasses) {
32659
- if (META_LAYERS.has(objectClass2)) continue;
34014
+ for (const objectClass5 of orderedClasses) {
34015
+ if (META_LAYERS.has(objectClass5)) continue;
32660
34016
  bundles.push({
32661
- objectClass: objectClass2,
32662
- featureLayers: buildLayersForClass(objectClass2, palette, sourceId, {
34017
+ objectClass: objectClass5,
34018
+ featureLayers: buildLayersForClass(objectClass5, palette, sourceId, {
32663
34019
  safetyContour: opts.safetyContour
32664
34020
  }),
32665
- label: buildLabelLayer2(objectClass2, palette, sourceId, opts.depthUnits ?? "meters", {
34021
+ label: buildLabelLayer2(objectClass5, palette, sourceId, opts.depthUnits ?? "meters", {
32666
34022
  safetyContour: opts.safetyContour,
32667
34023
  twoShadeSoundings: opts.twoShadeSoundings,
32668
34024
  soundingFontWeight: opts.soundingFontWeight,
@@ -32818,17 +34174,17 @@ function generateStyle(palette = "DAY", opts = {}) {
32818
34174
  if (opts.labels === "placename") {
32819
34175
  labelLayers.push(...buildPlaceNameLayers(sourceId, palette));
32820
34176
  } else {
32821
- for (const { objectClass: objectClass2, label } of bundles) {
34177
+ for (const { objectClass: objectClass5, label } of bundles) {
32822
34178
  if (!label) continue;
32823
- if (getLabelBehavior(objectClass2) === "orientation-cross-band") {
32824
- if (objectClass2 === "LNDARE" || objectClass2 === "SEAARE") {
34179
+ if (getLabelBehavior(objectClass5) === "orientation-cross-band") {
34180
+ if (objectClass5 === "LNDARE" || objectClass5 === "SEAARE") {
32825
34181
  const Z = ISLAND_LABEL_HOIST_MINZOOM;
32826
- const { hoist, watermark } = objectClass2 === "LNDARE" ? splitOrientationFan(
32827
- fanOrientationLabelByCellBand(label, bandFan, objectClass2),
34182
+ const { hoist, watermark } = objectClass5 === "LNDARE" ? splitOrientationFan(
34183
+ fanOrientationLabelByCellBand(label, bandFan, objectClass5),
32828
34184
  [">=", ["zoom"], Z],
32829
34185
  ["<", ["zoom"], Z]
32830
34186
  ) : splitOrientationFan(
32831
- fanOrientationLabelByCellBand(label, bandFan, objectClass2),
34187
+ fanOrientationLabelByCellBand(label, bandFan, objectClass5),
32832
34188
  ["<=", buildSeaAreaTierExpression(), MAJOR_WATER_TIER_MAX],
32833
34189
  [">", buildSeaAreaTierExpression(), MAJOR_WATER_TIER_MAX],
32834
34190
  { "text-padding": MAJOR_WATER_TEXT_PADDING }
@@ -32837,7 +34193,7 @@ function generateStyle(palette = "DAY", opts = {}) {
32837
34193
  labelLayers.push(...watermark);
32838
34194
  continue;
32839
34195
  }
32840
- labelLayers.push(...fanOrientationLabelByCellBand(label, bandFan, objectClass2));
34196
+ labelLayers.push(...fanOrientationLabelByCellBand(label, bandFan, objectClass5));
32841
34197
  }
32842
34198
  }
32843
34199
  }
@@ -32882,7 +34238,7 @@ function generateStyle(palette = "DAY", opts = {}) {
32882
34238
  hoistLighthouseNames(labelLayers);
32883
34239
  layers.push(...labelLayers);
32884
34240
  }
32885
- const symbolSet = opts.symbolSet ?? "s52";
34241
+ const symbolSet = normalizeSymbolFamily(opts.symbolSet ?? "s52");
32886
34242
  const spriteBase = `${opts.tileBaseUrl ?? "https://tiles.chrt.co"}/v1/sprites`;
32887
34243
  const glyphsBase = `${opts.tileBaseUrl ?? "https://tiles.chrt.co"}/v1/glyphs`;
32888
34244
  const isLndareFill = (l) => /^s52-LNDARE-fill-band\d+$/.test(l.id);
@@ -33090,7 +34446,7 @@ function generateStyle(palette = "DAY", opts = {}) {
33090
34446
  // palettes for their OWN glyphs, but both fall back to s52 artwork for
33091
34447
  // classes they don't remap — and that artwork carries colour tokens.
33092
34448
  ...symbolSet !== "s101" && {
33093
- sprite: `${spriteBase}/${symbolSet}-${palette.toLowerCase()}`
34449
+ sprite: `${spriteBase}/${SPRITE_SHEET_FAMILY[symbolSet]}-${palette.toLowerCase()}`
33094
34450
  },
33095
34451
  // ⚠ DEPLOY ORDER. This URL is baked into the style by callers on BOTH
33096
34452
  // sides: the tile-worker's /v1/styles route AND the app's own
@@ -33111,7 +34467,7 @@ function generateStyle(palette = "DAY", opts = {}) {
33111
34467
  glyphs: `${glyphsBase}/{fontstack}/{range}.pbf`,
33112
34468
  layers: finalLayers
33113
34469
  };
33114
- const familyStyle = symbolSet === "s101" ? applyS101SymbolSet(style) : symbolSet === "chrt" ? applyChrtSymbolSet(style, palette) : symbolSet === "raster" ? applyRasterSymbolSet(style) : style;
34470
+ const familyStyle = applySymbolFamily(style, symbolSet, palette);
33115
34471
  const einked = applyEinkPortrayal(familyStyle, palette, { safetyContour: opts.safetyContour });
33116
34472
  const placed = opts.dangerDepthPlacers === true ? addDangerDepthPlacers(einked.layers) : einked.layers;
33117
34473
  const portrayed = placed === einked.layers ? einked : {
@@ -33120,8 +34476,14 @@ function generateStyle(palette = "DAY", opts = {}) {
33120
34476
  // The placers are emitted layers: the count is of what the style carries.
33121
34477
  metadata: { ...einked.metadata, "chrt:layer-count": placed.length }
33122
34478
  };
33123
- const sized = applyChartSymbolScales(portrayed.layers, opts.symbolScales, opts.soundingsRule);
33124
- return sized === portrayed.layers ? portrayed : { ...portrayed, layers: sized };
34479
+ const marked = symbolSet === "uschart1" && opts.look === void 0 ? withUsChart1Marks(portrayed, palette) : portrayed;
34480
+ const sized = applyChartSymbolScales(marked.layers, opts.symbolScales, opts.soundingsRule);
34481
+ const sizedStyle = sized === marked.layers ? marked : { ...marked, layers: sized };
34482
+ return opts.look === void 0 ? sizedStyle : withLook(sizedStyle, opts.look);
34483
+ }
34484
+ function withUsChart1Marks(style, palette) {
34485
+ const ink = classicInkFor(palette);
34486
+ return ink === null ? style : withClassicMarks(style, ink);
33125
34487
  }
33126
34488
  function generateStyleJSON(palette = "DAY", opts = {}) {
33127
34489
  return JSON.stringify(generateStyle(palette, opts), null, 2);
@@ -33888,7 +35250,8 @@ var Chrt = class {
33888
35250
  *
33889
35251
  * @remarks `symbolSet` picks the artwork family: `"s101"` for the
33890
35252
  * official S-101 Portrayal Catalogue symbols, `"chrt"` for the CHRT house
33891
- * set, `"raster"` for CHRTraster (the traditional paper-chart portrayal);
35253
+ * set, `"int1"` for INT-1 (the IHO INT 1 paper-chart symbols; `"raster"`,
35254
+ * its id before 2026-11, still means it);
33892
35255
  * default is the S-52 set. Load the matching images from
33893
35256
  * `@chrtco/sdk/atlas/browser` (`loadS101SymbolImages`,
33894
35257
  * `loadChrtSymbolImages`, `loadChrtRasterSymbolImages`). Generated
@@ -34027,6 +35390,7 @@ export {
34027
35390
  BUILD_PARAM,
34028
35391
  CHART_BAND_CODES,
34029
35392
  CHART_CASCADE_CODES,
35393
+ CHART_LOOKS,
34030
35394
  CHART_SECTIONS,
34031
35395
  CHART_SOUNDINGS_RULE,
34032
35396
  CHART_SYMBOL_SCALE,
@@ -34043,6 +35407,9 @@ export {
34043
35407
  CHRT_ICON_PREFIX,
34044
35408
  CHRT_SDF_GLYPHS,
34045
35409
  CHRT_STYLE_MODES,
35410
+ CLASSIC_FONTS,
35411
+ CLASSIC_MARK_NAMES,
35412
+ CLASSIC_TONES,
34046
35413
  COARSE_MARK_FLOOR,
34047
35414
  COARSE_MARK_HELD_HAZARDS,
34048
35415
  Chrt,
@@ -34071,6 +35438,7 @@ export {
34071
35438
  EINK_DOTS_PATTERN,
34072
35439
  EINK_HATCH_PATTERN,
34073
35440
  EINK_MONO_GREYS,
35441
+ ENGRAVED_LOOKS,
34074
35442
  HAZARD_LABEL_PRIORITY,
34075
35443
  INSPECT_CLASS_RANK,
34076
35444
  INSPECT_RANK_DEVIATIONS,
@@ -34089,9 +35457,14 @@ export {
34089
35457
  LAND_BUILD_MAXZOOM,
34090
35458
  LAND_REGION,
34091
35459
  LAND_TEXT_CLASSES,
35460
+ LEGACY_SYMBOL_FAMILY_ALIASES,
34092
35461
  LIGHTHOUSE_NAME_FILTER,
34093
35462
  LIGHTHOUSE_NAME_LABEL_PRIORITY,
34094
35463
  LIGHT_LABEL_FEET_PER_METRE,
35464
+ LOOK_FONTS,
35465
+ LOOK_IMAGE_NAMES,
35466
+ LOOK_TONES,
35467
+ LOOK_WATERLINES_SOURCE,
34095
35468
  MAPLIBRE_DEFAULT_TEXT_PADDING_PX,
34096
35469
  NAUTICAL_SYMBOLS,
34097
35470
  NAV_AID_LAYER_GROUPS,
@@ -34155,6 +35528,9 @@ export {
34155
35528
  SOUNDING_PADDING_PER_FACTOR,
34156
35529
  STANDARD_CHART_SYMBOL_SCALES,
34157
35530
  STATUS_EXTINGUISHED,
35531
+ STYLE_CATALOGUE,
35532
+ STYLE_LOOKS,
35533
+ STYLE_THEMES,
34158
35534
  SYMBOL_ANNOTATION_TEXT_CLASSES,
34159
35535
  SYMBOL_FAMILIES,
34160
35536
  SYMBOL_FAMILY_META,
@@ -34162,6 +35538,8 @@ export {
34162
35538
  SYMBOL_MAP,
34163
35539
  TileAuth,
34164
35540
  TileTokenError,
35541
+ WASH_TINTS,
35542
+ WASH_TONES,
34165
35543
  WATER_BODY_LAYER_GROUPS,
34166
35544
  WATER_TEXT_CLASSES,
34167
35545
  WeatherEndpoint,
@@ -34205,6 +35583,14 @@ export {
34205
35583
  chrtHouseColor,
34206
35584
  chrtLightTintExpression,
34207
35585
  clampChartSymbolScale,
35586
+ classicDrawing,
35587
+ classicIconExpression,
35588
+ classicInkFor,
35589
+ classicMarkId,
35590
+ classicMarkImage,
35591
+ classicMarkImages,
35592
+ classicMarkInk,
35593
+ classicMarkSvgs,
34208
35594
  collectCandidates,
34209
35595
  collectClickCandidates,
34210
35596
  combineWithBandFilter,
@@ -34227,6 +35613,7 @@ export {
34227
35613
  deriveMarinerName,
34228
35614
  drapeHalves,
34229
35615
  drapedFirst,
35616
+ drawingSvg,
34230
35617
  extinguishedLightExpression,
34231
35618
  extractNavAidDesignation,
34232
35619
  featureIdentity,
@@ -34271,6 +35658,7 @@ export {
34271
35658
  isDrapeable,
34272
35659
  isEinkColorTable,
34273
35660
  isEinkGreyTable,
35661
+ isEngravedLook,
34274
35662
  isExtinguishedLight,
34275
35663
  isLabelLayerVisible,
34276
35664
  isMapLive,
@@ -34295,10 +35683,15 @@ export {
34295
35683
  lightFillExpression,
34296
35684
  lightHeightText,
34297
35685
  lightsIconExpression,
35686
+ lookImageId,
35687
+ lookImages,
35688
+ lookOfImageId,
34298
35689
  normalizeStyleMode,
35690
+ normalizeSymbolFamily,
34299
35691
  normalizeTheme,
34300
35692
  opaqueSplitBaseOf,
34301
35693
  paginate,
35694
+ parseChartLook,
34302
35695
  parseListCodes,
34303
35696
  parseSigseqTerms,
34304
35697
  parseSymbolFamily,
@@ -34332,12 +35725,16 @@ export {
34332
35725
  soundingPaddingValue,
34333
35726
  splitOpaqueDepthAreas,
34334
35727
  stepChartSymbolScale,
35728
+ styleLook,
34335
35729
  styleModeBand,
34336
35730
  terrainStackCount,
34337
35731
  textSliderFor,
34338
35732
  themeChrtGlyph,
34339
35733
  tileTemplate,
34340
35734
  uncoveredSectorArcs,
35735
+ withClassicMarks,
35736
+ withLook,
35737
+ withWaterLines,
34341
35738
  withinBboxFilter,
34342
35739
  worldMinusBboxPolygon
34343
35740
  };