@commentkit/comment-kit 2.0.0 → 2.0.1
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/CHANGELOG.md +24 -0
- package/README.md +109 -13
- package/SECURITY.md +2 -2
- package/dist/node/cli/doctor.js +84 -20
- package/dist/node/cli/init.js +349 -35
- package/dist/node/cli/main.js +35 -17
- package/dist/node/cli/mcp.js +187 -6
- package/dist/node/shared/dashboard-places.js +33 -0
- package/dist/npm/chunks/{AgentSend-DxRJIYiz.js → AgentSend-DOy3jhyF.js} +16 -16
- package/dist/npm/chunks/{Checklist-CnlfeSbc.js → Checklist-CW_SwMpS.js} +70 -70
- package/dist/npm/chunks/{Composer-B1bBVszY.js → Composer-Bveq5QrK.js} +276 -274
- package/dist/npm/chunks/{Guest-vvNPz8h-.js → Guest-7hcN765o.js} +58 -55
- package/dist/npm/chunks/{MarkupEditor-VCOXh9d2.js → MarkupEditor-6bJGpWGO.js} +46 -39
- package/dist/npm/chunks/Panel-ChPUB68C.js +1211 -0
- package/dist/npm/chunks/{Settings-BGoZS2iV.js → Settings-CB5eEKnf.js} +77 -77
- package/dist/npm/chunks/{Shortcuts-B2OMvczr.js → Shortcuts-eAyjJ89P.js} +4 -4
- package/dist/npm/chunks/{StyleEditor-CJ_d8Huf.js → StyleEditor-CZTdAA5c.js} +10 -10
- package/dist/npm/chunks/{StylePanel-yQzHHlY7.js → StylePanel-B4pHQUL9.js} +61 -61
- package/dist/npm/chunks/{TaskFields-fmy6_HtK.js → TaskFields-C8BX0Sgg.js} +55 -55
- package/dist/npm/chunks/ThreadCard-B1EsX3PR.js +1160 -0
- package/dist/npm/chunks/Viewer-DY6zb90M.js +114 -0
- package/dist/npm/chunks/{agent-C1OQzBAm.js → agent-MTQHr9ei.js} +1 -1
- package/dist/npm/chunks/{ar-CAJ3XT8e.js → ar-L5cQ-NPe.js} +2 -0
- package/dist/npm/chunks/{card-bits-CAnzrqx3.js → card-bits-CTdrkYn8.js} +16 -16
- package/dist/npm/chunks/{client-kNAo2TTG.js → client-7eVxvg5j.js} +7 -7
- package/dist/npm/chunks/{confetti-CkBdSu19.js → confetti-BIs5s14P.js} +1 -1
- package/dist/npm/chunks/{context-B8UAzve0.js → context-Cf6khm7A.js} +1 -1
- package/dist/npm/chunks/{de-Dl18G48t.js → de-D0C-v6tP.js} +2 -0
- package/dist/npm/chunks/{dialog-GO04oC3D.js → dialog-DvdIkCW0.js} +1 -1
- package/dist/npm/chunks/{dpop-U48QIQd7.js → dpop-0A76OPa9.js} +1 -1
- package/dist/npm/chunks/{es-Dxk79lS9.js → es-Bw4Dj9tN.js} +2 -0
- package/dist/npm/chunks/{extension-CKFpPWmi.js → extension-DFVOvciD.js} +1 -1
- package/dist/npm/chunks/{extension-E81hWyiT.js → extension-SmoH5AA4.js} +2 -2
- package/dist/npm/chunks/{files-DyD5BZgp.js → files-4lV9YQIX.js} +2 -2
- package/dist/npm/chunks/{fr-8BebGKYD.js → fr-TkuQaIAa.js} +2 -0
- package/dist/npm/chunks/{hi-BIN6Yy_p.js → hi-DXSH2U8d.js} +2 -0
- package/dist/npm/chunks/{i18n-DOBt8e9U.js → i18n-aVSu9TcJ.js} +56 -47
- package/dist/npm/chunks/{identify-CN-3xzqL.js → identify-BGYh2dVo.js} +4 -4
- package/dist/npm/chunks/{it-Cr6EwpPQ.js → it-CiWA_bch.js} +2 -0
- package/dist/npm/chunks/{ja-Iy3s5aur.js → ja-C-QmR3yz.js} +2 -0
- package/dist/npm/chunks/{late-words-B2bmZceJ.js → late-words-80_VWt8S.js} +3 -1
- package/dist/npm/chunks/{live-CelVeZfP.js → live-BExWHzQ7.js} +1 -1
- package/dist/npm/chunks/{nl-B84WHqqe.js → nl-CEmZRqjX.js} +2 -0
- package/dist/npm/chunks/{page-key-DepmJzC1.js → page-key-HSY3Lze5.js} +1 -1
- package/dist/npm/chunks/{pick-yTyqtxN0.js → pick-B3sR7jtS.js} +1 -1
- package/dist/npm/chunks/{pkce-ChKGSW_4.js → pkce-CfZhiNBi.js} +1 -1
- package/dist/npm/chunks/{pt-BR-DOkdlfoe.js → pt-BR-b-a8sxO8.js} +2 -0
- package/dist/npm/chunks/{report-CrIqQZDI.js → report-DaVuoRYS.js} +1 -1
- package/dist/npm/chunks/show-BoN8AC-F.js +97 -0
- package/dist/npm/chunks/{signin-Dd1rb2BP.js → signin-BOWr_WCo.js} +3 -3
- package/dist/npm/chunks/{source-pXVve2Cx.js → source-mk3rGBBQ.js} +1 -1
- package/dist/npm/chunks/{src-BTMy4Gyc.js → src-C8rZFyL_.js} +77 -70
- package/dist/npm/chunks/start-CV4j78_q.js +1894 -0
- package/dist/npm/chunks/{states-sfTbjZz8.js → states-b9Bv3Ci7.js} +1 -1
- package/dist/npm/chunks/{upload-MgPYqPyE.js → upload-B2mkgMeJ.js} +1 -1
- package/dist/npm/chunks/uploads-8AxyRq7g.js +1147 -0
- package/dist/npm/chunks/{wrap-Bl0gbnFa.js → wrap-DW6EFbVQ.js} +1 -1
- package/dist/npm/chunks/{zh-CN-Z5fQCb7G.js → zh-CN-JTscW8u8.js} +2 -0
- package/dist/npm/element.js +1 -1
- package/dist/npm/headless.js +2 -2
- package/dist/npm/index.js +2 -2
- package/dist/npm/react.js +1 -1
- package/dist/npm/svelte.js +1 -1
- package/dist/npm/types/core/types.d.ts +2 -2
- package/dist/npm/vue.js +1 -1
- package/package.json +3 -1
- package/dist/npm/chunks/Panel-F37vIL1K.js +0 -1206
- package/dist/npm/chunks/ThreadCard-D51slKST.js +0 -1113
- package/dist/npm/chunks/Viewer-BOBadqmC.js +0 -111
- package/dist/npm/chunks/show-BgVC8gWY.js +0 -97
- package/dist/npm/chunks/start-DtVlpt7p.js +0 -1878
- package/dist/npm/chunks/uploads-D49mywwz.js +0 -1146
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as t, o as n, v as r } from "./client-
|
|
1
|
+
import { a as e } from "./src-C8rZFyL_.js";
|
|
2
|
+
import { b as t, o as n, v as r } from "./client-7eVxvg5j.js";
|
|
3
3
|
import { a as i, c as a, o, s } from "./privacy-BWUGlHw5.js";
|
|
4
4
|
import { s as c } from "./anchor-BsQNVkHj.js";
|
|
5
|
-
import { _ as l,
|
|
6
|
-
import { r as
|
|
7
|
-
import { n as
|
|
8
|
-
import { i as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { C as
|
|
5
|
+
import { _ as l, b as u, c as d, d as ee, f, m as p, u as m, v as h } from "./i18n-aVSu9TcJ.js";
|
|
6
|
+
import { r as te } from "./files-4lV9YQIX.js";
|
|
7
|
+
import { n as ne, r as re, t as ie } from "./card-bits-CTdrkYn8.js";
|
|
8
|
+
import { i as g } from "./drafts-B0ctr1g9.js";
|
|
9
|
+
import { a as ae, c as oe, d as se, f as ce, h as le, i as ue, l as de, m as fe, n as pe, o as me, p as _, t as he } from "./uploads-8AxyRq7g.js";
|
|
10
|
+
import { t as v } from "./states-b9Bv3Ci7.js";
|
|
11
|
+
import { C as y, F as ge, M as _e, O as ve, _ as ye, b as be, c as xe, g as b, k as Se, l as Ce, s as x, u as we, y as S } from "./start-CV4j78_q.js";
|
|
12
12
|
// src/capture/context.ts
|
|
13
|
-
function
|
|
14
|
-
let e = navigator.userAgent, t =
|
|
13
|
+
function Te() {
|
|
14
|
+
let e = navigator.userAgent, t = C(e, [
|
|
15
15
|
["Edge", /Edg\/([\d.]+)/],
|
|
16
16
|
["Opera", /OPR\/([\d.]+)/],
|
|
17
17
|
["Samsung Internet", /SamsungBrowser\/([\d.]+)/],
|
|
18
18
|
["Chrome", /Chrome\/([\d.]+)/],
|
|
19
19
|
["Firefox", /Firefox\/([\d.]+)/],
|
|
20
20
|
["Safari", /Version\/([\d.]+).*Safari/]
|
|
21
|
-
]), n =
|
|
21
|
+
]), n = C(e, [
|
|
22
22
|
["iOS", /(?:iPhone|iPad|iPod).*OS ([\d_]+)/],
|
|
23
23
|
["Android", /Android ([\d.]+)/],
|
|
24
24
|
["Windows", /Windows NT ([\d.]+)/],
|
|
@@ -45,7 +45,7 @@ function Ee() {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function C(e, t) {
|
|
49
49
|
for (let [n, r] of t) {
|
|
50
50
|
let t = e.match(r);
|
|
51
51
|
if (t) return [n, t[1] ?? ""];
|
|
@@ -53,40 +53,40 @@ function S(e, t) {
|
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
55
|
// src/capture/screenshot.ts
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var w = 8e6, T = 15e3;
|
|
57
|
+
function Ee() {
|
|
58
58
|
e() || import("./html2canvas-pro.esm-B7b8p5Wr.js").catch(() => void 0);
|
|
59
59
|
}
|
|
60
|
-
async function
|
|
60
|
+
async function De(t = {}) {
|
|
61
61
|
let n = (t.redact ?? []).filter(s), r = o(t.privacy), i = innerWidth, a = innerHeight, c = null;
|
|
62
|
-
e() && (c = await import("./extension-
|
|
62
|
+
e() && (c = await import("./extension-DFVOvciD.js").then((e) => e.captureTab(n, r)).catch(() => null)), c ?? (c = await E(n, r, i, a));
|
|
63
63
|
let l = c.getContext("2d"), u = c.width / Math.max(1, i);
|
|
64
|
-
return l &&
|
|
65
|
-
blob: await
|
|
64
|
+
return l && Oe(l, u, t), t.crop && t.region && (c = O(c, u, t.region, i, a)), {
|
|
65
|
+
blob: await Ae(c),
|
|
66
66
|
width: c.width,
|
|
67
67
|
height: c.height
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
async function
|
|
71
|
-
let [{ default: o }, { captureBackground: s, normalizeCaptureColors: c, settleStylesheets: l }] = await Promise.all([import("./html2canvas-pro.esm-B7b8p5Wr.js"), import("./colors-CWAn_swA.js")]), u = a([], t),
|
|
72
|
-
return
|
|
70
|
+
async function E(e, t, n, r) {
|
|
71
|
+
let [{ default: o }, { captureBackground: s, normalizeCaptureColors: c, settleStylesheets: l }] = await Promise.all([import("./html2canvas-pro.esm-B7b8p5Wr.js"), import("./colors-CWAn_swA.js")]), u = a([], t), d = (t) => t.tagName === "NOSCRIPT" || i(t, u) || e.some((e) => je(t, e)), ee = Math.min(devicePixelRatio || 1, 2, Math.sqrt(w / Math.max(1, n * r)));
|
|
72
|
+
return k(o(document.documentElement, {
|
|
73
73
|
useCORS: !0,
|
|
74
74
|
logging: !1,
|
|
75
75
|
backgroundColor: s(getComputedStyle(document.body).backgroundColor),
|
|
76
|
-
scale:
|
|
76
|
+
scale: ee,
|
|
77
77
|
x: scrollX,
|
|
78
78
|
y: scrollY,
|
|
79
79
|
width: n,
|
|
80
80
|
height: r,
|
|
81
81
|
windowWidth: document.documentElement.clientWidth,
|
|
82
82
|
windowHeight: r,
|
|
83
|
-
ignoreElements:
|
|
83
|
+
ignoreElements: d,
|
|
84
84
|
onclone: async (e) => {
|
|
85
85
|
await l(e), c(e);
|
|
86
86
|
}
|
|
87
|
-
}),
|
|
87
|
+
}), T);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Oe(e, t, n) {
|
|
90
90
|
e.setTransform(1, 0, 0, 1, 0, 0);
|
|
91
91
|
let r = n.accent ?? "#ff5733";
|
|
92
92
|
if (n.region) {
|
|
@@ -98,12 +98,12 @@ function ke(e, t, n) {
|
|
|
98
98
|
e.save(), e.shadowColor = "rgba(0,0,0,0.25)", e.shadowBlur = 6 * t, e.fillStyle = r, e.beginPath(), e.arc(i, a - o, o, Math.PI, 0), e.lineTo(i, a + o * .4), e.closePath(), e.fill(), e.shadowBlur = 0, e.fillStyle = "#ffffff", e.beginPath(), e.arc(i, a - o, o * .38, 0, Math.PI * 2), e.fill(), e.restore();
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
var
|
|
101
|
+
var D = {
|
|
102
102
|
w: 320,
|
|
103
103
|
h: 200
|
|
104
104
|
};
|
|
105
|
-
function
|
|
106
|
-
let r = Math.min(t, Math.max(
|
|
105
|
+
function ke(e, t, n) {
|
|
106
|
+
let r = Math.min(t, Math.max(D.w, e.w + 64)), i = Math.min(n, Math.max(D.h, e.h + 64));
|
|
107
107
|
return {
|
|
108
108
|
x: Math.min(Math.max(0, e.x + e.w / 2 - r / 2), t - r),
|
|
109
109
|
y: Math.min(Math.max(0, e.y + e.h / 2 - i / 2), n - i),
|
|
@@ -111,11 +111,11 @@ function Ae(e, t, n) {
|
|
|
111
111
|
h: i
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
let a =
|
|
114
|
+
function O(e, t, n, r, i) {
|
|
115
|
+
let a = ke(n, r, i), o = document.createElement("canvas");
|
|
116
116
|
return o.width = Math.max(1, Math.round(a.w * t)), o.height = Math.max(1, Math.round(a.h * t)), o.getContext("2d")?.drawImage(e, a.x * t, a.y * t, o.width, o.height, 0, 0, o.width, o.height), o;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Ae(e) {
|
|
119
119
|
return new Promise((t, n) => {
|
|
120
120
|
e.toBlob((r) => {
|
|
121
121
|
if (r && r.type === "image/webp") return t(r);
|
|
@@ -123,50 +123,50 @@ function je(e) {
|
|
|
123
123
|
}, "image/webp", .86);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function k(e, t) {
|
|
127
127
|
return new Promise((n, r) => {
|
|
128
128
|
let i = setTimeout(() => r(/* @__PURE__ */ Error("The screenshot took too long. Your feedback will be sent without it.")), t);
|
|
129
129
|
e.then((e) => (clearTimeout(i), n(e)), (e) => (clearTimeout(i), r(e)));
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function je(e, t) {
|
|
133
133
|
try {
|
|
134
134
|
return e.matches(t) || !!e.closest(t);
|
|
135
135
|
} catch {
|
|
136
136
|
return !1;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
function
|
|
141
|
-
let
|
|
142
|
-
if (!
|
|
139
|
+
x(v), x(se);
|
|
140
|
+
function Me({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent: se, onError: _, share: v = null, onPending: _e }) {
|
|
141
|
+
let x = S(e.state, (e) => e.config), C = S(e.state, (e) => e.session?.person ?? null), w = h(() => we(e, i.anchor), [i.anchor]), [T, Ee] = l(() => Be()), [E, Oe] = l(() => fe(w, void 0, we(e, i.anchor, n()))), [D, ke] = l([]), [O, Ae] = l(null), k = e.options.tools ?? {}, je = x?.features.screenshots !== !1 && k.screenshots !== !1, Me = k.attachments !== !1, [A, He] = l(je ? "capturing" : "off"), M = S(e.state, (e) => !!e.session?.capabilities.triage), Ue = M && k.checklist !== !1, [N] = l(() => Ve(w)), [P, We] = l(N?.task ?? {}), [F, Ge] = l(() => !!Fe(N?.task ?? {})), [I, L] = l(N?.checklist ?? null), [R, Ke] = l(""), qe = b(M, () => import("./TaskFields-C8BX0Sgg.js").then((e) => e.TaskDraft), () => void 0), [z, Je] = l(N?.markup ?? []), [Ye, B] = l(!1), Xe = b(Ye, () => import("./MarkupEditor-6bJGpWGO.js").then((e) => e.MarkupEditor), (e) => (B(!1), _(e))), V = pe(e, (e) => _(new r(0, "file_rejected", e))), H = h(() => {
|
|
142
|
+
if (!M || k.style === !1 || i.anchor.type !== "element" && i.anchor.type !== "text") return null;
|
|
143
143
|
let e = c(i.anchor).element;
|
|
144
144
|
return e instanceof HTMLElement || e instanceof SVGElement ? e : null;
|
|
145
|
-
}, [i.anchor,
|
|
146
|
-
|
|
145
|
+
}, [i.anchor, M]), [U, Ze] = l(N?.styles ?? []), [W, Qe] = l(!1), $e = b(W, () => import("./StylePanel-B4pHQUL9.js").then((e) => e.StylePanel), _), G = p(null), K = p(null), et = () => {
|
|
146
|
+
H && (G.current ?? (G.current = me(H)), K.current ?? (K.current = new ue(H)), Qe(!0));
|
|
147
147
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}, [
|
|
151
|
-
let [
|
|
148
|
+
f(() => {
|
|
149
|
+
W ? K.current?.apply(U) : K.current?.revert();
|
|
150
|
+
}, [W, U]), f(() => () => K.current?.revert(), []);
|
|
151
|
+
let [q, tt] = l(null), nt = b(q !== null, () => import("./Viewer-DY6zb90M.js").then((e) => e.Viewer), _), [J, rt] = l(!1), [it, at] = l(!1), ot = !!(x?.features.console_capture || x?.features.network_capture), st = S(e.state, (e) => !e.session || e.session.role === "guest"), [ct, lt] = l(x?.features.capture_consent_default === !0 && !st), Y = ye(), [ut, dt] = l(!1), X = !a && !!v && !e.auth.pending(), [ft, pt] = l(null), mt = {
|
|
152
152
|
name: p(null),
|
|
153
153
|
email: p(null)
|
|
154
|
-
},
|
|
155
|
-
e && !
|
|
156
|
-
}),
|
|
154
|
+
}, ht = p(null), Z = p(null), gt = p(null), Q = p(null), _t = p(null), [vt] = l(() => (e) => {
|
|
155
|
+
e && !Q.current && Se(e), Q.current = e;
|
|
156
|
+
}), yt = p(null), bt = (e, t) => {
|
|
157
157
|
let n = e.closest(".ck-draft-item");
|
|
158
158
|
((n?.nextElementSibling ?? n?.previousElementSibling)?.querySelector(".ck-draft-item button, input") ?? t())?.focus();
|
|
159
|
-
},
|
|
159
|
+
}, xt = p(Promise.resolve(null));
|
|
160
160
|
ee(() => {
|
|
161
|
-
if (
|
|
161
|
+
if (A !== "capturing") return;
|
|
162
162
|
let t = !1, n = 0, r = 0;
|
|
163
|
-
return
|
|
163
|
+
return xt.current = new Promise((a) => {
|
|
164
164
|
let o = !1, s = () => {
|
|
165
165
|
if (!o) {
|
|
166
166
|
if (o = !0, t) return a(null);
|
|
167
|
-
|
|
168
|
-
redact: [...
|
|
169
|
-
privacy:
|
|
167
|
+
De({
|
|
168
|
+
redact: [...x?.privacy.redact_selectors ?? [], ...e.options.redact ?? []],
|
|
169
|
+
privacy: xe(x, e.options.privacy),
|
|
170
170
|
pin: i.region ? null : i.point,
|
|
171
171
|
region: i.region,
|
|
172
172
|
crop: !!i.region
|
|
@@ -174,179 +174,179 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
|
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
n = requestAnimationFrame(() => n = requestAnimationFrame(s)), r = window.setTimeout(s, 300);
|
|
177
|
-
}),
|
|
178
|
-
t || (e &&
|
|
177
|
+
}), xt.current.then((e) => {
|
|
178
|
+
t || (e && Ae(e), He(e ? "ready" : "failed"));
|
|
179
179
|
}), () => {
|
|
180
180
|
t = !0, cancelAnimationFrame(n), clearTimeout(r);
|
|
181
181
|
};
|
|
182
182
|
}, []);
|
|
183
|
-
let
|
|
184
|
-
|
|
185
|
-
let
|
|
186
|
-
|
|
183
|
+
let $ = h(() => O && URL.createObjectURL(O.blob), [O]);
|
|
184
|
+
f(() => () => void ($ && URL.revokeObjectURL($)), [$]);
|
|
185
|
+
let St = (e) => {
|
|
186
|
+
Oe(e), le(w, e);
|
|
187
187
|
};
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
f(() => {
|
|
189
|
+
Z.current = null;
|
|
190
190
|
}, [
|
|
191
|
-
T,
|
|
192
191
|
E,
|
|
193
192
|
D,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
193
|
+
O,
|
|
194
|
+
A,
|
|
195
|
+
z,
|
|
196
|
+
V.items,
|
|
197
|
+
ct,
|
|
198
|
+
P,
|
|
199
|
+
I,
|
|
200
|
+
U
|
|
201
201
|
]);
|
|
202
|
-
let
|
|
202
|
+
let Ct = !F && !!Fe(P), wt = h(() => re(i.point, i.region ? {
|
|
203
203
|
top: i.region.y,
|
|
204
204
|
bottom: i.region.y + i.region.h
|
|
205
|
-
} : void 0), [i.point]),
|
|
206
|
-
let n = null, r = null, a =
|
|
205
|
+
} : void 0), [i.point]), Tt = (e) => V.add(e), Et = async () => {
|
|
206
|
+
let n = null, r = null, a = A === "capturing" ? await xt.current : A === "ready" ? O : null;
|
|
207
207
|
if (a) try {
|
|
208
208
|
let t = a.blob.type, r = `screenshot.${t === "image/webp" ? "webp" : t === "image/jpeg" ? "jpg" : "png"}`;
|
|
209
209
|
n = (await e.upload(a.blob, r, "screenshot")).id;
|
|
210
210
|
} catch {
|
|
211
211
|
r = "screenshot";
|
|
212
212
|
}
|
|
213
|
-
let o = await
|
|
213
|
+
let o = await V.ready(), s = o.ids;
|
|
214
214
|
o.missing && (r ?? (r = "files"));
|
|
215
215
|
let c = {
|
|
216
|
-
...
|
|
217
|
-
...
|
|
216
|
+
...Te(),
|
|
217
|
+
...ot && ct ? ge() : {},
|
|
218
218
|
screenshot_id: n,
|
|
219
|
-
markup:
|
|
220
|
-
}, l =
|
|
219
|
+
markup: z.length ? z : void 0
|
|
220
|
+
}, l = M ? Fe(P) : void 0, u = [...I ?? [], ...I && R.trim() ? [R.trim()] : []], d = H ? ae(U) : [];
|
|
221
221
|
return {
|
|
222
222
|
key: t(16),
|
|
223
223
|
input: {
|
|
224
224
|
anchor: i.anchor,
|
|
225
|
-
body:
|
|
225
|
+
body: E.trim(),
|
|
226
226
|
capture: c,
|
|
227
227
|
attachmentIds: s,
|
|
228
|
-
mentionIds:
|
|
228
|
+
mentionIds: D,
|
|
229
229
|
task: l,
|
|
230
230
|
checklist: u,
|
|
231
|
-
styleChanges:
|
|
231
|
+
styleChanges: d
|
|
232
232
|
},
|
|
233
233
|
missing: r
|
|
234
234
|
};
|
|
235
|
-
},
|
|
236
|
-
if (
|
|
237
|
-
if (
|
|
238
|
-
|
|
235
|
+
}, Dt = async () => {
|
|
236
|
+
if (J || !E.trim() || !Y) return;
|
|
237
|
+
if (at(!1), !a && !v && !ut) {
|
|
238
|
+
dt(!0);
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
|
-
let t =
|
|
242
|
-
if (
|
|
243
|
-
|
|
241
|
+
let t = X ? T.name.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(T.email.trim()) ? null : "email" : "name" : null;
|
|
242
|
+
if (pt(t), t) return mt[t].current?.focus();
|
|
243
|
+
rt(!0);
|
|
244
244
|
try {
|
|
245
|
-
let t = !a && !
|
|
246
|
-
if (
|
|
247
|
-
let { startGuest: n } = await import("./Guest-
|
|
248
|
-
|
|
249
|
-
name:
|
|
250
|
-
email:
|
|
245
|
+
let t = !a && !v;
|
|
246
|
+
if (X && v) {
|
|
247
|
+
let { startGuest: n } = await import("./Guest-7hcN765o.js");
|
|
248
|
+
g(ze, JSON.stringify({
|
|
249
|
+
name: T.name,
|
|
250
|
+
email: T.email
|
|
251
251
|
})), t = await n(e, {
|
|
252
|
-
share:
|
|
253
|
-
...
|
|
252
|
+
share: v,
|
|
253
|
+
...T
|
|
254
254
|
}) === "popup";
|
|
255
255
|
}
|
|
256
256
|
if (t) {
|
|
257
|
-
if (
|
|
257
|
+
if (g(Ce, JSON.stringify({
|
|
258
258
|
draft: i,
|
|
259
259
|
scrollY
|
|
260
|
-
})),
|
|
261
|
-
id:
|
|
262
|
-
checklist:
|
|
263
|
-
task:
|
|
264
|
-
markup:
|
|
265
|
-
styles:
|
|
260
|
+
})), g(j, JSON.stringify({
|
|
261
|
+
id: w,
|
|
262
|
+
checklist: I,
|
|
263
|
+
task: P,
|
|
264
|
+
markup: z,
|
|
265
|
+
styles: U
|
|
266
266
|
})), !await o()) return;
|
|
267
|
-
|
|
267
|
+
g(Ce, null), g(j, null);
|
|
268
268
|
}
|
|
269
|
-
let n =
|
|
269
|
+
let n = Z.current ?? (Z.current = await Et()), r = await e.createThread({
|
|
270
270
|
...n.input,
|
|
271
271
|
idempotencyKey: n.key
|
|
272
272
|
});
|
|
273
|
-
if (
|
|
274
|
-
|
|
273
|
+
if (Z.current = null, r.pending_verification) return _e?.(e.auth.pending()?.email ?? T.email);
|
|
274
|
+
ce(w), g(ze, null), se(r, n.missing);
|
|
275
275
|
} catch (t) {
|
|
276
|
-
if (t instanceof r && ["pending_limit", "verification_required"].includes(t.code) && e.auth.pending()) return
|
|
277
|
-
let n =
|
|
278
|
-
|
|
276
|
+
if (t instanceof r && ["pending_limit", "verification_required"].includes(t.code) && e.auth.pending()) return _e?.(e.auth.pending().email);
|
|
277
|
+
let n = ne(t);
|
|
278
|
+
at(n ?? !0), n || _(t);
|
|
279
279
|
} finally {
|
|
280
|
-
|
|
280
|
+
rt(!1);
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
|
-
return /* @__PURE__ */ m(
|
|
283
|
+
return /* @__PURE__ */ m(u, { children: [i.region ? /* @__PURE__ */ m("div", {
|
|
284
284
|
class: "ck-pending-region",
|
|
285
|
-
style:
|
|
285
|
+
style: ve(i.region.x, i.region.y, i.region.w, i.region.h),
|
|
286
286
|
"aria-hidden": "true",
|
|
287
287
|
"data-commentkit-ui": !0
|
|
288
288
|
}) : i.anchor.type === "page" ? null : /* @__PURE__ */ m("div", {
|
|
289
289
|
class: "ck-pending-pin",
|
|
290
|
-
style:
|
|
290
|
+
style: ve(i.point.x, i.point.y),
|
|
291
291
|
"aria-hidden": "true",
|
|
292
292
|
"data-commentkit-ui": !0,
|
|
293
293
|
children: [/* @__PURE__ */ m("svg", {
|
|
294
294
|
viewBox: "5 3 54 62",
|
|
295
|
-
children: /* @__PURE__ */ m("path", { d:
|
|
296
|
-
}),
|
|
295
|
+
children: /* @__PURE__ */ m("path", { d: Pe })
|
|
296
|
+
}), C ? /* @__PURE__ */ m(be, { person: C }) : null]
|
|
297
297
|
}), /* @__PURE__ */ m("div", {
|
|
298
298
|
class: "ck-card ck-composer",
|
|
299
|
-
style:
|
|
299
|
+
style: wt,
|
|
300
300
|
role: "region",
|
|
301
|
-
"aria-label":
|
|
301
|
+
"aria-label": d("comment"),
|
|
302
302
|
"data-commentkit-ui": !0,
|
|
303
303
|
onKeyDown: (e) => e.key === "Escape" && s(!0),
|
|
304
|
-
...
|
|
304
|
+
...Me ? te(Tt) : {},
|
|
305
305
|
children: [
|
|
306
306
|
/* @__PURE__ */ m("div", {
|
|
307
307
|
class: "ck-card-body",
|
|
308
308
|
children: [
|
|
309
309
|
i.anchor.quote ? /* @__PURE__ */ m("blockquote", {
|
|
310
310
|
class: "ck-quote",
|
|
311
|
-
"aria-label":
|
|
311
|
+
"aria-label": d("quotedText"),
|
|
312
312
|
children: /* @__PURE__ */ m("bdi", { children: i.anchor.quote.slice(0, 200) })
|
|
313
313
|
}) : null,
|
|
314
|
-
|
|
314
|
+
Y ? null : /* @__PURE__ */ m("div", {
|
|
315
315
|
class: "ck-note",
|
|
316
316
|
"data-tone": "warning",
|
|
317
317
|
role: "status",
|
|
318
|
-
children:
|
|
318
|
+
children: d("offlineSend")
|
|
319
319
|
}),
|
|
320
|
-
|
|
320
|
+
it && Y ? /* @__PURE__ */ m("div", {
|
|
321
321
|
class: "ck-note",
|
|
322
322
|
"data-tone": "warning",
|
|
323
323
|
role: "alert",
|
|
324
|
-
children:
|
|
325
|
-
|
|
324
|
+
children: it === !0 ? /* @__PURE__ */ m(u, { children: [
|
|
325
|
+
d("sendFailed"),
|
|
326
326
|
" ",
|
|
327
327
|
/* @__PURE__ */ m("button", {
|
|
328
328
|
class: "ck-btn",
|
|
329
|
-
onClick: () => (
|
|
330
|
-
children:
|
|
329
|
+
onClick: () => (gt.current?.focus(), void Dt()),
|
|
330
|
+
children: d("retry")
|
|
331
331
|
})
|
|
332
|
-
] }) : `${
|
|
332
|
+
] }) : `${it} ${d("savedHere")}`
|
|
333
333
|
}) : null,
|
|
334
|
-
/* @__PURE__ */ m(
|
|
334
|
+
/* @__PURE__ */ m(de, {
|
|
335
335
|
client: e,
|
|
336
|
-
value:
|
|
337
|
-
onChange:
|
|
338
|
-
onMentions:
|
|
339
|
-
onSubmit: () => void
|
|
340
|
-
placeholder:
|
|
336
|
+
value: E,
|
|
337
|
+
onChange: St,
|
|
338
|
+
onMentions: ke,
|
|
339
|
+
onSubmit: () => void Dt(),
|
|
340
|
+
placeholder: d("composerPlaceholder"),
|
|
341
341
|
autofocus: !0,
|
|
342
|
-
disabled:
|
|
342
|
+
disabled: J,
|
|
343
343
|
canMention: a
|
|
344
344
|
}),
|
|
345
|
-
|
|
345
|
+
I === null ? null : /* @__PURE__ */ m("div", {
|
|
346
346
|
class: "ck-draft-list",
|
|
347
347
|
role: "group",
|
|
348
|
-
"aria-label":
|
|
349
|
-
children: [
|
|
348
|
+
"aria-label": d("checklist"),
|
|
349
|
+
children: [I.map((e, t) => /* @__PURE__ */ m("div", {
|
|
350
350
|
class: "ck-draft-item",
|
|
351
351
|
children: [
|
|
352
352
|
/* @__PURE__ */ m("span", {
|
|
@@ -356,187 +356,189 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
|
|
|
356
356
|
/* @__PURE__ */ m("bdi", { children: e }),
|
|
357
357
|
/* @__PURE__ */ m("button", {
|
|
358
358
|
class: "ck-ghost ck-ghost-sm",
|
|
359
|
-
"aria-label":
|
|
359
|
+
"aria-label": d("removeItem", { item: e }),
|
|
360
|
+
title: d("removeItem", { item: e }),
|
|
360
361
|
onClick: (e) => {
|
|
361
|
-
|
|
362
|
+
bt(e.currentTarget, () => Q.current ?? _t.current), L(I.filter((e, n) => n !== t));
|
|
362
363
|
},
|
|
363
|
-
children: /* @__PURE__ */ m(
|
|
364
|
+
children: /* @__PURE__ */ m(y, {
|
|
364
365
|
name: "close",
|
|
365
366
|
size: 12
|
|
366
367
|
})
|
|
367
368
|
})
|
|
368
369
|
]
|
|
369
|
-
})),
|
|
370
|
+
})), I.length < 30 ? /* @__PURE__ */ m("input", {
|
|
370
371
|
class: "ck-input",
|
|
371
372
|
maxLength: 300,
|
|
372
|
-
placeholder:
|
|
373
|
-
"aria-label":
|
|
373
|
+
placeholder: d("checklistAdd"),
|
|
374
|
+
"aria-label": d("checklistAdd"),
|
|
374
375
|
enterKeyHint: "done",
|
|
375
|
-
value:
|
|
376
|
-
ref:
|
|
377
|
-
onInput: (e) =>
|
|
376
|
+
value: R,
|
|
377
|
+
ref: vt,
|
|
378
|
+
onInput: (e) => Ke(e.target.value),
|
|
378
379
|
onKeyDown: (e) => {
|
|
379
|
-
e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" &&
|
|
380
|
+
e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" && R.trim() && (e.preventDefault(), L([...I, R.trim()]), Ke(""));
|
|
380
381
|
}
|
|
381
382
|
}) : null]
|
|
382
383
|
}),
|
|
383
|
-
|
|
384
|
+
U.length ? /* @__PURE__ */ m("div", {
|
|
384
385
|
class: "ck-draft-list ck-style-list",
|
|
385
386
|
role: "group",
|
|
386
|
-
"aria-label":
|
|
387
|
-
children:
|
|
387
|
+
"aria-label": d("styleChanges"),
|
|
388
|
+
children: U.map((e) => /* @__PURE__ */ m("div", {
|
|
388
389
|
class: "ck-draft-item",
|
|
389
|
-
children: [/* @__PURE__ */ m("code", { children:
|
|
390
|
+
children: [/* @__PURE__ */ m("code", { children: oe(e) }), /* @__PURE__ */ m("button", {
|
|
390
391
|
class: "ck-ghost ck-ghost-sm",
|
|
391
|
-
"aria-label":
|
|
392
|
+
"aria-label": d("styleRemoveChange", { change: oe(e) }),
|
|
393
|
+
title: d("styleRemoveChange", { change: oe(e) }),
|
|
392
394
|
onClick: (t) => {
|
|
393
|
-
|
|
395
|
+
bt(t.currentTarget, () => yt.current), Ze(U.filter((t) => t.property !== e.property));
|
|
394
396
|
},
|
|
395
|
-
children: /* @__PURE__ */ m(
|
|
397
|
+
children: /* @__PURE__ */ m(y, {
|
|
396
398
|
name: "close",
|
|
397
399
|
size: 12
|
|
398
400
|
})
|
|
399
401
|
})]
|
|
400
402
|
}))
|
|
401
403
|
}) : null,
|
|
402
|
-
|
|
403
|
-
base:
|
|
404
|
-
changes:
|
|
405
|
-
onChange:
|
|
406
|
-
onClose: () =>
|
|
404
|
+
W && $e && G.current ? /* @__PURE__ */ m($e, {
|
|
405
|
+
base: G.current,
|
|
406
|
+
changes: U,
|
|
407
|
+
onChange: Ze,
|
|
408
|
+
onClose: () => Qe(!1)
|
|
407
409
|
}) : null,
|
|
408
|
-
|
|
410
|
+
M && qe && F ? /* @__PURE__ */ m(qe, {
|
|
409
411
|
client: e,
|
|
410
|
-
value:
|
|
411
|
-
onChange:
|
|
412
|
+
value: P,
|
|
413
|
+
onChange: We
|
|
412
414
|
}) : null,
|
|
413
|
-
|
|
415
|
+
X || ut && !a ? /* @__PURE__ */ m("div", {
|
|
414
416
|
class: "ck-note",
|
|
415
417
|
children: [
|
|
416
|
-
/* @__PURE__ */ m("strong", { children:
|
|
417
|
-
/* @__PURE__ */ m("div", { children:
|
|
418
|
-
|
|
418
|
+
/* @__PURE__ */ m("strong", { children: d(X ? "guestIntro" : "signInToSend") }),
|
|
419
|
+
/* @__PURE__ */ m("div", { children: d(v ? "guestExplain" : "signInExplain") }),
|
|
420
|
+
X ? /* @__PURE__ */ m("div", {
|
|
419
421
|
class: "ck-guest",
|
|
420
422
|
children: [["name", "email"].map((e) => /* @__PURE__ */ m("div", {
|
|
421
423
|
class: "ck-field",
|
|
422
424
|
children: [
|
|
423
425
|
/* @__PURE__ */ m("label", {
|
|
424
426
|
for: `ck-guest-${e}`,
|
|
425
|
-
children:
|
|
427
|
+
children: d(e === "name" ? "guestName" : "guestEmail")
|
|
426
428
|
}),
|
|
427
429
|
/* @__PURE__ */ m("input", {
|
|
428
430
|
id: `ck-guest-${e}`,
|
|
429
|
-
ref:
|
|
431
|
+
ref: mt[e],
|
|
430
432
|
class: "ck-input",
|
|
431
433
|
type: e === "email" ? "email" : "text",
|
|
432
434
|
autoComplete: e,
|
|
433
435
|
maxLength: e === "name" ? 120 : 254,
|
|
434
436
|
enterKeyHint: "send",
|
|
435
437
|
autoCapitalize: e === "name" ? "words" : "off",
|
|
436
|
-
value:
|
|
437
|
-
"aria-invalid":
|
|
438
|
-
"aria-describedby":
|
|
438
|
+
value: T[e],
|
|
439
|
+
"aria-invalid": ft === e,
|
|
440
|
+
"aria-describedby": ft === e ? "ck-guest-error" : void 0,
|
|
439
441
|
onInput: (t) => {
|
|
440
442
|
let n = t.target.value;
|
|
441
|
-
|
|
443
|
+
Ee((t) => ({
|
|
442
444
|
...t,
|
|
443
445
|
[e]: n
|
|
444
446
|
}));
|
|
445
447
|
},
|
|
446
448
|
onKeyDown: (e) => {
|
|
447
|
-
e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" &&
|
|
449
|
+
e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" && Dt();
|
|
448
450
|
}
|
|
449
451
|
}),
|
|
450
|
-
|
|
452
|
+
ft === e ? /* @__PURE__ */ m("span", {
|
|
451
453
|
class: "ck-error",
|
|
452
454
|
id: "ck-guest-error",
|
|
453
455
|
role: "alert",
|
|
454
|
-
children:
|
|
456
|
+
children: d(e === "name" ? "guestNameMissing" : "guestEmailInvalid")
|
|
455
457
|
}) : null
|
|
456
458
|
]
|
|
457
459
|
})), /* @__PURE__ */ m("p", {
|
|
458
460
|
class: "ck-muted ck-guest-privacy",
|
|
459
461
|
children: [
|
|
460
|
-
|
|
462
|
+
d("guestPrivacy"),
|
|
461
463
|
" ",
|
|
462
464
|
/* @__PURE__ */ m("a", {
|
|
463
|
-
href:
|
|
465
|
+
href: Re(e.options.endpoint),
|
|
464
466
|
target: "_blank",
|
|
465
467
|
rel: "noopener noreferrer",
|
|
466
|
-
children:
|
|
468
|
+
children: d("guestPrivacyLink")
|
|
467
469
|
}),
|
|
468
|
-
|
|
469
|
-
href:
|
|
470
|
+
Le(x) ? /* @__PURE__ */ m(u, { children: [" · ", /* @__PURE__ */ m("a", {
|
|
471
|
+
href: Le(x),
|
|
470
472
|
target: "_blank",
|
|
471
473
|
rel: "noopener noreferrer",
|
|
472
|
-
children:
|
|
474
|
+
children: d("guestPrivacySite", { website: x?.project.name ?? "" })
|
|
473
475
|
})] }) : null
|
|
474
476
|
]
|
|
475
477
|
})]
|
|
476
478
|
}) : null
|
|
477
479
|
]
|
|
478
480
|
}) : null,
|
|
479
|
-
|
|
481
|
+
A === "capturing" ? /* @__PURE__ */ m("div", {
|
|
480
482
|
class: "ck-shot ck-shot-wait",
|
|
481
483
|
children: /* @__PURE__ */ m("span", {
|
|
482
484
|
class: "ck-muted",
|
|
483
|
-
children:
|
|
485
|
+
children: d("capturing")
|
|
484
486
|
})
|
|
485
487
|
}) : null,
|
|
486
|
-
|
|
488
|
+
A === "failed" ? /* @__PURE__ */ m("p", {
|
|
487
489
|
class: "ck-muted",
|
|
488
|
-
children:
|
|
490
|
+
children: d("capturingFailed")
|
|
489
491
|
}) : null,
|
|
490
|
-
|
|
492
|
+
A === "ready" && $ ? /* @__PURE__ */ m("div", {
|
|
491
493
|
class: "ck-shot",
|
|
492
494
|
children: [/* @__PURE__ */ m("button", {
|
|
493
495
|
class: "ck-shot-open",
|
|
494
|
-
"aria-label":
|
|
495
|
-
onClick: () =>
|
|
496
|
+
"aria-label": d("openImage", { name: d("screenshot") }),
|
|
497
|
+
onClick: () => tt(-1),
|
|
496
498
|
children: /* @__PURE__ */ m("img", {
|
|
497
|
-
src:
|
|
498
|
-
alt:
|
|
499
|
-
title:
|
|
500
|
-
style: { objectPosition:
|
|
499
|
+
src: $,
|
|
500
|
+
alt: d("screenshotIncluded"),
|
|
501
|
+
title: d("screenshotIncluded"),
|
|
502
|
+
style: { objectPosition: Ie(i) }
|
|
501
503
|
})
|
|
502
504
|
}), /* @__PURE__ */ m("div", {
|
|
503
505
|
class: "ck-shot-tools",
|
|
504
|
-
children: [
|
|
506
|
+
children: [k.markup === !1 ? null : /* @__PURE__ */ m("button", {
|
|
505
507
|
class: "ck-chip",
|
|
506
|
-
onClick: () =>
|
|
507
|
-
children: [/* @__PURE__ */ m(
|
|
508
|
+
onClick: () => B(!0),
|
|
509
|
+
children: [/* @__PURE__ */ m(y, {
|
|
508
510
|
name: "pen",
|
|
509
511
|
size: 14
|
|
510
|
-
}),
|
|
512
|
+
}), d("markup")]
|
|
511
513
|
}), /* @__PURE__ */ m("button", {
|
|
512
514
|
class: "ck-chip",
|
|
513
|
-
onClick: () =>
|
|
514
|
-
children:
|
|
515
|
+
onClick: () => He("off"),
|
|
516
|
+
children: d("screenshotRemove")
|
|
515
517
|
})]
|
|
516
518
|
})]
|
|
517
519
|
}) : null,
|
|
518
|
-
|
|
520
|
+
A === "off" && O ? /* @__PURE__ */ m("button", {
|
|
519
521
|
class: "ck-chip ck-shot-add",
|
|
520
|
-
onClick: () =>
|
|
521
|
-
children: [/* @__PURE__ */ m(
|
|
522
|
+
onClick: () => He("ready"),
|
|
523
|
+
children: [/* @__PURE__ */ m(y, {
|
|
522
524
|
name: "image",
|
|
523
525
|
size: 14
|
|
524
|
-
}),
|
|
526
|
+
}), d("screenshotAdd")]
|
|
525
527
|
}) : null,
|
|
526
|
-
|
|
528
|
+
ot ? /* @__PURE__ */ m("label", {
|
|
527
529
|
class: "ck-check",
|
|
528
530
|
children: [/* @__PURE__ */ m("input", {
|
|
529
531
|
type: "checkbox",
|
|
530
|
-
checked:
|
|
531
|
-
onChange: (e) =>
|
|
532
|
-
}),
|
|
532
|
+
checked: ct,
|
|
533
|
+
onChange: (e) => lt(e.target.checked)
|
|
534
|
+
}), d("includeDiagnostics")]
|
|
533
535
|
}) : null,
|
|
534
|
-
|
|
535
|
-
/* @__PURE__ */ m(
|
|
536
|
-
items:
|
|
537
|
-
onRemove:
|
|
538
|
-
onRetry:
|
|
539
|
-
onOpen:
|
|
536
|
+
ot ? /* @__PURE__ */ m(Ne, {}) : null,
|
|
537
|
+
/* @__PURE__ */ m(he, {
|
|
538
|
+
items: V.items,
|
|
539
|
+
onRemove: V.remove,
|
|
540
|
+
onRetry: V.retry,
|
|
541
|
+
onOpen: tt
|
|
540
542
|
})
|
|
541
543
|
]
|
|
542
544
|
}),
|
|
@@ -546,19 +548,19 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
|
|
|
546
548
|
/* @__PURE__ */ m("div", {
|
|
547
549
|
class: "ck-tools",
|
|
548
550
|
children: [
|
|
549
|
-
|
|
550
|
-
input:
|
|
551
|
-
onFiles:
|
|
552
|
-
types:
|
|
551
|
+
Me ? /* @__PURE__ */ m(ie, {
|
|
552
|
+
input: ht,
|
|
553
|
+
onFiles: Tt,
|
|
554
|
+
types: x?.limits?.upload_types
|
|
553
555
|
}) : null,
|
|
554
|
-
|
|
555
|
-
ref:
|
|
556
|
+
Ue ? /* @__PURE__ */ m("button", {
|
|
557
|
+
ref: _t,
|
|
556
558
|
class: "ck-ghost",
|
|
557
559
|
"data-tool": "checklist",
|
|
558
|
-
"aria-label":
|
|
559
|
-
title:
|
|
560
|
-
"aria-pressed":
|
|
561
|
-
onClick: () =>
|
|
560
|
+
"aria-label": d("addChecklist"),
|
|
561
|
+
title: d("addChecklist"),
|
|
562
|
+
"aria-pressed": I === null ? !1 : !I.length || void 0,
|
|
563
|
+
onClick: () => I?.length ? Q.current?.focus() : I === null ? L([]) : (Ke(""), L(null)),
|
|
562
564
|
children: /* @__PURE__ */ m("svg", {
|
|
563
565
|
width: "16",
|
|
564
566
|
height: "16",
|
|
@@ -572,15 +574,15 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
|
|
|
572
574
|
children: /* @__PURE__ */ m("path", { d: "m3 6 2 2 4-4M3 16l2 2 4-4M13 7h8M13 17h8" })
|
|
573
575
|
})
|
|
574
576
|
}) : null,
|
|
575
|
-
|
|
577
|
+
M && qe ? /* @__PURE__ */ m("button", {
|
|
576
578
|
class: "ck-ghost",
|
|
577
579
|
"data-tool": "task",
|
|
578
|
-
"aria-label":
|
|
579
|
-
title:
|
|
580
|
-
"aria-pressed":
|
|
581
|
-
"data-set":
|
|
582
|
-
"aria-describedby":
|
|
583
|
-
onClick: () =>
|
|
580
|
+
"aria-label": d("taskDetails"),
|
|
581
|
+
title: d("taskDetails"),
|
|
582
|
+
"aria-pressed": F,
|
|
583
|
+
"data-set": Ct ? "" : void 0,
|
|
584
|
+
"aria-describedby": Ct ? "ck-task-set" : void 0,
|
|
585
|
+
onClick: () => Ge(!F),
|
|
584
586
|
children: [/* @__PURE__ */ m("svg", {
|
|
585
587
|
width: "16",
|
|
586
588
|
height: "16",
|
|
@@ -595,17 +597,17 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
|
|
|
595
597
|
}), /* @__PURE__ */ m("span", {
|
|
596
598
|
id: "ck-task-set",
|
|
597
599
|
hidden: !0,
|
|
598
|
-
children:
|
|
600
|
+
children: d("taskDetailsSet")
|
|
599
601
|
})]
|
|
600
602
|
}) : null,
|
|
601
|
-
|
|
602
|
-
ref:
|
|
603
|
+
H ? /* @__PURE__ */ m("button", {
|
|
604
|
+
ref: yt,
|
|
603
605
|
class: "ck-ghost",
|
|
604
606
|
"data-tool": "style",
|
|
605
|
-
"aria-label":
|
|
606
|
-
title:
|
|
607
|
-
"aria-pressed":
|
|
608
|
-
onClick: () =>
|
|
607
|
+
"aria-label": d("adjustStyle"),
|
|
608
|
+
title: d("adjustStyle"),
|
|
609
|
+
"aria-pressed": W,
|
|
610
|
+
onClick: () => W ? Qe(!1) : et(),
|
|
609
611
|
children: /* @__PURE__ */ m("svg", {
|
|
610
612
|
width: "16",
|
|
611
613
|
height: "16",
|
|
@@ -625,79 +627,79 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
|
|
|
625
627
|
/* @__PURE__ */ m("button", {
|
|
626
628
|
class: "ck-btn",
|
|
627
629
|
onClick: () => s(),
|
|
628
|
-
children:
|
|
630
|
+
children: d("cancel")
|
|
629
631
|
}),
|
|
630
632
|
/* @__PURE__ */ m("button", {
|
|
631
|
-
ref:
|
|
633
|
+
ref: gt,
|
|
632
634
|
class: "ck-btn ck-primary",
|
|
633
|
-
"aria-disabled":
|
|
634
|
-
onClick: () => void
|
|
635
|
-
children:
|
|
635
|
+
"aria-disabled": J || !E.trim() || !Y || void 0,
|
|
636
|
+
onClick: () => void Dt(),
|
|
637
|
+
children: d(J ? "sending" : ut && !a ? "signIn" : "send")
|
|
636
638
|
})
|
|
637
639
|
]
|
|
638
640
|
}),
|
|
639
|
-
|
|
640
|
-
images:
|
|
641
|
-
src:
|
|
642
|
-
name:
|
|
643
|
-
}] :
|
|
641
|
+
q !== null && nt ? /* @__PURE__ */ m(nt, {
|
|
642
|
+
images: q < 0 && $ ? [{
|
|
643
|
+
src: $,
|
|
644
|
+
name: d("screenshot")
|
|
645
|
+
}] : V.items.filter((e) => e.preview).map((e) => ({
|
|
644
646
|
src: e.preview,
|
|
645
647
|
name: e.file.name
|
|
646
648
|
})),
|
|
647
|
-
start: Math.max(0,
|
|
648
|
-
onClose: () =>
|
|
649
|
+
start: Math.max(0, q),
|
|
650
|
+
onClose: () => tt(null)
|
|
649
651
|
}) : null,
|
|
650
|
-
|
|
651
|
-
image:
|
|
652
|
-
onCancel: () =>
|
|
652
|
+
Ye && Xe && O ? /* @__PURE__ */ m(Xe, {
|
|
653
|
+
image: O.blob,
|
|
654
|
+
onCancel: () => B(!1),
|
|
653
655
|
onDone: (e, t) => {
|
|
654
|
-
|
|
655
|
-
...
|
|
656
|
+
Ae({
|
|
657
|
+
...O,
|
|
656
658
|
blob: e
|
|
657
|
-
}),
|
|
659
|
+
}), Je(t), B(!1);
|
|
658
660
|
}
|
|
659
661
|
}) : null
|
|
660
662
|
]
|
|
661
663
|
})] });
|
|
662
664
|
}
|
|
663
|
-
function
|
|
664
|
-
let [e, t] =
|
|
665
|
+
function Ne() {
|
|
666
|
+
let [e, t] = l(!1), n = e ? A(ge()) : [];
|
|
665
667
|
return /* @__PURE__ */ m("details", {
|
|
666
668
|
class: "ck-diag",
|
|
667
669
|
onToggle: (e) => t(e.currentTarget.open),
|
|
668
|
-
children: [/* @__PURE__ */ m("summary", { children:
|
|
670
|
+
children: [/* @__PURE__ */ m("summary", { children: d("diagnosticsSee") }), e ? n.length ? /* @__PURE__ */ m("ul", { children: n.map((e) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m("bdi", { children: e }) })) }) : /* @__PURE__ */ m("p", {
|
|
669
671
|
class: "ck-muted",
|
|
670
|
-
children:
|
|
672
|
+
children: d("diagnosticsEmpty")
|
|
671
673
|
}) : null]
|
|
672
674
|
});
|
|
673
675
|
}
|
|
674
|
-
function
|
|
676
|
+
function A(e) {
|
|
675
677
|
return [...(e.console ?? []).map((e) => `${e.level}: ${e.message}`), ...(e.network ?? []).map((e) => `${e.method} ${e.url} ${e.status}`)];
|
|
676
678
|
}
|
|
677
|
-
var
|
|
678
|
-
function
|
|
679
|
+
var Pe = "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9 5.7-4.9 16-13.6 21.1-22.1 3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8Z";
|
|
680
|
+
function Fe(e) {
|
|
679
681
|
let t = {};
|
|
680
682
|
return e.priority && e.priority !== "none" && (t.priority = e.priority), e.assignee_ids?.length && (t.assignee_ids = e.assignee_ids), e.label_ids?.length && (t.label_ids = e.label_ids), Object.keys(t).length ? t : void 0;
|
|
681
683
|
}
|
|
682
|
-
function
|
|
684
|
+
function Ie(e) {
|
|
683
685
|
return e.region ? "50% 50%" : `50% ${Math.round(Math.min(100, Math.max(0, e.point.y / Math.max(1, innerHeight) * 100)))}%`;
|
|
684
686
|
}
|
|
685
|
-
var
|
|
686
|
-
function
|
|
687
|
-
let t =
|
|
687
|
+
var j = "commentkit:pending-extras";
|
|
688
|
+
function Le(e) {
|
|
689
|
+
let t = _e(e?.privacy?.notice_url);
|
|
688
690
|
return t?.startsWith("https:") ? t : null;
|
|
689
691
|
}
|
|
690
|
-
function
|
|
692
|
+
function Re(e) {
|
|
691
693
|
try {
|
|
692
694
|
return `${new URL(e ?? "https://commentkit.dev").origin}/privacy`;
|
|
693
695
|
} catch {
|
|
694
696
|
return "https://commentkit.dev/privacy";
|
|
695
697
|
}
|
|
696
698
|
}
|
|
697
|
-
var
|
|
698
|
-
function
|
|
699
|
+
var ze = "commentkit:guest-details";
|
|
700
|
+
function Be() {
|
|
699
701
|
try {
|
|
700
|
-
let e = JSON.parse(
|
|
702
|
+
let e = JSON.parse(g(ze) ?? "null"), t = (e, t) => typeof e == "string" ? e.slice(0, t) : "";
|
|
701
703
|
return {
|
|
702
704
|
name: t(e?.name, 120),
|
|
703
705
|
email: t(e?.email, 254)
|
|
@@ -709,17 +711,17 @@ function Ve() {
|
|
|
709
711
|
};
|
|
710
712
|
}
|
|
711
713
|
}
|
|
712
|
-
function
|
|
714
|
+
function Ve(e) {
|
|
713
715
|
try {
|
|
714
|
-
let t = JSON.parse(
|
|
715
|
-
return
|
|
716
|
+
let t = JSON.parse(g(j) ?? "null");
|
|
717
|
+
return g(j, null), !t || _(t.id) !== _(e) ? null : {
|
|
716
718
|
checklist: Array.isArray(t.checklist) ? t.checklist.filter((e) => typeof e == "string").slice(0, 30) : null,
|
|
717
719
|
task: t.task && typeof t.task == "object" ? t.task : {},
|
|
718
720
|
markup: Array.isArray(t.markup) ? t.markup.filter((e) => !!e && typeof e == "object" && Array.isArray(e.points)).slice(0, 100) : [],
|
|
719
|
-
styles:
|
|
721
|
+
styles: ae(t.styles)
|
|
720
722
|
};
|
|
721
723
|
} catch {
|
|
722
724
|
return null;
|
|
723
725
|
}
|
|
724
726
|
}
|
|
725
|
-
export {
|
|
727
|
+
export { Me as Composer, A as diagnosticsLines, Re as privacyNotice, Le as siteNotice, Ee as warmCapture };
|