@kedataindo/docflow-vue 0.0.4

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 (54) hide show
  1. package/dist/components/BubbleMenu.vue.d.ts +14 -0
  2. package/dist/components/BubbleMenu.vue.d.ts.map +1 -0
  3. package/dist/components/DocsEditor.vue.d.ts +73 -0
  4. package/dist/components/DocsEditor.vue.d.ts.map +1 -0
  5. package/dist/components/DocumentTabsSidebar.vue.d.ts +36 -0
  6. package/dist/components/DocumentTabsSidebar.vue.d.ts.map +1 -0
  7. package/dist/components/EditorToolbar.vue.d.ts +24 -0
  8. package/dist/components/EditorToolbar.vue.d.ts.map +1 -0
  9. package/dist/components/FontSizeSelect.vue.d.ts +7 -0
  10. package/dist/components/FontSizeSelect.vue.d.ts.map +1 -0
  11. package/dist/components/HeaderBar.vue.d.ts +57 -0
  12. package/dist/components/HeaderBar.vue.d.ts.map +1 -0
  13. package/dist/components/PageView.vue.d.ts +18 -0
  14. package/dist/components/PageView.vue.d.ts.map +1 -0
  15. package/dist/components/QuickActionChips.vue.d.ts +14 -0
  16. package/dist/components/QuickActionChips.vue.d.ts.map +1 -0
  17. package/dist/components/RulerBar.vue.d.ts +7 -0
  18. package/dist/components/RulerBar.vue.d.ts.map +1 -0
  19. package/dist/components/SlashMenu.vue.d.ts +11 -0
  20. package/dist/components/SlashMenu.vue.d.ts.map +1 -0
  21. package/dist/components/StatusBar.vue.d.ts +30 -0
  22. package/dist/components/StatusBar.vue.d.ts.map +1 -0
  23. package/dist/components/ThemeToggle.vue.d.ts +3 -0
  24. package/dist/components/ThemeToggle.vue.d.ts.map +1 -0
  25. package/dist/components/VerticalRuler.vue.d.ts +7 -0
  26. package/dist/components/VerticalRuler.vue.d.ts.map +1 -0
  27. package/dist/components/sidebars/AISidebar.vue.d.ts +10 -0
  28. package/dist/components/sidebars/AISidebar.vue.d.ts.map +1 -0
  29. package/dist/components/sidebars/CommentsSidebar.vue.d.ts +17 -0
  30. package/dist/components/sidebars/CommentsSidebar.vue.d.ts.map +1 -0
  31. package/dist/components/sidebars/HistorySidebar.vue.d.ts +16 -0
  32. package/dist/components/sidebars/HistorySidebar.vue.d.ts.map +1 -0
  33. package/dist/components/sidebars/TOCSidebar.vue.d.ts +11 -0
  34. package/dist/components/sidebars/TOCSidebar.vue.d.ts.map +1 -0
  35. package/dist/composables/useEditor.d.ts +17 -0
  36. package/dist/composables/useEditor.d.ts.map +1 -0
  37. package/dist/composables/useLocale.d.ts +14 -0
  38. package/dist/composables/useLocale.d.ts.map +1 -0
  39. package/dist/composables/useTheme.d.ts +5 -0
  40. package/dist/composables/useTheme.d.ts.map +1 -0
  41. package/dist/index.cjs +374 -0
  42. package/dist/index.d.ts +21 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +4774 -0
  45. package/dist/locales/en.d.ts +335 -0
  46. package/dist/locales/en.d.ts.map +1 -0
  47. package/dist/locales/id.d.ts +335 -0
  48. package/dist/locales/id.d.ts.map +1 -0
  49. package/dist/locales/index.d.ts +18 -0
  50. package/dist/locales/index.d.ts.map +1 -0
  51. package/dist/style.css +1 -0
  52. package/dist/types.d.ts +40 -0
  53. package/dist/types.d.ts.map +1 -0
  54. package/package.json +48 -0
