ooxml-core 1.37.0 → 1.38.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 (335) hide show
  1. package/README.md +7 -0
  2. package/dist/automation/index.cjs +207 -207
  3. package/dist/automation/index.mjs +207 -207
  4. package/dist/{chunk-M2DFN3SP.mjs → chunk-XBIZIBTJ.mjs} +507 -10
  5. package/dist/collab/merge-values.d.ts +14 -0
  6. package/dist/collab/merge-values.d.ts.map +1 -0
  7. package/dist/docx/embedded.cjs +476 -474
  8. package/dist/docx/embedded.mjs +476 -474
  9. package/dist/docx/index.cjs +1075 -719
  10. package/dist/docx/index.d.ts +1 -0
  11. package/dist/docx/index.d.ts.map +1 -1
  12. package/dist/docx/index.mjs +1075 -720
  13. package/dist/docx/layout/index.cjs +4 -0
  14. package/dist/docx/layout/index.mjs +4 -0
  15. package/dist/docx/load/index.cjs +164 -164
  16. package/dist/docx/load/index.mjs +164 -164
  17. package/dist/docx/merge-snapshots.d.ts +9 -0
  18. package/dist/docx/merge-snapshots.d.ts.map +1 -0
  19. package/dist/docx/ui/index.cjs +155 -155
  20. package/dist/docx/ui/index.mjs +155 -155
  21. package/dist/embedding/index.cjs +207 -0
  22. package/dist/embedding/index.d.ts +3 -0
  23. package/dist/embedding/index.d.ts.map +1 -1
  24. package/dist/embedding/index.mjs +205 -1
  25. package/dist/embedding/onedrive/client.d.ts +4 -0
  26. package/dist/embedding/onedrive/client.d.ts.map +1 -0
  27. package/dist/embedding/onedrive/index.cjs +617 -0
  28. package/dist/embedding/onedrive/index.d.ts +6 -0
  29. package/dist/embedding/onedrive/index.d.ts.map +1 -0
  30. package/dist/embedding/onedrive/index.mjs +611 -0
  31. package/dist/embedding/onedrive/metadata.d.ts +6 -0
  32. package/dist/embedding/onedrive/metadata.d.ts.map +1 -0
  33. package/dist/embedding/onedrive/requests.d.ts +8 -0
  34. package/dist/embedding/onedrive/requests.d.ts.map +1 -0
  35. package/dist/embedding/onedrive/session.d.ts +4 -0
  36. package/dist/embedding/onedrive/session.d.ts.map +1 -0
  37. package/dist/embedding/onedrive/transport.d.ts +9 -0
  38. package/dist/embedding/onedrive/transport.d.ts.map +1 -0
  39. package/dist/embedding/onedrive/types.d.ts +86 -0
  40. package/dist/embedding/onedrive/types.d.ts.map +1 -0
  41. package/dist/embedding/onedrive/upload.d.ts +3 -0
  42. package/dist/embedding/onedrive/upload.d.ts.map +1 -0
  43. package/dist/embedding/storage-merge.d.ts +8 -0
  44. package/dist/embedding/storage-merge.d.ts.map +1 -0
  45. package/dist/embedding/storage-session.d.ts +7 -0
  46. package/dist/embedding/storage-session.d.ts.map +1 -0
  47. package/dist/embedding/versioned-storage.d.ts +67 -0
  48. package/dist/embedding/versioned-storage.d.ts.map +1 -0
  49. package/dist/index.cjs +1013 -340
  50. package/dist/index.mjs +1013 -340
  51. package/dist/opc/index.cjs +680 -216
  52. package/dist/opc/index.d.ts +1 -0
  53. package/dist/opc/index.d.ts.map +1 -1
  54. package/dist/opc/index.mjs +680 -217
  55. package/dist/opc/merge-snapshots.d.ts +26 -0
  56. package/dist/opc/merge-snapshots.d.ts.map +1 -0
  57. package/dist/pptx/automation/index.cjs +20 -6
  58. package/dist/pptx/automation/index.d.ts +8 -17
  59. package/dist/pptx/automation/index.d.ts.map +1 -1
  60. package/dist/pptx/automation/index.mjs +1 -1
  61. package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -3
  62. package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts.map +1 -1
  63. package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -3
  64. package/dist/pptx/automation/schemas/chart-schemas.d.ts.map +1 -1
  65. package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -3
  66. package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts.map +1 -1
  67. package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -3
  68. package/dist/pptx/automation/schemas/element-schemas.d.ts.map +1 -1
  69. package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -3
  70. package/dist/pptx/automation/schemas/export-schemas.d.ts.map +1 -1
  71. package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -3
  72. package/dist/pptx/automation/schemas/geometry-schemas.d.ts.map +1 -1
  73. package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -3
  74. package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts.map +1 -1
  75. package/dist/pptx/automation/schemas/index.d.ts +1 -3
  76. package/dist/pptx/automation/schemas/index.d.ts.map +1 -1
  77. package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -3
  78. package/dist/pptx/automation/schemas/json-schemas.d.ts.map +1 -1
  79. package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -3
  80. package/dist/pptx/automation/schemas/layout-schemas.d.ts.map +1 -1
  81. package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -3
  82. package/dist/pptx/automation/schemas/lock-schemas.d.ts.map +1 -1
  83. package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -3
  84. package/dist/pptx/automation/schemas/metadata-schemas.d.ts.map +1 -1
  85. package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -3
  86. package/dist/pptx/automation/schemas/ole-schemas.d.ts.map +1 -1
  87. package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -3
  88. package/dist/pptx/automation/schemas/presentation-schemas.d.ts.map +1 -1
  89. package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -3
  90. package/dist/pptx/automation/schemas/section-schemas.d.ts.map +1 -1
  91. package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -3
  92. package/dist/pptx/automation/schemas/slide-schemas.d.ts.map +1 -1
  93. package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -3
  94. package/dist/pptx/automation/schemas/smartart-schemas.d.ts.map +1 -1
  95. package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -3
  96. package/dist/pptx/automation/schemas/table-style-schemas.d.ts.map +1 -1
  97. package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -3
  98. package/dist/pptx/automation/schemas/template-schemas.d.ts.map +1 -1
  99. package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -3
  100. package/dist/pptx/automation/schemas/theme-schemas.d.ts.map +1 -1
  101. package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -3
  102. package/dist/pptx/automation/schemas/validation-schemas.d.ts.map +1 -1
  103. package/dist/pptx/chunks/{collaboration-text-codec-Du_XeE_i.d.ts → collaboration-text-codec-1VmwD3yq.d.ts} +1 -3
  104. package/dist/pptx/chunks/collaboration-text-codec-1VmwD3yq.d.ts.map +1 -0
  105. package/dist/pptx/chunks/{collaboration-text-merge-DWWWdT_t.d.ts → collaboration-text-merge-B-tth-0W.d.ts} +2 -4
  106. package/dist/pptx/chunks/collaboration-text-merge-B-tth-0W.d.ts.map +1 -0
  107. package/dist/pptx/chunks/{collaboration-text-positions-MMT3GkZi.d.ts → collaboration-text-positions-D-1Jo1Fz.d.ts} +1 -3
  108. package/dist/pptx/chunks/collaboration-text-positions-D-1Jo1Fz.d.ts.map +1 -0
  109. package/dist/pptx/chunks/{collaboration-text-session-D0NOLQk7.d.ts → collaboration-text-session-CWHTaWF4.d.ts} +4 -6
  110. package/dist/pptx/chunks/collaboration-text-session-CWHTaWF4.d.ts.map +1 -0
  111. package/dist/pptx/chunks/{collaboration-text-session-delta-CzJGrTKJ.d.ts → collaboration-text-session-delta-Dxzybssp.d.ts} +2 -4
  112. package/dist/pptx/chunks/collaboration-text-session-delta-Dxzybssp.d.ts.map +1 -0
  113. package/dist/pptx/chunks/{color-ref-DT599vEx.d.ts → color-ref-CwUQoKPJ.d.ts} +1 -3
  114. package/dist/pptx/chunks/color-ref-CwUQoKPJ.d.ts.map +1 -0
  115. package/dist/pptx/chunks/{elements-f3UbFph-.d.ts → elements-DheCTwi0.d.ts} +4 -54
  116. package/dist/pptx/chunks/elements-DheCTwi0.d.ts.map +1 -0
  117. package/dist/pptx/chunks/{index-Bp-1pGo1.d.ts → index-B4ofjG6_.d.ts} +6 -384
  118. package/dist/pptx/chunks/index-B4ofjG6_.d.ts.map +1 -0
  119. package/dist/pptx/chunks/{index-BnH2QjYm.d.ts → index-Jcce8TlI.d.ts} +5 -37
  120. package/dist/pptx/chunks/index-Jcce8TlI.d.ts.map +1 -0
  121. package/dist/pptx/chunks/{index-pLLN4OTz.d.ts → index-bgj0Ztnq.d.ts} +23 -543
  122. package/dist/pptx/chunks/index-bgj0Ztnq.d.ts.map +1 -0
  123. package/dist/pptx/chunks/{inspection-status-DjiWd_Aa.d.ts → inspection-status-TKac7eqb.d.ts} +1 -13
  124. package/dist/pptx/chunks/inspection-status-TKac7eqb.d.ts.map +1 -0
  125. package/dist/pptx/chunks/{schemas-fuDGetRe.d.ts → schemas-LHsDbVOw.d.ts} +1 -29
  126. package/dist/pptx/chunks/schemas-LHsDbVOw.d.ts.map +1 -0
  127. package/dist/pptx/chunks/{smart-art-CmOrPLLQ.d.ts → smart-art-DB37AsFP.d.ts} +2 -46
  128. package/dist/pptx/chunks/smart-art-DB37AsFP.d.ts.map +1 -0
  129. package/dist/pptx/chunks/{text-operations-D5sgspO6.d.ts → text-operations-CdgEnFuK.d.ts} +4 -32
  130. package/dist/pptx/chunks/text-operations-CdgEnFuK.d.ts.map +1 -0
  131. package/dist/pptx/chunks/{text-P9xVnXXf.d.ts → text-t_wJ2OwM.d.ts} +2 -12
  132. package/dist/pptx/chunks/text-t_wJ2OwM.d.ts.map +1 -0
  133. package/dist/pptx/cli/index.cjs +20 -6
  134. package/dist/pptx/cli/index.d.ts +1 -3
  135. package/dist/pptx/cli/index.d.ts.map +1 -1
  136. package/dist/pptx/converter/index.cjs +7 -0
  137. package/dist/pptx/converter/index.d.ts +1 -1
  138. package/dist/pptx/editor/ai/table-merge.d.ts +0 -2
  139. package/dist/pptx/editor/ai/table-merge.d.ts.map +1 -1
  140. package/dist/pptx/editor/loader/element-patch-walker.d.ts +0 -2
  141. package/dist/pptx/editor/loader/element-patch-walker.d.ts.map +1 -1
  142. package/dist/pptx/editor/loader/is-external-url.d.ts +0 -2
  143. package/dist/pptx/editor/loader/is-external-url.d.ts.map +1 -1
  144. package/dist/pptx/editor/loader/lazy-image-resolution.d.ts +0 -2
  145. package/dist/pptx/editor/loader/lazy-image-resolution.d.ts.map +1 -1
  146. package/dist/pptx/editor/loader/load-content-helpers.d.ts +0 -2
  147. package/dist/pptx/editor/loader/load-content-helpers.d.ts.map +1 -1
  148. package/dist/pptx/editor/loader/table-style-image-paths.d.ts +0 -2
  149. package/dist/pptx/editor/loader/table-style-image-paths.d.ts.map +1 -1
  150. package/dist/pptx/editor/loader/text-fill-image-paths.d.ts +0 -2
  151. package/dist/pptx/editor/loader/text-fill-image-paths.d.ts.map +1 -1
  152. package/dist/pptx/editor/render/bullet-list.d.ts +0 -2
  153. package/dist/pptx/editor/render/bullet-list.d.ts.map +1 -1
  154. package/dist/pptx/editor/render/bullet-toggle.d.ts +0 -2
  155. package/dist/pptx/editor/render/bullet-toggle.d.ts.map +1 -1
  156. package/dist/pptx/editor/render/chart-user-shape-edit.d.ts +0 -2
  157. package/dist/pptx/editor/render/chart-user-shape-edit.d.ts.map +1 -1
  158. package/dist/pptx/editor/render/clone.d.ts +0 -2
  159. package/dist/pptx/editor/render/clone.d.ts.map +1 -1
  160. package/dist/pptx/editor/render/collaboration-active-session.d.ts +0 -2
  161. package/dist/pptx/editor/render/collaboration-active-session.d.ts.map +1 -1
  162. package/dist/pptx/editor/render/collaboration-departure.d.ts +0 -2
  163. package/dist/pptx/editor/render/collaboration-departure.d.ts.map +1 -1
  164. package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts +0 -2
  165. package/dist/pptx/editor/render/collaboration-live-patch-target.d.ts.map +1 -1
  166. package/dist/pptx/editor/render/collaboration-load-origin.d.ts +0 -2
  167. package/dist/pptx/editor/render/collaboration-load-origin.d.ts.map +1 -1
  168. package/dist/pptx/editor/render/collaboration-reconcile.d.ts +0 -2
  169. package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
  170. package/dist/pptx/editor/render/collaboration-sync.d.ts +4 -8
  171. package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
  172. package/dist/pptx/editor/render/collaboration-text-codec.d.ts +1 -1
  173. package/dist/pptx/editor/render/collaboration-text-lease.d.ts +0 -2
  174. package/dist/pptx/editor/render/collaboration-text-lease.d.ts.map +1 -1
  175. package/dist/pptx/editor/render/collaboration-text-merge.d.ts +1 -1
  176. package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts +2 -4
  177. package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts.map +1 -1
  178. package/dist/pptx/editor/render/collaboration-text-positions.d.ts +1 -1
  179. package/dist/pptx/editor/render/collaboration-text-projection.d.ts +1 -3
  180. package/dist/pptx/editor/render/collaboration-text-projection.d.ts.map +1 -1
  181. package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts +3 -5
  182. package/dist/pptx/editor/render/collaboration-text-session-apply.d.ts.map +1 -1
  183. package/dist/pptx/editor/render/collaboration-text-session-delta.d.ts +1 -1
  184. package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts +1 -3
  185. package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts.map +1 -1
  186. package/dist/pptx/editor/render/collaboration-text-session.d.ts +1 -1
  187. package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts +2 -4
  188. package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts.map +1 -1
  189. package/dist/pptx/editor/render/custom-show-operations.d.ts +0 -2
  190. package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -1
  191. package/dist/pptx/editor/render/deck-save-encryption.d.ts +0 -2
  192. package/dist/pptx/editor/render/deck-save-encryption.d.ts.map +1 -1
  193. package/dist/pptx/editor/render/editor-history.d.ts +0 -2
  194. package/dist/pptx/editor/render/editor-history.d.ts.map +1 -1
  195. package/dist/pptx/editor/render/editor-mutations.d.ts +0 -2
  196. package/dist/pptx/editor/render/editor-mutations.d.ts.map +1 -1
  197. package/dist/pptx/editor/render/element-locks.d.ts +0 -2
  198. package/dist/pptx/editor/render/element-locks.d.ts.map +1 -1
  199. package/dist/pptx/editor/render/element-operations.d.ts +0 -2
  200. package/dist/pptx/editor/render/element-operations.d.ts.map +1 -1
  201. package/dist/pptx/editor/render/element.d.ts +0 -2
  202. package/dist/pptx/editor/render/element.d.ts.map +1 -1
  203. package/dist/pptx/editor/render/find-replace.d.ts +2 -4
  204. package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
  205. package/dist/pptx/editor/render/font-family-update.d.ts +1 -3
  206. package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -1
  207. package/dist/pptx/editor/render/group-drill.d.ts +0 -2
  208. package/dist/pptx/editor/render/group-drill.d.ts.map +1 -1
  209. package/dist/pptx/editor/render/inline-list-body.d.ts +0 -2
  210. package/dist/pptx/editor/render/inline-list-body.d.ts.map +1 -1
  211. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +1 -3
  212. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -1
  213. package/dist/pptx/editor/render/remap-empty-paragraph.d.ts +0 -2
  214. package/dist/pptx/editor/render/remap-empty-paragraph.d.ts.map +1 -1
  215. package/dist/pptx/editor/render/remap-paragraph-sources.d.ts +0 -2
  216. package/dist/pptx/editor/render/remap-paragraph-sources.d.ts.map +1 -1
  217. package/dist/pptx/editor/render/remap-text-bullets.d.ts +0 -2
  218. package/dist/pptx/editor/render/remap-text-bullets.d.ts.map +1 -1
  219. package/dist/pptx/editor/render/remap-text.d.ts +0 -2
  220. package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
  221. package/dist/pptx/editor/render/schema-label-keys.d.ts +0 -2
  222. package/dist/pptx/editor/render/schema-label-keys.d.ts.map +1 -1
  223. package/dist/pptx/editor/render/section-operations.d.ts +0 -2
  224. package/dist/pptx/editor/render/section-operations.d.ts.map +1 -1
  225. package/dist/pptx/editor/render/slide-background-patch.d.ts +0 -2
  226. package/dist/pptx/editor/render/slide-background-patch.d.ts.map +1 -1
  227. package/dist/pptx/editor/render/slide-operations.d.ts +0 -2
  228. package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
  229. package/dist/pptx/editor/render/slide-search.d.ts +0 -2
  230. package/dist/pptx/editor/render/slide-search.d.ts.map +1 -1
  231. package/dist/pptx/editor/render/slide-size-rescale.d.ts +0 -2
  232. package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
  233. package/dist/pptx/editor/render/slide-transition-edits.d.ts +0 -2
  234. package/dist/pptx/editor/render/slide-transition-edits.d.ts.map +1 -1
  235. package/dist/pptx/editor/render/table-cell-edit.d.ts +0 -2
  236. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  237. package/dist/pptx/editor/render/table-cell-merge.d.ts +0 -2
  238. package/dist/pptx/editor/render/table-cell-merge.d.ts.map +1 -1
  239. package/dist/pptx/editor/render/table-data-grid-ops.d.ts +0 -2
  240. package/dist/pptx/editor/render/table-data-grid-ops.d.ts.map +1 -1
  241. package/dist/pptx/editor/render/table-layout.d.ts +0 -2
  242. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  243. package/dist/pptx/editor/render/table-merge.d.ts +0 -2
  244. package/dist/pptx/editor/render/table-merge.d.ts.map +1 -1
  245. package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts +0 -2
  246. package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts.map +1 -1
  247. package/dist/pptx/editor/render/table-style-editor-edit.d.ts +0 -2
  248. package/dist/pptx/editor/render/table-style-editor-edit.d.ts.map +1 -1
  249. package/dist/pptx/editor/render/table-style-editor-parts.d.ts +0 -2
  250. package/dist/pptx/editor/render/table-style-editor-parts.d.ts.map +1 -1
  251. package/dist/pptx/editor/render/table-style-map-edits.d.ts +0 -2
  252. package/dist/pptx/editor/render/table-style-map-edits.d.ts.map +1 -1
  253. package/dist/pptx/editor/render/template-editing.d.ts +0 -2
  254. package/dist/pptx/editor/render/template-editing.d.ts.map +1 -1
  255. package/dist/pptx/editor/render/text-content-style.d.ts +1 -3
  256. package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -1
  257. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -4
  258. package/dist/pptx/editor/render/text-runs-style-patch.d.ts.map +1 -1
  259. package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts +0 -2
  260. package/dist/pptx/editor/render/text-segment-paragraph-break.d.ts.map +1 -1
  261. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -4
  262. package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -1
  263. package/dist/pptx/editor/render/text-theme.d.ts +0 -2
  264. package/dist/pptx/editor/render/text-theme.d.ts.map +1 -1
  265. package/dist/pptx/editor/render/theme-editor-model.d.ts +0 -2
  266. package/dist/pptx/editor/render/theme-editor-model.d.ts.map +1 -1
  267. package/dist/pptx/editor/render/theme-editor-presets.d.ts +0 -2
  268. package/dist/pptx/editor/render/theme-editor-presets.d.ts.map +1 -1
  269. package/dist/pptx/editor/render/update-text-segment-style.d.ts +1 -3
  270. package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -1
  271. package/dist/pptx/index.cjs +1687 -1159
  272. package/dist/pptx/index.d.ts +10 -10
  273. package/dist/pptx/index.mjs +1 -1
  274. package/dist/pptx/node/index.d.ts +1 -3
  275. package/dist/pptx/node/index.d.ts.map +1 -1
  276. package/dist/pptx/signature-node/index.d.ts +1 -21
  277. package/dist/pptx/signature-node/index.d.ts.map +1 -1
  278. package/dist/pptx/smartart-layouts/index.d.ts +1 -7
  279. package/dist/pptx/smartart-layouts/index.d.ts.map +1 -1
  280. package/dist/pptx/ui/index.d.ts +1 -9
  281. package/dist/pptx/ui/index.d.ts.map +1 -1
  282. package/dist/teams/index.cjs +215 -201
  283. package/dist/teams/index.mjs +215 -201
  284. package/dist/text/index.cjs +193 -0
  285. package/dist/text/index.d.ts +1 -0
  286. package/dist/text/index.d.ts.map +1 -1
  287. package/dist/text/index.mjs +193 -1
  288. package/dist/text/merge-three-way.d.ts +9 -0
  289. package/dist/text/merge-three-way.d.ts.map +1 -0
  290. package/dist/visio/collab/index.cjs +226 -7
  291. package/dist/visio/collab/index.d.ts +1 -0
  292. package/dist/visio/collab/index.d.ts.map +1 -1
  293. package/dist/visio/collab/index.mjs +225 -7
  294. package/dist/visio/collab/merge-snapshots.d.ts +14 -0
  295. package/dist/visio/collab/merge-snapshots.d.ts.map +1 -0
  296. package/dist/visio/index.cjs +9 -9
  297. package/dist/visio/index.mjs +9 -9
  298. package/dist/visio/ui/index.cjs +9 -9
  299. package/dist/visio/ui/index.mjs +9 -9
  300. package/dist/xlsx/collab/index.cjs +49966 -507
  301. package/dist/xlsx/collab/index.d.ts +1 -0
  302. package/dist/xlsx/collab/index.d.ts.map +1 -1
  303. package/dist/xlsx/collab/index.mjs +49961 -507
  304. package/dist/xlsx/collab/merge-residual.d.ts +16 -0
  305. package/dist/xlsx/collab/merge-residual.d.ts.map +1 -0
  306. package/dist/xlsx/collab/merge-snapshots.d.ts +8 -0
  307. package/dist/xlsx/collab/merge-snapshots.d.ts.map +1 -0
  308. package/dist/xlsx/index.cjs +202 -202
  309. package/dist/xlsx/index.mjs +202 -202
  310. package/dist/xlsx/load/index.cjs +155 -155
  311. package/dist/xlsx/load/index.mjs +155 -155
  312. package/dist/xlsx/ui/index.cjs +202 -202
  313. package/dist/xlsx/ui/index.mjs +202 -202
  314. package/dist/xml/index.cjs +390 -22
  315. package/dist/xml/index.d.ts +1 -0
  316. package/dist/xml/index.d.ts.map +1 -1
  317. package/dist/xml/index.mjs +390 -23
  318. package/dist/xml/merge-three-way.d.ts +16 -0
  319. package/dist/xml/merge-three-way.d.ts.map +1 -0
  320. package/package.json +13 -8
  321. package/dist/pptx/chunks/collaboration-text-codec-Du_XeE_i.d.ts.map +0 -1
  322. package/dist/pptx/chunks/collaboration-text-merge-DWWWdT_t.d.ts.map +0 -1
  323. package/dist/pptx/chunks/collaboration-text-positions-MMT3GkZi.d.ts.map +0 -1
  324. package/dist/pptx/chunks/collaboration-text-session-D0NOLQk7.d.ts.map +0 -1
  325. package/dist/pptx/chunks/collaboration-text-session-delta-CzJGrTKJ.d.ts.map +0 -1
  326. package/dist/pptx/chunks/color-ref-DT599vEx.d.ts.map +0 -1
  327. package/dist/pptx/chunks/elements-f3UbFph-.d.ts.map +0 -1
  328. package/dist/pptx/chunks/index-BnH2QjYm.d.ts.map +0 -1
  329. package/dist/pptx/chunks/index-Bp-1pGo1.d.ts.map +0 -1
  330. package/dist/pptx/chunks/index-pLLN4OTz.d.ts.map +0 -1
  331. package/dist/pptx/chunks/inspection-status-DjiWd_Aa.d.ts.map +0 -1
  332. package/dist/pptx/chunks/schemas-fuDGetRe.d.ts.map +0 -1
  333. package/dist/pptx/chunks/smart-art-CmOrPLLQ.d.ts.map +0 -1
  334. package/dist/pptx/chunks/text-P9xVnXXf.d.ts.map +0 -1
  335. package/dist/pptx/chunks/text-operations-D5sgspO6.d.ts.map +0 -1
