@docx-editor.dev/core 2.35.1-canary.20261107032606.sha-f311676 → 2.36.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 (96) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/THIRD_PARTY_NOTICES.md +1 -0
  4. package/dist/automation.cjs +1 -1
  5. package/dist/automation.d.ts +6 -6
  6. package/dist/automation.js +1 -1
  7. package/dist/binding.cjs +1 -1
  8. package/dist/binding.d.ts +10 -10
  9. package/dist/binding.js +1 -1
  10. package/dist/{chrome-print-frlSW5kX.d.ts → chrome-print-B9U_PiqL.d.ts} +11 -11
  11. package/dist/{chunk-KW4N4X2I.js → chunk-2BVJFI6B.js} +1 -1
  12. package/dist/chunk-3DLIAAXE.js +2 -0
  13. package/dist/{chunk-TAOWVTAJ.js → chunk-3KSO2I22.js} +1 -1
  14. package/dist/chunk-4K5QXGVN.js +31 -0
  15. package/dist/{chunk-NQOYSP2W.cjs → chunk-4RDU6QVH.cjs} +1 -1
  16. package/dist/{chunk-25G7MCXJ.js → chunk-5JHQHJRH.js} +1 -1
  17. package/dist/{chunk-AIK7DFFL.cjs → chunk-5W6DLXVG.cjs} +2 -2
  18. package/dist/chunk-6VTHQTM3.js +1 -0
  19. package/dist/{chunk-7FWT66XR.js → chunk-7MOZVKCN.js} +61 -15
  20. package/dist/{chunk-5FKN45UM.cjs → chunk-7ZSPY7WH.cjs} +1 -1
  21. package/dist/chunk-BR7AQCGM.cjs +31 -0
  22. package/dist/{chunk-T7PBBAF3.cjs → chunk-D75AXVLG.cjs} +1 -1
  23. package/dist/chunk-DZO5K26E.js +1 -0
  24. package/dist/{chunk-DRGBBK33.js → chunk-HLMY6NFI.js} +1 -1
  25. package/dist/{chunk-D6YDTLDE.cjs → chunk-I34OVDHO.cjs} +1 -1
  26. package/dist/{chunk-NWZCPQU3.cjs → chunk-IMTQS6N5.cjs} +1 -1
  27. package/dist/{chunk-VD4VYLVD.js → chunk-K3UKJU4K.js} +1 -1
  28. package/dist/chunk-K5FZYV6Z.cjs +32 -0
  29. package/dist/{chunk-AUA2N766.cjs → chunk-MK4MO7RT.cjs} +4 -4
  30. package/dist/chunk-N5RYSQN5.js +4 -0
  31. package/dist/{chunk-MM2ITK3V.cjs → chunk-NTDLU6W6.cjs} +1 -1
  32. package/dist/{chunk-4XW23PN4.js → chunk-O2AEJ5T4.js} +5 -5
  33. package/dist/chunk-PSVIEQUU.js +32 -0
  34. package/dist/{chunk-KOXHAXYL.cjs → chunk-PXF5BBEK.cjs} +1 -1
  35. package/dist/{chunk-CXYMH5X3.cjs → chunk-QTRRXJXQ.cjs} +2 -2
  36. package/dist/chunk-R42NW5FO.js +7 -0
  37. package/dist/{chunk-CL45YKNO.cjs → chunk-TCWCSTAF.cjs} +61 -15
  38. package/dist/{chunk-3XR5QVD7.js → chunk-VS2MXS62.js} +1 -1
  39. package/dist/{chunk-7TPI56PF.cjs → chunk-XFDDD65J.cjs} +3 -3
  40. package/dist/{chunk-O6XLJMDD.cjs → chunk-XTNY4DBY.cjs} +5 -5
  41. package/dist/collaboration/replication.cjs +1 -1
  42. package/dist/collaboration/replication.d.ts +2 -2
  43. package/dist/collaboration/replication.js +1 -1
  44. package/dist/contracts/document.d.ts +2 -2
  45. package/dist/contracts/editor.d.ts +8 -8
  46. package/dist/contracts/modules.d.ts +9 -9
  47. package/dist/contracts/types.d.ts +3 -3
  48. package/dist/{custom-node-writes-foMPvlTD.d.ts → custom-node-writes-DqzeiTpY.d.ts} +2 -2
  49. package/dist/{document-protection-DnQZYTwF.d.ts → document-protection-CGnc6WX7.d.ts} +1 -1
  50. package/dist/{drawing-graphic-kind-BIoQFZrI.d.ts → drawing-graphic-kind-Dw4Qu9VA.d.ts} +2 -2
  51. package/dist/{drawing-preview-package-7J82L5Xy.d.ts → drawing-preview-package-BuFluWSg.d.ts} +1 -1
  52. package/dist/{editor-BhqFYneD.d.ts → editor-CoU0Ipa9.d.ts} +4 -4
  53. package/dist/editor.cjs +1 -1
  54. package/dist/editor.d.ts +23 -23
  55. package/dist/editor.js +1 -1
  56. package/dist/export.cjs +2 -2
  57. package/dist/export.d.ts +2 -2
  58. package/dist/export.js +1 -1
  59. package/dist/index.cjs +1 -1
  60. package/dist/index.d.ts +17 -17
  61. package/dist/index.js +1 -1
  62. package/dist/{layout-shaping-DXPwoIso.d.ts → layout-shaping-B7ifvgm-.d.ts} +1 -1
  63. package/dist/layout.cjs +1 -1
  64. package/dist/layout.d.ts +14 -14
  65. package/dist/layout.js +1 -1
  66. package/dist/{note-properties-BDgDUAmT.d.ts → note-properties-CrO9A0Ju.d.ts} +1 -1
  67. package/dist/output.cjs +1 -1
  68. package/dist/output.d.ts +9 -9
  69. package/dist/output.js +1 -1
  70. package/dist/{protocol-dMJEjvEi.d.ts → protocol-C-LfGgrt.d.ts} +2 -2
  71. package/dist/{review-paragraph-order-BmgDotRY.d.ts → review-paragraph-order-gZ8-oIWd.d.ts} +1 -1
  72. package/dist/{revision-projection-DSLY04vl.d.ts → revision-projection-BAUauksK.d.ts} +1 -1
  73. package/dist/{semantic-cell-selection-T7s8b3vK.d.ts → semantic-cell-selection--xgumqWx.d.ts} +2 -2
  74. package/dist/{semantic-interaction-DLPM8ueg.d.ts → semantic-interaction-B_AAT9S2.d.ts} +1 -1
  75. package/dist/{semantic-paint-BX7hBYOC.d.ts → semantic-paint-Cl4VyItm.d.ts} +4 -4
  76. package/dist/{semantic-record-queries-BLaaraNm.d.ts → semantic-record-queries-BKX8sDqa.d.ts} +1 -1
  77. package/dist/{semantic-records-DxgvgIGt.d.ts → semantic-records-DkDc4E1z.d.ts} +3 -3
  78. package/dist/store.cjs +1 -1
  79. package/dist/store.d.ts +22 -13
  80. package/dist/store.js +1 -1
  81. package/dist/{tree-op-types-BLDFv_NV.d.ts → tree-op-types-BJTz6t_O.d.ts} +2 -2
  82. package/dist/{tree-package-fragment-jc2kJiQD.d.ts → tree-package-fragment-DDV5xjSI.d.ts} +1 -1
  83. package/dist/{tree-session-contract-DUYKsb8S.d.ts → tree-session-contract-CAsZn-VN.d.ts} +4 -4
  84. package/dist/{unsupported-elements-_Nj_3Lu4.d.ts → unsupported-elements-1Tj829Bk.d.ts} +1 -1
  85. package/licenses/ECMA-376.md +7 -2
  86. package/licenses/MaterialSymbols-NOTICE.md +186 -0
  87. package/package.json +3 -3
  88. package/dist/chunk-3INOXFU2.js +0 -31
  89. package/dist/chunk-CJGWMTMF.cjs +0 -31
  90. package/dist/chunk-CYEULHNE.js +0 -7
  91. package/dist/chunk-DTVCCT7X.cjs +0 -32
  92. package/dist/chunk-KCTAD66K.js +0 -1
  93. package/dist/chunk-P5YX3TF4.js +0 -4
  94. package/dist/chunk-TKKLCG4B.js +0 -2
  95. package/dist/chunk-U2IN573J.js +0 -32
  96. package/dist/chunk-ZCKBZU4R.js +0 -1
package/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2026 EigenPal Inc.
189
+ Copyright 2026 Eigenpal, Inc.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -141,4 +141,4 @@ This package ships the task recipes in [`docs/index.md`](./docs/index.md). They
141
141
 
142
142
  ## License
143
143
 
144
- Apache-2.0
144
+ Apache-2.0. See [LICENSE](LICENSE). The tables derived from ECMA-376 are used under the Ecma copyright notice, not Apache-2.0. Other third-party material keeps its own terms. See [`licenses/`](licenses) and `THIRD_PARTY_NOTICES.md`.
@@ -21,6 +21,7 @@ so they cannot appear below. Their licenses travel with the package in
21
21
 
22
22
  - `licenses/ECMA-376.md`
23
23
  - `licenses/HarfBuzz-COPYING.txt`
24
+ - `licenses/MaterialSymbols-NOTICE.md`
24
25
 
25
26
  ## Bundled packages
