venuekit 0.10.2 → 0.10.3

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/react.cjs CHANGED
@@ -45,7 +45,7 @@
45
45
 
46
46
 
47
47
 
48
- var _chunkZ47OPTEPcjs = require('./chunk-Z47OPTEP.cjs');
48
+ var _chunkUWCMN6Q7cjs = require('./chunk-UWCMN6Q7.cjs');
49
49
 
50
50
  // ../canvas/src/camera.ts
51
51
  var MIN_ZOOM = 0.05;
@@ -133,7 +133,7 @@ function reduceGesture(state, camera, viewport, input) {
133
133
  const [a, b] = list2;
134
134
  return {
135
135
  // Con dos dedos ya no hay tap posible: `moved` queda en true a propósito.
136
- state: { pointers, origin: null, moved: true, pinchDistance: _chunkZ47OPTEPcjs.distance.call(void 0, a, b) },
136
+ state: { pointers, origin: null, moved: true, pinchDistance: _chunkUWCMN6Q7cjs.distance.call(void 0, a, b) },
137
137
  camera
138
138
  };
139
139
  }
@@ -146,7 +146,7 @@ function reduceGesture(state, camera, viewport, input) {
146
146
  const [a, b] = list2;
147
147
  const previousA = state.pointers[a.id];
148
148
  const previousB = state.pointers[b.id];
149
- const nextDistance = _chunkZ47OPTEPcjs.distance.call(void 0, a, b);
149
+ const nextDistance = _chunkUWCMN6Q7cjs.distance.call(void 0, a, b);
150
150
  const previousDistance = state.pinchDistance;
151
151
  if (!previousA || !previousB || !previousDistance || previousDistance < 1e-6 || nextDistance < 1e-6) {
152
152
  return { state: { ...state, pointers, pinchDistance: nextDistance }, camera };
@@ -159,7 +159,7 @@ function reduceGesture(state, camera, viewport, input) {
159
159
  camera: panBy(zoomed, nextMid.x - previousMid.x, nextMid.y - previousMid.y)
160
160
  };
161
161
  }
162
- const movedEnough = state.moved || state.origin !== null && _chunkZ47OPTEPcjs.distance.call(void 0, state.origin, pointer) > TAP_SLOP;
162
+ const movedEnough = state.moved || state.origin !== null && _chunkUWCMN6Q7cjs.distance.call(void 0, state.origin, pointer) > TAP_SLOP;
163
163
  if (!movedEnough) return { state: { ...state, pointers }, camera };
164
164
  return {
165
165
  state: { ...state, pointers, moved: true },
@@ -262,7 +262,7 @@ function centredBox(at, width, height, rotation) {
262
262
  return { minX: at.x - hw, minY: at.y - hh, maxX: at.x + hw, maxY: at.y + hh };
263
263
  }
264
264
  function tableBodyBox(table) {
265
- const size = _chunkZ47OPTEPcjs.tableSize.call(void 0, table.shape, table.places);
265
+ const size = _chunkUWCMN6Q7cjs.tableSize.call(void 0, table.shape, table.places);
266
266
  const k = _nullishCoalesce(table.scale, () => ( 1));
267
267
  const [w, h] = "radius" in size ? [size.radius * 2 * k, size.radius * 2 * k] : [size.width * k, size.height * k];
268
268
  return centredBox(table.transform, w, h, table.transform.rotation);
@@ -279,12 +279,12 @@ function pieceBounds(element) {
279
279
  return box;
280
280
  }
281
281
  function computeBounds(element) {
282
- if (element.type === "zone") return _chunkZ47OPTEPcjs.zoneBounds.call(void 0, element);
282
+ if (element.type === "zone") return _chunkUWCMN6Q7cjs.zoneBounds.call(void 0, element);
283
283
  if (element.type === "landmark") {
284
284
  return centredBox(element.transform, element.width, element.height, element.transform.rotation);
285
285
  }
286
- const units = element.type === "seatBlock" ? _chunkZ47OPTEPcjs.expandSeatBlock.call(void 0, element) : _chunkZ47OPTEPcjs.expandTable.call(void 0, element);
287
- const own = units.length > 0 ? _chunkZ47OPTEPcjs.bbox.call(void 0, units.map((u) => ({ x: u.x, y: u.y }))) : null;
286
+ const units = element.type === "seatBlock" ? _chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, element) : _chunkUWCMN6Q7cjs.expandTable.call(void 0, element);
287
+ const own = units.length > 0 ? _chunkUWCMN6Q7cjs.bbox.call(void 0, units.map((u) => ({ x: u.x, y: u.y }))) : null;
288
288
  if (element.type === "table") {
289
289
  const body = tableBodyBox(element);
290
290
  return own ? {
@@ -296,13 +296,17 @@ function computeBounds(element) {
296
296
  }
297
297
  return own;
298
298
  }
299
- function elementAt(layout, screen, camera, viewport) {
299
+ var EDIT_HIT_SLOP_PX = 4;
300
+ function elementAt(layout, screen, camera, viewport, options = {}) {
300
301
  const world = screenToWorld(camera, viewport, screen);
302
+ const slop = (_nullishCoalesce(options.slopPx, () => ( 0))) / camera.zoom;
301
303
  for (let i = layout.elements.length - 1; i >= 0; i -= 1) {
302
304
  const element = layout.elements[i];
303
305
  const box = elementBounds(layout, element);
304
- if (box && world.x >= box.minX && world.x <= box.maxX && world.y >= box.minY && world.y <= box.maxY) {
305
- if (element.type === "zone" && !_chunkZ47OPTEPcjs.pointInZone.call(void 0, element, world)) continue;
306
+ const ownsRadius = element.type === "seatBlock" || element.type === "table" && element.mode === "perPlace";
307
+ const pad = element.type === "seatBlock" || element.type === "table" ? (ownsRadius ? _nullishCoalesce(_optionalChain([options, 'access', _ => _.radii, 'optionalAccess', _2 => _2.get, 'call', _3 => _3(element.id)]), () => ( 0)) : 0) + slop : 0;
308
+ if (box && world.x >= box.minX - pad && world.x <= box.maxX + pad && world.y >= box.minY - pad && world.y <= box.maxY + pad) {
309
+ if (element.type === "zone" && !_chunkUWCMN6Q7cjs.pointInZone.call(void 0, element, world)) continue;
306
310
  return element;
307
311
  }
308
312
  }
@@ -336,7 +340,7 @@ function unitRadii(layout) {
336
340
  out.set(el.id, DEFAULT_UNIT_RADIUS * k);
337
341
  continue;
338
342
  }
339
- const size = _chunkZ47OPTEPcjs.tableSize.call(void 0, el.shape, el.places);
343
+ const size = _chunkUWCMN6Q7cjs.tableSize.call(void 0, el.shape, el.places);
340
344
  out.set(el.id, ("radius" in size ? size.radius : Math.max(size.width, size.height) / 2) * k);
341
345
  }
342
346
  }
@@ -365,13 +369,13 @@ function buildScene(input) {
365
369
  })
366
370
  );
367
371
  const colorOf = (ref) => ref === null ? null : _nullishCoalesce(placeTypeColors.get(ref), () => ( null));
368
- const dim = (ref) => mode === "map" && (colorOf(ref) === null || input.focusRef != null && ref !== input.focusRef || ref !== null && !!_optionalChain([input, 'access', _ => _.dimmedRefs, 'optionalAccess', _2 => _2.has, 'call', _3 => _3(ref)]));
372
+ const dim = (ref) => mode === "map" && (colorOf(ref) === null || input.focusRef != null && ref !== input.focusRef || ref !== null && !!_optionalChain([input, 'access', _4 => _4.dimmedRefs, 'optionalAccess', _5 => _5.has, 'call', _6 => _6(ref)]));
369
373
  const bg = layout.meta.background;
370
374
  const background = bg ? { src: bg.src, box: { minX: bg.x, minY: bg.y, maxX: bg.x + bg.width, maxY: bg.y + bg.height }, opacity: bg.opacity } : null;
371
375
  const shapes = [];
372
376
  const labels = [];
373
377
  const chip = { fill: palette.shapeFill, stroke: palette.shape };
374
- const refOf = (el) => el.type === "landmark" ? null : _optionalChain([el, 'access', _4 => _4.placeType, 'optionalAccess', _5 => _5.ref]) || null;
378
+ const refOf = (el) => el.type === "landmark" ? null : _optionalChain([el, 'access', _7 => _7.placeType, 'optionalAccess', _8 => _8.ref]) || null;
375
379
  for (const el of layout.elements) {
376
380
  if (el.type === "landmark") {
377
381
  const b = centredBox(el.transform, el.width, el.height, el.transform.rotation);
@@ -429,24 +433,24 @@ function buildScene(input) {
429
433
  const ref = refOf(el);
430
434
  const color = _nullishCoalesce(colorOf(ref), () => ( palette.unassigned));
431
435
  const b = centredBox(el.transform, el.width, el.height, el.transform.rotation);
432
- const strong = mode === "map" && ref !== null && !!_optionalChain([input, 'access', _6 => _6.highlightRefs, 'optionalAccess', _7 => _7.has, 'call', _8 => _8(ref)]);
436
+ const strong = mode === "map" && ref !== null && !!_optionalChain([input, 'access', _9 => _9.highlightRefs, 'optionalAccess', _10 => _10.has, 'call', _11 => _11(ref)]);
433
437
  const paint2 = {
434
438
  fill: translucent(color, strong ? palette.zoneSelectedAlpha : palette.zoneAlpha),
435
439
  stroke: color,
436
440
  strokeWidth: strong ? 2.5 : 1.5,
437
441
  ...dim(ref) ? { alpha: DIMMED_ALPHA } : {}
438
442
  };
439
- const outline = _chunkZ47OPTEPcjs.zoneOutline.call(void 0, el, ZONE_CORNER);
443
+ const outline = _chunkUWCMN6Q7cjs.zoneOutline.call(void 0, el, ZONE_CORNER);
440
444
  if (outline.length > 0) shapes.push({ kind: "polygon", points: outline, ...paint2 });
441
445
  else shapes.push({ kind: "rect", x: b.minX, y: b.minY, width: b.maxX - b.minX, height: b.maxY - b.minY, cornerRadius: ZONE_CORNER, ...paint2 });
442
- const room = _chunkZ47OPTEPcjs.zoneLabelSize.call(void 0, el);
446
+ const room = _chunkUWCMN6Q7cjs.zoneLabelSize.call(void 0, el);
443
447
  const swap = el.transform.rotation === 90 || el.transform.rotation === 270;
444
448
  const roomW = (swap ? room.height : room.width) * camera.zoom;
445
449
  const roomH = (swap ? room.width : room.height) * camera.zoom;
446
- const text = colorOf(ref) !== null ? _nullishCoalesce(_optionalChain([el, 'access', _9 => _9.placeType, 'optionalAccess', _10 => _10.name]), () => ( "")) : mode === "designer" ? input.unassignedLabel : "";
450
+ const text = colorOf(ref) !== null ? _nullishCoalesce(_optionalChain([el, 'access', _12 => _12.placeType, 'optionalAccess', _13 => _13.name]), () => ( "")) : mode === "designer" ? input.unassignedLabel : "";
447
451
  if (text && mode === "map") {
448
452
  const maxWidth = roomW - LABEL_INSET_PX;
449
- const price = ref !== null ? _optionalChain([input, 'access', _11 => _11.placeTypePrices, 'optionalAccess', _12 => _12.get, 'call', _13 => _13(ref)]) : void 0;
453
+ const price = ref !== null ? _optionalChain([input, 'access', _14 => _14.placeTypePrices, 'optionalAccess', _15 => _15.get, 'call', _16 => _16(ref)]) : void 0;
450
454
  const twoLines = !!price && roomH >= TWO_LINES_PX;
451
455
  const shift = twoLines ? 9 / camera.zoom : 0;
452
456
  const maxHeight = twoLines ? void 0 : roomH - LABEL_INSET_PX;
@@ -491,7 +495,7 @@ function buildScene(input) {
491
495
  }
492
496
  const chipped = mode === "designer" ? layout.elements.filter((el) => el.type !== "landmark" && colorOf(refOf(el)) === null) : [];
493
497
  const byElement = new Map(chipped.map((el) => [el.id, []]));
494
- if (byElement.size > 0) for (const u of units) _optionalChain([byElement, 'access', _14 => _14.get, 'call', _15 => _15(u.elementId), 'optionalAccess', _16 => _16.push, 'call', _17 => _17(u)]);
498
+ if (byElement.size > 0) for (const u of units) _optionalChain([byElement, 'access', _17 => _17.get, 'call', _18 => _18(u.elementId), 'optionalAccess', _19 => _19.push, 'call', _20 => _20(u)]);
495
499
  for (const el of chipped) {
496
500
  const own = byElement.get(el.id);
497
501
  if (!own || own.length === 0) continue;
@@ -534,7 +538,7 @@ function buildScene(input) {
534
538
  if (!visible.has(u.id)) continue;
535
539
  visibleUnitIds.push(u.id);
536
540
  const color = _nullishCoalesce(colorOf(u.placeTypeRef), () => ( palette.unassigned));
537
- const state = mode === "designer" && _optionalChain([input, 'access', _18 => _18.locked, 'optionalAccess', _19 => _19.has, 'call', _20 => _20(u.id)]) ? "taken" : _nullishCoalesce(states.get(u.id), () => ( "free"));
541
+ const state = mode === "designer" && _optionalChain([input, 'access', _21 => _21.locked, 'optionalAccess', _22 => _22.has, 'call', _23 => _23(u.id)]) ? "taken" : _nullishCoalesce(states.get(u.id), () => ( "free"));
538
542
  const mapPaint = mode === "map" ? mapUnitPaint(state, color, palette) : null;
539
543
  const paint2 = mapPaint ? { fill: mapPaint.fill, stroke: mapPaint.stroke, strokeWidth: mapPaint.strokeWidth } : unitPaint(state, color, palette);
540
544
  const dimmed = dim(u.placeTypeRef);
@@ -546,7 +550,7 @@ function buildScene(input) {
546
550
  const size = Math.min(13, Math.max(8, radius * camera.zoom * 0.9));
547
551
  labels.push({ x: u.x, y: u.y, text: number, size, weight: 700, color: mapPaint.label, align: "centre", maxWidth: radius * camera.zoom * 1.7 });
548
552
  }
549
- if (_optionalChain([el, 'optionalAccess', _21 => _21.type]) === "table" && el.mode === "whole" && el.shape === "rect") {
553
+ if (_optionalChain([el, 'optionalAccess', _24 => _24.type]) === "table" && el.mode === "whole" && el.shape === "rect") {
550
554
  const b = tableBodyBox(el);
551
555
  shapes.push({ kind: "rect", x: b.minX, y: b.minY, width: b.maxX - b.minX, height: b.maxY - b.minY, ...paint2, ...alpha });
552
556
  continue;
@@ -625,7 +629,7 @@ function paint(ctx, fill, stroke, strokeWidth, zoom) {
625
629
  }
626
630
  function drawBackground(ctx, scene, images) {
627
631
  const bg = scene.background;
628
- const bitmap = bg ? _optionalChain([images, 'optionalAccess', _22 => _22.get, 'call', _23 => _23(bg.src)]) : void 0;
632
+ const bitmap = bg ? _optionalChain([images, 'optionalAccess', _25 => _25.get, 'call', _26 => _26(bg.src)]) : void 0;
629
633
  if (!bg || !bitmap) return;
630
634
  const previous = ctx.globalAlpha;
631
635
  ctx.globalAlpha = bg.opacity;
@@ -734,7 +738,7 @@ function hitUnit(input) {
734
738
  const unit = unitById.get(id);
735
739
  if (!unit) continue;
736
740
  const radius = _nullishCoalesce(radii.get(unit.elementId), () => ( 0));
737
- const d = _chunkZ47OPTEPcjs.distance.call(void 0, world, unit);
741
+ const d = _chunkUWCMN6Q7cjs.distance.call(void 0, world, unit);
738
742
  if (d > reach + radius) continue;
739
743
  const score = d - radius;
740
744
  if (score < bestScore) {
@@ -759,7 +763,7 @@ function cornerPoint(box, corner) {
759
763
  var clamp = (v, min, max) => Math.min(max, Math.max(min, v));
760
764
  function resizeElement(el, corner, from, to) {
761
765
  if (el.type === "zone" || el.type === "landmark") {
762
- const box2 = el.type === "zone" ? _chunkZ47OPTEPcjs.zoneBounds.call(void 0, el) : centredBox(el.transform, el.width, el.height, el.transform.rotation);
766
+ const box2 = el.type === "zone" ? _chunkUWCMN6Q7cjs.zoneBounds.call(void 0, el) : centredBox(el.transform, el.width, el.height, el.transform.rotation);
763
767
  const east = corner === "ne" || corner === "se";
764
768
  const south = corner === "se" || corner === "sw";
765
769
  const start = cornerPoint(box2, corner);
@@ -770,11 +774,11 @@ function resizeElement(el, corner, from, to) {
770
774
  const swap = el.transform.rotation === 90 || el.transform.rotation === 270;
771
775
  const [w, h] = swap ? [worldH, worldW] : [worldW, worldH];
772
776
  if (el.type === "zone" && (_nullishCoalesce(el.curve, () => ( 0))) > 0) {
773
- const sized = _chunkZ47OPTEPcjs.zoneWithLocalSize.call(void 0, el, w, h);
777
+ const sized = _chunkUWCMN6Q7cjs.zoneWithLocalSize.call(void 0, el, w, h);
774
778
  const width = Math.round(clamp(sized.width, RESIZE_MIN, RESIZE_MAX));
775
779
  const height = Math.round(clamp(sized.height, RESIZE_MIN, RESIZE_MAX));
776
780
  const next = { ...sized, width, height };
777
- const b = _chunkZ47OPTEPcjs.zoneBounds.call(void 0, next);
781
+ const b = _chunkUWCMN6Q7cjs.zoneBounds.call(void 0, next);
778
782
  const dx = east ? box2.minX - b.minX : box2.maxX - b.maxX;
779
783
  const dy = south ? box2.minY - b.minY : box2.maxY - b.maxY;
780
784
  return { ...next, transform: { ...el.transform, x: el.transform.x + dx, y: el.transform.y + dy } };
@@ -786,11 +790,11 @@ function resizeElement(el, corner, from, to) {
786
790
  const box = pieceBounds(el);
787
791
  if (!box) return el;
788
792
  const centre = { x: (box.minX + box.maxX) / 2, y: (box.minY + box.maxY) / 2 };
789
- const reach = _chunkZ47OPTEPcjs.distance.call(void 0, from, centre);
793
+ const reach = _chunkUWCMN6Q7cjs.distance.call(void 0, from, centre);
790
794
  if (reach < 1) return el;
791
- const scale = _chunkZ47OPTEPcjs.snapScale.call(void 0, (_nullishCoalesce(el.scale, () => ( 1))) * (_chunkZ47OPTEPcjs.distance.call(void 0, to, centre) / reach), RESIZE_SCALE_STEP);
795
+ const scale = _chunkUWCMN6Q7cjs.snapScale.call(void 0, (_nullishCoalesce(el.scale, () => ( 1))) * (_chunkUWCMN6Q7cjs.distance.call(void 0, to, centre) / reach), RESIZE_SCALE_STEP);
792
796
  if (scale === (_nullishCoalesce(el.scale, () => ( 1)))) return el;
793
- return _chunkZ47OPTEPcjs.scalePiece.call(void 0, el, scale);
797
+ return _chunkUWCMN6Q7cjs.scalePiece.call(void 0, el, scale);
794
798
  }
795
799
 
796
800
  // ../canvas/src/a11y.ts
@@ -834,7 +838,7 @@ function nearestInDirection(nodes, from, direction) {
834
838
  const d = Math.hypot(dx, dy);
835
839
  if (!best2 || d < best2.d) best2 = { id: n.id, d };
836
840
  }
837
- return _nullishCoalesce(_optionalChain([best2, 'optionalAccess', _24 => _24.id]), () => ( null));
841
+ return _nullishCoalesce(_optionalChain([best2, 'optionalAccess', _27 => _27.id]), () => ( null));
838
842
  }
839
843
  function navigateA11y(nodes, fromId, direction) {
840
844
  const from = nodes.find((n) => n.id === fromId);
@@ -870,10 +874,10 @@ function initialEditGesture() {
870
874
  return { g: initialGestureState, press: null };
871
875
  }
872
876
  function isArmed(state) {
873
- return !!_optionalChain([state, 'access', _25 => _25.press, 'optionalAccess', _26 => _26.armed]) && state.press.movable !== null;
877
+ return !!_optionalChain([state, 'access', _28 => _28.press, 'optionalAccess', _29 => _29.armed]) && state.press.movable !== null;
874
878
  }
875
879
  function isMarqueeArmed(state) {
876
- return !!_optionalChain([state, 'access', _27 => _27.press, 'optionalAccess', _28 => _28.armed]) && !!state.press.marquee;
880
+ return !!_optionalChain([state, 'access', _30 => _30.press, 'optionalAccess', _31 => _31.armed]) && !!state.press.marquee;
877
881
  }
878
882
  var sample = (p) => ({ id: p.id, x: p.x, y: p.y });
879
883
  function reduceEditGesture(state, camera, viewport, input) {
@@ -900,9 +904,9 @@ function reduceEditGesture(state, camera, viewport, input) {
900
904
  if (input.kind === "down") {
901
905
  const r2 = delegate(state.g, { type: "pointerdown", pointer: sample(p) });
902
906
  if (Object.keys(r2.state.pointers).length >= 2) {
903
- const effects2 = _optionalChain([press, 'optionalAccess', _29 => _29.moving]) && press.movable ? [{ type: "moveEnd", elementId: press.movable }] : [];
904
- if (_optionalChain([press, 'optionalAccess', _30 => _30.resize, 'optionalAccess', _31 => _31.active]) && press.elementId) effects2.push({ type: "resizeCancel", elementId: press.elementId });
905
- if (_optionalChain([press, 'optionalAccess', _32 => _32.marquee, 'optionalAccess', _33 => _33.active])) effects2.push({ type: "marqueeCancel" });
907
+ const effects2 = _optionalChain([press, 'optionalAccess', _32 => _32.moving]) && press.movable ? [{ type: "moveEnd", elementId: press.movable }] : [];
908
+ if (_optionalChain([press, 'optionalAccess', _33 => _33.resize, 'optionalAccess', _34 => _34.active]) && press.elementId) effects2.push({ type: "resizeCancel", elementId: press.elementId });
909
+ if (_optionalChain([press, 'optionalAccess', _35 => _35.marquee, 'optionalAccess', _36 => _36.active])) effects2.push({ type: "marqueeCancel" });
906
910
  return {
907
911
  state: {
908
912
  g: r2.state,
@@ -957,9 +961,9 @@ function reduceEditGesture(state, camera, viewport, input) {
957
961
  };
958
962
  }
959
963
  if (input.kind === "move") {
960
- if (_optionalChain([press, 'optionalAccess', _34 => _34.marquee]) && Object.keys(state.g.pointers).length === 1) {
964
+ if (_optionalChain([press, 'optionalAccess', _37 => _37.marquee]) && Object.keys(state.g.pointers).length === 1) {
961
965
  const { origin } = press.marquee;
962
- const active = press.marquee.active || press.armed || _chunkZ47OPTEPcjs.distance.call(void 0, origin, p) > TAP_SLOP;
966
+ const active = press.marquee.active || press.armed || _chunkUWCMN6Q7cjs.distance.call(void 0, origin, p) > TAP_SLOP;
963
967
  if (!active) return { state, camera, effects: [] };
964
968
  return {
965
969
  state: { g: state.g, press: { ...press, last: { x: p.x, y: p.y }, marquee: { origin, active: true } } },
@@ -967,7 +971,7 @@ function reduceEditGesture(state, camera, viewport, input) {
967
971
  effects: [{ type: "marquee", from: screenToWorld(camera, viewport, origin), to: screenToWorld(camera, viewport, p) }]
968
972
  };
969
973
  }
970
- if (_optionalChain([press, 'optionalAccess', _35 => _35.resize]) && press.elementId) {
974
+ if (_optionalChain([press, 'optionalAccess', _38 => _38.resize]) && press.elementId) {
971
975
  if (Object.keys(state.g.pointers).length !== 1) return { state, camera, effects: [] };
972
976
  const { corner, from } = press.resize;
973
977
  return {
@@ -977,7 +981,7 @@ function reduceEditGesture(state, camera, viewport, input) {
977
981
  };
978
982
  }
979
983
  if (press && press.movable && Object.keys(state.g.pointers).length === 1) {
980
- const dragging = press.pointerType === "touch" ? press.armed : press.moving || _chunkZ47OPTEPcjs.distance.call(void 0,
984
+ const dragging = press.pointerType === "touch" ? press.armed : press.moving || _chunkUWCMN6Q7cjs.distance.call(void 0,
981
985
  _nullishCoalesce(state.g.origin, () => ( press.last)),
982
986
  p
983
987
  ) > TAP_SLOP;
@@ -993,7 +997,7 @@ function reduceEditGesture(state, camera, viewport, input) {
993
997
  if (press.pointerType !== "touch") return { state, camera, effects: [] };
994
998
  }
995
999
  const r2 = delegate(state.g, { type: "pointermove", pointer: sample(p) });
996
- const lostPiece = _optionalChain([press, 'optionalAccess', _36 => _36.movable]) && r2.state.moved && !press.moving;
1000
+ const lostPiece = _optionalChain([press, 'optionalAccess', _39 => _39.movable]) && r2.state.moved && !press.moving;
997
1001
  return {
998
1002
  state: { g: r2.state, press: press && lostPiece ? { ...press, movable: null } : press },
999
1003
  camera: r2.camera,
@@ -1003,19 +1007,19 @@ function reduceEditGesture(state, camera, viewport, input) {
1003
1007
  const r = delegate(state.g, { type: input.kind === "up" ? "pointerup" : "pointercancel", pointer: sample(p) });
1004
1008
  const idle = Object.keys(r.state.pointers).length === 0;
1005
1009
  const effects = [];
1006
- if (_optionalChain([press, 'optionalAccess', _37 => _37.resize]) && press.elementId) {
1010
+ if (_optionalChain([press, 'optionalAccess', _40 => _40.resize]) && press.elementId) {
1007
1011
  if (press.resize.active) {
1008
1012
  effects.push({ type: input.kind === "up" ? "resizeEnd" : "resizeCancel", elementId: press.elementId });
1009
1013
  }
1010
1014
  return { state: { g: r.state, press: idle ? null : { ...press, resize: void 0 } }, camera: r.camera, effects };
1011
1015
  }
1012
- if (_optionalChain([press, 'optionalAccess', _38 => _38.marquee, 'optionalAccess', _39 => _39.active])) {
1016
+ if (_optionalChain([press, 'optionalAccess', _41 => _41.marquee, 'optionalAccess', _42 => _42.active])) {
1013
1017
  const from = screenToWorld(camera, viewport, press.marquee.origin);
1014
1018
  const to = screenToWorld(camera, viewport, press.last);
1015
1019
  effects.push(input.kind === "up" ? { type: "marqueeEnd", from, to, additive: !!press.additive } : { type: "marqueeCancel" });
1016
1020
  return { state: { g: r.state, press: idle ? null : { ...press, marquee: void 0, canMarquee: false } }, camera: r.camera, effects };
1017
1021
  }
1018
- if (_optionalChain([press, 'optionalAccess', _40 => _40.moving]) && press.movable) effects.push({ type: "moveEnd", elementId: press.movable });
1022
+ if (_optionalChain([press, 'optionalAccess', _43 => _43.moving]) && press.movable) effects.push({ type: "moveEnd", elementId: press.movable });
1019
1023
  else if (r.tap && press) {
1020
1024
  const world = screenToWorld(camera, viewport, r.tap);
1021
1025
  effects.push(press.additive ? { type: "tap", world, elementId: press.elementId, additive: true } : { type: "tap", world, elementId: press.elementId });
@@ -1148,11 +1152,11 @@ function snapMove(moving, others, threshold, opts = {}) {
1148
1152
  const pick = (axis) => best([...alignCandidates(moving, others, axis, threshold, opts.sheet), ...gapCandidates(moving, others, axis, threshold)]);
1149
1153
  const x = pick("x");
1150
1154
  const y = pick("y");
1151
- const dx = _nullishCoalesce(_optionalChain([x, 'optionalAccess', _41 => _41.delta]), () => ( 0));
1152
- const dy = _nullishCoalesce(_optionalChain([y, 'optionalAccess', _42 => _42.delta]), () => ( 0));
1155
+ const dx = _nullishCoalesce(_optionalChain([x, 'optionalAccess', _44 => _44.delta]), () => ( 0));
1156
+ const dy = _nullishCoalesce(_optionalChain([y, 'optionalAccess', _45 => _45.delta]), () => ( 0));
1153
1157
  const moved = shiftBox(moving, dx, dy);
1154
1158
  const guides = alignmentGuides(moved, others, opts.sheet);
1155
- const gaps = [..._nullishCoalesce(_optionalChain([x, 'optionalAccess', _43 => _43.gaps, 'call', _44 => _44(moved)]), () => ( [])), ..._nullishCoalesce(_optionalChain([y, 'optionalAccess', _45 => _45.gaps, 'call', _46 => _46(moved)]), () => ( []))];
1159
+ const gaps = [..._nullishCoalesce(_optionalChain([x, 'optionalAccess', _46 => _46.gaps, 'call', _47 => _47(moved)]), () => ( [])), ..._nullishCoalesce(_optionalChain([y, 'optionalAccess', _48 => _48.gaps, 'call', _49 => _49(moved)]), () => ( []))];
1156
1160
  return { dx, dy, guides, gaps };
1157
1161
  }
1158
1162
  function snapResize(box, edges, others, threshold, opts = {}) {
@@ -1275,7 +1279,7 @@ function focusBox(layout, units, radii, ref) {
1275
1279
  maxY = Math.max(maxY, u.y + r);
1276
1280
  }
1277
1281
  for (const el of layout.elements) {
1278
- if (el.type !== "zone" || _optionalChain([el, 'access', _47 => _47.placeType, 'optionalAccess', _48 => _48.ref]) !== ref) continue;
1282
+ if (el.type !== "zone" || _optionalChain([el, 'access', _50 => _50.placeType, 'optionalAccess', _51 => _51.ref]) !== ref) continue;
1279
1283
  const b = pieceBounds(el);
1280
1284
  if (!b) continue;
1281
1285
  minX = Math.min(minX, b.minX);
@@ -1577,7 +1581,7 @@ function useImage(src) {
1577
1581
  img.onerror = null;
1578
1582
  };
1579
1583
  }, [src]);
1580
- if (!src || _optionalChain([loaded, 'optionalAccess', _49 => _49.src]) !== src) return { image: null, failed: false };
1584
+ if (!src || _optionalChain([loaded, 'optionalAccess', _52 => _52.src]) !== src) return { image: null, failed: false };
1581
1585
  return { image: loaded.image, failed: loaded.failed };
1582
1586
  }
1583
1587
 
@@ -1757,9 +1761,9 @@ function VenueCanvas(props) {
1757
1761
  _react.useEffect.call(void 0, () => {
1758
1762
  const id = pendingFocus.current;
1759
1763
  if (!id) return;
1760
- const button = _optionalChain([wrapRef, 'access', _50 => _50.current, 'optionalAccess', _51 => _51.querySelector, 'call', _52 => _52(`[data-unit-id="${id}"]`)]);
1764
+ const button = _optionalChain([wrapRef, 'access', _53 => _53.current, 'optionalAccess', _54 => _54.querySelector, 'call', _55 => _55(`[data-unit-id="${id}"]`)]);
1761
1765
  pendingFocus.current = null;
1762
- _optionalChain([(_nullishCoalesce(button, () => ( chooseRef.current))), 'optionalAccess', _53 => _53.focus, 'call', _54 => _54()]);
1766
+ _optionalChain([(_nullishCoalesce(button, () => ( chooseRef.current))), 'optionalAccess', _56 => _56.focus, 'call', _57 => _57()]);
1763
1767
  }, [visibleNodes]);
1764
1768
  const send = (input) => {
1765
1769
  const result = reduceGesture(gesture.current, camera, viewport, input);
@@ -1768,7 +1772,7 @@ function VenueCanvas(props) {
1768
1772
  if (!result.tap) return;
1769
1773
  const unitId = hitUnit({ index, camera, viewport, screenPoint: result.tap, units, radii: props.radii });
1770
1774
  if (!unitId) {
1771
- _optionalChain([props, 'access', _55 => _55.onTapEmpty, 'optionalCall', _56 => _56(result.tap)]);
1775
+ _optionalChain([props, 'access', _58 => _58.onTapEmpty, 'optionalCall', _59 => _59(result.tap)]);
1772
1776
  return;
1773
1777
  }
1774
1778
  const unit = unitById.get(unitId);
@@ -1804,12 +1808,12 @@ function VenueCanvas(props) {
1804
1808
  const node = a11yNodes.find((n) => n.id === next);
1805
1809
  if (node) props.onCameraChange({ ...camera, x: node.x, y: node.y });
1806
1810
  } else {
1807
- _optionalChain([wrapRef, 'access', _57 => _57.current, 'optionalAccess', _58 => _58.querySelector, 'call', _59 => _59(`[data-unit-id="${next}"]`), 'optionalAccess', _60 => _60.focus, 'call', _61 => _61()]);
1811
+ _optionalChain([wrapRef, 'access', _60 => _60.current, 'optionalAccess', _61 => _61.querySelector, 'call', _62 => _62(`[data-unit-id="${next}"]`), 'optionalAccess', _63 => _63.focus, 'call', _64 => _64()]);
1808
1812
  pendingFocus.current = null;
1809
1813
  }
1810
1814
  };
1811
1815
  const zoomButton = (factor) => () => props.onCameraChange(zoomAt(camera, viewport, { x: viewport.width / 2, y: viewport.height / 2 }, factor));
1812
- const tabbableId = _nullishCoalesce((activeId !== null && visible.has(activeId) ? activeId : _optionalChain([visibleNodes, 'access', _62 => _62[0], 'optionalAccess', _63 => _63.id])), () => ( null));
1816
+ const tabbableId = _nullishCoalesce((activeId !== null && visible.has(activeId) ? activeId : _optionalChain([visibleNodes, 'access', _65 => _65[0], 'optionalAccess', _66 => _66.id])), () => ( null));
1813
1817
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1814
1818
  "div",
1815
1819
  {
@@ -1875,7 +1879,7 @@ function VenueCanvas(props) {
1875
1879
  var NONE = [];
1876
1880
  var EMPTY_SET = /* @__PURE__ */ new Set();
1877
1881
  function byKind(u, seat, table, place) {
1878
- return _optionalChain([u, 'optionalAccess', _64 => _64.kind]) === "table" ? table : _optionalChain([u, 'optionalAccess', _65 => _65.kind]) === "place" ? place : seat;
1882
+ return _optionalChain([u, 'optionalAccess', _67 => _67.kind]) === "table" ? table : _optionalChain([u, 'optionalAccess', _68 => _68.kind]) === "place" ? place : seat;
1879
1883
  }
1880
1884
  function a11yLabel(u, m) {
1881
1885
  const table = format(m.summaryTable, { table: _nullishCoalesce(u.table, () => ( u.label)) });
@@ -1885,13 +1889,13 @@ function a11yLabel(u, m) {
1885
1889
  }
1886
1890
  function SeatMap(props) {
1887
1891
  const { layout, focusRef, selection, onSelectionChange } = props;
1888
- const maxSelection = _nullishCoalesce(props.maxSelection, () => ( _chunkZ47OPTEPcjs.DEFAULT_MAX_SELECTION));
1892
+ const maxSelection = _nullishCoalesce(props.maxSelection, () => ( _chunkUWCMN6Q7cjs.DEFAULT_MAX_SELECTION));
1889
1893
  const messages = _react.useMemo.call(void 0,
1890
1894
  () => mergeMessages({ ...props.messages, ...props.continueLabel ? { continueLabel: props.continueLabel } : {} }),
1891
1895
  [props.messages, props.continueLabel]
1892
1896
  );
1893
- const units = _react.useMemo.call(void 0, () => _chunkZ47OPTEPcjs.expand.call(void 0, layout), [layout]);
1894
- const index = _react.useMemo.call(void 0, () => new (0, _chunkZ47OPTEPcjs.SpatialIndex)(units), [units]);
1897
+ const units = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.expand.call(void 0, layout), [layout]);
1898
+ const index = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(units), [units]);
1895
1899
  const radii = _react.useMemo.call(void 0, () => unitRadii(layout), [layout]);
1896
1900
  const unitById = _react.useMemo.call(void 0, () => new Map(units.map((u) => [u.id, u])), [units]);
1897
1901
  const placeTypeColors = _react.useMemo.call(void 0, () => new Map(props.placeTypes.map((p) => [p.ref, p.color])), [props.placeTypes]);
@@ -1929,7 +1933,7 @@ function SeatMap(props) {
1929
1933
  [props.takenUnitIds, conflicted]
1930
1934
  );
1931
1935
  const held = _react.useMemo.call(void 0, () => new Set(_nullishCoalesce(props.heldUnitIds, () => ( NONE))), [props.heldUnitIds]);
1932
- const states = _react.useMemo.call(void 0, () => _chunkZ47OPTEPcjs.unitStates.call(void 0, units, taken, selection, held), [units, taken, selection, held]);
1936
+ const states = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.unitStates.call(void 0, units, taken, selection, held), [units, taken, selection, held]);
1933
1937
  const selectable = _react.useMemo.call(void 0, () => units.filter((u) => u.placeTypeRef === focusRef), [units, focusRef]);
1934
1938
  const a11yNodes = _react.useMemo.call(void 0,
1935
1939
  () => buildA11yNodes(
@@ -1941,7 +1945,7 @@ function SeatMap(props) {
1941
1945
  [selectable, states, placeTypeNames, messages]
1942
1946
  );
1943
1947
  const bg = layout.meta.background;
1944
- const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _66 => _66.src]), () => ( null)));
1948
+ const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _69 => _69.src]), () => ( null)));
1945
1949
  const images = _react.useMemo.call(void 0,
1946
1950
  () => new Map(bg && background.image ? [[bg.src, background.image]] : []),
1947
1951
  [bg, background.image]
@@ -1952,7 +1956,7 @@ function SeatMap(props) {
1952
1956
  const framedFor = _react.useRef.call(void 0, null);
1953
1957
  _react.useEffect.call(void 0, () => {
1954
1958
  if (viewport.width === 0 || viewport.height === 0) return;
1955
- if (_optionalChain([framedFor, 'access', _67 => _67.current, 'optionalAccess', _68 => _68.layout]) === layout && framedFor.current.focusRef === focusRef) return;
1959
+ if (_optionalChain([framedFor, 'access', _70 => _70.current, 'optionalAccess', _71 => _71.layout]) === layout && framedFor.current.focusRef === focusRef) return;
1956
1960
  framedFor.current = { layout, focusRef };
1957
1961
  const box = _nullishCoalesce(focusBox(layout, units, radii, focusRef), () => ( { minX: 0, minY: 0, maxX: layout.meta.width, maxY: layout.meta.height }));
1958
1962
  setCamera(fitBox(box, viewport, props.embedded ? 16 : 24));
@@ -1970,7 +1974,7 @@ function SeatMap(props) {
1970
1974
  const onTapEmpty = _react.useCallback.call(void 0, (screen) => {
1971
1975
  const el = elementAt(layout, screen, cameraRef.current, viewportRef.current);
1972
1976
  if (!el || el.type === "landmark") return;
1973
- switchTo(_optionalChain([el, 'access', _69 => _69.placeType, 'optionalAccess', _70 => _70.ref]) || null);
1977
+ switchTo(_optionalChain([el, 'access', _72 => _72.placeType, 'optionalAccess', _73 => _73.ref]) || null);
1974
1978
  }, [layout, switchTo]);
1975
1979
  const activateUnit = _react.useCallback.call(void 0, (unitId) => {
1976
1980
  const unit = unitById.get(unitId);
@@ -1983,7 +1987,7 @@ function SeatMap(props) {
1983
1987
  announce(messages.heldSeat, true);
1984
1988
  return;
1985
1989
  }
1986
- const result = _chunkZ47OPTEPcjs.toggleUnit.call(void 0, selection, unitId, states, maxSelection);
1990
+ const result = _chunkUWCMN6Q7cjs.toggleUnit.call(void 0, selection, unitId, states, maxSelection);
1987
1991
  if (result.rejected === "taken") {
1988
1992
  announce(byKind(unit, messages.takenSeat, messages.takenTable, messages.takenPlace), true);
1989
1993
  return;
@@ -2096,7 +2100,7 @@ function overviewBox(layout, radii) {
2096
2100
  for (const el of layout.elements) {
2097
2101
  const b = elementBounds(layout, el);
2098
2102
  if (!b) continue;
2099
- const r = el.type === "seatBlock" || el.type === "table" ? _nullishCoalesce(_optionalChain([radii, 'optionalAccess', _71 => _71.get, 'call', _72 => _72(el.id)]), () => ( 0)) : 0;
2103
+ const r = el.type === "seatBlock" || el.type === "table" ? _nullishCoalesce(_optionalChain([radii, 'optionalAccess', _74 => _74.get, 'call', _75 => _75(el.id)]), () => ( 0)) : 0;
2100
2104
  box = box ? {
2101
2105
  minX: Math.min(box.minX, b.minX - r),
2102
2106
  minY: Math.min(box.minY, b.minY - r),
@@ -2118,8 +2122,8 @@ var NO_NODES = [];
2118
2122
  function VenueOverview(props) {
2119
2123
  const { layout, placeTypes, onSelect } = props;
2120
2124
  const messages = _react.useMemo.call(void 0, () => mergeMessages(props.messages), [props.messages]);
2121
- const units = _react.useMemo.call(void 0, () => _chunkZ47OPTEPcjs.expand.call(void 0, layout), [layout]);
2122
- const index = _react.useMemo.call(void 0, () => new (0, _chunkZ47OPTEPcjs.SpatialIndex)(units), [units]);
2125
+ const units = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.expand.call(void 0, layout), [layout]);
2126
+ const index = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(units), [units]);
2123
2127
  const radii = _react.useMemo.call(void 0, () => unitRadii(layout), [layout]);
2124
2128
  const unitById = _react.useMemo.call(void 0, () => new Map(units.map((u) => [u.id, u])), [units]);
2125
2129
  const placeTypeColors = _react.useMemo.call(void 0, () => new Map(placeTypes.map((p) => [p.ref, p.color])), [placeTypes]);
@@ -2136,7 +2140,7 @@ function VenueOverview(props) {
2136
2140
  const takenIds = _nullishCoalesce(props.takenUnitIds, () => ( NONE2));
2137
2141
  const selectedIds = _nullishCoalesce(props.selectedUnitIds, () => ( NONE2));
2138
2142
  const states = _react.useMemo.call(void 0,
2139
- () => _chunkZ47OPTEPcjs.unitStates.call(void 0, units, new Set(takenIds), selectedIds, NO_HELD),
2143
+ () => _chunkUWCMN6Q7cjs.unitStates.call(void 0, units, new Set(takenIds), selectedIds, NO_HELD),
2140
2144
  [units, takenIds, selectedIds]
2141
2145
  );
2142
2146
  const hideList = props.hideList === true;
@@ -2149,12 +2153,12 @@ function VenueOverview(props) {
2149
2153
  const tap = overviewTap(ref, placeTypes);
2150
2154
  if (tap.kind === "select") onSelect(tap.ref);
2151
2155
  else if (tap.kind === "soldOut") {
2152
- const name = _nullishCoalesce(_optionalChain([placeTypes, 'access', _73 => _73.find, 'call', _74 => _74((p) => p.ref === tap.ref), 'optionalAccess', _75 => _75.label]), () => ( ""));
2156
+ const name = _nullishCoalesce(_optionalChain([placeTypes, 'access', _76 => _76.find, 'call', _77 => _77((p) => p.ref === tap.ref), 'optionalAccess', _78 => _78.label]), () => ( ""));
2153
2157
  setNotice((n) => ({ text: format(messages.soldOutNotice, { name }), seq: n.seq + 1 }));
2154
2158
  }
2155
2159
  }, [placeTypes, onSelect, messages]);
2156
2160
  const bg = layout.meta.background;
2157
- const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _76 => _76.src]), () => ( null)));
2161
+ const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _79 => _79.src]), () => ( null)));
2158
2162
  const images = _react.useMemo.call(void 0,
2159
2163
  () => new Map(bg && background.image ? [[bg.src, background.image]] : []),
2160
2164
  [bg, background.image]
@@ -2181,7 +2185,7 @@ function VenueOverview(props) {
2181
2185
  const onTapEmpty = _react.useCallback.call(void 0, (screen) => {
2182
2186
  const el = elementAt(layout, screen, cameraRef.current, viewportRef.current);
2183
2187
  if (!el || el.type === "landmark") return;
2184
- choose(_optionalChain([el, 'access', _77 => _77.placeType, 'optionalAccess', _78 => _78.ref]) || null);
2188
+ choose(_optionalChain([el, 'access', _80 => _80.placeType, 'optionalAccess', _81 => _81.ref]) || null);
2185
2189
  }, [layout, choose]);
2186
2190
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2187
2191
  "div",
@@ -2206,7 +2210,7 @@ function VenueOverview(props) {
2206
2210
  onCameraChange: setCamera,
2207
2211
  viewport,
2208
2212
  onViewportChange: setViewport,
2209
- onActivateUnit: (id) => choose(_nullishCoalesce(_optionalChain([unitById, 'access', _79 => _79.get, 'call', _80 => _80(id), 'optionalAccess', _81 => _81.placeTypeRef]), () => ( null))),
2213
+ onActivateUnit: (id) => choose(_nullishCoalesce(_optionalChain([unitById, 'access', _82 => _82.get, 'call', _83 => _83(id), 'optionalAccess', _84 => _84.placeTypeRef]), () => ( null))),
2210
2214
  onTapEmpty,
2211
2215
  messages: canvasMessages,
2212
2216
  placeTypeColors,
@@ -2301,9 +2305,9 @@ function withWorldSize(el, axis, size) {
2301
2305
  const swap = el.transform.rotation === 90 || el.transform.rotation === 270;
2302
2306
  const field = axis === "x" !== swap ? "width" : "height";
2303
2307
  if (el.type === "zone" && (_nullishCoalesce(el.curve, () => ( 0))) > 0) {
2304
- const now = _chunkZ47OPTEPcjs.zoneLocalSize.call(void 0, el);
2308
+ const now = _chunkUWCMN6Q7cjs.zoneLocalSize.call(void 0, el);
2305
2309
  if (Math.abs(now[field] - size) < 1e-6) return el;
2306
- const next = _chunkZ47OPTEPcjs.zoneWithLocalSize.call(void 0, el, field === "width" ? size : now.width, field === "height" ? size : now.height);
2310
+ const next = _chunkUWCMN6Q7cjs.zoneWithLocalSize.call(void 0, el, field === "width" ? size : now.width, field === "height" ? size : now.height);
2307
2311
  return { ...next, width: Math.round(next.width), height: Math.round(next.height) };
2308
2312
  }
2309
2313
  return el[field] === size ? el : { ...el, [field]: size };
@@ -2329,7 +2333,7 @@ function arrangeCommands(layout, ids, action) {
2329
2333
  const scale = _nullishCoalesce(model.el.scale, () => ( 1));
2330
2334
  return scaled.slice(1).flatMap(({ el }) => {
2331
2335
  const piece = el;
2332
- return (_nullishCoalesce(piece.scale, () => ( 1))) === scale ? [] : [{ type: "replaceElement", element: _chunkZ47OPTEPcjs.scalePiece.call(void 0, piece, scale) }];
2336
+ return (_nullishCoalesce(piece.scale, () => ( 1))) === scale ? [] : [{ type: "replaceElement", element: _chunkUWCMN6Q7cjs.scalePiece.call(void 0, piece, scale) }];
2333
2337
  });
2334
2338
  }
2335
2339
  const shifts = action === "distributeX" ? distributeBoxes(boxes, "x") : action === "distributeY" ? distributeBoxes(boxes, "y") : alignBoxes(boxes, action);
@@ -2486,7 +2490,7 @@ function splitUnits(units, changed) {
2486
2490
  const still = [];
2487
2491
  const moving = [];
2488
2492
  for (const u of units) (changed.has(u.elementId) ? moving : still).push(u);
2489
- return { changed, still, stillIndex: new (0, _chunkZ47OPTEPcjs.SpatialIndex)(still), moving, movingIndex: new (0, _chunkZ47OPTEPcjs.SpatialIndex)(moving) };
2493
+ return { changed, still, stillIndex: new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(still), moving, movingIndex: new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(moving) };
2490
2494
  }
2491
2495
  function boxesOf(layout) {
2492
2496
  const out = /* @__PURE__ */ new Map();
@@ -2522,21 +2526,21 @@ function previewFrame(base, split, baseBoxes, preview) {
2522
2526
  }
2523
2527
  const { element } = preview;
2524
2528
  const layout = { ...base, elements: base.elements.map((el) => el.id === element.id ? element : el) };
2525
- const own = _chunkZ47OPTEPcjs.expand.call(void 0, { ...base, elements: [element] });
2529
+ const own = _chunkUWCMN6Q7cjs.expand.call(void 0, { ...base, elements: [element] });
2526
2530
  const b = pieceBounds(element);
2527
2531
  if (b) boxes.set(element.id, b);
2528
2532
  else boxes.delete(element.id);
2529
- return { layout, units: split.still.concat(own), index: joined(split.stillIndex, new (0, _chunkZ47OPTEPcjs.SpatialIndex)(own), 0, 0), boxes };
2533
+ return { layout, units: split.still.concat(own), index: joined(split.stillIndex, new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(own), 0, 0), boxes };
2530
2534
  }
2531
2535
 
2532
2536
  // ../react/src/designer/sizing.ts
2533
2537
  var SIZE_STEP = 0.1;
2534
2538
  var KEY_RESIZE_STEP = 20;
2535
2539
  function steppedScale(scale, direction) {
2536
- return _chunkZ47OPTEPcjs.snapScale.call(void 0, scale + direction * SIZE_STEP);
2540
+ return _chunkUWCMN6Q7cjs.snapScale.call(void 0, scale + direction * SIZE_STEP);
2537
2541
  }
2538
2542
  function keyboardResize(el, corner, direction) {
2539
- if (el.type === "seatBlock" || el.type === "table") return _chunkZ47OPTEPcjs.scalePiece.call(void 0, el, steppedScale(_nullishCoalesce(el.scale, () => ( 1)), direction));
2543
+ if (el.type === "seatBlock" || el.type === "table") return _chunkUWCMN6Q7cjs.scalePiece.call(void 0, el, steppedScale(_nullishCoalesce(el.scale, () => ( 1)), direction));
2540
2544
  const box = pieceBounds(el);
2541
2545
  if (!box) return el;
2542
2546
  const from = cornerPoint(box, corner);
@@ -2570,29 +2574,29 @@ function frame(layout, viewport) {
2570
2574
  function pieceName(el, placeTypes, m) {
2571
2575
  if (el.type === "landmark") return el.name;
2572
2576
  if (el.type === "zone") {
2573
- const ref2 = _optionalChain([el, 'access', _82 => _82.placeType, 'optionalAccess', _83 => _83.ref]) || null;
2574
- return _nullishCoalesce((ref2 ? _optionalChain([placeTypes, 'access', _84 => _84.find, 'call', _85 => _85((p) => p.ref === ref2), 'optionalAccess', _86 => _86.label]) : void 0), () => ( m.unassigned));
2577
+ const ref2 = _optionalChain([el, 'access', _85 => _85.placeType, 'optionalAccess', _86 => _86.ref]) || null;
2578
+ return _nullishCoalesce((ref2 ? _optionalChain([placeTypes, 'access', _87 => _87.find, 'call', _88 => _88((p) => p.ref === ref2), 'optionalAccess', _89 => _89.label]) : void 0), () => ( m.unassigned));
2575
2579
  }
2576
2580
  const own = el.type === "seatBlock" ? (() => {
2577
- const rows = _chunkZ47OPTEPcjs.expandLabels.call(void 0, el.rowLabels, el.rows);
2581
+ const rows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, el.rowLabels, el.rows);
2578
2582
  return format(m.pieceBlockName, { from: _nullishCoalesce(rows[0], () => ( "")), to: _nullishCoalesce(rows[rows.length - 1], () => ( "")) });
2579
2583
  })() : format(m.pieceTableName, { label: el.label });
2580
- const ref = _optionalChain([el, 'access', _87 => _87.placeType, 'optionalAccess', _88 => _88.ref]) || null;
2581
- const type = ref ? _optionalChain([placeTypes, 'access', _89 => _89.find, 'call', _90 => _90((p) => p.ref === ref), 'optionalAccess', _91 => _91.label]) : void 0;
2584
+ const ref = _optionalChain([el, 'access', _90 => _90.placeType, 'optionalAccess', _91 => _91.ref]) || null;
2585
+ const type = ref ? _optionalChain([placeTypes, 'access', _92 => _92.find, 'call', _93 => _93((p) => p.ref === ref), 'optionalAccess', _94 => _94.label]) : void 0;
2582
2586
  return `${own}, ${_nullishCoalesce(type, () => ( m.unassigned))}`;
2583
2587
  }
2584
2588
  function fullBlock(layout, id) {
2585
2589
  const el = id ? layout.elements.find((e) => e.id === id) : void 0;
2586
- return _optionalChain([el, 'optionalAccess', _92 => _92.type]) === "seatBlock" ? _chunkZ47OPTEPcjs.expandSeatBlock.call(void 0, { ...el, removed: [] }) : [];
2590
+ return _optionalChain([el, 'optionalAccess', _95 => _95.type]) === "seatBlock" ? _chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, { ...el, removed: [] }) : [];
2587
2591
  }
2588
2592
  var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ designer, placeTypes, lockedUnitIds, messages, frameKey, onPieceTap, backgroundImage = null, compact = false, overlay, theme }, ref) {
2589
2593
  const { ui } = designer;
2590
2594
  const [preview, setPreview] = _react.useState.call(void 0, null);
2591
2595
  const resizingRef = _react.useRef.call(void 0, null);
2592
- const resizing = _optionalChain([preview, 'optionalAccess', _93 => _93.kind]) === "replace" ? preview.element : null;
2596
+ const resizing = _optionalChain([preview, 'optionalAccess', _96 => _96.kind]) === "replace" ? preview.element : null;
2593
2597
  const base = designer.layout;
2594
- const baseUnits = _react.useMemo.call(void 0, () => _chunkZ47OPTEPcjs.expand.call(void 0, base), [base]);
2595
- const baseIndex = _react.useMemo.call(void 0, () => new (0, _chunkZ47OPTEPcjs.SpatialIndex)(baseUnits), [baseUnits]);
2598
+ const baseUnits = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.expand.call(void 0, base), [base]);
2599
+ const baseIndex = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(baseUnits), [baseUnits]);
2596
2600
  const baseBoxes = _react.useMemo.call(void 0, () => boxesOf(base), [base]);
2597
2601
  const changedKey = preview ? changedIds(preview).join("\0") : "";
2598
2602
  const split = _react.useMemo.call(void 0, () => changedKey ? splitUnits(baseUnits, new Set(changedKey.split("\0"))) : null, [baseUnits, changedKey]);
@@ -2631,7 +2635,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2631
2635
  );
2632
2636
  const placeTypeColors = _react.useMemo.call(void 0, () => new Map(placeTypes.map((p) => [p.ref, p.color])), [placeTypes]);
2633
2637
  const seatEditUnits = _react.useMemo.call(void 0, () => fullBlock(base, ui.seatEditId), [base, ui.seatEditId]);
2634
- const seatEditIndex = _react.useMemo.call(void 0, () => new (0, _chunkZ47OPTEPcjs.SpatialIndex)(seatEditUnits), [seatEditUnits]);
2638
+ const seatEditIndex = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(seatEditUnits), [seatEditUnits]);
2635
2639
  const seatEditById = _react.useMemo.call(void 0, () => new Map(seatEditUnits.map((u) => [u.id, u])), [seatEditUnits]);
2636
2640
  const elementBoxes = _react.useMemo.call(void 0,
2637
2641
  () => layout.elements.flatMap((el) => {
@@ -2708,7 +2712,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2708
2712
  [layout, units, index, camera, viewport, palette, placeTypeColors, lockedUnitIds, messages.unassigned]
2709
2713
  );
2710
2714
  _react.useEffect.call(void 0, () => {
2711
- const ctx = _optionalChain([canvasRef, 'access', _94 => _94.current, 'optionalAccess', _95 => _95.getContext, 'call', _96 => _96("2d")]);
2715
+ const ctx = _optionalChain([canvasRef, 'access', _97 => _97.current, 'optionalAccess', _98 => _98.getContext, 'call', _99 => _99("2d")]);
2712
2716
  if (!ctx || viewport.width === 0) return;
2713
2717
  renderScene(scene, { ctx, camera, viewport, dpr, images });
2714
2718
  ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
@@ -2782,7 +2786,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2782
2786
  }, [scene, camera, viewport, dpr, images, bg, ui.backgroundEditing, ui.selection, ui.seatEditId, boxes, radii, palette, seatEditUnits, removed, lifted, hints, marquee]);
2783
2787
  _react.useImperativeHandle.call(void 0, ref, () => ({
2784
2788
  clientToWorld: (clientX, clientY) => {
2785
- const r = _optionalChain([stageRef, 'access', _97 => _97.current, 'optionalAccess', _98 => _98.getBoundingClientRect, 'call', _99 => _99()]);
2789
+ const r = _optionalChain([stageRef, 'access', _100 => _100.current, 'optionalAccess', _101 => _101.getBoundingClientRect, 'call', _102 => _102()]);
2786
2790
  if (!r || clientX < r.left || clientX > r.right || clientY < r.top || clientY > r.bottom) return null;
2787
2791
  const { camera: c, viewport: v } = latest.current;
2788
2792
  return screenToWorld(c, v, { x: clientX - r.left, y: clientY - r.top });
@@ -2860,7 +2864,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2860
2864
  if (fx.elementId) d.dispatchUi({ type: "toggleSelect", id: fx.elementId });
2861
2865
  } else {
2862
2866
  d.dispatchUi({ type: "select", id: fx.elementId });
2863
- if (fx.elementId) _optionalChain([onPieceTapRef, 'access', _100 => _100.current, 'optionalCall', _101 => _101(fx.elementId)]);
2867
+ if (fx.elementId) _optionalChain([onPieceTapRef, 'access', _103 => _103.current, 'optionalCall', _104 => _104(fx.elementId)]);
2864
2868
  }
2865
2869
  };
2866
2870
  const sheetBox = (l) => ({ minX: 0, minY: 0, maxX: l.meta.width, maxY: l.meta.height });
@@ -2878,7 +2882,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2878
2882
  }
2879
2883
  current.raw = { x: current.raw.x + dx, y: current.raw.y + dy };
2880
2884
  const snap = altHeld.current ? null : snapMove(shiftBox(current.start, current.raw.x, current.raw.y), current.others, SNAP_PX / zoom, { sheet: sheetBox(d.layout) });
2881
- const target = { x: current.raw.x + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _102 => _102.dx]), () => ( 0))), y: current.raw.y + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _103 => _103.dy]), () => ( 0))) };
2885
+ const target = { x: current.raw.x + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _105 => _105.dx]), () => ( 0))), y: current.raw.y + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _106 => _106.dy]), () => ( 0))) };
2882
2886
  if (target.x !== current.applied.x || target.y !== current.applied.y) {
2883
2887
  current.applied = target;
2884
2888
  setPreview({ kind: "move", ids: current.ids, dx: target.x, dy: target.y });
@@ -2900,7 +2904,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2900
2904
  if (isScaled2(next) && isScaled2(start)) {
2901
2905
  const same = d.layout.elements.filter((el) => el.id !== start.id && el.type === next.type);
2902
2906
  const match = snapScaleTo(_nullishCoalesce(next.scale, () => ( 1)), same.map((el) => _nullishCoalesce(el.scale, () => ( 1))));
2903
- const sized2 = match !== null && match !== (_nullishCoalesce(next.scale, () => ( 1))) ? _chunkZ47OPTEPcjs.scalePiece.call(void 0, start, match) : next;
2907
+ const sized2 = match !== null && match !== (_nullishCoalesce(next.scale, () => ( 1))) ? _chunkUWCMN6Q7cjs.scalePiece.call(void 0, start, match) : next;
2904
2908
  const now = _nullishCoalesce(sized2.scale, () => ( 1));
2905
2909
  const matches = same.filter((el) => (_nullishCoalesce(el.scale, () => ( 1))) === now).flatMap((el) => _nullishCoalesce(pieceBounds(el), () => ( [])));
2906
2910
  setHints(matches.length > 0 ? { guides: [], gaps: [], matches } : null);
@@ -2926,7 +2930,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2926
2930
  const nowMarquee = isMarqueeArmed(r.state);
2927
2931
  if (nowMarquee && !marqueeArmed.current) {
2928
2932
  try {
2929
- _optionalChain([navigator, 'access', _104 => _104.vibrate, 'optionalCall', _105 => _105(10)]);
2933
+ _optionalChain([navigator, 'access', _107 => _107.vibrate, 'optionalCall', _108 => _108(10)]);
2930
2934
  } catch (e2) {
2931
2935
  }
2932
2936
  }
@@ -2935,7 +2939,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2935
2939
  if (nowLifted !== liftedRef.current) {
2936
2940
  if (nowLifted) {
2937
2941
  try {
2938
- _optionalChain([navigator, 'access', _106 => _106.vibrate, 'optionalCall', _107 => _107(10)]);
2942
+ _optionalChain([navigator, 'access', _109 => _109.vibrate, 'optionalCall', _110 => _110(10)]);
2939
2943
  } catch (e3) {
2940
2944
  }
2941
2945
  }
@@ -3007,7 +3011,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
3007
3011
  }
3008
3012
  const d = latest.current.designer;
3009
3013
  const { camera: c, viewport: v } = latest.current;
3010
- const hit = kind === "down" ? _nullishCoalesce(_nullishCoalesce(backgroundAt(d.layout.meta.background, screenToWorld(c, v, p), d.ui.backgroundEditing), () => ( _optionalChain([elementAt, 'call', _108 => _108(d.layout, p, c, v), 'optionalAccess', _109 => _109.id]))), () => ( null)) : null;
3014
+ const hit = kind === "down" ? _nullishCoalesce(_nullishCoalesce(backgroundAt(d.layout.meta.background, screenToWorld(c, v, p), d.ui.backgroundEditing), () => ( _optionalChain([elementAt, 'call', _111 => _111(d.layout, p, c, v, { radii, slopPx: EDIT_HIT_SLOP_PX }), 'optionalAccess', _112 => _112.id]))), () => ( null)) : null;
3011
3015
  const elementLocked = d.ui.armed !== null || hit !== null && hit === d.ui.seatEditId;
3012
3016
  if (kind !== "down") {
3013
3017
  feed({ kind, p, hitElementId: hit, elementLocked });
@@ -3068,7 +3072,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
3068
3072
  const id = pendingFocus.current;
3069
3073
  if (!id) return;
3070
3074
  pendingFocus.current = null;
3071
- _optionalChain([stageRef, 'access', _110 => _110.current, 'optionalAccess', _111 => _111.querySelector, 'call', _112 => _112(`[data-element-id="${id}"]`), 'optionalAccess', _113 => _113.focus, 'call', _114 => _114()]);
3075
+ _optionalChain([stageRef, 'access', _113 => _113.current, 'optionalAccess', _114 => _114.querySelector, 'call', _115 => _115(`[data-element-id="${id}"]`), 'optionalAccess', _116 => _116.focus, 'call', _117 => _117()]);
3072
3076
  });
3073
3077
  const armedName = ui.armed ? armedLabel(ui.armed, messages) : null;
3074
3078
  const selectedEl = ui.selectedId ? layout.elements.find((e) => e.id === ui.selectedId) : void 0;
@@ -3157,7 +3161,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
3157
3161
  return;
3158
3162
  }
3159
3163
  designer.dispatchUi({ type: "select", id: el.id });
3160
- if (plain) _optionalChain([onPieceTap, 'optionalCall', _115 => _115(el.id)]);
3164
+ if (plain) _optionalChain([onPieceTap, 'optionalCall', _118 => _118(el.id)]);
3161
3165
  },
3162
3166
  children: pieceName(el, placeTypes, messages)
3163
3167
  },
@@ -3213,7 +3217,7 @@ function armedLabel(kind, m) {
3213
3217
  if (kind === "roundTable") return m.pieceRoundTable;
3214
3218
  if (kind === "rectTable") return m.pieceRectTable;
3215
3219
  if (kind === "zone") return m.pieceZone;
3216
- return _nullishCoalesce(_optionalChain([_chunkZ47OPTEPcjs.landmarkById.call(void 0, kind.slice("landmark:".length)), 'optionalAccess', _116 => _116.name]), () => ( kind));
3220
+ return _nullishCoalesce(_optionalChain([_chunkUWCMN6Q7cjs.landmarkById.call(void 0, kind.slice("landmark:".length)), 'optionalAccess', _119 => _119.name]), () => ( kind));
3217
3221
  }
3218
3222
  function drawHints(ctx, hints, camera, viewport, color) {
3219
3223
  const at = (x, y) => worldToScreen(camera, viewport, { x, y });
@@ -3352,7 +3356,7 @@ function anchorPanel(piece, panel, viewport, margin = 12) {
3352
3356
  return docked;
3353
3357
  }
3354
3358
  function range(rule, count) {
3355
- const labels = _chunkZ47OPTEPcjs.labelSequence.call(void 0, rule, count);
3359
+ const labels = _chunkUWCMN6Q7cjs.labelSequence.call(void 0, rule, count);
3356
3360
  return { from: _nullishCoalesce(labels[0], () => ( "")), to: _nullishCoalesce(labels[labels.length - 1], () => ( "")) };
3357
3361
  }
3358
3362
  function blockRangeText(block, templates) {
@@ -3363,24 +3367,24 @@ function blockRangeText(block, templates) {
3363
3367
  function reshapeBlock(block, patch) {
3364
3368
  const next = { ...block, ...patch };
3365
3369
  if (block.removed.length === 0) return next;
3366
- const oldRows = _chunkZ47OPTEPcjs.expandLabels.call(void 0, block.rowLabels, block.rows);
3367
- const oldSeats = _chunkZ47OPTEPcjs.expandLabels.call(void 0, block.seatLabels, block.cols);
3368
- const newRows = _chunkZ47OPTEPcjs.expandLabels.call(void 0, next.rowLabels, next.rows);
3369
- const newSeats = _chunkZ47OPTEPcjs.expandLabels.call(void 0, next.seatLabels, next.cols);
3370
+ const oldRows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, block.rowLabels, block.rows);
3371
+ const oldSeats = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, block.seatLabels, block.cols);
3372
+ const newRows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, next.rowLabels, next.rows);
3373
+ const newSeats = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, next.seatLabels, next.cols);
3370
3374
  const removed = [];
3371
3375
  for (const id of block.removed) {
3372
- const [, row, seat] = _chunkZ47OPTEPcjs.parseUnitId.call(void 0, id);
3376
+ const [, row, seat] = _chunkUWCMN6Q7cjs.parseUnitId.call(void 0, id);
3373
3377
  const r = row === void 0 ? -1 : oldRows.indexOf(row);
3374
3378
  const c = seat === void 0 ? -1 : oldSeats.indexOf(seat);
3375
3379
  if (r < 0 || c < 0 || r >= next.rows || c >= next.cols) continue;
3376
- removed.push(_chunkZ47OPTEPcjs.seatUnitId.call(void 0, block.id, newRows[r], newSeats[c]));
3380
+ removed.push(_chunkUWCMN6Q7cjs.seatUnitId.call(void 0, block.id, newRows[r], newSeats[c]));
3377
3381
  }
3378
3382
  return { ...next, removed };
3379
3383
  }
3380
3384
  function labelStart(kind, raw, alphabet) {
3381
3385
  const start = kind === "letters" ? raw.trim().toUpperCase() : raw.trim();
3382
3386
  const rule = kind === "letters" && alphabet ? { kind, start, direction: "ltr", alphabet } : { kind, start, direction: "ltr" };
3383
- return _chunkZ47OPTEPcjs.labelRuleSchema.safeParse(rule).success ? start : null;
3387
+ return _chunkUWCMN6Q7cjs.labelRuleSchema.safeParse(rule).success ? start : null;
3384
3388
  }
3385
3389
  function switchLabelKind(rule, kind) {
3386
3390
  if (rule.kind === kind) return rule;
@@ -3399,7 +3403,7 @@ function setLabelAlphabet(rule, alphabet) {
3399
3403
  if (rule.kind !== "letters") return rule;
3400
3404
  const { alphabet: _old, ...rest } = rule;
3401
3405
  if (alphabet === "es") return { ...rest, alphabet };
3402
- const skip = _optionalChain([rest, 'access', _117 => _117.skip, 'optionalAccess', _118 => _118.filter, 'call', _119 => _119((s) => !/ñ/i.test(s))]);
3406
+ const skip = _optionalChain([rest, 'access', _120 => _120.skip, 'optionalAccess', _121 => _121.filter, 'call', _122 => _122((s) => !/ñ/i.test(s))]);
3403
3407
  const { skip: _skip, ...noSkip } = rest;
3404
3408
  return {
3405
3409
  ...skip && skip.length > 0 ? { ...noSkip, skip } : noSkip,
@@ -3425,10 +3429,10 @@ function withSkip(rule, skip) {
3425
3429
  var plural = (n, one, many) => n === 1 ? one : format(many, { n });
3426
3430
  function placeTypeStatus(option, layout, summary, m) {
3427
3431
  const s = summary.byRef[option.ref];
3428
- const pieces = layout.elements.filter((e) => e.type !== "landmark" && (_optionalChain([e, 'access', _120 => _120.placeType, 'optionalAccess', _121 => _121.ref]) || null) === option.ref).length;
3429
- const units = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _122 => _122.units]), () => ( 0));
3432
+ const pieces = layout.elements.filter((e) => e.type !== "landmark" && (_optionalChain([e, 'access', _123 => _123.placeType, 'optionalAccess', _124 => _124.ref]) || null) === option.ref).length;
3433
+ const units = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _125 => _125.units]), () => ( 0));
3430
3434
  if (option.accepts === "zone") {
3431
- const zones = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _123 => _123.zones]), () => ( 0));
3435
+ const zones = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _126 => _126.zones]), () => ( 0));
3432
3436
  return {
3433
3437
  units,
3434
3438
  pieces,
@@ -3450,10 +3454,10 @@ function joinNames(names, m) {
3450
3454
  return format(m.summaryAnd, { a: names.slice(0, -1).join(", "), b: names[names.length - 1] });
3451
3455
  }
3452
3456
  function missingPlaceTypes(placeTypes, summary) {
3453
- return placeTypes.filter((o) => o.accepts !== "zone" && (_nullishCoalesce(_optionalChain([summary, 'access', _124 => _124.byRef, 'access', _125 => _125[o.ref], 'optionalAccess', _126 => _126.units]), () => ( 0))) === 0);
3457
+ return placeTypes.filter((o) => o.accepts !== "zone" && (_nullishCoalesce(_optionalChain([summary, 'access', _127 => _127.byRef, 'access', _128 => _128[o.ref], 'optionalAccess', _129 => _129.units]), () => ( 0))) === 0);
3454
3458
  }
3455
3459
  function unitsOnSale(placeTypes, summary) {
3456
- return placeTypes.reduce((n, o) => o.accepts === "zone" ? n : n + (_nullishCoalesce(_optionalChain([summary, 'access', _127 => _127.byRef, 'access', _128 => _128[o.ref], 'optionalAccess', _129 => _129.units]), () => ( 0))), 0);
3460
+ return placeTypes.reduce((n, o) => o.accepts === "zone" ? n : n + (_nullishCoalesce(_optionalChain([summary, 'access', _130 => _130.byRef, 'access', _131 => _131[o.ref], 'optionalAccess', _132 => _132.units]), () => ( 0))), 0);
3457
3461
  }
3458
3462
  function numberingCounts(block, m) {
3459
3463
  const removed = block.removed.length;
@@ -3485,9 +3489,9 @@ function FloatingPanel(props) {
3485
3489
  ref,
3486
3490
  className: "vk-d-float",
3487
3491
  "aria-labelledby": props.labelledBy,
3488
- "data-docked": _optionalChain([pos, 'optionalAccess', _130 => _130.docked]) || void 0,
3492
+ "data-docked": _optionalChain([pos, 'optionalAccess', _133 => _133.docked]) || void 0,
3489
3493
  "data-testid": "piece-panel",
3490
- style: { width, left: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _131 => _131.left]), () => ( 0)), top: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _132 => _132.top]), () => ( 0)), visibility: pos ? "visible" : "hidden" },
3494
+ style: { width, left: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _134 => _134.left]), () => ( 0)), top: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _135 => _135.top]), () => ( 0)), visibility: pos ? "visible" : "hidden" },
3491
3495
  children: props.children
3492
3496
  }
3493
3497
  );
