@pi-outpost/embed 0.60.0 → 0.61.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.
@@ -1,7 +1,7 @@
1
1
  import { i as e, n as t, t as n } from "./rolldown-runtime-5HNE8Q1r.js";
2
2
  import { a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d, o as f, s as p, t as m, u as h } from "./lib-CSMo4o20.js";
3
3
  import { c as g, n as _, o as v, r as y } from "./workspacePath-j4IUi8yY.js";
4
- import { t as b } from "./download-DVJ5QY85.js";
4
+ import { n as b } from "./download-C9gupL_X.js";
5
5
  import { t as x } from "./katex-BOYcAQ2I.js";
6
6
  import { Component as S, Fragment as C, createContext as w, forwardRef as ee, useCallback as T, useContext as te, useEffect as E, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as ae, useRef as D, useState as O } from "react";
7
7
  import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
@@ -96,11 +96,11 @@ function me(e, t) {
96
96
  }
97
97
  //#endregion
98
98
  //#region ../ui/src/components/mermaidDirection.ts
99
- var M = ["LR", "RL"];
100
- function he(e) {
101
- return M.includes(e) ? "landscape" : "portrait";
102
- }
99
+ var he = ["LR", "RL"];
103
100
  function ge(e) {
101
+ return he.includes(e) ? "landscape" : "portrait";
102
+ }
103
+ function _e(e) {
104
104
  switch (e) {
105
105
  case "LR": return "TB";
106
106
  case "TB": return "LR";
@@ -108,11 +108,11 @@ function ge(e) {
108
108
  case "BT": return "RL";
109
109
  }
110
110
  }
111
- function _e(e) {
111
+ function ve(e) {
112
112
  let t = e.toUpperCase();
113
113
  return t === "TD" ? "TB" : t === "TB" || t === "BT" || t === "LR" || t === "RL" ? t : void 0;
114
114
  }
115
- function ve(e) {
115
+ function ye(e) {
116
116
  let t = 0;
117
117
  if (e[0]?.trim() === "---") {
118
118
  let n = e.findIndex((e, t) => t > 0 && e.trim() === "---");
@@ -125,27 +125,27 @@ function ve(e) {
125
125
  }
126
126
  return -1;
127
127
  }
128
- function ye(e) {
129
- let t = e.split("\n"), n = ve(t);
128
+ function be(e) {
129
+ let t = e.split("\n"), n = ye(t);
130
130
  if (n === -1) return;
131
131
  let r = t[n], i = /^(\s*)(flowchart|graph)([ \t]+(TD|TB|BT|LR|RL)\b)?(.*)$/i.exec(r);
132
132
  if (i !== null) {
133
- let [, e, r, , a, o] = i, s = a === void 0 ? "TB" : _e(a), c = ge(s), l = [...t];
133
+ let [, e, r, , a, o] = i, s = a === void 0 ? "TB" : ve(a), c = _e(s), l = [...t];
134
134
  return l[n] = `${e}${r} ${c}${o}`, {
135
135
  direction: s,
136
136
  turned: l.join("\n")
137
137
  };
138
138
  }
139
139
  let a = /^(\s*)stateDiagram(-v2)?\s*$/i.exec(r);
140
- if (a !== null) return be(t, n, a[1]);
140
+ if (a !== null) return xe(t, n, a[1]);
141
141
  }
142
- function be(e, t, n) {
142
+ function xe(e, t, n) {
143
143
  let r = 0;
144
144
  for (let n = t + 1; n < e.length; n += 1) {
145
145
  let t = e[n], i = r === 0 ? /^\s*direction\s+(TD|TB|BT|LR|RL)\s*$/i.exec(t) : null;
146
146
  if (i !== null) {
147
- let r = _e(i[1]), a = [...e];
148
- return a[n] = t.replace(/(direction\s+)(TD|TB|BT|LR|RL)/i, `$1${ge(r)}`), {
147
+ let r = ve(i[1]), a = [...e];
148
+ return a[n] = t.replace(/(direction\s+)(TD|TB|BT|LR|RL)/i, `$1${_e(r)}`), {
149
149
  direction: r,
150
150
  turned: a.join("\n")
151
151
  };
@@ -160,9 +160,9 @@ function be(e, t, n) {
160
160
  }
161
161
  //#endregion
162
162
  //#region ../ui/src/components/diagramControls.ts
163
- var xe = "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50", Se = "flex flex-wrap items-center gap-3 text-xs", Ce = null;
164
- async function we(e) {
165
- let t = await (Ce ??= import("./mermaid.core-DPCy8dJO.js").then((e) => e.t));
163
+ var Se = "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50", Ce = "flex flex-wrap items-center gap-3 text-xs", we = null;
164
+ async function Te(e) {
165
+ let t = await (we ??= import("./mermaid.core-DPCy8dJO.js").then((e) => e.t));
166
166
  return t.default.initialize({
167
167
  startOnLoad: !1,
168
168
  theme: e,
@@ -171,25 +171,25 @@ async function we(e) {
171
171
  suppressErrorRendering: !0
172
172
  }), t;
173
173
  }
174
- function Te(e) {
174
+ function Ee(e) {
175
175
  let t = /viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e), n = t ? Number(t[1]) : NaN;
176
176
  return Number.isFinite(n) && n > 0 ? n : void 0;
177
177
  }
178
- function Ee(e, t) {
178
+ function De(e, t) {
179
179
  if (typeof e != "object" || !e || !("props" in e)) return null;
180
180
  let n = e.props;
181
181
  if (t !== void 0 && !RegExp(`\\blanguage-${t}\\b`).test(n.className ?? "")) return null;
182
182
  let r = n.children;
183
183
  return typeof r == "string" ? r : Array.isArray(r) && r.every((e) => typeof e == "string") ? r.join("") : null;
184
184
  }
185
- function De(e) {
186
- let t = Ee(e, "mermaid");
185
+ function Oe(e) {
186
+ let t = De(e, "mermaid");
187
187
  return t === null ? null : t.trim();
188
188
  }
189
- function Oe(e) {
190
- let { children: t, ...n } = e, r = De(t);
191
- if (r !== null) return /* @__PURE__ */ A(ke, { code: r });
192
- let i = Ee(t);
189
+ function ke(e) {
190
+ let { children: t, ...n } = e, r = Oe(t);
191
+ if (r !== null) return /* @__PURE__ */ A(Ae, { code: r });
192
+ let i = De(t);
193
193
  return i === null ? /* @__PURE__ */ A("pre", {
194
194
  ...n,
195
195
  children: t
@@ -206,8 +206,8 @@ function Oe(e) {
206
206
  })]
207
207
  });
208
208
  }
209
- function ke({ code: e }) {
210
- let t = ne().replace(/[^a-zA-Z0-9]/g, ""), n = ce() === "light" ? "default" : "dark", [r, i] = O(null), [a, o] = O(null), [s, l] = O(!1), [u, d] = O(!1), [f, p] = O(!1), [m, h] = O(null), g = D(!1), _ = D(0), v = D(0), y = () => `mermaid-${t}-${++v.current}`, b = ae(() => ye(e), [e]), x = b === void 0 ? "landscape" : he(b.direction), [S, C] = O(void 0), w = r?.svg ?? null, ee = r !== null && r.orientation !== x, T = D(null), te = D(e);
209
+ function Ae({ code: e }) {
210
+ let t = ne().replace(/[^a-zA-Z0-9]/g, ""), n = ce() === "light" ? "default" : "dark", [r, i] = O(null), [a, o] = O(null), [s, l] = O(!1), [u, d] = O(!1), [f, p] = O(!1), [m, h] = O(null), g = D(!1), _ = D(0), v = D(0), y = () => `mermaid-${t}-${++v.current}`, b = ae(() => be(e), [e]), x = b === void 0 ? "landscape" : ge(b.direction), [S, C] = O(void 0), w = r?.svg ?? null, ee = r !== null && r.orientation !== x, T = D(null), te = D(e);
211
211
  te.current = e, E(() => (_.current += 1, i(null), C(void 0), d(!1), o(null), h(null), () => {
212
212
  _.current += 1;
213
213
  }), [e]);
@@ -234,7 +234,7 @@ function ke({ code: e }) {
234
234
  return E(() => {
235
235
  let e = !1, t = setTimeout(() => void c(async () => {
236
236
  try {
237
- let t = (await we(n)).default, r = te.current, a = ye(r), s = a === void 0 ? "landscape" : he(a.direction);
237
+ let t = (await Te(n)).default, r = te.current, a = be(r), s = a === void 0 ? "landscape" : ge(a.direction);
238
238
  if (S !== void 0 && a !== void 0) {
239
239
  let n = S === s ? r : a.turned, { svg: c } = await t.render(y(), n);
240
240
  e || (i({
@@ -248,9 +248,9 @@ function ke({ code: e }) {
248
248
  svg: c.svg,
249
249
  orientation: s,
250
250
  source: r
251
- }, u = Te(c.svg);
251
+ }, u = Ee(c.svg);
252
252
  if (a !== void 0 && u !== void 0 && u > 710) {
253
- let e = await t.render(y(), a.turned), n = Te(e.svg);
253
+ let e = await t.render(y(), a.turned), n = Ee(e.svg);
254
254
  if (n !== void 0) {
255
255
  let t = s === "landscape" ? me(u, n) : me(n, u);
256
256
  t !== s && (l = {
@@ -278,13 +278,13 @@ function ke({ code: e }) {
278
278
  className: "my-2 flex flex-col gap-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900",
279
279
  children: [
280
280
  /* @__PURE__ */ j("div", {
281
- className: `${Se} order-3`,
281
+ className: `${Ce} order-3`,
282
282
  children: [
283
283
  /* @__PURE__ */ A("button", {
284
284
  type: "button",
285
285
  onClick: () => l(!s),
286
286
  title: s ? "Show diagram" : "Show code",
287
- className: xe,
287
+ className: Se,
288
288
  children: s ? "⚏ diagram" : "⌗ code"
289
289
  }),
290
290
  !s && b !== void 0 && r !== null && /* @__PURE__ */ A("button", {
@@ -305,7 +305,7 @@ function ke({ code: e }) {
305
305
  }),
306
306
  /* @__PURE__ */ A("button", {
307
307
  type: "button",
308
- className: xe,
308
+ className: Se,
309
309
  disabled: f,
310
310
  onClick: () => void re(),
311
311
  title: "Save as .svg — insert it as a picture in a document",
@@ -313,7 +313,7 @@ function ke({ code: e }) {
313
313
  }),
314
314
  /* @__PURE__ */ A(le, {
315
315
  text: e,
316
- className: xe
316
+ className: Se
317
317
  }),
318
318
  m && /* @__PURE__ */ j("span", {
319
319
  role: "alert",
@@ -347,7 +347,7 @@ function ke({ code: e }) {
347
347
  anchorRef: T,
348
348
  actions: /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
349
349
  type: "button",
350
- className: xe,
350
+ className: Se,
351
351
  disabled: f,
352
352
  onClick: () => void re(),
353
353
  children: f ? "preparing SVG…" : "⤓ download SVG"
@@ -357,7 +357,7 @@ function ke({ code: e }) {
357
357
  children: ["Could not download SVG: ", m]
358
358
  })] }),
359
359
  children: /* @__PURE__ */ A("div", {
360
- style: { width: Te(w) },
360
+ style: { width: Ee(w) },
361
361
  className: "[&_svg]:!h-auto [&_svg]:!max-w-none [&_svg]:!w-full",
362
362
  dangerouslySetInnerHTML: { __html: w }
363
363
  })
@@ -373,18 +373,18 @@ function ke({ code: e }) {
373
373
  }
374
374
  //#endregion
375
375
  //#region ../shared/src/structuredExchange.ts
376
- var Ae = "urn:structured-exchange:1", je = ["graph", "sequence"];
377
- function Me(e) {
378
- return Ne(e) ? [
376
+ var je = "urn:structured-exchange:1", Me = ["graph", "sequence"];
377
+ function Ne(e) {
378
+ return Pe(e) ? [
379
379
  "graph",
380
380
  "sequence",
381
381
  "table"
382
- ] : je;
382
+ ] : Me;
383
383
  }
384
- function Ne(e) {
384
+ function Pe(e) {
385
385
  return e === "urn:structured-exchange:2" || e === "urn:structured-exchange:3";
386
386
  }
387
- function Pe(e) {
387
+ function Fe(e) {
388
388
  if (Array.isArray(e)) return { cells: e };
389
389
  let t = e.heading;
390
390
  return typeof t == "string" ? {
@@ -396,7 +396,7 @@ function Pe(e) {
396
396
  role: e.role
397
397
  };
398
398
  }
399
- var Fe = {
399
+ var Ie = {
400
400
  nodes: 500,
401
401
  edges: 2e3,
402
402
  participants: 100,
@@ -411,7 +411,7 @@ var Fe = {
411
411
  kindsPerVocabulary: 64,
412
412
  columnName: 200,
413
413
  cell: 1e3
414
- }, Ie = "urn:structured-exchange:2", Le = {
414
+ }, Le = "urn:structured-exchange:2", Re = {
415
415
  profile: 200,
416
416
  attributesPerItem: 50,
417
417
  removeAttributesPerItem: 50,
@@ -433,26 +433,26 @@ var Fe = {
433
433
  headingDepth: 6,
434
434
  viewpoints: 20,
435
435
  viewpointConcern: 500
436
- }, Re = 8e6, ze = "urn:structured-exchange:3", Be = [
437
- Ae,
438
- Ie,
439
- ze
436
+ }, ze = 8e6, Be = "urn:structured-exchange:3", Ve = [
437
+ je,
438
+ Le,
439
+ Be
440
440
  ];
441
- function Ve(e) {
442
- return Be.find((t) => t === e);
441
+ function He(e) {
442
+ return Ve.find((t) => t === e);
443
443
  }
444
444
  //#endregion
445
445
  //#region ../shared/src/structuredExchangeBounds.ts
446
- var He = 4e6, Ue = Math.max(He, Re);
447
- function We(e) {
448
- return Ne(e) ? Re : He;
446
+ var Ue = 4e6, We = Math.max(Ue, ze);
447
+ function Ge(e) {
448
+ return Pe(e) ? ze : Ue;
449
449
  }
450
- var Ge = (e) => new TextEncoder().encode(e).length;
451
- function Ke(e) {
452
- return e === "bytes" ? Ue : e === "relations" ? Le.relations : Fe[e];
450
+ var Ke = (e) => new TextEncoder().encode(e).length;
451
+ function qe(e) {
452
+ return e === "bytes" ? We : e === "relations" ? Re.relations : Ie[e];
453
453
  }
454
- function qe(e, t) {
455
- let n = Ke(e), r = t?.[e];
454
+ function Je(e, t) {
455
+ let n = qe(e), r = t?.[e];
456
456
  return r === void 0 || r >= n ? {
457
457
  limit: n,
458
458
  level: "ceiling"
@@ -461,8 +461,8 @@ function qe(e, t) {
461
461
  level: "deployment"
462
462
  };
463
463
  }
464
- function Je(e, t, n) {
465
- let r = Ge(e), i = qe("bytes", t), a = n === void 0 ? Infinity : We(n), o = Math.min(i.limit, a), s = o === a && a < i.limit ? "ceiling" : i.level;
464
+ function Ye(e, t, n) {
465
+ let r = Ke(e), i = Je("bytes", t), a = n === void 0 ? Infinity : Ge(n), o = Math.min(i.limit, a), s = o === a && a < i.limit ? "ceiling" : i.level;
466
466
  if (!(r <= o)) return {
467
467
  rule: "document-too-large",
468
468
  path: "",
@@ -472,7 +472,7 @@ function Je(e, t, n) {
472
472
  level: s
473
473
  };
474
474
  }
475
- var Ye = {
475
+ var Xe = {
476
476
  graph: ["nodes", "edges"],
477
477
  sequence: ["participants", "messages"],
478
478
  table: [
@@ -481,13 +481,13 @@ var Ye = {
481
481
  "relations"
482
482
  ]
483
483
  };
484
- function Xe(e, t) {
484
+ function Ze(e, t) {
485
485
  if (t === void 0) return [];
486
486
  let n = [];
487
- for (let r of Ye[e.kind] ?? []) {
487
+ for (let r of Xe[e.kind] ?? []) {
488
488
  let i = e.data[r];
489
489
  if (!Array.isArray(i)) continue;
490
- let { limit: a, level: o } = qe(r, t);
490
+ let { limit: a, level: o } = Je(r, t);
491
491
  o === "deployment" && i.length > a && n.push({
492
492
  rule: "collection-past-deployment-limit",
493
493
  path: `/data/${r}`,
@@ -499,32 +499,32 @@ function Xe(e, t) {
499
499
  }
500
500
  return n;
501
501
  }
502
- function Ze(e, t) {
502
+ function Qe(e, t) {
503
503
  let n = {};
504
- for (let t of Ye[e.kind] ?? []) {
504
+ for (let t of Xe[e.kind] ?? []) {
505
505
  let r = e.data[t];
506
506
  Array.isArray(r) && (n[t] = r.length);
507
507
  }
508
508
  return {
509
509
  kind: e.kind,
510
- bytes: Ge(t),
510
+ bytes: Ke(t),
511
511
  counts: n
512
512
  };
513
513
  }
514
514
  //#endregion
515
515
  //#region ../shared/src/structuredExchangeText.ts
516
- var Qe = 6.6, $e = 5.4;
517
- function et(e, t, n) {
516
+ var $e = 6.6, et = 5.4;
517
+ function tt(e, t, n) {
518
518
  let r = e.flatMap((e) => e.split(/\r?\n/)).reduce((e, t) => Math.max(e, t.length), 0);
519
- return Math.min(Math.max(r * Qe + 22, t), n);
519
+ return Math.min(Math.max(r * $e + 22, t), n);
520
520
  }
521
- function tt(e, t, n, r) {
522
- let i = t.map((e) => at(e).length).reduce((e, t) => Math.max(e, t), 0);
523
- return Math.max(et(e, n, r), Math.min(i * $e + 22, r));
521
+ function nt(e, t, n, r) {
522
+ let i = t.map((e) => ot(e).length).reduce((e, t) => Math.max(e, t), 0);
523
+ return Math.max(tt(e, n, r), Math.min(i * et + 22, r));
524
524
  }
525
- function nt(e, t, n = Qe) {
525
+ function rt(e, t, n = $e) {
526
526
  let r = Math.max(Math.floor((t - 22) / n + 1e-6), 4), i = [], a = e.split(/\r?\n/);
527
- if (a.length > 1) return a.flatMap((e) => nt(e, t, n)).slice(0, 3);
527
+ if (a.length > 1) return a.flatMap((e) => rt(e, t, n)).slice(0, 3);
528
528
  let o = "";
529
529
  for (let t of e.split(/\s+/)) {
530
530
  let e = o === "" ? t : `${o} ${t}`;
@@ -536,79 +536,79 @@ function nt(e, t, n = Qe) {
536
536
  let s = i.slice(0, 3);
537
537
  return s[2] = `${s[2].slice(0, Math.max(r - 1, 1))}…`, s;
538
538
  }
539
- function rt(e, t) {
539
+ function it(e, t) {
540
540
  return e * 15 + t * 15 + 14;
541
541
  }
542
- function it(e, t) {
543
- return e.flatMap((e) => nt(at(e), t, $e));
542
+ function at(e, t) {
543
+ return e.flatMap((e) => rt(ot(e), t, et));
544
544
  }
545
- function at(e) {
545
+ function ot(e) {
546
546
  return `${e.field}: ${e.from === void 0 ? "" : `${e.from} → `}${e.to}`;
547
547
  }
548
- function ot(e, t) {
549
- return `${e}: ${st(t)}`;
550
- }
551
- function st(e) {
552
- return Array.isArray(e) ? e.map((e) => st(e)).join(", ") : e === null ? "null" : typeof e == "object" && e && typeof e.ref == "string" ? `<${e.ref}>` : String(e);
548
+ function st(e, t) {
549
+ return `${e}: ${ct(t)}`;
553
550
  }
554
551
  function ct(e) {
552
+ return Array.isArray(e) ? e.map((e) => ct(e)).join(", ") : e === null ? "null" : typeof e == "object" && typeof e.ref == "string" ? `<${e.ref}>` : String(e);
553
+ }
554
+ function lt(e) {
555
555
  let t = e.range === void 0 ? "" : ` lines ${e.range.startLine}–${e.range.endLine}`, n = e.revision === void 0 ? "" : ` at ${e.revision}`;
556
556
  return `${e.uri}${t}${n}`;
557
557
  }
558
- function lt(e) {
558
+ function ut(e) {
559
559
  let t = e.label === void 0 ? e.uri : `${e.label} (${e.uri})`, n = e.mediaType === void 0 ? "" : `, ${e.mediaType}`;
560
560
  return `${e.rel}: ${t}${n} — ${e.sha256.slice(0, 14)}…`;
561
561
  }
562
562
  //#endregion
563
563
  //#region ../shared/src/structuredExchangeTimeline.ts
564
- var ut = 864e5, dt = /^(\d{4})-(\d{2})-(\d{2})$/;
565
- function ft(e) {
566
- let t = dt.exec(e);
564
+ var dt = 864e5, ft = /^(\d{4})-(\d{2})-(\d{2})$/;
565
+ function pt(e) {
566
+ let t = ft.exec(e);
567
567
  if (t === null) return;
568
568
  let [n, r, i] = [
569
569
  Number(t[1]),
570
570
  Number(t[2]),
571
571
  Number(t[3])
572
572
  ], a = new Date(Date.UTC(n, r - 1, i));
573
- if (a.setUTCFullYear(n, r - 1, i), a.getUTCFullYear() === n && a.getUTCMonth() === r - 1 && a.getUTCDate() === i) return Math.round(a.getTime() / ut);
573
+ if (a.setUTCFullYear(n, r - 1, i), a.getUTCFullYear() === n && a.getUTCMonth() === r - 1 && a.getUTCDate() === i) return Math.round(a.getTime() / dt);
574
574
  }
575
- function pt(e) {
576
- let t = /* @__PURE__ */ new Date(e * ut);
575
+ function mt(e) {
576
+ let t = /* @__PURE__ */ new Date(e * dt);
577
577
  return `${String(t.getUTCFullYear()).padStart(4, "0")}-${String(t.getUTCMonth() + 1).padStart(2, "0")}-${String(t.getUTCDate()).padStart(2, "0")}`;
578
578
  }
579
- function mt(e = /* @__PURE__ */ new Date()) {
580
- return Math.round(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()) / ut);
579
+ function ht(e = /* @__PURE__ */ new Date()) {
580
+ return Math.round(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()) / dt);
581
581
  }
582
- function ht(e) {
583
- let t = ft(e.type === "activity" ? e.start : e.date), n = ft(e.type === "activity" ? e.end : e.date);
582
+ function gt(e) {
583
+ let t = pt(e.type === "activity" ? e.start : e.date), n = pt(e.type === "activity" ? e.end : e.date);
584
584
  return t === void 0 || n === void 0 ? void 0 : {
585
585
  start: t,
586
586
  end: n
587
587
  };
588
588
  }
589
- function gt(e) {
589
+ function _t(e) {
590
590
  let t = /* @__PURE__ */ new Map();
591
591
  return e.rows.forEach((e, n) => {
592
592
  e.type === "task" && (t.has(e.id) || t.set(e.id, {
593
593
  id: e.id,
594
594
  type: "task",
595
595
  row: n,
596
- days: _t(e)
596
+ days: vt(e)
597
597
  }), e.items.forEach((e, r) => {
598
598
  e.id === void 0 || t.has(e.id) || t.set(e.id, {
599
599
  id: e.id,
600
600
  type: e.type,
601
601
  row: n,
602
602
  item: r,
603
- days: ht(e)
603
+ days: gt(e)
604
604
  });
605
605
  }));
606
606
  }), t;
607
607
  }
608
- function _t(e) {
608
+ function vt(e) {
609
609
  let t;
610
610
  for (let n of e.items) {
611
- let e = ht(n);
611
+ let e = gt(n);
612
612
  e !== void 0 && (t = t === void 0 ? { ...e } : {
613
613
  start: Math.min(t.start, e.start),
614
614
  end: Math.max(t.end, e.end)
@@ -616,68 +616,68 @@ function _t(e) {
616
616
  }
617
617
  return t;
618
618
  }
619
- function vt(e) {
619
+ function yt(e) {
620
620
  return e.type ?? "finish-to-start";
621
621
  }
622
- function yt(e) {
622
+ function bt(e) {
623
623
  return {
624
624
  from: e.startsWith("finish") ? "end" : "start",
625
625
  to: e.endsWith("finish") ? "end" : "start"
626
626
  };
627
627
  }
628
- function bt(e, t) {
628
+ function xt(e, t) {
629
629
  let n = t.get(e.from)?.days, r = t.get(e.to)?.days;
630
630
  if (n === void 0 || r === void 0) return;
631
- let i = yt(vt(e));
631
+ let i = bt(yt(e));
632
632
  return r[i.to] >= n[i.from];
633
633
  }
634
- function xt(e) {
634
+ function St(e) {
635
635
  if ("date" in e) {
636
- let t = ft(e.date) ?? 0;
636
+ let t = pt(e.date) ?? 0;
637
637
  return {
638
638
  start: t,
639
639
  end: t
640
640
  };
641
641
  }
642
642
  return {
643
- start: ft(e.start) ?? 0,
644
- end: ft(e.end) ?? 0
643
+ start: pt(e.start) ?? 0,
644
+ end: pt(e.end) ?? 0
645
645
  };
646
646
  }
647
- function St(e) {
647
+ function Ct(e) {
648
648
  if (e.previous === void 0) return;
649
- let t = xt(e.type === "activity" ? {
649
+ let t = St(e.type === "activity" ? {
650
650
  start: e.start,
651
651
  end: e.end
652
- } : { date: e.date }), n = xt(e.previous);
652
+ } : { date: e.date }), n = St(e.previous);
653
653
  return {
654
654
  start: t.start - n.start,
655
655
  end: t.end - n.end
656
656
  };
657
657
  }
658
- function Ct(e) {
658
+ function wt(e) {
659
659
  if (e === 0) return "";
660
660
  let t = e > 0 ? "+" : "−", n = Math.abs(e);
661
661
  return n < 14 ? `${t}${n}d` : n < 70 ? `${t}${Math.round(n / 7)}w` : `${t}${Math.round(n / 30.44)}mo`;
662
662
  }
663
- function wt(e) {
664
- let t = St(e);
665
- return t === void 0 ? "" : t.start === t.end ? Ct(t.start) : t.start === 0 ? `end${Ct(t.end)}` : t.end === 0 ? `start${Ct(t.start)}` : `${Ct(t.start)}, end${Ct(t.end)}`;
663
+ function Tt(e) {
664
+ let t = Ct(e);
665
+ return t === void 0 ? "" : t.start === t.end ? wt(t.start) : t.start === 0 ? `end${wt(t.end)}` : t.end === 0 ? `start${wt(t.start)}` : `${wt(t.start)}, end${wt(t.end)}`;
666
666
  }
667
- function Tt(e, t) {
667
+ function Et(e, t) {
668
668
  if (e.role !== void 0 || t?.role !== void 0) return !0;
669
- let n = St(e);
669
+ let n = Ct(e);
670
670
  return n !== void 0 && (n.start !== 0 || n.end !== 0);
671
671
  }
672
- function Et(e) {
673
- return e.role !== void 0 || e.items.some((t) => Tt(t, e));
672
+ function Dt(e) {
673
+ return e.role !== void 0 || e.items.some((t) => Et(t, e));
674
674
  }
675
- var Dt = {
675
+ var Ot = {
676
676
  week: 12,
677
677
  month: 4,
678
678
  quarter: .75
679
679
  };
680
- function Ot(e, t) {
680
+ function kt(e, t) {
681
681
  let n = e >= 8 ? "week" : e >= 1 ? "month" : "quarter";
682
682
  if (t === void 0) return n;
683
683
  let r = [
@@ -687,7 +687,7 @@ function Ot(e, t) {
687
687
  ];
688
688
  return r[Math.max(r.indexOf(n), r.indexOf(t))];
689
689
  }
690
- var kt = [
690
+ var At = [
691
691
  "Jan",
692
692
  "Feb",
693
693
  "Mar",
@@ -701,31 +701,31 @@ var kt = [
701
701
  "Nov",
702
702
  "Dec"
703
703
  ];
704
- function At(e) {
704
+ function jt(e) {
705
705
  return e.width >= 24 ? e.label : e.width >= 9 ? e.label.charAt(0) : "";
706
706
  }
707
- function jt(e, t) {
708
- return t === "month" ? At(e) : e.width >= e.label.length * 6 + 4 ? e.label : "";
709
- }
710
- function Mt(e) {
711
- return ((e + 3) % 7 + 7) % 7;
707
+ function Mt(e, t) {
708
+ return t === "month" ? jt(e) : e.width >= e.label.length * 6 + 4 ? e.label : "";
712
709
  }
713
710
  function Nt(e) {
714
- let t = e - Mt(e) + 3, n = (/* @__PURE__ */ new Date(t * ut)).getUTCFullYear();
715
- return Math.floor((t - Lt(n, 0)) / 7) + 1;
711
+ return ((e + 3) % 7 + 7) % 7;
716
712
  }
717
713
  function Pt(e) {
714
+ let t = e - Nt(e) + 3, n = (/* @__PURE__ */ new Date(t * dt)).getUTCFullYear();
715
+ return Math.floor((t - Rt(n, 0)) / 7) + 1;
716
+ }
717
+ function Ft(e) {
718
718
  if (e.label !== void 0 && e.label !== "") return e.label;
719
719
  if (e.type === "milestone" && e.kind !== void 0 && e.kind !== "") return e.kind;
720
720
  }
721
- function Ft(e) {
722
- return e.length * Qe;
721
+ function It(e) {
722
+ return e.length * $e;
723
723
  }
724
- function It(e, t) {
725
- let n = /* @__PURE__ */ new Date(e * ut), r = n.getUTCFullYear(), i = n.getUTCMonth(), a = [];
724
+ function Lt(e, t) {
725
+ let n = /* @__PURE__ */ new Date(e * dt), r = n.getUTCFullYear(), i = n.getUTCMonth(), a = [];
726
726
  for (;;) {
727
727
  i += 1, i === 12 && (i = 0, r += 1);
728
- let e = Lt(r, i);
728
+ let e = Rt(r, i);
729
729
  if (e > t) return a;
730
730
  a.push({
731
731
  day: e,
@@ -734,18 +734,18 @@ function It(e, t) {
734
734
  });
735
735
  }
736
736
  }
737
- function Lt(e, t) {
737
+ function Rt(e, t) {
738
738
  let n = /* @__PURE__ */ new Date(0);
739
- return n.setUTCFullYear(e, t, 1), Math.round(n.getTime() / ut);
739
+ return n.setUTCFullYear(e, t, 1), Math.round(n.getTime() / dt);
740
740
  }
741
- function Rt(e, t) {
741
+ function zt(e, t) {
742
742
  let n = (e) => e === "bar" || e === "ghost";
743
743
  return n(e) && t === "star" || e === "star" && n(t);
744
744
  }
745
- function zt(e, t) {
745
+ function Bt(e, t) {
746
746
  return e.x0 < t.x1 && t.x0 < e.x1;
747
747
  }
748
- function Bt(e, t) {
748
+ function Vt(e, t) {
749
749
  if (t <= 0 || e.width <= t) return;
750
750
  let n = e.items.filter((e) => e.change !== void 0);
751
751
  if (n.length > 0) {
@@ -754,15 +754,15 @@ function Bt(e, t) {
754
754
  }
755
755
  if ("x" in e.today && e.today.x > t * .8) return Math.max(0, e.today.x - t / 3);
756
756
  }
757
- function Vt(e, t, n = {}) {
758
- let r = ft(e.time.start) ?? 0, i = ft(e.time.end) ?? r, a = n.pxPerDay ?? Dt[e.time.scale] ?? 4, o = (i - r + 1) * a, s = (e) => (e - r) * a, c = It(r, i), l = /* @__PURE__ */ new Date(r * ut), u = [{
757
+ function Ht(e, t, n = {}) {
758
+ let r = pt(e.time.start) ?? 0, i = pt(e.time.end) ?? r, a = n.pxPerDay ?? Ot[e.time.scale] ?? 4, o = (i - r + 1) * a, s = (e) => (e - r) * a, c = Lt(r, i), l = /* @__PURE__ */ new Date(r * dt), u = [{
759
759
  day: r,
760
760
  year: l.getUTCFullYear(),
761
761
  month: l.getUTCMonth()
762
762
  }, ...c], d = u.map((e, t) => {
763
763
  let n = t + 1 < u.length ? u[t + 1].day : i + 1;
764
764
  return {
765
- label: kt[e.month],
765
+ label: At[e.month],
766
766
  x: s(e.day),
767
767
  width: (n - e.day) * a,
768
768
  year: e.year,
@@ -777,7 +777,7 @@ function Vt(e, t, n = {}) {
777
777
  width: n.width
778
778
  });
779
779
  });
780
- let p = Ot(a, n.unit), m = (e, t) => e.map((n, r) => {
780
+ let p = kt(a, n.unit), m = (e, t) => e.map((n, r) => {
781
781
  let o = r + 1 < e.length ? e[r + 1] : i + 1;
782
782
  return {
783
783
  label: t(n),
@@ -787,8 +787,8 @@ function Vt(e, t, n = {}) {
787
787
  }), h = f, g;
788
788
  if (p === "week") {
789
789
  let e = [];
790
- for (let t = r - Mt(r) + 7; t <= i; t += 7) e.push(t);
791
- g = m([r, ...e], (e) => `W${Nt(e)}`), h = d.map((e) => ({
790
+ for (let t = r - Nt(r) + 7; t <= i; t += 7) e.push(t);
791
+ g = m([r, ...e], (e) => `W${Pt(e)}`), h = d.map((e) => ({
792
792
  label: `${e.label} ${e.year}`,
793
793
  x: e.x,
794
794
  width: e.width
@@ -807,22 +807,22 @@ function Vt(e, t, n = {}) {
807
807
  let _ = g.slice(1).map((e) => e.x), v = [], y = [], b = 0, x = e.comparedTo !== void 0, S = (e, t) => {
808
808
  if (!x) return;
809
809
  if (e.role === "added" || t.role === "added") return "(new)";
810
- let n = wt(e);
810
+ let n = Tt(e);
811
811
  return n === "" ? void 0 : `(${n})`;
812
812
  }, C = (e, t, n) => {
813
813
  let r = S(e, t);
814
814
  return r === void 0 ? n : n === void 0 ? r : `${n} ${r}`;
815
815
  }, w = (e, t) => {
816
- if (x) return e.role === "removed" || t.role === "removed" ? "removed" : e.role === "added" || t.role === "added" ? "added" : wt(e) === "" ? void 0 : "moved";
816
+ if (x) return e.role === "removed" || t.role === "removed" ? "removed" : e.role === "added" || t.role === "added" ? "added" : Tt(e) === "" ? void 0 : "moved";
817
817
  }, ee = (e, t) => {
818
818
  let n = [], r = [], i = [], c = e.map((e) => ({
819
819
  ...e,
820
- days: ht(e.item)
820
+ days: gt(e.item)
821
821
  })).filter((e) => e.days !== void 0).sort((e, t) => Number(e.item.type === "milestone") - Number(t.item.type === "milestone") || e.days.start - t.days.start || e.row - t.row || e.index - t.index);
822
822
  for (let { item: e, index: t, row: l, days: u, text: d, note: f, change: p } of c) {
823
823
  let c = [], m;
824
824
  if (p === "moved" && e.previous !== void 0) {
825
- let t = xt(e.previous);
825
+ let t = St(e.previous);
826
826
  if (e.type === "activity") m = {
827
827
  x0: s(t.start),
828
828
  x1: s(t.end + 1)
@@ -848,13 +848,13 @@ function Vt(e, t, n = {}) {
848
848
  x0: g,
849
849
  x1: _
850
850
  }), d !== void 0) {
851
- let e = Ft(d);
851
+ let e = It(d);
852
852
  h = e + 12 <= _ - g ? {
853
853
  text: d,
854
854
  inside: !0,
855
855
  x: g + 6,
856
856
  width: e
857
- } : Ht(d, g, _, o), f !== void 0 && (h.note = f), c.push({
857
+ } : Ut(d, g, _, o), f !== void 0 && (h.note = f), c.push({
858
858
  kind: "label",
859
859
  x0: h.x,
860
860
  x1: h.x + h.width
@@ -864,12 +864,12 @@ function Vt(e, t, n = {}) {
864
864
  kind: "star",
865
865
  x0: g,
866
866
  x1: _
867
- }), d !== void 0 && (h = Ht(d, g, _, o), f !== void 0 && (h.note = f), c.push({
867
+ }), d !== void 0 && (h = Ut(d, g, _, o), f !== void 0 && (h.note = f), c.push({
868
868
  kind: "label",
869
869
  x0: h.x,
870
870
  x1: h.x + h.width
871
871
  }));
872
- let y = n.findIndex((e) => c.every((t) => e.every((e) => Rt(t.kind, e.kind) || !zt(t, e))));
872
+ let y = n.findIndex((e) => c.every((t) => e.every((e) => zt(t.kind, e.kind) || !Bt(t, e))));
873
873
  y === -1 && (y = n.length, n.push([])), n[y].push(...c), r.push({
874
874
  row: l,
875
875
  item: t,
@@ -937,7 +937,7 @@ function Vt(e, t, n = {}) {
937
937
  row: t,
938
938
  index: r,
939
939
  item: n,
940
- text: C(n, e, Pt(n)),
940
+ text: C(n, e, Ft(n)),
941
941
  note: S(n, e),
942
942
  change: w(n, e)
943
943
  })), b), r = T(n);
@@ -966,7 +966,7 @@ function Vt(e, t, n = {}) {
966
966
  row: t,
967
967
  index: r,
968
968
  item: n,
969
- text: C(n, e, Pt(n) ?? (n.type === "activity" ? e.label : void 0)),
969
+ text: C(n, e, Ft(n) ?? (n.type === "activity" ? e.label : void 0)),
970
970
  note: S(n, e),
971
971
  change: w(n, e)
972
972
  }))), b), t = T(e);
@@ -987,7 +987,7 @@ function Vt(e, t, n = {}) {
987
987
  if (!(n.onlyChanged && x)) return;
988
988
  let r;
989
989
  return e.rows.forEach((e, n) => {
990
- e.type === "separator" ? r = n : Et(e) && (t.add(n), r !== void 0 && t.add(r));
990
+ e.type === "separator" ? r = n : Dt(e) && (t.add(n), r !== void 0 && t.add(r));
991
991
  }), t;
992
992
  })(), ie = re === void 0 ? 0 : e.rows.filter((e, t) => e.type === "task" && !re.has(t)).length;
993
993
  e.rows.forEach((e, t) => {
@@ -1020,7 +1020,7 @@ function Vt(e, t, n = {}) {
1020
1020
  for (let t of [...e.periods ?? [], ...e.references ?? []]) t.kind && !ae.includes(t.kind) && ae.push(t.kind);
1021
1021
  let D = [];
1022
1022
  (e.periods ?? []).forEach((e, t) => {
1023
- let n = Math.max(ft(e.start) ?? r, r), o = Math.min(ft(e.end) ?? i, i);
1023
+ let n = Math.max(pt(e.start) ?? r, r), o = Math.min(pt(e.end) ?? i, i);
1024
1024
  n > o || D.push({
1025
1025
  index: t,
1026
1026
  x: s(n),
@@ -1032,7 +1032,7 @@ function Vt(e, t, n = {}) {
1032
1032
  });
1033
1033
  });
1034
1034
  let O = (e.references ?? []).flatMap((e, t) => {
1035
- let n = ft(e.date);
1035
+ let n = pt(e.date);
1036
1036
  return n === void 0 || n < r || n > i ? [] : [{
1037
1037
  index: t,
1038
1038
  x: s(n) + a / 2,
@@ -1055,7 +1055,7 @@ function Vt(e, t, n = {}) {
1055
1055
  x: e.x + 3,
1056
1056
  room: e.width - 6
1057
1057
  })), ...O.map((e) => {
1058
- let t = Ft(e.label) * (10 / 11);
1058
+ let t = It(e.label) * (10 / 11);
1059
1059
  return {
1060
1060
  of: "reference",
1061
1061
  index: e.index,
@@ -1065,7 +1065,7 @@ function Vt(e, t, n = {}) {
1065
1065
  };
1066
1066
  })].sort((e, t) => e.x - t.x);
1067
1067
  for (let e of j) {
1068
- let t = Ft(e.text) * (10 / 11);
1068
+ let t = It(e.text) * (10 / 11);
1069
1069
  if (t > e.room) continue;
1070
1070
  let n = {
1071
1071
  x0: e.x - 2,
@@ -1093,7 +1093,7 @@ function Vt(e, t, n = {}) {
1093
1093
  unitLines: _,
1094
1094
  rows: v,
1095
1095
  items: y,
1096
- dependencies: Ut(e, v, y, s),
1096
+ dependencies: Wt(e, v, y, s),
1097
1097
  today: t < r ? {
1098
1098
  outside: "before",
1099
1099
  day: t
@@ -1111,8 +1111,8 @@ function Vt(e, t, n = {}) {
1111
1111
  headerLabels: A
1112
1112
  };
1113
1113
  }
1114
- function Ht(e, t, n, r) {
1115
- let i = Ft(e), a = n + 4;
1114
+ function Ut(e, t, n, r) {
1115
+ let i = It(e), a = n + 4;
1116
1116
  if (a + i <= r) return {
1117
1117
  text: e,
1118
1118
  inside: !1,
@@ -1132,8 +1132,8 @@ function Ht(e, t, n, r) {
1132
1132
  width: i
1133
1133
  };
1134
1134
  }
1135
- function Ut(e, t, n, r) {
1136
- let i = gt(e), a = new Map(n.map((e) => [`${e.row}:${e.item}`, e])), o = new Map(t.map((e) => [e.row, e])), s = (e, t) => {
1135
+ function Wt(e, t, n, r) {
1136
+ let i = _t(e), a = new Map(n.map((e) => [`${e.row}:${e.item}`, e])), o = new Map(t.map((e) => [e.row, e])), s = (e, t) => {
1137
1137
  let s = i.get(e);
1138
1138
  if (s?.days === void 0) return;
1139
1139
  if (s.item !== void 0) {
@@ -1160,7 +1160,7 @@ function Ut(e, t, n, r) {
1160
1160
  };
1161
1161
  }, c = [];
1162
1162
  return (e.dependencies ?? []).forEach((e, t) => {
1163
- let n = vt(e), r = yt(n), a = s(e.from, r.from), o = s(e.to, r.to), l = bt(e, i);
1163
+ let n = yt(e), r = bt(n), a = s(e.from, r.from), o = s(e.to, r.to), l = xt(e, i);
1164
1164
  if (a === void 0 || o === void 0 || l === void 0) return;
1165
1165
  let u = {
1166
1166
  x: a.x + (r.from === "end" ? 8 : -8),
@@ -1204,27 +1204,27 @@ function Ut(e, t, n, r) {
1204
1204
  });
1205
1205
  }), c;
1206
1206
  }
1207
- function Wt(e) {
1207
+ function Gt(e) {
1208
1208
  let t = e.rows.reduce((e, t) => Math.max(e, (t.label ?? "").length), 0);
1209
- return Math.min(Math.max(t * Qe + 24, 120), 280);
1209
+ return Math.min(Math.max(t * $e + 24, 120), 280);
1210
1210
  }
1211
- function Gt(e, t) {
1211
+ function Kt(e, t) {
1212
1212
  for (let n of e.rows) {
1213
1213
  if (n.type !== "task") continue;
1214
1214
  if (n.id === t) return `"${n.label}" (${t})`;
1215
1215
  let e = n.items.find((e) => e.id === t);
1216
1216
  if (e !== void 0) {
1217
- let n = Pt(e);
1217
+ let n = Ft(e);
1218
1218
  return n === void 0 ? t : `"${n}" (${t})`;
1219
1219
  }
1220
1220
  }
1221
1221
  return t;
1222
1222
  }
1223
- function Kt(e, t, n) {
1223
+ function qt(e, t, n) {
1224
1224
  let r = n === !1 ? " — not satisfied by the dates" : "";
1225
- return `${Gt(e, t.to)} waits on ${Gt(e, t.from)} (${vt(t)})${r}`;
1225
+ return `${Kt(e, t.to)} waits on ${Kt(e, t.from)} (${yt(t)})${r}`;
1226
1226
  }
1227
- function qt(e) {
1227
+ function Jt(e) {
1228
1228
  let t = [];
1229
1229
  e.title !== void 0 && e.title !== "" && t.push(e.title), e.comparedTo !== void 0 && t.push(`Compared with ${e.comparedTo.label}${e.comparedTo.date === void 0 ? "" : ` (${e.comparedTo.date})`}`), t.push(`From ${e.time.start} to ${e.time.end}, by ${e.time.scale}`);
1230
1230
  for (let n of e.rows) {
@@ -1238,7 +1238,7 @@ function qt(e) {
1238
1238
  let n = e.type === "activity" ? `${e.start} to ${e.end}` : e.date, r = e.label === void 0 ? "" : `: ${e.label}`, i = e.kind === void 0 ? "" : ` [${e.kind}]`, a = e.id === void 0 ? "" : ` (${e.id})`, o = (() => {
1239
1239
  if (e.role === "added") return " — new";
1240
1240
  if (e.role === "removed") return " — removed";
1241
- let t = wt(e);
1241
+ let t = Tt(e);
1242
1242
  return t === "" || e.previous === void 0 ? "" : ` — moved ${t}, was ${"date" in e.previous ? e.previous.date : `${e.previous.start} to ${e.previous.end}`}`;
1243
1243
  })();
1244
1244
  t.push(` ${e.type} ${n}${r}${i}${a}${o}`);
@@ -1248,17 +1248,17 @@ function qt(e) {
1248
1248
  n.length > 0 && t.push("", "Calendar", ...n);
1249
1249
  let r = e.dependencies ?? [];
1250
1250
  if (r.length > 0) {
1251
- let n = gt(e);
1251
+ let n = _t(e);
1252
1252
  t.push("", "Dependencies");
1253
- for (let i of r) t.push(` ${Kt(e, i, bt(i, n))}`);
1253
+ for (let i of r) t.push(` ${qt(e, i, xt(i, n))}`);
1254
1254
  }
1255
1255
  return t;
1256
1256
  }
1257
1257
  //#endregion
1258
1258
  //#region ../shared/src/structuredExchangeTimelineValidation.ts
1259
- function Jt(e) {
1259
+ function Yt(e) {
1260
1260
  let t = [], n = (e, n) => {
1261
- let r = ft(e);
1261
+ let r = pt(e);
1262
1262
  return r === void 0 && t.push({
1263
1263
  rule: "invalid-date",
1264
1264
  path: n,
@@ -1363,15 +1363,15 @@ function Jt(e) {
1363
1363
  path: i,
1364
1364
  message: `the reference date ${e.date} is outside the timeline's range ${o}; widen \`time\` or move it`
1365
1365
  });
1366
- }), d.size > Fe.kindsPerVocabulary && t.push({
1366
+ }), d.size > Ie.kindsPerVocabulary && t.push({
1367
1367
  rule: "too-many-kinds",
1368
1368
  path: "/data/rows",
1369
- message: `${d.size} distinct item types, and no more than ${Fe.kindsPerVocabulary} can be told apart in a rendering`,
1369
+ message: `${d.size} distinct item types, and no more than ${Ie.kindsPerVocabulary} can be told apart in a rendering`,
1370
1370
  observed: d.size,
1371
- limit: Fe.kindsPerVocabulary
1372
- }), t.push(...Xt(e, gt(e))), t.push(...Yt(e)), t;
1371
+ limit: Ie.kindsPerVocabulary
1372
+ }), t.push(...Zt(e, _t(e))), t.push(...Xt(e)), t;
1373
1373
  }
1374
- function Yt(e) {
1374
+ function Xt(e) {
1375
1375
  let t = /* @__PURE__ */ new Set();
1376
1376
  for (let n of e.rows) if (n.type === "task") {
1377
1377
  n.role === "removed" && t.add(n.id);
@@ -1386,7 +1386,7 @@ function Yt(e) {
1386
1386
  });
1387
1387
  }), n;
1388
1388
  }
1389
- function Xt(e, t) {
1389
+ function Zt(e, t) {
1390
1390
  let n = [], r = e.dependencies ?? [], i = [], a = /* @__PURE__ */ new Map();
1391
1391
  r.forEach((r, o) => {
1392
1392
  let s = `/data/dependencies/${o}`, c = !0;
@@ -1421,7 +1421,7 @@ function Xt(e, t) {
1421
1421
  let f = JSON.stringify([
1422
1422
  r.from,
1423
1423
  r.to,
1424
- vt(r)
1424
+ yt(r)
1425
1425
  ]), p = a.get(f);
1426
1426
  p === void 0 ? (a.set(f, o), i.push({
1427
1427
  from: r.from,
@@ -1433,14 +1433,14 @@ function Xt(e, t) {
1433
1433
  message: `the same dependency is already declared at /data/dependencies/${p}`
1434
1434
  });
1435
1435
  });
1436
- let o = Zt(i);
1436
+ let o = Qt(i);
1437
1437
  return o !== void 0 && n.push({
1438
1438
  rule: "dependency-cycle",
1439
1439
  path: `/data/dependencies/${o.index}`,
1440
1440
  message: `dependencies form a cycle, which no dates can honour: ${o.ids.join(" → ")}`
1441
1441
  }), n;
1442
1442
  }
1443
- function Zt(e) {
1443
+ function Qt(e) {
1444
1444
  let t = /* @__PURE__ */ new Map();
1445
1445
  for (let n of e) {
1446
1446
  let e = t.get(n.from) ?? [];
@@ -1485,26 +1485,26 @@ function Zt(e) {
1485
1485
  }
1486
1486
  //#endregion
1487
1487
  //#region ../shared/src/structuredExchangeValidation.ts
1488
- function Qt(e) {
1488
+ function $t(e) {
1489
1489
  let t = e.data;
1490
1490
  return e.kind === "graph" ? Array.isArray(t.nodes) && Array.isArray(t.edges) : e.kind === "sequence" ? Array.isArray(t.participants) && Array.isArray(t.messages) : e.kind === "timeline" ? typeof t.time == "object" && t.time !== null && Array.isArray(t.rows) : Array.isArray(t.columns) && Array.isArray(t.rows);
1491
1491
  }
1492
- function $t(e) {
1492
+ function en(e) {
1493
1493
  return e.kind === "graph" ? e.data.nodes : e.kind === "sequence" ? e.data.participants : [];
1494
1494
  }
1495
- function en(e) {
1495
+ function tn(e) {
1496
1496
  return e.kind === "graph" ? e.data.edges : e.kind === "sequence" ? e.data.messages : [];
1497
1497
  }
1498
- function tn(e) {
1498
+ function nn(e) {
1499
1499
  return e.kind === "graph" || e.kind === "sequence" ? e.data.containers ?? [] : [];
1500
1500
  }
1501
- function nn(e) {
1501
+ function rn(e) {
1502
1502
  return e.kind === "graph" ? "/data/nodes" : "/data/participants";
1503
1503
  }
1504
- function rn(e) {
1504
+ function an(e) {
1505
1505
  return e.kind === "graph" ? "/data/edges" : "/data/messages";
1506
1506
  }
1507
- function an(e) {
1507
+ function on(e) {
1508
1508
  if (e.kind === "timeline") return [];
1509
1509
  let t = e.data, n = [];
1510
1510
  for (let e of [
@@ -1530,7 +1530,7 @@ function an(e) {
1530
1530
  }
1531
1531
  return n;
1532
1532
  }
1533
- function on(e) {
1533
+ function sn(e) {
1534
1534
  if (e.kind !== "table") return [];
1535
1535
  let t = e.data.rows, n = [];
1536
1536
  return t.forEach((e, t) => {
@@ -1543,7 +1543,7 @@ function on(e) {
1543
1543
  });
1544
1544
  }), n;
1545
1545
  }
1546
- function sn(e) {
1546
+ function cn(e) {
1547
1547
  if (e.kind !== "table") return [];
1548
1548
  let t = e.data.rows, n = [];
1549
1549
  return t.forEach((e, t) => {
@@ -1555,26 +1555,26 @@ function sn(e) {
1555
1555
  });
1556
1556
  }), n;
1557
1557
  }
1558
- function cn(e) {
1558
+ function ln(e) {
1559
1559
  if (e.kind !== "table") return [];
1560
1560
  let t = e.data.relations;
1561
1561
  return Array.isArray(t) ? t : [];
1562
1562
  }
1563
- function ln(e, t) {
1563
+ function un(e, t) {
1564
1564
  return e === "timeline" ? `a timeline is maintained by presenting the revised timeline again, not proposed as a change, ${t}` : `a ${e} is a projection and cannot be proposed, ${t}`;
1565
1565
  }
1566
- function un(e) {
1566
+ function dn(e) {
1567
1567
  let t = [];
1568
- if (!Qt(e)) return t.push({
1568
+ if (!$t(e)) return t.push({
1569
1569
  rule: "kind-data-mismatch",
1570
1570
  path: "/data",
1571
1571
  message: `data does not carry what kind "${e.kind}" declares`
1572
1572
  }), t;
1573
- let n = Me(e.schema).includes(e.kind);
1573
+ let n = Ne(e.schema).includes(e.kind);
1574
1574
  e.target !== void 0 && !n && t.push({
1575
1575
  rule: "kind-not-proposable",
1576
1576
  path: "/target",
1577
- message: ln(e.kind, "so it carries no target")
1577
+ message: un(e.kind, "so it carries no target")
1578
1578
  }), e.removals !== void 0 && (n ? e.target === void 0 && t.push({
1579
1579
  rule: "removal-without-target",
1580
1580
  path: "/removals",
@@ -1582,9 +1582,9 @@ function un(e) {
1582
1582
  }) : t.push({
1583
1583
  rule: "kind-not-proposable",
1584
1584
  path: "/removals",
1585
- message: ln(e.kind, "so it declares no removals")
1585
+ message: un(e.kind, "so it declares no removals")
1586
1586
  }));
1587
- let r = $t(e), i = nn(e), a = /* @__PURE__ */ new Map();
1587
+ let r = en(e), i = rn(e), a = /* @__PURE__ */ new Map();
1588
1588
  r.forEach((e, n) => {
1589
1589
  let r = a.get(e.id);
1590
1590
  r === void 0 ? a.set(e.id, n) : t.push({
@@ -1594,7 +1594,7 @@ function un(e) {
1594
1594
  });
1595
1595
  });
1596
1596
  let o = /* @__PURE__ */ new Map();
1597
- tn(e).forEach((e, n) => {
1597
+ nn(e).forEach((e, n) => {
1598
1598
  let r = o.get(e.id);
1599
1599
  r === void 0 ? o.set(e.id, n) : t.push({
1600
1600
  rule: "duplicate-container-identifier",
@@ -1608,8 +1608,8 @@ function un(e) {
1608
1608
  message: `"${a}" is not a container declared in /data/containers`
1609
1609
  });
1610
1610
  });
1611
- let s = rn(e);
1612
- en(e).forEach((e, n) => {
1611
+ let s = an(e);
1612
+ tn(e).forEach((e, n) => {
1613
1613
  for (let r of ["from", "to"]) {
1614
1614
  let o = e[r];
1615
1615
  a.has(o) || t.push({
@@ -1628,19 +1628,19 @@ function un(e) {
1628
1628
  message: `${e} "${n}" is already addressed at ${a}; a proposal states one intention per thing`
1629
1629
  });
1630
1630
  };
1631
- r.forEach((e, t) => l("element", e.ref, `${i}/${t}`)), en(e).forEach((e, t) => l("relationship", e.ref, `${s}/${t}`)), on(e).forEach((e) => l("row", e.ref, e.at)), (e.removals ?? []).forEach((e, t) => l(e.type, e.ref, `/removals/${t}`));
1631
+ r.forEach((e, t) => l("element", e.ref, `${i}/${t}`)), tn(e).forEach((e, t) => l("relationship", e.ref, `${s}/${t}`)), sn(e).forEach((e) => l("row", e.ref, e.at)), (e.removals ?? []).forEach((e, t) => l(e.type, e.ref, `/removals/${t}`));
1632
1632
  let u = [
1633
1633
  ...r.map((e, t) => ({
1634
1634
  at: `${i}/${t}`,
1635
1635
  ref: e.ref,
1636
1636
  set: e.set
1637
1637
  })),
1638
- ...en(e).map((t, n) => ({
1639
- at: `${rn(e)}/${n}`,
1638
+ ...tn(e).map((t, n) => ({
1639
+ at: `${an(e)}/${n}`,
1640
1640
  ref: t.ref,
1641
1641
  set: t.set
1642
1642
  })),
1643
- ...on(e)
1643
+ ...sn(e)
1644
1644
  ];
1645
1645
  for (let r of u) r.set !== void 0 && (r.ref === void 0 ? t.push({
1646
1646
  rule: "change-without-reference",
@@ -1653,7 +1653,7 @@ function un(e) {
1653
1653
  }) : t.push({
1654
1654
  rule: "kind-not-proposable",
1655
1655
  path: `${r.at}/set`,
1656
- message: ln(e.kind, "so nothing in it declares a change")
1656
+ message: un(e.kind, "so nothing in it declares a change")
1657
1657
  }));
1658
1658
  let d = (e) => {
1659
1659
  let t = /* @__PURE__ */ new Set();
@@ -1665,15 +1665,15 @@ function un(e) {
1665
1665
  d(r)
1666
1666
  ], [
1667
1667
  e.kind === "sequence" ? "message" : "relationship",
1668
- rn(e),
1669
- d(en(e))
1668
+ an(e),
1669
+ d(tn(e))
1670
1670
  ]];
1671
- for (let [e, n, r] of f) r.size > Fe.kindsPerVocabulary && t.push({
1671
+ for (let [e, n, r] of f) r.size > Ie.kindsPerVocabulary && t.push({
1672
1672
  rule: "too-many-kinds",
1673
1673
  path: n,
1674
- message: `${r.size} distinct ${e} types, and no more than ${Fe.kindsPerVocabulary} can be told apart in a rendering`,
1674
+ message: `${r.size} distinct ${e} types, and no more than ${Ie.kindsPerVocabulary} can be told apart in a rendering`,
1675
1675
  observed: r.size,
1676
- limit: Fe.kindsPerVocabulary
1676
+ limit: Ie.kindsPerVocabulary
1677
1677
  });
1678
1678
  let p = e.viewpoints;
1679
1679
  if (Array.isArray(p)) {
@@ -1683,7 +1683,7 @@ function un(e) {
1683
1683
  message: `only a graph declares viewpoints; a ${e.kind} has no element and relationship kinds for one to retain`
1684
1684
  });
1685
1685
  else {
1686
- let n = new Set(r.map((e) => e.kind).filter((e) => !!e)), i = new Set(en(e).map((e) => e.kind).filter((e) => !!e)), a = /* @__PURE__ */ new Map();
1686
+ let n = new Set(r.map((e) => e.kind).filter((e) => !!e)), i = new Set(tn(e).map((e) => e.kind).filter((e) => !!e)), a = /* @__PURE__ */ new Map();
1687
1687
  p.forEach((e, r) => {
1688
1688
  let o = `/viewpoints/${r}`, { id: s, elementKinds: c, relationshipKinds: l } = e, u = a.get(s);
1689
1689
  u === void 0 ? a.set(s, r) : t.push({
@@ -1723,7 +1723,7 @@ function un(e) {
1723
1723
  if (e.kind === "table") {
1724
1724
  let { columns: n, rows: r } = e.data;
1725
1725
  r.forEach((e, r) => {
1726
- let { cells: i, heading: a } = Pe(e);
1726
+ let { cells: i, heading: a } = Fe(e);
1727
1727
  a === void 0 && i.length !== n.length && t.push({
1728
1728
  rule: "row-column-mismatch",
1729
1729
  path: `/data/rows/${r}`,
@@ -1733,8 +1733,8 @@ function un(e) {
1733
1733
  });
1734
1734
  });
1735
1735
  }
1736
- e.kind === "timeline" && t.push(...Jt(e.data));
1737
- for (let n of an(e)) {
1736
+ e.kind === "timeline" && t.push(...Yt(e.data));
1737
+ for (let n of on(e)) {
1738
1738
  n.expect !== void 0 && (e.target === void 0 ? t.push({
1739
1739
  rule: "expectation-without-target",
1740
1740
  path: `${n.at}/expect`,
@@ -1781,7 +1781,7 @@ function un(e) {
1781
1781
  });
1782
1782
  });
1783
1783
  let m = /* @__PURE__ */ new Map();
1784
- for (let n of sn(e)) {
1784
+ for (let n of cn(e)) {
1785
1785
  let e = m.get(n.id);
1786
1786
  e === void 0 ? m.set(n.id, n.at) : t.push({
1787
1787
  rule: "duplicate-identifier",
@@ -1789,7 +1789,7 @@ function un(e) {
1789
1789
  message: `identifier "${n.id}" is already declared at ${e}`
1790
1790
  });
1791
1791
  }
1792
- return cn(e).forEach((e, n) => {
1792
+ return ln(e).forEach((e, n) => {
1793
1793
  for (let r of ["from", "to"]) {
1794
1794
  let i = e[r];
1795
1795
  if (typeof i != "object" || !i) continue;
@@ -1804,13 +1804,13 @@ function un(e) {
1804
1804
  }
1805
1805
  //#endregion
1806
1806
  //#region ../shared/src/structuredExchangeParse.ts
1807
- function dn(e, t) {
1807
+ function fn(e, t) {
1808
1808
  let n = t(e);
1809
1809
  if (n.length > 0) return {
1810
1810
  valid: !1,
1811
1811
  issues: n
1812
1812
  };
1813
- let r = e, i = un(r);
1813
+ let r = e, i = dn(r);
1814
1814
  return i.length > 0 ? {
1815
1815
  valid: !1,
1816
1816
  issues: i
@@ -1820,8 +1820,8 @@ function dn(e, t) {
1820
1820
  issues: []
1821
1821
  };
1822
1822
  }
1823
- function fn(e, t, n) {
1824
- let r = Je(e, n);
1823
+ function pn(e, t, n) {
1824
+ let r = Ye(e, n);
1825
1825
  if (r !== void 0) return {
1826
1826
  valid: !1,
1827
1827
  issues: [r]
@@ -1839,31 +1839,31 @@ function fn(e, t, n) {
1839
1839
  }]
1840
1840
  };
1841
1841
  }
1842
- let a = dn(i, t);
1842
+ let a = fn(i, t);
1843
1843
  if (!a.valid) return a;
1844
- let o = Je(e, n, a.envelope.schema);
1844
+ let o = Ye(e, n, a.envelope.schema);
1845
1845
  if (o !== void 0) return {
1846
1846
  valid: !1,
1847
1847
  issues: [o]
1848
1848
  };
1849
- let s = Xe(a.envelope, n);
1849
+ let s = Ze(a.envelope, n);
1850
1850
  return s.length > 0 ? {
1851
1851
  valid: !1,
1852
1852
  issues: s
1853
1853
  } : {
1854
1854
  valid: !0,
1855
1855
  envelope: a.envelope,
1856
- measurement: Ze(a.envelope, e),
1856
+ measurement: Qe(a.envelope, e),
1857
1857
  issues: []
1858
1858
  };
1859
1859
  }
1860
- function pn(e) {
1860
+ function mn(e) {
1861
1861
  if (typeof e != "object" || !e || Array.isArray(e)) return;
1862
1862
  let t = e.schema;
1863
1863
  if (typeof t == "string" && t.startsWith("urn:structured-exchange:")) return t;
1864
1864
  }
1865
- function mn(e, t, n) {
1866
- let r = Je(e, n);
1865
+ function hn(e, t, n) {
1866
+ let r = Ye(e, n);
1867
1867
  if (r !== void 0) return {
1868
1868
  status: "too-large",
1869
1869
  issue: r
@@ -1877,21 +1877,21 @@ function mn(e, t, n) {
1877
1877
  why: "unparseable"
1878
1878
  };
1879
1879
  }
1880
- let a = pn(i);
1880
+ let a = mn(i);
1881
1881
  if (a === void 0) return {
1882
1882
  status: "not-a-document",
1883
1883
  why: "undeclared"
1884
1884
  };
1885
- if (Ve(a) === void 0) return {
1885
+ if (He(a) === void 0) return {
1886
1886
  status: "unsupported-version",
1887
1887
  schema: a
1888
1888
  };
1889
- let o = dn(i, t);
1889
+ let o = fn(i, t);
1890
1890
  if (!o.valid) return {
1891
1891
  status: "invalid",
1892
1892
  issues: o.issues
1893
1893
  };
1894
- let s = Je(e, n, o.envelope.schema);
1894
+ let s = Ye(e, n, o.envelope.schema);
1895
1895
  return s === void 0 ? {
1896
1896
  status: "valid",
1897
1897
  envelope: o.envelope
@@ -1902,14 +1902,14 @@ function mn(e, t, n) {
1902
1902
  }
1903
1903
  //#endregion
1904
1904
  //#region ../shared/src/structuredExchangeReplyBlocks.ts
1905
- function hn(e) {
1905
+ function gn(e) {
1906
1906
  let t = e.replace(/\r\n/g, "\n").replace(/\s+$/, ""), n = 2166136261;
1907
1907
  for (let e = 0; e < t.length; e++) n ^= t.charCodeAt(e), n = Math.imul(n, 16777619);
1908
1908
  return `sx-${(n >>> 0).toString(16).padStart(8, "0")}-${t.length.toString(36)}`;
1909
1909
  }
1910
1910
  //#endregion
1911
1911
  //#region ../ui/src/presentations/copyText.ts
1912
- async function gn(e) {
1912
+ async function _n(e) {
1913
1913
  try {
1914
1914
  return await navigator.clipboard.writeText(e), !0;
1915
1915
  } catch {
@@ -1926,117 +1926,117 @@ async function gn(e) {
1926
1926
  }
1927
1927
  //#endregion
1928
1928
  //#region ../node_modules/typebox/build/guard/string.mjs
1929
- function _n(e, t, n) {
1929
+ function vn(e, t, n) {
1930
1930
  return e >= t && e <= n;
1931
1931
  }
1932
- function vn(e) {
1933
- return e === 8205;
1934
- }
1935
1932
  function yn(e) {
1936
- return _n(e, 55296, 56319);
1933
+ return e === 8205;
1937
1934
  }
1938
1935
  function bn(e) {
1939
- return _n(e, 127462, 127487);
1936
+ return vn(e, 55296, 56319);
1940
1937
  }
1941
1938
  function xn(e) {
1942
- return _n(e, 65024, 65039);
1939
+ return vn(e, 127462, 127487);
1943
1940
  }
1944
1941
  function Sn(e) {
1945
- return _n(e, 768, 879) || _n(e, 6832, 6911) || _n(e, 7616, 7679) || _n(e, 65056, 65071);
1942
+ return vn(e, 65024, 65039);
1946
1943
  }
1947
1944
  function Cn(e) {
1945
+ return vn(e, 768, 879) || vn(e, 6832, 6911) || vn(e, 7616, 7679) || vn(e, 65056, 65071);
1946
+ }
1947
+ function wn(e) {
1948
1948
  return e > 65535 ? 2 : 1;
1949
1949
  }
1950
- function wn(e, t) {
1950
+ function Tn(e, t) {
1951
1951
  for (; t < e.length;) {
1952
1952
  let n = e.codePointAt(t);
1953
- if (Sn(n) || xn(n)) t += Cn(n);
1953
+ if (Cn(n) || Sn(n)) t += wn(n);
1954
1954
  else break;
1955
1955
  }
1956
1956
  return t;
1957
1957
  }
1958
- function Tn(e, t) {
1959
- let n = e.codePointAt(t), r = t + Cn(n);
1960
- for (r = wn(e, r); r < e.length - 1 && vn(e.codePointAt(r));) {
1958
+ function En(e, t) {
1959
+ let n = e.codePointAt(t), r = t + wn(n);
1960
+ for (r = Tn(e, r); r < e.length - 1 && yn(e.codePointAt(r));) {
1961
1961
  let t = e.codePointAt(r + 1);
1962
- r += 1 + Cn(t), r = wn(e, r);
1962
+ r += 1 + wn(t), r = Tn(e, r);
1963
1963
  }
1964
- return bn(n) && r < e.length && bn(e.codePointAt(r)) && (r += Cn(e.codePointAt(r))), r;
1964
+ return xn(n) && r < e.length && xn(e.codePointAt(r)) && (r += wn(e.codePointAt(r))), r;
1965
1965
  }
1966
- function En(e) {
1967
- return yn(e) || Sn(e) || xn(e) || vn(e);
1966
+ function Dn(e) {
1967
+ return bn(e) || Cn(e) || Sn(e) || yn(e);
1968
1968
  }
1969
- function Dn(e, t) {
1969
+ function On(e, t) {
1970
1970
  if (t === 0) return !0;
1971
1971
  let n = 0, r = 0;
1972
- for (; r < e.length;) if (r = Tn(e, r), n++, n >= t) return !0;
1972
+ for (; r < e.length;) if (r = En(e, r), n++, n >= t) return !0;
1973
1973
  return !1;
1974
1974
  }
1975
- function On(e, t) {
1975
+ function kn(e, t) {
1976
1976
  let n = 0, r = 0;
1977
- for (; r < e.length;) if (r = Tn(e, r), n++, n > t) return !1;
1977
+ for (; r < e.length;) if (r = En(e, r), n++, n > t) return !1;
1978
1978
  return !0;
1979
1979
  }
1980
- function kn(e, t) {
1980
+ function An(e, t) {
1981
1981
  if (t === 0) return !0;
1982
1982
  let n = 0;
1983
1983
  for (; n < e.length;) {
1984
- if (En(e.charCodeAt(n))) return Dn(e, t);
1984
+ if (Dn(e.charCodeAt(n))) return On(e, t);
1985
1985
  if (n++, n >= t) return !0;
1986
1986
  }
1987
1987
  return !1;
1988
1988
  }
1989
- function An(e, t) {
1989
+ function jn(e, t) {
1990
1990
  let n = 0;
1991
1991
  for (; n < e.length;) {
1992
- if (En(e.charCodeAt(n))) return On(e, t);
1992
+ if (Dn(e.charCodeAt(n))) return kn(e, t);
1993
1993
  if (n++, n > t) return !1;
1994
1994
  }
1995
1995
  return !0;
1996
1996
  }
1997
1997
  //#endregion
1998
1998
  //#region ../node_modules/typebox/build/guard/guard.mjs
1999
- function jn(e) {
2000
- return Array.isArray(e);
2001
- }
2002
1999
  function Mn(e) {
2003
- return Vn(typeof e, "bigint");
2000
+ return Array.isArray(e);
2004
2001
  }
2005
2002
  function Nn(e) {
2006
- return Vn(typeof e, "boolean");
2003
+ return Hn(typeof e, "bigint");
2007
2004
  }
2008
2005
  function Pn(e) {
2009
- if (Bn(e) || !Fn(e)) return !1;
2010
- let t = Function.prototype.toString.call(e);
2011
- return !!(/^class\s/.test(t) || /\[native code\]/.test(t));
2006
+ return Hn(typeof e, "boolean");
2012
2007
  }
2013
2008
  function Fn(e) {
2014
- return Vn(typeof e, "function");
2009
+ if (Vn(e) || !In(e)) return !1;
2010
+ let t = Function.prototype.toString.call(e);
2011
+ return !!(/^class\s/.test(t) || /\[native code\]/.test(t));
2015
2012
  }
2016
2013
  function In(e) {
2017
- return Vn(e, null);
2014
+ return Hn(typeof e, "function");
2018
2015
  }
2019
2016
  function Ln(e) {
2020
- return Vn(typeof e, "object") && !In(e);
2017
+ return Hn(e, null);
2021
2018
  }
2022
2019
  function Rn(e) {
2023
- return Vn(typeof e, "string");
2020
+ return Hn(typeof e, "object") && !Ln(e);
2024
2021
  }
2025
2022
  function zn(e) {
2026
- return Vn(typeof e, "symbol");
2023
+ return Hn(typeof e, "string");
2027
2024
  }
2028
2025
  function Bn(e) {
2029
- return Vn(e, void 0);
2026
+ return Hn(typeof e, "symbol");
2027
+ }
2028
+ function Vn(e) {
2029
+ return Hn(e, void 0);
2030
2030
  }
2031
- function Vn(e, t) {
2031
+ function Hn(e, t) {
2032
2032
  return e === t;
2033
2033
  }
2034
+ function M(e, t) {
2035
+ return jn(e, t);
2036
+ }
2034
2037
  function N(e, t) {
2035
2038
  return An(e, t);
2036
2039
  }
2037
- function Hn(e, t) {
2038
- return kn(e, t);
2039
- }
2040
2040
  //#endregion
2041
2041
  //#region ../node_modules/typebox/build/guard/globals.mjs
2042
2042
  function Un(e) {
@@ -2066,8 +2066,8 @@ function Xn(e) {
2066
2066
  var Zn = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "schema" in e && "kind" in e && "data" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[0].test(e) || !1) && e.schema === "urn:structured-exchange:1" && (e.kind === "graph" || e.kind === "sequence" || e.kind === "table") && (e.target === void 0 || !("target" in e) || Qn(e.target)) && (e.removals === void 0 || !("removals" in e) || Array.isArray(e.removals) && e.removals.every((e, t) => $n(e)) && e.removals.length <= 500) && [
2067
2067
  typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "nodes" in e.data && "edges" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => Yn[2].test(e) || !1) && Array.isArray(e.data.nodes) && e.data.nodes.every((e, t) => rr(e)) && e.data.nodes.length <= 500 && e.data.nodes.length >= 1 && Array.isArray(e.data.edges) && e.data.edges.every((e, t) => ar(e)) && e.data.edges.length <= 2e3 && (e.data.containers === void 0 || !("containers" in e.data) || Array.isArray(e.data.containers) && e.data.containers.every((e, t) => sr(e)) && e.data.containers.length <= 50),
2068
2068
  typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "participants" in e.data && "messages" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => Yn[8].test(e) || !1) && Array.isArray(e.data.participants) && e.data.participants.every((e, t) => rr(e)) && e.data.participants.length <= 100 && e.data.participants.length >= 1 && Array.isArray(e.data.messages) && e.data.messages.every((e, t) => cr(e)) && e.data.messages.length <= 1e3 && (e.data.containers === void 0 || !("containers" in e.data) || Array.isArray(e.data.containers) && e.data.containers.every((e, t) => sr(e)) && e.data.containers.length <= 50),
2069
- typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "columns" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).length === 2 && Array.isArray(e.data.columns) && e.data.columns.every((e, t) => typeof e == "string" && N(e, 200) && Hn(e, 1)) && e.data.columns.length <= 50 && e.data.columns.length >= 1 && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => [ur(e), typeof e == "object" && !!e && !Array.isArray(e) && "cells" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[11].test(e) || !1) && ur(e.cells) && (e.role === void 0 || !("role" in e) || e.role === "added" || e.role === "changed" || e.role === "context" || e.role === "removed")].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1) && e.data.rows.length <= 5e3
2070
- ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Qn = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), $n = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "ref" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[1].test(e) || !1) && (e.type === "element" || e.type === "relationship") && Qn(e.ref) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.from === void 0 || !("from" in e) || nr(e.from)) && (e.to === void 0 || !("to" in e) || nr(e.to))), er = ((e) => typeof e == "string" && N(e, 500)), tr = ((e) => typeof e == "string" && N(e, 100) && Hn(e, 1)), nr = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), rr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[3].test(e) || !1) && nr(e.id) && (e.ref === void 0 || !("ref" in e) || Qn(e.ref)) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.set === void 0 || !("set" in e) || ir(e.set)) && (e.container === void 0 || !("container" in e) || nr(e.container)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), ir = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Yn[4].test(e) || !1) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.container === void 0 || !("container" in e) || nr(e.container)) && Object.getOwnPropertyNames(e).length >= 1), ar = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[5].test(e) || !1) && nr(e.from) && nr(e.to) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.ref === void 0 || !("ref" in e) || Qn(e.ref)) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.set === void 0 || !("set" in e) || or(e.set)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "kind" in e)), or = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Yn[6].test(e) || !1) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.label === void 0 || !("label" in e) || er(e.label)) && Object.getOwnPropertyNames(e).length >= 1), sr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[7].test(e) || !1) && nr(e.id) && er(e.label) && (e.kind === void 0 || !("kind" in e) || tr(e.kind))), cr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[9].test(e) || !1) && nr(e.from) && nr(e.to) && (e.ref === void 0 || !("ref" in e) || Qn(e.ref)) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.set === void 0 || !("set" in e) || lr(e.set)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), lr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Yn[10].test(e) || !1) && (e.label === void 0 || !("label" in e) || er(e.label)) && Object.getOwnPropertyNames(e).length >= 1), ur = ((e) => Array.isArray(e) && e.every((e, t) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || N(e, 1e3))) && e.length <= 50);
2069
+ typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "columns" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).length === 2 && Array.isArray(e.data.columns) && e.data.columns.every((e, t) => typeof e == "string" && M(e, 200) && N(e, 1)) && e.data.columns.length <= 50 && e.data.columns.length >= 1 && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => [ur(e), typeof e == "object" && !!e && !Array.isArray(e) && "cells" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[11].test(e) || !1) && ur(e.cells) && (e.role === void 0 || !("role" in e) || e.role === "added" || e.role === "changed" || e.role === "context" || e.role === "removed")].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1) && e.data.rows.length <= 5e3
2070
+ ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Qn = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), $n = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "ref" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[1].test(e) || !1) && (e.type === "element" || e.type === "relationship") && Qn(e.ref) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.from === void 0 || !("from" in e) || nr(e.from)) && (e.to === void 0 || !("to" in e) || nr(e.to))), er = ((e) => typeof e == "string" && M(e, 500)), tr = ((e) => typeof e == "string" && M(e, 100) && N(e, 1)), nr = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), rr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[3].test(e) || !1) && nr(e.id) && (e.ref === void 0 || !("ref" in e) || Qn(e.ref)) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.set === void 0 || !("set" in e) || ir(e.set)) && (e.container === void 0 || !("container" in e) || nr(e.container)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), ir = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Yn[4].test(e) || !1) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.container === void 0 || !("container" in e) || nr(e.container)) && Object.getOwnPropertyNames(e).length >= 1), ar = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[5].test(e) || !1) && nr(e.from) && nr(e.to) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.ref === void 0 || !("ref" in e) || Qn(e.ref)) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.set === void 0 || !("set" in e) || or(e.set)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "kind" in e)), or = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Yn[6].test(e) || !1) && (e.kind === void 0 || !("kind" in e) || tr(e.kind)) && (e.label === void 0 || !("label" in e) || er(e.label)) && Object.getOwnPropertyNames(e).length >= 1), sr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[7].test(e) || !1) && nr(e.id) && er(e.label) && (e.kind === void 0 || !("kind" in e) || tr(e.kind))), cr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Yn[9].test(e) || !1) && nr(e.from) && nr(e.to) && (e.ref === void 0 || !("ref" in e) || Qn(e.ref)) && (e.label === void 0 || !("label" in e) || er(e.label)) && (e.set === void 0 || !("set" in e) || lr(e.set)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), lr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Yn[10].test(e) || !1) && (e.label === void 0 || !("label" in e) || er(e.label)) && Object.getOwnPropertyNames(e).length >= 1), ur = ((e) => Array.isArray(e) && e.every((e, t) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || M(e, 1e3))) && e.length <= 50);
2071
2071
  function dr(e) {
2072
2072
  return Zn(e);
2073
2073
  }
@@ -2162,7 +2162,7 @@ function Rr(e) {
2162
2162
  return Cr(hr.Undefined);
2163
2163
  }
2164
2164
  function zr(e) {
2165
- return Kn(e) ? Lr(e) : Jn(e) ? Or(e) : qn(e) ? Nr(e) : Un(e) ? Er(e.valueOf()) : Gn(e) ? Fr(e.valueOf()) : Wn(e) ? jr(e.valueOf()) : mr(e) ? jr(e) : jn(e) ? wr(e) : Nn(e) ? Er(e) : Mn(e) ? Tr(e) : Pn(e) ? Dr(e) : In(e) ? Ar(e) : Ln(e) ? Mr(e) : Rn(e) ? Fr(e) : zn(e) ? Ir(e) : Bn(e) ? Rr(e) : Fn(e) ? kr(e) : fr();
2165
+ return Kn(e) ? Lr(e) : Jn(e) ? Or(e) : qn(e) ? Nr(e) : Un(e) ? Er(e.valueOf()) : Gn(e) ? Fr(e.valueOf()) : Wn(e) ? jr(e.valueOf()) : mr(e) ? jr(e) : Mn(e) ? wr(e) : Pn(e) ? Er(e) : Nn(e) ? Tr(e) : Fn(e) ? Dr(e) : Ln(e) ? Ar(e) : Rn(e) ? Mr(e) : zn(e) ? Fr(e) : Bn(e) ? Ir(e) : Vn(e) ? Rr(e) : In(e) ? kr(e) : fr();
2166
2166
  }
2167
2167
  function Br(e) {
2168
2168
  return gr = BigInt("14695981039346656037"), zr(e), gr;
@@ -2176,19 +2176,19 @@ var Hr = [];
2176
2176
  function Ur(e) {
2177
2177
  Hr = e.variables;
2178
2178
  }
2179
- var Wr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "schema" in e && "kind" in e && "data" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[0].test(e) || !1) && e.schema === "urn:structured-exchange:2" && (e.kind === "graph" || e.kind === "sequence" || e.kind === "table") && (e.profile === void 0 || !("profile" in e) || typeof e.profile == "string" && N(e.profile, 200) && Hn(e.profile, 1)) && (e.target === void 0 || !("target" in e) || typeof e.target == "object" && e.target !== null && !Array.isArray(e.target) && "ref" in e.target && Object.getOwnPropertyNames(e.target).every((e, t) => Hr[1].test(e) || !1) && Gr(e.target.ref) && (e.target.revision === void 0 || !("revision" in e.target) || Kr(e.target.revision))) && (e.removals === void 0 || !("removals" in e) || Array.isArray(e.removals) && e.removals.every((e, t) => qr(e)) && e.removals.length <= 500) && (e.artifacts === void 0 || !("artifacts" in e) || Array.isArray(e.artifacts) && e.artifacts.every((e, t) => Zr(e)) && e.artifacts.length <= 50) && (e.viewpoints === void 0 || !("viewpoints" in e) || Array.isArray(e.viewpoints) && e.viewpoints.every((e, t) => Qr(e)) && e.viewpoints.length <= 20) && [
2179
+ var Wr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "schema" in e && "kind" in e && "data" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[0].test(e) || !1) && e.schema === "urn:structured-exchange:2" && (e.kind === "graph" || e.kind === "sequence" || e.kind === "table") && (e.profile === void 0 || !("profile" in e) || typeof e.profile == "string" && M(e.profile, 200) && N(e.profile, 1)) && (e.target === void 0 || !("target" in e) || typeof e.target == "object" && e.target !== null && !Array.isArray(e.target) && "ref" in e.target && Object.getOwnPropertyNames(e.target).every((e, t) => Hr[1].test(e) || !1) && Gr(e.target.ref) && (e.target.revision === void 0 || !("revision" in e.target) || Kr(e.target.revision))) && (e.removals === void 0 || !("removals" in e) || Array.isArray(e.removals) && e.removals.every((e, t) => qr(e)) && e.removals.length <= 500) && (e.artifacts === void 0 || !("artifacts" in e) || Array.isArray(e.artifacts) && e.artifacts.every((e, t) => Zr(e)) && e.artifacts.length <= 50) && (e.viewpoints === void 0 || !("viewpoints" in e) || Array.isArray(e.viewpoints) && e.viewpoints.every((e, t) => Qr(e)) && e.viewpoints.length <= 20) && [
2180
2180
  typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "nodes" in e.data && "edges" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => Hr[6].test(e) || !1) && Array.isArray(e.data.nodes) && e.data.nodes.every((e, t) => $r(e)) && e.data.nodes.length <= 500 && e.data.nodes.length >= 1 && Array.isArray(e.data.edges) && e.data.edges.every((e, t) => di(e)) && e.data.edges.length <= 2e3 && (e.data.containers === void 0 || !("containers" in e.data) || Array.isArray(e.data.containers) && e.data.containers.every((e, t) => pi(e)) && e.data.containers.length <= 50),
2181
2181
  typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "participants" in e.data && "messages" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => Hr[16].test(e) || !1) && Array.isArray(e.data.participants) && e.data.participants.every((e, t) => $r(e)) && e.data.participants.length <= 100 && e.data.participants.length >= 1 && Array.isArray(e.data.messages) && e.data.messages.every((e, t) => mi(e)) && e.data.messages.length <= 1e3 && (e.data.containers === void 0 || !("containers" in e.data) || Array.isArray(e.data.containers) && e.data.containers.every((e, t) => pi(e)) && e.data.containers.length <= 50),
2182
- typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "columns" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => Hr[19].test(e) || !1) && Array.isArray(e.data.columns) && e.data.columns.every((e, t) => typeof e == "string" && N(e, 200) && Hn(e, 1)) && e.data.columns.length <= 50 && e.data.columns.length >= 1 && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => [
2182
+ typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "columns" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => Hr[19].test(e) || !1) && Array.isArray(e.data.columns) && e.data.columns.every((e, t) => typeof e == "string" && M(e, 200) && N(e, 1)) && e.data.columns.length <= 50 && e.data.columns.length >= 1 && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => [
2183
2183
  gi(e),
2184
2184
  _i(e),
2185
2185
  bi(e)
2186
2186
  ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1) && e.data.rows.length <= 5e3 && (e.data.relations === void 0 || !("relations" in e.data) || Array.isArray(e.data.relations) && e.data.relations.every((e, t) => xi(e)) && e.data.relations.length <= 2e3)
2187
- ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Gr = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), Kr = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), qr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "ref" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[2].test(e) || !1) && (e.type === "element" || e.type === "relationship" || e.type === "row") && Gr(e.ref) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.from === void 0 || !("from" in e) || Xr(e.from)) && (e.to === void 0 || !("to" in e) || Xr(e.to))), Jr = ((e) => typeof e == "string" && N(e, 500)), Yr = ((e) => typeof e == "string" && N(e, 100) && Hn(e, 1)), Xr = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), Zr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "rel" in e && "uri" in e && "sha256" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[3].test(e) || !1) && typeof e.rel == "string" && N(e.rel, 100) && Hn(e.rel, 1) && typeof e.uri == "string" && N(e.uri, 2e3) && Hn(e.uri, 1) && typeof e.sha256 == "string" && Hr[4].test(e.sha256) && (e.mediaType === void 0 || !("mediaType" in e) || typeof e.mediaType == "string" && N(e.mediaType, 100) && Hn(e.mediaType, 1)) && (e.label === void 0 || !("label" in e) || Jr(e.label))), Qr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && "concern" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[5].test(e) || !1) && Xr(e.id) && typeof e.label == "string" && N(e.label, 500) && Hn(e.label, 1) && typeof e.concern == "string" && N(e.concern, 500) && Hn(e.concern, 1) && (e.elementKinds === void 0 || !("elementKinds" in e) || Array.isArray(e.elementKinds) && e.elementKinds.every((e, t) => Yr(e)) && e.elementKinds.length <= 64 && e.elementKinds.length >= 1 && new Set(e.elementKinds.map(Vr)).size === e.elementKinds.length) && (e.relationshipKinds === void 0 || !("relationshipKinds" in e) || Array.isArray(e.relationshipKinds) && e.relationshipKinds.every((e, t) => Yr(e)) && e.relationshipKinds.length <= 64 && e.relationshipKinds.length >= 1 && new Set(e.relationshipKinds.map(Vr)).size === e.relationshipKinds.length)), $r = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[7].test(e) || !1) && Xr(e.id) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.set === void 0 || !("set" in e) || ei(e.set)) && (e.container === void 0 || !("container" in e) || Xr(e.container)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), ei = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[8].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.container === void 0 || !("container" in e) || Xr(e.container)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), ti = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((t, n) => Hr[9].test(t) || ni(e[t])) && Object.getOwnPropertyNames(e).every((e, t) => typeof e != "string" || N(e, 200) && Hn(e, 1)) && Object.getOwnPropertyNames(e).length <= 50), ni = ((e) => [
2187
+ ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Gr = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), Kr = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), qr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "ref" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[2].test(e) || !1) && (e.type === "element" || e.type === "relationship" || e.type === "row") && Gr(e.ref) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.from === void 0 || !("from" in e) || Xr(e.from)) && (e.to === void 0 || !("to" in e) || Xr(e.to))), Jr = ((e) => typeof e == "string" && M(e, 500)), Yr = ((e) => typeof e == "string" && M(e, 100) && N(e, 1)), Xr = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), Zr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "rel" in e && "uri" in e && "sha256" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[3].test(e) || !1) && typeof e.rel == "string" && M(e.rel, 100) && N(e.rel, 1) && typeof e.uri == "string" && M(e.uri, 2e3) && N(e.uri, 1) && typeof e.sha256 == "string" && Hr[4].test(e.sha256) && (e.mediaType === void 0 || !("mediaType" in e) || typeof e.mediaType == "string" && M(e.mediaType, 100) && N(e.mediaType, 1)) && (e.label === void 0 || !("label" in e) || Jr(e.label))), Qr = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && "concern" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[5].test(e) || !1) && Xr(e.id) && typeof e.label == "string" && M(e.label, 500) && N(e.label, 1) && typeof e.concern == "string" && M(e.concern, 500) && N(e.concern, 1) && (e.elementKinds === void 0 || !("elementKinds" in e) || Array.isArray(e.elementKinds) && e.elementKinds.every((e, t) => Yr(e)) && e.elementKinds.length <= 64 && e.elementKinds.length >= 1 && new Set(e.elementKinds.map(Vr)).size === e.elementKinds.length) && (e.relationshipKinds === void 0 || !("relationshipKinds" in e) || Array.isArray(e.relationshipKinds) && e.relationshipKinds.every((e, t) => Yr(e)) && e.relationshipKinds.length <= 64 && e.relationshipKinds.length >= 1 && new Set(e.relationshipKinds.map(Vr)).size === e.relationshipKinds.length)), $r = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[7].test(e) || !1) && Xr(e.id) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.set === void 0 || !("set" in e) || ei(e.set)) && (e.container === void 0 || !("container" in e) || Xr(e.container)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), ei = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[8].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.container === void 0 || !("container" in e) || Xr(e.container)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), ti = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((t, n) => Hr[9].test(t) || ni(e[t])) && Object.getOwnPropertyNames(e).every((e, t) => typeof e != "string" || M(e, 200) && N(e, 1)) && Object.getOwnPropertyNames(e).length <= 50), ni = ((e) => [
2188
2188
  ri(e),
2189
2189
  ii(e),
2190
2190
  Array.isArray(e) && e.every((e, t) => [ri(e), ii(e)].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1) && e.length <= 50
2191
- ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), ri = ((e) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || N(e, 1e3))), ii = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "ref" in e && Object.getOwnPropertyNames(e).length === 1 && Gr(e.ref)), ai = ((e) => Array.isArray(e) && e.every((e, t) => Xr(e)) && e.length <= 50), oi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[10].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.container === void 0 || !("container" in e) || Xr(e.container)) && (e.revision === void 0 || !("revision" in e) || Kr(e.revision)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && Object.getOwnPropertyNames(e).length >= 1), si = ((e) => Array.isArray(e) && e.every((e, t) => ci(e)) && e.length <= 10), ci = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "uri" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[11].test(e) || !1) && typeof e.uri == "string" && N(e.uri, 2e3) && Hn(e.uri, 1) && (e.revision === void 0 || !("revision" in e) || Kr(e.revision)) && (e.range === void 0 || !("range" in e) || typeof e.range == "object" && e.range !== null && !Array.isArray(e.range) && "startLine" in e.range && "endLine" in e.range && Object.getOwnPropertyNames(e.range).every((e, t) => Hr[12].test(e) || !1) && li(e.range.startLine) && (e.range.startCharacter === void 0 || !("startCharacter" in e.range) || li(e.range.startCharacter)) && li(e.range.endLine) && (e.range.endCharacter === void 0 || !("endCharacter" in e.range) || li(e.range.endCharacter)))), li = ((e) => Number.isInteger(e) && (!(Number.isFinite(e) || typeof e == "bigint") || e <= 1e6 && e >= 0)), ui = ((e) => Array.isArray(e) && e.every((e, t) => Zr(e)) && e.length <= 20), di = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[13].test(e) || !1) && Xr(e.from) && Xr(e.to) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.set === void 0 || !("set" in e) || fi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "kind" in e)), fi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[14].test(e) || !1) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), pi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[15].test(e) || !1) && Xr(e.id) && Jr(e.label) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind))), mi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[17].test(e) || !1) && Xr(e.from) && Xr(e.to) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.set === void 0 || !("set" in e) || hi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), hi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[18].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), gi = ((e) => Array.isArray(e) && e.every((e, t) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || N(e, 1e3))) && e.length <= 50), _i = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "cells" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[20].test(e) || !1) && gi(e.cells) && (e.role === void 0 || !("role" in e) || vi(e.role)) && (e.id === void 0 || !("id" in e) || Xr(e.id)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.set === void 0 || !("set" in e) || yi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts))), vi = ((e) => e === "added" || e === "changed" || e === "context" || e === "removed"), yi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[21].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.cells === void 0 || !("cells" in e) || gi(e.cells)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), bi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "heading" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[22].test(e) || !1) && typeof e.heading == "string" && N(e.heading, 500) && Hn(e.heading, 1) && (e.depth === void 0 || !("depth" in e) || Number.isInteger(e.depth) && (!(Number.isFinite(e.depth) || typeof e.depth == "bigint") || e.depth <= 6 && e.depth >= 1)) && (e.role === void 0 || !("role" in e) || vi(e.role)) && (e.id === void 0 || !("id" in e) || Xr(e.id)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref))), xi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && "kind" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[23].test(e) || !1) && Si(e.from) && Si(e.to) && Yr(e.kind) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes))), Si = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[24].test(e) || !1) && (e.id === void 0 || !("id" in e) || Xr(e.id)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && Object.getOwnPropertyNames(e).length >= 1 && Object.getOwnPropertyNames(e).length <= 1 && [!(typeof e == "object" && e && !Array.isArray(e)) || "id" in e, !(typeof e == "object" && e && !Array.isArray(e)) || "ref" in e].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1);
2191
+ ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), ri = ((e) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || M(e, 1e3))), ii = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "ref" in e && Object.getOwnPropertyNames(e).length === 1 && Gr(e.ref)), ai = ((e) => Array.isArray(e) && e.every((e, t) => Xr(e)) && e.length <= 50), oi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[10].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.container === void 0 || !("container" in e) || Xr(e.container)) && (e.revision === void 0 || !("revision" in e) || Kr(e.revision)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && Object.getOwnPropertyNames(e).length >= 1), si = ((e) => Array.isArray(e) && e.every((e, t) => ci(e)) && e.length <= 10), ci = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "uri" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[11].test(e) || !1) && typeof e.uri == "string" && M(e.uri, 2e3) && N(e.uri, 1) && (e.revision === void 0 || !("revision" in e) || Kr(e.revision)) && (e.range === void 0 || !("range" in e) || typeof e.range == "object" && e.range !== null && !Array.isArray(e.range) && "startLine" in e.range && "endLine" in e.range && Object.getOwnPropertyNames(e.range).every((e, t) => Hr[12].test(e) || !1) && li(e.range.startLine) && (e.range.startCharacter === void 0 || !("startCharacter" in e.range) || li(e.range.startCharacter)) && li(e.range.endLine) && (e.range.endCharacter === void 0 || !("endCharacter" in e.range) || li(e.range.endCharacter)))), li = ((e) => Number.isInteger(e) && (!(Number.isFinite(e) || typeof e == "bigint") || e <= 1e6 && e >= 0)), ui = ((e) => Array.isArray(e) && e.every((e, t) => Zr(e)) && e.length <= 20), di = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[13].test(e) || !1) && Xr(e.from) && Xr(e.to) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.set === void 0 || !("set" in e) || fi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "kind" in e)), fi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[14].test(e) || !1) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), pi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[15].test(e) || !1) && Xr(e.id) && Jr(e.label) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind))), mi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[17].test(e) || !1) && Xr(e.from) && Xr(e.to) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.set === void 0 || !("set" in e) || hi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), hi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[18].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), gi = ((e) => Array.isArray(e) && e.every((e, t) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || M(e, 1e3))) && e.length <= 50), _i = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "cells" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[20].test(e) || !1) && gi(e.cells) && (e.role === void 0 || !("role" in e) || vi(e.role)) && (e.id === void 0 || !("id" in e) || Xr(e.id)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.set === void 0 || !("set" in e) || yi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.expect === void 0 || !("expect" in e) || oi(e.expect)) && (e.locations === void 0 || !("locations" in e) || si(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || ui(e.artifacts))), vi = ((e) => e === "added" || e === "changed" || e === "context" || e === "removed"), yi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[21].test(e) || !1) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.kind === void 0 || !("kind" in e) || Yr(e.kind)) && (e.cells === void 0 || !("cells" in e) || gi(e.cells)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || ai(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), bi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "heading" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[22].test(e) || !1) && typeof e.heading == "string" && M(e.heading, 500) && N(e.heading, 1) && (e.depth === void 0 || !("depth" in e) || Number.isInteger(e.depth) && (!(Number.isFinite(e.depth) || typeof e.depth == "bigint") || e.depth <= 6 && e.depth >= 1)) && (e.role === void 0 || !("role" in e) || vi(e.role)) && (e.id === void 0 || !("id" in e) || Xr(e.id)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref))), xi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && "kind" in e && Object.getOwnPropertyNames(e).every((e, t) => Hr[23].test(e) || !1) && Si(e.from) && Si(e.to) && Yr(e.kind) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && (e.label === void 0 || !("label" in e) || Jr(e.label)) && (e.attributes === void 0 || !("attributes" in e) || ti(e.attributes))), Si = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => Hr[24].test(e) || !1) && (e.id === void 0 || !("id" in e) || Xr(e.id)) && (e.ref === void 0 || !("ref" in e) || Gr(e.ref)) && Object.getOwnPropertyNames(e).length >= 1 && Object.getOwnPropertyNames(e).length <= 1 && [!(typeof e == "object" && e && !Array.isArray(e)) || "id" in e, !(typeof e == "object" && e && !Array.isArray(e)) || "ref" in e].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1);
2192
2192
  function Ci(e) {
2193
2193
  return Wr(e);
2194
2194
  }
@@ -2225,20 +2225,20 @@ var P = [];
2225
2225
  function wi(e) {
2226
2226
  P = e.variables;
2227
2227
  }
2228
- var Ti = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "schema" in e && "kind" in e && "data" in e && Object.getOwnPropertyNames(e).every((e, t) => P[0].test(e) || !1) && e.schema === "urn:structured-exchange:3" && (e.kind === "graph" || e.kind === "sequence" || e.kind === "table" || e.kind === "timeline") && (e.profile === void 0 || !("profile" in e) || typeof e.profile == "string" && N(e.profile, 200) && Hn(e.profile, 1)) && (e.target === void 0 || !("target" in e) || typeof e.target == "object" && e.target !== null && !Array.isArray(e.target) && "ref" in e.target && Object.getOwnPropertyNames(e.target).every((e, t) => P[1].test(e) || !1) && Ei(e.target.ref) && (e.target.revision === void 0 || !("revision" in e.target) || Di(e.target.revision))) && (e.removals === void 0 || !("removals" in e) || Array.isArray(e.removals) && e.removals.every((e, t) => Oi(e)) && e.removals.length <= 500) && (e.artifacts === void 0 || !("artifacts" in e) || Array.isArray(e.artifacts) && e.artifacts.every((e, t) => Mi(e)) && e.artifacts.length <= 50) && (e.viewpoints === void 0 || !("viewpoints" in e) || Array.isArray(e.viewpoints) && e.viewpoints.every((e, t) => Ni(e)) && e.viewpoints.length <= 20) && [
2228
+ var Ti = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "schema" in e && "kind" in e && "data" in e && Object.getOwnPropertyNames(e).every((e, t) => P[0].test(e) || !1) && e.schema === "urn:structured-exchange:3" && (e.kind === "graph" || e.kind === "sequence" || e.kind === "table" || e.kind === "timeline") && (e.profile === void 0 || !("profile" in e) || typeof e.profile == "string" && M(e.profile, 200) && N(e.profile, 1)) && (e.target === void 0 || !("target" in e) || typeof e.target == "object" && e.target !== null && !Array.isArray(e.target) && "ref" in e.target && Object.getOwnPropertyNames(e.target).every((e, t) => P[1].test(e) || !1) && Ei(e.target.ref) && (e.target.revision === void 0 || !("revision" in e.target) || Di(e.target.revision))) && (e.removals === void 0 || !("removals" in e) || Array.isArray(e.removals) && e.removals.every((e, t) => Oi(e)) && e.removals.length <= 500) && (e.artifacts === void 0 || !("artifacts" in e) || Array.isArray(e.artifacts) && e.artifacts.every((e, t) => Mi(e)) && e.artifacts.length <= 50) && (e.viewpoints === void 0 || !("viewpoints" in e) || Array.isArray(e.viewpoints) && e.viewpoints.every((e, t) => Ni(e)) && e.viewpoints.length <= 20) && [
2229
2229
  typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "nodes" in e.data && "edges" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => P[6].test(e) || !1) && Array.isArray(e.data.nodes) && e.data.nodes.every((e, t) => Pi(e)) && e.data.nodes.length <= 500 && e.data.nodes.length >= 1 && Array.isArray(e.data.edges) && e.data.edges.every((e, t) => Ki(e)) && e.data.edges.length <= 2e3 && (e.data.containers === void 0 || !("containers" in e.data) || Array.isArray(e.data.containers) && e.data.containers.every((e, t) => Ji(e)) && e.data.containers.length <= 50),
2230
2230
  typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "participants" in e.data && "messages" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => P[16].test(e) || !1) && Array.isArray(e.data.participants) && e.data.participants.every((e, t) => Pi(e)) && e.data.participants.length <= 100 && e.data.participants.length >= 1 && Array.isArray(e.data.messages) && e.data.messages.every((e, t) => Yi(e)) && e.data.messages.length <= 1e3 && (e.data.containers === void 0 || !("containers" in e.data) || Array.isArray(e.data.containers) && e.data.containers.every((e, t) => Ji(e)) && e.data.containers.length <= 50),
2231
- typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "columns" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => P[19].test(e) || !1) && Array.isArray(e.data.columns) && e.data.columns.every((e, t) => typeof e == "string" && N(e, 200) && Hn(e, 1)) && e.data.columns.length <= 50 && e.data.columns.length >= 1 && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => [
2231
+ typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "columns" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => P[19].test(e) || !1) && Array.isArray(e.data.columns) && e.data.columns.every((e, t) => typeof e == "string" && M(e, 200) && N(e, 1)) && e.data.columns.length <= 50 && e.data.columns.length >= 1 && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => [
2232
2232
  Zi(e),
2233
2233
  Qi(e),
2234
2234
  ta(e)
2235
2235
  ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1) && e.data.rows.length <= 5e3 && (e.data.relations === void 0 || !("relations" in e.data) || Array.isArray(e.data.relations) && e.data.relations.every((e, t) => na(e)) && e.data.relations.length <= 2e3),
2236
- typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "time" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => P[25].test(e) || !1) && (e.data.title === void 0 || !("title" in e.data) || ki(e.data.title)) && typeof e.data.time == "object" && e.data.time !== null && !Array.isArray(e.data.time) && "start" in e.data.time && "end" in e.data.time && "scale" in e.data.time && Object.getOwnPropertyNames(e.data.time).length === 3 && ia(e.data.time.start) && ia(e.data.time.end) && (e.data.time.scale === "week" || e.data.time.scale === "month" || e.data.time.scale === "quarter") && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => aa(e)) && e.data.rows.length <= 500 && (e.data.dependencies === void 0 || !("dependencies" in e.data) || Array.isArray(e.data.dependencies) && e.data.dependencies.every((e, t) => fa(e)) && e.data.dependencies.length <= 2e3) && (e.data.comparedTo === void 0 || !("comparedTo" in e.data) || typeof e.data.comparedTo == "object" && e.data.comparedTo !== null && !Array.isArray(e.data.comparedTo) && "label" in e.data.comparedTo && Object.getOwnPropertyNames(e.data.comparedTo).every((e, t) => P[32].test(e) || !1) && typeof e.data.comparedTo.label == "string" && N(e.data.comparedTo.label, 500) && Hn(e.data.comparedTo.label, 1) && (e.data.comparedTo.date === void 0 || !("date" in e.data.comparedTo) || ia(e.data.comparedTo.date))) && (e.data.periods === void 0 || !("periods" in e.data) || Array.isArray(e.data.periods) && e.data.periods.every((e, t) => pa(e)) && e.data.periods.length <= 100) && (e.data.references === void 0 || !("references" in e.data) || Array.isArray(e.data.references) && e.data.references.every((e, t) => ma(e)) && e.data.references.length <= 50)
2237
- ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Ei = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), Di = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), Oi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "ref" in e && Object.getOwnPropertyNames(e).every((e, t) => P[2].test(e) || !1) && (e.type === "element" || e.type === "relationship" || e.type === "row") && Ei(e.ref) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.from === void 0 || !("from" in e) || ji(e.from)) && (e.to === void 0 || !("to" in e) || ji(e.to))), ki = ((e) => typeof e == "string" && N(e, 500)), Ai = ((e) => typeof e == "string" && N(e, 100) && Hn(e, 1)), ji = ((e) => typeof e == "string" && N(e, 200) && Hn(e, 1)), Mi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "rel" in e && "uri" in e && "sha256" in e && Object.getOwnPropertyNames(e).every((e, t) => P[3].test(e) || !1) && typeof e.rel == "string" && N(e.rel, 100) && Hn(e.rel, 1) && typeof e.uri == "string" && N(e.uri, 2e3) && Hn(e.uri, 1) && typeof e.sha256 == "string" && P[4].test(e.sha256) && (e.mediaType === void 0 || !("mediaType" in e) || typeof e.mediaType == "string" && N(e.mediaType, 100) && Hn(e.mediaType, 1)) && (e.label === void 0 || !("label" in e) || ki(e.label))), Ni = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && "concern" in e && Object.getOwnPropertyNames(e).every((e, t) => P[5].test(e) || !1) && ji(e.id) && typeof e.label == "string" && N(e.label, 500) && Hn(e.label, 1) && typeof e.concern == "string" && N(e.concern, 500) && Hn(e.concern, 1) && (e.elementKinds === void 0 || !("elementKinds" in e) || Array.isArray(e.elementKinds) && e.elementKinds.every((e, t) => Ai(e)) && e.elementKinds.length <= 64 && e.elementKinds.length >= 1 && new Set(e.elementKinds.map(Vr)).size === e.elementKinds.length) && (e.relationshipKinds === void 0 || !("relationshipKinds" in e) || Array.isArray(e.relationshipKinds) && e.relationshipKinds.every((e, t) => Ai(e)) && e.relationshipKinds.length <= 64 && e.relationshipKinds.length >= 1 && new Set(e.relationshipKinds.map(Vr)).size === e.relationshipKinds.length)), Pi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && Object.getOwnPropertyNames(e).every((e, t) => P[7].test(e) || !1) && ji(e.id) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.set === void 0 || !("set" in e) || Fi(e.set)) && (e.container === void 0 || !("container" in e) || ji(e.container)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), Fi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[8].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.container === void 0 || !("container" in e) || ji(e.container)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), Ii = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((t, n) => P[9].test(t) || Li(e[t])) && Object.getOwnPropertyNames(e).every((e, t) => typeof e != "string" || N(e, 200) && Hn(e, 1)) && Object.getOwnPropertyNames(e).length <= 50), Li = ((e) => [
2236
+ typeof e.data == "object" && e.data !== null && !Array.isArray(e.data) && "time" in e.data && "rows" in e.data && Object.getOwnPropertyNames(e.data).every((e, t) => P[25].test(e) || !1) && (e.data.title === void 0 || !("title" in e.data) || ki(e.data.title)) && typeof e.data.time == "object" && e.data.time !== null && !Array.isArray(e.data.time) && "start" in e.data.time && "end" in e.data.time && "scale" in e.data.time && Object.getOwnPropertyNames(e.data.time).length === 3 && ia(e.data.time.start) && ia(e.data.time.end) && (e.data.time.scale === "week" || e.data.time.scale === "month" || e.data.time.scale === "quarter") && Array.isArray(e.data.rows) && e.data.rows.every((e, t) => aa(e)) && e.data.rows.length <= 500 && (e.data.dependencies === void 0 || !("dependencies" in e.data) || Array.isArray(e.data.dependencies) && e.data.dependencies.every((e, t) => fa(e)) && e.data.dependencies.length <= 2e3) && (e.data.comparedTo === void 0 || !("comparedTo" in e.data) || typeof e.data.comparedTo == "object" && e.data.comparedTo !== null && !Array.isArray(e.data.comparedTo) && "label" in e.data.comparedTo && Object.getOwnPropertyNames(e.data.comparedTo).every((e, t) => P[32].test(e) || !1) && typeof e.data.comparedTo.label == "string" && M(e.data.comparedTo.label, 500) && N(e.data.comparedTo.label, 1) && (e.data.comparedTo.date === void 0 || !("date" in e.data.comparedTo) || ia(e.data.comparedTo.date))) && (e.data.periods === void 0 || !("periods" in e.data) || Array.isArray(e.data.periods) && e.data.periods.every((e, t) => pa(e)) && e.data.periods.length <= 100) && (e.data.references === void 0 || !("references" in e.data) || Array.isArray(e.data.references) && e.data.references.every((e, t) => ma(e)) && e.data.references.length <= 50)
2237
+ ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Ei = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), Di = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), Oi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "ref" in e && Object.getOwnPropertyNames(e).every((e, t) => P[2].test(e) || !1) && (e.type === "element" || e.type === "relationship" || e.type === "row") && Ei(e.ref) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.from === void 0 || !("from" in e) || ji(e.from)) && (e.to === void 0 || !("to" in e) || ji(e.to))), ki = ((e) => typeof e == "string" && M(e, 500)), Ai = ((e) => typeof e == "string" && M(e, 100) && N(e, 1)), ji = ((e) => typeof e == "string" && M(e, 200) && N(e, 1)), Mi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "rel" in e && "uri" in e && "sha256" in e && Object.getOwnPropertyNames(e).every((e, t) => P[3].test(e) || !1) && typeof e.rel == "string" && M(e.rel, 100) && N(e.rel, 1) && typeof e.uri == "string" && M(e.uri, 2e3) && N(e.uri, 1) && typeof e.sha256 == "string" && P[4].test(e.sha256) && (e.mediaType === void 0 || !("mediaType" in e) || typeof e.mediaType == "string" && M(e.mediaType, 100) && N(e.mediaType, 1)) && (e.label === void 0 || !("label" in e) || ki(e.label))), Ni = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && "concern" in e && Object.getOwnPropertyNames(e).every((e, t) => P[5].test(e) || !1) && ji(e.id) && typeof e.label == "string" && M(e.label, 500) && N(e.label, 1) && typeof e.concern == "string" && M(e.concern, 500) && N(e.concern, 1) && (e.elementKinds === void 0 || !("elementKinds" in e) || Array.isArray(e.elementKinds) && e.elementKinds.every((e, t) => Ai(e)) && e.elementKinds.length <= 64 && e.elementKinds.length >= 1 && new Set(e.elementKinds.map(Vr)).size === e.elementKinds.length) && (e.relationshipKinds === void 0 || !("relationshipKinds" in e) || Array.isArray(e.relationshipKinds) && e.relationshipKinds.every((e, t) => Ai(e)) && e.relationshipKinds.length <= 64 && e.relationshipKinds.length >= 1 && new Set(e.relationshipKinds.map(Vr)).size === e.relationshipKinds.length)), Pi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && Object.getOwnPropertyNames(e).every((e, t) => P[7].test(e) || !1) && ji(e.id) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.set === void 0 || !("set" in e) || Fi(e.set)) && (e.container === void 0 || !("container" in e) || ji(e.container)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), Fi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[8].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.container === void 0 || !("container" in e) || ji(e.container)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), Ii = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((t, n) => P[9].test(t) || Li(e[t])) && Object.getOwnPropertyNames(e).every((e, t) => typeof e != "string" || M(e, 200) && N(e, 1)) && Object.getOwnPropertyNames(e).length <= 50), Li = ((e) => [
2238
2238
  Ri(e),
2239
2239
  zi(e),
2240
2240
  Array.isArray(e) && e.every((e, t) => [Ri(e), zi(e)].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1) && e.length <= 50
2241
- ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Ri = ((e) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || N(e, 1e3))), zi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "ref" in e && Object.getOwnPropertyNames(e).length === 1 && Ei(e.ref)), Bi = ((e) => Array.isArray(e) && e.every((e, t) => ji(e)) && e.length <= 50), Vi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[10].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.container === void 0 || !("container" in e) || ji(e.container)) && (e.revision === void 0 || !("revision" in e) || Di(e.revision)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && Object.getOwnPropertyNames(e).length >= 1), Hi = ((e) => Array.isArray(e) && e.every((e, t) => Ui(e)) && e.length <= 10), Ui = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "uri" in e && Object.getOwnPropertyNames(e).every((e, t) => P[11].test(e) || !1) && typeof e.uri == "string" && N(e.uri, 2e3) && Hn(e.uri, 1) && (e.revision === void 0 || !("revision" in e) || Di(e.revision)) && (e.range === void 0 || !("range" in e) || typeof e.range == "object" && e.range !== null && !Array.isArray(e.range) && "startLine" in e.range && "endLine" in e.range && Object.getOwnPropertyNames(e.range).every((e, t) => P[12].test(e) || !1) && Wi(e.range.startLine) && (e.range.startCharacter === void 0 || !("startCharacter" in e.range) || Wi(e.range.startCharacter)) && Wi(e.range.endLine) && (e.range.endCharacter === void 0 || !("endCharacter" in e.range) || Wi(e.range.endCharacter)))), Wi = ((e) => Number.isInteger(e) && (!(Number.isFinite(e) || typeof e == "bigint") || e <= 1e6 && e >= 0)), Gi = ((e) => Array.isArray(e) && e.every((e, t) => Mi(e)) && e.length <= 20), Ki = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => P[13].test(e) || !1) && ji(e.from) && ji(e.to) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.set === void 0 || !("set" in e) || qi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "kind" in e)), qi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[14].test(e) || !1) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), Ji = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => P[15].test(e) || !1) && ji(e.id) && ki(e.label) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind))), Yi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => P[17].test(e) || !1) && ji(e.from) && ji(e.to) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.set === void 0 || !("set" in e) || Xi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), Xi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[18].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), Zi = ((e) => Array.isArray(e) && e.every((e, t) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || N(e, 1e3))) && e.length <= 50), Qi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "cells" in e && Object.getOwnPropertyNames(e).every((e, t) => P[20].test(e) || !1) && Zi(e.cells) && (e.role === void 0 || !("role" in e) || $i(e.role)) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.set === void 0 || !("set" in e) || ea(e.set)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts))), $i = ((e) => e === "added" || e === "changed" || e === "context" || e === "removed"), ea = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[21].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.cells === void 0 || !("cells" in e) || Zi(e.cells)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), ta = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "heading" in e && Object.getOwnPropertyNames(e).every((e, t) => P[22].test(e) || !1) && typeof e.heading == "string" && N(e.heading, 500) && Hn(e.heading, 1) && (e.depth === void 0 || !("depth" in e) || Number.isInteger(e.depth) && (!(Number.isFinite(e.depth) || typeof e.depth == "bigint") || e.depth <= 6 && e.depth >= 1)) && (e.role === void 0 || !("role" in e) || $i(e.role)) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref))), na = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && "kind" in e && Object.getOwnPropertyNames(e).every((e, t) => P[23].test(e) || !1) && ra(e.from) && ra(e.to) && Ai(e.kind) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes))), ra = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[24].test(e) || !1) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && Object.getOwnPropertyNames(e).length >= 1 && Object.getOwnPropertyNames(e).length <= 1 && [!(typeof e == "object" && e && !Array.isArray(e)) || "id" in e, !(typeof e == "object" && e && !Array.isArray(e)) || "ref" in e].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), ia = ((e) => typeof e == "string" && P[26].test(e)), aa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && (e.type === "task" || e.type === "separator") && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "task" ? oa(e) : !0) && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "separator" ? da(e) : !0)), oa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "id" in e && "label" in e && "items" in e && Object.getOwnPropertyNames(e).every((e, t) => P[27].test(e) || !1) && e.type === "task" && ji(e.id) && ki(e.label) && Array.isArray(e.items) && e.items.every((e, t) => sa(e)) && e.items.length <= 100 && (e.role === void 0 || !("role" in e) || la(e.role))), sa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && (e.type === "activity" || e.type === "milestone") && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "activity" ? ca(e) : !0) && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "milestone" ? ua(e) : !0)), ca = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "start" in e && "end" in e && Object.getOwnPropertyNames(e).every((e, t) => P[28].test(e) || !1) && e.type === "activity" && ia(e.start) && ia(e.end) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.previous === void 0 || !("previous" in e) || typeof e.previous == "object" && e.previous !== null && !Array.isArray(e.previous) && "start" in e.previous && "end" in e.previous && Object.getOwnPropertyNames(e.previous).length === 2 && ia(e.previous.start) && ia(e.previous.end)) && (e.role === void 0 || !("role" in e) || la(e.role))), la = ((e) => e === "added" || e === "removed"), ua = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "date" in e && Object.getOwnPropertyNames(e).every((e, t) => P[29].test(e) || !1) && e.type === "milestone" && ia(e.date) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.previous === void 0 || !("previous" in e) || typeof e.previous == "object" && e.previous !== null && !Array.isArray(e.previous) && "date" in e.previous && Object.getOwnPropertyNames(e.previous).length === 1 && ia(e.previous.date)) && (e.role === void 0 || !("role" in e) || la(e.role))), da = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && Object.getOwnPropertyNames(e).every((e, t) => P[30].test(e) || !1) && e.type === "separator" && (e.label === void 0 || !("label" in e) || ki(e.label))), fa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => P[31].test(e) || !1) && ji(e.from) && ji(e.to) && (e.type === void 0 || !("type" in e) || e.type === "finish-to-start" || e.type === "start-to-start" || e.type === "finish-to-finish" || e.type === "start-to-finish")), pa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "start" in e && "end" in e && Object.getOwnPropertyNames(e).every((e, t) => P[33].test(e) || !1) && ia(e.start) && ia(e.end) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind))), ma = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "date" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => P[34].test(e) || !1) && ia(e.date) && typeof e.label == "string" && N(e.label, 500) && Hn(e.label, 1) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)));
2241
+ ].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), Ri = ((e) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || M(e, 1e3))), zi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "ref" in e && Object.getOwnPropertyNames(e).length === 1 && Ei(e.ref)), Bi = ((e) => Array.isArray(e) && e.every((e, t) => ji(e)) && e.length <= 50), Vi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[10].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.container === void 0 || !("container" in e) || ji(e.container)) && (e.revision === void 0 || !("revision" in e) || Di(e.revision)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && Object.getOwnPropertyNames(e).length >= 1), Hi = ((e) => Array.isArray(e) && e.every((e, t) => Ui(e)) && e.length <= 10), Ui = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "uri" in e && Object.getOwnPropertyNames(e).every((e, t) => P[11].test(e) || !1) && typeof e.uri == "string" && M(e.uri, 2e3) && N(e.uri, 1) && (e.revision === void 0 || !("revision" in e) || Di(e.revision)) && (e.range === void 0 || !("range" in e) || typeof e.range == "object" && e.range !== null && !Array.isArray(e.range) && "startLine" in e.range && "endLine" in e.range && Object.getOwnPropertyNames(e.range).every((e, t) => P[12].test(e) || !1) && Wi(e.range.startLine) && (e.range.startCharacter === void 0 || !("startCharacter" in e.range) || Wi(e.range.startCharacter)) && Wi(e.range.endLine) && (e.range.endCharacter === void 0 || !("endCharacter" in e.range) || Wi(e.range.endCharacter)))), Wi = ((e) => Number.isInteger(e) && (!(Number.isFinite(e) || typeof e == "bigint") || e <= 1e6 && e >= 0)), Gi = ((e) => Array.isArray(e) && e.every((e, t) => Mi(e)) && e.length <= 20), Ki = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => P[13].test(e) || !1) && ji(e.from) && ji(e.to) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.set === void 0 || !("set" in e) || qi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "kind" in e)), qi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[14].test(e) || !1) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), Ji = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "id" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => P[15].test(e) || !1) && ji(e.id) && ki(e.label) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind))), Yi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => P[17].test(e) || !1) && ji(e.from) && ji(e.to) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.set === void 0 || !("set" in e) || Xi(e.set)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts)) && (typeof e != "object" || !e || Array.isArray(e) || "ref" in e ? !0 : !(typeof e == "object" && e && !Array.isArray(e)) || "label" in e)), Xi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[18].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), Zi = ((e) => Array.isArray(e) && e.every((e, t) => (typeof e == "string" || Number.isFinite(e) || typeof e == "boolean" || e === null) && (typeof e != "string" || M(e, 1e3))) && e.length <= 50), Qi = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "cells" in e && Object.getOwnPropertyNames(e).every((e, t) => P[20].test(e) || !1) && Zi(e.cells) && (e.role === void 0 || !("role" in e) || $i(e.role)) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.set === void 0 || !("set" in e) || ea(e.set)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.expect === void 0 || !("expect" in e) || Vi(e.expect)) && (e.locations === void 0 || !("locations" in e) || Hi(e.locations)) && (e.artifacts === void 0 || !("artifacts" in e) || Gi(e.artifacts))), $i = ((e) => e === "added" || e === "changed" || e === "context" || e === "removed"), ea = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[21].test(e) || !1) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.cells === void 0 || !("cells" in e) || Zi(e.cells)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes)) && (e.removeAttributes === void 0 || !("removeAttributes" in e) || Bi(e.removeAttributes)) && Object.getOwnPropertyNames(e).length >= 1), ta = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "heading" in e && Object.getOwnPropertyNames(e).every((e, t) => P[22].test(e) || !1) && typeof e.heading == "string" && M(e.heading, 500) && N(e.heading, 1) && (e.depth === void 0 || !("depth" in e) || Number.isInteger(e.depth) && (!(Number.isFinite(e.depth) || typeof e.depth == "bigint") || e.depth <= 6 && e.depth >= 1)) && (e.role === void 0 || !("role" in e) || $i(e.role)) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref))), na = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && "kind" in e && Object.getOwnPropertyNames(e).every((e, t) => P[23].test(e) || !1) && ra(e.from) && ra(e.to) && Ai(e.kind) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.attributes === void 0 || !("attributes" in e) || Ii(e.attributes))), ra = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && Object.getOwnPropertyNames(e).every((e, t) => P[24].test(e) || !1) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.ref === void 0 || !("ref" in e) || Ei(e.ref)) && Object.getOwnPropertyNames(e).length >= 1 && Object.getOwnPropertyNames(e).length <= 1 && [!(typeof e == "object" && e && !Array.isArray(e)) || "id" in e, !(typeof e == "object" && e && !Array.isArray(e)) || "ref" in e].reduce((e, t, n) => t === !0 ? ++e : e, 0) === 1), ia = ((e) => typeof e == "string" && P[26].test(e)), aa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && (e.type === "task" || e.type === "separator") && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "task" ? oa(e) : !0) && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "separator" ? da(e) : !0)), oa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "id" in e && "label" in e && "items" in e && Object.getOwnPropertyNames(e).every((e, t) => P[27].test(e) || !1) && e.type === "task" && ji(e.id) && ki(e.label) && Array.isArray(e.items) && e.items.every((e, t) => sa(e)) && e.items.length <= 100 && (e.role === void 0 || !("role" in e) || la(e.role))), sa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && (e.type === "activity" || e.type === "milestone") && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "activity" ? ca(e) : !0) && (typeof e != "object" || !e || Array.isArray(e) || e.type === void 0 || !("type" in e) || e.type === "milestone" ? ua(e) : !0)), ca = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "start" in e && "end" in e && Object.getOwnPropertyNames(e).every((e, t) => P[28].test(e) || !1) && e.type === "activity" && ia(e.start) && ia(e.end) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.previous === void 0 || !("previous" in e) || typeof e.previous == "object" && e.previous !== null && !Array.isArray(e.previous) && "start" in e.previous && "end" in e.previous && Object.getOwnPropertyNames(e.previous).length === 2 && ia(e.previous.start) && ia(e.previous.end)) && (e.role === void 0 || !("role" in e) || la(e.role))), la = ((e) => e === "added" || e === "removed"), ua = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && "date" in e && Object.getOwnPropertyNames(e).every((e, t) => P[29].test(e) || !1) && e.type === "milestone" && ia(e.date) && (e.id === void 0 || !("id" in e) || ji(e.id)) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)) && (e.previous === void 0 || !("previous" in e) || typeof e.previous == "object" && e.previous !== null && !Array.isArray(e.previous) && "date" in e.previous && Object.getOwnPropertyNames(e.previous).length === 1 && ia(e.previous.date)) && (e.role === void 0 || !("role" in e) || la(e.role))), da = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "type" in e && Object.getOwnPropertyNames(e).every((e, t) => P[30].test(e) || !1) && e.type === "separator" && (e.label === void 0 || !("label" in e) || ki(e.label))), fa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "from" in e && "to" in e && Object.getOwnPropertyNames(e).every((e, t) => P[31].test(e) || !1) && ji(e.from) && ji(e.to) && (e.type === void 0 || !("type" in e) || e.type === "finish-to-start" || e.type === "start-to-start" || e.type === "finish-to-finish" || e.type === "start-to-finish")), pa = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "start" in e && "end" in e && Object.getOwnPropertyNames(e).every((e, t) => P[33].test(e) || !1) && ia(e.start) && ia(e.end) && (e.label === void 0 || !("label" in e) || ki(e.label)) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind))), ma = ((e) => typeof e == "object" && !!e && !Array.isArray(e) && "date" in e && "label" in e && Object.getOwnPropertyNames(e).every((e, t) => P[34].test(e) || !1) && ia(e.date) && typeof e.label == "string" && M(e.label, 500) && N(e.label, 1) && (e.kind === void 0 || !("kind" in e) || Ai(e.kind)));
2242
2242
  function ha(e) {
2243
2243
  return Ti(e);
2244
2244
  }
