@docx-editor.dev/core 2.35.0 → 2.35.1-canary.20261106032727.sha-b131138
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.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +8 -8
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +12 -12
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-H0uSxdg3.d.ts → chrome-print-D77Z2MRQ.d.ts} +11 -11
- package/dist/{chunk-LMASPHYS.js → chunk-27XCGHXI.js} +1 -1
- package/dist/chunk-2JVOX642.cjs +236 -0
- package/dist/{chunk-2C75IWUN.cjs → chunk-462QYTNK.cjs} +1 -1
- package/dist/{chunk-JGE2O6IF.cjs → chunk-5QL7GBV2.cjs} +2 -2
- package/dist/{chunk-4NISR27M.cjs → chunk-7AFHVNPA.cjs} +13 -13
- package/dist/{chunk-6767S7UF.js → chunk-ASWUP7GU.js} +1 -1
- package/dist/{chunk-K2BBJDM7.js → chunk-CCM264XP.js} +1 -1
- package/dist/{chunk-NYZP5NM3.js → chunk-CORSCVCC.js} +1 -1
- package/dist/{chunk-Q5YVLUGG.js → chunk-FIT3HAWE.js} +1 -1
- package/dist/{chunk-SJV6WCTP.cjs → chunk-FTEXTGTC.cjs} +1 -1
- package/dist/{chunk-66ZAVRGB.js → chunk-GOXXQ2G3.js} +1 -1
- package/dist/{chunk-WWZWT26M.cjs → chunk-GP46C4QJ.cjs} +1 -1
- package/dist/{chunk-QDUMZYTX.js → chunk-I7C2C6IZ.js} +1 -1
- package/dist/chunk-KIDYIVZ5.js +236 -0
- package/dist/{chunk-6BZINLEN.cjs → chunk-Q3OARWRD.cjs} +1 -1
- package/dist/{chunk-QLANEOTJ.cjs → chunk-QHE5FKW3.cjs} +4 -4
- package/dist/{chunk-TMCMXIBT.js → chunk-R6SVC45W.js} +4 -4
- package/dist/{chunk-Y3JSN52G.cjs → chunk-RB55BB5N.cjs} +1 -1
- package/dist/{chunk-FLEFHRJG.cjs → chunk-RFM64DRG.cjs} +5 -5
- package/dist/{chunk-UAUB5YV6.js → chunk-RTOCN5IQ.js} +1 -1
- package/dist/{chunk-2V3V57SC.js → chunk-SCK44KXL.js} +1 -1
- package/dist/{chunk-5ZE7ROGP.js → chunk-STK3RNDU.js} +1 -1
- package/dist/{chunk-QALWAAPL.cjs → chunk-TRNTPFVY.cjs} +2 -2
- package/dist/{chunk-CBJMRC4L.cjs → chunk-TUSRTFEW.cjs} +1 -1
- package/dist/{chunk-FMSXJ22B.js → chunk-UMSQMNZU.js} +1 -1
- package/dist/{chunk-I4OZW2NO.js → chunk-V5NOTQ6L.js} +1 -1
- package/dist/{chunk-AVGSD7FB.js → chunk-XEGE36HF.js} +1 -1
- package/dist/{chunk-32YOHLEK.cjs → chunk-Y6FY46N6.cjs} +23 -23
- package/dist/{chunk-DSIDCA3V.cjs → chunk-YRJYEXVN.cjs} +4 -4
- package/dist/{chunk-TY5CE2JR.cjs → chunk-ZG6KPMLF.cjs} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +2 -2
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +8 -8
- package/dist/contracts/modules.d.ts +10 -10
- package/dist/contracts/types.d.ts +3 -3
- package/dist/{custom-node-writes-Cj0itq58.d.ts → custom-node-writes-BXn8hCVV.d.ts} +2 -2
- package/dist/{document-protection-CDLoYQI3.d.ts → document-protection-CfNgyZ4W.d.ts} +1 -1
- package/dist/{drawing-graphic-kind-8zt6pugF.d.ts → drawing-graphic-kind-C_kXByHh.d.ts} +2 -2
- package/dist/{drawing-preview-package-8o9LSfzP.d.ts → drawing-preview-package-W4jCeIW0.d.ts} +1 -1
- package/dist/{editor-CujQcn1z.d.ts → editor-CG4FJl_e.d.ts} +4 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.ts +25 -25
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +6 -6
- package/dist/export.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-ZjLRz_qa.d.ts → layout-shaping-Cxkd9f_f.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +17 -17
- package/dist/layout.js +1 -1
- package/dist/{note-properties-BRpskBeh.d.ts → note-properties-DvCg9hqk.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +10 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-GVVQQwCX.d.ts → protocol-BVr4_nzI.d.ts} +2 -2
- package/dist/{review-paragraph-order-aEHnQTt7.d.ts → review-paragraph-order-cFZfc4oS.d.ts} +1 -1
- package/dist/{revision-projection-vU_UiTLx.d.ts → revision-projection-BcWPdgFd.d.ts} +1 -1
- package/dist/{semantic-cell-selection-CaRIISu-.d.ts → semantic-cell-selection-CYS_l73g.d.ts} +2 -2
- package/dist/{semantic-interaction-LJtUJJS5.d.ts → semantic-interaction-DyXHZhFO.d.ts} +1 -1
- package/dist/{semantic-paint-2LBYlQcn.d.ts → semantic-paint-ChK1a0Qd.d.ts} +4 -4
- package/dist/{semantic-record-queries-C_YK2gCz.d.ts → semantic-record-queries-CYAipThi.d.ts} +1 -1
- package/dist/{semantic-records-AU2pIYRp.d.ts → semantic-records-D0NEAzyD.d.ts} +3 -3
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +12 -12
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-DmrePCMo.d.ts → tree-op-types-Ds9-dl3T.d.ts} +7 -1
- package/dist/{tree-package-fragment-DXZ2B7x0.d.ts → tree-package-fragment-Cya6ExyS.d.ts} +1 -1
- package/dist/{tree-session-contract-D3e-5YNq.d.ts → tree-session-contract-DiNorPOQ.d.ts} +4 -4
- package/dist/{unsupported-elements-9Pz4I_F6.d.ts → unsupported-elements-CJ33VvL9.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-DCILO4XD.cjs +0 -236
- package/dist/chunk-P3XUE72N.js +0 -236
package/dist/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{mc as AUTO_ZOOM_MODE,sc as BROWSER_AUTOMATION_CAPABILITIES,Bb as CHROME_GROUPS,Fb as CHROME_MENUS,od as CHROME_PRINT_DISPLAY_MODES,Ib as CHROME_UNAVAILABLE_KEY,rd as COMPARE_DOCUMENTS_ACCEPT,td as COMPARE_DOCUMENTS_PHASE_ATTRIBUTE,Nb as CONTENT_CONTROL_PICTURE_ACCEPT,kd as ChromeExportError,md as ChromePrintError,c as DEFAULT_REVIEW_PANE,Ba as DEFAULT_TABLE_CHROME_DRAFT,ea as DEFAULT_WATERMARK_FONT,bd as DocumentRefreshError,na as EMU_PER_POINT,nc as FIT_WIDTH_ZOOM_MODE,dd as HIGHLIGHT_REFRESH_MS,wa as IMAGE_OVERLAY_NUDGE_PT,xa as IMAGE_OVERLAY_NUDGE_SHIFT_PT,_c as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,Pc as NO_MIXED_FIELDS,M as PX_PER_CM,L as PX_PER_INCH,jc as REVIEW_MARKERS_GUTTER_PX,fd as SEARCH_DEBOUNCE_MS,id as SEARCH_HIGHLIGHT_PRIORITY,hd as SEARCH_HIGHLIGHT_SET,gd as SEARCH_MATCH_LIMIT,S as SNAP_TWIPS_CM,R as SNAP_TWIPS_INCH,Wc 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,Lc as TAB_ALIGNMENT_LABELS,$a as TOOLBAR_COLLAPSE_ORDER,jb as TOOLBAR_HOST_ITEM,ib as TOOLBAR_ITEM_ATTRIBUTE,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,lc as ZOOM_MAX,kc as ZOOM_MIN,Tc as alignmentAfterDirectionChange,Ja as applyTableChromePick,$ as applyThemeShade,_ as applyThemeTint,eb as arrangeToolbarGroups,vb as barRoomWidth,ic as beginEditorPreview,Zc as bindHistoryGroup,h as blankDocumentBytes,Ad as bookmarkDialogInitialName,Bd as bookmarkDialogNameState,vd as bookmarkDialogRows,Vb as calendarDateForKey,Xb as calendarDateFromText,Wb as calendarDateText,Tb as calendarMonth,Yb as calendarMonthNames,Rb as calendarMonthTitle,Sb as calendarWeekdays,ua as canExecuteImageCommand,ta as captureImageMutationPreconditions,Sc as changedFields,zb as chordLetter,Hb as chromeControlCount,Gb as chromeMenuSlots,Na as chromeProbeForSlot,Cb as chromeSlotId,Ta as chromeSlotIsToggle,C as clipboardDropLandsText,B as clipboardPasteLandsContent,db as collapseOrder,Y as commandExecOptions,Oa as commandForSlot,Qa as commandForSlotValue,Pa as commandForTableChromeSlotValue,sd as compareDocumentsErrorKey,Fc as computeImageResizeResult,ra as computeMovedImagePosition,qa as computeResizedImageExtentEmu,Lb as contentControlPopupKeyDown,Mb as contentControlPopupOpener,wb as controlsOverflow,E as copyEditorStyles,tc as createBrowserAutomationHost,Zb as createContentControlListNavigation,cd as createDocumentRefresh,jd as createDocumentSearch,rc as createDocxEditor,J as createFontSource,Gc as createImageOverlayScrollPort,b as createLayoutShaping,la as cropPercentFromCropPermille,ja as cropPercentFromPermille,ga as cropPercentFromSourceCrop,ka as cropPermilleFromCropPercent,ia as cropPermilleFromPercent,Bc as cssPixelsToLayoutPoints,K as customFonts,Db as defaultChromeGroups,Da as defaultTableLabel,g as deferFonts,V as dragIndent,Dd as drawingPreviewDocx,_a as editorCommandKey,l as editorHostDocument,k as editorHostElement,m as editorHostWindow,uc as editorInstanceScope,hc as editorPreviewActive,pa as emuToOverlayPoints,ac as equationAtPosition,va as executeImageCommand,Hc as finalizeImageOverlayInteraction,Qb as firstDayOfWeek,ud as focusCompareDocumentsControl,Jc as formatInches,Eb as formattingBarChromeGroups,N as generateRulerTicks,zd as goToBookmarkGroups,yd as goToBookmarkMatch,wd as goToBookmarkRows,xd as goToBookmarkTarget,T as handlePosition,wc as hasOpenNestedPopup,$b as historyShortcutOf,z as hostDirectionOf,i as hostDocumentOf,r as hostTimers,j as hostWindowOf,Kc as inchesToTwips,pd as initialChromePrintSettings,Yc as initialSplitCellCounts,nd as isChromePrintShortcut,q as isDomNode,n as isElementNode,Ab 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,Ob as isoDateOf,w as keepScrollAtInlineEnd,Ac as layoutPointsToCssPixels,ad as lineSpacingMenuRowLabel,$c as lineSpacingMenuRows,yc as listenForOutsidePress,vc as listenForPopupEscape,xc as listenForPopupFocusLeave,I as loadFonts,ba as lowerColorValueForBorder,ca as lowerColorValueForFill,Qc as mixedFieldsOf,bc as mountPaginatedSurface,Kb as observeContentControlPopup,A as observeHostDirection,D as openEditorWindow,Cc as overlayFrameToSheetCssPixels,Dc as overlayHostOrigin,Pb as parseIsoDate,H as partOfNodeId,x as placeSubmenu,oa as pointsToEmu,Jb as positionContentControlPopup,Ka as probeTableChromeCommand,xb as readAvailableWidth,ub as readColumnGap,tb as readInlineMargins,Xc as readSplitCellCounts,yb as readToolbarRow,gc as reportAutomationException,ec as reportAutomationRefusal,fc as reportAutomationReviewSkip,Ec as resizePreservesAspect,da as resolveColorValueToCss,d as resolveReviewPane,aa as resolveThemeColorHex,oc as resolveZoomMode,qc as reviewPaneEntitledZoom,e as reviewPaneListsItem,X as rulerMarginTicks,O as rulerPageBox,W as rulerTabPosition,ld as runChromeExport,qd as runChromePrint,Xa as runSave,Va as runTableChromeCommand,Za as runTableCommand,Wa as runToolbarCommand,pb as sameItemOverflow,Rc as sameTabStops,pc as sameZoomMode,Oc as seedFields,ya as selectedDrawingOverlayTargetOf,sa as selectedImageStateOf,rb as separatorLeadingCost,Ub as shiftMonth,Nc as signedFirstLineOf,U as snapTwips,ha as sourceCropFromCropPercent,Mc as specialOf,F as storyLabelTop,y as submenuKeys,_b as surfaceExtent,zc 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,mb as toolbarGroupItems,cb as toolbarGroupPriority,lb as toolbarGroupsKey,nb as toolbarHostPanelShown,kb as toolbarItemKey,qb as toolbarOverflowItems,gb as toolbarPanelPlacement,hb as toolbarPopupLeft,ob as toolbarShownCount,sb as trailingGapCost,Vc as trapTabWithin,Ic as twipsToInches,Cd as unsupportedElementRuleMatches,ma as validateImageCropPercent,Z as validateThemeModifier,ed as watchHighlights,fa as watermarkShapeBox,Uc as withTabStop}from'./chunk-
|
|
1
|
+
export{mc as AUTO_ZOOM_MODE,sc as BROWSER_AUTOMATION_CAPABILITIES,Bb as CHROME_GROUPS,Fb as CHROME_MENUS,od as CHROME_PRINT_DISPLAY_MODES,Ib as CHROME_UNAVAILABLE_KEY,rd as COMPARE_DOCUMENTS_ACCEPT,td as COMPARE_DOCUMENTS_PHASE_ATTRIBUTE,Nb as CONTENT_CONTROL_PICTURE_ACCEPT,kd as ChromeExportError,md as ChromePrintError,c as DEFAULT_REVIEW_PANE,Ba as DEFAULT_TABLE_CHROME_DRAFT,ea as DEFAULT_WATERMARK_FONT,bd as DocumentRefreshError,na as EMU_PER_POINT,nc as FIT_WIDTH_ZOOM_MODE,dd as HIGHLIGHT_REFRESH_MS,wa as IMAGE_OVERLAY_NUDGE_PT,xa as IMAGE_OVERLAY_NUDGE_SHIFT_PT,_c as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,Pc as NO_MIXED_FIELDS,M as PX_PER_CM,L as PX_PER_INCH,jc as REVIEW_MARKERS_GUTTER_PX,fd as SEARCH_DEBOUNCE_MS,id as SEARCH_HIGHLIGHT_PRIORITY,hd as SEARCH_HIGHLIGHT_SET,gd as SEARCH_MATCH_LIMIT,S as SNAP_TWIPS_CM,R as SNAP_TWIPS_INCH,Wc 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,Lc as TAB_ALIGNMENT_LABELS,$a as TOOLBAR_COLLAPSE_ORDER,jb as TOOLBAR_HOST_ITEM,ib as TOOLBAR_ITEM_ATTRIBUTE,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,lc as ZOOM_MAX,kc as ZOOM_MIN,Tc as alignmentAfterDirectionChange,Ja as applyTableChromePick,$ as applyThemeShade,_ as applyThemeTint,eb as arrangeToolbarGroups,vb as barRoomWidth,ic as beginEditorPreview,Zc as bindHistoryGroup,h as blankDocumentBytes,Ad as bookmarkDialogInitialName,Bd as bookmarkDialogNameState,vd as bookmarkDialogRows,Vb as calendarDateForKey,Xb as calendarDateFromText,Wb as calendarDateText,Tb as calendarMonth,Yb as calendarMonthNames,Rb as calendarMonthTitle,Sb as calendarWeekdays,ua as canExecuteImageCommand,ta as captureImageMutationPreconditions,Sc as changedFields,zb as chordLetter,Hb as chromeControlCount,Gb as chromeMenuSlots,Na as chromeProbeForSlot,Cb as chromeSlotId,Ta as chromeSlotIsToggle,C as clipboardDropLandsText,B as clipboardPasteLandsContent,db as collapseOrder,Y as commandExecOptions,Oa as commandForSlot,Qa as commandForSlotValue,Pa as commandForTableChromeSlotValue,sd as compareDocumentsErrorKey,Fc as computeImageResizeResult,ra as computeMovedImagePosition,qa as computeResizedImageExtentEmu,Lb as contentControlPopupKeyDown,Mb as contentControlPopupOpener,wb as controlsOverflow,E as copyEditorStyles,tc as createBrowserAutomationHost,Zb as createContentControlListNavigation,cd as createDocumentRefresh,jd as createDocumentSearch,rc as createDocxEditor,J as createFontSource,Gc as createImageOverlayScrollPort,b as createLayoutShaping,la as cropPercentFromCropPermille,ja as cropPercentFromPermille,ga as cropPercentFromSourceCrop,ka as cropPermilleFromCropPercent,ia as cropPermilleFromPercent,Bc as cssPixelsToLayoutPoints,K as customFonts,Db as defaultChromeGroups,Da as defaultTableLabel,g as deferFonts,V as dragIndent,Dd as drawingPreviewDocx,_a as editorCommandKey,l as editorHostDocument,k as editorHostElement,m as editorHostWindow,uc as editorInstanceScope,hc as editorPreviewActive,pa as emuToOverlayPoints,ac as equationAtPosition,va as executeImageCommand,Hc as finalizeImageOverlayInteraction,Qb as firstDayOfWeek,ud as focusCompareDocumentsControl,Jc as formatInches,Eb as formattingBarChromeGroups,N as generateRulerTicks,zd as goToBookmarkGroups,yd as goToBookmarkMatch,wd as goToBookmarkRows,xd as goToBookmarkTarget,T as handlePosition,wc as hasOpenNestedPopup,$b as historyShortcutOf,z as hostDirectionOf,i as hostDocumentOf,r as hostTimers,j as hostWindowOf,Kc as inchesToTwips,pd as initialChromePrintSettings,Yc as initialSplitCellCounts,nd as isChromePrintShortcut,q as isDomNode,n as isElementNode,Ab 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,Ob as isoDateOf,w as keepScrollAtInlineEnd,Ac as layoutPointsToCssPixels,ad as lineSpacingMenuRowLabel,$c as lineSpacingMenuRows,yc as listenForOutsidePress,vc as listenForPopupEscape,xc as listenForPopupFocusLeave,I as loadFonts,ba as lowerColorValueForBorder,ca as lowerColorValueForFill,Qc as mixedFieldsOf,bc as mountPaginatedSurface,Kb as observeContentControlPopup,A as observeHostDirection,D as openEditorWindow,Cc as overlayFrameToSheetCssPixels,Dc as overlayHostOrigin,Pb as parseIsoDate,H as partOfNodeId,x as placeSubmenu,oa as pointsToEmu,Jb as positionContentControlPopup,Ka as probeTableChromeCommand,xb as readAvailableWidth,ub as readColumnGap,tb as readInlineMargins,Xc as readSplitCellCounts,yb as readToolbarRow,gc as reportAutomationException,ec as reportAutomationRefusal,fc as reportAutomationReviewSkip,Ec as resizePreservesAspect,da as resolveColorValueToCss,d as resolveReviewPane,aa as resolveThemeColorHex,oc as resolveZoomMode,qc as reviewPaneEntitledZoom,e as reviewPaneListsItem,X as rulerMarginTicks,O as rulerPageBox,W as rulerTabPosition,ld as runChromeExport,qd as runChromePrint,Xa as runSave,Va as runTableChromeCommand,Za as runTableCommand,Wa as runToolbarCommand,pb as sameItemOverflow,Rc as sameTabStops,pc as sameZoomMode,Oc as seedFields,ya as selectedDrawingOverlayTargetOf,sa as selectedImageStateOf,rb as separatorLeadingCost,Ub as shiftMonth,Nc as signedFirstLineOf,U as snapTwips,ha as sourceCropFromCropPercent,Mc as specialOf,F as storyLabelTop,y as submenuKeys,_b as surfaceExtent,zc 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,mb as toolbarGroupItems,cb as toolbarGroupPriority,lb as toolbarGroupsKey,nb as toolbarHostPanelShown,kb as toolbarItemKey,qb as toolbarOverflowItems,gb as toolbarPanelPlacement,hb as toolbarPopupLeft,ob as toolbarShownCount,sb as trailingGapCost,Vc as trapTabWithin,Ic as twipsToInches,Cd as unsupportedElementRuleMatches,ma as validateImageCropPercent,Z as validateThemeModifier,ed as watchHighlights,fa as watermarkShapeBox,Uc as withTabStop}from'./chunk-STK3RNDU.js';export{a as resolveEditorModules}from'./chunk-YD3KSZJM.js';export{c as observeUnsupportedElements}from'./chunk-R6SVC45W.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-UMSQMNZU.js';export{t as disposeLayoutShaping}from'./chunk-SCK44KXL.js';import'./chunk-RIYSCEFQ.js';import'./chunk-RTOCN5IQ.js';import'./chunk-27XCGHXI.js';export{hb as DEFAULT_REVISION_MARKUP,gb as REVISION_MARKUP_COLORS,ib as resolveRevisionMarkup}from'./chunk-CCM264XP.js';import'./chunk-XEGE36HF.js';import'./chunk-I7C2C6IZ.js';import'./chunk-FIT3HAWE.js';import'./chunk-ASWUP7GU.js';import'./chunk-GOXXQ2G3.js';import'./chunk-CORSCVCC.js';import'./chunk-WN7ICTA5.js';import'./chunk-V5NOTQ6L.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,kn as DRAWING_REL_FROM_H,ln as DRAWING_REL_FROM_V,Oe as IMAGE_WRAP_TARGETS,Gk as TEXT_FORM_FORMATS,nn as positionInputFromPropertiesCommand,mn as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,Sf as resolveSvgIntrinsicSize,Of as sniffImageMime,jn as validateDrawingPositionInput,Tf as validateRasterHeader,on as validateSetImagePositionCommand}from'./chunk-KIDYIVZ5.js';import'./chunk-S6J4O5XP.js';
|
package/dist/export.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkY3JSN52G_cjs=require('./chunk-Y3JSN52G.cjs'),chunkJGE2O6IF_cjs=require('./chunk-JGE2O6IF.cjs'),chunk6BZINLEN_cjs=require('./chunk-6BZINLEN.cjs'),chunk32YOHLEK_cjs=require('./chunk-32YOHLEK.cjs'),chunkSJV6WCTP_cjs=require('./chunk-SJV6WCTP.cjs');require('./chunk-WWZWT26M.cjs'),require('./chunk-2C75IWUN.cjs');var chunkQALWAAPL_cjs=require('./chunk-QALWAAPL.cjs'),chunkDCILO4XD_cjs=require('./chunk-DCILO4XD.cjs');function Yt(e,o,t){let n=chunkDCILO4XD_cjs.be().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:chunk32YOHLEK_cjs.n(y+Math.round(b.originX*f)),originY:chunk32YOHLEK_cjs.n(Math.round(b.originY*f)),offsetX:chunk32YOHLEK_cjs.n(Math.round(b.offsetX*f)),offsetY:chunk32YOHLEK_cjs.n(Math.round(b.offsetY*f)),advanceX:chunk32YOHLEK_cjs.n(Math.round(b.advanceX*f)),advanceY:chunk32YOHLEK_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=chunk32YOHLEK_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:chunk32YOHLEK_cjs.n(T.advance+I),caretEdges:[chunk32YOHLEK_cjs.n(0),chunk32YOHLEK_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=>chunk32YOHLEK_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:chunk32YOHLEK_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:chunk32YOHLEK_cjs.n(c+h.originX),originY:chunk32YOHLEK_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 chunk32YOHLEK_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunk32YOHLEK_cjs.n(f),descent:chunk32YOHLEK_cjs.n(E),lineGap:chunk32YOHLEK_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 chunk32YOHLEK_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 chunk32YOHLEK_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:chunk32YOHLEK_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=chunk32YOHLEK_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:chunk32YOHLEK_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunk32YOHLEK_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 chunk32YOHLEK_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 chunkY3JSN52G_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 chunkY3JSN52G_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 chunk6BZINLEN_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=chunk32YOHLEK_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 chunk32YOHLEK_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=chunk32YOHLEK_cjs.Ga(n.style,n.fontSlot),r=chunk32YOHLEK_cjs.Ed(n)?chunk32YOHLEK_cjs.Fd(n):chunk32YOHLEK_cjs.na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkDCILO4XD_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkJGE2O6IF_cjs.Q(e.shaper,e.environment,i,a,t))return null;let p=chunkJGE2O6IF_cjs.P(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=chunk32YOHLEK_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunkJGE2O6IF_cjs.d(),chunkJGE2O6IF_cjs.h({...chunkJGE2O6IF_cjs.i,maxFontBytes:chunk32YOHLEK_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunkJGE2O6IF_cjs.ga(e,{resolveFont(t){return St(e,o,t)},fallback:chunk32YOHLEK_cjs.ta()})}async function Lt(e,o,t=[],n=false,a){if(!chunkJGE2O6IF_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunkJGE2O6IF_cjs.k(a,chunkJGE2O6IF_cjs.i),s=await At(),i=Et(await chunkJGE2O6IF_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:${chunk32YOHLEK_cjs.sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunkJGE2O6IF_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunkJGE2O6IF_cjs.k(t,chunkJGE2O6IF_cjs.i),a=chunkJGE2O6IF_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunkJGE2O6IF_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=chunkJGE2O6IF_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 chunkJGE2O6IF_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:${chunk32YOHLEK_cjs.sa}`].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=chunkDCILO4XD_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkDCILO4XD_cjs.Sg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkY3JSN52G_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunk32YOHLEK_cjs.h(s))),r=chunkY3JSN52G_cjs.L(t,{maxFontBytes:chunk32YOHLEK_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?chunk32YOHLEK_cjs.c:Math.max(0,chunk32YOHLEK_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>chunk32YOHLEK_cjs.c)throw new chunk6BZINLEN_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunk32YOHLEK_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===chunkDCILO4XD_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=chunkQALWAAPL_cjs.Ba(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 chunk6BZINLEN_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunk6BZINLEN_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunk6BZINLEN_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 chunk6BZINLEN_cjs.h("aborted","Export resource settlement was aborted"):new chunk6BZINLEN_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=chunkJGE2O6IF_cjs.k(t.fontShaping,chunkJGE2O6IF_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,chunkY3JSN52G_cjs.c),c=chunkY3JSN52G_cjs.E(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkY3JSN52G_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkY3JSN52G_cjs.c),defaultFamily:chunkY3JSN52G_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkY3JSN52G_cjs.f(m??{}),g=chunkY3JSN52G_cjs.G(x,c),S=chunkY3JSN52G_cjs.H(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(chunkJGE2O6IF_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 chunk6BZINLEN_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=chunkSJV6WCTP_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkY3JSN52G_cjs.C(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkY3JSN52G_cjs.z(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkY3JSN52G_cjs.v(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=chunkDCILO4XD_cjs.pj(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkDCILO4XD_cjs.qj(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=chunkDCILO4XD_cjs.Sc(r),i=chunkDCILO4XD_cjs.Rc(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===chunkDCILO4XD_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkDCILO4XD_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=chunk32YOHLEK_cjs.Oc(),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>=chunkDCILO4XD_cjs.Aa||c.namespaceUri===chunkDCILO4XD_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkDCILO4XD_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkDCILO4XD_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunk32YOHLEK_cjs.le(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===chunkDCILO4XD_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunk32YOHLEK_cjs.Rc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkDCILO4XD_cjs.jh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunk32YOHLEK_cjs.Tc(n),x){let g=chunk32YOHLEK_cjs.Qc(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=chunk32YOHLEK_cjs.Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunk32YOHLEK_cjs.ke(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);}}chunk32YOHLEK_cjs.Uc(n);}continue}if(c.namespaceUri===chunkDCILO4XD_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunk32YOHLEK_cjs.Sc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunk32YOHLEK_cjs.Vc(n)&&c.namespaceUri===chunkDCILO4XD_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:chunkDCILO4XD_cjs.Ba(c,E)});}}chunk32YOHLEK_cjs.Pc(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===chunkDCILO4XD_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkDCILO4XD_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!==chunkDCILO4XD_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=chunkSJV6WCTP_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(chunk32YOHLEK_cjs.Ac),r.namespaceUri===chunkDCILO4XD_cjs.pa&&r.localName==="sym"&&t(chunkSJV6WCTP_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkDCILO4XD_cjs.$d(r)),r.namespaceUri===chunkDCILO4XD_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunk32YOHLEK_cjs.je(s??"")?.font??null);}if(r.namespaceUri===chunkDCILO4XD_cjs.pa&&r.localName==="p")for(let s of chunkY3JSN52G_cjs.B(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>chunk32YOHLEK_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunk32YOHLEK_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
|
|
1
|
+
'use strict';var chunkRB55BB5N_cjs=require('./chunk-RB55BB5N.cjs'),chunk5QL7GBV2_cjs=require('./chunk-5QL7GBV2.cjs'),chunkQ3OARWRD_cjs=require('./chunk-Q3OARWRD.cjs'),chunkY6FY46N6_cjs=require('./chunk-Y6FY46N6.cjs'),chunkFTEXTGTC_cjs=require('./chunk-FTEXTGTC.cjs');require('./chunk-GP46C4QJ.cjs'),require('./chunk-462QYTNK.cjs');var chunkTRNTPFVY_cjs=require('./chunk-TRNTPFVY.cjs'),chunk2JVOX642_cjs=require('./chunk-2JVOX642.cjs');function Yt(e,o,t){let n=chunk2JVOX642_cjs.be().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:chunkY6FY46N6_cjs.n(y+Math.round(b.originX*f)),originY:chunkY6FY46N6_cjs.n(Math.round(b.originY*f)),offsetX:chunkY6FY46N6_cjs.n(Math.round(b.offsetX*f)),offsetY:chunkY6FY46N6_cjs.n(Math.round(b.offsetY*f)),advanceX:chunkY6FY46N6_cjs.n(Math.round(b.advanceX*f)),advanceY:chunkY6FY46N6_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=chunkY6FY46N6_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:chunkY6FY46N6_cjs.n(T.advance+I),caretEdges:[chunkY6FY46N6_cjs.n(0),chunkY6FY46N6_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=>chunkY6FY46N6_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:chunkY6FY46N6_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:chunkY6FY46N6_cjs.n(c+h.originX),originY:chunkY6FY46N6_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 chunkY6FY46N6_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunkY6FY46N6_cjs.n(f),descent:chunkY6FY46N6_cjs.n(E),lineGap:chunkY6FY46N6_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 chunkY6FY46N6_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 chunkY6FY46N6_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:chunkY6FY46N6_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=chunkY6FY46N6_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:chunkY6FY46N6_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkY6FY46N6_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 chunkY6FY46N6_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 chunkRB55BB5N_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 chunkRB55BB5N_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 chunkQ3OARWRD_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=chunkY6FY46N6_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 chunkY6FY46N6_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=chunkY6FY46N6_cjs.Ga(n.style,n.fontSlot),r=chunkY6FY46N6_cjs.Ed(n)?chunkY6FY46N6_cjs.Fd(n):chunkY6FY46N6_cjs.na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunk2JVOX642_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunk5QL7GBV2_cjs.Q(e.shaper,e.environment,i,a,t))return null;let p=chunk5QL7GBV2_cjs.P(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=chunkY6FY46N6_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunk5QL7GBV2_cjs.d(),chunk5QL7GBV2_cjs.h({...chunk5QL7GBV2_cjs.i,maxFontBytes:chunkY6FY46N6_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunk5QL7GBV2_cjs.ga(e,{resolveFont(t){return St(e,o,t)},fallback:chunkY6FY46N6_cjs.ta()})}async function Lt(e,o,t=[],n=false,a){if(!chunk5QL7GBV2_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk5QL7GBV2_cjs.k(a,chunk5QL7GBV2_cjs.i),s=await At(),i=Et(await chunk5QL7GBV2_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:${chunkY6FY46N6_cjs.sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunk5QL7GBV2_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk5QL7GBV2_cjs.k(t,chunk5QL7GBV2_cjs.i),a=chunk5QL7GBV2_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunk5QL7GBV2_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=chunk5QL7GBV2_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 chunk5QL7GBV2_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:${chunkY6FY46N6_cjs.sa}`].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=chunk2JVOX642_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunk2JVOX642_cjs.Sg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkRB55BB5N_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunkY6FY46N6_cjs.h(s))),r=chunkRB55BB5N_cjs.L(t,{maxFontBytes:chunkY6FY46N6_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?chunkY6FY46N6_cjs.c:Math.max(0,chunkY6FY46N6_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>chunkY6FY46N6_cjs.c)throw new chunkQ3OARWRD_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunkY6FY46N6_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===chunk2JVOX642_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=chunkTRNTPFVY_cjs.Ba(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 chunkQ3OARWRD_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunkQ3OARWRD_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkQ3OARWRD_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 chunkQ3OARWRD_cjs.h("aborted","Export resource settlement was aborted"):new chunkQ3OARWRD_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=chunk5QL7GBV2_cjs.k(t.fontShaping,chunk5QL7GBV2_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,chunkRB55BB5N_cjs.c),c=chunkRB55BB5N_cjs.E(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkRB55BB5N_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkRB55BB5N_cjs.c),defaultFamily:chunkRB55BB5N_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkRB55BB5N_cjs.f(m??{}),g=chunkRB55BB5N_cjs.G(x,c),S=chunkRB55BB5N_cjs.H(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(chunk5QL7GBV2_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 chunkQ3OARWRD_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=chunkFTEXTGTC_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkRB55BB5N_cjs.C(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkRB55BB5N_cjs.z(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkRB55BB5N_cjs.v(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=chunk2JVOX642_cjs.pj(e.currentPackage(),o);if(!t)return [];let n=new Set(chunk2JVOX642_cjs.qj(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=chunk2JVOX642_cjs.Sc(r),i=chunk2JVOX642_cjs.Rc(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===chunk2JVOX642_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunk2JVOX642_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=chunkY6FY46N6_cjs.Oc(),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>=chunk2JVOX642_cjs.Aa||c.namespaceUri===chunk2JVOX642_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunk2JVOX642_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunk2JVOX642_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunkY6FY46N6_cjs.le(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===chunk2JVOX642_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunkY6FY46N6_cjs.Rc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunk2JVOX642_cjs.jh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunkY6FY46N6_cjs.Tc(n),x){let g=chunkY6FY46N6_cjs.Qc(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=chunkY6FY46N6_cjs.Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunkY6FY46N6_cjs.ke(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);}}chunkY6FY46N6_cjs.Uc(n);}continue}if(c.namespaceUri===chunk2JVOX642_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunkY6FY46N6_cjs.Sc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunkY6FY46N6_cjs.Vc(n)&&c.namespaceUri===chunk2JVOX642_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:chunk2JVOX642_cjs.Ba(c,E)});}}chunkY6FY46N6_cjs.Pc(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===chunk2JVOX642_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunk2JVOX642_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!==chunk2JVOX642_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=chunkFTEXTGTC_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(chunkY6FY46N6_cjs.Ac),r.namespaceUri===chunk2JVOX642_cjs.pa&&r.localName==="sym"&&t(chunkFTEXTGTC_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunk2JVOX642_cjs.$d(r)),r.namespaceUri===chunk2JVOX642_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkY6FY46N6_cjs.je(s??"")?.font??null);}if(r.namespaceUri===chunk2JVOX642_cjs.pa&&r.localName==="p")for(let s of chunkRB55BB5N_cjs.B(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>chunkY6FY46N6_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkY6FY46N6_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 chunkQ3OARWRD_cjs.h}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkQ3OARWRD_cjs.d}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkQ3OARWRD_cjs.c}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkQ3OARWRD_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;
|
package/dist/export.d.ts
CHANGED
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
|
-
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions } from './revision-projection-
|
|
11
|
-
import { aC as PreservedImageMime, ax as ImageResourceLimits, aG as SupportedImageMime, aw as ImageDecodePort } from './tree-op-types-
|
|
12
|
-
import { S as SemanticLayout, p as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, q as ListMarkerPictureRecord, T as TextMeasurer, o as FontRequest, r as FontSubstitution, s as ShapedRun, e as StyleSpanRecord } from './semantic-records-
|
|
13
|
-
import { c as DocumentProperties, H as HeadlessDocumentView, d as HeadlessDocumentRejection } from './drawing-graphic-kind-
|
|
10
|
+
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions } from './revision-projection-BcWPdgFd.js';
|
|
11
|
+
import { aC as PreservedImageMime, ax as ImageResourceLimits, aG as SupportedImageMime, aw as ImageDecodePort } from './tree-op-types-Ds9-dl3T.js';
|
|
12
|
+
import { S as SemanticLayout, p as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, q as ListMarkerPictureRecord, T as TextMeasurer, o as FontRequest, r as FontSubstitution, s as ShapedRun, e as StyleSpanRecord } from './semantic-records-D0NEAzyD.js';
|
|
13
|
+
import { c as DocumentProperties, H as HeadlessDocumentView, d as HeadlessDocumentRejection } from './drawing-graphic-kind-C_kXByHh.js';
|
|
14
14
|
import { M as MetafileFont, a as MetafileReplay } from './metafile-drawing-Ce6TuWLm.js';
|
|
15
15
|
export { b as MetafileCommand, c as MetafileDrawing, d as MetafileMatrix, e as MetafilePaint, f as MetafilePathCommand, g as MetafileRaster } from './metafile-drawing-Ce6TuWLm.js';
|
|
16
16
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
17
|
-
import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-
|
|
17
|
+
import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-Cxkd9f_f.js';
|
|
18
18
|
import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-Bm9XqTNO.js';
|
|
19
19
|
import './editor-scope-CA6egMaK.js';
|
|
20
|
-
import './tree-package-fragment-
|
|
20
|
+
import './tree-package-fragment-Cya6ExyS.js';
|
|
21
21
|
import './editor-fonts-D_-vjuJi.js';
|
|
22
22
|
|
|
23
23
|
/** Source content that cannot be certified by the layout snapshot. @public */
|
package/dist/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {c as c$1,E,t,d,f,G as G$1,H as H$1,v,C as C$1,z as z$1,o,L,r,B,q}from'./chunk-FMSXJ22B.js';import {l,j,h,i,n,m,s,p,c as c$2,g,P,O,fa}from'./chunk-2V3V57SC.js';import'./chunk-RIYSCEFQ.js';import {h as h$1,i as i$1}from'./chunk-LMASPHYS.js';export{h as ExportResourceError,d as createNodeImageDecodePort,c as exportDestinationNamed,i as openDocumentForExport}from'./chunk-LMASPHYS.js';import {c,sa,a,Ga,Ed,Fd,na,ta,h as h$2,d as d$1,je,b as b$1,i as i$2,Oc,le as le$1,Rc as Rc$1,Tc,Qc,ke,Uc,Sc as Sc$1,Vc,Pc,r as r$1,u,n as n$1,Ac}from'./chunk-K2BBJDM7.js';import {e,c as c$3,b as b$2}from'./chunk-QDUMZYTX.js';import'./chunk-6767S7UF.js';import'./chunk-66ZAVRGB.js';import {Ba}from'./chunk-NYZP5NM3.js';import {be,pj,qj,Sc,Rc,b,pa,$d,N,Sg,Aa,jh,Ba as Ba$1}from'./chunk-P3XUE72N.js';function Yt(e,o,t){let n=be().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:n$1(y+Math.round(b.originX*f)),originY:n$1(Math.round(b.originY*f)),offsetX:n$1(Math.round(b.offsetX*f)),offsetY:n$1(Math.round(b.offsetY*f)),advanceX:n$1(Math.round(b.advanceX*f)),advanceY:n$1(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=n$1(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:n$1(T.advance+I),caretEdges:[n$1(0),n$1(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=>n$1(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:r$1({...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$1=[],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:n$1(c+h.originX),originY:n$1(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u$1.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 u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u$1.length===i.length?u$1:void 0,metrics:{ascent:n$1(f),descent:n$1(E),lineGap:n$1(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 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 d$1)),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:r$1({...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=b$1;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:i$2(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$1?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 d$1||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$1=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof q))return true;let u=n(l.request.family);return a.has(u)||!r$1.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof 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 h$1("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=h$2(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$1?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=Ga(n.style,n.fontSlot),r=Ed(n)?Fd(n):na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!P(e.shaper,e.environment,i,a,t))return null;let p=O(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=c;function At(){if(U)return U;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return fa(e,{resolveFont(t){return St(e,o,t)},fallback:ta()})}async function Lt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j(a,h),s$1=await At(),i=Et(await s(e,s$1,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:${sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j(t,h),a=i(n$1),r=vt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=C.get(i$1);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=m(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 s(e,f,n$1,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$1,p),p.catch(()=>{C.get(i$1)===p&&C.delete(i$1);});}let l$1=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l$1,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:l$1}));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=N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),Sg(o,n)}function Pt(e,o$1){let t=xo(e);if(t.length!==0)return o(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$2(s))),r=L(t,{maxFontBytes:a,aggregateBudget:Fo(n),shadowedRequests:a$1});if(o$1)for(let s of r.dropped){if(o$1.dropped.length>=ee)break;o$1.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,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>c)throw new h$1("layoutFailed",`Active document export font bytes are limited to ${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===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=Ba(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 h$1&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new h$1("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=i$1(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 h$1("aborted","Export resource settlement was aborted"):new h$1("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$1={}){let n=j(t$1.fontShaping,h);if((t$1.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t$1.timeoutMs),r=new AbortController,s=()=>r.abort(t$1.signal?.reason);t$1.signal?.addEventListener("abort",s,{once:true}),t$1.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p$1=(async()=>{let l=bo(t$1.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,c$1),c=E(e,y),d$1=[],f$1={dropped:[]},E$1=Pt(e,f$1),R=[...o,...E$1?[E$1]:[],...t$1.lastResortFonts??[]],m=await t(R,{families:[...new Set([...(t$1.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,c$1),defaultFamily:d.family,signal:r.signal},{onOriginFailure:F=>d$1.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=f(m??{}),g=G$1(x,c),S=H$1(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d$1,void 0,f$1.dropped);ne(F,t$1),re(F,t$1,t$1.glyphFallbacks);return}let h=await Lt(p(g),void 0,t$1.glyphFallbacks,t$1.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d$1,h.resolveFont,f$1.dropped,S);return ne(b,t$1),re(b,t$1,t$1.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,wo(r.signal)])}finally{clearTimeout(i),t$1.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 h$1(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$1){let o=[e$1.part().root],t=[],n=[],a=new Set([e$1.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e$1.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$1,u));let s=e$1.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=e(u,e$1.stylesRoot(),i,Po(u,y)),d=C$1(u,e$1.numberingRoot(),e$1.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...z$1(u,e$1.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of v(e$1.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=pj(e.currentPackage(),o);if(!t)return [];let n=new Set(qj(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=Sc(r),i=Rc(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===pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===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=Oc(),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>=Aa||c.namespaceUri===pa&&c.localName==="p")continue;let R=c.namespaceUri===pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";le$1(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===pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")Rc$1(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=jh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(Tc(n),x){let g=Qc(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=Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&ke(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);}}Uc(n);}continue}if(c.namespaceUri===pa&&(c.localName==="instrText"||c.localName==="delInstrText")){Sc$1(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&Vc(n)&&c.namespaceUri===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:Ba$1(c,E)});}}Pc(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===pa&&n.localName==="p")){if(n.namespaceUri===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!==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=b$2(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(Ac),r.namespaceUri===pa&&r.localName==="sym"&&t(c$3(Ro(r,"font"))),r.localName==="textpath"&&t($d(r)),r.namespaceUri===pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(je(s??"")?.font??null);}if(r.namespaceUri===pa&&r.localName==="p")for(let s of B(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>a)throw new TypeError(`maxBytes must not exceed ${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})})}
|
|
1
|
+
import {c as c$1,E,t,d,f,G as G$1,H as H$1,v,C as C$1,z as z$1,o,L,r,B,q}from'./chunk-UMSQMNZU.js';import {l,j,h,i,n,m,s,p,c as c$2,g,P,O,fa}from'./chunk-SCK44KXL.js';import'./chunk-RIYSCEFQ.js';import {h as h$1,i as i$1}from'./chunk-27XCGHXI.js';export{h as ExportResourceError,d as createNodeImageDecodePort,c as exportDestinationNamed,i as openDocumentForExport}from'./chunk-27XCGHXI.js';import {c,sa,a,Ga,Ed,Fd,na,ta,h as h$2,d as d$1,je,b as b$1,i as i$2,Oc,le as le$1,Rc as Rc$1,Tc,Qc,ke,Uc,Sc as Sc$1,Vc,Pc,r as r$1,u,n as n$1,Ac}from'./chunk-CCM264XP.js';import {e,c as c$3,b as b$2}from'./chunk-I7C2C6IZ.js';import'./chunk-ASWUP7GU.js';import'./chunk-GOXXQ2G3.js';import {Ba}from'./chunk-CORSCVCC.js';import {be,pj,qj,Sc,Rc,b,pa,$d,N,Sg,Aa,jh,Ba as Ba$1}from'./chunk-KIDYIVZ5.js';function Yt(e,o,t){let n=be().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:n$1(y+Math.round(b.originX*f)),originY:n$1(Math.round(b.originY*f)),offsetX:n$1(Math.round(b.offsetX*f)),offsetY:n$1(Math.round(b.offsetY*f)),advanceX:n$1(Math.round(b.advanceX*f)),advanceY:n$1(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=n$1(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:n$1(T.advance+I),caretEdges:[n$1(0),n$1(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=>n$1(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:r$1({...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$1=[],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:n$1(c+h.originX),originY:n$1(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u$1.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 u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u$1.length===i.length?u$1:void 0,metrics:{ascent:n$1(f),descent:n$1(E),lineGap:n$1(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 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 d$1)),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:r$1({...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=b$1;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:i$2(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$1?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 d$1||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$1=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof q))return true;let u=n(l.request.family);return a.has(u)||!r$1.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof 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 h$1("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=h$2(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$1?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=Ga(n.style,n.fontSlot),r=Ed(n)?Fd(n):na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!P(e.shaper,e.environment,i,a,t))return null;let p=O(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=c;function At(){if(U)return U;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return fa(e,{resolveFont(t){return St(e,o,t)},fallback:ta()})}async function Lt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j(a,h),s$1=await At(),i=Et(await s(e,s$1,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:${sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j(t,h),a=i(n$1),r=vt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=C.get(i$1);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=m(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 s(e,f,n$1,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$1,p),p.catch(()=>{C.get(i$1)===p&&C.delete(i$1);});}let l$1=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l$1,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:l$1}));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=N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),Sg(o,n)}function Pt(e,o$1){let t=xo(e);if(t.length!==0)return o(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$2(s))),r=L(t,{maxFontBytes:a,aggregateBudget:Fo(n),shadowedRequests:a$1});if(o$1)for(let s of r.dropped){if(o$1.dropped.length>=ee)break;o$1.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,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>c)throw new h$1("layoutFailed",`Active document export font bytes are limited to ${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===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=Ba(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 h$1&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new h$1("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=i$1(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 h$1("aborted","Export resource settlement was aborted"):new h$1("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$1={}){let n=j(t$1.fontShaping,h);if((t$1.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t$1.timeoutMs),r=new AbortController,s=()=>r.abort(t$1.signal?.reason);t$1.signal?.addEventListener("abort",s,{once:true}),t$1.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p$1=(async()=>{let l=bo(t$1.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,c$1),c=E(e,y),d$1=[],f$1={dropped:[]},E$1=Pt(e,f$1),R=[...o,...E$1?[E$1]:[],...t$1.lastResortFonts??[]],m=await t(R,{families:[...new Set([...(t$1.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,c$1),defaultFamily:d.family,signal:r.signal},{onOriginFailure:F=>d$1.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=f(m??{}),g=G$1(x,c),S=H$1(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d$1,void 0,f$1.dropped);ne(F,t$1),re(F,t$1,t$1.glyphFallbacks);return}let h=await Lt(p(g),void 0,t$1.glyphFallbacks,t$1.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d$1,h.resolveFont,f$1.dropped,S);return ne(b,t$1),re(b,t$1,t$1.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,wo(r.signal)])}finally{clearTimeout(i),t$1.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 h$1(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$1){let o=[e$1.part().root],t=[],n=[],a=new Set([e$1.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e$1.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$1,u));let s=e$1.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=e(u,e$1.stylesRoot(),i,Po(u,y)),d=C$1(u,e$1.numberingRoot(),e$1.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...z$1(u,e$1.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of v(e$1.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=pj(e.currentPackage(),o);if(!t)return [];let n=new Set(qj(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=Sc(r),i=Rc(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===pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===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=Oc(),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>=Aa||c.namespaceUri===pa&&c.localName==="p")continue;let R=c.namespaceUri===pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";le$1(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===pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")Rc$1(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=jh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(Tc(n),x){let g=Qc(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=Qc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&ke(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);}}Uc(n);}continue}if(c.namespaceUri===pa&&(c.localName==="instrText"||c.localName==="delInstrText")){Sc$1(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&Vc(n)&&c.namespaceUri===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:Ba$1(c,E)});}}Pc(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===pa&&n.localName==="p")){if(n.namespaceUri===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!==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=b$2(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(Ac),r.namespaceUri===pa&&r.localName==="sym"&&t(c$3(Ro(r,"font"))),r.localName==="textpath"&&t($d(r)),r.namespaceUri===pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(je(s??"")?.font??null);}if(r.namespaceUri===pa&&r.localName==="p")for(let s of B(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>a)throw new TypeError(`maxBytes must not exceed ${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
2
|
export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,ho as acquireSharedExportShaping,Vo as createPackagedFileFetch,te as hasExportAdmittedFont,ie as hasExportLaidOutText,Eo as hasFontBackedExportCapabilities,So as openFontBackedDocumentForExport,Yt as replayMetafile};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk7AFHVNPA_cjs=require('./chunk-7AFHVNPA.cjs');require('./chunk-2NFQ7OXY.cjs'),require('./chunk-YRJYEXVN.cjs');var chunkRB55BB5N_cjs=require('./chunk-RB55BB5N.cjs');require('./chunk-5QL7GBV2.cjs');var chunkQHE5FKW3_cjs=require('./chunk-QHE5FKW3.cjs');require('./chunk-Q3OARWRD.cjs'),require('./chunk-Y6FY46N6.cjs'),require('./chunk-RFM64DRG.cjs'),require('./chunk-FTEXTGTC.cjs'),require('./chunk-TUSRTFEW.cjs'),require('./chunk-GP46C4QJ.cjs'),require('./chunk-462QYTNK.cjs'),require('./chunk-TRNTPFVY.cjs'),require('./chunk-2CWQY27B.cjs'),require('./chunk-ZG6KPMLF.cjs'),require('./chunk-2JVOX642.cjs'),require('./chunk-UKVVUHZL.cjs');var N=1;var _={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,compareDocuments:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,openCompareDocumentsDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,removeToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function K(){return Object.keys(_)}Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Bb}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Fb}});Object.defineProperty(exports,"CHROME_PRINT_DISPLAY_MODES",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.od}});Object.defineProperty(exports,"COMPARE_DOCUMENTS_ACCEPT",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.rd}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.kd}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.md}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Zc}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.h}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Gb}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Oa}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Qa}});Object.defineProperty(exports,"compareDocumentsErrorKey",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.sd}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.rc}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.J}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.K}});Object.defineProperty(exports,"deferFonts",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.g}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.cc}});Object.defineProperty(exports,"initialChromePrintSettings",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.pd}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.nd}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.I}});Object.defineProperty(exports,"reviewCodeOfRefusal",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.dc}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.ld}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.qd}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Wa}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunk7AFHVNPA_cjs.Sa}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.n}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.m}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.s}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.o}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkRB55BB5N_cjs.p}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.H}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.z}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.y}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunkQHE5FKW3_cjs.C}});exports.DIAGNOSTIC_SCHEMA_VERSION=N;exports.diagnosticCommands=K;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
* @packageDocumentation
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
|
-
import { X as ExecErrorCode } from './tree-op-types-
|
|
28
|
-
export { M as Block, an as COMPARE_DOCUMENTS_ACCEPT, N as ColorValue, e as CommentRecord, c as CompareDocumentsBackgroundEngine, f as CompareDocumentsBackgroundResult, ao as CompareDocumentsChromeHandlers, C as CompareDocumentsDialogSession, b as CompareDocumentsEngine, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, k as CompareDocumentsOutcome, l as CompareDocumentsPhase, m as CompareDocumentsProgress, n as CompareDocumentsRefusalReason, o as CompareDocumentsRequest, G as ContainerRef, P as ContentControl, H as ContentControlFilter, z as ContentControlType, p as ContentTypeIndex, Q as DocAnchor, U as DocAnchorRange, L as DocComment, V as DocLocation, J as DocRange, A as DocTarget, W as DocumentBody, D as DocxDocument, ap as DocxDocumentJSON, aq as DrawingHorizontalReferenceFrame, ar as DrawingKind, as as DrawingLocks, at as DrawingPositionInput, au as DrawingVerticalReferenceFrame, E as ExecResult, F as Extent, av as FontDefinition, Y as HeaderFooterSet, aw as ImageDecodePort, ax as ImageResourceLimits, ay as ImageResourceState, az as ImageWrapTarget, Z as IndentFormatting, I as InsertableContentControlType, _ as NumberingRef, q as OoxmlExternalTarget, r as OoxmlPackage, $ as PageMargins, a0 as Paragraph, a1 as ParagraphDisagreements, a2 as ParagraphFlags, aA as ParagraphFormatCommand, a3 as ParagraphTabStop, aB as Point, aC as PreservedImageMime, aD as Rect, s as RelationshipRecord, aE as RenderableImageMime, t as ReviewCommentItem, u as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, v as ReviewPosition, w as ReviewRange, d as ReviewRevisionItem, x as ReviewRevisionKind, K as Revision, y as RevisionAddress, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal, ac as RevisionType, ad as Run, B as RunFormatting, ae as Section, af as SectionProperties, aF as SelectionPin, ag as StyleDefinition, S as StyleDefinitions, aG as SupportedImageMime, ah as Table, ai as TableCell, aj as TableRow, T as TargetMode, ak as Theme, al as ThemeColorScheme, aH as Unsubscribe, aI as ValidatedImageBytesHandle, aJ as VectorImageMime, aK as Watermark, aL as WatermarkLayout, aM as WatermarkState, aN as compareDocumentsErrorKey } from './tree-op-types-
|
|
29
|
-
export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-fragment-
|
|
30
|
-
export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-
|
|
31
|
-
import { b as EditorCommand } from './editor-
|
|
32
|
-
export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, B as BookmarkPlace, e as BookmarkStory, f as BookmarkSummary, C as CanResult, g as ClearAnchorHighlightOptions, h as CollaborationParticipantsDiagnostic, i as CollaborationStatusDiagnostic, j as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, k as DiagnosticBase, l as DiagnosticFailureDetail, m as DocumentChange, n as DocumentEditingMode, o as DocumentHandle, p as DocumentOpenDiagnostic, q as DocumentOpenFailure, r as DocumentOpenFailureReason, s as DocumentSaveDiagnostic, t as DocumentShape, u as DocumentSource, v as EditRejectedDiagnostic, w as EditRejectionOrigin, x as Editor, y as EditorAnchorNavigation, z as EditorBookmarkCommands, F as EditorCommandShape, G as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, H as EditorError, I as EditorEvents, J as EditorFontError, K as EditorFormatPainterCommands, L as EditorHeaderFooterCommands, M as EditorHighlights, N as EditorHostChange, O as EditorHostDocument, P as EditorNoteCommands, Q as EditorPosition, R as EditorQueries, S as EditorQuery, T as EditorQueryResults, U as EditorReviewHits, V as EditorSelection, W as EditorSnapshot, X as FontFailedDiagnostic, Y as FormatPainterLevel, Z as FormatPainterMode, _ as FormatPainterSurfaceState, $ as FurnitureVariant, a0 as HeaderFooterSlotArgs, a1 as HeaderFooterState, a2 as HighlightHit, a3 as HighlightOptions, a4 as HighlightRange, a5 as HighlightRect, a6 as HighlightResult, a7 as HistoryDiagnosticEvent, a8 as HyperlinkInfo, a9 as ImageContext, aa as ImageCropPercent, ab as NoteKind, ac as NotePropertiesSide, ad as NotePropertiesState, ae as PageSetup, af as PerformanceDiagnostic, ag as ResolveReviewChangesOptions, ah as ResolvedNoteNumbering, ai as ReviewActivationOptions, aj as ReviewChangesAttribution, ak as ReviewChangesResolvedEvent, al as ReviewCommentPlacement, am as ReviewCustomPlacement, an as ReviewItemHit, ao as ReviewItemPlacement, ap as ReviewItemPlacementBase, aq as ReviewItemQuery, ar as ReviewItemRevealEvent, as as ReviewItemRevealSource, at as ReviewRevisionPlacement, au as ReviewSkippedDiagnostic, av as ScrollPlacement, aw as ScrollToAnchorOptions, ax as SelectedImageState, ay as SessionActivity, az as SessionDiagnostic, aA as SetReviewChangesAuthorOptions, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aE as TableBorderTarget, aF as TableCellVerticalAlignment, aG as TableColumnDividerResizeTarget, aH as TableColumnOccurrenceTarget, aI as TableContext, aJ as TableInteractionLabelKey, aK as TableRightEdgeResizeTarget, aL as TableRowOccurrenceTarget, aM as TextMatch, aN as TimingSummary, aO as TrackedChangeFilterMode, aP as TrackedChangePredicate, aQ as ZoomFitTarget, aR as ZoomMode } from './editor-
|
|
27
|
+
import { X as ExecErrorCode } from './tree-op-types-Ds9-dl3T.js';
|
|
28
|
+
export { M as Block, an as COMPARE_DOCUMENTS_ACCEPT, N as ColorValue, e as CommentRecord, c as CompareDocumentsBackgroundEngine, f as CompareDocumentsBackgroundResult, ao as CompareDocumentsChromeHandlers, C as CompareDocumentsDialogSession, b as CompareDocumentsEngine, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, k as CompareDocumentsOutcome, l as CompareDocumentsPhase, m as CompareDocumentsProgress, n as CompareDocumentsRefusalReason, o as CompareDocumentsRequest, G as ContainerRef, P as ContentControl, H as ContentControlFilter, z as ContentControlType, p as ContentTypeIndex, Q as DocAnchor, U as DocAnchorRange, L as DocComment, V as DocLocation, J as DocRange, A as DocTarget, W as DocumentBody, D as DocxDocument, ap as DocxDocumentJSON, aq as DrawingHorizontalReferenceFrame, ar as DrawingKind, as as DrawingLocks, at as DrawingPositionInput, au as DrawingVerticalReferenceFrame, E as ExecResult, F as Extent, av as FontDefinition, Y as HeaderFooterSet, aw as ImageDecodePort, ax as ImageResourceLimits, ay as ImageResourceState, az as ImageWrapTarget, Z as IndentFormatting, I as InsertableContentControlType, _ as NumberingRef, q as OoxmlExternalTarget, r as OoxmlPackage, $ as PageMargins, a0 as Paragraph, a1 as ParagraphDisagreements, a2 as ParagraphFlags, aA as ParagraphFormatCommand, a3 as ParagraphTabStop, aB as Point, aC as PreservedImageMime, aD as Rect, s as RelationshipRecord, aE as RenderableImageMime, t as ReviewCommentItem, u as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, v as ReviewPosition, w as ReviewRange, d as ReviewRevisionItem, x as ReviewRevisionKind, K as Revision, y as RevisionAddress, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal, ac as RevisionType, ad as Run, B as RunFormatting, ae as Section, af as SectionProperties, aF as SelectionPin, ag as StyleDefinition, S as StyleDefinitions, aG as SupportedImageMime, ah as Table, ai as TableCell, aj as TableRow, T as TargetMode, ak as Theme, al as ThemeColorScheme, aH as Unsubscribe, aI as ValidatedImageBytesHandle, aJ as VectorImageMime, aK as Watermark, aL as WatermarkLayout, aM as WatermarkState, aN as compareDocumentsErrorKey } from './tree-op-types-Ds9-dl3T.js';
|
|
29
|
+
export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-fragment-Cya6ExyS.js';
|
|
30
|
+
export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-CfNgyZ4W.js';
|
|
31
|
+
import { b as EditorCommand } from './editor-CG4FJl_e.js';
|
|
32
|
+
export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, B as BookmarkPlace, e as BookmarkStory, f as BookmarkSummary, C as CanResult, g as ClearAnchorHighlightOptions, h as CollaborationParticipantsDiagnostic, i as CollaborationStatusDiagnostic, j as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, k as DiagnosticBase, l as DiagnosticFailureDetail, m as DocumentChange, n as DocumentEditingMode, o as DocumentHandle, p as DocumentOpenDiagnostic, q as DocumentOpenFailure, r as DocumentOpenFailureReason, s as DocumentSaveDiagnostic, t as DocumentShape, u as DocumentSource, v as EditRejectedDiagnostic, w as EditRejectionOrigin, x as Editor, y as EditorAnchorNavigation, z as EditorBookmarkCommands, F as EditorCommandShape, G as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, H as EditorError, I as EditorEvents, J as EditorFontError, K as EditorFormatPainterCommands, L as EditorHeaderFooterCommands, M as EditorHighlights, N as EditorHostChange, O as EditorHostDocument, P as EditorNoteCommands, Q as EditorPosition, R as EditorQueries, S as EditorQuery, T as EditorQueryResults, U as EditorReviewHits, V as EditorSelection, W as EditorSnapshot, X as FontFailedDiagnostic, Y as FormatPainterLevel, Z as FormatPainterMode, _ as FormatPainterSurfaceState, $ as FurnitureVariant, a0 as HeaderFooterSlotArgs, a1 as HeaderFooterState, a2 as HighlightHit, a3 as HighlightOptions, a4 as HighlightRange, a5 as HighlightRect, a6 as HighlightResult, a7 as HistoryDiagnosticEvent, a8 as HyperlinkInfo, a9 as ImageContext, aa as ImageCropPercent, ab as NoteKind, ac as NotePropertiesSide, ad as NotePropertiesState, ae as PageSetup, af as PerformanceDiagnostic, ag as ResolveReviewChangesOptions, ah as ResolvedNoteNumbering, ai as ReviewActivationOptions, aj as ReviewChangesAttribution, ak as ReviewChangesResolvedEvent, al as ReviewCommentPlacement, am as ReviewCustomPlacement, an as ReviewItemHit, ao as ReviewItemPlacement, ap as ReviewItemPlacementBase, aq as ReviewItemQuery, ar as ReviewItemRevealEvent, as as ReviewItemRevealSource, at as ReviewRevisionPlacement, au as ReviewSkippedDiagnostic, av as ScrollPlacement, aw as ScrollToAnchorOptions, ax as SelectedImageState, ay as SessionActivity, az as SessionDiagnostic, aA as SetReviewChangesAuthorOptions, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aE as TableBorderTarget, aF as TableCellVerticalAlignment, aG as TableColumnDividerResizeTarget, aH as TableColumnOccurrenceTarget, aI as TableContext, aJ as TableInteractionLabelKey, aK as TableRightEdgeResizeTarget, aL as TableRowOccurrenceTarget, aM as TextMatch, aN as TimingSummary, aO as TrackedChangeFilterMode, aP as TrackedChangePredicate, aQ as ZoomFitTarget, aR as ZoomMode } from './editor-CG4FJl_e.js';
|
|
33
33
|
export { CollectReviewItems, CompareDocumentsDialog, CompareDocumentsDialogHost, EditorModule, ReviewModuleContribution, RevisionMarkupDialog, RevisionMarkupDialogHost } from './contracts/modules.js';
|
|
34
34
|
export { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.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, b as RevisionDisplayMode, 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, n as revisionMarkupColor, o as revisionMarkupStyle } from './revision-projection-
|
|
36
|
-
export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-
|
|
35
|
+
export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, b as RevisionDisplayMode, 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, n as revisionMarkupColor, o as revisionMarkupStyle } from './revision-projection-BcWPdgFd.js';
|
|
36
|
+
export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-DyXHZhFO.js';
|
|
37
37
|
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 MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-Bm9XqTNO.js';
|
|
38
|
-
export { A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, C as CHROME_GROUPS, d as CHROME_MENUS, e as CHROME_PRINT_DISPLAY_MODES, f as ChromeExportError, g as ChromeExportFormat, h as ChromeExportHandlers, i as ChromeExportResult, j as ChromeExportView, k as ChromeMenu, l as ChromeMenuEntry, m as ChromeMenuId, n as ChromeMenuItemEntry, o as ChromeMenuSeparatorEntry, p as ChromeMenuSubmenuEntry, q as ChromePrintError, r as ChromePrintErrorCode, s as ChromePrintJob, t as ChromePrintOptions, u as ChromePrintSettings, v as ChromeSlotId, w as CommentDraftChromeHandlers, x as ContentControlWidgetChromeHandlers, y as ContentControlWidgetSession, z as CustomFontsOptions, D as CustomFontsResolver, E as DocxEditorConfig, F as DocxEditorInstance, G as EquationActivation, H as EquationChromeHandlers, I as FontLoadFailure, J as FontLoadFailureReason, K as FontMeasurementState, L as FontUrlSource, M as GoToChromeHandlers, N as HistoryGroupBinding, O as HistoryGroupBindingOptions, P as HyperlinkActivation, Q as HyperlinkChromeHandlers, R as InvalidTextFormFieldChromeHandlers, S as InvalidTextFormFieldSession, T as LoadFontsRequest, U as LoadFontsResult, V as LockedControlNavigation, W as PopupChromeRegistrationOptions, X as ResolvedChromePrintSettings, Y as SurfaceEquation, Z as SurfaceHyperlink, _ as TableChromeSlotId, $ as ToolbarCommandState, a0 as ToolbarValueMap, a1 as ToolbarValueSlot, a2 as bindHistoryGroup, a3 as blankDocumentBytes, a4 as chromeMenuSlots, a5 as commandForSlot, a6 as commandForSlotValue, a7 as createDocxEditor, a8 as createFontSource, a9 as customFonts, aa as deferFonts, ab as initialChromePrintSettings, ac as isChromePrintShortcut, ad as loadFonts, ae as runChromeExport, af as runChromePrint, ag as runToolbarCommand, ah as toolbarCommandState } from './chrome-print-
|
|
39
|
-
export { R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-
|
|
38
|
+
export { A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, C as CHROME_GROUPS, d as CHROME_MENUS, e as CHROME_PRINT_DISPLAY_MODES, f as ChromeExportError, g as ChromeExportFormat, h as ChromeExportHandlers, i as ChromeExportResult, j as ChromeExportView, k as ChromeMenu, l as ChromeMenuEntry, m as ChromeMenuId, n as ChromeMenuItemEntry, o as ChromeMenuSeparatorEntry, p as ChromeMenuSubmenuEntry, q as ChromePrintError, r as ChromePrintErrorCode, s as ChromePrintJob, t as ChromePrintOptions, u as ChromePrintSettings, v as ChromeSlotId, w as CommentDraftChromeHandlers, x as ContentControlWidgetChromeHandlers, y as ContentControlWidgetSession, z as CustomFontsOptions, D as CustomFontsResolver, E as DocxEditorConfig, F as DocxEditorInstance, G as EquationActivation, H as EquationChromeHandlers, I as FontLoadFailure, J as FontLoadFailureReason, K as FontMeasurementState, L as FontUrlSource, M as GoToChromeHandlers, N as HistoryGroupBinding, O as HistoryGroupBindingOptions, P as HyperlinkActivation, Q as HyperlinkChromeHandlers, R as InvalidTextFormFieldChromeHandlers, S as InvalidTextFormFieldSession, T as LoadFontsRequest, U as LoadFontsResult, V as LockedControlNavigation, W as PopupChromeRegistrationOptions, X as ResolvedChromePrintSettings, Y as SurfaceEquation, Z as SurfaceHyperlink, _ as TableChromeSlotId, $ as ToolbarCommandState, a0 as ToolbarValueMap, a1 as ToolbarValueSlot, a2 as bindHistoryGroup, a3 as blankDocumentBytes, a4 as chromeMenuSlots, a5 as commandForSlot, a6 as commandForSlotValue, a7 as createDocxEditor, a8 as createFontSource, a9 as customFonts, aa as deferFonts, ab as initialChromePrintSettings, ac as isChromePrintShortcut, ad as loadFonts, ae as runChromeExport, af as runChromePrint, ag as runToolbarCommand, ah as toolbarCommandState } from './chrome-print-D77Z2MRQ.js';
|
|
39
|
+
export { R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-ChK1a0Qd.js';
|
|
40
40
|
export { CollaborationModuleContribution } from './collaboration.js';
|
|
41
41
|
export { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary } from './contracts/document.js';
|
|
42
42
|
export { d as diagnosticCauses, r as reviewCodeOfSkip } from './diagnostic-context-CkZKkKvB.js';
|
|
@@ -47,15 +47,15 @@ export { CommentMarkerStyle, DEFAULT_REVIEW_PANE, ResolvedReviewPane, ReviewPane
|
|
|
47
47
|
export { C as CollaborationFailureCode, a as CollaborationStatus } from './failure-6KGFrDO9.js';
|
|
48
48
|
export { E as EditorFontErrorCode, F as FontConfiguration, a as FontFaceRequest, b as FontSource, c as FontSourceSubstitution } from './editor-fonts-D_-vjuJi.js';
|
|
49
49
|
export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './contracts/interaction.js';
|
|
50
|
-
import './semantic-records-
|
|
51
|
-
import './drawing-graphic-kind-
|
|
50
|
+
import './semantic-records-D0NEAzyD.js';
|
|
51
|
+
import './drawing-graphic-kind-C_kXByHh.js';
|
|
52
52
|
import './collaboration/replication.js';
|
|
53
|
-
import './semantic-cell-selection-
|
|
54
|
-
import './note-properties-
|
|
55
|
-
import './custom-node-writes-
|
|
56
|
-
import './tree-session-contract-
|
|
53
|
+
import './semantic-cell-selection-CYS_l73g.js';
|
|
54
|
+
import './note-properties-DvCg9hqk.js';
|
|
55
|
+
import './custom-node-writes-BXn8hCVV.js';
|
|
56
|
+
import './tree-session-contract-DiNorPOQ.js';
|
|
57
57
|
import 'prosemirror-model';
|
|
58
|
-
import './semantic-record-queries-
|
|
58
|
+
import './semantic-record-queries-CYAipThi.js';
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* The editor's own command types, as a closed list for anonymous diagnostics.
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Bb as CHROME_GROUPS,Fb as CHROME_MENUS,od as CHROME_PRINT_DISPLAY_MODES,rd as COMPARE_DOCUMENTS_ACCEPT,kd as ChromeExportError,md as ChromePrintError,Zc as bindHistoryGroup,h as blankDocumentBytes,Gb as chromeMenuSlots,Oa as commandForSlot,Qa as commandForSlotValue,sd as compareDocumentsErrorKey,rc as createDocxEditor,J as createFontSource,K as customFonts,g as deferFonts,cc as diagnosticCodeOfRefusal,pd as initialChromePrintSettings,nd as isChromePrintShortcut,I as loadFonts,dc as reviewCodeOfRefusal,ld as runChromeExport,qd as runChromePrint,Wa as runToolbarCommand,Sa as toolbarCommandState}from'./chunk-
|
|
1
|
+
export{Bb as CHROME_GROUPS,Fb as CHROME_MENUS,od as CHROME_PRINT_DISPLAY_MODES,rd as COMPARE_DOCUMENTS_ACCEPT,kd as ChromeExportError,md as ChromePrintError,Zc as bindHistoryGroup,h as blankDocumentBytes,Gb as chromeMenuSlots,Oa as commandForSlot,Qa as commandForSlotValue,sd as compareDocumentsErrorKey,rc as createDocxEditor,J as createFontSource,K as customFonts,g as deferFonts,cc as diagnosticCodeOfRefusal,pd as initialChromePrintSettings,nd as isChromePrintShortcut,I as loadFonts,dc as reviewCodeOfRefusal,ld as runChromeExport,qd as runChromePrint,Wa as runToolbarCommand,Sa as toolbarCommandState}from'./chunk-STK3RNDU.js';import'./chunk-YD3KSZJM.js';import'./chunk-R6SVC45W.js';export{d as DEFAULT_FONT,n as FONT_RESOLVER_BRAND,m as FONT_RESOLVER_MARK_KEY,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,s as composeFontOrigins,o as defineFontResolver,p as isFontResolver}from'./chunk-UMSQMNZU.js';import'./chunk-SCK44KXL.js';import'./chunk-RIYSCEFQ.js';export{H as diagnosticCauses,z as diagnosticCodes,y as explainDiagnostic,C as reviewCodeOfSkip}from'./chunk-RTOCN5IQ.js';import'./chunk-27XCGHXI.js';import'./chunk-CCM264XP.js';import'./chunk-XEGE36HF.js';import'./chunk-I7C2C6IZ.js';import'./chunk-FIT3HAWE.js';import'./chunk-ASWUP7GU.js';import'./chunk-GOXXQ2G3.js';import'./chunk-CORSCVCC.js';import'./chunk-WN7ICTA5.js';import'./chunk-V5NOTQ6L.js';import'./chunk-KIDYIVZ5.js';import'./chunk-S6J4O5XP.js';var N=1;var _={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,compareDocuments:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,openCompareDocumentsDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,removeToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function K(){return Object.keys(_)}export{N as DIAGNOSTIC_SCHEMA_VERSION,K as diagnosticCommands};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as ShapingEnvironmentInput, k as TextShaper, R as ResolvedRunStyle, l as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, m as NormalizationPolicy, n as FixedPointRoundingMode, o as FontRequest } from './semantic-records-
|
|
1
|
+
import { j as ShapingEnvironmentInput, k as TextShaper, R as ResolvedRunStyle, l as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, m as NormalizationPolicy, n as FixedPointRoundingMode, o as FontRequest } from './semantic-records-D0NEAzyD.js';
|
|
2
2
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
3
3
|
|
|
4
4
|
/** Immutable per-operation environment. Configuration, extension, shaping, and producer changes are
|