@@ -3495,29 +3499,29 @@ function FloatingPanel(props) {
3495
3499
 
3496
3500
  // ../react/src/designer/capacity.ts
3497
3501
  function capacityRejections(before, after, placeTypes) {
3498
- const over = _chunkZ47OPTEPcjs.capacityViolations.call(void 0, before, after, placeTypes);
3502
+ const over = _chunkUWCMN6Q7cjs.capacityViolations.call(void 0, before, after, placeTypes);
3499
3503
  if (over.length === 0) return [];
3500
- const was = _chunkZ47OPTEPcjs.summarize.call(void 0, before).byRef;
3501
- return over.map((v) => ({ ref: v.ref, label: v.label, capacity: v.capacity, placed: _nullishCoalesce(_optionalChain([was, 'access', _133 => _133[v.ref], 'optionalAccess', _134 => _134.units]), () => ( 0)) }));
3504
+ const was = _chunkUWCMN6Q7cjs.summarize.call(void 0, before).byRef;
3505
+ return over.map((v) => ({ ref: v.ref, label: v.label, capacity: v.capacity, placed: _nullishCoalesce(_optionalChain([was, 'access', _136 => _136[v.ref], 'optionalAccess', _137 => _137.units]), () => ( 0)) }));
3502
3506
  }
3503
3507
  function placedUnits(option, summary) {
3504
- return _nullishCoalesce(_optionalChain([summary, 'access', _135 => _135.byRef, 'access', _136 => _136[option.ref], 'optionalAccess', _137 => _137.units]), () => ( 0));
3508
+ return _nullishCoalesce(_optionalChain([summary, 'access', _138 => _138.byRef, 'access', _139 => _139[option.ref], 'optionalAccess', _140 => _140.units]), () => ( 0));
3505
3509
  }
3506
3510
  function nextPiece(option, placed) {
3507
3511
  if (option.accepts === "zone") return { units: 1 };
3508
- if (option.accepts === "seats") return { units: _chunkZ47OPTEPcjs.nextBlockUnits.call(void 0, option, placed) };
3509
- const capacity = _chunkZ47OPTEPcjs.placeTypeCapacity.call(void 0, option);
3512
+ if (option.accepts === "seats") return { units: _chunkUWCMN6Q7cjs.nextBlockUnits.call(void 0, option, placed) };
3513
+ const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3510
3514
  const left = capacity === null ? Infinity : Math.max(0, capacity - placed);
3511
3515
  if (option.accepts === "tableWhole") return { units: Math.min(1, left) };
3512
- return { units: Math.min(_chunkZ47OPTEPcjs.DEFAULT_TABLE_PLACES, left) };
3516
+ return { units: Math.min(_chunkUWCMN6Q7cjs.DEFAULT_TABLE_PLACES, left) };
3513
3517
  }
3514
3518
  function capacityText(option, summary, m) {
3515
- const capacity = _chunkZ47OPTEPcjs.placeTypeCapacity.call(void 0, option);
3519
+ const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3516
3520
  if (capacity === null || option.accepts === "zone") return null;
3517
3521
  return format(m.capacityCount, { placed: placedUnits(option, summary), capacity });
3518
3522
  }
3519
3523
  function capacityFullText(option, summary, m) {
3520
- const capacity = _chunkZ47OPTEPcjs.placeTypeCapacity.call(void 0, option);
3524
+ const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3521
3525
  if (capacity === null || option.accepts === "zone") return null;
3522
3526
  const placed = placedUnits(option, summary);
3523
3527
  if (placed > capacity) return format(m.capacityOver, { over: placed - capacity, capacity, name: option.label });
@@ -3525,20 +3529,20 @@ function capacityFullText(option, summary, m) {
3525
3529
  return format(m.capacityFull, { capacity, name: option.label });
3526
3530
  }
3527
3531
  function overCapacity(option, summary) {
3528
- const capacity = _chunkZ47OPTEPcjs.placeTypeCapacity.call(void 0, option);
3532
+ const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3529
3533
  if (capacity === null || option.accepts === "zone") return 0;
3530
3534
  return Math.max(0, placedUnits(option, summary) - capacity);
3531
3535
  }
3532
3536
  function trimPlan(layout, option, locked) {
3533
- let left = overCapacity(option, _chunkZ47OPTEPcjs.summarize.call(void 0, layout));
3537
+ let left = overCapacity(option, _chunkUWCMN6Q7cjs.summarize.call(void 0, layout));
3534
3538
  if (left === 0) return null;
3535
3539
  const commands = [];
3536
3540
  let removed = 0;
3537
3541
  for (let i = layout.elements.length - 1; i >= 0 && left > 0; i--) {
3538
3542
  const el = layout.elements[i];
3539
- if (el.type === "landmark" || el.type === "zone" || (_optionalChain([el, 'access', _138 => _138.placeType, 'optionalAccess', _139 => _139.ref]) || null) !== option.ref) continue;
3543
+ if (el.type === "landmark" || el.type === "zone" || (_optionalChain([el, 'access', _141 => _141.placeType, 'optionalAccess', _142 => _142.ref]) || null) !== option.ref) continue;
3540
3544
  if (el.type === "seatBlock") {
3541
- const units = _chunkZ47OPTEPcjs.expandSeatBlock.call(void 0, el);
3545
+ const units = _chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, el);
3542
3546
  const take = units.filter((u) => !locked.has(u.id)).sort((a, b) => b.rowIndex - a.rowIndex || b.colIndex - a.colIndex).slice(0, left);
3543
3547
  if (take.length === 0) continue;
3544
3548
  commands.push(
@@ -3553,7 +3557,7 @@ function trimPlan(layout, option, locked) {
3553
3557
  left--;
3554
3558
  } else {
3555
3559
  let lastLocked = 0;
3556
- for (let n = 1; n <= el.places; n++) if (locked.has(_chunkZ47OPTEPcjs.placeUnitId.call(void 0, el.id, n))) lastLocked = n;
3560
+ for (let n = 1; n <= el.places; n++) if (locked.has(_chunkUWCMN6Q7cjs.placeUnitId.call(void 0, el.id, n))) lastLocked = n;
3557
3561
  if (lastLocked === 0 && left >= el.places) {
3558
3562
  commands.push({ type: "removeElement", id: el.id });
3559
3563
  removed += el.places;
@@ -3574,7 +3578,7 @@ function trimPlan(layout, option, locked) {
3574
3578
  function piecesByRef(layout) {
3575
3579
  const out = {};
3576
3580
  for (const el of layout.elements) {
3577
- const ref = el.type === "landmark" ? "" : _optionalChain([el, 'access', _140 => _140.placeType, 'optionalAccess', _141 => _141.ref]) || "";
3581
+ const ref = el.type === "landmark" ? "" : _optionalChain([el, 'access', _143 => _143.placeType, 'optionalAccess', _144 => _144.ref]) || "";
3578
3582
  if (ref) out[ref] = (_nullishCoalesce(out[ref], () => ( 0))) + 1;
3579
3583
  }
3580
3584
  return out;
@@ -3587,8 +3591,8 @@ function hostReads(placeTypes, summary, pieces, m) {
3587
3591
  return o ? nextPiece(o, placedUnits(o, summary)).units : 0;
3588
3592
  },
3589
3593
  placed: (ref) => ({
3590
- units: _nullishCoalesce(_optionalChain([summary, 'access', _142 => _142.byRef, 'access', _143 => _143[ref], 'optionalAccess', _144 => _144.units]), () => ( 0)),
3591
- zones: _nullishCoalesce(_optionalChain([summary, 'access', _145 => _145.byRef, 'access', _146 => _146[ref], 'optionalAccess', _147 => _147.zones]), () => ( 0)),
3594
+ units: _nullishCoalesce(_optionalChain([summary, 'access', _145 => _145.byRef, 'access', _146 => _146[ref], 'optionalAccess', _147 => _147.units]), () => ( 0)),
3595
+ zones: _nullishCoalesce(_optionalChain([summary, 'access', _148 => _148.byRef, 'access', _149 => _149[ref], 'optionalAccess', _150 => _150.zones]), () => ( 0)),
3592
3596
  pieces: _nullishCoalesce(pieces[ref], () => ( 0))
3593
3597
  }),
3594
3598
  capacityText: (ref) => {
@@ -3627,17 +3631,17 @@ function syncPlaceTypes(layout, previous, placeTypes) {
3627
3631
  const before = new Set(previous.map((o) => o.ref));
3628
3632
  let changed = false;
3629
3633
  const elements = layout.elements.map((el) => {
3630
- if (el.type === "landmark" || !_optionalChain([el, 'access', _148 => _148.placeType, 'optionalAccess', _149 => _149.ref])) return el;
3634
+ if (el.type === "landmark" || !_optionalChain([el, 'access', _151 => _151.placeType, 'optionalAccess', _152 => _152.ref])) return el;
3631
3635
  const option = byRef.get(el.placeType.ref);
3632
3636
  if (!option && !before.has(el.placeType.ref)) return el;
3633
- if (!option || !_chunkZ47OPTEPcjs.canAssign.call(void 0, el, option)) {
3637
+ if (!option || !_chunkUWCMN6Q7cjs.canAssign.call(void 0, el, option)) {
3634
3638
  changed = true;
3635
3639
  return { ...el, placeType: { ref: "", name: el.placeType.name } };
3636
3640
  }
3637
3641
  const mode = option.accepts === "tablePerPlace" ? "perPlace" : "whole";
3638
3642
  if (el.placeType.name === option.label && (el.type !== "table" || el.mode === mode)) return el;
3639
3643
  changed = true;
3640
- return _chunkZ47OPTEPcjs.assignPlaceType.call(void 0, el, option);
3644
+ return _chunkUWCMN6Q7cjs.assignPlaceType.call(void 0, el, option);
3641
3645
  });
3642
3646
  return changed ? { ...layout, elements } : layout;
3643
3647
  }
@@ -3791,7 +3795,7 @@ function LandmarkPicker({ messages: m, onPick }) {
3791
3795
  const groups = LANDMARK_GROUPS.map(({ group, key }) => ({
3792
3796
  group,
3793
3797
  title: m[key],
3794
- items: _chunkZ47OPTEPcjs.landmarks.filter((l) => l.group === group && (q === "" || fold(l.name).includes(q)))
3798
+ items: _chunkUWCMN6Q7cjs.landmarks.filter((l) => l.group === group && (q === "" || fold(l.name).includes(q)))
3795
3799
  })).filter((g) => g.items.length > 0);
3796
3800
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-landmarks", children: [
3797
3801
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "vk-d-search", htmlFor: searchId, children: [
@@ -4320,13 +4324,13 @@ function SizeStepper(props) {
4320
4324
  const { piece, messages: m } = props;
4321
4325
  const scale = _nullishCoalesce(piece.scale, () => ( 1));
4322
4326
  const id = _react.useId.call(void 0, );
4323
- const set = (direction) => props.onRun({ type: "replaceElement", element: _chunkZ47OPTEPcjs.scalePiece.call(void 0, piece, steppedScale(scale, direction)) });
4327
+ const set = (direction) => props.onRun({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.scalePiece.call(void 0, piece, steppedScale(scale, direction)) });
4324
4328
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-field", role: "group", "aria-labelledby": id, children: [
4325
4329
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id, children: m.pieceSize }),
4326
4330
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-stepper", children: [
4327
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeLess, disabled: scale <= _chunkZ47OPTEPcjs.MIN_SCALE, onClick: () => set(-1), children: "\u2212" }),
4331
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeLess, disabled: scale <= _chunkUWCMN6Q7cjs.MIN_SCALE, onClick: () => set(-1), children: "\u2212" }),
4328
4332
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "output", { className: "vk-d-stepper-value", "aria-live": "polite", children: format(m.pieceSizeValue, { n: Math.round(scale * 100) }) }),
4329
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeMore, disabled: scale >= _chunkZ47OPTEPcjs.MAX_SCALE, onClick: () => set(1), children: "+" })
4333
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeMore, disabled: scale >= _chunkUWCMN6Q7cjs.MAX_SCALE, onClick: () => set(1), children: "+" })
4330
4334
  ] })
