@phtngyn/cms 0.2.0-beta.8 → 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.
Files changed (524) hide show
  1. package/LICENSE +18 -10
  2. package/README.md +59 -404
  3. package/drizzle/20261003215543_initial/migration.sql +251 -0
  4. package/drizzle/20261003215543_initial/snapshot.json +1941 -0
  5. package/package.json +75 -71
  6. package/src/Authoring.d.ts +41 -49
  7. package/src/Authoring.js +1 -1
  8. package/src/Blocks-BrxSemnd.js +40 -0
  9. package/src/Client.d.ts +8186 -0
  10. package/src/Client.js +41 -0
  11. package/src/Collections.d.ts +142 -0
  12. package/src/Collections.js +142 -0
  13. package/src/Config-CMiwciub.js +130 -0
  14. package/src/Config.d.ts +172 -0
  15. package/src/Config.js +2 -0
  16. package/src/Configuration-Dk2k3OIc.js +73 -0
  17. package/src/DataTransfer-BmECvPHB.js +488 -0
  18. package/src/Database-DSsNCGft.d.ts +3 -0
  19. package/src/Delivery.d.ts +28 -0
  20. package/src/Delivery.js +7 -0
  21. package/src/Document-CKXMSEf1.js +293 -0
  22. package/src/Document-TgwYKJZM.d.ts +220 -0
  23. package/src/DocumentRenderer-Wz2xaNyf.js +394 -0
  24. package/src/EditorSchema-wrDv-id6.js +296 -0
  25. package/src/Fields-BegSgYhj.d.ts +166 -0
  26. package/src/Fields-ioGaMEh9.js +130 -0
  27. package/src/Forms-BuKAXQxr.d.ts +203 -0
  28. package/src/Forms.d.ts +48 -11
  29. package/src/Forms.js +342 -7
  30. package/src/I18n-Ckf9h0rC.js +154 -0
  31. package/src/I18n.d.ts +45 -2
  32. package/src/I18n.js +2 -1
  33. package/src/Image-CJWPLnhP.js +110 -0
  34. package/src/Links-CJYyy7rC.js +28 -0
  35. package/src/Links-Dx1yOni8.d.ts +28 -0
  36. package/src/Locales-Ch7a5xuA.js +67 -0
  37. package/src/Locales-jwbmJaOp.d.ts +43 -0
  38. package/src/Locales.d.ts +3 -0
  39. package/src/Locales.js +3 -0
  40. package/src/Media-BQ0uL4w7.d.ts +15 -0
  41. package/src/Media-DSyvd14o.js +87 -0
  42. package/src/Module.d.ts +2 -10
  43. package/src/Module.js +1040 -152
  44. package/src/Operations.d.ts +57 -0
  45. package/src/Operations.js +263 -0
  46. package/src/People-DvNZauWw.js +69 -0
  47. package/src/PreviewFocus-C_EelZO5.js +104 -0
  48. package/src/Query-C0kGJF5_.d.ts +261 -0
  49. package/src/RevisionPreview-IVwbJ9Wy.js +133 -0
  50. package/src/Routes-BaZvm2LE.js +126 -0
  51. package/src/Routes-DM1rRp3r.d.ts +15 -0
  52. package/src/S3MediaObjects-y-WacEi9.js +193 -0
  53. package/src/Seo-BcpqxoAs.d.ts +57 -0
  54. package/src/Seo-CjNUtUkj.js +254 -0
  55. package/src/StudioApi-CXLwwocX.js +833 -0
  56. package/src/StudioErrors-T5zLGQ1M.js +117 -0
  57. package/src/StudioErrors-kq-E44lQ.d.ts +104 -0
  58. package/src/StudioServer.d.ts +20 -0
  59. package/src/StudioServer.js +34 -0
  60. package/src/answers-DcTg0Xv2.js +41 -0
  61. package/src/cli.js +681 -187
  62. package/src/contracts-rprW3ZOB.js +130 -0
  63. package/src/forms-3xuf0Ym7.d.ts +206 -0
  64. package/src/localeConfiguration-BPbkLi7-.js +32 -0
  65. package/src/localeContext-DhF3SPvM.js +59 -0
  66. package/src/locales-6OD4XGIZ.js +12 -0
  67. package/src/nuxtDelivery-BYX_Cddb.js +466 -0
  68. package/src/plugin-DTYuDaQu.js +7171 -0
  69. package/src/previewContext-dt3ZUh-w.js +4 -0
  70. package/src/previewRegions-CXjk5cbP.js +145 -0
  71. package/src/previewSource-fb-q3ESM.js +144 -0
  72. package/src/rendering-D9LVeEKX.js +47 -0
  73. package/src/rolldown-runtime-8H4AJuhK.js +14 -0
  74. package/src/runtime/CmsImage.js +38 -0
  75. package/src/runtime/DocumentPage.vue +10 -0
  76. package/src/runtime/DocumentPageContent.js +48 -0
  77. package/src/runtime/DocumentRenderer.d.ts +129 -0
  78. package/src/runtime/DocumentRenderer.js +2 -0
  79. package/src/runtime/api.js +48 -6
  80. package/src/runtime/delivery/useCmsDocument.js +2 -0
  81. package/src/runtime/delivery/useCmsDocumentQuery.js +2 -0
  82. package/src/runtime/delivery/useCmsDocumentSeo.js +2 -114
  83. package/src/runtime/delivery/useCmsLocale.js +10 -0
  84. package/src/runtime/plugin.js +2 -40
  85. package/src/runtime/preview.css +85 -0
  86. package/src/runtime/preview.js +277 -0
  87. package/src/runtime/previewSource.js +82 -0
  88. package/src/runtime/revisionPrivacy.js +13 -0
  89. package/src/runtime/studio.js +10 -0
  90. package/src/runtime/studioIcons.js +36 -0
  91. package/src/validation-3pggwcnm.js +396 -0
  92. package/src/validation-DpUwPC8Y.js +224 -0
  93. package/studio/THIRD-PARTY-LICENSES.md +2406 -0
  94. package/studio/chunks/AccountPage-DL3DitDM.js +288 -0
  95. package/studio/chunks/AccountPage-DL3DitDM.js.br +0 -0
  96. package/studio/chunks/AccountPage-DL3DitDM.js.gz +0 -0
  97. package/studio/chunks/ActivityPage-CLqVUqTh.js +584 -0
  98. package/studio/chunks/ActivityPage-CLqVUqTh.js.br +0 -0
  99. package/studio/chunks/ActivityPage-CLqVUqTh.js.gz +0 -0
  100. package/studio/chunks/Alert-D0D24z_a.js +335 -0
  101. package/studio/chunks/Alert-D0D24z_a.js.br +0 -0
  102. package/studio/chunks/Alert-D0D24z_a.js.gz +0 -0
  103. package/studio/chunks/Badge-BBFs88TI.js +346 -0
  104. package/studio/chunks/Badge-BBFs88TI.js.br +0 -0
  105. package/studio/chunks/Badge-BBFs88TI.js.gz +0 -0
  106. package/studio/chunks/Button-BT3ztSPx.js +14319 -0
  107. package/studio/chunks/Button-BT3ztSPx.js.br +0 -0
  108. package/studio/chunks/Button-BT3ztSPx.js.gz +0 -0
  109. package/studio/chunks/Collapsible-CKnEYIlp.js +246 -0
  110. package/studio/chunks/Collapsible-CKnEYIlp.js.br +0 -0
  111. package/studio/chunks/Collapsible-CKnEYIlp.js.gz +0 -0
  112. package/studio/chunks/ContentInventory-D7nsFA6U.js +1745 -0
  113. package/studio/chunks/ContentInventory-D7nsFA6U.js.br +0 -0
  114. package/studio/chunks/ContentInventory-D7nsFA6U.js.gz +0 -0
  115. package/studio/chunks/ContentPage-DCxt6BeD.js +18 -0
  116. package/studio/chunks/ContentPage-DCxt6BeD.js.br +0 -0
  117. package/studio/chunks/ContentPage-DCxt6BeD.js.gz +0 -0
  118. package/studio/chunks/DashboardSearch-DjyMjJwF.js +2413 -0
  119. package/studio/chunks/DashboardSearch-DjyMjJwF.js.br +0 -0
  120. package/studio/chunks/DashboardSearch-DjyMjJwF.js.gz +0 -0
  121. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js +26063 -0
  122. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.br +0 -0
  123. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.gz +0 -0
  124. package/studio/chunks/DropdownMenu-CA9fB0uZ.js +4400 -0
  125. package/studio/chunks/DropdownMenu-CA9fB0uZ.js.br +0 -0
  126. package/studio/chunks/DropdownMenu-CA9fB0uZ.js.gz +0 -0
  127. package/studio/chunks/EditorPage-D_PAYEE4.js +7799 -0
  128. package/studio/chunks/EditorPage-D_PAYEE4.js.br +0 -0
  129. package/studio/chunks/EditorPage-D_PAYEE4.js.gz +0 -0
  130. package/studio/chunks/FormField-CgM6l2Yn.js +198 -0
  131. package/studio/chunks/FormField-CgM6l2Yn.js.br +0 -0
  132. package/studio/chunks/FormField-CgM6l2Yn.js.gz +0 -0
  133. package/studio/chunks/HelpPage-C-vrFcT_.js +552 -0
  134. package/studio/chunks/HelpPage-C-vrFcT_.js.br +0 -0
  135. package/studio/chunks/HelpPage-C-vrFcT_.js.gz +0 -0
  136. package/studio/chunks/Kbd-Ot7TIhVZ.js +271 -0
  137. package/studio/chunks/Kbd-Ot7TIhVZ.js.br +0 -0
  138. package/studio/chunks/Kbd-Ot7TIhVZ.js.gz +0 -0
  139. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js +101 -0
  140. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.br +0 -0
  141. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.gz +0 -0
  142. package/studio/chunks/MediaPage-D-jaWtdl.js +923 -0
  143. package/studio/chunks/MediaPage-D-jaWtdl.js.br +0 -0
  144. package/studio/chunks/MediaPage-D-jaWtdl.js.gz +0 -0
  145. package/studio/chunks/MediaPicker-BZs2wUFz.js +837 -0
  146. package/studio/chunks/MediaPicker-BZs2wUFz.js.br +0 -0
  147. package/studio/chunks/MediaPicker-BZs2wUFz.js.gz +0 -0
  148. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js +1173 -0
  149. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.br +0 -0
  150. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.gz +0 -0
  151. package/studio/chunks/Modal-D6hSvxHd.js +265 -0
  152. package/studio/chunks/Modal-D6hSvxHd.js.br +0 -0
  153. package/studio/chunks/Modal-D6hSvxHd.js.gz +0 -0
  154. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js +277 -0
  155. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.br +0 -0
  156. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.gz +0 -0
  157. package/studio/chunks/Pagination-D9BSo5H2.js +573 -0
  158. package/studio/chunks/Pagination-D9BSo5H2.js.br +0 -0
  159. package/studio/chunks/Pagination-D9BSo5H2.js.gz +0 -0
  160. package/studio/chunks/PeoplePage-CWIXitBD.js +783 -0
  161. package/studio/chunks/PeoplePage-CWIXitBD.js.br +0 -0
  162. package/studio/chunks/PeoplePage-CWIXitBD.js.gz +0 -0
  163. package/studio/chunks/Popover-B63bkTMS.js +128 -0
  164. package/studio/chunks/Popover-B63bkTMS.js.br +0 -0
  165. package/studio/chunks/Popover-B63bkTMS.js.gz +0 -0
  166. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js +255 -0
  167. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.br +0 -0
  168. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.gz +0 -0
  169. package/studio/chunks/Routes-DLYHmulE.js +102 -0
  170. package/studio/chunks/Routes-DLYHmulE.js.br +0 -0
  171. package/studio/chunks/Routes-DLYHmulE.js.gz +0 -0
  172. package/studio/chunks/RovingFocusItem-QZNg-wWF.js +95 -0
  173. package/studio/chunks/RovingFocusItem-QZNg-wWF.js.br +0 -0
  174. package/studio/chunks/RovingFocusItem-QZNg-wWF.js.gz +0 -0
  175. package/studio/chunks/ScheduledPage-C0hqrkr5.js +332 -0
  176. package/studio/chunks/ScheduledPage-C0hqrkr5.js.br +0 -0
  177. package/studio/chunks/ScheduledPage-C0hqrkr5.js.gz +0 -0
  178. package/studio/chunks/Search-BEgCe9Aj.js +14646 -0
  179. package/studio/chunks/Search-BEgCe9Aj.js.br +0 -0
  180. package/studio/chunks/Search-BEgCe9Aj.js.gz +0 -0
  181. package/studio/chunks/Select-B50WZMW-.js +2145 -0
  182. package/studio/chunks/Select-B50WZMW-.js.br +0 -0
  183. package/studio/chunks/Select-B50WZMW-.js.gz +0 -0
  184. package/studio/chunks/SelectMenu-DSweWGMz.js +2109 -0
  185. package/studio/chunks/SelectMenu-DSweWGMz.js.br +0 -0
  186. package/studio/chunks/SelectMenu-DSweWGMz.js.gz +0 -0
  187. package/studio/chunks/SeoPage-CNNxGe4h.js +846 -0
  188. package/studio/chunks/SeoPage-CNNxGe4h.js.br +0 -0
  189. package/studio/chunks/SeoPage-CNNxGe4h.js.gz +0 -0
  190. package/studio/chunks/Skeleton-COz8dcrw.js +39 -0
  191. package/studio/chunks/Skeleton-COz8dcrw.js.br +2 -0
  192. package/studio/chunks/Skeleton-COz8dcrw.js.gz +0 -0
  193. package/studio/chunks/Slideover-QMMHAAys.js +289 -0
  194. package/studio/chunks/Slideover-QMMHAAys.js.br +0 -0
  195. package/studio/chunks/Slideover-QMMHAAys.js.gz +0 -0
  196. package/studio/chunks/StudioPage-ngEIDr5d.js +80 -0
  197. package/studio/chunks/StudioPage-ngEIDr5d.js.br +0 -0
  198. package/studio/chunks/StudioPage-ngEIDr5d.js.gz +0 -0
  199. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js +2524 -0
  200. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.br +0 -0
  201. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.gz +0 -0
  202. package/studio/chunks/Switch-qKl1aDn7.js +484 -0
  203. package/studio/chunks/Switch-qKl1aDn7.js.br +0 -0
  204. package/studio/chunks/Switch-qKl1aDn7.js.gz +0 -0
  205. package/studio/chunks/ToolPage-DxoVAJVk.js +29 -0
  206. package/studio/chunks/ToolPage-DxoVAJVk.js.br +0 -0
  207. package/studio/chunks/ToolPage-DxoVAJVk.js.gz +0 -0
  208. package/studio/chunks/Tooltip-Bu15m_DB.js +693 -0
  209. package/studio/chunks/Tooltip-Bu15m_DB.js.br +0 -0
  210. package/studio/chunks/Tooltip-Bu15m_DB.js.gz +0 -0
  211. package/studio/chunks/TrashPage-lhqLLdoG.js +12 -0
  212. package/studio/chunks/TrashPage-lhqLLdoG.js.br +0 -0
  213. package/studio/chunks/TrashPage-lhqLLdoG.js.gz +0 -0
  214. package/studio/chunks/VersionsPage-Cqy6UAp9.js +2349 -0
  215. package/studio/chunks/VersionsPage-Cqy6UAp9.js.br +0 -0
  216. package/studio/chunks/VersionsPage-Cqy6UAp9.js.gz +0 -0
  217. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js +113 -0
  218. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.br +0 -0
  219. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.gz +0 -0
  220. package/studio/chunks/arrays-CUJkmV4I.js +10 -0
  221. package/studio/chunks/arrays-CUJkmV4I.js.br +0 -0
  222. package/studio/chunks/arrays-CUJkmV4I.js.gz +0 -0
  223. package/studio/chunks/base-DkTekJe8.js +213 -0
  224. package/studio/chunks/base-DkTekJe8.js.br +0 -0
  225. package/studio/chunks/base-DkTekJe8.js.gz +0 -0
  226. package/studio/chunks/content-DUGl3N4d.js +6012 -0
  227. package/studio/chunks/content-DUGl3N4d.js.br +0 -0
  228. package/studio/chunks/content-DUGl3N4d.js.gz +0 -0
  229. package/studio/chunks/destinations-DPIQVQa6.js +227 -0
  230. package/studio/chunks/destinations-DPIQVQa6.js.br +0 -0
  231. package/studio/chunks/destinations-DPIQVQa6.js.gz +0 -0
  232. package/studio/chunks/en-073cjKW4.js +152 -0
  233. package/studio/chunks/en-073cjKW4.js.br +0 -0
  234. package/studio/chunks/en-073cjKW4.js.gz +0 -0
  235. package/studio/chunks/en-Bn8mxPuf.js +134 -0
  236. package/studio/chunks/en-Bn8mxPuf.js.br +0 -0
  237. package/studio/chunks/en-Bn8mxPuf.js.gz +0 -0
  238. package/studio/chunks/en-C9OiaUDZ.js +251 -0
  239. package/studio/chunks/en-C9OiaUDZ.js.br +0 -0
  240. package/studio/chunks/en-C9OiaUDZ.js.gz +0 -0
  241. package/studio/chunks/en-CHAR6jzx.js +147 -0
  242. package/studio/chunks/en-CHAR6jzx.js.br +0 -0
  243. package/studio/chunks/en-CHAR6jzx.js.gz +0 -0
  244. package/studio/chunks/en-Cq4N1vEF.js +93 -0
  245. package/studio/chunks/en-Cq4N1vEF.js.br +2 -0
  246. package/studio/chunks/en-Cq4N1vEF.js.gz +0 -0
  247. package/studio/chunks/en-D2hRqlse.js +140 -0
  248. package/studio/chunks/en-D2hRqlse.js.br +0 -0
  249. package/studio/chunks/en-D2hRqlse.js.gz +0 -0
  250. package/studio/chunks/en-DiUC3-j6.js +144 -0
  251. package/studio/chunks/en-DiUC3-j6.js.br +0 -0
  252. package/studio/chunks/en-DiUC3-j6.js.gz +0 -0
  253. package/studio/chunks/english-Cs_Adu-u.js +8 -0
  254. package/studio/chunks/english-Cs_Adu-u.js.br +0 -0
  255. package/studio/chunks/english-Cs_Adu-u.js.gz +0 -0
  256. package/studio/chunks/esm-D6DqSiL1.js +752 -0
  257. package/studio/chunks/esm-D6DqSiL1.js.br +0 -0
  258. package/studio/chunks/esm-D6DqSiL1.js.gz +0 -0
  259. package/studio/chunks/externalRequest-CTzr2nDq.js +23 -0
  260. package/studio/chunks/externalRequest-CTzr2nDq.js.br +0 -0
  261. package/studio/chunks/externalRequest-CTzr2nDq.js.gz +0 -0
  262. package/studio/chunks/iconify-DR9ryCPv.js +1007 -0
  263. package/studio/chunks/iconify-DR9ryCPv.js.br +0 -0
  264. package/studio/chunks/iconify-DR9ryCPv.js.gz +0 -0
  265. package/studio/chunks/icons-D2MsAaXq.js +183 -0
  266. package/studio/chunks/icons-D2MsAaXq.js.br +0 -0
  267. package/studio/chunks/icons-D2MsAaXq.js.gz +0 -0
  268. package/studio/chunks/leaveGuards-D22fTGgr.js +26 -0
  269. package/studio/chunks/leaveGuards-D22fTGgr.js.br +0 -0
  270. package/studio/chunks/leaveGuards-D22fTGgr.js.gz +0 -0
  271. package/studio/chunks/lucideIcons-EyqyPBsX.js +238 -0
  272. package/studio/chunks/lucideIcons-EyqyPBsX.js.br +0 -0
  273. package/studio/chunks/lucideIcons-EyqyPBsX.js.gz +0 -0
  274. package/studio/chunks/mediaRoute--8cY8rUe.js +17 -0
  275. package/studio/chunks/mediaRoute--8cY8rUe.js.br +0 -0
  276. package/studio/chunks/mediaRoute--8cY8rUe.js.gz +0 -0
  277. package/studio/chunks/newDocumentPlanning-C26DHpvh.js +77 -0
  278. package/studio/chunks/newDocumentPlanning-C26DHpvh.js.br +0 -0
  279. package/studio/chunks/newDocumentPlanning-C26DHpvh.js.gz +0 -0
  280. package/studio/chunks/notifications-OKOLc40v.js +110 -0
  281. package/studio/chunks/notifications-OKOLc40v.js.br +0 -0
  282. package/studio/chunks/notifications-OKOLc40v.js.gz +0 -0
  283. package/studio/chunks/operations-CjNHyrEX.js +57 -0
  284. package/studio/chunks/operations-CjNHyrEX.js.br +0 -0
  285. package/studio/chunks/operations-CjNHyrEX.js.gz +0 -0
  286. package/studio/chunks/overlay-DnqFLZTc.js +1733 -0
  287. package/studio/chunks/overlay-DnqFLZTc.js.br +0 -0
  288. package/studio/chunks/overlay-DnqFLZTc.js.gz +0 -0
  289. package/studio/chunks/presentation-DF83w0hE.js +57 -0
  290. package/studio/chunks/presentation-DF83w0hE.js.br +0 -0
  291. package/studio/chunks/presentation-DF83w0hE.js.gz +0 -0
  292. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js +4557 -0
  293. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.br +0 -0
  294. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.gz +0 -0
  295. package/studio/chunks/searchPresentation-DFwxQkt3.js +76 -0
  296. package/studio/chunks/searchPresentation-DFwxQkt3.js.br +0 -0
  297. package/studio/chunks/searchPresentation-DFwxQkt3.js.gz +0 -0
  298. package/studio/chunks/status-DQv6ihkU.js +38 -0
  299. package/studio/chunks/status-DQv6ihkU.js.br +0 -0
  300. package/studio/chunks/status-DQv6ihkU.js.gz +0 -0
  301. package/studio/chunks/studioContext-I8HozGU1.js +4953 -0
  302. package/studio/chunks/studioContext-I8HozGU1.js.br +0 -0
  303. package/studio/chunks/studioContext-I8HozGU1.js.gz +0 -0
  304. package/studio/chunks/studioQueries-BR-9NT5F.js +73 -0
  305. package/studio/chunks/studioQueries-BR-9NT5F.js.br +0 -0
  306. package/studio/chunks/studioQueries-BR-9NT5F.js.gz +0 -0
  307. package/studio/chunks/studioSearch-ByaL-QpM.js +1095 -0
  308. package/studio/chunks/studioSearch-ByaL-QpM.js.br +0 -0
  309. package/studio/chunks/studioSearch-ByaL-QpM.js.gz +0 -0
  310. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js +62 -0
  311. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.br +0 -0
  312. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.gz +0 -0
  313. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js +189 -0
  314. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.br +0 -0
  315. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.gz +0 -0
  316. package/studio/chunks/useDocumentMessage-BAWvc38w.js +16 -0
  317. package/studio/chunks/useDocumentMessage-BAWvc38w.js.br +3 -0
  318. package/studio/chunks/useDocumentMessage-BAWvc38w.js.gz +0 -0
  319. package/studio/chunks/useFilter-DzyiTR7f.js +87 -0
  320. package/studio/chunks/useFilter-DzyiTR7f.js.br +0 -0
  321. package/studio/chunks/useFilter-DzyiTR7f.js.gz +0 -0
  322. package/studio/chunks/useFormControl-CL7sSCUo.js +8 -0
  323. package/studio/chunks/useFormControl-CL7sSCUo.js.br +0 -0
  324. package/studio/chunks/useFormControl-CL7sSCUo.js.gz +0 -0
  325. package/studio/chunks/useGraceArea-Chcy25IQ.js +154 -0
  326. package/studio/chunks/useGraceArea-Chcy25IQ.js.br +0 -0
  327. package/studio/chunks/useGraceArea-Chcy25IQ.js.gz +0 -0
  328. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js +44 -0
  329. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.br +8 -0
  330. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.gz +0 -0
  331. package/studio/chunks/useLinkCopy-CMjQteCy.js +35 -0
  332. package/studio/chunks/useLinkCopy-CMjQteCy.js.br +0 -0
  333. package/studio/chunks/useLinkCopy-CMjQteCy.js.gz +0 -0
  334. package/studio/chunks/usePointerMotion-DwRcwBNQ.js +16 -0
  335. package/studio/chunks/usePointerMotion-DwRcwBNQ.js.br +0 -0
  336. package/studio/chunks/usePointerMotion-DwRcwBNQ.js.gz +0 -0
  337. package/studio/chunks/useStudioNavigation-CLwtSYpb.js +298 -0
  338. package/studio/chunks/useStudioNavigation-CLwtSYpb.js.br +0 -0
  339. package/studio/chunks/useStudioNavigation-CLwtSYpb.js.gz +0 -0
  340. package/studio/chunks/useStudioPages-DR9qmYLg.js +79 -0
  341. package/studio/chunks/useStudioPages-DR9qmYLg.js.br +0 -0
  342. package/studio/chunks/useStudioPages-DR9qmYLg.js.gz +0 -0
  343. package/studio/chunks/utils-mdScC0v0.js +59 -0
  344. package/studio/chunks/utils-mdScC0v0.js.br +0 -0
  345. package/studio/chunks/utils-mdScC0v0.js.gz +0 -0
  346. package/studio/chunks/virtualizer-D1S0bZ4t.js +781 -0
  347. package/studio/chunks/virtualizer-D1S0bZ4t.js.br +0 -0
  348. package/studio/chunks/virtualizer-D1S0bZ4t.js.gz +0 -0
  349. package/studio/help/64f767fe29c2-save-and-publish.svg +7 -0
  350. package/studio/host.css +1 -1
  351. package/studio/host.css.br +0 -0
  352. package/studio/host.css.gz +0 -0
  353. package/studio/host.js +8793 -39395
  354. package/studio/host.js.br +0 -0
  355. package/studio/host.js.gz +0 -0
  356. package/CHANGELOG.md +0 -14
  357. package/bin/cms.mjs +0 -2
  358. package/src/ApplicationTypes.d.ts +0 -84
  359. package/src/ApplicationTypes.js +0 -1
  360. package/src/Configuration-CMweD9bn.js +0 -1191
  361. package/src/Configuration-CMweD9bn.js.map +0 -1
  362. package/src/Configuration.d.ts +0 -82
  363. package/src/Configuration.js +0 -8
  364. package/src/Configuration.js.map +0 -1
  365. package/src/Content.d.ts +0 -68
  366. package/src/Content.js +0 -373
  367. package/src/Content.js.map +0 -1
  368. package/src/ContentTransfer-BxwswWn3.js +0 -86
  369. package/src/ContentTransfer-BxwswWn3.js.map +0 -1
  370. package/src/ContentTransfer-Z9FHyLez.d.ts +0 -72
  371. package/src/DocumentEngine-tYtwbBjr.js +0 -978
  372. package/src/DocumentEngine-tYtwbBjr.js.map +0 -1
  373. package/src/DocumentModel.d.ts +0 -52
  374. package/src/DocumentModel.js +0 -66
  375. package/src/DocumentModel.js.map +0 -1
  376. package/src/Forms-CX-hwmJF.js +0 -391
  377. package/src/Forms-CX-hwmJF.js.map +0 -1
  378. package/src/Forms-CfNPTiCr.js +0 -110
  379. package/src/Forms-CfNPTiCr.js.map +0 -1
  380. package/src/Forms-R0HoTR-o.d.ts +0 -92
  381. package/src/Forms.js.map +0 -1
  382. package/src/HttpPaths-Be3vshPJ.js +0 -20
  383. package/src/HttpPaths-Be3vshPJ.js.map +0 -1
  384. package/src/I18n-wxswIRyY.d.ts +0 -30
  385. package/src/Media-j1bTritO.js +0 -112
  386. package/src/Media-j1bTritO.js.map +0 -1
  387. package/src/Module.js.map +0 -1
  388. package/src/References-CCPDAPve.js +0 -45
  389. package/src/References-CCPDAPve.js.map +0 -1
  390. package/src/S3MediaObjects-BXfjaZOu.js +0 -2756
  391. package/src/S3MediaObjects-BXfjaZOu.js.map +0 -1
  392. package/src/Seo-402YumpT.d.ts +0 -198
  393. package/src/cli/content.js +0 -101
  394. package/src/cli/content.js.map +0 -1
  395. package/src/cli.js.map +0 -1
  396. package/src/connection-BP80q4d-.js +0 -92
  397. package/src/connection-BP80q4d-.js.map +0 -1
  398. package/src/dev-lifecycle-3I_pozUl.js +0 -535
  399. package/src/dev-lifecycle-3I_pozUl.js.map +0 -1
  400. package/src/installation-DxqSSVbH.js +0 -9105
  401. package/src/installation-DxqSSVbH.js.map +0 -1
  402. package/src/internal/application-types.js +0 -43
  403. package/src/internal/application-types.js.map +0 -1
  404. package/src/internal/authoring-catalog.js +0 -158
  405. package/src/internal/authoring-catalog.js.map +0 -1
  406. package/src/internal/authoring-compiler.js +0 -146
  407. package/src/internal/authoring-compiler.js.map +0 -1
  408. package/src/internal/authoring-metadata.js +0 -191
  409. package/src/internal/authoring-metadata.js.map +0 -1
  410. package/src/internal/cms-config.js +0 -45
  411. package/src/internal/cms-config.js.map +0 -1
  412. package/src/internal/configuration.js +0 -228
  413. package/src/internal/configuration.js.map +0 -1
  414. package/src/internal/dev-lifecycle.js +0 -3
  415. package/src/internal/diagnostics.js +0 -47
  416. package/src/internal/diagnostics.js.map +0 -1
  417. package/src/internal/document-model.js +0 -376
  418. package/src/internal/document-model.js.map +0 -1
  419. package/src/internal/field-metadata.js +0 -7
  420. package/src/internal/field-metadata.js.map +0 -1
  421. package/src/internal/form-capabilities.js +0 -12
  422. package/src/internal/form-capabilities.js.map +0 -1
  423. package/src/internal/i18n.js +0 -73
  424. package/src/internal/i18n.js.map +0 -1
  425. package/src/internal/studio-app.js +0 -68
  426. package/src/internal/studio-app.js.map +0 -1
  427. package/src/location-CMNGO3lU.js +0 -35
  428. package/src/location-CMNGO3lU.js.map +0 -1
  429. package/src/metadata-DN9_K6Yl.js +0 -201
  430. package/src/metadata-DN9_K6Yl.js.map +0 -1
  431. package/src/models-5j67LMqW.js +0 -131
  432. package/src/models-5j67LMqW.js.map +0 -1
  433. package/src/models-VmGmG19-.js +0 -628
  434. package/src/models-VmGmG19-.js.map +0 -1
  435. package/src/runtime/api.js.map +0 -1
  436. package/src/runtime/blocks.js +0 -30
  437. package/src/runtime/blocks.js.map +0 -1
  438. package/src/runtime/collaboration.js +0 -45
  439. package/src/runtime/collaboration.js.map +0 -1
  440. package/src/runtime/delivery/DocumentField.js +0 -23
  441. package/src/runtime/delivery/DocumentField.js.map +0 -1
  442. package/src/runtime/delivery/DocumentRenderer.js +0 -61
  443. package/src/runtime/delivery/DocumentRenderer.js.map +0 -1
  444. package/src/runtime/delivery/DocumentScope.js +0 -41
  445. package/src/runtime/delivery/DocumentScope.js.map +0 -1
  446. package/src/runtime/delivery/blocks.js +0 -8
  447. package/src/runtime/delivery/blocks.js.map +0 -1
  448. package/src/runtime/delivery/context.js +0 -12
  449. package/src/runtime/delivery/context.js.map +0 -1
  450. package/src/runtime/delivery/document-page.js +0 -21
  451. package/src/runtime/delivery/document-page.js.map +0 -1
  452. package/src/runtime/delivery/document.js +0 -43
  453. package/src/runtime/delivery/document.js.map +0 -1
  454. package/src/runtime/delivery/error.js +0 -11
  455. package/src/runtime/delivery/error.js.map +0 -1
  456. package/src/runtime/delivery/plugin.js +0 -104
  457. package/src/runtime/delivery/plugin.js.map +0 -1
  458. package/src/runtime/delivery/preview.d.ts +0 -11
  459. package/src/runtime/delivery/preview.js +0 -6
  460. package/src/runtime/delivery/preview.js.map +0 -1
  461. package/src/runtime/delivery/types.d.ts +0 -2
  462. package/src/runtime/delivery/types.js +0 -1
  463. package/src/runtime/delivery/useCmsDocumentSeo.d.ts +0 -67
  464. package/src/runtime/delivery/useCmsDocumentSeo.js.map +0 -1
  465. package/src/runtime/delivery/useDocument.d.ts +0 -6
  466. package/src/runtime/delivery/useDocument.js +0 -23
  467. package/src/runtime/delivery/useDocument.js.map +0 -1
  468. package/src/runtime/delivery/useDocumentQuery.d.ts +0 -7
  469. package/src/runtime/delivery/useDocumentQuery.js +0 -29
  470. package/src/runtime/delivery/useDocumentQuery.js.map +0 -1
  471. package/src/runtime/forms/document.js +0 -38
  472. package/src/runtime/forms/document.js.map +0 -1
  473. package/src/runtime/forms/useCmsForm.js +0 -257
  474. package/src/runtime/forms/useCmsForm.js.map +0 -1
  475. package/src/runtime/i18n/translator.js +0 -58
  476. package/src/runtime/i18n/translator.js.map +0 -1
  477. package/src/runtime/i18n/useCmsI18n.d.ts +0 -13
  478. package/src/runtime/i18n/useCmsI18n.js +0 -38
  479. package/src/runtime/i18n/useCmsI18n.js.map +0 -1
  480. package/src/runtime/installation.js +0 -3
  481. package/src/runtime/plugin.js.map +0 -1
  482. package/src/runtime/preview/CmsStudioPreviewMarker.js +0 -29
  483. package/src/runtime/preview/CmsStudioPreviewMarker.js.map +0 -1
  484. package/src/runtime/preview/comark-document.js +0 -37
  485. package/src/runtime/preview/comark-document.js.map +0 -1
  486. package/src/runtime/preview/connection.js +0 -3
  487. package/src/runtime/preview/controller.js +0 -265
  488. package/src/runtime/preview/controller.js.map +0 -1
  489. package/src/runtime/preview/crypto.js +0 -16
  490. package/src/runtime/preview/crypto.js.map +0 -1
  491. package/src/runtime/preview/overlay.js +0 -122
  492. package/src/runtime/preview/overlay.js.map +0 -1
  493. package/src/runtime/preview/plugin.client.js +0 -68
  494. package/src/runtime/preview/plugin.client.js.map +0 -1
  495. package/src/runtime/preview/preview.css +0 -91
  496. package/src/runtime/preview/protocol.d.ts +0 -16
  497. package/src/runtime/preview/protocol.js +0 -23
  498. package/src/runtime/preview/protocol.js.map +0 -1
  499. package/src/runtime/preview/regions.js +0 -142
  500. package/src/runtime/preview/regions.js.map +0 -1
  501. package/src/runtime/preview/store.js +0 -4
  502. package/src/runtime/sitemap-entries.js +0 -17
  503. package/src/runtime/sitemap-entries.js.map +0 -1
  504. package/src/runtime/sitemap.js +0 -23
  505. package/src/runtime/sitemap.js.map +0 -1
  506. package/src/runtime/studio-app.js +0 -17
  507. package/src/runtime/studio-app.js.map +0 -1
  508. package/src/runtime/studio-document.js +0 -46
  509. package/src/runtime/studio-document.js.map +0 -1
  510. package/src/runtime/studio-entry.js +0 -19
  511. package/src/runtime/studio-entry.js.map +0 -1
  512. package/src/runtime/studio-navigation.js +0 -11
  513. package/src/runtime/studio-navigation.js.map +0 -1
  514. package/src/scalars-CA6kyipS.d.ts +0 -7
  515. package/src/scalars-CVZqT3L0.js +0 -22
  516. package/src/scalars-CVZqT3L0.js.map +0 -1
  517. package/src/store-X1e1o_MF.js +0 -209
  518. package/src/store-X1e1o_MF.js.map +0 -1
  519. package/src/types-DZ0IV-Ow.d.ts +0 -101
  520. package/studio/CreateDocumentDialog-C4_JBo1w.js +0 -335
  521. package/studio/SelectMenu-wXqxymUw.js +0 -34045
  522. package/studio/collaboration-DcK2F6v9.js +0 -4566
  523. package/studio/editor-P2rB7Csp.js +0 -30128
  524. package/studio/rolldown-runtime-Dy4uBu1J.js +0 -11
