@commentkit/comment-kit 1.0.1 → 1.5.0

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +126 -1
  2. package/README.md +12 -5
  3. package/SECURITY.md +3 -1
  4. package/dist/npm/THIRD_PARTY_NOTICES.txt +22 -23
  5. package/dist/npm/chunks/AgentSend-DyWxNQ0p.js +64 -0
  6. package/dist/npm/chunks/Checklist-VYkSl6Q9.js +259 -0
  7. package/dist/npm/chunks/Composer-CnsGQirF.js +679 -0
  8. package/dist/npm/chunks/Guest-DkIvY5zt.js +170 -0
  9. package/dist/npm/chunks/MarkupEditor-DxTI9nJH.js +334 -0
  10. package/dist/npm/chunks/Panel-riaMYxt-.js +863 -0
  11. package/dist/npm/chunks/Settings-CB4zxQAL.js +206 -0
  12. package/dist/npm/chunks/{Shortcuts-3AOERWBh.js → Shortcuts-D1cbajg_.js} +21 -17
  13. package/dist/npm/chunks/StyleEditor-BtTv3I8_.js +44 -0
  14. package/dist/npm/chunks/StylePanel-BI-n5Me1.js +199 -0
  15. package/dist/npm/chunks/TaskFields-HwrD0FrH.js +272 -0
  16. package/dist/npm/chunks/ThreadCard-CjaC8BTa.js +1026 -0
  17. package/dist/npm/chunks/Viewer-BnWshSXb.js +110 -0
  18. package/dist/npm/chunks/agent-Cr6NB6We.js +146 -0
  19. package/dist/npm/chunks/anchor-OCQnjp_6.js +294 -0
  20. package/dist/npm/chunks/{ar-BVQ4ToG2.js → ar-BQ9K9Oqf.js} +188 -7
  21. package/dist/npm/chunks/card-bits-CxteYiZ9.js +126 -0
  22. package/dist/npm/chunks/client-CJ1tpI62.js +754 -0
  23. package/dist/npm/chunks/colors-0Ied7PE2.js +101 -0
  24. package/dist/npm/chunks/confetti-DKeKR7-6.js +41 -0
  25. package/dist/npm/chunks/{de-CamSq76K.js → de-CcPi8xdC.js} +159 -7
  26. package/dist/npm/chunks/drafts-CpQdHhcK.js +51 -0
  27. package/dist/npm/chunks/{es-BBIlcnsU.js → es-DXgkjDCG.js} +159 -7
  28. package/dist/npm/chunks/extension-BIGfr4Gh.js +50 -0
  29. package/dist/npm/chunks/{extension-CLm_T7Vj.js → extension-DkDSW4qw.js} +2 -2
  30. package/dist/npm/chunks/{fr-BXsff0Zz.js → fr-IjJaUbWh.js} +159 -7
  31. package/dist/npm/chunks/{hi-y-APBuxh.js → hi-BhKQK2MU.js} +159 -7
  32. package/dist/npm/chunks/html2canvas-pro.esm-lgs6tb4C.js +8378 -0
  33. package/dist/npm/chunks/i18n-DAJGndZ2.js +904 -0
  34. package/dist/npm/chunks/{it-C5MH_Ktv.js → it-DKiSCkiD.js} +159 -7
  35. package/dist/npm/chunks/{ja-s1JJld2J.js → ja-BI1WagDg.js} +159 -7
  36. package/dist/npm/chunks/{live-CkVrNM1-.js → live-B-mo27Qq.js} +1 -1
  37. package/dist/npm/chunks/lock-C82sC17d.js +30 -0
  38. package/dist/npm/chunks/{nl-CFzRMEfl.js → nl-CJw3VUQ5.js} +159 -7
  39. package/dist/npm/chunks/pick-CYPkLLFJ.js +120 -0
  40. package/dist/npm/chunks/{pt-BR-DE_r-5UM.js → pt-BR-CjBolC5g.js} +159 -7
  41. package/dist/npm/chunks/{pusher-BSsQoE1K.js → realtime-D22tI_AS.js} +58 -4
  42. package/dist/npm/chunks/source-CTQmAh0Y.js +146 -0
  43. package/dist/npm/chunks/src-CgBEoWl0.js +150 -0
  44. package/dist/npm/chunks/start-DW9_DKmf.js +1783 -0
  45. package/dist/npm/chunks/upload-BmrpZE5G.js +42 -0
  46. package/dist/npm/chunks/uploads-CipONvCy.js +541 -0
  47. package/dist/npm/chunks/{zh-CN--gibO2l7.js → zh-CN-BrZGx2S0.js} +159 -7
  48. package/dist/npm/element.js +4 -5
  49. package/dist/npm/headless.js +3 -3
  50. package/dist/npm/index.js +2 -2
  51. package/dist/npm/react.js +1 -1
  52. package/dist/npm/svelte.js +1 -1
  53. package/dist/npm/types/adapters/vue.d.ts +14 -0
  54. package/dist/npm/types/anchor/index.d.ts +22 -1
  55. package/dist/npm/types/core/api.d.ts +3 -0
  56. package/dist/npm/types/core/auth.d.ts +11 -0
  57. package/dist/npm/types/core/client.d.ts +128 -6
  58. package/dist/npm/types/core/types.d.ts +78 -4
  59. package/dist/npm/types/headless.d.ts +1 -1
  60. package/dist/npm/types/index.d.ts +6 -1
  61. package/dist/npm/vue.js +5 -1
  62. package/package.json +6 -3
  63. package/dist/npm/chunks/Guest-CdfnuD8T.js +0 -157
  64. package/dist/npm/chunks/MarkupEditor-Clb17Tse.js +0 -199
  65. package/dist/npm/chunks/Panel-CgvEbZXr.js +0 -438
  66. package/dist/npm/chunks/ThreadCard-DuGKe-gE.js +0 -817
  67. package/dist/npm/chunks/anchor-DT-Ynhh1.js +0 -270
  68. package/dist/npm/chunks/art-Bn9_ANNS.js +0 -155
  69. package/dist/npm/chunks/client-CS5oL_LQ.js +0 -620
  70. package/dist/npm/chunks/colors-CX-IPjvb.js +0 -86
  71. package/dist/npm/chunks/extension-DWHHer7j.js +0 -26
  72. package/dist/npm/chunks/format-CP2xZaec.js +0 -524
  73. package/dist/npm/chunks/html2canvas-DfGb8yka.js +0 -4024
  74. package/dist/npm/chunks/mount-VmnAiANB.js +0 -1507
  75. package/dist/npm/chunks/privacy-DLhezjyi.js +0 -30
  76. package/dist/npm/chunks/realtime-CBRW9BB3.js +0 -34
  77. package/dist/npm/chunks/src-DG8ehgE9.js +0 -549
