PageSourceSearch

https://armm-shield.netlify.app/assets/RichTextEditor-CiuhCJjF.js

js armm-shield.netlify.app collected 2026-10-03 10:30:14 UTC 7,927 bytes, 170 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor_quill-Bw4YNUoM.js","assets/vendor_exceljs-CaB4LguK.js","assets/vendor_quill-CfZ7kyuK.css"])))=>i.map(i=>d[i]);
2import { _ as k, __tla as __tla_0 } from "./vendor_jspdf-pIh6QOep.js";
3import { G as F, E as b, k as R, D as S, C as z, B as M, j as B, S as D, d as O, y as q, H as J } from "./task-spreadsheet-D5k0iGrQ.js";
4import $ from "./vendor_quill-Bw4YNUoM.js";
5import { M as Q, a as j } from "./vendor_quill_mention-Ce2mWBHk.js";
6let ee;
7let __tla = Promise.all([
8    (()=>{
9        try {
10            return __tla_0;
11        } catch  {}
12    })()
13]).then(async ()=>{
14    var U = q('<span class="text-error text-sm mt-2 mb-5 block leading-snug">'), Y = q("<div><legend></legend><div>");
15    class G extends j {
16        static blotName = "mention";
17        static create(d) {
18            const i = super.create(d), a = d;
19            return i.classList.add("kbd"), i.classList.remove("mention"), i.textContent = `${a?.denotationChar ?? "@"}${a?.value ?? ""}`, i;
20        }
21    }
22    $.register({
23        "blots/mention": G,
24        "modules/mention": Q
25    });
26    const K = (f)=>{
27        const d = document.createElement("div");
28        d.className = "item flex items-center gap-3 px-3 py-2 rounded-lg";
29        const i = document.createElement("div");
30        i.className = "flex flex-col leading-tight min-w-0";
31        const a = document.createElement("span");
32        if (a.className = "font-medium truncate", a.textContent = `@${f.value}`, i.appendChild(a), f.email) {
33            const p = document.createElement("span");
34            p.className = "text-xs opacity-70 truncate", p.textContent = f.email, i.appendChild(p);
35        }
36        return d.appendChild(i), d;
37    };
38    ee = function({ label: f, placeholder: d, legendHidden: i = !1, error: a, height: p, deltaValue: C = null, valueHtml: m = ()=>"<p>Please enter text...</p>", mentionDataSource: E = [], onChange: P, onMentionClick: N, minimal: h = !1, onReady: H, autoGrow: x = !1, maxAutoGrowHeight: T = "40dvh" }) {
39        const w = ()=>a ? a() : void 0;
40        let g, t, c = !1, _ = !1, v;
41        const y = ()=>{
42            !x || v !== void 0 || (v = requestAnimationFrame(()=>{
43                v = void 0, I();
44            }));
45        }, L = ()=>{
46            const e = g?.querySelector(".ql-editor");
47            e && (e.style.color = "#000", e.style.backgroundColor = "#ffffff");
48        }, A = (e, r)=>JSON.stringify(e ?? null) === JSON.stringify(r ?? null);
49        F(async ()=>{
50            if (!g) return;
51            const e = await k(()=>import("./vendor_quill-Bw4YNUoM.js"), __vite__mapDeps([0,1,2]));
52            if (_) return;
53            const r = e.default ?? $, n = h ? [
54                [
55                    "bold",
56                    "italic",
57                    "underline"
58                ]
59            ] : [
60                [
61                    {
62                        header: [
63                            1,
64                            2,
65                            !1
66                        ]
67                    }
68                ],
69                [
70                    "bold",
71                    "italic",
72                    "underline"
73                ]
74            ];
75            t = new r(g, {
76                theme: "snow",
77                placeholder: d || "Type here...",
78                modules: {
79                    toolbar: n,
80                    mention: {
81                        mentionDenotationChars: [
82                            "@"
83                        ],
84                        spaceAfterInsert: !0,
85                        source: (o, l)=>{
86                            if (!o?.length) {
87                                l(E, o);
88                                return;
89                            }
90                            const s = o.toLowerCase();
91                            l(E.filter((u)=>u.value.toLowerCase().includes(s)), o);
92                        },
93                        renderItem: (o)=>K(o),
94                        onSelect: (o, l)=>{
95                            N?.(o), l(o);
96                        }
97                    }
98                }
99            }), m() && (c = !0, t.clipboard.dangerouslyPasteHTML(m(), "silent"), c = !1), L(), t.on("text-change", ()=>{
100                if (!t || c) return;
101                const o = t.getContents(), l = t.root.innerHTML ?? "", s = t.getText();
102                P({
103                    delta: o,
104                    html: l,
105                    text: s
106                }), y();
107            }), H?.(t), x && (y(), window.addEventListener("resize", y));
108        }), b(()=>{
109            const e = m();
110            if (t && e != null) {
111                const r = t.root.innerHTML ?? "", n = (s)=>s.replace(/<script[^>]*>[\s\S]*?<\/script>/gi, " ").replace(/<style[^>]*>[\s\S]*?<\/style>/gi, " ").replace(/<[^>]+>/g, " ").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/\s+/g, " ").trim(), o = n(r), l = n(e);
112                if (r !== e && o !== l) {
113                    c = !0;
114                    const s = t.getSelection();
115                    t.clipboard.dangerouslyPasteHTML(e, "silent"), s && t.setSelection(s.index, s.length, "silent"), c = !1;
116                }
117            }
118        }), b(()=>{
119            if (t) {
120                if (C && !A(t.getContents(), C)) {
121                    c = !0;
122                    const e = t.getSelection();
123                    t.setContents(C, "silent"), e && t.setSelection(e.index, e.length, "silent"), c = !1;
124                    return;
125                }
126                if (!C) {
127                    const e = t.root.innerHTML ?? "", r = (n)=>n.replace(/\s+/g, " ").trim();
128                    if (r(e) !== r(m?.() ?? "")) {
129                        c = !0;
130                        const n = t.getSelection();
131                        t.clipboard.dangerouslyPasteHTML(m?.() ?? "", "silent"), n && t.setSelection(n.index, n.length, "silent"), c = !1;
132                    }
133                }
134            }
135        }), b(()=>L()), b(()=>{
136            m(), y();
137        }), R(()=>{
138            _ = !0, v !== void 0 && cancelAnimationFrame(v), t && (t.off("text-change"), t = void 0), x && window.removeEventListener("resize", y);
139        });
140        const I = ()=>{
141            if (!x) return;
142            const e = g?.querySelector(".ql-editor");
143            if (!e) return;
144            const r = /^(\d+(?:\.\d+)?)(px|vh|dvh|svh|lvh)$/i.exec(T.trim());
145            let n;
146            if (r) {
147                const s = parseFloat(r[1]), u = r[2].toLowerCase();
148                u === "px" ? n = s : (u === "vh" || u === "dvh" || u === "svh" || u === "lvh") && (n = window.innerHeight * s / 100);
149            }
150            e.style.height = "auto";
151            const o = e.scrollHeight, l = n ? Math.min(o, n) : o;
152            e.style.height = l + "px", e.style.overflowY = o > (n ?? o) ? "auto" : "hidden";
153        };
154        return (()=>{
155            var e = Y(), r = e.firstChild, n = r.nextSibling;
156            S(r, "fieldset-title uppercase font-bold " + (i ? "sr-only" : "")), z(r, "aria-label", f), M(r, f);
157            var o = g;
158            return typeof o == "function" ? J(o, n) : g = n, S(n, "quill-editor text-base " + (h ? "min-h-[80px]" : "")), (p ?? (h ? "80px" : "100px")) != null ? n.style.setProperty("min-height", p ?? (h ? "80px" : "100px")) : n.style.removeProperty("min-height"), M(e, B(D, {
159                get when () {
160                    return w();
161                },
162                get children () {
163                    var l = U();
164                    return M(l, w), l;
165                }
166            }), null), O(()=>S(e, "form-control w-full " + (w() ? "mb-14 " : "mb-7 ") + (h ? "rtx-minimal" : "") + (x ? " rtx-autogrow" : ""))), e;
167        })();
168    };
169});
170export { ee as R, __tla };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.