@aswin.dev/editor 0.6.3 → 0.7.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.
Files changed (85) hide show
  1. package/README.md +3 -3
  2. package/dist/AccessibilityPanel-COL6Wm7p.js +108 -0
  3. package/dist/AiChatSidebar-DWGPVtvC.js +229 -0
  4. package/dist/AiFeatureMenu-duUFSfDf.js +63 -0
  5. package/dist/BlockA11yBadge-Qs6HtXid.js +34 -0
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/CollaboratorBar-Bw-lbt61.js +95 -0
  8. package/dist/CommentsSidebar-BaD5F53-.js +436 -0
  9. package/dist/CountdownBlock-DaYGxKqo.js +92 -0
  10. package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
  11. package/dist/DesignReferenceSidebar-BSH7uNP_.js +276 -0
  12. package/dist/LoadingTrack-Ba2pfF57.js +10 -0
  13. package/dist/ModuleBrowserModal-6phxZSKI.js +206 -0
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/NumberWithSuffix-BpUzQOJt.js +422 -0
  16. package/dist/ParagraphEditor-DNSzAB-I.js +695 -0
  17. package/dist/RichTextEditorContent-CrqPQdnk.js +137 -0
  18. package/dist/SaveModuleDialog-zMQTpez7.js +123 -0
  19. package/dist/SnapshotHistory-Do-A5rYU.js +122 -0
  20. package/dist/TemplateScoringPanel-CS7o62zS.js +256 -0
  21. package/dist/TestEmailModal-DGj_9V1u.js +94 -0
  22. package/dist/TitleEditor-C7IDnAoS.js +172 -0
  23. package/dist/TplModal-BAsVzcTb.js +44 -0
  24. package/dist/_plugin-vue_export-helper-BVAJ4lgT.js +8 -0
  25. package/dist/accessibility-BU09xZrQ.js +27 -0
  26. package/dist/blockTypeIcons-C6LDKvmd.js +140 -0
  27. package/dist/bundle-stats.json +10 -0
  28. package/dist/check-DJrpDKO_.js +7 -0
  29. package/dist/chevron-down-C5oBUhT8.js +7 -0
  30. package/dist/chevron-right-BqCptpdp.js +10 -0
  31. package/dist/circle-alert-ZQQc98HC.js +25 -0
  32. package/dist/clock-ik2pRJKG.js +12 -0
  33. package/dist/cloud-6ZmAvF0j.js +1791 -0
  34. package/dist/createLucideIcon-ClREiSx3.js +43 -0
  35. package/dist/de-DWcgp-7T.js +729 -0
  36. package/dist/de-GOtR9DwW.js +207 -0
  37. package/dist/dist-BUzw1buG.js +35 -0
  38. package/dist/dist-BZyY-SS4.js +74 -0
  39. package/dist/dist-BadNx4qo.js +5 -0
  40. package/dist/dist-BesOh2mk.js +35 -0
  41. package/dist/dist-Bz3M4RXG.js +2082 -0
  42. package/dist/dist-C04s_fLA.js +563 -0
  43. package/dist/dist-C3T2AKtB.js +776 -0
  44. package/dist/dist-C9ckKEZL.js +519 -0
  45. package/dist/dist-CBItRG-Z.js +47 -0
  46. package/dist/dist-COSzWQUs.js +5 -0
  47. package/dist/dist-CivF9P8b.js +382 -0
  48. package/dist/dist-DXa1uAMh.js +10658 -0
  49. package/dist/dist-DtiDUrX-.js +189 -0
  50. package/dist/dist-Dzt5foyL.js +61 -0
  51. package/dist/emojiData-DrBuvEoP.js +17 -0
  52. package/dist/en-Cxd4fhNm.js +729 -0
  53. package/dist/en-dFFQVzNn.js +207 -0
  54. package/dist/extensions-D__hOlV1.js +799 -0
  55. package/dist/formatRelativeTime-BhhO8yCl.js +12 -0
  56. package/dist/image-up-DT7gcJLN.js +23 -0
  57. package/dist/index.d.ts +352 -0
  58. package/dist/info-BSPGcsSM.js +19 -0
  59. package/dist/keys-CvX8D-8C.js +10 -0
  60. package/dist/liquid.browser-BvCyLQII.js +3277 -0
  61. package/dist/loader-circle-Balo8p3d.js +7 -0
  62. package/dist/message-circle-B39qAHxs.js +7 -0
  63. package/dist/pencil-BZJPNYWR.js +10 -0
  64. package/dist/readableTextColor-DVuzNX1y.js +30 -0
  65. package/dist/refresh-cw-DwDqGUM0.js +29 -0
  66. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  67. package/dist/scan-line-CzfFJO1o.js +25 -0
  68. package/dist/send-D2eSo4GH.js +10 -0
  69. package/dist/shield-check-jkpgcC0-.js +10 -0
  70. package/dist/sparkles-Chm5CZfb.js +23 -0
  71. package/dist/style.css +2 -0
  72. package/dist/styleConstants-34eUKPOZ.js +55 -0
  73. package/dist/styles-B4tjX5SP.js +5224 -0
  74. package/dist/templatical-editor.js +312 -0
  75. package/dist/text-align-start-CzBnJsW8.js +43 -0
  76. package/dist/timeouts-BSGxjuUF.js +4 -0
  77. package/dist/trash-2-CtK2apEH.js +25 -0
  78. package/dist/triangle-alert-KpDVNbpn.js +17 -0
  79. package/dist/useCloudI18n-DOKSZql1.js +23 -0
  80. package/dist/useEditorCore-wslttMH-.js +9517 -0
  81. package/dist/useI18n-C2xQZ6K9.js +17 -0
  82. package/dist/useMergeTag-DX0XG5V9.js +34 -0
  83. package/dist/vue.runtime.esm-bundler-CjauPXjj.js +5775 -0
  84. package/dist/x-BkaOMosX.js +10 -0
  85. package/package.json +10 -10
