@harbour-enterprises/superdoc 0.23.0-next.14 → 0.23.0-next.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-D3cgkd9j.cjs → PdfViewer-1MZFKzXW.cjs} +1 -1
- package/dist/chunks/{PdfViewer-BaaVD5bX.es.js → PdfViewer-NEyAcxt7.es.js} +1 -1
- package/dist/chunks/{eventemitter3-CR2eBWft.es.js → eventemitter3-BWEnUdTY.es.js} +1 -1
- package/dist/chunks/{eventemitter3-DSRogsNq.cjs → eventemitter3-DkXkH2rT.cjs} +1 -1
- package/dist/chunks/{index-CAHkANZY.cjs → index-CGtSnLpQ.cjs} +160 -465
- package/dist/chunks/{index-CESuSQe2.es.js → index-DAT3_wPu.es.js} +27 -332
- package/dist/chunks/{super-editor.es-BYutUrPg.cjs → super-editor.es-C7TgrpFl.cjs} +616 -116
- package/dist/chunks/{super-editor.es-BKb7p4fi.es.js → super-editor.es-Ctq_imo8.es.js} +616 -116
- package/dist/chunks/{xml-js-CWV8R-ek.cjs → xml-js-D_ZIzxu0.cjs} +1 -1
- package/dist/chunks/xml-js-Dx4FIjnp.es.js +2 -0
- package/dist/core/types/index.d.ts +19 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DD7uNz2k.js → converter-vEmAnrOg.js} +665 -249
- package/dist/super-editor/chunks/{docx-zipper-DraPR30Z.js → docx-zipper-DA00N7eN.js} +1 -1
- package/dist/super-editor/chunks/{editor-xzhKWRFZ.js → editor-Das_uwlq.js} +94 -10
- package/dist/super-editor/chunks/{toolbar-D6SJTVWT.js → toolbar-CKugkxNQ.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/src/core/Editor.d.ts +57 -3
- package/dist/super-editor/src/core/super-converter/SuperConverter.d.ts +58 -2
- package/dist/super-editor/src/core/super-converter/exporter-docx-defs.d.ts +28 -39
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -3
- package/dist/superdoc.es.js +2 -3
- package/dist/superdoc.umd.js +641 -446
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-Bbc0NeKa.es.js +0 -2
- package/dist/chunks/{jszip-DAXEPCUv.es.js → jszip-BDk3JBqp.es.js} +3 -3
- package/dist/chunks/{jszip-B4LDL19y.cjs → jszip-u4dvXAKa.cjs} +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-C7TgrpFl.cjs");
|
|
3
3
|
const vue = require("./vue-DKMj1I9B.cjs");
|
|
4
|
-
const jszip = require("./jszip-B4LDL19y.cjs");
|
|
5
4
|
const blankDocx = require("./blank-docx-CPqX9RF5.cjs");
|
|
6
|
-
const eventemitter3 = require("./eventemitter3-
|
|
5
|
+
const eventemitter3 = require("./eventemitter3-DkXkH2rT.cjs");
|
|
7
6
|
const provider = require("@hocuspocus/provider");
|
|
8
7
|
const Y = require("yjs");
|
|
8
|
+
const jszip = require("./jszip-u4dvXAKa.cjs");
|
|
9
9
|
const uuid = require("./uuid-CQzaMNgL.cjs");
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -77,306 +77,6 @@ const vClickOutside = {
|
|
|
77
77
|
delete el.__clickOutsideHandler;
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
function getDefaultExportFromCjs(x) {
|
|
81
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
82
|
-
}
|
|
83
|
-
const CRC_TABLE = new Int32Array([
|
|
84
|
-
0,
|
|
85
|
-
1996959894,
|
|
86
|
-
3993919788,
|
|
87
|
-
2567524794,
|
|
88
|
-
124634137,
|
|
89
|
-
1886057615,
|
|
90
|
-
3915621685,
|
|
91
|
-
2657392035,
|
|
92
|
-
249268274,
|
|
93
|
-
2044508324,
|
|
94
|
-
3772115230,
|
|
95
|
-
2547177864,
|
|
96
|
-
162941995,
|
|
97
|
-
2125561021,
|
|
98
|
-
3887607047,
|
|
99
|
-
2428444049,
|
|
100
|
-
498536548,
|
|
101
|
-
1789927666,
|
|
102
|
-
4089016648,
|
|
103
|
-
2227061214,
|
|
104
|
-
450548861,
|
|
105
|
-
1843258603,
|
|
106
|
-
4107580753,
|
|
107
|
-
2211677639,
|
|
108
|
-
325883990,
|
|
109
|
-
1684777152,
|
|
110
|
-
4251122042,
|
|
111
|
-
2321926636,
|
|
112
|
-
335633487,
|
|
113
|
-
1661365465,
|
|
114
|
-
4195302755,
|
|
115
|
-
2366115317,
|
|
116
|
-
997073096,
|
|
117
|
-
1281953886,
|
|
118
|
-
3579855332,
|
|
119
|
-
2724688242,
|
|
120
|
-
1006888145,
|
|
121
|
-
1258607687,
|
|
122
|
-
3524101629,
|
|
123
|
-
2768942443,
|
|
124
|
-
901097722,
|
|
125
|
-
1119000684,
|
|
126
|
-
3686517206,
|
|
127
|
-
2898065728,
|
|
128
|
-
853044451,
|
|
129
|
-
1172266101,
|
|
130
|
-
3705015759,
|
|
131
|
-
2882616665,
|
|
132
|
-
651767980,
|
|
133
|
-
1373503546,
|
|
134
|
-
3369554304,
|
|
135
|
-
3218104598,
|
|
136
|
-
565507253,
|
|
137
|
-
1454621731,
|
|
138
|
-
3485111705,
|
|
139
|
-
3099436303,
|
|
140
|
-
671266974,
|
|
141
|
-
1594198024,
|
|
142
|
-
3322730930,
|
|
143
|
-
2970347812,
|
|
144
|
-
795835527,
|
|
145
|
-
1483230225,
|
|
146
|
-
3244367275,
|
|
147
|
-
3060149565,
|
|
148
|
-
1994146192,
|
|
149
|
-
31158534,
|
|
150
|
-
2563907772,
|
|
151
|
-
4023717930,
|
|
152
|
-
1907459465,
|
|
153
|
-
112637215,
|
|
154
|
-
2680153253,
|
|
155
|
-
3904427059,
|
|
156
|
-
2013776290,
|
|
157
|
-
251722036,
|
|
158
|
-
2517215374,
|
|
159
|
-
3775830040,
|
|
160
|
-
2137656763,
|
|
161
|
-
141376813,
|
|
162
|
-
2439277719,
|
|
163
|
-
3865271297,
|
|
164
|
-
1802195444,
|
|
165
|
-
476864866,
|
|
166
|
-
2238001368,
|
|
167
|
-
4066508878,
|
|
168
|
-
1812370925,
|
|
169
|
-
453092731,
|
|
170
|
-
2181625025,
|
|
171
|
-
4111451223,
|
|
172
|
-
1706088902,
|
|
173
|
-
314042704,
|
|
174
|
-
2344532202,
|
|
175
|
-
4240017532,
|
|
176
|
-
1658658271,
|
|
177
|
-
366619977,
|
|
178
|
-
2362670323,
|
|
179
|
-
4224994405,
|
|
180
|
-
1303535960,
|
|
181
|
-
984961486,
|
|
182
|
-
2747007092,
|
|
183
|
-
3569037538,
|
|
184
|
-
1256170817,
|
|
185
|
-
1037604311,
|
|
186
|
-
2765210733,
|
|
187
|
-
3554079995,
|
|
188
|
-
1131014506,
|
|
189
|
-
879679996,
|
|
190
|
-
2909243462,
|
|
191
|
-
3663771856,
|
|
192
|
-
1141124467,
|
|
193
|
-
855842277,
|
|
194
|
-
2852801631,
|
|
195
|
-
3708648649,
|
|
196
|
-
1342533948,
|
|
197
|
-
654459306,
|
|
198
|
-
3188396048,
|
|
199
|
-
3373015174,
|
|
200
|
-
1466479909,
|
|
201
|
-
544179635,
|
|
202
|
-
3110523913,
|
|
203
|
-
3462522015,
|
|
204
|
-
1591671054,
|
|
205
|
-
702138776,
|
|
206
|
-
2966460450,
|
|
207
|
-
3352799412,
|
|
208
|
-
1504918807,
|
|
209
|
-
783551873,
|
|
210
|
-
3082640443,
|
|
211
|
-
3233442989,
|
|
212
|
-
3988292384,
|
|
213
|
-
2596254646,
|
|
214
|
-
62317068,
|
|
215
|
-
1957810842,
|
|
216
|
-
3939845945,
|
|
217
|
-
2647816111,
|
|
218
|
-
81470997,
|
|
219
|
-
1943803523,
|
|
220
|
-
3814918930,
|
|
221
|
-
2489596804,
|
|
222
|
-
225274430,
|
|
223
|
-
2053790376,
|
|
224
|
-
3826175755,
|
|
225
|
-
2466906013,
|
|
226
|
-
167816743,
|
|
227
|
-
2097651377,
|
|
228
|
-
4027552580,
|
|
229
|
-
2265490386,
|
|
230
|
-
503444072,
|
|
231
|
-
1762050814,
|
|
232
|
-
4150417245,
|
|
233
|
-
2154129355,
|
|
234
|
-
426522225,
|
|
235
|
-
1852507879,
|
|
236
|
-
4275313526,
|
|
237
|
-
2312317920,
|
|
238
|
-
282753626,
|
|
239
|
-
1742555852,
|
|
240
|
-
4189708143,
|
|
241
|
-
2394877945,
|
|
242
|
-
397917763,
|
|
243
|
-
1622183637,
|
|
244
|
-
3604390888,
|
|
245
|
-
2714866558,
|
|
246
|
-
953729732,
|
|
247
|
-
1340076626,
|
|
248
|
-
3518719985,
|
|
249
|
-
2797360999,
|
|
250
|
-
1068828381,
|
|
251
|
-
1219638859,
|
|
252
|
-
3624741850,
|
|
253
|
-
2936675148,
|
|
254
|
-
906185462,
|
|
255
|
-
1090812512,
|
|
256
|
-
3747672003,
|
|
257
|
-
2825379669,
|
|
258
|
-
829329135,
|
|
259
|
-
1181335161,
|
|
260
|
-
3412177804,
|
|
261
|
-
3160834842,
|
|
262
|
-
628085408,
|
|
263
|
-
1382605366,
|
|
264
|
-
3423369109,
|
|
265
|
-
3138078467,
|
|
266
|
-
570562233,
|
|
267
|
-
1426400815,
|
|
268
|
-
3317316542,
|
|
269
|
-
2998733608,
|
|
270
|
-
733239954,
|
|
271
|
-
1555261956,
|
|
272
|
-
3268935591,
|
|
273
|
-
3050360625,
|
|
274
|
-
752459403,
|
|
275
|
-
1541320221,
|
|
276
|
-
2607071920,
|
|
277
|
-
3965973030,
|
|
278
|
-
1969922972,
|
|
279
|
-
40735498,
|
|
280
|
-
2617837225,
|
|
281
|
-
3943577151,
|
|
282
|
-
1913087877,
|
|
283
|
-
83908371,
|
|
284
|
-
2512341634,
|
|
285
|
-
3803740692,
|
|
286
|
-
2075208622,
|
|
287
|
-
213261112,
|
|
288
|
-
2463272603,
|
|
289
|
-
3855990285,
|
|
290
|
-
2094854071,
|
|
291
|
-
198958881,
|
|
292
|
-
2262029012,
|
|
293
|
-
4057260610,
|
|
294
|
-
1759359992,
|
|
295
|
-
534414190,
|
|
296
|
-
2176718541,
|
|
297
|
-
4139329115,
|
|
298
|
-
1873836001,
|
|
299
|
-
414664567,
|
|
300
|
-
2282248934,
|
|
301
|
-
4279200368,
|
|
302
|
-
1711684554,
|
|
303
|
-
285281116,
|
|
304
|
-
2405801727,
|
|
305
|
-
4167216745,
|
|
306
|
-
1634467795,
|
|
307
|
-
376229701,
|
|
308
|
-
2685067896,
|
|
309
|
-
3608007406,
|
|
310
|
-
1308918612,
|
|
311
|
-
956543938,
|
|
312
|
-
2808555105,
|
|
313
|
-
3495958263,
|
|
314
|
-
1231636301,
|
|
315
|
-
1047427035,
|
|
316
|
-
2932959818,
|
|
317
|
-
3654703836,
|
|
318
|
-
1088359270,
|
|
319
|
-
936918e3,
|
|
320
|
-
2847714899,
|
|
321
|
-
3736837829,
|
|
322
|
-
1202900863,
|
|
323
|
-
817233897,
|
|
324
|
-
3183342108,
|
|
325
|
-
3401237130,
|
|
326
|
-
1404277552,
|
|
327
|
-
615818150,
|
|
328
|
-
3134207493,
|
|
329
|
-
3453421203,
|
|
330
|
-
1423857449,
|
|
331
|
-
601450431,
|
|
332
|
-
3009837614,
|
|
333
|
-
3294710456,
|
|
334
|
-
1567103746,
|
|
335
|
-
711928724,
|
|
336
|
-
3020668471,
|
|
337
|
-
3272380065,
|
|
338
|
-
1510334235,
|
|
339
|
-
755167117
|
|
340
|
-
]);
|
|
341
|
-
function ensureBuffer(input) {
|
|
342
|
-
if (jszip.Buffer.isBuffer(input)) {
|
|
343
|
-
return input;
|
|
344
|
-
}
|
|
345
|
-
if (typeof input === "number") {
|
|
346
|
-
return jszip.Buffer.alloc(input);
|
|
347
|
-
} else if (typeof input === "string") {
|
|
348
|
-
return jszip.Buffer.from(input);
|
|
349
|
-
} else {
|
|
350
|
-
throw new Error("input must be buffer, number, or string, received " + typeof input);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
function bufferizeInt(num) {
|
|
354
|
-
const tmp = ensureBuffer(4);
|
|
355
|
-
tmp.writeInt32BE(num, 0);
|
|
356
|
-
return tmp;
|
|
357
|
-
}
|
|
358
|
-
function _crc32(buf, previous) {
|
|
359
|
-
buf = ensureBuffer(buf);
|
|
360
|
-
if (jszip.Buffer.isBuffer(previous)) {
|
|
361
|
-
previous = previous.readUInt32BE(0);
|
|
362
|
-
}
|
|
363
|
-
let crc = ~~previous ^ -1;
|
|
364
|
-
for (var n = 0; n < buf.length; n++) {
|
|
365
|
-
crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
|
|
366
|
-
}
|
|
367
|
-
return crc ^ -1;
|
|
368
|
-
}
|
|
369
|
-
function crc32() {
|
|
370
|
-
return bufferizeInt(_crc32.apply(null, arguments));
|
|
371
|
-
}
|
|
372
|
-
crc32.signed = function() {
|
|
373
|
-
return _crc32.apply(null, arguments);
|
|
374
|
-
};
|
|
375
|
-
crc32.unsigned = function() {
|
|
376
|
-
return _crc32.apply(null, arguments) >>> 0;
|
|
377
|
-
};
|
|
378
|
-
var bufferCrc32 = crc32;
|
|
379
|
-
const index = /* @__PURE__ */ getDefaultExportFromCjs(bufferCrc32);
|
|
380
80
|
function randomBytes(length2) {
|
|
381
81
|
const array = new Uint8Array(length2);
|
|
382
82
|
for (let i = 0; i < length2; i++) {
|
|
@@ -388,7 +88,9 @@ class Telemetry {
|
|
|
388
88
|
/** @type {boolean} */
|
|
389
89
|
enabled;
|
|
390
90
|
/** @type {string} */
|
|
391
|
-
|
|
91
|
+
documentGuid;
|
|
92
|
+
/** @type {string} */
|
|
93
|
+
documentIdentifier;
|
|
392
94
|
/** @type {string} */
|
|
393
95
|
superdocVersion;
|
|
394
96
|
/** @type {string} */
|
|
@@ -429,7 +131,8 @@ class Telemetry {
|
|
|
429
131
|
this.enabled = config.enabled ?? true;
|
|
430
132
|
this.licenseKey = config.licenseKey ?? Telemetry.COMMUNITY_LICENSE_KEY;
|
|
431
133
|
this.endpoint = config.endpoint ?? Telemetry.DEFAULT_ENDPOINT;
|
|
432
|
-
this.
|
|
134
|
+
this.documentGuid = config.documentGuid;
|
|
135
|
+
this.documentIdentifier = config.documentIdentifier;
|
|
433
136
|
this.superdocVersion = config.superdocVersion;
|
|
434
137
|
this.sessionId = this.generateId();
|
|
435
138
|
}
|
|
@@ -461,7 +164,10 @@ class Telemetry {
|
|
|
461
164
|
type: "usage",
|
|
462
165
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
463
166
|
sessionId: this.sessionId,
|
|
464
|
-
|
|
167
|
+
documentGuid: this.documentGuid,
|
|
168
|
+
// Updated field name
|
|
169
|
+
documentIdentifier: this.documentIdentifier,
|
|
170
|
+
// Include both
|
|
465
171
|
superdocVersion: this.superdocVersion,
|
|
466
172
|
file: this.documentInfo,
|
|
467
173
|
browser: this.getBrowserInfo(),
|
|
@@ -528,13 +234,17 @@ class Telemetry {
|
|
|
528
234
|
* Track file structure
|
|
529
235
|
* @param {Object} structure - File structure information
|
|
530
236
|
* @param {File} fileSource - original file
|
|
531
|
-
* @param {String} documentId - document
|
|
532
|
-
* @param {string}
|
|
237
|
+
* @param {String} documentId - document GUID
|
|
238
|
+
* @param {string} documentIdentifier - document identifier (GUID or hash)
|
|
239
|
+
* @param {string} internalId - document ID from settings.xml
|
|
533
240
|
*/
|
|
534
|
-
async trackFileStructure(structure, fileSource, documentId, internalId) {
|
|
241
|
+
async trackFileStructure(structure, fileSource, documentId, documentIdentifier, internalId) {
|
|
535
242
|
this.fileStructure = structure;
|
|
536
243
|
this.documentInfo = await this.processDocument(fileSource, {
|
|
537
|
-
|
|
244
|
+
guid: documentId,
|
|
245
|
+
// Updated parameter name
|
|
246
|
+
identifier: documentIdentifier,
|
|
247
|
+
// New parameter
|
|
538
248
|
internalId
|
|
539
249
|
});
|
|
540
250
|
}
|
|
@@ -549,34 +259,19 @@ class Telemetry {
|
|
|
549
259
|
console.warn("Telemetry: missing file source");
|
|
550
260
|
return {};
|
|
551
261
|
}
|
|
552
|
-
let hash = "";
|
|
553
|
-
try {
|
|
554
|
-
hash = await this.generateCrc32Hash(file);
|
|
555
|
-
} catch (error) {
|
|
556
|
-
console.error("Failed to generate file hash:", error);
|
|
557
|
-
}
|
|
558
262
|
return {
|
|
559
|
-
|
|
263
|
+
guid: options.guid,
|
|
264
|
+
// Updated from 'id'
|
|
265
|
+
identifier: options.identifier,
|
|
266
|
+
// New field
|
|
560
267
|
name: file.name,
|
|
561
268
|
size: file.size,
|
|
562
|
-
crc32: hash,
|
|
563
269
|
lastModified: file.lastModified ? new Date(file.lastModified).toISOString() : null,
|
|
564
270
|
type: file.type || "docx",
|
|
565
271
|
internalId: options.internalId
|
|
272
|
+
// Microsoft's GUID if present
|
|
566
273
|
};
|
|
567
274
|
}
|
|
568
|
-
/**
|
|
569
|
-
* Generate CRC32 hash for a file
|
|
570
|
-
* @param {File} file - File to hash
|
|
571
|
-
* @returns {Promise<string>} CRC32 hash
|
|
572
|
-
* @private
|
|
573
|
-
*/
|
|
574
|
-
async generateCrc32Hash(file) {
|
|
575
|
-
const arrayBuffer = await file.arrayBuffer();
|
|
576
|
-
const buffer = jszip.Buffer.from(arrayBuffer);
|
|
577
|
-
const hashBuffer = index(buffer);
|
|
578
|
-
return hashBuffer.toString("hex");
|
|
579
|
-
}
|
|
580
275
|
isTelemetryDataChanged() {
|
|
581
276
|
const initialStatistics = {};
|
|
582
277
|
const initialFileStructure = {};
|
|
@@ -3939,8 +3634,8 @@ function useDocument(params2, superdocConfig) {
|
|
|
3939
3634
|
}
|
|
3940
3635
|
const core = vue.ref(null);
|
|
3941
3636
|
const removeConversation = (conversationId) => {
|
|
3942
|
-
const
|
|
3943
|
-
if (
|
|
3637
|
+
const index = conversations.value.findIndex((c2) => c2.conversationId === conversationId);
|
|
3638
|
+
if (index > -1) conversations.value.splice(index, 1);
|
|
3944
3639
|
};
|
|
3945
3640
|
return {
|
|
3946
3641
|
id,
|
|
@@ -4134,13 +3829,13 @@ const useSuperdocStore = /* @__PURE__ */ defineStore("superdoc", () => {
|
|
|
4134
3829
|
top: totalHeight
|
|
4135
3830
|
};
|
|
4136
3831
|
};
|
|
4137
|
-
const handlePageReady = (documentId,
|
|
3832
|
+
const handlePageReady = (documentId, index, containerBounds) => {
|
|
4138
3833
|
if (!pages[documentId]) pages[documentId] = [];
|
|
4139
|
-
pages[documentId].push({ page:
|
|
3834
|
+
pages[documentId].push({ page: index, containerBounds });
|
|
4140
3835
|
const doc = getDocument(documentId);
|
|
4141
3836
|
if (!doc) return;
|
|
4142
3837
|
doc.pageContainers.push({
|
|
4143
|
-
page:
|
|
3838
|
+
page: index,
|
|
4144
3839
|
containerBounds
|
|
4145
3840
|
});
|
|
4146
3841
|
};
|
|
@@ -4487,12 +4182,12 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4487
4182
|
const groupedChanges = groupChanges(trackedChanges);
|
|
4488
4183
|
const { tr } = editor.view.state;
|
|
4489
4184
|
const { dispatch } = editor.view;
|
|
4490
|
-
groupedChanges.forEach(({ insertedMark, deletionMark, formatMark },
|
|
4491
|
-
console.debug(`Create comment for track change: ${
|
|
4185
|
+
groupedChanges.forEach(({ insertedMark, deletionMark, formatMark }, index) => {
|
|
4186
|
+
console.debug(`Create comment for track change: ${index}`);
|
|
4492
4187
|
const foundComment = commentsList.value.find(
|
|
4493
4188
|
(i) => i.commentId === insertedMark?.mark.attrs.id || i.commentId === deletionMark?.mark.attrs.id || i.commentId === formatMark?.mark.attrs.id
|
|
4494
4189
|
);
|
|
4495
|
-
const isLastIteration = trackedChanges.length ===
|
|
4190
|
+
const isLastIteration = trackedChanges.length === index + 1;
|
|
4496
4191
|
if (foundComment) {
|
|
4497
4192
|
if (isLastIteration) {
|
|
4498
4193
|
tr.setMeta(superEditor_es.CommentsPluginKey, { type: "force" });
|
|
@@ -7698,11 +7393,11 @@ var ResizeObserverController = (function() {
|
|
|
7698
7393
|
};
|
|
7699
7394
|
ResizeObserverController2.unobserve = function(resizeObserver, target) {
|
|
7700
7395
|
var detail = observerMap.get(resizeObserver);
|
|
7701
|
-
var
|
|
7396
|
+
var index = getObservationIndex(detail.observationTargets, target);
|
|
7702
7397
|
var lastObservation = detail.observationTargets.length === 1;
|
|
7703
|
-
if (
|
|
7398
|
+
if (index >= 0) {
|
|
7704
7399
|
lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);
|
|
7705
|
-
detail.observationTargets.splice(
|
|
7400
|
+
detail.observationTargets.splice(index, 1);
|
|
7706
7401
|
updateCount(-1);
|
|
7707
7402
|
}
|
|
7708
7403
|
};
|
|
@@ -8432,9 +8127,9 @@ function isSymbol(value) {
|
|
|
8432
8127
|
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
|
|
8433
8128
|
}
|
|
8434
8129
|
function arrayMap(array, iteratee) {
|
|
8435
|
-
var
|
|
8436
|
-
while (++
|
|
8437
|
-
result[
|
|
8130
|
+
var index = -1, length2 = array == null ? 0 : array.length, result = Array(length2);
|
|
8131
|
+
while (++index < length2) {
|
|
8132
|
+
result[index] = iteratee(array[index], index, array);
|
|
8438
8133
|
}
|
|
8439
8134
|
return result;
|
|
8440
8135
|
}
|
|
@@ -8545,10 +8240,10 @@ function apply(func, thisArg, args) {
|
|
|
8545
8240
|
return func.apply(thisArg, args);
|
|
8546
8241
|
}
|
|
8547
8242
|
function copyArray(source, array) {
|
|
8548
|
-
var
|
|
8243
|
+
var index = -1, length2 = source.length;
|
|
8549
8244
|
array || (array = Array(length2));
|
|
8550
|
-
while (++
|
|
8551
|
-
array[
|
|
8245
|
+
while (++index < length2) {
|
|
8246
|
+
array[index] = source[index];
|
|
8552
8247
|
}
|
|
8553
8248
|
return array;
|
|
8554
8249
|
}
|
|
@@ -8624,9 +8319,9 @@ function assignValue(object, key, value) {
|
|
|
8624
8319
|
function copyObject(source, props, object, customizer) {
|
|
8625
8320
|
var isNew = !object;
|
|
8626
8321
|
object || (object = {});
|
|
8627
|
-
var
|
|
8628
|
-
while (++
|
|
8629
|
-
var key = props[
|
|
8322
|
+
var index = -1, length2 = props.length;
|
|
8323
|
+
while (++index < length2) {
|
|
8324
|
+
var key = props[index];
|
|
8630
8325
|
var newValue = void 0;
|
|
8631
8326
|
if (newValue === void 0) {
|
|
8632
8327
|
newValue = source[key];
|
|
@@ -8643,14 +8338,14 @@ var nativeMax = Math.max;
|
|
|
8643
8338
|
function overRest(func, start, transform) {
|
|
8644
8339
|
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
8645
8340
|
return function() {
|
|
8646
|
-
var args = arguments,
|
|
8647
|
-
while (++
|
|
8648
|
-
array[
|
|
8341
|
+
var args = arguments, index = -1, length2 = nativeMax(args.length - start, 0), array = Array(length2);
|
|
8342
|
+
while (++index < length2) {
|
|
8343
|
+
array[index] = args[start + index];
|
|
8649
8344
|
}
|
|
8650
|
-
|
|
8345
|
+
index = -1;
|
|
8651
8346
|
var otherArgs = Array(start + 1);
|
|
8652
|
-
while (++
|
|
8653
|
-
otherArgs[
|
|
8347
|
+
while (++index < start) {
|
|
8348
|
+
otherArgs[index] = args[index];
|
|
8654
8349
|
}
|
|
8655
8350
|
otherArgs[start] = transform(array);
|
|
8656
8351
|
return apply(func, this, otherArgs);
|
|
@@ -8666,29 +8361,29 @@ function isLength(value) {
|
|
|
8666
8361
|
function isArrayLike(value) {
|
|
8667
8362
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
8668
8363
|
}
|
|
8669
|
-
function isIterateeCall(value,
|
|
8364
|
+
function isIterateeCall(value, index, object) {
|
|
8670
8365
|
if (!isObject(object)) {
|
|
8671
8366
|
return false;
|
|
8672
8367
|
}
|
|
8673
|
-
var type = typeof
|
|
8674
|
-
if (type == "number" ? isArrayLike(object) && isIndex(
|
|
8675
|
-
return eq(object[
|
|
8368
|
+
var type = typeof index;
|
|
8369
|
+
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
8370
|
+
return eq(object[index], value);
|
|
8676
8371
|
}
|
|
8677
8372
|
return false;
|
|
8678
8373
|
}
|
|
8679
8374
|
function createAssigner(assigner) {
|
|
8680
8375
|
return baseRest(function(object, sources) {
|
|
8681
|
-
var
|
|
8376
|
+
var index = -1, length2 = sources.length, customizer = length2 > 1 ? sources[length2 - 1] : void 0, guard = length2 > 2 ? sources[2] : void 0;
|
|
8682
8377
|
customizer = assigner.length > 3 && typeof customizer == "function" ? (length2--, customizer) : void 0;
|
|
8683
8378
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
8684
8379
|
customizer = length2 < 3 ? void 0 : customizer;
|
|
8685
8380
|
length2 = 1;
|
|
8686
8381
|
}
|
|
8687
8382
|
object = Object(object);
|
|
8688
|
-
while (++
|
|
8689
|
-
var source = sources[
|
|
8383
|
+
while (++index < length2) {
|
|
8384
|
+
var source = sources[index];
|
|
8690
8385
|
if (source) {
|
|
8691
|
-
assigner(object, source,
|
|
8386
|
+
assigner(object, source, index, customizer);
|
|
8692
8387
|
}
|
|
8693
8388
|
}
|
|
8694
8389
|
return object;
|
|
@@ -8700,9 +8395,9 @@ function isPrototype(value) {
|
|
|
8700
8395
|
return value === proto;
|
|
8701
8396
|
}
|
|
8702
8397
|
function baseTimes(n, iteratee) {
|
|
8703
|
-
var
|
|
8704
|
-
while (++
|
|
8705
|
-
result[
|
|
8398
|
+
var index = -1, result = Array(n);
|
|
8399
|
+
while (++index < n) {
|
|
8400
|
+
result[index] = iteratee(index);
|
|
8706
8401
|
}
|
|
8707
8402
|
return result;
|
|
8708
8403
|
}
|
|
@@ -8866,10 +8561,10 @@ function hashSet(key, value) {
|
|
|
8866
8561
|
return this;
|
|
8867
8562
|
}
|
|
8868
8563
|
function Hash(entries) {
|
|
8869
|
-
var
|
|
8564
|
+
var index = -1, length2 = entries == null ? 0 : entries.length;
|
|
8870
8565
|
this.clear();
|
|
8871
|
-
while (++
|
|
8872
|
-
var entry = entries[
|
|
8566
|
+
while (++index < length2) {
|
|
8567
|
+
var entry = entries[index];
|
|
8873
8568
|
this.set(entry[0], entry[1]);
|
|
8874
8569
|
}
|
|
8875
8570
|
}
|
|
@@ -8894,41 +8589,41 @@ function assocIndexOf(array, key) {
|
|
|
8894
8589
|
var arrayProto = Array.prototype;
|
|
8895
8590
|
var splice = arrayProto.splice;
|
|
8896
8591
|
function listCacheDelete(key) {
|
|
8897
|
-
var data = this.__data__,
|
|
8898
|
-
if (
|
|
8592
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
8593
|
+
if (index < 0) {
|
|
8899
8594
|
return false;
|
|
8900
8595
|
}
|
|
8901
8596
|
var lastIndex = data.length - 1;
|
|
8902
|
-
if (
|
|
8597
|
+
if (index == lastIndex) {
|
|
8903
8598
|
data.pop();
|
|
8904
8599
|
} else {
|
|
8905
|
-
splice.call(data,
|
|
8600
|
+
splice.call(data, index, 1);
|
|
8906
8601
|
}
|
|
8907
8602
|
--this.size;
|
|
8908
8603
|
return true;
|
|
8909
8604
|
}
|
|
8910
8605
|
function listCacheGet(key) {
|
|
8911
|
-
var data = this.__data__,
|
|
8912
|
-
return
|
|
8606
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
8607
|
+
return index < 0 ? void 0 : data[index][1];
|
|
8913
8608
|
}
|
|
8914
8609
|
function listCacheHas(key) {
|
|
8915
8610
|
return assocIndexOf(this.__data__, key) > -1;
|
|
8916
8611
|
}
|
|
8917
8612
|
function listCacheSet(key, value) {
|
|
8918
|
-
var data = this.__data__,
|
|
8919
|
-
if (
|
|
8613
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
8614
|
+
if (index < 0) {
|
|
8920
8615
|
++this.size;
|
|
8921
8616
|
data.push([key, value]);
|
|
8922
8617
|
} else {
|
|
8923
|
-
data[
|
|
8618
|
+
data[index][1] = value;
|
|
8924
8619
|
}
|
|
8925
8620
|
return this;
|
|
8926
8621
|
}
|
|
8927
8622
|
function ListCache(entries) {
|
|
8928
|
-
var
|
|
8623
|
+
var index = -1, length2 = entries == null ? 0 : entries.length;
|
|
8929
8624
|
this.clear();
|
|
8930
|
-
while (++
|
|
8931
|
-
var entry = entries[
|
|
8625
|
+
while (++index < length2) {
|
|
8626
|
+
var entry = entries[index];
|
|
8932
8627
|
this.set(entry[0], entry[1]);
|
|
8933
8628
|
}
|
|
8934
8629
|
}
|
|
@@ -8972,10 +8667,10 @@ function mapCacheSet(key, value) {
|
|
|
8972
8667
|
return this;
|
|
8973
8668
|
}
|
|
8974
8669
|
function MapCache(entries) {
|
|
8975
|
-
var
|
|
8670
|
+
var index = -1, length2 = entries == null ? 0 : entries.length;
|
|
8976
8671
|
this.clear();
|
|
8977
|
-
while (++
|
|
8978
|
-
var entry = entries[
|
|
8672
|
+
while (++index < length2) {
|
|
8673
|
+
var entry = entries[index];
|
|
8979
8674
|
this.set(entry[0], entry[1]);
|
|
8980
8675
|
}
|
|
8981
8676
|
}
|
|
@@ -9043,20 +8738,20 @@ function toKey(value) {
|
|
|
9043
8738
|
}
|
|
9044
8739
|
function baseGet(object, path) {
|
|
9045
8740
|
path = castPath(path, object);
|
|
9046
|
-
var
|
|
9047
|
-
while (object != null &&
|
|
9048
|
-
object = object[toKey(path[
|
|
8741
|
+
var index = 0, length2 = path.length;
|
|
8742
|
+
while (object != null && index < length2) {
|
|
8743
|
+
object = object[toKey(path[index++])];
|
|
9049
8744
|
}
|
|
9050
|
-
return
|
|
8745
|
+
return index && index == length2 ? object : void 0;
|
|
9051
8746
|
}
|
|
9052
8747
|
function get(object, path, defaultValue) {
|
|
9053
8748
|
var result = object == null ? void 0 : baseGet(object, path);
|
|
9054
8749
|
return result === void 0 ? defaultValue : result;
|
|
9055
8750
|
}
|
|
9056
8751
|
function arrayPush(array, values) {
|
|
9057
|
-
var
|
|
9058
|
-
while (++
|
|
9059
|
-
array[offset +
|
|
8752
|
+
var index = -1, length2 = values.length, offset = array.length;
|
|
8753
|
+
while (++index < length2) {
|
|
8754
|
+
array[offset + index] = values[index];
|
|
9060
8755
|
}
|
|
9061
8756
|
return array;
|
|
9062
8757
|
}
|
|
@@ -9078,7 +8773,7 @@ function isPlainObject(value) {
|
|
|
9078
8773
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
9079
8774
|
}
|
|
9080
8775
|
function baseSlice(array, start, end) {
|
|
9081
|
-
var
|
|
8776
|
+
var index = -1, length2 = array.length;
|
|
9082
8777
|
if (start < 0) {
|
|
9083
8778
|
start = -start > length2 ? 0 : length2 + start;
|
|
9084
8779
|
}
|
|
@@ -9089,8 +8784,8 @@ function baseSlice(array, start, end) {
|
|
|
9089
8784
|
length2 = start > end ? 0 : end - start >>> 0;
|
|
9090
8785
|
start >>>= 0;
|
|
9091
8786
|
var result = Array(length2);
|
|
9092
|
-
while (++
|
|
9093
|
-
result[
|
|
8787
|
+
while (++index < length2) {
|
|
8788
|
+
result[index] = array[index + start];
|
|
9094
8789
|
}
|
|
9095
8790
|
return result;
|
|
9096
8791
|
}
|
|
@@ -9179,10 +8874,10 @@ function cloneBuffer(buffer, isDeep) {
|
|
|
9179
8874
|
}
|
|
9180
8875
|
}
|
|
9181
8876
|
function arrayFilter(array, predicate) {
|
|
9182
|
-
var
|
|
9183
|
-
while (++
|
|
9184
|
-
var value = array[
|
|
9185
|
-
if (predicate(value,
|
|
8877
|
+
var index = -1, length2 = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
8878
|
+
while (++index < length2) {
|
|
8879
|
+
var value = array[index];
|
|
8880
|
+
if (predicate(value, index, array)) {
|
|
9186
8881
|
result[resIndex++] = value;
|
|
9187
8882
|
}
|
|
9188
8883
|
}
|
|
@@ -9259,18 +8954,18 @@ function setCacheHas(value) {
|
|
|
9259
8954
|
return this.__data__.has(value);
|
|
9260
8955
|
}
|
|
9261
8956
|
function SetCache(values) {
|
|
9262
|
-
var
|
|
8957
|
+
var index = -1, length2 = values == null ? 0 : values.length;
|
|
9263
8958
|
this.__data__ = new MapCache();
|
|
9264
|
-
while (++
|
|
9265
|
-
this.add(values[
|
|
8959
|
+
while (++index < length2) {
|
|
8960
|
+
this.add(values[index]);
|
|
9266
8961
|
}
|
|
9267
8962
|
}
|
|
9268
8963
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
9269
8964
|
SetCache.prototype.has = setCacheHas;
|
|
9270
8965
|
function arraySome(array, predicate) {
|
|
9271
|
-
var
|
|
9272
|
-
while (++
|
|
9273
|
-
if (predicate(array[
|
|
8966
|
+
var index = -1, length2 = array == null ? 0 : array.length;
|
|
8967
|
+
while (++index < length2) {
|
|
8968
|
+
if (predicate(array[index], index, array)) {
|
|
9274
8969
|
return true;
|
|
9275
8970
|
}
|
|
9276
8971
|
}
|
|
@@ -9290,13 +8985,13 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack2) {
|
|
|
9290
8985
|
if (arrStacked && othStacked) {
|
|
9291
8986
|
return arrStacked == other && othStacked == array;
|
|
9292
8987
|
}
|
|
9293
|
-
var
|
|
8988
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
|
|
9294
8989
|
stack2.set(array, other);
|
|
9295
8990
|
stack2.set(other, array);
|
|
9296
|
-
while (++
|
|
9297
|
-
var arrValue = array[
|
|
8991
|
+
while (++index < arrLength) {
|
|
8992
|
+
var arrValue = array[index], othValue = other[index];
|
|
9298
8993
|
if (customizer) {
|
|
9299
|
-
var compared = isPartial ? customizer(othValue, arrValue,
|
|
8994
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack2) : customizer(arrValue, othValue, index, array, other, stack2);
|
|
9300
8995
|
}
|
|
9301
8996
|
if (compared !== void 0) {
|
|
9302
8997
|
if (compared) {
|
|
@@ -9324,16 +9019,16 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack2) {
|
|
|
9324
9019
|
return result;
|
|
9325
9020
|
}
|
|
9326
9021
|
function mapToArray(map2) {
|
|
9327
|
-
var
|
|
9022
|
+
var index = -1, result = Array(map2.size);
|
|
9328
9023
|
map2.forEach(function(value, key) {
|
|
9329
|
-
result[++
|
|
9024
|
+
result[++index] = [key, value];
|
|
9330
9025
|
});
|
|
9331
9026
|
return result;
|
|
9332
9027
|
}
|
|
9333
9028
|
function setToArray(set2) {
|
|
9334
|
-
var
|
|
9029
|
+
var index = -1, result = Array(set2.size);
|
|
9335
9030
|
set2.forEach(function(value) {
|
|
9336
|
-
result[++
|
|
9031
|
+
result[++index] = value;
|
|
9337
9032
|
});
|
|
9338
9033
|
return result;
|
|
9339
9034
|
}
|
|
@@ -9395,9 +9090,9 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack2) {
|
|
|
9395
9090
|
if (objLength != othLength && !isPartial) {
|
|
9396
9091
|
return false;
|
|
9397
9092
|
}
|
|
9398
|
-
var
|
|
9399
|
-
while (
|
|
9400
|
-
var key = objProps[
|
|
9093
|
+
var index = objLength;
|
|
9094
|
+
while (index--) {
|
|
9095
|
+
var key = objProps[index];
|
|
9401
9096
|
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
9402
9097
|
return false;
|
|
9403
9098
|
}
|
|
@@ -9411,8 +9106,8 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack2) {
|
|
|
9411
9106
|
stack2.set(object, other);
|
|
9412
9107
|
stack2.set(other, object);
|
|
9413
9108
|
var skipCtor = isPartial;
|
|
9414
|
-
while (++
|
|
9415
|
-
key = objProps[
|
|
9109
|
+
while (++index < objLength) {
|
|
9110
|
+
key = objProps[index];
|
|
9416
9111
|
var objValue = object[key], othValue = other[key];
|
|
9417
9112
|
if (customizer) {
|
|
9418
9113
|
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack2) : customizer(objValue, othValue, key, object, other, stack2);
|
|
@@ -9478,19 +9173,19 @@ function baseIsEqual(value, other, bitmask, customizer, stack2) {
|
|
|
9478
9173
|
}
|
|
9479
9174
|
var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
9480
9175
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
9481
|
-
var
|
|
9176
|
+
var index = matchData.length, length2 = index;
|
|
9482
9177
|
if (object == null) {
|
|
9483
9178
|
return !length2;
|
|
9484
9179
|
}
|
|
9485
9180
|
object = Object(object);
|
|
9486
|
-
while (
|
|
9487
|
-
var data = matchData[
|
|
9181
|
+
while (index--) {
|
|
9182
|
+
var data = matchData[index];
|
|
9488
9183
|
if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
9489
9184
|
return false;
|
|
9490
9185
|
}
|
|
9491
9186
|
}
|
|
9492
|
-
while (++
|
|
9493
|
-
data = matchData[
|
|
9187
|
+
while (++index < length2) {
|
|
9188
|
+
data = matchData[index];
|
|
9494
9189
|
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
9495
9190
|
if (data[2]) {
|
|
9496
9191
|
if (objValue === void 0 && !(key in object)) {
|
|
@@ -9539,15 +9234,15 @@ function baseHasIn(object, key) {
|
|
|
9539
9234
|
}
|
|
9540
9235
|
function hasPath(object, path, hasFunc) {
|
|
9541
9236
|
path = castPath(path, object);
|
|
9542
|
-
var
|
|
9543
|
-
while (++
|
|
9544
|
-
var key = toKey(path[
|
|
9237
|
+
var index = -1, length2 = path.length, result = false;
|
|
9238
|
+
while (++index < length2) {
|
|
9239
|
+
var key = toKey(path[index]);
|
|
9545
9240
|
if (!(result = object != null && hasFunc(object, key))) {
|
|
9546
9241
|
break;
|
|
9547
9242
|
}
|
|
9548
9243
|
object = object[key];
|
|
9549
9244
|
}
|
|
9550
|
-
if (result || ++
|
|
9245
|
+
if (result || ++index != length2) {
|
|
9551
9246
|
return result;
|
|
9552
9247
|
}
|
|
9553
9248
|
length2 = object == null ? 0 : object.length;
|
|
@@ -9593,9 +9288,9 @@ function baseIteratee(value) {
|
|
|
9593
9288
|
}
|
|
9594
9289
|
function createBaseFor(fromRight) {
|
|
9595
9290
|
return function(object, iteratee, keysFunc) {
|
|
9596
|
-
var
|
|
9291
|
+
var index = -1, iterable = Object(object), props = keysFunc(object), length2 = props.length;
|
|
9597
9292
|
while (length2--) {
|
|
9598
|
-
var key = props[++
|
|
9293
|
+
var key = props[++index];
|
|
9599
9294
|
if (iteratee(iterable[key], key, iterable) === false) {
|
|
9600
9295
|
break;
|
|
9601
9296
|
}
|
|
@@ -9615,9 +9310,9 @@ function createBaseEach(eachFunc, fromRight) {
|
|
|
9615
9310
|
if (!isArrayLike(collection)) {
|
|
9616
9311
|
return eachFunc(collection, iteratee);
|
|
9617
9312
|
}
|
|
9618
|
-
var length2 = collection.length,
|
|
9619
|
-
while (++
|
|
9620
|
-
if (iteratee(iterable[
|
|
9313
|
+
var length2 = collection.length, index = -1, iterable = Object(collection);
|
|
9314
|
+
while (++index < length2) {
|
|
9315
|
+
if (iteratee(iterable[index], index, iterable) === false) {
|
|
9621
9316
|
break;
|
|
9622
9317
|
}
|
|
9623
9318
|
}
|
|
@@ -9706,9 +9401,9 @@ function baseMerge(object, source, srcIndex, customizer, stack2) {
|
|
|
9706
9401
|
}, keysIn);
|
|
9707
9402
|
}
|
|
9708
9403
|
function baseMap(collection, iteratee) {
|
|
9709
|
-
var
|
|
9404
|
+
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
9710
9405
|
baseEach(collection, function(value, key, collection2) {
|
|
9711
|
-
result[++
|
|
9406
|
+
result[++index] = iteratee(value, key, collection2);
|
|
9712
9407
|
});
|
|
9713
9408
|
return result;
|
|
9714
9409
|
}
|
|
@@ -10955,7 +10650,7 @@ const Scrollbar = vue.defineComponent({
|
|
|
10955
10650
|
const {
|
|
10956
10651
|
left,
|
|
10957
10652
|
top,
|
|
10958
|
-
index
|
|
10653
|
+
index,
|
|
10959
10654
|
elSize,
|
|
10960
10655
|
position,
|
|
10961
10656
|
behavior,
|
|
@@ -10967,8 +10662,8 @@ const Scrollbar = vue.defineComponent({
|
|
|
10967
10662
|
}
|
|
10968
10663
|
if (el !== void 0) {
|
|
10969
10664
|
scrollToPosition(0, el.offsetTop, el.offsetHeight, debounce, behavior);
|
|
10970
|
-
} else if (
|
|
10971
|
-
scrollToPosition(0,
|
|
10665
|
+
} else if (index !== void 0 && elSize !== void 0) {
|
|
10666
|
+
scrollToPosition(0, index * elSize, elSize, debounce, behavior);
|
|
10972
10667
|
} else if (position === "bottom") {
|
|
10973
10668
|
scrollToPosition(0, Number.MAX_SAFE_INTEGER, 0, false, behavior);
|
|
10974
10669
|
} else if (position === "top") {
|
|
@@ -11818,13 +11513,13 @@ function getFirstAvailableNode(nodes) {
|
|
|
11818
11513
|
function rawGetNext(node, loop) {
|
|
11819
11514
|
const sibs = node.siblings;
|
|
11820
11515
|
const l = sibs.length;
|
|
11821
|
-
const { index
|
|
11516
|
+
const { index } = node;
|
|
11822
11517
|
if (loop) {
|
|
11823
|
-
return sibs[(
|
|
11518
|
+
return sibs[(index + 1) % l];
|
|
11824
11519
|
} else {
|
|
11825
|
-
if (
|
|
11520
|
+
if (index === sibs.length - 1)
|
|
11826
11521
|
return null;
|
|
11827
|
-
return sibs[
|
|
11522
|
+
return sibs[index + 1];
|
|
11828
11523
|
}
|
|
11829
11524
|
}
|
|
11830
11525
|
function move(fromNode, dir, { loop = false, includeDisabled = false } = {}) {
|
|
@@ -11877,13 +11572,13 @@ function move(fromNode, dir, { loop = false, includeDisabled = false } = {}) {
|
|
|
11877
11572
|
function rawGetPrev(node, loop) {
|
|
11878
11573
|
const sibs = node.siblings;
|
|
11879
11574
|
const l = sibs.length;
|
|
11880
|
-
const { index
|
|
11575
|
+
const { index } = node;
|
|
11881
11576
|
if (loop) {
|
|
11882
|
-
return sibs[(
|
|
11577
|
+
return sibs[(index - 1 + l) % l];
|
|
11883
11578
|
} else {
|
|
11884
|
-
if (
|
|
11579
|
+
if (index === 0)
|
|
11885
11580
|
return null;
|
|
11886
|
-
return sibs[
|
|
11581
|
+
return sibs[index - 1];
|
|
11887
11582
|
}
|
|
11888
11583
|
}
|
|
11889
11584
|
function rawGetParent(node) {
|
|
@@ -11964,7 +11659,7 @@ function contains(parent, child) {
|
|
|
11964
11659
|
}
|
|
11965
11660
|
function createTreeNodes(rawNodes, treeNodeMap, levelTreeNodeMap, nodeProto, getChildren, parent = null, level = 0) {
|
|
11966
11661
|
const treeNodes = [];
|
|
11967
|
-
rawNodes.forEach((rawNode,
|
|
11662
|
+
rawNodes.forEach((rawNode, index) => {
|
|
11968
11663
|
var _a;
|
|
11969
11664
|
if (vue.process$1.env.NODE_ENV !== "production" && isNodeInvalid(rawNode, getChildren)) {
|
|
11970
11665
|
console.error("[treemate]: node", rawNode, "is invalid");
|
|
@@ -11973,9 +11668,9 @@ function createTreeNodes(rawNodes, treeNodeMap, levelTreeNodeMap, nodeProto, get
|
|
|
11973
11668
|
treeNode.rawNode = rawNode;
|
|
11974
11669
|
treeNode.siblings = treeNodes;
|
|
11975
11670
|
treeNode.level = level;
|
|
11976
|
-
treeNode.index =
|
|
11977
|
-
treeNode.isFirstChild =
|
|
11978
|
-
treeNode.isLastChild =
|
|
11671
|
+
treeNode.index = index;
|
|
11672
|
+
treeNode.isFirstChild = index === 0;
|
|
11673
|
+
treeNode.isLastChild = index + 1 === rawNodes.length;
|
|
11979
11674
|
treeNode.parent = parent;
|
|
11980
11675
|
if (!treeNode.ignored) {
|
|
11981
11676
|
const rawChildren = getChildren(rawNode);
|
|
@@ -14238,9 +13933,9 @@ const NDropdownOption = vue.defineComponent({
|
|
|
14238
13933
|
const {
|
|
14239
13934
|
key
|
|
14240
13935
|
} = props.tmNode;
|
|
14241
|
-
const
|
|
14242
|
-
if (
|
|
14243
|
-
return
|
|
13936
|
+
const index = activeKeyPath.findIndex((k) => key === k);
|
|
13937
|
+
if (index === -1) return false;
|
|
13938
|
+
return index < activeKeyPath.length - 1;
|
|
14244
13939
|
}),
|
|
14245
13940
|
active: useMemo(() => {
|
|
14246
13941
|
const {
|
|
@@ -14249,9 +13944,9 @@ const NDropdownOption = vue.defineComponent({
|
|
|
14249
13944
|
const {
|
|
14250
13945
|
key
|
|
14251
13946
|
} = props.tmNode;
|
|
14252
|
-
const
|
|
14253
|
-
if (
|
|
14254
|
-
return
|
|
13947
|
+
const index = activeKeyPath.findIndex((k) => key === k);
|
|
13948
|
+
if (index === -1) return false;
|
|
13949
|
+
return index === activeKeyPath.length - 1;
|
|
14255
13950
|
}),
|
|
14256
13951
|
mergedDisabled: mergedDisabledRef,
|
|
14257
13952
|
renderOption: renderOptionRef,
|
|
@@ -16153,9 +15848,9 @@ const _sfc_main$c = {
|
|
|
16153
15848
|
const showButtons = vue.computed(() => {
|
|
16154
15849
|
return !getConfig.readOnly && isActiveComment.value && !props.comment.resolvedTime && editingCommentId.value !== props.comment.commentId;
|
|
16155
15850
|
});
|
|
16156
|
-
const showSeparator = vue.computed(() => (
|
|
16157
|
-
if (showInputSection.value &&
|
|
16158
|
-
return comments.value.length > 1 &&
|
|
15851
|
+
const showSeparator = vue.computed(() => (index) => {
|
|
15852
|
+
if (showInputSection.value && index === comments.value.length - 1) return true;
|
|
15853
|
+
return comments.value.length > 1 && index !== comments.value.length - 1;
|
|
16159
15854
|
});
|
|
16160
15855
|
const showInputSection = vue.computed(() => {
|
|
16161
15856
|
return !getConfig.readOnly && isActiveComment.value && !props.comment.resolvedTime && editingCommentId.value !== props.comment.commentId;
|
|
@@ -16340,9 +16035,9 @@ const _sfc_main$c = {
|
|
|
16340
16035
|
onSelect: handleInternalExternalSelect
|
|
16341
16036
|
}, null, 8, ["is-disabled", "state"])
|
|
16342
16037
|
])) : vue.createCommentVNode("", true),
|
|
16343
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(comments.value, (comment,
|
|
16038
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(comments.value, (comment, index) => {
|
|
16344
16039
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
16345
|
-
key:
|
|
16040
|
+
key: index,
|
|
16346
16041
|
class: "conversation-item"
|
|
16347
16042
|
}, [
|
|
16348
16043
|
vue.createVNode(CommentHeader, {
|
|
@@ -16395,7 +16090,7 @@ const _sfc_main$c = {
|
|
|
16395
16090
|
])
|
|
16396
16091
|
]))
|
|
16397
16092
|
])) : vue.createCommentVNode("", true),
|
|
16398
|
-
showSeparator.value(
|
|
16093
|
+
showSeparator.value(index) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18)) : vue.createCommentVNode("", true)
|
|
16399
16094
|
]);
|
|
16400
16095
|
}), 128)),
|
|
16401
16096
|
showInputSection.value && !vue.unref(getConfig).readOnly ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
|
|
@@ -17421,7 +17116,7 @@ const _sfc_main = {
|
|
|
17421
17116
|
__name: "SuperDoc",
|
|
17422
17117
|
emits: ["selection-update"],
|
|
17423
17118
|
setup(__props, { emit: __emit }) {
|
|
17424
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17119
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-1MZFKzXW.cjs")));
|
|
17425
17120
|
const superdocStore = useSuperdocStore();
|
|
17426
17121
|
const commentsStore = useCommentsStore();
|
|
17427
17122
|
const {
|
|
@@ -18659,12 +18354,12 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18659
18354
|
async #triggerCollaborationSaves() {
|
|
18660
18355
|
this.#log("🦋 [superdoc] Triggering collaboration saves");
|
|
18661
18356
|
return new Promise((resolve) => {
|
|
18662
|
-
this.superdocStore.documents.forEach((doc,
|
|
18663
|
-
this.#log(`Before reset - Doc ${
|
|
18357
|
+
this.superdocStore.documents.forEach((doc, index) => {
|
|
18358
|
+
this.#log(`Before reset - Doc ${index}: pending = ${this.pendingCollaborationSaves}`);
|
|
18664
18359
|
this.pendingCollaborationSaves = 0;
|
|
18665
18360
|
if (doc.ydoc) {
|
|
18666
18361
|
this.pendingCollaborationSaves++;
|
|
18667
|
-
this.#log(`After increment - Doc ${
|
|
18362
|
+
this.#log(`After increment - Doc ${index}: pending = ${this.pendingCollaborationSaves}`);
|
|
18668
18363
|
const metaMap = doc.ydoc.getMap("meta");
|
|
18669
18364
|
metaMap.observe((event) => {
|
|
18670
18365
|
if (event.changes.keys.has("immediate-save-finished")) {
|