@qualityunit/liveagent-components-editor 0.0.74 → 0.0.76

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.
@@ -1,69 +1,69 @@
1
- import { b as ae, E as pe, c as te, a as D, d as S, U as ye, s as re, r as $, p as ne, h as y, e as se, f as le, H as ie, g as z, i as G, j as H, k as w, l as x, m as Te, n as Ae, o as Ne, q as j, t as fe, u as Me, v as xe, w as Ie, x as Se, I as Y, y as ue, z as we, A as Ce, B as He, C as De, D as Re, F as ke, G as Le, N as Pe, J as Oe, K as Fe, L as Ue, M as Ve, O as L, P as qe, Q as Be, R as ve, S as Ye, T as P, V as oe, W as q, X as K, Y as F, Z as ce, _ as de, $ as O, a0 as U, a1 as J, a2 as V, a3 as Ke, a4 as We, a5 as Xe, a6 as Ze } from "./ckeditor5-CkKPcRMg.js";
1
+ import { b as ae, E as pe, c as te, a as k, d as S, U as ye, s as re, r as $, p as ne, h as y, e as se, f as le, H as ie, g as z, i as G, j as H, k as w, l as x, m as Ae, n as Te, o as Ne, q as j, t as fe, u as Me, v as xe, w as Ie, x as Se, I as Y, y as ue, z as we, A as Ce, B as He, C as ke, D as De, F as Re, G as Le, N as Pe, J as Oe, K as Fe, L as Ue, M as Ve, O as L, P as qe, Q as Be, R as ve, S as Ye, T as P, V as oe, W as q, X as K, Y as F, Z as ce, _ as de, $ as O, a0 as U, a1 as J, a2 as V, a3 as Ke, a4 as We, a5 as Xe, a6 as Ze } from "./ckeditor5-C9zI3swn.js";
2
2
  function ze(e, t, a = !1) {
3
3
  y && se();
4
- var r = e, n = null, f = null, s = ye, c = a ? pe : 0, o = !1;
4
+ var r = e, n = null, s = null, f = ye, o = a ? pe : 0, c = !1;
5
5
  const E = (u, i = !0) => {
6
- o = !0, l(i, u);
6
+ c = !0, l(i, u);
7
7
  };
8
8
  var d = null;
9
9
  function m() {
10
10
  d !== null && (d.lastChild.remove(), r.before(d), d = null);
11
- var u = s ? n : f, i = s ? f : n;
11
+ var u = f ? n : s, i = f ? s : n;
12
12
  u && $(u), i && ne(i, () => {
13
- s ? f = null : n = null;
13
+ f ? s = null : n = null;
14
14
  });
15
15
  }
16
16
  const l = (u, i) => {
17
- if (s === (s = u)) return;
17
+ if (f === (f = u)) return;
18
18
  let v = !1;
19
19
  if (y) {
20
20
  const p = le(r) === ie;
21
- !!s === p && (r = z(), G(r), H(!1), v = !0);
21
+ !!f === p && (r = z(), G(r), H(!1), v = !0);
22
22
  }
23
23
  var b = re(), N = r;
24
- if (b && (d = document.createDocumentFragment(), d.append(N = te())), s ? n ??= i && D(() => i(N)) : f ??= i && D(() => i(N)), b) {
24
+ if (b && (d = document.createDocumentFragment(), d.append(N = te())), f ? n ??= i && k(() => i(N)) : s ??= i && k(() => i(N)), b) {
25
25
  var g = (
26
26
  /** @type {Batch} */
27
27
  S
28
- ), _ = s ? n : f, h = s ? f : n;
28
+ ), _ = f ? n : s, h = f ? s : n;
29
29
  _ && g.skipped_effects.delete(_), h && g.skipped_effects.add(h), g.add_callback(m);
30
30
  } else
31
31
  m();
32
32
  v && H(!0);
33
33
  };
34
34
  ae(() => {
35
- o = !1, t(E), o || l(null, null);
36
- }, c), y && (r = w);
35
+ c = !1, t(E), c || l(null, null);
36
+ }, o), y && (r = w);
37
37
  }
38
38
  function Ge(e, t) {
39
39
  return t;
40
40
  }