4331
4335
  ] });
4332
4336
  }
@@ -4371,12 +4375,12 @@ var ZONE_MAX = 4e3;
4371
4375
  var ZONE_STEP = 20;
4372
4376
  function pieceHeading(el, placeTypes, m) {
4373
4377
  if (el.type === "landmark") return { color: null, text: el.name };
4374
- const ref = _optionalChain([el, 'access', _150 => _150.placeType, 'optionalAccess', _151 => _151.ref]) || null;
4378
+ const ref = _optionalChain([el, 'access', _153 => _153.placeType, 'optionalAccess', _154 => _154.ref]) || null;
4375
4379
  const option = ref ? placeTypes.find((p) => p.ref === ref) : void 0;
4376
- const name = _nullishCoalesce(_optionalChain([option, 'optionalAccess', _152 => _152.label]), () => ( m.unassigned));
4377
- if (el.type === "zone") return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _153 => _153.color]), () => ( null)), text: name };
4378
- const count = el.type === "seatBlock" ? plural2(_chunkZ47OPTEPcjs.expandSeatBlock.call(void 0, el).length, m.countSeat, m.countSeats) : el.mode === "whole" ? plural2(1, m.countTable, m.countTables) : plural2(el.places, m.countPlace, m.countPlaces);
4379
- return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _154 => _154.color]), () => ( null)), text: `${name} \xB7 ${count}` };
4380
+ const name = _nullishCoalesce(_optionalChain([option, 'optionalAccess', _155 => _155.label]), () => ( m.unassigned));
4381
+ if (el.type === "zone") return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _156 => _156.color]), () => ( null)), text: name };
4382
+ const count = el.type === "seatBlock" ? plural2(_chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, el).length, m.countSeat, m.countSeats) : el.mode === "whole" ? plural2(1, m.countTable, m.countTables) : plural2(el.places, m.countPlace, m.countPlaces);
4383
+ return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _157 => _157.color]), () => ( null)), text: `${name} \xB7 ${count}` };
4380
4384
  }
