fundus 0.4.0 → 0.6.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 (209) hide show
  1. package/README.md +132 -130
  2. package/build/client/_app/immutable/assets/2.CtqoikFs.css +1 -0
  3. package/build/client/_app/immutable/assets/2.CtqoikFs.css.br +0 -0
  4. package/build/client/_app/immutable/assets/2.CtqoikFs.css.gz +0 -0
  5. package/build/client/_app/immutable/assets/LibraryContextMenu.CVIa_uFP.css +1 -0
  6. package/build/client/_app/immutable/assets/LibraryContextMenu.CVIa_uFP.css.br +0 -0
  7. package/build/client/_app/immutable/assets/LibraryContextMenu.CVIa_uFP.css.gz +0 -0
  8. package/build/client/_app/immutable/chunks/{CeJsL6hj.js → BT3jFrxa.js} +1 -1
  9. package/build/client/_app/immutable/chunks/BT3jFrxa.js.br +1 -0
  10. package/build/client/_app/immutable/chunks/BT3jFrxa.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/CPFeEkfP.js +108 -0
  12. package/build/client/_app/immutable/chunks/CPFeEkfP.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/CPFeEkfP.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/CQrHfI-c.js +1 -0
  15. package/build/client/_app/immutable/chunks/CQrHfI-c.js.br +0 -0
  16. package/build/client/_app/immutable/chunks/CQrHfI-c.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/D0BLX4Qd.js +1 -0
  18. package/build/client/_app/immutable/chunks/D0BLX4Qd.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/D0BLX4Qd.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/D24lHNM9.js +1 -0
  21. package/build/client/_app/immutable/chunks/D24lHNM9.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/D24lHNM9.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/D6VoU_x4.js +1 -0
  24. package/build/client/_app/immutable/chunks/D6VoU_x4.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/D6VoU_x4.js.gz +0 -0
  26. package/build/client/_app/immutable/entry/{app.BQ4TfPHG.js → app.DmVWkUml.js} +2 -2
  27. package/build/client/_app/immutable/entry/app.DmVWkUml.js.br +0 -0
  28. package/build/client/_app/immutable/entry/app.DmVWkUml.js.gz +0 -0
  29. package/build/client/_app/immutable/entry/start.Dsf5wSaR.js +1 -0
  30. package/build/client/_app/immutable/entry/start.Dsf5wSaR.js.br +0 -0
  31. package/build/client/_app/immutable/entry/start.Dsf5wSaR.js.gz +0 -0
  32. package/build/client/_app/immutable/nodes/0.l-jE2v4o.js +2 -0
  33. package/build/client/_app/immutable/nodes/0.l-jE2v4o.js.br +0 -0
  34. package/build/client/_app/immutable/nodes/0.l-jE2v4o.js.gz +0 -0
  35. package/build/client/_app/immutable/nodes/{1.C8DOqctV.js → 1.CRPVOtEh.js} +1 -1
  36. package/build/client/_app/immutable/nodes/1.CRPVOtEh.js.br +3 -0
  37. package/build/client/_app/immutable/nodes/1.CRPVOtEh.js.gz +0 -0
  38. package/build/client/_app/immutable/nodes/2.8Si6qHSH.js +3 -0
  39. package/build/client/_app/immutable/nodes/2.8Si6qHSH.js.br +0 -0
  40. package/build/client/_app/immutable/nodes/2.8Si6qHSH.js.gz +0 -0
  41. package/build/client/_app/immutable/nodes/3.CdI42Umt.js +1 -0
  42. package/build/client/_app/immutable/nodes/3.CdI42Umt.js.br +0 -0
  43. package/build/client/_app/immutable/nodes/3.CdI42Umt.js.gz +0 -0
  44. package/build/client/_app/immutable/nodes/4.mMkL80q1.js +2 -0
  45. package/build/client/_app/immutable/nodes/4.mMkL80q1.js.br +0 -0
  46. package/build/client/_app/immutable/nodes/4.mMkL80q1.js.gz +0 -0
  47. package/build/client/_app/version.json +1 -1
  48. package/build/client/_app/version.json.br +0 -0
  49. package/build/client/_app/version.json.gz +0 -0
  50. package/build/handler.js +7 -7
  51. package/build/index.js +7 -7
  52. package/build/server/chunks/chunks/{context.js-CG2t-ufq.js → context.js-FvYkJDOy.js} +62 -49
  53. package/build/server/chunks/chunks/context.js-FvYkJDOy.js.map +1 -0
  54. package/build/server/chunks/chunks/{contract.js-sHny3b-s.js → contract.js-DGMufT2e.js} +191 -178
  55. package/build/server/chunks/chunks/contract.js-DGMufT2e.js.map +1 -0
  56. package/build/server/chunks/chunks/{core.js-Clg1CHb6.js → core.js-DNIuZ9y-.js} +88 -2
  57. package/build/server/chunks/chunks/core.js-DNIuZ9y-.js.map +1 -0
  58. package/build/server/chunks/chunks/{exports.js-rOfFZumP.js → exports.js-Bepiq5XZ.js} +2 -2
  59. package/build/server/chunks/chunks/{exports.js-rOfFZumP.js.map → exports.js-Bepiq5XZ.js.map} +1 -1
  60. package/build/server/chunks/chunks/{http.js--6sDZFfm.js → http.js-DWYlsbZd.js} +2 -2
  61. package/build/server/chunks/chunks/{http.js--6sDZFfm.js.map → http.js-DWYlsbZd.js.map} +1 -1
  62. package/build/server/chunks/chunks/{internal.js-DnveDsYn.js → internal.js-Cy01GWTk.js} +3 -3
  63. package/build/server/chunks/chunks/{internal.js-DnveDsYn.js.map → internal.js-Cy01GWTk.js.map} +1 -1
  64. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -1
  65. package/build/server/chunks/chunks/manifest-membership.js-CJnQXrL4.js +213 -0
  66. package/build/server/chunks/chunks/manifest-membership.js-CJnQXrL4.js.map +1 -0
  67. package/build/server/chunks/chunks/raw-reconciliation.js-_D9lZ_sc.js +11 -0
  68. package/build/server/chunks/chunks/raw-reconciliation.js-_D9lZ_sc.js.map +1 -0
  69. package/build/server/chunks/chunks/{raw-reconciliation.js-DOFtjkgu.js → raw-reconciliation2.js-C2No1QIL.js} +3 -34
  70. package/build/server/chunks/chunks/raw-reconciliation2.js-C2No1QIL.js.map +1 -0
  71. package/build/server/chunks/chunks/{shared.js-DtvIbMLj.js → shared.js-b0LBJ1Hx.js} +2 -2
  72. package/build/server/chunks/chunks/{shared.js-DtvIbMLj.js.map → shared.js-b0LBJ1Hx.js.map} +1 -1
  73. package/build/server/chunks/chunks/{utils.js-bP1j9RdM.js → utils.js-CecFjHB0.js} +3 -3
  74. package/build/server/chunks/chunks/{utils.js-bP1j9RdM.js.map → utils.js-CecFjHB0.js.map} +1 -1
  75. package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CkSErIdC.js → _server.ts.js-Bmyh2WUa.js} +7 -6
  76. package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CkSErIdC.js.map → _server.ts.js-Bmyh2WUa.js.map} +1 -1
  77. package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-BfdsBPWo.js → _server.ts.js-hoRG5JRv.js} +8 -7
  78. package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-BfdsBPWo.js.map → _server.ts.js-hoRG5JRv.js.map} +1 -1
  79. package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-D0aKDq87.js → _server.ts.js-BdO9kwrn.js} +8 -7
  80. package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-D0aKDq87.js.map → _server.ts.js-BdO9kwrn.js.map} +1 -1
  81. package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-DsX_m2gc.js → _server.ts.js-BojOH5gj.js} +8 -7
  82. package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-DsX_m2gc.js.map → _server.ts.js-BojOH5gj.js.map} +1 -1
  83. package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-nfThjRxs.js → _server.ts.js-DWIptU3K.js} +8 -7
  84. package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-nfThjRxs.js.map → _server.ts.js-DWIptU3K.js.map} +1 -1
  85. package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-CseHmsYB.js → _server.ts.js-CaiOgcPc.js} +8 -7
  86. package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-CseHmsYB.js.map → _server.ts.js-CaiOgcPc.js.map} +1 -1
  87. package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CHiICsyC.js → _server.ts.js-Bug1Y1W9.js} +8 -7
  88. package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CHiICsyC.js.map → _server.ts.js-Bug1Y1W9.js.map} +1 -1
  89. package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-Dgf46K5u.js → _server.ts.js-B9N7cPff.js} +8 -7
  90. package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-Dgf46K5u.js.map → _server.ts.js-B9N7cPff.js.map} +1 -1
  91. package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-DwQJUZFa.js → _server.ts.js-CiWdcZEv.js} +8 -7
  92. package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-DwQJUZFa.js.map → _server.ts.js-CiWdcZEv.js.map} +1 -1
  93. package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BnKS8nVF.js → _server.ts.js-CNqGzdRB.js} +8 -7
  94. package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BnKS8nVF.js.map → _server.ts.js-CNqGzdRB.js.map} +1 -1
  95. package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-BrDbLcyO.js → _server.ts.js-BHwcGKE_.js} +8 -7
  96. package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-BrDbLcyO.js.map → _server.ts.js-BHwcGKE_.js.map} +1 -1
  97. package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-DIUiQuyd.js → _server.ts.js-CPoTCXQk.js} +8 -7
  98. package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-DIUiQuyd.js.map → _server.ts.js-CPoTCXQk.js.map} +1 -1
  99. package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BrReStaf.js → _server.ts.js-iDOU2RdK.js} +8 -7
  100. package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BrReStaf.js.map → _server.ts.js-iDOU2RdK.js.map} +1 -1
  101. package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-B31iGwJ-.js → _server.ts.js-DikbQm3f.js} +8 -7
  102. package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-B31iGwJ-.js.map → _server.ts.js-DikbQm3f.js.map} +1 -1
  103. package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-DeZQFNdj.js → _server.ts.js-DTdHkWuR.js} +8 -7
  104. package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-DeZQFNdj.js.map → _server.ts.js-DTdHkWuR.js.map} +1 -1
  105. package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-DhDhUU7V.js → _server.ts.js-Cn8hwP5P.js} +8 -7
  106. package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-DhDhUU7V.js.map → _server.ts.js-Cn8hwP5P.js.map} +1 -1
  107. package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-DGkPIMcq.js → _server.ts.js-BdUCIBJ_.js} +8 -7
  108. package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-DGkPIMcq.js.map → _server.ts.js-BdUCIBJ_.js.map} +1 -1
  109. package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-BTQgWDH1.js → _server.ts.js-CBLdZJZB.js} +8 -7
  110. package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-BTQgWDH1.js.map → _server.ts.js-CBLdZJZB.js.map} +1 -1
  111. package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DB3i4juR.js → _server.ts.js-DVtQlFHS.js} +7 -6
  112. package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DB3i4juR.js.map → _server.ts.js-DVtQlFHS.js.map} +1 -1
  113. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-kmc-gejQ.js → _server.ts.js-CY_gjOPq.js} +8 -7
  114. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-kmc-gejQ.js.map → _server.ts.js-CY_gjOPq.js.map} +1 -1
  115. package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-B8EE1DD9.js → _server.ts.js-BOfjGM87.js} +8 -7
  116. package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-B8EE1DD9.js.map → _server.ts.js-BOfjGM87.js.map} +1 -1
  117. package/build/server/chunks/entries/{hooks.server.js-DbBA5yYQ.js → hooks.server.js-BH0-wX67.js} +7 -6
  118. package/build/server/chunks/entries/{hooks.server.js-DbBA5yYQ.js.map → hooks.server.js-BH0-wX67.js.map} +1 -1
  119. package/build/server/chunks/{handler-J6aKdov3.js → handler-DMnHzDi5.js} +5 -5
  120. package/build/server/chunks/{handler-J6aKdov3.js.map → handler-DMnHzDi5.js.map} +1 -1
  121. package/build/server/chunks/{index.js-CsvWJ7Qu.js → index.js-BbOitM8j.js} +5 -5
  122. package/build/server/chunks/{index.js-CsvWJ7Qu.js.map → index.js-BbOitM8j.js.map} +1 -1
  123. package/build/server/chunks/{manifest.js-wHtZ9vlA.js → manifest.js-EeQkh4Qe.js} +28 -28
  124. package/build/server/chunks/{manifest.js-wHtZ9vlA.js.map → manifest.js-EeQkh4Qe.js.map} +1 -1
  125. package/build/server/chunks/nodes/0.js-CS9Xzs-1.js +11 -0
  126. package/build/server/chunks/nodes/0.js-CS9Xzs-1.js.map +1 -0
  127. package/build/server/chunks/nodes/1.js-GmjtwLZL.js +7 -0
  128. package/build/server/chunks/nodes/{1.js-CrPfmKpN.js.map → 1.js-GmjtwLZL.js.map} +1 -1
  129. package/build/server/chunks/nodes/2.js-Pip0Abb-.js +7 -0
  130. package/build/server/chunks/nodes/2.js-Pip0Abb-.js.map +1 -0
  131. package/build/server/chunks/nodes/3.js-CJKDeQST.js +7 -0
  132. package/build/server/chunks/nodes/3.js-CJKDeQST.js.map +1 -0
  133. package/build/server/chunks/nodes/4.js-CtmXxVg2.js +7 -0
  134. package/build/server/chunks/nodes/{4.js-tgwl3VD3.js.map → 4.js-CtmXxVg2.js.map} +1 -1
  135. package/dist/core/index.d.ts +2 -2
  136. package/dist/core/index.js +1 -1
  137. package/dist/core/plugins/slice.d.ts +28 -4
  138. package/dist/core/plugins/slice.js +50 -0
  139. package/dist/server/importers/pinned-https.d.ts +0 -2
  140. package/dist/server/importers/pinned-https.js +49 -39
  141. package/dist/server/library-store.d.ts +1 -1
  142. package/dist/server/library-store.js +5 -1
  143. package/dist/server/operations.js +20 -1
  144. package/dist/server/plugins/slice.d.ts +3 -2
  145. package/dist/server/plugins/slice.js +21 -9
  146. package/dist/server/processing/slice-processing.d.ts +14 -0
  147. package/dist/server/processing/slice-processing.js +148 -0
  148. package/package.json +1 -1
  149. package/build/client/_app/immutable/assets/2.B5tQm8hR.css +0 -1
  150. package/build/client/_app/immutable/assets/2.B5tQm8hR.css.br +0 -0
  151. package/build/client/_app/immutable/assets/2.B5tQm8hR.css.gz +0 -0
  152. package/build/client/_app/immutable/assets/LibraryContextMenu.CVb-Lqdf.css +0 -1
  153. package/build/client/_app/immutable/assets/LibraryContextMenu.CVb-Lqdf.css.br +0 -0
  154. package/build/client/_app/immutable/assets/LibraryContextMenu.CVb-Lqdf.css.gz +0 -0
  155. package/build/client/_app/immutable/chunks/BPiGyn-T.js +0 -1
  156. package/build/client/_app/immutable/chunks/BPiGyn-T.js.br +0 -0
  157. package/build/client/_app/immutable/chunks/BPiGyn-T.js.gz +0 -0
  158. package/build/client/_app/immutable/chunks/BoEHtxM8.js +0 -1
  159. package/build/client/_app/immutable/chunks/BoEHtxM8.js.br +0 -0
  160. package/build/client/_app/immutable/chunks/BoEHtxM8.js.gz +0 -0
  161. package/build/client/_app/immutable/chunks/C-T1_s5P.js +0 -1
  162. package/build/client/_app/immutable/chunks/C-T1_s5P.js.br +0 -0
  163. package/build/client/_app/immutable/chunks/C-T1_s5P.js.gz +0 -0
  164. package/build/client/_app/immutable/chunks/CeJsL6hj.js.br +0 -0
  165. package/build/client/_app/immutable/chunks/CeJsL6hj.js.gz +0 -0
  166. package/build/client/_app/immutable/chunks/Cq4Yaq35.js +0 -108
  167. package/build/client/_app/immutable/chunks/Cq4Yaq35.js.br +0 -0
  168. package/build/client/_app/immutable/chunks/Cq4Yaq35.js.gz +0 -0
  169. package/build/client/_app/immutable/chunks/D5sQSsUv.js +0 -1
  170. package/build/client/_app/immutable/chunks/D5sQSsUv.js.br +0 -0
  171. package/build/client/_app/immutable/chunks/D5sQSsUv.js.gz +0 -0
  172. package/build/client/_app/immutable/chunks/TZFh8bT7.js +0 -1
  173. package/build/client/_app/immutable/chunks/TZFh8bT7.js.br +0 -0
  174. package/build/client/_app/immutable/chunks/TZFh8bT7.js.gz +0 -0
  175. package/build/client/_app/immutable/entry/app.BQ4TfPHG.js.br +0 -0
  176. package/build/client/_app/immutable/entry/app.BQ4TfPHG.js.gz +0 -0
  177. package/build/client/_app/immutable/entry/start.COP9tIRH.js +0 -1
  178. package/build/client/_app/immutable/entry/start.COP9tIRH.js.br +0 -0
  179. package/build/client/_app/immutable/entry/start.COP9tIRH.js.gz +0 -0
  180. package/build/client/_app/immutable/nodes/0.CftchwYV.js +0 -2
  181. package/build/client/_app/immutable/nodes/0.CftchwYV.js.br +0 -0
  182. package/build/client/_app/immutable/nodes/0.CftchwYV.js.gz +0 -0
  183. package/build/client/_app/immutable/nodes/1.C8DOqctV.js.br +0 -1
  184. package/build/client/_app/immutable/nodes/1.C8DOqctV.js.gz +0 -0
  185. package/build/client/_app/immutable/nodes/2.BR8OVsS9.js +0 -3
  186. package/build/client/_app/immutable/nodes/2.BR8OVsS9.js.br +0 -0
  187. package/build/client/_app/immutable/nodes/2.BR8OVsS9.js.gz +0 -0
  188. package/build/client/_app/immutable/nodes/3.BO5hcxIH.js +0 -1
  189. package/build/client/_app/immutable/nodes/3.BO5hcxIH.js.br +0 -0
  190. package/build/client/_app/immutable/nodes/3.BO5hcxIH.js.gz +0 -0
  191. package/build/client/_app/immutable/nodes/4.DTaH-k-c.js +0 -2
  192. package/build/client/_app/immutable/nodes/4.DTaH-k-c.js.br +0 -0
  193. package/build/client/_app/immutable/nodes/4.DTaH-k-c.js.gz +0 -0
  194. package/build/server/chunks/chunks/asset-id.js-CFsW8jeL.js +0 -48
  195. package/build/server/chunks/chunks/asset-id.js-CFsW8jeL.js.map +0 -1
  196. package/build/server/chunks/chunks/context.js-CG2t-ufq.js.map +0 -1
  197. package/build/server/chunks/chunks/contract.js-sHny3b-s.js.map +0 -1
  198. package/build/server/chunks/chunks/core.js-Clg1CHb6.js.map +0 -1
  199. package/build/server/chunks/chunks/raw-reconciliation.js-DOFtjkgu.js.map +0 -1
  200. package/build/server/chunks/chunks/raw-reconciliation2.js-DFwky2ou.js +0 -11
  201. package/build/server/chunks/chunks/raw-reconciliation2.js-DFwky2ou.js.map +0 -1
  202. package/build/server/chunks/nodes/0.js-By6-kbk6.js +0 -11
  203. package/build/server/chunks/nodes/0.js-By6-kbk6.js.map +0 -1
  204. package/build/server/chunks/nodes/1.js-CrPfmKpN.js +0 -7
  205. package/build/server/chunks/nodes/2.js-C-i3Y5t2.js +0 -7
  206. package/build/server/chunks/nodes/2.js-C-i3Y5t2.js.map +0 -1
  207. package/build/server/chunks/nodes/3.js-C1gcIGeV.js +0 -7
  208. package/build/server/chunks/nodes/3.js-C1gcIGeV.js.map +0 -1
  209. package/build/server/chunks/nodes/4.js-tgwl3VD3.js +0 -7
