@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,111 +0,0 @@
|
|
|
1
|
-
import { c as e, f as t, g as n, p as r, u as i, y as a } from "./i18n-DOBt8e9U.js";
|
|
2
|
-
import { C as o, s } from "./start-DtVlpt7p.js";
|
|
3
|
-
// src/ui/Viewer.tsx
|
|
4
|
-
s(".ck-viewer{z-index:calc(var(--ck-z) + 3);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:#f2f1ec;animation:ck-fade var(--ck-dur) ease-out;background:#0a0a0cd1;grid-template-rows:auto 1fr;place-items:center;padding:12px 56px 24px;display:grid;position:fixed;top:0;bottom:0;left:0;right:0}.ck-viewer-bar{justify-self:stretch;align-items:center;gap:4px;min-height:40px;display:flex}.ck-viewer-name{white-space:nowrap;min-width:0;font-size:var(--ck-fs-md);flex:1;align-items:baseline;gap:8px;font-weight:600;display:flex}.ck-viewer-name>bdi{text-overflow:ellipsis;min-width:0;overflow:hidden}.ck-viewer-count{color:#f2f1eca6;font-variant-numeric:tabular-nums;flex:none;font-weight:500}.ck-viewer-btn,.ck-viewer-nav{border-radius:var(--ck-radius-pill);width:36px;height:36px;color:inherit;transition:background-color var(--ck-fast), scale var(--ck-fast) ease-out;background:#ffffff1a;border:0;flex:none;place-items:center;padding:0;text-decoration:none;display:grid}.ck-viewer-btn:active,.ck-viewer-nav:active{scale:.96}.ck-viewer-img{object-fit:contain;border-radius:var(--ck-radius-md);max-width:100%;max-height:calc(100dvh - 96px);box-shadow:var(--ck-shadow);outline:1px solid var(--ck-img-outline);outline-offset:-1px;animation:ck-pop var(--ck-dur) var(--ck-ease);background:#fff}.ck-viewer-nav{width:40px;height:40px;position:absolute;top:50%;translate:0 -50%}.ck-viewer-nav[data-dir=prev]:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:8px}.ck-viewer-nav[data-dir=prev]:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:8px}.ck-viewer-nav[data-dir=prev]:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:8px}.ck-viewer-nav[data-dir=prev]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:8px}.ck-viewer-nav[data-dir=next]:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:8px}.ck-viewer-nav[data-dir=next]:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:8px}.ck-viewer-nav[data-dir=next]:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:8px}.ck-viewer-nav[data-dir=next]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:8px}.ck-viewer-nav[data-dir=prev] svg{scale:-1 1}.ck-root[dir=rtl] .ck-viewer-nav[data-dir=prev] svg{scale:1}.ck-root[dir=rtl] .ck-viewer-nav[data-dir=next] svg{scale:-1 1}.ck-viewer :focus-visible{outline-color:#fff}@media (hover:hover){.ck-viewer-btn:hover,.ck-viewer-nav:hover{background:#fff3}}@media (max-width:520px){.ck-viewer{padding:8px 8px 16px}.ck-viewer-img{max-height:calc(100dvh - 140px)}.ck-viewer-nav{top:auto;bottom:16px;translate:none}}@media (pointer:coarse){.ck-viewer-btn,.ck-viewer-nav{width:44px;height:44px}}");
|
|
5
|
-
var c = (e) => getComputedStyle(e).direction === "rtl";
|
|
6
|
-
function l({ images: s, start: l = 0, onClose: u }) {
|
|
7
|
-
let [d, f] = n(Math.min(Math.max(0, l), s.length - 1)), p = r(null), m = s[d], h = s.length > 1, g = (e) => f((t) => (t + e + s.length) % s.length);
|
|
8
|
-
if (t(() => {
|
|
9
|
-
let e = p.current?.getRootNode()?.activeElement ?? document.activeElement;
|
|
10
|
-
return p.current?.focus({ preventScroll: !0 }), () => {
|
|
11
|
-
e instanceof HTMLElement && e.isConnected && e.focus({ preventScroll: !0 });
|
|
12
|
-
};
|
|
13
|
-
}, []), !m) return null;
|
|
14
|
-
let _ = m.href ?? m.src;
|
|
15
|
-
return /* @__PURE__ */ i("div", {
|
|
16
|
-
class: "ck-viewer",
|
|
17
|
-
role: "dialog",
|
|
18
|
-
"aria-modal": "true",
|
|
19
|
-
"aria-label": e("imageViewer"),
|
|
20
|
-
"data-commentkit-ui": !0,
|
|
21
|
-
onClick: (e) => e.target === e.currentTarget && u(),
|
|
22
|
-
onKeyDown: (e) => {
|
|
23
|
-
if (e.stopPropagation(), e.key === "Escape") u();
|
|
24
|
-
else if (h && (e.key === "ArrowRight" || e.key === "ArrowLeft")) g(e.key === "ArrowRight" === c(e.currentTarget) ? -1 : 1);
|
|
25
|
-
else if (e.key === "Tab") {
|
|
26
|
-
let t = [...e.currentTarget.querySelectorAll("button, a[href]")], n = t.indexOf(e.currentTarget.getRootNode().activeElement);
|
|
27
|
-
e.preventDefault(), t[(n + (e.shiftKey ? -1 : 1) + t.length) % t.length]?.focus();
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ i("div", {
|
|
32
|
-
class: "ck-viewer-bar",
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ i("span", {
|
|
35
|
-
class: "ck-viewer-name",
|
|
36
|
-
children: [/* @__PURE__ */ i("bdi", {
|
|
37
|
-
title: m.name,
|
|
38
|
-
children: m.name
|
|
39
|
-
}), h ? /* @__PURE__ */ i("span", {
|
|
40
|
-
class: "ck-viewer-count",
|
|
41
|
-
children: e("countOf", {
|
|
42
|
-
n: d + 1,
|
|
43
|
-
total: s.length
|
|
44
|
-
})
|
|
45
|
-
}) : null]
|
|
46
|
-
}),
|
|
47
|
-
/* @__PURE__ */ i("a", {
|
|
48
|
-
class: "ck-viewer-btn",
|
|
49
|
-
href: _,
|
|
50
|
-
target: "_blank",
|
|
51
|
-
rel: "noopener noreferrer",
|
|
52
|
-
download: m.name,
|
|
53
|
-
"aria-label": e("download"),
|
|
54
|
-
title: e("download"),
|
|
55
|
-
children: /* @__PURE__ */ i(o, {
|
|
56
|
-
name: "down",
|
|
57
|
-
size: 16
|
|
58
|
-
})
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ i("a", {
|
|
61
|
-
class: "ck-viewer-btn",
|
|
62
|
-
href: _,
|
|
63
|
-
target: "_blank",
|
|
64
|
-
rel: "noopener noreferrer",
|
|
65
|
-
"aria-label": e("openInTab"),
|
|
66
|
-
title: e("openInTab"),
|
|
67
|
-
children: /* @__PURE__ */ i(o, {
|
|
68
|
-
name: "link",
|
|
69
|
-
size: 16
|
|
70
|
-
})
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ i("button", {
|
|
73
|
-
class: "ck-viewer-btn",
|
|
74
|
-
ref: p,
|
|
75
|
-
"aria-label": e("close"),
|
|
76
|
-
onClick: u,
|
|
77
|
-
children: /* @__PURE__ */ i(o, {
|
|
78
|
-
name: "close",
|
|
79
|
-
size: 16
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
]
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ i("img", {
|
|
85
|
-
class: "ck-viewer-img",
|
|
86
|
-
src: m.src,
|
|
87
|
-
alt: m.name
|
|
88
|
-
}),
|
|
89
|
-
h ? /* @__PURE__ */ i(a, { children: [/* @__PURE__ */ i("button", {
|
|
90
|
-
class: "ck-viewer-nav",
|
|
91
|
-
"data-dir": "prev",
|
|
92
|
-
"aria-label": e("previousImage"),
|
|
93
|
-
onClick: () => g(-1),
|
|
94
|
-
children: /* @__PURE__ */ i(o, {
|
|
95
|
-
name: "chevron",
|
|
96
|
-
size: 18
|
|
97
|
-
})
|
|
98
|
-
}), /* @__PURE__ */ i("button", {
|
|
99
|
-
class: "ck-viewer-nav",
|
|
100
|
-
"data-dir": "next",
|
|
101
|
-
"aria-label": e("nextImage"),
|
|
102
|
-
onClick: () => g(1),
|
|
103
|
-
children: /* @__PURE__ */ i(o, {
|
|
104
|
-
name: "chevron",
|
|
105
|
-
size: 18
|
|
106
|
-
})
|
|
107
|
-
})] }) : null
|
|
108
|
-
]
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
export { l as Viewer };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { a as e, i as t, n, r } from "./src-BTMy4Gyc.js";
|
|
2
|
-
import { i, l as a, v as o } from "./client-kNAo2TTG.js";
|
|
3
|
-
import { n as s } from "./page-key-DepmJzC1.js";
|
|
4
|
-
// src/core/show.ts
|
|
5
|
-
var c;
|
|
6
|
-
function l() {
|
|
7
|
-
if (/[?&]ck(_thread)?(=|&|$)/.test(location.search)) return !0;
|
|
8
|
-
try {
|
|
9
|
-
return !!sessionStorage.getItem("commentkit:share");
|
|
10
|
-
} catch {
|
|
11
|
-
return !1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
a(s);
|
|
15
|
-
var u = (e) => e.disabled_reason === "version_blocked", d = (e) => e.disabled_reason === "not_live", f = (e) => {
|
|
16
|
-
let t = e.state.get().session;
|
|
17
|
-
return !!t && t.role !== "guest";
|
|
18
|
-
};
|
|
19
|
-
async function p(n, i, a, o, p, _, v = () => void 0) {
|
|
20
|
-
let y = (c ?? (c = l())) || a;
|
|
21
|
-
if (u(i)) return v(), null;
|
|
22
|
-
let b = d(i);
|
|
23
|
-
if (b && !n.auth.hasSession() && !t()) return v(), null;
|
|
24
|
-
if (!i.enabled && !y && !b) return null;
|
|
25
|
-
s.ignore(i.pages?.ignored_query_params);
|
|
26
|
-
let x = import("./start-DtVlpt7p.js").then((e) => e.t), S = x.then((e) => e.setLocale(n.options.locale));
|
|
27
|
-
if (x.catch(() => void 0), S.catch(() => void 0), await n.auth.completeRedirect().catch(() => !1), t() && await import("./extension-E81hWyiT.js").then((e) => e.extensionHandoff(n.auth)).catch(() => !1), _ && i.enabled && await import("./identify-CN-3xzqL.js").then((e) => e.identify(n, _, null, !0)).catch(() => !1), await n.loadSession().catch(() => null), n.state.get().session || m(n.options.project), b && !f(n)) return v(), null;
|
|
28
|
-
let C = await x, { installDiagnostics: w, mountWidget: T } = C;
|
|
29
|
-
if (b && Object.assign(C.en, (await import("./late-words-B2bmZceJ.js").then((e) => e.n)).LATE), await S, o()) return null;
|
|
30
|
-
let E = w({
|
|
31
|
-
console: i.features.console_capture,
|
|
32
|
-
network: i.features.network_capture,
|
|
33
|
-
endpoint: n.endpoint
|
|
34
|
-
}), D = () => {
|
|
35
|
-
p(), e(!1);
|
|
36
|
-
}, O;
|
|
37
|
-
try {
|
|
38
|
-
O = T(n, () => (h([r() + 1, Date.now()]), D()), D);
|
|
39
|
-
} catch (e) {
|
|
40
|
-
throw E(), e;
|
|
41
|
-
}
|
|
42
|
-
let k = setTimeout(h, 3e4, null), A = g(n, y, p, v), j = n.state.get().config, M = n.state.subscribe((e) => {
|
|
43
|
-
e.config && e.config !== j && s.ignore((j = e.config).pages?.ignored_query_params);
|
|
44
|
-
});
|
|
45
|
-
return n.emit("ready", { session: n.state.get().session }), Object.assign(() => {
|
|
46
|
-
clearTimeout(k), A(), M();
|
|
47
|
-
for (let e of [O, E]) try {
|
|
48
|
-
e();
|
|
49
|
-
} catch (e) {
|
|
50
|
-
console.warn("[CommentKit] hide() failed.", e);
|
|
51
|
-
}
|
|
52
|
-
}, { attach: () => O.attach?.() });
|
|
53
|
-
}
|
|
54
|
-
function m(e) {
|
|
55
|
-
let t = `commentkit:draft:v2:${e}:`;
|
|
56
|
-
try {
|
|
57
|
-
for (let e = localStorage.length - 1; e >= 0; e--) {
|
|
58
|
-
let n = localStorage.key(e);
|
|
59
|
-
n?.startsWith(t) && n.includes("~", t.length) && localStorage.removeItem(n);
|
|
60
|
-
}
|
|
61
|
-
} catch {}
|
|
62
|
-
}
|
|
63
|
-
function h(e) {
|
|
64
|
-
try {
|
|
65
|
-
e ? localStorage.setItem(n, JSON.stringify(e)) : localStorage.removeItem(n);
|
|
66
|
-
} catch {}
|
|
67
|
-
}
|
|
68
|
-
function g(e, t, n, r) {
|
|
69
|
-
let i = Date.now(), a = () => {
|
|
70
|
-
document.visibilityState === "hidden" || Date.now() - i < 15e3 || (i = Date.now(), e.loadConfig().then((i) => {
|
|
71
|
-
u(i) || d(i) && !f(e) ? (n(), r()) : i.enabled || t || d(i) || n();
|
|
72
|
-
}, () => void 0));
|
|
73
|
-
}, o = setInterval(a, 6e4);
|
|
74
|
-
return document.addEventListener("visibilitychange", a), () => {
|
|
75
|
-
clearInterval(o), document.removeEventListener("visibilitychange", a);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function _(e, t) {
|
|
79
|
-
let n = e.state.get().config;
|
|
80
|
-
if (n && (u(n) || d(n))) return;
|
|
81
|
-
let r = t instanceof o;
|
|
82
|
-
console.warn(r ? `[CommentKit] The widget could not start: ${t.message} (${t.code}). See https://commentkit.dev/docs/errors#${t.code}` : "[CommentKit] The widget could not start; your page is not affected. See https://commentkit.dev/docs/troubleshooting", t), r && e.emit("error", { error: t }), (!r || t.status >= 500) && e.reportCrash(t, "start");
|
|
83
|
-
}
|
|
84
|
-
function v(e, t) {
|
|
85
|
-
import("./report-CrIqQZDI.js").then((n) => n.reportStart(e, t)).catch(() => void 0);
|
|
86
|
-
}
|
|
87
|
-
var y = "See https://commentkit.dev/docs/";
|
|
88
|
-
function b(e, ...t) {
|
|
89
|
-
let [n, r] = t, a = {
|
|
90
|
-
key: `init() needs your publishable project key, which starts with pk_live_ or pk_test_ (${n ? "the one given is not one" : "none was given"}), so the widget stays off. Copy it from Setup in your CommentKit project and pass it as init({ project: "pk_live_…" }) or data-project="pk_live_…". ${y}quickstart`,
|
|
91
|
-
copy: `CommentKit was added twice: version ${String(n)} is already running on this page, so this copy (${i}) stays off. Add it once, with either the npm package or the script tag, not both. ${y}troubleshooting`,
|
|
92
|
-
project: `init() was called again with another project (${String(n)}) while ${String(r)} is running; the first one stays. Call destroy() on every handle of the first one before starting another project. ${y}troubleshooting`,
|
|
93
|
-
cooling: `The widget is hidden for a few hours on this browser after 3 crashes in a row. Cmd/Ctrl+Shift+K or show() brings it back now. ${y}troubleshooting`
|
|
94
|
-
};
|
|
95
|
-
console.warn(`[CommentKit] ${a[e]}`);
|
|
96
|
-
}
|
|
97
|
-
export { b as explain, _ as failed, m as forgetSignedIn, p as mount, v as reportStart };
|