@superdoc-dev/mcp 0.11.0 → 0.12.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1974 -963
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -14569,7 +14569,7 @@ function finalize(ctx, schema) {
14569
14569
  result.$schema = "http://json-schema.org/draft-07/schema#";
14570
14570
  } else if (ctx.target === "draft-04") {
14571
14571
  result.$schema = "http://json-schema.org/draft-04/schema#";
14572
- } else if (ctx.target === "openapi-3.0") {} else {}
14572
+ } else if (ctx.target === "openapi-3.0") {}
14573
14573
  if (ctx.external?.uri) {
14574
14574
  const id = ctx.external.registry.get(schema)?.id;
14575
14575
  if (!id)
@@ -14834,7 +14834,7 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
14834
14834
  if (val === undefined) {
14835
14835
  if (ctx.unrepresentable === "throw") {
14836
14836
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
14837
- } else {}
14837
+ }
14838
14838
  } else if (typeof val === "bigint") {
14839
14839
  if (ctx.unrepresentable === "throw") {
14840
14840
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -43378,90 +43378,70 @@ Actual: ` + parser.attribValue);
43378
43378
  });
43379
43379
  });
43380
43380
 
43381
- // ../../packages/superdoc/dist/chunks/uuid-qzgm05fK.es.js
43382
- function rng() {
43383
- if (!getRandomValues) {
43384
- getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
43385
- if (!getRandomValues)
43386
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
43387
- }
43388
- return getRandomValues(rnds8);
43389
- }
43381
+ // ../../packages/superdoc/dist/chunks/uuid-B2wVPhPi.es.js
43390
43382
  function validate(uuid3) {
43391
43383
  return typeof uuid3 === "string" && regex_default.test(uuid3);
43392
43384
  }
43393
- function unsafeStringify(arr, offset = 0) {
43394
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
43395
- }
43396
43385
  function parse6(uuid3) {
43397
43386
  if (!validate_default(uuid3))
43398
43387
  throw TypeError("Invalid UUID");
43399
43388
  let v;
43400
- const arr = new Uint8Array(16);
43401
- arr[0] = (v = parseInt(uuid3.slice(0, 8), 16)) >>> 24;
43402
- arr[1] = v >>> 16 & 255;
43403
- arr[2] = v >>> 8 & 255;
43404
- arr[3] = v & 255;
43405
- arr[4] = (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8;
43406
- arr[5] = v & 255;
43407
- arr[6] = (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8;
43408
- arr[7] = v & 255;
43409
- arr[8] = (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8;
43410
- arr[9] = v & 255;
43411
- arr[10] = (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255;
43412
- arr[11] = v / 4294967296 & 255;
43413
- arr[12] = v >>> 24 & 255;
43414
- arr[13] = v >>> 16 & 255;
43415
- arr[14] = v >>> 8 & 255;
43416
- arr[15] = v & 255;
43417
- return arr;
43389
+ return Uint8Array.of((v = parseInt(uuid3.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
43390
+ }
43391
+ function unsafeStringify(arr, offset = 0) {
43392
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
43393
+ }
43394
+ function rng() {
43395
+ if (!getRandomValues) {
43396
+ if (typeof crypto === "undefined" || !crypto.getRandomValues)
43397
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
43398
+ getRandomValues = crypto.getRandomValues.bind(crypto);
43399
+ }
43400
+ return getRandomValues(rnds8);
43418
43401
  }
43419
43402
  function stringToBytes(str) {
43420
43403
  str = unescape(encodeURIComponent(str));
43421
- const bytes = [];
43404
+ const bytes = new Uint8Array(str.length);
43422
43405
  for (let i2 = 0;i2 < str.length; ++i2)
43423
- bytes.push(str.charCodeAt(i2));
43406
+ bytes[i2] = str.charCodeAt(i2);
43424
43407
  return bytes;
43425
43408
  }
43426
- function v35(name, version3, hashfunc) {
43427
- function generateUUID(value, namespace, buf, offset) {
43428
- var _namespace;
43429
- if (typeof value === "string")
43430
- value = stringToBytes(value);
43431
- if (typeof namespace === "string")
43432
- namespace = parse_default(namespace);
43433
- if (((_namespace = namespace) === null || _namespace === undefined ? undefined : _namespace.length) !== 16)
43434
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
43435
- let bytes = new Uint8Array(16 + value.length);
43436
- bytes.set(namespace);
43437
- bytes.set(value, namespace.length);
43438
- bytes = hashfunc(bytes);
43439
- bytes[6] = bytes[6] & 15 | version3;
43440
- bytes[8] = bytes[8] & 63 | 128;
43441
- if (buf) {
43442
- offset = offset || 0;
43443
- for (let i2 = 0;i2 < 16; ++i2)
43444
- buf[offset + i2] = bytes[i2];
43445
- return buf;
43446
- }
43447
- return unsafeStringify(bytes);
43409
+ function v35(version3, hash2, value, namespace, buf, offset) {
43410
+ const valueBytes = typeof value === "string" ? stringToBytes(value) : value;
43411
+ const namespaceBytes = typeof namespace === "string" ? parse_default(namespace) : namespace;
43412
+ if (typeof namespace === "string")
43413
+ namespace = parse_default(namespace);
43414
+ if (namespace?.length !== 16)
43415
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
43416
+ let bytes = new Uint8Array(16 + valueBytes.length);
43417
+ bytes.set(namespaceBytes);
43418
+ bytes.set(valueBytes, namespaceBytes.length);
43419
+ bytes = hash2(bytes);
43420
+ bytes[6] = bytes[6] & 15 | version3;
43421
+ bytes[8] = bytes[8] & 63 | 128;
43422
+ if (buf) {
43423
+ offset = offset || 0;
43424
+ if (offset < 0 || offset + 16 > buf.length)
43425
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
43426
+ for (let i2 = 0;i2 < 16; ++i2)
43427
+ buf[offset + i2] = bytes[i2];
43428
+ return buf;
43448
43429
  }
43449
- try {
43450
- generateUUID.name = name;
43451
- } catch (err) {}
43452
- generateUUID.DNS = DNS;
43453
- generateUUID.URL = URL2;
43454
- return generateUUID;
43430
+ return unsafeStringify(bytes);
43455
43431
  }
43456
43432
  function v4(options, buf, offset) {
43457
43433
  if (native_default.randomUUID && !buf && !options)
43458
43434
  return native_default.randomUUID();
43459
43435
  options = options || {};
43460
- const rnds = options.random || (options.rng || rng)();
43436
+ const rnds = options.random ?? options.rng?.() ?? rng();
43437
+ if (rnds.length < 16)
43438
+ throw new Error("Random bytes length must be >= 16");
43461
43439
  rnds[6] = rnds[6] & 15 | 64;
43462
43440
  rnds[8] = rnds[8] & 63 | 128;
43463
43441
  if (buf) {
43464
43442
  offset = offset || 0;
43443
+ if (offset < 0 || offset + 16 > buf.length)
43444
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
43465
43445
  for (let i2 = 0;i2 < 16; ++i2)
43466
43446
  buf[offset + i2] = rnds[i2];
43467
43447
  return buf;
@@ -43497,14 +43477,10 @@ function sha1(bytes) {
43497
43477
  271733878,
43498
43478
  3285377520
43499
43479
  ];
43500
- if (typeof bytes === "string") {
43501
- const msg = unescape(encodeURIComponent(bytes));
43502
- bytes = [];
43503
- for (let i2 = 0;i2 < msg.length; ++i2)
43504
- bytes.push(msg.charCodeAt(i2));
43505
- } else if (!Array.isArray(bytes))
43506
- bytes = Array.prototype.slice.call(bytes);
43507
- bytes.push(128);
43480
+ const newBytes = new Uint8Array(bytes.length + 1);
43481
+ newBytes.set(bytes);
43482
+ newBytes[bytes.length] = 128;
43483
+ bytes = newBytes;
43508
43484
  const l = bytes.length / 4 + 2;
43509
43485
  const N = Math.ceil(l / 16);
43510
43486
  const M = new Array(N);
@@ -43543,41 +43519,26 @@ function sha1(bytes) {
43543
43519
  H[3] = H[3] + d >>> 0;
43544
43520
  H[4] = H[4] + e >>> 0;
43545
43521
  }
43546
- return [
43547
- H[0] >> 24 & 255,
43548
- H[0] >> 16 & 255,
43549
- H[0] >> 8 & 255,
43550
- H[0] & 255,
43551
- H[1] >> 24 & 255,
43552
- H[1] >> 16 & 255,
43553
- H[1] >> 8 & 255,
43554
- H[1] & 255,
43555
- H[2] >> 24 & 255,
43556
- H[2] >> 16 & 255,
43557
- H[2] >> 8 & 255,
43558
- H[2] & 255,
43559
- H[3] >> 24 & 255,
43560
- H[3] >> 16 & 255,
43561
- H[3] >> 8 & 255,
43562
- H[3] & 255,
43563
- H[4] >> 24 & 255,
43564
- H[4] >> 16 & 255,
43565
- H[4] >> 8 & 255,
43566
- H[4] & 255
43567
- ];
43522
+ return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]);
43568
43523
  }
43569
- var getRandomValues, rnds8, regex_default, validate_default, byteToHex, parse_default, DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", native_default, v4_default, v5_default;
43570
- var init_uuid_qzgm05fK_es = __esm(() => {
43571
- rnds8 = new Uint8Array(16);
43572
- regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
43524
+ function v5(value, namespace, buf, offset) {
43525
+ return v35(80, sha1_default, value, namespace, buf, offset);
43526
+ }
43527
+ var regex_default, validate_default, parse_default, byteToHex, getRandomValues, rnds8, DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", native_default, v4_default, sha1_default, v5_default;
43528
+ var init_uuid_B2wVPhPi_es = __esm(() => {
43529
+ regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
43573
43530
  validate_default = validate;
43531
+ parse_default = parse6;
43574
43532
  byteToHex = [];
43575
43533
  for (let i2 = 0;i2 < 256; ++i2)
43576
43534
  byteToHex.push((i2 + 256).toString(16).slice(1));
43577
- parse_default = parse6;
43535
+ rnds8 = new Uint8Array(16);
43578
43536
  native_default = { randomUUID: typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
43579
43537
  v4_default = v4;
43580
- v5_default = v35("v5", 80, sha1);
43538
+ sha1_default = sha1;
43539
+ v5.DNS = DNS;
43540
+ v5.URL = URL2;
43541
+ v5_default = v5;
43581
43542
  });
43582
43543
 
43583
43544
  // ../../packages/superdoc/dist/chunks/constants-D9qj59G2.es.js
@@ -52211,7 +52172,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
52211
52172
  emptyOptions2 = {};
52212
52173
  });
52213
52174
 
52214
- // ../../packages/superdoc/dist/chunks/SuperConverter-DOoAJ6Zk.es.js
52175
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CfRQprW6.es.js
52215
52176
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
52216
52177
  const fieldValue = extension$1.config[field];
52217
52178
  if (typeof fieldValue === "function")
@@ -61335,9 +61296,9 @@ function decode$66(params) {
61335
61296
  });
61336
61297
  if (params.isFinalDoc)
61337
61298
  return null;
61338
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
61339
- if (textNode)
61340
- textNode.name = "w:delText";
61299
+ (translatedTextNode.elements || []).filter((n) => n.name === "w:t").forEach((n) => {
61300
+ n.name = "w:delText";
61301
+ });
61341
61302
  return {
61342
61303
  name: "w:del",
61343
61304
  attributes: {
@@ -82438,14 +82399,37 @@ function getTextNodeForExport(text$2, marks, params) {
82438
82399
  wordIdAllocator: params?.converter?.wordIdAllocator || null,
82439
82400
  partPath: resolveExportPartPath(params)
82440
82401
  });
82441
- textNodes.push({
82442
- name: "w:t",
82443
- elements: [{
82444
- text: text$2,
82445
- type: "text"
82446
- }],
82447
- attributes: nodeAttrs
82448
- });
82402
+ const textValue = typeof text$2 === "string" ? text$2 : "";
82403
+ const normalizedText = textValue.includes("\r") ? textValue.replace(/\r\n?/g, `
82404
+ `) : textValue;
82405
+ if (normalizedText.includes(`
82406
+ `)) {
82407
+ const segments = normalizedText.split(`
82408
+ `);
82409
+ segments.forEach((segment, index2) => {
82410
+ if (segment.length > 0) {
82411
+ const segmentNeedsSpace = /^\s|\s$/.test(segment);
82412
+ textNodes.push({
82413
+ name: "w:t",
82414
+ elements: [{
82415
+ text: segment,
82416
+ type: "text"
82417
+ }],
82418
+ attributes: segmentNeedsSpace ? { "xml:space": "preserve" } : null
82419
+ });
82420
+ }
82421
+ if (index2 < segments.length - 1)
82422
+ textNodes.push({ name: "w:br" });
82423
+ });
82424
+ } else
82425
+ textNodes.push({
82426
+ name: "w:t",
82427
+ elements: [{
82428
+ text: normalizedText,
82429
+ type: "text"
82430
+ }],
82431
+ attributes: nodeAttrs
82432
+ });
82449
82433
  if (params?.editor?.extensionService?.extensions) {
82450
82434
  const customMarks = params.editor.extensionService.extensions.filter((extension$1) => extension$1.isExternal === true);
82451
82435
  normalizedMarks.forEach((mark) => {
@@ -86328,49 +86312,85 @@ function translateMark(mark) {
86328
86312
  function isSettled(status) {
86329
86313
  return SETTLED_STATUSES.includes(status);
86330
86314
  }
86331
- function normalizeFamilyKey$1(family$1) {
86332
- return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
86333
- }
86334
- function sortPairs(pairs) {
86335
- return pairs.sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
86336
- }
86337
- function deriveBundledSubstitutes() {
86338
- const substitutes = {};
86339
- for (const row of SUBSTITUTION_EVIDENCE)
86340
- if (row.policyAction === "substitute" && row.physicalFamily)
86341
- substitutes[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
86342
- return Object.freeze(substitutes);
86315
+ function normalizeFamilyName(name) {
86316
+ return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
86343
86317
  }
86344
- function deriveCategoryFallbacks() {
86345
- const fallbacks = {};
86346
- for (const row of SUBSTITUTION_EVIDENCE)
86347
- if (row.policyAction === "category_fallback" && row.physicalFamily)
86348
- fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
86349
- return Object.freeze(fallbacks);
86350
- }
86351
- function stripFamilyQuotes(family$1) {
86352
- return family$1.trim().replace(/^["']|["']$/g, "");
86318
+ function buildFallback(row, physicalFamily, verdict, faceSlot) {
86319
+ const glyphExceptions = faceSlot ? row.glyphExceptions?.filter((g) => g.slot === faceSlot) : row.glyphExceptions ? [...row.glyphExceptions] : undefined;
86320
+ return {
86321
+ substituteFamily: physicalFamily,
86322
+ policyAction: row.policyAction,
86323
+ verdict,
86324
+ lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(verdict),
86325
+ faces: row.faces,
86326
+ evidenceId: row.evidenceId,
86327
+ ...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
86328
+ };
86353
86329
  }
86354
- function splitStack(cssFontFamily) {
86355
- return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
86330
+ function decideRow(row, canRenderFamily$1) {
86331
+ const { policyAction, physicalFamily, verdict, evidenceId } = row;
86332
+ if (policyAction === "preserve_only")
86333
+ return {
86334
+ kind: "preserve_only",
86335
+ evidenceId
86336
+ };
86337
+ if (policyAction === "customer_supplied")
86338
+ return {
86339
+ kind: "customer_supplied",
86340
+ evidenceId
86341
+ };
86342
+ if (physicalFamily === null)
86343
+ return {
86344
+ kind: "no_recommended_fallback",
86345
+ evidenceId
86346
+ };
86347
+ if (canRenderFamily$1 && !canRenderFamily$1(physicalFamily))
86348
+ return {
86349
+ kind: "asset_missing",
86350
+ substituteFamily: physicalFamily,
86351
+ verdict,
86352
+ evidenceId
86353
+ };
86354
+ return {
86355
+ kind: "fallback",
86356
+ fallback: buildFallback(row, physicalFamily, verdict)
86357
+ };
86356
86358
  }
86357
- function createFontResolver() {
86358
- return new FontResolver;
86359
+ function isFaceScoped(row) {
86360
+ const f2 = row.faces;
86361
+ return f2.regular || f2.bold || f2.italic || f2.boldItalic;
86359
86362
  }
86360
- function resolveFontFamily(logicalFamily) {
86361
- return defaultResolver.resolveFontFamily(logicalFamily);
86363
+ function decideRowForFace(row, face, canRenderFamily$1) {
86364
+ const base$1 = decideRow(row, canRenderFamily$1);
86365
+ if (base$1.kind !== "fallback")
86366
+ return base$1;
86367
+ if (isFaceScoped(row) && !row.faces[face])
86368
+ return {
86369
+ kind: "face_missing",
86370
+ substituteFamily: base$1.fallback.substituteFamily,
86371
+ evidenceId: row.evidenceId
86372
+ };
86373
+ const faceVerdict = row.faceVerdicts?.[face] ?? row.verdict;
86374
+ return {
86375
+ kind: "fallback",
86376
+ fallback: buildFallback(row, base$1.fallback.substituteFamily, faceVerdict, face)
86377
+ };
86362
86378
  }
86363
- function resolvePhysicalFamily(cssFontFamily) {
86364
- return defaultResolver.resolvePhysicalFamily(cssFontFamily);
86379
+ function getFallbackDecision(family$1, options = {}) {
86380
+ const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
86381
+ return row ? decideRow(row, options.canRenderFamily) : { kind: "unknown" };
86365
86382
  }
86366
- function resolveFace(logicalFamily, face, hasFace) {
86367
- return defaultResolver.resolveFace(logicalFamily, face, hasFace);
86383
+ function getRenderableFallback(family$1, options) {
86384
+ const decision = getFallbackDecision(family$1, options);
86385
+ return decision.kind === "fallback" ? decision.fallback : null;
86368
86386
  }
86369
- function getFontConfigVersion() {
86370
- return fontConfigVersion;
86387
+ function getFallbackDecisionForFace(family$1, face, options = {}) {
86388
+ const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
86389
+ return row ? decideRowForFace(row, face, options.canRenderFamily) : { kind: "unknown" };
86371
86390
  }
86372
- function bumpFontConfigVersion() {
86373
- return fontConfigVersion += 1;
86391
+ function getRenderableFallbackForFace(family$1, face, options) {
86392
+ const decision = getFallbackDecisionForFace(family$1, face, options);
86393
+ return decision.kind === "fallback" ? decision.fallback : null;
86374
86394
  }
86375
86395
  function fourFaces(filePrefix) {
86376
86396
  return [
@@ -86403,6 +86423,54 @@ function family(name, filePrefix, license) {
86403
86423
  faces: fourFaces(filePrefix)
86404
86424
  };
86405
86425
  }
86426
+ function normalizeFamilyKey$1(family$1) {
86427
+ return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
86428
+ }
86429
+ function sortPairs(pairs) {
86430
+ return pairs.sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
86431
+ }
86432
+ function deriveBundledSubstitutes() {
86433
+ const substitutes = {};
86434
+ for (const row of SUBSTITUTION_EVIDENCE) {
86435
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
86436
+ if (fallback?.policyAction === "substitute")
86437
+ substitutes[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
86438
+ }
86439
+ return Object.freeze(substitutes);
86440
+ }
86441
+ function deriveCategoryFallbacks() {
86442
+ const fallbacks = {};
86443
+ for (const row of SUBSTITUTION_EVIDENCE) {
86444
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
86445
+ if (fallback?.policyAction === "category_fallback")
86446
+ fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
86447
+ }
86448
+ return Object.freeze(fallbacks);
86449
+ }
86450
+ function stripFamilyQuotes(family$1) {
86451
+ return family$1.trim().replace(/^["']|["']$/g, "");
86452
+ }
86453
+ function splitStack(cssFontFamily) {
86454
+ return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
86455
+ }
86456
+ function createFontResolver() {
86457
+ return new FontResolver;
86458
+ }
86459
+ function resolveFontFamily(logicalFamily) {
86460
+ return defaultResolver.resolveFontFamily(logicalFamily);
86461
+ }
86462
+ function resolvePhysicalFamily(cssFontFamily) {
86463
+ return defaultResolver.resolvePhysicalFamily(cssFontFamily);
86464
+ }
86465
+ function resolveFace(logicalFamily, face, hasFace) {
86466
+ return defaultResolver.resolveFace(logicalFamily, face, hasFace);
86467
+ }
86468
+ function getFontConfigVersion() {
86469
+ return fontConfigVersion;
86470
+ }
86471
+ function bumpFontConfigVersion() {
86472
+ return fontConfigVersion += 1;
86473
+ }
86406
86474
  function withTrailingSlash(base$1) {
86407
86475
  return base$1.endsWith("/") ? base$1 : `${base$1}/`;
86408
86476
  }
@@ -86454,6 +86522,17 @@ function installBundledSubstitutes(registry2, options = {}) {
86454
86522
  });
86455
86523
  }
86456
86524
  }
86525
+ function toEvidence(fallback) {
86526
+ if (!fallback)
86527
+ return;
86528
+ return {
86529
+ evidenceId: fallback.evidenceId,
86530
+ policyAction: fallback.policyAction,
86531
+ verdict: fallback.verdict,
86532
+ lineBreakSafe: fallback.lineBreakSafe,
86533
+ ...fallback.glyphExceptions ? { glyphExceptions: fallback.glyphExceptions } : {}
86534
+ };
86535
+ }
86457
86536
  function buildFontReport(logicalFamilies, registry2, resolver$1) {
86458
86537
  const seen = /* @__PURE__ */ new Set;
86459
86538
  const report = [];
@@ -86463,13 +86542,15 @@ function buildFontReport(logicalFamilies, registry2, resolver$1) {
86463
86542
  seen.add(logical);
86464
86543
  const { physicalFamily, reason } = resolver$1 ? resolver$1.resolveFontFamily(logical) : resolveFontFamily(logical);
86465
86544
  const loadStatus = registry2.getStatus(physicalFamily);
86545
+ const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallback(logical, RENDER_ALL)) : undefined;
86466
86546
  report.push({
86467
86547
  logicalFamily: logical,
86468
86548
  physicalFamily,
86469
86549
  reason,
86470
86550
  loadStatus,
86471
86551
  exportFamily: logical,
86472
- missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
86552
+ missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded",
86553
+ ...evidence ? { evidence } : {}
86473
86554
  });
86474
86555
  }
86475
86556
  return report;
@@ -86496,6 +86577,7 @@ function buildFaceReport(usedFaces, registry2, resolver$1) {
86496
86577
  style
86497
86578
  });
86498
86579
  const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
86580
+ const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallbackForFace(logicalFamily, faceSlotFor(face), RENDER_ALL)) : undefined;
86499
86581
  report.push({
86500
86582
  logicalFamily,
86501
86583
  physicalFamily: reason === "registered_face" ? logicalFamily : physicalFamily,
@@ -86503,7 +86585,8 @@ function buildFaceReport(usedFaces, registry2, resolver$1) {
86503
86585
  loadStatus,
86504
86586
  exportFamily: logicalFamily,
86505
86587
  missing,
86506
- face
86588
+ face,
86589
+ ...evidence ? { evidence } : {}
86507
86590
  });
86508
86591
  }
86509
86592
  return report;
@@ -91633,6 +91716,9 @@ function hasTrackDeleteMark(node2) {
91633
91716
  function shouldSkipTextNode(node2, options) {
91634
91717
  return isVisibleTextModel(options) && hasTrackDeleteMark(node2);
91635
91718
  }
91719
+ function shouldSkipLeafNode(node2, options) {
91720
+ return isVisibleTextModel(options) && hasTrackDeleteMark(node2);
91721
+ }
91636
91722
  function resolveSegmentPosition(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
91637
91723
  if (segmentLength <= 1)
91638
91724
  return targetOffset <= segmentStart ? docFrom : docTo;
@@ -91664,7 +91750,13 @@ function pmPositionToTextOffset(blockNode, blockPos, pmPos, options) {
91664
91750
  return;
91665
91751
  }
91666
91752
  if (node2.isLeaf) {
91667
- if (pmPos >= docPos + node2.nodeSize)
91753
+ const endPos = docPos + node2.nodeSize;
91754
+ if (shouldSkipLeafNode(node2, options)) {
91755
+ if (pmPos < endPos)
91756
+ done = true;
91757
+ return;
91758
+ }
91759
+ if (pmPos >= endPos)
91668
91760
  offset += 1;
91669
91761
  else
91670
91762
  done = true;
@@ -91705,6 +91797,8 @@ function computeTextContentLength(blockNode, options) {
91705
91797
  return;
91706
91798
  }
91707
91799
  if (node2.isLeaf) {
91800
+ if (shouldSkipLeafNode(node2, options))
91801
+ return;
91708
91802
  length += 1;
91709
91803
  return;
91710
91804
  }
@@ -91764,6 +91858,8 @@ function resolveTextRangeInBlock(blockNode, blockPos, range, options) {
91764
91858
  return;
91765
91859
  }
91766
91860
  if (node2.isLeaf) {
91861
+ if (shouldSkipLeafNode(node2, options))
91862
+ return;
91767
91863
  advanceSegment(1, docPos, docPos + node2.nodeSize);
91768
91864
  return;
91769
91865
  }
@@ -91795,7 +91891,10 @@ function textContentInBlock(blockNode, options) {
91795
91891
  return;
91796
91892
  }
91797
91893
  if (node2.isLeaf) {
91798
- text$2 += "";
91894
+ if (shouldSkipLeafNode(node2, options))
91895
+ return;
91896
+ const leafText = node2.type?.spec?.leafText;
91897
+ text$2 += typeof leafText === "function" ? leafText(node2) : "";
91799
91898
  return;
91800
91899
  }
91801
91900
  let isFirstChild$1 = true;
@@ -91820,19 +91919,31 @@ function textContentInBlock(blockNode, options) {
91820
91919
  return text$2;
91821
91920
  }
91822
91921
  function buildTextWithTabs(schema, text$2, marks, opts = {}) {
91823
- if (!text$2.includes("\t"))
91824
- return schema.text(text$2, marks);
91825
- const tabNodeType = schema.nodes?.tab;
91826
- if (!tabNodeType || opts.parentAllowsTab === false)
91827
- return schema.text(text$2, marks);
91828
- const tabMarks = marks ?? null;
91829
- const parts = text$2.split("\t");
91922
+ const normalized = text$2.includes("\r") ? text$2.replace(/\r\n?/g, `
91923
+ `) : text$2;
91924
+ const hasTab = normalized.includes("\t");
91925
+ const hasNewline = normalized.includes(`
91926
+ `);
91927
+ if (!hasTab && !hasNewline)
91928
+ return schema.text(normalized, marks);
91929
+ const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
91930
+ const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
91931
+ if (!tabNodeType && !lineBreakNodeType)
91932
+ return schema.text(normalized, marks);
91933
+ const tabMarks = marks ?? undefined;
91934
+ const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
91935
+ const parts = normalized.split(/* @__PURE__ */ new RegExp(`(${splitPattern})`));
91830
91936
  const nodes = [];
91831
- for (let i$1 = 0;i$1 < parts.length; i$1++) {
91832
- if (parts[i$1])
91833
- nodes.push(schema.text(parts[i$1], marks));
91834
- if (i$1 < parts.length - 1)
91937
+ for (const part of parts) {
91938
+ if (part === "")
91939
+ continue;
91940
+ if (part === "\t" && tabNodeType)
91835
91941
  nodes.push(tabNodeType.create(null, null, tabMarks));
91942
+ else if (part === `
91943
+ ` && lineBreakNodeType)
91944
+ nodes.push(lineBreakNodeType.create());
91945
+ else
91946
+ nodes.push(schema.text(part, marks));
91836
91947
  }
91837
91948
  return Fragment.from(nodes);
91838
91949
  }
@@ -91874,6 +91985,8 @@ function textBetweenWithTabs(doc$2, from2, to, blockSeparator, leafFallback, opt
91874
91985
  }
91875
91986
  if (node2.isLeaf) {
91876
91987
  if (node2.isInline) {
91988
+ if (options.textModel === "visible" && node2.marks?.some((mark) => mark.type.name === "trackDelete"))
91989
+ return false;
91877
91990
  const leafTextFn = node2.type?.spec?.leafText;
91878
91991
  if (typeof leafTextFn === "function")
91879
91992
  out += leafTextFn(node2);
@@ -113376,7 +113489,7 @@ var isRegExp = (value) => {
113376
113489
  tags.push(`</${name}>`);
113377
113490
  return tags;
113378
113491
  }
113379
- }, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE, BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
113492
+ }, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE$1, LINE_BREAK_SAFE_VERDICTS, BY_LOGICAL, BUNDLED_MANIFEST, SUBSTITUTION_EVIDENCE, bundledFamilies, canRenderFamily = (family$1) => bundledFamilies.has(family$1), BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
113380
113493
  #overrides = /* @__PURE__ */ new Map;
113381
113494
  #embedded = /* @__PURE__ */ new Map;
113382
113495
  #version = 0;
@@ -113565,7 +113678,17 @@ var isRegExp = (value) => {
113565
113678
  out.add(this.resolvePrimaryPhysicalFamily(family$1));
113566
113679
  return [...out];
113567
113680
  }
113568
- }, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, BUNDLED_MANIFEST, defaultAssetBase = "/fonts/", installedRegistries, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
113681
+ }, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries, faceSlotFor = ({ weight, style }) => {
113682
+ const bold = weight === "700";
113683
+ const italic = style === "italic";
113684
+ if (bold && italic)
113685
+ return "boldItalic";
113686
+ if (bold)
113687
+ return "bold";
113688
+ if (italic)
113689
+ return "italic";
113690
+ return "regular";
113691
+ }, isRenderedSubstitute = (reason) => reason === "bundled_substitute" || reason === "category_fallback", RENDER_ALL, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
113569
113692
  #fontSet;
113570
113693
  #FontFaceCtor;
113571
113694
  #probeSize;
@@ -117848,7 +117971,7 @@ var isRegExp = (value) => {
117848
117971
  sourceId: stringOf(primary.sourceId),
117849
117972
  revisionGroupId: stringOf(primary.revisionGroupId) || representativeRevisionId
117850
117973
  });
117851
- }, stringOf = (value) => typeof value === "string" ? value : value == null ? "" : String(value), groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.38.0", SUPERDOC_DOCUMENT_ORIGIN_PROPERTY = "SuperdocDocumentOrigin", STORED_DOCUMENT_ORIGINS, collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
117974
+ }, stringOf = (value) => typeof value === "string" ? value : value == null ? "" : String(value), groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.39.0", SUPERDOC_DOCUMENT_ORIGIN_PROPERTY = "SuperdocDocumentOrigin", STORED_DOCUMENT_ORIGINS, collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
117852
117975
  if (!runProps?.elements?.length || !state)
117853
117976
  return;
117854
117977
  const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
@@ -117882,11 +118005,11 @@ var isRegExp = (value) => {
117882
118005
  state.kern = kernNode.attributes["w:val"];
117883
118006
  }
117884
118007
  }, SuperConverter;
117885
- var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
118008
+ var init_SuperConverter_CfRQprW6_es = __esm(() => {
117886
118009
  init_rolldown_runtime_Bg48TavK_es();
117887
118010
  init_jszip_C49i9kUs_es();
117888
118011
  init_xml_js_CqGKpaft_es();
117889
- init_uuid_qzgm05fK_es();
118012
+ init_uuid_B2wVPhPi_es();
117890
118013
  init_constants_D9qj59G2_es();
117891
118014
  init_dist_B8HfvhaK_es();
117892
118015
  init_unified_Dsuw2be5_es();
@@ -155199,7 +155322,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155199
155322
  "timed_out",
155200
155323
  "fallback_used"
155201
155324
  ];
155202
- SUBSTITUTION_EVIDENCE = Object.freeze([
155325
+ SUBSTITUTION_EVIDENCE$1 = [
155203
155326
  {
155204
155327
  evidenceId: "calibri",
155205
155328
  logicalFamily: "Calibri",
@@ -155211,10 +155334,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155211
155334
  italic: true,
155212
155335
  boldItalic: true
155213
155336
  },
155214
- advance: {
155215
- meanDelta: 0,
155216
- maxDelta: 0
155217
- },
155218
155337
  gates: {
155219
155338
  static: "pass",
155220
155339
  metric: "pass",
@@ -155223,36 +155342,24 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155223
155342
  },
155224
155343
  policyAction: "substitute",
155225
155344
  measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
155226
- candidateLicense: "OFL-1.1",
155227
- exportRule: "preserve_original_name"
155345
+ exportRule: "preserve_original_name",
155346
+ advance: {
155347
+ meanDelta: 0,
155348
+ maxDelta: 0
155349
+ },
155350
+ candidateLicense: "OFL-1.1"
155228
155351
  },
155229
155352
  {
155230
155353
  evidenceId: "cambria",
155231
155354
  logicalFamily: "Cambria",
155232
155355
  physicalFamily: "Caladea",
155233
155356
  verdict: "visual_only",
155234
- faceVerdicts: {
155235
- regular: "metric_safe",
155236
- bold: "metric_safe",
155237
- italic: "metric_safe",
155238
- boldItalic: "visual_only"
155239
- },
155240
- glyphExceptions: [{
155241
- slot: "boldItalic",
155242
- codepoint: 96,
155243
- advanceDelta: 0.231,
155244
- note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
155245
- }],
155246
155357
  faces: {
155247
155358
  regular: true,
155248
155359
  bold: true,
155249
155360
  italic: true,
155250
155361
  boldItalic: true
155251
155362
  },
155252
- advance: {
155253
- meanDelta: 0.0002378,
155254
- maxDelta: 0.2310758
155255
- },
155256
155363
  gates: {
155257
155364
  static: "pass",
155258
155365
  metric: "pass",
@@ -155266,8 +155373,24 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155266
155373
  "cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
155267
155374
  "cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
155268
155375
  ],
155376
+ exportRule: "preserve_original_name",
155377
+ advance: {
155378
+ meanDelta: 0.0002378,
155379
+ maxDelta: 0.2310758
155380
+ },
155269
155381
  candidateLicense: "Apache-2.0",
155270
- exportRule: "preserve_original_name"
155382
+ faceVerdicts: {
155383
+ regular: "metric_safe",
155384
+ bold: "metric_safe",
155385
+ italic: "metric_safe",
155386
+ boldItalic: "visual_only"
155387
+ },
155388
+ glyphExceptions: [{
155389
+ slot: "boldItalic",
155390
+ codepoint: 96,
155391
+ advanceDelta: 0.231,
155392
+ note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow. All other glyphs, and the regular/bold/italic faces, are within the direct metric threshold."
155393
+ }]
155271
155394
  },
155272
155395
  {
155273
155396
  evidenceId: "arial",
@@ -155280,10 +155403,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155280
155403
  italic: true,
155281
155404
  boldItalic: true
155282
155405
  },
155283
- advance: {
155284
- meanDelta: 0,
155285
- maxDelta: 0
155286
- },
155287
155406
  gates: {
155288
155407
  static: "pass",
155289
155408
  metric: "pass",
@@ -155292,8 +155411,12 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155292
155411
  },
155293
155412
  policyAction: "substitute",
155294
155413
  measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
155295
- candidateLicense: "OFL-1.1",
155296
- exportRule: "preserve_original_name"
155414
+ exportRule: "preserve_original_name",
155415
+ advance: {
155416
+ meanDelta: 0,
155417
+ maxDelta: 0
155418
+ },
155419
+ candidateLicense: "OFL-1.1"
155297
155420
  },
155298
155421
  {
155299
155422
  evidenceId: "times-new-roman",
@@ -155306,10 +155429,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155306
155429
  italic: true,
155307
155430
  boldItalic: true
155308
155431
  },
155309
- advance: {
155310
- meanDelta: 0,
155311
- maxDelta: 0
155312
- },
155313
155432
  gates: {
155314
155433
  static: "pass",
155315
155434
  metric: "pass",
@@ -155318,8 +155437,12 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155318
155437
  },
155319
155438
  policyAction: "substitute",
155320
155439
  measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
155321
- candidateLicense: "OFL-1.1",
155322
- exportRule: "preserve_original_name"
155440
+ exportRule: "preserve_original_name",
155441
+ advance: {
155442
+ meanDelta: 0,
155443
+ maxDelta: 0
155444
+ },
155445
+ candidateLicense: "OFL-1.1"
155323
155446
  },
155324
155447
  {
155325
155448
  evidenceId: "courier-new",
@@ -155332,19 +155455,388 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155332
155455
  italic: true,
155333
155456
  boldItalic: true
155334
155457
  },
155458
+ gates: {
155459
+ static: "pass",
155460
+ metric: "pass",
155461
+ layout: "not_run",
155462
+ ship: "pass"
155463
+ },
155464
+ policyAction: "substitute",
155465
+ measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
155466
+ exportRule: "preserve_original_name",
155335
155467
  advance: {
155336
155468
  meanDelta: 0,
155337
155469
  maxDelta: 0
155338
155470
  },
155471
+ candidateLicense: "OFL-1.1"
155472
+ },
155473
+ {
155474
+ evidenceId: "georgia",
155475
+ logicalFamily: "Georgia",
155476
+ physicalFamily: "Gelasio",
155477
+ verdict: "near_metric",
155478
+ faces: {
155479
+ regular: true,
155480
+ bold: true,
155481
+ italic: true,
155482
+ boldItalic: true
155483
+ },
155339
155484
  gates: {
155340
155485
  static: "pass",
155341
155486
  metric: "pass",
155342
- layout: "not_run",
155343
- ship: "pass"
155487
+ layout: "pass",
155488
+ ship: "fail"
155344
155489
  },
155345
155490
  policyAction: "substitute",
155346
- measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
155491
+ measurementRefs: [
155492
+ "georgia_regular__gelasio#regular#w400#1543f04d#analytic_advance#2026-06-04",
155493
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#analytic_advance#2026-06-04",
155494
+ "georgia_italic__gelasio#italic#w400#be1243a9#analytic_advance#2026-06-04",
155495
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#analytic_advance#2026-06-04",
155496
+ "georgia_regular__gelasio#regular#w400#1543f04d#live_layout#2026-06-03",
155497
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#live_layout#2026-06-03",
155498
+ "georgia_italic__gelasio#italic#w400#be1243a9#live_layout#2026-06-03",
155499
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#live_layout#2026-06-03"
155500
+ ],
155501
+ exportRule: "preserve_original_name",
155502
+ advance: {
155503
+ meanDelta: 0.0000197,
155504
+ maxDelta: 0.0183727
155505
+ },
155347
155506
  candidateLicense: "OFL-1.1",
155507
+ faceVerdicts: {
155508
+ regular: "metric_safe",
155509
+ bold: "metric_safe",
155510
+ italic: "near_metric",
155511
+ boldItalic: "near_metric"
155512
+ },
155513
+ glyphExceptions: [{
155514
+ slot: "italic",
155515
+ codepoint: 210,
155516
+ advanceDelta: 0.0184,
155517
+ note: "Georgia Italic vs Gelasio Italic: accented capital O (U+00D2-D8: O-grave/acute/circumflex/diaeresis/stroke) advance differs ~1.84%. 5 rare glyphs; all other glyphs exact, mean 0%."
155518
+ }, {
155519
+ slot: "boldItalic",
155520
+ codepoint: 204,
155521
+ advanceDelta: 0.011,
155522
+ note: "Georgia Bold Italic vs Gelasio Bold Italic: accented capital I (U+00CC-CE: I-grave/acute/circumflex) advance differs ~1.10%. 3 rare glyphs; all other glyphs exact, mean ~0%."
155523
+ }]
155524
+ },
155525
+ {
155526
+ evidenceId: "arial-narrow",
155527
+ logicalFamily: "Arial Narrow",
155528
+ physicalFamily: "Liberation Sans Narrow",
155529
+ verdict: "visual_only",
155530
+ faces: {
155531
+ regular: true,
155532
+ bold: true,
155533
+ italic: true,
155534
+ boldItalic: true
155535
+ },
155536
+ gates: {
155537
+ static: "pass",
155538
+ metric: "pass",
155539
+ layout: "not_run",
155540
+ ship: "fail"
155541
+ },
155542
+ policyAction: "substitute",
155543
+ measurementRefs: [
155544
+ "arial-narrow_regular__liberation-sans-narrow#regular#w400#546e8957#analytic_advance#2026-06-04",
155545
+ "arial-narrow_bold__liberation-sans-narrow#bold#w700#8e5eb509#analytic_advance#2026-06-04",
155546
+ "arial-narrow_italic__liberation-sans-narrow#italic#w400#c5de4127#analytic_advance#2026-06-04",
155547
+ "arial-narrow_boldItalic__liberation-sans-narrow#boldItalic#w700#57fe1513#analytic_advance#2026-06-04"
155548
+ ],
155549
+ exportRule: "preserve_original_name",
155550
+ advance: {
155551
+ meanDelta: 0,
155552
+ maxDelta: 0.5
155553
+ },
155554
+ candidateLicense: "GPLv2-with-font-exception",
155555
+ faceVerdicts: {
155556
+ regular: "metric_safe",
155557
+ bold: "visual_only",
155558
+ italic: "metric_safe",
155559
+ boldItalic: "metric_safe"
155560
+ },
155561
+ glyphExceptions: [{
155562
+ slot: "bold",
155563
+ codepoint: 160,
155564
+ advanceDelta: 0.5,
155565
+ note: "Arial Narrow Bold no-break space (U+00A0) is double-width (2x the regular space); Liberation Sans Narrow Bold matches the regular space, so lines containing a non-breaking space reflow. All other glyphs, and the regular/italic/boldItalic faces, match within the direct metric threshold."
155566
+ }]
155567
+ },
155568
+ {
155569
+ evidenceId: "aptos",
155570
+ logicalFamily: "Aptos",
155571
+ physicalFamily: null,
155572
+ verdict: "no_substitute",
155573
+ faces: {
155574
+ regular: false,
155575
+ bold: false,
155576
+ italic: false,
155577
+ boldItalic: false
155578
+ },
155579
+ gates: {
155580
+ static: "not_run",
155581
+ metric: "fail",
155582
+ layout: "not_run",
155583
+ ship: "not_run"
155584
+ },
155585
+ policyAction: "customer_supplied",
155586
+ measurementRefs: ["aptos#top_candidates#2026-06-03"],
155587
+ exportRule: "preserve_original_name",
155588
+ candidateLicense: null
155589
+ },
155590
+ {
155591
+ evidenceId: "consolas",
155592
+ logicalFamily: "Consolas",
155593
+ physicalFamily: "Inconsolata SemiExpanded",
155594
+ verdict: "cell_width_only",
155595
+ faces: {
155596
+ regular: false,
155597
+ bold: false,
155598
+ italic: false,
155599
+ boldItalic: false
155600
+ },
155601
+ gates: {
155602
+ static: "not_run",
155603
+ metric: "not_run",
155604
+ layout: "not_run",
155605
+ ship: "not_run"
155606
+ },
155607
+ policyAction: "category_fallback",
155608
+ measurementRefs: ["consolas__inconsolata-semiexpanded#analytic_advance#2026-06-03"],
155609
+ exportRule: "preserve_original_name",
155610
+ advance: {
155611
+ meanDelta: 0.00035999999999999997,
155612
+ maxDelta: 0.00035999999999999997
155613
+ },
155614
+ candidateLicense: "OFL-1.1"
155615
+ },
155616
+ {
155617
+ evidenceId: "verdana",
155618
+ logicalFamily: "Verdana",
155619
+ physicalFamily: null,
155620
+ verdict: "visual_only",
155621
+ faces: {
155622
+ regular: false,
155623
+ bold: false,
155624
+ italic: false,
155625
+ boldItalic: false
155626
+ },
155627
+ gates: {
155628
+ static: "not_run",
155629
+ metric: "fail",
155630
+ layout: "not_run",
155631
+ ship: "not_run"
155632
+ },
155633
+ policyAction: "category_fallback",
155634
+ measurementRefs: ["verdana#top_candidates#2026-06-03"],
155635
+ exportRule: "preserve_original_name",
155636
+ candidateLicense: null
155637
+ },
155638
+ {
155639
+ evidenceId: "tahoma",
155640
+ logicalFamily: "Tahoma",
155641
+ physicalFamily: null,
155642
+ verdict: "visual_only",
155643
+ faces: {
155644
+ regular: false,
155645
+ bold: false,
155646
+ italic: false,
155647
+ boldItalic: false
155648
+ },
155649
+ gates: {
155650
+ static: "not_run",
155651
+ metric: "fail",
155652
+ layout: "not_run",
155653
+ ship: "not_run"
155654
+ },
155655
+ policyAction: "category_fallback",
155656
+ measurementRefs: ["tahoma#top_candidates#2026-06-03"],
155657
+ exportRule: "preserve_original_name",
155658
+ candidateLicense: null
155659
+ },
155660
+ {
155661
+ evidenceId: "trebuchet-ms",
155662
+ logicalFamily: "Trebuchet MS",
155663
+ physicalFamily: null,
155664
+ verdict: "visual_only",
155665
+ faces: {
155666
+ regular: false,
155667
+ bold: false,
155668
+ italic: false,
155669
+ boldItalic: false
155670
+ },
155671
+ gates: {
155672
+ static: "not_run",
155673
+ metric: "fail",
155674
+ layout: "not_run",
155675
+ ship: "not_run"
155676
+ },
155677
+ policyAction: "category_fallback",
155678
+ measurementRefs: ["trebuchet-ms#top_candidates#2026-06-03"],
155679
+ exportRule: "preserve_original_name",
155680
+ candidateLicense: null
155681
+ },
155682
+ {
155683
+ evidenceId: "comic-sans-ms",
155684
+ logicalFamily: "Comic Sans MS",
155685
+ physicalFamily: "Comic Neue",
155686
+ verdict: "visual_only",
155687
+ faces: {
155688
+ regular: false,
155689
+ bold: false,
155690
+ italic: false,
155691
+ boldItalic: false
155692
+ },
155693
+ gates: {
155694
+ static: "not_run",
155695
+ metric: "fail",
155696
+ layout: "not_run",
155697
+ ship: "not_run"
155698
+ },
155699
+ policyAction: "category_fallback",
155700
+ measurementRefs: ["comic-sans-ms__comic-neue#analytic_advance#2026-06-03"],
155701
+ exportRule: "preserve_original_name",
155702
+ advance: {
155703
+ meanDelta: 0.1005,
155704
+ maxDelta: 0.1419
155705
+ },
155706
+ candidateLicense: "OFL-1.1"
155707
+ },
155708
+ {
155709
+ evidenceId: "candara",
155710
+ logicalFamily: "Candara",
155711
+ physicalFamily: null,
155712
+ verdict: "visual_only",
155713
+ faces: {
155714
+ regular: false,
155715
+ bold: false,
155716
+ italic: false,
155717
+ boldItalic: false
155718
+ },
155719
+ gates: {
155720
+ static: "not_run",
155721
+ metric: "fail",
155722
+ layout: "not_run",
155723
+ ship: "not_run"
155724
+ },
155725
+ policyAction: "category_fallback",
155726
+ measurementRefs: ["candara#top_candidates#2026-06-03"],
155727
+ exportRule: "preserve_original_name",
155728
+ candidateLicense: null
155729
+ },
155730
+ {
155731
+ evidenceId: "constantia",
155732
+ logicalFamily: "Constantia",
155733
+ physicalFamily: null,
155734
+ verdict: "visual_only",
155735
+ faces: {
155736
+ regular: false,
155737
+ bold: false,
155738
+ italic: false,
155739
+ boldItalic: false
155740
+ },
155741
+ gates: {
155742
+ static: "not_run",
155743
+ metric: "fail",
155744
+ layout: "not_run",
155745
+ ship: "not_run"
155746
+ },
155747
+ policyAction: "category_fallback",
155748
+ measurementRefs: ["constantia#top_candidates#2026-06-03"],
155749
+ exportRule: "preserve_original_name",
155750
+ candidateLicense: null
155751
+ },
155752
+ {
155753
+ evidenceId: "corbel",
155754
+ logicalFamily: "Corbel",
155755
+ physicalFamily: null,
155756
+ verdict: "visual_only",
155757
+ faces: {
155758
+ regular: false,
155759
+ bold: false,
155760
+ italic: false,
155761
+ boldItalic: false
155762
+ },
155763
+ gates: {
155764
+ static: "not_run",
155765
+ metric: "fail",
155766
+ layout: "not_run",
155767
+ ship: "not_run"
155768
+ },
155769
+ policyAction: "category_fallback",
155770
+ measurementRefs: ["corbel#top_candidates#2026-06-03"],
155771
+ exportRule: "preserve_original_name",
155772
+ candidateLicense: null
155773
+ },
155774
+ {
155775
+ evidenceId: "lucida-console",
155776
+ logicalFamily: "Lucida Console",
155777
+ physicalFamily: "Cousine",
155778
+ verdict: "cell_width_only",
155779
+ faces: {
155780
+ regular: false,
155781
+ bold: false,
155782
+ italic: false,
155783
+ boldItalic: false
155784
+ },
155785
+ gates: {
155786
+ static: "not_run",
155787
+ metric: "not_run",
155788
+ layout: "not_run",
155789
+ ship: "not_run"
155790
+ },
155791
+ policyAction: "category_fallback",
155792
+ measurementRefs: ["lucida-console__cousine#analytic_advance#2026-06-03"],
155793
+ exportRule: "preserve_original_name",
155794
+ advance: {
155795
+ meanDelta: 0.004050000000000001,
155796
+ maxDelta: 0.004050000000000001
155797
+ },
155798
+ candidateLicense: "OFL-1.1"
155799
+ },
155800
+ {
155801
+ evidenceId: "aptos-display",
155802
+ logicalFamily: "Aptos Display",
155803
+ physicalFamily: null,
155804
+ verdict: "customer_supplied",
155805
+ faces: {
155806
+ regular: false,
155807
+ bold: false,
155808
+ italic: false,
155809
+ boldItalic: false
155810
+ },
155811
+ gates: {
155812
+ static: "not_run",
155813
+ metric: "not_run",
155814
+ layout: "not_run",
155815
+ ship: "fail"
155816
+ },
155817
+ policyAction: "customer_supplied",
155818
+ measurementRefs: [],
155819
+ exportRule: "preserve_original_name"
155820
+ },
155821
+ {
155822
+ evidenceId: "cambria-math",
155823
+ logicalFamily: "Cambria Math",
155824
+ physicalFamily: null,
155825
+ verdict: "preserve_only",
155826
+ faces: {
155827
+ regular: false,
155828
+ bold: false,
155829
+ italic: false,
155830
+ boldItalic: false
155831
+ },
155832
+ gates: {
155833
+ static: "not_run",
155834
+ metric: "not_run",
155835
+ layout: "not_run",
155836
+ ship: "not_run"
155837
+ },
155838
+ policyAction: "preserve_only",
155839
+ measurementRefs: [],
155348
155840
  exportRule: "preserve_original_name"
155349
155841
  },
155350
155842
  {
@@ -155358,20 +155850,20 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155358
155850
  italic: true,
155359
155851
  boldItalic: true
155360
155852
  },
155361
- advance: {
155362
- meanDelta: 0,
155363
- maxDelta: 0
155364
- },
155365
155853
  gates: {
155366
155854
  static: "not_run",
155367
155855
  metric: "pass",
155368
155856
  layout: "not_run",
155369
- ship: "fail"
155857
+ ship: "pass"
155370
155858
  },
155371
155859
  policyAction: "substitute",
155372
155860
  measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
155373
- candidateLicense: "OFL-1.1",
155374
- exportRule: "preserve_original_name"
155861
+ exportRule: "preserve_original_name",
155862
+ advance: {
155863
+ meanDelta: 0,
155864
+ maxDelta: 0
155865
+ },
155866
+ candidateLicense: "OFL-1.1"
155375
155867
  },
155376
155868
  {
155377
155869
  evidenceId: "calibri-light",
@@ -155384,10 +155876,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155384
155876
  italic: false,
155385
155877
  boldItalic: false
155386
155878
  },
155387
- advance: {
155388
- meanDelta: 0.0148,
155389
- maxDelta: 0.066
155390
- },
155391
155879
  gates: {
155392
155880
  static: "not_run",
155393
155881
  metric: "fail",
@@ -155396,17 +155884,53 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155396
155884
  },
155397
155885
  policyAction: "category_fallback",
155398
155886
  measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
155887
+ exportRule: "preserve_original_name",
155888
+ advance: {
155889
+ meanDelta: 0.0148,
155890
+ maxDelta: 0.066
155891
+ },
155892
+ candidateLicense: "OFL-1.1"
155893
+ },
155894
+ {
155895
+ evidenceId: "baskerville-old-face",
155896
+ logicalFamily: "Baskerville Old Face",
155897
+ physicalFamily: "Bacasime Antique",
155898
+ verdict: "visual_only",
155899
+ faces: {
155900
+ regular: true,
155901
+ bold: false,
155902
+ italic: false,
155903
+ boldItalic: false
155904
+ },
155905
+ gates: {
155906
+ static: "pass",
155907
+ metric: "fail",
155908
+ layout: "not_run",
155909
+ ship: "not_run"
155910
+ },
155911
+ policyAction: "substitute",
155912
+ measurementRefs: ["baskerville-old-face_regular__bacasime-antique#regular#w400#7dac1e5f#analytic_advance#2026-06-05"],
155913
+ exportRule: "preserve_original_name",
155914
+ advance: {
155915
+ meanDelta: 0,
155916
+ maxDelta: 0.4915590863952334
155917
+ },
155399
155918
  candidateLicense: "OFL-1.1",
155400
- exportRule: "preserve_original_name"
155919
+ faceVerdicts: { regular: "visual_only" },
155920
+ glyphExceptions: [{
155921
+ slot: "regular",
155922
+ codepoint: 160,
155923
+ advanceDelta: 0.4916,
155924
+ note: "Bacasime Antique Regular's no-break space (U+00A0) advance diverges ~49% from Baskerville Old Face; lines containing NBSP reflow. Every other Latin-core glyph is advance-identical, which is why this is visual_only with a single named exception, not near_metric."
155925
+ }]
155401
155926
  }
155927
+ ];
155928
+ LINE_BREAK_SAFE_VERDICTS = new Set([
155929
+ "metric_safe",
155930
+ "near_metric",
155931
+ "cell_width_only"
155402
155932
  ]);
155403
- BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
155404
- CATEGORY_FALLBACKS = deriveCategoryFallbacks();
155405
- defaultResolver = new FontResolver;
155406
- DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
155407
- resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
155408
- fontSignature: ""
155409
- });
155933
+ BY_LOGICAL = new Map(SUBSTITUTION_EVIDENCE$1.map((row) => [normalizeFamilyName(row.logicalFamily), row]));
155410
155934
  BUNDLED_MANIFEST = Object.freeze([
155411
155935
  family("Carlito", "Carlito", "OFL-1.1"),
155412
155936
  family("Caladea", "Caladea", "Apache-2.0"),
@@ -155414,7 +155938,17 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155414
155938
  family("Liberation Serif", "LiberationSerif", "OFL-1.1"),
155415
155939
  family("Liberation Mono", "LiberationMono", "OFL-1.1")
155416
155940
  ]);
155941
+ SUBSTITUTION_EVIDENCE = SUBSTITUTION_EVIDENCE$1;
155942
+ bundledFamilies = new Set(BUNDLED_MANIFEST.map((f2) => f2.family));
155943
+ BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
155944
+ CATEGORY_FALLBACKS = deriveCategoryFallbacks();
155945
+ defaultResolver = new FontResolver;
155946
+ DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
155947
+ resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
155948
+ fontSignature: ""
155949
+ });
155417
155950
  installedRegistries = /* @__PURE__ */ new WeakMap;
155951
+ RENDER_ALL = { canRenderFamily: () => true };
155418
155952
  OS2_MIN_LENGTH = OS2_FSSELECTION + 2;
155419
155953
  registriesByFontSet = /* @__PURE__ */ new WeakMap;
155420
155954
  PHYSICAL_GENERIC = Object.freeze({
@@ -157219,7 +157753,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
157219
157753
  };
157220
157754
  });
157221
157755
 
157222
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DUhzXJ4D.es.js
157756
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DOEFHsWP.es.js
157223
157757
  function parseSizeUnit(val = "0") {
157224
157758
  const length = val.toString() || "0";
157225
157759
  const value = Number.parseFloat(length);
@@ -161067,6 +161601,8 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
161067
161601
  const absTo = mapping.map(target.absTo);
161068
161602
  const replacementText = getReplacementText(step2.args.replacement);
161069
161603
  const marks = resolveMarksForRange(editor, target, step2);
161604
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
161605
+ const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt(tr, pos, lineBreakNodeType) : false;
161070
161606
  const structuralRewrite = resolveStructuralRangeRewrite(tr.doc, absFrom, absTo, step2);
161071
161607
  if (structuralRewrite) {
161072
161608
  const slice2 = buildReplacementParagraphSlice(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step2.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
@@ -161094,7 +161630,7 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
161094
161630
  tr.delete(absFrom, absTo);
161095
161631
  return { changed: target.text.length > 0 };
161096
161632
  }
161097
- const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks));
161633
+ const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom) });
161098
161634
  tr.replaceWith(absFrom, absTo, content2);
161099
161635
  return { changed: replacementText !== target.text };
161100
161636
  }
@@ -161136,17 +161672,17 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
161136
161672
  if (change.type === "delete")
161137
161673
  tr.delete(remap(change.docFrom), remap(change.docTo));
161138
161674
  else if (change.type === "insert") {
161139
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
161675
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos)) });
161140
161676
  tr.insert(remap(change.docPos), content2);
161141
161677
  } else {
161142
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
161678
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom)) });
161143
161679
  tr.replaceWith(remap(change.docFrom), remap(change.docTo), content2);
161144
161680
  }
161145
161681
  }
161146
161682
  } else if (trimmedNew.length === 0)
161147
161683
  tr.delete(trimmedFrom, trimmedTo);
161148
161684
  else {
161149
- const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks));
161685
+ const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom) });
161150
161686
  tr.replaceWith(trimmedFrom, trimmedTo, content2);
161151
161687
  }
161152
161688
  return { changed: replacementText !== target.text };
@@ -161217,7 +161753,12 @@ function executeTextInsert(editor, tr, target, step2, mapping) {
161217
161753
  }
161218
161754
  const tabNodeType = editor.state.schema.nodes?.tab;
161219
161755
  const parentAllowsTab = tabNodeType && text4.includes("\t") ? parentAllowsNodeAt(tr, absPos, tabNodeType) : false;
161220
- tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, { parentAllowsTab }));
161756
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
161757
+ const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text4) ? parentAllowsNodeAt(tr, absPos, lineBreakNodeType) : false;
161758
+ tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, {
161759
+ parentAllowsTab,
161760
+ parentAllowsLineBreak
161761
+ }));
161221
161762
  return { changed: true };
161222
161763
  }
161223
161764
  function executeTextDelete(_editor, tr, target, _step, mapping) {
@@ -161311,7 +161852,9 @@ function executeSpanTextRewrite(editor, tr, target, step2, mapping) {
161311
161852
  const absTo = mapping.map(lastSeg.absTo, -1);
161312
161853
  if (replacementBlocks.length === 1) {
161313
161854
  const marks = resolveSpanMarks(editor, target, policy, step2.id);
161314
- const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks));
161855
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
161856
+ const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt(tr, absFrom, lineBreakNodeType) : false;
161857
+ const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks), { parentAllowsLineBreak });
161315
161858
  tr.replaceWith(absFrom, absTo, content2);
161316
161859
  return { changed: true };
161317
161860
  }
@@ -162538,7 +163081,7 @@ function materializeTab(schema) {
162538
163081
  return nodeType.create();
162539
163082
  }
162540
163083
  function materializeLineBreak(schema) {
162541
- const nodeType = schema.nodes.hardBreak ?? schema.nodes.lineBreak;
163084
+ const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
162542
163085
  if (!nodeType)
162543
163086
  return schema.text(`
162544
163087
  `);
@@ -166663,6 +167206,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
166663
167206
  disabled: !context,
166664
167207
  value: typeof superdoc?.getZoom === "function" ? superdoc.getZoom() : 100
166665
167208
  };
167209
+ }, createZoomFitWidthStateDeriver = () => ({ context, superdoc }) => {
167210
+ return {
167211
+ active: (typeof superdoc?.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined) === "fit-width",
167212
+ disabled: !context || typeof superdoc?.setZoomMode !== "function"
167213
+ };
166666
167214
  }, createDocumentModeStateDeriver = () => ({ context, superdoc }) => {
166667
167215
  return {
166668
167216
  active: false,
@@ -166683,6 +167231,12 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
166683
167231
  return false;
166684
167232
  superdoc.setZoom?.(normalizedPayload);
166685
167233
  return true;
167234
+ }, createZoomFitWidthExecute = () => ({ superdoc }) => {
167235
+ if (typeof superdoc?.setZoomMode !== "function")
167236
+ return false;
167237
+ const mode = typeof superdoc.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined;
167238
+ superdoc.setZoomMode(mode === "fit-width" ? "manual" : "fit-width");
167239
+ return true;
166686
167240
  }, createDocumentModeExecute = () => ({ superdoc, payload }) => {
166687
167241
  const validModes = [
166688
167242
  "editing",
@@ -167356,6 +167910,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
167356
167910
  state: createZoomStateDeriver(),
167357
167911
  execute: createZoomExecute()
167358
167912
  },
167913
+ "zoom-fit-width": {
167914
+ id: "zoom-fit-width",
167915
+ state: createZoomFitWidthStateDeriver(),
167916
+ execute: createZoomFitWidthExecute()
167917
+ },
167359
167918
  "document-mode": {
167360
167919
  id: "document-mode",
167361
167920
  state: createDocumentModeStateDeriver(),
@@ -167552,9 +168111,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
167552
168111
  }
167553
168112
  };
167554
168113
  };
167555
- var init_create_headless_toolbar_DUhzXJ4D_es = __esm(() => {
167556
- init_SuperConverter_DOoAJ6Zk_es();
167557
- init_uuid_qzgm05fK_es();
168114
+ var init_create_headless_toolbar_DOEFHsWP_es = __esm(() => {
168115
+ init_SuperConverter_CfRQprW6_es();
168116
+ init_uuid_B2wVPhPi_es();
167558
168117
  init_constants_D9qj59G2_es();
167559
168118
  init_dist_B8HfvhaK_es();
167560
168119
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -168741,7 +169300,7 @@ var init_remark_stringify_6MMJfY0k_es = __esm(() => {
168741
169300
  eol = /\r?\n|\r/g;
168742
169301
  });
168743
169302
 
168744
- // ../../packages/superdoc/dist/chunks/detect-container-B6sqy7HZ.es.js
169303
+ // ../../packages/superdoc/dist/chunks/detect-container-sTWXwOzh.es.js
168745
169304
  function matchesMagic(bytes, magic) {
168746
169305
  if (bytes.length < magic.length)
168747
169306
  return false;
@@ -168759,7 +169318,7 @@ function detectContainerType(data) {
168759
169318
  return "unknown";
168760
169319
  }
168761
169320
  var ZIP_MAGIC, CFB_MAGIC;
168762
- var init_detect_container_B6sqy7HZ_es = __esm(() => {
169321
+ var init_detect_container_sTWXwOzh_es = __esm(() => {
168763
169322
  ZIP_MAGIC = [
168764
169323
  80,
168765
169324
  75,
@@ -168778,13 +169337,13 @@ var init_detect_container_B6sqy7HZ_es = __esm(() => {
168778
169337
  ];
168779
169338
  });
168780
169339
 
168781
- // ../../packages/superdoc/dist/chunks/detect-container-Cs3KoJVc.es.js
168782
- var exports_detect_container_Cs3KoJVc_es = {};
168783
- __export(exports_detect_container_Cs3KoJVc_es, {
169340
+ // ../../packages/superdoc/dist/chunks/detect-container-0tUwtCR4.es.js
169341
+ var exports_detect_container_0tUwtCR4_es = {};
169342
+ __export(exports_detect_container_0tUwtCR4_es, {
168784
169343
  detectContainerType: () => detectContainerType
168785
169344
  });
168786
- var init_detect_container_Cs3KoJVc_es = __esm(() => {
168787
- init_detect_container_B6sqy7HZ_es();
169345
+ var init_detect_container_0tUwtCR4_es = __esm(() => {
169346
+ init_detect_container_sTWXwOzh_es();
168788
169347
  });
168789
169348
 
168790
169349
  // ../../packages/superdoc/dist/chunks/errors-CNaD6vcg.es.js
@@ -168837,9 +169396,9 @@ var init_errors_CNaD6vcg_es = __esm(() => {
168837
169396
  };
168838
169397
  });
168839
169398
 
168840
- // ../../packages/superdoc/dist/chunks/decrypt-docx-G2a7hkiV.es.js
168841
- var exports_decrypt_docx_G2a7hkiV_es = {};
168842
- __export(exports_decrypt_docx_G2a7hkiV_es, {
169399
+ // ../../packages/superdoc/dist/chunks/decrypt-docx-CPcaRl5W.es.js
169400
+ var exports_decrypt_docx_CPcaRl5W_es = {};
169401
+ __export(exports_decrypt_docx_CPcaRl5W_es, {
168843
169402
  decryptDocxIfNeeded: () => decryptDocxIfNeeded
168844
169403
  });
168845
169404
  function concatUint8Arrays(chunks) {
@@ -169380,10 +169939,10 @@ async function decryptDocxIfNeeded(data, options) {
169380
169939
  };
169381
169940
  }
169382
169941
  var CFB_SIGNATURE, CFB_END_OF_CHAIN = 4294967294, CFB_OBJECT_TYPE, utf16LeDecoder, AGILE_VERSION = 4, AGILE_RESERVED = 4, STANDARD_VERSION_3 = 3, STANDARD_VERSION_4 = 4, STANDARD_RESERVED = 3, MIN_HEADER_SIZE = 8, BLOCK_KEY_VERIFIER_INPUT, BLOCK_KEY_VERIFIER_VALUE, BLOCK_KEY_ENCRYPTED_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, SEGMENT_SIZE = 4096, PACKAGE_HEADER_SIZE = 8;
169383
- var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
169942
+ var init_decrypt_docx_CPcaRl5W_es = __esm(() => {
169384
169943
  init_dist_B8HfvhaK_es();
169385
169944
  init_errors_CNaD6vcg_es();
169386
- init_detect_container_B6sqy7HZ_es();
169945
+ init_detect_container_sTWXwOzh_es();
169387
169946
  CFB_SIGNATURE = new Uint8Array([
169388
169947
  208,
169389
169948
  207,
@@ -169452,7 +170011,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
169452
170011
  ]);
169453
170012
  });
169454
170013
 
169455
- // ../../packages/superdoc/dist/chunks/DocxZipper-Bu2Fhqkw.es.js
170014
+ // ../../packages/superdoc/dist/chunks/DocxZipper-FUsfThjV.es.js
169456
170015
  function sniffEncoding(u8) {
169457
170016
  if (u8.length >= 2) {
169458
170017
  const b0 = u8[0], b1 = u8[1];
@@ -169768,11 +170327,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
169768
170327
  return new Uint8Array(0);
169769
170328
  }
169770
170329
  async getDocxData(file2, isNode = false, options = {}) {
169771
- const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_Cs3KoJVc_es(), exports_detect_container_Cs3KoJVc_es));
170330
+ const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_0tUwtCR4_es(), exports_detect_container_0tUwtCR4_es));
169772
170331
  const containerType = detectContainerType2(await this.#peekBytes(file2, 8));
169773
170332
  let fileData = file2;
169774
170333
  if (containerType === "cfb") {
169775
- const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_G2a7hkiV_es(), exports_decrypt_docx_G2a7hkiV_es));
170334
+ const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_CPcaRl5W_es(), exports_decrypt_docx_CPcaRl5W_es));
169776
170335
  const result = await decryptDocxIfNeeded2(file2 instanceof Uint8Array ? file2 : file2 instanceof ArrayBuffer ? new Uint8Array(file2) : new Uint8Array(await file2.arrayBuffer()), { password: options.password });
169777
170336
  fileData = result.data;
169778
170337
  this.decryptedFileData = result.data;
@@ -170125,7 +170684,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
170125
170684
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
170126
170685
  }
170127
170686
  }, DocxZipper_default;
170128
- var init_DocxZipper_Bu2Fhqkw_es = __esm(() => {
170687
+ var init_DocxZipper_FUsfThjV_es = __esm(() => {
170129
170688
  init_rolldown_runtime_Bg48TavK_es();
170130
170689
  init_jszip_C49i9kUs_es();
170131
170690
  init_xml_js_CqGKpaft_es();
@@ -196961,8 +197520,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
196961
197520
  patchFlag |= 2048;
196962
197521
  }
196963
197522
  root2.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root2.children, patchFlag, undefined, undefined, true, undefined, false);
196964
- } else
196965
- ;
197523
+ }
196966
197524
  }
196967
197525
  function traverseChildren(parent, context) {
196968
197526
  let i4 = 0;
@@ -211526,9 +212084,9 @@ var init_unified_vFnLRfAM_es = __esm(() => {
211526
212084
  init_unified_Dsuw2be5_es();
211527
212085
  });
211528
212086
 
211529
- // ../../packages/superdoc/dist/chunks/rehype-parse-q8NfsLv7.es.js
211530
- var exports_rehype_parse_q8NfsLv7_es = {};
211531
- __export(exports_rehype_parse_q8NfsLv7_es, {
212087
+ // ../../packages/superdoc/dist/chunks/rehype-parse-DTSDs3kr.es.js
212088
+ var exports_rehype_parse_DTSDs3kr_es = {};
212089
+ __export(exports_rehype_parse_DTSDs3kr_es, {
211532
212090
  default: () => rehypeParse
211533
212091
  });
211534
212092
  function merge2(definitions, space) {
@@ -217477,7 +218035,7 @@ var Schema2 = class {
217477
218035
  }
217478
218036
  }
217479
218037
  }, TABLE_VOID_ELEMENTS, errors4, base2 = "https://html.spec.whatwg.org/multipage/parsing.html#parse-error-", dashToCamelRe, formatCRe, formatXRe, fatalities, emptyOptions3;
217480
- var init_rehype_parse_q8NfsLv7_es = __esm(() => {
218038
+ var init_rehype_parse_DTSDs3kr_es = __esm(() => {
217481
218039
  init_rolldown_runtime_Bg48TavK_es();
217482
218040
  init_default_BqgWzMfR_es();
217483
218041
  init_lib_CYqLdG4z_es();
@@ -220222,9 +220780,9 @@ var init_rehype_parse_q8NfsLv7_es = __esm(() => {
220222
220780
  emptyOptions3 = {};
220223
220781
  });
220224
220782
 
220225
- // ../../packages/superdoc/dist/chunks/rehype-remark-CKg94dxK.es.js
220226
- var exports_rehype_remark_CKg94dxK_es = {};
220227
- __export(exports_rehype_remark_CKg94dxK_es, {
220783
+ // ../../packages/superdoc/dist/chunks/rehype-remark-Bt5njn02.es.js
220784
+ var exports_rehype_remark_Bt5njn02_es = {};
220785
+ __export(exports_rehype_remark_Bt5njn02_es, {
220228
220786
  default: () => rehypeRemark
220229
220787
  });
220230
220788
  function anyFactory2(tests) {
@@ -221844,7 +222402,7 @@ var env, deserializer = ($2, _2) => {
221844
222402
  if (is(parent.children[index2], index2, parent))
221845
222403
  return parent.children[index2];
221846
222404
  }, searchLineFeeds, searchTabOrSpaces, br$1, cell, p$1, row, notRendered, blockOrCaption, prefix = "language-", defaultChecked = "[x]", defaultUnchecked = "[ ]", own$12, list$1, basic, meta3, defaultQuotes, nodeHandlers2, handlers2, own6, emptyOptions4, defaults;
221847
- var init_rehype_remark_CKg94dxK_es = __esm(() => {
222405
+ var init_rehype_remark_Bt5njn02_es = __esm(() => {
221848
222406
  init_lib_DEff_P2k_es();
221849
222407
  env = typeof self === "object" ? self : globalThis;
221850
222408
  ({ toString: toString$1 } = {});
@@ -222238,7 +222796,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
222238
222796
  init_remark_gfm_BhnWr3yf_es();
222239
222797
  });
222240
222798
 
222241
- // ../../packages/superdoc/dist/chunks/src-DEnygTyz.es.js
222799
+ // ../../packages/superdoc/dist/chunks/src-DIVxfqYC.es.js
222242
222800
  function deleteProps(obj, propOrProps) {
222243
222801
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
222244
222802
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -222312,7 +222870,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
222312
222870
  }
222313
222871
  function getSuperdocVersion() {
222314
222872
  try {
222315
- return "1.38.0";
222873
+ return "1.39.0";
222316
222874
  } catch {
222317
222875
  return "unknown";
222318
222876
  }
@@ -253696,7 +254254,12 @@ function insertTextAroundSdt(editor, target, content3, resolvePos) {
253696
254254
  const { tr } = editor.state;
253697
254255
  const tabType = editor.schema.nodes?.tab;
253698
254256
  const parentAllowsTab = tabType && content3.includes("\t") ? parentAllowsNodeAt(tr, pos, tabType) : false;
253699
- tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, { parentAllowsTab }));
254257
+ const lineBreakType = editor.schema.nodes?.lineBreak;
254258
+ const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content3) ? parentAllowsNodeAt(tr, pos, lineBreakType) : false;
254259
+ tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, {
254260
+ parentAllowsTab,
254261
+ parentAllowsLineBreak
254262
+ }));
253700
254263
  dispatchTransaction$1(editor, tr);
253701
254264
  return true;
253702
254265
  }
@@ -295829,17 +296392,25 @@ var Node$13 = class Node$14 {
295829
296392
  this.deco = deco;
295830
296393
  }
295831
296394
  }, searchKey, BLOCK_SEPARATOR = `
295832
- `, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node2) => node2?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, SearchIndex, customSearchHighlightsKey, isRegExp2 = (value) => Object.prototype.toString.call(value) === "[object RegExp]", SEARCH_POSITION_TRACKER_TYPE = "search-match", DEFAULT_SEARCH_MODEL = "raw", normalizeSearchModel = (value) => value === "visible" ? "visible" : DEFAULT_SEARCH_MODEL, mapIndexMatchesToDocMatches = ({ searchIndex, indexMatches, doc: doc$12, positionTracker }) => {
296395
+ `, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node2) => node2?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, readLeafText = (node2) => {
296396
+ const leafText = node2?.type?.spec?.leafText;
296397
+ if (typeof leafText === "function")
296398
+ return leafText(node2);
296399
+ if (typeof leafText === "string")
296400
+ return leafText;
296401
+ return ATOM_PLACEHOLDER;
296402
+ }, SearchIndex, customSearchHighlightsKey, isRegExp2 = (value) => Object.prototype.toString.call(value) === "[object RegExp]", SEARCH_POSITION_TRACKER_TYPE = "search-match", DEFAULT_SEARCH_MODEL = "raw", normalizeSearchModel = (value) => value === "visible" ? "visible" : DEFAULT_SEARCH_MODEL, mapIndexMatchesToDocMatches = ({ searchIndex, indexMatches, doc: doc$12, positionTracker }) => {
295833
296403
  const matches2 = [];
295834
296404
  for (const indexMatch of indexMatches) {
295835
296405
  const ranges = searchIndex.offsetRangeToDocRanges(indexMatch.start, indexMatch.end);
295836
296406
  if (ranges.length === 0)
295837
296407
  continue;
295838
296408
  const matchTexts = ranges.map((r$1) => doc$12.textBetween(r$1.from, r$1.to));
296409
+ const matchText = typeof indexMatch.text === "string" ? indexMatch.text : matchTexts.join("");
295839
296410
  const match$1 = {
295840
296411
  from: ranges[0].from,
295841
296412
  to: ranges[ranges.length - 1].to,
295842
- text: matchTexts.join(""),
296413
+ text: matchText,
295843
296414
  id: v4_default(),
295844
296415
  ranges,
295845
296416
  trackerIds: []
@@ -299059,7 +299630,7 @@ var Node$13 = class Node$14 {
299059
299630
  domAvailabilityCache = false;
299060
299631
  return false;
299061
299632
  }
299062
- }, summaryVersion = "1.38.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
299633
+ }, summaryVersion = "1.39.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
299063
299634
  const container = document.createElement("div");
299064
299635
  container.innerHTML = html3;
299065
299636
  const result = [];
@@ -300245,7 +300816,7 @@ var Node$13 = class Node$14 {
300245
300816
  return () => {};
300246
300817
  const handle3 = setInterval(callback, intervalMs);
300247
300818
  return () => clearInterval(handle3);
300248
- }, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.38.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, TRACKED_REVIEW_MARK_NAMES2, isTrackedReviewMark = (mark2) => Boolean(mark2?.type?.name && TRACKED_REVIEW_MARK_NAMES2.has(mark2.type.name)), trackedReviewMarkKey = (mark2) => {
300819
+ }, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.39.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, TRACKED_REVIEW_MARK_NAMES2, isTrackedReviewMark = (mark2) => Boolean(mark2?.type?.name && TRACKED_REVIEW_MARK_NAMES2.has(mark2.type.name)), trackedReviewMarkKey = (mark2) => {
300249
300820
  if (!isTrackedReviewMark(mark2))
300250
300821
  return null;
300251
300822
  const id2 = typeof mark2.attrs?.id === "string" ? mark2.attrs.id : "";
@@ -319423,19 +319994,19 @@ menclose::after {
319423
319994
  return;
319424
319995
  console.log(...args$1);
319425
319996
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions, TRACKED_MARK_NAMES;
319426
- var init_src_DEnygTyz_es = __esm(() => {
319997
+ var init_src_DIVxfqYC_es = __esm(() => {
319427
319998
  init_rolldown_runtime_Bg48TavK_es();
319428
- init_SuperConverter_DOoAJ6Zk_es();
319999
+ init_SuperConverter_CfRQprW6_es();
319429
320000
  init_jszip_C49i9kUs_es();
319430
320001
  init_xml_js_CqGKpaft_es();
319431
- init_uuid_qzgm05fK_es();
319432
- init_create_headless_toolbar_DUhzXJ4D_es();
320002
+ init_uuid_B2wVPhPi_es();
320003
+ init_create_headless_toolbar_DOEFHsWP_es();
319433
320004
  init_constants_D9qj59G2_es();
319434
320005
  init_dist_B8HfvhaK_es();
319435
320006
  init_unified_Dsuw2be5_es();
319436
320007
  init_remark_gfm_BhnWr3yf_es();
319437
320008
  init_remark_stringify_6MMJfY0k_es();
319438
- init_DocxZipper_Bu2Fhqkw_es();
320009
+ init_DocxZipper_FUsfThjV_es();
319439
320010
  init__plugin_vue_export_helper_5t5P5NuM_es();
319440
320011
  init_eventemitter3_BnGqBE_Q_es();
319441
320012
  init_errors_CNaD6vcg_es();
@@ -323327,10 +323898,12 @@ ${err.toString()}`);
323327
323898
  return false;
323328
323899
  const { $from } = selection;
323329
323900
  let paragraph2 = null;
323901
+ let paragraphDepth = null;
323330
323902
  for (let d = $from.depth;d >= 0; d--) {
323331
323903
  const node2 = $from.node(d);
323332
323904
  if (node2.type.name === "paragraph") {
323333
323905
  paragraph2 = node2;
323906
+ paragraphDepth = d;
323334
323907
  break;
323335
323908
  }
323336
323909
  }
@@ -323340,7 +323913,14 @@ ${err.toString()}`);
323340
323913
  return false;
323341
323914
  if (!isVisuallyEmptyParagraph(paragraph2) && !hasOnlyBreakContent(paragraph2))
323342
323915
  return false;
323343
- const tr = state.tr.insertText(event.data);
323916
+ let tr = state.tr;
323917
+ if (hasOnlyBreakContent(paragraph2) && paragraphDepth != null) {
323918
+ const contentStart = $from.start(paragraphDepth);
323919
+ const contentEnd = $from.end(paragraphDepth);
323920
+ tr = tr.delete(contentStart, contentEnd).insertText(event.data, contentStart);
323921
+ tr = tr.setSelection(TextSelection.create(tr.doc, contentStart + event.data.length));
323922
+ } else
323923
+ tr = tr.insertText(event.data);
323344
323924
  view.dispatch(tr);
323345
323925
  event.preventDefault();
323346
323926
  return true;
@@ -323660,6 +324240,8 @@ ${err.toString()}`);
323660
324240
  selectable: false,
323661
324241
  content: "",
323662
324242
  atom: true,
324243
+ leafText: () => `
324244
+ `,
323663
324245
  addOptions() {
323664
324246
  return {};
323665
324247
  },
@@ -337491,7 +338073,7 @@ function print() { __p += __j.call(arguments, '') }
337491
338073
  if (searchModel === "visible")
337492
338074
  this.#buildVisible(doc$12);
337493
338075
  else
337494
- this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, ATOM_PLACEHOLDER);
338076
+ this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, readLeafText);
337495
338077
  this.segments = [];
337496
338078
  this.docSize = doc$12.content.size;
337497
338079
  this.doc = doc$12;
@@ -337538,7 +338120,11 @@ function print() { __p += __j.call(arguments, '') }
337538
338120
  return;
337539
338121
  }
337540
338122
  if (node2.isLeaf) {
337541
- parts.push(ATOM_PLACEHOLDER);
338123
+ if (hasTrackDeleteMark$2(node2)) {
338124
+ appendDeletionBarrier();
338125
+ return;
338126
+ }
338127
+ parts.push(readLeafText(node2));
337542
338128
  emittedDeletionBarrier = false;
337543
338129
  return;
337544
338130
  }
@@ -337601,26 +338187,43 @@ function print() { __p += __j.call(arguments, '') }
337601
338187
  return offset$1;
337602
338188
  }
337603
338189
  if (node2.isLeaf) {
338190
+ if (searchModel === "visible" && hasTrackDeleteMark$2(node2)) {
338191
+ if (context?.deletionBarrierActive)
338192
+ return offset$1;
338193
+ addSegment({
338194
+ offsetStart: offset$1,
338195
+ offsetEnd: offset$1 + 1,
338196
+ docFrom: docPos,
338197
+ docTo: docPos + node2.nodeSize,
338198
+ kind: "atom"
338199
+ });
338200
+ if (context)
338201
+ context.deletionBarrierActive = true;
338202
+ return offset$1 + 1;
338203
+ }
337604
338204
  if (context && searchModel === "visible")
337605
338205
  context.deletionBarrierActive = false;
338206
+ const leafText = readLeafText(node2);
338207
+ if (leafText.length === 0)
338208
+ return offset$1;
337606
338209
  if (node2.type.name === "hard_break") {
337607
338210
  addSegment({
337608
338211
  offsetStart: offset$1,
337609
- offsetEnd: offset$1 + 1,
338212
+ offsetEnd: offset$1 + leafText.length,
337610
338213
  docFrom: docPos,
337611
338214
  docTo: docPos + node2.nodeSize,
337612
338215
  kind: "hardBreak"
337613
338216
  });
337614
- return offset$1 + 1;
338217
+ return offset$1 + leafText.length;
337615
338218
  }
337616
338219
  addSegment({
337617
338220
  offsetStart: offset$1,
337618
- offsetEnd: offset$1 + 1,
338221
+ offsetEnd: offset$1 + leafText.length,
337619
338222
  docFrom: docPos,
337620
338223
  docTo: docPos + node2.nodeSize,
337621
338224
  kind: "atom"
337622
338225
  });
337623
- return offset$1 + 1;
338226
+ return offset$1 + leafText.length;
337624
338227
  }
337625
338228
  return this.#walkNodeContent(node2, docPos + 1, offset$1, addSegment, searchModel, context);
337626
338229
  }
@@ -337637,24 +338240,56 @@ function print() { __p += __j.call(arguments, '') }
337637
338240
  }
337638
338241
  offsetRangeToDocRanges(start$1, end$1) {
337639
338242
  const ranges = [];
338243
+ let current = null;
337640
338244
  for (const segment of this.segments) {
337641
338245
  if (segment.offsetEnd <= start$1)
337642
338246
  continue;
337643
338247
  if (segment.offsetStart >= end$1)
337644
338248
  break;
337645
- if (segment.kind !== "text")
338249
+ if (segment.kind === "blockSep") {
338250
+ if (current) {
338251
+ ranges.push({
338252
+ from: current.from,
338253
+ to: current.to
338254
+ });
338255
+ current = null;
338256
+ }
337646
338257
  continue;
338258
+ }
337647
338259
  const overlapStart = Math.max(start$1, segment.offsetStart);
337648
338260
  const overlapEnd = Math.min(end$1, segment.offsetEnd);
337649
- if (overlapStart < overlapEnd) {
337650
- const startInSegment = overlapStart - segment.offsetStart;
337651
- const endInSegment = overlapEnd - segment.offsetStart;
337652
- ranges.push({
337653
- from: segment.docFrom + startInSegment,
337654
- to: segment.docFrom + endInSegment
337655
- });
338261
+ if (overlapStart >= overlapEnd)
338262
+ continue;
338263
+ let from$1;
338264
+ let to;
338265
+ if (segment.kind === "text") {
338266
+ from$1 = segment.docFrom + (overlapStart - segment.offsetStart);
338267
+ to = segment.docFrom + (overlapEnd - segment.offsetStart);
338268
+ } else {
338269
+ from$1 = segment.docFrom;
338270
+ to = segment.docTo;
338271
+ }
338272
+ if (current && segment.offsetStart === current.offsetEnd && from$1 === current.to) {
338273
+ current.to = to;
338274
+ current.offsetEnd = overlapEnd;
338275
+ } else {
338276
+ if (current)
338277
+ ranges.push({
338278
+ from: current.from,
338279
+ to: current.to
338280
+ });
338281
+ current = {
338282
+ from: from$1,
338283
+ to,
338284
+ offsetEnd: overlapEnd
338285
+ };
337656
338286
  }
337657
338287
  }
338288
+ if (current)
338289
+ ranges.push({
338290
+ from: current.from,
338291
+ to: current.to
338292
+ });
337658
338293
  return ranges;
337659
338294
  }
337660
338295
  offsetToDocPos(offset$1) {
@@ -345418,8 +346053,8 @@ function print() { __p += __j.call(arguments, '') }
345418
346053
  try {
345419
346054
  const [{ unified: unified$1 }, { default: rehypeParse2 }, { default: rehypeRemark2 }, { default: remarkStringify$1 }, { default: remarkGfm$1 }] = await Promise.all([
345420
346055
  Promise.resolve().then(() => (init_unified_vFnLRfAM_es(), exports_unified_vFnLRfAM_es)),
345421
- Promise.resolve().then(() => (init_rehype_parse_q8NfsLv7_es(), exports_rehype_parse_q8NfsLv7_es)),
345422
- Promise.resolve().then(() => (init_rehype_remark_CKg94dxK_es(), exports_rehype_remark_CKg94dxK_es)),
346056
+ Promise.resolve().then(() => (init_rehype_parse_DTSDs3kr_es(), exports_rehype_parse_DTSDs3kr_es)),
346057
+ Promise.resolve().then(() => (init_rehype_remark_Bt5njn02_es(), exports_rehype_remark_Bt5njn02_es)),
345423
346058
  Promise.resolve().then(() => (init_remark_stringify_B_orWEvD_es(), exports_remark_stringify_B_orWEvD_es)),
345424
346059
  Promise.resolve().then(() => (init_remark_gfm_eZN6yzWQ_es(), exports_remark_gfm_eZN6yzWQ_es))
345425
346060
  ]);
@@ -354269,11 +354904,11 @@ function print() { __p += __j.call(arguments, '') }
354269
354904
  ]);
354270
354905
  });
354271
354906
 
354272
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CmcU7hTR.es.js
354907
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CanMzNxA.es.js
354273
354908
  var headlessToolbarConstants, MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
354274
- var init_create_super_doc_ui_CmcU7hTR_es = __esm(() => {
354275
- init_SuperConverter_DOoAJ6Zk_es();
354276
- init_create_headless_toolbar_DUhzXJ4D_es();
354909
+ var init_create_super_doc_ui_CanMzNxA_es = __esm(() => {
354910
+ init_SuperConverter_CfRQprW6_es();
354911
+ init_create_headless_toolbar_DOEFHsWP_es();
354277
354912
  headlessToolbarConstants = {
354278
354913
  DEFAULT_TEXT_ALIGN_OPTIONS: [
354279
354914
  {
@@ -354555,16 +355190,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
354555
355190
 
354556
355191
  // ../../packages/superdoc/dist/super-editor.es.js
354557
355192
  var init_super_editor_es = __esm(() => {
354558
- init_src_DEnygTyz_es();
354559
- init_SuperConverter_DOoAJ6Zk_es();
355193
+ init_src_DIVxfqYC_es();
355194
+ init_SuperConverter_CfRQprW6_es();
354560
355195
  init_jszip_C49i9kUs_es();
354561
355196
  init_xml_js_CqGKpaft_es();
354562
- init_create_headless_toolbar_DUhzXJ4D_es();
355197
+ init_create_headless_toolbar_DOEFHsWP_es();
354563
355198
  init_constants_D9qj59G2_es();
354564
355199
  init_dist_B8HfvhaK_es();
354565
355200
  init_unified_Dsuw2be5_es();
354566
- init_DocxZipper_Bu2Fhqkw_es();
354567
- init_create_super_doc_ui_CmcU7hTR_es();
355201
+ init_DocxZipper_FUsfThjV_es();
355202
+ init_create_super_doc_ui_CanMzNxA_es();
354568
355203
  init_ui_C5PAS9hY_es();
354569
355204
  init_eventemitter3_BnGqBE_Q_es();
354570
355205
  init_errors_CNaD6vcg_es();
@@ -388036,6 +388671,9 @@ function hasTrackDeleteMark3(node3) {
388036
388671
  function shouldSkipTextNode2(node3, options) {
388037
388672
  return isVisibleTextModel2(options) && hasTrackDeleteMark3(node3);
388038
388673
  }
388674
+ function shouldSkipLeafNode2(node3, options) {
388675
+ return isVisibleTextModel2(options) && hasTrackDeleteMark3(node3);
388676
+ }
388039
388677
  function resolveSegmentPosition3(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
388040
388678
  if (segmentLength <= 1) {
388041
388679
  return targetOffset <= segmentStart ? docFrom : docTo;
@@ -388069,6 +388707,11 @@ function pmPositionToTextOffset2(blockNode, blockPos, pmPos, options) {
388069
388707
  }
388070
388708
  if (node3.isLeaf) {
388071
388709
  const endPos = docPos + node3.nodeSize;
388710
+ if (shouldSkipLeafNode2(node3, options)) {
388711
+ if (pmPos < endPos)
388712
+ done = true;
388713
+ return;
388714
+ }
388072
388715
  if (pmPos >= endPos) {
388073
388716
  offset2 += 1;
388074
388717
  } else {
@@ -388112,6 +388755,8 @@ function computeTextContentLength2(blockNode, options) {
388112
388755
  return;
388113
388756
  }
388114
388757
  if (node3.isLeaf) {
388758
+ if (shouldSkipLeafNode2(node3, options))
388759
+ return;
388115
388760
  length3 += 1;
388116
388761
  return;
388117
388762
  }
@@ -388175,6 +388820,8 @@ function resolveTextRangeInBlock2(blockNode, blockPos, range, options) {
388175
388820
  return;
388176
388821
  }
388177
388822
  if (node3.isLeaf) {
388823
+ if (shouldSkipLeafNode2(node3, options))
388824
+ return;
388178
388825
  advanceSegment(1, docPos, docPos + node3.nodeSize);
388179
388826
  return;
388180
388827
  }
@@ -388201,7 +388848,10 @@ function textContentInBlock2(blockNode, options) {
388201
388848
  return;
388202
388849
  }
388203
388850
  if (node3.isLeaf) {
388204
- text5 += "";
388851
+ if (shouldSkipLeafNode2(node3, options))
388852
+ return;
388853
+ const leafText = node3.type?.spec?.leafText;
388854
+ text5 += typeof leafText === "function" ? leafText(node3) : "";
388205
388855
  return;
388206
388856
  }
388207
388857
  let isFirstChild2 = true;
@@ -388231,19 +388881,32 @@ var init_text_offset_resolver = __esm(() => {
388231
388881
 
388232
388882
  // ../../packages/super-editor/src/editors/v1/document-api-adapters/helpers/text-with-tabs.ts
388233
388883
  function buildTextWithTabs2(schema, text5, marks, opts = {}) {
388234
- if (!text5.includes("\t"))
388235
- return schema.text(text5, marks);
388236
- const tabNodeType = schema.nodes?.tab;
388237
- if (!tabNodeType || opts.parentAllowsTab === false)
388238
- return schema.text(text5, marks);
388239
- const tabMarks = marks ?? null;
388240
- const parts = text5.split("\t");
388884
+ const normalized = text5.includes("\r") ? text5.replace(/\r\n?/g, `
388885
+ `) : text5;
388886
+ const hasTab = normalized.includes("\t");
388887
+ const hasNewline = normalized.includes(`
388888
+ `);
388889
+ if (!hasTab && !hasNewline)
388890
+ return schema.text(normalized, marks);
388891
+ const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
388892
+ const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
388893
+ if (!tabNodeType && !lineBreakNodeType)
388894
+ return schema.text(normalized, marks);
388895
+ const tabMarks = marks ?? undefined;
388896
+ const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
388897
+ const parts = normalized.split(new RegExp(`(${splitPattern})`));
388241
388898
  const nodes = [];
388242
- for (let i4 = 0;i4 < parts.length; i4++) {
388243
- if (parts[i4])
388244
- nodes.push(schema.text(parts[i4], marks));
388245
- if (i4 < parts.length - 1)
388899
+ for (const part of parts) {
388900
+ if (part === "")
388901
+ continue;
388902
+ if (part === "\t" && tabNodeType) {
388246
388903
  nodes.push(tabNodeType.create(null, null, tabMarks));
388904
+ } else if (part === `
388905
+ ` && lineBreakNodeType) {
388906
+ nodes.push(lineBreakNodeType.create());
388907
+ } else {
388908
+ nodes.push(schema.text(part, marks));
388909
+ }
388247
388910
  }
388248
388911
  return Fragment4.from(nodes);
388249
388912
  }
@@ -388288,6 +388951,9 @@ function textBetweenWithTabs2(doc5, from3, to, blockSeparator, leafFallback, opt
388288
388951
  }
388289
388952
  if (node3.isLeaf) {
388290
388953
  if (node3.isInline) {
388954
+ if (options.textModel === "visible" && node3.marks?.some((mark2) => mark2.type.name === TrackDeleteMarkName2)) {
388955
+ return false;
388956
+ }
388291
388957
  const leafTextFn = node3.type?.spec?.leafText;
388292
388958
  if (typeof leafTextFn === "function") {
388293
388959
  out += leafTextFn(node3);
@@ -420667,489 +421333,176 @@ var init_dist10 = __esm(() => {
420667
421333
  columnResizingPluginKey2 = new PluginKey2("tableColumnResizing");
420668
421334
  });
420669
421335
 
420670
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/rng.js
420671
- var require_rng = __commonJS((exports) => {
420672
- Object.defineProperty(exports, "__esModule", {
420673
- value: true
420674
- });
420675
- exports.default = rng2;
420676
- var _crypto = _interopRequireDefault(__require("crypto"));
420677
- function _interopRequireDefault(obj) {
420678
- return obj && obj.__esModule ? obj : { default: obj };
420679
- }
420680
- var rnds8Pool = new Uint8Array(256);
420681
- var poolPtr = rnds8Pool.length;
420682
- function rng2() {
420683
- if (poolPtr > rnds8Pool.length - 16) {
420684
- _crypto.default.randomFillSync(rnds8Pool);
420685
- poolPtr = 0;
420686
- }
420687
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
421336
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/native.js
421337
+ import { randomUUID } from "crypto";
421338
+ var native_default2;
421339
+ var init_native = __esm(() => {
421340
+ native_default2 = { randomUUID };
421341
+ });
421342
+
421343
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/rng.js
421344
+ import { randomFillSync } from "crypto";
421345
+ function rng2() {
421346
+ if (poolPtr > rnds8Pool.length - 16) {
421347
+ randomFillSync(rnds8Pool);
421348
+ poolPtr = 0;
420688
421349
  }
421350
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
421351
+ }
421352
+ var rnds8Pool, poolPtr;
421353
+ var init_rng = __esm(() => {
421354
+ rnds8Pool = new Uint8Array(256);
421355
+ poolPtr = rnds8Pool.length;
420689
421356
  });
420690
421357
 
420691
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/regex.js
420692
- var require_regex = __commonJS((exports) => {
420693
- Object.defineProperty(exports, "__esModule", {
420694
- value: true
420695
- });
420696
- exports.default = undefined;
420697
- var _default3 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
420698
- exports.default = _default3;
421358
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/regex.js
421359
+ var regex_default2;
421360
+ var init_regex = __esm(() => {
421361
+ regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
420699
421362
  });
420700
421363
 
420701
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/validate.js
420702
- var require_validate2 = __commonJS((exports) => {
420703
- Object.defineProperty(exports, "__esModule", {
420704
- value: true
420705
- });
420706
- exports.default = undefined;
420707
- var _regex2 = _interopRequireDefault(require_regex());
420708
- function _interopRequireDefault(obj) {
420709
- return obj && obj.__esModule ? obj : { default: obj };
420710
- }
420711
- function validate2(uuid3) {
420712
- return typeof uuid3 === "string" && _regex2.default.test(uuid3);
420713
- }
420714
- var _default3 = validate2;
420715
- exports.default = _default3;
421364
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/validate.js
421365
+ function validate2(uuid3) {
421366
+ return typeof uuid3 === "string" && regex_default2.test(uuid3);
421367
+ }
421368
+ var validate_default2;
421369
+ var init_validate = __esm(() => {
421370
+ init_regex();
421371
+ validate_default2 = validate2;
420716
421372
  });
420717
421373
 
420718
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/stringify.js
420719
- var require_stringify = __commonJS((exports) => {
420720
- Object.defineProperty(exports, "__esModule", {
420721
- value: true
420722
- });
420723
- exports.default = undefined;
420724
- exports.unsafeStringify = unsafeStringify2;
420725
- var _validate = _interopRequireDefault(require_validate2());
420726
- function _interopRequireDefault(obj) {
420727
- return obj && obj.__esModule ? obj : { default: obj };
420728
- }
420729
- var byteToHex2 = [];
421374
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/stringify.js
421375
+ function unsafeStringify2(arr, offset2 = 0) {
421376
+ return (byteToHex2[arr[offset2 + 0]] + byteToHex2[arr[offset2 + 1]] + byteToHex2[arr[offset2 + 2]] + byteToHex2[arr[offset2 + 3]] + "-" + byteToHex2[arr[offset2 + 4]] + byteToHex2[arr[offset2 + 5]] + "-" + byteToHex2[arr[offset2 + 6]] + byteToHex2[arr[offset2 + 7]] + "-" + byteToHex2[arr[offset2 + 8]] + byteToHex2[arr[offset2 + 9]] + "-" + byteToHex2[arr[offset2 + 10]] + byteToHex2[arr[offset2 + 11]] + byteToHex2[arr[offset2 + 12]] + byteToHex2[arr[offset2 + 13]] + byteToHex2[arr[offset2 + 14]] + byteToHex2[arr[offset2 + 15]]).toLowerCase();
421377
+ }
421378
+ var byteToHex2;
421379
+ var init_stringify = __esm(() => {
421380
+ byteToHex2 = [];
420730
421381
  for (let i5 = 0;i5 < 256; ++i5) {
420731
421382
  byteToHex2.push((i5 + 256).toString(16).slice(1));
420732
421383
  }
420733
- function unsafeStringify2(arr, offset2 = 0) {
420734
- return byteToHex2[arr[offset2 + 0]] + byteToHex2[arr[offset2 + 1]] + byteToHex2[arr[offset2 + 2]] + byteToHex2[arr[offset2 + 3]] + "-" + byteToHex2[arr[offset2 + 4]] + byteToHex2[arr[offset2 + 5]] + "-" + byteToHex2[arr[offset2 + 6]] + byteToHex2[arr[offset2 + 7]] + "-" + byteToHex2[arr[offset2 + 8]] + byteToHex2[arr[offset2 + 9]] + "-" + byteToHex2[arr[offset2 + 10]] + byteToHex2[arr[offset2 + 11]] + byteToHex2[arr[offset2 + 12]] + byteToHex2[arr[offset2 + 13]] + byteToHex2[arr[offset2 + 14]] + byteToHex2[arr[offset2 + 15]];
420735
- }
420736
- function stringify(arr, offset2 = 0) {
420737
- const uuid3 = unsafeStringify2(arr, offset2);
420738
- if (!(0, _validate.default)(uuid3)) {
420739
- throw TypeError("Stringified UUID is invalid");
420740
- }
420741
- return uuid3;
420742
- }
420743
- var _default3 = stringify;
420744
- exports.default = _default3;
420745
421384
  });
420746
421385
 
420747
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v1.js
420748
- var require_v1 = __commonJS((exports) => {
420749
- Object.defineProperty(exports, "__esModule", {
420750
- value: true
420751
- });
420752
- exports.default = undefined;
420753
- var _rng = _interopRequireDefault(require_rng());
420754
- var _stringify = require_stringify();
420755
- function _interopRequireDefault(obj) {
420756
- return obj && obj.__esModule ? obj : { default: obj };
420757
- }
420758
- var _nodeId;
420759
- var _clockseq;
420760
- var _lastMSecs = 0;
420761
- var _lastNSecs = 0;
420762
- function v1(options, buf, offset2) {
420763
- let i5 = buf && offset2 || 0;
420764
- const b2 = buf || new Array(16);
420765
- options = options || {};
420766
- let node4 = options.node || _nodeId;
420767
- let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
420768
- if (node4 == null || clockseq == null) {
420769
- const seedBytes = options.random || (options.rng || _rng.default)();
420770
- if (node4 == null) {
420771
- node4 = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
420772
- }
420773
- if (clockseq == null) {
420774
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
420775
- }
420776
- }
420777
- let msecs = options.msecs !== undefined ? options.msecs : Date.now();
420778
- let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
420779
- const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
420780
- if (dt < 0 && options.clockseq === undefined) {
420781
- clockseq = clockseq + 1 & 16383;
420782
- }
420783
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
420784
- nsecs = 0;
420785
- }
420786
- if (nsecs >= 1e4) {
420787
- throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
420788
- }
420789
- _lastMSecs = msecs;
420790
- _lastNSecs = nsecs;
420791
- _clockseq = clockseq;
420792
- msecs += 12219292800000;
420793
- const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
420794
- b2[i5++] = tl >>> 24 & 255;
420795
- b2[i5++] = tl >>> 16 & 255;
420796
- b2[i5++] = tl >>> 8 & 255;
420797
- b2[i5++] = tl & 255;
420798
- const tmh = msecs / 4294967296 * 1e4 & 268435455;
420799
- b2[i5++] = tmh >>> 8 & 255;
420800
- b2[i5++] = tmh & 255;
420801
- b2[i5++] = tmh >>> 24 & 15 | 16;
420802
- b2[i5++] = tmh >>> 16 & 255;
420803
- b2[i5++] = clockseq >>> 8 | 128;
420804
- b2[i5++] = clockseq & 255;
420805
- for (let n = 0;n < 6; ++n) {
420806
- b2[i5 + n] = node4[n];
420807
- }
420808
- return buf || (0, _stringify.unsafeStringify)(b2);
420809
- }
420810
- var _default3 = v1;
420811
- exports.default = _default3;
420812
- });
420813
-
420814
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/parse.js
420815
- var require_parse = __commonJS((exports) => {
420816
- Object.defineProperty(exports, "__esModule", {
420817
- value: true
420818
- });
420819
- exports.default = undefined;
420820
- var _validate = _interopRequireDefault(require_validate2());
420821
- function _interopRequireDefault(obj) {
420822
- return obj && obj.__esModule ? obj : { default: obj };
420823
- }
420824
- function parse9(uuid3) {
420825
- if (!(0, _validate.default)(uuid3)) {
420826
- throw TypeError("Invalid UUID");
420827
- }
420828
- let v;
420829
- const arr = new Uint8Array(16);
420830
- arr[0] = (v = parseInt(uuid3.slice(0, 8), 16)) >>> 24;
420831
- arr[1] = v >>> 16 & 255;
420832
- arr[2] = v >>> 8 & 255;
420833
- arr[3] = v & 255;
420834
- arr[4] = (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8;
420835
- arr[5] = v & 255;
420836
- arr[6] = (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8;
420837
- arr[7] = v & 255;
420838
- arr[8] = (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8;
420839
- arr[9] = v & 255;
420840
- arr[10] = (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255;
420841
- arr[11] = v / 4294967296 & 255;
420842
- arr[12] = v >>> 24 & 255;
420843
- arr[13] = v >>> 16 & 255;
420844
- arr[14] = v >>> 8 & 255;
420845
- arr[15] = v & 255;
420846
- return arr;
420847
- }
420848
- var _default3 = parse9;
420849
- exports.default = _default3;
420850
- });
420851
-
420852
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v35.js
420853
- var require_v35 = __commonJS((exports) => {
420854
- Object.defineProperty(exports, "__esModule", {
420855
- value: true
420856
- });
420857
- exports.URL = exports.DNS = undefined;
420858
- exports.default = v352;
420859
- var _stringify = require_stringify();
420860
- var _parse2 = _interopRequireDefault(require_parse());
420861
- function _interopRequireDefault(obj) {
420862
- return obj && obj.__esModule ? obj : { default: obj };
421386
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v4.js
421387
+ function v42(options, buf, offset2) {
421388
+ if (native_default2.randomUUID && !buf && !options) {
421389
+ return native_default2.randomUUID();
420863
421390
  }
420864
- function stringToBytes2(str) {
420865
- str = unescape(encodeURIComponent(str));
420866
- const bytes = [];
420867
- for (let i5 = 0;i5 < str.length; ++i5) {
420868
- bytes.push(str.charCodeAt(i5));
420869
- }
420870
- return bytes;
421391
+ options = options || {};
421392
+ const rnds = options.random ?? options.rng?.() ?? rng2();
421393
+ if (rnds.length < 16) {
421394
+ throw new Error("Random bytes length must be >= 16");
420871
421395
  }
420872
- var DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
420873
- exports.DNS = DNS2;
420874
- var URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
420875
- exports.URL = URL3;
420876
- function v352(name, version3, hashfunc) {
420877
- function generateUUID(value, namespace, buf, offset2) {
420878
- var _namespace;
420879
- if (typeof value === "string") {
420880
- value = stringToBytes2(value);
420881
- }
420882
- if (typeof namespace === "string") {
420883
- namespace = (0, _parse2.default)(namespace);
420884
- }
420885
- if (((_namespace = namespace) === null || _namespace === undefined ? undefined : _namespace.length) !== 16) {
420886
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
420887
- }
420888
- let bytes = new Uint8Array(16 + value.length);
420889
- bytes.set(namespace);
420890
- bytes.set(value, namespace.length);
420891
- bytes = hashfunc(bytes);
420892
- bytes[6] = bytes[6] & 15 | version3;
420893
- bytes[8] = bytes[8] & 63 | 128;
420894
- if (buf) {
420895
- offset2 = offset2 || 0;
420896
- for (let i5 = 0;i5 < 16; ++i5) {
420897
- buf[offset2 + i5] = bytes[i5];
420898
- }
420899
- return buf;
420900
- }
420901
- return (0, _stringify.unsafeStringify)(bytes);
421396
+ rnds[6] = rnds[6] & 15 | 64;
421397
+ rnds[8] = rnds[8] & 63 | 128;
421398
+ if (buf) {
421399
+ offset2 = offset2 || 0;
421400
+ if (offset2 < 0 || offset2 + 16 > buf.length) {
421401
+ throw new RangeError(`UUID byte range ${offset2}:${offset2 + 15} is out of buffer bounds`);
420902
421402
  }
420903
- try {
420904
- generateUUID.name = name;
420905
- } catch (err) {}
420906
- generateUUID.DNS = DNS2;
420907
- generateUUID.URL = URL3;
420908
- return generateUUID;
420909
- }
420910
- });
420911
-
420912
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/md5.js
420913
- var require_md5 = __commonJS((exports) => {
420914
- Object.defineProperty(exports, "__esModule", {
420915
- value: true
420916
- });
420917
- exports.default = undefined;
420918
- var _crypto = _interopRequireDefault(__require("crypto"));
420919
- function _interopRequireDefault(obj) {
420920
- return obj && obj.__esModule ? obj : { default: obj };
420921
- }
420922
- function md5(bytes) {
420923
- if (Array.isArray(bytes)) {
420924
- bytes = Buffer.from(bytes);
420925
- } else if (typeof bytes === "string") {
420926
- bytes = Buffer.from(bytes, "utf8");
421403
+ for (let i5 = 0;i5 < 16; ++i5) {
421404
+ buf[offset2 + i5] = rnds[i5];
420927
421405
  }
420928
- return _crypto.default.createHash("md5").update(bytes).digest();
421406
+ return buf;
420929
421407
  }
420930
- var _default3 = md5;
420931
- exports.default = _default3;
421408
+ return unsafeStringify2(rnds);
421409
+ }
421410
+ var v4_default2;
421411
+ var init_v42 = __esm(() => {
421412
+ init_native();
421413
+ init_rng();
421414
+ init_stringify();
421415
+ v4_default2 = v42;
420932
421416
  });
420933
421417
 
420934
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v3.js
420935
- var require_v3 = __commonJS((exports) => {
420936
- Object.defineProperty(exports, "__esModule", {
420937
- value: true
420938
- });
420939
- exports.default = undefined;
420940
- var _v = _interopRequireDefault(require_v35());
420941
- var _md = _interopRequireDefault(require_md5());
420942
- function _interopRequireDefault(obj) {
420943
- return obj && obj.__esModule ? obj : { default: obj };
421418
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/sha1.js
421419
+ import { createHash } from "crypto";
421420
+ function sha12(bytes) {
421421
+ if (Array.isArray(bytes)) {
421422
+ bytes = Buffer.from(bytes);
421423
+ } else if (typeof bytes === "string") {
421424
+ bytes = Buffer.from(bytes, "utf8");
420944
421425
  }
420945
- var v3 = (0, _v.default)("v3", 48, _md.default);
420946
- var _default3 = v3;
420947
- exports.default = _default3;
421426
+ return createHash("sha1").update(bytes).digest();
421427
+ }
421428
+ var sha1_default2;
421429
+ var init_sha1 = __esm(() => {
421430
+ sha1_default2 = sha12;
420948
421431
  });
420949
421432
 
420950
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/native.js
420951
- var require_native = __commonJS((exports) => {
420952
- Object.defineProperty(exports, "__esModule", {
420953
- value: true
420954
- });
420955
- exports.default = undefined;
420956
- var _crypto = _interopRequireDefault(__require("crypto"));
420957
- function _interopRequireDefault(obj) {
420958
- return obj && obj.__esModule ? obj : { default: obj };
421433
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/parse.js
421434
+ function parse9(uuid3) {
421435
+ if (!validate_default2(uuid3)) {
421436
+ throw TypeError("Invalid UUID");
420959
421437
  }
420960
- var _default3 = {
420961
- randomUUID: _crypto.default.randomUUID
420962
- };
420963
- exports.default = _default3;
421438
+ let v;
421439
+ return Uint8Array.of((v = parseInt(uuid3.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
421440
+ }
421441
+ var parse_default2;
421442
+ var init_parse4 = __esm(() => {
421443
+ init_validate();
421444
+ parse_default2 = parse9;
420964
421445
  });
420965
421446
 
420966
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v4.js
420967
- var require_v4 = __commonJS((exports) => {
420968
- Object.defineProperty(exports, "__esModule", {
420969
- value: true
420970
- });
420971
- exports.default = undefined;
420972
- var _native = _interopRequireDefault(require_native());
420973
- var _rng = _interopRequireDefault(require_rng());
420974
- var _stringify = require_stringify();
420975
- function _interopRequireDefault(obj) {
420976
- return obj && obj.__esModule ? obj : { default: obj };
421447
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v35.js
421448
+ function stringToBytes2(str) {
421449
+ str = unescape(encodeURIComponent(str));
421450
+ const bytes = new Uint8Array(str.length);
421451
+ for (let i5 = 0;i5 < str.length; ++i5) {
421452
+ bytes[i5] = str.charCodeAt(i5);
420977
421453
  }
420978
- function v42(options, buf, offset2) {
420979
- if (_native.default.randomUUID && !buf && !options) {
420980
- return _native.default.randomUUID();
420981
- }
420982
- options = options || {};
420983
- const rnds = options.random || (options.rng || _rng.default)();
420984
- rnds[6] = rnds[6] & 15 | 64;
420985
- rnds[8] = rnds[8] & 63 | 128;
420986
- if (buf) {
420987
- offset2 = offset2 || 0;
420988
- for (let i5 = 0;i5 < 16; ++i5) {
420989
- buf[offset2 + i5] = rnds[i5];
420990
- }
420991
- return buf;
421454
+ return bytes;
421455
+ }
421456
+ function v352(version3, hash5, value, namespace, buf, offset2) {
421457
+ const valueBytes = typeof value === "string" ? stringToBytes2(value) : value;
421458
+ const namespaceBytes = typeof namespace === "string" ? parse_default2(namespace) : namespace;
421459
+ if (typeof namespace === "string") {
421460
+ namespace = parse_default2(namespace);
421461
+ }
421462
+ if (namespace?.length !== 16) {
421463
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
421464
+ }
421465
+ let bytes = new Uint8Array(16 + valueBytes.length);
421466
+ bytes.set(namespaceBytes);
421467
+ bytes.set(valueBytes, namespaceBytes.length);
421468
+ bytes = hash5(bytes);
421469
+ bytes[6] = bytes[6] & 15 | version3;
421470
+ bytes[8] = bytes[8] & 63 | 128;
421471
+ if (buf) {
421472
+ offset2 = offset2 || 0;
421473
+ if (offset2 < 0 || offset2 + 16 > buf.length) {
421474
+ throw new RangeError(`UUID byte range ${offset2}:${offset2 + 15} is out of buffer bounds`);
420992
421475
  }
420993
- return (0, _stringify.unsafeStringify)(rnds);
420994
- }
420995
- var _default3 = v42;
420996
- exports.default = _default3;
420997
- });
420998
-
420999
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/sha1.js
421000
- var require_sha1 = __commonJS((exports) => {
421001
- Object.defineProperty(exports, "__esModule", {
421002
- value: true
421003
- });
421004
- exports.default = undefined;
421005
- var _crypto = _interopRequireDefault(__require("crypto"));
421006
- function _interopRequireDefault(obj) {
421007
- return obj && obj.__esModule ? obj : { default: obj };
421008
- }
421009
- function sha12(bytes) {
421010
- if (Array.isArray(bytes)) {
421011
- bytes = Buffer.from(bytes);
421012
- } else if (typeof bytes === "string") {
421013
- bytes = Buffer.from(bytes, "utf8");
421476
+ for (let i5 = 0;i5 < 16; ++i5) {
421477
+ buf[offset2 + i5] = bytes[i5];
421014
421478
  }
421015
- return _crypto.default.createHash("sha1").update(bytes).digest();
421016
- }
421017
- var _default3 = sha12;
421018
- exports.default = _default3;
421019
- });
421020
-
421021
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v5.js
421022
- var require_v5 = __commonJS((exports) => {
421023
- Object.defineProperty(exports, "__esModule", {
421024
- value: true
421025
- });
421026
- exports.default = undefined;
421027
- var _v = _interopRequireDefault(require_v35());
421028
- var _sha = _interopRequireDefault(require_sha1());
421029
- function _interopRequireDefault(obj) {
421030
- return obj && obj.__esModule ? obj : { default: obj };
421479
+ return buf;
421031
421480
  }
421032
- var v5 = (0, _v.default)("v5", 80, _sha.default);
421033
- var _default3 = v5;
421034
- exports.default = _default3;
421481
+ return unsafeStringify2(bytes);
421482
+ }
421483
+ var DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
421484
+ var init_v35 = __esm(() => {
421485
+ init_parse4();
421486
+ init_stringify();
421035
421487
  });
421036
421488
 
421037
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/nil.js
421038
- var require_nil = __commonJS((exports) => {
421039
- Object.defineProperty(exports, "__esModule", {
421040
- value: true
421041
- });
421042
- exports.default = undefined;
421043
- var _default3 = "00000000-0000-0000-0000-000000000000";
421044
- exports.default = _default3;
421489
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v5.js
421490
+ function v52(value, namespace, buf, offset2) {
421491
+ return v352(80, sha1_default2, value, namespace, buf, offset2);
421492
+ }
421493
+ var v5_default2;
421494
+ var init_v5 = __esm(() => {
421495
+ init_sha1();
421496
+ init_v35();
421497
+ v52.DNS = DNS2;
421498
+ v52.URL = URL3;
421499
+ v5_default2 = v52;
421045
421500
  });
421046
421501
 
421047
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/version.js
421048
- var require_version = __commonJS((exports) => {
421049
- Object.defineProperty(exports, "__esModule", {
421050
- value: true
421051
- });
421052
- exports.default = undefined;
421053
- var _validate = _interopRequireDefault(require_validate2());
421054
- function _interopRequireDefault(obj) {
421055
- return obj && obj.__esModule ? obj : { default: obj };
421056
- }
421057
- function version3(uuid3) {
421058
- if (!(0, _validate.default)(uuid3)) {
421059
- throw TypeError("Invalid UUID");
421060
- }
421061
- return parseInt(uuid3.slice(14, 15), 16);
421062
- }
421063
- var _default3 = version3;
421064
- exports.default = _default3;
421065
- });
421066
-
421067
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/index.js
421068
- var require_dist3 = __commonJS((exports) => {
421069
- Object.defineProperty(exports, "__esModule", {
421070
- value: true
421071
- });
421072
- Object.defineProperty(exports, "NIL", {
421073
- enumerable: true,
421074
- get: function() {
421075
- return _nil.default;
421076
- }
421077
- });
421078
- Object.defineProperty(exports, "parse", {
421079
- enumerable: true,
421080
- get: function() {
421081
- return _parse2.default;
421082
- }
421083
- });
421084
- Object.defineProperty(exports, "stringify", {
421085
- enumerable: true,
421086
- get: function() {
421087
- return _stringify.default;
421088
- }
421089
- });
421090
- Object.defineProperty(exports, "v1", {
421091
- enumerable: true,
421092
- get: function() {
421093
- return _v.default;
421094
- }
421095
- });
421096
- Object.defineProperty(exports, "v3", {
421097
- enumerable: true,
421098
- get: function() {
421099
- return _v2.default;
421100
- }
421101
- });
421102
- Object.defineProperty(exports, "v4", {
421103
- enumerable: true,
421104
- get: function() {
421105
- return _v3.default;
421106
- }
421107
- });
421108
- Object.defineProperty(exports, "v5", {
421109
- enumerable: true,
421110
- get: function() {
421111
- return _v4.default;
421112
- }
421113
- });
421114
- Object.defineProperty(exports, "validate", {
421115
- enumerable: true,
421116
- get: function() {
421117
- return _validate.default;
421118
- }
421119
- });
421120
- Object.defineProperty(exports, "version", {
421121
- enumerable: true,
421122
- get: function() {
421123
- return _version.default;
421124
- }
421125
- });
421126
- var _v = _interopRequireDefault(require_v1());
421127
- var _v2 = _interopRequireDefault(require_v3());
421128
- var _v3 = _interopRequireDefault(require_v4());
421129
- var _v4 = _interopRequireDefault(require_v5());
421130
- var _nil = _interopRequireDefault(require_nil());
421131
- var _version = _interopRequireDefault(require_version());
421132
- var _validate = _interopRequireDefault(require_validate2());
421133
- var _stringify = _interopRequireDefault(require_stringify());
421134
- var _parse2 = _interopRequireDefault(require_parse());
421135
- function _interopRequireDefault(obj) {
421136
- return obj && obj.__esModule ? obj : { default: obj };
421137
- }
421138
- });
421139
-
421140
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/wrapper.mjs
421141
- var import_dist, v1, v3, v42, v5, NIL, version3, validate2, stringify, parse9;
421142
- var init_wrapper = __esm(() => {
421143
- import_dist = __toESM(require_dist3(), 1);
421144
- v1 = import_dist.default.v1;
421145
- v3 = import_dist.default.v3;
421146
- v42 = import_dist.default.v4;
421147
- v5 = import_dist.default.v5;
421148
- NIL = import_dist.default.NIL;
421149
- version3 = import_dist.default.version;
421150
- validate2 = import_dist.default.validate;
421151
- stringify = import_dist.default.stringify;
421152
- parse9 = import_dist.default.parse;
421502
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/index.js
421503
+ var init_esm2 = __esm(() => {
421504
+ init_v42();
421505
+ init_v5();
421153
421506
  });
421154
421507
 
421155
421508
  // ../../packages/super-editor/src/editors/v1/core/super-converter/exporter-docx-defs.js
@@ -422973,9 +423326,9 @@ function decode24(params3) {
422973
423326
  if (params3.isFinalDoc) {
422974
423327
  return null;
422975
423328
  }
422976
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
422977
- if (textNode)
422978
- textNode.name = "w:delText";
423329
+ (translatedTextNode.elements || []).filter((n) => n.name === "w:t").forEach((n) => {
423330
+ n.name = "w:delText";
423331
+ });
422979
423332
  return {
422980
423333
  name: "w:del",
422981
423334
  attributes: {
@@ -433154,11 +433507,11 @@ class Renderer3 {
433154
433507
  case Helper3.GDI.MetafileType.MEMORYMETAFILE:
433155
433508
  case Helper3.GDI.MetafileType.DISKMETAFILE:
433156
433509
  if (size3 === Helper3.GDI.METAHEADER_SIZE / 2) {
433157
- const version4 = reader.readUint16();
433158
- switch (version4) {
433510
+ const version3 = reader.readUint16();
433511
+ switch (version3) {
433159
433512
  case Helper3.GDI.MetafileVersion.METAVERSION100:
433160
433513
  case Helper3.GDI.MetafileVersion.METAVERSION300:
433161
- this._img = new WMF2(reader, placable, version4, headerstart + size3 * 2);
433514
+ this._img = new WMF2(reader, placable, version3, headerstart + size3 * 2);
433162
433515
  break;
433163
433516
  }
433164
433517
  }
@@ -433212,8 +433565,8 @@ class WMF2 {
433212
433565
  _hdrsize;
433213
433566
  _placable;
433214
433567
  _records;
433215
- constructor(reader, placable, version4, hdrsize) {
433216
- this._version = version4;
433568
+ constructor(reader, placable, version3, hdrsize) {
433569
+ this._version = version3;
433217
433570
  this._hdrsize = hdrsize;
433218
433571
  this._placable = placable;
433219
433572
  this._records = new WMFRecords2(reader, this._hdrsize);
@@ -443356,7 +443709,7 @@ function handleImageNode3(node4, params3, isAnchor) {
443356
443709
  const wrapValue = wrap6;
443357
443710
  const relativeHeight = isAnchor ? parseRelativeHeight2(attributes["relativeHeight"]) : null;
443358
443711
  const docPrId = docPr?.attributes?.id ?? "";
443359
- const sdImageId = v5(`${currentFile}:${rEmbed}:${docPrId}`, SD_IMAGE_ID_NAMESPACE2);
443712
+ const sdImageId = v5_default2(`${currentFile}:${rEmbed}:${docPrId}`, SD_IMAGE_ID_NAMESPACE2);
443360
443713
  const nodeAttrs = {
443361
443714
  sdImageId,
443362
443715
  relativeHeight,
@@ -444048,7 +444401,7 @@ var DRAWING_XML_TAG2 = "w:drawing", SHAPE_URI2 = "http://schemas.microsoft.com/o
444048
444401
  };
444049
444402
  };
444050
444403
  var init_encode_image_node_helpers = __esm(() => {
444051
- init_wrapper();
444404
+ init_esm2();
444052
444405
  init_helpers();
444053
444406
  init_vector_shape_helpers();
444054
444407
  init_metafile_converter();
@@ -445725,11 +446078,33 @@ function getTextNodeForExport2(text7, marks, params3) {
445725
446078
  wordIdAllocator: params3?.converter?.wordIdAllocator || null,
445726
446079
  partPath: resolveExportPartPath3(params3)
445727
446080
  });
445728
- textNodes.push({
445729
- name: "w:t",
445730
- elements: [{ text: text7, type: "text" }],
445731
- attributes: nodeAttrs
445732
- });
446081
+ const textValue = typeof text7 === "string" ? text7 : "";
446082
+ const normalizedText = textValue.includes("\r") ? textValue.replace(/\r\n?/g, `
446083
+ `) : textValue;
446084
+ if (normalizedText.includes(`
446085
+ `)) {
446086
+ const segments = normalizedText.split(`
446087
+ `);
446088
+ segments.forEach((segment, index3) => {
446089
+ if (segment.length > 0) {
446090
+ const segmentNeedsSpace = /^\s|\s$/.test(segment);
446091
+ textNodes.push({
446092
+ name: "w:t",
446093
+ elements: [{ text: segment, type: "text" }],
446094
+ attributes: segmentNeedsSpace ? { "xml:space": "preserve" } : null
446095
+ });
446096
+ }
446097
+ if (index3 < segments.length - 1) {
446098
+ textNodes.push({ name: "w:br" });
446099
+ }
446100
+ });
446101
+ } else {
446102
+ textNodes.push({
446103
+ name: "w:t",
446104
+ elements: [{ text: normalizedText, type: "text" }],
446105
+ attributes: nodeAttrs
446106
+ });
446107
+ }
445733
446108
  if (params3?.editor?.extensionService?.extensions) {
445734
446109
  const customMarks = params3.editor.extensionService.extensions.filter((extension2) => extension2.isExternal === true);
445735
446110
  normalizedMarks.forEach((mark2) => {
@@ -452149,12 +452524,12 @@ var readCommentAttribute2 = (attributes, primaryName, fallbackName) => {
452149
452524
  if (internalId != null)
452150
452525
  return internalId;
452151
452526
  if (importedId == null || !Number.isFinite(createdTime))
452152
- return v42();
452527
+ return v4_default2();
452153
452528
  const hash5 = stableHexHash2(`${importedId}-${createdTime}`);
452154
452529
  return `imported-${hash5}`;
452155
452530
  };
452156
452531
  var init_documentCommentsImporter = __esm(() => {
452157
- init_wrapper();
452532
+ init_esm2();
452158
452533
  init_docxImporter();
452159
452534
  });
452160
452535
 
@@ -452196,7 +452571,7 @@ function assignInternalId2(element3, idMap, context, insideTrackedChange, nextTr
452196
452571
  return;
452197
452572
  if (insideTrackedChange) {
452198
452573
  if (!idMap.has(wordId)) {
452199
- idMap.set(wordId, v42());
452574
+ idMap.set(wordId, v4_default2());
452200
452575
  }
452201
452576
  return;
452202
452577
  }
@@ -452210,7 +452585,7 @@ function assignInternalId2(element3, idMap, context, insideTrackedChange, nextTr
452210
452585
  context.lastTrackedChange = null;
452211
452586
  context.beforeLastTrackedChange = null;
452212
452587
  } else {
452213
- const internalId = idMap.get(wordId) ?? v42();
452588
+ const internalId = idMap.get(wordId) ?? v4_default2();
452214
452589
  idMap.set(wordId, internalId);
452215
452590
  context.beforeLastTrackedChange = context.lastTrackedChange;
452216
452591
  context.lastTrackedChange = { ...current, internalId };
@@ -452271,7 +452646,7 @@ function buildTrackedChangeIdMapsByPart2(docx, options = {}) {
452271
452646
  }
452272
452647
  var TRACKED_CHANGE_NAMES2, PAIRING_TRANSPARENT_NAMES2;
452273
452648
  var init_trackedChangeIdMapper = __esm(() => {
452274
- init_wrapper();
452649
+ init_esm2();
452275
452650
  TRACKED_CHANGE_NAMES2 = new Set(["w:ins", "w:del"]);
452276
452651
  PAIRING_TRANSPARENT_NAMES2 = new Set([
452277
452652
  "w:commentRangeStart",
@@ -456034,40 +456409,56 @@ var init_exporter = __esm(() => {
456034
456409
  // ../../shared/font-system/src/types.ts
456035
456410
  var init_types8 = () => {};
456036
456411
 
456037
- // ../../shared/font-system/src/substitution-evidence.ts
456412
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/data.js
456038
456413
  var SUBSTITUTION_EVIDENCE2;
456039
- var init_substitution_evidence = __esm(() => {
456040
- SUBSTITUTION_EVIDENCE2 = Object.freeze([
456414
+ var init_data = __esm(() => {
456415
+ SUBSTITUTION_EVIDENCE2 = [
456041
456416
  {
456042
456417
  evidenceId: "calibri",
456043
456418
  logicalFamily: "Calibri",
456044
456419
  physicalFamily: "Carlito",
456045
456420
  verdict: "metric_safe",
456046
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456047
- advance: { meanDelta: 0, maxDelta: 0 },
456048
- gates: { static: "pass", metric: "pass", layout: "pass", ship: "pass" },
456421
+ faces: {
456422
+ regular: true,
456423
+ bold: true,
456424
+ italic: true,
456425
+ boldItalic: true
456426
+ },
456427
+ gates: {
456428
+ static: "pass",
456429
+ metric: "pass",
456430
+ layout: "pass",
456431
+ ship: "pass"
456432
+ },
456049
456433
  policyAction: "substitute",
456050
- measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
456051
- candidateLicense: "OFL-1.1",
456052
- exportRule: "preserve_original_name"
456434
+ measurementRefs: [
456435
+ "calibri__carlito#analytic_advance#2026-06-03",
456436
+ "calibri__carlito#face_aggregate#2026-06-03"
456437
+ ],
456438
+ exportRule: "preserve_original_name",
456439
+ advance: {
456440
+ meanDelta: 0,
456441
+ maxDelta: 0
456442
+ },
456443
+ candidateLicense: "OFL-1.1"
456053
456444
  },
456054
456445
  {
456055
456446
  evidenceId: "cambria",
456056
456447
  logicalFamily: "Cambria",
456057
456448
  physicalFamily: "Caladea",
456058
456449
  verdict: "visual_only",
456059
- faceVerdicts: { regular: "metric_safe", bold: "metric_safe", italic: "metric_safe", boldItalic: "visual_only" },
456060
- glyphExceptions: [
456061
- {
456062
- slot: "boldItalic",
456063
- codepoint: 96,
456064
- advanceDelta: 0.231,
456065
- note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
456066
- }
456067
- ],
456068
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456069
- advance: { meanDelta: 0.0002378, maxDelta: 0.2310758 },
456070
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456450
+ faces: {
456451
+ regular: true,
456452
+ bold: true,
456453
+ italic: true,
456454
+ boldItalic: true
456455
+ },
456456
+ gates: {
456457
+ static: "pass",
456458
+ metric: "pass",
456459
+ layout: "not_run",
456460
+ ship: "pass"
456461
+ },
456071
456462
  policyAction: "substitute",
456072
456463
  measurementRefs: [
456073
456464
  "cambria_regular__caladea#regular#w400#d2f6cad3#analytic_advance#2026-06-04",
@@ -456075,46 +456466,503 @@ var init_substitution_evidence = __esm(() => {
456075
456466
  "cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
456076
456467
  "cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
456077
456468
  ],
456469
+ exportRule: "preserve_original_name",
456470
+ advance: {
456471
+ meanDelta: 0.0002378,
456472
+ maxDelta: 0.2310758
456473
+ },
456078
456474
  candidateLicense: "Apache-2.0",
456079
- exportRule: "preserve_original_name"
456475
+ faceVerdicts: {
456476
+ regular: "metric_safe",
456477
+ bold: "metric_safe",
456478
+ italic: "metric_safe",
456479
+ boldItalic: "visual_only"
456480
+ },
456481
+ glyphExceptions: [
456482
+ {
456483
+ slot: "boldItalic",
456484
+ codepoint: 96,
456485
+ advanceDelta: 0.231,
456486
+ note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow. All other glyphs, and the regular/bold/italic faces, are within the direct metric threshold."
456487
+ }
456488
+ ]
456080
456489
  },
456081
456490
  {
456082
456491
  evidenceId: "arial",
456083
456492
  logicalFamily: "Arial",
456084
456493
  physicalFamily: "Liberation Sans",
456085
456494
  verdict: "metric_safe",
456086
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456087
- advance: { meanDelta: 0, maxDelta: 0 },
456088
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456495
+ faces: {
456496
+ regular: true,
456497
+ bold: true,
456498
+ italic: true,
456499
+ boldItalic: true
456500
+ },
456501
+ gates: {
456502
+ static: "pass",
456503
+ metric: "pass",
456504
+ layout: "not_run",
456505
+ ship: "pass"
456506
+ },
456089
456507
  policyAction: "substitute",
456090
- measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
456091
- candidateLicense: "OFL-1.1",
456092
- exportRule: "preserve_original_name"
456508
+ measurementRefs: [
456509
+ "arial__liberation-sans#analytic_advance#2026-06-03"
456510
+ ],
456511
+ exportRule: "preserve_original_name",
456512
+ advance: {
456513
+ meanDelta: 0,
456514
+ maxDelta: 0
456515
+ },
456516
+ candidateLicense: "OFL-1.1"
456093
456517
  },
456094
456518
  {
456095
456519
  evidenceId: "times-new-roman",
456096
456520
  logicalFamily: "Times New Roman",
456097
456521
  physicalFamily: "Liberation Serif",
456098
456522
  verdict: "metric_safe",
456099
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456100
- advance: { meanDelta: 0, maxDelta: 0 },
456101
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456523
+ faces: {
456524
+ regular: true,
456525
+ bold: true,
456526
+ italic: true,
456527
+ boldItalic: true
456528
+ },
456529
+ gates: {
456530
+ static: "pass",
456531
+ metric: "pass",
456532
+ layout: "not_run",
456533
+ ship: "pass"
456534
+ },
456102
456535
  policyAction: "substitute",
456103
- measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
456104
- candidateLicense: "OFL-1.1",
456105
- exportRule: "preserve_original_name"
456536
+ measurementRefs: [
456537
+ "times-new-roman__liberation-serif#analytic_advance#2026-06-03"
456538
+ ],
456539
+ exportRule: "preserve_original_name",
456540
+ advance: {
456541
+ meanDelta: 0,
456542
+ maxDelta: 0
456543
+ },
456544
+ candidateLicense: "OFL-1.1"
456106
456545
  },
456107
456546
  {
456108
456547
  evidenceId: "courier-new",
456109
456548
  logicalFamily: "Courier New",
456110
456549
  physicalFamily: "Liberation Mono",
456111
456550
  verdict: "metric_safe",
456112
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456113
- advance: { meanDelta: 0, maxDelta: 0 },
456114
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456551
+ faces: {
456552
+ regular: true,
456553
+ bold: true,
456554
+ italic: true,
456555
+ boldItalic: true
456556
+ },
456557
+ gates: {
456558
+ static: "pass",
456559
+ metric: "pass",
456560
+ layout: "not_run",
456561
+ ship: "pass"
456562
+ },
456115
456563
  policyAction: "substitute",
456116
- measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
456564
+ measurementRefs: [
456565
+ "courier-new__liberation-mono#analytic_advance#2026-06-03"
456566
+ ],
456567
+ exportRule: "preserve_original_name",
456568
+ advance: {
456569
+ meanDelta: 0,
456570
+ maxDelta: 0
456571
+ },
456572
+ candidateLicense: "OFL-1.1"
456573
+ },
456574
+ {
456575
+ evidenceId: "georgia",
456576
+ logicalFamily: "Georgia",
456577
+ physicalFamily: "Gelasio",
456578
+ verdict: "near_metric",
456579
+ faces: {
456580
+ regular: true,
456581
+ bold: true,
456582
+ italic: true,
456583
+ boldItalic: true
456584
+ },
456585
+ gates: {
456586
+ static: "pass",
456587
+ metric: "pass",
456588
+ layout: "pass",
456589
+ ship: "fail"
456590
+ },
456591
+ policyAction: "substitute",
456592
+ measurementRefs: [
456593
+ "georgia_regular__gelasio#regular#w400#1543f04d#analytic_advance#2026-06-04",
456594
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#analytic_advance#2026-06-04",
456595
+ "georgia_italic__gelasio#italic#w400#be1243a9#analytic_advance#2026-06-04",
456596
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#analytic_advance#2026-06-04",
456597
+ "georgia_regular__gelasio#regular#w400#1543f04d#live_layout#2026-06-03",
456598
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#live_layout#2026-06-03",
456599
+ "georgia_italic__gelasio#italic#w400#be1243a9#live_layout#2026-06-03",
456600
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#live_layout#2026-06-03"
456601
+ ],
456602
+ exportRule: "preserve_original_name",
456603
+ advance: {
456604
+ meanDelta: 0.0000197,
456605
+ maxDelta: 0.0183727
456606
+ },
456117
456607
  candidateLicense: "OFL-1.1",
456608
+ faceVerdicts: {
456609
+ regular: "metric_safe",
456610
+ bold: "metric_safe",
456611
+ italic: "near_metric",
456612
+ boldItalic: "near_metric"
456613
+ },
456614
+ glyphExceptions: [
456615
+ {
456616
+ slot: "italic",
456617
+ codepoint: 210,
456618
+ advanceDelta: 0.0184,
456619
+ note: "Georgia Italic vs Gelasio Italic: accented capital O (U+00D2-D8: O-grave/acute/circumflex/diaeresis/stroke) advance differs ~1.84%. 5 rare glyphs; all other glyphs exact, mean 0%."
456620
+ },
456621
+ {
456622
+ slot: "boldItalic",
456623
+ codepoint: 204,
456624
+ advanceDelta: 0.011,
456625
+ note: "Georgia Bold Italic vs Gelasio Bold Italic: accented capital I (U+00CC-CE: I-grave/acute/circumflex) advance differs ~1.10%. 3 rare glyphs; all other glyphs exact, mean ~0%."
456626
+ }
456627
+ ]
456628
+ },
456629
+ {
456630
+ evidenceId: "arial-narrow",
456631
+ logicalFamily: "Arial Narrow",
456632
+ physicalFamily: "Liberation Sans Narrow",
456633
+ verdict: "visual_only",
456634
+ faces: {
456635
+ regular: true,
456636
+ bold: true,
456637
+ italic: true,
456638
+ boldItalic: true
456639
+ },
456640
+ gates: {
456641
+ static: "pass",
456642
+ metric: "pass",
456643
+ layout: "not_run",
456644
+ ship: "fail"
456645
+ },
456646
+ policyAction: "substitute",
456647
+ measurementRefs: [
456648
+ "arial-narrow_regular__liberation-sans-narrow#regular#w400#546e8957#analytic_advance#2026-06-04",
456649
+ "arial-narrow_bold__liberation-sans-narrow#bold#w700#8e5eb509#analytic_advance#2026-06-04",
456650
+ "arial-narrow_italic__liberation-sans-narrow#italic#w400#c5de4127#analytic_advance#2026-06-04",
456651
+ "arial-narrow_boldItalic__liberation-sans-narrow#boldItalic#w700#57fe1513#analytic_advance#2026-06-04"
456652
+ ],
456653
+ exportRule: "preserve_original_name",
456654
+ advance: {
456655
+ meanDelta: 0,
456656
+ maxDelta: 0.5
456657
+ },
456658
+ candidateLicense: "GPLv2-with-font-exception",
456659
+ faceVerdicts: {
456660
+ regular: "metric_safe",
456661
+ bold: "visual_only",
456662
+ italic: "metric_safe",
456663
+ boldItalic: "metric_safe"
456664
+ },
456665
+ glyphExceptions: [
456666
+ {
456667
+ slot: "bold",
456668
+ codepoint: 160,
456669
+ advanceDelta: 0.5,
456670
+ note: "Arial Narrow Bold no-break space (U+00A0) is double-width (2x the regular space); Liberation Sans Narrow Bold matches the regular space, so lines containing a non-breaking space reflow. All other glyphs, and the regular/italic/boldItalic faces, match within the direct metric threshold."
456671
+ }
456672
+ ]
456673
+ },
456674
+ {
456675
+ evidenceId: "aptos",
456676
+ logicalFamily: "Aptos",
456677
+ physicalFamily: null,
456678
+ verdict: "no_substitute",
456679
+ faces: {
456680
+ regular: false,
456681
+ bold: false,
456682
+ italic: false,
456683
+ boldItalic: false
456684
+ },
456685
+ gates: {
456686
+ static: "not_run",
456687
+ metric: "fail",
456688
+ layout: "not_run",
456689
+ ship: "not_run"
456690
+ },
456691
+ policyAction: "customer_supplied",
456692
+ measurementRefs: [
456693
+ "aptos#top_candidates#2026-06-03"
456694
+ ],
456695
+ exportRule: "preserve_original_name",
456696
+ candidateLicense: null
456697
+ },
456698
+ {
456699
+ evidenceId: "consolas",
456700
+ logicalFamily: "Consolas",
456701
+ physicalFamily: "Inconsolata SemiExpanded",
456702
+ verdict: "cell_width_only",
456703
+ faces: {
456704
+ regular: false,
456705
+ bold: false,
456706
+ italic: false,
456707
+ boldItalic: false
456708
+ },
456709
+ gates: {
456710
+ static: "not_run",
456711
+ metric: "not_run",
456712
+ layout: "not_run",
456713
+ ship: "not_run"
456714
+ },
456715
+ policyAction: "category_fallback",
456716
+ measurementRefs: [
456717
+ "consolas__inconsolata-semiexpanded#analytic_advance#2026-06-03"
456718
+ ],
456719
+ exportRule: "preserve_original_name",
456720
+ advance: {
456721
+ meanDelta: 0.00035999999999999997,
456722
+ maxDelta: 0.00035999999999999997
456723
+ },
456724
+ candidateLicense: "OFL-1.1"
456725
+ },
456726
+ {
456727
+ evidenceId: "verdana",
456728
+ logicalFamily: "Verdana",
456729
+ physicalFamily: null,
456730
+ verdict: "visual_only",
456731
+ faces: {
456732
+ regular: false,
456733
+ bold: false,
456734
+ italic: false,
456735
+ boldItalic: false
456736
+ },
456737
+ gates: {
456738
+ static: "not_run",
456739
+ metric: "fail",
456740
+ layout: "not_run",
456741
+ ship: "not_run"
456742
+ },
456743
+ policyAction: "category_fallback",
456744
+ measurementRefs: [
456745
+ "verdana#top_candidates#2026-06-03"
456746
+ ],
456747
+ exportRule: "preserve_original_name",
456748
+ candidateLicense: null
456749
+ },
456750
+ {
456751
+ evidenceId: "tahoma",
456752
+ logicalFamily: "Tahoma",
456753
+ physicalFamily: null,
456754
+ verdict: "visual_only",
456755
+ faces: {
456756
+ regular: false,
456757
+ bold: false,
456758
+ italic: false,
456759
+ boldItalic: false
456760
+ },
456761
+ gates: {
456762
+ static: "not_run",
456763
+ metric: "fail",
456764
+ layout: "not_run",
456765
+ ship: "not_run"
456766
+ },
456767
+ policyAction: "category_fallback",
456768
+ measurementRefs: [
456769
+ "tahoma#top_candidates#2026-06-03"
456770
+ ],
456771
+ exportRule: "preserve_original_name",
456772
+ candidateLicense: null
456773
+ },
456774
+ {
456775
+ evidenceId: "trebuchet-ms",
456776
+ logicalFamily: "Trebuchet MS",
456777
+ physicalFamily: null,
456778
+ verdict: "visual_only",
456779
+ faces: {
456780
+ regular: false,
456781
+ bold: false,
456782
+ italic: false,
456783
+ boldItalic: false
456784
+ },
456785
+ gates: {
456786
+ static: "not_run",
456787
+ metric: "fail",
456788
+ layout: "not_run",
456789
+ ship: "not_run"
456790
+ },
456791
+ policyAction: "category_fallback",
456792
+ measurementRefs: [
456793
+ "trebuchet-ms#top_candidates#2026-06-03"
456794
+ ],
456795
+ exportRule: "preserve_original_name",
456796
+ candidateLicense: null
456797
+ },
456798
+ {
456799
+ evidenceId: "comic-sans-ms",
456800
+ logicalFamily: "Comic Sans MS",
456801
+ physicalFamily: "Comic Neue",
456802
+ verdict: "visual_only",
456803
+ faces: {
456804
+ regular: false,
456805
+ bold: false,
456806
+ italic: false,
456807
+ boldItalic: false
456808
+ },
456809
+ gates: {
456810
+ static: "not_run",
456811
+ metric: "fail",
456812
+ layout: "not_run",
456813
+ ship: "not_run"
456814
+ },
456815
+ policyAction: "category_fallback",
456816
+ measurementRefs: [
456817
+ "comic-sans-ms__comic-neue#analytic_advance#2026-06-03"
456818
+ ],
456819
+ exportRule: "preserve_original_name",
456820
+ advance: {
456821
+ meanDelta: 0.1005,
456822
+ maxDelta: 0.1419
456823
+ },
456824
+ candidateLicense: "OFL-1.1"
456825
+ },
456826
+ {
456827
+ evidenceId: "candara",
456828
+ logicalFamily: "Candara",
456829
+ physicalFamily: null,
456830
+ verdict: "visual_only",
456831
+ faces: {
456832
+ regular: false,
456833
+ bold: false,
456834
+ italic: false,
456835
+ boldItalic: false
456836
+ },
456837
+ gates: {
456838
+ static: "not_run",
456839
+ metric: "fail",
456840
+ layout: "not_run",
456841
+ ship: "not_run"
456842
+ },
456843
+ policyAction: "category_fallback",
456844
+ measurementRefs: [
456845
+ "candara#top_candidates#2026-06-03"
456846
+ ],
456847
+ exportRule: "preserve_original_name",
456848
+ candidateLicense: null
456849
+ },
456850
+ {
456851
+ evidenceId: "constantia",
456852
+ logicalFamily: "Constantia",
456853
+ physicalFamily: null,
456854
+ verdict: "visual_only",
456855
+ faces: {
456856
+ regular: false,
456857
+ bold: false,
456858
+ italic: false,
456859
+ boldItalic: false
456860
+ },
456861
+ gates: {
456862
+ static: "not_run",
456863
+ metric: "fail",
456864
+ layout: "not_run",
456865
+ ship: "not_run"
456866
+ },
456867
+ policyAction: "category_fallback",
456868
+ measurementRefs: [
456869
+ "constantia#top_candidates#2026-06-03"
456870
+ ],
456871
+ exportRule: "preserve_original_name",
456872
+ candidateLicense: null
456873
+ },
456874
+ {
456875
+ evidenceId: "corbel",
456876
+ logicalFamily: "Corbel",
456877
+ physicalFamily: null,
456878
+ verdict: "visual_only",
456879
+ faces: {
456880
+ regular: false,
456881
+ bold: false,
456882
+ italic: false,
456883
+ boldItalic: false
456884
+ },
456885
+ gates: {
456886
+ static: "not_run",
456887
+ metric: "fail",
456888
+ layout: "not_run",
456889
+ ship: "not_run"
456890
+ },
456891
+ policyAction: "category_fallback",
456892
+ measurementRefs: [
456893
+ "corbel#top_candidates#2026-06-03"
456894
+ ],
456895
+ exportRule: "preserve_original_name",
456896
+ candidateLicense: null
456897
+ },
456898
+ {
456899
+ evidenceId: "lucida-console",
456900
+ logicalFamily: "Lucida Console",
456901
+ physicalFamily: "Cousine",
456902
+ verdict: "cell_width_only",
456903
+ faces: {
456904
+ regular: false,
456905
+ bold: false,
456906
+ italic: false,
456907
+ boldItalic: false
456908
+ },
456909
+ gates: {
456910
+ static: "not_run",
456911
+ metric: "not_run",
456912
+ layout: "not_run",
456913
+ ship: "not_run"
456914
+ },
456915
+ policyAction: "category_fallback",
456916
+ measurementRefs: [
456917
+ "lucida-console__cousine#analytic_advance#2026-06-03"
456918
+ ],
456919
+ exportRule: "preserve_original_name",
456920
+ advance: {
456921
+ meanDelta: 0.004050000000000001,
456922
+ maxDelta: 0.004050000000000001
456923
+ },
456924
+ candidateLicense: "OFL-1.1"
456925
+ },
456926
+ {
456927
+ evidenceId: "aptos-display",
456928
+ logicalFamily: "Aptos Display",
456929
+ physicalFamily: null,
456930
+ verdict: "customer_supplied",
456931
+ faces: {
456932
+ regular: false,
456933
+ bold: false,
456934
+ italic: false,
456935
+ boldItalic: false
456936
+ },
456937
+ gates: {
456938
+ static: "not_run",
456939
+ metric: "not_run",
456940
+ layout: "not_run",
456941
+ ship: "fail"
456942
+ },
456943
+ policyAction: "customer_supplied",
456944
+ measurementRefs: [],
456945
+ exportRule: "preserve_original_name"
456946
+ },
456947
+ {
456948
+ evidenceId: "cambria-math",
456949
+ logicalFamily: "Cambria Math",
456950
+ physicalFamily: null,
456951
+ verdict: "preserve_only",
456952
+ faces: {
456953
+ regular: false,
456954
+ bold: false,
456955
+ italic: false,
456956
+ boldItalic: false
456957
+ },
456958
+ gates: {
456959
+ static: "not_run",
456960
+ metric: "not_run",
456961
+ layout: "not_run",
456962
+ ship: "not_run"
456963
+ },
456964
+ policyAction: "preserve_only",
456965
+ measurementRefs: [],
456118
456966
  exportRule: "preserve_original_name"
456119
456967
  },
456120
456968
  {
@@ -456122,57 +456970,222 @@ var init_substitution_evidence = __esm(() => {
456122
456970
  logicalFamily: "Helvetica",
456123
456971
  physicalFamily: "Liberation Sans",
456124
456972
  verdict: "metric_safe",
456125
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456126
- advance: { meanDelta: 0, maxDelta: 0 },
456127
- gates: { static: "not_run", metric: "pass", layout: "not_run", ship: "fail" },
456973
+ faces: {
456974
+ regular: true,
456975
+ bold: true,
456976
+ italic: true,
456977
+ boldItalic: true
456978
+ },
456979
+ gates: {
456980
+ static: "not_run",
456981
+ metric: "pass",
456982
+ layout: "not_run",
456983
+ ship: "pass"
456984
+ },
456128
456985
  policyAction: "substitute",
456129
- measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
456130
- candidateLicense: "OFL-1.1",
456131
- exportRule: "preserve_original_name"
456986
+ measurementRefs: [
456987
+ "helvetica__liberation-sans#analytic_advance#2026-06-03"
456988
+ ],
456989
+ exportRule: "preserve_original_name",
456990
+ advance: {
456991
+ meanDelta: 0,
456992
+ maxDelta: 0
456993
+ },
456994
+ candidateLicense: "OFL-1.1"
456132
456995
  },
456133
456996
  {
456134
456997
  evidenceId: "calibri-light",
456135
456998
  logicalFamily: "Calibri Light",
456136
456999
  physicalFamily: "Carlito",
456137
457000
  verdict: "visual_only",
456138
- faces: { regular: false, bold: false, italic: false, boldItalic: false },
456139
- advance: { meanDelta: 0.0148, maxDelta: 0.066 },
456140
- gates: { static: "not_run", metric: "fail", layout: "not_run", ship: "fail" },
457001
+ faces: {
457002
+ regular: false,
457003
+ bold: false,
457004
+ italic: false,
457005
+ boldItalic: false
457006
+ },
457007
+ gates: {
457008
+ static: "not_run",
457009
+ metric: "fail",
457010
+ layout: "not_run",
457011
+ ship: "fail"
457012
+ },
456141
457013
  policyAction: "category_fallback",
456142
- measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
457014
+ measurementRefs: [
457015
+ "calibri-light__carlito#analytic_advance#2026-06-05"
457016
+ ],
457017
+ exportRule: "preserve_original_name",
457018
+ advance: {
457019
+ meanDelta: 0.0148,
457020
+ maxDelta: 0.066
457021
+ },
457022
+ candidateLicense: "OFL-1.1"
457023
+ },
457024
+ {
457025
+ evidenceId: "baskerville-old-face",
457026
+ logicalFamily: "Baskerville Old Face",
457027
+ physicalFamily: "Bacasime Antique",
457028
+ verdict: "visual_only",
457029
+ faces: {
457030
+ regular: true,
457031
+ bold: false,
457032
+ italic: false,
457033
+ boldItalic: false
457034
+ },
457035
+ gates: {
457036
+ static: "pass",
457037
+ metric: "fail",
457038
+ layout: "not_run",
457039
+ ship: "not_run"
457040
+ },
457041
+ policyAction: "substitute",
457042
+ measurementRefs: [
457043
+ "baskerville-old-face_regular__bacasime-antique#regular#w400#7dac1e5f#analytic_advance#2026-06-05"
457044
+ ],
457045
+ exportRule: "preserve_original_name",
457046
+ advance: {
457047
+ meanDelta: 0,
457048
+ maxDelta: 0.4915590863952334
457049
+ },
456143
457050
  candidateLicense: "OFL-1.1",
456144
- exportRule: "preserve_original_name"
457051
+ faceVerdicts: {
457052
+ regular: "visual_only"
457053
+ },
457054
+ glyphExceptions: [
457055
+ {
457056
+ slot: "regular",
457057
+ codepoint: 160,
457058
+ advanceDelta: 0.4916,
457059
+ note: "Bacasime Antique Regular's no-break space (U+00A0) advance diverges ~49% from Baskerville Old Face; lines containing NBSP reflow. Every other Latin-core glyph is advance-identical, which is why this is visual_only with a single named exception, not near_metric."
457060
+ }
457061
+ ]
456145
457062
  }
457063
+ ];
457064
+ });
457065
+
457066
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/fallbacks.js
457067
+ function normalizeFamilyName2(name) {
457068
+ return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
457069
+ }
457070
+ function buildFallback2(row2, physicalFamily, verdict, faceSlot) {
457071
+ const glyphExceptions = faceSlot ? row2.glyphExceptions?.filter((g2) => g2.slot === faceSlot) : row2.glyphExceptions ? [...row2.glyphExceptions] : undefined;
457072
+ return {
457073
+ substituteFamily: physicalFamily,
457074
+ policyAction: row2.policyAction,
457075
+ verdict,
457076
+ lineBreakSafe: LINE_BREAK_SAFE_VERDICTS2.has(verdict),
457077
+ faces: row2.faces,
457078
+ evidenceId: row2.evidenceId,
457079
+ ...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
457080
+ };
457081
+ }
457082
+ function decideRow2(row2, canRenderFamily2) {
457083
+ const { policyAction, physicalFamily, verdict, evidenceId } = row2;
457084
+ if (policyAction === "preserve_only")
457085
+ return { kind: "preserve_only", evidenceId };
457086
+ if (policyAction === "customer_supplied")
457087
+ return { kind: "customer_supplied", evidenceId };
457088
+ if (physicalFamily === null)
457089
+ return { kind: "no_recommended_fallback", evidenceId };
457090
+ if (canRenderFamily2 && !canRenderFamily2(physicalFamily))
457091
+ return {
457092
+ kind: "asset_missing",
457093
+ substituteFamily: physicalFamily,
457094
+ verdict,
457095
+ evidenceId
457096
+ };
457097
+ return {
457098
+ kind: "fallback",
457099
+ fallback: buildFallback2(row2, physicalFamily, verdict)
457100
+ };
457101
+ }
457102
+ function getFallbackDecision2(family2, options = {}) {
457103
+ const row2 = BY_LOGICAL2.get(normalizeFamilyName2(family2));
457104
+ return row2 ? decideRow2(row2, options.canRenderFamily) : { kind: "unknown" };
457105
+ }
457106
+ function getRenderableFallback2(family2, options) {
457107
+ const decision = getFallbackDecision2(family2, options);
457108
+ return decision.kind === "fallback" ? decision.fallback : null;
457109
+ }
457110
+ var LINE_BREAK_SAFE_VERDICTS2, BY_LOGICAL2;
457111
+ var init_fallbacks = __esm(() => {
457112
+ init_data();
457113
+ LINE_BREAK_SAFE_VERDICTS2 = new Set([
457114
+ "metric_safe",
457115
+ "near_metric",
457116
+ "cell_width_only"
456146
457117
  ]);
457118
+ BY_LOGICAL2 = new Map(SUBSTITUTION_EVIDENCE2.map((row2) => [
457119
+ normalizeFamilyName2(row2.logicalFamily),
457120
+ row2
457121
+ ]));
457122
+ });
457123
+
457124
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/index.js
457125
+ var init_dist11 = __esm(() => {
457126
+ init_data();
457127
+ init_fallbacks();
457128
+ });
457129
+
457130
+ // ../../shared/font-system/src/bundled-manifest.ts
457131
+ function fourFaces2(filePrefix) {
457132
+ return [
457133
+ { weight: "normal", style: "normal", file: `${filePrefix}-Regular.woff2` },
457134
+ { weight: "bold", style: "normal", file: `${filePrefix}-Bold.woff2` },
457135
+ { weight: "normal", style: "italic", file: `${filePrefix}-Italic.woff2` },
457136
+ { weight: "bold", style: "italic", file: `${filePrefix}-BoldItalic.woff2` }
457137
+ ];
457138
+ }
457139
+ function family2(name, filePrefix, license) {
457140
+ return { family: name, license, faces: fourFaces2(filePrefix) };
457141
+ }
457142
+ var BUNDLED_MANIFEST2;
457143
+ var init_bundled_manifest = __esm(() => {
457144
+ BUNDLED_MANIFEST2 = Object.freeze([
457145
+ family2("Carlito", "Carlito", "OFL-1.1"),
457146
+ family2("Caladea", "Caladea", "Apache-2.0"),
457147
+ family2("Liberation Sans", "LiberationSans", "OFL-1.1"),
457148
+ family2("Liberation Serif", "LiberationSerif", "OFL-1.1"),
457149
+ family2("Liberation Mono", "LiberationMono", "OFL-1.1")
457150
+ ]);
457151
+ });
457152
+
457153
+ // ../../shared/font-system/src/substitution-evidence.ts
457154
+ var SUBSTITUTION_EVIDENCE3;
457155
+ var init_substitution_evidence = __esm(() => {
457156
+ init_dist11();
457157
+ SUBSTITUTION_EVIDENCE3 = SUBSTITUTION_EVIDENCE2;
456147
457158
  });
456148
457159
 
456149
457160
  // ../../shared/font-system/src/resolver.ts
456150
- function normalizeFamilyKey3(family2) {
456151
- return family2.trim().replace(/^["']|["']$/g, "").toLowerCase();
457161
+ function normalizeFamilyKey3(family3) {
457162
+ return family3.trim().replace(/^["']|["']$/g, "").toLowerCase();
456152
457163
  }
456153
457164
  function sortPairs2(pairs) {
456154
457165
  return pairs.sort(([a2], [b2]) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
456155
457166
  }
456156
457167
  function deriveBundledSubstitutes2() {
456157
457168
  const substitutes = {};
456158
- for (const row2 of SUBSTITUTION_EVIDENCE2) {
456159
- if (row2.policyAction === "substitute" && row2.physicalFamily) {
456160
- substitutes[normalizeFamilyKey3(row2.logicalFamily)] = row2.physicalFamily;
457169
+ for (const row2 of SUBSTITUTION_EVIDENCE3) {
457170
+ const fallback = getRenderableFallback2(row2.logicalFamily, { canRenderFamily: canRenderFamily2 });
457171
+ if (fallback?.policyAction === "substitute") {
457172
+ substitutes[normalizeFamilyKey3(row2.logicalFamily)] = fallback.substituteFamily;
456161
457173
  }
456162
457174
  }
456163
457175
  return Object.freeze(substitutes);
456164
457176
  }
456165
457177
  function deriveCategoryFallbacks2() {
456166
457178
  const fallbacks = {};
456167
- for (const row2 of SUBSTITUTION_EVIDENCE2) {
456168
- if (row2.policyAction === "category_fallback" && row2.physicalFamily) {
456169
- fallbacks[normalizeFamilyKey3(row2.logicalFamily)] = row2.physicalFamily;
457179
+ for (const row2 of SUBSTITUTION_EVIDENCE3) {
457180
+ const fallback = getRenderableFallback2(row2.logicalFamily, { canRenderFamily: canRenderFamily2 });
457181
+ if (fallback?.policyAction === "category_fallback") {
457182
+ fallbacks[normalizeFamilyKey3(row2.logicalFamily)] = fallback.substituteFamily;
456170
457183
  }
456171
457184
  }
456172
457185
  return Object.freeze(fallbacks);
456173
457186
  }
456174
- function stripFamilyQuotes2(family2) {
456175
- return family2.trim().replace(/^["']|["']$/g, "");
457187
+ function stripFamilyQuotes2(family3) {
457188
+ return family3.trim().replace(/^["']|["']$/g, "");
456176
457189
  }
456177
457190
  function splitStack2(cssFontFamily) {
456178
457191
  return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
@@ -456321,16 +457334,16 @@ class FontResolver2 {
456321
457334
  }
456322
457335
  return cssFontFamily;
456323
457336
  }
456324
- resolvePrimaryPhysicalFamily(family2) {
456325
- const parts = splitStack2(family2);
456326
- const primary = parts[0] ?? family2;
457337
+ resolvePrimaryPhysicalFamily(family3) {
457338
+ const parts = splitStack2(family3);
457339
+ const primary = parts[0] ?? family3;
456327
457340
  return this.#physicalFor(primary).physical;
456328
457341
  }
456329
457342
  resolvePhysicalFamilies(families) {
456330
457343
  const out = new Set;
456331
- for (const family2 of families) {
456332
- if (family2)
456333
- out.add(this.resolvePrimaryPhysicalFamily(family2));
457344
+ for (const family3 of families) {
457345
+ if (family3)
457346
+ out.add(this.resolvePrimaryPhysicalFamily(family3));
456334
457347
  }
456335
457348
  return [...out];
456336
457349
  }
@@ -456338,9 +457351,12 @@ class FontResolver2 {
456338
457351
  function resolvePhysicalFamily2(cssFontFamily) {
456339
457352
  return defaultResolver2.resolvePhysicalFamily(cssFontFamily);
456340
457353
  }
456341
- var BUNDLED_SUBSTITUTES2, CATEGORY_FALLBACKS2, defaultResolver2, DEFAULT_FONT_MEASURE_CONTEXT2;
457354
+ var bundledFamilies2, canRenderFamily2 = (family3) => bundledFamilies2.has(family3), BUNDLED_SUBSTITUTES2, CATEGORY_FALLBACKS2, defaultResolver2, DEFAULT_FONT_MEASURE_CONTEXT2;
456342
457355
  var init_resolver = __esm(() => {
457356
+ init_dist11();
457357
+ init_bundled_manifest();
456343
457358
  init_substitution_evidence();
457359
+ bundledFamilies2 = new Set(BUNDLED_MANIFEST2.map((f2) => f2.family));
456344
457360
  BUNDLED_SUBSTITUTES2 = deriveBundledSubstitutes2();
456345
457361
  CATEGORY_FALLBACKS2 = deriveCategoryFallbacks2();
456346
457362
  defaultResolver2 = new FontResolver2;
@@ -456349,29 +457365,6 @@ var init_resolver = __esm(() => {
456349
457365
  fontSignature: ""
456350
457366
  });
456351
457367
  });
456352
- // ../../shared/font-system/src/bundled-manifest.ts
456353
- function fourFaces2(filePrefix) {
456354
- return [
456355
- { weight: "normal", style: "normal", file: `${filePrefix}-Regular.woff2` },
456356
- { weight: "bold", style: "normal", file: `${filePrefix}-Bold.woff2` },
456357
- { weight: "normal", style: "italic", file: `${filePrefix}-Italic.woff2` },
456358
- { weight: "bold", style: "italic", file: `${filePrefix}-BoldItalic.woff2` }
456359
- ];
456360
- }
456361
- function family2(name, filePrefix, license) {
456362
- return { family: name, license, faces: fourFaces2(filePrefix) };
456363
- }
456364
- var BUNDLED_MANIFEST2;
456365
- var init_bundled_manifest = __esm(() => {
456366
- BUNDLED_MANIFEST2 = Object.freeze([
456367
- family2("Carlito", "Carlito", "OFL-1.1"),
456368
- family2("Caladea", "Caladea", "Apache-2.0"),
456369
- family2("Liberation Sans", "LiberationSans", "OFL-1.1"),
456370
- family2("Liberation Serif", "LiberationSerif", "OFL-1.1"),
456371
- family2("Liberation Mono", "LiberationMono", "OFL-1.1")
456372
- ]);
456373
- });
456374
-
456375
457368
  // ../../shared/font-system/src/bundled.ts
456376
457369
  var installedRegistries2;
456377
457370
  var init_bundled = __esm(() => {
@@ -456772,7 +457765,7 @@ function classifyOffering2(policyAction, verdict, physicalFamily, bundled) {
456772
457765
  return verdict === "metric_safe" ? "default" : "qualified";
456773
457766
  }
456774
457767
  function deriveOfferings2() {
456775
- const offerings = SUBSTITUTION_EVIDENCE2.map((row2) => {
457768
+ const offerings = SUBSTITUTION_EVIDENCE3.map((row2) => {
456776
457769
  const bundled = row2.physicalFamily != null && BUNDLED_FAMILIES2.has(row2.physicalFamily);
456777
457770
  return {
456778
457771
  logicalFamily: row2.logicalFamily,
@@ -458984,7 +459977,7 @@ function buildSourcesRootElement2(sources, styleMetadata) {
458984
459977
  const sourceElements = sources.map(buildSourceNode2).filter(Boolean);
458985
459978
  const selectedStyle = styleMetadata.selectedStyle || DEFAULT_SELECTED_STYLE2;
458986
459979
  const styleName = styleMetadata.styleName || DEFAULT_STYLE_NAME2;
458987
- const version4 = styleMetadata.version || DEFAULT_VERSION2;
459980
+ const version3 = styleMetadata.version || DEFAULT_VERSION2;
458988
459981
  return {
458989
459982
  type: "element",
458990
459983
  name: "b:Sources",
@@ -458993,7 +459986,7 @@ function buildSourcesRootElement2(sources, styleMetadata) {
458993
459986
  xmlns: BIBLIOGRAPHY_NAMESPACE_URI2,
458994
459987
  SelectedStyle: selectedStyle,
458995
459988
  StyleName: styleName,
458996
- Version: version4
459989
+ Version: version3
458997
459990
  },
458998
459991
  elements: sourceElements
458999
459992
  };
@@ -459129,9 +460122,9 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
459129
460122
  const itemRelsPath = `customXml/_rels/item${itemIndex}.xml.rels`;
459130
460123
  const selectedStyle = bibliographyPart?.selectedStyle ?? currentPackageState.selectedStyle ?? DEFAULT_SELECTED_STYLE2;
459131
460124
  const styleName = bibliographyPart?.styleName ?? currentPackageState.styleName ?? DEFAULT_STYLE_NAME2;
459132
- const version4 = bibliographyPart?.version ?? currentPackageState.version ?? DEFAULT_VERSION2;
460125
+ const version3 = bibliographyPart?.version ?? currentPackageState.version ?? DEFAULT_VERSION2;
459133
460126
  const existingPartDeclaration = convertedXml[partPath]?.declaration;
459134
- const sourcesRoot = buildSourcesRootElement2(normalizedSources, { selectedStyle, styleName, version: version4 });
460127
+ const sourcesRoot = buildSourcesRootElement2(normalizedSources, { selectedStyle, styleName, version: version3 });
459135
460128
  convertedXml[partPath] = createXmlDocument3(sourcesRoot, existingPartDeclaration);
459136
460129
  const relationshipsRoot = ensureDocumentRelationshipsRoot3(convertedXml);
459137
460130
  const expectedTarget = buildDocumentRelationshipTarget2(partPath);
@@ -459154,7 +460147,7 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
459154
460147
  }
459155
460148
  const existingItemProps = convertedXml[itemPropsPath];
459156
460149
  const existingItemPropsDeclaration = existingItemProps?.declaration;
459157
- const dataStoreItemId = extractExistingDataStoreItemId2(existingItemProps) || `{${v42().toUpperCase()}}`;
460150
+ const dataStoreItemId = extractExistingDataStoreItemId2(existingItemProps) || `{${v4_default2().toUpperCase()}}`;
459158
460151
  convertedXml[itemPropsPath] = createXmlDocument3(buildItemPropsRootElement2(dataStoreItemId), existingItemPropsDeclaration);
459159
460152
  const existingItemRelsDeclaration = convertedXml[itemRelsPath]?.declaration;
459160
460153
  convertedXml[itemRelsPath] = createXmlDocument3(buildCustomXmlItemRelationshipsRoot2(`itemProps${itemIndex}.xml`), existingItemRelsDeclaration);
@@ -459165,7 +460158,7 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
459165
460158
  itemRelsPath,
459166
460159
  selectedStyle,
459167
460160
  styleName,
459168
- version: version4
460161
+ version: version3
459169
460162
  };
459170
460163
  }
459171
460164
  function getBibliographyPartExportPaths2(bibliographyPart) {
@@ -459174,7 +460167,7 @@ function getBibliographyPartExportPaths2(bibliographyPart) {
459174
460167
  }
459175
460168
  var BIBLIOGRAPHY_NAMESPACE_URI2 = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE2 = "/APA.XSL", DEFAULT_STYLE_NAME2 = "APA", DEFAULT_VERSION2 = "6", API_TO_OOXML_SOURCE_TYPE2, OOXML_TO_API_SOURCE_TYPE2, SIMPLE_FIELD_TO_XML_TAG2, XML_TAG_TO_SIMPLE_FIELD2;
459176
460169
  var init_citation_sources = __esm(() => {
459177
- init_wrapper();
460170
+ init_esm2();
459178
460171
  init_helpers();
459179
460172
  init_constants4();
459180
460173
  API_TO_OOXML_SOURCE_TYPE2 = Object.freeze({
@@ -459281,7 +460274,7 @@ var xmljs2, FONT_FAMILY_FALLBACKS3, DEFAULT_GENERIC_FALLBACK3 = "sans-serif", DE
459281
460274
  }
459282
460275
  }, SuperConverter3;
459283
460276
  var init_SuperConverter = __esm(() => {
459284
- init_wrapper();
460277
+ init_esm2();
459285
460278
  init_exporter();
459286
460279
  init_docxImporter();
459287
460280
  init_normalizeDuplicateBlockIdentitiesInContent();
@@ -459598,8 +460591,8 @@ var init_SuperConverter = __esm(() => {
459598
460591
  static getStoredSuperdocVersion(docx) {
459599
460592
  return SuperConverter3.getStoredCustomProperty(docx, "SuperdocVersion");
459600
460593
  }
459601
- static setStoredSuperdocVersion(docx = this.convertedXml, version4 = CURRENT_APP_VERSION3) {
459602
- return SuperConverter3.setStoredCustomProperty(docx, "SuperdocVersion", version4, false);
460594
+ static setStoredSuperdocVersion(docx = this.convertedXml, version3 = CURRENT_APP_VERSION3) {
460595
+ return SuperConverter3.setStoredCustomProperty(docx, "SuperdocVersion", version3, false);
459603
460596
  }
459604
460597
  static generateWordTimestamp() {
459605
460598
  const date6 = new Date;
@@ -459693,7 +460686,7 @@ var init_SuperConverter = __esm(() => {
459693
460686
  }
459694
460687
  async#generateContentHash() {
459695
460688
  if (!this.fileSource) {
459696
- return `HASH-${v42().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
460689
+ return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
459697
460690
  }
459698
460691
  try {
459699
460692
  let data;
@@ -459706,12 +460699,12 @@ var init_SuperConverter = __esm(() => {
459706
460699
  const arrayBuffer = await this.fileSource.arrayBuffer();
459707
460700
  data = new Uint8Array(arrayBuffer);
459708
460701
  } else {
459709
- return `HASH-${v42().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
460702
+ return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
459710
460703
  }
459711
460704
  return `HASH-${computeCrc32Hex2(data).toUpperCase()}`;
459712
460705
  } catch (e) {
459713
460706
  console.warn("[super-converter] Could not generate content hash:", e);
459714
- return `HASH-${v42().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
460707
+ return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
459715
460708
  }
459716
460709
  }
459717
460710
  async getDocumentIdentifier() {
@@ -459724,7 +460717,7 @@ var init_SuperConverter = __esm(() => {
459724
460717
  this.documentUniqueIdentifier = this.#generateIdentifierHash();
459725
460718
  } else {
459726
460719
  if (!hasGuid) {
459727
- this.documentGuid = v42();
460720
+ this.documentGuid = v4_default2();
459728
460721
  }
459729
460722
  if (!hasTimestamp) {
459730
460723
  this.setDocumentCreatedTimestamp(SuperConverter3.generateWordTimestamp());
@@ -459737,7 +460730,7 @@ var init_SuperConverter = __esm(() => {
459737
460730
  promoteToGuid() {
459738
460731
  if (this.documentGuid)
459739
460732
  return this.documentGuid;
459740
- this.documentGuid = this.getMicrosoftDocId() || v42();
460733
+ this.documentGuid = this.getMicrosoftDocId() || v4_default2();
459741
460734
  this.documentModified = true;
459742
460735
  this.documentUniqueIdentifier = null;
459743
460736
  return this.documentGuid;
@@ -459929,7 +460922,7 @@ var init_SuperConverter = __esm(() => {
459929
460922
  this.documentInternalId = w15DocId?.attributes?.["w15:val"];
459930
460923
  }
459931
460924
  createDocumentIdElement() {
459932
- const docId = v42().toUpperCase();
460925
+ const docId = v4_default2().toUpperCase();
459933
460926
  this.documentInternalId = docId;
459934
460927
  return {
459935
460928
  type: "element",
@@ -460088,7 +461081,7 @@ var init_SuperConverter = __esm(() => {
460088
461081
  SuperConverter3.setStoredCustomProperty(this.convertedXml, SUPERDOC_DOCUMENT_ORIGIN_PROPERTY3, storedDocumentOrigin, false);
460089
461082
  if (this.documentModified || this.documentGuid) {
460090
461083
  if (!this.documentGuid) {
460091
- this.documentGuid = this.getMicrosoftDocId() || v42();
461084
+ this.documentGuid = this.getMicrosoftDocId() || v4_default2();
460092
461085
  }
460093
461086
  SuperConverter3.setStoredCustomProperty(this.convertedXml, "DocumentGuid", this.documentGuid, true);
460094
461087
  }
@@ -460433,9 +461426,9 @@ var init_SuperConverter = __esm(() => {
460433
461426
  console.warn("getStoredSuperdocId is deprecated, use getDocumentGuid instead");
460434
461427
  return SuperConverter3.extractDocumentGuid(docx);
460435
461428
  }
460436
- static updateDocumentVersion(docx, version4) {
461429
+ static updateDocumentVersion(docx, version3) {
460437
461430
  console.warn("updateDocumentVersion is deprecated, use setStoredSuperdocVersion instead");
460438
- return SuperConverter3.setStoredSuperdocVersion(docx, version4);
461431
+ return SuperConverter3.setStoredSuperdocVersion(docx, version3);
460439
461432
  }
460440
461433
  };
460441
461434
  });
@@ -462127,10 +463120,10 @@ var require_supports_color = __commonJS((exports, module) => {
462127
463120
  return 3;
462128
463121
  }
462129
463122
  if ("TERM_PROGRAM" in env2) {
462130
- const version4 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
463123
+ const version3 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
462131
463124
  switch (env2.TERM_PROGRAM) {
462132
463125
  case "iTerm.app":
462133
- return version4 >= 3 ? 3 : 2;
463126
+ return version3 >= 3 ? 3 : 2;
462134
463127
  case "Apple_Terminal":
462135
463128
  return 2;
462136
463129
  }
@@ -462685,7 +463678,7 @@ function parse10(options) {
462685
463678
  }
462686
463679
  }
462687
463680
  }
462688
- var init_parse4 = __esm(() => {
463681
+ var init_parse5 = __esm(() => {
462689
463682
  init_micromark_util_combine_extensions();
462690
463683
  init_content2();
462691
463684
  init_document();
@@ -462792,7 +463785,7 @@ var init_preprocess = __esm(() => {
462792
463785
 
462793
463786
  // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/index.js
462794
463787
  var init_dev19 = __esm(() => {
462795
- init_parse4();
463788
+ init_parse5();
462796
463789
  init_postprocess();
462797
463790
  init_preprocess();
462798
463791
  });
@@ -463830,7 +464823,7 @@ function buildImageAttrs2(node4, ctx2) {
463830
464823
  src: node4.url,
463831
464824
  alt: node4.alt ?? null,
463832
464825
  title: node4.title ?? null,
463833
- sdImageId: v42(),
464826
+ sdImageId: v4_default2(),
463834
464827
  id: generateUniqueImageDocPrId2(ctx2)
463835
464828
  };
463836
464829
  const dimensions = readImageDimensionsFromDataUri2(node4.url);
@@ -463915,7 +464908,7 @@ function addDiagnostic3(ctx2, severity, nodeType, message, node4) {
463915
464908
  }
463916
464909
  var FULL_WIDTH_TABLE_PCT2 = 5000, imageDocPrIdsByContext2, HEADING_STYLE_MAP2;
463917
464910
  var init_mdastToProseMirror = __esm(() => {
463918
- init_wrapper();
464911
+ init_esm2();
463919
464912
  init_list_numbering_helpers();
463920
464913
  init_image_dimensions();
463921
464914
  imageDocPrIdsByContext2 = new WeakMap;
@@ -468073,6 +469066,8 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
468073
469066
  const absTo = mapping.map(target.absTo);
468074
469067
  const replacementText = getReplacementText2(step3.args.replacement);
468075
469068
  const marks = resolveMarksForRange2(editor, target, step3);
469069
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
469070
+ const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt2(tr, pos, lineBreakNodeType) : false;
468076
469071
  const structuralRewrite = resolveStructuralRangeRewrite2(tr.doc, absFrom, absTo, step3);
468077
469072
  if (structuralRewrite) {
468078
469073
  const slice3 = buildReplacementParagraphSlice2(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step3.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
@@ -468100,7 +469095,9 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
468100
469095
  tr.delete(absFrom, absTo);
468101
469096
  return { changed: target.text.length > 0 };
468102
469097
  }
468103
- const content5 = buildTextWithTabs2(editor.state.schema, replacementText, asProseMirrorMarks2(marks));
469098
+ const content5 = buildTextWithTabs2(editor.state.schema, replacementText, asProseMirrorMarks2(marks), {
469099
+ parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom)
469100
+ });
468104
469101
  tr.replaceWith(absFrom, absTo, content5);
468105
469102
  return { changed: replacementText !== target.text };
468106
469103
  }
@@ -468144,17 +469141,23 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
468144
469141
  if (change.type === "delete") {
468145
469142
  tr.delete(remap(change.docFrom), remap(change.docTo));
468146
469143
  } else if (change.type === "insert") {
468147
- const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks));
469144
+ const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks), {
469145
+ parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos))
469146
+ });
468148
469147
  tr.insert(remap(change.docPos), content5);
468149
469148
  } else {
468150
- const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks));
469149
+ const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks), {
469150
+ parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom))
469151
+ });
468151
469152
  tr.replaceWith(remap(change.docFrom), remap(change.docTo), content5);
468152
469153
  }
468153
469154
  }
468154
469155
  } else if (trimmedNew.length === 0) {
468155
469156
  tr.delete(trimmedFrom, trimmedTo);
468156
469157
  } else {
468157
- const content5 = buildTextWithTabs2(editor.state.schema, trimmedNew, asProseMirrorMarks2(marks));
469158
+ const content5 = buildTextWithTabs2(editor.state.schema, trimmedNew, asProseMirrorMarks2(marks), {
469159
+ parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom)
469160
+ });
468158
469161
  tr.replaceWith(trimmedFrom, trimmedTo, content5);
468159
469162
  }
468160
469163
  return { changed: replacementText !== target.text };
@@ -468235,7 +469238,9 @@ function executeTextInsert2(editor, tr, target, step3, mapping) {
468235
469238
  }
468236
469239
  const tabNodeType = editor.state.schema.nodes?.tab;
468237
469240
  const parentAllowsTab = tabNodeType && text9.includes("\t") ? parentAllowsNodeAt2(tr, absPos, tabNodeType) : false;
468238
- tr.insert(absPos, buildTextWithTabs2(editor.state.schema, text9, marks, { parentAllowsTab }));
469241
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
469242
+ const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text9) ? parentAllowsNodeAt2(tr, absPos, lineBreakNodeType) : false;
469243
+ tr.insert(absPos, buildTextWithTabs2(editor.state.schema, text9, marks, { parentAllowsTab, parentAllowsLineBreak }));
468239
469244
  return { changed: true };
468240
469245
  }
468241
469246
  function executeTextDelete2(_editor, tr, target, _step, mapping) {
@@ -468330,7 +469335,11 @@ function executeSpanTextRewrite2(editor, tr, target, step3, mapping) {
468330
469335
  const absTo = mapping.map(lastSeg.absTo, -1);
468331
469336
  if (replacementBlocks.length === 1) {
468332
469337
  const marks = resolveSpanMarks2(editor, target, policy, step3.id);
468333
- const content5 = buildTextWithTabs2(editor.state.schema, replacementBlocks[0], asProseMirrorMarks2(marks));
469338
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
469339
+ const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt2(tr, absFrom, lineBreakNodeType) : false;
469340
+ const content5 = buildTextWithTabs2(editor.state.schema, replacementBlocks[0], asProseMirrorMarks2(marks), {
469341
+ parentAllowsLineBreak
469342
+ });
468334
469343
  tr.replaceWith(absFrom, absTo, content5);
468335
469344
  return { changed: true };
468336
469345
  }
@@ -469096,7 +470105,7 @@ function resolveBlockId2(node4, seenIds, existingDocIds) {
469096
470105
  seenIds.add(id2);
469097
470106
  return id2;
469098
470107
  }
469099
- const generated = v42();
470108
+ const generated = v4_default2();
469100
470109
  seenIds.add(generated);
469101
470110
  return generated;
469102
470111
  }
@@ -469186,7 +470195,7 @@ function materializeTable2(schema, node4, seenIds, existingDocIds, operation, op
469186
470195
  const rows = (payload.rows ?? []).map((row2) => materializeTableRow2(schema, row2, seenIds, existingDocIds, operation, options));
469187
470196
  const attrs = {
469188
470197
  sdBlockId: resolveBlockId2(node4, seenIds, existingDocIds),
469189
- paraId: v42()
470198
+ paraId: v4_default2()
469190
470199
  };
469191
470200
  const styleRef = payload.styleRef ?? payload.style;
469192
470201
  const tableProperties = isRecord8(payload.tableProperties) ? { ...payload.tableProperties } : {};
@@ -469228,7 +470237,7 @@ function materializeTable2(schema, node4, seenIds, existingDocIds, operation, op
469228
470237
  }
469229
470238
  function materializeTableRow2(schema, row2, seenIds, existingDocIds, operation, options) {
469230
470239
  const cells = (row2.cells ?? []).map((cell2) => materializeTableCell2(schema, cell2, seenIds, existingDocIds, operation, options));
469231
- const attrs = { sdBlockId: v42() };
470240
+ const attrs = { sdBlockId: v4_default2() };
469232
470241
  if (row2.props?.minHeight !== undefined)
469233
470242
  attrs.minHeight = row2.props.minHeight;
469234
470243
  if (row2.props?.cantSplit !== undefined)
@@ -469237,7 +470246,7 @@ function materializeTableRow2(schema, row2, seenIds, existingDocIds, operation,
469237
470246
  }
469238
470247
  function materializeTableCell2(schema, cell2, seenIds, existingDocIds, operation, options) {
469239
470248
  const children = (cell2.content ?? [{ type: "paragraph" }]).map((child) => materializeNode2(schema, child, seenIds, existingDocIds, operation, options));
469240
- const attrs = { sdBlockId: v42() };
470249
+ const attrs = { sdBlockId: v4_default2() };
469241
470250
  if (cell2.colSpan !== undefined)
469242
470251
  attrs.colspan = cell2.colSpan;
469243
470252
  if (cell2.rowSpan !== undefined)
@@ -469372,15 +470381,15 @@ function materializeListItem2(schema, item, _parentPayload, seenIds, existingDoc
469372
470381
  const kind = resolveKind2(itemContent[0]);
469373
470382
  if (["paragraph", "heading", "table", "list", "image"].includes(kind)) {
469374
470383
  const children = itemContent.map((child) => materializeNode2(schema, child, seenIds, existingDocIds, operation, options));
469375
- const attrs2 = { sdBlockId: v42() };
470384
+ const attrs2 = { sdBlockId: v4_default2() };
469376
470385
  if (item.level !== undefined)
469377
470386
  attrs2.level = item.level;
469378
470387
  return schema.nodes.listItem.create(attrs2, children);
469379
470388
  }
469380
470389
  }
469381
470390
  const content5 = materializeInlineContent2(schema, itemContent, operation, options);
469382
- const paragraph4 = schema.nodes.paragraph.create({ sdBlockId: v42() }, content5);
469383
- const attrs = { sdBlockId: v42() };
470391
+ const paragraph4 = schema.nodes.paragraph.create({ sdBlockId: v4_default2() }, content5);
470392
+ const attrs = { sdBlockId: v4_default2() };
469384
470393
  if (item.level !== undefined)
469385
470394
  attrs.level = item.level;
469386
470395
  return schema.nodes.listItem.create(attrs, [paragraph4]);
@@ -469635,7 +470644,7 @@ function materializeTab2(schema) {
469635
470644
  return nodeType.create();
469636
470645
  }
469637
470646
  function materializeLineBreak2(schema) {
469638
- const nodeType = schema.nodes.hardBreak ?? schema.nodes.lineBreak;
470647
+ const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
469639
470648
  if (!nodeType)
469640
470649
  return schema.text(`
469641
470650
  `);
@@ -469805,7 +470814,7 @@ function buildMarksFromLegacyRun2(schema, run2) {
469805
470814
  var CONTENT_CAPABILITIES2, INLINE_CAPABILITIES2, SDT_LOCK_TO_LOCK_MODE2;
469806
470815
  var init_node_materializer = __esm(() => {
469807
470816
  init_dist2();
469808
- init_wrapper();
470817
+ init_esm2();
469809
470818
  init_errors4();
469810
470819
  init_text_with_tabs();
469811
470820
  CONTENT_CAPABILITIES2 = new Map([
@@ -470326,7 +471335,7 @@ function ensureMarkdownImageIds2(nodes) {
470326
471335
  const attrs = isJsonObject2(node4.attrs) ? { ...node4.attrs } : {};
470327
471336
  const hasStableId = typeof attrs.sdImageId === "string" && attrs.sdImageId.length > 0;
470328
471337
  if (!hasStableId) {
470329
- attrs.sdImageId = v42();
471338
+ attrs.sdImageId = v4_default2();
470330
471339
  }
470331
471340
  node4.attrs = attrs;
470332
471341
  }
@@ -470374,7 +471383,7 @@ function toCompiledTarget2(stepId, op, resolved) {
470374
471383
  };
470375
471384
  }
470376
471385
  function executeDomainCommand2(editor, handler3, options) {
470377
- const stepId = v42();
471386
+ const stepId = v4_default2();
470378
471387
  const step3 = {
470379
471388
  id: stepId,
470380
471389
  op: "domain.command",
@@ -470430,7 +471439,7 @@ function writeWrapper2(editor, request, options) {
470430
471439
  runtime.commit(editor);
470431
471440
  return mapPlanReceiptToTextReceipt2(receipt3, resolved.resolution);
470432
471441
  }
470433
- const stepId = v42();
471442
+ const stepId = v4_default2();
470434
471443
  const step3 = {
470435
471444
  id: stepId,
470436
471445
  op: "text.insert",
@@ -470524,7 +471533,7 @@ function selectionMutationWrapper2(editor, request, options) {
470524
471533
  if (mode === "tracked")
470525
471534
  ensureTrackedInlinePropertySupport2(inlineKeys);
470526
471535
  }
470527
- const stepId = v42();
471536
+ const stepId = v4_default2();
470528
471537
  const where = buildSelectionWhere2(request);
470529
471538
  const step3 = buildSelectionStepDef2(stepId, request, where);
470530
471539
  const compiled = compilePlan2(storyEditor, [step3]);
@@ -470725,7 +471734,7 @@ function insertStructuredInner2(editor, input2, options) {
470725
471734
  }
470726
471735
  effectiveTarget = { kind: "text", blockId, range: { start: offset2, end: offset2 } };
470727
471736
  } else if (ref4) {
470728
- const dummyStepId = v42();
471737
+ const dummyStepId = v4_default2();
470729
471738
  const dummyStep = {
470730
471739
  id: dummyStepId,
470731
471740
  op: "text.insert",
@@ -471287,7 +472296,7 @@ function executeStructuralReplaceWrapper2(editor, input2, options) {
471287
472296
  }
471288
472297
  var STUB_WHERE2, EMPTY_RESOLUTION2, CONTAINER_NODE_TYPES2, VALID_EDGE_NODE_TYPES4;
471289
472298
  var init_plan_wrappers = __esm(() => {
471290
- init_wrapper();
472299
+ init_esm2();
471291
472300
  init_src();
471292
472301
  init_compiler();
471293
472302
  init_executor();
@@ -473492,7 +474501,7 @@ function addCommentHandler2(editor, input2, options) {
473492
474501
  }
473493
474502
  };
473494
474503
  }
473495
- const commentId = v42();
474504
+ const commentId = v4_default2();
473496
474505
  let trackedPayload = null;
473497
474506
  const receipt2 = executeDomainCommand2(editor, () => {
473498
474507
  const addComment = requireEditorCommand2(editor.commands?.addComment, "comments.create (addComment)");
@@ -473585,7 +474594,7 @@ function replyToCommentHandler2(editor, input2, options) {
473585
474594
  const store = getCommentEntityStore2(editor);
473586
474595
  const parentRecord = findCommentEntity2(store, parentIdentity.commentId);
473587
474596
  const inheritedTrackedFields = buildTrackedChangeEntityFieldsFromRecord2(parentRecord) ?? buildTrackedChangeEntityFields2(resolveCommentTrackedChangeSnapshot2(editor, parentIdentity.commentId));
473588
- const replyId = v42();
474597
+ const replyId = v4_default2();
473589
474598
  let trackedPayload = null;
473590
474599
  const receipt2 = executeDomainCommand2(editor, () => {
473591
474600
  const didReply = addCommentReply({
@@ -473976,7 +474985,7 @@ function createCommentsWrapper2(editor) {
473976
474985
  var init_comments_wrappers = __esm(() => {
473977
474986
  init_src();
473978
474987
  init_dist5();
473979
- init_wrapper();
474988
+ init_esm2();
473980
474989
  init_errors4();
473981
474990
  init_mutation_helpers();
473982
474991
  init_index_cache();
@@ -479878,7 +480887,7 @@ var require_zipEntries = __commonJS((exports, module) => {
479878
480887
  if (this.centralDirRecords !== this.files.length) {
479879
480888
  if (this.centralDirRecords !== 0 && this.files.length === 0) {
479880
480889
  throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
479881
- } else {}
480890
+ }
479882
480891
  }
479883
480892
  },
479884
480893
  readEndOfCentral: function() {
@@ -481511,7 +482520,7 @@ function createParagraphWrapper2(editor, input2, options) {
481511
482520
  }
481512
482521
  };
481513
482522
  }
481514
- const paragraphId = v42();
482523
+ const paragraphId = v4_default2();
481515
482524
  let canonicalId = paragraphId;
481516
482525
  let trackedChangeRefs;
481517
482526
  const receipt2 = executeDomainCommand2(storyEditor, () => {
@@ -481595,7 +482604,7 @@ function createHeadingWrapper2(editor, input2, options) {
481595
482604
  }
481596
482605
  };
481597
482606
  }
481598
- const headingId = v42();
482607
+ const headingId = v4_default2();
481599
482608
  let canonicalId = headingId;
481600
482609
  let trackedChangeRefs;
481601
482610
  const receipt2 = executeDomainCommand2(storyEditor, () => {
@@ -481641,7 +482650,7 @@ function createHeadingWrapper2(editor, input2, options) {
481641
482650
  }
481642
482651
  }
481643
482652
  var init_create_wrappers = __esm(() => {
481644
- init_wrapper();
482653
+ init_esm2();
481645
482654
  init_index_cache();
481646
482655
  init_create_insertion();
481647
482656
  init_tracked_change_refs();
@@ -482877,7 +483886,7 @@ function resolveInsertedListItem2(editor, sdBlockId) {
482877
483886
  throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", `Inserted list item with sdBlockId "${sdBlockId}" could not be resolved after insertion.`);
482878
483887
  }
482879
483888
  function generateRuntimeParaId2() {
482880
- return v42().replace(/-/g, "").slice(0, 8).toUpperCase();
483889
+ return v4_default2().replace(/-/g, "").slice(0, 8).toUpperCase();
482881
483890
  }
482882
483891
  function withListTarget2(editor, input2) {
482883
483892
  return resolveListItem2(editor, input2.target);
@@ -482963,7 +483972,7 @@ function listsInsertWrapper2(editor, input2, options) {
482963
483972
  }
482964
483973
  };
482965
483974
  }
482966
- const createdId = v42();
483975
+ const createdId = v4_default2();
482967
483976
  const createdParaId = generateRuntimeParaId2();
482968
483977
  let created = null;
482969
483978
  const receipt2 = executeDomainCommand2(editor, () => {
@@ -483658,7 +484667,7 @@ function listsConvertToTextWrapper2(editor, input2, options) {
483658
484667
  }
483659
484668
  var PRESET_KIND_MAP2;
483660
484669
  var init_lists_wrappers = __esm(() => {
483661
- init_wrapper();
484670
+ init_esm2();
483662
484671
  init_errors4();
483663
484672
  init_mutation_helpers();
483664
484673
  init_plan_wrappers();
@@ -485577,7 +486586,7 @@ function createSeparatorParagraph2(schema) {
485577
486586
  if (!paragraphType)
485578
486587
  return null;
485579
486588
  const separatorAttrs = {
485580
- sdBlockId: v42(),
486589
+ sdBlockId: v4_default2(),
485581
486590
  paraId: generateDocxHexId2()
485582
486591
  };
485583
486592
  return paragraphType.createAndFill(separatorAttrs) ?? paragraphType.createAndFill();
@@ -486866,15 +487875,15 @@ function tablesConvertFromTextAdapter2(editor, input2, options) {
486866
487875
  const content5 = text9 ? schema.text(text9) : undefined;
486867
487876
  const para = schema.nodes.paragraph.createAndFill(null, content5);
486868
487877
  tableCells.push(schema.nodes.tableCell.createAndFill({
486869
- sdBlockId: v42()
487878
+ sdBlockId: v4_default2()
486870
487879
  }, para));
486871
487880
  }
486872
487881
  tableRows.push(schema.nodes.tableRow.createAndFill({
486873
- sdBlockId: v42(),
487882
+ sdBlockId: v4_default2(),
486874
487883
  paraId: generateDocxHexId2()
486875
487884
  }, tableCells));
486876
487885
  }
486877
- const tableId = v42();
487886
+ const tableId = v4_default2();
486878
487887
  const tableNode = schema.nodes.table.create({ sdBlockId: tableId }, tableRows);
486879
487888
  const startPos = paragraphs[0].pos;
486880
487889
  const lastP = paragraphs[paragraphs.length - 1];
@@ -487013,7 +488022,7 @@ function tablesInsertCellAdapter2(editor, input2, options) {
487013
488022
  const makeEmptyCell = (preferHeader = false) => {
487014
488023
  const candidateType = preferHeader ? schema.nodes.tableHeader ?? schema.nodes.tableCell : schema.nodes.tableCell;
487015
488024
  return candidateType.createAndFill({
487016
- sdBlockId: v42()
488025
+ sdBlockId: v4_default2()
487017
488026
  }) ?? candidateType.createAndFill();
487018
488027
  };
487019
488028
  const overflowRowCells = [];
@@ -487025,7 +488034,7 @@ function tablesInsertCellAdapter2(editor, input2, options) {
487025
488034
  const templateRowAttrs = tableNode.child(Math.max(0, map10.height - 1)).attrs ?? {};
487026
488035
  const overflowRowAttrs = {
487027
488036
  ...templateRowAttrs,
487028
- sdBlockId: v42(),
488037
+ sdBlockId: v4_default2(),
487029
488038
  paraId: generateDocxHexId2()
487030
488039
  };
487031
488040
  const overflowRow = schema.nodes.tableRow.createAndFill(overflowRowAttrs, overflowRowCells) ?? schema.nodes.tableRow.create(overflowRowAttrs, overflowRowCells);
@@ -488434,7 +489443,7 @@ function createTableAdapter2(editor, input2, options) {
488434
489443
  }
488435
489444
  };
488436
489445
  }
488437
- const tableId = v42();
489446
+ const tableId = v4_default2();
488438
489447
  const didApply = insertTableAt2({
488439
489448
  pos: insertAt,
488440
489449
  rows: input2.rows,
@@ -488741,7 +489750,7 @@ function tablesClearDefaultStyleAdapter2(editor, _input, options) {
488741
489750
  }
488742
489751
  var POINTS_TO_PIXELS2, POINTS_TO_TWIPS2 = 20, PIXELS_TO_TWIPS2, DEFAULT_TABLE_GRID_WIDTH_TWIPS2 = 1500, SETTINGS_PART2 = "word/settings.xml", PRESET_GREY2 = "999999", PRESET_BLACK2 = "000000", STATIC_PRESETS2, IDENTITY_BLOCK_ATTRS2, WORD_DEFAULT_TBL_LOOK2, FLAG_TO_OOXML_KEY2, INVERTED_FLAGS2, XML_KEY_TO_STYLE_OPTION2, CLEARED_BORDER_OOXML2, TABLE_MARGIN_KEY_GROUPS2;
488743
489752
  var init_tables_adapter = __esm(() => {
488744
- init_wrapper();
489753
+ init_esm2();
488745
489754
  init_identity_attrs();
488746
489755
  init_dist10();
488747
489756
  init_index_cache();
@@ -489377,7 +490386,7 @@ function createTableWrapper2(editor, input2, options) {
489377
490386
  }
489378
490387
  let adapterResult;
489379
490388
  const step3 = {
489380
- id: v42(),
490389
+ id: v4_default2(),
489381
490390
  op: "create.table",
489382
490391
  where: STUB_WHERE2,
489383
490392
  args: {},
@@ -489401,7 +490410,7 @@ function createTableWrapper2(editor, input2, options) {
489401
490410
  return adapterResult;
489402
490411
  }
489403
490412
  var init_create_table_wrapper = __esm(() => {
489404
- init_wrapper();
490413
+ init_esm2();
489405
490414
  init_executor();
489406
490415
  init_revision_tracker();
489407
490416
  init_plan_wrappers();
@@ -489781,7 +490790,7 @@ function executeTableCommand2(editor, op, adapterFn, input2, options) {
489781
490790
  }
489782
490791
  let adapterResult;
489783
490792
  const step3 = {
489784
- id: v42(),
490793
+ id: v4_default2(),
489785
490794
  op,
489786
490795
  where: STUB_WHERE2,
489787
490796
  args: {},
@@ -489925,7 +490934,7 @@ function tablesApplyPresetWrapper2(editor, input2, options) {
489925
490934
  return executeTableCommand2(editor, "tables.applyPreset", tablesApplyPresetAdapter2, input2, options);
489926
490935
  }
489927
490936
  var init_tables_wrappers = __esm(() => {
489928
- init_wrapper();
490937
+ init_esm2();
489929
490938
  init_executor();
489930
490939
  init_revision_tracker();
489931
490940
  init_plan_wrappers();
@@ -495426,14 +496435,14 @@ function validateEngine2(engine) {
495426
496435
  throw new DiffServiceError2("INVALID_INPUT", `Unsupported engine "${engine}". This adapter only supports "${ENGINE_ID2}".`);
495427
496436
  }
495428
496437
  }
495429
- function validateSnapshotVersion2(version4) {
495430
- if (version4 !== "sd-diff-snapshot/v1" && version4 !== SNAPSHOT_VERSION_V22) {
495431
- throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported snapshot version "${version4}". Expected "sd-diff-snapshot/v1" or "${SNAPSHOT_VERSION_V22}".`);
496438
+ function validateSnapshotVersion2(version3) {
496439
+ if (version3 !== "sd-diff-snapshot/v1" && version3 !== SNAPSHOT_VERSION_V22) {
496440
+ throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported snapshot version "${version3}". Expected "sd-diff-snapshot/v1" or "${SNAPSHOT_VERSION_V22}".`);
495432
496441
  }
495433
496442
  }
495434
- function validatePayloadVersion2(version4) {
495435
- if (version4 !== PAYLOAD_VERSION_V12 && version4 !== PAYLOAD_VERSION_V22) {
495436
- throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported diff version "${version4}". Expected "${PAYLOAD_VERSION_V12}" or "${PAYLOAD_VERSION_V22}".`);
496443
+ function validatePayloadVersion2(version3) {
496444
+ if (version3 !== PAYLOAD_VERSION_V12 && version3 !== PAYLOAD_VERSION_V22) {
496445
+ throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported diff version "${version3}". Expected "${PAYLOAD_VERSION_V12}" or "${PAYLOAD_VERSION_V22}".`);
495437
496446
  }
495438
496447
  }
495439
496448
  function validateSnapshotFingerprints2(snapshot2) {
@@ -495482,8 +496491,8 @@ function validateCoverageForPayloadVersion2(diffPayload) {
495482
496491
  throw new DiffServiceError2("INVALID_INPUT", `Coverage mismatch for payload version "${diffPayload.version}". ` + `Expected ${JSON.stringify(expectedCoverage)}, got ${JSON.stringify(diffPayload.coverage)}.`);
495483
496492
  }
495484
496493
  }
495485
- function getCoverageForSnapshotVersion2(version4) {
495486
- return version4 === "sd-diff-snapshot/v1" ? V1_COVERAGE2 : V2_COVERAGE2;
496494
+ function getCoverageForSnapshotVersion2(version3) {
496495
+ return version3 === "sd-diff-snapshot/v1" ? V1_COVERAGE2 : V2_COVERAGE2;
495487
496496
  }
495488
496497
  function getPayloadVersionForCoverage2(coverage) {
495489
496498
  return coverage.headerFooters ? PAYLOAD_VERSION_V22 : PAYLOAD_VERSION_V12;
@@ -496476,7 +497485,7 @@ function prepareTableOfContentsInsertion2(editor, input2, options) {
496476
497485
  const { content: content5, sources } = materializeTocContent2(editor.state.doc, withRightAlign2(config46, input2.config?.rightAlignPageNumbers), editor, {
496477
497486
  pageMap: getPageMap2(editor) ?? undefined
496478
497487
  });
496479
- const sdBlockId = v42();
497488
+ const sdBlockId = v4_default2();
496480
497489
  return {
496481
497490
  pos,
496482
497491
  instruction,
@@ -496538,7 +497547,7 @@ function createTableOfContentsWrapper2(editor, input2, options) {
496538
497547
  }
496539
497548
  var NO_ENTRIES_PLACEHOLDER2, TOC_ENTRY_STYLE_RE2;
496540
497549
  var init_toc_wrappers = __esm(() => {
496541
- init_wrapper();
497550
+ init_esm2();
496542
497551
  init_src();
496543
497552
  init_toc_switches();
496544
497553
  init_toc_resolver();
@@ -497078,7 +498087,7 @@ function createImageWrapper2(editor, input2, options) {
497078
498087
  };
497079
498088
  }
497080
498089
  const drawingId = generateUniqueDocPrId2(storyEditor);
497081
- const sdImageId = v42();
498090
+ const sdImageId = v4_default2();
497082
498091
  const insertPos = input2.at ? resolveImageInsertPosition2(storyEditor, input2.at) : null;
497083
498092
  if (options?.dryRun) {
497084
498093
  return {
@@ -497861,7 +498870,7 @@ function imagesRemoveCaptionWrapper2(editor, input2, options) {
497861
498870
  }
497862
498871
  var ALLOWED_WRAP_ATTRS2, WRAP_TYPES_SUPPORTING_SIDE2, WRAP_TYPES_SUPPORTING_DISTANCES2, RELATIVE_HEIGHT_MIN3 = 0, RELATIVE_HEIGHT_MAX3 = 4294967295;
497863
498872
  var init_images_wrappers = __esm(() => {
497864
- init_wrapper();
498873
+ init_esm2();
497865
498874
  init_image_resolver();
497866
498875
  init_errors4();
497867
498876
  init_mutation_helpers();
@@ -499002,7 +500011,9 @@ function insertTextAroundSdt2(editor, target, content5, resolvePos) {
499002
500011
  const { tr } = editor.state;
499003
500012
  const tabType = editor.schema.nodes?.tab;
499004
500013
  const parentAllowsTab = tabType && content5.includes("\t") ? parentAllowsNodeAt2(tr, pos, tabType) : false;
499005
- tr.insert(pos, buildTextWithTabs2(editor.schema, content5, undefined, { parentAllowsTab }));
500014
+ const lineBreakType = editor.schema.nodes?.lineBreak;
500015
+ const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content5) ? parentAllowsNodeAt2(tr, pos, lineBreakType) : false;
500016
+ tr.insert(pos, buildTextWithTabs2(editor.schema, content5, undefined, { parentAllowsTab, parentAllowsLineBreak }));
499006
500017
  dispatchTransaction5(editor, tr);
499007
500018
  return true;
499008
500019
  }
@@ -500990,7 +502001,7 @@ function createCustomXmlPart2(convertedXml, { content: content5, schemaRefs }, c
500990
502001
  const partName = partNameFromIndex2(index3);
500991
502002
  const propsPartName = propsPartNameFromIndex2(index3);
500992
502003
  const itemRelsPath = `customXml/_rels/item${index3}.xml.rels`;
500993
- const itemId = `{${v42().toUpperCase()}}`;
502004
+ const itemId = `{${v4_default2().toUpperCase()}}`;
500994
502005
  convertedXml[partName] = createXmlDocument4(root4, declaration);
500995
502006
  convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(itemId, schemaRefs));
500996
502007
  convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${index3}.xml`));
@@ -501032,11 +502043,11 @@ function patchCustomXmlPart2(convertedXml, target, { content: content5, schemaRe
501032
502043
  return null;
501033
502044
  propsPartName = propsPartNameFromIndex2(idx);
501034
502045
  const itemRelsPath = `customXml/_rels/item${idx}.xml.rels`;
501035
- resolvedId = `{${v42().toUpperCase()}}`;
502046
+ resolvedId = `{${v4_default2().toUpperCase()}}`;
501036
502047
  convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${idx}.xml`));
501037
502048
  }
501038
502049
  if (!resolvedId)
501039
- resolvedId = `{${v42().toUpperCase()}}`;
502050
+ resolvedId = `{${v4_default2().toUpperCase()}}`;
501040
502051
  const existingDecl = convertedXml[propsPartName]?.declaration;
501041
502052
  convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(resolvedId, schemaRefs), existingDecl);
501042
502053
  } else {
@@ -501097,7 +502108,7 @@ function invalidateConverterCachesForPath2(converter, partName) {
501097
502108
  }
501098
502109
  var xmljs3, CUSTOM_XML_DATA_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE4 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE2 = "http://schemas.openxmlformats.org/officeDocument/2006/customXml";
501099
502110
  var init_custom_xml_parts = __esm(() => {
501100
- init_wrapper();
502111
+ init_esm2();
501101
502112
  init_helpers();
501102
502113
  init_constants4();
501103
502114
  xmljs3 = __toESM(require_lib3(), 1);
@@ -501594,7 +502605,7 @@ function metadataResolveWrapper2(editor, input2) {
501594
502605
  }
501595
502606
  function metadataAttachWrapper2(editor, input2, options) {
501596
502607
  rejectTrackedMode2("metadata.attach", options);
501597
- const id2 = input2.id ?? v42();
502608
+ const id2 = input2.id ?? v4_default2();
501598
502609
  const convertedXml = getConvertedXml5(editor);
501599
502610
  try {
501600
502611
  resolveSelectionTarget2(editor, input2.target);
@@ -501678,7 +502689,7 @@ function createAnchoredMetadataAdapter2(editor) {
501678
502689
  };
501679
502690
  }
501680
502691
  var init_anchored_metadata_wrappers = __esm(() => {
501681
- init_wrapper();
502692
+ init_esm2();
501682
502693
  init_src();
501683
502694
  init_custom_xml_parts();
501684
502695
  init_errors4();
@@ -504985,7 +505996,7 @@ function bibliographyGetWrapper2(editor, input2) {
504985
505996
  }
504986
505997
  function bibliographyInsertWrapper2(editor, input2, options) {
504987
505998
  rejectTrackedMode2("citations.bibliography.insert", options);
504988
- const nodeId = v42();
505999
+ const nodeId = v4_default2();
504989
506000
  const address2 = { kind: "block", nodeType: "bibliography", nodeId };
504990
506001
  if (options?.dryRun)
504991
506002
  return bibSuccess2(address2);
@@ -505142,7 +506153,7 @@ function buildCitationInstruction2(sourceIds) {
505142
506153
  return parts.join(" ");
505143
506154
  }
505144
506155
  var init_citation_wrappers = __esm(() => {
505145
- init_wrapper();
506156
+ init_esm2();
505146
506157
  init_src();
505147
506158
  init_citation_resolver();
505148
506159
  init_adapter_utils();
@@ -512723,14 +513734,14 @@ import { createRequire as createRequire2 } from "node:module";
512723
513734
  async function main() {
512724
513735
  await server.connect(transport);
512725
513736
  }
512726
- var require2, version4, PRESETS_SUPPORTED, requestedPreset, server, sessions, transport;
513737
+ var require2, version3, PRESETS_SUPPORTED, requestedPreset, server, sessions, transport;
512727
513738
  var init_server3 = __esm(() => {
512728
513739
  init_mcp();
512729
513740
  init_stdio2();
512730
513741
  init_session_manager();
512731
513742
  init_tools();
512732
513743
  require2 = createRequire2(import.meta.url);
512733
- ({ version: version4 } = require2("../package.json"));
513744
+ ({ version: version3 } = require2("../package.json"));
512734
513745
  PRESETS_SUPPORTED = new Set(["legacy"]);
512735
513746
  requestedPreset = process.env.MCP_PRESET ?? "legacy";
512736
513747
  if (!PRESETS_SUPPORTED.has(requestedPreset)) {
@@ -512739,7 +513750,7 @@ var init_server3 = __esm(() => {
512739
513750
  }
512740
513751
  server = new McpServer({
512741
513752
  name: "superdoc",
512742
- version: version4
513753
+ version: version3
512743
513754
  }, {
512744
513755
  instructions: MCP_SYSTEM_PROMPT
512745
513756
  });