@@ -1,15 +1,16 @@
1
- import { a as plugins, b as audioPlugin, c as chromaKeyVideoPlugin, v as videoPlugin, s as slicePlugin, d as imagePlugin, n as normalizeFolderPath, e as folderOfRawPath, g as rawFileNameOfPath, f as folderPathError, h as parentFolderPath, j as folderNameError, k as joinFolderPath, l as folderNameOf, m as isFolderOrDescendant, o as replaceFolderPrefix, q as portableFolderPathKey, t as defaultInsetsForSize, F as FOLDER_SENTINEL, r as rawFilePathError, u as isAssetReference, w as validateVideoPreset, V as VIDEO_BUILT_IN_PRESETS, x as validateAudioPreset, A as AUDIO_BUILT_IN_PRESETS, y as validateImagePreset, I as IMAGE_BUILT_IN_PRESETS, S as SLICE_BUILT_IN_PRESETS } from './core.js-Clg1CHb6.js';
2
- import { a as assetIdError, m as manifestNameError } from './asset-id.js-CFsW8jeL.js';
1
+ import { a as plugins, b as audioPlugin, d as chromaKeyVideoPlugin, v as videoPlugin, s as slicePlugin, e as imagePlugin, n as normalizeFolderPath, g as folderOfRawPath, h as rawFileNameOfPath, j as canonicalizeParameters, f as folderPathError, k as parentFolderPath, l as folderNameError, m as joinFolderPath, o as folderNameOf, q as isFolderOrDescendant, t as replaceFolderPrefix, u as portableFolderPathKey, c as compareCodeUnits, w as processedSliceInsets, x as defaultInsetsForSize, F as FOLDER_SENTINEL, r as rawFilePathError, y as slicedAxesFor, z as isAssetReference, A as validateVideoPreset, V as VIDEO_BUILT_IN_PRESETS, B as validateAudioPreset, C as AUDIO_BUILT_IN_PRESETS, D as validateImagePreset, I as IMAGE_BUILT_IN_PRESETS, S as SLICE_BUILT_IN_PRESETS } from './core.js-DNIuZ9y-.js';
2
+ import { a as assetIdError, r as referenceErrors, c as collectAllReferences, b as computeLibraryMembership, m as manifestNameError, d as allDeliveredAssetIds, t as topologicalReferenceOrder } from './manifest-membership.js-CJnQXrL4.js';
3
3
  import { m as manifestColorError, a as manifestEmojiError } from './manifest-appearance.js-DTk355LQ.js';