@@ -1,26 +0,0 @@
1
- import { a as e, o as t } from "./client-CS5oL_LQ.js";
2
- //#region src/core/extension.ts
3
- var n = "commentkit:ext-request";
4
- function r(e, r = {}, i = 8e3) {
5
- return new Promise((a, o) => {
6
- let s = t(12), c = (e, t) => {
7
- clearTimeout(u), removeEventListener("message", l), e ? o(e) : a(t);
8
- }, l = (e) => {
9
- let t = e.data;
10
- e.source === window && t && t.type === "commentkit:ext-reply" && t.id === s && c(t.error ? Error(String(t.error)) : null, t.result);
11
- }, u = setTimeout(() => c(/* @__PURE__ */ Error("The CommentKit extension did not answer.")), i);
12
- addEventListener("message", l), postMessage({
13
- type: n,
14
- id: s,
15
- action: e,
16
- payload: r
17
- }, location.origin);
18
- });
19
- }
20
- async function i(n) {
21
- if (n.hasSession()) return !1;
22
- let i = t(48), a = await r("handoff", { code_challenge: await e(i) });
23
- return typeof a?.code == "string" && n.exchange(a.code, i);
24
- }
25
- //#endregion
26
- export { r as askExtension, i as extensionHandoff };
@@ -1,524 +0,0 @@
1
- import { o as e } from "./src-DG8ehgE9.js";
2
- //#region node_modules/preact/dist/preact.mjs
3
- var t, n, r, i, a, o, s, c, l, u, d = {}, f = [], p = /^m(i|n|o|s|text|space)$/, m = Array.isArray, h = f.slice, g = Object.assign;
4
- function _(e) {
5
- e && e.parentNode && e.remove();
6
- }
7
- function v(e, r, i, a, o) {
8
- var s = {
9
- type: e,
10
- props: r,
11
- key: i,
12
- ref: a,
13
- __k: null,
14
- __: null,
15
- __b: 0,
16
- __e: null,
17
- __c: null,
18
- constructor: void 0,
19
- __v: o || ++n,
20
- __i: -1,
21
- __u: 0
22
- };
23
- return !o && t.vnode && t.vnode(s), s;
24
- }
25
- function y(e) {
26
- return e.children;
27
- }
28
- function b(e, t) {
29
- this.props = e, this.context = t, this.__g = 0;
30
- }
31
- function x(e, t) {
32
- if (t == null) return e.__ ? x(e.__, e.__i + 1) : null;
33
- for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) && n.__e) return n.__e;
34
- return typeof e.type != "function" || e.props.__P ? null : x(e);
35
- }
36
- function S(e) {
37
- if ((e = e.__) && e.__c && !e.props.__P) return e.__e = null, e.__k.some(function(t) {
38
- return t && (e.__e = t.__e);
39
- }), S(e);
40
- }
41
- function C(e) {
42
- (8 & e.__g || !(e.__g |= 8) || !r.push(e) || a++) && i == t.debounceRendering || ((i = t.debounceRendering) || queueMicrotask)(w);
43
- }
44
- function w() {
45
- var e, n, i, s, c, l, u, d, f;
46
- try {
47
- for (n = 1; r.length;) r.length > n && r.sort(o), e = r.shift(), n = r.length, 8 & e.__g && (s = void 0, c = void 0, l = (c = (i = e).__v).__e, u = [], d = [], (f = i.__P) && ((s = g({ constructor: void 0 }, c)).__v = c.__v + 1, t.vnode && t.vnode(s), j(f, s, c, i.__n, f.namespaceURI, 32 & c.__u ? [l] : null, u, l || x(c), 32 & c.__u, d), s.__v = c.__v, s.__.__k[s.__i] = s, N(u, s, d), c.__ = c.__e = null, s.__e != l && S(s)));
48
- } finally {
49
- r.length = a = 0;
50
- }
51
- }
52
- function ee(e, t, n, r, i, a, o, s, c, l, u) {
53
- var p, m, h, g, _, v, y = r.__k || f, b = t.length;
54
- for (c = T(n, t, y, c, b), p = 0; p < b; p++) (h = n.__k[p]) != null && (m = ~h.__i && y[h.__i] || d, h.__i = p, v = j(e, h, m, i, a, o, s, c, l, u), g = h.__e, (m.ref != h.ref || 8 & m.__u) && (m.ref && P(m.ref, null, h, m), h.ref && u.push(h.ref, h.__c || g, h)), _ = _ || g, 4 & h.__u ? (c = E(h, c, e, !m.__v), m.__e && (m.__e = null)) : typeof h.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), h.__u &= -7);
55
- return n.__e = _, c;
56
- }
57
- function T(e, t, n, r, i) {
58
- var a, o, s, c, l, u, d, f, p, h, g = n.length, _ = g, b = 0, S = !1, C = e.__k = Array(i);
59
- for (a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o != "object" || o.constructor == String ? o = C[a] = v(null, o) : m(o) ? o = C[a] = v(y, { children: o }) : o.constructor === void 0 && o.__b ? o = C[a] = v(o.type, o.props, o.key, o.ref, o.__v) : C[a] = o, c = a + b, o.__ = e, o.__b = e.__b + 1, s = null, ~(l = o.__i = D(o, n, c, _)) && (_--, (s = n[l]) && (s.__u |= 2)), s && s.__v ? (o.__u |= 2, l == c - 1 ? b-- : l == c + 1 ? b++ : l != c && (l > c ? b-- : b++, S = !0)) : (~l || (i > g ? b-- : i < g && b++), typeof o.type != "function" && (o.__u |= 4))) : C[a] = null;
60
- if (S) {
61
- for (u = [], d = [], a = 0; a < i; a++) if ((o = C[a]) && 2 & o.__u) {
62
- for (f = 0, p = u.length; f < p;) u[h = f + p >> 1] < o.__i ? f = h + 1 : p = h;
63
- u[f] = o.__i, d[a] = f + 1;
64
- }
65
- for (b = u.length; a--;) d[a] && (d[a] == b ? b-- : C[a].__u |= 4);
66
- }
67
- if (_) for (a = 0; a < g; a++) !(s = n[a]) || 2 & s.__u || (s.__e == r && (r = x(s)), F(s, s));
68
- return r;
69
- }
70
- function E(e, t, n, r) {
71
- var i, a, o;
72
- if (typeof e.type == "function") {
73
- if (e.props.__P) return t;
74
- if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && (i[a].__ = e, t = E(i[a], t, n, !1));
75
- return t;
76
- }
77
- for (t && !t.parentNode && (t = x(e)) && !t.parentNode && (t = null), o = t; o && o.nodeType == 8;) o = o.nextSibling;
78
- for (e.__e != o && (!r && n.moveBefore && e.__e.parentNode ? n.moveBefore(e.__e, t) : n.insertBefore(e.__e, t || null)), t = e.__e; (t = t && t.nextSibling) && t.nodeType == 8;);
79
- return t;
80
- }
81
- function D(e, t, n, r) {
82
- var i, a, o, s = e.key, c = e.type, l = t[n], u = l && !(2 & l.__u);
83
- if (l === null && s == null || u && s == l.key && c == l.type) return n;
84
- if (r > +!!u) {
85
- for (i = n - 1, a = n + 1; i >= 0 || a < t.length;) if ((l = t[o = i >= 0 ? i-- : a++]) && !(2 & l.__u) && s == l.key && c == l.type) return o;
86
- }
87
- return -1;
88
- }
89
- function O(e, t, n) {
90
- n ?? (n = ""), t[0] == "-" ? e.setProperty(t, n) : e[t] = n;
91
- }
92
- function k(e, t, n, r, i) {
93
- var a, o;
94
- n: if (t == "style") {
95
- if (typeof n == "string") e.style.cssText = n;
96
- else {
97
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || O(e.style, t, "");
98
- if (n) for (t in n) r && n[t] == r[t] || O(e.style, t, n[t]);
99
- }
100
- } else if (t[0] == "o" && t[1] == "n") (e.__e || (e.__e = {}))[t] = n, n && r || (o = u[t] || (u[t] = A(t)), (e.__a || (e.__a = {}))[t] = l, a = t != (t = t.replace(c, "$1")), (t = t.slice(2))[0] < "a" && (t = t.toLowerCase()), n ? e.addEventListener(t, o, a) : e.removeEventListener(t, o, a));
101
- else {
102
- if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
103
- else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
104
- e[t] = n ?? "";
105
- break n;
106
- } catch {}
107
- typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
108
- }
109
- }
110
- function A(e) {
111
- return function(n) {
112
- if (this.__e) {
113
- var r = this.__e[e];
114
- if (n[s] == null) n[s] = l++;
115
- else if (n[s] < this.__a[e]) return;
116
- return r(t.event ? t.event(n) : n);
117
- }
118
- };
119
- }
120
- function j(e, n, r, i, a, o, s, c, l, u) {
121
- var d, p, h, v, S, C, w, T, E, D, O, k, A, j, N, P, I, L, R, z, B = n.type;
122
- if (n.constructor !== void 0) return null;
123
- if (128 & r.__u && (l = 32 & r.__u, d = r.__c.__z)) {
124
- if (n.__u |= l, p = o = [], d.nodeType == 8) for (h = 1, v = d.nextSibling; v; v = v.nextSibling) {
125
- if (v.nodeType == 8) {
126
- if (v.data.startsWith("$s")) h++;
127
- else if (v.data.startsWith("/$s") && !--h) break;
128
- }
129
- o.push(v);
130
- }
131
- else o.push(d);
132
- c = o[0];
133
- }
134
- (d = t.__b) && d(n);
135
- n: if (typeof B == "function") {
136
- S = s.length;
137
- try {
138
- if (D = n.props, O = (d = B.prototype) && d.render, k = (d = B.contextType) && i[d.__c], A = d ? k ? k.props.value : d.__ : i, r.__c ? 2 & (C = n.__c = r.__c).__g && (C.__g |= 1) : (O ? n.__c = C = new B(D, A) : (n.__c = C = new b(D, A), C.constructor = B, C.render = ne), k && k.sub(C), C.state || (C.state = {}), C.__n = i, C.__g |= 8, C.__h = [], C.__k = []), O && (C.__s || (C.__s = C.state), B.getDerivedStateFromProps && (C.__s == C.state && (C.__s = g({}, C.__s)), g(C.__s, B.getDerivedStateFromProps(D, C.__s)))), w = C.props, T = C.state, C.__v = n, r.__c) {
139
- if (O && !B.getDerivedStateFromProps && D !== w && C.componentWillReceiveProps && C.componentWillReceiveProps(D, A), n.__v == r.__v && !(8 & C.__g) || !(4 & C.__g) && C.shouldComponentUpdate && !1 === C.shouldComponentUpdate(D, C.__s, A)) {
140
- n.__v != r.__v && (C.props = D, C.state = C.__s, C.__g &= -9), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
141
- e && (e.__ = n);
142
- }), f.push.apply(C.__h, C.__k), C.__k = [], C.__h.length && s.push(C), c = x(r);
143
- break n;
144
- }
145
- C.componentWillUpdate && C.componentWillUpdate(D, C.__s, A), O && C.componentDidUpdate && C.__h.push(function() {
146
- C.componentDidUpdate(w, T, E);
147
- });
148
- } else O && !B.getDerivedStateFromProps && C.componentWillMount && C.componentWillMount(), O && C.componentDidMount && C.__h.push(C.componentDidMount);
149
- if (C.context = A, C.props = D, C.__P = e, C.__g &= -5, j = t.__r, N = 0, O) C.state = C.__s, C.__g &= -9, j && j(n), d = C.render(C.props, C.state, C.context), f.push.apply(C.__h, C.__k), C.__k = [];
150
- else do
151
- C.__g &= -9, j && j(n), d = C.render(C.props, C.state, C.context), C.state = C.__s;
152
- while (8 & C.__g && ++N < 25);
153
- C.state = C.__s, C.getChildContext && (i = g({}, i, C.getChildContext())), O && r.__c && C.getSnapshotBeforeUpdate && (E = C.getSnapshotBeforeUpdate(w, T)), P = d && d.type === y && d.key == null ? d.props.children : d, D.__P && (d = c, a = (e = D.__P).namespaceURI, l = o = null, r.props && r.props.__P != e && (r.__k.some(function(e) {
154
- e && F(e, e);
155
- }), r.__k = null), c = r.__k ? x(r, 0) : null), c = ee(e, m(P) ? P : [P], n, r, i, a, o, s, c, l, u), D.__P && (n.__e = null, c = d), n.__u &= -161, 128 & r.__u && (C.__z = null), p && p.some(_), C.__h.length && s.push(C), 1 & C.__g && (C.__g &= -4);
156
- } catch (e) {
157
- if (s.length = S, n.__v = null, l || o) {
158
- if (e.then) {
159
- if (I = 0, n.__u |= l ? 160 : 128, o) {
160
- for (~(R = o.indexOf(c || void 0)) || (R = o.length); (z = o[R - 1]) && z.nodeType == 8;) R--;
161
- for (; R < o.length; R++) if (z = o[R]) {
162
- if (o[R] = null, z.nodeType == 8) {
163
- if (z.data.startsWith("$s")) I++ || (L = z);
164
- else if (I && z.data.startsWith("/$s") && !--I) {
165
- c = z;
166
- break;
167
- }
168
- } else if (!I) break;
169
- }
170
- }
171
- if (!L) {
172
- for (; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
173
- L = c;
174
- }
175
- n.__c.__z || (n.__c.__z = L), n.__e = c;
176
- } else o && o.some(_);
177
- } else n.__e = r.__e;
178
- n.__k || (n.__k = r.__k || []), e.then || M(n), t.__e(e, n, r);
179
- }
180
- } else c = n.__e = te(r.__e, n, r, i, a, o, s, l, u, e);
181
- return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
182
- }
183
- function M(e) {
184
- e && (e.__c && (e.__c.__g |= 4), e.__k && e.__k.some(M));
185
- }
186
- function N(e, n, r) {
187
- for (var i = 0; i < r.length;) P(r[i++], r[i++], r[i++]);
188
- t.__c && t.__c(n, e), e.some(function(n) {
189
- try {
190
- e = n.__h, n.__h = [], e.some(function(e) {
191
- e.call(n);
192
- });
193
- } catch (e) {
194
- t.__e(e, n.__v);
195
- }
196
- });
197
- }
198
- function te(e, n, r, i, a, o, s, c, l, u) {
199
- var f, g, v, y, b, S, C, w, T, E = r.props || d, D = n.props, O = n.type;
200
- if (O == "svg" ? a = "http://www.w3.org/2000/svg" : O == "math" ? a = "http://www.w3.org/1998/Math/MathML" : a || (a = "http://www.w3.org/1999/xhtml"), o) {
201
- for (f = 0; f < o.length; f++) if ((b = o[f]) && (O ? b.localName == O : b.nodeType == 3)) {
202
- e = b, o[f] = null;
203
- break;
204
- }
205
- }
206
- if (!e) {
207
- if (w = u.ownerDocument || document, !O) return w.createTextNode(D);
208
- e = w.createElementNS(a, O, D.is && D), c && (t.__m && t.__m(n, o), c = !1), o = null;
209
- }
210
- if (O) {
211
- if (u = O == "template" ? e.content : e, o = O == "textarea" && D.defaultValue != null ? null : o && h.call(u.childNodes), !c && o) for (E = {}, f = 0; f < e.attributes.length; f++) E[(b = e.attributes[f]).name] = b.value;
212
- for (f in E) b = E[f], f == "dangerouslySetInnerHTML" ? v = b : f == "children" || f in D || f == "value" && "defaultValue" in D || f == "checked" && "defaultChecked" in D || k(e, f, null, b, a);
213
- for (f in T = 1 & r.__u, D) b = D[f], f == "children" ? y = b : f == "dangerouslySetInnerHTML" ? g = b : f == "value" ? S = b : f == "checked" ? C = b : c && typeof b != "function" || !(E[f] !== b || T && b != null) || k(e, f, b, E[f], a);
214
- g ? (c || v && (g.__html == v.__html || g.__html == e.innerHTML) || (e.innerHTML = g.__html), n.__k = []) : (v && (e.textContent = ""), (O == "foreignObject" || a == "http://www.w3.org/1998/Math/MathML" && p.test(O)) && (a = "http://www.w3.org/1999/xhtml"), ee(u, m(y) ? y : [y], n, r, i, a, o, s, o ? o[0] : r.__k && x(r, 0), c, l), o && o.some(_)), c && O != "textarea" || (f = "value", O == "progress" && S == null ? e.removeAttribute(f) : S == null || S === e[f] && (O != "progress" || S) || k(e, f, S, E[f], a), f = "checked", C != null && C != e[f] && k(e, f, C, E[f], a));
215
- } else E === D || c && e.data == D || (e.data = D);
216
- return e;
217
- }
218
- function P(e, n, r, i) {
219
- try {
220
- typeof e == "function" ? n ? n.__x = e(n) || 1 : i && (i = i.__c || i.__e) && (n = i.__x) && (i.__x = null, typeof n == "function" ? n() : e(null)) : e.current = n;
221
- } catch (e) {
222
- t.__e(e, r);
223
- }
224
- }
225
- function F(e, n, r) {
226
- var i, a;
227
- if (t.unmount && t.unmount(e), !(i = e.ref) || i.current && i.current != e.__e || P(i, null, n, e), i = e.__c) {
228
- if (i.componentWillUnmount) try {
229
- i.componentWillUnmount();
230
- } catch (e) {
231
- t.__e(e, n);
232
- }
233
- i.__P = i.__n = null;
234
- }
235
- if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && F(i[a], n, typeof e.type != "function" || r && !e.props.__P);
236
- (i = e.__e) && (r || _(i), i.__e && (i.__e = null)), e.__e = e.__c = e.__ = null;
237
- }
238
- function ne(e, t, n) {
239
- return this.constructor(e, n);
240
- }
241
- function I(e, n) {
242
- var r, i, a, o;
243
- t.__ && t.__(e, n), n.nodeType == 9 && (n = n.documentElement), i = (r = e && 32 & e.__u) ? null : n.__k, n.__k = v(y, { children: [e] }), a = [], o = [], j(n, n.__k, i || d, d, n.namespaceURI, i ? null : n.firstChild ? h.call(n.childNodes) : null, a, i ? i.__e : n.firstChild, r, o), N(a, n.__k, o), n.__k.props.children = null;
244
- }
245
- t = { __e: function(e, t, n, r) {
246
- for (var i, o, s; t = t.__;) if ((i = t.__c) && !(1 & i.__g)) {
247
- i.__g |= 4;
248
- try {
249
- if ((o = i.constructor) && o.getDerivedStateFromError && (i.setState(o.getDerivedStateFromError(e)), s = 8 & i.__g), i.componentDidCatch && (i.componentDidCatch(e, r || {}), s = 8 & i.__g), s) return void (i.__g |= 2);
250
- } catch (t) {
251
- e = t, s = 0;
252
- }
253
- }
254
- throw a = 0, e;
255
- } }, n = 0, b.prototype.setState = function(e, t) {
256
- var n = this.__s;
257
- n && n != this.state || (n = this.__s = g({}, this.state)), typeof e == "function" && (e = e(g({}, n), this.props)), e && (g(n, e), this.__v && (t && this.__k.push(t), C(this)));
258
- }, b.prototype.forceUpdate = function(e) {
259
- this.__v && (this.__g |= 4, e && this.__h.push(e), C(this));
260
- }, b.prototype.render = y, r = [], a = 0, o = function(e, t) {
261
- return e.__v.__b - t.__v.__b;
262
- }, s = Symbol(), c = /(PointerCapture)$|Capture$/i, l = 0, u = {};
263
- //#endregion
264
- //#region node_modules/preact/hooks/dist/hooks.mjs
265
- var L, R, z, B, V = Object.is, H = 0, U = [], W = [], G = t, K = G.__b, q = G.__r, re = G.diffed, ie = G.__c, ae = G.unmount, oe = G.__;
266
- function J(e, t) {
267
- G.__h && G.__h(R, e, H || t), H = 0;
268
- var n = R.__H || (R.__H = {
269
- __: [],
270
- __h: []
271
- });
272
- return e >= n.__.length && n.__.push({}), n.__[e];
273
- }
274
- function se(e) {
275
- return H = 1, ce(_e, e);
276
- }
277
- function ce(e, t, n) {
278
- var r = J(L++, 2);
279
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : _e(void 0, t), function(e) {
280
- var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
281
- V(t, n) || (r.__N = [n, r.__[1]], r.__c.setState({}));
282
- }], r.__c = R, !R.__f)) {
283
- R.__f = !0;
284
- var i = R.shouldComponentUpdate;
285
- R.shouldComponentUpdate = function(e, t, n) {
286
- var r = this.__H;
287
- if (!r) return !0;
288
- var a = !1, o = this.props != e;
289
- if (r.__.some(function(e) {
290
- e.__N && (a = !0, V(e.__[0], e.__N[0]) || (o = !0));
291
- }), i) {
292
- var s = i.call(this, e, t, n);
293
- return a ? s || o : s;
294
- }
295
- return !a || o;
296
- };
297
- }
298
- return r.__;
299
- }
300
- function le(e, t) {
301
- var n = J(L++, 3);
302
- !G.__s && ge(n.__H, t) && (n.__P = !0, n.__ = e, n.u = t, R.__H.__h.push(n));
303
- }
304
- function ue(e) {
305
- return H = 5, Y(function() {
306
- return { current: e };
307
- }, []);
308
- }
309
- function Y(e, t) {
310
- var n = J(L++, 7);
311
- return ge(n.__H, t) && (n.__ = e(), n.__H = t), n.__;
312
- }
313
- function de(e, t) {
314
- return H = 8, Y(function() {
315
- return e;
316
- }, t);
317
- }
318
- function fe() {
319
- var e;
320
- do {
321
- for (; e = W.shift();) try {
322
- X(e);
323
- } catch (t) {
324
- G.__e(t, { __: (e = e.__P) && e.__v });
325
- }
326
- for (; e = U.shift();) {
327
- var t = e.__H;
328
- if (e.__P && t) try {
329
- t.__h.some(X), t.__h.some(Z), t.__h = [];
330
- } catch (n) {
331
- t.__h = [], G.__e(n, e.__v);
332
- }
333
- }
334
- } while (W.length);
335
- }
336
- G.__b = function(e) {
337
- R = null, K && K(e);
338
- }, G.__ = function(e, t) {
339
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), oe && oe(e, t);
340
- }, G.__r = function(e) {
341
- q && q(e), L = 0;
342
- var t = (R = e.__c).__H;
343
- t && (z == R ? R.__h = [] : (t.__h.some(X), t.__h.some(Z), L = 0), t.__h = [], t.__.some(function(e) {
344
- e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
345
- })), z = R;
346
- }, G.diffed = function(e) {
347
- re && re(e);
348
- var t = e.__c;
349
- t && t.__H && (t.__H.__h.length && he(U.push(t)), t.__H.__.some(function(e) {
350
- e.u && (e.__H = e.u);
351
- })), z = R = null;
352
- }, G.__c = function(e, t) {
353
- t.some(function(e) {
354
- try {
355
- e.__h.some(X), e.__h = e.__h.filter(function(e) {
356
- return !e.__ || Z(e);
357
- });
358
- } catch (n) {
359
- t.some(function(e) {
360
- e.__h && (e.__h = []);
361
- }), t = [], G.__e(n, e.__v);
362
- }
363
- }), ie && ie(e, t);
364
- }, G.unmount = function(e) {
365
- ae && ae(e);
366
- var t, n, r = e.__c;
367
- r && r.__H && (r.__H.__.some(function(r) {
368
- try {
369
- if (r.__P && r.__c) {
370
- if (n === void 0) {
371
- for (n = e.__; n && (!n.__c || !n.__c.__P);) n = n.__;
372
- n = n && n.__c;
373
- }
374
- r.__P = n, he(W.push(r));
375
- } else X(r);
376
- } catch (e) {
377
- t = e;
378
- }
379
- }), r.__H = void 0, t && G.__e(t, r.__v));
380
- };
381
- var pe = typeof requestAnimationFrame == "function";
382
- function me(e) {
383
- var t, n = function() {
384
- clearTimeout(r), pe && cancelAnimationFrame(t), setTimeout(e);
385
- }, r = setTimeout(n, 35);
386
- pe && (t = requestAnimationFrame(n));
387
- }
388
- function he(e) {
389
- e != 1 && B == G.requestAnimationFrame || ((B = G.requestAnimationFrame) || me)(fe);
390
- }
391
- function X(e) {
392
- var t = R, n = e.__c;
393
- typeof n == "function" && (e.__c = void 0, n()), R = t;
394
- }
395
- function Z(e) {
396
- var t = R;
397
- e.__c = e.__(), R = t;
398
- }
399
- function ge(e, t) {
400
- return !e || e.length != t.length || t.some(function(t, n) {
401
- return !V(t, e[n]);
402
- });
403
- }
404
- function _e(e, t) {
405
- return typeof t == "function" ? t(e) : t;
406
- }
407
- //#endregion
408
- //#region node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
409
- var ve = 0;
410
- Array.isArray;
411
- function Q(e, n, r, i, a, o) {
412
- n || (n = {});
413
- var s, c, l = n;
414
- if ("ref" in l && typeof e != "function") for (c in l = {}, n) c == "ref" ? s = n[c] : l[c] = n[c];
415
- var u = {
416
- type: e,
417
- props: l,
418
- key: r,
419
- ref: s,
420
- __k: null,
421
- __: null,
422
- __b: 0,
423
- __e: null,
424
- __c: null,
425
- constructor: void 0,
426
- __v: --ve,
427
- __i: -1,
428
- __u: 0
429
- };
430
- return (a || o) && (u.__source = a, u.__self = o), t.vnode && t.vnode(u), u;
431
- }
432
- //#endregion
433
- //#region src/ui/format.tsx
434
- function ye(e, t) {
435
- return !!t && e.id !== null && e.id === t.person.id && e.type === t.person.type;
436
- }
437
- function be(e, t = innerWidth) {
438
- return !!e.breakpoint && Math.abs(e.breakpoint - t) > 200;
439
- }
440
- var xe = (e) => e < 600 ? "phone" : e < 1024 ? "tablet" : "wide", $ = (e) => `${Math.round(e * 100) / 100}px`, Se = (e, t, n, r) => ({
441
- left: $(e),
442
- top: $(t),
443
- ...n === void 0 ? {} : { width: $(n) },
444
- ...r === void 0 ? {} : { height: $(r) }
445
- });
446
- function Ce({ text: e }) {
447
- let t = e.split("\n");
448
- return /* @__PURE__ */ Q(y, { children: t.map((e, n) => /* @__PURE__ */ Q(y, { children: [Ee(e), n < t.length - 1 ? /* @__PURE__ */ Q("br", {}) : null] })) });
449
- }
450
- var we = /(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`|https?:\/\/[^\s<>"')\u200b-\u200f\u202a-\u202e\u2060-\u2069\ufeff]+)/g;
451
- function Te(e, t = "link") {
452
- if (!e) return null;
453
- try {
454
- let n = new URL(e);
455
- return n.protocol === "https:" || n.protocol === "http:" || t === "link" && n.protocol === "mailto:" ? n.href : null;
456
- } catch {
457
- return null;
458
- }
459
- }
460
- function Ee(e) {
461
- let t = [], n = 0;
462
- for (let r of e.matchAll(we)) {
463
- let i = r[0], a = r.index ?? 0;
464
- if (a > n && t.push(e.slice(n, a)), i.startsWith("**")) t.push(/* @__PURE__ */ Q("strong", { children: i.slice(2, -2) }));
465
- else if (i.startsWith("`")) t.push(/* @__PURE__ */ Q("code", { children: i.slice(1, -1) }));
466
- else if (i.startsWith("*")) t.push(/* @__PURE__ */ Q("em", { children: i.slice(1, -1) }));
467
- else {
468
- let e = Te(i);
469
- t.push(e ? /* @__PURE__ */ Q("a", {
470
- href: e,
471
- target: "_blank",
472
- rel: "noopener noreferrer nofollow ugc",
473
- children: i
474
- }) : i);
475
- }
476
- n = a + i.length;
477
- }
478
- return n < e.length && t.push(e.slice(n)), t;
479
- }
480
- function De({ person: e }) {
481
- let t = e.name.split(/\s+/).map((e) => e[0]).slice(0, 2).join("").toUpperCase() || "?";
482
- return /* @__PURE__ */ Q("span", {
483
- class: "ck-avatar",
484
- "aria-hidden": "true",
485
- children: e.avatar_url && /^https:\/\//.test(e.avatar_url) ? /* @__PURE__ */ Q("img", {
486
- src: e.avatar_url,
487
- alt: "",
488
- referrerPolicy: "no-referrer"
489
- }) : t
490
- });
491
- }
492
- function Oe({ status: t }) {
493
- return /* @__PURE__ */ Q("span", {
494
- class: "ck-status",
495
- "data-status": t,
496
- children: e(`status_${t}`)
497
- });
498
- }
499
- function ke({ name: e, size: t = 18 }) {
500
- return /* @__PURE__ */ Q("svg", {
501
- width: t,
502
- height: t,
503
- viewBox: "0 0 24 24",
504
- fill: "none",
505
- stroke: "currentColor",
506
- "stroke-width": e === "more" ? 3.2 : 2,
507
- "stroke-linecap": "round",
508
- "stroke-linejoin": "round",
509
- "aria-hidden": "true",
510
- children: /* @__PURE__ */ Q("path", { d: {
511
- comment: "M4 5h16v11H8l-4 4z",
512
- inbox: "M4 13l2-8h12l2 8M4 13v6h16v-6M4 13h5l1 2h4l1-2h5",
513
- close: "M6 6l12 12M18 6L6 18",
514
- more: "M5 12h.01M12 12h.01M19 12h.01",
515
- image: "M4 5h16v14H4zM4 15l4-4 4 4 3-3 5 5M15 9h.01",
516
- paperclip: "M8 12l6-6a3 3 0 0 1 4 4l-8 8a5 5 0 0 1-7-7l7-7",
517
- pen: "M4 20l4-1 11-11-3-3L5 16zM14 6l3 3",
518
- check: "M5 12l4 4 10-10",
519
- user: "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 20a8 8 0 0 1 16 0"
520
- }[e] })
521
- });
522
- }
523
- //#endregion
524
- export { b as _, Se as a, $ as c, Q as d, le as f, de as g, se as h, Oe as i, Te as l, Y as m, ke as n, ye as o, ue as p, Ce as r, be as s, De as t, xe as u, I as v, y };