package/dist/index.js ADDED
@@ -0,0 +1,4774 @@
1
+ import { createEditor as ta } from "@kedata-indonesia/docflow-core";
2
+ import { ref as w, shallowRef as aa, computed as F, onMounted as Oe, onUnmounted as Ae, watch as ae, unref as t, nextTick as xt, inject as oa, provide as na, defineComponent as le, openBlock as n, createBlock as he, Teleport as sa, createElementBlock as r, normalizeStyle as me, createElementVNode as e, toDisplayString as l, Fragment as q, renderList as K, normalizeClass as z, createCommentVNode as H, h as dt, withDirectives as de, withKeys as ot, vModelText as ce, createVNode as y, withModifiers as R, Transition as at, withCtx as He, renderSlot as Re, resolveDynamicComponent as $e, createTextVNode as oe, normalizeProps as kt, guardReactiveProps as yt, vModelSelect as la } from "vue";
3
+ import { getPageSize as ra, PAGE_SIZES as rt } from "@kedata-indonesia/docflow-layout-engine";
4
+ function ia(s) {
5
+ const p = w(null), o = aa(null), a = w(!1), c = F(() => {
6
+ var u;
7
+ return ((u = o.value) == null ? void 0 : u.editor) ?? null;
8
+ }), f = F(() => {
9
+ var u;
10
+ return ((u = o.value) == null ? void 0 : u.pluginActions) ?? {};
11
+ }), d = () => {
12
+ if (!p.value || o.value) return;
13
+ const u = t(s.collaboration), S = t(s.content), L = ta({
14
+ target: p.value,
15
+ content: S,
16
+ plugins: s.plugins,
17
+ editable: s.editable ?? !0,
18
+ collaboration: u,
19
+ onUpdate: s.onUpdate,
20
+ getPageMap: s.getPageMap,
21
+ paginationOptions: s.paginationOptions
22
+ });
23
+ o.value = L, xt(() => {
24
+ a.value = !0;
25
+ });
26
+ }, k = () => {
27
+ var u;
28
+ (u = o.value) == null || u.destroy(), o.value = null, a.value = !1;
29
+ };
30
+ return Oe(() => {
31
+ d();
32
+ }), Ae(() => {
33
+ k();
34
+ }), ae(
35
+ () => s.editable,
36
+ (u) => {
37
+ c.value && c.value.setEditable(u ?? !0);
38
+ }
39
+ ), ae(
40
+ () => {
41
+ const u = t(s.collaboration);
42
+ return u ? { room: u.room, provider: u.provider } : null;
43
+ },
44
+ async (u, S) => {
45
+ JSON.stringify(u) !== JSON.stringify(S) && (k(), await xt(), d());
46
+ },
47
+ { deep: !0 }
48
+ ), {
49
+ editorRef: p,
50
+ docsEditor: o,
51
+ editor: c,
52
+ pluginActions: f,
53
+ isReady: a
54
+ };
55
+ }
56
+ const wt = "docs-editor-theme", it = w(!1);
57
+ function zt() {
58
+ const s = (o) => {
59
+ if (it.value = o, typeof document < "u") {
60
+ const a = document.documentElement;
61
+ o ? a.classList.add("dark") : a.classList.remove("dark");
62
+ }
63
+ typeof localStorage < "u" && localStorage.setItem(wt, o ? "dark" : "light");
64
+ }, p = () => s(!it.value);
65
+ return Oe(() => {
66
+ let o = !1;
67
+ if (typeof localStorage < "u") {
68
+ const a = localStorage.getItem(wt);
69
+ a ? o = a === "dark" : typeof window < "u" && (o = window.matchMedia("(prefers-color-scheme: dark)").matches);
70
+ }
71
+ s(o);
72
+ }), {
73
+ isDark: it,
74
+ toggle: p
75
+ };
76
+ }
77
+ const Bt = {
78
+ common: {
79
+ save: "Save",
80
+ cancel: "Cancel",
81
+ create: "Create",
82
+ delete: "Delete",
83
+ rename: "Rename",
84
+ duplicate: "Duplicate",
85
+ move: "Move",
86
+ moveToFolder: "Move to folder",
87
+ moveDocument: "Move Document",
88
+ noFolder: "(No Folder)",
89
+ search: "Search",
90
+ loading: "Loading...",
91
+ error: "Error",
92
+ dismiss: "Dismiss",
93
+ emptyDocument: "(Empty Document)",
94
+ confirmDelete: "Are you sure you want to delete this document?"
95
+ },
96
+ header: {
97
+ file: "File",
98
+ new: "New",
99
+ newDocument: "New document",
100
+ open: "Open",
101
+ makeACopy: "Make a copy",
102
+ share: "Share",
103
+ email: "Email",
104
+ emailDraft: "Email draft",
105
+ download: "Download",
106
+ rename: "Rename",
107
+ move: "Move",
108
+ moveToFolder: "Move to folder",
109
+ moveToTrash: "Move to trash",
110
+ versionHistory: "Version history",
111
+ language: "Language",
112
+ pageSetup: "Page setup",
113
+ print: "Print",
114
+ edit: "Edit",
115
+ view: "View",
116
+ insert: "Insert",
117
+ format: "Format",
118
+ tools: "Tools",
119
+ extensions: "Extensions",
120
+ help: "Help",
121
+ backToDocuments: "Back to Documents",
122
+ clickToRename: "Click to rename",
123
+ starDocument: "Star document",
124
+ unstarDocument: "Unstar document",
125
+ sandbox: "Sandbox (toggle simulated collaborators)",
126
+ theme: "Theme",
127
+ account: "Account",
128
+ markdown: "Markdown (.md)",
129
+ html: "Web page (.html)",
130
+ htmlZip: "Web page (.html, zipped)",
131
+ text: "Plain text (.txt)",
132
+ docx: "Microsoft Word (.docx)",
133
+ pdf: "PDF Document (.pdf)",
134
+ odt: "OpenDocument Format (.odt)",
135
+ rtf: "Rich Text Format (.rtf)",
136
+ undo: "Undo",
137
+ redo: "Redo",
138
+ selectAll: "Select all",
139
+ showSidebar: "Show sidebar",
140
+ focusMode: "Full focus mode",
141
+ showRuler: "Show ruler",
142
+ meetingNotes: "Meeting notes",
143
+ image: "Image",
144
+ table: "Table",
145
+ codeBlock: "Code block",
146
+ header: "Header",
147
+ footer: "Footer",
148
+ footnote: "Footnote",
149
+ bold: "Bold text",
150
+ italic: "Italic text",
151
+ underline: "Underline",
152
+ heading1: "Heading 1",
153
+ heading2: "Heading 2",
154
+ heading3: "Heading 3",
155
+ spellCheck: "Spell check",
156
+ wordCount: "Word count",
157
+ preferences: "Preferences",
158
+ manageExtensions: "Manage extensions…",
159
+ keyboardShortcuts: "Keyboard shortcuts",
160
+ reportIssue: "Report issue",
161
+ about: "About DocsEditor"
162
+ },
163
+ toolbar: {
164
+ undo: "Undo",
165
+ redo: "Redo",
166
+ print: "Print",
167
+ spelling: "Spelling",
168
+ zoom: "100%",
169
+ paragraphStyle: "Paragraph style",
170
+ normalText: "Normal text",
171
+ fontFamily: "Font family",
172
+ decreaseFontSize: "Decrease font size",
173
+ increaseFontSize: "Increase font size",
174
+ lists: "Lists",
175
+ alignment: "Alignment",
176
+ insert: "Insert",
177
+ comments: "Comments",
178
+ history: "History",
179
+ ai: "AI",
180
+ tableOfContents: "Table of contents"
181
+ },
182
+ statusBar: {
183
+ liveSyncActive: "Live Sync Active",
184
+ connecting: "Connecting…",
185
+ saving: "Saving changes…",
186
+ offline: "Offline",
187
+ lastSavedAt: "Last saved at",
188
+ never: "Never",
189
+ pageSize: "Page size",
190
+ page: "Page",
191
+ of: "of",
192
+ words: "words",
193
+ characters: "characters"
194
+ },
195
+ editor: {
196
+ share: {
197
+ title: "Share document",
198
+ close: "Close",
199
+ shareableLink: "Shareable link",
200
+ copy: "Copy",
201
+ copied: "Link copied to clipboard",
202
+ couldNotCopy: "Could not copy link",
203
+ collaborators: "Collaborators",
204
+ addCollaborator: "Add collaborator by email",
205
+ placeholder: "colleague@example.com",
206
+ add: "Add",
207
+ userNotFound: "User not found",
208
+ failedToAdd: "Failed to add collaborator"
209
+ },
210
+ print: "Print",
211
+ logOut: "Log out",
212
+ rename: {
213
+ title: "Rename document",
214
+ label: "Document title",
215
+ save: "Save",
216
+ cancel: "Cancel"
217
+ },
218
+ pageSetup: {
219
+ title: "Page setup",
220
+ paperSize: "Paper size",
221
+ orientation: "Orientation",
222
+ portrait: "Portrait",
223
+ landscape: "Landscape",
224
+ margins: "Margins",
225
+ top: "Top",
226
+ bottom: "Bottom",
227
+ left: "Left",
228
+ right: "Right",
229
+ apply: "Apply",
230
+ cancel: "Cancel"
231
+ },
232
+ headerFooter: {
233
+ title: "Header & Footer Customization",
234
+ header: "Header",
235
+ footer: "Footer",
236
+ left: "Left",
237
+ right: "Right",
238
+ clear: "Clear",
239
+ headerLeftPlaceholder: "e.g. Document Title",
240
+ headerRightPlaceholder: "e.g. Page {page}",
241
+ footerLeftPlaceholder: "e.g. Confidential",
242
+ footerRightPlaceholder: "e.g. Page {page} of {total}",
243
+ variableInfo: "Variable Info: You can use {page} for the current page number, and {total} for the total page count.",
244
+ cancel: "Cancel",
245
+ save: "Save"
246
+ },
247
+ showOutline: "Show document outline",
248
+ loadingDocument: "Loading document"
249
+ },
250
+ slashMenu: {
251
+ title: "Suggested",
252
+ basicBlocks: "Basic Blocks",
253
+ noMatch: "No matching commands"
254
+ },
255
+ quickActions: {
256
+ meetingNotes: "Meeting notes",
257
+ emailDraft: "Email draft",
258
+ more: "More"
259
+ },
260
+ documentTabs: {
261
+ documentTabs: "Document Tabs",
262
+ addTab: "Add tab",
263
+ rename: "Rename",
264
+ delete: "Delete",
265
+ outline: "Outline",
266
+ untitledHeading: "Untitled Heading {level}",
267
+ placeholder: "Headings you add to the document will appear here."
268
+ },
269
+ theme: {
270
+ lightMode: "Switch to light mode",
271
+ darkMode: "Switch to dark mode"
272
+ },
273
+ sidebars: {
274
+ ai: {
275
+ title: "AI Writing Helper",
276
+ description: "A server-side AI co-writer to draft, summarize, or edit your copy.",
277
+ quickMacros: "Quick AI Macros",
278
+ summarize: "Summarize",
279
+ fixGrammar: "Fix Grammar",
280
+ continue: "Continue",
281
+ toSpanish: "To Spanish",
282
+ generations: "AI Generations",
283
+ aiDrafting: "AI drafting…",
284
+ copy: "Copy",
285
+ copied: "Copied",
286
+ insert: "Insert",
287
+ inserted: "Inserted",
288
+ noDraft: "No draft generated yet. Submit a prompt or macro command above to start.",
289
+ promptPlaceholder: "Ask AI to draft outline, write content, rewrite tone…",
290
+ promptAI: "Prompt AI"
291
+ },
292
+ comments: {
293
+ title: "Discussion Panel",
294
+ placeholder: "Select text to add a comment…",
295
+ addComment: "Add comment",
296
+ resolve: "Resolve",
297
+ reply: "Reply…",
298
+ replyInThread: "Reply in thread",
299
+ active: "Active",
300
+ resolved: "Resolved",
301
+ creatingAnchored: "Creating anchored comment:",
302
+ quote: "Quote:",
303
+ resolvedBy: "Resolved by {user}",
304
+ noComments: "No {mode} comments yet.",
305
+ commentOnSelection: "Comment on selection…",
306
+ generalComment: "Add general comment to document…",
307
+ anchoredComment: "Anchored comment",
308
+ general: "General comment",
309
+ post: "Post"
310
+ },
311
+ history: {
312
+ title: "History",
313
+ empty: "No history yet.",
314
+ version: "Version",
315
+ restore: "Restore",
316
+ closePreview: "Close Preview",
317
+ restoreThis: "Restore This",
318
+ viewingPreview: "Viewing Revision Preview",
319
+ readOnlyPreview: "You are previewing version #{index}. Your editor is temporarily read-only.",
320
+ modifiedBy: "Modified by:",
321
+ saveNamedSnapshot: "Save Named Snapshot",
322
+ snapshotPlaceholder: "e.g. Approved Final Draft…",
323
+ noSnapshots: "No snapshots saved yet.",
324
+ save: "Save",
325
+ cancel: "Cancel",
326
+ preview: "Preview"
327
+ },
328
+ toc: {
329
+ title: "Contents",
330
+ empty: "No headings yet.",
331
+ untitledHeading: "Untitled Heading {level}",
332
+ newSection: "New {tag} Section",
333
+ startWriting: "Start writing here…",
334
+ closeOutline: "Close outline",
335
+ searchHeadings: "Search headings…",
336
+ noHeadings: "No Headings Yet",
337
+ noHeadingsDescription: "Use headers (H1, H2, or H3) to structure your document. An interactive outline will generate here automatically.",
338
+ quickInsert: "Quick Insert",
339
+ headingLevel: "Heading {level}",
340
+ noMatchingHeaders: "No matching headers found",
341
+ tryDifferentTerm: "Try searching with a different term.",
342
+ outlineLayout: "Outline Layout",
343
+ outlineSync: "Outline syncs automatically. Click any header to instantly jump, focus, and scroll the editor to that section."
344
+ }
345
+ },
346
+ dashboard: {
347
+ allDocuments: "All Documents",
348
+ starred: "Starred",
349
+ folders: "Folders",
350
+ createFolder: "Create New Folder",
351
+ folderNamePlaceholder: "Folder name…",
352
+ noFolders: "No folders created yet.",
353
+ startNewDocument: "Start a New Document",
354
+ blankDocument: "Blank Document",
355
+ blankDescription: "Fresh slate",
356
+ meetingNotes: "Meeting Notes",
357
+ meetingNotesDescription: "Attendees & Action Items",
358
+ projectProposal: "Project Proposal",
359
+ projectProposalDescription: "Objectives & Deliverables",
360
+ officialLetter: "Official Letter",
361
+ officialLetterDescription: "Pre-formatted header",
362
+ searchPlaceholder: "Search titles or full-text contents…",
363
+ modified: "Modified",
364
+ alphabetical: "Alphabetical",
365
+ created: "Created",
366
+ gridView: "Grid View",
367
+ listView: "List View",
368
+ activeFilters: "Active Filters:",
369
+ folder: "Folder",
370
+ starredOnly: "Starred Only",
371
+ search: "Search",
372
+ noDocuments: "No documents found",
373
+ noDocumentsDescription: "No files match your current filters. Select a template or create a blank file to start drafting!",
374
+ createBlankDocument: "Create Blank Document",
375
+ loadingDocuments: "Loading documents...",
376
+ documentTitle: "Document Title",
377
+ lastModified: "Last Modified",
378
+ actions: "Actions"
379
+ },
380
+ auth: {
381
+ signInTitle: "Sign in to create and edit documents",
382
+ signInWithGoogle: "Sign in with Google",
383
+ signInWithEmail: "Sign in with Email",
384
+ signInWithGitHub: "Sign in with GitHub",
385
+ signInWith: "Sign in with {provider}",
386
+ or: "or",
387
+ email: "Email",
388
+ password: "Password",
389
+ name: "Name",
390
+ signIn: "Sign In",
391
+ signUp: "Sign Up",
392
+ signOut: "Sign out",
393
+ noAccount: "Don't have an account? Sign up",
394
+ hasAccount: "Already have an account? Sign in",
395
+ invalidCredentials: "Invalid email or password",
396
+ accountCreated: "Account created! You are now signed in.",
397
+ loadDocumentsError: "Failed to load documents. Is the server running?",
398
+ retry: "Try again",
399
+ rateLimited: "Server is rate limiting requests.",
400
+ retryIn: "Retrying in {seconds}s…",
401
+ networkError: "Could not reach the server. Check your connection.",
402
+ noProviders: "No authentication providers configured. Check your server environment variables."
403
+ },
404
+ language: {
405
+ label: "Language",
406
+ en: "English",
407
+ id: "Indonesian"
408
+ }
409
+ }, jt = {
410
+ common: {
411
+ save: "Simpan",
412
+ cancel: "Batal",
413
+ create: "Buat",
414
+ delete: "Hapus",
415
+ rename: "Ubah nama",
416
+ duplicate: "Duplikat",
417
+ move: "Pindah",
418
+ moveToFolder: "Pindah ke folder",
419
+ moveDocument: "Pindahkan Dokumen",
420
+ noFolder: "(Tanpa Folder)",
421
+ search: "Cari",
422
+ loading: "Memuat…",
423
+ error: "Kesalahan",
424
+ dismiss: "Tutup",
425
+ emptyDocument: "(Dokumen Kosong)",
426
+ confirmDelete: "Apakah Anda yakin ingin menghapus dokumen ini?"
427
+ },
428
+ header: {
429
+ file: "Berkas",
430
+ new: "Baru",
431
+ newDocument: "Dokumen baru",
432
+ open: "Buka",
433
+ makeACopy: "Buat salinan",
434
+ share: "Bagikan",
435
+ email: "Email",
436
+ emailDraft: "Draf Email",
437
+ download: "Unduh",
438
+ rename: "Ubah nama",
439
+ move: "Pindah",
440
+ moveToFolder: "Pindah ke folder",
441
+ moveToTrash: "Pindah ke sampah",
442
+ versionHistory: "Riwayat versi",
443
+ language: "Bahasa",
444
+ pageSetup: "Penataan halaman",
445
+ print: "Cetak",
446
+ edit: "Sunting",
447
+ view: "Tampilan",
448
+ insert: "Sisipkan",
449
+ format: "Format",
450
+ tools: "Alat",
451
+ extensions: "Ekstensi",
452
+ help: "Bantuan",
453
+ backToDocuments: "Kembali ke Dokumen",
454
+ clickToRename: "Klik untuk mengganti nama",
455
+ starDocument: "Bintangi dokumen",
456
+ unstarDocument: "Hapus bintang",
457
+ sandbox: "Sandbox (alihkan kolaborator simulasi)",
458
+ theme: "Tema",
459
+ account: "Akun",
460
+ markdown: "Markdown (.md)",
461
+ html: "Halaman web (.html)",
462
+ htmlZip: "Halaman web (.html, ter-zip)",
463
+ text: "Teks biasa (.txt)",
464
+ docx: "Microsoft Word (.docx)",
465
+ pdf: "Dokumen PDF (.pdf)",
466
+ odt: "OpenDocument Format (.odt)",
467
+ rtf: "Rich Text Format (.rtf)",
468
+ undo: "Urungkan",
469
+ redo: "Ulangi",
470
+ selectAll: "Pilih semua",
471
+ showSidebar: "Tampilkan sidebar",
472
+ focusMode: "Mode Fokus Penuh",
473
+ showRuler: "Tampilkan penggaris",
474
+ meetingNotes: "Catatan Rapat",
475
+ image: "Gambar",
476
+ table: "Tabel",
477
+ codeBlock: "Kode Blok",
478
+ header: "Header",
479
+ footer: "Footer",
480
+ footnote: "Catatan Kaki",
481
+ bold: "Teks Tebal",
482
+ italic: "Teks Miring",
483
+ underline: "Garis Bawah",
484
+ heading1: "Judul 1",
485
+ heading2: "Judul 2",
486
+ heading3: "Judul 3",
487
+ spellCheck: "Periksa ejaan",
488
+ wordCount: "Hitungan kata",
489
+ preferences: "Preferensi",
490
+ manageExtensions: "Kelola ekstensi…",
491
+ keyboardShortcuts: "Pintasan keyboard",
492
+ reportIssue: "Laporkan masalah",
493
+ about: "Tentang DocsEditor"
494
+ },
495
+ toolbar: {
496
+ undo: "Urungkan",
497
+ redo: "Ulangi",
498
+ print: "Cetak",
499
+ spelling: "Ejaan",
500
+ zoom: "100%",
501
+ paragraphStyle: "Gaya paragraf",
502
+ normalText: "Teks normal",
503
+ fontFamily: "Keluarga font",
504
+ decreaseFontSize: "Kecilkan font",
505
+ increaseFontSize: "Perbesar font",
506
+ lists: "Daftar",
507
+ alignment: "Perataan",
508
+ insert: "Sisipkan",
509
+ comments: "Komentar",
510
+ history: "Riwayat",
511
+ ai: "AI",
512
+ tableOfContents: "Daftar isi"
513
+ },
514
+ statusBar: {
515
+ liveSyncActive: "Sinkron Langsung Aktif",
516
+ connecting: "Menghubungkan…",
517
+ saving: "Menyimpan perubahan…",
518
+ offline: "Luring",
519
+ lastSavedAt: "Terakhir disimpan",
520
+ never: "Tidak pernah",
521
+ pageSize: "Ukuran halaman",
522
+ page: "Halaman",
523
+ of: "dari",
524
+ words: "kata",
525
+ characters: "karakter"
526
+ },
527
+ editor: {
528
+ share: {
529
+ title: "Bagikan dokumen",
530
+ close: "Tutup",
531
+ shareableLink: "Tautan dapat dibagikan",
532
+ copy: "Salin",
533
+ copied: "Tautan disalin ke papan klip",
534
+ couldNotCopy: "Tidak dapat menyalin tautan",
535
+ collaborators: "Kolaborator",
536
+ addCollaborator: "Tambahkan kolaborator lewat email",
537
+ placeholder: "rekan@contoh.com",
538
+ add: "Tambah",
539
+ userNotFound: "Pengguna tidak ditemukan",
540
+ failedToAdd: "Gagal menambahkan kolaborator"
541
+ },
542
+ print: "Cetak",
543
+ logOut: "Keluar",
544
+ rename: {
545
+ title: "Ubah nama dokumen",
546
+ label: "Judul dokumen",
547
+ save: "Simpan",
548
+ cancel: "Batal"
549
+ },
550
+ pageSetup: {
551
+ title: "Penataan halaman",
552
+ paperSize: "Ukuran kertas",
553
+ orientation: "Orientasi",
554
+ portrait: "Potret",
555
+ landscape: "Lanskap",
556
+ margins: "Margin",
557
+ top: "Atas",
558
+ bottom: "Bawah",
559
+ left: "Kiri",
560
+ right: "Kanan",
561
+ apply: "Terapkan",
562
+ cancel: "Batal"
563
+ },
564
+ headerFooter: {
565
+ title: "Penyesuaian Header & Footer",
566
+ header: "Header",
567
+ footer: "Footer",
568
+ left: "Kiri",
569
+ right: "Kanan",
570
+ clear: "Kosongkan",
571
+ headerLeftPlaceholder: "mis. Judul Dokumen",
572
+ headerRightPlaceholder: "mis. Halaman {page}",
573
+ footerLeftPlaceholder: "mis. Rahasia",
574
+ footerRightPlaceholder: "mis. Halaman {page} dari {total}",
575
+ variableInfo: "Info Variabel: Anda dapat menggunakan {page} untuk nomor halaman aktif, dan {total} untuk jumlah halaman.",
576
+ cancel: "Batal",
577
+ save: "Simpan"
578
+ },
579
+ showOutline: "Tampilkan kerangka dokumen",
580
+ loadingDocument: "Memuat dokumen"
581
+ },
582
+ slashMenu: {
583
+ title: "Saran",
584
+ basicBlocks: "Blok Dasar",
585
+ noMatch: "Tidak ada perintah yang cocok"
586
+ },
587
+ quickActions: {
588
+ meetingNotes: "Catatan Rapat",
589
+ emailDraft: "Draf Email",
590
+ more: "Lainnya"
591
+ },
592
+ documentTabs: {
593
+ documentTabs: "Tab Dokumen",
594
+ addTab: "Tambah tab",
595
+ rename: "Ubah nama",
596
+ delete: "Hapus",
597
+ outline: "Kerangka",
598
+ untitledHeading: "Judul Tanpa Nama {level}",
599
+ placeholder: "Tajuk yang Anda tambahkan ke dokumen akan muncul di sini."
600
+ },
601
+ theme: {
602
+ lightMode: "Beralih ke mode terang",
603
+ darkMode: "Beralih ke mode gelap"
604
+ },
605
+ sidebars: {
606
+ ai: {
607
+ title: "AI Writing Helper",
608
+ description: "Penulis AI sisi-server untuk menyusun, merangkum, atau menyunting tulisan Anda.",
609
+ quickMacros: "Makro AI Cepat",
610
+ summarize: "Rangkum",
611
+ fixGrammar: "Perbaiki Tata Bahasa",
612
+ continue: "Lanjutkan",
613
+ toSpanish: "Ke Spanyol",
614
+ generations: "Hasil AI",
615
+ aiDrafting: "AI menyusun…",
616
+ copy: "Salin",
617
+ copied: "Tersalin",
618
+ insert: "Sisipkan",
619
+ inserted: "Tersisip",
620
+ noDraft: "Belum ada draf. Kirim perintah atau makro di atas untuk mulai.",
621
+ promptPlaceholder: "Minta AI membuat kerangka, menulis konten, menulis ulang nada…",
622
+ promptAI: "Perintah AI"
623
+ },
624
+ comments: {
625
+ title: "Panel Diskusi",
626
+ placeholder: "Pilih teks untuk menambahkan komentar…",
627
+ addComment: "Tambah komentar",
628
+ resolve: "Selesai",
629
+ reply: "Balas…",
630
+ replyInThread: "Balas di thread",
631
+ active: "Aktif",
632
+ resolved: "Selesai",
633
+ creatingAnchored: "Membuat komentar terpaut:",
634
+ quote: "Kutipan:",
635
+ resolvedBy: "Diselesaikan oleh {user}",
636
+ noComments: "Belum ada komentar {mode}.",
637
+ commentOnSelection: "Komentari pilihan…",
638
+ generalComment: "Tambahkan komentar umum ke dokumen…",
639
+ anchoredComment: "Komentar terpaut",
640
+ general: "Komentar umum",
641
+ post: "Kirim"
642
+ },
643
+ history: {
644
+ title: "Riwayat",
645
+ empty: "Belum ada riwayat.",
646
+ version: "Versi",
647
+ restore: "Pulihkan",
648
+ closePreview: "Tutup Pratinjau",
649
+ restoreThis: "Pulihkan Ini",
650
+ viewingPreview: "Melihat Pratinjau Revisi",
651
+ readOnlyPreview: "Anda sedang melihat pratinjau versi #{index}. Editor Anda untuk sementara hanya-baca.",
652
+ modifiedBy: "Diubah oleh:",
653
+ saveNamedSnapshot: "Simpan Snapshot Bernama",
654
+ snapshotPlaceholder: "mis. Final Draft Disetujui…",
655
+ noSnapshots: "Belum ada snapshot yang disimpan.",
656
+ save: "Simpan",
657
+ cancel: "Batal",
658
+ preview: "Pratinjau"
659
+ },
660
+ toc: {
661
+ title: "Daftar Isi",
662
+ empty: "Belum ada judul.",
663
+ untitledHeading: "Judul Tanpa Nama {level}",
664
+ newSection: "Bagian {tag} Baru",
665
+ startWriting: "Mulai menulis di sini…",
666
+ closeOutline: "Tutup kerangka",
667
+ searchHeadings: "Cari judul…",
668
+ noHeadings: "Belum Ada Judul",
669
+ noHeadingsDescription: "Gunakan header (H1, H2, atau H3) untuk menyusun dokumen. Kerangka interaktif akan dibuat otomatis di sini.",
670
+ quickInsert: "Sisipkan Cepat",
671
+ headingLevel: "Judul {level}",
672
+ noMatchingHeaders: "Tidak ada header yang cocok",
673
+ tryDifferentTerm: "Coba cari dengan istilah lain.",
674
+ outlineLayout: "Tata Letak Kerangka",
675
+ outlineSync: "Kerangka tersinkronisasi otomatis. Klik header apa pun untuk langsung melompat, fokus, dan menggulir editor ke bagian tersebut."
676
+ }
677
+ },
678
+ dashboard: {
679
+ allDocuments: "Semua Dokumen",
680
+ starred: "Berbintang",
681
+ folders: "Folder",
682
+ createFolder: "Buat Folder Baru",
683
+ folderNamePlaceholder: "Nama folder…",
684
+ noFolders: "Belum ada folder.",
685
+ startNewDocument: "Mulai Dokumen Baru",
686
+ blankDocument: "Dokumen Kosong",
687
+ blankDescription: "Kertas kosong",
688
+ meetingNotes: "Catatan Rapat",
689
+ meetingNotesDescription: "Peserta & Tindak Lanjut",
690
+ projectProposal: "Proposal Proyek",
691
+ projectProposalDescription: "Tujuan & Hasil",
692
+ officialLetter: "Surat Resmi",
693
+ officialLetterDescription: "Header yang sudah diformat",
694
+ searchPlaceholder: "Cari judul atau isi dokumen…",
695
+ modified: "Diubah",
696
+ alphabetical: "Abjad",
697
+ created: "Dibuat",
698
+ gridView: "Tampilan Grid",
699
+ listView: "Tampilan Daftar",
700
+ activeFilters: "Filter Aktif:",
701
+ folder: "Folder",
702
+ starredOnly: "Hanya Berbintang",
703
+ search: "Cari",
704
+ noDocuments: "Tidak ada dokumen",
705
+ noDocumentsDescription: "Tidak ada file yang cocok dengan filter. Pilih template atau buat dokumen kosong untuk mulai menulis!",
706
+ createBlankDocument: "Buat Dokumen Kosong",
707
+ loadingDocuments: "Memuat dokumen...",
708
+ documentTitle: "Judul Dokumen",
709
+ lastModified: "Terakhir Diubah",
710
+ actions: "Aksi"
711
+ },
712
+ auth: {
713
+ signInTitle: "Masuk untuk membuat dan menyunting dokumen",
714
+ signInWithGoogle: "Masuk dengan Google",
715
+ signInWithEmail: "Masuk dengan Email",
716
+ signInWithGitHub: "Masuk dengan GitHub",
717
+ signInWith: "Masuk dengan {provider}",
718
+ or: "atau",
719
+ email: "Email",
720
+ password: "Kata sandi",
721
+ name: "Nama",
722
+ signIn: "Masuk",
723
+ signUp: "Daftar",
724
+ signOut: "Keluar",
725
+ noAccount: "Belum punya akun? Daftar",
726
+ hasAccount: "Sudah punya akun? Masuk",
727
+ invalidCredentials: "Email atau kata sandi salah",
728
+ accountCreated: "Akun dibuat! Anda sekarang masuk.",
729
+ loadDocumentsError: "Gagal memuat dokumen. Apakah server berjalan?",
730
+ retry: "Coba lagi",
731
+ rateLimited: "Server sedang membatasi permintaan.",
732
+ retryIn: "Mencoba ulang dalam {seconds} detik…",
733
+ networkError: "Tidak bisa menghubungi server. Periksa koneksi Anda.",
734
+ noProviders: "Tidak ada penyedia autentikasi yang dikonfigurasi. Periksa variabel lingkungan server."
735
+ },
736
+ language: {
737
+ label: "Bahasa",
738
+ en: "English",
739
+ id: "Indonesia"
740
+ }
741
+ }, ct = {
742
+ en: Bt,
743
+ id: jt
744
+ }, Ft = "en", da = {
745
+ en: Bt.language.en,
746
+ id: jt.language.id
747
+ };
748
+ function ca(s) {
749
+ return ct[s] ?? ct[Ft];
750
+ }
751
+ function ut(s) {
752
+ return typeof s == "string" && s in ct;
753
+ }
754
+ const Et = Symbol("docflow-locale"), Rt = "docflow-locale";
755
+ function ua(s) {
756
+ if (s && ut(s)) return s;
757
+ try {
758
+ const p = localStorage.getItem(Rt);
759
+ if (p && ut(p)) return p;
760
+ } catch {
761
+ }
762
+ return Ft;
763
+ }
764
+ function pa(s, p) {
765
+ const o = p.split(".");
766
+ let a = s;
767
+ for (const c of o) {
768
+ if (a === null || typeof a != "object") return;
769
+ a = a[c];
770
+ }
771
+ return a;
772
+ }
773
+ function Nt(s) {
774
+ const p = w(ua(s));
775
+ return { locale: p, setLocale: (c) => {
776
+ if (ut(c)) {
777
+ p.value = c;
778
+ try {
779
+ localStorage.setItem(Rt, c);
780
+ } catch {
781
+ }
782
+ }
783
+ }, t: (c) => {
784
+ const f = ca(p.value), d = pa(f, c);
785
+ return typeof d == "string" ? d : c;
786
+ } };
787
+ }
788
+ function we() {
789
+ const s = oa(Et, null);
790
+ return s || Nt();
791
+ }
792
+ function ha(s) {
793
+ const p = Nt(s);
794
+ return na(Et, p), p;
795
+ }
796
+ function ba(s) {
797
+ return da[s] ?? s;
798
+ }
799
+ function ma() {
800
+ return ["en", "id"];
801
+ }
802
+ const ga = { class: "px-2 py-1.5 text-[10px] font-semibold uppercase text-slate-400" }, fa = ["onClick", "onMouseenter"], va = { class: "text-slate-500 dark:text-slate-400" }, xa = /* @__PURE__ */ le({
803
+ __name: "SlashMenu",
804
+ props: {
805
+ editor: {},
806
+ commands: {}
807
+ },
808
+ setup(s) {
809
+ const { t: p } = we(), o = s, a = w(!1), c = w(""), f = w(0), d = w({ top: 0, left: 0 }), k = w([]);
810
+ function u() {
811
+ if (!o.editor) return;
812
+ const { view: _ } = o.editor, { selection: h } = _.state, g = _.coordsAtPos(h.head), b = _.dom.getBoundingClientRect();
813
+ d.value = {
814
+ top: g.bottom - b.top + 4,
815
+ left: g.left - b.left
816
+ };
817
+ }
818
+ function S(_) {
819
+ var G, re, ge, fe;
820
+ if (!o.editor) return;
821
+ const { view: h } = o.editor, { selection: g } = h.state, b = g.head, M = h.state.doc.resolve(b), P = M.start(), j = M.parent.textContent.slice(0, M.parentOffset).lastIndexOf("/");
822
+ if (j >= 0) {
823
+ const be = P + j, E = h.state.tr.delete(be, b);
824
+ h.dispatch(E);
825
+ }
826
+ const O = o.editor;
827
+ if (typeof ((G = O.commands) == null ? void 0 : G[_.command]) == "function")
828
+ O.commands[_.command]();
829
+ else if (O.chain)
830
+ try {
831
+ (fe = (ge = (re = O.chain().focus())[_.command]) == null ? void 0 : ge.call(re)) == null || fe.run();
832
+ } catch {
833
+ }
834
+ a.value = !1, c.value = "";
835
+ }
836
+ function L() {
837
+ a.value = !1, c.value = "";
838
+ }
839
+ function D() {
840
+ if (!o.editor) return;
841
+ const { view: _ } = o.editor, { selection: h } = _.state, g = h.head, b = _.state.doc.resolve(g), M = b.parent.textContent.slice(0, b.parentOffset), P = M.lastIndexOf("/");
842
+ if (P >= 0) {
843
+ const B = M.slice(0, P), j = M.slice(P + 1);
844
+ if ((B === "" || B.endsWith(" ") || B === `
845
+ `) && !j.includes(" ")) {
846
+ c.value = j, a.value = !0, f.value = 0, u();
847
+ return;
848
+ }
849
+ }
850
+ a.value = !1;
851
+ }
852
+ ae(() => o.editor, (_) => {
853
+ _ && (_.on("update", D), _.on("selectionUpdate", () => {
854
+ a.value && u();
855
+ }));
856
+ }), ae([c, () => o.commands], () => {
857
+ const _ = c.value.toLowerCase();
858
+ k.value = _ ? o.commands.filter((h) => h.name.toLowerCase().includes(_)) : o.commands;
859
+ });
860
+ function I(_) {
861
+ if (a.value) {
862
+ if (_.key === "ArrowDown" && (_.preventDefault(), f.value = Math.min(f.value + 1, k.value.length - 1)), _.key === "ArrowUp" && (_.preventDefault(), f.value = Math.max(f.value - 1, 0)), _.key === "Enter") {
863
+ _.preventDefault();
864
+ const h = k.value[f.value];
865
+ h && S(h);
866
+ }
867
+ _.key === "Escape" && (_.preventDefault(), L());
868
+ }
869
+ }
870
+ return Oe(() => {
871
+ document.addEventListener("keydown", I);
872
+ }), Ae(() => {
873
+ document.removeEventListener("keydown", I);
874
+ }), (_, h) => (n(), he(sa, { to: "body" }, [
875
+ a.value && k.value.length > 0 ? (n(), r("div", {
876
+ key: 0,
877
+ class: "docs-slash-menu fixed z-[999] w-56 max-h-64 overflow-y-auto rounded-lg border border-slate-200 bg-white p-1 shadow-xl dark:border-slate-700 dark:bg-slate-800",
878
+ style: me({ top: d.value.top + "px", left: d.value.left + "px" })
879
+ }, [
880
+ e("div", ga, l(t(p)("slashMenu.basicBlocks")), 1),
881
+ (n(!0), r(q, null, K(k.value, (g, b) => (n(), r("button", {
882
+ key: g.command,
883
+ class: z(["flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors", b === f.value ? "bg-slate-100 dark:bg-slate-700" : "hover:bg-slate-50 dark:hover:bg-slate-700/50"]),
884
+ onClick: (M) => S(g),
885
+ onMouseenter: (M) => f.value = b
886
+ }, [
887
+ e("span", va, l(g.name), 1)
888
+ ], 42, fa))), 128))
889
+ ], 4)) : H("", !0)
890
+ ]));
891
+ }
892
+ });
893
+ /**
894
+ * @license lucide-vue-next v1.0.0 - ISC
895
+ *
896
+ * This source code is licensed under the ISC license.
897
+ * See the LICENSE file in the root directory of this source tree.
898
+ */
899
+ const ka = (s) => {
900
+ for (const p in s)
901
+ if (p.startsWith("aria-") || p === "role" || p === "title")
902
+ return !0;
903
+ return !1;
904
+ };
905
+ /**
906
+ * @license lucide-vue-next v1.0.0 - ISC
907
+ *
908
+ * This source code is licensed under the ISC license.
909
+ * See the LICENSE file in the root directory of this source tree.
910
+ */
911
+ const _t = (s) => s === "";
912
+ /**
913
+ * @license lucide-vue-next v1.0.0 - ISC
914
+ *
915
+ * This source code is licensed under the ISC license.
916
+ * See the LICENSE file in the root directory of this source tree.
917
+ */
918
+ const ya = (...s) => s.filter((p, o, a) => !!p && p.trim() !== "" && a.indexOf(p) === o).join(" ").trim();
919
+ /**
920
+ * @license lucide-vue-next v1.0.0 - ISC
921
+ *
922
+ * This source code is licensed under the ISC license.
923
+ * See the LICENSE file in the root directory of this source tree.
924
+ */
925
+ const $t = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
926
+ /**
927
+ * @license lucide-vue-next v1.0.0 - ISC
928
+ *
929
+ * This source code is licensed under the ISC license.
930
+ * See the LICENSE file in the root directory of this source tree.
931
+ */
932
+ const wa = (s) => s.replace(
933
+ /^([A-Z])|[\s-_]+(\w)/g,
934
+ (p, o, a) => a ? a.toUpperCase() : o.toLowerCase()
935
+ );
936
+ /**
937
+ * @license lucide-vue-next v1.0.0 - ISC
938
+ *
939
+ * This source code is licensed under the ISC license.
940
+ * See the LICENSE file in the root directory of this source tree.
941
+ */
942
+ const _a = (s) => {
943
+ const p = wa(s);
944
+ return p.charAt(0).toUpperCase() + p.slice(1);
945
+ };
946
+ /**
947
+ * @license lucide-vue-next v1.0.0 - ISC
948
+ *
949
+ * This source code is licensed under the ISC license.
950
+ * See the LICENSE file in the root directory of this source tree.
951
+ */
952
+ var Ze = {
953
+ xmlns: "http://www.w3.org/2000/svg",
954
+ width: 24,
955
+ height: 24,
956
+ viewBox: "0 0 24 24",
957
+ fill: "none",
958
+ stroke: "currentColor",
959
+ "stroke-width": 2,
960
+ "stroke-linecap": "round",
961
+ "stroke-linejoin": "round"
962
+ };
963
+ /**
964
+ * @license lucide-vue-next v1.0.0 - ISC
965
+ *
966
+ * This source code is licensed under the ISC license.
967
+ * See the LICENSE file in the root directory of this source tree.
968
+ */
969
+ const $a = ({
970
+ name: s,
971
+ iconNode: p,
972
+ absoluteStrokeWidth: o,
973
+ "absolute-stroke-width": a,
974
+ strokeWidth: c,
975
+ "stroke-width": f,
976
+ size: d = Ze.width,
977
+ color: k = Ze.stroke,
978
+ ...u
979
+ }, { slots: S }) => dt(
980
+ "svg",
981
+ {
982
+ ...Ze,
983
+ ...u,
984
+ width: d,
985
+ height: d,
986
+ stroke: k,
987
+ "stroke-width": _t(o) || _t(a) || o === !0 || a === !0 ? Number(c || f || Ze["stroke-width"]) * 24 / Number(d) : c || f || Ze["stroke-width"],
988
+ class: ya(
989
+ "lucide",
990
+ u.class,
991
+ ...s ? [`lucide-${$t(_a(s))}-icon`, `lucide-${$t(s)}`] : ["lucide-icon"]
992
+ ),
993
+ ...!S.default && !ka(u) && { "aria-hidden": "true" }
994
+ },
995
+ [...p.map((L) => dt(...L)), ...S.default ? [S.default()] : []]
996
+ );
997
+ /**
998
+ * @license lucide-vue-next v1.0.0 - ISC
999
+ *
1000
+ * This source code is licensed under the ISC license.
1001
+ * See the LICENSE file in the root directory of this source tree.
1002
+ */
1003
+ const T = (s, p) => (o, { slots: a, attrs: c }) => dt(
1004
+ $a,
1005
+ {
1006
+ ...c,
1007
+ ...o,
1008
+ iconNode: p,
1009
+ name: s
1010
+ },
1011
+ a
1012
+ );
1013
+ /**
1014
+ * @license lucide-vue-next v1.0.0 - ISC
1015
+ *
1016
+ * This source code is licensed under the ISC license.
1017
+ * See the LICENSE file in the root directory of this source tree.
1018
+ */
1019
+ const Sa = T("arrow-down-to-line", [
1020
+ ["path", { d: "M12 17V3", key: "1cwfxf" }],
1021
+ ["path", { d: "m6 11 6 6 6-6", key: "12ii2o" }],
1022
+ ["path", { d: "M19 21H5", key: "150jfl" }]
1023
+ ]);
1024
+ /**
1025
+ * @license lucide-vue-next v1.0.0 - ISC
1026
+ *
1027
+ * This source code is licensed under the ISC license.
1028
+ * See the LICENSE file in the root directory of this source tree.
1029
+ */
1030
+ const Ca = T("arrow-left", [
1031
+ ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1032
+ ["path", { d: "M19 12H5", key: "x3x0zl" }]
1033
+ ]);
1034
+ /**
1035
+ * @license lucide-vue-next v1.0.0 - ISC
1036
+ *
1037
+ * This source code is licensed under the ISC license.
1038
+ * See the LICENSE file in the root directory of this source tree.
1039
+ */
1040
+ const Ma = T("badge-check", [
1041
+ [
1042
+ "path",
1043
+ {
1044
+ d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
1045
+ key: "3c2336"
1046
+ }
1047
+ ],
1048
+ ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1049
+ ]);
1050
+ /**
1051
+ * @license lucide-vue-next v1.0.0 - ISC
1052
+ *
1053
+ * This source code is licensed under the ISC license.
1054
+ * See the LICENSE file in the root directory of this source tree.
1055
+ */
1056
+ const Ot = T("bold", [
1057
+ [
1058
+ "path",
1059
+ { 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", key: "mg9rjx" }
1060
+ ]
1061
+ ]);
1062
+ /**
1063
+ * @license lucide-vue-next v1.0.0 - ISC
1064
+ *
1065
+ * This source code is licensed under the ISC license.
1066
+ * See the LICENSE file in the root directory of this source tree.
1067
+ */
1068
+ const Ta = T("calendar", [
1069
+ ["path", { d: "M8 2v4", key: "1cmpym" }],
1070
+ ["path", { d: "M16 2v4", key: "4m81vk" }],
1071
+ ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
1072
+ ["path", { d: "M3 10h18", key: "8toen8" }]
1073
+ ]);
1074
+ /**
1075
+ * @license lucide-vue-next v1.0.0 - ISC
1076
+ *
1077
+ * This source code is licensed under the ISC license.
1078
+ * See the LICENSE file in the root directory of this source tree.
1079
+ */
1080
+ const St = T("check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
1081
+ /**
1082
+ * @license lucide-vue-next v1.0.0 - ISC
1083
+ *
1084
+ * This source code is licensed under the ISC license.
1085
+ * See the LICENSE file in the root directory of this source tree.
1086
+ */
1087
+ const Le = T("chevron-down", [
1088
+ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
1089
+ ]);
1090
+ /**
1091
+ * @license lucide-vue-next v1.0.0 - ISC
1092
+ *
1093
+ * This source code is licensed under the ISC license.
1094
+ * See the LICENSE file in the root directory of this source tree.
1095
+ */
1096
+ const Aa = T("chevron-right", [
1097
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
1098
+ ]);
1099
+ /**
1100
+ * @license lucide-vue-next v1.0.0 - ISC
1101
+ *
1102
+ * This source code is licensed under the ISC license.
1103
+ * See the LICENSE file in the root directory of this source tree.
1104
+ */
1105
+ const Pa = T("circle-check-big", [
1106
+ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
1107
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
1108
+ ]);
1109
+ /**
1110
+ * @license lucide-vue-next v1.0.0 - ISC
1111
+ *
1112
+ * This source code is licensed under the ISC license.
1113
+ * See the LICENSE file in the root directory of this source tree.
1114
+ */
1115
+ const Ia = T("code", [
1116
+ ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
1117
+ ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
1118
+ ]);
1119
+ /**
1120
+ * @license lucide-vue-next v1.0.0 - ISC
1121
+ *
1122
+ * This source code is licensed under the ISC license.
1123
+ * See the LICENSE file in the root directory of this source tree.
1124
+ */
1125
+ const Da = T("copy", [
1126
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1127
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1128
+ ]);
1129
+ /**
1130
+ * @license lucide-vue-next v1.0.0 - ISC
1131
+ *
1132
+ * This source code is licensed under the ISC license.
1133
+ * See the LICENSE file in the root directory of this source tree.
1134
+ */
1135
+ const Vt = T("ellipsis-vertical", [
1136
+ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
1137
+ ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
1138
+ ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
1139
+ ]);
1140
+ /**
1141
+ * @license lucide-vue-next v1.0.0 - ISC
1142
+ *
1143
+ * This source code is licensed under the ISC license.
1144
+ * See the LICENSE file in the root directory of this source tree.
1145
+ */
1146
+ const La = T("ellipsis", [
1147
+ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
1148
+ ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
1149
+ ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
1150
+ ]);
1151
+ /**
1152
+ * @license lucide-vue-next v1.0.0 - ISC
1153
+ *
1154
+ * This source code is licensed under the ISC license.
1155
+ * See the LICENSE file in the root directory of this source tree.
1156
+ */
1157
+ const Ha = T("eye", [
1158
+ [
1159
+ "path",
1160
+ {
1161
+ d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
1162
+ key: "1nclc0"
1163
+ }
1164
+ ],
1165
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
1166
+ ]);
1167
+ /**
1168
+ * @license lucide-vue-next v1.0.0 - ISC
1169
+ *
1170
+ * This source code is licensed under the ISC license.
1171
+ * See the LICENSE file in the root directory of this source tree.
1172
+ */
1173
+ const Ne = T("file-text", [
1174
+ [
1175
+ "path",
1176
+ {
1177
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
1178
+ key: "1oefj6"
1179
+ }
1180
+ ],
1181
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
1182
+ ["path", { d: "M10 9H8", key: "b1mrlr" }],
1183
+ ["path", { d: "M16 13H8", key: "t4e002" }],
1184
+ ["path", { d: "M16 17H8", key: "z1uh3a" }]
1185
+ ]);
1186
+ /**
1187
+ * @license lucide-vue-next v1.0.0 - ISC
1188
+ *
1189
+ * This source code is licensed under the ISC license.
1190
+ * See the LICENSE file in the root directory of this source tree.
1191
+ */
1192
+ const za = T("globe", [
1193
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1194
+ ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
1195
+ ["path", { d: "M2 12h20", key: "9i4pu4" }]
1196
+ ]);
1197
+ /**
1198
+ * @license lucide-vue-next v1.0.0 - ISC
1199
+ *
1200
+ * This source code is licensed under the ISC license.
1201
+ * See the LICENSE file in the root directory of this source tree.
1202
+ */
1203
+ const Ba = T("hash", [
1204
+ ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
1205
+ ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
1206
+ ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
1207
+ ["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
1208
+ ]);
1209
+ /**
1210
+ * @license lucide-vue-next v1.0.0 - ISC
1211
+ *
1212
+ * This source code is licensed under the ISC license.
1213
+ * See the LICENSE file in the root directory of this source tree.
1214
+ */
1215
+ const ja = T("heading-1", [
1216
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
1217
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
1218
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
1219
+ ["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
1220
+ ]);
1221
+ /**
1222
+ * @license lucide-vue-next v1.0.0 - ISC
1223
+ *
1224
+ * This source code is licensed under the ISC license.
1225
+ * See the LICENSE file in the root directory of this source tree.
1226
+ */
1227
+ const Fa = T("heading-2", [
1228
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
1229
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
1230
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
1231
+ ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
1232
+ ]);
1233
+ /**
1234
+ * @license lucide-vue-next v1.0.0 - ISC
1235
+ *
1236
+ * This source code is licensed under the ISC license.
1237
+ * See the LICENSE file in the root directory of this source tree.
1238
+ */
1239
+ const Ea = T("heading-3", [
1240
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
1241
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
1242
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
1243
+ ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
1244
+ ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
1245
+ ]);
1246
+ /**
1247
+ * @license lucide-vue-next v1.0.0 - ISC
1248
+ *
1249
+ * This source code is licensed under the ISC license.
1250
+ * See the LICENSE file in the root directory of this source tree.
1251
+ */
1252
+ const Ra = T("heading-4", [
1253
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
1254
+ ["path", { d: "M17 10v3a1 1 0 0 0 1 1h3", key: "tj5zdr" }],
1255
+ ["path", { d: "M21 10v8", key: "1kdml4" }],
1256
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
1257
+ ["path", { d: "M4 18V6", key: "1rz3zl" }]
1258
+ ]);
1259
+ /**
1260
+ * @license lucide-vue-next v1.0.0 - ISC
1261
+ *
1262
+ * This source code is licensed under the ISC license.
1263
+ * See the LICENSE file in the root directory of this source tree.
1264
+ */
1265
+ const Na = T("heading-5", [
1266
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
1267
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
1268
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
1269
+ ["path", { d: "M17 13v-3h4", key: "1nvgqp" }],
1270
+ [
1271
+ "path",
1272
+ { d: "M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17", key: "2nebdn" }
1273
+ ]
1274
+ ]);
1275
+ /**
1276
+ * @license lucide-vue-next v1.0.0 - ISC
1277
+ *
1278
+ * This source code is licensed under the ISC license.
1279
+ * See the LICENSE file in the root directory of this source tree.
1280
+ */
1281
+ const Oa = T("heading-6", [
1282
+ ["path", { d: "M4 12h8", key: "17cfdx" }],
1283
+ ["path", { d: "M4 18V6", key: "1rz3zl" }],
1284
+ ["path", { d: "M12 18V6", key: "zqpxq5" }],
1285
+ ["circle", { cx: "19", cy: "16", r: "2", key: "15mx69" }],
1286
+ ["path", { d: "M20 10c-2 2-3 3.5-3 6", key: "f35dl0" }]
1287
+ ]);
1288
+ /**
1289
+ * @license lucide-vue-next v1.0.0 - ISC
1290
+ *
1291
+ * This source code is licensed under the ISC license.
1292
+ * See the LICENSE file in the root directory of this source tree.
1293
+ */
1294
+ const qt = T("history", [
1295
+ ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
1296
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
1297
+ ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
1298
+ ]);
1299
+ /**
1300
+ * @license lucide-vue-next v1.0.0 - ISC
1301
+ *
1302
+ * This source code is licensed under the ISC license.
1303
+ * See the LICENSE file in the root directory of this source tree.
1304
+ */
1305
+ const Va = T("image", [
1306
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
1307
+ ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
1308
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
1309
+ ]);
1310
+ /**
1311
+ * @license lucide-vue-next v1.0.0 - ISC
1312
+ *
1313
+ * This source code is licensed under the ISC license.
1314
+ * See the LICENSE file in the root directory of this source tree.
1315
+ */
1316
+ const Ut = T("italic", [
1317
+ ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
1318
+ ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
1319
+ ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
1320
+ ]);
1321
+ /**
1322
+ * @license lucide-vue-next v1.0.0 - ISC
1323
+ *
1324
+ * This source code is licensed under the ISC license.
1325
+ * See the LICENSE file in the root directory of this source tree.
1326
+ */
1327
+ const Kt = T("link", [
1328
+ ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
1329
+ ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
1330
+ ]);
1331
+ /**
1332
+ * @license lucide-vue-next v1.0.0 - ISC
1333
+ *
1334
+ * This source code is licensed under the ISC license.
1335
+ * See the LICENSE file in the root directory of this source tree.
1336
+ */
1337
+ const qa = T("list-ordered", [
1338
+ ["path", { d: "M11 5h10", key: "1cz7ny" }],
1339
+ ["path", { d: "M11 12h10", key: "1438ji" }],
1340
+ ["path", { d: "M11 19h10", key: "11t30w" }],
1341
+ ["path", { d: "M4 4h1v5", key: "10yrso" }],
1342
+ ["path", { d: "M4 9h2", key: "r1h2o0" }],
1343
+ ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
1344
+ ]);
1345
+ /**
1346
+ * @license lucide-vue-next v1.0.0 - ISC
1347
+ *
1348
+ * This source code is licensed under the ISC license.
1349
+ * See the LICENSE file in the root directory of this source tree.
1350
+ */
1351
+ const nt = T("list", [
1352
+ ["path", { d: "M3 5h.01", key: "18ugdj" }],
1353
+ ["path", { d: "M3 12h.01", key: "nlz23k" }],
1354
+ ["path", { d: "M3 19h.01", key: "noohij" }],
1355
+ ["path", { d: "M8 5h13", key: "1pao27" }],
1356
+ ["path", { d: "M8 12h13", key: "1za7za" }],
1357
+ ["path", { d: "M8 19h13", key: "m83p4d" }]
1358
+ ]);
1359
+ /**
1360
+ * @license lucide-vue-next v1.0.0 - ISC
1361
+ *
1362
+ * This source code is licensed under the ISC license.
1363
+ * See the LICENSE file in the root directory of this source tree.
1364
+ */
1365
+ const Ua = T("mail", [
1366
+ ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
1367
+ ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
1368
+ ]);
1369
+ /**
1370
+ * @license lucide-vue-next v1.0.0 - ISC
1371
+ *
1372
+ * This source code is licensed under the ISC license.
1373
+ * See the LICENSE file in the root directory of this source tree.
1374
+ */
1375
+ const Ka = T("menu", [
1376
+ ["path", { d: "M4 5h16", key: "1tepv9" }],
1377
+ ["path", { d: "M4 12h16", key: "1lakjw" }],
1378
+ ["path", { d: "M4 19h16", key: "1djgab" }]
1379
+ ]);
1380
+ /**
1381
+ * @license lucide-vue-next v1.0.0 - ISC
1382
+ *
1383
+ * This source code is licensed under the ISC license.
1384
+ * See the LICENSE file in the root directory of this source tree.
1385
+ */
1386
+ const Wa = T("message-circle", [
1387
+ [
1388
+ "path",
1389
+ {
1390
+ d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
1391
+ key: "1sd12s"
1392
+ }
1393
+ ]
1394
+ ]);
1395
+ /**
1396
+ * @license lucide-vue-next v1.0.0 - ISC
1397
+ *
1398
+ * This source code is licensed under the ISC license.
1399
+ * See the LICENSE file in the root directory of this source tree.
1400
+ */
1401
+ const Wt = T("message-square", [
1402
+ [
1403
+ "path",
1404
+ {
1405
+ d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
1406
+ key: "18887p"
1407
+ }
1408
+ ]
1409
+ ]);
1410
+ /**
1411
+ * @license lucide-vue-next v1.0.0 - ISC
1412
+ *
1413
+ * This source code is licensed under the ISC license.
1414
+ * See the LICENSE file in the root directory of this source tree.
1415
+ */
1416
+ const Ga = T("minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
1417
+ /**
1418
+ * @license lucide-vue-next v1.0.0 - ISC
1419
+ *
1420
+ * This source code is licensed under the ISC license.
1421
+ * See the LICENSE file in the root directory of this source tree.
1422
+ */
1423
+ const Ja = T("moon", [
1424
+ [
1425
+ "path",
1426
+ {
1427
+ d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
1428
+ key: "kfwtm"
1429
+ }
1430
+ ]
1431
+ ]);
1432
+ /**
1433
+ * @license lucide-vue-next v1.0.0 - ISC
1434
+ *
1435
+ * This source code is licensed under the ISC license.
1436
+ * See the LICENSE file in the root directory of this source tree.
1437
+ */
1438
+ const Za = T("navigation-2", [
1439
+ ["polygon", { points: "12 2 19 21 12 17 5 21 12 2", key: "x8c0qg" }]
1440
+ ]);
1441
+ /**
1442
+ * @license lucide-vue-next v1.0.0 - ISC
1443
+ *
1444
+ * This source code is licensed under the ISC license.
1445
+ * See the LICENSE file in the root directory of this source tree.
1446
+ */
1447
+ const st = T("plus", [
1448
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
1449
+ ["path", { d: "M12 5v14", key: "s699le" }]
1450
+ ]);
1451
+ /**
1452
+ * @license lucide-vue-next v1.0.0 - ISC
1453
+ *
1454
+ * This source code is licensed under the ISC license.
1455
+ * See the LICENSE file in the root directory of this source tree.
1456
+ */
1457
+ const Ya = T("printer", [
1458
+ [
1459
+ "path",
1460
+ {
1461
+ d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",
1462
+ key: "143wyd"
1463
+ }
1464
+ ],
1465
+ ["path", { d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6", key: "1itne7" }],
1466
+ ["rect", { x: "6", y: "14", width: "12", height: "8", rx: "1", key: "1ue0tg" }]
1467
+ ]);
1468
+ /**
1469
+ * @license lucide-vue-next v1.0.0 - ISC
1470
+ *
1471
+ * This source code is licensed under the ISC license.
1472
+ * See the LICENSE file in the root directory of this source tree.
1473
+ */
1474
+ const Qa = T("quote", [
1475
+ [
1476
+ "path",
1477
+ {
1478
+ d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",
1479
+ key: "rib7q0"
1480
+ }
1481
+ ],
1482
+ [
1483
+ "path",
1484
+ {
1485
+ d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",
1486
+ key: "1ymkrd"
1487
+ }
1488
+ ]
1489
+ ]);
1490
+ /**
1491
+ * @license lucide-vue-next v1.0.0 - ISC
1492
+ *
1493
+ * This source code is licensed under the ISC license.
1494
+ * See the LICENSE file in the root directory of this source tree.
1495
+ */
1496
+ const Xa = T("redo-2", [
1497
+ ["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
1498
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
1499
+ ]);
1500
+ /**
1501
+ * @license lucide-vue-next v1.0.0 - ISC
1502
+ *
1503
+ * This source code is licensed under the ISC license.
1504
+ * See the LICENSE file in the root directory of this source tree.
1505
+ */
1506
+ const eo = T("refresh-cw", [
1507
+ ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1508
+ ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
1509
+ ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
1510
+ ["path", { d: "M8 16H3v5", key: "1cv678" }]
1511
+ ]);
1512
+ /**
1513
+ * @license lucide-vue-next v1.0.0 - ISC
1514
+ *
1515
+ * This source code is licensed under the ISC license.
1516
+ * See the LICENSE file in the root directory of this source tree.
1517
+ */
1518
+ const to = T("reply", [
1519
+ ["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }],
1520
+ ["path", { d: "m9 17-5-5 5-5", key: "nvlc11" }]
1521
+ ]);
1522
+ /**
1523
+ * @license lucide-vue-next v1.0.0 - ISC
1524
+ *
1525
+ * This source code is licensed under the ISC license.
1526
+ * See the LICENSE file in the root directory of this source tree.
1527
+ */
1528
+ const Ct = T("rotate-ccw", [
1529
+ ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
1530
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
1531
+ ]);
1532
+ /**
1533
+ * @license lucide-vue-next v1.0.0 - ISC
1534
+ *
1535
+ * This source code is licensed under the ISC license.
1536
+ * See the LICENSE file in the root directory of this source tree.
1537
+ */
1538
+ const ao = T("save", [
1539
+ [
1540
+ "path",
1541
+ {
1542
+ d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
1543
+ key: "1c8476"
1544
+ }
1545
+ ],
1546
+ ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
1547
+ ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
1548
+ ]);
1549
+ /**
1550
+ * @license lucide-vue-next v1.0.0 - ISC
1551
+ *
1552
+ * This source code is licensed under the ISC license.
1553
+ * See the LICENSE file in the root directory of this source tree.
1554
+ */
1555
+ const Mt = T("search", [
1556
+ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
1557
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
1558
+ ]);
1559
+ /**
1560
+ * @license lucide-vue-next v1.0.0 - ISC
1561
+ *
1562
+ * This source code is licensed under the ISC license.
1563
+ * See the LICENSE file in the root directory of this source tree.
1564
+ */
1565
+ const pt = T("send", [
1566
+ [
1567
+ "path",
1568
+ {
1569
+ d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
1570
+ key: "1ffxy3"
1571
+ }
1572
+ ],
1573
+ ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
1574
+ ]);
1575
+ /**
1576
+ * @license lucide-vue-next v1.0.0 - ISC
1577
+ *
1578
+ * This source code is licensed under the ISC license.
1579
+ * See the LICENSE file in the root directory of this source tree.
1580
+ */
1581
+ const oo = T("share-2", [
1582
+ ["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }],
1583
+ ["circle", { cx: "6", cy: "12", r: "3", key: "w7nqdw" }],
1584
+ ["circle", { cx: "18", cy: "19", r: "3", key: "1xt0gg" }],
1585
+ ["line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49", key: "47mynk" }],
1586
+ ["line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49", key: "1n3mei" }]
1587
+ ]);
1588
+ /**
1589
+ * @license lucide-vue-next v1.0.0 - ISC
1590
+ *
1591
+ * This source code is licensed under the ISC license.
1592
+ * See the LICENSE file in the root directory of this source tree.
1593
+ */
1594
+ const no = T("shield-alert", [
1595
+ [
1596
+ "path",
1597
+ {
1598
+ 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",
1599
+ key: "oel41y"
1600
+ }
1601
+ ],
1602
+ ["path", { d: "M12 8v4", key: "1got3b" }],
1603
+ ["path", { d: "M12 16h.01", key: "1drbdi" }]
1604
+ ]);
1605
+ /**
1606
+ * @license lucide-vue-next v1.0.0 - ISC
1607
+ *
1608
+ * This source code is licensed under the ISC license.
1609
+ * See the LICENSE file in the root directory of this source tree.
1610
+ */
1611
+ const ht = T("sparkles", [
1612
+ [
1613
+ "path",
1614
+ {
1615
+ d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
1616
+ key: "1s2grr"
1617
+ }
1618
+ ],
1619
+ ["path", { d: "M20 2v4", key: "1rf3ol" }],
1620
+ ["path", { d: "M22 4h-4", key: "gwowj6" }],
1621
+ ["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
1622
+ ]);
1623
+ /**
1624
+ * @license lucide-vue-next v1.0.0 - ISC
1625
+ *
1626
+ * This source code is licensed under the ISC license.
1627
+ * See the LICENSE file in the root directory of this source tree.
1628
+ */
1629
+ const so = T("spell-check", [
1630
+ ["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
1631
+ ["path", { d: "M8 12h8", key: "1wcyev" }],
1632
+ ["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
1633
+ ]);
1634
+ /**
1635
+ * @license lucide-vue-next v1.0.0 - ISC
1636
+ *
1637
+ * This source code is licensed under the ISC license.
1638
+ * See the LICENSE file in the root directory of this source tree.
1639
+ */
1640
+ const lo = T("square-check-big", [
1641
+ [
1642
+ "path",
1643
+ { d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
1644
+ ],
1645
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
1646
+ ]);
1647
+ /**
1648
+ * @license lucide-vue-next v1.0.0 - ISC
1649
+ *
1650
+ * This source code is licensed under the ISC license.
1651
+ * See the LICENSE file in the root directory of this source tree.
1652
+ */
1653
+ const ro = T("star", [
1654
+ [
1655
+ "path",
1656
+ {
1657
+ d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
1658
+ key: "r04s7s"
1659
+ }
1660
+ ]
1661
+ ]);
1662
+ /**
1663
+ * @license lucide-vue-next v1.0.0 - ISC
1664
+ *
1665
+ * This source code is licensed under the ISC license.
1666
+ * See the LICENSE file in the root directory of this source tree.
1667
+ */
1668
+ const io = T("strikethrough", [
1669
+ ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
1670
+ ["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
1671
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
1672
+ ]);
1673
+ /**
1674
+ * @license lucide-vue-next v1.0.0 - ISC
1675
+ *
1676
+ * This source code is licensed under the ISC license.
1677
+ * See the LICENSE file in the root directory of this source tree.
1678
+ */
1679
+ const co = T("sun", [
1680
+ ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
1681
+ ["path", { d: "M12 2v2", key: "tus03m" }],
1682
+ ["path", { d: "M12 20v2", key: "1lh1kg" }],
1683
+ ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
1684
+ ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
1685
+ ["path", { d: "M2 12h2", key: "1t8f8n" }],
1686
+ ["path", { d: "M20 12h2", key: "1q8mjw" }],
1687
+ ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
1688
+ ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
1689
+ ]);
1690
+ /**
1691
+ * @license lucide-vue-next v1.0.0 - ISC
1692
+ *
1693
+ * This source code is licensed under the ISC license.
1694
+ * See the LICENSE file in the root directory of this source tree.
1695
+ */
1696
+ const uo = T("table", [
1697
+ ["path", { d: "M12 3v18", key: "108xh3" }],
1698
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
1699
+ ["path", { d: "M3 9h18", key: "1pudct" }],
1700
+ ["path", { d: "M3 15h18", key: "5xshup" }]
1701
+ ]);
1702
+ /**
1703
+ * @license lucide-vue-next v1.0.0 - ISC
1704
+ *
1705
+ * This source code is licensed under the ISC license.
1706
+ * See the LICENSE file in the root directory of this source tree.
1707
+ */
1708
+ const Tt = T("text-align-center", [
1709
+ ["path", { d: "M21 5H3", key: "1fi0y6" }],
1710
+ ["path", { d: "M17 12H7", key: "16if0g" }],
1711
+ ["path", { d: "M19 19H5", key: "vjpgq2" }]
1712
+ ]);
1713
+ /**
1714
+ * @license lucide-vue-next v1.0.0 - ISC
1715
+ *
1716
+ * This source code is licensed under the ISC license.
1717
+ * See the LICENSE file in the root directory of this source tree.
1718
+ */
1719
+ const At = T("text-align-end", [
1720
+ ["path", { d: "M21 5H3", key: "1fi0y6" }],
1721
+ ["path", { d: "M21 12H9", key: "dn1m92" }],
1722
+ ["path", { d: "M21 19H7", key: "4cu937" }]
1723
+ ]);
1724
+ /**
1725
+ * @license lucide-vue-next v1.0.0 - ISC
1726
+ *
1727
+ * This source code is licensed under the ISC license.
1728
+ * See the LICENSE file in the root directory of this source tree.
1729
+ */
1730
+ const Pt = T("text-align-justify", [
1731
+ ["path", { d: "M3 5h18", key: "1u36vt" }],
1732
+ ["path", { d: "M3 12h18", key: "1i2n21" }],
1733
+ ["path", { d: "M3 19h18", key: "awlh7x" }]
1734
+ ]);
1735
+ /**
1736
+ * @license lucide-vue-next v1.0.0 - ISC
1737
+ *
1738
+ * This source code is licensed under the ISC license.
1739
+ * See the LICENSE file in the root directory of this source tree.
1740
+ */
1741
+ const bt = T("text-align-start", [
1742
+ ["path", { d: "M21 5H3", key: "1fi0y6" }],
1743
+ ["path", { d: "M15 12H3", key: "6jk70r" }],
1744
+ ["path", { d: "M17 19H3", key: "z6ezky" }]
1745
+ ]);
1746
+ /**
1747
+ * @license lucide-vue-next v1.0.0 - ISC
1748
+ *
1749
+ * This source code is licensed under the ISC license.
1750
+ * See the LICENSE file in the root directory of this source tree.
1751
+ */
1752
+ const Gt = T("underline", [
1753
+ ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
1754
+ ["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
1755
+ ]);
1756
+ /**
1757
+ * @license lucide-vue-next v1.0.0 - ISC
1758
+ *
1759
+ * This source code is licensed under the ISC license.
1760
+ * See the LICENSE file in the root directory of this source tree.
1761
+ */
1762
+ const po = T("undo-2", [
1763
+ ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
1764
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
1765
+ ]);
1766
+ /**
1767
+ * @license lucide-vue-next v1.0.0 - ISC
1768
+ *
1769
+ * This source code is licensed under the ISC license.
1770
+ * See the LICENSE file in the root directory of this source tree.
1771
+ */
1772
+ const ho = T("user", [
1773
+ ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
1774
+ ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
1775
+ ]);
1776
+ /**
1777
+ * @license lucide-vue-next v1.0.0 - ISC
1778
+ *
1779
+ * This source code is licensed under the ISC license.
1780
+ * See the LICENSE file in the root directory of this source tree.
1781
+ */
1782
+ const It = T("users", [
1783
+ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
1784
+ ["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
1785
+ ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
1786
+ ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
1787
+ ]);
1788
+ /**
1789
+ * @license lucide-vue-next v1.0.0 - ISC
1790
+ *
1791
+ * This source code is licensed under the ISC license.
1792
+ * See the LICENSE file in the root directory of this source tree.
1793
+ */
1794
+ const bo = T("wand-sparkles", [
1795
+ [
1796
+ "path",
1797
+ {
1798
+ d: "m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",
1799
+ key: "ul74o6"
1800
+ }
1801
+ ],
1802
+ ["path", { d: "m14 7 3 3", key: "1r5n42" }],
1803
+ ["path", { d: "M5 6v4", key: "ilb8ba" }],
1804
+ ["path", { d: "M19 14v4", key: "blhpug" }],
1805
+ ["path", { d: "M10 2v2", key: "7u0qdc" }],
1806
+ ["path", { d: "M7 8H3", key: "zfb6yr" }],
1807
+ ["path", { d: "M21 16h-4", key: "1cnmox" }],
1808
+ ["path", { d: "M11 3H9", key: "1obp7u" }]
1809
+ ]);
1810
+ /**
1811
+ * @license lucide-vue-next v1.0.0 - ISC
1812
+ *
1813
+ * This source code is licensed under the ISC license.
1814
+ * See the LICENSE file in the root directory of this source tree.
1815
+ */
1816
+ const Dt = T("x", [
1817
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1818
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1819
+ ]), mo = ["title"], Lt = /* @__PURE__ */ le({
1820
+ __name: "ThemeToggle",
1821
+ setup(s) {
1822
+ const { isDark: p, toggle: o } = zt(), { t: a } = we();
1823
+ return (c, f) => (n(), r("button", {
1824
+ type: "button",
1825
+ class: "p-2 rounded-lg border border-slate-200 bg-slate-50 text-slate-500 transition-colors hover:border-slate-300 hover:text-slate-700 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-400 dark:hover:border-slate-600 dark:hover:text-slate-200",
1826
+ title: t(p) ? t(a)("theme.lightMode") : t(a)("theme.darkMode"),
1827
+ onClick: f[0] || (f[0] = //@ts-ignore
1828
+ (...d) => t(o) && t(o)(...d))
1829
+ }, [
1830
+ t(p) ? (n(), he(t(co), {
1831
+ key: 0,
1832
+ class: "h-4 w-4"
1833
+ })) : (n(), he(t(Ja), {
1834
+ key: 1,
1835
+ class: "h-4 w-4"
1836
+ }))
1837
+ ], 8, mo));
1838
+ }
1839
+ }), go = { class: "sticky top-0 z-40 flex h-14 flex-col border-b border-slate-200 bg-white transition-colors duration-200 dark:border-slate-800 dark:bg-[#0b1120]" }, fo = { class: "flex h-full w-full items-center justify-between gap-4 px-3 md:px-4" }, vo = { class: "flex items-center gap-3" }, xo = ["title"], ko = { class: "flex min-w-0 flex-col gap-0.5" }, yo = { class: "flex items-center gap-1.5" }, wo = ["title"], _o = ["title"], $o = { class: "header-menu-container hidden items-center gap-0 md:flex" }, So = ["onClick"], Co = {
1840
+ key: 0,
1841
+ class: "absolute left-0 top-full z-50 mt-1 min-w-[220px] rounded-lg border border-slate-200 bg-white py-1 text-sm text-slate-700 shadow-xl dark:border-slate-700 dark:bg-[#0e1525] dark:text-slate-200",
1842
+ style: { "transform-origin": "top left" }
1843
+ }, Mo = {
1844
+ key: 0,
1845
+ class: "my-1 border-t border-slate-100 dark:border-slate-700/80"
1846
+ }, To = ["onMouseenter"], Ao = {
1847
+ type: "button",
1848
+ class: "flex w-full items-center justify-between px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5"
1849
+ }, Po = {
1850
+ key: 0,
1851
+ class: "absolute left-full top-0 z-50 ml-1 min-w-[200px] rounded-lg border border-slate-200 bg-white py-1 text-sm text-slate-700 shadow-xl dark:border-slate-700 dark:bg-[#0e1525] dark:text-slate-200"
1852
+ }, Io = ["onClick"], Do = {
1853
+ key: 0,
1854
+ class: "rounded bg-slate-100 px-1 py-0.5 text-[9px] font-mono text-slate-500 dark:bg-slate-700 dark:text-slate-400"
1855
+ }, Lo = ["onClick"], Ho = { class: "flex flex-shrink-0 items-center gap-1.5" }, zo = {
1856
+ key: 0,
1857
+ class: "hidden items-center gap-2 lg:flex"
1858
+ }, Bo = { class: "flex -space-x-1.5 overflow-hidden" }, jo = ["title"], Fo = { class: "drop-shadow-sm" }, Eo = ["title"], Ro = { class: "hidden xl:block" }, No = { class: "hidden sm:inline" }, Oo = { class: "header-user-container relative flex-shrink-0" }, Vo = ["title"], qo = ["src", "alt"], Uo = {
1859
+ key: 1,
1860
+ class: "flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-cyan-500 to-blue-600 text-xs font-bold text-white"
1861
+ }, Ko = { class: "hidden max-w-[140px] truncate text-sm font-medium text-slate-700 dark:text-slate-200 sm:inline" }, Wo = {
1862
+ key: 0,
1863
+ class: "absolute right-0 top-full z-50 mt-1 min-w-[200px] rounded-lg border border-slate-200 bg-white py-1 text-sm text-slate-700 shadow-xl dark:border-slate-700 dark:bg-[#0e1525] dark:text-slate-200",
1864
+ style: { "transform-origin": "top right" }
1865
+ }, Go = { class: "border-b border-slate-100 px-4 py-2 dark:border-slate-700/80" }, Jo = { class: "truncate text-sm font-semibold text-slate-800 dark:text-slate-100" }, Zo = { class: "header-more-container relative xl:hidden" }, Yo = {
1866
+ key: 0,
1867
+ class: "absolute right-0 top-full z-50 mt-1 min-w-[210px] rounded-lg border border-slate-200 bg-white py-1 text-sm text-slate-700 shadow-xl dark:border-slate-700 dark:bg-[#0e1525] dark:text-slate-200",
1868
+ style: { "transform-origin": "top right" }
1869
+ }, Qo = { class: "flex items-center justify-between px-4 py-2" }, Xo = /* @__PURE__ */ le({
1870
+ __name: "HeaderBar",
1871
+ props: {
1872
+ title: { default: "Untitled Document" },
1873
+ editable: { type: Boolean, default: !0 },
1874
+ collaborators: { default: () => [] },
1875
+ starred: { type: Boolean, default: !1 },
1876
+ currentUserId: { default: "" },
1877
+ simulatorsActive: { type: Boolean, default: !1 },
1878
+ userName: { default: "" },
1879
+ userAvatar: { default: "" }
1880
+ },
1881
+ emits: ["back", "update:title", "toggle-star", "toggle-simulators", "export", "share", "menu-click"],
1882
+ setup(s, { emit: p }) {
1883
+ const { setLocale: o, t: a } = we(), c = ma(), f = s, d = p, k = w(!1), u = w(f.title), S = w(null);
1884
+ ae(() => f.title, (E) => {
1885
+ u.value = E;
1886
+ });
1887
+ const L = () => {
1888
+ const E = u.value.trim();
1889
+ E && E !== f.title && d("update:title", E), u.value = f.title, k.value = !1;
1890
+ }, D = (E) => E.split(" ").map((N) => N[0]).join("").slice(0, 2).toUpperCase(), I = (E) => {
1891
+ d("export", E), S.value = null;
1892
+ }, _ = F(() => D(f.userName) || "?"), h = w(!1), g = F(() => ({
1893
+ File: {
1894
+ label: a("header.file"),
1895
+ items: [
1896
+ { label: a("header.new"), action: "new-doc" },
1897
+ { label: a("header.open"), action: "open-doc" },
1898
+ { label: a("header.makeACopy"), action: "duplicate" },
1899
+ { label: "divider", divider: !0 },
1900
+ { label: a("header.share"), action: "share" },
1901
+ { label: a("header.email"), action: "email" },
1902
+ {
1903
+ label: a("header.download"),
1904
+ sub: [
1905
+ { label: a("header.docx"), action: "export:docx", badge: "DOCX" },
1906
+ { label: a("header.pdf"), action: "export:pdf", badge: "PDF" },
1907
+ { label: a("header.odt"), action: "export:odt", badge: "ODT" },
1908
+ { label: a("header.txt"), action: "export:txt", badge: "TXT" },
1909
+ { label: a("header.rtf"), action: "export:rtf", badge: "RTF" },
1910
+ { label: a("header.htmlZip"), action: "export:html-zip", badge: "ZIP" },
1911
+ { label: a("header.html"), action: "export:html", badge: "HTML" },
1912
+ { label: a("header.markdown"), action: "export:markdown", badge: "MD" }
1913
+ ]
1914
+ },
1915
+ { label: "divider", divider: !0 },
1916
+ { label: a("header.rename"), action: "rename" },
1917
+ { label: a("header.move"), action: "move" },
1918
+ { label: a("header.moveToTrash"), action: "trash" },
1919
+ { label: "divider", divider: !0 },
1920
+ { label: a("header.versionHistory"), action: "version-history" },
1921
+ { label: "divider", divider: !0 },
1922
+ {
1923
+ label: a("header.language"),
1924
+ sub: c.map((E) => ({
1925
+ label: ba(E),
1926
+ action: `set-locale:${E}`
1927
+ }))
1928
+ },
1929
+ { label: a("header.pageSetup"), action: "page-setup" },
1930
+ { label: a("header.print"), action: "print" }
1931
+ ]
1932
+ },
1933
+ Edit: {
1934
+ label: a("header.edit"),
1935
+ items: [
1936
+ { label: a("header.undo"), action: "undo" },
1937
+ { label: a("header.redo"), action: "redo" },
1938
+ { label: "divider", divider: !0 },
1939
+ { label: a("header.selectAll"), action: "select-all" }
1940
+ ]
1941
+ },
1942
+ View: {
1943
+ label: a("header.view"),
1944
+ items: [
1945
+ { label: a("header.showSidebar"), action: "toggle-left-sidebar" },
1946
+ { label: "divider", divider: !0 },
1947
+ { label: a("header.focusMode"), action: "toggle-focus-mode" },
1948
+ { label: a("header.showRuler"), action: "toggle-ruler" }
1949
+ ]
1950
+ },
1951
+ Insert: {
1952
+ label: a("header.insert"),
1953
+ items: [
1954
+ { label: a("header.meetingNotes"), action: "meeting-notes" },
1955
+ { label: a("header.emailDraft"), action: "email-draft" },
1956
+ { label: "divider", divider: !0 },
1957
+ { label: a("header.image"), action: "insert-image" },
1958
+ { label: a("header.table"), action: "insert-table" },
1959
+ { label: a("header.codeBlock"), action: "insert-code" },
1960
+ { label: "divider", divider: !0 },
1961
+ { label: a("header.header"), action: "insert-header" },
1962
+ { label: a("header.footer"), action: "insert-footer" },
1963
+ { label: a("header.footnote"), action: "insert-footnote" }
1964
+ ]
1965
+ },
1966
+ Format: {
1967
+ label: a("header.format"),
1968
+ items: [
1969
+ { label: a("header.bold"), action: "bold" },
1970
+ { label: a("header.italic"), action: "italic" },
1971
+ { label: a("header.underline"), action: "underline" },
1972
+ { label: "divider", divider: !0 },
1973
+ { label: a("header.heading1"), action: "heading1" },
1974
+ { label: a("header.heading2"), action: "heading2" },
1975
+ { label: a("header.heading3"), action: "heading3" }
1976
+ ]
1977
+ },
1978
+ Tools: {
1979
+ label: a("header.tools"),
1980
+ items: [
1981
+ { label: a("header.spellCheck"), action: "spellcheck" },
1982
+ { label: a("header.wordCount"), action: "word-count" },
1983
+ { label: "divider", divider: !0 },
1984
+ { label: a("header.preferences"), action: "preferences" }
1985
+ ]
1986
+ },
1987
+ Extensions: {
1988
+ label: a("header.extensions"),
1989
+ items: [
1990
+ { label: a("header.manageExtensions"), action: "manage-extensions" }
1991
+ ]
1992
+ },
1993
+ Help: {
1994
+ label: a("header.help"),
1995
+ items: [
1996
+ { label: a("header.keyboardShortcuts"), action: "keyboard-shortcuts" },
1997
+ { label: "divider", divider: !0 },
1998
+ { label: a("header.reportIssue"), action: "report-issue" },
1999
+ { label: a("header.about"), action: "about" }
2000
+ ]
2001
+ }
2002
+ })), b = F(() => Object.keys(g.value)), M = w(null), P = (E) => {
2003
+ S.value = S.value === E ? null : E, M.value = null;
2004
+ }, B = w(!1), j = () => {
2005
+ B.value = !B.value;
2006
+ }, O = w(!1), G = (E) => {
2007
+ o(E), O.value = !1;
2008
+ }, re = w(!1), ge = () => {
2009
+ re.value = !re.value;
2010
+ }, fe = (E) => {
2011
+ if (E.startsWith("export:")) {
2012
+ const N = E.replace("export:", "");
2013
+ I(N);
2014
+ } else if (E === "share")
2015
+ d("share"), S.value = null;
2016
+ else if (E === "rename")
2017
+ k.value = !0, S.value = null;
2018
+ else if (E.startsWith("set-locale:")) {
2019
+ const N = E.replace("set-locale:", "");
2020
+ G(N);
2021
+ } else
2022
+ d("menu-click", E);
2023
+ M.value = null;
2024
+ }, be = (E) => {
2025
+ const N = E.target;
2026
+ N.closest(".header-menu-container") || (S.value = null, M.value = null), N.closest(".header-more-container") || (B.value = !1), N.closest(".header-user-container") || (re.value = !1);
2027
+ };
2028
+ return Oe(() => document.addEventListener("click", be, !0)), Ae(() => document.removeEventListener("click", be, !0)), (E, N) => (n(), r("header", go, [
2029
+ e("div", fo, [
2030
+ e("div", vo, [
2031
+ e("button", {
2032
+ type: "button",
2033
+ class: "flex h-9 w-9 cursor-pointer items-center justify-center rounded-xl bg-gradient-to-br from-cyan-400 to-blue-600 text-base font-bold text-white shadow-[0_0_15px_rgba(34,211,238,0.3)] hover:opacity-90 transition-opacity",
2034
+ title: t(a)("header.backToDocuments"),
2035
+ onClick: N[0] || (N[0] = (U) => d("back"))
2036
+ }, " DF ", 8, xo),
2037
+ e("div", ko, [
2038
+ e("div", yo, [
2039
+ k.value ? de((n(), r("input", {
2040
+ key: 0,
2041
+ "onUpdate:modelValue": N[1] || (N[1] = (U) => u.value = U),
2042
+ type: "text",
2043
+ class: "min-w-[150px] border-b-2 border-cyan-500 bg-transparent px-1 py-0 text-sm font-semibold text-slate-800 focus:outline-none dark:text-slate-100 md:min-w-[240px]",
2044
+ onBlur: L,
2045
+ onKeydown: ot(L, ["enter"])
2046
+ }, null, 544)), [
2047
+ [ce, u.value]
2048
+ ]) : (n(), r("h1", {
2049
+ key: 1,
2050
+ class: "max-w-[180px] cursor-text truncate rounded px-1 py-0 text-sm font-semibold text-slate-800 hover:bg-slate-50 dark:text-slate-100 dark:hover:bg-slate-800/60 md:max-w-[280px]",
2051
+ title: t(a)("header.clickToRename"),
2052
+ onClick: N[2] || (N[2] = (U) => k.value = !0)
2053
+ }, l(f.title), 9, wo)),
2054
+ e("button", {
2055
+ type: "button",
2056
+ class: "flex h-6 w-6 items-center justify-center rounded-full text-slate-400 transition-colors hover:text-amber-500",
2057
+ title: s.starred ? t(a)("header.unstarDocument") : t(a)("header.starDocument"),
2058
+ onClick: N[3] || (N[3] = (U) => d("toggle-star"))
2059
+ }, [
2060
+ y(t(ro), {
2061
+ class: z(["h-4 w-4", s.starred ? "fill-amber-400 text-amber-500" : ""])
2062
+ }, null, 8, ["class"])
2063
+ ], 8, _o)
2064
+ ]),
2065
+ e("nav", $o, [
2066
+ (n(!0), r(q, null, K(b.value, (U) => (n(), r("div", {
2067
+ key: U,
2068
+ class: "relative"
2069
+ }, [
2070
+ e("button", {
2071
+ type: "button",
2072
+ class: z(["flex items-center gap-0.5 rounded px-2 py-0.5 text-[13px] transition-colors", S.value === U ? "bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300" : "text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800"]),
2073
+ onClick: R((ie) => P(U), ["stop"])
2074
+ }, l(g.value[U].label), 11, So),
2075
+ y(at, {
2076
+ "enter-active-class": "transition-all duration-150 ease-out",
2077
+ "enter-from-class": "opacity-0 scale-95 translate-y-[-4px]",
2078
+ "enter-to-class": "opacity-100 scale-100 translate-y-0",
2079
+ "leave-active-class": "transition-all duration-100 ease-in",
2080
+ "leave-from-class": "opacity-100 scale-100 translate-y-0",
2081
+ "leave-to-class": "opacity-0 scale-95 translate-y-[-4px]"
2082
+ }, {
2083
+ default: He(() => [
2084
+ S.value === U ? (n(), r("div", Co, [
2085
+ (n(!0), r(q, null, K(g.value[U].items, (ie, Se) => (n(), r(q, { key: Se }, [
2086
+ ie.divider ? (n(), r("div", Mo)) : ie.sub ? (n(), r("div", {
2087
+ key: 1,
2088
+ class: "relative",
2089
+ onMouseenter: (X) => M.value = `${U}-${Se}`,
2090
+ onMouseleave: N[4] || (N[4] = (X) => M.value = null)
2091
+ }, [
2092
+ e("button", Ao, [
2093
+ e("span", null, l(ie.label), 1),
2094
+ y(t(Le), { class: "h-3.5 w-3.5 -rotate-90 text-slate-400" })
2095
+ ]),
2096
+ y(at, {
2097
+ "enter-active-class": "transition-all duration-100 ease-out",
2098
+ "enter-from-class": "opacity-0 translate-x-2",
2099
+ "enter-to-class": "opacity-100 translate-x-0",
2100
+ "leave-active-class": "transition-all duration-75 ease-in",
2101
+ "leave-from-class": "opacity-100 translate-x-0",
2102
+ "leave-to-class": "opacity-0 translate-x-2"
2103
+ }, {
2104
+ default: He(() => [
2105
+ M.value === `${U}-${Se}` ? (n(), r("div", Po, [
2106
+ (n(!0), r(q, null, K(ie.sub, (X) => (n(), r("button", {
2107
+ key: X.action,
2108
+ type: "button",
2109
+ class: "flex w-full items-center justify-between px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
2110
+ onClick: R((Ye) => fe(X.action), ["stop"])
2111
+ }, [
2112
+ e("span", null, l(X.label), 1),
2113
+ X.badge ? (n(), r("span", Do, l(X.badge), 1)) : H("", !0)
2114
+ ], 8, Io))), 128))
2115
+ ])) : H("", !0)
2116
+ ]),
2117
+ _: 2
2118
+ }, 1024)
2119
+ ], 40, To)) : (n(), r("button", {
2120
+ key: 2,
2121
+ type: "button",
2122
+ class: "flex w-full items-center px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
2123
+ onClick: R((X) => fe(ie.action), ["stop"])
2124
+ }, l(ie.label), 9, Lo))
2125
+ ], 64))), 128))
2126
+ ])) : H("", !0)
2127
+ ]),
2128
+ _: 2
2129
+ }, 1024)
2130
+ ]))), 128))
2131
+ ])
2132
+ ])
2133
+ ]),
2134
+ e("div", Ho, [
2135
+ s.collaborators.length > 0 ? (n(), r("div", zo, [
2136
+ e("div", Bo, [
2137
+ (n(!0), r(q, null, K(s.collaborators, (U) => (n(), r("div", {
2138
+ key: U.userId,
2139
+ class: "flex h-7 w-7 flex-shrink-0 cursor-help items-center justify-center rounded-full border-2 border-white text-[10px] font-bold text-white dark:border-slate-900",
2140
+ style: me({ backgroundColor: U.color }),
2141
+ title: `${U.name} ${U.userId === s.currentUserId ? "(You)" : ""} ${U.isTyping ? "is typing..." : ""}`
2142
+ }, [
2143
+ e("span", Fo, l(D(U.name)), 1)
2144
+ ], 12, jo))), 128))
2145
+ ])
2146
+ ])) : H("", !0),
2147
+ Re(E.$slots, "actions"),
2148
+ s.editable ? (n(), r("button", {
2149
+ key: 1,
2150
+ type: "button",
2151
+ class: z(["hidden h-8 w-8 items-center justify-center rounded-md transition-all xl:flex", s.simulatorsActive ? "animate-pulse bg-emerald-600 text-white hover:bg-emerald-700" : "text-indigo-600 hover:bg-slate-100 dark:text-indigo-300 dark:hover:bg-slate-800"]),
2152
+ title: t(a)("header.sandbox"),
2153
+ onClick: N[5] || (N[5] = (U) => d("toggle-simulators"))
2154
+ }, [
2155
+ y(t(It), { class: "h-[18px] w-[18px]" })
2156
+ ], 10, Eo)) : H("", !0),
2157
+ e("div", Ro, [
2158
+ y(Lt)
2159
+ ]),
2160
+ e("button", {
2161
+ type: "button",
2162
+ class: "flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-[13px] font-semibold text-white shadow transition-colors hover:bg-blue-700",
2163
+ onClick: N[6] || (N[6] = (U) => d("share"))
2164
+ }, [
2165
+ y(t(oo), { class: "h-3.5 w-3.5" }),
2166
+ e("span", No, l(t(a)("header.share")), 1)
2167
+ ]),
2168
+ e("div", Oo, [
2169
+ e("button", {
2170
+ type: "button",
2171
+ class: "flex h-8 items-center gap-1.5 rounded-full py-0.5 pl-0.5 pr-1.5 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",
2172
+ title: s.userName,
2173
+ onClick: R(ge, ["stop"])
2174
+ }, [
2175
+ s.userAvatar && !h.value ? (n(), r("img", {
2176
+ key: 0,
2177
+ src: s.userAvatar,
2178
+ alt: s.userName,
2179
+ referrerpolicy: "no-referrer",
2180
+ class: "h-7 w-7 flex-shrink-0 rounded-full object-cover",
2181
+ onError: N[7] || (N[7] = (U) => h.value = !0)
2182
+ }, null, 40, qo)) : (n(), r("span", Uo, l(_.value), 1)),
2183
+ e("span", Ko, l(s.userName || t(a)("header.account")), 1),
2184
+ y(t(Le), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
2185
+ ], 8, Vo),
2186
+ y(at, {
2187
+ "enter-active-class": "transition-all duration-150 ease-out",
2188
+ "enter-from-class": "opacity-0 scale-95 translate-y-[-4px]",
2189
+ "enter-to-class": "opacity-100 scale-100 translate-y-0",
2190
+ "leave-active-class": "transition-all duration-100 ease-in",
2191
+ "leave-from-class": "opacity-100 scale-100 translate-y-0",
2192
+ "leave-to-class": "opacity-0 scale-95 translate-y-[-4px]"
2193
+ }, {
2194
+ default: He(() => [
2195
+ re.value ? (n(), r("div", Wo, [
2196
+ e("div", Go, [
2197
+ e("p", Jo, l(s.userName || t(a)("header.account")), 1)
2198
+ ]),
2199
+ Re(E.$slots, "user-menu", {
2200
+ close: () => re.value = !1
2201
+ })
2202
+ ])) : H("", !0)
2203
+ ]),
2204
+ _: 3
2205
+ })
2206
+ ]),
2207
+ e("div", Zo, [
2208
+ e("button", {
2209
+ type: "button",
2210
+ class: "flex h-8 w-8 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800",
2211
+ title: "More",
2212
+ onClick: R(j, ["stop"])
2213
+ }, [
2214
+ y(t(Vt), { class: "h-[18px] w-[18px]" })
2215
+ ]),
2216
+ y(at, {
2217
+ "enter-active-class": "transition-all duration-150 ease-out",
2218
+ "enter-from-class": "opacity-0 scale-95 translate-y-[-4px]",
2219
+ "enter-to-class": "opacity-100 scale-100 translate-y-0",
2220
+ "leave-active-class": "transition-all duration-100 ease-in",
2221
+ "leave-from-class": "opacity-100 scale-100 translate-y-0",
2222
+ "leave-to-class": "opacity-0 scale-95 translate-y-[-4px]"
2223
+ }, {
2224
+ default: He(() => [
2225
+ B.value ? (n(), r("div", Yo, [
2226
+ Re(E.$slots, "overflow-actions", {
2227
+ close: () => B.value = !1
2228
+ }),
2229
+ s.editable ? (n(), r("button", {
2230
+ key: 0,
2231
+ type: "button",
2232
+ class: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
2233
+ onClick: N[8] || (N[8] = (U) => {
2234
+ d("toggle-simulators"), B.value = !1;
2235
+ })
2236
+ }, [
2237
+ y(t(It), { class: "h-4 w-4 text-slate-400" }),
2238
+ e("span", null, l(t(a)("header.sandbox")), 1)
2239
+ ])) : H("", !0),
2240
+ N[9] || (N[9] = e("div", { class: "my-1 border-t border-slate-100 dark:border-slate-700/80" }, null, -1)),
2241
+ e("div", Qo, [
2242
+ e("span", null, l(t(a)("header.theme")), 1),
2243
+ y(Lt)
2244
+ ])
2245
+ ])) : H("", !0)
2246
+ ]),
2247
+ _: 3
2248
+ })
2249
+ ])
2250
+ ])
2251
+ ])
2252
+ ]));
2253
+ }
2254
+ }), en = {
2255
+ id: "editor-toolbar-row",
2256
+ class: "docs-editor-toolbar w-full border-b border-slate-200 bg-white py-1.5 text-slate-600 shadow-sm dark:border-slate-800 dark:bg-[#0b1120] dark:text-slate-300"
2257
+ }, tn = { class: "flex min-h-9 w-full items-center gap-1 px-3 flex-nowrap" }, an = ["title", "aria-label", "disabled"], on = ["title", "aria-label", "disabled"], nn = ["title", "aria-label"], sn = ["title", "aria-label", "disabled"], ln = ["title", "aria-label"], rn = { class: "toolbar-dropdown relative flex-shrink-0" }, dn = ["title", "aria-label", "disabled"], cn = { class: "truncate" }, un = {
2258
+ key: 0,
2259
+ class: "absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-lg border border-slate-200 bg-white py-1 text-sm shadow-xl dark:border-slate-700 dark:bg-[#0e1525]"
2260
+ }, pn = ["disabled", "onClick"], hn = { class: "toolbar-dropdown relative flex-shrink-0" }, bn = ["title", "aria-label", "disabled"], mn = { class: "truncate" }, gn = {
2261
+ key: 0,
2262
+ class: "absolute left-0 top-full z-50 mt-1 min-w-[160px] rounded-lg border border-slate-200 bg-white py-1 text-sm shadow-xl dark:border-slate-700 dark:bg-[#0e1525]"
2263
+ }, fn = ["onClick"], vn = ["title", "aria-label", "disabled"], xn = { class: "flex h-8 w-7 flex-shrink-0 select-none items-center justify-center text-xs text-slate-700 dark:text-slate-200" }, kn = ["title", "aria-label", "disabled"], yn = ["title", "aria-label", "disabled", "onClick"], wn = {
2264
+ key: 1,
2265
+ class: "text-xs font-medium leading-none"
2266
+ }, _n = {
2267
+ key: 0,
2268
+ class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10"
2269
+ }, $n = {
2270
+ key: 1,
2271
+ class: "toolbar-dropdown relative flex-shrink-0"
2272
+ }, Sn = ["title", "aria-label", "disabled"], Cn = {
2273
+ key: 0,
2274
+ class: "absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-lg border border-slate-200 bg-white py-1 text-sm shadow-xl dark:border-slate-700 dark:bg-[#0e1525]"
2275
+ }, Mn = ["disabled", "onClick"], Tn = {
2276
+ key: 2,
2277
+ class: "toolbar-dropdown relative flex-shrink-0"
2278
+ }, An = ["title", "aria-label", "disabled"], Pn = {
2279
+ key: 0,
2280
+ class: "absolute left-0 top-full z-50 mt-1 min-w-[160px] rounded-lg border border-slate-200 bg-white py-1 text-sm shadow-xl dark:border-slate-700 dark:bg-[#0e1525]"
2281
+ }, In = ["disabled", "onClick"], Dn = {
2282
+ key: 3,
2283
+ class: "toolbar-dropdown relative flex-shrink-0"
2284
+ }, Ln = ["title", "aria-label", "disabled"], Hn = { class: "hidden md:inline" }, zn = {
2285
+ key: 0,
2286
+ class: "absolute left-0 top-full z-50 mt-1 min-w-[190px] rounded-lg border border-slate-200 bg-white py-1 text-sm shadow-xl dark:border-slate-700 dark:bg-[#0e1525]"
2287
+ }, Bn = ["disabled", "onClick"], jn = ["title", "aria-label"], Fn = ["title", "aria-label"], En = ["title", "aria-label"], Rn = ["title", "aria-label"], Nn = "bg-slate-200 text-slate-900 dark:bg-slate-700 dark:text-slate-100", On = "text-slate-600 dark:text-slate-300 hover:text-slate-900 dark:hover:text-slate-100 hover:bg-slate-100 dark:hover:bg-white/5", ve = "docs-editor-toolbar__control inline-flex h-8 flex-shrink-0 items-center justify-center rounded-md p-1 text-slate-600 transition-all disabled:opacity-40 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-white/5", Vn = "bg-slate-200 text-slate-900 dark:bg-slate-700 dark:text-slate-100", qn = "text-slate-500 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-100 hover:bg-slate-100 dark:hover:bg-white/5", Ht = 11, Un = /* @__PURE__ */ le({
2288
+ __name: "EditorToolbar",
2289
+ props: {
2290
+ actions: {},
2291
+ plugins: {},
2292
+ editor: {},
2293
+ activeSidebar: {}
2294
+ },
2295
+ emits: ["toggle-sidebar", "print", "undo", "redo", "toggle-left-sidebar"],
2296
+ setup(s, { emit: p }) {
2297
+ const { t: o } = we(), a = s, c = p, f = {
2298
+ Bold: Ot,
2299
+ Italic: Ut,
2300
+ Underline: Gt,
2301
+ Strikethrough: io,
2302
+ Heading1: ja,
2303
+ Heading2: Fa,
2304
+ Heading3: Ea,
2305
+ Heading4: Ra,
2306
+ Heading5: Na,
2307
+ Heading6: Oa,
2308
+ List: nt,
2309
+ ListOrdered: qa,
2310
+ CheckSquare: lo,
2311
+ Quote: Qa,
2312
+ Link: Kt,
2313
+ Code: Ia,
2314
+ Image: Va,
2315
+ Table: uo,
2316
+ AlignLeft: bt,
2317
+ AlignCenter: Tt,
2318
+ AlignRight: At,
2319
+ AlignJustify: Pt,
2320
+ FileText: Ne
2321
+ };
2322
+ function d(C) {
2323
+ return C ? f[C] ?? null : null;
2324
+ }
2325
+ const k = F(() => {
2326
+ const C = [];
2327
+ for (const i of a.plugins ?? [])
2328
+ !i.toolbar || i.toolbar.length === 0 || C.push({ pluginId: i.id, items: i.toolbar });
2329
+ return C;
2330
+ }), u = w(0);
2331
+ function S() {
2332
+ u.value++;
2333
+ }
2334
+ ae(
2335
+ () => a.editor,
2336
+ (C, i) => {
2337
+ i && i.off("transaction", S), C && C.on("transaction", S);
2338
+ },
2339
+ { immediate: !0 }
2340
+ ), Ae(() => {
2341
+ a.editor && a.editor.off("transaction", S);
2342
+ });
2343
+ function L(C) {
2344
+ u.value;
2345
+ const i = a.editor;
2346
+ if (!i) return !1;
2347
+ switch (C.action) {
2348
+ case "toggleBold":
2349
+ return i.isActive("bold");
2350
+ case "toggleItalic":
2351
+ return i.isActive("italic");
2352
+ case "toggleUnderline":
2353
+ return i.isActive("underline");
2354
+ case "toggleStrike":
2355
+ return i.isActive("strike");
2356
+ case "toggleHeading1":
2357
+ return i.isActive("heading", { level: 1 });
2358
+ case "toggleHeading2":
2359
+ return i.isActive("heading", { level: 2 });
2360
+ case "toggleHeading3":
2361
+ return i.isActive("heading", { level: 3 });
2362
+ case "toggleHeading4":
2363
+ return i.isActive("heading", { level: 4 });
2364
+ case "toggleHeading5":
2365
+ return i.isActive("heading", { level: 5 });
2366
+ case "toggleHeading6":
2367
+ return i.isActive("heading", { level: 6 });
2368
+ case "toggleBulletList":
2369
+ return i.isActive("bulletList");
2370
+ case "toggleOrderedList":
2371
+ return i.isActive("orderedList");
2372
+ case "toggleTaskList":
2373
+ return i.isActive("taskList");
2374
+ case "toggleBlockquote":
2375
+ return i.isActive("blockquote");
2376
+ case "toggleCodeBlock":
2377
+ return i.isActive("codeBlock");
2378
+ case "setLink":
2379
+ return i.isActive("link");
2380
+ case "alignLeft":
2381
+ return i.isActive({ textAlign: "left" });
2382
+ case "alignCenter":
2383
+ return i.isActive({ textAlign: "center" });
2384
+ case "alignRight":
2385
+ return i.isActive({ textAlign: "right" });
2386
+ case "alignJustify":
2387
+ return i.isActive({ textAlign: "justify" });
2388
+ default:
2389
+ return !1;
2390
+ }
2391
+ }
2392
+ function D(C) {
2393
+ if (!a.editor) return;
2394
+ const i = a.actions[C.action];
2395
+ if (typeof i == "function") {
2396
+ i(...C.args ?? []), a.editor.commands.focus();
2397
+ return;
2398
+ }
2399
+ const $ = a.editor.commands[C.action];
2400
+ typeof $ == "function" && ($(...C.args ?? []), a.editor.commands.focus());
2401
+ }
2402
+ const I = ["toggleHeading1", "toggleHeading2", "toggleHeading3", "toggleHeading4", "toggleHeading5", "toggleHeading6"], _ = ["alignLeft", "alignCenter", "alignRight", "alignJustify"], h = ["toggleBulletList", "toggleOrderedList", "toggleTaskList"], g = ["setLink", "insertImage", "insertTable", "toggleBlockquote", "toggleCodeBlock", "insertFootnote", "insertPageBreak", "setPageBreak", "togglePageBreak", "addPageBreak"], b = F(() => k.value.flatMap((C) => C.items)), M = F(() => b.value.filter((C) => _.includes(C.action))), P = F(() => b.value.filter((C) => h.includes(C.action))), B = F(() => b.value.filter((C) => g.includes(C.action))), j = F(
2403
+ () => b.value.filter(
2404
+ (C) => !I.includes(C.action) && !_.includes(C.action) && !h.includes(C.action) && !g.includes(C.action)
2405
+ )
2406
+ ), O = F(() => {
2407
+ u.value;
2408
+ const C = a.editor;
2409
+ if (C) {
2410
+ if (C.isActive({ textAlign: "center" })) return Tt;
2411
+ if (C.isActive({ textAlign: "right" })) return At;
2412
+ if (C.isActive({ textAlign: "justify" })) return Pt;
2413
+ }
2414
+ return bt;
2415
+ }), G = w(null);
2416
+ function re(C) {
2417
+ G.value = G.value === C ? null : C;
2418
+ }
2419
+ function ge(C) {
2420
+ D(C), G.value = null;
2421
+ }
2422
+ function fe(C) {
2423
+ C.target.closest(".toolbar-dropdown") || (G.value = null);
2424
+ }
2425
+ Oe(() => document.addEventListener("click", fe, !0)), Ae(() => document.removeEventListener("click", fe, !0));
2426
+ function be(C) {
2427
+ return a.activeSidebar === C ? Vn : qn;
2428
+ }
2429
+ function E() {
2430
+ a.editor && (a.editor.commands.undo(), a.editor.commands.focus()), c("undo");
2431
+ }
2432
+ function N() {
2433
+ a.editor && (a.editor.commands.redo(), a.editor.commands.focus()), c("redo");
2434
+ }
2435
+ function U() {
2436
+ c("print");
2437
+ }
2438
+ const ie = F(() => [
2439
+ { value: "paragraph", label: o("toolbar.normalText") },
2440
+ { value: "heading-1", label: o("header.heading1") },
2441
+ { value: "heading-2", label: o("header.heading2") },
2442
+ { value: "heading-3", label: o("header.heading3") },
2443
+ { value: "heading-4", label: o("header.heading4") },
2444
+ { value: "heading-5", label: o("header.heading5") },
2445
+ { value: "heading-6", label: o("header.heading6") }
2446
+ ]);
2447
+ function Se(C) {
2448
+ const i = a.editor;
2449
+ if (i) {
2450
+ if (C === "paragraph")
2451
+ i.commands.setParagraph();
2452
+ else {
2453
+ const $ = parseInt(C.replace("heading-", ""), 10), ee = a.actions[`toggleHeading${$}`];
2454
+ typeof ee == "function" ? ee() : i.commands.toggleHeading({ level: $ });
2455
+ }
2456
+ i.commands.focus();
2457
+ }
2458
+ G.value = null;
2459
+ }
2460
+ const X = F(() => {
2461
+ u.value;
2462
+ const C = a.editor;
2463
+ if (!C) return "paragraph";
2464
+ for (let i = 1; i <= 6; i++)
2465
+ if (C.isActive("heading", { level: i })) return `heading-${i}`;
2466
+ return "paragraph";
2467
+ }), Ye = F(
2468
+ () => {
2469
+ var C;
2470
+ return ((C = ie.value.find((i) => i.value === X.value)) == null ? void 0 : C.label) ?? o("toolbar.normalText");
2471
+ }
2472
+ ), Ve = [
2473
+ { value: "arial", label: "Arial" },
2474
+ { value: "inter", label: "Inter" },
2475
+ { value: "serif", label: "Serif" },
2476
+ { value: "mono", label: "Monospace" }
2477
+ ], A = w("arial"), Qe = F(
2478
+ () => {
2479
+ var C;
2480
+ return ((C = Ve.find((i) => i.value === A.value)) == null ? void 0 : C.label) ?? "Arial";
2481
+ }
2482
+ );
2483
+ function xe(C) {
2484
+ var i;
2485
+ A.value = C, G.value = null, (i = a.editor) == null || i.commands.focus();
2486
+ }
2487
+ const Pe = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72], ze = F(() => {
2488
+ var ee;
2489
+ u.value;
2490
+ const C = a.editor;
2491
+ if (!C) return Ht;
2492
+ const i = C.getAttributes("textStyle");
2493
+ if (i != null && i.fontSize) {
2494
+ const ue = parseInt(i.fontSize, 10);
2495
+ if (!isNaN(ue)) return ue;
2496
+ }
2497
+ const $ = C.state.storedMarks;
2498
+ if ($) {
2499
+ for (const ue of $)
2500
+ if (ue.type.name === "textStyle" && ue.attrs.fontSize) {
2501
+ const ne = parseInt(ue.attrs.fontSize, 10);
2502
+ if (!isNaN(ne)) return ne;
2503
+ }
2504
+ }
2505
+ if ((ee = C.view) != null && ee.dom) {
2506
+ const ue = parseFloat(getComputedStyle(C.view.dom).fontSize);
2507
+ if (!isNaN(ue)) {
2508
+ const ne = Math.round(ue);
2509
+ return Pe.reduce(
2510
+ (Me, Be) => Math.abs(Be - ne) < Math.abs(Me - ne) ? Be : Me
2511
+ );
2512
+ }
2513
+ }
2514
+ return Ht;
2515
+ });
2516
+ function qe(C) {
2517
+ if (console.log("[FontSize] handleFontSize called, delta:", C, "editor:", !!a.editor), !a.editor) return;
2518
+ const i = Pe.indexOf(ze.value), $ = i >= 0 ? i : Pe.findIndex((Me) => Me >= ze.value), ee = Math.min(Math.max(($ >= 0 ? $ : 0) + C, 0), Pe.length - 1), ue = Pe[ee];
2519
+ console.log("[FontSize] currentFontSize:", ze.value, "→ nextSize:", ue);
2520
+ const ne = a.editor.commands;
2521
+ console.log("[FontSize] commands.setFontSize type:", typeof ne.setFontSize);
2522
+ const Ce = ne.setFontSize(`${ue}px`);
2523
+ console.log("[FontSize] setFontSize returned:", Ce), a.editor.commands.focus();
2524
+ }
2525
+ return (C, i) => (n(), r("div", en, [
2526
+ e("div", tn, [
2527
+ e("button", {
2528
+ type: "button",
2529
+ class: z([ve, "w-8"]),
2530
+ title: t(o)("toolbar.undo"),
2531
+ "aria-label": t(o)("toolbar.undo"),
2532
+ disabled: !s.editor,
2533
+ onMousedown: i[0] || (i[0] = R(() => {
2534
+ }, ["prevent"])),
2535
+ onClick: E
2536
+ }, [
2537
+ y(t(po), { class: "h-[18px] w-[18px]" })
2538
+ ], 42, an),
2539
+ e("button", {
2540
+ type: "button",
2541
+ class: z([ve, "w-8"]),
2542
+ title: t(o)("toolbar.redo"),
2543
+ "aria-label": t(o)("toolbar.redo"),
2544
+ disabled: !s.editor,
2545
+ onMousedown: i[1] || (i[1] = R(() => {
2546
+ }, ["prevent"])),
2547
+ onClick: N
2548
+ }, [
2549
+ y(t(Xa), { class: "h-[18px] w-[18px]" })
2550
+ ], 42, on),
2551
+ i[27] || (i[27] = e("span", { class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10" }, null, -1)),
2552
+ e("button", {
2553
+ type: "button",
2554
+ class: z([ve, "w-8"]),
2555
+ title: t(o)("toolbar.print"),
2556
+ "aria-label": t(o)("toolbar.print"),
2557
+ onMousedown: i[2] || (i[2] = R(() => {
2558
+ }, ["prevent"])),
2559
+ onClick: U
2560
+ }, [
2561
+ y(t(Ya), { class: "h-[18px] w-[18px]" })
2562
+ ], 42, nn),
2563
+ e("button", {
2564
+ type: "button",
2565
+ class: z([ve, "w-8"]),
2566
+ title: t(o)("toolbar.spelling"),
2567
+ "aria-label": t(o)("toolbar.spelling"),
2568
+ disabled: !s.editor,
2569
+ onMousedown: i[3] || (i[3] = R(() => {
2570
+ }, ["prevent"]))
2571
+ }, [
2572
+ y(t(so), { class: "h-[18px] w-[18px]" })
2573
+ ], 42, sn),
2574
+ e("button", {
2575
+ type: "button",
2576
+ class: z([ve, "px-2 text-xs"]),
2577
+ title: t(o)("toolbar.zoom"),
2578
+ "aria-label": t(o)("toolbar.zoom"),
2579
+ onMousedown: i[4] || (i[4] = R(() => {
2580
+ }, ["prevent"]))
2581
+ }, l(t(o)("toolbar.zoom")), 43, ln),
2582
+ i[28] || (i[28] = e("span", { class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10" }, null, -1)),
2583
+ e("div", rn, [
2584
+ e("button", {
2585
+ type: "button",
2586
+ class: z([ve, "w-[116px] justify-between gap-1 px-2 text-xs font-medium"]),
2587
+ title: t(o)("toolbar.paragraphStyle"),
2588
+ "aria-label": t(o)("toolbar.paragraphStyle"),
2589
+ disabled: !s.editor,
2590
+ onMousedown: i[5] || (i[5] = R(() => {
2591
+ }, ["prevent"])),
2592
+ onClick: i[6] || (i[6] = R(($) => re("heading"), ["stop"]))
2593
+ }, [
2594
+ e("span", cn, l(Ye.value), 1),
2595
+ y(t(Le), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
2596
+ ], 42, dn),
2597
+ G.value === "heading" ? (n(), r("div", un, [
2598
+ (n(!0), r(q, null, K(ie.value, ($) => (n(), r("button", {
2599
+ key: $.value,
2600
+ type: "button",
2601
+ class: z(["flex w-full items-center px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", X.value === $.value ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
2602
+ disabled: !s.editor,
2603
+ onMousedown: i[7] || (i[7] = R(() => {
2604
+ }, ["prevent"])),
2605
+ onClick: (ee) => Se($.value)
2606
+ }, l($.label), 43, pn))), 128))
2607
+ ])) : H("", !0)
2608
+ ]),
2609
+ e("div", hn, [
2610
+ e("button", {
2611
+ type: "button",
2612
+ class: z([ve, "w-[100px] justify-between gap-1 px-2 text-xs font-medium"]),
2613
+ title: t(o)("toolbar.fontFamily"),
2614
+ "aria-label": t(o)("toolbar.fontFamily"),
2615
+ disabled: !s.editor,
2616
+ onMousedown: i[8] || (i[8] = R(() => {
2617
+ }, ["prevent"])),
2618
+ onClick: i[9] || (i[9] = R(($) => re("font"), ["stop"]))
2619
+ }, [
2620
+ e("span", mn, l(Qe.value), 1),
2621
+ y(t(Le), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
2622
+ ], 42, bn),
2623
+ G.value === "font" ? (n(), r("div", gn, [
2624
+ (n(), r(q, null, K(Ve, ($) => e("button", {
2625
+ key: $.value,
2626
+ type: "button",
2627
+ class: z(["flex w-full items-center px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", A.value === $.value ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
2628
+ onMousedown: i[10] || (i[10] = R(() => {
2629
+ }, ["prevent"])),
2630
+ onClick: (ee) => xe($.value)
2631
+ }, l($.label), 43, fn)), 64))
2632
+ ])) : H("", !0)
2633
+ ]),
2634
+ e("button", {
2635
+ type: "button",
2636
+ class: z([ve, "w-7 text-sm"]),
2637
+ title: t(o)("toolbar.decreaseFontSize"),
2638
+ "aria-label": t(o)("toolbar.decreaseFontSize"),
2639
+ disabled: !s.editor,
2640
+ onMousedown: i[11] || (i[11] = R(($) => qe(-1), ["prevent"]))
2641
+ }, [
2642
+ y(t(Ga), { class: "h-3.5 w-3.5" })
2643
+ ], 42, vn),
2644
+ e("span", xn, l(ze.value), 1),
2645
+ e("button", {
2646
+ type: "button",
2647
+ class: z([ve, "w-7 text-sm"]),
2648
+ title: t(o)("toolbar.increaseFontSize"),
2649
+ "aria-label": t(o)("toolbar.increaseFontSize"),
2650
+ disabled: !s.editor,
2651
+ onMousedown: i[12] || (i[12] = R(($) => qe(1), ["prevent"]))
2652
+ }, [
2653
+ y(t(st), { class: "h-3.5 w-3.5" })
2654
+ ], 42, kn),
2655
+ i[29] || (i[29] = e("span", { class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10" }, null, -1)),
2656
+ (n(!0), r(q, null, K(j.value, ($) => (n(), r("button", {
2657
+ key: $.id,
2658
+ type: "button",
2659
+ title: $.label ?? $.id,
2660
+ "aria-label": $.label ?? $.id,
2661
+ class: z([
2662
+ "docs-editor-toolbar__button inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md p-1 transition-all disabled:opacity-40",
2663
+ L($) ? Nn : On
2664
+ ]),
2665
+ disabled: !s.editor,
2666
+ onMousedown: i[13] || (i[13] = R(() => {
2667
+ }, ["prevent"])),
2668
+ onClick: (ee) => D($)
2669
+ }, [
2670
+ d($.iconComponent) ? (n(), he($e(d($.iconComponent)), {
2671
+ key: 0,
2672
+ class: "h-[18px] w-[18px]"
2673
+ })) : $.label ? (n(), r("span", wn, l($.label.charAt(0)), 1)) : H("", !0)
2674
+ ], 42, yn))), 128)),
2675
+ P.value.length || M.value.length || B.value.length ? (n(), r("span", _n)) : H("", !0),
2676
+ P.value.length ? (n(), r("div", $n, [
2677
+ e("button", {
2678
+ type: "button",
2679
+ class: z([ve, "gap-0.5 px-1.5"]),
2680
+ title: t(o)("toolbar.lists"),
2681
+ "aria-label": t(o)("toolbar.lists"),
2682
+ disabled: !s.editor,
2683
+ onMousedown: i[14] || (i[14] = R(() => {
2684
+ }, ["prevent"])),
2685
+ onClick: i[15] || (i[15] = R(($) => re("lists"), ["stop"]))
2686
+ }, [
2687
+ y(t(nt), { class: "h-[18px] w-[18px]" }),
2688
+ y(t(Le), { class: "h-3 w-3 text-slate-400" })
2689
+ ], 42, Sn),
2690
+ G.value === "lists" ? (n(), r("div", Cn, [
2691
+ (n(!0), r(q, null, K(P.value, ($) => (n(), r("button", {
2692
+ key: $.id,
2693
+ type: "button",
2694
+ class: z(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", L($) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
2695
+ disabled: !s.editor,
2696
+ onMousedown: i[16] || (i[16] = R(() => {
2697
+ }, ["prevent"])),
2698
+ onClick: (ee) => ge($)
2699
+ }, [
2700
+ d($.iconComponent) ? (n(), he($e(d($.iconComponent)), {
2701
+ key: 0,
2702
+ class: "h-4 w-4"
2703
+ })) : H("", !0),
2704
+ e("span", null, l($.label ?? $.id), 1)
2705
+ ], 42, Mn))), 128))
2706
+ ])) : H("", !0)
2707
+ ])) : H("", !0),
2708
+ M.value.length ? (n(), r("div", Tn, [
2709
+ e("button", {
2710
+ type: "button",
2711
+ class: z([ve, "gap-0.5 px-1.5"]),
2712
+ title: t(o)("toolbar.alignment"),
2713
+ "aria-label": t(o)("toolbar.alignment"),
2714
+ disabled: !s.editor,
2715
+ onMousedown: i[17] || (i[17] = R(() => {
2716
+ }, ["prevent"])),
2717
+ onClick: i[18] || (i[18] = R(($) => re("align"), ["stop"]))
2718
+ }, [
2719
+ (n(), he($e(O.value), { class: "h-[18px] w-[18px]" })),
2720
+ y(t(Le), { class: "h-3 w-3 text-slate-400" })
2721
+ ], 42, An),
2722
+ G.value === "align" ? (n(), r("div", Pn, [
2723
+ (n(!0), r(q, null, K(M.value, ($) => (n(), r("button", {
2724
+ key: $.id,
2725
+ type: "button",
2726
+ class: z(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", L($) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
2727
+ disabled: !s.editor,
2728
+ onMousedown: i[19] || (i[19] = R(() => {
2729
+ }, ["prevent"])),
2730
+ onClick: (ee) => ge($)
2731
+ }, [
2732
+ d($.iconComponent) ? (n(), he($e(d($.iconComponent)), {
2733
+ key: 0,
2734
+ class: "h-4 w-4"
2735
+ })) : H("", !0),
2736
+ e("span", null, l($.label ?? $.id), 1)
2737
+ ], 42, In))), 128))
2738
+ ])) : H("", !0)
2739
+ ])) : H("", !0),
2740
+ B.value.length ? (n(), r("div", Dn, [
2741
+ e("button", {
2742
+ type: "button",
2743
+ class: z([ve, "gap-1 px-2 text-xs font-medium"]),
2744
+ title: t(o)("toolbar.insert"),
2745
+ "aria-label": t(o)("toolbar.insert"),
2746
+ disabled: !s.editor,
2747
+ onMousedown: i[20] || (i[20] = R(() => {
2748
+ }, ["prevent"])),
2749
+ onClick: i[21] || (i[21] = R(($) => re("insert"), ["stop"]))
2750
+ }, [
2751
+ y(t(st), { class: "h-4 w-4" }),
2752
+ e("span", Hn, l(t(o)("toolbar.insert")), 1),
2753
+ y(t(Le), { class: "h-3 w-3 text-slate-400" })
2754
+ ], 42, Ln),
2755
+ G.value === "insert" ? (n(), r("div", zn, [
2756
+ (n(!0), r(q, null, K(B.value, ($) => (n(), r("button", {
2757
+ key: $.id,
2758
+ type: "button",
2759
+ class: z(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", L($) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
2760
+ disabled: !s.editor,
2761
+ onMousedown: i[22] || (i[22] = R(() => {
2762
+ }, ["prevent"])),
2763
+ onClick: (ee) => ge($)
2764
+ }, [
2765
+ d($.iconComponent) ? (n(), he($e(d($.iconComponent)), {
2766
+ key: 0,
2767
+ class: "h-4 w-4"
2768
+ })) : H("", !0),
2769
+ e("span", null, l($.label ?? $.id), 1)
2770
+ ], 42, Bn))), 128))
2771
+ ])) : H("", !0)
2772
+ ])) : H("", !0),
2773
+ i[30] || (i[30] = e("span", { class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10" }, null, -1)),
2774
+ e("button", {
2775
+ type: "button",
2776
+ class: z(["docs-editor-toolbar__control flex h-8 w-8 items-center justify-center rounded-md transition-all relative", be("comments")]),
2777
+ title: t(o)("toolbar.comments"),
2778
+ "aria-label": t(o)("toolbar.comments"),
2779
+ onClick: i[23] || (i[23] = ($) => c("toggle-sidebar", "comments"))
2780
+ }, [
2781
+ y(t(Wt), { class: "h-[18px] w-[18px]" })
2782
+ ], 10, jn),
2783
+ e("button", {
2784
+ type: "button",
2785
+ class: z(["docs-editor-toolbar__control flex h-8 w-8 items-center justify-center rounded-md transition-all", be("history")]),
2786
+ title: t(o)("toolbar.history"),
2787
+ "aria-label": t(o)("toolbar.history"),
2788
+ onClick: i[24] || (i[24] = ($) => c("toggle-sidebar", "history"))
2789
+ }, [
2790
+ y(t(qt), { class: "h-[18px] w-[18px]" })
2791
+ ], 10, Fn),
2792
+ e("button", {
2793
+ type: "button",
2794
+ class: z(["docs-editor-toolbar__control flex h-8 w-8 items-center justify-center rounded-md transition-all", be("ai")]),
2795
+ title: t(o)("toolbar.ai"),
2796
+ "aria-label": t(o)("toolbar.ai"),
2797
+ onClick: i[25] || (i[25] = ($) => c("toggle-sidebar", "ai"))
2798
+ }, [
2799
+ y(t(ht), { class: "h-[18px] w-[18px]" })
2800
+ ], 10, En),
2801
+ e("button", {
2802
+ type: "button",
2803
+ class: z(["docs-editor-toolbar__control flex h-8 w-8 items-center justify-center rounded-md transition-all", be("toc")]),
2804
+ title: t(o)("toolbar.tableOfContents"),
2805
+ "aria-label": t(o)("toolbar.tableOfContents"),
2806
+ onClick: i[26] || (i[26] = ($) => c("toggle-sidebar", "toc"))
2807
+ }, [
2808
+ y(t(Ne), { class: "h-[18px] w-[18px]" })
2809
+ ], 10, Rn)
2810
+ ])
2811
+ ]));
2812
+ }
2813
+ }), Kn = ["onClick"], Wn = "bg-cyan-500/15 text-cyan-600 dark:text-cyan-400 font-bold", Gn = "text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-white/5 hover:text-slate-900 dark:hover:text-white", Jn = /* @__PURE__ */ le({
2814
+ __name: "BubbleMenu",
2815
+ props: {
2816
+ visible: { type: Boolean },
2817
+ actions: {},
2818
+ position: {},
2819
+ editor: {}
2820
+ },
2821
+ setup(s) {
2822
+ const p = s, o = w(0);
2823
+ function a() {
2824
+ o.value++;
2825
+ }
2826
+ ae(
2827
+ () => p.editor,
2828
+ (k, u) => {
2829
+ u && u.off("transaction", a), k && k.on("transaction", a);
2830
+ },
2831
+ { immediate: !0 }
2832
+ ), Ae(() => {
2833
+ p.editor && p.editor.off("transaction", a);
2834
+ });
2835
+ const c = F(() => {
2836
+ var k, u, S, L;
2837
+ return o.value, [
2838
+ { id: "bold", label: "Bold", action: "toggleBold", icon: Ot, active: (k = p.editor) == null ? void 0 : k.isActive("bold") },
2839
+ { id: "italic", label: "Italic", action: "toggleItalic", icon: Ut, active: (u = p.editor) == null ? void 0 : u.isActive("italic") },
2840
+ { id: "underline", label: "Underline", action: "toggleUnderline", icon: Gt, active: (S = p.editor) == null ? void 0 : S.isActive("underline") },
2841
+ { id: "link", label: "Link", action: "setLink", icon: Kt, active: (L = p.editor) == null ? void 0 : L.isActive("link") }
2842
+ ];
2843
+ }), f = F(() => p.position ? {
2844
+ top: `${p.position.top}px`,
2845
+ left: `${p.position.left}px`
2846
+ } : {});
2847
+ function d(k) {
2848
+ var S, L, D, I, _;
2849
+ if (k === "setLink") {
2850
+ if ((S = p.editor) != null && S.isActive("link")) {
2851
+ p.editor.chain().focus().unsetLink().run();
2852
+ return;
2853
+ }
2854
+ const h = typeof window < "u" ? window.prompt("Enter link URL:", "https://") : null;
2855
+ if (h) {
2856
+ const g = p.actions[k];
2857
+ typeof g == "function" ? g({ href: h, target: "_blank" }) : (I = (D = (L = p.editor) == null ? void 0 : L.chain().focus()).setLink) == null || I.call(D, { href: h, target: "_blank" }).run();
2858
+ }
2859
+ return;
2860
+ }
2861
+ const u = p.actions[k];
2862
+ if (typeof u == "function")
2863
+ u();
2864
+ else if (p.editor) {
2865
+ const h = p.editor.chain().focus();
2866
+ (_ = h[k]) == null || _.call(h).run();
2867
+ }
2868
+ }
2869
+ return (k, u) => s.visible ? (n(), r("div", {
2870
+ key: 0,
2871
+ "data-testid": "bubble-menu",
2872
+ class: "docs-editor-bubble-menu fixed z-50 flex gap-1 rounded-xl border border-slate-200 bg-white p-1.5 shadow-2xl dark:border-white/10 dark:bg-[#0c1329]",
2873
+ style: me(f.value),
2874
+ onMousedown: u[0] || (u[0] = R(() => {
2875
+ }, ["prevent"]))
2876
+ }, [
2877
+ (n(!0), r(q, null, K(c.value, (S) => (n(), r("button", {
2878
+ key: S.id,
2879
+ type: "button",
2880
+ class: z([
2881
+ "docs-editor-bubble-menu__button flex items-center gap-1 rounded-lg px-2.5 py-1.5 text-xs font-semibold transition-all",
2882
+ S.active ? Wn : Gn
2883
+ ]),
2884
+ onClick: (L) => d(S.action)
2885
+ }, [
2886
+ (n(), he($e(S.icon), { class: "h-3.5 w-3.5" })),
2887
+ e("span", null, l(S.label), 1)
2888
+ ], 10, Kn))), 128))
2889
+ ], 36)) : H("", !0);
2890
+ }
2891
+ }), Jt = (s, p) => {
2892
+ const o = s.__vccOpts || s;
2893
+ for (const [a, c] of p)
2894
+ o[a] = c;
2895
+ return o;
2896
+ }, Zn = /* @__PURE__ */ Jt(Jn, [["__scopeId", "data-v-d9f45844"]]), Yn = {
2897
+ id: "editor-footer-row",
2898
+ class: "flex h-9 flex-shrink-0 items-center justify-between border-t border-slate-200 bg-white px-4 font-sans text-[11px] text-slate-400 dark:border-slate-800 dark:bg-[#0b1120]"
2899
+ }, Qn = { class: "flex items-center gap-2" }, Xn = { class: "flex items-center gap-1 font-bold" }, es = {
2900
+ key: 0,
2901
+ class: "relative mr-1 flex h-2 w-2"
2902
+ }, ts = {
2903
+ key: 1,
2904
+ class: "relative mr-1 flex h-2 w-2"
2905
+ }, as = {
2906
+ key: 2,
2907
+ class: "font-mono text-[10px] uppercase tracking-wide text-emerald-600 dark:text-cyan-400"
2908
+ }, os = {
2909
+ key: 3,
2910
+ class: "font-mono text-[10px] uppercase tracking-wide text-amber-600 dark:text-amber-500"
2911
+ }, ns = { class: "flex items-center gap-1.5 font-sans text-[11px] font-medium text-slate-500 dark:text-slate-400" }, ss = {
2912
+ key: 0,
2913
+ class: "animate-pulse font-semibold text-cyan-600 dark:text-cyan-400"
2914
+ }, ls = {
2915
+ key: 1,
2916
+ class: "font-semibold text-amber-600 dark:text-amber-500"
2917
+ }, rs = {
2918
+ key: 2,
2919
+ class: "flex items-center gap-1"
2920
+ }, is = { class: "rounded bg-slate-100 px-1.5 py-0.5 font-mono text-[10px] text-slate-700 dark:bg-white/5 dark:text-slate-300" }, ds = { class: "flex items-center gap-3 font-semibold text-slate-400 dark:text-slate-500" }, cs = ["value", "title", "aria-label"], us = ["value"], ps = { class: "font-mono text-slate-600 dark:text-slate-300" }, hs = { class: "font-mono text-slate-600 dark:text-slate-300" }, bs = { class: "font-mono text-slate-600 dark:text-slate-300" }, ms = { class: "font-mono text-slate-600 dark:text-slate-300" }, gs = /* @__PURE__ */ le({
2921
+ __name: "StatusBar",
2922
+ props: {
2923
+ connectionState: { default: "connected" },
2924
+ savingStatus: { default: "saved" },
2925
+ lastSaved: { default: void 0 },
2926
+ wordCount: { default: 0 },
2927
+ charCount: { default: 0 },
2928
+ pageCount: { default: 1 },
2929
+ currentPage: { default: 1 },
2930
+ pageSize: { default: "a4" },
2931
+ pageSizes: { default: () => [] }
2932
+ },
2933
+ emits: ["update:pageSize"],
2934
+ setup(s, { emit: p }) {
2935
+ const { t: o } = we(), a = s, c = p, f = F(() => a.lastSaved ? new Date(a.lastSaved).toLocaleTimeString([], {
2936
+ hour: "2-digit",
2937
+ minute: "2-digit",
2938
+ second: "2-digit"
2939
+ }) : o("statusBar.never")), d = F(() => {
2940
+ var k, u;
2941
+ return ((u = (k = a.pageSizes) == null ? void 0 : k.find((S) => S.id === a.pageSize)) == null ? void 0 : u.name) ?? a.pageSize.toUpperCase();
2942
+ });
2943
+ return (k, u) => (n(), r("footer", Yn, [
2944
+ e("div", Qn, [
2945
+ e("span", Xn, [
2946
+ s.connectionState === "connected" ? (n(), r("span", es, [...u[1] || (u[1] = [
2947
+ e("span", { class: "absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75" }, null, -1),
2948
+ e("span", { class: "relative inline-flex h-2 w-2 rounded-full bg-emerald-500" }, null, -1)
2949
+ ])])) : (n(), r("span", ts, [...u[2] || (u[2] = [
2950
+ e("span", { class: "h-2 w-2 animate-spin rounded-full border border-amber-500 border-t-transparent" }, null, -1)
2951
+ ])])),
2952
+ s.connectionState === "connected" ? (n(), r("span", as, l(t(o)("statusBar.liveSyncActive")), 1)) : (n(), r("span", os, l(t(o)("statusBar.connecting")), 1))
2953
+ ]),
2954
+ u[3] || (u[3] = e("span", { class: "text-slate-200 dark:text-white/10" }, "|", -1)),
2955
+ e("span", ns, [
2956
+ y(t(eo), {
2957
+ class: z(["h-3 w-3", s.savingStatus === "saving" ? "animate-spin text-cyan-500" : "text-emerald-500"])
2958
+ }, null, 8, ["class"]),
2959
+ s.savingStatus === "saving" ? (n(), r("span", ss, l(t(o)("statusBar.saving")), 1)) : s.savingStatus === "offline" ? (n(), r("span", ls, l(t(o)("statusBar.offline")), 1)) : (n(), r("span", rs, [
2960
+ e("span", null, l(t(o)("statusBar.lastSavedAt")), 1),
2961
+ e("strong", is, l(f.value), 1)
2962
+ ]))
2963
+ ])
2964
+ ]),
2965
+ e("div", ds, [
2966
+ e("select", {
2967
+ value: s.pageSize,
2968
+ title: d.value,
2969
+ class: "h-6 cursor-pointer rounded border border-slate-200 bg-white px-1.5 py-0.5 text-[11px] font-medium text-slate-600 outline-none hover:border-slate-300 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300",
2970
+ "aria-label": t(o)("statusBar.pageSize"),
2971
+ onChange: u[0] || (u[0] = (S) => c("update:pageSize", S.target.value))
2972
+ }, [
2973
+ (n(!0), r(q, null, K(s.pageSizes, (S) => (n(), r("option", {
2974
+ key: S.id,
2975
+ value: S.id
2976
+ }, l(S.name), 9, us))), 128))
2977
+ ], 40, cs),
2978
+ u[4] || (u[4] = e("span", { class: "text-slate-200 dark:text-white/10" }, "•", -1)),
2979
+ e("span", null, [
2980
+ oe(l(t(o)("statusBar.page")) + " ", 1),
2981
+ e("strong", ps, l(s.currentPage), 1),
2982
+ oe(" " + l(t(o)("statusBar.of")) + " ", 1),
2983
+ e("strong", hs, l(s.pageCount), 1)
2984
+ ]),
2985
+ u[5] || (u[5] = e("span", { class: "text-slate-200 dark:text-white/10" }, "•", -1)),
2986
+ e("span", null, [
2987
+ e("strong", bs, l(s.wordCount), 1),
2988
+ oe(" " + l(t(o)("statusBar.words")), 1)
2989
+ ]),
2990
+ u[6] || (u[6] = e("span", { class: "text-slate-200 dark:text-white/10" }, "•", -1)),
2991
+ e("span", null, [
2992
+ e("strong", ms, l(s.charCount), 1),
2993
+ oe(" " + l(t(o)("statusBar.characters")), 1)
2994
+ ])
2995
+ ])
2996
+ ]));
2997
+ }
2998
+ }), fs = { class: "docs-editor-ruler relative h-6 w-full flex-shrink-0 overflow-hidden border-b border-slate-200 bg-slate-50 dark:border-slate-800 dark:bg-[#0a0f1e]" }, vs = { class: "absolute inset-x-0 top-2.5 h-full" }, xs = {
2999
+ key: 0,
3000
+ class: "absolute -top-2 left-0.5 text-[9px] text-slate-400"
3001
+ }, ks = /* @__PURE__ */ le({
3002
+ __name: "RulerBar",
3003
+ props: {
3004
+ layoutOptions: {}
3005
+ },
3006
+ setup(s) {
3007
+ const p = s, o = F(() => {
3008
+ var d, k;
3009
+ return {
3010
+ pageWidth: ((d = p.layoutOptions) == null ? void 0 : d.pageWidth) ?? 794,
3011
+ margins: ((k = p.layoutOptions) == null ? void 0 : k.margins) ?? { top: 96, bottom: 96, left: 96, right: 96 }
3012
+ };
3013
+ }), a = F(() => {
3014
+ const d = Math.floor(o.value.pageWidth / 48);
3015
+ return Array.from({ length: d + 1 }, (k, u) => u * 48);
3016
+ }), c = F(() => `${o.value.margins.left}px`), f = F(() => `${o.value.pageWidth - o.value.margins.right}px`);
3017
+ return (d, k) => (n(), r("div", fs, [
3018
+ e("div", {
3019
+ class: "absolute inset-y-0 mx-auto h-full",
3020
+ style: me({ width: `${o.value.pageWidth}px`, left: "50%", transform: "translateX(-50%)" })
3021
+ }, [
3022
+ e("div", {
3023
+ class: "absolute top-0 z-10 h-0 w-0 border-l-[4px] border-r-[4px] border-t-[6px] border-l-transparent border-r-transparent border-t-blue-400",
3024
+ style: me({ left: c.value, transform: "translateX(-4px)" })
3025
+ }, null, 4),
3026
+ e("div", {
3027
+ class: "absolute top-0 z-10 h-0 w-0 border-l-[4px] border-r-[4px] border-t-[6px] border-l-transparent border-r-transparent border-t-blue-400",
3028
+ style: me({ left: f.value, transform: "translateX(-4px)" })
3029
+ }, null, 4),
3030
+ e("div", vs, [
3031
+ (n(!0), r(q, null, K(a.value, (u) => (n(), r("div", {
3032
+ key: u,
3033
+ class: z(["absolute top-0 border-l border-slate-300 dark:border-slate-600", u % 96 === 0 ? "h-3" : "h-1.5"]),
3034
+ style: me({ left: `${u}px` })
3035
+ }, [
3036
+ u % 96 === 0 && u > 0 ? (n(), r("span", xs, l(u / 96), 1)) : H("", !0)
3037
+ ], 6))), 128))
3038
+ ])
3039
+ ], 4)
3040
+ ]));
3041
+ }
3042
+ }), ys = { class: "relative h-full w-full" }, ws = {
3043
+ key: 0,
3044
+ class: "absolute -top-2 right-3 text-[9px] text-slate-400"
3045
+ }, _s = /* @__PURE__ */ le({
3046
+ __name: "VerticalRuler",
3047
+ props: {
3048
+ layoutOptions: {}
3049
+ },
3050
+ setup(s) {
3051
+ const p = s, o = F(() => {
3052
+ var c, f;
3053
+ return {
3054
+ pageHeight: ((c = p.layoutOptions) == null ? void 0 : c.pageHeight) ?? 1123,
3055
+ margins: ((f = p.layoutOptions) == null ? void 0 : f.margins) ?? { top: 96, bottom: 96, left: 96, right: 96 }
3056
+ };
3057
+ }), a = F(() => {
3058
+ const c = Math.floor(o.value.pageHeight / 48);
3059
+ return Array.from({ length: c + 1 }, (f, d) => d * 48);
3060
+ });
3061
+ return (c, f) => (n(), r("div", {
3062
+ class: "docs-editor-vertical-ruler sticky top-0 hidden w-6 flex-shrink-0 border-r border-slate-200 bg-slate-50 dark:border-slate-800 dark:bg-[#0a0f1e] lg:block",
3063
+ style: me({ minHeight: `${o.value.pageHeight}px` })
3064
+ }, [
3065
+ e("div", ys, [
3066
+ (n(!0), r(q, null, K(a.value, (d) => (n(), r("div", {
3067
+ key: d,
3068
+ class: z(["absolute right-0 border-t border-slate-300 dark:border-slate-600", d % 96 === 0 ? "w-3" : "w-1.5"]),
3069
+ style: me({ top: `${d}px` })
3070
+ }, [
3071
+ d % 96 === 0 && d > 0 ? (n(), r("span", ws, l(d / 96), 1)) : H("", !0)
3072
+ ], 6))), 128))
3073
+ ])
3074
+ ], 4));
3075
+ }
3076
+ }), $s = {
3077
+ key: 0,
3078
+ class: "docs-editor-quick-actions z-20 flex flex-wrap items-center justify-center gap-2 py-4"
3079
+ }, Ss = ["onClick"], Cs = /* @__PURE__ */ le({
3080
+ __name: "QuickActionChips",
3081
+ props: {
3082
+ visible: { type: Boolean }
3083
+ },
3084
+ emits: ["meeting-notes", "email-draft", "more"],
3085
+ setup(s, { emit: p }) {
3086
+ const { t: o } = we(), a = p, c = [
3087
+ { key: "meeting-notes", label: o("quickActions.meetingNotes"), icon: Ne },
3088
+ { key: "email-draft", label: o("quickActions.emailDraft"), icon: Ua },
3089
+ { key: "more", label: o("quickActions.more"), icon: La }
3090
+ ];
3091
+ return (f, d) => s.visible ? (n(), r("div", $s, [
3092
+ (n(), r(q, null, K(c, (k) => e("button", {
3093
+ key: k.key,
3094
+ type: "button",
3095
+ class: "flex items-center gap-1.5 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-xs font-medium text-slate-600 shadow-sm transition-colors hover:bg-slate-50 hover:text-slate-900 dark:border-slate-700 dark:bg-[#0a0f1e] dark:text-slate-300 dark:hover:bg-slate-800",
3096
+ onClick: (u) => a(k.key)
3097
+ }, [
3098
+ (n(), he($e(k.icon), { class: "h-3.5 w-3.5" })),
3099
+ e("span", null, l(k.label), 1)
3100
+ ], 8, Ss)), 64))
3101
+ ])) : H("", !0);
3102
+ }
3103
+ }), Ms = { class: "toc-sidebar flex h-full w-80 flex-shrink-0 flex-col border-r border-slate-200 bg-white/80 text-slate-800 backdrop-blur-xl transition-all animate-fadeIn dark:border-white/5 dark:bg-[#0a0f1e]/85 dark:text-slate-100" }, Ts = { class: "flex items-center justify-between border-b border-slate-200 p-4 dark:border-white/5" }, As = { class: "flex items-center gap-1.5 font-mono text-xs font-bold uppercase tracking-widest text-slate-500 dark:text-slate-400" }, Ps = { class: "mt-1 text-[10px] leading-relaxed text-slate-400 dark:text-slate-500" }, Is = ["title"], Ds = {
3104
+ key: 0,
3105
+ class: "px-4 pb-2 pt-3"
3106
+ }, Ls = { class: "relative flex items-center" }, Hs = ["placeholder"], zs = { class: "custom-scrollbar flex-1 overflow-y-auto p-4" }, Bs = {
3107
+ key: 0,
3108
+ class: "flex flex-col items-center justify-center py-12 text-center"
3109
+ }, js = { class: "mb-3 rounded-full bg-cyan-500/10 p-3 text-cyan-500 dark:bg-cyan-400/5" }, Fs = { class: "text-xs font-bold text-slate-700 dark:text-slate-300" }, Es = { class: "mt-1.5 max-w-[200px] text-[10px] leading-relaxed text-slate-400 dark:text-slate-500" }, Rs = { class: "mt-5 w-full space-y-2 px-4 font-sans" }, Ns = { class: "mb-1.5 block text-left text-[9px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500" }, Os = ["onClick"], Vs = { class: "flex items-center gap-1.5" }, qs = {
3110
+ key: 1,
3111
+ class: "flex flex-col items-center justify-center py-12 text-center text-slate-400"
3112
+ }, Us = { class: "text-xs font-semibold" }, Ks = { class: "mt-1 text-[10px] text-slate-400" }, Ws = {
3113
+ key: 2,
3114
+ class: "space-y-1 font-sans"
3115
+ }, Gs = { class: "mb-2.5 block text-[9px] font-bold uppercase tracking-widest text-slate-400 dark:text-slate-500" }, Js = { class: "relative ml-1.5 space-y-1.5 border-l border-slate-100 pl-1.5 dark:border-white/5" }, Zs = ["onClick"], Ys = { class: "flex min-w-0 flex-1 items-center gap-2" }, Qs = { class: "border-t border-slate-200 bg-slate-50/50 p-3.5 text-[10px] leading-relaxed text-slate-400 dark:border-white/5 dark:bg-slate-900/30 dark:text-slate-500" }, Xs = { class: "flex items-start gap-1.5" }, el = /* @__PURE__ */ le({
3116
+ __name: "TOCSidebar",
3117
+ props: {
3118
+ editor: {}
3119
+ },
3120
+ emits: ["close"],
3121
+ setup(s, { emit: p }) {
3122
+ const o = s, a = p, { t: c } = we(), f = w([]), d = w(""), k = w(null);
3123
+ function u() {
3124
+ if (!o.editor) return;
3125
+ const h = [];
3126
+ o.editor.state.doc.descendants((g, b) => {
3127
+ if (g.type.name === "heading") {
3128
+ const M = g.attrs.level;
3129
+ if (M === 1 || M === 2 || M === 3) {
3130
+ const P = g.textContent.trim();
3131
+ h.push({
3132
+ id: `heading-${b}`,
3133
+ text: P || c("sidebars.toc.untitledHeading").replace("{level}", String(M)),
3134
+ level: M,
3135
+ pos: b
3136
+ });
3137
+ }
3138
+ }
3139
+ return !0;
3140
+ }), f.value = h;
3141
+ }
3142
+ Oe(() => {
3143
+ var h;
3144
+ u(), (h = o.editor) == null || h.on("update", u);
3145
+ }), Ae(() => {
3146
+ var h;
3147
+ (h = o.editor) == null || h.off("update", u);
3148
+ }), ae(
3149
+ () => o.editor,
3150
+ (h, g) => {
3151
+ g == null || g.off("update", u), u(), h == null || h.on("update", u);
3152
+ }
3153
+ );
3154
+ const S = F(
3155
+ () => f.value.filter(
3156
+ (h) => h.text.toLowerCase().includes(d.value.toLowerCase())
3157
+ )
3158
+ );
3159
+ function L(h) {
3160
+ o.editor && (o.editor.chain().focus().setTextSelection(h.pos).run(), k.value = h.id, setTimeout(() => {
3161
+ var M;
3162
+ const g = document.querySelector(".docs-editor-scroll");
3163
+ if (!g) return;
3164
+ const b = g.querySelectorAll(
3165
+ ".ProseMirror h1, .ProseMirror h2, .ProseMirror h3"
3166
+ );
3167
+ for (const P of Array.from(b))
3168
+ if (((M = P.textContent) == null ? void 0 : M.trim()) === h.text) {
3169
+ P.scrollIntoView({ behavior: "smooth", block: "center" });
3170
+ return;
3171
+ }
3172
+ }, 50));
3173
+ }
3174
+ function D(h) {
3175
+ if (!o.editor) return;
3176
+ const g = c(h === 1 ? "header.heading1" : h === 2 ? "header.heading2" : "header.heading3"), b = c("sidebars.toc.newSection"), M = c("sidebars.toc.startWriting");
3177
+ o.editor.chain().focus().insertContent(`<h${h}>${b.replace("{tag}", g)}</h${h}><p>${M}</p>`).run();
3178
+ }
3179
+ function I(h, g) {
3180
+ const b = "group w-full flex items-center justify-between rounded-lg p-1.5 text-left transition-all relative", M = "bg-cyan-500/10 text-cyan-600 dark:text-cyan-400", P = "text-slate-600 hover:bg-slate-50 dark:text-slate-300 dark:hover:bg-white/5";
3181
+ return h === 1 ? [b, g ? M : P, "pl-0 font-bold text-xs text-slate-800 dark:text-slate-200"] : h === 2 ? [b, g ? M : P, "pl-3.5 font-semibold text-[11px] text-slate-600 dark:text-slate-300"] : [b, g ? M : P, "pl-6 text-[10px] text-slate-400 dark:text-slate-400"];
3182
+ }
3183
+ function _(h) {
3184
+ return h === 1 ? "bg-cyan-500" : h === 2 ? "bg-emerald-500" : "bg-amber-500";
3185
+ }
3186
+ return (h, g) => (n(), r("div", Ms, [
3187
+ e("div", Ts, [
3188
+ e("div", null, [
3189
+ e("h3", As, [
3190
+ y(t(nt), { class: "h-4 w-4 text-cyan-500" }),
3191
+ oe(" " + l(t(c)("sidebars.toc.title")), 1)
3192
+ ]),
3193
+ e("p", Ps, l(t(c)("sidebars.toc.empty")), 1)
3194
+ ]),
3195
+ e("button", {
3196
+ type: "button",
3197
+ class: "rounded-lg p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-white/5 dark:hover:text-white",
3198
+ title: t(c)("sidebars.toc.closeOutline"),
3199
+ onClick: g[0] || (g[0] = (b) => a("close"))
3200
+ }, [
3201
+ y(t(Dt), { class: "h-4 w-4" })
3202
+ ], 8, Is)
3203
+ ]),
3204
+ f.value.length > 0 ? (n(), r("div", Ds, [
3205
+ e("div", Ls, [
3206
+ y(t(Mt), { class: "absolute left-3 h-3.5 w-3.5 text-slate-400 dark:text-slate-500" }),
3207
+ de(e("input", {
3208
+ "onUpdate:modelValue": g[1] || (g[1] = (b) => d.value = b),
3209
+ type: "text",
3210
+ placeholder: t(c)("sidebars.toc.searchHeadings"),
3211
+ class: "w-full rounded-xl border border-slate-200/80 bg-slate-50 py-2 pl-9 pr-8 text-xs text-slate-700 transition-all focus:outline-none focus:ring-1 focus:ring-cyan-500/50 dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200 dark:focus:ring-cyan-400/30"
3212
+ }, null, 8, Hs), [
3213
+ [ce, d.value]
3214
+ ]),
3215
+ d.value ? (n(), r("button", {
3216
+ key: 0,
3217
+ type: "button",
3218
+ class: "absolute right-2.5 rounded-md p-0.5 text-slate-400 hover:bg-slate-200 hover:text-slate-600 dark:hover:bg-white/10 dark:hover:text-white",
3219
+ onClick: g[2] || (g[2] = (b) => d.value = "")
3220
+ }, [
3221
+ y(t(Dt), { class: "h-3 w-3" })
3222
+ ])) : H("", !0)
3223
+ ])
3224
+ ])) : H("", !0),
3225
+ e("div", zs, [
3226
+ f.value.length === 0 ? (n(), r("div", Bs, [
3227
+ e("div", js, [
3228
+ y(t(nt), { class: "h-6 w-6" })
3229
+ ]),
3230
+ e("h4", Fs, l(t(c)("sidebars.toc.noHeadings")), 1),
3231
+ e("p", Es, l(t(c)("sidebars.toc.noHeadingsDescription")), 1),
3232
+ e("div", Rs, [
3233
+ e("span", Ns, l(t(c)("sidebars.toc.quickInsert")), 1),
3234
+ (n(), r(q, null, K([1, 2, 3], (b) => e("button", {
3235
+ key: b,
3236
+ type: "button",
3237
+ class: "flex w-full items-center justify-between rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-[11px] font-semibold text-slate-700 transition-all hover:bg-slate-100 dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-300 dark:hover:bg-white/5",
3238
+ onClick: (M) => D(b)
3239
+ }, [
3240
+ e("span", Vs, [
3241
+ y(t(Ba), {
3242
+ class: z(["h-3 w-3", b === 1 ? "text-cyan-500" : b === 2 ? "text-emerald-500" : "text-amber-500"])
3243
+ }, null, 8, ["class"]),
3244
+ oe(" " + l(t(c)("sidebars.toc.headingLevel").replace("{level}", String(b))), 1)
3245
+ ]),
3246
+ y(t(st), { class: "h-3.5 w-3.5 text-slate-400" })
3247
+ ], 8, Os)), 64))
3248
+ ])
3249
+ ])) : S.value.length === 0 ? (n(), r("div", qs, [
3250
+ y(t(Mt), { class: "mb-2 h-5 w-5 text-slate-300" }),
3251
+ e("p", Us, l(t(c)("sidebars.toc.noMatchingHeaders")), 1),
3252
+ e("p", Ks, l(t(c)("sidebars.toc.tryDifferentTerm")), 1)
3253
+ ])) : (n(), r("div", Ws, [
3254
+ e("span", Gs, l(t(c)("sidebars.toc.outlineLayout")), 1),
3255
+ e("div", Js, [
3256
+ (n(!0), r(q, null, K(S.value, (b) => (n(), r("button", {
3257
+ key: b.id,
3258
+ type: "button",
3259
+ class: z(I(b.level, k.value === b.id)),
3260
+ onClick: (M) => L(b)
3261
+ }, [
3262
+ e("div", Ys, [
3263
+ e("span", {
3264
+ class: z(["h-1.5 w-1.5 shrink-0 rounded-full transition-all", [_(b.level), k.value === b.id ? "scale-125 opacity-100" : "opacity-40 group-hover:scale-110 group-hover:opacity-100"]])
3265
+ }, null, 2),
3266
+ e("span", {
3267
+ class: z(["flex-1 truncate leading-tight", k.value === b.id ? "text-cyan-600 dark:text-cyan-400" : ""])
3268
+ }, l(b.text), 3)
3269
+ ]),
3270
+ y(t(Aa), {
3271
+ class: z(["h-3 w-3 shrink-0 text-cyan-500 opacity-0 transition-opacity group-hover:opacity-100", k.value === b.id ? "opacity-100 text-cyan-600 dark:text-cyan-400" : ""])
3272
+ }, null, 8, ["class"])
3273
+ ], 10, Zs))), 128))
3274
+ ])
3275
+ ]))
3276
+ ]),
3277
+ e("div", Qs, [
3278
+ e("div", Xs, [
3279
+ y(t(Za), { class: "mt-0.5 h-3.5 w-3.5 shrink-0 text-cyan-500" }),
3280
+ e("p", null, l(t(c)("sidebars.toc.outlineSync")), 1)
3281
+ ])
3282
+ ])
3283
+ ]));
3284
+ }
3285
+ }), tl = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden bg-slate-50 transition-colors dark:bg-[#02040a]" }, al = { class: "docs-editor__body relative flex flex-1 overflow-hidden" }, ol = ["title"], nl = { class: "flex flex-1 flex-col items-center gap-4 w-full relative" }, sl = { class: "relative w-full max-w-[794px]" }, ll = ["aria-label"], rl = {
3286
+ key: 0,
3287
+ class: "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 backdrop-blur-sm px-4"
3288
+ }, il = { class: "w-full max-w-lg rounded-xl border border-slate-200 bg-white p-6 shadow-2xl dark:border-slate-800 dark:bg-[#0e1525] text-slate-800 dark:text-slate-200" }, dl = { class: "text-lg font-bold mb-4" }, cl = { class: "mb-4" }, ul = { class: "flex justify-between items-center mb-2" }, pl = { class: "text-sm font-semibold text-slate-500 dark:text-slate-400" }, hl = { class: "grid grid-cols-2 gap-3" }, bl = { class: "text-[11px] font-medium block mb-1" }, ml = ["placeholder"], gl = { class: "text-[11px] font-medium block mb-1" }, fl = ["placeholder"], vl = { class: "mb-6" }, xl = { class: "flex justify-between items-center mb-2" }, kl = { class: "text-sm font-semibold text-slate-500 dark:text-slate-400" }, yl = { class: "grid grid-cols-2 gap-3" }, wl = { class: "text-[11px] font-medium block mb-1" }, _l = ["placeholder"], $l = { class: "text-[11px] font-medium block mb-1" }, Sl = ["placeholder"], Cl = { class: "rounded-lg bg-slate-50 p-3 text-[11px] text-slate-500 dark:bg-white/5 dark:text-slate-400 mb-6" }, Ml = { class: "flex justify-end gap-2" }, Tl = {
3289
+ key: 1,
3290
+ class: "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 backdrop-blur-sm px-4"
3291
+ }, Al = { class: "w-full max-w-md rounded-xl border border-slate-200 bg-white p-6 shadow-2xl dark:border-slate-800 dark:bg-[#0e1525] text-slate-800 dark:text-slate-200" }, Pl = { class: "text-lg font-bold mb-4" }, Il = { class: "mb-4" }, Dl = { class: "block text-xs font-semibold text-slate-600 dark:text-slate-400 mb-1.5" }, Ll = ["value"], Hl = { class: "mb-4" }, zl = { class: "block text-xs font-semibold text-slate-600 dark:text-slate-400 mb-1.5" }, Bl = { class: "flex gap-2" }, jl = { class: "mb-6" }, Fl = { class: "block text-xs font-semibold text-slate-600 dark:text-slate-400 mb-1.5" }, El = { class: "grid grid-cols-2 gap-3" }, Rl = { class: "text-[11px] text-slate-500 dark:text-slate-400 block mb-1" }, Nl = { class: "text-[11px] text-slate-500 dark:text-slate-400 block mb-1" }, Ol = { class: "text-[11px] text-slate-500 dark:text-slate-400 block mb-1" }, Vl = { class: "text-[11px] text-slate-500 dark:text-slate-400 block mb-1" }, ql = { class: "flex justify-end gap-2" }, Ul = /* @__PURE__ */ le({
3292
+ __name: "DocsEditor",
3293
+ props: {
3294
+ modelValue: { default: void 0 },
3295
+ plugins: { default: () => [] },
3296
+ editable: { type: Boolean, default: !0 },
3297
+ collaboration: { default: void 0 },
3298
+ pageSize: { default: "a4" },
3299
+ title: { default: "Untitled Document" },
3300
+ collaborators: { default: () => [] },
3301
+ starred: { type: Boolean, default: !1 },
3302
+ connectionState: { default: "connected" },
3303
+ userName: { default: "" },
3304
+ userAvatar: { default: "" },
3305
+ locale: { default: void 0 }
3306
+ },
3307
+ emits: ["update:modelValue", "update:title", "update:pageSize", "update:locale", "toggle-star", "back", "share", "menu-click", "export", "ready"],
3308
+ setup(s, { emit: p }) {
3309
+ const o = s, a = p, { locale: c, setLocale: f, t: d } = ha(o.locale);
3310
+ ae(
3311
+ () => o.locale,
3312
+ (x) => {
3313
+ x && x !== c.value && f(x);
3314
+ }
3315
+ ), ae(c, (x) => {
3316
+ a("update:locale", x);
3317
+ });
3318
+ const k = w({ top: 72, bottom: 72, left: 90, right: 90 }), u = w("portrait"), S = w(o.pageSize ?? "a4"), L = w(!1), D = F(() => {
3319
+ const x = ra(S.value) ?? rt[0];
3320
+ let m = x.pageWidth, v = x.pageHeight;
3321
+ return u.value === "landscape" && ([m, v] = [v, m]), L.value && (v = 9999999), { pageHeight: v, pageWidth: m, margins: { ...k.value } };
3322
+ }), { isDark: I } = zt(), _ = F(() => ({
3323
+ enabled: !L.value,
3324
+ pageHeight: D.value.pageHeight,
3325
+ pageWidth: D.value.pageWidth,
3326
+ marginTop: D.value.margins.top,
3327
+ marginBottom: D.value.margins.bottom,
3328
+ marginLeft: D.value.margins.left,
3329
+ marginRight: D.value.margins.right,
3330
+ contentMarginTop: 10,
3331
+ contentMarginBottom: 10,
3332
+ pageGap: 40,
3333
+ pageBreakBackground: I.value ? "#02040a" : "#f1f5f9",
3334
+ headerLeft: "",
3335
+ headerRight: "",
3336
+ footerLeft: "",
3337
+ footerRight: "",
3338
+ onHeaderClick: () => {
3339
+ lt();
3340
+ },
3341
+ onFooterClick: () => {
3342
+ lt();
3343
+ }
3344
+ })), g = ((x) => {
3345
+ const m = x;
3346
+ return m && typeof m == "object" && m.type === "tabbed-doc" && Array.isArray(m.tabs) ? m : { type: "tabbed-doc", activeTabId: "tab-1", tabs: [{ id: "tab-1", label: "Tab 1", content: x || { type: "doc", content: [{ type: "paragraph" }] } }] };
3347
+ })(o.modelValue), b = w(g.headerLeft || ""), M = w(g.headerRight || ""), P = w(g.footerLeft || ""), B = w(g.footerRight || ""), j = w(g.tabs.map((x) => ({ id: x.id, label: x.label, active: x.id === g.activeTabId }))), O = w({});
3348
+ g.tabs.forEach((x) => {
3349
+ O.value[x.id] = x.content;
3350
+ });
3351
+ const G = w(g.activeTabId), re = F(() => O.value[G.value]), ge = w(!1), fe = w(null), be = w(null), E = w(!1), N = w(0), U = w(0), ie = w("saved"), Se = w(Date.now()), X = w(null), Ye = F(() => {
3352
+ const x = [];
3353
+ for (const m of o.plugins)
3354
+ for (const v of m.slashCommands || [])
3355
+ x.push({ name: v.name, command: v.command });
3356
+ return x;
3357
+ }), { editorRef: Ve, editor: A, pluginActions: Qe, isReady: xe, docsEditor: Pe } = ia({
3358
+ content: re,
3359
+ plugins: o.plugins,
3360
+ editable: o.editable,
3361
+ collaboration: o.collaboration,
3362
+ getPageMap: () => /* @__PURE__ */ new Map(),
3363
+ paginationOptions: _.value,
3364
+ onUpdate: (x) => {
3365
+ O.value[G.value] = x;
3366
+ const m = {
3367
+ type: "tabbed-doc",
3368
+ activeTabId: G.value,
3369
+ tabs: j.value.map((v) => ({ id: v.id, label: v.label, content: O.value[v.id] })),
3370
+ headerLeft: b.value,
3371
+ headerRight: M.value,
3372
+ footerLeft: P.value,
3373
+ footerRight: B.value
3374
+ };
3375
+ a("update:modelValue", m), ie.value = "saving", X.value && clearTimeout(X.value), X.value = setTimeout(() => {
3376
+ try {
3377
+ localStorage.setItem("docs-editor-current-doc", JSON.stringify(m));
3378
+ } catch {
3379
+ }
3380
+ ie.value = "saved", Se.value = Date.now();
3381
+ }, 800);
3382
+ }
3383
+ }), ze = F(() => {
3384
+ if (!A.value) return !0;
3385
+ const x = A.value.getJSON();
3386
+ return !x.content || x.content.length === 0 ? !0 : x.content.every((m) => m.type === "paragraph" && (!m.content || m.content.length === 0));
3387
+ }), qe = () => {
3388
+ var m;
3389
+ const x = ((m = A.value) == null ? void 0 : m.getText()) ?? "";
3390
+ U.value = x.length, N.value = x.trim() ? x.trim().split(/\s+/).length : 0;
3391
+ }, C = () => {
3392
+ if (!A.value) return null;
3393
+ const { from: x, to: m } = A.value.state.selection;
3394
+ if (x === m) return null;
3395
+ const v = A.value.view.coordsAtPos(x);
3396
+ return v ? { top: v.top - 48, left: v.left + (v.right - v.left) / 2 } : null;
3397
+ }, i = () => {
3398
+ if (!A.value) {
3399
+ ge.value = !1, fe.value = null;
3400
+ return;
3401
+ }
3402
+ const { from: x, to: m } = A.value.state.selection;
3403
+ ge.value = x !== m, fe.value = x !== m ? C() : null;
3404
+ }, $ = w(null);
3405
+ let ee = null;
3406
+ const ue = () => {
3407
+ A.value && (ee && clearTimeout(ee), ee = setTimeout(() => {
3408
+ A.value && A.value.view.dispatch(A.value.state.tr);
3409
+ }, 150));
3410
+ }, ne = w(1), Ce = w(1), Me = () => {
3411
+ if (!A.value || !xe.value) {
3412
+ ne.value = 1, Ce.value = 1;
3413
+ return;
3414
+ }
3415
+ const x = A.value.view.dom, m = x.querySelector("[data-rm-pagination]");
3416
+ m ? ne.value = m.children.length || 1 : ne.value = 1;
3417
+ try {
3418
+ const { selection: v } = A.value.state, J = A.value.view.coordsAtPos(v.head);
3419
+ if (J && m) {
3420
+ const Y = Array.from(m.querySelectorAll(".rm-page-break")), se = x.getBoundingClientRect(), W = J.top - se.top + x.scrollTop;
3421
+ let V = 1, Q = !1;
3422
+ for (let te = 0; te < Y.length; te++) {
3423
+ const Z = Y[te].querySelector(".breaker");
3424
+ if (Z instanceof HTMLElement && W < Z.offsetTop) {
3425
+ Ce.value = V, Q = !0;
3426
+ break;
3427
+ }
3428
+ V++;
3429
+ }
3430
+ Q || (Ce.value = V);
3431
+ } else
3432
+ Ce.value = 1;
3433
+ } catch {
3434
+ Ce.value = 1;
3435
+ }
3436
+ };
3437
+ ae(D, (x) => {
3438
+ A.value && (A.value.commands.updatePageHeight(x.pageHeight), A.value.commands.updatePageWidth(x.pageWidth), A.value.commands.updateMargins({
3439
+ top: x.margins.top,
3440
+ bottom: x.margins.bottom,
3441
+ left: x.margins.left,
3442
+ right: x.margins.right
3443
+ }), Me());
3444
+ });
3445
+ const Be = () => {
3446
+ if (!A.value || !xe.value) return;
3447
+ const x = b.value.replace(/{total}/g, String(ne.value)), m = M.value.replace(/{total}/g, String(ne.value)), v = P.value.replace(/{total}/g, String(ne.value)), J = B.value.replace(/{total}/g, String(ne.value));
3448
+ A.value.commands.updateHeaderContent(x, m), A.value.commands.updateFooterContent(v, J);
3449
+ };
3450
+ ae(ne, () => {
3451
+ Be();
3452
+ }), ae(I, (x) => {
3453
+ A.value && A.value.commands.updatePageBreakBackground(x ? "#02040a" : "#f1f5f9");
3454
+ }), ae(xe, (x) => {
3455
+ var m, v, J, Y, se, W, V, Q;
3456
+ x && A.value && (!b.value && !M.value && !P.value && !B.value && (b.value = ((v = (m = A.value.storage.PaginationPlus) == null ? void 0 : m.appliedConfig) == null ? void 0 : v.headerLeft) || "", M.value = ((Y = (J = A.value.storage.PaginationPlus) == null ? void 0 : J.appliedConfig) == null ? void 0 : Y.headerRight) || "", P.value = ((W = (se = A.value.storage.PaginationPlus) == null ? void 0 : se.appliedConfig) == null ? void 0 : W.footerLeft) || "", B.value = ((Q = (V = A.value.storage.PaginationPlus) == null ? void 0 : V.appliedConfig) == null ? void 0 : Q.footerRight) || ""), Be(), Pe.value && a("ready", Pe.value), A.value.on("selectionUpdate", () => {
3457
+ i(), Me();
3458
+ }), A.value.on("transaction", () => {
3459
+ Me(), qe();
3460
+ }), i(), qe(), Me(), setTimeout(() => {
3461
+ var Z;
3462
+ return (Z = A.value) == null ? void 0 : Z.commands.focus("start");
3463
+ }, 50), [100, 300, 600, 1200, 2500].forEach((Z) => {
3464
+ setTimeout(() => {
3465
+ A.value && A.value.view.dispatch(A.value.state.tr);
3466
+ }, Z);
3467
+ }));
3468
+ }), ae(() => o.collaboration, () => {
3469
+ }, { deep: !0 }), Ae(() => {
3470
+ X.value && clearTimeout(X.value), ee && clearTimeout(ee);
3471
+ });
3472
+ const Xe = w(!1), Ue = w(""), Ke = w(""), We = w(""), Ge = w(""), et = w(!1), tt = w(S.value), je = w(u.value), _e = w({ ...k.value }), Zt = () => {
3473
+ tt.value = S.value, je.value = u.value, _e.value = { ...k.value }, et.value = !0;
3474
+ }, Yt = () => {
3475
+ S.value = tt.value, u.value = je.value, k.value = { ..._e.value }, a("update:pageSize", S.value), et.value = !1;
3476
+ }, lt = () => {
3477
+ var x, m, v, J, Y, se, W, V;
3478
+ A.value && (Ue.value = b.value || ((m = (x = A.value.storage.PaginationPlus) == null ? void 0 : x.appliedConfig) == null ? void 0 : m.headerLeft) || "", Ke.value = M.value || ((J = (v = A.value.storage.PaginationPlus) == null ? void 0 : v.appliedConfig) == null ? void 0 : J.headerRight) || "", We.value = P.value || ((se = (Y = A.value.storage.PaginationPlus) == null ? void 0 : Y.appliedConfig) == null ? void 0 : se.footerLeft) || "", Ge.value = B.value || ((V = (W = A.value.storage.PaginationPlus) == null ? void 0 : W.appliedConfig) == null ? void 0 : V.footerRight) || "", Xe.value = !0);
3479
+ }, Qt = () => {
3480
+ if (!A.value) return;
3481
+ b.value = Ue.value, M.value = Ke.value, P.value = We.value, B.value = Ge.value, Be();
3482
+ const x = {
3483
+ type: "tabbed-doc",
3484
+ activeTabId: G.value,
3485
+ tabs: j.value.map((m) => ({ id: m.id, label: m.label, content: O.value[m.id] })),
3486
+ headerLeft: b.value,
3487
+ headerRight: M.value,
3488
+ footerLeft: P.value,
3489
+ footerRight: B.value
3490
+ };
3491
+ a("update:modelValue", x), ie.value = "saving", X.value && clearTimeout(X.value), X.value = setTimeout(() => {
3492
+ try {
3493
+ localStorage.setItem("docs-editor-current-doc", JSON.stringify(x));
3494
+ } catch {
3495
+ }
3496
+ ie.value = "saved", Se.value = Date.now();
3497
+ }, 800), Xe.value = !1;
3498
+ };
3499
+ let Xt = (x) => {
3500
+ if (x === "page-setup")
3501
+ Zt();
3502
+ else if (x === "print")
3503
+ gt();
3504
+ else if (x === "version-history")
3505
+ mt("history");
3506
+ else if (x === "insert-header" || x === "insert-footer")
3507
+ lt();
3508
+ else if (x === "insert-footnote") {
3509
+ if (!A.value) return;
3510
+ const { state: m, view: v } = A.value, J = m.schema.nodes.footnote;
3511
+ if (!J) {
3512
+ console.error("[DocsEditor] footnote node type not registered in schema");
3513
+ return;
3514
+ }
3515
+ const Y = m.selection.head, se = J.create({ content: "" }), W = m.tr.insert(Y, se);
3516
+ v.dispatch(W), v.focus(), setTimeout(() => {
3517
+ Je();
3518
+ const V = document.querySelectorAll(".docs-footnote-item-text"), Q = V[V.length - 1];
3519
+ Q && (Q.scrollIntoView({ behavior: "smooth", block: "nearest" }), Q.focus());
3520
+ }, 160);
3521
+ } else
3522
+ a("menu-click", x);
3523
+ }, mt = (x) => {
3524
+ be.value = be.value === x ? null : x;
3525
+ }, gt = () => window.print();
3526
+ const ft = (x, m) => {
3527
+ if (!A.value) return;
3528
+ const v = A.value.view;
3529
+ v.state.doc.descendants((J, Y) => {
3530
+ if (J.type.name === "footnote" && v.nodeDOM(Y) === x)
3531
+ return v.dispatch(v.state.tr.setNodeMarkup(Y, void 0, { content: m })), !1;
3532
+ });
3533
+ }, Je = () => {
3534
+ var se;
3535
+ if (!A.value || !xe.value) return;
3536
+ const x = A.value.view.dom, m = x.querySelector("[data-rm-pagination]");
3537
+ if (!m) return;
3538
+ const v = Array.from(m.querySelectorAll(".rm-page-break")), J = Array.from(x.querySelectorAll(".docs-footnote-ref"));
3539
+ if (v.length === 0) {
3540
+ J.forEach((Z, Ie) => {
3541
+ Z.textContent = String(Ie + 1);
3542
+ });
3543
+ const W = Ve.value;
3544
+ if (!W || ((se = W.querySelector(".docs-pageless-footnotes")) == null || se.remove(), J.length === 0)) return;
3545
+ const V = W.querySelector(".docs-pageless-footnotes");
3546
+ if (V != null && V.querySelector(".docs-footnote-item-text:focus")) return;
3547
+ const Q = document.createElement("div");
3548
+ Q.className = "docs-page-footnotes docs-pageless-footnotes";
3549
+ const te = document.createElement("div");
3550
+ te.className = "docs-footnotes-sep", Q.appendChild(te), J.forEach((Z, Ie) => {
3551
+ const Fe = Z.getAttribute("data-footnote-content") ?? "", ke = document.createElement("div");
3552
+ ke.className = "docs-footnote-item";
3553
+ const Te = document.createElement("sup");
3554
+ Te.className = "docs-footnote-item-num", Te.textContent = String(Ie + 1);
3555
+ const pe = document.createElement("div");
3556
+ pe.className = "docs-footnote-item-text", pe.contentEditable = "true", pe.textContent = Fe, Fe || pe.setAttribute("data-empty", "true"), pe.addEventListener("input", () => {
3557
+ pe.removeAttribute("data-empty"), pe.textContent || pe.setAttribute("data-empty", "true");
3558
+ }), pe.addEventListener("blur", () => {
3559
+ var Ee;
3560
+ const De = ((Ee = pe.textContent) == null ? void 0 : Ee.trim()) ?? "";
3561
+ ft(Z, De);
3562
+ }), Z.dataset.footnoteItemId = `fn-pageless-${Ie}`, ke.id = `fn-pageless-${Ie}`, ke.appendChild(Te), ke.appendChild(pe), Q.appendChild(ke);
3563
+ }), W.appendChild(Q);
3564
+ return;
3565
+ }
3566
+ const Y = /* @__PURE__ */ new Map();
3567
+ v.forEach((W, V) => Y.set(V, [])), J.forEach((W) => {
3568
+ const V = W.getBoundingClientRect().top;
3569
+ let Q = v.length - 1;
3570
+ for (let te = 0; te < v.length - 1; te++) {
3571
+ const Z = v[te].querySelector(".breaker");
3572
+ if (Z && V < Z.getBoundingClientRect().top) {
3573
+ Q = te;
3574
+ break;
3575
+ }
3576
+ }
3577
+ Y.get(Q).push(W);
3578
+ }), v.forEach((W, V) => {
3579
+ const Q = Y.get(V) ?? [];
3580
+ Q.forEach((ke, Te) => {
3581
+ ke.textContent = String(Te + 1);
3582
+ });
3583
+ const te = W.querySelector(".docs-page-footnotes");
3584
+ if (te != null && te.querySelector(".docs-footnote-item-text:focus") || (te == null || te.remove(), Q.length === 0)) return;
3585
+ const Z = document.createElement("div");
3586
+ Z.className = "docs-page-footnotes";
3587
+ const Ie = document.createElement("div");
3588
+ Ie.className = "docs-footnotes-sep", Z.appendChild(Ie), Q.forEach((ke, Te) => {
3589
+ const pe = ke.getAttribute("data-footnote-content") ?? "", De = document.createElement("div");
3590
+ De.className = "docs-footnote-item";
3591
+ const Ee = document.createElement("sup");
3592
+ Ee.className = "docs-footnote-item-num", Ee.textContent = String(Te + 1);
3593
+ const ye = document.createElement("div");
3594
+ ye.className = "docs-footnote-item-text", ye.contentEditable = "true", ye.textContent = pe, pe || ye.setAttribute("data-empty", "true"), ye.addEventListener("input", () => {
3595
+ ye.removeAttribute("data-empty"), ye.textContent || ye.setAttribute("data-empty", "true");
3596
+ }), ye.addEventListener("blur", () => {
3597
+ var vt;
3598
+ const ea = ((vt = ye.textContent) == null ? void 0 : vt.trim()) ?? "";
3599
+ ft(ke, ea);
3600
+ }), ke.dataset.footnoteItemId = `fn-${V}-${Te}`, De.id = `fn-${V}-${Te}`, De.appendChild(Ee), De.appendChild(ye), Z.appendChild(De);
3601
+ });
3602
+ const Fe = W.querySelector(".breaker");
3603
+ Fe ? Fe.insertBefore(Z, Fe.firstChild) : W.appendChild(Z);
3604
+ });
3605
+ };
3606
+ return ae(xe, (x) => {
3607
+ !x || !A.value || A.value.view.dom.addEventListener("click", (m) => {
3608
+ const v = m.target.closest(".docs-footnote-ref");
3609
+ if (!v) return;
3610
+ m.preventDefault(), m.stopPropagation();
3611
+ const J = v.dataset.footnoteItemId;
3612
+ if (!J) return;
3613
+ const Y = document.getElementById(J), se = Y == null ? void 0 : Y.querySelector(".docs-footnote-item-text");
3614
+ if (se) {
3615
+ se.scrollIntoView({ behavior: "smooth", block: "nearest" }), se.focus();
3616
+ const W = document.createRange();
3617
+ W.selectNodeContents(se), W.collapse(!1);
3618
+ const V = window.getSelection();
3619
+ V == null || V.removeAllRanges(), V == null || V.addRange(W);
3620
+ }
3621
+ });
3622
+ }), ae(xe, (x) => {
3623
+ !x || !A.value || (setTimeout(Je, 150), A.value.on("update", () => {
3624
+ setTimeout(Je, 60);
3625
+ }), A.value.on("selectionUpdate", () => {
3626
+ setTimeout(Je, 100);
3627
+ }), window.addEventListener("resize", Je));
3628
+ }), (x, m) => (n(), r("div", tl, [
3629
+ y(Xo, {
3630
+ title: s.title,
3631
+ editable: s.editable,
3632
+ collaborators: s.collaborators,
3633
+ starred: s.starred,
3634
+ "user-name": s.userName,
3635
+ "user-avatar": s.userAvatar,
3636
+ onMenuClick: t(Xt),
3637
+ onBack: m[0] || (m[0] = (v) => x.$emit("back")),
3638
+ "onUpdate:title": m[1] || (m[1] = (v) => x.$emit("update:title", v)),
3639
+ onToggleStar: m[2] || (m[2] = (v) => x.$emit("toggle-star")),
3640
+ onExport: m[3] || (m[3] = (v) => x.$emit("export", v)),
3641
+ onShare: m[4] || (m[4] = (v) => x.$emit("share"))
3642
+ }, {
3643
+ actions: He(() => [
3644
+ Re(x.$slots, "header-actions", {}, void 0, !0)
3645
+ ]),
3646
+ "overflow-actions": He((v) => [
3647
+ Re(x.$slots, "overflow-actions", kt(yt(v)), void 0, !0)
3648
+ ]),
3649
+ "user-menu": He((v) => [
3650
+ Re(x.$slots, "user-menu", kt(yt(v)), void 0, !0)
3651
+ ]),
3652
+ _: 3
3653
+ }, 8, ["title", "editable", "collaborators", "starred", "user-name", "user-avatar", "onMenuClick"]),
3654
+ y(Un, {
3655
+ actions: t(Qe),
3656
+ plugins: s.plugins,
3657
+ editor: t(A),
3658
+ "active-sidebar": be.value,
3659
+ onToggleSidebar: t(mt),
3660
+ onPrint: t(gt),
3661
+ onToggleLeftSidebar: m[5] || (m[5] = (v) => E.value = !E.value)
3662
+ }, null, 8, ["actions", "plugins", "editor", "active-sidebar", "onToggleSidebar", "onPrint"]),
3663
+ y(ks, { "layout-options": D.value }, null, 8, ["layout-options"]),
3664
+ y(Zn, {
3665
+ visible: ge.value,
3666
+ actions: t(Qe),
3667
+ position: fe.value,
3668
+ editor: t(A)
3669
+ }, null, 8, ["visible", "actions", "position", "editor"]),
3670
+ y(xa, {
3671
+ editor: t(A),
3672
+ commands: Ye.value
3673
+ }, null, 8, ["editor", "commands"]),
3674
+ e("div", al, [
3675
+ E.value ? (n(), he(el, {
3676
+ key: 0,
3677
+ editor: t(A),
3678
+ onClose: m[6] || (m[6] = (v) => E.value = !1)
3679
+ }, null, 8, ["editor"])) : (n(), r("button", {
3680
+ key: 1,
3681
+ type: "button",
3682
+ class: "absolute left-4 top-4 z-20 flex h-11 w-11 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 shadow-md transition-colors hover:bg-slate-100 dark:border-white/10 dark:bg-[#0e1525] dark:text-slate-300 dark:hover:bg-white/5",
3683
+ title: t(d)("editor.showOutline"),
3684
+ onClick: m[7] || (m[7] = (v) => E.value = !0)
3685
+ }, [
3686
+ y(t(Ka), { class: "h-5 w-5" })
3687
+ ], 8, ol)),
3688
+ e("div", {
3689
+ ref_key: "scrollContainerRef",
3690
+ ref: $,
3691
+ class: "docs-editor-scroll relative flex flex-1 overflow-auto px-4 py-6 bg-slate-100 dark:bg-[#02040a]",
3692
+ onScroll: ue
3693
+ }, [
3694
+ y(_s, { "layout-options": D.value }, null, 8, ["layout-options"]),
3695
+ e("div", nl, [
3696
+ y(Cs, {
3697
+ visible: t(xe) && ze.value,
3698
+ onMeetingNotes: () => {
3699
+ },
3700
+ onEmailDraft: () => {
3701
+ },
3702
+ onMore: () => {
3703
+ }
3704
+ }, null, 8, ["visible"]),
3705
+ e("div", sl, [
3706
+ t(xe) ? H("", !0) : (n(), r("div", {
3707
+ key: 0,
3708
+ class: "absolute inset-0 z-10 flex flex-col items-center justify-center bg-white dark:bg-[#0e1525]/60 backdrop-blur-[2px] gap-3 rounded-lg",
3709
+ "aria-label": t(d)("editor.loadingDocument")
3710
+ }, null, 8, ll)),
3711
+ e("div", {
3712
+ ref_key: "editorRef",
3713
+ ref: Ve,
3714
+ class: z(["docs-editor__paper outline-none text-slate-800 dark:text-[#e2e8f0]", { "opacity-40": !t(xe) }])
3715
+ }, null, 2)
3716
+ ])
3717
+ ])
3718
+ ], 544)
3719
+ ]),
3720
+ y(gs, {
3721
+ "connection-state": s.connectionState,
3722
+ "saving-status": ie.value,
3723
+ "last-saved": Se.value,
3724
+ "word-count": N.value,
3725
+ "char-count": U.value,
3726
+ "page-count": ne.value,
3727
+ "current-page": Ce.value,
3728
+ "page-size": S.value,
3729
+ "page-sizes": t(rt),
3730
+ "onUpdate:pageSize": m[8] || (m[8] = (v) => {
3731
+ S.value = v, a("update:pageSize", v);
3732
+ })
3733
+ }, null, 8, ["connection-state", "saving-status", "last-saved", "word-count", "char-count", "page-count", "current-page", "page-size", "page-sizes"]),
3734
+ Xe.value ? (n(), r("div", rl, [
3735
+ e("div", il, [
3736
+ e("h2", dl, l(t(d)("editor.headerFooter.title")), 1),
3737
+ e("div", cl, [
3738
+ e("div", ul, [
3739
+ e("h3", pl, l(t(d)("editor.headerFooter.header")), 1),
3740
+ e("button", {
3741
+ type: "button",
3742
+ class: "text-[11px] text-red-500 hover:text-red-600 font-medium transition-colors",
3743
+ onClick: m[9] || (m[9] = (v) => {
3744
+ Ue.value = "", Ke.value = "";
3745
+ })
3746
+ }, l(t(d)("editor.headerFooter.clear")), 1)
3747
+ ]),
3748
+ e("div", hl, [
3749
+ e("div", null, [
3750
+ e("label", bl, l(t(d)("editor.headerFooter.left")), 1),
3751
+ de(e("input", {
3752
+ "onUpdate:modelValue": m[10] || (m[10] = (v) => Ue.value = v),
3753
+ type: "text",
3754
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700",
3755
+ placeholder: t(d)("editor.headerFooter.headerLeftPlaceholder")
3756
+ }, null, 8, ml), [
3757
+ [ce, Ue.value]
3758
+ ])
3759
+ ]),
3760
+ e("div", null, [
3761
+ e("label", gl, l(t(d)("editor.headerFooter.right")), 1),
3762
+ de(e("input", {
3763
+ "onUpdate:modelValue": m[11] || (m[11] = (v) => Ke.value = v),
3764
+ type: "text",
3765
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700",
3766
+ placeholder: t(d)("editor.headerFooter.headerRightPlaceholder")
3767
+ }, null, 8, fl), [
3768
+ [ce, Ke.value]
3769
+ ])
3770
+ ])
3771
+ ])
3772
+ ]),
3773
+ e("div", vl, [
3774
+ e("div", xl, [
3775
+ e("h3", kl, l(t(d)("editor.headerFooter.footer")), 1),
3776
+ e("button", {
3777
+ type: "button",
3778
+ class: "text-[11px] text-red-500 hover:text-red-600 font-medium transition-colors",
3779
+ onClick: m[12] || (m[12] = (v) => {
3780
+ We.value = "", Ge.value = "";
3781
+ })
3782
+ }, l(t(d)("editor.headerFooter.clear")), 1)
3783
+ ]),
3784
+ e("div", yl, [
3785
+ e("div", null, [
3786
+ e("label", wl, l(t(d)("editor.headerFooter.left")), 1),
3787
+ de(e("input", {
3788
+ "onUpdate:modelValue": m[13] || (m[13] = (v) => We.value = v),
3789
+ type: "text",
3790
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700",
3791
+ placeholder: t(d)("editor.headerFooter.footerLeftPlaceholder")
3792
+ }, null, 8, _l), [
3793
+ [ce, We.value]
3794
+ ])
3795
+ ]),
3796
+ e("div", null, [
3797
+ e("label", $l, l(t(d)("editor.headerFooter.right")), 1),
3798
+ de(e("input", {
3799
+ "onUpdate:modelValue": m[14] || (m[14] = (v) => Ge.value = v),
3800
+ type: "text",
3801
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700",
3802
+ placeholder: t(d)("editor.headerFooter.footerRightPlaceholder")
3803
+ }, null, 8, Sl), [
3804
+ [ce, Ge.value]
3805
+ ])
3806
+ ])
3807
+ ])
3808
+ ]),
3809
+ e("div", Cl, l(t(d)("editor.headerFooter.variableInfo")), 1),
3810
+ e("div", Ml, [
3811
+ e("button", {
3812
+ type: "button",
3813
+ class: "rounded-md px-3 py-1.5 text-xs font-semibold hover:bg-slate-100 dark:hover:bg-white/5",
3814
+ onClick: m[15] || (m[15] = (v) => Xe.value = !1)
3815
+ }, l(t(d)("editor.headerFooter.cancel")), 1),
3816
+ e("button", {
3817
+ type: "button",
3818
+ class: "rounded-md bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-blue-700",
3819
+ onClick: Qt
3820
+ }, l(t(d)("editor.headerFooter.save")), 1)
3821
+ ])
3822
+ ])
3823
+ ])) : H("", !0),
3824
+ et.value ? (n(), r("div", Tl, [
3825
+ e("div", Al, [
3826
+ e("h2", Pl, l(t(d)("editor.pageSetup.title")), 1),
3827
+ e("div", Il, [
3828
+ e("label", Dl, l(t(d)("editor.pageSetup.paperSize")), 1),
3829
+ de(e("select", {
3830
+ "onUpdate:modelValue": m[16] || (m[16] = (v) => tt.value = v),
3831
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-2 text-xs focus:outline-none dark:border-slate-700"
3832
+ }, [
3833
+ (n(!0), r(q, null, K(t(rt), (v) => (n(), r("option", {
3834
+ key: v.id,
3835
+ value: v.id
3836
+ }, l(v.name), 9, Ll))), 128))
3837
+ ], 512), [
3838
+ [la, tt.value]
3839
+ ])
3840
+ ]),
3841
+ e("div", Hl, [
3842
+ e("label", zl, l(t(d)("editor.pageSetup.orientation")), 1),
3843
+ e("div", Bl, [
3844
+ e("button", {
3845
+ type: "button",
3846
+ class: z(["flex-1 rounded-md border px-3 py-2 text-xs font-medium transition-colors", je.value === "portrait" ? "border-cyan-500 bg-cyan-50 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300" : "border-slate-200 hover:bg-slate-50 dark:border-slate-700 dark:hover:bg-white/5"]),
3847
+ onClick: m[17] || (m[17] = (v) => je.value = "portrait")
3848
+ }, l(t(d)("editor.pageSetup.portrait")), 3),
3849
+ e("button", {
3850
+ type: "button",
3851
+ class: z(["flex-1 rounded-md border px-3 py-2 text-xs font-medium transition-colors", je.value === "landscape" ? "border-cyan-500 bg-cyan-50 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300" : "border-slate-200 hover:bg-slate-50 dark:border-slate-700 dark:hover:bg-white/5"]),
3852
+ onClick: m[18] || (m[18] = (v) => je.value = "landscape")
3853
+ }, l(t(d)("editor.pageSetup.landscape")), 3)
3854
+ ])
3855
+ ]),
3856
+ e("div", jl, [
3857
+ e("label", Fl, l(t(d)("editor.pageSetup.margins")), 1),
3858
+ e("div", El, [
3859
+ e("div", null, [
3860
+ e("label", Rl, l(t(d)("editor.pageSetup.top")), 1),
3861
+ de(e("input", {
3862
+ "onUpdate:modelValue": m[19] || (m[19] = (v) => _e.value.top = v),
3863
+ type: "number",
3864
+ min: "0",
3865
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
3866
+ }, null, 512), [
3867
+ [
3868
+ ce,
3869
+ _e.value.top,
3870
+ void 0,
3871
+ { number: !0 }
3872
+ ]
3873
+ ])
3874
+ ]),
3875
+ e("div", null, [
3876
+ e("label", Nl, l(t(d)("editor.pageSetup.bottom")), 1),
3877
+ de(e("input", {
3878
+ "onUpdate:modelValue": m[20] || (m[20] = (v) => _e.value.bottom = v),
3879
+ type: "number",
3880
+ min: "0",
3881
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
3882
+ }, null, 512), [
3883
+ [
3884
+ ce,
3885
+ _e.value.bottom,
3886
+ void 0,
3887
+ { number: !0 }
3888
+ ]
3889
+ ])
3890
+ ]),
3891
+ e("div", null, [
3892
+ e("label", Ol, l(t(d)("editor.pageSetup.left")), 1),
3893
+ de(e("input", {
3894
+ "onUpdate:modelValue": m[21] || (m[21] = (v) => _e.value.left = v),
3895
+ type: "number",
3896
+ min: "0",
3897
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
3898
+ }, null, 512), [
3899
+ [
3900
+ ce,
3901
+ _e.value.left,
3902
+ void 0,
3903
+ { number: !0 }
3904
+ ]
3905
+ ])
3906
+ ]),
3907
+ e("div", null, [
3908
+ e("label", Vl, l(t(d)("editor.pageSetup.right")), 1),
3909
+ de(e("input", {
3910
+ "onUpdate:modelValue": m[22] || (m[22] = (v) => _e.value.right = v),
3911
+ type: "number",
3912
+ min: "0",
3913
+ class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
3914
+ }, null, 512), [
3915
+ [
3916
+ ce,
3917
+ _e.value.right,
3918
+ void 0,
3919
+ { number: !0 }
3920
+ ]
3921
+ ])
3922
+ ])
3923
+ ])
3924
+ ]),
3925
+ e("div", ql, [
3926
+ e("button", {
3927
+ type: "button",
3928
+ class: "rounded-md px-3 py-1.5 text-xs font-semibold hover:bg-slate-100 dark:hover:bg-white/5",
3929
+ onClick: m[23] || (m[23] = (v) => et.value = !1)
3930
+ }, l(t(d)("editor.pageSetup.cancel")), 1),
3931
+ e("button", {
3932
+ type: "button",
3933
+ class: "rounded-md bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-blue-700",
3934
+ onClick: Yt
3935
+ }, l(t(d)("editor.pageSetup.apply")), 1)
3936
+ ])
3937
+ ])
3938
+ ])) : H("", !0)
3939
+ ]));
3940
+ }
3941
+ }), od = /* @__PURE__ */ Jt(Ul, [["__scopeId", "data-v-9e79a773"]]), Kl = { class: "docs-editor-pages flex flex-col items-center gap-10" }, Wl = ["data-page-index"], Gl = ["data-node-type", "data-from", "data-to"], Jl = ["innerHTML"], Zl = {
3942
+ key: 1,
3943
+ class: "docs-editor-page__block-fallback flex justify-between text-sm text-slate-700"
3944
+ }, Yl = { class: "docs-editor-page__block-type font-medium" }, Ql = { class: "docs-editor-page__block-range text-slate-500" }, nd = /* @__PURE__ */ le({
3945
+ __name: "PageView",
3946
+ props: {
3947
+ pages: {},
3948
+ editor: { default: null },
3949
+ layoutOptions: { default: () => ({
3950
+ pageWidth: 794,
3951
+ pageHeight: 1123,
3952
+ margins: { top: 96, bottom: 96, left: 96, right: 96 }
3953
+ }) },
3954
+ isPageless: { type: Boolean, default: !1 },
3955
+ pageColor: { default: "#ffffff" }
3956
+ },
3957
+ setup(s) {
3958
+ const p = s, o = w(0), a = () => {
3959
+ o.value++;
3960
+ };
3961
+ ae(
3962
+ () => p.editor,
3963
+ (I, _) => {
3964
+ _ && typeof _.off == "function" && _.off("update", a), I && typeof I.on == "function" && I.on("update", a);
3965
+ },
3966
+ { immediate: !0 }
3967
+ ), Ae(() => {
3968
+ p.editor && typeof p.editor.off == "function" && p.editor.off("update", a);
3969
+ });
3970
+ const c = F(() => {
3971
+ var I, _;
3972
+ return ((_ = (I = p.editor) == null ? void 0 : I.view) == null ? void 0 : _.dom) ?? null;
3973
+ }), f = F(() => {
3974
+ var I, _, h;
3975
+ return {
3976
+ pageHeight: ((I = p.layoutOptions) == null ? void 0 : I.pageHeight) ?? 1123,
3977
+ pageWidth: ((_ = p.layoutOptions) == null ? void 0 : _.pageWidth) ?? 794,
3978
+ margins: ((h = p.layoutOptions) == null ? void 0 : h.margins) ?? {
3979
+ top: 96,
3980
+ bottom: 96,
3981
+ left: 96,
3982
+ right: 96
3983
+ },
3984
+ maxCharsPerPage: 0
3985
+ };
3986
+ }), d = F(() => {
3987
+ const { pageWidth: I, pageHeight: _, margins: h } = f.value;
3988
+ return p.isPageless ? {
3989
+ width: `${I}px`,
3990
+ minHeight: "auto",
3991
+ height: "auto",
3992
+ paddingTop: `${h.top}px`,
3993
+ paddingBottom: `${h.bottom}px`,
3994
+ paddingLeft: `${h.left}px`,
3995
+ paddingRight: `${h.right}px`,
3996
+ backgroundColor: p.pageColor,
3997
+ boxShadow: "none",
3998
+ border: "none",
3999
+ borderRadius: "0"
4000
+ } : {
4001
+ width: `${I}px`,
4002
+ height: `${_}px`,
4003
+ paddingTop: `${h.top}px`,
4004
+ paddingBottom: `${h.bottom}px`,
4005
+ paddingLeft: `${h.left}px`,
4006
+ paddingRight: `${h.right}px`
4007
+ };
4008
+ }), k = () => c.value ? Array.from(c.value.children).filter(
4009
+ (I) => I instanceof HTMLElement
4010
+ ) : [], u = (I) => k().find((h) => {
4011
+ const g = parseInt(h.getAttribute("data-from") ?? "-1", 10), b = parseInt(h.getAttribute("data-to") ?? "-1", 10);
4012
+ return g >= 0 && b >= g && g <= I.from && b >= I.to;
4013
+ }) ?? null, S = (I) => {
4014
+ if (!p.editor || !c.value || !u(I)) return null;
4015
+ try {
4016
+ const h = p.editor.view, g = h.domAtPos(I.from), b = h.domAtPos(I.to);
4017
+ if (!g || !b) return null;
4018
+ const M = document.createRange();
4019
+ M.setStart(g.node, g.offset), M.setEnd(b.node, b.offset);
4020
+ const P = M.cloneContents(), B = document.createElement("div");
4021
+ return B.appendChild(P), B.innerHTML;
4022
+ } catch {
4023
+ return null;
4024
+ }
4025
+ }, L = F(() => {
4026
+ o.value;
4027
+ const I = /* @__PURE__ */ new Map();
4028
+ if (!p.editor || !c.value) return I;
4029
+ for (const _ of p.pages)
4030
+ for (const h of _.blocks) {
4031
+ const g = `${h.from}-${h.to}-${h.nodeType}`;
4032
+ if (I.has(g)) continue;
4033
+ const b = S(h);
4034
+ b !== null && I.set(g, b);
4035
+ }
4036
+ return I;
4037
+ }), D = (I) => L.value.get(
4038
+ `${I.from}-${I.to}-${I.nodeType}`
4039
+ ) ?? null;
4040
+ return (I, _) => (n(), r("div", Kl, [
4041
+ (n(!0), r(q, null, K(s.pages, (h, g) => (n(), r("div", {
4042
+ key: `${g}-${h.from}-${h.to}`,
4043
+ class: z(["docs-editor-page tiptap ProseMirror relative box-border overflow-hidden text-slate-800 dark:text-[#e2e8f0]", s.isPageless ? "" : "editor-page-shadow rounded-lg border border-slate-200/70 bg-white dark:border-white/5 dark:bg-[#0a0f1e]"]),
4044
+ "data-page-index": g,
4045
+ style: me(d.value)
4046
+ }, [
4047
+ e("div", {
4048
+ class: "docs-editor-page__blocks flex flex-col",
4049
+ style: me(s.isPageless ? {} : { height: "100%", overflow: "hidden" })
4050
+ }, [
4051
+ (n(!0), r(q, null, K(h.blocks, (b) => (n(), r("div", {
4052
+ key: `${b.from}-${b.to}`,
4053
+ class: "docs-editor-page__block",
4054
+ "data-node-type": b.nodeType,
4055
+ "data-from": b.from,
4056
+ "data-to": b.to
4057
+ }, [
4058
+ D(b) !== null ? (n(), r("div", {
4059
+ key: 0,
4060
+ class: "docs-editor-page__block-content",
4061
+ innerHTML: D(b)
4062
+ }, null, 8, Jl)) : (n(), r("div", Zl, [
4063
+ e("span", Yl, l(b.nodeType), 1),
4064
+ e("span", Ql, l(b.from) + "–" + l(b.to), 1)
4065
+ ]))
4066
+ ], 8, Gl))), 128))
4067
+ ], 4)
4068
+ ], 14, Wl))), 128))
4069
+ ]));
4070
+ }
4071
+ }), Xl = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l border-slate-200 bg-white/80 text-slate-800 backdrop-blur-xl transition-all dark:border-white/5 dark:bg-[#0a0f1e]/85 dark:text-slate-100" }, er = { class: "border-b border-slate-200 p-4 dark:border-white/5" }, tr = { class: "flex items-center gap-1.5 font-mono text-xs font-bold uppercase tracking-widest text-slate-500 dark:text-slate-400" }, ar = { class: "mt-1.5 text-[10px] leading-relaxed text-slate-400 dark:text-slate-500" }, or = { class: "flex-1 space-y-4 overflow-y-auto p-4" }, nr = { class: "space-y-2" }, sr = { class: "block font-mono text-[10px] font-bold uppercase tracking-widest text-slate-400 dark:text-slate-500" }, lr = { class: "grid grid-cols-2 gap-2" }, rr = ["disabled", "onClick"], ir = { class: "space-y-1.5" }, dr = { class: "block font-mono text-[10px] font-bold uppercase tracking-widest text-slate-400 dark:text-slate-500" }, cr = { class: "relative flex min-h-[220px] flex-col justify-between rounded-xl border border-slate-200 bg-slate-50 p-3.5 text-xs text-slate-700 dark:border-white/10 dark:bg-[#02040a]/50 dark:text-slate-300" }, ur = {
4072
+ key: 0,
4073
+ class: "absolute inset-0 z-10 flex flex-col items-center justify-center space-y-3 rounded-xl bg-white/70 dark:bg-[#02040a]/80"
4074
+ }, pr = { class: "animate-pulse font-mono text-[10px] uppercase tracking-wider text-slate-400 dark:text-slate-500" }, hr = {
4075
+ key: 1,
4076
+ class: "space-y-4"
4077
+ }, br = { class: "prose prose-sm max-h-[300px] max-w-full overflow-x-auto overflow-y-auto whitespace-pre-wrap pr-1 leading-relaxed dark:prose-invert" }, mr = { class: "flex justify-end gap-2 border-t border-slate-200/60 pt-2.5 dark:border-white/5" }, gr = {
4078
+ key: 2,
4079
+ class: "flex flex-1 flex-col items-center justify-center p-4 text-center text-slate-400 dark:text-slate-500"
4080
+ }, fr = { class: "text-[10px]" }, vr = { class: "border-t border-slate-200 bg-slate-50 p-4 dark:border-white/5 dark:bg-[#0a0f1e]/80" }, xr = ["disabled", "placeholder"], kr = { class: "flex justify-end" }, yr = ["disabled"], sd = /* @__PURE__ */ le({
4081
+ __name: "AISidebar",
4082
+ props: {
4083
+ documentContent: {}
4084
+ },
4085
+ emits: ["insert"],
4086
+ setup(s, { emit: p }) {
4087
+ const o = "", a = s, c = p, { t: f } = we(), d = w(""), k = w(""), u = w(!1), S = w(!1), L = w(!1);
4088
+ async function D(g, b) {
4089
+ u.value = !0, L.value = !1;
4090
+ try {
4091
+ const M = await fetch(`${o}/api/ai/copilot`, {
4092
+ method: "POST",
4093
+ headers: { "Content-Type": "application/json" },
4094
+ body: JSON.stringify({
4095
+ prompt: b || d.value.trim(),
4096
+ content: a.documentContent,
4097
+ action: g || "custom"
4098
+ })
4099
+ }), P = await M.json();
4100
+ M.ok && P.result ? k.value = P.result : P.error && (k.value = `❌ AI Helper Error:
4101
+
4102
+ ${P.error}`);
4103
+ } catch (M) {
4104
+ k.value = "❌ Network Failure: Could not connect to the AI backend.", console.error(M);
4105
+ } finally {
4106
+ u.value = !1, d.value = "";
4107
+ }
4108
+ }
4109
+ function I() {
4110
+ k.value && (navigator.clipboard.writeText(k.value), S.value = !0, setTimeout(() => S.value = !1, 2e3));
4111
+ }
4112
+ function _() {
4113
+ k.value && (c("insert", k.value), L.value = !0, setTimeout(() => L.value = !1, 2e3));
4114
+ }
4115
+ const h = F(() => [
4116
+ { label: f("sidebars.ai.summarize"), icon: bt, action: "summarize", color: "text-cyan-500" },
4117
+ { label: f("sidebars.ai.fixGrammar"), icon: Ma, action: "correct", color: "text-emerald-500" },
4118
+ { label: f("sidebars.ai.continue"), icon: bo, action: "continue", color: "text-amber-500" },
4119
+ { label: f("sidebars.ai.toSpanish"), icon: za, action: void 0, prompt: "Translate the current document content cleanly into professional Spanish.", color: "text-cyan-500" }
4120
+ ]);
4121
+ return (g, b) => (n(), r("div", Xl, [
4122
+ e("div", er, [
4123
+ e("h3", tr, [
4124
+ y(t(ht), { class: "h-4 w-4 animate-pulse text-cyan-400" }),
4125
+ oe(" " + l(t(f)("sidebars.ai.title")), 1)
4126
+ ]),
4127
+ e("p", ar, l(t(f)("sidebars.ai.description")), 1)
4128
+ ]),
4129
+ e("div", or, [
4130
+ e("div", nr, [
4131
+ e("span", sr, l(t(f)("sidebars.ai.quickMacros")), 1),
4132
+ e("div", lr, [
4133
+ (n(!0), r(q, null, K(h.value, (M) => (n(), r("button", {
4134
+ key: M.label,
4135
+ type: "button",
4136
+ disabled: u.value || !s.documentContent,
4137
+ class: "flex items-center gap-1.5 rounded-lg border border-slate-200 bg-slate-50 px-2.5 py-1.5 text-left text-[11px] font-bold text-slate-700 transition-colors hover:border-cyan-500/50 disabled:opacity-40 dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-300 dark:hover:border-cyan-500/30",
4138
+ onClick: (P) => M.action ? D(M.action) : D(void 0, M.prompt)
4139
+ }, [
4140
+ (n(), he($e(M.icon), {
4141
+ class: z(["h-3 w-3", M.color])
4142
+ }, null, 8, ["class"])),
4143
+ e("span", null, l(M.label), 1)
4144
+ ], 8, rr))), 128))
4145
+ ])
4146
+ ]),
4147
+ e("div", ir, [
4148
+ e("span", dr, l(t(f)("sidebars.ai.generations")), 1),
4149
+ e("div", cr, [
4150
+ u.value ? (n(), r("div", ur, [
4151
+ b[2] || (b[2] = e("div", { class: "h-6 w-6 animate-spin rounded-full border-2 border-cyan-500 border-t-transparent" }, null, -1)),
4152
+ e("p", pr, l(t(f)("sidebars.ai.aiDrafting")), 1)
4153
+ ])) : H("", !0),
4154
+ k.value ? (n(), r("div", hr, [
4155
+ e("div", br, l(k.value), 1),
4156
+ e("div", mr, [
4157
+ e("button", {
4158
+ type: "button",
4159
+ class: "flex items-center gap-1 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-[10px] font-semibold text-slate-600 transition-all hover:bg-slate-50 dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-300 dark:hover:bg-white/5",
4160
+ onClick: I
4161
+ }, [
4162
+ (n(), he($e(S.value ? t(St) : t(Da)), {
4163
+ class: z(["h-3 w-3", S.value ? "text-emerald-500" : ""])
4164
+ }, null, 8, ["class"])),
4165
+ e("span", null, l(S.value ? t(f)("sidebars.ai.copied") : t(f)("sidebars.ai.copy")), 1)
4166
+ ]),
4167
+ e("button", {
4168
+ type: "button",
4169
+ class: "flex items-center gap-1 rounded-lg bg-cyan-500 px-2.5 py-1.5 text-[10px] font-bold text-black shadow-cyan transition-all hover:bg-cyan-400",
4170
+ onClick: _
4171
+ }, [
4172
+ (n(), he($e(L.value ? t(St) : t(Sa)), { class: "h-3 w-3" })),
4173
+ e("span", null, l(L.value ? t(f)("sidebars.ai.inserted") : t(f)("sidebars.ai.insert")), 1)
4174
+ ])
4175
+ ])
4176
+ ])) : (n(), r("div", gr, [
4177
+ y(t(ht), { class: "mb-2 h-6 w-6 text-cyan-500 opacity-30" }),
4178
+ e("p", fr, l(t(f)("sidebars.ai.noDraft")), 1)
4179
+ ]))
4180
+ ])
4181
+ ])
4182
+ ]),
4183
+ e("div", vr, [
4184
+ e("form", {
4185
+ class: "space-y-2",
4186
+ onSubmit: b[1] || (b[1] = R((M) => d.value.trim() && D(), ["prevent"]))
4187
+ }, [
4188
+ de(e("textarea", {
4189
+ "onUpdate:modelValue": b[0] || (b[0] = (M) => d.value = M),
4190
+ rows: "2",
4191
+ disabled: u.value,
4192
+ placeholder: t(f)("sidebars.ai.promptPlaceholder"),
4193
+ class: "w-full min-h-[55px] resize-none rounded-xl border border-slate-200 bg-white p-2.5 text-xs text-slate-800 transition-all focus:border-cyan-500/50 focus:shadow-cyan focus:outline-none disabled:opacity-60 dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30"
4194
+ }, null, 8, xr), [
4195
+ [ce, d.value]
4196
+ ]),
4197
+ e("div", kr, [
4198
+ e("button", {
4199
+ type: "submit",
4200
+ disabled: u.value || !d.value.trim(),
4201
+ class: "flex items-center gap-1 rounded-lg bg-cyan-500 px-3.5 py-2 text-xs font-bold text-black shadow-cyan transition-all hover:bg-cyan-400 disabled:opacity-40"
4202
+ }, [
4203
+ y(t(pt), { class: "h-3.5 w-3.5" }),
4204
+ oe(" " + l(t(f)("sidebars.ai.promptAI")), 1)
4205
+ ], 8, yr)
4206
+ ])
4207
+ ], 32)
4208
+ ])
4209
+ ]));
4210
+ }
4211
+ }), wr = { class: "comments-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l border-slate-200 bg-white/80 text-slate-800 backdrop-blur-xl transition-all dark:border-white/5 dark:bg-[#0a0f1e]/85 dark:text-slate-100" }, _r = { class: "border-b border-slate-200 p-4 dark:border-white/5" }, $r = { class: "mb-3 flex items-center justify-between" }, Sr = { class: "flex items-center gap-1.5 font-mono text-xs font-bold uppercase tracking-widest text-slate-500 dark:text-slate-400" }, Cr = { class: "flex rounded-xl border border-slate-200 bg-slate-50 p-1 text-[11px] font-semibold dark:border-white/10 dark:bg-white/[0.02]" }, Mr = {
4212
+ key: 0,
4213
+ class: "mb-1 rounded-xl border border-cyan-500/25 bg-cyan-500/5 p-2.5 text-xs text-cyan-700 animate-fadeIn dark:border-cyan-500/15 dark:bg-cyan-500/10 dark:text-cyan-400"
4214
+ }, Tr = { class: "mb-1 font-mono text-[9px] font-bold uppercase tracking-wider" }, Ar = { class: "line-clamp-1 border-l-2 border-cyan-400 bg-cyan-500/10 py-0.5 pl-2.5 italic dark:bg-cyan-500/5" }, Pr = { class: "flex-1 space-y-4 overflow-y-auto p-4" }, Ir = { class: "flex items-start justify-between" }, Dr = { class: "flex items-center gap-2" }, Lr = { class: "text-xs font-bold text-slate-800 dark:text-slate-200" }, Hr = { class: "font-mono text-[9px] text-slate-400 dark:text-slate-500" }, zr = ["title", "onClick"], Br = {
4215
+ key: 0,
4216
+ class: "max-w-full truncate rounded-r-lg border-l-2 border-cyan-500/50 bg-slate-100 py-1 pl-2.5 text-[10px] italic text-slate-500 dark:border-cyan-500/40 dark:bg-white/5 dark:text-slate-400"
4217
+ }, jr = { class: "whitespace-pre-wrap break-words text-xs leading-relaxed text-slate-700 dark:text-slate-300" }, Fr = {
4218
+ key: 1,
4219
+ class: "space-y-2.5 border-l border-slate-200 pl-4 pt-1 dark:border-white/10"
4220
+ }, Er = { class: "flex items-center gap-1.5" }, Rr = { class: "text-[10px] font-bold text-slate-600 dark:text-slate-300" }, Nr = { class: "font-mono text-[8px] text-slate-400 dark:text-slate-500" }, Or = { class: "break-words pl-1 text-xs text-slate-600 dark:text-slate-400" }, Vr = {
4221
+ key: 2,
4222
+ class: "flex items-center justify-between border-t border-slate-100 pt-2 dark:border-white/5"
4223
+ }, qr = {
4224
+ key: 0,
4225
+ class: "flex w-full items-center gap-1.5"
4226
+ }, Ur = ["onUpdate:modelValue", "placeholder", "onKeydown"], Kr = ["onClick"], Wr = ["onClick"], Gr = {
4227
+ key: 3,
4228
+ class: "rounded-lg border border-green-100/40 bg-green-50/55 p-2 text-[10px] text-green-700 dark:border-green-500/10 dark:bg-green-950/10 dark:text-green-400"
4229
+ }, Jr = { key: 0 }, Zr = {
4230
+ key: 0,
4231
+ class: "py-12 text-center text-slate-400 dark:text-slate-500"
4232
+ }, Yr = { class: "text-xs" }, Qr = {
4233
+ key: 0,
4234
+ class: "border-t border-slate-200 bg-slate-50 p-4 dark:border-white/5 dark:bg-[#0a0f1e]/80"
4235
+ }, Xr = ["placeholder"], ei = { class: "flex items-center justify-between" }, ti = { class: "font-mono text-[9px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500" }, ai = ["disabled"], ld = /* @__PURE__ */ le({
4236
+ __name: "CommentsSidebar",
4237
+ props: {
4238
+ comments: {},
4239
+ selectedTextSnippet: {},
4240
+ selectedTextIndex: {}
4241
+ },
4242
+ emits: ["add-comment", "add-reply", "resolve-comment"],
4243
+ setup(s, { emit: p }) {
4244
+ const o = s, a = p, { t: c } = we(), f = w(""), d = w({}), k = w(null), u = w("active"), S = F(
4245
+ () => (o.comments ?? []).filter(
4246
+ (_) => u.value === "resolved" ? _.resolved : !_.resolved
4247
+ )
4248
+ );
4249
+ function L() {
4250
+ f.value.trim() && (a(
4251
+ "add-comment",
4252
+ f.value.trim(),
4253
+ o.selectedTextSnippet,
4254
+ o.selectedTextIndex
4255
+ ), f.value = "");
4256
+ }
4257
+ function D(_) {
4258
+ const h = d.value[_] || "";
4259
+ h.trim() && (a("add-reply", _, h.trim()), d.value = { ...d.value, [_]: "" }, k.value = null);
4260
+ }
4261
+ function I(_) {
4262
+ return _.split(" ").map((h) => h[0]).join("").slice(0, 2).toUpperCase();
4263
+ }
4264
+ return (_, h) => (n(), r("div", wr, [
4265
+ e("div", _r, [
4266
+ e("div", $r, [
4267
+ e("h3", Sr, [
4268
+ y(t(Wt), { class: "h-4 w-4 text-cyan-400" }),
4269
+ oe(" " + l(t(c)("sidebars.comments.title")), 1)
4270
+ ]),
4271
+ e("div", Cr, [
4272
+ e("button", {
4273
+ type: "button",
4274
+ class: z([u.value === "active" ? "bg-cyan-500/15 text-cyan-600 dark:text-cyan-400 font-bold" : "text-slate-400 hover:text-slate-600", "rounded-lg px-2.5 py-1 transition-all"]),
4275
+ onClick: h[0] || (h[0] = (g) => u.value = "active")
4276
+ }, l(t(c)("sidebars.comments.active")), 3),
4277
+ e("button", {
4278
+ type: "button",
4279
+ class: z([u.value === "resolved" ? "bg-cyan-500/15 text-cyan-600 dark:text-cyan-400 font-bold" : "text-slate-400 hover:text-slate-600", "rounded-lg px-2.5 py-1 transition-all"]),
4280
+ onClick: h[1] || (h[1] = (g) => u.value = "resolved")
4281
+ }, l(t(c)("sidebars.comments.resolved")), 3)
4282
+ ])
4283
+ ]),
4284
+ s.selectedTextSnippet ? (n(), r("div", Mr, [
4285
+ e("p", Tr, l(t(c)("sidebars.comments.creatingAnchored")), 1),
4286
+ e("p", Ar, ' "' + l(s.selectedTextSnippet) + '" ', 1)
4287
+ ])) : H("", !0)
4288
+ ]),
4289
+ e("div", Pr, [
4290
+ (n(!0), r(q, null, K(S.value, (g) => (n(), r("div", {
4291
+ key: g.id,
4292
+ class: "relative space-y-3 rounded-2xl border border-slate-200/60 bg-slate-50/60 p-4 transition-all hover:border-cyan-500/30 hover:shadow-cyan dark:border-white/5 dark:bg-[#02040a]/40"
4293
+ }, [
4294
+ e("div", Ir, [
4295
+ e("div", Dr, [
4296
+ e("div", {
4297
+ class: "flex h-6 w-6 items-center justify-center rounded-full text-[10px] font-bold text-white shadow-sm",
4298
+ style: me({ backgroundColor: g.authorColor })
4299
+ }, l(I(g.authorName)), 5),
4300
+ e("div", null, [
4301
+ e("h4", Lr, l(g.authorName), 1),
4302
+ e("p", Hr, l(new Date(g.createdAt).toLocaleTimeString()), 1)
4303
+ ])
4304
+ ]),
4305
+ g.resolved ? H("", !0) : (n(), r("button", {
4306
+ key: 0,
4307
+ type: "button",
4308
+ class: "rounded-lg p-1.5 text-slate-400 transition-colors hover:bg-green-500/10 hover:text-green-500",
4309
+ title: t(c)("sidebars.comments.resolve"),
4310
+ onClick: (b) => a("resolve-comment", g.id)
4311
+ }, [
4312
+ y(t(Pa), { class: "h-4 w-4" })
4313
+ ], 8, zr))
4314
+ ]),
4315
+ g.anchorText ? (n(), r("div", Br, l(t(c)("sidebars.comments.quote")) + ' "' + l(g.anchorText) + '" ', 1)) : H("", !0),
4316
+ e("p", jr, l(g.content), 1),
4317
+ g.replies.length > 0 ? (n(), r("div", Fr, [
4318
+ (n(!0), r(q, null, K(g.replies, (b) => (n(), r("div", {
4319
+ key: b.id,
4320
+ class: "space-y-1"
4321
+ }, [
4322
+ e("div", Er, [
4323
+ e("div", {
4324
+ class: "flex h-4.5 w-4.5 items-center justify-center rounded-full text-[8px] font-bold text-white shadow-sm",
4325
+ style: me({ backgroundColor: b.authorColor })
4326
+ }, l(I(b.authorName)), 5),
4327
+ e("span", Rr, l(b.authorName), 1),
4328
+ e("span", Nr, l(new Date(b.createdAt).toLocaleTimeString()), 1)
4329
+ ]),
4330
+ e("p", Or, l(b.content), 1)
4331
+ ]))), 128))
4332
+ ])) : H("", !0),
4333
+ g.resolved ? H("", !0) : (n(), r("div", Vr, [
4334
+ k.value === g.id ? (n(), r("div", qr, [
4335
+ de(e("input", {
4336
+ "onUpdate:modelValue": (b) => d.value[g.id] = b,
4337
+ type: "text",
4338
+ placeholder: t(c)("sidebars.comments.reply"),
4339
+ class: "flex-1 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs text-slate-800 focus:border-cyan-500/50 focus:outline-none dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30",
4340
+ onKeydown: ot((b) => D(g.id), ["enter"])
4341
+ }, null, 40, Ur), [
4342
+ [ce, d.value[g.id]]
4343
+ ]),
4344
+ e("button", {
4345
+ type: "button",
4346
+ class: "rounded-lg bg-cyan-500 p-1.5 font-bold text-black shadow-cyan hover:bg-cyan-400",
4347
+ onClick: (b) => D(g.id)
4348
+ }, [
4349
+ y(t(pt), { class: "h-3.5 w-3.5" })
4350
+ ], 8, Kr)
4351
+ ])) : (n(), r("button", {
4352
+ key: 1,
4353
+ type: "button",
4354
+ class: "flex items-center gap-1 text-[10px] font-bold text-cyan-600 transition-all hover:text-cyan-500",
4355
+ onClick: (b) => k.value = g.id
4356
+ }, [
4357
+ y(t(to), { class: "h-3 w-3" }),
4358
+ oe(" " + l(t(c)("sidebars.comments.replyInThread")), 1)
4359
+ ], 8, Wr))
4360
+ ])),
4361
+ g.resolved ? (n(), r("div", Gr, [
4362
+ oe(l(t(c)("sidebars.comments.resolvedBy").replace("{user}", g.resolvedBy || "You")) + " ", 1),
4363
+ g.resolvedAt ? (n(), r("span", Jr, "at " + l(new Date(g.resolvedAt).toLocaleTimeString()), 1)) : H("", !0)
4364
+ ])) : H("", !0)
4365
+ ]))), 128)),
4366
+ S.value.length === 0 ? (n(), r("div", Zr, [
4367
+ y(t(Wa), { class: "mx-auto mb-2 h-8 w-8 text-cyan-500 opacity-50" }),
4368
+ e("p", Yr, l(t(c)("sidebars.comments.noComments").replace("{mode}", u.value)), 1)
4369
+ ])) : H("", !0)
4370
+ ]),
4371
+ u.value === "active" ? (n(), r("div", Qr, [
4372
+ e("form", {
4373
+ class: "space-y-2",
4374
+ onSubmit: R(L, ["prevent"])
4375
+ }, [
4376
+ de(e("textarea", {
4377
+ "onUpdate:modelValue": h[2] || (h[2] = (g) => f.value = g),
4378
+ rows: "2",
4379
+ placeholder: s.selectedTextSnippet ? t(c)("sidebars.comments.commentOnSelection") : t(c)("sidebars.comments.generalComment"),
4380
+ class: "w-full min-h-[60px] resize-none rounded-xl border border-slate-200 bg-white p-2.5 text-xs text-slate-800 transition-all focus:border-cyan-500/50 focus:shadow-cyan focus:outline-none dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30"
4381
+ }, null, 8, Xr), [
4382
+ [ce, f.value]
4383
+ ]),
4384
+ e("div", ei, [
4385
+ e("span", ti, l(s.selectedTextSnippet ? t(c)("sidebars.comments.anchoredComment") : t(c)("sidebars.comments.general")), 1),
4386
+ e("button", {
4387
+ type: "submit",
4388
+ disabled: !f.value.trim(),
4389
+ class: "flex items-center gap-1 rounded-lg bg-cyan-500 px-3.5 py-2 text-xs font-bold text-black shadow-cyan transition-all hover:bg-cyan-400 disabled:opacity-50"
4390
+ }, [
4391
+ y(t(pt), { class: "h-3.5 w-3.5" }),
4392
+ oe(" " + l(t(c)("sidebars.comments.post")), 1)
4393
+ ], 8, ai)
4394
+ ])
4395
+ ], 32)
4396
+ ])) : H("", !0)
4397
+ ]));
4398
+ }
4399
+ }), oi = { class: "history-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l border-slate-200 bg-white/80 text-slate-800 backdrop-blur-xl transition-all dark:border-white/5 dark:bg-[#0a0f1e]/85 dark:text-slate-100" }, ni = { class: "border-b border-slate-200 p-4 dark:border-white/5" }, si = { class: "flex items-center gap-1.5 font-mono text-xs font-bold uppercase tracking-widest text-slate-500 dark:text-slate-400" }, li = { class: "mt-1.5 text-[10px] leading-relaxed text-slate-400 dark:text-slate-500" }, ri = { class: "flex-1 space-y-3 overflow-y-auto p-4" }, ii = {
4400
+ key: 0,
4401
+ class: "space-y-2 rounded-2xl border border-amber-500/30 bg-amber-500/10 p-3.5 text-xs animate-fadeIn dark:border-amber-500/20"
4402
+ }, di = { class: "flex items-start gap-1.5 text-amber-700 dark:text-amber-400" }, ci = { class: "font-bold" }, ui = { class: "mt-0.5 text-[10px] leading-relaxed text-amber-600 dark:text-amber-500" }, pi = { class: "flex justify-end gap-2 pt-1" }, hi = { class: "space-y-2.5" }, bi = { class: "mb-1 flex items-center justify-between" }, mi = { class: "rounded-md bg-slate-200 px-1.5 py-0.5 font-mono text-[9px] font-bold text-slate-500 dark:bg-cyan-500/10 dark:text-cyan-400" }, gi = { class: "flex items-center gap-0.5 font-mono text-[9px] text-slate-400 dark:text-slate-500" }, fi = { class: "text-xs font-bold leading-snug text-slate-800 dark:text-slate-200" }, vi = { class: "flex items-center gap-1.5 text-[10px] text-slate-500" }, xi = { class: "font-semibold text-slate-600 dark:text-slate-300" }, ki = { class: "flex justify-end gap-2 border-t border-slate-200/50 pt-2 dark:border-white/5" }, yi = ["onClick"], wi = ["onClick"], _i = {
4403
+ key: 0,
4404
+ class: "py-6 text-center text-xs text-slate-400 dark:text-slate-500"
4405
+ }, $i = { class: "border-t border-slate-200 bg-slate-50 p-4 dark:border-white/5 dark:bg-[#0a0f1e]/85" }, Si = ["placeholder"], Ci = { class: "flex justify-end gap-2" }, Mi = {
4406
+ type: "submit",
4407
+ class: "rounded-lg bg-cyan-500 px-3.5 py-1.5 text-xs font-bold text-black shadow-cyan hover:bg-cyan-400"
4408
+ }, rd = /* @__PURE__ */ le({
4409
+ __name: "HistorySidebar",
4410
+ props: {
4411
+ snapshots: {},
4412
+ activePreviewIndex: {}
4413
+ },
4414
+ emits: ["save-snapshot", "restore-snapshot", "preview-snapshot"],
4415
+ setup(s, { emit: p }) {
4416
+ const o = s, a = p, { t: c } = we(), f = w(""), d = w(!1);
4417
+ function k() {
4418
+ f.value.trim() && (a("save-snapshot", f.value.trim()), f.value = "", d.value = !1);
4419
+ }
4420
+ const u = F(() => o.snapshots ?? []);
4421
+ return (S, L) => (n(), r("div", oi, [
4422
+ e("div", ni, [
4423
+ e("h3", si, [
4424
+ y(t(qt), { class: "h-4 w-4 text-cyan-400" }),
4425
+ oe(" " + l(t(c)("sidebars.history.title")), 1)
4426
+ ]),
4427
+ e("p", li, l(t(c)("sidebars.history.empty")), 1)
4428
+ ]),
4429
+ e("div", ri, [
4430
+ s.activePreviewIndex !== null ? (n(), r("div", ii, [
4431
+ e("div", di, [
4432
+ y(t(no), { class: "mt-0.5 h-4 w-4 flex-shrink-0 text-amber-500" }),
4433
+ e("div", null, [
4434
+ e("p", ci, l(t(c)("sidebars.history.viewingPreview")), 1),
4435
+ e("p", ui, l(t(c)("sidebars.history.readOnlyPreview").replace("{index}", String(s.activePreviewIndex))), 1)
4436
+ ])
4437
+ ]),
4438
+ e("div", pi, [
4439
+ e("button", {
4440
+ type: "button",
4441
+ class: "rounded-lg px-2.5 py-1 text-[10px] font-semibold text-slate-500 hover:bg-white/5 hover:text-slate-700 dark:text-slate-400",
4442
+ onClick: L[0] || (L[0] = (D) => a("preview-snapshot", null))
4443
+ }, l(t(c)("sidebars.history.closePreview")), 1),
4444
+ e("button", {
4445
+ type: "button",
4446
+ class: "flex items-center gap-1 rounded-lg bg-cyan-500 px-3 py-1 text-[10px] font-bold text-black shadow-cyan transition-all hover:bg-cyan-400",
4447
+ onClick: L[1] || (L[1] = () => {
4448
+ a("restore-snapshot", s.activePreviewIndex), a("preview-snapshot", null);
4449
+ })
4450
+ }, [
4451
+ y(t(Ct), { class: "h-3 w-3" }),
4452
+ oe(" " + l(t(c)("sidebars.history.restoreThis")), 1)
4453
+ ])
4454
+ ])
4455
+ ])) : H("", !0),
4456
+ e("div", hi, [
4457
+ (n(!0), r(q, null, K(u.value, (D) => (n(), r("div", {
4458
+ key: D.versionIndex,
4459
+ class: z(["space-y-2.5 rounded-2xl border p-4 transition-all", s.activePreviewIndex === D.versionIndex ? "border-cyan-500/40 bg-cyan-500/5 shadow-cyan dark:border-cyan-500/30" : "border-slate-200/60 bg-slate-50/60 hover:border-cyan-500/30 dark:border-white/5 dark:bg-[#02040a]/40 dark:hover:border-white/10"])
4460
+ }, [
4461
+ e("div", null, [
4462
+ e("div", bi, [
4463
+ e("span", mi, l(t(c)("sidebars.history.version")) + " #" + l(D.versionIndex), 1),
4464
+ e("span", gi, [
4465
+ y(t(Ta), { class: "h-2.5 w-2.5" }),
4466
+ oe(" " + l(new Date(D.timestamp).toLocaleDateString()) + " " + l(new Date(D.timestamp).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })), 1)
4467
+ ])
4468
+ ]),
4469
+ e("h4", fi, l(D.title), 1)
4470
+ ]),
4471
+ e("div", vi, [
4472
+ y(t(ho), { class: "h-3.5 w-3.5" }),
4473
+ e("span", null, [
4474
+ oe(l(t(c)("sidebars.history.modifiedBy")) + " ", 1),
4475
+ e("strong", xi, l(D.modifiedBy), 1)
4476
+ ])
4477
+ ]),
4478
+ e("div", ki, [
4479
+ s.activePreviewIndex !== D.versionIndex ? (n(), r("button", {
4480
+ key: 0,
4481
+ type: "button",
4482
+ class: "flex items-center gap-1 text-[10px] font-bold text-slate-500 transition-colors hover:text-cyan-600 dark:text-slate-400 dark:hover:text-cyan-400",
4483
+ onClick: (I) => a("preview-snapshot", D)
4484
+ }, [
4485
+ y(t(Ha), { class: "h-3 w-3" }),
4486
+ oe(" " + l(t(c)("sidebars.history.preview")), 1)
4487
+ ], 8, yi)) : H("", !0),
4488
+ e("button", {
4489
+ type: "button",
4490
+ class: "flex items-center gap-1 text-[10px] font-bold text-cyan-600 transition-colors hover:text-cyan-500 dark:text-cyan-400 dark:hover:text-cyan-300",
4491
+ onClick: (I) => a("restore-snapshot", D.versionIndex)
4492
+ }, [
4493
+ y(t(Ct), { class: "h-3 w-3" }),
4494
+ oe(" " + l(t(c)("sidebars.history.restore")), 1)
4495
+ ], 8, wi)
4496
+ ])
4497
+ ], 2))), 128)),
4498
+ u.value.length === 0 ? (n(), r("p", _i, l(t(c)("sidebars.history.noSnapshots")), 1)) : H("", !0)
4499
+ ])
4500
+ ]),
4501
+ e("div", $i, [
4502
+ d.value ? (n(), r("form", {
4503
+ key: 0,
4504
+ class: "space-y-2 animate-fadeIn",
4505
+ onSubmit: R(k, ["prevent"])
4506
+ }, [
4507
+ de(e("input", {
4508
+ "onUpdate:modelValue": L[2] || (L[2] = (D) => f.value = D),
4509
+ type: "text",
4510
+ required: "",
4511
+ placeholder: t(c)("sidebars.history.snapshotPlaceholder"),
4512
+ class: "w-full rounded-xl border border-slate-200 bg-white px-2.5 py-1.5 text-xs text-slate-800 transition-all focus:border-cyan-500/50 focus:shadow-cyan focus:outline-none dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30"
4513
+ }, null, 8, Si), [
4514
+ [ce, f.value]
4515
+ ]),
4516
+ e("div", Ci, [
4517
+ e("button", {
4518
+ type: "button",
4519
+ class: "rounded-lg px-2.5 py-1 text-[10px] text-slate-500 hover:bg-white/5 dark:text-slate-400",
4520
+ onClick: L[3] || (L[3] = (D) => d.value = !1)
4521
+ }, l(t(c)("sidebars.history.cancel")), 1),
4522
+ e("button", Mi, l(t(c)("sidebars.history.save")), 1)
4523
+ ])
4524
+ ], 32)) : (n(), r("button", {
4525
+ key: 1,
4526
+ type: "button",
4527
+ class: "flex w-full items-center justify-center gap-1.5 rounded-xl border border-dashed border-slate-300 py-2.5 text-xs font-bold text-slate-500 transition-all hover:border-cyan-500 hover:bg-cyan-500/5 hover:text-cyan-500 dark:border-white/10 dark:text-slate-400 dark:hover:border-cyan-400/50 dark:hover:text-cyan-400",
4528
+ onClick: L[4] || (L[4] = (D) => d.value = !0)
4529
+ }, [
4530
+ y(t(ao), { class: "h-3.5 w-3.5 animate-pulse" }),
4531
+ oe(" " + l(t(c)("sidebars.history.saveNamedSnapshot")), 1)
4532
+ ]))
4533
+ ])
4534
+ ]));
4535
+ }
4536
+ }), Ti = { class: "docs-editor-left-sidebar flex w-14 flex-shrink-0 flex-col items-center border-r border-slate-200 bg-slate-50/50 py-3 dark:border-slate-800 dark:bg-[#080d1a] md:w-64 md:items-stretch md:px-3" }, Ai = { class: "mb-4 flex items-center justify-between px-1" }, Pi = ["title"], Ii = { class: "hidden flex-col gap-4 md:flex" }, Di = { class: "flex items-center justify-between px-2" }, Li = { class: "text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wide" }, Hi = ["title"], zi = { class: "flex flex-col gap-1 pr-1" }, Bi = ["onClick"], ji = { class: "truncate" }, Fi = {
4537
+ key: 1,
4538
+ class: "flex flex-1 items-center gap-2 pr-6"
4539
+ }, Ei = ["onBlur", "onKeydown"], Ri = { class: "relative flex items-center" }, Ni = ["onClick"], Oi = {
4540
+ key: 1,
4541
+ class: "absolute right-0 top-6 z-50 w-28 rounded-lg border border-slate-200/80 bg-white py-1 shadow-lg dark:border-slate-700 dark:bg-slate-800 text-slate-700 dark:text-slate-200"
4542
+ }, Vi = ["onClick"], qi = ["disabled", "onClick"], Ui = { class: "flex flex-col gap-1.5 px-2" }, Ki = { class: "text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wide" }, Wi = {
4543
+ key: 0,
4544
+ class: "flex flex-col gap-1 mt-1"
4545
+ }, Gi = ["onClick"], Ji = {
4546
+ key: 1,
4547
+ class: "text-xs leading-relaxed text-slate-400 dark:text-slate-500 italic mt-1 font-sans"
4548
+ }, Zi = { class: "flex flex-col gap-2 md:hidden" }, Yi = ["title", "onClick"], id = /* @__PURE__ */ le({
4549
+ __name: "DocumentTabsSidebar",
4550
+ props: {
4551
+ tabs: { default: () => [{ id: "tab-1", label: "Tab 1", active: !0 }] },
4552
+ editor: { default: null },
4553
+ backTitle: { default: "" }
4554
+ },
4555
+ emits: ["collapse", "add-tab", "select-tab", "delete-tab", "rename-tab"],
4556
+ setup(s, { emit: p }) {
4557
+ const { t: o } = we(), a = s, c = F(() => a.backTitle || o("common.cancel")), f = p, d = w(null), k = w(null), u = w(""), S = (P) => {
4558
+ k.value = P.id, u.value = P.label, d.value = null;
4559
+ }, L = (P) => {
4560
+ u.value.trim() && f("rename-tab", { id: P, label: u.value.trim() }), k.value = null;
4561
+ }, D = () => {
4562
+ k.value = null;
4563
+ }, I = (P) => {
4564
+ f("delete-tab", P), d.value = null;
4565
+ }, _ = (P) => {
4566
+ d.value = d.value === P ? null : P;
4567
+ }, h = w([]), g = () => {
4568
+ if (!a.editor) return;
4569
+ const P = [];
4570
+ a.editor.state.doc.descendants((B, j) => {
4571
+ if (B.type.name === "heading") {
4572
+ const O = B.attrs.level;
4573
+ (O === 1 || O === 2 || O === 3) && P.push({
4574
+ id: `heading-${j}`,
4575
+ text: B.textContent.trim() || o("documentTabs.untitledHeading").replace("{level}", String(O)),
4576
+ level: O,
4577
+ pos: j
4578
+ });
4579
+ }
4580
+ return !0;
4581
+ }), h.value = P;
4582
+ };
4583
+ let b = null;
4584
+ ae(
4585
+ () => a.editor,
4586
+ (P) => {
4587
+ if (b && (b(), b = null), !P) {
4588
+ h.value = [];
4589
+ return;
4590
+ }
4591
+ g();
4592
+ const B = () => {
4593
+ g();
4594
+ };
4595
+ P.on("update", B), b = () => {
4596
+ P.off("update", B);
4597
+ };
4598
+ },
4599
+ { immediate: !0 }
4600
+ );
4601
+ const M = (P) => {
4602
+ a.editor && (a.editor.chain().focus().setTextSelection(P.pos).run(), setTimeout(() => {
4603
+ var O;
4604
+ const B = document.querySelector(".docs-editor-scroll");
4605
+ if (!B) return;
4606
+ const j = B.querySelectorAll(".ProseMirror h1, .ProseMirror h2, .ProseMirror h3");
4607
+ for (const G of Array.from(j))
4608
+ if (((O = G.textContent) == null ? void 0 : O.trim()) === P.text) {
4609
+ G.scrollIntoView({ behavior: "smooth", block: "center" });
4610
+ return;
4611
+ }
4612
+ }, 50));
4613
+ };
4614
+ return (P, B) => (n(), r("aside", Ti, [
4615
+ e("div", Ai, [
4616
+ e("button", {
4617
+ type: "button",
4618
+ class: "flex h-8 w-8 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-200/80 dark:text-slate-400 dark:hover:bg-slate-800/80",
4619
+ title: c.value,
4620
+ onClick: B[0] || (B[0] = (j) => f("collapse"))
4621
+ }, [
4622
+ y(t(Ca), { class: "h-[18px] w-[18px]" })
4623
+ ], 8, Pi)
4624
+ ]),
4625
+ e("div", Ii, [
4626
+ e("div", Di, [
4627
+ e("span", Li, l(t(o)("documentTabs.documentTabs")), 1),
4628
+ e("button", {
4629
+ type: "button",
4630
+ class: "flex h-6 w-6 items-center justify-center rounded-full text-slate-600 hover:bg-slate-200 dark:text-slate-400 dark:hover:bg-slate-800 transition-colors",
4631
+ title: t(o)("documentTabs.addTab"),
4632
+ onClick: B[1] || (B[1] = (j) => f("add-tab"))
4633
+ }, [
4634
+ y(t(st), { class: "h-4 w-4" })
4635
+ ], 8, Hi)
4636
+ ]),
4637
+ e("div", zi, [
4638
+ (n(!0), r(q, null, K(s.tabs, (j) => (n(), r("div", {
4639
+ key: j.id,
4640
+ class: z(["group relative flex w-full items-center justify-between rounded-r-full py-1.5 pl-3 pr-2 text-left text-sm transition-all", [
4641
+ j.active ? "bg-[#c2e7ff]/70 text-[#001d35] dark:bg-blue-950/40 dark:text-blue-200 font-medium" : "text-slate-700 hover:bg-slate-200/40 dark:text-slate-300 dark:hover:bg-slate-800/30"
4642
+ ]])
4643
+ }, [
4644
+ k.value !== j.id ? (n(), r("button", {
4645
+ key: 0,
4646
+ type: "button",
4647
+ class: "flex flex-1 items-center gap-2 truncate pr-6 text-left",
4648
+ onClick: (O) => f("select-tab", j.id)
4649
+ }, [
4650
+ y(t(Ne), { class: "h-4 w-4 flex-shrink-0 opacity-70" }),
4651
+ e("span", ji, l(j.label), 1)
4652
+ ], 8, Bi)) : H("", !0),
4653
+ k.value === j.id ? (n(), r("div", Fi, [
4654
+ y(t(Ne), { class: "h-4 w-4 flex-shrink-0 opacity-70" }),
4655
+ de(e("input", {
4656
+ "onUpdate:modelValue": B[2] || (B[2] = (O) => u.value = O),
4657
+ type: "text",
4658
+ class: "flex-1 rounded border border-blue-400 bg-white px-1.5 py-0.5 text-xs text-slate-800 outline-none focus:ring-1 focus:ring-blue-400/50 dark:bg-slate-900 dark:text-slate-100",
4659
+ onBlur: (O) => L(j.id),
4660
+ onKeydown: [
4661
+ ot((O) => L(j.id), ["enter"]),
4662
+ ot(D, ["esc"])
4663
+ ],
4664
+ onClick: B[3] || (B[3] = R(() => {
4665
+ }, ["stop"]))
4666
+ }, null, 40, Ei), [
4667
+ [ce, u.value]
4668
+ ])
4669
+ ])) : H("", !0),
4670
+ e("div", Ri, [
4671
+ k.value !== j.id ? (n(), r("button", {
4672
+ key: 0,
4673
+ type: "button",
4674
+ class: z(["rounded-full p-1 text-slate-500 opacity-0 transition-opacity hover:bg-slate-200/70 group-hover:opacity-100 dark:hover:bg-slate-700/70", { "opacity-100": d.value === j.id }]),
4675
+ onClick: R((O) => _(j.id), ["stop"])
4676
+ }, [
4677
+ y(t(Vt), { class: "h-3.5 w-3.5" })
4678
+ ], 10, Ni)) : H("", !0),
4679
+ d.value === j.id ? (n(), r("div", Oi, [
4680
+ e("button", {
4681
+ type: "button",
4682
+ class: "flex w-full items-center px-3 py-1.5 text-xs hover:bg-slate-50 dark:hover:bg-slate-700/50",
4683
+ onClick: R((O) => S(j), ["stop"])
4684
+ }, l(t(o)("documentTabs.rename")), 9, Vi),
4685
+ e("button", {
4686
+ type: "button",
4687
+ class: "flex w-full items-center px-3 py-1.5 text-xs text-red-600 dark:text-red-400 hover:bg-slate-50 dark:hover:bg-slate-700/50 disabled:opacity-40",
4688
+ disabled: s.tabs.length <= 1,
4689
+ onClick: R((O) => I(j.id), ["stop"])
4690
+ }, l(t(o)("documentTabs.delete")), 9, qi)
4691
+ ])) : H("", !0)
4692
+ ])
4693
+ ], 2))), 128))
4694
+ ]),
4695
+ B[4] || (B[4] = e("div", { class: "h-px bg-slate-200/80 dark:bg-slate-800 mx-2" }, null, -1)),
4696
+ e("div", Ui, [
4697
+ e("span", Ki, l(t(o)("documentTabs.outline")), 1),
4698
+ h.value.length > 0 ? (n(), r("div", Wi, [
4699
+ (n(!0), r(q, null, K(h.value, (j) => (n(), r("button", {
4700
+ key: j.id,
4701
+ type: "button",
4702
+ class: z(["w-full text-left text-xs text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200 py-1 transition-colors truncate", [
4703
+ j.level === 2 ? "pl-3" : "",
4704
+ j.level === 3 ? "pl-6" : ""
4705
+ ]]),
4706
+ onClick: (O) => M(j)
4707
+ }, l(j.text), 11, Gi))), 128))
4708
+ ])) : (n(), r("p", Ji, l(t(o)("documentTabs.placeholder")), 1))
4709
+ ])
4710
+ ]),
4711
+ e("div", Zi, [
4712
+ (n(!0), r(q, null, K(a.tabs, (j) => (n(), r("button", {
4713
+ key: j.id,
4714
+ type: "button",
4715
+ class: z(["flex h-8 w-8 items-center justify-center rounded-lg transition-colors", [
4716
+ j.active ? "bg-blue-100 text-blue-600 dark:bg-blue-950/40 dark:text-blue-300" : "text-slate-500 hover:bg-slate-200 dark:text-slate-400 dark:hover:bg-slate-800"
4717
+ ]]),
4718
+ title: j.label,
4719
+ onClick: (O) => f("select-tab", j.id)
4720
+ }, [
4721
+ y(t(Ne), { class: "h-4 w-4" })
4722
+ ], 10, Yi))), 128))
4723
+ ])
4724
+ ]));
4725
+ }
4726
+ }), Qi = ["value"], Xi = ["value"], dd = /* @__PURE__ */ le({
4727
+ __name: "FontSizeSelect",
4728
+ props: {
4729
+ editor: {}
4730
+ },
4731
+ setup(s) {
4732
+ const p = s, o = ["10px", "12px", "14px", "16px", "18px", "20px", "24px", "30px", "36px"], a = F(() => p.editor && p.editor.getAttributes("textStyle").fontSize || "16px");
4733
+ function c(f, d) {
4734
+ d.preventDefault(), p.editor && (f === "16px" ? p.editor.commands.unsetFontSize() : p.editor.commands.setFontSize(f), p.editor.commands.focus());
4735
+ }
4736
+ return (f, d) => s.editor ? (n(), r("select", {
4737
+ key: 0,
4738
+ class: "h-7 rounded border border-slate-200 bg-white px-2 text-xs text-slate-600 outline-none transition focus:border-cyan-400 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300",
4739
+ value: a.value,
4740
+ onChange: d[0] || (d[0] = (k) => c(k.target.value, k))
4741
+ }, [
4742
+ (n(), r(q, null, K(o, (k) => e("option", {
4743
+ key: k,
4744
+ value: k
4745
+ }, l(k), 9, Xi)), 64))
4746
+ ], 40, Qi)) : H("", !0);
4747
+ }
4748
+ });
4749
+ export {
4750
+ sd as AISidebar,
4751
+ Zn as BubbleMenu,
4752
+ ld as CommentsSidebar,
4753
+ od as DocsEditor,
4754
+ id as DocumentTabsSidebar,
4755
+ Un as EditorToolbar,
4756
+ dd as FontSizeSelect,
4757
+ Xo as HeaderBar,
4758
+ rd as HistorySidebar,
4759
+ nd as PageView,
4760
+ xa as SlashMenu,
4761
+ gs as StatusBar,
4762
+ el as TOCSidebar,
4763
+ Lt as ThemeToggle,
4764
+ Ft as defaultLocale,
4765
+ ca as getLocaleMessages,
4766
+ ba as getLocaleName,
4767
+ ma as getSupportedLocales,
4768
+ ut as isLocale,
4769
+ ct as messages,
4770
+ ha as provideLocale,
4771
+ ia as useEditor,
4772
+ we as useLocale,
4773
+ zt as useTheme
4774
+ };