4381
4385
  function PieceInspector(props) {
4382
4386
  const { element: el, messages: m } = props;
@@ -4394,8 +4398,8 @@ function PieceInspector(props) {
4394
4398
  setLabelError(null);
4395
4399
  patch("label", label, `label:${el.id}`);
4396
4400
  };
4397
- const assigned = el.type !== "landmark" && !!_optionalChain([el, 'access', _155 => _155.placeType, 'optionalAccess', _156 => _156.ref]);
4398
- const options = el.type === "landmark" ? [] : props.placeTypes.filter((o) => _chunkZ47OPTEPcjs.canAssign.call(void 0, el, o));
4401
+ const assigned = el.type !== "landmark" && !!_optionalChain([el, 'access', _158 => _158.placeType, 'optionalAccess', _159 => _159.ref]);
4402
+ const options = el.type === "landmark" ? [] : props.placeTypes.filter((o) => _chunkUWCMN6Q7cjs.canAssign.call(void 0, el, o));
4399
4403
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-inspector", children: [
4400
4404
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-insp-head", children: [
4401
4405
  el.type !== "landmark" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-dot", "aria-hidden": "true", style: { ["--vk-type"]: _nullishCoalesce(heading.color, () => ( "var(--vk-unassigned, #9ca3af)")) } }),
@@ -4449,7 +4453,7 @@ function PieceInspector(props) {
4449
4453
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SizeStepper, { piece: el, messages: m, onRun: props.onRun })
4450
4454
  ] }),
