@phtngyn/cms 0.2.0-beta.7 → 0.3.0
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/LICENSE +18 -10
- package/README.md +59 -401
- package/drizzle/20261003215543_initial/migration.sql +251 -0
- package/drizzle/20261003215543_initial/snapshot.json +1941 -0
- package/package.json +75 -71
- package/src/Authoring.d.ts +41 -49
- package/src/Authoring.js +1 -1
- package/src/Blocks-BrxSemnd.js +40 -0
- package/src/Client.d.ts +8186 -0
- package/src/Client.js +41 -0
- package/src/Collections.d.ts +142 -0
- package/src/Collections.js +142 -0
- package/src/Config-CMiwciub.js +130 -0
- package/src/Config.d.ts +172 -0
- package/src/Config.js +2 -0
- package/src/Configuration-Dk2k3OIc.js +73 -0
- package/src/DataTransfer-BmECvPHB.js +488 -0
- package/src/Database-DSsNCGft.d.ts +3 -0
- package/src/Delivery.d.ts +28 -0
- package/src/Delivery.js +7 -0
- package/src/Document-CKXMSEf1.js +293 -0
- package/src/Document-TgwYKJZM.d.ts +220 -0
- package/src/DocumentRenderer-Wz2xaNyf.js +394 -0
- package/src/EditorSchema-wrDv-id6.js +296 -0
- package/src/Fields-BegSgYhj.d.ts +166 -0
- package/src/Fields-ioGaMEh9.js +130 -0
- package/src/Forms-BuKAXQxr.d.ts +203 -0
- package/src/Forms.d.ts +48 -11
- package/src/Forms.js +342 -7
- package/src/I18n-Ckf9h0rC.js +154 -0
- package/src/I18n.d.ts +45 -2
- package/src/I18n.js +2 -1
- package/src/Image-CJWPLnhP.js +110 -0
- package/src/Links-CJYyy7rC.js +28 -0
- package/src/Links-Dx1yOni8.d.ts +28 -0
- package/src/Locales-Ch7a5xuA.js +67 -0
- package/src/Locales-jwbmJaOp.d.ts +43 -0
- package/src/Locales.d.ts +3 -0
- package/src/Locales.js +3 -0
- package/src/Media-BQ0uL4w7.d.ts +15 -0
- package/src/Media-DSyvd14o.js +87 -0
- package/src/Module.d.ts +2 -10
- package/src/Module.js +1039 -162
- package/src/Operations.d.ts +57 -0
- package/src/Operations.js +263 -0
- package/src/People-DvNZauWw.js +69 -0
- package/src/PreviewFocus-C_EelZO5.js +104 -0
- package/src/Query-C0kGJF5_.d.ts +261 -0
- package/src/RevisionPreview-IVwbJ9Wy.js +133 -0
- package/src/Routes-BaZvm2LE.js +126 -0
- package/src/Routes-DM1rRp3r.d.ts +15 -0
- package/src/S3MediaObjects-y-WacEi9.js +193 -0
- package/src/Seo-BcpqxoAs.d.ts +57 -0
- package/src/Seo-CjNUtUkj.js +254 -0
- package/src/StudioApi-CXLwwocX.js +833 -0
- package/src/StudioErrors-T5zLGQ1M.js +117 -0
- package/src/StudioErrors-kq-E44lQ.d.ts +104 -0
- package/src/StudioServer.d.ts +20 -0
- package/src/StudioServer.js +34 -0
- package/src/answers-DcTg0Xv2.js +41 -0
- package/src/cli.js +681 -187
- package/src/contracts-rprW3ZOB.js +130 -0
- package/src/forms-3xuf0Ym7.d.ts +206 -0
- package/src/localeConfiguration-BPbkLi7-.js +32 -0
- package/src/localeContext-DhF3SPvM.js +59 -0
- package/src/locales-6OD4XGIZ.js +12 -0
- package/src/nuxtDelivery-BYX_Cddb.js +466 -0
- package/src/plugin-DTYuDaQu.js +7171 -0
- package/src/previewContext-dt3ZUh-w.js +4 -0
- package/src/previewRegions-CXjk5cbP.js +145 -0
- package/src/previewSource-fb-q3ESM.js +144 -0
- package/src/rendering-D9LVeEKX.js +47 -0
- package/src/rolldown-runtime-8H4AJuhK.js +14 -0
- package/src/runtime/CmsImage.js +38 -0
- package/src/runtime/DocumentPage.vue +10 -0
- package/src/runtime/DocumentPageContent.js +48 -0
- package/src/runtime/DocumentRenderer.d.ts +129 -0
- package/src/runtime/DocumentRenderer.js +2 -0
- package/src/runtime/api.js +48 -6
- package/src/runtime/delivery/useCmsDocument.js +2 -0
- package/src/runtime/delivery/useCmsDocumentQuery.js +2 -0
- package/src/runtime/delivery/useCmsDocumentSeo.js +2 -114
- package/src/runtime/delivery/useCmsLocale.js +10 -0
- package/src/runtime/plugin.js +2 -40
- package/src/runtime/preview.css +85 -0
- package/src/runtime/preview.js +277 -0
- package/src/runtime/previewSource.js +82 -0
- package/src/runtime/revisionPrivacy.js +13 -0
- package/src/runtime/studio.js +10 -0
- package/src/runtime/studioIcons.js +36 -0
- package/src/validation-3pggwcnm.js +396 -0
- package/src/validation-DpUwPC8Y.js +224 -0
- package/studio/THIRD-PARTY-LICENSES.md +2406 -0
- package/studio/chunks/AccountPage-DL3DitDM.js +288 -0
- package/studio/chunks/AccountPage-DL3DitDM.js.br +0 -0
- package/studio/chunks/AccountPage-DL3DitDM.js.gz +0 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js +584 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js.br +0 -0
- package/studio/chunks/ActivityPage-CLqVUqTh.js.gz +0 -0
- package/studio/chunks/Alert-D0D24z_a.js +335 -0
- package/studio/chunks/Alert-D0D24z_a.js.br +0 -0
- package/studio/chunks/Alert-D0D24z_a.js.gz +0 -0
- package/studio/chunks/Badge-BBFs88TI.js +346 -0
- package/studio/chunks/Badge-BBFs88TI.js.br +0 -0
- package/studio/chunks/Badge-BBFs88TI.js.gz +0 -0
- package/studio/chunks/Button-BT3ztSPx.js +14319 -0
- package/studio/chunks/Button-BT3ztSPx.js.br +0 -0
- package/studio/chunks/Button-BT3ztSPx.js.gz +0 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js +246 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js.br +0 -0
- package/studio/chunks/Collapsible-CKnEYIlp.js.gz +0 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js +1745 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js.br +0 -0
- package/studio/chunks/ContentInventory-D7nsFA6U.js.gz +0 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js +18 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js.br +0 -0
- package/studio/chunks/ContentPage-DCxt6BeD.js.gz +0 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js +2413 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js.br +0 -0
- package/studio/chunks/DashboardSearch-DjyMjJwF.js.gz +0 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js +26063 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.br +0 -0
- package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.gz +0 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js +4400 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js.br +0 -0
- package/studio/chunks/DropdownMenu-CA9fB0uZ.js.gz +0 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js +7799 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js.br +0 -0
- package/studio/chunks/EditorPage-D_PAYEE4.js.gz +0 -0
- package/studio/chunks/FormField-CgM6l2Yn.js +198 -0
- package/studio/chunks/FormField-CgM6l2Yn.js.br +0 -0
- package/studio/chunks/FormField-CgM6l2Yn.js.gz +0 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js +552 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js.br +0 -0
- package/studio/chunks/HelpPage-C-vrFcT_.js.gz +0 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js +271 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js.br +0 -0
- package/studio/chunks/Kbd-Ot7TIhVZ.js.gz +0 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js +101 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.br +0 -0
- package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.gz +0 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js +923 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js.br +0 -0
- package/studio/chunks/MediaPage-D-jaWtdl.js.gz +0 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js +837 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js.br +0 -0
- package/studio/chunks/MediaPicker-BZs2wUFz.js.gz +0 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js +1173 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.br +0 -0
- package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.gz +0 -0
- package/studio/chunks/Modal-D6hSvxHd.js +265 -0
- package/studio/chunks/Modal-D6hSvxHd.js.br +0 -0
- package/studio/chunks/Modal-D6hSvxHd.js.gz +0 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js +277 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.br +0 -0
- package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.gz +0 -0
- package/studio/chunks/Pagination-D9BSo5H2.js +573 -0
- package/studio/chunks/Pagination-D9BSo5H2.js.br +0 -0
- package/studio/chunks/Pagination-D9BSo5H2.js.gz +0 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js +783 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js.br +0 -0
- package/studio/chunks/PeoplePage-CWIXitBD.js.gz +0 -0
- package/studio/chunks/Popover-B63bkTMS.js +128 -0
- package/studio/chunks/Popover-B63bkTMS.js.br +0 -0
- package/studio/chunks/Popover-B63bkTMS.js.gz +0 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js +255 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.br +0 -0
- package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.gz +0 -0
- package/studio/chunks/Routes-DLYHmulE.js +102 -0
- package/studio/chunks/Routes-DLYHmulE.js.br +0 -0
- package/studio/chunks/Routes-DLYHmulE.js.gz +0 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js +95 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js.br +0 -0
- package/studio/chunks/RovingFocusItem-QZNg-wWF.js.gz +0 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js +332 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js.br +0 -0
- package/studio/chunks/ScheduledPage-C0hqrkr5.js.gz +0 -0
- package/studio/chunks/Search-BEgCe9Aj.js +14646 -0
- package/studio/chunks/Search-BEgCe9Aj.js.br +0 -0
- package/studio/chunks/Search-BEgCe9Aj.js.gz +0 -0
- package/studio/chunks/Select-B50WZMW-.js +2145 -0
- package/studio/chunks/Select-B50WZMW-.js.br +0 -0
- package/studio/chunks/Select-B50WZMW-.js.gz +0 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js +2109 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js.br +0 -0
- package/studio/chunks/SelectMenu-DSweWGMz.js.gz +0 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js +846 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js.br +0 -0
- package/studio/chunks/SeoPage-CNNxGe4h.js.gz +0 -0
- package/studio/chunks/Skeleton-COz8dcrw.js +39 -0
- package/studio/chunks/Skeleton-COz8dcrw.js.br +2 -0
- package/studio/chunks/Skeleton-COz8dcrw.js.gz +0 -0
- package/studio/chunks/Slideover-QMMHAAys.js +289 -0
- package/studio/chunks/Slideover-QMMHAAys.js.br +0 -0
- package/studio/chunks/Slideover-QMMHAAys.js.gz +0 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js +80 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js.br +0 -0
- package/studio/chunks/StudioPage-ngEIDr5d.js.gz +0 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js +2524 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.br +0 -0
- package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.gz +0 -0
- package/studio/chunks/Switch-qKl1aDn7.js +484 -0
- package/studio/chunks/Switch-qKl1aDn7.js.br +0 -0
- package/studio/chunks/Switch-qKl1aDn7.js.gz +0 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js +29 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js.br +0 -0
- package/studio/chunks/ToolPage-DxoVAJVk.js.gz +0 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js +693 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js.br +0 -0
- package/studio/chunks/Tooltip-Bu15m_DB.js.gz +0 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js +12 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js.br +0 -0
- package/studio/chunks/TrashPage-lhqLLdoG.js.gz +0 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js +2349 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js.br +0 -0
- package/studio/chunks/VersionsPage-Cqy6UAp9.js.gz +0 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js +113 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.br +0 -0
- package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.gz +0 -0
- package/studio/chunks/arrays-CUJkmV4I.js +10 -0
- package/studio/chunks/arrays-CUJkmV4I.js.br +0 -0
- package/studio/chunks/arrays-CUJkmV4I.js.gz +0 -0
- package/studio/chunks/base-DkTekJe8.js +213 -0
- package/studio/chunks/base-DkTekJe8.js.br +0 -0
- package/studio/chunks/base-DkTekJe8.js.gz +0 -0
- package/studio/chunks/content-DUGl3N4d.js +6012 -0
- package/studio/chunks/content-DUGl3N4d.js.br +0 -0
- package/studio/chunks/content-DUGl3N4d.js.gz +0 -0
- package/studio/chunks/destinations-DPIQVQa6.js +227 -0
- package/studio/chunks/destinations-DPIQVQa6.js.br +0 -0
- package/studio/chunks/destinations-DPIQVQa6.js.gz +0 -0
- package/studio/chunks/en-073cjKW4.js +152 -0
- package/studio/chunks/en-073cjKW4.js.br +0 -0
- package/studio/chunks/en-073cjKW4.js.gz +0 -0
- package/studio/chunks/en-Bn8mxPuf.js +134 -0
- package/studio/chunks/en-Bn8mxPuf.js.br +0 -0
- package/studio/chunks/en-Bn8mxPuf.js.gz +0 -0
- package/studio/chunks/en-C9OiaUDZ.js +251 -0
- package/studio/chunks/en-C9OiaUDZ.js.br +0 -0
- package/studio/chunks/en-C9OiaUDZ.js.gz +0 -0
- package/studio/chunks/en-CHAR6jzx.js +147 -0
- package/studio/chunks/en-CHAR6jzx.js.br +0 -0
- package/studio/chunks/en-CHAR6jzx.js.gz +0 -0
- package/studio/chunks/en-Cq4N1vEF.js +93 -0
- package/studio/chunks/en-Cq4N1vEF.js.br +2 -0
- package/studio/chunks/en-Cq4N1vEF.js.gz +0 -0
- package/studio/chunks/en-D2hRqlse.js +140 -0
- package/studio/chunks/en-D2hRqlse.js.br +0 -0
- package/studio/chunks/en-D2hRqlse.js.gz +0 -0
- package/studio/chunks/en-DiUC3-j6.js +144 -0
- package/studio/chunks/en-DiUC3-j6.js.br +0 -0
- package/studio/chunks/en-DiUC3-j6.js.gz +0 -0
- package/studio/chunks/english-Cs_Adu-u.js +8 -0
- package/studio/chunks/english-Cs_Adu-u.js.br +0 -0
- package/studio/chunks/english-Cs_Adu-u.js.gz +0 -0
- package/studio/chunks/esm-D6DqSiL1.js +752 -0
- package/studio/chunks/esm-D6DqSiL1.js.br +0 -0
- package/studio/chunks/esm-D6DqSiL1.js.gz +0 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js +23 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js.br +0 -0
- package/studio/chunks/externalRequest-CTzr2nDq.js.gz +0 -0
- package/studio/chunks/iconify-DR9ryCPv.js +1007 -0
- package/studio/chunks/iconify-DR9ryCPv.js.br +0 -0
- package/studio/chunks/iconify-DR9ryCPv.js.gz +0 -0
- package/studio/chunks/icons-D2MsAaXq.js +183 -0
- package/studio/chunks/icons-D2MsAaXq.js.br +0 -0
- package/studio/chunks/icons-D2MsAaXq.js.gz +0 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js +26 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js.br +0 -0
- package/studio/chunks/leaveGuards-D22fTGgr.js.gz +0 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js +238 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js.br +0 -0
- package/studio/chunks/lucideIcons-EyqyPBsX.js.gz +0 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js +17 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js.br +0 -0
- package/studio/chunks/mediaRoute--8cY8rUe.js.gz +0 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js +77 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js.br +0 -0
- package/studio/chunks/newDocumentPlanning-C26DHpvh.js.gz +0 -0
- package/studio/chunks/notifications-OKOLc40v.js +110 -0
- package/studio/chunks/notifications-OKOLc40v.js.br +0 -0
- package/studio/chunks/notifications-OKOLc40v.js.gz +0 -0
- package/studio/chunks/operations-CjNHyrEX.js +57 -0
- package/studio/chunks/operations-CjNHyrEX.js.br +0 -0
- package/studio/chunks/operations-CjNHyrEX.js.gz +0 -0
- package/studio/chunks/overlay-DnqFLZTc.js +1733 -0
- package/studio/chunks/overlay-DnqFLZTc.js.br +0 -0
- package/studio/chunks/overlay-DnqFLZTc.js.gz +0 -0
- package/studio/chunks/presentation-DF83w0hE.js +57 -0
- package/studio/chunks/presentation-DF83w0hE.js.br +0 -0
- package/studio/chunks/presentation-DF83w0hE.js.gz +0 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js +4557 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.br +0 -0
- package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.gz +0 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js +76 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js.br +0 -0
- package/studio/chunks/searchPresentation-DFwxQkt3.js.gz +0 -0
- package/studio/chunks/status-DQv6ihkU.js +38 -0
- package/studio/chunks/status-DQv6ihkU.js.br +0 -0
- package/studio/chunks/status-DQv6ihkU.js.gz +0 -0
- package/studio/chunks/studioContext-I8HozGU1.js +4953 -0
- package/studio/chunks/studioContext-I8HozGU1.js.br +0 -0
- package/studio/chunks/studioContext-I8HozGU1.js.gz +0 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js +73 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js.br +0 -0
- package/studio/chunks/studioQueries-BR-9NT5F.js.gz +0 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js +1095 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js.br +0 -0
- package/studio/chunks/studioSearch-ByaL-QpM.js.gz +0 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js +62 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.br +0 -0
- package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.gz +0 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js +189 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.br +0 -0
- package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.gz +0 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js +16 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js.br +3 -0
- package/studio/chunks/useDocumentMessage-BAWvc38w.js.gz +0 -0
- package/studio/chunks/useFilter-DzyiTR7f.js +87 -0
- package/studio/chunks/useFilter-DzyiTR7f.js.br +0 -0
- package/studio/chunks/useFilter-DzyiTR7f.js.gz +0 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js +8 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js.br +0 -0
- package/studio/chunks/useFormControl-CL7sSCUo.js.gz +0 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js +154 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js.br +0 -0
- package/studio/chunks/useGraceArea-Chcy25IQ.js.gz +0 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js +44 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.br +8 -0
- package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.gz +0 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js +35 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js.br +0 -0
- package/studio/chunks/useLinkCopy-CMjQteCy.js.gz +0 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js +16 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js.br +0 -0
- package/studio/chunks/usePointerMotion-DwRcwBNQ.js.gz +0 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js +298 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js.br +0 -0
- package/studio/chunks/useStudioNavigation-CLwtSYpb.js.gz +0 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js +79 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js.br +0 -0
- package/studio/chunks/useStudioPages-DR9qmYLg.js.gz +0 -0
- package/studio/chunks/utils-mdScC0v0.js +59 -0
- package/studio/chunks/utils-mdScC0v0.js.br +0 -0
- package/studio/chunks/utils-mdScC0v0.js.gz +0 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js +781 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js.br +0 -0
- package/studio/chunks/virtualizer-D1S0bZ4t.js.gz +0 -0
- package/studio/help/64f767fe29c2-save-and-publish.svg +7 -0
- package/studio/host.css +1 -1
- package/studio/host.css.br +0 -0
- package/studio/host.css.gz +0 -0
- package/studio/host.js +8757 -39178
- package/studio/host.js.br +0 -0
- package/studio/host.js.gz +0 -0
- package/CHANGELOG.md +0 -13
- package/bin/cms.mjs +0 -2
- package/src/ApplicationTypes.d.ts +0 -84
- package/src/ApplicationTypes.js +0 -1
- package/src/Configuration-Da5B2PVH.js +0 -1191
- package/src/Configuration-Da5B2PVH.js.map +0 -1
- package/src/Configuration.d.ts +0 -82
- package/src/Configuration.js +0 -8
- package/src/Configuration.js.map +0 -1
- package/src/Content.d.ts +0 -68
- package/src/Content.js +0 -373
- package/src/Content.js.map +0 -1
- package/src/ContentTransfer-BxwswWn3.js +0 -86
- package/src/ContentTransfer-BxwswWn3.js.map +0 -1
- package/src/ContentTransfer-Z9FHyLez.d.ts +0 -72
- package/src/DocumentEngine-hh_IGPXO.js +0 -978
- package/src/DocumentEngine-hh_IGPXO.js.map +0 -1
- package/src/DocumentModel.d.ts +0 -52
- package/src/DocumentModel.js +0 -66
- package/src/DocumentModel.js.map +0 -1
- package/src/Forms-CX-hwmJF.js +0 -391
- package/src/Forms-CX-hwmJF.js.map +0 -1
- package/src/Forms-CfNPTiCr.js +0 -110
- package/src/Forms-CfNPTiCr.js.map +0 -1
- package/src/Forms-R0HoTR-o.d.ts +0 -92
- package/src/Forms.js.map +0 -1
- package/src/HttpPaths-c9nLZ9H2.js +0 -21
- package/src/HttpPaths-c9nLZ9H2.js.map +0 -1
- package/src/I18n-zbqpWxki.d.ts +0 -29
- package/src/Media-j1bTritO.js +0 -112
- package/src/Media-j1bTritO.js.map +0 -1
- package/src/Module.js.map +0 -1
- package/src/References-CCPDAPve.js +0 -45
- package/src/References-CCPDAPve.js.map +0 -1
- package/src/S3MediaObjects-Dwhl2deX.js +0 -2742
- package/src/S3MediaObjects-Dwhl2deX.js.map +0 -1
- package/src/Seo-402YumpT.d.ts +0 -198
- package/src/cli/content.js +0 -101
- package/src/cli/content.js.map +0 -1
- package/src/cli.js.map +0 -1
- package/src/connection-BP80q4d-.js +0 -92
- package/src/connection-BP80q4d-.js.map +0 -1
- package/src/dev-lifecycle-CjDq63Ft.js +0 -535
- package/src/dev-lifecycle-CjDq63Ft.js.map +0 -1
- package/src/installation-DYNQQBD3.js +0 -9114
- package/src/installation-DYNQQBD3.js.map +0 -1
- package/src/internal/application-types.js +0 -43
- package/src/internal/application-types.js.map +0 -1
- package/src/internal/authoring-catalog.js +0 -158
- package/src/internal/authoring-catalog.js.map +0 -1
- package/src/internal/authoring-compiler.js +0 -146
- package/src/internal/authoring-compiler.js.map +0 -1
- package/src/internal/authoring-metadata.js +0 -191
- package/src/internal/authoring-metadata.js.map +0 -1
- package/src/internal/cms-config.js +0 -45
- package/src/internal/cms-config.js.map +0 -1
- package/src/internal/configuration.js +0 -228
- package/src/internal/configuration.js.map +0 -1
- package/src/internal/dev-lifecycle.js +0 -3
- package/src/internal/diagnostics.js +0 -47
- package/src/internal/diagnostics.js.map +0 -1
- package/src/internal/document-model.js +0 -376
- package/src/internal/document-model.js.map +0 -1
- package/src/internal/field-metadata.js +0 -7
- package/src/internal/field-metadata.js.map +0 -1
- package/src/internal/form-capabilities.js +0 -12
- package/src/internal/form-capabilities.js.map +0 -1
- package/src/internal/i18n.js +0 -73
- package/src/internal/i18n.js.map +0 -1
- package/src/internal/studio-app.js +0 -68
- package/src/internal/studio-app.js.map +0 -1
- package/src/location-CMNGO3lU.js +0 -35
- package/src/location-CMNGO3lU.js.map +0 -1
- package/src/metadata-DN9_K6Yl.js +0 -201
- package/src/metadata-DN9_K6Yl.js.map +0 -1
- package/src/models-5j67LMqW.js +0 -131
- package/src/models-5j67LMqW.js.map +0 -1
- package/src/models-VmGmG19-.js +0 -628
- package/src/models-VmGmG19-.js.map +0 -1
- package/src/runtime/api.js.map +0 -1
- package/src/runtime/blocks.js +0 -30
- package/src/runtime/blocks.js.map +0 -1
- package/src/runtime/collaboration.js +0 -45
- package/src/runtime/collaboration.js.map +0 -1
- package/src/runtime/delivery/DocumentField.js +0 -23
- package/src/runtime/delivery/DocumentField.js.map +0 -1
- package/src/runtime/delivery/DocumentRenderer.js +0 -61
- package/src/runtime/delivery/DocumentRenderer.js.map +0 -1
- package/src/runtime/delivery/DocumentScope.js +0 -41
- package/src/runtime/delivery/DocumentScope.js.map +0 -1
- package/src/runtime/delivery/blocks.js +0 -8
- package/src/runtime/delivery/blocks.js.map +0 -1
- package/src/runtime/delivery/context.js +0 -12
- package/src/runtime/delivery/context.js.map +0 -1
- package/src/runtime/delivery/document-page.js +0 -21
- package/src/runtime/delivery/document-page.js.map +0 -1
- package/src/runtime/delivery/document.js +0 -43
- package/src/runtime/delivery/document.js.map +0 -1
- package/src/runtime/delivery/error.js +0 -11
- package/src/runtime/delivery/error.js.map +0 -1
- package/src/runtime/delivery/plugin.js +0 -99
- package/src/runtime/delivery/plugin.js.map +0 -1
- package/src/runtime/delivery/preview.d.ts +0 -11
- package/src/runtime/delivery/preview.js +0 -6
- package/src/runtime/delivery/preview.js.map +0 -1
- package/src/runtime/delivery/types.d.ts +0 -2
- package/src/runtime/delivery/types.js +0 -1
- package/src/runtime/delivery/useCmsDocumentSeo.d.ts +0 -67
- package/src/runtime/delivery/useCmsDocumentSeo.js.map +0 -1
- package/src/runtime/delivery/useDocument.d.ts +0 -6
- package/src/runtime/delivery/useDocument.js +0 -23
- package/src/runtime/delivery/useDocument.js.map +0 -1
- package/src/runtime/delivery/useDocumentQuery.d.ts +0 -7
- package/src/runtime/delivery/useDocumentQuery.js +0 -29
- package/src/runtime/delivery/useDocumentQuery.js.map +0 -1
- package/src/runtime/forms/document.js +0 -38
- package/src/runtime/forms/document.js.map +0 -1
- package/src/runtime/forms/useCmsForm.js +0 -257
- package/src/runtime/forms/useCmsForm.js.map +0 -1
- package/src/runtime/i18n/translator.js +0 -51
- package/src/runtime/i18n/translator.js.map +0 -1
- package/src/runtime/i18n/useCmsI18n.d.ts +0 -13
- package/src/runtime/i18n/useCmsI18n.js +0 -38
- package/src/runtime/i18n/useCmsI18n.js.map +0 -1
- package/src/runtime/installation.js +0 -3
- package/src/runtime/plugin.js.map +0 -1
- package/src/runtime/preview/CmsStudioPreviewMarker.js +0 -29
- package/src/runtime/preview/CmsStudioPreviewMarker.js.map +0 -1
- package/src/runtime/preview/comark-document.js +0 -37
- package/src/runtime/preview/comark-document.js.map +0 -1
- package/src/runtime/preview/connection.js +0 -3
- package/src/runtime/preview/controller.js +0 -265
- package/src/runtime/preview/controller.js.map +0 -1
- package/src/runtime/preview/crypto.js +0 -16
- package/src/runtime/preview/crypto.js.map +0 -1
- package/src/runtime/preview/overlay.js +0 -122
- package/src/runtime/preview/overlay.js.map +0 -1
- package/src/runtime/preview/plugin.client.js +0 -68
- package/src/runtime/preview/plugin.client.js.map +0 -1
- package/src/runtime/preview/preview.css +0 -91
- package/src/runtime/preview/protocol.d.ts +0 -16
- package/src/runtime/preview/protocol.js +0 -23
- package/src/runtime/preview/protocol.js.map +0 -1
- package/src/runtime/preview/regions.js +0 -142
- package/src/runtime/preview/regions.js.map +0 -1
- package/src/runtime/preview/store.js +0 -4
- package/src/runtime/sitemap-entries.js +0 -17
- package/src/runtime/sitemap-entries.js.map +0 -1
- package/src/runtime/sitemap.js +0 -23
- package/src/runtime/sitemap.js.map +0 -1
- package/src/runtime/studio-app.js +0 -17
- package/src/runtime/studio-app.js.map +0 -1
- package/src/runtime/studio-document.js +0 -46
- package/src/runtime/studio-document.js.map +0 -1
- package/src/runtime/studio-entry.js +0 -19
- package/src/runtime/studio-entry.js.map +0 -1
- package/src/runtime/studio-navigation.js +0 -11
- package/src/runtime/studio-navigation.js.map +0 -1
- package/src/scalars-CA6kyipS.d.ts +0 -7
- package/src/scalars-CVZqT3L0.js +0 -22
- package/src/scalars-CVZqT3L0.js.map +0 -1
- package/src/store-X1e1o_MF.js +0 -209
- package/src/store-X1e1o_MF.js.map +0 -1
- package/src/types-DZ0IV-Ow.d.ts +0 -101
- package/studio/CreateDocumentDialog-BpjBYGfI.js +0 -335
- package/studio/SelectMenu-KiXwx4Y_.js +0 -34032
- package/studio/collaboration-DcK2F6v9.js +0 -4566
- package/studio/editor-P2rB7Csp.js +0 -30128
- package/studio/rolldown-runtime-Dy4uBu1J.js +0 -11
|
@@ -0,0 +1,4953 @@
|
|
|
1
|
+
import { A as e, E as t, F as n, Mt as r, at as i, j as a, k as o } from "./Button-BT3ztSPx.js";
|
|
2
|
+
import { $ as s, $a as c, $i as l, $n as u, $r as d, A as f, Aa as p, An as m, Ar as h, At as g, Ba as _, Bi as v, Bn as y, Br as b, Bt as x, C as S, Ca as C, Ci as ee, Cn as w, Cr as te, Ct as ne, D as T, Da as re, Di as ie, Dn as ae, Dr as oe, Dt as se, E as ce, Ea as le, Ei as ue, En as de, Er as fe, Et as pe, Fa as me, Fi as he, Fn as ge, Fr as _e, G as ve, Ga as ye, Gi as be, Gn as xe, Gr as Se, Gt as Ce, Ha as we, Hi as Te, Hn as Ee, Hr as De, Ht as Oe, I as ke, Ia as Ae, Ii as je, In as Me, Ir as Ne, It as E, Ja as Pe, Ji as Fe, Jn as Ie, Jr as Le, Jt as Re, K as ze, Ka as Be, Ki as Ve, Kn as He, Kr as D, Kt as Ue, L as We, La as Ge, Li as Ke, Ln as qe, Lr as Je, Lt as O, Mi as Ye, Mn as Xe, Mr as Ze, Mt as Qe, N as $e, Na as et, Ni as tt, Nn as nt, Nr as rt, Nt as it, Oa as at, Oi as ot, On as st, Or as ct, Ot as k, P as lt, Pa as ut, Pn as dt, Pr as ft, Pt as pt, Q as mt, Qa as ht, Qi as gt, Qn as _t, Qr as vt, Qt as yt, R as bt, Ra as xt, Ri as St, Rn as Ct, Rr as wt, Rt as Tt, S as Et, Sa as Dt, Si as Ot, Sn as kt, Sr as A, T as At, Ta as jt, Tn as Mt, Tr as Nt, Tt as j, U as Pt, Ua as Ft, Ui as It, Un as Lt, Ur as Rt, Ut as M, Va as zt, Vi as Bt, Vn as Vt, Vr as Ht, Vt as Ut, W as Wt, Wa as Gt, Wi as Kt, Wn as qt, Wt as Jt, Xa as Yt, Xi as Xt, Xn as Zt, Xr as Qt, Xt as $t, Y as en, Ya as tn, Yi as nn, Yn as rn, Yr as an, Yt as on, Z as sn, Za as cn, Zn as ln, Zr as un, Zt as dn, _ as fn, _a as pn, _i as mn, _n as hn, _r as gn, _t as _n, aa as vn, ai as yn, an as bn, ao as xn, b as Sn, ba as Cn, bi as wn, bn as Tn, br as N, bt as En, ca as Dn, ci as On, cn as kn, co as An, d as jn, da as Mn, di as Nn, dn as P, do as F, dr as Pn, ea as Fn, ei as In, eo as Ln, f as Rn, fa as zn, fi as Bn, fn as Vn, fo as Hn, fr as Un, ft as Wn, g as I, gi as Gn, gn as Kn, gt as L, h as qn, ha as Jn, hi as Yn, hn as R, ht as z, ia as Xn, in as Zn, j as Qn, ja as $n, ji as er, jn as tr, k as nr, ka as rr, kn as ir, kr as ar, kt as or, l as sr, li as cr, ln as lr, lr as ur, lt as dr, m as fr, ma as pr, mi as mr, mn as hr, mr as gr, na as _r, ni as vr, nn as yr, oa as br, oi as xr, on as Sr, oo as Cr, p as wr, pa as Tr, pi as Er, pn as Dr, po as Or, pr as kr, pt as Ar, q as jr, qa as Mr, qi as Nr, qn as Pr, qr as Fr, qt as Ir, ra as Lr, ri as Rr, rn as zr, ro as Br, sa as Vr, si as Hr, sn as Ur, st as Wr, t as Gr, ta as Kr, ti as qr, to as Jr, tr as Yr, u as Xr, ua as Zr, ui as Qr, un as $r, uo as B, ur as ei, ut as ti, v as ni, va as ri, vi as ii, vn as V, vr as ai, vt as oi, w as si, wa as ci, wi as li, wn as ui, wr as di, wt as H, x as fi, xa as pi, xi as mi, xn as hi, xr as gi, xt as U, y as _i, ya as vi, yi, yn as W, yr as bi, yt as xi, za as Si, zi as Ci, zt as wi } from "./Search-BEgCe9Aj.js";
|
|
3
|
+
import { $r as Ti, $t as Ei, A as Di, Ci as G, Cr as Oi, Ct as ki, E as K, K as Ai, N as ji, Or as Mi, Pn as Ni, Tr as Pi, V as Fi, Wr as Ii, Zt as Li, gn as Ri, ii as zi, jr as Bi, li as Vi, mn as Hi, oa as Ui, ri as Wi, ui as Gi, un as Ki, wr as qi } from "./runtime-core.esm-bundler-DKFA9Rep.js";
|
|
4
|
+
import { N as Ji } from "./overlay-DnqFLZTc.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/internal/count.js
|
|
6
|
+
var Yi = nn, Xi = It, Zi = Kt, Qi = be, $i = "~effect/MutableRef", ea = {
|
|
7
|
+
[$i]: $i,
|
|
8
|
+
...Ge,
|
|
9
|
+
toJSON() {
|
|
10
|
+
return {
|
|
11
|
+
_id: "MutableRef",
|
|
12
|
+
current: ht(this.current)
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}, ta = (e) => {
|
|
16
|
+
let t = Object.create(ea);
|
|
17
|
+
return t.current = e, t;
|
|
18
|
+
}, na = /*#__PURE__*/ Symbol.for("effect/MutableList/Empty"), ra = () => ({
|
|
19
|
+
head: void 0,
|
|
20
|
+
tail: void 0,
|
|
21
|
+
length: 0
|
|
22
|
+
}), ia = (e) => {
|
|
23
|
+
let t = e.head;
|
|
24
|
+
t.offset >= 1024 && t === e.tail && t.mutable && (t.array.length - t.offset) * 8 <= t.offset && (e.head = e.tail = {
|
|
25
|
+
array: t.array.slice(t.offset),
|
|
26
|
+
mutable: !0,
|
|
27
|
+
offset: 0,
|
|
28
|
+
next: void 0
|
|
29
|
+
});
|
|
30
|
+
}, aa = () => ({
|
|
31
|
+
array: [],
|
|
32
|
+
mutable: !0,
|
|
33
|
+
offset: 0,
|
|
34
|
+
next: void 0
|
|
35
|
+
}), oa = (e, t) => {
|
|
36
|
+
e.tail ? e.tail.mutable || (e.tail.next = aa(), e.tail = e.tail.next) : e.head = e.tail = aa(), e.tail.array.push(t), e.length++;
|
|
37
|
+
}, sa = (e) => {
|
|
38
|
+
e.head = e.tail = void 0, e.length = 0;
|
|
39
|
+
}, ca = (e) => {
|
|
40
|
+
if (!e.head) return na;
|
|
41
|
+
let t = e.head.array[e.head.offset];
|
|
42
|
+
return e.head.mutable && (e.head.array[e.head.offset] = void 0), e.head.offset++, e.length--, e.head.offset === e.head.array.length ? e.head.next ? e.head = e.head.next : sa(e) : ia(e), t;
|
|
43
|
+
}, la = "~effect/Queue", ua = "~effect/Queue/Enqueue", da = "~effect/Queue/Dequeue", fa = {
|
|
44
|
+
_A: F,
|
|
45
|
+
_E: F
|
|
46
|
+
}, pa = {
|
|
47
|
+
[la]: fa,
|
|
48
|
+
[ua]: fa,
|
|
49
|
+
[da]: fa,
|
|
50
|
+
...Ge,
|
|
51
|
+
toJSON() {
|
|
52
|
+
return {
|
|
53
|
+
_id: "effect/Queue",
|
|
54
|
+
state: this.state._tag,
|
|
55
|
+
size: wa(this)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}, ma = (e) => ye((t) => {
|
|
59
|
+
let n = Object.create(pa);
|
|
60
|
+
return n.dispatcher = t.currentDispatcher, n.capacity = e?.capacity ?? Infinity, n.strategy = e?.strategy ?? "suspend", n.messages = ra(), n.scheduleRunning = !1, n.state = {
|
|
61
|
+
_tag: "Open",
|
|
62
|
+
takers: /* @__PURE__ */ new Set(),
|
|
63
|
+
offers: /* @__PURE__ */ new Set(),
|
|
64
|
+
awaiters: /* @__PURE__ */ new Set()
|
|
65
|
+
}, Ve(n);
|
|
66
|
+
}), ha = (e) => ma({ capacity: e }), ga = /*#__PURE__*/ B(2, (e, t) => Nr(() => _a(e, t) ? Ea : e.state._tag === "Open" && e.strategy === "suspend" ? Pa(e, t) : Ta)), _a = (e, t) => e.state._tag === "Open" ? e.messages.length >= e.capacity ? e.strategy === "sliding" ? (ca(e.messages), oa(e.messages, t), !0) : e.capacity <= 0 && e.state.takers.size > 0 && (oa(e.messages, t), ka(e), !0) : (oa(e.messages, t), Aa(e), !0) : !1, va = /*#__PURE__*/ B(2, (e, t) => Fe(() => ya(e, t))), ya = (e, t) => {
|
|
67
|
+
if (e.state._tag !== "Open") return !1;
|
|
68
|
+
let n = zt(t), r = Te(n, Da);
|
|
69
|
+
return e.state.offers.size === 0 && e.messages.length === 0 ? (za(e, r), !0) : (e.state = {
|
|
70
|
+
...e.state,
|
|
71
|
+
_tag: "Closing",
|
|
72
|
+
exit: r
|
|
73
|
+
}, Aa(e), !0);
|
|
74
|
+
}, ba = (e) => Fe(() => xa(e)), xa = (e) => {
|
|
75
|
+
if (e.state._tag === "Done") return !1;
|
|
76
|
+
sa(e.messages);
|
|
77
|
+
let t = e.state.offers;
|
|
78
|
+
za(e, e.state._tag === "Open" ? Oa : e.state.exit);
|
|
79
|
+
for (let e of t) Ia(e);
|
|
80
|
+
return !0;
|
|
81
|
+
}, Sa = (e) => ja(() => Ca(e) ?? St(Na(e, () => Ma(e, 1)), Sa(e))), Ca = (e) => {
|
|
82
|
+
if (e.state._tag === "Done") return e.state.exit;
|
|
83
|
+
if (e.messages.length > 0) {
|
|
84
|
+
let t = ca(e.messages);
|
|
85
|
+
return Ra(e), we(t);
|
|
86
|
+
}
|
|
87
|
+
if (e.capacity <= 0 && e.state.offers.size > 0) {
|
|
88
|
+
let t = La(e.state.offers);
|
|
89
|
+
return Ra(e), we(t);
|
|
90
|
+
}
|
|
91
|
+
}, wa = (e) => e.state._tag === "Done" ? 0 : e.messages.length, Ta = /*#__PURE__*/ we(!1), Ea = /*#__PURE__*/ we(!0), Da = /*#__PURE__*/ _(/*#__PURE__*/ Ae()), Oa = /*#__PURE__*/ v(), ka = (e) => {
|
|
92
|
+
if (e.state._tag !== "Done" && e.state.takers.size !== 0) {
|
|
93
|
+
for (let t of e.state.takers) if (t.ready() && (e.state.takers.delete(t), t.resume(Bt), e.messages.length === 0)) break;
|
|
94
|
+
}
|
|
95
|
+
}, Aa = (e) => {
|
|
96
|
+
e.scheduleRunning || e.state._tag === "Done" || e.state.takers.size === 0 || (e.scheduleRunning = !0, e.dispatcher.scheduleTask(() => {
|
|
97
|
+
e.scheduleRunning = !1, ka(e);
|
|
98
|
+
}, 0));
|
|
99
|
+
}, ja = /*#__PURE__*/ Gt({
|
|
100
|
+
op: "QueueTake",
|
|
101
|
+
[Si](e) {
|
|
102
|
+
let t = this[xt]();
|
|
103
|
+
return Ft(t) ? t[Si](e) : t;
|
|
104
|
+
}
|
|
105
|
+
}), Ma = (e, t) => e.messages.length >= (e.state._tag === "Closing" ? 1 : Math.min(t, e.capacity || 1)) || e.capacity <= 0 && e.state._tag !== "Done" && e.state.offers.size > 0, Na = (e, t) => Ci((n) => {
|
|
106
|
+
if (e.state._tag === "Done") return n(e.state.exit);
|
|
107
|
+
if (t()) return n(Bt);
|
|
108
|
+
let r = {
|
|
109
|
+
ready: t,
|
|
110
|
+
resume: n
|
|
111
|
+
};
|
|
112
|
+
return e.state.takers.add(r), Fe(() => {
|
|
113
|
+
e.state._tag !== "Done" && e.state.takers.delete(r);
|
|
114
|
+
});
|
|
115
|
+
}), Pa = (e, t) => Ci((n) => _a(e, t) ? n(Ea) : Fa(e, {
|
|
116
|
+
_tag: "Single",
|
|
117
|
+
message: t,
|
|
118
|
+
resume: n
|
|
119
|
+
})), Fa = (e, t) => {
|
|
120
|
+
if (e.state._tag !== "Open") return Ia(t);
|
|
121
|
+
let n = e.state.offers;
|
|
122
|
+
return n.add(t), Fe(() => {
|
|
123
|
+
e.state._tag !== "Done" && (n.delete(t), e.state._tag === "Closing" && n.size === 0 && e.messages.length === 0 && za(e, e.state.exit));
|
|
124
|
+
});
|
|
125
|
+
}, Ia = (e) => e._tag === "Single" ? e.resume(Ta) : e.resume(we(e.remaining.slice(e.offset))), La = (e) => {
|
|
126
|
+
let t = e.values().next().value;
|
|
127
|
+
if (t._tag === "Single") return e.delete(t), t.resume(Ea), t.message;
|
|
128
|
+
let n = t.remaining[t.offset++];
|
|
129
|
+
return t.offset === t.remaining.length && (e.delete(t), t.resume(we([]))), n;
|
|
130
|
+
}, Ra = (e) => {
|
|
131
|
+
if (e.state._tag === "Done") return Hr(e.state.exit.cause);
|
|
132
|
+
if (e.state.offers.size === 0) return e.state._tag === "Closing" && e.messages.length === 0 && (za(e, e.state.exit), Hr(e.state.exit.cause));
|
|
133
|
+
for (let t of e.state.offers) {
|
|
134
|
+
let n = e.capacity - e.messages.length;
|
|
135
|
+
if (n <= 0) break;
|
|
136
|
+
if (t._tag === "Single") oa(e.messages, t.message), e.state.offers.delete(t), t.resume(Ea);
|
|
137
|
+
else {
|
|
138
|
+
for (; t.offset < t.remaining.length; t.offset++) {
|
|
139
|
+
if (n === 0) return !1;
|
|
140
|
+
oa(e.messages, t.remaining[t.offset]), n--;
|
|
141
|
+
}
|
|
142
|
+
e.state.offers.delete(t), t.resume(we([]));
|
|
143
|
+
}
|
|
144
|
+
let r = e.state;
|
|
145
|
+
if (r._tag === "Done") return Hr(r.exit.cause);
|
|
146
|
+
}
|
|
147
|
+
return !1;
|
|
148
|
+
}, za = (e, t) => {
|
|
149
|
+
if (e.state._tag === "Done") return;
|
|
150
|
+
let n = e.state;
|
|
151
|
+
e.state = {
|
|
152
|
+
_tag: "Done",
|
|
153
|
+
exit: t
|
|
154
|
+
};
|
|
155
|
+
for (let e of n.takers) e.resume(t);
|
|
156
|
+
n.takers.clear();
|
|
157
|
+
for (let e of n.awaiters) e(t);
|
|
158
|
+
n.awaiters.clear();
|
|
159
|
+
}, Ba = "~effect/Channel", Va = (e) => Jr(e, Ba), Ha = {
|
|
160
|
+
[Ba]: {
|
|
161
|
+
_Env: F,
|
|
162
|
+
_InErr: F,
|
|
163
|
+
_InElem: F,
|
|
164
|
+
_OutErr: F,
|
|
165
|
+
_OutElem: F
|
|
166
|
+
},
|
|
167
|
+
pipe() {
|
|
168
|
+
return Or(this, arguments);
|
|
169
|
+
}
|
|
170
|
+
}, Ua = (e) => {
|
|
171
|
+
let t = Object.create(Ha);
|
|
172
|
+
return t.transform = (t, n) => gr(e(t, n), (e) => D(gi(e))), t;
|
|
173
|
+
}, Wa = (e, t) => Ua((n, r) => A(qa(e)(n, r), (e) => t(e, r))), Ga = (e) => Ua((t, n) => e), Ka = (e) => Ua(te(function* (t, n) {
|
|
174
|
+
let r = ee(n), i = (e) => Ot(r, xr(e)), a = yield* Ze(e(t, n, r), i);
|
|
175
|
+
return Ze(a, i);
|
|
176
|
+
})), qa = (e) => e.transform, Ja = (e) => Ua((t, n) => Fr(() => qa(e())(t, n))), Ya = /*#__PURE__*/ Ga(/*#__PURE__*/ D(/*#__PURE__*/ Ye())), Xa = (e) => Ga(D(N(e))), Za = (e) => Ga(gi(e)), Qa = (e) => Ua((t, n) => $a({
|
|
177
|
+
scope: n,
|
|
178
|
+
readable: e.evaluate(),
|
|
179
|
+
onError: e.onError,
|
|
180
|
+
releaseLockOnEnd: e.releaseLockOnEnd
|
|
181
|
+
})), $a = (e) => {
|
|
182
|
+
let t = e.readable.getReader(), n = e.exit ?? ta(void 0), r = Fr(() => n.current ? n.current : h(an({
|
|
183
|
+
try: () => t.read(),
|
|
184
|
+
catch: e.onError
|
|
185
|
+
}), {
|
|
186
|
+
onFailure: (e) => n.current ?? gi(e),
|
|
187
|
+
onSuccess: ({ done: e, value: t }) => n.current ? n.current : e ? Ye() : D(Mn(t))
|
|
188
|
+
}));
|
|
189
|
+
return Pn(wn(e.scope, e.releaseLockOnEnd ? Le(() => t.releaseLock()) : Ne(() => t.cancel().catch(An))), r);
|
|
190
|
+
}, eo = /*#__PURE__*/ B(2, (e, t) => Wa(e, (e) => Le(() => {
|
|
191
|
+
let n = 0;
|
|
192
|
+
return ct(e, (e) => t(e, n++));
|
|
193
|
+
}))), to = /*#__PURE__*/ B(2, (e, t) => Ua((n, r) => {
|
|
194
|
+
let i = ee(r);
|
|
195
|
+
return ct(qa(e)(n, i), (e) => {
|
|
196
|
+
let a = e.pipe(gr((e) => {
|
|
197
|
+
if (Hr(e)) return gi(e);
|
|
198
|
+
let o = i;
|
|
199
|
+
return i = ee(r), Ot(o, ie(e)).pipe(ei(qa(t(e))(n, i)), A((e) => (a = e, e)));
|
|
200
|
+
}));
|
|
201
|
+
return Fr(() => a);
|
|
202
|
+
});
|
|
203
|
+
})), no = /*#__PURE__*/ B((e) => Va(e[0]) && Va(e[1]), (e, t, n) => Ka(te(function* (r, i, a) {
|
|
204
|
+
let o = n?.haltStrategy ?? "both", s = yield* ha(0);
|
|
205
|
+
yield* wn(a, ba(s));
|
|
206
|
+
let c = 0;
|
|
207
|
+
function l(e, t) {
|
|
208
|
+
if (c++, !Hr(t)) return va(s, t);
|
|
209
|
+
switch (o) {
|
|
210
|
+
case "both": return c === 2 ? va(s, t) : In;
|
|
211
|
+
case "left":
|
|
212
|
+
case "right": return e === o ? va(s, t) : In;
|
|
213
|
+
case "either": return va(s, t);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
let u = (e, t, n) => qa(t)(r, n).pipe(A((e) => e.pipe(A((e) => ga(s, e)), di)), Ze((t) => ft(xr(t), (e) => Ot(n, e)).pipe(h({
|
|
217
|
+
onFailure: (t) => l(e, t),
|
|
218
|
+
onSuccess: () => l(e, t)
|
|
219
|
+
}))), Nt(a));
|
|
220
|
+
return yield* u("left", e, ee(a)), yield* u("right", t, ee(a)), Sa(s);
|
|
221
|
+
}))), ro = /*#__PURE__*/ B(2, (e, t) => Ua((n, r) => A(qa(e)(n, r), (e) => qa(t)(e, r)))), io = /*#__PURE__*/ B(2, (e, t) => Ka((n, r, i) => mi(i, t).pipe(ei(qa(e)(n, r))))), ao = /*#__PURE__*/ B(2, (e, t) => io(e, (e) => t)), oo = (e, t, n) => Fr(() => {
|
|
222
|
+
let r = li(), i = qa(e)(Ye(), r);
|
|
223
|
+
return yn(A(i, t), n || D).pipe(rt((e) => Ot(r, e)));
|
|
224
|
+
}), so = /*#__PURE__*/ B(2, (e, t) => Ua((n, r) => ct(wt(qa(e)(n, r), t), wt(t)))), co = /*#__PURE__*/ B(2, (e, t) => oo(e, (e) => di(A(e, t), { disableYield: !0 }))), lo = (e, t) => qa(e)(Ye(), t), uo = (e, t) => () => {
|
|
225
|
+
let n = on(se(e), t);
|
|
226
|
+
return Ua((e, t) => D(A(e, (e) => n(e))));
|
|
227
|
+
}, fo = "~effect/Stream", po = {
|
|
228
|
+
_R: F,
|
|
229
|
+
_E: F,
|
|
230
|
+
_A: F
|
|
231
|
+
}, mo = function(e) {
|
|
232
|
+
this.channel = e;
|
|
233
|
+
};
|
|
234
|
+
mo.prototype = {
|
|
235
|
+
[fo]: po,
|
|
236
|
+
pipe() {
|
|
237
|
+
return Or(this, arguments);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
var ho = (e) => new mo(e), go = "~effect/Stream", _o = (e) => Jr(e, go), vo = ho, yo = (e) => bo(D(A(e, () => Ye()))), bo = (e) => vo(Ga(e)), xo = (e, t) => vo(Ua((n, r) => A(lo(e.channel, r), (e) => t(e, r)))), So = (e) => e.channel, Co = /*#__PURE__*/ vo(Ya), wo = (e) => vo(Ja(() => e().channel)), To = (e) => vo(Xa(e)), Eo = (e) => vo(Za(e)), Do = (e) => vo(Qa(e)), Oo = /*#__PURE__*/ B(2, (e, t) => wo(() => {
|
|
241
|
+
let n = 0;
|
|
242
|
+
return vo(eo(e.channel, Zr((e) => t(e, n++))));
|
|
243
|
+
})), ko = /*#__PURE__*/ B(2, (e, t) => Ao(e, {
|
|
244
|
+
duration: t,
|
|
245
|
+
orElse: () => Co
|
|
246
|
+
})), Ao = /*#__PURE__*/ B(2, (e, t) => {
|
|
247
|
+
let n = Fn(t.duration);
|
|
248
|
+
if (!Kr(n)) return e;
|
|
249
|
+
if (_r(n)) return wo(t.orElse);
|
|
250
|
+
let r = Symbol();
|
|
251
|
+
return Mo(wo(() => {
|
|
252
|
+
let t = Zi().getRef(On), i = Xn(n), a, o = Qi(!1);
|
|
253
|
+
return jo(xo(e, (e, n) => Fr(() => (a = t.currentTimeMillisUnsafe() + i, o.openUnsafe(), e)).pipe(ct((e) => (o.closeUnsafe(), a = void 0, e)), D)), yo(fe(function* () {
|
|
254
|
+
for (;;) if (yield* o.await, a !== void 0 && (yield* Se(a - t.currentTimeMillisUnsafe()), a !== void 0 && !(a - t.currentTimeMillisUnsafe() > 0))) return yield* bi(r);
|
|
255
|
+
})), { haltStrategy: "left" });
|
|
256
|
+
}), (e) => e.reasons.find((e) => e._tag === "Die" && e.defect === r) ? t.orElse() : Eo(e));
|
|
257
|
+
}), jo = /*#__PURE__*/ B((e) => _o(e[0]) && _o(e[1]), (e, t, n) => vo(no(So(e), So(t), n))), Mo = /*#__PURE__*/ B(2, (e, t) => e.channel.pipe(to((e) => t(e).channel), vo)), No = /*#__PURE__*/ B(2, (e, t) => vo(ro(e.channel, t))), Po = /*#__PURE__*/ B((e) => _o(e[0]), (e, t) => wo(() => {
|
|
258
|
+
let n = new TextDecoder(t?.encoding);
|
|
259
|
+
return Oo(e, (e) => n.decode(e, { stream: !0 }));
|
|
260
|
+
})), Fo = /*#__PURE__*/ B(2, (e, t) => vo(ao(e.channel, t))), Io = /*#__PURE__*/ B(2, (e, t) => vo(so(e.channel, t))), Lo = /*#__PURE__*/ B(2, (e, t) => co(e.channel, (e) => {
|
|
261
|
+
let n = 0;
|
|
262
|
+
return qr({
|
|
263
|
+
while: () => n < e.length,
|
|
264
|
+
body: () => t(e[n++]),
|
|
265
|
+
step: An
|
|
266
|
+
});
|
|
267
|
+
})), Ro = /*#__PURE__*/ B(2, (e, t) => co(e.channel, t)), zo = /*#__PURE__*/ B((e) => _o(e[0]), (e, t, n) => {
|
|
268
|
+
let r, i, a = Qi(!1);
|
|
269
|
+
return new ReadableStream({
|
|
270
|
+
start(n) {
|
|
271
|
+
i = b(wt(Ro(e, (e) => a.whenOpen(Le(() => {
|
|
272
|
+
a.closeUnsafe();
|
|
273
|
+
for (let t = 0; t < e.length; t++) n.enqueue(e[t]);
|
|
274
|
+
r(), r = void 0;
|
|
275
|
+
}))), t)), i.addObserver((e) => {
|
|
276
|
+
e._tag === "Failure" ? n.error(Ke(e.cause)) : n.close();
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
pull() {
|
|
280
|
+
return new Promise((e) => {
|
|
281
|
+
r = e, a.openUnsafe();
|
|
282
|
+
});
|
|
283
|
+
},
|
|
284
|
+
cancel() {
|
|
285
|
+
if (i) return Ht(Un(Xi(i)));
|
|
286
|
+
}
|
|
287
|
+
}, n?.strategy);
|
|
288
|
+
}), Bo = /*#__PURE__*/ B((e) => _o(e[0]), (e, t) => ct(gn(), (n) => zo(e, n, t))), Vo = /*#__PURE__*/ B(2, (e, t) => e === void 0 ? void 0 : t(e)), Ho = 0;
|
|
289
|
+
function Uo() {
|
|
290
|
+
qi((e) => {
|
|
291
|
+
if (!r) return;
|
|
292
|
+
let t = document.querySelectorAll("[data-reka-focus-guard]");
|
|
293
|
+
document.body.insertAdjacentElement("afterbegin", t[0] ?? Wo()), document.body.insertAdjacentElement("beforeend", t[1] ?? Wo()), Ho++, e(() => {
|
|
294
|
+
Ho === 1 && document.querySelectorAll("[data-reka-focus-guard]").forEach((e) => e.remove()), Ho--;
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
function Wo() {
|
|
299
|
+
let e = document.createElement("span");
|
|
300
|
+
return e.setAttribute("data-reka-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
301
|
+
}
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.6.0-rc.10_typescript-native-bridge@6.0.3-bridge.18.tsgo.7.0.2_/node_modules/reka-ui/dist/shared/useForwardPropsEmits.js
|
|
304
|
+
function Go(e, t) {
|
|
305
|
+
let n = o(e), r = t ? a(t) : {};
|
|
306
|
+
return K(() => ({
|
|
307
|
+
...n.value,
|
|
308
|
+
...r
|
|
309
|
+
}));
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.6.0-rc.10_typescript-native-bridge@6.0.3-bridge.18.tsgo.7.0.2_/node_modules/reka-ui/dist/shared/useSize.js
|
|
313
|
+
function Ko(e) {
|
|
314
|
+
let t = zi(), n = K(() => t.value?.width ?? 0), r = K(() => t.value?.height ?? 0), a;
|
|
315
|
+
return Ki(() => {
|
|
316
|
+
let n = i(e);
|
|
317
|
+
n ? (t.value = {
|
|
318
|
+
width: n.offsetWidth,
|
|
319
|
+
height: n.offsetHeight
|
|
320
|
+
}, a = new ResizeObserver((e) => {
|
|
321
|
+
if (!Array.isArray(e) || !e.length) return;
|
|
322
|
+
let r = e[0], i, a;
|
|
323
|
+
if ("borderBoxSize" in r) {
|
|
324
|
+
let e = r.borderBoxSize, t = Array.isArray(e) ? e[0] : e;
|
|
325
|
+
i = t.inlineSize, a = t.blockSize;
|
|
326
|
+
} else i = n.offsetWidth, a = n.offsetHeight;
|
|
327
|
+
t.value = {
|
|
328
|
+
width: i,
|
|
329
|
+
height: a
|
|
330
|
+
};
|
|
331
|
+
}), a.observe(n, { box: "border-box" })) : t.value = void 0;
|
|
332
|
+
}), Hi(() => {
|
|
333
|
+
a?.disconnect(), a = void 0;
|
|
334
|
+
}), {
|
|
335
|
+
width: n,
|
|
336
|
+
height: r
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.6.0-rc.10_typescript-native-bridge@6.0.3-bridge.18.tsgo.7.0.2_/node_modules/reka-ui/dist/Popper/PopperRoot.js
|
|
341
|
+
var [qo, Jo] = /*#__PURE__*/ n("PopperRoot"), Yo = /* @__PURE__ */ Ai({
|
|
342
|
+
inheritAttrs: !1,
|
|
343
|
+
__name: "PopperRoot",
|
|
344
|
+
setup(e) {
|
|
345
|
+
let t = zi();
|
|
346
|
+
return Jo({
|
|
347
|
+
anchor: t,
|
|
348
|
+
onAnchorChange: (e) => t.value = e
|
|
349
|
+
}), (e, t) => Ni(e.$slots, "default");
|
|
350
|
+
}
|
|
351
|
+
}), Xo = /* @__PURE__ */ Ai({
|
|
352
|
+
__name: "PopperAnchor",
|
|
353
|
+
props: {
|
|
354
|
+
reference: {
|
|
355
|
+
type: null,
|
|
356
|
+
required: !1
|
|
357
|
+
},
|
|
358
|
+
asChild: {
|
|
359
|
+
type: Boolean,
|
|
360
|
+
required: !1
|
|
361
|
+
},
|
|
362
|
+
as: {
|
|
363
|
+
type: null,
|
|
364
|
+
required: !1
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
setup(n) {
|
|
368
|
+
let r = n, { forwardRef: i, currentElement: a } = e(), o = qo();
|
|
369
|
+
return Pi(() => {
|
|
370
|
+
o.onAnchorChange(r.reference ?? a.value);
|
|
371
|
+
}), (e, n) => (Ri(), Di(G(t), {
|
|
372
|
+
ref: G(i),
|
|
373
|
+
as: e.as,
|
|
374
|
+
"as-child": e.asChild
|
|
375
|
+
}, {
|
|
376
|
+
default: Mi(() => [Ni(e.$slots, "default")]),
|
|
377
|
+
_: 3
|
|
378
|
+
}, 8, ["as", "as-child"]));
|
|
379
|
+
}
|
|
380
|
+
}), Zo = {
|
|
381
|
+
key: 0,
|
|
382
|
+
d: "M0 0L6 6L12 0"
|
|
383
|
+
}, Qo = {
|
|
384
|
+
key: 1,
|
|
385
|
+
d: "M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"
|
|
386
|
+
}, $o = /* @__PURE__ */ Ai({
|
|
387
|
+
__name: "Arrow",
|
|
388
|
+
props: {
|
|
389
|
+
width: {
|
|
390
|
+
type: Number,
|
|
391
|
+
required: !1,
|
|
392
|
+
default: 10
|
|
393
|
+
},
|
|
394
|
+
height: {
|
|
395
|
+
type: Number,
|
|
396
|
+
required: !1,
|
|
397
|
+
default: 5
|
|
398
|
+
},
|
|
399
|
+
rounded: {
|
|
400
|
+
type: Boolean,
|
|
401
|
+
required: !1
|
|
402
|
+
},
|
|
403
|
+
asChild: {
|
|
404
|
+
type: Boolean,
|
|
405
|
+
required: !1
|
|
406
|
+
},
|
|
407
|
+
as: {
|
|
408
|
+
type: null,
|
|
409
|
+
required: !1,
|
|
410
|
+
default: "svg"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
setup(n) {
|
|
414
|
+
let r = n;
|
|
415
|
+
return e(), (e, n) => (Ri(), Di(G(t), Ei(r, {
|
|
416
|
+
width: e.width,
|
|
417
|
+
height: e.height,
|
|
418
|
+
viewBox: e.asChild ? void 0 : "0 0 12 6",
|
|
419
|
+
preserveAspectRatio: e.asChild ? void 0 : "none"
|
|
420
|
+
}), {
|
|
421
|
+
default: Mi(() => [Ni(e.$slots, "default", {}, () => [e.rounded ? (Ri(), ji("path", Qo)) : (Ri(), ji("path", Zo))])]),
|
|
422
|
+
_: 3
|
|
423
|
+
}, 16, [
|
|
424
|
+
"width",
|
|
425
|
+
"height",
|
|
426
|
+
"viewBox",
|
|
427
|
+
"preserveAspectRatio"
|
|
428
|
+
]));
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.6.0-rc.10_typescript-native-bridge@6.0.3-bridge.18.tsgo.7.0.2_/node_modules/reka-ui/dist/Popper/utils.js
|
|
433
|
+
function es(e) {
|
|
434
|
+
return e !== null;
|
|
435
|
+
}
|
|
436
|
+
function ts(e) {
|
|
437
|
+
return {
|
|
438
|
+
name: "transformOrigin",
|
|
439
|
+
options: e,
|
|
440
|
+
fn(t) {
|
|
441
|
+
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = ns(n), u = {
|
|
442
|
+
start: e.dir === "rtl" ? "100%" : "0%",
|
|
443
|
+
center: "50%",
|
|
444
|
+
end: e.dir === "rtl" ? "0%" : "100%"
|
|
445
|
+
}[l], d = {
|
|
446
|
+
start: "0%",
|
|
447
|
+
center: "50%",
|
|
448
|
+
end: "100%"
|
|
449
|
+
}[l], f = (i.arrow?.x ?? 0) + o / 2, p = (i.arrow?.y ?? 0) + s / 2, m = "", h = "";
|
|
450
|
+
return c === "bottom" ? (m = a ? u : `${f}px`, h = `${-s}px`) : c === "top" ? (m = a ? u : `${f}px`, h = `${r.floating.height + s}px`) : c === "right" ? (m = `${-s}px`, h = a ? d : `${p}px`) : c === "left" && (m = `${r.floating.width + s}px`, h = a ? d : `${p}px`), { data: {
|
|
451
|
+
x: m,
|
|
452
|
+
y: h
|
|
453
|
+
} };
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
function ns(e) {
|
|
458
|
+
let [t, n = "center"] = e.split("-");
|
|
459
|
+
return [t, n];
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
463
|
+
var rs = [
|
|
464
|
+
"top",
|
|
465
|
+
"right",
|
|
466
|
+
"bottom",
|
|
467
|
+
"left"
|
|
468
|
+
], is = ["start", "end"], as = /*#__PURE__*/ rs.reduce((e, t) => e.concat(t, t + "-" + is[0], t + "-" + is[1]), []), os = Math.min, ss = Math.max, cs = Math.round, ls = Math.floor, us = (e) => ({
|
|
469
|
+
x: e,
|
|
470
|
+
y: e
|
|
471
|
+
}), ds = {
|
|
472
|
+
left: "right",
|
|
473
|
+
right: "left",
|
|
474
|
+
bottom: "top",
|
|
475
|
+
top: "bottom"
|
|
476
|
+
};
|
|
477
|
+
function fs(e, t, n) {
|
|
478
|
+
return ss(e, os(t, n));
|
|
479
|
+
}
|
|
480
|
+
function ps(e, t) {
|
|
481
|
+
return typeof e == "function" ? e(t) : e;
|
|
482
|
+
}
|
|
483
|
+
function ms(e) {
|
|
484
|
+
return e.split("-")[0];
|
|
485
|
+
}
|
|
486
|
+
function hs(e) {
|
|
487
|
+
return e.split("-")[1];
|
|
488
|
+
}
|
|
489
|
+
function gs(e) {
|
|
490
|
+
return e === "x" ? "y" : "x";
|
|
491
|
+
}
|
|
492
|
+
function _s(e) {
|
|
493
|
+
return e === "y" ? "height" : "width";
|
|
494
|
+
}
|
|
495
|
+
function vs(e) {
|
|
496
|
+
let t = e[0];
|
|
497
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
498
|
+
}
|
|
499
|
+
function ys(e) {
|
|
500
|
+
return gs(vs(e));
|
|
501
|
+
}
|
|
502
|
+
function bs(e, t, n) {
|
|
503
|
+
n === void 0 && (n = !1);
|
|
504
|
+
let r = hs(e), i = ys(e), a = _s(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
505
|
+
return t.reference[a] > t.floating[a] && (o = ks(o)), [o, ks(o)];
|
|
506
|
+
}
|
|
507
|
+
function xs(e) {
|
|
508
|
+
let t = ks(e);
|
|
509
|
+
return [
|
|
510
|
+
Ss(e),
|
|
511
|
+
t,
|
|
512
|
+
Ss(t)
|
|
513
|
+
];
|
|
514
|
+
}
|
|
515
|
+
function Ss(e) {
|
|
516
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
517
|
+
}
|
|
518
|
+
var Cs = ["left", "right"], ws = ["right", "left"], Ts = ["top", "bottom"], Es = ["bottom", "top"];
|
|
519
|
+
function Ds(e, t, n) {
|
|
520
|
+
switch (e) {
|
|
521
|
+
case "top":
|
|
522
|
+
case "bottom": return n ? t ? ws : Cs : t ? Cs : ws;
|
|
523
|
+
case "left":
|
|
524
|
+
case "right": return t ? Ts : Es;
|
|
525
|
+
default: return [];
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
function Os(e, t, n, r) {
|
|
529
|
+
let i = hs(e), a = Ds(ms(e), n === "start", r);
|
|
530
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Ss)))), a;
|
|
531
|
+
}
|
|
532
|
+
function ks(e) {
|
|
533
|
+
let t = ms(e);
|
|
534
|
+
return ds[t] + e.slice(t.length);
|
|
535
|
+
}
|
|
536
|
+
function As(e) {
|
|
537
|
+
return {
|
|
538
|
+
top: e.top ?? 0,
|
|
539
|
+
right: e.right ?? 0,
|
|
540
|
+
bottom: e.bottom ?? 0,
|
|
541
|
+
left: e.left ?? 0
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
function js(e) {
|
|
545
|
+
return typeof e == "number" ? {
|
|
546
|
+
top: e,
|
|
547
|
+
right: e,
|
|
548
|
+
bottom: e,
|
|
549
|
+
left: e
|
|
550
|
+
} : As(e);
|
|
551
|
+
}
|
|
552
|
+
function Ms(e) {
|
|
553
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
554
|
+
return {
|
|
555
|
+
width: r,
|
|
556
|
+
height: i,
|
|
557
|
+
top: n,
|
|
558
|
+
left: t,
|
|
559
|
+
right: t + r,
|
|
560
|
+
bottom: n + i,
|
|
561
|
+
x: t,
|
|
562
|
+
y: n
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
567
|
+
function Ns(e, t, n) {
|
|
568
|
+
let { reference: r, floating: i } = e, a = vs(t), o = ys(t), s = _s(o), c = ms(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
569
|
+
switch (c) {
|
|
570
|
+
case "top":
|
|
571
|
+
p = {
|
|
572
|
+
x: u,
|
|
573
|
+
y: r.y - i.height
|
|
574
|
+
};
|
|
575
|
+
break;
|
|
576
|
+
case "bottom":
|
|
577
|
+
p = {
|
|
578
|
+
x: u,
|
|
579
|
+
y: r.y + r.height
|
|
580
|
+
};
|
|
581
|
+
break;
|
|
582
|
+
case "right":
|
|
583
|
+
p = {
|
|
584
|
+
x: r.x + r.width,
|
|
585
|
+
y: d
|
|
586
|
+
};
|
|
587
|
+
break;
|
|
588
|
+
case "left":
|
|
589
|
+
p = {
|
|
590
|
+
x: r.x - i.width,
|
|
591
|
+
y: d
|
|
592
|
+
};
|
|
593
|
+
break;
|
|
594
|
+
default: p = {
|
|
595
|
+
x: r.x,
|
|
596
|
+
y: r.y
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
let m = hs(t);
|
|
600
|
+
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
601
|
+
}
|
|
602
|
+
async function Ps(e, t) {
|
|
603
|
+
t === void 0 && (t = {});
|
|
604
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = ps(t, e), p = js(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Ms(await i.getClippingRect({
|
|
605
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
606
|
+
boundary: c,
|
|
607
|
+
rootBoundary: l,
|
|
608
|
+
strategy: s
|
|
609
|
+
})), g = u === "floating" ? {
|
|
610
|
+
x: n,
|
|
611
|
+
y: r,
|
|
612
|
+
width: a.floating.width,
|
|
613
|
+
height: a.floating.height
|
|
614
|
+
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
615
|
+
x: 1,
|
|
616
|
+
y: 1
|
|
617
|
+
}, y = Ms(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
618
|
+
elements: o,
|
|
619
|
+
rect: g,
|
|
620
|
+
offsetParent: _,
|
|
621
|
+
strategy: s
|
|
622
|
+
}) : g);
|
|
623
|
+
return {
|
|
624
|
+
top: (h.top - y.top + p.top) / v.y,
|
|
625
|
+
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
626
|
+
left: (h.left - y.left + p.left) / v.x,
|
|
627
|
+
right: (y.right - h.right + p.right) / v.x
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
var Fs = 50, Is = async (e, t, n) => {
|
|
631
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
632
|
+
...o,
|
|
633
|
+
detectOverflow: Ps
|
|
634
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
635
|
+
reference: e,
|
|
636
|
+
floating: t,
|
|
637
|
+
strategy: i
|
|
638
|
+
}), { x: u, y: d } = Ns(l, r, c), f = r, p = 0, m = {};
|
|
639
|
+
for (let n = 0; n < a.length; n++) {
|
|
640
|
+
let h = a[n];
|
|
641
|
+
if (!h) continue;
|
|
642
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
643
|
+
x: u,
|
|
644
|
+
y: d,
|
|
645
|
+
initialPlacement: r,
|
|
646
|
+
placement: f,
|
|
647
|
+
strategy: i,
|
|
648
|
+
middlewareData: m,
|
|
649
|
+
rects: l,
|
|
650
|
+
platform: s,
|
|
651
|
+
elements: {
|
|
652
|
+
reference: e,
|
|
653
|
+
floating: t
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
657
|
+
...m[g],
|
|
658
|
+
...b
|
|
659
|
+
}, x && p < Fs && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
660
|
+
reference: e,
|
|
661
|
+
floating: t,
|
|
662
|
+
strategy: i
|
|
663
|
+
}) : x.rects), {x: u, y: d} = Ns(l, f, c)), n = -1);
|
|
664
|
+
}
|
|
665
|
+
return {
|
|
666
|
+
x: u,
|
|
667
|
+
y: d,
|
|
668
|
+
placement: f,
|
|
669
|
+
strategy: i,
|
|
670
|
+
middlewareData: m
|
|
671
|
+
};
|
|
672
|
+
}, Ls = (e) => ({
|
|
673
|
+
name: "arrow",
|
|
674
|
+
options: e,
|
|
675
|
+
async fn(t) {
|
|
676
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = ps(e, t) || {};
|
|
677
|
+
if (l == null) return {};
|
|
678
|
+
let d = js(u), f = {
|
|
679
|
+
x: n,
|
|
680
|
+
y: r
|
|
681
|
+
}, p = ys(i), m = _s(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
682
|
+
(!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
|
|
683
|
+
let ee = b / 2 - x / 2, w = C / 2 - h[m] / 2 - 1, te = os(d[_], w), ne = os(d[v], w), T = C - h[m] - ne, re = C / 2 - h[m] / 2 + ee, ie = fs(te, re, T), ae = !c.arrow && hs(i) != null && re !== ie && a.reference[m] / 2 - (re < te ? te : ne) - h[m] / 2 < 0, oe = ae ? re < te ? re - te : re - T : 0;
|
|
684
|
+
return {
|
|
685
|
+
[p]: f[p] + oe,
|
|
686
|
+
data: {
|
|
687
|
+
[p]: ie,
|
|
688
|
+
centerOffset: re - ie - oe,
|
|
689
|
+
...ae && { alignmentOffset: oe }
|
|
690
|
+
},
|
|
691
|
+
reset: ae
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
function Rs(e, t, n) {
|
|
696
|
+
return (e ? [...n.filter((t) => hs(t) === e), ...n.filter((t) => hs(t) !== e)] : n.filter((e) => ms(e) === e)).filter((n) => !e || hs(n) === e || (t ? Ss(n) !== n : !1));
|
|
697
|
+
}
|
|
698
|
+
var zs = function(e) {
|
|
699
|
+
return e === void 0 && (e = {}), {
|
|
700
|
+
name: "autoPlacement",
|
|
701
|
+
options: e,
|
|
702
|
+
async fn(t) {
|
|
703
|
+
let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, { crossAxis: s = !1, alignment: c, allowedPlacements: l = as, autoAlignment: u = !0, ...d } = ps(e, t), f = c !== void 0 || l === as ? Rs(c || null, u, l) : l, p = r.autoPlacement?.index || 0, m = f[p];
|
|
704
|
+
if (m == null) return {};
|
|
705
|
+
if (i !== m) return { reset: { placement: f[0] } };
|
|
706
|
+
let h = await a.detectOverflow(t, d), g = bs(m, n, await (a.isRTL == null ? void 0 : a.isRTL(o.floating))), _ = [
|
|
707
|
+
h[ms(m)],
|
|
708
|
+
h[g[0]],
|
|
709
|
+
h[g[1]]
|
|
710
|
+
], v = [...r.autoPlacement?.overflows || [], {
|
|
711
|
+
placement: m,
|
|
712
|
+
overflows: _
|
|
713
|
+
}], y = f[p + 1];
|
|
714
|
+
if (y) return {
|
|
715
|
+
data: {
|
|
716
|
+
index: p + 1,
|
|
717
|
+
overflows: v
|
|
718
|
+
},
|
|
719
|
+
reset: { placement: y }
|
|
720
|
+
};
|
|
721
|
+
let b = v.map((e) => {
|
|
722
|
+
let t = hs(e.placement);
|
|
723
|
+
return [
|
|
724
|
+
e.placement,
|
|
725
|
+
t && s ? e.overflows.slice(0, 2).reduce((e, t) => e + t, 0) : e.overflows[0],
|
|
726
|
+
e.overflows
|
|
727
|
+
];
|
|
728
|
+
}).sort((e, t) => e[1] - t[1]), x = b.filter((e) => e[2].slice(0, hs(e[0]) ? 2 : 3).every((e) => e <= 0))[0]?.[0] || b[0][0];
|
|
729
|
+
return x === i ? {} : {
|
|
730
|
+
data: {
|
|
731
|
+
index: p + 1,
|
|
732
|
+
overflows: v
|
|
733
|
+
},
|
|
734
|
+
reset: { placement: x }
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
}, Bs = function(e) {
|
|
739
|
+
return e === void 0 && (e = {}), {
|
|
740
|
+
name: "flip",
|
|
741
|
+
options: e,
|
|
742
|
+
async fn(t) {
|
|
743
|
+
var n;
|
|
744
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = ps(e, t);
|
|
745
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
746
|
+
let g = ms(r), _ = vs(o), v = ms(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [ks(o)] : xs(o)), x = p !== "none";
|
|
747
|
+
!d && x && b.push(...Os(o, m, p, y));
|
|
748
|
+
let S = [o, ...b], C = await s.detectOverflow(t, h), ee = [], w = i.flip?.overflows || [];
|
|
749
|
+
if (l && ee.push(C[g]), u) {
|
|
750
|
+
let e = bs(r, a, y);
|
|
751
|
+
ee.push(C[e[0]], C[e[1]]);
|
|
752
|
+
}
|
|
753
|
+
if (w = [...w, {
|
|
754
|
+
placement: r,
|
|
755
|
+
overflows: ee
|
|
756
|
+
}], !ee.every((e) => e <= 0)) {
|
|
757
|
+
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
758
|
+
if (t && (u !== "alignment" || _ === vs(t) || w.every((e) => vs(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
759
|
+
data: {
|
|
760
|
+
index: e,
|
|
761
|
+
overflows: w
|
|
762
|
+
},
|
|
763
|
+
reset: { placement: t }
|
|
764
|
+
};
|
|
765
|
+
let n = w.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
766
|
+
if (!n) switch (f) {
|
|
767
|
+
case "bestFit": {
|
|
768
|
+
let e = w.filter((e) => {
|
|
769
|
+
if (x) {
|
|
770
|
+
let t = vs(e.placement);
|
|
771
|
+
return t === _ || t === "y";
|
|
772
|
+
}
|
|
773
|
+
return !0;
|
|
774
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
775
|
+
e && (n = e);
|
|
776
|
+
break;
|
|
777
|
+
}
|
|
778
|
+
case "initialPlacement": n = o;
|
|
779
|
+
}
|
|
780
|
+
if (r !== n) return { reset: { placement: n } };
|
|
781
|
+
}
|
|
782
|
+
return {};
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
};
|
|
786
|
+
function Vs(e, t) {
|
|
787
|
+
return {
|
|
788
|
+
top: e.top - t.height,
|
|
789
|
+
right: e.right - t.width,
|
|
790
|
+
bottom: e.bottom - t.height,
|
|
791
|
+
left: e.left - t.width
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
function Hs(e) {
|
|
795
|
+
return rs.some((t) => e[t] >= 0);
|
|
796
|
+
}
|
|
797
|
+
var Us = function(e) {
|
|
798
|
+
return e === void 0 && (e = {}), {
|
|
799
|
+
name: "hide",
|
|
800
|
+
options: e,
|
|
801
|
+
async fn(t) {
|
|
802
|
+
let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = ps(e, t);
|
|
803
|
+
switch (i) {
|
|
804
|
+
case "referenceHidden": {
|
|
805
|
+
let e = Vs(await r.detectOverflow(t, {
|
|
806
|
+
...a,
|
|
807
|
+
elementContext: "reference"
|
|
808
|
+
}), n.reference);
|
|
809
|
+
return { data: {
|
|
810
|
+
referenceHiddenOffsets: e,
|
|
811
|
+
referenceHidden: Hs(e)
|
|
812
|
+
} };
|
|
813
|
+
}
|
|
814
|
+
case "escaped": {
|
|
815
|
+
let e = Vs(await r.detectOverflow(t, {
|
|
816
|
+
...a,
|
|
817
|
+
altBoundary: !0
|
|
818
|
+
}), n.floating);
|
|
819
|
+
return { data: {
|
|
820
|
+
escapedOffsets: e,
|
|
821
|
+
escaped: Hs(e)
|
|
822
|
+
} };
|
|
823
|
+
}
|
|
824
|
+
default: return {};
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
function Ws(e) {
|
|
830
|
+
let t = os(...e.map((e) => e.left)), n = os(...e.map((e) => e.top)), r = ss(...e.map((e) => e.right)), i = ss(...e.map((e) => e.bottom));
|
|
831
|
+
return {
|
|
832
|
+
x: t,
|
|
833
|
+
y: n,
|
|
834
|
+
width: r - t,
|
|
835
|
+
height: i - n
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
function Gs(e) {
|
|
839
|
+
let t = e.slice().sort((e, t) => e.y - t.y), n = [], r = null;
|
|
840
|
+
for (let e = 0; e < t.length; e++) {
|
|
841
|
+
let i = t[e];
|
|
842
|
+
!r || i.y - r.y > r.height / 2 ? n.push([i]) : n[n.length - 1].push(i), r = i;
|
|
843
|
+
}
|
|
844
|
+
return n.map((e) => Ms(Ws(e)));
|
|
845
|
+
}
|
|
846
|
+
var Ks = function(e) {
|
|
847
|
+
return e === void 0 && (e = {}), {
|
|
848
|
+
name: "inline",
|
|
849
|
+
options: e,
|
|
850
|
+
async fn(t) {
|
|
851
|
+
let { placement: n, elements: r, rects: i, platform: a, strategy: o } = t, { padding: s = 2, x: c, y: l } = ps(e, t), u = Array.from(await (a.getClientRects == null ? void 0 : a.getClientRects(r.reference)) || []);
|
|
852
|
+
if (!u.length) return {};
|
|
853
|
+
let d = Gs(u), f = Ms(Ws(u)), p = js(s);
|
|
854
|
+
function m() {
|
|
855
|
+
if (d.length === 2 && (d[0].left > d[1].right || d[1].left > d[0].right) && c != null && l != null) return d.find((e) => c > e.left - p.left && c < e.right + p.right && l > e.top - p.top && l < e.bottom + p.bottom) || f;
|
|
856
|
+
if (d.length >= 2) {
|
|
857
|
+
if (vs(n) === "y") {
|
|
858
|
+
let e = d[0], t = d[d.length - 1], r = ms(n) === "top", i = e.top, a = t.bottom, o = r ? e.left : t.left;
|
|
859
|
+
return Ms({
|
|
860
|
+
x: o,
|
|
861
|
+
y: i,
|
|
862
|
+
width: (r ? e.right : t.right) - o,
|
|
863
|
+
height: a - i
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
let e = ms(n) === "left", t = ss(...d.map((e) => e.right)), r = os(...d.map((e) => e.left)), i = d.filter((n) => e ? n.left === r : n.right === t), a = i[0].top, o = i[i.length - 1].bottom;
|
|
867
|
+
return Ms({
|
|
868
|
+
x: r,
|
|
869
|
+
y: a,
|
|
870
|
+
width: t - r,
|
|
871
|
+
height: o - a
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
return f;
|
|
875
|
+
}
|
|
876
|
+
let h = await a.getElementRects({
|
|
877
|
+
reference: { getBoundingClientRect: m },
|
|
878
|
+
floating: r.floating,
|
|
879
|
+
strategy: o
|
|
880
|
+
});
|
|
881
|
+
return i.reference.x !== h.reference.x || i.reference.y !== h.reference.y || i.reference.width !== h.reference.width || i.reference.height !== h.reference.height ? { reset: { rects: h } } : {};
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
}, qs = /*#__PURE__*/ new Set(["left", "top"]);
|
|
885
|
+
async function Js(e, t) {
|
|
886
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = ms(n), s = hs(n), c = vs(n) === "y", l = qs.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = ps(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
887
|
+
mainAxis: d,
|
|
888
|
+
crossAxis: 0,
|
|
889
|
+
alignmentAxis: null
|
|
890
|
+
} : {
|
|
891
|
+
mainAxis: d.mainAxis || 0,
|
|
892
|
+
crossAxis: d.crossAxis || 0,
|
|
893
|
+
alignmentAxis: d.alignmentAxis
|
|
894
|
+
};
|
|
895
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
896
|
+
x: p * u,
|
|
897
|
+
y: f * l
|
|
898
|
+
} : {
|
|
899
|
+
x: f * l,
|
|
900
|
+
y: p * u
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
var Ys = function(e) {
|
|
904
|
+
return e === void 0 && (e = 0), {
|
|
905
|
+
name: "offset",
|
|
906
|
+
options: e,
|
|
907
|
+
async fn(t) {
|
|
908
|
+
var n;
|
|
909
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Js(t, e);
|
|
910
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
911
|
+
x: r + s.x,
|
|
912
|
+
y: i + s.y,
|
|
913
|
+
data: {
|
|
914
|
+
...s,
|
|
915
|
+
placement: a
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
};
|
|
920
|
+
}, Xs = function(e) {
|
|
921
|
+
return e === void 0 && (e = {}), {
|
|
922
|
+
name: "shift",
|
|
923
|
+
options: e,
|
|
924
|
+
async fn(t) {
|
|
925
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
926
|
+
let { x: t, y: n } = e;
|
|
927
|
+
return {
|
|
928
|
+
x: t,
|
|
929
|
+
y: n
|
|
930
|
+
};
|
|
931
|
+
} }, ...l } = ps(e, t), u = {
|
|
932
|
+
x: n,
|
|
933
|
+
y: r
|
|
934
|
+
}, d = await a.detectOverflow(t, l), f = vs(i), p = gs(f), m = u[p], h = u[f], g = (e, t) => fs(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
935
|
+
o && (m = g(p, m)), s && (h = g(f, h));
|
|
936
|
+
let _ = c.fn({
|
|
937
|
+
...t,
|
|
938
|
+
[p]: m,
|
|
939
|
+
[f]: h
|
|
940
|
+
});
|
|
941
|
+
return {
|
|
942
|
+
..._,
|
|
943
|
+
data: {
|
|
944
|
+
x: _.x - n,
|
|
945
|
+
y: _.y - r,
|
|
946
|
+
enabled: {
|
|
947
|
+
[p]: o,
|
|
948
|
+
[f]: s
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
}, Zs = function(e) {
|
|
955
|
+
return e === void 0 && (e = {}), {
|
|
956
|
+
options: e,
|
|
957
|
+
fn(t) {
|
|
958
|
+
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = ps(e, t), u = {
|
|
959
|
+
x: n,
|
|
960
|
+
y: r
|
|
961
|
+
}, d = vs(i), f = gs(d), p = u[f], m = u[d], h = ps(s, t), g = typeof h == "number" ? {
|
|
962
|
+
mainAxis: h,
|
|
963
|
+
crossAxis: 0
|
|
964
|
+
} : {
|
|
965
|
+
mainAxis: h.mainAxis ?? 0,
|
|
966
|
+
crossAxis: h.crossAxis ?? 0
|
|
967
|
+
};
|
|
968
|
+
if (c) {
|
|
969
|
+
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
|
|
970
|
+
p < t ? p = t : p > n && (p = n);
|
|
971
|
+
}
|
|
972
|
+
if (l) {
|
|
973
|
+
let e = f === "y" ? "width" : "height", t = qs.has(ms(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
|
|
974
|
+
m < n ? m = n : m > r && (m = r);
|
|
975
|
+
}
|
|
976
|
+
return {
|
|
977
|
+
[f]: p,
|
|
978
|
+
[d]: m
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
};
|
|
982
|
+
}, Qs = function(e) {
|
|
983
|
+
return e === void 0 && (e = {}), {
|
|
984
|
+
name: "size",
|
|
985
|
+
options: e,
|
|
986
|
+
async fn(t) {
|
|
987
|
+
let { placement: n, rects: r, platform: i, elements: a } = t, { apply: o = () => {}, ...s } = ps(e, t), c = await i.detectOverflow(t, s), l = ms(n), u = hs(n), d = vs(n) === "y", { width: f, height: p } = r.floating, m, h;
|
|
988
|
+
l === "top" || l === "bottom" ? (m = l, h = u === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (h = l, m = u === "end" ? "top" : "bottom");
|
|
989
|
+
let g = p - c.top - c.bottom, _ = f - c.left - c.right, v = os(p - c[m], g), y = os(f - c[h], _), b = t.middlewareData.shift, x = !b, S = v, C = y;
|
|
990
|
+
b != null && b.enabled.x && (C = _), b != null && b.enabled.y && (S = g), x && !u && (d ? C = f - 2 * ss(c.left, c.right) : S = p - 2 * ss(c.top, c.bottom)), await o({
|
|
991
|
+
...t,
|
|
992
|
+
availableWidth: C,
|
|
993
|
+
availableHeight: S
|
|
994
|
+
});
|
|
995
|
+
let ee = await i.getDimensions(a.floating);
|
|
996
|
+
return f !== ee.width || p !== ee.height ? { reset: { rects: !0 } } : {};
|
|
997
|
+
}
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
//#endregion
|
|
1001
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
1002
|
+
function $s() {
|
|
1003
|
+
return typeof window < "u";
|
|
1004
|
+
}
|
|
1005
|
+
function ec(e) {
|
|
1006
|
+
return nc(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1007
|
+
}
|
|
1008
|
+
function q(e) {
|
|
1009
|
+
var t;
|
|
1010
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1011
|
+
}
|
|
1012
|
+
function tc(e) {
|
|
1013
|
+
return ((nc(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
1014
|
+
}
|
|
1015
|
+
function nc(e) {
|
|
1016
|
+
return $s() ? e instanceof Node || e instanceof q(e).Node : !1;
|
|
1017
|
+
}
|
|
1018
|
+
function rc(e) {
|
|
1019
|
+
return $s() ? e instanceof Element || e instanceof q(e).Element : !1;
|
|
1020
|
+
}
|
|
1021
|
+
function ic(e) {
|
|
1022
|
+
return $s() ? e instanceof HTMLElement || e instanceof q(e).HTMLElement : !1;
|
|
1023
|
+
}
|
|
1024
|
+
function ac(e) {
|
|
1025
|
+
return !$s() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
|
|
1026
|
+
}
|
|
1027
|
+
function oc(e) {
|
|
1028
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = _c(e);
|
|
1029
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
1030
|
+
}
|
|
1031
|
+
function sc(e) {
|
|
1032
|
+
return /^(table|td|th)$/.test(ec(e));
|
|
1033
|
+
}
|
|
1034
|
+
function cc(e) {
|
|
1035
|
+
try {
|
|
1036
|
+
if (e.matches(":popover-open")) return !0;
|
|
1037
|
+
} catch {}
|
|
1038
|
+
try {
|
|
1039
|
+
return e.matches(":modal");
|
|
1040
|
+
} catch {
|
|
1041
|
+
return !1;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
var lc = /transform|translate|scale|rotate|perspective|filter/, uc = /paint|layout|strict|content/, dc = (e) => !!e && e !== "none", fc;
|
|
1045
|
+
function pc(e) {
|
|
1046
|
+
let t = rc(e) ? _c(e) : e;
|
|
1047
|
+
return dc(t.transform) || dc(t.translate) || dc(t.scale) || dc(t.rotate) || dc(t.perspective) || !hc() && (dc(t.backdropFilter) || dc(t.filter)) || lc.test(t.willChange || "") || uc.test(t.contain || "");
|
|
1048
|
+
}
|
|
1049
|
+
function mc(e) {
|
|
1050
|
+
let t = yc(e);
|
|
1051
|
+
for (; ic(t) && !gc(t);) {
|
|
1052
|
+
if (pc(t)) return t;
|
|
1053
|
+
if (cc(t)) return null;
|
|
1054
|
+
t = yc(t);
|
|
1055
|
+
}
|
|
1056
|
+
return null;
|
|
1057
|
+
}
|
|
1058
|
+
function hc() {
|
|
1059
|
+
return fc ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), fc;
|
|
1060
|
+
}
|
|
1061
|
+
function gc(e) {
|
|
1062
|
+
return /^(html|body|#document)$/.test(ec(e));
|
|
1063
|
+
}
|
|
1064
|
+
function _c(e) {
|
|
1065
|
+
return q(e).getComputedStyle(e);
|
|
1066
|
+
}
|
|
1067
|
+
function vc(e) {
|
|
1068
|
+
return rc(e) ? {
|
|
1069
|
+
scrollLeft: e.scrollLeft,
|
|
1070
|
+
scrollTop: e.scrollTop
|
|
1071
|
+
} : {
|
|
1072
|
+
scrollLeft: e.scrollX,
|
|
1073
|
+
scrollTop: e.scrollY
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1076
|
+
function yc(e) {
|
|
1077
|
+
if (ec(e) === "html") return e;
|
|
1078
|
+
let t = e.assignedSlot || e.parentNode || ac(e) && e.host || tc(e);
|
|
1079
|
+
return ac(t) ? t.host : t;
|
|
1080
|
+
}
|
|
1081
|
+
function bc(e) {
|
|
1082
|
+
let t = yc(e);
|
|
1083
|
+
return gc(t) ? (e.ownerDocument || e).body : ic(t) && oc(t) ? t : bc(t);
|
|
1084
|
+
}
|
|
1085
|
+
function xc(e, t, n) {
|
|
1086
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1087
|
+
let r = bc(e), i = r === e.ownerDocument?.body, a = q(r);
|
|
1088
|
+
if (i) {
|
|
1089
|
+
let e = Sc(a);
|
|
1090
|
+
return t.concat(a, a.visualViewport || [], oc(r) ? r : [], e && n ? xc(e) : []);
|
|
1091
|
+
}
|
|
1092
|
+
return t.concat(r, xc(r, [], n));
|
|
1093
|
+
}
|
|
1094
|
+
function Sc(e) {
|
|
1095
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1096
|
+
}
|
|
1097
|
+
//#endregion
|
|
1098
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
1099
|
+
function Cc(e) {
|
|
1100
|
+
let t = _c(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = ic(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = cs(n) !== a || cs(r) !== o;
|
|
1101
|
+
return s && (n = a, r = o), {
|
|
1102
|
+
width: n,
|
|
1103
|
+
height: r,
|
|
1104
|
+
$: s
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
function wc(e) {
|
|
1108
|
+
return rc(e) ? e : e.contextElement;
|
|
1109
|
+
}
|
|
1110
|
+
function Tc(e) {
|
|
1111
|
+
let t = wc(e);
|
|
1112
|
+
if (!ic(t)) return us(1);
|
|
1113
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Cc(t), o = (a ? cs(n.width) : n.width) / r, s = (a ? cs(n.height) : n.height) / i;
|
|
1114
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
1115
|
+
x: o,
|
|
1116
|
+
y: s
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
var Ec = /*#__PURE__*/ us(0);
|
|
1120
|
+
function Dc(e) {
|
|
1121
|
+
let t = q(e);
|
|
1122
|
+
return !hc() || !t.visualViewport ? Ec : {
|
|
1123
|
+
x: t.visualViewport.offsetLeft,
|
|
1124
|
+
y: t.visualViewport.offsetTop
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
function Oc(e, t, n) {
|
|
1128
|
+
return t === void 0 && (t = !1), !!n && t && n === q(e);
|
|
1129
|
+
}
|
|
1130
|
+
function kc(e, t, n, r) {
|
|
1131
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1132
|
+
let i = e.getBoundingClientRect(), a = wc(e), o = us(1);
|
|
1133
|
+
t && (r ? rc(r) && (o = Tc(r)) : o = Tc(e));
|
|
1134
|
+
let s = Oc(a, n, r) ? Dc(a) : us(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
1135
|
+
if (a && r) {
|
|
1136
|
+
let e = q(a), t = rc(r) ? q(r) : r, n = e, i = Sc(n);
|
|
1137
|
+
for (; i && t !== n;) {
|
|
1138
|
+
let e = Tc(i), t = i.getBoundingClientRect(), r = _c(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
1139
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = q(i), i = Sc(n);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
return Ms({
|
|
1143
|
+
width: u,
|
|
1144
|
+
height: d,
|
|
1145
|
+
x: c,
|
|
1146
|
+
y: l
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
function Ac(e, t) {
|
|
1150
|
+
let n = vc(e).scrollLeft;
|
|
1151
|
+
return t ? t.left + n : kc(tc(e)).left + n;
|
|
1152
|
+
}
|
|
1153
|
+
function jc(e, t) {
|
|
1154
|
+
let n = e.getBoundingClientRect();
|
|
1155
|
+
return {
|
|
1156
|
+
x: n.left + t.scrollLeft - Ac(e, n),
|
|
1157
|
+
y: n.top + t.scrollTop
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
function Mc(e) {
|
|
1161
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = tc(r), s = t ? cc(t.floating) : !1;
|
|
1162
|
+
if (r === o || s && a) return n;
|
|
1163
|
+
let c = {
|
|
1164
|
+
scrollLeft: 0,
|
|
1165
|
+
scrollTop: 0
|
|
1166
|
+
}, l = us(1), u = us(0), d = ic(r);
|
|
1167
|
+
if ((d || !a) && ((ec(r) !== "body" || oc(o)) && (c = vc(r)), d)) {
|
|
1168
|
+
let e = kc(r);
|
|
1169
|
+
l = Tc(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
1170
|
+
}
|
|
1171
|
+
let f = o && !d && !a ? jc(o, c) : us(0);
|
|
1172
|
+
return {
|
|
1173
|
+
width: n.width * l.x,
|
|
1174
|
+
height: n.height * l.y,
|
|
1175
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
1176
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
function Nc(e) {
|
|
1180
|
+
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
1181
|
+
}
|
|
1182
|
+
function Pc(e) {
|
|
1183
|
+
let t = vc(e), n = e.ownerDocument.body, r = ss(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = ss(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Ac(e), o = -t.scrollTop;
|
|
1184
|
+
return _c(n).direction === "rtl" && (a += ss(e.clientWidth, n.clientWidth) - r), {
|
|
1185
|
+
width: r,
|
|
1186
|
+
height: i,
|
|
1187
|
+
x: a,
|
|
1188
|
+
y: o
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
var Fc = 25;
|
|
1192
|
+
function Ic(e, t, n) {
|
|
1193
|
+
n === void 0 && (n = "viewport");
|
|
1194
|
+
let r = n === "layoutViewport", i = q(e), a = tc(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
1195
|
+
if (o) {
|
|
1196
|
+
let e = !hc() || t === "fixed";
|
|
1197
|
+
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
1198
|
+
}
|
|
1199
|
+
if (Ac(a) <= 0) {
|
|
1200
|
+
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
1201
|
+
o <= Fc && (s -= o);
|
|
1202
|
+
}
|
|
1203
|
+
return {
|
|
1204
|
+
width: s,
|
|
1205
|
+
height: c,
|
|
1206
|
+
x: l,
|
|
1207
|
+
y: u
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
function Lc(e, t) {
|
|
1211
|
+
let n = kc(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Tc(e);
|
|
1212
|
+
return {
|
|
1213
|
+
width: e.clientWidth * a.x,
|
|
1214
|
+
height: e.clientHeight * a.y,
|
|
1215
|
+
x: i * a.x,
|
|
1216
|
+
y: r * a.y
|
|
1217
|
+
};
|
|
1218
|
+
}
|
|
1219
|
+
function Rc(e, t, n) {
|
|
1220
|
+
let r;
|
|
1221
|
+
if (t === "viewport" || t === "layoutViewport") r = Ic(e, n, t);
|
|
1222
|
+
else if (t === "document") r = Pc(tc(e));
|
|
1223
|
+
else if (rc(t)) r = Lc(t, n);
|
|
1224
|
+
else {
|
|
1225
|
+
let n = Dc(e);
|
|
1226
|
+
r = {
|
|
1227
|
+
x: t.x - n.x,
|
|
1228
|
+
y: t.y - n.y,
|
|
1229
|
+
width: t.width,
|
|
1230
|
+
height: t.height
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
return Ms(r);
|
|
1234
|
+
}
|
|
1235
|
+
function zc(e, t) {
|
|
1236
|
+
let n = t.get(e);
|
|
1237
|
+
if (n) return n;
|
|
1238
|
+
let r = xc(e, [], !1).filter((e) => rc(e) && ec(e) !== "body"), i = null, a = _c(e).position === "fixed", o = a ? yc(e) : e;
|
|
1239
|
+
for (; rc(o) && !gc(o);) {
|
|
1240
|
+
let e = _c(o), t = pc(o), n = i ? i.position : a ? "fixed" : "";
|
|
1241
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = yc(o);
|
|
1242
|
+
}
|
|
1243
|
+
return t.set(e, r), r;
|
|
1244
|
+
}
|
|
1245
|
+
function Bc(e) {
|
|
1246
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? cc(t) ? [] : zc(t, this._c) : [].concat(n), r], o = Rc(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
1247
|
+
for (let e = 1; e < a.length; e++) {
|
|
1248
|
+
let n = Rc(t, a[e], i);
|
|
1249
|
+
s = ss(n.top, s), c = os(n.right, c), l = os(n.bottom, l), u = ss(n.left, u);
|
|
1250
|
+
}
|
|
1251
|
+
return {
|
|
1252
|
+
width: c - u,
|
|
1253
|
+
height: l - s,
|
|
1254
|
+
x: u,
|
|
1255
|
+
y: s
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
function Vc(e) {
|
|
1259
|
+
let { width: t, height: n } = Cc(e);
|
|
1260
|
+
return {
|
|
1261
|
+
width: t,
|
|
1262
|
+
height: n
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
function Hc(e, t, n) {
|
|
1266
|
+
let r = ic(t), i = tc(t), a = n === "fixed", o = kc(e, !0, a, t), s = {
|
|
1267
|
+
scrollLeft: 0,
|
|
1268
|
+
scrollTop: 0
|
|
1269
|
+
}, c = us(0);
|
|
1270
|
+
if ((r || !a) && ((ec(t) !== "body" || oc(i)) && (s = vc(t)), r)) {
|
|
1271
|
+
let e = kc(t, !0, a, t);
|
|
1272
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
1273
|
+
}
|
|
1274
|
+
!r && i && (c.x = Ac(i));
|
|
1275
|
+
let l = i && !r && !a ? jc(i, s) : us(0);
|
|
1276
|
+
return {
|
|
1277
|
+
x: o.left + s.scrollLeft - c.x - l.x,
|
|
1278
|
+
y: o.top + s.scrollTop - c.y - l.y,
|
|
1279
|
+
width: o.width,
|
|
1280
|
+
height: o.height
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
function Uc(e) {
|
|
1284
|
+
return _c(e).position === "static";
|
|
1285
|
+
}
|
|
1286
|
+
function Wc(e, t) {
|
|
1287
|
+
if (!ic(e) || _c(e).position === "fixed") return null;
|
|
1288
|
+
if (t) return t(e);
|
|
1289
|
+
let n = e.offsetParent;
|
|
1290
|
+
return tc(e) === n && (n = n.ownerDocument.body), n;
|
|
1291
|
+
}
|
|
1292
|
+
function Gc(e, t) {
|
|
1293
|
+
let n = q(e);
|
|
1294
|
+
if (cc(e)) return n;
|
|
1295
|
+
if (!ic(e)) {
|
|
1296
|
+
let t = yc(e);
|
|
1297
|
+
for (; t && !gc(t);) {
|
|
1298
|
+
if (rc(t) && !Uc(t)) return t;
|
|
1299
|
+
t = yc(t);
|
|
1300
|
+
}
|
|
1301
|
+
return n;
|
|
1302
|
+
}
|
|
1303
|
+
let r = Wc(e, t);
|
|
1304
|
+
for (; r && sc(r) && Uc(r);) r = Wc(r, t);
|
|
1305
|
+
return r && gc(r) && Uc(r) && !pc(r) ? n : r || mc(e) || n;
|
|
1306
|
+
}
|
|
1307
|
+
var Kc = async function(e) {
|
|
1308
|
+
let t = this.getOffsetParent || Gc, n = this.getDimensions, r = await n(e.floating);
|
|
1309
|
+
return {
|
|
1310
|
+
reference: Hc(e.reference, await t(e.floating), e.strategy),
|
|
1311
|
+
floating: {
|
|
1312
|
+
x: 0,
|
|
1313
|
+
y: 0,
|
|
1314
|
+
width: r.width,
|
|
1315
|
+
height: r.height
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
function qc(e) {
|
|
1320
|
+
return _c(e).direction === "rtl";
|
|
1321
|
+
}
|
|
1322
|
+
var Jc = {
|
|
1323
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Mc,
|
|
1324
|
+
getDocumentElement: tc,
|
|
1325
|
+
getClippingRect: Bc,
|
|
1326
|
+
getOffsetParent: Gc,
|
|
1327
|
+
getElementRects: Kc,
|
|
1328
|
+
getClientRects: Nc,
|
|
1329
|
+
getDimensions: Vc,
|
|
1330
|
+
getScale: Tc,
|
|
1331
|
+
isElement: rc,
|
|
1332
|
+
isRTL: qc
|
|
1333
|
+
};
|
|
1334
|
+
function Yc(e, t) {
|
|
1335
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1336
|
+
}
|
|
1337
|
+
function Xc(e, t, n) {
|
|
1338
|
+
let r = null, i, a = tc(e);
|
|
1339
|
+
function o() {
|
|
1340
|
+
var e;
|
|
1341
|
+
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
1342
|
+
}
|
|
1343
|
+
function s(n, c) {
|
|
1344
|
+
n === void 0 && (n = !1), c === void 0 && (c = 1), o();
|
|
1345
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
1346
|
+
if (n || t(), !f || !p) return;
|
|
1347
|
+
let m = ls(d), h = ls(a.clientWidth - (u + f)), g = ls(a.clientHeight - (d + p)), _ = ls(u), v = {
|
|
1348
|
+
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
1349
|
+
threshold: ss(0, os(1, c)) || 1
|
|
1350
|
+
}, y = !0;
|
|
1351
|
+
function b(t) {
|
|
1352
|
+
let n = t[0].intersectionRatio;
|
|
1353
|
+
if (!Yc(l, e.getBoundingClientRect())) return s();
|
|
1354
|
+
if (n !== c) {
|
|
1355
|
+
if (!y) return s();
|
|
1356
|
+
n ? s(!1, n) : i = setTimeout(() => {
|
|
1357
|
+
s(!1, 1e-7);
|
|
1358
|
+
}, 1e3);
|
|
1359
|
+
}
|
|
1360
|
+
y = !1;
|
|
1361
|
+
}
|
|
1362
|
+
try {
|
|
1363
|
+
r = new IntersectionObserver(b, {
|
|
1364
|
+
...v,
|
|
1365
|
+
root: a.ownerDocument
|
|
1366
|
+
});
|
|
1367
|
+
} catch {
|
|
1368
|
+
r = new IntersectionObserver(b, v);
|
|
1369
|
+
}
|
|
1370
|
+
r.observe(e);
|
|
1371
|
+
}
|
|
1372
|
+
let c = q(e), l = () => s(n);
|
|
1373
|
+
return c.addEventListener("resize", l), s(!0), () => {
|
|
1374
|
+
c.removeEventListener("resize", l), o();
|
|
1375
|
+
};
|
|
1376
|
+
}
|
|
1377
|
+
function Zc(e, t, n, r) {
|
|
1378
|
+
r === void 0 && (r = {});
|
|
1379
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = wc(e), u = i || a ? [...l ? xc(l) : [], ...t ? xc(t) : []] : [];
|
|
1380
|
+
u.forEach((e) => {
|
|
1381
|
+
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
1382
|
+
});
|
|
1383
|
+
let d = l && s ? Xc(l, n, a) : null, f = -1, p = null;
|
|
1384
|
+
o && (p = new ResizeObserver((e) => {
|
|
1385
|
+
let [r] = e;
|
|
1386
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
1387
|
+
var e;
|
|
1388
|
+
(e = p) == null || e.observe(t);
|
|
1389
|
+
})), n();
|
|
1390
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
1391
|
+
let m, h = c ? kc(e) : null;
|
|
1392
|
+
c && g();
|
|
1393
|
+
function g() {
|
|
1394
|
+
let t = kc(e);
|
|
1395
|
+
h && !Yc(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
1396
|
+
}
|
|
1397
|
+
return n(), () => {
|
|
1398
|
+
var e;
|
|
1399
|
+
u.forEach((e) => {
|
|
1400
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
1401
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
var Qc = Ys, $c = zs, el = Xs, tl = Bs, nl = Qs, rl = Us, il = Ls, al = Ks, ol = Zs, sl = (e, t, n) => {
|
|
1405
|
+
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
1406
|
+
...Jc,
|
|
1407
|
+
...i.platform,
|
|
1408
|
+
_c: r
|
|
1409
|
+
};
|
|
1410
|
+
return Is(e, t, {
|
|
1411
|
+
...i,
|
|
1412
|
+
platform: a
|
|
1413
|
+
});
|
|
1414
|
+
};
|
|
1415
|
+
//#endregion
|
|
1416
|
+
//#region ../../node_modules/.pnpm/@floating-ui+vue@1.1.11_vue@3.6.0-rc.10_typescript-native-bridge@6.0.3-bridge.18.tsgo.7.0.2_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
1417
|
+
function cl(e) {
|
|
1418
|
+
return typeof e == "object" && !!e && "$el" in e;
|
|
1419
|
+
}
|
|
1420
|
+
function ll(e) {
|
|
1421
|
+
if (cl(e)) {
|
|
1422
|
+
let t = e.$el;
|
|
1423
|
+
return nc(t) && ec(t) === "#comment" ? null : t;
|
|
1424
|
+
}
|
|
1425
|
+
return e;
|
|
1426
|
+
}
|
|
1427
|
+
function ul(e) {
|
|
1428
|
+
return typeof e == "function" ? e() : G(e);
|
|
1429
|
+
}
|
|
1430
|
+
function dl(e) {
|
|
1431
|
+
return {
|
|
1432
|
+
name: "arrow",
|
|
1433
|
+
options: e,
|
|
1434
|
+
fn(t) {
|
|
1435
|
+
let n = ll(ul(e.element));
|
|
1436
|
+
return n == null ? {} : il({
|
|
1437
|
+
element: n,
|
|
1438
|
+
padding: e.padding
|
|
1439
|
+
}).fn(t);
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
}
|
|
1443
|
+
function fl(e) {
|
|
1444
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1445
|
+
}
|
|
1446
|
+
function pl(e, t) {
|
|
1447
|
+
let n = fl(e);
|
|
1448
|
+
return Math.round(t * n) / n;
|
|
1449
|
+
}
|
|
1450
|
+
function ml(e, t, n) {
|
|
1451
|
+
n === void 0 && (n = {});
|
|
1452
|
+
let r = n.whileElementsMounted, i = K(() => ul(n.open) ?? !0), a = K(() => ul(n.middleware)), o = K(() => ul(n.placement) ?? "bottom"), s = K(() => ul(n.strategy) ?? "absolute"), c = K(() => ul(n.transform) ?? !0), l = K(() => ll(e.value)), u = K(() => ll(t.value)), d = zi(0), f = zi(0), p = zi(s.value), m = zi(o.value), h = Gi({}), g = zi(!1), _ = K(() => {
|
|
1453
|
+
let e = {
|
|
1454
|
+
position: p.value,
|
|
1455
|
+
left: "0",
|
|
1456
|
+
top: "0"
|
|
1457
|
+
};
|
|
1458
|
+
if (!u.value) return e;
|
|
1459
|
+
let t = pl(u.value, d.value), n = pl(u.value, f.value);
|
|
1460
|
+
return c.value ? {
|
|
1461
|
+
...e,
|
|
1462
|
+
transform: "translate(" + t + "px, " + n + "px)",
|
|
1463
|
+
...fl(u.value) >= 1.5 && { willChange: "transform" }
|
|
1464
|
+
} : {
|
|
1465
|
+
position: p.value,
|
|
1466
|
+
left: t + "px",
|
|
1467
|
+
top: n + "px"
|
|
1468
|
+
};
|
|
1469
|
+
}), v;
|
|
1470
|
+
function y() {
|
|
1471
|
+
if (l.value == null || u.value == null) return;
|
|
1472
|
+
let e = i.value;
|
|
1473
|
+
sl(l.value, u.value, {
|
|
1474
|
+
middleware: a.value,
|
|
1475
|
+
placement: o.value,
|
|
1476
|
+
strategy: s.value
|
|
1477
|
+
}).then((t) => {
|
|
1478
|
+
d.value = t.x, f.value = t.y, p.value = t.strategy, m.value = t.placement, h.value = t.middlewareData, g.value = e !== !1;
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
function b() {
|
|
1482
|
+
typeof v == "function" && (v(), v = void 0);
|
|
1483
|
+
}
|
|
1484
|
+
function x() {
|
|
1485
|
+
if (b(), r === void 0) {
|
|
1486
|
+
y();
|
|
1487
|
+
return;
|
|
1488
|
+
}
|
|
1489
|
+
if (l.value != null && u.value != null) {
|
|
1490
|
+
v = r(l.value, u.value, y);
|
|
1491
|
+
return;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
function S() {
|
|
1495
|
+
i.value || (g.value = !1);
|
|
1496
|
+
}
|
|
1497
|
+
return Oi([
|
|
1498
|
+
a,
|
|
1499
|
+
o,
|
|
1500
|
+
s,
|
|
1501
|
+
i
|
|
1502
|
+
], y, { flush: "sync" }), Oi([l, u], x, { flush: "sync" }), Oi(i, S, { flush: "sync" }), Ii() && Ti(b), {
|
|
1503
|
+
x: Vi(d),
|
|
1504
|
+
y: Vi(f),
|
|
1505
|
+
strategy: Vi(p),
|
|
1506
|
+
placement: Vi(m),
|
|
1507
|
+
middlewareData: Vi(h),
|
|
1508
|
+
isPositioned: Vi(g),
|
|
1509
|
+
floatingStyles: _,
|
|
1510
|
+
update: y
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
//#endregion
|
|
1514
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.5_vue@3.6.0-rc.10_typescript-native-bridge@6.0.3-bridge.18.tsgo.7.0.2_/node_modules/reka-ui/dist/Popper/PopperContent.js
|
|
1515
|
+
var hl = ["dir"], gl = {
|
|
1516
|
+
side: "bottom",
|
|
1517
|
+
sideOffset: 0,
|
|
1518
|
+
sideFlip: !0,
|
|
1519
|
+
align: "center",
|
|
1520
|
+
alignOffset: 0,
|
|
1521
|
+
alignFlip: !0,
|
|
1522
|
+
arrowPadding: 0,
|
|
1523
|
+
hideShiftedArrow: !0,
|
|
1524
|
+
avoidCollisions: !0,
|
|
1525
|
+
collisionBoundary: () => [],
|
|
1526
|
+
collisionPadding: 0,
|
|
1527
|
+
sticky: "partial",
|
|
1528
|
+
hideWhenDetached: !1,
|
|
1529
|
+
positionStrategy: "fixed",
|
|
1530
|
+
updatePositionStrategy: "optimized",
|
|
1531
|
+
prioritizePosition: !1
|
|
1532
|
+
}, [_l, vl] = /*#__PURE__*/ n("PopperContent"), yl = /* @__PURE__ */ Ai({
|
|
1533
|
+
inheritAttrs: !1,
|
|
1534
|
+
__name: "PopperContent",
|
|
1535
|
+
props: /* @__PURE__ */ Li({
|
|
1536
|
+
memoDependencies: {
|
|
1537
|
+
type: Array,
|
|
1538
|
+
required: !1
|
|
1539
|
+
},
|
|
1540
|
+
side: {
|
|
1541
|
+
type: null,
|
|
1542
|
+
required: !1
|
|
1543
|
+
},
|
|
1544
|
+
sideOffset: {
|
|
1545
|
+
type: Number,
|
|
1546
|
+
required: !1
|
|
1547
|
+
},
|
|
1548
|
+
sideFlip: {
|
|
1549
|
+
type: Boolean,
|
|
1550
|
+
required: !1
|
|
1551
|
+
},
|
|
1552
|
+
align: {
|
|
1553
|
+
type: null,
|
|
1554
|
+
required: !1
|
|
1555
|
+
},
|
|
1556
|
+
alignOffset: {
|
|
1557
|
+
type: Number,
|
|
1558
|
+
required: !1
|
|
1559
|
+
},
|
|
1560
|
+
alignFlip: {
|
|
1561
|
+
type: Boolean,
|
|
1562
|
+
required: !1
|
|
1563
|
+
},
|
|
1564
|
+
avoidCollisions: {
|
|
1565
|
+
type: Boolean,
|
|
1566
|
+
required: !1
|
|
1567
|
+
},
|
|
1568
|
+
collisionBoundary: {
|
|
1569
|
+
type: null,
|
|
1570
|
+
required: !1
|
|
1571
|
+
},
|
|
1572
|
+
collisionPadding: {
|
|
1573
|
+
type: [Number, Object],
|
|
1574
|
+
required: !1
|
|
1575
|
+
},
|
|
1576
|
+
arrowPadding: {
|
|
1577
|
+
type: Number,
|
|
1578
|
+
required: !1
|
|
1579
|
+
},
|
|
1580
|
+
hideShiftedArrow: {
|
|
1581
|
+
type: Boolean,
|
|
1582
|
+
required: !1
|
|
1583
|
+
},
|
|
1584
|
+
sticky: {
|
|
1585
|
+
type: String,
|
|
1586
|
+
required: !1
|
|
1587
|
+
},
|
|
1588
|
+
hideWhenDetached: {
|
|
1589
|
+
type: Boolean,
|
|
1590
|
+
required: !1
|
|
1591
|
+
},
|
|
1592
|
+
positionStrategy: {
|
|
1593
|
+
type: String,
|
|
1594
|
+
required: !1
|
|
1595
|
+
},
|
|
1596
|
+
updatePositionStrategy: {
|
|
1597
|
+
type: String,
|
|
1598
|
+
required: !1
|
|
1599
|
+
},
|
|
1600
|
+
disableUpdateOnLayoutShift: {
|
|
1601
|
+
type: Boolean,
|
|
1602
|
+
required: !1
|
|
1603
|
+
},
|
|
1604
|
+
prioritizePosition: {
|
|
1605
|
+
type: Boolean,
|
|
1606
|
+
required: !1
|
|
1607
|
+
},
|
|
1608
|
+
reference: {
|
|
1609
|
+
type: null,
|
|
1610
|
+
required: !1
|
|
1611
|
+
},
|
|
1612
|
+
dir: {
|
|
1613
|
+
type: String,
|
|
1614
|
+
required: !1
|
|
1615
|
+
},
|
|
1616
|
+
asChild: {
|
|
1617
|
+
type: Boolean,
|
|
1618
|
+
required: !1
|
|
1619
|
+
},
|
|
1620
|
+
as: {
|
|
1621
|
+
type: null,
|
|
1622
|
+
required: !1
|
|
1623
|
+
}
|
|
1624
|
+
}, { ...gl }),
|
|
1625
|
+
emits: ["placed"],
|
|
1626
|
+
setup(n, { emit: r }) {
|
|
1627
|
+
let i = n, a = r, o = qo(), { forwardRef: s, currentElement: c } = e(), l = Ji(K(() => i.dir)), u = zi(), d = zi(), { width: f, height: p } = Ko(d), m = K(() => i.side + (i.align === "center" ? "" : `-${i.align}`)), h = K(() => typeof i.collisionPadding == "number" ? i.collisionPadding : {
|
|
1628
|
+
top: 0,
|
|
1629
|
+
right: 0,
|
|
1630
|
+
bottom: 0,
|
|
1631
|
+
left: 0,
|
|
1632
|
+
...i.collisionPadding
|
|
1633
|
+
}), g = K(() => Array.isArray(i.collisionBoundary) ? i.collisionBoundary : [i.collisionBoundary]), _ = K(() => ({
|
|
1634
|
+
padding: h.value,
|
|
1635
|
+
boundary: g.value.filter(es),
|
|
1636
|
+
altBoundary: g.value.length > 0
|
|
1637
|
+
})), v = K(() => ({
|
|
1638
|
+
mainAxis: i.sideFlip,
|
|
1639
|
+
crossAxis: i.alignFlip
|
|
1640
|
+
})), y = K(() => [
|
|
1641
|
+
Qc({
|
|
1642
|
+
mainAxis: i.sideOffset + p.value,
|
|
1643
|
+
alignmentAxis: i.alignOffset
|
|
1644
|
+
}),
|
|
1645
|
+
i.prioritizePosition && i.avoidCollisions && tl({
|
|
1646
|
+
..._.value,
|
|
1647
|
+
...v.value
|
|
1648
|
+
}),
|
|
1649
|
+
i.avoidCollisions && el({
|
|
1650
|
+
mainAxis: !0,
|
|
1651
|
+
crossAxis: !!i.prioritizePosition,
|
|
1652
|
+
limiter: i.sticky === "partial" ? ol() : void 0,
|
|
1653
|
+
..._.value
|
|
1654
|
+
}),
|
|
1655
|
+
!i.prioritizePosition && i.avoidCollisions && tl({
|
|
1656
|
+
..._.value,
|
|
1657
|
+
...v.value
|
|
1658
|
+
}),
|
|
1659
|
+
nl({
|
|
1660
|
+
..._.value,
|
|
1661
|
+
apply: ({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
|
|
1662
|
+
let { width: i, height: a } = t.reference, o = e.floating.style;
|
|
1663
|
+
o.setProperty("--reka-popper-available-width", `${n}px`), o.setProperty("--reka-popper-available-height", `${r}px`), o.setProperty("--reka-popper-anchor-width", `${i}px`), o.setProperty("--reka-popper-anchor-height", `${a}px`);
|
|
1664
|
+
}
|
|
1665
|
+
}),
|
|
1666
|
+
d.value && dl({
|
|
1667
|
+
element: d.value,
|
|
1668
|
+
padding: i.arrowPadding
|
|
1669
|
+
}),
|
|
1670
|
+
ts({
|
|
1671
|
+
arrowWidth: f.value,
|
|
1672
|
+
arrowHeight: p.value,
|
|
1673
|
+
dir: l.value
|
|
1674
|
+
}),
|
|
1675
|
+
i.hideWhenDetached && rl({
|
|
1676
|
+
strategy: "referenceHidden",
|
|
1677
|
+
..._.value
|
|
1678
|
+
})
|
|
1679
|
+
]), { floatingStyles: b, placement: x, isPositioned: S, middlewareData: C, update: ee } = ml(K(() => i.reference ?? o.anchor.value), u, {
|
|
1680
|
+
strategy: i.positionStrategy,
|
|
1681
|
+
placement: m,
|
|
1682
|
+
whileElementsMounted: (...e) => Zc(...e, {
|
|
1683
|
+
layoutShift: !i.disableUpdateOnLayoutShift,
|
|
1684
|
+
animationFrame: i.updatePositionStrategy === "always"
|
|
1685
|
+
}),
|
|
1686
|
+
middleware: y
|
|
1687
|
+
}), w = K(() => ns(x.value)[0]), te = K(() => ns(x.value)[1]);
|
|
1688
|
+
Pi(() => {
|
|
1689
|
+
S.value && a("placed");
|
|
1690
|
+
});
|
|
1691
|
+
let ne = K(() => {
|
|
1692
|
+
let e = C.value.arrow?.centerOffset !== 0;
|
|
1693
|
+
return i.hideShiftedArrow && e;
|
|
1694
|
+
}), T = zi("");
|
|
1695
|
+
return qi(() => {
|
|
1696
|
+
c.value && (T.value = window.getComputedStyle(c.value).zIndex);
|
|
1697
|
+
}), vl({
|
|
1698
|
+
placedSide: w,
|
|
1699
|
+
onArrowChange: (e) => d.value = e,
|
|
1700
|
+
arrowX: K(() => C.value.arrow?.x ?? 0),
|
|
1701
|
+
arrowY: K(() => C.value.arrow?.y ?? 0),
|
|
1702
|
+
shouldHideArrow: ne
|
|
1703
|
+
}), (e, n) => (Ri(), ji("div", {
|
|
1704
|
+
ref_key: "floatingRef",
|
|
1705
|
+
ref: u,
|
|
1706
|
+
"data-reka-popper-content-wrapper": "",
|
|
1707
|
+
dir: G(l),
|
|
1708
|
+
style: Ui({
|
|
1709
|
+
...G(b),
|
|
1710
|
+
transform: G(S) ? G(b).transform : "translate(0, -200%)",
|
|
1711
|
+
minWidth: "max-content",
|
|
1712
|
+
zIndex: T.value,
|
|
1713
|
+
"--reka-popper-transform-origin": [G(C).transformOrigin?.x, G(C).transformOrigin?.y].join(" "),
|
|
1714
|
+
...G(C).hide?.referenceHidden && {
|
|
1715
|
+
visibility: "hidden",
|
|
1716
|
+
pointerEvents: "none"
|
|
1717
|
+
}
|
|
1718
|
+
})
|
|
1719
|
+
}, [i.memoDependencies ? Bi([
|
|
1720
|
+
i.asChild,
|
|
1721
|
+
i.as,
|
|
1722
|
+
w.value,
|
|
1723
|
+
te.value,
|
|
1724
|
+
G(S),
|
|
1725
|
+
...Object.values(e.$attrs),
|
|
1726
|
+
...i.memoDependencies
|
|
1727
|
+
], () => (Ri(), Di(G(t), Ei({
|
|
1728
|
+
key: 0,
|
|
1729
|
+
ref: G(s)
|
|
1730
|
+
}, e.$attrs, {
|
|
1731
|
+
"as-child": i.asChild,
|
|
1732
|
+
as: i.as,
|
|
1733
|
+
"data-side": w.value,
|
|
1734
|
+
"data-align": te.value,
|
|
1735
|
+
style: { animation: G(S) ? void 0 : "none" }
|
|
1736
|
+
}), {
|
|
1737
|
+
default: Mi(() => [Ni(e.$slots, "default")]),
|
|
1738
|
+
_: 3
|
|
1739
|
+
}, 16, [
|
|
1740
|
+
"as-child",
|
|
1741
|
+
"as",
|
|
1742
|
+
"data-side",
|
|
1743
|
+
"data-align",
|
|
1744
|
+
"style"
|
|
1745
|
+
])), n, 0) : (Ri(), Di(G(t), Ei({
|
|
1746
|
+
key: 1,
|
|
1747
|
+
ref: G(s)
|
|
1748
|
+
}, e.$attrs, {
|
|
1749
|
+
"as-child": i.asChild,
|
|
1750
|
+
as: i.as,
|
|
1751
|
+
"data-side": w.value,
|
|
1752
|
+
"data-align": te.value,
|
|
1753
|
+
dir: G(l),
|
|
1754
|
+
style: { animation: G(S) ? void 0 : "none" }
|
|
1755
|
+
}), {
|
|
1756
|
+
default: Mi(() => [Ni(e.$slots, "default")]),
|
|
1757
|
+
_: 3
|
|
1758
|
+
}, 16, [
|
|
1759
|
+
"as-child",
|
|
1760
|
+
"as",
|
|
1761
|
+
"data-side",
|
|
1762
|
+
"data-align",
|
|
1763
|
+
"dir",
|
|
1764
|
+
"style"
|
|
1765
|
+
]))], 12, hl));
|
|
1766
|
+
}
|
|
1767
|
+
}), bl = {
|
|
1768
|
+
top: "bottom",
|
|
1769
|
+
right: "left",
|
|
1770
|
+
bottom: "top",
|
|
1771
|
+
left: "right"
|
|
1772
|
+
}, xl = /* @__PURE__ */ Ai({
|
|
1773
|
+
inheritAttrs: !1,
|
|
1774
|
+
__name: "PopperArrow",
|
|
1775
|
+
props: {
|
|
1776
|
+
width: {
|
|
1777
|
+
type: Number,
|
|
1778
|
+
required: !1
|
|
1779
|
+
},
|
|
1780
|
+
height: {
|
|
1781
|
+
type: Number,
|
|
1782
|
+
required: !1
|
|
1783
|
+
},
|
|
1784
|
+
rounded: {
|
|
1785
|
+
type: Boolean,
|
|
1786
|
+
required: !1
|
|
1787
|
+
},
|
|
1788
|
+
asChild: {
|
|
1789
|
+
type: Boolean,
|
|
1790
|
+
required: !1
|
|
1791
|
+
},
|
|
1792
|
+
as: {
|
|
1793
|
+
type: null,
|
|
1794
|
+
required: !1,
|
|
1795
|
+
default: "svg"
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
setup(t) {
|
|
1799
|
+
let { forwardRef: n } = e(), r = _l(), i = K(() => bl[r.placedSide.value]);
|
|
1800
|
+
return (e, t) => (Ri(), ji("span", {
|
|
1801
|
+
ref: (e) => {
|
|
1802
|
+
G(r).onArrowChange(e ?? void 0);
|
|
1803
|
+
},
|
|
1804
|
+
style: Ui({
|
|
1805
|
+
position: "absolute",
|
|
1806
|
+
left: G(r).arrowX?.value ? `${G(r).arrowX?.value}px` : void 0,
|
|
1807
|
+
top: G(r).arrowY?.value ? `${G(r).arrowY?.value}px` : void 0,
|
|
1808
|
+
[i.value]: 0,
|
|
1809
|
+
transformOrigin: {
|
|
1810
|
+
top: "",
|
|
1811
|
+
right: "0 0",
|
|
1812
|
+
bottom: "center 0",
|
|
1813
|
+
left: "100% 0"
|
|
1814
|
+
}[G(r).placedSide.value],
|
|
1815
|
+
transform: {
|
|
1816
|
+
top: "translateY(100%)",
|
|
1817
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1818
|
+
bottom: "rotate(180deg)",
|
|
1819
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1820
|
+
}[G(r).placedSide.value],
|
|
1821
|
+
visibility: G(r).shouldHideArrow.value ? "hidden" : void 0
|
|
1822
|
+
})
|
|
1823
|
+
}, [Fi($o, Ei(e.$attrs, {
|
|
1824
|
+
ref: G(n),
|
|
1825
|
+
style: { display: "block" },
|
|
1826
|
+
as: e.as,
|
|
1827
|
+
"as-child": e.asChild,
|
|
1828
|
+
rounded: e.rounded,
|
|
1829
|
+
width: e.width,
|
|
1830
|
+
height: e.height
|
|
1831
|
+
}), {
|
|
1832
|
+
default: Mi(() => [Ni(e.$slots, "default")]),
|
|
1833
|
+
_: 3
|
|
1834
|
+
}, 16, [
|
|
1835
|
+
"as",
|
|
1836
|
+
"as-child",
|
|
1837
|
+
"rounded",
|
|
1838
|
+
"width",
|
|
1839
|
+
"height"
|
|
1840
|
+
])], 4));
|
|
1841
|
+
}
|
|
1842
|
+
}), Sl = "~effect/http/HttpBody", Cl = (e) => Jr(e, Sl), wl = class {
|
|
1843
|
+
[Sl];
|
|
1844
|
+
constructor() {
|
|
1845
|
+
this[Sl] = Sl;
|
|
1846
|
+
}
|
|
1847
|
+
[cn]() {
|
|
1848
|
+
return this.toJSON();
|
|
1849
|
+
}
|
|
1850
|
+
toString() {
|
|
1851
|
+
return c(this, { ignoreToString: !0 });
|
|
1852
|
+
}
|
|
1853
|
+
}, Tl = /*#__PURE__*/ new class extends wl {
|
|
1854
|
+
_tag = "Empty";
|
|
1855
|
+
toJSON() {
|
|
1856
|
+
return {
|
|
1857
|
+
_id: "effect/HttpBody",
|
|
1858
|
+
_tag: "Empty"
|
|
1859
|
+
};
|
|
1860
|
+
}
|
|
1861
|
+
}(), El = class extends wl {
|
|
1862
|
+
_tag = "Raw";
|
|
1863
|
+
body;
|
|
1864
|
+
contentType;
|
|
1865
|
+
contentLength;
|
|
1866
|
+
constructor(e, t, n) {
|
|
1867
|
+
super(), this.body = e, this.contentType = t, this.contentLength = n;
|
|
1868
|
+
}
|
|
1869
|
+
toJSON() {
|
|
1870
|
+
return {
|
|
1871
|
+
_id: "effect/HttpBody",
|
|
1872
|
+
_tag: "Raw",
|
|
1873
|
+
body: this.body,
|
|
1874
|
+
contentType: this.contentType,
|
|
1875
|
+
contentLength: this.contentLength
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
}, Dl = (e, t) => new El(e, t?.contentType, t?.contentLength), Ol = class extends wl {
|
|
1879
|
+
_tag = "Uint8Array";
|
|
1880
|
+
contentType;
|
|
1881
|
+
contentLength;
|
|
1882
|
+
text;
|
|
1883
|
+
_body;
|
|
1884
|
+
constructor(e, t, n, r) {
|
|
1885
|
+
super(), this._body = e, this.text = r, this.contentType = t, this.contentLength = n;
|
|
1886
|
+
}
|
|
1887
|
+
get body() {
|
|
1888
|
+
return this._body ??= Ml(this.text);
|
|
1889
|
+
}
|
|
1890
|
+
toJSON() {
|
|
1891
|
+
return {
|
|
1892
|
+
_id: "effect/HttpBody",
|
|
1893
|
+
_tag: "Uint8Array",
|
|
1894
|
+
body: this.contentType.startsWith("text/") || this.contentType.endsWith("json") ? new TextDecoder().decode(this.body) : `Uint8Array(${this.body.length})`,
|
|
1895
|
+
contentType: this.contentType,
|
|
1896
|
+
contentLength: this.contentLength
|
|
1897
|
+
};
|
|
1898
|
+
}
|
|
1899
|
+
}, kl = (e, t) => new Ol(e, t ?? "application/octet-stream", e.length), Al = /*#__PURE__*/ new TextEncoder(), jl = globalThis.Buffer, Ml = jl === void 0 ? (e) => Al.encode(e) : (e) => jl.from(e, "utf8"), Nl = (e, t) => {
|
|
1900
|
+
if (typeof e != "string" && (e = e === void 0 ? "" : String(e)), jl !== void 0) return new Ol(void 0, t ?? "text/plain", jl.byteLength(e, "utf8"), e);
|
|
1901
|
+
let n = Al.encode(e);
|
|
1902
|
+
return new Ol(n, t ?? "text/plain", n.length, e);
|
|
1903
|
+
}, Pl = (e, t) => Nl(qt(Ee(e)), t ?? "application/x-www-form-urlencoded"), Fl = class extends wl {
|
|
1904
|
+
_tag = "FormData";
|
|
1905
|
+
contentType = void 0;
|
|
1906
|
+
contentLength = void 0;
|
|
1907
|
+
formData;
|
|
1908
|
+
constructor(e) {
|
|
1909
|
+
super(), this.formData = e;
|
|
1910
|
+
}
|
|
1911
|
+
toJSON() {
|
|
1912
|
+
return {
|
|
1913
|
+
_id: "effect/HttpBody",
|
|
1914
|
+
_tag: "FormData",
|
|
1915
|
+
formData: this.formData
|
|
1916
|
+
};
|
|
1917
|
+
}
|
|
1918
|
+
}, Il = (e) => new Fl(e), Ll = "~effect/http/HttpClientError", Rl = (e) => Jr(e, Ll), zl = class extends (/*#__PURE__*/ l("HttpClientError")) {
|
|
1919
|
+
constructor(e) {
|
|
1920
|
+
"cause" in e.reason ? super({
|
|
1921
|
+
...e,
|
|
1922
|
+
cause: e.reason.cause
|
|
1923
|
+
}) : super(e);
|
|
1924
|
+
}
|
|
1925
|
+
[Ll] = Ll;
|
|
1926
|
+
get request() {
|
|
1927
|
+
return this.reason.request;
|
|
1928
|
+
}
|
|
1929
|
+
get response() {
|
|
1930
|
+
return "response" in this.reason ? this.reason.response : void 0;
|
|
1931
|
+
}
|
|
1932
|
+
get message() {
|
|
1933
|
+
return this.reason.message;
|
|
1934
|
+
}
|
|
1935
|
+
}, Bl = (e) => e.endsWith("Error") ? e.slice(0, -5) : e, Vl = (e, t, n) => t ? `${e}: ${t} (${n})` : `${e} error (${n})`, Hl = class extends (/*#__PURE__*/ l("TransportError")) {
|
|
1936
|
+
get methodAndUrl() {
|
|
1937
|
+
return `${this.request.method} ${this.request.url}`;
|
|
1938
|
+
}
|
|
1939
|
+
get message() {
|
|
1940
|
+
return Vl(Bl(this._tag), this.description, this.methodAndUrl);
|
|
1941
|
+
}
|
|
1942
|
+
}, Ul = class extends (/*#__PURE__*/ l("InvalidUrlError")) {
|
|
1943
|
+
get methodAndUrl() {
|
|
1944
|
+
return `${this.request.method} ${this.request.url}`;
|
|
1945
|
+
}
|
|
1946
|
+
get message() {
|
|
1947
|
+
return Vl(Bl(this._tag), this.description, this.methodAndUrl);
|
|
1948
|
+
}
|
|
1949
|
+
}, Wl = class extends (/*#__PURE__*/ l("StatusCodeError")) {
|
|
1950
|
+
get methodAndUrl() {
|
|
1951
|
+
return `${this.request.method} ${this.request.url}`;
|
|
1952
|
+
}
|
|
1953
|
+
get message() {
|
|
1954
|
+
let e = `${this.response.status} ${this.methodAndUrl}`;
|
|
1955
|
+
return Vl(Bl(this._tag), this.description, e);
|
|
1956
|
+
}
|
|
1957
|
+
}, Gl = class extends (/*#__PURE__*/ l("DecodeError")) {
|
|
1958
|
+
get methodAndUrl() {
|
|
1959
|
+
return `${this.request.method} ${this.request.url}`;
|
|
1960
|
+
}
|
|
1961
|
+
get message() {
|
|
1962
|
+
let e = `${this.response.status} ${this.methodAndUrl}`;
|
|
1963
|
+
return Vl(Bl(this._tag), this.description, e);
|
|
1964
|
+
}
|
|
1965
|
+
}, Kl = class extends (/*#__PURE__*/ l("EmptyBodyError")) {
|
|
1966
|
+
get methodAndUrl() {
|
|
1967
|
+
return `${this.request.method} ${this.request.url}`;
|
|
1968
|
+
}
|
|
1969
|
+
get message() {
|
|
1970
|
+
let e = `${this.response.status} ${this.methodAndUrl}`;
|
|
1971
|
+
return Vl(Bl(this._tag), this.description, e);
|
|
1972
|
+
}
|
|
1973
|
+
}, ql = (e) => e !== "GET" && e !== "HEAD" && e !== "OPTIONS" && e !== "TRACE", Jl = [
|
|
1974
|
+
["GET", "get"],
|
|
1975
|
+
["POST", "post"],
|
|
1976
|
+
["PUT", "put"],
|
|
1977
|
+
["DELETE", "del"],
|
|
1978
|
+
["PATCH", "patch"],
|
|
1979
|
+
["HEAD", "head"],
|
|
1980
|
+
["OPTIONS", "options"],
|
|
1981
|
+
["TRACE", "trace"],
|
|
1982
|
+
["QUERY", "query"]
|
|
1983
|
+
], Yl = (e, t) => t._tag === "Empty" || t._tag === "FormData" ? ln(ln(e, "content-type"), "content-length") : (e = t.contentType === void 0 ? ln(e, "content-type") : _t(e, "content-type", t.contentType), t.contentLength === void 0 ? ln(e, "content-length") : _t(e, "content-length", t.contentLength.toString())), Xl = class extends (/*#__PURE__*/ l("UrlError")) {}, Zl = (e, t, n) => ri({
|
|
1984
|
+
try: () => {
|
|
1985
|
+
let r = new URL(e, Ql());
|
|
1986
|
+
for (let e = 0; e < t.params.length; e++) {
|
|
1987
|
+
let [n, i] = t.params[e];
|
|
1988
|
+
i !== void 0 && r.searchParams.append(n, i);
|
|
1989
|
+
}
|
|
1990
|
+
return n !== void 0 && (r.hash = n), r;
|
|
1991
|
+
},
|
|
1992
|
+
catch: (e) => new Xl({ cause: e })
|
|
1993
|
+
}), Ql = () => {
|
|
1994
|
+
if ("location" in globalThis && globalThis.location !== void 0 && globalThis.location.origin !== void 0 && globalThis.location.pathname !== void 0) return location.origin + location.pathname;
|
|
1995
|
+
}, $l = "~effect/http/HttpClientRequest", eu = {
|
|
1996
|
+
[$l]: $l,
|
|
1997
|
+
...tn,
|
|
1998
|
+
toJSON() {
|
|
1999
|
+
return {
|
|
2000
|
+
_id: "HttpClientRequest",
|
|
2001
|
+
method: this.method,
|
|
2002
|
+
url: this.url,
|
|
2003
|
+
urlParams: this.urlParams,
|
|
2004
|
+
hash: this.hash,
|
|
2005
|
+
headers: Ln(this.headers),
|
|
2006
|
+
body: this.body.toJSON()
|
|
2007
|
+
};
|
|
2008
|
+
},
|
|
2009
|
+
pipe() {
|
|
2010
|
+
return Or(this, arguments);
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
2013
|
+
function tu(e, t, n, r, i, a) {
|
|
2014
|
+
let o = Object.create(eu);
|
|
2015
|
+
return o.method = e, o.url = t, o.urlParams = n, o.hash = r, o.headers = i, o.body = a, o;
|
|
2016
|
+
}
|
|
2017
|
+
var nu = /*#__PURE__*/ tu("GET", "", Vt, /*#__PURE__*/ ut(), He, Tl), ru = (e) => (t, n) => iu(nu, {
|
|
2018
|
+
method: e,
|
|
2019
|
+
url: t,
|
|
2020
|
+
...n ?? void 0
|
|
2021
|
+
}), iu = /*#__PURE__*/ B(2, (e, t) => {
|
|
2022
|
+
let n = e;
|
|
2023
|
+
return t.method && (n = au(n, t.method)), t.url && (n = uu(n, t.url)), t.headers && (n = su(n, t.headers)), t.urlParams && (n = pu(n, t.urlParams)), t.hash && (n = hu(n, t.hash)), t.body && (n = gu(n, t.body)), t.accept && (n = cu(n, t.accept)), t.acceptJson && (n = lu(n)), n;
|
|
2024
|
+
}), au = /*#__PURE__*/ B(2, (e, t) => tu(t, e.url, e.urlParams, e.hash, e.headers, e.body)), ou = /*#__PURE__*/ B(3, (e, t, n) => tu(e.method, e.url, e.urlParams, e.hash, _t(e.headers, t, n), e.body)), su = /*#__PURE__*/ B(2, (e, t) => tu(e.method, e.url, e.urlParams, e.hash, u(e.headers, t), e.body)), cu = /*#__PURE__*/ B(2, (e, t) => ou(e, "Accept", t)), lu = /*#__PURE__*/ cu("application/json"), uu = /*#__PURE__*/ B(2, (e, t) => {
|
|
2025
|
+
if (typeof t == "string") return tu(e.method, t, e.urlParams, e.hash, e.headers, e.body);
|
|
2026
|
+
let n = new URL(t.toString()), r = Ee(n.searchParams), i = rr(n.hash === "" ? void 0 : n.hash.slice(1));
|
|
2027
|
+
return n.search = "", n.hash = "", tu(e.method, n.toString(), r, i, e.headers, e.body);
|
|
2028
|
+
}), du = /*#__PURE__*/ B(2, (e, t) => t === "" ? e : tu(e.method, fu(t, e.url), e.urlParams, e.hash, e.headers, e.body)), fu = (e, t) => {
|
|
2029
|
+
let n = e.endsWith("/"), r = t.startsWith("/");
|
|
2030
|
+
return n && r ? e + t.slice(1) : !n && !r ? e + "/" + t : e + t;
|
|
2031
|
+
}, pu = /*#__PURE__*/ B(2, (e, t) => tu(e.method, e.url, Lt(e.urlParams, t), e.hash, e.headers, e.body)), mu = /*#__PURE__*/ B(2, (e, t) => tu(e.method, e.url, y(e.urlParams, t), e.hash, e.headers, e.body)), hu = /*#__PURE__*/ B(2, (e, t) => tu(e.method, e.url, e.urlParams, me(t), e.headers, e.body)), gu = /*#__PURE__*/ B(2, (e, t) => tu(e.method, e.url, e.urlParams, e.hash, Yl(e.headers, t), t)), _u = /*#__PURE__*/ B(2, (e, t) => gu(e, Il(t)));
|
|
2032
|
+
function vu(e) {
|
|
2033
|
+
let t = Zl(e.url, e.urlParams, p(e.hash));
|
|
2034
|
+
return Jn(t) ? me(t.success) : ut();
|
|
2035
|
+
}
|
|
2036
|
+
//#endregion
|
|
2037
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/http/HttpIncomingMessage.js
|
|
2038
|
+
var yu = "~effect/http/HttpIncomingMessage", bu = (e, t) => {
|
|
2039
|
+
let n = e.headers["content-type"] ?? "", r;
|
|
2040
|
+
if (n.includes("application/json")) try {
|
|
2041
|
+
r = Rt(e.json);
|
|
2042
|
+
} catch {}
|
|
2043
|
+
else if (n.includes("text/") || n.includes("urlencoded")) try {
|
|
2044
|
+
r = Rt(e.text);
|
|
2045
|
+
} catch {}
|
|
2046
|
+
let i = {
|
|
2047
|
+
...t,
|
|
2048
|
+
headers: Ln(e.headers),
|
|
2049
|
+
remoteAddress: e.remoteAddress
|
|
2050
|
+
};
|
|
2051
|
+
return r !== void 0 && (i.body = r), i;
|
|
2052
|
+
}, xu = "~effect/http/HttpClientResponse", Su = (e, t) => new Cu(e, t), Cu = class extends Yt {
|
|
2053
|
+
[yu];
|
|
2054
|
+
[xu];
|
|
2055
|
+
request;
|
|
2056
|
+
source;
|
|
2057
|
+
constructor(e, t) {
|
|
2058
|
+
super(), this.request = e, this.source = t, this[yu] = yu, this[xu] = xu;
|
|
2059
|
+
}
|
|
2060
|
+
toJSON() {
|
|
2061
|
+
return bu(this, {
|
|
2062
|
+
_id: "HttpClientResponse",
|
|
2063
|
+
request: this.request.toJSON(),
|
|
2064
|
+
status: this.status
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
get status() {
|
|
2068
|
+
return this.source.status;
|
|
2069
|
+
}
|
|
2070
|
+
get url() {
|
|
2071
|
+
if (this.source.url) return this.source.url.split("#")[0];
|
|
2072
|
+
let e = vu(this.request);
|
|
2073
|
+
return $n(e) ? "" : (e.value.hash = "", e.value.href);
|
|
2074
|
+
}
|
|
2075
|
+
get headers() {
|
|
2076
|
+
return Pr(this.source.headers);
|
|
2077
|
+
}
|
|
2078
|
+
cachedCookies;
|
|
2079
|
+
get cookies() {
|
|
2080
|
+
return this.cachedCookies ? this.cachedCookies : this.cachedCookies = Yr(this.source.headers.getSetCookie?.() ?? []);
|
|
2081
|
+
}
|
|
2082
|
+
get remoteAddress() {
|
|
2083
|
+
return ut();
|
|
2084
|
+
}
|
|
2085
|
+
get stream() {
|
|
2086
|
+
return this.source.body ? Do({
|
|
2087
|
+
evaluate: () => this.source.body,
|
|
2088
|
+
onError: (e) => new zl({ reason: new Gl({
|
|
2089
|
+
request: this.request,
|
|
2090
|
+
response: this,
|
|
2091
|
+
cause: e
|
|
2092
|
+
}) })
|
|
2093
|
+
}) : To(new zl({ reason: new Kl({
|
|
2094
|
+
request: this.request,
|
|
2095
|
+
response: this,
|
|
2096
|
+
description: "can not create stream from empty body"
|
|
2097
|
+
}) }));
|
|
2098
|
+
}
|
|
2099
|
+
get json() {
|
|
2100
|
+
return A(this.text, (e) => Qt({
|
|
2101
|
+
try: () => e === "" ? null : JSON.parse(e),
|
|
2102
|
+
catch: (e) => new zl({ reason: new Gl({
|
|
2103
|
+
request: this.request,
|
|
2104
|
+
response: this,
|
|
2105
|
+
cause: e
|
|
2106
|
+
}) })
|
|
2107
|
+
}));
|
|
2108
|
+
}
|
|
2109
|
+
textBody;
|
|
2110
|
+
get text() {
|
|
2111
|
+
return this.textBody ??= ct(this.arrayBuffer, (e) => new TextDecoder().decode(e));
|
|
2112
|
+
}
|
|
2113
|
+
get urlParamsBody() {
|
|
2114
|
+
return A(this.text, (e) => Qt({
|
|
2115
|
+
try: () => Ee(new URLSearchParams(e)),
|
|
2116
|
+
catch: (e) => new zl({ reason: new Gl({
|
|
2117
|
+
request: this.request,
|
|
2118
|
+
response: this,
|
|
2119
|
+
cause: e
|
|
2120
|
+
}) })
|
|
2121
|
+
}));
|
|
2122
|
+
}
|
|
2123
|
+
formDataBody;
|
|
2124
|
+
get formData() {
|
|
2125
|
+
return this.formDataBody ??= an({
|
|
2126
|
+
try: () => this.source.formData(),
|
|
2127
|
+
catch: (e) => new zl({ reason: new Gl({
|
|
2128
|
+
request: this.request,
|
|
2129
|
+
response: this,
|
|
2130
|
+
cause: e
|
|
2131
|
+
}) })
|
|
2132
|
+
}).pipe(kr, Rt);
|
|
2133
|
+
}
|
|
2134
|
+
arrayBufferBody;
|
|
2135
|
+
get arrayBuffer() {
|
|
2136
|
+
return this.arrayBufferBody ||= an({
|
|
2137
|
+
try: () => this.source.arrayBuffer(),
|
|
2138
|
+
catch: (e) => new zl({ reason: new Gl({
|
|
2139
|
+
request: this.request,
|
|
2140
|
+
response: this,
|
|
2141
|
+
cause: e
|
|
2142
|
+
}) })
|
|
2143
|
+
}).pipe(kr, Rt), this.arrayBufferBody;
|
|
2144
|
+
}
|
|
2145
|
+
pipe() {
|
|
2146
|
+
return Or(this, arguments);
|
|
2147
|
+
}
|
|
2148
|
+
}, wu = (e) => Ie({
|
|
2149
|
+
b3: `${e.traceId}-${e.spanId}-${e.sampled ? "1" : "0"}${et(e.parent, {
|
|
2150
|
+
onNone: () => "",
|
|
2151
|
+
onSome: (e) => `-${e.spanId}`
|
|
2152
|
+
})}`,
|
|
2153
|
+
traceparent: `00-${e.traceId}-${e.spanId}-${e.sampled ? "01" : "00"}`
|
|
2154
|
+
}), Tu = {
|
|
2155
|
+
"http:": 80,
|
|
2156
|
+
"https:": 443,
|
|
2157
|
+
"ws:": 80,
|
|
2158
|
+
"wss:": 443
|
|
2159
|
+
}, Eu = (e, t) => {
|
|
2160
|
+
let n = t.search.slice(1);
|
|
2161
|
+
if (e.attribute("url.full", t.toString()), e.attribute("url.path", t.pathname), n !== "" && e.attribute("url.query", n), e.attribute("url.scheme", t.protocol.slice(0, -1)), t.hostname !== "") {
|
|
2162
|
+
e.attribute("server.address", t.hostname.startsWith("[") ? t.hostname.slice(1, -1) : t.hostname);
|
|
2163
|
+
let n = t.port === "" ? Tu[t.protocol] : Number(t.port);
|
|
2164
|
+
n !== void 0 && e.attribute("server.port", n);
|
|
2165
|
+
}
|
|
2166
|
+
}, Du = (e, t, n, r, i) => {
|
|
2167
|
+
for (let a in n) r(a, t) && e.attribute(`http.${t}.header.${a}`, rn(a, i) ? "<redacted>" : n[a]);
|
|
2168
|
+
}, Ou = "~effect/http/HttpClient", ku = /*#__PURE__*/ Cn("effect/HttpClient"), Au = /*#__PURE__*/ B(2, (e, t) => ju((n) => t(e.postprocess(n)), e.preprocess)), ju = (e, t) => {
|
|
2169
|
+
let n = Object.create(Mu);
|
|
2170
|
+
return n.preprocess = t, n.postprocess = e, n.execute = function(n) {
|
|
2171
|
+
return e(t(n));
|
|
2172
|
+
}, n;
|
|
2173
|
+
}, Mu = {
|
|
2174
|
+
[Ou]: Ou,
|
|
2175
|
+
pipe() {
|
|
2176
|
+
return Or(this, arguments);
|
|
2177
|
+
},
|
|
2178
|
+
...tn,
|
|
2179
|
+
toJSON() {
|
|
2180
|
+
return { _id: "effect/HttpClient" };
|
|
2181
|
+
},
|
|
2182
|
+
.../*#__PURE__*/ Object.fromEntries(/*#__PURE__*/ Jl.map(([e, t]) => [t, function(t, n) {
|
|
2183
|
+
return this.execute(ru(e)(t, n));
|
|
2184
|
+
}]))
|
|
2185
|
+
}, Nu = (e) => ju((t) => A(t, (t) => vr((n) => {
|
|
2186
|
+
let r = Hu.get(t), i = r ?? new AbortController(), a = Zl(t.url, t.urlParams, p(t.hash));
|
|
2187
|
+
if (pr(a)) return N(new zl({ reason: new Ul({
|
|
2188
|
+
request: t,
|
|
2189
|
+
cause: a.failure
|
|
2190
|
+
}) }));
|
|
2191
|
+
let o = a.success;
|
|
2192
|
+
if (n.getRef(Xt) || n.getRef(Iu)(t)) {
|
|
2193
|
+
let a = e(t, o, i.signal, n);
|
|
2194
|
+
return r ? a : un((e) => h(e(a), {
|
|
2195
|
+
onSuccess(e) {
|
|
2196
|
+
return Vu.register(e, i), D(new Uu(e, i));
|
|
2197
|
+
},
|
|
2198
|
+
onFailure(e) {
|
|
2199
|
+
return he(e) && i.abort(), gi(e);
|
|
2200
|
+
}
|
|
2201
|
+
}));
|
|
2202
|
+
}
|
|
2203
|
+
return d(n.getRef(zu)(t), { kind: "client" }, (a) => {
|
|
2204
|
+
a.attribute("http.request.method", t.method);
|
|
2205
|
+
let s = n.getRef(xe);
|
|
2206
|
+
Eu(a, o);
|
|
2207
|
+
let c = n.getRef(Lu);
|
|
2208
|
+
return Du(a, "request", t.headers, c, s), t = n.getRef(Ru) ? su(t, wu(a)) : t, un((l) => l(e(t, o, i.signal, n)).pipe(Rr(a, { captureStackTrace: !1 }), h({
|
|
2209
|
+
onSuccess: (e) => (a.attribute("http.response.status_code", e.status), Du(a, "response", e.headers, c, s), e.status >= 400 && e.status < 600 && (a.attribute("error.type", String(e.status)), Pu(n, a, t, e)), r ? D(e) : (Vu.register(e, i), D(new Uu(e, i)))),
|
|
2210
|
+
onFailure(e) {
|
|
2211
|
+
return !r && he(e) && i.abort(), gi(e);
|
|
2212
|
+
}
|
|
2213
|
+
})));
|
|
2214
|
+
});
|
|
2215
|
+
})), D), Pu = (e, t, n, r) => {
|
|
2216
|
+
let i = Mr();
|
|
2217
|
+
Pe(0);
|
|
2218
|
+
let a;
|
|
2219
|
+
try {
|
|
2220
|
+
a = ue(new zl({ reason: new Wl({
|
|
2221
|
+
request: n,
|
|
2222
|
+
response: r
|
|
2223
|
+
}) }));
|
|
2224
|
+
} finally {
|
|
2225
|
+
Pe(i);
|
|
2226
|
+
}
|
|
2227
|
+
t.end(e.getRef(Yi) ? e.getRef(On).currentTimeNanosUnsafe() : BigInt(0), a);
|
|
2228
|
+
}, Fu = /*#__PURE__*/ B(2, (e, t) => ju(e.postprocess, (n) => ct(e.preprocess(n), t))), Iu = /*#__PURE__*/ vi("effect/http/HttpClient/TracerDisabledWhen", { defaultValue: () => xn }), Lu = /*#__PURE__*/ vi("effect/http/HttpClient/TracerHeaderFilter", { defaultValue: () => xn }), Ru = /*#__PURE__*/ vi("effect/http/HttpClient/TracerPropagationEnabled", { defaultValue: Cr }), zu = /*#__PURE__*/ vi("effect/http/HttpClient/SpanNameGenerator", { defaultValue: () => (e) => e.method }), Bu = (e) => Nn(ku)(ai((t) => ct(e, (e) => Au(e, vt((e) => at(t, e)))))), Vu = /*#__PURE__*/ (() => {
|
|
2229
|
+
if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
|
|
2230
|
+
let e = /*#__PURE__*/ new FinalizationRegistry((e) => {
|
|
2231
|
+
e.abort();
|
|
2232
|
+
});
|
|
2233
|
+
return {
|
|
2234
|
+
register(t, n) {
|
|
2235
|
+
e.register(t, n, t);
|
|
2236
|
+
},
|
|
2237
|
+
unregister(t) {
|
|
2238
|
+
e.unregister(t);
|
|
2239
|
+
}
|
|
2240
|
+
};
|
|
2241
|
+
}
|
|
2242
|
+
let e = /*#__PURE__*/ new WeakMap();
|
|
2243
|
+
return {
|
|
2244
|
+
register(t, n) {
|
|
2245
|
+
e.set(t, setTimeout(() => n.abort(), 5e3));
|
|
2246
|
+
},
|
|
2247
|
+
unregister(t) {
|
|
2248
|
+
let n = e.get(t);
|
|
2249
|
+
n !== void 0 && (clearTimeout(n), e.delete(t));
|
|
2250
|
+
}
|
|
2251
|
+
};
|
|
2252
|
+
})(), Hu = /*#__PURE__*/ new WeakMap(), Uu = class {
|
|
2253
|
+
original;
|
|
2254
|
+
controller;
|
|
2255
|
+
constructor(e, t) {
|
|
2256
|
+
this.original = e, this.controller = t;
|
|
2257
|
+
}
|
|
2258
|
+
[xu] = xu;
|
|
2259
|
+
[yu] = yu;
|
|
2260
|
+
applyInterrupt(e) {
|
|
2261
|
+
return Fr(() => (Vu.unregister(this.original), _e(e, () => Le(() => {
|
|
2262
|
+
this.controller.abort();
|
|
2263
|
+
}))));
|
|
2264
|
+
}
|
|
2265
|
+
get request() {
|
|
2266
|
+
return this.original.request;
|
|
2267
|
+
}
|
|
2268
|
+
get url() {
|
|
2269
|
+
return this.original.url;
|
|
2270
|
+
}
|
|
2271
|
+
get status() {
|
|
2272
|
+
return this.original.status;
|
|
2273
|
+
}
|
|
2274
|
+
get headers() {
|
|
2275
|
+
return this.original.headers;
|
|
2276
|
+
}
|
|
2277
|
+
get cookies() {
|
|
2278
|
+
return this.original.cookies;
|
|
2279
|
+
}
|
|
2280
|
+
get remoteAddress() {
|
|
2281
|
+
return this.original.remoteAddress;
|
|
2282
|
+
}
|
|
2283
|
+
get formData() {
|
|
2284
|
+
return this.applyInterrupt(this.original.formData);
|
|
2285
|
+
}
|
|
2286
|
+
get text() {
|
|
2287
|
+
return this.applyInterrupt(this.original.text);
|
|
2288
|
+
}
|
|
2289
|
+
get json() {
|
|
2290
|
+
return this.applyInterrupt(this.original.json);
|
|
2291
|
+
}
|
|
2292
|
+
get urlParamsBody() {
|
|
2293
|
+
return this.applyInterrupt(this.original.urlParamsBody);
|
|
2294
|
+
}
|
|
2295
|
+
get arrayBuffer() {
|
|
2296
|
+
return this.applyInterrupt(this.original.arrayBuffer);
|
|
2297
|
+
}
|
|
2298
|
+
get stream() {
|
|
2299
|
+
return wo(() => (Vu.unregister(this.original), Fo(this.original.stream, Le(() => {
|
|
2300
|
+
this.controller.abort();
|
|
2301
|
+
}))));
|
|
2302
|
+
}
|
|
2303
|
+
toJSON() {
|
|
2304
|
+
return this.original.toJSON();
|
|
2305
|
+
}
|
|
2306
|
+
[cn]() {
|
|
2307
|
+
return this.original[cn]();
|
|
2308
|
+
}
|
|
2309
|
+
pipe() {
|
|
2310
|
+
return Or(this, arguments);
|
|
2311
|
+
}
|
|
2312
|
+
}, Wu = /*#__PURE__*/ vi("effect/http/FetchHttpClient/Fetch", { defaultValue: () => globalThis.fetch }), Gu = class extends (/*#__PURE__*/ Cn()("effect/http/FetchHttpClient/RequestInit")) {}, Ku = /*#__PURE__*/ Bu(/*#__PURE__*/ D(/* @__PURE__ */ Nu((e, t, n, r) => {
|
|
2313
|
+
let i = r.getRef(Wu), a = ci(r.context, Gu) ?? {}, o = a.headers ? Zt(Pr(a.headers), e.headers) : e.headers;
|
|
2314
|
+
o["content-length"] && (o = ln(o, "content-length"));
|
|
2315
|
+
let s = (r) => ct(an({
|
|
2316
|
+
try: () => i(t, {
|
|
2317
|
+
...a,
|
|
2318
|
+
method: e.method,
|
|
2319
|
+
headers: o,
|
|
2320
|
+
body: r,
|
|
2321
|
+
duplex: typeof ReadableStream < "u" && r instanceof ReadableStream ? "half" : void 0,
|
|
2322
|
+
signal: n
|
|
2323
|
+
}),
|
|
2324
|
+
catch: (t) => new zl({ reason: new Hl({
|
|
2325
|
+
request: e,
|
|
2326
|
+
cause: t
|
|
2327
|
+
}) })
|
|
2328
|
+
}), (t) => Su(e, t));
|
|
2329
|
+
switch (e.body._tag) {
|
|
2330
|
+
case "Raw":
|
|
2331
|
+
case "Uint8Array": return s(e.body.body);
|
|
2332
|
+
case "FormData": return s(e.body.formData);
|
|
2333
|
+
case "Stream": return A(Bo(e.body.stream), s);
|
|
2334
|
+
}
|
|
2335
|
+
return s(void 0);
|
|
2336
|
+
})));
|
|
2337
|
+
({ ...Ge });
|
|
2338
|
+
var qu = /*#__PURE__*/ new Uint8Array(256);
|
|
2339
|
+
for (let e of "!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") qu[/*#__PURE__*/ e.charCodeAt(0)] = 1;
|
|
2340
|
+
var Ju = /*#__PURE__*/ new Uint8Array(256);
|
|
2341
|
+
Ju[9] = 1;
|
|
2342
|
+
for (let e = 32; e <= 126; e++) Ju[e] = 1;
|
|
2343
|
+
for (let e = 128; e <= 255; e++) Ju[e] = 1;
|
|
2344
|
+
var Yu = /*#__PURE__*/ Cn("effect/http/HttpServerRequest"), Xu = /*#__PURE__*/ new WeakSet(), Zu = (e) => vr((t) => {
|
|
2345
|
+
let n = le(t.context, Yu);
|
|
2346
|
+
return Xu.add(n.source), e;
|
|
2347
|
+
}), Qu = /*#__PURE__*/ Cn("effect/http/HttpRouter"), $u = (e) => e.endsWith("/") ? e.slice(0, -1) : e, ed = /*#__PURE__*/ B(2, (e, t) => (t = $u(t), e === "*" ? `${t}/*` : e === "/" ? t : t + e)), td = "~effect/http/HttpRouter/Middleware", nd = function() {
|
|
2348
|
+
return arguments.length === 0 ? rd : rd(arguments[0], arguments[1]);
|
|
2349
|
+
}, rd = (e, t) => t?.global ? Er(fe(function* () {
|
|
2350
|
+
let t = yield* Qu, n = oe(e) ? yield* e : e;
|
|
2351
|
+
yield* t.addGlobalMiddleware(n);
|
|
2352
|
+
})) : new od(oe(e) ? Bn(ct(e, (e) => re(/* @__PURE__ */ new Map([[ad, e]])))) : ii(re(/* @__PURE__ */ new Map([[ad, e]])))), id = 0, ad = "effect/http/HttpRouter/MiddlewareFn", od = class e {
|
|
2353
|
+
[td] = {};
|
|
2354
|
+
layerFn;
|
|
2355
|
+
dependencies;
|
|
2356
|
+
constructor(e, t) {
|
|
2357
|
+
this.layerFn = e, this.dependencies = t;
|
|
2358
|
+
let n = `effect/http/HttpRouter/Middleware-${++id}`;
|
|
2359
|
+
this.layer = Bn(fe({ self: this }, function* () {
|
|
2360
|
+
let e = yield* gn(), t = [jt(e, ad)];
|
|
2361
|
+
if (this.dependencies) {
|
|
2362
|
+
let n = yield* cr, r = C(e, yi), i = yield* Qr(this.dependencies, n, r);
|
|
2363
|
+
t.push(...cd(i));
|
|
2364
|
+
}
|
|
2365
|
+
return re(/* @__PURE__ */ new Map([[n, t]]));
|
|
2366
|
+
})).pipe(Yn(this.layerFn));
|
|
2367
|
+
}
|
|
2368
|
+
layer;
|
|
2369
|
+
combine(t) {
|
|
2370
|
+
return new e(this.layerFn, this.dependencies ? Gn(this.dependencies, t.layer) : t.layer);
|
|
2371
|
+
}
|
|
2372
|
+
}, sd = /*#__PURE__*/ new WeakMap(), cd = (e) => {
|
|
2373
|
+
let t = sd.get(e);
|
|
2374
|
+
if (t) return t;
|
|
2375
|
+
let n = vn(), r = 0;
|
|
2376
|
+
for (let [t, i] of e.mapUnsafe) t.startsWith("effect/http/HttpRouter/Middleware-") && (n.push(i), i.length > r && (r = i.length));
|
|
2377
|
+
if (n.length === 0) t = [];
|
|
2378
|
+
else {
|
|
2379
|
+
let e = /* @__PURE__ */ new Set();
|
|
2380
|
+
for (let t = r - 1; t >= 0; t--) for (let r of n) t < r.length && e.add(r[t]);
|
|
2381
|
+
t = Vr(e).reverse();
|
|
2382
|
+
}
|
|
2383
|
+
return sd.set(e, t), t;
|
|
2384
|
+
};
|
|
2385
|
+
(/*#__PURE__*/ nd(Zu)).layer;
|
|
2386
|
+
//#endregion
|
|
2387
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/http/HttpStatus.js
|
|
2388
|
+
var ld = {
|
|
2389
|
+
Continue: 100,
|
|
2390
|
+
SwitchingProtocols: 101,
|
|
2391
|
+
Processing: 102,
|
|
2392
|
+
EarlyHints: 103,
|
|
2393
|
+
OK: 200,
|
|
2394
|
+
Ok: 200,
|
|
2395
|
+
Created: 201,
|
|
2396
|
+
Accepted: 202,
|
|
2397
|
+
NonAuthoritativeInformation: 203,
|
|
2398
|
+
NoContent: 204,
|
|
2399
|
+
ResetContent: 205,
|
|
2400
|
+
PartialContent: 206,
|
|
2401
|
+
MultiStatus: 207,
|
|
2402
|
+
AlreadyReported: 208,
|
|
2403
|
+
ImUsed: 226,
|
|
2404
|
+
MultipleChoices: 300,
|
|
2405
|
+
MovedPermanently: 301,
|
|
2406
|
+
Found: 302,
|
|
2407
|
+
SeeOther: 303,
|
|
2408
|
+
NotModified: 304,
|
|
2409
|
+
TemporaryRedirect: 307,
|
|
2410
|
+
PermanentRedirect: 308,
|
|
2411
|
+
BadRequest: 400,
|
|
2412
|
+
Unauthorized: 401,
|
|
2413
|
+
PaymentRequired: 402,
|
|
2414
|
+
Forbidden: 403,
|
|
2415
|
+
NotFound: 404,
|
|
2416
|
+
MethodNotAllowed: 405,
|
|
2417
|
+
NotAcceptable: 406,
|
|
2418
|
+
ProxyAuthenticationRequired: 407,
|
|
2419
|
+
RequestTimeout: 408,
|
|
2420
|
+
Conflict: 409,
|
|
2421
|
+
Gone: 410,
|
|
2422
|
+
LengthRequired: 411,
|
|
2423
|
+
PreconditionFailed: 412,
|
|
2424
|
+
PayloadTooLarge: 413,
|
|
2425
|
+
UriTooLong: 414,
|
|
2426
|
+
UnsupportedMediaType: 415,
|
|
2427
|
+
RangeNotSatisfiable: 416,
|
|
2428
|
+
ExpectationFailed: 417,
|
|
2429
|
+
ImATeapot: 418,
|
|
2430
|
+
MisdirectedRequest: 421,
|
|
2431
|
+
UnprocessableEntity: 422,
|
|
2432
|
+
Locked: 423,
|
|
2433
|
+
FailedDependency: 424,
|
|
2434
|
+
TooEarly: 425,
|
|
2435
|
+
UpgradeRequired: 426,
|
|
2436
|
+
PreconditionRequired: 428,
|
|
2437
|
+
TooManyRequests: 429,
|
|
2438
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
2439
|
+
UnavailableForLegalReasons: 451,
|
|
2440
|
+
InternalServerError: 500,
|
|
2441
|
+
NotImplemented: 501,
|
|
2442
|
+
BadGateway: 502,
|
|
2443
|
+
ServiceUnavailable: 503,
|
|
2444
|
+
GatewayTimeout: 504,
|
|
2445
|
+
HttpVersionNotSupported: 505,
|
|
2446
|
+
VariantAlsoNegotiates: 506,
|
|
2447
|
+
InsufficientStorage: 507,
|
|
2448
|
+
LoopDetected: 508,
|
|
2449
|
+
NotExtended: 510,
|
|
2450
|
+
NetworkAuthenticationRequired: 511
|
|
2451
|
+
}, ud = (e) => ld[e], dd = "~effect/encoding/Sse/SseError", fd = class extends (/*#__PURE__*/ l("EventTooLarge")) {
|
|
2452
|
+
get message() {
|
|
2453
|
+
return `Pending SSE event exceeded the maximum size of ${this.maxEventSize}`;
|
|
2454
|
+
}
|
|
2455
|
+
}, pd = class extends (/*#__PURE__*/ l("SseError")) {
|
|
2456
|
+
[dd] = dd;
|
|
2457
|
+
get message() {
|
|
2458
|
+
return this.reason.message;
|
|
2459
|
+
}
|
|
2460
|
+
}, md = 10485760, hd = (e) => Ua((t, n) => Le(() => {
|
|
2461
|
+
let n = [], r, i = _d((e) => {
|
|
2462
|
+
e._tag === "Retry" ? r = e : n.push(e);
|
|
2463
|
+
}, e), a = A(t, (e) => {
|
|
2464
|
+
for (let t = 0; t < e.length; t++) {
|
|
2465
|
+
let n = i.feed(e[t]);
|
|
2466
|
+
if (n !== void 0) return N(n);
|
|
2467
|
+
}
|
|
2468
|
+
return In;
|
|
2469
|
+
});
|
|
2470
|
+
return Fr(function e() {
|
|
2471
|
+
if (Dn(n)) {
|
|
2472
|
+
let e = n;
|
|
2473
|
+
return n = [], D(e);
|
|
2474
|
+
}
|
|
2475
|
+
return r ? N(r) : A(a, e);
|
|
2476
|
+
});
|
|
2477
|
+
})), gd = (e, t, n) => ro(hd(t), uo(bd.pipe(dn(e, xd)), n)());
|
|
2478
|
+
function _d(e, t) {
|
|
2479
|
+
let n = t?.maxEventSize ?? md, r, i, a, o, s, c, l, u;
|
|
2480
|
+
return d(), {
|
|
2481
|
+
feed: f,
|
|
2482
|
+
reset: d
|
|
2483
|
+
};
|
|
2484
|
+
function d() {
|
|
2485
|
+
r = !0, i = "", a = 0, o = -1, s = !1, c = void 0, l = void 0, u = "";
|
|
2486
|
+
}
|
|
2487
|
+
function f(e) {
|
|
2488
|
+
i = i ? i + e : e, r && i.startsWith(vd) && (i = i.slice(vd.length)), r = !1;
|
|
2489
|
+
let t = i.length, c = 0;
|
|
2490
|
+
for (; c < t;) {
|
|
2491
|
+
s &&= (i[c] === "\n" && ++c, !1);
|
|
2492
|
+
let e = -1, n = o, r;
|
|
2493
|
+
for (let o = c + a; e < 0 && o < t; ++o) r = i[o], r === ":" && n < 0 ? n = o - c : r === "\r" ? (s = !0, e = o - c) : r === "\n" && (e = o - c);
|
|
2494
|
+
if (e < 0) {
|
|
2495
|
+
a = t - c, o = n;
|
|
2496
|
+
break;
|
|
2497
|
+
}
|
|
2498
|
+
a = 0, o = -1, p(i, c, n, e), c += e + 1;
|
|
2499
|
+
}
|
|
2500
|
+
if (c === t ? i = "" : c > 0 && (i = i.slice(c)), i.length + u.length > n) {
|
|
2501
|
+
let e = new pd({ reason: new fd({ maxEventSize: n }) });
|
|
2502
|
+
return d(), e;
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
function p(t, n, r, i) {
|
|
2506
|
+
if (i === 0) {
|
|
2507
|
+
u.length > 0 && (e({
|
|
2508
|
+
_tag: "Event",
|
|
2509
|
+
id: c,
|
|
2510
|
+
event: l || "message",
|
|
2511
|
+
data: u.slice(0, -1)
|
|
2512
|
+
}), u = ""), l = void 0;
|
|
2513
|
+
return;
|
|
2514
|
+
}
|
|
2515
|
+
let a = r < 0, o = t.slice(n, n + (a ? i : r)), s = 0;
|
|
2516
|
+
s = a ? i : t[n + r + 1] === " " ? r + 2 : r + 1;
|
|
2517
|
+
let d = n + s, f = i - s, p = t.slice(d, d + f).toString();
|
|
2518
|
+
o === "data" ? u += p ? `${p}\n` : "\n" : o === "event" ? l = p : o === "id" && !p.includes("\0") ? c = p : o === "retry" && /^\d+$/.test(p) && e(new Cd({
|
|
2519
|
+
duration: Lr(parseInt(p, 10)),
|
|
2520
|
+
lastEventId: c
|
|
2521
|
+
}));
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
var vd = "", yd = /*#__PURE__*/ O({
|
|
2525
|
+
id: /*#__PURE__*/ V(E),
|
|
2526
|
+
event: E,
|
|
2527
|
+
data: E
|
|
2528
|
+
}), bd = /*#__PURE__*/ O({
|
|
2529
|
+
_tag: /*#__PURE__*/ hi("Event"),
|
|
2530
|
+
id: /*#__PURE__*/ Oe(E),
|
|
2531
|
+
event: E,
|
|
2532
|
+
data: E
|
|
2533
|
+
}), xd = /*#__PURE__*/ ge({
|
|
2534
|
+
decode: (e) => e.id === void 0 ? {
|
|
2535
|
+
event: e.event,
|
|
2536
|
+
data: e.data
|
|
2537
|
+
} : {
|
|
2538
|
+
id: e.id,
|
|
2539
|
+
event: e.event,
|
|
2540
|
+
data: e.data
|
|
2541
|
+
},
|
|
2542
|
+
encode: (e) => ({
|
|
2543
|
+
_tag: "Event",
|
|
2544
|
+
id: e.id,
|
|
2545
|
+
event: e.event ?? "message",
|
|
2546
|
+
data: e.data
|
|
2547
|
+
})
|
|
2548
|
+
}), Sd = "~effect/encoding/Sse/Retry", Cd = class e extends (/*#__PURE__*/ gt("Retry")) {
|
|
2549
|
+
[Sd] = Sd;
|
|
2550
|
+
static is(e) {
|
|
2551
|
+
return Jr(e, Sd);
|
|
2552
|
+
}
|
|
2553
|
+
static filter(t) {
|
|
2554
|
+
return e.is(t) ? pn(t) : Tr(t);
|
|
2555
|
+
}
|
|
2556
|
+
}, wd = "~effect/http-api/HttpApiSchema/Stream";
|
|
2557
|
+
function Td(e) {
|
|
2558
|
+
let t = typeof e == "string" ? ud(e) : e;
|
|
2559
|
+
return (e) => e.annotate({ httpApiStatus: t });
|
|
2560
|
+
}
|
|
2561
|
+
var Ed = /*#__PURE__*/ ((e) => Ue.pipe(Td(e)))(204), Dd = /*#__PURE__*/ Re(_o), Od = (e) => {
|
|
2562
|
+
let t = e.events ?? (e.data === void 0 ? void 0 : O({
|
|
2563
|
+
...yd.fields,
|
|
2564
|
+
data: Zn(e.data)
|
|
2565
|
+
}));
|
|
2566
|
+
if (t === void 0) throw Error("StreamSse requires either an events schema or a data schema");
|
|
2567
|
+
return Kn(Dd.ast, {
|
|
2568
|
+
[wd]: wd,
|
|
2569
|
+
_tag: "StreamSse",
|
|
2570
|
+
mode: "sse",
|
|
2571
|
+
sseMode: e.events === void 0 ? "data" : "events",
|
|
2572
|
+
contentType: e.contentType ?? Md("sse"),
|
|
2573
|
+
events: t,
|
|
2574
|
+
error: e.error ?? pe
|
|
2575
|
+
});
|
|
2576
|
+
}, kd = (e) => hr(e) && Jr(e, wd), Ad = (e) => kd(e) && e._tag === "StreamSse", jd = (e) => kd(e) && e._tag === "StreamUint8Array";
|
|
2577
|
+
function Md(e) {
|
|
2578
|
+
switch (e) {
|
|
2579
|
+
case "sse": return "text/event-stream";
|
|
2580
|
+
case "uint8array": return "application/octet-stream";
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
var Nd = "~effect/http-api/HttpApiSchema/WithHeaders", Pd = "~effect/http-api/HttpApiSchema/WithHeadersValue", Fd = /*#__PURE__*/ Re((e) => Jr(e, Pd));
|
|
2584
|
+
function Id(e, t) {
|
|
2585
|
+
if (J(e)) throw Error("WithHeaders schemas cannot be nested");
|
|
2586
|
+
return Kn(Fd.ast, {
|
|
2587
|
+
[Nd]: Nd,
|
|
2588
|
+
schema: e,
|
|
2589
|
+
headers: hr(t) ? t : O(t)
|
|
2590
|
+
});
|
|
2591
|
+
}
|
|
2592
|
+
var Ld = (e) => ({
|
|
2593
|
+
[Pd]: Pd,
|
|
2594
|
+
body: e.body,
|
|
2595
|
+
headers: e.headers
|
|
2596
|
+
}), J = (e) => hr(e) && Jr(e, "~effect/http-api/HttpApiSchema/WithHeaders");
|
|
2597
|
+
function Rd(e, t, n) {
|
|
2598
|
+
return Kn(e.ast, {
|
|
2599
|
+
[Nd]: Nd,
|
|
2600
|
+
schema: t,
|
|
2601
|
+
headers: n
|
|
2602
|
+
});
|
|
2603
|
+
}
|
|
2604
|
+
function zd(e, t) {
|
|
2605
|
+
return e.annotate({ "~httpApiEncoding": {
|
|
2606
|
+
_tag: t._tag,
|
|
2607
|
+
contentType: t.contentType ?? Bd(t._tag)
|
|
2608
|
+
} });
|
|
2609
|
+
}
|
|
2610
|
+
function Bd(e) {
|
|
2611
|
+
switch (e) {
|
|
2612
|
+
case "Multipart": return "multipart/form-data";
|
|
2613
|
+
case "Json": return "application/json";
|
|
2614
|
+
case "FormUrlEncoded": return "application/x-www-form-urlencoded";
|
|
2615
|
+
case "Uint8Array": return "application/octet-stream";
|
|
2616
|
+
case "Text": return "text/plain";
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
function Vd(e) {
|
|
2620
|
+
return (t) => zd(t, {
|
|
2621
|
+
_tag: "FormUrlEncoded",
|
|
2622
|
+
...e
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
function Hd(e) {
|
|
2626
|
+
return (t) => zd(t, {
|
|
2627
|
+
_tag: "Uint8Array",
|
|
2628
|
+
...e
|
|
2629
|
+
});
|
|
2630
|
+
}
|
|
2631
|
+
var Ud = (e) => {
|
|
2632
|
+
if (Xe(e)) return !0;
|
|
2633
|
+
let t = dt(e);
|
|
2634
|
+
if (Xe(t)) return !0;
|
|
2635
|
+
let n = e.encoding?.[0].to;
|
|
2636
|
+
return n !== void 0 && Xe(n);
|
|
2637
|
+
}, Wd = /*#__PURE__*/ nt("~httpApiEncoding"), Gd = /*#__PURE__*/ nt("~httpApiWithHeaders"), Kd = /*#__PURE__*/ nt("httpApiStatus"), qd = {
|
|
2638
|
+
_tag: "Json",
|
|
2639
|
+
contentType: "application/json"
|
|
2640
|
+
}, Jd = {
|
|
2641
|
+
_tag: "FormUrlEncoded",
|
|
2642
|
+
contentType: "application/x-www-form-urlencoded"
|
|
2643
|
+
};
|
|
2644
|
+
function Yd(e) {
|
|
2645
|
+
return Wd(e) ?? qd;
|
|
2646
|
+
}
|
|
2647
|
+
function Xd(e, t) {
|
|
2648
|
+
return Wd(e) || (ql(t) ? qd : Jd);
|
|
2649
|
+
}
|
|
2650
|
+
function Zd(e) {
|
|
2651
|
+
let t = Yd(e);
|
|
2652
|
+
if (t._tag === "Multipart") throw Error("Multipart is not supported in response");
|
|
2653
|
+
return t;
|
|
2654
|
+
}
|
|
2655
|
+
function Qd(e) {
|
|
2656
|
+
return Kd(e) ?? 200;
|
|
2657
|
+
}
|
|
2658
|
+
function $d(e) {
|
|
2659
|
+
return J(e) ? Kd(e.ast) ?? Qd(e.schema.ast) : Qd(e.ast);
|
|
2660
|
+
}
|
|
2661
|
+
function ef(e) {
|
|
2662
|
+
return J(e) && Wd(e.ast) === void 0 ? Zd(e.schema.ast) : Zd(e.ast);
|
|
2663
|
+
}
|
|
2664
|
+
function tf(e) {
|
|
2665
|
+
return Kd(e) ?? 500;
|
|
2666
|
+
}
|
|
2667
|
+
function nf(e) {
|
|
2668
|
+
return J(e) ? Kd(e.ast) ?? tf(e.schema.ast) : tf(e.ast);
|
|
2669
|
+
}
|
|
2670
|
+
//#endregion
|
|
2671
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/http-api/internal/mediaType.js
|
|
2672
|
+
function rf(e) {
|
|
2673
|
+
let t = e.toLowerCase().trim(), n = t.indexOf(";");
|
|
2674
|
+
return n === -1 ? t : t.slice(0, n).trim();
|
|
2675
|
+
}
|
|
2676
|
+
//#endregion
|
|
2677
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/http-api/HttpApiEndpoint.js
|
|
2678
|
+
var af = "~effect/http-api/HttpApiEndpoint";
|
|
2679
|
+
function of(e) {
|
|
2680
|
+
let t = [];
|
|
2681
|
+
for (let { schemas: n } of e.payload.values()) t.push(...n);
|
|
2682
|
+
return t;
|
|
2683
|
+
}
|
|
2684
|
+
function sf(e) {
|
|
2685
|
+
let t = Array.from(e.success);
|
|
2686
|
+
return Dn(t) ? t : [Ed];
|
|
2687
|
+
}
|
|
2688
|
+
function cf(e) {
|
|
2689
|
+
let t = new Set(e.error), n = e.disableCodecs ? F : _f;
|
|
2690
|
+
for (let r of e.middlewares) {
|
|
2691
|
+
let e = r;
|
|
2692
|
+
for (let r of e.error) t.add(n(r));
|
|
2693
|
+
}
|
|
2694
|
+
return Array.from(t);
|
|
2695
|
+
}
|
|
2696
|
+
var lf = {
|
|
2697
|
+
[af]: af,
|
|
2698
|
+
pipe() {
|
|
2699
|
+
return Or(this, arguments);
|
|
2700
|
+
},
|
|
2701
|
+
prefix(e) {
|
|
2702
|
+
return df({
|
|
2703
|
+
...uf(this),
|
|
2704
|
+
path: ed(this.path, e)
|
|
2705
|
+
});
|
|
2706
|
+
},
|
|
2707
|
+
middleware(e) {
|
|
2708
|
+
return df({
|
|
2709
|
+
...uf(this),
|
|
2710
|
+
middlewares: /* @__PURE__ */ new Set([...this.middlewares, e])
|
|
2711
|
+
});
|
|
2712
|
+
},
|
|
2713
|
+
annotate(e, t) {
|
|
2714
|
+
return df({
|
|
2715
|
+
...uf(this),
|
|
2716
|
+
annotations: pi(this.annotations, e, t)
|
|
2717
|
+
});
|
|
2718
|
+
},
|
|
2719
|
+
annotateMerge(e) {
|
|
2720
|
+
return df({
|
|
2721
|
+
...uf(this),
|
|
2722
|
+
annotations: at(this.annotations, e)
|
|
2723
|
+
});
|
|
2724
|
+
}
|
|
2725
|
+
}, uf = (e) => ({
|
|
2726
|
+
identifier: e.identifier,
|
|
2727
|
+
path: e.path,
|
|
2728
|
+
method: e.method,
|
|
2729
|
+
params: e.params,
|
|
2730
|
+
query: e.query,
|
|
2731
|
+
headers: e.headers,
|
|
2732
|
+
payload: e.payload,
|
|
2733
|
+
success: e.success,
|
|
2734
|
+
error: e.error,
|
|
2735
|
+
annotations: e.annotations,
|
|
2736
|
+
middlewares: e.middlewares,
|
|
2737
|
+
disableCodecs: e.disableCodecs
|
|
2738
|
+
});
|
|
2739
|
+
function df(e) {
|
|
2740
|
+
function t() {}
|
|
2741
|
+
return Object.setPrototypeOf(t, lf), Object.assign(t, e);
|
|
2742
|
+
}
|
|
2743
|
+
var ff = (e) => (t, n, r) => {
|
|
2744
|
+
let i = r?.disableCodecs ?? !1, a = i ? F : w;
|
|
2745
|
+
return df({
|
|
2746
|
+
identifier: t,
|
|
2747
|
+
path: n,
|
|
2748
|
+
method: e,
|
|
2749
|
+
params: pf(r?.params, a),
|
|
2750
|
+
query: pf(r?.query, a),
|
|
2751
|
+
headers: pf(r?.headers, a),
|
|
2752
|
+
payload: mf(r?.payload, e, i),
|
|
2753
|
+
success: gf(r?.success, e, i),
|
|
2754
|
+
error: vf(r?.error, i),
|
|
2755
|
+
annotations: Dt(),
|
|
2756
|
+
middlewares: /* @__PURE__ */ new Set(),
|
|
2757
|
+
disableCodecs: i
|
|
2758
|
+
});
|
|
2759
|
+
};
|
|
2760
|
+
function pf(e, t) {
|
|
2761
|
+
if (e !== void 0) return hr(e) ? t(e) : t(O(e));
|
|
2762
|
+
}
|
|
2763
|
+
function mf(e, t, n) {
|
|
2764
|
+
let r = /* @__PURE__ */ new Map();
|
|
2765
|
+
if (e === void 0) return r;
|
|
2766
|
+
let i = Array.isArray(e) ? e : hr(e) ? [e] : [O(e).pipe(Vd())], a = n ? F : Of;
|
|
2767
|
+
for (let e of i) {
|
|
2768
|
+
let n = Xd(e.ast, t), i = rf(n.contentType), o = r.get(i);
|
|
2769
|
+
if (o) {
|
|
2770
|
+
if (o.encoding._tag !== n._tag) throw Error(`Multiple payload encodings for content-type: ${n.contentType}`);
|
|
2771
|
+
if (o.encoding._tag === "Multipart") throw Error(`Multiple multipart payloads for content-type: ${n.contentType}`);
|
|
2772
|
+
o.schemas.push(a(e, t));
|
|
2773
|
+
} else r.set(i, {
|
|
2774
|
+
encoding: n,
|
|
2775
|
+
schemas: [a(e, t)]
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2778
|
+
return r;
|
|
2779
|
+
}
|
|
2780
|
+
var hf = "effect/http-api/stream/failure";
|
|
2781
|
+
function gf(e, t, n) {
|
|
2782
|
+
if (e === void 0) return /* @__PURE__ */ new Set();
|
|
2783
|
+
let r = br(e);
|
|
2784
|
+
return yf(r, t), new Set(n ? r : r.map(_f));
|
|
2785
|
+
}
|
|
2786
|
+
var _f = /*#__PURE__*/ Hn((e) => kd(e) ? e : J(e) ? Rd(e, kd(e.schema) ? e.schema : Df(e.schema, ef(e)), w(e.headers)) : Ef(e));
|
|
2787
|
+
function vf(e, t) {
|
|
2788
|
+
if (e === void 0) return /* @__PURE__ */ new Set();
|
|
2789
|
+
let n = br(e);
|
|
2790
|
+
for (let e of n) if (kd(J(e) ? e.schema : e)) throw Error("Streaming schemas are not supported in error responses");
|
|
2791
|
+
return xf(n, nf), new Set(t ? n : n.map(_f));
|
|
2792
|
+
}
|
|
2793
|
+
function yf(e, t) {
|
|
2794
|
+
let n = !1, r = /* @__PURE__ */ new Map();
|
|
2795
|
+
for (let i of e) {
|
|
2796
|
+
let e = J(i) ? i.schema : i, a = $d(i);
|
|
2797
|
+
if (kd(e)) {
|
|
2798
|
+
if (Sf(e, t), n) throw Error("Multiple streaming success responses are not supported");
|
|
2799
|
+
n = !0;
|
|
2800
|
+
let i = bf(r, a);
|
|
2801
|
+
if (i.noContent) throw Error(`Cannot combine no-content and streaming success responses for status: ${a}`);
|
|
2802
|
+
if (i.bufferedContentTypes.has(rf(e.contentType))) throw Error(`Cannot combine buffered and streaming success responses for status ${a} and content-type: ${e.contentType}`);
|
|
2803
|
+
r.set(a, {
|
|
2804
|
+
...i,
|
|
2805
|
+
stream: e
|
|
2806
|
+
});
|
|
2807
|
+
} else {
|
|
2808
|
+
let t = bf(r, a), n = Ud(e.ast);
|
|
2809
|
+
if (t.stream !== void 0) {
|
|
2810
|
+
if (n) throw Error(`Cannot combine no-content and streaming success responses for status: ${a}`);
|
|
2811
|
+
let e = ef(i);
|
|
2812
|
+
if (rf(e.contentType) === rf(t.stream.contentType)) throw Error(`Cannot combine buffered and streaming success responses for status ${a} and content-type: ${e.contentType}`);
|
|
2813
|
+
}
|
|
2814
|
+
n || t.bufferedContentTypes.add(rf(ef(i).contentType)), t.noContent = t.noContent || n;
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
xf(e, $d);
|
|
2818
|
+
}
|
|
2819
|
+
function bf(e, t) {
|
|
2820
|
+
let n = e.get(t);
|
|
2821
|
+
return n === void 0 && (n = {
|
|
2822
|
+
bufferedContentTypes: /* @__PURE__ */ new Set(),
|
|
2823
|
+
noContent: !1
|
|
2824
|
+
}, e.set(t, n)), n;
|
|
2825
|
+
}
|
|
2826
|
+
function xf(e, t) {
|
|
2827
|
+
let n = /* @__PURE__ */ new Map();
|
|
2828
|
+
for (let r of e) {
|
|
2829
|
+
let e = t(r), i = Gd(r.ast), a = J(r) ? r.schema : i?.body ?? r, o = Ud(a.ast) ? "" : rf(kd(a) ? a.contentType : ef(r).contentType), s = n.get(e);
|
|
2830
|
+
s === void 0 && (s = {
|
|
2831
|
+
headerContentType: void 0,
|
|
2832
|
+
plainContentTypes: /* @__PURE__ */ new Set()
|
|
2833
|
+
}, n.set(e, s));
|
|
2834
|
+
let c = () => /* @__PURE__ */ Error(`Cannot combine a response with headers with another response for status ${e} and content-type: ${o || "<no content>"}`);
|
|
2835
|
+
if (J(r) || i !== void 0) {
|
|
2836
|
+
if (s.headerContentType !== void 0) throw Error(`Cannot declare multiple responses with headers for status ${e}`);
|
|
2837
|
+
if (s.plainContentTypes.has(o)) throw c();
|
|
2838
|
+
s.headerContentType = o;
|
|
2839
|
+
} else {
|
|
2840
|
+
if (s.headerContentType === o) throw c();
|
|
2841
|
+
s.plainContentTypes.add(o);
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
function Sf(e, t) {
|
|
2846
|
+
if (t === "HEAD") throw Error("HEAD endpoints cannot declare streaming success responses");
|
|
2847
|
+
if (Ad(e) && Cf(e.events.ast)) throw Error(`SSE event name is reserved: ${hf}`);
|
|
2848
|
+
}
|
|
2849
|
+
function Cf(e) {
|
|
2850
|
+
return wf(dt(e), /* @__PURE__ */ new Set());
|
|
2851
|
+
}
|
|
2852
|
+
function wf(e, t) {
|
|
2853
|
+
if (t.has(e)) return !1;
|
|
2854
|
+
if (t.add(e), tr(e)) return e.types.some((e) => wf(e, t));
|
|
2855
|
+
if (m(e)) return wf(e.thunk(), t);
|
|
2856
|
+
if (!ir(e)) return !1;
|
|
2857
|
+
let n = e.propertySignatures.find((e) => e.name === "event");
|
|
2858
|
+
return n !== void 0 && Tf(n.type, t);
|
|
2859
|
+
}
|
|
2860
|
+
function Tf(e, t) {
|
|
2861
|
+
if (t.has(e)) return !1;
|
|
2862
|
+
t.add(e);
|
|
2863
|
+
let n = dt(e);
|
|
2864
|
+
return n === e ? ae(e) ? e.literal === hf : tr(e) ? e.types.some((e) => Tf(e, t)) : m(e) ? Tf(e.thunk(), t) : !1 : Tf(n, t);
|
|
2865
|
+
}
|
|
2866
|
+
function Ef(e) {
|
|
2867
|
+
let t = Zd(e.ast), n = Gd(e.ast);
|
|
2868
|
+
return n === void 0 ? Df(e, t) : e.annotate({ "~httpApiWithHeaders": {
|
|
2869
|
+
...n,
|
|
2870
|
+
bodyCodec: Df(n.body, t),
|
|
2871
|
+
headersCodec: w(n.headers)
|
|
2872
|
+
} });
|
|
2873
|
+
}
|
|
2874
|
+
function Df(e, t) {
|
|
2875
|
+
switch (t._tag) {
|
|
2876
|
+
case "Json": return kt(e);
|
|
2877
|
+
case "FormUrlEncoded": return w(e);
|
|
2878
|
+
case "Text":
|
|
2879
|
+
case "Uint8Array": return e;
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
function Of(e, t) {
|
|
2883
|
+
switch (Xd(e.ast, t)._tag) {
|
|
2884
|
+
case "Json": return kt(e);
|
|
2885
|
+
case "FormUrlEncoded": return w(e);
|
|
2886
|
+
case "Text":
|
|
2887
|
+
case "Uint8Array":
|
|
2888
|
+
case "Multipart": return e;
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
var Y = /*#__PURE__*/ ff("GET"), X = /*#__PURE__*/ ff("POST"), kf = /*#__PURE__*/ ff("PUT"), Af = /*#__PURE__*/ ff("DELETE"), jf = "~effect/http-api/HttpApi", Mf = {
|
|
2892
|
+
[jf]: jf,
|
|
2893
|
+
pipe() {
|
|
2894
|
+
return Or(this, arguments);
|
|
2895
|
+
},
|
|
2896
|
+
add(...e) {
|
|
2897
|
+
let t = { ...this.groups };
|
|
2898
|
+
for (let n of e) Be(t, n.identifier, n);
|
|
2899
|
+
return Pf({
|
|
2900
|
+
...Nf(this),
|
|
2901
|
+
groups: t
|
|
2902
|
+
});
|
|
2903
|
+
},
|
|
2904
|
+
addHttpApi(e) {
|
|
2905
|
+
let t = { ...this.groups };
|
|
2906
|
+
for (let n of Object.keys(e.groups)) {
|
|
2907
|
+
let r = e.groups[n];
|
|
2908
|
+
Be(t, n, r.annotateMerge(at(e.annotations, r.annotations)));
|
|
2909
|
+
}
|
|
2910
|
+
return Pf({
|
|
2911
|
+
...Nf(this),
|
|
2912
|
+
groups: t
|
|
2913
|
+
});
|
|
2914
|
+
},
|
|
2915
|
+
prefix(e) {
|
|
2916
|
+
return Pf({
|
|
2917
|
+
...Nf(this),
|
|
2918
|
+
groups: zn(this.groups, (t) => t.prefix(e))
|
|
2919
|
+
});
|
|
2920
|
+
},
|
|
2921
|
+
middleware(e) {
|
|
2922
|
+
return Pf({
|
|
2923
|
+
...Nf(this),
|
|
2924
|
+
groups: zn(this.groups, (t) => t.middleware(e))
|
|
2925
|
+
});
|
|
2926
|
+
},
|
|
2927
|
+
annotate(e, t) {
|
|
2928
|
+
return Pf({
|
|
2929
|
+
...Nf(this),
|
|
2930
|
+
annotations: pi(this.annotations, e, t)
|
|
2931
|
+
});
|
|
2932
|
+
},
|
|
2933
|
+
annotateMerge(e) {
|
|
2934
|
+
return Pf({
|
|
2935
|
+
...Nf(this),
|
|
2936
|
+
annotations: at(this.annotations, e)
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
}, Nf = (e) => ({
|
|
2940
|
+
identifier: e.identifier,
|
|
2941
|
+
groups: e.groups,
|
|
2942
|
+
annotations: e.annotations
|
|
2943
|
+
}), Pf = (e) => {
|
|
2944
|
+
function t() {}
|
|
2945
|
+
return Object.setPrototypeOf(t, Mf), Object.assign(t, e);
|
|
2946
|
+
}, Ff = (e) => Pf({
|
|
2947
|
+
identifier: e,
|
|
2948
|
+
groups: {},
|
|
2949
|
+
annotations: Dt()
|
|
2950
|
+
}), If = (e, t) => {
|
|
2951
|
+
let n = Object.values(e.groups);
|
|
2952
|
+
for (let r of n) {
|
|
2953
|
+
let n = at(e.annotations, r.annotations);
|
|
2954
|
+
t.onGroup({
|
|
2955
|
+
group: r,
|
|
2956
|
+
mergedAnnotations: n
|
|
2957
|
+
});
|
|
2958
|
+
let i = Object.values(r.endpoints);
|
|
2959
|
+
for (let e of i) (!t.predicate || t.predicate({
|
|
2960
|
+
endpoint: e,
|
|
2961
|
+
group: r
|
|
2962
|
+
})) && t.onEndpoint({
|
|
2963
|
+
group: r,
|
|
2964
|
+
endpoint: e,
|
|
2965
|
+
middleware: e.middlewares,
|
|
2966
|
+
mergedAnnotations: at(n, e.annotations),
|
|
2967
|
+
successes: Lf(sf(e), $d),
|
|
2968
|
+
errors: Lf(cf(e), nf)
|
|
2969
|
+
});
|
|
2970
|
+
}
|
|
2971
|
+
}, Lf = (e, t) => {
|
|
2972
|
+
let n = /* @__PURE__ */ new Map();
|
|
2973
|
+
return e.forEach(r), n;
|
|
2974
|
+
function r(e) {
|
|
2975
|
+
if (kd(J(e) ? e.schema : e)) return;
|
|
2976
|
+
let r = t(e), i = n.get(r);
|
|
2977
|
+
i === void 0 ? n.set(r, [e]) : i.push(e);
|
|
2978
|
+
}
|
|
2979
|
+
}, Rf = class extends (/*#__PURE__*/ Cn()("effect/http-api/HttpApi/ParseOptions")) {}, zf = class extends (/*#__PURE__*/ Cn()("effect/http-api/HttpApi/ParamsParseOptions")) {}, Bf = class extends (/*#__PURE__*/ Cn()("effect/http-api/HttpApi/QueryParseOptions")) {}, Vf = class extends (/*#__PURE__*/ Cn()("effect/http-api/HttpApi/HeadersParseOptions")) {}, Hf = class extends (/*#__PURE__*/ Cn()("effect/http-api/HttpApi/PayloadParseOptions")) {}, Uf = class extends (/*#__PURE__*/ Cn()("effect/http-api/HttpApi/SuccessParseOptions")) {}, Wf = class extends (/*#__PURE__*/ Cn()("effect/http-api/HttpApi/ErrorParseOptions")) {}, Gf = (e) => {
|
|
2980
|
+
let t = ci(e, Rf);
|
|
2981
|
+
return {
|
|
2982
|
+
params: ci(e, zf) ?? t,
|
|
2983
|
+
query: ci(e, Bf) ?? t,
|
|
2984
|
+
headers: ci(e, Vf) ?? t,
|
|
2985
|
+
payload: ci(e, Hf) ?? t,
|
|
2986
|
+
success: ci(e, Uf) ?? t,
|
|
2987
|
+
error: ci(e, Wf) ?? t
|
|
2988
|
+
};
|
|
2989
|
+
}, Kf = "~effect/http-api/HttpApiMiddleware", qf = "~effect/http-api/HttpApiMiddleware/Security", Jf = () => (e, t) => {
|
|
2990
|
+
let n = Mr(), r;
|
|
2991
|
+
n !== 0 && (Pe(2), r = new globalThis.Error(), Pe(n));
|
|
2992
|
+
class i extends Cn()(e) {}
|
|
2993
|
+
let a = i;
|
|
2994
|
+
if (Object.defineProperty(i, "stack", { get() {
|
|
2995
|
+
return r?.stack;
|
|
2996
|
+
} }), a[Kf] = Kf, a.error = Yf(t?.error), a.requiredForClient = t?.requiredForClient ?? !1, t?.security !== void 0) {
|
|
2997
|
+
if (Object.keys(t.security).length === 0) throw Error("HttpApiMiddleware.Service: security object must not be empty");
|
|
2998
|
+
a[qf] = qf, a.security = t.security;
|
|
2999
|
+
}
|
|
3000
|
+
return a;
|
|
3001
|
+
};
|
|
3002
|
+
function Yf(e) {
|
|
3003
|
+
return e === void 0 ? /* @__PURE__ */ new Set() : new Set(Array.isArray(e) ? e : [e]);
|
|
3004
|
+
}
|
|
3005
|
+
//#endregion
|
|
3006
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/http-api/internal/path.js
|
|
3007
|
+
var Xf = /*#__PURE__*/ new Set();
|
|
3008
|
+
function Zf(e) {
|
|
3009
|
+
if (e === void 0) return Xf;
|
|
3010
|
+
let t = de(e.ast);
|
|
3011
|
+
return ir(t) && t.indexSignatures.length === 0 ? new Set(t.propertySignatures.map((e) => String(e.name))) : void 0;
|
|
3012
|
+
}
|
|
3013
|
+
//#endregion
|
|
3014
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/http-api/HttpApiClient.js
|
|
3015
|
+
var Qf = (e, t) => fe(function* () {
|
|
3016
|
+
let n = yield* gn(), r = t.httpClient.pipe(t?.baseUrl === void 0 ? F : Fu(du(t.baseUrl.toString())));
|
|
3017
|
+
function i(e, t, a, o, s) {
|
|
3018
|
+
if (s === -1) return r.execute(a);
|
|
3019
|
+
let c = n.mapUnsafe.get(o[s]);
|
|
3020
|
+
return c === void 0 ? i(e, t, a, o, s - 1) : c({
|
|
3021
|
+
endpoint: t,
|
|
3022
|
+
group: e,
|
|
3023
|
+
request: a,
|
|
3024
|
+
next(n) {
|
|
3025
|
+
return i(e, t, n, o, s - 1);
|
|
3026
|
+
}
|
|
3027
|
+
});
|
|
3028
|
+
}
|
|
3029
|
+
If(e, {
|
|
3030
|
+
predicate: t?.predicate,
|
|
3031
|
+
onGroup(e) {
|
|
3032
|
+
t.onGroup?.(e);
|
|
3033
|
+
},
|
|
3034
|
+
onEndpoint(e) {
|
|
3035
|
+
let { group: n, endpoint: r, errors: a, successes: o, mergedAnnotations: s } = e, c = Gf(s), l = np(r.path, r.params), u = { orElse: Sp }, d = /* @__PURE__ */ new Map();
|
|
3036
|
+
for (let [e, t] of a.entries()) {
|
|
3037
|
+
let n = cp(t);
|
|
3038
|
+
for (let [t, r] of n.entries()) op(d, e, t, rp(r, c.error, c.headers));
|
|
3039
|
+
}
|
|
3040
|
+
for (let [e, t] of d.entries()) {
|
|
3041
|
+
let n = sp(t);
|
|
3042
|
+
u[e] = (e) => A(gr(n(e), (t) => gi(er(tt(new zl({ reason: new Wl({
|
|
3043
|
+
request: e.request,
|
|
3044
|
+
response: e
|
|
3045
|
+
}) })), t))), N);
|
|
3046
|
+
}
|
|
3047
|
+
let f = /* @__PURE__ */ new Map();
|
|
3048
|
+
for (let [e, t] of o.entries()) {
|
|
3049
|
+
let n = cp(t);
|
|
3050
|
+
for (let [t, r] of n.entries()) op(f, e, t, rp(r, c.success, c.headers));
|
|
3051
|
+
}
|
|
3052
|
+
for (let e of fp(r)) {
|
|
3053
|
+
let t = dp(e) ? e.schema : e;
|
|
3054
|
+
op(f, $d(e), t.contentType, pp(e, c.success, c.headers));
|
|
3055
|
+
}
|
|
3056
|
+
for (let [e, t] of f.entries()) u[e] = sp(t);
|
|
3057
|
+
let p = Vo(r.params, (e) => zr(e, c.params)), m = of(r), h = Dn(m) ? zr(ql(r.method) ? wp(m, r.method) : M(m), c.payload) : void 0, g = Vo(r.headers, (e) => zr(e, c.headers)), _ = Vo(r.query, (e) => zr(e, c.query)), v = Array.from(e.middleware, (e) => `${e.key}/Client`), y = te(function* (e) {
|
|
3058
|
+
let a = ru(r.method)(r.path);
|
|
3059
|
+
if (e !== void 0) {
|
|
3060
|
+
if (p !== void 0) {
|
|
3061
|
+
let t = yield* p(e.params);
|
|
3062
|
+
a = uu(a, l(t));
|
|
3063
|
+
}
|
|
3064
|
+
if (h !== void 0) {
|
|
3065
|
+
if (ql(r.method)) {
|
|
3066
|
+
if (e.payload instanceof FormData) a = _u(a, e.payload);
|
|
3067
|
+
else {
|
|
3068
|
+
let t = yield* h(e.payload);
|
|
3069
|
+
a = gu(a, t);
|
|
3070
|
+
}
|
|
3071
|
+
} else {
|
|
3072
|
+
let t = yield* h(e.payload);
|
|
3073
|
+
a = mu(a, t);
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
if (g !== void 0) {
|
|
3077
|
+
let t = yield* g(e.headers);
|
|
3078
|
+
a = su(a, t);
|
|
3079
|
+
}
|
|
3080
|
+
if (_ !== void 0) {
|
|
3081
|
+
let t = yield* _(e.query);
|
|
3082
|
+
a = mu(a, t);
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
let o = yield* i(n, r, a, v, v.length - 1);
|
|
3086
|
+
if (e?.responseMode === "response-only") return o;
|
|
3087
|
+
let s = (u[o.status] ?? u.orElse)(o, e?.sseOptions), c = yield* t.transformResponse === void 0 ? s : t.transformResponse(s);
|
|
3088
|
+
return e?.responseMode === "decoded-and-response" ? [c, o] : c;
|
|
3089
|
+
});
|
|
3090
|
+
t.onEndpoint({
|
|
3091
|
+
...e,
|
|
3092
|
+
endpointFn: y
|
|
3093
|
+
});
|
|
3094
|
+
}
|
|
3095
|
+
});
|
|
3096
|
+
}), $f = (e, t) => A(ku, (n) => ep(e, {
|
|
3097
|
+
...t,
|
|
3098
|
+
httpClient: t?.transformClient ? t.transformClient(n) : n
|
|
3099
|
+
})), ep = (e, t) => {
|
|
3100
|
+
let n = {};
|
|
3101
|
+
return Qf(e, {
|
|
3102
|
+
...t,
|
|
3103
|
+
onGroup({ group: e }) {
|
|
3104
|
+
e.topLevel || Be(n, e.identifier, {});
|
|
3105
|
+
},
|
|
3106
|
+
onEndpoint({ endpoint: e, endpointFn: t, group: r }) {
|
|
3107
|
+
Be(r.topLevel ? n : n[r.identifier], e.identifier, t);
|
|
3108
|
+
}
|
|
3109
|
+
}).pipe(Pn(n));
|
|
3110
|
+
}, tp = /(\/?):(\w+)(\?)?/g, np = (e, t) => {
|
|
3111
|
+
if (t === void 0 || !e.includes(":")) return (t) => e;
|
|
3112
|
+
let n = Zf(t);
|
|
3113
|
+
return (t) => e.replace(tp, (e, r, i, a) => {
|
|
3114
|
+
if (n !== void 0 && !n.has(i)) return e;
|
|
3115
|
+
let o = t[i];
|
|
3116
|
+
if (o === void 0) {
|
|
3117
|
+
if (a !== void 0) return "";
|
|
3118
|
+
throw Error(`Missing path parameter: ${i}`);
|
|
3119
|
+
}
|
|
3120
|
+
return `${r}${encodeURIComponent(o)}`;
|
|
3121
|
+
});
|
|
3122
|
+
};
|
|
3123
|
+
function rp(e, t, n) {
|
|
3124
|
+
let r = e.some((e) => J(e) || Gd(e.ast) !== void 0), i = r ? M(e.map((e) => ap(e, t, n))) : bp(e), a = yt(i, t);
|
|
3125
|
+
return (e) => A(e.arrayBuffer, r ? (t) => a({
|
|
3126
|
+
body: t,
|
|
3127
|
+
headers: e.headers
|
|
3128
|
+
}) : a);
|
|
3129
|
+
}
|
|
3130
|
+
var ip = /*#__PURE__*/ O({
|
|
3131
|
+
body: Jt,
|
|
3132
|
+
headers: Jt
|
|
3133
|
+
});
|
|
3134
|
+
function ap(e, t, n) {
|
|
3135
|
+
let r = Gd(e.ast), i = r === void 0 ? J(e) ? {
|
|
3136
|
+
body: e.schema,
|
|
3137
|
+
headers: e.headers,
|
|
3138
|
+
toValue: Ld
|
|
3139
|
+
} : {
|
|
3140
|
+
body: e,
|
|
3141
|
+
headers: Jt,
|
|
3142
|
+
toValue: (e) => e.body
|
|
3143
|
+
} : {
|
|
3144
|
+
body: r.bodyCodec,
|
|
3145
|
+
headers: r.headersCodec,
|
|
3146
|
+
toValue: r.transformation.decode
|
|
3147
|
+
}, a = yt(xp(i.body).pipe(dn(i.body)), t), o = yt(i.headers, n);
|
|
3148
|
+
return ip.pipe(dn(J(e) ? e : Mt(e), Me({
|
|
3149
|
+
decode: (e) => ur({
|
|
3150
|
+
body: a(e.body),
|
|
3151
|
+
headers: o(e.headers)
|
|
3152
|
+
}).pipe(ct(i.toValue), ar((e) => e.issue)),
|
|
3153
|
+
encode: (e, t) => N(new qe({ message: "Decode only schema" }, e, t))
|
|
3154
|
+
})));
|
|
3155
|
+
}
|
|
3156
|
+
function op(e, t, n, r) {
|
|
3157
|
+
let i = rf(n), a = e.get(t);
|
|
3158
|
+
a === void 0 ? e.set(t, [{
|
|
3159
|
+
contentType: i,
|
|
3160
|
+
decode: r
|
|
3161
|
+
}]) : a.push({
|
|
3162
|
+
contentType: i,
|
|
3163
|
+
decode: r
|
|
3164
|
+
});
|
|
3165
|
+
}
|
|
3166
|
+
function sp(e) {
|
|
3167
|
+
let t = e[0];
|
|
3168
|
+
return e.length === 1 && t !== void 0 ? t.decode : (t, n) => {
|
|
3169
|
+
let r = rf(t.headers["content-type"] ?? ""), i = e.find((e) => e.contentType === r);
|
|
3170
|
+
return i === void 0 ? lp(t, r, e) : i.decode(t, n);
|
|
3171
|
+
};
|
|
3172
|
+
}
|
|
3173
|
+
function cp(e) {
|
|
3174
|
+
let t = /* @__PURE__ */ new Map();
|
|
3175
|
+
for (let n of e) {
|
|
3176
|
+
let e = Ud((J(n) ? n.schema : n).ast) ? "" : rf(ef(n).contentType), r = t.get(e);
|
|
3177
|
+
r === void 0 ? t.set(e, [n]) : r.push(n);
|
|
3178
|
+
}
|
|
3179
|
+
return t;
|
|
3180
|
+
}
|
|
3181
|
+
function lp(e, t, n) {
|
|
3182
|
+
let r = Array.from(new Set(n.map((e) => e.contentType))).join(", ");
|
|
3183
|
+
return N(new zl({ reason: new Gl({
|
|
3184
|
+
request: e.request,
|
|
3185
|
+
response: e,
|
|
3186
|
+
description: `Unsupported response content-type for status ${e.status}: ${t || "<missing>"}. Expected one of: ${r}`
|
|
3187
|
+
}) }));
|
|
3188
|
+
}
|
|
3189
|
+
var up = "effect/http-api/stream/failure", dp = (e) => J(e);
|
|
3190
|
+
function fp(e) {
|
|
3191
|
+
let t = [];
|
|
3192
|
+
for (let n of e.success) kd(J(n) ? n.schema : n) && t.push(n);
|
|
3193
|
+
return t;
|
|
3194
|
+
}
|
|
3195
|
+
function pp(e, t, n) {
|
|
3196
|
+
let r = dp(e), i = r ? e.schema : e, a = jd(i) ? void 0 : {
|
|
3197
|
+
declaration: i,
|
|
3198
|
+
decoder: mp(i, t)
|
|
3199
|
+
}, o = (e, t) => ct(gn(), (n) => Io(a === void 0 ? e.stream : hp(e.stream, a.declaration, a.decoder(t)), n));
|
|
3200
|
+
if (!r) return o;
|
|
3201
|
+
let s = yt(e.headers, n);
|
|
3202
|
+
return (e, t) => A(s(e.headers), (n) => ct(o(e, t), (e) => Ld({
|
|
3203
|
+
body: e,
|
|
3204
|
+
headers: n
|
|
3205
|
+
})));
|
|
3206
|
+
}
|
|
3207
|
+
function mp(e, t) {
|
|
3208
|
+
let n = M([O({
|
|
3209
|
+
id: V(E),
|
|
3210
|
+
event: H(up),
|
|
3211
|
+
data: Zn(kt(_n(e.error, xi())))
|
|
3212
|
+
}), e.events]), r = gd(n, void 0, t);
|
|
3213
|
+
return (e) => e === void 0 ? r : gd(n, e, t);
|
|
3214
|
+
}
|
|
3215
|
+
function hp(e, t, n) {
|
|
3216
|
+
let r = xo(e.pipe(Po, No(n)), (e) => Le(() => {
|
|
3217
|
+
let t;
|
|
3218
|
+
return Fr(() => t === void 0 ? A(e, (e) => {
|
|
3219
|
+
for (let n = 0; n < e.length; n++) {
|
|
3220
|
+
let r = e[n];
|
|
3221
|
+
if (r.event === up && je(r.data)) {
|
|
3222
|
+
if (n === 0) return gi(r.data);
|
|
3223
|
+
t = r.data, e = e.slice(0, n);
|
|
3224
|
+
break;
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
return D(e);
|
|
3228
|
+
}) : gi(t));
|
|
3229
|
+
}));
|
|
3230
|
+
return t.sseMode === "data" ? Oo(r, (e) => e.data) : r;
|
|
3231
|
+
}
|
|
3232
|
+
var gp = /*#__PURE__*/ bn(globalThis.ArrayBuffer, { expected: "ArrayBuffer" }), _p = /*#__PURE__*/ gp.pipe(/*#__PURE__*/ dn(x, /*#__PURE__*/ ge({
|
|
3233
|
+
decode(e) {
|
|
3234
|
+
return new Uint8Array(e);
|
|
3235
|
+
},
|
|
3236
|
+
encode(e) {
|
|
3237
|
+
return e.byteLength === e.buffer.byteLength ? e.buffer : e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength);
|
|
3238
|
+
}
|
|
3239
|
+
}))), vp = /*#__PURE__*/ gp.pipe(/*#__PURE__*/ dn(E, /*#__PURE__*/ ge({
|
|
3240
|
+
decode(e) {
|
|
3241
|
+
return new TextDecoder().decode(e);
|
|
3242
|
+
},
|
|
3243
|
+
encode(e) {
|
|
3244
|
+
let t = new TextEncoder().encode(e);
|
|
3245
|
+
return t.byteLength === t.buffer.byteLength ? t.buffer : t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength);
|
|
3246
|
+
}
|
|
3247
|
+
}))), yp = /*#__PURE__*/ vp.pipe(/*#__PURE__*/ dn(/*#__PURE__*/ M([/*#__PURE__*/ H("").pipe(/*#__PURE__*/ dn(Ut, /*#__PURE__*/ ge({
|
|
3248
|
+
decode: () => void 0,
|
|
3249
|
+
encode: () => ""
|
|
3250
|
+
}))), Ce])));
|
|
3251
|
+
function bp(e) {
|
|
3252
|
+
return M(e.map(t));
|
|
3253
|
+
function t(e) {
|
|
3254
|
+
return xp(e).pipe(dn(e));
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
function xp(e) {
|
|
3258
|
+
switch (Zd(e.ast)._tag) {
|
|
3259
|
+
case "Json": return st(dt(e.ast)) ? yp.pipe(dn(Jt, ge({
|
|
3260
|
+
decode: (e) => e === void 0 ? null : e,
|
|
3261
|
+
encode: (e) => e === null ? void 0 : e
|
|
3262
|
+
}))) : yp;
|
|
3263
|
+
case "FormUrlEncoded": return vp.pipe(dn(pt, ge({
|
|
3264
|
+
decode: (e) => Ee(new URLSearchParams(e)),
|
|
3265
|
+
encode: qt
|
|
3266
|
+
})));
|
|
3267
|
+
case "Uint8Array": return _p;
|
|
3268
|
+
case "Text": return vp;
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
var Sp = (e) => N(new zl({ reason: new Gl({
|
|
3272
|
+
request: e.request,
|
|
3273
|
+
response: e
|
|
3274
|
+
}) })), Cp = /*#__PURE__*/ Re(Cl);
|
|
3275
|
+
function wp(e, t) {
|
|
3276
|
+
return M(e.map((e) => Ep(e, t)));
|
|
3277
|
+
}
|
|
3278
|
+
var Tp = /*#__PURE__*/ new WeakMap();
|
|
3279
|
+
function Ep(e, t) {
|
|
3280
|
+
let n = e.ast, r = Tp.get(n);
|
|
3281
|
+
if (r !== void 0) return r;
|
|
3282
|
+
let i = Xd(n, t), a = Cp.pipe(dn(e, Me({
|
|
3283
|
+
decode(e, t) {
|
|
3284
|
+
return N(new qe({ message: "Encode only schema" }, e, t));
|
|
3285
|
+
},
|
|
3286
|
+
encode(e, t) {
|
|
3287
|
+
switch (i._tag) {
|
|
3288
|
+
case "Multipart": return N(new qe({ message: "Payload must be a FormData" }, e, t));
|
|
3289
|
+
case "Json": try {
|
|
3290
|
+
let t = JSON.stringify(e);
|
|
3291
|
+
return D(Nl(t, i.contentType));
|
|
3292
|
+
} catch {
|
|
3293
|
+
return N(new Ct({ expected: "a JSON-serializable request body" }, e, t));
|
|
3294
|
+
}
|
|
3295
|
+
case "Text": return typeof e == "string" ? D(Nl(e, i.contentType)) : N(new Ct({ message: "Expected a string" }, e, t));
|
|
3296
|
+
case "FormUrlEncoded": return Br(e) ? D(Pl(Ee(e), i.contentType)) : N(new Ct({ message: "Expected a record" }, e, t));
|
|
3297
|
+
case "Uint8Array": return e instanceof Uint8Array ? D(kl(e, i.contentType)) : N(new Ct({ message: "Expected a Uint8Array" }, e, t));
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
})));
|
|
3301
|
+
return Tp.set(n, a), a;
|
|
3302
|
+
}
|
|
3303
|
+
//#endregion
|
|
3304
|
+
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/http-api/HttpApiGroup.js
|
|
3305
|
+
var Dp = "~effect/http-api/HttpApiGroup", Op = {
|
|
3306
|
+
[Dp]: Dp,
|
|
3307
|
+
add(...e) {
|
|
3308
|
+
let t = { ...this.endpoints };
|
|
3309
|
+
for (let n of e) Be(t, n.identifier, n);
|
|
3310
|
+
return Ap({
|
|
3311
|
+
...kp(this),
|
|
3312
|
+
endpoints: t
|
|
3313
|
+
});
|
|
3314
|
+
},
|
|
3315
|
+
prefix(e) {
|
|
3316
|
+
return Ap({
|
|
3317
|
+
...kp(this),
|
|
3318
|
+
endpoints: zn(this.endpoints, (t) => t.prefix(e))
|
|
3319
|
+
});
|
|
3320
|
+
},
|
|
3321
|
+
middleware(e) {
|
|
3322
|
+
return Ap({
|
|
3323
|
+
...kp(this),
|
|
3324
|
+
endpoints: zn(this.endpoints, (t) => t.middleware(e))
|
|
3325
|
+
});
|
|
3326
|
+
},
|
|
3327
|
+
annotateMerge(e) {
|
|
3328
|
+
return Ap({
|
|
3329
|
+
...kp(this),
|
|
3330
|
+
annotations: at(this.annotations, e)
|
|
3331
|
+
});
|
|
3332
|
+
},
|
|
3333
|
+
annotate(e, t) {
|
|
3334
|
+
return Ap({
|
|
3335
|
+
...kp(this),
|
|
3336
|
+
annotations: pi(this.annotations, e, t)
|
|
3337
|
+
});
|
|
3338
|
+
},
|
|
3339
|
+
annotateEndpointsMerge(e) {
|
|
3340
|
+
return Ap({
|
|
3341
|
+
...kp(this),
|
|
3342
|
+
endpoints: zn(this.endpoints, (t) => t.annotateMerge(e))
|
|
3343
|
+
});
|
|
3344
|
+
},
|
|
3345
|
+
annotateEndpoints(e, t) {
|
|
3346
|
+
return Ap({
|
|
3347
|
+
...kp(this),
|
|
3348
|
+
endpoints: zn(this.endpoints, (n) => n.annotate(e, t))
|
|
3349
|
+
});
|
|
3350
|
+
},
|
|
3351
|
+
pipe() {
|
|
3352
|
+
return Or(this, arguments);
|
|
3353
|
+
}
|
|
3354
|
+
}, kp = (e) => ({
|
|
3355
|
+
identifier: e.identifier,
|
|
3356
|
+
topLevel: e.topLevel,
|
|
3357
|
+
endpoints: e.endpoints,
|
|
3358
|
+
annotations: e.annotations
|
|
3359
|
+
}), Ap = (e) => {
|
|
3360
|
+
function t() {}
|
|
3361
|
+
return Object.setPrototypeOf(t, Op), t.key = `effect/http-api/HttpApiGroup/${e.identifier}`, Object.assign(t, e);
|
|
3362
|
+
}, jp = (e, t) => Ap({
|
|
3363
|
+
identifier: e,
|
|
3364
|
+
topLevel: t?.topLevel ?? !1,
|
|
3365
|
+
endpoints: {},
|
|
3366
|
+
annotations: Dt()
|
|
3367
|
+
}), Mp = E.check(R()).pipe(Ir("PublicationScheduleId")), Np = O({
|
|
3368
|
+
documentId: I,
|
|
3369
|
+
revisionId: T,
|
|
3370
|
+
action: j(["publish", "unpublish"])
|
|
3371
|
+
}), Pp = z(Np).check(Vn(1), P(100)), Fp = z(O({
|
|
3372
|
+
documentId: I,
|
|
3373
|
+
action: j(["publish", "unpublish"]),
|
|
3374
|
+
revisionId: W(T)
|
|
3375
|
+
})).check(Vn(1), P(100)), Ip = j([
|
|
3376
|
+
"details",
|
|
3377
|
+
"content",
|
|
3378
|
+
"new",
|
|
3379
|
+
"offline"
|
|
3380
|
+
]), Lp = O({
|
|
3381
|
+
...ti,
|
|
3382
|
+
code: dr,
|
|
3383
|
+
documentId: g(I),
|
|
3384
|
+
message: E
|
|
3385
|
+
}), Rp = O({
|
|
3386
|
+
...ti,
|
|
3387
|
+
message: E
|
|
3388
|
+
}), zp = O({
|
|
3389
|
+
stamp: E,
|
|
3390
|
+
changes: Pp,
|
|
3391
|
+
documents: z(O({
|
|
3392
|
+
documentId: I,
|
|
3393
|
+
title: E,
|
|
3394
|
+
beforePath: g(E),
|
|
3395
|
+
afterPath: g(E),
|
|
3396
|
+
sections: z(Ip)
|
|
3397
|
+
})),
|
|
3398
|
+
issues: z(Lp)
|
|
3399
|
+
}), Bp = O({
|
|
3400
|
+
id: Mp,
|
|
3401
|
+
label: E,
|
|
3402
|
+
changes: Pp,
|
|
3403
|
+
publishAt: E,
|
|
3404
|
+
status: j([
|
|
3405
|
+
"pending",
|
|
3406
|
+
"completed",
|
|
3407
|
+
"failed",
|
|
3408
|
+
"cancelled"
|
|
3409
|
+
]),
|
|
3410
|
+
requestedBy: k,
|
|
3411
|
+
requestedByName: g(E),
|
|
3412
|
+
failure: g(Rp)
|
|
3413
|
+
}), Vp = j([
|
|
3414
|
+
"administrator",
|
|
3415
|
+
"editor",
|
|
3416
|
+
"viewer"
|
|
3417
|
+
]), Hp = k.check(P(320), Dr(/^[^\s@]+@[^\s@]+\.[^\s@]+$/u)), Up = O({
|
|
3418
|
+
id: k,
|
|
3419
|
+
name: k,
|
|
3420
|
+
email: Hp,
|
|
3421
|
+
role: Vp,
|
|
3422
|
+
createdAt: E
|
|
3423
|
+
}), Wp = O({
|
|
3424
|
+
people: z(Up),
|
|
3425
|
+
total: U.check(lr(0))
|
|
3426
|
+
}), Gp = O({
|
|
3427
|
+
name: k.check(P(200)),
|
|
3428
|
+
email: Hp,
|
|
3429
|
+
role: Vp
|
|
3430
|
+
}), Kp = O({
|
|
3431
|
+
email: Hp,
|
|
3432
|
+
token: k,
|
|
3433
|
+
expiresAt: E
|
|
3434
|
+
}), qp = E.check(R()).pipe(Ir("PresenceClientId")), Jp = O({
|
|
3435
|
+
id: E,
|
|
3436
|
+
name: E
|
|
3437
|
+
}), Yp = E.check(Vn(1), P(1024)), Xp = O({
|
|
3438
|
+
anchor: Yp,
|
|
3439
|
+
head: Yp
|
|
3440
|
+
}), Zp = O({
|
|
3441
|
+
clientId: qp,
|
|
3442
|
+
cursor: g(Xp)
|
|
3443
|
+
}), Qp = O({ clientId: qp }), $p = O({
|
|
3444
|
+
clientId: qp,
|
|
3445
|
+
userId: E,
|
|
3446
|
+
name: E,
|
|
3447
|
+
cursor: Xp
|
|
3448
|
+
}), em = O({
|
|
3449
|
+
participants: z(Jp),
|
|
3450
|
+
cursors: z($p)
|
|
3451
|
+
}), tm = j(/* @__PURE__ */ "document.created,document.updated,document.settings.updated,document.moved,document.trashed,document.revision.restored,document.revision-link.created,document.revision-link.revoked,document.untrashed,document.published,document.unpublished,document.schedule.created,document.schedule.cancelled,document.schedule.completed,document.schedule.failed,media.uploaded,media.removed,media.cleaned,seo.saved,seo.published,user.created,user.removed,user.role.changed,user.sessions.revoked,authentication.signed-in,authentication.signed-out,authentication.password.changed,authentication.password.reset".split(",")), nm = j([
|
|
3452
|
+
"document",
|
|
3453
|
+
"media",
|
|
3454
|
+
"media-library",
|
|
3455
|
+
"seo",
|
|
3456
|
+
"user"
|
|
3457
|
+
]), rm = M([
|
|
3458
|
+
O({
|
|
3459
|
+
kind: hi("document"),
|
|
3460
|
+
documentId: I
|
|
3461
|
+
}),
|
|
3462
|
+
O({
|
|
3463
|
+
kind: hi("media"),
|
|
3464
|
+
mediaId: ze
|
|
3465
|
+
}),
|
|
3466
|
+
O({ kind: hi("media-library") }),
|
|
3467
|
+
O({ kind: hi("seo") }),
|
|
3468
|
+
O({
|
|
3469
|
+
kind: hi("user"),
|
|
3470
|
+
userId: k
|
|
3471
|
+
})
|
|
3472
|
+
]).pipe(ui("kind")), im = O({
|
|
3473
|
+
id: k,
|
|
3474
|
+
name: k,
|
|
3475
|
+
email: W(E)
|
|
3476
|
+
}), am = O({
|
|
3477
|
+
id: E.check(R()),
|
|
3478
|
+
action: tm,
|
|
3479
|
+
actor: im,
|
|
3480
|
+
requestId: E.check(R()),
|
|
3481
|
+
reason: W(k.check(P(1e3))),
|
|
3482
|
+
target: rm,
|
|
3483
|
+
details: ne,
|
|
3484
|
+
occurredAt: oi
|
|
3485
|
+
}), om = O({
|
|
3486
|
+
action: W(tm),
|
|
3487
|
+
actorId: W(k),
|
|
3488
|
+
cursor: W(k),
|
|
3489
|
+
offset: W(U.check(lr(0))),
|
|
3490
|
+
limit: W(U.check(Ur({
|
|
3491
|
+
minimum: 1,
|
|
3492
|
+
maximum: 100
|
|
3493
|
+
}))),
|
|
3494
|
+
requestId: W(E.check(R())),
|
|
3495
|
+
targetId: W(k),
|
|
3496
|
+
targetKind: W(nm)
|
|
3497
|
+
}), sm = O({
|
|
3498
|
+
entries: z(am),
|
|
3499
|
+
nextCursor: W(k),
|
|
3500
|
+
total: U.check(lr(0))
|
|
3501
|
+
}), cm = O({ draft: E }), lm = O({
|
|
3502
|
+
identity: fn,
|
|
3503
|
+
draft: si,
|
|
3504
|
+
baseline: cm
|
|
3505
|
+
}), um = O({
|
|
3506
|
+
format: H(1),
|
|
3507
|
+
documents: z(lm),
|
|
3508
|
+
media: z(Pt)
|
|
3509
|
+
}), dm = O({
|
|
3510
|
+
format: H(1),
|
|
3511
|
+
documents: z(lm)
|
|
3512
|
+
}), fm = O({
|
|
3513
|
+
documentId: fn.fields.documentId,
|
|
3514
|
+
action: j([
|
|
3515
|
+
"create",
|
|
3516
|
+
"update",
|
|
3517
|
+
"unchanged",
|
|
3518
|
+
"conflict"
|
|
3519
|
+
]),
|
|
3520
|
+
reason: W(E)
|
|
3521
|
+
}), pm = O({ items: z(fm) }), mm = O({
|
|
3522
|
+
documentId: fn.fields.documentId,
|
|
3523
|
+
revisionId: T,
|
|
3524
|
+
documentVersion: At,
|
|
3525
|
+
websiteRevisionId: g(T)
|
|
3526
|
+
}), hm = O({
|
|
3527
|
+
items: pm.fields.items,
|
|
3528
|
+
documents: z(lm),
|
|
3529
|
+
versions: z(mm)
|
|
3530
|
+
}), gm = E.check(R()), _m = M([O({
|
|
3531
|
+
kind: H("url"),
|
|
3532
|
+
href: E
|
|
3533
|
+
}), O({
|
|
3534
|
+
kind: H("document"),
|
|
3535
|
+
documentId: gm,
|
|
3536
|
+
path: E
|
|
3537
|
+
})]);
|
|
3538
|
+
function vm(e) {
|
|
3539
|
+
if (!e || e !== e.trim() || /\s|\\/u.test(e)) return !1;
|
|
3540
|
+
if (e.startsWith("/") && !e.startsWith("//") || e.startsWith("#") || /^mailto:[^\s@]+@[^\s@]+$/iu.test(e) || /^tel:[+\d][\d -]*$/u.test(e)) return !0;
|
|
3541
|
+
if (!/^https?:\/\//iu.test(e)) return !1;
|
|
3542
|
+
try {
|
|
3543
|
+
let t = new URL(e);
|
|
3544
|
+
return (t.protocol === "http:" || t.protocol === "https:") && !!t.hostname && !t.username && !t.password;
|
|
3545
|
+
} catch {
|
|
3546
|
+
return !1;
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
//#endregion
|
|
3550
|
+
//#region ../model/src/Image.ts
|
|
3551
|
+
var ym = U.check(Ur({
|
|
3552
|
+
minimum: 0,
|
|
3553
|
+
maximum: 100
|
|
3554
|
+
})), bm = En.check(Ur({
|
|
3555
|
+
minimum: 1,
|
|
3556
|
+
maximum: 3
|
|
3557
|
+
})), xm = O({
|
|
3558
|
+
focalX: W(ym),
|
|
3559
|
+
focalY: W(ym),
|
|
3560
|
+
zoom: W(bm)
|
|
3561
|
+
}), Sm = O({
|
|
3562
|
+
kind: H("image"),
|
|
3563
|
+
mediaId: E.check(R()),
|
|
3564
|
+
alt: W(E),
|
|
3565
|
+
frame: W(j(["square", "wide"])),
|
|
3566
|
+
...xm.fields
|
|
3567
|
+
});
|
|
3568
|
+
function Cm(e) {
|
|
3569
|
+
return e === "square" ? 1 : 16 / 9;
|
|
3570
|
+
}
|
|
3571
|
+
function wm(e) {
|
|
3572
|
+
let t = e.focalX ?? 50, n = e.focalY ?? 50, r = e.zoom ?? 1;
|
|
3573
|
+
return {
|
|
3574
|
+
objectFit: "cover",
|
|
3575
|
+
objectPosition: `${t}% ${n}%`,
|
|
3576
|
+
transform: `scale(${r}) translate(${(50 - t) * (r - 1) / r}%, ${(50 - n) * (r - 1) / r}%)`
|
|
3577
|
+
};
|
|
3578
|
+
}
|
|
3579
|
+
var Tm = U.check(Ur({
|
|
3580
|
+
minimum: 1,
|
|
3581
|
+
maximum: 4096
|
|
3582
|
+
})), Em = U.check(Ur({
|
|
3583
|
+
minimum: 1,
|
|
3584
|
+
maximum: 100
|
|
3585
|
+
})), Dm = j([
|
|
3586
|
+
"contain",
|
|
3587
|
+
"cover",
|
|
3588
|
+
"fill",
|
|
3589
|
+
"inside",
|
|
3590
|
+
"outside"
|
|
3591
|
+
]), Om = j([
|
|
3592
|
+
"avif",
|
|
3593
|
+
"gif",
|
|
3594
|
+
"jpeg",
|
|
3595
|
+
"png",
|
|
3596
|
+
"webp"
|
|
3597
|
+
]), km = O({
|
|
3598
|
+
width: W(Tm),
|
|
3599
|
+
height: W(Tm),
|
|
3600
|
+
fit: W(Dm),
|
|
3601
|
+
format: W(Om),
|
|
3602
|
+
quality: W(Em)
|
|
3603
|
+
});
|
|
3604
|
+
function Am(e, t = {}) {
|
|
3605
|
+
let n = $t(km)(t);
|
|
3606
|
+
return `/_cms/image/${[
|
|
3607
|
+
n.width === void 0 ? void 0 : `w_${n.width}`,
|
|
3608
|
+
n.height === void 0 ? void 0 : `h_${n.height}`,
|
|
3609
|
+
n.fit === void 0 ? void 0 : `fit_${n.fit}`,
|
|
3610
|
+
n.format === void 0 ? void 0 : `f_${n.format}`,
|
|
3611
|
+
n.quality === void 0 ? void 0 : `q_${n.quality}`
|
|
3612
|
+
].filter((e) => e !== void 0).join(",") || "_"}/${e}`;
|
|
3613
|
+
}
|
|
3614
|
+
//#endregion
|
|
3615
|
+
//#region ../model/src/Fields.ts
|
|
3616
|
+
var Z = {
|
|
3617
|
+
name: k.check(Dr(/^[a-z][a-zA-Z0-9]*$/u)),
|
|
3618
|
+
label: k,
|
|
3619
|
+
description: W(E),
|
|
3620
|
+
required: L
|
|
3621
|
+
}, jm = {
|
|
3622
|
+
minLength: W(U.check(lr(0))),
|
|
3623
|
+
maxLength: W(U.check(lr(0)))
|
|
3624
|
+
}, Mm = M([
|
|
3625
|
+
O({
|
|
3626
|
+
...Z,
|
|
3627
|
+
...jm,
|
|
3628
|
+
kind: H("text"),
|
|
3629
|
+
defaultValue: W(E)
|
|
3630
|
+
}),
|
|
3631
|
+
O({
|
|
3632
|
+
...Z,
|
|
3633
|
+
...jm,
|
|
3634
|
+
kind: H("textarea"),
|
|
3635
|
+
defaultValue: W(E)
|
|
3636
|
+
}),
|
|
3637
|
+
O({
|
|
3638
|
+
...Z,
|
|
3639
|
+
kind: H("date"),
|
|
3640
|
+
defaultValue: W(E)
|
|
3641
|
+
}),
|
|
3642
|
+
O({
|
|
3643
|
+
...Z,
|
|
3644
|
+
kind: H("icon"),
|
|
3645
|
+
defaultValue: W(E)
|
|
3646
|
+
}),
|
|
3647
|
+
O({
|
|
3648
|
+
...Z,
|
|
3649
|
+
kind: H("link"),
|
|
3650
|
+
defaultValue: W(_m)
|
|
3651
|
+
}),
|
|
3652
|
+
O({
|
|
3653
|
+
...Z,
|
|
3654
|
+
kind: H("media"),
|
|
3655
|
+
mediaKind: jr,
|
|
3656
|
+
defaultValue: W(mt)
|
|
3657
|
+
}),
|
|
3658
|
+
O({
|
|
3659
|
+
...Z,
|
|
3660
|
+
kind: H("image"),
|
|
3661
|
+
defaultValue: W(Sm)
|
|
3662
|
+
}),
|
|
3663
|
+
O({
|
|
3664
|
+
...Z,
|
|
3665
|
+
kind: H("number"),
|
|
3666
|
+
defaultValue: W(En),
|
|
3667
|
+
integer: W(L),
|
|
3668
|
+
min: W(En),
|
|
3669
|
+
max: W(En)
|
|
3670
|
+
}),
|
|
3671
|
+
O({
|
|
3672
|
+
...Z,
|
|
3673
|
+
kind: H("boolean"),
|
|
3674
|
+
defaultValue: W(L)
|
|
3675
|
+
}),
|
|
3676
|
+
O({
|
|
3677
|
+
...Z,
|
|
3678
|
+
kind: H("select"),
|
|
3679
|
+
options: z(O({
|
|
3680
|
+
value: k,
|
|
3681
|
+
label: k
|
|
3682
|
+
})),
|
|
3683
|
+
defaultValue: W(E)
|
|
3684
|
+
}),
|
|
3685
|
+
O({
|
|
3686
|
+
...Z,
|
|
3687
|
+
kind: H("multi-select"),
|
|
3688
|
+
options: z(O({
|
|
3689
|
+
value: k,
|
|
3690
|
+
label: k
|
|
3691
|
+
})),
|
|
3692
|
+
defaultValue: W(z(k))
|
|
3693
|
+
}),
|
|
3694
|
+
O({
|
|
3695
|
+
...Z,
|
|
3696
|
+
kind: H("document"),
|
|
3697
|
+
collections: W(z(sr))
|
|
3698
|
+
})
|
|
3699
|
+
]), Nm = M([
|
|
3700
|
+
Mm,
|
|
3701
|
+
O({
|
|
3702
|
+
...Z,
|
|
3703
|
+
kind: H("object"),
|
|
3704
|
+
fields: z(Tn(() => Nm))
|
|
3705
|
+
}),
|
|
3706
|
+
O({
|
|
3707
|
+
...Z,
|
|
3708
|
+
kind: H("list"),
|
|
3709
|
+
fields: z(Tn(() => Nm))
|
|
3710
|
+
})
|
|
3711
|
+
]), Pm = O({
|
|
3712
|
+
collection: sr,
|
|
3713
|
+
label: k,
|
|
3714
|
+
pattern: k,
|
|
3715
|
+
fields: z(Nm),
|
|
3716
|
+
title: W(O(jm)),
|
|
3717
|
+
templates: W(z(O({
|
|
3718
|
+
id: k,
|
|
3719
|
+
label: k,
|
|
3720
|
+
fields: ne,
|
|
3721
|
+
body: jn
|
|
3722
|
+
}))),
|
|
3723
|
+
body: W(O({
|
|
3724
|
+
blocks: W(z(k)),
|
|
3725
|
+
groups: W(z(k)),
|
|
3726
|
+
presets: W(z(O({
|
|
3727
|
+
id: k,
|
|
3728
|
+
label: k,
|
|
3729
|
+
body: jn
|
|
3730
|
+
})))
|
|
3731
|
+
}))
|
|
3732
|
+
}), Fm = E.check(R()).pipe(Ir("ListItemId")), Im = 6e4, Lm = j([
|
|
3733
|
+
"text",
|
|
3734
|
+
"email",
|
|
3735
|
+
"textarea",
|
|
3736
|
+
"number",
|
|
3737
|
+
"checkbox",
|
|
3738
|
+
"select"
|
|
3739
|
+
]), Rm = j([
|
|
3740
|
+
"required",
|
|
3741
|
+
"minLength",
|
|
3742
|
+
"maxLength",
|
|
3743
|
+
"min",
|
|
3744
|
+
"max"
|
|
3745
|
+
]), zm = O({
|
|
3746
|
+
label: k,
|
|
3747
|
+
fieldTypes: z(Lm).check(Vn(1)),
|
|
3748
|
+
rules: z(Rm)
|
|
3749
|
+
}), Bm = O({
|
|
3750
|
+
id: k,
|
|
3751
|
+
label: k
|
|
3752
|
+
}), Vm = {
|
|
3753
|
+
id: k,
|
|
3754
|
+
label: k,
|
|
3755
|
+
answerKey: W(k),
|
|
3756
|
+
help: W(E),
|
|
3757
|
+
required: W(L)
|
|
3758
|
+
}, Hm = (e) => O({
|
|
3759
|
+
...Vm,
|
|
3760
|
+
type: j([e]),
|
|
3761
|
+
minLength: W(U.check(lr(0))),
|
|
3762
|
+
maxLength: W(U.check(lr(0)))
|
|
3763
|
+
}), Um = M([
|
|
3764
|
+
Hm("text"),
|
|
3765
|
+
Hm("email"),
|
|
3766
|
+
Hm("textarea"),
|
|
3767
|
+
O({
|
|
3768
|
+
...Vm,
|
|
3769
|
+
type: H("number"),
|
|
3770
|
+
min: W(En),
|
|
3771
|
+
max: W(En)
|
|
3772
|
+
}),
|
|
3773
|
+
O({
|
|
3774
|
+
...Vm,
|
|
3775
|
+
type: H("checkbox")
|
|
3776
|
+
}),
|
|
3777
|
+
O({
|
|
3778
|
+
...Vm,
|
|
3779
|
+
type: H("select"),
|
|
3780
|
+
options: se(Bm)
|
|
3781
|
+
})
|
|
3782
|
+
]), Wm = O({
|
|
3783
|
+
id: k,
|
|
3784
|
+
title: k,
|
|
3785
|
+
fields: z(Um).check(Vn(1), P(100))
|
|
3786
|
+
}), Gm = z(Wm).check(Vn(1), P(20)), Km = {
|
|
3787
|
+
documentId: I,
|
|
3788
|
+
locale: W(E),
|
|
3789
|
+
blockId: E.check(R()),
|
|
3790
|
+
revision: E.check(P(Im))
|
|
3791
|
+
}, qm = O(Km), Jm = it(E, M([
|
|
3792
|
+
E,
|
|
3793
|
+
En,
|
|
3794
|
+
L,
|
|
3795
|
+
or
|
|
3796
|
+
]));
|
|
3797
|
+
O({
|
|
3798
|
+
...Km,
|
|
3799
|
+
values: Jm
|
|
3800
|
+
});
|
|
3801
|
+
var Ym = M([
|
|
3802
|
+
O({ code: j([
|
|
3803
|
+
"required",
|
|
3804
|
+
"unchecked",
|
|
3805
|
+
"boolean",
|
|
3806
|
+
"number",
|
|
3807
|
+
"text",
|
|
3808
|
+
"option",
|
|
3809
|
+
"email",
|
|
3810
|
+
"unknownAnswers",
|
|
3811
|
+
"rejected"
|
|
3812
|
+
]) }),
|
|
3813
|
+
O({
|
|
3814
|
+
code: j(["min", "max"]),
|
|
3815
|
+
limit: En
|
|
3816
|
+
}),
|
|
3817
|
+
O({
|
|
3818
|
+
code: j(["minLength", "maxLength"]),
|
|
3819
|
+
limit: U.check(lr(0))
|
|
3820
|
+
}),
|
|
3821
|
+
O({
|
|
3822
|
+
code: H("custom"),
|
|
3823
|
+
message: k
|
|
3824
|
+
})
|
|
3825
|
+
]), Xm = it(E, Ym);
|
|
3826
|
+
M([
|
|
3827
|
+
O({
|
|
3828
|
+
status: H("accepted"),
|
|
3829
|
+
reference: W(k)
|
|
3830
|
+
}),
|
|
3831
|
+
O({
|
|
3832
|
+
status: H("invalid"),
|
|
3833
|
+
errors: Xm
|
|
3834
|
+
}),
|
|
3835
|
+
O({ status: H("stale") }),
|
|
3836
|
+
O({ status: H("unavailable") }),
|
|
3837
|
+
O({ status: H("failed") })
|
|
3838
|
+
]);
|
|
3839
|
+
//#endregion
|
|
3840
|
+
//#region ../model/src/Blocks.ts
|
|
3841
|
+
var Zm = k.check(Dr(/^[a-z][a-z0-9-]*$/u)), Qm = O({
|
|
3842
|
+
name: k.check(Dr(/^[a-z][a-zA-Z0-9]*$/u)),
|
|
3843
|
+
label: k,
|
|
3844
|
+
kind: j([
|
|
3845
|
+
"text",
|
|
3846
|
+
"inline-text",
|
|
3847
|
+
"rich-text",
|
|
3848
|
+
"blocks",
|
|
3849
|
+
"content"
|
|
3850
|
+
]),
|
|
3851
|
+
required: L,
|
|
3852
|
+
features: W(z(j([
|
|
3853
|
+
"bold",
|
|
3854
|
+
"italic",
|
|
3855
|
+
"link",
|
|
3856
|
+
"code",
|
|
3857
|
+
"bullet-list"
|
|
3858
|
+
]))),
|
|
3859
|
+
blocks: W(z(Zm)),
|
|
3860
|
+
groups: W(z(k)),
|
|
3861
|
+
initial: W(z(ne))
|
|
3862
|
+
}), $m = O({
|
|
3863
|
+
name: Zm,
|
|
3864
|
+
label: k,
|
|
3865
|
+
description: W(E),
|
|
3866
|
+
group: W(k),
|
|
3867
|
+
icon: W(k),
|
|
3868
|
+
fields: z(Nm),
|
|
3869
|
+
slots: z(Qm),
|
|
3870
|
+
form: W(zm)
|
|
3871
|
+
}), eh = E.check(R()).pipe(Ir("BlockId")), th = O({
|
|
3872
|
+
version: H(1),
|
|
3873
|
+
collections: z(Pm),
|
|
3874
|
+
blocks: z($m),
|
|
3875
|
+
locales: g(Ar)
|
|
3876
|
+
}), nh = O({
|
|
3877
|
+
documentId: I,
|
|
3878
|
+
state: j([
|
|
3879
|
+
"draft",
|
|
3880
|
+
"published",
|
|
3881
|
+
"trashed"
|
|
3882
|
+
]),
|
|
3883
|
+
route: g(E),
|
|
3884
|
+
severity: j(["error", "warning"]),
|
|
3885
|
+
issues: z(k)
|
|
3886
|
+
});
|
|
3887
|
+
O({
|
|
3888
|
+
compatible: L,
|
|
3889
|
+
checkedDocuments: O({
|
|
3890
|
+
drafts: U,
|
|
3891
|
+
published: U,
|
|
3892
|
+
trashed: U
|
|
3893
|
+
}),
|
|
3894
|
+
documents: z(nh)
|
|
3895
|
+
});
|
|
3896
|
+
//#endregion
|
|
3897
|
+
//#region ../model/src/Data.ts
|
|
3898
|
+
var rh = E.check(hn((e) => Number.isFinite(Date.parse(e)), { expected: "an ISO date and time" })), ih = O({
|
|
3899
|
+
identity: Xr.fields.identity,
|
|
3900
|
+
settings: Xr.fields.settings,
|
|
3901
|
+
latestRevisionId: Xr.fields.latestRevisionId,
|
|
3902
|
+
websiteRevisionId: Xr.fields.websiteRevisionId,
|
|
3903
|
+
createdAt: rh,
|
|
3904
|
+
updatedAt: rh,
|
|
3905
|
+
updatedBy: E,
|
|
3906
|
+
publishedAt: g(rh),
|
|
3907
|
+
trash: g(O({
|
|
3908
|
+
deletedAt: rh,
|
|
3909
|
+
batchId: I,
|
|
3910
|
+
path: E
|
|
3911
|
+
})),
|
|
3912
|
+
revisions: z(O({
|
|
3913
|
+
revisionId: fi.fields.revisionId,
|
|
3914
|
+
number: fi.fields.number,
|
|
3915
|
+
content: fi.fields.content,
|
|
3916
|
+
createdAt: rh,
|
|
3917
|
+
createdBy: E
|
|
3918
|
+
})).check(Vn(1)),
|
|
3919
|
+
working: W(si)
|
|
3920
|
+
}), ah = O({
|
|
3921
|
+
id: Pt.fields.id,
|
|
3922
|
+
name: Pt.fields.name,
|
|
3923
|
+
folder: Pt.fields.folder,
|
|
3924
|
+
mimeType: Pt.fields.mimeType,
|
|
3925
|
+
byteSize: Pt.fields.byteSize,
|
|
3926
|
+
sha256: Pt.fields.sha256,
|
|
3927
|
+
createdAt: rh,
|
|
3928
|
+
updatedAt: rh,
|
|
3929
|
+
uploadedBy: g(E)
|
|
3930
|
+
}), oh = O({
|
|
3931
|
+
format: H(1),
|
|
3932
|
+
configuration: th,
|
|
3933
|
+
documents: z(ih),
|
|
3934
|
+
media: z(ah),
|
|
3935
|
+
folders: z(Wt),
|
|
3936
|
+
people: z(O({
|
|
3937
|
+
...Up.fields,
|
|
3938
|
+
createdAt: rh
|
|
3939
|
+
})),
|
|
3940
|
+
seo: O({
|
|
3941
|
+
revisions: z(ke).check(Vn(1)),
|
|
3942
|
+
workingVersion: ke.fields.version,
|
|
3943
|
+
publishedVersion: ke.fields.version
|
|
3944
|
+
}),
|
|
3945
|
+
redirects: z(O({
|
|
3946
|
+
fromPath: E,
|
|
3947
|
+
documentId: I
|
|
3948
|
+
})),
|
|
3949
|
+
releases: z(O({
|
|
3950
|
+
id: Bp.fields.id,
|
|
3951
|
+
label: Bp.fields.label,
|
|
3952
|
+
changes: Bp.fields.changes,
|
|
3953
|
+
publishAt: Bp.fields.publishAt,
|
|
3954
|
+
status: Bp.fields.status,
|
|
3955
|
+
requestedBy: Bp.fields.requestedBy,
|
|
3956
|
+
failure: Bp.fields.failure,
|
|
3957
|
+
createdAt: rh
|
|
3958
|
+
})),
|
|
3959
|
+
activity: z(O({
|
|
3960
|
+
...am.fields,
|
|
3961
|
+
occurredAt: rh
|
|
3962
|
+
}))
|
|
3963
|
+
}), sh = O({
|
|
3964
|
+
data: oh,
|
|
3965
|
+
replace: L
|
|
3966
|
+
}), ch = O({
|
|
3967
|
+
stamp: k,
|
|
3968
|
+
status: j(["ready", "unchanged"]),
|
|
3969
|
+
documents: U,
|
|
3970
|
+
revisions: U,
|
|
3971
|
+
media: U,
|
|
3972
|
+
people: U,
|
|
3973
|
+
removedDocuments: U,
|
|
3974
|
+
removedMedia: U
|
|
3975
|
+
}), lh = O({
|
|
3976
|
+
...sh.fields,
|
|
3977
|
+
stamp: k
|
|
3978
|
+
}), uh = "/_cms/revision-preview", dh = "__cms_revision", fh = "__cms_saved_document", ph = "__cms_saved_revision", mh = O({
|
|
3979
|
+
documentId: I,
|
|
3980
|
+
revisionId: T
|
|
3981
|
+
}), hh = E.check(R()).pipe(Ir("RevisionLinkId")), gh = E.check(Dr(/^[A-Za-z0-9_-]{43}$/u));
|
|
3982
|
+
function _h(e, t, n) {
|
|
3983
|
+
let r = yh(e);
|
|
3984
|
+
return $t(gh)(t), r.searchParams.set(r.pathname === "/_cms/revision-preview" ? "token" : dh, t), n && r.searchParams.set("locale", n), `${r.pathname}${r.search}${r.hash}`;
|
|
3985
|
+
}
|
|
3986
|
+
function vh(e, t, n, r) {
|
|
3987
|
+
let i = yh(e);
|
|
3988
|
+
return $t(mh)({
|
|
3989
|
+
documentId: t,
|
|
3990
|
+
revisionId: n
|
|
3991
|
+
}), i.searchParams.set(i.pathname === "/_cms/revision-preview" ? "documentId" : fh, t), i.searchParams.set(i.pathname === "/_cms/revision-preview" ? "revisionId" : ph, n), r && i.searchParams.set("locale", r), `${i.pathname}${i.search}${i.hash}`;
|
|
3992
|
+
}
|
|
3993
|
+
function yh(e) {
|
|
3994
|
+
let t = new URL(e, "https://cms.invalid");
|
|
3995
|
+
if (t.origin !== "https://cms.invalid") throw Error("Revision preview must belong to this site.");
|
|
3996
|
+
for (let e of [
|
|
3997
|
+
"__cms_preview",
|
|
3998
|
+
dh,
|
|
3999
|
+
fh,
|
|
4000
|
+
ph,
|
|
4001
|
+
"token",
|
|
4002
|
+
"locale"
|
|
4003
|
+
]) t.searchParams.delete(e);
|
|
4004
|
+
return t.pathname === "/_cms/revision-preview" && (t.searchParams.delete("documentId"), t.searchParams.delete("revisionId")), t;
|
|
4005
|
+
}
|
|
4006
|
+
var bh = O({
|
|
4007
|
+
id: hh,
|
|
4008
|
+
documentId: I,
|
|
4009
|
+
revisionId: T,
|
|
4010
|
+
createdAt: E,
|
|
4011
|
+
createdBy: E,
|
|
4012
|
+
expiresAt: E,
|
|
4013
|
+
revokedAt: g(E),
|
|
4014
|
+
revokedBy: g(E)
|
|
4015
|
+
}), xh = O({
|
|
4016
|
+
revisionId: T,
|
|
4017
|
+
expiresAt: W(E)
|
|
4018
|
+
}), Sh = O({
|
|
4019
|
+
link: bh,
|
|
4020
|
+
token: gh,
|
|
4021
|
+
previewPath: H(uh)
|
|
4022
|
+
}), Ch = O({
|
|
4023
|
+
...qm.fields,
|
|
4024
|
+
name: E,
|
|
4025
|
+
steps: Gm,
|
|
4026
|
+
preview: H(!0)
|
|
4027
|
+
}), wh = O({
|
|
4028
|
+
mode: H("revision"),
|
|
4029
|
+
primary: L,
|
|
4030
|
+
identity: fn,
|
|
4031
|
+
revision: O({
|
|
4032
|
+
id: T,
|
|
4033
|
+
number: U.check(kn(0)),
|
|
4034
|
+
savedAt: E
|
|
4035
|
+
}),
|
|
4036
|
+
expiresAt: g(E),
|
|
4037
|
+
previewPath: H(uh),
|
|
4038
|
+
logicalPath: g(E),
|
|
4039
|
+
livePath: g(E),
|
|
4040
|
+
locale: W(Wn),
|
|
4041
|
+
requestedLocale: W(Wn),
|
|
4042
|
+
settings: Et,
|
|
4043
|
+
content: fr,
|
|
4044
|
+
renderPlan: lt,
|
|
4045
|
+
issues: z($e),
|
|
4046
|
+
referencePaths: it(E, g(E)),
|
|
4047
|
+
forms: z(Ch)
|
|
4048
|
+
});
|
|
4049
|
+
O({
|
|
4050
|
+
items: z(wh),
|
|
4051
|
+
total: U.check(lr(0))
|
|
4052
|
+
});
|
|
4053
|
+
//#endregion
|
|
4054
|
+
//#region ../model/src/Studio.ts
|
|
4055
|
+
var Th = O({
|
|
4056
|
+
id: k,
|
|
4057
|
+
label: k,
|
|
4058
|
+
icon: k,
|
|
4059
|
+
path: k,
|
|
4060
|
+
access: j(["administrator", "signed-in"])
|
|
4061
|
+
}), Eh = O({
|
|
4062
|
+
id: E,
|
|
4063
|
+
name: E,
|
|
4064
|
+
email: E,
|
|
4065
|
+
role: Vp
|
|
4066
|
+
}), Dh = O({
|
|
4067
|
+
collections: z(Pm),
|
|
4068
|
+
blocks: z($m),
|
|
4069
|
+
locales: g(Ar),
|
|
4070
|
+
mediaUploadLimit: U.check(kn(0)),
|
|
4071
|
+
studioModules: z(Th)
|
|
4072
|
+
}), Oh = U.check(lr(0)), kh = O({
|
|
4073
|
+
catalog: Oh,
|
|
4074
|
+
inventory: Oh,
|
|
4075
|
+
media: Oh,
|
|
4076
|
+
people: Oh,
|
|
4077
|
+
activity: Oh,
|
|
4078
|
+
seo: Oh,
|
|
4079
|
+
releases: Oh,
|
|
4080
|
+
links: Oh
|
|
4081
|
+
}), Ah = O({
|
|
4082
|
+
version: Oh,
|
|
4083
|
+
entries: z(Rn)
|
|
4084
|
+
}), jh = O({
|
|
4085
|
+
version: Oh,
|
|
4086
|
+
summaries: z(ni)
|
|
4087
|
+
}), Mh = wi({
|
|
4088
|
+
Setup: {},
|
|
4089
|
+
SignedOut: {},
|
|
4090
|
+
Ready: {
|
|
4091
|
+
user: Eh,
|
|
4092
|
+
configuration: Dh,
|
|
4093
|
+
epoch: E,
|
|
4094
|
+
versions: kh,
|
|
4095
|
+
catalog: Ah
|
|
4096
|
+
}
|
|
4097
|
+
}), Nh = O({
|
|
4098
|
+
user: Eh,
|
|
4099
|
+
epoch: E,
|
|
4100
|
+
versions: kh,
|
|
4101
|
+
document: g(O({
|
|
4102
|
+
documentId: I,
|
|
4103
|
+
generation: g(Oh),
|
|
4104
|
+
version: g(Oh),
|
|
4105
|
+
presence: em
|
|
4106
|
+
}))
|
|
4107
|
+
}), Ph = {
|
|
4108
|
+
...ti,
|
|
4109
|
+
error: E,
|
|
4110
|
+
changes: W(z(E))
|
|
4111
|
+
}, Fh = class extends Tt()("Studio.BadRequest", Ph, { httpApiStatus: 400 }) {}, Ih = class extends Tt()("Studio.Unauthorized", Ph, { httpApiStatus: 401 }) {}, Lh = class extends Tt()("Studio.Forbidden", Ph, { httpApiStatus: 403 }) {}, Rh = class extends Tt()("Studio.NotFound", Ph, { httpApiStatus: 404 }) {}, zh = class extends Tt()("Studio.Conflict", Ph, { httpApiStatus: 409 }) {}, Bh = class extends Tt()("Studio.Invalid", Ph, { httpApiStatus: 422 }) {}, Vh = class extends Tt()("Studio.Unavailable", Ph, { httpApiStatus: 503 }) {}, Q = [
|
|
4112
|
+
Fh,
|
|
4113
|
+
Ih,
|
|
4114
|
+
Lh,
|
|
4115
|
+
Rh,
|
|
4116
|
+
zh,
|
|
4117
|
+
Bh,
|
|
4118
|
+
Vh,
|
|
4119
|
+
class extends Tt()("Studio.InternalError", Ph, { httpApiStatus: 500 }) {}
|
|
4120
|
+
], Hh = M(Q);
|
|
4121
|
+
Cn()("@internal/model/StudioApi/CurrentUser");
|
|
4122
|
+
var Uh = class extends Jf()("@internal/model/StudioApi/Authorize", { error: Q }) {}, $ = { documentId: I }, Wh = {
|
|
4123
|
+
...$,
|
|
4124
|
+
revisionId: T
|
|
4125
|
+
}, Gh = {
|
|
4126
|
+
offset: V(Qe.check($r(), lr(0))),
|
|
4127
|
+
limit: V(Qe.check($r(), Ur({
|
|
4128
|
+
minimum: 1,
|
|
4129
|
+
maximum: 100
|
|
4130
|
+
}))),
|
|
4131
|
+
search: V(E.check(P(200)))
|
|
4132
|
+
}, Kh = Qe.check($r(), lr(0)), qh = x.pipe(Hd()), Jh = Id(qh, {
|
|
4133
|
+
"x-cms-working-generation": Kh,
|
|
4134
|
+
"x-cms-working-version": Kh
|
|
4135
|
+
}), Yh = { "x-cms-working-generation": Kh }, Xh = { expectedDocumentVersion: At }, Zh = Ff("Studio").add(jp("session").add(Y("bootstrap", "/_cms/api/bootstrap", {
|
|
4136
|
+
error: Q,
|
|
4137
|
+
success: Mh
|
|
4138
|
+
}), Y("installation", "/_cms/api/installation", {
|
|
4139
|
+
error: Q,
|
|
4140
|
+
success: O({ initialized: L })
|
|
4141
|
+
}), X("initialize", "/_cms/api/installation", {
|
|
4142
|
+
error: Q,
|
|
4143
|
+
payload: O({
|
|
4144
|
+
email: Hp,
|
|
4145
|
+
name: k,
|
|
4146
|
+
password: E.check(Vn(8)),
|
|
4147
|
+
installationSecret: k
|
|
4148
|
+
}),
|
|
4149
|
+
success: Eh.pipe(Td(201))
|
|
4150
|
+
})), jp("connection").add(Y("versions", "/_cms/api/versions", {
|
|
4151
|
+
error: Q,
|
|
4152
|
+
query: { documentId: V(I) },
|
|
4153
|
+
success: Nh
|
|
4154
|
+
}), Y("user", "/_cms/api/session", {
|
|
4155
|
+
error: Q,
|
|
4156
|
+
success: Eh
|
|
4157
|
+
}), Y("configuration", "/_cms/api/config", {
|
|
4158
|
+
error: Q,
|
|
4159
|
+
success: Dh
|
|
4160
|
+
}), Y("changes", "/_cms/api/changes", {
|
|
4161
|
+
error: Q,
|
|
4162
|
+
query: { documentId: V(I) },
|
|
4163
|
+
success: Od({
|
|
4164
|
+
data: Nh,
|
|
4165
|
+
error: Hh
|
|
4166
|
+
})
|
|
4167
|
+
})).middleware(Uh), jp("documents").add(Y("catalog", "/_cms/api/documents", {
|
|
4168
|
+
error: Q,
|
|
4169
|
+
success: Ah
|
|
4170
|
+
}), X("create", "/_cms/api/documents", {
|
|
4171
|
+
error: Q,
|
|
4172
|
+
payload: O({
|
|
4173
|
+
collection: sr,
|
|
4174
|
+
source: si,
|
|
4175
|
+
templateId: V(k)
|
|
4176
|
+
}),
|
|
4177
|
+
success: S.pipe(Td(201))
|
|
4178
|
+
}), Y("inventory", "/_cms/api/documents/inventory", {
|
|
4179
|
+
error: Q,
|
|
4180
|
+
success: jh
|
|
4181
|
+
}), Y("search", "/_cms/api/documents/search", {
|
|
4182
|
+
error: Q,
|
|
4183
|
+
query: { q: E.check(P(200)) },
|
|
4184
|
+
success: Gr
|
|
4185
|
+
}), Y("draft", "/_cms/api/documents/:documentId", {
|
|
4186
|
+
error: Q,
|
|
4187
|
+
params: $,
|
|
4188
|
+
success: S
|
|
4189
|
+
}), Y("settings", "/_cms/api/documents/:documentId/settings", {
|
|
4190
|
+
error: Q,
|
|
4191
|
+
params: $,
|
|
4192
|
+
success: Xr
|
|
4193
|
+
}), Y("editor", "/_cms/api/documents/:documentId/editor", {
|
|
4194
|
+
error: Q,
|
|
4195
|
+
params: $,
|
|
4196
|
+
success: qn
|
|
4197
|
+
}), Y("preview", "/_cms/api/documents/:documentId/preview", {
|
|
4198
|
+
error: Q,
|
|
4199
|
+
params: $,
|
|
4200
|
+
success: si
|
|
4201
|
+
}), Y("diagnostics", "/_cms/api/documents/:documentId/diagnostics", {
|
|
4202
|
+
error: Q,
|
|
4203
|
+
params: $,
|
|
4204
|
+
success: z(_i)
|
|
4205
|
+
}), Y("revisions", "/_cms/api/documents/:documentId/revisions", {
|
|
4206
|
+
error: Q,
|
|
4207
|
+
params: $,
|
|
4208
|
+
query: { before: V(Qe.check($r(), kn(0))) },
|
|
4209
|
+
success: ce
|
|
4210
|
+
}), Y("revision", "/_cms/api/documents/:documentId/revisions/:revisionId", {
|
|
4211
|
+
error: Q,
|
|
4212
|
+
params: Wh,
|
|
4213
|
+
success: fi
|
|
4214
|
+
}), Y("revisionSnapshot", "/_cms/api/documents/:documentId/revisions/:revisionId/snapshot", {
|
|
4215
|
+
error: Q,
|
|
4216
|
+
params: Wh,
|
|
4217
|
+
success: S
|
|
4218
|
+
}), X("duplicate", "/_cms/api/documents/:documentId/duplicate", {
|
|
4219
|
+
error: Q,
|
|
4220
|
+
params: $,
|
|
4221
|
+
payload: O({
|
|
4222
|
+
expectedRevisionId: T,
|
|
4223
|
+
title: k,
|
|
4224
|
+
placement: Sn
|
|
4225
|
+
}),
|
|
4226
|
+
success: S.pipe(Td(201))
|
|
4227
|
+
}), X("checkpoint", "/_cms/api/documents/:documentId/checkpoint", {
|
|
4228
|
+
error: Q,
|
|
4229
|
+
params: $,
|
|
4230
|
+
success: wr
|
|
4231
|
+
}), X("move", "/_cms/api/documents/:documentId/move", {
|
|
4232
|
+
error: Q,
|
|
4233
|
+
params: $,
|
|
4234
|
+
payload: O({
|
|
4235
|
+
...Xh,
|
|
4236
|
+
placement: Sn
|
|
4237
|
+
}),
|
|
4238
|
+
success: S
|
|
4239
|
+
}), X("restore", "/_cms/api/documents/:documentId/restore", {
|
|
4240
|
+
error: Q,
|
|
4241
|
+
params: $,
|
|
4242
|
+
payload: O({
|
|
4243
|
+
...Xh,
|
|
4244
|
+
sourceRevisionId: T
|
|
4245
|
+
}),
|
|
4246
|
+
success: qn
|
|
4247
|
+
}), kf("selectWebsiteRevision", "/_cms/api/documents/:documentId/website-version", {
|
|
4248
|
+
error: Q,
|
|
4249
|
+
params: $,
|
|
4250
|
+
payload: Qn,
|
|
4251
|
+
success: Xr
|
|
4252
|
+
}), Y("trashPlan", "/_cms/api/documents/:documentId/trash-plan", {
|
|
4253
|
+
error: Q,
|
|
4254
|
+
params: $,
|
|
4255
|
+
success: nr
|
|
4256
|
+
}), X("trash", "/_cms/api/documents/:documentId/trash", {
|
|
4257
|
+
error: Q,
|
|
4258
|
+
params: $,
|
|
4259
|
+
payload: nr,
|
|
4260
|
+
success: nr
|
|
4261
|
+
}), Y("listTrash", "/_cms/api/trash", {
|
|
4262
|
+
error: Q,
|
|
4263
|
+
success: z(f)
|
|
4264
|
+
}), X("restoreTrash", "/_cms/api/documents/:documentId/restore-trash", {
|
|
4265
|
+
error: Q,
|
|
4266
|
+
params: $,
|
|
4267
|
+
payload: O({ expectedRevisionId: T }),
|
|
4268
|
+
success: z(S)
|
|
4269
|
+
})).middleware(Uh), jp("working").add(Y("open", "/_cms/api/documents/:documentId/working", {
|
|
4270
|
+
error: Q,
|
|
4271
|
+
params: $,
|
|
4272
|
+
success: Jh
|
|
4273
|
+
}), X("sync", "/_cms/api/documents/:documentId/working/sync", {
|
|
4274
|
+
error: Q,
|
|
4275
|
+
params: $,
|
|
4276
|
+
payload: qh,
|
|
4277
|
+
headers: {
|
|
4278
|
+
...Yh,
|
|
4279
|
+
"x-cms-working-version": Kh
|
|
4280
|
+
},
|
|
4281
|
+
success: Jh
|
|
4282
|
+
}), X("apply", "/_cms/api/documents/:documentId/working", {
|
|
4283
|
+
error: Q,
|
|
4284
|
+
params: $,
|
|
4285
|
+
payload: qh,
|
|
4286
|
+
headers: {
|
|
4287
|
+
...Yh,
|
|
4288
|
+
"x-cms-working-vector": V(E.check(P(24e3)))
|
|
4289
|
+
},
|
|
4290
|
+
success: Jh
|
|
4291
|
+
}), X("translation", "/_cms/api/documents/:documentId/translation", {
|
|
4292
|
+
error: Q,
|
|
4293
|
+
params: $,
|
|
4294
|
+
payload: O({
|
|
4295
|
+
generation: Oh,
|
|
4296
|
+
locale: Wn,
|
|
4297
|
+
action: j(["add", "remove"])
|
|
4298
|
+
}),
|
|
4299
|
+
success: Jh
|
|
4300
|
+
}), X("presence", "/_cms/api/documents/:documentId/presence", {
|
|
4301
|
+
error: Q,
|
|
4302
|
+
params: $,
|
|
4303
|
+
payload: Zp,
|
|
4304
|
+
success: em
|
|
4305
|
+
}), Af("leavePresence", "/_cms/api/documents/:documentId/presence", {
|
|
4306
|
+
error: Q,
|
|
4307
|
+
params: $,
|
|
4308
|
+
payload: Qp,
|
|
4309
|
+
success: em
|
|
4310
|
+
})).middleware(Uh), jp("publication").add(X("plan", "/_cms/api/publication/plan", {
|
|
4311
|
+
error: Q,
|
|
4312
|
+
payload: Fp,
|
|
4313
|
+
success: zp
|
|
4314
|
+
}), X("apply", "/_cms/api/publication", {
|
|
4315
|
+
error: Q,
|
|
4316
|
+
payload: O({
|
|
4317
|
+
changes: Pp,
|
|
4318
|
+
stamp: E
|
|
4319
|
+
}),
|
|
4320
|
+
success: zp
|
|
4321
|
+
}), Y("releases", "/_cms/api/releases", {
|
|
4322
|
+
error: Q,
|
|
4323
|
+
query: { documentId: V(I) },
|
|
4324
|
+
success: z(Bp)
|
|
4325
|
+
}), X("createRelease", "/_cms/api/releases", {
|
|
4326
|
+
error: Q,
|
|
4327
|
+
payload: O({
|
|
4328
|
+
label: V(E.check(P(120))),
|
|
4329
|
+
changes: Pp,
|
|
4330
|
+
stamp: E,
|
|
4331
|
+
publishAt: E
|
|
4332
|
+
}),
|
|
4333
|
+
success: Bp.pipe(Td(201))
|
|
4334
|
+
}), X("cancelRelease", "/_cms/api/releases/:id/cancel", {
|
|
4335
|
+
error: Q,
|
|
4336
|
+
params: { id: Mp },
|
|
4337
|
+
success: Bp
|
|
4338
|
+
})).middleware(Uh), jp("links").add(Y("list", "/_cms/api/documents/:documentId/revision-links", {
|
|
4339
|
+
error: Q,
|
|
4340
|
+
params: $,
|
|
4341
|
+
success: z(bh)
|
|
4342
|
+
}), X("create", "/_cms/api/documents/:documentId/revision-links", {
|
|
4343
|
+
error: Q,
|
|
4344
|
+
params: $,
|
|
4345
|
+
payload: xh,
|
|
4346
|
+
success: Sh.pipe(Td(201))
|
|
4347
|
+
}), Af("revoke", "/_cms/api/revision-links/:id", {
|
|
4348
|
+
error: Q,
|
|
4349
|
+
params: { id: hh },
|
|
4350
|
+
success: O({ revoked: L })
|
|
4351
|
+
})).middleware(Uh), jp("media").add(Y("list", "/_cms/api/media", {
|
|
4352
|
+
error: Q,
|
|
4353
|
+
query: {
|
|
4354
|
+
...Gh,
|
|
4355
|
+
folder: V(E),
|
|
4356
|
+
kind: V(en),
|
|
4357
|
+
sort: V(s)
|
|
4358
|
+
},
|
|
4359
|
+
success: sn
|
|
4360
|
+
}), Y("folders", "/_cms/api/media/folders", {
|
|
4361
|
+
error: Q,
|
|
4362
|
+
success: z(ve)
|
|
4363
|
+
}), X("createFolder", "/_cms/api/media/folders", {
|
|
4364
|
+
error: Q,
|
|
4365
|
+
payload: O({ folder: Wt }),
|
|
4366
|
+
success: Ed
|
|
4367
|
+
}), Y("get", "/_cms/api/media/:id", {
|
|
4368
|
+
error: Q,
|
|
4369
|
+
params: { id: ze },
|
|
4370
|
+
success: Pt
|
|
4371
|
+
}), X("upload", "/_cms/api/media", {
|
|
4372
|
+
error: Q,
|
|
4373
|
+
headers: {
|
|
4374
|
+
"x-cms-media-name": E,
|
|
4375
|
+
"x-cms-media-folder": V(E),
|
|
4376
|
+
"x-cms-media-size": Kh,
|
|
4377
|
+
"content-type": E,
|
|
4378
|
+
"x-cms-media-sha256": V(E),
|
|
4379
|
+
"x-cms-media-id": V(ze)
|
|
4380
|
+
},
|
|
4381
|
+
success: Pt.pipe(Td(201))
|
|
4382
|
+
}), Af("remove", "/_cms/api/media/:id", {
|
|
4383
|
+
error: Q,
|
|
4384
|
+
params: { id: ze },
|
|
4385
|
+
success: Ed
|
|
4386
|
+
})).middleware(Uh), jp("people").add(Y("list", "/_cms/api/people", {
|
|
4387
|
+
error: Q,
|
|
4388
|
+
query: Gh,
|
|
4389
|
+
success: Wp
|
|
4390
|
+
}), X("create", "/_cms/api/people", {
|
|
4391
|
+
error: Q,
|
|
4392
|
+
payload: Gp,
|
|
4393
|
+
success: Up.pipe(Td(201))
|
|
4394
|
+
}), X("invite", "/_cms/api/people/:id/invite", {
|
|
4395
|
+
error: Q,
|
|
4396
|
+
params: { id: k },
|
|
4397
|
+
success: Kp
|
|
4398
|
+
}), X("changeRole", "/_cms/api/people/:id/role", {
|
|
4399
|
+
error: Q,
|
|
4400
|
+
params: { id: k },
|
|
4401
|
+
payload: O({ role: Vp }),
|
|
4402
|
+
success: Up
|
|
4403
|
+
}), X("revokeSessions", "/_cms/api/people/:id/sessions/revoke", {
|
|
4404
|
+
error: Q,
|
|
4405
|
+
params: { id: k },
|
|
4406
|
+
success: Up
|
|
4407
|
+
}), X("remove", "/_cms/api/people/:id/remove", {
|
|
4408
|
+
error: Q,
|
|
4409
|
+
params: { id: k },
|
|
4410
|
+
success: O({ removed: L })
|
|
4411
|
+
})).middleware(Uh), jp("activity").add(Y("list", "/_cms/api/activity", {
|
|
4412
|
+
error: Q,
|
|
4413
|
+
query: {
|
|
4414
|
+
...om.fields,
|
|
4415
|
+
offset: Gh.offset,
|
|
4416
|
+
limit: Gh.limit
|
|
4417
|
+
},
|
|
4418
|
+
success: sm
|
|
4419
|
+
})).middleware(Uh), jp("seo").add(Y("state", "/_cms/api/seo", {
|
|
4420
|
+
error: Q,
|
|
4421
|
+
success: bt
|
|
4422
|
+
}), Y("working", "/_cms/api/seo/working", {
|
|
4423
|
+
error: Q,
|
|
4424
|
+
success: We
|
|
4425
|
+
}), kf("save", "/_cms/api/seo", {
|
|
4426
|
+
error: Q,
|
|
4427
|
+
payload: O({
|
|
4428
|
+
expectedVersion: E.check(R()),
|
|
4429
|
+
settings: We
|
|
4430
|
+
}),
|
|
4431
|
+
success: bt
|
|
4432
|
+
}), X("publish", "/_cms/api/seo/publish", {
|
|
4433
|
+
error: Q,
|
|
4434
|
+
payload: O({
|
|
4435
|
+
expectedVersion: E.check(R()),
|
|
4436
|
+
confirmedSiteWideChange: V(L)
|
|
4437
|
+
}),
|
|
4438
|
+
success: bt
|
|
4439
|
+
})).middleware(Uh), jp("data").add(Y("snapshot", "/_cms/api/data", {
|
|
4440
|
+
error: Q,
|
|
4441
|
+
success: oh
|
|
4442
|
+
}), X("plan", "/_cms/api/data/plan", {
|
|
4443
|
+
error: Q,
|
|
4444
|
+
payload: sh,
|
|
4445
|
+
success: ch
|
|
4446
|
+
}), X("apply", "/_cms/api/data/apply", {
|
|
4447
|
+
error: Q,
|
|
4448
|
+
payload: lh,
|
|
4449
|
+
success: ch
|
|
4450
|
+
})).annotate(Hf, { onExcessProperty: "error" }).middleware(Uh), jp("content").add(Y("snapshot", "/_cms/api/content", {
|
|
4451
|
+
error: Q,
|
|
4452
|
+
success: um
|
|
4453
|
+
}), X("plan", "/_cms/api/content/plan", {
|
|
4454
|
+
error: Q,
|
|
4455
|
+
payload: dm,
|
|
4456
|
+
success: pm
|
|
4457
|
+
}), X("apply", "/_cms/api/content/apply", {
|
|
4458
|
+
error: Q,
|
|
4459
|
+
payload: dm,
|
|
4460
|
+
success: hm
|
|
4461
|
+
})).annotate(Hf, { onExcessProperty: "error" }).middleware(Uh)), Qh = {
|
|
4462
|
+
documents: {
|
|
4463
|
+
create: [
|
|
4464
|
+
"catalog",
|
|
4465
|
+
"inventory",
|
|
4466
|
+
"activity"
|
|
4467
|
+
],
|
|
4468
|
+
duplicate: [
|
|
4469
|
+
"catalog",
|
|
4470
|
+
"inventory",
|
|
4471
|
+
"activity"
|
|
4472
|
+
],
|
|
4473
|
+
checkpoint: [
|
|
4474
|
+
"catalog",
|
|
4475
|
+
"inventory",
|
|
4476
|
+
"activity"
|
|
4477
|
+
],
|
|
4478
|
+
move: [
|
|
4479
|
+
"catalog",
|
|
4480
|
+
"inventory",
|
|
4481
|
+
"activity"
|
|
4482
|
+
],
|
|
4483
|
+
restore: ["inventory", "activity"],
|
|
4484
|
+
selectWebsiteRevision: [
|
|
4485
|
+
"catalog",
|
|
4486
|
+
"releases",
|
|
4487
|
+
"activity"
|
|
4488
|
+
],
|
|
4489
|
+
trash: [
|
|
4490
|
+
"catalog",
|
|
4491
|
+
"inventory",
|
|
4492
|
+
"links",
|
|
4493
|
+
"releases",
|
|
4494
|
+
"activity"
|
|
4495
|
+
],
|
|
4496
|
+
restoreTrash: [
|
|
4497
|
+
"catalog",
|
|
4498
|
+
"inventory",
|
|
4499
|
+
"activity"
|
|
4500
|
+
]
|
|
4501
|
+
},
|
|
4502
|
+
working: { translation: ["inventory"] },
|
|
4503
|
+
publication: {
|
|
4504
|
+
apply: [
|
|
4505
|
+
"catalog",
|
|
4506
|
+
"releases",
|
|
4507
|
+
"activity"
|
|
4508
|
+
],
|
|
4509
|
+
createRelease: ["releases", "activity"],
|
|
4510
|
+
cancelRelease: ["releases", "activity"]
|
|
4511
|
+
},
|
|
4512
|
+
links: {
|
|
4513
|
+
create: ["links", "activity"],
|
|
4514
|
+
revoke: ["links", "activity"]
|
|
4515
|
+
},
|
|
4516
|
+
media: {
|
|
4517
|
+
createFolder: ["media"],
|
|
4518
|
+
upload: [
|
|
4519
|
+
"media",
|
|
4520
|
+
"inventory",
|
|
4521
|
+
"activity"
|
|
4522
|
+
],
|
|
4523
|
+
remove: [
|
|
4524
|
+
"media",
|
|
4525
|
+
"inventory",
|
|
4526
|
+
"activity"
|
|
4527
|
+
]
|
|
4528
|
+
},
|
|
4529
|
+
people: {
|
|
4530
|
+
create: ["people", "activity"],
|
|
4531
|
+
invite: ["people", "activity"],
|
|
4532
|
+
changeRole: ["people", "activity"],
|
|
4533
|
+
revokeSessions: ["people", "activity"],
|
|
4534
|
+
remove: ["people", "activity"]
|
|
4535
|
+
},
|
|
4536
|
+
seo: {
|
|
4537
|
+
save: ["seo", "activity"],
|
|
4538
|
+
publish: ["seo", "activity"]
|
|
4539
|
+
},
|
|
4540
|
+
content: { apply: [
|
|
4541
|
+
"catalog",
|
|
4542
|
+
"inventory",
|
|
4543
|
+
"media",
|
|
4544
|
+
"activity"
|
|
4545
|
+
] }
|
|
4546
|
+
};
|
|
4547
|
+
function $h(e) {
|
|
4548
|
+
let t = new Map(Object.entries(Qh).flatMap(([e, t]) => Object.entries(t).map(([t, n]) => [`${e}.${t}`, n])));
|
|
4549
|
+
return Object.fromEntries(Object.entries(Zh.groups).map(([n, r]) => [n, Object.fromEntries(Object.keys(r.endpoints).map((r) => [r, (i) => e((e) => {
|
|
4550
|
+
if (!eg(n)) throw Error(`Unknown Studio group ${n}.`);
|
|
4551
|
+
let t = Object.entries(e[n]).find(([e]) => e === r)?.[1];
|
|
4552
|
+
if (!t) throw Error(`Unknown Studio endpoint ${n}.${r}.`);
|
|
4553
|
+
return t(i);
|
|
4554
|
+
}, t.get(`${n}.${r}`) ?? [])]))]));
|
|
4555
|
+
}
|
|
4556
|
+
function eg(e) {
|
|
4557
|
+
return Object.hasOwn(Zh.groups, e);
|
|
4558
|
+
}
|
|
4559
|
+
//#endregion
|
|
4560
|
+
//#region src/connection/queryCache.ts
|
|
4561
|
+
function tg(e, t, n) {
|
|
4562
|
+
return {
|
|
4563
|
+
key: JSON.stringify(e),
|
|
4564
|
+
resources: t,
|
|
4565
|
+
load: n
|
|
4566
|
+
};
|
|
4567
|
+
}
|
|
4568
|
+
function ng(e) {
|
|
4569
|
+
let t = /* @__PURE__ */ new Map(), n = !1;
|
|
4570
|
+
function r(t) {
|
|
4571
|
+
t.request?.abort();
|
|
4572
|
+
let n = new AbortController();
|
|
4573
|
+
t.request = n, t.state.value = {
|
|
4574
|
+
data: t.state.value.data,
|
|
4575
|
+
loading: !0
|
|
4576
|
+
};
|
|
4577
|
+
let r = Promise.resolve().then(() => t.query.load(e(n.signal))).then((e) => {
|
|
4578
|
+
!t.closed && t.request === n && (t.state.value = {
|
|
4579
|
+
data: e,
|
|
4580
|
+
loading: !1
|
|
4581
|
+
});
|
|
4582
|
+
}, (e) => {
|
|
4583
|
+
!t.closed && t.request === n && (t.state.value = {
|
|
4584
|
+
data: t.state.value.data,
|
|
4585
|
+
loading: !1,
|
|
4586
|
+
error: e instanceof Error ? e : Error("Could not load Studio data.", { cause: e })
|
|
4587
|
+
});
|
|
4588
|
+
}).finally(() => {
|
|
4589
|
+
t.pending === r && (t.pending = void 0);
|
|
4590
|
+
});
|
|
4591
|
+
t.pending = r;
|
|
4592
|
+
}
|
|
4593
|
+
function i(e) {
|
|
4594
|
+
if (n) throw Error("This Studio connection has closed.");
|
|
4595
|
+
let i = t.get(e.key);
|
|
4596
|
+
i || (i = {
|
|
4597
|
+
query: e,
|
|
4598
|
+
state: Gi({ loading: !0 }),
|
|
4599
|
+
owners: 0,
|
|
4600
|
+
closed: !1
|
|
4601
|
+
}, t.set(e.key, i), r(i));
|
|
4602
|
+
let a = i;
|
|
4603
|
+
a.owners++;
|
|
4604
|
+
let o = !1;
|
|
4605
|
+
async function s() {
|
|
4606
|
+
for (; a.pending;) await a.pending;
|
|
4607
|
+
if (a.closed || o) throw Error("This Studio read has closed.");
|
|
4608
|
+
if (a.state.value.error) throw a.state.value.error;
|
|
4609
|
+
return a.state.value.data;
|
|
4610
|
+
}
|
|
4611
|
+
return {
|
|
4612
|
+
state: a.state,
|
|
4613
|
+
settled: s,
|
|
4614
|
+
refresh: () => (!o && !a.closed && r(a), s()),
|
|
4615
|
+
release: () => {
|
|
4616
|
+
o || (o = !0, --a.owners === 0 && (a.closed = !0, a.request?.abort(), t.delete(e.key)));
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4619
|
+
}
|
|
4620
|
+
return {
|
|
4621
|
+
observe: i,
|
|
4622
|
+
invalidate(e) {
|
|
4623
|
+
for (let n of t.values()) n.query.resources.some((t) => e.includes(t)) && r(n);
|
|
4624
|
+
},
|
|
4625
|
+
close() {
|
|
4626
|
+
n = !0;
|
|
4627
|
+
for (let e of t.values()) e.closed = !0, e.request?.abort();
|
|
4628
|
+
t.clear();
|
|
4629
|
+
}
|
|
4630
|
+
};
|
|
4631
|
+
}
|
|
4632
|
+
//#endregion
|
|
4633
|
+
//#region src/connection/studioClient.ts
|
|
4634
|
+
var rg = () => globalThis.location?.origin ?? "http://cms.test", ig = Ku.pipe(Yn(mr(mn(Gu, {
|
|
4635
|
+
credentials: "same-origin",
|
|
4636
|
+
cache: "no-store"
|
|
4637
|
+
}), mn(Wu, (e, t) => globalThis.fetch(e, t))))), ag = Fu((e) => du(rg())(e)), og = 0, sg = class {
|
|
4638
|
+
lifetime = new AbortController();
|
|
4639
|
+
http = ug($f(Zh, { transformClient: ag }).pipe(Je(ig)));
|
|
4640
|
+
events = Gi(null);
|
|
4641
|
+
queries = ng((e) => this.scopedRequests(e));
|
|
4642
|
+
id = ++og;
|
|
4643
|
+
changes = Wi(this.events);
|
|
4644
|
+
initial;
|
|
4645
|
+
catalog;
|
|
4646
|
+
requests = this.scopedRequests();
|
|
4647
|
+
constructor(e) {
|
|
4648
|
+
this.initial = e, this.events.value = e ? {
|
|
4649
|
+
user: e.user,
|
|
4650
|
+
epoch: e.epoch,
|
|
4651
|
+
versions: e.versions,
|
|
4652
|
+
document: null
|
|
4653
|
+
} : null;
|
|
4654
|
+
let t = e?.catalog;
|
|
4655
|
+
this.catalog = tg(["catalog"], ["catalog"], (e) => {
|
|
4656
|
+
if (t) {
|
|
4657
|
+
let e = t;
|
|
4658
|
+
return t = void 0, Promise.resolve(e);
|
|
4659
|
+
}
|
|
4660
|
+
return e.documents.catalog();
|
|
4661
|
+
});
|
|
4662
|
+
}
|
|
4663
|
+
scopedRequests(e) {
|
|
4664
|
+
return $h((t, n) => this.run(t, n, e));
|
|
4665
|
+
}
|
|
4666
|
+
observe(e) {
|
|
4667
|
+
return this.queries.observe(e);
|
|
4668
|
+
}
|
|
4669
|
+
async read(e) {
|
|
4670
|
+
let t = this.observe(e);
|
|
4671
|
+
try {
|
|
4672
|
+
return await t.settled();
|
|
4673
|
+
} finally {
|
|
4674
|
+
t.release();
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
async run(e, t = [], n) {
|
|
4678
|
+
let r = n ? AbortSignal.any([this.lifetime.signal, n]) : this.lifetime.signal;
|
|
4679
|
+
r.throwIfAborted();
|
|
4680
|
+
let i = await this.http;
|
|
4681
|
+
r.throwIfAborted();
|
|
4682
|
+
let a = await ug(e(i), r);
|
|
4683
|
+
return r.throwIfAborted(), await this.invalidate(t), a;
|
|
4684
|
+
}
|
|
4685
|
+
async invalidate(e) {
|
|
4686
|
+
this.lifetime.signal.aborted || this.queries.invalidate(e);
|
|
4687
|
+
}
|
|
4688
|
+
receive(e) {
|
|
4689
|
+
this.lifetime.signal.aborted || (this.events.value = e);
|
|
4690
|
+
}
|
|
4691
|
+
stream(e, t) {
|
|
4692
|
+
return Ne(() => this.http).pipe(A((n) => n.connection.changes({ query: { documentId: e } }).pipe(A((e) => e.pipe(ko("35 seconds"), Lo((e) => t(e, n)))))));
|
|
4693
|
+
}
|
|
4694
|
+
consume(e, t) {
|
|
4695
|
+
return ug(e, t ? AbortSignal.any([this.lifetime.signal, t]) : this.lifetime.signal);
|
|
4696
|
+
}
|
|
4697
|
+
upload(e, t) {
|
|
4698
|
+
return this.run(() => $f(Zh, { transformClient: (t) => t.pipe(ag, Fu((t) => gu(Dl(e))(t))) }).pipe(A((n) => n.media.upload({ headers: {
|
|
4699
|
+
"content-type": e.type || "application/octet-stream",
|
|
4700
|
+
"x-cms-media-name": encodeURIComponent(e.name),
|
|
4701
|
+
"x-cms-media-folder": encodeURIComponent(t),
|
|
4702
|
+
"x-cms-media-size": e.size
|
|
4703
|
+
} })), Je(ig)), [
|
|
4704
|
+
"media",
|
|
4705
|
+
"inventory",
|
|
4706
|
+
"activity"
|
|
4707
|
+
]);
|
|
4708
|
+
}
|
|
4709
|
+
close() {
|
|
4710
|
+
this.lifetime.abort(), this.queries.close();
|
|
4711
|
+
}
|
|
4712
|
+
}, cg = Symbol("StudioClient");
|
|
4713
|
+
function lg() {
|
|
4714
|
+
let e = ki(cg);
|
|
4715
|
+
if (!e) throw Error("A Studio connection is required.");
|
|
4716
|
+
return e;
|
|
4717
|
+
}
|
|
4718
|
+
async function ug(e, t) {
|
|
4719
|
+
let n = await De(e, { signal: t });
|
|
4720
|
+
if (ot(n)) return n.value;
|
|
4721
|
+
throw pg(Ke(n.cause));
|
|
4722
|
+
}
|
|
4723
|
+
var dg = class extends Error {
|
|
4724
|
+
constructor(e) {
|
|
4725
|
+
super("Connection lost.", { cause: e });
|
|
4726
|
+
}
|
|
4727
|
+
}, fg = class extends Error {
|
|
4728
|
+
status;
|
|
4729
|
+
body;
|
|
4730
|
+
changes;
|
|
4731
|
+
constructor(e, t, n = null) {
|
|
4732
|
+
super(e), this.status = t, this.body = n;
|
|
4733
|
+
let r = O({ changes: z(E) });
|
|
4734
|
+
Sr(r)(n) && (this.changes = n.changes);
|
|
4735
|
+
}
|
|
4736
|
+
};
|
|
4737
|
+
function pg(e) {
|
|
4738
|
+
if (e instanceof dg || e instanceof fg) return e;
|
|
4739
|
+
if (Sr(Hh)(e)) {
|
|
4740
|
+
let t = e instanceof Fh ? 400 : e instanceof Ih ? 401 : e instanceof Lh ? 403 : e instanceof Rh ? 404 : e instanceof zh ? 409 : e instanceof Bh ? 422 : e instanceof Vh ? 503 : 500;
|
|
4741
|
+
return new fg(e.error, t, yr(Hh)(e));
|
|
4742
|
+
}
|
|
4743
|
+
return Rl(e) && e.reason instanceof Hl ? new dg(e) : e instanceof Error ? e : Error("Studio request failed.", { cause: e });
|
|
4744
|
+
}
|
|
4745
|
+
//#endregion
|
|
4746
|
+
//#region src/connection/studioErrors.ts
|
|
4747
|
+
var mg = it(E, M([E, En])), hg = {
|
|
4748
|
+
code: W(E),
|
|
4749
|
+
details: W(mg)
|
|
4750
|
+
}, gg = O(hg), _g = O({
|
|
4751
|
+
...hg,
|
|
4752
|
+
message: E
|
|
4753
|
+
});
|
|
4754
|
+
function vg(e) {
|
|
4755
|
+
if (e instanceof fg) {
|
|
4756
|
+
let t = e.body;
|
|
4757
|
+
return Sr(gg)(t) ? {
|
|
4758
|
+
code: t.code,
|
|
4759
|
+
details: t.details,
|
|
4760
|
+
message: e.message
|
|
4761
|
+
} : { message: e.message };
|
|
4762
|
+
}
|
|
4763
|
+
if (Sr(_g)(e)) return e;
|
|
4764
|
+
}
|
|
4765
|
+
function yg(e, t, n = t("errors.request-failed")) {
|
|
4766
|
+
if (e instanceof dg) return t("errors.connection-lost");
|
|
4767
|
+
let r = vg(e);
|
|
4768
|
+
if (r) {
|
|
4769
|
+
let { code: e, details: n = {} } = r;
|
|
4770
|
+
if (Sr(dr)(e)) switch (e) {
|
|
4771
|
+
case "errors.document.translationLocale": return n.locale === void 0 ? r.message : t("errors.document.translationLocale", { locale: n.locale });
|
|
4772
|
+
case "errors.language.notConfigured": return n.locale === void 0 ? r.message : t("errors.language.notConfigured", { locale: n.locale });
|
|
4773
|
+
case "errors.document.referencedInTrash": return n.title === void 0 ? r.message : t("errors.document.referencedInTrash", { title: n.title });
|
|
4774
|
+
case "errors.collection.notConfigured": return n.collection === void 0 ? r.message : t("errors.collection.notConfigured", { collection: n.collection });
|
|
4775
|
+
case "errors.media.uploadLimit": return n.limit === void 0 ? r.message : t("errors.media.uploadLimit", { limit: n.limit });
|
|
4776
|
+
case "errors.content.duplicateDocument": return n.documentId === void 0 ? r.message : t("errors.content.duplicateDocument", { documentId: n.documentId });
|
|
4777
|
+
case "errors.route.collection": return n.collection === void 0 ? r.message : t("errors.route.collection", { collection: n.collection });
|
|
4778
|
+
case "errors.route.pattern": return n.collection === void 0 ? r.message : t("errors.route.pattern", { collection: n.collection });
|
|
4779
|
+
case "errors.route.locale": return n.path === void 0 ? r.message : t("errors.route.locale", { path: n.path });
|
|
4780
|
+
case "errors.route.collision": return n.path === void 0 ? r.message : t("errors.route.collision", { path: n.path });
|
|
4781
|
+
case "errors.form.typeUnavailable":
|
|
4782
|
+
case "errors.form.requiredUnavailable":
|
|
4783
|
+
case "errors.form.minLengthUnavailable":
|
|
4784
|
+
case "errors.form.maxLengthUnavailable":
|
|
4785
|
+
case "errors.form.minUnavailable":
|
|
4786
|
+
case "errors.form.maxUnavailable":
|
|
4787
|
+
case "errors.form.textLimits":
|
|
4788
|
+
case "errors.form.numberLimits":
|
|
4789
|
+
case "errors.form.range":
|
|
4790
|
+
case "errors.form.lengthRange":
|
|
4791
|
+
case "errors.form.options":
|
|
4792
|
+
case "errors.form.selectOptions": return n.label === void 0 ? r.message : t(e, { label: n.label });
|
|
4793
|
+
default: return t(e);
|
|
4794
|
+
}
|
|
4795
|
+
switch (e) {
|
|
4796
|
+
case "INVALID_EMAIL_OR_PASSWORD": return t("errors.auth.credentials");
|
|
4797
|
+
case "INVALID_PASSWORD": return t("errors.auth.password");
|
|
4798
|
+
case "PASSWORD_TOO_SHORT": return t("errors.auth.password-short");
|
|
4799
|
+
case "USER_NOT_FOUND": return t("errors.auth.user");
|
|
4800
|
+
}
|
|
4801
|
+
return r.message;
|
|
4802
|
+
}
|
|
4803
|
+
return e instanceof Error ? e.message : n;
|
|
4804
|
+
}
|
|
4805
|
+
function bg() {
|
|
4806
|
+
let { t: e } = Wr();
|
|
4807
|
+
return (t, n) => yg(t, e, n);
|
|
4808
|
+
}
|
|
4809
|
+
//#endregion
|
|
4810
|
+
//#region src/ui/copy.ts
|
|
4811
|
+
function xg() {
|
|
4812
|
+
let { t: e } = Wr();
|
|
4813
|
+
return {
|
|
4814
|
+
document: {
|
|
4815
|
+
get new() {
|
|
4816
|
+
return e("copy.document.new");
|
|
4817
|
+
},
|
|
4818
|
+
get create() {
|
|
4819
|
+
return e("copy.document.create");
|
|
4820
|
+
},
|
|
4821
|
+
get untitled() {
|
|
4822
|
+
return e("copy.document.untitled");
|
|
4823
|
+
},
|
|
4824
|
+
get duplicate() {
|
|
4825
|
+
return e("copy.document.duplicate");
|
|
4826
|
+
},
|
|
4827
|
+
get moveToTrash() {
|
|
4828
|
+
return e("copy.document.moveToTrash");
|
|
4829
|
+
},
|
|
4830
|
+
get history() {
|
|
4831
|
+
return e("copy.document.history");
|
|
4832
|
+
},
|
|
4833
|
+
get versionSaved() {
|
|
4834
|
+
return e("copy.document.versionSaved");
|
|
4835
|
+
}
|
|
4836
|
+
},
|
|
4837
|
+
publication: {
|
|
4838
|
+
get save() {
|
|
4839
|
+
return e("copy.publication.save");
|
|
4840
|
+
},
|
|
4841
|
+
get publish() {
|
|
4842
|
+
return e("copy.publication.publish");
|
|
4843
|
+
},
|
|
4844
|
+
get saveAndPublish() {
|
|
4845
|
+
return e("copy.publication.saveAndPublish");
|
|
4846
|
+
},
|
|
4847
|
+
get takeOffline() {
|
|
4848
|
+
return e("copy.publication.takeOffline");
|
|
4849
|
+
},
|
|
4850
|
+
get schedule() {
|
|
4851
|
+
return e("copy.publication.schedule");
|
|
4852
|
+
},
|
|
4853
|
+
get cancelSchedule() {
|
|
4854
|
+
return e("copy.publication.cancelSchedule");
|
|
4855
|
+
},
|
|
4856
|
+
get draft() {
|
|
4857
|
+
return e("copy.publication.draft");
|
|
4858
|
+
},
|
|
4859
|
+
get published() {
|
|
4860
|
+
return e("copy.publication.published");
|
|
4861
|
+
},
|
|
4862
|
+
get unpublishedChanges() {
|
|
4863
|
+
return e("copy.publication.unpublishedChanges");
|
|
4864
|
+
},
|
|
4865
|
+
get savedDraft() {
|
|
4866
|
+
return e("copy.publication.savedDraft");
|
|
4867
|
+
}
|
|
4868
|
+
},
|
|
4869
|
+
actions: {
|
|
4870
|
+
get cancel() {
|
|
4871
|
+
return e("copy.actions.cancel");
|
|
4872
|
+
},
|
|
4873
|
+
get retry() {
|
|
4874
|
+
return e("copy.actions.retry");
|
|
4875
|
+
},
|
|
4876
|
+
get close() {
|
|
4877
|
+
return e("copy.actions.close");
|
|
4878
|
+
},
|
|
4879
|
+
get undo() {
|
|
4880
|
+
return e("copy.actions.undo");
|
|
4881
|
+
},
|
|
4882
|
+
get remove() {
|
|
4883
|
+
return e("copy.actions.remove");
|
|
4884
|
+
},
|
|
4885
|
+
get delete() {
|
|
4886
|
+
return e("copy.actions.delete");
|
|
4887
|
+
},
|
|
4888
|
+
get search() {
|
|
4889
|
+
return e("copy.actions.search");
|
|
4890
|
+
}
|
|
4891
|
+
},
|
|
4892
|
+
navigation: {
|
|
4893
|
+
get content() {
|
|
4894
|
+
return e("copy.navigation.content");
|
|
4895
|
+
},
|
|
4896
|
+
get allContent() {
|
|
4897
|
+
return e("copy.navigation.allContent");
|
|
4898
|
+
},
|
|
4899
|
+
get media() {
|
|
4900
|
+
return e("copy.navigation.media");
|
|
4901
|
+
},
|
|
4902
|
+
get schedules() {
|
|
4903
|
+
return e("copy.navigation.schedules");
|
|
4904
|
+
},
|
|
4905
|
+
get upcoming() {
|
|
4906
|
+
return e("copy.navigation.upcoming");
|
|
4907
|
+
},
|
|
4908
|
+
get scheduleHistory() {
|
|
4909
|
+
return e("copy.navigation.scheduleHistory");
|
|
4910
|
+
},
|
|
4911
|
+
get trash() {
|
|
4912
|
+
return e("copy.navigation.trash");
|
|
4913
|
+
},
|
|
4914
|
+
get people() {
|
|
4915
|
+
return e("copy.navigation.people");
|
|
4916
|
+
},
|
|
4917
|
+
get seo() {
|
|
4918
|
+
return e("copy.navigation.seo");
|
|
4919
|
+
},
|
|
4920
|
+
get activity() {
|
|
4921
|
+
return e("copy.navigation.activity");
|
|
4922
|
+
},
|
|
4923
|
+
get account() {
|
|
4924
|
+
return e("copy.navigation.account");
|
|
4925
|
+
},
|
|
4926
|
+
get settings() {
|
|
4927
|
+
return e("copy.navigation.settings");
|
|
4928
|
+
},
|
|
4929
|
+
get modules() {
|
|
4930
|
+
return e("copy.navigation.modules");
|
|
4931
|
+
},
|
|
4932
|
+
get viewSite() {
|
|
4933
|
+
return e("copy.navigation.viewSite");
|
|
4934
|
+
},
|
|
4935
|
+
get signOut() {
|
|
4936
|
+
return e("copy.navigation.signOut");
|
|
4937
|
+
},
|
|
4938
|
+
get search() {
|
|
4939
|
+
return e("copy.navigation.search");
|
|
4940
|
+
}
|
|
4941
|
+
}
|
|
4942
|
+
};
|
|
4943
|
+
}
|
|
4944
|
+
//#endregion
|
|
4945
|
+
//#region src/connection/studioContext.ts
|
|
4946
|
+
var Sg = Symbol("Studio context");
|
|
4947
|
+
function Cg() {
|
|
4948
|
+
let e = ki(Sg);
|
|
4949
|
+
if (!e) throw Error("A signed-in Studio context is required.");
|
|
4950
|
+
return e;
|
|
4951
|
+
}
|
|
4952
|
+
//#endregion
|
|
4953
|
+
export { wm as A, sl as B, Gm as C, bm as D, ym as E, gl as F, el as G, rl as H, yl as I, Yo as J, nl as K, il as L, vm as M, qp as N, Cm as O, xl as P, $c as R, Bm as S, Sm as T, al as U, tl as V, Qc as W, Uo as X, Go as Y, uh as _, bg as a, Im as b, fg as c, lg as d, tg as f, _h as g, Vh as h, yg as i, _m as j, Am as k, pg as l, kh as m, Cg as n, sg as o, Mh as p, Xo as q, xg as r, dg as s, Sg as t, cg as u, vh as v, Fm as w, Lm as x, eh as y, Zc as z };
|