@linto-ai/transcript-ui-webcomponent 0.9.22 → 0.9.23-unstable.202609181642
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/{highlight-BOTcN5V7.js → highlight-BQUzpb6U.js} +2 -2
- package/dist/{highlight-BOTcN5V7.js.map → highlight-BQUzpb6U.js.map} +1 -1
- package/dist/{index-DhBFBHeE.js → index-j-ZNERBE.js} +1204 -909
- package/dist/index-j-ZNERBE.js.map +1 -0
- package/dist/linto-editor.iife.js +1080 -785
- package/dist/linto-editor.iife.js.map +1 -1
- package/dist/linto-editor.js +1 -1
- package/package.json +10 -10
- package/dist/index-DhBFBHeE.js.map +0 -1
|
@@ -114,10 +114,10 @@ function normalizeStyle(value) {
|
|
|
114
114
|
}
|
|
115
115
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
116
116
|
const propertyDelimiterRE = /:([^]+)/;
|
|
117
|
-
const styleCommentRE =
|
|
117
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
118
118
|
function parseStringStyle(cssText) {
|
|
119
119
|
const ret = {};
|
|
120
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
120
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
121
121
|
if (item) {
|
|
122
122
|
const tmp = item.split(propertyDelimiterRE);
|
|
123
123
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -161,22 +161,22 @@ const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
|
161
161
|
function includeBooleanAttr(value) {
|
|
162
162
|
return !!value || value === "";
|
|
163
163
|
}
|
|
164
|
-
function looseCompareArrays(a2, b2) {
|
|
164
|
+
function looseCompareArrays(a2, b2, seen) {
|
|
165
165
|
if (a2.length !== b2.length) return false;
|
|
166
166
|
let equal = true;
|
|
167
167
|
for (let i2 = 0; equal && i2 < a2.length; i2++) {
|
|
168
|
-
equal = looseEqual(a2[i2], b2[i2]);
|
|
168
|
+
equal = looseEqual(a2[i2], b2[i2], seen);
|
|
169
169
|
}
|
|
170
170
|
return equal;
|
|
171
171
|
}
|
|
172
|
-
function looseCompareCollections(a2, b2) {
|
|
172
|
+
function looseCompareCollections(a2, b2, seen) {
|
|
173
173
|
if (a2.size !== b2.size) return false;
|
|
174
174
|
const candidates = Array.from(b2);
|
|
175
175
|
const matched = new Uint8Array(candidates.length);
|
|
176
176
|
for (const item of a2) {
|
|
177
177
|
let index = -1;
|
|
178
178
|
for (let i2 = 0; i2 < candidates.length; i2++) {
|
|
179
|
-
if (!matched[i2] && looseEqual(item, candidates[i2])) {
|
|
179
|
+
if (!matched[i2] && looseEqual(item, candidates[i2], seen)) {
|
|
180
180
|
index = i2;
|
|
181
181
|
break;
|
|
182
182
|
}
|
|
@@ -186,7 +186,47 @@ function looseCompareCollections(a2, b2) {
|
|
|
186
186
|
}
|
|
187
187
|
return true;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function looseCompareObjects(a2, b2, seen) {
|
|
190
|
+
let aValidType = isMap(a2);
|
|
191
|
+
let bValidType = isMap(b2);
|
|
192
|
+
if (aValidType || bValidType) {
|
|
193
|
+
return aValidType && bValidType ? looseCompareCollections(a2, b2, seen) : false;
|
|
194
|
+
}
|
|
195
|
+
aValidType = isSet(a2);
|
|
196
|
+
bValidType = isSet(b2);
|
|
197
|
+
if (aValidType || bValidType) {
|
|
198
|
+
return aValidType && bValidType ? looseCompareCollections(a2, b2, seen) : false;
|
|
199
|
+
}
|
|
200
|
+
const aKeysCount = Object.keys(a2).length;
|
|
201
|
+
const bKeysCount = Object.keys(b2).length;
|
|
202
|
+
if (aKeysCount !== bKeysCount) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
for (const key in a2) {
|
|
206
|
+
const aHasKey = a2.hasOwnProperty(key);
|
|
207
|
+
const bHasKey = b2.hasOwnProperty(key);
|
|
208
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a2[key], b2[key], seen)) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return String(a2) === String(b2);
|
|
213
|
+
}
|
|
214
|
+
function looseCompareNested(a2, b2, seen, compare) {
|
|
215
|
+
if (!seen) {
|
|
216
|
+
seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
217
|
+
}
|
|
218
|
+
const [seenA, seenB] = seen;
|
|
219
|
+
if (seenA.has(a2) || seenB.has(b2)) {
|
|
220
|
+
return seenA.get(a2) === b2 && seenB.get(b2) === a2;
|
|
221
|
+
}
|
|
222
|
+
seenA.set(a2, b2);
|
|
223
|
+
seenB.set(b2, a2);
|
|
224
|
+
const equal = compare(a2, b2, seen);
|
|
225
|
+
seenA.delete(a2);
|
|
226
|
+
seenB.delete(b2);
|
|
227
|
+
return equal;
|
|
228
|
+
}
|
|
229
|
+
function looseEqual(a2, b2, seen) {
|
|
190
230
|
if (a2 === b2) return true;
|
|
191
231
|
let aValidType = isDate(a2);
|
|
192
232
|
let bValidType = isDate(b2);
|
|
@@ -201,7 +241,7 @@ function looseEqual(a2, b2) {
|
|
|
201
241
|
aValidType = isArray(a2);
|
|
202
242
|
bValidType = isArray(b2);
|
|
203
243
|
if (aValidType || bValidType) {
|
|
204
|
-
return aValidType && bValidType ?
|
|
244
|
+
return aValidType && bValidType ? looseCompareNested(a2, b2, seen, looseCompareArrays) : false;
|
|
205
245
|
}
|
|
206
246
|
aValidType = isObject$1(a2);
|
|
207
247
|
bValidType = isObject$1(b2);
|
|
@@ -209,28 +249,7 @@ function looseEqual(a2, b2) {
|
|
|
209
249
|
if (!aValidType || !bValidType) {
|
|
210
250
|
return false;
|
|
211
251
|
}
|
|
212
|
-
|
|
213
|
-
bValidType = isMap(b2);
|
|
214
|
-
if (aValidType || bValidType) {
|
|
215
|
-
return aValidType && bValidType ? looseCompareCollections(a2, b2) : false;
|
|
216
|
-
}
|
|
217
|
-
aValidType = isSet(a2);
|
|
218
|
-
bValidType = isSet(b2);
|
|
219
|
-
if (aValidType || bValidType) {
|
|
220
|
-
return aValidType && bValidType ? looseCompareCollections(a2, b2) : false;
|
|
221
|
-
}
|
|
222
|
-
const aKeysCount = Object.keys(a2).length;
|
|
223
|
-
const bKeysCount = Object.keys(b2).length;
|
|
224
|
-
if (aKeysCount !== bKeysCount) {
|
|
225
|
-
return false;
|
|
226
|
-
}
|
|
227
|
-
for (const key in a2) {
|
|
228
|
-
const aHasKey = a2.hasOwnProperty(key);
|
|
229
|
-
const bHasKey = b2.hasOwnProperty(key);
|
|
230
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a2[key], b2[key])) {
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
252
|
+
return looseCompareNested(a2, b2, seen, looseCompareObjects);
|
|
234
253
|
}
|
|
235
254
|
return String(a2) === String(b2);
|
|
236
255
|
}
|
|
@@ -305,14 +324,14 @@ class EffectScope {
|
|
|
305
324
|
pause() {
|
|
306
325
|
if (this._active) {
|
|
307
326
|
this._isPaused = true;
|
|
308
|
-
let i2,
|
|
327
|
+
let i2, l4;
|
|
309
328
|
if (this.scopes) {
|
|
310
329
|
const scopes = this.scopes.slice();
|
|
311
|
-
for (i2 = 0,
|
|
330
|
+
for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
|
|
312
331
|
scopes[i2].pause();
|
|
313
332
|
}
|
|
314
333
|
}
|
|
315
|
-
for (i2 = 0,
|
|
334
|
+
for (i2 = 0, l4 = this.effects.length; i2 < l4; i2++) {
|
|
316
335
|
this.effects[i2].pause();
|
|
317
336
|
}
|
|
318
337
|
}
|
|
@@ -324,15 +343,15 @@ class EffectScope {
|
|
|
324
343
|
if (this._active) {
|
|
325
344
|
if (this._isPaused) {
|
|
326
345
|
this._isPaused = false;
|
|
327
|
-
let i2,
|
|
346
|
+
let i2, l4;
|
|
328
347
|
if (this.scopes) {
|
|
329
348
|
const scopes = this.scopes.slice();
|
|
330
|
-
for (i2 = 0,
|
|
349
|
+
for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
|
|
331
350
|
scopes[i2].resume();
|
|
332
351
|
}
|
|
333
352
|
}
|
|
334
353
|
const effects = this.effects.slice();
|
|
335
|
-
for (i2 = 0,
|
|
354
|
+
for (i2 = 0, l4 = effects.length; i2 < l4; i2++) {
|
|
336
355
|
effects[i2].resume();
|
|
337
356
|
}
|
|
338
357
|
}
|
|
@@ -383,18 +402,18 @@ class EffectScope {
|
|
|
383
402
|
stop(fromParent) {
|
|
384
403
|
if (this._active) {
|
|
385
404
|
this._active = false;
|
|
386
|
-
let i2,
|
|
387
|
-
for (i2 = 0,
|
|
405
|
+
let i2, l4;
|
|
406
|
+
for (i2 = 0, l4 = this.effects.length; i2 < l4; i2++) {
|
|
388
407
|
this.effects[i2].stop();
|
|
389
408
|
}
|
|
390
409
|
this.effects.length = 0;
|
|
391
|
-
for (i2 = 0,
|
|
410
|
+
for (i2 = 0, l4 = this.cleanups.length; i2 < l4; i2++) {
|
|
392
411
|
this.cleanups[i2]();
|
|
393
412
|
}
|
|
394
413
|
this.cleanups.length = 0;
|
|
395
414
|
if (this.scopes) {
|
|
396
415
|
const scopes = this.scopes.slice();
|
|
397
|
-
for (i2 = 0,
|
|
416
|
+
for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
|
|
398
417
|
scopes[i2].stop(true);
|
|
399
418
|
}
|
|
400
419
|
this.scopes.length = 0;
|
|
@@ -654,8 +673,8 @@ function removeSub(link, soft = false) {
|
|
|
654
673
|
dep.subs = prevSub;
|
|
655
674
|
if (!prevSub && dep.computed) {
|
|
656
675
|
dep.computed.flags &= -5;
|
|
657
|
-
for (let
|
|
658
|
-
removeSub(
|
|
676
|
+
for (let l4 = dep.computed.deps; l4; l4 = l4.nextDep) {
|
|
677
|
+
removeSub(l4, true);
|
|
659
678
|
}
|
|
660
679
|
}
|
|
661
680
|
}
|
|
@@ -778,8 +797,8 @@ function addSub(link) {
|
|
|
778
797
|
const computed2 = link.dep.computed;
|
|
779
798
|
if (computed2 && !link.dep.subs) {
|
|
780
799
|
computed2.flags |= 4 | 16;
|
|
781
|
-
for (let
|
|
782
|
-
addSub(
|
|
800
|
+
for (let l4 = computed2.deps; l4; l4 = l4.nextDep) {
|
|
801
|
+
addSub(l4);
|
|
783
802
|
}
|
|
784
803
|
}
|
|
785
804
|
const currentTail = link.dep.subs;
|
|
@@ -887,7 +906,9 @@ function reactiveReadArray(array) {
|
|
|
887
906
|
const raw = /* @__PURE__ */ toRaw(array);
|
|
888
907
|
if (raw === array) return raw;
|
|
889
908
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
890
|
-
|
|
909
|
+
if (/* @__PURE__ */ isShallow(array)) return raw;
|
|
910
|
+
if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
|
|
911
|
+
return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
891
912
|
}
|
|
892
913
|
function shallowReadArray(arr) {
|
|
893
914
|
track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
@@ -3484,7 +3505,7 @@ function renderList(source, renderItem, cache, index) {
|
|
|
3484
3505
|
source = shallowReadArray(source);
|
|
3485
3506
|
}
|
|
3486
3507
|
ret = new Array(source.length);
|
|
3487
|
-
for (let i2 = 0,
|
|
3508
|
+
for (let i2 = 0, l4 = source.length; i2 < l4; i2++) {
|
|
3488
3509
|
ret[i2] = renderItem(
|
|
3489
3510
|
needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i2])) : toReactive(source[i2]) : source[i2],
|
|
3490
3511
|
i2,
|
|
@@ -3508,7 +3529,7 @@ function renderList(source, renderItem, cache, index) {
|
|
|
3508
3529
|
} else {
|
|
3509
3530
|
const keys = Object.keys(source);
|
|
3510
3531
|
ret = new Array(keys.length);
|
|
3511
|
-
for (let i2 = 0,
|
|
3532
|
+
for (let i2 = 0, l4 = keys.length; i2 < l4; i2++) {
|
|
3512
3533
|
const key = keys[i2];
|
|
3513
3534
|
ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]);
|
|
3514
3535
|
}
|
|
@@ -3521,6 +3542,23 @@ function renderList(source, renderItem, cache, index) {
|
|
|
3521
3542
|
}
|
|
3522
3543
|
return ret;
|
|
3523
3544
|
}
|
|
3545
|
+
function createSlots(slots, dynamicSlots) {
|
|
3546
|
+
for (let i2 = 0; i2 < dynamicSlots.length; i2++) {
|
|
3547
|
+
const slot = dynamicSlots[i2];
|
|
3548
|
+
if (isArray(slot)) {
|
|
3549
|
+
for (let j = 0; j < slot.length; j++) {
|
|
3550
|
+
slots[slot[j].name] = slot[j].fn;
|
|
3551
|
+
}
|
|
3552
|
+
} else if (slot) {
|
|
3553
|
+
slots[slot.name] = slot.key ? (...args) => {
|
|
3554
|
+
const res = slot.fn(...args);
|
|
3555
|
+
if (res) res.key = slot.key;
|
|
3556
|
+
return res;
|
|
3557
|
+
} : slot.fn;
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
return slots;
|
|
3561
|
+
}
|
|
3524
3562
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
3525
3563
|
if (props == null) props = {};
|
|
3526
3564
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
@@ -4973,6 +5011,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4973
5011
|
optimized = false;
|
|
4974
5012
|
n2.dynamicChildren = null;
|
|
4975
5013
|
}
|
|
5014
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
5015
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
5016
|
+
n2.dynamicChildren = [];
|
|
5017
|
+
}
|
|
5018
|
+
n2.dynamicChildren.hasOnce = true;
|
|
5019
|
+
}
|
|
4976
5020
|
const { type, ref: ref3, shapeFlag } = n2;
|
|
4977
5021
|
switch (type) {
|
|
4978
5022
|
case Text:
|
|
@@ -5525,6 +5569,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5525
5569
|
const instance = n2.component = n1.component;
|
|
5526
5570
|
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
5527
5571
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
5572
|
+
n2.el = n1.el;
|
|
5528
5573
|
updateComponentPreRender(instance, n2, optimized);
|
|
5529
5574
|
return;
|
|
5530
5575
|
} else {
|
|
@@ -5586,7 +5631,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5586
5631
|
instance.isMounted = true;
|
|
5587
5632
|
initialVNode = container = anchor = null;
|
|
5588
5633
|
} else {
|
|
5589
|
-
let { next: next2, bu, u:
|
|
5634
|
+
let { next: next2, bu, u: u2, parent, vnode } = instance;
|
|
5590
5635
|
{
|
|
5591
5636
|
const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
|
|
5592
5637
|
if (nonHydratedAsyncRoot) {
|
|
@@ -5636,8 +5681,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5636
5681
|
if (originNext === null) {
|
|
5637
5682
|
updateHOCHostEl(instance, nextTree.el);
|
|
5638
5683
|
}
|
|
5639
|
-
if (
|
|
5640
|
-
queuePostRenderEffect(
|
|
5684
|
+
if (u2) {
|
|
5685
|
+
queuePostRenderEffect(u2, parentSuspense);
|
|
5641
5686
|
}
|
|
5642
5687
|
if (vnodeHook = next2.props && next2.props.onVnodeUpdated) {
|
|
5643
5688
|
queuePostRenderEffect(
|
|
@@ -5792,9 +5837,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5792
5837
|
};
|
|
5793
5838
|
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
5794
5839
|
let i2 = 0;
|
|
5795
|
-
const
|
|
5840
|
+
const l22 = c2.length;
|
|
5796
5841
|
let e1 = c1.length - 1;
|
|
5797
|
-
let e22 =
|
|
5842
|
+
let e22 = l22 - 1;
|
|
5798
5843
|
while (i2 <= e1 && i2 <= e22) {
|
|
5799
5844
|
const n1 = c1[i2];
|
|
5800
5845
|
const n2 = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
|
|
@@ -5839,7 +5884,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5839
5884
|
if (i2 > e1) {
|
|
5840
5885
|
if (i2 <= e22) {
|
|
5841
5886
|
const nextPos = e22 + 1;
|
|
5842
|
-
const anchor = nextPos <
|
|
5887
|
+
const anchor = nextPos < l22 ? c2[nextPos].el : parentAnchor;
|
|
5843
5888
|
while (i2 <= e22) {
|
|
5844
5889
|
patch(
|
|
5845
5890
|
null,
|
|
@@ -5870,7 +5915,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5870
5915
|
keyToNewIndexMap.set(nextChild.key, i2);
|
|
5871
5916
|
}
|
|
5872
5917
|
}
|
|
5873
|
-
let
|
|
5918
|
+
let j;
|
|
5874
5919
|
let patched = 0;
|
|
5875
5920
|
const toBePatched = e22 - s2 + 1;
|
|
5876
5921
|
let moved = false;
|
|
@@ -5887,9 +5932,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5887
5932
|
if (prevChild.key != null) {
|
|
5888
5933
|
newIndex = keyToNewIndexMap.get(prevChild.key);
|
|
5889
5934
|
} else {
|
|
5890
|
-
for (
|
|
5891
|
-
if (newIndexToOldIndexMap[
|
|
5892
|
-
newIndex =
|
|
5935
|
+
for (j = s2; j <= e22; j++) {
|
|
5936
|
+
if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
|
|
5937
|
+
newIndex = j;
|
|
5893
5938
|
break;
|
|
5894
5939
|
}
|
|
5895
5940
|
}
|
|
@@ -5918,12 +5963,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5918
5963
|
}
|
|
5919
5964
|
}
|
|
5920
5965
|
const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
|
|
5921
|
-
|
|
5966
|
+
j = increasingNewIndexSequence.length - 1;
|
|
5922
5967
|
for (i2 = toBePatched - 1; i2 >= 0; i2--) {
|
|
5923
5968
|
const nextIndex = s2 + i2;
|
|
5924
5969
|
const nextChild = c2[nextIndex];
|
|
5925
5970
|
const anchorVNode = c2[nextIndex + 1];
|
|
5926
|
-
const anchor = nextIndex + 1 <
|
|
5971
|
+
const anchor = nextIndex + 1 < l22 ? (
|
|
5927
5972
|
// #13559, #14173 fallback to el placeholder for unresolved async component
|
|
5928
5973
|
anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
|
|
5929
5974
|
) : parentAnchor;
|
|
@@ -5940,10 +5985,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5940
5985
|
optimized
|
|
5941
5986
|
);
|
|
5942
5987
|
} else if (moved) {
|
|
5943
|
-
if (
|
|
5988
|
+
if (j < 0 || i2 !== increasingNewIndexSequence[j]) {
|
|
5944
5989
|
move(nextChild, container, anchor, 2);
|
|
5945
5990
|
} else {
|
|
5946
|
-
|
|
5991
|
+
j--;
|
|
5947
5992
|
}
|
|
5948
5993
|
}
|
|
5949
5994
|
}
|
|
@@ -6034,7 +6079,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6034
6079
|
cacheIndex,
|
|
6035
6080
|
memo
|
|
6036
6081
|
} = vnode;
|
|
6037
|
-
if (patchFlag === -2) {
|
|
6082
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
6038
6083
|
optimized = false;
|
|
6039
6084
|
}
|
|
6040
6085
|
if (ref3 != null) {
|
|
@@ -6042,7 +6087,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6042
6087
|
setRef(ref3, null, parentSuspense, vnode, true);
|
|
6043
6088
|
resetTracking();
|
|
6044
6089
|
}
|
|
6045
|
-
if (cacheIndex != null) {
|
|
6090
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
6046
6091
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
6047
6092
|
}
|
|
6048
6093
|
if (shapeFlag & 256) {
|
|
@@ -6115,6 +6160,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6115
6160
|
}
|
|
6116
6161
|
if (type === Static) {
|
|
6117
6162
|
removeStaticNode(vnode);
|
|
6163
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6164
|
+
transition.afterLeave();
|
|
6165
|
+
}
|
|
6118
6166
|
return;
|
|
6119
6167
|
}
|
|
6120
6168
|
const performRemove = () => {
|
|
@@ -6155,6 +6203,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6155
6203
|
if (job) {
|
|
6156
6204
|
job.flags |= 8;
|
|
6157
6205
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6206
|
+
} else if (instance.vnode.el && subTree) {
|
|
6207
|
+
subTree.transition = instance.vnode.transition;
|
|
6208
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6158
6209
|
}
|
|
6159
6210
|
if (um) {
|
|
6160
6211
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -6270,39 +6321,39 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
6270
6321
|
function getSequence(arr) {
|
|
6271
6322
|
const p2 = arr.slice();
|
|
6272
6323
|
const result = [0];
|
|
6273
|
-
let i2,
|
|
6324
|
+
let i2, j, u2, v2, c2;
|
|
6274
6325
|
const len = arr.length;
|
|
6275
6326
|
for (i2 = 0; i2 < len; i2++) {
|
|
6276
6327
|
const arrI = arr[i2];
|
|
6277
6328
|
if (arrI !== 0) {
|
|
6278
|
-
|
|
6279
|
-
if (arr[
|
|
6280
|
-
p2[i2] =
|
|
6329
|
+
j = result[result.length - 1];
|
|
6330
|
+
if (arr[j] < arrI) {
|
|
6331
|
+
p2[i2] = j;
|
|
6281
6332
|
result.push(i2);
|
|
6282
6333
|
continue;
|
|
6283
6334
|
}
|
|
6284
|
-
|
|
6335
|
+
u2 = 0;
|
|
6285
6336
|
v2 = result.length - 1;
|
|
6286
|
-
while (
|
|
6287
|
-
c2 =
|
|
6337
|
+
while (u2 < v2) {
|
|
6338
|
+
c2 = u2 + v2 >> 1;
|
|
6288
6339
|
if (arr[result[c2]] < arrI) {
|
|
6289
|
-
|
|
6340
|
+
u2 = c2 + 1;
|
|
6290
6341
|
} else {
|
|
6291
6342
|
v2 = c2;
|
|
6292
6343
|
}
|
|
6293
6344
|
}
|
|
6294
|
-
if (arrI < arr[result[
|
|
6295
|
-
if (
|
|
6296
|
-
p2[i2] = result[
|
|
6345
|
+
if (arrI < arr[result[u2]]) {
|
|
6346
|
+
if (u2 > 0) {
|
|
6347
|
+
p2[i2] = result[u2 - 1];
|
|
6297
6348
|
}
|
|
6298
|
-
result[
|
|
6349
|
+
result[u2] = i2;
|
|
6299
6350
|
}
|
|
6300
6351
|
}
|
|
6301
6352
|
}
|
|
6302
|
-
|
|
6303
|
-
v2 = result[
|
|
6304
|
-
while (
|
|
6305
|
-
result[
|
|
6353
|
+
u2 = result.length;
|
|
6354
|
+
v2 = result[u2 - 1];
|
|
6355
|
+
while (u2-- > 0) {
|
|
6356
|
+
result[u2] = v2;
|
|
6306
6357
|
v2 = p2[v2];
|
|
6307
6358
|
}
|
|
6308
6359
|
return result;
|
|
@@ -6568,7 +6619,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
6568
6619
|
el: vnode.el,
|
|
6569
6620
|
anchor: vnode.anchor,
|
|
6570
6621
|
ctx: vnode.ctx,
|
|
6571
|
-
ce: vnode.ce
|
|
6622
|
+
ce: vnode.ce,
|
|
6623
|
+
cacheIndex: vnode.cacheIndex
|
|
6572
6624
|
};
|
|
6573
6625
|
if (transition && cloneTransition) {
|
|
6574
6626
|
setTransitionHooks(
|
|
@@ -6982,8 +7034,8 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
6982
7034
|
function h$2(type, propsOrChildren, children) {
|
|
6983
7035
|
try {
|
|
6984
7036
|
setBlockTracking(-1);
|
|
6985
|
-
const
|
|
6986
|
-
if (
|
|
7037
|
+
const l4 = arguments.length;
|
|
7038
|
+
if (l4 === 2) {
|
|
6987
7039
|
if (isObject$1(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
6988
7040
|
if (isVNode(propsOrChildren)) {
|
|
6989
7041
|
return createVNode(type, null, [propsOrChildren]);
|
|
@@ -6993,9 +7045,9 @@ function h$2(type, propsOrChildren, children) {
|
|
|
6993
7045
|
return createVNode(type, null, propsOrChildren);
|
|
6994
7046
|
}
|
|
6995
7047
|
} else {
|
|
6996
|
-
if (
|
|
7048
|
+
if (l4 > 3) {
|
|
6997
7049
|
children = Array.prototype.slice.call(arguments, 2);
|
|
6998
|
-
} else if (
|
|
7050
|
+
} else if (l4 === 3 && isVNode(children)) {
|
|
6999
7051
|
children = [children];
|
|
7000
7052
|
}
|
|
7001
7053
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -7029,7 +7081,7 @@ function isMemoSame(cached, memo) {
|
|
|
7029
7081
|
}
|
|
7030
7082
|
return true;
|
|
7031
7083
|
}
|
|
7032
|
-
const version = "3.5.
|
|
7084
|
+
const version = "3.5.43";
|
|
7033
7085
|
let policy = void 0;
|
|
7034
7086
|
const tt$1 = typeof window !== "undefined" && window.trustedTypes;
|
|
7035
7087
|
if (tt$1) {
|
|
@@ -8414,7 +8466,7 @@ function setSelected(el, value) {
|
|
|
8414
8466
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
8415
8467
|
return;
|
|
8416
8468
|
}
|
|
8417
|
-
for (let i2 = 0,
|
|
8469
|
+
for (let i2 = 0, l4 = el.options.length; i2 < l4; i2++) {
|
|
8418
8470
|
const option = el.options[i2];
|
|
8419
8471
|
const optionValue = getValue(option);
|
|
8420
8472
|
if (isMultiple) {
|
|
@@ -8527,7 +8579,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
8527
8579
|
}
|
|
8528
8580
|
const eventKey = hyphenate(event.key);
|
|
8529
8581
|
if (modifiers.some(
|
|
8530
|
-
(
|
|
8582
|
+
(k) => k === eventKey || keyNames[k] === eventKey
|
|
8531
8583
|
)) {
|
|
8532
8584
|
return fn(event);
|
|
8533
8585
|
}
|
|
@@ -9177,7 +9229,7 @@ function renderWaveform(channels, ctx) {
|
|
|
9177
9229
|
const start = Math.floor(i2 * scale);
|
|
9178
9230
|
const end = Math.max(start + 1, Math.floor((i2 + step * 2) * scale));
|
|
9179
9231
|
let sum = 0;
|
|
9180
|
-
for (let
|
|
9232
|
+
for (let j = start; j < end; j++) sum += Math.abs(channel[j] ?? 0);
|
|
9181
9233
|
const value = sum / (end - start);
|
|
9182
9234
|
let x2 = i2;
|
|
9183
9235
|
let y3 = value * (height / 2);
|
|
@@ -9514,8 +9566,8 @@ function useCore() {
|
|
|
9514
9566
|
}
|
|
9515
9567
|
return core;
|
|
9516
9568
|
}
|
|
9517
|
-
const _hoisted_1$
|
|
9518
|
-
const _sfc_main$
|
|
9569
|
+
const _hoisted_1$I = ["aria-label"];
|
|
9570
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
9519
9571
|
__name: "Badge",
|
|
9520
9572
|
props: {
|
|
9521
9573
|
ariaLabel: { type: String }
|
|
@@ -9527,11 +9579,11 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
9527
9579
|
"aria-label": __props.ariaLabel
|
|
9528
9580
|
}, [
|
|
9529
9581
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
9530
|
-
], 8, _hoisted_1$
|
|
9582
|
+
], 8, _hoisted_1$I);
|
|
9531
9583
|
};
|
|
9532
9584
|
}
|
|
9533
9585
|
});
|
|
9534
|
-
const _style_0$
|
|
9586
|
+
const _style_0$H = "\n.editor-badge[data-v-392808cc] {\n display: inline-flex;\n align-items: center;\n padding: 2px var(--spacing-sm);\n font-size: var(--font-size-xs);\n font-weight: 500;\n color: var(--color-text-muted);\n background-color: var(--color-surface);\n border: 1px solid var(--color-border-light);\n border-radius: var(--radius-sm);\n white-space: nowrap;\n}\n";
|
|
9535
9587
|
const _export_sfc = (sfc, props) => {
|
|
9536
9588
|
const target = sfc.__vccOpts || sfc;
|
|
9537
9589
|
for (const [key, val] of props) {
|
|
@@ -9539,7 +9591,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
9539
9591
|
}
|
|
9540
9592
|
return target;
|
|
9541
9593
|
};
|
|
9542
|
-
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
9594
|
+
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["styles", [_style_0$H]], ["__scopeId", "data-v-392808cc"]]);
|
|
9543
9595
|
const hasA11yProp = (props) => {
|
|
9544
9596
|
for (const prop in props) {
|
|
9545
9597
|
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
@@ -10002,12 +10054,12 @@ const ICON_SIZES = {
|
|
|
10002
10054
|
md: 20,
|
|
10003
10055
|
lg: 24
|
|
10004
10056
|
};
|
|
10005
|
-
const _hoisted_1$
|
|
10057
|
+
const _hoisted_1$H = {
|
|
10006
10058
|
key: 1,
|
|
10007
10059
|
class: "editor-icon editor-icon--missing",
|
|
10008
10060
|
"aria-hidden": "true"
|
|
10009
10061
|
};
|
|
10010
|
-
const _sfc_main$
|
|
10062
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
10011
10063
|
__name: "EditorIcon",
|
|
10012
10064
|
props: {
|
|
10013
10065
|
name: { type: String },
|
|
@@ -10026,18 +10078,18 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
10026
10078
|
style: normalizeStyle(style.value),
|
|
10027
10079
|
class: normalizeClass(["editor-icon", { "editor-icon--spin": __props.spin }]),
|
|
10028
10080
|
"aria-hidden": "true"
|
|
10029
|
-
}, null, 8, ["style", "class"])) : (openBlock(), createElementBlock("span", _hoisted_1$
|
|
10081
|
+
}, null, 8, ["style", "class"])) : (openBlock(), createElementBlock("span", _hoisted_1$H, "?"));
|
|
10030
10082
|
};
|
|
10031
10083
|
}
|
|
10032
10084
|
});
|
|
10033
|
-
const _style_0$
|
|
10034
|
-
const EditorIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10035
|
-
const _hoisted_1$
|
|
10036
|
-
const _hoisted_2$
|
|
10085
|
+
const _style_0$G = "\n.editor-icon[data-v-bdd2a2df] {\n flex-shrink: 0;\n}\n.editor-icon--missing[data-v-bdd2a2df] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n opacity: 0.5;\n font-size: 1em;\n line-height: 1;\n}\n.editor-icon--spin[data-v-bdd2a2df] {\n animation: editor-icon-spin-bdd2a2df 1s linear infinite;\n}\n@keyframes editor-icon-spin-bdd2a2df {\nto {\n transform: rotate(360deg);\n}\n}\n@media (prefers-reduced-motion: reduce) {\n.editor-icon--spin[data-v-bdd2a2df] {\n animation: none;\n}\n}\n";
|
|
10086
|
+
const EditorIcon = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["styles", [_style_0$G]], ["__scopeId", "data-v-bdd2a2df"]]);
|
|
10087
|
+
const _hoisted_1$G = ["type", "disabled", "aria-disabled", "aria-label"];
|
|
10088
|
+
const _hoisted_2$w = {
|
|
10037
10089
|
key: 3,
|
|
10038
10090
|
class: "editor-btn__label"
|
|
10039
10091
|
};
|
|
10040
|
-
const _sfc_main$
|
|
10092
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
10041
10093
|
__name: "Button",
|
|
10042
10094
|
props: {
|
|
10043
10095
|
label: { type: String },
|
|
@@ -10090,7 +10142,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
10090
10142
|
name: __props.icon,
|
|
10091
10143
|
size: iconSize.value
|
|
10092
10144
|
}, null, 8, ["name", "size"])) : _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", {}, void 0, true, 2) : createCommentVNode("", true),
|
|
10093
|
-
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
10145
|
+
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2$w, [
|
|
10094
10146
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
10095
10147
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
10096
10148
|
], true)
|
|
@@ -10100,13 +10152,13 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
10100
10152
|
name: __props.iconRight,
|
|
10101
10153
|
size: iconSize.value
|
|
10102
10154
|
}, null, 8, ["name", "size"])) : _ctx.$slots["icon-right"] ? renderSlot(_ctx.$slots, "icon-right", {}, void 0, true, 5) : createCommentVNode("", true)
|
|
10103
|
-
], 10, _hoisted_1$
|
|
10155
|
+
], 10, _hoisted_1$G);
|
|
10104
10156
|
};
|
|
10105
10157
|
}
|
|
10106
10158
|
});
|
|
10107
|
-
const _style_0$
|
|
10108
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10109
|
-
const _sfc_main$
|
|
10159
|
+
const _style_0$F = "\n.transcript-ui-root .editor-btn[data-v-050bd95b] {\n /* Default tokens — overridden by variant/intent/size modifiers */\n --btn-bg: transparent;\n --btn-text: var(--color-text-secondary);\n --btn-border-color: var(--color-border);\n --btn-hover-bg: var(--color-surface-hover);\n --btn-hover-text: var(--color-text-primary);\n --btn-padding-y: 0;\n --btn-padding-x: var(--spacing-sm);\n --btn-font-size: var(--font-size-xs);\n --btn-height: 32px;\n --btn-gap: var(--spacing-xs);\n\n /* Same reset as every other custom button in this codebase (see\n EditableText, EditorCheckbox, Tabs, SpeakerPopover, TranscriptionTurn):\n `all: unset` clears the UA button chrome (margin, appearance, inherited\n font mismatches on Safari/Firefox, the Firefox ::-moz-focus-inner\n padding) that the previous per-property overrides below left in place.\n Every property the button actually needs is re-declared after it. */\n all: unset;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--btn-gap);\n height: var(--btn-height);\n padding: var(--btn-padding-y) var(--btn-padding-x);\n font-family: var(--font-family);\n font-size: var(--btn-font-size);\n font-weight: 500;\n line-height: 1;\n color: var(--btn-text);\n background-color: var(--btn-bg);\n border: 1px solid var(--btn-border-color);\n border-radius: var(--radius-sm);\n cursor: pointer;\n white-space: nowrap;\n transition:\n background-color var(--transition-duration),\n color var(--transition-duration),\n border-color var(--transition-duration);\n}\n.transcript-ui-root .editor-btn[data-v-050bd95b]:hover:not(:disabled) {\n background-color: var(--btn-hover-bg);\n color: var(--btn-hover-text);\n}\n.transcript-ui-root .editor-btn[data-v-050bd95b]:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n/* Note: this rule is repeated lower in the file (after variants) to win the\n cascade on the variant CSS vars. Keep this lightweight version for the\n cursor and hover suppression. */\n.transcript-ui-root .editor-btn[data-v-050bd95b]:disabled {\n cursor: not-allowed;\n}\n.transcript-ui-root .editor-btn[data-v-050bd95b]:disabled:hover {\n background-color: var(--btn-bg);\n color: var(--btn-text);\n}\n.editor-btn__label[data-v-050bd95b] {\n /* //overflow: hidden;\n text-overflow: ellipsis; */\n text-overflow: ellipsis;\n text-box: cap alphabetic;\n}\n\n/* Sizes.\n .transcript-ui-root prefix here too — not because Nextcloud could ever\n target --btn-* directly, but because these vars are read by the BASE\n .editor-btn rule (also prefixed, so specificity (0,3,0)): if a variant\n rule sets the same custom property at a lower specificity (0,2,0), the\n base rule's default wins over it regardless of source order, silently\n breaking every variant. All rules touching --btn-* must stay at the same\n specificity as the base rule. */\n.transcript-ui-root .editor-btn--sm[data-v-050bd95b] {\n /* defaults */\n}\n.transcript-ui-root .editor-btn--md[data-v-050bd95b] {\n --btn-padding-y: 0;\n --btn-padding-x: var(--spacing-md);\n --btn-font-size: var(--font-size-sm);\n --btn-height: 40px;\n}\n.transcript-ui-root .editor-btn--lg[data-v-050bd95b] {\n --btn-padding-y: 0;\n --btn-padding-x: var(--spacing-md);\n --btn-font-size: var(--font-size-base);\n --btn-height: 44px;\n}\n\n/* Icon-only: square */\n.transcript-ui-root .editor-btn--icon-only[data-v-050bd95b] {\n width: var(--btn-height);\n padding: 0;\n}\n.transcript-ui-root .editor-btn--block[data-v-050bd95b] {\n display: flex;\n width: 100%;\n}\n\n/* Variants — default intent */\n.transcript-ui-root .editor-btn--primary[data-v-050bd95b] {\n --btn-bg: var(--color-primary);\n --btn-text: var(--color-white);\n --btn-border-color: var(--color-primary);\n --btn-hover-bg: var(--color-primary-hover);\n --btn-hover-text: var(--color-white);\n}\n.transcript-ui-root .editor-btn--secondary[data-v-050bd95b] {\n --btn-bg: transparent;\n --btn-text: var(--color-primary);\n --btn-border-color: var(--color-primary);\n --btn-hover-bg: var(--color-primary);\n --btn-hover-text: var(--color-white);\n}\n.transcript-ui-root .editor-btn--tertiary[data-v-050bd95b] {\n --btn-bg: transparent;\n --btn-text: var(--color-text-primary);\n --btn-border-color: var(--color-border);\n --btn-hover-bg: var(--color-surface-hover);\n --btn-hover-text: var(--color-text-primary);\n}\n.transcript-ui-root .editor-btn--transparent[data-v-050bd95b] {\n --btn-bg: transparent;\n --btn-text: var(--color-text-secondary);\n --btn-border-color: transparent;\n --btn-hover-bg: var(--color-surface-hover);\n --btn-hover-text: var(--color-text-primary);\n}\n\n/* Literal theme inversion: background = the theme's text color and\n vice-versa — high contrast in both light and dark themes without\n borrowing the primary color's semantics. */\n.transcript-ui-root .editor-btn--inverse[data-v-050bd95b] {\n --btn-bg: var(--color-text-primary);\n --btn-text: var(--color-background);\n --btn-border-color: transparent;\n --btn-hover-bg: var(--color-text-secondary);\n --btn-hover-text: var(--color-background);\n}\n\n/* Destructive intent overrides */\n.transcript-ui-root .editor-btn--destructive.editor-btn--primary[data-v-050bd95b] {\n --btn-bg: var(--color-danger);\n --btn-text: var(--color-white);\n --btn-border-color: var(--color-danger);\n --btn-hover-bg: var(--color-danger-hover);\n --btn-hover-text: var(--color-white);\n}\n.transcript-ui-root .editor-btn--destructive.editor-btn--secondary[data-v-050bd95b] {\n --btn-bg: transparent;\n --btn-text: var(--color-danger);\n --btn-border-color: var(--color-danger);\n --btn-hover-bg: var(--color-danger);\n --btn-hover-text: var(--color-white);\n}\n.transcript-ui-root .editor-btn--destructive.editor-btn--tertiary[data-v-050bd95b],\n.transcript-ui-root .editor-btn--destructive.editor-btn--transparent[data-v-050bd95b] {\n --btn-text: var(--color-danger);\n --btn-hover-bg: var(--color-danger-soft);\n --btn-hover-text: var(--color-danger);\n}\n\n/* Disabled: gray-out regardless of variant. Placed after the variants so the\n CSS var overrides win the cascade (same specificity, last declaration). */\n.transcript-ui-root .editor-btn[data-v-050bd95b]:disabled {\n --btn-bg: var(--color-surface);\n --btn-text: var(--color-text-muted);\n --btn-border-color: var(--color-border);\n --btn-hover-bg: var(--color-surface);\n --btn-hover-text: var(--color-text-muted);\n}\n\n/* The transparent variant has no chrome when enabled — disabling it must not\n ADD a box; the muted text alone carries the disabled signal. */\n.transcript-ui-root .editor-btn--transparent[data-v-050bd95b]:disabled {\n --btn-bg: transparent;\n --btn-border-color: transparent;\n --btn-hover-bg: transparent;\n}\n\n/* Inverse stays a filled, borderless chip when disabled — dimmed, but the\n silhouette must not change. */\n.transcript-ui-root .editor-btn--inverse[data-v-050bd95b]:disabled {\n --btn-bg: var(--color-surface-hover);\n --btn-border-color: transparent;\n --btn-hover-bg: var(--color-surface-hover);\n}\n";
|
|
10160
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["styles", [_style_0$F]], ["__scopeId", "data-v-050bd95b"]]);
|
|
10161
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
10110
10162
|
__name: "CopyButton",
|
|
10111
10163
|
props: {
|
|
10112
10164
|
icon: { default: "copy", type: String },
|
|
@@ -10174,8 +10226,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
10174
10226
|
};
|
|
10175
10227
|
}
|
|
10176
10228
|
});
|
|
10177
|
-
const _style_0$
|
|
10178
|
-
const CopyButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10229
|
+
const _style_0$E = "\n.copy-btn--copied[data-v-5b088678] {\n color: var(--color-success, #2e7d32);\n}\n.copy-icon-enter-active[data-v-5b088678],\n.copy-icon-leave-active[data-v-5b088678] {\n transition:\n opacity var(--transition-duration) ease,\n scale var(--transition-duration) ease;\n}\n.copy-icon-enter-from[data-v-5b088678] {\n opacity: 0;\n scale: 0.6;\n}\n.copy-icon-leave-to[data-v-5b088678] {\n opacity: 0;\n scale: 0.6;\n}\n@media (prefers-reduced-motion: reduce) {\n.copy-icon-enter-active[data-v-5b088678],\n .copy-icon-leave-active[data-v-5b088678] {\n transition: none;\n}\n}\n";
|
|
10230
|
+
const CopyButton = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["styles", [_style_0$E]], ["__scopeId", "data-v-5b088678"]]);
|
|
10179
10231
|
const fr = {
|
|
10180
10232
|
"editor.loading": "Chargement…",
|
|
10181
10233
|
"editor.loadError": "Erreur de chargement",
|
|
@@ -10492,10 +10544,10 @@ function useI18n() {
|
|
|
10492
10544
|
locale: fallbackLocale
|
|
10493
10545
|
};
|
|
10494
10546
|
}
|
|
10495
|
-
const _hoisted_1$
|
|
10496
|
-
const _hoisted_2$
|
|
10497
|
-
const _hoisted_3$
|
|
10498
|
-
const _sfc_main$
|
|
10547
|
+
const _hoisted_1$F = { class: "code-block" };
|
|
10548
|
+
const _hoisted_2$v = ["innerHTML"];
|
|
10549
|
+
const _hoisted_3$o = { key: 1 };
|
|
10550
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
10499
10551
|
__name: "CodeBlock",
|
|
10500
10552
|
props: {
|
|
10501
10553
|
code: { type: String },
|
|
@@ -10518,13 +10570,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
10518
10570
|
highlighted.value = null;
|
|
10519
10571
|
return;
|
|
10520
10572
|
}
|
|
10521
|
-
const { highlightCode } = await import("./highlight-
|
|
10573
|
+
const { highlightCode } = await import("./highlight-BQUzpb6U.js");
|
|
10522
10574
|
if (run === seq) highlighted.value = highlightCode(code, lang ?? "");
|
|
10523
10575
|
},
|
|
10524
10576
|
{ immediate: true }
|
|
10525
10577
|
);
|
|
10526
10578
|
return (_ctx, _cache) => {
|
|
10527
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10579
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
10528
10580
|
!__props.streaming ? (openBlock(), createBlock(CopyButton, {
|
|
10529
10581
|
key: 0,
|
|
10530
10582
|
class: "code-block__copy",
|
|
@@ -10537,13 +10589,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
10537
10589
|
highlighted.value ? (openBlock(), createElementBlock("code", {
|
|
10538
10590
|
key: 0,
|
|
10539
10591
|
innerHTML: highlighted.value
|
|
10540
|
-
}, null, 8, _hoisted_2$
|
|
10592
|
+
}, null, 8, _hoisted_2$v)) : (openBlock(), createElementBlock("code", _hoisted_3$o, toDisplayString(__props.code), 1))
|
|
10541
10593
|
])
|
|
10542
10594
|
]);
|
|
10543
10595
|
};
|
|
10544
10596
|
}
|
|
10545
10597
|
});
|
|
10546
|
-
const _style_0$
|
|
10598
|
+
const _style_0$D = "\n.code-block[data-v-ad87d1e4] {\n position: relative;\n}\n.code-block__copy[data-v-ad87d1e4] {\n position: absolute;\n top: var(--spacing-xs);\n right: var(--spacing-xs);\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n.code-block:hover .code-block__copy[data-v-ad87d1e4],\n.code-block:focus-within .code-block__copy[data-v-ad87d1e4] {\n opacity: 1;\n}\n.code-block pre[data-v-ad87d1e4] {\n margin: var(--spacing-md) 0;\n padding: var(--spacing-md);\n background-color: var(--color-surface);\n border-radius: var(--radius-md);\n overflow-x: auto;\n border: 1px solid var(--color-border);\n}\n.code-block pre code[data-v-ad87d1e4] {\n padding: 0;\n background: none;\n font-family: var(--font-family-mono);\n font-size: 0.9em;\n}\n@media (prefers-reduced-motion: reduce) {\n.code-block__copy[data-v-ad87d1e4] {\n transition: none;\n}\n}\n";
|
|
10547
10599
|
const _style_1 = `/**
|
|
10548
10600
|
* prism.js default theme for JavaScript, CSS and HTML
|
|
10549
10601
|
* Based on dabblet (http://dabblet.com)
|
|
@@ -10669,20 +10721,20 @@ pre[class*="language-"] {
|
|
|
10669
10721
|
cursor: help;
|
|
10670
10722
|
}
|
|
10671
10723
|
`;
|
|
10672
|
-
const CodeBlock = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10673
|
-
const _hoisted_1$
|
|
10724
|
+
const CodeBlock = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["styles", [_style_0$D, _style_1]], ["__scopeId", "data-v-ad87d1e4"]]);
|
|
10725
|
+
const _hoisted_1$E = {
|
|
10674
10726
|
key: 0,
|
|
10675
10727
|
class: "form-field__header"
|
|
10676
10728
|
};
|
|
10677
|
-
const _hoisted_2$
|
|
10678
|
-
const _hoisted_3$
|
|
10729
|
+
const _hoisted_2$u = ["for"];
|
|
10730
|
+
const _hoisted_3$n = {
|
|
10679
10731
|
key: 0,
|
|
10680
10732
|
class: "form-field__required",
|
|
10681
10733
|
"aria-hidden": "true"
|
|
10682
10734
|
};
|
|
10683
|
-
const _hoisted_4$
|
|
10684
|
-
const _hoisted_5$
|
|
10685
|
-
const _hoisted_6$
|
|
10735
|
+
const _hoisted_4$e = { class: "form-field__input-wrapper" };
|
|
10736
|
+
const _hoisted_5$d = ["id", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"];
|
|
10737
|
+
const _hoisted_6$b = ["value"];
|
|
10686
10738
|
const _hoisted_7$5 = ["type", "id", "disabled", "readonly", "placeholder", "autocomplete", "required", "aria-required", "aria-invalid", "aria-describedby"];
|
|
10687
10739
|
const _hoisted_8$3 = {
|
|
10688
10740
|
key: 3,
|
|
@@ -10695,7 +10747,7 @@ const _hoisted_9$3 = {
|
|
|
10695
10747
|
};
|
|
10696
10748
|
const _hoisted_10$3 = ["id"];
|
|
10697
10749
|
const _hoisted_11$2 = { class: "form-field__error" };
|
|
10698
|
-
const _sfc_main$
|
|
10750
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
10699
10751
|
__name: "FormInput",
|
|
10700
10752
|
props: {
|
|
10701
10753
|
field: { type: Object },
|
|
@@ -10805,17 +10857,17 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
10805
10857
|
return openBlock(), createElementBlock("div", {
|
|
10806
10858
|
class: normalizeClass(rootClasses.value)
|
|
10807
10859
|
}, [
|
|
10808
|
-
__props.field.label ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10860
|
+
__props.field.label ? (openBlock(), createElementBlock("div", _hoisted_1$E, [
|
|
10809
10861
|
createBaseVNode("label", {
|
|
10810
10862
|
class: "form-field__label",
|
|
10811
10863
|
for: id.value
|
|
10812
10864
|
}, [
|
|
10813
10865
|
createTextVNode(toDisplayString(__props.field.label) + " ", 1),
|
|
10814
|
-
isRequired.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
10815
|
-
], 8, _hoisted_2$
|
|
10866
|
+
isRequired.value ? (openBlock(), createElementBlock("span", _hoisted_3$n, "*")) : createCommentVNode("", true)
|
|
10867
|
+
], 8, _hoisted_2$u),
|
|
10816
10868
|
renderSlot(_ctx.$slots, "content-after-label", {}, void 0, true)
|
|
10817
10869
|
])) : createCommentVNode("", true),
|
|
10818
|
-
createBaseVNode("div", _hoisted_4$
|
|
10870
|
+
createBaseVNode("div", _hoisted_4$e, [
|
|
10819
10871
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
10820
10872
|
_ctx.$slots["custom-input"] ? renderSlot(_ctx.$slots, "custom-input", {
|
|
10821
10873
|
id: id.value,
|
|
@@ -10841,9 +10893,9 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
10841
10893
|
return openBlock(), createElementBlock("option", {
|
|
10842
10894
|
key: opt.value,
|
|
10843
10895
|
value: opt.value
|
|
10844
|
-
}, toDisplayString(opt.label), 9, _hoisted_6$
|
|
10896
|
+
}, toDisplayString(opt.label), 9, _hoisted_6$b);
|
|
10845
10897
|
}), 128))
|
|
10846
|
-
], 16, _hoisted_5$
|
|
10898
|
+
], 16, _hoisted_5$d)), [
|
|
10847
10899
|
[vModelSelect, draft.value]
|
|
10848
10900
|
]) : withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
10849
10901
|
key: 2,
|
|
@@ -10902,10 +10954,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
10902
10954
|
};
|
|
10903
10955
|
}
|
|
10904
10956
|
});
|
|
10905
|
-
const _style_0$
|
|
10906
|
-
const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10907
|
-
const _hoisted_1$
|
|
10908
|
-
const _sfc_main$
|
|
10957
|
+
const _style_0$C = "\n/* ── Root ──────────────────────────────────────────────────────────── */\n.form-field[data-v-863d0b18] {\n --field-height: 40px;\n --field-padding-x: var(--spacing-md);\n --field-font-size: var(--font-size-sm);\n\n display: flex;\n flex-direction: column;\n gap: var(--spacing-xs);\n width: 100%;\n}\n.form-field--sm[data-v-863d0b18] {\n --field-height: 32px;\n --field-padding-x: var(--spacing-sm);\n --field-font-size: var(--font-size-xs);\n}\n.form-field--lg[data-v-863d0b18] {\n --field-height: 44px;\n --field-padding-x: var(--spacing-md);\n --field-font-size: var(--font-size-base);\n}\n.form-field--disabled[data-v-863d0b18] {\n opacity: 0.7;\n}\n\n/* ── Header (label row) ────────────────────────────────────────────── */\n.form-field__header[data-v-863d0b18] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-sm);\n}\n.form-field__label[data-v-863d0b18] {\n display: block;\n margin: 0;\n font-size: var(--font-size-sm);\n font-weight: 600;\n line-height: 1.2;\n color: var(--color-text-primary);\n}\n.form-field--error .form-field__label[data-v-863d0b18] {\n color: var(--color-danger);\n}\n.form-field__required[data-v-863d0b18] {\n margin-left: 2px;\n color: var(--color-danger);\n}\n\n/* ── Input wrapper ─────────────────────────────────────────────────── */\n.form-field__input-wrapper[data-v-863d0b18] {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-sm);\n width: 100%;\n}\n\n/* ── Input ─────────────────────────────────────────────────────────── */\n.form-field__input[data-v-863d0b18] {\n flex: 1;\n box-sizing: border-box;\n height: var(--field-height);\n padding: 0 var(--field-padding-x);\n font-family: inherit;\n font-size: var(--field-font-size);\n line-height: 1.4;\n color: var(--color-text-primary);\n background-color: var(--color-background);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n outline: none;\n transition:\n border-color var(--transition-duration),\n box-shadow var(--transition-duration);\n}\n.form-field__input[data-v-863d0b18]::placeholder {\n color: var(--color-text-muted);\n opacity: 1;\n}\n.form-field__input[data-v-863d0b18]:hover:not(:disabled) {\n border-color: var(--color-text-muted);\n}\n.form-field__input[data-v-863d0b18]:focus-visible {\n border-color: var(--color-primary);\n box-shadow: 0 0 0 3px\n color-mix(in srgb, var(--color-primary) 20%, transparent);\n}\n.form-field__input[data-v-863d0b18]:disabled {\n cursor: not-allowed;\n background-color: var(--color-surface);\n color: var(--color-text-muted);\n}\n.form-field__input--fullwidth[data-v-863d0b18] {\n width: 100%;\n max-width: none;\n}\n.form-field__input--select[data-v-863d0b18] {\n cursor: pointer;\n appearance: auto;\n}\n.form-field__input--error[data-v-863d0b18] {\n border-color: var(--color-danger);\n}\n.form-field__input--error[data-v-863d0b18]:focus-visible {\n border-color: var(--color-danger);\n box-shadow: 0 0 0 3px\n color-mix(in srgb, var(--color-danger) 20%, transparent);\n}\n\n/* ── Confirmation actions ──────────────────────────────────────────── */\n.form-field__actions[data-v-863d0b18] {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-xs);\n flex-shrink: 0;\n}\n.form-field__actions--placeholder[data-v-863d0b18] {\n /* Reserve space so showing the buttons doesn't shift layout. */\n width: calc(var(--field-height) * 2 + var(--spacing-xs));\n height: var(--field-height);\n pointer-events: none;\n opacity: 0;\n}\n\n/* ── Info / error ──────────────────────────────────────────────────── */\n.form-field__info[data-v-863d0b18] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n}\n.form-field__error[data-v-863d0b18] {\n margin: 0;\n font-size: var(--font-size-xs);\n line-height: 1.2;\n color: var(--color-danger);\n}\n\n/* ── Inline layout ─────────────────────────────────────────────────── */\n.form-field--inline[data-v-863d0b18] {\n flex-direction: row;\n align-items: center;\n gap: var(--spacing-md);\n}\n.form-field--inline .form-field__header[data-v-863d0b18] {\n flex-shrink: 0;\n min-width: 120px;\n}\n.form-field--inline .form-field__input-wrapper[data-v-863d0b18] {\n flex: 1;\n}\n\n/* ── Reduced motion ────────────────────────────────────────────────── */\n@media (prefers-reduced-motion: reduce) {\n.form-field__input[data-v-863d0b18] {\n transition: none;\n}\n}\n";
|
|
10958
|
+
const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["styles", [_style_0$C]], ["__scopeId", "data-v-863d0b18"]]);
|
|
10959
|
+
const _hoisted_1$D = ["disabled", "aria-label"];
|
|
10960
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
10909
10961
|
__name: "EditableText",
|
|
10910
10962
|
props: {
|
|
10911
10963
|
modelValue: { type: String },
|
|
@@ -10979,12 +11031,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
10979
11031
|
disabled: __props.disabled,
|
|
10980
11032
|
"aria-label": __props.ariaLabel,
|
|
10981
11033
|
onClick: startEdit
|
|
10982
|
-
}, toDisplayString(__props.modelValue || __props.placeholder), 9, _hoisted_1$
|
|
11034
|
+
}, toDisplayString(__props.modelValue || __props.placeholder), 9, _hoisted_1$D));
|
|
10983
11035
|
};
|
|
10984
11036
|
}
|
|
10985
11037
|
});
|
|
10986
|
-
const _style_0$
|
|
10987
|
-
const EditableText = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11038
|
+
const _style_0$B = "\n.transcript-ui-root .editable-text-display[data-v-ff6456c8] {\n all: unset;\n cursor: text;\n text-align: left;\n font: inherit;\n color: inherit;\n line-height: inherit;\n padding: 0;\n border: 1px solid transparent;\n border-radius: var(--radius-sm);\n min-width: 0;\n}\n.transcript-ui-root .editable-text-display[data-v-ff6456c8]:not(:disabled):hover {\n border-color: var(--color-border);\n}\n.transcript-ui-root .editable-text-display[data-v-ff6456c8]:disabled {\n cursor: default;\n}\n";
|
|
11039
|
+
const EditableText = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["styles", [_style_0$B]], ["__scopeId", "data-v-ff6456c8"]]);
|
|
10988
11040
|
function serialize(input) {
|
|
10989
11041
|
if (typeof input === "string") return `'${input}'`;
|
|
10990
11042
|
return new Serializer().serialize(input);
|
|
@@ -12708,11 +12760,11 @@ function focusFirst$1(candidates) {
|
|
|
12708
12760
|
function isPointInPolygon(point, polygon) {
|
|
12709
12761
|
const { x: x2, y: y3 } = point;
|
|
12710
12762
|
let inside = false;
|
|
12711
|
-
for (let i2 = 0,
|
|
12763
|
+
for (let i2 = 0, j = polygon.length - 1; i2 < polygon.length; j = i2++) {
|
|
12712
12764
|
const xi = polygon[i2].x;
|
|
12713
12765
|
const yi = polygon[i2].y;
|
|
12714
|
-
const xj = polygon[
|
|
12715
|
-
const yj = polygon[
|
|
12766
|
+
const xj = polygon[j].x;
|
|
12767
|
+
const yj = polygon[j].y;
|
|
12716
12768
|
const intersect = yi > y3 !== yj > y3 && x2 < (xj - xi) * (y3 - yi) / (yj - yi) + xi;
|
|
12717
12769
|
if (intersect) inside = !inside;
|
|
12718
12770
|
}
|
|
@@ -15401,7 +15453,7 @@ function useFloating(reference, floating, options) {
|
|
|
15401
15453
|
update
|
|
15402
15454
|
};
|
|
15403
15455
|
}
|
|
15404
|
-
const _hoisted_1$
|
|
15456
|
+
const _hoisted_1$C = ["dir"];
|
|
15405
15457
|
const PopperContentPropsDefaultValue = {
|
|
15406
15458
|
side: "bottom",
|
|
15407
15459
|
sideOffset: 0,
|
|
@@ -15694,7 +15746,7 @@ var PopperContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
15694
15746
|
"data-align",
|
|
15695
15747
|
"dir",
|
|
15696
15748
|
"style"
|
|
15697
|
-
]))], 12, _hoisted_1$
|
|
15749
|
+
]))], 12, _hoisted_1$C);
|
|
15698
15750
|
};
|
|
15699
15751
|
}
|
|
15700
15752
|
});
|
|
@@ -17512,7 +17564,7 @@ var DropdownMenuTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE
|
|
|
17512
17564
|
}
|
|
17513
17565
|
});
|
|
17514
17566
|
var DropdownMenuTrigger_default = DropdownMenuTrigger_vue_vue_type_script_setup_true_lang_default;
|
|
17515
|
-
const _sfc_main$
|
|
17567
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
17516
17568
|
__name: "EditorCheckbox",
|
|
17517
17569
|
props: {
|
|
17518
17570
|
modelValue: { type: Boolean },
|
|
@@ -17545,8 +17597,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
17545
17597
|
};
|
|
17546
17598
|
}
|
|
17547
17599
|
});
|
|
17548
|
-
const _style_0$
|
|
17549
|
-
const EditorCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17600
|
+
const _style_0$A = '\n.transcript-ui-root .checkbox[data-v-ed0978f7] {\n all: unset;\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n border: 1.5px solid var(--color-border);\n border-radius: var(--radius-sm);\n background-color: var(--color-surface);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition:\n background-color var(--transition-duration),\n border-color var(--transition-duration);\n}\n.transcript-ui-root .checkbox[data-v-ed0978f7]:hover {\n border-color: var(--color-primary);\n}\n.transcript-ui-root .checkbox[data-v-ed0978f7]:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n.transcript-ui-root .checkbox[data-state="checked"][data-v-ed0978f7] {\n background-color: var(--color-primary);\n border-color: var(--color-primary);\n}\n.checkbox-indicator[data-v-ed0978f7] {\n color: var(--color-white, #fff);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n';
|
|
17601
|
+
const EditorCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["styles", [_style_0$A]], ["__scopeId", "data-v-ed0978f7"]]);
|
|
17550
17602
|
function extend(destination) {
|
|
17551
17603
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
17552
17604
|
var source = arguments[i2];
|
|
@@ -18315,120 +18367,146 @@ function A() {
|
|
|
18315
18367
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
18316
18368
|
}
|
|
18317
18369
|
var T = A();
|
|
18318
|
-
function
|
|
18319
|
-
T =
|
|
18370
|
+
function U(l4) {
|
|
18371
|
+
T = l4;
|
|
18320
18372
|
}
|
|
18321
18373
|
var E$1 = { exec: () => null };
|
|
18322
|
-
function I(
|
|
18374
|
+
function I(l4) {
|
|
18323
18375
|
let e3 = [];
|
|
18324
18376
|
return (t2) => {
|
|
18325
|
-
let n2 = Math.max(0, Math.min(3, t2 - 1)),
|
|
18326
|
-
return
|
|
18377
|
+
let n2 = Math.max(0, Math.min(3, t2 - 1)), i2 = e3[n2];
|
|
18378
|
+
return i2 || (i2 = l4(n2), e3[n2] = i2), i2;
|
|
18327
18379
|
};
|
|
18328
18380
|
}
|
|
18329
|
-
function
|
|
18330
|
-
let t2 = typeof
|
|
18381
|
+
function d$2(l4, e3 = "") {
|
|
18382
|
+
let t2 = typeof l4 == "string" ? l4 : l4.source, n2 = { replace: (i2, r2) => {
|
|
18331
18383
|
let o2 = typeof r2 == "string" ? r2 : r2.source;
|
|
18332
|
-
return o2 = o2.replace(m$1.caret, "$1"), t2 = t2.replace(
|
|
18384
|
+
return o2 = o2.replace(m$1.caret, "$1"), t2 = t2.replace(i2, o2), n2;
|
|
18333
18385
|
}, getRegex: () => new RegExp(t2, e3) };
|
|
18334
18386
|
return n2;
|
|
18335
18387
|
}
|
|
18336
|
-
var
|
|
18388
|
+
var we = ((l4 = "") => {
|
|
18337
18389
|
try {
|
|
18338
|
-
return !!new RegExp("(?<=1)(?<!1)" +
|
|
18390
|
+
return !!new RegExp("(?<=1)(?<!1)" + l4);
|
|
18339
18391
|
} catch {
|
|
18340
18392
|
return false;
|
|
18341
18393
|
}
|
|
18342
|
-
})(), m$1 = { codeRemoveIndent: /^(?: {
|
|
18343
|
-
]`).replace("lheading",
|
|
18344
|
-
var
|
|
18345
|
-
function R(
|
|
18394
|
+
})(), m$1 = { codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, endingSpaceTabChar: /[ \t]$/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l4) => new RegExp(`^ {0,${l4}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}#`)), htmlBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:</?(?:${H})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")), blockquoteBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}>`)) }, ye = /^(?:[ \t]*(?:\n|$))+/, Pe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Se = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, v$1 = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, _e = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, K = / {0,3}(?:[*+-]|\d{1,9}[.)])/, le = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ue = d$2(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), $e = d$2(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), W = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Le = /^[^\n]+/, X = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ze = d$2(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", X).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ee = d$2(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, K).getRegex(), H = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", J = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Me = d$2("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", J).replace("tag", H).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), pe = (l4) => d$2(W).replace("hr", v$1).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l4).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex(), Ae = pe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Ie = pe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Ce = d$2(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ie).getRegex(), V = { blockquote: Ce, code: Pe, def: ze, fences: Se, heading: _e, hr: v$1, html: Me, lheading: ue, list: Ee, newline: ye, paragraph: Ae, table: E$1, text: Le }, ie = d$2("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", v$1).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex(), Be = { ...V, lheading: $e, table: ie, paragraph: d$2(W).replace("hr", v$1).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ie).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex() }, De = { ...V, html: d$2(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", J).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E$1, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d$2(W).replace("hr", v$1).replace("heading", ` *#{1,6} *[^
|
|
18395
|
+
]`).replace("lheading", ue).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, qe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ve = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ce = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, He = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _ = /[\p{P}\p{S}]/u, C$1 = /[\s\p{P}\p{S}]/u, Z = /[^\s\p{P}\p{S}]/u, Ze = d$2(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C$1).getRegex(), Ge = /[\p{Pi}\p{Ps}"']/u, he = /(?!~)[\p{P}\p{S}]/u, Qe = /(?!~)[\s\p{P}\p{S}]/u, Ne = /(?:[^\s\p{P}\p{S}]|~)/u, je = d$2(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", we ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), de = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ue = d$2(de, "u").replace(/punct/g, _).getRegex(), Fe = d$2(de, "u").replace(/punct/g, he).getRegex(), Ke = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, We = d$2(Ke, "u").replace(/openQuote/g, Ge).replace(/punct/g, _).getRegex(), ke = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Xe = d$2(ke, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Je = d$2(ke, "gu").replace(/notPunctSpace/g, Ne).replace(/punctSpace/g, Qe).replace(/punct/g, he).getRegex(), Ve = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", Ye = d$2(Ve, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), et = d$2("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), tt = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", nt = d$2(tt, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), rt = d$2(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex(), st = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", it = d$2(st, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), ot = d$2(/\\(punct)/, "gu").replace(/punct/g, _).getRegex(), at = d$2(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), lt = d$2(J).replace("(?:-->|$)", "-->").getRegex(), ut = d$2("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", lt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ge = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, N = d$2(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ge).getRegex(), pt = d$2(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", N).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ct = d$2(/^!?\[(label)\]\[(ref)\]/).replace("label", N).replace("ref", X).getRegex(), ht = d$2(/^!?\[(ref)\](?:\[\])?/).replace("ref", X).getRegex(), oe = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, dt = d$2(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ge).getRegex(), kt = d$2("reflink|nolink(?!\\()", "g").replace("reflink", d$2(/^!?\[(label)\]\[(ref)\]/).replace("label", dt).replace("ref", oe).getRegex()).replace("nolink", d$2(/^!?\[(ref)\](?:\[\])?/).replace("ref", oe).getRegex()).getRegex(), ae = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Y = { _backpedal: E$1, anyPunctuation: ot, autolink: at, blockSkip: je, br: ce, code: ve, del: E$1, delLDelim: E$1, delRDelim: E$1, emStrongLDelim: Ue, emStrongRDelimAst: Xe, emStrongRDelimUnd: et, escape: qe, link: pt, nolink: ht, punctuation: Ze, reflink: ct, reflinkSearch: kt, tag: ut, text: He, url: E$1 }, gt = { ...Y, emStrongLDelim: We, emStrongRDelimAst: Ye, emStrongRDelimUnd: nt, link: d$2(/^!?\[(label)\]\((.*?)\)/).replace("label", N).getRegex(), reflink: d$2(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", N).getRegex() }, F = { ...Y, emStrongRDelimAst: Je, emStrongLDelim: Fe, delLDelim: rt, delRDelim: it, url: d$2(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ae).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d$2(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ae).getRegex() }, ft = { ...F, br: d$2(ce).replace("{2,}", "*").getRegex(), text: d$2(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, G = { normal: V, gfm: Be, pedantic: De }, B = { normal: Y, gfm: F, breaks: ft, pedantic: gt };
|
|
18396
|
+
var mt = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, fe = (l4) => mt[l4];
|
|
18397
|
+
function R(l4, e3) {
|
|
18346
18398
|
if (e3) {
|
|
18347
|
-
if (m$1.escapeTest.test(
|
|
18348
|
-
} else if (m$1.escapeTestNoEncode.test(
|
|
18349
|
-
return
|
|
18399
|
+
if (m$1.escapeTest.test(l4)) return l4.replace(m$1.escapeReplace, fe);
|
|
18400
|
+
} else if (m$1.escapeTestNoEncode.test(l4)) return l4.replace(m$1.escapeReplaceNoEncode, fe);
|
|
18401
|
+
return l4;
|
|
18350
18402
|
}
|
|
18351
|
-
function
|
|
18403
|
+
function ee(l4) {
|
|
18352
18404
|
try {
|
|
18353
|
-
|
|
18405
|
+
l4 = encodeURI(l4).replace(m$1.percentDecode, "%");
|
|
18354
18406
|
} catch {
|
|
18355
18407
|
return null;
|
|
18356
18408
|
}
|
|
18357
|
-
return
|
|
18409
|
+
return l4;
|
|
18358
18410
|
}
|
|
18359
|
-
function
|
|
18360
|
-
let t2 =
|
|
18361
|
-
let
|
|
18362
|
-
for (; --a2 >= 0 &&
|
|
18363
|
-
return
|
|
18364
|
-
}), n2 = t2.split(m$1.splitPipe),
|
|
18411
|
+
function te(l4, e3) {
|
|
18412
|
+
let t2 = l4.replace(m$1.findPipe, (r2, o2, s2) => {
|
|
18413
|
+
let u2 = false, a2 = o2;
|
|
18414
|
+
for (; --a2 >= 0 && s2[a2] === "\\"; ) u2 = !u2;
|
|
18415
|
+
return u2 ? "|" : " |";
|
|
18416
|
+
}), n2 = t2.split(m$1.splitPipe), i2 = 0;
|
|
18365
18417
|
if (n2[0].trim() || n2.shift(), n2.length > 0 && !n2.at(-1)?.trim() && n2.pop(), e3) if (n2.length > e3) n2.splice(e3);
|
|
18366
18418
|
else for (; n2.length < e3; ) n2.push("");
|
|
18367
|
-
for (;
|
|
18419
|
+
for (; i2 < n2.length; i2++) n2[i2] = n2[i2].trim().replace(m$1.slashPipe, "|");
|
|
18368
18420
|
return n2;
|
|
18369
18421
|
}
|
|
18370
|
-
function $(
|
|
18371
|
-
let n2 =
|
|
18422
|
+
function $(l4, e3, t2) {
|
|
18423
|
+
let n2 = l4.length;
|
|
18372
18424
|
if (n2 === 0) return "";
|
|
18373
|
-
let
|
|
18374
|
-
for (;
|
|
18375
|
-
let r2 =
|
|
18376
|
-
if (r2 === e3 && true)
|
|
18425
|
+
let i2 = 0;
|
|
18426
|
+
for (; i2 < n2; ) {
|
|
18427
|
+
let r2 = l4.charAt(n2 - i2 - 1);
|
|
18428
|
+
if (r2 === e3 && true) i2++;
|
|
18377
18429
|
else break;
|
|
18378
18430
|
}
|
|
18379
|
-
return
|
|
18431
|
+
return l4.slice(0, n2 - i2);
|
|
18380
18432
|
}
|
|
18381
|
-
function
|
|
18382
|
-
let e3 =
|
|
18433
|
+
function ne(l4) {
|
|
18434
|
+
let e3 = l4.split(`
|
|
18383
18435
|
`), t2 = e3.length - 1;
|
|
18384
18436
|
for (; t2 >= 0 && m$1.blankLine.test(e3[t2]); ) t2--;
|
|
18385
|
-
return e3.length - t2 <= 2 ?
|
|
18437
|
+
return e3.length - t2 <= 2 ? l4 : e3.slice(0, t2 + 1).join(`
|
|
18386
18438
|
`);
|
|
18387
18439
|
}
|
|
18388
|
-
function
|
|
18389
|
-
|
|
18440
|
+
function D(l4) {
|
|
18441
|
+
return l4.toLowerCase().toUpperCase().toLowerCase();
|
|
18442
|
+
}
|
|
18443
|
+
function me(l4, e3) {
|
|
18444
|
+
if (l4.indexOf(e3[1]) === -1) return -1;
|
|
18390
18445
|
let t2 = 0;
|
|
18391
|
-
for (let n2 = 0; n2 <
|
|
18392
|
-
else if (
|
|
18393
|
-
else if (
|
|
18446
|
+
for (let n2 = 0; n2 < l4.length; n2++) if (l4[n2] === "\\") n2++;
|
|
18447
|
+
else if (l4[n2] === e3[0]) t2++;
|
|
18448
|
+
else if (l4[n2] === e3[1] && (t2--, t2 < 0)) return n2;
|
|
18394
18449
|
return t2 > 0 ? -2 : -1;
|
|
18395
18450
|
}
|
|
18396
|
-
function
|
|
18451
|
+
function xe(l4, e3 = 0) {
|
|
18397
18452
|
let t2 = e3, n2 = "";
|
|
18398
|
-
for (let
|
|
18453
|
+
for (let i2 of l4) if (i2 === " ") {
|
|
18399
18454
|
let r2 = 4 - t2 % 4;
|
|
18400
18455
|
n2 += " ".repeat(r2), t2 += r2;
|
|
18401
|
-
} else n2 +=
|
|
18456
|
+
} else n2 += i2, t2++;
|
|
18402
18457
|
return n2;
|
|
18403
18458
|
}
|
|
18404
|
-
function
|
|
18405
|
-
let r2 = e3.href, o2 = e3.title || null,
|
|
18459
|
+
function be(l4, e3, t2, n2, i2) {
|
|
18460
|
+
let r2 = e3.href, o2 = e3.title || null, s2 = l4[1].replace(i2.other.outputLinkReplace, "$1"), u2 = l4[0].charAt(0) === "!";
|
|
18406
18461
|
n2.state.inLink = true;
|
|
18407
18462
|
let a2 = n2.state.linkEmitted, p2 = n2.state.inRawBlock;
|
|
18408
18463
|
n2.state.linkEmitted = false;
|
|
18409
|
-
let c2 = n2.inlineTokens(
|
|
18410
|
-
if (n2.state.linkEmitted = a2, n2.state.inLink = false, !
|
|
18464
|
+
let c2 = n2.inlineTokens(s2), h2 = n2.state.linkEmitted;
|
|
18465
|
+
if (n2.state.linkEmitted = a2, n2.state.inLink = false, !u2) {
|
|
18411
18466
|
if (h2) {
|
|
18412
18467
|
n2.state.inRawBlock = p2;
|
|
18413
18468
|
return;
|
|
18414
18469
|
}
|
|
18415
18470
|
n2.state.linkEmitted = true;
|
|
18416
18471
|
}
|
|
18417
|
-
return { type:
|
|
18472
|
+
return { type: u2 ? "image" : "link", raw: t2, href: r2, title: o2, text: s2, tokens: c2 };
|
|
18418
18473
|
}
|
|
18419
|
-
function
|
|
18420
|
-
let n2 =
|
|
18474
|
+
function xt(l4, e3, t2) {
|
|
18475
|
+
let n2 = l4.match(t2.other.indentCodeCompensation);
|
|
18421
18476
|
if (n2 === null) return e3;
|
|
18422
|
-
let
|
|
18477
|
+
let i2 = n2[1];
|
|
18423
18478
|
return e3.split(`
|
|
18424
18479
|
`).map((r2) => {
|
|
18425
18480
|
let o2 = r2.match(t2.other.beginningSpace);
|
|
18426
18481
|
if (o2 === null) return r2;
|
|
18427
|
-
let [
|
|
18428
|
-
return r2.slice(Math.min(
|
|
18482
|
+
let [s2] = o2;
|
|
18483
|
+
return r2.slice(Math.min(s2.length, i2.length));
|
|
18429
18484
|
}).join(`
|
|
18430
18485
|
`);
|
|
18431
18486
|
}
|
|
18487
|
+
function Re(l4, e3, t2, n2) {
|
|
18488
|
+
if (!e3.includes("<")) return false;
|
|
18489
|
+
for (let i2 = 0; i2 < e3.length; i2++) {
|
|
18490
|
+
if (e3[i2] === "\\") {
|
|
18491
|
+
i2++;
|
|
18492
|
+
continue;
|
|
18493
|
+
}
|
|
18494
|
+
if (e3[i2] === "`") {
|
|
18495
|
+
let s2 = n2.inline.code.exec(e3.slice(i2));
|
|
18496
|
+
if (s2) {
|
|
18497
|
+
i2 += s2[0].length - 1;
|
|
18498
|
+
continue;
|
|
18499
|
+
}
|
|
18500
|
+
}
|
|
18501
|
+
if (e3[i2] !== "<") continue;
|
|
18502
|
+
let r2 = l4.slice(t2 + i2), o2 = n2.inline.tag.exec(r2) || n2.inline.autolink.exec(r2);
|
|
18503
|
+
if (o2) {
|
|
18504
|
+
if (o2[0].length > e3.length - i2) return true;
|
|
18505
|
+
i2 += o2[0].length - 1;
|
|
18506
|
+
}
|
|
18507
|
+
}
|
|
18508
|
+
return false;
|
|
18509
|
+
}
|
|
18432
18510
|
var y$1 = class y {
|
|
18433
18511
|
options;
|
|
18434
18512
|
rules;
|
|
@@ -18443,15 +18521,15 @@ var y$1 = class y {
|
|
|
18443
18521
|
code(e3) {
|
|
18444
18522
|
let t2 = this.rules.block.code.exec(e3);
|
|
18445
18523
|
if (t2) {
|
|
18446
|
-
let n2 = this.options.pedantic ? t2[0] :
|
|
18447
|
-
return { type: "code", raw: n2, codeBlockStyle: "indented", text:
|
|
18524
|
+
let n2 = this.options.pedantic ? t2[0] : ne(t2[0]), i2 = n2.replace(this.rules.other.codeRemoveIndent, "");
|
|
18525
|
+
return { type: "code", raw: n2, codeBlockStyle: "indented", text: i2 };
|
|
18448
18526
|
}
|
|
18449
18527
|
}
|
|
18450
18528
|
fences(e3) {
|
|
18451
18529
|
let t2 = this.rules.block.fences.exec(e3);
|
|
18452
18530
|
if (t2) {
|
|
18453
|
-
let n2 = t2[0],
|
|
18454
|
-
return { type: "code", raw: n2, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text:
|
|
18531
|
+
let n2 = t2[0], i2 = xt(n2, t2[3] || "", this.rules);
|
|
18532
|
+
return { type: "code", raw: n2, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: i2 };
|
|
18455
18533
|
}
|
|
18456
18534
|
}
|
|
18457
18535
|
heading(e3) {
|
|
@@ -18459,8 +18537,8 @@ var y$1 = class y {
|
|
|
18459
18537
|
if (t2) {
|
|
18460
18538
|
let n2 = t2[2].trim();
|
|
18461
18539
|
if (this.rules.other.endingHash.test(n2)) {
|
|
18462
|
-
let
|
|
18463
|
-
(this.options.pedantic || !
|
|
18540
|
+
let i2 = $(n2, "#");
|
|
18541
|
+
(this.options.pedantic || !i2 || this.rules.other.endingSpaceTabChar.test(i2)) && (n2 = i2.trim());
|
|
18464
18542
|
}
|
|
18465
18543
|
return { type: "heading", raw: $(t2[0], `
|
|
18466
18544
|
`), depth: t2[1].length, text: n2, tokens: this.lexer.inline(n2) };
|
|
@@ -18476,77 +18554,77 @@ var y$1 = class y {
|
|
|
18476
18554
|
if (t2) {
|
|
18477
18555
|
let n2 = $(t2[0], `
|
|
18478
18556
|
`).split(`
|
|
18479
|
-
`),
|
|
18557
|
+
`), i2 = "", r2 = "", o2 = [];
|
|
18480
18558
|
for (; n2.length > 0; ) {
|
|
18481
|
-
let
|
|
18482
|
-
for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2]))
|
|
18483
|
-
else if (!
|
|
18559
|
+
let s2 = false, u2 = [], a2;
|
|
18560
|
+
for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) u2.push(n2[a2]), s2 = true;
|
|
18561
|
+
else if (!s2) u2.push(n2[a2]);
|
|
18484
18562
|
else break;
|
|
18485
18563
|
n2 = n2.slice(a2);
|
|
18486
|
-
let p2 =
|
|
18564
|
+
let p2 = u2.join(`
|
|
18487
18565
|
`), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
|
|
18488
18566
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
18489
|
-
|
|
18567
|
+
i2 = i2 ? `${i2}
|
|
18490
18568
|
${p2}` : p2, r2 = r2 ? `${r2}
|
|
18491
18569
|
${c2}` : c2;
|
|
18492
18570
|
let h2 = this.lexer.state.top;
|
|
18493
18571
|
if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h2, n2.length === 0) break;
|
|
18494
|
-
let
|
|
18495
|
-
if (
|
|
18496
|
-
if (
|
|
18497
|
-
let O =
|
|
18572
|
+
let k = o2.at(-1);
|
|
18573
|
+
if (k?.type === "code") break;
|
|
18574
|
+
if (k?.type === "blockquote") {
|
|
18575
|
+
let O = k, g2 = n2.join(`
|
|
18498
18576
|
`), w2 = O.raw + `
|
|
18499
18577
|
` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), z = this.blockquote(w2);
|
|
18500
|
-
o2[o2.length - 1] = z,
|
|
18578
|
+
o2[o2.length - 1] = z, i2 = `${i2}
|
|
18501
18579
|
${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
18502
18580
|
break;
|
|
18503
|
-
} else if (
|
|
18504
|
-
let O =
|
|
18581
|
+
} else if (k?.type === "list") {
|
|
18582
|
+
let O = k, g2 = O.raw + `
|
|
18505
18583
|
` + n2.join(`
|
|
18506
18584
|
`), w2 = this.list(g2);
|
|
18507
|
-
o2[o2.length - 1] = w2,
|
|
18585
|
+
o2[o2.length - 1] = w2, i2 = i2.substring(0, i2.length - k.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n2 = g2.substring(o2.at(-1).raw.length).split(`
|
|
18508
18586
|
`);
|
|
18509
18587
|
continue;
|
|
18510
18588
|
}
|
|
18511
18589
|
}
|
|
18512
|
-
return { type: "blockquote", raw:
|
|
18590
|
+
return { type: "blockquote", raw: i2, tokens: o2, text: r2 };
|
|
18513
18591
|
}
|
|
18514
18592
|
}
|
|
18515
18593
|
list(e3) {
|
|
18516
18594
|
let t2 = this.rules.block.list.exec(e3);
|
|
18517
18595
|
if (t2) {
|
|
18518
|
-
let n2 = t2[1].trim(),
|
|
18519
|
-
n2 =
|
|
18520
|
-
let o2 = this.rules.other.listItemRegex(n2),
|
|
18596
|
+
let n2 = t2[1].trim(), i2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: i2, start: i2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
|
|
18597
|
+
n2 = i2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = i2 ? n2 : "[*+-]");
|
|
18598
|
+
let o2 = this.rules.other.listItemRegex(n2), s2 = false;
|
|
18521
18599
|
for (; e3; ) {
|
|
18522
18600
|
let a2 = false, p2 = "", c2 = "";
|
|
18523
18601
|
if (!(t2 = o2.exec(e3)) || this.rules.block.hr.test(e3)) break;
|
|
18524
18602
|
p2 = t2[0], e3 = e3.substring(p2.length);
|
|
18525
|
-
let h2 =
|
|
18526
|
-
`, 1)[0], t2[1].length),
|
|
18603
|
+
let h2 = xe(t2[2].split(`
|
|
18604
|
+
`, 1)[0], t2[1].length), k = e3.split(`
|
|
18527
18605
|
`, 1)[0], O = !h2.trim(), g2 = 0;
|
|
18528
|
-
if (this.options.pedantic ? (g2 = 2, c2 = h2.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h2.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h2.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(
|
|
18529
|
-
`, e3 = e3.substring(
|
|
18530
|
-
let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2),
|
|
18606
|
+
if (this.options.pedantic ? (g2 = 2, c2 = h2.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h2.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h2.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(k) && (p2 += k + `
|
|
18607
|
+
`, e3 = e3.substring(k.length + 1), a2 = true), !a2) {
|
|
18608
|
+
let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2), re = this.rules.other.fencesBeginRegex(g2), se = this.rules.other.headingBeginRegex(g2), Te = this.rules.other.htmlBeginRegex(g2), Oe = this.rules.other.blockquoteBeginRegex(g2);
|
|
18531
18609
|
for (; e3; ) {
|
|
18532
|
-
let
|
|
18533
|
-
`, 1)[0],
|
|
18534
|
-
if (
|
|
18535
|
-
if (
|
|
18536
|
-
` +
|
|
18610
|
+
let j = e3.split(`
|
|
18611
|
+
`, 1)[0], q;
|
|
18612
|
+
if (k = j, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), q = k) : q = k.replace(this.rules.other.tabCharGlobal, " "), re.test(k) || se.test(k) || Te.test(k) || Oe.test(k) || w2.test(k) || z.test(k)) break;
|
|
18613
|
+
if (q.search(this.rules.other.nonSpaceChar) >= g2 || !k.trim()) c2 += `
|
|
18614
|
+
` + q.slice(g2);
|
|
18537
18615
|
else {
|
|
18538
|
-
if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 ||
|
|
18616
|
+
if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || re.test(h2) || se.test(h2) || z.test(h2)) break;
|
|
18539
18617
|
c2 += `
|
|
18540
|
-
` +
|
|
18618
|
+
` + k;
|
|
18541
18619
|
}
|
|
18542
|
-
O = !
|
|
18543
|
-
`, e3 = e3.substring(
|
|
18620
|
+
O = !k.trim(), p2 += j + `
|
|
18621
|
+
`, e3 = e3.substring(j.length + 1), h2 = q.slice(g2);
|
|
18544
18622
|
}
|
|
18545
18623
|
}
|
|
18546
|
-
r2.loose || (
|
|
18624
|
+
r2.loose || (s2 ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (s2 = true)), r2.items.push({ type: "list_item", raw: p2, task: !!this.options.gfm && this.rules.other.listIsTask.test(c2), loose: false, text: c2, tokens: [] }), r2.raw += p2;
|
|
18547
18625
|
}
|
|
18548
|
-
let
|
|
18549
|
-
if (
|
|
18626
|
+
let u2 = r2.items.at(-1);
|
|
18627
|
+
if (u2) u2.raw = u2.raw.trimEnd(), u2.text = u2.text.trimEnd();
|
|
18550
18628
|
else return;
|
|
18551
18629
|
r2.raw = r2.raw.trimEnd();
|
|
18552
18630
|
for (let a2 of r2.items) if (this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []), !r2.loose) {
|
|
@@ -18578,28 +18656,28 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18578
18656
|
html(e3) {
|
|
18579
18657
|
let t2 = this.rules.block.html.exec(e3);
|
|
18580
18658
|
if (t2) {
|
|
18581
|
-
let n2 =
|
|
18659
|
+
let n2 = ne(t2[0]);
|
|
18582
18660
|
return { type: "html", block: true, raw: n2, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n2 };
|
|
18583
18661
|
}
|
|
18584
18662
|
}
|
|
18585
18663
|
def(e3) {
|
|
18586
18664
|
let t2 = this.rules.block.def.exec(e3);
|
|
18587
18665
|
if (t2) {
|
|
18588
|
-
let n2 = t2[1]
|
|
18666
|
+
let n2 = D(t2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i2 = t2[2] ? t2[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t2[3] ? t2[3].substring(1, t2[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t2[3];
|
|
18589
18667
|
return { type: "def", tag: n2, raw: $(t2[0], `
|
|
18590
|
-
`), href:
|
|
18668
|
+
`), href: i2, title: r2 };
|
|
18591
18669
|
}
|
|
18592
18670
|
}
|
|
18593
18671
|
table(e3) {
|
|
18594
18672
|
let t2 = this.rules.block.table.exec(e3);
|
|
18595
18673
|
if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
|
|
18596
|
-
let n2 =
|
|
18674
|
+
let n2 = te(t2[1]), i2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
18597
18675
|
`) : [], o2 = { type: "table", raw: $(t2[0], `
|
|
18598
18676
|
`), header: [], align: [], rows: [] };
|
|
18599
|
-
if (n2.length ===
|
|
18600
|
-
for (let
|
|
18601
|
-
for (let
|
|
18602
|
-
for (let
|
|
18677
|
+
if (n2.length === i2.length) {
|
|
18678
|
+
for (let s2 of i2) this.rules.other.tableAlignRight.test(s2) ? o2.align.push("right") : this.rules.other.tableAlignCenter.test(s2) ? o2.align.push("center") : this.rules.other.tableAlignLeft.test(s2) ? o2.align.push("left") : o2.align.push(null);
|
|
18679
|
+
for (let s2 = 0; s2 < n2.length; s2++) o2.header.push({ text: n2[s2], tokens: this.lexer.inline(n2[s2]), header: true, align: o2.align[s2] });
|
|
18680
|
+
for (let s2 of r2) o2.rows.push(te(s2, o2.header.length).map((u2, a2) => ({ text: u2, tokens: this.lexer.inline(u2), header: false, align: o2.align[a2] })));
|
|
18603
18681
|
return o2;
|
|
18604
18682
|
}
|
|
18605
18683
|
}
|
|
@@ -18634,59 +18712,63 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18634
18712
|
link(e3) {
|
|
18635
18713
|
let t2 = this.rules.inline.link.exec(e3);
|
|
18636
18714
|
if (t2) {
|
|
18637
|
-
let n2 = t2[
|
|
18638
|
-
if (!this.options.pedantic && this.rules
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
if (
|
|
18715
|
+
let n2 = t2[0].charAt(0) === "!" ? 2 : 1;
|
|
18716
|
+
if (!this.options.pedantic && Re(e3, t2[1], n2, this.rules)) return;
|
|
18717
|
+
let i2 = t2[2].trim();
|
|
18718
|
+
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(i2)) {
|
|
18719
|
+
if (!this.rules.other.endAngleBracket.test(i2)) return;
|
|
18720
|
+
let s2 = $(i2.slice(0, -1), "\\");
|
|
18721
|
+
if ((i2.length - s2.length) % 2 === 0) return;
|
|
18642
18722
|
} else {
|
|
18643
|
-
let
|
|
18644
|
-
if (
|
|
18645
|
-
if (
|
|
18646
|
-
let
|
|
18647
|
-
t2[2] = t2[2].substring(0,
|
|
18723
|
+
let s2 = me(t2[2], "()");
|
|
18724
|
+
if (s2 === -2) return;
|
|
18725
|
+
if (s2 > -1) {
|
|
18726
|
+
let a2 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + s2;
|
|
18727
|
+
t2[2] = t2[2].substring(0, s2), t2[0] = t2[0].substring(0, a2).trim(), t2[3] = "";
|
|
18648
18728
|
}
|
|
18649
18729
|
}
|
|
18650
|
-
let
|
|
18730
|
+
let r2 = t2[2], o2 = "";
|
|
18651
18731
|
if (this.options.pedantic) {
|
|
18652
|
-
let
|
|
18653
|
-
|
|
18654
|
-
} else
|
|
18655
|
-
return
|
|
18732
|
+
let s2 = this.rules.other.pedanticHrefTitle.exec(r2);
|
|
18733
|
+
s2 && (r2 = s2[1], o2 = s2[3]);
|
|
18734
|
+
} else o2 = t2[3] ? t2[3].slice(1, -1) : "";
|
|
18735
|
+
return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(i2) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), be(t2, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: o2 && o2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
|
|
18656
18736
|
}
|
|
18657
18737
|
}
|
|
18658
18738
|
reflink(e3, t2) {
|
|
18659
18739
|
let n2;
|
|
18660
18740
|
if ((n2 = this.rules.inline.reflink.exec(e3)) || (n2 = this.rules.inline.nolink.exec(e3))) {
|
|
18661
|
-
let
|
|
18662
|
-
if (!
|
|
18663
|
-
|
|
18664
|
-
|
|
18741
|
+
let i2 = n2[0].charAt(0) === "!" ? 2 : 1;
|
|
18742
|
+
if (!this.options.pedantic && Re(e3, n2[1], i2, this.rules)) return;
|
|
18743
|
+
let r2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), o2 = t2[D(r2)];
|
|
18744
|
+
if (!o2) {
|
|
18745
|
+
let s2 = n2[0].charAt(0);
|
|
18746
|
+
return { type: "text", raw: s2, text: s2 };
|
|
18665
18747
|
}
|
|
18666
|
-
return
|
|
18748
|
+
return be(n2, o2, n2[0], this.lexer, this.rules);
|
|
18667
18749
|
}
|
|
18668
18750
|
}
|
|
18669
18751
|
emStrong(e3, t2, n2 = "") {
|
|
18670
|
-
let
|
|
18671
|
-
if (!
|
|
18672
|
-
if (!(
|
|
18673
|
-
let o2 = [...
|
|
18674
|
-
for (
|
|
18675
|
-
if (
|
|
18676
|
-
if (
|
|
18677
|
-
a2 +=
|
|
18752
|
+
let i2 = this.rules.inline.emStrongLDelim.exec(e3);
|
|
18753
|
+
if (!i2 || !i2[1] && !i2[2] && !i2[3] && !i2[4] || i2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
18754
|
+
if (!(i2[1] || i2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
|
|
18755
|
+
let o2 = [...i2[0]].length - 1, s2, u2, a2 = o2, p2 = 0, c2 = i2[0][0], h2 = n2 === c2, k = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
18756
|
+
for (k.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (i2 = k.exec(t2)) !== null; ) {
|
|
18757
|
+
if (s2 = i2[1] || i2[2] || i2[3] || i2[4] || i2[5] || i2[6], !s2) continue;
|
|
18758
|
+
if (u2 = [...s2].length, i2[3] || i2[4]) {
|
|
18759
|
+
a2 += u2;
|
|
18678
18760
|
continue;
|
|
18679
|
-
} else if (
|
|
18680
|
-
if (o2 % 3 && !((o2 +
|
|
18681
|
-
p2 +=
|
|
18761
|
+
} else if (i2[5] || i2[6]) {
|
|
18762
|
+
if (o2 % 3 && !((o2 + u2) % 3)) {
|
|
18763
|
+
p2 += u2;
|
|
18682
18764
|
continue;
|
|
18683
18765
|
}
|
|
18684
18766
|
if (h2) break;
|
|
18685
18767
|
}
|
|
18686
|
-
if (a2 -=
|
|
18687
|
-
|
|
18688
|
-
let O = [...
|
|
18689
|
-
if (Math.min(o2,
|
|
18768
|
+
if (a2 -= u2, a2 > 0) continue;
|
|
18769
|
+
u2 = Math.min(u2, u2 + a2 + p2);
|
|
18770
|
+
let O = [...i2[0]][0].length, g2 = e3.slice(0, o2 + i2.index + O + u2);
|
|
18771
|
+
if (Math.min(o2, u2) % 2) {
|
|
18690
18772
|
let z = g2.slice(1, -1);
|
|
18691
18773
|
return { type: "em", raw: g2, text: z, tokens: this.lexer.inlineTokens(z) };
|
|
18692
18774
|
}
|
|
@@ -18698,8 +18780,8 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18698
18780
|
codespan(e3) {
|
|
18699
18781
|
let t2 = this.rules.inline.code.exec(e3);
|
|
18700
18782
|
if (t2) {
|
|
18701
|
-
let n2 = t2[2].replace(this.rules.other.newLineCharGlobal, " "),
|
|
18702
|
-
return
|
|
18783
|
+
let n2 = t2[2].replace(this.rules.other.newLineCharGlobal, " "), i2 = this.rules.other.nonSpaceChar.test(n2), r2 = this.rules.other.startingSpaceChar.test(n2) && this.rules.other.endingSpaceChar.test(n2);
|
|
18784
|
+
return i2 && r2 && (n2 = n2.substring(1, n2.length - 1)), { type: "codespan", raw: t2[0], text: n2 };
|
|
18703
18785
|
}
|
|
18704
18786
|
}
|
|
18705
18787
|
br(e3) {
|
|
@@ -18707,43 +18789,43 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18707
18789
|
if (t2) return { type: "br", raw: t2[0] };
|
|
18708
18790
|
}
|
|
18709
18791
|
del(e3, t2, n2 = "") {
|
|
18710
|
-
let
|
|
18711
|
-
if (!
|
|
18712
|
-
if (!(
|
|
18713
|
-
let o2 = [...
|
|
18714
|
-
for (p2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (
|
|
18715
|
-
if (
|
|
18716
|
-
if (
|
|
18717
|
-
a2 +=
|
|
18792
|
+
let i2 = this.rules.inline.delLDelim.exec(e3);
|
|
18793
|
+
if (!i2) return;
|
|
18794
|
+
if (!(i2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
|
|
18795
|
+
let o2 = [...i2[0]].length - 1, s2, u2, a2 = o2, p2 = this.rules.inline.delRDelim;
|
|
18796
|
+
for (p2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (i2 = p2.exec(t2)) !== null; ) {
|
|
18797
|
+
if (s2 = i2[1] || i2[2] || i2[3] || i2[4] || i2[5] || i2[6], !s2 || (u2 = [...s2].length, u2 !== o2)) continue;
|
|
18798
|
+
if (i2[3] || i2[4]) {
|
|
18799
|
+
a2 += u2;
|
|
18718
18800
|
continue;
|
|
18719
18801
|
}
|
|
18720
|
-
if (a2 -=
|
|
18721
|
-
|
|
18722
|
-
let c2 = [...
|
|
18723
|
-
return { type: "del", raw: h2, text:
|
|
18802
|
+
if (a2 -= u2, a2 > 0) continue;
|
|
18803
|
+
u2 = Math.min(u2, u2 + a2);
|
|
18804
|
+
let c2 = [...i2[0]][0].length, h2 = e3.slice(0, o2 + i2.index + c2 + u2), k = h2.slice(o2, -o2);
|
|
18805
|
+
return { type: "del", raw: h2, text: k, tokens: this.lexer.inlineTokens(k) };
|
|
18724
18806
|
}
|
|
18725
18807
|
}
|
|
18726
18808
|
}
|
|
18727
18809
|
autolink(e3) {
|
|
18728
18810
|
let t2 = this.rules.inline.autolink.exec(e3);
|
|
18729
18811
|
if (t2) {
|
|
18730
|
-
let n2,
|
|
18731
|
-
return t2[2] === "@" ? (n2 = t2[1],
|
|
18812
|
+
let n2, i2;
|
|
18813
|
+
return t2[2] === "@" ? (n2 = t2[1], i2 = "mailto:" + n2) : (n2 = t2[1], i2 = n2), { type: "link", raw: t2[0], text: n2, href: i2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
|
|
18732
18814
|
}
|
|
18733
18815
|
}
|
|
18734
18816
|
url(e3) {
|
|
18735
18817
|
let t2;
|
|
18736
18818
|
if (t2 = this.rules.inline.url.exec(e3)) {
|
|
18737
|
-
let n2,
|
|
18738
|
-
if (t2[2] === "@") n2 = t2[0],
|
|
18819
|
+
let n2, i2;
|
|
18820
|
+
if (t2[2] === "@") n2 = t2[0], i2 = "mailto:" + n2;
|
|
18739
18821
|
else {
|
|
18740
18822
|
let r2;
|
|
18741
18823
|
do
|
|
18742
18824
|
r2 = t2[0], t2[0] = this.rules.inline._backpedal.exec(t2[0])?.[0] ?? "";
|
|
18743
18825
|
while (r2 !== t2[0]);
|
|
18744
|
-
n2 = t2[0], t2[1] === "www." ?
|
|
18826
|
+
n2 = t2[0], t2[1] === "www." ? i2 = "http://" + t2[0] : i2 = t2[0];
|
|
18745
18827
|
}
|
|
18746
|
-
return { type: "link", raw: t2[0], text: n2, href:
|
|
18828
|
+
return { type: "link", raw: t2[0], text: n2, href: i2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
|
|
18747
18829
|
}
|
|
18748
18830
|
}
|
|
18749
18831
|
inlineText(e3) {
|
|
@@ -18754,7 +18836,7 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18754
18836
|
}
|
|
18755
18837
|
}
|
|
18756
18838
|
};
|
|
18757
|
-
var x = class
|
|
18839
|
+
var x = class l {
|
|
18758
18840
|
tokens;
|
|
18759
18841
|
options;
|
|
18760
18842
|
state;
|
|
@@ -18762,17 +18844,17 @@ var x = class u {
|
|
|
18762
18844
|
tokenizer;
|
|
18763
18845
|
constructor(e3) {
|
|
18764
18846
|
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e3 || T, this.options.tokenizer = this.options.tokenizer || new y$1(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
|
|
18765
|
-
let t2 = { other: m$1, block:
|
|
18766
|
-
this.options.pedantic ? (t2.block =
|
|
18847
|
+
let t2 = { other: m$1, block: G.normal, inline: B.normal };
|
|
18848
|
+
this.options.pedantic ? (t2.block = G.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = G.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
|
|
18767
18849
|
}
|
|
18768
18850
|
static get rules() {
|
|
18769
|
-
return { block:
|
|
18851
|
+
return { block: G, inline: B };
|
|
18770
18852
|
}
|
|
18771
18853
|
static lex(e3, t2) {
|
|
18772
|
-
return new
|
|
18854
|
+
return new l(t2).lex(e3);
|
|
18773
18855
|
}
|
|
18774
18856
|
static lexInline(e3, t2) {
|
|
18775
|
-
return new
|
|
18857
|
+
return new l(t2).inlineTokens(e3);
|
|
18776
18858
|
}
|
|
18777
18859
|
lex(e3) {
|
|
18778
18860
|
e3 = e3.replace(m$1.carriageReturn, `
|
|
@@ -18785,29 +18867,29 @@ var x = class u {
|
|
|
18785
18867
|
}
|
|
18786
18868
|
blockTokens(e3, t2 = [], n2 = false) {
|
|
18787
18869
|
this.tokenizer.lexer = this, this.options.pedantic && (e3 = e3.replace(m$1.tabCharGlobal, " ").replace(m$1.spaceLine, ""));
|
|
18788
|
-
let
|
|
18870
|
+
let i2 = 1 / 0;
|
|
18789
18871
|
for (; e3; ) {
|
|
18790
|
-
if (e3.length <
|
|
18872
|
+
if (e3.length < i2) i2 = e3.length;
|
|
18791
18873
|
else {
|
|
18792
18874
|
this.infiniteLoopError(e3.charCodeAt(0));
|
|
18793
18875
|
break;
|
|
18794
18876
|
}
|
|
18795
18877
|
let r2;
|
|
18796
|
-
if (this.options.extensions?.block?.some((
|
|
18878
|
+
if (this.options.extensions?.block?.some((s2) => (r2 = s2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
|
|
18797
18879
|
if (r2 = this.tokenizer.space(e3)) {
|
|
18798
18880
|
e3 = e3.substring(r2.raw.length);
|
|
18799
|
-
let
|
|
18800
|
-
r2.raw.length === 1 &&
|
|
18881
|
+
let s2 = t2.at(-1);
|
|
18882
|
+
r2.raw.length === 1 && s2 !== void 0 ? s2.raw += `
|
|
18801
18883
|
` : t2.push(r2);
|
|
18802
18884
|
continue;
|
|
18803
18885
|
}
|
|
18804
18886
|
if (r2 = this.tokenizer.code(e3)) {
|
|
18805
18887
|
e3 = e3.substring(r2.raw.length);
|
|
18806
|
-
let
|
|
18807
|
-
|
|
18888
|
+
let s2 = t2.at(-1);
|
|
18889
|
+
s2?.type === "paragraph" || s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
|
|
18808
18890
|
`) ? "" : `
|
|
18809
|
-
`) + r2.raw,
|
|
18810
|
-
` + r2.text, this.inlineQueue.at(-1).src =
|
|
18891
|
+
`) + r2.raw, s2.text += `
|
|
18892
|
+
` + r2.text, this.inlineQueue.at(-1).src = s2.text) : t2.push(r2);
|
|
18811
18893
|
continue;
|
|
18812
18894
|
}
|
|
18813
18895
|
if (r2 = this.tokenizer.fences(e3)) {
|
|
@@ -18836,11 +18918,11 @@ var x = class u {
|
|
|
18836
18918
|
}
|
|
18837
18919
|
if (r2 = this.tokenizer.def(e3)) {
|
|
18838
18920
|
e3 = e3.substring(r2.raw.length);
|
|
18839
|
-
let
|
|
18840
|
-
|
|
18921
|
+
let s2 = t2.at(-1);
|
|
18922
|
+
s2?.type === "paragraph" || s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
|
|
18841
18923
|
`) ? "" : `
|
|
18842
|
-
`) + r2.raw,
|
|
18843
|
-
` + r2.raw, this.inlineQueue.at(-1).src =
|
|
18924
|
+
`) + r2.raw, s2.text += `
|
|
18925
|
+
` + r2.raw, this.inlineQueue.at(-1).src = s2.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
|
|
18844
18926
|
continue;
|
|
18845
18927
|
}
|
|
18846
18928
|
if (r2 = this.tokenizer.table(e3)) {
|
|
@@ -18853,26 +18935,26 @@ var x = class u {
|
|
|
18853
18935
|
}
|
|
18854
18936
|
let o2 = e3;
|
|
18855
18937
|
if (this.options.extensions?.startBlock) {
|
|
18856
|
-
let
|
|
18938
|
+
let s2 = 1 / 0, u2 = e3.slice(1), a2;
|
|
18857
18939
|
this.options.extensions.startBlock.forEach((p2) => {
|
|
18858
|
-
a2 = p2.call({ lexer: this },
|
|
18859
|
-
}),
|
|
18940
|
+
a2 = p2.call({ lexer: this }, u2), typeof a2 == "number" && a2 >= 0 && (s2 = Math.min(s2, a2));
|
|
18941
|
+
}), s2 < 1 / 0 && s2 >= 0 && (o2 = e3.substring(0, s2 + 1));
|
|
18860
18942
|
}
|
|
18861
18943
|
if (this.state.top && (r2 = this.tokenizer.paragraph(o2))) {
|
|
18862
|
-
let
|
|
18863
|
-
n2 &&
|
|
18944
|
+
let s2 = t2.at(-1);
|
|
18945
|
+
n2 && s2?.type === "paragraph" ? (s2.raw += (s2.raw.endsWith(`
|
|
18864
18946
|
`) ? "" : `
|
|
18865
|
-
`) + r2.raw,
|
|
18866
|
-
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
18947
|
+
`) + r2.raw, s2.text += `
|
|
18948
|
+
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s2.text) : t2.push(r2), n2 = o2.length !== e3.length, e3 = e3.substring(r2.raw.length);
|
|
18867
18949
|
continue;
|
|
18868
18950
|
}
|
|
18869
18951
|
if (r2 = this.tokenizer.text(e3)) {
|
|
18870
18952
|
e3 = e3.substring(r2.raw.length);
|
|
18871
|
-
let
|
|
18872
|
-
|
|
18953
|
+
let s2 = t2.at(-1);
|
|
18954
|
+
s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
|
|
18873
18955
|
`) ? "" : `
|
|
18874
|
-
`) + r2.raw,
|
|
18875
|
-
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
18956
|
+
`) + r2.raw, s2.text += `
|
|
18957
|
+
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s2.text) : t2.push(r2);
|
|
18876
18958
|
continue;
|
|
18877
18959
|
}
|
|
18878
18960
|
if (e3) {
|
|
@@ -18890,8 +18972,8 @@ var x = class u {
|
|
|
18890
18972
|
let t2 = this.tokenizer.rules.inline.link;
|
|
18891
18973
|
for (let n2 of e3.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n2[0]) && e3.charAt(n2.index - 1) !== "!") return true;
|
|
18892
18974
|
for (let n2 of e3.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
|
|
18893
|
-
let
|
|
18894
|
-
if (!(
|
|
18975
|
+
let i2 = n2[0], r2 = i2.lastIndexOf("[");
|
|
18976
|
+
if (!(i2.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, D(i2.slice(r2 + 1, -1)))) && !(r2 > 1 && this.linkInText(i2.slice(1, r2 - 1)))) return true;
|
|
18895
18977
|
}
|
|
18896
18978
|
return false;
|
|
18897
18979
|
}
|
|
@@ -18899,84 +18981,84 @@ var x = class u {
|
|
|
18899
18981
|
this.tokenizer.lexer = this;
|
|
18900
18982
|
let n2 = e3;
|
|
18901
18983
|
if (this.tokens.links && e3.includes("[")) {
|
|
18902
|
-
let
|
|
18984
|
+
let s2 = this.tokenizer.rules.inline.reflinkSearch, u2 = (a2) => {
|
|
18903
18985
|
let p2 = a2.lastIndexOf("[");
|
|
18904
|
-
if (!Object.hasOwn(this.tokens.links, a2.slice(p2 + 1, -1))) return a2;
|
|
18986
|
+
if (!Object.hasOwn(this.tokens.links, D(a2.slice(p2 + 1, -1)))) return a2;
|
|
18905
18987
|
if (p2 > 1 && a2.charAt(0) !== "!") {
|
|
18906
18988
|
let c2 = a2.slice(1, p2 - 1);
|
|
18907
|
-
if (this.linkInText(c2)) return "[" + c2.replace(
|
|
18989
|
+
if (this.linkInText(c2)) return "[" + c2.replace(s2, u2) + "][" + "a".repeat(a2.length - p2 - 2) + "]";
|
|
18908
18990
|
}
|
|
18909
18991
|
return "[" + "a".repeat(a2.length - 2) + "]";
|
|
18910
18992
|
};
|
|
18911
|
-
n2 = n2.replace(
|
|
18993
|
+
n2 = n2.replace(s2, u2);
|
|
18912
18994
|
}
|
|
18913
|
-
n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (
|
|
18995
|
+
n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (s2) => "+".repeat(s2.length)), n2 = n2.replace(this.tokenizer.rules.inline.blockSkip, (s2, u2, a2) => {
|
|
18914
18996
|
let p2 = a2 ? a2.length : 0;
|
|
18915
|
-
return
|
|
18997
|
+
return s2.slice(0, p2) + "[" + "a".repeat(s2.length - p2 - 2) + "]";
|
|
18916
18998
|
}), n2 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n2) ?? n2;
|
|
18917
|
-
let
|
|
18999
|
+
let i2 = false, r2 = "", o2 = 1 / 0;
|
|
18918
19000
|
for (; e3; ) {
|
|
18919
19001
|
if (e3.length < o2) o2 = e3.length;
|
|
18920
19002
|
else {
|
|
18921
19003
|
this.infiniteLoopError(e3.charCodeAt(0));
|
|
18922
19004
|
break;
|
|
18923
19005
|
}
|
|
18924
|
-
|
|
18925
|
-
let
|
|
18926
|
-
if (this.options.extensions?.inline?.some((a2) => (
|
|
18927
|
-
if (
|
|
18928
|
-
e3 = e3.substring(
|
|
19006
|
+
i2 || (r2 = ""), i2 = false;
|
|
19007
|
+
let s2;
|
|
19008
|
+
if (this.options.extensions?.inline?.some((a2) => (s2 = a2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(s2.raw.length), t2.push(s2), true) : false)) continue;
|
|
19009
|
+
if (s2 = this.tokenizer.escape(e3)) {
|
|
19010
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18929
19011
|
continue;
|
|
18930
19012
|
}
|
|
18931
|
-
if (
|
|
18932
|
-
e3 = e3.substring(
|
|
19013
|
+
if (s2 = this.tokenizer.tag(e3)) {
|
|
19014
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18933
19015
|
continue;
|
|
18934
19016
|
}
|
|
18935
|
-
if (
|
|
18936
|
-
e3 = e3.substring(
|
|
19017
|
+
if (s2 = this.tokenizer.link(e3)) {
|
|
19018
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18937
19019
|
continue;
|
|
18938
19020
|
}
|
|
18939
|
-
if (
|
|
18940
|
-
e3 = e3.substring(
|
|
19021
|
+
if (s2 = this.tokenizer.reflink(e3, this.tokens.links)) {
|
|
19022
|
+
e3 = e3.substring(s2.raw.length);
|
|
18941
19023
|
let a2 = t2.at(-1);
|
|
18942
|
-
|
|
19024
|
+
s2.type === "text" && a2?.type === "text" ? (a2.raw += s2.raw, a2.text += s2.text) : t2.push(s2);
|
|
18943
19025
|
continue;
|
|
18944
19026
|
}
|
|
18945
|
-
if (
|
|
18946
|
-
e3 = e3.substring(
|
|
19027
|
+
if (s2 = this.tokenizer.emStrong(e3, n2, r2)) {
|
|
19028
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18947
19029
|
continue;
|
|
18948
19030
|
}
|
|
18949
|
-
if (
|
|
18950
|
-
e3 = e3.substring(
|
|
19031
|
+
if (s2 = this.tokenizer.codespan(e3)) {
|
|
19032
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18951
19033
|
continue;
|
|
18952
19034
|
}
|
|
18953
|
-
if (
|
|
18954
|
-
e3 = e3.substring(
|
|
19035
|
+
if (s2 = this.tokenizer.br(e3)) {
|
|
19036
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18955
19037
|
continue;
|
|
18956
19038
|
}
|
|
18957
|
-
if (
|
|
18958
|
-
e3 = e3.substring(
|
|
19039
|
+
if (s2 = this.tokenizer.del(e3, n2, r2)) {
|
|
19040
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18959
19041
|
continue;
|
|
18960
19042
|
}
|
|
18961
|
-
if (
|
|
18962
|
-
e3 = e3.substring(
|
|
19043
|
+
if (s2 = this.tokenizer.autolink(e3)) {
|
|
19044
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18963
19045
|
continue;
|
|
18964
19046
|
}
|
|
18965
|
-
if (!this.state.inLink && (
|
|
18966
|
-
e3 = e3.substring(
|
|
19047
|
+
if (!this.state.inLink && (s2 = this.tokenizer.url(e3))) {
|
|
19048
|
+
e3 = e3.substring(s2.raw.length), t2.push(s2);
|
|
18967
19049
|
continue;
|
|
18968
19050
|
}
|
|
18969
|
-
let
|
|
19051
|
+
let u2 = e3;
|
|
18970
19052
|
if (this.options.extensions?.startInline) {
|
|
18971
19053
|
let a2 = 1 / 0, p2 = e3.slice(1), c2;
|
|
18972
19054
|
this.options.extensions.startInline.forEach((h2) => {
|
|
18973
19055
|
c2 = h2.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (a2 = Math.min(a2, c2));
|
|
18974
|
-
}), a2 < 1 / 0 && a2 >= 0 && (
|
|
19056
|
+
}), a2 < 1 / 0 && a2 >= 0 && (u2 = e3.substring(0, a2 + 1));
|
|
18975
19057
|
}
|
|
18976
|
-
if (
|
|
18977
|
-
e3 = e3.substring(
|
|
19058
|
+
if (s2 = this.tokenizer.inlineText(u2)) {
|
|
19059
|
+
e3 = e3.substring(s2.raw.length), s2.raw.slice(-1) !== "_" && (r2 = s2.raw.slice(-1)), i2 = true;
|
|
18978
19060
|
let a2 = t2.at(-1);
|
|
18979
|
-
a2?.type === "text" ? (a2.raw +=
|
|
19061
|
+
a2?.type === "text" ? (a2.raw += s2.raw, a2.text += s2.text) : t2.push(s2);
|
|
18980
19062
|
continue;
|
|
18981
19063
|
}
|
|
18982
19064
|
if (e3) {
|
|
@@ -19002,9 +19084,9 @@ var P$1 = class P {
|
|
|
19002
19084
|
return "";
|
|
19003
19085
|
}
|
|
19004
19086
|
code({ text: e3, lang: t2, escaped: n2 }) {
|
|
19005
|
-
let
|
|
19087
|
+
let i2 = (t2 || "").match(m$1.notSpaceStart)?.[0], r2 = e3 ? e3.replace(m$1.endingNewline, "") + `
|
|
19006
19088
|
` : "";
|
|
19007
|
-
return
|
|
19089
|
+
return i2 ? '<pre><code class="language-' + R(i2) + '">' + (n2 ? r2 : R(r2, true)) + `</code></pre>
|
|
19008
19090
|
` : "<pre><code>" + (n2 ? r2 : R(r2, true)) + `</code></pre>
|
|
19009
19091
|
`;
|
|
19010
19092
|
}
|
|
@@ -19028,14 +19110,14 @@ ${this.parser.parse(e3)}</blockquote>
|
|
|
19028
19110
|
`;
|
|
19029
19111
|
}
|
|
19030
19112
|
list(e3) {
|
|
19031
|
-
let t2 = e3.ordered, n2 = e3.start,
|
|
19032
|
-
for (let
|
|
19033
|
-
let
|
|
19034
|
-
|
|
19113
|
+
let t2 = e3.ordered, n2 = e3.start, i2 = "";
|
|
19114
|
+
for (let s2 = 0; s2 < e3.items.length; s2++) {
|
|
19115
|
+
let u2 = e3.items[s2];
|
|
19116
|
+
i2 += this.listitem(u2);
|
|
19035
19117
|
}
|
|
19036
19118
|
let r2 = t2 ? "ol" : "ul", o2 = t2 && n2 !== 1 ? ' start="' + n2 + '"' : "";
|
|
19037
19119
|
return "<" + r2 + o2 + `>
|
|
19038
|
-
` +
|
|
19120
|
+
` + i2 + "</" + r2 + `>
|
|
19039
19121
|
`;
|
|
19040
19122
|
}
|
|
19041
19123
|
listitem(e3) {
|
|
@@ -19053,17 +19135,17 @@ ${this.parser.parse(e3)}</blockquote>
|
|
|
19053
19135
|
let t2 = "", n2 = "";
|
|
19054
19136
|
for (let r2 = 0; r2 < e3.header.length; r2++) n2 += this.tablecell(e3.header[r2]);
|
|
19055
19137
|
t2 += this.tablerow({ text: n2 });
|
|
19056
|
-
let
|
|
19138
|
+
let i2 = "";
|
|
19057
19139
|
for (let r2 = 0; r2 < e3.rows.length; r2++) {
|
|
19058
19140
|
let o2 = e3.rows[r2];
|
|
19059
19141
|
n2 = "";
|
|
19060
|
-
for (let
|
|
19061
|
-
|
|
19142
|
+
for (let s2 = 0; s2 < o2.length; s2++) n2 += this.tablecell(o2[s2]);
|
|
19143
|
+
i2 += this.tablerow({ text: n2 });
|
|
19062
19144
|
}
|
|
19063
|
-
return
|
|
19145
|
+
return i2 && (i2 = `<tbody>${i2}</tbody>`), `<table>
|
|
19064
19146
|
<thead>
|
|
19065
19147
|
` + t2 + `</thead>
|
|
19066
|
-
` +
|
|
19148
|
+
` + i2 + `</table>
|
|
19067
19149
|
`;
|
|
19068
19150
|
}
|
|
19069
19151
|
tablerow({ text: e3 }) {
|
|
@@ -19091,16 +19173,16 @@ ${e3}</tr>
|
|
|
19091
19173
|
del({ tokens: e3 }) {
|
|
19092
19174
|
return `<del>${this.parser.parseInline(e3)}</del>`;
|
|
19093
19175
|
}
|
|
19094
|
-
link({ href: e3, title: t2, text: n2, tokens:
|
|
19095
|
-
let o2 = r2 ? R(n2, true) : this.parser.parseInline(
|
|
19096
|
-
if (
|
|
19097
|
-
e3 = R(
|
|
19098
|
-
let
|
|
19099
|
-
return t2 && (
|
|
19176
|
+
link({ href: e3, title: t2, text: n2, tokens: i2, autolink: r2 }) {
|
|
19177
|
+
let o2 = r2 ? R(n2, true) : this.parser.parseInline(i2), s2 = ee(e3);
|
|
19178
|
+
if (s2 === null) return o2;
|
|
19179
|
+
e3 = R(s2, r2);
|
|
19180
|
+
let u2 = '<a href="' + e3 + '"';
|
|
19181
|
+
return t2 && (u2 += ' title="' + R(t2) + '"'), u2 += ">" + o2 + "</a>", u2;
|
|
19100
19182
|
}
|
|
19101
|
-
image({ href: e3, title: t2, text: n2, tokens:
|
|
19102
|
-
|
|
19103
|
-
let r2 =
|
|
19183
|
+
image({ href: e3, title: t2, text: n2, tokens: i2 }) {
|
|
19184
|
+
i2 && (n2 = this.parser.parseInline(i2, this.parser.textRenderer));
|
|
19185
|
+
let r2 = ee(e3);
|
|
19104
19186
|
if (r2 === null) return R(n2);
|
|
19105
19187
|
e3 = r2;
|
|
19106
19188
|
let o2 = `<img src="${R(e3)}" alt="${R(n2)}"`;
|
|
@@ -19142,7 +19224,7 @@ var L = class {
|
|
|
19142
19224
|
return e3;
|
|
19143
19225
|
}
|
|
19144
19226
|
};
|
|
19145
|
-
var b$1 = class
|
|
19227
|
+
var b$1 = class l2 {
|
|
19146
19228
|
options;
|
|
19147
19229
|
renderer;
|
|
19148
19230
|
textRenderer;
|
|
@@ -19150,24 +19232,24 @@ var b$1 = class u2 {
|
|
|
19150
19232
|
this.options = e3 || T, this.options.renderer = this.options.renderer || new P$1(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
|
|
19151
19233
|
}
|
|
19152
19234
|
static parse(e3, t2) {
|
|
19153
|
-
return new
|
|
19235
|
+
return new l2(t2).parse(e3);
|
|
19154
19236
|
}
|
|
19155
19237
|
static parseInline(e3, t2) {
|
|
19156
|
-
return new
|
|
19238
|
+
return new l2(t2).parseInline(e3);
|
|
19157
19239
|
}
|
|
19158
19240
|
parse(e3) {
|
|
19159
19241
|
this.renderer.parser = this;
|
|
19160
19242
|
let t2 = "";
|
|
19161
19243
|
for (let n2 = 0; n2 < e3.length; n2++) {
|
|
19162
|
-
let
|
|
19163
|
-
if (this.options.extensions?.renderers?.[
|
|
19164
|
-
let o2 =
|
|
19165
|
-
if (
|
|
19166
|
-
t2 +=
|
|
19244
|
+
let i2 = e3[n2];
|
|
19245
|
+
if (this.options.extensions?.renderers?.[i2.type]) {
|
|
19246
|
+
let o2 = i2, s2 = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
|
|
19247
|
+
if (s2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
|
|
19248
|
+
t2 += s2 || "";
|
|
19167
19249
|
continue;
|
|
19168
19250
|
}
|
|
19169
19251
|
}
|
|
19170
|
-
let r2 =
|
|
19252
|
+
let r2 = i2;
|
|
19171
19253
|
switch (r2.type) {
|
|
19172
19254
|
case "space": {
|
|
19173
19255
|
t2 += this.renderer.space(r2);
|
|
@@ -19229,12 +19311,12 @@ var b$1 = class u2 {
|
|
|
19229
19311
|
parseInline(e3, t2 = this.renderer) {
|
|
19230
19312
|
this.renderer.parser = this;
|
|
19231
19313
|
let n2 = "";
|
|
19232
|
-
for (let
|
|
19233
|
-
let r2 = e3[
|
|
19314
|
+
for (let i2 = 0; i2 < e3.length; i2++) {
|
|
19315
|
+
let r2 = e3[i2];
|
|
19234
19316
|
if (this.options.extensions?.renderers?.[r2.type]) {
|
|
19235
|
-
let
|
|
19236
|
-
if (
|
|
19237
|
-
n2 +=
|
|
19317
|
+
let s2 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
|
|
19318
|
+
if (s2 !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
|
|
19319
|
+
n2 += s2 || "";
|
|
19238
19320
|
continue;
|
|
19239
19321
|
}
|
|
19240
19322
|
}
|
|
@@ -19285,9 +19367,9 @@ var b$1 = class u2 {
|
|
|
19285
19367
|
break;
|
|
19286
19368
|
}
|
|
19287
19369
|
default: {
|
|
19288
|
-
let
|
|
19289
|
-
if (this.options.silent) return console.error(
|
|
19290
|
-
throw new Error(
|
|
19370
|
+
let s2 = 'Token with "' + o2.type + '" type was not found.';
|
|
19371
|
+
if (this.options.silent) return console.error(s2), "";
|
|
19372
|
+
throw new Error(s2);
|
|
19291
19373
|
}
|
|
19292
19374
|
}
|
|
19293
19375
|
}
|
|
@@ -19321,7 +19403,7 @@ var S$1 = class S {
|
|
|
19321
19403
|
return e3 ? b$1.parse : b$1.parseInline;
|
|
19322
19404
|
}
|
|
19323
19405
|
};
|
|
19324
|
-
var
|
|
19406
|
+
var Q = class {
|
|
19325
19407
|
defaults = A();
|
|
19326
19408
|
options = this.setOptions;
|
|
19327
19409
|
parse = this.parseMarkdown(true);
|
|
@@ -19337,23 +19419,23 @@ var Z = class {
|
|
|
19337
19419
|
}
|
|
19338
19420
|
walkTokens(e3, t2) {
|
|
19339
19421
|
let n2 = [];
|
|
19340
|
-
for (let
|
|
19422
|
+
for (let i2 of e3) switch (n2 = n2.concat(t2.call(this, i2)), i2.type) {
|
|
19341
19423
|
case "table": {
|
|
19342
|
-
let r2 =
|
|
19424
|
+
let r2 = i2;
|
|
19343
19425
|
for (let o2 of r2.header) n2 = n2.concat(this.walkTokens(o2.tokens, t2));
|
|
19344
|
-
for (let o2 of r2.rows) for (let
|
|
19426
|
+
for (let o2 of r2.rows) for (let s2 of o2) n2 = n2.concat(this.walkTokens(s2.tokens, t2));
|
|
19345
19427
|
break;
|
|
19346
19428
|
}
|
|
19347
19429
|
case "list": {
|
|
19348
|
-
let r2 =
|
|
19430
|
+
let r2 = i2;
|
|
19349
19431
|
n2 = n2.concat(this.walkTokens(r2.items, t2));
|
|
19350
19432
|
break;
|
|
19351
19433
|
}
|
|
19352
19434
|
default: {
|
|
19353
|
-
let r2 =
|
|
19435
|
+
let r2 = i2;
|
|
19354
19436
|
this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((o2) => {
|
|
19355
|
-
let
|
|
19356
|
-
n2 = n2.concat(this.walkTokens(
|
|
19437
|
+
let s2 = r2[o2].flat(1 / 0);
|
|
19438
|
+
n2 = n2.concat(this.walkTokens(s2, t2));
|
|
19357
19439
|
}) : r2.tokens && (n2 = n2.concat(this.walkTokens(r2.tokens, t2)));
|
|
19358
19440
|
}
|
|
19359
19441
|
}
|
|
@@ -19362,14 +19444,14 @@ var Z = class {
|
|
|
19362
19444
|
use(...e3) {
|
|
19363
19445
|
let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
19364
19446
|
return e3.forEach((n2) => {
|
|
19365
|
-
let
|
|
19366
|
-
if (
|
|
19447
|
+
let i2 = { ...n2 };
|
|
19448
|
+
if (i2.async = this.defaults.async || i2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
|
|
19367
19449
|
if (!r2.name) throw new Error("extension name required");
|
|
19368
19450
|
if ("renderer" in r2) {
|
|
19369
19451
|
let o2 = t2.renderers[r2.name];
|
|
19370
|
-
o2 ? t2.renderers[r2.name] = function(...
|
|
19371
|
-
let
|
|
19372
|
-
return
|
|
19452
|
+
o2 ? t2.renderers[r2.name] = function(...s2) {
|
|
19453
|
+
let u2 = r2.renderer.apply(this, s2);
|
|
19454
|
+
return u2 === false && (u2 = o2.apply(this, s2)), u2;
|
|
19373
19455
|
} : t2.renderers[r2.name] = r2.renderer;
|
|
19374
19456
|
}
|
|
19375
19457
|
if ("tokenizer" in r2) {
|
|
@@ -19378,64 +19460,64 @@ var Z = class {
|
|
|
19378
19460
|
o2 ? o2.unshift(r2.tokenizer) : t2[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t2.startBlock ? t2.startBlock.push(r2.start) : t2.startBlock = [r2.start] : r2.level === "inline" && (t2.startInline ? t2.startInline.push(r2.start) : t2.startInline = [r2.start]));
|
|
19379
19461
|
}
|
|
19380
19462
|
"childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
|
|
19381
|
-
}),
|
|
19463
|
+
}), i2.extensions = t2), n2.renderer) {
|
|
19382
19464
|
let r2 = this.defaults.renderer || new P$1(this.defaults);
|
|
19383
19465
|
for (let o2 in n2.renderer) {
|
|
19384
19466
|
if (!(o2 in r2)) throw new Error(`renderer '${o2}' does not exist`);
|
|
19385
19467
|
if (["options", "parser"].includes(o2)) continue;
|
|
19386
|
-
let
|
|
19387
|
-
r2[
|
|
19388
|
-
let c2 =
|
|
19468
|
+
let s2 = o2, u2 = n2.renderer[s2], a2 = r2[s2];
|
|
19469
|
+
r2[s2] = (...p2) => {
|
|
19470
|
+
let c2 = u2.apply(r2, p2);
|
|
19389
19471
|
return c2 === false && (c2 = a2.apply(r2, p2)), c2 || "";
|
|
19390
19472
|
};
|
|
19391
19473
|
}
|
|
19392
|
-
|
|
19474
|
+
i2.renderer = r2;
|
|
19393
19475
|
}
|
|
19394
19476
|
if (n2.tokenizer) {
|
|
19395
19477
|
let r2 = this.defaults.tokenizer || new y$1(this.defaults);
|
|
19396
19478
|
for (let o2 in n2.tokenizer) {
|
|
19397
19479
|
if (!(o2 in r2)) throw new Error(`tokenizer '${o2}' does not exist`);
|
|
19398
19480
|
if (["options", "rules", "lexer"].includes(o2)) continue;
|
|
19399
|
-
let
|
|
19400
|
-
r2[
|
|
19401
|
-
let c2 =
|
|
19481
|
+
let s2 = o2, u2 = n2.tokenizer[s2], a2 = r2[s2];
|
|
19482
|
+
r2[s2] = (...p2) => {
|
|
19483
|
+
let c2 = u2.apply(r2, p2);
|
|
19402
19484
|
return c2 === false && (c2 = a2.apply(r2, p2)), c2;
|
|
19403
19485
|
};
|
|
19404
19486
|
}
|
|
19405
|
-
|
|
19487
|
+
i2.tokenizer = r2;
|
|
19406
19488
|
}
|
|
19407
19489
|
if (n2.hooks) {
|
|
19408
19490
|
let r2 = this.defaults.hooks || new S$1();
|
|
19409
19491
|
for (let o2 in n2.hooks) {
|
|
19410
19492
|
if (!(o2 in r2)) throw new Error(`hook '${o2}' does not exist`);
|
|
19411
19493
|
if (["options", "block"].includes(o2)) continue;
|
|
19412
|
-
let
|
|
19413
|
-
S$1.passThroughHooks.has(o2) ? r2[
|
|
19494
|
+
let s2 = o2, u2 = n2.hooks[s2], a2 = r2[s2];
|
|
19495
|
+
S$1.passThroughHooks.has(o2) ? r2[s2] = (p2) => {
|
|
19414
19496
|
if (this.defaults.async && S$1.passThroughHooksRespectAsync.has(o2)) return (async () => {
|
|
19415
|
-
let h2 = await
|
|
19497
|
+
let h2 = await u2.call(r2, p2);
|
|
19416
19498
|
return a2.call(r2, h2);
|
|
19417
19499
|
})();
|
|
19418
|
-
let c2 =
|
|
19500
|
+
let c2 = u2.call(r2, p2);
|
|
19419
19501
|
return a2.call(r2, c2);
|
|
19420
|
-
} : r2[
|
|
19502
|
+
} : r2[s2] = (...p2) => {
|
|
19421
19503
|
if (this.defaults.async) return (async () => {
|
|
19422
|
-
let h2 = await
|
|
19504
|
+
let h2 = await u2.apply(r2, p2);
|
|
19423
19505
|
return h2 === false && (h2 = await a2.apply(r2, p2)), h2;
|
|
19424
19506
|
})();
|
|
19425
|
-
let c2 =
|
|
19507
|
+
let c2 = u2.apply(r2, p2);
|
|
19426
19508
|
return c2 === false && (c2 = a2.apply(r2, p2)), c2;
|
|
19427
19509
|
};
|
|
19428
19510
|
}
|
|
19429
|
-
|
|
19511
|
+
i2.hooks = r2;
|
|
19430
19512
|
}
|
|
19431
19513
|
if (n2.walkTokens) {
|
|
19432
19514
|
let r2 = this.defaults.walkTokens, o2 = n2.walkTokens;
|
|
19433
|
-
|
|
19434
|
-
let
|
|
19435
|
-
return
|
|
19515
|
+
i2.walkTokens = function(s2) {
|
|
19516
|
+
let u2 = [];
|
|
19517
|
+
return u2.push(o2.call(this, s2)), r2 && (u2 = u2.concat(r2.call(this, s2))), u2;
|
|
19436
19518
|
};
|
|
19437
19519
|
}
|
|
19438
|
-
this.defaults = { ...this.defaults, ...
|
|
19520
|
+
this.defaults = { ...this.defaults, ...i2 };
|
|
19439
19521
|
}), this;
|
|
19440
19522
|
}
|
|
19441
19523
|
setOptions(e3) {
|
|
@@ -19448,25 +19530,25 @@ var Z = class {
|
|
|
19448
19530
|
return b$1.parse(e3, t2 ?? this.defaults);
|
|
19449
19531
|
}
|
|
19450
19532
|
parseMarkdown(e3) {
|
|
19451
|
-
return (n2,
|
|
19452
|
-
let r2 = { ...
|
|
19453
|
-
if (this.defaults.async === true && r2.async === false) return
|
|
19454
|
-
if (typeof n2 > "u" || n2 === null) return
|
|
19455
|
-
if (typeof n2 != "string") return
|
|
19533
|
+
return (n2, i2) => {
|
|
19534
|
+
let r2 = { ...i2 }, o2 = { ...this.defaults, ...r2 }, s2 = this.onError(!!o2.silent, !!o2.async);
|
|
19535
|
+
if (this.defaults.async === true && r2.async === false) return s2(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
19536
|
+
if (typeof n2 > "u" || n2 === null) return s2(new Error("marked(): input parameter is undefined or null"));
|
|
19537
|
+
if (typeof n2 != "string") return s2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
|
|
19456
19538
|
if (o2.hooks && (o2.hooks.options = o2, o2.hooks.block = e3), o2.async) return (async () => {
|
|
19457
|
-
let
|
|
19539
|
+
let u2 = o2.hooks ? await o2.hooks.preprocess(n2) : n2, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(u2, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
|
|
19458
19540
|
o2.walkTokens && await Promise.all(this.walkTokens(c2, o2.walkTokens));
|
|
19459
|
-
let
|
|
19460
|
-
return o2.hooks ? await o2.hooks.postprocess(
|
|
19461
|
-
})().catch(
|
|
19541
|
+
let k = await (o2.hooks ? await o2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(c2, o2);
|
|
19542
|
+
return o2.hooks ? await o2.hooks.postprocess(k) : k;
|
|
19543
|
+
})().catch(s2);
|
|
19462
19544
|
try {
|
|
19463
19545
|
o2.hooks && (n2 = o2.hooks.preprocess(n2));
|
|
19464
19546
|
let a2 = (o2.hooks ? o2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(n2, o2);
|
|
19465
19547
|
o2.hooks && (a2 = o2.hooks.processAllTokens(a2)), o2.walkTokens && this.walkTokens(a2, o2.walkTokens);
|
|
19466
19548
|
let c2 = (o2.hooks ? o2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(a2, o2);
|
|
19467
19549
|
return o2.hooks && (c2 = o2.hooks.postprocess(c2)), c2;
|
|
19468
|
-
} catch (
|
|
19469
|
-
return
|
|
19550
|
+
} catch (u2) {
|
|
19551
|
+
return s2(u2);
|
|
19470
19552
|
}
|
|
19471
19553
|
};
|
|
19472
19554
|
}
|
|
@@ -19474,29 +19556,29 @@ var Z = class {
|
|
|
19474
19556
|
return (n2) => {
|
|
19475
19557
|
if (n2.message += `
|
|
19476
19558
|
Please report this to https://github.com/markedjs/marked.`, e3) {
|
|
19477
|
-
let
|
|
19478
|
-
return t2 ? Promise.resolve(
|
|
19559
|
+
let i2 = "<p>An error occurred:</p><pre>" + R(n2.message + "", true) + "</pre>";
|
|
19560
|
+
return t2 ? Promise.resolve(i2) : i2;
|
|
19479
19561
|
}
|
|
19480
19562
|
if (t2) return Promise.reject(n2);
|
|
19481
19563
|
throw n2;
|
|
19482
19564
|
};
|
|
19483
19565
|
}
|
|
19484
19566
|
};
|
|
19485
|
-
var M = new
|
|
19486
|
-
function f$1(
|
|
19487
|
-
return M.parse(
|
|
19567
|
+
var M = new Q();
|
|
19568
|
+
function f$1(l4, e3) {
|
|
19569
|
+
return M.parse(l4, e3);
|
|
19488
19570
|
}
|
|
19489
|
-
f$1.options = f$1.setOptions = function(
|
|
19490
|
-
return M.setOptions(
|
|
19571
|
+
f$1.options = f$1.setOptions = function(l4) {
|
|
19572
|
+
return M.setOptions(l4), f$1.defaults = M.defaults, U(f$1.defaults), f$1;
|
|
19491
19573
|
};
|
|
19492
19574
|
f$1.getDefaults = A;
|
|
19493
19575
|
f$1.defaults = T;
|
|
19494
|
-
function
|
|
19495
|
-
return M.use(...
|
|
19576
|
+
function bt(...l4) {
|
|
19577
|
+
return M.use(...l4), f$1.defaults = M.defaults, U(f$1.defaults), f$1;
|
|
19496
19578
|
}
|
|
19497
|
-
f$1.use =
|
|
19498
|
-
f$1.walkTokens = function(
|
|
19499
|
-
return M.walkTokens(
|
|
19579
|
+
f$1.use = bt;
|
|
19580
|
+
f$1.walkTokens = function(l4, e3) {
|
|
19581
|
+
return M.walkTokens(l4, e3);
|
|
19500
19582
|
};
|
|
19501
19583
|
f$1.parseInline = M.parseInline;
|
|
19502
19584
|
f$1.Parser = b$1;
|
|
@@ -19522,18 +19604,18 @@ function _arrayLikeToArray(r2, a2) {
|
|
|
19522
19604
|
function _arrayWithHoles(r2) {
|
|
19523
19605
|
if (Array.isArray(r2)) return r2;
|
|
19524
19606
|
}
|
|
19525
|
-
function _iterableToArrayLimit(r2,
|
|
19607
|
+
function _iterableToArrayLimit(r2, l4) {
|
|
19526
19608
|
var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
|
|
19527
19609
|
if (null != t2) {
|
|
19528
|
-
var e3, n2, i2,
|
|
19610
|
+
var e3, n2, i2, u2, a2 = [], f2 = true, o2 = false;
|
|
19529
19611
|
try {
|
|
19530
|
-
if (i2 = (t2 = t2.call(r2)).next, 0 ===
|
|
19531
|
-
else for (; !(f2 = (e3 = i2.call(t2)).done) && (a2.push(e3.value), a2.length !==
|
|
19612
|
+
if (i2 = (t2 = t2.call(r2)).next, 0 === l4) ;
|
|
19613
|
+
else for (; !(f2 = (e3 = i2.call(t2)).done) && (a2.push(e3.value), a2.length !== l4); f2 = true) ;
|
|
19532
19614
|
} catch (r3) {
|
|
19533
19615
|
o2 = true, n2 = r3;
|
|
19534
19616
|
} finally {
|
|
19535
19617
|
try {
|
|
19536
|
-
if (!f2 && null != t2.return && (
|
|
19618
|
+
if (!f2 && null != t2.return && (u2 = t2.return(), Object(u2) !== u2)) return;
|
|
19537
19619
|
} finally {
|
|
19538
19620
|
if (o2) throw n2;
|
|
19539
19621
|
}
|
|
@@ -19630,14 +19712,14 @@ function addToSet(set, array) {
|
|
|
19630
19712
|
if (!arrayIsArray(array)) {
|
|
19631
19713
|
return set;
|
|
19632
19714
|
}
|
|
19633
|
-
let
|
|
19634
|
-
while (
|
|
19635
|
-
let element = array[
|
|
19715
|
+
let l4 = array.length;
|
|
19716
|
+
while (l4--) {
|
|
19717
|
+
let element = array[l4];
|
|
19636
19718
|
if (typeof element === "string") {
|
|
19637
19719
|
const lcElement = transformCaseFunc(element);
|
|
19638
19720
|
if (lcElement !== element) {
|
|
19639
19721
|
if (!isFrozen(array)) {
|
|
19640
|
-
array[
|
|
19722
|
+
array[l4] = lcElement;
|
|
19641
19723
|
}
|
|
19642
19724
|
element = lcElement;
|
|
19643
19725
|
}
|
|
@@ -20789,10 +20871,10 @@ function createDOMPurify() {
|
|
|
20789
20871
|
allowedAttributes: ALLOWED_ATTR,
|
|
20790
20872
|
forceKeepAttr: void 0
|
|
20791
20873
|
};
|
|
20792
|
-
let
|
|
20874
|
+
let l4 = attributes.length;
|
|
20793
20875
|
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
20794
|
-
while (
|
|
20795
|
-
const attr = attributes[
|
|
20876
|
+
while (l4--) {
|
|
20877
|
+
const attr = attributes[l4];
|
|
20796
20878
|
const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
|
|
20797
20879
|
const lcName = transformCaseFunc(name);
|
|
20798
20880
|
const initValue = attrValue;
|
|
@@ -21115,17 +21197,23 @@ function renderMarkdownSegments(md) {
|
|
|
21115
21197
|
const tokens = f$1.lexer(md);
|
|
21116
21198
|
const segments = [];
|
|
21117
21199
|
let buffer = [];
|
|
21118
|
-
|
|
21200
|
+
function renderGroup(group) {
|
|
21201
|
+
const list = group;
|
|
21202
|
+
list.links = tokens.links;
|
|
21203
|
+
return purify.sanitize(f$1.parser(list));
|
|
21204
|
+
}
|
|
21205
|
+
function flush() {
|
|
21119
21206
|
if (buffer.length === 0) return;
|
|
21120
|
-
|
|
21121
|
-
group.links = tokens.links;
|
|
21122
|
-
segments.push({ type: "html", html: purify.sanitize(f$1.parser(group)) });
|
|
21207
|
+
segments.push({ type: "html", html: renderGroup(buffer) });
|
|
21123
21208
|
buffer = [];
|
|
21124
|
-
}
|
|
21209
|
+
}
|
|
21125
21210
|
for (const token of tokens) {
|
|
21126
21211
|
if (token.type === "code") {
|
|
21127
21212
|
flush();
|
|
21128
21213
|
segments.push({ type: "code", code: token.text, lang: token.lang ?? "" });
|
|
21214
|
+
} else if (token.type === "table") {
|
|
21215
|
+
flush();
|
|
21216
|
+
segments.push({ type: "table", html: renderGroup([token]) });
|
|
21129
21217
|
} else {
|
|
21130
21218
|
buffer.push(token);
|
|
21131
21219
|
}
|
|
@@ -21162,10 +21250,10 @@ function getSelectionFocus(container) {
|
|
|
21162
21250
|
function getShadowRootSelection(root2) {
|
|
21163
21251
|
return root2.getSelection?.() ?? null;
|
|
21164
21252
|
}
|
|
21165
|
-
const _hoisted_1$
|
|
21166
|
-
const _hoisted_2$
|
|
21167
|
-
const _hoisted_3$
|
|
21168
|
-
const _sfc_main$
|
|
21253
|
+
const _hoisted_1$B = { class: "markdown-editor" };
|
|
21254
|
+
const _hoisted_2$t = ["aria-label"];
|
|
21255
|
+
const _hoisted_3$m = ["contenteditable"];
|
|
21256
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
21169
21257
|
__name: "MarkdownEditor",
|
|
21170
21258
|
props: {
|
|
21171
21259
|
modelValue: { type: String },
|
|
@@ -21386,7 +21474,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
21386
21474
|
}
|
|
21387
21475
|
);
|
|
21388
21476
|
return (_ctx, _cache) => {
|
|
21389
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
21477
|
+
return openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
21390
21478
|
!__props.disabled ? (openBlock(), createElementBlock("div", {
|
|
21391
21479
|
key: 0,
|
|
21392
21480
|
class: "markdown-editor__toolbar",
|
|
@@ -21497,7 +21585,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
21497
21585
|
title: unref(t2)("mdToolbar.redo"),
|
|
21498
21586
|
onClick: _cache[8] || (_cache[8] = ($event) => execCmd("redo"))
|
|
21499
21587
|
}, null, 8, ["aria-label", "title"])
|
|
21500
|
-
], 8, _hoisted_2$
|
|
21588
|
+
], 8, _hoisted_2$t)) : createCommentVNode("", true),
|
|
21501
21589
|
createBaseVNode("div", {
|
|
21502
21590
|
ref: "editorEl",
|
|
21503
21591
|
class: "markdown-editor__content",
|
|
@@ -21507,16 +21595,17 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
21507
21595
|
onPaste,
|
|
21508
21596
|
onFocus: startSelectionListener,
|
|
21509
21597
|
onBlur: stopSelectionListener
|
|
21510
|
-
}, null, 40, _hoisted_3$
|
|
21598
|
+
}, null, 40, _hoisted_3$m)
|
|
21511
21599
|
]);
|
|
21512
21600
|
};
|
|
21513
21601
|
}
|
|
21514
21602
|
});
|
|
21515
|
-
const _style_0$
|
|
21516
|
-
const MarkdownEditor = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21517
|
-
const _hoisted_1$
|
|
21518
|
-
const _hoisted_2$
|
|
21519
|
-
const
|
|
21603
|
+
const _style_0$z = "\n.markdown-editor[data-v-a278828c] {\n display: flex;\n flex-direction: column;\n font-family: var(--font-family);\n font-size: var(--font-size-base);\n line-height: var(--line-height);\n color: var(--color-text-primary);\n}\n.markdown-editor__toolbar[data-v-a278828c] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-xs);\n padding: var(--spacing-xs) var(--spacing-md);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n position: sticky;\n top: var(--document-toolbar-height, 0px);\n z-index: 1;\n}\n.markdown-editor__separator[data-v-a278828c] {\n width: 1px;\n height: 20px;\n background-color: var(--color-border);\n margin: 0 var(--spacing-xs);\n}\n.markdown-editor__content[data-v-a278828c] {\n padding: 4rem clamp(1.5rem, 6rem, 8%);\n outline: none;\n min-height: 200px;\n}\n.markdown-editor__content[data-v-a278828c] > *:first-child {\n margin-top: 0;\n}\n.markdown-editor__content[data-v-a278828c] h1,\n.markdown-editor__content[data-v-a278828c] h2,\n.markdown-editor__content[data-v-a278828c] h3,\n.markdown-editor__content[data-v-a278828c] h4 {\n margin: var(--spacing-lg) 0 var(--spacing-sm);\n font-weight: 700;\n color: var(--color-text-primary);\n}\n.markdown-editor__content[data-v-a278828c] h1 {\n font-size: var(--font-size-xl);\n}\n.markdown-editor__content[data-v-a278828c] h2 {\n font-size: var(--font-size-lg);\n}\n.markdown-editor__content[data-v-a278828c] h3 {\n font-size: var(--font-size-base);\n}\n.markdown-editor__content[data-v-a278828c] h4 {\n font-size: var(--font-size-sm);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--color-text-secondary);\n}\n.markdown-editor__content[data-v-a278828c] p {\n margin: 0 0 var(--spacing-md);\n}\n.markdown-editor__content[data-v-a278828c] ul,\n.markdown-editor__content[data-v-a278828c] ol {\n margin: 0 0 var(--spacing-md);\n padding-left: var(--spacing-lg);\n}\n.markdown-editor__content[data-v-a278828c] li {\n margin: var(--spacing-xs) 0;\n}\n.markdown-editor__content[data-v-a278828c] blockquote {\n margin: var(--spacing-md) 0;\n padding: var(--spacing-sm) var(--spacing-md);\n border-left: 3px solid var(--color-border);\n color: var(--color-text-secondary);\n font-style: italic;\n}\n.markdown-editor__content[data-v-a278828c] code {\n font-family: var(--font-family-mono);\n font-size: 0.9em;\n padding: 1px 4px;\n background-color: var(--color-surface);\n border-radius: var(--radius-sm);\n}\n.markdown-editor__content[data-v-a278828c] pre {\n margin: var(--spacing-md) 0;\n padding: var(--spacing-md);\n background-color: var(--color-surface);\n border-radius: var(--radius-md);\n overflow-x: auto;\n}\n.markdown-editor__content[data-v-a278828c] pre code {\n padding: 0;\n background: none;\n}\n.markdown-editor__content[data-v-a278828c] a {\n color: var(--color-primary);\n text-decoration: underline;\n}\n.markdown-editor__content[data-v-a278828c] hr {\n border: 0;\n border-top: 1px solid var(--color-border);\n margin: var(--spacing-lg) 0;\n}\n.markdown-editor__content[data-v-a278828c] strong {\n font-weight: 700;\n}\n.markdown-editor__content[data-v-a278828c] table {\n border-collapse: collapse;\n margin: var(--spacing-md) 0;\n}\n.markdown-editor__content[data-v-a278828c] th,\n.markdown-editor__content[data-v-a278828c] td {\n border: 1px solid var(--color-border);\n padding: var(--spacing-xs) var(--spacing-sm);\n}\n.markdown-editor__content[data-v-a278828c] th {\n background-color: var(--color-surface);\n font-weight: 600;\n}\n";
|
|
21604
|
+
const MarkdownEditor = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["styles", [_style_0$z]], ["__scopeId", "data-v-a278828c"]]);
|
|
21605
|
+
const _hoisted_1$A = { class: "markdown-view" };
|
|
21606
|
+
const _hoisted_2$s = ["innerHTML"];
|
|
21607
|
+
const _hoisted_3$l = ["innerHTML"];
|
|
21608
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
21520
21609
|
__name: "MarkdownView",
|
|
21521
21610
|
props: {
|
|
21522
21611
|
source: { type: String },
|
|
@@ -21526,15 +21615,19 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
21526
21615
|
const props = __props;
|
|
21527
21616
|
const segments = computed(() => renderMarkdownSegments(props.source));
|
|
21528
21617
|
return (_ctx, _cache) => {
|
|
21529
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
21618
|
+
return openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
21530
21619
|
(openBlock(true), createElementBlock(Fragment, null, renderList(segments.value, (seg, i2) => {
|
|
21531
21620
|
return openBlock(), createElementBlock(Fragment, { key: i2 }, [
|
|
21532
21621
|
seg.type === "html" ? (openBlock(), createElementBlock("div", {
|
|
21533
21622
|
key: 0,
|
|
21534
21623
|
class: "markdown-view__html",
|
|
21535
21624
|
innerHTML: seg.html
|
|
21536
|
-
}, null, 8, _hoisted_2$
|
|
21625
|
+
}, null, 8, _hoisted_2$s)) : seg.type === "table" ? (openBlock(), createElementBlock("div", {
|
|
21537
21626
|
key: 1,
|
|
21627
|
+
class: "markdown-view__table",
|
|
21628
|
+
innerHTML: seg.html
|
|
21629
|
+
}, null, 8, _hoisted_3$l)) : (openBlock(), createBlock(CodeBlock, {
|
|
21630
|
+
key: 2,
|
|
21538
21631
|
code: seg.code,
|
|
21539
21632
|
lang: seg.lang,
|
|
21540
21633
|
streaming: __props.streaming
|
|
@@ -21545,18 +21638,18 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
21545
21638
|
};
|
|
21546
21639
|
}
|
|
21547
21640
|
});
|
|
21548
|
-
const _style_0$
|
|
21549
|
-
const MarkdownView = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21550
|
-
const _hoisted_1$
|
|
21641
|
+
const _style_0$y = "\n.markdown-view[data-v-b6eeece0] {\n font-family: var(--font-family);\n font-size: var(--font-size-base);\n line-height: var(--line-height);\n color: var(--color-text-primary);\n /* Long URLs and identifiers wrap instead of running past a narrow\n column (phones, chat), where the overflow would just be clipped. */\n overflow-wrap: break-word;\n}\n\n/* No box: block children flow as direct children of .markdown-view so margin\n collapsing keeps working across html/code segment boundaries. */\n.markdown-view__html[data-v-b6eeece0] {\n display: contents;\n}\n\n/* Trim the outer margins of the first/last rendered block (reach through the\n display:contents wrapper to the real content element). */\n.markdown-view > .markdown-view__html[data-v-b6eeece0]:first-child > :first-child {\n margin-top: 0;\n}\n.markdown-view > .markdown-view__html[data-v-b6eeece0]:last-child > :last-child {\n margin-bottom: 0;\n}\n.markdown-view > .markdown-view__table[data-v-b6eeece0]:first-child {\n margin-top: 0;\n}\n.markdown-view > .markdown-view__table[data-v-b6eeece0]:last-child {\n margin-bottom: 0;\n}\n.markdown-view[data-v-b6eeece0] h1,\n.markdown-view[data-v-b6eeece0] h2,\n.markdown-view[data-v-b6eeece0] h3,\n.markdown-view[data-v-b6eeece0] h4 {\n margin: var(--spacing-lg) 0 var(--spacing-sm);\n font-weight: 700;\n color: var(--color-text-primary);\n}\n.markdown-view[data-v-b6eeece0] h1 {\n font-size: var(--font-size-xl);\n}\n.markdown-view[data-v-b6eeece0] h2 {\n font-size: var(--font-size-lg);\n}\n.markdown-view[data-v-b6eeece0] h3 {\n font-size: var(--font-size-base);\n}\n.markdown-view[data-v-b6eeece0] h4 {\n font-size: var(--font-size-sm);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--color-text-secondary);\n}\n.markdown-view[data-v-b6eeece0] p {\n margin: 0 0 var(--spacing-md);\n}\n.markdown-view[data-v-b6eeece0] ul,\n.markdown-view[data-v-b6eeece0] ol {\n margin: 0 0 var(--spacing-md);\n padding-left: var(--spacing-lg);\n}\n.markdown-view[data-v-b6eeece0] li {\n margin: var(--spacing-xs) 0;\n}\n.markdown-view[data-v-b6eeece0] blockquote {\n margin: var(--spacing-md) 0;\n padding: var(--spacing-sm) var(--spacing-md);\n border-left: 3px solid var(--color-border);\n color: var(--color-text-secondary);\n font-style: italic;\n}\n\n/* Inline code only — fenced blocks render via <CodeBlock>. Scoped to the html\n wrapper so it never reaches into the CodeBlock component. */\n.markdown-view__html[data-v-b6eeece0] code {\n font-family: var(--font-family-mono);\n font-size: 0.9em;\n padding: 1px 4px;\n background-color: var(--color-surface);\n border-radius: var(--radius-sm);\n}\n\n/* Fallback for raw <pre> written as literal HTML (not fenced code). */\n.markdown-view__html[data-v-b6eeece0] pre {\n margin: var(--spacing-md) 0;\n padding: var(--spacing-md);\n background-color: var(--color-surface);\n border-radius: var(--radius-md);\n overflow-x: auto;\n border: 1px solid var(--color-border);\n}\n.markdown-view__html[data-v-b6eeece0] pre code {\n padding: 0;\n background: none;\n}\n.markdown-view[data-v-b6eeece0] a {\n color: var(--color-primary);\n text-decoration: underline;\n}\n.markdown-view[data-v-b6eeece0] hr {\n border: 0;\n border-top: 1px solid var(--color-border);\n margin: var(--spacing-lg) 0;\n}\n.markdown-view[data-v-b6eeece0] strong {\n font-weight: 700;\n}\n.markdown-view[data-v-b6eeece0] img {\n max-width: 100%;\n height: auto;\n}\n\n/* A table wider than the column scrolls on its own, the text around it\n keeps the column width. */\n.markdown-view__table[data-v-b6eeece0] {\n margin: var(--spacing-md) 0;\n overflow-x: auto;\n}\n.markdown-view[data-v-b6eeece0] table {\n border-collapse: collapse;\n}\n.markdown-view[data-v-b6eeece0] th,\n.markdown-view[data-v-b6eeece0] td {\n border: 1px solid var(--color-border);\n padding: var(--spacing-xs) var(--spacing-sm);\n}\n.markdown-view[data-v-b6eeece0] th {\n background-color: var(--color-surface);\n font-weight: 600;\n}\n";
|
|
21642
|
+
const MarkdownView = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["styles", [_style_0$y]], ["__scopeId", "data-v-b6eeece0"]]);
|
|
21643
|
+
const _hoisted_1$z = {
|
|
21551
21644
|
key: 0,
|
|
21552
21645
|
class: "transcript-ui-popover-list__items"
|
|
21553
21646
|
};
|
|
21554
|
-
const _hoisted_2$
|
|
21647
|
+
const _hoisted_2$r = {
|
|
21555
21648
|
key: 0,
|
|
21556
21649
|
class: "transcript-ui-popover-list__divider"
|
|
21557
21650
|
};
|
|
21558
21651
|
const _hoisted_3$k = { class: "transcript-ui-popover-list__footer" };
|
|
21559
|
-
const _sfc_main$
|
|
21652
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
21560
21653
|
__name: "PopoverList",
|
|
21561
21654
|
props: {
|
|
21562
21655
|
items: { type: Array },
|
|
@@ -21609,7 +21702,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
21609
21702
|
"side-offset": __props.sideOffset
|
|
21610
21703
|
}, {
|
|
21611
21704
|
default: withCtx(() => [
|
|
21612
|
-
__props.items.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_1$
|
|
21705
|
+
__props.items.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_1$z, [
|
|
21613
21706
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
21614
21707
|
return openBlock(), createBlock(unref(DropdownMenuItem_default), {
|
|
21615
21708
|
key: keyFor(item, index),
|
|
@@ -21625,7 +21718,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
21625
21718
|
}), 128))
|
|
21626
21719
|
])) : createCommentVNode("", true),
|
|
21627
21720
|
_ctx.$slots.footer ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
21628
|
-
__props.items.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
21721
|
+
__props.items.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$r)) : createCommentVNode("", true),
|
|
21629
21722
|
createBaseVNode("div", _hoisted_3$k, [
|
|
21630
21723
|
renderSlot(_ctx.$slots, "footer")
|
|
21631
21724
|
])
|
|
@@ -21642,21 +21735,21 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
21642
21735
|
};
|
|
21643
21736
|
}
|
|
21644
21737
|
});
|
|
21645
|
-
const _hoisted_1$
|
|
21646
|
-
const _hoisted_2$
|
|
21738
|
+
const _hoisted_1$y = ["disabled", "aria-current"];
|
|
21739
|
+
const _hoisted_2$q = {
|
|
21647
21740
|
key: 0,
|
|
21648
21741
|
class: "selectable-list-item__leading"
|
|
21649
21742
|
};
|
|
21650
21743
|
const _hoisted_3$j = { class: "selectable-list-item__label" };
|
|
21651
|
-
const _hoisted_4$
|
|
21744
|
+
const _hoisted_4$d = {
|
|
21652
21745
|
key: 1,
|
|
21653
21746
|
class: "selectable-list-item__trailing"
|
|
21654
21747
|
};
|
|
21655
|
-
const _hoisted_5$
|
|
21748
|
+
const _hoisted_5$c = {
|
|
21656
21749
|
key: 0,
|
|
21657
21750
|
class: "selectable-list-item__actions"
|
|
21658
21751
|
};
|
|
21659
|
-
const _sfc_main$
|
|
21752
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
21660
21753
|
__name: "SelectableListItem",
|
|
21661
21754
|
props: {
|
|
21662
21755
|
current: { type: Boolean },
|
|
@@ -21681,7 +21774,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
21681
21774
|
"aria-current": __props.current ? "true" : void 0,
|
|
21682
21775
|
onClick: _cache[0] || (_cache[0] = ($event) => emit2("select"))
|
|
21683
21776
|
}, [
|
|
21684
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
21777
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$q, [
|
|
21685
21778
|
renderSlot(_ctx.$slots, "leading", {}, void 0, true)
|
|
21686
21779
|
])) : createCommentVNode("", true),
|
|
21687
21780
|
createBaseVNode("span", _hoisted_3$j, [
|
|
@@ -21689,20 +21782,20 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
21689
21782
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
21690
21783
|
], true)
|
|
21691
21784
|
]),
|
|
21692
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
21785
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$d, [
|
|
21693
21786
|
renderSlot(_ctx.$slots, "trailing", {}, void 0, true)
|
|
21694
21787
|
])) : createCommentVNode("", true)
|
|
21695
|
-
], 8, _hoisted_1$
|
|
21696
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
21788
|
+
], 8, _hoisted_1$y),
|
|
21789
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$c, [
|
|
21697
21790
|
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
21698
21791
|
])) : createCommentVNode("", true)
|
|
21699
21792
|
], 2);
|
|
21700
21793
|
};
|
|
21701
21794
|
}
|
|
21702
21795
|
});
|
|
21703
|
-
const _style_0$
|
|
21704
|
-
const SelectableListItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21705
|
-
const _sfc_main$
|
|
21796
|
+
const _style_0$x = "\n.selectable-list-item[data-v-46747619] {\n position: relative;\n display: flex;\n border: 1px solid transparent;\n transition:\n background-color var(--transition-duration),\n box-shadow var(--transition-duration);\n}\n.selectable-list-item--md[data-v-46747619] {\n font-size: var(--font-size-sm);\n}\n.selectable-list-item--sm[data-v-46747619] {\n font-size: var(--font-size-xs);\n}\n.selectable-list-item[data-v-46747619]:hover {\n background-color: var(--color-surface-hover);\n}\n.selectable-list-item--current[data-v-46747619],\n.selectable-list-item--current[data-v-46747619]:hover {\n background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);\n box-shadow: inset 2px 0 0 var(--color-primary);\n}\n\n/* ── The selectable button ── */\n.transcript-ui-root .selectable-list-item__main[data-v-46747619] {\n /* Full reset (same convention as Button, EditableText, Tabs…): the\n previous partial reset (background/border/font only) left margin,\n padding, and appearance to whatever the host page's UA/global styles\n happened to set. */\n all: unset;\n box-sizing: border-box;\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n font: inherit;\n color: var(--color-text-primary);\n text-align: left;\n cursor: pointer;\n}\n.transcript-ui-root .selectable-list-item--md .selectable-list-item__main[data-v-46747619] {\n padding: var(--spacing-sm);\n}\n.transcript-ui-root .selectable-list-item--sm .selectable-list-item__main[data-v-46747619] {\n padding: var(--spacing-xs) var(--spacing-sm);\n color: var(--color-text-secondary);\n}\n.transcript-ui-root .selectable-list-item__main[data-v-46747619]:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: -2px;\n}\n.transcript-ui-root .selectable-list-item__main[data-v-46747619]:disabled {\n cursor: not-allowed;\n}\n.transcript-ui-root .selectable-list-item--current .selectable-list-item__main[data-v-46747619] {\n color: var(--color-primary);\n font-weight: 600;\n}\n.selectable-list-item__label[data-v-46747619] {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n}\n.selectable-list-item__leading[data-v-46747619],\n.selectable-list-item__trailing[data-v-46747619] {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n}\n\n/* Trailing content (hints, dates) stays muted even on the active row. */\n.selectable-list-item__trailing[data-v-46747619] {\n font-size: var(--font-size-xs);\n color: var(--color-text-muted);\n}\n\n/* ── Trailing actions (hover / focus reveal, overlaying the row) ── */\n.selectable-list-item__actions[data-v-46747619] {\n position: absolute;\n inset-block: 0;\n inset-inline-end: 0;\n display: flex;\n align-items: center;\n gap: 2px;\n padding-inline: var(--spacing-md) var(--spacing-xs);\n /* Fade the label out behind the actions, matching the row surface. */\n background: linear-gradient(\n to right,\n transparent,\n var(--color-surface-hover) var(--spacing-md)\n );\n opacity: 0;\n pointer-events: none;\n transition: opacity var(--transition-duration);\n}\n.selectable-list-item:hover .selectable-list-item__actions[data-v-46747619],\n.selectable-list-item:focus-within .selectable-list-item__actions[data-v-46747619] {\n opacity: 1;\n pointer-events: auto;\n}\n\n/* Match the fade to the selected surface on the active row. */\n.selectable-list-item--current .selectable-list-item__actions[data-v-46747619] {\n background: linear-gradient(\n to right,\n transparent,\n color-mix(in srgb, var(--color-primary) 12%, var(--color-surface-hover))\n var(--spacing-md)\n );\n}\n@media (prefers-reduced-motion: reduce) {\n.selectable-list-item[data-v-46747619],\n .selectable-list-item__actions[data-v-46747619] {\n transition: none;\n}\n}\n";
|
|
21797
|
+
const SelectableListItem = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["styles", [_style_0$x]], ["__scopeId", "data-v-46747619"]]);
|
|
21798
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
21706
21799
|
__name: "SpeakerIndicator",
|
|
21707
21800
|
props: {
|
|
21708
21801
|
color: { type: String }
|
|
@@ -21717,12 +21810,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
21717
21810
|
};
|
|
21718
21811
|
}
|
|
21719
21812
|
});
|
|
21720
|
-
const _style_0$
|
|
21721
|
-
const SpeakerIndicator = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21722
|
-
const _hoisted_1$
|
|
21723
|
-
const _hoisted_2$
|
|
21813
|
+
const _style_0$w = "\n.speaker-indicator[data-v-324978c0] {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n";
|
|
21814
|
+
const SpeakerIndicator = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["styles", [_style_0$w]], ["__scopeId", "data-v-324978c0"]]);
|
|
21815
|
+
const _hoisted_1$x = { class: "switch" };
|
|
21816
|
+
const _hoisted_2$p = ["id", "checked", "disabled"];
|
|
21724
21817
|
const _hoisted_3$i = ["for"];
|
|
21725
|
-
const _sfc_main$
|
|
21818
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
21726
21819
|
__name: "SwitchToggle",
|
|
21727
21820
|
props: {
|
|
21728
21821
|
modelValue: { type: Boolean },
|
|
@@ -21735,14 +21828,14 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
21735
21828
|
const emit2 = __emit;
|
|
21736
21829
|
const inputId = props.id ?? useId$1();
|
|
21737
21830
|
return (_ctx, _cache) => {
|
|
21738
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
21831
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
21739
21832
|
createBaseVNode("input", {
|
|
21740
21833
|
type: "checkbox",
|
|
21741
21834
|
id: unref(inputId),
|
|
21742
21835
|
checked: __props.modelValue,
|
|
21743
21836
|
disabled: __props.disabled,
|
|
21744
21837
|
onChange: _cache[0] || (_cache[0] = ($event) => emit2("update:modelValue", $event.target.checked))
|
|
21745
|
-
}, null, 40, _hoisted_2$
|
|
21838
|
+
}, null, 40, _hoisted_2$p),
|
|
21746
21839
|
createBaseVNode("label", { for: unref(inputId) }, [..._cache[1] || (_cache[1] = [
|
|
21747
21840
|
createBaseVNode("div", { class: "switch-slider" }, null, -1)
|
|
21748
21841
|
])], 8, _hoisted_3$i)
|
|
@@ -21750,15 +21843,15 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
21750
21843
|
};
|
|
21751
21844
|
}
|
|
21752
21845
|
});
|
|
21753
|
-
const _style_0$
|
|
21754
|
-
const SwitchToggle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21846
|
+
const _style_0$v = "\n.switch[data-v-44d0160b] {\n display: inline-block;\n flex-shrink: 0;\n}\n.switch input[data-v-44d0160b] {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.switch label[data-v-44d0160b] {\n height: 20px;\n width: 40px;\n display: block;\n border: 1px solid var(--color-border);\n border-radius: 20px;\n cursor: pointer;\n background-color: var(--color-border);\n transition: background-color var(--transition-duration);\n}\n.switch .switch-slider[data-v-44d0160b] {\n height: 22px;\n width: 22px;\n border: 1px solid var(--color-border);\n border-radius: 50%;\n position: relative;\n top: -2px;\n left: -2px;\n background-color: var(--color-white);\n transition: left var(--transition-duration);\n}\n.switch input:checked + label[data-v-44d0160b] {\n background-color: var(--color-primary);\n border-color: var(--color-primary);\n}\n.switch input:checked + label .switch-slider[data-v-44d0160b] {\n left: 20px;\n border-color: var(--color-primary);\n}\n.switch input:disabled + label[data-v-44d0160b] {\n cursor: not-allowed;\n opacity: 0.5;\n}\n";
|
|
21847
|
+
const SwitchToggle = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["styles", [_style_0$v]], ["__scopeId", "data-v-44d0160b"]]);
|
|
21755
21848
|
function computeInitials(name) {
|
|
21756
21849
|
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
21757
21850
|
if (words.length === 0) return "?";
|
|
21758
21851
|
return words.slice(0, 2).map((w2) => w2[0].toUpperCase()).join("");
|
|
21759
21852
|
}
|
|
21760
|
-
const _hoisted_1$
|
|
21761
|
-
const _sfc_main$
|
|
21853
|
+
const _hoisted_1$w = ["title", "aria-label"];
|
|
21854
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
21762
21855
|
__name: "UserAvatar",
|
|
21763
21856
|
props: {
|
|
21764
21857
|
name: { type: String },
|
|
@@ -21774,22 +21867,22 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
21774
21867
|
role: "img",
|
|
21775
21868
|
title: title.value,
|
|
21776
21869
|
"aria-label": title.value
|
|
21777
|
-
}, toDisplayString(initials.value), 9, _hoisted_1$
|
|
21870
|
+
}, toDisplayString(initials.value), 9, _hoisted_1$w);
|
|
21778
21871
|
};
|
|
21779
21872
|
}
|
|
21780
21873
|
});
|
|
21781
|
-
const _style_0$
|
|
21782
|
-
const UserAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21783
|
-
const _hoisted_1$
|
|
21784
|
-
const _hoisted_2$
|
|
21874
|
+
const _style_0$u = "\n.user-avatar[data-v-977a8d17] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background-color: var(--color-primary);\n color: var(--color-white);\n font-size: var(--font-size-xs);\n font-weight: 600;\n user-select: none;\n cursor: default;\n}\n";
|
|
21875
|
+
const UserAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["styles", [_style_0$u]], ["__scopeId", "data-v-977a8d17"]]);
|
|
21876
|
+
const _hoisted_1$v = ["data-status"];
|
|
21877
|
+
const _hoisted_2$o = {
|
|
21785
21878
|
key: 0,
|
|
21786
21879
|
class: "document-article__toolbar",
|
|
21787
21880
|
role: "toolbar"
|
|
21788
21881
|
};
|
|
21789
21882
|
const _hoisted_3$h = { class: "document-article__toolbar-left" };
|
|
21790
|
-
const _hoisted_4$
|
|
21791
|
-
const _hoisted_5$
|
|
21792
|
-
const _hoisted_6$
|
|
21883
|
+
const _hoisted_4$c = { class: "document-article__toolbar-center" };
|
|
21884
|
+
const _hoisted_5$b = { class: "document-article__toolbar-right" };
|
|
21885
|
+
const _hoisted_6$a = { class: "document-article__body" };
|
|
21793
21886
|
const _hoisted_7$4 = {
|
|
21794
21887
|
key: 0,
|
|
21795
21888
|
class: "document-article__center document-article__center--processing",
|
|
@@ -21807,7 +21900,7 @@ const _hoisted_10$2 = {
|
|
|
21807
21900
|
role: "alert"
|
|
21808
21901
|
};
|
|
21809
21902
|
const _hoisted_11$1 = { class: "document-article__error-text" };
|
|
21810
|
-
const _sfc_main$
|
|
21903
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
21811
21904
|
__name: "DocumentArticle",
|
|
21812
21905
|
props: {
|
|
21813
21906
|
status: { default: "done", type: String },
|
|
@@ -21832,18 +21925,18 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
21832
21925
|
class: "document-article",
|
|
21833
21926
|
"data-status": props.status
|
|
21834
21927
|
}, [
|
|
21835
|
-
_ctx.$slots["toolbar-left"] || _ctx.$slots["toolbar-center"] || _ctx.$slots["toolbar-right"] ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
21928
|
+
_ctx.$slots["toolbar-left"] || _ctx.$slots["toolbar-center"] || _ctx.$slots["toolbar-right"] ? (openBlock(), createElementBlock("div", _hoisted_2$o, [
|
|
21836
21929
|
createBaseVNode("div", _hoisted_3$h, [
|
|
21837
21930
|
renderSlot(_ctx.$slots, "toolbar-left", {}, void 0, true)
|
|
21838
21931
|
]),
|
|
21839
|
-
createBaseVNode("div", _hoisted_4$
|
|
21932
|
+
createBaseVNode("div", _hoisted_4$c, [
|
|
21840
21933
|
renderSlot(_ctx.$slots, "toolbar-center", {}, void 0, true)
|
|
21841
21934
|
]),
|
|
21842
|
-
createBaseVNode("div", _hoisted_5$
|
|
21935
|
+
createBaseVNode("div", _hoisted_5$b, [
|
|
21843
21936
|
renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true)
|
|
21844
21937
|
])
|
|
21845
21938
|
])) : createCommentVNode("", true),
|
|
21846
|
-
createBaseVNode("div", _hoisted_6$
|
|
21939
|
+
createBaseVNode("div", _hoisted_6$a, [
|
|
21847
21940
|
props.status === "processing" ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
|
|
21848
21941
|
createVNode(EditorIcon, {
|
|
21849
21942
|
name: "spinner",
|
|
@@ -21870,13 +21963,13 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
21870
21963
|
})
|
|
21871
21964
|
])) : renderSlot(_ctx.$slots, "default", {}, void 0, true, 2)
|
|
21872
21965
|
])
|
|
21873
|
-
], 8, _hoisted_1$
|
|
21966
|
+
], 8, _hoisted_1$v);
|
|
21874
21967
|
};
|
|
21875
21968
|
}
|
|
21876
21969
|
});
|
|
21877
|
-
const _style_0$
|
|
21878
|
-
const DocumentArticle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21879
|
-
const _sfc_main$
|
|
21970
|
+
const _style_0$t = "\n.document-article[data-v-dda12eb4] {\n /* One row of buttons plus padding and border. Declared rather than\n measured: slot content must stay on one line (truncate, don't wrap), and\n content stuck right under the toolbar (the markdown editor's toolbar)\n reads this value as its offset. */\n --document-toolbar-height: 49px;\n\n width: min(1088px, calc(100% - 16px));\n max-width: 1088px;\n margin: var(--spacing-lg) auto;\n background-color: var(--color-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n display: flex;\n flex-direction: column;\n}\n.document-article__toolbar[data-v-dda12eb4] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n height: var(--document-toolbar-height);\n padding: 0 var(--spacing-md);\n border-bottom: 1px solid var(--color-border);\n position: sticky;\n top: 0;\n background-color: var(--color-surface);\n border-radius: var(--radius-md) var(--radius-md) 0 0;\n z-index: 1;\n}\n.document-article__toolbar-left[data-v-dda12eb4],\n.document-article__toolbar-right[data-v-dda12eb4] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n flex-shrink: 0;\n}\n.document-article__toolbar-center[data-v-dda12eb4] {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n}\n.document-article__body[data-v-dda12eb4] {\n flex: 1;\n min-height: 0;\n}\n.document-article__center[data-v-dda12eb4] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-xl) var(--spacing-md);\n text-align: center;\n}\n.document-article__center--processing[data-v-dda12eb4] {\n color: var(--color-primary);\n}\n.document-article__center--error[data-v-dda12eb4] {\n color: var(--color-danger, #d33);\n}\n.document-article__progress[data-v-dda12eb4] {\n width: min(280px, 100%);\n height: 6px;\n}\n.document-article__progress-value[data-v-dda12eb4] {\n font-size: var(--font-size-xs);\n font-variant-numeric: tabular-nums;\n color: var(--color-text-muted);\n}\n@media (max-width: 767px) {\n.document-article[data-v-dda12eb4] {\n margin: var(--spacing-sm) auto;\n}\n}\n.document-article__error-text[data-v-dda12eb4] {\n margin: 0;\n max-width: 480px;\n font-size: var(--font-size-sm);\n line-height: var(--line-height);\n color: var(--color-text-secondary);\n}\n";
|
|
21971
|
+
const DocumentArticle = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["styles", [_style_0$t]], ["__scopeId", "data-v-dda12eb4"]]);
|
|
21972
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
21880
21973
|
__name: "DownloadMenu",
|
|
21881
21974
|
props: {
|
|
21882
21975
|
formats: { type: Array },
|
|
@@ -21892,7 +21985,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
21892
21985
|
emit2("select", item.format);
|
|
21893
21986
|
}
|
|
21894
21987
|
return (_ctx, _cache) => {
|
|
21895
|
-
return openBlock(), createBlock(_sfc_main$
|
|
21988
|
+
return openBlock(), createBlock(_sfc_main$G, {
|
|
21896
21989
|
items: props.formats,
|
|
21897
21990
|
"item-key": (f2) => f2.format,
|
|
21898
21991
|
align: "end",
|
|
@@ -21920,7 +22013,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
21920
22013
|
};
|
|
21921
22014
|
}
|
|
21922
22015
|
});
|
|
21923
|
-
const _sfc_main$
|
|
22016
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
21924
22017
|
__name: "SpeakerMenu",
|
|
21925
22018
|
emits: ["merge"],
|
|
21926
22019
|
setup(__props, { emit: __emit }) {
|
|
@@ -21933,7 +22026,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
21933
22026
|
if (action.id === "merge") emit2("merge");
|
|
21934
22027
|
}
|
|
21935
22028
|
return (_ctx, _cache) => {
|
|
21936
|
-
return openBlock(), createBlock(_sfc_main$
|
|
22029
|
+
return openBlock(), createBlock(_sfc_main$G, {
|
|
21937
22030
|
items: items.value,
|
|
21938
22031
|
"item-key": (a2) => a2.id,
|
|
21939
22032
|
align: "end",
|
|
@@ -21954,20 +22047,34 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
21954
22047
|
};
|
|
21955
22048
|
}
|
|
21956
22049
|
});
|
|
21957
|
-
const _hoisted_1$
|
|
21958
|
-
const _hoisted_2$
|
|
22050
|
+
const _hoisted_1$u = ["aria-label"];
|
|
22051
|
+
const _hoisted_2$n = ["aria-selected", "aria-disabled", "disabled", "onClick"];
|
|
21959
22052
|
const _hoisted_3$g = { class: "tab__label" };
|
|
21960
|
-
const
|
|
22053
|
+
const _hoisted_4$b = ["aria-selected", "aria-label"];
|
|
22054
|
+
const _hoisted_5$a = { class: "tab__label" };
|
|
22055
|
+
const _hoisted_6$9 = { class: "tab__menu-item" };
|
|
22056
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
21961
22057
|
__name: "Tabs",
|
|
21962
22058
|
props: {
|
|
21963
22059
|
tabs: { type: Array },
|
|
21964
22060
|
modelValue: { type: null },
|
|
21965
|
-
ariaLabel: { type: String }
|
|
22061
|
+
ariaLabel: { type: String },
|
|
22062
|
+
collapseFrom: { type: Number }
|
|
21966
22063
|
},
|
|
21967
22064
|
emits: ["update:modelValue"],
|
|
21968
22065
|
setup(__props, { emit: __emit }) {
|
|
21969
22066
|
const props = __props;
|
|
21970
22067
|
const emit2 = __emit;
|
|
22068
|
+
const { t: t2 } = useI18n();
|
|
22069
|
+
const inlineTabs = computed(
|
|
22070
|
+
() => props.collapseFrom === void 0 ? props.tabs : props.tabs.slice(0, props.collapseFrom)
|
|
22071
|
+
);
|
|
22072
|
+
const collapsedTabs = computed(
|
|
22073
|
+
() => props.collapseFrom === void 0 ? [] : props.tabs.slice(props.collapseFrom)
|
|
22074
|
+
);
|
|
22075
|
+
const activeCollapsedTab = computed(
|
|
22076
|
+
() => collapsedTabs.value.find((tab) => tab.value === props.modelValue) ?? null
|
|
22077
|
+
);
|
|
21971
22078
|
function onSelect(tab) {
|
|
21972
22079
|
if (tab.disabled) return;
|
|
21973
22080
|
if (tab.value === props.modelValue) return;
|
|
@@ -21979,7 +22086,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
21979
22086
|
role: "tablist",
|
|
21980
22087
|
"aria-label": __props.ariaLabel
|
|
21981
22088
|
}, [
|
|
21982
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
22089
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(inlineTabs.value, (tab) => {
|
|
21983
22090
|
return openBlock(), createElementBlock("button", {
|
|
21984
22091
|
key: tab.value,
|
|
21985
22092
|
type: "button",
|
|
@@ -22006,14 +22113,65 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
22006
22113
|
]),
|
|
22007
22114
|
_: 2
|
|
22008
22115
|
}, 1024)) : createCommentVNode("", true)
|
|
22009
|
-
], 10, _hoisted_2$
|
|
22010
|
-
}), 128))
|
|
22011
|
-
|
|
22116
|
+
], 10, _hoisted_2$n);
|
|
22117
|
+
}), 128)),
|
|
22118
|
+
collapsedTabs.value.length > 0 ? (openBlock(), createBlock(_sfc_main$G, {
|
|
22119
|
+
key: 0,
|
|
22120
|
+
items: collapsedTabs.value,
|
|
22121
|
+
"item-key": (tab) => tab.value,
|
|
22122
|
+
"is-current": (tab) => tab.value === __props.modelValue,
|
|
22123
|
+
align: "end",
|
|
22124
|
+
onSelect
|
|
22125
|
+
}, {
|
|
22126
|
+
trigger: withCtx(() => [
|
|
22127
|
+
createBaseVNode("button", {
|
|
22128
|
+
type: "button",
|
|
22129
|
+
role: "tab",
|
|
22130
|
+
class: normalizeClass(["tab tab--more", { "tab--active": activeCollapsedTab.value !== null }]),
|
|
22131
|
+
"aria-selected": activeCollapsedTab.value !== null,
|
|
22132
|
+
"aria-label": unref(t2)("tabs.moreLabel")
|
|
22133
|
+
}, [
|
|
22134
|
+
createBaseVNode("span", _hoisted_5$a, toDisplayString(activeCollapsedTab.value ? activeCollapsedTab.value.label : unref(t2)("tabs.moreLabel")), 1),
|
|
22135
|
+
activeCollapsedTab.value?.badge ? (openBlock(), createBlock(Badge, {
|
|
22136
|
+
key: 0,
|
|
22137
|
+
class: "tab__badge"
|
|
22138
|
+
}, {
|
|
22139
|
+
default: withCtx(() => [
|
|
22140
|
+
createTextVNode(toDisplayString(activeCollapsedTab.value.badge), 1)
|
|
22141
|
+
]),
|
|
22142
|
+
_: 1
|
|
22143
|
+
})) : createCommentVNode("", true),
|
|
22144
|
+
createVNode(EditorIcon, {
|
|
22145
|
+
name: "chevron-down",
|
|
22146
|
+
size: 14,
|
|
22147
|
+
class: "tab__chevron"
|
|
22148
|
+
})
|
|
22149
|
+
], 10, _hoisted_4$b)
|
|
22150
|
+
]),
|
|
22151
|
+
item: withCtx(({ item }) => [
|
|
22152
|
+
createBaseVNode("span", _hoisted_6$9, [
|
|
22153
|
+
unref(resolveIcon)(item.icon) ? (openBlock(), createBlock(EditorIcon, {
|
|
22154
|
+
key: 0,
|
|
22155
|
+
name: item.icon,
|
|
22156
|
+
size: 16
|
|
22157
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
22158
|
+
createBaseVNode("span", null, toDisplayString(item.label), 1),
|
|
22159
|
+
item.badge ? (openBlock(), createBlock(Badge, { key: 1 }, {
|
|
22160
|
+
default: withCtx(() => [
|
|
22161
|
+
createTextVNode(toDisplayString(item.badge), 1)
|
|
22162
|
+
]),
|
|
22163
|
+
_: 2
|
|
22164
|
+
}, 1024)) : createCommentVNode("", true)
|
|
22165
|
+
])
|
|
22166
|
+
]),
|
|
22167
|
+
_: 1
|
|
22168
|
+
}, 8, ["items", "item-key", "is-current"])) : createCommentVNode("", true)
|
|
22169
|
+
], 8, _hoisted_1$u);
|
|
22012
22170
|
};
|
|
22013
22171
|
}
|
|
22014
22172
|
});
|
|
22015
|
-
const _style_0$
|
|
22016
|
-
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
22173
|
+
const _style_0$s = '\n.tabs[data-v-30747b8d] {\n display: flex;\n align-items: stretch;\n gap: var(--spacing-xs);\n padding: 0 var(--spacing-lg);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n overflow-x: auto;\n scrollbar-width: thin;\n}\n.transcript-ui-root .tab[data-v-30747b8d] {\n all: unset;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-xs);\n height: 44px;\n padding: 0 var(--spacing-sm);\n font-family: var(--font-family);\n font-size: var(--font-size-sm);\n font-weight: 500;\n color: var(--color-text-secondary);\n cursor: pointer;\n white-space: nowrap;\n border-bottom: 2px solid transparent;\n transition:\n color var(--transition-duration),\n border-color var(--transition-duration);\n}\n.transcript-ui-root .tab[data-v-30747b8d]:hover:not([disabled]) {\n color: var(--color-text-primary);\n}\n.transcript-ui-root .tab[data-v-30747b8d]:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: -2px;\n border-radius: var(--radius-sm);\n}\n.transcript-ui-root .tab--active[data-v-30747b8d] {\n color: var(--color-text-primary);\n border-bottom-color: var(--color-primary);\n}\n.transcript-ui-root .tab[disabled][data-v-30747b8d] {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.tab__icon[data-v-30747b8d] {\n flex-shrink: 0;\n color: currentColor;\n}\n.tab__label[data-v-30747b8d] {\n text-box: cap alphabetic;\n}\n.tab__badge[data-v-30747b8d] {\n margin-left: var(--spacing-xs);\n}\n.tab__chevron[data-v-30747b8d] {\n flex-shrink: 0;\n color: currentColor;\n}\n.tab__menu-item[data-v-30747b8d] {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-xs);\n}\n\n/* Phone: the inline tabs share the width, labels shrink with an ellipsis,\n icons go, nothing scrolls sideways (the rest lives in the "More" menu). */\n@media (max-width: 767px) {\n.tabs[data-v-30747b8d] {\n padding: 0 var(--spacing-sm);\n overflow-x: hidden;\n}\n.transcript-ui-root .tab[data-v-30747b8d] {\n flex: 1;\n min-width: 0;\n justify-content: center;\n padding: 0 var(--spacing-xs);\n font-size: var(--font-size-xs);\n}\n.tab__icon[data-v-30747b8d] {\n display: none;\n}\n.tab__label[data-v-30747b8d] {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n}\n';
|
|
22174
|
+
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["styles", [_style_0$s]], ["__scopeId", "data-v-30747b8d"]]);
|
|
22017
22175
|
const TEXT_NODE$1 = 3;
|
|
22018
22176
|
function placeCaretAt(element, offset2) {
|
|
22019
22177
|
element.focus({ preventScroll: true });
|
|
@@ -22070,8 +22228,8 @@ function computeSelectionOffset(container) {
|
|
|
22070
22228
|
if (!focus2 || !container.contains(focus2.node)) return null;
|
|
22071
22229
|
return computeTextOffsetInContainer(container, focus2.node, focus2.offset);
|
|
22072
22230
|
}
|
|
22073
|
-
const _hoisted_1$
|
|
22074
|
-
const _sfc_main$
|
|
22231
|
+
const _hoisted_1$t = ["aria-label", "textContent"];
|
|
22232
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
22075
22233
|
__name: "TurnTextEditor",
|
|
22076
22234
|
props: {
|
|
22077
22235
|
text: { type: String },
|
|
@@ -22125,22 +22283,22 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
22125
22283
|
onKeydown,
|
|
22126
22284
|
onBlur,
|
|
22127
22285
|
textContent: toDisplayString(__props.text)
|
|
22128
|
-
}, null, 40, _hoisted_1$
|
|
22286
|
+
}, null, 40, _hoisted_1$t);
|
|
22129
22287
|
};
|
|
22130
22288
|
}
|
|
22131
22289
|
});
|
|
22132
|
-
const _style_0$
|
|
22133
|
-
const TurnTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
22134
|
-
const _hoisted_1$
|
|
22135
|
-
const _hoisted_2$
|
|
22290
|
+
const _style_0$r = "\n.turn-text-editor[data-v-597e2575] {\n margin: 0;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n cursor: text;\n outline: 2px solid var(--color-primary);\n border-radius: var(--radius-sm);\n background-color: var(--color-surface);\n padding: 0;\n}\n";
|
|
22291
|
+
const TurnTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["styles", [_style_0$r]], ["__scopeId", "data-v-597e2575"]]);
|
|
22292
|
+
const _hoisted_1$s = { class: "editor-header" };
|
|
22293
|
+
const _hoisted_2$m = { class: "header-main" };
|
|
22136
22294
|
const _hoisted_3$f = { class: "document-title" };
|
|
22137
|
-
const _hoisted_4$
|
|
22295
|
+
const _hoisted_4$a = {
|
|
22138
22296
|
key: 0,
|
|
22139
22297
|
class: "document-meta"
|
|
22140
22298
|
};
|
|
22141
|
-
const _hoisted_5$
|
|
22299
|
+
const _hoisted_5$9 = { class: "header-right" };
|
|
22142
22300
|
const _hoisted_6$8 = { key: 0 };
|
|
22143
|
-
const _sfc_main$
|
|
22301
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
22144
22302
|
__name: "Header",
|
|
22145
22303
|
props: {
|
|
22146
22304
|
title: { type: String },
|
|
@@ -22174,10 +22332,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
22174
22332
|
].filter(Boolean)
|
|
22175
22333
|
);
|
|
22176
22334
|
return (_ctx, _cache) => {
|
|
22177
|
-
return openBlock(), createElementBlock("header", _hoisted_1$
|
|
22178
|
-
createBaseVNode("div", _hoisted_2$
|
|
22335
|
+
return openBlock(), createElementBlock("header", _hoisted_1$s, [
|
|
22336
|
+
createBaseVNode("div", _hoisted_2$m, [
|
|
22179
22337
|
createBaseVNode("h1", _hoisted_3$f, toDisplayString(formattedTitle.value), 1),
|
|
22180
|
-
metaParts.value.length ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
22338
|
+
metaParts.value.length ? (openBlock(), createElementBlock("div", _hoisted_4$a, [
|
|
22181
22339
|
(openBlock(true), createElementBlock(Fragment, null, renderList(metaParts.value, (part, i2) => {
|
|
22182
22340
|
return openBlock(), createElementBlock("span", {
|
|
22183
22341
|
key: i2,
|
|
@@ -22186,7 +22344,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
22186
22344
|
}), 128))
|
|
22187
22345
|
])) : createCommentVNode("", true)
|
|
22188
22346
|
]),
|
|
22189
|
-
createBaseVNode("div", _hoisted_5$
|
|
22347
|
+
createBaseVNode("div", _hoisted_5$9, [
|
|
22190
22348
|
__props.isMobile ? (openBlock(), createBlock(unref(Button), {
|
|
22191
22349
|
key: 0,
|
|
22192
22350
|
variant: "transparent",
|
|
@@ -22253,11 +22411,28 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
22253
22411
|
};
|
|
22254
22412
|
}
|
|
22255
22413
|
});
|
|
22256
|
-
const _style_0$
|
|
22257
|
-
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
22414
|
+
const _style_0$q = '\n.editor-header[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-md);\n padding: var(--spacing-sm) var(--spacing-lg);\n min-height: var(--header-height);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n}\n.header-main[data-v-491cf8ab] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n flex: 1;\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-lg);\n font-weight: 600;\n color: var(--color-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n}\n.document-meta[data-v-491cf8ab] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--font-size-xs);\n color: var(--color-text-muted);\n}\n.document-meta__part[data-v-491cf8ab] {\n text-box: cap alphabetic;\n}\n.document-meta__part + .document-meta__part[data-v-491cf8ab]::before {\n content: "·";\n margin-right: var(--spacing-xs);\n}\n.header-right[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n flex-shrink: 0;\n}\n@media (max-width: 767px) {\n.editor-header[data-v-491cf8ab] {\n padding: var(--spacing-xs) var(--spacing-md);\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-base);\n}\n}\n';
|
|
22415
|
+
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["styles", [_style_0$q]], ["__scopeId", "data-v-491cf8ab"]]);
|
|
22258
22416
|
const TRANSCRIPTION_TAB = "__transcription__";
|
|
22259
22417
|
const VERBATIM_TAB = "__verbatim__";
|
|
22260
|
-
const
|
|
22418
|
+
const MOBILE_BREAKPOINT = "(max-width: 767px)";
|
|
22419
|
+
function useIsMobile() {
|
|
22420
|
+
const isMobile = /* @__PURE__ */ ref(window.matchMedia(MOBILE_BREAKPOINT).matches);
|
|
22421
|
+
let mql = null;
|
|
22422
|
+
function onChange(e3) {
|
|
22423
|
+
isMobile.value = e3.matches;
|
|
22424
|
+
}
|
|
22425
|
+
onMounted(() => {
|
|
22426
|
+
mql = window.matchMedia(MOBILE_BREAKPOINT);
|
|
22427
|
+
isMobile.value = mql.matches;
|
|
22428
|
+
mql.addEventListener("change", onChange);
|
|
22429
|
+
});
|
|
22430
|
+
onBeforeUnmount(() => {
|
|
22431
|
+
mql?.removeEventListener("change", onChange);
|
|
22432
|
+
});
|
|
22433
|
+
return { isMobile };
|
|
22434
|
+
}
|
|
22435
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
22261
22436
|
__name: "TabBar",
|
|
22262
22437
|
props: {
|
|
22263
22438
|
modelValue: { type: String },
|
|
@@ -22269,6 +22444,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
22269
22444
|
const emit2 = __emit;
|
|
22270
22445
|
const core = useCore();
|
|
22271
22446
|
const { t: t2 } = useI18n();
|
|
22447
|
+
const { isMobile } = useIsMobile();
|
|
22448
|
+
const collapseFrom = computed(() => {
|
|
22449
|
+
if (!isMobile.value) return void 0;
|
|
22450
|
+
return props.showVerbatim ? 2 : 1;
|
|
22451
|
+
});
|
|
22272
22452
|
const tabs = computed(() => {
|
|
22273
22453
|
const services = core.llmServices?.list.value ?? [];
|
|
22274
22454
|
return [
|
|
@@ -22300,8 +22480,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
22300
22480
|
key: 0,
|
|
22301
22481
|
tabs: tabs.value,
|
|
22302
22482
|
"model-value": __props.modelValue,
|
|
22483
|
+
"collapse-from": collapseFrom.value,
|
|
22303
22484
|
"onUpdate:modelValue": onSelect
|
|
22304
|
-
}, null, 8, ["tabs", "model-value"])) : createCommentVNode("", true);
|
|
22485
|
+
}, null, 8, ["tabs", "model-value", "collapse-from"])) : createCommentVNode("", true);
|
|
22305
22486
|
};
|
|
22306
22487
|
}
|
|
22307
22488
|
});
|
|
@@ -22366,7 +22547,7 @@ function createStickToBottomEngine(initialOptions = {}) {
|
|
|
22366
22547
|
};
|
|
22367
22548
|
function notify() {
|
|
22368
22549
|
const snapshot = getPublicState();
|
|
22369
|
-
for (const
|
|
22550
|
+
for (const l4 of listeners) l4(snapshot);
|
|
22370
22551
|
}
|
|
22371
22552
|
function getPublicState() {
|
|
22372
22553
|
return {
|
|
@@ -22671,7 +22852,7 @@ function useStickToBottom(options = {}) {
|
|
|
22671
22852
|
};
|
|
22672
22853
|
}
|
|
22673
22854
|
var StickToBottomKey = /* @__PURE__ */ Symbol("StickToBottom");
|
|
22674
|
-
var _hoisted_1$
|
|
22855
|
+
var _hoisted_1$r = { style: {
|
|
22675
22856
|
"position": "relative",
|
|
22676
22857
|
"height": "100%",
|
|
22677
22858
|
"width": "100%",
|
|
@@ -22737,7 +22918,7 @@ var StickToBottom_default = /* @__PURE__ */ defineComponent({
|
|
|
22737
22918
|
stopScroll
|
|
22738
22919
|
}));
|
|
22739
22920
|
return (_ctx, _cache) => {
|
|
22740
|
-
return openBlock(), createElementBlock("div", null, [createBaseVNode("div", _hoisted_1$
|
|
22921
|
+
return openBlock(), createElementBlock("div", null, [createBaseVNode("div", _hoisted_1$r, [createBaseVNode("div", {
|
|
22741
22922
|
ref_key: "scrollRef",
|
|
22742
22923
|
ref: scrollRef,
|
|
22743
22924
|
style: normalizeStyle({
|
|
@@ -22754,12 +22935,12 @@ var StickToBottom_default = /* @__PURE__ */ defineComponent({
|
|
|
22754
22935
|
};
|
|
22755
22936
|
}
|
|
22756
22937
|
});
|
|
22757
|
-
const _hoisted_1$
|
|
22758
|
-
const _hoisted_2$
|
|
22938
|
+
const _hoisted_1$q = ["datetime"];
|
|
22939
|
+
const _hoisted_2$l = {
|
|
22759
22940
|
key: 2,
|
|
22760
22941
|
class: "lang"
|
|
22761
22942
|
};
|
|
22762
|
-
const _sfc_main$
|
|
22943
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
22763
22944
|
__name: "SpeakerLabel",
|
|
22764
22945
|
props: {
|
|
22765
22946
|
speaker: { type: Object },
|
|
@@ -22811,19 +22992,19 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
22811
22992
|
key: 1,
|
|
22812
22993
|
class: "timestamp",
|
|
22813
22994
|
datetime: timestamp.value.datetime
|
|
22814
|
-
}, toDisplayString(timestamp.value.text), 9, _hoisted_1$
|
|
22815
|
-
languageName.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
22995
|
+
}, toDisplayString(timestamp.value.text), 9, _hoisted_1$q)) : createCommentVNode("", true),
|
|
22996
|
+
languageName.value ? (openBlock(), createElementBlock("span", _hoisted_2$l, toDisplayString(languageName.value), 1)) : createCommentVNode("", true)
|
|
22816
22997
|
], 2);
|
|
22817
22998
|
};
|
|
22818
22999
|
}
|
|
22819
23000
|
});
|
|
22820
|
-
const _style_0$
|
|
22821
|
-
const SpeakerLabel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
22822
|
-
const _hoisted_1$
|
|
23001
|
+
const _style_0$p = "\n.speaker-label[data-v-76cb4ed6] {\n display: flex;\n border-bottom: 2px solid transparent;\n align-items: center;\n gap: var(--spacing-sm);\n}\n.speaker-name[data-v-76cb4ed6] {\n font-size: var(--font-size-sm);\n font-weight: 600;\n color: var(--color-text-primary);\n}\n.speaker-name--unknown[data-v-76cb4ed6] {\n font-weight: 400;\n font-style: italic;\n color: var(--color-text-muted);\n}\n.speaker-label--interactive:hover .speaker-name[data-v-76cb4ed6] {\n text-decoration: underline;\n}\n.timestamp[data-v-76cb4ed6] {\n font-size: var(--font-size-xs);\n font-family: var(--font-family-mono);\n color: var(--color-text-muted);\n /* not supported on firefox yet */\n text-box: trim-both cap alphabetic;\n}\n.lang[data-v-76cb4ed6] {\n font-size: var(--font-size-xs);\n font-weight: 400;\n /* not supported on firefox yet */\n text-box: trim-both cap alphabetic;\n}\n";
|
|
23002
|
+
const SpeakerLabel = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-76cb4ed6"]]);
|
|
23003
|
+
const _hoisted_1$p = {
|
|
22823
23004
|
key: 0,
|
|
22824
23005
|
class: "merge-turns"
|
|
22825
23006
|
};
|
|
22826
|
-
const _sfc_main$
|
|
23007
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
22827
23008
|
__name: "MergeTurnsButton",
|
|
22828
23009
|
props: {
|
|
22829
23010
|
firstTurnId: { type: String },
|
|
@@ -22843,7 +23024,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
22843
23024
|
core.transcriptionEditor.mergeTurns(props.firstTurnId, props.secondTurnId);
|
|
22844
23025
|
}
|
|
22845
23026
|
return (_ctx, _cache) => {
|
|
22846
|
-
return canShow.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
23027
|
+
return canShow.value ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
22847
23028
|
createVNode(unref(Button), {
|
|
22848
23029
|
size: "sm",
|
|
22849
23030
|
variant: "inverse",
|
|
@@ -22856,8 +23037,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
22856
23037
|
};
|
|
22857
23038
|
}
|
|
22858
23039
|
});
|
|
22859
|
-
const _style_0$
|
|
22860
|
-
const MergeTurnsButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
23040
|
+
const _style_0$o = "\n.merge-turns[data-v-8d977feb] {\n display: flex;\n justify-content: center;\n}\n\n/* Compact: the control sits in the gap between turns without inflating it. */\n.merge-turns[data-v-8d977feb] .editor-btn {\n --btn-height: 22px;\n}\n";
|
|
23041
|
+
const MergeTurnsButton = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["styles", [_style_0$o]], ["__scopeId", "data-v-8d977feb"]]);
|
|
22861
23042
|
function renameSpeaker$1(core, speakerId, newName) {
|
|
22862
23043
|
const trimmed = newName.trim();
|
|
22863
23044
|
const existing = core.speakers.all.get(speakerId);
|
|
@@ -22920,12 +23101,12 @@ const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
22920
23101
|
switchTurnSpeaker: switchTurnSpeaker$1,
|
|
22921
23102
|
updateTurnWords
|
|
22922
23103
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
22923
|
-
const _hoisted_1$
|
|
23104
|
+
const _hoisted_1$o = {
|
|
22924
23105
|
type: "button",
|
|
22925
23106
|
class: "speaker-popover-trigger"
|
|
22926
23107
|
};
|
|
22927
|
-
const _hoisted_2$
|
|
22928
|
-
const _sfc_main$
|
|
23108
|
+
const _hoisted_2$k = { class: "speaker-popover-name" };
|
|
23109
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
22929
23110
|
__name: "SpeakerPopover",
|
|
22930
23111
|
props: {
|
|
22931
23112
|
turnId: { type: String },
|
|
@@ -22991,7 +23172,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
22991
23172
|
isCreatingNew.value = false;
|
|
22992
23173
|
}
|
|
22993
23174
|
return (_ctx, _cache) => {
|
|
22994
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
23175
|
+
return openBlock(), createBlock(unref(_sfc_main$G), {
|
|
22995
23176
|
open: isOpen.value,
|
|
22996
23177
|
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => isOpen.value = $event),
|
|
22997
23178
|
items: speakers.value,
|
|
@@ -23000,7 +23181,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
23000
23181
|
onSelect: onPickExisting
|
|
23001
23182
|
}, {
|
|
23002
23183
|
trigger: withCtx(() => [
|
|
23003
|
-
createBaseVNode("button", _hoisted_1$
|
|
23184
|
+
createBaseVNode("button", _hoisted_1$o, [
|
|
23004
23185
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
23005
23186
|
])
|
|
23006
23187
|
]),
|
|
@@ -23008,7 +23189,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
23008
23189
|
createVNode(unref(SpeakerIndicator), {
|
|
23009
23190
|
color: item.color
|
|
23010
23191
|
}, null, 8, ["color"]),
|
|
23011
|
-
createBaseVNode("span", _hoisted_2$
|
|
23192
|
+
createBaseVNode("span", _hoisted_2$k, toDisplayString(item.name), 1)
|
|
23012
23193
|
]),
|
|
23013
23194
|
footer: withCtx(() => [
|
|
23014
23195
|
!isCreatingNew.value ? (openBlock(), createBlock(unref(Button), {
|
|
@@ -23041,8 +23222,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
23041
23222
|
};
|
|
23042
23223
|
}
|
|
23043
23224
|
});
|
|
23044
|
-
const _style_0$
|
|
23045
|
-
const SpeakerPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
23225
|
+
const _style_0$n = "\n.transcript-ui-root .speaker-popover-trigger[data-v-0679fde9] {\n all: unset;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n border-radius: var(--radius-sm);\n}\n.transcript-ui-root .speaker-popover-trigger[data-v-0679fde9]:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n.speaker-popover-name[data-v-0679fde9] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
|
|
23226
|
+
const SpeakerPopover = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["styles", [_style_0$n]], ["__scopeId", "data-v-0679fde9"]]);
|
|
23046
23227
|
const turnSelectionKey = /* @__PURE__ */ Symbol("turnSelection");
|
|
23047
23228
|
function getTurnText(turn) {
|
|
23048
23229
|
if (turn.words.length > 0) {
|
|
@@ -23188,14 +23369,14 @@ function findWordAtOffset(words, offset2) {
|
|
|
23188
23369
|
(w2) => w2.charStart != null && w2.charEnd != null && w2.charStart <= offset2 && offset2 < w2.charEnd
|
|
23189
23370
|
);
|
|
23190
23371
|
}
|
|
23191
|
-
const _hoisted_1$
|
|
23192
|
-
const _hoisted_2$
|
|
23372
|
+
const _hoisted_1$n = ["data-turn-active", "aria-selected"];
|
|
23373
|
+
const _hoisted_2$j = {
|
|
23193
23374
|
key: 4,
|
|
23194
23375
|
class: "turn-edit-actions"
|
|
23195
23376
|
};
|
|
23196
23377
|
const _hoisted_3$e = ["role", "tabindex", "aria-label", "aria-disabled"];
|
|
23197
|
-
const _hoisted_4$
|
|
23198
|
-
const _sfc_main$
|
|
23378
|
+
const _hoisted_4$9 = ["data-word-active"];
|
|
23379
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
23199
23380
|
__name: "TranscriptionTurn",
|
|
23200
23381
|
props: {
|
|
23201
23382
|
turn: { type: Object },
|
|
@@ -23376,7 +23557,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
23376
23557
|
"start-date": __props.turn.startDate,
|
|
23377
23558
|
language: __props.turn.language
|
|
23378
23559
|
}, null, 8, ["speaker", "start-time", "start-date", "language"])),
|
|
23379
|
-
isEditing.value || turnLock.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
23560
|
+
isEditing.value || turnLock.value ? (openBlock(), createElementBlock("div", _hoisted_2$j, [
|
|
23380
23561
|
isEditing.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
23381
23562
|
createVNode(unref(Button), {
|
|
23382
23563
|
size: "sm",
|
|
@@ -23431,50 +23612,50 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
23431
23612
|
createBaseVNode("span", {
|
|
23432
23613
|
class: normalizeClass({ "word--active": word.id === activeWordId.value }),
|
|
23433
23614
|
"data-word-active": word.id === activeWordId.value || void 0
|
|
23434
|
-
}, toDisplayString(word.text), 11, _hoisted_4$
|
|
23615
|
+
}, toDisplayString(word.text), 11, _hoisted_4$9),
|
|
23435
23616
|
createTextVNode(toDisplayString(i2 < __props.turn.words.length - 1 ? " " : ""), 1)
|
|
23436
23617
|
], 64);
|
|
23437
23618
|
}), 128)) : __props.turn.text ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
23438
23619
|
createTextVNode(toDisplayString(__props.turn.text), 1)
|
|
23439
23620
|
], 64)) : createCommentVNode("", true)
|
|
23440
23621
|
], 42, _hoisted_3$e))
|
|
23441
|
-
], 14, _hoisted_1$
|
|
23622
|
+
], 14, _hoisted_1$n);
|
|
23442
23623
|
};
|
|
23443
23624
|
}
|
|
23444
23625
|
});
|
|
23445
|
-
const _style_0$
|
|
23446
|
-
const TranscriptionTurn = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
23447
|
-
const _sfc_main$
|
|
23448
|
-
const _hoisted_1$
|
|
23626
|
+
const _style_0$m = "\n.turn[data-v-5a13b85e] {\n padding: var(--spacing-sm) var(--spacing-lg);\n}\n.turn-header[data-v-5a13b85e] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n cursor: pointer;\n user-select: none;\n border-radius: var(--radius-sm);\n padding: var(--spacing-xxs) 0;\n /* Reserve the edit-actions height (Button sm) so entering/leaving edit\n mode never shifts the layout. */\n min-height: 36px;\n}\n.turn-edit-actions[data-v-5a13b85e] {\n margin-left: auto;\n display: flex;\n gap: var(--spacing-xs);\n}\n\n/* Same reset as the popover's own trigger: the label IS the button. */\n.transcript-ui-root .speaker-trigger[data-v-5a13b85e] {\n all: unset;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n border-radius: var(--radius-sm);\n}\n.transcript-ui-root .speaker-trigger[data-v-5a13b85e]:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n.turn[data-v-5a13b85e]:has(.turn-header:hover) {\n background-color: var(--color-surface-hover);\n}\n.turn-text[data-v-5a13b85e] {\n margin-top: var(--spacing-xs);\n font-size: var(--font-size-base);\n line-height: var(--line-height);\n color: var(--color-text-primary);\n}\n.turn-text--editable[data-v-5a13b85e] {\n cursor: text;\n}\n.turn-text--editable[data-v-5a13b85e]:focus-visible {\n outline: 2px solid var(--color-primary);\n border-radius: var(--radius-sm);\n}\n.turn--selected[data-v-5a13b85e] {\n background-color: color-mix(in srgb, var(--color-primary) 8%, transparent);\n border-left: 3px solid var(--color-primary);\n padding-left: calc(var(--spacing-lg) - 3px);\n}\n.turn--active[data-v-5a13b85e]:not(.turn--selected) {\n border-left: 3px solid var(--speaker-color);\n background-color: color-mix(in srgb, var(--speaker-color) 8%, transparent);\n padding-left: calc(var(--spacing-lg) - 3px);\n}\n.word--active[data-v-5a13b85e] {\n text-decoration: underline;\n text-decoration-color: var(--color-primary);\n text-decoration-thickness: 2px;\n text-underline-offset: 3px;\n color: var(--color-primary);\n}\n.turn--partial .turn-text[data-v-5a13b85e] {\n font-style: italic;\n color: var(--color-text-muted);\n animation: partial-fade-in-5a13b85e 200ms ease;\n}\n@keyframes partial-fade-in-5a13b85e {\nfrom {\n opacity: 0;\n}\nto {\n opacity: 1;\n}\n}\n@media (prefers-reduced-motion: reduce) {\n.turn--partial .turn-text[data-v-5a13b85e] {\n animation: none;\n}\n}\n@media (max-width: 767px) {\n.turn[data-v-5a13b85e] {\n padding: var(--spacing-sm) var(--spacing-md);\n}\n.turn--selected[data-v-5a13b85e],\n .turn--active[data-v-5a13b85e]:not(.turn--selected) {\n padding-left: calc(var(--spacing-md) - 3px);\n}\n}\n";
|
|
23627
|
+
const TranscriptionTurn = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["styles", [_style_0$m]], ["__scopeId", "data-v-5a13b85e"]]);
|
|
23628
|
+
const _sfc_main$q = {};
|
|
23629
|
+
const _hoisted_1$m = {
|
|
23449
23630
|
viewBox: "0 0 938 604",
|
|
23450
23631
|
fill: "none",
|
|
23451
23632
|
xmlns: "http://www.w3.org/2000/svg"
|
|
23452
23633
|
};
|
|
23453
23634
|
function _sfc_render(_ctx, _cache) {
|
|
23454
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
23635
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$m, [..._cache[0] || (_cache[0] = [
|
|
23455
23636
|
createStaticVNode('<polygon points="331.5,533.5 331.5,520.5 702.5,428.5 705.5,443.5" fill="#3f3d56" transform="matrix(1.8176168,0,0,1.8176168,-452.14416,-495.30213)"></polygon><polygon points="564.5,469.5 555.5,452.5 544.5,455.5 542.5,472.5" fill="#3f3d56" transform="matrix(1.8176168,0,0,1.8176168,-452.14416,-495.30213)"></polygon><path d="m 317.61655,19.99224 c 0,0 79.97514,-5.452851 101.78654,56.34612 21.81141,61.79897 72.70468,172.67359 92.69846,189.03214 19.99379,16.35855 41.80519,59.98136 38.16995,74.52229" stroke="#3f3d56" stroke-miterlimit="10" stroke-width="9.08808"></path><path d="m 329.43106,19.083431 c 0,8.532657 -9.0733,15.449743 -23.62902,15.449743 -14.55571,0 -21.8114,-6.917086 -21.8114,-15.449743 0,-8.532657 7.25569,-15.4497427 21.8114,-15.4497427 14.55572,0 23.62902,6.9170857 23.62902,15.4497427 z" fill="currentColor" style="fill:#999999;"></path><polygon points="691.5,439.5 364.5,521.5 377.5,602.5 666.5,602.5" fill="#3f3d56" transform="matrix(1.8176168,0,0,1.8176168,-456.32371,-492.51252)"></polygon>', 5)
|
|
23456
23637
|
])]);
|
|
23457
23638
|
}
|
|
23458
|
-
const MicrophoneIllustration = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
23459
|
-
const _hoisted_1$
|
|
23460
|
-
const _hoisted_2$
|
|
23461
|
-
const _sfc_main$
|
|
23639
|
+
const MicrophoneIllustration = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render]]);
|
|
23640
|
+
const _hoisted_1$l = { class: "transcription-empty" };
|
|
23641
|
+
const _hoisted_2$i = { class: "message" };
|
|
23642
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
23462
23643
|
__name: "TranscriptionEmpty",
|
|
23463
23644
|
setup(__props) {
|
|
23464
23645
|
const { t: t2 } = useI18n();
|
|
23465
23646
|
return (_ctx, _cache) => {
|
|
23466
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
23647
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
23467
23648
|
createVNode(MicrophoneIllustration, {
|
|
23468
23649
|
class: "illustration",
|
|
23469
23650
|
"aria-hidden": "true"
|
|
23470
23651
|
}),
|
|
23471
|
-
createBaseVNode("p", _hoisted_2$
|
|
23652
|
+
createBaseVNode("p", _hoisted_2$i, toDisplayString(unref(t2)("transcription.empty")), 1)
|
|
23472
23653
|
]);
|
|
23473
23654
|
};
|
|
23474
23655
|
}
|
|
23475
23656
|
});
|
|
23476
|
-
const _style_0$
|
|
23477
|
-
const TranscriptionEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
23657
|
+
const _style_0$l = "\n.transcription-empty[data-v-585c4f2b] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-lg);\n padding: var(--spacing-xl);\n}\n.illustration[data-v-585c4f2b] {\n width: 180px;\n height: auto;\n color: var(--color-text-muted);\n opacity: 0.5;\n}\n.message[data-v-585c4f2b] {\n color: var(--color-text-muted);\n font-size: var(--font-size-sm);\n text-align: center;\n margin: 0;\n}\n";
|
|
23658
|
+
const TranscriptionEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["styles", [_style_0$l]], ["__scopeId", "data-v-585c4f2b"]]);
|
|
23478
23659
|
function activeWordRange(root2, core, wordId2) {
|
|
23479
23660
|
const parsed = parseWordId(wordId2);
|
|
23480
23661
|
if (!parsed) return null;
|
|
@@ -23609,18 +23790,18 @@ function useFollowPlayback(scrollContainer) {
|
|
|
23609
23790
|
}
|
|
23610
23791
|
return { isFollowing, resumeFollow };
|
|
23611
23792
|
}
|
|
23612
|
-
const _hoisted_1$
|
|
23613
|
-
const _hoisted_2$
|
|
23793
|
+
const _hoisted_1$k = { class: "transcription-panel" };
|
|
23794
|
+
const _hoisted_2$h = {
|
|
23614
23795
|
ref: "scrollContainer",
|
|
23615
23796
|
class: "scroll-container"
|
|
23616
23797
|
};
|
|
23617
23798
|
const _hoisted_3$d = { class: "turns-container" };
|
|
23618
|
-
const _hoisted_4$
|
|
23799
|
+
const _hoisted_4$8 = {
|
|
23619
23800
|
key: 0,
|
|
23620
23801
|
class: "history-loading",
|
|
23621
23802
|
role: "status"
|
|
23622
23803
|
};
|
|
23623
|
-
const _hoisted_5$
|
|
23804
|
+
const _hoisted_5$8 = {
|
|
23624
23805
|
key: 1,
|
|
23625
23806
|
class: "history-start"
|
|
23626
23807
|
};
|
|
@@ -23628,7 +23809,7 @@ const _hoisted_6$7 = {
|
|
|
23628
23809
|
key: 0,
|
|
23629
23810
|
class: "resume-scroll-anchor"
|
|
23630
23811
|
};
|
|
23631
|
-
const _sfc_main$
|
|
23812
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
23632
23813
|
__name: "TranscriptionPanel",
|
|
23633
23814
|
props: {
|
|
23634
23815
|
turns: { type: Array },
|
|
@@ -23725,13 +23906,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
23725
23906
|
scrollContainerRef.value?.removeEventListener("scroll", onScrollTop);
|
|
23726
23907
|
});
|
|
23727
23908
|
return (_ctx, _cache) => {
|
|
23728
|
-
return openBlock(), createElementBlock("article", _hoisted_1$
|
|
23729
|
-
createBaseVNode("div", _hoisted_2$
|
|
23909
|
+
return openBlock(), createElementBlock("article", _hoisted_1$k, [
|
|
23910
|
+
createBaseVNode("div", _hoisted_2$h, [
|
|
23730
23911
|
createBaseVNode("div", _hoisted_3$d, [
|
|
23731
|
-
isLoadingHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
23912
|
+
isLoadingHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$8, [..._cache[2] || (_cache[2] = [
|
|
23732
23913
|
createBaseVNode("progress", null, null, -1)
|
|
23733
23914
|
])])) : createCommentVNode("", true),
|
|
23734
|
-
!hasMoreHistory.value && __props.turns.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
23915
|
+
!hasMoreHistory.value && __props.turns.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$8, toDisplayString(unref(t2)("transcription.historyStart")), 1)) : createCommentVNode("", true),
|
|
23735
23916
|
__props.turns.length === 0 && !isLoadingHistory.value && !partialTurn.value ? (openBlock(), createBlock(TranscriptionEmpty, {
|
|
23736
23917
|
key: 2,
|
|
23737
23918
|
class: "transcription-empty"
|
|
@@ -23785,13 +23966,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
23785
23966
|
};
|
|
23786
23967
|
}
|
|
23787
23968
|
});
|
|
23788
|
-
const _style_0$
|
|
23789
|
-
const TranscriptionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
23790
|
-
const _hoisted_1$
|
|
23791
|
-
const _hoisted_2$
|
|
23969
|
+
const _style_0$k = "\n.transcription-panel[data-v-66b767d7] {\n min-height: 0;\n overflow: hidden;\n background-color: var(--color-surface);\n}\n.scroll-container[data-v-66b767d7] {\n height: 100%;\n overflow: auto;\n position: relative;\n}\n.turns-container[data-v-66b767d7] {\n max-width: 80ch;\n margin-inline: auto;\n padding: var(--spacing-lg);\n}\n.turns-container[data-v-66b767d7]:has(.transcription-empty) {\n display: flex;\n flex-direction: column;\n min-height: 100%;\n}\n.history-loading[data-v-66b767d7] {\n text-align: center;\n padding: var(--spacing-md);\n}\n.history-loading progress[data-v-66b767d7] {\n width: 120px;\n}\n.history-start[data-v-66b767d7] {\n text-align: center;\n padding: var(--spacing-md);\n color: var(--color-text-muted);\n font-size: var(--font-size-sm);\n}\n\n/* Resume scroll button — placement lives on this wrapper, never on the\n button itself: Button.vue's `.editor-btn` base rule resets `position` via\n `all: unset` (and, in the webcomponent build, gets re-injected a second\n time after everything else to reach teleported popovers/dialogs — see\n packages/webcomponent/src/index.ts), so any positioning put directly on\n the button is one rebuild away from being silently overridden again. */\n.resume-scroll-anchor[data-v-66b767d7] {\n position: sticky;\n bottom: var(--spacing-lg);\n z-index: var(--z-sticky);\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.resume-scroll-btn[data-v-66b767d7] {\n /* No backdrop-filter: this button is sticky inside the tall scroll\n container, where a backdrop-filter makes WebRender allocate a render\n target spanning the whole scroll height — multi-GB on a long transcript. */\n background: white !important;\n border: 1px solid var(--color-border);\n box-shadow: var(--shadow-sm);\n}\n\n/* Transition */\n.fade-slide-enter-active[data-v-66b767d7],\n.fade-slide-leave-active[data-v-66b767d7] {\n transition:\n opacity 200ms ease,\n translate 200ms ease;\n}\n.fade-slide-enter-from[data-v-66b767d7],\n.fade-slide-leave-to[data-v-66b767d7] {\n opacity: 0;\n translate: 0 8px;\n}\n@media (prefers-reduced-motion: reduce) {\n.fade-slide-enter-active[data-v-66b767d7],\n .fade-slide-leave-active[data-v-66b767d7] {\n transition: none;\n}\n}\n@media (max-width: 767px) {\n.turns-container[data-v-66b767d7] {\n padding: var(--spacing-md);\n}\n}\n";
|
|
23970
|
+
const TranscriptionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["styles", [_style_0$k]], ["__scopeId", "data-v-66b767d7"]]);
|
|
23971
|
+
const _hoisted_1$j = { class: "verbatim-panel" };
|
|
23972
|
+
const _hoisted_2$g = { class: "verbatim-panel__content" };
|
|
23792
23973
|
const _hoisted_3$c = { class: "verbatim-panel__header" };
|
|
23793
|
-
const _hoisted_4$
|
|
23794
|
-
const _hoisted_5$
|
|
23974
|
+
const _hoisted_4$7 = { class: "verbatim-panel__doc-title" };
|
|
23975
|
+
const _hoisted_5$7 = { class: "verbatim-panel__turns" };
|
|
23795
23976
|
const _hoisted_6$6 = { class: "verbatim-panel__turn-header" };
|
|
23796
23977
|
const _hoisted_7$3 = { class: "verbatim-panel__speaker-name" };
|
|
23797
23978
|
const _hoisted_8$1 = {
|
|
@@ -23803,7 +23984,7 @@ const _hoisted_9$1 = {
|
|
|
23803
23984
|
class: "verbatim-panel__meta"
|
|
23804
23985
|
};
|
|
23805
23986
|
const _hoisted_10$1 = { class: "verbatim-panel__text" };
|
|
23806
|
-
const _sfc_main$
|
|
23987
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
23807
23988
|
__name: "VerbatimPanel",
|
|
23808
23989
|
setup(__props) {
|
|
23809
23990
|
const core = useCore();
|
|
@@ -23849,20 +24030,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
23849
24030
|
core.emit("verbatim:export", { format: format2 });
|
|
23850
24031
|
}
|
|
23851
24032
|
return (_ctx, _cache) => {
|
|
23852
|
-
return openBlock(), createElementBlock("section", _hoisted_1$
|
|
24033
|
+
return openBlock(), createElementBlock("section", _hoisted_1$j, [
|
|
23853
24034
|
createVNode(unref(DocumentArticle), null, {
|
|
23854
24035
|
"toolbar-right": withCtx(() => [
|
|
23855
|
-
createVNode(unref(_sfc_main$
|
|
24036
|
+
createVNode(unref(_sfc_main$A), {
|
|
23856
24037
|
formats: unref(core).verbatimFormats.value,
|
|
23857
24038
|
onSelect: onExport
|
|
23858
24039
|
}, null, 8, ["formats"])
|
|
23859
24040
|
]),
|
|
23860
24041
|
default: withCtx(() => [
|
|
23861
|
-
createBaseVNode("article", _hoisted_2$
|
|
24042
|
+
createBaseVNode("article", _hoisted_2$g, [
|
|
23862
24043
|
createBaseVNode("header", _hoisted_3$c, [
|
|
23863
|
-
createBaseVNode("h1", _hoisted_4$
|
|
24044
|
+
createBaseVNode("h1", _hoisted_4$7, toDisplayString(title.value), 1)
|
|
23864
24045
|
]),
|
|
23865
|
-
createBaseVNode("ul", _hoisted_5$
|
|
24046
|
+
createBaseVNode("ul", _hoisted_5$7, [
|
|
23866
24047
|
(openBlock(true), createElementBlock(Fragment, null, renderList(turns.value, (turn) => {
|
|
23867
24048
|
return openBlock(), createElementBlock("li", {
|
|
23868
24049
|
key: turn.id,
|
|
@@ -23897,9 +24078,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
23897
24078
|
};
|
|
23898
24079
|
}
|
|
23899
24080
|
});
|
|
23900
|
-
const _style_0$
|
|
23901
|
-
const VerbatimPanel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
23902
|
-
const _sfc_main$
|
|
24081
|
+
const _style_0$j = "\n.verbatim-panel[data-v-7a077f5a] {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.verbatim-panel__content[data-v-7a077f5a] {\n padding: 4rem clamp(1.5rem, 6rem, 8%);\n}\n.verbatim-panel__header[data-v-7a077f5a] {\n margin-bottom: var(--spacing-lg);\n padding-bottom: var(--spacing-md);\n border-bottom: 1px solid var(--color-border);\n}\n.verbatim-panel__doc-title[data-v-7a077f5a] {\n font-size: var(--font-size-xl);\n font-weight: 700;\n margin: 0;\n color: var(--color-text-primary);\n}\n.verbatim-panel__turns[data-v-7a077f5a] {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-lg);\n}\n.verbatim-panel__turn[data-v-7a077f5a] {\n display: block;\n}\n.verbatim-panel__turn-header[data-v-7a077f5a] {\n margin: 0 0 var(--spacing-xs);\n font-size: var(--font-size-base);\n line-height: 1.4;\n}\n.verbatim-panel__speaker-name[data-v-7a077f5a] {\n font-weight: 700;\n color: var(--color-text-primary);\n}\n.verbatim-panel__meta[data-v-7a077f5a] {\n color: var(--color-text-muted);\n font-weight: 400;\n}\n.verbatim-panel__sep[data-v-7a077f5a] {\n margin: 0 0.35em;\n}\n.verbatim-panel__text[data-v-7a077f5a] {\n margin: 0;\n font-size: var(--font-size-base);\n line-height: 1.6;\n color: var(--color-text-primary);\n}\n\n";
|
|
24082
|
+
const VerbatimPanel = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["styles", [_style_0$j]], ["__scopeId", "data-v-7a077f5a"]]);
|
|
24083
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
23903
24084
|
__name: "ChannelSelector",
|
|
23904
24085
|
props: {
|
|
23905
24086
|
channels: { type: Array },
|
|
@@ -23925,7 +24106,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
23925
24106
|
};
|
|
23926
24107
|
}
|
|
23927
24108
|
});
|
|
23928
|
-
const _sfc_main$
|
|
24109
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
23929
24110
|
__name: "TranslationSelector",
|
|
23930
24111
|
props: {
|
|
23931
24112
|
translations: { type: Array },
|
|
@@ -23957,10 +24138,10 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
23957
24138
|
};
|
|
23958
24139
|
}
|
|
23959
24140
|
});
|
|
23960
|
-
const _hoisted_1$
|
|
23961
|
-
const _hoisted_2$
|
|
24141
|
+
const _hoisted_1$i = { class: "merge-dialog-title" };
|
|
24142
|
+
const _hoisted_2$f = { class: "merge-dialog-description" };
|
|
23962
24143
|
const _hoisted_3$b = { class: "merge-dialog-actions" };
|
|
23963
|
-
const _sfc_main$
|
|
24144
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
23964
24145
|
__name: "MergeDialog",
|
|
23965
24146
|
props: {
|
|
23966
24147
|
open: { type: Boolean },
|
|
@@ -24028,8 +24209,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
24028
24209
|
class: "merge-dialog-form",
|
|
24029
24210
|
onSubmit: withModifiers(onConfirm, ["prevent"])
|
|
24030
24211
|
}, [
|
|
24031
|
-
createBaseVNode("h2", _hoisted_1$
|
|
24032
|
-
createBaseVNode("p", _hoisted_2$
|
|
24212
|
+
createBaseVNode("h2", _hoisted_1$i, toDisplayString(unref(t2)("mergeDialog.title")), 1),
|
|
24213
|
+
createBaseVNode("p", _hoisted_2$f, [
|
|
24033
24214
|
createBaseVNode("strong", null, toDisplayString(fromSpeaker.value.name), 1),
|
|
24034
24215
|
createTextVNode(" · " + toDisplayString(affectedCount.value) + " " + toDisplayString(unref(t2)("mergeDialog.turnsAffected")), 1)
|
|
24035
24216
|
]),
|
|
@@ -24067,19 +24248,19 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
24067
24248
|
};
|
|
24068
24249
|
}
|
|
24069
24250
|
});
|
|
24070
|
-
const _style_0$
|
|
24071
|
-
const MergeDialog = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
24072
|
-
const _hoisted_1$
|
|
24073
|
-
const _hoisted_2$
|
|
24251
|
+
const _style_0$i = "\n.merge-dialog[data-v-e658bcd0] {\n margin: auto;\n max-width: 420px;\n width: 90vw;\n padding: var(--spacing-lg);\n background-color: var(--color-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n color: var(--color-text-primary);\n box-shadow: 0 16px 48px color-mix(in srgb, var(--color-text-primary) 20%, transparent);\n}\n.merge-dialog[data-v-e658bcd0]::backdrop {\n /* No backdrop-filter: a full-viewport backdrop blur is a large WebRender\n render target; the dim background alone is enough. */\n background-color: color-mix(in srgb, var(--color-text-primary) 35%, transparent);\n}\n.merge-dialog-form[data-v-e658bcd0] {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-md);\n}\n.merge-dialog-title[data-v-e658bcd0] {\n margin: 0;\n font-size: var(--font-size-lg);\n font-weight: 600;\n}\n.merge-dialog-description[data-v-e658bcd0] {\n margin: 0;\n font-size: var(--font-size-sm);\n color: var(--color-text-secondary);\n}\n.merge-dialog-actions[data-v-e658bcd0] {\n display: flex;\n justify-content: flex-end;\n gap: var(--spacing-sm);\n}\n";
|
|
24252
|
+
const MergeDialog = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["styles", [_style_0$i]], ["__scopeId", "data-v-e658bcd0"]]);
|
|
24253
|
+
const _hoisted_1$h = { class: "speaker-sidebar" };
|
|
24254
|
+
const _hoisted_2$e = {
|
|
24074
24255
|
key: 0,
|
|
24075
24256
|
class: "sidebar-section sidebar-section--selector"
|
|
24076
24257
|
};
|
|
24077
24258
|
const _hoisted_3$a = { class: "sidebar-title" };
|
|
24078
|
-
const _hoisted_4$
|
|
24259
|
+
const _hoisted_4$6 = {
|
|
24079
24260
|
key: 1,
|
|
24080
24261
|
class: "sidebar-section sidebar-section--selector"
|
|
24081
24262
|
};
|
|
24082
|
-
const _hoisted_5$
|
|
24263
|
+
const _hoisted_5$6 = { class: "sidebar-title" };
|
|
24083
24264
|
const _hoisted_6$5 = {
|
|
24084
24265
|
key: 2,
|
|
24085
24266
|
class: "sidebar-section"
|
|
@@ -24122,7 +24303,7 @@ const _hoisted_27 = {
|
|
|
24122
24303
|
};
|
|
24123
24304
|
const _hoisted_28 = { class: "sidebar-title" };
|
|
24124
24305
|
const _hoisted_29 = { class: "speaker-list" };
|
|
24125
|
-
const _sfc_main$
|
|
24306
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
24126
24307
|
__name: "SpeakerSidebar",
|
|
24127
24308
|
props: {
|
|
24128
24309
|
speakers: { type: Array },
|
|
@@ -24207,18 +24388,18 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
24207
24388
|
core.emit("llmService:selectVersion", { id: service.id, versionNumber });
|
|
24208
24389
|
}
|
|
24209
24390
|
return (_ctx, _cache) => {
|
|
24210
|
-
return openBlock(), createElementBlock("aside", _hoisted_1$
|
|
24211
|
-
__props.channels.length > 1 ? (openBlock(), createElementBlock("section", _hoisted_2$
|
|
24391
|
+
return openBlock(), createElementBlock("aside", _hoisted_1$h, [
|
|
24392
|
+
__props.channels.length > 1 ? (openBlock(), createElementBlock("section", _hoisted_2$e, [
|
|
24212
24393
|
createBaseVNode("h2", _hoisted_3$a, toDisplayString(unref(t2)("sidebar.channel")), 1),
|
|
24213
|
-
createVNode(_sfc_main$
|
|
24394
|
+
createVNode(_sfc_main$m, {
|
|
24214
24395
|
channels: __props.channels,
|
|
24215
24396
|
"selected-channel-id": __props.selectedChannelId,
|
|
24216
24397
|
"onUpdate:selectedChannelId": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:selectedChannelId", $event))
|
|
24217
24398
|
}, null, 8, ["channels", "selected-channel-id"])
|
|
24218
24399
|
])) : createCommentVNode("", true),
|
|
24219
|
-
__props.translations.length > 1 ? (openBlock(), createElementBlock("section", _hoisted_4$
|
|
24220
|
-
createBaseVNode("h2", _hoisted_5$
|
|
24221
|
-
createVNode(_sfc_main$
|
|
24400
|
+
__props.translations.length > 1 ? (openBlock(), createElementBlock("section", _hoisted_4$6, [
|
|
24401
|
+
createBaseVNode("h2", _hoisted_5$6, toDisplayString(unref(t2)("sidebar.translation")), 1),
|
|
24402
|
+
createVNode(_sfc_main$l, {
|
|
24222
24403
|
translations: __props.translations,
|
|
24223
24404
|
"selected-translation-id": __props.selectedTranslationId,
|
|
24224
24405
|
"onUpdate:selectedTranslationId": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:selectedTranslationId", $event))
|
|
@@ -24363,7 +24544,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
24363
24544
|
"aria-label": unref(t2)("sidebar.renameSpeaker"),
|
|
24364
24545
|
onCommit: ($event) => onRename(speaker.id, $event)
|
|
24365
24546
|
}, null, 8, ["model-value", "disabled", "aria-label", "onCommit"]),
|
|
24366
|
-
canEditSpeakers.value && __props.speakers.length > 1 ? (openBlock(), createBlock(unref(_sfc_main$
|
|
24547
|
+
canEditSpeakers.value && __props.speakers.length > 1 ? (openBlock(), createBlock(unref(_sfc_main$z), {
|
|
24367
24548
|
key: 0,
|
|
24368
24549
|
"speaker-name": speaker.name,
|
|
24369
24550
|
onMerge: ($event) => onOpenMerge(speaker.id)
|
|
@@ -24382,9 +24563,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
24382
24563
|
};
|
|
24383
24564
|
}
|
|
24384
24565
|
});
|
|
24385
|
-
const _style_0$
|
|
24386
|
-
const SpeakerSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
24387
|
-
const _sfc_main$
|
|
24566
|
+
const _style_0$h = '\n.speaker-sidebar[data-v-3b1e278f] {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-lg);\n padding: var(--spacing-lg);\n border-left: 1px solid var(--color-border);\n background-color: var(--color-surface);\n overflow-y: auto;\n}\n.sidebar-section[data-v-3b1e278f] {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-sm);\n}\n.sidebar-title[data-v-3b1e278f] {\n font-size: var(--font-size-sm);\n font-weight: 600;\n color: var(--color-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.speaker-list[data-v-3b1e278f] {\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-xs);\n}\n.speaker-item[data-v-3b1e278f] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-sm);\n border-radius: var(--radius-md);\n transition: background-color var(--transition-duration);\n}\n.speaker-item[data-v-3b1e278f]:hover {\n background-color: var(--color-surface-hover);\n}\n.speaker-name[data-v-3b1e278f] {\n flex: 1;\n font-size: var(--font-size-sm);\n font-weight: 500;\n color: var(--color-text-primary);\n}\n.subtitle-toggle[data-v-3b1e278f] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--spacing-sm);\n border-radius: var(--radius-md);\n}\n.subtitle-toggle-label[data-v-3b1e278f] {\n font-size: var(--font-size-sm);\n color: var(--color-text-primary);\n}\n.voice-playback-hint[data-v-3b1e278f] {\n padding: 0 var(--spacing-sm);\n font-size: var(--font-size-xs);\n color: var(--color-text-muted);\n}\n.voice-playback-hint--warning[data-v-3b1e278f] {\n color: var(--color-danger);\n}\n.subtitle-slider[data-v-3b1e278f] {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-xs);\n padding: var(--spacing-sm);\n}\n.subtitle-slider-label[data-v-3b1e278f] {\n display: flex;\n justify-content: space-between;\n font-size: var(--font-size-sm);\n color: var(--color-text-primary);\n}\n.subtitle-slider-value[data-v-3b1e278f] {\n color: var(--color-text-muted);\n font-variant-numeric: tabular-nums;\n}\n.subtitle-slider input[type="range"][data-v-3b1e278f] {\n width: 100%;\n accent-color: var(--color-primary);\n}\n.subtitle-slider input[type="range"][data-v-3b1e278f]:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* ── History (LLM generations + versions) ──────────────────────────── */\n.sidebar-section--busy[data-v-3b1e278f] {\n opacity: 0.6;\n pointer-events: none;\n}\n.history-list[data-v-3b1e278f] {\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-xs);\n margin: 0;\n padding: 0;\n}\n.history-generation[data-v-3b1e278f] {\n display: flex;\n flex-direction: column;\n}\n.history-generation__status--completed[data-v-3b1e278f] {\n color: var(--color-success, #2e7d32);\n}\n.history-generation__status--error[data-v-3b1e278f] {\n color: var(--color-danger, #d33);\n}\n.history-generation__status--processing[data-v-3b1e278f],\n.history-generation__status--queued[data-v-3b1e278f] {\n color: var(--color-primary);\n}\n.history-version-list[data-v-3b1e278f] {\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: var(--spacing-xs) 0 0 var(--spacing-md);\n padding: 0;\n border-left: 1px solid var(--color-border);\n}\n\n/* Nudge nested version rows off the connecting border line. */\n.history-version-list[data-v-3b1e278f] .selectable-list-item {\n margin-left: var(--spacing-xs);\n}\n@media (max-width: 767px) {\n.speaker-sidebar[data-v-3b1e278f] {\n border-left: none;\n}\n.sidebar-section--selector[data-v-3b1e278f] {\n display: none;\n}\n}\n';
|
|
24567
|
+
const SpeakerSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["styles", [_style_0$h]], ["__scopeId", "data-v-3b1e278f"]]);
|
|
24568
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
24388
24569
|
__name: "SidebarDrawer",
|
|
24389
24570
|
props: {
|
|
24390
24571
|
"open": { type: Boolean, ...{ required: true } },
|
|
@@ -24433,10 +24614,10 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
24433
24614
|
};
|
|
24434
24615
|
}
|
|
24435
24616
|
});
|
|
24436
|
-
const _hoisted_1$
|
|
24437
|
-
const _hoisted_2$
|
|
24617
|
+
const _hoisted_1$g = ["aria-label"];
|
|
24618
|
+
const _hoisted_2$d = { class: "selection-count" };
|
|
24438
24619
|
const _hoisted_3$9 = { class: "selection-actions" };
|
|
24439
|
-
const _sfc_main$
|
|
24620
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
24440
24621
|
__name: "SelectionActionBar",
|
|
24441
24622
|
setup(__props) {
|
|
24442
24623
|
const selection = useTurnSelection();
|
|
@@ -24448,7 +24629,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
24448
24629
|
role: "toolbar",
|
|
24449
24630
|
"aria-label": unref(t2)("selection.count")
|
|
24450
24631
|
}, [
|
|
24451
|
-
createBaseVNode("span", _hoisted_2$
|
|
24632
|
+
createBaseVNode("span", _hoisted_2$d, toDisplayString(unref(selection).count.value) + " " + toDisplayString(unref(t2)("selection.count")), 1),
|
|
24452
24633
|
createBaseVNode("div", _hoisted_3$9, [
|
|
24453
24634
|
createVNode(unref(CopyButton), {
|
|
24454
24635
|
icon: "clipboard-type",
|
|
@@ -24480,35 +24661,18 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
24480
24661
|
_: 1
|
|
24481
24662
|
})
|
|
24482
24663
|
])
|
|
24483
|
-
], 8, _hoisted_1$
|
|
24664
|
+
], 8, _hoisted_1$g)) : createCommentVNode("", true);
|
|
24484
24665
|
};
|
|
24485
24666
|
}
|
|
24486
24667
|
});
|
|
24487
|
-
const _style_0$
|
|
24488
|
-
const SelectionActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
24489
|
-
const
|
|
24490
|
-
|
|
24491
|
-
const isMobile = /* @__PURE__ */ ref(false);
|
|
24492
|
-
let mql = null;
|
|
24493
|
-
function onChange(e3) {
|
|
24494
|
-
isMobile.value = e3.matches;
|
|
24495
|
-
}
|
|
24496
|
-
onMounted(() => {
|
|
24497
|
-
mql = window.matchMedia(MOBILE_BREAKPOINT);
|
|
24498
|
-
isMobile.value = mql.matches;
|
|
24499
|
-
mql.addEventListener("change", onChange);
|
|
24500
|
-
});
|
|
24501
|
-
onBeforeUnmount(() => {
|
|
24502
|
-
mql?.removeEventListener("change", onChange);
|
|
24503
|
-
});
|
|
24504
|
-
return { isMobile };
|
|
24505
|
-
}
|
|
24506
|
-
const _hoisted_1$e = { class: "editor-layout" };
|
|
24507
|
-
const _hoisted_2$b = {
|
|
24668
|
+
const _style_0$g = "\n.selection-bar[data-v-9bad1410] {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--spacing-xs) var(--spacing-lg);\n /* No backdrop-filter: it forces a WebRender backdrop render target sized to\n the content behind, a heavy GPU-memory cost on long transcripts. The\n semi-opaque glass background stays legible without the blur. */\n background: var(--glass-background);\n border-bottom: 1px solid var(--color-border);\n animation: bar-slide-down-9bad1410 var(--transition-duration) ease;\n}\n.selection-count[data-v-9bad1410] {\n font-size: var(--font-size-sm);\n font-weight: 600;\n color: var(--color-primary);\n}\n.selection-actions[data-v-9bad1410] {\n display: flex;\n gap: var(--spacing-xs);\n}\n@keyframes bar-slide-down-9bad1410 {\nfrom {\n opacity: 0;\n translate: 0 -4px;\n}\nto {\n opacity: 1;\n translate: 0 0;\n}\n}\n@media (prefers-reduced-motion: reduce) {\n.selection-bar[data-v-9bad1410] {\n animation: none;\n}\n}\n@media (max-width: 767px) {\n.selection-bar[data-v-9bad1410] {\n padding: var(--spacing-xs) var(--spacing-md);\n flex-wrap: wrap;\n gap: var(--spacing-xs);\n}\n}\n";
|
|
24669
|
+
const SelectionActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["styles", [_style_0$g]], ["__scopeId", "data-v-9bad1410"]]);
|
|
24670
|
+
const _hoisted_1$f = { class: "editor-layout" };
|
|
24671
|
+
const _hoisted_2$c = {
|
|
24508
24672
|
key: 6,
|
|
24509
24673
|
class: "mobile-selectors"
|
|
24510
24674
|
};
|
|
24511
|
-
const _sfc_main$
|
|
24675
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
24512
24676
|
__name: "Layout",
|
|
24513
24677
|
props: {
|
|
24514
24678
|
showHeader: { type: Boolean, default: true },
|
|
@@ -24550,6 +24714,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24550
24714
|
);
|
|
24551
24715
|
const speakerList = computed(() => Array.from(speakers.values()));
|
|
24552
24716
|
const showTranscription = computed(() => activeTab.value === TRANSCRIPTION_TAB);
|
|
24717
|
+
watch(isMobile, (mobile) => {
|
|
24718
|
+
if (mobile && isSplit.value) isSplit.value = false;
|
|
24719
|
+
});
|
|
24553
24720
|
watch(activeTab, (id) => {
|
|
24554
24721
|
if (!core.llmServices) return;
|
|
24555
24722
|
if (id === TRANSCRIPTION_TAB || id === VERBATIM_TAB) {
|
|
@@ -24570,7 +24737,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24570
24737
|
() => props.showVerbatim,
|
|
24571
24738
|
(canShow) => {
|
|
24572
24739
|
if (canShow) return;
|
|
24573
|
-
const withoutVerbatim = shownPanels.value.filter(
|
|
24740
|
+
const withoutVerbatim = shownPanels.value.filter(
|
|
24741
|
+
(id) => id !== VERBATIM_TAB
|
|
24742
|
+
);
|
|
24574
24743
|
shownPanels.value = withoutVerbatim.length > 0 ? withoutVerbatim : [TRANSCRIPTION_TAB];
|
|
24575
24744
|
}
|
|
24576
24745
|
);
|
|
@@ -24595,7 +24764,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24595
24764
|
core.activeChannel.value?.setActiveTranslation(translationId);
|
|
24596
24765
|
}
|
|
24597
24766
|
return (_ctx, _cache) => {
|
|
24598
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
24767
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
24599
24768
|
props.showHeader ? (openBlock(), createBlock(Header, {
|
|
24600
24769
|
key: 0,
|
|
24601
24770
|
title: unref(core).title.value,
|
|
@@ -24611,7 +24780,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24611
24780
|
onUndo: _cache[2] || (_cache[2] = ($event) => unref(core).transcriptionEditor?.undo()),
|
|
24612
24781
|
onRedo: _cache[3] || (_cache[3] = ($event) => unref(core).transcriptionEditor?.redo())
|
|
24613
24782
|
}, null, 8, ["title", "date", "duration", "speaker-count", "is-mobile", "can-ask", "can-undo", "can-redo"])) : createCommentVNode("", true),
|
|
24614
|
-
createVNode(_sfc_main$
|
|
24783
|
+
createVNode(_sfc_main$v, {
|
|
24615
24784
|
"model-value": activeTab.value,
|
|
24616
24785
|
"show-verbatim": props.showVerbatim,
|
|
24617
24786
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = (tab) => shownPanels.value = [tab])
|
|
@@ -24651,7 +24820,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24651
24820
|
"onUpdate:selectedChannelId": onChannelChange,
|
|
24652
24821
|
"onUpdate:selectedTranslationId": onTranslationChange
|
|
24653
24822
|
}, null, 8, ["speakers", "channels", "selected-channel-id", "translations", "selected-translation-id", "show-speakers"])) : createCommentVNode("", true),
|
|
24654
|
-
unref(isMobile) && panels.value.length === 1 ? (openBlock(), createBlock(_sfc_main$
|
|
24823
|
+
unref(isMobile) && panels.value.length === 1 ? (openBlock(), createBlock(_sfc_main$i, {
|
|
24655
24824
|
key: 1,
|
|
24656
24825
|
open: isSidebarOpen.value,
|
|
24657
24826
|
"onUpdate:open": _cache[6] || (_cache[6] = ($event) => isSidebarOpen.value = $event)
|
|
@@ -24680,14 +24849,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24680
24849
|
unref(core).subtitle?.isVisible.value && !unref(isMobile) && !unref(core).subtitle.isFullscreen.value ? (openBlock(), createBlock(resolveDynamicComponent(unref(core).components.subtitleBanner), { key: 3 })) : createCommentVNode("", true),
|
|
24681
24850
|
unref(core).subtitle?.isFullscreen.value ? (openBlock(), createBlock(resolveDynamicComponent(unref(core).components.subtitleFullscreen), { key: 4 })) : createCommentVNode("", true),
|
|
24682
24851
|
unref(core).chat ? (openBlock(), createBlock(resolveDynamicComponent(unref(core).components.chatDrawer), { key: 5 })) : createCommentVNode("", true),
|
|
24683
|
-
unref(isMobile) && (channels.value.length > 1 || translations.value.length > 1) ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
24684
|
-
channels.value.length > 1 ? (openBlock(), createBlock(_sfc_main$
|
|
24852
|
+
unref(isMobile) && (channels.value.length > 1 || translations.value.length > 1) ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
|
|
24853
|
+
channels.value.length > 1 ? (openBlock(), createBlock(_sfc_main$m, {
|
|
24685
24854
|
key: 0,
|
|
24686
24855
|
channels: channels.value,
|
|
24687
24856
|
"selected-channel-id": unref(core).activeChannelId.value,
|
|
24688
24857
|
"onUpdate:selectedChannelId": onChannelChange
|
|
24689
24858
|
}, null, 8, ["channels", "selected-channel-id"])) : createCommentVNode("", true),
|
|
24690
|
-
translations.value.length > 1 ? (openBlock(), createBlock(_sfc_main$
|
|
24859
|
+
translations.value.length > 1 ? (openBlock(), createBlock(_sfc_main$l, {
|
|
24691
24860
|
key: 1,
|
|
24692
24861
|
translations: translations.value,
|
|
24693
24862
|
"selected-translation-id": activeTranslationId.value,
|
|
@@ -24698,41 +24867,41 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24698
24867
|
};
|
|
24699
24868
|
}
|
|
24700
24869
|
});
|
|
24701
|
-
const _style_0$
|
|
24702
|
-
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
24703
|
-
const _hoisted_1$
|
|
24870
|
+
const _style_0$f = "\n.editor-layout[data-v-c7029599] {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n background-color: var(--color-background);\n}\n.editor-body[data-v-c7029599] {\n display: grid;\n grid-template-columns: 1fr var(--sidebar-width);\n flex: 1;\n min-height: 0;\n}\n\n/* Split mode: two panels already share the body between them, no room (or\n need) for the speaker sidebar too — see Layout's panels/isSplit state. */\n.editor-body--no-sidebar[data-v-c7029599] {\n grid-template-columns: 1fr;\n}\n.editor-body__panels[data-v-c7029599] {\n display: flex;\n min-width: 0;\n min-height: 0;\n}\n.editor-body__panels[data-v-c7029599] > * {\n flex: 1;\n min-width: 0;\n}\n.editor-body__panels--split[data-v-c7029599] > * + * {\n border-left: 1px solid var(--color-border);\n}\n.mobile-selectors[data-v-c7029599] {\n display: flex;\n gap: var(--spacing-sm);\n padding: var(--spacing-sm) var(--spacing-md);\n border-top: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n box-shadow: var(--shadow-md);\n align-items: end;\n}\n.mobile-selectors[data-v-c7029599] > * {\n flex: 1;\n min-width: 0;\n}\n@media (max-width: 767px) {\n.editor-body[data-v-c7029599] {\n grid-template-columns: 1fr;\n}\n}\n";
|
|
24871
|
+
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["styles", [_style_0$f]], ["__scopeId", "data-v-c7029599"]]);
|
|
24872
|
+
const _hoisted_1$e = {
|
|
24704
24873
|
class: "editor-loading",
|
|
24705
24874
|
role: "status",
|
|
24706
24875
|
"aria-live": "polite"
|
|
24707
24876
|
};
|
|
24708
|
-
const _hoisted_2$
|
|
24709
|
-
const _sfc_main$
|
|
24877
|
+
const _hoisted_2$b = { class: "editor-loading__label" };
|
|
24878
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
24710
24879
|
__name: "EditorLoadingOverlay",
|
|
24711
24880
|
setup(__props) {
|
|
24712
24881
|
const { t: t2 } = useI18n();
|
|
24713
24882
|
return (_ctx, _cache) => {
|
|
24714
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
24883
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
24715
24884
|
_cache[0] || (_cache[0] = createBaseVNode("span", {
|
|
24716
24885
|
class: "editor-loading__spinner",
|
|
24717
24886
|
"aria-hidden": "true"
|
|
24718
24887
|
}, null, -1)),
|
|
24719
|
-
createBaseVNode("span", _hoisted_2$
|
|
24888
|
+
createBaseVNode("span", _hoisted_2$b, toDisplayString(unref(t2)("editor.loading")), 1)
|
|
24720
24889
|
]);
|
|
24721
24890
|
};
|
|
24722
24891
|
}
|
|
24723
24892
|
});
|
|
24724
|
-
const _style_0$
|
|
24725
|
-
const EditorLoadingOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
24726
|
-
const _hoisted_1$
|
|
24893
|
+
const _style_0$e = "\n.editor-loading[data-v-f56c39db] {\n position: absolute;\n inset: 0;\n z-index: 20;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-md);\n /* Opaque so the half-built layout never flashes behind while collab syncs.\n No backdrop-filter: it is banned in this package (WebRender GTT freeze). */\n background-color: var(--color-background);\n color: var(--color-text-secondary);\n font-family: var(--font-family);\n font-size: var(--font-size-sm);\n}\n.editor-loading__spinner[data-v-f56c39db] {\n width: 32px;\n height: 32px;\n border: 3px solid var(--color-border);\n border-top-color: var(--color-primary);\n border-radius: 50%;\n animation: editor-loading-spin-f56c39db 0.8s linear infinite;\n}\n@keyframes editor-loading-spin-f56c39db {\nto {\n transform: rotate(360deg);\n}\n}\n@media (prefers-reduced-motion: reduce) {\n.editor-loading__spinner[data-v-f56c39db] {\n animation: none;\n}\n}\n";
|
|
24894
|
+
const EditorLoadingOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["styles", [_style_0$e]], ["__scopeId", "data-v-f56c39db"]]);
|
|
24895
|
+
const _hoisted_1$d = {
|
|
24727
24896
|
class: "editor-error",
|
|
24728
24897
|
role: "alert"
|
|
24729
24898
|
};
|
|
24730
|
-
const _hoisted_2$
|
|
24899
|
+
const _hoisted_2$a = { class: "editor-error__title" };
|
|
24731
24900
|
const _hoisted_3$8 = {
|
|
24732
24901
|
key: 0,
|
|
24733
24902
|
class: "editor-error__detail"
|
|
24734
24903
|
};
|
|
24735
|
-
const _sfc_main$
|
|
24904
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
24736
24905
|
__name: "EditorErrorOverlay",
|
|
24737
24906
|
props: {
|
|
24738
24907
|
message: { type: [String, null] }
|
|
@@ -24740,20 +24909,20 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
24740
24909
|
setup(__props) {
|
|
24741
24910
|
const { t: t2 } = useI18n();
|
|
24742
24911
|
return (_ctx, _cache) => {
|
|
24743
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
24912
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
24744
24913
|
createVNode(unref(EditorIcon), {
|
|
24745
24914
|
name: "warning",
|
|
24746
24915
|
size: 40,
|
|
24747
24916
|
class: "editor-error__icon"
|
|
24748
24917
|
}),
|
|
24749
|
-
createBaseVNode("p", _hoisted_2$
|
|
24918
|
+
createBaseVNode("p", _hoisted_2$a, toDisplayString(unref(t2)("editor.loadError")), 1),
|
|
24750
24919
|
__props.message ? (openBlock(), createElementBlock("p", _hoisted_3$8, toDisplayString(__props.message), 1)) : createCommentVNode("", true)
|
|
24751
24920
|
]);
|
|
24752
24921
|
};
|
|
24753
24922
|
}
|
|
24754
24923
|
});
|
|
24755
|
-
const _style_0$
|
|
24756
|
-
const EditorErrorOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
24924
|
+
const _style_0$d = "\n.editor-error[data-v-eefc2d23] {\n position: absolute;\n inset: 0;\n z-index: 20;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-xl);\n text-align: center;\n /* Opaque so the half-built layout never shows behind. No backdrop-filter:\n it is banned in this package (WebRender GTT freeze). */\n background-color: var(--color-background);\n font-family: var(--font-family);\n}\n.editor-error__icon[data-v-eefc2d23] {\n color: var(--color-danger);\n}\n.editor-error__title[data-v-eefc2d23] {\n margin: 0;\n font-size: var(--font-size-lg);\n font-weight: 600;\n color: var(--color-text-primary);\n}\n.editor-error__detail[data-v-eefc2d23] {\n margin: 0;\n font-size: var(--font-size-sm);\n color: var(--color-text-muted);\n}\n";
|
|
24925
|
+
const EditorErrorOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["styles", [_style_0$d]], ["__scopeId", "data-v-eefc2d23"]]);
|
|
24757
24926
|
const READY_TIMEOUT_MS = 2e4;
|
|
24758
24927
|
function useEditorReady(core) {
|
|
24759
24928
|
const isLoading = /* @__PURE__ */ ref(true);
|
|
@@ -24787,8 +24956,8 @@ function useEditorReady(core) {
|
|
|
24787
24956
|
});
|
|
24788
24957
|
return { isLoading, error };
|
|
24789
24958
|
}
|
|
24790
|
-
const _hoisted_1$
|
|
24791
|
-
const _sfc_main$
|
|
24959
|
+
const _hoisted_1$c = { class: "transcript-ui-root" };
|
|
24960
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
24792
24961
|
__name: "TranscriptUI",
|
|
24793
24962
|
props: {
|
|
24794
24963
|
locale: { default: "fr", type: String },
|
|
@@ -24811,7 +24980,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
24811
24980
|
onBeforeUnmount(() => core.destroy());
|
|
24812
24981
|
__expose({ core });
|
|
24813
24982
|
return (_ctx, _cache) => {
|
|
24814
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
24983
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
24815
24984
|
unref(core).channels.size ? (openBlock(), createBlock(Layout, {
|
|
24816
24985
|
key: 0,
|
|
24817
24986
|
"show-header": !props.noHeader,
|
|
@@ -24825,7 +24994,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
24825
24994
|
};
|
|
24826
24995
|
}
|
|
24827
24996
|
});
|
|
24828
|
-
const _style_0$
|
|
24997
|
+
const _style_0$c = `
|
|
24829
24998
|
/* NOT fonts.css: a @font-face declared inside a shadow root isn't reliably
|
|
24830
24999
|
* applied by browsers (document.fonts never registers it) — dead weight in
|
|
24831
25000
|
* the webcomponent bundle specifically, which always runs shadow-DOM'd. The
|
|
@@ -25152,7 +25321,7 @@ section.turn:has([data-state="open"]) {
|
|
|
25152
25321
|
height: 100%;
|
|
25153
25322
|
}
|
|
25154
25323
|
`;
|
|
25155
|
-
const TranscriptUI = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
25324
|
+
const TranscriptUI = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["styles", [_style_0$c]]]);
|
|
25156
25325
|
function mapApiTurns(apiTurns) {
|
|
25157
25326
|
return apiTurns.map((t2) => {
|
|
25158
25327
|
const words = wordsFromApi$2(t2.turn_id, t2.words);
|
|
@@ -25317,7 +25486,7 @@ function createLivePlugin(options = {}) {
|
|
|
25317
25486
|
}
|
|
25318
25487
|
function isTranslationTrackFor(active, language) {
|
|
25319
25488
|
if (active.isSource) return false;
|
|
25320
|
-
return active.languages.some((
|
|
25489
|
+
return active.languages.some((l4) => isSameLanguage(l4, language));
|
|
25321
25490
|
}
|
|
25322
25491
|
function onPartial(event, channelId) {
|
|
25323
25492
|
if (core.activeChannelId.value !== channelId) return;
|
|
@@ -25519,14 +25688,14 @@ function createLivePlugin(options = {}) {
|
|
|
25519
25688
|
}
|
|
25520
25689
|
};
|
|
25521
25690
|
}
|
|
25522
|
-
const _hoisted_1$
|
|
25523
|
-
const _hoisted_2$
|
|
25691
|
+
const _hoisted_1$b = { class: "player-controls" };
|
|
25692
|
+
const _hoisted_2$9 = { class: "controls-left" };
|
|
25524
25693
|
const _hoisted_3$7 = { class: "controls-time" };
|
|
25525
|
-
const _hoisted_4$
|
|
25526
|
-
const _hoisted_5$
|
|
25694
|
+
const _hoisted_4$5 = { class: "time-display" };
|
|
25695
|
+
const _hoisted_5$5 = { class: "time-display" };
|
|
25527
25696
|
const _hoisted_6$4 = { class: "controls-right" };
|
|
25528
25697
|
const _hoisted_7$1 = ["value", "aria-label", "disabled"];
|
|
25529
|
-
const _sfc_main$
|
|
25698
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
25530
25699
|
__name: "AudioPlayerControls",
|
|
25531
25700
|
props: {
|
|
25532
25701
|
isPlaying: { type: Boolean },
|
|
@@ -25547,8 +25716,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
25547
25716
|
emit2("update:volume", parseFloat(target.value));
|
|
25548
25717
|
}
|
|
25549
25718
|
return (_ctx, _cache) => {
|
|
25550
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
25551
|
-
createBaseVNode("div", _hoisted_2$
|
|
25719
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
25720
|
+
createBaseVNode("div", _hoisted_2$9, [
|
|
25552
25721
|
createVNode(unref(Button), {
|
|
25553
25722
|
variant: "transparent",
|
|
25554
25723
|
size: "md",
|
|
@@ -25596,9 +25765,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
25596
25765
|
}, 8, ["aria-label", "disabled"])
|
|
25597
25766
|
]),
|
|
25598
25767
|
createBaseVNode("div", _hoisted_3$7, [
|
|
25599
|
-
createBaseVNode("time", _hoisted_4$
|
|
25768
|
+
createBaseVNode("time", _hoisted_4$5, toDisplayString(__props.currentTime), 1),
|
|
25600
25769
|
_cache[7] || (_cache[7] = createBaseVNode("span", { class: "time-separator" }, "/", -1)),
|
|
25601
|
-
createBaseVNode("time", _hoisted_5$
|
|
25770
|
+
createBaseVNode("time", _hoisted_5$5, toDisplayString(__props.duration), 1)
|
|
25602
25771
|
]),
|
|
25603
25772
|
createBaseVNode("div", _hoisted_6$4, [
|
|
25604
25773
|
createBaseVNode("div", {
|
|
@@ -25656,31 +25825,31 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
25656
25825
|
};
|
|
25657
25826
|
}
|
|
25658
25827
|
});
|
|
25659
|
-
const _style_0$
|
|
25660
|
-
const AudioPlayerControls = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
25828
|
+
const _style_0$b = "\n.player-controls[data-v-fb293305] {\n display: flex;\n align-items: center;\n gap: var(--spacing-md);\n padding: var(--spacing-xs) var(--spacing-lg);\n height: 44px;\n}\n.controls-left[data-v-fb293305] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n}\n.controls-time[data-v-fb293305] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xxs);\n font-family: var(--font-family-mono);\n font-size: var(--font-size-sm);\n color: var(--color-text-muted);\n user-select: none;\n}\n.time-separator[data-v-fb293305] {\n color: var(--color-text-muted);\n opacity: 0.5;\n}\n.controls-right[data-v-fb293305] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n margin-left: auto;\n}\n.volume-group[data-v-fb293305] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n}\n.volume-slider[data-v-fb293305] {\n width: 80px;\n height: 4px;\n accent-color: var(--color-primary);\n cursor: pointer;\n}\n.volume-slider[data-v-fb293305]:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.play-button[data-v-fb293305] {\n width: 40px;\n height: 40px;\n}\n.speed-button[data-v-fb293305] {\n font-size: var(--font-size-sm);\n font-family: var(--font-family-mono);\n}\n@media (max-width: 767px) {\n.skip-button[data-v-fb293305] {\n display: none;\n}\n.volume-slider[data-v-fb293305] {\n display: none;\n}\n.player-controls[data-v-fb293305] {\n padding: var(--spacing-xs) var(--spacing-md);\n gap: var(--spacing-sm);\n}\n}\n";
|
|
25829
|
+
const AudioPlayerControls = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["styles", [_style_0$b]], ["__scopeId", "data-v-fb293305"]]);
|
|
25661
25830
|
function t$1(t2, e3, i2, n2) {
|
|
25662
25831
|
return new (i2 || (i2 = Promise))((function(s2, r2) {
|
|
25663
25832
|
function o2(t3) {
|
|
25664
25833
|
try {
|
|
25665
|
-
|
|
25834
|
+
l4(n2.next(t3));
|
|
25666
25835
|
} catch (t4) {
|
|
25667
25836
|
r2(t4);
|
|
25668
25837
|
}
|
|
25669
25838
|
}
|
|
25670
25839
|
function a2(t3) {
|
|
25671
25840
|
try {
|
|
25672
|
-
|
|
25841
|
+
l4(n2.throw(t3));
|
|
25673
25842
|
} catch (t4) {
|
|
25674
25843
|
r2(t4);
|
|
25675
25844
|
}
|
|
25676
25845
|
}
|
|
25677
|
-
function
|
|
25846
|
+
function l4(t3) {
|
|
25678
25847
|
var e4;
|
|
25679
25848
|
t3.done ? s2(t3.value) : (e4 = t3.value, e4 instanceof i2 ? e4 : new i2((function(t4) {
|
|
25680
25849
|
t4(e4);
|
|
25681
25850
|
}))).then(o2, a2);
|
|
25682
25851
|
}
|
|
25683
|
-
|
|
25852
|
+
l4((n2 = n2.apply(t2, e3 || [])).next());
|
|
25684
25853
|
}));
|
|
25685
25854
|
}
|
|
25686
25855
|
"function" == typeof SuppressedError && SuppressedError;
|
|
@@ -25956,7 +26125,7 @@ let d$1 = class d extends e$1 {
|
|
|
25956
26125
|
return this.media.setSinkId(t2);
|
|
25957
26126
|
}
|
|
25958
26127
|
};
|
|
25959
|
-
function
|
|
26128
|
+
function u({ maxTop: t2, maxBottom: e3, halfHeight: i2, vScale: n2, barMinHeight: s2 = 0, barAlign: r2 }) {
|
|
25960
26129
|
let o2 = Math.round(t2 * i2 * n2);
|
|
25961
26130
|
let a2 = o2 + Math.round(e3 * i2 * n2) || 1;
|
|
25962
26131
|
return a2 < s2 && (a2 = s2, r2 || (o2 = a2 / 2)), { topHeight: o2, totalHeight: a2 };
|
|
@@ -26048,17 +26217,17 @@ class C extends e$1 {
|
|
|
26048
26217
|
if (e4.button !== n2) return;
|
|
26049
26218
|
if (o2.has(e4.pointerId)) return;
|
|
26050
26219
|
if (o2.set(e4.pointerId, e4), o2.size > 1) return;
|
|
26051
|
-
const
|
|
26052
|
-
let c3 = e4.clientX, d3 = e4.clientY,
|
|
26220
|
+
const l4 = e4.pointerId;
|
|
26221
|
+
let c3 = e4.clientX, d3 = e4.clientY, u2 = false;
|
|
26053
26222
|
const p2 = Date.now(), m2 = t3.getBoundingClientRect(), { left: g2, top: f2 } = m2, v2 = (t4) => {
|
|
26054
|
-
if (t4.pointerId !==
|
|
26223
|
+
if (t4.pointerId !== l4) return;
|
|
26055
26224
|
if (t4.defaultPrevented || o2.size > 1) return;
|
|
26056
26225
|
if (a2 && Date.now() - p2 < s2) return;
|
|
26057
26226
|
const e5 = t4.clientX, n3 = t4.clientY, h3 = e5 - c3, m3 = n3 - d3;
|
|
26058
|
-
(
|
|
26227
|
+
(u2 || Math.abs(h3) > i2 || Math.abs(m3) > i2) && (t4.preventDefault(), t4.stopPropagation(), u2 || (r2.set({ type: "start", x: c3 - g2, y: d3 - f2 }), u2 = true), r2.set({ type: "move", x: e5 - g2, y: n3 - f2, deltaX: h3, deltaY: m3 }), c3 = e5, d3 = n3);
|
|
26059
26228
|
}, b2 = (t4) => {
|
|
26060
26229
|
if (o2.delete(t4.pointerId)) {
|
|
26061
|
-
if (t4.pointerId ===
|
|
26230
|
+
if (t4.pointerId === l4 && u2) {
|
|
26062
26231
|
const e5 = t4.clientX, i3 = t4.clientY;
|
|
26063
26232
|
r2.set({ type: "end", x: e5 - g2, y: i3 - f2 });
|
|
26064
26233
|
}
|
|
@@ -26067,9 +26236,9 @@ class C extends e$1 {
|
|
|
26067
26236
|
}, y3 = (t4) => {
|
|
26068
26237
|
t4.relatedTarget && t4.relatedTarget !== document.documentElement || b2(t4);
|
|
26069
26238
|
}, C2 = (t4) => {
|
|
26070
|
-
|
|
26239
|
+
u2 && (t4.stopPropagation(), t4.preventDefault());
|
|
26071
26240
|
}, S3 = (t4) => {
|
|
26072
|
-
t4.defaultPrevented || o2.size > 1 ||
|
|
26241
|
+
t4.defaultPrevented || o2.size > 1 || u2 && t4.preventDefault();
|
|
26073
26242
|
};
|
|
26074
26243
|
document.addEventListener("pointermove", v2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", y3), document.addEventListener("pointercancel", y3), document.addEventListener("touchmove", S3, { passive: false }), document.addEventListener("click", C2, { capture: true }), h2 = () => {
|
|
26075
26244
|
document.removeEventListener("pointermove", v2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", y3), document.removeEventListener("pointercancel", y3), document.removeEventListener("touchmove", S3), setTimeout((() => {
|
|
@@ -26242,16 +26411,16 @@ class C extends e$1 {
|
|
|
26242
26411
|
var t2;
|
|
26243
26412
|
}
|
|
26244
26413
|
renderBarWaveform(t2, e3, i2, n2) {
|
|
26245
|
-
const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius:
|
|
26246
|
-
const r3 = e4 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0,
|
|
26247
|
-
return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 /
|
|
26248
|
-
})({ width: s2, height: r2, length: (t2[0] || []).length, options: e3, pixelRatio: this.getPixelRatio() }), m2 = (function({ channelData: t3, barIndexScale: e4, barSpacing: i3, barWidth: n3, halfHeight: s3, vScale: r3, canvasHeight: o3, barAlign: a3, barMinHeight:
|
|
26414
|
+
const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l4, barIndexScale: h2, barSpacing: c2, barMinHeight: d3 } = (function({ width: t3, height: e4, length: i3, options: n3, pixelRatio: s3 }) {
|
|
26415
|
+
const r3 = e4 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0, l5 = o3 + a3 || 1;
|
|
26416
|
+
return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 / l5 / i3 : 0, barSpacing: l5 };
|
|
26417
|
+
})({ width: s2, height: r2, length: (t2[0] || []).length, options: e3, pixelRatio: this.getPixelRatio() }), m2 = (function({ channelData: t3, barIndexScale: e4, barSpacing: i3, barWidth: n3, halfHeight: s3, vScale: r3, canvasHeight: o3, barAlign: a3, barMinHeight: l5 }) {
|
|
26249
26418
|
const h3 = t3[0] || [], c3 = t3[1] || h3, d4 = h3.length, m3 = [];
|
|
26250
26419
|
let g2 = 0, f2 = 0, v2 = 0;
|
|
26251
26420
|
for (let t4 = 0; t4 <= d4; t4++) {
|
|
26252
26421
|
const d5 = Math.round(t4 * e4);
|
|
26253
26422
|
if (d5 > g2) {
|
|
26254
|
-
const { topHeight: t5, totalHeight: e5 } =
|
|
26423
|
+
const { topHeight: t5, totalHeight: e5 } = u({ maxTop: f2, maxBottom: v2, halfHeight: s3, vScale: r3, barMinHeight: l5, barAlign: a3 }), h4 = p({ barAlign: a3, halfHeight: s3, topHeight: t5, totalHeight: e5, canvasHeight: o3 });
|
|
26255
26424
|
m3.push({ x: g2 * i3, y: h4, width: n3, height: e5 }), g2 = d5, f2 = 0, v2 = 0;
|
|
26256
26425
|
}
|
|
26257
26426
|
const b2 = Math.abs(h3[t4] || 0), y3 = Math.abs(c3[t4] || 0);
|
|
@@ -26260,19 +26429,19 @@ class C extends e$1 {
|
|
|
26260
26429
|
return m3;
|
|
26261
26430
|
})({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e3.barAlign, barMinHeight: d3 });
|
|
26262
26431
|
i2.beginPath();
|
|
26263
|
-
for (const t3 of m2)
|
|
26432
|
+
for (const t3 of m2) l4 && "roundRect" in i2 ? i2.roundRect(t3.x, t3.y, t3.width, t3.height, l4) : i2.rect(t3.x, t3.y, t3.width, t3.height);
|
|
26264
26433
|
i2.fill(), i2.closePath();
|
|
26265
26434
|
}
|
|
26266
26435
|
renderLineWaveform(t2, e3, i2, n2) {
|
|
26267
26436
|
const { width: s2, height: r2 } = i2.canvas, o2 = (function({ channelData: t3, width: e4, height: i3, vScale: n3 }) {
|
|
26268
26437
|
const s3 = i3 / 2, r3 = t3[0] || [];
|
|
26269
26438
|
return [r3, t3[1] || r3].map(((t4, i4) => {
|
|
26270
|
-
const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3,
|
|
26439
|
+
const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3, l4 = 0 === i4 ? -1 : 1, h2 = [{ x: 0, y: a2 }];
|
|
26271
26440
|
let c2 = 0, d3 = 0;
|
|
26272
26441
|
for (let e5 = 0; e5 <= r4; e5++) {
|
|
26273
26442
|
const i5 = Math.round(e5 * o3);
|
|
26274
26443
|
if (i5 > c2) {
|
|
26275
|
-
const t5 = a2 + (Math.round(d3 * s3 * n3) || 1) *
|
|
26444
|
+
const t5 = a2 + (Math.round(d3 * s3 * n3) || 1) * l4;
|
|
26276
26445
|
h2.push({ x: c2, y: t5 }), c2 = i5, d3 = 0;
|
|
26277
26446
|
}
|
|
26278
26447
|
const r5 = Math.abs(t4[e5] || 0);
|
|
@@ -26309,43 +26478,43 @@ class C extends e$1 {
|
|
|
26309
26478
|
g(e3) ? this.renderBarWaveform(t2, e3, i2, n2) : this.renderLineWaveform(t2, e3, i2, n2);
|
|
26310
26479
|
}
|
|
26311
26480
|
renderSingleCanvas(t2, e3, i2, n2, s2, r2, o2) {
|
|
26312
|
-
const a2 = this.getPixelRatio(),
|
|
26313
|
-
|
|
26314
|
-
const h2 =
|
|
26315
|
-
if (e3.renderFunction ? (h2.fillStyle = this.convertColorValues(e3.waveColor, h2), e3.renderFunction(t2, h2)) : this.renderWaveform(t2, e3, h2),
|
|
26316
|
-
const t3 =
|
|
26317
|
-
i3.drawImage(
|
|
26481
|
+
const a2 = this.getPixelRatio(), l4 = document.createElement("canvas");
|
|
26482
|
+
l4.width = Math.round(i2 * a2), l4.height = Math.round(n2 * a2), l4.style.width = `${i2}px`, l4.style.height = `${n2}px`, l4.style.left = `${Math.round(s2)}px`, r2.appendChild(l4);
|
|
26483
|
+
const h2 = l4.getContext("2d");
|
|
26484
|
+
if (e3.renderFunction ? (h2.fillStyle = this.convertColorValues(e3.waveColor, h2), e3.renderFunction(t2, h2)) : this.renderWaveform(t2, e3, h2), l4.width > 0 && l4.height > 0) {
|
|
26485
|
+
const t3 = l4.cloneNode(), i3 = t3.getContext("2d");
|
|
26486
|
+
i3.drawImage(l4, 0, 0), i3.globalCompositeOperation = "source-in", i3.fillStyle = this.convertColorValues(e3.progressColor, i3), i3.fillRect(0, 0, l4.width, l4.height), o2.appendChild(t3);
|
|
26318
26487
|
}
|
|
26319
26488
|
}
|
|
26320
26489
|
renderMultiCanvas(t2, e3, i2, n2, s2, r2) {
|
|
26321
|
-
const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer,
|
|
26490
|
+
const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer, l4 = i2 / o2, h2 = (function({ clientWidth: t3, totalWidth: e4, options: i3 }) {
|
|
26322
26491
|
return f(Math.min(8e3, t3, e4), i3);
|
|
26323
|
-
})({ clientWidth: a2, totalWidth:
|
|
26492
|
+
})({ clientWidth: a2, totalWidth: l4, options: e3 });
|
|
26324
26493
|
let c2 = {};
|
|
26325
26494
|
if (0 === h2) return;
|
|
26326
26495
|
const d3 = (i3) => {
|
|
26327
|
-
if (i3 < 0 || i3 >=
|
|
26496
|
+
if (i3 < 0 || i3 >= u2) return;
|
|
26328
26497
|
if (c2[i3]) return;
|
|
26329
26498
|
c2[i3] = true;
|
|
26330
26499
|
const o3 = i3 * h2;
|
|
26331
|
-
let a3 = Math.min(
|
|
26500
|
+
let a3 = Math.min(l4 - o3, h2);
|
|
26332
26501
|
if (a3 = f(a3, e3), a3 <= 0) return;
|
|
26333
26502
|
const d4 = (function({ channelData: t3, offset: e4, clampedWidth: i4, totalWidth: n3 }) {
|
|
26334
26503
|
return t3.map(((t4) => {
|
|
26335
26504
|
const s3 = Math.floor(e4 / n3 * t4.length), r3 = Math.floor((e4 + i4) / n3 * t4.length);
|
|
26336
26505
|
return t4.slice(s3, r3);
|
|
26337
26506
|
}));
|
|
26338
|
-
})({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth:
|
|
26507
|
+
})({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth: l4 });
|
|
26339
26508
|
this.renderSingleCanvas(d4, e3, a3, n2, o3, s2, r2);
|
|
26340
|
-
},
|
|
26509
|
+
}, u2 = Math.ceil(l4 / h2);
|
|
26341
26510
|
if (!this.isScrollable) {
|
|
26342
|
-
for (let t3 = 0; t3 <
|
|
26511
|
+
for (let t3 = 0; t3 < u2; t3++) d3(t3);
|
|
26343
26512
|
return;
|
|
26344
26513
|
}
|
|
26345
|
-
if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth:
|
|
26514
|
+
if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l4, numCanvases: u2 }).forEach(((t3) => d3(t3))), u2 > 1) {
|
|
26346
26515
|
const t3 = this.on("scroll", (() => {
|
|
26347
26516
|
const { scrollLeft: t4 } = this.scrollContainer;
|
|
26348
|
-
Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth:
|
|
26517
|
+
Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l4, numCanvases: u2 }).forEach(((t5) => d3(t5)));
|
|
26349
26518
|
}));
|
|
26350
26519
|
this.unsubscribeOnScroll.push(t3);
|
|
26351
26520
|
}
|
|
@@ -26362,8 +26531,8 @@ class C extends e$1 {
|
|
|
26362
26531
|
})(e3, ["overlay"]);
|
|
26363
26532
|
const o2 = document.createElement("div"), a2 = this.getHeight(r2.height, r2.splitChannels);
|
|
26364
26533
|
o2.style.height = `${a2}px`, s2 && n2 > 0 && (o2.style.marginTop = `-${a2}px`), this.canvasWrapper.style.minHeight = `${a2}px`, this.canvasWrapper.appendChild(o2);
|
|
26365
|
-
const
|
|
26366
|
-
this.progressWrapper.appendChild(
|
|
26534
|
+
const l4 = o2.cloneNode();
|
|
26535
|
+
this.progressWrapper.appendChild(l4), this.renderMultiCanvas(t2, r2, i2, a2, o2, l4);
|
|
26367
26536
|
}
|
|
26368
26537
|
render(e3) {
|
|
26369
26538
|
return t$1(this, void 0, void 0, (function* () {
|
|
@@ -26401,12 +26570,12 @@ class C extends e$1 {
|
|
|
26401
26570
|
}
|
|
26402
26571
|
scrollIntoView(t2, e3 = false) {
|
|
26403
26572
|
var i2;
|
|
26404
|
-
const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2,
|
|
26573
|
+
const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2, l4 = n2 + r2, h2 = r2 / 2;
|
|
26405
26574
|
if (this.isDragging) {
|
|
26406
26575
|
const t3 = 30;
|
|
26407
|
-
o2 + t3 >
|
|
26576
|
+
o2 + t3 > l4 ? this.scrollContainer.scrollLeft += t3 : o2 - t3 < a2 && (this.scrollContainer.scrollLeft -= t3);
|
|
26408
26577
|
} else {
|
|
26409
|
-
(o2 < a2 || o2 >
|
|
26578
|
+
(o2 < a2 || o2 > l4) && (this.scrollContainer.scrollLeft = o2 - (this.options.autoCenter ? h2 : 0));
|
|
26410
26579
|
const t3 = o2 - n2 - h2;
|
|
26411
26580
|
if (e3 && this.options.autoCenter && t3 > 0) {
|
|
26412
26581
|
const e4 = null === (i2 = this.audioData) || void 0 === i2 ? void 0 : i2.duration;
|
|
@@ -26623,8 +26792,8 @@ class w extends d$1 {
|
|
|
26623
26792
|
super({ media: e3, mediaControls: t2.mediaControls, autoplay: t2.autoplay, playbackRate: t2.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this._isDestroyed = false, this._loadVersion = 0, this.options = Object.assign({}, P2, t2);
|
|
26624
26793
|
const { state: i2, actions: n2 } = (function(t3) {
|
|
26625
26794
|
var e4, i3, n3, s3, r3, o2;
|
|
26626
|
-
const a2 = null !== (e4 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e4 ? e4 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0), d3 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false),
|
|
26627
|
-
return { state: { currentTime: a2, duration: c2, isPlaying: d3, isPaused: C2, isSeeking:
|
|
26795
|
+
const a2 = null !== (e4 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e4 ? e4 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0), d3 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false), u2 = null !== (s3 = null == t3 ? void 0 : t3.isSeeking) && void 0 !== s3 ? s3 : l$1(false), p2 = null !== (r3 = null == t3 ? void 0 : t3.volume) && void 0 !== r3 ? r3 : l$1(1), m2 = null !== (o2 = null == t3 ? void 0 : t3.playbackRate) && void 0 !== o2 ? o2 : l$1(1), g2 = l$1(null), f2 = l$1(null), v2 = l$1(""), b2 = l$1(0), y3 = l$1(0), C2 = h$1((() => !d3.value), [d3]), S3 = h$1((() => null !== g2.value), [g2]), E2 = h$1((() => S3.value && c2.value > 0), [S3, c2]), P3 = h$1((() => a2.value), [a2]), w2 = h$1((() => c2.value > 0 ? a2.value / c2.value : 0), [a2, c2]);
|
|
26796
|
+
return { state: { currentTime: a2, duration: c2, isPlaying: d3, isPaused: C2, isSeeking: u2, volume: p2, playbackRate: m2, audioBuffer: g2, peaks: f2, url: v2, zoom: b2, scrollPosition: y3, canPlay: S3, isReady: E2, progress: P3, progressPercent: w2 }, actions: { setCurrentTime: (t4) => {
|
|
26628
26797
|
const e5 = Math.max(0, Math.min(c2.value || 1 / 0, t4));
|
|
26629
26798
|
a2.set(e5);
|
|
26630
26799
|
}, setDuration: (t4) => {
|
|
@@ -26632,7 +26801,7 @@ class w extends d$1 {
|
|
|
26632
26801
|
}, setPlaying: (t4) => {
|
|
26633
26802
|
d3.set(t4);
|
|
26634
26803
|
}, setSeeking: (t4) => {
|
|
26635
|
-
|
|
26804
|
+
u2.set(t4);
|
|
26636
26805
|
}, setVolume: (t4) => {
|
|
26637
26806
|
const e5 = Math.max(0, Math.min(1, t4));
|
|
26638
26807
|
p2.set(e5);
|
|
@@ -26787,16 +26956,16 @@ class w extends d$1 {
|
|
|
26787
26956
|
}
|
|
26788
26957
|
if (this._isDestroyed || o2 !== this._loadVersion) return;
|
|
26789
26958
|
this.setSrc(e3, n2);
|
|
26790
|
-
const
|
|
26959
|
+
const l4 = yield new Promise(((t3) => {
|
|
26791
26960
|
const e4 = r2 || this.getDuration();
|
|
26792
26961
|
e4 ? t3(e4) : this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata", (() => t3(this.getDuration())), { once: true }));
|
|
26793
26962
|
}));
|
|
26794
26963
|
if (!this._isDestroyed && o2 === this._loadVersion) {
|
|
26795
26964
|
if (!e3 && !n2) {
|
|
26796
26965
|
const t3 = this.getMediaElement();
|
|
26797
|
-
t3 instanceof E && (t3.duration =
|
|
26966
|
+
t3 instanceof E && (t3.duration = l4);
|
|
26798
26967
|
}
|
|
26799
|
-
if (s2) this.decodedData = i$1.createBuffer(s2,
|
|
26968
|
+
if (s2) this.decodedData = i$1.createBuffer(s2, l4 || 0);
|
|
26800
26969
|
else if (n2) {
|
|
26801
26970
|
const t3 = yield n2.arrayBuffer();
|
|
26802
26971
|
if (this._isDestroyed || o2 !== this._loadVersion) return;
|
|
@@ -26989,7 +27158,7 @@ function o(t2, e3) {
|
|
|
26989
27158
|
t2.removeEventListener(e3, n2);
|
|
26990
27159
|
}, i2;
|
|
26991
27160
|
}
|
|
26992
|
-
function
|
|
27161
|
+
function l3(t2) {
|
|
26993
27162
|
const e3 = t2._cleanup;
|
|
26994
27163
|
"function" == typeof e3 && e3();
|
|
26995
27164
|
}
|
|
@@ -27002,16 +27171,16 @@ function h(t2, e3 = {}) {
|
|
|
27002
27171
|
if (h2.has(e4.pointerId)) return;
|
|
27003
27172
|
if (h2.set(e4.pointerId, e4), h2.size > 1) return;
|
|
27004
27173
|
const s2 = e4.pointerId;
|
|
27005
|
-
let
|
|
27174
|
+
let l4 = e4.clientX, c3 = e4.clientY, u2 = false;
|
|
27006
27175
|
const p2 = Date.now(), v2 = t2.getBoundingClientRect(), { left: g2, top: m2 } = v2, f2 = (t3) => {
|
|
27007
27176
|
if (t3.pointerId !== s2) return;
|
|
27008
27177
|
if (t3.defaultPrevented || h2.size > 1) return;
|
|
27009
27178
|
if (a2 && Date.now() - p2 < r2) return;
|
|
27010
|
-
const e5 = t3.clientX, n3 = t3.clientY, d4 = e5 -
|
|
27011
|
-
(
|
|
27179
|
+
const e5 = t3.clientX, n3 = t3.clientY, d4 = e5 - l4, v3 = n3 - c3;
|
|
27180
|
+
(u2 || Math.abs(d4) > i2 || Math.abs(v3) > i2) && (t3.preventDefault(), t3.stopPropagation(), u2 || (o2.set({ type: "start", x: l4 - g2, y: c3 - m2 }), u2 = true), o2.set({ type: "move", x: e5 - g2, y: n3 - m2, deltaX: d4, deltaY: v3 }), l4 = e5, c3 = n3);
|
|
27012
27181
|
}, b2 = (t3) => {
|
|
27013
27182
|
if (h2.delete(t3.pointerId)) {
|
|
27014
|
-
if (t3.pointerId === s2 &&
|
|
27183
|
+
if (t3.pointerId === s2 && u2) {
|
|
27015
27184
|
const e5 = t3.clientX, i3 = t3.clientY;
|
|
27016
27185
|
o2.set({ type: "end", x: e5 - g2, y: i3 - m2 });
|
|
27017
27186
|
}
|
|
@@ -27020,9 +27189,9 @@ function h(t2, e3 = {}) {
|
|
|
27020
27189
|
}, E2 = (t3) => {
|
|
27021
27190
|
t3.relatedTarget && t3.relatedTarget !== document.documentElement || b2(t3);
|
|
27022
27191
|
}, C2 = (t3) => {
|
|
27023
|
-
|
|
27192
|
+
u2 && (t3.stopPropagation(), t3.preventDefault());
|
|
27024
27193
|
}, L2 = (t3) => {
|
|
27025
|
-
t3.defaultPrevented || h2.size > 1 ||
|
|
27194
|
+
t3.defaultPrevented || h2.size > 1 || u2 && t3.preventDefault();
|
|
27026
27195
|
};
|
|
27027
27196
|
document.addEventListener("pointermove", f2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", E2), document.addEventListener("pointercancel", E2), document.addEventListener("touchmove", L2, { passive: false }), document.addEventListener("click", C2, { capture: true }), d3 = () => {
|
|
27028
27197
|
document.removeEventListener("pointermove", f2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", E2), document.removeEventListener("pointercancel", E2), document.removeEventListener("touchmove", L2), setTimeout((() => {
|
|
@@ -27032,13 +27201,13 @@ function h(t2, e3 = {}) {
|
|
|
27032
27201
|
};
|
|
27033
27202
|
t2.addEventListener("pointerdown", c2);
|
|
27034
27203
|
return { signal: o2, cleanup: () => {
|
|
27035
|
-
d3(), t2.removeEventListener("pointerdown", c2), h2.clear(),
|
|
27204
|
+
d3(), t2.removeEventListener("pointerdown", c2), h2.clear(), l3(o2);
|
|
27036
27205
|
} };
|
|
27037
27206
|
}
|
|
27038
27207
|
class a extends t {
|
|
27039
27208
|
constructor(t2, e3, i2 = 0) {
|
|
27040
|
-
var n2, s2, r2, o2,
|
|
27041
|
-
super(), this.totalDuration = e3, this.numberOfChannels = i2, this.element = null, this.minLength = 0, this.maxLength = 1 / 0, this.contentEditable = false, this.subscriptions = [], this.updatingSide = void 0, this.isRemoved = false, this.subscriptions = [], this.id = t2.id || `region-${Math.random().toString(32).slice(2)}`, this.start = this.clampPosition(t2.start), this.end = this.clampPosition(null !== (n2 = t2.end) && void 0 !== n2 ? n2 : t2.start), this.drag = null === (s2 = t2.drag) || void 0 === s2 || s2, this.resize = null === (r2 = t2.resize) || void 0 === r2 || r2, this.resizeStart = null === (o2 = t2.resizeStart) || void 0 === o2 || o2, this.resizeEnd = null === (
|
|
27209
|
+
var n2, s2, r2, o2, l4, h2, a2, d3, c2, u2;
|
|
27210
|
+
super(), this.totalDuration = e3, this.numberOfChannels = i2, this.element = null, this.minLength = 0, this.maxLength = 1 / 0, this.contentEditable = false, this.subscriptions = [], this.updatingSide = void 0, this.isRemoved = false, this.subscriptions = [], this.id = t2.id || `region-${Math.random().toString(32).slice(2)}`, this.start = this.clampPosition(t2.start), this.end = this.clampPosition(null !== (n2 = t2.end) && void 0 !== n2 ? n2 : t2.start), this.drag = null === (s2 = t2.drag) || void 0 === s2 || s2, this.resize = null === (r2 = t2.resize) || void 0 === r2 || r2, this.resizeStart = null === (o2 = t2.resizeStart) || void 0 === o2 || o2, this.resizeEnd = null === (l4 = t2.resizeEnd) || void 0 === l4 || l4, this.color = null !== (h2 = t2.color) && void 0 !== h2 ? h2 : "rgba(0, 0, 0, 0.1)", this.minLength = null !== (a2 = t2.minLength) && void 0 !== a2 ? a2 : this.minLength, this.maxLength = null !== (d3 = t2.maxLength) && void 0 !== d3 ? d3 : this.maxLength, this.channelIdx = null !== (c2 = t2.channelIdx) && void 0 !== c2 ? c2 : -1, this.contentEditable = null !== (u2 = t2.contentEditable) && void 0 !== u2 ? u2 : this.contentEditable, this.element = this.initElement(), this.setContent(t2.content), this.setPart(), this.renderPosition(), this.initMouseEvents();
|
|
27042
27211
|
}
|
|
27043
27212
|
clampPosition(t2) {
|
|
27044
27213
|
return Math.max(0, Math.min(this.totalDuration, t2));
|
|
@@ -27049,15 +27218,15 @@ class a extends t {
|
|
|
27049
27218
|
null === (t2 = this.element) || void 0 === t2 || t2.setAttribute("part", `${e3 ? "marker" : "region"} ${this.id}`);
|
|
27050
27219
|
}
|
|
27051
27220
|
addResizeHandles(t2) {
|
|
27052
|
-
const e3 = { position: "absolute", zIndex: "2", width: "6px", height: "100%", top: "0", cursor: "ew-resize", wordBreak: "keep-all" }, i2 = n("div", { part: "region-handle region-handle-left", style: Object.assign(Object.assign({}, e3), { left: "0", borderLeft: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "2px 0 0 2px" }) }, t2), s2 = n("div", { part: "region-handle region-handle-right", style: Object.assign(Object.assign({}, e3), { right: "0", borderRight: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "0 2px 2px 0" }) }, t2), o2 = h(i2, { threshold: 1 }),
|
|
27221
|
+
const e3 = { position: "absolute", zIndex: "2", width: "6px", height: "100%", top: "0", cursor: "ew-resize", wordBreak: "keep-all" }, i2 = n("div", { part: "region-handle region-handle-left", style: Object.assign(Object.assign({}, e3), { left: "0", borderLeft: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "2px 0 0 2px" }) }, t2), s2 = n("div", { part: "region-handle region-handle-right", style: Object.assign(Object.assign({}, e3), { right: "0", borderRight: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "0 2px 2px 0" }) }, t2), o2 = h(i2, { threshold: 1 }), l4 = h(s2, { threshold: 1 }), a2 = r((() => {
|
|
27053
27222
|
const t3 = o2.signal.value;
|
|
27054
27223
|
t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "start") : "end" === t3.type && this.onEndResizing("start"));
|
|
27055
27224
|
}), [o2.signal]), d3 = r((() => {
|
|
27056
|
-
const t3 =
|
|
27225
|
+
const t3 = l4.signal.value;
|
|
27057
27226
|
t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "end") : "end" === t3.type && this.onEndResizing("end"));
|
|
27058
|
-
}), [
|
|
27227
|
+
}), [l4.signal]);
|
|
27059
27228
|
this.subscriptions.push((() => {
|
|
27060
|
-
a2(), d3(), o2.cleanup(),
|
|
27229
|
+
a2(), d3(), o2.cleanup(), l4.cleanup();
|
|
27061
27230
|
}));
|
|
27062
27231
|
}
|
|
27063
27232
|
removeResizeHandles(t2) {
|
|
@@ -27084,9 +27253,9 @@ class a extends t {
|
|
|
27084
27253
|
initMouseEvents() {
|
|
27085
27254
|
const { element: t2 } = this;
|
|
27086
27255
|
if (!t2) return;
|
|
27087
|
-
const e3 = o(t2, "click"), i2 = o(t2, "mouseenter"), n2 = o(t2, "mouseleave"), s2 = o(t2, "dblclick"), a2 = o(t2, "pointerdown"), d3 = o(t2, "pointerup"), c2 = e3.subscribe(((t3) => t3 && this.emit("click", t3))),
|
|
27256
|
+
const e3 = o(t2, "click"), i2 = o(t2, "mouseenter"), n2 = o(t2, "mouseleave"), s2 = o(t2, "dblclick"), a2 = o(t2, "pointerdown"), d3 = o(t2, "pointerup"), c2 = e3.subscribe(((t3) => t3 && this.emit("click", t3))), u2 = i2.subscribe(((t3) => t3 && this.emit("over", t3))), p2 = n2.subscribe(((t3) => t3 && this.emit("leave", t3))), v2 = s2.subscribe(((t3) => t3 && this.emit("dblclick", t3))), g2 = a2.subscribe(((t3) => t3 && this.toggleCursor(true))), m2 = d3.subscribe(((t3) => t3 && this.toggleCursor(false)));
|
|
27088
27257
|
this.subscriptions.push((() => {
|
|
27089
|
-
c2(),
|
|
27258
|
+
c2(), u2(), p2(), v2(), g2(), m2(), l3(e3), l3(i2), l3(n2), l3(s2), l3(a2), l3(d3);
|
|
27090
27259
|
}));
|
|
27091
27260
|
const f2 = h(t2), b2 = r((() => {
|
|
27092
27261
|
const t3 = f2.signal.value;
|
|
@@ -27100,13 +27269,13 @@ class a extends t {
|
|
|
27100
27269
|
var n2;
|
|
27101
27270
|
if (!(null === (n2 = this.element) || void 0 === n2 ? void 0 : n2.parentElement)) return;
|
|
27102
27271
|
const { width: s2 } = this.element.parentElement.getBoundingClientRect(), r2 = t2 / s2 * this.totalDuration;
|
|
27103
|
-
let o2 = e3 && "start" !== e3 ? this.start : this.start + r2,
|
|
27272
|
+
let o2 = e3 && "start" !== e3 ? this.start : this.start + r2, l4 = e3 && "end" !== e3 ? this.end : this.end + r2;
|
|
27104
27273
|
const h2 = void 0 !== i2;
|
|
27105
|
-
h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 :
|
|
27106
|
-
const a2 =
|
|
27274
|
+
h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 : l4 = i2), o2 = Math.max(0, o2), l4 = Math.min(this.totalDuration, l4);
|
|
27275
|
+
const a2 = l4 - o2;
|
|
27107
27276
|
this.updatingSide = e3;
|
|
27108
27277
|
const d3 = a2 >= this.minLength && a2 <= this.maxLength;
|
|
27109
|
-
o2 <=
|
|
27278
|
+
o2 <= l4 && (d3 || h2) && (this.start = o2, this.end = l4, this.renderPosition(), this.emit("update", e3));
|
|
27110
27279
|
}
|
|
27111
27280
|
onMove(t2) {
|
|
27112
27281
|
this.drag && this._onUpdate(t2);
|
|
@@ -27218,13 +27387,13 @@ class d2 extends e2 {
|
|
|
27218
27387
|
if (!n2) return;
|
|
27219
27388
|
const { clientWidth: s2, scrollWidth: r2 } = n2;
|
|
27220
27389
|
if (r2 <= s2) return;
|
|
27221
|
-
const o2 = n2.getBoundingClientRect(),
|
|
27390
|
+
const o2 = n2.getBoundingClientRect(), l4 = t2.element.getBoundingClientRect(), h2 = l4.left - o2.left, a2 = l4.right - o2.left;
|
|
27222
27391
|
h2 < 0 ? n2.scrollLeft += h2 : a2 > s2 && (n2.scrollLeft += a2 - s2);
|
|
27223
27392
|
}
|
|
27224
27393
|
virtualAppend(t2, e3, i2) {
|
|
27225
27394
|
const n2 = () => {
|
|
27226
27395
|
if (!this.wavesurfer) return;
|
|
27227
|
-
const n3 = this.wavesurfer.getWidth(), s2 = this.wavesurfer.getScroll(), r2 = e3.clientWidth, o2 = this.wavesurfer.getDuration(),
|
|
27396
|
+
const n3 = this.wavesurfer.getWidth(), s2 = this.wavesurfer.getScroll(), r2 = e3.clientWidth, o2 = this.wavesurfer.getDuration(), l4 = Math.round(t2.start / o2 * r2), h2 = l4 + (Math.round((t2.end - t2.start) / o2 * r2) || 1) > s2 && l4 < s2 + n3;
|
|
27228
27397
|
h2 && !i2.parentElement ? e3.appendChild(i2) : !h2 && i2.parentElement && i2.remove();
|
|
27229
27398
|
};
|
|
27230
27399
|
setTimeout((() => {
|
|
@@ -27275,17 +27444,17 @@ class d2 extends e2 {
|
|
|
27275
27444
|
const n2 = null === (i2 = this.wavesurfer) || void 0 === i2 ? void 0 : i2.getWrapper();
|
|
27276
27445
|
if (!(n2 && n2 instanceof HTMLElement)) return () => {
|
|
27277
27446
|
};
|
|
27278
|
-
let s2 = null, o2 = 0,
|
|
27447
|
+
let s2 = null, o2 = 0, l4 = 0;
|
|
27279
27448
|
const d3 = h(n2, { threshold: e3 }), c2 = r((() => {
|
|
27280
27449
|
var e4, i3;
|
|
27281
27450
|
const n3 = d3.signal.value;
|
|
27282
27451
|
if (n3) if ("start" === n3.type) {
|
|
27283
27452
|
if (o2 = n3.x, !this.wavesurfer) return;
|
|
27284
27453
|
const r2 = this.wavesurfer.getDuration(), h2 = null === (i3 = null === (e4 = this.wavesurfer) || void 0 === e4 ? void 0 : e4.getDecodedData()) || void 0 === i3 ? void 0 : i3.numberOfChannels, { width: d4 } = this.wavesurfer.getWrapper().getBoundingClientRect();
|
|
27285
|
-
|
|
27286
|
-
const c3 = n3.x / d4 * r2,
|
|
27287
|
-
s2 = new a(Object.assign(Object.assign({}, t2), { start: c3, end:
|
|
27288
|
-
} else "move" === n3.type && void 0 !== n3.deltaX ? s2 && s2._onUpdate(n3.deltaX, n3.x > o2 ? "end" : "start",
|
|
27454
|
+
l4 = o2 / d4 * r2;
|
|
27455
|
+
const c3 = n3.x / d4 * r2, u2 = (n3.x + 5) / d4 * r2;
|
|
27456
|
+
s2 = new a(Object.assign(Object.assign({}, t2), { start: c3, end: u2 }), r2, h2), this.emit("region-initialized", s2), s2.element && this.regionsContainer.appendChild(s2.element);
|
|
27457
|
+
} else "move" === n3.type && void 0 !== n3.deltaX ? s2 && s2._onUpdate(n3.deltaX, n3.x > o2 ? "end" : "start", l4) : "end" === n3.type && s2 && (this.saveRegion(s2), s2.updatingSide = void 0, s2 = null);
|
|
27289
27458
|
}), [d3.signal]);
|
|
27290
27459
|
return () => {
|
|
27291
27460
|
c2(), d3.cleanup();
|
|
@@ -27425,7 +27594,7 @@ function useAudioPlayer(options) {
|
|
|
27425
27594
|
eventUnsubs.push(core.on("channel:reset", onChannelReset));
|
|
27426
27595
|
}
|
|
27427
27596
|
function detachEventListeners() {
|
|
27428
|
-
for (const
|
|
27597
|
+
for (const u2 of eventUnsubs) u2();
|
|
27429
27598
|
eventUnsubs.length = 0;
|
|
27430
27599
|
}
|
|
27431
27600
|
function onPlayerReady() {
|
|
@@ -27589,8 +27758,8 @@ function useAudioPlayer(options) {
|
|
|
27589
27758
|
toggleMute
|
|
27590
27759
|
};
|
|
27591
27760
|
}
|
|
27592
|
-
const _hoisted_1$
|
|
27593
|
-
const _sfc_main$
|
|
27761
|
+
const _hoisted_1$a = { class: "audio-player" };
|
|
27762
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
27594
27763
|
__name: "AudioPlayer",
|
|
27595
27764
|
props: {
|
|
27596
27765
|
audioSrc: { type: String }
|
|
@@ -27620,7 +27789,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
27620
27789
|
});
|
|
27621
27790
|
__expose({ seekTo, pause });
|
|
27622
27791
|
return (_ctx, _cache) => {
|
|
27623
|
-
return openBlock(), createElementBlock("footer", _hoisted_1$
|
|
27792
|
+
return openBlock(), createElementBlock("footer", _hoisted_1$a, [
|
|
27624
27793
|
createBaseVNode("div", {
|
|
27625
27794
|
ref_key: "waveformRef",
|
|
27626
27795
|
ref: waveformRef,
|
|
@@ -27645,8 +27814,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
27645
27814
|
};
|
|
27646
27815
|
}
|
|
27647
27816
|
});
|
|
27648
|
-
const _style_0$
|
|
27649
|
-
const AudioPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
27817
|
+
const _style_0$a = "\n.audio-player[data-v-580c393d] {\n border-top: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n}\n.transcript-ui-waveform-container[data-v-580c393d] {\n min-height: 32px;\n}\n.transcript-ui-waveform-container--loading[data-v-580c393d] {\n background: linear-gradient(\n 90deg,\n var(--color-border-light, var(--color-border)) 25%,\n var(--color-border) 50%,\n var(--color-border-light, var(--color-border)) 75%\n );\n background-size: 200% 100%;\n animation: shimmer-580c393d 1.5s ease-in-out infinite;\n border-radius: var(--radius-sm);\n}\n@keyframes shimmer-580c393d {\n0% {\n background-position: 200% 0;\n}\n100% {\n background-position: -200% 0;\n}\n}\n@media (prefers-reduced-motion: reduce) {\n.transcript-ui-waveform-container--loading[data-v-580c393d] {\n animation: none;\n}\n}\n";
|
|
27818
|
+
const AudioPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["styles", [_style_0$a]], ["__scopeId", "data-v-580c393d"]]);
|
|
27650
27819
|
const { findActiveWord, firstWordStart, lastWordEnd } = utils;
|
|
27651
27820
|
const WORD_TRACK_INTERVAL = 0.05;
|
|
27652
27821
|
function createAudioPlugin(options = {}) {
|
|
@@ -28364,14 +28533,14 @@ function parseWatermark(content, tokens) {
|
|
|
28364
28533
|
}
|
|
28365
28534
|
return parts;
|
|
28366
28535
|
}
|
|
28367
|
-
const _hoisted_1$
|
|
28536
|
+
const _hoisted_1$9 = {
|
|
28368
28537
|
key: 0,
|
|
28369
28538
|
class: "watermark",
|
|
28370
28539
|
"aria-hidden": "true"
|
|
28371
28540
|
};
|
|
28372
|
-
const _hoisted_2$
|
|
28541
|
+
const _hoisted_2$8 = ["src", "alt"];
|
|
28373
28542
|
const _hoisted_3$6 = { key: 1 };
|
|
28374
|
-
const _sfc_main$
|
|
28543
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
28375
28544
|
__name: "SubtitleWatermark",
|
|
28376
28545
|
props: {
|
|
28377
28546
|
visible: { type: Boolean }
|
|
@@ -28386,7 +28555,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28386
28555
|
return (_ctx, _cache) => {
|
|
28387
28556
|
return openBlock(), createBlock(Transition, { name: "watermark" }, {
|
|
28388
28557
|
default: withCtx(() => [
|
|
28389
|
-
__props.visible && unref(watermark) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
28558
|
+
__props.visible && unref(watermark) ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
28390
28559
|
(openBlock(true), createElementBlock(Fragment, null, renderList(parts.value, (part, i2) => {
|
|
28391
28560
|
return openBlock(), createElementBlock(Fragment, { key: i2 }, [
|
|
28392
28561
|
part.type === "token" ? (openBlock(), createElementBlock("img", {
|
|
@@ -28394,7 +28563,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28394
28563
|
src: part.src,
|
|
28395
28564
|
alt: part.alt,
|
|
28396
28565
|
class: "watermark__img"
|
|
28397
|
-
}, null, 8, _hoisted_2$
|
|
28566
|
+
}, null, 8, _hoisted_2$8)) : (openBlock(), createElementBlock("span", _hoisted_3$6, toDisplayString(part.value), 1))
|
|
28398
28567
|
], 64);
|
|
28399
28568
|
}), 128))
|
|
28400
28569
|
])) : createCommentVNode("", true)
|
|
@@ -28404,10 +28573,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28404
28573
|
};
|
|
28405
28574
|
}
|
|
28406
28575
|
});
|
|
28407
|
-
const _style_0$
|
|
28408
|
-
const SubtitleWatermark = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28409
|
-
const _hoisted_1$
|
|
28410
|
-
const _sfc_main$
|
|
28576
|
+
const _style_0$9 = "\n.watermark[data-v-eb604a8e] {\n position: absolute;\n right: var(--spacing-md, 16px);\n bottom: 4px;\n display: inline-flex;\n align-items: center;\n gap: 0.25em;\n font-size: 1.2rem;\n color: var(--color-white, #fff);\n pointer-events: none;\n line-height: 1;\n}\n.watermark__img[data-v-eb604a8e] {\n height: 1em;\n vertical-align: middle;\n}\n.watermark-enter-active[data-v-eb604a8e],\n.watermark-leave-active[data-v-eb604a8e] {\n transition:\n opacity 0.4s ease,\n transform 0.4s ease;\n}\n.watermark-enter-from[data-v-eb604a8e],\n.watermark-leave-to[data-v-eb604a8e] {\n opacity: 0;\n transform: translate(6px, 6px);\n}\n@media (prefers-reduced-motion: reduce) {\n.watermark-enter-active[data-v-eb604a8e],\n .watermark-leave-active[data-v-eb604a8e] {\n transition: opacity 0.01s;\n transform: none;\n}\n}\n";
|
|
28577
|
+
const SubtitleWatermark = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["styles", [_style_0$9]], ["__scopeId", "data-v-eb604a8e"]]);
|
|
28578
|
+
const _hoisted_1$8 = ["height"];
|
|
28579
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
28411
28580
|
__name: "SubtitleBanner",
|
|
28412
28581
|
setup(__props) {
|
|
28413
28582
|
const core = useCore();
|
|
@@ -28441,20 +28610,20 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
28441
28610
|
ref: "canvas",
|
|
28442
28611
|
class: normalizeClass(["subtitle-canvas", { "subtitle-canvas--shrunk": unref(watermarkVisible) }]),
|
|
28443
28612
|
height: canvasHeight.value
|
|
28444
|
-
}, null, 10, _hoisted_1$
|
|
28613
|
+
}, null, 10, _hoisted_1$8),
|
|
28445
28614
|
createVNode(SubtitleWatermark, { visible: unref(watermarkVisible) }, null, 8, ["visible"])
|
|
28446
28615
|
], 4);
|
|
28447
28616
|
};
|
|
28448
28617
|
}
|
|
28449
28618
|
});
|
|
28450
|
-
const _style_0$
|
|
28451
|
-
const SubtitleBanner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28452
|
-
const _hoisted_1$
|
|
28619
|
+
const _style_0$8 = "\n.subtitle-banner[data-v-6b9b2fb2] {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n flex-shrink: 0;\n background-color: var(--color-black);\n overflow: hidden;\n z-index: 1001;\n}\n.subtitle-canvas[data-v-6b9b2fb2] {\n display: block;\n width: 100%;\n height: 100%;\n transition: transform 0.4s ease;\n transform-origin: top center;\n}\n.subtitle-canvas--shrunk[data-v-6b9b2fb2] {\n transform: scale(0.8) translateY(-8%);\n}\n@media (prefers-reduced-motion: reduce) {\n.subtitle-canvas[data-v-6b9b2fb2] {\n transition: none;\n}\n}\n";
|
|
28620
|
+
const SubtitleBanner = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["styles", [_style_0$8]], ["__scopeId", "data-v-6b9b2fb2"]]);
|
|
28621
|
+
const _hoisted_1$7 = {
|
|
28453
28622
|
ref: "container",
|
|
28454
28623
|
class: "subtitle-fullscreen"
|
|
28455
28624
|
};
|
|
28456
|
-
const _hoisted_2$
|
|
28457
|
-
const _sfc_main$
|
|
28625
|
+
const _hoisted_2$7 = ["aria-label"];
|
|
28626
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
28458
28627
|
__name: "SubtitleFullscreen",
|
|
28459
28628
|
setup(__props) {
|
|
28460
28629
|
const core = useCore();
|
|
@@ -28512,14 +28681,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
28512
28681
|
}
|
|
28513
28682
|
});
|
|
28514
28683
|
return (_ctx, _cache) => {
|
|
28515
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
28684
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
28516
28685
|
createBaseVNode("button", {
|
|
28517
28686
|
class: "subtitle-fullscreen__close",
|
|
28518
28687
|
"aria-label": unref(t2)("subtitle.exitFullscreen"),
|
|
28519
28688
|
onClick: close
|
|
28520
28689
|
}, [
|
|
28521
28690
|
createVNode(unref(X$1), { size: 24 })
|
|
28522
|
-
], 8, _hoisted_2$
|
|
28691
|
+
], 8, _hoisted_2$7),
|
|
28523
28692
|
createBaseVNode("canvas", {
|
|
28524
28693
|
ref: "canvas",
|
|
28525
28694
|
class: normalizeClass(["subtitle-fullscreen__canvas", { "subtitle-fullscreen__canvas--shrunk": unref(watermarkVisible) }])
|
|
@@ -28529,8 +28698,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
28529
28698
|
};
|
|
28530
28699
|
}
|
|
28531
28700
|
});
|
|
28532
|
-
const _style_0$
|
|
28533
|
-
const SubtitleFullscreen = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28701
|
+
const _style_0$7 = "\n.subtitle-fullscreen[data-v-4dac7247] {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background-color: var(--color-black);\n}\n.transcript-ui-root .subtitle-fullscreen__close[data-v-4dac7247] {\n /* Full reset (same convention as Button, EditableText, Tabs…): the\n previous partial reset (border/background only) left margin, padding,\n and appearance to whatever the host page's UA/global styles set. */\n all: unset;\n box-sizing: border-box;\n position: absolute;\n top: var(--spacing-md, 16px);\n right: var(--spacing-md, 16px);\n z-index: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n background: rgba(255, 255, 255, 0.1);\n color: var(--color-white);\n border-radius: var(--radius-md, 8px);\n cursor: pointer;\n transition: background-color var(--transition-duration) ease;\n}\n.transcript-ui-root .subtitle-fullscreen__close[data-v-4dac7247]:hover,\n.transcript-ui-root .subtitle-fullscreen__close[data-v-4dac7247]:focus-visible {\n background: rgba(255, 255, 255, 0.25);\n outline: 2px solid rgba(255, 255, 255, 0.5);\n outline-offset: 2px;\n}\n.subtitle-fullscreen__canvas[data-v-4dac7247] {\n display: block;\n width: 100%;\n height: 100%;\n transition: transform 0.4s ease;\n transform-origin: center;\n}\n.subtitle-fullscreen__canvas--shrunk[data-v-4dac7247] {\n transform: scale(0.85) translateY(-4%);\n}\n@media (prefers-reduced-motion: reduce) {\n.subtitle-fullscreen__close[data-v-4dac7247],\n .subtitle-fullscreen__canvas[data-v-4dac7247] {\n transition: none;\n}\n}\n";
|
|
28702
|
+
const SubtitleFullscreen = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["styles", [_style_0$7]], ["__scopeId", "data-v-4dac7247"]]);
|
|
28534
28703
|
function createSubtitlePlugin(options = {}) {
|
|
28535
28704
|
return {
|
|
28536
28705
|
name: "subtitle",
|
|
@@ -29332,6 +29501,38 @@ function createTranscriptionEditorPlugin(options = {}) {
|
|
|
29332
29501
|
}
|
|
29333
29502
|
};
|
|
29334
29503
|
}
|
|
29504
|
+
const _hoisted_1$6 = ["title"];
|
|
29505
|
+
const _hoisted_2$6 = { class: "llm-service-status__label" };
|
|
29506
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
29507
|
+
__name: "LLMServiceStatus",
|
|
29508
|
+
props: {
|
|
29509
|
+
isUpdated: { type: Boolean }
|
|
29510
|
+
},
|
|
29511
|
+
setup(__props) {
|
|
29512
|
+
const props = __props;
|
|
29513
|
+
const { t: t2 } = useI18n();
|
|
29514
|
+
const label = computed(
|
|
29515
|
+
() => props.isUpdated ? t2("llmService.statusUpdated") : t2("llmService.statusOutdated")
|
|
29516
|
+
);
|
|
29517
|
+
return (_ctx, _cache) => {
|
|
29518
|
+
return openBlock(), createElementBlock("span", {
|
|
29519
|
+
class: normalizeClass([
|
|
29520
|
+
"llm-service-status",
|
|
29521
|
+
__props.isUpdated ? "llm-service-status--ok" : "llm-service-status--warn"
|
|
29522
|
+
]),
|
|
29523
|
+
title: label.value
|
|
29524
|
+
}, [
|
|
29525
|
+
createVNode(unref(EditorIcon), {
|
|
29526
|
+
name: __props.isUpdated ? "check" : "warning",
|
|
29527
|
+
size: 14
|
|
29528
|
+
}, null, 8, ["name"]),
|
|
29529
|
+
createBaseVNode("span", _hoisted_2$6, toDisplayString(label.value), 1)
|
|
29530
|
+
], 10, _hoisted_1$6);
|
|
29531
|
+
};
|
|
29532
|
+
}
|
|
29533
|
+
});
|
|
29534
|
+
const _style_0$6 = "\n.llm-service-status[data-v-f6c4d61b] {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-xs);\n min-width: 0;\n font-size: var(--font-size-xs);\n font-weight: 500;\n}\n.llm-service-status--ok[data-v-f6c4d61b] {\n color: var(--color-success, #2e7d32);\n}\n.llm-service-status--warn[data-v-f6c4d61b] {\n color: var(--color-warning, #ed6c02);\n}\n.llm-service-status[data-v-f6c4d61b] .editor-icon {\n flex-shrink: 0;\n}\n.llm-service-status__label[data-v-f6c4d61b] {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
|
|
29535
|
+
const LLMServiceStatus = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["styles", [_style_0$6]], ["__scopeId", "data-v-f6c4d61b"]]);
|
|
29335
29536
|
const _hoisted_1$5 = { class: "llm-service-panel" };
|
|
29336
29537
|
const _hoisted_2$5 = {
|
|
29337
29538
|
key: 0,
|
|
@@ -29339,7 +29540,9 @@ const _hoisted_2$5 = {
|
|
|
29339
29540
|
role: "status"
|
|
29340
29541
|
};
|
|
29341
29542
|
const _hoisted_3$5 = { class: "llm-service-panel__empty-text" };
|
|
29342
|
-
const
|
|
29543
|
+
const _hoisted_4$4 = { class: "llm-service-panel__reading-status" };
|
|
29544
|
+
const _hoisted_5$4 = { class: "llm-service-panel__reading-actions" };
|
|
29545
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
29343
29546
|
__name: "LLMServicePanel",
|
|
29344
29547
|
props: {
|
|
29345
29548
|
service: { type: Object },
|
|
@@ -29351,6 +29554,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
29351
29554
|
const emit2 = __emit;
|
|
29352
29555
|
const core = useCore();
|
|
29353
29556
|
const { t: t2 } = useI18n();
|
|
29557
|
+
const { isMobile } = useIsMobile();
|
|
29558
|
+
const isReadOnly = computed(() => isMobile.value);
|
|
29354
29559
|
function toggleSplit() {
|
|
29355
29560
|
emit2("update:split", !props.split);
|
|
29356
29561
|
}
|
|
@@ -29417,62 +29622,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
29417
29622
|
status: articleStatus.value,
|
|
29418
29623
|
progress: progress.value,
|
|
29419
29624
|
onRetry: onRegenerate
|
|
29420
|
-
}, {
|
|
29421
|
-
"toolbar-left": withCtx(() => [
|
|
29422
|
-
createVNode(unref(Button), {
|
|
29423
|
-
variant: "primary",
|
|
29424
|
-
icon: "save",
|
|
29425
|
-
disabled: !dirty.value || busy.value,
|
|
29426
|
-
"aria-label": unref(t2)("llmService.save"),
|
|
29427
|
-
title: unref(t2)("llmService.save"),
|
|
29428
|
-
onClick: onSave
|
|
29429
|
-
}, null, 8, ["disabled", "aria-label", "title"]),
|
|
29430
|
-
createVNode(unref(Button), {
|
|
29431
|
-
variant: "secondary",
|
|
29432
|
-
icon: "refresh-cw",
|
|
29433
|
-
loading: articleStatus.value === "processing",
|
|
29434
|
-
disabled: isUpdated.value || busy.value || articleStatus.value === "processing",
|
|
29435
|
-
"aria-label": unref(t2)("llmService.regenerate"),
|
|
29436
|
-
title: unref(t2)("llmService.regenerate"),
|
|
29437
|
-
onClick: onRegenerate
|
|
29438
|
-
}, null, 8, ["loading", "disabled", "aria-label", "title"])
|
|
29439
|
-
]),
|
|
29440
|
-
"toolbar-center": withCtx(() => [
|
|
29441
|
-
createBaseVNode("span", {
|
|
29442
|
-
class: normalizeClass(["llm-service-panel__status", [
|
|
29443
|
-
isUpdated.value ? "llm-service-panel__status--ok" : "llm-service-panel__status--warn"
|
|
29444
|
-
]])
|
|
29445
|
-
}, [
|
|
29446
|
-
createVNode(unref(EditorIcon), {
|
|
29447
|
-
name: isUpdated.value ? "check" : "warning",
|
|
29448
|
-
size: 14
|
|
29449
|
-
}, null, 8, ["name"]),
|
|
29450
|
-
createBaseVNode("span", null, toDisplayString(isUpdated.value ? unref(t2)("llmService.statusUpdated") : unref(t2)("llmService.statusOutdated")), 1)
|
|
29451
|
-
], 2)
|
|
29452
|
-
]),
|
|
29453
|
-
"toolbar-right": withCtx(() => [
|
|
29454
|
-
createVNode(unref(Button), {
|
|
29455
|
-
variant: "primary",
|
|
29456
|
-
icon: "download",
|
|
29457
|
-
disabled: articleStatus.value === "processing" || !hasContent.value,
|
|
29458
|
-
"aria-label": unref(t2)("llmService.download"),
|
|
29459
|
-
title: unref(t2)("llmService.download"),
|
|
29460
|
-
onClick: onExport
|
|
29461
|
-
}, {
|
|
29462
|
-
default: withCtx(() => [
|
|
29463
|
-
createTextVNode(toDisplayString(unref(t2)("llmService.download")), 1)
|
|
29464
|
-
]),
|
|
29465
|
-
_: 1
|
|
29466
|
-
}, 8, ["disabled", "aria-label", "title"]),
|
|
29467
|
-
createVNode(unref(Button), {
|
|
29468
|
-
variant: __props.split ? "primary" : "secondary",
|
|
29469
|
-
icon: "panel-right",
|
|
29470
|
-
"aria-pressed": !!__props.split,
|
|
29471
|
-
"aria-label": unref(t2)("llmService.split"),
|
|
29472
|
-
title: unref(t2)("llmService.split"),
|
|
29473
|
-
onClick: toggleSplit
|
|
29474
|
-
}, null, 8, ["variant", "aria-pressed", "aria-label", "title"])
|
|
29475
|
-
]),
|
|
29625
|
+
}, createSlots({
|
|
29476
29626
|
default: withCtx(() => [
|
|
29477
29627
|
isEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
29478
29628
|
createBaseVNode("p", _hoisted_3$5, toDisplayString(unref(t2)("llmService.empty")), 1),
|
|
@@ -29487,21 +29637,108 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
29487
29637
|
]),
|
|
29488
29638
|
_: 1
|
|
29489
29639
|
}, 8, ["disabled"])
|
|
29490
|
-
])) : (openBlock(), createBlock(unref(MarkdownEditor), {
|
|
29640
|
+
])) : !isReadOnly.value ? (openBlock(), createBlock(unref(MarkdownEditor), {
|
|
29491
29641
|
key: 1,
|
|
29492
29642
|
modelValue: draft.value,
|
|
29493
29643
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => draft.value = $event),
|
|
29494
29644
|
disabled: busy.value
|
|
29495
|
-
}, null, 8, ["modelValue", "disabled"]))
|
|
29645
|
+
}, null, 8, ["modelValue", "disabled"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
29646
|
+
createBaseVNode("div", _hoisted_4$4, [
|
|
29647
|
+
createVNode(LLMServiceStatus, { "is-updated": isUpdated.value }, null, 8, ["is-updated"]),
|
|
29648
|
+
createBaseVNode("div", _hoisted_5$4, [
|
|
29649
|
+
!isUpdated.value ? (openBlock(), createBlock(unref(Button), {
|
|
29650
|
+
key: 0,
|
|
29651
|
+
variant: "secondary",
|
|
29652
|
+
icon: "refresh-cw",
|
|
29653
|
+
disabled: busy.value,
|
|
29654
|
+
onClick: onRegenerate
|
|
29655
|
+
}, {
|
|
29656
|
+
default: withCtx(() => [
|
|
29657
|
+
createTextVNode(toDisplayString(unref(t2)("llmService.regenerate")), 1)
|
|
29658
|
+
]),
|
|
29659
|
+
_: 1
|
|
29660
|
+
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
29661
|
+
createVNode(unref(Button), {
|
|
29662
|
+
variant: "primary",
|
|
29663
|
+
icon: "download",
|
|
29664
|
+
"aria-label": unref(t2)("llmService.download"),
|
|
29665
|
+
title: unref(t2)("llmService.download"),
|
|
29666
|
+
onClick: onExport
|
|
29667
|
+
}, null, 8, ["aria-label", "title"])
|
|
29668
|
+
])
|
|
29669
|
+
]),
|
|
29670
|
+
createVNode(unref(MarkdownView), {
|
|
29671
|
+
class: "llm-service-panel__reading",
|
|
29672
|
+
source: draft.value
|
|
29673
|
+
}, null, 8, ["source"])
|
|
29674
|
+
], 64))
|
|
29496
29675
|
]),
|
|
29497
|
-
_:
|
|
29498
|
-
},
|
|
29676
|
+
_: 2
|
|
29677
|
+
}, [
|
|
29678
|
+
!isReadOnly.value ? {
|
|
29679
|
+
name: "toolbar-left",
|
|
29680
|
+
fn: withCtx(() => [
|
|
29681
|
+
createVNode(unref(Button), {
|
|
29682
|
+
variant: "primary",
|
|
29683
|
+
icon: "save",
|
|
29684
|
+
disabled: !dirty.value || busy.value,
|
|
29685
|
+
"aria-label": unref(t2)("llmService.save"),
|
|
29686
|
+
title: unref(t2)("llmService.save"),
|
|
29687
|
+
onClick: onSave
|
|
29688
|
+
}, null, 8, ["disabled", "aria-label", "title"]),
|
|
29689
|
+
createVNode(unref(Button), {
|
|
29690
|
+
variant: "secondary",
|
|
29691
|
+
icon: "refresh-cw",
|
|
29692
|
+
loading: articleStatus.value === "processing",
|
|
29693
|
+
disabled: isUpdated.value || busy.value || articleStatus.value === "processing",
|
|
29694
|
+
"aria-label": unref(t2)("llmService.regenerate"),
|
|
29695
|
+
title: unref(t2)("llmService.regenerate"),
|
|
29696
|
+
onClick: onRegenerate
|
|
29697
|
+
}, null, 8, ["loading", "disabled", "aria-label", "title"])
|
|
29698
|
+
]),
|
|
29699
|
+
key: "0"
|
|
29700
|
+
} : void 0,
|
|
29701
|
+
!isReadOnly.value ? {
|
|
29702
|
+
name: "toolbar-center",
|
|
29703
|
+
fn: withCtx(() => [
|
|
29704
|
+
createVNode(LLMServiceStatus, { "is-updated": isUpdated.value }, null, 8, ["is-updated"])
|
|
29705
|
+
]),
|
|
29706
|
+
key: "1"
|
|
29707
|
+
} : void 0,
|
|
29708
|
+
!isReadOnly.value ? {
|
|
29709
|
+
name: "toolbar-right",
|
|
29710
|
+
fn: withCtx(() => [
|
|
29711
|
+
createVNode(unref(Button), {
|
|
29712
|
+
variant: "primary",
|
|
29713
|
+
icon: "download",
|
|
29714
|
+
disabled: articleStatus.value === "processing" || !hasContent.value,
|
|
29715
|
+
"aria-label": unref(t2)("llmService.download"),
|
|
29716
|
+
title: unref(t2)("llmService.download"),
|
|
29717
|
+
onClick: onExport
|
|
29718
|
+
}, {
|
|
29719
|
+
default: withCtx(() => [
|
|
29720
|
+
createTextVNode(toDisplayString(unref(t2)("llmService.download")), 1)
|
|
29721
|
+
]),
|
|
29722
|
+
_: 1
|
|
29723
|
+
}, 8, ["disabled", "aria-label", "title"]),
|
|
29724
|
+
createVNode(unref(Button), {
|
|
29725
|
+
variant: __props.split ? "primary" : "secondary",
|
|
29726
|
+
icon: "panel-right",
|
|
29727
|
+
"aria-pressed": !!__props.split,
|
|
29728
|
+
"aria-label": unref(t2)("llmService.split"),
|
|
29729
|
+
title: unref(t2)("llmService.split"),
|
|
29730
|
+
onClick: toggleSplit
|
|
29731
|
+
}, null, 8, ["variant", "aria-pressed", "aria-label", "title"])
|
|
29732
|
+
]),
|
|
29733
|
+
key: "2"
|
|
29734
|
+
} : void 0
|
|
29735
|
+
]), 1032, ["status", "progress"])
|
|
29499
29736
|
]);
|
|
29500
29737
|
};
|
|
29501
29738
|
}
|
|
29502
29739
|
});
|
|
29503
|
-
const _style_0$5 = "\n.llm-service-panel[data-v-
|
|
29504
|
-
const LLMServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
29740
|
+
const _style_0$5 = "\n.llm-service-panel[data-v-2d38dcc6] {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.llm-service-panel__reading-status[data-v-2d38dcc6] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-sm);\n padding: var(--spacing-sm) var(--spacing-md);\n border-bottom: 1px solid var(--color-border);\n}\n.llm-service-panel__reading-actions[data-v-2d38dcc6] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n margin-left: auto;\n}\n.llm-service-panel__reading[data-v-2d38dcc6] {\n padding: var(--spacing-xl) var(--spacing-lg);\n}\n.llm-service-panel__empty[data-v-2d38dcc6] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-md);\n padding: var(--spacing-xl) var(--spacing-md);\n text-align: center;\n}\n.llm-service-panel__empty-text[data-v-2d38dcc6] {\n margin: 0;\n max-width: 400px;\n font-size: var(--font-size-sm);\n color: var(--color-text-secondary);\n}\n";
|
|
29741
|
+
const LLMServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["styles", [_style_0$5]], ["__scopeId", "data-v-2d38dcc6"]]);
|
|
29505
29742
|
function createService(init) {
|
|
29506
29743
|
return {
|
|
29507
29744
|
id: init.id,
|
|
@@ -29702,7 +29939,7 @@ const _hoisted_5$3 = {
|
|
|
29702
29939
|
class: "chat-session-confirm"
|
|
29703
29940
|
};
|
|
29704
29941
|
const _hoisted_6$3 = { class: "chat-session-confirm__text" };
|
|
29705
|
-
const _sfc_main$
|
|
29942
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
29706
29943
|
__name: "ChatSessionList",
|
|
29707
29944
|
props: {
|
|
29708
29945
|
sessions: { type: Array },
|
|
@@ -29834,7 +30071,48 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
29834
30071
|
}
|
|
29835
30072
|
});
|
|
29836
30073
|
const _style_0$4 = "\n.chat-session-list[data-v-c13478f0] {\n width: var(--chat-session-list-width, 200px);\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--color-border);\n background-color: var(--color-surface-hover);\n transition: width 0.2s ease;\n}\n@media (prefers-reduced-motion: reduce) {\n.chat-session-list[data-v-c13478f0] {\n transition: none;\n}\n}\n.chat-session-list__header[data-v-c13478f0] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--spacing-sm) var(--spacing-md);\n}\n.chat-session-list__title[data-v-c13478f0] {\n margin: 0;\n font-size: var(--font-size-xs);\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--color-text-muted);\n}\n.chat-session-list__items[data-v-c13478f0] {\n flex: 1;\n margin: 0;\n padding: 0;\n list-style: none;\n overflow-y: auto;\n}\n\n/* Delete confirmation row */\n.chat-session-confirm[data-v-c13478f0] {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: var(--spacing-xs) var(--spacing-sm);\n}\n.chat-session-confirm__text[data-v-c13478f0] {\n flex: 1;\n min-width: 0;\n font-size: var(--font-size-xs);\n color: var(--color-danger);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n";
|
|
29837
|
-
const ChatSessionList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
30074
|
+
const ChatSessionList = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["styles", [_style_0$4]], ["__scopeId", "data-v-c13478f0"]]);
|
|
30075
|
+
function computeSessionOptions(sessions, activeSessionId, newSessionLabel) {
|
|
30076
|
+
const options = sessions.map((session) => ({
|
|
30077
|
+
value: session.id,
|
|
30078
|
+
label: session.title || newSessionLabel
|
|
30079
|
+
}));
|
|
30080
|
+
const isActiveListed = sessions.some((s2) => s2.id === activeSessionId);
|
|
30081
|
+
if (isActiveListed) return options;
|
|
30082
|
+
return [{ value: activeSessionId ?? "", label: newSessionLabel }, ...options];
|
|
30083
|
+
}
|
|
30084
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
30085
|
+
__name: "ChatSessionSelect",
|
|
30086
|
+
props: {
|
|
30087
|
+
sessions: { type: Array },
|
|
30088
|
+
activeSessionId: { type: [String, null] }
|
|
30089
|
+
},
|
|
30090
|
+
emits: ["select"],
|
|
30091
|
+
setup(__props, { emit: __emit }) {
|
|
30092
|
+
const props = __props;
|
|
30093
|
+
const emit2 = __emit;
|
|
30094
|
+
const { t: t2 } = useI18n();
|
|
30095
|
+
const options = computed(
|
|
30096
|
+
() => computeSessionOptions(props.sessions, props.activeSessionId, t2("chat.newChat"))
|
|
30097
|
+
);
|
|
30098
|
+
const field = computed(() => ({
|
|
30099
|
+
customParams: { "aria-label": t2("chat.history") }
|
|
30100
|
+
}));
|
|
30101
|
+
function onChange(sessionId) {
|
|
30102
|
+
if (sessionId && sessionId !== props.activeSessionId) emit2("select", sessionId);
|
|
30103
|
+
}
|
|
30104
|
+
return (_ctx, _cache) => {
|
|
30105
|
+
return openBlock(), createBlock(unref(FormInput), {
|
|
30106
|
+
select: "",
|
|
30107
|
+
"full-width": "",
|
|
30108
|
+
field: field.value,
|
|
30109
|
+
options: options.value,
|
|
30110
|
+
"model-value": __props.activeSessionId ?? "",
|
|
30111
|
+
"onUpdate:modelValue": onChange
|
|
30112
|
+
}, null, 8, ["field", "options", "model-value"]);
|
|
30113
|
+
};
|
|
30114
|
+
}
|
|
30115
|
+
});
|
|
29838
30116
|
const _hoisted_1$3 = {
|
|
29839
30117
|
key: 0,
|
|
29840
30118
|
class: "chat-message chat-message--user"
|
|
@@ -30017,6 +30295,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
30017
30295
|
class: "chat-composer__textarea",
|
|
30018
30296
|
placeholder: unref(t2)("chat.placeholder"),
|
|
30019
30297
|
disabled: __props.disabled,
|
|
30298
|
+
enterkeyhint: "send",
|
|
30020
30299
|
rows: "2",
|
|
30021
30300
|
ref: "chat-composer__textarea",
|
|
30022
30301
|
onKeydown
|
|
@@ -30035,8 +30314,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
30035
30314
|
};
|
|
30036
30315
|
}
|
|
30037
30316
|
});
|
|
30038
|
-
const _style_0$1 = "\n.chat-composer[data-v-
|
|
30039
|
-
const ChatComposer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["styles", [_style_0$1]], ["__scopeId", "data-v-
|
|
30317
|
+
const _style_0$1 = "\n.chat-composer[data-v-037fb976] {\n display: flex;\n align-items: flex-end;\n gap: var(--spacing-sm);\n padding: var(--spacing-md);\n border-top: 1px solid var(--color-border);\n flex-shrink: 0;\n /* Match the message column width when the panel is expanded. */\n width: 100%;\n max-width: var(--chat-content-max-width, 760px);\n margin-inline: auto;\n}\n.chat-composer__textarea[data-v-037fb976] {\n flex: 1;\n resize: none;\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n padding: var(--spacing-sm) var(--spacing-md);\n font-family: inherit;\n font-size: var(--font-size-sm);\n line-height: var(--line-height);\n color: var(--color-text-primary);\n background-color: var(--color-surface);\n outline: none;\n}\n.chat-composer__textarea[data-v-037fb976]:focus {\n border-color: var(--color-primary);\n}\n.chat-composer__textarea[data-v-037fb976]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n";
|
|
30318
|
+
const ChatComposer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["styles", [_style_0$1]], ["__scopeId", "data-v-037fb976"]]);
|
|
30040
30319
|
const _hoisted_1 = ["aria-labelledby"];
|
|
30041
30320
|
const _hoisted_2 = { class: "chat-drawer__header" };
|
|
30042
30321
|
const _hoisted_3 = ["id"];
|
|
@@ -30048,6 +30327,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30048
30327
|
setup(__props) {
|
|
30049
30328
|
const core = useCore();
|
|
30050
30329
|
const { t: t2 } = useI18n();
|
|
30330
|
+
const { isMobile } = useIsMobile();
|
|
30051
30331
|
const chat = core.chat;
|
|
30052
30332
|
const titleId = useId$1();
|
|
30053
30333
|
const expanded = /* @__PURE__ */ ref(false);
|
|
@@ -30097,7 +30377,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30097
30377
|
onClick: withModifiers(close, ["self"])
|
|
30098
30378
|
}, [
|
|
30099
30379
|
createBaseVNode("aside", {
|
|
30100
|
-
class: normalizeClass(["chat-drawer", { "chat-drawer--expanded": expanded.value }]),
|
|
30380
|
+
class: normalizeClass(["chat-drawer", { "chat-drawer--expanded": expanded.value && !unref(isMobile) }]),
|
|
30101
30381
|
role: "dialog",
|
|
30102
30382
|
"aria-modal": "true",
|
|
30103
30383
|
"aria-labelledby": unref(titleId)
|
|
@@ -30105,23 +30385,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30105
30385
|
createBaseVNode("header", _hoisted_2, [
|
|
30106
30386
|
createBaseVNode("h2", {
|
|
30107
30387
|
id: unref(titleId),
|
|
30108
|
-
class: "chat-drawer__title"
|
|
30388
|
+
class: normalizeClass(["chat-drawer__title", { "transcript-ui-sr-only": unref(isMobile) }])
|
|
30109
30389
|
}, [
|
|
30110
30390
|
createVNode(unref(EditorIcon), {
|
|
30111
30391
|
name: "sparkles",
|
|
30112
30392
|
size: 18
|
|
30113
30393
|
}),
|
|
30114
30394
|
createTextVNode(" " + toDisplayString(unref(t2)("chat.title")), 1)
|
|
30115
|
-
],
|
|
30395
|
+
], 10, _hoisted_3),
|
|
30396
|
+
unref(isMobile) ? (openBlock(), createBlock(_sfc_main$4, {
|
|
30397
|
+
key: 0,
|
|
30398
|
+
class: "chat-drawer__session-select",
|
|
30399
|
+
sessions: unref(chat).sessions.value,
|
|
30400
|
+
"active-session-id": unref(chat).activeSessionId.value,
|
|
30401
|
+
onSelect
|
|
30402
|
+
}, null, 8, ["sessions", "active-session-id"])) : createCommentVNode("", true),
|
|
30116
30403
|
createBaseVNode("div", _hoisted_4, [
|
|
30117
|
-
|
|
30118
|
-
|
|
30404
|
+
unref(isMobile) ? (openBlock(), createBlock(unref(Button), {
|
|
30405
|
+
key: 0,
|
|
30406
|
+
icon: "plus",
|
|
30407
|
+
variant: "tertiary",
|
|
30408
|
+
size: "sm",
|
|
30409
|
+
"aria-label": unref(t2)("chat.newChat"),
|
|
30410
|
+
onClick: onCreate
|
|
30411
|
+
}, null, 8, ["aria-label"])) : (openBlock(), createBlock(unref(Button), {
|
|
30412
|
+
key: 1,
|
|
30119
30413
|
icon: expanded.value ? "minimize" : "maximize",
|
|
30120
30414
|
variant: "tertiary",
|
|
30121
30415
|
size: "sm",
|
|
30122
30416
|
"aria-label": expanded.value ? unref(t2)("chat.collapse") : unref(t2)("chat.expand"),
|
|
30123
30417
|
onClick: toggleExpanded
|
|
30124
|
-
}, null, 8, ["icon", "aria-label"]),
|
|
30418
|
+
}, null, 8, ["icon", "aria-label"])),
|
|
30125
30419
|
createVNode(unref(Button), {
|
|
30126
30420
|
icon: "x",
|
|
30127
30421
|
variant: "tertiary",
|
|
@@ -30132,14 +30426,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30132
30426
|
])
|
|
30133
30427
|
]),
|
|
30134
30428
|
createBaseVNode("div", _hoisted_5, [
|
|
30135
|
-
|
|
30429
|
+
!unref(isMobile) ? (openBlock(), createBlock(ChatSessionList, {
|
|
30430
|
+
key: 0,
|
|
30136
30431
|
sessions: unref(chat).sessions.value,
|
|
30137
30432
|
"active-session-id": unref(chat).activeSessionId.value,
|
|
30138
30433
|
onSelect,
|
|
30139
30434
|
onCreate,
|
|
30140
30435
|
onRename,
|
|
30141
30436
|
onDelete
|
|
30142
|
-
}, null, 8, ["sessions", "active-session-id"]),
|
|
30437
|
+
}, null, 8, ["sessions", "active-session-id"])) : createCommentVNode("", true),
|
|
30143
30438
|
createBaseVNode("div", _hoisted_6, [
|
|
30144
30439
|
createVNode(ChatMessageList, {
|
|
30145
30440
|
messages: unref(chat).allMessages.value,
|
|
@@ -30160,8 +30455,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30160
30455
|
};
|
|
30161
30456
|
}
|
|
30162
30457
|
});
|
|
30163
|
-
const _style_0 = "\n.chat-overlay[data-v-
|
|
30164
|
-
const ChatDrawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]], ["__scopeId", "data-v-
|
|
30458
|
+
const _style_0 = "\n.chat-overlay[data-v-25f4e0cf] {\n position: fixed;\n inset: 0;\n z-index: var(--z-drawer);\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: flex-end;\n}\n.chat-drawer[data-v-25f4e0cf] {\n /* Centered reading column for messages + composer; cascades to the child\n components through the DOM regardless of scoped styles. */\n --chat-content-max-width: 760px;\n --chat-session-list-width: 200px;\n width: min(620px, 100vw);\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: var(--color-surface);\n box-shadow: var(--shadow-md);\n transition: width 0.2s ease;\n}\n\n/* Near-full-width: keeps a backdrop strip on the left so click-outside still\n closes the panel. */\n.chat-drawer--expanded[data-v-25f4e0cf] {\n width: min(1400px, 96vw);\n --chat-session-list-width: 300px;\n}\n.chat-drawer__header[data-v-25f4e0cf] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-sm);\n padding: var(--spacing-sm) var(--spacing-md);\n min-height: var(--header-height);\n border-bottom: 1px solid var(--color-border);\n flex-shrink: 0;\n}\n.chat-drawer__title[data-v-25f4e0cf] {\n margin: 0;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-sm);\n font-size: var(--font-size-base);\n font-weight: 600;\n color: var(--color-text-primary);\n}\n.chat-drawer__title[data-v-25f4e0cf] .editor-icon {\n color: var(--color-primary);\n}\n.chat-drawer__session-select[data-v-25f4e0cf] {\n flex: 1;\n min-width: 0;\n}\n.chat-drawer__actions[data-v-25f4e0cf] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n}\n.chat-drawer__body[data-v-25f4e0cf] {\n flex: 1;\n min-height: 0;\n display: flex;\n}\n.chat-drawer__main[data-v-25f4e0cf] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* ── Slide + fade transition ── */\n.chat-drawer-enter-active[data-v-25f4e0cf],\n.chat-drawer-leave-active[data-v-25f4e0cf] {\n transition: opacity 0.2s ease;\n}\n.chat-drawer-enter-active .chat-drawer[data-v-25f4e0cf],\n.chat-drawer-leave-active .chat-drawer[data-v-25f4e0cf] {\n transition: transform 0.25s ease;\n}\n.chat-drawer-enter-from[data-v-25f4e0cf],\n.chat-drawer-leave-to[data-v-25f4e0cf] {\n opacity: 0;\n}\n.chat-drawer-enter-from .chat-drawer[data-v-25f4e0cf],\n.chat-drawer-leave-to .chat-drawer[data-v-25f4e0cf] {\n transform: translateX(100%);\n}\n@media (prefers-reduced-motion: reduce) {\n.chat-drawer[data-v-25f4e0cf],\n .chat-drawer-enter-active[data-v-25f4e0cf],\n .chat-drawer-leave-active[data-v-25f4e0cf],\n .chat-drawer-enter-active .chat-drawer[data-v-25f4e0cf],\n .chat-drawer-leave-active .chat-drawer[data-v-25f4e0cf] {\n transition: none;\n}\n}\n";
|
|
30459
|
+
const ChatDrawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]], ["__scopeId", "data-v-25f4e0cf"]]);
|
|
30165
30460
|
const STREAMING_MESSAGE_ID = "__streaming__";
|
|
30166
30461
|
function createChatPlugin() {
|
|
30167
30462
|
return {
|
|
@@ -30290,4 +30585,4 @@ export {
|
|
|
30290
30585
|
purify as p,
|
|
30291
30586
|
register as r
|
|
30292
30587
|
};
|
|
30293
|
-
//# sourceMappingURL=index-
|
|
30588
|
+
//# sourceMappingURL=index-j-ZNERBE.js.map
|