4451
4455
  el.type === "table" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4452
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextField, { label: m.tableNumber, maxLength: _chunkZ47OPTEPcjs.MAX_TABLE_LABEL_LENGTH, value: el.label, onCommit: tableLabelCommit }),
4456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextField, { label: m.tableNumber, maxLength: _chunkUWCMN6Q7cjs.MAX_TABLE_LABEL_LENGTH, value: el.label, onCommit: tableLabelCommit }),
4453
4457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4454
4458
  Stepper,
4455
4459
  {
@@ -4514,7 +4518,7 @@ function PieceInspector(props) {
4514
4518
  ] }),
4515
4519
  el.type === "landmark" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextField, { label: m.landmarkName, wide: true, maxLength: 60, value: el.name, onCommit: (v) => v.trim() && patch("name", v.trim(), `name:${el.id}`) })
4516
4520
  ] }, el.id),
4517
- _optionalChain([labelError, 'optionalAccess', _157 => _157.id]) === el.id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-error", role: "alert", children: labelError.text }),
4521
+ _optionalChain([labelError, 'optionalAccess', _160 => _160.id]) === el.id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-error", role: "alert", children: labelError.text }),
4518
4522
  el.type === "seatBlock" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-insp-foot", children: [
4519
4523
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "block-range", children: blockRangeText(el, { many: m.blockRange, one: m.blockRangeOneRow }) }),
4520
4524
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "vk-d-link", "aria-haspopup": "dialog", onClick: props.onNumbering, children: m.numbering })
@@ -4581,12 +4585,12 @@ function NumberingDialog(props) {
4581
4585
  const m = props.messages;
4582
4586
  const [draft, setDraft] = _react.useState.call(void 0, props.block);
4583
4587
  const [failed, setFailed] = _react.useState.call(void 0, false);
4584
- const rowLabels = _chunkZ47OPTEPcjs.expandLabels.call(void 0, draft.rowLabels, draft.rows);
4585
- const seatLabels = _chunkZ47OPTEPcjs.expandLabels.call(void 0, draft.seatLabels, draft.cols);
4588
+ const rowLabels = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, draft.rowLabels, draft.rows);
4589
+ const seatLabels = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, draft.seatLabels, draft.cols);
4586
4590
  const removed = new Set(draft.removed);