4
- import { c as canonicalizeParameters, a as compareCodeUnits, v as verifyStableRawFile } from './raw-reconciliation.js-DOFtjkgu.js';
4
+ import { v as verifyStableRawFile } from './raw-reconciliation2.js-C2No1QIL.js';
5
5
  import { join, extname, dirname, basename, isAbsolute, resolve } from 'node:path';
6
6
  import { existsSync } from 'node:fs';
7
- import { readFile, mkdir, writeFile, rename, unlink, rm, stat, readdir } from 'node:fs/promises';
7
+ import { readFile, mkdir, writeFile, rename, unlink, rm, stat, readdir, mkdtemp } from 'node:fs/promises';
8
8
  import ffmpegStaticPath from 'ffmpeg-static';
9
9
  import { path } from 'ffprobe-static';
10
10
  import { execFile } from 'node:child_process';
11
11
  import { promisify } from 'node:util';
12
12
  import sharp from 'sharp';
13
+ import { tmpdir } from 'node:os';
13
14
  import { createHash } from 'node:crypto';
14
15
 
15
16
  //#region src/lib/core/library.ts
@@ -147,169 +148,6 @@ function serializeLibrary(library) {
147
148
  }), null, " ")}\n`;
148
149
  }
149
150
  //#endregion
150
- //#region src/lib/core/reference-graph.ts
151
- /**
152
- * Ask each asset's owning plugin for the references in its parameters. Assets
153
- * whose type is unknown or whose parameters do not validate contribute no
154
- * references — those problems are reported by the regular validation pass.
155
- */
156
- function collectAllReferences(library, plugins) {
157
- const referencesByAsset = {};
158
- for (const [assetId, record] of Object.entries(library.assets)) {
159
- referencesByAsset[assetId] = [];
160
- const plugin = plugins[record.type];
161
- if (!plugin?.collectReferences) continue;
162
- try {
163
- referencesByAsset[assetId] = plugin.collectReferences(plugin.validateParameters(record.parameters));
164
- } catch {}
165
- }
166
- return referencesByAsset;
167
- }
168
- /**
169
- * Reference *errors* (they block build/codegen): a reference to an unknown
170
- * asset, a target whose type is not among the field's expected types, and
171
- * cycles (composition is acyclic by nature).
172
- */
173
- function referenceErrors(library, referencesByAsset) {
174
- const issues = [];
175
- for (const [assetId, references] of Object.entries(referencesByAsset)) for (const reference of references) {
176
- if (!Object.hasOwn(library.assets, reference.assetId)) {
177
- issues.push({
178
- assetId,
179
- message: `Reference "${reference.field}" points at unknown asset "${reference.assetId}".`
180
- });
181
- continue;
182
- }
183
- const targetType = library.assets[reference.assetId].type;
184
- if (reference.expectedTypes.length > 0 && !reference.expectedTypes.includes(targetType)) issues.push({
185
- assetId,
186
- message: `Reference "${reference.field}" points at "${reference.assetId}" of type "${targetType}" — expected ${reference.expectedTypes.map((type) => `"${type}"`).join(" or ")}.`
187
- });
188
- }
189
- issues.push(...cycleErrors(referencesByAsset));
190
- return issues;
191
- }
192
- /** DFS cycle detection with an explicit stack path; each cycle reported once. */
193
- function cycleErrors(referencesByAsset) {
194
- const issues = [];
195
- const finished = /* @__PURE__ */ new Set();
196
- const reportedCycles = /* @__PURE__ */ new Set();
197
- const stack = [];
198
- const onStack = /* @__PURE__ */ new Set();
199
- function visit(assetId) {
200
- if (finished.has(assetId)) return;
201
- if (onStack.has(assetId)) {
202
- const cyclePath = [...stack.slice(stack.indexOf(assetId)), assetId];
203
- const cycleKey = [...new Set(cyclePath)].sort().join("\0");
204
- if (!reportedCycles.has(cycleKey)) {
205
- reportedCycles.add(cycleKey);
206
- issues.push({
207
- assetId: cyclePath[0],
208
- message: `Reference cycle: ${cyclePath.map((id) => `"${id}"`).join(" → ")} — references express composition and must stay acyclic.`
209
- });
210
- }
211
- return;
212
- }
213
- stack.push(assetId);
214
- onStack.add(assetId);
215
- for (const reference of referencesByAsset[assetId] ?? []) if (Object.hasOwn(referencesByAsset, reference.assetId)) visit(reference.assetId);
216
- stack.pop();
217
- onStack.delete(assetId);
218
- finished.add(assetId);
219
- }
220
- for (const assetId of Object.keys(referencesByAsset)) visit(assetId);
221
- return issues;
222
- }
223
- /**
224
- * The transitive reference closure of a set of assets, including the starting
225
- * set — the assets that must be delivered so the starting set renders as
226
- * authored. Tolerates cycles and ignores dangling targets (both are reported
227
- * as errors by `referenceErrors`).
228
- */
229
- function referenceClosure(assetIds, referencesByAsset) {
230
- const closure = /* @__PURE__ */ new Set();
231
- const pending = [...assetIds];
232
- while (pending.length > 0) {
233
- const assetId = pending.pop();
234
- if (closure.has(assetId) || !Object.hasOwn(referencesByAsset, assetId)) continue;
235
- closure.add(assetId);
236
- for (const reference of referencesByAsset[assetId]) pending.push(reference.assetId);
237
- }
238
- return closure;
239
- }
240
- /**
241
- * A dependencies-first order over `assetIds` and everything they transitively
242
- * reference — the build order that lets each entry inline its references from
243
- * already-built entries. Throws on a cycle (with the cycle path).
244
- */
245
- function topologicalReferenceOrder(assetIds, referencesByAsset) {
246
- const order = [];
247
- const finished = /* @__PURE__ */ new Set();
248
- const stack = [];
249
- const onStack = /* @__PURE__ */ new Set();
250
- function visit(assetId) {
251
- if (finished.has(assetId) || !Object.hasOwn(referencesByAsset, assetId)) return;
252
- if (onStack.has(assetId)) {
253
- const cyclePath = [...stack.slice(stack.indexOf(assetId)), assetId];
254
- throw new Error(`Reference cycle: ${cyclePath.map((id) => `"${id}"`).join(" → ")} — cannot order entries.`);
255
- }
256
- stack.push(assetId);
257
- onStack.add(assetId);
258
- for (const reference of referencesByAsset[assetId]) visit(reference.assetId);
259
- stack.pop();
260
- onStack.delete(assetId);
261
- finished.add(assetId);
262
- order.push(assetId);
263
- }
264
- for (const assetId of assetIds) visit(assetId);
265
- return order;
266
- }
267
- //#endregion
268
- //#region src/lib/core/manifest-membership.ts
269
- /**
270
- * Compute the full membership picture from a library and its collected
271
- * references: for each manifest the explicit members, the passive members
272
- * (`referenceClosure(explicit) − explicit`) with their via-attribution, and
273
- * the resulting delivery set.
274
- */
275
- function computeLibraryMembership(library, referencesByAsset) {
276
- const manifestNames = new Set(Object.keys(library.manifests));
277
- for (const record of Object.values(library.assets)) for (const manifestName of record.manifests) manifestNames.add(manifestName);
278
- const membership = {};
279
- for (const manifestName of [...manifestNames].sort(compareCodeUnits)) {
280
- const explicitMemberIds = Object.entries(library.assets).filter(([, record]) => record.manifests.includes(manifestName)).map(([assetId]) => assetId).sort(compareCodeUnits);
281
- const explicitMemberSet = new Set(explicitMemberIds);
282
- const deliveredAssetIds = new Set(explicitMemberIds);
283
- const viaByPassiveAssetId = /* @__PURE__ */ new Map();
284
- for (const explicitMemberId of explicitMemberIds) for (const reachedAssetId of referenceClosure([explicitMemberId], referencesByAsset)) {
285
- deliveredAssetIds.add(reachedAssetId);
286
- if (explicitMemberSet.has(reachedAssetId)) continue;
287
- const via = viaByPassiveAssetId.get(reachedAssetId) ?? [];
288
- via.push(explicitMemberId);
289
- viaByPassiveAssetId.set(reachedAssetId, via);
290
- }
291
- membership[manifestName] = {
292
- explicitMemberIds,
293
- passiveMembers: [...viaByPassiveAssetId.entries()].map(([assetId, via]) => ({
294
- assetId,
295
- via
296
- })).sort((a, b) => compareCodeUnits(a.assetId, b.assetId)),
297
- deliveredAssetIds
298
- };
299
- }
300
- return membership;
301
- }
302
- /**
303
- * Every asset delivered by at least one manifest, explicitly or passively —
304
- * the processing set (assets outside it are inert). An asset is
305
- * *unreachable* (nothing delivers it) exactly when it is missing here.
306
- */
307
- function allDeliveredAssetIds(membership) {
308
- const delivered = /* @__PURE__ */ new Set();
309
- for (const manifestMembership of Object.values(membership)) for (const assetId of manifestMembership.deliveredAssetIds) delivered.add(assetId);
310
- return delivered;
311
- }
312
- //#endregion
313
151
  //#region src/lib/server/processing/ffmpeg.ts
314
152
  /**
315
153
  * The ffmpeg/ffprobe toolchain layer: binary resolution (bundled `-static`
@@ -714,11 +552,173 @@ var imageServerPlugin = {
714
552
  })
715
553
  };
716
554
  //#endregion
555
+ //#region src/lib/server/processing/slice-processing.ts
556
+ /**
557
+ * Slice-specific image processing. Fixed caps are copied pixel-for-pixel; only
558
+ * the source region that will be stretched is scaled down. Bands are extracted
559
+ * and recomposed through temporary PNGs so large assets are not held in several
560
+ * full-size raw buffers at once.
561
+ */
562
+ var MAX_COMPRESSION_PIXELS = 32e6;
563
+ function clamp(value, min, max) {
564
+ return Math.max(min, Math.min(max, value));
565
+ }
566
+ /** The length after percentage-based compression, with one stretch pixel kept. */
567
+ function compressedStretchSize(size, compression) {
568
+ if (size <= 0) return 0;
569
+ return Math.max(1, Math.round(size * (1 - clamp(compression, 0, 100) / 100)));
570
+ }
571
+ function assertSliceCompressionDimensions(width, height) {
572
+ if (width * height > MAX_COMPRESSION_PIXELS) throw new Error(`Slice compression supports images up to ${MAX_COMPRESSION_PIXELS.toLocaleString("en-US")} pixels.`);
573
+ }
574
+ function fixedBands(size, startInset, endInset) {
575
+ const start = clamp(startInset, 0, size);
576
+ const end = clamp(endInset, 0, size - start);
577
+ return {
578
+ start,
579
+ center: size - start - end,
580
+ end
581
+ };
582
+ }
583
+ function axisBands(start, center, end, targetCenter) {
584
+ return [
585
+ {
586
+ start: 0,
587
+ size: start,
588
+ targetSize: start
589
+ },
590
+ {
591
+ start,
592
+ size: center,
593
+ targetSize: targetCenter
594
+ },
595
+ {
596
+ start: start + center,
597
+ size: end,
598
+ targetSize: end
599
+ }
600
+ ].filter((band) => band.size > 0 && band.targetSize > 0);
601
+ }
602
+ async function compressAxisToPng(options) {
603
+ const horizontal = options.axis === "x";
604
+ const width = horizontal ? options.start + options.targetCenter + options.end : options.dimensions.width;
605
+ const height = horizontal ? options.dimensions.height : options.start + options.targetCenter + options.end;
606
+ const composites = [];
607
+ let destinationOffset = 0;
608
+ let bandIndex = 0;
609
+ for (const band of axisBands(options.start, options.center, options.end, options.targetCenter)) {
610
+ const bandPath = join(options.temporaryDirectory, `${options.prefix}-${bandIndex}.png`);
611
+ const extracted = sharp(options.sourcePath).extract({
612
+ left: horizontal ? band.start : 0,
613
+ top: horizontal ? 0 : band.start,
614
+ width: horizontal ? band.size : options.dimensions.width,
615
+ height: horizontal ? options.dimensions.height : band.size
616
+ });
617
+ if (band.targetSize !== band.size) extracted.resize({
618
+ width: horizontal ? band.targetSize : options.dimensions.width,
619
+ height: horizontal ? options.dimensions.height : band.targetSize,
620
+ fit: "fill"
621
+ });
622
+ await extracted.png().toFile(bandPath);
623
+ composites.push({
624
+ input: bandPath,
625
+ left: horizontal ? destinationOffset : 0,
626
+ top: horizontal ? 0 : destinationOffset
627
+ });
628
+ destinationOffset += band.targetSize;
629
+ bandIndex += 1;
630
+ }
631
+ await sharp({ create: {
632
+ width,
633
+ height,
634
+ channels: 4,
635
+ background: {
636
+ r: 0,
637
+ g: 0,
638
+ b: 0,
639
+ alpha: 0
640
+ }
641
+ } }).composite(composites).png().toFile(options.targetPath);
642
+ return {
643
+ width,
644
+ height
645
+ };
646
+ }
647
+ async function processSliceImageFile(options) {
648
+ const axes = slicedAxesFor(options.mode);
649
+ const compressionX = axes.horizontal ? options.compression?.x ?? 0 : 0;
650
+ const compressionY = axes.vertical ? options.compression?.y ?? 0 : 0;
651
+ if (compressionX === 0 && compressionY === 0) return processImageFile(options);
652
+ const metadata = await sharp(options.sourcePath).metadata();
653
+ if (metadata.width === void 0 || metadata.height === void 0) throw new Error(`Could not read image dimensions of ${options.sourcePath}.`);
654
+ assertSliceCompressionDimensions(metadata.width, metadata.height);
655
+ let dimensions = {
656
+ width: metadata.width,
657
+ height: metadata.height
658
+ };
659
+ const processedInsets = processedSliceInsets({
660
+ ...options,
661
+ width: metadata.width,
662
+ height: metadata.height
663
+ });
664
+ let currentPath = options.sourcePath;
665
+ const temporaryDirectory = await mkdtemp(join(tmpdir(), "fundus-slice-compression-"));
666
+ try {
667
+ if (compressionX > 0) {
668
+ const bands = fixedBands(dimensions.width, processedInsets.left, processedInsets.right);
669
+ const targetCenter = compressedStretchSize(bands.center, compressionX);
670
+ if (targetCenter > 0 && targetCenter < bands.center) {
671
+ currentPath = join(temporaryDirectory, "compressed-x.png");
672
+ dimensions = await compressAxisToPng({
673
+ sourcePath: options.sourcePath,
674
+ targetPath: currentPath,
675
+ temporaryDirectory,
676
+ prefix: "x-band",
677
+ dimensions,
678
+ axis: "x",
679
+ ...bands,
680
+ targetCenter
681
+ });
682
+ }
683
+ }
684
+ if (compressionY > 0) {
685
+ const bands = fixedBands(dimensions.height, processedInsets.top, processedInsets.bottom);
686
+ const targetCenter = compressedStretchSize(bands.center, compressionY);
687
+ if (targetCenter > 0 && targetCenter < bands.center) {
688
+ const nextPath = join(temporaryDirectory, "compressed-y.png");
689
+ dimensions = await compressAxisToPng({
690
+ sourcePath: currentPath,
691
+ targetPath: nextPath,
692
+ temporaryDirectory,
693
+ prefix: "y-band",
694
+ dimensions,
695
+ axis: "y",
696
+ ...bands,
697
+ targetCenter
698
+ });
699
+ currentPath = nextPath;
700
+ }
701
+ }
702
+ await mkdir(dirname(options.targetPath), { recursive: true });
703
+ const info = await sharp(currentPath).toFormat(options.preset.format, options.preset.quality !== void 0 ? { quality: options.preset.quality } : {}).toFile(options.targetPath);
704
+ return {
705
+ width: info.width,
706
+ height: info.height
707
+ };
708
+ } finally {
709
+ await rm(temporaryDirectory, {
710
+ recursive: true,
711
+ force: true
712
+ });
713
+ }
714
+ }
715
+ //#endregion
717
716
  //#region src/lib/server/plugins/slice.ts
718
717
  /**
719
718
  * Slice plugin (server part): the same sharp conversion as the image plugin,
720
- * never resized insets are authored in source pixels, so the delivered proxy
721
- * keeps the source dimensions. The slicing data is entry-only.
719
+ * fixed caps keep their source-pixel size, while optional compression removes
720
+ * redundant pixels from the stretchable regions. The slicing data itself is
721
+ * entry-only.
722
722
  */
723
723
  var sliceConfigDefinition = {
724
724
  namespace: "slice",
@@ -758,24 +758,34 @@ var sliceServerPlugin = {
758
758
  pixelRatio: detectPixelRatio(rawFileName)
759
759
  };
760
760
  },
761
- process: (job) => processImageFile({
761
+ process: (job) => processSliceImageFile({
762
762
  sourcePath: job.sourcePath,
763
763
  targetPath: job.targetPath,
764
- preset: job.preset
764
+ preset: job.preset,
765
+ mode: job.parameters.mode,
766
+ insets: job.parameters.insets,
767
+ overdraw: job.parameters.overdraw,
768
+ compression: job.parameters.compression
765
769
  }),
766
770
  readProxyInfo: (proxyPath) => readImageDimensions(proxyPath),
767
771
  buildManifestEntry: ({ parameters, src, proxy }) => {
772
+ const sourceWidth = requireProxyField(proxy, "width");
773
+ const sourceHeight = requireProxyField(proxy, "height");
768
774
  return {
769
775
  kind: "slice",
770
776
  src,
771
777
  slicing: {
772
778
  mode: parameters.mode,
773
- insets: parameters.insets,
779
+ insets: processedSliceInsets({
780
+ ...parameters,
781
+ width: sourceWidth,
782
+ height: sourceHeight
783
+ }),
774
784
  pixelRatio: parameters.pixelRatio,
775
785
  ...hasAnySide(parameters.overdraw) ? { overdraw: parameters.overdraw } : {}
776
786
  },
777
- sourceWidth: requireProxyField(proxy, "width"),
778
- sourceHeight: requireProxyField(proxy, "height")
787
+ sourceWidth,
788
+ sourceHeight
779
789
  };
780
790
  }
781
791
  };
@@ -1351,13 +1361,13 @@ var LibraryStore = class {
1351
1361
  return library;
1352
1362
  }
1353
1363
  /** CAS-protected replacement used only by a repeatable import source. */
1354
- async replaceRawFromImportSource(id, bytes, expected, nextSource) {
1364
+ async replaceRawFromImportSource(id, bytes, expected, nextSource, updateParameters) {
1355
1365
  return this.#enqueue(async () => {
1356
1366
  const library = await this.read();
1357
1367
  const record = this.#requireAsset(library, id);
1358
1368
  if (record.raw !== expected.raw || record.rawHash !== expected.rawHash || record.type !== expected.type || !record.importSource || canonicalizeParameters(record.importSource) !== expected.canonicalSource) throw new Error("stale-import");
1359
1369
  const absolutePath = join(this.#config.rawDir, record.raw);
1360
- const { verifyStableRawFile } = await import('./raw-reconciliation2.js-DFwky2ou.js');
1370
+ const { verifyStableRawFile } = await import('./raw-reconciliation.js-_D9lZ_sc.js');
1361
1371
  try {
1362
1372
  await verifyStableRawFile(absolutePath, expected.rawHash);
1363
1373
  } catch {
@@ -1368,6 +1378,7 @@ var LibraryStore = class {
1368
1378
  const backupPath = `${absolutePath}.fundus-reimport-${token}`;
1369
1379
  const previousHash = record.rawHash;
1370
1380
  const previousSource = structuredClone(record.importSource);
1381
+ const previousParameters = structuredClone(record.parameters);
1371
1382
  let staged = false;
1372
1383
  let installed = false;
1373
1384
  try {
@@ -1378,10 +1389,12 @@ var LibraryStore = class {
1378
1389
  installed = true;
1379
1390
  record.rawHash = sha256Hex(bytes);
1380
1391
  if (nextSource) record.importSource = structuredClone(nextSource);
1392
+ if (updateParameters) record.parameters = updateParameters(record.parameters);
1381
1393
  await this.write(library);
1382
1394
  } catch (cause) {
1383
1395
  record.rawHash = previousHash;
1384
1396
  record.importSource = previousSource;
1397
+ record.parameters = previousParameters;
1385
1398
  if (installed) await unlink(absolutePath).catch(() => {});
1386
1399
  if (staged) await rename(backupPath, absolutePath);
1387
1400
  await unlink(temporaryPath).catch(() => {});
@@ -1906,5 +1919,5 @@ function invalidInput(message) {
1906
1919
  throw new SourceImportError("invalid-input", message);
1907
1920
  }
1908
1921
 
1909
- export { LibraryStore as L, SourceImportError as S, serverPluginForType as a, computeLibraryMembership as b, collectAllReferences as c, descriptorsByType as d, allDeliveredAssetIds as e, encodeRelativePathForUrl as f, generateManifestModules as g, invalidInput as h, isRecord as i, assertSafeRelativeFilePath as j, processAssets as p, readCurrentProxy as r, serverPluginsByType as s };
1910
- //# sourceMappingURL=contract.js-sHny3b-s.js.map
1922
+ export { LibraryStore as L, SourceImportError as S, serverPluginForType as a, invalidInput as b, assertSafeRelativeFilePath as c, descriptorsByType as d, encodeRelativePathForUrl as e, generateManifestModules as g, isRecord as i, processAssets as p, readCurrentProxy as r, serverPluginsByType as s };
1923
+ //# sourceMappingURL=contract.js-DGMufT2e.js.map