@docx-editor.dev/core 2.32.0 → 2.33.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 (119) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -0
  3. package/dist/automation.cjs +1 -1
  4. package/dist/automation.d.ts +13 -51
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.ts +14 -14
  8. package/dist/binding.js +1 -1
  9. package/dist/{chrome-print-CznJ0ucN.d.ts → chrome-print-CrPI9ZQc.d.ts} +85 -30
  10. package/dist/chunk-23MKR33J.js +4 -0
  11. package/dist/chunk-2DEY5NUC.cjs +32 -0
  12. package/dist/chunk-2DR4TH6B.js +1 -0
  13. package/dist/{chunk-ETDZFNMI.js → chunk-2F2UEAE2.js} +1 -1
  14. package/dist/chunk-2GPGAFOJ.cjs +5 -0
  15. package/dist/chunk-ALD626VU.cjs +2 -0
  16. package/dist/chunk-AU33YWEJ.js +236 -0
  17. package/dist/chunk-AXU63LYW.cjs +1 -0
  18. package/dist/chunk-CM5VZRBV.js +32 -0
  19. package/dist/chunk-D7FAFFTN.js +1 -0
  20. package/dist/{chunk-TJHE5EET.cjs → chunk-DYUVJNDD.cjs} +1 -1
  21. package/dist/chunk-ESYUKD5D.js +2 -0
  22. package/dist/chunk-F7TGQMVR.js +5 -0
  23. package/dist/chunk-FLW7KIQX.js +30 -0
  24. package/dist/chunk-JG4A6W6I.js +7 -0
  25. package/dist/chunk-JNGLSBPH.js +2 -0
  26. package/dist/chunk-KE6ZWRIY.cjs +236 -0
  27. package/dist/{chunk-L5TYBFDB.js → chunk-L3YXJDPX.js} +1 -1
  28. package/dist/chunk-LI42N7OW.cjs +4 -0
  29. package/dist/{chunk-ACLR4DMK.js → chunk-PLKDS4JT.js} +1 -1
  30. package/dist/{chunk-6UDJUI3W.cjs → chunk-PXMTQ73F.cjs} +1 -1
  31. package/dist/chunk-R4R3AAE4.js +1 -0
  32. package/dist/{chunk-OKMEMSKB.cjs → chunk-RFUNFTGV.cjs} +1 -1
  33. package/dist/chunk-SVM6PGMS.js +3 -0
  34. package/dist/chunk-SZURLHR3.cjs +3 -0
  35. package/dist/chunk-UYCGCVZ2.cjs +1 -0
  36. package/dist/chunk-X34QRAUU.cjs +1 -0
  37. package/dist/chunk-XNBYG4XJ.cjs +30 -0
  38. package/dist/chunk-ZDFJW5XS.cjs +2 -0
  39. package/dist/chunk-ZWO4JHNN.cjs +7 -0
  40. package/dist/collaboration/replication.cjs +1 -1
  41. package/dist/collaboration/replication.d.ts +13 -4
  42. package/dist/collaboration/replication.js +1 -1
  43. package/dist/collaboration.d.ts +3 -3
  44. package/dist/contracts/document.d.ts +3 -3
  45. package/dist/contracts/editor.d.ts +10 -10
  46. package/dist/contracts/interaction.d.ts +2 -2
  47. package/dist/contracts/modules.d.ts +12 -12
  48. package/dist/contracts/types.d.ts +4 -4
  49. package/dist/{custom-node-writes-CLJKGD9t.d.ts → custom-node-writes-AqY5KpVx.d.ts} +2 -2
  50. package/dist/diagnostic-context-CuzhOX0g.d.ts +98 -0
  51. package/dist/{diagnostic-hints-DK8-V0fk.d.ts → diagnostic-hints-BtCaCqQC.d.ts} +2 -2
  52. package/dist/{document-protection-NaniLHWF.d.ts → document-protection-BvbpSXbQ.d.ts} +1 -1
  53. package/dist/{headless-document-view-Bcz9_Qva.d.ts → drawing-graphic-kind-CXYGYbB3.d.ts} +74 -4
  54. package/dist/drawing-preview-package-B9lSLRg4.d.ts +115 -0
  55. package/dist/{editor-DZwOTmlR.d.ts → editor-B7OOAAie.d.ts} +85 -13
  56. package/dist/{editor-scope-B3L-1ALc.d.ts → editor-scope-CA6egMaK.d.ts} +5 -1
  57. package/dist/editor.cjs +1 -1
  58. package/dist/editor.css +4 -4
  59. package/dist/editor.d.ts +215 -31
  60. package/dist/editor.js +1 -1
  61. package/dist/export.cjs +2 -2
  62. package/dist/export.d.ts +47 -12
  63. package/dist/export.js +2 -2
  64. package/dist/{font-resolver-BlQNGdvR.d.ts → font-resolver-Bm9XqTNO.d.ts} +14 -0
  65. package/dist/index.cjs +1 -1
  66. package/dist/index.d.ts +38 -23
  67. package/dist/index.js +1 -1
  68. package/dist/{layout-shaping-E5J4Z1Gf.d.ts → layout-shaping-Ci_BTnSU.d.ts} +1 -1
  69. package/dist/layout.cjs +1 -1
  70. package/dist/layout.d.ts +174 -99
  71. package/dist/layout.js +1 -1
  72. package/dist/metafile-drawing-DtMFyMKq.d.ts +107 -0
  73. package/dist/{note-properties-Ds5R2_3F.d.ts → note-properties-DCIJUKIy.d.ts} +1 -1
  74. package/dist/output.cjs +1 -1
  75. package/dist/output.d.ts +11 -11
  76. package/dist/output.js +1 -1
  77. package/dist/{protocol-DKa4qt7F.d.ts → protocol-Cp_QzVxS.d.ts} +2 -2
  78. package/dist/{review-paragraph-order-Dc17w_6v.d.ts → review-paragraph-order-BJQ43_r0.d.ts} +1 -1
  79. package/dist/{revision-projection-Cn6rZJ7H.d.ts → revision-projection-OVusTS77.d.ts} +1 -1
  80. package/dist/{semantic-cell-selection-BaUR0iJ4.d.ts → semantic-cell-selection-CoI5hHBm.d.ts} +2 -2
  81. package/dist/{semantic-interaction-CJoHLoOl.d.ts → semantic-interaction-BbA4dgEo.d.ts} +1 -1
  82. package/dist/{semantic-paint-BPw_n0li.d.ts → semantic-paint-B5JcIv9c.d.ts} +16 -9
  83. package/dist/{semantic-record-queries-C0rJ3sB4.d.ts → semantic-record-queries-DnO8J5_j.d.ts} +1 -1
  84. package/dist/{semantic-records-BvN-WWst.d.ts → semantic-records-DoK0lNjS.d.ts} +254 -43
  85. package/dist/store.cjs +1 -1
  86. package/dist/store.d.ts +510 -18
  87. package/dist/store.js +1 -1
  88. package/dist/{tree-op-types-C_S2niXW.d.ts → tree-op-types-Df4oY2u4.d.ts} +718 -252
  89. package/dist/{tree-package-store-CRHvMyNj.d.ts → tree-package-store-DXhX1PE-.d.ts} +8 -3
  90. package/dist/{tree-session-contract-D1awo_dA.d.ts → tree-session-contract-CF2625mv.d.ts} +5 -5
  91. package/dist/{unsupported-elements-CVos5cqe.d.ts → unsupported-elements-CUojsaCr.d.ts} +1 -1
  92. package/licenses/ECMA-376.md +29 -0
  93. package/package.json +2 -2
  94. package/dist/bookmark-names-DDuAra_V.d.ts +0 -37
  95. package/dist/chunk-25EXMBV2.cjs +0 -5
  96. package/dist/chunk-3IEXDEFH.cjs +0 -7
  97. package/dist/chunk-65XBN67F.cjs +0 -2
  98. package/dist/chunk-6NVZNB7O.cjs +0 -3
  99. package/dist/chunk-B2BEELUE.js +0 -1
  100. package/dist/chunk-DDFHKQFU.js +0 -30
  101. package/dist/chunk-E4IAO4CY.cjs +0 -2
  102. package/dist/chunk-FDSL5OJU.cjs +0 -30
  103. package/dist/chunk-FS7CMYLT.js +0 -4
  104. package/dist/chunk-GDS24SZN.js +0 -30
  105. package/dist/chunk-GIY6NT2X.js +0 -5
  106. package/dist/chunk-GWM3AKUD.js +0 -18
  107. package/dist/chunk-HDOXACHP.js +0 -2
  108. package/dist/chunk-IILEENID.js +0 -1
  109. package/dist/chunk-MNF2K7NN.cjs +0 -30
  110. package/dist/chunk-O324RB6R.cjs +0 -1
  111. package/dist/chunk-QXJKYNYZ.js +0 -1
  112. package/dist/chunk-RALTVLB6.js +0 -2
  113. package/dist/chunk-SRVKFUFI.js +0 -3
  114. package/dist/chunk-TELQ52LG.cjs +0 -1
  115. package/dist/chunk-UMMRURPE.js +0 -7
  116. package/dist/chunk-XJYZVGQR.cjs +0 -1
  117. package/dist/chunk-ZGTIE3QJ.cjs +0 -4
  118. package/dist/chunk-ZOZI27AW.cjs +0 -18
  119. package/dist/diagnostic-context-BtDUY3v2.d.ts +0 -31
package/dist/editor.d.ts CHANGED
@@ -9,46 +9,46 @@
9
9
  * @packageDocumentation
10
10
  * @public
11
11
  */
12
- import { O as OoxmlPart, aU as TreeDocColorValue, r as ColorValue, aa as DrawingPositionInput, G as ParagraphTabStop, ar as Watermark } from './tree-op-types-C_S2niXW.js';
13
- export { aV as DEFAULT_IMAGE_RESOURCE_LIMITS, aW as IMAGE_WRAP_TARGETS, ad as ImageDecodePort, ae as ImageResourceLimits, ag as ImageWrapTarget, F as ParagraphFlags, al as RenderableImageMime, R as ReviewModelInput, an as SupportedImageMime, aX as TEXT_FORM_FORMATS, aq as VectorImageMime, aY as resolveImageResourceLimits, aZ as resolveSvgIntrinsicSize, a_ as sniffImageMime, a$ as validateRasterHeader } from './tree-op-types-C_S2niXW.js';
14
- export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-CRHvMyNj.js';
15
- import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-D1awo_dA.js';
16
- export { a as TreeApplyResult } from './tree-session-contract-D1awo_dA.js';
12
+ import { O as OoxmlPart, b5 as TreeDocColorValue, r as ColorValue, aa as DrawingPositionInput, G as ParagraphTabStop, ar as Watermark } from './tree-op-types-Df4oY2u4.js';
13
+ export { b6 as DEFAULT_IMAGE_RESOURCE_LIMITS, b7 as IMAGE_WRAP_TARGETS, ad as ImageDecodePort, ae as ImageResourceLimits, ag as ImageWrapTarget, F as ParagraphFlags, al as RenderableImageMime, R as ReviewModelInput, an as SupportedImageMime, b8 as TEXT_FORM_FORMATS, aq as VectorImageMime, b9 as resolveImageResourceLimits, ba as resolveSvgIntrinsicSize, bb as sniffImageMime, bc as validateRasterHeader } from './tree-op-types-Df4oY2u4.js';
14
+ export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-DXhX1PE-.js';
15
+ export { D as DrawingGraphicKind, a as DrawingSupport, b as DrawingSupportIssue } from './drawing-graphic-kind-CXYGYbB3.js';
16
+ import { B as BookmarkNameProblem, D as DrawingPreviewPackageLimits, a as DrawingPreviewPackageResult } from './drawing-preview-package-B9lSLRg4.js';
17
+ import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-CF2625mv.js';
18
+ export { a as TreeApplyResult } from './tree-session-contract-CF2625mv.js';
17
19
  export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, RevisionMarkupDialog, RevisionMarkupDialogHost, resolveEditorModules } from './contracts/modules.js';
18
20
  import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
