@docx-editor.dev/core 2.29.0 → 2.31.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/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +22 -26
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +47 -40
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-CAs51cpq.d.ts → chrome-print-BWvaVEhD.d.ts} +577 -243
- package/dist/chunk-243W4WW2.cjs +2 -0
- package/dist/{chunk-G4HOFIKJ.js → chunk-2E2RPEKX.js} +1 -1
- package/dist/chunk-4S24UOPG.js +30 -0
- package/dist/chunk-5JPIEN54.cjs +3 -0
- package/dist/{chunk-7WQ7AAHW.cjs → chunk-5SO5QDMV.cjs} +1 -1
- package/dist/{chunk-UHHYFIDT.cjs → chunk-6IDOVU6L.cjs} +1 -1
- package/dist/chunk-DBOOTED4.cjs +30 -0
- package/dist/chunk-EOTAXOJY.cjs +5 -0
- package/dist/chunk-FDAKJ2SJ.cjs +30 -0
- package/dist/chunk-FNNOJNGY.js +3 -0
- package/dist/chunk-FT33HRZP.js +5 -0
- package/dist/{chunk-W35WTWAO.cjs → chunk-HC6YNKUI.cjs} +1 -1
- package/dist/chunk-HZ66UCIS.js +2 -0
- package/dist/{chunk-MM5QBMTE.cjs → chunk-IBRBNT37.cjs} +1 -1
- package/dist/chunk-IVIN7X43.js +30 -0
- package/dist/chunk-LZY6B6IV.js +4 -0
- package/dist/chunk-MOYYRVFV.cjs +2 -0
- package/dist/{chunk-OMCG63ZF.js → chunk-N6B3BXCL.js} +1 -1
- package/dist/chunk-Q5K2GGNG.js +2 -0
- package/dist/chunk-R2XINWVE.js +7 -0
- package/dist/chunk-SUEXVBPR.js +1 -0
- package/dist/chunk-T2QQHG5C.js +18 -0
- package/dist/{chunk-LSZ6KPKK.js → chunk-VWIJKH4A.js} +1 -1
- package/dist/chunk-WO4V6PNS.cjs +18 -0
- package/dist/chunk-XMJKFURD.cjs +4 -0
- package/dist/{chunk-BY2ACZZ6.cjs → chunk-XSTGE3NI.cjs} +1 -1
- package/dist/chunk-YQWMI6J5.cjs +7 -0
- package/dist/{chunk-RCLZXP3B.js → chunk-ZCJS7D7S.js} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -4
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +12 -13
- package/dist/contracts/types.d.ts +2 -2
- package/dist/{custom-node-writes-Bn6uciLb.d.ts → custom-node-writes-TeUvMP13.d.ts} +2 -2
- package/dist/{diagnostic-context-B8M79cfK.d.ts → diagnostic-context-DJ0P1uZE.d.ts} +3 -2
- package/dist/{diagnostic-hints-BeVjfNOv.d.ts → diagnostic-hints-C9JlLz1L.d.ts} +12 -5
- package/dist/{document-protection-CUb55pl_.d.ts → document-protection-C8x3P2J6.d.ts} +1 -1
- package/dist/{editor-CZQZmTIU.d.ts → editor-B2ShlO23.d.ts} +368 -52
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-C7ke1KJG.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +5 -3
- package/dist/editor.d.ts +606 -34
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +17 -15
- package/dist/export.js +2 -2
- package/dist/{font-resolver-lSBLirLR.d.ts → font-resolver-CWh40DYp.d.ts} +1 -1
- package/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
- package/dist/{headless-document-view-pp3q7wIh.d.ts → headless-document-view-qOpaCF82.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-BD-dF_rn.d.ts → layout-shaping-CWS3j0Xr.d.ts} +3 -2
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +112 -44
- package/dist/layout.js +1 -1
- package/dist/{note-properties-qQUjO1GQ.d.ts → note-properties-QsKh24sM.d.ts} +1 -1
- package/dist/{omml-equation-BUbU0utM.d.ts → omml-equation-BsLAa2lX.d.ts} +38 -8
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +20 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-DYzzz2ej.d.ts → protocol-COZJUKUY.d.ts} +94 -2
- package/dist/{review-paragraph-order-CN_0l2Cb.d.ts → review-paragraph-order-C_QbCKcH.d.ts} +1 -1
- package/dist/{semantic-cell-selection-eYag3P47.d.ts → semantic-cell-selection-Cub9FDa8.d.ts} +2 -2
- package/dist/{semantic-interaction-kR_QB845.d.ts → semantic-interaction-dApRIYpt.d.ts} +1 -1
- package/dist/{semantic-paint-ZayFF3tD.d.ts → semantic-paint-DLzA8sjP.d.ts} +3 -3
- package/dist/{semantic-record-queries-Bsgth6lv.d.ts → semantic-record-queries-3yp9o11g.d.ts} +1 -1
- package/dist/{semantic-records-DQmumPgL.d.ts → semantic-records-B-akgRch.d.ts} +207 -139
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +49 -136
- package/dist/store.js +1 -1
- package/dist/{tree-package-store-CovjNARF.d.ts → tree-package-store-B8l8DX3Z.d.ts} +612 -428
- package/dist/{tree-session-contract-CZVAGl51.d.ts → tree-session-contract-DeLRqohz.d.ts} +28 -13
- package/dist/{types-barrel-DuC5QBNC.d.ts → types-barrel-CkF2JbU4.d.ts} +1146 -745
- package/package.json +2 -2
- package/dist/chunk-236O4YQW.js +0 -2
- package/dist/chunk-6JPL6ZAS.cjs +0 -5
- package/dist/chunk-6ZQP4HQ7.js +0 -3
- package/dist/chunk-BCXH4BXB.js +0 -5
- package/dist/chunk-CAJEXXVG.cjs +0 -4
- package/dist/chunk-CPWLFPWC.js +0 -30
- package/dist/chunk-D7ZMDMPX.cjs +0 -3
- package/dist/chunk-DOHF6FA7.cjs +0 -30
- package/dist/chunk-DVX32P2P.js +0 -27
- package/dist/chunk-E4LOMDNL.js +0 -1
- package/dist/chunk-EKLM7NWB.cjs +0 -7
- package/dist/chunk-G3K63G7P.cjs +0 -27
- package/dist/chunk-JLVBDYVQ.cjs +0 -2
- package/dist/chunk-LQX36Z5P.js +0 -7
- package/dist/chunk-OSFOJTHU.cjs +0 -18
- package/dist/chunk-T6K2QYNZ.cjs +0 -2
- package/dist/chunk-TRGAVV2Y.js +0 -4
- package/dist/chunk-U4JZVSOE.js +0 -2
- package/dist/chunk-YQ5G6LC7.js +0 -18
- package/dist/image-resources-tXLQShoC.d.ts +0 -211
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,Pc as ChromeExportError,Rc as ChromePrintError,c as DEFAULT_REVIEW_PANE,ra as DEFAULT_TABLE_CHROME_DRAFT,W as DEFAULT_WATERMARK_FONT,Gc as DocumentRefreshError,da as EMU_PER_POINT,Wb as FIT_WIDTH_ZOOM_MODE,Ic as HIGHLIGHT_REFRESH_MS,ma as IMAGE_OVERLAY_NUDGE_PT,na as IMAGE_OVERLAY_NUDGE_SHIFT_PT,Dc 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,Kc as SEARCH_DEBOUNCE_MS,Nc as SEARCH_HIGHLIGHT_PRIORITY,Mc as SEARCH_HIGHLIGHT_SET,Lc as SEARCH_MATCH_LIMIT,K as SNAP_TWIPS_CM,J as SNAP_TWIPS_INCH,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,Cc as bindHistoryGroup,g as blankDocumentBytes,Zc as bookmarkDialogInitialName,_c as bookmarkDialogNameState,Uc 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,Hc as createDocumentRefresh,Oc 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,Yc as goToBookmarkGroups,Xc as goToBookmarkMatch,Vc as goToBookmarkRows,Wc as goToBookmarkTarget,L as handlePosition,dc as hasOpenNestedPopup,Kb as historyShortcutOf,l as hostDocumentOf,u as hostTimers,m as hostWindowOf,qc as inchesToTwips,Sc 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,Fc as lineSpacingMenuRowLabel,Ec 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,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,Qc as runChromeExport,Tc 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,Jc as watchHighlights,X as watermarkShapeBox,Ac as withTabStop}from'./chunk-IVIN7X43.js';export{a as resolveEditorModules}from'./chunk-4HENIAFG.js';import'./chunk-LZY6B6IV.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-HZ66UCIS.js';export{t as disposeLayoutShaping}from'./chunk-FNNOJNGY.js';import'./chunk-RIYSCEFQ.js';import'./chunk-R2XINWVE.js';import'./chunk-SUEXVBPR.js';export{Wa as DEFAULT_REVISION_MARKUP,Va as REVISION_MARKUP_COLORS,Xa as resolveRevisionMarkup}from'./chunk-4S24UOPG.js';import'./chunk-FT33HRZP.js';import'./chunk-2E2RPEKX.js';import'./chunk-ZCJS7D7S.js';import'./chunk-VWIJKH4A.js';import'./chunk-Q5K2GGNG.js';import'./chunk-6JIJOZDW.js';import'./chunk-N6B3BXCL.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,dl as DRAWING_REL_FROM_H,el as DRAWING_REL_FROM_V,Gd as IMAGE_WRAP_TARGETS,_i as TEXT_FORM_FORMATS,gl as positionInputFromPropertiesCommand,fl as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,je as resolveSvgIntrinsicSize,fe as sniffImageMime,cl as validateDrawingPositionInput,ke as validateRasterHeader,hl as validateSetImagePositionCommand}from'./chunk-T2QQHG5C.js';import'./chunk-S6J4O5XP.js';
|
package/dist/export.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkJLVBDYVQ_cjs=require('./chunk-JLVBDYVQ.cjs'),chunkD7ZMDMPX_cjs=require('./chunk-D7ZMDMPX.cjs'),chunkW35WTWAO_cjs=require('./chunk-W35WTWAO.cjs'),chunkDOHF6FA7_cjs=require('./chunk-DOHF6FA7.cjs'),chunkBY2ACZZ6_cjs=require('./chunk-BY2ACZZ6.cjs');require('./chunk-MM5QBMTE.cjs');var chunkT6K2QYNZ_cjs=require('./chunk-T6K2QYNZ.cjs'),chunkOSFOJTHU_cjs=require('./chunk-OSFOJTHU.cjs');function _(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},r=e.shape(n);if(t.glyphs.length!==r.glyphs.length||t.glyphs.some((u,c)=>u.id!==r.glyphs[c]?.id))return t;let i=[],s=0;for(let u of o.text){let c=u.toUpperCase()!==u,y=i.at(-1);y&&(y.lower===c||/\p{M}/u.test(u))?y.text+=u:i.push({text:u,start:s,lower:c}),s+=u.length;}let a=[],p=[],l=[],d=true,g=0;for(let u of o.environment.direction==="rtl"?i.reverse():i){let c=u.lower?.8:1,y=[],b=[],R="",f=u.start;for(let x of u.text){let m=u.lower?x.toUpperCase():x;for(let E=0;E<m.length;E++)y.push(f),b.push(f+x.length);R+=m,f+=x.length;}let h=e.shape({...n,text:R}),F=a.length;for(let[x,m]of h.glyphs.entries()){let E=h.exactAdvancesX?.[x];E===void 0?d=false:l.push(E*c),a.push({...m,cluster:y[m.cluster]??u.start,originX:chunkDOHF6FA7_cjs.n(g+Math.round(m.originX*c)),originY:chunkDOHF6FA7_cjs.n(Math.round(m.originY*c)),offsetX:chunkDOHF6FA7_cjs.n(Math.round(m.offsetX*c)),offsetY:chunkDOHF6FA7_cjs.n(Math.round(m.offsetY*c)),advanceX:chunkDOHF6FA7_cjs.n(Math.round(m.advanceX*c)),advanceY:chunkDOHF6FA7_cjs.n(Math.round(m.advanceY*c)),drawScale:c});}for(let x of h.clusters){let m=y[x.textStart]??u.start,E=b[x.textEnd-1]??f,L=chunkDOHF6FA7_cjs.n(Math.round(x.advance*c)),A=p.at(-1);A&&A.textStart===m&&A.textEnd===E?p[p.length-1]={...A,glyphEnd:F+x.glyphEnd,advance:chunkDOHF6FA7_cjs.n(A.advance+L),caretEdges:[chunkDOHF6FA7_cjs.n(0),chunkDOHF6FA7_cjs.n(A.advance+L)]}:p.push({...x,textStart:m,textEnd:E,glyphStart:F+x.glyphStart,glyphEnd:F+x.glyphEnd,advance:L,caretEdges:x.caretEdges.map(V=>chunkDOHF6FA7_cjs.n(Math.round(V*c))),fontSpan:0});}g+=h.glyphs.reduce((x,m)=>x+Math.round(m.advanceX*c),0);}return {...t,glyphs:a,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:d&&l.length===a.length?l:void 0}}var ut=new WeakMap;function zt(e){let o=ut.get(e);return o===void 0&&(o=Xt(e.bytes,e.faceIndex),ut.set(e,o)),o}var jt=new Set(["COLR","CBDT","sbix"]),Ht=512;function Xt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ct(e,0)==="ttcf"){let i=t.getUint32(8);if(o<0||o>=i||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let r=Math.min(t.getUint16(n+4),Ht);for(let i=0;i<r;i++){let s=n+12+i*16;if(s+4>e.byteLength)return false;if(jt.has(ct(e,s)))return true}return false}function ct(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var Gt=/\p{Emoji_Presentation}|️/u;function Vt(e){return Gt.test(e)}function q(e,o){if(e.length<2)return e;let t=e.filter(zt);if(t.length===0||t.length===e.length)return e;let n=e.filter(r=>!t.includes(r));return Vt(o)?[...t,...n]:[...n,...t]}var Wt=2048;function pt(e,o,t,n){if(!t.clusters.length||t.clusters.length>Wt)return null;let r=(f,h)=>{let{context:F,...x}=o,m={...x,text:h,environment:chunkDOHF6FA7_cjs.p({...o.environment,font:f})};return _(e,m,e.shape(m))},i=[],s=new Map;for(let f of [...t.clusters].sort((h,F)=>h.textStart-F.textStart)){let h=o.environment.font,F=o.text.slice(f.textStart,f.textEnd),x=i.at(-1);if(/^[\uFE0E\uFE0F]$/.test(F)&&x&&x.end===f.textStart){x.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(F)&&x&&x.font!==o.environment.font&&x.end===f.textStart){x.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(E=>E.id===0)){let E=o.text.slice(f.textStart,f.textEnd+1),L=s.get(F)??q(n,E).find(A=>{try{return !r(A,F).glyphs.some(V=>V.id===0)}catch{return false}});if(!L)return null;s.set(F,L),h=L;}let m=i.at(-1);m&&m.font===h&&m.end===f.textStart?m.end=f.textEnd:i.push({start:f.textStart,end:f.textEnd,font:h});}let a=[],p=[],l=[],d=[],g=true,u=0,c=0,y=0,b=0,R=0;for(let f of o.environment.direction==="rtl"?i.reverse():i){let h=r(f.font,o.text.slice(f.start,f.end));if(h.glyphs.some(m=>m.id===0))return null;let F=a.length,x=l.length;for(let m of h.glyphs)a.push({...m,cluster:f.start+m.cluster,originX:chunkDOHF6FA7_cjs.n(u+m.originX),originY:chunkDOHF6FA7_cjs.n(c+m.originY)});if(h.exactAdvancesX===void 0)g=false;else for(let m of h.exactAdvancesX)d.push(m);for(let m of h.clusters)p.push({...m,textStart:f.start+m.textStart,textEnd:f.start+m.textEnd,glyphStart:F+m.glyphStart,glyphEnd:F+m.glyphEnd,fontSpan:x});h.glyphs.length&&l.push({font:f.font,glyphStart:F,glyphEnd:a.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),u+=h.glyphs.reduce((m,E)=>m+E.advanceX,0),c+=h.glyphs.reduce((m,E)=>m+E.advanceY,0),y=Math.max(y,h.metrics.ascent),b=Math.max(b,h.metrics.descent),R=Math.max(R,h.metrics.lineGap);}return chunkDOHF6FA7_cjs.s({...t,glyphs:a,clusters:p,fontSpans:l,exactAdvancesX:g&&d.length===a.length?d:void 0,metrics:{ascent:chunkDOHF6FA7_cjs.n(y),descent:chunkDOHF6FA7_cjs.n(b),lineGap:chunkDOHF6FA7_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var Yt=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 "]]]),$t=512,ft=new WeakMap;function Kt(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=c=>c+2<=n.byteLength?n.getUint16(c):-1,i=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=i(8);if(c<0||o<0||o>=c||(a=i(12+o*4),a<0))return t}let p=r(a+4);if(p<0||p>1024)return t;let l=-1;for(let c=0;c<p;c+=1){let y=a+12+c*16;if(s(y)==="GSUB"){l=i(y+8);break}}if(l<0)return t;let d=r(l+4);if(d<=0)return t;let g=l+d,u=r(g);if(u<0)return t;for(let c=0;c<Math.min(u,$t);c+=1){let y=s(g+2+c*6);y&&t.add(y);}return t}function Zt(e,o){let t=ft.get(e);return t||(t=Kt(e.bytes,e.faceIndex),ft.set(e,t)),(Yt.get(o)??[o.toLowerCase()]).some(r=>t.has(r))}function mt(e,o){let t=e.filter(n=>Zt(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(i=>i.id===0).map(i=>i.cluster));if(!n.size)return t;let r=o.text.replace(/\u2011/g,(i,s)=>n.has(s)?"-":i);if(r===o.text)return t;try{let i=e.shape({...o,text:r});return chunkDOHF6FA7_cjs.s({...i,text:o.text},o.environment)}catch{return t}}function yt(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 chunkDOHF6FA7_cjs.d)),n={shape(a){return Q(e.shaper,a,e.shaper.shape(a))}},r=new WeakMap,i={shape(a){let p=e.shaper.shape(a),l=r.get(p);if(l&&l.input.text===a.text&&l.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&l.input.bidiLevel===a.bidiLevel&&l.input.context?.before===a.context?.before&&l.input.context?.after===a.context?.after&&l.input.environment===a.environment)return l.run;let d=s(a,Q(e.shaper,a,p));return r.set(p,{input:a,run:d}),d}},s=(a,p)=>{let l=_(n,a,p);if(!l.glyphs.some(d=>d.id===0)||/^[\t\n\r\f]*$/.test(a.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let d=pt(n,a,l,t);if(d)return d}for(let d of mt(q(t,a.text),a.environment.script))if(!(d.hash===a.environment.font.hash&&d.faceIndex===a.environment.font.faceIndex))try{let g={...a,environment:chunkDOHF6FA7_cjs.p({...a.environment,font:d})},u=_(n,g,n.shape(g));if(!u.glyphs.some(c=>c.id===0))return u}catch{}return l};return {...e,shaper:i}}var ee=chunkDOHF6FA7_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var Jt=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function z(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var ht=new WeakMap;function j(e){let o=ht.get(e);return o||ht.set(e,o=Qt(e)),o}function Qt(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:z(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:z(o.requested),resolved:z(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function eo(e){return Object.freeze({...j(e),bytes:chunkDOHF6FA7_cjs.i(e)})}function to(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkDOHF6FA7_cjs.d?null:eo(t)}catch{return null}}function gt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return to(e.resolve(),o)}}function oo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:z(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,r=[]){let i=new Map;for(let a of [...e,o]){let p=a.toLowerCase();i.has(p)||i.set(p,a);}let s=[...i.values()].map(a=>{let p=[];for(let l of Jt){let d=n?.({family:a,...l});!d||d instanceof chunkDOHF6FA7_cjs.d||p.push(Object.freeze({...l,sourceFamily:d.family,via:d.substitution?"substitution":"direct",identity:d.identity,id:d.id,hash:d.hash,faceIndex:d.faceIndex,substitution:d.substitution}));}return Object.freeze({family:a,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:oo(r)})}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(),r=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),i=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkJLVBDYVQ_cjs.l))return true;let d=n(l.request.family);return r.has(d)||!i.has(d)},a=e.originFailures.some(({cause:l})=>l instanceof chunkJLVBDYVQ_cjs.m?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!a&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunkW35WTWAO_cjs.d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function H(){return new Map}function X(e,o,t,n){if(t.trim().length===0)return null;let r={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},i=chunkDOHF6FA7_cjs.h(r),s=o.get(i);if(!s){try{s=e.fonts.resolve(r);}catch{return null}o.set(i,s);}return s instanceof chunkDOHF6FA7_cjs.d?null:s}function xt(e,o,t){let n=t.fontFamily??e.defaultFont.family;return X(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function no(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=H(),t=new WeakMap;return n=>{let r=chunkDOHF6FA7_cjs.ua(n.style,n.fontSlot),i=chunkDOHF6FA7_cjs.dd(n)?chunkDOHF6FA7_cjs.ed(n):chunkDOHF6FA7_cjs.ba(n.text,r);if(i.length===0)return null;let s=r.fontFamily??e.defaultFont.family,a=X(e,o,s,r)??(chunkOSFOJTHU_cjs.b(s)&&no(i)?X(e,o,e.defaultFont.family,r):null);if(!a)return null;try{if(r.smallCaps&&!chunkD7ZMDMPX_cjs.$(e.shaper,e.environment,a,r,t))return null;let p=chunkD7ZMDMPX_cjs._(e.shaper,e.environment,a,r,i);return Object.freeze({run:p,font:j(p.fontSpans[0]?.font??a),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>j(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ft(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var N=new Map,G=new WeakMap,se=0,M,le=32,Et=chunkDOHF6FA7_cjs.c;function bt(){if(M)return M;let e=(async()=>(await chunkD7ZMDMPX_cjs.d(),chunkD7ZMDMPX_cjs.h(chunkD7ZMDMPX_cjs.i)))();return M=e,e.catch(()=>{M===e&&(M=void 0);}),e}function Rt(e){let o=H();return chunkD7ZMDMPX_cjs.ba(e,{resolveFont(t){return xt(e,o,t)},fallback:chunkDOHF6FA7_cjs.ha()})}async function St(e,o,t=[],n=false){if(!chunkD7ZMDMPX_cjs.k(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=await bt(),i=yt(await chunkD7ZMDMPX_cjs.r(e,r,chunkD7ZMDMPX_cjs.i,o,n),t);return Object.freeze({createMeasurer:()=>Rt(i),resolveFont:s=>i.fonts.resolve(s),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunkDOHF6FA7_cjs.ga}`].join("|"),extensionFingerprint:e.fingerprint})}function ro(e,o){if(!chunkD7ZMDMPX_cjs.k(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let t=G.get(e);if(t)return t;let n=chunkD7ZMDMPX_cjs.m(e),r=N.get(n);if(!r){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));r=(async()=>{let p=chunkD7ZMDMPX_cjs.l(e).sources.reduce((d,g)=>d+(g.availability==="forbidden"?0:g.bytes.byteLength),0);if(se+p>Et)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Et} process-wide`);se+=p;let l;try{let d=await bt();l=await chunkD7ZMDMPX_cjs.r(e,d,chunkD7ZMDMPX_cjs.i,o);}catch(d){throw se-=p,d}return Object.freeze({createMeasurer:()=>Rt(l),shapeLaidOutText:ae(l),shapingHash:l.operation.shapingHash,producerVersion:l.operation.producerVersion})})(),N.set(n,r),r.catch(()=>{N.get(n)===r&&N.delete(n);});}let i=e.fingerprint,s=r.then(a=>Object.freeze({createMeasurer:a.createMeasurer,shapeLaidOutText:a.shapeLaidOutText,producer:["node-export",i,a.shapingHash,`producer:${a.producerVersion}`,`fallback:${chunkDOHF6FA7_cjs.ga}`].join("|"),extensionFingerprint:i}));return G.set(e,s),s.catch(()=>{G.get(e)===s&&G.delete(e);}),s}var io="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function ao(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(r=>r.type===io),n;if(t){let r=chunkOSFOJTHU_cjs.J(t);r.mode==="Internal"&&r.target.ok&&(n=o.parts.get(r.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkOSFOJTHU_cjs.if(o,n)}function Ot(e,o){let t=ao(e);if(t.length!==0)return chunkJLVBDYVQ_cjs.j(n=>{let r=new Set((n.resolvedFaces??[]).map(s=>chunkDOHF6FA7_cjs.h(s))),i=chunkJLVBDYVQ_cjs.C(t,{maxFontBytes:chunkDOHF6FA7_cjs.a,aggregateBudget:so(n),shadowedRequests:r});if(o)for(let s of i.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:i.sources}})}function so(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkDOHF6FA7_cjs.c:Math.max(0,chunkDOHF6FA7_cjs.c-o)}function lo(e){return te(e)&&ie(e)}var w=0,vt=Symbol("font-resolution-timeout");function uo(e){let o=0,t=false;return e?.(w),{reserve:r=>{if(t)throw new Error("Document font-byte lease is already released");if(w+r>chunkDOHF6FA7_cjs.c)throw new chunkW35WTWAO_cjs.d("layoutFailed",`Active document export font bytes are limited to ${chunkDOHF6FA7_cjs.c}; requested ${r} bytes with ${w} bytes already active`);w+=r,o+=r,e?.(w);let i=false;return ()=>{i||t||(i=true,w-=r,o-=r,e?.(w));}},release:()=>{t||(t=true,w-=o,o=0,e?.(w));}}}function ue(e,o){return e.attributes.find(t=>t.localName===o)?.value}function co(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkOSFOJTHU_cjs.la||t.namespaceUri===""))?.value}async function po(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=chunkT6K2QYNZ_cjs.Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:r,fontResolutionTimeoutMs:i,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:l,...d}=o,g=Array.isArray(n)?n:[n],u=r===void 0?[]:Array.isArray(r)?r:[r],c,y;try{y=await fo(t.view,g,{signal:o.signal,timeoutMs:i??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,lastResortFonts:u,onFontResolution:E=>(c=E,a?.(E))});}catch(E){if(E instanceof chunkW35WTWAO_cjs.d&&E.code==="aborted")return {ok:false,reason:"aborted"};throw E}if(!c)throw y?.dispose(),new chunkW35WTWAO_cjs.d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=chunkW35WTWAO_cjs.e(t.view,{...d,reuseAcrossRevisions:!1,...y?{measurer:y.createMeasurer(),producer:o.producer??y.producer}:o.producer?{producer:o.producer}:{}});}catch(E){throw y?.dispose(),E}if(!b.ok)return y?.dispose(),b;let R=b.session,f=y,h="active",F=()=>h==="aborted"?new chunkW35WTWAO_cjs.d("aborted","Export resource settlement was aborted"):new chunkW35WTWAO_cjs.d("disposed","Export session has been disposed"),x=E=>{if(h==="active"){h=E,o.signal?.removeEventListener("abort",m);try{R.dispose();}finally{f?.dispose(),f=void 0;}}},m=()=>x("aborted");return o.signal?.addEventListener("abort",m,{once:true}),o.signal?.aborted&&m(),{ok:true,session:Object.freeze({fontResolution:c,layout:()=>h==="active"?R.layout():Promise.reject(F()),layoutFor:E=>h==="active"?R.layoutFor(E):Promise.reject(F()),validatedImageBytes:E=>h==="active"?R.validatedImageBytes(E):null,admittedFontFace:gt({status:()=>h,unavailable:F,resolve:()=>f?.resolveFont}),shapeLaidOutText:Ft({status:()=>h,unavailable:F,shaping:()=>f}),dispose:()=>x("disposed")})}}async function fo(e,o,t={}){if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let n=mo(t.timeoutMs),r=new AbortController,i=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",i,{once:true}),t.signal?.aborted&&i();let s=setTimeout(()=>r.abort(vt),n);try{de(r.signal);let a=(async()=>{let p=uo(t.onActiveFontBytesChange),l=!1;try{let d=ho(e).slice(0,chunkJLVBDYVQ_cjs.c),g=chunkJLVBDYVQ_cjs.x(e,d),u=[],c={dropped:[]},y=Ot(e,c),b=[...o,...y?[y]:[],...t.lastResortFonts??[]],R=await chunkJLVBDYVQ_cjs.o(b,{families:[...new Set([...(t.glyphFallbacks??[]).map(x=>x.family),...g.families])].slice(0,chunkJLVBDYVQ_cjs.c),defaultFamily:chunkJLVBDYVQ_cjs.d.family,signal:r.signal},{onOriginFailure:x=>u.push(x),reserveOwnedBytes:p.reserve,maxExecutionFontBytes:chunkD7ZMDMPX_cjs.i.maxFontBytes});de(r.signal);let f=chunkJLVBDYVQ_cjs.z(chunkJLVBDYVQ_cjs.f(R??{}),g);if(f.sources.length===0){let x=oe(d,f.defaultFont.family,u,void 0,c.dropped);ne(x,t),re(x,t,t.glyphFallbacks);return}let h=await St(chunkD7ZMDMPX_cjs.o(f),void 0,t.glyphFallbacks,t.documentLigatures);de(r.signal);let F=oe(d,f.defaultFont.family,u,h.resolveFont,c.dropped);return ne(F,t),re(F,t,t.glyphFallbacks),l=!0,Object.freeze({...h,dispose:p.release})}finally{l||p.release();}})();return await Promise.race([a,yo(r.signal)])}finally{clearTimeout(s),t.signal?.removeEventListener("abort",i);}}function mo(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 yo(e){return new Promise((o,t)=>{let n=()=>{t(wt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function wt(e){let o=e.reason===vt;return new chunkW35WTWAO_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 wt(e)}function ho(e){let o=[e.part().root],t=[],n=[],r=new Set([e.part().name]),i=(d,g)=>{!g||r.has(g.name)||(r.add(g.name),d.push(g.root));};for(let d of e.headerFooterPartsBySection()){for(let g of d.headers.values())i(t,g);for(let g of d.footers.values())i(t,g);}for(let d of ["footnote","endnote"])n.push(...go(e,d));let s=e.documentThemeFonts(),a={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(d,g)=>{let u=chunkBY2ACZZ6_cjs.e(d,e.stylesRoot(),a,Fo(d,g)),c=chunkJLVBDYVQ_cjs.v(d,e.numberingRoot(),e.stylesRoot(),a);for(let y of [...u.direct,...Ro(d),...c,...chunkJLVBDYVQ_cjs.s(d,e.stylesRoot(),a),...u.inherited]){let b=y.toLowerCase();p.has(b)||p.set(b,y);}};return l(o,"body"),l(t,"furniture"),l(n,"note"),[...p.values()]}function go(e,o){let t=chunkOSFOJTHU_cjs.ch(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkOSFOJTHU_cjs.dh(e.part()).filter(i=>i.noteKind===o).map(i=>i.noteId)),r=[];for(let i of t.root.children){if(i.kind==="textValue")continue;let s=chunkOSFOJTHU_cjs.zc(i),a=chunkOSFOJTHU_cjs.yc(i);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&r.push(i);}return r}var xo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Fo(e,o){let t=new Set;for(let n of e){let r=[],i=[{node:n,context:o}];for(;i.length>0;){let{node:s,context:a}=i.pop();s.namespaceUri===chunkOSFOJTHU_cjs.la&&s.localName==="p"&&r.push({paragraph:s,context:a});let p=s.namespaceUri===chunkOSFOJTHU_cjs.la&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let l=s.children.length-1;l>=0;l-=1){let d=s.children[l];d.kind!=="textValue"&&i.push({node:d,context:p});}}for(let s of r)Eo(s.paragraph,t,s.context);}return t}function Eo(e,o,t){let n=chunkDOHF6FA7_cjs.Vb(),r=null,i=null,s="",a=false,p=false,l=false,d=0,g=[];for(let u=e.children.length-1;u>=0;u-=1){let c=e.children[u];c.kind!=="textValue"&&g.push({node:c,runId:null,visibility:D,containerDepth:0});}for(;g.length>0;){let{node:u,runId:c,visibility:y,containerDepth:b}=g.pop();if(b>=chunkOSFOJTHU_cjs.wa||u.namespaceUri===chunkOSFOJTHU_cjs.la&&u.localName==="p")continue;let R=u.namespaceUri===chunkOSFOJTHU_cjs.la&&u.localName==="r"?u.id:c;if(u.namespaceUri===chunkOSFOJTHU_cjs.la&&u.localName==="fldSimple"){let f=ue(u,"instr")??"";chunkDOHF6FA7_cjs.Yc(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&bo(u)!==D&&o.add(u.id);}if(u.namespaceUri===chunkOSFOJTHU_cjs.la&&u.localName==="fldChar"){let f=ue(u,"fldCharType");if(f==="begin")chunkDOHF6FA7_cjs.Yb(n),n.nesting===1&&(r=R,i=null,s="",a=false,p=false,l=chunkOSFOJTHU_cjs.Bf(u),d=0);else if(f==="separate"){let h=n.nesting===1;if(chunkDOHF6FA7_cjs._b(n),h){let F=chunkDOHF6FA7_cjs.Xb(n);s=F.instruction,a=F.overflow||n.nestingOverflow,i=R,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let F=chunkDOHF6FA7_cjs.Xb(n);s=F.instruction,a=F.overflow||n.nestingOverflow;}if(!a&&chunkDOHF6FA7_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"})&&d!==D){let F=i??r;F&&o.add(F);}}chunkDOHF6FA7_cjs.$b(n);}continue}if(u.namespaceUri===chunkOSFOJTHU_cjs.la&&(u.localName==="instrText"||u.localName==="delInstrText")){chunkDOHF6FA7_cjs.Zb(n,Dt(u),u.localName==="delInstrText");continue}n.nesting>0&&chunkDOHF6FA7_cjs.ac(n)&&u.namespaceUri===chunkOSFOJTHU_cjs.la&&At(u)&&(d|=y);for(let f=u.children.length-1;f>=0;f-=1){let h=u.children[f];h.kind!=="textValue"&&g.push({node:h,runId:R,visibility:y&Pt(u),containerDepth:chunkOSFOJTHU_cjs.xa(u,b)});}}chunkDOHF6FA7_cjs.Wb(n);}function At(e){return e.localName==="t"||e.localName==="delText"?Dt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ce=1,Tt=2,Lt=4,D=ce|Tt|Lt;function bo(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:D});let t=0;for(;o.length>0;){let{node:n,visibility:r}=o.pop();if(!(n.namespaceUri===chunkOSFOJTHU_cjs.la&&n.localName==="p")){if(n.namespaceUri===chunkOSFOJTHU_cjs.la&&At(n)&&(t|=r,t===D))return t;for(let i of n.children)i.kind!=="textValue"&&o.push({node:i,visibility:r&Pt(n)});}}return t}function Pt(e){return e.namespaceUri!==chunkOSFOJTHU_cjs.la?D:e.localName==="ins"||e.localName==="moveTo"?ce|Tt:e.localName==="del"||e.localName==="moveFrom"?ce|Lt:D}function Ro(e){let o=new Map,t=n=>{let r=chunkBY2ACZZ6_cjs.b(n??void 0);if(r===null)return;let i=r.toLowerCase();o.has(i)||o.set(i,r);};for(let n of e){let r=[n];for(;r.length>0;){let i=r.pop();if(i.namespaceUri===xo&&t(chunkDOHF6FA7_cjs.$c),i.namespaceUri===chunkOSFOJTHU_cjs.la&&i.localName==="sym"&&t(chunkBY2ACZZ6_cjs.c(co(i,"font"))),i.namespaceUri===chunkOSFOJTHU_cjs.la&&i.localName==="fldSimple"){let s=ue(i,"instr");t(chunkDOHF6FA7_cjs.Wc(s??"")?.font??null);}if(i.namespaceUri===chunkOSFOJTHU_cjs.la&&i.localName==="p")for(let s of chunkJLVBDYVQ_cjs.u(i))t(s);for(let s=i.children.length-1;s>=0;s-=1){let a=i.children[s];a.kind!=="textValue"&&r.push(a);}}}return [...o.values()]}function Dt(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 r=n.children.length-1;r>=0;r-=1)t.push(n.children[r]);}return o}var _t="FILE_TOO_LARGE",kt=8;function So(e){return typeof e=="object"&&e!==null}function Nt(e){if(!(!So(e)||typeof e.code!="string"))return e.code}function Mt(e){return e===""||e.toLowerCase()==="localhost"}function Oo(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ct(e){let o=Oo(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 Ut(e){let o=Ct(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function vo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function wo(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(!Mt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Ut(o.pathname);if(t===null||vo(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Ao(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 To(e){let o=Ao(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>kt)throw new TypeError(`trustedRoot must not exceed ${kt} directories`);return o.map(wo)}function Lo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkDOHF6FA7_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkDOHF6FA7_cjs.a}`);return e}function Po(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Mt(e.host))return null;let t=Ct(e.pathname);if(t===null)return null;for(let n of o){let r=Ut(n.pathname);if(r===null||!t.startsWith(r)||t.length<=r.length)continue;let i=new URL("file:///");return i.pathname=t,i}return null}function Do(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 ko(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function It(e,o,t){return e.some(n=>ko(n,o,t))}async function Io(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(r){if(Nt(r)==="ENOENT")continue;throw r}return t}function _o(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:r,realpath:i},{constants:s},{fileURLToPath:a},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(y=>p.resolve(a(y.href))),d=p.resolve(a(typeof o=="string"?o:o.href));if(!It(l,d,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let g=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",u=await r(d,g),c=()=>{u.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let y=await i(d);if(!It(await Io(l,i),y,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let b=(await u.stat()).size;if(!Number.isSafeInteger(b)||b<0||b>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:_t});let R=new Uint8Array(b),f=0;for(;f<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:h}=await u.read(R,f,R.byteLength-f,f);if(h===0)break;f+=h;}if(t?.aborted)throw t.reason;return f===R.byteLength?R:R.slice(0,f)}catch(y){throw t?.aborted?t.reason:y}finally{t?.removeEventListener("abort",c),await u.close().catch(()=>{});}}}function No(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=To(e.trustedRoot),t=Lo(e.maxBytes),n=e.read??_o(o),r=e.networkFetch??fetch;return(async(i,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let p=Do(i);if(p.protocol!=="file:")return r(p,s);let l=Po(p,o);if(!l)return new Response(null,{status:404});let d=a?new AbortController:void 0,g=()=>d?.abort(a?.reason);a?.addEventListener("abort",g,{once:true});let u;try{if(u=await n(l,{maxBytes:t,...d?{signal:d.signal}:{}}),a?.aborted)throw a.reason;if(u.byteLength>t)return new Response(null,{status:413})}catch(c){if(a?.aborted)throw a.reason;if(d?.signal.aborted)throw d.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let y=Nt(c);if(y===_t)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw c}finally{a?.removeEventListener("abort",g);}return new Response(u,{status:200})})}
|
|
2
|
-
Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return
|
|
1
|
+
'use strict';var chunkMOYYRVFV_cjs=require('./chunk-MOYYRVFV.cjs'),chunk5JPIEN54_cjs=require('./chunk-5JPIEN54.cjs'),chunkHC6YNKUI_cjs=require('./chunk-HC6YNKUI.cjs'),chunkDBOOTED4_cjs=require('./chunk-DBOOTED4.cjs'),chunkXSTGE3NI_cjs=require('./chunk-XSTGE3NI.cjs');require('./chunk-IBRBNT37.cjs');var chunk243W4WW2_cjs=require('./chunk-243W4WW2.cjs'),chunkWO4V6PNS_cjs=require('./chunk-WO4V6PNS.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:chunkDBOOTED4_cjs.n(m+Math.round(y.originX*c)),originY:chunkDBOOTED4_cjs.n(Math.round(y.originY*c)),offsetX:chunkDBOOTED4_cjs.n(Math.round(y.offsetX*c)),offsetY:chunkDBOOTED4_cjs.n(Math.round(y.offsetY*c)),advanceX:chunkDBOOTED4_cjs.n(Math.round(y.advanceX*c)),advanceY:chunkDBOOTED4_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=chunkDBOOTED4_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:chunkDBOOTED4_cjs.n(T.advance+b),caretEdges:[chunkDBOOTED4_cjs.n(0),chunkDBOOTED4_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=>chunkDBOOTED4_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:chunkDBOOTED4_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:chunkDBOOTED4_cjs.n(l+y.originX),originY:chunkDBOOTED4_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 chunkDBOOTED4_cjs.u({...t,glyphs:a,clusters:p,fontSpans:d,exactAdvancesX:m&&u.length===a.length?u:void 0,metrics:{ascent:chunkDBOOTED4_cjs.n(h),descent:chunkDBOOTED4_cjs.n(E),lineGap:chunkDBOOTED4_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 chunkDBOOTED4_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 chunkDBOOTED4_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:chunkDBOOTED4_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=chunkDBOOTED4_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:chunkDBOOTED4_cjs.i(e)})}function io(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkDBOOTED4_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 chunkDBOOTED4_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 chunkMOYYRVFV_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 chunkMOYYRVFV_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 chunkHC6YNKUI_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 i={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkDBOOTED4_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 chunkDBOOTED4_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=chunkDBOOTED4_cjs.wa(n.style,n.fontSlot),r=chunkDBOOTED4_cjs.gd(n)?chunkDBOOTED4_cjs.hd(n):chunkDBOOTED4_cjs.da(n.text,i);if(r.length===0)return null;let s=i.fontFamily??e.defaultFont.family,a=G(e,o,s,i)??(chunkWO4V6PNS_cjs.b(s)&&so(r)?G(e,o,e.defaultFont.family,i):null);if(!a)return null;try{if(i.smallCaps&&!chunk5JPIEN54_cjs.ea(e.shaper,e.environment,a,i,t))return null;let p=chunk5JPIEN54_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=chunkDBOOTED4_cjs.c;function vt(){if(C)return C;let e=(async()=>(await chunk5JPIEN54_cjs.d(),chunk5JPIEN54_cjs.h({...chunk5JPIEN54_cjs.i,maxFontBytes:chunkDBOOTED4_cjs.a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function wt(e){let o=X();return chunk5JPIEN54_cjs.ga(e,{resolveFont(t){return bt(e,o,t)},fallback:chunkDBOOTED4_cjs.ja()})}async function At(e,o,t=[],n=false,i){if(!chunk5JPIEN54_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk5JPIEN54_cjs.k(i,chunk5JPIEN54_cjs.i),s=await vt(),a=xt(await chunk5JPIEN54_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:${chunkDBOOTED4_cjs.ia}`].join("|"),extensionFingerprint:e.fingerprint})}function lo(e,o,t){if(!chunk5JPIEN54_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk5JPIEN54_cjs.k(t,chunk5JPIEN54_cjs.i),i=chunk5JPIEN54_cjs.j(n),r=St.get(e),s=r?.get(i);if(s)return s;let a=`${chunk5JPIEN54_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=chunk5JPIEN54_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 chunk5JPIEN54_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:${chunkDBOOTED4_cjs.ia}`].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=chunkWO4V6PNS_cjs.J(t);i.mode==="Internal"&&i.target.ok&&(n=o.parts.get(i.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkWO4V6PNS_cjs.lf(o,n)}function Tt(e,o){let t=uo(e);if(t.length!==0)return chunkMOYYRVFV_cjs.j(n=>{let i=new Set((n.resolvedFaces??[]).map(s=>chunkDBOOTED4_cjs.h(s))),r=chunkMOYYRVFV_cjs.E(t,{maxFontBytes:chunkDBOOTED4_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?chunkDBOOTED4_cjs.c:Math.max(0,chunkDBOOTED4_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>chunkDBOOTED4_cjs.c)throw new chunkHC6YNKUI_cjs.d("layoutFailed",`Active document export font bytes are limited to ${chunkDBOOTED4_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===chunkWO4V6PNS_cjs.la||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=chunk243W4WW2_cjs.Ca(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 chunkHC6YNKUI_cjs.d&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!h)throw E?.dispose(),new chunkHC6YNKUI_cjs.d("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkHC6YNKUI_cjs.e(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 chunkHC6YNKUI_cjs.d("aborted","Export resource settlement was aborted"):new chunkHC6YNKUI_cjs.d("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=chunk5JPIEN54_cjs.k(t.fontShaping,chunk5JPIEN54_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,chunkMOYYRVFV_cjs.c),l=chunkMOYYRVFV_cjs.x(e,m),c=[],h={dropped:[]},E=Tt(e,h),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],f=await chunkMOYYRVFV_cjs.o(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(b=>b.family),...l.families])].slice(0,chunkMOYYRVFV_cjs.c),defaultFamily:chunkMOYYRVFV_cjs.d.family,signal:r.signal},{onOriginFailure:b=>c.push(b),reserveOwnedBytes:d.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=chunkMOYYRVFV_cjs.f(f??{}),x=chunkMOYYRVFV_cjs.z(g,l),F=chunkMOYYRVFV_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(chunk5JPIEN54_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 chunkHC6YNKUI_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 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=chunkXSTGE3NI_cjs.e(u,e.stylesRoot(),a,So(u,m)),c=chunkMOYYRVFV_cjs.v(u,e.numberingRoot(),e.stylesRoot(),a);for(let h of [...l.direct,...wo(u),...c,...chunkMOYYRVFV_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=chunkWO4V6PNS_cjs.lh(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkWO4V6PNS_cjs.mh(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=chunkWO4V6PNS_cjs.zc(r),a=chunkWO4V6PNS_cjs.yc(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===chunkWO4V6PNS_cjs.la&&s.localName==="p"&&i.push({paragraph:s,context:a});let p=s.namespaceUri===chunkWO4V6PNS_cjs.la&&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=chunkDBOOTED4_cjs.Xb(),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>=chunkWO4V6PNS_cjs.wa||l.namespaceUri===chunkWO4V6PNS_cjs.la&&l.localName==="p")continue;let R=l.namespaceUri===chunkWO4V6PNS_cjs.la&&l.localName==="r"?l.id:c;if(l.namespaceUri===chunkWO4V6PNS_cjs.la&&l.localName==="fldSimple"){let f=ce(l,"instr")??"";chunkDBOOTED4_cjs._c(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===chunkWO4V6PNS_cjs.la&&l.localName==="fldChar"){let f=ce(l,"fldCharType");if(f==="begin")chunkDBOOTED4_cjs._b(n),n.nesting===1&&(i=R,r=null,s="",a=false,p=false,d=chunkWO4V6PNS_cjs.Ef(l),u=0);else if(f==="separate"){let g=n.nesting===1;if(chunkDBOOTED4_cjs.ac(n),g){let x=chunkDBOOTED4_cjs.Zb(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=chunkDBOOTED4_cjs.Zb(n);s=x.instruction,a=x.overflow||n.nestingOverflow;}if(!a&&chunkDBOOTED4_cjs.Zc(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);}}chunkDBOOTED4_cjs.bc(n);}continue}if(l.namespaceUri===chunkWO4V6PNS_cjs.la&&(l.localName==="instrText"||l.localName==="delInstrText")){chunkDBOOTED4_cjs.$b(n,Nt(l),l.localName==="delInstrText");continue}n.nesting>0&&chunkDBOOTED4_cjs.cc(n)&&l.namespaceUri===chunkWO4V6PNS_cjs.la&&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:chunkWO4V6PNS_cjs.xa(l,E)});}}chunkDBOOTED4_cjs.Yb(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===chunkWO4V6PNS_cjs.la&&n.localName==="p")){if(n.namespaceUri===chunkWO4V6PNS_cjs.la&&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!==chunkWO4V6PNS_cjs.la?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=chunkXSTGE3NI_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(chunkDBOOTED4_cjs.bd),r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="sym"&&t(chunkXSTGE3NI_cjs.c(yo(r,"font"))),r.localName==="textpath"&&t(chunkWO4V6PNS_cjs.pd(r)),r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkDBOOTED4_cjs.Yc(s??"")?.font??null);}if(r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="p")for(let s of chunkMOYYRVFV_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>chunkDBOOTED4_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkDBOOTED4_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 chunkHC6YNKUI_cjs.d}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkHC6YNKUI_cjs.c}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkHC6YNKUI_cjs.b}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkHC6YNKUI_cjs.e}});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,22 +7,22 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
|
-
import { S as SemanticLayout, a as ReviewDisplayMode, q as ResolvedRevisionMarkup, r as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, s as ListMarkerPictureRecord, t as RevisionMarkupOptions, T as TextMeasurer, p as FontRequest, u as FontSubstitution, v as ShapedRun, g as StyleSpanRecord } from './semantic-records-
|
|
11
|
-
import {
|
|
12
|
-
import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import './
|
|
16
|
-
import './
|
|
17
|
-
import './
|
|
18
|
-
import './tree-package-store-
|
|
19
|
-
import './editor-
|
|
10
|
+
import { S as SemanticLayout, a as ReviewDisplayMode, q as ResolvedRevisionMarkup, r as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, s as ListMarkerPictureRecord, t as RevisionMarkupOptions, T as TextMeasurer, p as FontRequest, u as FontSubstitution, v as ShapedRun, g as StyleSpanRecord } from './semantic-records-B-akgRch.js';
|
|
11
|
+
import { a8 as PreservedImageMime, aD as ImageResourceLimits, af as SupportedImageMime, aE as ImageDecodePort } from './types-barrel-CkF2JbU4.js';
|
|
12
|
+
import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-qOpaCF82.js';
|
|
13
|
+
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
14
|
+
import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-CWS3j0Xr.js';
|
|
15
|
+
import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-CWh40DYp.js';
|
|
16
|
+
import './omml-equation-BsLAa2lX.js';
|
|
17
|
+
import './editor-scope-C7ke1KJG.js';
|
|
18
|
+
import './tree-package-store-B8l8DX3Z.js';
|
|
19
|
+
import './editor-B2ShlO23.js';
|
|
20
|
+
import './diagnostic-hints-C9JlLz1L.js';
|
|
21
|
+
import './failure-NS2lsya4.js';
|
|
20
22
|
import './contracts/document.js';
|
|
21
23
|
import './contracts/interaction.js';
|
|
22
|
-
import './semantic-interaction-
|
|
23
|
-
import './document-protection-
|
|
24
|
-
import './failure-NS2lsya4.js';
|
|
25
|
-
import './diagnostic-hints-BeVjfNOv.js';
|
|
24
|
+
import './semantic-interaction-dApRIYpt.js';
|
|
25
|
+
import './document-protection-C8x3P2J6.js';
|
|
26
26
|
|
|
27
27
|
/** Source content that cannot be certified by the layout snapshot. @public */
|
|
28
28
|
interface ExportContentWarning {
|
|
@@ -305,7 +305,7 @@ declare const MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS = 32;
|
|
|
305
305
|
* sessions retain only their own layout caches and remain independently disposable.
|
|
306
306
|
* @public
|
|
307
307
|
*/
|
|
308
|
-
declare function acquireSharedExportShaping(prepared: PreparedLayoutFontConfiguration, instrumentation?: LayoutShapingInstrumentation): Promise<SharedExportShapingCapabilities>;
|
|
308
|
+
declare function acquireSharedExportShaping(prepared: PreparedLayoutFontConfiguration, instrumentation?: LayoutShapingInstrumentation, execution?: FontShapingOptions): Promise<SharedExportShapingCapabilities>;
|
|
309
309
|
|
|
310
310
|
/** Export session retaining the exact font evidence used to construct its measurer. @public */
|
|
311
311
|
interface FontBackedExportSession extends ExportSession {
|
|
@@ -326,6 +326,8 @@ type OpenFontBackedDocumentForExportResult = {
|
|
|
326
326
|
}>;
|
|
327
327
|
/** Font-backed one-shot session options shared by Markdown and future exporters. @public */
|
|
328
328
|
interface OpenFontBackedDocumentForExportOptions extends Omit<OpenDocumentForExportOptions, 'measurer' | 'reuseAcrossRevisions'> {
|
|
329
|
+
/** Explicit per-face shaping execution ceiling; defaults to 16 MiB. */
|
|
330
|
+
readonly fontShaping?: FontShapingOptions;
|
|
329
331
|
/** Apply document optional ligatures to both layout measurement and exported glyphs. */
|
|
330
332
|
readonly documentLigatures?: boolean;
|
|
331
333
|
/** Immutable font-backed byte sessions reject incremental revision reuse. */
|
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,j as j$2,C,m,u,l as l$1}from'./chunk-236O4YQW.js';import {j as j$1,l,k,q as q$1,h,n,c as c$2,g,_ as _$1,Z,aa}from'./chunk-6ZQP4HQ7.js';import'./chunk-RIYSCEFQ.js';import {d,e}from'./chunk-E4LOMDNL.js';export{d as ExportResourceError,c as createNodeImageDecodePort,b as exportDestinationNamed,e as openDocumentForExport}from'./chunk-E4LOMDNL.js';import {c,ga,ua,dd,ed,ba,ha,h as h$1,a,d as d$2,Wc,b as b$1,i,Vb,Yc,Yb,_b,Xb,Xc,$b,Zb,ac,Wb,p,s as s$1,n as n$1,$c}from'./chunk-CPWLFPWC.js';import {e as e$1,c as c$3,b as b$2}from'./chunk-G4HOFIKJ.js';import'./chunk-LSZ6KPKK.js';import {Ba}from'./chunk-U4JZVSOE.js';import {ch,dh,zc,yc,b,la,J,if as _if,wa,Bf,xa}from'./chunk-YQ5G6LC7.js';function _(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},r=e.shape(n);if(t.glyphs.length!==r.glyphs.length||t.glyphs.some((u,c)=>u.id!==r.glyphs[c]?.id))return t;let i=[],s=0;for(let u of o.text){let c=u.toUpperCase()!==u,y=i.at(-1);y&&(y.lower===c||/\p{M}/u.test(u))?y.text+=u:i.push({text:u,start:s,lower:c}),s+=u.length;}let a=[],p=[],l=[],d=true,g=0;for(let u of o.environment.direction==="rtl"?i.reverse():i){let c=u.lower?.8:1,y=[],b=[],R="",f=u.start;for(let x of u.text){let m=u.lower?x.toUpperCase():x;for(let E=0;E<m.length;E++)y.push(f),b.push(f+x.length);R+=m,f+=x.length;}let h=e.shape({...n,text:R}),F=a.length;for(let[x,m]of h.glyphs.entries()){let E=h.exactAdvancesX?.[x];E===void 0?d=false:l.push(E*c),a.push({...m,cluster:y[m.cluster]??u.start,originX:n$1(g+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 x of h.clusters){let m=y[x.textStart]??u.start,E=b[x.textEnd-1]??f,L=n$1(Math.round(x.advance*c)),A=p.at(-1);A&&A.textStart===m&&A.textEnd===E?p[p.length-1]={...A,glyphEnd:F+x.glyphEnd,advance:n$1(A.advance+L),caretEdges:[n$1(0),n$1(A.advance+L)]}:p.push({...x,textStart:m,textEnd:E,glyphStart:F+x.glyphStart,glyphEnd:F+x.glyphEnd,advance:L,caretEdges:x.caretEdges.map(V=>n$1(Math.round(V*c))),fontSpan:0});}g+=h.glyphs.reduce((x,m)=>x+Math.round(m.advanceX*c),0);}return {...t,glyphs:a,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:d&&l.length===a.length?l:void 0}}var ut=new WeakMap;function zt(e){let o=ut.get(e);return o===void 0&&(o=Xt(e.bytes,e.faceIndex),ut.set(e,o)),o}var jt=new Set(["COLR","CBDT","sbix"]),Ht=512;function Xt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ct(e,0)==="ttcf"){let i=t.getUint32(8);if(o<0||o>=i||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let r=Math.min(t.getUint16(n+4),Ht);for(let i=0;i<r;i++){let s=n+12+i*16;if(s+4>e.byteLength)return false;if(jt.has(ct(e,s)))return true}return false}function ct(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var Gt=/\p{Emoji_Presentation}|️/u;function Vt(e){return Gt.test(e)}function q(e,o){if(e.length<2)return e;let t=e.filter(zt);if(t.length===0||t.length===e.length)return e;let n=e.filter(r=>!t.includes(r));return Vt(o)?[...t,...n]:[...n,...t]}var Wt=2048;function pt(e,o,t,n){if(!t.clusters.length||t.clusters.length>Wt)return null;let r=(f,h)=>{let{context:F,...x}=o,m={...x,text:h,environment:p({...o.environment,font:f})};return _(e,m,e.shape(m))},i=[],s=new Map;for(let f of [...t.clusters].sort((h,F)=>h.textStart-F.textStart)){let h=o.environment.font,F=o.text.slice(f.textStart,f.textEnd),x=i.at(-1);if(/^[\uFE0E\uFE0F]$/.test(F)&&x&&x.end===f.textStart){x.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(F)&&x&&x.font!==o.environment.font&&x.end===f.textStart){x.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(E=>E.id===0)){let E=o.text.slice(f.textStart,f.textEnd+1),L=s.get(F)??q(n,E).find(A=>{try{return !r(A,F).glyphs.some(V=>V.id===0)}catch{return false}});if(!L)return null;s.set(F,L),h=L;}let m=i.at(-1);m&&m.font===h&&m.end===f.textStart?m.end=f.textEnd:i.push({start:f.textStart,end:f.textEnd,font:h});}let a=[],p$1=[],l=[],d=[],g=true,u=0,c=0,y=0,b=0,R=0;for(let f of o.environment.direction==="rtl"?i.reverse():i){let h=r(f.font,o.text.slice(f.start,f.end));if(h.glyphs.some(m=>m.id===0))return null;let F=a.length,x=l.length;for(let m of h.glyphs)a.push({...m,cluster:f.start+m.cluster,originX:n$1(u+m.originX),originY:n$1(c+m.originY)});if(h.exactAdvancesX===void 0)g=false;else for(let m of h.exactAdvancesX)d.push(m);for(let m of h.clusters)p$1.push({...m,textStart:f.start+m.textStart,textEnd:f.start+m.textEnd,glyphStart:F+m.glyphStart,glyphEnd:F+m.glyphEnd,fontSpan:x});h.glyphs.length&&l.push({font:f.font,glyphStart:F,glyphEnd:a.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),u+=h.glyphs.reduce((m,E)=>m+E.advanceX,0),c+=h.glyphs.reduce((m,E)=>m+E.advanceY,0),y=Math.max(y,h.metrics.ascent),b=Math.max(b,h.metrics.descent),R=Math.max(R,h.metrics.lineGap);}return s$1({...t,glyphs:a,clusters:p$1,fontSpans:l,exactAdvancesX:g&&d.length===a.length?d:void 0,metrics:{ascent:n$1(y),descent:n$1(b),lineGap:n$1(R)}},{...o.environment,fallbackOrder:n})}var Yt=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 "]]]),$t=512,ft=new WeakMap;function Kt(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=c=>c+2<=n.byteLength?n.getUint16(c):-1,i=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=i(8);if(c<0||o<0||o>=c||(a=i(12+o*4),a<0))return t}let p=r(a+4);if(p<0||p>1024)return t;let l=-1;for(let c=0;c<p;c+=1){let y=a+12+c*16;if(s(y)==="GSUB"){l=i(y+8);break}}if(l<0)return t;let d=r(l+4);if(d<=0)return t;let g=l+d,u=r(g);if(u<0)return t;for(let c=0;c<Math.min(u,$t);c+=1){let y=s(g+2+c*6);y&&t.add(y);}return t}function Zt(e,o){let t=ft.get(e);return t||(t=Kt(e.bytes,e.faceIndex),ft.set(e,t)),(Yt.get(o)??[o.toLowerCase()]).some(r=>t.has(r))}function mt(e,o){let t=e.filter(n=>Zt(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(i=>i.id===0).map(i=>i.cluster));if(!n.size)return t;let r=o.text.replace(/\u2011/g,(i,s)=>n.has(s)?"-":i);if(r===o.text)return t;try{let i=e.shape({...o,text:r});return s$1({...i,text:o.text},o.environment)}catch{return t}}function yt(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$2)),n={shape(a){return Q(e.shaper,a,e.shaper.shape(a))}},r=new WeakMap,i={shape(a){let p=e.shaper.shape(a),l=r.get(p);if(l&&l.input.text===a.text&&l.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&l.input.bidiLevel===a.bidiLevel&&l.input.context?.before===a.context?.before&&l.input.context?.after===a.context?.after&&l.input.environment===a.environment)return l.run;let d=s(a,Q(e.shaper,a,p));return r.set(p,{input:a,run:d}),d}},s=(a,p$1)=>{let l=_(n,a,p$1);if(!l.glyphs.some(d=>d.id===0)||/^[\t\n\r\f]*$/.test(a.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let d=pt(n,a,l,t);if(d)return d}for(let d of mt(q(t,a.text),a.environment.script))if(!(d.hash===a.environment.font.hash&&d.faceIndex===a.environment.font.faceIndex))try{let g={...a,environment:p({...a.environment,font:d})},u=_(n,g,n.shape(g));if(!u.glyphs.some(c=>c.id===0))return u}catch{}return l};return {...e,shaper:i}}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var Jt=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function z(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var ht=new WeakMap;function j(e){let o=ht.get(e);return o||ht.set(e,o=Qt(e)),o}function Qt(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:z(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:z(o.requested),resolved:z(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function eo(e){return Object.freeze({...j(e),bytes:i(e)})}function to(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$2?null:eo(t)}catch{return null}}function gt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return to(e.resolve(),o)}}function oo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:z(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,r=[]){let i=new Map;for(let a of [...e,o]){let p=a.toLowerCase();i.has(p)||i.set(p,a);}let s=[...i.values()].map(a=>{let p=[];for(let l of Jt){let d=n?.({family:a,...l});!d||d instanceof d$2||p.push(Object.freeze({...l,sourceFamily:d.family,via:d.substitution?"substitution":"direct",identity:d.identity,id:d.id,hash:d.hash,faceIndex:d.faceIndex,substitution:d.substitution}));}return Object.freeze({family:a,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:oo(r)})}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(),r=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),i=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof l$1))return true;let d=n(l.request.family);return r.has(d)||!i.has(d)},a=e.originFailures.some(({cause:l})=>l instanceof m?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!a&&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 H(){return new Map}function X(e,o,t,n){if(t.trim().length===0)return null;let r={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},i=h$1(r),s=o.get(i);if(!s){try{s=e.fonts.resolve(r);}catch{return null}o.set(i,s);}return s instanceof d$2?null:s}function xt(e,o,t){let n=t.fontFamily??e.defaultFont.family;return X(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function no(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=H(),t=new WeakMap;return n=>{let r=ua(n.style,n.fontSlot),i=dd(n)?ed(n):ba(n.text,r);if(i.length===0)return null;let s=r.fontFamily??e.defaultFont.family,a=X(e,o,s,r)??(b(s)&&no(i)?X(e,o,e.defaultFont.family,r):null);if(!a)return null;try{if(r.smallCaps&&!_$1(e.shaper,e.environment,a,r,t))return null;let p=Z(e.shaper,e.environment,a,r,i);return Object.freeze({run:p,font:j(p.fontSpans[0]?.font??a),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>j(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ft(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var N=new Map,G=new WeakMap,se=0,M,le=32,Et=c;function bt(){if(M)return M;let e=(async()=>(await c$2(),g(h)))();return M=e,e.catch(()=>{M===e&&(M=void 0);}),e}function Rt(e){let o=H();return aa(e,{resolveFont(t){return xt(e,o,t)},fallback:ha()})}async function St(e,o,t=[],n=false){if(!j$1(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=await bt(),i=yt(await q$1(e,r,h,o,n),t);return Object.freeze({createMeasurer:()=>Rt(i),resolveFont:s=>i.fonts.resolve(s),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 ro(e,o){if(!j$1(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let t=G.get(e);if(t)return t;let n=l(e),r=N.get(n);if(!r){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));r=(async()=>{let p=k(e).sources.reduce((d,g)=>d+(g.availability==="forbidden"?0:g.bytes.byteLength),0);if(se+p>Et)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Et} process-wide`);se+=p;let l;try{let d=await bt();l=await q$1(e,d,h,o);}catch(d){throw se-=p,d}return Object.freeze({createMeasurer:()=>Rt(l),shapeLaidOutText:ae(l),shapingHash:l.operation.shapingHash,producerVersion:l.operation.producerVersion})})(),N.set(n,r),r.catch(()=>{N.get(n)===r&&N.delete(n);});}let i=e.fingerprint,s=r.then(a=>Object.freeze({createMeasurer:a.createMeasurer,shapeLaidOutText:a.shapeLaidOutText,producer:["node-export",i,a.shapingHash,`producer:${a.producerVersion}`,`fallback:${ga}`].join("|"),extensionFingerprint:i}));return G.set(e,s),s.catch(()=>{G.get(e)===s&&G.delete(e);}),s}var io="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function ao(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(r=>r.type===io),n;if(t){let r=J(t);r.mode==="Internal"&&r.target.ok&&(n=o.parts.get(r.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),_if(o,n)}function Ot(e,o){let t=ao(e);if(t.length!==0)return j$2(n=>{let r=new Set((n.resolvedFaces??[]).map(s=>h$1(s))),i=C(t,{maxFontBytes:a,aggregateBudget:so(n),shadowedRequests:r});if(o)for(let s of i.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:i.sources}})}function so(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function lo(e){return te(e)&&ie(e)}var w=0,vt=Symbol("font-resolution-timeout");function uo(e){let o=0,t=false;return e?.(w),{reserve:r=>{if(t)throw new Error("Document font-byte lease is already released");if(w+r>c)throw new d("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${r} bytes with ${w} bytes already active`);w+=r,o+=r,e?.(w);let i=false;return ()=>{i||t||(i=true,w-=r,o-=r,e?.(w));}},release:()=>{t||(t=true,w-=o,o=0,e?.(w));}}}function ue(e,o){return e.attributes.find(t=>t.localName===o)?.value}function co(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===la||t.namespaceUri===""))?.value}async function po(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=Ba(e$1);if(!t.ok)return t;let{fonts:n,lastResortFonts:r,fontResolutionTimeoutMs:i,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:l,...d$1}=o,g=Array.isArray(n)?n:[n],u=r===void 0?[]:Array.isArray(r)?r:[r],c,y;try{y=await fo(t.view,g,{signal:o.signal,timeoutMs:i??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,lastResortFonts:u,onFontResolution:E=>(c=E,a?.(E))});}catch(E){if(E instanceof d&&E.code==="aborted")return {ok:false,reason:"aborted"};throw E}if(!c)throw y?.dispose(),new d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=e(t.view,{...d$1,reuseAcrossRevisions:!1,...y?{measurer:y.createMeasurer(),producer:o.producer??y.producer}:o.producer?{producer:o.producer}:{}});}catch(E){throw y?.dispose(),E}if(!b.ok)return y?.dispose(),b;let R=b.session,f=y,h="active",F=()=>h==="aborted"?new d("aborted","Export resource settlement was aborted"):new d("disposed","Export session has been disposed"),x=E=>{if(h==="active"){h=E,o.signal?.removeEventListener("abort",m);try{R.dispose();}finally{f?.dispose(),f=void 0;}}},m=()=>x("aborted");return o.signal?.addEventListener("abort",m,{once:true}),o.signal?.aborted&&m(),{ok:true,session:Object.freeze({fontResolution:c,layout:()=>h==="active"?R.layout():Promise.reject(F()),layoutFor:E=>h==="active"?R.layoutFor(E):Promise.reject(F()),validatedImageBytes:E=>h==="active"?R.validatedImageBytes(E):null,admittedFontFace:gt({status:()=>h,unavailable:F,resolve:()=>f?.resolveFont}),shapeLaidOutText:Ft({status:()=>h,unavailable:F,shaping:()=>f}),dispose:()=>x("disposed")})}}async function fo(e,o$1,t={}){if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let n$1=mo(t.timeoutMs),r=new AbortController,i=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",i,{once:true}),t.signal?.aborted&&i();let s=setTimeout(()=>r.abort(vt),n$1);try{de(r.signal);let a=(async()=>{let p=uo(t.onActiveFontBytesChange),l=!1;try{let d=ho(e).slice(0,c$1),g=x(e,d),u=[],c={dropped:[]},y=Ot(e,c),b=[...o$1,...y?[y]:[],...t.lastResortFonts??[]],R=await o(b,{families:[...new Set([...(t.glyphFallbacks??[]).map(x=>x.family),...g.families])].slice(0,c$1),defaultFamily:d$1.family,signal:r.signal},{onOriginFailure:x=>u.push(x),reserveOwnedBytes:p.reserve,maxExecutionFontBytes:h.maxFontBytes});de(r.signal);let f$1=z$1(f(R??{}),g);if(f$1.sources.length===0){let x=oe(d,f$1.defaultFont.family,u,void 0,c.dropped);ne(x,t),re(x,t,t.glyphFallbacks);return}let h$1=await St(n(f$1),void 0,t.glyphFallbacks,t.documentLigatures);de(r.signal);let F=oe(d,f$1.defaultFont.family,u,h$1.resolveFont,c.dropped);return ne(F,t),re(F,t,t.glyphFallbacks),l=!0,Object.freeze({...h$1,dispose:p.release})}finally{l||p.release();}})();return await Promise.race([a,yo(r.signal)])}finally{clearTimeout(s),t.signal?.removeEventListener("abort",i);}}function mo(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 yo(e){return new Promise((o,t)=>{let n=()=>{t(wt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function wt(e){let o=e.reason===vt;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 wt(e)}function ho(e){let o=[e.part().root],t=[],n=[],r=new Set([e.part().name]),i=(d,g)=>{!g||r.has(g.name)||(r.add(g.name),d.push(g.root));};for(let d of e.headerFooterPartsBySection()){for(let g of d.headers.values())i(t,g);for(let g of d.footers.values())i(t,g);}for(let d of ["footnote","endnote"])n.push(...go(e,d));let s$1=e.documentThemeFonts(),a={...s$1,major:s$1.major,minor:s$1.minor,majorEastAsia:s$1.majorEastAsia??null,minorEastAsia:s$1.minorEastAsia??null},p=new Map,l=(d,g)=>{let u=e$1(d,e.stylesRoot(),a,Fo(d,g)),c=v(d,e.numberingRoot(),e.stylesRoot(),a);for(let y of [...u.direct,...Ro(d),...c,...s(d,e.stylesRoot(),a),...u.inherited]){let b=y.toLowerCase();p.has(b)||p.set(b,y);}};return l(o,"body"),l(t,"furniture"),l(n,"note"),[...p.values()]}function go(e,o){let t=ch(e.currentPackage(),o);if(!t)return [];let n=new Set(dh(e.part()).filter(i=>i.noteKind===o).map(i=>i.noteId)),r=[];for(let i of t.root.children){if(i.kind==="textValue")continue;let s=zc(i),a=yc(i);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&r.push(i);}return r}var xo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Fo(e,o){let t=new Set;for(let n of e){let r=[],i=[{node:n,context:o}];for(;i.length>0;){let{node:s,context:a}=i.pop();s.namespaceUri===la&&s.localName==="p"&&r.push({paragraph:s,context:a});let p=s.namespaceUri===la&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let l=s.children.length-1;l>=0;l-=1){let d=s.children[l];d.kind!=="textValue"&&i.push({node:d,context:p});}}for(let s of r)Eo(s.paragraph,t,s.context);}return t}function Eo(e,o,t){let n=Vb(),r=null,i=null,s="",a=false,p=false,l=false,d=0,g=[];for(let u=e.children.length-1;u>=0;u-=1){let c=e.children[u];c.kind!=="textValue"&&g.push({node:c,runId:null,visibility:D,containerDepth:0});}for(;g.length>0;){let{node:u,runId:c,visibility:y,containerDepth:b}=g.pop();if(b>=wa||u.namespaceUri===la&&u.localName==="p")continue;let R=u.namespaceUri===la&&u.localName==="r"?u.id:c;if(u.namespaceUri===la&&u.localName==="fldSimple"){let f=ue(u,"instr")??"";Yc(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&bo(u)!==D&&o.add(u.id);}if(u.namespaceUri===la&&u.localName==="fldChar"){let f=ue(u,"fldCharType");if(f==="begin")Yb(n),n.nesting===1&&(r=R,i=null,s="",a=false,p=false,l=Bf(u),d=0);else if(f==="separate"){let h=n.nesting===1;if(_b(n),h){let F=Xb(n);s=F.instruction,a=F.overflow||n.nestingOverflow,i=R,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let F=Xb(n);s=F.instruction,a=F.overflow||n.nestingOverflow;}if(!a&&Xc(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&d!==D){let F=i??r;F&&o.add(F);}}$b(n);}continue}if(u.namespaceUri===la&&(u.localName==="instrText"||u.localName==="delInstrText")){Zb(n,Dt(u),u.localName==="delInstrText");continue}n.nesting>0&&ac(n)&&u.namespaceUri===la&&At(u)&&(d|=y);for(let f=u.children.length-1;f>=0;f-=1){let h=u.children[f];h.kind!=="textValue"&&g.push({node:h,runId:R,visibility:y&Pt(u),containerDepth:xa(u,b)});}}Wb(n);}function At(e){return e.localName==="t"||e.localName==="delText"?Dt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ce=1,Tt=2,Lt=4,D=ce|Tt|Lt;function bo(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:D});let t=0;for(;o.length>0;){let{node:n,visibility:r}=o.pop();if(!(n.namespaceUri===la&&n.localName==="p")){if(n.namespaceUri===la&&At(n)&&(t|=r,t===D))return t;for(let i of n.children)i.kind!=="textValue"&&o.push({node:i,visibility:r&Pt(n)});}}return t}function Pt(e){return e.namespaceUri!==la?D:e.localName==="ins"||e.localName==="moveTo"?ce|Tt:e.localName==="del"||e.localName==="moveFrom"?ce|Lt:D}function Ro(e){let o=new Map,t=n=>{let r=b$2(n??void 0);if(r===null)return;let i=r.toLowerCase();o.has(i)||o.set(i,r);};for(let n of e){let r=[n];for(;r.length>0;){let i=r.pop();if(i.namespaceUri===xo&&t($c),i.namespaceUri===la&&i.localName==="sym"&&t(c$3(co(i,"font"))),i.namespaceUri===la&&i.localName==="fldSimple"){let s=ue(i,"instr");t(Wc(s??"")?.font??null);}if(i.namespaceUri===la&&i.localName==="p")for(let s of u(i))t(s);for(let s=i.children.length-1;s>=0;s-=1){let a=i.children[s];a.kind!=="textValue"&&r.push(a);}}}return [...o.values()]}function Dt(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 r=n.children.length-1;r>=0;r-=1)t.push(n.children[r]);}return o}var _t="FILE_TOO_LARGE",kt=8;function So(e){return typeof e=="object"&&e!==null}function Nt(e){if(!(!So(e)||typeof e.code!="string"))return e.code}function Mt(e){return e===""||e.toLowerCase()==="localhost"}function Oo(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ct(e){let o=Oo(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 Ut(e){let o=Ct(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function vo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function wo(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(!Mt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Ut(o.pathname);if(t===null||vo(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Ao(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 To(e){let o=Ao(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>kt)throw new TypeError(`trustedRoot must not exceed ${kt} directories`);return o.map(wo)}function Lo(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 Po(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Mt(e.host))return null;let t=Ct(e.pathname);if(t===null)return null;for(let n of o){let r=Ut(n.pathname);if(r===null||!t.startsWith(r)||t.length<=r.length)continue;let i=new URL("file:///");return i.pathname=t,i}return null}function Do(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 ko(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function It(e,o,t){return e.some(n=>ko(n,o,t))}async function Io(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(r){if(Nt(r)==="ENOENT")continue;throw r}return t}function _o(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:r,realpath:i},{constants:s},{fileURLToPath:a},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(y=>p.resolve(a(y.href))),d=p.resolve(a(typeof o=="string"?o:o.href));if(!It(l,d,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let g=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",u=await r(d,g),c=()=>{u.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let y=await i(d);if(!It(await Io(l,i),y,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let b=(await u.stat()).size;if(!Number.isSafeInteger(b)||b<0||b>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:_t});let R=new Uint8Array(b),f=0;for(;f<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:h}=await u.read(R,f,R.byteLength-f,f);if(h===0)break;f+=h;}if(t?.aborted)throw t.reason;return f===R.byteLength?R:R.slice(0,f)}catch(y){throw t?.aborted?t.reason:y}finally{t?.removeEventListener("abort",c),await u.close().catch(()=>{});}}}function No(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=To(e.trustedRoot),t=Lo(e.maxBytes),n=e.read??_o(o),r=e.networkFetch??fetch;return(async(i,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let p=Do(i);if(p.protocol!=="file:")return r(p,s);let l=Po(p,o);if(!l)return new Response(null,{status:404});let d=a?new AbortController:void 0,g=()=>d?.abort(a?.reason);a?.addEventListener("abort",g,{once:true});let u;try{if(u=await n(l,{maxBytes:t,...d?{signal:d.signal}:{}}),a?.aborted)throw a.reason;if(u.byteLength>t)return new Response(null,{status:413})}catch(c){if(a?.aborted)throw a.reason;if(d?.signal.aborted)throw d.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let y=Nt(c);if(y===_t)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw c}finally{a?.removeEventListener("abort",g);}return new Response(u,{status:200})})}
|
|
2
|
-
export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,
|
|
1
|
+
import {c as c$1,x,o,d as d$1,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-HZ66UCIS.js';import {l,j as j$1,h,i,n,m,s,p,c as c$2,g,da as da$1,ca,fa}from'./chunk-FNNOJNGY.js';import'./chunk-RIYSCEFQ.js';import {d,e}from'./chunk-SUEXVBPR.js';export{d as ExportResourceError,c as createNodeImageDecodePort,b as exportDestinationNamed,e as openDocumentForExport}from'./chunk-SUEXVBPR.js';import {c,ia,a,wa,gd,hd,da,ja,h as h$1,d as d$2,Yc,b as b$1,i as i$1,Xb,_c,_b,ac,Zb,Zc,bc,$b,cc,Yb,r,u as u$1,n as n$1,bd}from'./chunk-4S24UOPG.js';import {e as e$1,c as c$3,b as b$2}from'./chunk-2E2RPEKX.js';import'./chunk-VWIJKH4A.js';import {Ca}from'./chunk-Q5K2GGNG.js';import {lh,mh,zc,yc,b,la,pd,J,lf,wa as wa$1,Ef,xa}from'./chunk-T2QQHG5C.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$2)),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$2?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$2||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 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 i={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$1(i),s=o.get(r);if(!s){try{s=e.fonts.resolve(i);}catch{return null}o.set(r,s);}return s instanceof d$2?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=wa(n.style,n.fontSlot),r=gd(n)?hd(n):da(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$1(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({...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:ja()})}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:${ia}`].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:${ia}`].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=J(t);i.mode==="Internal"&&i.target.ok&&(n=o.parts.get(i.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),lf(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$1(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 d("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===la||t.namespaceUri===""))?.value}async function ho(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:i,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:d$1,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$1,fontShaping:u,lastResortFonts:c,onFontResolution:b=>(h=b,a?.(b))});}catch(b){if(b instanceof d&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!h)throw E?.dispose(),new d("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=e(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 d("aborted","Export resource settlement was aborted"):new d("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$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=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$1.family,signal:r.signal},{onOriginFailure:b=>c.push(b),reserveOwnedBytes:d.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.release})}finally{u||d.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 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 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=e$1(u,e.stylesRoot(),a,So(u,m)),c=v(u,e.numberingRoot(),e.stylesRoot(),a);for(let h of [...l.direct,...wo(u),...c,...s$1(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=lh(e.currentPackage(),o);if(!t)return [];let n=new Set(mh(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=zc(r),a=yc(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===la&&s.localName==="p"&&i.push({paragraph:s,context:a});let p=s.namespaceUri===la&&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=Xb(),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>=wa$1||l.namespaceUri===la&&l.localName==="p")continue;let R=l.namespaceUri===la&&l.localName==="r"?l.id:c;if(l.namespaceUri===la&&l.localName==="fldSimple"){let f=ce(l,"instr")??"";_c(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===la&&l.localName==="fldChar"){let f=ce(l,"fldCharType");if(f==="begin")_b(n),n.nesting===1&&(i=R,r=null,s="",a=false,p=false,d=Ef(l),u=0);else if(f==="separate"){let g=n.nesting===1;if(ac(n),g){let x=Zb(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=Zb(n);s=x.instruction,a=x.overflow||n.nestingOverflow;}if(!a&&Zc(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);}}bc(n);}continue}if(l.namespaceUri===la&&(l.localName==="instrText"||l.localName==="delInstrText")){$b(n,Nt(l),l.localName==="delInstrText");continue}n.nesting>0&&cc(n)&&l.namespaceUri===la&&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:xa(l,E)});}}Yb(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===la&&n.localName==="p")){if(n.namespaceUri===la&&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!==la?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(bd),r.namespaceUri===la&&r.localName==="sym"&&t(c$3(yo(r,"font"))),r.localName==="textpath"&&t(pd(r)),r.namespaceUri===la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(Yc(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 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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as FontFaceRequest, Z as FontConfiguration, a0 as FontSource, a1 as FontSourceSubstitution } from './editor-B2ShlO23.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A partial font configuration one origin contributes: sources, substitutions, or both.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Host-selected execution limits, separate from font admission limits. @public */
|
|
2
|
+
interface FontShapingOptions {
|
|
3
|
+
/** Per-face shaping byte ceiling. Defaults to 16 MiB; the hard ceiling is 64 MiB. */
|
|
4
|
+
readonly maxFontBytes?: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type { FontShapingOptions as F };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HeaderFooterParts,
|
|
2
|
-
import { Q as OoxmlPackage, O as OoxmlPart,
|
|
1
|
+
import { H as HeaderFooterParts, a as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-B8l8DX3Z.js';
|
|
2
|
+
import { Q as OoxmlPackage, O as OoxmlPart, ap as OoxmlElement, as as OoxmlPackageRejection } from './types-barrel-CkF2JbU4.js';
|
|
3
3
|
|
|
4
4
|
/** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
|
|
5
5
|
interface EnsuredHyperlinkRelationship {
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkFDAKJ2SJ_cjs=require('./chunk-FDAKJ2SJ.cjs');require('./chunk-V3N4SOAK.cjs'),require('./chunk-XMJKFURD.cjs');var chunkMOYYRVFV_cjs=require('./chunk-MOYYRVFV.cjs');require('./chunk-5JPIEN54.cjs');var chunkYQWMI6J5_cjs=require('./chunk-YQWMI6J5.cjs');require('./chunk-HC6YNKUI.cjs'),require('./chunk-DBOOTED4.cjs'),require('./chunk-EOTAXOJY.cjs'),require('./chunk-XSTGE3NI.cjs'),require('./chunk-5SO5QDMV.cjs'),require('./chunk-IBRBNT37.cjs'),require('./chunk-243W4WW2.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-6IDOVU6L.cjs'),require('./chunk-WO4V6PNS.cjs'),require('./chunk-UKVVUHZL.cjs');var P=1;var O={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(O)}Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.kb}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.ob}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Pc}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Rc}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Cc}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.g}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.pb}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ea}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ga}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs._b}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.B}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.C}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Nb}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Sc}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.A}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Qc}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Tc}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ma}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ia}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.i}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.h}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.n}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.j}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.k}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.y}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.r}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.q}});exports.DIAGNOSTIC_SCHEMA_VERSION=P;exports.diagnosticCommands=T;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,35 +24,35 @@
|
|
|
24
24
|
* @packageDocumentation
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
|
-
import { x as ExecErrorCode } from './types-barrel-
|
|
28
|
-
export { B as Block, r as ColorValue, C as CommentRecord, m as ContainerRef, s as ContentControl, n as ContentControlFilter, i as ContentControlType, t as DocAnchor, u as DocAnchorRange, q as DocComment, v as DocLocation, o as DocRange, j as DocTarget, w as DocumentBody, D as DocxDocument, W as DocxDocumentJSON, X as DrawingHorizontalReferenceFrame, Y as DrawingKind, Z as DrawingLocks, _ as DrawingPositionInput, $ as DrawingVerticalReferenceFrame, E as ExecResult, l as Extent, a0 as FontDefinition, H as HeaderFooterSet, a1 as ImageWrapTarget, y as IndentFormatting, I as InsertableContentControlType,
|
|
29
|
-
export { F as FieldResultsMode } from './tree-package-store-
|
|
30
|
-
export {
|
|
31
|
-
|
|
27
|
+
import { x as ExecErrorCode } from './types-barrel-CkF2JbU4.js';
|
|
28
|
+
export { B as Block, r as ColorValue, C as CommentRecord, m as ContainerRef, s as ContentControl, n as ContentControlFilter, i as ContentControlType, t as DocAnchor, u as DocAnchorRange, q as DocComment, v as DocLocation, o as DocRange, j as DocTarget, w as DocumentBody, D as DocxDocument, W as DocxDocumentJSON, X as DrawingHorizontalReferenceFrame, Y as DrawingKind, Z as DrawingLocks, _ as DrawingPositionInput, $ as DrawingVerticalReferenceFrame, E as ExecResult, l as Extent, a0 as FontDefinition, H as HeaderFooterSet, a1 as ImageResourceState, a2 as ImageWrapTarget, y as IndentFormatting, I as InsertableContentControlType, a3 as NumberingRef, a4 as PageMargins, P as Paragraph, a5 as ParagraphDisagreements, z as ParagraphFlags, a6 as ParagraphFormatCommand, A as ParagraphTabStop, a7 as Point, a8 as PreservedImageMime, a9 as Rect, aa as RenderableImageMime, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, p as Revision, h as RevisionAddress, ab as RevisionAuthorResult, ac as RevisionBatchResult, F as RevisionType, ad as Run, k as RunFormatting, G as Section, J as SectionProperties, ae as SelectionPin, K as StyleDefinition, S as StyleDefinitions, af as SupportedImageMime, T as Table, ag as TableCell, ah as TableRow, L as Theme, M as ThemeColorScheme, ai as Unsubscribe, aj as ValidatedImageBytesHandle, ak as VectorImageMime, al as Watermark, am as WatermarkLayout, an as WatermarkState } from './types-barrel-CkF2JbU4.js';
|
|
29
|
+
export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-B8l8DX3Z.js';
|
|
30
|
+
export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-C8x3P2J6.js';
|
|
31
|
+
import { b as EditorCommand } from './editor-B2ShlO23.js';
|
|
32
|
+
export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, B as BookmarkPlace, e as BookmarkStory, f as BookmarkSummary, C as CanResult, g as ClearAnchorHighlightOptions, h as CollaborationParticipantsDiagnostic, i as CollaborationStatusDiagnostic, j as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, k as DiagnosticBase, l as DiagnosticFailureDetail, m as DocumentChange, n as DocumentEditingMode, o as DocumentHandle, p as DocumentOpenDiagnostic, q as DocumentOpenFailure, r as DocumentOpenFailureReason, s as DocumentSaveDiagnostic, t as DocumentShape, u as DocumentSource, v as EditRejectedDiagnostic, w as EditRejectionOrigin, x as Editor, y as EditorAnchorNavigation, z as EditorBookmarkCommands, F as EditorCommandShape, G as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, H as EditorError, I as EditorEvents, J as EditorFontError, K as EditorFontErrorCode, L as EditorFormatPainterCommands, M as EditorHeaderFooterCommands, N as EditorHighlights, O as EditorHostChange, P as EditorHostDocument, Q as EditorNoteCommands, S as EditorPosition, T as EditorQueries, U as EditorQuery, V as EditorQueryResults, W as EditorReviewHits, X as EditorSelection, Y as EditorSnapshot, Z as FontConfiguration, _ as FontFaceRequest, $ as FontFailedDiagnostic, a0 as FontSource, a1 as FontSourceSubstitution, a2 as FormatPainterLevel, a3 as FormatPainterMode, a4 as FormatPainterSurfaceState, a5 as FurnitureVariant, a6 as HeaderFooterSlotArgs, a7 as HeaderFooterState, a8 as HighlightHit, a9 as HighlightOptions, aa as HighlightRange, ab as HighlightRect, ac as HighlightResult, ad as HistoryDiagnosticEvent, ae as HyperlinkInfo, af as ImageContext, ag as ImageCropPercent, ah as NoteKind, ai as NotePropertiesSide, aj as NotePropertiesState, ak as PageSetup, al as PerformanceDiagnostic, am as ResolveReviewChangesOptions, an as ResolvedNoteNumbering, ao as ReviewActivationOptions, ap as ReviewChangesAttribution, aq as ReviewCommentPlacement, ar as ReviewCustomPlacement, as as ReviewItemHit, at as ReviewItemPlacement, au as ReviewItemPlacementBase, av as ReviewItemQuery, aw as ReviewItemRevealEvent, ax as ReviewItemRevealSource, ay as ReviewRevisionPlacement, az as ReviewSkippedDiagnostic, aA as ScrollPlacement, aB as ScrollToAnchorOptions, aC as SelectedImageState, aD as SessionActivity, aE as SessionDiagnostic, aF as SetReviewChangesAuthorOptions, aG as TableBorderEdgeTarget, aH as TableBorderSpec, aI as TableBorderStyle, aJ as TableBorderTarget, aK as TableCellVerticalAlignment, aL as TableColumnDividerResizeTarget, aM as TableColumnOccurrenceTarget, aN as TableContext, aO as TableRightEdgeResizeTarget, aP as TableRowOccurrenceTarget, aQ as TextMatch, aR as TimingSummary, aS as TrackedChangeFilterMode, aT as TrackedChangePredicate, aU as ZoomFitTarget, aV as ZoomMode } from './editor-B2ShlO23.js';
|
|
32
33
|
export { CollectReviewItems, EditorModule, ReviewModuleContribution } from './contracts/modules.js';
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export { C as
|
|
38
|
-
export { C as CHROME_GROUPS, a as CHROME_MENUS, b as ChromeExportError, c as ChromeExportFormat, d as ChromeExportHandlers, e as ChromeExportResult, f as ChromeMenu, g as ChromeMenuEntry, h as ChromeMenuId, i as ChromeMenuItemEntry, j as ChromeMenuSeparatorEntry, k as ChromeMenuSubmenuEntry, l as ChromePrintError, m as ChromePrintErrorCode, n as ChromePrintJob, o as ChromePrintOptions, p as ChromeSlotId, q as CustomFontsOptions, r as CustomFontsResolver, D as DocxEditorConfig, s as DocxEditorInstance, F as FontLoadFailure, t as FontLoadFailureReason, u as FontMeasurementState, v as FontUrlSource, H as HistoryGroupBinding, w as HistoryGroupBindingOptions, x as HyperlinkActivation, y as HyperlinkChromeHandlers, L as LoadFontsRequest, z as LoadFontsResult, S as SurfaceHyperlink, T as ToolbarCommandState, A as bindHistoryGroup, B as blankDocumentBytes, E as chromeMenuSlots, G as commandForSlot, I as commandForSlotValue, J as createDocxEditor, K as createFontSource, M as customFonts, N as isChromePrintShortcut, O as loadFonts, P as runChromeExport, Q as runChromePrint, R as runToolbarCommand, U as toolbarCommandState } from './chrome-print-CAs51cpq.js';
|
|
34
|
+
export { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
35
|
+
export { a as ReviewDisplayMode, b as RevisionDisplayMode } from './semantic-records-B-akgRch.js';
|
|
36
|
+
export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-dApRIYpt.js';
|
|
37
|
+
export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-CWh40DYp.js';
|
|
38
|
+
export { B as BookmarkMarkInfo, a as BookmarkMarkOptions, C as CHROME_GROUPS, b as CHROME_MENUS, c as ChromeExportError, d as ChromeExportFormat, e as ChromeExportHandlers, f as ChromeExportResult, g as ChromeMenu, h as ChromeMenuEntry, i as ChromeMenuId, j as ChromeMenuItemEntry, k as ChromeMenuSeparatorEntry, l as ChromeMenuSubmenuEntry, m as ChromePrintError, n as ChromePrintErrorCode, o as ChromePrintJob, p as ChromePrintOptions, q as ChromeSlotId, r as CommentDraftChromeHandlers, s as CustomFontsOptions, t as CustomFontsResolver, D as DocxEditorConfig, u as DocxEditorInstance, F as FontLoadFailure, v as FontLoadFailureReason, w as FontMeasurementState, x as FontUrlSource, G as GoToChromeHandlers, H as HistoryGroupBinding, y as HistoryGroupBindingOptions, z as HyperlinkActivation, A as HyperlinkChromeHandlers, L as LoadFontsRequest, E as LoadFontsResult, I as LockedControlNavigation, S as SurfaceHyperlink, T as ToolbarCommandState, J as bindHistoryGroup, K as blankDocumentBytes, M as chromeMenuSlots, N as commandForSlot, O as commandForSlotValue, P as createDocxEditor, Q as createFontSource, R as customFonts, U as isChromePrintShortcut, V as loadFonts, W as runChromeExport, X as runChromePrint, Y as runToolbarCommand, Z as toolbarCommandState } from './chrome-print-BWvaVEhD.js';
|
|
39
39
|
export { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary } from './contracts/document.js';
|
|
40
|
-
import { E as EditDiagnosticCode } from './diagnostic-hints-
|
|
41
|
-
export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, b as CountBucket, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, f as DocumentOpenDiagnosticCode, a as DocumentPartKind, F as FailureStage,
|
|
42
|
-
export { d as diagnosticCauses } from './diagnostic-context-
|
|
43
|
-
export { a as EditorExecOptions, E as EditorScope, H as HistoryDiagnostic, b as HistoryGroup, c as HistoryGroupOutcome, V as ViewScope } from './editor-scope-
|
|
40
|
+
import { E as EditDiagnosticCode } from './diagnostic-hints-C9JlLz1L.js';
|
|
41
|
+
export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, b as CountBucket, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, f as DocumentOpenDiagnosticCode, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, j as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-C9JlLz1L.js';
|
|
42
|
+
export { d as diagnosticCauses } from './diagnostic-context-DJ0P1uZE.js';
|
|
43
|
+
export { a as EditorExecOptions, E as EditorScope, H as HistoryDiagnostic, b as HistoryGroup, c as HistoryGroupOptions, d as HistoryGroupOutcome, V as ViewScope } from './editor-scope-C7ke1KJG.js';
|
|
44
44
|
export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './contracts/interaction.js';
|
|
45
|
+
import './failure-NS2lsya4.js';
|
|
45
46
|
import './collaboration.js';
|
|
46
47
|
import './collaboration/replication.js';
|
|
47
|
-
import './
|
|
48
|
-
import './
|
|
49
|
-
import './semantic-
|
|
50
|
-
import './
|
|
51
|
-
import './
|
|
52
|
-
import './
|
|
53
|
-
import './
|
|
54
|
-
import './
|
|
55
|
-
import './headless-document-view-pp3q7wIh.js';
|
|
48
|
+
import './omml-equation-BsLAa2lX.js';
|
|
49
|
+
import './semantic-paint-DLzA8sjP.js';
|
|
50
|
+
import './semantic-record-queries-3yp9o11g.js';
|
|
51
|
+
import './note-properties-QsKh24sM.js';
|
|
52
|
+
import './custom-node-writes-TeUvMP13.js';
|
|
53
|
+
import './semantic-cell-selection-Cub9FDa8.js';
|
|
54
|
+
import './tree-session-contract-DeLRqohz.js';
|
|
55
|
+
import './headless-document-view-qOpaCF82.js';
|
|
56
56
|
import 'prosemirror-model';
|
|
57
57
|
|
|
58
58
|
/**
|