26
27
 
@@ -1 +1 @@
1
- 'use strict';var chunkAUA2N766_cjs=require('./chunk-AUA2N766.cjs');require('./chunk-T7PBBAF3.cjs'),require('./chunk-DTVCCT7X.cjs'),require('./chunk-5FKN45UM.cjs'),require('./chunk-NQOYSP2W.cjs'),require('./chunk-MM2ITK3V.cjs'),require('./chunk-CXYMH5X3.cjs'),require('./chunk-D6YDTLDE.cjs'),require('./chunk-CL45YKNO.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkAUA2N766_cjs.m}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkAUA2N766_cjs.l}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkAUA2N766_cjs.n}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkAUA2N766_cjs.k}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkAUA2N766_cjs.v}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunkAUA2N766_cjs.E}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunkAUA2N766_cjs.F}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkAUA2N766_cjs.t}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunkAUA2N766_cjs.G}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunkAUA2N766_cjs.w}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunkAUA2N766_cjs.I}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkAUA2N766_cjs.H}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkAUA2N766_cjs.z}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunkAUA2N766_cjs.L}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunkAUA2N766_cjs.M}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunkAUA2N766_cjs.K}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkAUA2N766_cjs.y}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkAUA2N766_cjs.p}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkAUA2N766_cjs.o}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunkAUA2N766_cjs.A}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkAUA2N766_cjs.r}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunkAUA2N766_cjs.C}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunkAUA2N766_cjs.D}});Object.defineProperty(exports,"reviewSkipOfReason",{enumerable:true,get:function(){return chunkAUA2N766_cjs.J}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunkAUA2N766_cjs.B}});
1
+ 'use strict';var chunkMK4MO7RT_cjs=require('./chunk-MK4MO7RT.cjs');require('./chunk-D75AXVLG.cjs'),require('./chunk-K5FZYV6Z.cjs'),require('./chunk-7ZSPY7WH.cjs'),require('./chunk-4RDU6QVH.cjs'),require('./chunk-NTDLU6W6.cjs'),require('./chunk-QTRRXJXQ.cjs'),require('./chunk-I34OVDHO.cjs'),require('./chunk-TCWCSTAF.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.m}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.l}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.n}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.k}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.v}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.E}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.F}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.t}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.G}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.w}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.I}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.H}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.z}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.L}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.M}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.K}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.y}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.p}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.o}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.A}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.r}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.C}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.D}});Object.defineProperty(exports,"reviewSkipOfReason",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.J}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.B}});
@@ -11,13 +11,13 @@
11
11
  * @packageDocumentation
12
12
  * @public
13
13
  */
14
- import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-dMJEjvEi.js';
15
- export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as AutomationStyleKind, T as AutomationStyleRead, U as AutomationTextProjection, V as AutomationUnsubscribe, W as AutomationValue } from './protocol-dMJEjvEi.js';
16
- import { C as ContentLockPolicy } from './tree-package-fragment-jc2kJiQD.js';
14
+ import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-C-LfGgrt.js';
15
+ export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as AutomationStyleKind, T as AutomationStyleRead, U as AutomationTextProjection, V as AutomationUnsubscribe, W as AutomationValue } from './protocol-C-LfGgrt.js';
16
+ import { C as ContentLockPolicy } from './tree-package-fragment-DDV5xjSI.js';
17
17
  import { HeaderFooterVariant, NoteKind } from './store.js';
18
- import { C as CompareDocumentsEngine } from './tree-op-types-BLDFv_NV.js';
18
+ import { C as CompareDocumentsEngine } from './tree-op-types-BJTz6t_O.js';
19
19
  import { OoxmlPackageLimits, OoxmlPackageRejection } from './store.js';
20
- export { aR as AutomationTableMutation, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, n as CompareDocumentsRefusalReason, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal } from './tree-op-types-BLDFv_NV.js';
20
+ export { aR as AutomationTableMutation, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, n as CompareDocumentsRefusalReason, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal } from './tree-op-types-BJTz6t_O.js';
21
21
  import { TextMeasurer } from './editor.js';
22
22
  import { SemanticLayout } from './layout.js';
23
23
  import { HeadlessDocumentView } from './store.js';
@@ -25,7 +25,7 @@ import { CollaborationModuleContribution } from './collaboration.js';
25
25
  export { D as DiagnosticEmitter, a as DiagnosticPayload, b as byteSizeBucket, c as countBucket, e as createDiagnosticEmitter, f as diagnosticCause, d as diagnosticCauses, g as diagnosticErrorName, h as documentPartKind, i as exceptionCause, o as openDiagnosticCode, r as reviewCodeOfSkip, j as reviewDiagnosticCode, k as reviewSkipOfReason, s as storeEditDiagnosticCode } from './diagnostic-context-CBu1Cm4A.js';
26
26
  export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, a as CountBucket, b as CustomNodeDiagnosticCode, D as DiagnosticCode, c as DiagnosticErrorName, d as DiagnosticExplanation, e as DocumentOpenDiagnosticCode, f as DocumentPartKind, g as DocumentSaveDiagnosticCode, E as EditDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, j as ReviewChangeKind, R as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-BTyb8yzX.js';
27
27
  export { c as HistoryGroup, H as HistoryGroupOutcome } from './editor-scope-CA6egMaK.js';
28
- import './revision-projection-DSLY04vl.js';
28
+ import './revision-projection-BAUauksK.js';
29
29
  import './collaboration/replication.js';
30
30
  import './failure-6KGFrDO9.js';
31
31
 
