opencalque 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +992 -300
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7447,11 +7447,11 @@ var require_fast_deep_equal = __commonJS({
7447
7447
  if (a === b) return true;
7448
7448
  if (a && b && typeof a == "object" && typeof b == "object") {
7449
7449
  if (a.constructor !== b.constructor) return false;
7450
- var length, i, keys;
7450
+ var length2, i, keys;
7451
7451
  if (Array.isArray(a)) {
7452
- length = a.length;
7453
- if (length != b.length) return false;
7454
- for (i = length; i-- !== 0; )
7452
+ length2 = a.length;
7453
+ if (length2 != b.length) return false;
7454
+ for (i = length2; i-- !== 0; )
7455
7455
  if (!equal(a[i], b[i])) return false;
7456
7456
  return true;
7457
7457
  }
@@ -7459,11 +7459,11 @@ var require_fast_deep_equal = __commonJS({
7459
7459
  if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
7460
7460
  if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
7461
7461
  keys = Object.keys(a);
7462
- length = keys.length;
7463
- if (length !== Object.keys(b).length) return false;
7464
- for (i = length; i-- !== 0; )
7462
+ length2 = keys.length;
7463
+ if (length2 !== Object.keys(b).length) return false;
7464
+ for (i = length2; i-- !== 0; )
7465
7465
  if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
7466
- for (i = length; i-- !== 0; ) {
7466
+ for (i = length2; i-- !== 0; ) {
7467
7467
  var key = keys[i];
7468
7468
  if (!equal(a[key], b[key])) return false;
7469
7469
  }
@@ -10468,11 +10468,11 @@ var require_ucs2length = __commonJS({
10468
10468
  Object.defineProperty(exports, "__esModule", { value: true });
10469
10469
  function ucs2length(str) {
10470
10470
  const len2 = str.length;
10471
- let length = 0;
10471
+ let length2 = 0;
10472
10472
  let pos = 0;
10473
10473
  let value;
10474
10474
  while (pos < len2) {
10475
- length++;
10475
+ length2++;
10476
10476
  value = str.charCodeAt(pos++);
10477
10477
  if (value >= 55296 && value <= 56319 && pos < len2) {
10478
10478
  value = str.charCodeAt(pos);
@@ -10480,7 +10480,7 @@ var require_ucs2length = __commonJS({
10480
10480
  pos++;
10481
10481
  }
10482
10482
  }
10483
- return length;
10483
+ return length2;
10484
10484
  }
10485
10485
  exports.default = ucs2length;
10486
10486
  ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
@@ -12807,9 +12807,9 @@ function parallelPath(points, closed, distance, smooth = false) {
12807
12807
  const before = norm(sub(p, at2(i - 1)));
12808
12808
  const after = norm(sub(at2(i + 1), p));
12809
12809
  if (smooth) {
12810
- const across = perp(norm(sub(at2(i + 1), at2(i - 1))));
12811
- if (len(across) === 0) return null;
12812
- moved.push(add(p, scale(across, distance)));
12810
+ const across2 = perp(norm(sub(at2(i + 1), at2(i - 1))));
12811
+ if (len(across2) === 0) return null;
12812
+ moved.push(add(p, scale(across2, distance)));
12813
12813
  continue;
12814
12814
  }
12815
12815
  const [a, b] = [perp(len(before) === 0 ? after : before), perp(len(after) === 0 ? before : after)];
@@ -12829,7 +12829,7 @@ function besidePath(points, closed, p) {
12829
12829
  const n3 = points.length;
12830
12830
  let best = Infinity;
12831
12831
  let foot = points[0];
12832
- let across = { x: 0, y: 0 };
12832
+ let across2 = { x: 0, y: 0 };
12833
12833
  for (let i = 0; i < (closed ? n3 : n3 - 1); i++) {
12834
12834
  const a = points[i];
12835
12835
  const b = points[(i + 1) % n3];
@@ -12842,10 +12842,10 @@ function besidePath(points, closed, p) {
12842
12842
  if (gap < best - 1e-9) {
12843
12843
  best = gap;
12844
12844
  foot = q;
12845
- across = perp(norm(d));
12846
- } else if (gap <= best + 1e-9) across = add(across, perp(norm(d)));
12845
+ across2 = perp(norm(d));
12846
+ } else if (gap <= best + 1e-9) across2 = add(across2, perp(norm(d)));
12847
12847
  }
12848
- const side = (p.x - foot.x) * across.x + (p.y - foot.y) * across.y;
12848
+ const side = (p.x - foot.x) * across2.x + (p.y - foot.y) * across2.y;
12849
12849
  return side < 0 ? -best : best;
12850
12850
  }
12851
12851
  function ellipseArc(e) {
@@ -13417,10 +13417,10 @@ function promiseAllObject(promisesObj) {
13417
13417
  return resolvedObj;
13418
13418
  });
13419
13419
  }
13420
- function randomString(length = 10) {
13420
+ function randomString(length2 = 10) {
13421
13421
  const chars = "abcdefghijklmnopqrstuvwxyz";
13422
13422
  let str = "";
13423
- for (let i = 0; i < length; i++) {
13423
+ for (let i = 0; i < length2; i++) {
13424
13424
  str += chars[Math.floor(Math.random() * chars.length)];
13425
13425
  }
13426
13426
  return str;
@@ -14425,8 +14425,8 @@ var ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
14425
14425
  var xid = /^[0-9a-vA-V]{20}$/;
14426
14426
  var ksuid = /^[A-Za-z0-9]{27}$/;
14427
14427
  var nanoid = /^[a-zA-Z0-9_-]{21}$/;
14428
- function nanoidOfLength(length) {
14429
- return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);
14428
+ function nanoidOfLength(length2) {
14429
+ return new RegExp(`^[a-zA-Z0-9_-]{${length2}}$`);
14430
14430
  }
14431
14431
  var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
14432
14432
  var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
@@ -14628,8 +14628,8 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
14628
14628
  inst._zod.check = (payload) => {
14629
14629
  const input = payload.value;
14630
14630
  const units = input.length;
14631
- const length = typeof input === "string" && units > def.maximum ? codePointLength(input) : units;
14632
- if (length <= def.maximum)
14631
+ const length2 = typeof input === "string" && units > def.maximum ? codePointLength(input) : units;
14632
+ if (length2 <= def.maximum)
14633
14633
  return;
14634
14634
  const origin = getLengthableOrigin(input);
14635
14635
  payload.issues.push({
@@ -14650,8 +14650,8 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
14650
14650
  inst._zod.check = (payload) => {
14651
14651
  const input = payload.value;
14652
14652
  const units = input.length;
14653
- const length = typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units;
14654
- if (length >= def.minimum)
14653
+ const length2 = typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units;
14654
+ if (length2 >= def.minimum)
14655
14655
  return;
14656
14656
  const origin = getLengthableOrigin(input);
14657
14657
  payload.issues.push({
@@ -14672,11 +14672,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
14672
14672
  inst._zod.check = (payload) => {
14673
14673
  const input = payload.value;
14674
14674
  const units = input.length;
14675
- const length = typeof input === "string" && units >= def.length && units <= def.length * 2 ? codePointLength(input) : units;
14676
- if (length === def.length)
14675
+ const length2 = typeof input === "string" && units >= def.length && units <= def.length * 2 ? codePointLength(input) : units;
14676
+ if (length2 === def.length)
14677
14677
  return;
14678
14678
  const origin = getLengthableOrigin(input);
14679
- const tooBig = length > def.length;
14679
+ const tooBig = length2 > def.length;
14680
14680
  payload.issues.push({
14681
14681
  origin,
14682
14682
  ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
@@ -17434,11 +17434,11 @@ function _minLength(minimum, params) {
17434
17434
  });
17435
17435
  }
17436
17436
  // @__NO_SIDE_EFFECTS__
17437
- function _length(length, params) {
17437
+ function _length(length2, params) {
17438
17438
  return new $ZodCheckLengthEquals({
17439
17439
  check: "length_equals",
17440
17440
  ...normalizeParams(params),
17441
- length
17441
+ length: length2
17442
17442
  });
17443
17443
  }
17444
17444
  // @__NO_SIDE_EFFECTS__
@@ -19928,7 +19928,7 @@ function duration2(params) {
19928
19928
  config({ jitless: true });
19929
19929
  var FORMAT = "opencalque";
19930
19930
  var FORMER_FORMAT = "opencad";
19931
- var FORMAT_VERSION = 4;
19931
+ var FORMAT_VERSION = 5;
19932
19932
  var Id = string2().min(1);
19933
19933
  var Vec2Schema = object({ x: number2(), y: number2() });
19934
19934
  var PatternSchema = object({
@@ -20164,9 +20164,10 @@ var NodeSchema = discriminatedUnion("type", [
20164
20164
  author: string2().optional().describe("Overrides the author of the drawing on this sheet."),
20165
20165
  date: string2().optional(),
20166
20166
  number: string2().optional(),
20167
- hide: array(string2()).optional().describe("Entries this sheet leaves out, among project, client, address, sheet, page, author, scale, format, date and number. Defaults to ['page'].")
20167
+ revisions: string2().optional().describe(`The sheet's revisions, one per line, each its mark, date and description separated by '|' ("2 | 2026-11-17 | Issued for permit"). Only the strip shows them (the drawing's "settings", titleBlock).`),
20168
+ hide: array(string2()).optional().describe("Entries this sheet leaves out, among project, client, address, sheet, page, author, scale, format, date, number and revisions. Defaults to ['page'].")
20168
20169
  }).optional().describe(
20169
- `When present (even empty), the sheet gets a border and a title block in its bottom right corner. The block is made of the entries that have something to say and are not hidden: the project, client and address (from the document's "info"; the project falls back on the document name), the name of the paper and of its page, the author, the scale and format, and the date and sheet number given here. An entry with nothing in it takes no room. Texts may hold fields such as {date} or {page-number}.`
20170
+ `When present (even empty), the sheet gets a border and a title block, in its bottom right corner or down its right edge, as the drawing's "settings" say (titleBlock). The block is made of the entries that have something to say and are not hidden: the project, client and address (from the document's "info"; the project falls back on the document name), the name of the paper and of its page, the author, the scale and format, and the date, sheet number and revisions given here. An entry with nothing in it takes no room. Texts may hold fields such as {date} or {page-number}.`
20170
20171
  )
20171
20172
  }).describe(
20172
20173
  "A sheet of paper laid on the drawing, with its top-left corner at (x, y): it frames the part of the drawing meant for one printed sheet. Width and height are in drawing millimetres like everything else. It has no children: whatever lies entirely inside its rectangle is on it, and is moved and copied with it in the editor."
@@ -20296,7 +20297,11 @@ var NodeSchema = discriminatedUnion("type", [
20296
20297
  ]).describe("All coordinates and lengths are millimetres. X grows to the right, Y grows downward.");
20297
20298
  var DrawingSettingsSchema = object({
20298
20299
  system: _enum(["metric", "imperial"]).optional().describe("'imperial': areas in square feet, and the lengths, volumes and thicknesses of tables of quantities in feet and inches. Defaults to 'metric' (square metres, metres)."),
20299
- decimal: _enum([".", ","]).optional().describe("The decimal separator of the areas, tables and dimensions. Defaults to '.'.")
20300
+ decimal: _enum([".", ","]).optional().describe("The decimal separator of the areas, tables and dimensions. Defaults to '.'."),
20301
+ titleBlock: object({
20302
+ layout: _enum(["corner", "strip"]).optional().describe("'corner' (the default): a block of values in the bottom right corner. 'strip': a column down the right edge of the sheet, as US sheets have it, each entry under its caption, the project at the top, the revisions under it and the sheet title and number at the bottom."),
20303
+ labels: record(string2(), string2()).optional().describe("The captions of the strip, by entry (project, client, address, sheet, page, author, scale, format, date, number, revisions). Left out, English ones; an empty one is not drawn.")
20304
+ }).optional().describe('How the title blocks of every sheet are laid out, the same throughout the set. Left out, in the corner. What each sheet shows is its own ("titleBlock" of a paper).')
20300
20305
  });
20301
20306
  var DocumentSchema = object({
20302
20307
  format: literal(FORMAT),
@@ -20311,7 +20316,7 @@ var DocumentSchema = object({
20311
20316
  assets: record(Id, AssetSchema).optional().describe("Embedded files by id. Large; tools that only need the drawing can ignore it."),
20312
20317
  nodes: record(Id, NodeSchema).describe(`Every node by id, as a flat map. The tree is expressed by each node's "parent" and "order".`),
20313
20318
  info: object({ project: string2().optional(), client: string2().optional(), address: string2().optional(), author: string2().optional() }).optional().describe("What the drawing says about itself, shown in the title block of every sheet: the project (the document name when not given), the client, the address of the site (lines separated by a line break), the author."),
20314
- settings: DrawingSettingsSchema.optional().describe("How the drawing writes its numbers: the floor areas of its rooms, its tables of quantities, its dimensions. Left out, in metric with a decimal point."),
20319
+ settings: DrawingSettingsSchema.optional().describe("How the drawing writes its numbers (the floor areas of its rooms, its tables of quantities, its dimensions) and lays out the title blocks of its sheets. Left out, in metric with a decimal point, the block in the corner."),
20315
20320
  meta: record(string2(), unknown()).optional()
20316
20321
  }).describe("An OpenCalque document (.opencalque file).");
20317
20322
  var NODE_TYPES = NodeSchema.options.map((option) => option.shape.type.value);
@@ -20452,12 +20457,13 @@ function withoutAssets(doc) {
20452
20457
  const { assets: _, ...rest } = doc;
20453
20458
  return rest;
20454
20459
  }
20460
+ var deskDrewChair = (node2) => node2.type === "parametric" && node2.kind === "arch.desk" && !(typeof node2.props === "object" && node2.props !== null && node2.props.chair === false);
20455
20461
  function serializeDocument(doc) {
20456
20462
  const used = new Set(Object.values(doc.nodes).flatMap((n3) => n3.type === "image" ? [n3.asset] : []));
20457
20463
  const assets = Object.fromEntries(Object.entries(doc.assets ?? {}).filter(([id]) => used.has(id)));
20458
20464
  const { assets: _, ...rest } = doc;
20459
20465
  const nodes = Object.values(doc.nodes);
20460
- const needed = nodes.some((n3) => n3.type === "link") ? 4 : nodes.some((n3) => n3.type === "elevation" || n3.type === "viewline") ? 3 : 2;
20466
+ const needed = nodes.some(deskDrewChair) ? 5 : nodes.some((n3) => n3.type === "link") ? 4 : nodes.some((n3) => n3.type === "elevation" || n3.type === "viewline") ? 3 : 2;
20461
20467
  const version2 = Math.min(doc.version, needed);
20462
20468
  return JSON.stringify(used.size > 0 ? { ...rest, version: version2, assets } : { ...rest, version: version2 }, null, 2) + "\n";
20463
20469
  }
@@ -20486,37 +20492,37 @@ function courseOf(wall) {
20486
20492
  function makeCourse(wall) {
20487
20493
  const arc = wallArc(wall);
20488
20494
  if (!arc) {
20489
- const length2 = dist(wall.a, wall.b);
20495
+ const length3 = dist(wall.a, wall.b);
20490
20496
  const d = norm(sub(wall.b, wall.a));
20491
20497
  const n3 = perp(d);
20492
20498
  const at2 = (s) => add(wall.a, scale(d, s));
20493
20499
  return {
20494
- length: length2,
20500
+ length: length3,
20495
20501
  at: at2,
20496
20502
  dir: () => d,
20497
- offset: (s, across) => add(at2(s), scale(n3, across)),
20503
+ offset: (s, across2) => add(at2(s), scale(n3, across2)),
20498
20504
  project: (p) => ({ along: dot(sub(p, wall.a), d), across: cross(d, sub(p, wall.a)) }),
20499
20505
  stops: []
20500
20506
  };
20501
20507
  }
20502
20508
  const { centre, radius, from, sweep: sweep2 } = arc;
20503
- const length = radius * Math.abs(sweep2);
20509
+ const length2 = radius * Math.abs(sweep2);
20504
20510
  const way = Math.sign(sweep2);
20505
- const angle = (s) => from + sweep2 * s / length;
20511
+ const angle = (s) => from + sweep2 * s / length2;
20506
20512
  const round3 = (s, r) => ({ x: centre.x + r * Math.cos(angle(s)), y: centre.y + r * Math.sin(angle(s)) });
20507
20513
  const steps = Math.max(4, Math.ceil(Math.abs(sweep2) / ARC_STEP));
20508
20514
  return {
20509
- length,
20515
+ length: length2,
20510
20516
  at: (s) => round3(s, radius),
20511
20517
  dir: (s) => ({ x: -way * Math.sin(angle(s)), y: way * Math.cos(angle(s)) }),
20512
20518
  // The inner face of a wall thicker than its radius would cross the centre: it stops there.
20513
- offset: (s, across) => round3(s, Math.max(0, radius - way * across)),
20519
+ offset: (s, across2) => round3(s, Math.max(0, radius - way * across2)),
20514
20520
  project: (p) => {
20515
20521
  let turn2 = Math.atan2(p.y - centre.y, p.x - centre.x) - (from + sweep2 / 2);
20516
20522
  turn2 = Math.atan2(Math.sin(turn2), Math.cos(turn2));
20517
- return { along: length / 2 + turn2 / sweep2 * length, across: way * (radius - dist(p, centre)) };
20523
+ return { along: length2 / 2 + turn2 / sweep2 * length2, across: way * (radius - dist(p, centre)) };
20518
20524
  },
20519
- stops: Array.from({ length: steps + 1 }, (_, i) => length * i / steps)
20525
+ stops: Array.from({ length: steps + 1 }, (_, i) => length2 * i / steps)
20520
20526
  };
20521
20527
  }
20522
20528
  function wallLength(wall) {
@@ -20530,10 +20536,10 @@ function wallPoints(wall) {
20530
20536
  const course = courseOf(wall);
20531
20537
  return [wall.a, ...course.stops.slice(1, -1).map((s) => course.at(s)), wall.b];
20532
20538
  }
20533
- function wallParallel(wall, across, extend2 = 0) {
20539
+ function wallParallel(wall, across2, extend2 = 0) {
20534
20540
  const course = courseOf(wall);
20535
20541
  const stops = course.stops.length > 0 ? course.stops : [0, course.length];
20536
- const line2 = stops.map((s) => course.offset(s, across));
20542
+ const line2 = stops.map((s) => course.offset(s, across2));
20537
20543
  return extend2 > 0 ? [sub(line2[0], scale(course.dir(0), extend2)), ...line2, add(line2[line2.length - 1], scale(course.dir(course.length), extend2))] : line2;
20538
20544
  }
20539
20545
  function wallSides(wall) {
@@ -20548,16 +20554,16 @@ var middleAcross = (wall) => {
20548
20554
  function wallContains(wall, p, tolerance = 0) {
20549
20555
  if (dist(wall.a, wall.b) < 1e-6) return false;
20550
20556
  const course = courseOf(wall);
20551
- const { along: along2, across } = course.project(p);
20557
+ const { along: along2, across: across2 } = course.project(p);
20552
20558
  const { left, right } = wallSides(wall);
20553
- return along2 >= -tolerance && along2 <= course.length + tolerance && across >= -left - tolerance && across <= right + tolerance;
20559
+ return along2 >= -tolerance && along2 <= course.length + tolerance && across2 >= -left - tolerance && across2 <= right + tolerance;
20554
20560
  }
20555
20561
  function distToBody(p, wall) {
20556
20562
  if (dist(wall.a, wall.b) < 1e-6) return Infinity;
20557
20563
  const course = courseOf(wall);
20558
- const { along: along2, across } = course.project(p);
20564
+ const { along: along2, across: across2 } = course.project(p);
20559
20565
  const { left, right } = wallSides(wall);
20560
- return Math.hypot(Math.max(0, -left - across, across - right), along2 < 0 ? -along2 : Math.max(0, along2 - course.length));
20566
+ return Math.hypot(Math.max(0, -left - across2, across2 - right), along2 < 0 ? -along2 : Math.max(0, along2 - course.length));
20561
20567
  }
20562
20568
  function bulgeThrough(wall, p) {
20563
20569
  const chord = dist(wall.a, wall.b);
@@ -20679,10 +20685,10 @@ function abuts(wall, p, other) {
20679
20685
  const d = norm(sub(wall.b, wall.a));
20680
20686
  const n3 = perp(d);
20681
20687
  const own2 = wallSides(wall);
20682
- const across = [add(p, scale(n3, own2.right)), add(p, scale(n3, -own2.left))];
20688
+ const across2 = [add(p, scale(n3, own2.right)), add(p, scale(n3, -own2.left))];
20683
20689
  const course = courseOf(other);
20684
20690
  const { left, right } = wallSides(other);
20685
- const at2 = across.map((q) => course.project(q));
20691
+ const at2 = across2.map((q) => course.project(q));
20686
20692
  if (at2.some(({ along: along2 }) => along2 < -ABUT_TOLERANCE || along2 > course.length + ABUT_TOLERANCE)) return false;
20687
20693
  for (const [face, body] of [[right, -1], [-left, 1]]) {
20688
20694
  if (!at2.every(({ across: c }) => Math.abs(c - face) < ABUT_TOLERANCE)) continue;
@@ -20864,8 +20870,8 @@ function cap(p, wall, away, doc, seams, stopped) {
20864
20870
  const other = next;
20865
20871
  const passes = me.join === "through" || me.join !== "butt" && other.join === "butt";
20866
20872
  const [passing, stopping] = passes ? [me, other] : [other, me];
20867
- const across = perp(passing.d);
20868
- const face = dot(stopping.d, across) >= 0 ? add(p, scale(across, passing.plus)) : sub(p, scale(across, passing.minus));
20873
+ const across2 = perp(passing.d);
20874
+ const face = dot(stopping.d, across2) >= 0 ? add(p, scale(across2, passing.plus)) : sub(p, scale(across2, passing.minus));
20869
20875
  const turn2 = cross(stopping.d, passing.d);
20870
20876
  const lands = (sign) => {
20871
20877
  const from = add(p, scale(perp(stopping.d), sign > 0 ? stopping.plus : -stopping.minus));
@@ -20876,7 +20882,7 @@ function cap(p, wall, away, doc, seams, stopped) {
20876
20882
  const cut = [lands(-1), lands(1)];
20877
20883
  if (lineShown(true) && drawsLine(!passes)) seams?.push([cut[0], cut[1]]);
20878
20884
  if (passes) return square(sub(p, scale(away, reach2)));
20879
- const plusSide = dot(stopping.d, across) >= 0;
20885
+ const plusSide = dot(stopping.d, across2) >= 0;
20880
20886
  if (stopped && passing.wall) stopped.stop = { wall: passing.wall, side: plusSide === (passing.end === "a") ? 1 : -1 };
20881
20887
  return cut;
20882
20888
  }
@@ -20982,16 +20988,16 @@ function openingSpan(node2, registry3) {
20982
20988
  function overlap(wall, span) {
20983
20989
  if (dist(wall.a, wall.b) < 1e-6) return null;
20984
20990
  const course = courseOf(wall);
20985
- const length = course.length;
20991
+ const length2 = course.length;
20986
20992
  const ts = [];
20987
20993
  const { left, right } = wallSides(wall);
20988
20994
  for (const p of span) {
20989
- const { along: along2, across } = course.project(p);
20990
- if (across < -left - 1e-6 || across > right + 1e-6) return null;
20995
+ const { along: along2, across: across2 } = course.project(p);
20996
+ if (across2 < -left - 1e-6 || across2 > right + 1e-6) return null;
20991
20997
  ts.push(along2);
20992
20998
  }
20993
20999
  const from = Math.max(0, Math.min(...ts));
20994
- const to = Math.min(length, Math.max(...ts));
21000
+ const to = Math.min(length2, Math.max(...ts));
20995
21001
  return to - from > 1e-6 ? [from, to] : null;
20996
21002
  }
20997
21003
  function wallOpenings(doc, wall, registry3) {
@@ -21338,12 +21344,12 @@ var arrayModifier = {
21338
21344
  const columns = Math.min(whole(params.count), MAX_COPIES);
21339
21345
  const rows = Math.min(whole(params.rows), Math.max(1, Math.floor(MAX_COPIES / columns)));
21340
21346
  const origin = applyTransform({ x: 0, y: 0 }, frame);
21341
- const across = sub(applyTransform({ x: Number(params.dx) || 0, y: 0 }, frame), origin);
21347
+ const across2 = sub(applyTransform({ x: Number(params.dx) || 0, y: 0 }, frame), origin);
21342
21348
  const down = sub(applyTransform({ x: 0, y: Number(params.dy) || 0 }, frame), origin);
21343
21349
  const out = [];
21344
21350
  for (let row = 0; row < rows; row++) {
21345
21351
  for (let column = 0; column < columns; column++) {
21346
- const by = { x: across.x * column + down.x * row, y: across.y * column + down.y * row };
21352
+ const by = { x: across2.x * column + down.x * row, y: across2.y * column + down.y * row };
21347
21353
  out.push(...row === 0 && column === 0 ? prims : prims.map((prim) => transformPrimitive(prim, by)));
21348
21354
  }
21349
21355
  }
@@ -21571,19 +21577,19 @@ function withoutSpikes(points) {
21571
21577
  }
21572
21578
  function wallPieces(wall, doc, cuts) {
21573
21579
  const course = courseOf(wall);
21574
- const length = course.length;
21580
+ const length2 = course.length;
21575
21581
  const { left: l, right: r } = wallSides(wall);
21576
21582
  const stopA = {};
21577
21583
  const stopB = {};
21578
21584
  const capA = cap(wall.a, wall, course.dir(0), doc, void 0, stopA);
21579
- const capB = cap(wall.b, wall, scale(course.dir(length), -1), doc, void 0, stopB);
21585
+ const capB = cap(wall.b, wall, scale(course.dir(length2), -1), doc, void 0, stopB);
21580
21586
  const pieces = [];
21581
21587
  const piece = (from, to) => {
21582
21588
  const start2 = from <= 0 ? capA : [course.offset(from, -l), course.offset(from, r)];
21583
- const end = to >= length ? capB : [course.offset(to, r), course.offset(to, -l)];
21589
+ const end = to >= length2 ? capB : [course.offset(to, r), course.offset(to, -l)];
21584
21590
  const face = (side, begin, stop) => {
21585
21591
  const lo = from <= 0 ? course.project(begin).along : from;
21586
- const hi = to >= length ? course.project(stop).along : to;
21592
+ const hi = to >= length2 ? course.project(stop).along : to;
21587
21593
  return course.stops.filter((s) => s > lo + 1e-3 && s < hi - 1e-3).map((s) => course.offset(s, side > 0 ? r : -l));
21588
21594
  };
21589
21595
  pieces.push({ start: start2, end, from, to, outline: withoutSpikes([...start2, ...face(1, start2[start2.length - 1], end[0]), ...end, ...face(-1, start2[0], end[end.length - 1]).reverse()]) });
@@ -21593,7 +21599,7 @@ function wallPieces(wall, doc, cuts) {
21593
21599
  if (from > start + 1e-6) piece(start, from);
21594
21600
  start = Math.max(start, to);
21595
21601
  }
21596
- if (start < length - 1e-6) piece(start, length);
21602
+ if (start < length2 - 1e-6) piece(start, length2);
21597
21603
  return { pieces, stops: { ...stopA.stop ? { a: stopA.stop } : {}, ...stopB.stop ? { b: stopB.stop } : {} } };
21598
21604
  }
21599
21605
  function wallSeams(wall, doc) {
@@ -21685,8 +21691,8 @@ function farSide(node2) {
21685
21691
  var SHORTEST = 100;
21686
21692
  var KEEP_WAY = Math.sin(4 * Math.PI / 180);
21687
21693
  function moveViewEnd(node2, end, p) {
21688
- const length = dist(node2.a, node2.b);
21689
- if (length < 1e-6) return {};
21694
+ const length2 = dist(node2.a, node2.b);
21695
+ if (length2 < 1e-6) return {};
21690
21696
  const d = norm(sub(node2.b, node2.a));
21691
21697
  const s = dot(sub(p, node2.a), d);
21692
21698
  const at2 = (t2) => ({ x: tidy(node2.a.x + d.x * t2), y: tidy(node2.a.y + d.y * t2) });
@@ -21694,14 +21700,14 @@ function moveViewEnd(node2, end, p) {
21694
21700
  const way = sub(p, other);
21695
21701
  const keeps = dist(p, other) < 1e-6 || Math.abs(cross(norm(way), d)) <= KEEP_WAY;
21696
21702
  if (end === "b") return { b: keeps ? at2(Math.max(SHORTEST, s)) : { x: tidy(p.x), y: tidy(p.y) } };
21697
- const t = Math.min(s, length - SHORTEST);
21703
+ const t = Math.min(s, length2 - SHORTEST);
21698
21704
  return { a: keeps ? at2(t) : { x: tidy(p.x), y: tidy(p.y) } };
21699
21705
  }
21700
21706
  var KEEP_TURN = Math.sin(3 * Math.PI / 180);
21701
21707
  function moveViewCorner(node2, corner, p, how = "turn") {
21702
21708
  if (how === "turn") return turnViewCorner(node2, corner, p);
21703
- const length = dist(node2.a, node2.b);
21704
- if (length < 1e-6) return {};
21709
+ const length2 = dist(node2.a, node2.b);
21710
+ if (length2 < 1e-6) return {};
21705
21711
  const d = norm(sub(node2.b, node2.a));
21706
21712
  const n3 = viewer(node2.a, node2.b);
21707
21713
  const look = { x: -n3.x, y: -n3.y };
@@ -21710,8 +21716,8 @@ function moveViewCorner(node2, corner, p, how = "turn") {
21710
21716
  const t = dot(sub(p, node2.a), look);
21711
21717
  const point2 = (along2, beyond) => ({ x: tidy(node2.a.x + d.x * along2 + look.x * beyond), y: tidy(node2.a.y + d.y * along2 + look.y * beyond) });
21712
21718
  const atStart = corner === 0 || corner === 3;
21713
- const from = atStart ? Math.min(s, length - SHORTEST) : 0;
21714
- const to = atStart ? length : Math.max(SHORTEST, s);
21719
+ const from = atStart ? Math.min(s, length2 - SHORTEST) : 0;
21720
+ const to = atStart ? length2 : Math.max(SHORTEST, s);
21715
21721
  if (corner === 0 || corner === 1) {
21716
21722
  const near2 = Math.min(t, deep);
21717
21723
  return { a: point2(from, near2), b: point2(to, near2), depth: tidy(deep - near2) };
@@ -21719,8 +21725,8 @@ function moveViewCorner(node2, corner, p, how = "turn") {
21719
21725
  return { ...atStart ? { a: point2(from, 0) } : { b: point2(to, 0) }, depth: tidy(Math.max(0, t)) };
21720
21726
  }
21721
21727
  function turnViewCorner(node2, corner, p) {
21722
- const length = dist(node2.a, node2.b);
21723
- if (length < 1e-6) return {};
21728
+ const length2 = dist(node2.a, node2.b);
21729
+ if (length2 < 1e-6) return {};
21724
21730
  const was = norm(sub(node2.b, node2.a));
21725
21731
  const lookOf = (u2) => ({ x: u2.y, y: -u2.x });
21726
21732
  const deep = depthOf(node2);
@@ -21755,13 +21761,13 @@ function turnViewCorner(node2, corner, p) {
21755
21761
  };
21756
21762
  }
21757
21763
  function moveViewEdge(node2, edge, p) {
21758
- const length = dist(node2.a, node2.b);
21759
- if (length < 1e-6) return {};
21764
+ const length2 = dist(node2.a, node2.b);
21765
+ if (length2 < 1e-6) return {};
21760
21766
  if (edge === "far") return { depth: depthThrough(node2, p) };
21761
21767
  const d = norm(sub(node2.b, node2.a));
21762
21768
  const s = dot(sub(p, node2.a), d);
21763
21769
  const at2 = (t2) => ({ x: tidy(node2.a.x + d.x * t2), y: tidy(node2.a.y + d.y * t2) });
21764
- if (edge === "start") return { a: at2(Math.min(s, length - SHORTEST)) };
21770
+ if (edge === "start") return { a: at2(Math.min(s, length2 - SHORTEST)) };
21765
21771
  if (edge === "end") return { b: at2(Math.max(SHORTEST, s)) };
21766
21772
  const n3 = viewer(node2.a, node2.b);
21767
21773
  const deep = depthOf(node2);
@@ -21783,8 +21789,8 @@ function faceUnder(wall, a, b) {
21783
21789
  const course = courseOf(wall);
21784
21790
  if (Math.abs(cross(course.dir(0), norm(sub(b, a)))) > 1e-3) return null;
21785
21791
  const face = dot(viewer(a, b), perp(course.dir(0))) > 0 ? "right" : "left";
21786
- const across = faceAcross(wall, face);
21787
- return [a, b].every((p) => Math.abs(course.project(p).across - across) <= ON_FACE) ? face : null;
21792
+ const across2 = faceAcross(wall, face);
21793
+ return [a, b].every((p) => Math.abs(course.project(p).across - across2) <= ON_FACE) ? face : null;
21788
21794
  }
21789
21795
  function heightsOf(kind, props, wall) {
21790
21796
  const bottom = kind.sill ? Math.max(0, Number(props[kind.sill]) || 0) : 0;
@@ -21827,8 +21833,8 @@ function clipConvex(subject, clip) {
21827
21833
  }
21828
21834
  return out;
21829
21835
  }
21830
- function clipLine(p, d, length, polygon) {
21831
- let [from, to] = [0, length];
21836
+ function clipLine(p, d, length2, polygon) {
21837
+ let [from, to] = [0, length2];
21832
21838
  const middle = polygon.reduce((m, q) => ({ x: m.x + q.x / polygon.length, y: m.y + q.y / polygon.length }), { x: 0, y: 0 });
21833
21839
  for (let i = 0; i < polygon.length; i++) {
21834
21840
  const [u, v] = [polygon[i], polygon[(i + 1) % polygon.length]];
@@ -21958,8 +21964,8 @@ function convexHull(points) {
21958
21964
  return [...half(sorted), ...half([...sorted].reverse())];
21959
21965
  }
21960
21966
  function seenFrom(facing, viewer2) {
21961
- const length = Math.hypot(facing.x, facing.y);
21962
- const c = length < 1e-9 ? 1 : dot(facing, viewer2) / length;
21967
+ const length2 = Math.hypot(facing.x, facing.y);
21968
+ const c = length2 < 1e-9 ? 1 : dot(facing, viewer2) / length2;
21963
21969
  return c >= Math.SQRT1_2 - 1e-9 ? "front" : c <= -Math.SQRT1_2 + 1e-9 ? "back" : "side";
21964
21970
  }
21965
21971
  var standingWeight = (p) => (p.kind === "path" || p.kind === "ellipse") && p.strokeWidth === void 0 ? { ...p, strokeWidth: STANDING_WEIGHT } : p;
@@ -21973,13 +21979,13 @@ function layout(view, doc, registry3, measure = () => []) {
21973
21979
  const line2 = lineOf(doc, view);
21974
21980
  if (!line2) return { prims: [], items: [] };
21975
21981
  const node2 = { ...line2, x: view.x, y: view.y, walls: view.walls, dimensions: view.dimensions };
21976
- const length = dist(node2.a, node2.b);
21977
- if (length < 1e-6) return { prims: [], items: [] };
21982
+ const length2 = dist(node2.a, node2.b);
21983
+ if (length2 < 1e-6) return { prims: [], items: [] };
21978
21984
  const d = norm(sub(node2.b, node2.a));
21979
21985
  const along2 = (p) => dot(sub(p, node2.a), d);
21980
21986
  const at2 = (s, h) => ({ x: node2.x + s, y: node2.y - h });
21981
21987
  const box = (s0, s1, h0, h1) => [at2(s0, h0), at2(s1, h0), at2(s1, h1), at2(s0, h1)];
21982
- const within = (s) => s >= -ON_FACE && s <= length + ON_FACE;
21988
+ const within = (s) => s >= -ON_FACE && s <= length2 + ON_FACE;
21983
21989
  const placed = (object3, shapes, h) => {
21984
21990
  const origin = applyTransform({ x: 0, y: 0 }, object3);
21985
21991
  const mirrored2 = dot(sub(applyTransform({ x: 1, y: 0 }, object3), origin), d) < 0;
@@ -22030,8 +22036,8 @@ function layout(view, doc, registry3, measure = () => []) {
22030
22036
  for (const face of ["right", "left"]) {
22031
22037
  const outward = perp(course.dir(0));
22032
22038
  if (dot(outward, front) * (face === "right" ? 1 : -1) <= 0) continue;
22033
- const across = faceAcross(wall, face);
22034
- const [p, q] = faceStretch(doc, wall, face).map((t) => course.offset(t, across));
22039
+ const across2 = faceAcross(wall, face);
22040
+ const [p, q] = faceStretch(doc, wall, face).map((t) => course.offset(t, across2));
22035
22041
  const [op, oq] = [off(p), off(q)];
22036
22042
  const [lo, hi] = [-deep - ON_FACE, ON_FACE];
22037
22043
  const at3 = (k) => ({ x: p.x + (q.x - p.x) * k, y: p.y + (q.y - p.y) * k });
@@ -22045,7 +22051,7 @@ function layout(view, doc, registry3, measure = () => []) {
22045
22051
  for (const { wall, face, ends: ends2 } of seenFaces) {
22046
22052
  const ss = ends2.map(along2);
22047
22053
  const from = Math.max(0, Math.min(...ss));
22048
- const to = Math.min(length, Math.max(...ss));
22054
+ const to = Math.min(length2, Math.max(...ss));
22049
22055
  if (to - from < 1e-6) continue;
22050
22056
  seen.add(wall.id);
22051
22057
  const height = heightOf(doc, wall);
@@ -22080,7 +22086,7 @@ function layout(view, doc, registry3, measure = () => []) {
22080
22086
  const course = courseOf(wall);
22081
22087
  const sides = wallSides(wall);
22082
22088
  const outline2 = [course.offset(0, -sides.left), course.offset(course.length, -sides.left), course.offset(course.length, sides.right), course.offset(0, sides.right)];
22083
- const taken = clipLine(node2.a, d, length, outline2);
22089
+ const taken = clipLine(node2.a, d, length2, outline2);
22084
22090
  if (taken) cutAt.set(wall.id, { taken });
22085
22091
  }
22086
22092
  const area = seenArea(node2);
@@ -22091,7 +22097,7 @@ function layout(view, doc, registry3, measure = () => []) {
22091
22097
  if (inside3.length < 3) continue;
22092
22098
  const ss = inside3.map(along2);
22093
22099
  const from = Math.max(0, Math.min(...ss));
22094
- const to = Math.min(length, Math.max(...ss));
22100
+ const to = Math.min(length2, Math.max(...ss));
22095
22101
  const cutThere = cutAt.get(wall.id)?.taken;
22096
22102
  const pieces = cutThere ? [[from, Math.min(to, cutThere[0])], [Math.max(from, cutThere[1]), to]] : [[from, to]];
22097
22103
  for (const [s0, s1] of pieces) if (s1 - s0 >= 1) inWay.push({ wall, from: s0, to: s1, depth: depthOn(inside3), height: heightOf(doc, wall) });
@@ -22141,7 +22147,7 @@ function layout(view, doc, registry3, measure = () => []) {
22141
22147
  if (nearest < -deep - ON_FACE || furthest > ON_FACE) continue;
22142
22148
  const ss = points.map(along2);
22143
22149
  const from = Math.max(0, Math.min(...ss));
22144
- const to = Math.min(length, Math.max(...ss));
22150
+ const to = Math.min(length2, Math.max(...ss));
22145
22151
  if (to - from < 1) continue;
22146
22152
  const drawn = looks ? looks.map(standingWeight) : [{ kind: "path", points: box(from, to, raised, raised + tall), closed: true, strokeWidth: STANDING_WEIGHT, own: true }];
22147
22153
  layers.push({ from, to, depth: depthOn(seenOf(points)), prims: shown(leaf, "standing", drawn) });
@@ -22155,23 +22161,23 @@ function layout(view, doc, registry3, measure = () => []) {
22155
22161
  const [nearest, furthest] = [Math.max(...offs), Math.min(...offs)];
22156
22162
  if (nearest < -deep - ON_FACE || furthest > ON_FACE) continue;
22157
22163
  const ss = points.map(along2);
22158
- if (Math.max(...ss) < 0 || Math.min(...ss) > length) continue;
22164
+ if (Math.max(...ss) < 0 || Math.min(...ss) > length2) continue;
22159
22165
  const kind = registry3.parametric.get(leaf.kind);
22160
22166
  const props = kind ? registry3.resolveProps(kind, leaf.props) : {};
22161
22167
  const own2 = kind?.front?.(props);
22162
22168
  const half = PLATE / 2;
22163
22169
  const h = heightAboveFloor(leaf, registry3) ?? 0;
22164
22170
  const prims = shown(leaf, "fixed", seenAs(leaf, props, h) ?? placed(leaf, own2 ?? [{ kind: "path", points: [{ x: -half, y: -half }, { x: half, y: -half }, { x: half, y: half }, { x: -half, y: half }], closed: true }], h));
22165
- layers.push({ from: Math.max(0, Math.min(...ss)), to: Math.min(length, Math.max(...ss)), depth: depthOn(seenOf(points)), prims });
22171
+ layers.push({ from: Math.max(0, Math.min(...ss)), to: Math.min(length2, Math.max(...ss)), depth: depthOn(seenOf(points)), prims });
22166
22172
  }
22167
- const [x0, x1] = [node2.x, node2.x + length];
22168
- const ends = box(0, length, -VIEW_HEIGHT, VIEW_HEIGHT);
22173
+ const [x0, x1] = [node2.x, node2.x + length2];
22174
+ const ends = box(0, length2, -VIEW_HEIGHT, VIEW_HEIGHT);
22169
22175
  const clipped = (p) => {
22170
22176
  const b = primitiveBounds(p);
22171
22177
  return b && (b.minX < x0 - ON_FACE || b.maxX > x1 + ON_FACE) ? { ...p, clip: [...p.clip ?? [], ends] } : p;
22172
22178
  };
22173
22179
  for (const item of items) item.box = { ...item.box, minX: Math.max(item.box.minX, x0), maxX: Math.min(item.box.maxX, x1) };
22174
- const floor = { kind: "path", points: [at2(0, 0), at2(length, 0)], strokeWidth: FLOOR_WEIGHT };
22180
+ const floor = { kind: "path", points: [at2(0, 0), at2(length2, 0)], strokeWidth: FLOOR_WEIGHT };
22175
22181
  const dimensions = [];
22176
22182
  const ordered = paintOrder(layers);
22177
22183
  const layerOf = new Map(ordered.flatMap((layer, i) => layer.prims.map((p) => [p, i])));
@@ -22182,7 +22188,7 @@ function layout(view, doc, registry3, measure = () => []) {
22182
22188
  }
22183
22189
  const placedItems = items.filter((item) => item.role === "fixed" && !item.hidden);
22184
22190
  if (node2.dimensions !== false && placedItems.length > 0) {
22185
- const stops = [0, ...placedItems.map((item) => along2(applyTransform({ x: 0, y: 0 }, item.node))), length].map((s) => Math.round(s)).sort((p, q) => p - q);
22191
+ const stops = [0, ...placedItems.map((item) => along2(applyTransform({ x: 0, y: 0 }, item.node))), length2].map((s) => Math.round(s)).sort((p, q) => p - q);
22186
22192
  const chain = stops.filter((s, i) => i === 0 || s - stops[i - 1] >= 1);
22187
22193
  for (let i = 1; i < chain.length; i++) dimensions.push(...measure(at2(chain[i - 1], 0), at2(chain[i], 0), CHAIN_BELOW));
22188
22194
  for (const item of placedItems) {
@@ -22199,9 +22205,9 @@ function carriers(doc, node2) {
22199
22205
  const face = faceUnder(wall, node2.a, node2.b);
22200
22206
  if (!face) return [];
22201
22207
  const course = courseOf(wall);
22202
- const across = faceAcross(wall, face);
22208
+ const across2 = faceAcross(wall, face);
22203
22209
  const stretch = faceStretch(doc, wall, face);
22204
- return [{ wall, face, stretch, ends: [course.offset(stretch[0], across), course.offset(stretch[1], across)] }];
22210
+ return [{ wall, face, stretch, ends: [course.offset(stretch[0], across2), course.offset(stretch[1], across2)] }];
22205
22211
  });
22206
22212
  }
22207
22213
  function elevationFollowOps(before, after, changed) {
@@ -22223,7 +22229,7 @@ function elevationFollowOps(before, after, changed) {
22223
22229
  if (!on) continue;
22224
22230
  const { old, now } = walls.get(on.wall.id);
22225
22231
  const [was, is] = [courseOf(old), courseOf(now)];
22226
- const across = faceAcross(now, on.face);
22232
+ const across2 = faceAcross(now, on.face);
22227
22233
  const still = carriers(after, far);
22228
22234
  const stretch = faceStretch(after, now, on.face);
22229
22235
  const d = norm(sub(far.b, far.a));
@@ -22231,7 +22237,7 @@ function elevationFollowOps(before, after, changed) {
22231
22237
  const s = was.project(p).along;
22232
22238
  const atEnd = Math.abs(s - on.stretch[0]) <= ON_FACE ? stretch[0] : Math.abs(s - on.stretch[1]) <= ON_FACE ? stretch[1] : null;
22233
22239
  if (atEnd !== null ? still.some(({ ends }) => ends.some((end) => dist(end, p) <= ON_FACE)) : still.some(({ ends }) => (dot(sub(p, ends[0]), d) + ON_FACE) * (dot(sub(p, ends[1]), d) - ON_FACE) <= 0)) return p;
22234
- const q = is.offset(atEnd ?? followAlong(old, now, s, 0), across);
22240
+ const q = is.offset(atEnd ?? followAlong(old, now, s, 0), across2);
22235
22241
  return { x: tidy(q.x), y: tidy(q.y) };
22236
22242
  };
22237
22243
  const [a, b] = [follow(far.a), follow(far.b)];
@@ -22331,7 +22337,7 @@ function quantities(doc, pageId, registry3) {
22331
22337
  const drawn = apply(map, along2);
22332
22338
  const stretch = chord < 1e-9 ? Math.sqrt(Math.abs(det(map))) : Math.hypot(drawn.x, drawn.y) / chord;
22333
22339
  const thick = stretch > 0 ? wall.thickness * Math.abs(det(map)) / stretch : wall.thickness;
22334
- const length = wallLength(wall) * stretch / 1e3;
22340
+ const length2 = wallLength(wall) * stretch / 1e3;
22335
22341
  const height = wall.height ?? storey;
22336
22342
  const openings = wallOpenings(doc, wall, registry3);
22337
22343
  let cut = 0;
@@ -22346,13 +22352,13 @@ function quantities(doc, pageId, registry3) {
22346
22352
  if (seen2) seen2.count++;
22347
22353
  else kinds.set(key2, { kind: node2.kind, label: kind?.label ?? node2.kind, width: round(width), height: own2 === null ? null : round(own2), count: 1 });
22348
22354
  }
22349
- const gross = height === null ? null : length * height / 1e3;
22355
+ const gross = height === null ? null : length2 * height / 1e3;
22350
22356
  const net = gross === null ? null : Math.max(0, gross - cut);
22351
22357
  const material2 = materialName(wall.material);
22352
22358
  const thickness = round(thick, 1);
22353
22359
  const key = `${materialId(wall.material)} ${thickness}`;
22354
22360
  const seen = made.get(key) ?? { material: material2, thickness, length: 0, area: 0, volume: 0, unknown: false };
22355
- seen.length += length;
22361
+ seen.length += length2;
22356
22362
  if (net === null) seen.unknown = true;
22357
22363
  else {
22358
22364
  seen.area += net;
@@ -22364,10 +22370,10 @@ function quantities(doc, pageId, registry3) {
22364
22370
  name: wall.name ?? "",
22365
22371
  material: material2,
22366
22372
  materialId: materialId(wall.material),
22367
- length: round(length),
22373
+ length: round(length2),
22368
22374
  thickness: round(thick, 1),
22369
22375
  height: height === null ? null : round(height / 1e3),
22370
- footprint: round(length * thick / 1e3),
22376
+ footprint: round(length2 * thick / 1e3),
22371
22377
  openings: openings.length,
22372
22378
  gross: gross === null ? null : round(gross),
22373
22379
  cut: gross === null ? null : round(cut),
@@ -22546,10 +22552,10 @@ function linkPath(doc, link, drawn) {
22546
22552
  const ends = linkEnds(doc, link, drawn);
22547
22553
  if (!ends) return null;
22548
22554
  const { boxes, a, b } = ends;
22549
- const length = dist(a, b);
22550
- if (length < 1e-6) return null;
22555
+ const length2 = dist(a, b);
22556
+ if (length2 < 1e-6) return null;
22551
22557
  const bend = linkBend(doc, link, a, b);
22552
- const pull = add(mid(a, b), scale(leftOf(a, b), bend * length));
22558
+ const pull = add(mid(a, b), scale(leftOf(a, b), bend * length2));
22553
22559
  const points = Array.from({ length: LINK_STEPS + 1 }, (_, i) => {
22554
22560
  const t = i / LINK_STEPS;
22555
22561
  const [p, q, r] = [(1 - t) * (1 - t), 2 * (1 - t) * t, t * t];
@@ -22572,11 +22578,11 @@ function bendThrough(doc, link, p, drawn) {
22572
22578
  const ends = linkEnds(doc, link, drawn);
22573
22579
  if (!ends) return null;
22574
22580
  const { a, b } = ends;
22575
- const length = dist(a, b);
22576
- if (length < 1e-6) return null;
22581
+ const length2 = dist(a, b);
22582
+ if (length2 < 1e-6) return null;
22577
22583
  const left = leftOf(a, b);
22578
22584
  const off = sub(p, mid(a, b));
22579
- return Math.round(2 * (off.x * left.x + off.y * left.y) / length * 1e3) / 1e3;
22585
+ return Math.round(2 * (off.x * left.x + off.y * left.y) / length2 * 1e3) / 1e3;
22580
22586
  }
22581
22587
  function linkPrimitives(doc, link, drawn) {
22582
22588
  const points = linkPath(doc, link, drawn);
@@ -22861,10 +22867,10 @@ var DIVIDER_INK = "#8b9099";
22861
22867
  var VIEW_LINE_ARROW = 500;
22862
22868
  var VIEW_LINE_HEAD = 180;
22863
22869
  function viewLinePrimitives(node2) {
22864
- const length = Math.hypot(node2.b.x - node2.a.x, node2.b.y - node2.a.y);
22870
+ const length2 = Math.hypot(node2.b.x - node2.a.x, node2.b.y - node2.a.y);
22865
22871
  const line2 = { kind: "path", points: [node2.a, node2.b], dash: [14, 4, 2, 4], own: true };
22866
- if (length < 1e-6) return [line2];
22867
- const d = { x: (node2.b.x - node2.a.x) / length, y: (node2.b.y - node2.a.y) / length };
22872
+ if (length2 < 1e-6) return [line2];
22873
+ const d = { x: (node2.b.x - node2.a.x) / length2, y: (node2.b.y - node2.a.y) / length2 };
22868
22874
  const look = { x: d.y, y: -d.x };
22869
22875
  const head = VIEW_LINE_HEAD;
22870
22876
  return [
@@ -22927,11 +22933,11 @@ function symbolPrimitives(object3, ctx) {
22927
22933
  const node2 = object3.kind === "component" ? { ...base2, type: "instance", component: object3.id } : { ...base2, type: "parametric", kind: object3.id, props: object3.props ?? {} };
22928
22934
  return nodePrimitives(node2, { ...ctx, depth: ctx.depth + 1 });
22929
22935
  }
22930
- function dimensionLabel(node2, length, drawing = {}) {
22936
+ function dimensionLabel(node2, length2, drawing = {}) {
22931
22937
  if (node2.text) return node2.text;
22932
22938
  const unit = node2.unit ?? "mm";
22933
- if (unit === "ft-in") return formatFeetInches(length, node2.fraction ?? 16);
22934
- const value = (length / { mm: 1, cm: 10, m: 1e3, in: 25.4, ft: 304.8 }[unit]).toFixed(node2.decimals ?? { mm: 0, cm: 1, m: 2, in: 1, ft: 2 }[unit]).replace(".", node2.decimal ?? drawing.decimal ?? ".");
22939
+ if (unit === "ft-in") return formatFeetInches(length2, node2.fraction ?? 16);
22940
+ const value = (length2 / { mm: 1, cm: 10, m: 1e3, in: 25.4, ft: 304.8 }[unit]).toFixed(node2.decimals ?? { mm: 0, cm: 1, m: 2, in: 1, ft: 2 }[unit]).replace(".", node2.decimal ?? drawing.decimal ?? ".");
22935
22941
  return node2.showUnit ? `${value} ${unit}` : value;
22936
22942
  }
22937
22943
  function roomArea(node2, area, drawing = {}) {
@@ -22974,6 +22980,19 @@ function dimensionMarker(type, at2, out, along2, size, style) {
22974
22980
  return [];
22975
22981
  }
22976
22982
  }
22983
+ var TITLE_CAPTIONS = {
22984
+ project: "Project",
22985
+ client: "Client",
22986
+ address: "Address",
22987
+ sheet: "Sheet title",
22988
+ page: "Page",
22989
+ author: "Drawn by",
22990
+ scale: "Scale",
22991
+ format: "Format",
22992
+ date: "Date",
22993
+ number: "Sheet no.",
22994
+ revisions: "Revisions"
22995
+ };
22977
22996
  var TITLE_HIDDEN = ["page"];
22978
22997
  var titleBlockHidden = (node2) => node2.titleBlock?.hide ?? TITLE_HIDDEN;
22979
22998
  function titleBlockValues(node2, doc) {
@@ -22992,7 +23011,8 @@ function titleBlockValues(node2, doc) {
22992
23011
  scale: `1:${s}`,
22993
23012
  format: paperFormat(node2)?.name ?? `${Math.round(node2.width / s)} \xD7 ${Math.round(node2.height / s)}`,
22994
23013
  date: fill(block.date),
22995
- number: fill(block.number)
23014
+ number: fill(block.number),
23015
+ revisions: fill(block.revisions)
22996
23016
  };
22997
23017
  }
22998
23018
  function titleBlock(node2, doc) {
@@ -23026,6 +23046,7 @@ function titleBlock(node2, doc) {
23026
23046
  ].filter(([field]) => shown(field) !== "");
23027
23047
  const cellsHeight = cells.length > 0 ? 9 : 0;
23028
23048
  const frame = { kind: "path", closed: true, ...ink, strokeWidth: 1.2, points: boxCorners({ x: node2.x + margin, y: node2.y + margin, width: node2.width - 2 * margin, height: node2.height - 2 * margin }) };
23049
+ if (doc.settings?.titleBlock?.layout === "strip") return [frame, ...titleStrip(node2, shown, doc.settings.titleBlock.labels ?? {}, { ink, line: line2, words })];
23029
23050
  const height = (headingHeight + namesHeight + cellsHeight) * s;
23030
23051
  if (height === 0) return [frame];
23031
23052
  const top = bottom - height;
@@ -23058,6 +23079,64 @@ function titleBlock(node2, doc) {
23058
23079
  }
23059
23080
  return out;
23060
23081
  }
23082
+ var MAX_REVISIONS = 20;
23083
+ function titleStrip(node2, shown, labels, draw) {
23084
+ const s = node2.scale ?? DEFAULT_PAPER_SCALE;
23085
+ const [width, margin, pad] = [70, 10, 3];
23086
+ const room = width - 2 * pad;
23087
+ const left = node2.x + node2.width - (margin + width) * s;
23088
+ const [top, bottom] = [node2.y + margin * s, node2.y + node2.height - margin * s];
23089
+ const caption = (field, y2) => {
23090
+ const text2 = (labels[field] ?? TITLE_CAPTIONS[field]).trim();
23091
+ return text2 ? [draw.words(text2, left + pad * s, y2 + 3.5 * s, 2, room)] : [];
23092
+ };
23093
+ const cell = (field, size = 3, bold = false) => {
23094
+ const lines = shown(field).split("\n").map((part) => part.trim()).filter(Boolean);
23095
+ if (lines.length === 0) return [];
23096
+ const step = size * 1.5;
23097
+ return [
23098
+ {
23099
+ height: 7 + size + (lines.length - 1) * step,
23100
+ draw: (y2) => [...caption(field, y2), ...lines.map((text2, i) => draw.words(text2, left + pad * s, y2 + (4.5 + size + i * step) * s, size, room, { bold }))]
23101
+ }
23102
+ ];
23103
+ };
23104
+ const revisions = (rows) => {
23105
+ if (rows.length === 0) return [];
23106
+ const starts = [0, 8, 26, width];
23107
+ const row = (text2, rowTop) => {
23108
+ const parts = text2.split("|").map((part) => part.trim());
23109
+ const cells = parts.length === 1 ? ["", "", parts[0]] : [parts[0], parts[1], parts.slice(2).join(" | ")];
23110
+ const out2 = [draw.line(left, rowTop, left + width * s, rowTop), draw.line(left + 8 * s, rowTop, left + 8 * s, rowTop + 5 * s), draw.line(left + 26 * s, rowTop, left + 26 * s, rowTop + 5 * s)];
23111
+ cells.forEach((words, i) => words && out2.push(draw.words(words, left + (starts[i] + 1.5) * s, rowTop + 3.7 * s, 2.5, starts[i + 1] - starts[i] - 3)));
23112
+ return out2;
23113
+ };
23114
+ return [{ height: 5 + rows.length * 5, draw: (y2) => [...caption("revisions", y2), ...rows.flatMap((text2, i) => row(text2, y2 + (5 + i * 5) * s))] }];
23115
+ };
23116
+ const below = [...cell("sheet", 4, true), ...cell("page"), ...cell("scale"), ...cell("format"), ...cell("number", 9, true)];
23117
+ const head = [...cell("project", 4.5, true), ...cell("client"), ...cell("address")];
23118
+ const signed = [...cell("author"), ...cell("date")];
23119
+ const sum = (cells) => cells.reduce((total, one) => total + one.height, 0);
23120
+ const free = (bottom - top) / s - sum(head) - sum(signed) - sum(below);
23121
+ if (free < 0) return [];
23122
+ const listed2 = shown("revisions").split("\n").map((row) => row.trim()).filter(Boolean);
23123
+ const above = [...head, ...revisions(listed2.slice(0, Math.max(0, Math.min(MAX_REVISIONS, Math.floor((free - 5) / 5))))), ...signed];
23124
+ if (above.length + below.length === 0) return [];
23125
+ const out = [{ kind: "path", closed: true, ...draw.ink, strokeWidth: 1.2, points: boxCorners({ x: left, y: top, width: width * s, height: bottom - top }) }];
23126
+ let y = top;
23127
+ above.forEach((one, i) => {
23128
+ if (i > 0) out.push(draw.line(left, y, left + width * s, y));
23129
+ out.push(...one.draw(y));
23130
+ y += one.height * s;
23131
+ });
23132
+ if (above.length > 0) out.push(draw.line(left, y, left + width * s, y));
23133
+ y = bottom - sum(below) * s;
23134
+ for (const one of below) {
23135
+ out.push(draw.line(left, y, left + width * s, y), ...one.draw(y));
23136
+ y += one.height * s;
23137
+ }
23138
+ return out;
23139
+ }
23061
23140
  function sheetContent(node2, ctx) {
23062
23141
  const component = node2.plain ? void 0 : sheetContentOf(ctx.doc);
23063
23142
  if (!component?.sheet || ctx.depth >= MAX_INSTANCE_DEPTH || rootOf(ctx.doc, node2.parent)?.id === component.id) return [];
@@ -23094,14 +23173,14 @@ function arcOf(node2) {
23094
23173
  return node2.from === void 0 && node2.to === void 0 ? null : { from: node2.from ?? 0, to: node2.to ?? 360 };
23095
23174
  }
23096
23175
  function annotationCurve(node2) {
23097
- const length = dist(node2.a, node2.b);
23176
+ const length2 = dist(node2.a, node2.b);
23098
23177
  const bend = node2.bend ?? ANNOTATION_BEND;
23099
23178
  if (node2.shape === "elbow") {
23100
23179
  const corner = { x: node2.a.x, y: node2.b.y };
23101
23180
  return dist(corner, node2.a) < 1e-6 || dist(corner, node2.b) < 1e-6 ? [node2.a, node2.b] : [node2.a, corner, node2.b];
23102
23181
  }
23103
- if (length < 1e-6 || Math.abs(bend) < 1e-6 || node2.shape === "straight") return [node2.a, node2.b];
23104
- const control = add(mid(node2.a, node2.b), scale(perp(norm(sub(node2.b, node2.a))), bend * length));
23182
+ if (length2 < 1e-6 || Math.abs(bend) < 1e-6 || node2.shape === "straight") return [node2.a, node2.b];
23183
+ const control = add(mid(node2.a, node2.b), scale(perp(norm(sub(node2.b, node2.a))), bend * length2));
23105
23184
  return Array.from({ length: 21 }, (_, i) => {
23106
23185
  const t = i / 20;
23107
23186
  const [p, q, r] = [(1 - t) ** 2, 2 * t * (1 - t), t ** 2];
@@ -23114,15 +23193,15 @@ function annotationText(node2) {
23114
23193
  return { x: node2.b.x + (right ? -1 : 1) * size * 0.3, y: node2.b.y + size * 0.35, size, right };
23115
23194
  }
23116
23195
  function annotationPrimitives(node2, ctx) {
23117
- const curve = annotationCurve(node2);
23196
+ const curve2 = annotationCurve(node2);
23118
23197
  const words = annotationText(node2);
23119
23198
  const text2 = textLines(said(node2.text, node2.parent, ctx), words, words.size, { align: words.right ? "right" : "left", font: node2.font });
23120
- if (curve.length < 2 || dist(node2.a, node2.b) < 1e-6) return text2;
23199
+ if (curve2.length < 2 || dist(node2.a, node2.b) < 1e-6) return text2;
23121
23200
  const markerSize3 = node2.markerSize ?? words.size * 0.75;
23122
- const atTip = norm(sub(curve[0], curve[1]));
23123
- const atText = norm(sub(curve[curve.length - 1], curve[curve.length - 2]));
23201
+ const atTip = norm(sub(curve2[0], curve2[1]));
23202
+ const atText = norm(sub(curve2[curve2.length - 1], curve2[curve2.length - 2]));
23124
23203
  return [
23125
- { kind: "path", points: curve },
23204
+ { kind: "path", points: curve2 },
23126
23205
  ...dimensionMarker(node2.startMarker ?? "arrow", node2.a, atTip, atTip, markerSize3, {}),
23127
23206
  ...dimensionMarker(node2.endMarker ?? "none", node2.b, atText, atText, markerSize3, {}),
23128
23207
  ...text2
@@ -23159,8 +23238,8 @@ function gridlinePrimitives(node2) {
23159
23238
  ];
23160
23239
  }
23161
23240
  function dimensionPrimitives(node2, drawing) {
23162
- const length = dist(node2.a, node2.b);
23163
- if (length < 1e-6) return [];
23241
+ const length2 = dist(node2.a, node2.b);
23242
+ if (length2 < 1e-6) return [];
23164
23243
  const size = node2.size ?? DIMENSION_TEXT_SIZE;
23165
23244
  const dir = norm(sub(node2.b, node2.a));
23166
23245
  const n3 = perp(dir);
@@ -23178,7 +23257,7 @@ function dimensionPrimitives(node2, drawing) {
23178
23257
  };
23179
23258
  const gap = scale(n3, side * (node2.extensionGap ?? 0));
23180
23259
  const overshoot = scale(n3, side * size * 0.4);
23181
- const label = dimensionLabel(node2, length, drawing);
23260
+ const label = dimensionLabel(node2, length2, drawing);
23182
23261
  const width = label.length * size * 0.55;
23183
23262
  const position = node2.textPosition ?? "above";
23184
23263
  let angle = 0;
@@ -23199,7 +23278,7 @@ function dimensionPrimitives(node2, drawing) {
23199
23278
  anchor2 = add(middle, scale(rotate({ x: 0, y: -1 }, angle), lift));
23200
23279
  cover = width / 2 + size * 0.3;
23201
23280
  }
23202
- const broken = position === "center" && length > 2 * cover;
23281
+ const broken = position === "center" && length2 > 2 * cover;
23203
23282
  const lines = broken ? [[a, sub(middle, scale(dir, cover))], [add(middle, scale(dir, cover)), b]] : [[a, b]];
23204
23283
  const markerSize3 = node2.markerSize ?? DIMENSION_MARKER_SIZE;
23205
23284
  return [
@@ -23432,16 +23511,16 @@ var KINDS = {
23432
23511
  move: moveAB,
23433
23512
  // The two ends, and the middle of the leader, which is dragged to bend it.
23434
23513
  handles: (node2) => {
23435
- const curve = annotationCurve(node2);
23436
- return (node2.shape ?? "curve") === "curve" ? [node2.a, node2.b, curve[Math.floor(curve.length / 2)]] : [node2.a, node2.b];
23514
+ const curve2 = annotationCurve(node2);
23515
+ return (node2.shape ?? "curve") === "curve" ? [node2.a, node2.b, curve2[Math.floor(curve2.length / 2)]] : [node2.a, node2.b];
23437
23516
  },
23438
23517
  moveHandle: (node2, index, p) => {
23439
23518
  if (index < 2) return moveHandleAB(node2, index, p);
23440
- const length = dist(node2.a, node2.b);
23441
- if (length < 1e-6) return {};
23519
+ const length2 = dist(node2.a, node2.b);
23520
+ if (length2 < 1e-6) return {};
23442
23521
  const off = sub(p, mid(node2.a, node2.b));
23443
- const across = perp(norm(sub(node2.b, node2.a)));
23444
- return { bend: Math.round(2 * (off.x * across.x + off.y * across.y) / length * 1e3) / 1e3 };
23522
+ const across2 = perp(norm(sub(node2.b, node2.a)));
23523
+ return { bend: Math.round(2 * (off.x * across2.x + off.y * across2.y) / length2 * 1e3) / 1e3 };
23445
23524
  },
23446
23525
  snapPoints: (node2) => [node2.a, node2.b],
23447
23526
  // A leader points at things; it is not one of them.
@@ -23684,9 +23763,9 @@ function near(mass, a, b, margin) {
23684
23763
  return [...found].sort((i, j) => i - j).filter((i) => mass.bounds[i].minX <= box.maxX && mass.bounds[i].maxX >= box.minX && mass.bounds[i].minY <= box.maxY && mass.bounds[i].maxY >= box.minY).map((i) => mass.shapes[i]);
23685
23764
  }
23686
23765
  function runsAlong(shape, p, q) {
23687
- const length = Math.hypot(q.x - p.x, q.y - p.y);
23688
- if (length < 1e-9) return false;
23689
- const u = { x: (q.x - p.x) / length, y: (q.y - p.y) / length };
23766
+ const length2 = Math.hypot(q.x - p.x, q.y - p.y);
23767
+ if (length2 < 1e-9) return false;
23768
+ const u = { x: (q.x - p.x) / length2, y: (q.y - p.y) / length2 };
23690
23769
  const middle = { x: (p.x + q.x) / 2, y: (p.y + q.y) / 2 };
23691
23770
  return shape.some((c, i) => {
23692
23771
  const e = shape[(i + 1) % shape.length];
@@ -23697,14 +23776,14 @@ function runsAlong(shape, p, q) {
23697
23776
  }
23698
23777
  function outsideMass(mass, a, b, of) {
23699
23778
  const d = { x: b.x - a.x, y: b.y - a.y };
23700
- const length = Math.hypot(d.x, d.y);
23701
- if (length < 1e-9) return [];
23779
+ const length2 = Math.hypot(d.x, d.y);
23780
+ if (length2 < 1e-9) return [];
23702
23781
  const shapes = near(mass, a, b, 2 * ASIDE);
23703
23782
  const cuts = [0, 1];
23704
23783
  for (const { points: other } of shapes) {
23705
23784
  other.forEach((c, i) => {
23706
23785
  const e = other[(i + 1) % other.length];
23707
- const along2 = ((c.x - a.x) * d.x + (c.y - a.y) * d.y) / (length * length);
23786
+ const along2 = ((c.x - a.x) * d.x + (c.y - a.y) * d.y) / (length2 * length2);
23708
23787
  if (along2 > 0 && along2 < 1 && distToSegment(c, a, b) < NEAR) cuts.push(along2);
23709
23788
  const cross2 = d.x * (e.y - c.y) - d.y * (e.x - c.x);
23710
23789
  if (Math.abs(cross2) < 1e-9) return;
@@ -23715,10 +23794,10 @@ function outsideMass(mass, a, b, of) {
23715
23794
  }
23716
23795
  cuts.sort((x, y) => x - y);
23717
23796
  const at2 = (t) => ({ x: a.x + d.x * t, y: a.y + d.y * t });
23718
- const aside = { x: -d.y / length * ASIDE, y: d.x / length * ASIDE };
23797
+ const aside = { x: -d.y / length2 * ASIDE, y: d.x / length2 * ASIDE };
23719
23798
  const parts = [];
23720
23799
  for (let i = 0; i + 1 < cuts.length; i++) {
23721
- if ((cuts[i + 1] - cuts[i]) * length < NEAR) continue;
23800
+ if ((cuts[i + 1] - cuts[i]) * length2 < NEAR) continue;
23722
23801
  const middle = at2((cuts[i] + cuts[i + 1]) / 2);
23723
23802
  const hides = (other) => !of || other.key === of.key || other.rank >= of.rank || runsAlong(other.points, at2(cuts[i]), at2(cuts[i + 1]));
23724
23803
  const walled = (q) => shapes.some((other) => pointInPolygon(q, other.points) && hides(other));
@@ -23874,18 +23953,18 @@ function backOf(node2, mount) {
23874
23953
  var faceAcross = (wall, face) => face === "right" ? wallSides(wall).right : -wallSides(wall).left;
23875
23954
  function faceStretch(doc, wall, face) {
23876
23955
  const course = courseOf(wall);
23877
- const across = faceAcross(wall, face);
23878
- const on = wallOutline(wall, doc).map((p) => course.project(p)).filter((p) => Math.abs(p.across - across) <= 0.5).map((p) => p.along);
23956
+ const across2 = faceAcross(wall, face);
23957
+ const on = wallOutline(wall, doc).map((p) => course.project(p)).filter((p) => Math.abs(p.across - across2) <= 0.5).map((p) => p.along);
23879
23958
  return on.length >= 2 ? [Math.min(...on), Math.max(...on)] : [0, course.length];
23880
23959
  }
23881
23960
  function onFace(wall, back) {
23882
23961
  const course = courseOf(wall);
23883
- const { along: along2, across } = course.project(back.at);
23962
+ const { along: along2, across: across2 } = course.project(back.at);
23884
23963
  if (along2 < -ON_FACE2 || along2 > course.length + ON_FACE2) return null;
23885
23964
  const d = course.dir(Math.max(0, Math.min(course.length, along2)));
23886
23965
  if (Math.abs(cross(d, back.along)) > ALONG_FACE) return null;
23887
23966
  const face = cross(d, back.out) > 0 ? "right" : "left";
23888
- return Math.abs(across - faceAcross(wall, face)) <= ON_FACE2 ? { wall, face, along: along2 } : null;
23967
+ return Math.abs(across2 - faceAcross(wall, face)) <= ON_FACE2 ? { wall, face, along: along2 } : null;
23889
23968
  }
23890
23969
  function mountedOn(doc, node2, registry3) {
23891
23970
  const mount = mountOf(node2, registry3);
@@ -23972,8 +24051,8 @@ function putBack(node2, old, now, registry3) {
23972
24051
  if (!opening) return null;
23973
24052
  const [was, is] = [courseOf(old), courseOf(now)];
23974
24053
  const middle = applyTransform({ x: (opening.from + opening.to) / 2, y: 0 }, node2);
23975
- const { along: along2, across } = was.project(middle);
23976
- const off = across - middleAcross(old);
24054
+ const { along: along2, across: across2 } = was.project(middle);
24055
+ const off = across2 - middleAcross(old);
23977
24056
  const s = followAlong(old, now, along2, Math.abs(opening.to - opening.from) / 2);
23978
24057
  const rotation2 = (((node2.rotation ?? 0) + angleOf(is.dir(0)) - angleOf(was.dir(0))) % 360 + 360) % 360;
23979
24058
  const centre = is.offset(s, middleAcross(now) + off);
@@ -24032,9 +24111,9 @@ function materialSeams(doc, wall, registry3) {
24032
24111
  const seams = [];
24033
24112
  for (const [p, q] of edges(wallPolygons(wall, doc, registry3))) {
24034
24113
  const d = { x: q.x - p.x, y: q.y - p.y };
24035
- const length = Math.hypot(d.x, d.y);
24036
- if (length < SHORT) continue;
24037
- const u = { x: d.x / length, y: d.y / length };
24114
+ const length2 = Math.hypot(d.x, d.y);
24115
+ if (length2 < SHORT) continue;
24116
+ const u = { x: d.x / length2, y: d.y / length2 };
24038
24117
  const off = (r) => cross(u, { x: r.x - p.x, y: r.y - p.y });
24039
24118
  const at2 = (r) => (r.x - p.x) * u.x + (r.y - p.y) * u.y;
24040
24119
  for (const [r, s] of theirs) {
@@ -24042,7 +24121,7 @@ function materialSeams(doc, wall, registry3) {
24042
24121
  if (theirLength < SHORT || Math.abs(off(r)) > TOUCH || Math.abs(off(s)) > TOUCH || (s.x - r.x) * u.x + (s.y - r.y) * u.y >= 0) continue;
24043
24122
  if (Math.abs(cross(u, { x: (s.x - r.x) / theirLength, y: (s.y - r.y) / theirLength })) > SKEW) continue;
24044
24123
  const from = Math.max(0, Math.min(at2(r), at2(s)));
24045
- const to = Math.min(length, Math.max(at2(r), at2(s)));
24124
+ const to = Math.min(length2, Math.max(at2(r), at2(s)));
24046
24125
  if (to - from > SHORT) seams.push([{ x: p.x + u.x * from, y: p.y + u.y * from }, { x: p.x + u.x * to, y: p.y + u.y * to }]);
24047
24126
  }
24048
24127
  }
@@ -24062,11 +24141,11 @@ var material = (wall) => wall.material ?? "";
24062
24141
  function sharedThickness(wall, other) {
24063
24142
  const course = courseOf(wall);
24064
24143
  const { left, right } = wallSides(wall);
24065
- const { across } = course.project(other.a);
24144
+ const { across: across2 } = course.project(other.a);
24066
24145
  const theirs = wallSides(other);
24067
24146
  const opposite = dot(course.dir(0), courseOf(other).dir(0)) < 0;
24068
24147
  const [before, after] = opposite ? [theirs.right, theirs.left] : [theirs.left, theirs.right];
24069
- return Math.min(right, across + after) - Math.max(-left, across - before);
24148
+ return Math.min(right, across2 + after) - Math.max(-left, across2 - before);
24070
24149
  }
24071
24150
  function aheadOf(from, way, wall) {
24072
24151
  for (let t = 0; t <= WALL_GAP; t += LOOK_STEP) if (wallContains(wall, add(from, scale(way, t)))) return t;
@@ -24079,8 +24158,8 @@ function gapAt(doc, wall, end) {
24079
24158
  const { left, right } = wallSides(wall);
24080
24159
  const from = course.offset(at2, middleAcross(wall));
24081
24160
  const others = wallsOver(wallIndex(doc, wall.parent), from, WALL_GAP + wall.thickness).filter((other2) => other2.id !== wall.id);
24082
- const across = [from, wall[end], course.offset(at2, -left), course.offset(at2, right)];
24083
- if (others.some((other2) => across.some((p) => distToBody(p, other2) < GAP))) return null;
24161
+ const across2 = [from, wall[end], course.offset(at2, -left), course.offset(at2, right)];
24162
+ if (others.some((other2) => across2.some((p) => distToBody(p, other2) < GAP))) return null;
24084
24163
  const way = scale(course.dir(at2), end === "a" ? -1 : 1);
24085
24164
  const stopped = others.filter((other2) => {
24086
24165
  if (aheadOf(from, way, other2) !== null) return true;
@@ -24292,13 +24371,27 @@ var OpSchema = discriminatedUnion("op", [
24292
24371
  op: literal("set_document"),
24293
24372
  name: string2().optional(),
24294
24373
  info: record(string2(), string2().nullable()).optional(),
24295
- settings: object({ system: _enum(["metric", "imperial"]).nullable().optional(), decimal: _enum([".", ","]).nullable().optional() }).optional()
24374
+ settings: object({
24375
+ system: _enum(["metric", "imperial"]).nullable().optional(),
24376
+ decimal: _enum([".", ","]).nullable().optional(),
24377
+ titleBlock: object({ layout: _enum(["corner", "strip"]).optional(), labels: record(string2(), string2()).optional() }).nullable().optional()
24378
+ }).optional()
24296
24379
  }).describe(
24297
- 'Renames the document and/or changes what it says about itself ("info": project, client, address, author), shown in title blocks, and/or how it writes its numbers ("settings": system, decimal). In "info" and "settings" each key replaces that entry and a null or empty value removes it.'
24380
+ 'Renames the document and/or changes what it says about itself ("info": project, client, address, author), shown in title blocks, and/or how it writes its numbers and lays out its title blocks ("settings": system, decimal, titleBlock). In "info" and "settings" each key replaces that entry and a null or empty value removes it.'
24298
24381
  )
24299
24382
  ]);
24300
24383
  var OpError = class extends Error {
24301
24384
  };
24385
+ function titleLayout(value) {
24386
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new OpError('The setting "titleBlock" is an object with "layout" and "labels".');
24387
+ const { layout: layout2, labels, ...rest } = value;
24388
+ const unknown2 = Object.keys(rest)[0];
24389
+ if (unknown2 !== void 0) throw new OpError(`Unknown title block setting "${unknown2}". Use layout or labels.`);
24390
+ if (layout2 !== void 0 && layout2 !== "corner" && layout2 !== "strip") throw new OpError(`The title block's layout is "corner" or "strip", not "${String(layout2)}".`);
24391
+ if (labels !== void 0 && (typeof labels !== "object" || labels === null || Array.isArray(labels) || Object.values(labels).some((text2) => typeof text2 !== "string")))
24392
+ throw new OpError(`The title block's labels are texts by entry, such as { "project": "Project" }.`);
24393
+ return { ...layout2 !== void 0 ? { layout: layout2 } : {}, ...labels !== void 0 ? { labels } : {} };
24394
+ }
24302
24395
  function parseOps(json) {
24303
24396
  const result = array(OpSchema).safeParse(json);
24304
24397
  if (!result.success) throw new OpError(`Invalid operations:
@@ -24592,10 +24685,16 @@ function applyOp(d, op, batch) {
24592
24685
  if (op.settings) {
24593
24686
  const settings = { ...d.settings };
24594
24687
  for (const [key, value] of Object.entries(op.settings)) {
24688
+ if (key === "titleBlock") {
24689
+ const block = value === null || value === void 0 ? {} : titleLayout(value);
24690
+ if (Object.keys(block).length > 0) settings[key] = block;
24691
+ else delete settings[key];
24692
+ continue;
24693
+ }
24595
24694
  const allowed = key === "system" ? ["metric", "imperial"] : key === "decimal" ? [".", ","] : null;
24596
- if (!allowed) throw new OpError(`Unknown drawing setting "${key}". Use system or decimal.`);
24695
+ if (!allowed) throw new OpError(`Unknown drawing setting "${key}". Use system, decimal or titleBlock.`);
24597
24696
  if (value === null || value === void 0) delete settings[key];
24598
- else if (!allowed.includes(value)) throw new OpError(`The setting "${key}" is ${allowed.map((one) => `"${one}"`).join(" or ")}, not "${value}".`);
24697
+ else if (typeof value !== "string" || !allowed.includes(value)) throw new OpError(`The setting "${key}" is ${allowed.map((one) => `"${one}"`).join(" or ")}, not "${String(value)}".`);
24599
24698
  else settings[key] = value;
24600
24699
  }
24601
24700
  if (Object.keys(settings).length > 0) d.settings = settings;
@@ -25048,9 +25147,9 @@ function inflate(data, size) {
25048
25147
  let code = 0;
25049
25148
  let first = 0;
25050
25149
  let index = 0;
25051
- for (let length = 1; length < 16; length++) {
25150
+ for (let length2 = 1; length2 < 16; length2++) {
25052
25151
  code |= bits(1);
25053
- const count2 = table.count[length];
25152
+ const count2 = table.count[length2];
25054
25153
  if (code - count2 < first) return table.symbol[index + (code - first)];
25055
25154
  index += count2;
25056
25155
  first = first + count2 << 1;
@@ -25070,11 +25169,11 @@ function inflate(data, size) {
25070
25169
  if (type === 0) {
25071
25170
  held = 0;
25072
25171
  bitsHeld = 0;
25073
- const length = data[pos] | data[pos + 1] << 8;
25172
+ const length2 = data[pos] | data[pos + 1] << 8;
25074
25173
  pos += 4;
25075
- out.set(data.subarray(pos, pos + length), at2);
25076
- at2 += length;
25077
- pos += length;
25174
+ out.set(data.subarray(pos, pos + length2), at2);
25175
+ at2 += length2;
25176
+ pos += length2;
25078
25177
  continue;
25079
25178
  }
25080
25179
  if (type === 3) throw new Error("The picture is damaged.");
@@ -25104,10 +25203,10 @@ function inflate(data, size) {
25104
25203
  out[at2++] = symbol;
25105
25204
  continue;
25106
25205
  }
25107
- const length = LENGTH_BASE[symbol - 257] + bits(LENGTH_EXTRA[symbol - 257]);
25206
+ const length2 = LENGTH_BASE[symbol - 257] + bits(LENGTH_EXTRA[symbol - 257]);
25108
25207
  const code = decode3(tables.distances);
25109
25208
  const back = DIST_BASE[code] + bits(DIST_EXTRA[code]);
25110
- for (let k = 0; k < length; k++, at2++) out[at2] = out[at2 - back];
25209
+ for (let k = 0; k < length2; k++, at2++) out[at2] = out[at2 - back];
25111
25210
  }
25112
25211
  }
25113
25212
  return out;
@@ -25124,9 +25223,9 @@ function decodePng(file) {
25124
25223
  let opacity = null;
25125
25224
  const data = [];
25126
25225
  for (let i = 8; i + 8 <= file.length; ) {
25127
- const length = u32(i);
25226
+ const length2 = u32(i);
25128
25227
  const type = String.fromCharCode(file[i + 4], file[i + 5], file[i + 6], file[i + 7]);
25129
- const body = file.subarray(i + 8, i + 8 + length);
25228
+ const body = file.subarray(i + 8, i + 8 + length2);
25130
25229
  if (type === "IHDR") {
25131
25230
  width = u32(i + 8);
25132
25231
  height = u32(i + 12);
@@ -25137,7 +25236,7 @@ function decodePng(file) {
25137
25236
  else if (type === "tRNS") opacity = body;
25138
25237
  else if (type === "IDAT") data.push(body);
25139
25238
  else if (type === "IEND") break;
25140
- i += 12 + length;
25239
+ i += 12 + length2;
25141
25240
  }
25142
25241
  if (!width || !height || data.length === 0) return null;
25143
25242
  const channels = [1, 0, 3, 1, 2, 0, 4][colour2];
@@ -25414,7 +25513,7 @@ function dxfOps(doc, parent, text2, options = {}) {
25414
25513
  const layerRows = tables.filter((row) => row.type === "LAYER");
25415
25514
  const layerRow = new Map(layerRows.map((row) => [first(row, 2) ?? "", row]));
25416
25515
  const layerOfHandle = new Map(layerRows.map((row) => [first(row, 5) ?? "", first(row, 2) ?? ""]));
25417
- const dashes = new Map(tables.filter((row) => row.type === "LTYPE").map((row) => [(first(row, 2) ?? "").toUpperCase(), (row.codes.get(49) ?? []).map((length) => Math.abs(parseFloat(length)))]));
25516
+ const dashes = new Map(tables.filter((row) => row.type === "LTYPE").map((row) => [(first(row, 2) ?? "").toUpperCase(), (row.codes.get(49) ?? []).map((length2) => Math.abs(parseFloat(length2)))]));
25418
25517
  const styles = new Map(
25419
25518
  tables.filter((row) => row.type === "STYLE").map((row) => {
25420
25519
  const family = first(row, 1e3) ?? (first(row, 3) ?? "").replace(/\.(ttf|ttc|otf|shx)$/i, "");
@@ -25486,7 +25585,7 @@ function dxfOps(doc, parent, text2, options = {}) {
25486
25585
  const strokeWidth = weight(entity, ctx);
25487
25586
  const kind = (first(entity, 6) ?? "").toUpperCase();
25488
25587
  const onPaper = number3(entity, 48, 1) * growth(ctx.m) / sheetScale.n / unit;
25489
- const dash = dashes.get(kind)?.length ? dashes.get(kind).map((length) => Math.max(1, round2(length * onPaper * 4))) : kind && !["BYLAYER", "BYBLOCK", "CONTINUOUS"].includes(kind) ? [6, 4] : void 0;
25588
+ const dash = dashes.get(kind)?.length ? dashes.get(kind).map((length2) => Math.max(1, round2(length2 * onPaper * 4))) : kind && !["BYLAYER", "BYBLOCK", "CONTINUOUS"].includes(kind) ? [6, 4] : void 0;
25490
25589
  return { ...stroke ? { stroke } : {}, ...strokeWidth ? { strokeWidth } : {}, ...dash ? { dash } : {} };
25491
25590
  };
25492
25591
  const styled = (node2, style) => Object.keys(style).length ? { ...node2, style } : node2;
@@ -25607,11 +25706,11 @@ function dxfOps(doc, parent, text2, options = {}) {
25607
25706
  const patternOf = (families, ctx, stroke) => {
25608
25707
  const lines2 = families.filter((family) => family.gap > 0);
25609
25708
  if (lines2.length === 0) return void 0;
25610
- const across = lines2.filter((family) => Math.abs(Math.cos((family.angle - lines2[0].angle) * Math.PI / 180)) < 0.1);
25611
- const along2 = lines2.filter((family) => !across.includes(family));
25709
+ const across2 = lines2.filter((family) => Math.abs(Math.cos((family.angle - lines2[0].angle) * Math.PI / 180)) < 0.1);
25710
+ const along2 = lines2.filter((family) => !across2.includes(family));
25612
25711
  const gap = (set) => Math.min(...set.map((family) => family.gap)) / set.length;
25613
- const grid = across.length > 0 && Math.max(gap(along2), gap(across)) < 2 * Math.min(gap(along2), gap(across));
25614
- const main2 = across.length > 0 && gap(across) < gap(along2) ? across : along2;
25712
+ const grid = across2.length > 0 && Math.max(gap(along2), gap(across2)) < 2 * Math.min(gap(along2), gap(across2));
25713
+ const main2 = across2.length > 0 && gap(across2) < gap(along2) ? across2 : along2;
25615
25714
  const angle = heading(ctx.m, main2[0].angle) % (grid ? 90 : 180);
25616
25715
  const fine = gap(main2) * growth(ctx.m) < 0.3 * sheetScale.n;
25617
25716
  return { kind: grid ? angle === 0 ? "Tiles" : "Cross" : "Lines", spacing: Math.max(0.1, round2(gap(main2) * (fine ? unit * sheetScale.n : growth(ctx.m)))), angle, stroke };
@@ -25722,17 +25821,17 @@ function dxfOps(doc, parent, text2, options = {}) {
25722
25821
  };
25723
25822
  const picture = (entity, ctx) => {
25724
25823
  const held = asset(pictures.get(first(entity, 340) ?? ""));
25725
- const [wide, high] = [number3(entity, 13), number3(entity, 23)];
25726
- if (!held || wide <= 0 || high <= 0) return null;
25824
+ const [wide, high2] = [number3(entity, 13), number3(entity, 23)];
25825
+ if (!held || wide <= 0 || high2 <= 0) return null;
25727
25826
  const [p, u, v] = [{ x: number3(entity, 10), y: number3(entity, 20) }, { x: number3(entity, 11), y: number3(entity, 21) }, { x: number3(entity, 12), y: number3(entity, 22) }];
25728
- const pixel = (x, y) => at(ctx.m, p.x + u.x * x + v.x * (high - y), p.y + u.y * x + v.y * (high - y));
25729
- const [corner, right, below] = [pixel(0, 0), pixel(wide, 0), pixel(0, high)];
25827
+ const pixel = (x, y) => at(ctx.m, p.x + u.x * x + v.x * (high2 - y), p.y + u.y * x + v.y * (high2 - y));
25828
+ const [corner, right, below] = [pixel(0, 0), pixel(wide, 0), pixel(0, high2)];
25730
25829
  const rotation2 = turn(Math.atan2(right.y - corner.y, right.x - corner.x) * 180 / Math.PI);
25731
25830
  const node2 = { type: "image", asset: held.id, x: corner.x, y: corner.y, width: round2(dist(corner, right)), height: round2(dist(corner, below)), ...rotation2 ? { rotation: rotation2 } : {} };
25732
25831
  if (number3(entity, 280) === 1) {
25733
25832
  const [xs, ys] = [(entity.codes.get(14) ?? []).map((x) => parseFloat(x) + 0.5), (entity.codes.get(24) ?? []).map((y) => parseFloat(y) + 0.5)];
25734
- const [left, top, far, bottom] = [Math.max(0, Math.min(...xs)), Math.max(0, Math.min(...ys)), Math.min(wide, Math.max(...xs)), Math.min(high, Math.max(...ys))];
25735
- if (xs.length > 1 && (left > 0.5 || top > 0.5 || far < wide - 0.5 || bottom < high - 0.5)) {
25833
+ const [left, top, far, bottom] = [Math.max(0, Math.min(...xs)), Math.max(0, Math.min(...ys)), Math.min(wide, Math.max(...xs)), Math.min(high2, Math.max(...ys))];
25834
+ if (xs.length > 1 && (left > 0.5 || top > 0.5 || far < wide - 0.5 || bottom < high2 - 0.5)) {
25736
25835
  const from = pixel(left, top);
25737
25836
  node2.modifiers = [{ type: "crop", frame: { x: from.x, y: from.y, ...rotation2 ? { rotation: rotation2 } : {} }, params: { width: round2(dist(from, pixel(far, top))), height: round2(dist(from, pixel(left, bottom))) } }];
25738
25837
  }
@@ -25908,9 +26007,9 @@ function dxfOps(doc, parent, text2, options = {}) {
25908
26007
  continue;
25909
26008
  }
25910
26009
  if (!windows.includes(entity)) continue;
25911
- const [wide, high, shrink] = [number3(entity, 40), number3(entity, 41), ratio(entity)];
26010
+ const [wide, high2, shrink] = [number3(entity, 40), number3(entity, 41), ratio(entity)];
25912
26011
  const seen = mul(shift(number3(entity, 10), number3(entity, 20)), mul([shrink, 0, 0, shrink, 0, 0], mul(shift(-number3(entity, 12), -number3(entity, 22)), mul(turned2(number3(entity, 51)), shift(-number3(entity, 17), -number3(entity, 27))))));
25913
- const corners = [at(onPaper, number3(entity, 10) - wide / 2, number3(entity, 20) + high / 2), at(onPaper, number3(entity, 10) + wide / 2, number3(entity, 20) - high / 2)];
26012
+ const corners = [at(onPaper, number3(entity, 10) - wide / 2, number3(entity, 20) + high2 / 2), at(onPaper, number3(entity, 10) + wide / 2, number3(entity, 20) - high2 / 2)];
25914
26013
  const box = { minX: Math.max(corners[0].x, hasPaper ? 0 : -Infinity), minY: Math.max(corners[0].y, hasPaper ? 0 : -Infinity), maxX: Math.min(corners[1].x, hasPaper ? size[0] * n3 : Infinity), maxY: Math.min(corners[1].y, hasPaper ? size[1] * n3 : Infinity) };
25915
26014
  if (box.maxX <= box.minX || box.maxY <= box.minY) continue;
25916
26015
  const frozen = new Set((entity.codes.get(331) ?? []).map((handle) => layerOfHandle.get(handle) ?? ""));
@@ -25986,9 +26085,10 @@ function drawingGuide(registry3, { pictures = true, schema: schema3 = true } = {
25986
26085
  kind: k.kind,
25987
26086
  what: k.description ? `${k.label}. ${k.description}` : k.label,
25988
26087
  props: Object.fromEntries(k.params.map((p) => [p.key, `${p.options ? `one of ${p.options.join(" | ")}` : p.type}${p.unit === "length" ? " in mm" : p.unit === "angle" ? " in degrees" : ""} (default ${p.default})`])),
25989
- cutsWalls: Boolean(k.opening),
25990
- fixedOnWall: k.mount?.on === "wall" ? { back: k.mount.back ?? 0, out: k.mount.out ?? "down", height: k.mount.height } : void 0,
25991
- againstWall: k.mount?.on === "floor" ? { back: k.mount.back ?? 0, out: k.mount.out ?? "down" } : void 0,
26088
+ // Only what is not the usual, so that sixty kinds stay well within what a client takes from a tool.
26089
+ cutsWalls: k.opening ? true : void 0,
26090
+ fixedOnWall: k.mount?.on === "wall" ? { back: k.mount.back || void 0, out: k.mount.out === "up" ? "up" : void 0, height: k.mount.height } : void 0,
26091
+ againstWall: k.mount?.on === "floor" ? { back: k.mount.back || void 0, out: k.mount.out === "up" ? "up" : void 0 } : void 0,
25992
26092
  ports: portsOfKind(k)
25993
26093
  }));
25994
26094
  return `# How a drawing is stored
@@ -26017,7 +26117,7 @@ ${JSON.stringify(kinds)}
26017
26117
 
26018
26118
  Kinds with "cutsWalls" are doors and windows. One cuts an opening when it lies on a wall: put its insertion point (x, y) in the middle of the wall's thickness (on its line for a wall without "justify", half its thickness off it towards the wall otherwise) and set its rotation to the wall's direction, the angle from the wall's "a" to "b". The opening then runs along the wall from the insertion point for its width. It adapts to the wall's thickness by itself, and moves with the wall only by being on it.
26019
26119
 
26020
- Kinds with "fixedOnWall" (sockets, switches, wall lights) are fixed on a face of a wall, and follow the wall when it changes only while they are exactly on it. Their own point (0, back) lies on the face, their own X along it, and they stand out of the wall into the room towards their own +Y, or -Y when "out" is "up". For a wall whose direction from "a" to "b" is the angle \u03B8, that is rotation \u03B8 on its right face (the face to the right as it runs from a to b, at +90\xB0 from its direction since Y grows downward) and \u03B8 + 180 on its left face, adding 180 to either when "out" is "up"; then place the insertion point so that (0, back) turned by that rotation lands on the face. "z" on such an object is its height above the floor in mm, to its centre; left out, it is the "height" given. Kinds with "againstWall" (kitchen units, a fridge, a washbasin) stand on the floor with their back against a face, placed by the same rule. Anything else, and a placement of a component, stands on the floor too unless given "z", the height of its underside above the floor in mm (a raised unit, a shelf, a mirror), which elevations draw it at.
26120
+ Kinds with "fixedOnWall" (sockets, switches, wall lights) are fixed on a face of a wall, and follow the wall when it changes only while they are exactly on it. Their own point (0, back) lies on the face, "back" being 0 when not given, their own X along it, and they stand out of the wall into the room towards their own +Y, or -Y when "out" is "up". For a wall whose direction from "a" to "b" is the angle \u03B8, that is rotation \u03B8 on its right face (the face to the right as it runs from a to b, at +90\xB0 from its direction since Y grows downward) and \u03B8 + 180 on its left face, adding 180 to either when "out" is "up"; then place the insertion point so that (0, back) turned by that rotation lands on the face. "z" on such an object is its height above the floor in mm, to its centre; left out, it is the "height" given. Kinds with "againstWall" (kitchen units, a fridge, a washbasin) stand on the floor with their back against a face, placed by the same rule. Anything else, and a placement of a component, stands on the floor too unless given "z", the height of its underside above the floor in mm (a raised unit, a shelf, a mirror), which elevations draw it at.
26021
26121
 
26022
26122
  A "group" holds several nodes so they are selected, moved and stacked as one. It has no coordinates of its own: to group nodes, add a group and set their "parent" to its id; to move a group, move the nodes inside it. Its "opacity" (0 to 1, 1 when left out) makes everything inside it see-through.
26023
26123
 
@@ -26033,7 +26133,7 @@ A "link" joins two objects of the same page by their ids, "from" and "to", throu
26033
26133
 
26034
26134
  An elevation or a section is two nodes: a "viewline" on the plan (a to b, and depth), which says what is seen, and an "elevation" that refers to it by "line" and says where its view is drawn (x, y, on any page). For an elevation of a wall's face, put the viewline 1000 in front of the face, with depth 1000, running so that the face is on its left (seen from its right); add the viewline before its view. Removing a viewline removes its views.
26035
26135
 
26036
- A "paper" is a sheet laid over the drawing that frames what goes on one printed page. Its width and height are in drawing millimetres: the sheet's real size times its "scale" (an A3 lying at 1:100 is 42000 \xD7 29700; an ARCH D, 24 \xD7 36 inches, lying at 1:48 is 43891.2 \xD7 29260.8). It has no children; whatever lies inside its rectangle is on it. Give it "titleBlock": {} (optionally with "project", "author", "date", "number") for a border and a title block; the person exports papers to PDF at their true scale from the File menu.
26136
+ A "paper" is a sheet laid over the drawing that frames what goes on one printed page. Its width and height are in drawing millimetres: the sheet's real size times its "scale" (an A3 lying at 1:100 is 42000 \xD7 29700; an ARCH D, 24 \xD7 36 inches, lying at 1:48 is 43891.2 \xD7 29260.8). It has no children; whatever lies inside its rectangle is on it. Give it "titleBlock": {} (optionally with "project", "author", "date", "number") for a border and a title block in its bottom right corner. The drawing's settings put the block of every sheet down its right edge instead, with captions, as on US sheets: set_document with "settings": { "titleBlock": { "layout": "strip" } }; each sheet then lists its own "revisions" in its "titleBlock", one per line as "mark | date | description". The person exports papers to PDF at their true scale from the File menu.
26037
26137
 
26038
26138
  A "dimension" shows the distance between "a" and "b"; "offset" is how far its line stands off them. An "annotation" is a note with a leader from the tip "a" to the text at "b". Texts may hold fields that are filled in when drawn: {date}, {page}, {page-number}, {pages}, {document}.
26039
26139
 
@@ -26045,7 +26145,7 @@ Call apply_operations with a list of operations:
26045
26145
  - update_node: {"op":"update_node","id":"...","patch":{...}}. The patch replaces the properties it names; a null value removes a property. Nested objects such as "a", "props" and "style" are replaced whole, so include every field of the one you change. Setting "parent" or "order" moves the node.
26046
26146
  - remove_node: {"op":"remove_node","id":"..."}. It takes along everything inside the node; removing a component also removes its instances, and removing an object the links that join it to others.
26047
26147
  - add_layer, update_layer, remove_layer; add_color, update_color, remove_color; add_dimension_style, update_dimension_style, remove_dimension_style, as described above.
26048
- - set_document: renames the drawing, and with "info" sets its project, client, address and author, which every sheet's title block shows.
26148
+ - set_document: renames the drawing, and with "info" sets its project, client, address and author, which every sheet's title block shows; with "settings" sets how it writes its numbers ("system", "decimal") and lays out its title blocks ("titleBlock").
26049
26149
  - add_asset embeds a picture's file for an image node; it is for the app's own imports, and you will not need it.
26050
26150
 
26051
26151
  ${CHECKING}${pictures ? ` ${LOOKING}` : ""}`;
@@ -26100,8 +26200,8 @@ function readTrueType(bytes) {
26100
26200
  const record2 = at2 + 6 + i * 12;
26101
26201
  if (data.getUint16(record2 + 6) !== 6) continue;
26102
26202
  const platform = data.getUint16(record2);
26103
- const [length, offset] = [data.getUint16(record2 + 8), strings + data.getUint16(record2 + 10)];
26104
- const text2 = platform === 1 ? String.fromCharCode(...bytes.subarray(offset, offset + length)) : String.fromCharCode(...Array.from({ length: length / 2 }, (_, k) => data.getUint16(offset + 2 * k)));
26203
+ const [length2, offset] = [data.getUint16(record2 + 8), strings + data.getUint16(record2 + 10)];
26204
+ const text2 = platform === 1 ? String.fromCharCode(...bytes.subarray(offset, offset + length2)) : String.fromCharCode(...Array.from({ length: length2 / 2 }, (_, k) => data.getUint16(offset + 2 * k)));
26105
26205
  const clean = text2.replace(/[^A-Za-z0-9-]/g, "");
26106
26206
  if (clean) return clean;
26107
26207
  }
@@ -26131,7 +26231,7 @@ function readTrueType(bytes) {
26131
26231
  outlines2.push(copy);
26132
26232
  }
26133
26233
  const count2 = order.length;
26134
- const padded = (length) => length + 3 & ~3;
26234
+ const padded = (length2) => length2 + 3 & ~3;
26135
26235
  const glyfOut = new Uint8Array(outlines2.reduce((sum, o) => sum + padded(o.length), 0));
26136
26236
  const locaOut = new DataView(new ArrayBuffer(4 * (count2 + 1)));
26137
26237
  let offset = 0;
@@ -26181,11 +26281,11 @@ function characterMap(data, cmap) {
26181
26281
  const known = /* @__PURE__ */ new Map();
26182
26282
  const find = (code) => {
26183
26283
  if (full >= 0) {
26184
- let [low2, high2] = [0, data.getUint32(full + 12) - 1];
26185
- while (low2 <= high2) {
26186
- const middle = low2 + high2 >> 1;
26284
+ let [low2, high3] = [0, data.getUint32(full + 12) - 1];
26285
+ while (low2 <= high3) {
26286
+ const middle = low2 + high3 >> 1;
26187
26287
  const group = full + 16 + middle * 12;
26188
- if (code < data.getUint32(group)) high2 = middle - 1;
26288
+ if (code < data.getUint32(group)) high3 = middle - 1;
26189
26289
  else if (code > data.getUint32(group + 4)) low2 = middle + 1;
26190
26290
  else return data.getUint32(group + 8) + code - data.getUint32(group);
26191
26291
  }
@@ -26197,11 +26297,11 @@ function characterMap(data, cmap) {
26197
26297
  const starts = ends + 2 * segments + 2;
26198
26298
  const deltas = starts + 2 * segments;
26199
26299
  const ranges = deltas + 2 * segments;
26200
- let [low, high] = [0, segments - 1];
26201
- while (low < high) {
26202
- const middle = low + high >> 1;
26300
+ let [low, high2] = [0, segments - 1];
26301
+ while (low < high2) {
26302
+ const middle = low + high2 >> 1;
26203
26303
  if (data.getUint16(ends + 2 * middle) < code) low = middle + 1;
26204
- else high = middle;
26304
+ else high2 = middle;
26205
26305
  }
26206
26306
  const start = data.getUint16(starts + 2 * low);
26207
26307
  if (code < start || code > data.getUint16(ends + 2 * low)) return 0;
@@ -26218,13 +26318,13 @@ function characterMap(data, cmap) {
26218
26318
  }
26219
26319
  function writeFont(tables) {
26220
26320
  tables.sort(([a], [b]) => a < b ? -1 : 1);
26221
- const padded = (length) => length + 3 & ~3;
26321
+ const padded = (length2) => length2 + 3 & ~3;
26222
26322
  const directory = 12 + 16 * tables.length;
26223
26323
  const file = new Uint8Array(directory + tables.reduce((sum, [, body]) => sum + padded(body.length), 0));
26224
26324
  const view = new DataView(file.buffer);
26225
- const checksum = (from, length) => {
26325
+ const checksum = (from, length2) => {
26226
26326
  let sum = 0;
26227
- for (let at2 = from; at2 < from + padded(length); at2 += 4) sum = sum + view.getUint32(at2) >>> 0;
26327
+ for (let at2 = from; at2 < from + padded(length2); at2 += 4) sum = sum + view.getUint32(at2) >>> 0;
26228
26328
  return sum;
26229
26329
  };
26230
26330
  const selector = Math.floor(Math.log2(tables.length));
@@ -26389,11 +26489,11 @@ function jpegInfo(bytes) {
26389
26489
  for (let i = 2; i + 9 < bytes.length; ) {
26390
26490
  if (bytes[i] !== 255) return null;
26391
26491
  const marker2 = bytes[i + 1];
26392
- const length = bytes[i + 2] << 8 | bytes[i + 3];
26492
+ const length2 = bytes[i + 2] << 8 | bytes[i + 3];
26393
26493
  if (marker2 >= 192 && marker2 <= 207 && marker2 !== 196 && marker2 !== 200 && marker2 !== 204) {
26394
26494
  return { height: bytes[i + 5] << 8 | bytes[i + 6], width: bytes[i + 7] << 8 | bytes[i + 8], channels: bytes[i + 9] };
26395
26495
  }
26396
- i += 2 + length;
26496
+ i += 2 + length2;
26397
26497
  }
26398
26498
  return null;
26399
26499
  }
@@ -26489,12 +26589,12 @@ function pageContent(doc, paper, registry3, resources) {
26489
26589
  }
26490
26590
  }
26491
26591
  if (index !== void 0) {
26492
- const across = rotate({ x: prim.width, y: 0 }, prim.rotation ?? 0);
26592
+ const across2 = rotate({ x: prim.width, y: 0 }, prim.rotation ?? 0);
26493
26593
  const down = rotate({ x: 0, y: prim.height }, prim.rotation ?? 0);
26494
26594
  const x = (prim.x + down.x - paper.x) * perMm;
26495
26595
  const y = height - (prim.y + down.y - paper.y) * perMm;
26496
26596
  alpha(prim.opacity ?? 1, 1);
26497
- out.push(`${n2(across.x * perMm)} ${n2(-across.y * perMm)} ${n2(-down.x * perMm)} ${n2(down.y * perMm)} ${n2(x)} ${n2(y)} cm /Im${index + 1} Do`);
26597
+ out.push(`${n2(across2.x * perMm)} ${n2(-across2.y * perMm)} ${n2(-down.x * perMm)} ${n2(down.y * perMm)} ${n2(x)} ${n2(y)} cm /Im${index + 1} Do`);
26498
26598
  }
26499
26599
  } else {
26500
26600
  const filled = fill ? parseColor(prim.fill) : null;
@@ -26563,15 +26663,15 @@ function toPDF(doc, registry3, paperIds, options = {}) {
26563
26663
  return [`<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ${n2(page.width)} ${n2(page.height)}] /Resources ${shared} /Contents ${firstPage + i * 2 + 1} 0 R >>`, [`<< /Length ${commands.length} >>`, commands]];
26564
26664
  })
26565
26665
  ];
26566
- let length = 0;
26666
+ let length2 = 0;
26567
26667
  const offsets = [];
26568
26668
  const write = (part) => {
26569
26669
  chunks.push(part);
26570
- length += part.length;
26670
+ length2 += part.length;
26571
26671
  };
26572
26672
  write("%PDF-1.4\n%\xE2\xE3\xCF\xD3\n");
26573
26673
  objects.forEach((object3, i) => {
26574
- offsets.push(length);
26674
+ offsets.push(length2);
26575
26675
  write(`${i + 1} 0 obj
26576
26676
  `);
26577
26677
  if (typeof object3 === "string") write(`${object3}
@@ -26585,7 +26685,7 @@ stream
26585
26685
  }
26586
26686
  write("endobj\n");
26587
26687
  });
26588
- const table = length;
26688
+ const table = length2;
26589
26689
  write(`xref
26590
26690
  0 ${objects.length + 1}
26591
26691
  0000000000 65535 f
@@ -26597,7 +26697,7 @@ startxref
26597
26697
  ${table}
26598
26698
  %%EOF
26599
26699
  `);
26600
- const file = new Uint8Array(length);
26700
+ const file = new Uint8Array(length2);
26601
26701
  let at2 = 0;
26602
26702
  for (const chunk of chunks) {
26603
26703
  if (typeof chunk === "string") for (let i = 0; i < chunk.length; i++) file[at2++] = chunk.charCodeAt(i) & 255;
@@ -26837,12 +26937,55 @@ function withViewLines(doc) {
26837
26937
  }
26838
26938
  return { ...doc, nodes };
26839
26939
  }
26940
+ var OFFICE_CHAIR = "arch.officechair";
26941
+ var length = (value, fallback, least) => Math.max(least, typeof value === "number" && Number.isFinite(value) ? value : fallback);
26942
+ function withOfficeChairs(doc) {
26943
+ if (!isPlain2(doc.nodes) || !Object.values(doc.nodes).some((node2) => isPlain2(node2) && deskDrewChair(node2))) return doc;
26944
+ const nodes = { ...doc.nodes };
26945
+ const orders = /* @__PURE__ */ new Map();
26946
+ for (const node2 of Object.values(nodes)) {
26947
+ if (isPlain2(node2) && typeof node2.order === "string" && isOrderKey(node2.order)) orders.set(node2.parent, [...orders.get(node2.parent) ?? [], node2.order]);
26948
+ }
26949
+ for (const [key, desk2] of Object.entries(doc.nodes)) {
26950
+ if (!isPlain2(desk2) || !deskDrewChair(desk2)) continue;
26951
+ const props = isPlain2(desk2.props) ? desk2.props : {};
26952
+ nodes[key] = { ...desk2, props: { ...props, chair: false } };
26953
+ const place = { x: typeof desk2.x === "number" ? desk2.x : 0, y: typeof desk2.y === "number" ? desk2.y : 0, rotation: typeof desk2.rotation === "number" ? desk2.rotation : 0, flipX: desk2.flipX === true };
26954
+ const at2 = applyTransform({ x: length(props.width, 1400, 600) / 2 + 330, y: length(props.depth, 700, 400) + 750 }, place);
26955
+ let order;
26956
+ if (typeof desk2.order === "string" && isOrderKey(desk2.order)) {
26957
+ const above = (orders.get(desk2.parent) ?? []).filter((other) => other > desk2.order).sort()[0] ?? null;
26958
+ order = generateKeyBetween(desk2.order, above);
26959
+ orders.set(desk2.parent, [...orders.get(desk2.parent) ?? [], order]);
26960
+ }
26961
+ let id = `${typeof desk2.id === "string" ? desk2.id : key}_chair`;
26962
+ while (id in nodes) id = `${id}_`;
26963
+ nodes[id] = {
26964
+ id,
26965
+ type: "parametric",
26966
+ parent: desk2.parent,
26967
+ ...order ? { order } : {},
26968
+ ..."layer" in desk2 ? { layer: desk2.layer } : {},
26969
+ ...desk2.visible === false ? { visible: false } : {},
26970
+ ...desk2.locked === true ? { locked: true } : {},
26971
+ kind: OFFICE_CHAIR,
26972
+ props: {},
26973
+ x: at2.x,
26974
+ y: at2.y,
26975
+ rotation: ((place.rotation + 180) % 360 + 360) % 360,
26976
+ ...place.flipX ? { flipX: true } : {}
26977
+ };
26978
+ }
26979
+ return { ...doc, nodes };
26980
+ }
26840
26981
  var MIGRATIONS = [
26841
26982
  (doc) => toVersion2(withoutWallTypes(doc)),
26842
26983
  // Version 3 brings elevations and sections (the `viewline` and `elevation` node types) and nothing that changes what was there.
26843
26984
  (doc) => doc,
26844
26985
  // Version 4 brings links between objects (the `link` node type): a switch and the lights it controls. Nothing else changes.
26845
- (doc) => doc
26986
+ (doc) => doc,
26987
+ // Version 5: a desk's office chair is an object of its own.
26988
+ withOfficeChairs
26846
26989
  ];
26847
26990
 
26848
26991
  // packages/core/src/repair.ts
@@ -27450,12 +27593,20 @@ function boxSide(depth, height, front = FRONT) {
27450
27593
  var COUNTER_TOP = 850;
27451
27594
  var COUNTER = 30;
27452
27595
  var VANITY_FOOT = 300;
27453
- function washbasinFront(w, bowls, below) {
27596
+ var VANITY_LEGS = 150;
27597
+ var vanityFoot = (feet2) => feet2 ? VANITY_LEGS : VANITY_FOOT;
27598
+ var vanityLegs = (w) => {
27599
+ const leg = Math.min(40, w / 8);
27600
+ const inset = Math.min(30, w / 10);
27601
+ return [rect(inset, 0, inset + leg, -VANITY_LEGS), rect(w - inset - leg, 0, w - inset, -VANITY_LEGS)];
27602
+ };
27603
+ function washbasinFront(w, bowls, below, feet2) {
27454
27604
  const n3 = Math.min(MAX_BOWLS, count(bowls));
27455
27605
  const share = w / n3;
27456
27606
  const prims = [rect(0, -COUNTER_TOP + COUNTER, w, -COUNTER_TOP)];
27457
27607
  if (below === "Drawers" || below === "Doors") {
27458
- prims.push(rect(0, -VANITY_FOOT, w, -COUNTER_TOP + COUNTER, THIN2), ...frontsOf(below, 0, w, -VANITY_FOOT, -COUNTER_TOP + COUNTER, w > 900 ? 2 : 1, 2));
27608
+ prims.push(rect(0, -vanityFoot(feet2), w, -COUNTER_TOP + COUNTER, THIN2), ...frontsOf(below, 0, w, -vanityFoot(feet2), -COUNTER_TOP + COUNTER, w > 900 ? 2 : 1, 2));
27609
+ if (feet2) prims.push(...vanityLegs(w));
27459
27610
  }
27460
27611
  for (let i = 0; i < n3; i++) {
27461
27612
  const cx = (i + 0.5) * share;
@@ -27465,9 +27616,12 @@ function washbasinFront(w, bowls, below) {
27465
27616
  }
27466
27617
  return prims;
27467
27618
  }
27468
- function washbasinSide(d, below) {
27619
+ function washbasinSide(d, below, feet2) {
27469
27620
  const prims = [rect(0, -COUNTER_TOP + COUNTER, d, -COUNTER_TOP), line([pt(60, -COUNTER_TOP), pt(60, -COUNTER_TOP - 180), pt(160, -COUNTER_TOP - 180), pt(160, -COUNTER_TOP - 140)], { strokeWidth: 1.5 })];
27470
- if (below === "Drawers" || below === "Doors") prims.push(rect(0, -VANITY_FOOT, Math.max(40, d - 20), -COUNTER_TOP + COUNTER, THIN2));
27621
+ if (below === "Drawers" || below === "Doors") {
27622
+ prims.push(rect(0, -vanityFoot(feet2), Math.max(40, d - 20), -COUNTER_TOP + COUNTER, THIN2));
27623
+ if (feet2) prims.push(...vanityLegs(Math.max(40, d - 20)));
27624
+ }
27471
27625
  return prims;
27472
27626
  }
27473
27627
  var MIN_COUNTER = 300;
@@ -27475,15 +27629,17 @@ var washbasin = (kind, label, width, depth, bowls) => ({
27475
27629
  kind,
27476
27630
  label,
27477
27631
  category: "bathroom",
27478
- description: "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.",
27632
+ description: "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.",
27479
27633
  params: [
27480
27634
  { ...WIDTH, default: width },
27481
27635
  { key: "depth", label: "Depth", type: "number", default: depth, unit: "length" },
27482
27636
  { key: "bowls", label: "Bowls", type: "number", default: bowls },
27483
- { key: "below", label: "Below", type: "string", default: "None", options: ["None", "Drawers", "Doors"] }
27637
+ { key: "below", label: "Below", type: "string", default: "None", options: ["None", "Drawers", "Doors"] },
27638
+ // The vanity unit under it, hung on the wall (as most are) or standing on feet.
27639
+ { key: "feet", label: "On feet", type: "boolean", default: false }
27484
27640
  ],
27485
- front: ({ width: width2, bowls: bowls2, below }) => washbasinFront(atLeast(1, width2), bowls2, below),
27486
- side: ({ depth: depth2, below }) => washbasinSide(atLeast(1, depth2), below),
27641
+ front: ({ width: width2, bowls: bowls2, below, feet: feet2 }) => washbasinFront(atLeast(1, width2), bowls2, below, feet2 === true),
27642
+ side: ({ depth: depth2, below, feet: feet2 }) => washbasinSide(atLeast(1, depth2), below, feet2 === true),
27487
27643
  box: {
27488
27644
  bounds: ({ width: width2, depth: depth2 }) => ({ left: 0, top: 0, right: atLeast(1, width2), bottom: atLeast(1, depth2) }),
27489
27645
  resize: (_, size) => ({
@@ -27515,6 +27671,155 @@ var washbasin = (kind, label, width, depth, bowls) => ({
27515
27671
  return prims;
27516
27672
  }
27517
27673
  });
27674
+ function bowl(cx, cy, halfWidth, back, front, square = 5) {
27675
+ return Array.from({ length: 72 }, (_, i) => {
27676
+ const t = i / 72 * 2 * Math.PI;
27677
+ const [c, s] = [Math.cos(t), Math.sin(t)];
27678
+ const power = (v, n4) => Math.sign(v) * Math.abs(v) ** (2 / n4);
27679
+ const n3 = s < 0 ? square : 2.2;
27680
+ return pt(cx + halfWidth * power(c, n3), cy + (s < 0 ? back : front) * power(s, n3));
27681
+ });
27682
+ }
27683
+ function across(outline2, y) {
27684
+ const xs = outline2.flatMap((p, i) => {
27685
+ const q = outline2[(i + 1) % outline2.length];
27686
+ return (p.y - y) * (q.y - y) <= 0 && p.y !== q.y ? [p.x + (y - p.y) * (q.x - p.x) / (q.y - p.y)] : [];
27687
+ });
27688
+ return xs.length > 0 ? [Math.min(...xs), Math.max(...xs)] : [0, 0];
27689
+ }
27690
+ var SEAT = 420;
27691
+ var CISTERN_TOP = 800;
27692
+ var HUNG_SEAT = 400;
27693
+ var FLUSH_PLATE = 1100;
27694
+ var LID = 430;
27695
+ var LID_THICK = 30;
27696
+ var MIN_TOILET_WIDTH = 300;
27697
+ var MIN_TOILET_DEPTH = 450;
27698
+ var toilet = {
27699
+ kind: "arch.toilet",
27700
+ label: "Toilet",
27701
+ category: "bathroom",
27702
+ description: "Its cistern goes against the wall. Pull its sides to make it wider or deeper.",
27703
+ params: [{ ...WIDTH, default: 380 }, DEPTH(700)],
27704
+ box: sizedBox("width", "depth", MIN_TOILET_WIDTH, MIN_TOILET_DEPTH),
27705
+ mount: { on: "floor" },
27706
+ height: () => CISTERN_TOP,
27707
+ build({ width, depth }) {
27708
+ const w = atLeast(1, width);
27709
+ const d = atLeast(1, depth);
27710
+ const c = Math.min(170, d / 4);
27711
+ const rest = d - c;
27712
+ const cy = c + rest * (130 / 530);
27713
+ return [
27714
+ roundBox(0, 0, w, c, [8, 8, Math.min(30, c / 3), Math.min(30, c / 3)]),
27715
+ circle(w / 2, c / 2, Math.min(32, c / 3), THIN2),
27716
+ line([pt(w / 2 - Math.min(32, c / 3), c / 2), pt(w / 2 + Math.min(32, c / 3), c / 2)], THIN2),
27717
+ outline(bowl(w / 2, cy, w / 2 - 10 * (w / 380), cy - c, d - cy)),
27718
+ { kind: "ellipse", cx: w / 2, cy: c + rest * (275 / 530), rx: w * (118 / 380), ry: rest * (205 / 530) }
27719
+ ];
27720
+ },
27721
+ // Seen from in front, its foot, its seat, its lid closed over it and, behind, its cistern with the
27722
+ // flush button on top; from its side, the cistern against the wall and the bowl reaching out from
27723
+ // it under its lid.
27724
+ front: ({ width }) => {
27725
+ const w = atLeast(1, width);
27726
+ return [
27727
+ outline([pt(w * 0.3, 0), pt(w * 0.7, 0), pt(w * 0.8, -SEAT + 60), pt(w * 0.2, -SEAT + 60)]),
27728
+ roundBox(w * 0.03, -SEAT, w * 0.97, -SEAT + 60, 20),
27729
+ roundBox(w * 0.04, -SEAT - LID_THICK, w * 0.96, -SEAT, LID_THICK / 2),
27730
+ rect(0, -SEAT - LID_THICK, w, -CISTERN_TOP),
27731
+ rect(w / 2 - 30, -CISTERN_TOP, w / 2 + 30, -CISTERN_TOP - 12, THIN2)
27732
+ ];
27733
+ },
27734
+ side: ({ depth }) => {
27735
+ const d = atLeast(1, depth);
27736
+ const c = Math.min(170, d / 4);
27737
+ return [
27738
+ rect(0, -SEAT, c, -CISTERN_TOP),
27739
+ outline([pt(c, 0), pt(c + (d - c) * 0.55, 0), pt(d, -SEAT + 80), pt(d, -SEAT), pt(c, -SEAT)]),
27740
+ outline(roundCorners([pt(c, -SEAT), pt(c, -SEAT - LID_THICK), pt(d - 5, -SEAT - LID_THICK), pt(d - 5, -SEAT)], [0, 0, LID_THICK / 2, 0]))
27741
+ ];
27742
+ }
27743
+ };
27744
+ var wallHungToilet = {
27745
+ kind: "arch.toilet.wallhung",
27746
+ label: "Toilet, wall-hung",
27747
+ category: "bathroom",
27748
+ description: "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.",
27749
+ params: [{ ...WIDTH, default: 360 }, DEPTH(540)],
27750
+ box: sizedBox("width", "depth", MIN_TOILET_WIDTH, MIN_TOILET_DEPTH - 100),
27751
+ mount: { on: "floor" },
27752
+ height: () => HUNG_SEAT,
27753
+ build({ width, depth }) {
27754
+ const w = atLeast(1, width);
27755
+ const d = atLeast(1, depth);
27756
+ const cy = d * (150 / 540);
27757
+ const edge = bowl(w / 2, cy, w / 2, cy, d - cy, 6);
27758
+ const hinge = d * (100 / 540);
27759
+ const [left, right] = across(edge, hinge);
27760
+ return [
27761
+ outline(edge),
27762
+ { kind: "ellipse", cx: w / 2, cy: d * (330 / 540), rx: w * (112 / 360), ry: d * (180 / 540) },
27763
+ line([pt(left, hinge), pt(right, hinge)], THIN2)
27764
+ ];
27765
+ },
27766
+ // Seen from in front, its seat, its lid raised against the wall behind it, the bowl under them,
27767
+ // and the flush plate on the wall over it; from its side, the same, the lid leaning to the wall.
27768
+ front: ({ width }) => {
27769
+ const w = atLeast(1, width);
27770
+ const round3 = w * 0.35;
27771
+ return [
27772
+ outline(roundCorners([pt(w * 0.07, -HUNG_SEAT), pt(w * 0.07, -HUNG_SEAT - LID), pt(w * 0.93, -HUNG_SEAT - LID), pt(w * 0.93, -HUNG_SEAT)], [0, round3, round3, 0])),
27773
+ roundBox(w * 0.03, -HUNG_SEAT, w * 0.97, -HUNG_SEAT + 40, 15),
27774
+ outline([pt(w * 0.05, -HUNG_SEAT + 40), pt(w * 0.95, -HUNG_SEAT + 40), pt(w * 0.75, -HUNG_SEAT + 180), pt(w * 0.25, -HUNG_SEAT + 180)]),
27775
+ // The flush plate, on the wall over it, with its two buttons.
27776
+ rect(w / 2 - 120, -FLUSH_PLATE + 80, w / 2 + 120, -FLUSH_PLATE - 80, THIN2),
27777
+ line([pt(w / 2, -FLUSH_PLATE + 50), pt(w / 2, -FLUSH_PLATE - 50)], THIN2)
27778
+ ];
27779
+ },
27780
+ side: ({ depth }) => {
27781
+ const d = atLeast(1, depth);
27782
+ const hinge = d * (100 / 540);
27783
+ const top = -HUNG_SEAT - 30;
27784
+ return [
27785
+ outline([pt(0, top), pt(d, top), pt(d, -HUNG_SEAT + 30), pt(d * 0.7, -HUNG_SEAT + 170), pt(0, -HUNG_SEAT + 200)]),
27786
+ outline([pt(hinge - LID_THICK, top), pt(hinge, top), pt(hinge - 35, top - LID), pt(hinge - 35 - LID_THICK, top - LID + 5)])
27787
+ ];
27788
+ }
27789
+ };
27790
+ var TRAY = 100;
27791
+ var MIN_TRAY = 600;
27792
+ var showerTray = {
27793
+ kind: "arch.showertray",
27794
+ label: "Shower tray",
27795
+ category: "bathroom",
27796
+ description: "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.",
27797
+ params: [{ ...WIDTH, default: 900 }, DEPTH(900)],
27798
+ box: sizedBox("width", "depth", MIN_TRAY),
27799
+ mount: { on: "floor" },
27800
+ height: () => TRAY,
27801
+ build({ width, depth }) {
27802
+ const w = atLeast(1, width);
27803
+ const d = atLeast(1, depth);
27804
+ const rim = Math.min(40, w / 6, d / 6);
27805
+ const [cx, cy] = [w / 2, d / 2];
27806
+ const drain = Math.min(50, w / 6, d / 6);
27807
+ const corner = rim + 30 * (1 - Math.SQRT1_2);
27808
+ const slopes = [
27809
+ [1, 1],
27810
+ [-1, 1],
27811
+ [1, -1],
27812
+ [-1, -1]
27813
+ ].map(([sx, sy]) => {
27814
+ const from = pt(cx - sx * (cx - corner), cy - sy * (cy - corner));
27815
+ const toward = Math.hypot(from.x - cx, from.y - cy);
27816
+ return line([from, pt(cx + (from.x - cx) * drain / toward, cy + (from.y - cy) * drain / toward)], THIN2);
27817
+ });
27818
+ return [roundBox(0, 0, w, d, 10), roundBox(rim, rim, w - rim, d - rim, 30, THIN2), ...slopes, circle(cx, cy, drain), circle(cx, cy, drain * 0.56, THIN2)];
27819
+ },
27820
+ front: ({ width }) => [rect(0, 0, atLeast(1, width), -TRAY)],
27821
+ side: ({ depth }) => [rect(0, 0, atLeast(1, depth), -TRAY)]
27822
+ };
27518
27823
  var TUB = 580;
27519
27824
  var MIN_TUB = 500;
27520
27825
  var bathtub = {
@@ -27528,7 +27833,7 @@ var bathtub = {
27528
27833
  { key: "rim", label: "Rim", type: "number", default: 60, unit: "length" }
27529
27834
  ],
27530
27835
  box: {
27531
- bounds: ({ length, width }) => ({ left: 0, top: 0, right: atLeast(1, length), bottom: atLeast(1, width) }),
27836
+ bounds: ({ length: length2, width }) => ({ left: 0, top: 0, right: atLeast(1, length2), bottom: atLeast(1, width) }),
27532
27837
  resize: (_, size) => ({
27533
27838
  ...size.width === void 0 ? {} : { length: Math.round(atLeast(MIN_TUB, size.width)) },
27534
27839
  ...size.height === void 0 ? {} : { width: Math.round(atLeast(MIN_TUB, size.height)) }
@@ -27536,8 +27841,8 @@ var bathtub = {
27536
27841
  },
27537
27842
  // Seen from in front, its panel and the rim along its top, its mixer on the wall at the drain end;
27538
27843
  // from its side, the same across its width.
27539
- front: ({ length, rim }) => {
27540
- const l = atLeast(1, length);
27844
+ front: ({ length: length2, rim }) => {
27845
+ const l = atLeast(1, length2);
27541
27846
  const x = Math.min(clamp(rim, 1, l / 2) + 140, l / 2);
27542
27847
  return [rect(0, 0, l, -TUB), line([pt(0, -TUB + 40), pt(l, -TUB + 40)], THIN2), rect(x - 60, -TUB - 150, x + 60, -TUB - 190), line([pt(x, -TUB - 150), pt(x, -TUB - 100)], { strokeWidth: 1.5 })];
27543
27848
  },
@@ -27545,8 +27850,8 @@ var bathtub = {
27545
27850
  const w = atLeast(1, width);
27546
27851
  return [rect(0, 0, w, -TUB), line([pt(0, -TUB + 40), pt(w, -TUB + 40)], THIN2)];
27547
27852
  },
27548
- build({ length, width, rim }) {
27549
- const l = atLeast(1, length);
27853
+ build({ length: length2, width, rim }) {
27854
+ const l = atLeast(1, length2);
27550
27855
  const w = atLeast(1, width);
27551
27856
  const r = clamp(rim, 1, atLeast(1, Math.min(l, w) / 2 - 25));
27552
27857
  const basin = [pt(r, r), pt(l - r, r), pt(l - r, w - r), pt(r, w - r)];
@@ -27558,6 +27863,66 @@ var bathtub = {
27558
27863
  ];
27559
27864
  }
27560
27865
  };
27866
+ var curve = (a, b, c) => Array.from({ length: 13 }, (_, i) => {
27867
+ const t = i / 12;
27868
+ return pt((1 - t) ** 2 * a.x + 2 * t * (1 - t) * b.x + t * t * c.x, (1 - t) ** 2 * a.y + 2 * t * (1 - t) * b.y + t * t * c.y);
27869
+ });
27870
+ var MIXER = 1100;
27871
+ var HEAD = 2100;
27872
+ var HIGH = { dash: [30, 20] };
27873
+ var high = (cx, cy, r, style = {}) => ({ kind: "ellipse", cx, cy, rx: r, ry: r, ...style, ...HIGH });
27874
+ var showerHead = {
27875
+ kind: "arch.shower",
27876
+ label: "Shower head",
27877
+ category: "bathroom",
27878
+ description: "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.",
27879
+ params: [{ key: "type", label: "Type", type: "string", default: "Column", options: ["Column", "Slide rail", "Fixed head"] }],
27880
+ mount: { on: "wall", height: MIXER },
27881
+ build({ type }) {
27882
+ const prims = [rect(-80, 0, 80, 60), circle(-55, 75, 15, THIN2), circle(55, 75, 15, THIN2)];
27883
+ if (type === "Slide rail") prims.push(line([pt(0, 0), pt(0, 30)], THIN2), high(0, 60, 30, THIN2));
27884
+ else if (type === "Fixed head") prims.push(line([pt(0, 0), pt(0, 200)], { ...THIN2, ...HIGH }), high(0, 250, 60));
27885
+ else prims.push(line([pt(0, 0), pt(0, 175)], { ...THIN2, ...HIGH }), high(0, 300, 125), high(0, 300, 85, THIN2));
27886
+ return prims;
27887
+ },
27888
+ // Seen from in front, Y up from the middle of its mixer: the mixer and its two handles, then what rises over it.
27889
+ front: ({ type }) => {
27890
+ const top = MIXER - HEAD;
27891
+ const prims = [rect(-80, 30, 80, -30), circle(-55, 0, 15, THIN2), circle(55, 0, 15, THIN2)];
27892
+ if (type === "Slide rail") {
27893
+ prims.push(
27894
+ line([pt(110, -150), pt(110, -850)], { strokeWidth: 1.5 }),
27895
+ rect(95, -140, 125, -160, THIN2),
27896
+ rect(95, -840, 125, -860, THIN2),
27897
+ // The hand shower on its holder, its hose hanging down to the mixer.
27898
+ roundBox(95, -900, 125, -660, 12),
27899
+ { kind: "ellipse", cx: 110, cy: -930, rx: 40, ry: 30 },
27900
+ line(curve(pt(110, -660), pt(200, -250), pt(60, 30)), THIN2)
27901
+ );
27902
+ } else if (type === "Fixed head") {
27903
+ prims.push(line([pt(0, top + 100), pt(0, top + 60)], { strokeWidth: 1.5 }), { kind: "ellipse", cx: 0, cy: top + 40, rx: 60, ry: 25 });
27904
+ } else {
27905
+ prims.push(
27906
+ line([pt(0, -30), pt(0, top)], { strokeWidth: 1.5 }),
27907
+ // The overhead shower, flat, at the end of its arm towards the viewer.
27908
+ rect(-125, top - 5, 125, top + 12),
27909
+ // The hand shower hung on the column.
27910
+ roundBox(15, -650, 45, -400, 12),
27911
+ { kind: "ellipse", cx: 30, cy: -680, rx: 35, ry: 28 }
27912
+ );
27913
+ }
27914
+ return prims;
27915
+ },
27916
+ // Seen from its side, X out from the wall: the mixer, and the arm reaching out to the head.
27917
+ side: ({ type }) => {
27918
+ const top = MIXER - HEAD;
27919
+ const prims = [rect(0, 30, 70, -30), line([pt(70, 0), pt(110, 0)], { strokeWidth: 1.5 })];
27920
+ if (type === "Slide rail") prims.push(line([pt(30, -150), pt(30, -850)], { strokeWidth: 1.5 }), roundBox(30, -900, 70, -660, 12), { kind: "ellipse", cx: 60, cy: -930, rx: 30, ry: 40 });
27921
+ else if (type === "Fixed head") prims.push(line([pt(0, top + 100), pt(250, top + 60)], { strokeWidth: 1.5 }), rect(190, top + 40, 310, top + 70));
27922
+ else prims.push(line([pt(40, -30), pt(40, top), pt(300, top)], { strokeWidth: 1.5 }), rect(175, top, 425, top + 17), roundBox(40, -650, 70, -400, 12));
27923
+ return prims;
27924
+ }
27925
+ };
27561
27926
 
27562
27927
  // packages/ext-architecture/src/compass.ts
27563
27928
  var compass = {
@@ -27592,10 +27957,10 @@ var compass = {
27592
27957
  var SOFA_BACK = 170;
27593
27958
  var SOFA_ARM = 170;
27594
27959
  var SOFA_SEAT = 650;
27595
- function cornerSofaSize({ length, returnLength, depth }) {
27960
+ function cornerSofaSize({ length: length2, returnLength, depth }) {
27596
27961
  const d = clamp(depth, 2 * SOFA_BACK + 200, 1500);
27597
27962
  const least = d + SOFA_ARM + 300;
27598
- return { l: atLeast(least, length), r: atLeast(least, returnLength), d, least };
27963
+ return { l: atLeast(least, length2), r: atLeast(least, returnLength), d, least };
27599
27964
  }
27600
27965
  var cornerSofa = {
27601
27966
  kind: "arch.sofa.corner",
@@ -27655,7 +28020,7 @@ var cornerSofa = {
27655
28020
  front: (props) => cornerSofaFront(props),
27656
28021
  side: (props) => cornerSofaSide(props)
27657
28022
  };
27658
- var SEAT = 420;
28023
+ var SEAT2 = 420;
27659
28024
  var ARM_TOP = 600;
27660
28025
  var BACK_TOP = 850;
27661
28026
  var LEGS = 60;
@@ -27664,12 +28029,12 @@ function sofaFront(x0, x1, armLeft, armRight, seats) {
27664
28029
  const [a, b] = [x0 + armLeft, x1 - armRight];
27665
28030
  const n3 = Math.min(12, count(seats));
27666
28031
  const prims = [
27667
- outline([pt(x0, -LEGS), pt(x1, -LEGS), pt(x1, -ARM_TOP), pt(b, -ARM_TOP), pt(b, -SEAT), pt(a, -SEAT), pt(a, -ARM_TOP), pt(x0, -ARM_TOP)]),
28032
+ outline([pt(x0, -LEGS), pt(x1, -LEGS), pt(x1, -ARM_TOP), pt(b, -ARM_TOP), pt(b, -SEAT2), pt(a, -SEAT2), pt(a, -ARM_TOP), pt(x0, -ARM_TOP)]),
27668
28033
  // The back, over the arms and the seats.
27669
28034
  line([pt(x0, -ARM_TOP), pt(x0, -BACK_TOP), pt(x1, -BACK_TOP), pt(x1, -ARM_TOP)]),
27670
28035
  ...feet(x0, x1)
27671
28036
  ];
27672
- for (let i = 1; i < n3; i++) prims.push(line([pt(a + (b - a) * i / n3, -SEAT), pt(a + (b - a) * i / n3, -LEGS - 60)], THIN2), line([pt(a + (b - a) * i / n3, -SEAT - 20), pt(a + (b - a) * i / n3, -BACK_TOP + 30)], THIN2));
28037
+ for (let i = 1; i < n3; i++) prims.push(line([pt(a + (b - a) * i / n3, -SEAT2), pt(a + (b - a) * i / n3, -LEGS - 60)], THIN2), line([pt(a + (b - a) * i / n3, -SEAT2 - 20), pt(a + (b - a) * i / n3, -BACK_TOP + 30)], THIN2));
27673
28038
  return prims;
27674
28039
  }
27675
28040
  function sofaSide(d, back) {
@@ -27747,52 +28112,75 @@ function officeChairPlan() {
27747
28112
  });
27748
28113
  return [band(330, 900, 820, 70, 253, 287), roundBox(92, 150, 568, 590, [60, 60, 110, 110]), roundBox(46, 215, 88, 505, 21), roundBox(572, 215, 614, 505, 21), ...base2.slice(2)];
27749
28114
  }
27750
- var OFFICE = { width: 660, depth: 730 };
28115
+ var OFFICE = { width: 660 };
27751
28116
  var DESK_TOP = 750;
27752
28117
  var desk = {
27753
28118
  kind: "arch.desk",
27754
28119
  label: "Desk",
27755
28120
  category: "office",
27756
- description: "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.",
27757
- params: [{ ...WIDTH, default: 1400 }, DEPTH(700), { key: "chair", label: "Office chair", type: "boolean", default: true }],
28121
+ description: "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.",
28122
+ params: [{ ...WIDTH, default: 1400 }, DEPTH(700)],
27758
28123
  box: sizedBox("width", "depth", 600, 400),
27759
28124
  mount: { on: "floor" },
27760
28125
  height: () => DESK_TOP,
27761
- build({ width, depth, chair: chair2 }) {
28126
+ build({ width, depth }) {
27762
28127
  const [w, d] = [atLeast(600, width), atLeast(400, depth)];
27763
28128
  const mid2 = w / 2;
27764
- const prims = [
28129
+ return [
27765
28130
  rect(0, 0, w, d),
27766
28131
  roundBox(mid2 - 70, 100, mid2 + 70, 180, 20, THIN2),
27767
28132
  roundBox(mid2 - 280, 180, mid2 + 280, 212, 12, THIN2),
27768
28133
  roundBox(mid2 - 220, d - 320, mid2 + 220, d - 170, 16, THIN2),
27769
28134
  { kind: "ellipse", cx: mid2 + 310, cy: d - 245, rx: 30, ry: 48, strokeWidth: 0.5 }
27770
28135
  ];
27771
- if (chair2 !== false) prims.push(...officeChairPlan().map((p) => transformPrimitive(p, { x: mid2 + OFFICE.width / 2, y: d + 20 + OFFICE.depth, rotation: 180 })));
27772
- return prims;
27773
28136
  },
27774
- front: ({ width, chair: chair2 }) => {
28137
+ front: ({ width }) => {
27775
28138
  const w = atLeast(600, width);
27776
28139
  const mid2 = w / 2;
27777
- const prims = [rect(0, -DESK_TOP + 30, w, -DESK_TOP), rect(0, 0, 30, -DESK_TOP + 30, THIN2), rect(w - 30, 0, w, -DESK_TOP + 30, THIN2), rect(mid2 - 280, -DESK_TOP - 60, mid2 + 280, -DESK_TOP - 380), line([pt(mid2, -DESK_TOP), pt(mid2, -DESK_TOP - 60)])];
27778
- if (chair2 !== false) prims.push(roundBox(mid2 - 240, -520, mid2 + 240, -1050, 40, THIN2), line([pt(mid2, -470), pt(mid2, -90)], { strokeWidth: 1.5 }), line([pt(mid2 - 300, -40), pt(mid2 + 300, -40)], THIN2), circle(mid2 - 300, -20, 20, THIN2), circle(mid2 + 300, -20, 20, THIN2));
27779
- return prims;
28140
+ return [rect(0, -DESK_TOP + 30, w, -DESK_TOP), rect(0, 0, 30, -DESK_TOP + 30, THIN2), rect(w - 30, 0, w, -DESK_TOP + 30, THIN2), rect(mid2 - 280, -DESK_TOP - 60, mid2 + 280, -DESK_TOP - 380), line([pt(mid2, -DESK_TOP), pt(mid2, -DESK_TOP - 60)])];
27780
28141
  },
27781
- side: ({ depth, chair: chair2 }) => {
28142
+ side: ({ depth }) => {
27782
28143
  const d = atLeast(400, depth);
27783
- const prims = [rect(0, -DESK_TOP + 30, d, -DESK_TOP), rect(0, 0, d, -DESK_TOP + 30, THIN2), rect(120, -DESK_TOP, 140, -DESK_TOP - 380, THIN2)];
27784
- if (chair2 !== false) {
27785
- const at2 = d + 20;
27786
- prims.push(
27787
- rect(at2 + 60, -470, at2 + OFFICE.depth - 200, -520, THIN2),
27788
- outline([pt(at2 + OFFICE.depth - 200, -520), pt(at2 + OFFICE.depth - 160, -1050), pt(at2 + OFFICE.depth - 110, -1050), pt(at2 + OFFICE.depth - 150, -520)]),
27789
- line([pt(at2 + 300, -470), pt(at2 + 300, -90)], { strokeWidth: 1.5 }),
27790
- line([pt(at2, -40), pt(at2 + OFFICE.depth - 100, -40)], THIN2)
27791
- );
27792
- }
27793
- return prims;
28144
+ return [rect(0, -DESK_TOP + 30, d, -DESK_TOP), rect(0, 0, d, -DESK_TOP + 30, THIN2), rect(120, -DESK_TOP, 140, -DESK_TOP - 380, THIN2)];
27794
28145
  }
27795
28146
  };
28147
+ var OFFICE_SEAT = 470;
28148
+ var OFFICE_BACK = 1050;
28149
+ var officeChairFront = () => {
28150
+ const mid2 = OFFICE.width / 2;
28151
+ return [
28152
+ roundBox(mid2 - 240, -OFFICE_SEAT - 50, mid2 + 240, -OFFICE_BACK, 40),
28153
+ rect(92, -OFFICE_SEAT, 568, -OFFICE_SEAT - 50),
28154
+ roundBox(46, -OFFICE_SEAT - 180, 88, -OFFICE_SEAT - 220, 15, THIN2),
28155
+ roundBox(572, -OFFICE_SEAT - 180, 614, -OFFICE_SEAT - 220, 15, THIN2),
28156
+ line([pt(67, -OFFICE_SEAT - 180), pt(67, -OFFICE_SEAT - 50)], THIN2),
28157
+ line([pt(593, -OFFICE_SEAT - 180), pt(593, -OFFICE_SEAT - 50)], THIN2),
28158
+ line([pt(mid2, -OFFICE_SEAT), pt(mid2, -90)], { strokeWidth: 1.5 }),
28159
+ line([pt(mid2 - 300, -40), pt(mid2 + 300, -40)], THIN2),
28160
+ circle(mid2 - 300, -20, 20, THIN2),
28161
+ circle(mid2 + 300, -20, 20, THIN2)
28162
+ ];
28163
+ };
28164
+ var officeChair = {
28165
+ kind: "arch.officechair",
28166
+ label: "Office chair",
28167
+ category: "office",
28168
+ description: "On five casters, its back at the top. Turn it to face the desk.",
28169
+ params: [],
28170
+ height: () => OFFICE_BACK,
28171
+ build: () => officeChairPlan(),
28172
+ front: () => officeChairFront(),
28173
+ back: () => officeChairFront(),
28174
+ // From its side, its own Y from its back: the back leaning over the seat, the column, the base.
28175
+ side: () => [
28176
+ rect(60, -OFFICE_SEAT, 530, -OFFICE_SEAT - 50, THIN2),
28177
+ outline([pt(200, -OFFICE_SEAT - 50), pt(160, -OFFICE_BACK), pt(110, -OFFICE_BACK), pt(150, -OFFICE_SEAT - 50)]),
28178
+ line([pt(370, -OFFICE_SEAT), pt(370, -90)], { strokeWidth: 1.5 }),
28179
+ line([pt(70, -40), pt(670, -40)], THIN2),
28180
+ circle(70, -20, 20, THIN2),
28181
+ circle(670, -20, 20, THIN2)
28182
+ ]
28183
+ };
27796
28184
  function cornerSofaFront(props) {
27797
28185
  const { l, d } = cornerSofaSize(props);
27798
28186
  const prims = [...sofaFront(0, l, d, SOFA_ARM, Math.max(1, Math.round((l - SOFA_ARM - d) / SOFA_SEAT))), line([pt(d, -LEGS), pt(d, -ARM_TOP)], THIN2)];
@@ -27800,7 +28188,7 @@ function cornerSofaFront(props) {
27800
28188
  }
27801
28189
  function cornerSofaSide(props) {
27802
28190
  const { r, d } = cornerSofaSize(props);
27803
- return [rect(0, -LEGS, d, -ARM_TOP), line([pt(d, -SEAT), pt(r - SOFA_ARM, -SEAT), pt(r - SOFA_ARM, -ARM_TOP), pt(r, -ARM_TOP), pt(r, -LEGS), pt(d, -LEGS)]), line([pt(0, -ARM_TOP), pt(0, -BACK_TOP), pt(r, -BACK_TOP), pt(r, -ARM_TOP)]), ...feet(0, r)];
28191
+ return [rect(0, -LEGS, d, -ARM_TOP), line([pt(d, -SEAT2), pt(r - SOFA_ARM, -SEAT2), pt(r - SOFA_ARM, -ARM_TOP), pt(r, -ARM_TOP), pt(r, -LEGS), pt(d, -LEGS)]), line([pt(0, -ARM_TOP), pt(0, -BACK_TOP), pt(r, -BACK_TOP), pt(r, -ARM_TOP)]), ...feet(0, r)];
27804
28192
  }
27805
28193
 
27806
28194
  // packages/ext-architecture/src/heating.ts
@@ -27846,14 +28234,117 @@ var radiator = {
27846
28234
  return [outline([pt(30, -RADIATOR_FOOT), pt(30 + d, -RADIATOR_FOOT), pt(30 + d, -RADIATOR_TOP), pt(30, -RADIATOR_TOP)]), line([pt(0, -RADIATOR_FOOT - 80), pt(30, -RADIATOR_FOOT - 80)]), line([pt(0, -RADIATOR_TOP + 80), pt(30, -RADIATOR_TOP + 80)])];
27847
28235
  }
27848
28236
  };
28237
+ var MIN_UNIT_WIDTH = 400;
28238
+ var MIN_UNIT_DEPTH = 200;
28239
+ var FEET = 60;
28240
+ var heatPump = {
28241
+ kind: "arch.heatpump",
28242
+ label: "Heat pump, outdoor unit",
28243
+ category: "heating",
28244
+ description: "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.",
28245
+ params: [{ ...WIDTH, default: 900 }, DEPTH(350), HEIGHT(700)],
28246
+ box: sizedBox("width", "depth", MIN_UNIT_WIDTH, MIN_UNIT_DEPTH),
28247
+ mount: { on: "floor" },
28248
+ height: ({ height }) => atLeast(1, height),
28249
+ build({ width, depth }) {
28250
+ const w = atLeast(1, width);
28251
+ const d = atLeast(1, depth);
28252
+ const r = Math.max(10, Math.min(d / 2 - 30, w * 0.3));
28253
+ const fan = w * 0.38;
28254
+ return [
28255
+ outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]),
28256
+ circle(fan, d / 2, r, THIN2),
28257
+ circle(fan, d / 2, r * 0.25, THIN2),
28258
+ line([pt(w * 0.78, 0), pt(w * 0.78, d)], THIN2)
28259
+ ];
28260
+ },
28261
+ front: ({ width, height }) => {
28262
+ const w = atLeast(1, width);
28263
+ const h = Math.max(FEET + 1, height);
28264
+ const body = h - FEET;
28265
+ const r = Math.max(10, Math.min(body / 2 - 40, w * 0.3));
28266
+ return [
28267
+ rect(w * 0.08, 0, w * 0.18, -FEET),
28268
+ rect(w * 0.82, 0, w * 0.92, -FEET),
28269
+ rect(0, -FEET, w, -h),
28270
+ circle(w * 0.38, -FEET - body / 2, r),
28271
+ circle(w * 0.38, -FEET - body / 2, r * 0.25, THIN2),
28272
+ line([pt(w * 0.78, -FEET), pt(w * 0.78, -h)], THIN2)
28273
+ ];
28274
+ },
28275
+ side: ({ depth, height }) => {
28276
+ const d = atLeast(1, depth);
28277
+ const h = Math.max(FEET + 1, height);
28278
+ return [rect(d * 0.1, 0, d * 0.9, -FEET), rect(0, -FEET, d, -h)];
28279
+ }
28280
+ };
28281
+ var MIN_BOILER = 250;
28282
+ var FLUE = 150;
28283
+ var gasBoiler = {
28284
+ kind: "arch.boiler",
28285
+ label: "Gas boiler",
28286
+ category: "heating",
28287
+ description: "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.",
28288
+ params: [{ ...WIDTH, default: 400 }, DEPTH(300), HEIGHT(700)],
28289
+ box: sizedBox("width", "depth", MIN_BOILER),
28290
+ mount: { on: "wall", height: 1e3, measured: "bottom" },
28291
+ build({ width, depth }) {
28292
+ const w = atLeast(1, width);
28293
+ const d = atLeast(1, depth);
28294
+ const r = Math.min(62, w / 5, d / 4);
28295
+ return [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]), circle(w / 2, d * 0.45, r), circle(w / 2, d * 0.45, r * 0.65, THIN2)];
28296
+ },
28297
+ front: ({ width, height }) => {
28298
+ const w = atLeast(1, width);
28299
+ const h = atLeast(1, height);
28300
+ const r = Math.min(62, w / 5);
28301
+ const prims = [rect(0, 0, w, -h), rect(w * 0.2, -40, w * 0.8, -Math.min(140, h / 4), THIN2), rect(w / 2 - r, -h, w / 2 + r, -h - FLUE)];
28302
+ for (let i = 0; i < 5; i++) prims.push(line([pt(w * (0.2 + i * 0.15), 0), pt(w * (0.2 + i * 0.15), 120)], THIN2));
28303
+ return prims;
28304
+ },
28305
+ side: ({ depth, height }) => {
28306
+ const d = atLeast(1, depth);
28307
+ const h = atLeast(1, height);
28308
+ const r = Math.min(62, d / 4);
28309
+ const x = d * 0.45;
28310
+ return [rect(0, 0, d, -h), outline([pt(x - r, -h), pt(x - r, -h - FLUE + r), pt(0, -h - FLUE + r), pt(0, -h - FLUE - r), pt(x + r, -h - FLUE - r), pt(x + r, -h)])];
28311
+ }
28312
+ };
28313
+ var MIN_TANK = 300;
28314
+ var waterHeater = {
28315
+ kind: "arch.waterheater",
28316
+ label: "Water heater",
28317
+ category: "heating",
28318
+ description: "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.",
28319
+ params: [{ key: "diameter", label: "Diameter", type: "number", default: 570, unit: "length" }, HEIGHT(1600)],
28320
+ box: {
28321
+ bounds: ({ diameter }) => ({ left: 0, top: 0, right: atLeast(1, diameter), bottom: atLeast(1, diameter) }),
28322
+ resize: (_, size) => {
28323
+ const given = [size.width, size.height].filter((v) => v !== void 0);
28324
+ return given.length === 0 ? {} : { diameter: Math.round(atLeast(MIN_TANK, Math.max(...given))) };
28325
+ }
28326
+ },
28327
+ mount: { on: "floor" },
28328
+ height: ({ height }) => atLeast(1, height),
28329
+ build({ diameter }) {
28330
+ const r = atLeast(1, diameter) / 2;
28331
+ const pipe2 = Math.min(15, r / 8);
28332
+ return [circle(r, r, r), circle(r, r, Math.max(r * 0.5, r - 50), THIN2), circle(r * 0.76, r * 0.6, pipe2, THIN2), circle(r * 1.24, r * 0.6, pipe2, THIN2)];
28333
+ },
28334
+ front: ({ diameter, height }) => tank(atLeast(1, diameter), atLeast(1, height)),
28335
+ side: ({ diameter, height }) => tank(atLeast(1, diameter), atLeast(1, height))
28336
+ };
28337
+ function tank(d, h) {
28338
+ return [roundBox(0, -h, d, 0, Math.min(d * 0.2, h / 4)), line([pt(d * 0.38, -h), pt(d * 0.38, -h - 100)], THIN2), line([pt(d * 0.62, -h), pt(d * 0.62, -h - 100)], THIN2)];
28339
+ }
27849
28340
 
27850
28341
  // packages/ext-architecture/src/bedroom.ts
27851
28342
  var TOP = 25;
27852
- var FEET = 100;
28343
+ var FEET2 = 100;
27853
28344
  var GAP3 = 3;
27854
28345
  var planOf = (w, d) => [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]), line([pt(0, Math.max(0, d - 20)), pt(w, Math.max(0, d - 20))], THIN2)];
27855
28346
  function onFeet(w, h, inside3) {
27856
- const feet2 = Math.min(FEET, h / 4);
28347
+ const feet2 = Math.min(FEET2, h / 4);
27857
28348
  const foot = Math.min(40, w / 8);
27858
28349
  const body = [-feet2, -h + TOP];
27859
28350
  return [
@@ -27865,17 +28356,17 @@ function onFeet(w, h, inside3) {
27865
28356
  ];
27866
28357
  }
27867
28358
  function onFeetSide(d, h) {
27868
- const feet2 = Math.min(FEET, h / 4);
28359
+ const feet2 = Math.min(FEET2, h / 4);
27869
28360
  const foot = Math.min(40, d / 8);
27870
28361
  return [rect(0, -h + TOP, d, -h), rect(0, -feet2, d - 10, -h + TOP), line([pt(d - 30, -feet2), pt(d - 30, -h + TOP)], THIN2), rect(16, 0, 16 + foot, -feet2), rect(d - 26 - foot, 0, d - 26, -feet2)];
27871
28362
  }
27872
28363
  function drawerGrid(x0, x1, y0, y1, rows, columns) {
27873
28364
  const [r, c] = [Math.min(MAX_FRONTS, count(rows)), Math.min(4, count(columns))];
27874
- const [each, high] = [(x1 - x0) / c, (y0 - y1) / r];
28365
+ const [each, high2] = [(x1 - x0) / c, (y0 - y1) / r];
27875
28366
  const prims = [];
27876
28367
  for (let i = 0; i < c; i++) {
27877
28368
  for (let k = 0; k < r; k++) {
27878
- prims.push(...drawer(x0 + i * each + (i > 0 ? GAP3 / 2 : 0), x0 + (i + 1) * each - (i < c - 1 ? GAP3 / 2 : 0), y0 - k * high - (k > 0 ? GAP3 / 2 : 0), y0 - (k + 1) * high + (k < r - 1 ? GAP3 / 2 : 0)));
28369
+ prims.push(...drawer(x0 + i * each + (i > 0 ? GAP3 / 2 : 0), x0 + (i + 1) * each - (i < c - 1 ? GAP3 / 2 : 0), y0 - k * high2 - (k > 0 ? GAP3 / 2 : 0), y0 - (k + 1) * high2 + (k < r - 1 ? GAP3 / 2 : 0)));
27879
28370
  }
27880
28371
  }
27881
28372
  return prims;
@@ -28330,7 +28821,7 @@ var washingMachine = {
28330
28821
  return [rect(0, 0, body, -h), roundBox(body, cy + r * 0.8, d, cy - r * 0.8, [0, 12, 12, 0], THIN2)];
28331
28822
  }
28332
28823
  };
28333
- var HIGH = [6, 4];
28824
+ var HIGH2 = [6, 4];
28334
28825
  var hood = {
28335
28826
  kind: "arch.hood",
28336
28827
  label: "Range hood",
@@ -28348,9 +28839,9 @@ var hood = {
28348
28839
  const [w, d] = [atLeast(1, width), atLeast(1, depth)];
28349
28840
  const half = Math.min(140, w / 4);
28350
28841
  const filter = Math.min(90, w / 6, d / 5);
28351
- const prims = [{ kind: "path", points: [pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)], closed: true, dash: HIGH }];
28352
- if (style !== "Flat") prims.push({ kind: "path", points: [pt(w / 2 - half, 0), pt(w / 2 + half, 0), pt(w / 2 + half, Math.min(250, d / 2)), pt(w / 2 - half, Math.min(250, d / 2))], closed: true, dash: HIGH, strokeWidth: 0.5 });
28353
- prims.push({ kind: "ellipse", cx: w / 2, cy: d * 0.6, rx: filter, ry: filter, dash: HIGH, strokeWidth: 0.5 });
28842
+ const prims = [{ kind: "path", points: [pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)], closed: true, dash: HIGH2 }];
28843
+ if (style !== "Flat") prims.push({ kind: "path", points: [pt(w / 2 - half, 0), pt(w / 2 + half, 0), pt(w / 2 + half, Math.min(250, d / 2)), pt(w / 2 - half, Math.min(250, d / 2))], closed: true, dash: HIGH2, strokeWidth: 0.5 });
28844
+ prims.push({ kind: "ellipse", cx: w / 2, cy: d * 0.6, rx: filter, ry: filter, dash: HIGH2, strokeWidth: 0.5 });
28354
28845
  return prims;
28355
28846
  },
28356
28847
  front: ({ width, style, chimney }) => {
@@ -28419,12 +28910,12 @@ var door2 = {
28419
28910
  const w = atLeast(1, width);
28420
28911
  const h = (env.wallThickness ?? LOOSE_WALL) / 2;
28421
28912
  const open2 = clamp(angle, 5, 180);
28422
- const leaf = (hingeX, length, dir) => {
28913
+ const leaf = (hingeX, length2, dir) => {
28423
28914
  const hingePoint = pt(hingeX, h);
28424
28915
  const closed = dir === 1 ? 0 : 180;
28425
28916
  const opened = closed + dir * open2;
28426
- const tip2 = arcPoints(hingePoint, length, opened, opened, 1)[0];
28427
- return [line([hingePoint, tip2], HEAVY), line(arcPoints(hingePoint, length, closed, opened), THIN2)];
28917
+ const tip2 = arcPoints(hingePoint, length2, opened, opened, 1)[0];
28918
+ return [line([hingePoint, tip2], HEAVY), line(arcPoints(hingePoint, length2, closed, opened), THIN2)];
28428
28919
  };
28429
28920
  let prims = [line([pt(0, -h), pt(w, -h)], THIN2), line([pt(0, h), pt(w, h)], THIN2)];
28430
28921
  if (type === "Single") prims.push(...leaf(0, w, 1));
@@ -28678,7 +29169,7 @@ var translations = {
28678
29169
  "Double washbasin": "Lavabo double vasque",
28679
29170
  Depth: "Profondeur",
28680
29171
  Bowls: "Vasques",
28681
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Un plan avec ses vasques. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir : les vasques et les robinets gardent leur taille.",
29172
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Un plan avec ses vasques et, dessous, un meuble \xE0 tiroirs ou \xE0 portes, suspendu ou sur pieds, ou aucun. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir : les vasques et les robinets gardent leur taille.",
28682
29173
  Triple: "Triple",
28683
29174
  "Glazing: Single": "Simple",
28684
29175
  "Glazing: Double": "Double",
@@ -28728,6 +29219,25 @@ var translations = {
28728
29219
  Radiator: "Radiateur",
28729
29220
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Contre le mur par son dos. Tirez ses c\xF4t\xE9s pour l\u2019allonger : ses \xE9l\xE9ments gardent leur largeur. Son robinet est \xE0 un bout.",
28730
29221
  Valve: "Robinet",
29222
+ "On feet": "Sur pieds",
29223
+ "Shower head": "Pommeau de douche",
29224
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Fix\xE9 au mur \xE0 la hauteur de son mitigeur : une colonne avec une douche de t\xEAte, une barre de douche avec sa douchette, ou une t\xEAte sur son bras. Au-dessus d\u2019un receveur ou d\u2019une baignoire.",
29225
+ "Column": "Colonne",
29226
+ "Slide rail": "Barre de douche",
29227
+ "Fixed head": "T\xEAte fixe",
29228
+ Toilet: "WC",
29229
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Son r\xE9servoir va contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
29230
+ "Toilet, wall-hung": "WC suspendu",
29231
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Son dos va contre le mur, son r\xE9servoir dans le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
29232
+ "Shower tray": "Receveur de douche",
29233
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Contre le mur par un c\xF4t\xE9. Tirez ses c\xF4t\xE9s pour l\u2019agrandir : son rebord et sa bonde gardent leur taille.",
29234
+ "Heat pump, outdoor unit": "Pompe \xE0 chaleur, unit\xE9 ext\xE9rieure",
29235
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Contre un mur ext\xE9rieur par son dos. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir. Donnez-lui une hauteur au-dessus du sol pour la poser sur des consoles.",
29236
+ "Gas boiler": "Chaudi\xE8re gaz",
29237
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Fix\xE9e au mur par son dos, son conduit de fum\xE9e au-dessus. Sa hauteur au-dessus du sol est celle de son dessous.",
29238
+ "Water heater": "Chauffe-eau",
29239
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Un ballon rond contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019agrandir. Donnez-lui une hauteur au-dessus du sol pour le fixer au mur.",
29240
+ Diameter: "Diam\xE8tre",
28731
29241
  "Base unit": "Meuble bas",
28732
29242
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Un meuble de cuisine avec son plan de travail, contre le mur : portes, tiroirs ou four, comme le montrent les \xE9l\xE9vations. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir.",
28733
29243
  Below: "Dessous",
@@ -28774,7 +29284,8 @@ var translations = {
28774
29284
  "Office chair": "Chaise de bureau",
28775
29285
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "Son dossier va contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
28776
29286
  "Its back at the top. Turn it to face the table.": "Son dossier en haut. Tournez-la face \xE0 la table.",
28777
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "Contre le mur, avec sa chaise de bureau tir\xE9e devant ou sans. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir."
29287
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir. Sa chaise de bureau est un objet \xE0 part.",
29288
+ "On five casters, its back at the top. Turn it to face the desk.": "Sur cinq roulettes, son dossier en haut. Tournez-la face au bureau."
28778
29289
  },
28779
29290
  es: {
28780
29291
  Hob: "Placa de cocci\xF3n",
@@ -28802,7 +29313,7 @@ var translations = {
28802
29313
  "Double washbasin": "Lavabo doble",
28803
29314
  Depth: "Fondo",
28804
29315
  Bowls: "Senos",
28805
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Una encimera con sus senos. Tire de sus lados para alargarla o hacerla m\xE1s profunda: los senos y los grifos conservan su tama\xF1o.",
29316
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Una encimera con sus senos y, debajo, un mueble con cajones o puertas, suspendido o sobre patas, o ninguno. Tire de sus lados para alargarla o hacerla m\xE1s profunda: los senos y los grifos conservan su tama\xF1o.",
28806
29317
  Triple: "Triple",
28807
29318
  "Glazing: Single": "Simple",
28808
29319
  "Glazing: Double": "Doble",
@@ -28852,6 +29363,25 @@ var translations = {
28852
29363
  Radiator: "Radiador",
28853
29364
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Contra la pared por su parte trasera. Tire de sus lados para alargarlo: sus elementos conservan su anchura. Su llave est\xE1 en un extremo.",
28854
29365
  Valve: "Llave",
29366
+ "On feet": "Sobre patas",
29367
+ "Shower head": "Rociador de ducha",
29368
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Fijado a la pared a la altura de su mezclador: una columna con rociador de techo, una barra con su teleducha, o un rociador en su brazo. Sobre un plato de ducha o una ba\xF1era.",
29369
+ "Column": "Columna",
29370
+ "Slide rail": "Barra de ducha",
29371
+ "Fixed head": "Rociador fijo",
29372
+ Toilet: "Inodoro",
29373
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Su cisterna va contra la pared. Tire de sus lados para hacerlo m\xE1s ancho o m\xE1s profundo.",
29374
+ "Toilet, wall-hung": "Inodoro suspendido",
29375
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Su parte trasera va contra la pared, con la cisterna empotrada. Tire de sus lados para hacerlo m\xE1s ancho o m\xE1s profundo.",
29376
+ "Shower tray": "Plato de ducha",
29377
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Contra la pared por un lado. Tire de sus lados para agrandarlo: su borde y su desag\xFCe conservan su tama\xF1o.",
29378
+ "Heat pump, outdoor unit": "Bomba de calor, unidad exterior",
29379
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Contra una pared exterior por su parte trasera. Tire de sus lados para alargarla o hacerla m\xE1s profunda. Dele una altura sobre el suelo para ponerla sobre soportes.",
29380
+ "Gas boiler": "Caldera de gas",
29381
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Colgada en la pared por su parte trasera, con la salida de humos arriba. Su altura sobre el suelo es la de su parte inferior.",
29382
+ "Water heater": "Calentador de agua",
29383
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Un dep\xF3sito redondo contra la pared. Tire de sus lados para agrandarlo. Dele una altura sobre el suelo para colgarlo en la pared.",
29384
+ Diameter: "Di\xE1metro",
28855
29385
  "Base unit": "Mueble bajo",
28856
29386
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Un mueble de cocina con su encimera, contra la pared: puertas, cajones o un horno, como lo muestran los alzados. Tire de sus lados para ensancharlo.",
28857
29387
  Below: "Debajo",
@@ -28898,7 +29428,8 @@ var translations = {
28898
29428
  "Office chair": "Silla de oficina",
28899
29429
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "Su respaldo va contra la pared. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo.",
28900
29430
  "Its back at the top. Turn it to face the table.": "Su respaldo arriba. G\xEDrela hacia la mesa.",
28901
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "Contra la pared, con su silla de oficina delante o sin ella. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo."
29431
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Contra la pared. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo. Su silla de oficina es un objeto aparte.",
29432
+ "On five casters, its back at the top. Turn it to face the desk.": "Sobre cinco ruedas, su respaldo arriba. G\xEDrela hacia el escritorio."
28902
29433
  },
28903
29434
  de: {
28904
29435
  Hob: "Kochfeld",
@@ -28926,7 +29457,7 @@ var translations = {
28926
29457
  "Double washbasin": "Doppelwaschbecken",
28927
29458
  Depth: "Tiefe",
28928
29459
  Bowls: "Becken",
28929
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Eine Platte mit ihren Becken. Ziehen Sie an den Seiten, um sie l\xE4nger oder tiefer zu machen: Becken und Armaturen behalten ihre Gr\xF6\xDFe.",
29460
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Eine Platte mit ihren Becken und darunter ein Unterschrank mit Schubladen oder T\xFCren, h\xE4ngend oder auf F\xFC\xDFen, oder keiner. Ziehen Sie an den Seiten, um sie l\xE4nger oder tiefer zu machen: Becken und Armaturen behalten ihre Gr\xF6\xDFe.",
28930
29461
  Triple: "Dreifach",
28931
29462
  "Glazing: Single": "Einfach",
28932
29463
  "Glazing: Double": "Zweifach",
@@ -28976,6 +29507,25 @@ var translations = {
28976
29507
  Radiator: "Heizk\xF6rper",
28977
29508
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Mit der R\xFCckseite an der Wand. Ziehen Sie an den Seiten, um ihn zu verl\xE4ngern: Seine Glieder behalten ihre Breite. Das Ventil sitzt an einem Ende.",
28978
29509
  Valve: "Ventil",
29510
+ "On feet": "Auf F\xFC\xDFen",
29511
+ "Shower head": "Duschkopf",
29512
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "An der Wand in der H\xF6he seiner Armatur befestigt: eine Duschs\xE4ule mit Kopfbrause, eine Brausestange mit Handbrause oder ein Kopf an seinem Arm. \xDCber einer Duschwanne oder Badewanne.",
29513
+ "Column": "Duschs\xE4ule",
29514
+ "Slide rail": "Brausestange",
29515
+ "Fixed head": "Fester Kopf",
29516
+ Toilet: "WC",
29517
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Der Sp\xFClkasten steht an der Wand. Ziehen Sie an den Seiten, um es breiter oder tiefer zu machen.",
29518
+ "Toilet, wall-hung": "Wand-WC",
29519
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Die R\xFCckseite liegt an der Wand, der Sp\xFClkasten in der Wand. Ziehen Sie an den Seiten, um es breiter oder tiefer zu machen.",
29520
+ "Shower tray": "Duschwanne",
29521
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Mit einer Seite an der Wand. Ziehen Sie an den Seiten, um sie zu vergr\xF6\xDFern: Rand und Ablauf behalten ihre Gr\xF6\xDFe.",
29522
+ "Heat pump, outdoor unit": "W\xE4rmepumpe, Au\xDFenger\xE4t",
29523
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Mit der R\xFCckseite an einer Au\xDFenwand. Ziehen Sie an den Seiten, um es l\xE4nger oder tiefer zu machen. Geben Sie ihm eine H\xF6he \xFCber dem Boden, um es auf Konsolen zu setzen.",
29524
+ "Gas boiler": "Gasheizkessel",
29525
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Mit der R\xFCckseite an die Wand geh\xE4ngt, das Abgasrohr oben. Seine H\xF6he \xFCber dem Boden ist die seiner Unterkante.",
29526
+ "Water heater": "Warmwasserspeicher",
29527
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Ein runder Speicher an der Wand. Ziehen Sie an den Seiten, um ihn zu vergr\xF6\xDFern. Geben Sie ihm eine H\xF6he \xFCber dem Boden, um ihn an die Wand zu h\xE4ngen.",
29528
+ Diameter: "Durchmesser",
28979
29529
  "Base unit": "Unterschrank",
28980
29530
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Ein K\xFCchenschrank mit Arbeitsplatte an der Wand: T\xFCren, Schubladen oder ein Backofen, wie die Ansichten ihn zeigen. Ziehen Sie an seinen Seiten, um ihn zu verbreitern.",
28981
29531
  Below: "Darunter",
@@ -29022,7 +29572,8 @@ var translations = {
29022
29572
  "Office chair": "B\xFCrostuhl",
29023
29573
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "Seine R\xFCckenlehne steht an der Wand. Ziehen Sie an seinen Seiten, um es breiter oder tiefer zu machen.",
29024
29574
  "Its back at the top. Turn it to face the table.": "Die Lehne oben. Drehen Sie ihn zum Tisch.",
29025
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "An der Wand, mit herangezogenem B\xFCrostuhl oder ohne. Ziehen Sie an seinen Seiten, um ihn breiter oder tiefer zu machen."
29575
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "An der Wand. Ziehen Sie an seinen Seiten, um ihn breiter oder tiefer zu machen. Sein B\xFCrostuhl ist ein eigenes Objekt.",
29576
+ "On five casters, its back at the top. Turn it to face the desk.": "Auf f\xFCnf Rollen, die Lehne oben. Drehen Sie ihn zum Schreibtisch."
29026
29577
  },
29027
29578
  zh: {
29028
29579
  Hob: "\u7076\u53F0",
@@ -29050,7 +29601,7 @@ var translations = {
29050
29601
  "Double washbasin": "\u53CC\u76C6\u6D17\u624B\u53F0",
29051
29602
  Depth: "\u8FDB\u6DF1",
29052
29603
  Bowls: "\u76C6\u6570",
29053
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u5E26\u76C6\u7684\u53F0\u9762\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\uFF1A\u76C6\u548C\u6C34\u9F99\u5934\u4FDD\u6301\u539F\u5C3A\u5BF8\u3002",
29604
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u5E26\u76C6\u7684\u53F0\u9762\uFF0C\u4E0B\u65B9\u53EF\u914D\u62BD\u5C49\u6216\u95E8\u7684\u6D74\u5BA4\u67DC\uFF0C\u60AC\u6302\u6216\u843D\u5730\u5E26\u811A\uFF0C\u6216\u4E0D\u914D\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\uFF1A\u76C6\u548C\u6C34\u9F99\u5934\u4FDD\u6301\u539F\u5C3A\u5BF8\u3002",
29054
29605
  Triple: "\u4E09\u5C42",
29055
29606
  "Glazing: Single": "\u5355\u5C42",
29056
29607
  "Glazing: Double": "\u53CC\u5C42",
@@ -29100,6 +29651,25 @@ var translations = {
29100
29651
  Radiator: "\u6696\u6C14\u7247",
29101
29652
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\u80CC\u9762\u9760\u5899\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u5C06\u5176\u52A0\u957F\uFF0C\u5404\u7247\u5BBD\u5EA6\u4E0D\u53D8\u3002\u9600\u95E8\u5728\u4E00\u7AEF\u3002",
29102
29653
  Valve: "\u9600\u95E8",
29654
+ "On feet": "\u843D\u5730\u5E26\u811A",
29655
+ "Shower head": "\u82B1\u6D12",
29656
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\u6309\u6DF7\u6C34\u9600\u9AD8\u5EA6\u56FA\u5B9A\u5728\u5899\u4E0A\uFF1A\u5E26\u9876\u55B7\u7684\u82B1\u6D12\u67F1\u3001\u5E26\u624B\u6301\u82B1\u6D12\u7684\u5347\u964D\u6746\uFF0C\u6216\u88C5\u5728\u81C2\u4E0A\u7684\u56FA\u5B9A\u82B1\u6D12\u3002\u7528\u4E8E\u6DCB\u6D74\u5E95\u76D8\u6216\u6D74\u7F38\u4E0A\u65B9\u3002",
29657
+ "Column": "\u82B1\u6D12\u67F1",
29658
+ "Slide rail": "\u5347\u964D\u6746",
29659
+ "Fixed head": "\u56FA\u5B9A\u82B1\u6D12",
29660
+ Toilet: "\u5750\u4FBF\u5668",
29661
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\u6C34\u7BB1\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
29662
+ "Toilet, wall-hung": "\u58C1\u6302\u5F0F\u5750\u4FBF\u5668",
29663
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\u80CC\u9762\u9760\u5899\uFF0C\u6C34\u7BB1\u5D4C\u5728\u5899\u5185\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
29664
+ "Shower tray": "\u6DCB\u6D74\u5E95\u76D8",
29665
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\u4E00\u4FA7\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u653E\u5927\uFF1A\u8FB9\u6CBF\u548C\u5730\u6F0F\u4FDD\u6301\u5C3A\u5BF8\u3002",
29666
+ "Heat pump, outdoor unit": "\u70ED\u6CF5\u5BA4\u5916\u673A",
29667
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\u80CC\u9762\u9760\u5916\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\u3002\u8BBE\u7F6E\u79BB\u5730\u9AD8\u5EA6\u5373\u53EF\u653E\u5728\u652F\u67B6\u4E0A\u3002",
29668
+ "Gas boiler": "\u71C3\u6C14\u9505\u7089",
29669
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\u80CC\u9762\u6302\u5728\u5899\u4E0A\uFF0C\u70DF\u9053\u5728\u9876\u90E8\u3002\u5176\u79BB\u5730\u9AD8\u5EA6\u4E3A\u5E95\u9762\u7684\u9AD8\u5EA6\u3002",
29670
+ "Water heater": "\u70ED\u6C34\u5668",
29671
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\u9760\u5899\u7684\u5706\u5F62\u6C34\u7BB1\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u653E\u5927\u3002\u8BBE\u7F6E\u79BB\u5730\u9AD8\u5EA6\u5373\u53EF\u6302\u5728\u5899\u4E0A\u3002",
29672
+ Diameter: "\u76F4\u5F84",
29103
29673
  "Base unit": "\u5730\u67DC",
29104
29674
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\u5E26\u53F0\u9762\u7684\u53A8\u623F\u67DC\uFF0C\u9760\u5899\u653E\u7F6E\uFF1A\u95E8\u3001\u62BD\u5C49\u6216\u70E4\u7BB1\uFF0C\u7ACB\u9762\u4E2D\u53EF\u89C1\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u3002",
29105
29675
  Below: "\u4E0B\u65B9",
@@ -29146,7 +29716,8 @@ var translations = {
29146
29716
  "Office chair": "\u529E\u516C\u6905",
29147
29717
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "\u9760\u80CC\u8D34\u5899\u653E\u7F6E\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
29148
29718
  "Its back at the top. Turn it to face the table.": "\u9760\u80CC\u5728\u4E0A\u65B9\u3002\u65CB\u8F6C\u4F7F\u5176\u9762\u5411\u684C\u5B50\u3002",
29149
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "\u9760\u5899\u653E\u7F6E\uFF0C\u53EF\u5E26\u62C9\u5230\u684C\u524D\u7684\u529E\u516C\u6905\uFF0C\u4E5F\u53EF\u4E0D\u5E26\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002"
29719
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002\u529E\u516C\u6905\u662F\u5355\u72EC\u7684\u5BF9\u8C61\u3002",
29720
+ "On five casters, its back at the top. Turn it to face the desk.": "\u4E94\u4E2A\u811A\u8F6E\uFF0C\u9760\u80CC\u671D\u4E0A\u3002\u5C06\u5176\u8F6C\u5411\u4E66\u684C\u3002"
29150
29721
  },
29151
29722
  ja: {
29152
29723
  Hob: "\u30B3\u30F3\u30ED",
@@ -29174,7 +29745,7 @@ var translations = {
29174
29745
  "Double washbasin": "\u30C0\u30D6\u30EB\u30DC\u30A6\u30EB\u6D17\u9762\u53F0",
29175
29746
  Depth: "\u5965\u884C\u304D",
29176
29747
  Bowls: "\u30DC\u30A6\u30EB\u6570",
29177
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u30DC\u30A6\u30EB\u4ED8\u304D\u306E\u30AB\u30A6\u30F3\u30BF\u30FC\u3002\u8FBA\u3092\u5F15\u304F\u3068\u9577\u304F\u30FB\u6DF1\u304F\u306A\u308A\u3001\u30DC\u30A6\u30EB\u3068\u6C34\u6813\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
29748
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u30DC\u30A6\u30EB\u4ED8\u304D\u306E\u30AB\u30A6\u30F3\u30BF\u30FC\u3002\u4E0B\u306B\u5F15\u304D\u51FA\u3057\u304B\u6249\u306E\u6D17\u9762\u53F0\u4E0B\u53CE\u7D0D\u3092\u3001\u58C1\u639B\u3051\u304B\u811A\u4ED8\u304D\u3067\u4ED8\u3051\u3089\u308C\u307E\u3059\uFF08\u306A\u3057\u3082\u53EF\uFF09\u3002\u8FBA\u3092\u5F15\u304F\u3068\u9577\u304F\u30FB\u6DF1\u304F\u306A\u308A\u3001\u30DC\u30A6\u30EB\u3068\u6C34\u6813\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
29178
29749
  Triple: "\u4E09\u5C64",
29179
29750
  "Glazing: Single": "\u5358\u677F",
29180
29751
  "Glazing: Double": "\u8907\u5C64",
@@ -29224,6 +29795,25 @@ var translations = {
29224
29795
  Radiator: "\u30E9\u30B8\u30A8\u30FC\u30BF\u30FC",
29225
29796
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\u80CC\u9762\u3092\u58C1\u306B\u4ED8\u3051\u3066\u7F6E\u304D\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u304F\u3068\u9577\u304F\u306A\u308A\u3001\u5404\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u5E45\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002\u30D0\u30EB\u30D6\u306F\u4E00\u65B9\u306E\u7AEF\u306B\u3042\u308A\u307E\u3059\u3002",
29226
29797
  Valve: "\u30D0\u30EB\u30D6",
29798
+ "On feet": "\u811A\u4ED8\u304D",
29799
+ "Shower head": "\u30B7\u30E3\u30EF\u30FC\u30D8\u30C3\u30C9",
29800
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\u6DF7\u5408\u6C34\u6813\u306E\u9AD8\u3055\u3067\u58C1\u306B\u53D6\u308A\u4ED8\u3051\u307E\u3059\u3002\u30AA\u30FC\u30D0\u30FC\u30D8\u30C3\u30C9\u30B7\u30E3\u30EF\u30FC\u4ED8\u304D\u306E\u30B7\u30E3\u30EF\u30FC\u30D0\u30FC\u3001\u30CF\u30F3\u30C9\u30B7\u30E3\u30EF\u30FC\u4ED8\u304D\u306E\u30B9\u30E9\u30A4\u30C9\u30D0\u30FC\u3001\u307E\u305F\u306F\u30A2\u30FC\u30E0\u4ED8\u304D\u306E\u56FA\u5B9A\u30D8\u30C3\u30C9\u3002\u30B7\u30E3\u30EF\u30FC\u30D1\u30F3\u3084\u6D74\u69FD\u306E\u4E0A\u306B\u3002",
29801
+ "Column": "\u30B7\u30E3\u30EF\u30FC\u30D0\u30FC",
29802
+ "Slide rail": "\u30B9\u30E9\u30A4\u30C9\u30D0\u30FC",
29803
+ "Fixed head": "\u56FA\u5B9A\u30D8\u30C3\u30C9",
29804
+ Toilet: "\u4FBF\u5668",
29805
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\u30BF\u30F3\u30AF\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
29806
+ "Toilet, wall-hung": "\u58C1\u639B\u3051\u4FBF\u5668",
29807
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\u80CC\u9762\u3092\u58C1\u306B\u4ED8\u3051\u3001\u30BF\u30F3\u30AF\u306F\u58C1\u306E\u4E2D\u3067\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
29808
+ "Shower tray": "\u30B7\u30E3\u30EF\u30FC\u30D1\u30F3",
29809
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\u4E00\u8FBA\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5927\u304D\u304F\u3057\u307E\u3059\u3002\u7E01\u3068\u6392\u6C34\u53E3\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
29810
+ "Heat pump, outdoor unit": "\u30D2\u30FC\u30C8\u30DD\u30F3\u30D7\u5BA4\u5916\u6A5F",
29811
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\u80CC\u9762\u3092\u5916\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9577\u3055\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u3092\u6307\u5B9A\u3059\u308B\u3068\u67B6\u53F0\u306B\u8F09\u305B\u3089\u308C\u307E\u3059\u3002",
29812
+ "Gas boiler": "\u30AC\u30B9\u30DC\u30A4\u30E9\u30FC",
29813
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\u80CC\u9762\u3067\u58C1\u306B\u639B\u3051\u3001\u4E0A\u306B\u6392\u6C17\u7B52\u304C\u3042\u308A\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u306F\u5E95\u9762\u306E\u9AD8\u3055\u3067\u3059\u3002",
29814
+ "Water heater": "\u7D66\u6E6F\u5668",
29815
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\u58C1\u969B\u306B\u7F6E\u304F\u5186\u7B52\u5F62\u306E\u30BF\u30F3\u30AF\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5927\u304D\u304F\u3057\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u3092\u6307\u5B9A\u3059\u308B\u3068\u58C1\u306B\u639B\u3051\u3089\u308C\u307E\u3059\u3002",
29816
+ Diameter: "\u76F4\u5F84",
29227
29817
  "Base unit": "\u30D9\u30FC\u30B9\u30AD\u30E3\u30D3\u30CD\u30C3\u30C8",
29228
29818
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\u5929\u677F\u4ED8\u304D\u306E\u30AD\u30C3\u30C1\u30F3\u30AD\u30E3\u30D3\u30CD\u30C3\u30C8\u3002\u58C1\u969B\u306B\u7F6E\u304D\u307E\u3059\u3002\u6249\u3001\u5F15\u304D\u51FA\u3057\u3001\u30AA\u30FC\u30D6\u30F3\u304C\u7ACB\u9762\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3092\u5E83\u3052\u307E\u3059\u3002",
29229
29819
  Below: "\u4E0B\u90E8",
@@ -29270,7 +29860,8 @@ var translations = {
29270
29860
  "Office chair": "\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2",
29271
29861
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "\u80CC\u3082\u305F\u308C\u3092\u58C1\u306B\u3064\u3051\u3066\u7F6E\u304D\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
29272
29862
  "Its back at the top. Turn it to face the table.": "\u80CC\u3082\u305F\u308C\u304C\u4E0A\u3002\u30C6\u30FC\u30D6\u30EB\u306B\u5411\u3051\u3066\u56DE\u8EE2\u3055\u305B\u307E\u3059\u3002",
29273
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "\u58C1\u969B\u306B\u7F6E\u304D\u3001\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2\u3092\u5F15\u304D\u5BC4\u305B\u305F\u72B6\u614B\u3001\u307E\u305F\u306F\u306A\u3057\u3067\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002"
29863
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u5F15\u304F\u3068\u5E45\u3084\u5965\u884C\u304D\u304C\u5909\u308F\u308A\u307E\u3059\u3002\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2\u306F\u5225\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3067\u3059\u3002",
29864
+ "On five casters, its back at the top. Turn it to face the desk.": "\u30AD\u30E3\u30B9\u30BF\u30FC5\u3064\u3001\u80CC\u3082\u305F\u308C\u304C\u4E0A\u3002\u673A\u306E\u65B9\u3078\u5411\u3051\u3066\u304F\u3060\u3055\u3044\u3002"
29274
29865
  },
29275
29866
  ko: {
29276
29867
  Hob: "\uCFE1\uD0D1",
@@ -29298,7 +29889,7 @@ var translations = {
29298
29889
  "Double washbasin": "\uC774\uC911 \uC138\uBA74\uB300",
29299
29890
  Depth: "\uAE4A\uC774",
29300
29891
  Bowls: "\uBCFC \uC218",
29301
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\uBCFC\uC774 \uC788\uB294 \uCE74\uC6B4\uD130\uC785\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uB610\uB294 \uAE4A\uAC8C \uB9CC\uB4E4 \uC218 \uC788\uC73C\uBA70, \uBCFC\uACFC \uC218\uC804\uC758 \uD06C\uAE30\uB294 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",
29892
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\uBCFC\uC774 \uC788\uB294 \uCE74\uC6B4\uD130\uC774\uBA70, \uC544\uB798\uC5D0 \uC11C\uB78D\uC774\uB098 \uBB38\uC774 \uB2EC\uB9B0 \uD558\uBD80\uC7A5\uC744 \uBCBD\uAC78\uC774 \uB610\uB294 \uB2E4\uB9AC\uD615\uC73C\uB85C \uB450\uAC70\uB098 \uB450\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uB610\uB294 \uAE4A\uAC8C \uB9CC\uB4E4 \uC218 \uC788\uC73C\uBA70, \uBCFC\uACFC \uC218\uC804\uC758 \uD06C\uAE30\uB294 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",
29302
29893
  Triple: "\uC0BC\uC911",
29303
29894
  "Glazing: Single": "\uB2E8\uD310",
29304
29895
  "Glazing: Double": "\uBCF5\uCE35",
@@ -29348,6 +29939,25 @@ var translations = {
29348
29939
  Radiator: "\uB77C\uB514\uC5D0\uC774\uD130",
29349
29940
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\uB4B7\uBA74\uC744 \uBCBD\uC5D0 \uBD99\uC785\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uAE30\uBA74 \uAE38\uC5B4\uC9C0\uBA70 \uAC01 \uC139\uC158\uC758 \uD3ED\uC740 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4. \uBC38\uBE0C\uB294 \uD55C\uCABD \uB05D\uC5D0 \uC788\uC2B5\uB2C8\uB2E4.",
29350
29941
  Valve: "\uBC38\uBE0C",
29942
+ "On feet": "\uB2E4\uB9AC\uD615",
29943
+ "Shower head": "\uC0E4\uC6CC\uAE30",
29944
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\uC218\uC804 \uB192\uC774\uB85C \uBCBD\uC5D0 \uACE0\uC815\uB429\uB2C8\uB2E4. \uD574\uBC14\uB77C\uAE30 \uC0E4\uC6CC\uAC00 \uC788\uB294 \uC0E4\uC6CC \uAE30\uB465, \uD578\uB4DC \uC0E4\uC6CC\uAC00 \uC788\uB294 \uC2AC\uB77C\uC774\uB4DC \uBC14, \uB610\uB294 \uC554\uC5D0 \uB2EC\uB9B0 \uACE0\uC815 \uD5E4\uB4DC. \uC0E4\uC6CC \uD2B8\uB808\uC774\uB098 \uC695\uC870 \uC704\uC5D0 \uB461\uB2C8\uB2E4.",
29945
+ "Column": "\uC0E4\uC6CC \uAE30\uB465",
29946
+ "Slide rail": "\uC2AC\uB77C\uC774\uB4DC \uBC14",
29947
+ "Fixed head": "\uACE0\uC815 \uD5E4\uB4DC",
29948
+ Toilet: "\uC591\uBCC0\uAE30",
29949
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\uBB3C\uD0F1\uD06C\uAC00 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694.",
29950
+ "Toilet, wall-hung": "\uBCBD\uAC78\uC774 \uC591\uBCC0\uAE30",
29951
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\uB4B7\uBA74\uC774 \uBCBD\uC5D0 \uBD99\uACE0 \uBB3C\uD0F1\uD06C\uB294 \uBCBD \uC548\uC5D0 \uC788\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694.",
29952
+ "Shower tray": "\uC0E4\uC6CC \uD2B8\uB808\uC774",
29953
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\uD55C \uBCC0\uC774 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uD0A4\uC6B0\uC138\uC694. \uD14C\uB450\uB9AC\uC640 \uBC30\uC218\uAD6C\uB294 \uD06C\uAE30\uAC00 \uC720\uC9C0\uB429\uB2C8\uB2E4.",
29954
+ "Heat pump, outdoor unit": "\uD788\uD2B8\uD38C\uD504 \uC2E4\uC678\uAE30",
29955
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\uB4B7\uBA74\uC774 \uC678\uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uD558\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB97C \uC8FC\uBA74 \uBC1B\uCE68\uB300 \uC704\uC5D0 \uB193\uC785\uB2C8\uB2E4.",
29956
+ "Gas boiler": "\uAC00\uC2A4 \uBCF4\uC77C\uB7EC",
29957
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\uB4B7\uBA74\uC73C\uB85C \uBCBD\uC5D0 \uAC78\uB9AC\uACE0 \uC5F0\uB3C4\uB294 \uC704\uC5D0 \uC788\uC2B5\uB2C8\uB2E4. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB294 \uBC11\uBA74\uC758 \uB192\uC774\uC785\uB2C8\uB2E4.",
29958
+ "Water heater": "\uC628\uC218\uAE30",
29959
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\uBCBD\uC5D0 \uBD99\uB294 \uC6D0\uD1B5\uD615 \uD0F1\uD06C\uC785\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uD0A4\uC6B0\uC138\uC694. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB97C \uC8FC\uBA74 \uBCBD\uC5D0 \uAC78\uB9BD\uB2C8\uB2E4.",
29960
+ Diameter: "\uC9C0\uB984",
29351
29961
  "Base unit": "\uD558\uBD80\uC7A5",
29352
29962
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\uC0C1\uD310\uC774 \uC788\uB294 \uC8FC\uBC29 \uC218\uB0A9\uC7A5\uC73C\uB85C \uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC2B5\uB2C8\uB2E4. \uBB38, \uC11C\uB78D \uB610\uB294 \uC624\uBE10\uC774 \uC785\uBA74\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD799\uB2C8\uB2E4.",
29353
29963
  Below: "\uC544\uB798",
@@ -29394,7 +30004,8 @@ var translations = {
29394
30004
  "Office chair": "\uC0AC\uBB34\uC6A9 \uC758\uC790",
29395
30005
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "\uB4F1\uBC1B\uC774\uB97C \uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD569\uB2C8\uB2E4.",
29396
30006
  "Its back at the top. Turn it to face the table.": "\uB4F1\uBC1B\uC774\uAC00 \uC704\uCABD\uC785\uB2C8\uB2E4. \uD14C\uC774\uBE14\uC744 \uD5A5\uD558\uB3C4\uB85D \uB3CC\uB9AC\uC138\uC694.",
29397
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "\uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC73C\uBA70, \uC0AC\uBB34\uC6A9 \uC758\uC790\uB97C \uB2F9\uACA8 \uB193\uAC70\uB098 \uC5C6\uC774 \uB461\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD569\uB2C8\uB2E4."
30007
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694. \uC0AC\uBB34\uC6A9 \uC758\uC790\uB294 \uBCC4\uB3C4\uC758 \uAC1D\uCCB4\uC785\uB2C8\uB2E4.",
30008
+ "On five casters, its back at the top. Turn it to face the desk.": "\uBC14\uD034 \uB2E4\uC12F \uAC1C, \uB4F1\uBC1B\uC774\uAC00 \uC704\uCABD\uC785\uB2C8\uB2E4. \uCC45\uC0C1\uC744 \uD5A5\uD558\uB3C4\uB85D \uB3CC\uB9AC\uC138\uC694."
29398
30009
  },
29399
30010
  tr: {
29400
30011
  Hob: "Ocak",
@@ -29422,7 +30033,7 @@ var translations = {
29422
30033
  "Double washbasin": "\xC7ift lavabo",
29423
30034
  Depth: "Derinlik",
29424
30035
  Bowls: "Hazneler",
29425
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Hazneleriyle bir tezg\xE2h. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: hazneler ve bataryalar boyutunu korur.",
30036
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Hazneleriyle bir tezg\xE2h; alt\u0131nda \xE7ekmeceli veya kapakl\u0131, asma ya da ayakl\u0131 bir dolap olabilir ya da hi\xE7 olmayabilir. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: hazneler ve bataryalar boyutunu korur.",
29426
30037
  Triple: "\xDC\xE7l\xFC",
29427
30038
  "Glazing: Single": "Tek cam",
29428
30039
  "Glazing: Double": "\xC7ift cam",
@@ -29472,6 +30083,25 @@ var translations = {
29472
30083
  Radiator: "Radyat\xF6r",
29473
30084
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "S\u0131rt\u0131 duvara dayan\u0131r. Uzatmak i\xE7in kenarlar\u0131n\u0131 \xE7ekin: dilimleri geni\u015Fli\u011Fini korur. Vanas\u0131 bir ucundad\u0131r.",
29474
30085
  Valve: "Vana",
30086
+ "On feet": "Ayakl\u0131",
30087
+ "Shower head": "Du\u015F ba\u015Fl\u0131\u011F\u0131",
30088
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Bataryas\u0131n\u0131n y\xFCksekli\u011Finde duvara sabitlenir: tepe du\u015Flu bir du\u015F kolonu, el du\u015Flu bir s\xFCrg\xFCl\xFC bar veya kolunda sabit bir ba\u015Fl\u0131k. Bir du\u015F teknesinin ya da k\xFCvetin \xFCst\xFCnde.",
30089
+ "Column": "Kolon",
30090
+ "Slide rail": "S\xFCrg\xFCl\xFC bar",
30091
+ "Fixed head": "Sabit ba\u015Fl\u0131k",
30092
+ Toilet: "Klozet",
30093
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Rezervuar\u0131 duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
30094
+ "Toilet, wall-hung": "Asma klozet",
30095
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Arkas\u0131 duvara dayan\u0131r, rezervuar\u0131 duvar\u0131n i\xE7indedir. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
30096
+ "Shower tray": "Du\u015F teknesi",
30097
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Bir kenar\u0131yla duvara dayan\u0131r. B\xFCy\xFCtmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: kenar\u0131 ve s\xFCzgeci boyutunu korur.",
30098
+ "Heat pump, outdoor unit": "Is\u0131 pompas\u0131, d\u0131\u015F \xFCnite",
30099
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Arkas\u0131yla bir d\u0131\u015F duvara dayan\u0131r. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Konsollara oturtmak i\xE7in ona yerden bir y\xFCkseklik verin.",
30100
+ "Gas boiler": "Gaz kombisi",
30101
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Arkas\u0131yla duvara as\u0131l\u0131r, bacas\u0131 \xFCst\xFCndedir. Yerden y\xFCksekli\u011Fi alt y\xFCz\xFCn\xFCn y\xFCksekli\u011Fidir.",
30102
+ "Water heater": "Su \u0131s\u0131t\u0131c\u0131",
30103
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Duvara dayanan yuvarlak bir tank. B\xFCy\xFCtmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Duvara asmak i\xE7in ona yerden bir y\xFCkseklik verin.",
30104
+ Diameter: "\xC7ap",
29475
30105
  "Base unit": "Alt dolap",
29476
30106
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Tezg\xE2h\u0131yla birlikte duvara dayal\u0131 bir mutfak dolab\u0131: kap\u0131lar, \xE7ekmeceler veya f\u0131r\u0131n, g\xF6r\xFCn\xFC\u015Flerde g\xF6r\xFCld\xFC\u011F\xFC gibi. Geni\u015Fletmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
29477
30107
  Below: "Alt\u0131nda",
@@ -29518,7 +30148,8 @@ var translations = {
29518
30148
  "Office chair": "Ofis sandalyesi",
29519
30149
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "S\u0131rtl\u0131\u011F\u0131 duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
29520
30150
  "Its back at the top. Turn it to face the table.": "S\u0131rtl\u0131\u011F\u0131 \xFCstte. Masaya do\u011Fru \xE7evirin.",
29521
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "Duvara dayal\u0131, \xF6n\xFCne \xE7ekilmi\u015F ofis sandalyesiyle ya da onsuz. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin."
30151
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Ofis sandalyesi ayr\u0131 bir nesnedir.",
30152
+ "On five casters, its back at the top. Turn it to face the desk.": "Be\u015F tekerlekli, s\u0131rtl\u0131\u011F\u0131 \xFCstte. Masaya do\u011Fru \xE7evirin."
29522
30153
  }
29523
30154
  };
29524
30155
 
@@ -29534,6 +30165,7 @@ var architecture = {
29534
30165
  api.registerParametric(tall(washbasin("arch.washbasin", "Washbasin", 600, 450, 1), 850));
29535
30166
  api.registerParametric(tall(washbasin("arch.washbasin.double", "Double washbasin", 1200, 500, 2), 850));
29536
30167
  api.registerParametric(tall(bathtub, 580));
30168
+ for (const kind of [toilet, wallHungToilet, showerTray, showerHead]) api.registerParametric(kind);
29537
30169
  api.registerParametric(tall(hob, 900));
29538
30170
  api.registerParametric(tall(sink, 900));
29539
30171
  api.registerParametric(tall(fridge("arch.fridge", "Fridge", 600, 650, 1, 1850), 1850));
@@ -29543,8 +30175,9 @@ var architecture = {
29543
30175
  api.registerParametric(hood);
29544
30176
  api.registerParametric(splashback);
29545
30177
  api.registerParametric(tall(cornerSofa, 850, false));
29546
- for (const kind of [sofa("arch.sofa", "Sofa", 1600, 2), sofa("arch.armchair", "Armchair", 850, 1), chair, desk]) api.registerParametric(kind);
30178
+ for (const kind of [sofa("arch.sofa", "Sofa", 1600, 2), sofa("arch.armchair", "Armchair", 850, 1), chair, desk, officeChair]) api.registerParametric(kind);
29547
30179
  api.registerParametric(tall(radiator, RADIATOR_TOP));
30180
+ for (const kind of [heatPump, gasBoiler, waterHeater]) api.registerParametric(kind);
29548
30181
  api.registerParametric(compass);
29549
30182
  api.registerCommand({
29550
30183
  id: "arch.room",
@@ -30407,7 +31040,7 @@ var furniture_default = {
30407
31040
  formatVersion: 1,
30408
31041
  id: "opencalque.furniture",
30409
31042
  name: "Adjustable furniture",
30410
- version: "1.6.0",
31043
+ version: "1.7.0",
30411
31044
  author: "OpenCalque",
30412
31045
  description: "Tables, beds and shelving whose size and number of seats or bays you set.",
30413
31046
  translations: {
@@ -30415,7 +31048,8 @@ var furniture_default = {
30415
31048
  "Adjustable furniture": "Mobilier ajustable",
30416
31049
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Tables, lits et \xE9tag\xE8res dont vous r\xE9glez la taille et le nombre de places ou de trav\xE9es.",
30417
31050
  "Table with chairs": "Table avec chaises",
30418
- Bed: "Lit",
31051
+ "Single bed": "Lit simple",
31052
+ "Double bed": "Lit double",
30419
31053
  "Shelving unit": "\xC9tag\xE8re",
30420
31054
  Length: "Longueur",
30421
31055
  Width: "Largeur",
@@ -30427,7 +31061,8 @@ var furniture_default = {
30427
31061
  "Adjustable furniture": "Mobiliario ajustable",
30428
31062
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Mesas, camas y estanter\xEDas cuyo tama\xF1o y n\xFAmero de plazas o m\xF3dulos usted define.",
30429
31063
  "Table with chairs": "Mesa con sillas",
30430
- Bed: "Cama",
31064
+ "Single bed": "Cama individual",
31065
+ "Double bed": "Cama doble",
30431
31066
  "Shelving unit": "Estanter\xEDa",
30432
31067
  Length: "Longitud",
30433
31068
  Width: "Ancho",
@@ -30439,7 +31074,8 @@ var furniture_default = {
30439
31074
  "Adjustable furniture": "Anpassbare M\xF6bel",
30440
31075
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Tische, Betten und Regale, deren Gr\xF6\xDFe und Anzahl der Pl\xE4tze oder Felder Sie festlegen.",
30441
31076
  "Table with chairs": "Tisch mit St\xFChlen",
30442
- Bed: "Bett",
31077
+ "Single bed": "Einzelbett",
31078
+ "Double bed": "Doppelbett",
30443
31079
  "Shelving unit": "Regal",
30444
31080
  Length: "L\xE4nge",
30445
31081
  Width: "Breite",
@@ -30451,7 +31087,8 @@ var furniture_default = {
30451
31087
  "Adjustable furniture": "\u53EF\u8C03\u5BB6\u5177",
30452
31088
  "Tables, beds and shelving whose size and number of seats or bays you set.": "\u53EF\u8BBE\u7F6E\u5C3A\u5BF8\u53CA\u5EA7\u4F4D\u6570\u6216\u683C\u6570\u7684\u684C\u5B50\u3001\u5E8A\u548C\u7F6E\u7269\u67B6\u3002",
30453
31089
  "Table with chairs": "\u684C\u6905",
30454
- Bed: "\u5E8A",
31090
+ "Single bed": "\u5355\u4EBA\u5E8A",
31091
+ "Double bed": "\u53CC\u4EBA\u5E8A",
30455
31092
  "Shelving unit": "\u7F6E\u7269\u67B6",
30456
31093
  Length: "\u957F\u5EA6",
30457
31094
  Width: "\u5BBD\u5EA6",
@@ -30463,7 +31100,8 @@ var furniture_default = {
30463
31100
  "Adjustable furniture": "\u30B5\u30A4\u30BA\u53EF\u5909\u306E\u5BB6\u5177",
30464
31101
  "Tables, beds and shelving whose size and number of seats or bays you set.": "\u30B5\u30A4\u30BA\u3084\u5E2D\u6570\u30FB\u68DA\u306E\u6570\u3092\u8A2D\u5B9A\u3067\u304D\u308B\u30C6\u30FC\u30D6\u30EB\u3001\u30D9\u30C3\u30C9\u3001\u68DA\u3002",
30465
31102
  "Table with chairs": "\u30C6\u30FC\u30D6\u30EB\u3068\u3044\u3059",
30466
- Bed: "\u30D9\u30C3\u30C9",
31103
+ "Single bed": "\u30B7\u30F3\u30B0\u30EB\u30D9\u30C3\u30C9",
31104
+ "Double bed": "\u30C0\u30D6\u30EB\u30D9\u30C3\u30C9",
30467
31105
  "Shelving unit": "\u68DA",
30468
31106
  Length: "\u9577\u3055",
30469
31107
  Width: "\u5E45",
@@ -30475,7 +31113,8 @@ var furniture_default = {
30475
31113
  "Adjustable furniture": "\uD06C\uAE30 \uC870\uC808 \uAC00\uAD6C",
30476
31114
  "Tables, beds and shelving whose size and number of seats or bays you set.": "\uD06C\uAE30\uC640 \uC88C\uC11D \uC218 \uB610\uB294 \uCE78 \uC218\uB97C \uC815\uD560 \uC218 \uC788\uB294 \uD14C\uC774\uBE14, \uCE68\uB300, \uC120\uBC18.",
30477
31115
  "Table with chairs": "\uD14C\uC774\uBE14\uACFC \uC758\uC790",
30478
- Bed: "\uCE68\uB300",
31116
+ "Single bed": "\uC2F1\uAE00 \uCE68\uB300",
31117
+ "Double bed": "\uB354\uBE14 \uCE68\uB300",
30479
31118
  "Shelving unit": "\uC120\uBC18",
30480
31119
  Length: "\uAE38\uC774",
30481
31120
  Width: "\uB108\uBE44",
@@ -30487,7 +31126,8 @@ var furniture_default = {
30487
31126
  "Adjustable furniture": "Ayarlanabilir mobilya",
30488
31127
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Boyutunu ve oturma yeri ya da b\xF6lme say\u0131s\u0131n\u0131 ayarlad\u0131\u011F\u0131n\u0131z masalar, yataklar ve raflar.",
30489
31128
  "Table with chairs": "Sandalyeli masa",
30490
- Bed: "Yatak",
31129
+ "Single bed": "Tek ki\u015Filik yatak",
31130
+ "Double bed": "\xC7ift ki\u015Filik yatak",
30491
31131
  "Shelving unit": "Raf \xFCnitesi",
30492
31132
  Length: "Uzunluk",
30493
31133
  Width: "Geni\u015Flik",
@@ -30601,11 +31241,63 @@ var furniture_default = {
30601
31241
  { repeat: { count: "max(1, floor(seats / 2))" }, path: [["(i + 0.5) * length / max(1, floor(seats / 2)) - 200", -750], ["(i + 0.5) * length / max(1, floor(seats / 2)) - 200", -900], ["(i + 0.5) * length / max(1, floor(seats / 2)) + 200", -900], ["(i + 0.5) * length / max(1, floor(seats / 2)) + 200", -750]] }
30602
31242
  ]
30603
31243
  },
31244
+ {
31245
+ kind: "furn.bed.single",
31246
+ mount: { on: "floor" },
31247
+ height: "500",
31248
+ category: "bedroom",
31249
+ label: "Single bed",
31250
+ params: [
31251
+ { key: "width", label: "Width", type: "number", default: 900, unit: "length" },
31252
+ { key: "length", label: "Length", type: "number", default: 1900, unit: "length" }
31253
+ ],
31254
+ box: { width: "width", height: "length" },
31255
+ draw: [
31256
+ { closed: true, radius: 25, path: [[0, 0], ["width", 0], ["width", "length"], [0, "length"]] },
31257
+ { path: [[0, 50], ["width", 50]] },
31258
+ {
31259
+ repeat: { count: "width >= 1400 ? 2 : 1" },
31260
+ closed: true,
31261
+ radius: 90,
31262
+ path: [
31263
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60)", 100],
31264
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60) + max(1, (width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1))", 100],
31265
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60) + max(1, (width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1))", 480],
31266
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60)", 480]
31267
+ ]
31268
+ },
31269
+ { path: [[0, 620], ["width - min(500, width * 0.3)", 620]] },
31270
+ {
31271
+ closed: true,
31272
+ path: [
31273
+ ["width - min(500, width * 0.3)", 620],
31274
+ ["width", "620 + min(500, width * 0.3)"],
31275
+ ["width - min(500, width * 0.3)", "620 + min(500, width * 0.3)"]
31276
+ ]
31277
+ }
31278
+ ],
31279
+ front: [
31280
+ { closed: true, path: [[0, 0], [60, 0], [60, -100], [0, -100]] },
31281
+ { closed: true, path: [["width - 60", 0], ["width", 0], ["width", -100], ["width - 60", -100]] },
31282
+ { closed: true, path: [[0, -100], ["width", -100], ["width", -300], [0, -300]] },
31283
+ { radius: 40, closed: true, path: [[10, -300], ["width - 10", -300], ["width - 10", -500], [10, -500]] },
31284
+ { path: [[0, -500], [0, -1e3], ["width", -1e3], ["width", -500]] }
31285
+ ],
31286
+ side: [
31287
+ { closed: true, path: [[0, 0], [50, 0], [50, -1e3], [0, -1e3]] },
31288
+ { closed: true, path: [[50, -100], ["length", -100], ["length", -300], [50, -300]] },
31289
+ { closed: true, path: [[50, 0], [110, 0], [110, -100], [50, -100]] },
31290
+ { closed: true, path: [["length - 60", 0], ["length", 0], ["length", -100], ["length - 60", -100]] },
31291
+ { radius: 40, closed: true, path: [[60, -300], ["length - 10", -300], ["length - 10", -500], [60, -500]] },
31292
+ { radius: 40, closed: true, path: [[100, -500], [480, -500], [480, -590], [100, -590]] }
31293
+ ]
31294
+ },
30604
31295
  {
30605
31296
  kind: "furn.bed",
31297
+ mount: { on: "floor" },
30606
31298
  height: "500",
30607
31299
  category: "bedroom",
30608
- label: "Bed",
31300
+ label: "Double bed",
30609
31301
  params: [
30610
31302
  { key: "width", label: "Width", type: "number", default: 1600, unit: "length" },
30611
31303
  { key: "length", label: "Length", type: "number", default: 2e3, unit: "length" }