@docx-editor.dev/core 2.30.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +18 -27
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +17 -16
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-BM3Js-6X.d.ts → chrome-print-CznJ0ucN.d.ts} +361 -41
- package/dist/chunk-25EXMBV2.cjs +5 -0
- package/dist/chunk-2CWQY27B.cjs +1 -0
- package/dist/chunk-3IEXDEFH.cjs +7 -0
- package/dist/chunk-65XBN67F.cjs +2 -0
- package/dist/chunk-6NVZNB7O.cjs +3 -0
- package/dist/chunk-6UDJUI3W.cjs +2 -0
- package/dist/chunk-ACLR4DMK.js +1 -0
- package/dist/{chunk-RJCQGJR7.js → chunk-B2BEELUE.js} +1 -1
- package/dist/chunk-DDFHKQFU.js +30 -0
- package/dist/chunk-E4IAO4CY.cjs +2 -0
- package/dist/chunk-ETDZFNMI.js +2 -0
- package/dist/chunk-FDSL5OJU.cjs +30 -0
- package/dist/chunk-FS7CMYLT.js +4 -0
- package/dist/chunk-GDS24SZN.js +30 -0
- package/dist/chunk-GIY6NT2X.js +5 -0
- package/dist/chunk-GWM3AKUD.js +18 -0
- package/dist/chunk-HDOXACHP.js +2 -0
- package/dist/chunk-IILEENID.js +1 -0
- package/dist/chunk-L5TYBFDB.js +1 -0
- package/dist/chunk-MNF2K7NN.cjs +30 -0
- package/dist/chunk-O324RB6R.cjs +1 -0
- package/dist/chunk-OKMEMSKB.cjs +1 -0
- package/dist/chunk-QXJKYNYZ.js +1 -0
- package/dist/chunk-RALTVLB6.js +2 -0
- package/dist/chunk-SRVKFUFI.js +3 -0
- package/dist/chunk-TELQ52LG.cjs +1 -0
- package/dist/chunk-TJHE5EET.cjs +1 -0
- package/dist/chunk-UMMRURPE.js +7 -0
- package/dist/chunk-WN7ICTA5.js +1 -0
- package/dist/{chunk-FLBEJC6X.cjs → chunk-XJYZVGQR.cjs} +1 -1
- package/dist/chunk-ZGTIE3QJ.cjs +4 -0
- package/dist/chunk-ZOZI27AW.cjs +18 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +20 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.cjs +1 -1
- package/dist/collaboration.d.ts +5 -6
- package/dist/collaboration.js +1 -1
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +13 -10
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +15 -13
- package/dist/contracts/types.d.ts +135 -2
- package/dist/{custom-node-writes-0v0Kgw1T.d.ts → custom-node-writes-CLJKGD9t.d.ts} +7 -2
- package/dist/{diagnostic-context-CcAO4q1s.d.ts → diagnostic-context-BtDUY3v2.d.ts} +3 -2
- package/dist/{diagnostic-hints-2Bke6H_w.d.ts → diagnostic-hints-DK8-V0fk.d.ts} +2 -2
- package/dist/{document-protection-8eyMWIJ0.d.ts → document-protection-NaniLHWF.d.ts} +1 -1
- package/dist/{editor-DaEJd2so.d.ts → editor-DZwOTmlR.d.ts} +386 -279
- package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-B3L-1ALc.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +6 -4
- package/dist/editor.d.ts +646 -31
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +9 -16
- package/dist/export.js +2 -2
- package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
- package/dist/{font-resolver-CL9BVKZo.d.ts → font-resolver-BlQNGdvR.d.ts} +1 -1
- package/dist/{headless-document-view-DZQN8Bnx.d.ts → headless-document-view-Bcz9_Qva.d.ts} +115 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +27 -26
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-cEnVrhWg.d.ts → layout-shaping-E5J4Z1Gf.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +95 -23
- package/dist/layout.js +1 -1
- package/dist/{note-properties-9FH8zAeG.d.ts → note-properties-Ds5R2_3F.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +24 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-CZ1uUlPO.d.ts → protocol-DKa4qt7F.d.ts} +167 -5
- package/dist/{review-paragraph-order-CqVelc5A.d.ts → review-paragraph-order-Dc17w_6v.d.ts} +1 -1
- package/dist/revision-projection-Cn6rZJ7H.d.ts +258 -0
- package/dist/{semantic-cell-selection-Dr9yxFZt.d.ts → semantic-cell-selection-BaUR0iJ4.d.ts} +2 -2
- package/dist/{semantic-interaction-Dc3pf3hr.d.ts → semantic-interaction-CJoHLoOl.d.ts} +1 -1
- package/dist/{semantic-paint-Bz3FBAoH.d.ts → semantic-paint-BPw_n0li.d.ts} +7 -4
- package/dist/{semantic-record-queries-Bx0pl6kL.d.ts → semantic-record-queries-C0rJ3sB4.d.ts} +1 -1
- package/dist/{semantic-records-CjcF26ZL.d.ts → semantic-records-BvN-WWst.d.ts} +365 -512
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +47 -22
- package/dist/store.js +1 -1
- package/dist/{types-barrel-CA0xB8kH.d.ts → tree-op-types-C_S2niXW.d.ts} +1239 -747
- package/dist/{tree-package-store-DKhdEVym.d.ts → tree-package-store-CRHvMyNj.d.ts} +676 -646
- package/dist/{tree-session-contract-CwnTEVLF.d.ts → tree-session-contract-D1awo_dA.d.ts} +26 -13
- package/dist/unsupported-elements-CVos5cqe.d.ts +23 -0
- package/docs/accept-reject-without-scrolling.md +95 -0
- package/docs/comment-on-found-text.md +72 -0
- package/docs/custom-review-cards.md +178 -0
- package/docs/highlight-ranges.md +48 -0
- package/docs/index.md +36 -0
- package/docs/propose-rewrite.md +247 -0
- package/docs/tracked-replacement.md +68 -0
- package/package.json +3 -2
- package/dist/chunk-2PV5L5NJ.js +0 -5
- package/dist/chunk-5OTS2EJ7.js +0 -7
- package/dist/chunk-5P4223J4.cjs +0 -27
- package/dist/chunk-5RRAZMBU.cjs +0 -1
- package/dist/chunk-5SPITS5F.js +0 -18
- package/dist/chunk-6JIJOZDW.js +0 -1
- package/dist/chunk-7ATNKARV.js +0 -2
- package/dist/chunk-BGCUTKWE.cjs +0 -5
- package/dist/chunk-BTQKU64Q.cjs +0 -1
- package/dist/chunk-EBCXSH2W.js +0 -3
- package/dist/chunk-ERECKTIR.cjs +0 -2
- package/dist/chunk-HYASLE2G.cjs +0 -1
- package/dist/chunk-JC47NRJC.cjs +0 -3
- package/dist/chunk-KJRTNY2Q.cjs +0 -2
- package/dist/chunk-NKPUH3QJ.js +0 -1
- package/dist/chunk-PF5NJWS3.js +0 -2
- package/dist/chunk-PWTRJSES.cjs +0 -18
- package/dist/chunk-QFKGI242.cjs +0 -30
- package/dist/chunk-RPPV4S6T.cjs +0 -4
- package/dist/chunk-T32MGBJS.js +0 -1
- package/dist/chunk-UM26GH5B.js +0 -30
- package/dist/chunk-VRCZBFLH.js +0 -27
- package/dist/chunk-WF7JZ755.cjs +0 -1
- package/dist/chunk-WK5X2MMA.cjs +0 -7
- package/dist/chunk-WPDD2Y32.js +0 -2
- package/dist/chunk-YBMWBXST.cjs +0 -2
- package/dist/chunk-YZGUBCHP.js +0 -1
- package/dist/chunk-ZOS2PM4A.js +0 -4
- package/dist/image-resources-Bipz8toD.d.ts +0 -211
- package/dist/omml-equation-DP2WpUbK.d.ts +0 -97
package/dist/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Vb as AUTO_ZOOM_MODE,$b as BROWSER_AUTOMATION_CAPABILITIES,kb as CHROME_GROUPS,ob as CHROME_MENUS,rb as CHROME_UNAVAILABLE_KEY,wb as CONTENT_CONTROL_PICTURE_ACCEPT,Sc as ChromeExportError,Uc as ChromePrintError,c as DEFAULT_REVIEW_PANE,ra as DEFAULT_TABLE_CHROME_DRAFT,W as DEFAULT_WATERMARK_FONT,Jc as DocumentRefreshError,da as EMU_PER_POINT,Wb as FIT_WIDTH_ZOOM_MODE,Lc as HIGHLIGHT_REFRESH_MS,ma as IMAGE_OVERLAY_NUDGE_PT,na as IMAGE_OVERLAY_NUDGE_SHIFT_PT,Gc as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,vc as NO_MIXED_FIELDS,E as PX_PER_CM,D as PX_PER_INCH,Sb as REVIEW_MARKERS_GUTTER_PX,Nc as SEARCH_DEBOUNCE_MS,Qc as SEARCH_HIGHLIGHT_PRIORITY,Pc as SEARCH_HIGHLIGHT_SET,Oc as SEARCH_MATCH_LIMIT,K as SNAP_TWIPS_CM,J as SNAP_TWIPS_INCH,Cc as SPLIT_CELL_FALLBACK_MAX,xa as TABLE_BORDER_STYLE_OPTIONS,wa as TABLE_BORDER_TARGET_OPTIONS,ya as TABLE_BORDER_WIDTH_OPTIONS,sa as TABLE_CHROME_SLOT_IDS,rc as TAB_ALIGNMENT_LABELS,Ra as TOOLBAR_COLLAPSE_ORDER,Ta as TOOLBAR_OVERFLOW_HYSTERESIS,Xa as TOOLBAR_PANEL_EDGE_MARGIN,Sa as TOOLBAR_PINNED_GROUPS,I as TWIPS_PER_CM,H as TWIPS_PER_INCH,Ub as ZOOM_MAX,Tb as ZOOM_MIN,zc as alignmentAfterDirectionChange,za as applyTableChromePick,R as applyThemeShade,Q as applyThemeTint,Wa as arrangeToolbarGroups,fb as barRoomWidth,Rb as beginEditorPreview,Fc as bindHistoryGroup,g as blankDocumentBytes,ad as bookmarkDialogInitialName,bd as bookmarkDialogNameState,Xc as bookmarkDialogRows,Eb as calendarDateForKey,Gb as calendarDateFromText,Fb as calendarDateText,Cb as calendarMonth,Hb as calendarMonthNames,Ab as calendarMonthTitle,Bb as calendarWeekdays,ka as canExecuteImageCommand,ja as captureImageMutationPreconditions,yc as changedFields,ib as chordLetter,qb as chromeControlCount,pb as chromeMenuSlots,Da as chromeProbeForSlot,lb as chromeSlotId,Ja as chromeSlotIsToggle,i as clipboardDropLandsText,h as clipboardPasteLandsContent,Va as collapseOrder,bb as collapsibleGroupCost,O as commandExecOptions,Ea as commandForSlot,Ga as commandForSlotValue,Fa as commandForTableChromeSlotValue,lc as computeImageResizeResult,ha as computeMovedImagePosition,ga as computeResizedImageExtentEmu,ub as contentControlPopupKeyDown,vb as contentControlPopupOpener,gb as controlsOverflow,k as copyEditorStyles,ac as createBrowserAutomationHost,Ib as createContentControlListNavigation,Kc as createDocumentRefresh,Rc as createDocumentSearch,_b as createDocxEditor,B as createFontSource,mc as createImageOverlayScrollPort,b as createLayoutShaping,ba as cropPercentFromCropPermille,$ as cropPercentFromPermille,Y as cropPercentFromSourceCrop,aa as cropPermilleFromCropPercent,_ as cropPermilleFromPercent,hc as cssPixelsToLayoutPoints,C as customFonts,mb as defaultChromeGroups,ta as defaultTableLabel,N as dragIndent,Qa as editorCommandKey,o as editorHostDocument,n as editorHostElement,p as editorHostWindow,bc as editorInstanceScope,Qb as editorPreviewActive,fa as emuToOverlayPoints,Lb as equationAtPosition,la as executeImageCommand,nc as finalizeImageOverlayInteraction,zb as firstDayOfWeek,pc as formatInches,nb as formattingBarChromeGroups,F as generateRulerTicks,$c as goToBookmarkGroups,_c as goToBookmarkMatch,Yc as goToBookmarkRows,Zc as goToBookmarkTarget,L as handlePosition,dc as hasOpenNestedPopup,Kb as historyShortcutOf,l as hostDocumentOf,u as hostTimers,m as hostWindowOf,qc as inchesToTwips,Ec as initialSplitCellCounts,Vc as isChromePrintShortcut,t as isDomNode,q as isElementNode,jb as isGoToChord,r as isHTMLElementNode,y as isInputEvent,v as isKeyboardEvent,x as isMouseEvent,w as isPointerEvent,pa as isStaleImageInteractionCommit,ua as isTableChromeSlot,s as isTextNode,xb as isoDateOf,gc as layoutPointsToCssPixels,Ic as lineSpacingMenuRowLabel,Hc as lineSpacingMenuRows,cc as listenForPopupEscape,ec as listenForPopupFocusLeave,A as loadFonts,T as lowerColorValueForBorder,U as lowerColorValueForFill,wc as mixedFieldsOf,Mb as mountPaginatedSurface,tb as observeContentControlPopup,j as openEditorWindow,ic as overlayFrameToSheetCssPixels,jc as overlayHostOrigin,yb as parseIsoDate,z as partOfNodeId,ea as pointsToEmu,sb as positionContentControlPopup,Aa as probeTableChromeCommand,hb as readAvailableWidth,eb as readColumnGap,db as readInlineMargins,Dc as readSplitCellCounts,Pb as reportAutomationException,Ob as reportAutomationRefusal,kc as resizePreservesAspect,V as resolveColorValueToCss,d as resolveReviewPane,S as resolveThemeColorHex,Xb as resolveZoomMode,Zb as reviewPaneEntitledZoom,e as reviewPaneListsItem,G as rulerPageBox,Tc as runChromeExport,Wc as runChromePrint,Na as runSave,La as runTableChromeCommand,Pa as runTableCommand,Ma as runToolbarCommand,Za as sameOverflow,xc as sameTabStops,Yb as sameZoomMode,uc as seedFields,oa as selectedDrawingOverlayTargetOf,ia as selectedImageStateOf,ab as separatorLeadingCost,Db as shiftMonth,tc as signedFirstLineOf,M as snapTwips,Z as sourceCropFromCropPercent,sc as specialOf,Jb as surfaceExtent,fc as surfacePaintScale,Ca as tableChromeIconPaths,Ba as tableChromeLabelKeyForTarget,Ha as tableChromeToolbarState,va as tableChromeVisible,qa as tableCommandState,Oa as tableCommandToolbarState,a as toEditorFontError,Ia as toolbarCommandState,Ka as toolbarCommandStates,Ua as toolbarGroupPriority,_a as toolbarOverflowGroups,Ya as toolbarPanelPlacement,$a as toolbarPopupLeft,cb as trailingGapCost,Bc as trapTabWithin,oc as twipsToInches,ca as validateImageCropPercent,P as validateThemeModifier,Mc as watchHighlights,X as watermarkShapeBox,Ac as withTabStop}from'./chunk-GDS24SZN.js';export{a as resolveEditorModules}from'./chunk-4HENIAFG.js';export{a as observeUnsupportedElements}from'./chunk-FS7CMYLT.js';export{d as DEFAULT_FONT,i as FONT_RESOLVER_BRAND,h as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,n as composeFontOrigins,j as defineFontResolver,k as isFontResolver}from'./chunk-RALTVLB6.js';export{t as disposeLayoutShaping}from'./chunk-SRVKFUFI.js';import'./chunk-RIYSCEFQ.js';import'./chunk-UMMRURPE.js';import'./chunk-QXJKYNYZ.js';export{Xa as DEFAULT_REVISION_MARKUP,Wa as REVISION_MARKUP_COLORS,Ya as resolveRevisionMarkup}from'./chunk-DDFHKQFU.js';import'./chunk-GIY6NT2X.js';import'./chunk-B2BEELUE.js';import'./chunk-ETDZFNMI.js';import'./chunk-L5TYBFDB.js';import'./chunk-ACLR4DMK.js';import'./chunk-HDOXACHP.js';import'./chunk-WN7ICTA5.js';import'./chunk-IILEENID.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,wl as DRAWING_REL_FROM_H,xl as DRAWING_REL_FROM_V,Ld as IMAGE_WRAP_TARGETS,fj as TEXT_FORM_FORMATS,zl as positionInputFromPropertiesCommand,yl as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,oe as resolveSvgIntrinsicSize,ke as sniffImageMime,vl as validateDrawingPositionInput,pe as validateRasterHeader,Al as validateSetImagePositionCommand}from'./chunk-GWM3AKUD.js';import'./chunk-S6J4O5XP.js';
|
package/dist/export.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkERECKTIR_cjs=require('./chunk-ERECKTIR.cjs'),chunkJC47NRJC_cjs=require('./chunk-JC47NRJC.cjs'),chunkHYASLE2G_cjs=require('./chunk-HYASLE2G.cjs'),chunkQFKGI242_cjs=require('./chunk-QFKGI242.cjs'),chunkFLBEJC6X_cjs=require('./chunk-FLBEJC6X.cjs');require('./chunk-5RRAZMBU.cjs');var chunkYBMWBXST_cjs=require('./chunk-YBMWBXST.cjs'),chunkPWTRJSES_cjs=require('./chunk-PWTRJSES.cjs');function M(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,c)=>d.id!==a.glyphs[c]?.id))return t;let r=[],s=0;for(let d of o.text){let c=d.toUpperCase()!==d,y=r.at(-1);y&&(y.lower===c||/\p{M}/u.test(d))?y.text+=d:r.push({text:d,start:s,lower:c}),s+=d.length;}let i=[],p=[],l=[],u=true,h=0;for(let d of o.environment.direction==="rtl"?r.reverse():r){let c=d.lower?.8:1,y=[],E=[],b="",f=d.start;for(let F of d.text){let m=d.lower?F.toUpperCase():F;for(let S=0;S<m.length;S++)y.push(f),E.push(f+F.length);b+=m,f+=F.length;}let g=e.shape({...n,text:b}),x=i.length;for(let[F,m]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:l.push(S*c),i.push({...m,cluster:y[m.cluster]??d.start,originX:chunkQFKGI242_cjs.n(h+Math.round(m.originX*c)),originY:chunkQFKGI242_cjs.n(Math.round(m.originY*c)),offsetX:chunkQFKGI242_cjs.n(Math.round(m.offsetX*c)),offsetY:chunkQFKGI242_cjs.n(Math.round(m.offsetY*c)),advanceX:chunkQFKGI242_cjs.n(Math.round(m.advanceX*c)),advanceY:chunkQFKGI242_cjs.n(Math.round(m.advanceY*c)),drawScale:c});}for(let F of g.clusters){let m=y[F.textStart]??d.start,S=E[F.textEnd-1]??f,R=chunkQFKGI242_cjs.n(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===m&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:chunkQFKGI242_cjs.n(T.advance+R),caretEdges:[chunkQFKGI242_cjs.n(0),chunkQFKGI242_cjs.n(T.advance+R)]}:p.push({...F,textStart:m,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:R,caretEdges:F.caretEdges.map(V=>chunkQFKGI242_cjs.n(Math.round(V*c))),fontSpan:0});}h+=g.glyphs.reduce((F,m)=>F+Math.round(m.advanceX*c),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 ut=new WeakMap;function Ht(e){let o=ut.get(e);return o===void 0&&(o=Vt(e.bytes,e.faceIndex),ut.set(e,o)),o}var Xt=new Set(["COLR","CBDT","sbix"]),Gt=512;function Vt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(pt(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),Gt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Xt.has(pt(e,s)))return true}return false}function pt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var Wt=/\p{Emoji_Presentation}|️/u;function Yt(e){return Wt.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Ht);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return Yt(o)?[...t,...n]:[...n,...t]}var $t=2048;function ft(e,o,t,n){if(!t.clusters.length||t.clusters.length>$t)return null;let a=(f,g)=>{let{context:x,...F}=o,m={...F,text:g,environment:chunkQFKGI242_cjs.p({...o.environment,font:f})};return M(e,m,e.shape(m))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),R=s.get(x)??z(n,S).find(T=>{try{return !a(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!R)return null;s.set(x,R),g=R;}let m=r.at(-1);m&&m.font===g&&m.end===f.textStart?m.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let i=[],p=[],l=[],u=[],h=true,d=0,c=0,y=0,E=0,b=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=a(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(m=>m.id===0))return null;let x=i.length,F=l.length;for(let m of g.glyphs)i.push({...m,cluster:f.start+m.cluster,originX:chunkQFKGI242_cjs.n(d+m.originX),originY:chunkQFKGI242_cjs.n(c+m.originY)});if(g.exactAdvancesX===void 0)h=false;else for(let m of g.exactAdvancesX)u.push(m);for(let m of g.clusters)p.push({...m,textStart:f.start+m.textStart,textEnd:f.start+m.textEnd,glyphStart:x+m.glyphStart,glyphEnd:x+m.glyphEnd,fontSpan:F});g.glyphs.length&&l.push({font:f.font,glyphStart:x,glyphEnd:i.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),d+=g.glyphs.reduce((m,S)=>m+S.advanceX,0),c+=g.glyphs.reduce((m,S)=>m+S.advanceY,0),y=Math.max(y,g.metrics.ascent),E=Math.max(E,g.metrics.descent),b=Math.max(b,g.metrics.lineGap);}return chunkQFKGI242_cjs.s({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:h&&u.length===i.length?u:void 0,metrics:{ascent:chunkQFKGI242_cjs.n(y),descent:chunkQFKGI242_cjs.n(E),lineGap:chunkQFKGI242_cjs.n(b)}},{...o.environment,fallbackOrder:n})}var Kt=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 "]]]),Zt=512,mt=new WeakMap;function Jt(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",i=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(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 c=0;c<p;c+=1){let y=i+12+c*16;if(s(y)==="GSUB"){l=r(y+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let h=l+u,d=a(h);if(d<0)return t;for(let c=0;c<Math.min(d,Zt);c+=1){let y=s(h+2+c*6);y&&t.add(y);}return t}function Qt(e,o){let t=mt.get(e);return t||(t=Jt(e.bytes,e.faceIndex),mt.set(e,t)),(Kt.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function yt(e,o){let t=e.filter(n=>Qt(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 chunkQFKGI242_cjs.s({...r,text:o.text},o.environment)}catch{return t}}function ht(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 chunkQFKGI242_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=M(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)){let u=ft(n,i,l,t);if(u)return u}for(let u of yt(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let h={...i,environment:chunkQFKGI242_cjs.p({...i.environment,font:u})},d=M(n,h,n.shape(h));if(!d.glyphs.some(c=>c.id===0))return d}catch{}return l};return {...e,shaper:r}}var ee=chunkQFKGI242_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var eo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var gt=new WeakMap;function H(e){let o=gt.get(e);return o||gt.set(e,o=to(e)),o}function to(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function oo(e){return Object.freeze({...H(e),bytes:chunkQFKGI242_cjs.i(e)})}function no(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkQFKGI242_cjs.d?null:oo(t)}catch{return null}}function xt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return no(e.resolve(),o)}}function ro(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[]){let r=new Map;for(let i of [...e,o]){let p=i.toLowerCase();r.has(p)||r.set(p,i);}let s=[...r.values()].map(i=>{let p=[];for(let l of eo){let u=n?.({family:i,...l});!u||u instanceof chunkQFKGI242_cjs.d||p.push(Object.freeze({...l,sourceFamily:u.family,via:u.substitution?"substitution":"direct",identity:u.identity,id:u.id,hash:u.hash,faceIndex:u.faceIndex,substitution:u.substitution}));}return Object.freeze({family:i,coverage:p.length===4?"complete":p.length>0?"partial":"none",faces:Object.freeze(p)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(s),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ro(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 chunkERECKTIR_cjs.l))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkERECKTIR_cjs.m?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 chunkHYASLE2G_cjs.d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkQFKGI242_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 chunkQFKGI242_cjs.d?null:s}function Ft(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function io(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let a=chunkQFKGI242_cjs.ua(n.style,n.fontSlot),r=chunkQFKGI242_cjs.ed(n)?chunkQFKGI242_cjs.fd(n):chunkQFKGI242_cjs.ba(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=G(e,o,s,a)??(chunkPWTRJSES_cjs.b(s)&&io(r)?G(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkJC47NRJC_cjs.aa(e.shaper,e.environment,i,a,t))return null;let p=chunkJC47NRJC_cjs.$(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>H(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var N=new Map,bt=new WeakMap,se=0,C;var le=32,Rt=chunkQFKGI242_cjs.c;function St(){if(C)return C;let e=(async()=>(await chunkJC47NRJC_cjs.d(),chunkJC47NRJC_cjs.h({...chunkJC47NRJC_cjs.i,maxFontBytes:chunkQFKGI242_cjs.a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function Ot(e){let o=X();return chunkJC47NRJC_cjs.ca(e,{resolveFont(t){return Ft(e,o,t)},fallback:chunkQFKGI242_cjs.ha()})}async function vt(e,o,t=[],n=false,a){if(!chunkJC47NRJC_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunkJC47NRJC_cjs.k(a,chunkJC47NRJC_cjs.i),s=await St(),i=ht(await chunkJC47NRJC_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Ot(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:${chunkQFKGI242_cjs.ga}`].join("|"),extensionFingerprint:e.fingerprint})}function ao(e,o,t){if(!chunkJC47NRJC_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunkJC47NRJC_cjs.k(t,chunkJC47NRJC_cjs.i),a=chunkJC47NRJC_cjs.j(n),r=bt.get(e),s=r?.get(a);if(s)return s;let i=`${chunkJC47NRJC_cjs.o(e)}|${a}`,p=N.get(i);if(!p){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let d=chunkJC47NRJC_cjs.n(e).sources.reduce((y,E)=>y+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+d>Rt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Rt} process-wide`);se+=d;let c;try{let y=await St();c=await chunkJC47NRJC_cjs.t(e,y,n,o);}catch(y){throw se-=d,y}return Object.freeze({createMeasurer:()=>Ot(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),N.set(i,p),p.catch(()=>{N.get(i)===p&&N.delete(i);});}let l=e.fingerprint,u=p.then(h=>Object.freeze({createMeasurer:h.createMeasurer,shapeLaidOutText:h.shapeLaidOutText,producer:["node-export",l,h.shapingHash,`producer:${h.producerVersion}`,`fallback:${chunkQFKGI242_cjs.ga}`].join("|"),extensionFingerprint:l}));return r||bt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var so="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function lo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===so),n;if(t){let a=chunkPWTRJSES_cjs.J(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkPWTRJSES_cjs.if(o,n)}function wt(e,o){let t=lo(e);if(t.length!==0)return chunkERECKTIR_cjs.j(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunkQFKGI242_cjs.h(s))),r=chunkERECKTIR_cjs.C(t,{maxFontBytes:chunkQFKGI242_cjs.a,aggregateBudget:co(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 co(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkQFKGI242_cjs.c:Math.max(0,chunkQFKGI242_cjs.c-o)}function uo(e){return te(e)&&ie(e)}var A=0,At=Symbol("font-resolution-timeout");function po(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>chunkQFKGI242_cjs.c)throw new chunkHYASLE2G_cjs.d("layoutFailed",`Active document export font bytes are limited to ${chunkQFKGI242_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 fo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkPWTRJSES_cjs.la||t.namespaceUri===""))?.value}async function mo(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=chunkYBMWBXST_cjs.Ca(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...h}=o,d=Array.isArray(n)?n:[n],c=a===void 0?[]:Array.isArray(a)?a:[a],y,E;try{E=await yo(t.view,d,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:c,onFontResolution:R=>(y=R,i?.(R))});}catch(R){if(R instanceof chunkHYASLE2G_cjs.d&&R.code==="aborted")return {ok:false,reason:"aborted"};throw R}if(!y)throw E?.dispose(),new chunkHYASLE2G_cjs.d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=chunkHYASLE2G_cjs.e(t.view,{...h,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(R){throw E?.dispose(),R}if(!b.ok)return E?.dispose(),b;let f=b.session,g=E,x="active",F=()=>x==="aborted"?new chunkHYASLE2G_cjs.d("aborted","Export resource settlement was aborted"):new chunkHYASLE2G_cjs.d("disposed","Export session has been disposed"),m=R=>{if(x==="active"){x=R,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>m("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:y,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:R=>x==="active"?f.layoutFor(R):Promise.reject(F()),validatedImageBytes:R=>x==="active"?f.validatedImageBytes(R):null,admittedFontFace:xt({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Et({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>m("disposed")})}}async function yo(e,o,t={}){let n=chunkJC47NRJC_cjs.k(t.fontShaping,chunkJC47NRJC_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=ho(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(At),a);try{de(r.signal);let p=(async()=>{let l=po(t.onActiveFontBytesChange),u=!1;try{let h=xo(e).slice(0,chunkERECKTIR_cjs.c),d=chunkERECKTIR_cjs.x(e,h),c=[],y={dropped:[]},E=wt(e,y),b=[...o,...E?[E]:[],...t.lastResortFonts??[]],f=await chunkERECKTIR_cjs.o(b,{families:[...new Set([...(t.glyphFallbacks??[]).map(m=>m.family),...d.families])].slice(0,chunkERECKTIR_cjs.c),defaultFamily:chunkERECKTIR_cjs.d.family,signal:r.signal},{onOriginFailure:m=>c.push(m),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=chunkERECKTIR_cjs.z(chunkERECKTIR_cjs.f(f??{}),d);if(g.sources.length===0){let m=oe(h,g.defaultFont.family,c,void 0,y.dropped);ne(m,t),re(m,t,t.glyphFallbacks);return}let x=await vt(chunkJC47NRJC_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let F=oe(h,g.defaultFont.family,c,x.resolveFont,y.dropped);return ne(F,t),re(F,t,t.glyphFallbacks),u=!0,Object.freeze({...x,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,go(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function ho(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 go(e){return new Promise((o,t)=>{let n=()=>{t(Tt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Tt(e){let o=e.reason===At;return new chunkHYASLE2G_cjs.d(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 Tt(e)}function xo(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,h)=>{!h||a.has(h.name)||(a.add(h.name),u.push(h.root));};for(let u of e.headerFooterPartsBySection()){for(let h of u.headers.values())r(t,h);for(let h of u.footers.values())r(t,h);}for(let u of ["footnote","endnote"])n.push(...Fo(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,h)=>{let d=chunkFLBEJC6X_cjs.e(u,e.stylesRoot(),i,bo(u,h)),c=chunkERECKTIR_cjs.v(u,e.numberingRoot(),e.stylesRoot(),i);for(let y of [...d.direct,...Oo(u),...c,...chunkERECKTIR_cjs.s(u,e.stylesRoot(),i),...d.inherited]){let E=y.toLowerCase();p.has(E)||p.set(E,y);}};return l(o,"body"),l(t,"furniture"),l(n,"note"),[...p.values()]}function Fo(e,o){let t=chunkPWTRJSES_cjs.ch(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkPWTRJSES_cjs.dh(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=chunkPWTRJSES_cjs.zc(r),i=chunkPWTRJSES_cjs.yc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Eo="http://schemas.openxmlformats.org/officeDocument/2006/math";function bo(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===chunkPWTRJSES_cjs.la&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkPWTRJSES_cjs.la&&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)Ro(s.paragraph,t,s.context);}return t}function Ro(e,o,t){let n=chunkQFKGI242_cjs.Vb(),a=null,r=null,s="",i=false,p=false,l=false,u=0,h=[];for(let d=e.children.length-1;d>=0;d-=1){let c=e.children[d];c.kind!=="textValue"&&h.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;h.length>0;){let{node:d,runId:c,visibility:y,containerDepth:E}=h.pop();if(E>=chunkPWTRJSES_cjs.wa||d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="p")continue;let b=d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="r"?d.id:c;if(d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="fldSimple"){let f=ce(d,"instr")??"";chunkQFKGI242_cjs.Yc(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&So(d)!==k&&o.add(d.id);}if(d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="fldChar"){let f=ce(d,"fldCharType");if(f==="begin")chunkQFKGI242_cjs.Yb(n),n.nesting===1&&(a=b,r=null,s="",i=false,p=false,l=chunkPWTRJSES_cjs.Bf(d),u=0);else if(f==="separate"){let g=n.nesting===1;if(chunkQFKGI242_cjs._b(n),g){let x=chunkQFKGI242_cjs.Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow,r=b,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=chunkQFKGI242_cjs.Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow;}if(!i&&chunkQFKGI242_cjs.Xc(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 x=r??a;x&&o.add(x);}}chunkQFKGI242_cjs.$b(n);}continue}if(d.namespaceUri===chunkPWTRJSES_cjs.la&&(d.localName==="instrText"||d.localName==="delInstrText")){chunkQFKGI242_cjs.Zb(n,It(d),d.localName==="delInstrText");continue}n.nesting>0&&chunkQFKGI242_cjs.ac(n)&&d.namespaceUri===chunkPWTRJSES_cjs.la&&Lt(d)&&(u|=y);for(let f=d.children.length-1;f>=0;f-=1){let g=d.children[f];g.kind!=="textValue"&&h.push({node:g,runId:b,visibility:y&kt(d),containerDepth:chunkPWTRJSES_cjs.xa(d,E)});}}chunkQFKGI242_cjs.Wb(n);}function Lt(e){return e.localName==="t"||e.localName==="delText"?It(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,Pt=2,Dt=4,k=ue|Pt|Dt;function So(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===chunkPWTRJSES_cjs.la&&n.localName==="p")){if(n.namespaceUri===chunkPWTRJSES_cjs.la&&Lt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&kt(n)});}}return t}function kt(e){return e.namespaceUri!==chunkPWTRJSES_cjs.la?k:e.localName==="ins"||e.localName==="moveTo"?ue|Pt:e.localName==="del"||e.localName==="moveFrom"?ue|Dt:k}function Oo(e){let o=new Map,t=n=>{let a=chunkFLBEJC6X_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===Eo&&t(chunkQFKGI242_cjs.$c),r.namespaceUri===chunkPWTRJSES_cjs.la&&r.localName==="sym"&&t(chunkFLBEJC6X_cjs.c(fo(r,"font"))),r.namespaceUri===chunkPWTRJSES_cjs.la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkQFKGI242_cjs.Wc(s??"")?.font??null);}if(r.namespaceUri===chunkPWTRJSES_cjs.la&&r.localName==="p")for(let s of chunkERECKTIR_cjs.u(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 It(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 Nt="FILE_TOO_LARGE",_t=8;function vo(e){return typeof e=="object"&&e!==null}function Ct(e){if(!(!vo(e)||typeof e.code!="string"))return e.code}function Ut(e){return e===""||e.toLowerCase()==="localhost"}function wo(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Bt(e){let o=wo(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 qt(e){let o=Bt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Ao(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function To(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(!Ut(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=qt(o.pathname);if(t===null||Ao(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Lo(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 Po(e){let o=Lo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>_t)throw new TypeError(`trustedRoot must not exceed ${_t} directories`);return o.map(To)}function Do(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkQFKGI242_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkQFKGI242_cjs.a}`);return e}function ko(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Ut(e.host))return null;let t=Bt(e.pathname);if(t===null)return null;for(let n of o){let a=qt(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 Io(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 _o(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Mt(e,o,t){return e.some(n=>_o(n,o,t))}async function Mo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(Ct(a)==="ENOENT")continue;throw a}return t}function No(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(y=>p.resolve(i(y.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Mt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let h=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",d=await a(u,h),c=()=>{d.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let y=await r(u);if(!Mt(await Mo(l,r),y,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await d.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Nt});let b=new Uint8Array(E),f=0;for(;f<b.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await d.read(b,f,b.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===b.byteLength?b:b.slice(0,f)}catch(y){throw t?.aborted?t.reason:y}finally{t?.removeEventListener("abort",c),await d.close().catch(()=>{});}}}function Co(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=Po(e.trustedRoot),t=Do(e.maxBytes),n=e.read??No(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=Io(r);if(p.protocol!=="file:")return a(p,s);let l=ko(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,h=()=>u?.abort(i?.reason);i?.addEventListener("abort",h,{once:true});let d;try{if(d=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(d.byteLength>t)return new Response(null,{status:413})}catch(c){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let y=Ct(c);if(y===Nt)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw c}finally{i?.removeEventListener("abort",h);}return new Response(d,{status:200})})}
|
|
2
|
-
Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return
|
|
1
|
+
'use strict';var chunkE4IAO4CY_cjs=require('./chunk-E4IAO4CY.cjs'),chunk6NVZNB7O_cjs=require('./chunk-6NVZNB7O.cjs'),chunkTELQ52LG_cjs=require('./chunk-TELQ52LG.cjs'),chunkFDSL5OJU_cjs=require('./chunk-FDSL5OJU.cjs'),chunkXJYZVGQR_cjs=require('./chunk-XJYZVGQR.cjs');require('./chunk-OKMEMSKB.cjs'),require('./chunk-TJHE5EET.cjs');var chunk65XBN67F_cjs=require('./chunk-65XBN67F.cjs'),chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs');function N(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},i=e.shape(n);if(t.glyphs.length!==i.glyphs.length||t.glyphs.some((l,c)=>l.id!==i.glyphs[c]?.id))return t;let r=[],s=0;for(let l of o.text){let c=l.toUpperCase()!==l,h=r.at(-1);h&&(h.lower===c||/\p{M}/u.test(l))?h.text+=l:r.push({text:l,start:s,lower:c}),s+=l.length;}let a=[],p=[],d=[],u=true,m=0;for(let l of o.environment.direction==="rtl"?r.reverse():r){let c=l.lower?.8:1,h=[],E=[],R="",f=l.start;for(let F of l.text){let y=l.lower?F.toUpperCase():F;for(let S=0;S<y.length;S++)h.push(f),E.push(f+F.length);R+=y,f+=F.length;}let g=e.shape({...n,text:R}),x=a.length;for(let[F,y]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:d.push(S*c),a.push({...y,cluster:h[y.cluster]??l.start,originX:chunkFDSL5OJU_cjs.n(m+Math.round(y.originX*c)),originY:chunkFDSL5OJU_cjs.n(Math.round(y.originY*c)),offsetX:chunkFDSL5OJU_cjs.n(Math.round(y.offsetX*c)),offsetY:chunkFDSL5OJU_cjs.n(Math.round(y.offsetY*c)),advanceX:chunkFDSL5OJU_cjs.n(Math.round(y.advanceX*c)),advanceY:chunkFDSL5OJU_cjs.n(Math.round(y.advanceY*c)),drawScale:c});}for(let F of g.clusters){let y=h[F.textStart]??l.start,S=E[F.textEnd-1]??f,b=chunkFDSL5OJU_cjs.n(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===y&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:chunkFDSL5OJU_cjs.n(T.advance+b),caretEdges:[chunkFDSL5OJU_cjs.n(0),chunkFDSL5OJU_cjs.n(T.advance+b)]}:p.push({...F,textStart:y,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:b,caretEdges:F.caretEdges.map(V=>chunkFDSL5OJU_cjs.n(Math.round(V*c))),fontSpan:0});}m+=g.glyphs.reduce((F,y)=>F+Math.round(y.advanceX*c),0);}return {...t,glyphs:a,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:u&&d.length===a.length?d:void 0}}var ft=new WeakMap;function Gt(e){let o=ft.get(e);return o===void 0&&(o=Yt(e.bytes,e.faceIndex),ft.set(e,o)),o}var Vt=new Set(["COLR","CBDT","sbix"]),Wt=512;function Yt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(mt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let i=Math.min(t.getUint16(n+4),Wt);for(let r=0;r<i;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Vt.has(mt(e,s)))return true}return false}function mt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var $t=/\p{Emoji_Presentation}|️/u;function Kt(e){return $t.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Gt);if(t.length===0||t.length===e.length)return e;let n=e.filter(i=>!t.includes(i));return Kt(o)?[...t,...n]:[...n,...t]}var Zt=2048;function yt(e,o,t,n){if(!t.clusters.length||t.clusters.length>Zt)return null;let i=(f,g)=>{let{context:x,...F}=o,y={...F,text:g,environment:chunkFDSL5OJU_cjs.r({...o.environment,font:f})};return N(e,y,e.shape(y))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),b=s.get(x)??z(n,S).find(T=>{try{return !i(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!b)return null;s.set(x,b),g=b;}let y=r.at(-1);y&&y.font===g&&y.end===f.textStart?y.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let a=[],p=[],d=[],u=[],m=true,l=0,c=0,h=0,E=0,R=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=i(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(y=>y.id===0))return null;let x=a.length,F=d.length;for(let y of g.glyphs)a.push({...y,cluster:f.start+y.cluster,originX:chunkFDSL5OJU_cjs.n(l+y.originX),originY:chunkFDSL5OJU_cjs.n(c+y.originY)});if(g.exactAdvancesX===void 0)m=false;else for(let y of g.exactAdvancesX)u.push(y);for(let y of g.clusters)p.push({...y,textStart:f.start+y.textStart,textEnd:f.start+y.textEnd,glyphStart:x+y.glyphStart,glyphEnd:x+y.glyphEnd,fontSpan:F});g.glyphs.length&&d.push({font:f.font,glyphStart:x,glyphEnd:a.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),l+=g.glyphs.reduce((y,S)=>y+S.advanceX,0),c+=g.glyphs.reduce((y,S)=>y+S.advanceY,0),h=Math.max(h,g.metrics.ascent),E=Math.max(E,g.metrics.descent),R=Math.max(R,g.metrics.lineGap);}return chunkFDSL5OJU_cjs.u({...t,glyphs:a,clusters:p,fontSpans:d,exactAdvancesX:m&&u.length===a.length?u:void 0,metrics:{ascent:chunkFDSL5OJU_cjs.n(h),descent:chunkFDSL5OJU_cjs.n(E),lineGap:chunkFDSL5OJU_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var Jt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Qt=512,ht=new WeakMap;function eo(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",a=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(a=r(12+o*4),a<0))return t}let p=i(a+4);if(p<0||p>1024)return t;let d=-1;for(let c=0;c<p;c+=1){let h=a+12+c*16;if(s(h)==="GSUB"){d=r(h+8);break}}if(d<0)return t;let u=i(d+4);if(u<=0)return t;let m=d+u,l=i(m);if(l<0)return t;for(let c=0;c<Math.min(l,Qt);c+=1){let h=s(m+2+c*6);h&&t.add(h);}return t}function to(e,o){let t=ht.get(e);return t||(t=eo(e.bytes,e.faceIndex),ht.set(e,t)),(Jt.get(o)??[o.toLowerCase()]).some(i=>t.has(i))}function gt(e,o){let t=e.filter(n=>to(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let i=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(i===o.text)return t;try{let r=e.shape({...o,text:i});return chunkFDSL5OJU_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function xt(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(a=>e.fonts.resolve(a)).filter(a=>!(a instanceof chunkFDSL5OJU_cjs.d)),n={shape(a){return Q(e.shaper,a,e.shaper.shape(a))}},i=new WeakMap,r={shape(a){let p=e.shaper.shape(a),d=i.get(p);if(d&&d.input.text===a.text&&d.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&d.input.bidiLevel===a.bidiLevel&&d.input.context?.before===a.context?.before&&d.input.context?.after===a.context?.after&&d.input.environment===a.environment)return d.run;let u=s(a,Q(e.shaper,a,p));return i.set(p,{input:a,run:u}),u}},s=(a,p)=>{let d=N(n,a,p);if(!d.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(a.text))return d;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let u=yt(n,a,d,t);if(u)return u}for(let u of gt(z(t,a.text),a.environment.script))if(!(u.hash===a.environment.font.hash&&u.faceIndex===a.environment.font.faceIndex))try{let m={...a,environment:chunkFDSL5OJU_cjs.r({...a.environment,font:u})},l=N(n,m,n.shape(m));if(!l.glyphs.some(c=>c.id===0))return l}catch{}return d};return {...e,shaper:r}}var ee=chunkFDSL5OJU_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var oo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var Ft=new WeakMap;function H(e){let o=Ft.get(e);return o||Ft.set(e,o=no(e)),o}function no(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function ro(e){return Object.freeze({...H(e),bytes:chunkFDSL5OJU_cjs.i(e)})}function io(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkFDSL5OJU_cjs.d?null:ro(t)}catch{return null}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return io(e.resolve(),o)}}function ao(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,i=[],r=new Set){let s=new Map;for(let p of [...e,o]){let d=p.toLowerCase();s.has(d)||s.set(d,p);}let a=[...s.values()].map(p=>{let d=[];for(let m of oo){let l=n?.({family:p,...m});!l||l instanceof chunkFDSL5OJU_cjs.d||d.push(Object.freeze({...m,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}let u=r.has(p.trim().toLowerCase())?d.filter(m=>m.via==="direct").length:d.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(d)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(a),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ao(i)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=d=>d.trim().toLowerCase(),i=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(d=>n(d.family))),s=d=>{if(!(d instanceof chunkE4IAO4CY_cjs.l))return true;let u=n(d.request.family);return i.has(u)||!r.has(u)},a=e.originFailures.some(({cause:d})=>d instanceof chunkE4IAO4CY_cjs.m?d.causes.length===0||d.causes.some(s):s(d));if(o.fontPolicy!=="strict"||!a&&e.families.every(d=>d.coverage==="complete"))return;let p=e.families.filter(d=>d.coverage!=="complete").map(d=>d.family).join(", ");throw new chunkTELQ52LG_cjs.g("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let i={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkFDSL5OJU_cjs.h(i),s=o.get(r);if(!s){try{s=e.fonts.resolve(i);}catch{return null}o.set(r,s);}return s instanceof chunkFDSL5OJU_cjs.d?null:s}function bt(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function so(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let i=chunkFDSL5OJU_cjs.xa(n.style,n.fontSlot),r=chunkFDSL5OJU_cjs.pd(n)?chunkFDSL5OJU_cjs.qd(n):chunkFDSL5OJU_cjs.ea(n.text,i);if(r.length===0)return null;let s=i.fontFamily??e.defaultFont.family,a=G(e,o,s,i)??(chunkZOZI27AW_cjs.b(s)&&so(r)?G(e,o,e.defaultFont.family,i):null);if(!a)return null;try{if(i.smallCaps&&!chunk6NVZNB7O_cjs.ea(e.shaper,e.environment,a,i,t))return null;let p=chunk6NVZNB7O_cjs.da(e.shaper,e.environment,a,i,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??a),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(d=>H(d.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var M=new Map,St=new WeakMap,se=0,C;var le=32,Ot=chunkFDSL5OJU_cjs.c;function vt(){if(C)return C;let e=(async()=>(await chunk6NVZNB7O_cjs.d(),chunk6NVZNB7O_cjs.h({...chunk6NVZNB7O_cjs.i,maxFontBytes:chunkFDSL5OJU_cjs.a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function wt(e){let o=X();return chunk6NVZNB7O_cjs.ga(e,{resolveFont(t){return bt(e,o,t)},fallback:chunkFDSL5OJU_cjs.ka()})}async function At(e,o,t=[],n=false,i){if(!chunk6NVZNB7O_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk6NVZNB7O_cjs.k(i,chunk6NVZNB7O_cjs.i),s=await vt(),a=xt(await chunk6NVZNB7O_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>wt(a),resolveFont:p=>a.fonts.resolve(p),shapeLaidOutText:ae(a),producer:["node-export-session",JSON.stringify(t),e.fingerprint,a.operation.shapingHash,`producer:${a.operation.producerVersion}`,`fallback:${chunkFDSL5OJU_cjs.ja}`].join("|"),extensionFingerprint:e.fingerprint})}function lo(e,o,t){if(!chunk6NVZNB7O_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk6NVZNB7O_cjs.k(t,chunk6NVZNB7O_cjs.i),i=chunk6NVZNB7O_cjs.j(n),r=St.get(e),s=r?.get(i);if(s)return s;let a=`${chunk6NVZNB7O_cjs.o(e)}|${i}`,p=M.get(a);if(!p){if(M.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let l=chunk6NVZNB7O_cjs.n(e).sources.reduce((h,E)=>h+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+l>Ot)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Ot} process-wide`);se+=l;let c;try{let h=await vt();c=await chunk6NVZNB7O_cjs.t(e,h,n,o);}catch(h){throw se-=l,h}return Object.freeze({createMeasurer:()=>wt(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),M.set(a,p),p.catch(()=>{M.get(a)===p&&M.delete(a);});}let d=e.fingerprint,u=p.then(m=>Object.freeze({createMeasurer:m.createMeasurer,shapeLaidOutText:m.shapeLaidOutText,producer:["node-export",d,m.shapingHash,`producer:${m.producerVersion}`,`fallback:${chunkFDSL5OJU_cjs.ja}`].join("|"),extensionFingerprint:d}));return r||St.set(e,r=new Map),r.set(i,u),u.catch(()=>{r?.get(i)===u&&r.delete(i);}),u}var co="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function uo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(i=>i.type===co),n;if(t){let i=chunkZOZI27AW_cjs.N(t);i.mode==="Internal"&&i.target.ok&&(n=o.parts.get(i.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkZOZI27AW_cjs.qf(o,n)}function Tt(e,o){let t=uo(e);if(t.length!==0)return chunkE4IAO4CY_cjs.j(n=>{let i=new Set((n.resolvedFaces??[]).map(s=>chunkFDSL5OJU_cjs.h(s))),r=chunkE4IAO4CY_cjs.E(t,{maxFontBytes:chunkFDSL5OJU_cjs.a,aggregateBudget:po(n),shadowedRequests:i});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function po(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkFDSL5OJU_cjs.c:Math.max(0,chunkFDSL5OJU_cjs.c-o)}function fo(e){return te(e)&&ie(e)}var A=0,Lt=Symbol("font-resolution-timeout");function mo(e){let o=0,t=false;return e?.(A),{reserve:i=>{if(t)throw new Error("Document font-byte lease is already released");if(A+i>chunkFDSL5OJU_cjs.c)throw new chunkTELQ52LG_cjs.g("layoutFailed",`Active document export font bytes are limited to ${chunkFDSL5OJU_cjs.c}; requested ${i} bytes with ${A} bytes already active`);A+=i,o+=i,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=i,o-=i,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function yo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkZOZI27AW_cjs.pa||t.namespaceUri===""))?.value}async function ho(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunk65XBN67F_cjs.za(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:i,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:d,fontShaping:u,...m}=o,l=Array.isArray(n)?n:[n],c=i===void 0?[]:Array.isArray(i)?i:[i],h,E;try{E=await go(t.view,l,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:d,fontShaping:u,lastResortFonts:c,onFontResolution:b=>(h=b,a?.(b))});}catch(b){if(b instanceof chunkTELQ52LG_cjs.g&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!h)throw E?.dispose(),new chunkTELQ52LG_cjs.g("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkTELQ52LG_cjs.h(t.view,{...m,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(b){throw E?.dispose(),b}if(!R.ok)return E?.dispose(),R;let f=R.session,g=E,x="active",F=()=>x==="aborted"?new chunkTELQ52LG_cjs.g("aborted","Export resource settlement was aborted"):new chunkTELQ52LG_cjs.g("disposed","Export session has been disposed"),y=b=>{if(x==="active"){x=b,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>y("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:h,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:b=>x==="active"?f.layoutFor(b):Promise.reject(F()),validatedImageBytes:b=>x==="active"?f.validatedImageBytes(b):null,admittedFontFace:Et({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Rt({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>y("disposed")})}}async function go(e,o,t={}){let n=chunk6NVZNB7O_cjs.k(t.fontShaping,chunk6NVZNB7O_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let i=xo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let a=setTimeout(()=>r.abort(Lt),i);try{de(r.signal);let p=(async()=>{let d=mo(t.onActiveFontBytesChange),u=!1;try{let m=Eo(e).slice(0,chunkE4IAO4CY_cjs.c),l=chunkE4IAO4CY_cjs.x(e,m),c=[],h={dropped:[]},E=Tt(e,h),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],f=await chunkE4IAO4CY_cjs.o(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(b=>b.family),...l.families])].slice(0,chunkE4IAO4CY_cjs.c),defaultFamily:chunkE4IAO4CY_cjs.d.family,signal:r.signal},{onOriginFailure:b=>c.push(b),reserveOwnedBytes:d.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=chunkE4IAO4CY_cjs.f(f??{}),x=chunkE4IAO4CY_cjs.z(g,l),F=chunkE4IAO4CY_cjs.A(g,x,l);if(x.sources.length===0){let b=oe(m,x.defaultFont.family,c,void 0,h.dropped);ne(b,t),re(b,t,t.glyphFallbacks);return}let y=await At(chunk6NVZNB7O_cjs.q(x),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let S=oe(m,x.defaultFont.family,c,y.resolveFont,h.dropped,F);return ne(S,t),re(S,t,t.glyphFallbacks),u=!0,Object.freeze({...y,dispose:d.release})}finally{u||d.release();}})();return await Promise.race([p,Fo(r.signal)])}finally{clearTimeout(a),t.signal?.removeEventListener("abort",s);}}function xo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function Fo(e){return new Promise((o,t)=>{let n=()=>{t(Pt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Pt(e){let o=e.reason===Lt;return new chunkTELQ52LG_cjs.g(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Pt(e)}function Eo(e){let o=[e.part().root],t=[],n=[],i=new Set([e.part().name]),r=(u,m)=>{!m||i.has(m.name)||(i.add(m.name),u.push(m.root));};for(let u of e.headerFooterPartsBySection()){for(let m of u.headers.values())r(t,m);for(let m of u.footers.values())r(t,m);}for(let u of ["footnote","endnote"])n.push(...bo(e,u));let s=e.documentThemeFonts(),a={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,d=(u,m)=>{let l=chunkXJYZVGQR_cjs.e(u,e.stylesRoot(),a,So(u,m)),c=chunkE4IAO4CY_cjs.v(u,e.numberingRoot(),e.stylesRoot(),a);for(let h of [...l.direct,...wo(u),...c,...chunkE4IAO4CY_cjs.s(u,e.stylesRoot(),a),...l.inherited]){let E=h.toLowerCase();p.has(E)||p.set(E,h);}};return d(o,"body"),d(t,"furniture"),d(n,"note"),[...p.values()]}function bo(e,o){let t=chunkZOZI27AW_cjs.qh(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkZOZI27AW_cjs.rh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),i=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkZOZI27AW_cjs.Dc(r),a=chunkZOZI27AW_cjs.Cc(r);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&i.push(r);}return i}var Ro="http://schemas.openxmlformats.org/officeDocument/2006/math";function So(e,o){let t=new Set;for(let n of e){let i=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:a}=r.pop();s.namespaceUri===chunkZOZI27AW_cjs.pa&&s.localName==="p"&&i.push({paragraph:s,context:a});let p=s.namespaceUri===chunkZOZI27AW_cjs.pa&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let d=s.children.length-1;d>=0;d-=1){let u=s.children[d];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of i)Oo(s.paragraph,t,s.context);}return t}function Oo(e,o,t){let n=chunkFDSL5OJU_cjs.ac(),i=null,r=null,s="",a=false,p=false,d=false,u=0,m=[];for(let l=e.children.length-1;l>=0;l-=1){let c=e.children[l];c.kind!=="textValue"&&m.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;m.length>0;){let{node:l,runId:c,visibility:h,containerDepth:E}=m.pop();if(E>=chunkZOZI27AW_cjs.Aa||l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="p")continue;let R=l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="r"?l.id:c;if(l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="fldSimple"){let f=ce(l,"instr")??"";chunkFDSL5OJU_cjs.gd(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&vo(l)!==k&&o.add(l.id);}if(l.namespaceUri===chunkZOZI27AW_cjs.pa&&l.localName==="fldChar"){let f=ce(l,"fldCharType");if(f==="begin")chunkFDSL5OJU_cjs.dc(n),n.nesting===1&&(i=R,r=null,s="",a=false,p=false,d=chunkZOZI27AW_cjs.Jf(l),u=0);else if(f==="separate"){let g=n.nesting===1;if(chunkFDSL5OJU_cjs.fc(n),g){let x=chunkFDSL5OJU_cjs.cc(n);s=x.instruction,a=x.overflow||n.nestingOverflow,r=R,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=chunkFDSL5OJU_cjs.cc(n);s=x.instruction,a=x.overflow||n.nestingOverflow;}if(!a&&chunkFDSL5OJU_cjs.fd(s,{hasSeparate:p,hasLegacyFormData:d,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??i;x&&o.add(x);}}chunkFDSL5OJU_cjs.gc(n);}continue}if(l.namespaceUri===chunkZOZI27AW_cjs.pa&&(l.localName==="instrText"||l.localName==="delInstrText")){chunkFDSL5OJU_cjs.ec(n,Nt(l),l.localName==="delInstrText");continue}n.nesting>0&&chunkFDSL5OJU_cjs.hc(n)&&l.namespaceUri===chunkZOZI27AW_cjs.pa&&Dt(l)&&(u|=h);for(let f=l.children.length-1;f>=0;f-=1){let g=l.children[f];g.kind!=="textValue"&&m.push({node:g,runId:R,visibility:h&_t(l),containerDepth:chunkZOZI27AW_cjs.Ba(l,E)});}}chunkFDSL5OJU_cjs.bc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Nt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,kt=2,It=4,k=ue|kt|It;function vo(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:i}=o.pop();if(!(n.namespaceUri===chunkZOZI27AW_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkZOZI27AW_cjs.pa&&Dt(n)&&(t|=i,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:i&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkZOZI27AW_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|kt:e.localName==="del"||e.localName==="moveFrom"?ue|It:k}function wo(e){let o=new Map,t=n=>{let i=chunkXJYZVGQR_cjs.b(n??void 0);if(i===null)return;let r=i.toLowerCase();o.has(r)||o.set(r,i);};for(let n of e){let i=[n];for(;i.length>0;){let r=i.pop();if(r.namespaceUri===Ro&&t(chunkFDSL5OJU_cjs.kd),r.namespaceUri===chunkZOZI27AW_cjs.pa&&r.localName==="sym"&&t(chunkXJYZVGQR_cjs.c(yo(r,"font"))),r.localName==="textpath"&&t(chunkZOZI27AW_cjs.ud(r)),r.namespaceUri===chunkZOZI27AW_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkFDSL5OJU_cjs.ed(s??"")?.font??null);}if(r.namespaceUri===chunkZOZI27AW_cjs.pa&&r.localName==="p")for(let s of chunkE4IAO4CY_cjs.u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let a=r.children[s];a.kind!=="textValue"&&i.push(a);}}}return [...o.values()]}function Nt(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let i=n.children.length-1;i>=0;i-=1)t.push(n.children[i]);}return o}var Ut="FILE_TOO_LARGE",Mt=8;function Ao(e){return typeof e=="object"&&e!==null}function Bt(e){if(!(!Ao(e)||typeof e.code!="string"))return e.code}function qt(e){return e===""||e.toLowerCase()==="localhost"}function To(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function zt(e){let o=To(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function jt(e){let o=zt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Lo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Po(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!qt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=jt(o.pathname);if(t===null||Lo(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Do(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function ko(e){let o=Do(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Mt)throw new TypeError(`trustedRoot must not exceed ${Mt} directories`);return o.map(Po)}function Io(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkFDSL5OJU_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkFDSL5OJU_cjs.a}`);return e}function _o(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!qt(e.host))return null;let t=zt(e.pathname);if(t===null)return null;for(let n of o){let i=jt(n.pathname);if(i===null||!t.startsWith(i)||t.length<=i.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function No(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Mo(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Ct(e,o,t){return e.some(n=>Mo(n,o,t))}async function Co(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(i){if(Bt(i)==="ENOENT")continue;throw i}return t}function Uo(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:i,realpath:r},{constants:s},{fileURLToPath:a},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),d=e.map(h=>p.resolve(a(h.href))),u=p.resolve(a(typeof o=="string"?o:o.href));if(!Ct(d,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let m=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",l=await i(u,m),c=()=>{l.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let h=await r(u);if(!Ct(await Co(d,r),h,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await l.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Ut});let R=new Uint8Array(E),f=0;for(;f<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await l.read(R,f,R.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===R.byteLength?R:R.slice(0,f)}catch(h){throw t?.aborted?t.reason:h}finally{t?.removeEventListener("abort",c),await l.close().catch(()=>{});}}}function Bo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=ko(e.trustedRoot),t=Io(e.maxBytes),n=e.read??Uo(o),i=e.networkFetch??fetch;return(async(r,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let p=No(r);if(p.protocol!=="file:")return i(p,s);let d=_o(p,o);if(!d)return new Response(null,{status:404});let u=a?new AbortController:void 0,m=()=>u?.abort(a?.reason);a?.addEventListener("abort",m,{once:true});let l;try{if(l=await n(d,{maxBytes:t,...u?{signal:u.signal}:{}}),a?.aborted)throw a.reason;if(l.byteLength>t)return new Response(null,{status:413})}catch(c){if(a?.aborted)throw a.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let h=Bt(c);if(h===Ut)return new Response(null,{status:413});if(h==="ENOENT"||h==="ENOTDIR"||h==="ELOOP")return new Response(null,{status:404});throw c}finally{a?.removeEventListener("abort",m);}return new Response(l,{status:200})})}
|
|
2
|
+
Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.g}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.c}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.b}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkTELQ52LG_cjs.h}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=lo;exports.createPackagedFileFetch=Bo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=fo;exports.openFontBackedDocumentForExport=ho;
|
package/dist/export.d.ts
CHANGED
|
@@ -7,23 +7,16 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions } from './revision-projection-Cn6rZJ7H.js';
|
|
11
|
+
import { aj as PreservedImageMime, ae as ImageResourceLimits, an as SupportedImageMime, ad as ImageDecodePort } from './tree-op-types-C_S2niXW.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, g as StyleSpanRecord } from './semantic-records-BvN-WWst.js';
|
|
13
|
+
import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-Bcz9_Qva.js';
|
|
13
14
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
14
|
-
import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-
|
|
15
|
-
import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-
|
|
16
|
-
import './
|
|
17
|
-
import './
|
|
18
|
-
import './
|
|
19
|
-
import './tree-package-store-DKhdEVym.js';
|
|
20
|
-
import './editor-DaEJd2so.js';
|
|
21
|
-
import './contracts/document.js';
|
|
22
|
-
import './contracts/interaction.js';
|
|
23
|
-
import './semantic-interaction-Dc3pf3hr.js';
|
|
24
|
-
import './document-protection-8eyMWIJ0.js';
|
|
25
|
-
import './failure-NS2lsya4.js';
|
|
26
|
-
import './diagnostic-hints-2Bke6H_w.js';
|
|
15
|
+
import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-E5J4Z1Gf.js';
|
|
16
|
+
import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-BlQNGdvR.js';
|
|
17
|
+
import './editor-scope-B3L-1ALc.js';
|
|
18
|
+
import './tree-package-store-CRHvMyNj.js';
|
|
19
|
+
import './editor-fonts-D_-vjuJi.js';
|
|
27
20
|
|
|
28
21
|
/** Source content that cannot be certified by the layout snapshot. @public */
|
|
29
22
|
interface ExportContentWarning {
|
package/dist/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {c as c$1,x,o,d as d$1,z as z$1,f,v,s as s$1,j as j$2,C as C$1,m as m$1,u,l as l$1}from'./chunk-7ATNKARV.js';import {l,j as j$1,h,i,n,m,s,p,c as c$2,g,$,_,ba as ba$1}from'./chunk-EBCXSH2W.js';import'./chunk-RIYSCEFQ.js';import {d,e}from'./chunk-NKPUH3QJ.js';export{d as ExportResourceError,c as createNodeImageDecodePort,b as exportDestinationNamed,e as openDocumentForExport}from'./chunk-NKPUH3QJ.js';import {c,ga,a,ua,ed,fd,ba,ha,h as h$1,d as d$2,Wc,b as b$1,i as i$1,Vb,Yc,Yb,_b,Xb,Xc,$b,Zb,ac,Wb,p as p$1,s as s$2,n as n$1,$c}from'./chunk-UM26GH5B.js';import {e as e$1,c as c$3,b as b$2}from'./chunk-RJCQGJR7.js';import'./chunk-T32MGBJS.js';import {Ca}from'./chunk-PF5NJWS3.js';import {ch,dh,zc,yc,b,la,J,if as _if,wa,Bf,xa}from'./chunk-5SPITS5F.js';function M(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,c)=>d.id!==a.glyphs[c]?.id))return t;let r=[],s=0;for(let d of o.text){let c=d.toUpperCase()!==d,y=r.at(-1);y&&(y.lower===c||/\p{M}/u.test(d))?y.text+=d:r.push({text:d,start:s,lower:c}),s+=d.length;}let i=[],p=[],l=[],u=true,h=0;for(let d of o.environment.direction==="rtl"?r.reverse():r){let c=d.lower?.8:1,y=[],E=[],b="",f=d.start;for(let F of d.text){let m=d.lower?F.toUpperCase():F;for(let S=0;S<m.length;S++)y.push(f),E.push(f+F.length);b+=m,f+=F.length;}let g=e.shape({...n,text:b}),x=i.length;for(let[F,m]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:l.push(S*c),i.push({...m,cluster:y[m.cluster]??d.start,originX:n$1(h+Math.round(m.originX*c)),originY:n$1(Math.round(m.originY*c)),offsetX:n$1(Math.round(m.offsetX*c)),offsetY:n$1(Math.round(m.offsetY*c)),advanceX:n$1(Math.round(m.advanceX*c)),advanceY:n$1(Math.round(m.advanceY*c)),drawScale:c});}for(let F of g.clusters){let m=y[F.textStart]??d.start,S=E[F.textEnd-1]??f,R=n$1(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===m&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:n$1(T.advance+R),caretEdges:[n$1(0),n$1(T.advance+R)]}:p.push({...F,textStart:m,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:R,caretEdges:F.caretEdges.map(V=>n$1(Math.round(V*c))),fontSpan:0});}h+=g.glyphs.reduce((F,m)=>F+Math.round(m.advanceX*c),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 ut=new WeakMap;function Ht(e){let o=ut.get(e);return o===void 0&&(o=Vt(e.bytes,e.faceIndex),ut.set(e,o)),o}var Xt=new Set(["COLR","CBDT","sbix"]),Gt=512;function Vt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(pt(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),Gt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Xt.has(pt(e,s)))return true}return false}function pt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var Wt=/\p{Emoji_Presentation}|️/u;function Yt(e){return Wt.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Ht);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return Yt(o)?[...t,...n]:[...n,...t]}var $t=2048;function ft(e,o,t,n){if(!t.clusters.length||t.clusters.length>$t)return null;let a=(f,g)=>{let{context:x,...F}=o,m={...F,text:g,environment:p$1({...o.environment,font:f})};return M(e,m,e.shape(m))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),R=s.get(x)??z(n,S).find(T=>{try{return !a(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!R)return null;s.set(x,R),g=R;}let m=r.at(-1);m&&m.font===g&&m.end===f.textStart?m.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let i=[],p=[],l=[],u=[],h=true,d=0,c=0,y=0,E=0,b=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=a(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(m=>m.id===0))return null;let x=i.length,F=l.length;for(let m of g.glyphs)i.push({...m,cluster:f.start+m.cluster,originX:n$1(d+m.originX),originY:n$1(c+m.originY)});if(g.exactAdvancesX===void 0)h=false;else for(let m of g.exactAdvancesX)u.push(m);for(let m of g.clusters)p.push({...m,textStart:f.start+m.textStart,textEnd:f.start+m.textEnd,glyphStart:x+m.glyphStart,glyphEnd:x+m.glyphEnd,fontSpan:F});g.glyphs.length&&l.push({font:f.font,glyphStart:x,glyphEnd:i.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),d+=g.glyphs.reduce((m,S)=>m+S.advanceX,0),c+=g.glyphs.reduce((m,S)=>m+S.advanceY,0),y=Math.max(y,g.metrics.ascent),E=Math.max(E,g.metrics.descent),b=Math.max(b,g.metrics.lineGap);}return s$2({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:h&&u.length===i.length?u:void 0,metrics:{ascent:n$1(y),descent:n$1(E),lineGap:n$1(b)}},{...o.environment,fallbackOrder:n})}var Kt=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 "]]]),Zt=512,mt=new WeakMap;function Jt(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",i=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(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 c=0;c<p;c+=1){let y=i+12+c*16;if(s(y)==="GSUB"){l=r(y+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let h=l+u,d=a(h);if(d<0)return t;for(let c=0;c<Math.min(d,Zt);c+=1){let y=s(h+2+c*6);y&&t.add(y);}return t}function Qt(e,o){let t=mt.get(e);return t||(t=Jt(e.bytes,e.faceIndex),mt.set(e,t)),(Kt.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function yt(e,o){let t=e.filter(n=>Qt(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 s$2({...r,text:o.text},o.environment)}catch{return t}}function ht(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$2)),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=M(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)){let u=ft(n,i,l,t);if(u)return u}for(let u of yt(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let h={...i,environment:p$1({...i.environment,font:u})},d=M(n,h,n.shape(h));if(!d.glyphs.some(c=>c.id===0))return d}catch{}return l};return {...e,shaper:r}}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var eo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var gt=new WeakMap;function H(e){let o=gt.get(e);return o||gt.set(e,o=to(e)),o}function to(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function oo(e){return Object.freeze({...H(e),bytes:i$1(e)})}function no(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$2?null:oo(t)}catch{return null}}function xt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return no(e.resolve(),o)}}function ro(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[]){let r=new Map;for(let i of [...e,o]){let p=i.toLowerCase();r.has(p)||r.set(p,i);}let s=[...r.values()].map(i=>{let p=[];for(let l of eo){let u=n?.({family:i,...l});!u||u instanceof d$2||p.push(Object.freeze({...l,sourceFamily:u.family,via:u.substitution?"substitution":"direct",identity:u.identity,id:u.id,hash:u.hash,faceIndex:u.faceIndex,substitution:u.substitution}));}return Object.freeze({family:i,coverage:p.length===4?"complete":p.length>0?"partial":"none",faces:Object.freeze(p)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(s),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ro(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 l$1))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof m$1?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 d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$1(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$2?null:s}function Ft(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function io(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let a=ua(n.style,n.fontSlot),r=ed(n)?fd(n):ba(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=G(e,o,s,a)??(b(s)&&io(r)?G(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!$(e.shaper,e.environment,i,a,t))return null;let p=_(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>H(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var N=new Map,bt=new WeakMap,se=0,C;var le=32,Rt=c;function St(){if(C)return C;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function Ot(e){let o=X();return ba$1(e,{resolveFont(t){return Ft(e,o,t)},fallback:ha()})}async function vt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j$1(a,h),s$1=await St(),i=ht(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>Ot(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:${ga}`].join("|"),extensionFingerprint:e.fingerprint})}function ao(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j$1(t,h),a=i(n$1),r=bt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=N.get(i$1);if(!p){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let d=m(e).sources.reduce((y,E)=>y+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+d>Rt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Rt} process-wide`);se+=d;let c;try{let y=await St();c=await s(e,y,n$1,o);}catch(y){throw se-=d,y}return Object.freeze({createMeasurer:()=>Ot(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),N.set(i$1,p),p.catch(()=>{N.get(i$1)===p&&N.delete(i$1);});}let l$1=e.fingerprint,u=p.then(h=>Object.freeze({createMeasurer:h.createMeasurer,shapeLaidOutText:h.shapeLaidOutText,producer:["node-export",l$1,h.shapingHash,`producer:${h.producerVersion}`,`fallback:${ga}`].join("|"),extensionFingerprint:l$1}));return r||bt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var so="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function lo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===so),n;if(t){let a=J(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),_if(o,n)}function wt(e,o){let t=lo(e);if(t.length!==0)return j$2(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$1(s))),r=C$1(t,{maxFontBytes:a,aggregateBudget:co(n),shadowedRequests:a$1});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function co(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function uo(e){return te(e)&&ie(e)}var A=0,At=Symbol("font-resolution-timeout");function po(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 d("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 fo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===la||t.namespaceUri===""))?.value}async function mo(e$1,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=Ca(e$1);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...h}=o,d$1=Array.isArray(n)?n:[n],c=a===void 0?[]:Array.isArray(a)?a:[a],y,E;try{E=await yo(t.view,d$1,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:c,onFontResolution:R=>(y=R,i?.(R))});}catch(R){if(R instanceof d&&R.code==="aborted")return {ok:false,reason:"aborted"};throw R}if(!y)throw E?.dispose(),new d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=e(t.view,{...h,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(R){throw E?.dispose(),R}if(!b.ok)return E?.dispose(),b;let f=b.session,g=E,x="active",F=()=>x==="aborted"?new d("aborted","Export resource settlement was aborted"):new d("disposed","Export session has been disposed"),m=R=>{if(x==="active"){x=R,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>m("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:y,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:R=>x==="active"?f.layoutFor(R):Promise.reject(F()),validatedImageBytes:R=>x==="active"?f.validatedImageBytes(R):null,admittedFontFace:xt({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Et({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>m("disposed")})}}async function yo(e,o$1,t={}){let n=j$1(t.fontShaping,h);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=ho(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(At),a);try{de(r.signal);let p$1=(async()=>{let l=po(t.onActiveFontBytesChange),u=!1;try{let h=xo(e).slice(0,c$1),d=x(e,h),c=[],y={dropped:[]},E=wt(e,y),b=[...o$1,...E?[E]:[],...t.lastResortFonts??[]],f$1=await o(b,{families:[...new Set([...(t.glyphFallbacks??[]).map(m=>m.family),...d.families])].slice(0,c$1),defaultFamily:d$1.family,signal:r.signal},{onOriginFailure:m=>c.push(m),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=z$1(f(f$1??{}),d);if(g.sources.length===0){let m=oe(h,g.defaultFont.family,c,void 0,y.dropped);ne(m,t),re(m,t,t.glyphFallbacks);return}let x$1=await vt(p(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let F=oe(h,g.defaultFont.family,c,x$1.resolveFont,y.dropped);return ne(F,t),re(F,t,t.glyphFallbacks),u=!0,Object.freeze({...x$1,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,go(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function ho(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 go(e){return new Promise((o,t)=>{let n=()=>{t(Tt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Tt(e){let o=e.reason===At;return new d(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 Tt(e)}function xo(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,h)=>{!h||a.has(h.name)||(a.add(h.name),u.push(h.root));};for(let u of e.headerFooterPartsBySection()){for(let h of u.headers.values())r(t,h);for(let h of u.footers.values())r(t,h);}for(let u of ["footnote","endnote"])n.push(...Fo(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,h)=>{let d=e$1(u,e.stylesRoot(),i,bo(u,h)),c=v(u,e.numberingRoot(),e.stylesRoot(),i);for(let y of [...d.direct,...Oo(u),...c,...s$1(u,e.stylesRoot(),i),...d.inherited]){let E=y.toLowerCase();p.has(E)||p.set(E,y);}};return l(o,"body"),l(t,"furniture"),l(n,"note"),[...p.values()]}function Fo(e,o){let t=ch(e.currentPackage(),o);if(!t)return [];let n=new Set(dh(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=zc(r),i=yc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Eo="http://schemas.openxmlformats.org/officeDocument/2006/math";function bo(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===la&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===la&&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)Ro(s.paragraph,t,s.context);}return t}function Ro(e,o,t){let n=Vb(),a=null,r=null,s="",i=false,p=false,l=false,u=0,h=[];for(let d=e.children.length-1;d>=0;d-=1){let c=e.children[d];c.kind!=="textValue"&&h.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;h.length>0;){let{node:d,runId:c,visibility:y,containerDepth:E}=h.pop();if(E>=wa||d.namespaceUri===la&&d.localName==="p")continue;let b=d.namespaceUri===la&&d.localName==="r"?d.id:c;if(d.namespaceUri===la&&d.localName==="fldSimple"){let f=ce(d,"instr")??"";Yc(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&So(d)!==k&&o.add(d.id);}if(d.namespaceUri===la&&d.localName==="fldChar"){let f=ce(d,"fldCharType");if(f==="begin")Yb(n),n.nesting===1&&(a=b,r=null,s="",i=false,p=false,l=Bf(d),u=0);else if(f==="separate"){let g=n.nesting===1;if(_b(n),g){let x=Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow,r=b,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow;}if(!i&&Xc(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 x=r??a;x&&o.add(x);}}$b(n);}continue}if(d.namespaceUri===la&&(d.localName==="instrText"||d.localName==="delInstrText")){Zb(n,It(d),d.localName==="delInstrText");continue}n.nesting>0&&ac(n)&&d.namespaceUri===la&&Lt(d)&&(u|=y);for(let f=d.children.length-1;f>=0;f-=1){let g=d.children[f];g.kind!=="textValue"&&h.push({node:g,runId:b,visibility:y&kt(d),containerDepth:xa(d,E)});}}Wb(n);}function Lt(e){return e.localName==="t"||e.localName==="delText"?It(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,Pt=2,Dt=4,k=ue|Pt|Dt;function So(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===la&&n.localName==="p")){if(n.namespaceUri===la&&Lt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&kt(n)});}}return t}function kt(e){return e.namespaceUri!==la?k:e.localName==="ins"||e.localName==="moveTo"?ue|Pt:e.localName==="del"||e.localName==="moveFrom"?ue|Dt:k}function Oo(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===Eo&&t($c),r.namespaceUri===la&&r.localName==="sym"&&t(c$3(fo(r,"font"))),r.namespaceUri===la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(Wc(s??"")?.font??null);}if(r.namespaceUri===la&&r.localName==="p")for(let s of u(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 It(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 Nt="FILE_TOO_LARGE",_t=8;function vo(e){return typeof e=="object"&&e!==null}function Ct(e){if(!(!vo(e)||typeof e.code!="string"))return e.code}function Ut(e){return e===""||e.toLowerCase()==="localhost"}function wo(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Bt(e){let o=wo(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 qt(e){let o=Bt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Ao(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function To(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(!Ut(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=qt(o.pathname);if(t===null||Ao(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Lo(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 Po(e){let o=Lo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>_t)throw new TypeError(`trustedRoot must not exceed ${_t} directories`);return o.map(To)}function Do(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 ko(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Ut(e.host))return null;let t=Bt(e.pathname);if(t===null)return null;for(let n of o){let a=qt(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 Io(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 _o(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Mt(e,o,t){return e.some(n=>_o(n,o,t))}async function Mo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(Ct(a)==="ENOENT")continue;throw a}return t}function No(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(y=>p.resolve(i(y.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Mt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let h=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",d=await a(u,h),c=()=>{d.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let y=await r(u);if(!Mt(await Mo(l,r),y,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await d.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Nt});let b=new Uint8Array(E),f=0;for(;f<b.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await d.read(b,f,b.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===b.byteLength?b:b.slice(0,f)}catch(y){throw t?.aborted?t.reason:y}finally{t?.removeEventListener("abort",c),await d.close().catch(()=>{});}}}function Co(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=Po(e.trustedRoot),t=Do(e.maxBytes),n=e.read??No(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=Io(r);if(p.protocol!=="file:")return a(p,s);let l=ko(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,h=()=>u?.abort(i?.reason);i?.addEventListener("abort",h,{once:true});let d;try{if(d=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(d.byteLength>t)return new Response(null,{status:413})}catch(c){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let y=Ct(c);if(y===Nt)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw c}finally{i?.removeEventListener("abort",h);}return new Response(d,{status:200})})}
|
|
2
|
-
export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,
|
|
1
|
+
import {c as c$1,x,o,d,f,z as z$1,A as A$1,v,s as s$1,j as j$2,E,m as m$1,u,l as l$1}from'./chunk-RALTVLB6.js';import {l,j as j$1,h,i,n,m,s,p,c as c$2,g as g$1,da,ca,fa}from'./chunk-SRVKFUFI.js';import'./chunk-RIYSCEFQ.js';import {g,h as h$1}from'./chunk-QXJKYNYZ.js';export{g as ExportResourceError,c as createNodeImageDecodePort,b as exportDestinationNamed,h as openDocumentForExport}from'./chunk-QXJKYNYZ.js';import {c,ja,a,xa,pd,qd,ea,ka,h as h$2,d as d$1,ed,b as b$1,i as i$1,ac,gd,dc,fc,cc,fd,gc,ec,hc,bc,r,u as u$1,n as n$1,kd}from'./chunk-DDFHKQFU.js';import {e,c as c$3,b as b$2}from'./chunk-B2BEELUE.js';import'./chunk-L5TYBFDB.js';import'./chunk-ACLR4DMK.js';import {za}from'./chunk-HDOXACHP.js';import {qh,rh,Dc,Cc,b,pa,ud,N as N$1,qf,Aa,Jf,Ba}from'./chunk-GWM3AKUD.js';function N(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},i=e.shape(n);if(t.glyphs.length!==i.glyphs.length||t.glyphs.some((l,c)=>l.id!==i.glyphs[c]?.id))return t;let r=[],s=0;for(let l of o.text){let c=l.toUpperCase()!==l,h=r.at(-1);h&&(h.lower===c||/\p{M}/u.test(l))?h.text+=l:r.push({text:l,start:s,lower:c}),s+=l.length;}let a=[],p=[],d=[],u=true,m=0;for(let l of o.environment.direction==="rtl"?r.reverse():r){let c=l.lower?.8:1,h=[],E=[],R="",f=l.start;for(let F of l.text){let y=l.lower?F.toUpperCase():F;for(let S=0;S<y.length;S++)h.push(f),E.push(f+F.length);R+=y,f+=F.length;}let g=e.shape({...n,text:R}),x=a.length;for(let[F,y]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:d.push(S*c),a.push({...y,cluster:h[y.cluster]??l.start,originX:n$1(m+Math.round(y.originX*c)),originY:n$1(Math.round(y.originY*c)),offsetX:n$1(Math.round(y.offsetX*c)),offsetY:n$1(Math.round(y.offsetY*c)),advanceX:n$1(Math.round(y.advanceX*c)),advanceY:n$1(Math.round(y.advanceY*c)),drawScale:c});}for(let F of g.clusters){let y=h[F.textStart]??l.start,S=E[F.textEnd-1]??f,b=n$1(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===y&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:n$1(T.advance+b),caretEdges:[n$1(0),n$1(T.advance+b)]}:p.push({...F,textStart:y,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:b,caretEdges:F.caretEdges.map(V=>n$1(Math.round(V*c))),fontSpan:0});}m+=g.glyphs.reduce((F,y)=>F+Math.round(y.advanceX*c),0);}return {...t,glyphs:a,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:u&&d.length===a.length?d:void 0}}var ft=new WeakMap;function Gt(e){let o=ft.get(e);return o===void 0&&(o=Yt(e.bytes,e.faceIndex),ft.set(e,o)),o}var Vt=new Set(["COLR","CBDT","sbix"]),Wt=512;function Yt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(mt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let i=Math.min(t.getUint16(n+4),Wt);for(let r=0;r<i;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Vt.has(mt(e,s)))return true}return false}function mt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var $t=/\p{Emoji_Presentation}|️/u;function Kt(e){return $t.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Gt);if(t.length===0||t.length===e.length)return e;let n=e.filter(i=>!t.includes(i));return Kt(o)?[...t,...n]:[...n,...t]}var Zt=2048;function yt(e,o,t,n){if(!t.clusters.length||t.clusters.length>Zt)return null;let i=(f,g)=>{let{context:x,...F}=o,y={...F,text:g,environment:r({...o.environment,font:f})};return N(e,y,e.shape(y))},r$1=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r$1.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),b=s.get(x)??z(n,S).find(T=>{try{return !i(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!b)return null;s.set(x,b),g=b;}let y=r$1.at(-1);y&&y.font===g&&y.end===f.textStart?y.end=f.textEnd:r$1.push({start:f.textStart,end:f.textEnd,font:g});}let a=[],p=[],d=[],u=[],m=true,l=0,c=0,h=0,E=0,R=0;for(let f of o.environment.direction==="rtl"?r$1.reverse():r$1){let g=i(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(y=>y.id===0))return null;let x=a.length,F=d.length;for(let y of g.glyphs)a.push({...y,cluster:f.start+y.cluster,originX:n$1(l+y.originX),originY:n$1(c+y.originY)});if(g.exactAdvancesX===void 0)m=false;else for(let y of g.exactAdvancesX)u.push(y);for(let y of g.clusters)p.push({...y,textStart:f.start+y.textStart,textEnd:f.start+y.textEnd,glyphStart:x+y.glyphStart,glyphEnd:x+y.glyphEnd,fontSpan:F});g.glyphs.length&&d.push({font:f.font,glyphStart:x,glyphEnd:a.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),l+=g.glyphs.reduce((y,S)=>y+S.advanceX,0),c+=g.glyphs.reduce((y,S)=>y+S.advanceY,0),h=Math.max(h,g.metrics.ascent),E=Math.max(E,g.metrics.descent),R=Math.max(R,g.metrics.lineGap);}return u$1({...t,glyphs:a,clusters:p,fontSpans:d,exactAdvancesX:m&&u.length===a.length?u:void 0,metrics:{ascent:n$1(h),descent:n$1(E),lineGap:n$1(R)}},{...o.environment,fallbackOrder:n})}var Jt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Qt=512,ht=new WeakMap;function eo(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",a=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(a=r(12+o*4),a<0))return t}let p=i(a+4);if(p<0||p>1024)return t;let d=-1;for(let c=0;c<p;c+=1){let h=a+12+c*16;if(s(h)==="GSUB"){d=r(h+8);break}}if(d<0)return t;let u=i(d+4);if(u<=0)return t;let m=d+u,l=i(m);if(l<0)return t;for(let c=0;c<Math.min(l,Qt);c+=1){let h=s(m+2+c*6);h&&t.add(h);}return t}function to(e,o){let t=ht.get(e);return t||(t=eo(e.bytes,e.faceIndex),ht.set(e,t)),(Jt.get(o)??[o.toLowerCase()]).some(i=>t.has(i))}function gt(e,o){let t=e.filter(n=>to(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let i=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(i===o.text)return t;try{let r=e.shape({...o,text:i});return u$1({...r,text:o.text},o.environment)}catch{return t}}function xt(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(a=>e.fonts.resolve(a)).filter(a=>!(a instanceof d$1)),n={shape(a){return Q(e.shaper,a,e.shaper.shape(a))}},i=new WeakMap,r$1={shape(a){let p=e.shaper.shape(a),d=i.get(p);if(d&&d.input.text===a.text&&d.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&d.input.bidiLevel===a.bidiLevel&&d.input.context?.before===a.context?.before&&d.input.context?.after===a.context?.after&&d.input.environment===a.environment)return d.run;let u=s(a,Q(e.shaper,a,p));return i.set(p,{input:a,run:u}),u}},s=(a,p)=>{let d=N(n,a,p);if(!d.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(a.text))return d;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let u=yt(n,a,d,t);if(u)return u}for(let u of gt(z(t,a.text),a.environment.script))if(!(u.hash===a.environment.font.hash&&u.faceIndex===a.environment.font.faceIndex))try{let m={...a,environment:r({...a.environment,font:u})},l=N(n,m,n.shape(m));if(!l.glyphs.some(c=>c.id===0))return l}catch{}return d};return {...e,shaper:r$1}}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var oo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var Ft=new WeakMap;function H(e){let o=Ft.get(e);return o||Ft.set(e,o=no(e)),o}function no(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function ro(e){return Object.freeze({...H(e),bytes:i$1(e)})}function io(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$1?null:ro(t)}catch{return null}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return io(e.resolve(),o)}}function ao(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,i=[],r=new Set){let s=new Map;for(let p of [...e,o]){let d=p.toLowerCase();s.has(d)||s.set(d,p);}let a=[...s.values()].map(p=>{let d=[];for(let m of oo){let l=n?.({family:p,...m});!l||l instanceof d$1||d.push(Object.freeze({...m,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}let u=r.has(p.trim().toLowerCase())?d.filter(m=>m.via==="direct").length:d.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(d)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(a),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ao(i)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=d=>d.trim().toLowerCase(),i=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(d=>n(d.family))),s=d=>{if(!(d instanceof l$1))return true;let u=n(d.request.family);return i.has(u)||!r.has(u)},a=e.originFailures.some(({cause:d})=>d instanceof m$1?d.causes.length===0||d.causes.some(s):s(d));if(o.fontPolicy!=="strict"||!a&&e.families.every(d=>d.coverage==="complete"))return;let p=e.families.filter(d=>d.coverage!=="complete").map(d=>d.family).join(", ");throw new g("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let i={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$2(i),s=o.get(r);if(!s){try{s=e.fonts.resolve(i);}catch{return null}o.set(r,s);}return s instanceof d$1?null:s}function bt(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function so(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let i=xa(n.style,n.fontSlot),r=pd(n)?qd(n):ea(n.text,i);if(r.length===0)return null;let s=i.fontFamily??e.defaultFont.family,a=G(e,o,s,i)??(b(s)&&so(r)?G(e,o,e.defaultFont.family,i):null);if(!a)return null;try{if(i.smallCaps&&!da(e.shaper,e.environment,a,i,t))return null;let p=ca(e.shaper,e.environment,a,i,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??a),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(d=>H(d.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var M=new Map,St=new WeakMap,se=0,C;var le=32,Ot=c;function vt(){if(C)return C;let e=(async()=>(await c$2(),g$1({...h,maxFontBytes:a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function wt(e){let o=X();return fa(e,{resolveFont(t){return bt(e,o,t)},fallback:ka()})}async function At(e,o,t=[],n=false,i){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j$1(i,h),s$1=await vt(),a=xt(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>wt(a),resolveFont:p=>a.fonts.resolve(p),shapeLaidOutText:ae(a),producer:["node-export-session",JSON.stringify(t),e.fingerprint,a.operation.shapingHash,`producer:${a.operation.producerVersion}`,`fallback:${ja}`].join("|"),extensionFingerprint:e.fingerprint})}function lo(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j$1(t,h),i$1=i(n$1),r=St.get(e),s$1=r?.get(i$1);if(s$1)return s$1;let a=`${n(e)}|${i$1}`,p=M.get(a);if(!p){if(M.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let l=m(e).sources.reduce((h,E)=>h+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+l>Ot)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Ot} process-wide`);se+=l;let c;try{let h=await vt();c=await s(e,h,n$1,o);}catch(h){throw se-=l,h}return Object.freeze({createMeasurer:()=>wt(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),M.set(a,p),p.catch(()=>{M.get(a)===p&&M.delete(a);});}let d=e.fingerprint,u=p.then(m=>Object.freeze({createMeasurer:m.createMeasurer,shapeLaidOutText:m.shapeLaidOutText,producer:["node-export",d,m.shapingHash,`producer:${m.producerVersion}`,`fallback:${ja}`].join("|"),extensionFingerprint:d}));return r||St.set(e,r=new Map),r.set(i$1,u),u.catch(()=>{r?.get(i$1)===u&&r.delete(i$1);}),u}var co="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function uo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(i=>i.type===co),n;if(t){let i=N$1(t);i.mode==="Internal"&&i.target.ok&&(n=o.parts.get(i.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),qf(o,n)}function Tt(e,o){let t=uo(e);if(t.length!==0)return j$2(n=>{let i=new Set((n.resolvedFaces??[]).map(s=>h$2(s))),r=E(t,{maxFontBytes:a,aggregateBudget:po(n),shadowedRequests:i});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function po(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function fo(e){return te(e)&&ie(e)}var A=0,Lt=Symbol("font-resolution-timeout");function mo(e){let o=0,t=false;return e?.(A),{reserve:i=>{if(t)throw new Error("Document font-byte lease is already released");if(A+i>c)throw new g("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${i} bytes with ${A} bytes already active`);A+=i,o+=i,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=i,o-=i,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function yo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===pa||t.namespaceUri===""))?.value}async function ho(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=za(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:i,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:d,fontShaping:u,...m}=o,l=Array.isArray(n)?n:[n],c=i===void 0?[]:Array.isArray(i)?i:[i],h,E;try{E=await go(t.view,l,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:d,fontShaping:u,lastResortFonts:c,onFontResolution:b=>(h=b,a?.(b))});}catch(b){if(b instanceof g&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!h)throw E?.dispose(),new g("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=h$1(t.view,{...m,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(b){throw E?.dispose(),b}if(!R.ok)return E?.dispose(),R;let f=R.session,g$1=E,x="active",F=()=>x==="aborted"?new g("aborted","Export resource settlement was aborted"):new g("disposed","Export session has been disposed"),y=b=>{if(x==="active"){x=b,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g$1?.dispose(),g$1=void 0;}}},S=()=>y("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:h,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:b=>x==="active"?f.layoutFor(b):Promise.reject(F()),validatedImageBytes:b=>x==="active"?f.validatedImageBytes(b):null,admittedFontFace:Et({status:()=>x,unavailable:F,resolve:()=>g$1?.resolveFont}),shapeLaidOutText:Rt({status:()=>x,unavailable:F,shaping:()=>g$1}),dispose:()=>y("disposed")})}}async function go(e,o$1,t={}){let n=j$1(t.fontShaping,h);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let i=xo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let a=setTimeout(()=>r.abort(Lt),i);try{de(r.signal);let p$1=(async()=>{let d$1=mo(t.onActiveFontBytesChange),u=!1;try{let m=Eo(e).slice(0,c$1),l=x(e,m),c=[],h={dropped:[]},E=Tt(e,h),R=[...o$1,...E?[E]:[],...t.lastResortFonts??[]],f$1=await o(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(b=>b.family),...l.families])].slice(0,c$1),defaultFamily:d.family,signal:r.signal},{onOriginFailure:b=>c.push(b),reserveOwnedBytes:d$1.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=f(f$1??{}),x$1=z$1(g,l),F=A$1(g,x$1,l);if(x$1.sources.length===0){let b=oe(m,x$1.defaultFont.family,c,void 0,h.dropped);ne(b,t),re(b,t,t.glyphFallbacks);return}let y=await At(p(x$1),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let S=oe(m,x$1.defaultFont.family,c,y.resolveFont,h.dropped,F);return ne(S,t),re(S,t,t.glyphFallbacks),u=!0,Object.freeze({...y,dispose:d$1.release})}finally{u||d$1.release();}})();return await Promise.race([p$1,Fo(r.signal)])}finally{clearTimeout(a),t.signal?.removeEventListener("abort",s);}}function xo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function Fo(e){return new Promise((o,t)=>{let n=()=>{t(Pt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Pt(e){let o=e.reason===Lt;return new g(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Pt(e)}function Eo(e$1){let o=[e$1.part().root],t=[],n=[],i=new Set([e$1.part().name]),r=(u,m)=>{!m||i.has(m.name)||(i.add(m.name),u.push(m.root));};for(let u of e$1.headerFooterPartsBySection()){for(let m of u.headers.values())r(t,m);for(let m of u.footers.values())r(t,m);}for(let u of ["footnote","endnote"])n.push(...bo(e$1,u));let s=e$1.documentThemeFonts(),a={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,d=(u,m)=>{let l=e(u,e$1.stylesRoot(),a,So(u,m)),c=v(u,e$1.numberingRoot(),e$1.stylesRoot(),a);for(let h of [...l.direct,...wo(u),...c,...s$1(u,e$1.stylesRoot(),a),...l.inherited]){let E=h.toLowerCase();p.has(E)||p.set(E,h);}};return d(o,"body"),d(t,"furniture"),d(n,"note"),[...p.values()]}function bo(e,o){let t=qh(e.currentPackage(),o);if(!t)return [];let n=new Set(rh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),i=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=Dc(r),a=Cc(r);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&i.push(r);}return i}var Ro="http://schemas.openxmlformats.org/officeDocument/2006/math";function So(e,o){let t=new Set;for(let n of e){let i=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:a}=r.pop();s.namespaceUri===pa&&s.localName==="p"&&i.push({paragraph:s,context:a});let p=s.namespaceUri===pa&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let d=s.children.length-1;d>=0;d-=1){let u=s.children[d];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of i)Oo(s.paragraph,t,s.context);}return t}function Oo(e,o,t){let n=ac(),i=null,r=null,s="",a=false,p=false,d=false,u=0,m=[];for(let l=e.children.length-1;l>=0;l-=1){let c=e.children[l];c.kind!=="textValue"&&m.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;m.length>0;){let{node:l,runId:c,visibility:h,containerDepth:E}=m.pop();if(E>=Aa||l.namespaceUri===pa&&l.localName==="p")continue;let R=l.namespaceUri===pa&&l.localName==="r"?l.id:c;if(l.namespaceUri===pa&&l.localName==="fldSimple"){let f=ce(l,"instr")??"";gd(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&vo(l)!==k&&o.add(l.id);}if(l.namespaceUri===pa&&l.localName==="fldChar"){let f=ce(l,"fldCharType");if(f==="begin")dc(n),n.nesting===1&&(i=R,r=null,s="",a=false,p=false,d=Jf(l),u=0);else if(f==="separate"){let g=n.nesting===1;if(fc(n),g){let x=cc(n);s=x.instruction,a=x.overflow||n.nestingOverflow,r=R,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=cc(n);s=x.instruction,a=x.overflow||n.nestingOverflow;}if(!a&&fd(s,{hasSeparate:p,hasLegacyFormData:d,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??i;x&&o.add(x);}}gc(n);}continue}if(l.namespaceUri===pa&&(l.localName==="instrText"||l.localName==="delInstrText")){ec(n,Nt(l),l.localName==="delInstrText");continue}n.nesting>0&&hc(n)&&l.namespaceUri===pa&&Dt(l)&&(u|=h);for(let f=l.children.length-1;f>=0;f-=1){let g=l.children[f];g.kind!=="textValue"&&m.push({node:g,runId:R,visibility:h&_t(l),containerDepth:Ba(l,E)});}}bc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Nt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,kt=2,It=4,k=ue|kt|It;function vo(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:i}=o.pop();if(!(n.namespaceUri===pa&&n.localName==="p")){if(n.namespaceUri===pa&&Dt(n)&&(t|=i,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:i&_t(n)});}}return t}function _t(e){return e.namespaceUri!==pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|kt:e.localName==="del"||e.localName==="moveFrom"?ue|It:k}function wo(e){let o=new Map,t=n=>{let i=b$2(n??void 0);if(i===null)return;let r=i.toLowerCase();o.has(r)||o.set(r,i);};for(let n of e){let i=[n];for(;i.length>0;){let r=i.pop();if(r.namespaceUri===Ro&&t(kd),r.namespaceUri===pa&&r.localName==="sym"&&t(c$3(yo(r,"font"))),r.localName==="textpath"&&t(ud(r)),r.namespaceUri===pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(ed(s??"")?.font??null);}if(r.namespaceUri===pa&&r.localName==="p")for(let s of u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let a=r.children[s];a.kind!=="textValue"&&i.push(a);}}}return [...o.values()]}function Nt(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let i=n.children.length-1;i>=0;i-=1)t.push(n.children[i]);}return o}var Ut="FILE_TOO_LARGE",Mt=8;function Ao(e){return typeof e=="object"&&e!==null}function Bt(e){if(!(!Ao(e)||typeof e.code!="string"))return e.code}function qt(e){return e===""||e.toLowerCase()==="localhost"}function To(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function zt(e){let o=To(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function jt(e){let o=zt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Lo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Po(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!qt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=jt(o.pathname);if(t===null||Lo(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Do(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function ko(e){let o=Do(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Mt)throw new TypeError(`trustedRoot must not exceed ${Mt} directories`);return o.map(Po)}function Io(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function _o(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!qt(e.host))return null;let t=zt(e.pathname);if(t===null)return null;for(let n of o){let i=jt(n.pathname);if(i===null||!t.startsWith(i)||t.length<=i.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function No(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Mo(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Ct(e,o,t){return e.some(n=>Mo(n,o,t))}async function Co(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(i){if(Bt(i)==="ENOENT")continue;throw i}return t}function Uo(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:i,realpath:r},{constants:s},{fileURLToPath:a},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),d=e.map(h=>p.resolve(a(h.href))),u=p.resolve(a(typeof o=="string"?o:o.href));if(!Ct(d,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let m=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",l=await i(u,m),c=()=>{l.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let h=await r(u);if(!Ct(await Co(d,r),h,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await l.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Ut});let R=new Uint8Array(E),f=0;for(;f<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await l.read(R,f,R.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===R.byteLength?R:R.slice(0,f)}catch(h){throw t?.aborted?t.reason:h}finally{t?.removeEventListener("abort",c),await l.close().catch(()=>{});}}}function Bo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=ko(e.trustedRoot),t=Io(e.maxBytes),n=e.read??Uo(o),i=e.networkFetch??fetch;return(async(r,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let p=No(r);if(p.protocol!=="file:")return i(p,s);let d=_o(p,o);if(!d)return new Response(null,{status:404});let u=a?new AbortController:void 0,m=()=>u?.abort(a?.reason);a?.addEventListener("abort",m,{once:true});let l;try{if(l=await n(d,{maxBytes:t,...u?{signal:u.signal}:{}}),a?.aborted)throw a.reason;if(l.byteLength>t)return new Response(null,{status:413})}catch(c){if(a?.aborted)throw a.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let h=Bt(c);if(h===Ut)return new Response(null,{status:413});if(h==="ENOENT"||h==="ENOTDIR"||h==="ELOOP")return new Response(null,{status:404});throw c}finally{a?.removeEventListener("abort",m);}return new Response(l,{status:200})})}
|
|
2
|
+
export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,lo as acquireSharedExportShaping,Bo as createPackagedFileFetch,te as hasExportAdmittedFont,ie as hasExportLaidOutText,fo as hasFontBackedExportCapabilities,ho as openFontBackedDocumentForExport};
|
|
@@ -112,4 +112,4 @@ interface CollaborationStatusTracker {
|
|
|
112
112
|
declare function createCollaborationStatusTracker(initial?: CollaborationStatus): CollaborationStatusTracker;
|
|
113
113
|
|
|
114
114
|
export { createCollaborationStatusTracker as d, isCollaborationFailureCode as i };
|
|
115
|
-
export type {
|
|
115
|
+
export type { CollaborationFailureCode as C, CollaborationStatus as a, CollaborationStatusSnapshot as b, CollaborationFailure as c };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as FontFaceRequest, F as FontConfiguration, b as FontSource, c as FontSourceSubstitution } from './editor-fonts-D_-vjuJi.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A partial font configuration one origin contributes: sources, substitutions, or both.
|
|
@@ -1,5 +1,116 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { aC as OoxmlNodeId, ax as OoxmlGenericElementNode, a4 as OoxmlNode, a5 as OoxmlPackage, O as OoxmlPart, av as OoxmlElement, aB as OoxmlPackageRejection } from './tree-op-types-C_S2niXW.js';
|
|
2
|
+
import { H as HeaderFooterParts, b as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-CRHvMyNj.js';
|
|
3
|
+
|
|
4
|
+
/** Office Math Markup Language namespace. */
|
|
5
|
+
declare const OFFICE_MATH_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/math";
|
|
6
|
+
declare const DEFAULT_OMML_LIMITS: Readonly<{
|
|
7
|
+
maxDepth: 24;
|
|
8
|
+
maxNodes: 256;
|
|
9
|
+
maxTextLength: 512;
|
|
10
|
+
}>;
|
|
11
|
+
/** Shared work limits for untrusted OMML and linear-math input. */
|
|
12
|
+
interface OmmlLimits {
|
|
13
|
+
readonly maxDepth?: number;
|
|
14
|
+
readonly maxNodes?: number;
|
|
15
|
+
readonly maxTextLength?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Marks a structure whose property element carries `m:ctrlPr` operator run formatting that
|
|
19
|
+
* compact replacement cannot reproduce.
|
|
20
|
+
*
|
|
21
|
+
* The source keeps those properties verbatim. Layout draws the operator glyphs with the
|
|
22
|
+
* default math formatting. When every `m:ctrlPr` of the equation holds only default
|
|
23
|
+
* formatting, no structure carries this mark: compact replacement writes the same control
|
|
24
|
+
* properties back on each structure it emits.
|
|
25
|
+
*/
|
|
26
|
+
interface EquationControlSource {
|
|
27
|
+
/** The structure carries non-default `m:ctrlPr` properties, so compact replacement refuses it. */
|
|
28
|
+
readonly controlProperties?: true;
|
|
29
|
+
}
|
|
30
|
+
type EquationExpression = {
|
|
31
|
+
readonly kind: 'row';
|
|
32
|
+
readonly items: readonly EquationExpression[];
|
|
33
|
+
} | {
|
|
34
|
+
readonly kind: 'text';
|
|
35
|
+
readonly value: string;
|
|
36
|
+
readonly format?: {
|
|
37
|
+
readonly fontFamily?: string;
|
|
38
|
+
readonly bold?: boolean;
|
|
39
|
+
readonly italic?: boolean;
|
|
40
|
+
readonly literal?: boolean;
|
|
41
|
+
readonly normalText?: boolean;
|
|
42
|
+
readonly mathStyle?: 'p' | 'b' | 'i' | 'bi';
|
|
43
|
+
};
|
|
44
|
+
} | ({
|
|
45
|
+
readonly kind: 'bar';
|
|
46
|
+
readonly body: EquationExpression;
|
|
47
|
+
readonly position: 'top' | 'bottom';
|
|
48
|
+
} & EquationControlSource) | ({
|
|
49
|
+
readonly kind: 'fraction';
|
|
50
|
+
readonly numerator: EquationExpression;
|
|
51
|
+
readonly denominator: EquationExpression;
|
|
52
|
+
} & EquationControlSource) | ({
|
|
53
|
+
readonly kind: 'radical';
|
|
54
|
+
readonly radicand: EquationExpression;
|
|
55
|
+
readonly degree?: EquationExpression;
|
|
56
|
+
} & EquationControlSource) | ({
|
|
57
|
+
readonly kind: 'script';
|
|
58
|
+
readonly base: EquationExpression;
|
|
59
|
+
readonly subscript?: EquationExpression;
|
|
60
|
+
readonly superscript?: EquationExpression;
|
|
61
|
+
} & EquationControlSource) | ({
|
|
62
|
+
readonly kind: 'nary';
|
|
63
|
+
readonly operator: string;
|
|
64
|
+
readonly body: EquationExpression;
|
|
65
|
+
readonly lowerLimit?: EquationExpression;
|
|
66
|
+
readonly upperLimit?: EquationExpression;
|
|
67
|
+
} & EquationControlSource) | {
|
|
68
|
+
readonly kind: 'fallback';
|
|
69
|
+
readonly text: string;
|
|
70
|
+
};
|
|
71
|
+
interface OmmlEquationProjection {
|
|
72
|
+
readonly sourceNodeId: OoxmlNodeId;
|
|
73
|
+
readonly expression: EquationExpression;
|
|
74
|
+
readonly fallbackText: string;
|
|
75
|
+
readonly truncated: boolean;
|
|
76
|
+
readonly visitedNodes: number;
|
|
77
|
+
/**
|
|
78
|
+
* The font size, in points, that every run of the equation shares through default run
|
|
79
|
+
* properties (`w:sz`). Absent, the equation takes the size of the surrounding text.
|
|
80
|
+
*/
|
|
81
|
+
readonly fontSizePt?: number;
|
|
82
|
+
}
|
|
83
|
+
type LinearMathRejection = 'empty' | 'invalid-syntax' | 'invalid-xml-text' | 'depth-limit' | 'node-limit' | 'text-limit';
|
|
84
|
+
type LinearMathParseResult = {
|
|
85
|
+
readonly ok: true;
|
|
86
|
+
readonly expression: EquationExpression;
|
|
87
|
+
} | {
|
|
88
|
+
readonly ok: false;
|
|
89
|
+
readonly reason: LinearMathRejection;
|
|
90
|
+
};
|
|
91
|
+
type LinearMathOmmlResult = {
|
|
92
|
+
readonly ok: true;
|
|
93
|
+
readonly expression: EquationExpression;
|
|
94
|
+
readonly equation: OoxmlGenericElementNode;
|
|
95
|
+
} | {
|
|
96
|
+
readonly ok: false;
|
|
97
|
+
readonly reason: LinearMathRejection;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Project one preserved `m:oMath` generic node without changing its canonical source.
|
|
101
|
+
*/
|
|
102
|
+
declare function projectOmmlEquation(node: OoxmlNode, limits?: OmmlLimits): OmmlEquationProjection | null;
|
|
103
|
+
/** Parse the supported compact linear-math subset with fixed work limits. */
|
|
104
|
+
declare function parseLinearMath(input: string, limits?: OmmlLimits): LinearMathParseResult;
|
|
105
|
+
/**
|
|
106
|
+
* Convert a projected expression into reversible compact syntax.
|
|
107
|
+
*
|
|
108
|
+
* Returns an empty string when parsing the result would change the projected meaning.
|
|
109
|
+
*/
|
|
110
|
+
declare function equationExpressionToLinearMath(expression: EquationExpression): string;
|
|
111
|
+
type NextNodeId = () => string;
|
|
112
|
+
/** Parse compact linear math and generate fresh canonical OMML in one bounded operation. */
|
|
113
|
+
declare function linearMathToOmml(input: string, nextId: NextNodeId, limits?: OmmlLimits): LinearMathOmmlResult;
|
|
3
114
|
|
|
4
115
|
/** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
|
|
5
116
|
interface EnsuredHyperlinkRelationship {
|
|
@@ -139,5 +250,5 @@ declare function openHeadlessDocument(bytes: Uint8Array): OpenHeadlessDocumentRe
|
|
|
139
250
|
/** Internal live read view over the canonical store, preserving node identities for field pagination. */
|
|
140
251
|
declare function headlessViewOfStore(store: TreePackageStore): HeadlessDocumentView;
|
|
141
252
|
|
|
142
|
-
export { authorableHyperlinkTarget as
|
|
143
|
-
export type { DocumentProperties as D, EnsuredHyperlinkRelationship as E, HeadlessDocumentView as H,
|
|
253
|
+
export { DEFAULT_OMML_LIMITS as b, OFFICE_MATH_NAMESPACE_URI as h, authorableHyperlinkTarget as k, ensureHyperlinkRelationship as l, equationExpressionToLinearMath as m, headlessViewOfStore as n, linearMathToOmml as o, openHeadlessDocument as p, parseLinearMath as q, projectOmmlEquation as r, relationshipTargetIn as s };
|
|
254
|
+
export type { DocumentProperties as D, EnsuredHyperlinkRelationship as E, HeadlessDocumentView as H, LinearMathOmmlResult as L, OmmlEquationProjection as O, HeadlessDocumentRejection as a, EquationControlSource as c, EquationExpression as d, HeadlessThemeFonts as e, LinearMathParseResult as f, LinearMathRejection as g, OmmlLimits as i, OpenHeadlessDocumentResult as j };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkMNF2K7NN_cjs=require('./chunk-MNF2K7NN.cjs');require('./chunk-V3N4SOAK.cjs'),require('./chunk-ZGTIE3QJ.cjs');var chunkE4IAO4CY_cjs=require('./chunk-E4IAO4CY.cjs');require('./chunk-6NVZNB7O.cjs');var chunk3IEXDEFH_cjs=require('./chunk-3IEXDEFH.cjs');require('./chunk-TELQ52LG.cjs'),require('./chunk-FDSL5OJU.cjs'),require('./chunk-25EXMBV2.cjs'),require('./chunk-XJYZVGQR.cjs'),require('./chunk-6UDJUI3W.cjs'),require('./chunk-OKMEMSKB.cjs'),require('./chunk-TJHE5EET.cjs'),require('./chunk-65XBN67F.cjs'),require('./chunk-2CWQY27B.cjs'),require('./chunk-O324RB6R.cjs'),require('./chunk-ZOZI27AW.cjs'),require('./chunk-UKVVUHZL.cjs');var O=1;var P={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize: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,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc: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 T(){return Object.keys(P)}Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.kb}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.ob}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Sc}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Uc}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Fc}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.g}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.pb}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Ea}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Ga}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs._b}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.B}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.C}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Nb}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Vc}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.A}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Tc}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Wc}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Ma}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkMNF2K7NN_cjs.Ia}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.i}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.h}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.n}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.j}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkE4IAO4CY_cjs.k}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.z}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.s}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.r}});exports.DIAGNOSTIC_SCHEMA_VERSION=O;exports.diagnosticCommands=T;
|