@docx-editor.dev/core 2.29.0 → 2.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +18 -13
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +46 -38
  6. package/dist/binding.js +1 -1
  7. package/dist/{chrome-print-CAs51cpq.d.ts → chrome-print-BM3Js-6X.d.ts} +276 -227
  8. package/dist/{chunk-BCXH4BXB.js → chunk-2PV5L5NJ.js} +3 -3
  9. package/dist/chunk-5OTS2EJ7.js +7 -0
  10. package/dist/chunk-5P4223J4.cjs +27 -0
  11. package/dist/{chunk-MM5QBMTE.cjs → chunk-5RRAZMBU.cjs} +1 -1
  12. package/dist/chunk-5SPITS5F.js +18 -0
  13. package/dist/{chunk-236O4YQW.js → chunk-7ATNKARV.js} +1 -1
  14. package/dist/{chunk-6JPL6ZAS.cjs → chunk-BGCUTKWE.cjs} +5 -5
  15. package/dist/chunk-EBCXSH2W.js +3 -0
  16. package/dist/{chunk-JLVBDYVQ.cjs → chunk-ERECKTIR.cjs} +1 -1
  17. package/dist/{chunk-BY2ACZZ6.cjs → chunk-FLBEJC6X.cjs} +1 -1
  18. package/dist/{chunk-W35WTWAO.cjs → chunk-HYASLE2G.cjs} +1 -1
  19. package/dist/chunk-JC47NRJC.cjs +3 -0
  20. package/dist/{chunk-7WQ7AAHW.cjs → chunk-KJRTNY2Q.cjs} +1 -1
  21. package/dist/chunk-NKPUH3QJ.js +1 -0
  22. package/dist/chunk-PF5NJWS3.js +2 -0
  23. package/dist/chunk-PWTRJSES.cjs +18 -0
  24. package/dist/chunk-QFKGI242.cjs +30 -0
  25. package/dist/{chunk-G4HOFIKJ.js → chunk-RJCQGJR7.js} +1 -1
  26. package/dist/chunk-RPPV4S6T.cjs +4 -0
  27. package/dist/{chunk-LSZ6KPKK.js → chunk-T32MGBJS.js} +1 -1
  28. package/dist/chunk-UM26GH5B.js +30 -0
  29. package/dist/chunk-VRCZBFLH.js +27 -0
  30. package/dist/{chunk-UHHYFIDT.cjs → chunk-WF7JZ755.cjs} +1 -1
  31. package/dist/chunk-WK5X2MMA.cjs +7 -0
  32. package/dist/{chunk-RCLZXP3B.js → chunk-WPDD2Y32.js} +1 -1
  33. package/dist/chunk-YBMWBXST.cjs +2 -0
  34. package/dist/{chunk-OMCG63ZF.js → chunk-YZGUBCHP.js} +1 -1
  35. package/dist/chunk-ZOS2PM4A.js +4 -0
  36. package/dist/collaboration/replication.cjs +1 -1
  37. package/dist/collaboration/replication.d.ts +4 -4
  38. package/dist/collaboration/replication.js +1 -1
  39. package/dist/collaboration.d.ts +3 -3
  40. package/dist/contracts/document.d.ts +2 -2
  41. package/dist/contracts/editor.d.ts +8 -8
  42. package/dist/contracts/modules.d.ts +11 -11
  43. package/dist/contracts/types.d.ts +1 -1
  44. package/dist/{custom-node-writes-Bn6uciLb.d.ts → custom-node-writes-0v0Kgw1T.d.ts} +2 -2
  45. package/dist/{diagnostic-context-B8M79cfK.d.ts → diagnostic-context-CcAO4q1s.d.ts} +1 -1
  46. package/dist/{diagnostic-hints-BeVjfNOv.d.ts → diagnostic-hints-2Bke6H_w.d.ts} +11 -4
  47. package/dist/{document-protection-CUb55pl_.d.ts → document-protection-8eyMWIJ0.d.ts} +1 -1
  48. package/dist/{editor-CZQZmTIU.d.ts → editor-DaEJd2so.d.ts} +84 -10
  49. package/dist/editor.cjs +1 -1
  50. package/dist/editor.d.ts +31 -30
  51. package/dist/editor.js +1 -1
  52. package/dist/export.cjs +2 -2
  53. package/dist/export.d.ts +16 -13
  54. package/dist/export.js +2 -2
  55. package/dist/{font-resolver-lSBLirLR.d.ts → font-resolver-CL9BVKZo.d.ts} +1 -1
  56. package/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
  57. package/dist/{headless-document-view-pp3q7wIh.d.ts → headless-document-view-DZQN8Bnx.d.ts} +2 -2
  58. package/dist/{image-resources-tXLQShoC.d.ts → image-resources-Bipz8toD.d.ts} +1 -1
  59. package/dist/index.cjs +1 -1
  60. package/dist/index.d.ts +24 -23
  61. package/dist/index.js +1 -1
  62. package/dist/{layout-shaping-BD-dF_rn.d.ts → layout-shaping-cEnVrhWg.d.ts} +3 -2
  63. package/dist/layout.cjs +1 -1
  64. package/dist/layout.d.ts +41 -38
  65. package/dist/layout.js +1 -1
  66. package/dist/{note-properties-qQUjO1GQ.d.ts → note-properties-9FH8zAeG.d.ts} +1 -1
  67. package/dist/{omml-equation-BUbU0utM.d.ts → omml-equation-DP2WpUbK.d.ts} +13 -1
  68. package/dist/output.cjs +1 -1
  69. package/dist/output.d.ts +7 -7
  70. package/dist/output.js +1 -1
  71. package/dist/{protocol-DYzzz2ej.d.ts → protocol-CZ1uUlPO.d.ts} +2 -2
  72. package/dist/{review-paragraph-order-CN_0l2Cb.d.ts → review-paragraph-order-CqVelc5A.d.ts} +1 -1
  73. package/dist/{semantic-cell-selection-eYag3P47.d.ts → semantic-cell-selection-Dr9yxFZt.d.ts} +2 -2
  74. package/dist/{semantic-interaction-kR_QB845.d.ts → semantic-interaction-Dc3pf3hr.d.ts} +1 -1
  75. package/dist/{semantic-paint-ZayFF3tD.d.ts → semantic-paint-Bz3FBAoH.d.ts} +3 -3
  76. package/dist/{semantic-record-queries-Bsgth6lv.d.ts → semantic-record-queries-Bx0pl6kL.d.ts} +1 -1
  77. package/dist/{semantic-records-DQmumPgL.d.ts → semantic-records-CjcF26ZL.d.ts} +86 -61
  78. package/dist/store.cjs +1 -1
  79. package/dist/store.d.ts +17 -130
  80. package/dist/store.js +1 -1
  81. package/dist/{tree-package-store-CovjNARF.d.ts → tree-package-store-DKhdEVym.d.ts} +158 -4
  82. package/dist/{tree-session-contract-CZVAGl51.d.ts → tree-session-contract-CwnTEVLF.d.ts} +7 -5
  83. package/dist/{types-barrel-DuC5QBNC.d.ts → types-barrel-CA0xB8kH.d.ts} +2 -2
  84. package/package.json +2 -2
  85. package/dist/chunk-6ZQP4HQ7.js +0 -3
  86. package/dist/chunk-CAJEXXVG.cjs +0 -4
  87. package/dist/chunk-CPWLFPWC.js +0 -30
  88. package/dist/chunk-D7ZMDMPX.cjs +0 -3
  89. package/dist/chunk-DOHF6FA7.cjs +0 -30
  90. package/dist/chunk-DVX32P2P.js +0 -27
  91. package/dist/chunk-E4LOMDNL.js +0 -1
  92. package/dist/chunk-EKLM7NWB.cjs +0 -7
  93. package/dist/chunk-G3K63G7P.cjs +0 -27
  94. package/dist/chunk-LQX36Z5P.js +0 -7
  95. package/dist/chunk-OSFOJTHU.cjs +0 -18
  96. package/dist/chunk-T6K2QYNZ.cjs +0 -2
  97. package/dist/chunk-TRGAVV2Y.js +0 -4
  98. package/dist/chunk-U4JZVSOE.js +0 -2
  99. package/dist/chunk-YQ5G6LC7.js +0 -18