19
- import { J as EditorFontError, W as EditorSnapshot, x as Editor, b as EditorCommand, C as CanResult, aP as ZoomMode, g as ClearAnchorHighlightOptions, c as AnchorHighlightOptions, av as ScrollToAnchorOptions, au as ScrollPlacement, A as AnchorHighlightAnimation, a4 as HighlightRange, a6 as HighlightResult, a3 as HighlightOptions, aK as TextMatch, f as BookmarkSummary, B as BookmarkPlace } from './editor-DZwOTmlR.js';
20
- export { a2 as HighlightHit, a5 as HighlightRect, a9 as ImageContext, aa as ImageCropPercent, aQ as ImageCropPermille, am as ReviewItemHit, aw as SelectedImageState, aM as TrackedChangeFilterMode, aN as TrackedChangePredicate, aR as cropPercentFromCropPermille, aS as cropPercentFromPermille, aT as cropPercentFromSourceCrop, aU as cropPermilleFromCropPercent, aV as cropPermilleFromPercent, aW as sourceCropFromCropPercent, aX as validateImageCropPercent } from './editor-DZwOTmlR.js';
21
- import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-E5J4Z1Gf.js';
22
- export { d as disposeLayoutShaping } from './layout-shaping-E5J4Z1Gf.js';
21
+ import { J as EditorFontError, W as EditorSnapshot, x as Editor, b as EditorCommand, C as CanResult, aQ as ZoomMode, g as ClearAnchorHighlightOptions, c as AnchorHighlightOptions, aw as ScrollToAnchorOptions, av as ScrollPlacement, A as AnchorHighlightAnimation, a4 as HighlightRange, a6 as HighlightResult, a3 as HighlightOptions, aL as TextMatch, f as BookmarkSummary, B as BookmarkPlace } from './editor-B7OOAAie.js';
22
+ export { a2 as HighlightHit, a5 as HighlightRect, a9 as ImageContext, aa as ImageCropPercent, aR as ImageCropPermille, an as ReviewItemHit, ax as SelectedImageState, aN as TrackedChangeFilterMode, aO as TrackedChangePredicate, aS as cropPercentFromCropPermille, aT as cropPercentFromPermille, aU as cropPercentFromSourceCrop, aV as cropPermilleFromCropPercent, aW as cropPermilleFromPercent, aX as sourceCropFromCropPercent, aY as validateImageCropPercent } from './editor-B7OOAAie.js';
23
+ import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-Ci_BTnSU.js';
24
+ export { d as disposeLayoutShaping } from './layout-shaping-Ci_BTnSU.js';
23
25
  import { F as FontConfiguration } from './editor-fonts-D_-vjuJi.js';
24
- export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, m as MAX_RESOLVER_FAMILIES, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-BlQNGdvR.js';
25
- import { ac as PaginatedSurfaceOptions, ad as OpenPaginatedResult, ae as PaginatedSurface, af as TableCommandPlan, y as DocxEditorInstance, ag as SurfaceFormatting } from './chrome-print-CznJ0ucN.js';
26
- export { ah as AnchorFrameOrigin, A as AttachOptions, B as BookmarkChromeHandlers, a as BookmarkMarkInfo, b as BookmarkMarkOptions, ai as BookmarkMarkOptionsSource, C as CHROME_GROUPS, c as CHROME_MENUS, aj as CHROME_UNAVAILABLE_KEY, ak as ChromeControl, al as ChromeControlId, am as ChromeControlState, d as ChromeExportError, e as ChromeExportFormat, f as ChromeExportHandlers, g as ChromeExportResult, h as ChromeExportView, an as ChromeGroup, ao as ChromeGroupId, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromePrintError, p as ChromePrintErrorCode, q as ChromePrintJob, r as ChromePrintOptions, s as ChromeSlotId, t as CommentDraftChromeHandlers, u as ContentControlWidgetChromeHandlers, v as ContentControlWidgetSession, w as CustomFontsOptions, x as CustomFontsResolver, ap as DEFAULT_TABLE_CHROME_DRAFT, D as DocxEditorConfig, aq as DrawingSelectionIntent, ar as EMU_PER_POINT, as as EditorCommandExecute, E as EquationActivation, z as EquationChromeHandlers, at as EquationOps, au as FinalizedImageOverlayInteraction, F as FontLoadFailure, G as FontLoadFailureReason, H as FontMeasurementState, I as FontUrlSource, J as GoToChromeHandlers, K as HistoryGroupBinding, L as HistoryGroupBindingOptions, M as HyperlinkActivation, N as HyperlinkChromeHandlers, av as HyperlinkOps, aw as IMAGE_OVERLAY_NUDGE_PT, ax as IMAGE_OVERLAY_NUDGE_SHIFT_PT, ay as ImageInteractionSession, az as ImageOverlayScrollPort, aA as ImageResizeHandle, aB as ImageResizeResult, O as InvalidTextFormFieldChromeHandlers, P as InvalidTextFormFieldSession, Q as LoadFontsRequest, R as LoadFontsResult, S as LockedControlNavigation, aC as OpeningIndicatorHost, aD as OverlayFrameRect, aE as PaginatedSurfaceState, aF as ParagraphPropertyEdit, T as PopupChromeRegistrationOptions, aG as RemoteCaretLabelAnchor, aH as RemoteCaretLabelHost, aI as ReviewWriteIntent, aJ as RunTableChromeCommandResult, aK as SectionAnchor, aL as SectionBreakInsertType, aM as SelectedDrawingOverlayTarget, U as SurfaceEquation, V as SurfaceHyperlink, aN as SurfaceInsertImageInput, aO as SurfaceNavigation, aP as SurfaceOverlayCoordinates, aQ as SurfaceParagraphFormat, aR as TABLE_BORDER_STYLE_OPTIONS, aS as TABLE_BORDER_TARGET_OPTIONS, aT as TABLE_BORDER_WIDTH_OPTIONS, aU as TABLE_CHROME_SLOT_IDS, aV as TableBorderStyleOption, aW as TableBorderTargetOption, aX as TableBorderTargetValue, aY as TableBorderWidthOption, aZ as TableChromeDraft, a_ as TableChromePick, W as TableChromeSlotId, a$ as TableInteractionLabelKey, b0 as TextFormFieldChromeHandlers, b1 as TextFormFieldDialogSession, X as ToolbarCommandState, b2 as ToolbarSlotValue, Y as ToolbarValueMap, Z as ToolbarValueSlot, b3 as applyTableChromePick, _ as bindHistoryGroup, $ as blankDocumentBytes, b4 as canExecuteImageCommand, b5 as captureImageMutationPreconditions, b6 as chromeControlCount, a0 as chromeMenuSlots, b7 as chromeProbeForSlot, b8 as chromeSlotId, b9 as chromeSlotIsToggle, ba as commandExecOptions, a1 as commandForSlot, a2 as commandForSlotValue, bb as commandForTableChromeSlotValue, bc as computeImageResizeResult, bd as computeMovedImagePosition, be as computeResizedImageExtentEmu, a3 as createDocxEditor, a4 as createFontSource, bf as createImageOverlayScrollPort, bg as cssPixelsToLayoutPoints, a5 as customFonts, bh as defaultChromeGroups, bi as defaultTableLabel, bj as emuToOverlayPoints, bk as equationAtPosition, bl as executeImageCommand, bm as finalizeImageOverlayInteraction, bn as formattingBarChromeGroups, a6 as isChromePrintShortcut, bo as isStaleImageInteractionCommit, bp as isTableChromeSlot, bq as layoutPointsToCssPixels, a7 as loadFonts, br as overlayFrameToSheetCssPixels, bs as overlayHostOrigin, bt as pointsToEmu, bu as probeTableChromeCommand, bv as resizePreservesAspect, a8 as runChromeExport, a9 as runChromePrint, bw as runSave, bx as runTableChromeCommand, by as runTableCommand, aa as runToolbarCommand, bz as selectedDrawingOverlayTargetOf, bA as selectedImageStateOf, bB as surfacePaintScale, bC as tableChromeIconPaths, bD as tableChromeLabelKeyForTarget, bE as tableChromeToolbarState, bF as tableChromeVisible, bG as tableCommandToolbarState, ab as toolbarCommandState, bH as toolbarCommandStates } from './chrome-print-CznJ0ucN.js';
27
- import { a as AutomationCapabilities, b as AutomationHost, e as AutomationBatchRequest, f as AutomationBatchResponse } from './protocol-DKa4qt7F.js';
28
- import { c as HistoryGroup } from './editor-scope-B3L-1ALc.js';
29
- export { d as HistoryGroupOptions } from './editor-scope-B3L-1ALc.js';
30
- import { E as EditDiagnosticCode } from './diagnostic-hints-DK8-V0fk.js';
31
- import { S as SemanticLayout, T as TextMeasurer } from './semantic-records-BvN-WWst.js';
32
- export { t as SectionProperties, U as UnsupportedElement, e as UnsupportedElementLayout, f as UnsupportedElementRule } from './semantic-records-BvN-WWst.js';
26
+ export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, m as MAX_RESOLVER_FAMILIES, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-Bm9XqTNO.js';
27
+ import { ae as PaginatedSurfaceOptions, af as OpenPaginatedResult, ag as PaginatedSurface, ah as TableCommandPlan, z as DocxEditorInstance, ai as SurfaceFormatting } from './chrome-print-CrPI9ZQc.js';
28
+ export { aj as AnchorFrameOrigin, A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, ak as BookmarkMarkOptionsSource, C as CHROME_GROUPS, d as CHROME_MENUS, al as CHROME_UNAVAILABLE_KEY, am as ChromeControl, an as ChromeControlId, ao as ChromeControlState, e as ChromeExportError, f as ChromeExportFormat, g as ChromeExportHandlers, h as ChromeExportResult, i as ChromeExportView, ap as ChromeGroup, aq as ChromeGroupId, j as ChromeMenu, k as ChromeMenuEntry, l as ChromeMenuId, m as ChromeMenuItemEntry, n as ChromeMenuSeparatorEntry, o as ChromeMenuSubmenuEntry, p as ChromePrintError, q as ChromePrintErrorCode, r as ChromePrintJob, s as ChromePrintOptions, t as ChromeSlotId, u as CommentDraftChromeHandlers, v as ContentControlWidgetChromeHandlers, w as ContentControlWidgetSession, x as CustomFontsOptions, y as CustomFontsResolver, ar as DEFAULT_TABLE_CHROME_DRAFT, D as DocxEditorConfig, as as DrawingSelectionIntent, at as EMU_PER_POINT, au as EditorCommandExecute, E as EquationActivation, F as EquationChromeHandlers, av as EquationOps, aw as FinalizedImageOverlayInteraction, G as FontLoadFailure, H as FontLoadFailureReason, I as FontMeasurementState, J as FontUrlSource, ax as FormattingBarOptions, K as GoToChromeHandlers, L as HistoryGroupBinding, M as HistoryGroupBindingOptions, N as HyperlinkActivation, O as HyperlinkChromeHandlers, ay as HyperlinkOps, az as IMAGE_OVERLAY_NUDGE_PT, aA as IMAGE_OVERLAY_NUDGE_SHIFT_PT, aB as ImageInteractionSession, aC as ImageOverlayScrollPort, aD as ImageResizeHandle, aE as ImageResizeResult, P as InvalidTextFormFieldChromeHandlers, Q as InvalidTextFormFieldSession, R as LoadFontsRequest, S as LoadFontsResult, T as LockedControlNavigation, aF as OpeningIndicatorHost, aG as OverlayFrameRect, aH as PaginatedSurfaceState, aI as ParagraphPropertyEdit, U as PopupChromeRegistrationOptions, aJ as RemoteCaretLabelAnchor, aK as RemoteCaretLabelHost, aL as ReviewWriteIntent, aM as RunTableChromeCommandResult, aN as SectionAnchor, aO as SectionBreakInsertType, aP as SelectedDrawingOverlayTarget, V as SurfaceEquation, W as SurfaceHyperlink, aQ as SurfaceInsertImageInput, aR as SurfaceNavigation, aS as SurfaceOverlayCoordinates, aT as SurfaceParagraphFormat, aU as TABLE_BORDER_STYLE_OPTIONS, aV as TABLE_BORDER_TARGET_OPTIONS, aW as TABLE_BORDER_WIDTH_OPTIONS, aX as TABLE_CHROME_SLOT_IDS, aY as TableBorderStyleOption, aZ as TableBorderTargetOption, a_ as TableBorderTargetValue, a$ as TableBorderWidthOption, b0 as TableChromeDraft, b1 as TableChromePick, X as TableChromeSlotId, b2 as TableInteractionLabelKey, b3 as TextFormFieldChromeHandlers, b4 as TextFormFieldDialogSession, Y as ToolbarCommandState, b5 as ToolbarSlotValue, Z as ToolbarValueMap, _ as ToolbarValueSlot, b6 as applyTableChromePick, $ as bindHistoryGroup, a0 as blankDocumentBytes, b7 as canExecuteImageCommand, b8 as captureImageMutationPreconditions, b9 as chromeControlCount, a1 as chromeMenuSlots, ba as chromeProbeForSlot, bb as chromeSlotId, bc as chromeSlotIsToggle, bd as commandExecOptions, a2 as commandForSlot, a3 as commandForSlotValue, be as commandForTableChromeSlotValue, bf as computeImageResizeResult, bg as computeMovedImagePosition, bh as computeResizedImageExtentEmu, a4 as createDocxEditor, a5 as createFontSource, bi as createImageOverlayScrollPort, bj as cssPixelsToLayoutPoints, a6 as customFonts, bk as defaultChromeGroups, bl as defaultTableLabel, a7 as deferFonts, bm as emuToOverlayPoints, bn as equationAtPosition, bo as executeImageCommand, bp as finalizeImageOverlayInteraction, bq as formattingBarChromeGroups, a8 as isChromePrintShortcut, br as isStaleImageInteractionCommit, bs as isTableChromeSlot, bt as layoutPointsToCssPixels, a9 as loadFonts, bu as overlayFrameToSheetCssPixels, bv as overlayHostOrigin, bw as pointsToEmu, bx as probeTableChromeCommand, by as resizePreservesAspect, aa as runChromeExport, ab as runChromePrint, bz as runSave, bA as runTableChromeCommand, bB as runTableCommand, ac as runToolbarCommand, bC as selectedDrawingOverlayTargetOf, bD as selectedImageStateOf, bE as surfacePaintScale, bF as tableChromeIconPaths, bG as tableChromeLabelKeyForTarget, bH as tableChromeToolbarState, bI as tableChromeVisible, bJ as tableCommandToolbarState, ad as toolbarCommandState, bK as toolbarCommandStates } from './chrome-print-CrPI9ZQc.js';
29
+ import { a as AutomationCapabilities, b as AutomationHost, e as AutomationBatchRequest, f as AutomationBatchResponse } from './protocol-Cp_QzVxS.js';
30
+ import { c as HistoryGroup } from './editor-scope-CA6egMaK.js';
31
+ export { d as HistoryGroupOptions } from './editor-scope-CA6egMaK.js';
32
+ import { E as EditDiagnosticCode, R as ReviewDiagnosticCode, k as ReviewOperation } from './diagnostic-hints-BtCaCqQC.js';
33
+ import { S as SemanticLayout, T as TextMeasurer, U as UnsupportedElement } from './semantic-records-DoK0lNjS.js';
34
+ export { t as SectionProperties, e as UnsupportedElementLayout, f as UnsupportedElementRule, u as unsupportedElementRuleMatches } from './semantic-records-DoK0lNjS.js';
33
35
  import { ReviewPaneOverflow } from './contracts/types.js';
