@sy-design/svelte 1.0.10 → 1.0.11
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/index.es.js +1160 -1115
- package/dist/index.umd.js +21 -21
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -12,11 +12,11 @@ var an = (s, e, t) => e in s ? yi(s, e, { enumerable: !0, configurable: !0, writ
|
|
12
12
|
for (var t of Kn(e))
|
13
13
|
Si.call(e, t) && an(s, t, e[t]);
|
14
14
|
return s;
|
15
|
-
},
|
15
|
+
}, ye = (s, e) => Ti(s, vi(e));
|
16
16
|
var se = (s, e, t) => an(s, typeof e != "symbol" ? e + "" : e, t), Ai = (s, e, t) => e.has(s) || $n("Cannot " + t);
|
17
17
|
var es = (s, e, t) => e.has(s) ? $n("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t);
|
18
18
|
var Bt = (s, e, t) => (Ai(s, e, "access private method"), t);
|
19
|
-
var
|
19
|
+
var Re = (s, e, t) => new Promise((n, i) => {
|
20
20
|
var o = (c) => {
|
21
21
|
try {
|
22
22
|
a(t.next(c));
|
@@ -32,7 +32,7 @@ var xe = (s, e, t) => new Promise((n, i) => {
|
|
32
32
|
}, a = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(o, l);
|
33
33
|
a((t = t.apply(s, e)).next());
|
34
34
|
});
|
35
|
-
function
|
35
|
+
function De() {
|
36
36
|
}
|
37
37
|
function js(s) {
|
38
38
|
return s();
|
@@ -40,7 +40,7 @@ function js(s) {
|
|
40
40
|
function ts() {
|
41
41
|
return /* @__PURE__ */ Object.create(null);
|
42
42
|
}
|
43
|
-
function
|
43
|
+
function Ae(s) {
|
44
44
|
s.forEach(js);
|
45
45
|
}
|
46
46
|
function An(s) {
|
@@ -52,41 +52,41 @@ function Jt(s, e) {
|
|
52
52
|
function xi(s) {
|
53
53
|
return Object.keys(s).length === 0;
|
54
54
|
}
|
55
|
-
function
|
55
|
+
function Ii(s, ...e) {
|
56
56
|
if (s == null) {
|
57
57
|
for (const n of e)
|
58
58
|
n(void 0);
|
59
|
-
return
|
59
|
+
return De;
|
60
60
|
}
|
61
61
|
const t = s.subscribe(...e);
|
62
62
|
return t.unsubscribe ? () => t.unsubscribe() : t;
|
63
63
|
}
|
64
64
|
const Ws = typeof window != "undefined";
|
65
|
-
let ns = Ws ? () => window.performance.now() : () => Date.now(), qs = Ws ? (s) => requestAnimationFrame(s) :
|
66
|
-
const
|
65
|
+
let ns = Ws ? () => window.performance.now() : () => Date.now(), qs = Ws ? (s) => requestAnimationFrame(s) : De;
|
66
|
+
const gt = /* @__PURE__ */ new Set();
|
67
67
|
function Gs(s) {
|
68
|
-
|
69
|
-
e.c(s) || (
|
70
|
-
}),
|
68
|
+
gt.forEach((e) => {
|
69
|
+
e.c(s) || (gt.delete(e), e.f());
|
70
|
+
}), gt.size !== 0 && qs(Gs);
|
71
71
|
}
|
72
|
-
function
|
72
|
+
function Ri(s) {
|
73
73
|
let e;
|
74
|
-
return
|
74
|
+
return gt.size === 0 && qs(Gs), {
|
75
75
|
promise: new Promise((t) => {
|
76
|
-
|
76
|
+
gt.add(e = { c: s, f: t });
|
77
77
|
}),
|
78
78
|
abort() {
|
79
|
-
|
79
|
+
gt.delete(e);
|
80
80
|
}
|
81
81
|
};
|
82
82
|
}
|
83
83
|
function m(s, e) {
|
84
84
|
s.appendChild(e);
|
85
85
|
}
|
86
|
-
function
|
86
|
+
function G(s, e, t) {
|
87
87
|
s.insertBefore(e, t || null);
|
88
88
|
}
|
89
|
-
function
|
89
|
+
function W(s) {
|
90
90
|
s.parentNode && s.parentNode.removeChild(s);
|
91
91
|
}
|
92
92
|
function Ci(s, e) {
|
@@ -96,19 +96,19 @@ function Ci(s, e) {
|
|
96
96
|
function x(s) {
|
97
97
|
return document.createElement(s);
|
98
98
|
}
|
99
|
-
function
|
99
|
+
function V(s) {
|
100
100
|
return document.createElementNS("http://www.w3.org/2000/svg", s);
|
101
101
|
}
|
102
|
-
function
|
102
|
+
function Se(s) {
|
103
103
|
return document.createTextNode(s);
|
104
104
|
}
|
105
|
-
function
|
106
|
-
return
|
105
|
+
function q() {
|
106
|
+
return Se(" ");
|
107
107
|
}
|
108
108
|
function Kt() {
|
109
|
-
return
|
109
|
+
return Se("");
|
110
110
|
}
|
111
|
-
function
|
111
|
+
function U(s, e, t, n) {
|
112
112
|
return s.addEventListener(e, t, n), () => s.removeEventListener(e, t, n);
|
113
113
|
}
|
114
114
|
function Ys(s) {
|
@@ -122,26 +122,26 @@ function r(s, e, t) {
|
|
122
122
|
function Li(s) {
|
123
123
|
return Array.from(s.childNodes);
|
124
124
|
}
|
125
|
-
function
|
125
|
+
function He(s, e) {
|
126
126
|
e = "" + e, s.data !== e && (s.data = /** @type {string} */
|
127
127
|
e);
|
128
128
|
}
|
129
|
-
function
|
129
|
+
function wt(s, e) {
|
130
130
|
s.value = e == null ? "" : e;
|
131
131
|
}
|
132
|
-
function
|
132
|
+
function N(s, e, t, n) {
|
133
133
|
t == null ? s.style.removeProperty(e) : s.style.setProperty(e, t, "");
|
134
134
|
}
|
135
|
-
function
|
135
|
+
function Q(s, e, t) {
|
136
136
|
s.classList.toggle(e, !!t);
|
137
137
|
}
|
138
|
-
let
|
138
|
+
let Mt;
|
139
139
|
function Rt(s) {
|
140
|
-
|
140
|
+
Mt = s;
|
141
141
|
}
|
142
142
|
function xn() {
|
143
|
-
if (!
|
144
|
-
return
|
143
|
+
if (!Mt) throw new Error("Function called outside component initialization");
|
144
|
+
return Mt;
|
145
145
|
}
|
146
146
|
function Zs(s) {
|
147
147
|
xn().$$.on_mount.push(s);
|
@@ -149,137 +149,137 @@ function Zs(s) {
|
|
149
149
|
function Mi(s) {
|
150
150
|
xn().$$.after_update.push(s);
|
151
151
|
}
|
152
|
-
function
|
152
|
+
function zi(s) {
|
153
153
|
xn().$$.on_destroy.push(s);
|
154
154
|
}
|
155
|
-
const
|
156
|
-
let
|
157
|
-
const ss = [],
|
158
|
-
let
|
159
|
-
function
|
160
|
-
|
155
|
+
const dt = [], kt = [];
|
156
|
+
let mt = [];
|
157
|
+
const ss = [], Oi = /* @__PURE__ */ Promise.resolve();
|
158
|
+
let wn = !1;
|
159
|
+
function Di() {
|
160
|
+
wn || (wn = !0, Oi.then(Xs));
|
161
161
|
}
|
162
|
-
function
|
163
|
-
|
162
|
+
function kn(s) {
|
163
|
+
mt.push(s);
|
164
164
|
}
|
165
165
|
const cn = /* @__PURE__ */ new Set();
|
166
|
-
let
|
166
|
+
let ht = 0;
|
167
167
|
function Xs() {
|
168
|
-
if (
|
168
|
+
if (ht !== 0)
|
169
169
|
return;
|
170
|
-
const s =
|
170
|
+
const s = Mt;
|
171
171
|
do {
|
172
172
|
try {
|
173
|
-
for (;
|
174
|
-
const e =
|
175
|
-
|
173
|
+
for (; ht < dt.length; ) {
|
174
|
+
const e = dt[ht];
|
175
|
+
ht++, Rt(e), Ni(e.$$);
|
176
176
|
}
|
177
177
|
} catch (e) {
|
178
|
-
throw
|
178
|
+
throw dt.length = 0, ht = 0, e;
|
179
179
|
}
|
180
|
-
for (Rt(null),
|
181
|
-
for (let e = 0; e <
|
182
|
-
const t =
|
180
|
+
for (Rt(null), dt.length = 0, ht = 0; kt.length; ) kt.pop()();
|
181
|
+
for (let e = 0; e < mt.length; e += 1) {
|
182
|
+
const t = mt[e];
|
183
183
|
cn.has(t) || (cn.add(t), t());
|
184
184
|
}
|
185
|
-
|
186
|
-
} while (
|
185
|
+
mt.length = 0;
|
186
|
+
} while (dt.length);
|
187
187
|
for (; ss.length; )
|
188
188
|
ss.pop()();
|
189
|
-
|
189
|
+
wn = !1, cn.clear(), Rt(s);
|
190
190
|
}
|
191
191
|
function Ni(s) {
|
192
192
|
if (s.fragment !== null) {
|
193
|
-
s.update(),
|
193
|
+
s.update(), Ae(s.before_update);
|
194
194
|
const e = s.dirty;
|
195
|
-
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(
|
195
|
+
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(kn);
|
196
196
|
}
|
197
197
|
}
|
198
198
|
function Pi(s) {
|
199
199
|
const e = [], t = [];
|
200
|
-
|
200
|
+
mt.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), mt = e;
|
201
201
|
}
|
202
202
|
const Yt = /* @__PURE__ */ new Set();
|
203
|
-
let
|
204
|
-
function
|
205
|
-
|
203
|
+
let it;
|
204
|
+
function In() {
|
205
|
+
it = {
|
206
206
|
r: 0,
|
207
207
|
c: [],
|
208
|
-
p:
|
208
|
+
p: it
|
209
209
|
// parent group
|
210
210
|
};
|
211
211
|
}
|
212
|
-
function
|
213
|
-
|
212
|
+
function Rn() {
|
213
|
+
it.r || Ae(it.c), it = it.p;
|
214
214
|
}
|
215
|
-
function
|
215
|
+
function Be(s, e) {
|
216
216
|
s && s.i && (Yt.delete(s), s.i(e));
|
217
217
|
}
|
218
|
-
function
|
218
|
+
function $e(s, e, t, n) {
|
219
219
|
if (s && s.o) {
|
220
220
|
if (Yt.has(s)) return;
|
221
|
-
Yt.add(s),
|
221
|
+
Yt.add(s), it.c.push(() => {
|
222
222
|
Yt.delete(s), n && (t && s.d(1), n());
|
223
223
|
}), s.o(e);
|
224
224
|
} else n && n();
|
225
225
|
}
|
226
|
-
function
|
226
|
+
function _t(s) {
|
227
227
|
return (s == null ? void 0 : s.length) !== void 0 ? s : Array.from(s);
|
228
228
|
}
|
229
229
|
function Vs(s, e) {
|
230
230
|
s.d(1), e.delete(s.key);
|
231
231
|
}
|
232
232
|
function Qs(s, e, t, n, i, o, l, a, c, u, h, p) {
|
233
|
-
let d = s.length, g = o.length,
|
233
|
+
let d = s.length, g = o.length, w = d;
|
234
234
|
const S = {};
|
235
|
-
for (;
|
236
|
-
const L = [],
|
237
|
-
for (
|
238
|
-
const
|
239
|
-
let
|
240
|
-
|
235
|
+
for (; w--; ) S[s[w].key] = w;
|
236
|
+
const L = [], z = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), _ = [];
|
237
|
+
for (w = g; w--; ) {
|
238
|
+
const b = p(i, o, w), C = t(b);
|
239
|
+
let I = l.get(C);
|
240
|
+
I ? _.push(() => I.p(b, e)) : (I = u(C, b), I.c()), z.set(C, L[w] = I), C in S && v.set(C, Math.abs(w - S[C]));
|
241
241
|
}
|
242
|
-
const
|
243
|
-
function A(
|
244
|
-
|
242
|
+
const k = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
|
243
|
+
function A(b) {
|
244
|
+
Be(b, 1), b.m(a, h), l.set(b.key, b), h = b.first, g--;
|
245
245
|
}
|
246
246
|
for (; d && g; ) {
|
247
|
-
const
|
248
|
-
|
247
|
+
const b = L[g - 1], C = s[d - 1], I = b.key, F = C.key;
|
248
|
+
b === C ? (h = b.first, d--, g--) : z.has(F) ? !l.has(I) || k.has(I) ? A(b) : T.has(F) ? d-- : v.get(I) > v.get(F) ? (T.add(I), A(b)) : (k.add(F), d--) : (c(C, l), d--);
|
249
249
|
}
|
250
250
|
for (; d--; ) {
|
251
|
-
const
|
252
|
-
|
251
|
+
const b = s[d];
|
252
|
+
z.has(b.key) || c(b, l);
|
253
253
|
}
|
254
254
|
for (; g; ) A(L[g - 1]);
|
255
|
-
return
|
255
|
+
return Ae(_), L;
|
256
256
|
}
|
257
257
|
function Cn(s) {
|
258
258
|
s && s.c();
|
259
259
|
}
|
260
260
|
function $t(s, e, t) {
|
261
261
|
const { fragment: n, after_update: i } = s.$$;
|
262
|
-
n && n.m(e, t),
|
262
|
+
n && n.m(e, t), kn(() => {
|
263
263
|
const o = s.$$.on_mount.map(js).filter(An);
|
264
|
-
s.$$.on_destroy ? s.$$.on_destroy.push(...o) :
|
265
|
-
}), i.forEach(
|
264
|
+
s.$$.on_destroy ? s.$$.on_destroy.push(...o) : Ae(o), s.$$.on_mount = [];
|
265
|
+
}), i.forEach(kn);
|
266
266
|
}
|
267
267
|
function en(s, e) {
|
268
268
|
const t = s.$$;
|
269
|
-
t.fragment !== null && (Pi(t.after_update),
|
269
|
+
t.fragment !== null && (Pi(t.after_update), Ae(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
270
270
|
}
|
271
271
|
function Fi(s, e) {
|
272
|
-
s.$$.dirty[0] === -1 && (
|
272
|
+
s.$$.dirty[0] === -1 && (dt.push(s), Di(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
273
273
|
}
|
274
274
|
function Ln(s, e, t, n, i, o, l = null, a = [-1]) {
|
275
|
-
const c =
|
275
|
+
const c = Mt;
|
276
276
|
Rt(s);
|
277
277
|
const u = s.$$ = {
|
278
278
|
fragment: null,
|
279
279
|
ctx: [],
|
280
280
|
// state
|
281
281
|
props: o,
|
282
|
-
update:
|
282
|
+
update: De,
|
283
283
|
not_equal: i,
|
284
284
|
bound: ts(),
|
285
285
|
// lifecycle
|
@@ -298,15 +298,15 @@ function Ln(s, e, t, n, i, o, l = null, a = [-1]) {
|
|
298
298
|
l && l(u.root);
|
299
299
|
let h = !1;
|
300
300
|
if (u.ctx = t ? t(s, e.props || {}, (p, d, ...g) => {
|
301
|
-
const
|
302
|
-
return u.ctx && i(u.ctx[p], u.ctx[p] =
|
303
|
-
}) : [], u.update(), h = !0,
|
301
|
+
const w = g.length ? g[0] : d;
|
302
|
+
return u.ctx && i(u.ctx[p], u.ctx[p] = w) && (!u.skip_bound && u.bound[p] && u.bound[p](w), h && Fi(s, p)), d;
|
303
|
+
}) : [], u.update(), h = !0, Ae(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
304
304
|
if (e.hydrate) {
|
305
305
|
const p = Li(e.target);
|
306
|
-
u.fragment && u.fragment.l(p), p.forEach(
|
306
|
+
u.fragment && u.fragment.l(p), p.forEach(W);
|
307
307
|
} else
|
308
308
|
u.fragment && u.fragment.c();
|
309
|
-
e.intro &&
|
309
|
+
e.intro && Be(s.$$.fragment), $t(s, e.target, e.anchor), Xs();
|
310
310
|
}
|
311
311
|
Rt(c);
|
312
312
|
}
|
@@ -331,7 +331,7 @@ class Mn {
|
|
331
331
|
}
|
332
332
|
/** @returns {void} */
|
333
333
|
$destroy() {
|
334
|
-
en(this, 1), this.$destroy =
|
334
|
+
en(this, 1), this.$destroy = De;
|
335
335
|
}
|
336
336
|
/**
|
337
337
|
* @template {Extract<keyof Events, string>} K
|
@@ -341,7 +341,7 @@ class Mn {
|
|
341
341
|
*/
|
342
342
|
$on(e, t) {
|
343
343
|
if (!An(t))
|
344
|
-
return
|
344
|
+
return De;
|
345
345
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
346
346
|
return n.push(t), () => {
|
347
347
|
const i = n.indexOf(t);
|
@@ -358,28 +358,28 @@ class Mn {
|
|
358
358
|
}
|
359
359
|
const Hi = "4";
|
360
360
|
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Hi);
|
361
|
-
const
|
362
|
-
function Bi(s, e =
|
361
|
+
const pt = [];
|
362
|
+
function Bi(s, e = De) {
|
363
363
|
let t;
|
364
364
|
const n = /* @__PURE__ */ new Set();
|
365
365
|
function i(a) {
|
366
366
|
if (Jt(s, a) && (s = a, t)) {
|
367
|
-
const c = !
|
367
|
+
const c = !pt.length;
|
368
368
|
for (const u of n)
|
369
|
-
u[1](),
|
369
|
+
u[1](), pt.push(u, s);
|
370
370
|
if (c) {
|
371
|
-
for (let u = 0; u <
|
372
|
-
|
373
|
-
|
371
|
+
for (let u = 0; u < pt.length; u += 2)
|
372
|
+
pt[u][0](pt[u + 1]);
|
373
|
+
pt.length = 0;
|
374
374
|
}
|
375
375
|
}
|
376
376
|
}
|
377
377
|
function o(a) {
|
378
378
|
i(a(s));
|
379
379
|
}
|
380
|
-
function l(a, c =
|
380
|
+
function l(a, c = De) {
|
381
381
|
const u = [a, c];
|
382
|
-
return n.add(u), n.size === 1 && (t = e(i, o) ||
|
382
|
+
return n.add(u), n.size === 1 && (t = e(i, o) || De), a(s), () => {
|
383
383
|
n.delete(u), n.size === 0 && t && (t(), t = null);
|
384
384
|
};
|
385
385
|
}
|
@@ -409,20 +409,20 @@ function _n(s, e, t, n) {
|
|
409
409
|
function Ui(s, e = {}) {
|
410
410
|
const t = Bi(s), { stiffness: n = 0.15, damping: i = 0.8, precision: o = 0.01 } = e;
|
411
411
|
let l, a, c, u = s, h = s, p = 1, d = 0, g = !1;
|
412
|
-
function
|
412
|
+
function w(L, z = {}) {
|
413
413
|
h = L;
|
414
414
|
const v = c = {};
|
415
|
-
return s == null ||
|
415
|
+
return s == null || z.hard || S.stiffness >= 1 && S.damping >= 1 ? (g = !0, l = ns(), u = L, t.set(s = h), Promise.resolve()) : (z.soft && (d = 1 / ((z.soft === !0 ? 0.5 : +z.soft) * 60), p = 0), a || (l = ns(), g = !1, a = Ri((_) => {
|
416
416
|
if (g)
|
417
417
|
return g = !1, a = null, !1;
|
418
418
|
p = Math.min(p + d, 1);
|
419
|
-
const
|
419
|
+
const k = {
|
420
420
|
inv_mass: p,
|
421
421
|
opts: S,
|
422
422
|
settled: !0,
|
423
423
|
dt: (_ - l) * 60 / 1e3
|
424
|
-
},
|
425
|
-
return l = _, u = s, t.set(s =
|
424
|
+
}, T = _n(k, u, s, h);
|
425
|
+
return l = _, u = s, t.set(s = T), k.settled && (a = null), !k.settled;
|
426
426
|
})), new Promise((_) => {
|
427
427
|
a.promise.then(() => {
|
428
428
|
v === c && _();
|
@@ -430,8 +430,8 @@ function Ui(s, e = {}) {
|
|
430
430
|
}));
|
431
431
|
}
|
432
432
|
const S = {
|
433
|
-
set:
|
434
|
-
update: (L,
|
433
|
+
set: w,
|
434
|
+
update: (L, z) => w(L(h, s), z),
|
435
435
|
subscribe: t.subscribe,
|
436
436
|
stiffness: n,
|
437
437
|
damping: i,
|
@@ -440,7 +440,7 @@ function Ui(s, e = {}) {
|
|
440
440
|
return S;
|
441
441
|
}
|
442
442
|
function ji(s, e) {
|
443
|
-
return
|
443
|
+
return Re(this, null, function* () {
|
444
444
|
const t = s.getReader();
|
445
445
|
let n;
|
446
446
|
for (; !(n = yield t.read()).done; )
|
@@ -527,42 +527,42 @@ function Xi(s, e) {
|
|
527
527
|
return new Promise((p, d) => {
|
528
528
|
const g = Object.assign({}, n);
|
529
529
|
g.accept || (g.accept = bn);
|
530
|
-
let
|
530
|
+
let w;
|
531
531
|
function S() {
|
532
|
-
|
532
|
+
w.abort(), document.hidden || T();
|
533
533
|
}
|
534
534
|
c || document.addEventListener("visibilitychange", S);
|
535
|
-
let L = Zi,
|
535
|
+
let L = Zi, z = 0;
|
536
536
|
function v() {
|
537
|
-
document.removeEventListener("visibilitychange", S), window.clearTimeout(
|
537
|
+
document.removeEventListener("visibilitychange", S), window.clearTimeout(z), w.abort();
|
538
538
|
}
|
539
539
|
t == null || t.addEventListener("abort", () => {
|
540
540
|
v(), p();
|
541
541
|
});
|
542
|
-
const _ = u != null ? u : window.fetch,
|
543
|
-
function
|
544
|
-
return
|
542
|
+
const _ = u != null ? u : window.fetch, k = i != null ? i : Vi;
|
543
|
+
function T() {
|
544
|
+
return Re(this, null, function* () {
|
545
545
|
var A;
|
546
|
-
|
546
|
+
w = new AbortController();
|
547
547
|
try {
|
548
|
-
const
|
549
|
-
yield
|
548
|
+
const b = yield _(s, Object.assign(Object.assign({}, h), { headers: g, signal: w.signal }));
|
549
|
+
yield k(b), yield ji(b.body, Wi(qi((C) => {
|
550
550
|
C ? g[ls] = C : delete g[ls];
|
551
551
|
}, (C) => {
|
552
552
|
L = C;
|
553
553
|
}, o))), l == null || l(), v(), p();
|
554
|
-
} catch (
|
555
|
-
if (!
|
554
|
+
} catch (b) {
|
555
|
+
if (!w.signal.aborted)
|
556
556
|
try {
|
557
|
-
const C = (A = a == null ? void 0 : a(
|
558
|
-
window.clearTimeout(
|
557
|
+
const C = (A = a == null ? void 0 : a(b)) !== null && A !== void 0 ? A : L;
|
558
|
+
window.clearTimeout(z), z = window.setTimeout(T, C);
|
559
559
|
} catch (C) {
|
560
560
|
v(), d(C);
|
561
561
|
}
|
562
562
|
}
|
563
563
|
});
|
564
564
|
}
|
565
|
-
|
565
|
+
T();
|
566
566
|
});
|
567
567
|
}
|
568
568
|
function Vi(s) {
|
@@ -570,7 +570,7 @@ function Vi(s) {
|
|
570
570
|
if (!(e != null && e.startsWith(bn)))
|
571
571
|
throw new Error(`Expected content-type to be ${bn}, Actual: ${e}`);
|
572
572
|
}
|
573
|
-
function
|
573
|
+
function zn() {
|
574
574
|
return {
|
575
575
|
async: !1,
|
576
576
|
breaks: !1,
|
@@ -584,9 +584,9 @@ function On() {
|
|
584
584
|
walkTokens: null
|
585
585
|
};
|
586
586
|
}
|
587
|
-
let
|
587
|
+
let rt = zn();
|
588
588
|
function Js(s) {
|
589
|
-
|
589
|
+
rt = s;
|
590
590
|
}
|
591
591
|
const Ks = /[&<>"']/, Qi = new RegExp(Ks.source, "g"), $s = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Ji = new RegExp($s.source, "g"), Ki = {
|
592
592
|
"&": "&",
|
@@ -595,7 +595,7 @@ const Ks = /[&<>"']/, Qi = new RegExp(Ks.source, "g"), $s = /[<>"']|&(?!(#\d{1,7
|
|
595
595
|
'"': """,
|
596
596
|
"'": "'"
|
597
597
|
}, rs = (s) => Ki[s];
|
598
|
-
function
|
598
|
+
function Pe(s, e) {
|
599
599
|
if (e) {
|
600
600
|
if (Ks.test(s))
|
601
601
|
return s.replace(Qi, rs);
|
@@ -628,7 +628,7 @@ function as(s) {
|
|
628
628
|
}
|
629
629
|
return s;
|
630
630
|
}
|
631
|
-
const
|
631
|
+
const Ct = { exec: () => null };
|
632
632
|
function cs(s, e) {
|
633
633
|
const t = s.replace(/\|/g, (o, l, a) => {
|
634
634
|
let c = !1, u = l;
|
@@ -677,7 +677,7 @@ function no(s, e) {
|
|
677
677
|
return -1;
|
678
678
|
}
|
679
679
|
function us(s, e, t, n) {
|
680
|
-
const i = e.href, o = e.title ?
|
680
|
+
const i = e.href, o = e.title ? Pe(e.title) : null, l = s[1].replace(/\\([\[\]])/g, "$1");
|
681
681
|
if (s[0].charAt(0) !== "!") {
|
682
682
|
n.state.inLink = !0;
|
683
683
|
const a = {
|
@@ -695,7 +695,7 @@ function us(s, e, t, n) {
|
|
695
695
|
raw: t,
|
696
696
|
href: i,
|
697
697
|
title: o,
|
698
|
-
text:
|
698
|
+
text: Pe(l)
|
699
699
|
};
|
700
700
|
}
|
701
701
|
function so(s, e) {
|
@@ -720,7 +720,7 @@ class Xt {
|
|
720
720
|
se(this, "rules");
|
721
721
|
// set by the lexer
|
722
722
|
se(this, "lexer");
|
723
|
-
this.options = e ||
|
723
|
+
this.options = e || rt;
|
724
724
|
}
|
725
725
|
space(e) {
|
726
726
|
const t = this.rules.block.newline.exec(e);
|
@@ -816,29 +816,29 @@ class Xt {
|
|
816
816
|
break;
|
817
817
|
a = t[0], e = e.substring(a.length);
|
818
818
|
let p = t[2].split(`
|
819
|
-
`, 1)[0].replace(/^\t+/, (
|
819
|
+
`, 1)[0].replace(/^\t+/, (z) => " ".repeat(3 * z.length)), d = e.split(`
|
820
820
|
`, 1)[0], g = 0;
|
821
821
|
this.options.pedantic ? (g = 2, c = p.trimStart()) : (g = t[2].search(/[^ ]/), g = g > 4 ? 1 : g, c = p.slice(g), g += t[1].length);
|
822
|
-
let
|
822
|
+
let w = !1;
|
823
823
|
if (!p && /^ *$/.test(d) && (a += d + `
|
824
824
|
`, e = e.substring(d.length + 1), h = !0), !h) {
|
825
|
-
const
|
825
|
+
const z = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), v = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), k = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
|
826
826
|
for (; e; ) {
|
827
|
-
const
|
827
|
+
const T = e.split(`
|
828
828
|
`, 1)[0];
|
829
|
-
if (d =
|
829
|
+
if (d = T, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || k.test(d) || z.test(d) || v.test(e))
|
830
830
|
break;
|
831
831
|
if (d.search(/[^ ]/) >= g || !d.trim())
|
832
832
|
c += `
|
833
833
|
` + d.slice(g);
|
834
834
|
else {
|
835
|
-
if (
|
835
|
+
if (w || p.search(/[^ ]/) >= 4 || _.test(p) || k.test(p) || v.test(p))
|
836
836
|
break;
|
837
837
|
c += `
|
838
838
|
` + d;
|
839
839
|
}
|
840
|
-
!
|
841
|
-
`, e = e.substring(
|
840
|
+
!w && !d.trim() && (w = !0), a += T + `
|
841
|
+
`, e = e.substring(T.length + 1), p = d.slice(g);
|
842
842
|
}
|
843
843
|
}
|
844
844
|
o.loose || (u ? o.loose = !0 : /\n *\n *$/.test(a) && (u = !0));
|
@@ -957,7 +957,7 @@ class Xt {
|
|
957
957
|
return {
|
958
958
|
type: "escape",
|
959
959
|
raw: t[0],
|
960
|
-
text:
|
960
|
+
text: Pe(t[1])
|
961
961
|
};
|
962
962
|
}
|
963
963
|
tag(e) {
|
@@ -1047,12 +1047,12 @@ class Xt {
|
|
1047
1047
|
tokens: this.lexer.inlineTokens(S)
|
1048
1048
|
};
|
1049
1049
|
}
|
1050
|
-
const
|
1050
|
+
const w = g.slice(2, -2);
|
1051
1051
|
return {
|
1052
1052
|
type: "strong",
|
1053
1053
|
raw: g,
|
1054
|
-
text:
|
1055
|
-
tokens: this.lexer.inlineTokens(
|
1054
|
+
text: w,
|
1055
|
+
tokens: this.lexer.inlineTokens(w)
|
1056
1056
|
};
|
1057
1057
|
}
|
1058
1058
|
}
|
@@ -1062,7 +1062,7 @@ class Xt {
|
|
1062
1062
|
if (t) {
|
1063
1063
|
let n = t[2].replace(/\n/g, " ");
|
1064
1064
|
const i = /[^ ]/.test(n), o = /^ /.test(n) && / $/.test(n);
|
1065
|
-
return i && o && (n = n.substring(1, n.length - 1)), n =
|
1065
|
+
return i && o && (n = n.substring(1, n.length - 1)), n = Pe(n, !0), {
|
1066
1066
|
type: "codespan",
|
1067
1067
|
raw: t[0],
|
1068
1068
|
text: n
|
@@ -1091,7 +1091,7 @@ class Xt {
|
|
1091
1091
|
const t = this.rules.inline.autolink.exec(e);
|
1092
1092
|
if (t) {
|
1093
1093
|
let n, i;
|
1094
|
-
return t[2] === "@" ? (n =
|
1094
|
+
return t[2] === "@" ? (n = Pe(t[1]), i = "mailto:" + n) : (n = Pe(t[1]), i = n), {
|
1095
1095
|
type: "link",
|
1096
1096
|
raw: t[0],
|
1097
1097
|
text: n,
|
@@ -1112,13 +1112,13 @@ class Xt {
|
|
1112
1112
|
if (t = this.rules.inline.url.exec(e)) {
|
1113
1113
|
let o, l;
|
1114
1114
|
if (t[2] === "@")
|
1115
|
-
o =
|
1115
|
+
o = Pe(t[0]), l = "mailto:" + o;
|
1116
1116
|
else {
|
1117
1117
|
let a;
|
1118
1118
|
do
|
1119
1119
|
a = t[0], t[0] = (i = (n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) != null ? i : "";
|
1120
1120
|
while (a !== t[0]);
|
1121
|
-
o =
|
1121
|
+
o = Pe(t[0]), t[1] === "www." ? l = "http://" + t[0] : l = t[0];
|
1122
1122
|
}
|
1123
1123
|
return {
|
1124
1124
|
type: "link",
|
@@ -1139,7 +1139,7 @@ class Xt {
|
|
1139
1139
|
const t = this.rules.inline.text.exec(e);
|
1140
1140
|
if (t) {
|
1141
1141
|
let n;
|
1142
|
-
return this.lexer.state.inRawBlock ? n = t[0] : n =
|
1142
|
+
return this.lexer.state.inRawBlock ? n = t[0] : n = Pe(t[0]), {
|
1143
1143
|
type: "text",
|
1144
1144
|
raw: t[0],
|
1145
1145
|
text: n
|
@@ -1147,92 +1147,92 @@ class Xt {
|
|
1147
1147
|
}
|
1148
1148
|
}
|
1149
1149
|
}
|
1150
|
-
const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
|
1150
|
+
const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, zt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ro = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ei = /(?:[*+-]|\d{1,9}[.)])/, ti = te(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, ei).getRegex(), On = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ao = /^[^\n]+/, Dn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, co = te(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Dn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), uo = te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ei).getRegex(), tn = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Nn = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, fo = te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Nn).replace("tag", tn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ni = te(On).replace("hr", zt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", tn).getRegex(), ho = te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ni).getRegex(), Pn = {
|
1151
1151
|
blockquote: ho,
|
1152
1152
|
code: oo,
|
1153
1153
|
def: co,
|
1154
1154
|
fences: lo,
|
1155
1155
|
heading: ro,
|
1156
|
-
hr:
|
1156
|
+
hr: zt,
|
1157
1157
|
html: fo,
|
1158
1158
|
lheading: ti,
|
1159
1159
|
list: uo,
|
1160
1160
|
newline: io,
|
1161
1161
|
paragraph: ni,
|
1162
|
-
table:
|
1162
|
+
table: Ct,
|
1163
1163
|
text: ao
|
1164
|
-
}, fs = te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",
|
1164
|
+
}, fs = te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", zt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", tn).getRegex(), po = ye(ee({}, Pn), {
|
1165
1165
|
table: fs,
|
1166
|
-
paragraph: te(
|
1167
|
-
}), go =
|
1166
|
+
paragraph: te(On).replace("hr", zt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", fs).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", tn).getRegex()
|
1167
|
+
}), go = ye(ee({}, Pn), {
|
1168
1168
|
html: te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Nn).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(),
|
1169
1169
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
1170
1170
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
1171
|
-
fences:
|
1171
|
+
fences: Ct,
|
1172
1172
|
// fences not supported
|
1173
1173
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
1174
|
-
paragraph: te(
|
1174
|
+
paragraph: te(On).replace("hr", zt).replace("heading", ` *#{1,6} *[^
|
1175
1175
|
]`).replace("lheading", ti).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
1176
|
-
}), si = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ii = /^( {2,}|\\)\n(?!\s*$)/,
|
1177
|
-
_backpedal:
|
1176
|
+
}), si = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ii = /^( {2,}|\\)\n(?!\s*$)/, wo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ot = "\\p{P}$+<=>`^|~", ko = te(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ot).getRegex(), _o = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, bo = te(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ot).getRegex(), yo = te("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ot).getRegex(), To = te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ot).getRegex(), vo = te(/\\([punct])/, "gu").replace(/punct/g, Ot).getRegex(), Eo = te(/^<(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(), So = te(Nn).replace("(?:-->|$)", "-->").getRegex(), Ao = te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", So).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Vt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, xo = te(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), oi = te(/^!?\[(label)\]\[(ref)\]/).replace("label", Vt).replace("ref", Dn).getRegex(), li = te(/^!?\[(ref)\](?:\[\])?/).replace("ref", Dn).getRegex(), Io = te("reflink|nolink(?!\\()", "g").replace("reflink", oi).replace("nolink", li).getRegex(), Fn = {
|
1177
|
+
_backpedal: Ct,
|
1178
1178
|
// only used for GFM url
|
1179
1179
|
anyPunctuation: vo,
|
1180
1180
|
autolink: Eo,
|
1181
1181
|
blockSkip: _o,
|
1182
1182
|
br: ii,
|
1183
1183
|
code: mo,
|
1184
|
-
del:
|
1184
|
+
del: Ct,
|
1185
1185
|
emStrongLDelim: bo,
|
1186
1186
|
emStrongRDelimAst: yo,
|
1187
1187
|
emStrongRDelimUnd: To,
|
1188
1188
|
escape: si,
|
1189
1189
|
link: xo,
|
1190
1190
|
nolink: li,
|
1191
|
-
punctuation:
|
1191
|
+
punctuation: ko,
|
1192
1192
|
reflink: oi,
|
1193
|
-
reflinkSearch:
|
1193
|
+
reflinkSearch: Io,
|
1194
1194
|
tag: Ao,
|
1195
|
-
text:
|
1196
|
-
url:
|
1197
|
-
},
|
1195
|
+
text: wo,
|
1196
|
+
url: Ct
|
1197
|
+
}, Ro = ye(ee({}, Fn), {
|
1198
1198
|
link: te(/^!?\[(label)\]\((.*?)\)/).replace("label", Vt).getRegex(),
|
1199
1199
|
reflink: te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Vt).getRegex()
|
1200
|
-
}), yn =
|
1200
|
+
}), yn = ye(ee({}, Fn), {
|
1201
1201
|
escape: te(si).replace("])", "~|])").getRegex(),
|
1202
1202
|
url: te(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
1203
1203
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
1204
1204
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
1205
1205
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
1206
|
-
}), Co =
|
1206
|
+
}), Co = ye(ee({}, yn), {
|
1207
1207
|
br: te(ii).replace("{2,}", "*").getRegex(),
|
1208
1208
|
text: te(yn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
1209
1209
|
}), jt = {
|
1210
1210
|
normal: Pn,
|
1211
1211
|
gfm: po,
|
1212
1212
|
pedantic: go
|
1213
|
-
},
|
1213
|
+
}, vt = {
|
1214
1214
|
normal: Fn,
|
1215
1215
|
gfm: yn,
|
1216
1216
|
breaks: Co,
|
1217
|
-
pedantic:
|
1217
|
+
pedantic: Ro
|
1218
1218
|
};
|
1219
|
-
class
|
1219
|
+
class Ze {
|
1220
1220
|
constructor(e) {
|
1221
1221
|
se(this, "tokens");
|
1222
1222
|
se(this, "options");
|
1223
1223
|
se(this, "state");
|
1224
1224
|
se(this, "tokenizer");
|
1225
1225
|
se(this, "inlineQueue");
|
1226
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
1226
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || rt, this.options.tokenizer = this.options.tokenizer || new Xt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
1227
1227
|
inLink: !1,
|
1228
1228
|
inRawBlock: !1,
|
1229
1229
|
top: !0
|
1230
1230
|
};
|
1231
1231
|
const t = {
|
1232
1232
|
block: jt.normal,
|
1233
|
-
inline:
|
1233
|
+
inline: vt.normal
|
1234
1234
|
};
|
1235
|
-
this.options.pedantic ? (t.block = jt.pedantic, t.inline =
|
1235
|
+
this.options.pedantic ? (t.block = jt.pedantic, t.inline = vt.pedantic) : this.options.gfm && (t.block = jt.gfm, this.options.breaks ? t.inline = vt.breaks : t.inline = vt.gfm), this.tokenizer.rules = t;
|
1236
1236
|
}
|
1237
1237
|
/**
|
1238
1238
|
* Expose Rules
|
@@ -1240,20 +1240,20 @@ class Ye {
|
|
1240
1240
|
static get rules() {
|
1241
1241
|
return {
|
1242
1242
|
block: jt,
|
1243
|
-
inline:
|
1243
|
+
inline: vt
|
1244
1244
|
};
|
1245
1245
|
}
|
1246
1246
|
/**
|
1247
1247
|
* Static Lex Method
|
1248
1248
|
*/
|
1249
1249
|
static lex(e, t) {
|
1250
|
-
return new
|
1250
|
+
return new Ze(t).lex(e);
|
1251
1251
|
}
|
1252
1252
|
/**
|
1253
1253
|
* Static Lex Inline Method
|
1254
1254
|
*/
|
1255
1255
|
static lexInline(e, t) {
|
1256
|
-
return new
|
1256
|
+
return new Ze(t).inlineTokens(e);
|
1257
1257
|
}
|
1258
1258
|
/**
|
1259
1259
|
* Preprocessing
|
@@ -1442,14 +1442,14 @@ class Ye {
|
|
1442
1442
|
class Qt {
|
1443
1443
|
constructor(e) {
|
1444
1444
|
se(this, "options");
|
1445
|
-
this.options = e ||
|
1445
|
+
this.options = e || rt;
|
1446
1446
|
}
|
1447
1447
|
code(e, t, n) {
|
1448
1448
|
var o;
|
1449
1449
|
const i = (o = (t || "").match(/^\S*/)) == null ? void 0 : o[0];
|
1450
1450
|
return e = e.replace(/\n$/, "") + `
|
1451
|
-
`, i ? '<pre><code class="language-' +
|
1452
|
-
` : "<pre><code>" + (n ? e :
|
1451
|
+
`, i ? '<pre><code class="language-' + Pe(i) + '">' + (n ? e : Pe(e, !0)) + `</code></pre>
|
1452
|
+
` : "<pre><code>" + (n ? e : Pe(e, !0)) + `</code></pre>
|
1453
1453
|
`;
|
1454
1454
|
}
|
1455
1455
|
blockquote(e) {
|
@@ -1570,24 +1570,24 @@ class Hn {
|
|
1570
1570
|
return "";
|
1571
1571
|
}
|
1572
1572
|
}
|
1573
|
-
class
|
1573
|
+
class Xe {
|
1574
1574
|
constructor(e) {
|
1575
1575
|
se(this, "options");
|
1576
1576
|
se(this, "renderer");
|
1577
1577
|
se(this, "textRenderer");
|
1578
|
-
this.options = e ||
|
1578
|
+
this.options = e || rt, this.options.renderer = this.options.renderer || new Qt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Hn();
|
1579
1579
|
}
|
1580
1580
|
/**
|
1581
1581
|
* Static Parse Method
|
1582
1582
|
*/
|
1583
1583
|
static parse(e, t) {
|
1584
|
-
return new
|
1584
|
+
return new Xe(t).parse(e);
|
1585
1585
|
}
|
1586
1586
|
/**
|
1587
1587
|
* Static Parse Inline Method
|
1588
1588
|
*/
|
1589
1589
|
static parseInline(e, t) {
|
1590
|
-
return new
|
1590
|
+
return new Xe(t).parseInline(e);
|
1591
1591
|
}
|
1592
1592
|
/**
|
1593
1593
|
* Parse Loop
|
@@ -1646,7 +1646,7 @@ class Ze {
|
|
1646
1646
|
const l = o, a = l.ordered, c = l.start, u = l.loose;
|
1647
1647
|
let h = "";
|
1648
1648
|
for (let p = 0; p < l.items.length; p++) {
|
1649
|
-
const d = l.items[p], g = d.checked,
|
1649
|
+
const d = l.items[p], g = d.checked, w = d.task;
|
1650
1650
|
let S = "";
|
1651
1651
|
if (d.task) {
|
1652
1652
|
const L = this.renderer.checkbox(!!g);
|
@@ -1655,7 +1655,7 @@ class Ze {
|
|
1655
1655
|
text: L + " "
|
1656
1656
|
}) : S += L + " ";
|
1657
1657
|
}
|
1658
|
-
S += this.parse(d.tokens, u), h += this.renderer.listitem(S,
|
1658
|
+
S += this.parse(d.tokens, u), h += this.renderer.listitem(S, w, !!g);
|
1659
1659
|
}
|
1660
1660
|
n += this.renderer.list(h, a, c);
|
1661
1661
|
continue;
|
@@ -1764,10 +1764,10 @@ class Ze {
|
|
1764
1764
|
return n;
|
1765
1765
|
}
|
1766
1766
|
}
|
1767
|
-
class
|
1767
|
+
class Lt {
|
1768
1768
|
constructor(e) {
|
1769
1769
|
se(this, "options");
|
1770
|
-
this.options = e ||
|
1770
|
+
this.options = e || rt;
|
1771
1771
|
}
|
1772
1772
|
/**
|
1773
1773
|
* Process markdown before marked
|
@@ -1788,25 +1788,25 @@ class Ct {
|
|
1788
1788
|
return e;
|
1789
1789
|
}
|
1790
1790
|
}
|
1791
|
-
se(
|
1791
|
+
se(Lt, "passThroughHooks", /* @__PURE__ */ new Set([
|
1792
1792
|
"preprocess",
|
1793
1793
|
"postprocess",
|
1794
1794
|
"processAllTokens"
|
1795
1795
|
]));
|
1796
|
-
var
|
1796
|
+
var lt, Tn, ri;
|
1797
1797
|
class Lo {
|
1798
1798
|
constructor(...e) {
|
1799
|
-
es(this,
|
1800
|
-
se(this, "defaults",
|
1799
|
+
es(this, lt);
|
1800
|
+
se(this, "defaults", zn());
|
1801
1801
|
se(this, "options", this.setOptions);
|
1802
|
-
se(this, "parse", Bt(this,
|
1803
|
-
se(this, "parseInline", Bt(this,
|
1804
|
-
se(this, "Parser",
|
1802
|
+
se(this, "parse", Bt(this, lt, Tn).call(this, Ze.lex, Xe.parse));
|
1803
|
+
se(this, "parseInline", Bt(this, lt, Tn).call(this, Ze.lexInline, Xe.parseInline));
|
1804
|
+
se(this, "Parser", Xe);
|
1805
1805
|
se(this, "Renderer", Qt);
|
1806
1806
|
se(this, "TextRenderer", Hn);
|
1807
|
-
se(this, "Lexer",
|
1807
|
+
se(this, "Lexer", Ze);
|
1808
1808
|
se(this, "Tokenizer", Xt);
|
1809
|
-
se(this, "Hooks",
|
1809
|
+
se(this, "Hooks", Lt);
|
1810
1810
|
this.use(...e);
|
1811
1811
|
}
|
1812
1812
|
/**
|
@@ -1893,14 +1893,14 @@ class Lo {
|
|
1893
1893
|
i.tokenizer = o;
|
1894
1894
|
}
|
1895
1895
|
if (n.hooks) {
|
1896
|
-
const o = this.defaults.hooks || new
|
1896
|
+
const o = this.defaults.hooks || new Lt();
|
1897
1897
|
for (const l in n.hooks) {
|
1898
1898
|
if (!(l in o))
|
1899
1899
|
throw new Error(`hook '${l}' does not exist`);
|
1900
1900
|
if (l === "options")
|
1901
1901
|
continue;
|
1902
1902
|
const a = l, c = n.hooks[a], u = o[a];
|
1903
|
-
|
1903
|
+
Lt.passThroughHooks.has(l) ? o[a] = (h) => {
|
1904
1904
|
if (this.defaults.async)
|
1905
1905
|
return Promise.resolve(c.call(o, h)).then((d) => u.call(o, d));
|
1906
1906
|
const p = c.call(o, h);
|
@@ -1926,17 +1926,17 @@ class Lo {
|
|
1926
1926
|
return this.defaults = ee(ee({}, this.defaults), e), this;
|
1927
1927
|
}
|
1928
1928
|
lexer(e, t) {
|
1929
|
-
return
|
1929
|
+
return Ze.lex(e, t != null ? t : this.defaults);
|
1930
1930
|
}
|
1931
1931
|
parser(e, t) {
|
1932
|
-
return
|
1932
|
+
return Xe.parse(e, t != null ? t : this.defaults);
|
1933
1933
|
}
|
1934
1934
|
}
|
1935
|
-
|
1935
|
+
lt = new WeakSet(), Tn = function(e, t) {
|
1936
1936
|
return (n, i) => {
|
1937
1937
|
const o = ee({}, i), l = ee(ee({}, this.defaults), o);
|
1938
1938
|
this.defaults.async === !0 && o.async === !1 && (l.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), l.async = !0);
|
1939
|
-
const a = Bt(this,
|
1939
|
+
const a = Bt(this, lt, ri).call(this, !!l.silent, !!l.async);
|
1940
1940
|
if (typeof n == "undefined" || n === null)
|
1941
1941
|
return a(new Error("marked(): input parameter is undefined or null"));
|
1942
1942
|
if (typeof n != "string")
|
@@ -1957,7 +1957,7 @@ ot = new WeakSet(), Tn = function(e, t) {
|
|
1957
1957
|
return (n) => {
|
1958
1958
|
if (n.message += `
|
1959
1959
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
1960
|
-
const i = "<p>An error occurred:</p><pre>" +
|
1960
|
+
const i = "<p>An error occurred:</p><pre>" + Pe(n.message + "", !0) + "</pre>";
|
1961
1961
|
return t ? Promise.resolve(i) : i;
|
1962
1962
|
}
|
1963
1963
|
if (t)
|
@@ -1965,58 +1965,58 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
1965
1965
|
throw n;
|
1966
1966
|
};
|
1967
1967
|
};
|
1968
|
-
const
|
1968
|
+
const ot = new Lo();
|
1969
1969
|
function K(s, e) {
|
1970
|
-
return
|
1970
|
+
return ot.parse(s, e);
|
1971
1971
|
}
|
1972
1972
|
K.options = K.setOptions = function(s) {
|
1973
|
-
return
|
1973
|
+
return ot.setOptions(s), K.defaults = ot.defaults, Js(K.defaults), K;
|
1974
1974
|
};
|
1975
|
-
K.getDefaults =
|
1976
|
-
K.defaults =
|
1975
|
+
K.getDefaults = zn;
|
1976
|
+
K.defaults = rt;
|
1977
1977
|
K.use = function(...s) {
|
1978
|
-
return
|
1978
|
+
return ot.use(...s), K.defaults = ot.defaults, Js(K.defaults), K;
|
1979
1979
|
};
|
1980
1980
|
K.walkTokens = function(s, e) {
|
1981
|
-
return
|
1981
|
+
return ot.walkTokens(s, e);
|
1982
1982
|
};
|
1983
|
-
K.parseInline =
|
1984
|
-
K.Parser =
|
1985
|
-
K.parser =
|
1983
|
+
K.parseInline = ot.parseInline;
|
1984
|
+
K.Parser = Xe;
|
1985
|
+
K.parser = Xe.parse;
|
1986
1986
|
K.Renderer = Qt;
|
1987
1987
|
K.TextRenderer = Hn;
|
1988
|
-
K.Lexer =
|
1989
|
-
K.lexer =
|
1988
|
+
K.Lexer = Ze;
|
1989
|
+
K.lexer = Ze.lex;
|
1990
1990
|
K.Tokenizer = Xt;
|
1991
|
-
K.Hooks =
|
1991
|
+
K.Hooks = Lt;
|
1992
1992
|
K.parse = K;
|
1993
1993
|
K.options;
|
1994
1994
|
K.setOptions;
|
1995
1995
|
K.use;
|
1996
1996
|
K.walkTokens;
|
1997
1997
|
K.parseInline;
|
1998
|
-
|
1999
|
-
|
1998
|
+
Xe.parse;
|
1999
|
+
Ze.lex;
|
2000
2000
|
/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
|
2001
2001
|
const {
|
2002
2002
|
entries: ai,
|
2003
2003
|
setPrototypeOf: hs,
|
2004
2004
|
isFrozen: Mo,
|
2005
|
-
getPrototypeOf:
|
2006
|
-
getOwnPropertyDescriptor:
|
2005
|
+
getPrototypeOf: zo,
|
2006
|
+
getOwnPropertyDescriptor: Oo
|
2007
2007
|
} = Object;
|
2008
2008
|
let {
|
2009
|
-
freeze:
|
2010
|
-
seal:
|
2009
|
+
freeze: Le,
|
2010
|
+
seal: Ue,
|
2011
2011
|
create: ci
|
2012
2012
|
} = Object, {
|
2013
2013
|
apply: vn,
|
2014
2014
|
construct: En
|
2015
2015
|
} = typeof Reflect != "undefined" && Reflect;
|
2016
|
-
|
2016
|
+
Le || (Le = function(e) {
|
2017
2017
|
return e;
|
2018
2018
|
});
|
2019
|
-
|
2019
|
+
Ue || (Ue = function(e) {
|
2020
2020
|
return e;
|
2021
2021
|
});
|
2022
2022
|
vn || (vn = function(e, t, n) {
|
@@ -2025,8 +2025,8 @@ vn || (vn = function(e, t, n) {
|
|
2025
2025
|
En || (En = function(e, t) {
|
2026
2026
|
return new e(...t);
|
2027
2027
|
});
|
2028
|
-
const Wt =
|
2029
|
-
function
|
2028
|
+
const Wt = Fe(Array.prototype.forEach), ps = Fe(Array.prototype.pop), Et = Fe(Array.prototype.push), Zt = Fe(String.prototype.toLowerCase), un = Fe(String.prototype.toString), ds = Fe(String.prototype.match), St = Fe(String.prototype.replace), Do = Fe(String.prototype.indexOf), No = Fe(String.prototype.trim), We = Fe(Object.prototype.hasOwnProperty), Ce = Fe(RegExp.prototype.test), At = Po(TypeError);
|
2029
|
+
function Fe(s) {
|
2030
2030
|
return function(e) {
|
2031
2031
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
2032
2032
|
n[i - 1] = arguments[i];
|
@@ -2056,38 +2056,38 @@ function Y(s, e) {
|
|
2056
2056
|
}
|
2057
2057
|
function Fo(s) {
|
2058
2058
|
for (let e = 0; e < s.length; e++)
|
2059
|
-
|
2059
|
+
We(s, e) || (s[e] = null);
|
2060
2060
|
return s;
|
2061
2061
|
}
|
2062
|
-
function
|
2062
|
+
function st(s) {
|
2063
2063
|
const e = ci(null);
|
2064
2064
|
for (const [t, n] of ai(s))
|
2065
|
-
|
2065
|
+
We(s, t) && (Array.isArray(n) ? e[t] = Fo(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = st(n) : e[t] = n);
|
2066
2066
|
return e;
|
2067
2067
|
}
|
2068
|
-
function
|
2068
|
+
function xt(s, e) {
|
2069
2069
|
for (; s !== null; ) {
|
2070
|
-
const n =
|
2070
|
+
const n = Oo(s, e);
|
2071
2071
|
if (n) {
|
2072
2072
|
if (n.get)
|
2073
|
-
return
|
2073
|
+
return Fe(n.get);
|
2074
2074
|
if (typeof n.value == "function")
|
2075
|
-
return
|
2075
|
+
return Fe(n.value);
|
2076
2076
|
}
|
2077
|
-
s =
|
2077
|
+
s = zo(s);
|
2078
2078
|
}
|
2079
2079
|
function t() {
|
2080
2080
|
return null;
|
2081
2081
|
}
|
2082
2082
|
return t;
|
2083
2083
|
}
|
2084
|
-
const gs =
|
2084
|
+
const gs = Le(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), fn = Le(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), hn = Le(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ho = Le(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), pn = Le(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Bo = Le(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ms = Le(["#text"]), ws = Le(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), dn = Le(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ks = Le(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), qt = Le(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Uo = Ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm), jo = Ue(/<%[\w\W]*|[\w\W]*%>/gm), Wo = Ue(/\$\{[\w\W]*}/gm), qo = Ue(/^data-[\-\w.\u00B7-\uFFFF]+$/), Go = Ue(/^aria-[\-\w]+$/), ui = Ue(
|
2085
2085
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
2086
2086
|
// eslint-disable-line no-useless-escape
|
2087
|
-
), Yo =
|
2087
|
+
), Yo = Ue(/^(?:\w+script|data):/i), Zo = Ue(
|
2088
2088
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
2089
2089
|
// eslint-disable-line no-control-regex
|
2090
|
-
), fi =
|
2090
|
+
), fi = Ue(/^html$/i), Xo = Ue(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
2091
2091
|
var _s = /* @__PURE__ */ Object.freeze({
|
2092
2092
|
__proto__: null,
|
2093
2093
|
ARIA_ATTR: Go,
|
@@ -2101,7 +2101,7 @@ var _s = /* @__PURE__ */ Object.freeze({
|
|
2101
2101
|
MUSTACHE_EXPR: Uo,
|
2102
2102
|
TMPLIT_EXPR: Wo
|
2103
2103
|
});
|
2104
|
-
const
|
2104
|
+
const It = {
|
2105
2105
|
element: 1,
|
2106
2106
|
attribute: 2,
|
2107
2107
|
text: 3,
|
@@ -2153,8 +2153,8 @@ const xt = {
|
|
2153
2153
|
};
|
2154
2154
|
function hi() {
|
2155
2155
|
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Vo();
|
2156
|
-
const e = (
|
2157
|
-
if (e.version = "3.2.3", e.removed = [], !s || !s.document || s.document.nodeType !==
|
2156
|
+
const e = (P) => hi(P);
|
2157
|
+
if (e.version = "3.2.3", e.removed = [], !s || !s.document || s.document.nodeType !== It.document)
|
2158
2158
|
return e.isSupported = !1, e;
|
2159
2159
|
let {
|
2160
2160
|
document: t
|
@@ -2169,38 +2169,38 @@ function hi() {
|
|
2169
2169
|
HTMLFormElement: p,
|
2170
2170
|
DOMParser: d,
|
2171
2171
|
trustedTypes: g
|
2172
|
-
} = s,
|
2172
|
+
} = s, w = c.prototype, S = xt(w, "cloneNode"), L = xt(w, "remove"), z = xt(w, "nextSibling"), v = xt(w, "childNodes"), _ = xt(w, "parentNode");
|
2173
2173
|
if (typeof l == "function") {
|
2174
|
-
const
|
2175
|
-
|
2174
|
+
const P = t.createElement("template");
|
2175
|
+
P.content && P.content.ownerDocument && (t = P.content.ownerDocument);
|
2176
2176
|
}
|
2177
|
-
let
|
2177
|
+
let k, T = "";
|
2178
2178
|
const {
|
2179
2179
|
implementation: A,
|
2180
|
-
createNodeIterator:
|
2180
|
+
createNodeIterator: b,
|
2181
2181
|
createDocumentFragment: C,
|
2182
|
-
getElementsByTagName:
|
2182
|
+
getElementsByTagName: I
|
2183
2183
|
} = t, {
|
2184
|
-
importNode:
|
2184
|
+
importNode: F
|
2185
2185
|
} = n;
|
2186
|
-
let
|
2186
|
+
let R = bs();
|
2187
2187
|
e.isSupported = typeof ai == "function" && typeof _ == "function" && A && A.createHTMLDocument !== void 0;
|
2188
2188
|
const {
|
2189
|
-
MUSTACHE_EXPR:
|
2189
|
+
MUSTACHE_EXPR: j,
|
2190
2190
|
ERB_EXPR: Z,
|
2191
|
-
TMPLIT_EXPR:
|
2191
|
+
TMPLIT_EXPR: X,
|
2192
2192
|
DATA_ATTR: oe,
|
2193
|
-
ARIA_ATTR:
|
2194
|
-
IS_SCRIPT_OR_DATA:
|
2195
|
-
ATTR_WHITESPACE:
|
2196
|
-
CUSTOM_ELEMENT:
|
2193
|
+
ARIA_ATTR: fe,
|
2194
|
+
IS_SCRIPT_OR_DATA: ce,
|
2195
|
+
ATTR_WHITESPACE: je,
|
2196
|
+
CUSTOM_ELEMENT: le
|
2197
2197
|
} = _s;
|
2198
2198
|
let {
|
2199
|
-
IS_ALLOWED_URI:
|
2200
|
-
} = _s,
|
2201
|
-
const
|
2199
|
+
IS_ALLOWED_URI: qe
|
2200
|
+
} = _s, re = null;
|
2201
|
+
const Ve = Y({}, [...gs, ...fn, ...hn, ...pn, ...ms]);
|
2202
2202
|
let ie = null;
|
2203
|
-
const
|
2203
|
+
const xe = Y({}, [...ws, ...dn, ...ks, ...qt]);
|
2204
2204
|
let $ = Object.seal(ci(null, {
|
2205
2205
|
tagNameCheck: {
|
2206
2206
|
writable: !0,
|
@@ -2220,47 +2220,47 @@ function hi() {
|
|
2220
2220
|
enumerable: !0,
|
2221
2221
|
value: !1
|
2222
2222
|
}
|
2223
|
-
})),
|
2223
|
+
})), Me = null, Te = null, Qe = !0, D = !0, ne = !1, O = !0, B = !1, pe = !0, de = !1, ze = !1, Ne = !1, et = !1, at = !1, ct = !1, Dt = !0, Nt = !1;
|
2224
2224
|
const nn = "user-content-";
|
2225
|
-
let
|
2225
|
+
let bt = !0, nt = !1, tt = {}, y = null;
|
2226
2226
|
const H = Y({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
2227
|
-
let
|
2228
|
-
const
|
2227
|
+
let J = null;
|
2228
|
+
const ge = Y({}, ["audio", "video", "img", "source", "image", "track"]);
|
2229
2229
|
let ue = null;
|
2230
|
-
const
|
2231
|
-
let
|
2232
|
-
const di = Y({}, [
|
2230
|
+
const ve = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), me = "http://www.w3.org/1998/Math/MathML", Je = "http://www.w3.org/2000/svg", _e = "http://www.w3.org/1999/xhtml";
|
2231
|
+
let ut = _e, sn = !1, on = null;
|
2232
|
+
const di = Y({}, [me, Je, _e], un);
|
2233
2233
|
let Pt = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), Ft = Y({}, ["annotation-xml"]);
|
2234
2234
|
const gi = Y({}, ["title", "style", "font", "a", "script"]);
|
2235
|
-
let
|
2236
|
-
const mi = ["application/xhtml+xml", "text/html"],
|
2237
|
-
let
|
2238
|
-
const
|
2235
|
+
let yt = null;
|
2236
|
+
const mi = ["application/xhtml+xml", "text/html"], wi = "text/html";
|
2237
|
+
let we = null, ft = null;
|
2238
|
+
const ki = t.createElement("form"), Bn = function(f) {
|
2239
2239
|
return f instanceof RegExp || f instanceof Function;
|
2240
2240
|
}, ln = function() {
|
2241
2241
|
let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2242
|
-
if (!(
|
2243
|
-
if ((!f || typeof f != "object") && (f = {}), f =
|
2244
|
-
mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ?
|
2242
|
+
if (!(ft && ft === f)) {
|
2243
|
+
if ((!f || typeof f != "object") && (f = {}), f = st(f), yt = // eslint-disable-next-line unicorn/prefer-includes
|
2244
|
+
mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? wi : f.PARSER_MEDIA_TYPE, we = yt === "application/xhtml+xml" ? un : Zt, re = We(f, "ALLOWED_TAGS") ? Y({}, f.ALLOWED_TAGS, we) : Ve, ie = We(f, "ALLOWED_ATTR") ? Y({}, f.ALLOWED_ATTR, we) : xe, on = We(f, "ALLOWED_NAMESPACES") ? Y({}, f.ALLOWED_NAMESPACES, un) : di, ue = We(f, "ADD_URI_SAFE_ATTR") ? Y(st(ve), f.ADD_URI_SAFE_ATTR, we) : ve, J = We(f, "ADD_DATA_URI_TAGS") ? Y(st(ge), f.ADD_DATA_URI_TAGS, we) : ge, y = We(f, "FORBID_CONTENTS") ? Y({}, f.FORBID_CONTENTS, we) : H, Me = We(f, "FORBID_TAGS") ? Y({}, f.FORBID_TAGS, we) : {}, Te = We(f, "FORBID_ATTR") ? Y({}, f.FORBID_ATTR, we) : {}, tt = We(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Qe = f.ALLOW_ARIA_ATTR !== !1, D = f.ALLOW_DATA_ATTR !== !1, ne = f.ALLOW_UNKNOWN_PROTOCOLS || !1, O = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = f.SAFE_FOR_TEMPLATES || !1, pe = f.SAFE_FOR_XML !== !1, de = f.WHOLE_DOCUMENT || !1, et = f.RETURN_DOM || !1, at = f.RETURN_DOM_FRAGMENT || !1, ct = f.RETURN_TRUSTED_TYPE || !1, Ne = f.FORCE_BODY || !1, Dt = f.SANITIZE_DOM !== !1, Nt = f.SANITIZE_NAMED_PROPS || !1, bt = f.KEEP_CONTENT !== !1, nt = f.IN_PLACE || !1, qe = f.ALLOWED_URI_REGEXP || ui, ut = f.NAMESPACE || _e, Pt = f.MATHML_TEXT_INTEGRATION_POINTS || Pt, Ft = f.HTML_INTEGRATION_POINTS || Ft, $ = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), B && (D = !1), at && (et = !0), tt && (re = Y({}, ms), ie = [], tt.html === !0 && (Y(re, gs), Y(ie, ws)), tt.svg === !0 && (Y(re, fn), Y(ie, dn), Y(ie, qt)), tt.svgFilters === !0 && (Y(re, hn), Y(ie, dn), Y(ie, qt)), tt.mathMl === !0 && (Y(re, pn), Y(ie, ks), Y(ie, qt))), f.ADD_TAGS && (re === Ve && (re = st(re)), Y(re, f.ADD_TAGS, we)), f.ADD_ATTR && (ie === xe && (ie = st(ie)), Y(ie, f.ADD_ATTR, we)), f.ADD_URI_SAFE_ATTR && Y(ue, f.ADD_URI_SAFE_ATTR, we), f.FORBID_CONTENTS && (y === H && (y = st(y)), Y(y, f.FORBID_CONTENTS, we)), bt && (re["#text"] = !0), de && Y(re, ["html", "head", "body"]), re.table && (Y(re, ["tbody"]), delete Me.tbody), f.TRUSTED_TYPES_POLICY) {
|
2245
2245
|
if (typeof f.TRUSTED_TYPES_POLICY.createHTML != "function")
|
2246
|
-
throw
|
2246
|
+
throw At('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
2247
2247
|
if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
2248
|
-
throw
|
2249
|
-
|
2248
|
+
throw At('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
2249
|
+
k = f.TRUSTED_TYPES_POLICY, T = k.createHTML("");
|
2250
2250
|
} else
|
2251
|
-
|
2252
|
-
|
2251
|
+
k === void 0 && (k = Qo(g, i)), k !== null && typeof T == "string" && (T = k.createHTML(""));
|
2252
|
+
Le && Le(f), ft = f;
|
2253
2253
|
}
|
2254
2254
|
}, Un = Y({}, [...fn, ...hn, ...Ho]), jn = Y({}, [...pn, ...Bo]), _i = function(f) {
|
2255
2255
|
let E = _(f);
|
2256
2256
|
(!E || !E.tagName) && (E = {
|
2257
|
-
namespaceURI:
|
2257
|
+
namespaceURI: ut,
|
2258
2258
|
tagName: "template"
|
2259
2259
|
});
|
2260
2260
|
const M = Zt(f.tagName), ae = Zt(E.tagName);
|
2261
|
-
return on[f.namespaceURI] ? f.namespaceURI ===
|
2262
|
-
},
|
2263
|
-
|
2261
|
+
return on[f.namespaceURI] ? f.namespaceURI === Je ? E.namespaceURI === _e ? M === "svg" : E.namespaceURI === me ? M === "svg" && (ae === "annotation-xml" || Pt[ae]) : !!Un[M] : f.namespaceURI === me ? E.namespaceURI === _e ? M === "math" : E.namespaceURI === Je ? M === "math" && Ft[ae] : !!jn[M] : f.namespaceURI === _e ? E.namespaceURI === Je && !Ft[ae] || E.namespaceURI === me && !Pt[ae] ? !1 : !jn[M] && (gi[M] || !Un[M]) : !!(yt === "application/xhtml+xml" && on[f.namespaceURI]) : !1;
|
2262
|
+
}, Ge = function(f) {
|
2263
|
+
Et(e.removed, {
|
2264
2264
|
element: f
|
2265
2265
|
});
|
2266
2266
|
try {
|
@@ -2270,20 +2270,20 @@ function hi() {
|
|
2270
2270
|
}
|
2271
2271
|
}, Ht = function(f, E) {
|
2272
2272
|
try {
|
2273
|
-
|
2273
|
+
Et(e.removed, {
|
2274
2274
|
attribute: E.getAttributeNode(f),
|
2275
2275
|
from: E
|
2276
2276
|
});
|
2277
2277
|
} catch (M) {
|
2278
|
-
|
2278
|
+
Et(e.removed, {
|
2279
2279
|
attribute: null,
|
2280
2280
|
from: E
|
2281
2281
|
});
|
2282
2282
|
}
|
2283
2283
|
if (E.removeAttribute(f), f === "is")
|
2284
|
-
if (
|
2284
|
+
if (et || at)
|
2285
2285
|
try {
|
2286
|
-
|
2286
|
+
Ge(E);
|
2287
2287
|
} catch (M) {
|
2288
2288
|
}
|
2289
2289
|
else
|
@@ -2293,30 +2293,30 @@ function hi() {
|
|
2293
2293
|
}
|
2294
2294
|
}, Wn = function(f) {
|
2295
2295
|
let E = null, M = null;
|
2296
|
-
if (
|
2296
|
+
if (Ne)
|
2297
2297
|
f = "<remove></remove>" + f;
|
2298
2298
|
else {
|
2299
|
-
const
|
2300
|
-
M =
|
2299
|
+
const be = ds(f, /^[\r\n\t ]+/);
|
2300
|
+
M = be && be[0];
|
2301
2301
|
}
|
2302
|
-
|
2303
|
-
const ae =
|
2304
|
-
if (
|
2302
|
+
yt === "application/xhtml+xml" && ut === _e && (f = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + f + "</body></html>");
|
2303
|
+
const ae = k ? k.createHTML(f) : f;
|
2304
|
+
if (ut === _e)
|
2305
2305
|
try {
|
2306
|
-
E = new d().parseFromString(ae,
|
2307
|
-
} catch (
|
2306
|
+
E = new d().parseFromString(ae, yt);
|
2307
|
+
} catch (be) {
|
2308
2308
|
}
|
2309
2309
|
if (!E || !E.documentElement) {
|
2310
|
-
E = A.createDocument(
|
2310
|
+
E = A.createDocument(ut, "template", null);
|
2311
2311
|
try {
|
2312
|
-
E.documentElement.innerHTML = sn ?
|
2313
|
-
} catch (
|
2312
|
+
E.documentElement.innerHTML = sn ? T : ae;
|
2313
|
+
} catch (be) {
|
2314
2314
|
}
|
2315
2315
|
}
|
2316
|
-
const
|
2317
|
-
return f && M &&
|
2316
|
+
const Ee = E.body || E.documentElement;
|
2317
|
+
return f && M && Ee.insertBefore(t.createTextNode(M), Ee.childNodes[0] || null), ut === _e ? I.call(E, de ? "html" : "body")[0] : de ? E.documentElement : Ee;
|
2318
2318
|
}, qn = function(f) {
|
2319
|
-
return
|
2319
|
+
return b.call(
|
2320
2320
|
f.ownerDocument || f,
|
2321
2321
|
f,
|
2322
2322
|
// eslint-disable-next-line no-bitwise
|
@@ -2328,59 +2328,59 @@ function hi() {
|
|
2328
2328
|
}, Gn = function(f) {
|
2329
2329
|
return typeof a == "function" && f instanceof a;
|
2330
2330
|
};
|
2331
|
-
function
|
2332
|
-
Wt(
|
2333
|
-
M.call(e, f, E,
|
2331
|
+
function Ke(P, f, E) {
|
2332
|
+
Wt(P, (M) => {
|
2333
|
+
M.call(e, f, E, ft);
|
2334
2334
|
});
|
2335
2335
|
}
|
2336
2336
|
const Yn = function(f) {
|
2337
2337
|
let E = null;
|
2338
|
-
if (
|
2339
|
-
return
|
2340
|
-
const M =
|
2341
|
-
if (
|
2338
|
+
if (Ke(R.beforeSanitizeElements, f, null), rn(f))
|
2339
|
+
return Ge(f), !0;
|
2340
|
+
const M = we(f.nodeName);
|
2341
|
+
if (Ke(R.uponSanitizeElement, f, {
|
2342
2342
|
tagName: M,
|
2343
|
-
allowedTags:
|
2344
|
-
}), f.hasChildNodes() && !Gn(f.firstElementChild) &&
|
2345
|
-
return
|
2346
|
-
if (!
|
2347
|
-
if (!
|
2343
|
+
allowedTags: re
|
2344
|
+
}), f.hasChildNodes() && !Gn(f.firstElementChild) && Ce(/<[/\w]/g, f.innerHTML) && Ce(/<[/\w]/g, f.textContent) || f.nodeType === It.progressingInstruction || pe && f.nodeType === It.comment && Ce(/<[/\w]/g, f.data))
|
2345
|
+
return Ge(f), !0;
|
2346
|
+
if (!re[M] || Me[M]) {
|
2347
|
+
if (!Me[M] && Xn(M) && ($.tagNameCheck instanceof RegExp && Ce($.tagNameCheck, M) || $.tagNameCheck instanceof Function && $.tagNameCheck(M)))
|
2348
2348
|
return !1;
|
2349
|
-
if (
|
2350
|
-
const ae = _(f) || f.parentNode,
|
2351
|
-
if (
|
2352
|
-
const
|
2353
|
-
for (let
|
2354
|
-
const
|
2355
|
-
|
2349
|
+
if (bt && !y[M]) {
|
2350
|
+
const ae = _(f) || f.parentNode, Ee = v(f) || f.childNodes;
|
2351
|
+
if (Ee && ae) {
|
2352
|
+
const be = Ee.length;
|
2353
|
+
for (let Oe = be - 1; Oe >= 0; --Oe) {
|
2354
|
+
const Ye = S(Ee[Oe], !0);
|
2355
|
+
Ye.__removalCount = (f.__removalCount || 0) + 1, ae.insertBefore(Ye, z(f));
|
2356
2356
|
}
|
2357
2357
|
}
|
2358
2358
|
}
|
2359
|
-
return
|
2359
|
+
return Ge(f), !0;
|
2360
2360
|
}
|
2361
|
-
return f instanceof c && !_i(f) || (M === "noscript" || M === "noembed" || M === "noframes") &&
|
2362
|
-
E =
|
2363
|
-
}), f.textContent !== E && (
|
2361
|
+
return f instanceof c && !_i(f) || (M === "noscript" || M === "noembed" || M === "noframes") && Ce(/<\/no(script|embed|frames)/i, f.innerHTML) ? (Ge(f), !0) : (B && f.nodeType === It.text && (E = f.textContent, Wt([j, Z, X], (ae) => {
|
2362
|
+
E = St(E, ae, " ");
|
2363
|
+
}), f.textContent !== E && (Et(e.removed, {
|
2364
2364
|
element: f.cloneNode()
|
2365
|
-
}), f.textContent = E)),
|
2365
|
+
}), f.textContent = E)), Ke(R.afterSanitizeElements, f, null), !1);
|
2366
2366
|
}, Zn = function(f, E, M) {
|
2367
|
-
if (Dt && (E === "id" || E === "name") && (M in t || M in
|
2367
|
+
if (Dt && (E === "id" || E === "name") && (M in t || M in ki))
|
2368
2368
|
return !1;
|
2369
|
-
if (!(D && !
|
2370
|
-
if (!(
|
2371
|
-
if (!ie[E] ||
|
2369
|
+
if (!(D && !Te[E] && Ce(oe, E))) {
|
2370
|
+
if (!(Qe && Ce(fe, E))) {
|
2371
|
+
if (!ie[E] || Te[E]) {
|
2372
2372
|
if (
|
2373
2373
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
2374
2374
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2375
2375
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
2376
|
-
!(Xn(f) && ($.tagNameCheck instanceof RegExp &&
|
2376
|
+
!(Xn(f) && ($.tagNameCheck instanceof RegExp && Ce($.tagNameCheck, f) || $.tagNameCheck instanceof Function && $.tagNameCheck(f)) && ($.attributeNameCheck instanceof RegExp && Ce($.attributeNameCheck, E) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(E)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
2377
2377
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2378
|
-
E === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp &&
|
2378
|
+
E === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && Ce($.tagNameCheck, M) || $.tagNameCheck instanceof Function && $.tagNameCheck(M)))
|
2379
2379
|
) return !1;
|
2380
2380
|
} else if (!ue[E]) {
|
2381
|
-
if (!
|
2382
|
-
if (!((E === "src" || E === "xlink:href" || E === "href") && f !== "script" &&
|
2383
|
-
if (!(ne && !
|
2381
|
+
if (!Ce(qe, St(M, je, ""))) {
|
2382
|
+
if (!((E === "src" || E === "xlink:href" || E === "href") && f !== "script" && Do(M, "data:") === 0 && J[f])) {
|
2383
|
+
if (!(ne && !Ce(ce, St(M, je, "")))) {
|
2384
2384
|
if (M)
|
2385
2385
|
return !1;
|
2386
2386
|
}
|
@@ -2391,9 +2391,9 @@ function hi() {
|
|
2391
2391
|
}
|
2392
2392
|
return !0;
|
2393
2393
|
}, Xn = function(f) {
|
2394
|
-
return f !== "annotation-xml" && ds(f,
|
2394
|
+
return f !== "annotation-xml" && ds(f, le);
|
2395
2395
|
}, Vn = function(f) {
|
2396
|
-
|
2396
|
+
Ke(R.beforeSanitizeAttributes, f, null);
|
2397
2397
|
const {
|
2398
2398
|
attributes: E
|
2399
2399
|
} = f;
|
@@ -2408,113 +2408,113 @@ function hi() {
|
|
2408
2408
|
};
|
2409
2409
|
let ae = E.length;
|
2410
2410
|
for (; ae--; ) {
|
2411
|
-
const
|
2412
|
-
name:
|
2413
|
-
namespaceURI:
|
2414
|
-
value:
|
2415
|
-
} =
|
2416
|
-
let
|
2417
|
-
if (M.attrName =
|
2418
|
-
Ht(
|
2411
|
+
const Ee = E[ae], {
|
2412
|
+
name: be,
|
2413
|
+
namespaceURI: Oe,
|
2414
|
+
value: Ye
|
2415
|
+
} = Ee, Tt = we(be);
|
2416
|
+
let Ie = be === "value" ? Ye : No(Ye);
|
2417
|
+
if (M.attrName = Tt, M.attrValue = Ie, M.keepAttr = !0, M.forceKeepAttr = void 0, Ke(R.uponSanitizeAttribute, f, M), Ie = M.attrValue, Nt && (Tt === "id" || Tt === "name") && (Ht(be, f), Ie = nn + Ie), pe && Ce(/((--!?|])>)|<\/(style|title)/i, Ie)) {
|
2418
|
+
Ht(be, f);
|
2419
2419
|
continue;
|
2420
2420
|
}
|
2421
|
-
if (M.forceKeepAttr || (Ht(
|
2421
|
+
if (M.forceKeepAttr || (Ht(be, f), !M.keepAttr))
|
2422
2422
|
continue;
|
2423
|
-
if (!
|
2424
|
-
Ht(
|
2423
|
+
if (!O && Ce(/\/>/i, Ie)) {
|
2424
|
+
Ht(be, f);
|
2425
2425
|
continue;
|
2426
2426
|
}
|
2427
|
-
|
2428
|
-
|
2427
|
+
B && Wt([j, Z, X], (Jn) => {
|
2428
|
+
Ie = St(Ie, Jn, " ");
|
2429
2429
|
});
|
2430
|
-
const Qn =
|
2431
|
-
if (Zn(Qn,
|
2432
|
-
if (
|
2433
|
-
switch (g.getAttributeType(Qn,
|
2430
|
+
const Qn = we(f.nodeName);
|
2431
|
+
if (Zn(Qn, Tt, Ie)) {
|
2432
|
+
if (k && typeof g == "object" && typeof g.getAttributeType == "function" && !Oe)
|
2433
|
+
switch (g.getAttributeType(Qn, Tt)) {
|
2434
2434
|
case "TrustedHTML": {
|
2435
|
-
|
2435
|
+
Ie = k.createHTML(Ie);
|
2436
2436
|
break;
|
2437
2437
|
}
|
2438
2438
|
case "TrustedScriptURL": {
|
2439
|
-
|
2439
|
+
Ie = k.createScriptURL(Ie);
|
2440
2440
|
break;
|
2441
2441
|
}
|
2442
2442
|
}
|
2443
2443
|
try {
|
2444
|
-
|
2444
|
+
Oe ? f.setAttributeNS(Oe, be, Ie) : f.setAttribute(be, Ie), rn(f) ? Ge(f) : ps(e.removed);
|
2445
2445
|
} catch (Jn) {
|
2446
2446
|
}
|
2447
2447
|
}
|
2448
2448
|
}
|
2449
|
-
|
2450
|
-
}, bi = function
|
2449
|
+
Ke(R.afterSanitizeAttributes, f, null);
|
2450
|
+
}, bi = function P(f) {
|
2451
2451
|
let E = null;
|
2452
2452
|
const M = qn(f);
|
2453
|
-
for (
|
2454
|
-
|
2455
|
-
|
2453
|
+
for (Ke(R.beforeSanitizeShadowDOM, f, null); E = M.nextNode(); )
|
2454
|
+
Ke(R.uponSanitizeShadowNode, E, null), Yn(E), Vn(E), E.content instanceof o && P(E.content);
|
2455
|
+
Ke(R.afterSanitizeShadowDOM, f, null);
|
2456
2456
|
};
|
2457
|
-
return e.sanitize = function(
|
2458
|
-
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, E = null, M = null, ae = null,
|
2459
|
-
if (sn = !
|
2460
|
-
if (typeof
|
2461
|
-
if (
|
2462
|
-
throw
|
2457
|
+
return e.sanitize = function(P) {
|
2458
|
+
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, E = null, M = null, ae = null, Ee = null;
|
2459
|
+
if (sn = !P, sn && (P = "<!-->"), typeof P != "string" && !Gn(P))
|
2460
|
+
if (typeof P.toString == "function") {
|
2461
|
+
if (P = P.toString(), typeof P != "string")
|
2462
|
+
throw At("dirty is not a string, aborting");
|
2463
2463
|
} else
|
2464
|
-
throw
|
2464
|
+
throw At("toString is not a function");
|
2465
2465
|
if (!e.isSupported)
|
2466
|
-
return
|
2467
|
-
if (
|
2468
|
-
if (
|
2469
|
-
const
|
2470
|
-
if (!
|
2471
|
-
throw
|
2466
|
+
return P;
|
2467
|
+
if (ze || ln(f), e.removed = [], typeof P == "string" && (nt = !1), nt) {
|
2468
|
+
if (P.nodeName) {
|
2469
|
+
const Ye = we(P.nodeName);
|
2470
|
+
if (!re[Ye] || Me[Ye])
|
2471
|
+
throw At("root node is forbidden and cannot be sanitized in-place");
|
2472
2472
|
}
|
2473
|
-
} else if (
|
2474
|
-
E = Wn("<!---->"), M = E.ownerDocument.importNode(
|
2473
|
+
} else if (P instanceof a)
|
2474
|
+
E = Wn("<!---->"), M = E.ownerDocument.importNode(P, !0), M.nodeType === It.element && M.nodeName === "BODY" || M.nodeName === "HTML" ? E = M : E.appendChild(M);
|
2475
2475
|
else {
|
2476
|
-
if (
|
2477
|
-
|
2478
|
-
return
|
2479
|
-
if (E = Wn(
|
2480
|
-
return
|
2476
|
+
if (!et && !B && !de && // eslint-disable-next-line unicorn/prefer-includes
|
2477
|
+
P.indexOf("<") === -1)
|
2478
|
+
return k && ct ? k.createHTML(P) : P;
|
2479
|
+
if (E = Wn(P), !E)
|
2480
|
+
return et ? null : ct ? T : "";
|
2481
2481
|
}
|
2482
|
-
E &&
|
2483
|
-
const
|
2484
|
-
for (; ae =
|
2482
|
+
E && Ne && Ge(E.firstChild);
|
2483
|
+
const be = qn(nt ? P : E);
|
2484
|
+
for (; ae = be.nextNode(); )
|
2485
2485
|
Yn(ae), Vn(ae), ae.content instanceof o && bi(ae.content);
|
2486
|
-
if (
|
2487
|
-
return
|
2488
|
-
if (
|
2489
|
-
if (
|
2490
|
-
for (
|
2491
|
-
|
2486
|
+
if (nt)
|
2487
|
+
return P;
|
2488
|
+
if (et) {
|
2489
|
+
if (at)
|
2490
|
+
for (Ee = C.call(E.ownerDocument); E.firstChild; )
|
2491
|
+
Ee.appendChild(E.firstChild);
|
2492
2492
|
else
|
2493
|
-
|
2494
|
-
return (ie.shadowroot || ie.shadowrootmode) && (
|
2493
|
+
Ee = E;
|
2494
|
+
return (ie.shadowroot || ie.shadowrootmode) && (Ee = F.call(n, Ee, !0)), Ee;
|
2495
2495
|
}
|
2496
|
-
let
|
2497
|
-
return
|
2498
|
-
` +
|
2499
|
-
|
2500
|
-
}),
|
2496
|
+
let Oe = de ? E.outerHTML : E.innerHTML;
|
2497
|
+
return de && re["!doctype"] && E.ownerDocument && E.ownerDocument.doctype && E.ownerDocument.doctype.name && Ce(fi, E.ownerDocument.doctype.name) && (Oe = "<!DOCTYPE " + E.ownerDocument.doctype.name + `>
|
2498
|
+
` + Oe), B && Wt([j, Z, X], (Ye) => {
|
2499
|
+
Oe = St(Oe, Ye, " ");
|
2500
|
+
}), k && ct ? k.createHTML(Oe) : Oe;
|
2501
2501
|
}, e.setConfig = function() {
|
2502
|
-
let
|
2503
|
-
ln(
|
2502
|
+
let P = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2503
|
+
ln(P), ze = !0;
|
2504
2504
|
}, e.clearConfig = function() {
|
2505
|
-
|
2506
|
-
}, e.isValidAttribute = function(
|
2507
|
-
|
2508
|
-
const M =
|
2505
|
+
ft = null, ze = !1;
|
2506
|
+
}, e.isValidAttribute = function(P, f, E) {
|
2507
|
+
ft || ln({});
|
2508
|
+
const M = we(P), ae = we(f);
|
2509
2509
|
return Zn(M, ae, E);
|
2510
|
-
}, e.addHook = function(
|
2511
|
-
typeof f == "function" &&
|
2512
|
-
}, e.removeHook = function(
|
2513
|
-
return ps(
|
2514
|
-
}, e.removeHooks = function(
|
2515
|
-
|
2510
|
+
}, e.addHook = function(P, f) {
|
2511
|
+
typeof f == "function" && Et(R[P], f);
|
2512
|
+
}, e.removeHook = function(P) {
|
2513
|
+
return ps(R[P]);
|
2514
|
+
}, e.removeHooks = function(P) {
|
2515
|
+
R[P] = [];
|
2516
2516
|
}, e.removeAllHooks = function() {
|
2517
|
-
|
2517
|
+
R = bs();
|
2518
2518
|
}, e;
|
2519
2519
|
}
|
2520
2520
|
var ys = hi();
|
@@ -2524,7 +2524,7 @@ function Ts(s) {
|
|
2524
2524
|
const t = `; ${document.cookie}`.split(`; ${s}=`);
|
2525
2525
|
return t.length === 2 && ((n = t.pop()) == null ? void 0 : n.split(";").shift()) || null;
|
2526
2526
|
}
|
2527
|
-
const
|
2527
|
+
const ke = () => {
|
2528
2528
|
if (typeof window == "undefined") return null;
|
2529
2529
|
const s = Ts("access_token");
|
2530
2530
|
if (s) return s;
|
@@ -2551,17 +2551,17 @@ function Es(s) {
|
|
2551
2551
|
), n;
|
2552
2552
|
return {
|
2553
2553
|
c() {
|
2554
|
-
e = x("div"), n =
|
2554
|
+
e = x("div"), n = Se(t), r(e, "class", "sy-assistant-button-tooltip svelte-1g6fj9a"), N(
|
2555
2555
|
e,
|
2556
2556
|
"left",
|
2557
2557
|
/*buttonTooltip*/
|
2558
2558
|
s[9].x + "px"
|
2559
|
-
),
|
2559
|
+
), N(
|
2560
2560
|
e,
|
2561
2561
|
"top",
|
2562
2562
|
/*buttonTooltip*/
|
2563
2563
|
s[9].y + "px"
|
2564
|
-
),
|
2564
|
+
), N(
|
2565
2565
|
e,
|
2566
2566
|
"z-index",
|
2567
2567
|
/*zIndex*/
|
@@ -2569,25 +2569,25 @@ function Es(s) {
|
|
2569
2569
|
);
|
2570
2570
|
},
|
2571
2571
|
m(i, o) {
|
2572
|
-
|
2572
|
+
G(i, e, o), m(e, n);
|
2573
2573
|
},
|
2574
2574
|
p(i, o) {
|
2575
2575
|
o & /*buttonTooltip*/
|
2576
2576
|
512 && t !== (t = /*buttonTooltip*/
|
2577
|
-
i[9].text + "") &&
|
2578
|
-
512 &&
|
2577
|
+
i[9].text + "") && He(n, t), o & /*buttonTooltip*/
|
2578
|
+
512 && N(
|
2579
2579
|
e,
|
2580
2580
|
"left",
|
2581
2581
|
/*buttonTooltip*/
|
2582
2582
|
i[9].x + "px"
|
2583
2583
|
), o & /*buttonTooltip*/
|
2584
|
-
512 &&
|
2584
|
+
512 && N(
|
2585
2585
|
e,
|
2586
2586
|
"top",
|
2587
2587
|
/*buttonTooltip*/
|
2588
2588
|
i[9].y + "px"
|
2589
2589
|
), o & /*zIndex*/
|
2590
|
-
8 &&
|
2590
|
+
8 && N(
|
2591
2591
|
e,
|
2592
2592
|
"z-index",
|
2593
2593
|
/*zIndex*/
|
@@ -2595,12 +2595,12 @@ function Es(s) {
|
|
2595
2595
|
);
|
2596
2596
|
},
|
2597
2597
|
d(i) {
|
2598
|
-
i &&
|
2598
|
+
i && W(e);
|
2599
2599
|
}
|
2600
2600
|
};
|
2601
2601
|
}
|
2602
2602
|
function Jo(s) {
|
2603
|
-
let e = [], t = /* @__PURE__ */ new Map(), n, i, o =
|
2603
|
+
let e = [], t = /* @__PURE__ */ new Map(), n, i, o = _t(
|
2604
2604
|
/*sessions*/
|
2605
2605
|
s[0]
|
2606
2606
|
);
|
@@ -2620,23 +2620,23 @@ function Jo(s) {
|
|
2620
2620
|
c() {
|
2621
2621
|
for (let c = 0; c < e.length; c += 1)
|
2622
2622
|
e[c].c();
|
2623
|
-
n =
|
2623
|
+
n = q(), a && a.c(), i = Kt();
|
2624
2624
|
},
|
2625
2625
|
m(c, u) {
|
2626
2626
|
for (let h = 0; h < e.length; h += 1)
|
2627
2627
|
e[h] && e[h].m(c, u);
|
2628
|
-
|
2628
|
+
G(c, n, u), a && a.m(c, u), G(c, i, u);
|
2629
2629
|
},
|
2630
2630
|
p(c, u) {
|
2631
2631
|
u & /*sessions, deletingSessionId, showDeleteConfirm, onSelect, formatDate*/
|
2632
|
-
8261 && (o =
|
2632
|
+
8261 && (o = _t(
|
2633
2633
|
/*sessions*/
|
2634
2634
|
c[0]
|
2635
2635
|
), e = Qs(e, u, l, 1, c, o, t, n.parentNode, Vs, Ss, n, vs)), /*isLoading*/
|
2636
2636
|
c[5] ? a || (a = As(), a.c(), a.m(i.parentNode, i)) : a && (a.d(1), a = null);
|
2637
2637
|
},
|
2638
2638
|
d(c) {
|
2639
|
-
c && (
|
2639
|
+
c && (W(n), W(i));
|
2640
2640
|
for (let u = 0; u < e.length; u += 1)
|
2641
2641
|
e[u].d(c);
|
2642
2642
|
a && a.d(c);
|
@@ -2653,10 +2653,10 @@ function Ko(s) {
|
|
2653
2653
|
), n;
|
2654
2654
|
return {
|
2655
2655
|
c() {
|
2656
|
-
e = x("div"), n =
|
2656
|
+
e = x("div"), n = Se(t), r(e, "class", "sy-session-empty svelte-1g6fj9a");
|
2657
2657
|
},
|
2658
2658
|
m(i, o) {
|
2659
|
-
|
2659
|
+
G(i, e, o), m(e, n);
|
2660
2660
|
},
|
2661
2661
|
p(i, o) {
|
2662
2662
|
o & /*searchQuery, isLoading*/
|
@@ -2664,10 +2664,10 @@ function Ko(s) {
|
|
2664
2664
|
i[4] ? "未找到相关会话" : (
|
2665
2665
|
/*isLoading*/
|
2666
2666
|
i[5] ? "加载中..." : "暂无历史会话"
|
2667
|
-
)) &&
|
2667
|
+
)) && He(n, t);
|
2668
2668
|
},
|
2669
2669
|
d(i) {
|
2670
|
-
i &&
|
2670
|
+
i && W(e);
|
2671
2671
|
}
|
2672
2672
|
};
|
2673
2673
|
}
|
@@ -2675,10 +2675,10 @@ function Ss(s, e) {
|
|
2675
2675
|
let t, n, i, o, l = (
|
2676
2676
|
/*session*/
|
2677
2677
|
e[24].title + ""
|
2678
|
-
), a, c, u, h =
|
2678
|
+
), a, c, u, h = Is(
|
2679
2679
|
/*session*/
|
2680
2680
|
e[24].timestamp
|
2681
|
-
) + "", p, d, g,
|
2681
|
+
) + "", p, d, g, w, S, L, z, v, _, k, T;
|
2682
2682
|
function A() {
|
2683
2683
|
return (
|
2684
2684
|
/*click_handler*/
|
@@ -2688,7 +2688,7 @@ function Ss(s, e) {
|
|
2688
2688
|
)
|
2689
2689
|
);
|
2690
2690
|
}
|
2691
|
-
function
|
2691
|
+
function b(...C) {
|
2692
2692
|
return (
|
2693
2693
|
/*click_handler_1*/
|
2694
2694
|
e[18](
|
@@ -2702,36 +2702,36 @@ function Ss(s, e) {
|
|
2702
2702
|
key: s,
|
2703
2703
|
first: null,
|
2704
2704
|
c() {
|
2705
|
-
t = x("div"), n = x("button"), i = x("div"), o = x("div"), a =
|
2705
|
+
t = x("div"), n = x("button"), i = x("div"), o = x("div"), a = Se(l), c = q(), u = x("div"), p = Se(h), d = q(), g = x("button"), w = V("svg"), S = V("path"), L = V("path"), z = V("path"), r(o, "class", "sy-session-title svelte-1g6fj9a"), r(u, "class", "sy-session-time svelte-1g6fj9a"), r(i, "class", "sy-session-info svelte-1g6fj9a"), r(n, "class", "sy-session-select svelte-1g6fj9a"), r(S, "d", "M3 6h18"), r(L, "d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"), r(z, "d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"), r(w, "xmlns", "http://www.w3.org/2000/svg"), r(w, "width", "16"), r(w, "height", "16"), r(w, "viewBox", "0 0 24 24"), r(w, "fill", "none"), r(w, "stroke", "currentColor"), r(w, "stroke-width", "2"), r(w, "stroke-linecap", "round"), r(w, "stroke-linejoin", "round"), r(g, "class", "sy-session-delete svelte-1g6fj9a"), g.disabled = v = /*deletingSessionId*/
|
2706
2706
|
e[6] === /*session*/
|
2707
2707
|
e[24].sessionId, r(g, "aria-label", "删除会话"), r(t, "class", "sy-session-item svelte-1g6fj9a"), r(t, "data-session-id", _ = /*session*/
|
2708
|
-
e[24].sessionId),
|
2708
|
+
e[24].sessionId), Q(
|
2709
2709
|
t,
|
2710
2710
|
"deleting",
|
2711
2711
|
/*session*/
|
2712
2712
|
e[24].deleting
|
2713
2713
|
), this.first = t;
|
2714
2714
|
},
|
2715
|
-
m(C,
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
2719
|
-
],
|
2715
|
+
m(C, I) {
|
2716
|
+
G(C, t, I), m(t, n), m(n, i), m(i, o), m(o, a), m(i, c), m(i, u), m(u, p), m(t, d), m(t, g), m(g, w), m(w, S), m(w, L), m(w, z), k || (T = [
|
2717
|
+
U(n, "click", A),
|
2718
|
+
U(g, "click", b)
|
2719
|
+
], k = !0);
|
2720
2720
|
},
|
2721
|
-
p(C,
|
2722
|
-
e = C,
|
2721
|
+
p(C, I) {
|
2722
|
+
e = C, I & /*sessions*/
|
2723
2723
|
1 && l !== (l = /*session*/
|
2724
|
-
e[24].title + "") &&
|
2725
|
-
1 && h !== (h =
|
2724
|
+
e[24].title + "") && He(a, l), I & /*sessions*/
|
2725
|
+
1 && h !== (h = Is(
|
2726
2726
|
/*session*/
|
2727
2727
|
e[24].timestamp
|
2728
|
-
) + "") &&
|
2728
|
+
) + "") && He(p, h), I & /*deletingSessionId, sessions*/
|
2729
2729
|
65 && v !== (v = /*deletingSessionId*/
|
2730
2730
|
e[6] === /*session*/
|
2731
|
-
e[24].sessionId) && (g.disabled = v),
|
2731
|
+
e[24].sessionId) && (g.disabled = v), I & /*sessions*/
|
2732
2732
|
1 && _ !== (_ = /*session*/
|
2733
|
-
e[24].sessionId) && r(t, "data-session-id", _),
|
2734
|
-
1 &&
|
2733
|
+
e[24].sessionId) && r(t, "data-session-id", _), I & /*sessions*/
|
2734
|
+
1 && Q(
|
2735
2735
|
t,
|
2736
2736
|
"deleting",
|
2737
2737
|
/*session*/
|
@@ -2739,7 +2739,7 @@ function Ss(s, e) {
|
|
2739
2739
|
);
|
2740
2740
|
},
|
2741
2741
|
d(C) {
|
2742
|
-
C &&
|
2742
|
+
C && W(t), k = !1, Ae(T);
|
2743
2743
|
}
|
2744
2744
|
};
|
2745
2745
|
}
|
@@ -2750,10 +2750,10 @@ function As(s) {
|
|
2750
2750
|
e = x("div"), e.innerHTML = '<span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span>', r(e, "class", "sy-session-loading svelte-1g6fj9a");
|
2751
2751
|
},
|
2752
2752
|
m(t, n) {
|
2753
|
-
|
2753
|
+
G(t, e, n);
|
2754
2754
|
},
|
2755
2755
|
d(t) {
|
2756
|
-
t &&
|
2756
|
+
t && W(e);
|
2757
2757
|
}
|
2758
2758
|
};
|
2759
2759
|
}
|
@@ -2761,17 +2761,17 @@ function xs(s) {
|
|
2761
2761
|
let e, t, n, i, o, l, a, c, u;
|
2762
2762
|
return {
|
2763
2763
|
c() {
|
2764
|
-
e = x("div"), t = x("div"), t.textContent = "确认删除此会话?", n =
|
2764
|
+
e = x("div"), t = x("div"), t.textContent = "确认删除此会话?", n = q(), i = x("div"), o = x("button"), o.textContent = "取消", l = q(), a = x("button"), a.textContent = "删除", r(t, "class", "sy-session-confirm-content svelte-1g6fj9a"), r(o, "class", "sy-session-confirm-cancel svelte-1g6fj9a"), r(a, "class", "sy-session-confirm-delete svelte-1g6fj9a"), r(i, "class", "sy-session-confirm-actions svelte-1g6fj9a"), r(e, "class", "sy-session-confirm-popup svelte-1g6fj9a"), N(
|
2765
2765
|
e,
|
2766
2766
|
"left",
|
2767
2767
|
/*confirmPosition*/
|
2768
2768
|
s[8].x + "px"
|
2769
|
-
),
|
2769
|
+
), N(
|
2770
2770
|
e,
|
2771
2771
|
"top",
|
2772
2772
|
/*confirmPosition*/
|
2773
2773
|
s[8].y + "px"
|
2774
|
-
),
|
2774
|
+
), N(
|
2775
2775
|
e,
|
2776
2776
|
"z-index",
|
2777
2777
|
/*zIndex*/
|
@@ -2779,14 +2779,14 @@ function xs(s) {
|
|
2779
2779
|
);
|
2780
2780
|
},
|
2781
2781
|
m(h, p) {
|
2782
|
-
|
2783
|
-
|
2782
|
+
G(h, e, p), m(e, t), m(e, n), m(e, i), m(i, o), m(i, l), m(i, a), c || (u = [
|
2783
|
+
U(
|
2784
2784
|
o,
|
2785
2785
|
"click",
|
2786
2786
|
/*click_handler_2*/
|
2787
2787
|
s[19]
|
2788
2788
|
),
|
2789
|
-
|
2789
|
+
U(
|
2790
2790
|
a,
|
2791
2791
|
"click",
|
2792
2792
|
/*handleConfirmDelete*/
|
@@ -2796,19 +2796,19 @@ function xs(s) {
|
|
2796
2796
|
},
|
2797
2797
|
p(h, p) {
|
2798
2798
|
p & /*confirmPosition*/
|
2799
|
-
256 &&
|
2799
|
+
256 && N(
|
2800
2800
|
e,
|
2801
2801
|
"left",
|
2802
2802
|
/*confirmPosition*/
|
2803
2803
|
h[8].x + "px"
|
2804
2804
|
), p & /*confirmPosition*/
|
2805
|
-
256 &&
|
2805
|
+
256 && N(
|
2806
2806
|
e,
|
2807
2807
|
"top",
|
2808
2808
|
/*confirmPosition*/
|
2809
2809
|
h[8].y + "px"
|
2810
2810
|
), p & /*zIndex*/
|
2811
|
-
8 &&
|
2811
|
+
8 && N(
|
2812
2812
|
e,
|
2813
2813
|
"z-index",
|
2814
2814
|
/*zIndex*/
|
@@ -2816,65 +2816,65 @@ function xs(s) {
|
|
2816
2816
|
);
|
2817
2817
|
},
|
2818
2818
|
d(h) {
|
2819
|
-
h &&
|
2819
|
+
h && W(e), c = !1, Ae(u);
|
2820
2820
|
}
|
2821
2821
|
};
|
2822
2822
|
}
|
2823
2823
|
function $o(s) {
|
2824
|
-
let e, t, n, i, o, l, a, c, u, h, p, d, g,
|
2824
|
+
let e, t, n, i, o, l, a, c, u, h, p, d, g, w, S, L, z, v, _, k = (
|
2825
2825
|
/*buttonTooltip*/
|
2826
2826
|
s[9] && Es(s)
|
2827
2827
|
);
|
2828
|
-
function
|
2828
|
+
function T(I, F) {
|
2829
2829
|
return (
|
2830
2830
|
/*sessions*/
|
2831
|
-
|
2831
|
+
I[0].length === 0 ? Ko : Jo
|
2832
2832
|
);
|
2833
2833
|
}
|
2834
|
-
let A =
|
2834
|
+
let A = T(s), b = A(s), C = (
|
2835
2835
|
/*confirmDeleteId*/
|
2836
2836
|
s[7] && xs(s)
|
2837
2837
|
);
|
2838
2838
|
return {
|
2839
2839
|
c() {
|
2840
|
-
e = x("div"), t = x("div"), n = x("h2"), n.textContent = "历史会话", i =
|
2840
|
+
e = x("div"), t = x("div"), n = x("h2"), n.textContent = "历史会话", i = q(), o = x("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', l = q(), a = x("div"), c = x("input"), u = q(), h = V("svg"), p = V("circle"), d = V("line"), g = q(), k && k.c(), w = q(), S = x("div"), b.c(), L = q(), C && C.c(), z = Kt(), r(n, "class", "svelte-1g6fj9a"), r(o, "class", "sy-session-close svelte-1g6fj9a"), r(o, "aria-label", "关闭历史会话"), r(t, "class", "sy-session-header svelte-1g6fj9a"), r(c, "type", "text"), r(c, "class", "sy-session-search-input svelte-1g6fj9a"), r(c, "placeholder", "搜索历史会话..."), r(p, "cx", "11"), r(p, "cy", "11"), r(p, "r", "8"), r(d, "x1", "21"), r(d, "y1", "21"), r(d, "x2", "16.65"), r(d, "y2", "16.65"), r(h, "class", "sy-session-search-icon svelte-1g6fj9a"), r(h, "xmlns", "http://www.w3.org/2000/svg"), r(h, "width", "16"), r(h, "height", "16"), r(h, "viewBox", "0 0 24 24"), r(h, "fill", "none"), r(h, "stroke", "currentColor"), r(h, "stroke-width", "2"), r(h, "stroke-linecap", "round"), r(h, "stroke-linejoin", "round"), r(a, "class", "sy-session-search svelte-1g6fj9a"), r(S, "class", "sy-session-list svelte-1g6fj9a"), r(e, "class", "sy-session-history svelte-1g6fj9a"), N(
|
2841
2841
|
e,
|
2842
2842
|
"z-index",
|
2843
2843
|
/*zIndex*/
|
2844
2844
|
s[3] + 2
|
2845
2845
|
);
|
2846
2846
|
},
|
2847
|
-
m(
|
2848
|
-
|
2847
|
+
m(I, F) {
|
2848
|
+
G(I, e, F), m(e, t), m(t, n), m(t, i), m(t, o), m(e, l), m(e, a), m(a, c), wt(
|
2849
2849
|
c,
|
2850
2850
|
/*searchQuery*/
|
2851
2851
|
s[4]
|
2852
|
-
), m(a, u), m(a, h), m(h, p), m(h, d), m(e, g),
|
2853
|
-
|
2852
|
+
), m(a, u), m(a, h), m(h, p), m(h, d), m(e, g), k && k.m(e, null), m(e, w), m(e, S), b.m(S, null), G(I, L, F), C && C.m(I, F), G(I, z, F), v || (_ = [
|
2853
|
+
U(o, "click", function() {
|
2854
2854
|
An(
|
2855
2855
|
/*onClose*/
|
2856
2856
|
s[1]
|
2857
2857
|
) && s[1].apply(this, arguments);
|
2858
2858
|
}),
|
2859
|
-
|
2859
|
+
U(
|
2860
2860
|
o,
|
2861
2861
|
"mouseenter",
|
2862
2862
|
/*mouseenter_handler*/
|
2863
2863
|
s[15]
|
2864
2864
|
),
|
2865
|
-
|
2865
|
+
U(
|
2866
2866
|
o,
|
2867
2867
|
"mouseleave",
|
2868
2868
|
/*hideButtonTooltip*/
|
2869
2869
|
s[12]
|
2870
2870
|
),
|
2871
|
-
|
2871
|
+
U(
|
2872
2872
|
c,
|
2873
2873
|
"input",
|
2874
2874
|
/*input_input_handler*/
|
2875
2875
|
s[16]
|
2876
2876
|
),
|
2877
|
-
|
2877
|
+
U(
|
2878
2878
|
S,
|
2879
2879
|
"scroll",
|
2880
2880
|
/*handleScroll*/
|
@@ -2882,118 +2882,118 @@ function $o(s) {
|
|
2882
2882
|
)
|
2883
2883
|
], v = !0);
|
2884
2884
|
},
|
2885
|
-
p(
|
2886
|
-
s =
|
2885
|
+
p(I, [F]) {
|
2886
|
+
s = I, F & /*searchQuery*/
|
2887
2887
|
16 && c.value !== /*searchQuery*/
|
2888
|
-
s[4] &&
|
2888
|
+
s[4] && wt(
|
2889
2889
|
c,
|
2890
2890
|
/*searchQuery*/
|
2891
2891
|
s[4]
|
2892
2892
|
), /*buttonTooltip*/
|
2893
|
-
s[9] ?
|
2894
|
-
8 &&
|
2893
|
+
s[9] ? k ? k.p(s, F) : (k = Es(s), k.c(), k.m(e, w)) : k && (k.d(1), k = null), A === (A = T(s)) && b ? b.p(s, F) : (b.d(1), b = A(s), b && (b.c(), b.m(S, null))), F & /*zIndex*/
|
2894
|
+
8 && N(
|
2895
2895
|
e,
|
2896
2896
|
"z-index",
|
2897
2897
|
/*zIndex*/
|
2898
2898
|
s[3] + 2
|
2899
2899
|
), /*confirmDeleteId*/
|
2900
|
-
s[7] ? C ? C.p(s,
|
2900
|
+
s[7] ? C ? C.p(s, F) : (C = xs(s), C.c(), C.m(z.parentNode, z)) : C && (C.d(1), C = null);
|
2901
2901
|
},
|
2902
|
-
i:
|
2903
|
-
o:
|
2904
|
-
d(
|
2905
|
-
|
2902
|
+
i: De,
|
2903
|
+
o: De,
|
2904
|
+
d(I) {
|
2905
|
+
I && (W(e), W(L), W(z)), k && k.d(), b.d(), C && C.d(I), v = !1, Ae(_);
|
2906
2906
|
}
|
2907
2907
|
};
|
2908
2908
|
}
|
2909
2909
|
const gn = 10;
|
2910
|
-
function
|
2910
|
+
function Is(s) {
|
2911
2911
|
return new Date(s).toLocaleString();
|
2912
2912
|
}
|
2913
2913
|
function el(s, e, t) {
|
2914
2914
|
let { sessions: n = [] } = e, { onClose: i } = e, { onSelect: o } = e, { zIndex: l } = e, a = !1, c = !0, u = 0, h = "", p = null, d = null, g = { x: 0, y: 0 };
|
2915
|
-
function
|
2916
|
-
return
|
2915
|
+
function w() {
|
2916
|
+
return Re(this, null, function* () {
|
2917
2917
|
if (!(a || !c)) {
|
2918
2918
|
t(5, a = !0);
|
2919
2919
|
try {
|
2920
|
-
const
|
2920
|
+
const R = yield fetch("/aiops/aigc/chat/record/session/list/query", {
|
2921
2921
|
method: "POST",
|
2922
2922
|
headers: {
|
2923
2923
|
"Content-Type": "application/json",
|
2924
|
-
"Auth-Token": `${
|
2925
|
-
Authorization: `bearer ${
|
2924
|
+
"Auth-Token": `${ke()}`,
|
2925
|
+
Authorization: `bearer ${ke()}`
|
2926
2926
|
},
|
2927
2927
|
body: JSON.stringify({ start: u, length: gn, keyword: h })
|
2928
2928
|
});
|
2929
|
-
if (!
|
2929
|
+
if (!R.ok)
|
2930
2930
|
throw new Error("Failed to load sessions");
|
2931
|
-
const
|
2932
|
-
if (
|
2933
|
-
const Z =
|
2934
|
-
sessionId:
|
2935
|
-
title:
|
2936
|
-
timestamp: new Date(
|
2931
|
+
const j = yield R.json();
|
2932
|
+
if (j.code === 0) {
|
2933
|
+
const Z = j.data.sessionList.map((X) => ({
|
2934
|
+
sessionId: X.sessionId,
|
2935
|
+
title: X.name,
|
2936
|
+
timestamp: new Date(X.createDate).getTime()
|
2937
2937
|
}));
|
2938
2938
|
t(0, n = [...n, ...Z]), u += gn, c = Z.length === gn;
|
2939
2939
|
}
|
2940
|
-
} catch (
|
2941
|
-
console.error("Failed to load sessions:",
|
2940
|
+
} catch (R) {
|
2941
|
+
console.error("Failed to load sessions:", R);
|
2942
2942
|
} finally {
|
2943
2943
|
t(5, a = !1);
|
2944
2944
|
}
|
2945
2945
|
}
|
2946
2946
|
});
|
2947
2947
|
}
|
2948
|
-
function S(
|
2949
|
-
const
|
2950
|
-
|
2948
|
+
function S(R) {
|
2949
|
+
const j = R.target, { scrollTop: Z, scrollHeight: X, clientHeight: oe } = j;
|
2950
|
+
X - Z - oe < 50 && w();
|
2951
2951
|
}
|
2952
2952
|
Zs(() => {
|
2953
|
-
|
2953
|
+
w();
|
2954
2954
|
});
|
2955
2955
|
let L = null;
|
2956
|
-
function
|
2957
|
-
const
|
2956
|
+
function z(R, j) {
|
2957
|
+
const X = R.currentTarget.getBoundingClientRect();
|
2958
2958
|
t(9, L = {
|
2959
|
-
text:
|
2960
|
-
x:
|
2961
|
-
y:
|
2959
|
+
text: j,
|
2960
|
+
x: X.left + X.width / 2,
|
2961
|
+
y: X.bottom + 8
|
2962
2962
|
});
|
2963
2963
|
}
|
2964
2964
|
function v() {
|
2965
2965
|
t(9, L = null);
|
2966
2966
|
}
|
2967
|
-
function _(
|
2968
|
-
const
|
2967
|
+
function _(R, j) {
|
2968
|
+
const X = R.currentTarget.getBoundingClientRect();
|
2969
2969
|
t(8, g = {
|
2970
|
-
x:
|
2970
|
+
x: X.left - 16,
|
2971
2971
|
// 靠近删除按钮
|
2972
|
-
y:
|
2973
|
-
}), t(7, d =
|
2972
|
+
y: X.top + X.height / 2
|
2973
|
+
}), t(7, d = j);
|
2974
2974
|
}
|
2975
|
-
function
|
2976
|
-
return
|
2977
|
-
if (
|
2975
|
+
function k(R) {
|
2976
|
+
return Re(this, null, function* () {
|
2977
|
+
if (R && !p)
|
2978
2978
|
try {
|
2979
|
-
t(6, p =
|
2980
|
-
const
|
2981
|
-
|
2979
|
+
t(6, p = R), t(7, d = null);
|
2980
|
+
const j = document.querySelector(`[data-session-id="${R}"]`);
|
2981
|
+
j && j.classList.add("deleting"), yield new Promise((oe) => setTimeout(oe, 300));
|
2982
2982
|
const Z = yield fetch("/aiops/aigc/chat/record/session/delete", {
|
2983
2983
|
method: "POST",
|
2984
2984
|
headers: {
|
2985
2985
|
"Content-Type": "application/json",
|
2986
|
-
"Auth-Token": `${
|
2987
|
-
Authorization: `bearer ${
|
2986
|
+
"Auth-Token": `${ke()}`,
|
2987
|
+
Authorization: `bearer ${ke()}`
|
2988
2988
|
},
|
2989
|
-
body: JSON.stringify({ sessionId:
|
2989
|
+
body: JSON.stringify({ sessionId: R })
|
2990
2990
|
});
|
2991
2991
|
if (!Z.ok)
|
2992
2992
|
throw new Error("Delete request failed");
|
2993
|
-
const
|
2994
|
-
if (
|
2995
|
-
t(0, n = n.map((oe) =>
|
2996
|
-
deleting: oe.sessionId ===
|
2993
|
+
const X = yield Z.json();
|
2994
|
+
if (X.code === 0 && X.data.respCode === 0)
|
2995
|
+
t(0, n = n.map((oe) => ye(ee({}, oe), {
|
2996
|
+
deleting: oe.sessionId === R
|
2997
2997
|
}))), setTimeout(
|
2998
2998
|
() => {
|
2999
2999
|
t(0, n = n.filter((oe) => !oe.deleting));
|
@@ -3001,29 +3001,29 @@ function el(s, e, t) {
|
|
3001
3001
|
300
|
3002
3002
|
);
|
3003
3003
|
else
|
3004
|
-
throw new Error("Delete failed: " +
|
3005
|
-
} catch (
|
3006
|
-
console.error("Failed to delete session:",
|
3007
|
-
const Z = document.querySelector(`[data-session-id="${
|
3004
|
+
throw new Error("Delete failed: " + X.message);
|
3005
|
+
} catch (j) {
|
3006
|
+
console.error("Failed to delete session:", j);
|
3007
|
+
const Z = document.querySelector(`[data-session-id="${R}"]`);
|
3008
3008
|
Z && Z.classList.remove("deleting");
|
3009
3009
|
} finally {
|
3010
3010
|
t(6, p = null);
|
3011
3011
|
}
|
3012
3012
|
});
|
3013
3013
|
}
|
3014
|
-
function y() {
|
3015
|
-
d && w(d);
|
3016
|
-
}
|
3017
|
-
const A = (I) => O(I, "关闭历史会话");
|
3018
3014
|
function T() {
|
3015
|
+
d && k(d);
|
3016
|
+
}
|
3017
|
+
const A = (R) => z(R, "关闭历史会话");
|
3018
|
+
function b() {
|
3019
3019
|
h = this.value, t(4, h);
|
3020
3020
|
}
|
3021
|
-
const C = (
|
3022
|
-
return s.$$set = (
|
3023
|
-
"sessions" in
|
3021
|
+
const C = (R) => o(R.sessionId), I = (R, j) => _(j, R.sessionId), F = () => t(7, d = null);
|
3022
|
+
return s.$$set = (R) => {
|
3023
|
+
"sessions" in R && t(0, n = R.sessions), "onClose" in R && t(1, i = R.onClose), "onSelect" in R && t(2, o = R.onSelect), "zIndex" in R && t(3, l = R.zIndex);
|
3024
3024
|
}, s.$$.update = () => {
|
3025
3025
|
s.$$.dirty & /*searchQuery*/
|
3026
|
-
16 && h !== void 0 && (t(0, n = []), u = 0, c = !0,
|
3026
|
+
16 && h !== void 0 && (t(0, n = []), u = 0, c = !0, w());
|
3027
3027
|
}, [
|
3028
3028
|
n,
|
3029
3029
|
i,
|
@@ -3036,15 +3036,15 @@ function el(s, e, t) {
|
|
3036
3036
|
g,
|
3037
3037
|
L,
|
3038
3038
|
S,
|
3039
|
-
|
3039
|
+
z,
|
3040
3040
|
v,
|
3041
3041
|
_,
|
3042
|
-
y,
|
3043
|
-
A,
|
3044
3042
|
T,
|
3043
|
+
A,
|
3044
|
+
b,
|
3045
3045
|
C,
|
3046
|
-
|
3047
|
-
|
3046
|
+
I,
|
3047
|
+
F
|
3048
3048
|
];
|
3049
3049
|
}
|
3050
3050
|
class pi extends Mn {
|
@@ -3057,7 +3057,7 @@ class pi extends Mn {
|
|
3057
3057
|
});
|
3058
3058
|
}
|
3059
3059
|
}
|
3060
|
-
function
|
3060
|
+
function Rs(s, e, t) {
|
3061
3061
|
const n = s.slice();
|
3062
3062
|
return n[60] = e[t], n[61] = e, n[62] = t, n;
|
3063
3063
|
}
|
@@ -3066,7 +3066,7 @@ function Cs(s, e, t) {
|
|
3066
3066
|
return n[63] = e[t], n[65] = t, n;
|
3067
3067
|
}
|
3068
3068
|
function tl(s) {
|
3069
|
-
let e, t = [], n = /* @__PURE__ */ new Map(), i =
|
3069
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), i = _t(
|
3070
3070
|
/*messages*/
|
3071
3071
|
s[3]
|
3072
3072
|
);
|
@@ -3075,7 +3075,7 @@ function tl(s) {
|
|
3075
3075
|
l[60].id
|
3076
3076
|
);
|
3077
3077
|
for (let l = 0; l < i.length; l += 1) {
|
3078
|
-
let a =
|
3078
|
+
let a = Rs(s, i, l), c = o(a);
|
3079
3079
|
n.set(c, t[l] = Ps(c, a));
|
3080
3080
|
}
|
3081
3081
|
return {
|
@@ -3086,22 +3086,22 @@ function tl(s) {
|
|
3086
3086
|
r(e, "class", "sy-assistant-message-list svelte-1gouv71");
|
3087
3087
|
},
|
3088
3088
|
m(l, a) {
|
3089
|
-
|
3089
|
+
G(l, e, a);
|
3090
3090
|
for (let c = 0; c < t.length; c += 1)
|
3091
3091
|
t[c] && t[c].m(e, null);
|
3092
3092
|
s[47](e);
|
3093
3093
|
},
|
3094
3094
|
p(l, a) {
|
3095
3095
|
a[0] & /*messages, dislikeFeedbackPosition, zIndex, submitDislikeFeedback, showDislikeFeedback, feedbackStatus, dislikeFeedbackContent, handleDislikeClick, showButtonTooltip, hideButtonTooltip, handleFeedback, copyStatus, handleCopy, isLoading, tooltipPosition, tooltipTimer, tooltipContent, handleDownload, showTooltip, hideTooltip, renderMarkdown*/
|
3096
|
-
268058361 && (i =
|
3096
|
+
268058361 && (i = _t(
|
3097
3097
|
/*messages*/
|
3098
3098
|
l[3]
|
3099
|
-
), t = Qs(t, a, o, 1, l, i, n, e, Vs, Ps, null,
|
3099
|
+
), t = Qs(t, a, o, 1, l, i, n, e, Vs, Ps, null, Rs));
|
3100
3100
|
},
|
3101
|
-
i:
|
3102
|
-
o:
|
3101
|
+
i: De,
|
3102
|
+
o: De,
|
3103
3103
|
d(l) {
|
3104
|
-
l &&
|
3104
|
+
l && W(e);
|
3105
3105
|
for (let a = 0; a < t.length; a += 1)
|
3106
3106
|
t[a].d();
|
3107
3107
|
s[47](null);
|
@@ -3143,10 +3143,10 @@ function nl(s) {
|
|
3143
3143
|
n[0]), e.$set(o);
|
3144
3144
|
},
|
3145
3145
|
i(n) {
|
3146
|
-
t || (
|
3146
|
+
t || (Be(e.$$.fragment, n), t = !0);
|
3147
3147
|
},
|
3148
3148
|
o(n) {
|
3149
|
-
|
3149
|
+
$e(e.$$.fragment, n), t = !1;
|
3150
3150
|
},
|
3151
3151
|
d(n) {
|
3152
3152
|
en(e, n);
|
@@ -3160,10 +3160,10 @@ function sl(s) {
|
|
3160
3160
|
e = x("div"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path></svg>', r(e, "class", "sy-assistant-avatar user svelte-1gouv71");
|
3161
3161
|
},
|
3162
3162
|
m(t, n) {
|
3163
|
-
|
3163
|
+
G(t, e, n);
|
3164
3164
|
},
|
3165
3165
|
d(t) {
|
3166
|
-
t &&
|
3166
|
+
t && W(e);
|
3167
3167
|
}
|
3168
3168
|
};
|
3169
3169
|
}
|
@@ -3174,10 +3174,10 @@ function il(s) {
|
|
3174
3174
|
e = x("div"), e.innerHTML = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor"><path d="M896.512 698.88H132.608c-58.88 0-107.008-48.128-107.008-107.008v-10.24c0-58.88 48.128-107.008 107.008-107.008h763.904c58.88 0 107.008 48.128 107.008 107.008v10.24c0 58.88-48.128 107.008-107.008 107.008zM496.64 201.728h35.84v117.248h-35.84z" fill="#6F8698"></path><path d="M516.608 223.744h-4.608c-37.888 0-68.096-30.72-68.096-68.096v-6.656c0-37.888 30.72-68.096 68.096-68.096h4.608c37.888 0 68.096 30.72 68.096 68.096v6.656c0.512 37.888-30.208 68.096-68.096 68.096z" fill="#3677FF"></path><path d="M573.44 944.64H450.56c-181.248 0-327.68-146.432-327.68-327.68v-4.096c0-181.248 146.432-327.68 327.68-327.68h122.88c181.248 0 327.68 146.432 327.68 327.68v4.096c0 180.224-146.432 327.68-327.68 327.68z" fill="#D0D5F1"></path><path d="M681.984 715.264H347.136c-72.704 0-131.584-58.88-131.584-131.584s58.88-131.584 131.584-131.584h334.336c72.704 0 131.584 58.88 131.584 131.584 0.512 72.704-58.368 131.584-131.072 131.584z" fill="#3677FF"></path><path d="M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M443.392 799.232s2.56 58.88 68.096 58.88c58.88 0 69.632-61.952 69.632-61.952s-27.136 33.28-68.096 33.28c-42.496 0-69.632-30.208-69.632-30.208z" fill="#8896A4"></path></svg>', r(e, "class", "sy-assistant-avatar assistant svelte-1gouv71");
|
3175
3175
|
},
|
3176
3176
|
m(t, n) {
|
3177
|
-
|
3177
|
+
G(t, e, n);
|
3178
3178
|
},
|
3179
3179
|
d(t) {
|
3180
|
-
t &&
|
3180
|
+
t && W(e);
|
3181
3181
|
}
|
3182
3182
|
};
|
3183
3183
|
}
|
@@ -3194,7 +3194,7 @@ function ol(s) {
|
|
3194
3194
|
e = x("div"), r(e, "class", "markdown-content svelte-1gouv71");
|
3195
3195
|
},
|
3196
3196
|
m(n, i) {
|
3197
|
-
|
3197
|
+
G(n, e, i), e.innerHTML = t;
|
3198
3198
|
},
|
3199
3199
|
p(n, i) {
|
3200
3200
|
i[0] & /*messages*/
|
@@ -3205,7 +3205,7 @@ function ol(s) {
|
|
3205
3205
|
) + "") && (e.innerHTML = t);
|
3206
3206
|
},
|
3207
3207
|
d(n) {
|
3208
|
-
n &&
|
3208
|
+
n && W(e);
|
3209
3209
|
}
|
3210
3210
|
};
|
3211
3211
|
}
|
@@ -3216,21 +3216,21 @@ function ll(s) {
|
|
3216
3216
|
e = x("span"), e.innerHTML = '<span class="dot svelte-1gouv71">.</span> <span class="dot svelte-1gouv71">.</span> <span class="dot svelte-1gouv71">.</span>', r(e, "class", "sy-assistant-loading svelte-1gouv71");
|
3217
3217
|
},
|
3218
3218
|
m(t, n) {
|
3219
|
-
|
3219
|
+
G(t, e, n);
|
3220
3220
|
},
|
3221
|
-
p:
|
3221
|
+
p: De,
|
3222
3222
|
d(t) {
|
3223
|
-
t &&
|
3223
|
+
t && W(e);
|
3224
3224
|
}
|
3225
3225
|
};
|
3226
3226
|
}
|
3227
3227
|
function Ls(s) {
|
3228
|
-
let e, t =
|
3228
|
+
let e, t = _t(
|
3229
3229
|
/*msg*/
|
3230
3230
|
s[60].attachments
|
3231
3231
|
), n = [];
|
3232
3232
|
for (let i = 0; i < t.length; i += 1)
|
3233
|
-
n[i] =
|
3233
|
+
n[i] = Os(Cs(s, t, i));
|
3234
3234
|
return {
|
3235
3235
|
c() {
|
3236
3236
|
e = x("div");
|
@@ -3239,21 +3239,21 @@ function Ls(s) {
|
|
3239
3239
|
r(e, "class", "sy-assistant-attachments svelte-1gouv71");
|
3240
3240
|
},
|
3241
3241
|
m(i, o) {
|
3242
|
-
|
3242
|
+
G(i, e, o);
|
3243
3243
|
for (let l = 0; l < n.length; l += 1)
|
3244
3244
|
n[l] && n[l].m(e, null);
|
3245
3245
|
},
|
3246
3246
|
p(i, o) {
|
3247
3247
|
if (o[0] & /*tooltipPosition, zIndex, tooltipTimer, tooltipContent, handleDownload, messages, showTooltip, hideTooltip*/
|
3248
3248
|
3670137) {
|
3249
|
-
t =
|
3249
|
+
t = _t(
|
3250
3250
|
/*msg*/
|
3251
3251
|
i[60].attachments
|
3252
3252
|
);
|
3253
3253
|
let l;
|
3254
3254
|
for (l = 0; l < t.length; l += 1) {
|
3255
3255
|
const a = Cs(i, t, l);
|
3256
|
-
n[l] ? n[l].p(a, o) : (n[l] =
|
3256
|
+
n[l] ? n[l].p(a, o) : (n[l] = Os(a), n[l].c(), n[l].m(e, null));
|
3257
3257
|
}
|
3258
3258
|
for (; l < n.length; l += 1)
|
3259
3259
|
n[l].d(1);
|
@@ -3261,7 +3261,7 @@ function Ls(s) {
|
|
3261
3261
|
}
|
3262
3262
|
},
|
3263
3263
|
d(i) {
|
3264
|
-
i &&
|
3264
|
+
i && W(e), Ci(n, i);
|
3265
3265
|
}
|
3266
3266
|
};
|
3267
3267
|
}
|
@@ -3282,9 +3282,9 @@ function Ms(s) {
|
|
3282
3282
|
e = x("button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1gouv71"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>', r(e, "class", "sy-assistant-attachment-toggle svelte-1gouv71"), r(e, "aria-label", "查看详情");
|
3283
3283
|
},
|
3284
3284
|
m(o, l) {
|
3285
|
-
|
3286
|
-
|
3287
|
-
|
3285
|
+
G(o, e, l), t || (n = [
|
3286
|
+
U(e, "mouseenter", i),
|
3287
|
+
U(
|
3288
3288
|
e,
|
3289
3289
|
"mouseleave",
|
3290
3290
|
/*hideTooltip*/
|
@@ -3296,33 +3296,33 @@ function Ms(s) {
|
|
3296
3296
|
s = o;
|
3297
3297
|
},
|
3298
3298
|
d(o) {
|
3299
|
-
o &&
|
3299
|
+
o && W(e), t = !1, Ae(n);
|
3300
3300
|
}
|
3301
3301
|
};
|
3302
3302
|
}
|
3303
|
-
function
|
3303
|
+
function zs(s) {
|
3304
3304
|
let e, t = (
|
3305
3305
|
/*tooltipContent*/
|
3306
3306
|
s[4].replace(/\n/g, "<br>") + ""
|
3307
3307
|
), n, i;
|
3308
3308
|
return {
|
3309
3309
|
c() {
|
3310
|
-
e = x("div"), r(e, "class", "sy-assistant-tooltip svelte-1gouv71"), r(e, "role", "tooltip"),
|
3310
|
+
e = x("div"), r(e, "class", "sy-assistant-tooltip svelte-1gouv71"), r(e, "role", "tooltip"), N(
|
3311
3311
|
e,
|
3312
3312
|
"left",
|
3313
3313
|
/*tooltipPosition*/
|
3314
3314
|
s[5].x + "px"
|
3315
|
-
),
|
3315
|
+
), N(
|
3316
3316
|
e,
|
3317
3317
|
"top",
|
3318
3318
|
/*tooltipPosition*/
|
3319
3319
|
s[5].y + "px"
|
3320
|
-
),
|
3320
|
+
), N(
|
3321
3321
|
e,
|
3322
3322
|
"z-index",
|
3323
3323
|
/*zIndex*/
|
3324
3324
|
s[0] + 3
|
3325
|
-
),
|
3325
|
+
), Q(
|
3326
3326
|
e,
|
3327
3327
|
"align-right",
|
3328
3328
|
/*tooltipPosition*/
|
@@ -3330,14 +3330,14 @@ function Os(s) {
|
|
3330
3330
|
);
|
3331
3331
|
},
|
3332
3332
|
m(o, l) {
|
3333
|
-
|
3334
|
-
|
3333
|
+
G(o, e, l), e.innerHTML = t, n || (i = [
|
3334
|
+
U(
|
3335
3335
|
e,
|
3336
3336
|
"mouseenter",
|
3337
3337
|
/*mouseenter_handler_1*/
|
3338
3338
|
s[36]
|
3339
3339
|
),
|
3340
|
-
|
3340
|
+
U(
|
3341
3341
|
e,
|
3342
3342
|
"mouseleave",
|
3343
3343
|
/*mouseleave_handler*/
|
@@ -3349,25 +3349,25 @@ function Os(s) {
|
|
3349
3349
|
l[0] & /*tooltipContent*/
|
3350
3350
|
16 && t !== (t = /*tooltipContent*/
|
3351
3351
|
o[4].replace(/\n/g, "<br>") + "") && (e.innerHTML = t), l[0] & /*tooltipPosition*/
|
3352
|
-
32 &&
|
3352
|
+
32 && N(
|
3353
3353
|
e,
|
3354
3354
|
"left",
|
3355
3355
|
/*tooltipPosition*/
|
3356
3356
|
o[5].x + "px"
|
3357
3357
|
), l[0] & /*tooltipPosition*/
|
3358
|
-
32 &&
|
3358
|
+
32 && N(
|
3359
3359
|
e,
|
3360
3360
|
"top",
|
3361
3361
|
/*tooltipPosition*/
|
3362
3362
|
o[5].y + "px"
|
3363
3363
|
), l[0] & /*zIndex*/
|
3364
|
-
1 &&
|
3364
|
+
1 && N(
|
3365
3365
|
e,
|
3366
3366
|
"z-index",
|
3367
3367
|
/*zIndex*/
|
3368
3368
|
o[0] + 3
|
3369
3369
|
), l[0] & /*tooltipPosition*/
|
3370
|
-
32 &&
|
3370
|
+
32 && Q(
|
3371
3371
|
e,
|
3372
3372
|
"align-right",
|
3373
3373
|
/*tooltipPosition*/
|
@@ -3375,22 +3375,22 @@ function Os(s) {
|
|
3375
3375
|
);
|
3376
3376
|
},
|
3377
3377
|
d(o) {
|
3378
|
-
o &&
|
3378
|
+
o && W(e), n = !1, Ae(i);
|
3379
3379
|
}
|
3380
3380
|
};
|
3381
3381
|
}
|
3382
|
-
function
|
3382
|
+
function Os(s) {
|
3383
3383
|
let e, t, n, i, o, l, a, c, u, h = Gt(
|
3384
3384
|
/*attachment*/
|
3385
3385
|
s[63].content_title
|
3386
|
-
).name + "", p, d, g,
|
3386
|
+
).name + "", p, d, g, w = Gt(
|
3387
3387
|
/*attachment*/
|
3388
3388
|
s[63].content_title
|
3389
|
-
).ext + "", S, L,
|
3389
|
+
).ext + "", S, L, z, v, _, k, T, A, b, C, I = (
|
3390
3390
|
/*attachment*/
|
3391
3391
|
s[63].tips && Ms(s)
|
3392
3392
|
);
|
3393
|
-
function
|
3393
|
+
function F() {
|
3394
3394
|
return (
|
3395
3395
|
/*click_handler*/
|
3396
3396
|
s[35](
|
@@ -3399,41 +3399,41 @@ function Ds(s) {
|
|
3399
3399
|
)
|
3400
3400
|
);
|
3401
3401
|
}
|
3402
|
-
let
|
3402
|
+
let R = (
|
3403
3403
|
/*tooltipContent*/
|
3404
|
-
s[4] &&
|
3404
|
+
s[4] && zs(s)
|
3405
3405
|
);
|
3406
3406
|
return {
|
3407
3407
|
c() {
|
3408
|
-
e = x("div"), t = x("div"), n = x("div"), i =
|
3409
|
-
s[63].content_title), r(n, "class", "sy-assistant-attachment-title svelte-1gouv71"), r(
|
3408
|
+
e = x("div"), t = x("div"), n = x("div"), i = V("svg"), o = V("path"), l = V("polyline"), a = q(), c = x("div"), u = x("span"), p = Se(h), d = q(), g = x("span"), S = Se(w), z = q(), v = x("div"), I && I.c(), _ = q(), k = x("button"), k.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1gouv71"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>', T = q(), R && R.c(), A = q(), r(o, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), r(l, "points", "13 2 13 9 20 9"), r(i, "xmlns", "http://www.w3.org/2000/svg"), r(i, "width", "16"), r(i, "height", "16"), r(i, "viewBox", "0 0 24 24"), r(i, "fill", "none"), r(i, "stroke", "currentColor"), r(i, "stroke-width", "2"), r(i, "stroke-linecap", "round"), r(i, "stroke-linejoin", "round"), r(u, "class", "sy-assistant-filename svelte-1gouv71"), r(g, "class", "sy-assistant-attachment-ext svelte-1gouv71"), r(c, "class", "sy-assistant-attachment-name svelte-1gouv71"), r(c, "title", L = /*attachment*/
|
3409
|
+
s[63].content_title), r(n, "class", "sy-assistant-attachment-title svelte-1gouv71"), r(k, "class", "sy-assistant-attachment-toggle svelte-1gouv71"), r(k, "aria-label", "下载文件"), r(v, "class", "sy-assistant-attachment-actions svelte-1gouv71"), r(t, "class", "sy-assistant-attachment-header svelte-1gouv71"), r(e, "class", "sy-assistant-attachment svelte-1gouv71");
|
3410
3410
|
},
|
3411
|
-
m(
|
3412
|
-
|
3411
|
+
m(j, Z) {
|
3412
|
+
G(j, e, Z), m(e, t), m(t, n), m(n, i), m(i, o), m(i, l), m(n, a), m(n, c), m(c, u), m(u, p), m(c, d), m(c, g), m(g, S), m(t, z), m(t, v), I && I.m(v, null), m(v, _), m(v, k), m(e, T), R && R.m(e, null), m(e, A), b || (C = U(k, "click", F), b = !0);
|
3413
3413
|
},
|
3414
|
-
p(
|
3415
|
-
s =
|
3414
|
+
p(j, Z) {
|
3415
|
+
s = j, Z[0] & /*messages*/
|
3416
3416
|
8 && h !== (h = Gt(
|
3417
3417
|
/*attachment*/
|
3418
3418
|
s[63].content_title
|
3419
|
-
).name + "") &&
|
3420
|
-
8 &&
|
3419
|
+
).name + "") && He(p, h), Z[0] & /*messages*/
|
3420
|
+
8 && w !== (w = Gt(
|
3421
3421
|
/*attachment*/
|
3422
3422
|
s[63].content_title
|
3423
|
-
).ext + "") &&
|
3423
|
+
).ext + "") && He(S, w), Z[0] & /*messages*/
|
3424
3424
|
8 && L !== (L = /*attachment*/
|
3425
3425
|
s[63].content_title) && r(c, "title", L), /*attachment*/
|
3426
|
-
s[63].tips ?
|
3427
|
-
s[4] ?
|
3426
|
+
s[63].tips ? I ? I.p(s, Z) : (I = Ms(s), I.c(), I.m(v, _)) : I && (I.d(1), I = null), /*tooltipContent*/
|
3427
|
+
s[4] ? R ? R.p(s, Z) : (R = zs(s), R.c(), R.m(e, A)) : R && (R.d(1), R = null);
|
3428
3428
|
},
|
3429
|
-
d(
|
3430
|
-
|
3429
|
+
d(j) {
|
3430
|
+
j && W(e), I && I.d(), R && R.d(), b = !1, C();
|
3431
3431
|
}
|
3432
3432
|
};
|
3433
3433
|
}
|
3434
|
-
function
|
3434
|
+
function Ds(s) {
|
3435
3435
|
let e, t, n, i, o, l, a, c, u, h, p;
|
3436
|
-
function d(A,
|
3436
|
+
function d(A, b) {
|
3437
3437
|
return (
|
3438
3438
|
/*copyStatus*/
|
3439
3439
|
A[9][
|
@@ -3442,7 +3442,7 @@ function zs(s) {
|
|
3442
3442
|
] ? al : rl
|
3443
3443
|
);
|
3444
3444
|
}
|
3445
|
-
let g = d(s),
|
3445
|
+
let g = d(s), w = g(s);
|
3446
3446
|
function S() {
|
3447
3447
|
return (
|
3448
3448
|
/*click_handler_1*/
|
@@ -3462,7 +3462,7 @@ function zs(s) {
|
|
3462
3462
|
)
|
3463
3463
|
);
|
3464
3464
|
}
|
3465
|
-
function
|
3465
|
+
function z() {
|
3466
3466
|
return (
|
3467
3467
|
/*click_handler_2*/
|
3468
3468
|
s[40](
|
@@ -3491,7 +3491,7 @@ function zs(s) {
|
|
3491
3491
|
)
|
3492
3492
|
);
|
3493
3493
|
}
|
3494
|
-
function
|
3494
|
+
function k(...A) {
|
3495
3495
|
return (
|
3496
3496
|
/*mouseenter_handler_4*/
|
3497
3497
|
s[43](
|
@@ -3501,7 +3501,7 @@ function zs(s) {
|
|
3501
3501
|
)
|
3502
3502
|
);
|
3503
3503
|
}
|
3504
|
-
let
|
3504
|
+
let T = (
|
3505
3505
|
/*showDislikeFeedback*/
|
3506
3506
|
s[12] && /*feedbackStatus*/
|
3507
3507
|
s[10][
|
@@ -3511,11 +3511,11 @@ function zs(s) {
|
|
3511
3511
|
);
|
3512
3512
|
return {
|
3513
3513
|
c() {
|
3514
|
-
e = x("div"), t = x("button"),
|
3514
|
+
e = x("div"), t = x("button"), w.c(), i = q(), o = x("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>', l = q(), a = x("button"), a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-3"></path></svg>', c = q(), T && T.c(), u = Kt(), r(t, "class", "sy-assistant-action-button svelte-1gouv71"), r(t, "aria-label", n = /*copyStatus*/
|
3515
3515
|
s[9][
|
3516
3516
|
/*msg*/
|
3517
3517
|
s[60].id
|
3518
|
-
] ? "已复制" : "复制内容"),
|
3518
|
+
] ? "已复制" : "复制内容"), Q(
|
3519
3519
|
t,
|
3520
3520
|
"copied",
|
3521
3521
|
/*copyStatus*/
|
@@ -3523,7 +3523,7 @@ function zs(s) {
|
|
3523
3523
|
/*msg*/
|
3524
3524
|
s[60].id
|
3525
3525
|
]
|
3526
|
-
), r(o, "class", "sy-assistant-action-button svelte-1gouv71"), r(o, "aria-label", "点赞"),
|
3526
|
+
), r(o, "class", "sy-assistant-action-button svelte-1gouv71"), r(o, "aria-label", "点赞"), Q(
|
3527
3527
|
o,
|
3528
3528
|
"active",
|
3529
3529
|
/*feedbackStatus*/
|
@@ -3531,7 +3531,7 @@ function zs(s) {
|
|
3531
3531
|
/*msg*/
|
3532
3532
|
s[60].id
|
3533
3533
|
] === "like"
|
3534
|
-
), r(a, "class", "sy-assistant-action-button svelte-1gouv71"), r(a, "aria-label", "点踩"),
|
3534
|
+
), r(a, "class", "sy-assistant-action-button svelte-1gouv71"), r(a, "aria-label", "点踩"), Q(
|
3535
3535
|
a,
|
3536
3536
|
"active",
|
3537
3537
|
/*feedbackStatus*/
|
@@ -3541,27 +3541,27 @@ function zs(s) {
|
|
3541
3541
|
] === "dislike"
|
3542
3542
|
), r(e, "class", "sy-assistant-message-actions svelte-1gouv71");
|
3543
3543
|
},
|
3544
|
-
m(A,
|
3545
|
-
|
3546
|
-
|
3547
|
-
|
3548
|
-
|
3544
|
+
m(A, b) {
|
3545
|
+
G(A, e, b), m(e, t), w.m(t, null), m(e, i), m(e, o), m(e, l), m(e, a), G(A, c, b), T && T.m(A, b), G(A, u, b), h || (p = [
|
3546
|
+
U(t, "click", S),
|
3547
|
+
U(t, "mouseenter", L),
|
3548
|
+
U(
|
3549
3549
|
t,
|
3550
3550
|
"mouseleave",
|
3551
3551
|
/*hideButtonTooltip*/
|
3552
3552
|
s[27]
|
3553
3553
|
),
|
3554
|
-
|
3555
|
-
|
3556
|
-
|
3554
|
+
U(o, "click", z),
|
3555
|
+
U(o, "mouseenter", v),
|
3556
|
+
U(
|
3557
3557
|
o,
|
3558
3558
|
"mouseleave",
|
3559
3559
|
/*hideButtonTooltip*/
|
3560
3560
|
s[27]
|
3561
3561
|
),
|
3562
|
-
|
3563
|
-
|
3564
|
-
|
3562
|
+
U(a, "click", _),
|
3563
|
+
U(a, "mouseenter", k),
|
3564
|
+
U(
|
3565
3565
|
a,
|
3566
3566
|
"mouseleave",
|
3567
3567
|
/*hideButtonTooltip*/
|
@@ -3569,14 +3569,14 @@ function zs(s) {
|
|
3569
3569
|
)
|
3570
3570
|
], h = !0);
|
3571
3571
|
},
|
3572
|
-
p(A,
|
3573
|
-
s = A, g !== (g = d(s)) && (
|
3572
|
+
p(A, b) {
|
3573
|
+
s = A, g !== (g = d(s)) && (w.d(1), w = g(s), w && (w.c(), w.m(t, null))), b[0] & /*copyStatus, messages*/
|
3574
3574
|
520 && n !== (n = /*copyStatus*/
|
3575
3575
|
s[9][
|
3576
3576
|
/*msg*/
|
3577
3577
|
s[60].id
|
3578
|
-
] ? "已复制" : "复制内容") && r(t, "aria-label", n),
|
3579
|
-
520 &&
|
3578
|
+
] ? "已复制" : "复制内容") && r(t, "aria-label", n), b[0] & /*copyStatus, messages*/
|
3579
|
+
520 && Q(
|
3580
3580
|
t,
|
3581
3581
|
"copied",
|
3582
3582
|
/*copyStatus*/
|
@@ -3584,8 +3584,8 @@ function zs(s) {
|
|
3584
3584
|
/*msg*/
|
3585
3585
|
s[60].id
|
3586
3586
|
]
|
3587
|
-
),
|
3588
|
-
1032 &&
|
3587
|
+
), b[0] & /*feedbackStatus, messages*/
|
3588
|
+
1032 && Q(
|
3589
3589
|
o,
|
3590
3590
|
"active",
|
3591
3591
|
/*feedbackStatus*/
|
@@ -3593,8 +3593,8 @@ function zs(s) {
|
|
3593
3593
|
/*msg*/
|
3594
3594
|
s[60].id
|
3595
3595
|
] === "like"
|
3596
|
-
),
|
3597
|
-
1032 &&
|
3596
|
+
), b[0] & /*feedbackStatus, messages*/
|
3597
|
+
1032 && Q(
|
3598
3598
|
a,
|
3599
3599
|
"active",
|
3600
3600
|
/*feedbackStatus*/
|
@@ -3607,10 +3607,10 @@ function zs(s) {
|
|
3607
3607
|
s[10][
|
3608
3608
|
/*msg*/
|
3609
3609
|
s[60].id
|
3610
|
-
] === "dislike" ?
|
3610
|
+
] === "dislike" ? T ? T.p(s, b) : (T = Ns(s), T.c(), T.m(u.parentNode, u)) : T && (T.d(1), T = null);
|
3611
3611
|
},
|
3612
3612
|
d(A) {
|
3613
|
-
A && (
|
3613
|
+
A && (W(e), W(c), W(u)), w.d(), T && T.d(A), h = !1, Ae(p);
|
3614
3614
|
}
|
3615
3615
|
};
|
3616
3616
|
}
|
@@ -3618,13 +3618,13 @@ function rl(s) {
|
|
3618
3618
|
let e, t, n;
|
3619
3619
|
return {
|
3620
3620
|
c() {
|
3621
|
-
e =
|
3621
|
+
e = V("svg"), t = V("rect"), n = V("path"), r(t, "x", "9"), r(t, "y", "9"), r(t, "width", "13"), r(t, "height", "13"), r(t, "rx", "2"), r(t, "ry", "2"), r(n, "d", "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"), r(e, "xmlns", "http://www.w3.org/2000/svg"), r(e, "width", "14"), r(e, "height", "14"), r(e, "viewBox", "0 0 24 24"), r(e, "fill", "none"), r(e, "stroke", "currentColor"), r(e, "stroke-width", "2"), r(e, "stroke-linecap", "round"), r(e, "stroke-linejoin", "round");
|
3622
3622
|
},
|
3623
3623
|
m(i, o) {
|
3624
|
-
|
3624
|
+
G(i, e, o), m(e, t), m(e, n);
|
3625
3625
|
},
|
3626
3626
|
d(i) {
|
3627
|
-
i &&
|
3627
|
+
i && W(e);
|
3628
3628
|
}
|
3629
3629
|
};
|
3630
3630
|
}
|
@@ -3632,13 +3632,13 @@ function al(s) {
|
|
3632
3632
|
let e, t;
|
3633
3633
|
return {
|
3634
3634
|
c() {
|
3635
|
-
e =
|
3635
|
+
e = V("svg"), t = V("polyline"), r(t, "points", "20 6 9 17 4 12"), r(e, "xmlns", "http://www.w3.org/2000/svg"), r(e, "width", "14"), r(e, "height", "14"), r(e, "viewBox", "0 0 24 24"), r(e, "fill", "none"), r(e, "stroke", "currentColor"), r(e, "stroke-width", "2"), r(e, "stroke-linecap", "round"), r(e, "stroke-linejoin", "round");
|
3636
3636
|
},
|
3637
3637
|
m(n, i) {
|
3638
|
-
|
3638
|
+
G(n, e, i), m(e, t);
|
3639
3639
|
},
|
3640
3640
|
d(n) {
|
3641
|
-
n &&
|
3641
|
+
n && W(e);
|
3642
3642
|
}
|
3643
3643
|
};
|
3644
3644
|
}
|
@@ -3671,25 +3671,25 @@ function Ns(s) {
|
|
3671
3671
|
}
|
3672
3672
|
return {
|
3673
3673
|
c() {
|
3674
|
-
e = x("div"), t = x("textarea"), n =
|
3674
|
+
e = x("div"), t = x("textarea"), n = q(), i = x("div"), o = x("button"), o.textContent = "取消", l = q(), a = x("button"), a.textContent = "提交", r(t, "class", "sy-assistant-dislike-input svelte-1gouv71"), r(t, "placeholder", "请输入您的反馈意见..."), r(o, "class", "sy-assistant-popup-cancel svelte-1gouv71"), r(a, "class", "sy-assistant-popup-submit svelte-1gouv71"), r(i, "class", "sy-assistant-popup-actions svelte-1gouv71"), r(e, "class", "sy-assistant-dislike-popup svelte-1gouv71"), N(
|
3675
3675
|
e,
|
3676
3676
|
"left",
|
3677
3677
|
/*dislikeFeedbackPosition*/
|
3678
3678
|
s[13].x + "px"
|
3679
|
-
),
|
3679
|
+
), N(
|
3680
3680
|
e,
|
3681
3681
|
"top",
|
3682
3682
|
/*dislikeFeedbackPosition*/
|
3683
3683
|
s[13].y + "px"
|
3684
|
-
),
|
3684
|
+
), N(
|
3685
3685
|
e,
|
3686
3686
|
"z-index",
|
3687
3687
|
/*zIndex*/
|
3688
3688
|
s[0] + 3
|
3689
3689
|
);
|
3690
3690
|
},
|
3691
|
-
m(g,
|
3692
|
-
|
3691
|
+
m(g, w) {
|
3692
|
+
G(g, e, w), m(e, t), wt(
|
3693
3693
|
t,
|
3694
3694
|
/*dislikeFeedbackContent*/
|
3695
3695
|
s[11][
|
@@ -3697,34 +3697,34 @@ function Ns(s) {
|
|
3697
3697
|
s[60].id
|
3698
3698
|
]
|
3699
3699
|
), m(e, n), m(e, i), m(i, o), m(i, l), m(i, a), c || (u = [
|
3700
|
-
|
3701
|
-
|
3702
|
-
|
3700
|
+
U(t, "input", h),
|
3701
|
+
U(o, "click", p),
|
3702
|
+
U(a, "click", d)
|
3703
3703
|
], c = !0);
|
3704
3704
|
},
|
3705
|
-
p(g,
|
3706
|
-
s = g,
|
3707
|
-
2056 &&
|
3705
|
+
p(g, w) {
|
3706
|
+
s = g, w[0] & /*dislikeFeedbackContent, messages*/
|
3707
|
+
2056 && wt(
|
3708
3708
|
t,
|
3709
3709
|
/*dislikeFeedbackContent*/
|
3710
3710
|
s[11][
|
3711
3711
|
/*msg*/
|
3712
3712
|
s[60].id
|
3713
3713
|
]
|
3714
|
-
),
|
3715
|
-
8192 &&
|
3714
|
+
), w[0] & /*dislikeFeedbackPosition*/
|
3715
|
+
8192 && N(
|
3716
3716
|
e,
|
3717
3717
|
"left",
|
3718
3718
|
/*dislikeFeedbackPosition*/
|
3719
3719
|
s[13].x + "px"
|
3720
|
-
),
|
3721
|
-
8192 &&
|
3720
|
+
), w[0] & /*dislikeFeedbackPosition*/
|
3721
|
+
8192 && N(
|
3722
3722
|
e,
|
3723
3723
|
"top",
|
3724
3724
|
/*dislikeFeedbackPosition*/
|
3725
3725
|
s[13].y + "px"
|
3726
|
-
),
|
3727
|
-
1 &&
|
3726
|
+
), w[0] & /*zIndex*/
|
3727
|
+
1 && N(
|
3728
3728
|
e,
|
3729
3729
|
"z-index",
|
3730
3730
|
/*zIndex*/
|
@@ -3732,7 +3732,7 @@ function Ns(s) {
|
|
3732
3732
|
);
|
3733
3733
|
},
|
3734
3734
|
d(g) {
|
3735
|
-
g &&
|
3735
|
+
g && W(e), c = !1, Ae(u);
|
3736
3736
|
}
|
3737
3737
|
};
|
3738
3738
|
}
|
@@ -3740,192 +3740,192 @@ function Ps(s, e) {
|
|
3740
3740
|
let t, n, i, o, l, a, c, u, h = new Date(
|
3741
3741
|
/*msg*/
|
3742
3742
|
e[60].timestamp
|
3743
|
-
).
|
3744
|
-
function g(
|
3743
|
+
).toLocaleString() + "", p, d;
|
3744
|
+
function g(T, A) {
|
3745
3745
|
return (
|
3746
3746
|
/*msg*/
|
3747
|
-
|
3747
|
+
T[60].type === "assistant" ? il : sl
|
3748
3748
|
);
|
3749
3749
|
}
|
3750
|
-
let
|
3751
|
-
function L(
|
3750
|
+
let w = g(e), S = w(e);
|
3751
|
+
function L(T, A) {
|
3752
3752
|
return (
|
3753
3753
|
/*isLoading*/
|
3754
|
-
|
3755
|
-
|
3756
|
-
|
3754
|
+
T[7] && /*msg*/
|
3755
|
+
T[60].id === /*messages*/
|
3756
|
+
T[3][
|
3757
3757
|
/*messages*/
|
3758
|
-
|
3758
|
+
T[3].length - 1
|
3759
3759
|
].id && /*msg*/
|
3760
|
-
|
3761
|
-
|
3760
|
+
T[60].type === "assistant" && !/*msg*/
|
3761
|
+
T[60].content ? ll : ol
|
3762
3762
|
);
|
3763
3763
|
}
|
3764
|
-
let
|
3764
|
+
let z = L(e), v = z(e), _ = (
|
3765
3765
|
/*msg*/
|
3766
3766
|
e[60].attachments && Ls(e)
|
3767
|
-
),
|
3767
|
+
), k = (
|
3768
3768
|
/*msg*/
|
3769
3769
|
e[60].id !== "-1" && /*msg*/
|
3770
3770
|
e[60].type === "assistant" && !/*isLoading*/
|
3771
|
-
e[7] &&
|
3771
|
+
e[7] && Ds(e)
|
3772
3772
|
);
|
3773
3773
|
return {
|
3774
3774
|
key: s,
|
3775
3775
|
first: null,
|
3776
3776
|
c() {
|
3777
|
-
t = x("div"), S.c(), n =
|
3777
|
+
t = x("div"), S.c(), n = q(), i = x("div"), o = x("div"), v.c(), l = q(), _ && _.c(), a = q(), k && k.c(), c = q(), u = x("div"), p = Se(h), d = q(), r(o, "class", "sy-assistant-message-content svelte-1gouv71"), r(u, "class", "sy-assistant-message-time svelte-1gouv71"), r(i, "class", "sy-assistant-message-bubble svelte-1gouv71"), r(t, "class", "sy-assistant-message svelte-1gouv71"), Q(
|
3778
3778
|
t,
|
3779
3779
|
"user",
|
3780
3780
|
/*msg*/
|
3781
3781
|
e[60].type === "user"
|
3782
3782
|
), this.first = t;
|
3783
3783
|
},
|
3784
|
-
m(
|
3785
|
-
|
3784
|
+
m(T, A) {
|
3785
|
+
G(T, t, A), S.m(t, null), m(t, n), m(t, i), m(i, o), v.m(o, null), m(o, l), _ && _.m(o, null), m(o, a), k && k.m(o, null), m(i, c), m(i, u), m(u, p), m(t, d);
|
3786
3786
|
},
|
3787
|
-
p(
|
3788
|
-
e =
|
3787
|
+
p(T, A) {
|
3788
|
+
e = T, w !== (w = g(e)) && (S.d(1), S = w(e), S && (S.c(), S.m(t, n))), z === (z = L(e)) && v ? v.p(e, A) : (v.d(1), v = z(e), v && (v.c(), v.m(o, l))), /*msg*/
|
3789
3789
|
e[60].attachments ? _ ? _.p(e, A) : (_ = Ls(e), _.c(), _.m(o, a)) : _ && (_.d(1), _ = null), /*msg*/
|
3790
3790
|
e[60].id !== "-1" && /*msg*/
|
3791
3791
|
e[60].type === "assistant" && !/*isLoading*/
|
3792
|
-
e[7] ?
|
3792
|
+
e[7] ? k ? k.p(e, A) : (k = Ds(e), k.c(), k.m(o, null)) : k && (k.d(1), k = null), A[0] & /*messages*/
|
3793
3793
|
8 && h !== (h = new Date(
|
3794
3794
|
/*msg*/
|
3795
3795
|
e[60].timestamp
|
3796
|
-
).
|
3797
|
-
8 &&
|
3796
|
+
).toLocaleString() + "") && He(p, h), A[0] & /*messages*/
|
3797
|
+
8 && Q(
|
3798
3798
|
t,
|
3799
3799
|
"user",
|
3800
3800
|
/*msg*/
|
3801
3801
|
e[60].type === "user"
|
3802
3802
|
);
|
3803
3803
|
},
|
3804
|
-
d(
|
3805
|
-
|
3804
|
+
d(T) {
|
3805
|
+
T && W(t), S.d(), v.d(), _ && _.d(), k && k.d();
|
3806
3806
|
}
|
3807
3807
|
};
|
3808
3808
|
}
|
3809
3809
|
function Fs(s) {
|
3810
|
-
let e, t, n, i, o, l, a, c, u, h, p, d, g,
|
3810
|
+
let e, t, n, i, o, l, a, c, u, h, p, d, g, w, S, L, z, v, _, k, T, A, b, C;
|
3811
3811
|
return {
|
3812
3812
|
c() {
|
3813
|
-
e = x("div"), t = x("div"), n = x("button"), n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', i =
|
3813
|
+
e = x("div"), t = x("div"), n = x("button"), n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', i = q(), o = x("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', l = q(), a = x("div"), c = x("div"), u = x("div"), h = x("div"), p = x("textarea"), d = q(), g = x("div"), w = Se(
|
3814
3814
|
/*messageLength*/
|
3815
3815
|
s[2]
|
3816
|
-
), S =
|
3816
|
+
), S = Se("/"), L = Se(Sn), z = q(), v = x("button"), _ = V("svg"), k = V("line"), T = V("polygon"), r(n, "class", "sy-assistant-icon-button svelte-1gouv71"), r(n, "aria-label", "历史会话"), r(o, "class", "sy-assistant-icon-button svelte-1gouv71"), r(o, "aria-label", "新建会话"), r(t, "class", "sy-assistant-chat-actions svelte-1gouv71"), r(e, "class", "sy-assistant-chat-footer svelte-1gouv71"), r(p, "class", "sy-assistant-textarea svelte-1gouv71"), r(p, "placeholder", "输入您的问题..."), r(p, "maxlength", Sn), r(p, "rows", "3"), r(g, "class", "sy-assistant-char-count svelte-1gouv71"), Q(
|
3817
3817
|
g,
|
3818
3818
|
"over-limit",
|
3819
3819
|
/*isOverLimit*/
|
3820
3820
|
s[16]
|
3821
|
-
), r(h, "class", "sy-assistant-textarea-container svelte-1gouv71"), r(u, "class", "sy-assistant-input-wrapper svelte-1gouv71"), r(
|
3821
|
+
), r(h, "class", "sy-assistant-textarea-container svelte-1gouv71"), r(u, "class", "sy-assistant-input-wrapper svelte-1gouv71"), r(k, "x1", "22"), r(k, "y1", "2"), r(k, "x2", "11"), r(k, "y2", "13"), r(T, "points", "22 2 15 22 11 13 2 9 22 2"), r(_, "xmlns", "http://www.w3.org/2000/svg"), r(_, "width", "20"), r(_, "height", "20"), r(_, "viewBox", "0 0 24 24"), r(_, "fill", "none"), r(_, "stroke", "currentColor"), r(_, "stroke-width", "2"), r(_, "stroke-linecap", "round"), r(_, "stroke-linejoin", "round"), r(v, "class", "sy-assistant-send-button svelte-1gouv71"), v.disabled = A = !/*message*/
|
3822
3822
|
s[1].trim() || /*isOverLimit*/
|
3823
3823
|
s[16], r(v, "aria-label", "发送消息"), r(c, "class", "sy-assistant-input-container svelte-1gouv71"), r(a, "class", "sy-assistant-input-area svelte-1gouv71");
|
3824
3824
|
},
|
3825
|
-
m(
|
3826
|
-
|
3825
|
+
m(I, F) {
|
3826
|
+
G(I, e, F), m(e, t), m(t, n), m(t, i), m(t, o), G(I, l, F), G(I, a, F), m(a, c), m(c, u), m(u, h), m(h, p), wt(
|
3827
3827
|
p,
|
3828
3828
|
/*message*/
|
3829
3829
|
s[1]
|
3830
|
-
), m(h, d), m(h, g), m(g,
|
3831
|
-
|
3830
|
+
), m(h, d), m(h, g), m(g, w), m(g, S), m(g, L), m(c, z), m(c, v), m(v, _), m(_, k), m(_, T), b || (C = [
|
3831
|
+
U(
|
3832
3832
|
n,
|
3833
3833
|
"click",
|
3834
3834
|
/*handleShowHistory*/
|
3835
3835
|
s[29]
|
3836
3836
|
),
|
3837
|
-
|
3837
|
+
U(
|
3838
3838
|
n,
|
3839
3839
|
"mouseenter",
|
3840
3840
|
/*mouseenter_handler_5*/
|
3841
3841
|
s[48]
|
3842
3842
|
),
|
3843
|
-
|
3843
|
+
U(
|
3844
3844
|
n,
|
3845
3845
|
"mouseleave",
|
3846
3846
|
/*hideButtonTooltip*/
|
3847
3847
|
s[27]
|
3848
3848
|
),
|
3849
|
-
|
3849
|
+
U(
|
3850
3850
|
n,
|
3851
3851
|
"blur",
|
3852
3852
|
/*hideButtonTooltip*/
|
3853
3853
|
s[27]
|
3854
3854
|
),
|
3855
|
-
|
3855
|
+
U(
|
3856
3856
|
o,
|
3857
3857
|
"click",
|
3858
3858
|
/*handleNewSession*/
|
3859
3859
|
s[32]
|
3860
3860
|
),
|
3861
|
-
|
3861
|
+
U(
|
3862
3862
|
o,
|
3863
3863
|
"mouseenter",
|
3864
3864
|
/*mouseenter_handler_6*/
|
3865
3865
|
s[49]
|
3866
3866
|
),
|
3867
|
-
|
3867
|
+
U(
|
3868
3868
|
o,
|
3869
3869
|
"mouseleave",
|
3870
3870
|
/*hideButtonTooltip*/
|
3871
3871
|
s[27]
|
3872
3872
|
),
|
3873
|
-
|
3873
|
+
U(
|
3874
3874
|
p,
|
3875
3875
|
"input",
|
3876
3876
|
/*textarea_input_handler_1*/
|
3877
3877
|
s[50]
|
3878
3878
|
),
|
3879
|
-
|
3879
|
+
U(
|
3880
3880
|
p,
|
3881
3881
|
"keydown",
|
3882
3882
|
/*keydown_handler*/
|
3883
3883
|
s[51]
|
3884
3884
|
),
|
3885
|
-
|
3885
|
+
U(
|
3886
3886
|
v,
|
3887
3887
|
"click",
|
3888
3888
|
/*handleSend*/
|
3889
3889
|
s[18]
|
3890
3890
|
),
|
3891
|
-
|
3891
|
+
U(
|
3892
3892
|
v,
|
3893
3893
|
"mouseenter",
|
3894
3894
|
/*mouseenter_handler_7*/
|
3895
3895
|
s[52]
|
3896
3896
|
),
|
3897
|
-
|
3897
|
+
U(
|
3898
3898
|
v,
|
3899
3899
|
"mouseleave",
|
3900
3900
|
/*hideButtonTooltip*/
|
3901
3901
|
s[27]
|
3902
3902
|
)
|
3903
|
-
],
|
3903
|
+
], b = !0);
|
3904
3904
|
},
|
3905
|
-
p(
|
3906
|
-
|
3907
|
-
2 &&
|
3905
|
+
p(I, F) {
|
3906
|
+
F[0] & /*message*/
|
3907
|
+
2 && wt(
|
3908
3908
|
p,
|
3909
3909
|
/*message*/
|
3910
|
-
|
3911
|
-
),
|
3912
|
-
4 &&
|
3913
|
-
|
3910
|
+
I[1]
|
3911
|
+
), F[0] & /*messageLength*/
|
3912
|
+
4 && He(
|
3913
|
+
w,
|
3914
3914
|
/*messageLength*/
|
3915
|
-
|
3916
|
-
),
|
3917
|
-
65536 &&
|
3915
|
+
I[2]
|
3916
|
+
), F[0] & /*isOverLimit*/
|
3917
|
+
65536 && Q(
|
3918
3918
|
g,
|
3919
3919
|
"over-limit",
|
3920
3920
|
/*isOverLimit*/
|
3921
|
-
|
3922
|
-
),
|
3921
|
+
I[16]
|
3922
|
+
), F[0] & /*message, isOverLimit*/
|
3923
3923
|
65538 && A !== (A = !/*message*/
|
3924
|
-
|
3925
|
-
|
3924
|
+
I[1].trim() || /*isOverLimit*/
|
3925
|
+
I[16]) && (v.disabled = A);
|
3926
3926
|
},
|
3927
|
-
d(
|
3928
|
-
|
3927
|
+
d(I) {
|
3928
|
+
I && (W(e), W(l), W(a)), b = !1, Ae(C);
|
3929
3929
|
}
|
3930
3930
|
};
|
3931
3931
|
}
|
@@ -3936,12 +3936,12 @@ function Hs(s) {
|
|
3936
3936
|
), n;
|
3937
3937
|
return {
|
3938
3938
|
c() {
|
3939
|
-
e = x("div"), n =
|
3939
|
+
e = x("div"), n = Se(t), r(e, "class", "sy-assistant-button-tooltip svelte-1gouv71"), N(
|
3940
3940
|
e,
|
3941
3941
|
"left",
|
3942
3942
|
/*buttonTooltip*/
|
3943
3943
|
s[14].x + "px"
|
3944
|
-
),
|
3944
|
+
), N(
|
3945
3945
|
e,
|
3946
3946
|
"top",
|
3947
3947
|
/*buttonTooltip*/
|
@@ -3949,19 +3949,19 @@ function Hs(s) {
|
|
3949
3949
|
);
|
3950
3950
|
},
|
3951
3951
|
m(i, o) {
|
3952
|
-
|
3952
|
+
G(i, e, o), m(e, n);
|
3953
3953
|
},
|
3954
3954
|
p(i, o) {
|
3955
3955
|
o[0] & /*buttonTooltip*/
|
3956
3956
|
16384 && t !== (t = /*buttonTooltip*/
|
3957
|
-
i[14].text + "") &&
|
3958
|
-
16384 &&
|
3957
|
+
i[14].text + "") && He(n, t), o[0] & /*buttonTooltip*/
|
3958
|
+
16384 && N(
|
3959
3959
|
e,
|
3960
3960
|
"left",
|
3961
3961
|
/*buttonTooltip*/
|
3962
3962
|
i[14].x + "px"
|
3963
3963
|
), o[0] & /*buttonTooltip*/
|
3964
|
-
16384 &&
|
3964
|
+
16384 && N(
|
3965
3965
|
e,
|
3966
3966
|
"top",
|
3967
3967
|
/*buttonTooltip*/
|
@@ -3969,14 +3969,14 @@ function Hs(s) {
|
|
3969
3969
|
);
|
3970
3970
|
},
|
3971
3971
|
d(i) {
|
3972
|
-
i &&
|
3972
|
+
i && W(e);
|
3973
3973
|
}
|
3974
3974
|
};
|
3975
3975
|
}
|
3976
3976
|
function cl(s) {
|
3977
3977
|
let e, t, n, i, o, l, a;
|
3978
3978
|
const c = [nl, tl], u = [];
|
3979
|
-
function h(g,
|
3979
|
+
function h(g, w) {
|
3980
3980
|
return (
|
3981
3981
|
/*showHistory*/
|
3982
3982
|
g[15] ? 0 : 1
|
@@ -3990,38 +3990,38 @@ function cl(s) {
|
|
3990
3990
|
);
|
3991
3991
|
return {
|
3992
3992
|
c() {
|
3993
|
-
e = x("div"), n.c(), i =
|
3993
|
+
e = x("div"), n.c(), i = q(), p && p.c(), o = q(), d && d.c(), l = Kt(), r(e, "class", "sy-assistant-chat-container svelte-1gouv71"), N(
|
3994
3994
|
e,
|
3995
3995
|
"z-index",
|
3996
3996
|
/*zIndex*/
|
3997
3997
|
s[0] + 2
|
3998
3998
|
);
|
3999
3999
|
},
|
4000
|
-
m(g,
|
4001
|
-
|
4000
|
+
m(g, w) {
|
4001
|
+
G(g, e, w), u[t].m(e, null), m(e, i), p && p.m(e, null), s[53](e), G(g, o, w), d && d.m(g, w), G(g, l, w), a = !0;
|
4002
4002
|
},
|
4003
|
-
p(g,
|
4003
|
+
p(g, w) {
|
4004
4004
|
let S = t;
|
4005
|
-
t = h(g), t === S ? u[t].p(g,
|
4005
|
+
t = h(g), t === S ? u[t].p(g, w) : (In(), $e(u[S], 1, 1, () => {
|
4006
4006
|
u[S] = null;
|
4007
|
-
}),
|
4008
|
-
g[15] ? p && (p.d(1), p = null) : p ? p.p(g,
|
4009
|
-
1) &&
|
4007
|
+
}), Rn(), n = u[t], n ? n.p(g, w) : (n = u[t] = c[t](g), n.c()), Be(n, 1), n.m(e, i)), /*showHistory*/
|
4008
|
+
g[15] ? p && (p.d(1), p = null) : p ? p.p(g, w) : (p = Fs(g), p.c(), p.m(e, null)), (!a || w[0] & /*zIndex*/
|
4009
|
+
1) && N(
|
4010
4010
|
e,
|
4011
4011
|
"z-index",
|
4012
4012
|
/*zIndex*/
|
4013
4013
|
g[0] + 2
|
4014
4014
|
), /*buttonTooltip*/
|
4015
|
-
g[14] ? d ? d.p(g,
|
4015
|
+
g[14] ? d ? d.p(g, w) : (d = Hs(g), d.c(), d.m(l.parentNode, l)) : d && (d.d(1), d = null);
|
4016
4016
|
},
|
4017
4017
|
i(g) {
|
4018
|
-
a || (
|
4018
|
+
a || (Be(n), a = !0);
|
4019
4019
|
},
|
4020
4020
|
o(g) {
|
4021
|
-
|
4021
|
+
$e(n), a = !1;
|
4022
4022
|
},
|
4023
4023
|
d(g) {
|
4024
|
-
g && (
|
4024
|
+
g && (W(e), W(o), W(l)), u[t].d(), p && p.d(), s[53](null), d && d.d(g);
|
4025
4025
|
}
|
4026
4026
|
};
|
4027
4027
|
}
|
@@ -4054,6 +4054,8 @@ function Gt(s) {
|
|
4054
4054
|
function fl(s, e, t) {
|
4055
4055
|
let n, i, o = "", l = [
|
4056
4056
|
{
|
4057
|
+
sessionId: "",
|
4058
|
+
requestId: "",
|
4057
4059
|
id: "-1",
|
4058
4060
|
type: "assistant",
|
4059
4061
|
content: "您好!我是您的AI助手,有什么可以帮您的吗?",
|
@@ -4066,56 +4068,60 @@ function fl(s, e, t) {
|
|
4066
4068
|
gfm: !0
|
4067
4069
|
// 支持 GitHub 风格 Markdown
|
4068
4070
|
});
|
4069
|
-
function g(
|
4071
|
+
function g(y) {
|
4070
4072
|
try {
|
4071
|
-
const H = K(
|
4073
|
+
const H = K(y);
|
4072
4074
|
return ys.sanitize(H);
|
4073
4075
|
} catch (H) {
|
4074
4076
|
console.warn("Markdown parsing failed, fallback to HTML:", H);
|
4075
4077
|
try {
|
4076
|
-
const
|
4078
|
+
const J = y.replace(/\n/g, "<br>").replace(
|
4077
4079
|
/\*\*(.*?)\*\*/g,
|
4078
4080
|
"<strong>$1</strong>"
|
4079
4081
|
// 处理加粗
|
4080
4082
|
).replace(/\*(.*?)\*/g, "<em>$1</em>");
|
4081
|
-
return ys.sanitize(
|
4082
|
-
} catch (
|
4083
|
-
return console.error("HTML fallback failed:",
|
4083
|
+
return ys.sanitize(J);
|
4084
|
+
} catch (J) {
|
4085
|
+
return console.error("HTML fallback failed:", J), y;
|
4084
4086
|
}
|
4085
4087
|
}
|
4086
4088
|
}
|
4087
|
-
let
|
4088
|
-
function S(
|
4089
|
-
|
4090
|
-
top:
|
4091
|
-
behavior:
|
4089
|
+
let w;
|
4090
|
+
function S(y = !1) {
|
4091
|
+
w && w.scrollTo({
|
4092
|
+
top: w.scrollHeight,
|
4093
|
+
behavior: y ? "smooth" : "auto"
|
4092
4094
|
});
|
4093
4095
|
}
|
4094
4096
|
Mi(() => {
|
4095
4097
|
S(!1);
|
4096
4098
|
});
|
4097
4099
|
let { sessionId: L } = e;
|
4098
|
-
function
|
4099
|
-
return
|
4100
|
+
function z() {
|
4101
|
+
return Re(this, null, function* () {
|
4100
4102
|
if (!o.trim() || i) return;
|
4101
4103
|
if (!L) {
|
4102
4104
|
console.error("No session ID available");
|
4103
4105
|
return;
|
4104
4106
|
}
|
4105
|
-
const
|
4106
|
-
|
4107
|
+
const y = Date.now().toString(), H = Date.now().toString() + Math.random().toString().slice(2, 8), J = {
|
4108
|
+
sessionId: L,
|
4109
|
+
requestId: H,
|
4110
|
+
id: y,
|
4107
4111
|
type: "user",
|
4108
4112
|
content: o.trim(),
|
4109
4113
|
timestamp: Date.now()
|
4110
4114
|
};
|
4111
|
-
t(3, l = [...l,
|
4112
|
-
const
|
4115
|
+
t(3, l = [...l, J]);
|
4116
|
+
const ge = o.trim();
|
4113
4117
|
t(1, o = "");
|
4114
|
-
const
|
4118
|
+
const ue = (Date.now() + 1).toString();
|
4115
4119
|
a = "", t(3, l = [
|
4116
4120
|
...l,
|
4117
4121
|
{
|
4118
|
-
|
4122
|
+
sessionId: L,
|
4123
|
+
requestId: H,
|
4124
|
+
id: ue,
|
4119
4125
|
type: "assistant",
|
4120
4126
|
content: "",
|
4121
4127
|
timestamp: Date.now()
|
@@ -4126,45 +4132,45 @@ function fl(s, e, t) {
|
|
4126
4132
|
method: "POST",
|
4127
4133
|
headers: {
|
4128
4134
|
"Content-Type": "application/json",
|
4129
|
-
"Auth-Token": `${
|
4130
|
-
Authorization: `bearer ${
|
4135
|
+
"Auth-Token": `${ke()}`,
|
4136
|
+
Authorization: `bearer ${ke()}`
|
4131
4137
|
},
|
4132
4138
|
body: JSON.stringify({
|
4133
4139
|
sessionId: L,
|
4134
|
-
requestId:
|
4135
|
-
keyword:
|
4140
|
+
requestId: H,
|
4141
|
+
keyword: ge,
|
4136
4142
|
flowId: "1"
|
4137
4143
|
}),
|
4138
4144
|
signal: c.signal,
|
4139
|
-
onmessage(
|
4145
|
+
onmessage(ve) {
|
4140
4146
|
try {
|
4141
|
-
const
|
4142
|
-
if (
|
4143
|
-
const
|
4144
|
-
|
4147
|
+
const me = ve.data;
|
4148
|
+
if (me) {
|
4149
|
+
const Je = Bs(me);
|
4150
|
+
Je ? (t(3, l = l.map((_e) => _e.id === ue ? ye(ee({}, _e), { attachments: Je }) : _e)), S(!0)) : (a += me, t(3, l = l.map((_e) => _e.id === ue ? ye(ee({}, _e), { content: a }) : _e)), S(!1));
|
4145
4151
|
}
|
4146
|
-
} catch (
|
4147
|
-
console.error("Failed to process SSE message:",
|
4152
|
+
} catch (me) {
|
4153
|
+
console.error("Failed to process SSE message:", me);
|
4148
4154
|
}
|
4149
4155
|
},
|
4150
|
-
onerror(
|
4151
|
-
console.error("SSE error:",
|
4156
|
+
onerror(ve) {
|
4157
|
+
console.error("SSE error:", ve), c = null, t(7, d = !1);
|
4152
4158
|
},
|
4153
4159
|
onclose() {
|
4154
4160
|
c = null, t(7, d = !1);
|
4155
4161
|
}
|
4156
4162
|
});
|
4157
|
-
} catch (
|
4158
|
-
console.error("Failed to send message:",
|
4163
|
+
} catch (ve) {
|
4164
|
+
console.error("Failed to send message:", ve), t(7, d = !1);
|
4159
4165
|
}
|
4160
4166
|
});
|
4161
4167
|
}
|
4162
|
-
function v(
|
4163
|
-
const
|
4168
|
+
function v(y, H, J) {
|
4169
|
+
const ge = J.getBoundingClientRect(), ue = w.getBoundingClientRect(), ve = ge.left < ue.width / 2;
|
4164
4170
|
t(4, u = H), t(5, h = {
|
4165
|
-
x:
|
4166
|
-
y:
|
4167
|
-
alignRight:
|
4171
|
+
x: ge.left,
|
4172
|
+
y: ge.top + ge.height / 2,
|
4173
|
+
alignRight: ve
|
4168
4174
|
});
|
4169
4175
|
}
|
4170
4176
|
function _() {
|
@@ -4175,139 +4181,139 @@ function fl(s, e, t) {
|
|
4175
4181
|
200
|
4176
4182
|
));
|
4177
4183
|
}
|
4178
|
-
|
4184
|
+
zi(() => {
|
4179
4185
|
c && c.abort(), p && clearTimeout(p);
|
4180
4186
|
});
|
4181
|
-
function
|
4182
|
-
return
|
4187
|
+
function k(y, H) {
|
4188
|
+
return Re(this, null, function* () {
|
4183
4189
|
try {
|
4184
|
-
const
|
4190
|
+
const J = yield fetch("/aiops/aigc/file/downloadFile", {
|
4185
4191
|
method: "POST",
|
4186
4192
|
headers: {
|
4187
4193
|
"Content-Type": "application/json",
|
4188
|
-
"Auth-Token": `${
|
4189
|
-
Authorization: `bearer ${
|
4194
|
+
"Auth-Token": `${ke()}`,
|
4195
|
+
Authorization: `bearer ${ke()}`
|
4190
4196
|
},
|
4191
|
-
body: JSON.stringify({ fileName:
|
4197
|
+
body: JSON.stringify({ fileName: y, fileUrl: H })
|
4192
4198
|
});
|
4193
|
-
if (!
|
4199
|
+
if (!J.ok)
|
4194
4200
|
throw new Error("Download failed");
|
4195
|
-
const
|
4196
|
-
|
4197
|
-
} catch (
|
4198
|
-
console.error("Failed to download file:",
|
4201
|
+
const ge = J.headers.get("content-type") || "application/octet-stream", ue = yield J.blob(), ve = window.URL.createObjectURL(ue), me = document.createElement("a");
|
4202
|
+
me.href = ve, me.download = y, document.body.appendChild(me), me.click(), window.URL.revokeObjectURL(ve), document.body.removeChild(me);
|
4203
|
+
} catch (J) {
|
4204
|
+
console.error("Failed to download file:", J);
|
4199
4205
|
}
|
4200
4206
|
});
|
4201
4207
|
}
|
4202
|
-
let
|
4203
|
-
function A(
|
4204
|
-
return
|
4208
|
+
let T = {};
|
4209
|
+
function A(y, H) {
|
4210
|
+
return Re(this, null, function* () {
|
4205
4211
|
try {
|
4206
|
-
const
|
4212
|
+
const J = H.replace(/<br\s*\/?>/g, `
|
4207
4213
|
`).replace(
|
4208
4214
|
/\*\*(.*?)\*\*/g,
|
4209
4215
|
"$1"
|
4210
4216
|
// 移除加粗标记
|
4211
4217
|
).replace(/###/g, "").trim();
|
4212
|
-
yield navigator.clipboard.writeText(
|
4218
|
+
yield navigator.clipboard.writeText(J), t(9, T[y] = !0, T), setTimeout(
|
4213
4219
|
() => {
|
4214
|
-
t(9, y
|
4220
|
+
t(9, T[y] = !1, T), t(9, T);
|
4215
4221
|
},
|
4216
4222
|
1500
|
4217
4223
|
);
|
4218
|
-
} catch (
|
4219
|
-
console.error("Failed to copy:",
|
4224
|
+
} catch (J) {
|
4225
|
+
console.error("Failed to copy:", J);
|
4220
4226
|
}
|
4221
4227
|
});
|
4222
4228
|
}
|
4223
|
-
let
|
4224
|
-
function
|
4225
|
-
return
|
4226
|
-
if (
|
4227
|
-
t(10,
|
4229
|
+
let b = {}, C = {}, I = !1;
|
4230
|
+
function F(y, H) {
|
4231
|
+
return Re(this, null, function* () {
|
4232
|
+
if (b[y] === H) {
|
4233
|
+
t(10, b[y] = null, b), t(10, b);
|
4228
4234
|
return;
|
4229
4235
|
}
|
4230
|
-
if (t(10,
|
4236
|
+
if (t(10, b[y] = H, b), t(10, b), H === "like")
|
4231
4237
|
try {
|
4232
4238
|
if (!(yield fetch("/aiops/aigc/chat/record/feedback", {
|
4233
4239
|
method: "POST",
|
4234
4240
|
headers: {
|
4235
4241
|
"Content-Type": "application/json",
|
4236
|
-
"Auth-Token": `${
|
4237
|
-
Authorization: `bearer ${
|
4242
|
+
"Auth-Token": `${ke()}`,
|
4243
|
+
Authorization: `bearer ${ke()}`
|
4238
4244
|
},
|
4239
4245
|
body: JSON.stringify({
|
4240
4246
|
sessionId: L,
|
4241
|
-
requestId:
|
4247
|
+
requestId: y,
|
4242
4248
|
feedBackFlag: "1",
|
4243
4249
|
feedBackContent: "点赞"
|
4244
4250
|
})
|
4245
4251
|
})).ok)
|
4246
4252
|
throw new Error("Feedback failed");
|
4247
|
-
} catch (
|
4248
|
-
console.error("Failed to send feedback:",
|
4253
|
+
} catch (J) {
|
4254
|
+
console.error("Failed to send feedback:", J), t(10, b[y] = null, b), t(10, b);
|
4249
4255
|
}
|
4250
4256
|
else
|
4251
|
-
t(12,
|
4257
|
+
t(12, I = !0);
|
4252
4258
|
});
|
4253
4259
|
}
|
4254
|
-
function
|
4255
|
-
return
|
4260
|
+
function R(y) {
|
4261
|
+
return Re(this, null, function* () {
|
4256
4262
|
var H;
|
4257
|
-
if ((H = C[
|
4263
|
+
if ((H = C[y]) != null && H.trim())
|
4258
4264
|
try {
|
4259
4265
|
if (!(yield fetch("/aiops/aigc/chat/record/feedback", {
|
4260
4266
|
method: "POST",
|
4261
4267
|
headers: {
|
4262
4268
|
"Content-Type": "application/json",
|
4263
|
-
"Auth-Token": `${
|
4264
|
-
Authorization: `bearer ${
|
4269
|
+
"Auth-Token": `${ke()}`,
|
4270
|
+
Authorization: `bearer ${ke()}`
|
4265
4271
|
},
|
4266
4272
|
body: JSON.stringify({
|
4267
4273
|
sessionId: L,
|
4268
|
-
requestId:
|
4274
|
+
requestId: y,
|
4269
4275
|
feedBackFlag: "0",
|
4270
|
-
feedBackContent: C[
|
4276
|
+
feedBackContent: C[y]
|
4271
4277
|
})
|
4272
4278
|
})).ok)
|
4273
4279
|
throw new Error("Feedback failed");
|
4274
|
-
t(12,
|
4275
|
-
} catch (
|
4276
|
-
console.error("Failed to send feedback:",
|
4280
|
+
t(12, I = !1), t(11, C[y] = "", C), t(11, C);
|
4281
|
+
} catch (J) {
|
4282
|
+
console.error("Failed to send feedback:", J), t(10, b[y] = null, b), t(10, b);
|
4277
4283
|
}
|
4278
4284
|
});
|
4279
4285
|
}
|
4280
|
-
let
|
4281
|
-
function Z(
|
4282
|
-
const
|
4283
|
-
t(13,
|
4284
|
-
x:
|
4286
|
+
let j = { x: 0, y: 0 };
|
4287
|
+
function Z(y, H) {
|
4288
|
+
const ge = y.currentTarget.getBoundingClientRect();
|
4289
|
+
t(13, j = {
|
4290
|
+
x: ge.left - 290,
|
4285
4291
|
// 弹框宽度 + 间距
|
4286
|
-
y:
|
4292
|
+
y: ge.top - 160
|
4287
4293
|
// 弹框高度 + 间距
|
4288
|
-
}),
|
4294
|
+
}), F(H, "dislike");
|
4289
4295
|
}
|
4290
|
-
let
|
4291
|
-
function oe(
|
4292
|
-
const
|
4293
|
-
t(14,
|
4296
|
+
let X = null;
|
4297
|
+
function oe(y, H) {
|
4298
|
+
const ge = y.currentTarget.getBoundingClientRect();
|
4299
|
+
t(14, X = {
|
4294
4300
|
text: H,
|
4295
|
-
x:
|
4296
|
-
y:
|
4301
|
+
x: ge.left + ge.width / 2,
|
4302
|
+
y: ge.top - 8
|
4297
4303
|
});
|
4298
4304
|
}
|
4299
|
-
function
|
4300
|
-
t(14,
|
4305
|
+
function fe() {
|
4306
|
+
t(14, X = null);
|
4301
4307
|
}
|
4302
|
-
let
|
4303
|
-
function
|
4304
|
-
|
4308
|
+
let ce = !1, je = [], le = Date.now().toString();
|
4309
|
+
function qe() {
|
4310
|
+
fe(), t(15, ce = !0);
|
4305
4311
|
}
|
4306
|
-
function
|
4307
|
-
|
4312
|
+
function re() {
|
4313
|
+
fe(), t(15, ce = !1);
|
4308
4314
|
}
|
4309
|
-
function
|
4310
|
-
return
|
4315
|
+
function Ve(y) {
|
4316
|
+
return Re(this, null, function* () {
|
4311
4317
|
if (!d) {
|
4312
4318
|
t(7, d = !0);
|
4313
4319
|
try {
|
@@ -4315,22 +4321,23 @@ function fl(s, e, t) {
|
|
4315
4321
|
method: "POST",
|
4316
4322
|
headers: {
|
4317
4323
|
"Content-Type": "application/json",
|
4318
|
-
"Auth-Token": `${
|
4319
|
-
Authorization: `bearer ${
|
4324
|
+
"Auth-Token": `${ke()}`,
|
4325
|
+
Authorization: `bearer ${ke()}`
|
4320
4326
|
},
|
4321
|
-
body: JSON.stringify({ sessionId:
|
4327
|
+
body: JSON.stringify({ sessionId: y })
|
4322
4328
|
});
|
4323
4329
|
if (!H.ok)
|
4324
4330
|
throw new Error("Failed to load sessions");
|
4325
|
-
const
|
4326
|
-
if (
|
4327
|
-
|
4328
|
-
const
|
4329
|
-
const
|
4331
|
+
const J = yield H.json();
|
4332
|
+
if (J.code === 0) {
|
4333
|
+
le = y, t(15, ce = !1);
|
4334
|
+
const ge = J.data.map((ue, ve) => {
|
4335
|
+
const me = Bs(ue.answer), Je = ul(ue.answer);
|
4330
4336
|
return [
|
4331
4337
|
{
|
4332
4338
|
sessionId: ue.sessionId,
|
4333
4339
|
requestId: ue.requestId,
|
4340
|
+
id: (Date.now() + 2 * ve).toString(),
|
4334
4341
|
type: "user",
|
4335
4342
|
content: ue.keyword,
|
4336
4343
|
timestamp: new Date(ue.createDate).getTime()
|
@@ -4338,14 +4345,15 @@ function fl(s, e, t) {
|
|
4338
4345
|
{
|
4339
4346
|
sessionId: ue.sessionId,
|
4340
4347
|
requestId: ue.requestId,
|
4348
|
+
id: (Date.now() + 2 * ve + 1).toString(),
|
4341
4349
|
type: "assistant",
|
4342
|
-
content:
|
4343
|
-
attachments:
|
4350
|
+
content: Je,
|
4351
|
+
attachments: me,
|
4344
4352
|
timestamp: new Date(ue.createDate).getTime()
|
4345
4353
|
}
|
4346
4354
|
];
|
4347
4355
|
});
|
4348
|
-
t(3, l =
|
4356
|
+
t(3, l = ge.flat());
|
4349
4357
|
}
|
4350
4358
|
} catch (H) {
|
4351
4359
|
console.error("Failed to load sessions:", H);
|
@@ -4356,14 +4364,16 @@ function fl(s, e, t) {
|
|
4356
4364
|
});
|
4357
4365
|
}
|
4358
4366
|
function ie() {
|
4359
|
-
return
|
4360
|
-
const
|
4361
|
-
if (!
|
4367
|
+
return Re(this, null, function* () {
|
4368
|
+
const y = yield xe();
|
4369
|
+
if (!y) {
|
4362
4370
|
console.error("Failed to create new session");
|
4363
4371
|
return;
|
4364
4372
|
}
|
4365
|
-
|
4373
|
+
le = y, t(3, l = [
|
4366
4374
|
{
|
4375
|
+
sessionId: le,
|
4376
|
+
requestId: "",
|
4367
4377
|
id: "-1",
|
4368
4378
|
type: "assistant",
|
4369
4379
|
content: "您好!我是您的AI助手,有什么可以帮您的吗?",
|
@@ -4372,57 +4382,57 @@ function fl(s, e, t) {
|
|
4372
4382
|
]), t(1, o = "");
|
4373
4383
|
});
|
4374
4384
|
}
|
4375
|
-
function
|
4376
|
-
return
|
4385
|
+
function xe() {
|
4386
|
+
return Re(this, null, function* () {
|
4377
4387
|
try {
|
4378
|
-
const
|
4388
|
+
const y = yield fetch("/aiops/aigc/chat/getSessionId", {
|
4379
4389
|
method: "POST",
|
4380
4390
|
headers: {
|
4381
4391
|
"Content-Type": "application/json",
|
4382
|
-
"Auth-Token": `${
|
4383
|
-
Authorization: `bearer ${
|
4392
|
+
"Auth-Token": `${ke()}`,
|
4393
|
+
Authorization: `bearer ${ke()}`
|
4384
4394
|
}
|
4385
4395
|
});
|
4386
|
-
if (!
|
4396
|
+
if (!y.ok)
|
4387
4397
|
throw new Error("Failed to get session ID");
|
4388
|
-
const H = yield
|
4398
|
+
const H = yield y.json();
|
4389
4399
|
if (H.code === 0)
|
4390
|
-
return
|
4400
|
+
return le = H.data.sessionId, le;
|
4391
4401
|
throw new Error(H.message || "Failed to get session ID");
|
4392
|
-
} catch (
|
4393
|
-
return console.error("Failed to get session ID:",
|
4402
|
+
} catch (y) {
|
4403
|
+
return console.error("Failed to get session ID:", y), null;
|
4394
4404
|
}
|
4395
4405
|
});
|
4396
4406
|
}
|
4397
4407
|
let { zIndex: $ } = e;
|
4398
|
-
const
|
4408
|
+
const Me = (y, H) => v(H, y.tips, H.currentTarget), Te = (y) => k(y.content_title, y.link), Qe = () => {
|
4399
4409
|
p && (clearTimeout(p), t(6, p = null));
|
4400
4410
|
}, D = () => {
|
4401
4411
|
t(4, u = null);
|
4402
|
-
}, ne = (
|
4403
|
-
function
|
4404
|
-
C[
|
4405
|
-
}
|
4406
|
-
const
|
4407
|
-
t(12,
|
4408
|
-
},
|
4409
|
-
function
|
4410
|
-
kt[
|
4411
|
-
|
4412
|
+
}, ne = (y) => A(y.id, y.content), O = (y, H) => oe(H, T[y.id] ? "已复制" : "复制内容"), B = (y) => F(y.id, "like"), pe = (y, H) => oe(H, b[y.id] === "like" ? "取消点赞" : "点赞"), de = (y, H) => Z(H, y.id), ze = (y, H) => oe(H, b[y.id] === "dislike" ? "取消点踩" : "点踩");
|
4413
|
+
function Ne(y) {
|
4414
|
+
C[y.id] = this.value, t(11, C);
|
4415
|
+
}
|
4416
|
+
const et = (y) => {
|
4417
|
+
t(12, I = !1), t(10, b[y.id] = null, b), t(10, b);
|
4418
|
+
}, at = (y) => R(y.id);
|
4419
|
+
function ct(y) {
|
4420
|
+
kt[y ? "unshift" : "push"](() => {
|
4421
|
+
w = y, t(8, w);
|
4412
4422
|
});
|
4413
4423
|
}
|
4414
|
-
const Dt = (
|
4424
|
+
const Dt = (y) => oe(y, "历史会话"), Nt = (y) => oe(y, "新建会话");
|
4415
4425
|
function nn() {
|
4416
4426
|
o = this.value, t(1, o);
|
4417
4427
|
}
|
4418
|
-
const
|
4419
|
-
function
|
4420
|
-
kt[
|
4421
|
-
|
4428
|
+
const bt = (y) => y.key === "Enter" && !y.shiftKey && (z(), y.preventDefault()), nt = (y) => oe(y, "发送消息");
|
4429
|
+
function tt(y) {
|
4430
|
+
kt[y ? "unshift" : "push"](() => {
|
4431
|
+
w = y, t(8, w);
|
4422
4432
|
});
|
4423
4433
|
}
|
4424
|
-
return s.$$set = (
|
4425
|
-
"sessionId" in
|
4434
|
+
return s.$$set = (y) => {
|
4435
|
+
"sessionId" in y && t(33, L = y.sessionId), "zIndex" in y && t(0, $ = y.zIndex);
|
4426
4436
|
}, s.$$.update = () => {
|
4427
4437
|
s.$$.dirty[0] & /*message*/
|
4428
4438
|
2 && t(2, n = o.length), s.$$.dirty[0] & /*messageLength*/
|
@@ -4436,52 +4446,52 @@ function fl(s, e, t) {
|
|
4436
4446
|
h,
|
4437
4447
|
p,
|
4438
4448
|
d,
|
4439
|
-
|
4440
|
-
y,
|
4449
|
+
w,
|
4441
4450
|
T,
|
4451
|
+
b,
|
4442
4452
|
C,
|
4443
|
-
|
4444
|
-
|
4445
|
-
|
4446
|
-
|
4453
|
+
I,
|
4454
|
+
j,
|
4455
|
+
X,
|
4456
|
+
ce,
|
4447
4457
|
i,
|
4448
4458
|
g,
|
4449
|
-
|
4459
|
+
z,
|
4450
4460
|
v,
|
4451
4461
|
_,
|
4452
|
-
|
4462
|
+
k,
|
4453
4463
|
A,
|
4454
|
-
|
4455
|
-
|
4464
|
+
F,
|
4465
|
+
R,
|
4456
4466
|
Z,
|
4457
4467
|
oe,
|
4458
|
-
|
4459
|
-
He,
|
4468
|
+
fe,
|
4460
4469
|
je,
|
4461
|
-
|
4462
|
-
|
4470
|
+
qe,
|
4471
|
+
re,
|
4472
|
+
Ve,
|
4463
4473
|
ie,
|
4464
4474
|
L,
|
4465
|
-
|
4466
|
-
|
4467
|
-
|
4475
|
+
Me,
|
4476
|
+
Te,
|
4477
|
+
Qe,
|
4468
4478
|
D,
|
4469
4479
|
ne,
|
4470
|
-
|
4471
|
-
|
4472
|
-
|
4473
|
-
|
4474
|
-
|
4475
|
-
|
4476
|
-
|
4477
|
-
rt,
|
4480
|
+
O,
|
4481
|
+
B,
|
4482
|
+
pe,
|
4483
|
+
de,
|
4484
|
+
ze,
|
4485
|
+
Ne,
|
4486
|
+
et,
|
4478
4487
|
at,
|
4488
|
+
ct,
|
4479
4489
|
Dt,
|
4480
|
-
|
4490
|
+
Nt,
|
4481
4491
|
nn,
|
4482
|
-
|
4483
|
-
|
4484
|
-
|
4492
|
+
bt,
|
4493
|
+
nt,
|
4494
|
+
tt
|
4485
4495
|
];
|
4486
4496
|
}
|
4487
4497
|
class hl extends Mn {
|
@@ -4493,160 +4503,195 @@ function Us(s) {
|
|
4493
4503
|
let e, t, n, i, o = (
|
4494
4504
|
/*mergedOptions*/
|
4495
4505
|
s[3].title + ""
|
4496
|
-
), l, a, c, u, h, p, d, g,
|
4506
|
+
), l, a, c, u, h, p, d, g, w, S = (
|
4497
4507
|
/*isFullscreen*/
|
4498
4508
|
s[2] ? "退出全屏" : "全屏显示"
|
4499
|
-
), L,
|
4509
|
+
), L, z, v, _, k, T, A, b, C = (
|
4500
4510
|
/*isSnapped*/
|
4501
4511
|
s[7] ? "取消吸附" : "吸附到边缘"
|
4502
|
-
),
|
4503
|
-
s[3].height}px`,
|
4504
|
-
function
|
4512
|
+
), I, F, R, j, Z, X, oe, fe, ce, je = `${/*mergedOptions*/
|
4513
|
+
s[3].height}px`, le, qe, re;
|
4514
|
+
function Ve(O, B) {
|
4505
4515
|
return (
|
4506
4516
|
/*isFullscreen*/
|
4507
|
-
|
4517
|
+
O[2] ? dl : pl
|
4508
4518
|
);
|
4509
4519
|
}
|
4510
|
-
let ie =
|
4511
|
-
function $(
|
4520
|
+
let ie = Ve(s), xe = ie(s);
|
4521
|
+
function $(O, B) {
|
4512
4522
|
return (
|
4513
4523
|
/*isSnapped*/
|
4514
|
-
|
4524
|
+
O[7] ? ml : gl
|
4515
4525
|
);
|
4516
4526
|
}
|
4517
|
-
let
|
4518
|
-
const
|
4519
|
-
function ne(
|
4527
|
+
let Me = $(s), Te = Me(s);
|
4528
|
+
const Qe = [kl, wl], D = [];
|
4529
|
+
function ne(O, B) {
|
4520
4530
|
return (
|
4521
4531
|
/*showHistory*/
|
4522
|
-
|
4532
|
+
O[8] ? 0 : 1
|
4523
4533
|
);
|
4524
4534
|
}
|
4525
|
-
return
|
4535
|
+
return fe = ne(s), ce = D[fe] = Qe[fe](s), {
|
4526
4536
|
c() {
|
4527
|
-
|
4528
|
-
|
4537
|
+
var O, B, pe;
|
4538
|
+
e = x("div"), t = x("div"), n = x("div"), i = x("h3"), l = Se(o), a = q(), c = x("div"), u = x("div"), h = x("button"), p = V("svg"), xe.c(), g = q(), w = x("span"), L = Se(S), z = q(), v = x("div"), _ = x("button"), k = V("svg"), Te.c(), A = q(), b = x("span"), I = Se(C), F = q(), R = x("div"), j = x("button"), j.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', Z = q(), X = x("span"), X.textContent = "关闭助手", oe = q(), ce.c(), r(i, "class", "svelte-1427avp"), r(p, "xmlns", "http://www.w3.org/2000/svg"), r(p, "width", "18"), r(p, "height", "18"), r(p, "viewBox", "0 0 24 24"), r(p, "fill", "none"), r(p, "stroke", "currentColor"), r(p, "stroke-width", "2"), r(p, "stroke-linecap", "round"), r(p, "stroke-linejoin", "round"), r(h, "class", "sy-assistant-action-button svelte-1427avp"), r(h, "aria-label", d = /*isFullscreen*/
|
4539
|
+
s[2] ? "退出全屏" : "全屏显示"), Q(
|
4529
4540
|
h,
|
4530
4541
|
"active",
|
4531
4542
|
/*isFullscreen*/
|
4532
4543
|
s[2]
|
4533
|
-
), r(
|
4534
|
-
|
4544
|
+
), r(w, "class", "sy-assistant-tooltip svelte-1427avp"), N(
|
4545
|
+
w,
|
4546
|
+
"z-index",
|
4547
|
+
/*mergedOptions*/
|
4548
|
+
(O = s[3].zIndex) != null ? O : 1e3
|
4549
|
+
), r(u, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(k, "xmlns", "http://www.w3.org/2000/svg"), r(k, "width", "18"), r(k, "height", "18"), r(k, "viewBox", "0 0 24 24"), r(k, "fill", "none"), r(k, "stroke", "currentColor"), r(k, "stroke-width", "2"), r(k, "stroke-linecap", "round"), r(k, "stroke-linejoin", "round"), r(_, "class", "sy-assistant-action-button svelte-1427avp"), r(_, "aria-label", T = /*isSnapped*/
|
4550
|
+
s[7] ? "取消吸附" : "吸附到边缘"), Q(
|
4535
4551
|
_,
|
4536
4552
|
"active",
|
4537
4553
|
/*isSnapped*/
|
4538
4554
|
s[7]
|
4539
|
-
), r(
|
4555
|
+
), r(b, "class", "sy-assistant-tooltip svelte-1427avp"), N(
|
4556
|
+
b,
|
4557
|
+
"z-index",
|
4558
|
+
/*mergedOptions*/
|
4559
|
+
(B = s[3].zIndex) != null ? B : 1e3
|
4560
|
+
), r(v, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(j, "class", "sy-assistant-close-button svelte-1427avp"), r(j, "aria-label", "关闭助手"), r(X, "class", "sy-assistant-tooltip svelte-1427avp"), N(
|
4561
|
+
X,
|
4562
|
+
"z-index",
|
4563
|
+
/*mergedOptions*/
|
4564
|
+
(pe = s[3].zIndex) != null ? pe : 1e3
|
4565
|
+
), r(R, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(c, "class", "sy-assistant-header-actions svelte-1427avp"), r(n, "class", "sy-assistant-drawer-header svelte-1427avp"), r(n, "role", "button"), r(n, "tabindex", "0"), r(n, "aria-label", "拖动助手窗口"), Q(
|
4540
4566
|
n,
|
4541
4567
|
"dragging",
|
4542
4568
|
/*isDragging*/
|
4543
4569
|
s[6]
|
4544
|
-
),
|
4570
|
+
), Q(
|
4545
4571
|
n,
|
4546
4572
|
"fullscreen",
|
4547
4573
|
/*isFullscreen*/
|
4548
4574
|
s[2]
|
4549
|
-
),
|
4575
|
+
), Q(
|
4550
4576
|
n,
|
4551
4577
|
"snapped",
|
4552
4578
|
/*isSnapped*/
|
4553
4579
|
s[7]
|
4554
|
-
), r(t, "class", "sy-assistant-drawer-content svelte-1427avp"), r(e, "class", "sy-assistant-drawer svelte-1427avp"),
|
4580
|
+
), r(t, "class", "sy-assistant-drawer-content svelte-1427avp"), r(e, "class", "sy-assistant-drawer svelte-1427avp"), Q(
|
4555
4581
|
e,
|
4556
4582
|
"fullscreen",
|
4557
4583
|
/*isFullscreen*/
|
4558
4584
|
s[2]
|
4559
|
-
),
|
4585
|
+
), N(e, "height", je);
|
4560
4586
|
},
|
4561
|
-
m(
|
4562
|
-
|
4563
|
-
|
4587
|
+
m(O, B) {
|
4588
|
+
G(O, e, B), m(e, t), m(t, n), m(n, i), m(i, l), m(n, a), m(n, c), m(c, u), m(u, h), m(h, p), xe.m(p, null), m(u, g), m(u, w), m(w, L), m(c, z), m(c, v), m(v, _), m(_, k), Te.m(k, null), m(v, A), m(v, b), m(b, I), m(c, F), m(c, R), m(R, j), m(R, Z), m(R, X), m(t, oe), D[fe].m(t, null), le = !0, qe || (re = [
|
4589
|
+
U(
|
4564
4590
|
h,
|
4565
4591
|
"click",
|
4566
4592
|
/*toggleFullscreen*/
|
4567
4593
|
s[16]
|
4568
4594
|
),
|
4569
|
-
|
4595
|
+
U(
|
4570
4596
|
_,
|
4571
4597
|
"click",
|
4572
4598
|
/*toggleSnap*/
|
4573
4599
|
s[18]
|
4574
4600
|
),
|
4575
|
-
|
4576
|
-
|
4601
|
+
U(
|
4602
|
+
j,
|
4577
4603
|
"click",
|
4578
4604
|
/*toggleDrawer*/
|
4579
4605
|
s[15]
|
4580
4606
|
),
|
4581
|
-
|
4607
|
+
U(n, "mousedown", Ys(
|
4582
4608
|
/*handleDragStartWhenNotFullscreen*/
|
4583
4609
|
s[17]
|
4584
4610
|
))
|
4585
|
-
],
|
4611
|
+
], qe = !0);
|
4586
4612
|
},
|
4587
|
-
p(
|
4588
|
-
|
4613
|
+
p(O, B) {
|
4614
|
+
var de, ze, Ne;
|
4615
|
+
(!le || B[0] & /*mergedOptions*/
|
4589
4616
|
8) && o !== (o = /*mergedOptions*/
|
4590
|
-
|
4617
|
+
O[3].title + "") && He(l, o), ie !== (ie = Ve(O)) && (xe.d(1), xe = ie(O), xe && (xe.c(), xe.m(p, null))), (!le || B[0] & /*isFullscreen*/
|
4591
4618
|
4 && d !== (d = /*isFullscreen*/
|
4592
|
-
|
4593
|
-
4) &&
|
4619
|
+
O[2] ? "退出全屏" : "全屏显示")) && r(h, "aria-label", d), (!le || B[0] & /*isFullscreen*/
|
4620
|
+
4) && Q(
|
4594
4621
|
h,
|
4595
4622
|
"active",
|
4596
4623
|
/*isFullscreen*/
|
4597
|
-
|
4598
|
-
), (!
|
4624
|
+
O[2]
|
4625
|
+
), (!le || B[0] & /*isFullscreen*/
|
4599
4626
|
4) && S !== (S = /*isFullscreen*/
|
4600
|
-
|
4601
|
-
|
4602
|
-
|
4603
|
-
|
4627
|
+
O[2] ? "退出全屏" : "全屏显示") && He(L, S), B[0] & /*mergedOptions*/
|
4628
|
+
8 && N(
|
4629
|
+
w,
|
4630
|
+
"z-index",
|
4631
|
+
/*mergedOptions*/
|
4632
|
+
(de = O[3].zIndex) != null ? de : 1e3
|
4633
|
+
), Me !== (Me = $(O)) && (Te.d(1), Te = Me(O), Te && (Te.c(), Te.m(k, null))), (!le || B[0] & /*isSnapped*/
|
4634
|
+
128 && T !== (T = /*isSnapped*/
|
4635
|
+
O[7] ? "取消吸附" : "吸附到边缘")) && r(_, "aria-label", T), (!le || B[0] & /*isSnapped*/
|
4636
|
+
128) && Q(
|
4604
4637
|
_,
|
4605
4638
|
"active",
|
4606
4639
|
/*isSnapped*/
|
4607
|
-
|
4608
|
-
), (!
|
4640
|
+
O[7]
|
4641
|
+
), (!le || B[0] & /*isSnapped*/
|
4609
4642
|
128) && C !== (C = /*isSnapped*/
|
4610
|
-
|
4611
|
-
|
4643
|
+
O[7] ? "取消吸附" : "吸附到边缘") && He(I, C), B[0] & /*mergedOptions*/
|
4644
|
+
8 && N(
|
4645
|
+
b,
|
4646
|
+
"z-index",
|
4647
|
+
/*mergedOptions*/
|
4648
|
+
(ze = O[3].zIndex) != null ? ze : 1e3
|
4649
|
+
), B[0] & /*mergedOptions*/
|
4650
|
+
8 && N(
|
4651
|
+
X,
|
4652
|
+
"z-index",
|
4653
|
+
/*mergedOptions*/
|
4654
|
+
(Ne = O[3].zIndex) != null ? Ne : 1e3
|
4655
|
+
), (!le || B[0] & /*isDragging*/
|
4656
|
+
64) && Q(
|
4612
4657
|
n,
|
4613
4658
|
"dragging",
|
4614
4659
|
/*isDragging*/
|
4615
|
-
|
4616
|
-
), (!
|
4617
|
-
4) &&
|
4660
|
+
O[6]
|
4661
|
+
), (!le || B[0] & /*isFullscreen*/
|
4662
|
+
4) && Q(
|
4618
4663
|
n,
|
4619
4664
|
"fullscreen",
|
4620
4665
|
/*isFullscreen*/
|
4621
|
-
|
4622
|
-
), (!
|
4623
|
-
128) &&
|
4666
|
+
O[2]
|
4667
|
+
), (!le || B[0] & /*isSnapped*/
|
4668
|
+
128) && Q(
|
4624
4669
|
n,
|
4625
4670
|
"snapped",
|
4626
4671
|
/*isSnapped*/
|
4627
|
-
|
4672
|
+
O[7]
|
4628
4673
|
);
|
4629
|
-
let
|
4630
|
-
|
4631
|
-
D[
|
4632
|
-
}),
|
4633
|
-
4) &&
|
4674
|
+
let pe = fe;
|
4675
|
+
fe = ne(O), fe === pe ? D[fe].p(O, B) : (In(), $e(D[pe], 1, 1, () => {
|
4676
|
+
D[pe] = null;
|
4677
|
+
}), Rn(), ce = D[fe], ce ? ce.p(O, B) : (ce = D[fe] = Qe[fe](O), ce.c()), Be(ce, 1), ce.m(t, null)), (!le || B[0] & /*isFullscreen*/
|
4678
|
+
4) && Q(
|
4634
4679
|
e,
|
4635
4680
|
"fullscreen",
|
4636
4681
|
/*isFullscreen*/
|
4637
|
-
|
4638
|
-
),
|
4639
|
-
8 &&
|
4640
|
-
|
4682
|
+
O[2]
|
4683
|
+
), B[0] & /*mergedOptions*/
|
4684
|
+
8 && je !== (je = `${/*mergedOptions*/
|
4685
|
+
O[3].height}px`) && N(e, "height", je);
|
4641
4686
|
},
|
4642
|
-
i(
|
4643
|
-
|
4687
|
+
i(O) {
|
4688
|
+
le || (Be(ce), le = !0);
|
4644
4689
|
},
|
4645
|
-
o(
|
4646
|
-
|
4690
|
+
o(O) {
|
4691
|
+
$e(ce), le = !1;
|
4647
4692
|
},
|
4648
|
-
d(
|
4649
|
-
|
4693
|
+
d(O) {
|
4694
|
+
O && W(e), xe.d(), Te.d(), D[fe].d(), qe = !1, Ae(re);
|
4650
4695
|
}
|
4651
4696
|
};
|
4652
4697
|
}
|
@@ -4654,13 +4699,13 @@ function pl(s) {
|
|
4654
4699
|
let e;
|
4655
4700
|
return {
|
4656
4701
|
c() {
|
4657
|
-
e =
|
4702
|
+
e = V("path"), r(e, "d", "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3");
|
4658
4703
|
},
|
4659
4704
|
m(t, n) {
|
4660
|
-
|
4705
|
+
G(t, e, n);
|
4661
4706
|
},
|
4662
4707
|
d(t) {
|
4663
|
-
t &&
|
4708
|
+
t && W(e);
|
4664
4709
|
}
|
4665
4710
|
};
|
4666
4711
|
}
|
@@ -4668,13 +4713,13 @@ function dl(s) {
|
|
4668
4713
|
let e;
|
4669
4714
|
return {
|
4670
4715
|
c() {
|
4671
|
-
e =
|
4716
|
+
e = V("path"), r(e, "d", "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3");
|
4672
4717
|
},
|
4673
4718
|
m(t, n) {
|
4674
|
-
|
4719
|
+
G(t, e, n);
|
4675
4720
|
},
|
4676
4721
|
d(t) {
|
4677
|
-
t &&
|
4722
|
+
t && W(e);
|
4678
4723
|
}
|
4679
4724
|
};
|
4680
4725
|
}
|
@@ -4682,13 +4727,13 @@ function gl(s) {
|
|
4682
4727
|
let e, t;
|
4683
4728
|
return {
|
4684
4729
|
c() {
|
4685
|
-
e =
|
4730
|
+
e = V("rect"), t = V("line"), r(e, "x", "3"), r(e, "y", "3"), r(e, "width", "18"), r(e, "height", "18"), r(e, "rx", "2"), r(e, "ry", "2"), r(t, "x1", "16"), r(t, "y1", "6"), r(t, "x2", "16"), r(t, "y2", "18");
|
4686
4731
|
},
|
4687
4732
|
m(n, i) {
|
4688
|
-
|
4733
|
+
G(n, e, i), G(n, t, i);
|
4689
4734
|
},
|
4690
4735
|
d(n) {
|
4691
|
-
n && (
|
4736
|
+
n && (W(e), W(t));
|
4692
4737
|
}
|
4693
4738
|
};
|
4694
4739
|
}
|
@@ -4696,17 +4741,17 @@ function ml(s) {
|
|
4696
4741
|
let e, t;
|
4697
4742
|
return {
|
4698
4743
|
c() {
|
4699
|
-
e =
|
4744
|
+
e = V("rect"), t = V("rect"), r(e, "x", "3"), r(e, "y", "3"), r(e, "width", "18"), r(e, "height", "18"), r(e, "rx", "2"), r(e, "ry", "2"), r(t, "x", "12"), r(t, "y", "10"), r(t, "width", "6"), r(t, "height", "8"), r(t, "rx", "1"), r(t, "ry", "1");
|
4700
4745
|
},
|
4701
4746
|
m(n, i) {
|
4702
|
-
|
4747
|
+
G(n, e, i), G(n, t, i);
|
4703
4748
|
},
|
4704
4749
|
d(n) {
|
4705
|
-
n && (
|
4750
|
+
n && (W(e), W(t));
|
4706
4751
|
}
|
4707
4752
|
};
|
4708
4753
|
}
|
4709
|
-
function
|
4754
|
+
function wl(s) {
|
4710
4755
|
var n;
|
4711
4756
|
let e, t;
|
4712
4757
|
return e = new hl({
|
@@ -4737,17 +4782,17 @@ function kl(s) {
|
|
4737
4782
|
i[9]), e.$set(l);
|
4738
4783
|
},
|
4739
4784
|
i(i) {
|
4740
|
-
t || (
|
4785
|
+
t || (Be(e.$$.fragment, i), t = !0);
|
4741
4786
|
},
|
4742
4787
|
o(i) {
|
4743
|
-
|
4788
|
+
$e(e.$$.fragment, i), t = !1;
|
4744
4789
|
},
|
4745
4790
|
d(i) {
|
4746
4791
|
en(e, i);
|
4747
4792
|
}
|
4748
4793
|
};
|
4749
4794
|
}
|
4750
|
-
function
|
4795
|
+
function kl(s) {
|
4751
4796
|
var n;
|
4752
4797
|
let e, t;
|
4753
4798
|
return e = new pi({
|
@@ -4786,10 +4831,10 @@ function wl(s) {
|
|
4786
4831
|
(a = i[3].zIndex) != null ? a : 1e3), e.$set(l);
|
4787
4832
|
},
|
4788
4833
|
i(i) {
|
4789
|
-
t || (
|
4834
|
+
t || (Be(e.$$.fragment, i), t = !0);
|
4790
4835
|
},
|
4791
4836
|
o(i) {
|
4792
|
-
|
4837
|
+
$e(e.$$.fragment, i), t = !1;
|
4793
4838
|
},
|
4794
4839
|
d(i) {
|
4795
4840
|
en(e, i);
|
@@ -4798,143 +4843,143 @@ function wl(s) {
|
|
4798
4843
|
}
|
4799
4844
|
function _l(s) {
|
4800
4845
|
let e, t, n = `${/*$drawerWidth*/
|
4801
|
-
s[12]}px`, i, o, l, a, c, u, h, p, d, g,
|
4846
|
+
s[12]}px`, i, o, l, a, c, u, h, p, d, g, w, S, L, z, v = (
|
4802
4847
|
/*$drawerWidth*/
|
4803
4848
|
s[12] > 0 && Us(s)
|
4804
4849
|
);
|
4805
4850
|
return {
|
4806
4851
|
c() {
|
4807
|
-
var _,
|
4808
|
-
e = x("div"), t = x("div"), v && v.c(), i =
|
4852
|
+
var _, k;
|
4853
|
+
e = x("div"), t = x("div"), v && v.c(), i = q(), o = x("button"), l = V("svg"), a = V("path"), c = V("path"), u = V("path"), h = V("path"), p = V("path"), d = V("path"), g = V("path"), r(t, "class", "sy-assistant-drawer-wrapper svelte-1427avp"), Q(
|
4809
4854
|
t,
|
4810
4855
|
"fullscreen",
|
4811
4856
|
/*isFullscreen*/
|
4812
4857
|
s[2]
|
4813
|
-
),
|
4858
|
+
), N(t, "width", n), r(a, "d", "M896.512 698.88H132.608c-58.88 0-107.008-48.128-107.008-107.008v-10.24c0-58.88 48.128-107.008 107.008-107.008h763.904c58.88 0 107.008 48.128 107.008 107.008v10.24c0 58.88-48.128 107.008-107.008 107.008zM496.64 201.728h35.84v117.248h-35.84z"), r(a, "fill", "#6F8698"), r(c, "d", "M516.608 223.744h-4.608c-37.888 0-68.096-30.72-68.096-68.096v-6.656c0-37.888 30.72-68.096 68.096-68.096h4.608c37.888 0 68.096 30.72 68.096 68.096v6.656c0.512 37.888-30.208 68.096-68.096 68.096z"), r(c, "fill", "#3677FF"), r(u, "d", "M573.44 944.64H450.56c-181.248 0-327.68-146.432-327.68-327.68v-4.096c0-181.248 146.432-327.68 327.68-327.68h122.88c181.248 0 327.68 146.432 327.68 327.68v4.096c0 180.224-146.432 327.68-327.68 327.68z"), r(u, "fill", "#D0D5F1"), r(h, "d", "M681.984 715.264H347.136c-72.704 0-131.584-58.88-131.584-131.584s58.88-131.584 131.584-131.584h334.336c72.704 0 131.584 58.88 131.584 131.584 0.512 72.704-58.368 131.584-131.072 131.584z"), r(h, "fill", "#3677FF"), r(p, "d", "M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), r(p, "fill", "#FFFFFF"), r(d, "d", "M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), r(d, "fill", "#FFFFFF"), r(g, "d", "M443.392 799.232s2.56 58.88 68.096 58.88c58.88 0 69.632-61.952 69.632-61.952s-27.136 33.28-68.096 33.28c-42.496 0-69.632-30.208-69.632-30.208z"), r(g, "fill", "#8896A4"), r(l, "class", "sy-assistant-icon"), r(l, "viewBox", "0 0 1024 1024"), r(l, "version", "1.1"), r(l, "xmlns", "http://www.w3.org/2000/svg"), r(l, "width", "32"), r(l, "height", "32"), r(l, "fill", "currentColor"), r(l, "aria-label", "助手图标"), r(o, "class", "sy-assistant-floating-button svelte-1427avp"), r(o, "aria-label", "打开助手"), r(o, "style", w = /*buttonStyle*/
|
4814
4859
|
s[10] + " z-index: " + /*mergedOptions*/
|
4815
|
-
(((_ = s[3].zIndex) != null ? _ : 1e3) + 1) + ";"), r(e, "class", "sy-assistant-container sy-assistant-theme svelte-1427avp"),
|
4860
|
+
(((_ = s[3].zIndex) != null ? _ : 1e3) + 1) + ";"), r(e, "class", "sy-assistant-container sy-assistant-theme svelte-1427avp"), Q(
|
4816
4861
|
e,
|
4817
4862
|
"fullscreen",
|
4818
4863
|
/*isFullscreen*/
|
4819
4864
|
s[2]
|
4820
|
-
),
|
4865
|
+
), Q(
|
4821
4866
|
e,
|
4822
4867
|
"snapped",
|
4823
4868
|
/*isSnapped*/
|
4824
4869
|
s[7]
|
4825
|
-
),
|
4870
|
+
), N(
|
4826
4871
|
e,
|
4827
4872
|
"position",
|
4828
4873
|
/*mergedOptions*/
|
4829
4874
|
s[3].position
|
4830
|
-
),
|
4875
|
+
), N(
|
4831
4876
|
e,
|
4832
4877
|
"right",
|
4833
4878
|
/*isSnapped*/
|
4834
4879
|
s[7] ? 0 : `${/*right*/
|
4835
4880
|
s[0]}px`
|
4836
|
-
),
|
4881
|
+
), N(
|
4837
4882
|
e,
|
4838
4883
|
"bottom",
|
4839
4884
|
/*isSnapped*/
|
4840
4885
|
s[7] ? 0 : `${/*bottom*/
|
4841
4886
|
s[1]}px`
|
4842
|
-
),
|
4887
|
+
), N(
|
4843
4888
|
e,
|
4844
4889
|
"top",
|
4845
4890
|
/*isSnapped*/
|
4846
4891
|
s[7] || /*isFullscreen*/
|
4847
4892
|
s[2] ? "0" : "auto"
|
4848
|
-
),
|
4893
|
+
), N(
|
4849
4894
|
e,
|
4850
4895
|
"left",
|
4851
4896
|
/*isFullscreen*/
|
4852
4897
|
s[2] ? "0" : "auto"
|
4853
|
-
),
|
4898
|
+
), N(
|
4854
4899
|
e,
|
4855
4900
|
"z-index",
|
4856
4901
|
/*mergedOptions*/
|
4857
|
-
(
|
4902
|
+
(k = s[3].zIndex) != null ? k : 1e3
|
4858
4903
|
);
|
4859
4904
|
},
|
4860
|
-
m(_,
|
4861
|
-
|
4862
|
-
|
4905
|
+
m(_, k) {
|
4906
|
+
G(_, e, k), m(e, t), v && v.m(t, null), m(e, i), m(e, o), m(o, l), m(l, a), m(l, c), m(l, u), m(l, h), m(l, p), m(l, d), m(l, g), s[27](o), s[29](e), S = !0, L || (z = [
|
4907
|
+
U(
|
4863
4908
|
o,
|
4864
4909
|
"click",
|
4865
4910
|
/*toggleDrawer*/
|
4866
4911
|
s[15]
|
4867
4912
|
),
|
4868
|
-
|
4913
|
+
U(o, "mousedown", Ys(
|
4869
4914
|
/*mousedown_handler*/
|
4870
4915
|
s[28]
|
4871
4916
|
))
|
4872
4917
|
], L = !0);
|
4873
4918
|
},
|
4874
|
-
p(_,
|
4875
|
-
var
|
4919
|
+
p(_, k) {
|
4920
|
+
var T, A;
|
4876
4921
|
/*$drawerWidth*/
|
4877
|
-
_[12] > 0 ? v ? (v.p(_,
|
4878
|
-
4096 &&
|
4922
|
+
_[12] > 0 ? v ? (v.p(_, k), k[0] & /*$drawerWidth*/
|
4923
|
+
4096 && Be(v, 1)) : (v = Us(_), v.c(), Be(v, 1), v.m(t, null)) : v && (In(), $e(v, 1, 1, () => {
|
4879
4924
|
v = null;
|
4880
|
-
}),
|
4881
|
-
4) &&
|
4925
|
+
}), Rn()), (!S || k[0] & /*isFullscreen*/
|
4926
|
+
4) && Q(
|
4882
4927
|
t,
|
4883
4928
|
"fullscreen",
|
4884
4929
|
/*isFullscreen*/
|
4885
4930
|
_[2]
|
4886
|
-
),
|
4931
|
+
), k[0] & /*$drawerWidth*/
|
4887
4932
|
4096 && n !== (n = `${/*$drawerWidth*/
|
4888
|
-
_[12]}px`) &&
|
4889
|
-
1032 &&
|
4933
|
+
_[12]}px`) && N(t, "width", n), (!S || k[0] & /*buttonStyle, mergedOptions*/
|
4934
|
+
1032 && w !== (w = /*buttonStyle*/
|
4890
4935
|
_[10] + " z-index: " + /*mergedOptions*/
|
4891
|
-
(((
|
4892
|
-
4) &&
|
4936
|
+
(((T = _[3].zIndex) != null ? T : 1e3) + 1) + ";")) && r(o, "style", w), (!S || k[0] & /*isFullscreen*/
|
4937
|
+
4) && Q(
|
4893
4938
|
e,
|
4894
4939
|
"fullscreen",
|
4895
4940
|
/*isFullscreen*/
|
4896
4941
|
_[2]
|
4897
|
-
), (!S ||
|
4898
|
-
128) &&
|
4942
|
+
), (!S || k[0] & /*isSnapped*/
|
4943
|
+
128) && Q(
|
4899
4944
|
e,
|
4900
4945
|
"snapped",
|
4901
4946
|
/*isSnapped*/
|
4902
4947
|
_[7]
|
4903
|
-
),
|
4904
|
-
8 &&
|
4948
|
+
), k[0] & /*mergedOptions*/
|
4949
|
+
8 && N(
|
4905
4950
|
e,
|
4906
4951
|
"position",
|
4907
4952
|
/*mergedOptions*/
|
4908
4953
|
_[3].position
|
4909
|
-
),
|
4910
|
-
129 &&
|
4954
|
+
), k[0] & /*isSnapped, right*/
|
4955
|
+
129 && N(
|
4911
4956
|
e,
|
4912
4957
|
"right",
|
4913
4958
|
/*isSnapped*/
|
4914
4959
|
_[7] ? 0 : `${/*right*/
|
4915
4960
|
_[0]}px`
|
4916
|
-
),
|
4917
|
-
130 &&
|
4961
|
+
), k[0] & /*isSnapped, bottom*/
|
4962
|
+
130 && N(
|
4918
4963
|
e,
|
4919
4964
|
"bottom",
|
4920
4965
|
/*isSnapped*/
|
4921
4966
|
_[7] ? 0 : `${/*bottom*/
|
4922
4967
|
_[1]}px`
|
4923
|
-
),
|
4924
|
-
132 &&
|
4968
|
+
), k[0] & /*isSnapped, isFullscreen*/
|
4969
|
+
132 && N(
|
4925
4970
|
e,
|
4926
4971
|
"top",
|
4927
4972
|
/*isSnapped*/
|
4928
4973
|
_[7] || /*isFullscreen*/
|
4929
4974
|
_[2] ? "0" : "auto"
|
4930
|
-
),
|
4931
|
-
4 &&
|
4975
|
+
), k[0] & /*isFullscreen*/
|
4976
|
+
4 && N(
|
4932
4977
|
e,
|
4933
4978
|
"left",
|
4934
4979
|
/*isFullscreen*/
|
4935
4980
|
_[2] ? "0" : "auto"
|
4936
|
-
),
|
4937
|
-
8 &&
|
4981
|
+
), k[0] & /*mergedOptions*/
|
4982
|
+
8 && N(
|
4938
4983
|
e,
|
4939
4984
|
"z-index",
|
4940
4985
|
/*mergedOptions*/
|
@@ -4942,19 +4987,19 @@ function _l(s) {
|
|
4942
4987
|
);
|
4943
4988
|
},
|
4944
4989
|
i(_) {
|
4945
|
-
S || (
|
4990
|
+
S || (Be(v), S = !0);
|
4946
4991
|
},
|
4947
4992
|
o(_) {
|
4948
|
-
|
4993
|
+
$e(v), S = !1;
|
4949
4994
|
},
|
4950
4995
|
d(_) {
|
4951
|
-
_ &&
|
4996
|
+
_ && W(e), v && v.d(), s[27](null), s[29](null), L = !1, Ae(z);
|
4952
4997
|
}
|
4953
4998
|
};
|
4954
4999
|
}
|
4955
|
-
const mn = 48,
|
5000
|
+
const mn = 48, he = 20;
|
4956
5001
|
function bl(s, e, t) {
|
4957
|
-
let n, i, o, l, a =
|
5002
|
+
let n, i, o, l, a = De, c = () => (a(), a = Ii(i, (D) => t(12, l = D)), i);
|
4958
5003
|
s.$$.on_destroy.push(() => a());
|
4959
5004
|
const u = {
|
4960
5005
|
position: "fixed",
|
@@ -4962,23 +5007,23 @@ function bl(s, e, t) {
|
|
4962
5007
|
height: 600,
|
4963
5008
|
title: "智慧运维助手",
|
4964
5009
|
initialState: "default",
|
4965
|
-
defaultPosition: { right:
|
5010
|
+
defaultPosition: { right: he, bottom: he },
|
4966
5011
|
snappedWidth: 480,
|
4967
5012
|
// 设置默认吸附抽屉宽度
|
4968
5013
|
drawerWidth: 480,
|
4969
5014
|
// 设置默认抽屉宽度
|
4970
5015
|
zIndex: 1e3
|
4971
5016
|
};
|
4972
|
-
let { target: h = "body" } = e, { options: p = {} } = e, d, g = null,
|
4973
|
-
function
|
4974
|
-
return
|
5017
|
+
let { target: h = "body" } = e, { options: p = {} } = e, d, g = null, w = !1, S, L = !1, z = 0, v = 0, _ = he, k = 20, T = _, A = k, b = !1, C = he, I = 50, F = !1, R = { width: 0, height: 0, right: 0, bottom: 0 }, j = !1, Z = !1, X = [], oe = null;
|
5018
|
+
function fe() {
|
5019
|
+
return Re(this, null, function* () {
|
4975
5020
|
try {
|
4976
5021
|
const D = yield fetch("/aiops/aigc/chat/getSessionId", {
|
4977
5022
|
method: "POST",
|
4978
5023
|
headers: {
|
4979
5024
|
"Content-Type": "application/json",
|
4980
|
-
"Auth-Token": `${
|
4981
|
-
Authorization: `bearer ${
|
5025
|
+
"Auth-Token": `${ke()}`,
|
5026
|
+
Authorization: `bearer ${ke()}`
|
4982
5027
|
}
|
4983
5028
|
});
|
4984
5029
|
if (!D.ok)
|
@@ -4992,92 +5037,92 @@ function bl(s, e, t) {
|
|
4992
5037
|
}
|
4993
5038
|
});
|
4994
5039
|
}
|
4995
|
-
function
|
4996
|
-
ne ? t(23,
|
4997
|
-
}
|
4998
|
-
function
|
4999
|
-
if (!L && !
|
5000
|
-
const ne =
|
5001
|
-
if (
|
5002
|
-
const
|
5003
|
-
t(24, C = Math.max(
|
5004
|
-
const
|
5005
|
-
t(25,
|
5040
|
+
function ce(D, ne = !1) {
|
5041
|
+
ne ? t(23, b = !0) : t(6, L = !0), z = D.clientX, v = D.clientY, _ = ne ? C : T, k = ne ? I : A, D.preventDefault();
|
5042
|
+
}
|
5043
|
+
function je(D) {
|
5044
|
+
if (!L && !b) return;
|
5045
|
+
const ne = z - D.clientX, O = v - D.clientY;
|
5046
|
+
if (b) {
|
5047
|
+
const B = _ + ne, pe = D.clientY;
|
5048
|
+
t(24, C = Math.max(he, Math.min(window.innerWidth - mn - he, B)));
|
5049
|
+
const de = window.innerHeight - mn - he, Ne = Math.max(he, Math.min(de, pe));
|
5050
|
+
t(25, I = (window.innerHeight - Ne - mn) / window.innerHeight * 100);
|
5006
5051
|
} else {
|
5007
|
-
const
|
5008
|
-
t(0,
|
5009
|
-
const
|
5010
|
-
t(1, A = Math.max(
|
5052
|
+
const B = n.width || 0, pe = n.height || 0, de = _ + ne;
|
5053
|
+
t(0, T = Math.max(he, Math.min(window.innerWidth - B - he, de)));
|
5054
|
+
const ze = k + O;
|
5055
|
+
t(1, A = Math.max(he, Math.min(window.innerHeight - pe - he, ze)));
|
5011
5056
|
}
|
5012
5057
|
}
|
5013
|
-
function
|
5014
|
-
t(6, L = !1), t(23,
|
5058
|
+
function le() {
|
5059
|
+
t(6, L = !1), t(23, b = !1);
|
5015
5060
|
}
|
5016
5061
|
Zs(() => {
|
5017
5062
|
typeof h == "string" ? g = document.querySelector(h) || document.body : g = h || document.body;
|
5018
|
-
const D = (
|
5019
|
-
return document.addEventListener("mousemove", D), document.addEventListener("mouseup", ne), d && g && g.appendChild(d), S && S.getBoundingClientRect().left, t(7,
|
5063
|
+
const D = (O) => je(O), ne = () => le();
|
5064
|
+
return document.addEventListener("mousemove", D), document.addEventListener("mouseup", ne), d && g && g.appendChild(d), S && S.getBoundingClientRect().left, t(7, j = n.initialState === "snapped"), t(2, F = n.initialState === "fullscreen"), n.initialState === "snapped" ? (t(0, T = 0), t(1, A = 0), t(3, n = ye(ee({}, n), {
|
5020
5065
|
height: typeof window != "undefined" ? window.innerHeight : n.height,
|
5021
5066
|
width: n.snappedWidth || n.width
|
5022
|
-
}))) : n.initialState === "fullscreen" && (t(0,
|
5067
|
+
}))) : n.initialState === "fullscreen" && (t(0, T = 0), t(1, A = 0), t(3, n = ye(ee({}, n), {
|
5023
5068
|
width: typeof window != "undefined" ? window.innerWidth : n.width,
|
5024
5069
|
height: typeof window != "undefined" ? window.innerHeight : n.height
|
5025
5070
|
}))), () => {
|
5026
5071
|
document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", ne), g && d && g.removeChild(d);
|
5027
5072
|
};
|
5028
5073
|
});
|
5029
|
-
function
|
5030
|
-
return
|
5031
|
-
|
5074
|
+
function qe() {
|
5075
|
+
return Re(this, null, function* () {
|
5076
|
+
w || (yield fe()), t(22, w = !w);
|
5032
5077
|
});
|
5033
5078
|
}
|
5034
|
-
function
|
5035
|
-
var D, ne,
|
5036
|
-
t(2,
|
5079
|
+
function re() {
|
5080
|
+
var D, ne, O, B, pe, de, ze, Ne;
|
5081
|
+
t(2, F = !F), F ? (R.width || (R = {
|
5037
5082
|
width: u.width,
|
5038
5083
|
height: u.height,
|
5039
|
-
right: (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne :
|
5040
|
-
bottom: (
|
5041
|
-
}),
|
5084
|
+
right: (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne : he,
|
5085
|
+
bottom: (B = (O = u.defaultPosition) == null ? void 0 : O.bottom) != null ? B : he
|
5086
|
+
}), j && t(7, j = !1), t(20, p = ye(ee({}, n), {
|
5042
5087
|
width: window.innerWidth,
|
5043
5088
|
height: window.innerHeight,
|
5044
5089
|
drawerWidth: window.innerWidth
|
5045
|
-
})), t(0,
|
5090
|
+
})), t(0, T = 0), t(1, A = 0)) : (t(20, p = ye(ee({}, n), {
|
5046
5091
|
width: u.width,
|
5047
5092
|
height: u.height,
|
5048
5093
|
drawerWidth: u.drawerWidth
|
5049
|
-
})), t(0,
|
5094
|
+
})), t(0, T = (de = (pe = u.defaultPosition) == null ? void 0 : pe.right) != null ? de : he), t(1, A = (Ne = (ze = u.defaultPosition) == null ? void 0 : ze.bottom) != null ? Ne : he));
|
5050
5095
|
}
|
5051
|
-
function
|
5052
|
-
|
5096
|
+
function Ve(D) {
|
5097
|
+
F || ce(D);
|
5053
5098
|
}
|
5054
5099
|
function ie() {
|
5055
|
-
var D, ne,
|
5056
|
-
|
5100
|
+
var D, ne, O, B;
|
5101
|
+
F && (t(2, F = !1), t(20, p = ye(ee({}, n), {
|
5057
5102
|
width: u.width,
|
5058
5103
|
height: u.height,
|
5059
5104
|
drawerWidth: u.drawerWidth
|
5060
|
-
}))), t(7,
|
5105
|
+
}))), t(7, j = !j), j ? (n.height, t(0, T = 0), t(1, A = 0), t(20, p = ye(ee({}, n), {
|
5061
5106
|
height: window.innerHeight,
|
5062
5107
|
width: n.snappedWidth || u.width,
|
5063
5108
|
drawerWidth: n.snappedWidth || u.width
|
5064
|
-
}))) : (t(20, p =
|
5109
|
+
}))) : (t(20, p = ye(ee({}, n), {
|
5065
5110
|
width: u.width,
|
5066
5111
|
height: u.height,
|
5067
5112
|
drawerWidth: u.drawerWidth
|
5068
|
-
})), t(0,
|
5113
|
+
})), t(0, T = (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne : he), t(1, A = (B = (O = u.defaultPosition) == null ? void 0 : O.bottom) != null ? B : he));
|
5069
5114
|
}
|
5070
|
-
function
|
5115
|
+
function xe(D) {
|
5071
5116
|
t(8, Z = !1);
|
5072
5117
|
}
|
5073
5118
|
const $ = () => t(8, Z = !1);
|
5074
|
-
function
|
5119
|
+
function Me(D) {
|
5075
5120
|
kt[D ? "unshift" : "push"](() => {
|
5076
5121
|
S = D, t(5, S);
|
5077
5122
|
});
|
5078
5123
|
}
|
5079
|
-
const
|
5080
|
-
function
|
5124
|
+
const Te = (D) => ce(D, !0);
|
5125
|
+
function Qe(D) {
|
5081
5126
|
kt[D ? "unshift" : "push"](() => {
|
5082
5127
|
d = D, t(4, d);
|
5083
5128
|
});
|
@@ -5086,46 +5131,46 @@ function bl(s, e, t) {
|
|
5086
5131
|
"target" in D && t(21, h = D.target), "options" in D && t(20, p = D.options);
|
5087
5132
|
}, s.$$.update = () => {
|
5088
5133
|
s.$$.dirty[0] & /*options*/
|
5089
|
-
1048576 && t(3, n =
|
5134
|
+
1048576 && t(3, n = ye(ee(ee({}, u), p), {
|
5090
5135
|
defaultPosition: ee(ee({}, u.defaultPosition), p.defaultPosition)
|
5091
5136
|
})), s.$$.dirty[0] & /*isOpen, isFullscreen, mergedOptions*/
|
5092
5137
|
4194316 && c(t(11, i = Ui(
|
5093
|
-
|
5138
|
+
w ? F ? window.innerWidth : n.drawerWidth : 0,
|
5094
5139
|
{ stiffness: 0.1, damping: 0.6 }
|
5095
5140
|
))), s.$$.dirty[0] & /*mergedOptions, right, bottom*/
|
5096
|
-
11 && typeof window != "undefined" && (t(0,
|
5097
|
-
62914560 && t(10, o =
|
5141
|
+
11 && typeof window != "undefined" && (t(0, T = Math.max(he, Math.min(window.innerWidth - (n.width || 0), T))), t(1, A = Math.max(he, Math.min(window.innerHeight - (n.height || 0), A)))), s.$$.dirty[0] & /*isOpen, buttonRight, buttonBottom, isButtonDragging*/
|
5142
|
+
62914560 && t(10, o = w ? "display: none;" : `position: fixed; right: ${C}px; bottom: ${I}%; transform: none; cursor: ${b ? "grabbing" : "grab"};`);
|
5098
5143
|
}, [
|
5099
|
-
|
5144
|
+
T,
|
5100
5145
|
A,
|
5101
|
-
|
5146
|
+
F,
|
5102
5147
|
n,
|
5103
5148
|
d,
|
5104
5149
|
S,
|
5105
5150
|
L,
|
5106
|
-
|
5151
|
+
j,
|
5107
5152
|
Z,
|
5108
5153
|
oe,
|
5109
5154
|
o,
|
5110
5155
|
i,
|
5111
5156
|
l,
|
5112
|
-
|
5113
|
-
|
5114
|
-
|
5115
|
-
|
5116
|
-
|
5157
|
+
X,
|
5158
|
+
ce,
|
5159
|
+
qe,
|
5160
|
+
re,
|
5161
|
+
Ve,
|
5117
5162
|
ie,
|
5118
|
-
|
5163
|
+
xe,
|
5119
5164
|
p,
|
5120
5165
|
h,
|
5121
|
-
|
5122
|
-
|
5166
|
+
w,
|
5167
|
+
b,
|
5123
5168
|
C,
|
5124
|
-
|
5169
|
+
I,
|
5125
5170
|
$,
|
5126
|
-
|
5127
|
-
|
5128
|
-
|
5171
|
+
Me,
|
5172
|
+
Te,
|
5173
|
+
Qe
|
5129
5174
|
];
|
5130
5175
|
}
|
5131
5176
|
class Tl extends Mn {
|