package/dist/export.d.ts CHANGED
@@ -7,22 +7,23 @@
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-DQmumPgL.js';
11
- import { P as PreservedImageMime, b as ImageResourceLimits, S as SupportedImageMime, c as ImageDecodePort } from './image-resources-tXLQShoC.js';
12
- import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-pp3q7wIh.js';
13
- import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-BD-dF_rn.js';
14
- import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-lSBLirLR.js';
15
- import './types-barrel-DuC5QBNC.js';
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-CjcF26ZL.js';
11
+ import { P as PreservedImageMime, b as ImageResourceLimits, S as SupportedImageMime, c as ImageDecodePort } from './image-resources-Bipz8toD.js';
12
+ import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-DZQN8Bnx.js';
13
+ import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
14
+ import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-cEnVrhWg.js';
15
+ import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-CL9BVKZo.js';
16
+ import './types-barrel-CA0xB8kH.js';
16
17
  import './editor-scope-7o9xweiJ.js';
17
- import './omml-equation-BUbU0utM.js';
18
- import './tree-package-store-CovjNARF.js';
19
- import './editor-CZQZmTIU.js';
18
+ import './omml-equation-DP2WpUbK.js';
19
+ import './tree-package-store-DKhdEVym.js';
20
+ import './editor-DaEJd2so.js';
20
21
  import './contracts/document.js';
21
22
  import './contracts/interaction.js';
22
- import './semantic-interaction-kR_QB845.js';
23
- import './document-protection-CUb55pl_.js';
23
+ import './semantic-interaction-Dc3pf3hr.js';
24
+ import './document-protection-8eyMWIJ0.js';
24
25
  import './failure-NS2lsya4.js';
25
- import './diagnostic-hints-BeVjfNOv.js';
26
+ import './diagnostic-hints-2Bke6H_w.js';
26
27
 
27
28
  /** Source content that cannot be certified by the layout snapshot. @public */
