@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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { _ as e, b as t, c as n, f as r, m as i, u as a } from "./i18n-aVSu9TcJ.js";
|
|
2
|
+
import { C as o, s } from "./start-CV4j78_q.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:#fff;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:#ffffffa6;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] = e(Math.min(Math.max(0, l), s.length - 1)), p = i(null), m = s[d], h = s.length > 1, g = (e) => f((t) => (t + e + s.length) % s.length);
|
|
8
|
+
if (r(() => {
|
|
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__ */ a("div", {
|
|
16
|
+
class: "ck-viewer",
|
|
17
|
+
role: "dialog",
|
|
18
|
+
"aria-modal": "true",
|
|
19
|
+
"aria-label": n("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__ */ a("div", {
|
|
32
|
+
class: "ck-viewer-bar",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ a("span", {
|
|
35
|
+
class: "ck-viewer-name",
|
|
36
|
+
children: [/* @__PURE__ */ a("bdi", {
|
|
37
|
+
title: m.name,
|
|
38
|
+
children: m.name
|
|
39
|
+
}), h ? /* @__PURE__ */ a("span", {
|
|
40
|
+
class: "ck-viewer-count",
|
|
41
|
+
children: n("countOf", {
|
|
42
|
+
n: d + 1,
|
|
43
|
+
total: s.length
|
|
44
|
+
})
|
|
45
|
+
}) : null]
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ a("a", {
|
|
48
|
+
class: "ck-viewer-btn",
|
|
49
|
+
href: _,
|
|
50
|
+
target: "_blank",
|
|
51
|
+
rel: "noopener noreferrer",
|
|
52
|
+
download: m.name,
|
|
53
|
+
"aria-label": n("download"),
|
|
54
|
+
title: n("download"),
|
|
55
|
+
children: /* @__PURE__ */ a(o, {
|
|
56
|
+
name: "down",
|
|
57
|
+
size: 16
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ a("a", {
|
|
61
|
+
class: "ck-viewer-btn",
|
|
62
|
+
href: _,
|
|
63
|
+
target: "_blank",
|
|
64
|
+
rel: "noopener noreferrer",
|
|
65
|
+
"aria-label": n("openInTab"),
|
|
66
|
+
title: n("openInTab"),
|
|
67
|
+
children: /* @__PURE__ */ a(o, {
|
|
68
|
+
name: "link",
|
|
69
|
+
size: 16
|
|
70
|
+
})
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ a("button", {
|
|
73
|
+
class: "ck-viewer-btn",
|
|
74
|
+
ref: p,
|
|
75
|
+
"aria-label": n("close"),
|
|
76
|
+
title: n("close"),
|
|
77
|
+
onClick: u,
|
|
78
|
+
children: /* @__PURE__ */ a(o, {
|
|
79
|
+
name: "close",
|
|
80
|
+
size: 16
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ a("img", {
|
|
86
|
+
class: "ck-viewer-img",
|
|
87
|
+
src: m.src,
|
|
88
|
+
alt: m.name
|
|
89
|
+
}),
|
|
90
|
+
h ? /* @__PURE__ */ a(t, { children: [/* @__PURE__ */ a("button", {
|
|
91
|
+
class: "ck-viewer-nav",
|
|
92
|
+
"data-dir": "prev",
|
|
93
|
+
"aria-label": n("previousImage"),
|
|
94
|
+
title: n("previousImage"),
|
|
95
|
+
onClick: () => g(-1),
|
|
96
|
+
children: /* @__PURE__ */ a(o, {
|
|
97
|
+
name: "chevron",
|
|
98
|
+
size: 18
|
|
99
|
+
})
|
|
100
|
+
}), /* @__PURE__ */ a("button", {
|
|
101
|
+
class: "ck-viewer-nav",
|
|
102
|
+
"data-dir": "next",
|
|
103
|
+
"aria-label": n("nextImage"),
|
|
104
|
+
title: n("nextImage"),
|
|
105
|
+
onClick: () => g(1),
|
|
106
|
+
children: /* @__PURE__ */ a(o, {
|
|
107
|
+
name: "chevron",
|
|
108
|
+
size: 18
|
|
109
|
+
})
|
|
110
|
+
})] }) : null
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
export { l as Viewer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as e, R as t } from "./start-
|
|
1
|
+
import { B as e, R as t } from "./start-CV4j78_q.js";
|
|
2
2
|
// src/ui/agent.ts
|
|
3
3
|
var n = "untrusted-user-content", r = 4e3, i = "…truncated", a = /untrusted[\s\u00ad\u200b-\u200f\u2060-\u2064\ufeff_-]*user[\s\u00ad\u200b-\u200f\u2060-\u2064\ufeff_-]*content/gi;
|
|
4
4
|
function o(e) {
|
|
@@ -213,6 +213,8 @@ var e = {
|
|
|
213
213
|
finishBody: "فتحت الرابط من رسالة الرمز. اضغط على الزر لنشر التعليق الذي كتبته على هذا الموقع.",
|
|
214
214
|
finishSend: "أرسل تعليقي",
|
|
215
215
|
finishExpired: "لم يعد هذا الرابط يعمل. تعمل الروابط في رسالة الرمز مرة واحدة ولمدة 10 دقائق. إذا كان تعليقك لا يزال بانتظار التأكيد، فأدخل الرمز في الصفحة التي كتبته فيها.",
|
|
216
|
+
closeCardHint: "اضغط × للإغلاق، أو انقر نقرًا مزدوجًا خارجها.",
|
|
217
|
+
closeCardHintTouch: "اضغط × للإغلاق، أو انقر مرتين خارجها.",
|
|
216
218
|
verifyWrong: "هذا الرمز غير صحيح. تحقق من البريد أو اطلب رمزًا جديدًا.",
|
|
217
219
|
verifyDifferent: "استخدام بريد إلكتروني آخر",
|
|
218
220
|
verifyExpired: "لم يعد هذا الرمز صالحًا. لا يزال تعليقك محفوظًا على هذا الجهاز.",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { v as e } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import { t as a } from "./files-
|
|
4
|
-
import { C as o, d as s, f as c } from "./start-
|
|
1
|
+
import { v as e } from "./client-7eVxvg5j.js";
|
|
2
|
+
import { b as t, c as n, l as r, u as i } from "./i18n-aVSu9TcJ.js";
|
|
3
|
+
import { t as a } from "./files-4lV9YQIX.js";
|
|
4
|
+
import { C as o, d as s, f as c } from "./start-CV4j78_q.js";
|
|
5
5
|
// src/ui/card-bits.tsx
|
|
6
6
|
s.http_413 = "tooBig";
|
|
7
|
-
function l(
|
|
8
|
-
return
|
|
9
|
-
text:
|
|
7
|
+
function l(t, r, i, a) {
|
|
8
|
+
return t.updateThread(r.id, { status: r.status }).catch((t) => (t instanceof e && t.status === 403 ? i({
|
|
9
|
+
text: n("undoTooLate", { ref: r.reference }),
|
|
10
10
|
tone: "error"
|
|
11
|
-
}) : a(
|
|
11
|
+
}) : a(t), null));
|
|
12
12
|
}
|
|
13
13
|
function u(t) {
|
|
14
14
|
return t instanceof e && (t.code === "widget_disabled" || t.code === "plan_required" || t.code === "guest_codes_paused" || t.status >= 400 && t.status < 500 && t.status !== 408 && t.status !== 429) ? c(t) : null;
|
|
15
15
|
}
|
|
16
|
-
function d({ input: e, onFiles:
|
|
16
|
+
function d({ input: e, onFiles: r, types: s }) {
|
|
17
17
|
let c = a(s);
|
|
18
|
-
return c ? /* @__PURE__ */
|
|
18
|
+
return c ? /* @__PURE__ */ i(t, { children: [/* @__PURE__ */ i("input", {
|
|
19
19
|
ref: e,
|
|
20
20
|
type: "file",
|
|
21
21
|
multiple: !0,
|
|
@@ -23,21 +23,21 @@ function d({ input: e, onFiles: n, types: s }) {
|
|
|
23
23
|
accept: c,
|
|
24
24
|
onChange: (e) => {
|
|
25
25
|
let t = e.target;
|
|
26
|
-
|
|
26
|
+
r(Array.from(t.files ?? [])), t.value = "";
|
|
27
27
|
}
|
|
28
|
-
}), /* @__PURE__ */
|
|
28
|
+
}), /* @__PURE__ */ i("button", {
|
|
29
29
|
class: "ck-ghost",
|
|
30
30
|
onClick: () => e.current?.click(),
|
|
31
|
-
"aria-label":
|
|
32
|
-
title:
|
|
33
|
-
children: /* @__PURE__ */
|
|
31
|
+
"aria-label": n("attach"),
|
|
32
|
+
title: n("attach"),
|
|
33
|
+
children: /* @__PURE__ */ i(o, { name: "paperclip" })
|
|
34
34
|
})] }) : null;
|
|
35
35
|
}
|
|
36
36
|
function f(e, t = {
|
|
37
37
|
top: e.y,
|
|
38
38
|
bottom: e.y
|
|
39
39
|
}) {
|
|
40
|
-
let
|
|
40
|
+
let n = Math.min(380, innerWidth - 24), i = e.x + 16, a = e.x - 16 - n, o = i + n <= innerWidth - 12, s = r() === "rtl" ? a >= 12 || !o : !o && a >= 12, c = Math.min(Math.max(12, s ? a : i), innerWidth - n - 12), l = innerHeight - (t.bottom + 16) - 12, u = t.top - 16 - 12, d = (e) => `min(560px, ${Math.max(240, Math.round(e))}px)`, f = s ? "right" : "left";
|
|
41
41
|
return l >= 360 || l >= u ? {
|
|
42
42
|
left: `${c}px`,
|
|
43
43
|
top: `${Math.min(t.bottom + 16, innerHeight - 252)}px`,
|
|
@@ -132,7 +132,7 @@ var d = 1e4, f = /^[A-Za-z0-9]{16,128}$/, p = class {
|
|
|
132
132
|
return e !== null && (f.test(e) && (this.signInLink = e), this.signInLink !== null);
|
|
133
133
|
}
|
|
134
134
|
async proof(e, t, n) {
|
|
135
|
-
return (this.dpop ?? (this.dpop = await import("./dpop-
|
|
135
|
+
return (this.dpop ?? (this.dpop = await import("./dpop-0A76OPa9.js"))).proof(this.projectKey, e, t, n);
|
|
136
136
|
}
|
|
137
137
|
seen(e, t) {
|
|
138
138
|
return !!this.dpop?.seen(e, t);
|
|
@@ -141,7 +141,7 @@ var d = 1e4, f = /^[A-Za-z0-9]{16,128}$/, p = class {
|
|
|
141
141
|
return this.signInLink !== null;
|
|
142
142
|
}
|
|
143
143
|
signIn(e = {}) {
|
|
144
|
-
return import("./signin-
|
|
144
|
+
return import("./signin-BOWr_WCo.js").then((t) => t.signIn(this, e));
|
|
145
145
|
}
|
|
146
146
|
async exchange(e, t) {
|
|
147
147
|
try {
|
|
@@ -156,7 +156,7 @@ var d = 1e4, f = /^[A-Za-z0-9]{16,128}$/, p = class {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
async completeRedirect() {
|
|
159
|
-
return /[?&]ck_code=/.test(location.search) && import("./signin-
|
|
159
|
+
return /[?&]ck_code=/.test(location.search) && import("./signin-BOWr_WCo.js").then((e) => e.completeRedirect(this));
|
|
160
160
|
}
|
|
161
161
|
async signOut() {
|
|
162
162
|
let e = this.readRefresh();
|
|
@@ -328,7 +328,7 @@ function T(e) {
|
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
// src/core/client.ts
|
|
331
|
-
var E = "2.0.
|
|
331
|
+
var E = "2.0.1", D = "https://commentkit.dev", O = { of: (e) => e }, k = (e) => void (O = e), A = () => O.url?.() ?? location.href;
|
|
332
332
|
function j() {
|
|
333
333
|
return {
|
|
334
334
|
config: null,
|
|
@@ -375,7 +375,7 @@ var N = "edit_conflict", P = 20, F = (e) => e ? `${e.project.id}|${e.person.type
|
|
|
375
375
|
return `${this.endpoint}/cdn`;
|
|
376
376
|
}
|
|
377
377
|
reportCrash(e, t = "crash") {
|
|
378
|
-
import("./report-
|
|
378
|
+
import("./report-DaVuoRYS.js").then((n) => n.reportCrash(this.endpoint, this.options.project, E, e, t, this.reportNonce, this.auth)).catch(() => void 0);
|
|
379
379
|
}
|
|
380
380
|
on(e, t) {
|
|
381
381
|
let n = this.listeners.get(e) ?? /* @__PURE__ */ new Set();
|
|
@@ -395,7 +395,7 @@ var N = "edit_conflict", P = 20, F = (e) => e ? `${e.project.id}|${e.person.type
|
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
397
|
prefetchSignIn() {
|
|
398
|
-
import("./signin-
|
|
398
|
+
import("./signin-BOWr_WCo.js").catch(() => void 0);
|
|
399
399
|
}
|
|
400
400
|
async loadConfig() {
|
|
401
401
|
let e = this.state.get().config, t = { "X-CommentKit-Load": this.configTag === null ? "1" : "0" };
|
|
@@ -665,7 +665,7 @@ var N = "edit_conflict", P = 20, F = (e) => e ? `${e.project.id}|${e.person.type
|
|
|
665
665
|
this.unreadKnown = !0, this.state.set({ unread: t.unread });
|
|
666
666
|
}
|
|
667
667
|
upload(e, t, n = "file", r = {}) {
|
|
668
|
-
return import("./upload-
|
|
668
|
+
return import("./upload-B2mkgMeJ.js").then((i) => i.upload(this.api, e, t, n, r));
|
|
669
669
|
}
|
|
670
670
|
connectRealtime(e) {
|
|
671
671
|
let t = this.state.get().config, n = this.state.get().session, r = F(n);
|
|
@@ -189,6 +189,8 @@ var e = {
|
|
|
189
189
|
finishBody: "Sie haben den Link aus Ihrer E-Mail mit dem Code geöffnet. Drücken Sie auf die Schaltfläche, um den Kommentar zu veröffentlichen, den Sie auf dieser Website geschrieben haben.",
|
|
190
190
|
finishSend: "Meinen Kommentar senden",
|
|
191
191
|
finishExpired: "Dieser Link funktioniert nicht mehr. Links in der E-Mail mit dem Code funktionieren einmal und 10 Minuten lang. Wenn Ihr Kommentar noch wartet, geben Sie den Code auf der Seite ein, auf der Sie ihn geschrieben haben.",
|
|
192
|
+
closeCardHint: "Drücken Sie × zum Schließen oder doppelklicken Sie daneben.",
|
|
193
|
+
closeCardHintTouch: "Tippen Sie zum Schließen auf × oder tippen Sie zweimal daneben.",
|
|
192
194
|
verifyWrong: "Dieser Code stimmt nicht. Prüfen Sie die E-Mail oder fordern Sie einen neuen Code an.",
|
|
193
195
|
verifyDifferent: "Andere E-Mail-Adresse verwenden",
|
|
194
196
|
verifyExpired: "Dieser Code gilt nicht mehr. Ihr Kommentar ist weiterhin auf diesem Gerät gespeichert.",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// src/ui/dialog.css?inline
|
|
2
|
-
var e = ".ck-scrim{z-index:calc(var(--ck-z) + 3);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:ck-fade var(--ck-dur) ease-out;background:#0a0a0c73;place-items:center;padding:12px;display:grid;position:fixed;top:0;bottom:0;left:0;right:0}.ck-scrim .ck-card{max-height:calc(100dvh - 24px);position:static!important}kbd{font-family:var(--ck-mono);font-size:var(--ck-fs-xs);border-radius:var(--ck-radius-
|
|
2
|
+
var e = ".ck-scrim{z-index:calc(var(--ck-z) + 3);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:ck-fade var(--ck-dur) ease-out;background:#0a0a0c73;place-items:center;padding:12px;display:grid;position:fixed;top:0;bottom:0;left:0;right:0}.ck-scrim .ck-card{max-height:calc(100dvh - 24px);position:static!important}kbd{font-family:var(--ck-mono);font-size:var(--ck-fs-xs);border-radius:var(--ck-radius-sm);border:1px solid var(--ck-border);background:var(--ck-bg-muted);white-space:nowrap;border-bottom-width:2px;padding:2px 6px}";
|
|
3
3
|
export { e as t };
|
|
@@ -189,6 +189,8 @@ var e = {
|
|
|
189
189
|
finishBody: "Abriste el enlace del correo con tu código. Pulsa el botón para publicar el comentario que escribiste en este sitio web.",
|
|
190
190
|
finishSend: "Enviar mi comentario",
|
|
191
191
|
finishExpired: "Este enlace ya no funciona. Los enlaces del correo con el código funcionan una vez, durante 10 minutos. Si tu comentario sigue esperando, introduce el código en la página donde lo escribiste.",
|
|
192
|
+
closeCardHint: "Pulsa × para cerrar, o haz doble clic fuera.",
|
|
193
|
+
closeCardHintTouch: "Toca × para cerrar, o toca dos veces fuera.",
|
|
192
194
|
verifyWrong: "Ese código no es correcto. Revisa el correo o pide uno nuevo.",
|
|
193
195
|
verifyDifferent: "Usar otro correo",
|
|
194
196
|
verifyExpired: "Este código ya no sirve. Tu comentario sigue guardado en este dispositivo.",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as e, n as t, r as n } from "./privacy-BWUGlHw5.js";
|
|
2
|
-
import { askExtension as r } from "./extension-
|
|
2
|
+
import { askExtension as r } from "./extension-SmoH5AA4.js";
|
|
3
3
|
// src/capture/extension.ts
|
|
4
4
|
var i = 8e6, a = "[data-commentkit-host]", o = "#d4d4d8";
|
|
5
5
|
function s(n = [], r = !1) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as e } from "./client-
|
|
2
|
-
import { t } from "./pkce-
|
|
1
|
+
import { b as e } from "./client-7eVxvg5j.js";
|
|
2
|
+
import { t } from "./pkce-CfZhiNBi.js";
|
|
3
3
|
// src/core/extension.ts
|
|
4
4
|
var n = "commentkit:ext-request", r = "The CommentKit extension did not answer.", i = null, a = /* @__PURE__ */ new Map();
|
|
5
5
|
function o() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, n, r } from "./i18n-
|
|
2
|
-
import { t as i } from "./late-words-
|
|
1
|
+
import { a as e, c as t, n, r } from "./i18n-aVSu9TcJ.js";
|
|
2
|
+
import { t as i } from "./late-words-80_VWt8S.js";
|
|
3
3
|
// src/core/contract-lists.ts
|
|
4
4
|
var a = [
|
|
5
5
|
"👍",
|
|
@@ -189,6 +189,8 @@ var e = {
|
|
|
189
189
|
finishBody: "Vous avez ouvert le lien de l’e-mail contenant votre code. Appuyez sur le bouton pour publier le commentaire que vous avez écrit sur ce site.",
|
|
190
190
|
finishSend: "Envoyer mon commentaire",
|
|
191
191
|
finishExpired: "Ce lien ne fonctionne plus. Les liens de l’e-mail contenant le code fonctionnent une fois, pendant 10 minutes. Si votre commentaire est toujours en attente, saisissez le code sur la page où vous l’avez écrit.",
|
|
192
|
+
closeCardHint: "Appuyez sur × pour fermer, ou double-cliquez à l’extérieur.",
|
|
193
|
+
closeCardHintTouch: "Touchez × pour fermer, ou touchez deux fois à l’extérieur.",
|
|
192
194
|
verifyWrong: "Ce code n’est pas le bon. Vérifiez l’e-mail ou demandez un nouveau code.",
|
|
193
195
|
verifyDifferent: "Utiliser une autre adresse",
|
|
194
196
|
verifyExpired: "Ce code n’est plus valable. Votre commentaire est toujours enregistré sur cet appareil.",
|
|
@@ -189,6 +189,8 @@ var e = {
|
|
|
189
189
|
finishBody: "आपने कोड वाले ईमेल का लिंक खोला है। इस वेबसाइट पर लिखा अपना कमेंट प्रकाशित करने के लिए बटन दबाएँ।",
|
|
190
190
|
finishSend: "मेरा कमेंट भेजें",
|
|
191
191
|
finishExpired: "यह लिंक अब काम नहीं करता। कोड वाले ईमेल के लिंक एक बार, 10 मिनट तक काम करते हैं। अगर आपका कमेंट अभी भी रुका है, तो जिस पेज पर आपने उसे लिखा था वहाँ कोड डालें।",
|
|
192
|
+
closeCardHint: "बंद करने के लिए × दबाएँ, या बाहर डबल-क्लिक करें।",
|
|
193
|
+
closeCardHintTouch: "बंद करने के लिए × पर टैप करें, या बाहर डबल-टैप करें।",
|
|
192
194
|
verifyWrong: "यह कोड सही नहीं है। ईमेल देखें, या नया कोड भेजें।",
|
|
193
195
|
verifyDifferent: "दूसरा ईमेल इस्तेमाल करें",
|
|
194
196
|
verifyExpired: "यह कोड अब काम नहीं करेगा। आपका कमेंट इस डिवाइस पर अब भी सेव है।",
|
|
@@ -267,11 +267,11 @@ function W(e, t) {
|
|
|
267
267
|
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
268
268
|
}
|
|
269
269
|
function fe(e) {
|
|
270
|
-
return V = 1, pe(
|
|
270
|
+
return V = 1, pe(Ce, e);
|
|
271
271
|
}
|
|
272
272
|
function pe(e, t, n) {
|
|
273
273
|
var r = W(L++, 2);
|
|
274
|
-
if (r.t = e, !r.__c && (r.__ = [n ? n(t) :
|
|
274
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ce(void 0, t), function(e) {
|
|
275
275
|
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
276
276
|
B(t, n) || (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
277
277
|
}], r.__c = R, !R.__f)) {
|
|
@@ -315,6 +315,15 @@ function _e(e, t) {
|
|
|
315
315
|
}, t);
|
|
316
316
|
}
|
|
317
317
|
function ve() {
|
|
318
|
+
var e = W(L++, 11);
|
|
319
|
+
if (!e.__) {
|
|
320
|
+
for (var t = R.__v; !t.__m && t.__;) t = t.__;
|
|
321
|
+
var n = t.__m || (t.__m = [0, 0]);
|
|
322
|
+
e.__ = "P" + n[0] + "-" + n[1]++;
|
|
323
|
+
}
|
|
324
|
+
return e.__;
|
|
325
|
+
}
|
|
326
|
+
function ye() {
|
|
318
327
|
var e;
|
|
319
328
|
do {
|
|
320
329
|
for (; e = H.shift();) try {
|
|
@@ -345,7 +354,7 @@ U.__b = function(e) {
|
|
|
345
354
|
}, U.diffed = function(e) {
|
|
346
355
|
ce && ce(e);
|
|
347
356
|
var t = e.__c;
|
|
348
|
-
t && t.__H && (t.__H.__h.length &&
|
|
357
|
+
t && t.__H && (t.__H.__h.length && Se(ae.push(t)), t.__H.__.some(function(e) {
|
|
349
358
|
e.u && (e.__H = e.u);
|
|
350
359
|
})), z = R = null;
|
|
351
360
|
}, U.__c = function(e, t) {
|
|
@@ -370,22 +379,22 @@ U.__b = function(e) {
|
|
|
370
379
|
for (n = e.__; n && (!n.__c || !n.__c.__P);) n = n.__;
|
|
371
380
|
n = n && n.__c;
|
|
372
381
|
}
|
|
373
|
-
r.__P = n,
|
|
382
|
+
r.__P = n, Se(H.push(r));
|
|
374
383
|
} else K(r);
|
|
375
384
|
} catch (e) {
|
|
376
385
|
t = e;
|
|
377
386
|
}
|
|
378
387
|
}), r.__H = void 0, t && U.__e(t, r.__v));
|
|
379
388
|
};
|
|
380
|
-
var
|
|
381
|
-
function
|
|
389
|
+
var be = typeof requestAnimationFrame == "function";
|
|
390
|
+
function xe(e) {
|
|
382
391
|
var t, n = function() {
|
|
383
|
-
clearTimeout(r),
|
|
392
|
+
clearTimeout(r), be && cancelAnimationFrame(t), setTimeout(e);
|
|
384
393
|
}, r = setTimeout(n, 35);
|
|
385
|
-
|
|
394
|
+
be && (t = requestAnimationFrame(n));
|
|
386
395
|
}
|
|
387
|
-
function
|
|
388
|
-
e != 1 && ie == U.requestAnimationFrame || ((ie = U.requestAnimationFrame) ||
|
|
396
|
+
function Se(e) {
|
|
397
|
+
e != 1 && ie == U.requestAnimationFrame || ((ie = U.requestAnimationFrame) || xe)(ye);
|
|
389
398
|
}
|
|
390
399
|
function K(e) {
|
|
391
400
|
var t = R, n = e.__c;
|
|
@@ -400,13 +409,13 @@ function J(e, t) {
|
|
|
400
409
|
return !B(t, e[n]);
|
|
401
410
|
});
|
|
402
411
|
}
|
|
403
|
-
function
|
|
412
|
+
function Ce(e, t) {
|
|
404
413
|
return typeof t == "function" ? t(e) : t;
|
|
405
414
|
}
|
|
406
415
|
// node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
|
|
407
|
-
var
|
|
416
|
+
var we = Symbol.for("pv"), Te = 0;
|
|
408
417
|
Array.isArray;
|
|
409
|
-
function
|
|
418
|
+
function Ee(t, n, r, i, a, o) {
|
|
410
419
|
n || (n = {});
|
|
411
420
|
var s, c, l = n;
|
|
412
421
|
if ("ref" in l && typeof t != "function") for (c in l = {}, n) c == "ref" ? s = n[c] : l[c] = n[c];
|
|
@@ -420,8 +429,8 @@ function Te(t, n, r, i, a, o) {
|
|
|
420
429
|
__b: 0,
|
|
421
430
|
__e: null,
|
|
422
431
|
__c: null,
|
|
423
|
-
constructor:
|
|
424
|
-
__v: --
|
|
432
|
+
constructor: we,
|
|
433
|
+
__v: --Te,
|
|
425
434
|
__i: -1,
|
|
426
435
|
__u: 0
|
|
427
436
|
};
|
|
@@ -826,7 +835,7 @@ var Y = {
|
|
|
826
835
|
signOffOpen: "{n} comments on this page are still open. You can approve it anyway.",
|
|
827
836
|
signOffOpen_one: "{n} comment on this page is still open. You can approve it anyway.",
|
|
828
837
|
signOffWithdraw: "Withdraw approval"
|
|
829
|
-
},
|
|
838
|
+
}, De = [
|
|
830
839
|
"en",
|
|
831
840
|
"es",
|
|
832
841
|
"fr",
|
|
@@ -838,77 +847,77 @@ var Y = {
|
|
|
838
847
|
"zh-CN",
|
|
839
848
|
"hi",
|
|
840
849
|
"ar"
|
|
841
|
-
],
|
|
842
|
-
es: () => import("./es-
|
|
843
|
-
fr: () => import("./fr-
|
|
844
|
-
de: () => import("./de-
|
|
845
|
-
"pt-BR": () => import("./pt-BR-
|
|
846
|
-
it: () => import("./it-
|
|
847
|
-
nl: () => import("./nl-
|
|
848
|
-
ja: () => import("./ja-
|
|
849
|
-
"zh-CN": () => import("./zh-CN-
|
|
850
|
-
hi: () => import("./hi-
|
|
851
|
-
ar: () => import("./ar-
|
|
850
|
+
], Oe = {
|
|
851
|
+
es: () => import("./es-Bw4Dj9tN.js"),
|
|
852
|
+
fr: () => import("./fr-TkuQaIAa.js"),
|
|
853
|
+
de: () => import("./de-D0C-v6tP.js"),
|
|
854
|
+
"pt-BR": () => import("./pt-BR-b-a8sxO8.js"),
|
|
855
|
+
it: () => import("./it-CiWA_bch.js"),
|
|
856
|
+
nl: () => import("./nl-CEmZRqjX.js"),
|
|
857
|
+
ja: () => import("./ja-C-QmR3yz.js"),
|
|
858
|
+
"zh-CN": () => import("./zh-CN-JTscW8u8.js"),
|
|
859
|
+
hi: () => import("./hi-DXSH2U8d.js"),
|
|
860
|
+
ar: () => import("./ar-L5cQ-NPe.js")
|
|
852
861
|
}, X = /^(ar|he|iw|fa|ur|ps|yi|ckb|sd|ug|dv)(-|$)/i, Z = "en", Q = Y, $ = Promise.resolve();
|
|
853
|
-
function
|
|
862
|
+
function ke(e) {
|
|
854
863
|
let t = (e ?? "").trim().replace(/_/g, "-").toLowerCase();
|
|
855
864
|
if (!/^[a-z]{2,3}(-[a-z0-9]{1,8})*$/.test(t)) return null;
|
|
856
|
-
let n =
|
|
865
|
+
let n = De.find((e) => e.toLowerCase() === t);
|
|
857
866
|
if (n) return n;
|
|
858
867
|
let r = t.split("-")[0];
|
|
859
|
-
return
|
|
868
|
+
return De.find((e) => e.toLowerCase().split("-")[0] === r) ?? null;
|
|
860
869
|
}
|
|
861
|
-
function
|
|
870
|
+
function Ae(e) {
|
|
862
871
|
let t = [e];
|
|
863
872
|
typeof document < "u" && t.push(document.documentElement.lang), typeof navigator < "u" && t.push(...navigator.languages ?? [], navigator.language);
|
|
864
873
|
for (let e of t) {
|
|
865
|
-
let t =
|
|
874
|
+
let t = ke(e);
|
|
866
875
|
if (t) return t;
|
|
867
876
|
}
|
|
868
877
|
return "en";
|
|
869
878
|
}
|
|
870
|
-
function
|
|
871
|
-
let t =
|
|
872
|
-
return Z = t, t === "en" ? (Q = Y, $ = Promise.resolve(), $) : ($ =
|
|
879
|
+
function je(e) {
|
|
880
|
+
let t = Ae(e);
|
|
881
|
+
return Z = t, t === "en" ? (Q = Y, $ = Promise.resolve(), $) : ($ = Oe[t]().then((e) => {
|
|
873
882
|
Z === t && (Q = e.default);
|
|
874
883
|
}, () => {
|
|
875
884
|
Z === t && (Z = "en", Q = Y);
|
|
876
885
|
}), $);
|
|
877
886
|
}
|
|
878
|
-
function
|
|
887
|
+
function Me() {
|
|
879
888
|
return Z;
|
|
880
889
|
}
|
|
881
|
-
function
|
|
890
|
+
function Ne(e, t) {
|
|
882
891
|
let n = X.test(Z);
|
|
883
892
|
return e.replace(/\{(\w+)\}/g, (e, r) => {
|
|
884
893
|
let i = String(t[r] ?? "");
|
|
885
894
|
return n && i ? `\u2068${i}\u2069` : i;
|
|
886
895
|
});
|
|
887
896
|
}
|
|
888
|
-
function
|
|
889
|
-
return
|
|
897
|
+
function Pe(e, t = {}) {
|
|
898
|
+
return Ne(Q[e] ?? Y[e], t);
|
|
890
899
|
}
|
|
891
|
-
function
|
|
900
|
+
function Fe(e, t) {
|
|
892
901
|
let [n = "", r = ""] = (Q[e] ?? Y[e]).split(`{${t}}`);
|
|
893
902
|
return [n, r];
|
|
894
903
|
}
|
|
895
|
-
function
|
|
904
|
+
function Ie(e, t, n = {}) {
|
|
896
905
|
let r = "other", i = String(t);
|
|
897
906
|
try {
|
|
898
907
|
r = new Intl.PluralRules(Z).select(t), i = new Intl.NumberFormat(Z).format(t);
|
|
899
908
|
} catch {}
|
|
900
909
|
let a = Y;
|
|
901
|
-
return
|
|
910
|
+
return Ne(Q[`${e}_${r}`] ?? Q[e] ?? a[`${e}_${r}`] ?? Y[e], {
|
|
902
911
|
...n,
|
|
903
912
|
n: i
|
|
904
913
|
});
|
|
905
914
|
}
|
|
906
|
-
function
|
|
915
|
+
function Le() {
|
|
907
916
|
if (X.test(Z)) return "rtl";
|
|
908
917
|
let e = document.documentElement.dir || document.body?.dir;
|
|
909
918
|
return e === "rtl" || e === "ltr" ? e : X.test(document.documentElement.lang || "") ? "rtl" : "ltr";
|
|
910
919
|
}
|
|
911
|
-
function
|
|
920
|
+
function Re(e) {
|
|
912
921
|
let t = e ? new Date(e).getTime() : NaN;
|
|
913
922
|
if (!Number.isFinite(t)) return "";
|
|
914
923
|
try {
|
|
@@ -920,11 +929,11 @@ function Le(e) {
|
|
|
920
929
|
return new Date(t).toLocaleString();
|
|
921
930
|
}
|
|
922
931
|
}
|
|
923
|
-
function
|
|
932
|
+
function ze(e, t = Date.now()) {
|
|
924
933
|
let n = new Date(e).getTime();
|
|
925
934
|
if (!Number.isFinite(n)) return "";
|
|
926
935
|
let r = Math.max(0, (t - n) / 1e3);
|
|
927
|
-
if (r < 60) return
|
|
936
|
+
if (r < 60) return Pe("justNow");
|
|
928
937
|
if (r >= 2592e3) return new Date(n).toLocaleDateString(Z);
|
|
929
938
|
let [i, a] = r < 3600 ? ["minute", 60] : r < 86400 ? ["hour", 3600] : ["day", 86400], o = Math.floor(r / a);
|
|
930
939
|
try {
|
|
@@ -933,4 +942,4 @@ function Re(e, t = Date.now()) {
|
|
|
933
942
|
return `${o} ${i}`;
|
|
934
943
|
}
|
|
935
944
|
}
|
|
936
|
-
export {
|
|
945
|
+
export { fe as _, Ie as a, y as b, Pe as c, me as d, he as f, _e as g, pe as h, Re as i, Le as l, ge as m, Me as n, ze as o, ve as p, Y as r, je as s, Fe as t, Ee as u, G as v, b as x, I as y };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { _ as e, g as t, i as n, v as r } from "./client-
|
|
1
|
+
import { _ as e, g as t, i as n, v as r } from "./client-7eVxvg5j.js";
|
|
2
2
|
import { t as i } from "./locale-D8Q4Q2Nt.js";
|
|
3
3
|
// src/core/identify.ts
|
|
4
4
|
var a = "See https://commentkit.dev/docs/identify", o = {
|
|
5
|
-
identity_not_set_up: "Sign-in from your website is not set up for this project yet. Create the identity secret in CommentKit (Settings
|
|
5
|
+
identity_not_set_up: "Sign-in from your website is not set up for this project yet. Create the identity secret in CommentKit (the website's Settings → For developers, under Sign in from your website) and sign the tokens with it on your server.",
|
|
6
6
|
identity_invalid: "The identity token was refused. It must be an HS256 JWT signed on your server with the website's identity secret, with sub, email, iat, exp (at most 10 minutes after iat) and aud set to your project key.",
|
|
7
7
|
identity_expired: "The identity token has expired. Make a fresh token for each page load (they last at most 10 minutes), or pass a function as `identity` that fetches one.",
|
|
8
8
|
identity_replayed: "This identity token was used already: every token works once. Make a new token for every sign-in, or pass a function as `identity` so CommentKit can ask for one.",
|
|
9
|
-
identity_conflict: "This email address already belongs to a reviewer who joined with an emailed code, so your website cannot sign someone in with it. To let your website's login vouch for that address, turn on \"Trust email addresses from my website's login\" in CommentKit (
|
|
9
|
+
identity_conflict: "This email address already belongs to a reviewer who joined with an emailed code, so your website cannot sign someone in with it. To let your website's login vouch for that address, turn on \"Trust email addresses from my website's login\" in CommentKit (the website's Settings → For developers); or sign this person in with a different address.",
|
|
10
10
|
guest_removed: "The team removed this person from the website in CommentKit, so they cannot be signed in. Someone on the team can invite them again.",
|
|
11
11
|
plan_required: "This website is read-only in CommentKit (its plan has ended or does not include this), so nobody can be signed in from your website until the workspace owner renews it.",
|
|
12
|
-
origin_not_allowed: "This website is not on the project's list of websites, so sign-in from your website is refused here (it never works on localhost). Add the website
|
|
12
|
+
origin_not_allowed: "This website is not on the project's list of websites, so sign-in from your website is refused here (it never works on localhost). Add it in CommentKit, in the website's Settings → Install, under Addresses."
|
|
13
13
|
}, s = 3, c = 30, l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakSet();
|
|
14
14
|
function d(e, t, n, r = !1) {
|
|
15
15
|
r && typeof t == "function" && !u.has(e) && (u.add(e), e.auth.onChange((n, r) => {
|
|
@@ -189,6 +189,8 @@ var e = {
|
|
|
189
189
|
finishBody: "Hai aperto il link dell’email con il tuo codice. Premi il pulsante per pubblicare il commento che hai scritto su questo sito.",
|
|
190
190
|
finishSend: "Invia il mio commento",
|
|
191
191
|
finishExpired: "Questo link non funziona più. I link dell’email con il codice funzionano una volta, per 10 minuti. Se il tuo commento è ancora in attesa, inserisci il codice nella pagina in cui l’hai scritto.",
|
|
192
|
+
closeCardHint: "Premi × per chiudere, o fai doppio clic fuori.",
|
|
193
|
+
closeCardHintTouch: "Tocca × per chiudere, o tocca due volte fuori.",
|
|
192
194
|
verifyWrong: "Il codice non è corretto. Controlla l’email o chiedi un nuovo codice.",
|
|
193
195
|
verifyDifferent: "Usa un’altra email",
|
|
194
196
|
verifyExpired: "Questo codice non è più valido. Il tuo commento è ancora salvato su questo dispositivo.",
|
|
@@ -189,6 +189,8 @@ var e = {
|
|
|
189
189
|
finishBody: "コードが記載されたメールのリンクを開きました。ボタンを押すと、このサイトで書いたコメントが公開されます。",
|
|
190
190
|
finishSend: "コメントを送信",
|
|
191
191
|
finishExpired: "このリンクはもう使えません。コードのメールにあるリンクは1回だけ、10分間使えます。コメントがまだ保留中の場合は、コメントを書いたページでコードを入力してください。",
|
|
192
|
+
closeCardHint: "× を押すか、外側をダブルクリックすると閉じます。",
|
|
193
|
+
closeCardHintTouch: "× をタップするか、外側をダブルタップすると閉じます。",
|
|
192
194
|
verifyWrong: "コードが正しくありません。メールを確認するか、新しいコードを送ってください。",
|
|
193
195
|
verifyDifferent: "別のメールアドレスを使う",
|
|
194
196
|
verifyExpired: "このコードはもう使えません。コメントはこの端末に保存されたままです。",
|