@@ -2282,15 +2282,15 @@ wi({ variables: [
2282
2282
  //#endregion
2283
2283
  //#region ../shared/src/structuredExchangeSchemaBrowser.ts
2284
2284
  var ga = {
2285
- [Ae]: dr,
2286
- [Ie]: Ci,
2287
- [ze]: ha
2285
+ [je]: dr,
2286
+ [Le]: Ci,
2287
+ [Be]: ha
2288
2288
  }, _a = (e) => {
2289
- let t = pn(e), n = Ve(t);
2289
+ let t = mn(e), n = He(t);
2290
2290
  return n === void 0 && t !== void 0 ? [{
2291
2291
  rule: "unsupported-version",
2292
2292
  path: "/schema",
2293
- message: `this build validates ${Be.join(" and ")}`
2293
+ message: `this build validates ${Ve.join(" and ")}`
2294
2294
  }] : ga[n ?? "urn:structured-exchange:1"](e) ? [] : [{
2295
2295
  rule: "schema/invalid",
2296
2296
  path: "",
@@ -4535,10 +4535,10 @@ var cl = {
4535
4535
  "removed"
4536
4536
  ];
4537
4537
  function dl(e) {
4538
- return e.rows.some((e) => Pe(e).role !== void 0);
4538
+ return e.rows.some((e) => Fe(e).role !== void 0);
4539
4539
  }
4540
4540
  function fl(e, t) {
4541
- if (t) return Pe(e).role ?? "context";
4541
+ if (t) return Fe(e).role ?? "context";
4542
4542
  }
4543
4543
  function pl(e) {
4544
4544
  if (e.length === 0) return;
@@ -4688,7 +4688,7 @@ function El(e, t) {
4688
4688
  ref: typeof n.ref == "string" ? n.ref : void 0,
4689
4689
  set: n.set,
4690
4690
  heading: typeof n.heading == "string" ? n.heading : void 0
4691
- }, t) ?? fl(e, i), { cells: a, heading: o } = Pe(e), s = Array.isArray(e) ? {} : e;
4691
+ }, t) ?? fl(e, i), { cells: a, heading: o } = Fe(e), s = Array.isArray(e) ? {} : e;
4692
4692
  return {
4693
4693
  cells: a,
4694
4694
  ...r === void 0 ? {} : { role: r },
@@ -4872,7 +4872,7 @@ function Bl(e) {
4872
4872
  to: n
4873
4873
  });
4874
4874
  });
4875
- let i = t.length > 0 ? zl : 0, a = new Map(n.map((e, t) => [e.id, t])), o = Math.max(...e.participants.map((e) => tt([Dl(e)], sl(e), 110, 240)), et(e.messages.map((e) => e.label ?? ""), 110, 240) * .8), s = o - 14, c = e.participants.reduce((e, t) => Math.max(e, rt(nt(Dl(t), s).length, it(sl(t), s).length)), rt(1, 0)) + 8;
4875
+ let i = t.length > 0 ? zl : 0, a = new Map(n.map((e, t) => [e.id, t])), o = Math.max(...e.participants.map((e) => nt([Dl(e)], sl(e), 110, 240)), tt(e.messages.map((e) => e.label ?? ""), 110, 240) * .8), s = o - 14, c = e.participants.reduce((e, t) => Math.max(e, it(rt(Dl(t), s).length, at(sl(t), s).length)), it(1, 0)) + 8;
4876
4876
  return {
4877
4877
  columns: n,
4878
4878
  bands: r,
@@ -4889,7 +4889,7 @@ function Bl(e) {
4889
4889
  function Vl(e, t) {
4890
4890
  let n = [Dl(e)];
4891
4891
  t !== "unchanged" && n.push(`(${cl[t]})`), e.ref !== void 0 && n.push(`[${e.ref}]`);
4892
- for (let t of sl(e)) n.push(at(t));
4892
+ for (let t of sl(e)) n.push(ot(t));
4893
4893
  return n.join(" ");
4894
4894
  }
4895
4895
  function Hl(e, t) {
@@ -4996,7 +4996,7 @@ function Kl(e, t, n, r) {
4996
4996
  `${i(t.from)} → ${i(t.to)}${a}`,
4997
4997
  t.from === t.to ? "(to itself)" : "",
4998
4998
  r === "unchanged" ? "" : `[${cl[r]}]`,
4999
- sl(t).map(at).join(", ")
4999
+ sl(t).map(ot).join(", ")
5000
5000
  ].filter((e) => e !== "").join(" ");
5001
5001
  }
5002
5002
  function ql(e, t, n) {
@@ -5008,14 +5008,14 @@ function ql(e, t, n) {
5008
5008
  `${r(t.from)} → ${r(t.to)}`,
5009
5009
  i === void 0 ? "" : `(${i})`,
5010
5010
  n === "unchanged" ? "" : `[${cl[n]}]`,
5011
- sl(t).map(at).join(", ")
5011
+ sl(t).map(ot).join(", ")
5012
5012
  ].filter((e) => e !== "").join(" ");
5013
5013
  }
5014
5014
  //#endregion
5015
5015
  //#region ../ui/src/presentations/structuredExchange.ts
5016
5016
  function Jl(e) {
5017
5017
  if (e === void 0 || e === "") return;
5018
- let t = fn(e, _a);
5018
+ let t = pn(e, _a);
5019
5019
  return t.valid ? {
5020
5020
  valid: !0,
5021
5021
  envelope: t.envelope,
@@ -5027,7 +5027,7 @@ function Yl(e) {
5027
5027
  return t?.valid === !0 ? t.envelope : void 0;
5028
5028
  }
5029
5029
  function Xl(e) {
5030
- return mn(e, _a);
5030
+ return hn(e, _a);
5031
5031
  }
5032
5032
  //#endregion
5033
5033
  //#region ../shared/src/structuredExchangeArrangement.ts
@@ -5622,54 +5622,54 @@ var Ru = (e, t, n, r, i) => {
5622
5622
  ce[1] = Math.max(j - b, 0), ce[2] = Math.max(A - b, 0), ce[4] = Math.max(oe - b, 0), ce[3] = Math.max(se - b, 0);
5623
5623
  let le = [], ue = [], de = [];
5624
5624
  ue[0] = j >= se ? vu : xu, de[0] = A >= oe ? yu : bu, ue[1] = Pu(ue[0]), de[1] = Pu(de[0]);
5625
- let fe = j >= se ? j : se, pe = A >= oe ? A : oe, me = [[0, 0], [0, 0]], M = !1;
5625
+ let fe = j >= se ? j : se, pe = A >= oe ? A : oe, me = [[0, 0], [0, 0]], he = !1;
5626
5626
  for (let e = 0; e < 2; e++) C[e] === 0 && ((ue[e] & S[e]) === 0 && (ue[e] = Pu(ue[e])), (de[e] & S[e]) === 0 && (de[e] = Pu(de[e])), me[e][0] = de[e], me[e][1] = ue[e]);
5627
- pe > 0 && fe > 0 && ((ue[0] & S[0]) > 0 && (de[1] & S[1]) > 0 ? (me[0] = [ue[0], de[0]], me[1] = [de[1], ue[1]], M = !0) : (de[0] & S[0]) > 0 && (ue[1] & S[1]) > 0 && (me[0] = [de[0], ue[0]], me[1] = [ue[1], de[1]], M = !0)), pe > 0 && !M && (me[0] = [de[0], ue[0]], me[1] = [de[1], ue[1]], M = !0), fe > 0 && !M && (me[0] = [ue[0], de[0]], me[1] = [ue[1], de[1]], M = !0);
5627
+ pe > 0 && fe > 0 && ((ue[0] & S[0]) > 0 && (de[1] & S[1]) > 0 ? (me[0] = [ue[0], de[0]], me[1] = [de[1], ue[1]], he = !0) : (de[0] & S[0]) > 0 && (ue[1] & S[1]) > 0 && (me[0] = [de[0], ue[0]], me[1] = [ue[1], de[1]], he = !0)), pe > 0 && !he && (me[0] = [de[0], ue[0]], me[1] = [de[1], ue[1]], he = !0), fe > 0 && !he && (me[0] = [ue[0], de[0]], me[1] = [ue[1], de[1]]);
5628
5628
  for (let e = 0; e < 2; e++) C[e] === 0 && ((me[e][0] & S[e]) === 0 && (me[e][0] = me[e][1]), le[e] = me[e][0] & S[e], le[e] |= (me[e][1] & S[e]) << 8, le[e] |= (me[1 - e][e] & S[e]) << 16, le[e] |= (me[1 - e][1 - e] & S[e]) << 24, le[e] & 15 || (le[e] = le[e] << 8), le[e] & 3840 || (le[e] = le[e] & 15 | le[e] >> 8), le[e] & 983040 || (le[e] = le[e] & 65535 | (le[e] & 251658240) >> 8), C[e] = le[e] & 15, (S[e] === vu || S[e] === yu || S[e] === xu || S[e] === bu) && (C[e] = S[e]));
5629
- let he = C[0] === xu ? 3 : C[0], ge = C[1] === xu ? 3 : C[1];
5630
- he -= D, ge -= D, he < 1 && (he += 4), ge < 1 && (ge += 4);
5631
- let _e = Bu[he - 1][ge - 1], ve = Array.from({ length: 12 }, () => [0, 0]);
5632
- switch (ve[0][0] = w[0][0], ve[0][1] = w[0][1], C[0]) {
5629
+ let ge = C[0] === xu ? 3 : C[0], _e = C[1] === xu ? 3 : C[1];
5630
+ ge -= D, _e -= D, ge < 1 && (ge += 4), _e < 1 && (_e += 4);
5631
+ let ve = Bu[ge - 1][_e - 1], ye = Array.from({ length: 12 }, () => [0, 0]);
5632
+ switch (ye[0][0] = w[0][0], ye[0][1] = w[0][1], C[0]) {
5633
5633
  case vu:
5634
- ve[0][0] -= v, ve[0][1] += k[0][1] * w[0][3];
5634
+ ye[0][0] -= v, ye[0][1] += k[0][1] * w[0][3];
5635
5635
  break;
5636
5636
  case bu:
5637
- ve[0][0] += k[0][0] * w[0][2], ve[0][1] += w[0][3] + v;
5637
+ ye[0][0] += k[0][0] * w[0][2], ye[0][1] += w[0][3] + v;
5638
5638
  break;
5639
5639
  case xu:
5640
- ve[0][0] += w[0][2] + v, ve[0][1] += k[0][1] * w[0][3];
5640
+ ye[0][0] += w[0][2] + v, ye[0][1] += k[0][1] * w[0][3];
5641
5641
  break;
5642
- case yu: ve[0][0] += k[0][0] * w[0][2], ve[0][1] -= v;
5642
+ case yu: ye[0][0] += k[0][0] * w[0][2], ye[0][1] -= v;
5643
5643
  }
5644
- let ye = 0, be = (C[0] & 9) > 0 ? 0 : 1, xe = be, Se = 0;
5645
- for (let e of _e) {
5644
+ let be = 0, xe = (C[0] & 9) > 0 ? 0 : 1, Se = xe, Ce = 0;
5645
+ for (let e of ve) {
5646
5646
  let t = e & 15, n = t === xu ? 3 : t;
5647
5647
  n += D, n > 4 && (n -= 4);
5648
5648
  let r = zu[n - 1];
5649
- Se = n % 2 > 0 ? 0 : 1, Se !== be && (ye++, ve[ye][0] = ve[ye - 1][0], ve[ye][1] = ve[ye - 1][1]);
5649
+ Ce = n % 2 > 0 ? 0 : 1, Ce !== xe && (be++, ye[be][0] = ye[be - 1][0], ye[be][1] = ye[be - 1][1]);
5650
5650
  let i = (e & Hu) > 0, a = (e & Vu) > 0, o = (e & Uu) >> 5;
5651
5651
  o <<= D, o > 15 && (o >>= 4);
5652
5652
  let s = (e & Wu) > 0;
5653
5653
  if ((a || i) && o < 9) {
5654
5654
  let e = 0, t = +!a;
5655
- if (e = s && Se === 0 ? w[t][0] + k[t][0] * w[t][2] : s ? w[t][1] + k[t][1] * w[t][3] : T[t][o], Se === 0) {
5656
- let t = ve[ye][0], n = (e - t) * r[0];
5657
- n > 0 && (ve[ye][0] += r[0] * n);
5655
+ if (e = s && Ce === 0 ? w[t][0] + k[t][0] * w[t][2] : s ? w[t][1] + k[t][1] * w[t][3] : T[t][o], Ce === 0) {
5656
+ let t = ye[be][0], n = (e - t) * r[0];
5657
+ n > 0 && (ye[be][0] += r[0] * n);
5658
5658
  } else {
5659
- let t = ve[ye][1], n = (e - t) * r[1];
5660
- n > 0 && (ve[ye][1] += r[1] * n);
5659
+ let t = ye[be][1], n = (e - t) * r[1];
5660
+ n > 0 && (ye[be][1] += r[1] * n);
5661
5661
  }
5662
- } else s && (ve[ye][0] += r[0] * Math.abs(ce[n] / 2), ve[ye][1] += r[1] * Math.abs(ce[n] / 2));
5663
- ye > 0 && ve[ye][Se] === ve[ye - 1][Se] ? ye-- : be = Se;
5662
+ } else s && (ye[be][0] += r[0] * Math.abs(ce[n] / 2), ye[be][1] += r[1] * Math.abs(ce[n] / 2));
5663
+ be > 0 && ye[be][Ce] === ye[be - 1][Ce] ? be-- : xe = Ce;
5664
5664
  }
5665
- for (let e = 0; e <= ye && (e !== ye || (((C[1] & 9) > 0 ? 0 : 1) === xe ? 0 : 1) == (ye + 1) % 2); e++) i.push({
5666
- x: Tu(ve[e][0]),
5667
- y: Tu(ve[e][1])
5665
+ for (let e = 0; e <= be && (e !== be || (((C[1] & 9) > 0 ? 0 : 1) === Se ? 0 : 1) == (be + 1) % 2); e++) i.push({
5666
+ x: Tu(ye[e][0]),
5667
+ y: Tu(ye[e][1])
5668
5668
  });
5669
- let Ce = 1;
5670
- for (; Ce < i.length;) {
5671
- let [e, t] = [i[Ce - 1], i[Ce]];
5672
- e == null || t == null || e.x !== t.x || e.y !== t.y ? Ce++ : i.splice(Ce, 1);
5669
+ let we = 1;
5670
+ for (; we < i.length;) {
5671
+ let [e, t] = [i[we - 1], i[we]];
5672
+ e == null || t == null || e.x !== t.x || e.y !== t.y ? we++ : i.splice(we, 1);
5673
5673
  }
5674
5674
  }, Ku = (e, t, n) => Eu(e, t, n), qu = (e, t, n, r, i) => {
5675
5675
  let a = r !== null && r.length > 0 ? Nu(e, r[0]) : null, o = e.absolutePoints[0], s = e.absolutePoints[e.absolutePoints.length - 1], c = o == null ? t?.box ?? null : {
@@ -6345,8 +6345,8 @@ function Nd(e, t) {
6345
6345
  }
6346
6346
  }
6347
6347
  function Pd(e) {
6348
- let t = {}, n = /([^\s=/>]+)\s*=\s*("([^"]*)"|'([^']*)')/g, r;
6349
- for (; (r = n.exec(e)) !== null;) t[r[1]] = Md(r[3] ?? r[4] ?? "");
6348
+ let t = /* @__PURE__ */ new Map(), n = /([^\s=/>]+)\s*=\s*("([^"]*)"|'([^']*)')/g, r;
6349
+ for (; (r = n.exec(e)) !== null;) t.set(r[1], Md(r[3] ?? r[4] ?? ""));
6350
6350
  return t;
6351
6351
  }
6352
6352
  function Fd(e, t) {
@@ -6396,7 +6396,7 @@ function Fd(e, t) {
6396
6396
  if (t({
6397
6397
  kind: "open",
6398
6398
  name: u,
6399
- attributes: l === -1 ? {} : Pd(c.slice(l)),
6399
+ attributes: l === -1 ? /* @__PURE__ */ new Map() : Pd(c.slice(l)),
6400
6400
  selfClosing: s
6401
6401
  }) === !1) return;
6402
6402
  }
@@ -6444,14 +6444,14 @@ function Vd(e) {
6444
6444
  y: 0,
6445
6445
  width: 0,
6446
6446
  height: 0,
6447
- relative: e.relative === "1",
6447
+ relative: e.get("relative") === "1",
6448
6448
  unreadable: [],
6449
6449
  sourcePoint: !1,
6450
6450
  targetPoint: !1,
6451
6451
  points: []
6452
6452
  };
6453
6453
  for (let n of Rd) {
6454
- let r = e[n];
6454
+ let r = e.get(n);
6455
6455
  if (r === void 0) continue;
6456
6456
  let i = Number(r);
6457
6457
  r.trim() === "" || !Number.isFinite(i) ? t.unreadable.push(`${n}="${r}"`) : t[n] = i;
@@ -6477,26 +6477,26 @@ function Hd(e, t) {
6477
6477
  if (t === "object" || t === "UserObject") i = c;
6478
6478
  else if (t === "mxCell") {
6479
6479
  let e = {
6480
- id: (i ?? c).id ?? c.id,
6481
- parent: c.parent,
6482
- vertex: c.vertex === "1",
6483
- edge: c.edge === "1",
6484
- source: c.source,
6485
- target: c.target,
6486
- label: Bd(i ? i.label ?? i.value : c.value),
6487
- style: c.style ?? "",
6480
+ id: (i ?? c).get("id") ?? c.get("id"),
6481
+ parent: c.get("parent"),
6482
+ vertex: c.get("vertex") === "1",
6483
+ edge: c.get("edge") === "1",
6484
+ source: c.get("source"),
6485
+ target: c.get("target"),
6486
+ label: Bd(i ? i.get("label") ?? i.get("value") : c.get("value")),
6487
+ style: c.get("style") ?? "",
6488
6488
  geometry: void 0
6489
6489
  };
6490
6490
  n.push(e), a = l ? null : e;
6491
- } else if (t === "mxGeometry" && a !== null && (c.as ?? "geometry") === "geometry") {
6491
+ } else if (t === "mxGeometry" && a !== null && (c.get("as") ?? "geometry") === "geometry") {
6492
6492
  let e = Vd(c);
6493
6493
  a.geometry = e, o = l ? null : e;
6494
6494
  } else if (t === "mxPoint" && o !== null) {
6495
6495
  let e = {
6496
- x: Number(c.x ?? 0) || 0,
6497
- y: Number(c.y ?? 0) || 0
6496
+ x: Number(c.get("x") ?? 0) || 0,
6497
+ y: Number(c.get("y") ?? 0) || 0
6498
6498
  }, t = o;
6499
- c.as === "sourcePoint" ? (t.sourcePoint = !0, t.sourcePointAt = e) : c.as === "targetPoint" ? (t.targetPoint = !0, t.targetPointAt = e) : c.as === "offset" ? t.offset = e : r[r.length - 1] === "Array" && r[r.length - 2] === "mxGeometry" && t.points.push(e);
6499
+ c.get("as") === "sourcePoint" ? (t.sourcePoint = !0, t.sourcePointAt = e) : c.get("as") === "targetPoint" ? (t.targetPoint = !0, t.targetPointAt = e) : c.get("as") === "offset" ? t.offset = e : r[r.length - 1] === "Array" && r[r.length - 2] === "mxGeometry" && t.points.push(e);
6500
6500
  }
6501
6501
  l || r.push(t);
6502
6502
  });
@@ -6524,7 +6524,13 @@ function Ud(e, t) {
6524
6524
  let i = [], a = /<diagram\b([^>]*?)(\/>|>([\s\S]*?)<\/diagram>)/g, o;
6525
6525
  for (; (o = a.exec(n)) !== null;) {
6526
6526
  let e = `Page-${i.length + 1}`;
6527
- Fd(`<diagram${o[1]}/>`, (t) => (t.kind === "open" && t.attributes.name && (e = t.attributes.name), !1));
6527
+ Fd(`<diagram${o[1]}/>`, (t) => {
6528
+ if (t.kind === "open") {
6529
+ let n = t.attributes.get("name");
6530
+ n && (e = n);
6531
+ }
6532
+ return !1;
6533
+ });
6528
6534
  let n = (o[3] ?? "").trim();
6529
6535
  if (n === "") throw new Ld(`page "${e}" is empty`);
6530
6536
  let r;
@@ -7839,7 +7845,7 @@ function wp(e) {
7839
7845
  fill: e.tint?.fill ?? t.fill,
7840
7846
  stroke: e.role === "unchanged" ? e.tint?.stroke ?? t.stroke : t.stroke,
7841
7847
  text: t.text === "#71717a" ? dp : up
7842
- }, r = e.role === "added" || e.role === "changed" ? 2 : 1.2, i = e.role === "context" ? .62 : 1, a = e.anchor ?? "start", o = nt(e.label, e.width), s = it(e.changes, e.width), c = o.length + s.length, l = e.y + e.height / 2 - (c - 1) * 15 / 2 + 4, u = a === "middle" ? e.x + e.width / 2 : e.x + 8, d = [{
7848
+ }, r = e.role === "added" || e.role === "changed" ? 2 : 1.2, i = e.role === "context" ? .62 : 1, a = e.anchor ?? "start", o = rt(e.label, e.width), s = at(e.changes, e.width), c = o.length + s.length, l = e.y + e.height / 2 - (c - 1) * 15 / 2 + 4, u = a === "middle" ? e.x + e.width / 2 : e.x + 8, d = [{
7843
7849
  shape: "rect",
7844
7850
  x: e.x,
7845
7851
  y: e.y,
@@ -8099,10 +8105,10 @@ function Kp(e, t) {
8099
8105
  return `${e}-${t.replace("#", "")}`;
8100
8106
  }
8101
8107
  function qp(e) {
8102
- let t = tt([Dl(e)], sl(e), 120, 260);
8108
+ let t = nt([Dl(e)], sl(e), 120, 260);
8103
8109
  return {
8104
8110
  width: t,
8105
- height: rt(nt(Dl(e), t).length, it(sl(e), t).length)
8111
+ height: it(rt(Dl(e), t).length, at(sl(e), t).length)
8106
8112
  };
8107
8113
  }
8108
8114
  function Jp(e, t) {
@@ -8402,7 +8408,7 @@ function tm(e, t) {
8402
8408
  strokeWidth: 3,
8403
8409
  paintOrder: "stroke"
8404
8410
  });
8405
- let p = c.map(at).join(", ");
8411
+ let p = c.map(ot).join(", ");
8406
8412
  c.length > 0 && d(p) && f.push({
8407
8413
  shape: "text",
8408
8414
  x: a.labelAt.x,
@@ -8617,7 +8623,7 @@ function nm(e, t) {
8617
8623
  shape: "text",
8618
8624
  x: h,
8619
8625
  y: s + 11,
8620
- text: m.map(at).join(", "),
8626
+ text: m.map(ot).join(", "),
8621
8627
  textAnchor: g,
8622
8628
  fontSize: 9,
8623
8629
  fontWeight: 600,
@@ -9548,18 +9554,18 @@ function Cm({ data: e, hidden: t, orientation: n, arrangement: r, onArrange: i,
9548
9554
  "data-testid": "structured-touchup",
9549
9555
  className: "flex flex-col gap-1",
9550
9556
  children: [/* @__PURE__ */ j("div", {
9551
- className: Se,
9557
+ className: Ce,
9552
9558
  children: [
9553
9559
  /* @__PURE__ */ A("button", {
9554
9560
  type: "button",
9555
- className: xe,
9561
+ className: Se,
9556
9562
  disabled: !l.dirty || d,
9557
9563
  onClick: () => void te(),
9558
9564
  children: d ? "keeping…" : "✓ keep"
9559
9565
  }),
9560
9566
  /* @__PURE__ */ A("button", {
9561
9567
  type: "button",
9562
- className: xe,
9568
+ className: Se,
9563
9569
  disabled: !l.canUndo,
9564
9570
  onClick: () => c.current?.undo(),
9565
9571
  title: "Undo (⌘Z / Ctrl+Z)",
@@ -9567,7 +9573,7 @@ function Cm({ data: e, hidden: t, orientation: n, arrangement: r, onArrange: i,
9567
9573
  }),
9568
9574
  /* @__PURE__ */ A("button", {
9569
9575
  type: "button",
9570
- className: xe,
9576
+ className: Se,
9571
9577
  disabled: !l.canRedo,
9572
9578
  onClick: () => c.current?.redo(),
9573
9579
  title: "Redo (⇧⌘Z / Ctrl+Y)",
@@ -9575,7 +9581,7 @@ function Cm({ data: e, hidden: t, orientation: n, arrangement: r, onArrange: i,
9575
9581
  }),
9576
9582
  /* @__PURE__ */ A("button", {
9577
9583
  type: "button",
9578
- className: xe,
9584
+ className: Se,
9579
9585
  disabled: !l.bends,
9580
9586
  onClick: () => c.current?.removeBends(),
9581
9587
  title: "Remove the bends of the selected wires — or of every wire when none is selected. Click a bend and press Delete to remove just that one.",
@@ -9583,7 +9589,7 @@ function Cm({ data: e, hidden: t, orientation: n, arrangement: r, onArrange: i,
9583
9589
  }),
9584
9590
  /* @__PURE__ */ A("button", {
9585
9591
  type: "button",
9586
- className: xe,
9592
+ className: Se,
9587
9593
  onClick: ne,
9588
9594
  title: "Leave the touch-up; touch-ups not kept are asked about first",
9589
9595
  children: "done"
@@ -9632,7 +9638,7 @@ function Dm(e, t, n) {
9632
9638
  };
9633
9639
  }
9634
9640
  function Om(e, t, n) {
9635
- let { shown: r, anyRole: i, withheld: a } = Dm(e, t, n), o = e.rows.some((e) => Pe(e).heading !== void 0);
9641
+ let { shown: r, anyRole: i, withheld: a } = Dm(e, t, n), o = e.rows.some((e) => Fe(e).heading !== void 0);
9636
9642
  return {
9637
9643
  columns: [
9638
9644
  ...o ? [Tm, Em] : [],
@@ -9640,7 +9646,7 @@ function Om(e, t, n) {
9640
9646
  ...i ? [wm] : []
9641
9647
  ],
9642
9648
  rows: r.map(({ row: t, role: n }) => {
9643
- let { cells: r, heading: a } = Pe(t), s = Array.isArray(t) ? void 0 : t.depth, c = o ? a === void 0 ? [null, null] : [a, s ?? 1] : [], l = a === void 0 ? r : e.columns.map(() => null);
9649
+ let { cells: r, heading: a } = Fe(t), s = Array.isArray(t) ? void 0 : t.depth, c = o ? a === void 0 ? [null, null] : [a, s ?? 1] : [], l = a === void 0 ? r : e.columns.map(() => null);
9644
9650
  return [
9645
9651
  ...c,
9646
9652
  ...l,
@@ -9673,7 +9679,7 @@ function Nm(e, t = /* @__PURE__ */ new Set(), n) {
9673
9679
  ].join("\n")), l = [], u = !0);
9674
9680
  };
9675
9681
  for (let { row: e, role: t } of r) {
9676
- let { cells: n, heading: r } = Pe(e);
9682
+ let { cells: n, heading: r } = Fe(e);
9677
9683
  if (r !== void 0) {
9678
9684
  d();
9679
9685
  let t = Array.isArray(e) ? 1 : e.depth ?? 1;
@@ -9762,11 +9768,11 @@ function Zm(e, t, n, r, i = 1, a = "#a1a1aa", o = 6, s = .5) {
9762
9768
  return (i === 1 || i === 3) && l(!1), (i === 2 || i === 3) && l(!0), c;
9763
9769
  }
9764
9770
  function Qm(e) {
9765
- let [t, n, r] = pt(e).split("-");
9771
+ let [t, n, r] = mt(e).split("-");
9766
9772
  return `${Number(r)} ${Ym[Number(n) - 1]} ${t}`;
9767
9773
  }
9768
9774
  function $m(e, t) {
9769
- let n = Math.floor(t / Qe);
9775
+ let n = Math.floor(t / $e);
9770
9776
  return e.length <= n ? e : `${e.slice(0, Math.max(1, n - 1))}…`;
9771
9777
  }
9772
9778
  function eh(e, t, n) {
@@ -9782,20 +9788,20 @@ function eh(e, t, n) {
9782
9788
  ].filter((e) => e !== void 0).join(", ");
9783
9789
  }
9784
9790
  function th(e, t) {
9785
- let n = t.comparison === "new" ? Rm(e) : e, r = Wt(n), i = (() => {
9786
- let e = Vt(n, t.today, {
9791
+ let n = t.comparison === "new" ? Rm(e) : e, r = Gt(n), i = (() => {
9792
+ let e = Ht(n, t.today, {
9787
9793
  compact: t.compact,
9788
9794
  pxPerDay: 1,
9789
9795
  onlyChanged: t.onlyChanged
9790
9796
  });
9791
9797
  return e.end - e.start + 1;
9792
- })(), a = Dt[t.scale ?? n.time.scale] ?? Dt.month, o = !1;
9798
+ })(), a = Ot[t.scale ?? n.time.scale] ?? Ot.month, o = !1;
9793
9799
  if (t.pxPerDay !== void 0) a = t.pxPerDay;
9794
9800
  else if (t.width !== void 0) {
9795
9801
  let e = (t.width - r - 16) / i;
9796
9802
  a = Math.max(Gm, e), o = e < Gm;
9797
9803
  }
9798
- let s = t.unit ?? (t.pxPerDay !== void 0 || t.width !== void 0 ? t.scale : t.scale ?? n.time.scale), c = Vt(n, t.today, {
9804
+ let s = t.unit ?? (t.pxPerDay !== void 0 || t.width !== void 0 ? t.scale : t.scale ?? n.time.scale), c = Ht(n, t.today, {
9799
9805
  compact: t.compact,
9800
9806
  pxPerDay: a,
9801
9807
  onlyChanged: t.onlyChanged,
@@ -9878,7 +9884,7 @@ function th(e, t) {
9878
9884
  shape: "text",
9879
9885
  x: e.x + e.width / 2,
9880
9886
  y: 52,
9881
- text: jt(e, c.unit),
9887
+ text: Mt(e, c.unit),
9882
9888
  fontSize: 10,
9883
9889
  textAnchor: "middle",
9884
9890
  fill: dp,
@@ -9957,7 +9963,7 @@ function th(e, t) {
9957
9963
  });
9958
9964
  }
9959
9965
  if (d !== "none" && "outside" in c.today) {
9960
- let e = c.today.outside === "before", t = d === "dated" ? Qm(c.today.day) : `Today (${pt(c.today.day)})`;
9966
+ let e = c.today.outside === "before", t = d === "dated" ? Qm(c.today.day) : `Today (${mt(c.today.day)})`;
9961
9967
  m.push({
9962
9968
  id: "today-outside",
9963
9969
  primitives: [{
@@ -10039,7 +10045,7 @@ function th(e, t) {
10039
10045
  }]
10040
10046
  })];
10041
10047
  for (let e of c.periods) {
10042
- let t = n.periods[e.index], r = `${t.label ?? "Period"}: ${Qm(ft(t.start))} – ${Qm(ft(t.end))}`, i = [{
10048
+ let t = n.periods[e.index], r = `${t.label ?? "Period"}: ${Qm(pt(t.start))} – ${Qm(pt(t.end))}`, i = [{
10043
10049
  shape: "rect",
10044
10050
  x: e.x,
10045
10051
  y: 0,
@@ -10061,7 +10067,7 @@ function th(e, t) {
10061
10067
  v.push({
10062
10068
  id: `reference-${e.index}`,
10063
10069
  testId: "timeline-reference",
10064
- title: `${e.label}: ${Qm(ft(e.date))}`,
10070
+ title: `${e.label}: ${Qm(pt(e.date))}`,
10065
10071
  data: { ...e.kind ? { kind: e.kind } : {} },
10066
10072
  primitives: [{
10067
10073
  shape: "line",
@@ -10080,7 +10086,7 @@ function th(e, t) {
10080
10086
  v.push({
10081
10087
  id: `dependency-${e.index}`,
10082
10088
  testId: "timeline-dependency",
10083
- title: Kt(n, i, e.satisfied),
10089
+ title: qt(n, i, e.satisfied),
10084
10090
  data: {
10085
10091
  from: e.from,
10086
10092
  to: e.to,
@@ -10251,7 +10257,7 @@ function th(e, t) {
10251
10257
  for (let e of c.kinds) {
10252
10258
  let t = u(e), n = b.get(e);
10253
10259
  if (n === void 0) continue;
10254
- let r = x.has(e) ? `${e} (same colour as ${x.get(e).join(", ")})` : e, i = (n.activity ? 22 : 0) + (n.milestone ? 16 : 0) + r.length * Qe + 18;
10260
+ let r = x.has(e) ? `${e} (same colour as ${x.get(e).join(", ")})` : e, i = (n.activity ? 22 : 0) + (n.milestone ? 16 : 0) + r.length * $e + 18;
10255
10261
  C > 0 && C + i > ee && (C = 0, w += 1);
10256
10262
  let a = w * Jm, o = [], s = C;
10257
10263
  n.activity && (o.push({
@@ -10298,7 +10304,7 @@ function th(e, t) {
10298
10304
  text: e.label
10299
10305
  }))];
10300
10306
  if (T.length > 0 && (C > 0 && (C = 0, w += 1), T.forEach((e, t) => {
10301
- let n = 22 + e.text.length * Qe + 18;
10307
+ let n = 22 + e.text.length * $e + 18;
10302
10308
  C > 0 && C + n > ee && (C = 0, w += 1);
10303
10309
  let r = w * Jm, i = e.kind === void 0 ? e.line ? "#3f3f46" : "#a1a1aa" : u(e.kind).stroke;
10304
10310
  S.push({
@@ -10351,7 +10357,7 @@ function th(e, t) {
10351
10357
  fontSize: 10,
10352
10358
  fill: dp,
10353
10359
  fontFamily: Cp
10354
- }], r = 22 + (`previous dates (${n.comparedTo.label})`.length + 3) * Qe;
10360
+ }], r = 22 + (`previous dates (${n.comparedTo.label})`.length + 3) * $e;
10355
10361
  t.push({
10356
10362
  shape: "text",
10357
10363
  x: r,
@@ -10363,7 +10369,7 @@ function th(e, t) {
10363
10369
  fontFamily: Cp
10364
10370
  }, {
10365
10371
  shape: "text",
10366
- x: r + 5 * Qe,
10372
+ x: r + 5 * $e,
10367
10373
  y: e + 12,
10368
10374
  text: ": added since",
10369
10375
  fontSize: 10,
@@ -10371,7 +10377,7 @@ function th(e, t) {
10371
10377
  fontFamily: Cp
10372
10378
  }, {
10373
10379
  shape: "text",
10374
- x: r + 20 * Qe,
10380
+ x: r + 20 * $e,
10375
10381
  y: e + 12,
10376
10382
  text: "removed",
10377
10383
  fontSize: 10,
@@ -10380,7 +10386,7 @@ function th(e, t) {
10380
10386
  textDecoration: "line-through"
10381
10387
  }, {
10382
10388
  shape: "text",
10383
- x: r + 28 * Qe,
10389
+ x: r + 28 * $e,
10384
10390
  y: e + 12,
10385
10391
  text: ": dropped since",
10386
10392
  fontSize: 10,
@@ -10466,7 +10472,7 @@ function ih(e, t) {
10466
10472
  shape: "text",
10467
10473
  x: a,
10468
10474
  y: t,
10469
- text: `Compared with ${r.label}${r.date ? ` (${Qm(ft(r.date) ?? 0)})` : ""}`,
10475
+ text: `Compared with ${r.label}${r.date ? ` (${Qm(pt(r.date) ?? 0)})` : ""}`,
10470
10476
  fontSize: 11,
10471
10477
  fill: dp,
10472
10478
  fontFamily: Cp
@@ -10526,26 +10532,30 @@ function hh(e) {
10526
10532
  1,
10527
10533
  3,
10528
10534
  5
10529
- ].map((t) => e.slice(t, t + 2))).map((e) => Number.parseInt(e, 16) / 255), a = lh(n, r, i), o = ah + .73 * (1 - Math.min(1, Math.max(0, a.l))) ** oh, s = 1, c = uh({
10535
+ ].map((t) => e.slice(t, t + 2))).map((e) => Number.parseInt(e, 16) / 255), a = lh(n, r, i), o = ah + .73 * (1 - Math.min(1, Math.max(0, a.l))) ** oh, s = uh({
10530
10536
  l: o,
10531
10537
  a: a.a,
10532
10538
  b: a.b
10533
10539
  });
10534
- if (!dh(c)) {
10540
+ if (!dh(s)) {
10535
10541
  let e = 0, t = 1;
10536
- for (let n = 0; n < 20; n++) s = (e + t) / 2, dh(uh({
10537
- l: o,
10538
- a: a.a * s,
10539
- b: a.b * s
10540
- })) ? e = s : t = s;
10541
- s = e, c = uh({
10542
+ for (let n = 0; n < 20; n++) {
10543
+ let n = (e + t) / 2;
10544
+ dh(uh({
10545
+ l: o,
10546
+ a: a.a * n,
10547
+ b: a.b * n
10548
+ })) ? e = n : t = n;
10549
+ }
10550
+ let n = e;
10551
+ s = uh({
10542
10552
  l: o,
10543
- a: a.a * s,
10544
- b: a.b * s
10553
+ a: a.a * n,
10554
+ b: a.b * n
10545
10555
  });
10546
10556
  }
10547
- let l = fh(c);
10548
- return mh.set(e, l), l;
10557
+ let c = fh(s);
10558
+ return mh.set(e, c), c;
10549
10559
  }
10550
10560
  function gh(e) {
10551
10561
  if (e !== void 0 && ph.test(e)) return `light-dark(${e}, ${hh(e)})`;
@@ -10712,7 +10722,7 @@ function Eh(e) {
10712
10722
  return e.type === "activity" ? `${e.start} to ${e.end}` : e.date;
10713
10723
  }
10714
10724
  function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i, onSelect: a, saveFigure: o, exportRef: s }) {
10715
- let c = t ?? mt(), [l, u] = O(() => Th(e)), d = r ?? l, f = i ?? u, p = (e) => (t) => f((n) => ({
10725
+ let c = t ?? ht(), [l, u] = O(() => Th(e)), d = r ?? l, f = i ?? u, p = (e) => (t) => f((n) => ({
10716
10726
  ...n,
10717
10727
  [e]: typeof t == "function" ? t(n[e]) : t
10718
10728
  })), m = e.comparedTo !== void 0, { comparison: h, onlyChanged: g, compact: _, showDependencies: v, scale: y } = d, b = p("comparison"), x = p("onlyChanged"), S = ae(() => m && h === "new" ? Rm(e) : e, [
@@ -10730,8 +10740,8 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10730
10740
  cancelAnimationFrame(t), n.disconnect();
10731
10741
  };
10732
10742
  }, []);
10733
- let le = (ft(S.time.end) ?? 0) - (ft(S.time.start) ?? 0) + 1, ue = se > 0 ? se / le : 0, de = y === "fit" ? { pxPerDay: Math.max(Gm, ue) } : {
10734
- pxPerDay: Math.max(Dt[y], ue),
10743
+ let le = (pt(S.time.end) ?? 0) - (pt(S.time.start) ?? 0) + 1, ue = se > 0 ? se / le : 0, de = y === "fit" ? { pxPerDay: Math.max(Gm, ue) } : {
10744
+ pxPerDay: Math.max(Ot[y], ue),
10735
10745
  unit: y
10736
10746
  }, [fe, pe] = O(void 0), me = ae(() => th(S, {
10737
10747
  today: c,
@@ -10755,12 +10765,12 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10755
10765
  C,
10756
10766
  y,
10757
10767
  se
10758
- ]), M = me.layout, he = me.tints, ge = ae(() => {
10768
+ ]), he = me.layout, ge = me.tints, _e = ae(() => {
10759
10769
  let e = !1;
10760
10770
  for (let t of S.rows) if (t.type === "separator") e = !0;
10761
10771
  else if (e) return !0;
10762
10772
  return !1;
10763
- }, [S]), _e = ae(() => xp(M.kinds, he), [M.kinds, he]), ve = ae(() => Wt(S), [S]), ye = ae(() => {
10773
+ }, [S]), ve = ae(() => xp(he.kinds, ge), [he.kinds, ge]), ye = ae(() => Gt(S), [S]), be = ae(() => {
10764
10774
  let e = /* @__PURE__ */ new Map();
10765
10775
  for (let t of S.rows) if (t.type === "task") for (let n of t.items) {
10766
10776
  if (n.kind === void 0) continue;
@@ -10771,25 +10781,25 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10771
10781
  t[n.type] = !0, e.set(n.kind, t);
10772
10782
  }
10773
10783
  return e;
10774
- }, [S]), be = (e) => e === void 0 ? Sh : he.get(e) ?? Sh, xe = (e, t) => e !== void 0 && e.type === t.type && e.row === t.row && (e.type === "task" || t.type === "item" && e.item === t.item), Se = (e) => {
10775
- let t = xe(T, e);
10776
- if (te((t) => xe(t, e) ? void 0 : e), !a) return;
10784
+ }, [S]), xe = (e) => e === void 0 ? Sh : ge.get(e) ?? Sh, Se = (e, t) => e !== void 0 && e.type === t.type && e.row === t.row && (e.type === "task" || t.type === "item" && e.item === t.item), Ce = (e) => {
10785
+ let t = Se(T, e);
10786
+ if (te((t) => Se(t, e) ? void 0 : e), !a) return;
10777
10787
  let n = S.rows[e.row];
10778
10788
  if (t || n?.type !== "task") return a(void 0);
10779
10789
  a(e.type === "item" ? {
10780
10790
  task: n,
10781
10791
  item: n.items[e.item]
10782
10792
  } : { task: n });
10783
- }, Ce = (e, t) => {
10784
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Se(t));
10785
- }, we = (e) => {
10793
+ }, we = (e, t) => {
10794
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Ce(t));
10795
+ }, Te = (e) => {
10786
10796
  let t = e.data?.row, n = e.data?.item;
10787
10797
  if (e.testId !== "timeline-activity" && e.testId !== "timeline-milestone" || t === void 0 || n === void 0) return {};
10788
10798
  let r = {
10789
10799
  type: "item",
10790
10800
  row: Number(t),
10791
10801
  item: Number(n)
10792
- }, i = `${t}:${n}`, a = M.items.find((e) => e.row === r.row && e.item === r.item);
10802
+ }, i = `${t}:${n}`, a = he.items.find((e) => e.row === r.row && e.item === r.item);
10793
10803
  return {
10794
10804
  extra: {
10795
10805
  role: "button",
@@ -10800,8 +10810,8 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10800
10810
  cursor: "pointer",
10801
10811
  outline: "none"
10802
10812
  },
10803
- onClick: () => Se(r),
10804
- onKeyDown: (e) => Ce(e, r),
10813
+ onClick: () => Ce(r),
10814
+ onKeyDown: (e) => we(e, r),
10805
10815
  onFocus: () => pe(i),
10806
10816
  onBlur: () => pe((e) => e === i ? void 0 : e)
10807
10817
  },
@@ -10826,7 +10836,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10826
10836
  style: _h({ stroke: xh })
10827
10837
  })] })
10828
10838
  };
10829
- }, [Te, Ee] = O(null), De = () => Ap(ih(S, {
10839
+ }, [Ee, De] = O(null), Oe = () => Ap(ih(S, {
10830
10840
  today: c,
10831
10841
  compact: _,
10832
10842
  showDependencies: v,
@@ -10834,34 +10844,34 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10834
10844
  appearance: n ?? null,
10835
10845
  referenceLine: "dated",
10836
10846
  ...de
10837
- })), Oe = `timeline-${Ch(S.title ?? "plan") || "plan"}.svg`, ke = async () => {
10847
+ })), ke = `timeline-${Ch(S.title ?? "plan") || "plan"}.svg`, Ae = async () => {
10838
10848
  if (o) {
10839
- let e = await o(Oe, De()).catch(() => !1);
10840
- Ee(e === !1 ? "could not save" : e);
10849
+ let e = await o(ke, Oe()).catch(() => !1);
10850
+ De(e === !1 ? "could not save" : e);
10841
10851
  } else {
10842
- let e = URL.createObjectURL(new Blob([De()], { type: "image/svg+xml" })), t = document.createElement("a");
10843
- t.href = e, t.download = Oe, t.click(), URL.revokeObjectURL(e), Ee("SVG downloaded");
10852
+ let e = URL.createObjectURL(new Blob([Oe()], { type: "image/svg+xml" })), t = document.createElement("a");
10853
+ t.href = e, t.download = ke, t.click(), URL.revokeObjectURL(e), De("SVG downloaded");
10844
10854
  }
10845
- window.setTimeout(() => Ee(null), 2500);
10855
+ window.setTimeout(() => De(null), 2500);
10846
10856
  };
10847
- re(s, () => ({ svg: () => void ke() }));
10848
- let Ae = async () => {
10849
- Ee(await gn(De()) ? "SVG markup copied" : "could not copy"), window.setTimeout(() => Ee(null), 2500);
10857
+ re(s, () => ({ svg: () => void Ae() }));
10858
+ let je = async () => {
10859
+ De(await _n(Oe()) ? "SVG markup copied" : "could not copy"), window.setTimeout(() => De(null), 2500);
10850
10860
  };
10851
10861
  E(() => {
10852
10862
  let e = oe.current;
10853
10863
  if (e === null) return;
10854
- let t = Bt(M, e.clientWidth);
10864
+ let t = Vt(he, e.clientWidth);
10855
10865
  t !== void 0 && (e.scrollLeft = t);
10856
10866
  }, []);
10857
- let je = D(void 0), Me = (e) => {
10867
+ let Me = D(void 0), Ne = (e) => {
10858
10868
  let t = oe.current;
10859
- t !== null && (je.current = M.start + (t.scrollLeft + t.clientWidth / 2) / me.pxPerDay), ne(e);
10869
+ t !== null && (Me.current = he.start + (t.scrollLeft + t.clientWidth / 2) / me.pxPerDay), ne(e);
10860
10870
  };
10861
10871
  return ie(() => {
10862
- let e = oe.current, t = je.current;
10863
- je.current = void 0, e !== null && t !== void 0 && (e.scrollLeft = Math.max(0, (t - M.start) * me.pxPerDay - e.clientWidth / 2));
10864
- }, [me.pxPerDay, M.start]), /* @__PURE__ */ j("div", {
10872
+ let e = oe.current, t = Me.current;
10873
+ Me.current = void 0, e !== null && t !== void 0 && (e.scrollLeft = Math.max(0, (t - he.start) * me.pxPerDay - e.clientWidth / 2));
10874
+ }, [me.pxPerDay, he.start]), /* @__PURE__ */ j("div", {
10865
10875
  "data-testid": "timeline",
10866
10876
  className: "w-full min-w-0 rounded border border-zinc-200 bg-white text-zinc-800 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",
10867
10877
  onKeyDown: (e) => {
@@ -10889,9 +10899,9 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10889
10899
  className: "flex",
10890
10900
  children: [/* @__PURE__ */ j("div", {
10891
10901
  className: "shrink-0 border-r border-zinc-200 text-xs dark:border-zinc-700",
10892
- style: { width: ve },
10902
+ style: { width: ye },
10893
10903
  "data-testid": "timeline-labels",
10894
- children: [/* @__PURE__ */ A("div", { style: { height: 58 } }), M.rows.map((e) => e.type === "section" ? /* @__PURE__ */ j("div", {
10904
+ children: [/* @__PURE__ */ A("div", { style: { height: 58 } }), he.rows.map((e) => e.type === "section" ? /* @__PURE__ */ j("div", {
10895
10905
  "data-testid": "timeline-section-label",
10896
10906
  className: "flex items-center border-t border-zinc-400 px-2 font-semibold text-zinc-600 dark:border-zinc-600 dark:text-zinc-300",
10897
10907
  style: { height: e.height },
@@ -10919,7 +10929,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10919
10929
  className: "block w-full truncate border-t border-zinc-100 px-2 text-left hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-800 " + (T?.type === "task" && T.row === e.row ? "bg-blue-50 font-medium dark:bg-blue-950/50" : ""),
10920
10930
  style: { height: e.height },
10921
10931
  title: `${e.label} (${e.id})`,
10922
- onClick: () => Se({
10932
+ onClick: () => Ce({
10923
10933
  type: "task",
10924
10934
  row: e.row
10925
10935
  }),
@@ -10930,7 +10940,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10930
10940
  className: "min-w-0 flex-1 overflow-x-auto",
10931
10941
  "data-testid": "timeline-scroller",
10932
10942
  children: [/* @__PURE__ */ A("svg", {
10933
- width: M.width,
10943
+ width: he.width,
10934
10944
  height: 58,
10935
10945
  role: "img",
10936
10946
  "aria-label": `Calendar from ${S.time.start} to ${S.time.end}`,
@@ -10939,8 +10949,8 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10939
10949
  style: { display: "block" },
10940
10950
  children: me.header.map((e) => /* @__PURE__ */ A(yh, { group: e }, e.id))
10941
10951
  }), /* @__PURE__ */ j("svg", {
10942
- width: M.width,
10943
- height: M.height,
10952
+ width: he.width,
10953
+ height: he.height,
10944
10954
  role: "group",
10945
10955
  "aria-label": `Tasks and items${S.title ? ` of ${S.title}` : ""}`,
10946
10956
  "data-testid": "timeline-body",
@@ -10948,7 +10958,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10948
10958
  style: { display: "block" },
10949
10959
  children: [/* @__PURE__ */ A(bh, { markers: me.markers }), me.rows.map((e) => /* @__PURE__ */ A(yh, {
10950
10960
  group: e,
10951
- interaction: we
10961
+ interaction: Te
10952
10962
  }, e.id))]
10953
10963
  })]
10954
10964
  })]
@@ -10971,7 +10981,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10971
10981
  "data-scale": e,
10972
10982
  "aria-pressed": y === e,
10973
10983
  className: y === e ? "font-semibold text-zinc-800 dark:text-zinc-100" : "text-zinc-600 underline dark:text-zinc-300",
10974
- onClick: () => Me(e),
10984
+ onClick: () => Ne(e),
10975
10985
  children: e
10976
10986
  })]
10977
10987
  }, e))
@@ -10996,17 +11006,17 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
10996
11006
  },
10997
11007
  children: g ? "show every task" : "only what moved"
10998
11008
  }),
10999
- C && M.hiddenTasks > 0 && /* @__PURE__ */ j("span", {
11009
+ C && he.hiddenTasks > 0 && /* @__PURE__ */ j("span", {
11000
11010
  className: "text-amber-700 dark:text-amber-400",
11001
11011
  "data-testid": "timeline-unchanged-hidden",
11002
11012
  children: [
11003
- M.hiddenTasks,
11013
+ he.hiddenTasks,
11004
11014
  " unchanged ",
11005
- M.hiddenTasks === 1 ? "task" : "tasks",
11015
+ he.hiddenTasks === 1 ? "task" : "tasks",
11006
11016
  " hidden"
11007
11017
  ]
11008
11018
  }),
11009
- ge && /* @__PURE__ */ A("button", {
11019
+ _e && /* @__PURE__ */ A("button", {
11010
11020
  type: "button",
11011
11021
  "data-testid": "timeline-compact-toggle",
11012
11022
  "aria-pressed": _,
@@ -11028,31 +11038,31 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
11028
11038
  className: "text-amber-700 dark:text-amber-400",
11029
11039
  "data-testid": "timeline-dependencies-hidden",
11030
11040
  children: [
11031
- M.dependencies.length,
11041
+ he.dependencies.length,
11032
11042
  " ",
11033
- M.dependencies.length === 1 ? "dependency" : "dependencies",
11043
+ he.dependencies.length === 1 ? "dependency" : "dependencies",
11034
11044
  " hidden",
11035
- M.dependencies.some((e) => !e.satisfied) ? ", some not satisfied by the dates" : ""
11045
+ he.dependencies.some((e) => !e.satisfied) ? ", some not satisfied by the dates" : ""
11036
11046
  ]
11037
11047
  }),
11038
11048
  /* @__PURE__ */ A("button", {
11039
11049
  type: "button",
11040
11050
  "data-testid": "timeline-download-svg",
11041
11051
  className: "text-zinc-600 underline dark:text-zinc-300",
11042
- onClick: () => void ke(),
11052
+ onClick: () => void Ae(),
11043
11053
  children: "⤓ download SVG"
11044
11054
  }),
11045
11055
  /* @__PURE__ */ A("button", {
11046
11056
  type: "button",
11047
11057
  "data-testid": "timeline-copy-svg",
11048
11058
  className: "text-zinc-600 underline dark:text-zinc-300",
11049
- onClick: () => void Ae(),
11059
+ onClick: () => void je(),
11050
11060
  children: "copy markup"
11051
11061
  }),
11052
- Te !== null && /* @__PURE__ */ A("span", {
11062
+ Ee !== null && /* @__PURE__ */ A("span", {
11053
11063
  role: "status",
11054
11064
  className: "text-emerald-700 dark:text-emerald-400",
11055
- children: Te
11065
+ children: Ee
11056
11066
  })
11057
11067
  ]
11058
11068
  }),
@@ -11086,10 +11096,10 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
11086
11096
  }), ": dropped since"] })
11087
11097
  ]
11088
11098
  }),
11089
- (M.periods.length > 0 || M.references.length > 0) && /* @__PURE__ */ j("ul", {
11099
+ (he.periods.length > 0 || he.references.length > 0) && /* @__PURE__ */ j("ul", {
11090
11100
  className: "flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs text-zinc-600 dark:border-zinc-700 dark:text-zinc-300",
11091
11101
  "data-testid": "timeline-calendar-legend",
11092
- children: [M.periods.map((e) => {
11102
+ children: [he.periods.map((e) => {
11093
11103
  let t = S.periods[e.index];
11094
11104
  return /* @__PURE__ */ j("li", {
11095
11105
  className: "flex items-center gap-1",
@@ -11099,27 +11109,27 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
11099
11109
  "aria-hidden": "true",
11100
11110
  className: "inline-block h-2.5 w-4 rounded-sm",
11101
11111
  style: {
11102
- background: gh(e.kind === void 0 ? "#a1a1aa" : be(e.kind).stroke),
11112
+ background: gh(e.kind === void 0 ? "#a1a1aa" : xe(e.kind).stroke),
11103
11113
  opacity: .35
11104
11114
  }
11105
11115
  }), t.label ?? "Period"]
11106
11116
  }, `p${e.index}`);
11107
- }), M.references.map((e) => /* @__PURE__ */ j("li", {
11117
+ }), he.references.map((e) => /* @__PURE__ */ j("li", {
11108
11118
  className: "flex items-center gap-1",
11109
11119
  "data-reference": e.index,
11110
11120
  title: `${e.label}: ${S.references[e.index].date}`,
11111
11121
  children: [/* @__PURE__ */ A("span", {
11112
11122
  "aria-hidden": "true",
11113
11123
  className: "inline-block h-3 border-l-2 border-dashed",
11114
- style: { borderColor: gh(e.kind === void 0 ? "#3f3f46" : be(e.kind).stroke) }
11124
+ style: { borderColor: gh(e.kind === void 0 ? "#3f3f46" : xe(e.kind).stroke) }
11115
11125
  }), e.label]
11116
11126
  }, `r${e.index}`))]
11117
11127
  }),
11118
- M.kinds.some((e) => ye.has(e)) && /* @__PURE__ */ A("ul", {
11128
+ he.kinds.some((e) => be.has(e)) && /* @__PURE__ */ A("ul", {
11119
11129
  className: "flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs dark:border-zinc-700",
11120
11130
  "data-testid": "timeline-legend",
11121
- children: M.kinds.filter((e) => ye.has(e)).map((e) => {
11122
- let t = be(e);
11131
+ children: he.kinds.filter((e) => be.has(e)).map((e) => {
11132
+ let t = xe(e);
11123
11133
  return /* @__PURE__ */ j("li", {
11124
11134
  className: "flex items-center gap-1",
11125
11135
  "data-kind": e,
@@ -11128,7 +11138,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
11128
11138
  title: `${e} — project colour`
11129
11139
  } : {},
11130
11140
  children: [
11131
- ye.get(e)?.activity && /* @__PURE__ */ j("svg", {
11141
+ be.get(e)?.activity && /* @__PURE__ */ j("svg", {
11132
11142
  width: 18,
11133
11143
  height: 12,
11134
11144
  "aria-hidden": "true",
@@ -11157,7 +11167,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
11157
11167
  style: _h({ stroke: e.stroke })
11158
11168
  }, t) : null)]
11159
11169
  }),
11160
- ye.get(e)?.milestone && /* @__PURE__ */ A("svg", {
11170
+ be.get(e)?.milestone && /* @__PURE__ */ A("svg", {
11161
11171
  width: 14,
11162
11172
  height: 14,
11163
11173
  "aria-hidden": "true",
@@ -11176,12 +11186,12 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
11176
11186
  className: "sr-only",
11177
11187
  children: " (project colour)"
11178
11188
  }),
11179
- _e.has(e) && /* @__PURE__ */ j("span", {
11189
+ ve.has(e) && /* @__PURE__ */ j("span", {
11180
11190
  className: "text-zinc-500 dark:text-zinc-400",
11181
11191
  "data-testid": "timeline-legend-shared",
11182
11192
  children: [
11183
11193
  "(same colour as ",
11184
- _e.get(e).join(", "),
11194
+ ve.get(e).join(", "),
11185
11195
  ")"
11186
11196
  ]
11187
11197
  })
@@ -11192,7 +11202,7 @@ function Dh({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
11192
11202
  T !== void 0 && /* @__PURE__ */ A(Oh, {
11193
11203
  data: S,
11194
11204
  selection: T,
11195
- dependencies: M.dependencies
11205
+ dependencies: he.dependencies
11196
11206
  })
11197
11207
  ]
11198
11208
  });
@@ -11204,7 +11214,7 @@ function Oh({ data: e, selection: t, dependencies: n }) {
11204
11214
  "data-satisfied": String(t.satisfied),
11205
11215
  className: t.satisfied ? "" : "text-red-700",
11206
11216
  children: [
11207
- Gt(e, n),
11217
+ Kt(e, n),
11208
11218
  " — ",
11209
11219
  t.type,
11210
11220
  t.satisfied ? "" : " — not satisfied by the dates"
@@ -11569,17 +11579,17 @@ function Vh({ item: e, traces: t, dispatch: n }) {
11569
11579
  ...e.attributes.map(([e, t]) => [
11570
11580
  "attribute",
11571
11581
  e,
11572
- st(t)
11582
+ ct(t)
11573
11583
  ]),
11574
11584
  ...e.expectations.map(([e, t]) => [
11575
11585
  "expects",
11576
11586
  e,
11577
- st(t)
11587
+ ct(t)
11578
11588
  ]),
11579
11589
  ...e.assignments.map(([e, t]) => [
11580
11590
  "assigns",
11581
11591
  e,
11582
- st(t)
11592
+ ct(t)
11583
11593
  ]),
11584
11594
  ...e.removedAttributes.map((e) => [
11585
11595
  "removes",
@@ -11639,7 +11649,7 @@ function Vh({ item: e, traces: t, dispatch: n }) {
11639
11649
  className: "col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300",
11640
11650
  children: /* @__PURE__ */ A(Bh, {
11641
11651
  uri: e.uri,
11642
- text: ct(e),
11652
+ text: lt(e),
11643
11653
  dispatch: n
11644
11654
  })
11645
11655
  })] }, `location-${t}`)),
@@ -11651,7 +11661,7 @@ function Vh({ item: e, traces: t, dispatch: n }) {
11651
11661
  className: "col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300",
11652
11662
  children: /* @__PURE__ */ A(Bh, {
11653
11663
  uri: e.uri,
11654
- text: lt(e),
11664
+ text: ut(e),
11655
11665
  dispatch: n,
11656
11666
  sha256: e.sha256
11657
11667
  })
@@ -11744,7 +11754,7 @@ function Hh({ data: e, hidden: t, setHidden: n, rows: r, traces: i = [], dispatc
11744
11754
  }, t))
11745
11755
  }) }),
11746
11756
  /* @__PURE__ */ A("tbody", { children: _.map(({ row: t, index: n }, i) => {
11747
- let { cells: o, heading: s } = Pe(t), c = r?.[n], l = c?.role ?? fl(t, m), u = c?.id === void 0 ? [] : v.get(c.id) ?? [];
11757
+ let { cells: o, heading: s } = Fe(t), c = r?.[n], l = c?.role ?? fl(t, m), u = c?.id === void 0 ? [] : v.get(c.id) ?? [];
11748
11758
  if (s !== void 0) {
11749
11759
  let t = Math.min(Math.max(c?.depth ?? 1, 1), 6);
11750
11760
  return /* @__PURE__ */ A("tr", {
@@ -11797,7 +11807,7 @@ function Wh(e, t = " ") {
11797
11807
  let n = [], r = (e, r) => {
11798
11808
  for (let i of r) n.push(`${t}${e}: ${i}`);
11799
11809
  };
11800
- return r("attribute", e.attributes.map(([e, t]) => ot(e, t))), r("expects", e.expectations.map(([e, t]) => ot(e, t))), r("asks to set", e.assignments.map(([e, t]) => ot(e, t))), r("asks to unset", e.removedAttributes), r("at", e.locations.map((e) => ct(e))), r("artifact", e.artifacts.map((e) => lt(e))), n;
11810
+ return r("attribute", e.attributes.map(([e, t]) => st(e, t))), r("expects", e.expectations.map(([e, t]) => st(e, t))), r("asks to set", e.assignments.map(([e, t]) => st(e, t))), r("asks to unset", e.removedAttributes), r("at", e.locations.map((e) => lt(e))), r("artifact", e.artifacts.map((e) => ut(e))), n;
11801
11811
  }
11802
11812
  function Gh(e) {
11803
11813
  let t = e.profile === void 0 ? "" : ` "${e.profile}"`;
@@ -11812,8 +11822,8 @@ function Kh(e, t, n = Nl, r) {
11812
11822
  let e = i.target.revision === void 0 ? "" : `, prepared against ${i.target.revision}`;
11813
11823
  a.push(`Proposes changes to ${i.target.ref}${e}`), a.push("Expectations below are the producer's; the receiving authority checks them before applying.");
11814
11824
  }
11815
- for (let e of i.artifacts) a.push(`Artifact — ${lt(e)}`);
11816
- if (a.length > 0 && a.push(""), e.kind === "timeline") return a.push(...qt(e.data)), a.join("\n");
11825
+ for (let e of i.artifacts) a.push(`Artifact — ${ut(e)}`);
11826
+ if (a.length > 0 && a.push(""), e.kind === "timeline") return a.push(...Jt(e.data)), a.join("\n");
11817
11827
  if (i.columns !== void 0 && i.rows !== void 0) {
11818
11828
  let e = (e) => e !== void 0 && n.has(Ml("role", e)), t = i.rows.filter((t) => e(t.role));
11819
11829
  t.length > 0 && (a.push(`Filtered view — ${t.length} of ${i.rows.length} rows hidden (${[...new Set(t.map((e) => ll[e.role]))].join(", ")}).`), a.push("")), a.push(i.columns.join(" | "));
@@ -11825,7 +11835,7 @@ function Kh(e, t, n = Nl, r) {
11825
11835
  }
11826
11836
  let n = t.cells.map((e) => e === null ? "" : String(e)).join(" | "), r = t.kind === void 0 ? "" : ` [${t.kind}]`;
11827
11837
  a.push(`${n}${r}${t.role === void 0 ? "" : ` (${ll[t.role]})`}`);
11828
- for (let e of t.changes) a.push(` ${at(e)}`);
11838
+ for (let e of t.changes) a.push(` ${ot(e)}`);
11829
11839
  a.push(...Wh(t));
11830
11840
  }
11831
11841
  if (i.traces.length > 0) {
@@ -11855,7 +11865,7 @@ function Kh(e, t, n = Nl, r) {
11855
11865
  t.kind === void 0 ? "" : ` [${t.kind}]`,
11856
11866
  n === void 0 ? "" : ` in ${n}`,
11857
11867
  t.role === "unchanged" ? "" : ` (${cl[t.role]})`,
11858
- t.changes.length === 0 ? "" : ` — ${t.changes.map(at).join(", ")}`
11868
+ t.changes.length === 0 ? "" : ` — ${t.changes.map(ot).join(", ")}`
11859
11869
  ].join("")), a.push(...Wh(t));
11860
11870
  }
11861
11871
  i.links.length > 0 && a.push(""), i.links.forEach((e, t) => {
@@ -11865,7 +11875,7 @@ function Kh(e, t, n = Nl, r) {
11865
11875
  `${e.fromLabel} ${r} ${e.toLabel}`,
11866
11876
  e.isLoop ? " (to itself)" : "",
11867
11877
  e.role === "unchanged" ? "" : ` (${cl[e.role]})`,
11868
- e.changes.length === 0 ? "" : ` — ${e.changes.map(at).join(", ")}`
11878
+ e.changes.length === 0 ? "" : ` — ${e.changes.map(ot).join(", ")}`
11869
11879
  ].join("")), a.push(...Wh(e));
11870
11880
  });
11871
11881
  }
@@ -11892,7 +11902,7 @@ function qh(e, t) {
11892
11902
  ].filter((e) => e !== void 0 && e !== "");
11893
11903
  return c.length === 0 ? e.ref : `${c.join(" ")} (${e.ref})`;
11894
11904
  }
11895
- var Jh = xe;
11905
+ var Jh = Se;
11896
11906
  function Yh(e) {
11897
11907
  let t = e.target;
11898
11908
  if (typeof t != "object" || !t) return;
@@ -11925,7 +11935,7 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
11925
11935
  e = !1, n();
11926
11936
  };
11927
11937
  }, [ue, S]);
11928
- let [fe, me] = O(Nl), [M, he] = O(void 0), [ge, _e] = O(void 0), [ve, ye] = O(void 0), be = D(null), Ce = ae(() => Ol(e), [e]), we = e.target !== void 0, Te = e.removals ?? [], Ee = ae(() => El(e, we), [e, we]), De = ae(() => e.kind === "graph" ? Zp(e.data, fe) : "landscape", [e, fe]), Oe = ge ?? "", ke = C.views[Oe], Ae = M ?? ke?.orientation ?? De, je = ke !== void 0 && (ke.orientation === void 0 || ke.orientation === Ae) ? ke : void 0, Me = (e, t = Oe) => {
11938
+ let [fe, me] = O(Nl), [he, ge] = O(void 0), [_e, ve] = O(void 0), [ye, be] = O(void 0), xe = D(null), we = ae(() => Ol(e), [e]), Te = e.target !== void 0, Ee = e.removals ?? [], De = ae(() => El(e, Te), [e, Te]), Oe = ae(() => e.kind === "graph" ? Zp(e.data, fe) : "landscape", [e, fe]), ke = _e ?? "", Ae = C.views[ke], je = he ?? Ae?.orientation ?? Oe, Me = Ae !== void 0 && (Ae.orientation === void 0 || Ae.orientation === je) ? Ae : void 0, Ne = (e, t = ke) => {
11929
11939
  ee.current += 1;
11930
11940
  let n = { ...C.views };
11931
11941
  e === void 0 ? delete n[t] : n[t] = e;
@@ -11934,76 +11944,76 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
11934
11944
  views: n
11935
11945
  };
11936
11946
  w(r), o !== void 0 && (T ? le("This arrangement is not kept: the arrangement file beside the document cannot be read, and is left as it is. Fix or remove it to keep moves.") : !o.writable || S?.keepArrangement === void 0 ? le("This arrangement is not kept: the document is outside the writable zone.") : (le(void 0), S.keepArrangement(o.path, fu(r)).then(() => void 0, (e) => le(`This arrangement was not kept: ${e.message}.`))));
11937
- }, Ne = ae(() => e.kind === "graph" && o !== void 0 && je !== void 0 ? om(e.data, {
11947
+ }, Pe = ae(() => e.kind === "graph" && o !== void 0 && Me !== void 0 ? om(e.data, {
11938
11948
  hidden: fe,
11939
- orientation: Ae,
11940
- arrangement: je
11949
+ orientation: je,
11950
+ arrangement: Me
11941
11951
  }) : [], [
11942
11952
  e,
11943
11953
  o,
11944
- je,
11954
+ Me,
11945
11955
  fe,
11946
- Ae
11947
- ]), Pe = ae(() => e.kind === "graph" ? Fl(e) : [], [e]), Fe = Pe.find((e) => e.id === ge), Ie = Fe !== void 0 && !Ll(fe, Il(e.data, Fe)), Le = (t) => {
11948
- let n = Pe.find((e) => e.id === t);
11949
- _e(n?.id), me(n === void 0 ? Nl : Il(e.data, n));
11950
- }, Re = () => {
11951
- he((e) => pe(e ?? Ae));
11952
- }, ze = e.kind === "graph" ? /* @__PURE__ */ A(Nh, {
11956
+ je
11957
+ ]), Fe = ae(() => e.kind === "graph" ? Fl(e) : [], [e]), Ie = Fe.find((e) => e.id === _e), Le = Ie !== void 0 && !Ll(fe, Il(e.data, Ie)), Re = (t) => {
11958
+ let n = Fe.find((e) => e.id === t);
11959
+ ve(n?.id), me(n === void 0 ? Nl : Il(e.data, n));
11960
+ }, ze = () => {
11961
+ ge((e) => pe(e ?? je));
11962
+ }, Be = e.kind === "graph" ? /* @__PURE__ */ A(Nh, {
11953
11963
  data: e.data,
11954
- isProposal: we,
11955
- arrangement: je,
11956
- onArrange: Me,
11964
+ isProposal: Te,
11965
+ arrangement: Me,
11966
+ onArrange: Ne,
11957
11967
  hidden: fe,
11958
11968
  setHidden: me,
11959
- orientation: Ae,
11960
- viewpoint: Fe
11969
+ orientation: je,
11970
+ viewpoint: Ie
11961
11971
  }) : e.kind === "sequence" ? /* @__PURE__ */ A(Ph, {
11962
11972
  data: e.data,
11963
- isProposal: we
11973
+ isProposal: Te
11964
11974
  }) : e.kind === "timeline" ? /* @__PURE__ */ A(Dh, {
11965
11975
  data: e.data,
11966
11976
  appearance: s,
11967
- display: ve ?? Th(e.data),
11968
- onDisplayChange: (t) => ye((n) => t(n ?? Th(e.data))),
11969
- exportRef: be
11977
+ display: ye ?? Th(e.data),
11978
+ onDisplayChange: (t) => be((n) => t(n ?? Th(e.data))),
11979
+ exportRef: xe
11970
11980
  }) : /* @__PURE__ */ A(Hh, {
11971
11981
  data: e.data,
11972
11982
  hidden: fe,
11973
11983
  setHidden: me,
11974
- rows: Ee.rows,
11975
- traces: Ee.traces,
11984
+ rows: De.rows,
11985
+ traces: De.traces,
11976
11986
  dispatch: r
11977
- }), Be = `${e.kind}-${Xh(e) ?? "diagram"}.svg`.replace(/[^\w.-]+/g, "-"), Ve = `${e.kind}-${Xh(e) ?? "data"}`.replace(/[^\w.-]+/g, "-"), He = () => Om(e.data, fe, Ee.rows), Ue = e.kind === "table" ? He().withheld : 0;
11978
- function We(e) {
11987
+ }), Ve = `${e.kind}-${Xh(e) ?? "diagram"}.svg`.replace(/[^\w.-]+/g, "-"), He = `${e.kind}-${Xh(e) ?? "data"}`.replace(/[^\w.-]+/g, "-"), Ue = () => Om(e.data, fe, De.rows), We = e.kind === "table" ? Ue().withheld : 0;
11988
+ function Ge(e) {
11979
11989
  let t = e.cloneNode(!0);
11980
11990
  for (let e of t.querySelectorAll("[data-hit]")) e.remove();
11981
11991
  for (let e of [t, ...t.querySelectorAll("[style]")]) e.style.removeProperty("cursor"), e.style.removeProperty("touch-action"), e.style.removeProperty("fill"), e.style.removeProperty("stroke"), e.getAttribute("style") === "" && e.removeAttribute("style");
11982
11992
  return t;
11983
11993
  }
11984
- function Ge() {
11994
+ function Ke() {
11985
11995
  let e = (x.current ?? b.current)?.querySelector("svg");
11986
- return e ? new XMLSerializer().serializeToString(We(e)) : void 0;
11996
+ return e ? new XMLSerializer().serializeToString(Ge(e)) : void 0;
11987
11997
  }
11988
- re(a, () => e.kind === "timeline" ? { svg: () => be.current?.svg?.() } : e.kind === "graph" || e.kind === "sequence" ? { svg: Ke } : e.kind === "table" ? {
11989
- xlsx: () => void Fm(He(), `${Ve}.xlsx`),
11990
- markdown: () => Nm(e.data, fe, Ee.rows)
11998
+ re(a, () => e.kind === "timeline" ? { svg: () => xe.current?.svg?.() } : e.kind === "graph" || e.kind === "sequence" ? { svg: qe } : e.kind === "table" ? {
11999
+ xlsx: () => void Fm(Ue(), `${He}.xlsx`),
12000
+ markdown: () => Nm(e.data, fe, De.rows)
11991
12001
  } : null);
11992
- function Ke() {
11993
- let e = Ge();
12002
+ function qe() {
12003
+ let e = Ke();
11994
12004
  if (e === void 0) return;
11995
12005
  let t = URL.createObjectURL(new Blob([e], { type: "image/svg+xml" })), n = document.createElement("a");
11996
- n.href = t, n.download = Be, n.click(), URL.revokeObjectURL(t), y("SVG downloaded"), window.setTimeout(() => y(null), 2500);
12006
+ n.href = t, n.download = Ve, n.click(), URL.revokeObjectURL(t), y("SVG downloaded"), window.setTimeout(() => y(null), 2500);
11997
12007
  }
11998
- async function qe() {
11999
- let e = Ge();
12000
- e !== void 0 && (y(await gn(e) ? "SVG markup copied" : "could not copy"), window.setTimeout(() => y(null), 2500));
12008
+ async function Je() {
12009
+ let e = Ke();
12010
+ e !== void 0 && (y(await _n(e) ? "SVG markup copied" : "could not copy"), window.setTimeout(() => y(null), 2500));
12001
12011
  }
12002
12012
  return /* @__PURE__ */ j("div", {
12003
12013
  className: "space-y-3 text-sm",
12004
12014
  "data-testid": "structured-document",
12005
12015
  children: [
12006
- we && /* @__PURE__ */ j("p", {
12016
+ Te && /* @__PURE__ */ j("p", {
12007
12017
  className: "text-xs text-zinc-500",
12008
12018
  "data-testid": "structured-proposal-note",
12009
12019
  children: [
@@ -12019,14 +12029,14 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12019
12029
  ". Anything not mentioned is left as it is; anything shown without a change is here for context."
12020
12030
  ]
12021
12031
  }),
12022
- Ee.profile === void 0 ? null : /* @__PURE__ */ j("p", {
12032
+ De.profile === void 0 ? null : /* @__PURE__ */ j("p", {
12023
12033
  className: "text-xs text-zinc-500",
12024
12034
  "data-testid": "structured-profile",
12025
12035
  children: [
12026
12036
  "Vocabulary: ",
12027
12037
  /* @__PURE__ */ A("span", {
12028
12038
  className: "font-mono",
12029
- children: Ee.profile
12039
+ children: De.profile
12030
12040
  }),
12031
12041
  /* @__PURE__ */ A("span", {
12032
12042
  className: "ml-1 text-zinc-400",
@@ -12040,21 +12050,21 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12040
12050
  "data-state": i.state,
12041
12051
  children: Gh(i)
12042
12052
  }),
12043
- Ee.artifacts.length > 0 && /* @__PURE__ */ A("ul", {
12053
+ De.artifacts.length > 0 && /* @__PURE__ */ A("ul", {
12044
12054
  className: "text-xs text-zinc-500",
12045
12055
  "data-testid": "structured-document-artifacts",
12046
- children: Ee.artifacts.map((e, t) => /* @__PURE__ */ A("li", {
12056
+ children: De.artifacts.map((e, t) => /* @__PURE__ */ A("li", {
12047
12057
  className: "break-all font-mono",
12048
- children: lt(e)
12058
+ children: ut(e)
12049
12059
  }, t))
12050
12060
  }),
12051
- Ee.traces.length > 0 && /* @__PURE__ */ j("p", {
12061
+ De.traces.length > 0 && /* @__PURE__ */ j("p", {
12052
12062
  className: "text-xs text-zinc-500",
12053
12063
  "data-testid": "structured-relation-key",
12054
12064
  children: [
12055
12065
  "Relations:",
12056
12066
  " ",
12057
- [...new Set(Ee.traces.map((e) => e.kind))].map((e, t) => /* @__PURE__ */ j("span", {
12067
+ [...new Set(De.traces.map((e) => e.kind))].map((e, t) => /* @__PURE__ */ j("span", {
12058
12068
  className: "font-mono",
12059
12069
  children: [t > 0 ? ", " : "", e]
12060
12070
  }, e)),
@@ -12064,18 +12074,18 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12064
12074
  })
12065
12075
  ]
12066
12076
  }),
12067
- (fe.size > 0 || Fe !== void 0) && /* @__PURE__ */ j("p", {
12077
+ (fe.size > 0 || Ie !== void 0) && /* @__PURE__ */ j("p", {
12068
12078
  "data-testid": "structured-filtered",
12069
12079
  className: "flex flex-wrap items-center gap-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200",
12070
12080
  children: [
12071
- Fe !== void 0 && /* @__PURE__ */ j("span", {
12081
+ Ie !== void 0 && /* @__PURE__ */ j("span", {
12072
12082
  "data-testid": "structured-viewpoint",
12073
12083
  children: [
12074
12084
  "Viewpoint: ",
12075
- /* @__PURE__ */ A("strong", { children: Fe.label }),
12085
+ /* @__PURE__ */ A("strong", { children: Ie.label }),
12076
12086
  " — ",
12077
- Fe.concern,
12078
- Ie ? " Adjusted with the key." : ""
12087
+ Ie.concern,
12088
+ Le ? " Adjusted with the key." : ""
12079
12089
  ]
12080
12090
  }),
12081
12091
  fe.size > 0 && /* @__PURE__ */ j("span", { children: [
@@ -12083,12 +12093,12 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12083
12093
  [...fe].map((e) => e.replace(/^(element|relationship|role):/, "")).join(", "),
12084
12094
  " hidden.",
12085
12095
  " ",
12086
- we ? "The full proposal still applies." : ""
12096
+ Te ? "The full proposal still applies." : ""
12087
12097
  ] }),
12088
12098
  /* @__PURE__ */ A("button", {
12089
12099
  type: "button",
12090
12100
  className: "underline",
12091
- onClick: () => Le(""),
12101
+ onClick: () => Re(""),
12092
12102
  children: "show everything"
12093
12103
  })
12094
12104
  ]
@@ -12099,32 +12109,32 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12099
12109
  children: ie && e.kind === "graph" ? /* @__PURE__ */ A(Cm, {
12100
12110
  data: e.data,
12101
12111
  hidden: fe,
12102
- orientation: Ae,
12103
- arrangement: je,
12104
- onArrange: (e) => Me(e, se.current),
12112
+ orientation: je,
12113
+ arrangement: Me,
12114
+ onArrange: (e) => Ne(e, se.current),
12105
12115
  onNote: le,
12106
12116
  onDone: () => oe(!1)
12107
- }) : ze
12117
+ }) : Be
12108
12118
  }),
12109
12119
  ce !== void 0 && /* @__PURE__ */ A("p", {
12110
12120
  className: "text-xs text-amber-700 dark:text-amber-300",
12111
12121
  "data-testid": "structured-arrangement-note",
12112
12122
  children: ce
12113
12123
  }),
12114
- Ne.length > 0 && /* @__PURE__ */ j("details", {
12124
+ Pe.length > 0 && /* @__PURE__ */ j("details", {
12115
12125
  className: "text-xs text-zinc-600 dark:text-zinc-400",
12116
12126
  "data-testid": "structured-arrangement-check",
12117
12127
  children: [/* @__PURE__ */ j("summary", {
12118
12128
  className: "cursor-pointer",
12119
12129
  children: [
12120
- Ne.length,
12130
+ Pe.length,
12121
12131
  " ",
12122
- Ne.length === 1 ? "thing" : "things",
12132
+ Pe.length === 1 ? "thing" : "things",
12123
12133
  " to look at in this arrangement"
12124
12134
  ]
12125
12135
  }), /* @__PURE__ */ A("ul", {
12126
12136
  className: "mt-1 list-disc space-y-0.5 pl-5",
12127
- children: Ne.map((e, t) => /* @__PURE__ */ A("li", { children: e.message }, t))
12137
+ children: Pe.map((e, t) => /* @__PURE__ */ A("li", { children: e.message }, t))
12128
12138
  })]
12129
12139
  }),
12130
12140
  /* @__PURE__ */ A(de, {
@@ -12136,13 +12146,13 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12136
12146
  actions: (e.kind === "graph" || e.kind === "sequence") && /* @__PURE__ */ j(k, { children: [
12137
12147
  /* @__PURE__ */ A("button", {
12138
12148
  type: "button",
12139
- onClick: Ke,
12149
+ onClick: qe,
12140
12150
  className: Jh,
12141
12151
  children: "⤓ download SVG"
12142
12152
  }),
12143
12153
  /* @__PURE__ */ A("button", {
12144
12154
  type: "button",
12145
- onClick: qe,
12155
+ onClick: Je,
12146
12156
  className: Jh,
12147
12157
  children: "copy markup"
12148
12158
  }),
@@ -12151,12 +12161,12 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12151
12161
  children: v
12152
12162
  })
12153
12163
  ] }),
12154
- children: ze
12164
+ children: Be
12155
12165
  }),
12156
- Te.length > 0 && /* @__PURE__ */ A("ul", {
12166
+ Ee.length > 0 && /* @__PURE__ */ A("ul", {
12157
12167
  className: "space-y-1",
12158
12168
  "data-testid": "structured-removals",
12159
- children: Te.map((t, n) => /* @__PURE__ */ j("li", {
12169
+ children: Ee.map((t, n) => /* @__PURE__ */ j("li", {
12160
12170
  "data-relationship-role": "removed",
12161
12171
  className: "rounded border border-red-300 bg-red-50 px-2 py-1 text-xs text-red-800 dark:border-red-800 dark:bg-red-950/40 dark:text-red-200",
12162
12172
  children: [
@@ -12177,21 +12187,21 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12177
12187
  }, n))
12178
12188
  }),
12179
12189
  /* @__PURE__ */ j("div", {
12180
- className: Se,
12190
+ className: Ce,
12181
12191
  children: [
12182
- Pe.length > 0 && /* @__PURE__ */ j("label", {
12192
+ Fe.length > 0 && /* @__PURE__ */ j("label", {
12183
12193
  className: "flex items-center gap-1 text-zinc-500",
12184
12194
  children: ["viewpoint", /* @__PURE__ */ j("select", {
12185
12195
  "data-testid": "viewpoint-select",
12186
12196
  className: "rounded border border-zinc-300 bg-white px-1 py-0.5 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300",
12187
- value: Fe?.id ?? "",
12188
- onChange: (e) => Le(e.target.value),
12197
+ value: Ie?.id ?? "",
12198
+ onChange: (e) => Re(e.target.value),
12189
12199
  disabled: ie,
12190
12200
  title: ie ? "Leave the touch-up to switch viewpoint" : void 0,
12191
12201
  children: [/* @__PURE__ */ A("option", {
12192
12202
  value: "",
12193
12203
  children: "Whole document"
12194
- }), Pe.map((e) => /* @__PURE__ */ A("option", {
12204
+ }), Fe.map((e) => /* @__PURE__ */ A("option", {
12195
12205
  value: e.id,
12196
12206
  children: e.label
12197
12207
  }, e.id))]
@@ -12199,7 +12209,7 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12199
12209
  }),
12200
12210
  /* @__PURE__ */ A("button", {
12201
12211
  type: "button",
12202
- className: xe,
12212
+ className: Se,
12203
12213
  "aria-label": `Show ${e.kind} view at full size`,
12204
12214
  onClick: () => l(!0),
12205
12215
  children: "⤢ enlarge"
@@ -12208,18 +12218,18 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12208
12218
  type: "button",
12209
12219
  className: "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50",
12210
12220
  "data-testid": "diagram-orientation",
12211
- title: Ae === "portrait" ? "Turn it across the page — it is drawn down" : "Turn it down the page — it is drawn across",
12212
- "aria-label": `Turn the diagram ${pe(Ae)}`,
12213
- onClick: Re,
12221
+ title: je === "portrait" ? "Turn it across the page — it is drawn down" : "Turn it down the page — it is drawn across",
12222
+ "aria-label": `Turn the diagram ${pe(je)}`,
12223
+ onClick: ze,
12214
12224
  disabled: ie,
12215
- children: Ae === "portrait" ? "↔ landscape" : "↕ portrait"
12225
+ children: je === "portrait" ? "↔ landscape" : "↕ portrait"
12216
12226
  }),
12217
12227
  e.kind === "graph" && o?.writable === !0 && !ie && /* @__PURE__ */ A("button", {
12218
12228
  type: "button",
12219
12229
  className: "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50",
12220
12230
  title: "Move boxes, wire ends, bends and labels in draw.io's touch-up; kept beside the document, which is not changed",
12221
12231
  onClick: () => {
12222
- se.current = Oe, oe(!0);
12232
+ se.current = ke, oe(!0);
12223
12233
  },
12224
12234
  children: "✎ arrange in draw.io"
12225
12235
  }),
@@ -12227,44 +12237,44 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12227
12237
  /* @__PURE__ */ A("button", {
12228
12238
  type: "button",
12229
12239
  className: "text-zinc-500 underline",
12230
- title: Ue === 0 ? "Save as .csv — opens in any spreadsheet" : `Save as .csv — ${Ue} hidden rows are left out`,
12231
- onClick: () => Pm(He(), `${Ve}.csv`),
12240
+ title: We === 0 ? "Save as .csv — opens in any spreadsheet" : `Save as .csv — ${We} hidden rows are left out`,
12241
+ onClick: () => Pm(Ue(), `${He}.csv`),
12232
12242
  children: "⤓ download CSV"
12233
12243
  }),
12234
12244
  /* @__PURE__ */ A("button", {
12235
12245
  type: "button",
12236
12246
  className: "text-zinc-500 underline",
12237
- title: Ue === 0 ? "Save as .xlsx — one sheet, values typed as they are declared" : `Save as .xlsx — ${Ue} hidden rows are left out`,
12238
- onClick: () => void Fm(He(), `${Ve}.xlsx`),
12247
+ title: We === 0 ? "Save as .xlsx — one sheet, values typed as they are declared" : `Save as .xlsx — ${We} hidden rows are left out`,
12248
+ onClick: () => void Fm(Ue(), `${He}.xlsx`),
12239
12249
  children: "⤓ download XLSX"
12240
12250
  }),
12241
12251
  /* @__PURE__ */ A("button", {
12242
12252
  type: "button",
12243
12253
  className: "text-zinc-500 underline",
12244
- title: Ue === 0 ? "Save as .md — each chapter a heading, its rows a table" : `Save as .md — ${Ue} hidden rows are left out`,
12245
- onClick: () => Im(e.data, fe, Ee.rows, `${Ve}.md`),
12254
+ title: We === 0 ? "Save as .md — each chapter a heading, its rows a table" : `Save as .md — ${We} hidden rows are left out`,
12255
+ onClick: () => Im(e.data, fe, De.rows, `${He}.md`),
12246
12256
  children: "⤓ download Markdown"
12247
12257
  }),
12248
- Ue > 0 && /* @__PURE__ */ j("span", {
12258
+ We > 0 && /* @__PURE__ */ j("span", {
12249
12259
  className: "text-xs text-amber-700 dark:text-amber-300",
12250
12260
  "data-testid": "table-export-narrowed",
12251
12261
  children: [
12252
12262
  "exports ",
12253
- Ue,
12263
+ We,
12254
12264
  " rows fewer than the table declares"
12255
12265
  ]
12256
12266
  })
12257
12267
  ] }) : e.kind === "timeline" ? null : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
12258
12268
  type: "button",
12259
- className: xe,
12269
+ className: Se,
12260
12270
  title: "Save as .svg — insert it as a picture in a document",
12261
- onClick: Ke,
12271
+ onClick: qe,
12262
12272
  children: "⤓ download SVG"
12263
12273
  }), /* @__PURE__ */ A("button", {
12264
12274
  type: "button",
12265
12275
  className: "text-zinc-500 underline",
12266
12276
  title: "Copy the SVG markup, for somewhere that takes it directly",
12267
- onClick: () => void qe(),
12277
+ onClick: () => void Je(),
12268
12278
  children: "copy markup"
12269
12279
  })] }),
12270
12280
  /* @__PURE__ */ j("button", {
@@ -12273,7 +12283,7 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12273
12283
  onClick: () => d((e) => !e),
12274
12284
  children: [u ? "hide" : "show", " text equivalent"]
12275
12285
  }),
12276
- Ce !== void 0 && /* @__PURE__ */ j("button", {
12286
+ we !== void 0 && /* @__PURE__ */ j("button", {
12277
12287
  type: "button",
12278
12288
  className: "text-zinc-500 underline",
12279
12289
  onClick: () => p((e) => !e),
@@ -12301,15 +12311,15 @@ function Qh({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
12301
12311
  u && /* @__PURE__ */ A("pre", {
12302
12312
  "data-testid": "structured-text-equivalent",
12303
12313
  className: "overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800",
12304
- children: Kh(e, we, fe, i)
12314
+ children: Kh(e, Te, fe, i)
12305
12315
  }),
12306
- f && Ce !== void 0 && /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
12316
+ f && we !== void 0 && /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
12307
12317
  className: "mb-1 text-[11px] text-zinc-500",
12308
12318
  children: "Derived from the structured data above. It is an export, not the source."
12309
12319
  }), /* @__PURE__ */ A("pre", {
12310
12320
  "data-testid": "structured-derived-export",
12311
12321
  className: "overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800",
12312
- children: Ce
12322
+ children: we
12313
12323
  })] }),
12314
12324
  g && /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
12315
12325
  className: "mb-1 text-[11px] text-zinc-500",
@@ -12363,17 +12373,17 @@ var eg = {
12363
12373
  }
12364
12374
  }, ng = w({});
12365
12375
  function rg(e) {
12366
- let t = Ee(e.children, "json");
12367
- return t === null ? /* @__PURE__ */ A(Oe, { ...e }) : /* @__PURE__ */ A(ig, {
12376
+ let t = De(e.children, "json");
12377
+ return t === null ? /* @__PURE__ */ A(ke, { ...e }) : /* @__PURE__ */ A(ig, {
12368
12378
  code: t,
12369
12379
  pre: e
12370
12380
  });
12371
12381
  }
12372
12382
  function ig({ code: e, pre: t }) {
12373
12383
  let n = te(ng), r = ae(() => Xl(e), [e]);
12374
- if (r.status === "not-a-document") return /* @__PURE__ */ A(Oe, { ...t });
12384
+ if (r.status === "not-a-document") return /* @__PURE__ */ A(ke, { ...t });
12375
12385
  if (r.status === "valid") {
12376
- let t = n[hn(e)];
12386
+ let t = n[gn(e)];
12377
12387
  return /* @__PURE__ */ A(tg, {
12378
12388
  label: "This diagram",
12379
12389
  children: /* @__PURE__ */ A("div", {
@@ -12391,7 +12401,7 @@ function ig({ code: e, pre: t }) {
12391
12401
  "data-testid": "reply-structured-exchange-refused",
12392
12402
  className: "mb-1 text-xs text-amber-700 dark:text-amber-400",
12393
12403
  children: ["This structured-exchange document could not be drawn: ", ag(r)]
12394
- }), /* @__PURE__ */ A(Oe, { ...t })] });
12404
+ }), /* @__PURE__ */ A(ke, { ...t })] });
12395
12405
  }
12396
12406
  function ag(e) {
12397
12407
  if (e.status === "unsupported-version") return `${e.schema} is not a version this application implements.`;
@@ -25532,7 +25542,7 @@ function zk(e, t) {
25532
25542
  }, [n, e]), n;
25533
25543
  }
25534
25544
  function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i, page: a, startTouchUp: o = !1, onEscape: s }) {
25535
- let { serverUrl: c, fileIo: l, onOpenFile: u } = lm(), d = D(null), f = zk(d, n === "reply"), p = Rk(e, t === void 0, f), m = t ?? (p.status === "loaded" ? p.content : null), h = D(null), g = D(null), [_, v] = O(!1), [y, b] = O(null), [x, S] = O(null), [C, w] = O(null), ee = D(null), [te, ne] = O(Nk), [re, ie] = O(!1), oe = D(!1), [se, ce] = O(null), [le, ue] = O(null), fe = (e) => e === "inline" ? h : g, pe = (e) => C === e && ee.current !== null ? ee.current.content : m, me = l !== void 0, M = C !== null && te.dirty, he = ae(() => {
25545
+ let { serverUrl: c, fileIo: l, onOpenFile: u } = lm(), d = D(null), f = zk(d, n === "reply"), p = Rk(e, t === void 0, f), m = t ?? (p.status === "loaded" ? p.content : null), h = D(null), g = D(null), [_, v] = O(!1), [y, b] = O(null), [x, S] = O(null), [C, w] = O(null), ee = D(null), [te, ne] = O(Nk), [re, ie] = O(!1), oe = D(!1), [se, ce] = O(null), [le, ue] = O(null), fe = (e) => e === "inline" ? h : g, pe = (e) => C === e && ee.current !== null ? ee.current.content : m, me = l !== void 0, he = C !== null && te.dirty, ge = ae(() => {
25536
25546
  if (a === void 0 || m === null) return {
25537
25547
  index: 0,
25538
25548
  problem: null
@@ -25548,25 +25558,25 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25548
25558
  problem: e instanceof Error ? e.message : String(e)
25549
25559
  };
25550
25560
  }
25551
- }, [a, m]), ge = D(!1);
25561
+ }, [a, m]), _e = D(!1);
25552
25562
  E(() => {
25553
- o && !ge.current && m !== null && he.problem === null && (ge.current = !0, ve("inline"));
25563
+ o && !_e.current && m !== null && ge.problem === null && (_e.current = !0, ye("inline"));
25554
25564
  });
25555
- let _e = D(null);
25565
+ let ve = D(null);
25556
25566
  E(() => {
25557
- C === null || te.dirty || ee.current === null || m === null || m === ee.current.content || (_e.current = C, ee.current = null, ne(Nk), w(null));
25567
+ C === null || te.dirty || ee.current === null || m === null || m === ee.current.content || (ve.current = C, ee.current = null, ne(Nk), w(null));
25558
25568
  }, [
25559
25569
  m,
25560
25570
  C,
25561
25571
  te.dirty
25562
25572
  ]), E(() => {
25563
- if (C !== null || _e.current === null) return;
25564
- let e = _e.current;
25565
- _e.current = null, ve(e);
25573
+ if (C !== null || ve.current === null) return;
25574
+ let e = ve.current;
25575
+ ve.current = null, ye(e);
25566
25576
  }), E(() => {
25567
- i?.(M);
25568
- }, [M, i]), E(() => () => i?.(!1), [i]);
25569
- async function ve(t) {
25577
+ i?.(he);
25578
+ }, [he, i]), E(() => () => i?.(!1), [i]);
25579
+ async function ye(t) {
25570
25580
  if (l !== void 0 && C === null) {
25571
25581
  ce(null), ue(null);
25572
25582
  try {
@@ -25579,10 +25589,10 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25579
25589
  }
25580
25590
  }
25581
25591
  }
25582
- function ye() {
25583
- return M && !window.confirm(Pk) ? !1 : (w(null), ne(Nk), ce(null), ue(null), ee.current = null, !0);
25592
+ function be() {
25593
+ return he && !window.confirm(Pk) ? !1 : (w(null), ne(Nk), ce(null), ue(null), ee.current = null, !0);
25584
25594
  }
25585
- async function be() {
25595
+ async function xe() {
25586
25596
  let t = C, n = ee.current;
25587
25597
  if (!(t === null || n === null || l === void 0 || oe.current)) {
25588
25598
  oe.current = !0, ie(!0), ce(null);
@@ -25603,7 +25613,7 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25603
25613
  }
25604
25614
  }
25605
25615
  }
25606
- async function Ce(t) {
25616
+ async function we(t) {
25607
25617
  S(null);
25608
25618
  try {
25609
25619
  let n = await fe(t).current.exportSvg();
@@ -25612,58 +25622,58 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25612
25622
  S(e instanceof Error ? e.message : String(e));
25613
25623
  }
25614
25624
  }
25615
- function we() {
25616
- (C !== "enlarged" || ye()) && v(!1);
25617
- }
25618
- let Te = T(() => ue("Save or undo the touch-ups on this page before turning to another."), []), Ee = D(ye);
25619
- Ee.current = ye;
25620
- let De = D(we);
25621
- De.current = we;
25622
- let Oe = D(C);
25623
- Oe.current = C;
25624
- let ke = D(_);
25625
- ke.current = _;
25626
- let Ae = D(s);
25627
- Ae.current = s;
25628
- let je = T(() => {
25629
- Ae.current ? Ae.current() : Oe.current === null ? ke.current && De.current() : Ee.current();
25625
+ function Te() {
25626
+ (C !== "enlarged" || be()) && v(!1);
25627
+ }
25628
+ let Ee = T(() => ue("Save or undo the touch-ups on this page before turning to another."), []), De = D(be);
25629
+ De.current = be;
25630
+ let Oe = D(Te);
25631
+ Oe.current = Te;
25632
+ let ke = D(C);
25633
+ ke.current = C;
25634
+ let Ae = D(_);
25635
+ Ae.current = _;
25636
+ let je = D(s);
25637
+ je.current = s;
25638
+ let Me = T(() => {
25639
+ je.current ? je.current() : ke.current === null ? Ae.current && Oe.current() : De.current();
25630
25640
  }, []);
25631
25641
  E(() => {
25632
25642
  if (C === null) return;
25633
25643
  function e(e) {
25634
- e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), Ae.current ? Ae.current() : Ee.current());
25644
+ e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), je.current ? je.current() : De.current());
25635
25645
  }
25636
25646
  return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
25637
25647
  }, [C]);
25638
- function Me(t) {
25648
+ function Ne(t) {
25639
25649
  return /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
25640
25650
  type: "button",
25641
- className: xe,
25651
+ className: Se,
25642
25652
  disabled: m === null || y !== null,
25643
- onClick: () => void Ce(t),
25653
+ onClick: () => void we(t),
25644
25654
  title: "Save the page shown as .svg — insert it as a picture in a document",
25645
25655
  children: "⤓ download SVG"
25646
25656
  }), /* @__PURE__ */ A("button", {
25647
25657
  type: "button",
25648
- className: xe,
25658
+ className: Se,
25649
25659
  disabled: m === null,
25650
25660
  onClick: () => m !== null && Ik(e.slice(e.lastIndexOf("/") + 1), m, "application/xml;charset=utf-8"),
25651
25661
  title: "Save the .drawio file, to open or share it",
25652
25662
  children: "⤓ download .drawio"
25653
25663
  })] });
25654
25664
  }
25655
- function Ne(e) {
25665
+ function Pe(e) {
25656
25666
  return C === e ? /* @__PURE__ */ j(k, { children: [
25657
25667
  /* @__PURE__ */ A("button", {
25658
25668
  type: "button",
25659
- className: xe,
25669
+ className: Se,
25660
25670
  disabled: !te.dirty || re,
25661
- onClick: () => void be(),
25671
+ onClick: () => void xe(),
25662
25672
  children: re ? "saving…" : "✓ save"
25663
25673
  }),
25664
25674
  /* @__PURE__ */ A("button", {
25665
25675
  type: "button",
25666
- className: xe,
25676
+ className: Se,
25667
25677
  disabled: !te.canUndo,
25668
25678
  onClick: () => fe(e).current?.undo(),
25669
25679
  title: "Undo (⌘Z / Ctrl+Z)",
@@ -25671,7 +25681,7 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25671
25681
  }),
25672
25682
  /* @__PURE__ */ A("button", {
25673
25683
  type: "button",
25674
- className: xe,
25684
+ className: Se,
25675
25685
  disabled: !te.canRedo,
25676
25686
  onClick: () => fe(e).current?.redo(),
25677
25687
  title: "Redo (⇧⌘Z / Ctrl+Y)",
@@ -25681,7 +25691,7 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25681
25691
  className: "inline-flex items-center gap-1 text-xs text-zinc-500 dark:text-zinc-400",
25682
25692
  title: "How the selected wires are drawn — or every wire of the page when none is selected — and new wires too",
25683
25693
  children: ["wires", /* @__PURE__ */ j("select", {
25684
- className: xe,
25694
+ className: Se,
25685
25695
  "aria-label": "Wire style",
25686
25696
  value: te.wireStyle ?? "orthogonal",
25687
25697
  onChange: (t) => {
@@ -25711,7 +25721,7 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25711
25721
  }),
25712
25722
  /* @__PURE__ */ A("button", {
25713
25723
  type: "button",
25714
- className: xe,
25724
+ className: Se,
25715
25725
  disabled: !te.bends,
25716
25726
  onClick: () => fe(e).current?.removeBends(),
25717
25727
  title: "Remove the bends of the selected wires — or of every wire of the page when none is selected — and let draw.io route them. Double-click a bend to remove just that one.",
@@ -25719,8 +25729,8 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25719
25729
  }),
25720
25730
  /* @__PURE__ */ A("button", {
25721
25731
  type: "button",
25722
- className: xe,
25723
- onClick: () => ye(),
25732
+ className: Se,
25733
+ onClick: () => be(),
25724
25734
  title: "Leave touch-up (Escape); unsaved touch-ups are asked about first",
25725
25735
  children: "done"
25726
25736
  }),
@@ -25731,14 +25741,14 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25731
25741
  })
25732
25742
  ] }) : me && C === null && y === null ? /* @__PURE__ */ A("button", {
25733
25743
  type: "button",
25734
- className: xe,
25744
+ className: Se,
25735
25745
  disabled: m === null,
25736
- onClick: () => void ve(e),
25746
+ onClick: () => void ye(e),
25737
25747
  title: "Move boxes, re-attach wires and fix labels here; anything more in draw.io",
25738
25748
  children: "✎ touch up"
25739
25749
  }) : null;
25740
25750
  }
25741
- function Pe(e) {
25751
+ function Fe(e) {
25742
25752
  return /* @__PURE__ */ j(k, { children: [
25743
25753
  C === e && se && /* @__PURE__ */ A("span", {
25744
25754
  role: "alert",
@@ -25775,15 +25785,15 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25775
25785
  p.message
25776
25786
  ]
25777
25787
  });
25778
- let Fe = r ?? /* @__PURE__ */ j("p", {
25788
+ let Ie = r ?? /* @__PURE__ */ j("p", {
25779
25789
  className: "px-3 py-2 text-xs text-zinc-500",
25780
25790
  children: [
25781
25791
  "The diagram ",
25782
25792
  /* @__PURE__ */ A("code", { children: e }),
25783
25793
  " could not be drawn."
25784
25794
  ]
25785
- }), Ie = /* @__PURE__ */ j("div", {
25786
- className: `${Se} ${n === "reply" ? "order-3" : "shrink-0 px-3 py-1.5"}`,
25795
+ }), Le = /* @__PURE__ */ j("div", {
25796
+ className: `${Ce} ${n === "reply" ? "order-3" : "shrink-0 px-3 py-1.5"}`,
25787
25797
  children: [
25788
25798
  C !== "inline" && /* @__PURE__ */ A("button", {
25789
25799
  type: "button",
@@ -25793,7 +25803,7 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25793
25803
  "aria-label": "Show diagram at full size",
25794
25804
  children: "⤢ enlarge"
25795
25805
  }),
25796
- C !== "inline" && Me("inline"),
25806
+ C !== "inline" && Ne("inline"),
25797
25807
  n === "reply" && u && /* @__PURE__ */ A("button", {
25798
25808
  type: "button",
25799
25809
  className: "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50",
@@ -25801,8 +25811,8 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25801
25811
  title: "Open the file in the file viewer",
25802
25812
  children: "↗ open"
25803
25813
  }),
25804
- n === "viewer" && Ne("inline"),
25805
- Pe("inline")
25814
+ n === "viewer" && Pe("inline"),
25815
+ Fe("inline")
25806
25816
  ]
25807
25817
  });
25808
25818
  return /* @__PURE__ */ j("div", {
@@ -25810,8 +25820,8 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25810
25820
  "data-testid": n === "reply" ? "drawio-block-reply" : "drawio-block-viewer",
25811
25821
  className: n === "reply" ? "my-2 flex flex-col gap-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900" : "flex h-full flex-col",
25812
25822
  children: [
25813
- n === "viewer" && Ie,
25814
- he.problem !== null && /* @__PURE__ */ j("p", {
25823
+ n === "viewer" && Le,
25824
+ ge.problem !== null && /* @__PURE__ */ j("p", {
25815
25825
  role: "alert",
25816
25826
  "data-testid": "drawio-block-page-problem",
25817
25827
  className: "px-3 py-1.5 text-xs text-amber-800 dark:text-amber-200",
@@ -25819,7 +25829,7 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25819
25829
  "The diagram ",
25820
25830
  /* @__PURE__ */ A("code", { children: e }),
25821
25831
  " ",
25822
- he.problem,
25832
+ ge.problem,
25823
25833
  "; its first page is shown."
25824
25834
  ]
25825
25835
  }),
@@ -25832,26 +25842,26 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25832
25842
  xml: pe("inline"),
25833
25843
  serverUrl: c,
25834
25844
  title: e,
25835
- fallback: Fe,
25845
+ fallback: Ie,
25836
25846
  editing: C === "inline",
25837
25847
  onTouchUpChange: ne,
25838
- onPageLocked: Te,
25839
- onEscape: je,
25848
+ onPageLocked: Ee,
25849
+ onEscape: Me,
25840
25850
  onRendered: b,
25841
25851
  className: n === "reply" ? "flex h-80 flex-col" : "flex min-h-[24rem] flex-1 flex-col",
25842
- page: a === void 0 ? void 0 : he.index
25852
+ page: a === void 0 ? void 0 : ge.index
25843
25853
  }),
25844
- n === "reply" && Ie,
25854
+ n === "reply" && Le,
25845
25855
  /* @__PURE__ */ A(de, {
25846
25856
  label: e,
25847
25857
  testId: "drawio-enlarged",
25848
25858
  open: _,
25849
- onClose: we,
25859
+ onClose: Te,
25850
25860
  anchorRef: d,
25851
25861
  actions: /* @__PURE__ */ j(k, { children: [
25852
- Me("enlarged"),
25853
25862
  Ne("enlarged"),
25854
- Pe("enlarged")
25863
+ Pe("enlarged"),
25864
+ Fe("enlarged")
25855
25865
  ] }),
25856
25866
  children: m !== null && /* @__PURE__ */ A("div", {
25857
25867
  style: {
@@ -25863,11 +25873,11 @@ function Bk({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i,
25863
25873
  xml: pe("enlarged"),
25864
25874
  serverUrl: c,
25865
25875
  title: `${e}, full size`,
25866
- fallback: Fe,
25876
+ fallback: Ie,
25867
25877
  editing: C === "enlarged",
25868
25878
  onTouchUpChange: ne,
25869
- onPageLocked: Te,
25870
- onEscape: je,
25879
+ onPageLocked: Ee,
25880
+ onEscape: Me,
25871
25881
  className: "flex h-full flex-col"
25872
25882
  })
25873
25883
  })
@@ -26013,21 +26023,108 @@ function Yk({ item: e, serverUrl: t = "", token: n = null, workspace: r, onOpenF
26013
26023
  });
26014
26024
  }
26015
26025
  //#endregion
26026
+ //#region ../ui/src/util/ansi.ts
26027
+ var Xk = {
26028
+ 30: "#3f3f46",
26029
+ 31: "#dc2626",
26030
+ 32: "#16a34a",
26031
+ 33: "#ca8a04",
26032
+ 34: "#2563eb",
26033
+ 35: "#9333ea",
26034
+ 36: "#0891b2",
26035
+ 37: "#71717a",
26036
+ 90: "#a1a1aa",
26037
+ 91: "#ef4444",
26038
+ 92: "#22c55e",
26039
+ 93: "#eab308",
26040
+ 94: "#3b82f6",
26041
+ 95: "#a855f7",
26042
+ 96: "#06b6d4",
26043
+ 97: "#d4d4d8"
26044
+ };
26045
+ function Zk(e) {
26046
+ if (!Number.isInteger(e) || e < 0 || e > 255) return;
26047
+ if (e < 16) return Xk[e < 8 ? 30 + e : 90 + e - 8];
26048
+ if (e >= 232) {
26049
+ let t = 8 + (e - 232) * 10;
26050
+ return `rgb(${t} ${t} ${t})`;
26051
+ }
26052
+ let t = e - 16, n = (e) => e === 0 ? 0 : 55 + e * 40;
26053
+ return `rgb(${n(Math.floor(t / 36))} ${n(Math.floor(t / 6) % 6)} ${n(t % 6)})`;
26054
+ }
26055
+ var Qk = /\u001B\[[0-9;:]*[A-Za-z]|\u001B[()][A-Za-z0-9]|\u001B[A-Za-z]/g;
26056
+ function $k(e, t) {
26057
+ let n = { ...e };
26058
+ for (let e = 0; e < t.length; e++) {
26059
+ let r = t[e];
26060
+ if (r === 0) for (let e of Object.keys(n)) delete n[e];
26061
+ else if (r === 1) n.bold = !0;
26062
+ else if (r === 2) n.dim = !0;
26063
+ else if (r === 3) n.italic = !0;
26064
+ else if (r === 4) n.underline = !0;
26065
+ else if (r === 22) delete n.bold, delete n.dim;
26066
+ else if (r === 23) delete n.italic;
26067
+ else if (r === 24) delete n.underline;
26068
+ else if (r === 39) delete n.color;
26069
+ else if (Xk[r] !== void 0) n.color = Xk[r];
26070
+ else if (r === 38) {
26071
+ if (t[e + 1] === 2) {
26072
+ let [r, i, a] = [
26073
+ t[e + 2],
26074
+ t[e + 3],
26075
+ t[e + 4]
26076
+ ];
26077
+ [
26078
+ r,
26079
+ i,
26080
+ a
26081
+ ].every((e) => Number.isFinite(e)) && (n.color = `rgb(${r} ${i} ${a})`), e += 4;
26082
+ } else if (t[e + 1] === 5) {
26083
+ let r = Zk(t[e + 2]);
26084
+ r !== void 0 && (n.color = r), e += 2;
26085
+ }
26086
+ }
26087
+ }
26088
+ return n;
26089
+ }
26090
+ function eA(e) {
26091
+ let t = [], n = {}, r = 0;
26092
+ Qk.lastIndex = 0;
26093
+ for (let i = Qk.exec(e); i !== null; i = Qk.exec(e)) {
26094
+ i.index > r && t.push({
26095
+ text: e.slice(r, i.index),
26096
+ ...n
26097
+ }), r = i.index + i[0].length;
26098
+ let a = i[0];
26099
+ if (a.endsWith("m")) {
26100
+ let e = a.slice(2, -1), t = e === "" ? [0] : e.split(/[;:]/).map((e) => e === "" ? 0 : Number(e));
26101
+ n = $k(n, t);
26102
+ }
26103
+ }
26104
+ return r < e.length && t.push({
26105
+ text: e.slice(r),
26106
+ ...n
26107
+ }), t;
26108
+ }
26109
+ function tA(e) {
26110
+ return e.replace(Qk, "");
26111
+ }
26112
+ //#endregion
26016
26113
  //#region ../shared/src/protocol.ts
26017
- var Xk = [
26114
+ var nA = [
26018
26115
  "off",
26019
26116
  "minimal",
26020
26117
  "low",
26021
26118
  "medium",
26022
26119
  "high",
26023
26120
  "xhigh"
26024
- ], Zk = "worktree", Qk = class extends Error {
26121
+ ], rA = "worktree", iA = class extends Error {
26025
26122
  kind;
26026
26123
  constructor(e, t) {
26027
26124
  super(e), this.name = "HistoryError", this.kind = t;
26028
26125
  }
26029
26126
  };
26030
- async function $k(e, t) {
26127
+ async function aA(e, t) {
26031
26128
  let n = [];
26032
26129
  for (;;) {
26033
26130
  let r = await e(n.length, 50);
@@ -26035,4 +26132,4 @@ async function $k(e, t) {
26035
26132
  }
26036
26133
  }
26037
26134
  //#endregion
26038
- export { bm as A, pg as C, Qh as D, tg as E, xe as F, ue as I, le as L, lm as M, Xl as N, eg as O, Oe as P, se as R, Ug as S, ng as T, Wv as _, Yk as a, Kg as b, jk as c, xk as d, bk as f, mw as g, gw as h, Zk as i, cm as j, kh as k, kk as l, Aw as m, $k as n, Uk as o, tk as p, Xk as r, Bk as s, Qk as t, Mk as u, zv as v, sg as w, qg as x, Yg as y, ce as z };
26135
+ export { eg as A, se as B, qg as C, ng as D, sg as E, Xl as F, ke as I, Se as L, bm as M, cm as N, tg as O, lm as P, ue as R, Kg as S, pg as T, ce as V, gw as _, eA as a, zv as b, Uk as c, kk as d, Mk as f, Aw as g, tk as h, rA as i, kh as j, Qh as k, Bk as l, bk as m, aA as n, tA as o, xk as p, nA as r, Yk as s, iA as t, jk as u, mw as v, Ug as w, Yg as x, Wv as y, le as z };