28
29
  interface ExportContentWarning {
@@ -305,7 +306,7 @@ declare const MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS = 32;
305
306
  * sessions retain only their own layout caches and remain independently disposable.
306
307
  * @public
307
308
  */
308
- declare function acquireSharedExportShaping(prepared: PreparedLayoutFontConfiguration, instrumentation?: LayoutShapingInstrumentation): Promise<SharedExportShapingCapabilities>;
309
+ declare function acquireSharedExportShaping(prepared: PreparedLayoutFontConfiguration, instrumentation?: LayoutShapingInstrumentation, execution?: FontShapingOptions): Promise<SharedExportShapingCapabilities>;
309
310
 
310
311
  /** Export session retaining the exact font evidence used to construct its measurer. @public */
311
312
  interface FontBackedExportSession extends ExportSession {
@@ -326,6 +327,8 @@ type OpenFontBackedDocumentForExportResult = {
326
327
  }>;
327
328
  /** Font-backed one-shot session options shared by Markdown and future exporters. @public */
328
329
  interface OpenFontBackedDocumentForExportOptions extends Omit<OpenDocumentForExportOptions, 'measurer' | 'reuseAcrossRevisions'> {
330
+ /** Explicit per-face shaping execution ceiling; defaults to 16 MiB. */
331
+ readonly fontShaping?: FontShapingOptions;
329
332
  /** Apply document optional ligatures to both layout measurement and exported glyphs. */
330
333
  readonly documentLigatures?: boolean;
331
334
  /** 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,ro as acquireSharedExportShaping,No as createPackagedFileFetch,te as hasExportAdmittedFont,ie as hasExportLaidOutText,lo as hasFontBackedExportCapabilities,po as openFontBackedDocumentForExport};
1
+ import {c as c$1,x,o,d as d$1,z as z$1,f,v,s as s$1,j as j$2,C as C$1,m as m$1,u,l as l$1}from'./chunk-7ATNKARV.js';import {l,j as j$1,h,i,n,m,s,p,c as c$2,g,$,_,ba as ba$1}from'./chunk-EBCXSH2W.js';import'./chunk-RIYSCEFQ.js';import {d,e}from'./chunk-NKPUH3QJ.js';export{d as ExportResourceError,c as createNodeImageDecodePort,b as exportDestinationNamed,e as openDocumentForExport}from'./chunk-NKPUH3QJ.js';import {c,ga,a,ua,ed,fd,ba,ha,h as h$1,d as d$2,Wc,b as b$1,i as i$1,Vb,Yc,Yb,_b,Xb,Xc,$b,Zb,ac,Wb,p as p$1,s as s$2,n as n$1,$c}from'./chunk-UM26GH5B.js';import {e as e$1,c as c$3,b as b$2}from'./chunk-RJCQGJR7.js';import'./chunk-T32MGBJS.js';import {Ca}from'./chunk-PF5NJWS3.js';import {ch,dh,zc,yc,b,la,J,if as _if,wa,Bf,xa}from'./chunk-5SPITS5F.js';function M(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,c)=>d.id!==a.glyphs[c]?.id))return t;let r=[],s=0;for(let d of o.text){let c=d.toUpperCase()!==d,y=r.at(-1);y&&(y.lower===c||/\p{M}/u.test(d))?y.text+=d:r.push({text:d,start:s,lower:c}),s+=d.length;}let i=[],p=[],l=[],u=true,h=0;for(let d of o.environment.direction==="rtl"?r.reverse():r){let c=d.lower?.8:1,y=[],E=[],b="",f=d.start;for(let F of d.text){let m=d.lower?F.toUpperCase():F;for(let S=0;S<m.length;S++)y.push(f),E.push(f+F.length);b+=m,f+=F.length;}let g=e.shape({...n,text:b}),x=i.length;for(let[F,m]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:l.push(S*c),i.push({...m,cluster:y[m.cluster]??d.start,originX:n$1(h+Math.round(m.originX*c)),originY:n$1(Math.round(m.originY*c)),offsetX:n$1(Math.round(m.offsetX*c)),offsetY:n$1(Math.round(m.offsetY*c)),advanceX:n$1(Math.round(m.advanceX*c)),advanceY:n$1(Math.round(m.advanceY*c)),drawScale:c});}for(let F of g.clusters){let m=y[F.textStart]??d.start,S=E[F.textEnd-1]??f,R=n$1(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===m&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:n$1(T.advance+R),caretEdges:[n$1(0),n$1(T.advance+R)]}:p.push({...F,textStart:m,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:R,caretEdges:F.caretEdges.map(V=>n$1(Math.round(V*c))),fontSpan:0});}h+=g.glyphs.reduce((F,m)=>F+Math.round(m.advanceX*c),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var ut=new WeakMap;function Ht(e){let o=ut.get(e);return o===void 0&&(o=Vt(e.bytes,e.faceIndex),ut.set(e,o)),o}var Xt=new Set(["COLR","CBDT","sbix"]),Gt=512;function Vt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(pt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Gt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Xt.has(pt(e,s)))return true}return false}function pt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var Wt=/\p{Emoji_Presentation}|️/u;function Yt(e){return Wt.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Ht);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return Yt(o)?[...t,...n]:[...n,...t]}var $t=2048;function ft(e,o,t,n){if(!t.clusters.length||t.clusters.length>$t)return null;let a=(f,g)=>{let{context:x,...F}=o,m={...F,text:g,environment:p$1({...o.environment,font:f})};return M(e,m,e.shape(m))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),R=s.get(x)??z(n,S).find(T=>{try{return !a(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!R)return null;s.set(x,R),g=R;}let m=r.at(-1);m&&m.font===g&&m.end===f.textStart?m.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let i=[],p=[],l=[],u=[],h=true,d=0,c=0,y=0,E=0,b=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=a(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(m=>m.id===0))return null;let x=i.length,F=l.length;for(let m of g.glyphs)i.push({...m,cluster:f.start+m.cluster,originX:n$1(d+m.originX),originY:n$1(c+m.originY)});if(g.exactAdvancesX===void 0)h=false;else for(let m of g.exactAdvancesX)u.push(m);for(let m of g.clusters)p.push({...m,textStart:f.start+m.textStart,textEnd:f.start+m.textEnd,glyphStart:x+m.glyphStart,glyphEnd:x+m.glyphEnd,fontSpan:F});g.glyphs.length&&l.push({font:f.font,glyphStart:x,glyphEnd:i.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),d+=g.glyphs.reduce((m,S)=>m+S.advanceX,0),c+=g.glyphs.reduce((m,S)=>m+S.advanceY,0),y=Math.max(y,g.metrics.ascent),E=Math.max(E,g.metrics.descent),b=Math.max(b,g.metrics.lineGap);}return s$2({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:h&&u.length===i.length?u:void 0,metrics:{ascent:n$1(y),descent:n$1(E),lineGap:n$1(b)}},{...o.environment,fallbackOrder:n})}var Kt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Zt=512,mt=new WeakMap;function Jt(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",i=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let c=0;c<p;c+=1){let y=i+12+c*16;if(s(y)==="GSUB"){l=r(y+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let h=l+u,d=a(h);if(d<0)return t;for(let c=0;c<Math.min(d,Zt);c+=1){let y=s(h+2+c*6);y&&t.add(y);}return t}function Qt(e,o){let t=mt.get(e);return t||(t=Jt(e.bytes,e.faceIndex),mt.set(e,t)),(Kt.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function yt(e,o){let t=e.filter(n=>Qt(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return s$2({...r,text:o.text},o.environment)}catch{return t}}function ht(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof d$2)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=M(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)){let u=ft(n,i,l,t);if(u)return u}for(let u of yt(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let h={...i,environment:p$1({...i.environment,font:u})},d=M(n,h,n.shape(h));if(!d.glyphs.some(c=>c.id===0))return d}catch{}return l};return {...e,shaper:r}}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var eo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var gt=new WeakMap;function H(e){let o=gt.get(e);return o||gt.set(e,o=to(e)),o}function to(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function oo(e){return Object.freeze({...H(e),bytes:i$1(e)})}function no(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$2?null:oo(t)}catch{return null}}function xt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return no(e.resolve(),o)}}function ro(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[]){let r=new Map;for(let i of [...e,o]){let p=i.toLowerCase();r.has(p)||r.set(p,i);}let s=[...r.values()].map(i=>{let p=[];for(let l of eo){let u=n?.({family:i,...l});!u||u instanceof d$2||p.push(Object.freeze({...l,sourceFamily:u.family,via:u.substitution?"substitution":"direct",identity:u.identity,id:u.id,hash:u.hash,faceIndex:u.faceIndex,substitution:u.substitution}));}return Object.freeze({family:i,coverage:p.length===4?"complete":p.length>0?"partial":"none",faces:Object.freeze(p)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(s),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ro(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof l$1))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof m$1?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$1(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$2?null:s}function Ft(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function io(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let a=ua(n.style,n.fontSlot),r=ed(n)?fd(n):ba(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=G(e,o,s,a)??(b(s)&&io(r)?G(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!$(e.shaper,e.environment,i,a,t))return null;let p=_(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>H(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var N=new Map,bt=new WeakMap,se=0,C;var le=32,Rt=c;function St(){if(C)return C;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function Ot(e){let o=X();return ba$1(e,{resolveFont(t){return Ft(e,o,t)},fallback:ha()})}async function vt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j$1(a,h),s$1=await St(),i=ht(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>Ot(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${ga}`].join("|"),extensionFingerprint:e.fingerprint})}function ao(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j$1(t,h),a=i(n$1),r=bt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=N.get(i$1);if(!p){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let d=m(e).sources.reduce((y,E)=>y+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+d>Rt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Rt} process-wide`);se+=d;let c;try{let y=await St();c=await s(e,y,n$1,o);}catch(y){throw se-=d,y}return Object.freeze({createMeasurer:()=>Ot(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),N.set(i$1,p),p.catch(()=>{N.get(i$1)===p&&N.delete(i$1);});}let l$1=e.fingerprint,u=p.then(h=>Object.freeze({createMeasurer:h.createMeasurer,shapeLaidOutText:h.shapeLaidOutText,producer:["node-export",l$1,h.shapingHash,`producer:${h.producerVersion}`,`fallback:${ga}`].join("|"),extensionFingerprint:l$1}));return r||bt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var so="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function lo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===so),n;if(t){let a=J(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),_if(o,n)}function wt(e,o){let t=lo(e);if(t.length!==0)return j$2(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$1(s))),r=C$1(t,{maxFontBytes:a,aggregateBudget:co(n),shadowedRequests:a$1});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function co(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function uo(e){return te(e)&&ie(e)}var A=0,At=Symbol("font-resolution-timeout");function po(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>c)throw new d("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function fo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===la||t.namespaceUri===""))?.value}async function mo(e$1,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=Ca(e$1);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...h}=o,d$1=Array.isArray(n)?n:[n],c=a===void 0?[]:Array.isArray(a)?a:[a],y,E;try{E=await yo(t.view,d$1,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:c,onFontResolution:R=>(y=R,i?.(R))});}catch(R){if(R instanceof d&&R.code==="aborted")return {ok:false,reason:"aborted"};throw R}if(!y)throw E?.dispose(),new d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=e(t.view,{...h,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(R){throw E?.dispose(),R}if(!b.ok)return E?.dispose(),b;let f=b.session,g=E,x="active",F=()=>x==="aborted"?new d("aborted","Export resource settlement was aborted"):new d("disposed","Export session has been disposed"),m=R=>{if(x==="active"){x=R,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>m("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:y,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:R=>x==="active"?f.layoutFor(R):Promise.reject(F()),validatedImageBytes:R=>x==="active"?f.validatedImageBytes(R):null,admittedFontFace:xt({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Et({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>m("disposed")})}}async function yo(e,o$1,t={}){let n=j$1(t.fontShaping,h);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=ho(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(At),a);try{de(r.signal);let p$1=(async()=>{let l=po(t.onActiveFontBytesChange),u=!1;try{let h=xo(e).slice(0,c$1),d=x(e,h),c=[],y={dropped:[]},E=wt(e,y),b=[...o$1,...E?[E]:[],...t.lastResortFonts??[]],f$1=await o(b,{families:[...new Set([...(t.glyphFallbacks??[]).map(m=>m.family),...d.families])].slice(0,c$1),defaultFamily:d$1.family,signal:r.signal},{onOriginFailure:m=>c.push(m),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=z$1(f(f$1??{}),d);if(g.sources.length===0){let m=oe(h,g.defaultFont.family,c,void 0,y.dropped);ne(m,t),re(m,t,t.glyphFallbacks);return}let x$1=await vt(p(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let F=oe(h,g.defaultFont.family,c,x$1.resolveFont,y.dropped);return ne(F,t),re(F,t,t.glyphFallbacks),u=!0,Object.freeze({...x$1,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,go(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function ho(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function go(e){return new Promise((o,t)=>{let n=()=>{t(Tt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Tt(e){let o=e.reason===At;return new d(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Tt(e)}function xo(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,h)=>{!h||a.has(h.name)||(a.add(h.name),u.push(h.root));};for(let u of e.headerFooterPartsBySection()){for(let h of u.headers.values())r(t,h);for(let h of u.footers.values())r(t,h);}for(let u of ["footnote","endnote"])n.push(...Fo(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,h)=>{let d=e$1(u,e.stylesRoot(),i,bo(u,h)),c=v(u,e.numberingRoot(),e.stylesRoot(),i);for(let y of [...d.direct,...Oo(u),...c,...s$1(u,e.stylesRoot(),i),...d.inherited]){let E=y.toLowerCase();p.has(E)||p.set(E,y);}};return l(o,"body"),l(t,"furniture"),l(n,"note"),[...p.values()]}function Fo(e,o){let t=ch(e.currentPackage(),o);if(!t)return [];let n=new Set(dh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=zc(r),i=yc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Eo="http://schemas.openxmlformats.org/officeDocument/2006/math";function bo(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===la&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===la&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Ro(s.paragraph,t,s.context);}return t}function Ro(e,o,t){let n=Vb(),a=null,r=null,s="",i=false,p=false,l=false,u=0,h=[];for(let d=e.children.length-1;d>=0;d-=1){let c=e.children[d];c.kind!=="textValue"&&h.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;h.length>0;){let{node:d,runId:c,visibility:y,containerDepth:E}=h.pop();if(E>=wa||d.namespaceUri===la&&d.localName==="p")continue;let b=d.namespaceUri===la&&d.localName==="r"?d.id:c;if(d.namespaceUri===la&&d.localName==="fldSimple"){let f=ce(d,"instr")??"";Yc(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&So(d)!==k&&o.add(d.id);}if(d.namespaceUri===la&&d.localName==="fldChar"){let f=ce(d,"fldCharType");if(f==="begin")Yb(n),n.nesting===1&&(a=b,r=null,s="",i=false,p=false,l=Bf(d),u=0);else if(f==="separate"){let g=n.nesting===1;if(_b(n),g){let x=Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow,r=b,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow;}if(!i&&Xc(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??a;x&&o.add(x);}}$b(n);}continue}if(d.namespaceUri===la&&(d.localName==="instrText"||d.localName==="delInstrText")){Zb(n,It(d),d.localName==="delInstrText");continue}n.nesting>0&&ac(n)&&d.namespaceUri===la&&Lt(d)&&(u|=y);for(let f=d.children.length-1;f>=0;f-=1){let g=d.children[f];g.kind!=="textValue"&&h.push({node:g,runId:b,visibility:y&kt(d),containerDepth:xa(d,E)});}}Wb(n);}function Lt(e){return e.localName==="t"||e.localName==="delText"?It(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,Pt=2,Dt=4,k=ue|Pt|Dt;function So(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===la&&n.localName==="p")){if(n.namespaceUri===la&&Lt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&kt(n)});}}return t}function kt(e){return e.namespaceUri!==la?k:e.localName==="ins"||e.localName==="moveTo"?ue|Pt:e.localName==="del"||e.localName==="moveFrom"?ue|Dt:k}function Oo(e){let o=new Map,t=n=>{let a=b$2(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Eo&&t($c),r.namespaceUri===la&&r.localName==="sym"&&t(c$3(fo(r,"font"))),r.namespaceUri===la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(Wc(s??"")?.font??null);}if(r.namespaceUri===la&&r.localName==="p")for(let s of u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function It(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var Nt="FILE_TOO_LARGE",_t=8;function vo(e){return typeof e=="object"&&e!==null}function Ct(e){if(!(!vo(e)||typeof e.code!="string"))return e.code}function Ut(e){return e===""||e.toLowerCase()==="localhost"}function wo(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Bt(e){let o=wo(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function qt(e){let o=Bt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Ao(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function To(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!Ut(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=qt(o.pathname);if(t===null||Ao(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Lo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Po(e){let o=Lo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>_t)throw new TypeError(`trustedRoot must not exceed ${_t} directories`);return o.map(To)}function Do(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function ko(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Ut(e.host))return null;let t=Bt(e.pathname);if(t===null)return null;for(let n of o){let a=qt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function Io(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function _o(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Mt(e,o,t){return e.some(n=>_o(n,o,t))}async function Mo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(Ct(a)==="ENOENT")continue;throw a}return t}function No(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(y=>p.resolve(i(y.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Mt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let h=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",d=await a(u,h),c=()=>{d.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let y=await r(u);if(!Mt(await Mo(l,r),y,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await d.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Nt});let b=new Uint8Array(E),f=0;for(;f<b.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await d.read(b,f,b.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===b.byteLength?b:b.slice(0,f)}catch(y){throw t?.aborted?t.reason:y}finally{t?.removeEventListener("abort",c),await d.close().catch(()=>{});}}}function Co(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Po(e.trustedRoot),t=Do(e.maxBytes),n=e.read??No(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=Io(r);if(p.protocol!=="file:")return a(p,s);let l=ko(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,h=()=>u?.abort(i?.reason);i?.addEventListener("abort",h,{once:true});let d;try{if(d=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(d.byteLength>t)return new Response(null,{status:413})}catch(c){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let y=Ct(c);if(y===Nt)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw c}finally{i?.removeEventListener("abort",h);}return new Response(d,{status:200})})}
2
+ export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,ao as acquireSharedExportShaping,Co as createPackagedFileFetch,te as hasExportAdmittedFont,ie as hasExportLaidOutText,uo as hasFontBackedExportCapabilities,mo as openFontBackedDocumentForExport};
@@ -1,4 +1,4 @@
1
- import { Q as FontFaceRequest, P as FontConfiguration, T as FontSource, U as FontSourceSubstitution } from './editor-CZQZmTIU.js';
1
+ import { S as FontFaceRequest, Q as FontConfiguration, U as FontSource, V as FontSourceSubstitution } from './editor-DaEJd2so.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, b as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-CovjNARF.js';
2
- import { Q as OoxmlPackage, O as OoxmlPart, ak as OoxmlElement, aj as OoxmlPackageRejection } from './types-barrel-DuC5QBNC.js';
1
+ import { H as HeaderFooterParts, a as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-DKhdEVym.js';
2
+ import { Q as OoxmlPackage, O as OoxmlPart, ah as OoxmlElement, ak as OoxmlPackageRejection } from './types-barrel-CA0xB8kH.js';
3
3
 
4
4
  /** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
5
5
  interface EnsuredHyperlinkRelationship {
@@ -1,4 +1,4 @@
1
- import { an as DrawingProjection, Q as OoxmlPackage } from './types-barrel-DuC5QBNC.js';
1
+ import { al as DrawingProjection, Q as OoxmlPackage } from './types-barrel-CA0xB8kH.js';
2
2
 
3
3
  /** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
4
4
  interface ValidatedImageBytesHandle {
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkG3K63G7P_cjs=require('./chunk-G3K63G7P.cjs');require('./chunk-V3N4SOAK.cjs'),require('./chunk-CAJEXXVG.cjs');var chunkJLVBDYVQ_cjs=require('./chunk-JLVBDYVQ.cjs');require('./chunk-D7ZMDMPX.cjs');var chunkEKLM7NWB_cjs=require('./chunk-EKLM7NWB.cjs');require('./chunk-W35WTWAO.cjs'),require('./chunk-DOHF6FA7.cjs'),require('./chunk-6JPL6ZAS.cjs'),require('./chunk-BY2ACZZ6.cjs'),require('./chunk-7WQ7AAHW.cjs'),require('./chunk-MM5QBMTE.cjs'),require('./chunk-T6K2QYNZ.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-UHHYFIDT.cjs'),require('./chunk-OSFOJTHU.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,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak: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,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,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 chunkG3K63G7P_cjs.Ta}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.Xa}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.qc}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.sc}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.gc}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.g}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.Ya}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.ma}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.oa}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.Eb}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.l}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.m}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.tb}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.tc}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.k}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.rc}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.uc}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.ua}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkG3K63G7P_cjs.qa}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.i}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.h}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.n}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.j}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkJLVBDYVQ_cjs.k}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.x}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.q}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.p}});exports.DIAGNOSTIC_SCHEMA_VERSION=P;exports.diagnosticCommands=T;
1
+ 'use strict';var chunk5P4223J4_cjs=require('./chunk-5P4223J4.cjs');require('./chunk-V3N4SOAK.cjs'),require('./chunk-RPPV4S6T.cjs');var chunkERECKTIR_cjs=require('./chunk-ERECKTIR.cjs');require('./chunk-JC47NRJC.cjs');var chunkWK5X2MMA_cjs=require('./chunk-WK5X2MMA.cjs');require('./chunk-HYASLE2G.cjs'),require('./chunk-QFKGI242.cjs'),require('./chunk-BGCUTKWE.cjs'),require('./chunk-FLBEJC6X.cjs'),require('./chunk-KJRTNY2Q.cjs'),require('./chunk-5RRAZMBU.cjs'),require('./chunk-YBMWBXST.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-WF7JZ755.cjs'),require('./chunk-PWTRJSES.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,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak: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,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,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 chunk5P4223J4_cjs.Ta}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunk5P4223J4_cjs.Xa}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunk5P4223J4_cjs.qc}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunk5P4223J4_cjs.sc}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunk5P4223J4_cjs.gc}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunk5P4223J4_cjs.g}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunk5P4223J4_cjs.Ya}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunk5P4223J4_cjs.ma}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunk5P4223J4_cjs.oa}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunk5P4223J4_cjs.Eb}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunk5P4223J4_cjs.l}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunk5P4223J4_cjs.m}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunk5P4223J4_cjs.tb}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunk5P4223J4_cjs.tc}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunk5P4223J4_cjs.k}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunk5P4223J4_cjs.rc}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunk5P4223J4_cjs.uc}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunk5P4223J4_cjs.ua}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunk5P4223J4_cjs.qa}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkERECKTIR_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkERECKTIR_cjs.i}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkERECKTIR_cjs.h}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkERECKTIR_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkERECKTIR_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkERECKTIR_cjs.n}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkERECKTIR_cjs.j}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkERECKTIR_cjs.k}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkWK5X2MMA_cjs.x}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkWK5X2MMA_cjs.q}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkWK5X2MMA_cjs.p}});exports.DIAGNOSTIC_SCHEMA_VERSION=P;exports.diagnosticCommands=T;
package/dist/index.d.ts CHANGED
@@ -24,35 +24,36 @@
24
24
  * @packageDocumentation
25
25
  * @public
26
26
  */
27
- import { x as ExecErrorCode } from './types-barrel-DuC5QBNC.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 ImageWrapTarget, y as IndentFormatting, I as InsertableContentControlType, a2 as NumberingRef, a3 as PageMargins, P as Paragraph, a4 as ParagraphDisagreements, z as ParagraphFlags, a5 as ParagraphFormatCommand, A as ParagraphTabStop, a6 as Point, a7 as Rect, 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, a8 as RevisionAuthorResult, a9 as RevisionBatchResult, F as RevisionType, aa as Run, k as RunFormatting, G as Section, J as SectionProperties, ab as SelectionPin, K as StyleDefinition, S as StyleDefinitions, T as Table, ac as TableCell, ad as TableRow, L as Theme, M as ThemeColorScheme, ae as Unsubscribe, af as Watermark } from './types-barrel-DuC5QBNC.js';
29
- export { F as FieldResultsMode } from './tree-package-store-CovjNARF.js';
30
- export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from './image-resources-tXLQShoC.js';
31
- export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-CUb55pl_.js';
27
+ import { x as ExecErrorCode } from './types-barrel-CA0xB8kH.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 ImageWrapTarget, y as IndentFormatting, I as InsertableContentControlType, a2 as NumberingRef, a3 as PageMargins, P as Paragraph, a4 as ParagraphDisagreements, z as ParagraphFlags, a5 as ParagraphFormatCommand, A as ParagraphTabStop, a6 as Point, a7 as Rect, 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, a8 as RevisionAuthorResult, a9 as RevisionBatchResult, F as RevisionType, aa as Run, k as RunFormatting, G as Section, J as SectionProperties, ab as SelectionPin, K as StyleDefinition, S as StyleDefinitions, T as Table, ac as TableCell, ad as TableRow, L as Theme, M as ThemeColorScheme, ae as Unsubscribe, af as Watermark } from './types-barrel-CA0xB8kH.js';
29
+ export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-DKhdEVym.js';
30
+ export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from './image-resources-Bipz8toD.js';
31
+ export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-8eyMWIJ0.js';
32
+ import { b as EditorCommand } from './editor-DaEJd2so.js';
33
+ export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, C as CanResult, e as ClearAnchorHighlightOptions, f as CollaborationParticipantsDiagnostic, g as CollaborationStatusDiagnostic, h as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, i as DiagnosticBase, j as DiagnosticFailureDetail, k as DocumentChange, l as DocumentEditingMode, m as DocumentHandle, n as DocumentOpenDiagnostic, o as DocumentSaveDiagnostic, p as DocumentShape, q as DocumentSource, r as EditRejectedDiagnostic, s as EditRejectionOrigin, t as Editor, u as EditorAnchorNavigation, v as EditorCommandShape, w as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, x as EditorError, y as EditorEvents, z as EditorFontError, B as EditorFontErrorCode, F as EditorFormatPainterCommands, G as EditorHeaderFooterCommands, H as EditorHighlights, I as EditorNoteCommands, J as EditorPosition, K as EditorQueries, L as EditorQuery, M as EditorQueryResults, N as EditorReviewHits, O as EditorSelection, P as EditorSnapshot, Q as FontConfiguration, S as FontFaceRequest, T as FontFailedDiagnostic, U as FontSource, V as FontSourceSubstitution, W as FormatPainterLevel, X as FormatPainterMode, Y as FormatPainterSurfaceState, Z as FurnitureVariant, _ as HeaderFooterSlotArgs, $ as HeaderFooterState, a0 as HighlightHit, a1 as HighlightOptions, a2 as HighlightRange, a3 as HighlightRect, a4 as HighlightResult, a5 as HistoryDiagnosticEvent, a6 as HyperlinkInfo, a7 as ImageContext, a8 as ImageCropPercent, a9 as NoteKind, aa as NotePropertiesSide, ab as NotePropertiesState, ac as PageSetup, ad as PerformanceDiagnostic, ae as ResolveReviewChangesOptions, af as ResolvedNoteNumbering, ag as ReviewActivationOptions, ah as ReviewChangesAttribution, ai as ReviewCommentPlacement, aj as ReviewCustomPlacement, ak as ReviewItemHit, al as ReviewItemPlacement, am as ReviewItemPlacementBase, an as ReviewItemQuery, ao as ReviewItemRevealEvent, ap as ReviewItemRevealSource, aq as ReviewRevisionPlacement, ar as ReviewSkippedDiagnostic, as as ScrollPlacement, at as ScrollToAnchorOptions, au as SelectedImageState, av as SessionActivity, aw as SessionDiagnostic, ax as SetReviewChangesAuthorOptions, ay as TableBorderEdgeTarget, az as TableBorderSpec, aA as TableBorderStyle, aB as TableBorderTarget, aC as TableCellVerticalAlignment, aD as TableColumnDividerResizeTarget, aE as TableColumnOccurrenceTarget, aF as TableContext, aG as TableRightEdgeResizeTarget, aH as TableRowOccurrenceTarget, aI as TextMatch, aJ as TimingSummary, aK as TrackedChangeFilterMode, aL as TrackedChangePredicate, aM as ZoomFitTarget, aN as ZoomMode } from './editor-DaEJd2so.js';
32
34
  export { CollectReviewItems, EditorModule, ReviewModuleContribution } from './contracts/modules.js';
33
- import { b as EditorCommand } from './editor-CZQZmTIU.js';
34
- export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, C as CanResult, e as ClearAnchorHighlightOptions, f as CollaborationParticipantsDiagnostic, g as CollaborationStatusDiagnostic, h as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, i as DiagnosticBase, j as DiagnosticFailureDetail, k as DocumentChange, l as DocumentEditingMode, m as DocumentHandle, n as DocumentOpenDiagnostic, o as DocumentShape, p as DocumentSource, q as EditRejectedDiagnostic, r as EditRejectionOrigin, s as Editor, t as EditorAnchorNavigation, u as EditorCommandShape, v as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, w as EditorError, x as EditorEvents, y as EditorFontError, z as EditorFontErrorCode, B as EditorFormatPainterCommands, F as EditorHeaderFooterCommands, G as EditorHighlights, H as EditorNoteCommands, I as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorReviewHits, N as EditorSelection, O as EditorSnapshot, P as FontConfiguration, Q as FontFaceRequest, S as FontFailedDiagnostic, T as FontSource, U as FontSourceSubstitution, V as FormatPainterLevel, W as FormatPainterMode, X as FormatPainterSurfaceState, Y as FurnitureVariant, Z as HeaderFooterSlotArgs, _ as HeaderFooterState, $ as HighlightHit, a0 as HighlightOptions, a1 as HighlightRange, a2 as HighlightRect, a3 as HighlightResult, a4 as HistoryDiagnosticEvent, a5 as HyperlinkInfo, a6 as ImageContext, a7 as ImageCropPercent, a8 as NoteKind, a9 as NotePropertiesSide, aa as NotePropertiesState, ab as PageSetup, ac as PerformanceDiagnostic, ad as ResolveReviewChangesOptions, ae as ResolvedNoteNumbering, af as ReviewActivationOptions, ag as ReviewChangesAttribution, ah as ReviewCommentPlacement, ai as ReviewCustomPlacement, aj as ReviewItemHit, ak as ReviewItemPlacement, al as ReviewItemPlacementBase, am as ReviewItemQuery, an as ReviewItemRevealEvent, ao as ReviewItemRevealSource, ap as ReviewRevisionPlacement, aq as ReviewSkippedDiagnostic, ar as ScrollPlacement, as as ScrollToAnchorOptions, at as SelectedImageState, au as SetReviewChangesAuthorOptions, av as TableBorderEdgeTarget, aw as TableBorderSpec, ax as TableBorderStyle, ay as TableBorderTarget, az as TableCellVerticalAlignment, aA as TableColumnDividerResizeTarget, aB as TableColumnOccurrenceTarget, aC as TableContext, aD as TableRightEdgeResizeTarget, aE as TableRowOccurrenceTarget, aF as TextMatch, aG as TimingSummary, aH as TrackedChangeFilterMode, aI as TrackedChangePredicate, aJ as ZoomFitTarget, aK as ZoomMode } from './editor-CZQZmTIU.js';
35
- export { a as ReviewDisplayMode, b as RevisionDisplayMode } from './semantic-records-DQmumPgL.js';
36
- export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-kR_QB845.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-lSBLirLR.js';
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';
35
+ export { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
36
+ export { a as ReviewDisplayMode, b as RevisionDisplayMode } from './semantic-records-CjcF26ZL.js';
37
+ export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-Dc3pf3hr.js';
38
+ 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-CL9BVKZo.js';
39
+ 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, A as LockedControlNavigation, S as SurfaceHyperlink, T as ToolbarCommandState, B as bindHistoryGroup, E as blankDocumentBytes, G as chromeMenuSlots, I as commandForSlot, J as commandForSlotValue, K as createDocxEditor, M as createFontSource, N as customFonts, O as isChromePrintShortcut, P as loadFonts, Q as runChromeExport, R as runChromePrint, U as runToolbarCommand, V as toolbarCommandState } from './chrome-print-BM3Js-6X.js';
39
40
  export { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary } from './contracts/document.js';
40
- import { E as EditDiagnosticCode } from './diagnostic-hints-BeVjfNOv.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, F as FailureStage, g as FontDiagnosticCode, h as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, i as ReviewDiagnosticCode, j as ReviewOperation, k as diagnosticCodes, l as explainDiagnostic } from './diagnostic-hints-BeVjfNOv.js';
42
- export { d as diagnosticCauses } from './diagnostic-context-B8M79cfK.js';
41
+ import { E as EditDiagnosticCode } from './diagnostic-hints-2Bke6H_w.js';
42
+ 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-2Bke6H_w.js';
43
+ export { d as diagnosticCauses } from './diagnostic-context-CcAO4q1s.js';
43
44
  export { a as EditorExecOptions, E as EditorScope, H as HistoryDiagnostic, b as HistoryGroup, c as HistoryGroupOutcome, V as ViewScope } from './editor-scope-7o9xweiJ.js';
44
45
  export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './contracts/interaction.js';
46
+ import './failure-NS2lsya4.js';
45
47
  import './collaboration.js';
46
48
  import './collaboration/replication.js';
47
- import './failure-NS2lsya4.js';
48
- import './omml-equation-BUbU0utM.js';
49
- import './semantic-paint-ZayFF3tD.js';
50
- import './semantic-record-queries-Bsgth6lv.js';
51
- import './note-properties-qQUjO1GQ.js';
52
- import './custom-node-writes-Bn6uciLb.js';
53
- import './semantic-cell-selection-eYag3P47.js';
54
- import './tree-session-contract-CZVAGl51.js';
55
- import './headless-document-view-pp3q7wIh.js';
49
+ import './omml-equation-DP2WpUbK.js';
50
+ import './semantic-paint-Bz3FBAoH.js';
51
+ import './semantic-record-queries-Bx0pl6kL.js';
52
+ import './note-properties-9FH8zAeG.js';
53
+ import './custom-node-writes-0v0Kgw1T.js';
54
+ import './semantic-cell-selection-Dr9yxFZt.js';
55
+ import './tree-session-contract-CwnTEVLF.js';
56
+ import './headless-document-view-DZQN8Bnx.js';
56
57
  import 'prosemirror-model';
57
58
 
58
59
  /**
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{Ta as CHROME_GROUPS,Xa as CHROME_MENUS,qc as ChromeExportError,sc as ChromePrintError,gc as bindHistoryGroup,g as blankDocumentBytes,Ya as chromeMenuSlots,ma as commandForSlot,oa as commandForSlotValue,Eb as createDocxEditor,l as createFontSource,m as customFonts,tb as diagnosticCodeOfRefusal,tc as isChromePrintShortcut,k as loadFonts,rc as runChromeExport,uc as runChromePrint,ua as runToolbarCommand,qa as toolbarCommandState}from'./chunk-DVX32P2P.js';import'./chunk-4HENIAFG.js';import'./chunk-TRGAVV2Y.js';export{d as DEFAULT_FONT,i as FONT_RESOLVER_BRAND,h as FONT_RESOLVER_MARK_KEY,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,n as composeFontOrigins,j as defineFontResolver,k as isFontResolver}from'./chunk-236O4YQW.js';import'./chunk-6ZQP4HQ7.js';import'./chunk-RIYSCEFQ.js';export{x as diagnosticCauses,q as diagnosticCodes,p as explainDiagnostic}from'./chunk-LQX36Z5P.js';import'./chunk-E4LOMDNL.js';import'./chunk-CPWLFPWC.js';import'./chunk-BCXH4BXB.js';import'./chunk-G4HOFIKJ.js';import'./chunk-RCLZXP3B.js';import'./chunk-LSZ6KPKK.js';import'./chunk-U4JZVSOE.js';import'./chunk-6JIJOZDW.js';import'./chunk-OMCG63ZF.js';import'./chunk-YQ5G6LC7.js';import'./chunk-S6J4O5XP.js';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,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak: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,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,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function T(){return Object.keys(O)}export{P as DIAGNOSTIC_SCHEMA_VERSION,T as diagnosticCommands};
1
+ export{Ta as CHROME_GROUPS,Xa as CHROME_MENUS,qc as ChromeExportError,sc as ChromePrintError,gc as bindHistoryGroup,g as blankDocumentBytes,Ya as chromeMenuSlots,ma as commandForSlot,oa as commandForSlotValue,Eb as createDocxEditor,l as createFontSource,m as customFonts,tb as diagnosticCodeOfRefusal,tc as isChromePrintShortcut,k as loadFonts,rc as runChromeExport,uc as runChromePrint,ua as runToolbarCommand,qa as toolbarCommandState}from'./chunk-VRCZBFLH.js';import'./chunk-4HENIAFG.js';import'./chunk-ZOS2PM4A.js';export{d as DEFAULT_FONT,i as FONT_RESOLVER_BRAND,h as FONT_RESOLVER_MARK_KEY,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,n as composeFontOrigins,j as defineFontResolver,k as isFontResolver}from'./chunk-7ATNKARV.js';import'./chunk-EBCXSH2W.js';import'./chunk-RIYSCEFQ.js';export{x as diagnosticCauses,q as diagnosticCodes,p as explainDiagnostic}from'./chunk-5OTS2EJ7.js';import'./chunk-NKPUH3QJ.js';import'./chunk-UM26GH5B.js';import'./chunk-2PV5L5NJ.js';import'./chunk-RJCQGJR7.js';import'./chunk-WPDD2Y32.js';import'./chunk-T32MGBJS.js';import'./chunk-PF5NJWS3.js';import'./chunk-6JIJOZDW.js';import'./chunk-YZGUBCHP.js';import'./chunk-5SPITS5F.js';import'./chunk-S6J4O5XP.js';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,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak: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,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,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function T(){return Object.keys(O)}export{P as DIAGNOSTIC_SCHEMA_VERSION,T as diagnosticCommands};
@@ -1,4 +1,5 @@
1
- import { j as ShapingEnvironmentInput, k as TextShaper, l as ResolvedRunStyle, m as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, n as NormalizationPolicy, o as FixedPointRoundingMode, p as FontRequest } from './semantic-records-DQmumPgL.js';
1
+ import { j as ShapingEnvironmentInput, k as TextShaper, l as ResolvedRunStyle, m as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, n as NormalizationPolicy, o as FixedPointRoundingMode, p as FontRequest } from './semantic-records-CjcF26ZL.js';
2
+ import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
2
3
 
3
4
  /** Immutable per-operation environment. Configuration, extension, shaping, and producer changes are
4
5
  * coarse gates; resource changes are compared through CacheProvenance.resourceDependencies. */
@@ -238,7 +239,7 @@ declare function prepareLayoutFontConfiguration(configuration: LayoutFontConfigu
238
239
  /** Stable identity for every layout-affecting font configuration input. @public */
239
240
  declare function layoutFontConfigurationFingerprint(configuration: LayoutFontConfiguration): string;
240
241
  /** Build one shaped-layout environment without importing an editor or DOM lane. @public */
241
- declare function createLayoutShaping(configuration: LayoutFontConfiguration | PreparedLayoutFontConfiguration, instrumentation?: LayoutShapingInstrumentation): Promise<LayoutShapingOptions>;
242
+ declare function createLayoutShaping(configuration: LayoutFontConfiguration | PreparedLayoutFontConfiguration, instrumentation?: LayoutShapingInstrumentation, execution?: FontShapingOptions): Promise<LayoutShapingOptions>;
242
243
  /** Release native resources held by a shaping environment. @public */
243
244
  declare function disposeLayoutShaping(shaping: LayoutShapingOptions): void;
244
245