@@ -0,0 +1,1745 @@
1
+ import { $ as e, A as t, Dt as n, E as r, F as i, Gt as a, Lt as o, Q as s, Ut as c, Wt as l, b as u, h as d, m as f, nn as p, o as m, t as h, tn as g, y as _, yt as v } from "./Button-BT3ztSPx.js";
2
+ import { It as y, on as b, st as x } from "./Search-BEgCe9Aj.js";
3
+ import { d as S, i as C, n as ee, r as te } from "./studioContext-I8HozGU1.js";
4
+ import { _ as ne, g as re } from "./useApi-CUWMwLLw-B3Q3g2nf.js";
5
+ import { $r as w, $t as T, A as E, B as D, Ci as O, Cr as k, E as A, K as j, M, N, Nn as P, Or as F, Pn as I, R as ie, V as L, Yr as ae, fa as R, gn as z, hr as B, k as V, lr as oe, mr as se, o as H, ra as U, ui as W, ur as ce, vi as G, zn as le } from "./runtime-core.esm-bundler-DKFA9Rep.js";
6
+ import { t as ue } from "./Select-B50WZMW-.js";
7
+ import { I as K, k as q, n as de } from "./overlay-DnqFLZTc.js";
8
+ import { a as fe, i as pe, n as me, r as J, t as he } from "./searchPresentation-DFwxQkt3.js";
9
+ import { t as ge } from "./DropdownMenu-CA9fB0uZ.js";
10
+ import { t as _e } from "./useFormControl-CL7sSCUo.js";
11
+ import { n as Y } from "./Switch-qKl1aDn7.js";
12
+ import { t as ve } from "./VisuallyHiddenInput-Cu8hQLRf.js";
13
+ import { t as X } from "./RovingFocusItem-QZNg-wWF.js";
14
+ import { n as Z } from "./FormField-CgM6l2Yn.js";
15
+ import { t as ye } from "./Pagination-D9BSo5H2.js";
16
+ import { t as be } from "./Tooltip-Bu15m_DB.js";
17
+ import { t as xe } from "./notifications-OKOLc40v.js";
18
+ import { t as Se } from "./english-Cs_Adu-u.js";
19
+ import { t as Ce } from "./Alert-D0D24z_a.js";
20
+ import { n as we, r as Te, t as Ee } from "./status-DQv6ihkU.js";
21
+ import { n as De, t as Oe } from "./studioQueries-BR-9NT5F.js";
22
+ import { t as ke } from "./Popover-B63bkTMS.js";
23
+ import { t as Ae } from "./StudioPage-ngEIDr5d.js";
24
+ import { n as je, r as Me, t as Ne } from "./StudioPageToolbar-BwHnqyr6.js";
25
+ import { t as Pe } from "./Skeleton-COz8dcrw.js";
26
+ import { t as Fe } from "./PublicationActionDialog-Cm_P0C3I.js";
27
+ //#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/Checkbox/CheckboxGroupRoot.js
28
+ var [Ie, Le] = /*#__PURE__*/ i("CheckboxGroupRoot");
29
+ //#endregion
30
+ //#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/Checkbox/utils.js
31
+ function Re(e) {
32
+ return e === "indeterminate";
33
+ }
34
+ function ze(e) {
35
+ return Re(e) ? "indeterminate" : e ? "checked" : "unchecked";
36
+ }
37
+ //#endregion
38
+ //#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/Checkbox/CheckboxRoot.js
39
+ var [Be, Ve] = /*#__PURE__*/ i("CheckboxRoot"), He = /* @__PURE__ */ j({
40
+ inheritAttrs: !1,
41
+ __name: "CheckboxRoot",
42
+ props: {
43
+ defaultValue: {
44
+ type: null,
45
+ required: !1
46
+ },
47
+ modelValue: {
48
+ type: null,
49
+ required: !1,
50
+ default: void 0
51
+ },
52
+ disabled: {
53
+ type: Boolean,
54
+ required: !1
55
+ },
56
+ value: {
57
+ type: null,
58
+ required: !1,
59
+ default: "on"
60
+ },
61
+ id: {
62
+ type: String,
63
+ required: !1
64
+ },
65
+ trueValue: {
66
+ type: null,
67
+ required: !1,
68
+ default: () => !0
69
+ },
70
+ falseValue: {
71
+ type: null,
72
+ required: !1,
73
+ default: () => !1
74
+ },
75
+ asChild: {
76
+ type: Boolean,
77
+ required: !1
78
+ },
79
+ as: {
80
+ type: null,
81
+ required: !1,
82
+ default: "button"
83
+ },
84
+ name: {
85
+ type: String,
86
+ required: !1
87
+ },
88
+ required: {
89
+ type: Boolean,
90
+ required: !1
91
+ }
92
+ },
93
+ emits: ["update:modelValue"],
94
+ setup(e, { emit: i }) {
95
+ let a = e, o = i, { forwardRef: c, currentElement: l } = t(), u = Ie(null), d = n(a, "modelValue", o, {
96
+ defaultValue: a.defaultValue ?? a.falseValue,
97
+ passive: a.modelValue === void 0
98
+ }), f = A(() => u?.disabled.value || a.disabled), m = A(() => s(d.value, a.trueValue)), h = A(() => K(u?.modelValue.value) ? d.value === "indeterminate" ? "indeterminate" : m.value : fe(u.modelValue.value, a.value));
99
+ function _() {
100
+ if (K(u?.modelValue.value)) d.value === "indeterminate" ? d.value = a.trueValue : d.value = m.value ? a.falseValue : a.trueValue;
101
+ else {
102
+ let e = [...u.modelValue.value || []];
103
+ if (fe(e, a.value)) {
104
+ let t = e.findIndex((e) => s(e, a.value));
105
+ e.splice(t, 1);
106
+ } else e.push(a.value);
107
+ u.modelValue.value = e;
108
+ }
109
+ }
110
+ let v = _e(l), y = Y(), b = oe(), x = A(() => {
111
+ if (!b["aria-label"]) return a.id && l.value ? document.querySelector(`[for="${a.id}"]`)?.innerText : void 0;
112
+ });
113
+ return Ve({
114
+ disabled: f,
115
+ state: h
116
+ }), (e, t) => (z(), N(H, null, [(z(), E(le(O(u)?.rovingFocus.value ? O(X) : O(r)), T({
117
+ ...e.$attrs,
118
+ ...O(y)
119
+ }, {
120
+ id: e.id,
121
+ ref: O(c),
122
+ role: "checkbox",
123
+ "as-child": e.asChild,
124
+ as: e.as,
125
+ type: e.as === "button" ? "button" : void 0,
126
+ "aria-checked": O(Re)(h.value) ? "mixed" : h.value,
127
+ "aria-required": e.required,
128
+ "aria-label": e.$attrs["aria-label"] || x.value,
129
+ "data-state": O(ze)(h.value),
130
+ "data-disabled": f.value ? "" : void 0,
131
+ disabled: f.value,
132
+ focusable: O(u)?.rovingFocus.value ? !f.value : void 0,
133
+ onKeydown: g(p(() => {}, ["prevent"]), ["enter"]),
134
+ onClick: _
135
+ }), {
136
+ default: F(() => [I(e.$slots, "default", {
137
+ modelValue: O(d),
138
+ state: h.value
139
+ })]),
140
+ _: 3
141
+ }, 16, [
142
+ "id",
143
+ "as-child",
144
+ "as",
145
+ "type",
146
+ "aria-checked",
147
+ "aria-required",
148
+ "aria-label",
149
+ "data-state",
150
+ "data-disabled",
151
+ "disabled",
152
+ "focusable",
153
+ "onKeydown"
154
+ ])), O(v) && e.name && !O(u) ? (z(), E(O(ve), T({
155
+ key: 0,
156
+ type: "checkbox",
157
+ checked: !!h.value,
158
+ name: e.name,
159
+ value: e.value,
160
+ disabled: f.value,
161
+ required: e.required
162
+ }, O(y)), null, 16, [
163
+ "checked",
164
+ "name",
165
+ "value",
166
+ "disabled",
167
+ "required"
168
+ ])) : M("v-if", !0)], 64));
169
+ }
170
+ }), Ue = /* @__PURE__ */ j({
171
+ __name: "CheckboxIndicator",
172
+ props: {
173
+ forceMount: {
174
+ type: Boolean,
175
+ required: !1
176
+ },
177
+ asChild: {
178
+ type: Boolean,
179
+ required: !1
180
+ },
181
+ as: {
182
+ type: null,
183
+ required: !1,
184
+ default: "span"
185
+ }
186
+ },
187
+ setup(e) {
188
+ let { forwardRef: n } = t(), i = Be();
189
+ return (e, t) => (z(), E(O(q), { present: e.forceMount || O(Re)(O(i).state.value) || O(i).state.value === !0 }, {
190
+ default: F(() => [L(O(r), T({
191
+ ref: O(n),
192
+ "data-state": O(ze)(O(i).state.value),
193
+ "data-disabled": O(i).disabled.value ? "" : void 0,
194
+ style: { pointerEvents: "none" },
195
+ "as-child": e.asChild,
196
+ as: e.as
197
+ }, e.$attrs), {
198
+ default: F(() => [I(e.$slots, "default")]),
199
+ _: 3
200
+ }, 16, [
201
+ "data-state",
202
+ "data-disabled",
203
+ "as-child",
204
+ "as"
205
+ ])]),
206
+ _: 3
207
+ }, 8, ["present"]));
208
+ }
209
+ }), We = {
210
+ slots: {
211
+ root: "relative flex items-start",
212
+ container: "flex items-center",
213
+ base: "rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-none",
214
+ indicator: "flex items-center justify-center size-full text-inverted",
215
+ icon: "shrink-0",
216
+ wrapper: "w-full",
217
+ label: "block font-medium text-default",
218
+ description: "text-muted"
219
+ },
220
+ variants: {
221
+ color: {
222
+ primary: { indicator: "bg-primary" },
223
+ secondary: { indicator: "bg-secondary" },
224
+ success: { indicator: "bg-success" },
225
+ info: { indicator: "bg-info" },
226
+ warning: { indicator: "bg-warning" },
227
+ error: { indicator: "bg-error" },
228
+ neutral: { indicator: "bg-inverted" }
229
+ },
230
+ variant: {
231
+ list: { root: "" },
232
+ card: { root: ["border border-default rounded-lg hover:not-has-disabled:not-has-focus-visible:not-has-data-[state=checked]:bg-elevated/50", "transition-colors"] }
233
+ },
234
+ indicator: {
235
+ start: {
236
+ root: "flex-row",
237
+ wrapper: "ms-2"
238
+ },
239
+ end: {
240
+ root: "flex-row-reverse",
241
+ wrapper: "me-2"
242
+ },
243
+ hidden: {
244
+ base: "sr-only",
245
+ wrapper: "flex flex-col items-center gap-1 text-center"
246
+ }
247
+ },
248
+ size: {
249
+ xs: {
250
+ base: "size-3",
251
+ icon: "size-2.5",
252
+ container: "h-4",
253
+ wrapper: "text-xs"
254
+ },
255
+ sm: {
256
+ base: "size-3.5",
257
+ icon: "size-3",
258
+ container: "h-4",
259
+ wrapper: "text-xs"
260
+ },
261
+ md: {
262
+ base: "size-4",
263
+ icon: "size-3.5",
264
+ container: "h-5",
265
+ wrapper: "text-sm"
266
+ },
267
+ lg: {
268
+ base: "size-4.5",
269
+ icon: "size-4",
270
+ container: "h-5",
271
+ wrapper: "text-sm"
272
+ },
273
+ xl: {
274
+ base: "size-5",
275
+ icon: "size-4.5",
276
+ container: "h-6",
277
+ wrapper: "text-base"
278
+ }
279
+ },
280
+ required: { true: { label: "after:content-['*'] after:ms-0.5 after:text-error" } },
281
+ disabled: { true: {
282
+ root: "opacity-75",
283
+ base: "cursor-not-allowed",
284
+ label: "cursor-not-allowed",
285
+ description: "cursor-not-allowed"
286
+ } },
287
+ highlight: {
288
+ true: "",
289
+ false: ""
290
+ },
291
+ checked: { true: "" }
292
+ },
293
+ compoundVariants: [
294
+ {
295
+ indicator: "hidden",
296
+ class: { container: "h-auto" }
297
+ },
298
+ {
299
+ variant: "card",
300
+ highlight: !1,
301
+ class: { root: "hover:not-has-disabled:not-has-focus-visible:not-has-data-[state=checked]:border-accented" }
302
+ },
303
+ {
304
+ size: "xs",
305
+ indicator: "hidden",
306
+ class: { icon: "size-3" }
307
+ },
308
+ {
309
+ size: "sm",
310
+ indicator: "hidden",
311
+ class: { icon: "size-3.5" }
312
+ },
313
+ {
314
+ size: "md",
315
+ indicator: "hidden",
316
+ class: { icon: "size-4" }
317
+ },
318
+ {
319
+ size: "lg",
320
+ indicator: "hidden",
321
+ class: { icon: "size-4.5" }
322
+ },
323
+ {
324
+ size: "xl",
325
+ indicator: "hidden",
326
+ class: { icon: "size-5" }
327
+ },
328
+ {
329
+ size: "xs",
330
+ variant: "card",
331
+ class: { root: "p-2.5" }
332
+ },
333
+ {
334
+ size: "sm",
335
+ variant: "card",
336
+ class: { root: "p-3" }
337
+ },
338
+ {
339
+ size: "md",
340
+ variant: "card",
341
+ class: { root: "p-3.5" }
342
+ },
343
+ {
344
+ size: "lg",
345
+ variant: "card",
346
+ class: { root: "p-4" }
347
+ },
348
+ {
349
+ size: "xl",
350
+ variant: "card",
351
+ class: { root: "p-4.5" }
352
+ },
353
+ {
354
+ color: "primary",
355
+ variant: "list",
356
+ indicator: ["start", "end"],
357
+ class: { base: "outline-primary/25 focus-visible:outline-solid focus-visible:outline-3 focus-visible:ring-primary" }
358
+ },
359
+ {
360
+ color: "secondary",
361
+ variant: "list",
362
+ indicator: ["start", "end"],
363
+ class: { base: "outline-secondary/25 focus-visible:outline-solid focus-visible:outline-3 focus-visible:ring-secondary" }
364
+ },
365
+ {
366
+ color: "success",
367
+ variant: "list",
368
+ indicator: ["start", "end"],
369
+ class: { base: "outline-success/25 focus-visible:outline-solid focus-visible:outline-3 focus-visible:ring-success" }
370
+ },
371
+ {
372
+ color: "info",
373
+ variant: "list",
374
+ indicator: ["start", "end"],
375
+ class: { base: "outline-info/25 focus-visible:outline-solid focus-visible:outline-3 focus-visible:ring-info" }
376
+ },
377
+ {
378
+ color: "warning",
379
+ variant: "list",
380
+ indicator: ["start", "end"],
381
+ class: { base: "outline-warning/25 focus-visible:outline-solid focus-visible:outline-3 focus-visible:ring-warning" }
382
+ },
383
+ {
384
+ color: "error",
385
+ variant: "list",
386
+ indicator: ["start", "end"],
387
+ class: { base: "outline-error/25 focus-visible:outline-solid focus-visible:outline-3 focus-visible:ring-error" }
388
+ },
389
+ {
390
+ color: "neutral",
391
+ variant: "list",
392
+ indicator: ["start", "end"],
393
+ class: { base: "outline-inverted/25 focus-visible:outline-solid focus-visible:outline-3 focus-visible:ring-inverted" }
394
+ },
395
+ {
396
+ color: "primary",
397
+ variant: "card",
398
+ class: { root: "outline-primary/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-primary has-focus-visible:z-[1]" }
399
+ },
400
+ {
401
+ color: "secondary",
402
+ variant: "card",
403
+ class: { root: "outline-secondary/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-secondary has-focus-visible:z-[1]" }
404
+ },
405
+ {
406
+ color: "success",
407
+ variant: "card",
408
+ class: { root: "outline-success/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-success has-focus-visible:z-[1]" }
409
+ },
410
+ {
411
+ color: "info",
412
+ variant: "card",
413
+ class: { root: "outline-info/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-info has-focus-visible:z-[1]" }
414
+ },
415
+ {
416
+ color: "warning",
417
+ variant: "card",
418
+ class: { root: "outline-warning/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-warning has-focus-visible:z-[1]" }
419
+ },
420
+ {
421
+ color: "error",
422
+ variant: "card",
423
+ class: { root: "outline-error/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-error has-focus-visible:z-[1]" }
424
+ },
425
+ {
426
+ color: "neutral",
427
+ variant: "card",
428
+ class: { root: "outline-inverted/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-inverted has-focus-visible:z-[1]" }
429
+ },
430
+ {
431
+ color: "primary",
432
+ variant: "list",
433
+ indicator: "hidden",
434
+ class: { root: "outline-primary/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-primary has-focus-visible:z-[1]" }
435
+ },
436
+ {
437
+ color: "secondary",
438
+ variant: "list",
439
+ indicator: "hidden",
440
+ class: { root: "outline-secondary/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-secondary has-focus-visible:z-[1]" }
441
+ },
442
+ {
443
+ color: "success",
444
+ variant: "list",
445
+ indicator: "hidden",
446
+ class: { root: "outline-success/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-success has-focus-visible:z-[1]" }
447
+ },
448
+ {
449
+ color: "info",
450
+ variant: "list",
451
+ indicator: "hidden",
452
+ class: { root: "outline-info/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-info has-focus-visible:z-[1]" }
453
+ },
454
+ {
455
+ color: "warning",
456
+ variant: "list",
457
+ indicator: "hidden",
458
+ class: { root: "outline-warning/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-warning has-focus-visible:z-[1]" }
459
+ },
460
+ {
461
+ color: "error",
462
+ variant: "list",
463
+ indicator: "hidden",
464
+ class: { root: "outline-error/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-error has-focus-visible:z-[1]" }
465
+ },
466
+ {
467
+ color: "neutral",
468
+ variant: "list",
469
+ indicator: "hidden",
470
+ class: { root: "outline-inverted/25 has-focus-visible:outline-3 not-has-disabled:has-focus-visible:border-inverted has-focus-visible:z-[1]" }
471
+ },
472
+ {
473
+ color: "primary",
474
+ variant: "card",
475
+ class: { root: "has-data-[state=checked]:border-primary/50 has-data-[state=checked]:bg-primary/10" }
476
+ },
477
+ {
478
+ color: "secondary",
479
+ variant: "card",
480
+ class: { root: "has-data-[state=checked]:border-secondary/50 has-data-[state=checked]:bg-secondary/10" }
481
+ },
482
+ {
483
+ color: "success",
484
+ variant: "card",
485
+ class: { root: "has-data-[state=checked]:border-success/50 has-data-[state=checked]:bg-success/10" }
486
+ },
487
+ {
488
+ color: "info",
489
+ variant: "card",
490
+ class: { root: "has-data-[state=checked]:border-info/50 has-data-[state=checked]:bg-info/10" }
491
+ },
492
+ {
493
+ color: "warning",
494
+ variant: "card",
495
+ class: { root: "has-data-[state=checked]:border-warning/50 has-data-[state=checked]:bg-warning/10" }
496
+ },
497
+ {
498
+ color: "error",
499
+ variant: "card",
500
+ class: { root: "has-data-[state=checked]:border-error/50 has-data-[state=checked]:bg-error/10" }
501
+ },
502
+ {
503
+ color: "neutral",
504
+ variant: "card",
505
+ class: { root: "has-data-[state=checked]:border-inverted/50 has-data-[state=checked]:bg-elevated" }
506
+ },
507
+ {
508
+ variant: "card",
509
+ disabled: !0,
510
+ class: { root: "cursor-not-allowed" }
511
+ },
512
+ {
513
+ color: "primary",
514
+ indicator: "hidden",
515
+ highlight: !0,
516
+ class: { root: "not-has-disabled:border-primary not-has-disabled:has-data-[state=checked]:border-primary" }
517
+ },
518
+ {
519
+ color: "secondary",
520
+ indicator: "hidden",
521
+ highlight: !0,
522
+ class: { root: "not-has-disabled:border-secondary not-has-disabled:has-data-[state=checked]:border-secondary" }
523
+ },
524
+ {
525
+ color: "success",
526
+ indicator: "hidden",
527
+ highlight: !0,
528
+ class: { root: "not-has-disabled:border-success not-has-disabled:has-data-[state=checked]:border-success" }
529
+ },
530
+ {
531
+ color: "info",
532
+ indicator: "hidden",
533
+ highlight: !0,
534
+ class: { root: "not-has-disabled:border-info not-has-disabled:has-data-[state=checked]:border-info" }
535
+ },
536
+ {
537
+ color: "warning",
538
+ indicator: "hidden",
539
+ highlight: !0,
540
+ class: { root: "not-has-disabled:border-warning not-has-disabled:has-data-[state=checked]:border-warning" }
541
+ },
542
+ {
543
+ color: "error",
544
+ indicator: "hidden",
545
+ highlight: !0,
546
+ class: { root: "not-has-disabled:border-error not-has-disabled:has-data-[state=checked]:border-error" }
547
+ },
548
+ {
549
+ color: "neutral",
550
+ indicator: "hidden",
551
+ highlight: !0,
552
+ class: { root: "not-has-disabled:border-inverted not-has-disabled:has-data-[state=checked]:border-inverted" }
553
+ },
554
+ {
555
+ color: "primary",
556
+ highlight: !0,
557
+ class: { base: "ring-primary" }
558
+ },
559
+ {
560
+ color: "secondary",
561
+ highlight: !0,
562
+ class: { base: "ring-secondary" }
563
+ },
564
+ {
565
+ color: "success",
566
+ highlight: !0,
567
+ class: { base: "ring-success" }
568
+ },
569
+ {
570
+ color: "info",
571
+ highlight: !0,
572
+ class: { base: "ring-info" }
573
+ },
574
+ {
575
+ color: "warning",
576
+ highlight: !0,
577
+ class: { base: "ring-warning" }
578
+ },
579
+ {
580
+ color: "error",
581
+ highlight: !0,
582
+ class: { base: "ring-error" }
583
+ },
584
+ {
585
+ color: "neutral",
586
+ highlight: !0,
587
+ class: { base: "ring-inverted" }
588
+ }
589
+ ],
590
+ defaultVariants: {
591
+ highlight: !1,
592
+ size: "md",
593
+ color: "primary",
594
+ variant: "list",
595
+ indicator: "start"
596
+ }
597
+ }, Ge = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
598
+ __name: "Checkbox",
599
+ props: {
600
+ as: {
601
+ type: null,
602
+ required: !1
603
+ },
604
+ label: {
605
+ type: String,
606
+ required: !1
607
+ },
608
+ description: {
609
+ type: String,
610
+ required: !1
611
+ },
612
+ color: {
613
+ type: null,
614
+ required: !1
615
+ },
616
+ variant: {
617
+ type: null,
618
+ required: !1
619
+ },
620
+ size: {
621
+ type: null,
622
+ required: !1
623
+ },
624
+ indicator: {
625
+ type: null,
626
+ required: !1
627
+ },
628
+ highlight: {
629
+ type: Boolean,
630
+ required: !1
631
+ },
632
+ icon: {
633
+ type: null,
634
+ required: !1
635
+ },
636
+ indeterminateIcon: {
637
+ type: null,
638
+ required: !1
639
+ },
640
+ class: {
641
+ type: null,
642
+ required: !1
643
+ },
644
+ ui: {
645
+ type: Object,
646
+ required: !1
647
+ },
648
+ disabled: {
649
+ type: Boolean,
650
+ required: !1
651
+ },
652
+ required: {
653
+ type: Boolean,
654
+ required: !1
655
+ },
656
+ name: {
657
+ type: String,
658
+ required: !1
659
+ },
660
+ value: {
661
+ type: null,
662
+ required: !1
663
+ },
664
+ id: {
665
+ type: String,
666
+ required: !1
667
+ },
668
+ defaultValue: {
669
+ type: null,
670
+ required: !1
671
+ },
672
+ modelValue: {
673
+ type: null,
674
+ required: !1
675
+ },
676
+ trueValue: {
677
+ type: null,
678
+ required: !1
679
+ },
680
+ falseValue: {
681
+ type: null,
682
+ required: !1
683
+ }
684
+ },
685
+ emits: ["change", "update:modelValue"],
686
+ setup(t, { emit: n, attrs: i }) {
687
+ let a = t, s = se(), c = n, l = u("checkbox", a), p = e(), h = d(o(l, "required", "value", "defaultValue", "modelValue", "trueValue", "falseValue"), c), { id: g, emitFormChange: v, emitFormInput: y, size: b, color: x, highlight: S, name: C, disabled: ee, ariaAttrs: te } = m(a), ne = g.value ?? ce(), re = A(() => x.value ?? l.color), w = A(() => S.value ?? l.highlight), k = A(() => b.value ?? l.size), j = A(() => ee.value ?? l.disabled), P = A(() => l.indicator === "hidden" ? l.icon : void 0), ie = oe(), ae = A(() => {
688
+ let { "data-state": e, ...t } = ie;
689
+ return t;
690
+ }), B = A(() => _({
691
+ extend: We,
692
+ ...p.ui?.checkbox || {}
693
+ })({
694
+ size: k.value,
695
+ color: re.value,
696
+ variant: l.variant,
697
+ indicator: l.indicator,
698
+ highlight: w.value,
699
+ required: l.required,
700
+ disabled: j.value
701
+ }));
702
+ function H(e) {
703
+ let t = new Event("change", { target: { value: e } });
704
+ c("change", t), v(), y();
705
+ }
706
+ return (e, t) => (z(), E(O(r), {
707
+ as: !O(l).variant || O(l).variant === "list" ? O(l).as : O(Z),
708
+ "data-slot": i["data-slot"] ?? "root",
709
+ class: U(B.value.root({ class: [O(l).ui?.root, O(l).class] }))
710
+ }, {
711
+ default: F(() => [V("div", {
712
+ "data-slot": "container",
713
+ class: U(B.value.container({ class: O(l).ui?.container }))
714
+ }, [L(O(He), T({ id: O(ne) }, {
715
+ ...O(h),
716
+ ...ae.value,
717
+ ...O(te)
718
+ }, {
719
+ name: O(C),
720
+ disabled: j.value,
721
+ "data-slot": "base",
722
+ class: B.value.base({ class: O(l).ui?.base }),
723
+ "onUpdate:modelValue": H
724
+ }), {
725
+ default: F(({ state: e }) => [O(l).indicator === "hidden" ? M("", !0) : (z(), E(O(Ue), {
726
+ key: 0,
727
+ "data-slot": "indicator",
728
+ class: U(B.value.indicator({ class: O(l).ui?.indicator }))
729
+ }, {
730
+ default: F(() => [e === "indeterminate" ? (z(), E(f, {
731
+ key: 0,
732
+ name: O(l).indeterminateIcon || O(p).ui.icons.minus,
733
+ "data-slot": "icon",
734
+ class: U(B.value.icon({ class: O(l).ui?.icon }))
735
+ }, null, 8, ["name", "class"])) : (z(), E(f, {
736
+ key: 1,
737
+ name: O(l).icon || O(p).ui.icons.check,
738
+ "data-slot": "icon",
739
+ class: U(B.value.icon({ class: O(l).ui?.icon }))
740
+ }, null, 8, ["name", "class"]))]),
741
+ _: 2
742
+ }, 1032, ["class"]))]),
743
+ _: 1
744
+ }, 16, [
745
+ "id",
746
+ "name",
747
+ "disabled",
748
+ "class"
749
+ ])], 2), P.value || O(l).label || s.label || O(l).description || s.description ? (z(), N("div", {
750
+ key: 0,
751
+ "data-slot": "wrapper",
752
+ class: U(B.value.wrapper({ class: O(l).ui?.wrapper }))
753
+ }, [
754
+ P.value ? (z(), E(f, {
755
+ key: 0,
756
+ name: P.value,
757
+ "data-slot": "icon",
758
+ class: U(B.value.icon({ class: O(l).ui?.icon }))
759
+ }, null, 8, ["name", "class"])) : M("", !0),
760
+ O(l).label || s.label ? (z(), E(le(!O(l).variant || O(l).variant === "list" ? O(Z) : "p"), {
761
+ key: 1,
762
+ for: O(ne),
763
+ "data-slot": "label",
764
+ class: U(B.value.label({ class: O(l).ui?.label }))
765
+ }, {
766
+ default: F(() => [I(e.$slots, "label", { label: O(l).label }, () => [D(R(O(l).label), 1)])]),
767
+ _: 3
768
+ }, 8, ["for", "class"])) : M("", !0),
769
+ O(l).description || s.description ? (z(), N("p", {
770
+ key: 2,
771
+ "data-slot": "description",
772
+ class: U(B.value.description({ class: O(l).ui?.description }))
773
+ }, [I(e.$slots, "description", { description: O(l).description }, () => [D(R(O(l).description), 1)])], 2)) : M("", !0)
774
+ ], 2)) : M("", !0)]),
775
+ _: 3
776
+ }, 8, [
777
+ "as",
778
+ "data-slot",
779
+ "class"
780
+ ]));
781
+ }
782
+ });
783
+ //#endregion
784
+ //#region src/documents/inventory/contentLocations.ts
785
+ function Ke(e, t, n = Se) {
786
+ let r = new Map(e.map((e) => [e.id, e])), i = new Map(t.map((e) => [e.collection, e.label]));
787
+ return new Map(e.map((e) => {
788
+ let t = [], a = /* @__PURE__ */ new Set([e.id]), o = e.parentDocumentId;
789
+ for (; o;) {
790
+ let e = r.get(o);
791
+ if (!e || a.has(o)) {
792
+ t.unshift(n("documents.inventory.locationUnavailable"));
793
+ break;
794
+ }
795
+ a.add(o), e.parentDocumentId && t.unshift(e.title), o = e.parentDocumentId;
796
+ }
797
+ return [e.id, [
798
+ i.get(e.collection) ?? e.collection,
799
+ ...t,
800
+ ...e.parentDocumentId ? [] : [n("documents.inventory.homePage")]
801
+ ]];
802
+ }));
803
+ }
804
+ //#endregion
805
+ //#region src/documents/search/SearchMatches.vue?vue&type=script&setup=true&lang.ts
806
+ var qe = {
807
+ key: 0,
808
+ class: "space-y-2 pt-2"
809
+ }, Je = { class: "flex w-fit cursor-pointer list-none items-center gap-1.5 rounded-sm text-xs text-muted active:text-highlighted focus-visible:outline-2 focus-visible:outline-primary pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&::-webkit-details-marker]:hidden [@media(hover:hover)_and_(pointer:fine)]:hover:text-highlighted" }, Ye = { class: "mt-3 space-y-3 border-s border-default ps-3" }, Xe = ["onClick"], Ze = "block w-full min-w-0 rounded-sm text-start active:bg-accented focus-visible:outline-2 focus-visible:outline-primary pointer-coarse:min-h-11 [@media(hover:hover)_and_(pointer:fine)]:hover:bg-elevated/50", Qe = /* @__PURE__ */ j({
810
+ __name: "SearchMatches",
811
+ props: { hit: {} },
812
+ emits: ["select"],
813
+ setup(e, { emit: t }) {
814
+ let { t: n } = x(), r = e, i = A(() => he(r.hit)), a = A(() => JSON.stringify(r.hit.matches));
815
+ return (e, r) => {
816
+ let o = f;
817
+ return i.value.excerpt || i.value.additionalMatches.length ? (z(), N("div", qe, [i.value.excerpt ? (z(), N("button", {
818
+ key: 0,
819
+ type: "button",
820
+ class: U(Ze),
821
+ onClick: r[0] ||= (e) => t("select", i.value.excerpt)
822
+ }, [L(me, { match: i.value.excerpt }, null, 8, ["match"])])) : M("", !0), i.value.additionalMatches.length ? (z(), N("details", {
823
+ key: a.value,
824
+ class: "group/matches"
825
+ }, [V("summary", Je, [D(R(i.value.excerpt ? O(n)("documents.search.moreMatches") : O(n)("documents.search.showMatches")) + " ", 1), L(o, {
826
+ name: "i-lucide-chevron-down",
827
+ class: "size-3 group-open/matches:rotate-180"
828
+ })]), V("div", Ye, [(z(!0), N(H, null, P(i.value.additionalMatches, (e, n) => (z(), N("button", {
829
+ key: n,
830
+ type: "button",
831
+ class: U(Ze),
832
+ onClick: (n) => t("select", e)
833
+ }, [L(me, { match: e }, null, 8, ["match"])], 8, Xe))), 128))])])) : M("", !0)])) : M("", !0);
834
+ };
835
+ }
836
+ }), $e = { class: "@container/inventory min-w-0" }, et = { class: "overflow-clip rounded-lg border border-default" }, tt = {
837
+ key: 0,
838
+ class: "flex min-w-0 items-start gap-3"
839
+ }, nt = { class: "min-w-0 space-y-1" }, rt = { class: "line-clamp-2 wrap-anywhere font-medium text-highlighted" }, it = { class: "wrap-anywhere text-xs text-muted" }, at = {
840
+ key: 0,
841
+ class: "text-xs text-muted"
842
+ }, ot = {
843
+ key: 1,
844
+ class: "flex min-w-0 items-start gap-3"
845
+ }, st = { class: "min-w-0 flex-1 space-y-1" }, ct = ["onClick"], lt = { class: "flex min-w-0 items-center gap-2 text-xs text-muted" }, ut = ["title"], dt = { class: "truncate [direction:rtl] text-left" }, ft = { dir: "ltr" }, pt = ["href", "aria-label"], mt = { class: "truncate" }, ht = { class: "max-w-72 space-y-2 p-4" }, gt = { class: "text-sm font-medium text-highlighted" }, _t = {
846
+ key: 0,
847
+ class: "text-xs text-muted"
848
+ }, vt = {
849
+ key: 1,
850
+ class: "text-xs text-muted"
851
+ }, yt = {
852
+ key: 0,
853
+ class: "space-y-1 text-sm"
854
+ }, bt = { class: "text-xs text-muted @min-[40rem]/inventory:hidden" }, xt = {
855
+ key: 1,
856
+ class: "space-y-1 text-sm wrap-anywhere"
857
+ }, St = { class: "text-default" }, Ct = { class: "sr-only" }, wt = {
858
+ key: 0,
859
+ class: "text-xs text-muted",
860
+ dir: "auto"
861
+ }, Tt = /* @__PURE__ */ j({
862
+ __name: "ContentInventoryLayout",
863
+ props: {
864
+ items: {},
865
+ locations: {},
866
+ selected: {},
867
+ readonly: { type: Boolean },
868
+ now: {},
869
+ trash: { type: Boolean },
870
+ busy: { type: Boolean },
871
+ title: {},
872
+ summary: {}
873
+ },
874
+ emits: [
875
+ "select",
876
+ "match",
877
+ "toggle"
878
+ ],
879
+ setup(e, { emit: t }) {
880
+ let n = t, { t: r, date: i, relativeTime: a } = x(), o = te(), s = e, c = t, l = ee(), u = A(() => Object.fromEntries(s.selected.map((e) => [e, !0]))), d = A(() => s.items.map((e) => ({
881
+ ...e,
882
+ label: e.trash ? e.trash.root.title || o.document.untitled : e.searchHit?.title.trim() || g(e.entry.document),
883
+ search: e.searchHit ? he(e.searchHit) : void 0
884
+ })));
885
+ function p(e, t, ...n) {
886
+ return {
887
+ id: e,
888
+ header: t,
889
+ meta: { class: { td: n.join(" ") } }
890
+ };
891
+ }
892
+ let m = A(() => [
893
+ p("title", r("documents.inventory.document"), "[grid-area:document] pt-4 pb-3 @min-[40rem]/inventory:py-4"),
894
+ ...s.trash ? [] : [p("status", r("documents.inventory.status"), "[grid-area:status] @min-[40rem]/inventory:ps-4 @min-[40rem]/inventory:pt-4", s.readonly ? "ps-5" : "ps-12")],
895
+ p("edited", s.trash ? r("documents.inventory.movedToTrash") : r("documents.inventory.edited"), "[grid-area:edited] @min-[40rem]/inventory:px-4 @min-[40rem]/inventory:pt-4 @min-[40rem]/inventory:text-start", s.trash ? `text-start ${s.readonly ? "ps-5" : "ps-12"} @min-[40rem]/inventory:ps-4` : "text-end")
896
+ ]);
897
+ function g(e) {
898
+ return e.title.trim() || o.document.untitled;
899
+ }
900
+ function _(e, t) {
901
+ t ? c("match", {
902
+ documentId: e,
903
+ match: t
904
+ }) : c("select", e);
905
+ }
906
+ function v(e) {
907
+ return e.editedBy === l.user.id ? l.user.name : "";
908
+ }
909
+ function y(e) {
910
+ return {
911
+ published: o.publication.published,
912
+ changes: o.publication.unpublishedChanges,
913
+ draft: o.publication.draft
914
+ }[e.status];
915
+ }
916
+ function b(e) {
917
+ return e.path || r("documents.inventory.noAddressYet");
918
+ }
919
+ function S(e) {
920
+ return !!e.publishedPath && e.publishedPath === e.path;
921
+ }
922
+ return (t, s) => {
923
+ let c = Ge, l = be, p = f, g = h, x = ke;
924
+ return z(), E(Ae, {
925
+ title: e.title ?? O(o).navigation.allContent,
926
+ summary: e.summary
927
+ }, {
928
+ actions: F(() => [I(t.$slots, "actions")]),
929
+ default: F(() => [
930
+ I(t.$slots, "tools"),
931
+ V("div", $e, [V("div", et, [I(t.$slots, "table-tools"), L(je, {
932
+ data: d.value,
933
+ columns: m.value,
934
+ "get-row-id": (e) => e.trash ? e.trash.root.documentId : e.entry.document.id,
935
+ "row-selection": u.value,
936
+ ui: {
937
+ thead: "hidden @min-[40rem]/inventory:block",
938
+ tr: ["grid grid-cols-2 data-[selected=true]:bg-muted/50", e.trash ? "[grid-template-areas:'document_document'_'edited_edited'] @min-[40rem]/inventory:grid-cols-[minmax(0,1fr)_10rem] @min-[40rem]/inventory:[grid-template-areas:'document_edited']" : "[grid-template-areas:'document_document'_'status_edited'] @min-[40rem]/inventory:grid-cols-[minmax(0,1fr)_12.5rem_14rem] @min-[40rem]/inventory:[grid-template-areas:'document_status_edited']"],
939
+ td: "min-w-0 px-5 pt-0 pb-4 whitespace-normal align-top"
940
+ }
941
+ }, {
942
+ "title-cell": F(({ row: t }) => [t.original.trash ? (z(), N("div", tt, [e.readonly ? M("", !0) : (z(), E(c, {
943
+ key: 0,
944
+ disabled: e.busy,
945
+ "model-value": e.selected.includes(t.original.trash.root.documentId),
946
+ "aria-label": O(r)("documents.inventory.selectUntitled", { untitled: t.original.trash.root.title || O(o).document.untitled }),
947
+ "onUpdate:modelValue": (e) => n("toggle", t.original.trash.root.documentId)
948
+ }, null, 8, [
949
+ "disabled",
950
+ "model-value",
951
+ "aria-label",
952
+ "onUpdate:modelValue"
953
+ ])), V("div", nt, [
954
+ V("p", rt, R(t.original.label), 1),
955
+ V("p", it, R(t.original.trash.root.path || O(r)("documents.inventory.formerPathUnavailable")), 1),
956
+ t.original.trash.count > 1 ? (z(), N("p", at, R(O(r)("documents.inventory.includedRestoredTogether", { count: t.original.trash.count - 1 })), 1)) : M("", !0)
957
+ ])])) : (z(), N("div", ot, [e.readonly ? M("", !0) : (z(), E(c, {
958
+ key: 0,
959
+ "model-value": e.selected.includes(t.original.entry.document.id),
960
+ "aria-label": O(r)("documents.inventory.selectLabel", { label: t.original.label }),
961
+ "onUpdate:modelValue": (e) => n("toggle", t.original.entry.document.id)
962
+ }, null, 8, [
963
+ "model-value",
964
+ "aria-label",
965
+ "onUpdate:modelValue"
966
+ ])), V("div", st, [
967
+ L(l, { text: t.original.label }, {
968
+ default: F(() => [V("button", {
969
+ type: "button",
970
+ onClick: (e) => _(t.original.entry.document.id, t.original.search?.titleMatch),
971
+ class: "line-clamp-2 whitespace-normal wrap-anywhere text-start font-medium text-highlighted pointer-coarse:min-h-11 pointer-coarse:min-w-11 [@media(hover:hover)_and_(pointer:fine)]:hover:underline active:text-muted focus-visible:rounded focus-visible:outline-2 focus-visible:outline-primary"
972
+ }, [t.original.search?.titleMatch ? (z(), E(J, {
973
+ key: 0,
974
+ match: t.original.search.titleMatch
975
+ }, null, 8, ["match"])) : (z(), N(H, { key: 1 }, [D(R(t.original.label), 1)], 64))], 8, ct)]),
976
+ _: 2
977
+ }, 1032, ["text"]),
978
+ V("div", lt, [
979
+ V("span", {
980
+ class: "max-w-[35%] shrink-0 truncate",
981
+ title: e.locations.get(t.original.entry.document.id)?.join(" · ")
982
+ }, R(e.locations.get(t.original.entry.document.id)?.[0]), 9, ut),
983
+ s[0] ||= V("span", { "aria-hidden": "true" }, "·", -1),
984
+ L(l, { text: b(t.original.entry.document) }, {
985
+ default: F(() => [(z(), E(le(S(t.original.entry.document) ? "a" : "span"), {
986
+ href: S(t.original.entry.document) ? t.original.entry.document.publishedPath : void 0,
987
+ target: S(t.original.entry.document) ? "_blank" : void 0,
988
+ rel: "noopener",
989
+ tabindex: t.original.entry.document.publishedPath === t.original.entry.document.path ? void 0 : 0,
990
+ "aria-label": S(t.original.entry.document) ? O(r)("documents.inventory.viewLabelAtAddress", {
991
+ label: t.original.label,
992
+ address: b(t.original.entry.document)
993
+ }) : b(t.original.entry.document),
994
+ class: U(["flex min-w-0 items-center gap-1 text-xs text-muted pointer-coarse:min-h-11", S(t.original.entry.document) && "hover:text-highlighted hover:underline"])
995
+ }, {
996
+ default: F(() => [V("span", dt, [V("bdi", ft, R(b(t.original.entry.document)), 1)]), S(t.original.entry.document) ? (z(), E(p, {
997
+ key: 0,
998
+ name: "i-lucide-arrow-up-right",
999
+ class: "size-3 shrink-0"
1000
+ })) : M("", !0)]),
1001
+ _: 2
1002
+ }, 1032, [
1003
+ "href",
1004
+ "target",
1005
+ "tabindex",
1006
+ "aria-label",
1007
+ "class"
1008
+ ]))]),
1009
+ _: 2
1010
+ }, 1032, ["text"])
1011
+ ]),
1012
+ t.original.entry.document.publishedPath && t.original.entry.document.publishedPath !== t.original.entry.document.path ? (z(), N("a", {
1013
+ key: 0,
1014
+ href: t.original.entry.document.publishedPath,
1015
+ target: "_blank",
1016
+ rel: "noopener",
1017
+ "aria-label": O(r)("documents.inventory.viewLiveDocumentAtPublishedpath", { publishedPath: t.original.entry.document.publishedPath }),
1018
+ class: "flex min-w-0 items-center gap-1.5 text-xs text-muted pointer-coarse:min-h-11 hover:text-highlighted hover:underline"
1019
+ }, [
1020
+ V("span", null, R(O(r)("documents.inventory.live")), 1),
1021
+ V("span", mt, R(t.original.entry.document.publishedPath), 1),
1022
+ L(p, {
1023
+ name: "i-lucide-arrow-up-right",
1024
+ class: "size-3 shrink-0"
1025
+ })
1026
+ ], 8, pt)) : M("", !0),
1027
+ t.original.searchHit ? (z(), E(Qe, {
1028
+ key: 1,
1029
+ hit: t.original.searchHit,
1030
+ onSelect: (e) => n("match", {
1031
+ documentId: t.original.entry.document.id,
1032
+ match: e
1033
+ })
1034
+ }, null, 8, ["hit", "onSelect"])) : M("", !0),
1035
+ t.original.errorCount || t.original.warningCount ? (z(), E(x, {
1036
+ key: 2,
1037
+ content: { align: "start" }
1038
+ }, {
1039
+ content: F(() => [V("div", ht, [
1040
+ V("p", gt, R(O(r)("documents.inventory.documentChecks")), 1),
1041
+ t.original.errorCount ? (z(), N("p", _t, R(O(r)("documents.inventory.fixesCount", { count: t.original.errorCount })), 1)) : M("", !0),
1042
+ t.original.warningCount ? (z(), N("p", vt, R(O(r)("documents.inventory.warningsCount", { count: t.original.warningCount })), 1)) : M("", !0),
1043
+ L(g, {
1044
+ variant: "outline",
1045
+ size: "sm",
1046
+ label: O(r)("documents.inventory.openDocument"),
1047
+ onClick: (e) => n("select", t.original.entry.document.id)
1048
+ }, null, 8, ["label", "onClick"])
1049
+ ])]),
1050
+ default: F(() => [L(g, {
1051
+ variant: "link",
1052
+ size: "xs",
1053
+ icon: "i-lucide-circle-alert",
1054
+ label: O(r)("documents.inventory.issuesCount", { count: t.original.errorCount + t.original.warningCount }),
1055
+ "aria-label": O(r)("documents.inventory.checksForLabel", { label: t.original.label }),
1056
+ class: U([t.original.errorCount ? "text-error" : "text-warning", "px-0 py-0"])
1057
+ }, null, 8, [
1058
+ "label",
1059
+ "aria-label",
1060
+ "class"
1061
+ ])]),
1062
+ _: 2
1063
+ }, 1024)) : M("", !0)
1064
+ ])]))]),
1065
+ "status-cell": F(({ row: e }) => [e.original.entry ? (z(), N("span", {
1066
+ key: 0,
1067
+ class: U(["inline-flex items-center gap-2 text-sm", e.original.entry.document.status === "published" ? "text-muted" : "text-default"])
1068
+ }, [V("span", { class: U(["size-1.5 shrink-0 rounded-full", e.original.entry.document.status === "published" ? "bg-success" : e.original.entry.document.status === "draft" ? "bg-muted" : "bg-warning"]) }, null, 2), D(" " + R(y(e.original.entry.document)), 1)], 2)) : M("", !0)]),
1069
+ "edited-cell": F(({ row: t }) => [t.original.trash ? (z(), N("div", yt, [V("p", bt, R(O(r)("documents.inventory.movedToTrash")), 1), V("p", null, R(O(i)(t.original.trash.root.deletedAt)), 1)])) : (z(), N("div", xt, [V("p", St, [V("span", Ct, R(O(r)("documents.inventory.edited")), 1), D(R(O(a)(t.original.entry.editedAt, e.now)), 1)]), v(t.original.entry.document) ? (z(), N("p", wt, R(O(r)("documents.inventory.by", { name: v(t.original.entry.document) })), 1)) : M("", !0)]))]),
1070
+ empty: F(() => [I(t.$slots, "state")]),
1071
+ _: 3
1072
+ }, 8, [
1073
+ "data",
1074
+ "columns",
1075
+ "get-row-id",
1076
+ "row-selection",
1077
+ "ui"
1078
+ ])])]),
1079
+ I(t.$slots, "footer")
1080
+ ]),
1081
+ _: 3
1082
+ }, 8, ["title", "summary"]);
1083
+ };
1084
+ }
1085
+ }), Et = { class: "ml-auto flex flex-wrap items-center gap-2" }, Dt = /* @__PURE__ */ j({
1086
+ __name: "ContentInventoryActions",
1087
+ props: { selected: {} },
1088
+ emits: ["clear"],
1089
+ setup(e, { emit: t }) {
1090
+ let { t: n } = x(), r = te(), i = e, a = ee(), o = A(() => a.items.some((e) => i.selected.includes(e.id) && e.parentDocumentId === null)), s = t, c = W(null), l = W(!1), u = A(() => i.selected.map((e) => ({
1091
+ documentId: e,
1092
+ action: c.value ?? "publish"
1093
+ })));
1094
+ function d(e, t = !1) {
1095
+ l.value = t, c.value = e;
1096
+ }
1097
+ function f() {
1098
+ c.value = null, s("clear");
1099
+ }
1100
+ return k(() => i.selected, () => {
1101
+ c.value = null;
1102
+ }), (e, t) => {
1103
+ let i = h, a = ge;
1104
+ return z(), N(H, null, [
1105
+ L(i, {
1106
+ color: "neutral",
1107
+ variant: "link",
1108
+ size: "sm",
1109
+ label: O(n)("documents.inventory.clearSelection"),
1110
+ onClick: t[0] ||= (e) => s("clear")
1111
+ }, null, 8, ["label"]),
1112
+ V("div", Et, [L(i, {
1113
+ size: "sm",
1114
+ label: O(r).publication.publish,
1115
+ icon: "i-lucide-upload",
1116
+ onClick: t[1] ||= (e) => d("publish")
1117
+ }, null, 8, ["label"]), L(a, { items: [{
1118
+ label: O(n)("documents.inventory.scheduleRelease"),
1119
+ icon: "i-lucide-calendar-clock",
1120
+ onSelect: () => d("publish", !0)
1121
+ }, {
1122
+ label: o.value ? O(n)("documents.inventory.takeOfflineCollectionHomesProtected") : O(r).publication.takeOffline,
1123
+ icon: "i-lucide-cloud-off",
1124
+ disabled: o.value,
1125
+ onSelect: () => d("unpublish")
1126
+ }] }, {
1127
+ default: F(() => [L(i, {
1128
+ color: "neutral",
1129
+ variant: "ghost",
1130
+ size: "sm",
1131
+ label: O(n)("documents.inventory.moreActions"),
1132
+ "trailing-icon": "i-lucide-chevron-down"
1133
+ }, null, 8, ["label"])]),
1134
+ _: 1
1135
+ }, 8, ["items"])]),
1136
+ c.value && u.value.length ? (z(), E(Fe, {
1137
+ key: 0,
1138
+ selection: u.value,
1139
+ "initial-schedule": l.value,
1140
+ onClose: t[2] ||= (e) => c.value = null,
1141
+ onCompleted: f
1142
+ }, null, 8, ["selection", "initial-schedule"])) : M("", !0)
1143
+ ], 64);
1144
+ };
1145
+ }
1146
+ });
1147
+ //#endregion
1148
+ //#region src/documents/inventory/useInventorySummaries.ts
1149
+ function Ot() {
1150
+ let e = De(() => Oe.inventory, {
1151
+ version: 0,
1152
+ summaries: []
1153
+ });
1154
+ return {
1155
+ summaries: A(() => new Map(e.data.value.summaries.map((e) => [e.documentId, e]))),
1156
+ loading: e.loading,
1157
+ error: e.error,
1158
+ refresh: async () => {
1159
+ await e.refresh();
1160
+ }
1161
+ };
1162
+ }
1163
+ //#endregion
1164
+ //#region src/documents/inventory/useTrashInventory.ts
1165
+ function kt() {
1166
+ let { t: e } = x(), t = ee(), n = A(() => t.user.role === "viewer"), r = S().requests, i = xe(), { data: a, loading: o, error: s, refresh: c } = De(() => Oe.trash, []), l = !0;
1167
+ w(() => {
1168
+ l = !1;
1169
+ });
1170
+ let u = W(!1), d = W(""), f = W("recent"), p = W([]), m = W(1), h = A(() => {
1171
+ let e = /* @__PURE__ */ new Map();
1172
+ for (let t of a.value) {
1173
+ let n = e.get(t.trashBatchId) ?? [];
1174
+ n.push(t), e.set(t.trashBatchId, n);
1175
+ }
1176
+ return [...e].map(([e, t]) => ({
1177
+ root: t.find((t) => t.documentId === e) ?? t[0],
1178
+ count: t.length,
1179
+ documents: t
1180
+ })).sort((e, t) => t.root.deletedAt.localeCompare(e.root.deletedAt));
1181
+ }), g = A(() => h.value.filter((e) => e.documents.some((e) => `${e.title} ${e.path}`.toLowerCase().includes(d.value.trim().toLowerCase())))), _ = A(() => f.value === "title" ? g.value.toSorted((e, t) => e.root.title.localeCompare(t.root.title)) : g.value), v = A(() => _.value.slice((m.value - 1) * 50, m.value * 50)), y = A(() => v.value.length > 0 && v.value.every((e) => p.value.includes(e.root.documentId)));
1182
+ k([d, f], () => {
1183
+ m.value = 1;
1184
+ }), k([
1185
+ m,
1186
+ d,
1187
+ f,
1188
+ n
1189
+ ], () => {
1190
+ p.value = [];
1191
+ }), k(h, () => {
1192
+ p.value = p.value.filter((e) => h.value.some((t) => t.root.documentId === e)), m.value = Math.min(m.value, Math.max(1, Math.ceil(g.value.length / 50)));
1193
+ });
1194
+ function b() {
1195
+ d.value = "";
1196
+ }
1197
+ function te(e) {
1198
+ p.value = p.value.includes(e) ? p.value.filter((t) => t !== e) : [...p.value, e];
1199
+ }
1200
+ function ne() {
1201
+ p.value = y.value ? [] : v.value.map((e) => e.root.documentId);
1202
+ }
1203
+ async function re() {
1204
+ if (u.value || n.value) return;
1205
+ let t = h.value.filter((e) => p.value.includes(e.root.documentId));
1206
+ u.value = !0;
1207
+ let a = 0;
1208
+ try {
1209
+ for (let { root: e, count: i } of t) {
1210
+ if (!l || n.value || (await r.documents.restoreTrash({
1211
+ params: { documentId: e.documentId },
1212
+ payload: { expectedRevisionId: e.revisionId }
1213
+ }), !l)) return;
1214
+ a += i, p.value = p.value.filter((t) => t !== e.documentId);
1215
+ }
1216
+ i.add({ title: e("documents.inventory.restoredRestored2AsDrafts", {
1217
+ restored: a,
1218
+ restored2: a === 1 ? "document restored" : "documents restored"
1219
+ }) });
1220
+ } catch (t) {
1221
+ if (!l) return;
1222
+ i.add({
1223
+ title: e("documents.inventory.couldNotRestoreAllSelectedDocuments"),
1224
+ status: "error",
1225
+ description: `${a ? e("documents.inventory.restoredRestored", { restored: a }) : ""}${C(t, e, e("documents.inventory.tryRestoringTheRemainingDocumentsAgain"))}`
1226
+ });
1227
+ } finally {
1228
+ u.value = !1;
1229
+ }
1230
+ }
1231
+ return {
1232
+ loading: o,
1233
+ error: s,
1234
+ refresh: c,
1235
+ restoring: u,
1236
+ restore: re,
1237
+ selected: p,
1238
+ toggleSelection: te,
1239
+ selectPage: ne,
1240
+ clearSelection: () => {
1241
+ p.value = [];
1242
+ },
1243
+ searchInput: d,
1244
+ currentPage: m,
1245
+ pageSize: 50,
1246
+ sort: f,
1247
+ inventory: A(() => ({
1248
+ items: v.value.map((e) => ({ trash: e })),
1249
+ total: g.value.length
1250
+ })),
1251
+ total: A(() => g.value.length),
1252
+ viewTotal: A(() => a.value.length),
1253
+ firstItem: A(() => g.value.length ? (m.value - 1) * 50 + 1 : 0),
1254
+ lastItem: A(() => Math.min(m.value * 50, g.value.length)),
1255
+ hasFilters: A(() => !!d.value.trim()),
1256
+ updateQuery: (e) => {
1257
+ "page" in e && (m.value = Number(e.page ?? 1)), "sort" in e && (f.value = e.sort ?? "recent");
1258
+ },
1259
+ clearFilters: b
1260
+ };
1261
+ }
1262
+ //#endregion
1263
+ //#region src/documents/inventory/inventoryIssues.ts
1264
+ function At(e, t) {
1265
+ return new Map(e.map((e) => {
1266
+ let n = t.get(e.id), r = {
1267
+ errorCount: n?.errorCount ?? 0,
1268
+ warningCount: n?.warningCount ?? 0
1269
+ };
1270
+ return [e.id, r];
1271
+ }));
1272
+ }
1273
+ function jt(e, t) {
1274
+ switch (t) {
1275
+ case "error": return (e?.errorCount ?? 0) > 0;
1276
+ case "warning": return (e?.warningCount ?? 0) > 0;
1277
+ default: return !0;
1278
+ }
1279
+ }
1280
+ //#endregion
1281
+ //#region src/documents/inventory/useContentInventory.ts
1282
+ var Q = 50, Mt = Ee.map((e) => e.value), Nt = ["error", "warning"];
1283
+ function Pt(e) {
1284
+ let { t } = x(), n = te(), r = re(), i = ne(), { summaries: a, loading: o, error: s } = e.summaryState, u = A(() => G(e.collections).find((e) => e.collection === $(r.query.collection))?.collection), d = A(() => u.value ? void 0 : G(e.collections).find((e) => e.collection === $(r.query.filterCollection))?.collection), f = A(() => Mt.find((e) => e === $(r.query.status))), p = A(() => $(r.query.sort) === "title" ? "title" : $(r.query.sort) === "recent" ? "recent" : h.value ? "relevance" : "recent"), m = A(() => Nt.find((e) => e === $(r.query.issue))), h = A(() => Ft(r.query)), g = W(h.value), _ = A(() => {
1285
+ let e = Number($(r.query.page) ?? 1);
1286
+ return Number.isSafeInteger(e) && e > 0 && e < (2 ** 53 - 1) / Q ? e : 1;
1287
+ }), v = W([]);
1288
+ k([
1289
+ u,
1290
+ d,
1291
+ f,
1292
+ m,
1293
+ h,
1294
+ g,
1295
+ _,
1296
+ p
1297
+ ], () => {
1298
+ v.value = [];
1299
+ }), k(() => G(e.items), (e) => {
1300
+ v.value = v.value.filter((t) => e.some((e) => e.id === t));
1301
+ });
1302
+ function y(e) {
1303
+ v.value = v.value.includes(e) ? v.value.filter((t) => t !== e) : [...v.value, e];
1304
+ }
1305
+ function b() {
1306
+ v.value = O.value.items.map((e) => e.entry.document.id);
1307
+ }
1308
+ function S() {
1309
+ v.value = [];
1310
+ }
1311
+ let C = l((e) => {
1312
+ e.trim() !== h.value && I({ search: e.trim().slice(0, 200) || void 0 }, !0);
1313
+ }, 250);
1314
+ c(() => C.cancel()), k([
1315
+ h,
1316
+ u,
1317
+ f
1318
+ ], ([e]) => {
1319
+ C.cancel(), g.value = e;
1320
+ }), k(g, (e) => {
1321
+ e !== h.value && C(e);
1322
+ });
1323
+ let ee = A(() => [{
1324
+ label: t("documents.inventory.allCollections"),
1325
+ value: "all"
1326
+ }, ...G(e.collections).map((e) => ({
1327
+ label: e.label,
1328
+ value: e.collection
1329
+ }))]), w = A(() => At(G(e.items), a.value)), T = A(() => G(e.items).filter((e) => !u.value || e.collection === u.value).filter((e) => !f.value || Te(e.status, f.value))), E = A(() => T.value.length), D = A(() => {
1330
+ let t = new Map(e.searchState.hits.value.map((e, t) => [e.documentId, t]));
1331
+ return [...T.value].filter((e) => !h.value || t.has(e.id)).filter((e) => !d.value || e.collection === d.value).filter((e) => jt(w.value.get(e.id), m.value)).sort((e, r) => p.value === "relevance" ? (t.get(e.id) ?? Infinity) - (t.get(r.id) ?? Infinity) : p.value === "title" ? (e.title.trim() || n.document.untitled).localeCompare(r.title.trim() || n.document.untitled) : r.editedAt.localeCompare(e.editedAt));
1332
+ }), O = A(() => ({
1333
+ items: D.value.slice((_.value - 1) * Q, _.value * Q).map((t) => {
1334
+ let n = w.value.get(t.id);
1335
+ return {
1336
+ entry: {
1337
+ document: t,
1338
+ editedAt: t.editedAt
1339
+ },
1340
+ errorCount: n?.errorCount ?? 0,
1341
+ warningCount: n?.warningCount ?? 0,
1342
+ searchHit: h.value ? e.searchState.hits.value.find((e) => e.documentId === t.id) : void 0
1343
+ };
1344
+ }),
1345
+ total: D.value.length
1346
+ })), j = A(() => O.value.total), M = A(() => j.value ? (_.value - 1) * Q + 1 : 0), N = A(() => Math.min(_.value * Q, j.value)), P = A(() => Math.max(1, Math.ceil(j.value / Q)));
1347
+ k([
1348
+ P,
1349
+ _,
1350
+ o,
1351
+ s,
1352
+ e.searchState.loading,
1353
+ e.searchState.error,
1354
+ m
1355
+ ], ([e, t, n, a, o, s]) => {
1356
+ m.value && (n || a) || o || s || t <= e || i.replace({
1357
+ path: r.path,
1358
+ query: {
1359
+ ...r.query,
1360
+ page: e > 1 ? String(e) : void 0
1361
+ }
1362
+ });
1363
+ }, { immediate: !0 });
1364
+ let F = A(() => !!d.value || !!m.value || !!h.value);
1365
+ function I(e, t = !1) {
1366
+ let n = {
1367
+ path: r.path,
1368
+ query: {
1369
+ ...r.query,
1370
+ ...e,
1371
+ page: e.page ?? void 0
1372
+ }
1373
+ };
1374
+ t ? i.replace(n) : i.push(n);
1375
+ }
1376
+ function ie(e, t) {
1377
+ I({ [e]: t === "all" ? void 0 : t });
1378
+ }
1379
+ function L() {
1380
+ g.value = "", C.cancel(), I({
1381
+ filterCollection: void 0,
1382
+ issue: void 0,
1383
+ search: void 0
1384
+ });
1385
+ }
1386
+ return {
1387
+ pageSize: Q,
1388
+ sort: p,
1389
+ selected: v,
1390
+ toggleSelection: y,
1391
+ selectPage: b,
1392
+ clearSelection: S,
1393
+ collection: u,
1394
+ filterCollection: d,
1395
+ status: f,
1396
+ issue: m,
1397
+ searchInput: g,
1398
+ search: h,
1399
+ currentPage: _,
1400
+ collectionItems: ee,
1401
+ inventory: O,
1402
+ total: j,
1403
+ viewTotal: E,
1404
+ firstItem: M,
1405
+ lastItem: N,
1406
+ totalPages: P,
1407
+ hasFilters: F,
1408
+ updateQuery: I,
1409
+ setFilter: ie,
1410
+ clearFilters: L
1411
+ };
1412
+ }
1413
+ function Ft(e) {
1414
+ return $(e.search)?.trim().slice(0, 200) ?? "";
1415
+ }
1416
+ function $(e) {
1417
+ return b(y)(e) ? e : null;
1418
+ }
1419
+ //#endregion
1420
+ //#region src/documents/inventory/ContentInventory.vue?vue&type=script&setup=true&lang.ts
1421
+ var It = {
1422
+ role: "status",
1423
+ class: "sr-only"
1424
+ }, Lt = { class: "flex min-h-14 flex-wrap items-center gap-x-3 gap-y-2 border-b border-default px-5 py-2.5" }, Rt = ["aria-label"], zt = {
1425
+ key: 0,
1426
+ class: "flex flex-wrap items-center justify-between gap-3"
1427
+ }, Bt = { class: "text-xs tabular-nums text-muted" }, Vt = /* @__PURE__ */ j({
1428
+ __name: "ContentInventory",
1429
+ props: { trash: { type: Boolean } },
1430
+ emits: [
1431
+ "select",
1432
+ "match",
1433
+ "create"
1434
+ ],
1435
+ setup(e, { emit: t }) {
1436
+ let { t: n } = x(), r = te(), i = e, o = ee(), s = i.trash ? void 0 : re(), c = pe(() => s ? Ft(s.query) : "", () => !i.trash), l = A(() => o.configuration.collections), u = A(() => o.user.role === "viewer"), d = i.trash ? kt() : void 0;
1437
+ function f() {
1438
+ let e = Ot();
1439
+ return {
1440
+ ...Pt({
1441
+ items: () => o.items,
1442
+ collections: () => o.configuration.collections,
1443
+ summaryState: e,
1444
+ searchState: c
1445
+ }),
1446
+ ...e
1447
+ };
1448
+ }
1449
+ let p = d ?? f(), m = t, g = A(() => Ke(o.items, o.configuration.collections)), _ = B("searchField");
1450
+ function y() {
1451
+ I.value = "", _.value?.inputRef?.focus();
1452
+ }
1453
+ let b = v({ scheduler: (e) => a(e, 6e4) }), { loading: S, error: C, refresh: ne } = p, { selected: w, toggleSelection: T, selectPage: D, clearSelection: j, searchInput: I, currentPage: oe, viewTotal: se, inventory: U, total: W, firstItem: ce, lastItem: G, pageSize: le, sort: K, hasFilters: q, updateQuery: fe, clearFilters: me } = p, J = "setFilter" in p ? p : void 0, he = A(() => J?.collection.value), _e = A(() => J?.filterCollection.value), Y = A(() => J?.issue.value), ve = A(() => !!i.trash || !!Y.value), X = A(() => c.loading.value || ve.value && S.value), Z = A(() => c.error.value || (ve.value ? C.value : "")), be = A(() => Z.value ? n("documents.inventory.resultsUnavailable") : X.value ? J?.search.value ? n("documents.inventory.searchingDocuments") : n("documents.inventory.loadingDocuments") : i.trash ? n("documents.inventory.matchingGroupCount", { count: W.value }) : n("documents.inventory.documentsShown", {
1454
+ count: W.value,
1455
+ total: se.value
1456
+ })), xe = A(() => J?.status.value), Se = A(() => J?.collectionItems.value ?? []);
1457
+ function Te(e, t) {
1458
+ J?.setFilter(e, t);
1459
+ }
1460
+ let Ee = A(() => i.trash ? r.navigation.trash : l.value.find((e) => e.collection === he.value)?.label ?? we(n).find((e) => e.value === xe.value)?.label ?? r.navigation.allContent), De = A(() => U.value.items.length > 0 && U.value.items.every((e) => w.value.includes("trash" in e ? e.trash.root.documentId : e.entry.document.id)));
1461
+ function Oe() {
1462
+ De.value ? j() : D();
1463
+ }
1464
+ return k(u, j), (t, i) => {
1465
+ let a = h, o = de, s = ue, l = ge, f = Ce, p = Ge, v = Pe, x = Me, S = ye;
1466
+ return z(), E(Tt, {
1467
+ title: Ee.value,
1468
+ summary: O(q) ? be.value : e.trash && X.value ? O(n)("documents.inventory.loadingTrash") : O(n)("documents.inventory.documentCount", { count: O(se) }),
1469
+ items: X.value || Z.value ? [] : O(U).items,
1470
+ locations: g.value,
1471
+ selected: O(w),
1472
+ readonly: u.value,
1473
+ now: O(b).getTime(),
1474
+ trash: e.trash,
1475
+ busy: O(d)?.restoring.value,
1476
+ onSelect: i[5] ||= (e) => m("select", e),
1477
+ onMatch: i[6] ||= (e) => m("match", e),
1478
+ onToggle: O(T)
1479
+ }, ie({
1480
+ tools: F(() => [L(Ne, null, {
1481
+ default: F(() => [
1482
+ L(o, {
1483
+ ref_key: "searchField",
1484
+ ref: _,
1485
+ modelValue: O(I),
1486
+ "onUpdate:modelValue": i[1] ||= (e) => ae(I) ? I.value = e : null,
1487
+ icon: "i-lucide-search",
1488
+ placeholder: O(n)("documents.inventory.searchDocuments"),
1489
+ "aria-label": O(n)("documents.inventory.searchDocuments2"),
1490
+ class: "w-full @min-[40rem]:w-80",
1491
+ ui: { trailing: "pe-1" }
1492
+ }, ie({ _: 2 }, [O(I) ? {
1493
+ name: "trailing",
1494
+ fn: F(() => [L(a, {
1495
+ color: "neutral",
1496
+ variant: "ghost",
1497
+ size: "xs",
1498
+ icon: "i-lucide-x",
1499
+ "aria-label": O(n)("documents.inventory.clearSearch"),
1500
+ onClick: y
1501
+ }, null, 8, ["aria-label"])]),
1502
+ key: "0"
1503
+ } : void 0]), 1032, [
1504
+ "modelValue",
1505
+ "placeholder",
1506
+ "aria-label"
1507
+ ]),
1508
+ !e.trash && !he.value ? (z(), E(s, {
1509
+ key: 0,
1510
+ "model-value": _e.value ?? "all",
1511
+ items: Se.value,
1512
+ icon: "i-lucide-folder",
1513
+ "aria-label": O(n)("documents.inventory.filterByCollection"),
1514
+ class: "min-w-44 flex-1 @min-[40rem]:flex-none @min-[40rem]:w-44",
1515
+ "onUpdate:modelValue": i[2] ||= (e) => Te("filterCollection", String(e))
1516
+ }, null, 8, [
1517
+ "model-value",
1518
+ "items",
1519
+ "aria-label"
1520
+ ])) : M("", !0),
1521
+ e.trash ? M("", !0) : (z(), E(l, {
1522
+ key: 1,
1523
+ items: [
1524
+ {
1525
+ label: O(n)("documents.inventory.allDocuments"),
1526
+ icon: Y.value ? void 0 : "i-lucide-check",
1527
+ onSelect: () => Te("issue", "all")
1528
+ },
1529
+ {
1530
+ label: O(n)("documents.inventory.withErrors"),
1531
+ icon: Y.value === "error" ? "i-lucide-check" : void 0,
1532
+ onSelect: () => Te("issue", "error")
1533
+ },
1534
+ {
1535
+ label: O(n)("documents.inventory.withWarnings"),
1536
+ icon: Y.value === "warning" ? "i-lucide-check" : void 0,
1537
+ onSelect: () => Te("issue", "warning")
1538
+ }
1539
+ ]
1540
+ }, {
1541
+ default: F(() => [L(a, {
1542
+ color: "neutral",
1543
+ variant: Y.value ? "soft" : "ghost",
1544
+ icon: "i-lucide-circle-alert",
1545
+ label: Y.value ? Y.value === "error" ? O(n)("documents.inventory.withErrors") : O(n)("documents.inventory.withWarnings") : O(n)("documents.inventory.checks"),
1546
+ "trailing-icon": "i-lucide-chevron-down",
1547
+ "aria-label": O(n)("documents.inventory.filterDocumentChecks")
1548
+ }, null, 8, [
1549
+ "variant",
1550
+ "label",
1551
+ "aria-label"
1552
+ ])]),
1553
+ _: 1
1554
+ }, 8, ["items"])),
1555
+ O(q) ? (z(), N(H, { key: 2 }, [V("span", It, R(be.value), 1), _e.value || Y.value ? (z(), E(a, {
1556
+ key: 0,
1557
+ label: O(n)("documents.inventory.clearFilters"),
1558
+ color: "neutral",
1559
+ variant: "link",
1560
+ size: "sm",
1561
+ onClick: O(me)
1562
+ }, null, 8, ["label", "onClick"])) : M("", !0)], 64)) : M("", !0)
1563
+ ]),
1564
+ _: 1
1565
+ }), O(C) && !ve.value ? (z(), E(f, {
1566
+ key: 0,
1567
+ role: "alert",
1568
+ title: O(n)("documents.inventory.documentChecksCouldNotBeLoaded"),
1569
+ description: O(C),
1570
+ color: "warning",
1571
+ variant: "subtle",
1572
+ actions: [{
1573
+ label: O(r).actions.retry,
1574
+ onClick: () => O(ne)()
1575
+ }]
1576
+ }, null, 8, [
1577
+ "title",
1578
+ "description",
1579
+ "actions"
1580
+ ])) : M("", !0)]),
1581
+ "table-tools": F(() => [V("div", Lt, [u.value ? M("", !0) : (z(), E(p, {
1582
+ key: 0,
1583
+ "model-value": De.value ? !0 : O(w).length ? "indeterminate" : !1,
1584
+ disabled: O(d)?.restoring.value || X.value || !!Z.value || !O(U).items.length,
1585
+ label: O(w).length ? O(n)("documents.inventory.selectedcountSelected", { selectedCount: O(w).length }) : O(W) > O(le) ? O(n)("documents.inventory.selectThisPage") : O(n)("documents.inventory.selectAll"),
1586
+ "aria-label": O(n)("documents.inventory.selectAllDocumentsOnThisPage"),
1587
+ "onUpdate:modelValue": Oe
1588
+ }, null, 8, [
1589
+ "model-value",
1590
+ "disabled",
1591
+ "label",
1592
+ "aria-label"
1593
+ ])), O(d) && O(w).length ? (z(), N(H, { key: 1 }, [L(a, {
1594
+ color: "neutral",
1595
+ variant: "link",
1596
+ size: "sm",
1597
+ label: O(n)("documents.inventory.clearSelection"),
1598
+ disabled: O(d).restoring.value,
1599
+ onClick: O(j)
1600
+ }, null, 8, [
1601
+ "label",
1602
+ "disabled",
1603
+ "onClick"
1604
+ ]), L(a, {
1605
+ class: "ms-auto",
1606
+ size: "sm",
1607
+ label: O(n)("documents.inventory.restore"),
1608
+ icon: "i-lucide-undo-2",
1609
+ loading: O(d).restoring.value,
1610
+ onClick: O(d).restore
1611
+ }, null, 8, [
1612
+ "label",
1613
+ "loading",
1614
+ "onClick"
1615
+ ])], 64)) : O(w).length ? (z(), E(Dt, {
1616
+ key: 2,
1617
+ selected: O(w),
1618
+ onClear: O(j)
1619
+ }, null, 8, ["selected", "onClear"])) : (z(), E(l, {
1620
+ key: 3,
1621
+ class: "ms-auto",
1622
+ items: [
1623
+ ...O(J)?.search.value ? [{
1624
+ label: O(n)("documents.inventory.bestMatch"),
1625
+ icon: O(K) === "relevance" ? "i-lucide-check" : void 0,
1626
+ onSelect: () => O(fe)({ sort: void 0 })
1627
+ }] : [],
1628
+ {
1629
+ label: e.trash ? O(n)("documents.inventory.recentlyTrashed") : O(n)("documents.inventory.recentlyEdited"),
1630
+ icon: O(K) === "recent" ? "i-lucide-check" : void 0,
1631
+ onSelect: () => O(fe)({ sort: "recent" })
1632
+ },
1633
+ {
1634
+ label: O(n)("documents.inventory.titleAZ"),
1635
+ icon: O(K) === "title" ? "i-lucide-check" : void 0,
1636
+ onSelect: () => O(fe)({ sort: "title" })
1637
+ }
1638
+ ]
1639
+ }, {
1640
+ default: F(() => [L(a, {
1641
+ color: "neutral",
1642
+ variant: "ghost",
1643
+ size: "sm",
1644
+ icon: "i-lucide-arrow-down-wide-narrow",
1645
+ label: O(K) === "relevance" ? O(n)("documents.inventory.bestMatch") : O(K) === "recent" ? e.trash ? O(n)("documents.inventory.recentlyTrashed") : O(n)("documents.inventory.recentlyEdited") : O(n)("documents.inventory.titleAZ"),
1646
+ "trailing-icon": "i-lucide-chevron-down",
1647
+ "aria-label": O(n)("documents.inventory.sortDocuments")
1648
+ }, null, 8, ["label", "aria-label"])]),
1649
+ _: 1
1650
+ }, 8, ["items"]))])]),
1651
+ state: F(() => [Z.value ? (z(), E(f, {
1652
+ key: 0,
1653
+ role: "alert",
1654
+ class: "my-5",
1655
+ title: O(c).error.value ? O(n)("documents.inventory.searchCouldNotBeLoaded") : e.trash ? O(n)("documents.inventory.trashCouldNotBeLoaded") : O(n)("documents.inventory.documentChecksCouldNotBeLoaded"),
1656
+ description: Z.value,
1657
+ color: "error",
1658
+ variant: "subtle",
1659
+ actions: [{
1660
+ label: O(r).actions.retry,
1661
+ onClick: () => O(c).error.value ? O(c).refresh() : O(ne)()
1662
+ }]
1663
+ }, null, 8, [
1664
+ "title",
1665
+ "description",
1666
+ "actions"
1667
+ ])) : X.value ? (z(), N("div", {
1668
+ key: 1,
1669
+ class: "space-y-5 px-5 py-6",
1670
+ "aria-label": O(n)("documents.inventory.loadingContent")
1671
+ }, [(z(), N(H, null, P(5, (e) => L(v, {
1672
+ key: e,
1673
+ class: "h-12 w-full"
1674
+ })), 64))], 8, Rt)) : O(U).items.length ? M("", !0) : (z(), E(x, {
1675
+ key: 2,
1676
+ icon: O(q) ? "i-lucide-search-x" : e.trash ? "i-lucide-trash-2" : "i-lucide-file-pen-line",
1677
+ title: O(q) ? O(n)("documents.inventory.noMatchingDocuments") : e.trash ? O(n)("documents.inventory.trashIsEmpty") : xe.value ? O(n)("documents.inventory.noDocumentsInThisView") : O(n)("documents.inventory.noDocumentsYet"),
1678
+ variant: "naked",
1679
+ class: "py-14",
1680
+ description: O(q) ? O(n)("documents.inventory.tryAnotherSearchOrRemoveAFilter") : e.trash ? O(n)("documents.inventory.documentsMovedToTrashWillAppearHere") : xe.value ? O(n)("documents.inventory.documentsAppearHereWhenTheyMatchThis") : O(n)("documents.inventory.createYourFirstDocumentToGetStarted")
1681
+ }, ie({ _: 2 }, [O(q) || !e.trash && !u.value ? {
1682
+ name: "actions",
1683
+ fn: F(() => [O(q) ? (z(), E(a, {
1684
+ key: 0,
1685
+ color: "neutral",
1686
+ variant: "outline",
1687
+ label: O(n)("documents.inventory.clearFilters"),
1688
+ onClick: O(me)
1689
+ }, null, 8, ["label", "onClick"])) : (z(), E(a, {
1690
+ key: 1,
1691
+ color: "neutral",
1692
+ label: O(r).document.new,
1693
+ onClick: i[3] ||= (e) => m("create")
1694
+ }, null, 8, ["label"]))]),
1695
+ key: "0"
1696
+ } : void 0]), 1032, [
1697
+ "icon",
1698
+ "title",
1699
+ "description"
1700
+ ]))]),
1701
+ footer: F(() => [!X.value && !Z.value && O(W) > O(le) ? (z(), N("div", zt, [V("p", Bt, R(O(n)(e.trash ? "documents.inventory.groupRange" : "documents.inventory.documentRange", {
1702
+ first: O(ce),
1703
+ last: O(G),
1704
+ total: O(W)
1705
+ })), 1), L(S, {
1706
+ disabled: O(d)?.restoring.value,
1707
+ page: O(oe),
1708
+ total: O(W),
1709
+ "items-per-page": O(le),
1710
+ "sibling-count": 0,
1711
+ "show-edges": !1,
1712
+ size: "sm",
1713
+ "onUpdate:page": i[4] ||= (e) => O(fe)({ page: e > 1 ? String(e) : void 0 })
1714
+ }, null, 8, [
1715
+ "disabled",
1716
+ "page",
1717
+ "total",
1718
+ "items-per-page"
1719
+ ])])) : M("", !0)]),
1720
+ _: 2
1721
+ }, [!e.trash && !u.value ? {
1722
+ name: "actions",
1723
+ fn: F(() => [L(a, {
1724
+ label: O(r).document.new,
1725
+ icon: "i-lucide-plus",
1726
+ onClick: i[0] ||= (e) => m("create")
1727
+ }, null, 8, ["label"])]),
1728
+ key: "0"
1729
+ } : void 0]), 1032, [
1730
+ "title",
1731
+ "summary",
1732
+ "items",
1733
+ "locations",
1734
+ "selected",
1735
+ "readonly",
1736
+ "now",
1737
+ "trash",
1738
+ "busy",
1739
+ "onToggle"
1740
+ ]);
1741
+ };
1742
+ }
1743
+ });
1744
+ //#endregion
1745
+ export { Vt as t };