41
41
  function Je(e, t, a) {
42
- for (var r = e.items, n = [], f = t.length, s = 0; s < f; s++)
43
- Ce(t[s].e, n, !0);
44
- var c = f > 0 && n.length === 0 && a !== null;
45
- if (c) {
46
- var o = (
42
+ for (var r = e.items, n = [], s = t.length, f = 0; f < s; f++)
43
+ Ce(t[f].e, n, !0);
44
+ var o = s > 0 && n.length === 0 && a !== null;
45
+ if (o) {
46
+ var c = (
47
47
  /** @type {Element} */
48
48
  /** @type {Element} */
49
49
  a.parentNode
50
50
  );
51
- He(o), o.append(
51
+ He(c), c.append(
52
52
  /** @type {Element} */
53
53
  a
54
- ), r.clear(), M(e, t[0].prev, t[f - 1].next);
54
+ ), r.clear(), M(e, t[0].prev, t[s - 1].next);
55
55
  }
56
- De(n, () => {
57
- for (var E = 0; E < f; E++) {
56
+ ke(n, () => {
57
+ for (var E = 0; E < s; E++) {
58
58
  var d = t[E];
59
- c || (r.delete(d.k), M(e, d.prev, d.next)), ue(d.e, !c);
59
+ o || (r.delete(d.k), M(e, d.prev, d.next)), ue(d.e, !o);
60
60
  }
61
61
  });
62
62
  }
63
- function Qe(e, t, a, r, n, f = null) {
64
- var s = e, c = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
63
+ function Qe(e, t, a, r, n, s = null) {
64
+ var f = e, o = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
65
65
  y && se();
66
- var o = null, E = !1, d = /* @__PURE__ */ new Map(), m = Te(() => {
66
+ var c = null, E = !1, d = /* @__PURE__ */ new Map(), m = Ae(() => {
67
67
  var v = a();
68
68
  return Me(v) ? v : v == null ? [] : fe(v);
69
69
  }), l, u;
@@ -71,110 +71,111 @@ function Qe(e, t, a, r, n, f = null) {
71
71
  $e(
72
72
  u,
73
73
  l,
74
- c,
74
+ o,
75
75
  d,
76
- s,
76
+ f,
77
77
  n,
78
78
  t,
79
79
  r,
80
80
  a
81
- ), f !== null && (l.length === 0 ? o ? $(o) : o = D(() => f(s)) : o !== null && ne(o, () => {
82
- o = null;
81
+ ), s !== null && (l.length === 0 ? c ? $(c) : c = k(() => s(f)) : c !== null && ne(c, () => {
82
+ c = null;
83
83
  }));
84
84
  }
85
85
  ae(() => {
86
86
  u ??= /** @type {Effect} */
87
- Re, l = x(m);
87
+ De, l = /** @type {V[]} */
88
+ x(m);
88
89
  var v = l.length;
89
90
  if (E && v === 0)
90
91
  return;
91
92
  E = v === 0;
92
93
  let b = !1;
93
94
  if (y) {
94
- var N = le(s) === ie;
95
- N !== (v === 0) && (s = z(), G(s), H(!1), b = !0);
95
+ var N = le(f) === ie;
96
+ N !== (v === 0) && (f = z(), G(f), H(!1), b = !0);
96
97
  }
97
98
  if (y) {
98
99
  for (var g = null, _, h = 0; h < v; h++) {
99
- if (w.nodeType === ke && /** @type {Comment} */
100
+ if (w.nodeType === Re && /** @type {Comment} */
100
101
  w.data === Le) {
101
- s = /** @type {Comment} */
102
+ f = /** @type {Comment} */
102
103
  w, b = !0, H(!1);
103
104
  break;
104
105
  }
105
- var p = l[h], T = r(p, h);
106
+ var p = l[h], A = r(p, h);
106
107
  _ = Q(
107
108
  w,
108
- c,
109
+ o,
109
110
  g,
110
111
  null,
111
112
  p,
112
- T,
113
+ A,
113
114
  h,
114
115
  n,
115
116
  t,
116
117
  a
117
- ), c.items.set(T, _), g = _;
118
+ ), o.items.set(A, _), g = _;
118
119
  }
119
120
  v > 0 && G(z());
120
121
  }
121
122
  if (y)
122
- v === 0 && f && (o = D(() => f(s)));
123
+ v === 0 && s && (c = k(() => s(f)));
123
124
  else if (re()) {
124
- var R = /* @__PURE__ */ new Set(), I = (
125
+ var D = /* @__PURE__ */ new Set(), I = (
125
126
  /** @type {Batch} */
126
127
  S
127
128
  );
128
129
  for (h = 0; h < v; h += 1) {
129
- p = l[h], T = r(p, h);
130
- var A = c.items.get(T) ?? d.get(T);
131
- A ? _e(A, p, h) : (_ = Q(
130
+ p = l[h], A = r(p, h);
131
+ var T = o.items.get(A) ?? d.get(A);
132
+ T ? _e(T, p, h) : (_ = Q(
132
133
  null,
133
- c,
134
+ o,
134
135
  null,
135
136
  null,
136
137
  p,
137
- T,
138
+ A,
138
139
  h,
139
140
  n,
140
141
  t,
141
142
  a,
142
143
  !0
143
- ), d.set(T, _)), R.add(T);
144
+ ), d.set(A, _)), D.add(A);
144
145
  }
145
- for (const [k, C] of c.items)
146
- R.has(k) || I.skipped_effects.add(C.e);
146
+ for (const [R, C] of o.items)
147
+ D.has(R) || I.skipped_effects.add(C.e);
147
148
  I.add_callback(i);
148
149
  } else
149
150
  i();
150
151
  b && H(!0), x(m);
151
- }), y && (s = w);
152
+ }), y && (f = w);
152
153
  }
153
- function $e(e, t, a, r, n, f, s, c, o) {
154
+ function $e(e, t, a, r, n, s, f, o, c) {
154
155
  var E = t.length, d = a.items, m = a.first, l = m, u, i = null, v = [], b = [], N, g, _, h;
155
156
  for (h = 0; h < E; h += 1) {
156
- if (N = t[h], g = c(N, h), _ = d.get(g), _ === void 0) {
157
+ if (N = t[h], g = o(N, h), _ = d.get(g), _ === void 0) {
157
158
  var p = r.get(g);
158
159
  if (p !== void 0) {
159
160
  r.delete(g), d.set(g, p);
160
- var T = i ? i.next : l;
161
- M(a, i, p), M(a, p, T), W(p, T, n), i = p;
161
+ var A = i ? i.next : l;
162
+ M(a, i, p), M(a, p, A), W(p, A, n), i = p;
162
163
  } else {
163
- var R = l ? (
164
+ var D = l ? (
164
165
  /** @type {TemplateNode} */
165
166
  l.e.nodes_start
166
167
  ) : n;
167
168
  i = Q(
168
- R,
169
+ D,
169
170
  a,
170
171
  i,
171
172
  i === null ? a.first : i.next,
172
173
  N,
173
174
  g,
174
175
  h,
175
- f,
176
176
  s,
177
- o
177
+ f,
178
+ c
178
179
  );
179
180
  }
180
181
  d.set(g, i), v = [], b = [], l = i.next;
@@ -183,14 +184,14 @@ function $e(e, t, a, r, n, f, s, c, o) {
183
184
  if (_e(_, N, h), (_.e.f & Y) !== 0 && $(_.e), _ !== l) {
184
185
  if (u !== void 0 && u.has(_)) {
185
186
  if (v.length < b.length) {
186
- var I = b[0], A;
187
+ var I = b[0], T;
187
188
  i = I.prev;
188
- var k = v[0], C = v[v.length - 1];
189
- for (A = 0; A < v.length; A += 1)
190
- W(v[A], I, n);
191
- for (A = 0; A < b.length; A += 1)
192
- u.delete(b[A]);
193
- M(a, k.prev, C.next), M(a, i, k), M(a, C, I), l = I, i = C, h -= 1, v = [], b = [];
189
+ var R = v[0], C = v[v.length - 1];
190
+ for (T = 0; T < v.length; T += 1)
191
+ W(v[T], I, n);
192
+ for (T = 0; T < b.length; T += 1)
193
+ u.delete(b[T]);
194
+ M(a, R.prev, C.next), M(a, i, R), M(a, C, I), l = I, i = C, h -= 1, v = [], b = [];
194
195
  } else
195
196
  u.delete(_), W(_, l, n), M(a, _.prev, _.next), M(a, _, i === null ? a.first : i.next), M(a, i, _), i = _;
196
197
  continue;
@@ -218,13 +219,13 @@ function $e(e, t, a, r, n, f, s, c, o) {
218
219
  r.clear();
219
220
  }
220
221
  function _e(e, t, a, r) {
221
- Ae(e.v, t), e.i = a;
222
+ Te(e.v, t), e.i = a;
222
223
  }
223
- function Q(e, t, a, r, n, f, s, c, o, E, d) {
224
- var m = (o & Ie) !== 0, l = (o & Se) === 0, u = m ? l ? Ne(n, !1, !1) : j(n) : n, i = (o & xe) === 0 ? s : j(s), v = {
224
+ function Q(e, t, a, r, n, s, f, o, c, E, d) {
225
+ var m = (c & Ie) !== 0, l = (c & Se) === 0, u = m ? l ? Ne(n, !1, !1) : j(n) : n, i = (c & xe) === 0 ? f : j(f), v = {
225
226
  i,
226
227
  v: u,
227
- k: f,
228
+ k: s,
228
229
  a: null,
229
230
  // @ts-expect-error
230
231
  e: null,
@@ -236,7 +237,7 @@ function Q(e, t, a, r, n, f, s, c, o, E, d) {
236
237
  var b = document.createDocumentFragment();
237
238
  b.append(e = te());
238
239
  }
239
- return v.e = D(() => c(
240
+ return v.e = k(() => o(
240
241
  /** @type {Node} */
241
242
  e,
242
243
  u,
@@ -253,15 +254,15 @@ function W(e, t, a) {
253
254
  ) : a, n = t ? (
254
255
  /** @type {TemplateNode} */
255
256
  t.e.nodes_start
256
- ) : a, f = (
257
+ ) : a, s = (
257
258
  /** @type {TemplateNode} */
258
259
  e.e.nodes_start
259
- ); f !== null && f !== r; ) {
260
- var s = (
260
+ ); s !== null && s !== r; ) {
261
+ var f = (
261
262
  /** @type {TemplateNode} */
262
- we(f)
263
+ we(s)
263
264
  );
264
- n.before(f), f = s;
265
+ n.before(s), s = f;
265
266
  }
266
267
  }
267
268
  function M(e, t, a) {
@@ -287,13 +288,13 @@ function aa(e, t, a) {
287
288
  var r = e == null ? "" : "" + e;
288
289
  return r === "" ? null : r;
289
290
  }
290
- function ta(e, t, a, r, n, f) {
291
- var s = e.__className;
292
- if (y || s !== a || s === void 0) {
293
- var c = aa(a);
294
- (!y || c !== e.getAttribute("class")) && (c == null ? e.removeAttribute("class") : e.className = c), e.__className = a;
291
+ function ta(e, t, a, r, n, s) {
292
+ var f = e.__className;
293
+ if (y || f !== a || f === void 0) {
294
+ var o = aa(a);
295
+ (!y || o !== e.getAttribute("class")) && (o == null ? e.removeAttribute("class") : e.className = o), e.__className = a;
295
296
  }
296
- return f;
297
+ return s;
297
298
  }
298
299
  const ra = Symbol("is custom element"), na = Symbol("is html");
299
300
  function sa(e, t, a, r) {
@@ -312,40 +313,40 @@ function la(e) {
312
313
  }
313
314
  var ee = /* @__PURE__ */ new Map();
314
315
  function ia(e) {
315
- var t = ee.get(e.nodeName);
316
- if (t) return t;
317
- ee.set(e.nodeName, t = []);
318
- for (var a, r = e, n = Element.prototype; n !== r; ) {
319
- a = Fe(r);
320
- for (var f in a)
321
- a[f].set && t.push(f);
322
- r = Oe(r);
316
+ var t = e.getAttribute("is") || e.nodeName, a = ee.get(t);
317
+ if (a) return a;
318
+ ee.set(t, a = []);
319
+ for (var r, n = e, s = Element.prototype; s !== n; ) {
320
+ r = Fe(n);
321
+ for (var f in r)
322
+ r[f].set && a.push(f);
323
+ n = Oe(n);
323
324
  }
324
- return t;
325
+ return a;
325
326
  }
326
327
  function fa(e, t, a = t) {
327
- var r = Ue(), n = /* @__PURE__ */ new WeakSet();
328
- Ve(e, "input", (f) => {
329
- var s = f ? e.defaultValue : e.value;
330
- if (s = X(e) ? Z(s) : s, a(s), S !== null && n.add(S), r && s !== (s = t())) {
331
- var c = e.selectionStart, o = e.selectionEnd;
332
- e.value = s ?? "", o !== null && (e.selectionStart = c, e.selectionEnd = Math.min(o, e.value.length));
328
+ var r = /* @__PURE__ */ new WeakSet();
329
+ Ue(e, "input", async (n) => {
330
+ var s = n ? e.defaultValue : e.value;
331
+ if (s = X(e) ? Z(s) : s, a(s), S !== null && r.add(S), await Ve(), s !== (s = t())) {
332
+ var f = e.selectionStart, o = e.selectionEnd;
333
+ e.value = s ?? "", o !== null && (e.selectionStart = f, e.selectionEnd = Math.min(o, e.value.length));
333
334
  }
334
335
  }), // If we are hydrating and the value has since changed,
335
336
  // then use the updated value from the input instead.
336
337
  (y && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
337
338
  // TODO Svelte 6: remove input.value check and set to empty string?
338
- L(t) == null && e.value) && (a(X(e) ? Z(e.value) : e.value), S !== null && n.add(S)), qe(() => {
339
- var f = t();
339
+ L(t) == null && e.value) && (a(X(e) ? Z(e.value) : e.value), S !== null && r.add(S)), qe(() => {
340
+ var n = t();
340
341
  if (e === document.activeElement) {
341
342
  var s = (
342
343
  /** @type {Batch} */
343
344
  Be ?? S
344
345
  );
345
- if (n.has(s))
346
+ if (r.has(s))
346
347
  return;
347
348
  }
348
- X(e) && f === Z(e.value) || e.type === "date" && !f && !e.value || f !== e.value && (e.value = f ?? "");
349
+ X(e) && n === Z(e.value) || e.type === "date" && !n && !e.value || n !== e.value && (e.value = n ?? "");
349
350
  });
350
351
  }
351
352
  function X(e) {
@@ -363,11 +364,11 @@ function me(e, t) {
363
364
  function n() {
364
365
  a("html", {});
365
366
  }
366
- function f() {
367
+ function s() {
367
368
  a("plain", {});
368
369
  }
369
370
  oe();
370
- var s = va(), c = U(s), o = J(c, 2), E = J(o, 2);
371
+ var f = va(), o = U(f), c = J(o, 2), E = J(c, 2);
371
372
  return Qe(E, 1, r, Ge, (d, m) => {
372
373
  var l = ua(), u = U(l, !0);
373
374
  V(l), Ke(() => {
@@ -375,7 +376,7 @@ function me(e, t) {
375
376
  }), K("click", l, function(...i) {
376
377
  x(m).handler?.apply(this, i);
377
378
  }), F(d, l);
378
- }), V(s), K("click", c, n), K("click", o, f), F(e, s), ce({
379
+ }), V(f), K("click", o, n), K("click", c, s), F(e, f), ce({
379
380
  get buttons() {
380
381
  return r();
381
382
  },
@@ -389,14 +390,14 @@ var oa = q("<textarea></textarea>"), ca = q('<main><div class="Editor"><!></div>
389
390
  function da(e, t) {
390
391
  de(t, !1);
391
392
  let a = P(t, "value", 12, ""), r = P(t, "buttons", 28, () => []), n = P(t, "html", 12, !0);
392
- function f() {
393
+ function s() {
393
394
  n() || n(!0);
394
395
  }
395
- function s() {
396
+ function f() {
396
397
  n() && (a(a().replace(/<[^>]*>?/gm, "")), n(!1));
397
398
  }
398
399
  oe();
399
- var c = ca(), o = U(c), E = U(o);
400
+ var o = ca(), c = U(o), E = U(c);
400
401
  {
401
402
  var d = (u) => {
402
403
  Xe(u, {
@@ -416,8 +417,8 @@ function da(e, t) {
416
417
  n() ? u(d) : u(m, !1);
417
418
  });
418
419
  }
419
- V(o);
420
- var l = J(o, 2);
420
+ V(c);
421
+ var l = J(c, 2);
421
422
  return me(l, {
422
423
  get buttons() {
423
424
  return r();
@@ -425,9 +426,9 @@ function da(e, t) {
425
426
  set buttons(u) {
426
427
  r(u);
427
428
  },
428
- $$events: { html: f, plain: s },
429
+ $$events: { html: s, plain: f },
429
430
  $$legacy: !0
430
- }), V(c), F(e, c), ce({
431
+ }), V(o), F(e, o), ce({
431
432
  get value() {
432
433
  return a();
433
434
  },