4587
- const origRows = _chunkZ47OPTEPcjs.expandLabels.call(void 0, props.block.rowLabels, props.block.rows);
4588
- const origSeats = _chunkZ47OPTEPcjs.expandLabels.call(void 0, props.block.seatLabels, props.block.cols);
4589
- const soldAt = (r, c) => r < origRows.length && c < origSeats.length && props.lockedUnitIds.has(_chunkZ47OPTEPcjs.seatUnitId.call(void 0, props.block.id, origRows[r], origSeats[c]));
4591
+ const origRows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, props.block.rowLabels, props.block.rows);
4592
+ const origSeats = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, props.block.seatLabels, props.block.cols);
4593
+ const soldAt = (r, c) => r < origRows.length && c < origSeats.length && props.lockedUnitIds.has(_chunkUWCMN6Q7cjs.seatUnitId.call(void 0, props.block.id, origRows[r], origSeats[c]));
4590
4594
  const tooBig = draft.rows * draft.cols > MAX_PREVIEW_SEATS;
4591
4595
  const pattern = draft.seatLabels.kind === "numbers" ? _nullishCoalesce(draft.seatLabels.pattern, () => ( "sequential")) : "sequential";
4592
4596
  const patternId = _react.useId.call(void 0, );
@@ -4608,7 +4612,7 @@ function NumberingDialog(props) {
4608
4612
  tooBig ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-hint", children: m.numberingTooBig }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "vk-d-num-grid", role: "group", "aria-label": m.numbering, children: rowLabels.map((row, r) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-num-row", children: [
4609
4613
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-num-label", "aria-hidden": "true", children: row }),
4610
4614
  seatLabels.map((seat, c) => {
4611
- const id = _chunkZ47OPTEPcjs.seatUnitId.call(void 0, draft.id, row, seat);
4615
+ const id = _chunkUWCMN6Q7cjs.seatUnitId.call(void 0, draft.id, row, seat);
4612
4616
  const sold = soldAt(r, c) && !removed.has(id);
4613
4617
  const out = removed.has(id);
4614
4618
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -4623,7 +4627,7 @@ function NumberingDialog(props) {
4623
4627
  "aria-label": format(sold ? m.seatNameSold : out ? m.seatNameRemoved : m.seatName, { row, seat }),
4624
4628
  onClick: () => {
4625
4629
  setFailed(false);
4626
- setDraft((d) => _chunkZ47OPTEPcjs.toggleRemovedSeat.call(void 0, d, id));
4630
+ setDraft((d) => _chunkUWCMN6Q7cjs.toggleRemovedSeat.call(void 0, d, id));
4627
4631
  },
4628
4632
  children: seat
4629
4633
  },
@@ -4762,7 +4766,7 @@ function listOf(items, m) {
4762
4766
  function duplicateWarnings(placeTypes, summary, m) {
4763
4767
  const out = [];
4764
4768
  for (const o of placeTypes) {
4765
- const d = _optionalChain([summary, 'access', _158 => _158.byRef, 'access', _159 => _159[o.ref], 'optionalAccess', _160 => _160.duplicates]);
4769
+ const d = _optionalChain([summary, 'access', _161 => _161.byRef, 'access', _162 => _162[o.ref], 'optionalAccess', _163 => _163.duplicates]);
4766
4770
  if (!d) continue;
4767
4771
  if (d.seats.length > 0) {
4768
4772
  const items = d.seats.map((s) => {
@@ -4814,10 +4818,10 @@ function PlaceTypePanel(props) {
4814
4818
  const capped = capacityText(o, summary, m);
4815
4819
  const fullText = capacityFullText(o, summary, m);
4816
4820
  const done = fullText !== null;
4817
- const cap = _chunkZ47OPTEPcjs.placeTypeCapacity.call(void 0, o);
4821
+ const cap = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, o);
4818
4822
  const over = cap !== null && placedUnits(o, summary) > cap;
4819
4823
  const excess = over ? overCapacity(o, summary) : 0;
4820
- const trimmable = excess > 0 && props.onTrim ? _nullishCoalesce(_optionalChain([trimPlan, 'call', _161 => _161(props.layout, o, _nullishCoalesce(props.lockedUnitIds, () => ( NOTHING))), 'optionalAccess', _162 => _162.removed]), () => ( 0)) : 0;
4824
+ const trimmable = excess > 0 && props.onTrim ? _nullishCoalesce(_optionalChain([trimPlan, 'call', _164 => _164(props.layout, o, _nullishCoalesce(props.lockedUnitIds, () => ( NOTHING))), 'optionalAccess', _165 => _165.removed]), () => ( 0)) : 0;
4821
4825
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
4822
4826
  "li",
4823
4827
  {
@@ -4847,7 +4851,7 @@ function PlaceTypePanel(props) {
4847
4851
  className: "vk-d-btn vk-d-trim",
4848
4852
  "data-testid": "capacity-trim",
4849
4853
  "aria-label": format(m.trimToCapacityLabel, { over: trimmable, name: o.label }),
4850
- onClick: () => _optionalChain([props, 'access', _163 => _163.onTrim, 'optionalCall', _164 => _164(o)]),
4854
+ onClick: () => _optionalChain([props, 'access', _166 => _166.onTrim, 'optionalCall', _167 => _167(o)]),
4851
4855
  children: m.trimToCapacity
4852
4856
  }
4853
4857
  ),
@@ -4905,18 +4909,18 @@ function Popover({ title, onClose, anchorRef, children, className }) {
4905
4909
  const close = _react.useRef.call(void 0, onClose);
4906
4910
  close.current = onClose;
4907
4911
  _react.useEffect.call(void 0, () => {
4908
- const first = _optionalChain([ref, 'access', _165 => _165.current, 'optionalAccess', _166 => _166.querySelector, 'call', _167 => _167("input, button, select, [href]")]);
4909
- _optionalChain([(_nullishCoalesce(first, () => ( ref.current))), 'optionalAccess', _168 => _168.focus, 'call', _169 => _169()]);
4912
+ const first = _optionalChain([ref, 'access', _168 => _168.current, 'optionalAccess', _169 => _169.querySelector, 'call', _170 => _170("input, button, select, [href]")]);
4913
+ _optionalChain([(_nullishCoalesce(first, () => ( ref.current))), 'optionalAccess', _171 => _171.focus, 'call', _172 => _172()]);
4910
4914
  const onDown = (e) => {
4911
4915
  const t = e.target;
4912
- if (_optionalChain([ref, 'access', _170 => _170.current, 'optionalAccess', _171 => _171.contains, 'call', _172 => _172(t)]) || _optionalChain([anchorRef, 'access', _173 => _173.current, 'optionalAccess', _174 => _174.contains, 'call', _175 => _175(t)])) return;
4916
+ if (_optionalChain([ref, 'access', _173 => _173.current, 'optionalAccess', _174 => _174.contains, 'call', _175 => _175(t)]) || _optionalChain([anchorRef, 'access', _176 => _176.current, 'optionalAccess', _177 => _177.contains, 'call', _178 => _178(t)])) return;
4913
4917
  close.current();
4914
4918
  };
4915
4919
  document.addEventListener("pointerdown", onDown);
4916
4920
  const anchor = anchorRef.current;
4917
4921
  return () => {
4918
4922
  document.removeEventListener("pointerdown", onDown);
4919
- if (_optionalChain([anchor, 'optionalAccess', _176 => _176.isConnected]) && (!document.activeElement || document.activeElement === document.body)) anchor.focus();
4923
+ if (_optionalChain([anchor, 'optionalAccess', _179 => _179.isConnected]) && (!document.activeElement || document.activeElement === document.body)) anchor.focus();
4920
4924
  };
4921
4925
  }, [anchorRef]);
4922
4926
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -4930,7 +4934,7 @@ function Popover({ title, onClose, anchorRef, children, className }) {
4930
4934
  onKeyDown: (e) => {
4931
4935
  if (e.key === "Escape") {
4932
4936
  e.stopPropagation();
4933
- _optionalChain([anchorRef, 'access', _177 => _177.current, 'optionalAccess', _178 => _178.focus, 'call', _179 => _179()]);
4937
+ _optionalChain([anchorRef, 'access', _180 => _180.current, 'optionalAccess', _181 => _181.focus, 'call', _182 => _182()]);
4934
4938
  close.current();
4935
4939
  }
4936
4940
  },
@@ -5011,9 +5015,9 @@ function Sheet({
5011
5015
  if (!shown) return;
5012
5016
  const active = document.activeElement instanceof HTMLElement && document.activeElement !== document.body ? document.activeElement : null;
5013
5017
  const opener = _nullishCoalesce(returnTo.current, () => ( active));
5014
- _optionalChain([panelRef, 'access', _180 => _180.current, 'optionalAccess', _181 => _181.focus, 'call', _182 => _182()]);
5018
+ _optionalChain([panelRef, 'access', _183 => _183.current, 'optionalAccess', _184 => _184.focus, 'call', _185 => _185()]);
5015
5019
  return () => {
5016
- if (_optionalChain([opener, 'optionalAccess', _183 => _183.isConnected])) opener.focus();
5020
+ if (_optionalChain([opener, 'optionalAccess', _186 => _186.isConnected])) opener.focus();
5017
5021
  };
5018
5022
  }, [shown]);
5019
5023
  const onKeyDown = (e) => {
@@ -5394,12 +5398,12 @@ function TopBar(props) {
5394
5398
  function guardedStep(history, step, locked) {
5395
5399
  const candidate = step === "undo" ? history.peekUndo() : history.peekRedo();
5396
5400
  if (!candidate) return null;
5397
- const violations = _chunkZ47OPTEPcjs.findLockViolations.call(void 0, history.present, candidate, locked);
5401
+ const violations = _chunkUWCMN6Q7cjs.findLockViolations.call(void 0, history.present, candidate, locked);
5398
5402
  if (violations.length > 0) return { ok: false, rejection: { violations } };
5399
5403
  return { ok: true, layout: step === "undo" ? history.undo() : history.redo() };
5400
5404
  }
5401
5405
  function guardedLoad(history, next, locked, placeTypes = []) {
5402
- const violations = _chunkZ47OPTEPcjs.findLockViolations.call(void 0, history.present, next, locked);
5406
+ const violations = _chunkUWCMN6Q7cjs.findLockViolations.call(void 0, history.present, next, locked);
5403
5407
  if (violations.length > 0) return { ok: false, rejection: { violations } };
5404
5408
  const capacity = capacityRejections(history.present, next, placeTypes);
5405
5409
  if (capacity.length > 0) return { ok: false, rejection: { violations: [], capacity } };
@@ -5422,7 +5426,7 @@ function elementPrefix(el) {
5422
5426
  return el.type === "seatBlock" ? "b" : el.type === "table" ? "m" : el.type === "zone" ? "z" : "r";
5423
5427
  }
5424
5428
  function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5425
- const [history] = _react.useState.call(void 0, () => new (0, _chunkZ47OPTEPcjs.History)(initial));
5429
+ const [history] = _react.useState.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.History)(initial));
5426
5430
  const historyRef = _react.useRef.call(void 0, history);
5427
5431
  const [layout, setLayout] = _react.useState.call(void 0, initial);
5428
5432
  const [rejection, setRejectionState] = _react.useState.call(void 0, null);
@@ -5439,7 +5443,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5439
5443
  (next) => {
5440
5444
  setLayout(next);
5441
5445
  setRejection(null);
5442
- _optionalChain([onChange, 'optionalCall', _184 => _184(next)]);
5446
+ _optionalChain([onChange, 'optionalCall', _187 => _187(next)]);
5443
5447
  },
5444
5448
  [onChange, setRejection]
5445
5449
  );
@@ -5460,13 +5464,13 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5460
5464
  const before = historyRef.current.present;
5461
5465
  let candidate;
5462
5466
  try {
5463
- candidate = _chunkZ47OPTEPcjs.applyCommand.call(void 0, before, command);
5467
+ candidate = _chunkUWCMN6Q7cjs.applyCommand.call(void 0, before, command);
5464
5468
  } catch (error) {
5465
5469
  setRejection({ violations: [], invalid: error instanceof Error ? error.message : String(error) });
5466
5470
  return false;
5467
5471
  }
5468
5472
  const moveOnly = keepsCount(command);
5469
- const violations = moveOnly ? [] : _chunkZ47OPTEPcjs.findLockViolations.call(void 0, before, candidate, locked);
5473
+ const violations = moveOnly ? [] : _chunkUWCMN6Q7cjs.findLockViolations.call(void 0, before, candidate, locked);
5470
5474
  if (violations.length > 0) {
5471
5475
  setRejection({ violations });
5472
5476
  return false;
@@ -5485,8 +5489,8 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5485
5489
  const place = _react.useCallback.call(void 0,
5486
5490
  (kind, at) => {
5487
5491
  const current = historyRef.current.present;
5488
- const id = _chunkZ47OPTEPcjs.newElementId.call(void 0, current, idPrefix(kind));
5489
- if (!run({ type: "addElement", element: _chunkZ47OPTEPcjs.createPiece.call(void 0, kind, id, at, current) })) return null;
5492
+ const id = _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, idPrefix(kind));
5493
+ if (!run({ type: "addElement", element: _chunkUWCMN6Q7cjs.createPiece.call(void 0, kind, id, at, current) })) return null;
5490
5494
  dispatchUi({ type: "select", id });
5491
5495
  return id;
5492
5496
  },
@@ -5495,10 +5499,10 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5495
5499
  const addFor = _react.useCallback.call(void 0,
5496
5500
  (kind, option, near, opts = {}) => {
5497
5501
  const current = historyRef.current.present;
5498
- const id = _chunkZ47OPTEPcjs.newElementId.call(void 0, current, idPrefix(kind));
5499
- let piece = _chunkZ47OPTEPcjs.createPiece.call(void 0, kind, id, near, current, opts.seats === void 0 ? {} : { seats: opts.seats });
5502
+ const id = _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, idPrefix(kind));
5503
+ let piece = _chunkUWCMN6Q7cjs.createPiece.call(void 0, kind, id, near, current, opts.seats === void 0 ? {} : { seats: opts.seats });
5500
5504
  if (piece.type === "table" && opts.places !== void 0) piece = { ...piece, places: opts.places };
5501
- if (option && piece.type !== "landmark" && _chunkZ47OPTEPcjs.canAssign.call(void 0, piece, option)) piece = _chunkZ47OPTEPcjs.assignPlaceType.call(void 0, piece, option);
5505
+ if (option && piece.type !== "landmark" && _chunkUWCMN6Q7cjs.canAssign.call(void 0, piece, option)) piece = _chunkUWCMN6Q7cjs.assignPlaceType.call(void 0, piece, option);
5502
5506
  const own = elementBounds({ ...current, elements: [...current.elements, piece] }, piece);
5503
5507
  if (own) {
5504
5508
  const occupied = current.elements.flatMap((e) => _nullishCoalesce(elementBounds(current, e), () => ( [])));
@@ -5516,8 +5520,8 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5516
5520
  const el = find(id);
5517
5521
  if (!el) return;
5518
5522
  const current = historyRef.current.present;
5519
- const newId = _chunkZ47OPTEPcjs.newElementId.call(void 0, current, elementPrefix(el));
5520
- if (run({ type: "addElement", element: _chunkZ47OPTEPcjs.duplicatePiece.call(void 0, el, newId, current) })) {
5523
+ const newId = _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, elementPrefix(el));
5524
+ if (run({ type: "addElement", element: _chunkUWCMN6Q7cjs.duplicatePiece.call(void 0, el, newId, current) })) {
5521
5525
  dispatchUi({ type: "select", id: newId });
5522
5526
  }
5523
5527
  },
@@ -5526,7 +5530,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5526
5530
  const rotate = _react.useCallback.call(void 0,
5527
5531
  (id) => {
5528
5532
  const el = find(id);
5529
- if (el) run({ type: "replaceElement", element: _chunkZ47OPTEPcjs.rotatePiece.call(void 0, el) });
5533
+ if (el) run({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.rotatePiece.call(void 0, el) });
5530
5534
  },
5531
5535
  [run]
5532
5536
  );
@@ -5561,7 +5565,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5561
5565
  for (const id of ids) {
5562
5566
  const el = current.elements.find((e) => e.id === id);
5563
5567
  if (!el) continue;
5564
- const copy = _chunkZ47OPTEPcjs.duplicatePiece.call(void 0, el, _chunkZ47OPTEPcjs.newElementId.call(void 0, current, elementPrefix(el)), current);
5568
+ const copy = _chunkUWCMN6Q7cjs.duplicatePiece.call(void 0, el, _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, elementPrefix(el)), current);
5565
5569
  current = { ...current, elements: [...current.elements, copy] };
5566
5570
  commands.push({ type: "addElement", element: copy });
5567
5571
  created.push(copy.id);
@@ -5587,7 +5591,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5587
5591
  const toggleSeat = _react.useCallback.call(void 0,
5588
5592
  (blockId, unitId) => {
5589
5593
  const el = find(blockId);
5590
- if (_optionalChain([el, 'optionalAccess', _185 => _185.type]) === "seatBlock") run({ type: "replaceElement", element: _chunkZ47OPTEPcjs.toggleRemovedSeat.call(void 0, el, unitId) });
5594
+ if (_optionalChain([el, 'optionalAccess', _188 => _188.type]) === "seatBlock") run({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.toggleRemovedSeat.call(void 0, el, unitId) });
5591
5595
  },
5592
5596
  [run]
5593
5597
  );
@@ -5595,8 +5599,8 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5595
5599
  (id, option) => {
5596
5600
  const el = find(id);
5597
5601
  if (!el || el.type === "landmark") return;
5598
- if (option && !_chunkZ47OPTEPcjs.canAssign.call(void 0, el, option)) return;
5599
- run({ type: "replaceElement", element: _chunkZ47OPTEPcjs.assignPlaceType.call(void 0, el, option) });
5602
+ if (option && !_chunkUWCMN6Q7cjs.canAssign.call(void 0, el, option)) return;
5603
+ run({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.assignPlaceType.call(void 0, el, option) });
5600
5604
  },
5601
5605
  [run]
5602
5606
  );
@@ -5662,7 +5666,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5662
5666
  var NOTHING_LOCKED = /* @__PURE__ */ new Set();
5663
5667
  function blankLayout(name) {
5664
5668
  return {
5665
- meta: { id: "plan", name, version: _chunkZ47OPTEPcjs.CURRENT_VERSION, width: 1200, height: 800, background: null },
5669
+ meta: { id: "plan", name, version: _chunkUWCMN6Q7cjs.CURRENT_VERSION, width: 1200, height: 800, background: null },
5666
5670
  elements: []
5667
5671
  };
5668
5672
  }
@@ -5686,13 +5690,13 @@ function VenueDesigner(props) {
5686
5690
  const loadingExternal = _react.useRef.call(void 0, false);
5687
5691
  const onChange = _react.useCallback.call(void 0, (layout2) => {
5688
5692
  lastEmitted.current = layout2;
5689
- if (!loadingExternal.current) _optionalChain([onChangeRef, 'access', _186 => _186.current, 'optionalCall', _187 => _187(layout2)]);
5693
+ if (!loadingExternal.current) _optionalChain([onChangeRef, 'access', _189 => _189.current, 'optionalCall', _190 => _190(layout2)]);
5690
5694
  }, []);
5691
5695
  const designer = useDesigner({ initial, lockedUnitIds: locked, onChange, placeTypes: props.placeTypes });
5692
5696
  const { layout, ui, dispatchUi } = designer;
5693
5697
  const messages = _react.useMemo.call(void 0, () => mergeDesignerMessages(props.messages), [props.messages]);
5694
5698
  const m = messages;
5695
- const summary = _react.useMemo.call(void 0, () => _chunkZ47OPTEPcjs.summarize.call(void 0, layout), [layout]);
5699
+ const summary = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.summarize.call(void 0, layout), [layout]);
5696
5700
  const selected = ui.selectedId ? _nullishCoalesce(layout.elements.find((e) => e.id === ui.selectedId), () => ( null)) : null;
5697
5701
  const canvasRef = _react.useRef.call(void 0, null);
5698
5702
  const otherTableLabels = _react.useMemo.call(void 0,
@@ -5761,7 +5765,7 @@ function VenueDesigner(props) {
5761
5765
  if (compact && popover !== null) setPopover(null);
5762
5766
  }, [sheet, selected, compact, popover]);
5763
5767
  const bg = layout.meta.background;
5764
- const current = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _188 => _188.src]), () => ( null)));
5768
+ const current = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _191 => _191.src]), () => ( null)));
5765
5769
  const [incomingSrc, setIncomingSrc] = _react.useState.call(void 0, null);
5766
5770
  const incoming = useImage(incomingSrc);
5767
5771
  const { run } = designer;
@@ -5783,7 +5787,7 @@ function VenueDesigner(props) {
5783
5787
  };
5784
5788
  const adoptBackground = (src) => {
5785
5789
  if (!src) return;
5786
- if (src === _optionalChain([bg, 'optionalAccess', _189 => _189.src]) && incomingSrc === null) return;
5790
+ if (src === _optionalChain([bg, 'optionalAccess', _192 => _192.src]) && incomingSrc === null) return;
5787
5791
  setIncomingSrc(src);
5788
5792
  };
5789
5793
  const bgProp = props.background;
@@ -5799,7 +5803,7 @@ function VenueDesigner(props) {
5799
5803
  }
5800
5804
  adoptBackground(src);
5801
5805
  } : null;
5802
- const suggestedSrc = _optionalChain([bgProp, 'optionalAccess', _190 => _190.suggestedSrc]) || null;
5806
+ const suggestedSrc = _optionalChain([bgProp, 'optionalAccess', _193 => _193.suggestedSrc]) || null;
5803
5807
  const bgStatus = incomingSrc ? incoming.failed ? "failed" : "loading" : current.failed ? "failed" : "idle";
5804
5808
  const showBackground = bgProp !== void 0 || bg !== null;
5805
5809
  const latest = _react.useRef.call(void 0, { summary, placeTypes: props.placeTypes, compact, meta: layout.meta });
@@ -5810,9 +5814,9 @@ function VenueDesigner(props) {
5810
5814
  const { summary: summary2, placeTypes, compact: compact2, meta } = latest.current;
5811
5815
  const request = pieceRequest(kind, ref, placeTypes, summary2);
5812
5816
  if (!request) return null;
5813
- const centre = _nullishCoalesce(_optionalChain([canvasRef, 'access', _191 => _191.current, 'optionalAccess', _192 => _192.centre, 'call', _193 => _193()]), () => ( { x: meta.width / 2, y: meta.height / 2 }));
5817
+ const centre = _nullishCoalesce(_optionalChain([canvasRef, 'access', _194 => _194.current, 'optionalAccess', _195 => _195.centre, 'call', _196 => _196()]), () => ( { x: meta.width / 2, y: meta.height / 2 }));
5814
5818
  const id = designerAddFor(kind, request.option, centre, request.opts);
5815
- if (id) _optionalChain([canvasRef, 'access', _194 => _194.current, 'optionalAccess', _195 => _195.reveal, 'call', _196 => _196(id)]);
5819
+ if (id) _optionalChain([canvasRef, 'access', _197 => _197.current, 'optionalAccess', _198 => _198.reveal, 'call', _199 => _199(id)]);
5816
5820
  if (id && compact2) setSheet("piece");
5817
5821
  return id;
5818
5822
  },
@@ -5822,12 +5826,12 @@ function VenueDesigner(props) {
5822
5826
  (id) => {
5823
5827
  dispatchUi({ type: "select", id });
5824
5828
  if (!id) return;
5825
- _optionalChain([canvasRef, 'access', _197 => _197.current, 'optionalAccess', _198 => _198.reveal, 'call', _199 => _199(id)]);
5829
+ _optionalChain([canvasRef, 'access', _200 => _200.current, 'optionalAccess', _201 => _201.reveal, 'call', _202 => _202(id)]);
5826
5830
  if (latest.current.compact) setSheet("piece");
5827
5831
  },
5828
5832
  [dispatchUi]
5829
5833
  );
5830
- const revealPiece = _react.useCallback.call(void 0, (id) => _optionalChain([canvasRef, 'access', _200 => _200.current, 'optionalAccess', _201 => _201.reveal, 'call', _202 => _202(id)]), []);
5834
+ const revealPiece = _react.useCallback.call(void 0, (id) => _optionalChain([canvasRef, 'access', _203 => _203.current, 'optionalAccess', _204 => _204.reveal, 'call', _205 => _205(id)]), []);
5831
5835
  const trimToCapacity = _react.useCallback.call(void 0,
5832
5836
  (ref) => {
5833
5837
  const option = latest.current.placeTypes.find((o) => o.ref === ref);
@@ -5843,7 +5847,7 @@ function VenueDesigner(props) {
5843
5847
  () => hostReads(latest.current.placeTypes, facts.summary, facts.pieces, m),
5844
5848
  [typesKey, facts, m]
5845
5849
  );
5846
- const selectedRef = selected && selected.type !== "landmark" ? _optionalChain([selected, 'access', _203 => _203.placeType, 'optionalAccess', _204 => _204.ref]) || null : null;
5850
+ const selectedRef = selected && selected.type !== "landmark" ? _optionalChain([selected, 'access', _206 => _206.placeType, 'optionalAccess', _207 => _207.ref]) || null : null;
5847
5851
  const hostApi = _react.useMemo.call(void 0,
5848
5852
  () => ({ ...reads, addPiece, trimToCapacity, select: selectPiece, reveal: revealPiece, selectedRef }),
5849
5853
  [reads, addPiece, trimToCapacity, selectPiece, revealPiece, selectedRef]
@@ -5908,7 +5912,7 @@ function VenueDesigner(props) {
5908
5912
  editing: ui.backgroundEditing,
5909
5913
  compact,
5910
5914
  onPick: pickBackground ? () => void pickBackground() : null,
5911
- onUseSuggested: suggestedSrc && suggestedSrc !== _optionalChain([bg, 'optionalAccess', _205 => _205.src]) ? () => adoptBackground(suggestedSrc) : null,
5915
+ onUseSuggested: suggestedSrc && suggestedSrc !== _optionalChain([bg, 'optionalAccess', _208 => _208.src]) ? () => adoptBackground(suggestedSrc) : null,
5912
5916
  onSet: setBackground,
5913
5917
  onEditing: (on) => {
5914
5918
  dispatchUi({ type: "backgroundEdit", on });
@@ -5972,8 +5976,8 @@ function VenueDesigner(props) {
5972
5976
  const panel = _nullishCoalesce(inspector, () => ( multiPanel));
5973
5977
  const numberingTitleId = _react.useId.call(void 0, );
5974
5978
  const numberingBlock = numberingId ? layout.elements.find((e) => e.id === numberingId) : void 0;
5975
- const numberingTarget = _optionalChain([numberingBlock, 'optionalAccess', _206 => _206.type]) === "seatBlock" ? numberingBlock : null;
5976
- const numberingRef = _optionalChain([numberingTarget, 'optionalAccess', _207 => _207.placeType, 'optionalAccess', _208 => _208.ref]) || null;
5979
+ const numberingTarget = _optionalChain([numberingBlock, 'optionalAccess', _209 => _209.type]) === "seatBlock" ? numberingBlock : null;
5980
+ const numberingRef = _optionalChain([numberingTarget, 'optionalAccess', _210 => _210.placeType, 'optionalAccess', _211 => _211.ref]) || null;
5977
5981
  const numberingType = numberingRef ? props.placeTypes.find((p) => p.ref === numberingRef) : void 0;
5978
5982
  const closeNumbering = _react.useCallback.call(void 0, () => setNumberingId(null), []);
5979
5983
  const canvas = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -6075,8 +6079,8 @@ function VenueDesigner(props) {
6075
6079
  NumberingDialog,
6076
6080
  {
6077
6081
  block: numberingTarget,
6078
- typeName: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _209 => _209.label]), () => ( m.unassigned)),
6079
- color: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _210 => _210.color]), () => ( null)),
6082
+ typeName: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _212 => _212.label]), () => ( m.unassigned)),
6083
+ color: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _213 => _213.color]), () => ( null)),
6080
6084
  lockedUnitIds: locked,
6081
6085
  messages: m,
6082
6086
  titleId: numberingTitleId,
@@ -6098,7 +6102,7 @@ function VenueDesigner(props) {
6098
6102
  }
6099
6103
 
6100
6104
  // ../react/src/index.ts
6101
- var VERSION = "0.10.2";
6105
+ var VERSION = "0.10.3";
6102
6106
 
6103
6107
 
6104
6108