34
36
  export { CommentMarkerStyle, DEFAULT_REVIEW_PANE, ResolvedReviewPane, ReviewPaneItemFields, ReviewPaneOpening, ReviewPaneOptions, RevisionDisplay, resolveReviewPane, reviewPaneListsItem } from './contracts/types.js';
35
- export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup } from './revision-projection-Cn6rZJ7H.js';
36
- export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-CJoHLoOl.js';
37
- export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-BPw_n0li.js';
38
- export { U as UnsupportedElementHost, o as observeUnsupportedElements } from './unsupported-elements-CVos5cqe.js';
39
- import { B as BookmarkNameProblem } from './bookmark-names-DDuAra_V.js';
37
+ export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup } from './revision-projection-OVusTS77.js';
38
+ export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-BbA4dgEo.js';
39
+ export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-B5JcIv9c.js';
40
+ export { U as UnsupportedElementHost, o as observeUnsupportedElements } from './unsupported-elements-CUojsaCr.js';
40
41
  export { CollaborationModuleContribution } from './collaboration.js';
41
- import './custom-node-writes-CLJKGD9t.js';
42
- import './headless-document-view-Bcz9_Qva.js';
42
+ import './custom-node-writes-AqY5KpVx.js';
43
43
  import 'prosemirror-model';
44
44
  import './collaboration/replication.js';
45
45
  import './failure-6KGFrDO9.js';
46
- import './document-protection-NaniLHWF.js';
46
+ import './document-protection-BvbpSXbQ.js';
47
47
  import './contracts/document.js';
48
48
  import './contracts/interaction.js';
49
- import './note-properties-Ds5R2_3F.js';
50
- import './semantic-cell-selection-BaUR0iJ4.js';
51
- import './semantic-record-queries-C0rJ3sB4.js';
49
+ import './note-properties-DCIJUKIy.js';
50
+ import './semantic-cell-selection-CoI5hHBm.js';
51
+ import './semantic-record-queries-DnO8J5_j.js';
52
52
 
53
53
  declare function toEditorFontError(error: unknown): EditorFontError;
54
54
  declare function createLayoutShaping(configuration: FontConfiguration, instrumentation?: LayoutShapingInstrumentation, execution?: FontShapingOptions): Promise<LayoutShapingOptions>;