@@ -186,6 +186,161 @@ function attr(element5, local, ns, prefix3) {
186
186
  }
187
187
  var relAttr = (element5, local) => attr(element5, local, NS.r, "r");
188
188
 
189
+ // text/text-diff.ts
190
+ var isLowSurrogate = (text9, at3) => {
191
+ const code = text9.charCodeAt(at3);
192
+ return code >= 56320 && code <= 57343;
193
+ };
194
+ function shortestEdit(n, m, same17, maxEdits) {
195
+ const max = Math.min(n + m, maxEdits);
196
+ const offset2 = max + 1;
197
+ const v = new Int32Array(2 * max + 3);
198
+ const trace = [];
199
+ for (let d = 0; d <= max; d++) {
200
+ for (let k = -d; k <= d; k += 2) {
201
+ const down = k === -d || k !== d && v[offset2 + k - 1] < v[offset2 + k + 1];
202
+ let x = down ? v[offset2 + k + 1] : v[offset2 + k - 1] + 1;
203
+ let y = x - k;
204
+ while (x < n && y < m && same17(x, y)) {
205
+ x++;
206
+ y++;
207
+ }
208
+ v[offset2 + k] = x;
209
+ if (x >= n && y >= m) return backtrack(trace, n, m, d);
210
+ }
211
+ trace.push(v.slice(offset2 - d, offset2 + d + 1));
212
+ }
213
+ return void 0;
214
+ }
215
+ function backtrack(trace, n, m, d) {
216
+ const edits2 = [];
217
+ let x = n;
218
+ let y = m;
219
+ for (let step2 = d; step2 > 0; step2--) {
220
+ const previous = trace[step2 - 1];
221
+ const at3 = (k2) => previous[k2 + step2 - 1];
222
+ const k = x - y;
223
+ const down = k === -step2 || k !== step2 && at3(k - 1) < at3(k + 1);
224
+ const before = down ? k + 1 : k - 1;
225
+ const startX = at3(before);
226
+ const startY = startX - before;
227
+ edits2.push(down ? [startX, startY, true] : [startX, startY, false]);
228
+ x = startX;
229
+ y = startY;
230
+ }
231
+ return edits2.reverse();
232
+ }
233
+ function changesOf(edits2) {
234
+ const changes = [];
235
+ for (const [x, y, inserts] of edits2) {
236
+ const last = changes.at(-1);
237
+ if (last && last.fromEnd === x && last.toEnd === y) {
238
+ if (inserts) last.toEnd++;
239
+ else last.fromEnd++;
240
+ } else
241
+ changes.push({
242
+ fromStart: x,
243
+ fromEnd: inserts ? x : x + 1,
244
+ toStart: y,
245
+ toEnd: inserts ? y + 1 : y
246
+ });
247
+ }
248
+ return changes;
249
+ }
250
+ function characterChanges(a2, b, maxEdits) {
251
+ const edits2 = shortestEdit(
252
+ a2.length,
253
+ b.length,
254
+ (x, y) => a2.charCodeAt(x) === b.charCodeAt(y),
255
+ maxEdits
256
+ );
257
+ return edits2 && changesOf(edits2);
258
+ }
259
+ var TOKEN = /[\p{L}\p{N}\p{M}]+|\s+|[\s\S]/gu;
260
+ function tokensOf(text9, ids) {
261
+ const tokens3 = [];
262
+ const starts = [];
263
+ for (const match2 of text9.matchAll(TOKEN)) {
264
+ let id5 = ids.get(match2[0]);
265
+ if (id5 === void 0) ids.set(match2[0], id5 = ids.size);
266
+ tokens3.push(id5);
267
+ starts.push(match2.index);
268
+ }
269
+ starts.push(text9.length);
270
+ return { tokens: tokens3, starts };
271
+ }
272
+ function tokenChanges(a2, b, maxEdits) {
273
+ const ids = /* @__PURE__ */ new Map();
274
+ const from = tokensOf(a2, ids);
275
+ const to = tokensOf(b, ids);
276
+ const edits2 = shortestEdit(
277
+ from.tokens.length,
278
+ to.tokens.length,
279
+ (x, y) => from.tokens[x] === to.tokens[y],
280
+ maxEdits
281
+ );
282
+ if (!edits2) return void 0;
283
+ let budget = maxEdits;
284
+ return changesOf(edits2).flatMap((stretch) => {
285
+ const change = {
286
+ fromStart: from.starts[stretch.fromStart],
287
+ fromEnd: from.starts[stretch.fromEnd],
288
+ toStart: to.starts[stretch.toStart],
289
+ toEnd: to.starts[stretch.toEnd]
290
+ };
291
+ const inner2 = change.fromEnd > change.fromStart && change.toEnd > change.toStart ? characterChanges(
292
+ a2.slice(change.fromStart, change.fromEnd),
293
+ b.slice(change.toStart, change.toEnd),
294
+ budget
295
+ ) : void 0;
296
+ if (!inner2) return [change];
297
+ for (const found of inner2)
298
+ budget -= found.fromEnd - found.fromStart + found.toEnd - found.toStart;
299
+ return inner2.map((found) => ({
300
+ fromStart: found.fromStart + change.fromStart,
301
+ fromEnd: found.fromEnd + change.fromStart,
302
+ toStart: found.toStart + change.toStart,
303
+ toEnd: found.toEnd + change.toStart
304
+ }));
305
+ });
306
+ }
307
+ function diffText(from, to, maxEdits = 500) {
308
+ let start = 0;
309
+ while (start < from.length && start < to.length && from.charCodeAt(start) === to.charCodeAt(start))
310
+ start++;
311
+ let end = 0;
312
+ while (end < from.length - start && end < to.length - start && from.charCodeAt(from.length - 1 - end) === to.charCodeAt(to.length - 1 - end))
313
+ end++;
314
+ const a2 = from.slice(start, from.length - end);
315
+ const b = to.slice(start, to.length - end);
316
+ if (!a2.length && !b.length) return [];
317
+ const found = a2.length && b.length ? characterChanges(a2, b, maxEdits) ?? tokenChanges(a2, b, maxEdits) : void 0;
318
+ const changes = found ?? [{ fromStart: 0, fromEnd: a2.length, toStart: 0, toEnd: b.length }];
319
+ const result2 = [];
320
+ for (const change of changes) {
321
+ const placed = {
322
+ fromStart: change.fromStart + start,
323
+ fromEnd: change.fromEnd + start,
324
+ toStart: change.toStart + start,
325
+ toEnd: change.toEnd + start
326
+ };
327
+ if (placed.fromStart > 0 && placed.toStart > 0 && (isLowSurrogate(from, placed.fromStart) || isLowSurrogate(to, placed.toStart))) {
328
+ placed.fromStart--;
329
+ placed.toStart--;
330
+ }
331
+ if (isLowSurrogate(from, placed.fromEnd) || isLowSurrogate(to, placed.toEnd)) {
332
+ placed.fromEnd++;
333
+ placed.toEnd++;
334
+ }
335
+ const last = result2.at(-1);
336
+ if (last && placed.fromStart <= last.fromEnd) {
337
+ last.fromEnd = Math.max(last.fromEnd, placed.fromEnd);
338
+ last.toEnd = Math.max(last.toEnd, placed.toEnd);
339
+ } else result2.push(placed);
340
+ }
341
+ return result2;
342
+ }
343
+
189
344
  // xml/lite.ts
