@hiai-gg/docsmint 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/backend/index.js +49330 -66661
- package/dist/backend-account-runtime-cleanup.js +291 -291
- package/dist/backend-api-key-facade.js +4 -4
- package/dist/backend-pipeline-cancellation.js +285 -285
- package/dist/frontend/CategoryDialog-CVJi5PJu.js +602 -0
- package/dist/frontend/{ConfirmDialog-B1MjKlVQ.js → ConfirmDialog-0JwB8mKN.js} +5 -8
- package/dist/frontend/{CreateSnapshotDialog-BTMoPFdj.js → CreateSnapshotDialog-BLrtuYs5.js} +63 -68
- package/dist/frontend/{DatePicker-Bmjko3X7.js → DatePicker-BwSb8TRv.js} +17 -29
- package/dist/frontend/{DeleteDialog-BkfIeKXO.js → DeleteDialog-s7Dr6bXg.js} +51 -56
- package/dist/frontend/{FolderNode-Do8pIfyA.js → FolderNode-Y7cV9xeX.js} +105 -106
- package/dist/frontend/{FolderTreeSelector-FyxhcHjr.js → FolderTreeSelector-BR3lYmPU.js} +18 -20
- package/dist/frontend/HiAiEditor-BQERr-cd.js +3077 -0
- package/dist/frontend/{HiaiDocsExtensionProvider-Cc3yzW5I.js → HiaiDocsExtensionProvider-A2nGddUR.js} +2 -3
- package/dist/frontend/{Icon-3EYzvNyk.js → Icon-CiHcxcpv.js} +1 -2
- package/dist/frontend/SettingsDialog-BvS74JZu.js +978 -0
- package/dist/frontend/{ShareDialog-Ddvl7xvb.js → ShareDialog-Bo50h_Oe.js} +23 -25
- package/dist/frontend/Sidebar-i0kbanpg.js +2123 -0
- package/dist/frontend/{TagCreateDialog-DQmMJe_E.js → TagCreateDialog-DhKfsfv3.js} +78 -86
- package/dist/frontend/action_cancel-BdsWzQKU.js +4 -0
- package/dist/frontend/action_close-CVhfLPRQ.js +4 -0
- package/dist/frontend/action_create-ByaroO1_.js +4 -0
- package/dist/frontend/action_delete-SRloglWY.js +4 -0
- package/dist/frontend/action_go_to-DO1bicF-.js +4 -0
- package/dist/frontend/action_loading-iQ0KsN6i.js +4 -0
- package/dist/frontend/action_save-DeqrZQwV.js +4 -0
- package/dist/frontend/api/attachments.js +1 -2
- package/dist/frontend/api/categories.js +1 -2
- package/dist/frontend/api/documents.js +1 -2
- package/dist/frontend/api/folders.js +1 -2
- package/dist/frontend/api/settings.js +1 -2
- package/dist/frontend/api/share.js +1 -2
- package/dist/frontend/api/tags.js +1 -2
- package/dist/frontend/{api-keys-DIwAdYkg.js → api-keys-B63imiLr.js} +2 -3
- package/dist/frontend/app-shell.js +55 -79
- package/dist/frontend/{attachments-C225gTA7.js → attachments-Bfly-sam.js} +2 -3
- package/dist/frontend/{auth-client-C5EyWdAF.js → auth-client-Dx7d9Tzo.js} +252 -253
- package/dist/frontend/{bundle-mjs-CZ3g1Uzr.js → bundle-mjs-clTO1WW-.js} +5 -23
- package/dist/frontend/{camera-DtgHzfVI.js → camera-DsdOPOcD.js} +2 -3
- package/dist/frontend/{categories-C8AAkhCR.js → categories-CusvHb5Y.js} +3 -4
- package/dist/frontend/{categories_update_error-4aSI8PTr.js → categories_update_error-Cn8DBBHv.js} +2 -3
- package/dist/frontend/{check-DVx65aSv.js → check-DiMZRkKS.js} +2 -3
- package/dist/frontend/{chevron-down-C2tbZ8Ol.js → chevron-down-CxFrMFDJ.js} +2 -3
- package/dist/frontend/{circle-check-BAN-D7yg.js → circle-check-B4F_qgPx.js} +2 -3
- package/dist/frontend/{client-GbtOH90i.js → client-BDdDd84W.js} +1 -2
- package/dist/frontend/{clipboard-Cgzxc0_R.js → clipboard-Dt1oW6nm.js} +1 -2
- package/dist/frontend/{clock-ByiB0SwQ.js → clock-dcpueRk-.js} +2 -3
- package/dist/frontend/collaboration.js +6 -12
- package/dist/frontend/components/category-dialog.js +1 -2
- package/dist/frontend/components/create-snapshot-dialog.js +1 -2
- package/dist/frontend/components/delete-dialog.js +1 -2
- package/dist/frontend/components/editor/compact-editor.js +2 -3
- package/dist/frontend/components/editor/document-editor.js +1 -2
- package/dist/frontend/components/editor/document-title.js +3 -4
- package/dist/frontend/components/editor/docx-serializer.js +123 -167
- package/dist/frontend/components/editor/extensions.js +1 -2
- package/dist/frontend/components/editor/markdown-toggle.js +5 -6
- package/dist/frontend/components/editor/markdown.js +1 -2
- package/dist/frontend/components/folder-node.js +1 -2
- package/dist/frontend/components/folder-tree-selector.js +1 -2
- package/dist/frontend/components/save-as-dialog.js +86 -90
- package/dist/frontend/components/settings.js +1 -2
- package/dist/frontend/components/share-dialog.js +1 -2
- package/dist/frontend/components/sidebar.js +1 -2
- package/dist/frontend/components/tag-create-dialog.js +1 -2
- package/dist/frontend/components/version-history.js +177 -180
- package/dist/frontend/{context-D0zPFXZ4.js → context-BguSRnCt.js} +1 -2
- package/dist/frontend/{copy-CRzvfZGb.js → copy-Bag46YaR.js} +2 -3
- package/dist/frontend/dashboard.js +666 -690
- package/dist/frontend/{db-CgTtukT4.js → db-B1ZV452J.js} +22 -39
- package/dist/frontend/{dialog-a_ZcpEC5.js → dialog-C0Bpok1d.js} +10 -18
- package/dist/frontend/{dist-CcHOStsA.js → dist-BlcV_BOY.js} +2 -3
- package/dist/frontend/{dist-qd_OnyUC.js → dist-DjId3RKL.js} +8 -21
- package/dist/frontend/dist-Dl9qg10h.js +301 -0
- package/dist/frontend/{dndzone-CDhrbpTg.js → dndzone-C62yjeG3.js} +38 -53
- package/dist/frontend/doc-tabs.js +1 -2
- package/dist/frontend/doc_title_label-BOuZzvqv.js +4 -0
- package/dist/frontend/doc_title_placeholder-ZxpdWWEn.js +4 -0
- package/dist/frontend/{document-drop-coordinator-Da7HcXgv.js → document-drop-coordinator-C_o93kKW.js} +3 -4
- package/dist/frontend/document-drop-coordinator.js +1 -2
- package/dist/frontend/{documents-CwCs1rA7.js → documents-CDJb8dv-.js} +4 -8
- package/dist/frontend/{dropdown-menu-DrHYReIC.js → dropdown-menu-B3nk2aM-.js} +13 -24
- package/dist/frontend/{editor-content-sanitizer-CWjqiz0T.js → editor-content-sanitizer-5MjSVPVn.js} +1 -2
- package/dist/frontend/editor-preferences.js +1 -2
- package/dist/frontend/{editor-preferences.svelte-Bt_A9k7n.js → editor-preferences.svelte-BpTE4mbz.js} +3 -5
- package/dist/frontend/{editorExtensions-DPR-CjMu.js → editorExtensions-DbiFj4tn.js} +3 -4
- package/dist/frontend/{editor_markdown_placeholder-BIWDUF1E.js → editor_markdown_placeholder-BztIY9Ci.js} +2 -3
- package/dist/frontend/{ellipsis-vertical-qxNgoXu-.js → ellipsis-vertical-Oymsv1R4.js} +2 -3
- package/dist/frontend/{error_dismiss-Dx_JbRjs.js → error_dismiss-C651ZdWI.js} +2 -3
- package/dist/frontend/error_generic-BlWqOE-a.js +4 -0
- package/dist/frontend/extension.js +1 -2
- package/dist/frontend/{folder-D74E-Kdp.js → folder-BpmB_sAy.js} +3 -5
- package/dist/frontend/folder-refresh.js +1 -2
- package/dist/frontend/{folders-CC0UWkZH.js → folders-DgKSovXa.js} +2 -3
- package/dist/frontend/{folders_rename-BJo4Gipq.js → folders_rename-Cxbg5GIw.js} +2 -3
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/i18n.js +144 -145
- package/dist/frontend/{identity-CNhtuCJV.js → identity-B7HeOzDJ.js} +4 -5
- package/dist/frontend/{input-Q_7qCfnU.js → input-CbeB9220.js} +2 -3
- package/dist/frontend/keyboard.js +1 -2
- package/dist/frontend/{keyboard.svelte-CApmX0vl.js → keyboard.svelte-BBUdhTsM.js} +2 -3
- package/dist/frontend/{label-Dj8FDEhf.js → label-CfBWf3gI.js} +2 -3
- package/dist/frontend/{lib-aUbBbIW2.js → lib-CITdCbKa.js} +176 -365
- package/dist/frontend/{loader-circle-D3t5NkvC.js → loader-circle-skKwfRCB.js} +2 -3
- package/dist/frontend/markdown-6E9TWC6V.js +11 -0
- package/dist/frontend/offline/identity.js +1 -2
- package/dist/frontend/{popper-layer-force-mount-CNtiLgbV.js → popper-layer-force-mount-BG0eyrCk.js} +112 -284
- package/dist/frontend/{resolve-BG4HgzpN.js → resolve-DbT-KhGZ.js} +2 -3
- package/dist/frontend/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-CwxnZyOB.js} +2 -3
- package/dist/frontend/{rotate-ccw-B1ybQ8oQ.js → rotate-ccw-DAUX7np7.js} +2 -3
- package/dist/frontend/{route-context-DYQlUfzL.js → route-context-6OHiGtfb.js} +2 -4
- package/dist/frontend/{runtime-CwWSo6c9.js → runtime-CGUiMzK6.js} +1 -2
- package/dist/frontend/{schemas-1Na35n71.js → schemas-YXxhj5o8.js} +850 -880
- package/dist/frontend/scroll_to_top_aria-lJc2RSx_.js +4 -0
- package/dist/frontend/{search-preferences-B1GdbdUc.js → search-preferences-DuLDczRu.js} +1 -2
- package/dist/frontend/search.js +277 -292
- package/dist/frontend/{search_title-DOC0cPlQ.js → search_title-BETwQYJq.js} +2 -3
- package/dist/frontend/{select-value-BkI1W1bn.js → select-value-BY5Hw6Rl.js} +28 -65
- package/dist/frontend/{settings-CHx4wBwb.js → settings-DyePuqjp.js} +3 -4
- package/dist/frontend/{share-D5yo0JOh.js → share-3gWTTYvH.js} +2 -3
- package/dist/frontend/{share-context-BJ4GF4yT.js → share-context-C2xyVP9M.js} +29 -37
- package/dist/frontend/{share_copied-DPxVzfWh.js → share_copied-BuAnmpbz.js} +2 -3
- package/dist/frontend/{share_toggle_password-DdxfIjj1.js → share_toggle_password-LEYUeHWr.js} +2 -3
- package/dist/frontend/shared-document.js +27 -36
- package/dist/frontend/{sidebar_uncategorized-qJ2_Aonf.js → sidebar_uncategorized-C5PGOflV.js} +2 -3
- package/dist/frontend/{sort_relevance-DwYX5MO9.js → sort_relevance-DpCVLby_.js} +2 -3
- package/dist/frontend/{subfolders-refresh-store.svelte-DxP21a1c.js → subfolders-refresh-store.svelte-CeyqvNpu.js} +1 -2
- package/dist/frontend/{tag-qbTBLj-g.js → tag-Wdfe0rKU.js} +3 -5
- package/dist/frontend/{tag-store.svelte-ogVCMCbv.js → tag-store.svelte-C9VYWqLQ.js} +2 -3
- package/dist/frontend/{tags-CF_cqzSV.js → tags-DlDVothf.js} +3 -4
- package/dist/frontend/{tags_load_error-BKjA1pI0.js → tags_load_error-BINNpPPV.js} +2 -3
- package/dist/frontend/{tags_new-BiNAJ9Bx.js → tags_new-Dw0Uy43-.js} +2 -3
- package/dist/frontend/{textarea-BNK0LFUK.js → textarea-D6emvAwM.js} +2 -3
- package/dist/frontend/theme.js +2 -3
- package/dist/frontend/{theme.svelte-BRdxXd-B.js → theme.svelte-BiXvrqwh.js} +7 -23
- package/dist/frontend/{theme_system-BBNUhYKh.js → theme_system-YIfa_2Xt.js} +2 -3
- package/dist/frontend/utils/clipboard.js +1 -2
- package/dist/frontend/utils/dndzone.js +1 -2
- package/dist/frontend/{utils-BovMJHdA.js → utils-CnAmIMwr.js} +2 -3
- package/dist/frontend/utils-DH0uqK40.js +6 -0
- package/dist/frontend/utils.js +1 -2
- package/dist/frontend/version_create_snapshot-D8xjbuCq.js +4 -0
- package/dist/frontend/{version_restored_from-dVRN3Zdk.js → version_restored_from-DYFFSuQj.js} +2 -3
- package/dist/frontend/{version_snapshot_label_placeholder-DrMikux0.js → version_snapshot_label_placeholder-BhKq1NQ7.js} +2 -3
- package/dist/frontend/{weekday_we-C5H_M-df.js → weekday_we-BxbzNVWR.js} +2 -3
- package/dist/frontend/{x-CvSSnrjl.js → x-CBUgPygC.js} +2 -3
- package/dist/frontend/{yjs-VUcKqaKW.js → yjs-BbwnvxgY.js} +9 -23
- package/dist/frontend-ssr/api/attachments.js +2 -3
- package/dist/frontend-ssr/api/categories.js +1 -2
- package/dist/frontend-ssr/api/documents.js +1 -2
- package/dist/frontend-ssr/api/folders.js +1 -2
- package/dist/frontend-ssr/api/settings.js +1 -2
- package/dist/frontend-ssr/api/share.js +2 -3
- package/dist/frontend-ssr/api/tags.js +1 -2
- package/dist/frontend-ssr/app-shell.js +19 -28
- package/dist/frontend-ssr/assets/{CategoryDialog-DuZLLlt7.js → CategoryDialog-2CCX508O.js} +17 -20
- package/dist/frontend-ssr/assets/{ConfirmDialog-0WVu9BCE.js → ConfirmDialog-Cc6lcY1N.js} +8 -14
- package/dist/frontend-ssr/assets/{CreateSnapshotDialog-3vhDTFNu.js → CreateSnapshotDialog-BB8fXF9W.js} +9 -10
- package/dist/frontend-ssr/assets/{DatePicker-t12leL2Y.js → DatePicker-CfzKzipR.js} +9 -15
- package/dist/frontend-ssr/assets/{DeleteDialog-B0AU1fJR.js → DeleteDialog-DRU4UgOW.js} +4 -5
- package/dist/frontend-ssr/assets/{FolderNode-C-B-s8x1.js → FolderNode-Dg_5-orQ.js} +11 -12
- package/dist/frontend-ssr/assets/{FolderTreeSelector-DdQuEcj0.js → FolderTreeSelector-D0reTdFS.js} +5 -7
- package/dist/frontend-ssr/assets/{HiAiEditor-Cj3B2Dt6.js → HiAiEditor-DeHWAIj-.js} +44 -69
- package/dist/frontend-ssr/assets/{HiaiDocsExtensionProvider-BRKWmcDd.js → HiaiDocsExtensionProvider-D6cGL-9s.js} +2 -3
- package/dist/frontend-ssr/assets/{Icon-DE_3EnuF.js → Icon-CrIRbT5O.js} +4 -8
- package/dist/frontend-ssr/assets/{SettingsDialog-DAT-Zxu0.js → SettingsDialog-BpHY3IMb.js} +29 -40
- package/dist/frontend-ssr/assets/{ShareDialog-CpE9zd_f.js → ShareDialog-CY40nWZJ.js} +7 -9
- package/dist/frontend-ssr/assets/{Sidebar-B_Ey6QNL.js → Sidebar-fpYk5MGO.js} +55 -63
- package/dist/frontend-ssr/assets/{TagCreateDialog-DBHO1DPU.js → TagCreateDialog-C2tpdEuj.js} +13 -14
- package/dist/frontend-ssr/assets/{action_cancel-OVgQDP5Q.js → action_cancel-CsBbxW0m.js} +2 -3
- package/dist/frontend-ssr/assets/{action_close-DagDyMXk.js → action_close-lFKBqBwg.js} +2 -3
- package/dist/frontend-ssr/assets/{action_create-hqJWjyqh.js → action_create-BV4ZOcQW.js} +2 -3
- package/dist/frontend-ssr/assets/{action_delete-B1-16jSo.js → action_delete-CNmRhKQP.js} +2 -3
- package/dist/frontend-ssr/assets/{action_go_to-DQScgw7P.js → action_go_to-tN5I26xM.js} +2 -3
- package/dist/frontend-ssr/assets/{action_save-Bx7vlLZI.js → action_save-YCfMiKb4.js} +2 -3
- package/dist/frontend-ssr/assets/{api-keys-CHOrbU-Q.js → api-keys-G6oimJIv.js} +2 -3
- package/dist/frontend-ssr/assets/{auth-client-CITU3xkE.js → auth-client-BnnnJDAb.js} +102 -71
- package/dist/frontend-ssr/assets/{camera-B6ldo_Js.js → camera-OYNSMvMd.js} +2 -3
- package/dist/frontend-ssr/assets/{categories-C_dxFoHi.js → categories-bBPviKjl.js} +2 -3
- package/dist/frontend-ssr/assets/{categories_update_error-DkKgsqdD.js → categories_update_error-Bfx5vtvt.js} +11 -21
- package/dist/frontend-ssr/assets/{chevron-down-DQcr6JUc.js → chevron-down-DB6YsSbQ.js} +2 -3
- package/dist/frontend-ssr/assets/{chevron-right-9szrliZx.js → chevron-right-DOt2uY6b.js} +2 -3
- package/dist/frontend-ssr/assets/{circle-check-BgP9MRRv.js → circle-check-DQhTm9YR.js} +2 -3
- package/dist/frontend-ssr/assets/{client-rfwQYYHY.js → client-B2AniXwV.js} +1 -2
- package/dist/frontend-ssr/assets/{clipboard-CXOaoz2W.js → clipboard-CXKnyYba.js} +1 -2
- package/dist/frontend-ssr/assets/{clock-roNtGlT6.js → clock-B08dVWtf.js} +2 -3
- package/dist/frontend-ssr/assets/{context-Bi_mO-NS.js → context-C_xxvxnR.js} +1 -2
- package/dist/frontend-ssr/assets/{copy-BYqYnBIQ.js → copy-2jsznHar.js} +2 -3
- package/dist/frontend-ssr/assets/{db-DxRzq-kx.js → db-BEKLU5Fc.js} +2 -3
- package/dist/frontend-ssr/assets/{dialog-SqCnTT43.js → dialog-C6U-DqLr.js} +9 -17
- package/dist/frontend-ssr/assets/{dist-CaZQ1FhA.js → dist-DqXTz_zE.js} +9 -12
- package/dist/frontend-ssr/assets/{dist-CqxHwOlp.js → dist-ip9bPdma.js} +3 -6
- package/dist/frontend-ssr/assets/{dndzone-CnTCMhPd.js → dndzone-Dx3jt_e4.js} +4 -6
- package/dist/frontend-ssr/assets/{doc_title_label-Ev_ltlh3.js → doc_title_label-CE_l-Gum.js} +2 -3
- package/dist/frontend-ssr/assets/{doc_title_placeholder-DSHpUb7w.js → doc_title_placeholder-7_i7PtG6.js} +2 -3
- package/dist/frontend-ssr/assets/{document-drop-coordinator-CEaYACsC.js → document-drop-coordinator-BVytYy2K.js} +1 -2
- package/dist/frontend-ssr/assets/{documents-CEuA1V6N.js → documents-B_wpQFTh.js} +2 -3
- package/dist/frontend-ssr/assets/{dropdown-menu-CE6U0f1b.js → dropdown-menu-BS5fcN9l.js} +12 -23
- package/dist/frontend-ssr/assets/{editor-content-sanitizer-Gjm93iR-.js → editor-content-sanitizer-CIdFjBSC.js} +1 -2
- package/dist/frontend-ssr/assets/{editor-preferences.svelte-iI5jJM1x.js → editor-preferences.svelte-CdAXTd-I.js} +2 -4
- package/dist/frontend-ssr/assets/{editorExtensions-rhletNji.js → editorExtensions-2O7O2Nhv.js} +2 -3
- package/dist/frontend-ssr/assets/{editor_markdown_placeholder-BpezdkOr.js → editor_markdown_placeholder-CAeLJjFT.js} +3 -5
- package/dist/frontend-ssr/assets/{editor_toolbar_undo-CKJAOqv2.js → editor_toolbar_undo-CVCfQIS1.js} +29 -57
- package/dist/frontend-ssr/assets/{ellipsis-vertical-Cg1MrZsl.js → ellipsis-vertical-IFHt2NM1.js} +2 -3
- package/dist/frontend-ssr/assets/{error_generic-DTK0kwxT.js → error_generic-BB80i0Vk.js} +3 -5
- package/dist/frontend-ssr/assets/{folder-DHB-CEcQ.js → folder-CXa1_bm5.js} +2 -3
- package/dist/frontend-ssr/assets/{folders-BOXeb9hz.js → folders-CTLqWbMm.js} +2 -3
- package/dist/frontend-ssr/assets/{folders_rename-DvciOb6K.js → folders_rename-ydbfwQlj.js} +7 -13
- package/dist/frontend-ssr/assets/{identity-B7ngLQzZ.js → identity-DTz1SQwC.js} +2 -3
- package/dist/frontend-ssr/assets/{input-DVrBVPgs.js → input-Bxw9sFF0.js} +2 -3
- package/dist/frontend-ssr/assets/{keyboard.svelte-BgF47N3L.js → keyboard.svelte-njehUCm3.js} +1 -2
- package/dist/frontend-ssr/assets/{label-vtCK3pTp.js → label-CMWedjs6.js} +2 -3
- package/dist/frontend-ssr/assets/{loader-circle-D3NWhCif.js → loader-circle-zbKj9Qb-.js} +2 -3
- package/dist/frontend-ssr/assets/{markdown-Co31-Tl2.js → markdown-BmIhDQp7.js} +2 -3
- package/dist/frontend-ssr/assets/{popper-layer-force-mount-C4dMMt-f.js → popper-layer-force-mount-CSHZsG2E.js} +78 -156
- package/dist/frontend-ssr/assets/{resolve-BqHozBXl.js → resolve-Wqdff4CL.js} +1 -2
- package/dist/frontend-ssr/assets/{rotate-ccw-DNf3nwMD.js → rotate-ccw-B7SaTFWf.js} +2 -3
- package/dist/frontend-ssr/assets/{route-context-BPRerEtZ.js → route-context-BsqLFt5Y.js} +2 -4
- package/dist/frontend-ssr/assets/{runtime-O78RzRqx.js → runtime-BX6-jTn_.js} +1 -2
- package/dist/frontend-ssr/assets/{scroll_to_top_aria-BN4ZfOnM.js → scroll_to_top_aria-CAYSiGHO.js} +2 -3
- package/dist/frontend-ssr/assets/{search_title-CKUsQDT0.js → search_title-C7NVXXq3.js} +2 -3
- package/dist/frontend-ssr/assets/{search_toggle_filters-hS9rvQhC.js → search_toggle_filters-Bq_YVD8s.js} +15 -29
- package/dist/frontend-ssr/assets/{select-value-Ce5c_fuA.js → select-value-TgslfiUB.js} +18 -34
- package/dist/frontend-ssr/assets/{settings-BRxvn30Y.js → settings-B1MA_FjO.js} +3 -4
- package/dist/frontend-ssr/assets/{share-context-B4UpvTSw.js → share-context-RVh8AExX.js} +17 -22
- package/dist/frontend-ssr/assets/{share_copied-BxU9rjXG.js → share_copied-CrwEwkb3.js} +31 -61
- package/dist/frontend-ssr/assets/{share_toggle_password-C6OmroqR.js → share_toggle_password-Co56z0Ha.js} +11 -21
- package/dist/frontend-ssr/assets/{sidebar_uncategorized-Dx-LTd5w.js → sidebar_uncategorized-COWdmZ3d.js} +6 -11
- package/dist/frontend-ssr/assets/{subfolders-refresh-store.svelte-CXHxQWKh.js → subfolders-refresh-store.svelte-LxG18U0n.js} +1 -2
- package/dist/frontend-ssr/assets/{tag-Cqv0fWVG.js → tag-BGhtDKpP.js} +3 -5
- package/dist/frontend-ssr/assets/{tag-store.svelte-QRysvGKe.js → tag-store.svelte-CUUgAaDD.js} +2 -3
- package/dist/frontend-ssr/assets/{tags-BBCoFYro.js → tags-C7u-LBsl.js} +2 -3
- package/dist/frontend-ssr/assets/{tags_load_error-CPrc6Gzs.js → tags_load_error-DW4FbHvr.js} +19 -37
- package/dist/frontend-ssr/assets/{tags_new-VmMr9v2V.js → tags_new-Dr3ByMPZ.js} +4 -7
- package/dist/frontend-ssr/assets/{textarea-BdjOJJVb.js → textarea-Bz5Tz4rw.js} +2 -3
- package/dist/frontend-ssr/assets/{theme.svelte-D6bbaJ9m.js → theme.svelte-CdHah46l.js} +3 -5
- package/dist/frontend-ssr/assets/{theme_system-BucaNntV.js → theme_system-E97FASeq.js} +19 -37
- package/dist/frontend-ssr/assets/{utils-DvZnctjz.js → utils-085zSPe5.js} +1 -2
- package/dist/frontend-ssr/assets/{utils-D3X7I8nz.js → utils-DF6CmRDX.js} +1 -2
- package/dist/frontend-ssr/assets/{version_create_snapshot-COHzwjle.js → version_create_snapshot-DeeYB7bb.js} +2 -3
- package/dist/frontend-ssr/assets/{version_restored_from-CertjFDl.js → version_restored_from-CTt2LM4A.js} +13 -25
- package/dist/frontend-ssr/assets/{version_snapshot_label_placeholder-Cy_rMCij.js → version_snapshot_label_placeholder-BbGD9YuN.js} +12 -23
- package/dist/frontend-ssr/assets/{weekday_we-DrI3U230.js → weekday_we-BzGQ-iFc.js} +22 -43
- package/dist/frontend-ssr/collaboration.js +2 -4
- package/dist/frontend-ssr/components/category-dialog.js +1 -2
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -2
- package/dist/frontend-ssr/components/delete-dialog.js +1 -2
- package/dist/frontend-ssr/components/editor/compact-editor.js +2 -3
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -2
- package/dist/frontend-ssr/components/editor/document-title.js +3 -4
- package/dist/frontend-ssr/components/editor/docx-serializer.js +1 -2
- package/dist/frontend-ssr/components/editor/extensions.js +1 -2
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +4 -5
- package/dist/frontend-ssr/components/editor/markdown.js +1 -2
- package/dist/frontend-ssr/components/folder-node.js +1 -2
- package/dist/frontend-ssr/components/folder-tree-selector.js +1 -2
- package/dist/frontend-ssr/components/save-as-dialog.js +12 -13
- package/dist/frontend-ssr/components/settings.js +1 -2
- package/dist/frontend-ssr/components/share-dialog.js +1 -2
- package/dist/frontend-ssr/components/sidebar.js +1 -2
- package/dist/frontend-ssr/components/tag-create-dialog.js +1 -2
- package/dist/frontend-ssr/components/version-history.js +18 -21
- package/dist/frontend-ssr/dashboard.js +64 -88
- package/dist/frontend-ssr/doc-tabs.js +1 -2
- package/dist/frontend-ssr/document-drop-coordinator.js +1 -2
- package/dist/frontend-ssr/editor-preferences.js +1 -2
- package/dist/frontend-ssr/extension.js +1 -2
- package/dist/frontend-ssr/folder-refresh.js +1 -2
- package/dist/frontend-ssr/i18n.js +315 -603
- package/dist/frontend-ssr/keyboard.js +1 -2
- package/dist/frontend-ssr/offline/identity.js +1 -2
- package/dist/frontend-ssr/search.js +17 -20
- package/dist/frontend-ssr/shared-document.js +5 -8
- package/dist/frontend-ssr/theme.js +2 -3
- package/dist/frontend-ssr/utils/clipboard.js +1 -2
- package/dist/frontend-ssr/utils/dndzone.js +1 -2
- package/dist/frontend-ssr/utils.js +1 -2
- package/dist/lifecycle-runtime.js +3996 -17873
- package/dist/mcp-cli.js +64 -64
- package/dist/mcp-server.js +68 -68
- package/package.json +4 -4
- package/packages/cli/src/index.ts +1 -1
- package/server.json +2 -2
- package/dist/frontend/CategoryDialog-CJeAYxcd.js +0 -630
- package/dist/frontend/HiAiEditor-D6ad_auS.js +0 -3129
- package/dist/frontend/SettingsDialog-B8Oswuqb.js +0 -991
- package/dist/frontend/Sidebar-BV0IDqTS.js +0 -2149
- package/dist/frontend/action_cancel-Cuxsznzz.js +0 -5
- package/dist/frontend/action_close-BJm_52wm.js +0 -5
- package/dist/frontend/action_create-CtBQrRuj.js +0 -5
- package/dist/frontend/action_delete-BXBIzvn0.js +0 -5
- package/dist/frontend/action_go_to-VmK5jmEk.js +0 -5
- package/dist/frontend/action_loading-BLCGJVA9.js +0 -5
- package/dist/frontend/action_save-BRN2Z_GP.js +0 -5
- package/dist/frontend/dist-DcHl92QO.js +0 -316
- package/dist/frontend/doc_title_label-DS9jSIh2.js +0 -5
- package/dist/frontend/doc_title_placeholder-DBQpM1aH.js +0 -5
- package/dist/frontend/error_generic-CzNtmBT4.js +0 -5
- package/dist/frontend/markdown-O9YJA70S.js +0 -12
- package/dist/frontend/scroll_to_top_aria-CvkNF_Hu.js +0 -5
- package/dist/frontend/utils-BlHvR6OL.js +0 -7
- package/dist/frontend/version_create_snapshot-3bu-0qzH.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/broadcast-channel.mjs
|
|
2
2
|
var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.now() / 1e3), n = class {
|
|
3
3
|
listeners = /* @__PURE__ */ new Set();
|
|
4
4
|
name;
|
|
@@ -11,7 +11,7 @@ var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.n
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
post(e) {
|
|
14
|
-
if (
|
|
14
|
+
if (typeof window < "u") try {
|
|
15
15
|
localStorage.setItem(this.name, JSON.stringify({
|
|
16
16
|
...e,
|
|
17
17
|
timestamp: t()
|
|
@@ -23,7 +23,7 @@ var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.n
|
|
|
23
23
|
let e = (e) => {
|
|
24
24
|
if (e.key !== this.name) return;
|
|
25
25
|
let t = JSON.parse(e.newValue ?? "{}");
|
|
26
|
-
t?.event
|
|
26
|
+
t?.event === "session" && t?.data && this.listeners.forEach((e) => e(t));
|
|
27
27
|
};
|
|
28
28
|
return window.addEventListener("storage", e), () => {
|
|
29
29
|
window.removeEventListener("storage", e);
|
|
@@ -33,8 +33,7 @@ var e = Symbol.for("better-auth:broadcast-channel"), t = () => Math.floor(Date.n
|
|
|
33
33
|
function r(t = "better-auth.message") {
|
|
34
34
|
return globalThis[e] || (globalThis[e] = new n(t)), globalThis[e];
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
//#region ../node_modules/.bun/nanostores@1.4.0/node_modules/nanostores/clean-stores/index.js
|
|
36
|
+
// ../node_modules/.bun/nanostores@1.4.0/node_modules/nanostores/clean-stores/index.js
|
|
38
37
|
var i = Symbol("clean"), a = [], o = 0, s = null, c = 4, l = globalThis.nanostoresGlobal ||= { epoch: 0 }, u = () => {
|
|
39
38
|
for (o = 0; o < a.length; o += c) a[o](a[o + 1].value, a[o + 2], a[o + 3]);
|
|
40
39
|
a.length = 0;
|
|
@@ -131,8 +130,7 @@ var i = Symbol("clean"), a = [], o = 0, s = null, c = 4, l = globalThis.nanostor
|
|
|
131
130
|
e.listen = n, e.off = r;
|
|
132
131
|
};
|
|
133
132
|
});
|
|
134
|
-
|
|
135
|
-
//#region ../node_modules/.bun/better-auth@1.7.7+7ee5f890295c53f0/node_modules/better-auth/dist/client/equality.mjs
|
|
133
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/equality.mjs
|
|
136
134
|
function b(e) {
|
|
137
135
|
if (typeof e != "object" || !e) return !1;
|
|
138
136
|
let t = Object.getPrototypeOf(e);
|
|
@@ -158,8 +156,7 @@ function S(e, t) {
|
|
|
158
156
|
t(e.value, n) && r();
|
|
159
157
|
});
|
|
160
158
|
}
|
|
161
|
-
|
|
162
|
-
//#region ../node_modules/.bun/better-auth@1.7.7+7ee5f890295c53f0/node_modules/better-auth/dist/client/focus-manager.mjs
|
|
159
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/focus-manager.mjs
|
|
163
160
|
var C = Symbol.for("better-auth:focus-manager"), w = class {
|
|
164
161
|
listeners = /* @__PURE__ */ new Set();
|
|
165
162
|
subscribe(e) {
|
|
@@ -180,12 +177,11 @@ var C = Symbol.for("better-auth:focus-manager"), w = class {
|
|
|
180
177
|
};
|
|
181
178
|
}
|
|
182
179
|
};
|
|
183
|
-
function
|
|
180
|
+
function ee() {
|
|
184
181
|
return globalThis[C] || (globalThis[C] = new w()), globalThis[C];
|
|
185
182
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
var E = Symbol.for("better-auth:online-manager"), ee = class {
|
|
183
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/online-manager.mjs
|
|
184
|
+
var T = Symbol.for("better-auth:online-manager"), te = class {
|
|
189
185
|
listeners = /* @__PURE__ */ new Set();
|
|
190
186
|
isOnline = typeof navigator < "u" ? navigator.onLine : !0;
|
|
191
187
|
subscribe(e) {
|
|
@@ -204,17 +200,11 @@ var E = Symbol.for("better-auth:online-manager"), ee = class {
|
|
|
204
200
|
};
|
|
205
201
|
}
|
|
206
202
|
};
|
|
207
|
-
function
|
|
208
|
-
return globalThis[
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var te = {
|
|
213
|
-
proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
|
|
214
|
-
constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
|
|
215
|
-
protoShort: /"__proto__"\s*:/,
|
|
216
|
-
constructorShort: /"constructor"\s*:/
|
|
217
|
-
}, ne = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, O = {
|
|
203
|
+
function E() {
|
|
204
|
+
return globalThis[T] || (globalThis[T] = new te()), globalThis[T];
|
|
205
|
+
}
|
|
206
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/parser.mjs
|
|
207
|
+
var ne = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, D = {
|
|
218
208
|
true: !0,
|
|
219
209
|
false: !1,
|
|
220
210
|
null: null,
|
|
@@ -240,26 +230,23 @@ function oe(e, t = {}) {
|
|
|
240
230
|
let { strict: n = !1, warnings: r = !1, reviver: i, parseDates: a = !0 } = t;
|
|
241
231
|
if (typeof e != "string") return e;
|
|
242
232
|
let o = e.trim(), s = o.toLowerCase();
|
|
243
|
-
if (s.length <= 9 && s in
|
|
233
|
+
if (s.length <= 9 && s in D) return D[s];
|
|
244
234
|
if (!ne.test(o)) {
|
|
245
235
|
if (n) throw SyntaxError("[better-json] Invalid JSON");
|
|
246
236
|
return e;
|
|
247
237
|
}
|
|
248
|
-
if (Object.entries(te).some(([e, t]) => {
|
|
249
|
-
let n = t.test(o);
|
|
250
|
-
return n && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`), n;
|
|
251
|
-
}) && n) throw Error("[better-json] Potential prototype pollution attempt detected");
|
|
252
238
|
try {
|
|
253
239
|
return JSON.parse(o, (e, t) => {
|
|
254
240
|
if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) {
|
|
241
|
+
if (n) throw Error("[better-json] Potential prototype pollution attempt detected");
|
|
255
242
|
r && console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
243
|
+
} else {
|
|
244
|
+
if (a && typeof t == "string") {
|
|
245
|
+
let e = ae(t);
|
|
246
|
+
if (e) return e;
|
|
247
|
+
}
|
|
248
|
+
return i ? i(e, t) : t;
|
|
261
249
|
}
|
|
262
|
-
return i ? i(e, t) : t;
|
|
263
250
|
});
|
|
264
251
|
} catch (t) {
|
|
265
252
|
if (n) throw t;
|
|
@@ -269,36 +256,26 @@ function oe(e, t = {}) {
|
|
|
269
256
|
function se(e, t = { strict: !0 }) {
|
|
270
257
|
return oe(e, t);
|
|
271
258
|
}
|
|
272
|
-
|
|
273
|
-
//#region ../node_modules/.bun/better-auth@1.7.7+7ee5f890295c53f0/node_modules/better-auth/dist/client/query-atom.mjs
|
|
259
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/query-atom.mjs
|
|
274
260
|
var ce = Symbol.for("better-auth:auth-query");
|
|
275
261
|
function le(e) {
|
|
276
262
|
let t = /* @__PURE__ */ d(e);
|
|
277
263
|
return Object.defineProperty(t, ce, { value: !0 }), t;
|
|
278
264
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
var k = () => Math.floor(Date.now() / 1e3), ue = 5;
|
|
265
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/session-refresh.mjs
|
|
266
|
+
var O = () => Math.floor(Date.now() / 1e3), ue = 5;
|
|
282
267
|
function de(e) {
|
|
283
268
|
let { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: i, options: a = {} } = e, o = a.sessionOptions?.refetchInterval ?? 0, s = a.sessionOptions?.refetchOnWindowFocus ?? !0, c = a.sessionOptions?.refetchWhenOffline ?? !1, l = {
|
|
284
269
|
isInitialized: !1,
|
|
285
270
|
lastSessionRequest: 0
|
|
286
|
-
}, u = () => c ||
|
|
271
|
+
}, u = () => c || E().isOnline, d = (e) => {
|
|
287
272
|
if (u()) {
|
|
288
|
-
if (e?.event === "storage")
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
if (e?.event === "visibilitychange") {
|
|
297
|
-
if (k() - l.lastSessionRequest < ue) return;
|
|
298
|
-
l.lastSessionRequest = k(), t();
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
t();
|
|
273
|
+
if (e?.event === "storage") t();
|
|
274
|
+
else if (e?.event === "poll") l.lastSessionRequest = O(), t();
|
|
275
|
+
else if (e?.event === "visibilitychange") {
|
|
276
|
+
if (O() - l.lastSessionRequest < ue) return;
|
|
277
|
+
l.lastSessionRequest = O(), t();
|
|
278
|
+
} else t();
|
|
302
279
|
}
|
|
303
280
|
}, f = (e) => {
|
|
304
281
|
r().post({
|
|
@@ -315,11 +292,11 @@ function de(e) {
|
|
|
315
292
|
d({ event: "storage" });
|
|
316
293
|
});
|
|
317
294
|
}, h = () => {
|
|
318
|
-
s && (l.unsubscribeFocus =
|
|
295
|
+
s && (l.unsubscribeFocus = ee().subscribe(() => {
|
|
319
296
|
d({ event: "visibilitychange" });
|
|
320
297
|
}));
|
|
321
298
|
}, g = () => {
|
|
322
|
-
l.unsubscribeOnline =
|
|
299
|
+
l.unsubscribeOnline = E().subscribe((e) => {
|
|
323
300
|
e && d({ event: "visibilitychange" });
|
|
324
301
|
});
|
|
325
302
|
}, _ = () => {
|
|
@@ -329,7 +306,7 @@ function de(e) {
|
|
|
329
306
|
};
|
|
330
307
|
return {
|
|
331
308
|
init: () => {
|
|
332
|
-
l.isInitialized || (l.isInitialized = !0, p(), m(), h(), g(), _(), l.cleanupBroadcastSetup = r().setup(), l.cleanupFocusSetup =
|
|
309
|
+
l.isInitialized || (l.isInitialized = !0, p(), m(), h(), g(), _(), l.cleanupBroadcastSetup = r().setup(), l.cleanupFocusSetup = ee().setup(), l.cleanupOnlineSetup = E().setup());
|
|
333
310
|
},
|
|
334
311
|
cleanup: () => {
|
|
335
312
|
l.isInitialized && (l.pollInterval &&= (clearInterval(l.pollInterval), void 0), l.unsubscribeBroadcast &&= (l.unsubscribeBroadcast(), void 0), l.unsubscribeFocus &&= (l.unsubscribeFocus(), void 0), l.unsubscribeOnline &&= (l.unsubscribeOnline(), void 0), l.unsubscribeSignal &&= (l.unsubscribeSignal(), void 0), l.cleanupBroadcastSetup &&= (l.cleanupBroadcastSetup(), void 0), l.cleanupFocusSetup &&= (l.cleanupFocusSetup(), void 0), l.cleanupOnlineSetup &&= (l.cleanupOnlineSetup(), void 0), l.isInitialized = !1, l.lastSessionRequest = 0);
|
|
@@ -338,58 +315,56 @@ function de(e) {
|
|
|
338
315
|
broadcastSessionUpdate: f
|
|
339
316
|
};
|
|
340
317
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
var A = Object.create(null), j = (e) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? A : globalThis), M = new Proxy(A, {
|
|
318
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/env/env-impl.mjs
|
|
319
|
+
var k = Object.create(null), A = (e) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? k : globalThis), j = new Proxy(k, {
|
|
344
320
|
get(e, t) {
|
|
345
|
-
return
|
|
321
|
+
return A()[t] ?? k[t];
|
|
346
322
|
},
|
|
347
323
|
has(e, t) {
|
|
348
|
-
return t in
|
|
324
|
+
return t in A() || t in k;
|
|
349
325
|
},
|
|
350
326
|
set(e, t, n) {
|
|
351
|
-
let r =
|
|
327
|
+
let r = A(!0);
|
|
352
328
|
return r[t] = n, !0;
|
|
353
329
|
},
|
|
354
330
|
deleteProperty(e, t) {
|
|
355
331
|
if (!t) return !1;
|
|
356
|
-
let n =
|
|
332
|
+
let n = A(!0);
|
|
357
333
|
return delete n[t], !0;
|
|
358
334
|
},
|
|
359
335
|
ownKeys() {
|
|
360
|
-
let e =
|
|
336
|
+
let e = A(!0);
|
|
361
337
|
return Object.keys(e);
|
|
362
338
|
}
|
|
363
339
|
});
|
|
364
|
-
|
|
365
|
-
function
|
|
340
|
+
j.NODE_ENV;
|
|
341
|
+
function M(e, t) {
|
|
366
342
|
return typeof process < "u" && process.env ? process.env[e] ?? t : typeof Deno < "u" ? Deno.env.get(e) ?? t : typeof Bun < "u" ? Bun.env[e] ?? t : t;
|
|
367
343
|
}
|
|
368
344
|
Object.freeze({
|
|
369
345
|
get BETTER_AUTH_SECRET() {
|
|
370
|
-
return
|
|
346
|
+
return M("BETTER_AUTH_SECRET");
|
|
371
347
|
},
|
|
372
348
|
get AUTH_SECRET() {
|
|
373
|
-
return
|
|
349
|
+
return M("AUTH_SECRET");
|
|
374
350
|
},
|
|
375
351
|
get BETTER_AUTH_TELEMETRY() {
|
|
376
|
-
return
|
|
352
|
+
return M("BETTER_AUTH_TELEMETRY");
|
|
377
353
|
},
|
|
378
354
|
get BETTER_AUTH_TELEMETRY_ID() {
|
|
379
|
-
return
|
|
355
|
+
return M("BETTER_AUTH_TELEMETRY_ID");
|
|
380
356
|
},
|
|
381
357
|
get NODE_ENV() {
|
|
382
|
-
return
|
|
358
|
+
return M("NODE_ENV", "development");
|
|
383
359
|
},
|
|
384
360
|
get PACKAGE_VERSION() {
|
|
385
|
-
return
|
|
361
|
+
return M("PACKAGE_VERSION", "0.0.0");
|
|
386
362
|
},
|
|
387
363
|
get BETTER_AUTH_TELEMETRY_ENDPOINT() {
|
|
388
|
-
return
|
|
364
|
+
return M("BETTER_AUTH_TELEMETRY_ENDPOINT", "");
|
|
389
365
|
}
|
|
390
366
|
});
|
|
391
|
-
|
|
392
|
-
//#region ../node_modules/.bun/better-call@1.4.0+969a6d035afea0f4/node_modules/better-call/dist/error.mjs
|
|
367
|
+
// ../node_modules/.bun/better-call@1.4.4+969a6d035afea0f4/node_modules/better-call/dist/error.mjs
|
|
393
368
|
function fe() {
|
|
394
369
|
let e = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
395
370
|
return e === void 0 ? Object.isExtensible(Error) : Object.prototype.hasOwnProperty.call(e, "writable") ? e.writable : e.set !== void 0;
|
|
@@ -479,42 +454,48 @@ me(class extends Error {
|
|
|
479
454
|
headers;
|
|
480
455
|
statusCode;
|
|
481
456
|
constructor(e = "INTERNAL_SERVER_ERROR", t = void 0, n = {}, r = typeof e == "number" ? e : he[e]) {
|
|
482
|
-
super(t?.message, t
|
|
457
|
+
if (super(t?.message, t && "cause" in t ? { cause: t.cause } : void 0), this.status = e, this.body = t, this.headers = n, this.statusCode = r, this.name = "APIError", this.status = e, this.headers = n, this.statusCode = r, t && "cause" in t) {
|
|
458
|
+
let { cause: e, ...n } = t;
|
|
459
|
+
this.body = Object.defineProperty(n, "cause", {
|
|
460
|
+
value: e,
|
|
461
|
+
writable: !0,
|
|
462
|
+
configurable: !0
|
|
463
|
+
});
|
|
464
|
+
} else this.body = t;
|
|
483
465
|
}
|
|
484
466
|
}, Error);
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
var P = class extends Error {
|
|
467
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/error/index.mjs
|
|
468
|
+
var N = class extends Error {
|
|
488
469
|
constructor(e, t) {
|
|
489
470
|
super(e, t), this.name = "BetterAuthError", this.message = e, this.stack = "";
|
|
490
471
|
}
|
|
491
472
|
}, ge = 47;
|
|
492
|
-
function
|
|
473
|
+
function P(e) {
|
|
493
474
|
let t = e.length;
|
|
494
475
|
for (; t > 0 && e.charCodeAt(t - 1) === ge;) t--;
|
|
495
476
|
return t === e.length ? e : e.slice(0, t);
|
|
496
477
|
}
|
|
497
478
|
function _e(e) {
|
|
498
479
|
try {
|
|
499
|
-
return (
|
|
480
|
+
return (P(new URL(e).pathname) || "/") !== "/";
|
|
500
481
|
} catch {
|
|
501
|
-
throw new
|
|
482
|
+
throw new N(`Invalid base URL: ${e}. Please provide a valid base URL.`);
|
|
502
483
|
}
|
|
503
484
|
}
|
|
504
485
|
function ve(e) {
|
|
505
486
|
try {
|
|
506
487
|
let t = new URL(e);
|
|
507
|
-
if (t.protocol !== "http:" && t.protocol !== "https:") throw new
|
|
488
|
+
if (t.protocol !== "http:" && t.protocol !== "https:") throw new N(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`);
|
|
508
489
|
} catch (t) {
|
|
509
|
-
throw t instanceof
|
|
490
|
+
throw t instanceof N ? t : new N(`Invalid base URL: ${e}. Please provide a valid base URL.`, { cause: t });
|
|
510
491
|
}
|
|
511
492
|
}
|
|
512
|
-
function
|
|
493
|
+
function F(e, t = "/api/auth") {
|
|
513
494
|
if (ve(e), _e(e)) return e;
|
|
514
|
-
let n =
|
|
495
|
+
let n = P(e);
|
|
515
496
|
return !t || t === "/" ? n : (t = t.startsWith("/") ? t : `/${t}`, `${n}${t}`);
|
|
516
497
|
}
|
|
517
|
-
function
|
|
498
|
+
function I(e, t) {
|
|
518
499
|
return !e || e.trim() === "" ? !1 : t === "proto" ? e === "http" || e === "https" : t === "host" ? [
|
|
519
500
|
/\.\./,
|
|
520
501
|
/\0/,
|
|
@@ -527,21 +508,21 @@ function L(e, t) {
|
|
|
527
508
|
].some((t) => t.test(e)) ? !1 : /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e) || /^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e) || /^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e) || /^localhost(:[0-9]{1,5})?$/i.test(e) : !1;
|
|
528
509
|
}
|
|
529
510
|
function ye(e, t, n, r, i) {
|
|
530
|
-
if (e) return
|
|
511
|
+
if (e) return F(e, t);
|
|
531
512
|
if (r !== !1) {
|
|
532
|
-
let e =
|
|
533
|
-
if (e) return
|
|
513
|
+
let e = j.BETTER_AUTH_URL || j.NEXT_PUBLIC_BETTER_AUTH_URL || j.PUBLIC_BETTER_AUTH_URL || j.NUXT_PUBLIC_BETTER_AUTH_URL || j.NUXT_PUBLIC_AUTH_URL || (j.BASE_URL === "/" ? void 0 : j.BASE_URL);
|
|
514
|
+
if (e) return F(e, t);
|
|
534
515
|
}
|
|
535
516
|
let a = n?.headers.get("x-forwarded-host"), o = n?.headers.get("x-forwarded-proto");
|
|
536
|
-
if (a && o && i &&
|
|
537
|
-
return
|
|
517
|
+
if (a && o && i && I(o, "proto") && I(a, "host")) try {
|
|
518
|
+
return F(`${o}://${a}`, t);
|
|
538
519
|
} catch {}
|
|
539
520
|
if (n) {
|
|
540
521
|
let e = be(n.url);
|
|
541
|
-
if (!e) throw new
|
|
542
|
-
return
|
|
522
|
+
if (!e) throw new N("Could not get origin from request. Please provide a valid base URL.");
|
|
523
|
+
return F(e, t);
|
|
543
524
|
}
|
|
544
|
-
if (typeof window < "u" && window.location) return
|
|
525
|
+
if (typeof window < "u" && window.location) return F(window.location.origin, t);
|
|
545
526
|
}
|
|
546
527
|
function be(e) {
|
|
547
528
|
try {
|
|
@@ -551,8 +532,7 @@ function be(e) {
|
|
|
551
532
|
return null;
|
|
552
533
|
}
|
|
553
534
|
}
|
|
554
|
-
|
|
555
|
-
//#region ../node_modules/.bun/@better-auth+core@1.7.7+8ae2bbeb20d4d3e3/node_modules/@better-auth/core/dist/utils/url.mjs
|
|
535
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/utils/url.mjs
|
|
556
536
|
var xe = [
|
|
557
537
|
"javascript:",
|
|
558
538
|
"data:",
|
|
@@ -567,8 +547,7 @@ function Se(e) {
|
|
|
567
547
|
}
|
|
568
548
|
return !xe.includes(t.protocol);
|
|
569
549
|
}
|
|
570
|
-
|
|
571
|
-
//#region ../node_modules/.bun/better-auth@1.7.7+7ee5f890295c53f0/node_modules/better-auth/dist/client/fetch-plugins.mjs
|
|
550
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/fetch-plugins.mjs
|
|
572
551
|
var Ce = {
|
|
573
552
|
id: "redirect",
|
|
574
553
|
name: "Redirect",
|
|
@@ -588,7 +567,7 @@ function Ee(e, t) {
|
|
|
588
567
|
isPending: !1
|
|
589
568
|
});
|
|
590
569
|
}
|
|
591
|
-
function
|
|
570
|
+
function L(e) {
|
|
592
571
|
return typeof e == "object" && e && "data" in e && "error" in e ? e : {
|
|
593
572
|
data: e,
|
|
594
573
|
error: null
|
|
@@ -629,14 +608,14 @@ function ke(e, t) {
|
|
|
629
608
|
signal: t
|
|
630
609
|
});
|
|
631
610
|
if (t.aborted) return "aborted";
|
|
632
|
-
let { data: i, error: a } =
|
|
611
|
+
let { data: i, error: a } = L(r), c = "fresh";
|
|
633
612
|
if (i?.needsRefresh) try {
|
|
634
613
|
let n = await e("/get-session", {
|
|
635
614
|
method: "POST",
|
|
636
615
|
signal: t
|
|
637
616
|
});
|
|
638
617
|
if (t.aborted) return "aborted";
|
|
639
|
-
({data: i, error: a} =
|
|
618
|
+
({data: i, error: a} = L(n));
|
|
640
619
|
} catch {
|
|
641
620
|
if (t.aborted) return "aborted";
|
|
642
621
|
c = "stale";
|
|
@@ -706,25 +685,24 @@ function ke(e, t) {
|
|
|
706
685
|
broadcastSessionUpdate: (e) => p(e)
|
|
707
686
|
};
|
|
708
687
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
function z(e) {
|
|
688
|
+
// ../node_modules/.bun/defu@6.1.7/node_modules/defu/dist/defu.mjs
|
|
689
|
+
function R(e) {
|
|
712
690
|
if (typeof e != "object" || !e) return !1;
|
|
713
691
|
let t = Object.getPrototypeOf(e);
|
|
714
692
|
return t !== null && t !== Object.prototype && Object.getPrototypeOf(t) !== null || Symbol.iterator in e ? !1 : Symbol.toStringTag in e ? Object.prototype.toString.call(e) === "[object Module]" : !0;
|
|
715
693
|
}
|
|
716
|
-
function
|
|
717
|
-
if (!
|
|
694
|
+
function z(e, t, n = ".", r) {
|
|
695
|
+
if (!R(t)) return z(e, {}, n, r);
|
|
718
696
|
let i = { ...t };
|
|
719
697
|
for (let t of Object.keys(e)) {
|
|
720
698
|
if (t === "__proto__" || t === "constructor") continue;
|
|
721
699
|
let a = e[t];
|
|
722
|
-
a != null && (r && r(i, t, a, n) || (i[t] = Array.isArray(a) && Array.isArray(i[t]) ? [...a, ...i[t]] :
|
|
700
|
+
a != null && (r && r(i, t, a, n) || (i[t] = Array.isArray(a) && Array.isArray(i[t]) ? [...a, ...i[t]] : R(a) && R(i[t]) ? z(a, i[t], (n ? `${n}.` : "") + t.toString(), r) : a));
|
|
723
701
|
}
|
|
724
702
|
return i;
|
|
725
703
|
}
|
|
726
704
|
function Ae(e) {
|
|
727
|
-
return (...t) => t.reduce((t, n) =>
|
|
705
|
+
return (...t) => t.reduce((t, n) => z(t, n, "", e), {});
|
|
728
706
|
}
|
|
729
707
|
var je = Ae(), Me = class extends Error {
|
|
730
708
|
constructor(e, t, n) {
|
|
@@ -755,7 +733,7 @@ var je = Ae(), Me = class extends Error {
|
|
|
755
733
|
options: n,
|
|
756
734
|
hooks: r
|
|
757
735
|
};
|
|
758
|
-
},
|
|
736
|
+
}, B = class {
|
|
759
737
|
constructor(e) {
|
|
760
738
|
this.options = e;
|
|
761
739
|
}
|
|
@@ -777,13 +755,13 @@ var je = Ae(), Me = class extends Error {
|
|
|
777
755
|
}
|
|
778
756
|
};
|
|
779
757
|
function Fe(e) {
|
|
780
|
-
if (typeof e == "number") return new
|
|
758
|
+
if (typeof e == "number") return new B({
|
|
781
759
|
type: "linear",
|
|
782
760
|
attempts: e,
|
|
783
761
|
delay: 1e3
|
|
784
762
|
});
|
|
785
763
|
switch (e.type) {
|
|
786
|
-
case "linear": return new
|
|
764
|
+
case "linear": return new B(e);
|
|
787
765
|
case "exponential": return new Pe(e);
|
|
788
766
|
default: throw Error("Invalid retry strategy");
|
|
789
767
|
}
|
|
@@ -795,7 +773,7 @@ var Ie = [
|
|
|
795
773
|
"patch",
|
|
796
774
|
"delete"
|
|
797
775
|
];
|
|
798
|
-
function
|
|
776
|
+
function V(e) {
|
|
799
777
|
if (!e.startsWith("@")) return {
|
|
800
778
|
method: void 0,
|
|
801
779
|
path: e
|
|
@@ -809,46 +787,73 @@ function H(e) {
|
|
|
809
787
|
path: e
|
|
810
788
|
};
|
|
811
789
|
}
|
|
812
|
-
var
|
|
813
|
-
function
|
|
790
|
+
var H = /^[a-z][a-z\d+.-]*:\/\/[^/?#]+/i, Le = /^\/+/;
|
|
791
|
+
function U(e) {
|
|
792
|
+
let t = e.length;
|
|
793
|
+
for (; t > 0 && e[t - 1] === "/";) t--;
|
|
794
|
+
return e.slice(0, t);
|
|
795
|
+
}
|
|
796
|
+
function W(e, t) {
|
|
797
|
+
let n = e.indexOf(t);
|
|
798
|
+
return n === -1 ? [e, void 0] : [e.slice(0, n), e.slice(n + 1)];
|
|
799
|
+
}
|
|
800
|
+
var Re = (e) => e === "." || e === "..", ze = (e) => e.split(":").map((e) => encodeURIComponent(e)).join(":");
|
|
801
|
+
function Be(e, t) {
|
|
814
802
|
let n = t.get(e);
|
|
815
|
-
if (n === void 0) return
|
|
816
|
-
if (
|
|
803
|
+
if (n === void 0) return ze(e);
|
|
804
|
+
if (Re(n)) throw TypeError("Path parameters cannot be reserved path segments");
|
|
817
805
|
return encodeURIComponent(n);
|
|
818
806
|
}
|
|
819
|
-
function
|
|
807
|
+
function Ve(e, t) {
|
|
808
|
+
let n = /* @__PURE__ */ new Map();
|
|
809
|
+
if (t) {
|
|
810
|
+
if (Array.isArray(t)) {
|
|
811
|
+
let r = e.split("/").filter((e) => e.startsWith(":"));
|
|
812
|
+
for (let [e, i] of r.entries()) {
|
|
813
|
+
let r = t[e];
|
|
814
|
+
n.set(i, String(r));
|
|
815
|
+
}
|
|
816
|
+
} else for (let [e, r] of Object.entries(t)) n.set(`:${e}`, String(r));
|
|
817
|
+
}
|
|
818
|
+
return n;
|
|
819
|
+
}
|
|
820
|
+
function He(e, t) {
|
|
821
|
+
let n = Ve(e, t);
|
|
822
|
+
return e.split("/").map((e) => Be(e, n)).join("/");
|
|
823
|
+
}
|
|
824
|
+
function Ue(e, t) {
|
|
825
|
+
let n = new URLSearchParams(e);
|
|
826
|
+
for (let [e, r] of Object.entries(t || {})) {
|
|
827
|
+
if (r == null) continue;
|
|
828
|
+
let t;
|
|
829
|
+
if (typeof r == "string") t = r;
|
|
830
|
+
else if (Array.isArray(r)) {
|
|
831
|
+
for (let t of r) n.append(e, t);
|
|
832
|
+
continue;
|
|
833
|
+
} else t = JSON.stringify(r);
|
|
834
|
+
n.set(e, t);
|
|
835
|
+
}
|
|
836
|
+
let r = n.toString();
|
|
837
|
+
return r.length > 0 ? `?${r}`.replace(/\+/g, "%20") : "";
|
|
838
|
+
}
|
|
839
|
+
function We(e, t) {
|
|
840
|
+
if (!t) return e;
|
|
841
|
+
let n = `${U(t)}/`;
|
|
842
|
+
return e.startsWith(n) ? e.slice(n.length) : e;
|
|
843
|
+
}
|
|
844
|
+
function Ge(e, t, n, r) {
|
|
845
|
+
let [i] = W(e, "#"), [a, o = ""] = W(i, "?"), s = t.replace(Le, ""), c = Ue(`${o}&${n ?? ""}`, r), l = `${U(a)}/${s}${c}`;
|
|
846
|
+
return H.test(l) ? new URL(l) : l;
|
|
847
|
+
}
|
|
848
|
+
function Ke(e, t) {
|
|
820
849
|
let { baseURL: n, params: r, query: i } = t || {
|
|
821
850
|
query: {},
|
|
822
851
|
params: {},
|
|
823
852
|
baseURL: ""
|
|
824
|
-
}, a = e
|
|
825
|
-
|
|
826
|
-
let [s, c] = e.replace(a, "").split("?"), l = new URLSearchParams(c);
|
|
827
|
-
for (let [e, t] of Object.entries(i || {})) {
|
|
828
|
-
if (t == null) continue;
|
|
829
|
-
let n;
|
|
830
|
-
if (typeof t == "string") n = t;
|
|
831
|
-
else if (Array.isArray(t)) {
|
|
832
|
-
for (let n of t) l.append(e, n);
|
|
833
|
-
continue;
|
|
834
|
-
} else n = JSON.stringify(t);
|
|
835
|
-
l.set(e, n);
|
|
836
|
-
}
|
|
837
|
-
let u = /* @__PURE__ */ new Map();
|
|
838
|
-
if (r) {
|
|
839
|
-
if (Array.isArray(r)) {
|
|
840
|
-
let e = s.split("/").filter((e) => e.startsWith(":"));
|
|
841
|
-
for (let [t, n] of e.entries()) {
|
|
842
|
-
let e = r[t];
|
|
843
|
-
u.set(n, String(e));
|
|
844
|
-
}
|
|
845
|
-
} else for (let [e, t] of Object.entries(r)) u.set(`:${e}`, String(t));
|
|
846
|
-
}
|
|
847
|
-
s = s.split("/").map((e) => ze(e, u)).join("/"), s = s.replace(/^\/+/, "");
|
|
848
|
-
let d = l.toString();
|
|
849
|
-
return d = d.length > 0 ? `?${d}`.replace(/\+/g, "%20") : "", a.startsWith("http") ? new URL(`${s}${d}`, a) : `${a}${s}${d}`;
|
|
853
|
+
}, { path: a } = V(e), o = a === e ? e : `/${a}`, s = o.match(H)?.[0], [c, l] = W(s ? o.slice(s.length) : We(o, n), "?"), u = He(c, r);
|
|
854
|
+
return Ge(s ?? n ?? "", u, l, i);
|
|
850
855
|
}
|
|
851
|
-
var
|
|
856
|
+
var qe = async (e) => {
|
|
852
857
|
let t = {}, n = async (e) => typeof e == "function" ? await e() : e;
|
|
853
858
|
if (e?.auth) {
|
|
854
859
|
if (e.auth.type === "Bearer") {
|
|
@@ -866,8 +871,8 @@ var Ve = async (e) => {
|
|
|
866
871
|
}
|
|
867
872
|
}
|
|
868
873
|
return t;
|
|
869
|
-
},
|
|
870
|
-
function
|
|
874
|
+
}, Je = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
|
|
875
|
+
function Ye(e) {
|
|
871
876
|
let t = e.headers.get("content-type"), n = /* @__PURE__ */ new Set([
|
|
872
877
|
"image/svg",
|
|
873
878
|
"application/xml",
|
|
@@ -876,37 +881,37 @@ function Ue(e) {
|
|
|
876
881
|
]);
|
|
877
882
|
if (!t) return "json";
|
|
878
883
|
let r = t.split(";").shift() || "";
|
|
879
|
-
return
|
|
884
|
+
return Je.test(r) ? "json" : n.has(r) || r.startsWith("text/") ? "text" : "blob";
|
|
880
885
|
}
|
|
881
|
-
function
|
|
886
|
+
function Xe(e) {
|
|
882
887
|
try {
|
|
883
888
|
return JSON.parse(e), !0;
|
|
884
889
|
} catch {
|
|
885
890
|
return !1;
|
|
886
891
|
}
|
|
887
892
|
}
|
|
888
|
-
function
|
|
893
|
+
function G(e) {
|
|
889
894
|
if (e === void 0) return !1;
|
|
890
895
|
let t = typeof e;
|
|
891
896
|
return t === "string" || t === "number" || t === "boolean" || t === null ? !0 : t === "object" ? Array.isArray(e) ? !0 : e.buffer ? !1 : e.constructor && e.constructor.name === "Object" || typeof e.toJSON == "function" : !1;
|
|
892
897
|
}
|
|
893
|
-
function
|
|
898
|
+
function K(e) {
|
|
894
899
|
try {
|
|
895
900
|
return JSON.parse(e);
|
|
896
901
|
} catch {
|
|
897
902
|
return e;
|
|
898
903
|
}
|
|
899
904
|
}
|
|
900
|
-
function
|
|
905
|
+
function q(e) {
|
|
901
906
|
return typeof e == "function";
|
|
902
907
|
}
|
|
903
|
-
function
|
|
908
|
+
function Ze(e) {
|
|
904
909
|
if (e?.customFetchImpl) return e.customFetchImpl;
|
|
905
|
-
if (typeof globalThis < "u" &&
|
|
906
|
-
if (typeof window < "u" &&
|
|
910
|
+
if (typeof globalThis < "u" && q(globalThis.fetch)) return globalThis.fetch;
|
|
911
|
+
if (typeof window < "u" && q(window.fetch)) return window.fetch;
|
|
907
912
|
throw Error("No fetch implementation found");
|
|
908
913
|
}
|
|
909
|
-
function
|
|
914
|
+
function J(...e) {
|
|
910
915
|
let t = {};
|
|
911
916
|
for (let n of e) if (n) {
|
|
912
917
|
if (n instanceof Headers) n.forEach((e, n) => {
|
|
@@ -919,31 +924,31 @@ function K(...e) {
|
|
|
919
924
|
}
|
|
920
925
|
return t;
|
|
921
926
|
}
|
|
922
|
-
async function
|
|
923
|
-
let t = new Headers(
|
|
927
|
+
async function Qe(e) {
|
|
928
|
+
let t = new Headers(J(e?.headers, await qe(e)));
|
|
924
929
|
if (!t.has("content-type")) {
|
|
925
|
-
let n =
|
|
930
|
+
let n = $e(e?.body);
|
|
926
931
|
n && t.set("content-type", n);
|
|
927
932
|
}
|
|
928
933
|
return t;
|
|
929
934
|
}
|
|
930
|
-
function
|
|
931
|
-
return
|
|
935
|
+
function $e(e) {
|
|
936
|
+
return G(e) ? "application/json" : null;
|
|
932
937
|
}
|
|
933
|
-
function
|
|
938
|
+
function et(e) {
|
|
934
939
|
let t = e.get("content-type");
|
|
935
940
|
return t ? t.split(";")[0].trim().toLowerCase() : null;
|
|
936
941
|
}
|
|
937
|
-
function
|
|
942
|
+
function tt(e, t) {
|
|
938
943
|
let { body: n } = e;
|
|
939
|
-
return n ? !
|
|
944
|
+
return n ? !G(n) || typeof n == "string" ? n : et(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
|
|
940
945
|
}
|
|
941
|
-
function
|
|
946
|
+
function nt(e, t) {
|
|
942
947
|
if (t?.method) return t.method.toUpperCase();
|
|
943
|
-
let { method: n } =
|
|
948
|
+
let { method: n } = V(e);
|
|
944
949
|
return n ? n.toUpperCase() : t?.body ? "POST" : "GET";
|
|
945
950
|
}
|
|
946
|
-
function
|
|
951
|
+
function rt(e, t) {
|
|
947
952
|
let n;
|
|
948
953
|
return !e?.signal && e?.timeout && (n = setTimeout(() => t?.abort(), e?.timeout)), {
|
|
949
954
|
abortTimeout: n,
|
|
@@ -952,47 +957,47 @@ function Ze(e, t) {
|
|
|
952
957
|
}
|
|
953
958
|
};
|
|
954
959
|
}
|
|
955
|
-
var
|
|
960
|
+
var it = class e extends Error {
|
|
956
961
|
constructor(t, n) {
|
|
957
962
|
super(n || JSON.stringify(t, null, 2)), this.issues = t, Object.setPrototypeOf(this, e.prototype);
|
|
958
963
|
}
|
|
959
964
|
};
|
|
960
|
-
async function
|
|
965
|
+
async function Y(e, t) {
|
|
961
966
|
let n = await e["~standard"].validate(t);
|
|
962
|
-
if (n.issues) throw new
|
|
967
|
+
if (n.issues) throw new it(n.issues);
|
|
963
968
|
return n.value;
|
|
964
969
|
}
|
|
965
|
-
function
|
|
970
|
+
function X(e) {
|
|
966
971
|
"@babel/helpers - typeof";
|
|
967
|
-
return
|
|
972
|
+
return X = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
968
973
|
return typeof e;
|
|
969
974
|
} : function(e) {
|
|
970
975
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
971
|
-
},
|
|
976
|
+
}, X(e);
|
|
972
977
|
}
|
|
973
|
-
function
|
|
974
|
-
if (
|
|
978
|
+
function at(e, t) {
|
|
979
|
+
if (X(e) != "object" || !e) return e;
|
|
975
980
|
var n = e[Symbol.toPrimitive];
|
|
976
981
|
if (n !== void 0) {
|
|
977
982
|
var r = n.call(e, t || "default");
|
|
978
|
-
if (
|
|
983
|
+
if (X(r) != "object") return r;
|
|
979
984
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
980
985
|
}
|
|
981
986
|
return (t === "string" ? String : Number)(e);
|
|
982
987
|
}
|
|
983
|
-
function
|
|
984
|
-
var t =
|
|
985
|
-
return
|
|
988
|
+
function ot(e) {
|
|
989
|
+
var t = at(e, "string");
|
|
990
|
+
return X(t) == "symbol" ? t : t + "";
|
|
986
991
|
}
|
|
987
|
-
function
|
|
988
|
-
return (t =
|
|
992
|
+
function st(e, t, n) {
|
|
993
|
+
return (t = ot(t)) in e ? Object.defineProperty(e, t, {
|
|
989
994
|
value: n,
|
|
990
995
|
enumerable: !0,
|
|
991
996
|
configurable: !0,
|
|
992
997
|
writable: !0
|
|
993
998
|
}) : e[t] = n, e;
|
|
994
999
|
}
|
|
995
|
-
function
|
|
1000
|
+
function ct(e, t) {
|
|
996
1001
|
var n = Object.keys(e);
|
|
997
1002
|
if (Object.getOwnPropertySymbols) {
|
|
998
1003
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1002,20 +1007,20 @@ function Y(e, t) {
|
|
|
1002
1007
|
}
|
|
1003
1008
|
return n;
|
|
1004
1009
|
}
|
|
1005
|
-
function
|
|
1010
|
+
function Z(e) {
|
|
1006
1011
|
for (var t = 1; t < arguments.length; t++) {
|
|
1007
1012
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1008
|
-
t % 2 ?
|
|
1009
|
-
|
|
1010
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1013
|
+
t % 2 ? ct(Object(n), !0).forEach(function(t) {
|
|
1014
|
+
st(e, t, n[t]);
|
|
1015
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ct(Object(n)).forEach(function(t) {
|
|
1011
1016
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1012
1017
|
});
|
|
1013
1018
|
}
|
|
1014
1019
|
return e;
|
|
1015
1020
|
}
|
|
1016
|
-
var
|
|
1021
|
+
var Q = async (e, t) => {
|
|
1017
1022
|
var n;
|
|
1018
|
-
let { hooks: r, url: i, options: a } = await Ne(e, t), o =
|
|
1023
|
+
let { hooks: r, url: i, options: a } = await Ne(e, t), o = Ze(a), s = new AbortController(), c = a.signal ?? s.signal, l = Ke(i, a), u = await Qe(a), d = tt(a, u), f = nt(i, a), p = Z(Z({}, a), {}, {
|
|
1019
1024
|
url: l,
|
|
1020
1025
|
headers: u,
|
|
1021
1026
|
body: d,
|
|
@@ -1027,7 +1032,7 @@ var Z = async (e, t) => {
|
|
|
1027
1032
|
typeof t == "object" && t && Object.assign(p, t);
|
|
1028
1033
|
}
|
|
1029
1034
|
("pipeTo" in p && typeof p.pipeTo == "function" || typeof (t == null || (n = t.body) == null ? void 0 : n.pipe) == "function") && ("duplex" in p || (p.duplex = "half"));
|
|
1030
|
-
let { clearTimeout: m } =
|
|
1035
|
+
let { clearTimeout: m } = rt(a, s), h = await o(p.url, p);
|
|
1031
1036
|
m();
|
|
1032
1037
|
let g = {
|
|
1033
1038
|
response: h,
|
|
@@ -1035,7 +1040,7 @@ var Z = async (e, t) => {
|
|
|
1035
1040
|
};
|
|
1036
1041
|
for (let e of r.onResponse) if (e) {
|
|
1037
1042
|
var _;
|
|
1038
|
-
let n = await e(
|
|
1043
|
+
let n = await e(Z(Z({}, g), {}, { response: t != null && (_ = t.hookOptions) != null && _.cloneResponse ? h.clone() : h }));
|
|
1039
1044
|
n instanceof Response ? h = n : typeof n == "object" && n && (h = n.response);
|
|
1040
1045
|
}
|
|
1041
1046
|
if (h.ok) {
|
|
@@ -1043,67 +1048,67 @@ var Z = async (e, t) => {
|
|
|
1043
1048
|
data: "",
|
|
1044
1049
|
error: null
|
|
1045
1050
|
};
|
|
1046
|
-
let e =
|
|
1051
|
+
let e = Ye(h), n = {
|
|
1047
1052
|
data: null,
|
|
1048
1053
|
response: h,
|
|
1049
1054
|
request: p
|
|
1050
1055
|
};
|
|
1051
1056
|
if (e === "json" || e === "text") {
|
|
1052
1057
|
let e = await h.text();
|
|
1053
|
-
n.data = await (p.jsonParser ??
|
|
1058
|
+
n.data = await (p.jsonParser ?? K)(e);
|
|
1054
1059
|
} else n.data = await h[e]();
|
|
1055
|
-
p?.output && p.output && !p.disableValidation && (n.data = await
|
|
1060
|
+
p?.output && p.output && !p.disableValidation && (n.data = await Y(p.output, n.data));
|
|
1056
1061
|
for (let e of r.onSuccess) if (e) {
|
|
1057
1062
|
var v;
|
|
1058
|
-
await e(
|
|
1063
|
+
await e(Z(Z({}, n), {}, { response: t != null && (v = t.hookOptions) != null && v.cloneResponse ? h.clone() : h }));
|
|
1059
1064
|
}
|
|
1060
1065
|
return t?.throw ? n.data : {
|
|
1061
1066
|
data: n.data,
|
|
1062
1067
|
error: null
|
|
1063
1068
|
};
|
|
1064
1069
|
}
|
|
1065
|
-
let y = t?.jsonParser ??
|
|
1070
|
+
let y = t?.jsonParser ?? K, b = await h.text(), x = Xe(b), S = x ? await y(b) : null, C = {
|
|
1066
1071
|
response: h,
|
|
1067
1072
|
responseText: b,
|
|
1068
1073
|
request: p,
|
|
1069
|
-
error:
|
|
1074
|
+
error: Z(Z({}, S), {}, {
|
|
1070
1075
|
status: h.status,
|
|
1071
1076
|
statusText: h.statusText
|
|
1072
1077
|
})
|
|
1073
1078
|
};
|
|
1074
1079
|
for (let e of r.onError) if (e) {
|
|
1075
1080
|
var w;
|
|
1076
|
-
await e(
|
|
1081
|
+
await e(Z(Z({}, C), {}, { response: t != null && (w = t.hookOptions) != null && w.cloneResponse ? h.clone() : h }));
|
|
1077
1082
|
}
|
|
1078
1083
|
if (t?.retry) {
|
|
1079
1084
|
let n = Fe(t.retry), i = t.retryAttempt ?? 0;
|
|
1080
1085
|
if (await n.shouldAttemptRetry(i, h)) {
|
|
1081
1086
|
for (let e of r.onRetry) e && await e(g);
|
|
1082
1087
|
let a = n.getDelay(i);
|
|
1083
|
-
return await new Promise((e) => setTimeout(e, a)), await
|
|
1088
|
+
return await new Promise((e) => setTimeout(e, a)), await Q(e, Z(Z({}, t), {}, { retryAttempt: i + 1 }));
|
|
1084
1089
|
}
|
|
1085
1090
|
}
|
|
1086
1091
|
if (t?.throw) throw new Me(h.status, h.statusText, x ? S : b);
|
|
1087
1092
|
return {
|
|
1088
1093
|
data: null,
|
|
1089
|
-
error:
|
|
1094
|
+
error: Z(Z({}, S), {}, {
|
|
1090
1095
|
status: h.status,
|
|
1091
1096
|
statusText: h.statusText
|
|
1092
1097
|
})
|
|
1093
1098
|
};
|
|
1094
|
-
},
|
|
1099
|
+
}, lt = (e) => ({
|
|
1095
1100
|
id: "apply-schema",
|
|
1096
1101
|
name: "Apply Schema",
|
|
1097
1102
|
version: "1.0.0",
|
|
1098
1103
|
async init(t, n) {
|
|
1099
1104
|
var r;
|
|
1100
|
-
let i =
|
|
1105
|
+
let i = Z(Z({}, n), e.query !== void 0 && { query: Z(Z({}, e.query), n?.query) }), a = ((r = e.plugins) == null || (r = r.find((e) => e.schema?.config ? t.startsWith(e.schema.config.baseURL || "") || t.startsWith(e.schema.config.prefix || "") : !1)) == null ? void 0 : r.schema) || e.schema;
|
|
1101
1106
|
if (a) {
|
|
1102
1107
|
let r = t;
|
|
1103
1108
|
a.config?.prefix && r.startsWith(a.config.prefix) && (r = r.replace(a.config.prefix, ""), a.config.baseURL && (t = t.replace(a.config.prefix, a.config.baseURL))), a.config?.baseURL && r.startsWith(a.config.baseURL) && (r = r.replace(a.config.baseURL, "")), r.startsWith("/") && r.charAt(1) === "@" && (r = r.substring(1));
|
|
1104
1109
|
let o = a.schema[r];
|
|
1105
1110
|
if (o) {
|
|
1106
|
-
let { method: a, path: s } =
|
|
1111
|
+
let { method: a, path: s } = V(r);
|
|
1107
1112
|
a && (t = t.slice(0, t.length - r.length) + s);
|
|
1108
1113
|
let c = n?.headers;
|
|
1109
1114
|
if (o.headers && !n?.disableValidation) {
|
|
@@ -1114,20 +1119,20 @@ var Z = async (e, t) => {
|
|
|
1114
1119
|
});
|
|
1115
1120
|
else if (typeof n.headers == "object") for (let [t, r] of Object.entries(n.headers)) r != null && (e[t.toLowerCase()] = r);
|
|
1116
1121
|
}
|
|
1117
|
-
let t = await
|
|
1122
|
+
let t = await Y(o.headers, e), r = {};
|
|
1118
1123
|
for (let [e, n] of Object.entries(t)) r[e.toLowerCase()] = n;
|
|
1119
1124
|
c = r;
|
|
1120
1125
|
}
|
|
1121
1126
|
let l = o.method ?? a;
|
|
1122
|
-
if (i =
|
|
1123
|
-
if (o.query && (i.query = await
|
|
1124
|
-
let t =
|
|
1127
|
+
if (i = Z(Z(Z(Z({}, i), l !== void 0 && { method: l }), o.output !== void 0 && { output: o.output }), c !== void 0 && { headers: c }), !n?.disableValidation) {
|
|
1128
|
+
if (o.query && (i.query = await Y(o.query, n?.query), i.query !== null && typeof i.query == "object")) {
|
|
1129
|
+
let t = Z({}, e.query);
|
|
1125
1130
|
for (let e of Object.keys(t)) n?.query && Object.prototype.hasOwnProperty.call(n.query, e) && (t[e] = n.query[e]);
|
|
1126
|
-
i.query =
|
|
1131
|
+
i.query = Z(Z({}, t), i.query);
|
|
1127
1132
|
}
|
|
1128
|
-
i =
|
|
1129
|
-
body: o.input ? await
|
|
1130
|
-
params: o.params ? await
|
|
1133
|
+
i = Z(Z({}, i), {}, {
|
|
1134
|
+
body: o.input ? await Y(o.input, n?.body) : n?.body,
|
|
1135
|
+
params: o.params ? await Y(o.params, n?.params) : n?.params
|
|
1131
1136
|
});
|
|
1132
1137
|
}
|
|
1133
1138
|
return {
|
|
@@ -1136,20 +1141,20 @@ var Z = async (e, t) => {
|
|
|
1136
1141
|
};
|
|
1137
1142
|
}
|
|
1138
1143
|
}
|
|
1139
|
-
return
|
|
1144
|
+
return Z({ url: t }, (n !== void 0 || e.query !== void 0) && { options: i });
|
|
1140
1145
|
}
|
|
1141
|
-
}),
|
|
1146
|
+
}), ut = (e) => {
|
|
1142
1147
|
async function t(t, n) {
|
|
1143
|
-
let r =
|
|
1144
|
-
headers:
|
|
1148
|
+
let r = Z(Z(Z({}, e), n), {}, {
|
|
1149
|
+
headers: J(e?.headers, n?.headers),
|
|
1145
1150
|
plugins: [
|
|
1146
1151
|
...e?.plugins || [],
|
|
1147
|
-
|
|
1152
|
+
lt(e || {}),
|
|
1148
1153
|
...n?.plugins || []
|
|
1149
1154
|
]
|
|
1150
1155
|
});
|
|
1151
1156
|
if (e?.catchAllError) try {
|
|
1152
|
-
return await
|
|
1157
|
+
return await Q(t, r);
|
|
1153
1158
|
} catch (e) {
|
|
1154
1159
|
return {
|
|
1155
1160
|
data: null,
|
|
@@ -1161,10 +1166,10 @@ var Z = async (e, t) => {
|
|
|
1161
1166
|
}
|
|
1162
1167
|
};
|
|
1163
1168
|
}
|
|
1164
|
-
return await
|
|
1169
|
+
return await Q(t, r);
|
|
1165
1170
|
}
|
|
1166
1171
|
return t;
|
|
1167
|
-
},
|
|
1172
|
+
}, dt = (e) => {
|
|
1168
1173
|
if (typeof process > "u") return;
|
|
1169
1174
|
let t = e ?? "/api/auth";
|
|
1170
1175
|
if (process.env.NEXT_PUBLIC_AUTH_URL) return process.env.NEXT_PUBLIC_AUTH_URL;
|
|
@@ -1177,8 +1182,8 @@ var Z = async (e, t) => {
|
|
|
1177
1182
|
return `${new URL(`${e}${process.env.VERCEL_URL}`).origin}${t}`;
|
|
1178
1183
|
} catch {}
|
|
1179
1184
|
}
|
|
1180
|
-
},
|
|
1181
|
-
let n = "credentials" in Request.prototype, r = ye(e?.baseURL, e?.basePath, void 0, t) ??
|
|
1185
|
+
}, ft = (e) => e === "/sign-out" || e === "/update-user" || e === "/update-session" || e === "/sign-up/email" || e === "/sign-in/email" || e === "/delete-user" || e === "/verify-email" || e === "/revoke-sessions" || e === "/revoke-session" || e === "/revoke-other-sessions" || e === "/change-email" || e === "/change-password", pt = (e, t) => {
|
|
1186
|
+
let n = "credentials" in Request.prototype, r = ye(e?.baseURL, e?.basePath, void 0, t) ?? dt(e?.basePath) ?? "/api/auth", i = e?.plugins?.flatMap((e) => e.fetchPlugins).filter((e) => e !== void 0) || [], a = {
|
|
1182
1187
|
id: "lifecycle-hooks",
|
|
1183
1188
|
name: "lifecycle-hooks",
|
|
1184
1189
|
hooks: {
|
|
@@ -1187,7 +1192,7 @@ var Z = async (e, t) => {
|
|
|
1187
1192
|
onRequest: e?.fetchOptions?.onRequest,
|
|
1188
1193
|
onResponse: e?.fetchOptions?.onResponse
|
|
1189
1194
|
}
|
|
1190
|
-
}, { onSuccess: o, onError: s, onRequest: c, onResponse: l, ...u } = e?.fetchOptions || {}, d =
|
|
1195
|
+
}, { onSuccess: o, onError: s, onRequest: c, onResponse: l, ...u } = e?.fetchOptions || {}, d = ut({
|
|
1191
1196
|
baseURL: r,
|
|
1192
1197
|
...n ? { credentials: "include" } : {},
|
|
1193
1198
|
method: "GET",
|
|
@@ -1214,7 +1219,7 @@ var Z = async (e, t) => {
|
|
|
1214
1219
|
"/delete-user": "POST"
|
|
1215
1220
|
}, x = [{
|
|
1216
1221
|
signal: "$sessionSignal",
|
|
1217
|
-
matcher:
|
|
1222
|
+
matcher: ft,
|
|
1218
1223
|
callback(e) {
|
|
1219
1224
|
e === "/sign-out" ? m("signout") : (e === "/update-user" || e === "/update-session") && m("updateUser");
|
|
1220
1225
|
}
|
|
@@ -1244,30 +1249,27 @@ var Z = async (e, t) => {
|
|
|
1244
1249
|
$store: S
|
|
1245
1250
|
};
|
|
1246
1251
|
};
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
function ot(e) {
|
|
1252
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/utils/is-atom.mjs
|
|
1253
|
+
function mt(e) {
|
|
1250
1254
|
return typeof e == "object" && !!e && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
|
|
1251
1255
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
function st(e) {
|
|
1256
|
+
// ../node_modules/.bun/@better-auth+core@1.7.15+1bcdd7fa41f3b4db/node_modules/@better-auth/core/dist/utils/string.mjs
|
|
1257
|
+
function ht(e) {
|
|
1255
1258
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1256
1259
|
}
|
|
1257
|
-
var
|
|
1258
|
-
function
|
|
1259
|
-
return e.replace(
|
|
1260
|
+
var gt = /[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu, _t = /['\u2019]/g;
|
|
1261
|
+
function vt(e) {
|
|
1262
|
+
return e.replace(_t, "").match(gt) ?? [];
|
|
1260
1263
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return
|
|
1264
|
+
function yt(e) {
|
|
1265
|
+
return vt(e).map((e) => e.toLowerCase()).join("-");
|
|
1263
1266
|
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
function ft(e, t, n) {
|
|
1267
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/proxy.mjs
|
|
1268
|
+
function bt(e, t, n) {
|
|
1267
1269
|
let r = t[e], { fetchOptions: i, query: a, ...o } = n || {};
|
|
1268
1270
|
return r || (i?.method ? i.method : o && Object.keys(o).length > 0 ? "POST" : "GET");
|
|
1269
1271
|
}
|
|
1270
|
-
function
|
|
1272
|
+
function xt(e, t, n, r, i) {
|
|
1271
1273
|
function a(o = []) {
|
|
1272
1274
|
return new Proxy(function() {}, {
|
|
1273
1275
|
get(t, n) {
|
|
@@ -1278,13 +1280,13 @@ function pt(e, t, n, r, i) {
|
|
|
1278
1280
|
i = void 0;
|
|
1279
1281
|
break;
|
|
1280
1282
|
}
|
|
1281
|
-
return typeof i == "function" ||
|
|
1283
|
+
return typeof i == "function" || mt(i) ? i : a(r);
|
|
1282
1284
|
},
|
|
1283
1285
|
apply: async (e, a, s) => {
|
|
1284
|
-
let c = "/" + o.map(
|
|
1286
|
+
let c = "/" + o.map(yt).join("/"), l = s[0] || {}, u = s[1] || {}, { query: d, fetchOptions: f, ...p } = l, m = {
|
|
1285
1287
|
...u,
|
|
1286
1288
|
...f
|
|
1287
|
-
}, h =
|
|
1289
|
+
}, h = bt(c, n, l);
|
|
1288
1290
|
return await t(c, {
|
|
1289
1291
|
...m,
|
|
1290
1292
|
body: h === "GET" ? void 0 : {
|
|
@@ -1315,12 +1317,11 @@ function pt(e, t, n, r, i) {
|
|
|
1315
1317
|
}
|
|
1316
1318
|
return a();
|
|
1317
1319
|
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
let
|
|
1322
|
-
|
|
1323
|
-
return pt({
|
|
1320
|
+
// ../node_modules/.bun/better-auth@1.7.15+951101794207a33e/node_modules/better-auth/dist/client/vanilla.mjs
|
|
1321
|
+
function St(e) {
|
|
1322
|
+
let { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, hydrateSession: i, $fetch: a, atomListeners: o, $store: s } = pt(e), c = {};
|
|
1323
|
+
for (let [e, t] of Object.entries(r)) c[`use${ht(e)}`] = t;
|
|
1324
|
+
return xt({
|
|
1324
1325
|
...n,
|
|
1325
1326
|
...c,
|
|
1326
1327
|
hydrateSession: i,
|
|
@@ -1328,8 +1329,6 @@ function mt(e) {
|
|
|
1328
1329
|
$store: s
|
|
1329
1330
|
}, a, t, r, o);
|
|
1330
1331
|
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
//#endregion
|
|
1335
|
-
export { vt as n, _t as r, $ as t };
|
|
1332
|
+
// src/lib/auth-client.ts
|
|
1333
|
+
var $ = St({ baseURL: typeof window < "u" ? window.location.origin : "" }), { signIn: Ct, signUp: wt, signOut: Tt, getSession: Et } = $;
|
|
1334
|
+
export { Et as n, Tt as r, $ as t };
|