@@ -61,6 +61,68 @@ declare function createLayoutShaping(configuration: FontConfiguration, instrumen
61
61
  */
62
62
  declare const LOADING_SNAPSHOT: EditorSnapshot;
63
63
 
64
+ /**
65
+ * Scroll `scroller` to its right end, and keep it there while its content or padding
66
+ * changes, until the reader scrolls away from the end. Scrolling back to the end resumes it.
67
+ * Returns the cleanup.
68
+ *
69
+ * @internal
70
+ */
71
+ declare function keepScrollAtInlineEnd(scroller: HTMLElement): () => void;
72
+
73
+ /**
74
+ * The `left` and `top` of a submenu panel beside its parent row, in client pixels.
75
+ *
76
+ * The panel opens on the row's inline-end side: to the right in a left-to-right menu, to the
77
+ * left in a right-to-left one, where the submenu caret points. It takes the other side when
78
+ * it would not fit, and keeps `SUBMENU_EDGE_INSET` from the window edges. It aligns its top
79
+ * with the row's, then rises so a submenu on the last row of a tall menu stays in view.
80
+ *
81
+ * @internal
82
+ */
83
+ declare function placeSubmenu(row: {
84
+ readonly left: number;
85
+ readonly right: number;
86
+ readonly top: number;
87
+ }, panel: {
88
+ readonly width: number;
89
+ readonly height: number;
90
+ }, view: {
91
+ readonly width: number;
92
+ readonly height: number;
93
+ }, rtl: boolean): {
94
+ readonly left: number;
95
+ readonly top: number;
96
+ };
97
+ /**
98
+ * The keys that open and close a submenu: the inline-end arrow opens, the start one closes.
99
+ *
100
+ * @internal
101
+ */
102
+ declare function submenuKeys(rtl: boolean): {
103
+ readonly open: string;
104
+ readonly close: string;
105
+ };
106
+
107
+ /**
108
+ * The direction the nearest `dir` attribute declares for `node`: the value is
109
+ * case-insensitive, `auto` and unknown values defer to the next ancestor, and the search
110
+ * continues from a shadow root to its host. `'ltr'` when no ancestor declares one. Reading
111
+ * attributes forces no style pass, unlike computed style. It does not resolve `auto` from
112
+ * the text, and it follows the light tree, not slot assignment.
113
+ *
114
+ * @internal
115
+ */
116
+ declare function hostDirectionOf(node: Element | null): 'ltr' | 'rtl';
117
+ /**
118
+ * Call `onChange` when a `dir` attribute changes on `node` or one of its ancestors, in its
119
+ * document or in any shadow root between them. Changes inside `node` are ignored. Returns
120
+ * the cleanup.
121
+ *
122
+ * @internal
123
+ */
124
+ declare function observeHostDirection(node: Element, onChange: () => void): () => void;
125
+
64
126
  /**
65
127
  * True when the engine's PASTE lanes will land user-visible content from this payload, so
66
128
  * a host's image-FILE lane must stand down or insert a duplicate.
@@ -173,6 +235,55 @@ declare function openEditorWindow(options?: OpenEditorWindowOptions): Promise<Ed
173
235
  */
174
236
  declare function copyEditorStyles(from: Document, to: Document): () => void;
175
237
 
238
+ /**
239
+ * Where to place the label bar of an open header, footer, or note, in viewport pixels.
240
+ *
241
+ * The bar sits just above its story. A story with no room above it on its sheet, such as a
242
+ * header that starts at the paper edge, takes the bar just below it instead, so the bar never
243
+ * covers the gap between sheets or the ruler.
244
+ *
245
+ * @param storyRect - The painted story's viewport rectangle.
246
+ * @param sheetTop - The viewport top of the sheet the story is on, or undefined when unknown.
247
+ * @param barHeight - The bar's height in pixels.
248
+ * @param clearance - The gap between the bar and the story, in pixels.
249
+ * @returns The bar's viewport top.
250
+ *
251
+ * @example
252
+ * ```ts
253
+ * const top = storyLabelTop(band.getBoundingClientRect(), sheet.getBoundingClientRect().top, 28, 6);
254
+ * ```
255
+ *
256
+ * @public
257
+ */
258
+ declare function storyLabelTop(storyRect: {
259
+ readonly top: number;
260
+ readonly bottom: number;
261
+ }, sheetTop: number | undefined, barHeight: number, clearance: number): number;
262
+
263
+ /**
264
+ * The message key saying why a selected text box frame takes no caret or offers no handles, or
265
+ * null when it does both. Only in editing mode: viewing and suggesting refuse the edit
266
+ * themselves, so the box is not what stops it.
267
+ *
268
+ * @param target - The overlay target of the selected drawing.
269
+ * @param editingMode - The surface's editing mode.
270
+ * @returns `imageOverlay.textLocked`, `imageOverlay.locked`, or null.
271
+ *
272
+ * @example
273
+ * ```ts
274
+ * const key = textboxFrameReason(target, editor.surface!.editingMode());
275
+ * const title = key ? t(key) : undefined;
276
+ * ```
277
+ *
278
+ * @public
279
+ */
280
+ declare function textboxFrameReason(target: {
281
+ readonly textbox?: boolean;
282
+ readonly textEditable?: boolean;
283
+ readonly canMove: boolean;
284
+ readonly canResize: boolean;
285
+ }, editingMode: string): 'imageOverlay.textLocked' | 'imageOverlay.locked' | null;
286
+
176
287
  /** The window type of a realm: its own timers, observers and constructors. */
177
288
  type HostWindow = Window & typeof globalThis;
178
289
  /**
@@ -525,6 +636,35 @@ declare function snapTwips(value: number, unit: RulerUnit, precise: boolean): nu
525
636
  * while the box itself is still in range. The drag stops when the LEADING marker lands.
526
637
  */
527
638
  declare function dragIndent(handle: RulerIndentHandle, positionTwips: number, indent: RulerIndent, page: RulerPageMetrics, options?: RulerDragOptions): RulerIndent;
639
+ /**
640
+ * Where a tab stop sits, in twips from the page's left sheet edge. `tabTwips` counts from the
641
+ * paragraph's leading margin, as `w:tab/@w:pos` does: leftward from the right margin when
642
+ * `indent.rtl` is set.
643
+ *
644
+ * @public
645
+ */
646
+ declare function rulerTabPosition(tabTwips: number, page: RulerPageMetrics, indent: Pick<RulerIndent, 'rtl'>): number;
647
+ /**
648
+ * One horizontal ruler tick, in twips from the page's left sheet edge.
649
+ *
650
+ * @public
651
+ */
652
+ interface RulerMarginTick {
653
+ /** Twips from the page's left sheet edge. */
654
+ readonly position: number;
655
+ /** Tick length in CSS pixels: 8 for a whole unit, 5 for a half, 3 or 2 for minor ticks. */
656
+ readonly height: number;
657
+ /** Whole units from the paragraph's leading margin; omitted at the margin and on minor ticks. */
658
+ readonly label?: string;
659
+ }
660
+ /**
661
+ * Horizontal ruler ticks counted from the margin the paragraph starts at: the left margin, or
662
+ * the right margin when `indent.rtl` is set. Labels count whole units outward on both sides,
663
+ * so the margin zone also reads 1, 2, and so on toward the sheet edge.
664
+ *
665
+ * @public
666
+ */
667
+ declare function rulerMarginTicks(page: RulerPageMetrics, indent: Pick<RulerIndent, 'rtl'>, unit: RulerUnit): RulerMarginTick[];
528
668
 
529
669
  /**
530
670
  * Stable value identity for a command, including nested payloads.
@@ -943,6 +1083,12 @@ declare function beginEditorPreview(editor: DocxEditorInstance): {
943
1083
  * refusal; a value the engine does not know is left out of the diagnostic.
944
1084
  */
945
1085
  declare function reportAutomationRefusal(editor: object, code: EditDiagnosticCode, tracked: boolean, cause?: string): void;
1086
+ /**
1087
+ * Report a tracked-change decision an editing API batch refused into the diagnostics of the
1088
+ * editor it ran on, as one `review.skipped` event. `cause` is the structure behind the skip; a
1089
+ * value the engine does not know is left out. Does nothing for an object that is not an editor.
1090
+ */
1091
+ declare function reportAutomationReviewSkip(editor: object, code: ReviewDiagnosticCode, operation?: ReviewOperation, cause?: string): void;
946
1092
  /**
947
1093
  * Report an editing API batch that threw an engine error, not a refusal, into the diagnostics of
948
1094
  * the editor it ran on: `edit.internal-invariant` with the error's class, never its message.
@@ -1152,6 +1298,29 @@ interface PopupFocusLeaveOptions {
1152
1298
  * @internal
1153
1299
  */
1154
1300
  declare function listenForPopupFocusLeave(options: PopupFocusLeaveOptions): () => void;
1301
+ /** How {@link listenForOutsidePress} decides. @internal */
1302
+ interface OutsidePressOptions {
1303
+ /** A node of the popup. Its host document receives the listener. */
1304
+ readonly popup: Node | null | undefined;
1305
+ /** Whether a node belongs to the popup. Defaults to the popup's own `contains`. */
1306
+ readonly contains?: (node: Node) => boolean;
1307
+ /** Close the popup. */
1308
+ readonly close: (event: PointerEvent) => void;
1309
+ }
1310
+ /**
1311
+ * Close an open popup when a press lands outside it. Returns the disposer.
1312
+ *
1313
+ * The listener is a capture-phase `pointerdown` on the popup's host document. Capture runs
1314
+ * before the surface cancels the press or stops its propagation, so a press on the painted
1315
+ * pages closes the popup too. A press counts as inside when any node on its composed path
1316
+ * belongs to the popup, so a popup in a shadow root, or one that holds a shadow root,
1317
+ * recognises its own presses.
1318
+ *
1319
+ * Shared adapter glue, not for hosts.
1320
+ *
1321
+ * @internal
1322
+ */
1323
+ declare function listenForOutsidePress(options: OutsidePressOptions): () => void;
1155
1324
 
1156
1325
  /** Validate a position input, refusing offsets or bases outside what OOXML allows. */
1157
1326
  declare function validateDrawingPositionInput(position: DrawingPositionInput): boolean;
@@ -2027,5 +2196,20 @@ interface BookmarkDialogNameState {
2027
2196
  */
2028
2197
  declare function bookmarkDialogNameState(bookmarks: readonly BookmarkSummary[], name: string, writable: boolean): BookmarkDialogNameState;
2029
2198
 
2030
- export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DEFAULT_WATERMARK_FONT, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, HistoryGroup, LINE_SPACING_PRESETS, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, SPLIT_CELL_FALLBACK_MAX, ScrollPlacement, ScrollToAnchorOptions, SurfaceFormatting, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TextMatch, TextMeasurer, TreeDocxSessionView, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, beginEditorPreview, bookmarkDialogInitialName, bookmarkDialogNameState, bookmarkDialogRows, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder, collapsibleGroupCost, contentControlPopupKeyDown, contentControlPopupOpener, controlsOverflow, copyEditorStyles, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createDocumentSearch, createLayoutShaping, dragIndent, editorCommandKey, editorHostDocument, editorHostElement, editorHostWindow, editorInstanceScope, editorPreviewActive, firstDayOfWeek, formatInches, generateRulerTicks, goToBookmarkGroups, goToBookmarkMatch, goToBookmarkRows, goToBookmarkTarget, handlePosition, hasOpenNestedPopup, historyShortcutOf, hostDocumentOf, hostTimers, hostWindowOf, inchesToTwips, initialSplitCellCounts, isDomNode, isElementNode, isGoToChord, isHTMLElementNode, isInputEvent, isKeyboardEvent, isMouseEvent, isPointerEvent, isTextNode, isoDateOf, lineSpacingMenuRowLabel, lineSpacingMenuRows, listenForPopupEscape, listenForPopupFocusLeave, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, openEditorWindow, parseIsoDate, partOfNodeId, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, readAvailableWidth, readColumnGap, readInlineMargins, readSplitCellCounts, reportAutomationException, reportAutomationRefusal, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, reviewPaneEntitledZoom, rulerPageBox, sameOverflow, sameTabStops, sameZoomMode, seedFields, separatorLeadingCost, shiftMonth, signedFirstLineOf, snapTwips, specialOf, surfaceExtent, tableCommandState, toEditorFontError, toolbarGroupPriority, toolbarOverflowGroups, toolbarPanelPlacement, toolbarPopupLeft, trailingGapCost, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, watchHighlights, watermarkShapeBox, withTabStop };
2031
- export type { BarRoomInput, BookmarkDialogNameState, BookmarkSortOrder, BrowserAutomationHost, CalendarDay, CalendarMonth, CalendarMonthOptions, ClearRefreshHighlightsOptions, ColorLowerResult, ContentControlListNavigation, DocumentRefresh, DocumentRefreshState, DocumentSearch, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, DocumentSearchState, EditorPreviewFork, EditorPreviewRefusal, EditorWindow, GoToBookmarkGroup, HighlightSource, HighlightWatch, HistoryGroupRun, HistoryShortcutKeys, HostTimers, HostWindow, LineSpacingMenuRow, LineSpacingMenuValue, NavigateToChangeOptions, OpenEditorWindowOptions, ParagraphDialogFields, ParagraphDialogMixed, ParagraphFlagKey, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, PopupEscapeOptions, PopupFocusLeaveOptions, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, RulerDragOptions, RulerIndent, RulerIndentHandle, RulerPageMetrics, RulerTick, RulerUnit, SpecialIndent, SplitCellCountProblem, SplitCellCounts, SplitCellLimits, SurfaceExtent, TabAlignment, TabLeaderName, ToolbarFitInput, ToolbarHostGroupPlacement, ToolbarPanelPlacement, WatchHighlightsOptions, WatermarkSize };
2199
+ /**
2200
+ * A small DOCX that holds one drawing from the editor's current document, including unsaved
2201
+ * edits, for an external renderer. It equals `createDrawingPreviewPackage` on the document as
2202
+ * a save would write it now; see that function for the page and renderer rules.
2203
+ *
2204
+ * Pass an occurrence that an `UnsupportedElement` component receives, and the editor from
2205
+ * `useDocxEditor()`, returning early on `null`. The call is synchronous and serializes the
2206
+ * drawing's parts: make it in an effect keyed on `element.source`, not during render, and
2207
+ * spread out or queue the calls when there are many drawings. By default a package copies at
2208
+ * most 64 parts and 64 MiB; pass `limits` to change that.
2209
+ *
2210
+ * @public
2211
+ */
2212
+ declare function drawingPreviewDocx(editor: DocxEditorInstance, element: Pick<UnsupportedElement, 'ownerPartName' | 'nodeId'>, limits?: DrawingPreviewPackageLimits): DrawingPreviewPackageResult;
2213
+
2214
+ export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DEFAULT_WATERMARK_FONT, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, DrawingPreviewPackageLimits, DrawingPreviewPackageResult, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, HistoryGroup, LINE_SPACING_PRESETS, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewDiagnosticCode, ReviewOperation, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, SPLIT_CELL_FALLBACK_MAX, ScrollPlacement, ScrollToAnchorOptions, SurfaceFormatting, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TextMatch, TextMeasurer, TreeDocxSessionView, UnsupportedElement, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, beginEditorPreview, bookmarkDialogInitialName, bookmarkDialogNameState, bookmarkDialogRows, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder, collapsibleGroupCost, contentControlPopupKeyDown, contentControlPopupOpener, controlsOverflow, copyEditorStyles, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createDocumentSearch, createLayoutShaping, dragIndent, drawingPreviewDocx, editorCommandKey, editorHostDocument, editorHostElement, editorHostWindow, editorInstanceScope, editorPreviewActive, firstDayOfWeek, formatInches, generateRulerTicks, goToBookmarkGroups, goToBookmarkMatch, goToBookmarkRows, goToBookmarkTarget, handlePosition, hasOpenNestedPopup, historyShortcutOf, hostDirectionOf, hostDocumentOf, hostTimers, hostWindowOf, inchesToTwips, initialSplitCellCounts, isDomNode, isElementNode, isGoToChord, isHTMLElementNode, isInputEvent, isKeyboardEvent, isMouseEvent, isPointerEvent, isTextNode, isoDateOf, keepScrollAtInlineEnd, lineSpacingMenuRowLabel, lineSpacingMenuRows, listenForOutsidePress, listenForPopupEscape, listenForPopupFocusLeave, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, observeHostDirection, openEditorWindow, parseIsoDate, partOfNodeId, placeSubmenu, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, readAvailableWidth, readColumnGap, readInlineMargins, readSplitCellCounts, reportAutomationException, reportAutomationRefusal, reportAutomationReviewSkip, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, reviewPaneEntitledZoom, rulerMarginTicks, rulerPageBox, rulerTabPosition, sameOverflow, sameTabStops, sameZoomMode, seedFields, separatorLeadingCost, shiftMonth, signedFirstLineOf, snapTwips, specialOf, storyLabelTop, submenuKeys, surfaceExtent, tableCommandState, textboxFrameReason, toEditorFontError, toolbarGroupPriority, toolbarOverflowGroups, toolbarPanelPlacement, toolbarPopupLeft, trailingGapCost, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, watchHighlights, watermarkShapeBox, withTabStop };
2215
+ export type { BarRoomInput, BookmarkDialogNameState, BookmarkSortOrder, BrowserAutomationHost, CalendarDay, CalendarMonth, CalendarMonthOptions, ClearRefreshHighlightsOptions, ColorLowerResult, ContentControlListNavigation, DocumentRefresh, DocumentRefreshState, DocumentSearch, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, DocumentSearchState, EditorPreviewFork, EditorPreviewRefusal, EditorWindow, GoToBookmarkGroup, HighlightSource, HighlightWatch, HistoryGroupRun, HistoryShortcutKeys, HostTimers, HostWindow, LineSpacingMenuRow, LineSpacingMenuValue, NavigateToChangeOptions, OpenEditorWindowOptions, OutsidePressOptions, ParagraphDialogFields, ParagraphDialogMixed, ParagraphFlagKey, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, PopupEscapeOptions, PopupFocusLeaveOptions, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, RulerDragOptions, RulerIndent, RulerIndentHandle, RulerMarginTick, RulerPageMetrics, RulerTick, RulerUnit, SpecialIndent, SplitCellCountProblem, SplitCellCounts, SplitCellLimits, SurfaceExtent, TabAlignment, TabLeaderName, ToolbarFitInput, ToolbarHostGroupPlacement, ToolbarPanelPlacement, WatchHighlightsOptions, WatermarkSize };
package/dist/editor.js CHANGED
@@ -1 +1 @@
1
- export{Vb as AUTO_ZOOM_MODE,$b as BROWSER_AUTOMATION_CAPABILITIES,kb as CHROME_GROUPS,ob as CHROME_MENUS,rb as CHROME_UNAVAILABLE_KEY,wb as CONTENT_CONTROL_PICTURE_ACCEPT,Sc as ChromeExportError,Uc as ChromePrintError,c as DEFAULT_REVIEW_PANE,ra as DEFAULT_TABLE_CHROME_DRAFT,W as DEFAULT_WATERMARK_FONT,Jc as DocumentRefreshError,da as EMU_PER_POINT,Wb as FIT_WIDTH_ZOOM_MODE,Lc as HIGHLIGHT_REFRESH_MS,ma as IMAGE_OVERLAY_NUDGE_PT,na as IMAGE_OVERLAY_NUDGE_SHIFT_PT,Gc as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,vc as NO_MIXED_FIELDS,E as PX_PER_CM,D as PX_PER_INCH,Sb as REVIEW_MARKERS_GUTTER_PX,Nc as SEARCH_DEBOUNCE_MS,Qc as SEARCH_HIGHLIGHT_PRIORITY,Pc as SEARCH_HIGHLIGHT_SET,Oc as SEARCH_MATCH_LIMIT,K as SNAP_TWIPS_CM,J as SNAP_TWIPS_INCH,Cc as SPLIT_CELL_FALLBACK_MAX,xa as TABLE_BORDER_STYLE_OPTIONS,wa as TABLE_BORDER_TARGET_OPTIONS,ya as TABLE_BORDER_WIDTH_OPTIONS,sa as TABLE_CHROME_SLOT_IDS,rc as TAB_ALIGNMENT_LABELS,Ra as TOOLBAR_COLLAPSE_ORDER,Ta as TOOLBAR_OVERFLOW_HYSTERESIS,Xa as TOOLBAR_PANEL_EDGE_MARGIN,Sa as TOOLBAR_PINNED_GROUPS,I as TWIPS_PER_CM,H as TWIPS_PER_INCH,Ub as ZOOM_MAX,Tb as ZOOM_MIN,zc as alignmentAfterDirectionChange,za as applyTableChromePick,R as applyThemeShade,Q as applyThemeTint,Wa as arrangeToolbarGroups,fb as barRoomWidth,Rb as beginEditorPreview,Fc as bindHistoryGroup,g as blankDocumentBytes,ad as bookmarkDialogInitialName,bd as bookmarkDialogNameState,Xc as bookmarkDialogRows,Eb as calendarDateForKey,Gb as calendarDateFromText,Fb as calendarDateText,Cb as calendarMonth,Hb as calendarMonthNames,Ab as calendarMonthTitle,Bb as calendarWeekdays,ka as canExecuteImageCommand,ja as captureImageMutationPreconditions,yc as changedFields,ib as chordLetter,qb as chromeControlCount,pb as chromeMenuSlots,Da as chromeProbeForSlot,lb as chromeSlotId,Ja as chromeSlotIsToggle,i as clipboardDropLandsText,h as clipboardPasteLandsContent,Va as collapseOrder,bb as collapsibleGroupCost,O as commandExecOptions,Ea as commandForSlot,Ga as commandForSlotValue,Fa as commandForTableChromeSlotValue,lc as computeImageResizeResult,ha as computeMovedImagePosition,ga as computeResizedImageExtentEmu,ub as contentControlPopupKeyDown,vb as contentControlPopupOpener,gb as controlsOverflow,k as copyEditorStyles,ac as createBrowserAutomationHost,Ib as createContentControlListNavigation,Kc as createDocumentRefresh,Rc as createDocumentSearch,_b as createDocxEditor,B as createFontSource,mc as createImageOverlayScrollPort,b as createLayoutShaping,ba as cropPercentFromCropPermille,$ as cropPercentFromPermille,Y as cropPercentFromSourceCrop,aa as cropPermilleFromCropPercent,_ as cropPermilleFromPercent,hc as cssPixelsToLayoutPoints,C as customFonts,mb as defaultChromeGroups,ta as defaultTableLabel,N as dragIndent,Qa as editorCommandKey,o as editorHostDocument,n as editorHostElement,p as editorHostWindow,bc as editorInstanceScope,Qb as editorPreviewActive,fa as emuToOverlayPoints,Lb as equationAtPosition,la as executeImageCommand,nc as finalizeImageOverlayInteraction,zb as firstDayOfWeek,pc as formatInches,nb as formattingBarChromeGroups,F as generateRulerTicks,$c as goToBookmarkGroups,_c as goToBookmarkMatch,Yc as goToBookmarkRows,Zc as goToBookmarkTarget,L as handlePosition,dc as hasOpenNestedPopup,Kb as historyShortcutOf,l as hostDocumentOf,u as hostTimers,m as hostWindowOf,qc as inchesToTwips,Ec as initialSplitCellCounts,Vc as isChromePrintShortcut,t as isDomNode,q as isElementNode,jb as isGoToChord,r as isHTMLElementNode,y as isInputEvent,v as isKeyboardEvent,x as isMouseEvent,w as isPointerEvent,pa as isStaleImageInteractionCommit,ua as isTableChromeSlot,s as isTextNode,xb as isoDateOf,gc as layoutPointsToCssPixels,Ic as lineSpacingMenuRowLabel,Hc as lineSpacingMenuRows,cc as listenForPopupEscape,ec as listenForPopupFocusLeave,A as loadFonts,T as lowerColorValueForBorder,U as lowerColorValueForFill,wc as mixedFieldsOf,Mb as mountPaginatedSurface,tb as observeContentControlPopup,j as openEditorWindow,ic as overlayFrameToSheetCssPixels,jc as overlayHostOrigin,yb as parseIsoDate,z as partOfNodeId,ea as pointsToEmu,sb as positionContentControlPopup,Aa as probeTableChromeCommand,hb as readAvailableWidth,eb as readColumnGap,db as readInlineMargins,Dc as readSplitCellCounts,Pb as reportAutomationException,Ob as reportAutomationRefusal,kc as resizePreservesAspect,V as resolveColorValueToCss,d as resolveReviewPane,S as resolveThemeColorHex,Xb as resolveZoomMode,Zb as reviewPaneEntitledZoom,e as reviewPaneListsItem,G as rulerPageBox,Tc as runChromeExport,Wc as runChromePrint,Na as runSave,La as runTableChromeCommand,Pa as runTableCommand,Ma as runToolbarCommand,Za as sameOverflow,xc as sameTabStops,Yb as sameZoomMode,uc as seedFields,oa as selectedDrawingOverlayTargetOf,ia as selectedImageStateOf,ab as separatorLeadingCost,Db as shiftMonth,tc as signedFirstLineOf,M as snapTwips,Z as sourceCropFromCropPercent,sc as specialOf,Jb as surfaceExtent,fc as surfacePaintScale,Ca as tableChromeIconPaths,Ba as tableChromeLabelKeyForTarget,Ha as tableChromeToolbarState,va as tableChromeVisible,qa as tableCommandState,Oa as tableCommandToolbarState,a as toEditorFontError,Ia as toolbarCommandState,Ka as toolbarCommandStates,Ua as toolbarGroupPriority,_a as toolbarOverflowGroups,Ya as toolbarPanelPlacement,$a as toolbarPopupLeft,cb as trailingGapCost,Bc as trapTabWithin,oc as twipsToInches,ca as validateImageCropPercent,P as validateThemeModifier,Mc as watchHighlights,X as watermarkShapeBox,Ac as withTabStop}from'./chunk-GDS24SZN.js';export{a as resolveEditorModules}from'./chunk-4HENIAFG.js';export{a as observeUnsupportedElements}from'./chunk-FS7CMYLT.js';export{d as DEFAULT_FONT,i as FONT_RESOLVER_BRAND,h as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,n as composeFontOrigins,j as defineFontResolver,k as isFontResolver}from'./chunk-RALTVLB6.js';export{t as disposeLayoutShaping}from'./chunk-SRVKFUFI.js';import'./chunk-RIYSCEFQ.js';import'./chunk-UMMRURPE.js';import'./chunk-QXJKYNYZ.js';export{Xa as DEFAULT_REVISION_MARKUP,Wa as REVISION_MARKUP_COLORS,Ya as resolveRevisionMarkup}from'./chunk-DDFHKQFU.js';import'./chunk-GIY6NT2X.js';import'./chunk-B2BEELUE.js';import'./chunk-ETDZFNMI.js';import'./chunk-L5TYBFDB.js';import'./chunk-ACLR4DMK.js';import'./chunk-HDOXACHP.js';import'./chunk-WN7ICTA5.js';import'./chunk-IILEENID.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,wl as DRAWING_REL_FROM_H,xl as DRAWING_REL_FROM_V,Ld as IMAGE_WRAP_TARGETS,fj as TEXT_FORM_FORMATS,zl as positionInputFromPropertiesCommand,yl as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,oe as resolveSvgIntrinsicSize,ke as sniffImageMime,vl as validateDrawingPositionInput,pe as validateRasterHeader,Al as validateSetImagePositionCommand}from'./chunk-GWM3AKUD.js';import'./chunk-S6J4O5XP.js';
1
+ export{fc as AUTO_ZOOM_MODE,lc as BROWSER_AUTOMATION_CAPABILITIES,ub as CHROME_GROUPS,yb as CHROME_MENUS,Bb as CHROME_UNAVAILABLE_KEY,Gb as CONTENT_CONTROL_PICTURE_ACCEPT,dd as ChromeExportError,fd as ChromePrintError,c as DEFAULT_REVIEW_PANE,Ba as DEFAULT_TABLE_CHROME_DRAFT,ea as DEFAULT_WATERMARK_FONT,Wc as DocumentRefreshError,na as EMU_PER_POINT,gc as FIT_WIDTH_ZOOM_MODE,Yc as HIGHLIGHT_REFRESH_MS,wa as IMAGE_OVERLAY_NUDGE_PT,xa as IMAGE_OVERLAY_NUDGE_SHIFT_PT,Tc as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,Ic as NO_MIXED_FIELDS,M as PX_PER_CM,L as PX_PER_INCH,cc as REVIEW_MARKERS_GUTTER_PX,_c as SEARCH_DEBOUNCE_MS,bd as SEARCH_HIGHLIGHT_PRIORITY,ad as SEARCH_HIGHLIGHT_SET,$c as SEARCH_MATCH_LIMIT,S as SNAP_TWIPS_CM,R as SNAP_TWIPS_INCH,Pc as SPLIT_CELL_FALLBACK_MAX,Ha as TABLE_BORDER_STYLE_OPTIONS,Ga as TABLE_BORDER_TARGET_OPTIONS,Ia as TABLE_BORDER_WIDTH_OPTIONS,Ca as TABLE_CHROME_SLOT_IDS,Ec as TAB_ALIGNMENT_LABELS,$a as TOOLBAR_COLLAPSE_ORDER,bb as TOOLBAR_OVERFLOW_HYSTERESIS,fb as TOOLBAR_PANEL_EDGE_MARGIN,ab as TOOLBAR_PINNED_GROUPS,Q as TWIPS_PER_CM,P as TWIPS_PER_INCH,ec as ZOOM_MAX,dc as ZOOM_MIN,Mc as alignmentAfterDirectionChange,Ja as applyTableChromePick,$ as applyThemeShade,_ as applyThemeTint,eb as arrangeToolbarGroups,pb as barRoomWidth,bc as beginEditorPreview,Sc as bindHistoryGroup,h as blankDocumentBytes,nd as bookmarkDialogInitialName,od as bookmarkDialogNameState,id as bookmarkDialogRows,Ob as calendarDateForKey,Qb as calendarDateFromText,Pb as calendarDateText,Mb as calendarMonth,Rb as calendarMonthNames,Kb as calendarMonthTitle,Lb as calendarWeekdays,ua as canExecuteImageCommand,ta as captureImageMutationPreconditions,Lc as changedFields,sb as chordLetter,Ab as chromeControlCount,zb as chromeMenuSlots,Na as chromeProbeForSlot,vb as chromeSlotId,Ta as chromeSlotIsToggle,C as clipboardDropLandsText,B as clipboardPasteLandsContent,db as collapseOrder,lb as collapsibleGroupCost,Y as commandExecOptions,Oa as commandForSlot,Qa as commandForSlotValue,Pa as commandForTableChromeSlotValue,yc as computeImageResizeResult,ra as computeMovedImagePosition,qa as computeResizedImageExtentEmu,Eb as contentControlPopupKeyDown,Fb as contentControlPopupOpener,qb as controlsOverflow,E as copyEditorStyles,mc as createBrowserAutomationHost,Sb as createContentControlListNavigation,Xc as createDocumentRefresh,cd as createDocumentSearch,kc as createDocxEditor,J as createFontSource,zc as createImageOverlayScrollPort,b as createLayoutShaping,la as cropPercentFromCropPermille,ja as cropPercentFromPermille,ga as cropPercentFromSourceCrop,ka as cropPermilleFromCropPercent,ia as cropPermilleFromPercent,uc as cssPixelsToLayoutPoints,K as customFonts,wb as defaultChromeGroups,Da as defaultTableLabel,g as deferFonts,V as dragIndent,qd as drawingPreviewDocx,_a as editorCommandKey,l as editorHostDocument,k as editorHostElement,m as editorHostWindow,nc as editorInstanceScope,ac as editorPreviewActive,pa as emuToOverlayPoints,Vb as equationAtPosition,va as executeImageCommand,Ac as finalizeImageOverlayInteraction,Jb as firstDayOfWeek,Cc as formatInches,xb as formattingBarChromeGroups,N as generateRulerTicks,md as goToBookmarkGroups,ld as goToBookmarkMatch,jd as goToBookmarkRows,kd as goToBookmarkTarget,T as handlePosition,pc as hasOpenNestedPopup,Ub as historyShortcutOf,z as hostDirectionOf,i as hostDocumentOf,r as hostTimers,j as hostWindowOf,Dc as inchesToTwips,Rc as initialSplitCellCounts,gd as isChromePrintShortcut,q as isDomNode,n as isElementNode,tb as isGoToChord,o as isHTMLElementNode,v as isInputEvent,s as isKeyboardEvent,u as isMouseEvent,t as isPointerEvent,za as isStaleImageInteractionCommit,Ea as isTableChromeSlot,p as isTextNode,Hb as isoDateOf,w as keepScrollAtInlineEnd,tc as layoutPointsToCssPixels,Vc as lineSpacingMenuRowLabel,Uc as lineSpacingMenuRows,rc as listenForOutsidePress,oc as listenForPopupEscape,qc as listenForPopupFocusLeave,I as loadFonts,ba as lowerColorValueForBorder,ca as lowerColorValueForFill,Jc as mixedFieldsOf,Wb as mountPaginatedSurface,Db as observeContentControlPopup,A as observeHostDirection,D as openEditorWindow,vc as overlayFrameToSheetCssPixels,wc as overlayHostOrigin,Ib as parseIsoDate,H as partOfNodeId,x as placeSubmenu,oa as pointsToEmu,Cb as positionContentControlPopup,Ka as probeTableChromeCommand,rb as readAvailableWidth,ob as readColumnGap,nb as readInlineMargins,Qc as readSplitCellCounts,$b as reportAutomationException,Zb as reportAutomationRefusal,_b as reportAutomationReviewSkip,xc as resizePreservesAspect,da as resolveColorValueToCss,d as resolveReviewPane,aa as resolveThemeColorHex,hc as resolveZoomMode,jc as reviewPaneEntitledZoom,e as reviewPaneListsItem,X as rulerMarginTicks,O as rulerPageBox,W as rulerTabPosition,ed as runChromeExport,hd as runChromePrint,Xa as runSave,Va as runTableChromeCommand,Za as runTableCommand,Wa as runToolbarCommand,hb as sameOverflow,Kc as sameTabStops,ic as sameZoomMode,Hc as seedFields,ya as selectedDrawingOverlayTargetOf,sa as selectedImageStateOf,kb as separatorLeadingCost,Nb as shiftMonth,Gc as signedFirstLineOf,U as snapTwips,ha as sourceCropFromCropPercent,Fc as specialOf,F as storyLabelTop,y as submenuKeys,Tb as surfaceExtent,sc as surfacePaintScale,Ma as tableChromeIconPaths,La as tableChromeLabelKeyForTarget,Ra as tableChromeToolbarState,Fa as tableChromeVisible,Aa as tableCommandState,Ya as tableCommandToolbarState,G as textboxFrameReason,a as toEditorFontError,Sa as toolbarCommandState,Ua as toolbarCommandStates,cb as toolbarGroupPriority,ib as toolbarOverflowGroups,gb as toolbarPanelPlacement,jb as toolbarPopupLeft,mb as trailingGapCost,Oc as trapTabWithin,Bc as twipsToInches,pd as unsupportedElementRuleMatches,ma as validateImageCropPercent,Z as validateThemeModifier,Zc as watchHighlights,fa as watermarkShapeBox,Nc as withTabStop}from'./chunk-FLW7KIQX.js';export{a as resolveEditorModules}from'./chunk-4HENIAFG.js';export{a as observeUnsupportedElements}from'./chunk-23MKR33J.js';export{d as DEFAULT_FONT,n as FONT_RESOLVER_BRAND,m as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,s as composeFontOrigins,o as defineFontResolver,p as isFontResolver}from'./chunk-ESYUKD5D.js';export{t as disposeLayoutShaping}from'./chunk-SVM6PGMS.js';import'./chunk-RIYSCEFQ.js';import'./chunk-JG4A6W6I.js';import'./chunk-R4R3AAE4.js';export{_a as DEFAULT_REVISION_MARKUP,Za as REVISION_MARKUP_COLORS,$a as resolveRevisionMarkup}from'./chunk-CM5VZRBV.js';import'./chunk-F7TGQMVR.js';import'./chunk-D7FAFFTN.js';import'./chunk-2F2UEAE2.js';import'./chunk-L3YXJDPX.js';import'./chunk-PLKDS4JT.js';import'./chunk-JNGLSBPH.js';import'./chunk-WN7ICTA5.js';import'./chunk-2DR4TH6B.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,Pm as DRAWING_REL_FROM_H,Qm as DRAWING_REL_FROM_V,Ee as IMAGE_WRAP_TARGETS,ok as TEXT_FORM_FORMATS,Sm as positionInputFromPropertiesCommand,Rm as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,of as resolveSvgIntrinsicSize,kf as sniffImageMime,Om as validateDrawingPositionInput,pf as validateRasterHeader,Tm as validateSetImagePositionCommand}from'./chunk-AU33YWEJ.js';import'./chunk-S6J4O5XP.js';
package/dist/export.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkE4IAO4CY_cjs=require('./chunk-E4IAO4CY.cjs'),chunk6NVZNB7O_cjs=require('./chunk-6NVZNB7O.cjs'),chunkTELQ52LG_cjs=require('./chunk-TELQ52LG.cjs'),chunkFDSL5OJU_cjs=require('./chunk-FDSL5OJU.cjs'),chunkXJYZVGQR_cjs=require('./chunk-XJYZVGQR.cjs');require('./chunk-OKMEMSKB.cjs'),require('./chunk-TJHE5EET.cjs');var chunk65XBN67F_cjs=require('./chunk-65XBN67F.cjs'),chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs');function N(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},i=e.shape(n);if(t.glyphs.length!==i.glyphs.length||t.glyphs.some((l,c)=>l.id!==i.glyphs[c]?.id))return t;let r=[],s=0;for(let l of o.text){let c=l.toUpperCase()!==l,h=r.at(-1);h&&(h.lower===c||/\p{M}/u.test(l))?h.text+=l:r.push({text:l,start:s,lower:c}),s+=l.length;}let a=[],p=[],d=[],u=true,m=0;for(let l of o.environment.direction==="rtl"?r.reverse():r){let c=l.lower?.8:1,h=[],E=[],R="",f=l.start;for(let F of l.text){let y=l.lower?F.toUpperCase():F;for(let S=0;S<y.length;S++)h.push(f),E.push(f+F.length);R+=y,f+=F.length;}let g=e.shape({...n,text:R}),x=a.length;for(let[F,y]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:d.push(S*c),a.push({...y,cluster:h[y.cluster]??l.start,originX:chunkFDSL5OJU_cjs.n(m+Math.round(y.originX*c)),originY:chunkFDSL5OJU_cjs.n(Math.round(y.originY*c)),offsetX:chunkFDSL5OJU_cjs.n(Math.round(y.offsetX*c)),offsetY:chunkFDSL5OJU_cjs.n(Math.round(y.offsetY*c)),advanceX:chunkFDSL5OJU_cjs.n(Math.round(y.advanceX*c)),advanceY:chunkFDSL5OJU_cjs.n(Math.round(y.advanceY*c)),drawScale:c});}for(let F of g.clusters){let y=h[F.textStart]??l.start,S=E[F.textEnd-1]??f,b=chunkFDSL5OJU_cjs.n(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===y&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:chunkFDSL5OJU_cjs.n(T.advance+b),caretEdges:[chunkFDSL5OJU_cjs.n(0),chunkFDSL5OJU_cjs.n(T.advance+b)]}:p.push({...F,textStart:y,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:b,caretEdges:F.caretEdges.map(V=>chunkFDSL5OJU_cjs.n(Math.round(V*c))),fontSpan:0});}m+=g.glyphs.reduce((F,y)=>F+Math.round(y.advanceX*c),0);}return {...t,glyphs:a,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:u&&d.length===a.length?d:void 0}}var ft=new WeakMap;function Gt(e){let o=ft.get(e);return o===void 0&&(o=Yt(e.bytes,e.faceIndex),ft.set(e,o)),o}var Vt=new Set(["COLR","CBDT","sbix"]),Wt=512;function Yt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(mt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let i=Math.min(t.getUint16(n+4),Wt);for(let r=0;r<i;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Vt.has(mt(e,s)))return true}return false}function mt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var $t=/\p{Emoji_Presentation}|️/u;function Kt(e){return $t.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Gt);if(t.length===0||t.length===e.length)return e;let n=e.filter(i=>!t.includes(i));return Kt(o)?[...t,...n]:[...n,...t]}var Zt=2048;function yt(e,o,t,n){if(!t.clusters.length||t.clusters.length>Zt)return null;let i=(f,g)=>{let{context:x,...F}=o,y={...F,text:g,environment:chunkFDSL5OJU_cjs.r({...o.environment,font:f})};return N(e,y,e.shape(y))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),b=s.get(x)??z(n,S).find(T=>{try{return !i(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!b)return null;s.set(x,b),g=b;}let y=r.at(-1);y&&y.font===g&&y.end===f.textStart?y.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let a=[],p=[],d=[],u=[],m=true,l=0,c=0,h=0,E=0,R=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=i(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(y=>y.id===0))return null;let x=a.length,F=d.length;for(let y of g.glyphs)a.push({...y,cluster:f.start+y.cluster,originX:chunkFDSL5OJU_cjs.n(l+y.originX),originY:chunkFDSL5OJU_cjs.n(c+y.originY)});if(g.exactAdvancesX===void 0)m=false;else for(let y of g.exactAdvancesX)u.push(y);for(let y of g.clusters)p.push({...y,textStart:f.start+y.textStart,textEnd:f.start+y.textEnd,glyphStart:x+y.glyphStart,glyphEnd:x+y.glyphEnd,fontSpan:F});g.glyphs.length&&d.push({font:f.font,glyphStart:x,glyphEnd:a.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),l+=g.glyphs.reduce((y,S)=>y+S.advanceX,0),c+=g.glyphs.reduce((y,S)=>y+S.advanceY,0),h=Math.max(h,g.metrics.ascent),E=Math.max(E,g.metrics.descent),R=Math.max(R,g.metrics.lineGap);}return chunkFDSL5OJU_cjs.u({...t,glyphs:a,clusters:p,fontSpans:d,exactAdvancesX:m&&u.length===a.length?u:void 0,metrics:{ascent:chunkFDSL5OJU_cjs.n(h),descent:chunkFDSL5OJU_cjs.n(E),lineGap:chunkFDSL5OJU_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var Jt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Qt=512,ht=new WeakMap;function eo(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",a=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(a=r(12+o*4),a<0))return t}let p=i(a+4);if(p<0||p>1024)return t;let d=-1;for(let c=0;c<p;c+=1){let h=a+12+c*16;if(s(h)==="GSUB"){d=r(h+8);break}}if(d<0)return t;let u=i(d+4);if(u<=0)return t;let m=d+u,l=i(m);if(l<0)return t;for(let c=0;c<Math.min(l,Qt);c+=1){let h=s(m+2+c*6);h&&t.add(h);}return t}function to(e,o){let t=ht.get(e);return t||(t=eo(e.bytes,e.faceIndex),ht.set(e,t)),(Jt.get(o)??[o.toLowerCase()]).some(i=>t.has(i))}function gt(e,o){let t=e.filter(n=>to(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let i=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(i===o.text)return t;try{let r=e.shape({...o,text:i});return chunkFDSL5OJU_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function xt(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(a=>e.fonts.resolve(a)).filter(a=>!(a instanceof chunkFDSL5OJU_cjs.d)),n={shape(a){return Q(e.shaper,a,e.shaper.shape(a))}},i=new WeakMap,r={shape(a){let p=e.shaper.shape(a),d=i.get(p);if(d&&d.input.text===a.text&&d.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&d.input.bidiLevel===a.bidiLevel&&d.input.context?.before===a.context?.before&&d.input.context?.after===a.context?.after&&d.input.environment===a.environment)return d.run;let u=s(a,Q(e.shaper,a,p));return i.set(p,{input:a,run:u}),u}},s=(a,p)=>{let d=N(n,a,p);if(!d.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(a.text))return d;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let u=yt(n,a,d,t);if(u)return u}for(let u of gt(z(t,a.text),a.environment.script))if(!(u.hash===a.environment.font.hash&&u.faceIndex===a.environment.font.faceIndex))try{let m={...a,environment:chunkFDSL5OJU_cjs.r({...a.environment,font:u})},l=N(n,m,n.shape(m));if(!l.glyphs.some(c=>c.id===0))return l}catch{}return d};return {...e,shaper:r}}var ee=chunkFDSL5OJU_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var oo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var Ft=new WeakMap;function H(e){let o=Ft.get(e);return o||Ft.set(e,o=no(e)),o}function no(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function ro(e){return Object.freeze({...H(e),bytes:chunkFDSL5OJU_cjs.i(e)})}function io(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkFDSL5OJU_cjs.d?null:ro(t)}catch{return null}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return io(e.resolve(),o)}}function ao(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,i=[],r=new Set){let s=new Map;for(let p of [...e,o]){let d=p.toLowerCase();s.has(d)||s.set(d,p);}let a=[...s.values()].map(p=>{let d=[];for(let m of oo){let l=n?.({family:p,...m});!l||l instanceof chunkFDSL5OJU_cjs.d||d.push(Object.freeze({...m,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}let u=r.has(p.trim().toLowerCase())?d.filter(m=>m.via==="direct").length:d.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(d)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(a),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ao(i)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=d=>d.trim().toLowerCase(),i=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(d=>n(d.family))),s=d=>{if(!(d instanceof chunkE4IAO4CY_cjs.l))return true;let u=n(d.request.family);return i.has(u)||!r.has(u)},a=e.originFailures.some(({cause:d})=>d instanceof chunkE4IAO4CY_cjs.m?d.causes.length===0||d.causes.some(s):s(d));if(o.fontPolicy!=="strict"||!a&&e.families.every(d=>d.coverage==="complete"))return;let p=e.families.filter(d=>d.coverage!=="complete").map(d=>d.family).join(", ");throw new chunkTELQ52LG_cjs.g("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let i={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkFDSL5OJU_cjs.h(i),s=o.get(r);if(!s){try{s=e.fonts.resolve(i);}catch{return null}o.set(r,s);}return s instanceof chunkFDSL5OJU_cjs.d?null:s}function bt(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function so(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let i=chunkFDSL5OJU_cjs.xa(n.style,n.fontSlot),r=chunkFDSL5OJU_cjs.pd(n)?chunkFDSL5OJU_cjs.qd(n):chunkFDSL5OJU_cjs.ea(n.text,i);if(r.length===0)return null;let s=i.fontFamily??e.defaultFont.family,a=G(e,o,s,i)??(chunkZOZI27AW_cjs.b(s)&&so(r)?G(e,o,e.defaultFont.family,i):null);if(!a)return null;try{if(i.smallCaps&&!chunk6NVZNB7O_cjs.ea(e.shaper,e.environment,a,i,t))return null;let p=chunk6NVZNB7O_cjs.da(e.shaper,e.environment,a,i,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??a),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(d=>H(d.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var M=new Map,St=new WeakMap,se=0,C;var le=32,Ot=chunkFDSL5OJU_cjs.c;function vt(){if(C)return C;let e=(async()=>(await chunk6NVZNB7O_cjs.d(),chunk6NVZNB7O_cjs.h({...chunk6NVZNB7O_cjs.i,maxFontBytes:chunkFDSL5OJU_cjs.a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function wt(e){let o=X();return chunk6NVZNB7O_cjs.ga(e,{resolveFont(t){return bt(e,o,t)},fallback:chunkFDSL5OJU_cjs.ka()})}async function At(e,o,t=[],n=false,i){if(!chunk6NVZNB7O_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk6NVZNB7O_cjs.k(i,chunk6NVZNB7O_cjs.i),s=await vt(),a=xt(await chunk6NVZNB7O_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>wt(a),resolveFont:p=>a.fonts.resolve(p),shapeLaidOutText:ae(a),producer:["node-export-session",JSON.stringify(t),e.fingerprint,a.operation.shapingHash,`producer:${a.operation.producerVersion}`,`fallback:${chunkFDSL5OJU_cjs.ja}`].join("|"),extensionFingerprint:e.fingerprint})}function lo(e,o,t){if(!chunk6NVZNB7O_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk6NVZNB7O_cjs.k(t,chunk6NVZNB7O_cjs.i),i=chunk6NVZNB7O_cjs.j(n),r=St.get(e),s=r?.get(i);if(s)return s;let a=`${chunk6NVZNB7O_cjs.o(e)}|${i}`,p=M.get(a);if(!p){if(M.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let l=chunk6NVZNB7O_cjs.n(e).sources.reduce((h,E)=>h+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+l>Ot)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Ot} process-wide`);se+=l;let c;try{let h=await vt();c=await chunk6NVZNB7O_cjs.t(e,h,n,o);}catch(h){throw se-=l,h}return Object.freeze({createMeasurer:()=>wt(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),M.set(a,p),p.catch(()=>{M.get(a)===p&&M.delete(a);});}let d=e.fingerprint,u=p.then(m=>Object.freeze({createMeasurer:m.createMeasurer,shapeLaidOutText:m.shapeLaidOutText,producer:["node-export",d,m.shapingHash,`producer:${m.producerVersion}`,`fallback:${chunkFDSL5OJU_cjs.ja}`].join("|"),extensionFingerprint:d}));return r||St.set(e,r=new Map),r.set(i,u),u.catch(()=>{r?.get(i)===u&&r.delete(i);}),u}var co="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function uo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(i=>i.type===co),n;if(t){let i=chunkZOZI27AW_cjs.N(t);i.mode==="Internal"&&i.target.ok&&(n=o.parts.get(i.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkZOZI27AW_cjs.qf(o,n)}function Tt(e,o){let t=uo(e);if(t.length!==0)return chunkE4IAO4CY_cjs.j(n=>{let i=new Set((n.resolvedFaces??[]).map(s=>chunkFDSL5OJU_cjs.h(s))),r=chunkE4IAO4CY_cjs.E(t,{maxFontBytes:chunkFDSL5OJU_cjs.a,aggregateBudget:po(n),shadowedRequests:i});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function po(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkFDSL5OJU_cjs.c:Math.max(0,chunkFDSL5OJU_cjs.c-o)}function fo(e){return te(e)&&ie(e)}var A=0,Lt=Symbol("font-resolution-timeout");function mo(e){let o=0,t=false;return e?.(A),{reserve:i=>{if(t)throw new Error("Document font-byte lease is already released");if(A+i>chunkFDSL5OJU_cjs.c)throw new chunkTELQ52LG_cjs.g("layoutFailed",`Active document export font bytes are limited to ${chunkFDSL5OJU_cjs.c}; requested ${i} bytes with ${A} bytes already active`);A+=i,o+=i,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=i,o-=i,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function yo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkZOZI27AW_cjs.pa||t.namespaceUri===""))?.value}async function ho(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunk65XBN67F_cjs.za(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:i,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:d,fontShaping:u,...m}=o,l=Array.isArray(n)?n:[n],c=i===void 0?[]:Array.isArray(i)?i:[i],h,E;try{E=await go(t.view,l,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:d,fontShaping:u,lastResortFonts:c,onFontResolution:b=>(h=b,a?.(b))});}catch(b){if(b instanceof chunkTELQ52LG_cjs.g&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!h)throw E?.dispose(),new chunkTELQ52LG_cjs.g("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkTELQ52LG_cjs.h(t.view,{...m,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(b){throw E?.dispose(),b}if(!R.ok)return E?.dispose(),R;let f=R.session,g=E,x="active",F=()=>x==="aborted"?new chunkTELQ52LG_cjs.g("aborted","Export resource settlement was aborted"):new chunkTELQ52LG_cjs.g("disposed","Export session has been disposed"),y=b=>{if(x==="active"){x=b,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>y("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:h,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:b=>x==="active"?f.layoutFor(b):Promise.reject(F()),validatedImageBytes:b=>x==="active"?f.validatedImageBytes(b):null,admittedFontFace:Et({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Rt({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>y("disposed")})}}async function go(e,o,t={}){let n=chunk6NVZNB7O_cjs.k(t.fontShaping,chunk6NVZNB7O_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let i=xo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let a=setTimeout(()=>r.abort(Lt),i);try{de(r.signal);let p=(async()=>{let d=mo(t.onActiveFontBytesChange),u=!1;try{let m=Eo(e).slice(0,chunkE4IAO4CY_cjs.c),l=chunkE4IAO4CY_cjs.x(e,m),c=[],h={dropped:[]},E=Tt(e,h),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],f=await chunkE4IAO4CY_cjs.o(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(b=>b.family),...l.families])].slice(0,chunkE4IAO4CY_cjs.c),defaultFamily:chunkE4IAO4CY_cjs.d.family,signal:r.signal},{onOriginFailure:b=>c.push(b),reserveOwnedBytes:d.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=chunkE4IAO4CY_cjs.f(f??{}),x=chunkE4IAO4CY_cjs.z(g,l),F=chunkE4IAO4CY_cjs.A(g,x,l);if(x.sources.length===0){let b=oe(m,x.defaultFont.family,c,void 0,h.dropped);ne(b,t),re(b,t,t.glyphFallbacks);return}let y=await At(chunk6NVZNB7O_cjs.q(x),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let S=oe(m,x.defaultFont.family,c,y.resolveFont,h.dropped,F);return ne(S,t),re(S,t,t.glyphFallbacks),u=!0,Object.freeze({...y,dispose:d.release})}finally{u||d.release();}})();return await Promise.race([p,Fo(r.signal)])}finally{clearTimeout(a),t.signal?.removeEventListener("abort",s);}}function xo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function Fo(e){return new Promise((o,t)=>{let n=()=>{t(Pt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Pt(e){let o=e.reason===Lt;return new chunkTELQ52LG_cjs.g(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Pt(e)}function Eo(e){let o=[e.part().root],t=[],n=[],i=new Set([e.part().name]),r=(u,m)=>{!m||i.has(m.name)||(i.add(m.name),u.push(m.root));};for(let u of e.headerFooterPartsBySection()){for(let m of u.headers.values())r(t,m);for(let m of u.footers.values())r(t,m);}for(let u of ["footnote","endnote"])n.push(...bo(e,u));let s=e.documentThemeFonts(),a={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,d=(u,m)=>{let l=chunkXJYZVGQR_cjs.e(u,e.stylesRoot(),a,So(u,m)),c=chunkE4IAO4CY_cjs.v(u,e.numberingRoot(),e.stylesRoot(),a);for(let h of [...l.direct,...wo(u),...c,...chunkE4IAO4CY_cjs.s(u,e.stylesRoot(),a),...l.inherited]){let E=h.toLowerCase();p.has(E)||p.set(E,h);}};return d(o,"body"),d(t,"furniture"),d(n,"note"),[...p.values()]}function bo(e,o){let t=chunkZOZI27AW_cjs.qh(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkZOZI27AW_cjs.rh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),i=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkZOZI27AW_cjs.Dc(r),a=chunkZOZI27AW_cjs.Cc(r);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&i.push(r);}return i}var Ro="http://schemas.openxmlformats.org/officeDocument/2006/math";function So(e,o){let t=new Set;for(let n of e){let i=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:a}=r.pop();s.namespaceUri===chunkZOZI27AW_cjs.pa&&s.localName==="p"&&i.push({paragraph:s,context:a});let p=s.namespaceUri===chunkZOZI27AW_cjs.pa&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let d=s.children.length-1;d>=0;d-=1){let u=s.children[d];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of i)Oo(s.paragraph,t,s.context);}return t}function Oo(e,o,t){let n=chunkFDSL5OJU_cjs.ac(),i=null,r=null,s="",a=false,p=false,d=false,u=0,m=[];for(let l=e.children.length-1;l>=0;l-=1){let c=e.children[l];c.kind!=="textValue"&&m.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;m.length>0;){let{node:l,runId:c,visibility:h,containerDepth:E}=m.pop();if(E>=chunkZOZI27AW_cjs.Aa||l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="p")continue;let R=l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="r"?l.id:c;if(l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="fldSimple"){let f=ce(l,"instr")??"";chunkFDSL5OJU_cjs.gd(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&vo(l)!==k&&o.add(l.id);}if(l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="fldChar"){let f=ce(l,"fldCharType");if(f==="begin")chunkFDSL5OJU_cjs.dc(n),n.nesting===1&&(i=R,r=null,s="",a=false,p=false,d=chunkZOZI27AW_cjs.Jf(l),u=0);else if(f==="separate"){let g=n.nesting===1;if(chunkFDSL5OJU_cjs.fc(n),g){let x=chunkFDSL5OJU_cjs.cc(n);s=x.instruction,a=x.overflow||n.nestingOverflow,r=R,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=chunkFDSL5OJU_cjs.cc(n);s=x.instruction,a=x.overflow||n.nestingOverflow;}if(!a&&chunkFDSL5OJU_cjs.fd(s,{hasSeparate:p,hasLegacyFormData:d,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??i;x&&o.add(x);}}chunkFDSL5OJU_cjs.gc(n);}continue}if(l.namespaceUri===chunkZOZI27AW_cjs.pa&&(l.localName==="instrText"||l.localName==="delInstrText")){chunkFDSL5OJU_cjs.ec(n,Nt(l),l.localName==="delInstrText");continue}n.nesting>0&&chunkFDSL5OJU_cjs.hc(n)&&l.namespaceUri===chunkZOZI27AW_cjs.pa&&Dt(l)&&(u|=h);for(let f=l.children.length-1;f>=0;f-=1){let g=l.children[f];g.kind!=="textValue"&&m.push({node:g,runId:R,visibility:h&_t(l),containerDepth:chunkZOZI27AW_cjs.Ba(l,E)});}}chunkFDSL5OJU_cjs.bc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Nt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,kt=2,It=4,k=ue|kt|It;function vo(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:i}=o.pop();if(!(n.namespaceUri===chunkZOZI27AW_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkZOZI27AW_cjs.pa&&Dt(n)&&(t|=i,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:i&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkZOZI27AW_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|kt:e.localName==="del"||e.localName==="moveFrom"?ue|It:k}function wo(e){let o=new Map,t=n=>{let i=chunkXJYZVGQR_cjs.b(n??void 0);if(i===null)return;let r=i.toLowerCase();o.has(r)||o.set(r,i);};for(let n of e){let i=[n];for(;i.length>0;){let r=i.pop();if(r.namespaceUri===Ro&&t(chunkFDSL5OJU_cjs.kd),r.namespaceUri===chunkZOZI27AW_cjs.pa&&r.localName==="sym"&&t(chunkXJYZVGQR_cjs.c(yo(r,"font"))),r.localName==="textpath"&&t(chunkZOZI27AW_cjs.ud(r)),r.namespaceUri===chunkZOZI27AW_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkFDSL5OJU_cjs.ed(s??"")?.font??null);}if(r.namespaceUri===chunkZOZI27AW_cjs.pa&&r.localName==="p")for(let s of chunkE4IAO4CY_cjs.u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let a=r.children[s];a.kind!=="textValue"&&i.push(a);}}}return [...o.values()]}function Nt(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let i=n.children.length-1;i>=0;i-=1)t.push(n.children[i]);}return o}var Ut="FILE_TOO_LARGE",Mt=8;function Ao(e){return typeof e=="object"&&e!==null}function Bt(e){if(!(!Ao(e)||typeof e.code!="string"))return e.code}function qt(e){return e===""||e.toLowerCase()==="localhost"}function To(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function zt(e){let o=To(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function jt(e){let o=zt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Lo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Po(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!qt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=jt(o.pathname);if(t===null||Lo(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Do(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function ko(e){let o=Do(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Mt)throw new TypeError(`trustedRoot must not exceed ${Mt} directories`);return o.map(Po)}function Io(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkFDSL5OJU_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkFDSL5OJU_cjs.a}`);return e}function _o(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!qt(e.host))return null;let t=zt(e.pathname);if(t===null)return null;for(let n of o){let i=jt(n.pathname);if(i===null||!t.startsWith(i)||t.length<=i.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function No(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Mo(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Ct(e,o,t){return e.some(n=>Mo(n,o,t))}async function Co(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(i){if(Bt(i)==="ENOENT")continue;throw i}return t}function Uo(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:i,realpath:r},{constants:s},{fileURLToPath:a},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),d=e.map(h=>p.resolve(a(h.href))),u=p.resolve(a(typeof o=="string"?o:o.href));if(!Ct(d,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let m=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",l=await i(u,m),c=()=>{l.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let h=await r(u);if(!Ct(await Co(d,r),h,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await l.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Ut});let R=new Uint8Array(E),f=0;for(;f<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await l.read(R,f,R.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===R.byteLength?R:R.slice(0,f)}catch(h){throw t?.aborted?t.reason:h}finally{t?.removeEventListener("abort",c),await l.close().catch(()=>{});}}}function Bo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=ko(e.trustedRoot),t=Io(e.maxBytes),n=e.read??Uo(o),i=e.networkFetch??fetch;return(async(r,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let p=No(r);if(p.protocol!=="file:")return i(p,s);let d=_o(p,o);if(!d)return new Response(null,{status:404});let u=a?new AbortController:void 0,m=()=>u?.abort(a?.reason);a?.addEventListener("abort",m,{once:true});let l;try{if(l=await n(d,{maxBytes:t,...u?{signal:u.signal}:{}}),a?.aborted)throw a.reason;if(l.byteLength>t)return new Response(null,{status:413})}catch(c){if(a?.aborted)throw a.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let h=Bt(c);if(h===Ut)return new Response(null,{status:413});if(h==="ENOENT"||h==="ENOTDIR"||h==="ELOOP")return new Response(null,{status:404});throw c}finally{a?.removeEventListener("abort",m);}return new Response(l,{status:200})})}
2
- Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.g}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.c}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.b}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.h}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=lo;exports.createPackagedFileFetch=Bo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=fo;exports.openFontBackedDocumentForExport=ho;
1
+ 'use strict';var chunkALD626VU_cjs=require('./chunk-ALD626VU.cjs'),chunkSZURLHR3_cjs=require('./chunk-SZURLHR3.cjs'),chunkAXU63LYW_cjs=require('./chunk-AXU63LYW.cjs'),chunk2DEY5NUC_cjs=require('./chunk-2DEY5NUC.cjs'),chunkUYCGCVZ2_cjs=require('./chunk-UYCGCVZ2.cjs');require('./chunk-RFUNFTGV.cjs'),require('./chunk-DYUVJNDD.cjs');var chunkZDFJW5XS_cjs=require('./chunk-ZDFJW5XS.cjs'),chunkKE6ZWRIY_cjs=require('./chunk-KE6ZWRIY.cjs');function Yt(e,o,t){let n=chunkKE6ZWRIY_cjs.Wd().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:chunk2DEY5NUC_cjs.n(y+Math.round(b.originX*f)),originY:chunk2DEY5NUC_cjs.n(Math.round(b.originY*f)),offsetX:chunk2DEY5NUC_cjs.n(Math.round(b.offsetX*f)),offsetY:chunk2DEY5NUC_cjs.n(Math.round(b.offsetY*f)),advanceX:chunk2DEY5NUC_cjs.n(Math.round(b.advanceX*f)),advanceY:chunk2DEY5NUC_cjs.n(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=chunk2DEY5NUC_cjs.n(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:chunk2DEY5NUC_cjs.n(T.advance+I),caretEdges:[chunk2DEY5NUC_cjs.n(0),chunk2DEY5NUC_cjs.n(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>chunk2DEY5NUC_cjs.n(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:chunk2DEY5NUC_cjs.r({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:chunk2DEY5NUC_cjs.n(c+h.originX),originY:chunk2DEY5NUC_cjs.n(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return chunk2DEY5NUC_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunk2DEY5NUC_cjs.n(f),descent:chunk2DEY5NUC_cjs.n(E),lineGap:chunk2DEY5NUC_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunk2DEY5NUC_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunk2DEY5NUC_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:chunk2DEY5NUC_cjs.r({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=chunk2DEY5NUC_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:chunk2DEY5NUC_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunk2DEY5NUC_cjs.d?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof chunk2DEY5NUC_cjs.d||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkALD626VU_cjs.q))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkALD626VU_cjs.r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunkAXU63LYW_cjs.h("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunk2DEY5NUC_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunk2DEY5NUC_cjs.d?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=chunk2DEY5NUC_cjs.za(n.style,n.fontSlot),r=chunk2DEY5NUC_cjs.ld(n)?chunk2DEY5NUC_cjs.md(n):chunk2DEY5NUC_cjs.ga(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkKE6ZWRIY_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkSZURLHR3_cjs.ea(e.shaper,e.environment,i,a,t))return null;let p=chunkSZURLHR3_cjs.da(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=chunk2DEY5NUC_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunkSZURLHR3_cjs.d(),chunkSZURLHR3_cjs.h({...chunkSZURLHR3_cjs.i,maxFontBytes:chunk2DEY5NUC_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunkSZURLHR3_cjs.ia(e,{resolveFont(t){return St(e,o,t)},fallback:chunk2DEY5NUC_cjs.ma()})}async function Lt(e,o,t=[],n=false,a){if(!chunkSZURLHR3_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunkSZURLHR3_cjs.k(a,chunkSZURLHR3_cjs.i),s=await At(),i=Et(await chunkSZURLHR3_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunk2DEY5NUC_cjs.la}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunkSZURLHR3_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunkSZURLHR3_cjs.k(t,chunkSZURLHR3_cjs.i),a=chunkSZURLHR3_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunkSZURLHR3_cjs.o(e)}|${a}`,p=C.get(i);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=chunkSZURLHR3_cjs.n(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await chunkSZURLHR3_cjs.t(e,f,n,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i,p),p.catch(()=>{C.get(i)===p&&C.delete(i);});}let l=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${chunk2DEY5NUC_cjs.la}`].join("|"),extensionFingerprint:l}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=chunkKE6ZWRIY_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkKE6ZWRIY_cjs.qg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkALD626VU_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunk2DEY5NUC_cjs.h(s))),r=chunkALD626VU_cjs.K(t,{maxFontBytes:chunk2DEY5NUC_cjs.a,aggregateBudget:Fo(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunk2DEY5NUC_cjs.c:Math.max(0,chunk2DEY5NUC_cjs.c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunk2DEY5NUC_cjs.c)throw new chunkAXU63LYW_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunk2DEY5NUC_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkKE6ZWRIY_cjs.pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkZDFJW5XS_cjs.va(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof chunkAXU63LYW_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunkAXU63LYW_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkAXU63LYW_cjs.i(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new chunkAXU63LYW_cjs.h("aborted","Export resource settlement was aborted"):new chunkAXU63LYW_cjs.h("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t={}){let n=chunkSZURLHR3_cjs.k(t.fontShaping,chunkSZURLHR3_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p=(async()=>{let l=bo(t.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,chunkALD626VU_cjs.c),c=chunkALD626VU_cjs.D(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkALD626VU_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkALD626VU_cjs.c),defaultFamily:chunkALD626VU_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkALD626VU_cjs.f(m??{}),g=chunkALD626VU_cjs.F(x,c),S=chunkALD626VU_cjs.G(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d,void 0,f.dropped);ne(F,t),re(F,t,t.glyphFallbacks);return}let h=await Lt(chunkSZURLHR3_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d,h.resolveFont,f.dropped,S);return ne(b,t),re(b,t,t.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,wo(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new chunkAXU63LYW_cjs.h(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=chunkUYCGCVZ2_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkALD626VU_cjs.B(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkALD626VU_cjs.y(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkALD626VU_cjs.u(e.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=chunkKE6ZWRIY_cjs.ti(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkKE6ZWRIY_cjs.ui(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkKE6ZWRIY_cjs.Jc(r),i=chunkKE6ZWRIY_cjs.Ic(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkKE6ZWRIY_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkKE6ZWRIY_cjs.pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=chunk2DEY5NUC_cjs.Gc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=chunkKE6ZWRIY_cjs.Aa||c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunk2DEY5NUC_cjs.Td(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunk2DEY5NUC_cjs.Jc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkKE6ZWRIY_cjs.Jg(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunk2DEY5NUC_cjs.Lc(n),x){let g=chunk2DEY5NUC_cjs.Ic(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunk2DEY5NUC_cjs.Ic(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunk2DEY5NUC_cjs.Sd(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}chunk2DEY5NUC_cjs.Mc(n);}continue}if(c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunk2DEY5NUC_cjs.Kc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunk2DEY5NUC_cjs.Nc(n)&&c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:chunkKE6ZWRIY_cjs.Ba(c,E)});}}chunk2DEY5NUC_cjs.Hc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkKE6ZWRIY_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkKE6ZWRIY_cjs.pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkKE6ZWRIY_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=chunkUYCGCVZ2_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(chunk2DEY5NUC_cjs.sc),r.namespaceUri===chunkKE6ZWRIY_cjs.pa&&r.localName==="sym"&&t(chunkUYCGCVZ2_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkKE6ZWRIY_cjs.Ud(r)),r.namespaceUri===chunkKE6ZWRIY_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunk2DEY5NUC_cjs.Rd(s??"")?.font??null);}if(r.namespaceUri===chunkKE6ZWRIY_cjs.pa&&r.localName==="p")for(let s of chunkALD626VU_cjs.A(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunk2DEY5NUC_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunk2DEY5NUC_cjs.a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
2
+ Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkAXU63LYW_cjs.h}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkAXU63LYW_cjs.d}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkAXU63LYW_cjs.c}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkAXU63LYW_cjs.i}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=ho;exports.createPackagedFileFetch=Vo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=Eo;exports.openFontBackedDocumentForExport=So;exports.replayMetafile=Yt;