190
345
  var LiteElement = class {
191
346
  constructor(tagName2, localName3, namespaceURI) {
@@ -1447,58 +1602,6 @@ async function ensureRelationship(zip, relsPath, type, target3) {
1447
1602
  zip.file(relsPath, xml.replace("</Relationships>", `${insertion}</Relationships>`));
1448
1603
  return id5;
1449
1604
  }
1450
-
1451
- // opc/safe-href.ts
1452
- var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
1453
- function isSafeHyperlinkHref(href) {
1454
- const scheme2 = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
1455
- return scheme2 !== void 0 && SAFE_SCHEMES.has(scheme2.toLowerCase());
1456
- }
1457
- var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
1458
- var STORE_SCHEMES = /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
1459
- var SCRIPT_SCHEMES = /* @__PURE__ */ new Set([
1460
- "javascript",
1461
- "vbscript",
1462
- "livescript",
1463
- "jscript",
1464
- "mocha",
1465
- "data",
1466
- "mhtml",
1467
- "ms-its",
1468
- "mk",
1469
- "x-javascript",
1470
- "blob"
1471
- ]);
1472
- var IGNORABLE = new RegExp(
1473
- "[\\u0000-\\u0020\\u007f\\u00ad\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u2064\\ufeff]",
1474
- "gu"
1475
- );
1476
- var CONTROL = new RegExp("[\\u0000-\\u001f\\u007f]", "u");
1477
- var SCHEME = /^([a-z][a-z0-9+.-]*):/;
1478
- var STORE_ONLY = { store: true, open: false, reason: "not-openable" };
1479
- var reject = (reason) => ({
1480
- store: false,
1481
- open: false,
1482
- reason
1483
- });
1484
- function hyperlinkPolicy(href, options2 = {}) {
1485
- if (typeof href !== "string") return reject("empty");
1486
- const trimmed2 = href.trim();
1487
- const normalized = trimmed2.replace(IGNORABLE, "").toLowerCase();
1488
- if (normalized.length === 0) return reject("empty");
1489
- const scheme2 = SCHEME.exec(normalized)?.[1];
1490
- if (scheme2 !== void 0 && SCRIPT_SCHEMES.has(scheme2)) return reject("script-scheme");
1491
- if (scheme2 !== void 0 && !trimmed2.toLowerCase().startsWith(`${scheme2}:`))
1492
- return reject("obfuscated-scheme");
1493
- if (CONTROL.test(trimmed2)) return reject("control-characters");
1494
- if (scheme2 === void 0) return options2.openRelative ? { store: true, open: true } : STORE_ONLY;
1495
- if (scheme2.length === 1) return STORE_ONLY;
1496
- if (OPEN_SCHEMES.has(scheme2)) return { store: true, open: true };
1497
- if (options2.additionalOpenSchemes?.some((allowed) => allowed.toLowerCase() === scheme2))
1498
- return { store: true, open: true };
1499
- if (STORE_SCHEMES.has(scheme2)) return STORE_ONLY;
1500
- return reject("unsupported-scheme");
1501
- }
1502
1605
  var DEFAULT_ZIP_LIMITS = {
1503
1606
  maxInputBytes: 100 * 1024 * 1024,
1504
1607
  maxEntries: 1e4,
@@ -1721,6 +1824,58 @@ async function openZip(input2, limits = {}) {
1721
1824
  return guardZip(await JSZip.loadAsync(bytes), limits);
1722
1825
  }
1723
1826
 
1827
+ // opc/safe-href.ts
1828
+ var SAFE_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]);
1829
+ function isSafeHyperlinkHref(href) {
1830
+ const scheme2 = /^([a-z][a-z0-9+.-]*:)/i.exec(href.trim())?.[1];
1831
+ return scheme2 !== void 0 && SAFE_SCHEMES.has(scheme2.toLowerCase());
1832
+ }
1833
+ var OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
1834
+ var STORE_SCHEMES = /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
1835
+ var SCRIPT_SCHEMES = /* @__PURE__ */ new Set([
1836
+ "javascript",
1837
+ "vbscript",
1838
+ "livescript",
1839
+ "jscript",
1840
+ "mocha",
1841
+ "data",
1842
+ "mhtml",
1843
+ "ms-its",
1844
+ "mk",
1845
+ "x-javascript",
1846
+ "blob"
1847
+ ]);
1848
+ var IGNORABLE = new RegExp(
1849
+ "[\\u0000-\\u0020\\u007f\\u00ad\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u2064\\ufeff]",
1850
+ "gu"
1851
+ );
1852
+ var CONTROL = new RegExp("[\\u0000-\\u001f\\u007f]", "u");
1853
+ var SCHEME = /^([a-z][a-z0-9+.-]*):/;
1854
+ var STORE_ONLY = { store: true, open: false, reason: "not-openable" };
1855
+ var reject = (reason) => ({
1856
+ store: false,
1857
+ open: false,
1858
+ reason
1859
+ });
1860
+ function hyperlinkPolicy(href, options2 = {}) {
1861
+ if (typeof href !== "string") return reject("empty");
1862
+ const trimmed2 = href.trim();
1863
+ const normalized = trimmed2.replace(IGNORABLE, "").toLowerCase();
1864
+ if (normalized.length === 0) return reject("empty");
1865
+ const scheme2 = SCHEME.exec(normalized)?.[1];
1866
+ if (scheme2 !== void 0 && SCRIPT_SCHEMES.has(scheme2)) return reject("script-scheme");
1867
+ if (scheme2 !== void 0 && !trimmed2.toLowerCase().startsWith(`${scheme2}:`))
1868
+ return reject("obfuscated-scheme");
1869
+ if (CONTROL.test(trimmed2)) return reject("control-characters");
1870
+ if (scheme2 === void 0) return options2.openRelative ? { store: true, open: true } : STORE_ONLY;
1871
+ if (scheme2.length === 1) return STORE_ONLY;
1872
+ if (OPEN_SCHEMES.has(scheme2)) return { store: true, open: true };
1873
+ if (options2.additionalOpenSchemes?.some((allowed) => allowed.toLowerCase() === scheme2))
1874
+ return { store: true, open: true };
1875
+ if (STORE_SCHEMES.has(scheme2)) return STORE_ONLY;
1876
+ return reject("unsupported-scheme");
1877
+ }
1878
+
1724
1879
  // opc/properties/types.ts
1725
1880
  var CUSTOM_PROPERTIES_FMTID = "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}";
1726
1881
  var PROPERTY_PART_NAMES = {
@@ -4016,161 +4171,6 @@ function patchCommentMetadata(parts, identities) {
4016
4171
  return result2;
4017
4172
  }
4018
4173
 
4019
- // text/text-diff.ts
4020
- var isLowSurrogate = (text9, at3) => {
4021
- const code = text9.charCodeAt(at3);
4022
- return code >= 56320 && code <= 57343;
4023
- };
4024
- function shortestEdit(n, m, same17, maxEdits) {
4025
- const max = Math.min(n + m, maxEdits);
4026
- const offset2 = max + 1;
4027
- const v = new Int32Array(2 * max + 3);
4028
- const trace = [];
4029
- for (let d = 0; d <= max; d++) {
4030
- for (let k = -d; k <= d; k += 2) {
4031
- const down = k === -d || k !== d && v[offset2 + k - 1] < v[offset2 + k + 1];
4032
- let x = down ? v[offset2 + k + 1] : v[offset2 + k - 1] + 1;
4033
- let y = x - k;
4034
- while (x < n && y < m && same17(x, y)) {
4035
- x++;
4036
- y++;
4037
- }
4038
- v[offset2 + k] = x;
4039
- if (x >= n && y >= m) return backtrack(trace, n, m, d);
4040
- }
4041
- trace.push(v.slice(offset2 - d, offset2 + d + 1));
4042
- }
4043
- return void 0;
4044
- }
4045
- function backtrack(trace, n, m, d) {
4046
- const edits2 = [];
4047
- let x = n;
4048
- let y = m;
4049
- for (let step2 = d; step2 > 0; step2--) {
4050
- const previous = trace[step2 - 1];
4051
- const at3 = (k2) => previous[k2 + step2 - 1];
4052
- const k = x - y;
4053
- const down = k === -step2 || k !== step2 && at3(k - 1) < at3(k + 1);
4054
- const before = down ? k + 1 : k - 1;
4055
- const startX = at3(before);
4056
- const startY = startX - before;
4057
- edits2.push(down ? [startX, startY, true] : [startX, startY, false]);
4058
- x = startX;
4059
- y = startY;
4060
- }
4061
- return edits2.reverse();
4062
- }
4063
- function changesOf(edits2) {
4064
- const changes = [];
4065
- for (const [x, y, inserts] of edits2) {
4066
- const last = changes.at(-1);
4067
- if (last && last.fromEnd === x && last.toEnd === y) {
4068
- if (inserts) last.toEnd++;
4069
- else last.fromEnd++;
4070
- } else
4071
- changes.push({
4072
- fromStart: x,
4073
- fromEnd: inserts ? x : x + 1,
4074
- toStart: y,
4075
- toEnd: inserts ? y + 1 : y
4076
- });
4077
- }
4078
- return changes;
4079
- }
4080
- function characterChanges(a2, b, maxEdits) {
4081
- const edits2 = shortestEdit(
4082
- a2.length,
4083
- b.length,
4084
- (x, y) => a2.charCodeAt(x) === b.charCodeAt(y),
4085
- maxEdits
4086
- );
4087
- return edits2 && changesOf(edits2);
4088
- }
4089
- var TOKEN = /[\p{L}\p{N}\p{M}]+|\s+|[\s\S]/gu;
4090
- function tokensOf(text9, ids) {
4091
- const tokens3 = [];
4092
- const starts = [];
4093
- for (const match2 of text9.matchAll(TOKEN)) {
4094
- let id5 = ids.get(match2[0]);
4095
- if (id5 === void 0) ids.set(match2[0], id5 = ids.size);
4096
- tokens3.push(id5);
4097
- starts.push(match2.index);
4098
- }
4099
- starts.push(text9.length);
4100
- return { tokens: tokens3, starts };
4101
- }
4102
- function tokenChanges(a2, b, maxEdits) {
4103
- const ids = /* @__PURE__ */ new Map();
4104
- const from = tokensOf(a2, ids);
4105
- const to = tokensOf(b, ids);
4106
- const edits2 = shortestEdit(
4107
- from.tokens.length,
4108
- to.tokens.length,
4109
- (x, y) => from.tokens[x] === to.tokens[y],
4110
- maxEdits
4111
- );
4112
- if (!edits2) return void 0;
4113
- let budget = maxEdits;
4114
- return changesOf(edits2).flatMap((stretch) => {
4115
- const change = {
4116
- fromStart: from.starts[stretch.fromStart],
4117
- fromEnd: from.starts[stretch.fromEnd],
4118
- toStart: to.starts[stretch.toStart],
4119
- toEnd: to.starts[stretch.toEnd]
4120
- };
4121
- const inner2 = change.fromEnd > change.fromStart && change.toEnd > change.toStart ? characterChanges(
4122
- a2.slice(change.fromStart, change.fromEnd),
4123
- b.slice(change.toStart, change.toEnd),
4124
- budget
4125
- ) : void 0;
4126
- if (!inner2) return [change];
4127
- for (const found of inner2)
4128
- budget -= found.fromEnd - found.fromStart + found.toEnd - found.toStart;
4129
- return inner2.map((found) => ({
4130
- fromStart: found.fromStart + change.fromStart,
4131
- fromEnd: found.fromEnd + change.fromStart,
4132
- toStart: found.toStart + change.toStart,
4133
- toEnd: found.toEnd + change.toStart
4134
- }));
4135
- });
4136
- }
4137
- function diffText(from, to, maxEdits = 500) {
4138
- let start = 0;
4139
- while (start < from.length && start < to.length && from.charCodeAt(start) === to.charCodeAt(start))
4140
- start++;
4141
- let end = 0;
4142
- while (end < from.length - start && end < to.length - start && from.charCodeAt(from.length - 1 - end) === to.charCodeAt(to.length - 1 - end))
4143
- end++;
4144
- const a2 = from.slice(start, from.length - end);
4145
- const b = to.slice(start, to.length - end);
4146
- if (!a2.length && !b.length) return [];
4147
- const found = a2.length && b.length ? characterChanges(a2, b, maxEdits) ?? tokenChanges(a2, b, maxEdits) : void 0;
4148
- const changes = found ?? [{ fromStart: 0, fromEnd: a2.length, toStart: 0, toEnd: b.length }];
4149
- const result2 = [];
4150
- for (const change of changes) {
4151
- const placed = {
4152
- fromStart: change.fromStart + start,
4153
- fromEnd: change.fromEnd + start,
4154
- toStart: change.toStart + start,
4155
- toEnd: change.toEnd + start
4156
- };
4157
- if (placed.fromStart > 0 && placed.toStart > 0 && (isLowSurrogate(from, placed.fromStart) || isLowSurrogate(to, placed.toStart))) {
4158
- placed.fromStart--;
4159
- placed.toStart--;
4160
- }
4161
- if (isLowSurrogate(from, placed.fromEnd) || isLowSurrogate(to, placed.toEnd)) {
4162
- placed.fromEnd++;
4163
- placed.toEnd++;
4164
- }
4165
- const last = result2.at(-1);
4166
- if (last && placed.fromStart <= last.fromEnd) {
4167
- last.fromEnd = Math.max(last.fromEnd, placed.fromEnd);
4168
- last.toEnd = Math.max(last.toEnd, placed.toEnd);
4169
- } else result2.push(placed);
4170
- }
4171
- return result2;
4172
- }
4173
-
4174
4174
  // color/color-primitives.ts
4175
4175
  function clampUnitInterval(value3) {
4176
4176
  return Math.min(1, Math.max(0, value3));