@@ -0,0 +1,137 @@
1
+ import { B as e, C as t, D as n, Ft as r, N as i, O as a, R as o, W as s, _ as c, b as l, c as u, d, g as f, h as p, jt as m, p as h, st as g, v as _, x as v } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { D as y, k as b } from "./keys-CvX8D-8C.js";
3
+ import { t as x } from "./useI18n-C2xQZ6K9.js";
4
+ import { t as S } from "./createLucideIcon-ClREiSx3.js";
5
+ import { t as C } from "./x-BkaOMosX.js";
6
+ var w = S("bold", [["path", {
7
+ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
8
+ key: "mg9rjx"
9
+ }]]), T = S("italic", [
10
+ ["line", {
11
+ x1: "19",
12
+ x2: "10",
13
+ y1: "4",
14
+ y2: "4",
15
+ key: "15jd3p"
16
+ }],
17
+ ["line", {
18
+ x1: "14",
19
+ x2: "5",
20
+ y1: "20",
21
+ y2: "20",
22
+ key: "bu0au3"
23
+ }],
24
+ ["line", {
25
+ x1: "15",
26
+ x2: "9",
27
+ y1: "4",
28
+ y2: "20",
29
+ key: "uljnxc"
30
+ }]
31
+ ]), E = S("link", [["path", {
32
+ d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
33
+ key: "1cjeqo"
34
+ }], ["path", {
35
+ d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
36
+ key: "19qd67"
37
+ }]]), D = ["data-tpl-theme"], O = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-5 tpl:py-4" }, k = {
38
+ id: "tpl-link-dialog-title",
39
+ class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
40
+ }, A = ["aria-label"], j = { class: "tpl:p-5" }, M = { class: "tpl:mb-4 tpl:last:mb-0" }, N = {
41
+ for: "tpl-link-dialog-url",
42
+ class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase"
43
+ }, P = ["placeholder"], F = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:px-5 tpl:py-4" }, I = { class: "tpl:ml-auto tpl:flex tpl:gap-2" }, L = /* @__PURE__ */ t({
44
+ __name: "RichTextLinkDialog",
45
+ props: /* @__PURE__ */ a({
46
+ visible: { type: Boolean },
47
+ isEditingLink: { type: Boolean }
48
+ }, {
49
+ linkUrl: { required: !0 },
50
+ linkUrlModifiers: {},
51
+ dialogRef: { required: !0 },
52
+ dialogRefModifiers: {}
53
+ }),
54
+ emits: /* @__PURE__ */ a([
55
+ "close",
56
+ "insert",
57
+ "remove",
58
+ "keydown"
59
+ ], ["update:linkUrl", "update:dialogRef"]),
60
+ setup(t, { emit: a }) {
61
+ let o = e(t, "linkUrl"), l = e(t, "dialogRef"), S = a, w = n(y, null), T = n(b, null), { t: E } = x();
62
+ return (e, n) => (i(), f(h, { to: "body" }, [t.visible ? (i(), _("div", {
63
+ key: 0,
64
+ "data-tpl-theme": g(T),
65
+ class: "tpl tpl-link-dialog tpl:fixed tpl:inset-0 tpl:z-modal tpl:flex tpl:items-center tpl:justify-center",
66
+ style: m(g(w)),
67
+ onClick: n[6] ||= d((e) => S("close"), ["self"])
68
+ }, [p("div", {
69
+ ref: (e) => l.value = e,
70
+ role: "dialog",
71
+ "aria-modal": "true",
72
+ "aria-labelledby": "tpl-link-dialog-title",
73
+ class: "tpl:w-[400px] tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:shadow-lg"
74
+ }, [
75
+ p("div", O, [p("h4", k, r(t.isEditingLink ? g(E).linkDialog.editLink : g(E).linkDialog.insertLink), 1), p("button", {
76
+ type: "button",
77
+ "aria-label": g(E).linkDialog.cancel,
78
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
79
+ onClick: n[0] ||= (e) => S("close")
80
+ }, [v(g(C), {
81
+ size: 16,
82
+ "stroke-width": 2
83
+ })], 8, A)]),
84
+ p("div", j, [p("div", M, [p("label", N, r(g(E).linkDialog.urlLabel), 1), s(p("input", {
85
+ id: "tpl-link-dialog-url",
86
+ "onUpdate:modelValue": n[1] ||= (e) => o.value = e,
87
+ type: "url",
88
+ class: "tpl:w-full tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:outline-none tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]",
89
+ placeholder: g(E).linkDialog.urlPlaceholder,
90
+ autofocus: "",
91
+ onKeydown: n[2] ||= (e) => S("keydown", e)
92
+ }, null, 40, P), [[u, o.value]])])]),
93
+ p("div", F, [t.isEditingLink ? (i(), _("button", {
94
+ key: 0,
95
+ type: "button",
96
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-danger)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-danger)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-danger-light)]",
97
+ onClick: n[3] ||= (e) => S("remove")
98
+ }, r(g(E).linkDialog.removeLink), 1)) : c("", !0), p("div", I, [p("button", {
99
+ type: "button",
100
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
101
+ onClick: n[4] ||= (e) => S("close")
102
+ }, r(g(E).linkDialog.cancel), 1), p("button", {
103
+ type: "button",
104
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:text-[var(--tpl-bg)]",
105
+ onClick: n[5] ||= (e) => S("insert")
106
+ }, r(t.isEditingLink ? g(E).linkDialog.updateLink : g(E).linkDialog.insertLink), 1)])])
107
+ ], 512)], 12, D)) : c("", !0)]));
108
+ }
109
+ }), R = {
110
+ key: 0,
111
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
112
+ }, z = { class: "tpl:animate-pulse tpl:text-[var(--tpl-text-dim)]" }, B = {
113
+ key: 1,
114
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:p-2 tpl:text-center tpl:text-xs tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-text-muted)]"
115
+ }, V = /* @__PURE__ */ t({
116
+ __name: "RichTextEditorContent",
117
+ props: {
118
+ editor: {},
119
+ editorContent: {},
120
+ isLoading: { type: Boolean },
121
+ initError: {}
122
+ },
123
+ emits: ["retry"],
124
+ setup(e, { emit: t }) {
125
+ let n = t, { t: a } = x();
126
+ return (t, s) => e.isLoading ? (i(), _("div", R, [p("div", z, r(g(a).errors.editorLoading), 1)])) : e.initError ? (i(), _("div", B, [l(r(g(a).errors.editorLoadFailed) + " ", 1), p("button", {
127
+ class: "tpl:ml-1 tpl:cursor-pointer tpl:border-none tpl:bg-transparent tpl:p-0 tpl:underline tpl:text-[var(--tpl-primary)]",
128
+ onClick: s[0] ||= (e) => n("retry")
129
+ }, r(g(a).errors.retry), 1)])) : e.editorContent && e.editor ? (i(), f(o(e.editorContent), {
130
+ key: 2,
131
+ editor: e.editor,
132
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
133
+ }, null, 8, ["editor"])) : c("", !0);
134
+ }
135
+ });
136
+ //#endregion
137
+ export { w as a, T as i, L as n, E as r, V as t };
@@ -0,0 +1,123 @@
1
+ import { At as e, C as t, F as n, Ft as r, N as i, U as a, V as o, W as s, _ as c, b as l, c as u, et as d, f, g as p, h as m, jt as h, m as g, st as _, v, x as y } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import "./useEditorCore-wslttMH-.js";
3
+ import { A as b, T as x, m as ee } from "./keys-CvX8D-8C.js";
4
+ import { t as te } from "./useI18n-C2xQZ6K9.js";
5
+ import { t as ne } from "./loader-circle-Balo8p3d.js";
6
+ import { n as S } from "./useCloudI18n-DOKSZql1.js";
7
+ import { t as C } from "./TplModal-BAsVzcTb.js";
8
+ //#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
9
+ var w = ["aria-busy"], T = {
10
+ id: "tpl-save-module-title",
11
+ class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
12
+ }, E = { class: "tpl:mb-3" }, D = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, O = ["placeholder", "disabled"], k = { class: "tpl:mb-3" }, A = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, j = { class: "tpl:max-h-40 tpl:space-y-1 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:p-2 tpl:border-[var(--tpl-border)]" }, M = [
13
+ "checked",
14
+ "disabled",
15
+ "onChange"
16
+ ], N = {
17
+ key: 0,
18
+ role: "alert",
19
+ class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
20
+ }, P = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, F = ["disabled"], I = ["disabled"], L = {
21
+ key: 0,
22
+ class: "tpl:flex tpl:items-center tpl:gap-1.5"
23
+ }, re = { key: 1 }, R = /* @__PURE__ */ t({
24
+ __name: "SaveModuleDialog",
25
+ props: {
26
+ visible: { type: Boolean },
27
+ preSelectedBlockId: {}
28
+ },
29
+ emits: ["close", "saved"],
30
+ setup(t, { emit: R }) {
31
+ let z = t, B = R, { t: V } = te(), { t: H } = S(), U = b(ee, "SaveModuleDialog"), W = b(x, "SaveModuleDialog"), G = d(""), K = d(/* @__PURE__ */ new Set()), q = d(!1), J = d(null), Y = g(() => U.content.value.blocks);
32
+ function X(e, t) {
33
+ let n = e.type;
34
+ return `${V.blocks[n] ?? e.type} ${t + 1}`;
35
+ }
36
+ o(() => z.visible, (e) => {
37
+ e && (G.value = "", J.value = null, K.value = new Set(z.preSelectedBlockId ? [z.preSelectedBlockId] : []));
38
+ });
39
+ function ie(e) {
40
+ let t = new Set(K.value);
41
+ t.has(e) ? t.delete(e) : t.add(e), K.value = t;
42
+ }
43
+ let Z = g(() => G.value.trim().length > 0 && K.value.size > 0 && !q.value);
44
+ async function Q() {
45
+ if (Z.value) {
46
+ q.value = !0, J.value = null;
47
+ try {
48
+ let e = Y.value.filter((e) => K.value.has(e.id));
49
+ await W.createModule(G.value.trim(), e), B("saved"), B("close");
50
+ } catch (e) {
51
+ J.value = e.message;
52
+ } finally {
53
+ q.value = !1;
54
+ }
55
+ }
56
+ }
57
+ function $() {
58
+ q.value || B("close");
59
+ }
60
+ function ae(e) {
61
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
62
+ }
63
+ return (o, d) => (i(), p(C, {
64
+ visible: t.visible,
65
+ onClose: $,
66
+ onKeydown: ae
67
+ }, {
68
+ default: a(() => [m("div", {
69
+ role: "dialog",
70
+ "aria-modal": "true",
71
+ "aria-busy": q.value,
72
+ "aria-labelledby": "tpl-save-module-title",
73
+ class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
74
+ style: {
75
+ "background-color": "var(--tpl-bg-elevated)",
76
+ "box-shadow": "var(--tpl-shadow-xl)"
77
+ }
78
+ }, [
79
+ m("h3", T, r(_(H).modules.saveAsModule), 1),
80
+ m("div", E, [m("label", D, r(_(H).modules.moduleName), 1), s(m("input", {
81
+ "onUpdate:modelValue": d[0] ||= (e) => G.value = e,
82
+ type: "text",
83
+ placeholder: _(H).modules.moduleNamePlaceholder,
84
+ class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
85
+ disabled: q.value
86
+ }, null, 8, O), [[u, G.value]])]),
87
+ m("div", k, [m("label", A, r(_(H).modules.selectBlocks), 1), m("div", j, [(i(!0), v(f, null, n(Y.value, (e, t) => (i(), v("label", {
88
+ key: e.id,
89
+ class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-sm tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:transition-colors tpl:duration-100",
90
+ style: h({
91
+ color: "var(--tpl-text)",
92
+ backgroundColor: K.value.has(e.id) ? "var(--tpl-primary-light)" : "transparent"
93
+ })
94
+ }, [m("input", {
95
+ type: "checkbox",
96
+ checked: K.value.has(e.id),
97
+ class: "tpl:accent-[var(--tpl-primary)]",
98
+ disabled: q.value,
99
+ onChange: (t) => ie(e.id)
100
+ }, null, 40, M), l(" " + r(X(e, t)), 1)], 4))), 128))])]),
101
+ J.value ? (i(), v("p", N, r(J.value), 1)) : c("", !0),
102
+ m("div", P, [m("button", {
103
+ type: "button",
104
+ class: e(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": q.value }]),
105
+ disabled: q.value,
106
+ onClick: $
107
+ }, r(_(H).modules.cancel), 11, F), m("button", {
108
+ type: "button",
109
+ class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
110
+ disabled: !Z.value,
111
+ onClick: Q
112
+ }, [q.value ? (i(), v("span", L, [y(_(ne), {
113
+ class: "tpl:animate-spin",
114
+ size: 12,
115
+ "stroke-width": 2
116
+ }), l(" " + r(_(H).modules.saving), 1)])) : (i(), v("span", re, r(_(H).modules.save), 1))], 8, I)])
117
+ ], 8, w)]),
118
+ _: 1
119
+ }, 8, ["visible"]));
120
+ }
121
+ });
122
+ //#endregion
123
+ export { R as default };
@@ -0,0 +1,122 @@
1
+ import { At as e, C as t, F as n, Ft as r, N as i, U as a, V as o, _ as s, d as c, et as l, f as u, h as d, m as f, st as p, t as m, v as h, x as g } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import "./useEditorCore-wslttMH-.js";
3
+ import { t as _ } from "./dist-CivF9P8b.js";
4
+ import { t as v } from "./useI18n-C2xQZ6K9.js";
5
+ import { t as y } from "./chevron-down-C5oBUhT8.js";
6
+ import { n as b, t as x } from "./chevron-right-BqCptpdp.js";
7
+ import { t as S } from "./clock-ik2pRJKG.js";
8
+ import { t as C } from "./loader-circle-Balo8p3d.js";
9
+ import { n as w } from "./useCloudI18n-DOKSZql1.js";
10
+ import { t as T } from "./formatRelativeTime-BhhO8yCl.js";
11
+ //#region src/cloud/components/SnapshotHistory.vue?vue&type=script&setup=true&lang.ts
12
+ var E = ["disabled", "title"], D = ["title"], O = {
13
+ key: 0,
14
+ class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
15
+ style: {
16
+ "backdrop-filter": "blur(8px)",
17
+ "-webkit-backdrop-filter": "blur(8px)"
18
+ }
19
+ }, k = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, A = {
20
+ key: 0,
21
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
22
+ }, j = {
23
+ key: 1,
24
+ class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
25
+ }, M = {
26
+ key: 2,
27
+ class: "tpl:max-h-64 tpl:overflow-y-auto"
28
+ }, N = ["disabled", "onClick"], P = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, F = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, I = {
29
+ key: 0,
30
+ class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
31
+ }, L = ["disabled", "title"], R = /* @__PURE__ */ t({
32
+ __name: "SnapshotHistory",
33
+ props: {
34
+ snapshots: {},
35
+ isLoading: { type: Boolean },
36
+ isRestoring: { type: Boolean }
37
+ },
38
+ emits: ["load", "navigate"],
39
+ setup(t, { emit: R }) {
40
+ let z = t, B = R, { format: V } = v(), { t: H } = w(), U = l(!1), W = l(null), G = l(-1);
41
+ o(() => z.snapshots.length, () => {
42
+ G.value = -1;
43
+ });
44
+ let K = f(() => G.value > 0 && z.snapshots.length > 0 && !z.isRestoring), q = f(() => G.value < z.snapshots.length - 1 && z.snapshots.length > 0 && !z.isRestoring);
45
+ function J() {
46
+ K.value && (G.value--, B("navigate", z.snapshots[G.value]));
47
+ }
48
+ function Y() {
49
+ q.value && (G.value++, B("navigate", z.snapshots[G.value]));
50
+ }
51
+ function X() {
52
+ U.value = !U.value, U.value && z.snapshots.length === 0 && B("load");
53
+ }
54
+ function Z(e) {
55
+ let t = z.snapshots.findIndex((t) => t.id === e);
56
+ t !== -1 && (G.value = t, B("navigate", z.snapshots[t])), U.value = !1;
57
+ }
58
+ function Q(e) {
59
+ let t = T(e, H.snapshotHistory, V, 7);
60
+ return t === null ? new Date(e).toLocaleDateString(void 0, {
61
+ month: "short",
62
+ day: "numeric",
63
+ hour: "2-digit",
64
+ minute: "2-digit"
65
+ }) : t;
66
+ }
67
+ return _(W, () => {
68
+ U.value = !1;
69
+ }), (o, l) => (i(), h("div", {
70
+ ref_key: "dropdownRef",
71
+ ref: W,
72
+ class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5"
73
+ }, [
74
+ d("button", {
75
+ class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
76
+ disabled: !q.value,
77
+ title: p(H).snapshotHistory.olderSnapshot,
78
+ onClick: c(Y, ["stop"])
79
+ }, [g(p(b), {
80
+ size: 14,
81
+ "stroke-width": 2
82
+ })], 8, E),
83
+ d("button", {
84
+ class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
85
+ title: p(H).snapshotHistory.tooltip,
86
+ onClick: c(X, ["stop"])
87
+ }, [g(p(S), {
88
+ size: 16,
89
+ "stroke-width": 1.5
90
+ }), g(p(y), {
91
+ class: e(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": U.value }]),
92
+ size: 10,
93
+ "stroke-width": 2
94
+ }, null, 8, ["class"])], 8, D),
95
+ g(m, { name: "tpl-dropdown" }, {
96
+ default: a(() => [U.value ? (i(), h("div", O, [d("div", k, r(p(H).snapshotHistory.dropdownTitle), 1), t.isLoading ? (i(), h("div", A, [g(p(C), {
97
+ class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
98
+ size: 20,
99
+ "stroke-width": 2
100
+ })])) : t.snapshots.length === 0 ? (i(), h("div", j, r(p(H).snapshotHistory.noSnapshots), 1)) : (i(), h("div", M, [(i(!0), h(u, null, n(t.snapshots, (e) => (i(), h("button", {
101
+ key: e.id,
102
+ class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
103
+ style: { "background-color": "transparent" },
104
+ disabled: t.isRestoring,
105
+ onClick: (t) => Z(e.id)
106
+ }, [d("div", P, [d("div", F, [d("span", null, r(Q(e.created_at)), 1), e.is_autosave ? (i(), h("span", I, r(p(H).snapshotHistory.auto), 1)) : s("", !0)])])], 8, N))), 128))]))])) : s("", !0)]),
107
+ _: 1
108
+ }),
109
+ d("button", {
110
+ class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
111
+ disabled: !K.value,
112
+ title: p(H).snapshotHistory.newerSnapshot,
113
+ onClick: c(J, ["stop"])
114
+ }, [g(p(x), {
115
+ size: 14,
116
+ "stroke-width": 2
117
+ })], 8, L)
118
+ ], 512));
119
+ }
120
+ });
121
+ //#endregion
122
+ export { R as default };
@@ -0,0 +1,256 @@
1
+ import { At as e, C as t, D as n, F as r, Ft as i, N as a, R as o, U as ee, V as s, _ as c, b as l, et as u, f as d, g as f, h as p, jt as m, st as h, t as te, v as g, x as _ } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { A as v, E as ne, m as re, y } from "./keys-CvX8D-8C.js";
3
+ import { t as b } from "./createLucideIcon-ClREiSx3.js";
4
+ import { t as ie } from "./chevron-down-C5oBUhT8.js";
5
+ import { t as x } from "./circle-alert-ZQQc98HC.js";
6
+ import { n as S, t as C } from "./refresh-cw-DwDqGUM0.js";
7
+ import { t as ae } from "./info-BSPGcsSM.js";
8
+ import { t as w } from "./loader-circle-Balo8p3d.js";
9
+ import { t as T } from "./shield-check-jkpgcC0-.js";
10
+ import { t as E } from "./sparkles-Chm5CZfb.js";
11
+ import { t as oe } from "./triangle-alert-KpDVNbpn.js";
12
+ import { t as se } from "./x-BkaOMosX.js";
13
+ import { t as ce } from "./LoadingTrack-Ba2pfF57.js";
14
+ import { t as D } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
15
+ import { n as le } from "./useCloudI18n-DOKSZql1.js";
16
+ var O = b("shield-x", [
17
+ ["path", {
18
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
19
+ key: "oel41y"
20
+ }],
21
+ ["path", {
22
+ d: "m14.5 9.5-5 5",
23
+ key: "17q4r4"
24
+ }],
25
+ ["path", {
26
+ d: "m9.5 9.5 5 5",
27
+ key: "18nt4w"
28
+ }]
29
+ ]), k = b("zap", [["path", {
30
+ d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
31
+ key: "1xq2db"
32
+ }]]);
33
+ //#endregion
34
+ //#region src/cloud/utils/scoringStyles.ts
35
+ function A(e) {
36
+ return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
37
+ }
38
+ function j(e) {
39
+ return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
40
+ }
41
+ function M(e) {
42
+ return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
43
+ }
44
+ function N(e) {
45
+ return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
46
+ }
47
+ //#endregion
48
+ //#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
49
+ var P = {
50
+ key: 0,
51
+ class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
52
+ }, F = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, I = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, L = { class: "tpl:flex tpl:items-center tpl:gap-1" }, R = ["title"], z = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, B = {
53
+ key: 0,
54
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
55
+ }, V = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, H = {
56
+ key: 1,
57
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
58
+ }, U = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, W = {
59
+ key: 2,
60
+ class: "tpl:flex tpl:flex-col tpl:gap-4"
61
+ }, ue = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, de = {
62
+ key: 0,
63
+ class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
64
+ }, fe = {
65
+ key: 0,
66
+ class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
67
+ }, pe = ["onClick"], me = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, he = {
68
+ key: 0,
69
+ class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
70
+ }, ge = {
71
+ key: 0,
72
+ class: "tpl:border-t tpl:border-[var(--tpl-border)]"
73
+ }, _e = {
74
+ key: 0,
75
+ class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
76
+ }, ve = { class: "tpl:flex tpl:items-start tpl:gap-2" }, ye = { class: "tpl:flex-1 tpl:min-w-0" }, be = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, xe = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Se = {
77
+ key: 0,
78
+ class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
79
+ }, Ce = {
80
+ key: 1,
81
+ class: "tpl:mt-2 tpl:flex tpl:justify-center"
82
+ }, we = ["disabled", "onClick"], Te = {
83
+ key: 0,
84
+ class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
85
+ }, Ee = {
86
+ key: 3,
87
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
88
+ }, De = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Oe = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, G = /* @__PURE__ */ D(/* @__PURE__ */ t({
89
+ __name: "TemplateScoringPanel",
90
+ props: { visible: { type: Boolean } },
91
+ emits: ["close"],
92
+ setup(t, { emit: b }) {
93
+ let D = t, G = b, { t: K } = le(), q = v(re, "TemplateScoringPanel"), J = v(ne, "TemplateScoringPanel"), Y = n(y, []), X = u({
94
+ spam: !0,
95
+ readability: !0,
96
+ accessibility: !0,
97
+ bestPractices: !0
98
+ });
99
+ function ke(e) {
100
+ X.value[e] = !X.value[e];
101
+ }
102
+ let Z = [
103
+ "spam",
104
+ "readability",
105
+ "accessibility",
106
+ "bestPractices"
107
+ ], Ae = {
108
+ spam: O,
109
+ readability: S,
110
+ accessibility: E,
111
+ bestPractices: k
112
+ };
113
+ function Q() {
114
+ J.score(q.content.value, Y);
115
+ }
116
+ s(() => D.visible, (e) => {
117
+ e && !J.scoringResult.value && !J.isScoring.value && Q();
118
+ });
119
+ async function je(e) {
120
+ if (!e.blockId) return;
121
+ let t = q.content.value.blocks.find((t) => t.id === e.blockId);
122
+ if (!t) return;
123
+ let n = t.content;
124
+ if (!n) return;
125
+ let r = await J.fixFinding(n, e, Y);
126
+ r && (q.updateBlock(e.blockId, { content: r }), J.removeFinding(e.category, e.id));
127
+ }
128
+ function $() {
129
+ return J.scoringResult.value ? Z.reduce((e, t) => e + (J.scoringResult.value?.categories[t]?.findings.length ?? 0), 0) : 0;
130
+ }
131
+ return (n, s) => (a(), f(te, {
132
+ "enter-active-class": "tpl-scoring-slide-enter-active",
133
+ "enter-from-class": "tpl:translate-x-full",
134
+ "enter-to-class": "tpl:translate-x-0",
135
+ "leave-active-class": "tpl-scoring-slide-leave-active",
136
+ "leave-from-class": "tpl:translate-x-0",
137
+ "leave-to-class": "tpl:translate-x-full"
138
+ }, {
139
+ default: ee(() => [t.visible ? (a(), g("div", P, [p("div", F, [p("div", I, [_(h(T), {
140
+ size: 13,
141
+ "stroke-width": 2
142
+ }), p("span", null, i(h(K).scoring.title), 1)]), p("div", L, [h(J).scoringResult.value && !h(J).isScoring.value ? (a(), g("button", {
143
+ key: 0,
144
+ class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
145
+ title: h(K).scoring.rescore,
146
+ onClick: s[0] ||= (e) => Q()
147
+ }, [_(h(C), {
148
+ size: 14,
149
+ "stroke-width": 2
150
+ })], 8, R)) : c("", !0), p("button", {
151
+ class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
152
+ onClick: s[1] ||= (e) => G("close")
153
+ }, [_(h(se), {
154
+ size: 14,
155
+ "stroke-width": 2
156
+ })])])]), p("div", z, [h(J).isScoring.value ? (a(), g("div", B, [p("p", V, i(h(K).scoring.scoring), 1), _(ce, { class: "tpl:w-3/4" })])) : h(J).error.value && !h(J).scoringResult.value ? (a(), g("div", H, [
157
+ _(h(x), {
158
+ size: 32,
159
+ "stroke-width": 1.5,
160
+ class: "tpl:text-[var(--tpl-danger)]"
161
+ }),
162
+ p("p", U, i(h(K).scoring.error), 1),
163
+ p("button", {
164
+ class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
165
+ onClick: s[2] ||= (e) => Q()
166
+ }, [_(h(C), {
167
+ size: 12,
168
+ "stroke-width": 2
169
+ }), l(" " + i(h(K).scoring.rescore), 1)])
170
+ ])) : h(J).scoringResult.value ? (a(), g("div", W, [
171
+ p("div", {
172
+ class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
173
+ style: m({ backgroundColor: h(j)(h(J).scoringResult.value.score) })
174
+ }, [
175
+ p("span", {
176
+ class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
177
+ style: m({ color: h(A)(h(J).scoringResult.value.score) })
178
+ }, i(h(J).scoringResult.value.score), 5),
179
+ p("span", ue, i(h(K).scoring.overallScore), 1),
180
+ $() > 0 ? (a(), g("span", de, i($()) + " " + i(h(K).scoring.findings), 1)) : c("", !0)
181
+ ], 4),
182
+ h(J).fixError.value ? (a(), g("div", fe, [_(h(x), {
183
+ size: 14,
184
+ "stroke-width": 2,
185
+ class: "tpl:mt-0.5 tpl:shrink-0"
186
+ }), p("span", null, i(h(K).scoring.fixError), 1)])) : c("", !0),
187
+ (a(), g(d, null, r(Z, (t) => p("div", {
188
+ key: t,
189
+ class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
190
+ }, [p("button", {
191
+ class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-2.5 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100 tpl:bg-[var(--tpl-bg)]",
192
+ onClick: (e) => ke(t)
193
+ }, [
194
+ (a(), f(o(Ae[t]), {
195
+ size: 14,
196
+ "stroke-width": 2,
197
+ style: m({ color: h(A)(h(J).scoringResult.value.categories[t].score) })
198
+ }, null, 8, ["style"])),
199
+ p("span", me, i(h(K).scoring.categories[t]), 1),
200
+ p("span", {
201
+ class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
202
+ style: m({
203
+ color: h(A)(h(J).scoringResult.value.categories[t].score),
204
+ backgroundColor: h(j)(h(J).scoringResult.value.categories[t].score)
205
+ })
206
+ }, i(h(J).scoringResult.value.categories[t].score), 5),
207
+ h(J).scoringResult.value.categories[t].findings.length > 0 ? (a(), g("span", he, i(h(J).scoringResult.value.categories[t].findings.length), 1)) : c("", !0),
208
+ _(h(ie), {
209
+ size: 12,
210
+ "stroke-width": 2,
211
+ class: e(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", X.value[t] ? "tpl:rotate-0" : "tpl:-rotate-90"])
212
+ }, null, 8, ["class"])
213
+ ], 8, pe), X.value[t] ? (a(), g("div", ge, [h(J).scoringResult.value.categories[t].findings.length === 0 ? (a(), g("div", _e, i(h(K).scoring.noFindings), 1)) : c("", !0), (a(!0), g(d, null, r(h(J).scoringResult.value.categories[t].findings, (e) => (a(), g("div", {
214
+ key: e.id,
215
+ class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
216
+ }, [p("div", ve, [(a(), f(o(e.severity === "high" ? h(x) : e.severity === "medium" ? h(oe) : h(ae)), {
217
+ size: 13,
218
+ "stroke-width": 2,
219
+ class: "tpl:mt-0.5 tpl:shrink-0",
220
+ style: m({ color: h(M)(e.severity) })
221
+ }, null, 8, ["style"])), p("div", ye, [
222
+ p("div", be, [p("span", {
223
+ class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
224
+ style: m({
225
+ color: h(M)(e.severity),
226
+ backgroundColor: h(N)(e.severity)
227
+ })
228
+ }, i(h(K).scoring.severity[e.severity]), 5), p("span", xe, i(e.message), 1)]),
229
+ e.suggestion ? (a(), g("p", Se, i(e.suggestion), 1)) : c("", !0),
230
+ e.blockId ? (a(), g("div", Ce, [p("button", {
231
+ class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
232
+ style: { "background-color": "transparent" },
233
+ disabled: h(J).fixingFindingId.value !== null,
234
+ onClick: (t) => je(e)
235
+ }, [h(J).fixingFindingId.value === e.id ? (a(), f(h(w), {
236
+ key: 0,
237
+ class: "tpl-spinner",
238
+ size: 11,
239
+ "stroke-width": 2
240
+ })) : (a(), f(h(E), {
241
+ key: 1,
242
+ size: 11,
243
+ "stroke-width": 2
244
+ })), l(" " + i(h(J).fixingFindingId.value === e.id ? h(K).scoring.fixing : h(K).scoring.fix), 1)], 8, we), h(J).fixError.value ? (a(), g("p", Te, i(h(J).fixError.value), 1)) : c("", !0)])) : c("", !0)
245
+ ])])]))), 128))])) : c("", !0)])), 64))
246
+ ])) : (a(), g("div", Ee, [_(h(T), {
247
+ size: 32,
248
+ "stroke-width": 1.5,
249
+ class: "tpl:text-[var(--tpl-text-dim)]"
250
+ }), p("p", De, i(h(K).scoring.emptyState), 1)])), p("p", Oe, i(h(K).aiMenu.disclaimer), 1)])])) : c("", !0)]),
251
+ _: 1
252
+ }));
253
+ }
254
+ }), [["__scopeId", "data-v-79e79258"]]);
255
+ //#endregion
256
+ export { G as default };