@@ -1 +1 @@
1
- export{m as AUTOMATION_COMMAND_OPERATIONS,l as AUTOMATION_QUERY_OPERATIONS,n as AUTOMATION_SOLITARY_OPERATIONS,k as HEADER_FOOTER_VARIANTS,v as SERVER_AUTOMATION_CAPABILITIES,E as byteSizeBucket,F as countBucket,t as createAutomationPaginationProvider,G as createDiagnosticEmitter,w as createServerAutomationHost,I as diagnosticCause,H as diagnosticCauses,z as diagnosticCodes,L as diagnosticErrorName,M as documentPartKind,K as exceptionCause,y as explainDiagnostic,p as isAutomationCommand,o as isSolitaryAutomationCommand,A as openDiagnosticCode,r as paginationSnapshotOf,C as reviewCodeOfSkip,D as reviewDiagnosticCode,J as reviewSkipOfReason,B as storeEditDiagnosticCode}from'./chunk-CYEULHNE.js';import'./chunk-ZCKBZU4R.js';import'./chunk-U2IN573J.js';import'./chunk-VD4VYLVD.js';import'./chunk-3XR5QVD7.js';import'./chunk-KW4N4X2I.js';import'./chunk-P5YX3TF4.js';import'./chunk-DRGBBK33.js';import'./chunk-7FWT66XR.js';
1
+ export{m as AUTOMATION_COMMAND_OPERATIONS,l as AUTOMATION_QUERY_OPERATIONS,n as AUTOMATION_SOLITARY_OPERATIONS,k as HEADER_FOOTER_VARIANTS,v as SERVER_AUTOMATION_CAPABILITIES,E as byteSizeBucket,F as countBucket,t as createAutomationPaginationProvider,G as createDiagnosticEmitter,w as createServerAutomationHost,I as diagnosticCause,H as diagnosticCauses,z as diagnosticCodes,L as diagnosticErrorName,M as documentPartKind,K as exceptionCause,y as explainDiagnostic,p as isAutomationCommand,o as isSolitaryAutomationCommand,A as openDiagnosticCode,r as paginationSnapshotOf,C as reviewCodeOfSkip,D as reviewDiagnosticCode,J as reviewSkipOfReason,B as storeEditDiagnosticCode}from'./chunk-R42NW5FO.js';import'./chunk-DZO5K26E.js';import'./chunk-PSVIEQUU.js';import'./chunk-K3UKJU4K.js';import'./chunk-VS2MXS62.js';import'./chunk-2BVJFI6B.js';import'./chunk-N5RYSQN5.js';import'./chunk-HLMY6NFI.js';import'./chunk-7MOZVKCN.js';
package/dist/binding.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkO6XLJMDD_cjs=require('./chunk-O6XLJMDD.cjs');require('./chunk-NWZCPQU3.cjs'),require('./chunk-5FKN45UM.cjs'),require('./chunk-NQOYSP2W.cjs'),require('./chunk-MM2ITK3V.cjs'),require('./chunk-CXYMH5X3.cjs'),require('./chunk-D6YDTLDE.cjs'),require('./chunk-CL45YKNO.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.o}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.p}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.m}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkO6XLJMDD_cjs.e}});
1
+ 'use strict';var chunkXTNY4DBY_cjs=require('./chunk-XTNY4DBY.cjs');require('./chunk-IMTQS6N5.cjs'),require('./chunk-7ZSPY7WH.cjs'),require('./chunk-4RDU6QVH.cjs'),require('./chunk-NTDLU6W6.cjs'),require('./chunk-QTRRXJXQ.cjs'),require('./chunk-I34OVDHO.cjs'),require('./chunk-TCWCSTAF.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.o}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.p}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.m}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkXTNY4DBY_cjs.e}});
package/dist/binding.d.ts CHANGED
@@ -10,27 +10,27 @@
10
10
  */
11
11
  import { Node, Schema } from 'prosemirror-model';
12
12
  import { OoxmlProperty, OoxmlPackageResult, OoxmlPackageRejection } from './store.js';
13
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DUYKsb8S.js';
14
- export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-DUYKsb8S.js';
13
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-CAsZn-VN.js';
14
+ export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-CAsZn-VN.js';
15
15
  import { ContentLockPolicy } from './automation.js';
16
- export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-jc2kJiQD.js';
16
+ export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-DDV5xjSI.js';
17
17
  import { ReviewModuleContribution } from './contracts/modules.js';
18
18
  import { EditorView } from 'prosemirror-view';
19
19
  import './editor-scope-CA6egMaK.js';
20
- import './custom-node-writes-foMPvlTD.js';
21
- import './drawing-graphic-kind-BIoQFZrI.js';
20
+ import './custom-node-writes-DqzeiTpY.js';
21
+ import './drawing-graphic-kind-Dw4Qu9VA.js';
22
22
  import './collaboration/replication.js';
23
- import './revision-projection-DSLY04vl.js';
23
+ import './revision-projection-BAUauksK.js';
24
24
  import './contracts/types.js';
25
25
  import './failure-6KGFrDO9.js';
26
- import './document-protection-DnQZYTwF.js';
27
- import './editor-BhqFYneD.js';
26
+ import './document-protection-CGnc6WX7.js';
27
+ import './editor-CoU0Ipa9.js';
28
28
  import './editor-fonts-D_-vjuJi.js';
29
29
  import './diagnostic-hints-BTyb8yzX.js';
30
30
  import './contracts/document.js';
31
31
  import './contracts/interaction.js';
32
- import './semantic-interaction-DLPM8ueg.js';
33
- import './semantic-records-DxgvgIGt.js';
32
+ import './semantic-interaction-B_AAT9S2.js';
33
+ import './semantic-records-DkDc4E1z.js';
34
34
  import './collaboration.js';
35
35
 
36
36
  /** Attributes carried by a projected paragraph. */
package/dist/binding.js CHANGED
@@ -1 +1 @@
1
- export{o as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,p as mountTreeSurface,m as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-4XW23PN4.js';import'./chunk-KCTAD66K.js';import'./chunk-VD4VYLVD.js';import'./chunk-3XR5QVD7.js';import'./chunk-KW4N4X2I.js';import'./chunk-P5YX3TF4.js';import'./chunk-DRGBBK33.js';import'./chunk-7FWT66XR.js';
1
+ export{o as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,p as mountTreeSurface,m as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-O2AEJ5T4.js';import'./chunk-6VTHQTM3.js';import'./chunk-K3UKJU4K.js';import'./chunk-VS2MXS62.js';import'./chunk-2BVJFI6B.js';import'./chunk-N5RYSQN5.js';import'./chunk-HLMY6NFI.js';import'./chunk-7MOZVKCN.js';
@@ -1,21 +1,21 @@
1
1
  import { d as FontOrigin, M as MarkedFontResolver, c as FontConfigurationFragment, g as FontResolver, f as FontResolutionRequest } from './font-resolver-Bm9XqTNO.js';
2
2
  import { F as FontConfiguration, a as FontFaceRequest, b as FontSource } from './editor-fonts-D_-vjuJi.js';
3
- import { aO as TreeDocOp, bn as TextFormFieldRange, bo as TextFormFieldOptions, aw as ImageDecodePort, aH as Unsubscribe, ao as CompareDocumentsChromeHandlers, E as ExecResult, at as DrawingPositionInput, bh as DrawingTransform, a3 as ParagraphTabStop, Z as IndentFormatting, a2 as ParagraphFlags, a1 as ParagraphDisagreements, b9 as DrawingTreeDocOp, aG as SupportedImageMime, aF as SelectionPin, r as OoxmlPackage, x as ReviewRevisionKind, b0 as PackageWatermarkWrite, az as ImageWrapTarget } from './tree-op-types-BLDFv_NV.js';
3
+ import { aO as TreeDocOp, bn as TextFormFieldRange, bo as TextFormFieldOptions, aw as ImageDecodePort, aH as Unsubscribe, ao as CompareDocumentsChromeHandlers, E as ExecResult, at as DrawingPositionInput, bh as DrawingTransform, a3 as ParagraphTabStop, Z as IndentFormatting, a2 as ParagraphFlags, a1 as ParagraphDisagreements, b9 as DrawingTreeDocOp, aG as SupportedImageMime, aF as SelectionPin, r as OoxmlPackage, x as ReviewRevisionKind, b0 as PackageWatermarkWrite, az as ImageWrapTarget } from './tree-op-types-BJTz6t_O.js';
4
4
  import { V as ViewScope, a as EditorExecOptions } from './editor-scope-CA6egMaK.js';
5
- import { aJ as TableInteractionLabelKey, e as BookmarkStory, u as DocumentSource, aR as ZoomMode, J as EditorFontError, x as Editor, b as EditorCommand, C as CanResult, ax as SelectedImageState, _ as FormatPainterSurfaceState, f as BookmarkSummary, av as ScrollPlacement, aP as TrackedChangePredicate, aO as TrackedChangeFilterMode, a9 as ImageContext, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aI as TableContext, W as EditorSnapshot } from './editor-BhqFYneD.js';
6
- import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-DSLY04vl.js';
7
- import { T as TextMeasurer, i as UnsupportedElementRule, S as SemanticLayout, C as ContentControlBoundaryRecord, t as SectionProperties } from './semantic-records-DxgvgIGt.js';
8
- import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-fragment-jc2kJiQD.js';
5
+ import { aJ as TableInteractionLabelKey, e as BookmarkStory, u as DocumentSource, aR as ZoomMode, J as EditorFontError, x as Editor, b as EditorCommand, C as CanResult, ax as SelectedImageState, _ as FormatPainterSurfaceState, f as BookmarkSummary, av as ScrollPlacement, aP as TrackedChangePredicate, aO as TrackedChangeFilterMode, a9 as ImageContext, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aI as TableContext, W as EditorSnapshot } from './editor-CoU0Ipa9.js';
6
+ import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-BAUauksK.js';
7
+ import { T as TextMeasurer, i as UnsupportedElementRule, S as SemanticLayout, C as ContentControlBoundaryRecord, t as SectionProperties } from './semantic-records-DkDc4E1z.js';
8
+ import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-fragment-DDV5xjSI.js';
9
9
  import { ReviewPaneOptions } from './contracts/types.js';
10
10
  import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
11
11
  import { CollaborationModuleContribution, EditorCollaborationSession, CollaborationRemoteSelection } from './collaboration.js';
12
- import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-BX7hBYOC.js';
12
+ import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-Cl4VyItm.js';
13
13
  import { ReviewModuleContribution, EditorModule } from './contracts/modules.js';
14
- import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-DLPM8ueg.js';
15
- import { C as CellSelection } from './semantic-cell-selection-T7s8b3vK.js';
16
- import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-BDgDUAmT.js';
17
- import { B as BookmarkIndex } from './custom-node-writes-foMPvlTD.js';
18
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DUYKsb8S.js';
14
+ import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-B_AAT9S2.js';
15
+ import { C as CellSelection } from './semantic-cell-selection--xgumqWx.js';
16
+ import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-CrO9A0Ju.js';
17
+ import { B as BookmarkIndex } from './custom-node-writes-DqzeiTpY.js';
18
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-CAsZn-VN.js';
19
19
  import { a as CollaborationStatus } from './failure-6KGFrDO9.js';
20
20
 
21
21
  /**
@@ -1 +1 @@
1
- import {mh,ah,Xg,nh,bh,dh,oh,lh,Tb,Yl}from'./chunk-7FWT66XR.js';var w=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,j="Cambria";function $(e){return e!==void 0&&e.trim().length>0&&w.test(e)?e:null}function Q(e){if(e===void 0||e.trim().length===0)return null;if(e.length>1024)return j;let n=v(e);return n.length===0?null:w.test(n)?n:n.startsWith("@")||n.startsWith("\uFF20")?n.length<=128?n:null:j}function Z(e){return e===void 0||e.length>1024?null:$(v(e))}function v(e){let n=e.indexOf(",");return (n<0?e:e.slice(0,n)).trim()}function W(e){return e.kind!=="textValue"}function S(e,n){for(let l of e.children)if(W(l)&&l.localName===n)return l}function V(e,n){return e.attributes.find(l=>l.localName===n)?.value}function ne(e){let n=S(e,"pPr"),l=n?S(n,"outlineLvl"):void 0;if(l){let o=V(l,"val");return o!==void 0&&/^[0-8]$/.test(o)?Number(o):null}let t=S(e,"name"),i=t?/^heading\s+([1-9])$/i.exec(V(t,"val")?.trim()??""):null;return i?Number(i[1])-1:null}function R(e,n=0,l=e.length,t){let i=new Set,o=new Map,d=new Map,u=t?[t]:[];t&&i.add(t);for(let s=n;s<l;s+=1){let r=e[s].node;if(ah(r,"begin")){u.push(r.id);continue}if(ah(r,"separate")){let a=u[u.length-1];a&&(i.add(a),o.set(r.id,a));continue}if(ah(r,"end")){let a=u.pop();a&&(i.add(a),d.set(r.id,a));}}return {activeBegins:i,separateBegin:o,endBegin:d}}function b(e,n,l){if(ah(l,"begin"))return n.activeBegins.has(l.id)&&e.push({beginId:l.id,separated:false}),true;if(ah(l,"separate")){let t=n.separateBegin.get(l.id),i=e[e.length-1];return t&&i?.beginId===t&&(i.separated=true),true}if(ah(l,"end")){let t=n.endBegin.get(l.id),i=e[e.length-1];return t&&i?.beginId===t&&e.pop(),true}return false}function g(e){for(let n of e)if(!n.separated)return false;return true}function ie(e,n){let l=[];mh(e,l,n);let t=R(l),i=[];return {consume:o=>b(i,t,o),visible:()=>g(i)}}function C(e,n){return e==="original"?n.hiddenInOriginal:e==="current"&&n.hiddenInCurrent}var U=4096,H=nh*16;function k(){return {out:[],runs:[],symbols:[],symbolDisplays:[],length:0}}function X(e,n,l,t){if(n.length===0||l===t)return;let i=e.runs[e.runs.length-1];if(i?.runId===n&&i.end===l){e.runs[e.runs.length-1]={runId:n,start:i.start,end:t};return}e.runs.push({runId:n,start:l,end:t});}function O(e,n,l,t){let i=lh(n);if(i.length>t.left)return false;if(t.left-=i.length,i.length>0){let o=e.length;Tb(n)&&(e.symbols.push(o),e.symbolDisplays.push(Yl(n))),e.out.push(i),e.length+=i.length,X(e,l,o,e.length);}return true}function z(e,n){let l=e.length;n.text.length>0&&e.out.push(n.text),e.length+=n.text.length;for(let t of n.runs)X(e,t.runId,l+t.start,l+t.end);for(let t of n.symbols??[])e.symbols.push(l+t);for(let t of n.symbolDisplays??[])e.symbolDisplays.push(t);}function T(e){let n=e.out.join("");return e.symbols.length>0?{text:n,runs:e.runs,symbols:e.symbols,symbolDisplays:e.symbolDisplays}:{text:n,runs:e.runs}}var G=Object.freeze({text:"",runs:[]});function M(){return {text:Xg,runs:[]}}function q(e,n,l,t){let i=[];if(!mh(e,i,l))return null;let o=i.reverse(),d=k();for(;o.length>0;){let u=o.pop();if(!C(n,u)){if(dh(u.node)){let s=[];if(!mh(u.node,s,l))return null;for(let r=s.length-1;r>=0;r-=1)o.push(s[r]);continue}if(!bh(u.node)&&!O(d,u.node,u.runId,t))return null}}return T(d)}function J(e,n,l,t,i){let o=k(),d=[],u=R(e);for(let s of e){let r=s.node;if(!b(d,u,r)&&!bh(r)&&g(d)&&!C(n,s)){if(dh(r)){let a=i>=oh?q(r,n,l,t):Y(r,n,l,t,i+1);if(a===null)return null;z(o,a);continue}if(!O(o,r,s.runId,t))return null}}return T(o)}function Y(e,n,l,t,i){let o=[];return mh(e,o,l)?J(o,n,l,t,i):null}function K(e,n,l){let t=n.node;return e.owned.has(t.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),t.id===e.endId?true:(t.id===e.span.node.id||b(e.states,e.markers,t)||e.overflow||bh(t)||dh(t)||!e.owned.has(t.id)||!g(e.states)||C(l,n)||O(e.result,t,n.runId,e.chars)||(e.overflow=true),false)}function ae(e,n,l="allMarkup"){let t=new Map,i=new Map,o=new Map;for(let r of n)r.kind==="complex"?i.set(r.node.id,r):o.set(r.node.id,r);let d=[];mh(e,d);let u=new Map;for(let r=0;r<d.length;r+=1)u.set(d[r].node.id,r);let s=null;for(let r=0;r<d.length;r+=1){let a=d[r],y=o.get(a.node.id);if(y)if(s!==null&&!g(s.states))t.set(y.node.id,G);else {let f={left:U},I={left:H},m=Y(y.node,l,f,I,0);t.set(y.node.id,m??M());}if(s===null){let f=i.get(a.node.id);if(!f)continue;let I=new Set(f.removeNodeIds),m=-1;for(let N=f.removeNodeIds.length-1;N>=0;N-=1){let F=u.get(f.removeNodeIds[N]);if(!(F===void 0||F<=r)&&ah(d[F].node,"end")){m=F;break}}let E=d[m];if(!E){t.set(f.node.id,M());continue}s={span:f,owned:I,states:[{beginId:f.node.id,separated:false}],markers:R(d,r+1,m,f.node.id),endId:E.node.id,result:k(),chars:{left:H},nodesLeft:U,overflow:false};}K(s,a,l)&&(t.set(s.span.node.id,s.overflow?M():T(s.result)),s=null);}return s!==null&&t.set(s.span.node.id,M()),t}export{$ as a,Q as b,Z as c,ie as d,U as e,ae as f,ne as g};
1
+ import {nh,bh,Yg,oh,ch,eh,ph,mh,Tb,Zl}from'./chunk-7MOZVKCN.js';var w=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,j="Cambria";function $(e){return e!==void 0&&e.trim().length>0&&w.test(e)?e:null}function Q(e){if(e===void 0||e.trim().length===0)return null;if(e.length>1024)return j;let n=v(e);return n.length===0?null:w.test(n)?n:n.startsWith("@")||n.startsWith("\uFF20")?n.length<=128?n:null:j}function Z(e){return e===void 0||e.length>1024?null:$(v(e))}function v(e){let n=e.indexOf(",");return (n<0?e:e.slice(0,n)).trim()}function W(e){return e.kind!=="textValue"}function S(e,n){for(let l of e.children)if(W(l)&&l.localName===n)return l}function V(e,n){return e.attributes.find(l=>l.localName===n)?.value}function ne(e){let n=S(e,"pPr"),l=n?S(n,"outlineLvl"):void 0;if(l){let o=V(l,"val");return o!==void 0&&/^[0-8]$/.test(o)?Number(o):null}let t=S(e,"name"),i=t?/^heading\s+([1-9])$/i.exec(V(t,"val")?.trim()??""):null;return i?Number(i[1])-1:null}function R(e,n=0,l=e.length,t){let i=new Set,o=new Map,d=new Map,u=t?[t]:[];t&&i.add(t);for(let s=n;s<l;s+=1){let r=e[s].node;if(bh(r,"begin")){u.push(r.id);continue}if(bh(r,"separate")){let a=u[u.length-1];a&&(i.add(a),o.set(r.id,a));continue}if(bh(r,"end")){let a=u.pop();a&&(i.add(a),d.set(r.id,a));}}return {activeBegins:i,separateBegin:o,endBegin:d}}function b(e,n,l){if(bh(l,"begin"))return n.activeBegins.has(l.id)&&e.push({beginId:l.id,separated:false}),true;if(bh(l,"separate")){let t=n.separateBegin.get(l.id),i=e[e.length-1];return t&&i?.beginId===t&&(i.separated=true),true}if(bh(l,"end")){let t=n.endBegin.get(l.id),i=e[e.length-1];return t&&i?.beginId===t&&e.pop(),true}return false}function g(e){for(let n of e)if(!n.separated)return false;return true}function ie(e,n){let l=[];nh(e,l,n);let t=R(l),i=[];return {consume:o=>b(i,t,o),visible:()=>g(i)}}function C(e,n){return e==="original"?n.hiddenInOriginal:e==="current"&&n.hiddenInCurrent}var U=4096,H=oh*16;function k(){return {out:[],runs:[],symbols:[],symbolDisplays:[],length:0}}function X(e,n,l,t){if(n.length===0||l===t)return;let i=e.runs[e.runs.length-1];if(i?.runId===n&&i.end===l){e.runs[e.runs.length-1]={runId:n,start:i.start,end:t};return}e.runs.push({runId:n,start:l,end:t});}function O(e,n,l,t){let i=mh(n);if(i.length>t.left)return false;if(t.left-=i.length,i.length>0){let o=e.length;Tb(n)&&(e.symbols.push(o),e.symbolDisplays.push(Zl(n))),e.out.push(i),e.length+=i.length,X(e,l,o,e.length);}return true}function z(e,n){let l=e.length;n.text.length>0&&e.out.push(n.text),e.length+=n.text.length;for(let t of n.runs)X(e,t.runId,l+t.start,l+t.end);for(let t of n.symbols??[])e.symbols.push(l+t);for(let t of n.symbolDisplays??[])e.symbolDisplays.push(t);}function T(e){let n=e.out.join("");return e.symbols.length>0?{text:n,runs:e.runs,symbols:e.symbols,symbolDisplays:e.symbolDisplays}:{text:n,runs:e.runs}}var G=Object.freeze({text:"",runs:[]});function M(){return {text:Yg,runs:[]}}function q(e,n,l,t){let i=[];if(!nh(e,i,l))return null;let o=i.reverse(),d=k();for(;o.length>0;){let u=o.pop();if(!C(n,u)){if(eh(u.node)){let s=[];if(!nh(u.node,s,l))return null;for(let r=s.length-1;r>=0;r-=1)o.push(s[r]);continue}if(!ch(u.node)&&!O(d,u.node,u.runId,t))return null}}return T(d)}function J(e,n,l,t,i){let o=k(),d=[],u=R(e);for(let s of e){let r=s.node;if(!b(d,u,r)&&!ch(r)&&g(d)&&!C(n,s)){if(eh(r)){let a=i>=ph?q(r,n,l,t):Y(r,n,l,t,i+1);if(a===null)return null;z(o,a);continue}if(!O(o,r,s.runId,t))return null}}return T(o)}function Y(e,n,l,t,i){let o=[];return nh(e,o,l)?J(o,n,l,t,i):null}function K(e,n,l){let t=n.node;return e.owned.has(t.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),t.id===e.endId?true:(t.id===e.span.node.id||b(e.states,e.markers,t)||e.overflow||ch(t)||eh(t)||!e.owned.has(t.id)||!g(e.states)||C(l,n)||O(e.result,t,n.runId,e.chars)||(e.overflow=true),false)}function ae(e,n,l="allMarkup"){let t=new Map,i=new Map,o=new Map;for(let r of n)r.kind==="complex"?i.set(r.node.id,r):o.set(r.node.id,r);let d=[];nh(e,d);let u=new Map;for(let r=0;r<d.length;r+=1)u.set(d[r].node.id,r);let s=null;for(let r=0;r<d.length;r+=1){let a=d[r],y=o.get(a.node.id);if(y)if(s!==null&&!g(s.states))t.set(y.node.id,G);else {let f={left:U},I={left:H},m=Y(y.node,l,f,I,0);t.set(y.node.id,m??M());}if(s===null){let f=i.get(a.node.id);if(!f)continue;let I=new Set(f.removeNodeIds),m=-1;for(let N=f.removeNodeIds.length-1;N>=0;N-=1){let F=u.get(f.removeNodeIds[N]);if(!(F===void 0||F<=r)&&bh(d[F].node,"end")){m=F;break}}let E=d[m];if(!E){t.set(f.node.id,M());continue}s={span:f,owned:I,states:[{beginId:f.node.id,separated:false}],markers:R(d,r+1,m,f.node.id),endId:E.node.id,result:k(),chars:{left:H},nodesLeft:U,overflow:false};}K(s,a,l)&&(t.set(s.span.node.id,s.overflow?M():T(s.result)),s=null);}return s!==null&&t.set(s.span.node.id,M()),t}export{$ as a,Q as b,Z as c,ie as d,U as e,ae as f,ne as g};
@@ -0,0 +1,2 @@
1
+ import {R,Q as Q$1,T,S}from'./chunk-5JHQHJRH.js';import {h,a,b,e,c,f,te,Pc,Sc,Uc,Vc,Tc,ke,Qc,Rc,pd,mf,Od,Nf,Mf,d,F,zd,na,Dc,nf,md,qf}from'./chunk-PSVIEQUU.js';import {b as b$1}from'./chunk-6VTHQTM3.js';import {c as c$1,a as a$1,b as b$2}from'./chunk-2BVJFI6B.js';import {we as we$1,Ke,rb,Aa,pa,Ba,pd as pd$1,me as me$1,f as f$1,N,va,oa,a as a$2}from'./chunk-7MOZVKCN.js';var At=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function G(e){let t=new Map;for(let n of e)if(Array.isArray(n)){for(let o of n.slice(0,2048)){if(typeof o!="string"||!At.test(o))continue;let r=o.toLowerCase();if(t.has(r)||t.set(r,o),t.size===2048)break}if(t.size===2048)break}return Object.freeze([...t.values()])}function yn(e){let t=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(t===void 0||Array.isArray(t)&&t.length===0)?void 0:e}var it=64,de=Object.freeze({family:"Calibri",sizeHalfPoints:22}),Fn=de;function oe(e,...t){let n=[e,...t],o=[],r=new Set;for(let l of n)for(let u of l.sources??[]){let c=h(u.request);r.has(c)||(r.add(c),o.push(u));}let i=[],s=new Set;for(let l of n)for(let u of l.substitutions??[]){let c=h(u.from);r.has(c)||s.has(c)||(s.add(c),i.push(u));}let a$1=G(n.map(l=>l.supportedFamilies));return Object.freeze({...a$1.length?{supportedFamilies:a$1}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??a,sources:Object.freeze(o),...i.length>0?{substitutions:Object.freeze(i)}:{},defaultFont:e.defaultFont??de,...e.language!==void 0?{language:e.language}:{}})}var Rt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function re(e){let t=e?.defaultFont?.family;return t!==void 0&&Rt.test(t)?t:de.family}function J(e){let t="deferred"in e?e.deferred:void 0;if(t===void 0)return {now:e};let{deferred:n,...o}=e;if(typeof t?.then!="function")return {now:o};let r=Promise.resolve(t);return r.catch(()=>{}),{now:o,later:r}}var at=new WeakSet;function kt(e){return e&&at.add(e),e}function lt(e,t){if(!t)return e;let n=e?me(e):void 0,o=t.deferred?{deferred:t.deferred}:{},r=at.has(t),i=r?t.supportedFamilies??[]:[...t.supportedFamilies??[],...n?.supportedFamilies??[]];return {...n,sources:r?t.sources??[]:[...t.sources??[],...n?.sources??[]],substitutions:r?t.substitutions??[]:[...t.substitutions??[],...n?.substitutions??[]],supportedFamilies:i.length>0?[...new Set(i)]:void 0,...o}}function Tt(e){return !!e&&((e.sources?.length??0)>0||(e.substitutions?.length??0)>0||e.deferred!==void 0)}function ut(e){let t=e&&"failures"in e?e.failures:void 0;return Array.isArray(t)?t.slice(0,256):[]}function ct(e,t){return t?t.aborted?Promise.reject(t.reason):new Promise((n,o)=>{let r=()=>o(t.reason);t.addEventListener("abort",r,{once:true}),Promise.resolve(e).then(i=>{t.removeEventListener("abort",r),n(i);},i=>{t.removeEventListener("abort",r),o(i);});}):Promise.resolve(e)}async function ft(e,t,n){let o="failures"in e?e.failures:void 0,r=s=>o===void 0?s:{...s,failures:o},i=e;for(let s=0;s<st;s+=1){let{now:a,later:l}=J(i);if(!l)return r(a);let u;try{u=await ct(l,n);}catch(c){if(n?.aborted)throw n.reason;return t(c),r(a)}for(let c of ut(u))t(c);i=lt(a,u)??a;}return t(new RangeError(`Font loading stopped after ${st} deferred steps`)),r(J(i).now)}var st=256;function me(e){if(!("failures"in e))return e;let{failures:t,...n}=e;return n}async function ge(e,t,n,o){let r=t.flatMap((a,l)=>a?[a.then(u=>({originIndex:l,ok:true,value:u??void 0}),u=>({originIndex:l,ok:false,cause:u}))]:[]);if(r.length===0)return;let i=await ct(Promise.race(r),n).catch(()=>{});if(!i||n?.aborted)return;if(i.ok)for(let a of ut(i.value))o.report(i.originIndex,a);else o.report(i.originIndex,i.cause);if(!i.ok||!Tt(i.value)){let a=t.map((l,u)=>u===i.originIndex?void 0:l);return ge(e,a,n,o)}let s=[];for(let a=0;a<Math.max(e.length,t.length);a+=1){let l=e[a],u=t[a];s.push(a===i.originIndex?lt(l,i.value):u?{...l??{sources:[]},deferred:u}:l);}try{return kt(await o.compose(s))}catch(a){n?.aborted||o.report(i.originIndex,a);return}}var Mt="docx-editor.dev/font-resolver",gt=Symbol.for("docx-editor.dev/font-resolver");function On(e){let t={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,gt,t),Object.defineProperty(e,Mt,t);}catch(n){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:n})}return e}function An(e){return typeof e=="function"&&e[gt]===true}var ye=class extends RangeError{constructor(n,o,r){super(`Font source ${n.family} (${o} bytes) exceeds the shaping byte ceiling (${r} bytes)`);this.request=n;}request},Fe=class extends AggregateError{causes;constructor(t){let n=Object.freeze(t.slice(0,b*2));super(n,`Font origin rejected all ${n.length} face and substitution candidates`),this.causes=n;}},ie=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function vt(e,t,n){let o=new Map(e.map(r=>[ie(r),r]));for(let[r,i]of t)o.set(r,i);for(let r of n)o.has(ie(r.to))&&o.set(ie(r.from),r.from);return [...o.values()]}async function Rn(e,t,n={}){return he(e,t,n)}async function kn(e,t,n={}){return he(e,t,n)}async function he(e,t,n){let o=n.maxExecutionFontBytes??a;if(!Number.isSafeInteger(o)||o<=0||o>a)throw new RangeError("Font execution byte ceiling is outside the supported range");let r=e.map(_t),i,s=[],a$1=[],l=new Map,u=new Set,c=0,f=[],d=new Set,b$1=[],v=t.resolvedFaces??[],T=t.defaultFamily,C=[],P=[],g=new Set(n.placeholderOrigins??[]),x;for(let F=0;F<e.length;F+=1){pt(t.signal);let k=e[F],X=vt(v,l,f),q,B;try{let w=r[F],p;if(w){let m=await mt(w,t.signal);if(!m.ok)throw m.cause;p=m.value;}else if(typeof k=="function"){let m=await mt(Promise.resolve(k(Pt(t,T,X,c))).then(_=>({ok:!0,value:_}),_=>({ok:!1,cause:_})),t.signal);if(!m.ok)throw m.cause;p=m.value;}else p=k;if(p==null)continue;if(typeof p=="function"){K(n,k,F,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}if(n.awaitDeferred){let m=J(p);m.later&&dt(m.now,m.now)&&g.add(F),p=await ft(p,_=>K(n,k,F,_),t.signal);}else {let m=J(p);p=m.now,B=m.later;}let S="failures"in p?p.failures:void 0,O=[];if(Array.isArray(S)){let m=Math.min(S.length,b);for(let _=0;_<m;_++)O.push(S[_]);S.length>m&&O.push(new Error("Additional font-origin failures were omitted"));}else S!==void 0&&O.push(S);let A;try{A=Lt(p,u,c,d,i?"maxFontBytes"in i&&i.maxFontBytes!==void 0?i.maxFontBytes:a:void 0,n.reserveOwnedBytes,n.instrumentation,o);}catch(m){for(let _ of new Set(O))K(n,k,F,_);throw m}q=A;for(let m of new Set([...A.dropped,...O]))K(n,k,F,m);let E=A.fragment;E.supportedFamilies&&s.push(E.supportedFamilies),b$1.push(...O);let U=(E.sources??[]).map(m=>(h(m.request),[ie(m.request),m.request])),Y=[...E.substitutions??[]];B!==void 0&&dt(E,p)&&g.add(F);let $=g.has(F);!i&&!$&&"defaultFont"in E&&(T=re(E)),!i&&!$&&(i=E),$&&(x??=E);let z=new Set(A.sourceKeys);if(z.size>0){f=f.filter(m=>!z.has(h(m.from)));for(let m of z)d.delete(m);}a$1.push(...E.sources??[]);for(let m of A.sourceKeys)u.add(m);c+=A.ownedBytes;for(let[m,_]of U)l.set(m,_);for(let m of Y)f.push(m),d.add(h(m.from));C[F]=me(E),B&&(P[F]=B);}catch(w){if(q?.releaseOwnedBytes?.(),t.signal?.aborted)throw t.signal.reason??w;if(w instanceof se)throw w.cause;if(K(n,k,F,w),B){let p=new Error("Font origin skipped, so its background faces were not loaded");K(n,k,F,p);}continue}}let y=P.some(Boolean)?ge(C,P,t.signal,{compose:F=>he(F,t,{...n,placeholderOrigins:g}),report:(F,k)=>K(n,e[F],F,k)}):void 0;if(i??=x,!i)return y?{sources:[],deferred:y}:void 0;let{epoch:M,...R}=oe({...i,supportedFamilies:G(s),sources:a$1,substitutions:f}),D=y?{...R,deferred:y}:R;return b$1.length===0?D:{...D,failures:Object.freeze(b$1)}}function dt(e,t){return (e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&!("defaultFont"in t)&&!("maxFontBytes"in t)}var se=class extends Error{constructor(n){super("Unable to reserve owned font bytes");this.cause=n;this.name="FontOwnershipReservationError";}cause},ae=class extends RangeError{};async function mt(e,t){if(!t)return e;pt(t);let n,o=new Promise((i,s)=>{n=s;}),r=()=>n?.(t.reason);t.addEventListener("abort",r,{once:true});try{return await Promise.race([e,o])}finally{t.removeEventListener("abort",r);}}function _t(e){if(e===null||typeof e!="object")return;let t;try{t=e.then;}catch(n){return Promise.resolve({ok:false,cause:n})}if(typeof t=="function")return Promise.resolve(e).then(n=>({ok:true,value:n}),n=>({ok:false,cause:n}))}function Lt(e$1,t,n,o,r,i,s,a$1=a){let l=e$1.sources??[],u=e$1.substitutions??[],c$1="maxFontBytes"in e$1?e$1.maxFontBytes:void 0,f$1="defaultFont"in e$1?e$1.defaultFont:void 0,d="epoch"in e$1?e$1.epoch:void 0,b$1="language"in e$1?e$1.language:void 0;if(!Array.isArray(l)||!Array.isArray(u))throw new TypeError("Font origin sources and substitutions must be arrays");let v=l.length,T=u.length;if(v>b)throw new RangeError(`Font source count must not exceed ${b}`);if(T>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let C=c$1??a;if(!Number.isSafeInteger(C)||C<=0||C>a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${a}`);let P=Math.min(r??C,a$1),g=0,x=[],y=new Set,M=[],R=[];for(let w=0;w<v;w+=1){let p=l[w];try{let S=pe(p.request),O=h(S);if(t.has(O)||y.has(O))continue;let A=p.availability,E=p.faceIndex,U=p.hash,Y=p.id;if(A!==void 0&&A!=="available"&&A!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(E)||E<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof U!="string"||U.length===0)throw new TypeError("Font source hash must be a non-empty string");let $;if(A!=="forbidden"){if(typeof Y!="string"||Y.length===0)throw new TypeError("Font source id must be a non-empty string");$=p.bytes;let z=e($);if(z>P)throw z<=(r??C)?new ye(S,z,a$1):new RangeError(`Font source ${S.family} (${z} bytes) exceeds the effective base byte ceiling (${P} bytes)`);if(t.has(O)||y.has(O))continue;if(n+g+z>c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${c}`);g+=z;}else $=new Uint8Array(0);if(t.has(O)||y.has(O))continue;if(t.size+y.size>=b)throw new ae(`Font source count must not exceed ${b}`);y.add(O),x.push(O),M.push(Object.freeze({request:S,id:Y,bytes:$,hash:U,faceIndex:E,...A?{availability:A}:{}}));}catch(S){if(S instanceof ae)throw S;R.push(S);}}let D=new Set,F=[];for(let w=0;w<T;w+=1){let p=u[w];try{let S=pe(p.from),O=pe(p.to);h(S),h(O);let A=p.lineMetrics,E=A?Object.freeze({heightEm:A.heightEm,baselineEm:A.baselineEm}):void 0;if(E&&(!Number.isFinite(E.heightEm)||!Number.isFinite(E.baselineEm)||E.heightEm<=0||E.heightEm>4||E.baselineEm<0||E.baselineEm>E.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let U=h(S);if(t.has(U)||y.has(U)||o.has(U)||D.has(U))continue;D.add(U),F.push(Object.freeze({from:S,to:O,...E?{lineMetrics:E}:{}}));}catch(S){R.push(S);}}if((v>0||T>0)&&M.length===0&&F.length===0&&R.length>0)throw R.length===1?R[0]:new Fe(R);let k=o.size;for(let w of y)o.has(w)&&(k-=1);if(k+D.size>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let X;if(f$1!==void 0){let w=f$1.family,p=f$1.sizeHalfPoints;if(h({family:w,weight:400,style:"normal"}),!Number.isSafeInteger(p)||p<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");X=Object.freeze({family:w,sizeHalfPoints:p});}if(d!==void 0&&(!Number.isSafeInteger(d)||d<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(b$1!==void 0&&typeof b$1!="string")throw new TypeError("Font shaping language must be a string");let q;if(g>0&&i)try{q=i(g);}catch(w){throw new se(w)}let B;try{B=M.map(w=>f(w,s));}catch(w){throw q?.(),w}return {fragment:Object.freeze({supportedFamilies:G([e$1.supportedFamilies]),sources:Object.freeze(B),substitutions:Object.freeze(F),...d!==void 0?{epoch:d}:{},...c$1!==void 0?{maxFontBytes:c$1}:{},...X?{defaultFont:X}:{},...b$1!==void 0?{language:b$1}:{}}),sourceKeys:Object.freeze(x),ownedBytes:g,dropped:Object.freeze(R),releaseOwnedBytes:q}}function Nt(e){return !Number.isSafeInteger(e)||e<=0?0:e>c?c:e}function Pt(e,t,n,o){let{committedSourceBytes:r,...i}=e,s=Nt(o);return {...i,defaultFamily:t,...n.length>0?{resolvedFaces:n}:{},...s>0?{committedSourceBytes:s}:{}}}function pe(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function pt(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function K(e,t,n,o){let r;try{typeof t=="function"&&t.name.length>0&&(r=t.name);}catch{}try{o instanceof Error&&o.stack;}catch{}let i=Object.freeze({originIndex:n,...r!==void 0?{originName:r}:{},cause:o});if(e.onOriginFailure)try{let a=e.onOriginFailure(i);Promise.resolve(a).catch(l=>{console.warn("[fonts] font-origin diagnostic callback failed",l);});return}catch(a){console.warn("[fonts] font-origin diagnostic callback failed",a);}let s="";try{o instanceof Error&&o.message.length>0&&(s=`: ${o.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${s}`,o);}var It="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",be=256,Dt=31;function W(e,t){return e.kind!=="textValue"&&e.localName===t&&e.namespaceUri===pa}function Z(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===pa)?.value}function we(e){let t=(e.relationships.get(e.mainDocumentPart)??[]).find(i=>i.type===It),n=t?N(t):void 0,r=((n?.mode==="Internal"&&n.target.ok?e.parts.get(n.target.partName):void 0)??e.parts.get("/word/fontTable.xml"))?.root;return r&&W(r,"fonts")?r:void 0}function Q(e,t){let n=e.children.find(o=>W(o,t));return n&&n.kind!=="textValue"?Z(n,"val"):void 0}function ht(e){let t=we(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!W(r,"font"))continue;if(++o>be)break;let i=c$1(Z(r,"name"));if(!i)continue;let s=R(Q(r,"family"),Q(r,"pitch")),a=i.trim().toLowerCase();s&&!n.has(a)&&n.set(a,s);}return n}var Bt=new Set(["81","82"]),yt=new WeakMap,Ft=()=>false;function Nn(e){let t=we(e);if(!t)return Ft;let n=yt.get(t);if(n)return n;let o=new Set,r=0;for(let s of t.children){if(!W(s,"font"))continue;if(++r>be)break;let a=c$1(Z(s,"name")),l=Q(s,"charset")?.toLowerCase();!a||!l||!Bt.has(l)||R(Q(s,"family"),Q(s,"pitch"))==="serif"&&o.add(a.trim().toLowerCase());}let i=o.size===0?Ft:s=>o.has(s.trim().toLowerCase());return yt.set(t,i),i}function bt(e){let t=we(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!W(r,"font"))continue;if(++o>be)break;let i=c$1(Z(r,"name"));if(!i)continue;let s=r.children.find(c=>W(c,"altName")),a=s&&s.kind!=="textValue"?Z(s,"val"):void 0,l=a!==void 0&&a.length<=Dt?a$1(a):null,u=i.trim().toLowerCase();l&&!n.has(u)&&n.set(u,l);}return n}function Ut(e,t,n){let o="";for(let r=t;r+1<t+n&&r+1<e.length;r+=2){let i=e[r]|e[r+1]<<8;if(i===0)break;o+=String.fromCharCode(i);}return o}function zt(e,t,n){let o="";for(let r=t;r<t+n&&r<e.length&&e[r]!==0;r++)o+=String.fromCharCode(e[r]);return o}function qt(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.length<8||n.getUint32(0,true)!==1)return;let o=0;for(let r=0;r<1e5&&o+8<=e.length;r++){let i=n.getUint32(o,true),s=n.getUint32(o+4,true);if(s<8||s%4!==0||o+s>e.length||(i===82&&s>=104&&t(Ut(e,o+40,64)),i===14))return;o+=s;}}function jt(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),o=e.length>=22&&n.getUint32(0,true)===2596720087?22:0;if(!(o+18>e.length||n.getUint16(o+2,true)!==9)){o+=18;for(let i=0;i<1e5&&o+6<=e.length;i++){let s=n.getUint32(o,true),a=n.getUint16(o+4,true);if(s<3||o+s*2>e.length||(a===763&&s*2>=25&&t(zt(e,o+6+18,Math.min(32,s*2-6-18))),a===0))return;o+=s*2;}}}function wt(e,t){let n=new Map,o=i=>{if(i.trim().toLowerCase()==="system")return;let s=t(i.trim());if(s===null||n.size>=16)return;let a=s.toLowerCase();n.has(a)||n.set(a,s);},r=0;for(let[i,s]of e.partBytes){let a=i.toLowerCase();if(!a.startsWith("/word/")||a.startsWith("/word/glossary/"))continue;let l=a.endsWith(".emf"),u=a.endsWith(".wmf");if(!(!l&&!u)){if(++r>64||n.size>=16)break;l?qt(s,o):jt(s,o);}}return [...n.values()]}var Xt=2e5,xt=32,$t=new Set(["latin","ea","cs"]);function Ht(e,t){let n=/^\+(mn|mj)-(lt|ea|cs)$/.exec(e);if(!n)return;let o=n[1]==="mj";return n[2]==="ea"?o?t.majorEastAsia:t.minorEastAsia:n[2]==="cs"?o?t.majorBidi:t.minorBidi:o?t.major:t.minor}var Et=new WeakMap;function Vt(e){let t=Et.get(e);if(t)return t;let n=[],o=new Set,r=[e],i=0;for(;r.length>0&&++i<=Xt&&n.length<xt;){let s=r.pop();if(s.namespaceUri===va&&$t.has(s.localName)){let a=oa(s.attributes,"typeface");a&&!o.has(a)&&(o.add(a),n.push(a));continue}for(let a=s.children.length-1;a>=0;a-=1){let l=s.children[a];l.kind!=="textValue"&&r.push(l);}}return Et.set(e,n),n}function Xn(e,t={}){let n=new Map,o=r=>{let i=r?b$1(r):null;if(i===null||n.size>=xt)return;let s=i.toLowerCase();n.has(s)||n.set(s,i);};for(let r of e.parts.values()){let i=r.root;if(!(i.namespaceUri!==we$1&&i.namespaceUri!==Ke)){o(t.minor);for(let s of Vt(i))s.startsWith("+")?o(Ht(s,t)):o(s);}}for(let r of wt(e,b$1))o(r);return [...n.values()]}var Kt=256,Wt=Object.freeze([]);function le(e){let t=new WeakMap;return (n,o)=>{let r=new Set;for(let i of n){let s=[{node:i,context:o,next:0}],a=l=>{s.pop();let u=s.at(-1)?.found??r;for(let c of l)u.add(c);};for(;s.length;){let l=s[s.length-1],u=t.get(l.node);if(u?.key===l.context.key){a(u.families);continue}if(!l.children){let d=e(l.node,l.context);l.children=d.children,l.found=new Set(d.families);}let c=l.children[l.next++];if(c){s.push({...c,next:0});continue}let f=l.found.size===0?Wt:[...l.found];f.length<=Kt&&rb(l.node)?t.set(l.node,{key:l.context.key,families:f}):t.delete(l.node),a(f);}}return [...r]}}function ue(e,t){return e.children.flatMap(n=>n.kind==="textValue"?[]:[{node:n,context:t}])}var St=new WeakMap,Yt=4096;function Ct(e,t){let n=`${e.baseKey}|${e.depth+1}|${JSON.stringify(t)}`,o=St.get(e);o||St.set(e,o=new Map);let r=o.get(n);if(r)return r;let i={...e,depth:e.depth+1,cellStyle:t,key:n};return o.size<Yt&&o.set(n,i),i}function Gt(e,t){let{styles:n,theme:o,supplementalFamilies:r,depth:i}=t;if(e.kind==="table"){let l=te(e,468,i,n),u=[];for(let c of l?.rows??[])for(let f of c.cells){let d=Ct(t,f.styleFormatting);for(let b of f.blocks)u.push({node:b,context:d});}return {children:u.reverse()}}let s=new Set;if(e.kind==="paragraph"){let l=e.children.find(c=>c.kind==="paragraphProperties"),u=nf(n,l,t.cellStyle).runProperties;for(let c of md(e,u,void 0,(f,d)=>qf(f,d,n),void 0,void 0,"all-markup",void 0,void 0,o)){if(!c.text||c.fontSlot!=="eastAsia"&&!r.has(c.style.fontFamily??""))continue;let f=b$1((c.fontSlot==="eastAsia"?c.style.fontFamilyEastAsia:c.style.fontFamily)??void 0);f&&s.add(f);}}let a=e.localName==="txbxContent"?{...t,cellStyle:void 0,key:`${t.baseKey}|${i}|undefined`}:t;return {families:[...s],children:ue(e,a).reverse()}}function Jt(){let e=le(Gt),t,n,o=(i,s)=>{if(!t||n!==i||t.theme!==s){let a=mf(i,s);n=i,t={key:`${a.cacheToken}|0|undefined`,baseKey:a.cacheToken,styles:a,theme:s,depth:0,supplementalFamilies:new Set([...Object.values(s.majorSupplemental??{}),...Object.values(s.minorSupplemental??{})])};}return t};return Object.assign((i,s,a)=>e([...i].reverse(),o(s,a)),{warmTableRows(i,s,a,l,u){let c=o(l,u),f=te(i,468,c.depth,c.styles)?.rows??[];for(let d of f.slice(s,a))for(let b of d.cells)e(b.blocks,Ct(c,b.styleFormatting));return f.length}})}function Qn(e,t,n){return Jt()(e,t,n)}function Ee(e,t){return e.attributes.find(n=>n.localName===t)?.value}var Qt=le((e,t)=>{let n=[];if(e.namespaceUri===pa){if(e.localName==="fldSimple"){let o=ke(Ee(e,"instr")??"")?.font;o&&n.push(o);}if(e.localName==="p")for(let o of Zt(e))n.push(o);}return {families:n,children:ue(e,t)}});function co(e){let t=new Map;for(let n of Qt(e,{key:""})){let o=b$1(n);o!==null&&!t.has(o.toLowerCase())&&t.set(o.toLowerCase(),o);}return [...t.values()]}function Zt(e){let t=[],n=Pc(),o=[];for(let r=e.children.length-1;r>=0;r-=1){let i=e.children[r];i.kind!=="textValue"&&o.push({node:i,containerDepth:0});}for(;o.length>0;){let{node:r,containerDepth:i}=o.pop();if(i>=Aa||r.namespaceUri===pa&&r.localName==="p")continue;if(r.namespaceUri===pa&&r.localName==="fldChar"){let a=Ee(r,"fldCharType");a==="begin"?Sc(n):a==="separate"?(n.nesting===1&&Ot(n,t),Uc(n)):a==="end"&&(n.nesting===1&&Ot(n,t),Vc(n));continue}if(r.namespaceUri===pa&&(r.localName==="instrText"||r.localName==="delInstrText")){Tc(n,en(r),r.localName==="delInstrText");continue}if(r.namespaceUri===pa&&r.localName==="fldSimple"){let a=ke(Ee(r,"instr")??"");a?.font&&t.push(a.font);}let s=Ba(r,i);for(let a=r.children.length-1;a>=0;a-=1){let l=r.children[a];l.kind!=="textValue"&&o.push({node:l,containerDepth:s});}}return Qc(n),t}function Ot(e,t){let n=Rc(e);if(n.overflow)return;let o=ke(n.instruction);o?.font&&t.push(o.font);}function en(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let o=n.pop();if(o.kind==="textValue")t+=o.value;else for(let r=o.children.length-1;r>=0;r-=1)n.push(o.children[r]);}return t}var tn=()=>true,nn=/[ᄀ-ᇿ⺀-鿿ꥠ-꥿가-퟿豈-﫿︰-﹏＀-￯]/u;function fo(e,t,n,o){if(!t)return [];let r=pd(t),i=mf(n,o),s=new Map;for(let a of e)for(let l of on(a)){let u=pd$1(l.children),c=f=>{if(f)for(let d of f.values()){let b=d.markerText===void 0||nn.test(d.markerText);for(let v of [d.markerStyle.fontFamily,b?d.markerStyle.fontFamilyEastAsia:null]){let T=b$1(v??void 0);if(T===null)continue;let C=T.toLowerCase();s.has(C)||s.set(C,T);}}};c(Od(u,r,i,tn));for(let f of u){let d=Nf(f);for(let b of d.contents)c(Mf(b,r,i));}}return [...s.values()].sort((a,l)=>a.localeCompare(l))}function on(e){if(e.localName==="document"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName==="body")return [t];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let t=[];for(let n of e.children)n.kind!=="textValue"&&(n.localName==="footnote"||n.localName==="endnote")&&t.push(n);return t}return [e]}function Ro(e,t,n,o=[]){let r=new Set,i=new Set((o??[]).map(a=>a.from.family.trim().toLowerCase())),s=new Map;for(let a of e.substitutions??[]){let l=a.from.family.trim().toLowerCase();s.has(l)||s.set(l,a.to.family.trim().toLowerCase());}for(let a of e.substitutions??[]){let l=a.from.family.trim().toLowerCase(),u=a.to.family.trim().toLowerCase(),c=[t.alternates.get(l),t.fallbacks.get(l)].some(f=>{let d=f?.trim().toLowerCase();return d!==void 0&&d!==l&&(d===u||s.get(d)===u)});u!==l&&!i.has(l)&&c&&!(n.resolve(a.from)instanceof d)&&r.add(a.from.family.toLowerCase());}return r}function rn(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===pa)?.value}var sn=new Set(["document","hdr","ftr","footnotes","endnotes","comments","styles","numbering","glossaryDocument"]),an=new Set(["t","delText","instrText","delInstrText"]),ln=2e6;function un(e,t){let n=e.stylesRoot(),o=e.documentThemeFonts(),r=[...F(n),...n?zd(n).run:[]],i=na(r,o),s=a$1(i.fontFamily??void 0)??t,a=a$1(Dc([{text:"\xE9",props:r,style:i,start:0,end:1}],o)[0]?.style.fontFamily??void 0)??s,l=a$1(i.fontFamilyEastAsia??void 0),u=a$1(i.complexLane?.fontFamily??void 0)??o.minorBidi??t,c=ht(e.currentPackage()),f=g=>c.get(g.trim().toLowerCase())??S(g),d=(g,x)=>{let y=f(g);if(!y)return x;let M=f(x);return M===void 0||M===y?x:T[y]},b=new Map,v=new Map,T$1=0;for(let g of e.currentPackage().parts.values()){if(g.root.namespaceUri!==pa||!sn.has(g.root.localName))continue;let x=[g.root];for(;x.length>0&&T$1<ln;){T$1++;let y=x.pop();if(y.kind!=="textValue"){if(y.namespaceUri===pa){if(an.has(y.localName))continue;if(y.localName==="rFonts"){for(let[M,R]of [["ascii",s],["hAnsi",a],["eastAsia",l],["cs",u]]){let D=a$1(b$2(rn(y,M))??void 0);if(!D||!R)continue;let F=D.trim().toLowerCase(),k=b.get(F)??new Set,X=M==="ascii"||M==="hAnsi",q=X?d(D,R):R;if(k.add(q),b.set(F,k),X&&f(D)){let B=v.get(F)??new Set;B.add(q),v.set(F,B);}}continue}}for(let M of y.children)x.push(M);}}}for(let g of a$2)b.delete(g);let C=new Map,P=[];for(let[g,x]of b){let y=v.get(g);x.size===1?C.set(g,[...x][0]):y?.size===1?C.set(g,[...y][0]):P.push(g);}return {fallbacks:C,ambiguousFamilies:P,defaults:new Map([...b].map(([g,x])=>[g,[...x]]))}}function cn(e,t,n=[],o="Calibri"){let r=bt(e.currentPackage()),i=un(e,o),s=t.flatMap(u=>{let c=r.get(u.trim().toLowerCase());return c?[c]:[]}),a=new Map,l=t.flatMap(u=>i.defaults.get(u.trim().toLowerCase())??[]).filter(u=>u.trim().toLowerCase()!==o.trim().toLowerCase());for(let u of [...t,...s,...n,...l]){let c=a$1(u);if(c&&!a.has(c.trim().toLowerCase())&&a.set(c.trim().toLowerCase(),c),a.size===it)break}return {families:[...a.values()],alternates:r,fallbacks:i.fallbacks,ambiguousFamilies:i.ambiguousFamilies}}function ko(e,t,n){let o=re(n),r=cn(e,t,[],o);return {plan:r,request:{families:r.families,defaultFamily:o}}}function To(e,t,n=t.fallbacks){let o=new Map(e.sources.map(u=>[h(u.request),u.request])),r=[],i=new Set((e.substitutions??[]).map(u=>h(u.from))),s=new Map((e.substitutions??[]).map(u=>[h(u.from),u])),a=u=>{let c=o.get(h(u));if(c)return {to:c};let f=s.get(h(u)),d=f&&o.get(h(f.to));if(!(!f||!d))return f.lineMetrics?{to:d,lineMetrics:f.lineMetrics}:{to:d}},l=Math.max(0,b-i.size);for(let u of t.families){let c=u.trim().toLowerCase(),f=t.alternates.get(c),d=n.get(c),b=me$1(u);for(let v of [400,700])for(let T of ["normal","italic"]){let C={family:u,weight:v,style:T};if(o.has(h(C)))continue;let P=s.has(h(C));for(let g of P?[b,f]:[b,f,d]){if(!g||g.trim().toLowerCase()===c)continue;let x={family:g,weight:v,style:T},y=o.get(h(x)),M=P?y?{to:y}:void 0:a(x);if(!M)continue;if(!i.has(h(C))){if(l===0)break;l--;}let R=Q$1(u)?.em;r.push({from:C,...M,...R?{lineMetrics:R}:{}});break}}}return oe({...e,substitutions:[...r,...e.substitutions??[]]})}function Mo(e,t,n){let o=new Set((e.substitutions??[]).map(i=>h(i.from))),r=new Set;for(let i of t.substitutions??[]){if(o.has(h(i.from)))continue;let s=i.from.family.trim().toLowerCase(),a=i.to.family.trim().toLowerCase();[n.alternates.get(s),n.fallbacks.get(s)].some(u=>u?.trim().toLowerCase()===a)||r.add(s);}return r}function vo(e,t){let n=new Map;for(let[o,r]of e)t(o)||n.set(o,r);return n}var fn={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function No(e,t){let n=[],o=[],r=0;for(let i of e){let s=i.bytes.byteLength;if(!Number.isSafeInteger(s)||s>t||s>a||s>c-r){o.push(i);continue}r+=s,n.push(i);}return {sources:n,dropped:o}}function Po(e,t,n){let o=t.reduce((i,s)=>i+s.bytes.byteLength,0),r=new Set(t.filter(i=>i.request.family.trim().length>0).map(i=>h(i.request)));return dn(e,{maxFontBytes:n,aggregateBudget:Math.max(0,c-o),shadowedRequests:r})}function dn(e,t){let n=[],o=[],r=t.aggregateBudget,i=new Set;for(let s of e){let a=fn[s.style],l=Object.freeze({family:s.family,weight:a.weight,style:a.style});if(s.family.trim().length===0){o.push({request:l,partName:s.partName,reason:"malformed"});continue}let u=h(l);if(!(t.shadowedRequests?.has(u)||i.has(u))){if(i.add(u),s.bytes.byteLength>t.maxFontBytes||s.bytes.byteLength>r){o.push({request:l,partName:s.partName,reason:"overLimit"});continue}r-=s.bytes.byteLength,n.push({request:l,id:`embedded:${s.partName}#${s.style}`,bytes:s.bytes,hash:f$1(s.bytes),faceIndex:0});}}return {sources:n,dropped:o}}
2
+ export{co as A,Zt as B,fo as C,Ro as D,cn as E,ko as F,To as G,Mo as H,vo as I,No as J,Po as K,dn as L,G as a,yn as b,it as c,de as d,Fn as e,oe as f,re as g,J as h,lt as i,Tt as j,ut as k,me as l,Mt as m,gt as n,On as o,An as p,ye as q,Fe as r,Rn as s,kn as t,Nn as u,Xn as v,le as w,ue as x,Jt as y,Qn as z};