ooxml-core 1.37.1 → 1.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/{PptxHandler-3T5DTNKA.mjs → PptxHandler-EB2WFF7F.mjs} +2 -2
- package/dist/PptxHandler-GOCSIX7N.cjs +14 -0
- package/dist/PptxHandler-IAKU53YW.mjs +5 -0
- package/dist/{PresentationBuilder-XHKNDJMD.mjs → PresentationBuilder-T2B5PPZA.mjs} +2 -2
- package/dist/{PresentationBuilder-HCMXZQDK.cjs → PresentationBuilder-TS4MR6KG.cjs} +6 -6
- package/dist/{PresentationBuilder-D6ZICJWN.mjs → PresentationBuilder-VMUWJF2X.mjs} +3 -3
- package/dist/automation/index.cjs +213 -208
- package/dist/automation/index.mjs +213 -208
- package/dist/{chunk-J43V3QOA.mjs → chunk-6XLWR7R6.mjs} +126 -42
- package/dist/{chunk-4YBSHQ76.mjs → chunk-7YOCVZRH.mjs} +2 -2
- package/dist/{chunk-GZOYXHDF.cjs → chunk-JXNUXGX3.cjs} +1266 -1266
- package/dist/{chunk-2TQJHNVU.mjs → chunk-LWNNHK2S.mjs} +259 -175
- package/dist/{chunk-OEM2ECAJ.mjs → chunk-RDMUNMGT.mjs} +1 -1
- package/dist/{chunk-RHQQS6LJ.mjs → chunk-SN5R5YNF.mjs} +2 -2
- package/dist/{chunk-CNIKTXAV.mjs → chunk-U54ZCZKG.mjs} +1 -1
- package/dist/{chunk-H2Q42P6P.mjs → chunk-UOEYAYAH.mjs} +1 -1
- package/dist/{chunk-SNID2FDY.cjs → chunk-WF4USSCT.cjs} +259 -175
- package/dist/{chunk-M2DFN3SP.mjs → chunk-XFLXQUTC.mjs} +645 -58
- package/dist/{chunk-AFALJ5TA.cjs → chunk-ZTX5YCSW.cjs} +3 -3
- package/dist/collab/merge-values.d.ts +14 -0
- package/dist/collab/merge-values.d.ts.map +1 -0
- package/dist/docx/embedded.cjs +476 -474
- package/dist/docx/embedded.mjs +476 -474
- package/dist/docx/index.cjs +1094 -719
- package/dist/docx/index.d.ts +1 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +1094 -720
- package/dist/docx/layout/index.cjs +4 -0
- package/dist/docx/layout/index.mjs +4 -0
- package/dist/docx/load/index.cjs +164 -164
- package/dist/docx/load/index.mjs +164 -164
- package/dist/docx/merge-snapshots.d.ts +9 -0
- package/dist/docx/merge-snapshots.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +155 -155
- package/dist/docx/ui/index.mjs +155 -155
- package/dist/embedding/index.cjs +207 -0
- package/dist/embedding/index.d.ts +3 -0
- package/dist/embedding/index.d.ts.map +1 -1
- package/dist/embedding/index.mjs +205 -1
- package/dist/embedding/onedrive/client.d.ts +4 -0
- package/dist/embedding/onedrive/client.d.ts.map +1 -0
- package/dist/embedding/onedrive/index.cjs +617 -0
- package/dist/embedding/onedrive/index.d.ts +6 -0
- package/dist/embedding/onedrive/index.d.ts.map +1 -0
- package/dist/embedding/onedrive/index.mjs +611 -0
- package/dist/embedding/onedrive/metadata.d.ts +6 -0
- package/dist/embedding/onedrive/metadata.d.ts.map +1 -0
- package/dist/embedding/onedrive/requests.d.ts +8 -0
- package/dist/embedding/onedrive/requests.d.ts.map +1 -0
- package/dist/embedding/onedrive/session.d.ts +4 -0
- package/dist/embedding/onedrive/session.d.ts.map +1 -0
- package/dist/embedding/onedrive/transport.d.ts +9 -0
- package/dist/embedding/onedrive/transport.d.ts.map +1 -0
- package/dist/embedding/onedrive/types.d.ts +86 -0
- package/dist/embedding/onedrive/types.d.ts.map +1 -0
- package/dist/embedding/onedrive/upload.d.ts +3 -0
- package/dist/embedding/onedrive/upload.d.ts.map +1 -0
- package/dist/embedding/storage-merge.d.ts +8 -0
- package/dist/embedding/storage-merge.d.ts.map +1 -0
- package/dist/embedding/storage-session.d.ts +7 -0
- package/dist/embedding/storage-session.d.ts.map +1 -0
- package/dist/embedding/versioned-storage.d.ts +67 -0
- package/dist/embedding/versioned-storage.d.ts.map +1 -0
- package/dist/index.cjs +1032 -340
- package/dist/index.mjs +1032 -340
- package/dist/opc/index.cjs +699 -216
- package/dist/opc/index.d.ts +1 -0
- package/dist/opc/index.d.ts.map +1 -1
- package/dist/opc/index.mjs +699 -217
- package/dist/opc/merge-snapshots.d.ts +26 -0
- package/dist/opc/merge-snapshots.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +165 -47
- package/dist/pptx/automation/index.d.ts +1 -1
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-DC5m1m_8.d.ts → index-uDL5LUSK.d.ts} +20 -6
- package/dist/pptx/chunks/index-uDL5LUSK.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +165 -47
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +7 -0
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/index.cjs +6156 -5428
- package/dist/pptx/index.d.ts +2 -2
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +215 -201
- package/dist/teams/index.mjs +215 -201
- package/dist/text/index.cjs +193 -0
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +193 -1
- package/dist/text/merge-three-way.d.ts +9 -0
- package/dist/text/merge-three-way.d.ts.map +1 -0
- package/dist/visio/collab/index.cjs +226 -7
- package/dist/visio/collab/index.d.ts +1 -0
- package/dist/visio/collab/index.d.ts.map +1 -1
- package/dist/visio/collab/index.mjs +225 -7
- package/dist/visio/collab/merge-snapshots.d.ts +14 -0
- package/dist/visio/collab/merge-snapshots.d.ts.map +1 -0
- package/dist/visio/edit-shape-data-commands.d.ts.map +1 -1
- package/dist/visio/index.cjs +15 -10
- package/dist/visio/index.mjs +15 -10
- package/dist/visio/ui/index.cjs +19 -12
- package/dist/visio/ui/index.mjs +19 -12
- package/dist/visio/ui/text-dialog.d.ts.map +1 -1
- package/dist/xlsx/collab/index.cjs +49985 -507
- package/dist/xlsx/collab/index.d.ts +1 -0
- package/dist/xlsx/collab/index.d.ts.map +1 -1
- package/dist/xlsx/collab/index.mjs +49980 -507
- package/dist/xlsx/collab/merge-residual.d.ts +16 -0
- package/dist/xlsx/collab/merge-residual.d.ts.map +1 -0
- package/dist/xlsx/collab/merge-snapshots.d.ts +8 -0
- package/dist/xlsx/collab/merge-snapshots.d.ts.map +1 -0
- package/dist/xlsx/index.cjs +202 -202
- package/dist/xlsx/index.mjs +202 -202
- package/dist/xlsx/load/index.cjs +155 -155
- package/dist/xlsx/load/index.mjs +155 -155
- package/dist/xlsx/ui/index.cjs +202 -202
- package/dist/xlsx/ui/index.mjs +202 -202
- package/dist/xml/index.cjs +406 -22
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/index.mjs +406 -23
- package/dist/xml/merge-three-way.d.ts +18 -0
- package/dist/xml/merge-three-way.d.ts.map +1 -0
- package/package.json +6 -1
- package/dist/PptxHandler-2JSQ22VD.cjs +0 -14
- package/dist/PptxHandler-7T7ZS7IK.mjs +0 -5
- package/dist/pptx/chunks/index-DC5m1m_8.d.ts.map +0 -1
|
@@ -186,6 +186,161 @@ function attr(element5, local, ns, prefix3) {
|
|
|
186
186
|
}
|
|
187
187
|
var relAttr = (element5, local) => attr(element5, local, NS.r, "r");
|
|
188
188
|
|
|
189
|
+
// text/text-diff.ts
|
|
190
|
+
var isLowSurrogate = (text9, at3) => {
|
|
191
|
+
const code = text9.charCodeAt(at3);
|
|
192
|
+
return code >= 56320 && code <= 57343;
|
|
193
|
+
};
|
|
194
|
+
function shortestEdit(n, m, same17, maxEdits) {
|
|
195
|
+
const max = Math.min(n + m, maxEdits);
|
|
196
|
+
const offset2 = max + 1;
|
|
197
|
+
const v = new Int32Array(2 * max + 3);
|
|
198
|
+
const trace = [];
|
|
199
|
+
for (let d = 0; d <= max; d++) {
|
|
200
|
+
for (let k = -d; k <= d; k += 2) {
|
|
201
|
+
const down = k === -d || k !== d && v[offset2 + k - 1] < v[offset2 + k + 1];
|
|
202
|
+
let x = down ? v[offset2 + k + 1] : v[offset2 + k - 1] + 1;
|
|
203
|
+
let y = x - k;
|
|
204
|
+
while (x < n && y < m && same17(x, y)) {
|
|
205
|
+
x++;
|
|
206
|
+
y++;
|
|
207
|
+
}
|
|
208
|
+
v[offset2 + k] = x;
|
|
209
|
+
if (x >= n && y >= m) return backtrack(trace, n, m, d);
|
|
210
|
+
}
|
|
211
|
+
trace.push(v.slice(offset2 - d, offset2 + d + 1));
|
|
212
|
+
}
|
|
213
|
+
return void 0;
|
|
214
|
+
}
|
|
215
|
+
function backtrack(trace, n, m, d) {
|
|
216
|
+
const edits2 = [];
|
|
217
|
+
let x = n;
|
|
218
|
+
let y = m;
|
|
219
|
+
for (let step2 = d; step2 > 0; step2--) {
|
|
220
|
+
const previous = trace[step2 - 1];
|
|
221
|
+
const at3 = (k2) => previous[k2 + step2 - 1];
|
|
222
|
+
const k = x - y;
|
|
223
|
+
const down = k === -step2 || k !== step2 && at3(k - 1) < at3(k + 1);
|
|
224
|
+
const before = down ? k + 1 : k - 1;
|
|
225
|
+
const startX = at3(before);
|
|
226
|
+
const startY = startX - before;
|
|
227
|
+
edits2.push(down ? [startX, startY, true] : [startX, startY, false]);
|
|
228
|
+
x = startX;
|
|
229
|
+
y = startY;
|
|
230
|
+
}
|
|
231
|
+
return edits2.reverse();
|
|
232
|
+
}
|
|
233
|
+
function changesOf(edits2) {
|
|
234
|
+
const changes = [];
|
|
235
|
+
for (const [x, y, inserts] of edits2) {
|
|
236
|
+
const last = changes.at(-1);
|
|
237
|
+
if (last && last.fromEnd === x && last.toEnd === y) {
|
|
238
|
+
if (inserts) last.toEnd++;
|
|
239
|
+
else last.fromEnd++;
|
|
240
|
+
} else
|
|
241
|
+
changes.push({
|
|
242
|
+
fromStart: x,
|
|
243
|
+
fromEnd: inserts ? x : x + 1,
|
|
244
|
+
toStart: y,
|
|
245
|
+
toEnd: inserts ? y + 1 : y
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return changes;
|
|
249
|
+
}
|
|
250
|
+
function characterChanges(a2, b, maxEdits) {
|
|
251
|
+
const edits2 = shortestEdit(
|
|
252
|
+
a2.length,
|
|
253
|
+
b.length,
|
|
254
|
+
(x, y) => a2.charCodeAt(x) === b.charCodeAt(y),
|
|
255
|
+
maxEdits
|
|
256
|
+
);
|
|
257
|
+
return edits2 && changesOf(edits2);
|
|
258
|
+
}
|
|
259
|
+
var TOKEN = /[\p{L}\p{N}\p{M}]+|\s+|[\s\S]/gu;
|
|
260
|
+
function tokensOf(text9, ids) {
|
|
261
|
+
const tokens3 = [];
|
|
262
|
+
const starts = [];
|
|
263
|
+
for (const match2 of text9.matchAll(TOKEN)) {
|
|
264
|
+
let id5 = ids.get(match2[0]);
|
|
265
|
+
if (id5 === void 0) ids.set(match2[0], id5 = ids.size);
|
|
266
|
+
tokens3.push(id5);
|
|
267
|
+
starts.push(match2.index);
|
|
268
|
+
}
|
|
269
|
+
starts.push(text9.length);
|
|
270
|
+
return { tokens: tokens3, starts };
|
|
271
|
+
}
|
|
272
|
+
function tokenChanges(a2, b, maxEdits) {
|
|
273
|
+
const ids = /* @__PURE__ */ new Map();
|
|
274
|
+
const from = tokensOf(a2, ids);
|
|
275
|
+
const to = tokensOf(b, ids);
|
|
276
|
+
const edits2 = shortestEdit(
|
|
277
|
+
from.tokens.length,
|
|
278
|
+
to.tokens.length,
|
|
279
|
+
(x, y) => from.tokens[x] === to.tokens[y],
|
|
280
|
+
maxEdits
|
|
281
|
+
);
|
|
282
|
+
if (!edits2) return void 0;
|
|
283
|
+
let budget = maxEdits;
|
|
284
|
+
return changesOf(edits2).flatMap((stretch) => {
|
|
285
|
+
const change = {
|
|
286
|
+
fromStart: from.starts[stretch.fromStart],
|
|
287
|
+
fromEnd: from.starts[stretch.fromEnd],
|
|
288
|
+
toStart: to.starts[stretch.toStart],
|
|
289
|
+
toEnd: to.starts[stretch.toEnd]
|
|
290
|
+
};
|
|
291
|
+
const inner2 = change.fromEnd > change.fromStart && change.toEnd > change.toStart ? characterChanges(
|
|
292
|
+
a2.slice(change.fromStart, change.fromEnd),
|
|
293
|
+
b.slice(change.toStart, change.toEnd),
|
|
294
|
+
budget
|
|
295
|
+
) : void 0;
|
|
296
|
+
if (!inner2) return [change];
|
|
297
|
+
for (const found of inner2)
|
|
298
|
+
budget -= found.fromEnd - found.fromStart + found.toEnd - found.toStart;
|
|
299
|
+
return inner2.map((found) => ({
|
|
300
|
+
fromStart: found.fromStart + change.fromStart,
|
|
301
|
+
fromEnd: found.fromEnd + change.fromStart,
|
|
302
|
+
toStart: found.toStart + change.toStart,
|
|
303
|
+
toEnd: found.toEnd + change.toStart
|
|
304
|
+
}));
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
function diffText(from, to, maxEdits = 500) {
|
|
308
|
+
let start = 0;
|
|
309
|
+
while (start < from.length && start < to.length && from.charCodeAt(start) === to.charCodeAt(start))
|
|
310
|
+
start++;
|
|
311
|
+
let end = 0;
|
|
312
|
+
while (end < from.length - start && end < to.length - start && from.charCodeAt(from.length - 1 - end) === to.charCodeAt(to.length - 1 - end))
|
|
313
|
+
end++;
|
|
314
|
+
const a2 = from.slice(start, from.length - end);
|
|
315
|
+
const b = to.slice(start, to.length - end);
|
|
316
|
+
if (!a2.length && !b.length) return [];
|
|
317
|
+
const found = a2.length && b.length ? characterChanges(a2, b, maxEdits) ?? tokenChanges(a2, b, maxEdits) : void 0;
|
|
318
|
+
const changes = found ?? [{ fromStart: 0, fromEnd: a2.length, toStart: 0, toEnd: b.length }];
|
|
319
|
+
const result2 = [];
|
|
320
|
+
for (const change of changes) {
|
|
321
|
+
const placed = {
|
|
322
|
+
fromStart: change.fromStart + start,
|
|
323
|
+
fromEnd: change.fromEnd + start,
|
|
324
|
+
toStart: change.toStart + start,
|
|
325
|
+
toEnd: change.toEnd + start
|
|
326
|
+
};
|
|
327
|
+
if (placed.fromStart > 0 && placed.toStart > 0 && (isLowSurrogate(from, placed.fromStart) || isLowSurrogate(to, placed.toStart))) {
|
|
328
|
+
placed.fromStart--;
|
|
329
|
+
placed.toStart--;
|
|
330
|
+
}
|
|
331
|
+
if (isLowSurrogate(from, placed.fromEnd) || isLowSurrogate(to, placed.toEnd)) {
|
|
332
|
+
placed.fromEnd++;
|
|
333
|
+
placed.toEnd++;
|
|
334
|
+
}
|
|
335
|
+
const last = result2.at(-1);
|
|
336
|
+
if (last && placed.fromStart <= last.fromEnd) {
|
|
337
|
+
last.fromEnd = Math.max(last.fromEnd, placed.fromEnd);
|
|
338
|
+
last.toEnd = Math.max(last.toEnd, placed.toEnd);
|
|
339
|
+
} else result2.push(placed);
|
|
340
|
+
}
|
|
341
|
+
return result2;
|
|
342
|
+
}
|
|
343
|
+
|
|
189
344
|
// xml/lite.ts
|
|
190
345
|
var LiteElement = class {
|
|
191
346
|
constructor(tagName2, localName3, namespaceURI) {
|
|
@@ -1447,58 +1602,6 @@ async function ensureRelationship(zip, relsPath, type, target3) {
|
|
|
1447
1602
|
zip.file(relsPath, xml.replace("</Relationships>", `${insertion}</Relationships>`));
|
|
1448
1603
|
return id5;
|
|
1449
1604
|
}
|
|
1450
|
-
|
|
1451
|
-
// opc/safe-href.ts
|
|
1452
|
-
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
1453
|
-
function isSafeHyperlinkHref(href) {
|
|
1454
|
-
const scheme2 = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
1455
|
-
return scheme2 !== void 0 && SAFE_SCHEMES.has(scheme2.toLowerCase());
|
|
1456
|
-
}
|
|
1457
|
-
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
1458
|
-
var STORE_SCHEMES = /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
1459
|
-
var SCRIPT_SCHEMES = /* @__PURE__ */ new Set([
|
|
1460
|
-
"javascript",
|
|
1461
|
-
"vbscript",
|
|
1462
|
-
"livescript",
|
|
1463
|
-
"jscript",
|
|
1464
|
-
"mocha",
|
|
1465
|
-
"data",
|
|
1466
|
-
"mhtml",
|
|
1467
|
-
"ms-its",
|
|
1468
|
-
"mk",
|
|
1469
|
-
"x-javascript",
|
|
1470
|
-
"blob"
|
|
1471
|
-
]);
|
|
1472
|
-
var IGNORABLE = new RegExp(
|
|
1473
|
-
"[\\u0000-\\u0020\\u007f\\u00ad\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u2064\\ufeff]",
|
|
1474
|
-
"gu"
|
|
1475
|
-
);
|
|
1476
|
-
var CONTROL = new RegExp("[\\u0000-\\u001f\\u007f]", "u");
|
|
1477
|
-
var SCHEME = /^([a-z][a-z0-9+.-]*):/;
|
|
1478
|
-
var STORE_ONLY = { store: true, open: false, reason: "not-openable" };
|
|
1479
|
-
var reject = (reason) => ({
|
|
1480
|
-
store: false,
|
|
1481
|
-
open: false,
|
|
1482
|
-
reason
|
|
1483
|
-
});
|
|
1484
|
-
function hyperlinkPolicy(href, options2 = {}) {
|
|
1485
|
-
if (typeof href !== "string") return reject("empty");
|
|
1486
|
-
const trimmed2 = href.trim();
|
|
1487
|
-
const normalized = trimmed2.replace(IGNORABLE, "").toLowerCase();
|
|
1488
|
-
if (normalized.length === 0) return reject("empty");
|
|
1489
|
-
const scheme2 = SCHEME.exec(normalized)?.[1];
|
|
1490
|
-
if (scheme2 !== void 0 && SCRIPT_SCHEMES.has(scheme2)) return reject("script-scheme");
|
|
1491
|
-
if (scheme2 !== void 0 && !trimmed2.toLowerCase().startsWith(`${scheme2}:`))
|
|
1492
|
-
return reject("obfuscated-scheme");
|
|
1493
|
-
if (CONTROL.test(trimmed2)) return reject("control-characters");
|
|
1494
|
-
if (scheme2 === void 0) return options2.openRelative ? { store: true, open: true } : STORE_ONLY;
|
|
1495
|
-
if (scheme2.length === 1) return STORE_ONLY;
|
|
1496
|
-
if (OPEN_SCHEMES.has(scheme2)) return { store: true, open: true };
|
|
1497
|
-
if (options2.additionalOpenSchemes?.some((allowed) => allowed.toLowerCase() === scheme2))
|
|
1498
|
-
return { store: true, open: true };
|
|
1499
|
-
if (STORE_SCHEMES.has(scheme2)) return STORE_ONLY;
|
|
1500
|
-
return reject("unsupported-scheme");
|
|
1501
|
-
}
|
|
1502
1605
|
var DEFAULT_ZIP_LIMITS = {
|
|
1503
1606
|
maxInputBytes: 100 * 1024 * 1024,
|
|
1504
1607
|
maxEntries: 1e4,
|
|
@@ -1721,6 +1824,58 @@ async function openZip(input2, limits = {}) {
|
|
|
1721
1824
|
return guardZip(await JSZip.loadAsync(bytes), limits);
|
|
1722
1825
|
}
|
|
1723
1826
|
|
|
1827
|
+
// opc/safe-href.ts
|
|
1828
|
+
var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
|
|
1829
|
+
function isSafeHyperlinkHref(href) {
|
|
1830
|
+
const scheme2 = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
|
|
1831
|
+
return scheme2 !== void 0 && SAFE_SCHEMES.has(scheme2.toLowerCase());
|
|
1832
|
+
}
|
|
1833
|
+
var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
|
|
1834
|
+
var STORE_SCHEMES = /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
|
|
1835
|
+
var SCRIPT_SCHEMES = /* @__PURE__ */ new Set([
|
|
1836
|
+
"javascript",
|
|
1837
|
+
"vbscript",
|
|
1838
|
+
"livescript",
|
|
1839
|
+
"jscript",
|
|
1840
|
+
"mocha",
|
|
1841
|
+
"data",
|
|
1842
|
+
"mhtml",
|
|
1843
|
+
"ms-its",
|
|
1844
|
+
"mk",
|
|
1845
|
+
"x-javascript",
|
|
1846
|
+
"blob"
|
|
1847
|
+
]);
|
|
1848
|
+
var IGNORABLE = new RegExp(
|
|
1849
|
+
"[\\u0000-\\u0020\\u007f\\u00ad\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u2064\\ufeff]",
|
|
1850
|
+
"gu"
|
|
1851
|
+
);
|
|
1852
|
+
var CONTROL = new RegExp("[\\u0000-\\u001f\\u007f]", "u");
|
|
1853
|
+
var SCHEME = /^([a-z][a-z0-9+.-]*):/;
|
|
1854
|
+
var STORE_ONLY = { store: true, open: false, reason: "not-openable" };
|
|
1855
|
+
var reject = (reason) => ({
|
|
1856
|
+
store: false,
|
|
1857
|
+
open: false,
|
|
1858
|
+
reason
|
|
1859
|
+
});
|
|
1860
|
+
function hyperlinkPolicy(href, options2 = {}) {
|
|
1861
|
+
if (typeof href !== "string") return reject("empty");
|
|
1862
|
+
const trimmed2 = href.trim();
|
|
1863
|
+
const normalized = trimmed2.replace(IGNORABLE, "").toLowerCase();
|
|
1864
|
+
if (normalized.length === 0) return reject("empty");
|
|
1865
|
+
const scheme2 = SCHEME.exec(normalized)?.[1];
|
|
1866
|
+
if (scheme2 !== void 0 && SCRIPT_SCHEMES.has(scheme2)) return reject("script-scheme");
|
|
1867
|
+
if (scheme2 !== void 0 && !trimmed2.toLowerCase().startsWith(`${scheme2}:`))
|
|
1868
|
+
return reject("obfuscated-scheme");
|
|
1869
|
+
if (CONTROL.test(trimmed2)) return reject("control-characters");
|
|
1870
|
+
if (scheme2 === void 0) return options2.openRelative ? { store: true, open: true } : STORE_ONLY;
|
|
1871
|
+
if (scheme2.length === 1) return STORE_ONLY;
|
|
1872
|
+
if (OPEN_SCHEMES.has(scheme2)) return { store: true, open: true };
|
|
1873
|
+
if (options2.additionalOpenSchemes?.some((allowed) => allowed.toLowerCase() === scheme2))
|
|
1874
|
+
return { store: true, open: true };
|
|
1875
|
+
if (STORE_SCHEMES.has(scheme2)) return STORE_ONLY;
|
|
1876
|
+
return reject("unsupported-scheme");
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1724
1879
|
// opc/properties/types.ts
|
|
1725
1880
|
var CUSTOM_PROPERTIES_FMTID = "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}";
|
|
1726
1881
|
var PROPERTY_PART_NAMES = {
|
|
@@ -4016,161 +4171,6 @@ function patchCommentMetadata(parts, identities) {
|
|
|
4016
4171
|
return result2;
|
|
4017
4172
|
}
|
|
4018
4173
|
|
|
4019
|
-
// text/text-diff.ts
|
|
4020
|
-
var isLowSurrogate = (text9, at3) => {
|
|
4021
|
-
const code = text9.charCodeAt(at3);
|
|
4022
|
-
return code >= 56320 && code <= 57343;
|
|
4023
|
-
};
|
|
4024
|
-
function shortestEdit(n, m, same17, maxEdits) {
|
|
4025
|
-
const max = Math.min(n + m, maxEdits);
|
|
4026
|
-
const offset2 = max + 1;
|
|
4027
|
-
const v = new Int32Array(2 * max + 3);
|
|
4028
|
-
const trace = [];
|
|
4029
|
-
for (let d = 0; d <= max; d++) {
|
|
4030
|
-
for (let k = -d; k <= d; k += 2) {
|
|
4031
|
-
const down = k === -d || k !== d && v[offset2 + k - 1] < v[offset2 + k + 1];
|
|
4032
|
-
let x = down ? v[offset2 + k + 1] : v[offset2 + k - 1] + 1;
|
|
4033
|
-
let y = x - k;
|
|
4034
|
-
while (x < n && y < m && same17(x, y)) {
|
|
4035
|
-
x++;
|
|
4036
|
-
y++;
|
|
4037
|
-
}
|
|
4038
|
-
v[offset2 + k] = x;
|
|
4039
|
-
if (x >= n && y >= m) return backtrack(trace, n, m, d);
|
|
4040
|
-
}
|
|
4041
|
-
trace.push(v.slice(offset2 - d, offset2 + d + 1));
|
|
4042
|
-
}
|
|
4043
|
-
return void 0;
|
|
4044
|
-
}
|
|
4045
|
-
function backtrack(trace, n, m, d) {
|
|
4046
|
-
const edits2 = [];
|
|
4047
|
-
let x = n;
|
|
4048
|
-
let y = m;
|
|
4049
|
-
for (let step2 = d; step2 > 0; step2--) {
|
|
4050
|
-
const previous = trace[step2 - 1];
|
|
4051
|
-
const at3 = (k2) => previous[k2 + step2 - 1];
|
|
4052
|
-
const k = x - y;
|
|
4053
|
-
const down = k === -step2 || k !== step2 && at3(k - 1) < at3(k + 1);
|
|
4054
|
-
const before = down ? k + 1 : k - 1;
|
|
4055
|
-
const startX = at3(before);
|
|
4056
|
-
const startY = startX - before;
|
|
4057
|
-
edits2.push(down ? [startX, startY, true] : [startX, startY, false]);
|
|
4058
|
-
x = startX;
|
|
4059
|
-
y = startY;
|
|
4060
|
-
}
|
|
4061
|
-
return edits2.reverse();
|
|
4062
|
-
}
|
|
4063
|
-
function changesOf(edits2) {
|
|
4064
|
-
const changes = [];
|
|
4065
|
-
for (const [x, y, inserts] of edits2) {
|
|
4066
|
-
const last = changes.at(-1);
|
|
4067
|
-
if (last && last.fromEnd === x && last.toEnd === y) {
|
|
4068
|
-
if (inserts) last.toEnd++;
|
|
4069
|
-
else last.fromEnd++;
|
|
4070
|
-
} else
|
|
4071
|
-
changes.push({
|
|
4072
|
-
fromStart: x,
|
|
4073
|
-
fromEnd: inserts ? x : x + 1,
|
|
4074
|
-
toStart: y,
|
|
4075
|
-
toEnd: inserts ? y + 1 : y
|
|
4076
|
-
});
|
|
4077
|
-
}
|
|
4078
|
-
return changes;
|
|
4079
|
-
}
|
|
4080
|
-
function characterChanges(a2, b, maxEdits) {
|
|
4081
|
-
const edits2 = shortestEdit(
|
|
4082
|
-
a2.length,
|
|
4083
|
-
b.length,
|
|
4084
|
-
(x, y) => a2.charCodeAt(x) === b.charCodeAt(y),
|
|
4085
|
-
maxEdits
|
|
4086
|
-
);
|
|
4087
|
-
return edits2 && changesOf(edits2);
|
|
4088
|
-
}
|
|
4089
|
-
var TOKEN = /[\p{L}\p{N}\p{M}]+|\s+|[\s\S]/gu;
|
|
4090
|
-
function tokensOf(text9, ids) {
|
|
4091
|
-
const tokens3 = [];
|
|
4092
|
-
const starts = [];
|
|
4093
|
-
for (const match2 of text9.matchAll(TOKEN)) {
|
|
4094
|
-
let id5 = ids.get(match2[0]);
|
|
4095
|
-
if (id5 === void 0) ids.set(match2[0], id5 = ids.size);
|
|
4096
|
-
tokens3.push(id5);
|
|
4097
|
-
starts.push(match2.index);
|
|
4098
|
-
}
|
|
4099
|
-
starts.push(text9.length);
|
|
4100
|
-
return { tokens: tokens3, starts };
|
|
4101
|
-
}
|
|
4102
|
-
function tokenChanges(a2, b, maxEdits) {
|
|
4103
|
-
const ids = /* @__PURE__ */ new Map();
|
|
4104
|
-
const from = tokensOf(a2, ids);
|
|
4105
|
-
const to = tokensOf(b, ids);
|
|
4106
|
-
const edits2 = shortestEdit(
|
|
4107
|
-
from.tokens.length,
|
|
4108
|
-
to.tokens.length,
|
|
4109
|
-
(x, y) => from.tokens[x] === to.tokens[y],
|
|
4110
|
-
maxEdits
|
|
4111
|
-
);
|
|
4112
|
-
if (!edits2) return void 0;
|
|
4113
|
-
let budget = maxEdits;
|
|
4114
|
-
return changesOf(edits2).flatMap((stretch) => {
|
|
4115
|
-
const change = {
|
|
4116
|
-
fromStart: from.starts[stretch.fromStart],
|
|
4117
|
-
fromEnd: from.starts[stretch.fromEnd],
|
|
4118
|
-
toStart: to.starts[stretch.toStart],
|
|
4119
|
-
toEnd: to.starts[stretch.toEnd]
|
|
4120
|
-
};
|
|
4121
|
-
const inner2 = change.fromEnd > change.fromStart && change.toEnd > change.toStart ? characterChanges(
|
|
4122
|
-
a2.slice(change.fromStart, change.fromEnd),
|
|
4123
|
-
b.slice(change.toStart, change.toEnd),
|
|
4124
|
-
budget
|
|
4125
|
-
) : void 0;
|
|
4126
|
-
if (!inner2) return [change];
|
|
4127
|
-
for (const found of inner2)
|
|
4128
|
-
budget -= found.fromEnd - found.fromStart + found.toEnd - found.toStart;
|
|
4129
|
-
return inner2.map((found) => ({
|
|
4130
|
-
fromStart: found.fromStart + change.fromStart,
|
|
4131
|
-
fromEnd: found.fromEnd + change.fromStart,
|
|
4132
|
-
toStart: found.toStart + change.toStart,
|
|
4133
|
-
toEnd: found.toEnd + change.toStart
|
|
4134
|
-
}));
|
|
4135
|
-
});
|
|
4136
|
-
}
|
|
4137
|
-
function diffText(from, to, maxEdits = 500) {
|
|
4138
|
-
let start = 0;
|
|
4139
|
-
while (start < from.length && start < to.length && from.charCodeAt(start) === to.charCodeAt(start))
|
|
4140
|
-
start++;
|
|
4141
|
-
let end = 0;
|
|
4142
|
-
while (end < from.length - start && end < to.length - start && from.charCodeAt(from.length - 1 - end) === to.charCodeAt(to.length - 1 - end))
|
|
4143
|
-
end++;
|
|
4144
|
-
const a2 = from.slice(start, from.length - end);
|
|
4145
|
-
const b = to.slice(start, to.length - end);
|
|
4146
|
-
if (!a2.length && !b.length) return [];
|
|
4147
|
-
const found = a2.length && b.length ? characterChanges(a2, b, maxEdits) ?? tokenChanges(a2, b, maxEdits) : void 0;
|
|
4148
|
-
const changes = found ?? [{ fromStart: 0, fromEnd: a2.length, toStart: 0, toEnd: b.length }];
|
|
4149
|
-
const result2 = [];
|
|
4150
|
-
for (const change of changes) {
|
|
4151
|
-
const placed = {
|
|
4152
|
-
fromStart: change.fromStart + start,
|
|
4153
|
-
fromEnd: change.fromEnd + start,
|
|
4154
|
-
toStart: change.toStart + start,
|
|
4155
|
-
toEnd: change.toEnd + start
|
|
4156
|
-
};
|
|
4157
|
-
if (placed.fromStart > 0 && placed.toStart > 0 && (isLowSurrogate(from, placed.fromStart) || isLowSurrogate(to, placed.toStart))) {
|
|
4158
|
-
placed.fromStart--;
|
|
4159
|
-
placed.toStart--;
|
|
4160
|
-
}
|
|
4161
|
-
if (isLowSurrogate(from, placed.fromEnd) || isLowSurrogate(to, placed.toEnd)) {
|
|
4162
|
-
placed.fromEnd++;
|
|
4163
|
-
placed.toEnd++;
|
|
4164
|
-
}
|
|
4165
|
-
const last = result2.at(-1);
|
|
4166
|
-
if (last && placed.fromStart <= last.fromEnd) {
|
|
4167
|
-
last.fromEnd = Math.max(last.fromEnd, placed.fromEnd);
|
|
4168
|
-
last.toEnd = Math.max(last.toEnd, placed.toEnd);
|
|
4169
|
-
} else result2.push(placed);
|
|
4170
|
-
}
|
|
4171
|
-
return result2;
|
|
4172
|
-
}
|
|
4173
|
-
|
|
4174
4174
|
// color/color-primitives.ts
|
|
4175
4175
|
function clampUnitInterval(value3) {
|
|
4176
4176
|
return Math.min(1, Math.max(0, value3));
|
|
@@ -103388,7 +103388,12 @@ function shapeDataRowName(value3) {
|
|
|
103388
103388
|
}
|
|
103389
103389
|
function visioShapeDataRowName(label2, taken = []) {
|
|
103390
103390
|
const used = new Set([...taken].map((name4) => name4.toLowerCase()));
|
|
103391
|
-
let base3 = label2.normalize("NFKD").replace(/[^\w]+/g, "_")
|
|
103391
|
+
let base3 = label2.normalize("NFKD").replace(/[^\w]+/g, "_");
|
|
103392
|
+
let start = 0;
|
|
103393
|
+
let end = base3.length;
|
|
103394
|
+
while (start < end && base3[start] === "_") start++;
|
|
103395
|
+
while (end > start && base3[end - 1] === "_") end--;
|
|
103396
|
+
base3 = base3.slice(start, end).slice(0, 48);
|
|
103392
103397
|
if (!base3) base3 = "Property";
|
|
103393
103398
|
if (/^\d/.test(base3)) base3 = `_${base3}`;
|
|
103394
103399
|
let name3 = base3;
|
|
@@ -22699,7 +22699,7 @@ function findTextBearingElementById(elements3, elementId) {
|
|
|
22699
22699
|
}
|
|
22700
22700
|
async function loadNestedDeck(pptxBytes) {
|
|
22701
22701
|
try {
|
|
22702
|
-
const { PptxHandler } = await import('./PptxHandler-
|
|
22702
|
+
const { PptxHandler } = await import('./PptxHandler-EB2WFF7F.mjs');
|
|
22703
22703
|
const handler = new PptxHandler();
|
|
22704
22704
|
const data = await handler.load(pptxBytes.buffer.slice(0));
|
|
22705
22705
|
return { handler, slides: data.slides };
|
|
@@ -58648,6 +58648,107 @@ function getCustomShowPositionLabel(currentSlideIndex, filteredIndices) {
|
|
|
58648
58648
|
return `${pos + 1} of ${filteredIndices.length}`;
|
|
58649
58649
|
}
|
|
58650
58650
|
|
|
58651
|
+
// pptx/core/utils/custom-show-link.ts
|
|
58652
|
+
function customShowActionId(action) {
|
|
58653
|
+
if (!action || !/^ppaction:\/\/customshow(?:\?|$)/i.test(action)) return void 0;
|
|
58654
|
+
const match = action.match(/[?&]id=([^&]*)/i);
|
|
58655
|
+
if (!match) return void 0;
|
|
58656
|
+
try {
|
|
58657
|
+
return decodeURIComponent(match[1]);
|
|
58658
|
+
} catch {
|
|
58659
|
+
return void 0;
|
|
58660
|
+
}
|
|
58661
|
+
}
|
|
58662
|
+
function rewriteCustomShowAction(action, rewrite) {
|
|
58663
|
+
const id = customShowActionId(action);
|
|
58664
|
+
if (id === void 0) return { changed: false, action };
|
|
58665
|
+
const next = rewrite(id);
|
|
58666
|
+
if (next === id) return { changed: false, action };
|
|
58667
|
+
return {
|
|
58668
|
+
changed: true,
|
|
58669
|
+
action: next === null ? void 0 : action.replace(/([?&]id=)[^&]*/i, "$1" + encodeURIComponent(next))
|
|
58670
|
+
};
|
|
58671
|
+
}
|
|
58672
|
+
|
|
58673
|
+
// pptx/core/utils/custom-show-text-links.ts
|
|
58674
|
+
var CLICK_KEYS = [
|
|
58675
|
+
"hyperlink",
|
|
58676
|
+
"hyperlinkRId",
|
|
58677
|
+
"hyperlinkTooltip",
|
|
58678
|
+
"hyperlinkAction",
|
|
58679
|
+
"hyperlinkTargetSlideIndex",
|
|
58680
|
+
"hyperlinkSoundXml",
|
|
58681
|
+
"hyperlinkInvalidUrl",
|
|
58682
|
+
"hyperlinkTargetFrame",
|
|
58683
|
+
"hyperlinkHistory",
|
|
58684
|
+
"hyperlinkHighlightClick",
|
|
58685
|
+
"hyperlinkEndSound"
|
|
58686
|
+
];
|
|
58687
|
+
function mapCustomShowTextLinks(style, rewrite) {
|
|
58688
|
+
const url = rewriteCustomShowAction(style.hyperlink, rewrite);
|
|
58689
|
+
const action = rewriteCustomShowAction(style.hyperlinkAction, rewrite);
|
|
58690
|
+
const hover = rewriteCustomShowAction(style.hyperlinkMouseOver, rewrite);
|
|
58691
|
+
const clickChanged = url.changed || action.changed;
|
|
58692
|
+
if (!clickChanged && !hover.changed) return { style, click: false, hover: false };
|
|
58693
|
+
const next = { ...style };
|
|
58694
|
+
if (clickChanged) {
|
|
58695
|
+
if (url.changed && url.action === void 0 || action.changed && action.action === void 0) {
|
|
58696
|
+
for (const key of CLICK_KEYS) delete next[key];
|
|
58697
|
+
} else {
|
|
58698
|
+
if (url.changed && url.action !== void 0) next.hyperlink = url.action;
|
|
58699
|
+
if (action.changed && action.action !== void 0) {
|
|
58700
|
+
next.hyperlinkAction = action.action;
|
|
58701
|
+
if (!style.hyperlink) next.hyperlink = action.action;
|
|
58702
|
+
}
|
|
58703
|
+
}
|
|
58704
|
+
}
|
|
58705
|
+
if (hover.changed) {
|
|
58706
|
+
if (hover.action === void 0) {
|
|
58707
|
+
delete next.hyperlinkMouseOver;
|
|
58708
|
+
delete next.hyperlinkMouseOverSoundXml;
|
|
58709
|
+
} else {
|
|
58710
|
+
next.hyperlinkMouseOver = hover.action;
|
|
58711
|
+
}
|
|
58712
|
+
}
|
|
58713
|
+
return { style: next, click: clickChanged, hover: hover.changed };
|
|
58714
|
+
}
|
|
58715
|
+
|
|
58716
|
+
// pptx/core/utils/custom-show-table-links.ts
|
|
58717
|
+
var LINKS = /* @__PURE__ */ new Set(["a:hlinkClick", "a:hlinkMouseOver", "a:hlinkHover"]);
|
|
58718
|
+
function mapCustomShowTableLinks(rawXml, rewrite) {
|
|
58719
|
+
function visit(value, inTable, isLink = false) {
|
|
58720
|
+
if (Array.isArray(value)) {
|
|
58721
|
+
const mapped = value.map((item2) => visit(item2, inTable, isLink));
|
|
58722
|
+
const changed2 = mapped.reduce((count, item2) => count + item2.changed, 0);
|
|
58723
|
+
if (!changed2) return { value, changed: changed2 };
|
|
58724
|
+
const items = mapped.flatMap((item2) => isXmlNode(item2.value) ? [item2.value] : []);
|
|
58725
|
+
return { value: items.length ? items : void 0, changed: changed2 };
|
|
58726
|
+
}
|
|
58727
|
+
if (!isXmlNode(value)) return { value, changed: 0 };
|
|
58728
|
+
if (inTable && isLink) {
|
|
58729
|
+
const result2 = rewriteCustomShowAction(xmlAttr(value, "action"), rewrite);
|
|
58730
|
+
if (result2.changed)
|
|
58731
|
+
return {
|
|
58732
|
+
value: result2.action === void 0 ? void 0 : { ...value, "@_action": result2.action },
|
|
58733
|
+
changed: 1
|
|
58734
|
+
};
|
|
58735
|
+
}
|
|
58736
|
+
let next = value;
|
|
58737
|
+
let changed = 0;
|
|
58738
|
+
for (const [key, child14] of Object.entries(value)) {
|
|
58739
|
+
const mapped = visit(child14, inTable || key === "a:tbl", LINKS.has(key));
|
|
58740
|
+
if (!mapped.changed) continue;
|
|
58741
|
+
if (next === value) next = { ...value };
|
|
58742
|
+
if (mapped.value === void 0) delete next[key];
|
|
58743
|
+
else next[key] = mapped.value;
|
|
58744
|
+
changed += mapped.changed;
|
|
58745
|
+
}
|
|
58746
|
+
return { value: next, changed };
|
|
58747
|
+
}
|
|
58748
|
+
const result = visit(rawXml, false);
|
|
58749
|
+
return { rawXml: result.value, changed: result.changed };
|
|
58750
|
+
}
|
|
58751
|
+
|
|
58651
58752
|
// pptx/core/utils/custom-show-actions.ts
|
|
58652
58753
|
var UNSIGNED_INT_MAX = 4294967295;
|
|
58653
58754
|
function isUnsignedInt(id) {
|
|
@@ -58680,27 +58781,6 @@ function normalizeCustomShowIds(shows) {
|
|
|
58680
58781
|
idMap
|
|
58681
58782
|
};
|
|
58682
58783
|
}
|
|
58683
|
-
function customShowActionId(action) {
|
|
58684
|
-
if (!action || !action.toLowerCase().includes("ppaction://customshow")) {
|
|
58685
|
-
return void 0;
|
|
58686
|
-
}
|
|
58687
|
-
const match = action.match(/[?&]id=([^&]*)/i);
|
|
58688
|
-
return match ? decodeURIComponent(match[1]) : void 0;
|
|
58689
|
-
}
|
|
58690
|
-
function rewriteAction(action, rewrite) {
|
|
58691
|
-
const id = customShowActionId(action);
|
|
58692
|
-
if (id === void 0) {
|
|
58693
|
-
return { changed: false, action };
|
|
58694
|
-
}
|
|
58695
|
-
const next = rewrite(id);
|
|
58696
|
-
if (next === id) {
|
|
58697
|
-
return { changed: false, action };
|
|
58698
|
-
}
|
|
58699
|
-
return {
|
|
58700
|
-
changed: true,
|
|
58701
|
-
action: next === null ? void 0 : action.replace(/([?&]id=)[^&]*/i, `$1${encodeURIComponent(next)}`)
|
|
58702
|
-
};
|
|
58703
|
-
}
|
|
58704
58784
|
function mapElement(element, rewrite) {
|
|
58705
58785
|
let changed = 0;
|
|
58706
58786
|
let next = element;
|
|
@@ -58712,7 +58792,7 @@ function mapElement(element, rewrite) {
|
|
|
58712
58792
|
};
|
|
58713
58793
|
for (const key of ["actionClick", "actionHover"]) {
|
|
58714
58794
|
const current = element[key];
|
|
58715
|
-
const result =
|
|
58795
|
+
const result = rewriteCustomShowAction(current?.action, rewrite);
|
|
58716
58796
|
if (current && result.changed) {
|
|
58717
58797
|
changed++;
|
|
58718
58798
|
if (result.action === void 0) {
|
|
@@ -58722,27 +58802,31 @@ function mapElement(element, rewrite) {
|
|
|
58722
58802
|
}
|
|
58723
58803
|
}
|
|
58724
58804
|
}
|
|
58805
|
+
let clicks = 0;
|
|
58806
|
+
let hovers = 0;
|
|
58725
58807
|
const segments = "textSegments" in element ? element.textSegments : void 0;
|
|
58726
|
-
if (segments
|
|
58727
|
-
|
|
58728
|
-
|
|
58729
|
-
|
|
58730
|
-
|
|
58731
|
-
|
|
58732
|
-
|
|
58733
|
-
if (result.action !== void 0) {
|
|
58734
|
-
return { ...segment, style: { ...segment.style, hyperlinkAction: result.action } };
|
|
58735
|
-
}
|
|
58736
|
-
const {
|
|
58737
|
-
hyperlink: _h,
|
|
58738
|
-
hyperlinkRId: _r,
|
|
58739
|
-
hyperlinkTooltip: _t,
|
|
58740
|
-
hyperlinkAction: _a,
|
|
58741
|
-
hyperlinkTargetSlideIndex: _i,
|
|
58742
|
-
...style
|
|
58743
|
-
} = segment.style;
|
|
58744
|
-
return { ...segment, style };
|
|
58808
|
+
if (segments) {
|
|
58809
|
+
const mapped = segments.map((segment) => {
|
|
58810
|
+
if (!segment.style) return segment;
|
|
58811
|
+
const result = mapCustomShowTextLinks(segment.style, rewrite);
|
|
58812
|
+
clicks += Number(result.click);
|
|
58813
|
+
hovers += Number(result.hover);
|
|
58814
|
+
return result.style === segment.style ? segment : { ...segment, style: result.style };
|
|
58745
58815
|
});
|
|
58816
|
+
if (clicks || hovers) edit().textSegments = mapped;
|
|
58817
|
+
}
|
|
58818
|
+
changed += clicks + hovers;
|
|
58819
|
+
const textStyle = "textStyle" in element ? element.textStyle : void 0;
|
|
58820
|
+
if (textStyle) {
|
|
58821
|
+
const result = mapCustomShowTextLinks(textStyle, rewrite);
|
|
58822
|
+
if (result.style !== textStyle) edit().textStyle = result.style;
|
|
58823
|
+
if (result.click && clicks === 0) changed++;
|
|
58824
|
+
if (result.hover && hovers === 0) changed++;
|
|
58825
|
+
}
|
|
58826
|
+
if (element.type === "table" && element.rawXml) {
|
|
58827
|
+
const result = mapCustomShowTableLinks(element.rawXml, rewrite);
|
|
58828
|
+
if (result.changed) edit().rawXml = result.rawXml;
|
|
58829
|
+
changed += result.changed;
|
|
58746
58830
|
}
|
|
58747
58831
|
if (element.type === "group") {
|
|
58748
58832
|
const children6 = element.children.map((child14) => mapElement(child14, rewrite));
|