@docx-editor.dev/core 2.9.2 → 2.11.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 (140) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.cts +14 -5
  3. package/dist/automation.d.ts +14 -5
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.cts +78 -13
  7. package/dist/binding.d.ts +78 -13
  8. package/dist/binding.js +1 -1
  9. package/dist/chunk-34BNQUD4.js +10 -0
  10. package/dist/chunk-5AVHO75P.cjs +19 -0
  11. package/dist/chunk-6HMSC7UV.js +2 -0
  12. package/dist/chunk-6JIJOZDW.js +1 -0
  13. package/dist/chunk-76Y3Y45J.cjs +2 -0
  14. package/dist/chunk-BP7ANXGA.js +1 -0
  15. package/dist/chunk-BTQKU64Q.cjs +1 -0
  16. package/dist/chunk-CRZR6K5Z.js +19 -0
  17. package/dist/chunk-D5EHDHYV.js +1 -0
  18. package/dist/chunk-EJATEGJZ.cjs +1 -0
  19. package/dist/{chunk-PSZH2VXP.js → chunk-GOEBQ26R.js} +1 -1
  20. package/dist/chunk-GRDFEH5Q.cjs +2 -0
  21. package/dist/chunk-GWV65NQW.cjs +10 -0
  22. package/dist/chunk-GXLZCXEH.js +2 -0
  23. package/dist/chunk-JUQOPVSK.cjs +2 -0
  24. package/dist/chunk-LAETEBHD.js +1 -0
  25. package/dist/chunk-M6Z3KFXM.cjs +5 -0
  26. package/dist/{chunk-YMYCPY5Y.cjs → chunk-OHJQ7GPZ.cjs} +1 -1
  27. package/dist/chunk-UQFOYZJO.cjs +18 -0
  28. package/dist/chunk-WPQMPHNR.cjs +1 -0
  29. package/dist/chunk-WXQ245MQ.js +18 -0
  30. package/dist/chunk-WZHIFNSU.js +5 -0
  31. package/dist/chunk-X7A5XART.js +2 -0
  32. package/dist/chunk-ZKWRCLT2.cjs +1 -0
  33. package/dist/collaboration/replication.cjs +1 -0
  34. package/dist/collaboration/replication.d.cts +216 -0
  35. package/dist/collaboration/replication.d.ts +216 -0
  36. package/dist/collaboration/replication.js +1 -0
  37. package/dist/collaboration.cjs +1 -0
  38. package/dist/collaboration.d.cts +176 -0
  39. package/dist/collaboration.d.ts +176 -0
  40. package/dist/collaboration.js +1 -0
  41. package/dist/contracts/document.d.cts +6 -1
  42. package/dist/contracts/document.d.ts +6 -1
  43. package/dist/contracts/editor.cjs +1 -1
  44. package/dist/contracts/editor.d.cts +8 -9
  45. package/dist/contracts/editor.d.ts +8 -9
  46. package/dist/contracts/editor.js +1 -1
  47. package/dist/contracts/interaction.d.cts +8 -9
  48. package/dist/contracts/interaction.d.ts +8 -9
  49. package/dist/contracts/modules.cjs +1 -1
  50. package/dist/contracts/modules.d.cts +20 -8
  51. package/dist/contracts/modules.d.ts +20 -8
  52. package/dist/contracts/modules.js +1 -1
  53. package/dist/custom-node-writes-CwkYRw3V.d.cts +310 -0
  54. package/dist/custom-node-writes-JfTn-Sy6.d.ts +310 -0
  55. package/dist/document-properties-D6Ahr8D6.d.cts +28 -0
  56. package/dist/document-properties-D6Ahr8D6.d.ts +28 -0
  57. package/dist/{editor-Cvd7Geoc.d.ts → editor-BogcVHXk.d.ts} +176 -59
  58. package/dist/{editor-cAEf1uXW.d.cts → editor-C8edZgy5.d.cts} +176 -59
  59. package/dist/editor.cjs +1 -1
  60. package/dist/editor.css +1 -7698
  61. package/dist/editor.d.cts +26 -25
  62. package/dist/editor.d.ts +26 -25
  63. package/dist/editor.js +1 -1
  64. package/dist/failure-BnGjoXf0.d.cts +64 -0
  65. package/dist/failure-BnGjoXf0.d.ts +64 -0
  66. package/dist/{index-DRqY5JVF.d.ts → index-BNv-ZLQP.d.ts} +327 -86
  67. package/dist/{index-wb-iOxfh.d.cts → index-Dn0lOp9Z.d.cts} +327 -86
  68. package/dist/index.cjs +1 -1
  69. package/dist/index.d.cts +20 -19
  70. package/dist/index.d.ts +20 -19
  71. package/dist/index.js +1 -1
  72. package/dist/layout.cjs +1 -1
  73. package/dist/layout.d.cts +92 -55
  74. package/dist/layout.d.ts +92 -55
  75. package/dist/layout.js +1 -1
  76. package/dist/{note-properties-jvnw_DGG.d.ts → note-properties-BmoSdyKS.d.ts} +1 -1
  77. package/dist/{note-properties-CQlxjic_.d.cts → note-properties-BvGfHk5e.d.cts} +1 -1
  78. package/dist/{omml-equation-Dd3mBep-.d.ts → omml-equation-Ciq5rgb7.d.ts} +1 -1
  79. package/dist/{omml-equation-BD-LsmWE.d.cts → omml-equation-CqQOt_dD.d.cts} +1 -1
  80. package/dist/output.cjs +1 -1
  81. package/dist/output.d.cts +6 -8
  82. package/dist/output.d.ts +6 -8
  83. package/dist/output.js +1 -1
  84. package/dist/{protocol-UuZOcOp7.d.cts → protocol-BB-WP3zk.d.cts} +2 -2
  85. package/dist/{protocol-C7ahrdUx.d.ts → protocol-Ckl7hWsv.d.ts} +2 -2
  86. package/dist/{review-items-bdGxFWNA.d.ts → review-items-BdeLNRi2.d.cts} +1 -2
  87. package/dist/{review-items-B8tffIXj.d.cts → review-items-CkYyXhXM.d.ts} +1 -2
  88. package/dist/{review-reads-Bxz03tHG.d.cts → review-reads-BOLSBm5w.d.cts} +2 -2
  89. package/dist/{review-reads-CHODU0LI.d.ts → review-reads-Crf0Xn42.d.ts} +2 -2
  90. package/dist/{revision-projection-CILpvv4M.d.ts → revision-projection-Ae2CWa8E.d.ts} +1 -1
  91. package/dist/{revision-projection-Cc4wz30g.d.cts → revision-projection-C2S8PSQm.d.cts} +1 -1
  92. package/dist/{semantic-cell-selection-BPzx6DdT.d.cts → semantic-cell-selection-C0OFD4D9.d.cts} +4 -4
  93. package/dist/{semantic-cell-selection-CsHcr-yk.d.ts → semantic-cell-selection-DdmoxC-y.d.ts} +4 -4
  94. package/dist/{semantic-interaction-D-RZ9Ust.d.ts → semantic-interaction-COyhZ9WH.d.ts} +21 -2
  95. package/dist/{semantic-interaction-BfWDD_0V.d.cts → semantic-interaction-Cs2jErnt.d.cts} +21 -2
  96. package/dist/{semantic-paint-WhVtSDJK.d.ts → semantic-paint-UHaj3sBY.d.cts} +2 -2
  97. package/dist/{semantic-paint-Bd7EqzXV.d.cts → semantic-paint-vA-oLSdV.d.ts} +2 -2
  98. package/dist/{semantic-records-DadVT_E1.d.cts → semantic-records-5AOQJmLX.d.cts} +20 -5
  99. package/dist/{semantic-records-DCt-ZwKU.d.ts → semantic-records-9xhwbJ23.d.ts} +20 -5
  100. package/dist/{shaped-measurer-CninrHr_.d.cts → shaped-measurer-NeF2mPSu.d.cts} +1 -1
  101. package/dist/{shaped-measurer-B9f4A7QA.d.ts → shaped-measurer-vzsY88oK.d.ts} +1 -1
  102. package/dist/store.cjs +1 -1
  103. package/dist/store.d.cts +193 -19
  104. package/dist/store.d.ts +193 -19
  105. package/dist/store.js +1 -1
  106. package/dist/tree-op-types-BPyXNxyL.d.cts +3053 -0
  107. package/dist/tree-op-types-DnzAOnc9.d.ts +3053 -0
  108. package/dist/{custom-node-writes-D6SGwebL.d.ts → tree-package-fragment-BjZ3RWAS.d.cts} +128 -312
  109. package/dist/{custom-node-writes-Dy3b20PS.d.cts → tree-package-fragment-CDER0G3B.d.ts} +128 -312
  110. package/dist/{tree-session-ZuBFOhIh.d.ts → tree-session-contract-BF2FVBOM.d.cts} +52 -106
  111. package/dist/{tree-session-Df02ajqc.d.cts → tree-session-contract-DhdsFT_z.d.ts} +52 -106
  112. package/dist/{tree-store-B_sJBMIS.d.cts → tree-store-CNZ3O83s.d.ts} +130 -25
  113. package/dist/{tree-store-DgETo6Mf.d.ts → tree-store-DfZi7FqY.d.cts} +130 -25
  114. package/package.json +14 -3
  115. package/dist/chunk-6JWP2H7K.js +0 -2
  116. package/dist/chunk-6KNLLEUW.cjs +0 -18
  117. package/dist/chunk-7ADTI533.cjs +0 -10
  118. package/dist/chunk-7ETDCPF6.cjs +0 -2
  119. package/dist/chunk-7I3BSGGS.js +0 -1
  120. package/dist/chunk-7UU5YFCD.cjs +0 -2
  121. package/dist/chunk-7VQ7YLW3.cjs +0 -1
  122. package/dist/chunk-CKDAK3MV.js +0 -10
  123. package/dist/chunk-DIMEYVNS.js +0 -2
  124. package/dist/chunk-GQQOL4PV.js +0 -1
  125. package/dist/chunk-H2656QDI.cjs +0 -1
  126. package/dist/chunk-KQGENNL5.cjs +0 -15
  127. package/dist/chunk-LIXPSV4T.js +0 -18
  128. package/dist/chunk-O4UULRAQ.cjs +0 -5
  129. package/dist/chunk-SIIFNE6U.js +0 -15
  130. package/dist/chunk-VXYECPKA.js +0 -5
  131. package/dist/hf-references-Dvk6De4Q.d.cts +0 -70
  132. package/dist/hf-references-z5Y4N1ab.d.ts +0 -70
  133. package/dist/image-resources-BgA9EQxY.d.ts +0 -203
  134. package/dist/image-resources-BiA-IXgo.d.cts +0 -203
  135. package/dist/note-nodes-BNCANoGN.d.ts +0 -108
  136. package/dist/note-nodes-DL-Au22P.d.cts +0 -108
  137. package/dist/ooxml-package-CdEy9ufK.d.cts +0 -1222
  138. package/dist/ooxml-package-CdEy9ufK.d.ts +0 -1222
  139. package/dist/tree-op-types-CnRb7AYo.d.ts +0 -1589
  140. package/dist/tree-op-types-D1vNJ7XC.d.cts +0 -1589
@@ -0,0 +1,18 @@
1
+ import {f,c,d,e}from'./chunk-WU7PUTVA.js';import {y}from'./chunk-6HMSC7UV.js';import {Y}from'./chunk-X7A5XART.js';import {m,Jf,de,ca as ca$1,Md as Md$1,be,Td as Td$1,Ud as Ud$1,Rd as Rd$1,Zd as Zd$1,_d as _d$1,Wd as Wd$1,$d as $d$1,I,id,nf as nf$1,g,zc as zc$1,pb as pb$1,fb as fb$1,db as db$1,cd,nc as nc$1,la as la$1,gd,fe,Yd as Yd$1,Xd as Xd$1,Vd as Vd$1,ge,Sd as Sd$1,bb as bb$1,uf,sf as sf$1,xf,tf as tf$1,oc as oc$1,a,Ca as Ca$1,na,kc as kc$1,Za as Za$1,cb as cb$1,jc as jc$1,mc as mc$1,Mc as Mc$1,Oc as Oc$1,Ef,Ne as Ne$1,gf as gf$1,qf,Ya as Ya$1,Wa as Wa$1,s,Fe,_a as _a$1,Hc as Hc$1,Fc as Fc$1,Kc as Kc$1,Vc as Vc$1,Uc as Uc$1,Ua as Ua$1,Jc as Jc$1,Lc as Lc$1,$a as $a$1,ja as ja$1,fc as fc$1,Ta as Ta$1,Sc as Sc$1,Tc as Tc$1,Ac as Ac$1,Cc as Cc$1,Rc as Rc$1,eb as eb$1}from'./chunk-34BNQUD4.js';var MS=Symbol("validated-resolved-font"),hd=64*1024*1024,yd=256,bd=128*1024*1024,Wt=class extends Error{name="FontResolutionError";request;code;limit;actual;diagnostic;expectedHash;actualHash;constructor(n,t,r={}){super(`Font resolution failed (${n}) for ${qr(t)}`),this.code=n,this.request=Zr(t),this.limit=r.limit,this.actual=r.actual,this.diagnostic=r.diagnostic,this.expectedHash=r.expectedHash,this.actualHash=r.actualHash;}},Cp=e=>{if(e.family.trim().length===0)throw new TypeError("Font family must not be empty");if(!Number.isInteger(e.weight)||e.weight<1||e.weight>1e3)throw new RangeError("Font weight must be an integer from 1 through 1000");if(e.style!=="normal"&&e.style!=="italic")throw new TypeError("Font style must be normal or italic")},Zr=e=>(Cp(e),Object.freeze({family:e.family,weight:e.weight,style:e.style})),qr=e=>(Cp(e),JSON.stringify([e.family,e.weight,e.style])),xd=class{[MS]=true;id;identity;request;family;byteLength;hash;faceIndex;substitution;constructor(n,t){if(n.id.length===0)throw new TypeError("Resolved font id must not be empty");if(!Number.isInteger(n.faceIndex)||n.faceIndex<0)throw new RangeError("Font face index must be a non-negative integer");this.id=n.id,this.request=Zr(n.request),this.family=this.request.family,this.hash=n.hash,this.faceIndex=n.faceIndex,this.identity=`${this.hash}#${this.faceIndex}`,this.byteLength=n.byteLength,this.substitution=null,t&&(this.substitution=Object.freeze({requested:Zr(t.requested),resolved:Zr(t.resolved)})),Object.freeze(this);}get bytes(){return Ii(this).slice()}},Op=new WeakSet,Bp=new WeakMap,Mp=new WeakMap,Fp=(e,n,t,r)=>{let o=new xd(e,r);return Bp.set(o,n),Mp.set(o,t),Op.add(o),o},Ii=e=>{Qr(e);let n=Bp.get(e);if(!n)throw new TypeError("Resolved font has no owned byte capability");return n},vi=e=>{Qr(e);let n=Mp.get(e);if(!n)throw new TypeError("Resolved font has no admitted table metadata");return n},Qr=e=>{if(typeof e!="object"||e===null||!Op.has(e))throw new TypeError("Shaping requires a validated resolved font")},Lp=(e,n)=>e[n]<<8|e[n+1],Jr=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,kp=(e,n)=>{if(n>e.byteLength-12)return {valid:false,diagnostic:"truncated sfnt header"};let t=String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3]);if(!(e[n]===0&&e[n+1]===1&&e[n+2]===0&&e[n+3]===0)&&t!=="OTTO"&&t!=="true"&&t!=="typ1")return {valid:false,diagnostic:"unsupported sfnt signature"};let o=Lp(e,n+4),a=n+12+o*16;if(!Number.isSafeInteger(a)||a>e.byteLength)return {valid:false,diagnostic:"truncated sfnt table directory"};for(let i=0;i<o;i+=1){let s=n+12+i*16,l=Jr(e,s+8),d=Jr(e,s+12);if(l>e.byteLength||d>e.byteLength-l)return {valid:false,diagnostic:"sfnt table range exceeds font bytes"}}return {valid:true}},FS=(e,n)=>{let r=String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Jr(e,12+n*4):0,o=Lp(e,r+4),a=new Set;for(let i=0;i<o;i+=1){let s=r+12+i*16;a.add(String.fromCharCode(e[s],e[s+1],e[s+2],e[s+3]));}return Object.freeze(a)},Ti=(e,n)=>{if(!Number.isSafeInteger(n)||n<0)return {valid:false,diagnostic:"invalid font face index"};if(e.byteLength<12)return {valid:false,diagnostic:"truncated sfnt header"};if(String.fromCharCode(e[0],e[1],e[2],e[3])!=="ttcf")return n!==0?{valid:false,diagnostic:"standalone sfnt has only face index zero"}:kp(e,0);let r=Jr(e,4);if(r!==65536&&r!==131072)return {valid:false,diagnostic:"unsupported TTC version"};let o=Jr(e,8),a=12+o*4;if(o===0||!Number.isSafeInteger(a)||a>e.byteLength||n>=o)return {valid:false,diagnostic:"invalid TTC face directory"};let i=Jr(e,12+n*4);return i<a?{valid:false,diagnostic:"invalid TTC face offset"}:kp(e,i)},LS=(e,n,t,r)=>{if(e.availability==="forbidden")return {kind:"forbidden"};if(e.bytes.byteLength>n)return {kind:"overLimit",actual:e.bytes.byteLength};let o=e.bytes.slice();r?.onOwnedByteCopy?.(),r?.onHash?.();let a$1=a(o);if(e.hash!==a$1)return {kind:"hashMismatch",expectedHash:e.hash,actualHash:a$1};let i=Ti(o,e.faceIndex);if(!i.valid)return {kind:"malformed",diagnostic:i.diagnostic};r?.onTableScan?.();let s=FS(o,e.faceIndex);try{let d=t(o,e.faceIndex);if(!d.valid)return {kind:"malformed",diagnostic:d.diagnostic}}catch(d){return {kind:"malformed",diagnostic:d instanceof Error?d.message:"font validator threw"}}let l={kind:"resolved",font:Fp({...e,byteLength:o.byteLength},o,s)};return r?.onAdmission?.(),l},ES=e=>{if(!Number.isSafeInteger(e.epoch)||e.epoch<0)throw new RangeError("Font resource epoch must be a non-negative safe integer");if(!Number.isSafeInteger(e.maxFontBytes)||e.maxFontBytes<=0||e.maxFontBytes>hd)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${hd}`);if(typeof e.validateFont!="function")throw new TypeError("Font snapshot requires a validator");if(e.resources.length>yd)throw new RangeError(`Font source count must not exceed ${yd}`);let n=0;for(let l of e.resources){if(l.bytes.byteLength>bd-n)throw new RangeError(`Aggregate font bytes must not exceed ${bd}`);n+=l.bytes.byteLength;}let t=e.epoch,r=e.maxFontBytes,o=e.validateFont,a=new Map;for(let l of e.resources){let d=qr(l.request);if(a.has(d))throw new TypeError(`Duplicate font resource request: ${d}`);a.set(d,LS(l,r,o,e.instrumentation));}let i=new Map;for(let l of e.substitutions??[]){let d=qr(l.from);if(i.has(d))throw new TypeError(`Duplicate font substitution request: ${d}`);i.set(d,Zr(l.to));}return Object.freeze({epoch:t,resolve:l=>{let d=Zr(l),c=qr(d),u=i.get(c),f=u??d,p=a.get(qr(f));return p?p.kind==="forbidden"?new Wt("forbidden",d):p.kind==="overLimit"?new Wt("overLimit",d,{limit:r,actual:p.actual}):p.kind==="malformed"?new Wt("malformed",d,{diagnostic:p.diagnostic}):p.kind==="hashMismatch"?new Wt("hashMismatch",d,{expectedHash:p.expectedHash,actualHash:p.actualHash}):u?Fp({request:p.font.request,id:p.font.id,hash:p.font.hash,faceIndex:p.font.faceIndex,byteLength:p.font.byteLength},Ii(p.font),vi(p.font),{requested:d,resolved:u}):p.font:new Wt("missing",d)}})};var at=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},ki=(e,n)=>{if(e.trim().length===0||/[\u0000-\u001f\u007f]/.test(e))throw new TypeError(`${n} must be non-blank and contain no control characters`)},NS=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},Ep=(e,n,t)=>{let r=Object.entries(e).sort(([a],[i])=>a<i?-1:a>i?1:0),o=Object.create(null);for(let[a,i]of r){if(NS(a,`${n} key`),!Number.isFinite(i)||t&&(!Number.isSafeInteger(i)||i<0))throw new RangeError(`${n} value must be ${t?"a non-negative safe integer":"finite"}`);if(t&&i>4294967295)throw new RangeError(`${n} value must fit an unsigned 32-bit integer`);o[a]=i;}return Object.freeze(o)},Sd=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),AS=e=>e?Object.freeze({requested:Sd(e.requested),resolved:Sd(e.resolved)}):void 0,Np=new WeakSet,wd=e=>{if(Qr(e),!Np.has(e)){if(e.identity!==`${e.hash}#${e.faceIndex}`)throw new TypeError("Resolved font identity does not match hash and face index");if(!Number.isSafeInteger(e.byteLength)||e.byteLength<0)throw new TypeError("Resolved font byte length is invalid");Np.add(e);}},Rd=e=>(wd(e),e),Oi=e=>(wd(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:Sd(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:AS(e.substitution)??null})),fr=e=>{if(ki(e.shapingLibrary.name,"shaping library name"),ki(e.shapingLibrary.version,"shaping library version"),ki(e.unicodeDataVersion,"Unicode data version"),!/^\d+(?:\.\d+){0,3}(?:[-+][0-9A-Za-z.-]+)?$/.test(e.shapingLibrary.version))throw new TypeError("shaping library version must be a numeric version");if(!/^\d+(?:\.\d+){1,2}$/.test(e.unicodeDataVersion))throw new TypeError("Unicode data version must be a dotted numeric version");if(!/^[A-Z][a-z]{3}$/.test(e.script))throw new TypeError("script must be a four-letter ISO 15924 code");if(ki(e.language,"language"),!/^(?:und|[A-Za-z]{2,8})(?:-[A-Za-z0-9]{1,8})*$/.test(e.language))throw new TypeError("language must be a BCP 47 language tag");if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("direction must be ltr or rtl");if(!["none","NFC","NFD","NFKC","NFKD"].includes(e.normalization))throw new TypeError("invalid normalization policy");if(!["halfAwayFromZero","halfToEven","towardZero"].includes(e.roundingMode))throw new TypeError("invalid fixed-point rounding mode");if(!Number.isSafeInteger(e.fixedPointScale)||e.fixedPointScale<=0)throw new RangeError("fixed-point scale must be a positive safe integer");let n=Rd(e.font),t=e.fallbackOrder.map(Rd),r=new Set;for(let o of t){let a=JSON.stringify(Oi(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:Ep(e.variationAxes,"variation axis",false),shapingLibrary:Object.freeze({name:e.shapingLibrary.name,version:e.shapingLibrary.version}),unicodeDataVersion:e.unicodeDataVersion,normalization:e.normalization,script:e.script,language:e.language,direction:e.direction,features:Ep(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Dp=e=>{let n=fr(e);return Object.freeze({font:Oi(n.font),variationAxes:Object.freeze(Object.entries(n.variationAxes).map(t=>Object.freeze(t))),shapingLibrary:Object.freeze({name:n.shapingLibrary.name,version:n.shapingLibrary.version}),unicodeDataVersion:n.unicodeDataVersion,normalization:n.normalization,script:n.script,language:n.language,direction:n.direction,features:Object.freeze(Object.entries(n.features).map(t=>Object.freeze(t))),fallbackOrder:Object.freeze(n.fallbackOrder.map(Oi)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},Pd=e=>JSON.stringify(Dp(e)),ur=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},Vn=e=>{try{return at(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Ap=new WeakMap,Ci=e=>{let n=Ap.get(e);if(n)return n;wd(e);let t=JSON.stringify({identity:e.identity,id:e.id,family:e.family,request:e.request,hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:e.substitution??null});return Ap.set(e,t),t},Bi=(e,n)=>{let t=fr(n);if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("Shaped run direction must be ltr or rtl");if(e.direction!==t.direction)throw new TypeError("Shaped run direction does not match shaping environment");if(ur(e.bidiLevel,"bidi level"),(e.bidiLevel&1)===1!=(e.direction==="rtl"))throw new TypeError("Shaped run direction does not match bidi level parity");let r=new Map,o=e.glyphs.map(l=>{ur(l.id,"glyph id"),ur(l.cluster,"glyph cluster");let d=r.get(l.outline);if(!d){if(!Number.isSafeInteger(l.outline.unitsPerEm)||l.outline.unitsPerEm<=0)throw new RangeError("Glyph outline units per em must be a positive safe integer");d=Object.isFrozen(l.outline)?l.outline:Object.freeze({path:l.outline.path,unitsPerEm:l.outline.unitsPerEm}),r.set(l.outline,d);}return Object.freeze({id:l.id,cluster:l.cluster,originX:Vn(l.originX),originY:Vn(l.originY),advanceX:Vn(l.advanceX),advanceY:Vn(l.advanceY),offsetX:Vn(l.offsetX),offsetY:Vn(l.offsetY),outline:d})}),a=e.fontSpans.map(l=>{if(ur(l.glyphStart,"font span start"),ur(l.glyphEnd,"font span end"),l.glyphEnd<=l.glyphStart||l.glyphEnd>o.length)throw new RangeError("Font span glyph range is invalid");l.fallbackIndex!==null&&ur(l.fallbackIndex,"fallback index");let d=Rd(l.font);if(l.fallbackIndex===null){if(Ci(d)!==Ci(t.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=t.fallbackOrder[l.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(Ci(d)!==Ci(c))throw new TypeError("Shaped fallback font does not match shaping environment provenance")}return Object.freeze({...l,font:d})});for(let l=0;l<a.length;l+=1){let d=l===0?0:a[l-1].glyphEnd;if(a[l].glyphStart!==d)throw new RangeError("Font spans must cover glyphs contiguously")}if(o.length===0&&a.length!==0||o.length>0&&a.at(-1)?.glyphEnd!==o.length)throw new RangeError("Font spans must cover every glyph exactly once");let i=e.clusters.map(l=>{for(let[c,u]of [["cluster text start",l.textStart],["cluster text end",l.textEnd],["cluster glyph start",l.glyphStart],["cluster glyph end",l.glyphEnd],["cluster font span",l.fontSpan]])ur(u,c);if(l.textEnd<=l.textStart||l.textEnd>e.text.length||l.glyphEnd<=l.glyphStart||l.glyphEnd>o.length)throw new RangeError("Shaped cluster range is invalid");let d=a[l.fontSpan];if(!d||l.glyphStart<d.glyphStart||l.glyphEnd>d.glyphEnd)throw new RangeError("Shaped cluster does not belong to its declared font span");return Object.freeze({...l,advance:Vn(l.advance),caretEdges:Object.freeze(l.caretEdges.map(Vn))})}),s=Object.freeze({ascent:Vn(e.metrics.ascent),descent:Vn(e.metrics.descent),lineGap:Vn(e.metrics.lineGap)});return Object.freeze({text:e.text,direction:e.direction,bidiLevel:e.bidiLevel,glyphs:Object.freeze(o),clusters:Object.freeze(i),fontSpans:Object.freeze(a),metrics:s})},DS=(e,n)=>{let t=Bi(e,n);return Object.freeze({text:t.text,direction:t.direction,script:n.script,language:n.language,bidiLevel:t.bidiLevel,glyphs:t.glyphs,clusters:t.clusters,fontSpans:Object.freeze(t.fontSpans.map(r=>Object.freeze({glyphStart:r.glyphStart,glyphEnd:r.glyphEnd,fallbackIndex:r.fallbackIndex,font:Oi(r.font)}))),metrics:t.metrics})};var la=Object.freeze({name:"HarfBuzz",version:"14.3.0"}),da=null,ia=null;function _S(){return da?Promise.resolve():ia||(ia=import('./dist-YFULGVS3.js').then(e=>{let n=e.versionString();if(n!==la.version)throw new Ee("shapingLibraryMismatch",{diagnostic:f(la.version,n)});da=e;}).catch(e$1=>{throw ia=null,e$1 instanceof Ee?e$1:c(e$1)?new Ee("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new Ee("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),ia)}function HS(){return da!==null}function zS(){if(!da)throw new Ee("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return da}var Ee=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(n,t={}){super(`HarfBuzz shaping failed (${n})`,{cause:t.cause}),this.code=n,this.limit=t.limit,this.actual=t.actual,this.diagnostic=t.diagnostic;}},jS=16*1024*1024,GS=1e6,WS=1e6,VS=1e6,$S=4,XS=512,YS=1024*1024,KS=16*1024*1024,US=32*1024*1024,qS=64*1024*1024,ZS=64*1024*1024,JS=1e6,QS=1e6,eR=1e6,nR=64,tR=4096,rR=4*1024*1024,oR=64*1024*1024,aR=64*1024*1024,iR=256*1024*1024,sR=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),_p=["cmap","head","hhea","hmtx","maxp"],lR=(e,n)=>e[n]<<8|e[n+1],dR=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,cR=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?dR(e,12+n*4):0,uR=(e,n)=>{let t=cR(e,n),r=lR(e,t+4),o=new Set;for(let a=0;a<r;a+=1){let i=t+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},fR=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),pR=(e,n)=>{let t=Ti(e,n);if(!t.valid)return t;let r=uR(e,n);for(let o of _p)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},mR=pR,it=(e,n,t)=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw new RangeError(`${n} must be a positive safe integer no greater than ${t}`);return e},gR=(e,n,t)=>{let r=e<0n,o=r?-e:e,a=o/n,i=o%n;if(t!=="towardZero"){let d=i*2n;(d>n||d===n&&(t==="halfAwayFromZero"||t==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let s=r?-a:a,l=Number(s);if(!Number.isSafeInteger(l))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return l},Hp=(e,n,t,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(t)||t<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");return at(gR(BigInt(e)*BigInt(t),BigInt(n),r))},hR=(e,n,t,r)=>{if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("font size must be a positive integer number of half points");if(n>Math.floor(Number.MAX_SAFE_INTEGER/t))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=n*t,a=e*2;return i=>Hp(i,a,o,r)},yR=(e,n)=>{if(n.length===0)return [];let t=[...new Set(n.map(i=>i.cluster))].sort((i,s)=>i-s),r=new Map;for(let i=0;i<t.length;i+=1)r.set(t[i],t[i+1]??e.length);let o=[],a=0;for(;a<n.length;){let i=n[a].cluster,s=a+1;for(;s<n.length&&n[s].cluster===i;)s+=1;let l=n.slice(a,s).reduce((c,u)=>c+u.advanceX,0),d=at(l);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:s,advance:d,caretEdges:Object.freeze([at(0),d]),fontSpan:0}),a=s;}return o},st=64,Pt=8,pr=8,bR=32,zp=st+2*Pt,xR=st+Pt+pr,SR=st+Pt+pr,RR=st+Pt+pr,jp=st+8*Pt,Gp=st+8*pr+Pt,wR=st+6*pr+Pt,PR=st+3*pr+2*Pt,IR=st+3*pr,ca=e=>st+e.length*Uint16Array.BYTES_PER_ELEMENT,vd=e=>RR+ca(e),sa=e=>bR+e*Pt,vR=(e,n)=>zp+ca(e)+xR+vd(n),TR=e=>jp+ca(e)+sa(e.length)+e.length*Gp,kR=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return jp+ca(e.text)+sa(e.glyphs.length)+e.glyphs.length*Gp+sa(e.clusters.length)+e.clusters.length*wR+e.clusters.reduce((t,r)=>t+sa(r.caretEdges.length),0)+sa(e.fontSpans.length)+e.fontSpans.length*PR+IR+[...n].reduce((t,r)=>t+vd(r.path),0)},CR=(e,n)=>zp+ca(e)+SR+n,Id=class{#n;#s;#u;#f;#p;#y;#b;#m;#g;#l;#h;#d;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#c;constructor(n,t){this.#n=n,this.#s=it(t.maxFontBytes??jS,"maximum font bytes",ZS),this.#u=it(t.maxInputUtf16??GS,"maximum input UTF-16 code units",JS),this.#f=it(t.maxCodepoints??WS,"maximum input code points",QS),this.#p=it(t.maxGlyphs??VS,"maximum shaped glyphs",eR),this.#y=it(t.maxCachedFaces??$S,"maximum cached faces",nR),this.#b=it(t.maxCachedShapes??XS,"maximum cached shape results",tR),this.#m=it(t.maxOutlineBytes??YS,"maximum outline bytes",rR),this.#g=it(t.maxCachedOutlineBytes??KS,"maximum cached outline bytes",oR),this.#l=it(t.maxShapedRunBytes??US,"maximum shaped run bytes",aR),this.#h=it(t.maxCachedShapeBytes??qS,"maximum cached shape bytes",iR),this.#d=t.instrumentation?.onFaceCacheEvent,this.#e=t.instrumentation,this.#c=new this.#n.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#t.clear(),this.#i=0,this.#r=0,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#c=void 0;}#S(n,t){let r=this.#o.get(n.identity);if(r)return this.#o.delete(n.identity),this.#o.set(n.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:n.identity})),r;let o=vi(n);for(let c of _p)if(!o.has(c))throw new Ee("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(fR(t)),i=new this.#n.Face(a,n.faceIndex),s=new this.#n.Font(i),l=s.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(l.ascender)||!Number.isSafeInteger(l.descender)||!Number.isSafeInteger(l.lineGap))throw new Ee("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(s.setScale(i.upem,i.upem),this.#o.size>=this.#y){let c=this.#o.keys().next().value;c!==void 0&&(this.#o.delete(c),this.#d?.(Object.freeze({kind:"evicted",identity:c})));}let d={identity:n.identity,blob:a,face:i,font:s,unitsPerEm:i.upem};return this.#o.set(n.identity,d),this.#d?.(Object.freeze({kind:"created",identity:n.identity})),d}#R(n,t,r){let o=JSON.stringify([n.identity,n.unitsPerEm,r,t]),a=this.#a.get(o);if(a)return this.#a.delete(o),this.#a.set(o,a),this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#i})),a.outline;this.#e?.onOutlinePathCall?.();let i=n.font.glyphToPath(t),s=vd(i);if(s>this.#m)throw new Ee("outlineOverLimit",{limit:this.#m,actual:s});let l=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=vR(o,i);if(d>this.#g)return this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#i})),l;for(;this.#i+d>this.#g;){let c=this.#a.keys().next().value;if(c===void 0)break;let u=this.#a.get(c);this.#a.delete(c),this.#i-=u.bytes,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#i}));}return this.#a.set(o,{outline:l,bytes:d}),this.#i+=d,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),l}#x(n){if(n.length>this.#u)throw new Ee("textOverLimit",{limit:this.#u,actual:n.length});let t=0;for(let r=0;r<n.length;){let o=n.codePointAt(r);if(r+=o>65535?2:1,t+=1,t>this.#f)throw new Ee("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#c)throw new Ee("disposed");if(Qr(n.environment.font),n.environment.font.byteLength>this.#s)throw new Ee("fontOverLimit",{limit:this.#s,actual:n.environment.font.byteLength});this.#x(n.text);let t=TR(n.text);if(t>this.#l)throw new Ee("shapedRunOverLimit",{limit:this.#l,actual:t});let r=fr(n.environment),o=JSON.stringify([n.text,n.fontSizeHalfPoints,n.bidiLevel,Pd(r)]),a=this.#t.get(o);if(a)return this.#t.delete(o),this.#t.set(o,a),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==la.name||r.shapingLibrary.version!==la.version)throw new Ee("shapingLibraryMismatch");if(r.normalization!=="none")throw new Ee("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new Ee("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new Ee("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new Ee("unsupportedFallback");let i=Ii(r.font),s=vi(r.font);if([...sR].some(d=>s.has(d)))throw new Ee("unsupportedColorFont");let l=n.text;this.#x(l);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#c;f.reset(),f.addText(l),f.setDirection(r.direction==="rtl"?this.#n.Direction.RTL:this.#n.Direction.LTR),f.setScript(r.script),f.setLanguage(r.language),f.setClusterLevel(this.#n.ClusterLevel.MONOTONE_CHARACTERS);let p=Object.entries(r.features).map(([w,T])=>new this.#n.Feature(w,T));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let m=f.getGlyphInfosAndPositions();if(m.length>this.#p)throw new Ee("glyphOverLimit",{limit:this.#p,actual:m.length});let g=hR(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),h=at(0),y=at(0),x=new Map,k=JSON.stringify(Object.entries(r.variationAxes).sort(([w],[T])=>w.localeCompare(T))),B=m.map(w=>{let T=g(w.xAdvance??0),N=g(w.yAdvance??0),M={id:w.codepoint,cluster:w.cluster,originX:h,originY:y,advanceX:T,advanceY:N,offsetX:g(w.xOffset??0),offsetY:g(w.yOffset??0),outline:x.get(w.codepoint)??(()=>{let b=this.#R(d,w.codepoint,k);return x.set(w.codepoint,b),b})()};return h=at(h+T),y=at(y+N),M}),v=u.hExtents(),L=Bi({text:l,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:B,clusters:yR(l,B),fontSpans:B.length===0?[]:[{glyphStart:0,glyphEnd:B.length,font:r.font,fallbackIndex:null}],metrics:{ascent:g(v.ascender),descent:g(-v.descender),lineGap:g(v.lineGap)}},r),I=kR(L);if(I>this.#l)throw new Ee("shapedRunOverLimit",{limit:this.#l,actual:I});let S=CR(o,I);if(S>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),L;for(;this.#t.size>=this.#b||this.#r+S>this.#h;){let w=this.#t.keys().next().value;if(w===void 0)break;let T=this.#t.get(w);this.#t.delete(w),this.#r-=T.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:L,bytes:S}),this.#r+=S,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),L}catch(d){throw d instanceof Ee?d:new Ee("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},OR=(e={})=>new Id(zS(),e);var ne=(e,n,t)=>e>=n&&e<=t,Mi=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},BR=e=>{if(ne(e,65313,65338)||ne(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(ne(e,1424,1535)||ne(e,64285,64335))return {slot:"cs",script:"Hebr"};if(ne(e,1536,1791)||ne(e,1872,1919)||ne(e,2160,2207)||ne(e,2208,2303)||ne(e,64336,65023)||ne(e,65136,65279)||ne(e,126464,126719))return {slot:"cs",script:"Arab"};if(ne(e,4352,4607)||ne(e,11904,12351)||ne(e,12352,12543)||ne(e,12544,12687)||ne(e,12784,12799)||ne(e,13312,19903)||ne(e,19968,40959)||ne(e,44032,55215)||ne(e,63744,64255)||ne(e,65382,65437)||ne(e,65440,65500)||ne(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(ne(e,2304,2431)||ne(e,43232,43263))return {slot:"cs",script:"Deva"};if(ne(e,2432,2559))return {slot:"cs",script:"Beng"};if(ne(e,880,1023)||ne(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(ne(e,1024,1327)||ne(e,7296,7311)||ne(e,11744,11775)||ne(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(ne(e,3584,3711))return {slot:"cs",script:"Thai"};if(ne(e,6016,6143)||ne(e,6624,6655))return {slot:"cs",script:"Khmr"};if(ne(e,768,879)||ne(e,6832,6911)||ne(e,7616,7679)||ne(e,8400,8447)||ne(e,8192,8303)||ne(e,65056,65071)||e<=47||ne(e,58,64)||ne(e,91,96)||ne(e,123,191)||e===5760||ne(e,8192,11263)||ne(e,65024,65039)||ne(e,65280,65381)||ne(e,65438,65439)||ne(e,65501,65535)||ne(e,126976,129791)||ne(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(ne(e,192,687)||ne(e,7424,7551)||ne(e,7552,7615)||ne(e,7680,7935)||ne(e,11360,11391)||ne(e,42784,43007)||ne(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Mi(e)};function MR(e,n,t){let r=[];for(let s=0;s<e.length;){let l=e.codePointAt(s),d=s+(l>65535?2:1);r.push({from:s,to:d,classified:BR(l)}),s=d;}let o=null;for(let s of r)s.classified?o=s.classified:o&&(s.classified=o);o=null;for(let s=r.length-1;s>=0;s-=1){let l=r[s];l.classified?o=l.classified:o&&(l.classified=o);}let a=[],i=r.every(({from:s})=>e.codePointAt(s)<=127)?"ascii":"hAnsi";for(let s of r){let l=t.levels[n+s.from]??0,d=(l&1)===1?"rtl":"ltr",c=s.classified??{slot:i,script:"Zyyy"},u=a.at(-1);u&&u.to===s.from&&u.bidiLevel===l&&u.slot===c.slot&&u.script===c.script?a[a.length-1]={...u,to:s.to}:a.push({from:s.from,to:s.to,direction:d,bidiLevel:l,script:c.script,slot:c.slot});}return a}var FR="und";function LR(){return typeof Intl.Segmenter=="function"}function ER(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function NR(){let e=new(ER())("und",{granularity:"grapheme"});return {segment(n){let t=[],r=0;for(let o of e.segment(n)){let a=o.index,i=a+o.segment.length;t.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return t}}}var Cd=NR(),Od=Cd,Wp=0;function Bd(){return Wp}var eo=null,mr=null,Fi=null,ua=null;function $n(e){if(eo===e&&mr)return mr;if(Fi===e&&ua){let t=ua;return Fi=eo,ua=mr,eo=e,mr=t,t}let n=Od.segment(e);return Fi=eo,ua=mr,eo=e,mr=n,n}function AR(e){Od=e,Vp();}function DR(){Od=Cd,Vp();}function Vp(){Wp+=1,eo=null,mr=null,Fi=null,ua=null,Td=null,Li=null,kd=0;}function _R(e){return $n(e).length}var Td=null,Li=null,kd=0;function HR(e){if(Td===e&&Li)return {offsets:Li,count:kd};let n=$n(e),t=new Int32Array(e.length+1);for(let r of n)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)t[o]=r.index;return t[e.length]=n.length,Td=e,Li=t,kd=n.length,{offsets:t,count:n.length}}function Ei(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=HR(e);return r[t]}function zR(e,n){let t=$n(e);if(t.length===0)return 0;let r=Math.max(0,Math.min(n,t.length));return r>=t.length?e.length:t[r].utf16From}function Md(e){let n=new Set([0,e.text.length]);for(let r of $n(e.text))n.add(r.utf16From),n.add(r.utf16To);let t=new Set([0,e.text.length]);for(let r of e.clusters)t.add(r.textStart),t.add(r.textEnd);return [...n].filter(r=>t.has(r)).sort((r,o)=>r-o)}function Ni(e,n){return Md(e).includes(n)}function jR(e,n){return Ni(e,n)}function GR(e,n,t){return t>=n&&Ni(e,n)&&Ni(e,t)}function WR(e){let n=$n(e.text);return Md(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var Ld="und";function Kp(){return typeof Intl.Segmenter=="function"}function VR(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Ld})`);return e}function Up(){let e=new(VR())(Ld,{granularity:"word"});return {segment(n){let t=[];for(let r of e.segment(n)){let o=r.index,a=o+r.segment.length;t.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return t}}}var $R=/^[\p{L}\p{N}']$/u,XR=/^\s$/u;function $p(e){return $R.test(e)}function Xp(e){return XR.test(e)}function Fd(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function qp(e){let n=$n(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(Xp(o.text)){let a=r+1;for(;a<n.length&&Xp(n[a].text);)a+=1;t.push(Fd(n,r,a,false)),r=a;continue}if($p(o.text)){let a=r+1;for(;a<n.length&&$p(n[a].text);)a+=1;t.push(Fd(n,r,a,true)),r=a;continue}t.push(Fd(n,r,r+1,false)),r+=1;}return t}function Zp(){return {segment:qp}}function Jp(e={}){let n=e.isIntlAvailable??Kp,t=e.createIntlBoundary??Up,r=e.createFallbackBoundary??Zp;if(!n())return r();try{return t()}catch{return r()}}var Yp;function Qp(){return Yp??=Jp(),Yp}function YR(e,n=Qp()){return n.segment(e)}function KR(e,n){return n.map(t=>({graphemeFrom:Ei(e,t.utf16From),graphemeTo:Ei(e,t.utf16To),wordLike:t.wordLike}))}var em={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},Ad=Object.keys(em),nm=Ad.filter(e=>em[e]==="coarse-gate"),Ai=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},no=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},UR={resourceEpoch:Ai,configEpoch:Ai,extensionFingerprint:no,shapingHash:no,producerVersion:Ai},qR=(e,n)=>{UR[n](e[n],n);},to=e=>{for(let n of Ad)qR(e,n);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},ZR=(e,n)=>{let t=to(e),r=to(n),o=Ad.filter(a=>t[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},Ed=e=>{let n=e.map(({key:t,fingerprint:r})=>(no(t,"resource dependency key"),no(r,"resource dependency fingerprint"),Object.freeze({key:t,fingerprint:r}))).sort((t,r)=>t.key<r.key?-1:t.key>r.key?1:0);for(let t=1;t<n.length;t+=1)if(n[t-1].key===n[t].key)throw new TypeError(`Duplicate resource dependency: ${n[t].key}`);return Object.freeze(n)},JR=e=>(Ai(e.revision,"revision"),no(e.dependencyFingerprint,"dependencyFingerprint"),no(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:Ed(e.resourceDependencies),...to(e)})),QR=(e,n)=>{let t=Ed(e),r=Ed(n),o=Math.max(t.length,r.length);for(let a=0;a<o;a+=1){let i=t[a],s=r[a];if(i?.key!==s?.key||i?.fingerprint!==s?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??s.key}}return null};function ew(e,n){if(e.dependencyFingerprint!==n.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==n.inputFingerprint)return {hit:false,reason:"input-changed"};let t=QR(e.resourceDependencies,n.resourceDependencies);if(t)return t;for(let r of nm)if(e[r]!==n[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var Nd=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=ew(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:JR(r)});}evictEpoch(n){let t=to(n),r=0;for(let[o,a]of this.entries){let i=a.provenance;nm.some(s=>i[s]!==t[s])&&(this.entries.delete(o),r+=1);}return r}evictResources(n,t){let r=to(n),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(l=>t.get(l.key)!==l.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function Ve(e,n=false){return xn(e.fragments,n)}var tm=new WeakMap;function xn(e,n=false){let t=tm.get(e),r=n?"withRepeats":"withoutRepeats",o=t?.[r];if(o)return o;let a=[],i=s=>{for(let l of s){if(l.kind==="paragraph"){a.push(l);continue}for(let d of l.rows)if(!(d.isHeaderRepeat&&!n))for(let c of d.cells)i(c.blocks);}};return i(e),t||(t={},tm.set(e,t)),t[r]=a,a}function Dd(e){let n=[];for(let t of e.pages)for(let r of Ve(t))n.push(...r.lines);return n}function nw(e){return e.anchoredDrawings??[]}var rm=16;function fa(e,n){let t=o=>{if(o.kind==="table"){for(let a of o.rows)for(let i of a.cells)for(let s of i.blocks)t(s);return}for(let a of o.lines)for(let i of a.drawings??[])n(i);},r=(o,a)=>{if(!(a>rm)){for(let i of o.anchoredDrawings??[])n(i),i.textboxStory&&r(i.textboxStory,a+1);for(let i of o.fragments)t(i);}};r(e,0);}function _d(e,n){let t=(r,o)=>{if(!(o>rm)){for(let a of r.anchoredDrawings??[])a.textboxStory&&t(a.textboxStory,o+1);for(let a of xn(r.fragments,true))n(a);}};t(e,0);}function om(e,n){let t=[];for(let r of e.pages)for(let o of Ve(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function pa(e,n,t,r){for(let o of r??Dd(e)){let a=o.range.paragraphId===n?o.range.start:Number.NaN,i=o.range.paragraphId===n?o.range.end:Number.NaN;for(let s of o.spans)s.range.paragraphId===n&&(a=Number.isNaN(a)?s.range.start:Math.min(a,s.range.start),i=Number.isNaN(i)?s.range.end:Math.max(i,s.range.end));for(let s of o.drawings??[])s.paragraphId===n&&(a=Number.isNaN(a)?s.start:Math.min(a,s.start),i=Number.isNaN(i)?s.start+1:Math.max(i,s.start+1));if(!Number.isNaN(a)&&t>=a&&t<=i)return o}return null}function Di(e){return e.contentControls??[]}function ma(e){if(e.length===0)return null;let n=1/0,t=1/0,r=-1/0,o=-1/0;for(let a of e)n=Math.min(n,a.x),t=Math.min(t,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:n,y:t,width:r-n,height:o-t}}function _i(e){let n=false,t=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(n=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(t=true);return n&&t?"sdtContentLocked":n?"contentLocked":t?"sdtLocked":"unlocked"}var ga=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});var am=1,Hi=1;function ro(e){let n=Math.max(e,1),t=3;if(n>=t){let i=n/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:n,insetPt:0}}let r=1,o=1,a=Math.max(n,t);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(n-a)/2}}var tw=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function rw(e){return tw.has(e)}function im(e,n){return rw(e)?ro(n).extentPt:n}function zd(e){let n=false;for(let t of e){if(t.localName!=="pageBreakBefore")continue;let r=t.attributes?.val;n=r===void 0||ji(r);}return n}var lm=31680/20,ya=12,dm=3168,cm=14,ao=Object.freeze({rule:"auto",value:240}),ow=132,aw=1584,um=["top","left","bottom","right","between","bar"],iw=Object.freeze({}),sw=/^[0-9A-Fa-f]{6}$/,lw=new Set(["nil","none"]);function zi(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function Hd(e,n){return !Number.isFinite(e)||e<=0?0:e>n?n:e}function sm(e){let n=zi(e,true);return n===null?0:Hd(id(gd(n)),lm)}function ji(e){return e!=="0"&&e!=="false"&&e!=="off"}function dw(e){return e===void 0||e==="auto"?null:sw.test(e)?e.toUpperCase():null}function ha(e,n){return e.attributes.find(t=>t.localName===n)?.value}function lt(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function uO(e,n){let t=null;for(let r of e)r.localName===n&&(t={...t??{},...r.attributes??{}});return t}function jd(e,n){let t=0,r=0,o=false,a=false;for(let i of e){if(i.localName!=="spacing")continue;let s=i.attributes?.before,l=i.attributes?.after;s!==void 0&&(t=sm(s)),l!==void 0&&(r=sm(l));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=ji(d)),c!==void 0&&(a=ji(c));}if(o||a){let i=n?.inList||n?.inTableCell?0:cm;o&&(t=i),a&&(r=i);}return {before:t,after:r}}function Gd(e){let n,t;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(n=i);let s=a.attributes?.line;if(s!==void 0){let l=zi(s,true);l!==null&&(t=l);}}if(t===void 0)return ao;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,ow)*240}:ao}let o=t/20;return o>0?{rule:r,value:Math.min(o,aw)}:ao}function Wd(e,n,t){let r=e.rule==="auto"?n*(e.value/240):e.rule==="exact"?e.value:Math.max(n,e.value),o=r-n;return o<0?{height:r,baseline:Math.max(0,Math.min(t,r))}:e.rule==="exact"?{height:r,baseline:t+o/2}:{height:r,baseline:t}}function Vd(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r===void 0||ji(r);}return n}function oo(e){if(!e)return;let n=ha(e,"val");if(!n||lw.has(n))return;let t=zi(ha(e,"sz")),r=t===null?.5:Hd(t/8,ya)||.5,o=zi(ha(e,"space")),a=o===null?0:Hd(o,dm),i=ha(e,"shadow"),s=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:dw(ha(e,"color")),widthPt:r,spacePt:a,...s?{shadow:true}:{}}}function fm(e){let n=oo(lt(e,"top")),t=oo(lt(e,"left")??lt(e,"start")),r=oo(lt(e,"bottom")),o=oo(lt(e,"right")??lt(e,"end")),a=oo(lt(e,"between")),i=oo(lt(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function It(e){if(!e||e.kind==="textValue")return {};let n=lt(e,"pBdr");return n?fm(n):{}}function ba(e){let n=iw;for(let t of e){if(!t||t.kind==="textValue")continue;let r=lt(t,"pBdr");r&&(n=fm(r));}return n}function wn(e){return im(e.val,e.widthPt)}function Vt(e){return e?e.spacePt+wn(e):0}function cw(e){return Vt(e)}function $d(e){let n=[];for(let t of um){let r=e[t];r&&n.push(`${t}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return n.join("|")}function io(e,n){return Math.max(e,n)-n}function Xd(e,n,t,r){return t&&!r?0:io(e,n)}var uw=/^[0-9A-Fa-f]{6}$/;function Gi(e){if(!(e===void 0||e==="auto"||e==="nil")&&uw.test(e))return e.toUpperCase()}function xa(e){if(e&&e.val!=="nil")return Gi(e.fill)}function Yd(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return xa(n)}function Kd(e){let n;for(let t of e)t.localName==="shd"&&(n=xa(t.attributes));return n}function Sa(e,n,t){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:n,y:r,width:t,height:Math.max(o.y+o.height-r,0)}}var fw=64,pw=31680,mw=720,gw=36,Ud=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),so=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),hw=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),yw=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function Ra(e){return e.kind!=="textValue"}function Wi(e,n){return e.attributes.find(t=>t.localName===n)?.value}function qd(e,n){for(let t of e.children)if(Ra(t)&&t.localName===n)return t}function pm(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function bw(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function mm(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!Ra(r)||r.localName!=="tab")continue;let o=bw(pm(Wi(r,"pos"))??NaN);if(o===null)continue;let a=Wi(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=hw.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let s=Wi(r,"leader");e.set(o,{alignment:i,...s!==void 0&&yw.has(s)?{leader:s}:{}});}}function gm(e,n=36){let t=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<t.length&&o<64;o+=1){let[a,i]=t[o];r.push({positionPt:a/20,alignment:i.alignment,...xw(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function xw(e){return e.leader?{leader:e.leader}:{}}function Zd(e){let n=new Map;for(let t of e)!t||!Ra(t)||mm(n,qd(t,"tabs"));return gm(n)}function Jd(e){if(!e||!Ra(e))return so;let n=new Map;return mm(n,qd(e,"tabs")),gm(n)}function wa(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function Sw(e){if(!e||!Ra(e))return 36;let n=qd(e,"defaultTabStop");if(!n)return 36;let t=pm(Wi(n,"val"));return t===null||t<=0||t>31680?36:t/20}function lo(e,n,t){let r=Math.max(n,t);for(let i of e.stops)if(i.positionPt>n)return {positionPt:Math.min(i.positionPt,r),alignment:i.alignment,...i.leader?{leader:i.leader}:{}};let o=e.defaultIntervalPt>0?e.defaultIntervalPt:36,a=Math.ceil((n+1e-9)/o)*o;return a<=n&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function Qd(e,n,t,r,o){let a=t;switch(e){case "center":a=t-r/2;break;case "right":a=t-r;break;case "decimal":a=t-o;break;default:a=t;}let i=a-n;return i>0?i:0}function gr(e){return `tabs(${e.stops.map(t=>`${t.alignment}@${Math.round(t.positionPt*1e3)}${t.leader?`/${t.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var Vi=4,hm=4096,$t=64,rc=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),ym=/\s*\\\*\s*MERGEFORMAT\s*$/i;function Ia(e){if(e.length>Uc$1)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>Uc$1?null:n.replace(ym,"").trim()}var Rw=/\s*\\#\s*(?:"([^"]*)"|([^\\"]+))$/;function ww(e){if(e.length>Uc$1)return null;let n=e.replace(/\s+/g," ").trim();if(n.length>Uc$1)return null;let t=n.replace(ym,"").trim(),r=Rw.exec(t);if(!r)return {keyword:t.toUpperCase(),picture:void 0};let o=r[1]??r[2]??"";return {keyword:t.slice(0,r.index).trim().toUpperCase(),picture:o.length>0?o:void 0}}function co(e){let n=ww(e);if(n===null)return null;let{keyword:t,picture:r}=n;return t!=="PAGE"&&t!=="NUMPAGES"&&t!=="SECTIONPAGES"?null:r===void 0?{kind:t}:{kind:t,picture:r}}function bm(e){return co(e)?.kind??null}function Pn(e,n){return Jc$1(e,n)}function hr(e){return Kc$1(e)}function oc(){return {nodes:0,exhausted:false}}function vt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>hm?(e.exhausted=true,false):true)}function va(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function Pa(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="idle",e.inner.length=0;}function $i(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function Pw(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function Ta(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="instruction",e.inner.length=0),e.nesting+=1,e.nesting>Vi?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function uo(e){return e.nesting<2||e.nesting>Vi?null:e.inner[e.nesting-2]??null}function xm(e){if(e.nesting===1)return e.phase==="instruction";let n=uo(e);return n!==null&&!n.separated}function nc(e,n){if(!xm(e))return false;if(e.nesting===1)return n?!e.deletedInstructionOverflow:!e.instructionOverflow;let t=uo(e);return n?!t.deletedOverflow:!t.overflow}function Sm(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let n=uo(e);n&&(n.sawLive=true);}function tc(e,n){if(e.nesting===1){n?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let t=uo(e);t&&(n?(t.deletedOverflow=true,t.deletedInstruction=""):(t.overflow=true,t.instruction=""));}function ec(e){tc(e,false),tc(e,true);}function Iw(e,n,t=false){if(!nc(e,t))return;let r=uo(e);t||Sm(e);let o=r?t?r.deletedInstruction:r.instruction:t?e.deletedInstruction:e.instruction;if(o.length+n.length>Uc$1){tc(e,t);return}r?t?r.deletedInstruction=o+n:r.instruction=o+n:t?e.deletedInstruction=o+n:e.instruction=o+n;}function ka(e,n,t,r){if(!xm(e))return;let o=Lc$1(n);if(o||Sm(e),!nc(e,o))return;if(r>$t){ec(e);return}let a=[],i=n.kind==="textValue"?[]:n.children??[];for(let s=i.length-1;s>=0;s-=1)a.push({node:i[s],depth:r+1});for(;a.length>0;){let s=a.pop();if(!vt(t)){ec(e);return}if(s.depth>$t){ec(e);return}if(s.node.kind==="textValue"){if(Iw(e,s.node.value,o),!nc(e,o))return;continue}let l=s.node.children??[];for(let d=l.length-1;d>=0;d-=1)a.push({node:l[d],depth:s.depth+1});}}function Ca(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=$i(e);return r.overflow?null:co(r.instruction)}let n=uo(e);if(!n||n.separated)return null;n.separated=true;let t=Pw(n);return t.overflow?null:co(t.instruction)}function Oa(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&Pa(e);}function Rm(e){return e.phase==="instruction"&&e.nesting>=1}function wm(e){return e.phase==="result"&&e.nesting>=1}function ac(e){let n=false,t=false,r=false,o=oc(),a=va(),i=()=>n&&t&&r,s=p=>{p==="PAGE"?n=true:p==="NUMPAGES"?t=true:r=true;},l=false,d=[],c=(p,m)=>{if(p.kind!=="runProperties"){if(Pn(p,"begin")){Ta(a),a.nestingOverflow&&(l=true);return}if(hr(p)){ka(a,p,o,m);return}if(Pn(p,"separate")){let g=a.nesting,h=a.phase,y=Ca(a);if(l)return;y&&(g<=1||h==="result")&&d.push(y.kind);return}if(Pn(p,"end")&&(Oa(a),a.nesting===0)){if(!l)for(let g of d)s(g);d.length=0;}}},u=(p,m)=>{if(p.kind==="run")for(let g of p.children){if(!vt(o))return;if(c(g,m+1),(g.kind==="drawing"||g.kind==="generic")&&!hr(g)&&"children"in g&&g.children.length>0){let h={...a,inner:a.inner.map(k=>({...k}))},y=l,x=d;d=[],f(g,m+1),Object.assign(a,h),l=y,d=x;}if(i()||o.exhausted)return}},f=(p,m)=>{if(!i()&&vt(o)&&!(m>$t)&&p.kind!=="textValue"){if(p.kind==="paragraph"){Pa(a),l=false,d.length=0;for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return;Pa(a),l=false,d.length=0;return}if(p.kind==="run"){u(p,m);return}if(Mc$1(p)){let g=bm(Oc$1(p)??"");if(g){s(g);return}}for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return}};return f(e,0),!n&&!t&&!r?rc:{hasPage:n,hasNumPages:t,hasSectionPages:r}}function Xi(e,n){if(!Number.isFinite(e)||e<0||n.length===0||n.length>64||n.includes(".")||n.includes(";")||n.includes("'"))return null;let t=String(Math.floor(e)),r=[],o=false;for(let m=0;m<n.length;m+=1)r.push(o),n[m]==="0"&&(o=true);let a=t.length,i=false,s=0,l=0,d=[],c=-1;for(let m=n.length-1;m>=0;m-=1){let g=n[m];if(g==="0"||g==="#"){i=true,s+=1,c=d.length,a>0?(a-=1,d.push(t[a])):d.push(g==="0"?"0":" ");continue}if(g===","){l===0&&(l=s),s=0,(a>0||r[m])&&(c=d.length,d.push(","));continue}d.push(g);}if(!i)return null;let u=[];for(;a>0;)l>0&&s>=l&&(u.push(","),s=0),a-=1,s+=1,u.push(t[a]);let f=d.slice(c+1).reverse().join(""),p=d.slice(0,c+1).reverse().join("");return f+u.reverse().join("")+p}var vw=64,Tw=64,kw=[{value:1e3,glyph:"M"},{value:900,glyph:"CM"},{value:500,glyph:"D"},{value:400,glyph:"CD"},{value:100,glyph:"C"},{value:90,glyph:"XC"},{value:50,glyph:"L"},{value:40,glyph:"XL"},{value:10,glyph:"X"},{value:9,glyph:"IX"},{value:5,glyph:"V"},{value:4,glyph:"IV"},{value:1,glyph:"I"}];function Tt(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function Xt(e){return String(Tt(e))}function Pm(e){let n=Tt(e);return n<10?`0${n}`:String(n)}function ic(e){let n=Tt(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of kw)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function Im(e){return ic(e).toLowerCase()}function sc(e){let n=Tt(e),t="";for(;n>0&&t.length<8;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t||"A"}function vm(e){return sc(e).toLowerCase()}function Cw(e){let n=Tt(e),t=n%100,r=n%10,o=t>=11&&t<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${n}${o}`}function Ow(e){return Tt(e).toString(16).toUpperCase()}function Bw(e){let n=["*","\u2020","\u2021","\xA7"],t=Tt(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,Mw);return n[r].repeat(o)}var Mw=8,Yi=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Fw=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Ki(e){let n=Tt(e);if(n<20)return Yi[n];if(n<100){let r=n%10;return Fw[Math.floor(n/10)]+(r===0?"":`-${Yi[r]}`)}if(n<1e3){let r=n%100;return `${Yi[Math.floor(n/100)]} hundred${r===0?"":` ${Ki(r)}`}`}let t=n%1e3;return `${Yi[Math.floor(n/1e3)]} thousand${t===0?"":` ${Ki(t)}`}`}function Tm(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function Lw(e){return Tm(Ki(e))}var Ew=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function Nw(e){let n=Ew.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function Aw(e){let n=Ki(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return Tm(r+Nw(n.slice(t+1)))}function kt(e,n){switch(e){case "decimal":return Xt(n);case "decimalZero":return Pm(n);case "upperRoman":return ic(n);case "lowerRoman":return Im(n);case "upperLetter":return sc(n);case "lowerLetter":return vm(n);case "ordinal":return Cw(n);case "cardinalText":return Lw(n);case "ordinalText":return Aw(n);case "hex":return Ow(n);case "chicago":return Bw(n);case "numberInDash":return `- ${Xt(n)} -`;case "none":case "bullet":return "";default:return Xt(n)}}function lc(e,n,t){let r=e.length>64?e.slice(0,64):e,o="";for(let a=0;a<r.length&&!(o.length>=64);a+=1){let i=r[a];if(i==="%"&&a+1<r.length){let s=r[a+1];if(s>="1"&&s<="9"){let l=Number(s)-1,d=t[l]??"decimal",c=n[l]??1,u=d==="bullet"?"":kt(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}var km="0";function Yt(e,n){return e!=="PAGE"||!n||n==="decimal"}function qi(e,n,t){return n===void 0||!Yt(e,t)?km:Xi(0,n)??km}function cc(e,n){if(!Number.isFinite(e)||e<0)return "";let t=Math.floor(e),r=n&&n.length>0?n:"decimal";if(r==="none"||r==="bullet")return Xt(t);let o=kt(r,t);return o.length>0?o:Xt(t)}function Ct(e,n,t){if(e==="PAGE"){if(t!==void 0&&Yt(e,n.format)){let o=Xi(n.pageNumber,t);if(o!==null)return o}return cc(n.pageNumber,n.format)}let r=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;if(!Number.isFinite(r)||r<0)return "";if(t!==void 0){let o=Xi(r,t);if(o!==null)return o}return Xt(Math.floor(r))}function Kt(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function uc(e,n=rc){if(!e||!Kt(n))return "";let t=[];return n.hasPage&&(t.push(`p${e.pageNumber}`),e.format&&t.push(`f${e.format}`)),n.hasNumPages&&t.push(`n${e.pageCount}`),n.hasSectionPages&&t.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${t.join("/")}`}function fo(e,n,t,r){let o=false,a=e.map((i,s)=>{let l=n+s,d=i.pageFieldSource;return d&&d.pageNumber===l&&d.sectionPageCount===t&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:l,sectionPageCount:t,...r?{format:r}:{}}})});return o?a:e}function Dw(e){for(let n of e.spans)if(n.fieldAtom?.pageField)return true;return false}function Cm(e){if(e.kind==="paragraph"){for(let n of e.lines)if(Dw(n))return true;return false}for(let n of e.rows)for(let t of n.cells)for(let r of t.blocks)if(Cm(r))return true;return false}function fc(e,n){let t=n,r=false;for(let o of e)t=Math.max(t,o.box.y+o.box.height),!r&&Cm(o)&&(r=true);return {usedBottom:t,hasBodyPageFields:r}}function _w(e,n){let t=null;for(let r=0;r<e.spans.length;r+=1){let o=e.spans[r],a=o.fieldAtom?.pageField;if(!a)continue;let i=Ct(a.kind,n,a.picture);i!==o.text&&(t||(t=e.spans.slice()),t[r]={...o,text:i});}return t?{...e,spans:t}:e}function Om(e,n){let t=null;for(let r=0;r<e.length;r+=1){let o=e[r],a=o;if(o.kind==="paragraph"){let i=null;for(let s=0;s<o.lines.length;s+=1){let l=o.lines[s],d=_w(l,n);d!==l&&(i||(i=o.lines.slice()),i[s]=d);}i&&(a={...o,lines:i});}else {let i=null;for(let s=0;s<o.rows.length;s+=1){let l=o.rows[s],d=null;for(let c=0;c<l.cells.length;c+=1){let u=l.cells[c],f=Om(u.blocks,n);f!==u.blocks&&(d||(d=l.cells.slice()),d[c]={...u,blocks:f});}d&&(i||(i=o.rows.slice()),i[s]={...l,cells:d});}i&&(a={...o,rows:i});}a!==o&&(t||(t=e.slice()),t[r]=a);}return t??e}var Ui=new WeakMap;function Hw(e,n){return e.pageNumber===n.pageNumber&&e.pageCount===n.pageCount&&(e.sectionPageCount??e.pageCount)===(n.sectionPageCount??n.pageCount)&&e.format===n.format}function pc(e,n,t){let r=Ui.get(e);r&&Ui.set(n,{context:r.context,projector:r.projector,dy:r.dy+t});}var dc=new WeakMap;function Ut(e){let n=e.pages.length;if(n===0)return e;let t=false,r=e.pages.map(o=>{let a=dc.get(o);if(a&&a.pageCount===n)return a.result!==o&&(t=true),a.result;let i=o.pageFieldSource,s={pageNumber:i?.pageNumber??o.index+1,pageCount:n,sectionPageCount:i?.sectionPageCount??n,...i?.format?{format:i.format}:{}},l=p=>{if(!p)return p;let m=p.pageFieldProjector,g=0;if(!m){let v=Ui.get(p);if(!v||Hw(v.context,s))return p;m=v.projector,g=v.dy;}t=true;let h=m(s),{pageFieldProjector:y,box:x,...k}=h,B={...k,box:g===0?x:{...x,y:x.y+g}};return Ui.set(B,{context:s,projector:m,dy:g}),B},d=l(o.header),c=l(o.footer),u=o.hasBodyPageFields===false?o.fragments:Om(o.fragments,s);if(d===o.header&&c===o.footer&&u===o.fragments)return dc.set(o,{pageCount:n,result:o}),o;u!==o.fragments&&(t=true);let f={...o,...d!==void 0?{header:d}:{},...c!==void 0?{footer:c}:{},...u!==o.fragments?{fragments:u}:{}};return dc.set(o,{pageCount:n,result:f}),f});return t?{revision:e.revision,pages:r}:e}var zw=`
2
+ \r`,jw=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function Bm(e,n){let t=n;for(;t<e.length&&zw.includes(e[t]);)t+=1;return t}function Mm(e,n){if(e[n]==='"'){let r=n+1;for(;r<e.length&&e[r]!=='"';)r+=1;return r<e.length?r+1:r}let t=n;for(;t<e.length&&!`
3
+ \r"`.includes(e[t]);)t+=1;return t}function Zi(e){if(e.length===0||e.length>256)return null;let n=Bm(e,0);if(e[n]==='"')return null;let t=Mm(e,n),r=e.slice(n,t).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=Bm(e,t);if(o>=e.length)return null;let a=Mm(e,o),i=e.slice(a).trim();for(;;){let s=i.replace(jw,"").trimEnd();if(s===i)break;i=s;}if(i[0]==='"'){let s=i.indexOf('"',1);s===-1?i=i.slice(1):s===i.length-1&&(i=i.slice(1,-1));}return i.length===0?null:{display:i}}var Fm=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),Gw=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function Ww(e){let n=e;for(;;){let t=n.replace(Gw,"").trimEnd();if(t===n)return n;n=t;}}function Vw(e){let n=e.trimStart();if(n.length===0)return null;if(n[0]==='"'){let o=n.indexOf('"',1),a=o===-1?n.slice(1):n.slice(1,o);return a.length>0?a:null}let t=n.search(/\s/),r=t===-1?n:n.slice(0,t);return r.length>0?r:null}function Ji(e){let n=Ia(e);if(n===null||n.length===0)return null;let t=Ww(n),r=Fm[t];if(r)return {property:r};if(!t.startsWith("DOCPROPERTY"))return null;let o=t.slice(11);if(o.length===0||!/^\s/.test(o))return null;let a=Vw(o);if(a===null)return null;let i=Fm[a];return i?{property:i}:null}function Qi(e,n){if(!n)return null;let t=n[e.property];return t!==void 0&&t.length>0?t:null}var $w=Uc$1,Xw=2048,Yw=256;function Kw(e){let n=[],t=0;for(;t<e.length;){let r=e[t];if(r===" "||r===" "||r===`
4
+ `||r==="\r"){t+=1;continue}if(r==='"'){let a=t+1;for(;a<e.length&&e[a]!=='"';)a+=1;n.push({value:e.slice(t+1,a),quoted:true}),t=a<e.length?a+1:a;continue}let o=t;for(;o<e.length&&!`
5
+ \r"`.includes(e[o]);)o+=1;n.push({value:e.slice(t,o),quoted:false}),t=o;}return n}var Uw=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function es(e){if(e.length===0||e.length>$w)return null;let n=Kw(e);if(n.length<2)return null;let t=n[0];if(t.quoted||t.value.toUpperCase()!=="HYPERLINK")return null;let r=null,o=false,a=null,i=false,s=null,l=false;for(let d=1;d<n.length;d+=1){let c=n[d];if(!c.quoted&&c.value.startsWith("\\")){let u=c.value.toLowerCase();if(!Uw.has(u))continue;let f=n[d+1];if(!f||!f.quoted&&f.value.startsWith("\\"))continue;d+=1;let p=f.value.length>0&&f.value.length<=Yw;u==="\\l"?i||(i=true,p&&(a=f.value)):u==="\\o"&&(l||(l=true,p&&(s=f.value)));continue}o||(o=true,c.value.length>0&&c.value.length<=Xw&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:s}}function Ba(e){if(e.kind==="text"||e.kind==="deletedText"){let n="";for(let t of e.children)t.kind==="textValue"&&(n+=t.value);return n}return e.kind==="tab"?" ":e.kind==="hardBreak"?Cc$1(e):""}function po(e){if(!e||e.kind==="textValue")return [];let n=[];for(let t of e.children){if(t.kind==="textValue")continue;let r={};for(let o of t.attributes)r[o.localName]=o.value;n.push(Object.keys(r).length>0?{localName:t.localName,attributes:r}:{localName:t.localName});}return n}function ns(e,n,t){let r=po(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}var dt=Object.freeze({fontFamily:null,fontSizePt:10,color:null,bold:false,italic:false,underline:null,strike:false,doubleStrike:false,highlight:null,shading:null,verticalAlign:"baseline",baselineShiftPt:0,caps:false,smallCaps:false,characterSpacingPt:0,horizontalScalePercent:100,kerningMinPt:0,hidden:false}),qw=/^[0-9A-Fa-f]{6}$/;function qt(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function Ma(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function Lm(e){return e===void 0||e==="auto"?null:qw.test(e)?e.toUpperCase():null}function Em(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function Ne(e,n){let t={...dt};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?Em(o?.asciiTheme,n)??Em(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=Ma(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=Lm(r.attributes?.val);break}case "b":t.bold=qt(r);break;case "i":t.italic=qt(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!qt(r)?null:{variant:o,color:Lm(r.attributes?.color)};break}case "strike":t.strike=qt(r);break;case "dstrike":t.doubleStrike=qt(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=xa(r.attributes)??null;break}case "vertAlign":{let o=r.attributes?.val;o==="superscript"||o==="subscript"?t.verticalAlign=o:o==="baseline"&&(t.verticalAlign="baseline");break}case "position":{let o=Ma(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=qt(r);break;case "smallCaps":t.smallCaps=qt(r);break;case "spacing":{let o=Ma(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=Ma(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=Ma(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=qt(r);break;}return t}function Zt(e,n){return n.caps?e.toUpperCase():e}function Nn(e,n,t){return t.measure(Zt(e,n),n)}function Zw(e,n){return e.fontFamily===n.fontFamily&&e.fontSizePt===n.fontSizePt&&e.color===n.color&&e.bold===n.bold&&e.italic===n.italic&&e.strike===n.strike&&e.doubleStrike===n.doubleStrike&&e.highlight===n.highlight&&e.shading===n.shading&&e.verticalAlign===n.verticalAlign&&e.baselineShiftPt===n.baselineShiftPt&&e.caps===n.caps&&e.smallCaps===n.smallCaps&&e.characterSpacingPt===n.characterSpacingPt&&e.horizontalScalePercent===n.horizontalScalePercent&&e.kerningMinPt===n.kerningMinPt&&e.hidden===n.hidden&&e.underline?.variant===n.underline?.variant&&e.underline?.color===n.underline?.color}function mc(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var Jw=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),Nm=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),Am=new Map([[167,"\u25AA"],[183,"\u2022"]]),Dm=new Map([["symbol",Jw],["wingdings",Nm],["wingdings 2",Am],["wingdings 3",Am],["webdings",Nm]]),Qw=64;function Fa(e){return !e||e.length>Qw?false:Dm.has(e.toLowerCase())}function mo(e,n,t){if(e.length===0||!Fa(n))return e;let r=Dm.get(n.toLowerCase());if(t?.(n)===true)return e;let o="",a=false;for(let i of e){let s=i.codePointAt(0);if(s>=61440&&s<=61695){let l=r.get(s-61440);if(l!==void 0){o+=l,a=true;continue}}o+=i;}return a?o:e}var Jt=61440,La=61695,gc=128;function go(e){return e.kind==="generic"&&e.namespaceUri===ca$1&&e.localName==="sym"}function _m(e,n){if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes)if(t.localName===n&&(t.namespaceUri===ca$1||t.namespaceUri===""))return t.value}}function eP(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function ts(e){return !(!Number.isInteger(e)||e<32||e>1114111||e>=127&&e<=159||e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65534)===65534||e===65532)}function ho(e){if(!go(e))return null;let n=eP(_m(e,"char"));if(n===null)return null;let t=_m(e,"font"),r=t&&t.length<=gc?t:null,o=Fa(r),a=o&&n<=255&&n+Jt<=La?n+Jt:n;if(o&&a>=Jt&&a<=La){let i=mo(String.fromCodePoint(a),r),s=i.codePointAt(0)<Jt;return {text:i,font:r,unicode:s}}return ts(n)?{text:String.fromCodePoint(n),font:r,unicode:n<57344||n>63743}:null}function hc(e,n,t){if(!n.font)return {props:e,style:Ne(e,t)};let r=[...e,{localName:"rFonts",attributes:{ascii:n.font,hAnsi:n.font}}];return {props:r,style:Ne(r,t)}}var nP=256,tP=9;function rP(e){let n=[],t=0;for(;t<e.length;){let r=e[t];if(r===" "||r===" "||r===`
6
+ `||r==="\r"){t+=1;continue}if(r==='"'){let a=t+1;for(;a<e.length&&e[a]!=='"';)a+=1;n.push({value:e.slice(t+1,a),quoted:true}),t=a<e.length?a+1:a;continue}let o=t;for(;o<e.length&&!`
7
+ \r"`.includes(e[o]);)o+=1;n.push({value:e.slice(t,o),quoted:false}),t=o;}return n}function oP(e){if(e.quoted)return null;let n=e.value;if(n.length===0||n.length>tP)return null;let t;if(n.startsWith("0x")||n.startsWith("0X")){let r=n.slice(2);if(!/^[0-9A-Fa-f]{1,6}$/.test(r))return null;t=Number.parseInt(r,16);}else {if(!/^\d{1,7}$/.test(n))return null;t=Number.parseInt(n,10);}return t>1114111||t>=55296&&t<=57343?null:t}function rs(e){if(e.length===0||e.length>nP)return null;let n=rP(e);if(n.length<2)return null;let t=n[0];if(t.quoted||t.value.toUpperCase()!=="SYMBOL")return null;let r=oP(n[1]);if(r===null)return null;let o=null,a=null,i=false;for(let s=2;s<n.length;s+=1){let l=n[s];if(l.quoted||!l.value.startsWith("\\"))continue;let d=l.value.toLowerCase();if(d==="\\f"){let c=n[s+1];c&&c.value.length>0&&c.value.length<=gc&&(c.quoted||!c.value.startsWith("\\"))&&(o=c.value,s+=1);continue}if(d==="\\s"){let c=n[s+1];if(c&&(c.quoted||!c.value.startsWith("\\"))&&(s+=1,/^\d{1,3}$/.test(c.value))){let u=Number(c.value);u>=1&&u<=999&&(a=u);}continue}d==="\\u"&&(i=true);}return {code:r,font:o,sizePt:a,unicode:i}}function os(e,n,t){let r=[];e.font&&r.push({localName:"rFonts",attributes:{ascii:e.font,hAnsi:e.font}}),e.sizePt!==null&&r.push({localName:"sz",attributes:{val:String(e.sizePt*2)}});let o=r.length>0?[...n,...r]:n,a=Ne(o,t);if(e.unicode)return ts(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(Fa(i)){let s=e.code<=255&&e.code+Jt<=La?e.code+Jt:e.code;if(s>=Jt&&s<=La)return {text:mo(String.fromCodePoint(s),i),props:o,style:a}}return ts(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function as(){let e=null,n=0,t=false,r=false,o=()=>{e=null,n=0,t=false,r=false;};return {get active(){return e!==null},onSeparate(a,i){e===null&&a!==null&&(e=a,n=i,t=false,r=false);},onEnd(a,i){if(e===null||a>n)return null;let s=a===n,d=s&&i&&!(t&&!r)?Ct(e.kind,i,e.picture):"";return o(),s?d:null},reset:o,noteResult(a){t=true,a&&(r=true);}}}var ze="all-markup",ss=Object.freeze([]),aP=32,iP={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function Ot(e,n){for(let t of e.attributes)if(t.localName===n&&t.namespaceUri===e.namespaceUri&&(t.kind==="wmlVal"||t.kind==="genericExtension"||t.kind==="xmlSpace"))return t.value}function yo(e){if(e.kind==="textValue")return null;let n=iP[e.kind];if(n===void 0)return null;let t=Ot(e,"date");return {kind:n,id:Ot(e,"id")??"",author:Ot(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function bo(e,n){return e.length===0?[n]:[...e,n]}function yr(e){return e.kind!=="textValue"&&ja$1(e.kind)}var xo=aP;function ke(e,n){if(n==="all-markup"||e.length===0)return true;for(let t of e)if(n==="proposed"?t.kind==="delete"||t.kind==="moveFrom":t.kind==="insert"||t.kind==="moveTo")return false;return true}function br(e){if(e.kind==="textValue")return is;let n=e.children.find(o=>o.kind==="paragraphProperties");if(!n||n.kind==="textValue")return is;let t=n.children.find(o=>o.kind==="runProperties");if(!t||t.kind==="textValue")return is;let r=[];for(let o of t.children){if(o.kind==="textValue"||o.namespaceUri!==ca$1)continue;let a=sP[o.localName];if(a===void 0)continue;let i=Ot(o,"date");r.push({kind:a,id:Ot(o,"id")??"",author:Ot(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:is}var sP={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function So(e){if(e.kind==="textValue")return null;let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n||n.kind==="textValue")return null;let t=n.children.find(r=>r.kind==="runProperties");if(!t||t.kind==="textValue")return null;for(let r of t.children){if(r.kind==="textValue"||r.namespaceUri!==ca$1||r.localName!=="rPrChange")continue;let o=Ot(r,"date");return {kind:"format",id:Ot(r,"id")??"",author:Ot(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var is=Object.freeze([]);function yc(e){return e.find(n=>Hm(n))??e[0]}function Hm(e){return e.kind==="delete"||e.kind==="moveFrom"}function ls(e,n){let t=yc(e);return {...t?{markRevisions:e,markRevision:t}:{},...n?{markFormatRevision:n}:{}}}function lP(e){return yc(br(e))??null}function dP(e){for(let n of e){if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")continue;let t=n.attributes??{},r=t.date;return {kind:"format",id:t.id??"",author:t.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function Xn(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}function cP(e){let{simple:n,depth:t,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:s,cascadeRuns:l,themeFonts:d}=e,c="",u,f,p=false,m=va(),g=as(),h=(x,k)=>{u||(u=x,f=k);},y=(x,k,B)=>{if(!(x.kind==="textValue"||k>$t)){for(let v of x.children)if(v.kind!=="textValue"){if(!vt(o))return;if(v.kind==="run"){let L=ns(v,s,l),I=Ne(L,d);for(let S of v.children){if(S.kind==="runProperties")continue;if(Pn(S,"begin")){Ta(m),m.nesting===1&&g.reset();continue}if(hr(S)){ka(m,S,o,k+1);continue}if(Pn(S,"separate")){let b=m.nesting,W=m.phase,_=Ca(m);(b===1||W==="result"&&!m.nestingOverflow)&&g.onSeparate(r?_:null,b);continue}if(Pn(S,"end")){let b=g.onEnd(m.nesting,r);b!==null&&(c+=b),Oa(m);continue}if(Rc$1(S))continue;if(go(S)){if(ke(B,i)&&(p=true),g.active){g.noteResult(!I.hidden&&ke(B,i));continue}let b=ho(S);if(!b?.unicode||I.hidden||!ke(B,i))continue;h(L,I),c+=b.text;continue}let w=Ba(S);if(w.length===0)continue;let T=Xn(B),N=!ke(B,i)||S.kind==="deletedText"&&!T;N||(p=true);let M=I.hidden||N;if(g.active){g.noteResult(!M),M||h(L,I);continue}M||(h(L,I),c+=w);}continue}if(Mc$1(v)){let L=g.active?null:co(Oc$1(v)??"");if(L&&r){if(!ke(B,i))continue;let I=c.length;y(v,k+1,B),c=c.slice(0,I),c+=Ct(L.kind,r,L.picture);continue}y(v,k+1,B);continue}if(v.kind==="hyperlink"){y(v,k+1,B);continue}if(yr(v)&&B.length<xo){let L=yo(v);y(v,k+1,L?bo(B,L):B);continue}y(v,k+1,B);}}};return y(n,t,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:p}}function zm(e){let{simple:n,pageContext:t,inheritedRunProperties:r,themeFonts:o}=e,a=cP(e),i=Oc$1(n)??"",s=a.resultProps??r,l=co(i);if(l&&t){let g=a.resultStyle??Ne(r,o);return g.hidden?null:{text:Ct(l.kind,t,l.picture),props:s,style:g}}if(l&&e.bodyPageFields&&!t&&a.text.length===0&&!a.sawResultContent){let g=a.resultStyle??Ne(r,o);if(g.hidden)return null;let y=l.picture!==void 0&&Yt(l.kind,e.bodyPageFields.format)?l.picture:void 0;return {text:qi(l.kind,y,e.bodyPageFields.format),props:s,style:g,pageField:y===void 0?{kind:l.kind}:{kind:l.kind,picture:y}}}let d=rs(i);if(d){let g=os(d,s,o);if(g)return g.style.hidden?null:{text:g.text,props:g.props,style:g.style}}let c=a.text.length===0&&!a.sawResultContent;if(c){let g=Ji(i);if(g){let h=Qi(g,e.documentProperties);if(h!==null){let y=a.resultStyle??Ne(r,o);return y.hidden?null:{text:h,props:s,style:y}}}}let u=c?Zi(i):null;if(u){let g=a.resultStyle??Ne(r,o);return g.hidden?null:{text:u.display,props:s,style:g}}if(a.text.length===0)return null;let f=a.resultStyle??Ne(r,o);if(f.hidden)return null;let p=e.currentLink?null:es(i),m=p?e.projectFieldLink?.(p)??null:null;return {text:a.text,props:s,style:f,...m?{link:m}:{}}}var uP="\u2612",fP="\u2610";function pP(e){let n=Ia(e);return n==="FORMCHECKBOX"?"checkbox":n==="FORMDROPDOWN"?"dropdown":null}function bc(e,n){e.symbolSpec=rs(n),!e.symbolSpec&&(e.linkSpec=es(n),!e.linkSpec&&(e.formSpec=pP(n),!e.formSpec&&(e.buttonSpec=Zi(n),!e.buttonSpec&&(e.docPropertySpec=Ji(n)))));}function jm(e,n){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let t=e.formData.checked?uP:fP;if(e.formData.sizeHalfPoints===null)return {text:t,props:e.props,style:e.style};let r=[...e.props,{localName:"sz",attributes:{val:String(e.formData.sizeHalfPoints)}}];return {text:t,props:r,style:Ne(r,n)}}if(e.formSpec==="dropdown"){if(e.cachedText.length>0||e.sawResultContent||e.formData?.kind!=="dropdown")return null;let t=e.formData.entries[e.formData.selectedIndex]??"";return t.length===0?null:{text:t,props:e.props,style:e.style}}return null}function Gm(e,n){if(e.symbolSpec){let r=os(e.symbolSpec,e.props,n.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let t=jm(e,n.themeFonts);if(t)return {text:t.text,props:t.props,style:t.style};if(e.kind&&n.pageContext)return {text:Ct(e.kind,n.pageContext,e.picture??void 0),props:e.props,style:e.style};if(e.cachedText.length>0)return {text:e.cachedText,props:e.props,style:e.style};if(!e.sawResultContent){if(e.kind&&n.bodyPageFields){let o=e.picture!==null&&Yt(e.kind,n.bodyPageFields.format)?e.picture:void 0;return {text:qi(e.kind,o,n.bodyPageFields.format),props:e.props,style:e.style,pageField:{kind:e.kind,...o!==void 0?{picture:o}:{}}}}if(e.docPropertySpec){let r=Qi(e.docPropertySpec,n.documentProperties);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.buttonSpec)return {text:e.buttonSpec.display,props:e.props,style:e.style}}return null}function Qt(e,n,t){if(t<=n)return;let r=e[e.length-1];if(r&&r.end>=n){r.end=Math.max(r.end,t);return}e.push({start:n,end:t});}var mP=new Set(["left","center","right"]),gP=new Set(["margin","indent","leftMargin"]),hP=new Set(["dot","hyphen","underscore","middleDot"]);function Wm(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==ca$1)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===ca$1&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:mP.has(n)?n:"left",relativeTo:gP.has(t)?t:"margin",...r!==void 0&&hP.has(r)?{leader:r}:{}}}function Vm(e){return e.kind==="drawing"||_a$1(e)}function $m(e){let{node:n,layout:t,revisions:r,displayMode:o}=e,a=t.projectionForAtom?.(n.id)??(n.kind==="drawing"?t.project(n):null);if(!a||a.kind!=="inline")return a?.kind==="anchored"&&!a.hidden?{recordDeleted:false,emit:true,extras:{anchoredAtom:true}}:{recordDeleted:false,emit:true};let i=Xn(r),s=e.hiddenRun||!ke(r,o);return a.hidden||s?a.hidden?{recordDeleted:i,emit:true}:{recordDeleted:i,emit:false}:{recordDeleted:i,emit:true,extras:{inlineDrawing:Object.freeze({drawingNodeId:n.id,ownerPartName:t.ownerPartName,projection:a,resource:t.resourceOf(a)})}}}Object.freeze({marks:Object.freeze(new Map)});function xr(e,n){return Md$1(e,n)}function xc(e,n){if(!be(e))return null;if(Td$1(e)||Ud$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=Rd$1(e),r=Zd$1(e)??_d$1(e);if(!r)return null;let o=Wd$1(e),a=o!==null?xr(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?yP(a,r)??null:null,s=a,l=s!==void 0?t?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...l?{nav:l}:{},...s?{scopeId:s}:{}};if(t&&o!==null&&$d$1(e))return {text:"",...d};if(!n||!a)return {text:"",...d};let c=n.marks.get(a);return c==null?{text:"",...d}:n.reservedMarkText&&n.reservedMarkText.length>0?{text:c,measureText:n.reservedMarkText,...d}:{text:c,...d}}function yP(e,n){let t=`${n}:`;if(!e.startsWith(t))return null;let r=e.slice(t.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function Ym(e){return Rd$1(e)||Sd$1(e)||Td$1(e)||Ud$1(e)}function bP(e){let n=2166136261;for(let t=0;t<e.length;t+=1)n^=e.charCodeAt(t),n=Math.imul(n,16777619);return (n>>>0).toString(16).padStart(8,"0")}var Xm=new WeakMap;function Km(e){if(!e)return "";let n=Xm.get(e);if(n!==void 0)return n;let t=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${bP(t)}`;return Xm.set(e,r),r}var Ro=.7,xP=1.25,Um="Cambria Math";function cs(e){return e.fontFamily===Um?e:Object.freeze({...e,fontFamily:Um})}function ct(e,n,t,r){return Object.freeze({x:e,y:n,width:t,height:r})}function Bn(e,n,t){return Object.freeze({...e,box:ct(n,t,e.box.width,e.box.height)})}var SP=4,RP=8,qm=new WeakMap;function wP(e){let n=cs(e);return [n.fontFamily??"",n.fontSizePt,n.bold?1:0,n.italic?1:0,n.verticalAlign,n.baselineShiftPt,n.caps?1:0,n.smallCaps?1:0,n.characterSpacingPt,n.horizontalScalePercent,n.kerningMinPt].join("|")}function PP(e,n){if(n===void 0)return {projections:new WeakMap};let t=qm.get(e);t||(t=new Map,qm.set(e,t));let r=t.get(n);if(r)return t.delete(n),t.set(n,r),r;if(t.size>=SP){let a=t.keys().next().value;a!==void 0&&t.delete(a);}let o={projections:new WeakMap};return t.set(n,o),o}function wo(e,n,t){let r=t.styles.get(n);if(r)return r;let o=n===1?e:Object.freeze({...e,fontSizePt:e.fontSizePt*n,characterSpacingPt:e.characterSpacingPt*n});return t.styles.set(n,o),o}function Zm(e,n,t,r){let o=r.metrics.get(t);if(o)return o;let a=e.lineMetrics(wo(n,t,r));return r.metrics.set(t,a),a}function ds(e,n,t,r,o,a){let i=wo(r,o,a),s=Zm(t,r,o,a);return Object.freeze({kind:e,text:n,fontSizePt:i.fontSizePt,box:ct(0,0,Nn(n,i,t),s.height),baseline:s.baseline})}function IP(e,n){if(e.length===0)return Object.freeze({kind:"row",items:Object.freeze([]),box:ct(0,0,0,n.height),baseline:n.baseline});let t=Math.max(...e.map(i=>i.baseline)),r=Math.max(...e.map(i=>i.box.height-i.baseline)),o=0,a=e.map(i=>{let s=Bn(i,o,t-i.baseline);return o+=i.box.width,s});return Object.freeze({kind:"row",items:Object.freeze(a),box:ct(0,0,o,t+r),baseline:t})}function An(e,n,t,r,o){switch(e.kind){case "text":return ds("text",e.value,n,t,r,o);case "fallback":return ds("fallback",e.text||"\u2026",n,t,r,o);case "row":return IP(e.items.map(a=>An(a,n,t,r,o)),Zm(n,t,r,o));case "fraction":{let a=wo(t,r,o),i=An(e.numerator,n,t,r*Ro,o),s=An(e.denominator,n,t,r*Ro,o),l=Math.max(.75,a.fontSizePt*.08),d=Math.max(.75,a.fontSizePt*.08),c=Math.max(.6,a.fontSizePt*.055),u=Math.max(i.box.width,s.box.width)+l*2,f=i.box.height+d,p=f+c+d,m=p+s.box.height,g=Math.min(m,f+c/2+a.fontSizePt*.22);return Object.freeze({kind:"fraction",numerator:Bn(i,(u-i.box.width)/2,0),denominator:Bn(s,(u-s.box.width)/2,p),bar:ct(l/2,f,u-l,c),box:ct(0,0,u,m),baseline:g})}case "radical":{let a=wo(t,r,o),i=An(e.radicand,n,t,r,o),s=ds("text","\u221A",n,t,r,o),l=e.degree?An(e.degree,n,t,r*.55,o):void 0,d=Math.max(.55,a.fontSizePt*.05),c=Math.max(.35,a.fontSizePt*.035),u=d+c,f=l?Math.max(0,l.box.width*.65):0,p=f+s.box.width,m=u+i.baseline,g=Math.max(u+i.box.height,m+(s.box.height-s.baseline));return Object.freeze({kind:"radical",sign:Bn(s,f,m-s.baseline),radicand:Bn(i,p,u),...l?{degree:Bn(l,0,0)}:{},bar:ct(p,0,i.box.width,d),box:ct(0,0,p+i.box.width,g),baseline:m})}case "script":{let a=wo(t,r,o),i=An(e.base,n,t,r,o),s=e.subscript?An(e.subscript,n,t,r*Ro,o):void 0,l=e.superscript?An(e.superscript,n,t,r*Ro,o):void 0,d=Math.max(.4,a.fontSizePt*.04),c=i.box.width+d,u=0,f=l?Math.max(0,l.box.height-i.baseline*.45):0,p=f+i.baseline,m=p+a.fontSizePt*.08,g=c+Math.max(s?.box.width??0,l?.box.width??0,-d),h=Math.max(f+i.box.height,l?u+l.box.height:0,s?m+s.box.height:0);return Object.freeze({kind:"script",base:Bn(i,0,f),...s?{subscript:Bn(s,c,m)}:{},...l?{superscript:Bn(l,c,u)}:{},box:ct(0,0,g,h),baseline:p})}case "nary":{let a=wo(t,r,o),i=ds("text",e.operator,n,t,r*xP,o),s=An(e.body,n,t,r,o),l=e.lowerLimit?An(e.lowerLimit,n,t,r*Ro,o):void 0,d=e.upperLimit?An(e.upperLimit,n,t,r*Ro,o):void 0,c=Math.max(.5,a.fontSizePt*.05),u=Math.max(i.box.width,l?.box.width??0,d?.box.width??0),p=d?d.box.height+c:0,m=p+i.baseline,g=p+i.box.height+(l?c:0),h=u+c,y=m-s.baseline,k=-Math.min(0,p,y,l?g:0),B=m+k,v=Math.max(p+i.box.height,l?g+l.box.height:0,y+s.box.height)+k;return Object.freeze({kind:"nary",operator:Bn(i,(u-i.box.width)/2,p+k),body:Bn(s,h,y+k),...l?{lowerLimit:Bn(l,(u-l.box.width)/2,g+k)}:{},...d?{upperLimit:Bn(d,(u-d.box.width)/2,k)}:{},box:ct(0,0,h+s.box.width,v),baseline:B})}}}function Jm(e,n,t){let r=cs(t),o={styles:new Map,metrics:new Map};return Object.freeze({sourceNodeId:e.sourceNodeId,geometry:An(e.expression,n,r,1,o),fallbackText:e.fallbackText,truncated:e.truncated})}function Qm(e,n){let t=PP(e,n);return (r,o)=>{let a=wP(o),i=t.projections.get(r),s=i?.get(a);if(s&&i)return i.delete(a),i.set(a,s),s;let l=Jm(r,e,o);if(i||(i=new Map,t.projections.set(r,i)),i.size>=RP){let d=i.keys().next().value;d!==void 0&&i.delete(d);}return i.set(a,l),l}}function us(e,n=[],t,r,o,a,i=ze,s,l,d,c,u,f=false){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let p=[],m=0,g,h=Vc$1(e,{maxNesting:Vi,maxInstructionChars:Uc$1}),y=h.filter(R=>R.addressing==="atomic"),x=new Set(y.filter(R=>R.kind==="complex").map(R=>R.node.id)),k=new Set(h.filter(R=>R.kind==="complex"&&R.addressing==="editable-result").map(R=>R.node.id)),B=new Set;for(let R of y)for(let V of R.removeNodeIds)B.add(V);let v=va(),L=oc(),I=null,S=null,w=as(),T=ss,N=(R,V,A,G,U,H,X)=>{if(R.length===0&&!G&&!X?.inlineDrawing)return;let Z=X?.linkOverride??g,j=X?.revisionsOverride??T,K=Z?{link:Z}:{},fe=j.length===0?{}:{revisions:j};if(G){p.push({text:R,props:V,style:A,start:U,end:H,projected:true,...X?.measureText!==void 0?{measureText:X.measureText}:{},...X?.noteNav?{noteNav:X.noteNav}:{},...X?.inlineDrawing?{inlineDrawing:X.inlineDrawing}:{},...X?.anchoredAtom?{anchoredAtom:true}:{},...X?.equation?{equation:X.equation}:{},...X?.fieldAtom?{fieldAtom:X.fieldAtom}:{},...K,...fe});return}R.length!==0&&p.push({text:R,props:V,style:A,start:U,end:H,...X?.positionalTab?{positionalTab:X.positionalTab}:{},...X?.breakKind?{breakKind:X.breakKind}:{},...K,...fe});},M=()=>{if(!I||!I.atomic){I=null,S=null;return}let R=I.atomStart,V=R+1;if(I.style.hidden){I=null,S=null;return}if(!ke(I.resultRevisions,i)){s&&Xn(I.resultRevisions)&&Qt(s,R,V),I=null,S=null;return}let{resultLink:A,linkSpec:G,resultRevisions:U,formField:H}=I,X,Z=()=>{if(X)return X;let K=!A&&G?c?.(G)??null:null,fe=A??K;return X={...U.length>0?{revisionsOverride:U}:{},...fe?{linkOverride:fe}:{},fieldAtom:{formField:H}},X},j=Gm(I,{pageContext:t,themeFonts:d,documentProperties:u,bodyPageFields:f});if(j){let K=Z(),fe=j.pageField?{...K,fieldAtom:{formField:I.formField,pageField:j.pageField}}:K;N(j.text,j.props,j.style,true,R,V,fe);}I=null,S=null;},b=()=>{if(!I)return;let R=!I.resultLink&&I.linkSpec?c?.(I.linkSpec)??null:null,V=A=>R&&!A.link?{...A,link:R}:A;if(I.atomic){m=I.atomStart;for(let A of I.buffered)p.push({...V(A),start:m,end:m+(A.end-A.start)}),m+=A.end-A.start;I.cachedText.length>0&&I.buffered.length===0&&(N(I.cachedText,I.props,I.style,false,m,m+I.cachedText.length,R?{linkOverride:R}:void 0),m+=I.cachedText.length);}else {for(let A of I.buffered)p.push(V(A));m=I.bufferOffset;}I=null,S=null;},W=(R,V,A)=>{if(Vm(R)){let Z=m;m+=1;let j=m;if(!l)return;let K=$m({node:R,layout:l,hiddenRun:A.hidden,revisions:T,displayMode:i});K.recordDeleted&&s&&Qt(s,Z,j),K.emit&&N("\uFFFC",V,A,true,Z,j,K.extras);return}if(Ym(R)){let Z=xc(R,a),j=m,K=j+1;if(m=K,A.hidden||!Z||Z.text.length===0&&!Z.measureText)return;let fe=Z.scopeId&&Z.nav?{scopeId:Z.scopeId,direction:Z.nav}:void 0;N(Z.text.length>0?Z.text:Z.measureText??"",V,A,true,j,K,{...Z.measureText!==void 0?{measureText:Z.measureText}:{},...fe?{noteNav:fe}:{}});return}let G=Wm(R);if(G){A.hidden||N(" ",V,A,false,m,m,{positionalTab:G});return}if(go(R)){let Z=ho(R);if(!Z||A.hidden||!ke(T,i))return;let j=hc(V,Z,d);N(Z.text,j.props,j.style,true,m,m);return}let U=Ba(R);if(U.length===0)return;let H=Xn(T);A.hidden||!ke(T,i)||R.kind==="deletedText"&&!H||N(U,V,A,false,m,m+U.length,{...R.kind==="hardBreak"?{breakKind:Ac$1(R)}:{}}),H&&s&&Qt(s,m,m+U.length),m+=U.length;},_=(R,V)=>{if(R.kind!=="run")return;let A=ns(R,n,r),G=Ne(A,d),U=()=>{I&&(I.capturedResultStyle||(I.props=A,I.style=G,I.capturedResultStyle=true),I.capturedResultRevisions||(I.resultRevisions=T,I.capturedResultRevisions=true,!I.resultLink&&g&&(I.resultLink=g)));};for(let H of R.children){if(!vt(L)){if(b(),Pa(v),w.reset(),H.kind==="runProperties"||Pn(H,"begin")||Pn(H,"separate")||Pn(H,"end")||hr(H)||B.has(H.id)&&S===null)continue;W(H,A,G);continue}if(H.kind!=="runProperties"){if(Pn(H,"begin")){let X=x.has(H.id);Ta(v),v.nesting===1&&(b(),w.reset(),S=X?H.id:null,I={kind:null,picture:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,formData:Tc$1(H),atomic:X,editableResult:k.has(H.id),atomStart:m,props:A,style:G,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:m,resultRevisions:T,capturedResultRevisions:T.length>0,formField:Sc$1(H),...g?{resultLink:g}:{}},X&&(m+=1));continue}if(hr(H)){ka(v,H,L,V+1);continue}if(Pn(H,"separate")){let X=v.nesting===1&&v.phase==="instruction",Z=v.nesting,j=Ca(v);if(X&&I){I.kind=j?.kind??null,I.picture=j?.picture??null;let K=$i(v);!I.kind&&!K.overflow&&!v.nestingOverflow&&bc(I,K.instruction),I.props=A,I.style=G;}else I?.atomic&&v.phase==="result"&&!v.nestingOverflow&&w.onSeparate(t?j:null,Z);continue}if(Pn(H,"end")){let X=v.nesting===1;if(X&&I?.atomic&&v.phase==="instruction"){let j=$i(v);!j.overflow&&!v.nestingOverflow&&bc(I,j.instruction);}let Z=w.onEnd(v.nesting,t);Z!==null&&I?.atomic&&(I.cachedText+=Z),Oa(v),X&&(I?.atomic?M():b());continue}if(!(Rm(v)&&I?.atomic)){if(I&&wm(v)){if(go(H)){if(I.atomic){if(ke(T,i)&&(I.sawResultContent=true),w.active){w.noteResult(!G.hidden&&ke(T,i));continue}if(!G.hidden&&ke(T,i)){let Be=ho(H);Be?.unicode&&(U(),I.cachedText+=Be.text);}continue}let K=ho(H);if(!K||G.hidden||!ke(T,i))continue;let fe=hc(A,K,d);I.buffered.push({text:K.text,props:fe.props,style:fe.style,start:m,end:m,projected:true,...T.length>0?{revisions:T}:{},...g?{link:g}:{},fieldAtom:{formField:I.formField}});continue}let X=Ba(H);if(X.length===0)continue;let Z=Xn(T),j=!ke(T,i)||H.kind==="deletedText"&&!Z;if(I.atomic&&!j&&(I.sawResultContent=true),Z&&s&&(I.atomic?Qt(s,I.atomStart,I.atomStart+1):Qt(s,m,m+X.length)),j){I.atomic&&w.active&&w.noteResult(false),I.atomic||(m+=X.length,I.bufferOffset=m);continue}if(I.atomic){if(w.active){if(w.noteResult(!G.hidden),G.hidden)continue;U();continue}if(G.hidden)continue;U(),I.cachedText+=X;continue}if(G.hidden){m+=X.length,I.bufferOffset=m;continue}I.capturedResultStyle||(I.props=A,I.style=G,I.capturedResultStyle=true),I.buffered.push({text:X,props:A,style:G,start:m,end:m+X.length,...T.length>0?{revisions:T}:{},...g?{link:g}:{},fieldAtom:{formField:I.formField}}),m+=X.length,I.bufferOffset=m;continue}B.has(H.id)&&S===null&&x.size>0,W(H,A,G);}}}};if(!vt(L))return p;let F=Ua$1(),E=(R,V)=>{let A=m;if(m+=1,R.kind==="textValue"||(Xn(T)&&s&&Qt(s,A,A+1),!ke(T,i)))return;let G=zm({simple:R,depth:V,pageContext:t,budget:L,revisions:T,displayMode:i,inheritedRunProperties:n,cascadeRuns:r,themeFonts:d,currentLink:g,projectFieldLink:c,documentProperties:u,bodyPageFields:f});G&&N(G.text,G.props,G.style,true,A,A+1,{fieldAtom:{formField:false,...G.pageField?{pageField:G.pageField}:{}},...G.link?{linkOverride:G.link}:{}});},O=(R,V,A,G)=>{let U=fc$1(R);if(U){let j=m++;Xn(T)&&s&&Qt(s,j,m);let K=cs(Ne(n,d));return K.hidden||!ke(T,i)?void 0:N("\uFFFC",n,K,true,j,m,{equation:U})}if(Mc$1(R)){E(R,V);return}if(R.kind==="run"){_(R,V);return}if(kc$1(R)){if(G>=jc$1||V>$t)return;for(let j of nc$1(R))O(j,V+1,A,G+1);return}if(V>$t||V>=xo)return;let H=R.kind!=="textValue"&&"localName"in R?Ta$1(A,R):A;if(R.kind==="hyperlink"){let j=g;g=o?.(R)??void 0;for(let K of R.children)O(K,V+1,H,G);g=j;return}if(!yr(R))return;let X=yo(R);if(!X||!vt(L))return;let Z=T;T=bo(Z,X);for(let j of R.children)O(j,V+1,H,G);T=Z;};for(let R of e.children)O(R,1,F,0);return b(),p}function vP(e){let n=Object.entries(e.attributes??{}).sort(([t],[r])=>t<r?-1:t>r?1:0).map(([t,r])=>`${t}=${r}`).join(",");return `${e.localName}(${n})`}function TP(e){return e.map(vP).join(";")}var eg=new WeakMap,tg=1<<18;function rg(e){if(e.kind==="textValue")return `t:${e.value}`;let n=e.kind==="paragraph"||e.kind==="table";if(n){let r=eg.get(e);if(r!==void 0)return r}let t=kP(e);return n&&t.length<=tg&&eg.set(e,t),t}function kP(e){if(e.kind==="textValue")return `t:${e.value}`;let n=[`${e.kind}:${"localName"in e?e.localName:""}#${"id"in e?e.id:""}`];if("attributes"in e&&Array.isArray(e.attributes)){let t=[...e.attributes].map(r=>`${r.namespaceUri??""}:${r.localName}=${r.value}`).sort();for(let r of t)n.push(r);}for(let t of e.children??[])n.push(rg(t));return `(${n.join("|")})`}var ng=new WeakMap;function Sr(e){let n=Math.round(e.width*1e3),t=e.drawingToken??"",r=e.exclusionToken??"",o=TP(e.properties),a=ng.get(e.paragraph);if(a&&a.producer===e.producer&&a.width===n&&a.drawingToken===t&&a.exclusionToken===r&&a.propertiesToken===o)return a.key;let i=[e.producer,n,t,r,o,rg(e.paragraph)].join("\0");return i.length<=tg&&ng.set(e.paragraph,{producer:e.producer,width:n,drawingToken:t,exclusionToken:r,propertiesToken:o,key:i}),i}var og=new WeakMap;function ag(e,n){og.set(e,n);}function ig(e,n,t,r){if(!e)return;let o=n??new Set;for(let a of t)o.add(a);for(let a of r){let i=og.get(a);if(i)for(let s of i)o.add(s);}n||e.retain(o);}var CP=8,OP=8;function BP(e={}){let n=Math.max(1,e.maxEntries??4096),t=n*8,r=new Map,o=0,a=0,i=0,s=0,l=0;return {get(d){let c=r.get(d);if(c===void 0){s+=1;return}return i+=1,r.delete(d),c.generation=o,r.set(d,c),c.value},set(d,c){for(r.has(d)&&r.delete(d),r.set(d,{value:c,generation:o});r.size>n;){let u=r.entries().next();if(u.done||u.value[1].generation>=o&&r.size<=t)break;r.delete(u.value[0]),l+=1;}},retentionPassDue(){return a+=1,a%CP===0},retain(d){o+=1;for(let c of d){let u=r.get(c);u&&(u.generation=o);}for(let[c,u]of r)o-u.generation>OP&&(r.delete(c),l+=1);},clear(){r.clear();},get stats(){return {hits:i,misses:s,evictions:l,size:r.size}}}}var sg=21600;function $e(e){return Number.isFinite(e)?e:0}function Ea(e){if(e.length===0)return Object.freeze([]);let n=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),t=[],r=n[0];for(let o=1;o<n.length;o+=1){let a=n[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(t.push(r),r=a);}return t.push(r),Object.freeze(t)}function MP(e,n){let t=[];for(let r of e)for(let o of n){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&t.push(Object.freeze({start:a,end:i}));}return Ea(t)}function Sc(e,n,t){let r=[];for(let o of e){let a=Math.max(o.start,n),i=Math.min(o.end,t);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return Ea(r)}function FP(e,n,t){let r=[],o=n;for(let a of e)a.start>o&&r.push(Object.freeze({start:o,end:a.start})),o=Math.max(o,a.end);return o<t&&r.push(Object.freeze({start:o,end:t})),Object.freeze(r)}function dg(e,n){return Po(e,n)}function Rc(e,n,t){return dg(Po(e,n),t)}function LP(e,n){let t=[],r=Math.min(e.length,cn);if(r<2)return Object.freeze([]);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r],s=a.y,l=i.y;if(s===l)continue;let d=Math.min(s,l),c=Math.max(s,l);if(n<d||n>c||n===c&&l>s||n===d&&l<s)continue;let u=(n-s)/(l-s),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&t.push({x:f,delta:l>s?1:-1});}return t.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(t)}function EP(e,n){let t=[],r=Math.min(e.length,cn);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(n-a.y)>1e-6)continue;let s=Math.min(a.x,i.x),l=Math.max(a.x,i.x);l>s&&t.push(Object.freeze({start:s,end:l}));}return Ea(t)}function lg(e,n,t){let r=NP(LP(e,n),t),o=EP(e,n);return Ea([...r,...o])}function NP(e,n){if(e.length===0)return Object.freeze([]);let t=[];if(n==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,s=e[a+1].x;s>i&&t.push(Object.freeze({start:i,end:s}));}return Object.freeze(t)}let r=0,o=null;for(let a of e){let i=r;r+=a.delta,i===0&&r!==0?o=a.x:i!==0&&r===0&&o!==null&&(a.x>o&&t.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(t)}function AP(e,n){return Object.freeze({top:$e(e.top)+$e(n.top),right:$e(e.right)+$e(n.right),bottom:$e(e.bottom)+$e(n.bottom),left:$e(e.left)+$e(n.left)})}function DP(e,n,t,r,o,a){let i=n.x-e.x,s=n.y-e.y,l=r.x-t.x,d=r.y-t.y,c=i*d-s*l;if(Math.abs(c)<1e-12)return null;let f=((t.x-e.x)*s-(t.y-e.y)*i)/c,p=((t.x-e.x)*d-(t.y-e.y)*l)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let m=e.y+f*s;return !Number.isFinite(m)||m<o-1e-6||m>a+1e-6?null:m}function _P(e,n,t,r){let o=[],a=Math.min(e.length,cn),i=Math.min(n.length,cn);if(a<2||i<2)return Object.freeze([]);let s=cn*cn,l=0;for(let d=0;d<a;d+=1){let c=e[d],u=e[(d+1)%a];for(let f=0;f<i;f+=1){if(l>=s)return Object.freeze(o);l+=1;let p=n[f],m=n[(f+1)%i],g=DP(c,u,p,m,t,r);g!==null&&o.push(g);}}return Object.freeze(o)}function HP(e,n,t){let r=new Set;r.add(n),r.add(t);for(let o of e){let a=Math.min(o.length,cn);for(let i=0;i<a;i+=1){let s=o[i].y;Number.isFinite(s)&&s>=n-1e-6&&s<=t+1e-6&&r.add(s);}for(let i=0;i<a;i+=1){let s=o[i],l=o[(i+1)%a],d=s.y,c=l.y;if(d!==c)for(let u of [n,t]){let f=Math.min(d,c),p=Math.max(d,c);u>=f&&u<=p&&r.add(u);}}}if(e.length>=2)for(let o of _P(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function zP(e,n,t,r){let o=lg(e,t,r);return n&&n.length>=3&&(o=MP(o,lg(n,t,"nonzero"))),o}function cg(e,n,t,r,o=null){let a=$e(t.top),i=$e(t.bottom),s=$e(t.left),l=$e(t.right),d=n-i,c=n+a,u=HP(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((m,g)=>{if(g+1>=u.length)return [];let h=u[g+1];return h<=m+1e-6?[m]:[m,h,(m+h)/2]}):[d];for(let m of p){let g=zP(e,o,m,r);for(let h of g)f.push(Object.freeze({start:h.start-s,end:h.end+l}));}return Ea(f)}function ug(e){let{x:n,y:t,width:r,height:o}=e;return Object.freeze([Object.freeze({x:n,y:t}),Object.freeze({x:n+r,y:t}),Object.freeze({x:n+r,y:t+o}),Object.freeze({x:n,y:t+o})])}function jP(e){let n=Math.max(0,$e(e.extentWidthPt)),t=Math.max(0,$e(e.extentHeightPt)),r=ps(e.transform,n,t),o=Math.min(e.polygonEmu.length,cn);if(o<3)return ug({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/sg,i=r.height/sg,s=[];for(let l=0;l<o;l+=1){let d=e.polygonEmu[l];s.push(Object.freeze({x:$e(d.x)*a,y:$e(d.y)*i}));}return ms({points:Object.freeze(s),sourceWidth:r.width,sourceHeight:r.height,offsetX:r.offsetX,offsetY:r.offsetY,crop:{left:0,top:0,right:0,bottom:0},transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:e.anchorX,anchorY:e.anchorY})}function GP(e,n){let t=n.effectInsets??fs,r=n.wrapDistances??fs,o=$e(n.contentLeft),a=$e(n.contentRight);if(n.mode==="topAndBottom"){let c=dg(Po(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Sc([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=Rc(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Sc([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:ug(n.contentBounds),s=n.mode==="through"?"evenodd":"nonzero",l=AP(r,t),d=cg(i,e,l,s,n.clipPolygon);return Sc(d,o,a)}function WP(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(n=>n.start)),end:Math.max(...e.map(n=>n.end))})}function VP(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=WP(n);if(!a)return e;if(t==="left")return Object.freeze(e.filter(l=>l.end<=a.start+1e-4));if(t==="right")return Object.freeze(e.filter(l=>l.start>=a.end-1e-4));let i=Math.max(0,a.start-r),s=Math.max(0,o-a.end);return i===s?Object.freeze(e.filter(l=>l.start>=a.end-1e-4)):i>s?Object.freeze(e.filter(l=>l.end<=a.start+1e-4)):Object.freeze(e.filter(l=>l.start>=a.end-1e-4))}function fg(e,n){let t=GP(e,n),r=FP(t,n.contentLeft,n.contentRight);return VP(r,t,n.textSide,n.contentLeft,n.contentRight)}function $P(e,n,t,r){return t.length<3?false:cg(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function wc(e,n,t){let r=t.effectInsets??fs,o=t.hitBounds;if(e<o.x||e>o.x+o.width||n<o.y||n>o.y+o.height)return false;if(t.clipPolygon&&t.clipPolygon.length>=3)return $P(e,n,t.clipPolygon,r);let a=Po(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function pg(e){let n=Object.freeze({top:$e(e.wrapDistancesEmu.top/ut),right:$e(e.wrapDistancesEmu.right/ut),bottom:$e(e.wrapDistancesEmu.bottom/ut),left:$e(e.wrapDistancesEmu.left/ut)}),t=e.mode==="tight"||e.mode==="through"?jP({polygonEmu:e.polygonEmu,extentWidthPt:e.extentWidthPt,extentHeightPt:e.extentHeightPt,anchorX:e.contentBounds.x,anchorY:e.contentBounds.y,transform:e.transform}):null;return Object.freeze({mode:e.mode,contentBounds:e.contentBounds,polygon:t,clipPolygon:e.geometry.clipPolygon,wrapDistances:n,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var In=1e5,cn=m.maxPolygonPoints,fs=Object.freeze({top:0,right:0,bottom:0,left:0}),XP=32,YP=.1,KP=new Set(["rect","ellipse","roundRect"]);function pe(e){return Number.isFinite(e)?e:0}function Dn(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function mg(e,n){let t=e+n;return Number.isFinite(t)?t:0}function gg(e,n,t){let r=Dn(e,0,t),o=Dn(n,0,t);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=t){let i=(t-1)/a;r*=i,o*=i;}return {left:r,right:o}}function UP(e){let n=gg(Dn(e.left,0,In),Dn(e.right,0,In),In),t=gg(Dn(e.top,0,In),Dn(e.bottom,0,In),In);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function qP(e){let n=UP({left:e.left*In,top:e.top*In,right:e.right*In,bottom:e.bottom*In});return Object.freeze({left:n.left/In,top:n.top/In,right:n.right/In,bottom:n.bottom/In})}function ZP(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/ut;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)})}function Po(e,n){let t=pe(n.left),r=pe(n.right),o=pe(n.top),a=pe(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,mg(e.width,t+r)),height:Math.max(0,mg(e.height,o+a))})}function JP(e,n,t){let r=e*Dn(t.left,0,1),o=n*Dn(t.top,0,1),a=e*(1-Dn(t.right,0,1)),i=n*(1-Dn(t.bottom,0,1));if(a<=r||i<=o){let s=e/2,l=n/2;return Object.freeze({left:s,top:l,right:s,bottom:l})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function ps(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?pe(er(r)??n):Math.max(0,pe(n)),s=o>0?pe(er(o)??t):Math.max(0,pe(t));return Object.freeze({offsetX:pe(er(a.x)??0),offsetY:pe(er(a.y)??0),width:i,height:s})}function QP(e,n,t,r){let o=JP(n,t,r),a=o.right-o.left,i=o.bottom-o.top,s=n>0?n:1,l=t>0?t:1,d=[],c=Math.min(e.length,cn);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+Dn(f.x/s,0,1)*a,m=i<=0?o.top:o.top+Dn(f.y/l,0,1)*i;d.push(Object.freeze({x:pe(p),y:pe(m)}));}return Object.freeze(d)}function hg(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=pe(t.rotationDegrees)*Math.PI/180,i=Math.cos(a),s=Math.sin(a),l=r*i-o*s,d=r*s+o*i;return Object.freeze({x:pe(l+n.x),y:pe(d+n.y)})}function yg(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let n=e[0].x,t=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,cn);for(let i=1;i<a;i+=1){let s=e[i];!Number.isFinite(s.x)||!Number.isFinite(s.y)||(n=Math.min(n,s.x),t=Math.max(t,s.x),r=Math.min(r,s.y),o=Math.max(o,s.y));}return Object.freeze({x:n,y:r,width:Math.max(0,t-n),height:Math.max(0,o-r)})}function Pc(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=Na(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let s of t)r.push(hg(Object.freeze({x:s.x+e.offsetX,y:s.y+e.offsetY}),n,e.transform));let o=yg(r),a=Math.max(o.width,1e-6),i=Math.max(o.height,1e-6);return Object.freeze({bboxX:o.x,bboxY:o.y,scaleX:Math.max(0,pe(e.layoutWidth))/a,scaleY:Math.max(0,pe(e.layoutHeight))/i,anchorX:pe(e.anchorX),anchorY:pe(e.anchorY)})}function e0(e,n){return Object.freeze({x:pe(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:pe(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function ms(e){let n=e.mapping??Pc({sourceWidth:e.sourceWidth,sourceHeight:e.sourceHeight,offsetX:e.offsetX,offsetY:e.offsetY,transform:e.transform,layoutWidth:e.layoutWidth,layoutHeight:e.layoutHeight,anchorX:e.anchorX,anchorY:e.anchorY}),t=QP(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(t.length>0?t.length:e.points.length,cn),o=t.length>0?t:e.points.slice(0,r),a=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),i=[];for(let s=0;s<r;s+=1){let l=o[s],d=Object.freeze({x:pe(l.x+e.offsetX),y:pe(l.y+e.offsetY)});i.push(e0(hg(d,a,e.transform),n));}return Object.freeze(i)}function Na(e,n,t,r){if(t<=0||r<=0){let o=Object.freeze({x:e,y:n});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:n}),Object.freeze({x:e+t,y:n}),Object.freeze({x:e+t,y:n+r}),Object.freeze({x:e,y:n+r})])}function n0(e,n,t){if(!e||!KP.has(e))return null;if(n<=0||t<=0)return Na(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return Na(0,0,n,t);if(e==="ellipse"){let s=[],l=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(XP,cn);for(let p=0;p<f;p+=1){let m=p/f*Math.PI*2;s.push(Object.freeze({x:l+c*Math.cos(m),y:d+u*Math.sin(m)}));}return Object.freeze(s)}let r=Math.min(n,t)*YP,o=Math.max(0,r),a=n,i=t;return Object.freeze([Object.freeze({x:o,y:0}),Object.freeze({x:a-o,y:0}),Object.freeze({x:a,y:o}),Object.freeze({x:a,y:i-o}),Object.freeze({x:a-o,y:i}),Object.freeze({x:o,y:i}),Object.freeze({x:0,y:i-o}),Object.freeze({x:0,y:o})])}function vo(e){return Object.freeze({x:pe(e.x),y:pe(e.y)})}function t0(e,n){if(e.length===0)return Object.freeze([]);let t=n.x+n.width,r=n.y+n.height,o=(i,s,l)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,cn);for(let u=0;u<c;u+=1){let f=vo(i[u]),p=vo(i[(u+1)%c]),m=s(f),g=s(p);if(m&&g?d.push(p):m&&!g?d.push(vo(l(f,p))):!m&&g&&(d.push(vo(l(f,p))),d.push(p)),d.length>=cn)break}return Object.freeze(d.slice(0,cn))},a=e.slice(0,cn).map(vo);return a=[...o(a,i=>i.x>=n.x,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(n.x-i.x)/l:0;return Object.freeze({x:n.x,y:pe(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.x<=t,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(t-i.x)/l:0;return Object.freeze({x:t,y:pe(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.y>=n.y,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(n.y-i.y)/l:0;return Object.freeze({x:pe(i.x+d*(s.x-i.x)),y:n.y})})],a=[...o(a,i=>i.y<=r,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(r-i.y)/l:0;return Object.freeze({x:pe(i.x+d*(s.x-i.x)),y:r})})],Object.freeze(a)}function r0(e){let n=yg(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function gs(e,n){let t=o0(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=a=>{if(!a||a.length===0)return a;let i=t0(a,n);return i.length>=3?Object.freeze(i.map(vo)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function o0(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function a0(e){let n=Math.max(0,pe(e.extentWidth)),t=Math.max(0,pe(e.extentHeight)),r=pe(e.anchorX),o=pe(e.anchorY),a=qP(e.crop),i=ZP(e.effectExtentEmu),s=ps(e.transform,n,t),l=Object.freeze({x:r,y:o,width:n,height:t}),d={sourceWidth:s.width,sourceHeight:s.height,offsetX:s.offsetX,offsetY:s.offsetY,crop:a,transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:r,anchorY:o},c=Pc(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=ms({points:Na(0,0,s.width,s.height),...d,crop:u,mapping:c}),p=n0(e.presetGeometry,s.width,s.height),m="none",g=p;g||(m=e.presetGeometry?"unsupported-preset":"none",g=Na(0,0,s.width,s.height));let h=ms({points:g,...d,crop:u,mapping:c}),y=r0(h.length>=3?h:f),x=Po(y,i);return Object.freeze({contentBounds:l,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:h.length>=3?h:f,clipFallback:m,effectInsets:i})}function To(e){let n=e.projection.picture,t=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return a0({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:n?.crop??{left:0,top:0,right:0,bottom:0},transform:n?.transform??t,presetGeometry:n?.presetGeometry??null})}function i0(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=ps(n,t,r),a=o.width,i=o.height,s=Pc({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),l=pe(n.rotationDegrees),d=Math.abs(l%360)>1e-4,c=n.flipHorizontal?-1:1,u=n.flipVertical?-1:1,f=s.scaleX,p=s.scaleY,m=a>0?a/t:1,g=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(m-1)<1e-4&&Math.abs(g-1)<1e-4)return null;let y=l*Math.PI/180,x=Math.cos(y),k=Math.sin(y),B=o.offsetX+a/2,v=o.offsetY+i/2,L=f*x*c,I=-f*k*u,S=p*k*c,w=p*x*u,T=f*(B-x*c*(a/2)+k*u*(i/2)-s.bboxX),N=p*(v-k*c*(a/2)-x*u*(i/2)-s.bboxY);return Object.freeze({a:pe(L*m),b:pe(S*m),c:pe(I*g),d:pe(w*g),e:pe(T),f:pe(N)})}function eM(e){let n=i0(e);if(n)return `matrix(${Io(n.a)}, ${Io(n.b)}, ${Io(n.c)}, ${Io(n.d)}, ${Io(n.e)}, ${Io(n.f)})`}function Io(e){return Number.isFinite(e)?String(e):"0"}var s0=Object.freeze({"http://schemas.openxmlformats.org/drawingml/2006/chart":"chart","http://schemas.openxmlformats.org/drawingml/2006/diagram":"diagram","http://schemas.microsoft.com/office/word/2010/wordprocessingGroup":"group","http://schemas.microsoft.com/office/word/2010/wordprocessingShape":"textbox","http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas":"canvas"}),l0=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),d0=Object.freeze({left:0,top:0,right:0,bottom:0});function Sg(e){let n=e.picture,t=null;if(!n){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";t=s0[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??d0,transform:n?.transform??l0,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var ut=12700;function on(e){return e/ut}function er(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*ut*72)return null;let n=e/ut;return Number.isFinite(n)?n:null}function Bt(e){let n=on(e.inlineDistancesEmu.left),t=on(e.inlineDistancesEmu.right),r=on(e.inlineDistancesEmu.top),o=on(e.inlineDistancesEmu.bottom),a=on(e.effectExtentEmu.left),i=on(e.effectExtentEmu.right),s=on(e.effectExtentEmu.top),l=on(e.effectExtentEmu.bottom),d=on(e.extentEmu.cx),c=on(e.extentEmu.cy);return Object.freeze({distL:n,distR:t,distT:r,distB:o,effectL:a,effectR:i,effectT:s,effectB:l,width:d,height:c,totalWidth:n+a+d+i+t,lineContribution:r+s+c+l+o})}function Rg(e,n,t){let r=Math.max(t.distT+t.effectT,e-t.height),o=Math.max(n,r-t.effectT+t.height+t.effectB+t.distB),a=r+t.height+t.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function hs(e,n,t){if(Math.abs(n)<1e-4&&Math.abs(t)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+n,y:a.y+t}),o=a=>Object.freeze({x:a.x+n,y:a.y+t});return Object.freeze({...e,contentBounds:r(e.contentBounds),paintBounds:r(e.paintBounds),hitBounds:r(e.hitBounds),transformedCorners:Object.freeze(e.transformedCorners.map(o)),clipPolygon:e.clipPolygon?Object.freeze(e.clipPolygon.map(o)):null})}function ys(e,n,t){return Math.abs(n)<1e-4&&Math.abs(t)<1e-4?e:Object.freeze({...e,x:e.x+n,y:e.y+t,advanceStart:e.advanceStart+n,advanceEnd:e.advanceEnd+n,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+n,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+n,y:e.hitBounds.y+t}),geometry:hs(e.geometry,n,t)})}function Ic(e,n){return e.length===0?e:e.map(t=>{let r=t.geometry.effectInsets.bottom,o=n-t.height-r,a=o-t.y;return Math.abs(a)<1e-4&&t.baselineOffset===n?t:Object.freeze({...t,y:o,baselineOffset:n,geometry:hs(t.geometry,0,a),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+a}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+a})})})}function vc(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function bs(e,n){let t=vc(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=hs(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:gs(i,n)})}var bg=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),xg=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function ft(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function wg(e,n){return !(!n.layoutInCell||n.cellBox===null||!Number.isFinite(n.cellBox.height)||n.cellBox.height<=0||!Number.isFinite(n.cellBox.width)||n.cellBox.width<=0)}function Pg(e,n){if(wg(e,n)){let l=n.cellBox;if(!l)return null;let{x:d,width:c}=l;switch(e){case "page":case "column":case "margin":case "leftMargin":return {left:d,right:d+c,center:d+c/2};case "rightMargin":return {left:d,right:d+c,center:d+c/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "insideMargin":return ft(n)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return ft(n)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let t=-n.marginLeft,r=n.contentWidth+n.marginRight,o=0,a=n.contentWidth,i=n.columnBox.x,s=n.columnBox.x+n.columnBox.width;switch(e){case "page":return {left:t,right:r,center:(t+r)/2};case "margin":return {left:o,right:a,center:o+n.contentWidth/2};case "column":return {left:i,right:s,center:i+n.columnBox.width/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "leftMargin":return {left:t,right:t,center:t};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return ft(n)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return ft(n)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function Ig(e,n){if(wg(e,n)){let l=n.cellBox;if(!l)return null;let{y:d,height:c}=l;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:d,bottom:d+c,center:d+c/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "insideMargin":return ft(n)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return ft(n)?{top:d+c,bottom:d+c,center:d+c}:{top:d,bottom:d+c,center:d+c/2};default:return null}}let t=-n.contentInsetTop,r=n.contentBandHeight,o=t+n.pageHeight-n.marginBottom,a=r+n.contentInsetBottom,i=0,s=n.contentHeight;switch(e){case "page":return {top:t,bottom:a,center:(t+a)/2};case "margin":return {top:i,bottom:s,center:i+n.contentHeight/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "topMargin":return {top:t,bottom:t,center:t};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return ft(n)?{top:i,bottom:i,center:i}:{top:s,bottom:s,center:s};case "outsideMargin":return ft(n)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function vg(e){return e===null?0:er(e)}function c0(e,n,t){let r=ft(t);if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.width)&&t.cellBox.width>0){let{x:o,width:a}=t.cellBox;return e==="inside"?r?o:o+a-n:e==="outside"?r?o+a-n:o:null}return e==="inside"?r?0:t.contentWidth-n:e==="outside"?r?t.contentWidth-n:0:null}function u0(e,n,t){let r=ft(t),o=t.contentBandHeight;if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.height)&&t.cellBox.height>0){let{y:a,height:i}=t.cellBox;return e==="inside"?r?a:a+i-n:e==="outside"?r?a+i-n:a:null}return e==="inside"?r?0:o-n:e==="outside"?r?o-n:0:null}function f0(e,n,t,r,o){let a=Pg(e,o);if(!a)return null;let i=vg(t);if(i===null)return null;if(n==="left")return a.left+i;if(n==="center")return a.center-r/2+i;if(n==="right")return a.right-r+i;if(n==="inside"||n==="outside"){let s=c0(n,r,o);if(s!==null)return s+i}return a.left+i}function p0(e,n,t,r,o){let a=Ig(e,o);if(!a)return null;let i=vg(t);if(i===null)return null;if(n==="top")return a.top+i;if(n==="center")return a.center-r/2+i;if(n==="bottom")return a.bottom-r+i;if(n==="inside"||n==="outside"){let s=u0(n,r,o);if(s!==null)return s+i}return a.top+i}function Aa(e){let n=e.contentBandHeight;return Object.freeze({x:-e.marginLeft,y:-e.contentInsetTop,width:e.pageWidth,height:n+e.contentInsetTop+e.contentInsetBottom})}function Tc(e,n){let t=Bt(e),r=e.position,o=e.anchor,a="page",i="page";if(!r||!o)return Object.freeze({x:0,y:0,horizontalFrame:a,verticalFrame:i,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"});if(o.simplePos){let g=er(r.simplePosition.xEmu),h=er(r.simplePosition.yEmu);return Object.freeze(g===null||h===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:g-n.marginLeft,y:h-n.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let s=r.horizontal.relativeFrom,l=r.vertical.relativeFrom,d=Pg(s,n),c=Ig(l,n),u=d?.left??0,f=c?.top??0;if(!bg.has(s)||!xg.has(l))return Object.freeze({x:0,y:0,horizontalFrame:bg.has(s)?s:a,verticalFrame:xg.has(l)?l:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=f0(s,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),m=p0(l,r.vertical.align,r.vertical.offsetEmu,t.height,n);return Object.freeze(p===null||m===null?{x:0,y:0,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:m,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function m0(e){let n=e.input.projection,t=n.anchor,r=Bt(n),o=To({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?vc(o.paintBounds,e.clipRegion):o.paintBounds,i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"anchoredDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.anchorParagraphId,anchorParagraphId:e.anchorParagraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:e.resolved.x,y:e.resolved.y,width:r.width,height:r.height,horizontalFrame:e.resolved.horizontalFrame,verticalFrame:e.resolved.verticalFrame,horizontalFrameOrigin:e.resolved.horizontalFrameOrigin,verticalFrameOrigin:e.resolved.verticalFrameOrigin,behindDocument:t?.behindDocument??false,allowOverlap:t?.allowOverlap??true,layoutInCell:t?.layoutInCell??true,relativeHeight:t?.relativeHeight??0,wrap:n.wrap==="inline"?"inFront":n.wrap,...e.sourceOrder!==void 0?{sourceOrder:e.sourceOrder}:{},...e.resolved.layoutFallback?{layoutFallback:e.resolved.layoutFallback}:{},...e.textboxStory?{textboxStory:e.textboxStory}:{},...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{},paintBounds:a,hitBounds:i,geometry:e.clipRegion?gs(o,e.clipRegion):o,resource:e.input.resource,accessibility:$a$1(n),...Sg(n)})}function Mn(e,n){if(e.kind!=="paragraph")return [];let t=[],r=(o,a)=>{if(o.kind==="drawing"){let i=n.projectionForAtom?.(o.id)??n.project(o);i?.kind==="anchored"&&t.push({atomId:o.id,projection:i,revisions:a});return}if(_a$1(o)){let i=n.projectionForAtom?.(o.id)??null;i?.kind==="anchored"&&t.push({atomId:o.id,projection:i,revisions:a});return}if("children"in o){let i=yr(o)?yo(o):null,s=i?bo(a,i):a;for(let l of o.children)r(l,s);}};for(let o of e.children)r(o,ss);return Object.freeze(t)}function Yn(e){let n=new Map;if(e.kind!=="paragraph")return n;let t=0,r=a=>{if(a.kind==="drawing"||_a$1(a)){n.set(a.id,t),t+=1;return}if(a.kind==="textValue"){t+=a.value.length;return}if("children"in a)for(let i of a.children)r(i);},o=a=>{if(a.kind==="run"){for(let i of a.children)r(i);return}if(a.kind==="hyperlink"||yr(a))for(let i of a.children)o(i);};for(let a of e.children)o(a);return n}function g0(e,n,t){for(let o of e.spans){if(n<o.range.start)break;if(n<o.range.end){if(t&&o.text!==void 0&&o.style!==void 0){let s=n-o.range.start;return o.box.x+Nn(o.text.slice(0,s),o.style,t)}let a=o.range.end-o.range.start;if(a<=0)return o.box.x;let i=n-o.range.start;return o.box.x+o.box.width*i/a}if(n===o.range.end)return t&&o.text!==void 0&&o.style!==void 0?o.box.x+Nn(o.text,o.style,t):o.box.x+o.box.width}let r;for(let o of e.spans)o.range.end<=n&&(r=o);return r?t&&r.text!==void 0&&r.style!==void 0?r.box.x+Nn(r.text,r.style,t):r.box.x+r.box.width:e.box.x}function h0(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function kc(e,n,t){if(!(Math.abs(t)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===n&&(e[r]=Object.freeze({...o,y:o.y+t,geometry:hs(o.geometry,0,t),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+t}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+t})}));}}function nr(e){let n=Mn(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=Yn(e.paragraph),r=e.displayMode??ze,o=[];for(let a of n){let i=a.projection;if(i.hidden||!ke(a.revisions,r))continue;let s=t.get(a.atomId);if(s===void 0||e.fragmentRange&&(s<e.fragmentRange.start||s>=e.fragmentRange.end))continue;let l=e.lines.find(y=>s>=y.range.start&&s<y.range.end);if(!l)continue;let d=i.anchor?.layoutInCell??true,u=i.position?.horizontal.relativeFrom==="character"?h0(l,s):s,f=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:l.box,anchorCharacterX:g0(l,u,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:d}),p=Tc(i,f),g=d&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0?e.cellBox:Aa(e.frameBase),h=m0({input:Object.freeze({drawingNodeId:a.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:i,resource:e.drawingLayout.resourceOf(i)}),anchorParagraphId:e.paragraphId,start:u,resolved:p,clipRegion:g,revisions:a.revisions,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(a.atomId)}:{},...i.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(i)}:{}});o.push(h);}return Object.freeze(o)}function Tg(e){let n=Bt(e.input.projection),t=e.slotX+n.distL+n.effectL,r=To({projection:e.input.projection,anchorX:t,anchorY:e.y,extentWidth:n.width,extentHeight:n.height}),o=e.contentTop!==void 0&&e.contentBottom!==void 0?Object.freeze({x:e.contentLeft,y:e.contentTop,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,e.contentBottom-e.contentTop)}):Object.freeze({x:e.contentLeft,y:r.paintBounds.y,width:Math.max(0,e.contentRight-e.contentLeft),height:r.paintBounds.height}),a=vc(r.paintBounds,o),i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"inlineDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.paragraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:t,y:e.y,width:n.width,height:n.height,distL:n.distL,distR:n.distR,distT:n.distT,distB:n.distB,advanceStart:e.slotX,advanceEnd:e.slotX+n.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:gs(r,o),resource:e.input.resource,accessibility:$a$1(e.input.projection),...Sg(e.input.projection),...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{}})}var y0=256,Bc=8,Rr=8,ko=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function b0(e,n){let t=Math.max(1,n.columnCount);if(t<=1)return 0;let r=e.x+e.width/2;if(n.columnLefts&&n.columnWidths&&n.columnLefts.length===t){for(let i=0;i<t;i+=1){let s=n.columnLefts[i],l=s+n.columnWidths[i];if(r>=s-.001&&r<l+.001)return i}return t-1}let o=n.columnGapPt,a=(n.contentWidth-o*(t-1))/t;for(let i=0;i<t;i+=1){let s=i*(a+o),l=s+a;if(r>=s-.001&&r<l+.001)return i}return t-1}function Oc(e){return e.behindDocument?"behind":"inFront"}function Cg(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function x0(e){switch(e){case "inline":case "behind":case "inFront":return null;case "square":case "squareLeft":case "squareRight":return "square";case "tight":return "tight";case "through":return "through";case "topAndBottom":return "topAndBottom";default:return null}}function S0(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function Mc(e){let n=x0(e.projection.wrap);if(!n||!e.projection.wrapGeometry)return null;let t=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return pg({mode:n,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:t.distancesEmu,polygonEmu:t.polygon,crop:e.projection.picture?.crop??{},transform:e.projection.picture?.transform??{rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:{x:0,y:0},extentEmu:{cx:0,cy:0}},extentWidthPt:e.geometry.contentBounds.width,extentHeightPt:e.geometry.contentBounds.height,textSide:n==="square"?S0(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Fc(e){if(e.mode==="topAndBottom"||e.mode==="square")return Rc(e.contentBounds,e.effectInsets,e.wrapDistances);let n=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)n.push(o.y);let t=Math.min(...n)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...n)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:t,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-t)})}function R0(e){if(e.drawing.behindDocument||!Cg(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=Mc({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:n});return t?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:Oc(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:Fc(t),input:t}):null}function Og(e,n){let t=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=n.sourceOrder??Number.MAX_SAFE_INTEGER;return t!==r?t-r:e.drawingNodeId.localeCompare(n.drawingNodeId)}function w0(e,n){let t=Oc(e),r=Oc(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:Og(e,n)}function Bg(e){return Object.freeze([...e].sort(w0))}function Cc(e,n){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function Lc(e,n){if(Math.abs(n)<=1e-4)return e;let t=e.geometry;return Object.freeze({...e,y:e.y+n,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+n}),geometry:Object.freeze({...t,contentBounds:Object.freeze({...t.contentBounds,y:t.contentBounds.y+n}),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+n}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+n}),transformedCorners:t.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+n})),clipPolygon:t.clipPolygon?t.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+n})):null})})}function Mg(e,n){let t=n.maxAttempts??y0,r=[...e].sort(Og),o=[],a=[],i=[];for(let s of r){if(s.allowOverlap){o.push(s);continue}let l=s,d=0;for(;d<t&&o.some(g=>Cc(g.paintBounds,l.paintBounds));){let p=o.find(g=>Cc(g.paintBounds,l.paintBounds)),m=p.paintBounds.y+p.paintBounds.height-l.paintBounds.y+.001;l=Lc(l,m),d+=1;}let c=o.some(f=>Cc(f.paintBounds,l.paintBounds)),u=l.paintBounds.y+l.paintBounds.height>n.pageBottom+.001;if(c||u){a.push(l),i.push(l.drawingNodeId);continue}o.push(l);}return Object.freeze({drawings:Object.freeze(o),deferred:Object.freeze(a),deferredNodeIds:Object.freeze(i)})}function Co(e,n,t,r){let o=[{start:t,end:r}];for(let a of n){let i=a.verticalBand;if(e<i.y||e>=i.y+i.height)continue;let s=fg(e,a.input),l=[];for(let d of o)for(let c of s){let u=Math.max(d.start,c.start),f=Math.min(d.end,c.end);f>u+1e-6&&l.push(Object.freeze({start:u,end:f}));}if(o=l,o.length===0)break}return Object.freeze(o)}function Fg(e,n){for(let t of n)if(e>=t.start-1e-6&&e<t.end-1e-6)return Math.max(0,t.end-e);return 0}function P0(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function Ec(e,n){let t=P0(e,n);if(!t)return null;let r=Math.max(e,t.start),o=t.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function I0(e,n,t){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+n,y:r.y+t}),contentLeft:e.contentLeft+n,contentRight:e.contentRight+n,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{}})}function Nc(e,n){return Object.freeze({...e,layoutFallback:n})}function Lg(e,n,t,r){return e.length===0?e:Object.freeze(e.map(o=>{let a=o.verticalBand,i=o.input;return Object.freeze({...o,y:o.y-t,verticalBand:Object.freeze({...a,x:a.x-n,y:a.y-t}),input:Object.freeze({...I0(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function Eg(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function Ng(e){let n=Mn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Yn(e.paragraph),r=e.displayMode??ze,o=Math.max(1,e.contentRight-e.contentLeft),a=[];for(let i of n){if(!ke(i.revisions,r)||i.projection.anchor?.behindDocument||!Cg(i.projection.wrap)||i.projection.wrap==="topAndBottom")continue;let s=t.get(i.atomId);if(s===void 0)continue;let l=e.anchorLineTopByModelStart.get(s);if(l===void 0)continue;let d=Object.freeze({x:e.contentLeft,y:l,width:o,height:14}),c=e.anchorCellBox!=null,u=Tc(i.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+o,pageHeight:792,marginLeft:e.contentLeft,marginRight:0,marginBottom:0,contentInsetTop:0,contentInsetBottom:0,contentWidth:o,contentHeight:648,contentBandHeight:648,paragraphBox:d,anchorLineBox:d,anchorCharacterX:e.contentLeft,columnBox:d,cellBox:c?e.anchorCellBox:null,layoutInCell:c,ownerPartName:e.drawingLayout.ownerPartName,storyKind:"body"}),f=e.paragraphStartY+l,p=Bt(i.projection),m=To({projection:i.projection,anchorX:u.x,anchorY:f,extentWidth:p.width,extentHeight:p.height}),g=Mc({projection:i.projection,geometry:m,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:u.x,anchorY:f});g&&a.push(Object.freeze({drawingNodeId:i.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:s,sourceOrder:e.sourceOrderOf?.(i.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:i.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:i.projection.anchor?.relativeHeight??0,allowOverlap:i.projection.anchor?.allowOverlap??true,columnIndex:0,y:f,verticalBand:Fc(g),input:g}));}return a.sort((i,s)=>i.sourceOrder-s.sourceOrder),Object.freeze(a)}function xs(e){let n=Mn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Yn(e.paragraph),r=e.displayMode??ze,o=[];for(let a of n){if(!ke(a.revisions,r)||a.projection.anchor?.behindDocument||a.projection.wrap!=="topAndBottom")continue;let i=t.get(a.atomId);if(i===void 0)continue;let s=e.anchorLineTopByModelStart.get(i);if(s===void 0)continue;let l=e.paragraphStartY+s,d=Bt(a.projection),c=To({projection:a.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:d.width,extentHeight:d.height}),u=Mc({projection:a.projection,geometry:c,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:l});u&&o.push(Object.freeze({drawingNodeId:a.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:i,sourceOrder:e.sourceOrderOf?.(a.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:a.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:a.projection.anchor?.relativeHeight??0,allowOverlap:a.projection.anchor?.allowOverlap??true,columnIndex:e.columnIndex??0,y:l,verticalBand:Fc(u),input:u}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}var v0=8;function T0(e,n,t,r){return e<r&&n>t}function mt(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<v0;o+=1){let a=e+r,i=a+n,s=a,l=false;for(let c of t){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;T0(a,i,u,f)&&(l=true,s=Math.max(s,f));}if(!l)break;let d=s-e;if(d<=r+.001)break;r=d;}return r}function k0(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function C0(e){let n=e.contentBounds,t=e.wrapDistances,r=e.effectInsets,o=e.polygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"",a=e.clipPolygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"";return [e.mode,e.textSide,n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),t.top.toFixed(3),t.right.toFixed(3),t.bottom.toFixed(3),t.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function pt(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=Co(r,[n],n.input.contentLeft,n.input.contentRight);return [n.drawingNodeId,String(n.sourceOrder),String(n.columnIndex),n.y.toFixed(3),t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),C0(n.input),k0(o)].join("|")}).join(`
8
+ `)}function Ac(e,n,t,r,o,a){let i=[];for(let s of e){let l=n.projectionForAtom?.(s.drawingNodeId);if(!l)continue;let d=s.sourceOrder??o?.(s.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?b0(s,a):0,u=R0({drawing:s,projection:l,sourceOrder:d,contentLeft:t,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((s,l)=>s.sourceOrder-l.sourceOrder),Object.freeze(i)}function Ss(e,n,t,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:t}),i=new Map;for(let s of e){let l=s.anchoredDrawings??[],d=Ac(l,n,0,t,r,a);d.length>0&&i.set(s.index,d);}return i}var kg=new WeakMap;function O0(e){return e?`${e.columnCount};${e.columnGapPt};${e.contentWidth};${(e.columnLefts??[]).join(",")};${(e.columnWidths??[]).join(",")}`:""}function Dc(e,n,t,r,o,a){let i=O0(a),s=kg.get(e);if(s&&s.drawingLayout===n&&s.drawingLayoutEpoch===t&&s.contentWidth===r&&s.drawingSourceOrder===o&&s.columnToken===i)return s.zones;let l=Ss(e,n,r,o?d=>o.get(d):void 0,a);return kg.set(e,{drawingLayout:n,drawingLayoutEpoch:t,contentWidth:r,drawingSourceOrder:o,columnToken:i,zones:l}),l}function Rs(e,n){if(e.size!==n.size)return false;for(let[t,r]of e){let o=n.get(t);if(!o||pt(r)!==pt(o))return false}return true}function ws(e){return e.size===0?"":[...e.entries()].sort(([n],[t])=>n-t).map(([n,t])=>`${n}:${pt(t)}`).join(`
9
+ `)}function _c(e,n,t,r=0){return (t.length>0?mt(e,n.height,t):n.exclusionSkipBefore??0)+Math.max(0,n.height-n.trailingSpacing)+r}function Ag(e){return Object.freeze({spans:e.spans.map(n=>Object.freeze({...n,box:Object.freeze({...n.box})})),drawings:e.drawings.map(n=>Object.freeze({...n,paintBounds:Object.freeze({...n.paintBounds}),hitBounds:Object.freeze({...n.hitBounds})})),start:e.start,end:e.end,width:e.width,height:e.height,baseline:e.baseline,leading:e.leading,trailingSpacing:e.trailingSpacing,...e.pageBreakAfter?{pageBreakAfter:true}:{},...e.columnBreakAfter?{columnBreakAfter:true}:{},...e.deletedRanges?{deletedRanges:Object.freeze(e.deletedRanges)}:{},...e.exclusionSkipBefore?{exclusionSkipBefore:e.exclusionSkipBefore}:{},...e.anchorRevisions?{anchorRevisions:Object.freeze(e.anchorRevisions)}:{}})}var B0=.001;function vn(e){return po(e)}var Is=new Set(["-","\u2010","\u2013","\u2014"]);function Dg(e){let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];r===" "?(t>0&&n[n.length-1]!==t&&n.push(t),n.push(t+1)):(r===" "||Is.has(r)&&t>0&&e[t-1]!==" "&&t+1<e.length&&e[t+1]!==" "&&!Is.has(e[t+1]))&&n.push(t+1);}return n[n.length-1]!==e.length&&n.push(e.length),n}function M0(e,n,t){for(let r=n;r<e.length;r+=1){let o=e[r];if(o.inlineDrawing)return true;let a=r===n?t:0;for(let i=a;i<o.text.length;i+=1){let s=o.text[i];if(s===`
10
+ `||s===zc$1)return false;if(s!==" "&&s!==" ")return true}}return false}function F0(e,n,t,r){let o=0,a=0,i=false;for(let s=n;s<e.length;s+=1){let l=e[s],d=s===n?t:0;for(let c=d;c<l.text.length;){let u=l.text[c];if(u===" "||u===`
11
+ `||u===zc$1)return {width:o,decimalOffset:i?a:o};let f=c+1,p=l.text.slice(c,f),m=r.measure(Zt(p,l.style),l.style);!i&&u==="."?i=true:i||(a+=m),o+=m,c=f;}}return {width:o,decimalOffset:i?a:o}}function L0(e,n,t,r){let o=e.relativeTo==="indent"||!r?{left:n,right:t}:r;return {positionPt:e.alignment==="right"?o.right:e.alignment==="center"?(o.left+o.right)/2:o.left,alignment:e.alignment,...e.leader?{leader:e.leader}:{}}}var Ps=31680;function Da(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let n=Number(e);return Number.isFinite(n)?n>Ps?gd(Ps):n<-Ps?gd(-Ps):gd(n):null}function _a(e){let n=0,t=0;for(let r of e){if(r.localName!=="ind")continue;let o=r.attributes?.left??r.attributes?.start,a=r.attributes?.right??r.attributes?.end,i=Da(o),s=Da(a);i!==null&&(n=id(i)),s!==null&&(t=id(s));}return {left:n,right:t}}function _g(e){let n="left";for(let t of e)if(t.localName==="jc")switch(t.attributes?.val){case "center":n="center";break;case "right":case "end":n="right";break;case "both":case "distribute":n="both";break;default:n="left";}return n}function E0(e){return e.endsWith(" ")}function N0(e,n){let t=e.range.end-e.range.start;if(t<=0||e.text===" "||e.projected||e.text.length!==t)return Object.freeze([0,e.box.width]);let r=[0];for(let o=1;o<=e.text.length;o+=1)r.push(Nn(e.text.slice(0,o),e.style,n));return Object.freeze(r)}function Oo(e,n){return e.map(t=>t.caretEdges?t:{...t,caretEdges:N0(t,n)})}function vs(e,n,t,r,o,a,i){if(e.length===0)return e;if(o==="left")return Oo(e,n);let s=e[e.length-1],l=s.text.replace(/\s+$/,""),d=l===s.text?0:s.box.width-Nn(l,s.style,n),c=i??s.box.x-t+s.box.width-d,u=r-c;if(u<=0)return Oo(e,n);if(o==="both"){if(a)return Oo(e,n);let p=[];for(let y=1;y<e.length;y+=1)E0(e[y-1].text)&&p.push(y);if(p.length===0)return Oo(e,n);let m=u/p.length,g=new Set(p),h=0;return Oo(e.map((y,x)=>(g.has(x)&&(h+=m),h===0?y:{...y,box:{...y.box,x:y.box.x+h}})),n)}let f=o==="center"?u/2:u;return Oo(e.map(p=>({...p,box:{...p.box,x:p.box.x+f}})),n)}function Ts(e,n){return n===0||e.length===0?e:e.map(t=>ys(t,n,0))}function ks(e,n,t,r,o,a,i,s=[],l=so,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let p=u?.lineSpacing??ao,m=u?.firstLineOffset??0,g=[],h=us(e,s,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??ze,g,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false),y=Math.max(0,u?.startOffset??0),x=h.flatMap(D=>{if(D.end<=y)return [];if(D.start>=y)return [D];let P=y-D.start;return [{...D,text:D.projected?D.text:D.text.slice(P),start:y}]}),k=Qm(o,u?.equationCacheToken),B=D=>D.equation?k(D.equation,D.style):null;if(x.length===0&&u?.suppressEmptyPlaceholderLine)return [];let v=D=>({...D.revisions===void 0?{}:{revisions:D.revisions},...D.fieldAtom===void 0?{}:{fieldAtom:D.fieldAtom}}),L=u?.markRunProperties??s,I=L.length===0?dt:Ne(L,u?.themeFonts),S=t+r,w=u?.contentLeft??t,T=u?.contentRight??S,N=u?.contentOriginX??0,M=[],b={spans:[],start:y,end:y,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},W=false,_=new Map,F=u?.displayMode??ze,E=(()=>{let D=new Set;if(!u?.inlineDrawingLayout)return D;let P=Yn(e);for(let z of Mn(e,u.inlineDrawingLayout)){if(!ke(z.revisions,F)||z.projection.wrap!=="topAndBottom")continue;let $=P.get(z.atomId);$!==void 0&&D.add($);}return D})(),O=(()=>{let D=new Set;if(!u?.inlineDrawingLayout)return D;let P=Yn(e);for(let z of Mn(e,u.inlineDrawingLayout)){if(!ke(z.revisions,F)||z.projection.anchor?.behindDocument||z.projection.wrap==="topAndBottom"||z.projection.wrap==="inline"||z.projection.wrap==="behind"||z.projection.wrap==="inFront")continue;let $=P.get(z.atomId);$!==void 0&&D.add($);}return D})(),R=[...(u?.pageExclusionZones??[]).filter(D=>D.anchorParagraphId===n).map(D=>D.anchorModelStart),...E,...O],V=(()=>{let D=new Map;if(R.length===0)return D;let P=0,z=0,$=0,ee=()=>$===0?m:0,Q=()=>Math.max(1,r-ee()),ue=le=>{P=le,z=0,$+=1;};for(let le of x){let ie=B(le);if(ie){let ve=ie.geometry.box.width;z>0&&z+ve>Q()&&ue(le.start),R.includes(le.start)&&D.set(le.start,P),z+=ve;continue}if(le.inlineDrawing){let ve=Bt(le.inlineDrawing.projection).totalWidth;z>0&&z+ve>Q()&&ue(le.start),R.includes(le.start)&&D.set(le.start,P),z+=ve;continue}if(le.text===`
12
+ `||le.text===zc$1){ue(le.end);continue}let Ge=0;for(let ve of Dg(le.text)){let Ae=le.text.slice(Ge,ve);if(Ae.length===0)continue;let Fe=le.style,un=o.measure(Ae,Fe),Ke=le.start+Ge;z>0&&z+un>Q()&&ue(Ke),R.includes(Ke)&&D.set(Ke,P),R.includes(le.start)&&D.set(le.start,P),z+=un,Ge=ve;}}for(let le of R)D.has(le)||D.set(le,P);return D})();for(let D of O){let P=V.get(D);P!==void 0&&_.set(D,P);}let A=D=>{if(D.anchorParagraphId!==n)return true;let P=V.get(D.anchorModelStart);return P!==void 0&&b.start>=P||b.end>=D.anchorModelStart},G=()=>{let D=u?.pageExclusionZones?.filter($=>!(!A($)||$.anchorParagraphId===n&&($.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],P=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&_.size>0?Ng({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:w,contentRight:T,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:_,anchorCellBox:u.anchorCellBox,displayMode:F}):Object.freeze([]),z=u?.inlineDrawingLayout&&_.size>0?xs({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:w,contentRight:T,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:_,displayMode:F}):Object.freeze([]);return Object.freeze([...D,...P,...z])},U=()=>M.length===0?m:0,H=()=>N+t+U(),X=()=>Math.max(1,r-U()),Z=()=>M.reduce((D,P)=>D+P.height+(P.exclusionSkipBefore??0),0),j=()=>(u?.paragraphStartY??0)+Z(),K=D=>{E.has(D)&&_.set(D,Z());},fe=()=>{if(W)return;let D=G();if(D.length===0||b.spans.length>0||b.drawings.length>0)return;let P=o.lineMetrics(I),z=mt(j(),b.height>0?b.height:P.height,D);z>.001&&(W=true,b.exclusionSkipBefore=z);},Be=()=>j()+(b.exclusionSkipBefore??0)+.001,De=()=>{let D=G();if(D.length===0)return true;fe();let P=Co(Be(),D,w,T),z=H()+b.width,$=Ec(z,P);return $?($.x>z+.001&&(b.width=$.x-H()),true):false},ce=()=>{let D=X(),P=G();if(P.length===0)return D;if(fe(),!De())return 0;let z=Co(Be(),P,w,T),$=H()+b.width,ee=Fg($,z);return ee<=.001?0:Math.min(D,b.width+ee)},xe=()=>Math.max(0,ce()-b.width),be=()=>{let D=G();if(D.length===0||!D.some(Q=>Q.anchorParagraphId!==n||b.end>Q.anchorModelStart))return false;let z=Co(Be(),D,w,T),$=H()+b.width,ee=false;for(let Q of z){if(!ee){$>=Q.start-1e-6&&$<Q.end-1e-6&&(ee=true);continue}if(Q.end-Q.start>.001)return b.width=Q.start-H(),true}return false},Ce=D=>{if(R.length===0||D<Math.min(...R))return;let P=G().filter(ue=>ue.anchorParagraphId===n&&D>=ue.anchorModelStart);if(P.length===0)return;fe();let z=Co(Be(),P,w,T),$=H()+b.width,ee=-1;for(let ue=0;ue<z.length;ue+=1){let le=z[ue];if($>=le.start-.001&&$<le.end-.001){ee=ue;break}}if(ee>=0)return;let Q=Ec($,z);Q&&Q.x>$+.001&&(b.width=Q.x-H());},Ie=D=>{G().filter(z=>z.input.mode==="topAndBottom"&&z.anchorParagraphId===n&&D>=z.anchorModelStart).length!==0&&((b.spans.length>0||b.drawings.length>0)&&we(),fe());},me=(D,P=0)=>P>64?xe()>=D:(fe(),De()?D<=xe()+.001?true:b.spans.length>0||b.drawings.length>0?be()&&D<=xe()+.001?true:(we(),me(D,P+1)):be()?me(D,P+1):true:b.spans.length>0||b.drawings.length>0?(we(),me(D,P+1)):true),Me=(D,P)=>g.filter(z=>z.start<P&&z.end>D).map(z=>({start:Math.max(z.start,D),end:Math.min(z.end,P)})),se=-1,_e=0,rn=0,Se="",an=(D,P)=>{let z=o.lineMetrics(D),$=Rg(z.baseline,b.height||z.height,P);return b.height===0?(b.height=$.lineHeight,b.baseline=$.baseline):($.lineHeight>b.height&&(b.height=$.lineHeight),b.baseline=Math.max(b.baseline,$.baseline)),{extentTopY:$.extentTopY}},Hn=()=>{if(b.drawings.length===0)return;b.spans.length===0&&(b.baseline=Math.max(b.baseline,...b.drawings.map(P=>P.y+P.height)));let D=Ic(b.drawings,b.baseline);b.drawings.splice(0,b.drawings.length,...D),b.baseline=Math.max(b.baseline,...b.drawings.map(P=>P.y+P.height));},gn=()=>{if(b.drawings.length===0)return;let D=Ic(b.drawings,b.baseline);b.drawings.splice(0,b.drawings.length,...D);},Dt=D=>{let P=0;for(let z of b.spans)P=Math.max(P,o.lineMetrics(z.style).height);return P>0?P:D},yt=()=>{if(b.drawings.length===0)return;let D=Math.max(0,...b.drawings.map(P=>P.y+P.height+P.distB));b.height=Math.max(b.height,D);},hn=()=>{Hn(),yt();},Jn=()=>{if(!(b.spans.length<2))for(let D=1;D<b.spans.length;D+=1){let P=b.spans[D-1],z=b.spans[D],$=z.box.x-(P.box.x+P.box.width);$<=.001||b.drawings.some(Q=>Q.start>=P.range.end&&Q.start<z.range.start)||(b.spans[D]={...z,wrapAdvanceBefore:$});}},we=D=>{let P=o.lineMetrics(I),z=b.baseline;b.height===0?(b.height=P.height,b.baseline=P.baseline,z=P.baseline):D?.includeParagraphMark&&(b.height=Math.max(b.height,P.height)),hn();let $=b.height,ee=p.rule==="auto"&&b.drawings.length>0,Q=ee?Dt(P.height):$,ue=Wd(p,Q,b.baseline);ee||(b.baseline=ue.baseline),b.leading=Math.max(0,b.baseline-z),b.height=ue.height,gn(),p.rule!=="exact"&&yt(),b.trailingSpacing=b.drawings.length===0&&p.rule!=="exact"?Math.max(0,ue.height-$):0,(()=>{let Ge=G();if(Ge.length===0)return;let ve=mt(j(),b.height,Ge);ve>.001?b.exclusionSkipBefore=ve:delete b.exclusionSkipBefore;})(),Jn();let ie=Me(b.start,b.end);ie.length>0&&(b.deletedRanges=ie),M.push(b),se=-1,_e=0,W=false,b={spans:[],drawings:[],start:b.end,end:b.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},fe();},sn=false;for(let D=0;D<x.length;D+=1){let P=x[D];if(P.breakKind==="column"){let ee=o.lineMetrics(P.style);b.spans.push({range:{paragraphId:n,start:P.start,end:P.end},text:P.text,props:P.props,style:P.style,box:{x:H()+b.width,y:0,width:0,height:ee.height},...P.link?{link:P.link}:{},...v(P)}),b.height=Math.max(b.height,ee.height),b.baseline=Math.max(b.baseline,ee.baseline),b.end=P.end,we(),M[M.length-1].columnBreakAfter=true,sn=true;continue}if(P.equation){let ee=B(P),Q=ee.geometry.box.width;if((b.spans.length>0||b.drawings.length>0)&&b.width+Q>ce()&&we(),!me(Q))continue;let le=Math.max(0,b.height-b.baseline),ie=Math.max(0,ee.geometry.box.height-ee.geometry.baseline);b.baseline=Math.max(b.baseline,ee.geometry.baseline),b.height=b.baseline+Math.max(le,ie),b.spans.push({range:{paragraphId:n,start:P.start,end:P.end},text:"\uFFFC",props:P.props,style:P.style,box:{x:H()+b.width,y:0,width:Q,height:ee.geometry.box.height},projected:true,equation:ee,...v(P)}),b.width+=Q,b.end=P.end,se=-1,Se="";continue}if(P.projected&&!P.inlineDrawing&&P.text==="\uFFFC"){K(P.start),P.anchoredAtom&&P.revisions!==void 0&&ke(P.revisions,F)&&(b.anchorRevisions=[...b.anchorRevisions??[],...P.revisions]),b.end=P.end;continue}if(P.inlineDrawing){K(P.start);let ee=Bt(P.inlineDrawing.projection),Q=ee.totalWidth;if((b.spans.length>0||b.drawings.length>0)&&b.width+Q>ce()&&we(),!me(Q))continue;let{extentTopY:le}=an(P.style,ee),ie=H()+b.width;b.drawings.push(Tg({input:P.inlineDrawing,paragraphId:n,start:P.start,slotX:ie,y:le,baseline:b.baseline,contentLeft:w,contentRight:T,...P.revisions?{revisions:P.revisions}:{}})),b.width+=Q,b.end=P.end,se=-1,Se="";continue}if(P.text===zc$1){let ee=o.lineMetrics(P.style);b.spans.push({range:{paragraphId:n,start:P.start,end:P.end},text:zc$1,props:P.props,style:P.style,box:{x:H()+b.width,y:0,width:0,height:ee.height},...P.link?{link:P.link}:{},...v(P)}),b.height=Math.max(b.height,ee.height),b.baseline=Math.max(b.baseline,ee.baseline),b.end=P.end,we(),M[M.length-1].pageBreakAfter=true,sn=false;continue}if(P.text===`
13
+ `){let ee=o.lineMetrics(P.style);b.spans.push({range:{paragraphId:n,start:P.start,end:P.end},text:`
14
+ `,props:P.props,style:P.style,box:{x:H()+b.width,y:0,width:0,height:ee.height},...P.link?{link:P.link}:{},...v(P)}),b.height=Math.max(b.height,ee.height),b.baseline=Math.max(b.baseline,ee.baseline),b.end=P.end,we(),sn=true;continue}sn=false,Ie(P.start),R.length>0&&P.start>=Math.min(...R)&&Ce(P.start);let z=o.lineMetrics(P.style),$=0;for(let ee of Dg(P.text)){let Q=P.text.slice($,ee);if(Q.length===0)continue;let ue=!!P.projected||!!P.positionalTab||P.end-P.start!==P.text.length,le=ue?{paragraphId:n,start:P.start,end:P.end}:{paragraphId:n,start:P.start+$,end:P.start+ee};if(Q===" "){(b.spans.length>0||b.drawings.length>0)&&b.width>=ce()&&M0(x,D,ee)&&we();let Ke=H()+b.width,We=F0(x,D,ee,o),de=P.positionalTab?L0(P.positionalTab,t,S,u?.marginExtent):null,Sn=de===null?lo(l,Ke,S):de.positionPt>Ke?de:{...lo(l,Ke,S),...de.leader?{leader:de.leader}:{}},bt=Qd(Sn.alignment,Ke,Sn.positionPt,We.width,We.decimalOffset);b.spans.push({range:le,text:" ",props:P.props,style:P.style,box:{x:Ke,y:0,width:bt,height:z.height},...Sn.leader?{tabLeader:Sn.leader,tabLeaderAdvancePt:o.measure(Ud.get(Sn.leader)??".",P.style)}:{},...P.link?{link:P.link}:{},...Sn.leader?{tabLeader:Sn.leader}:{},...ue&&!P.positionalTab?{projected:true}:{},...P.noteNav?{noteNav:P.noteNav}:{},...v(P)}),b.width+=bt,b.height=Math.max(b.height,z.height),b.baseline=Math.max(b.baseline,z.baseline),b.end=ue?P.end:P.start+ee,Se=" ",$=ee;continue}let ie=P.measureText??Q,Ge=o.measure(Zt(ie,P.style),P.style),ve=$>0||Se===""||/[\s\u00a0]$/.test(Se)||/^[\s\u00a0]/.test(Q)||Is.has(Se[Se.length-1])&&!Is.has(Q[0]);if(ve&&(se=b.spans.length,_e=b.width,rn=b.end),Ce(P.start+$),b.width+Ge>ce()+B0&&(b.spans.length>0||b.drawings.length>0))if(ve||se<=0){if(!(be()&&b.width+Ge<=ce()+.001)){if(we(),!me(Ge))continue}}else {let Ke=b.spans.splice(se);b.width=_e,b.end=rn,b.height=0,b.baseline=0;for(let We of b.spans){let de=o.lineMetrics(We.style);b.height=Math.max(b.height,de.height),b.baseline=Math.max(b.baseline,de.baseline);}we();for(let We of Ke){let de=o.lineMetrics(We.style);b.spans.push({...We,box:{...We.box,x:H()+b.width}}),b.width+=We.box.width,b.height=Math.max(b.height,de.height),b.baseline=Math.max(b.baseline,de.baseline),b.end=We.range.end;}se=0,_e=0;}else if(b.spans.length===0&&b.drawings.length===0&&Ge>ce()+.001&&!me(Ge))continue;let Ae=Q,Fe=P.start+$,un=Ge;if(!ue&&P.measureText===void 0)for(;b.spans.length===0&&Ae.length>1&&un>ce();){let Ke=1,We=Ae.length-1,de=1;for(;Ke<=We;){let xt=Ke+We>>1;o.measure(Zt(Ae.slice(0,xt),P.style),P.style)<=ce()?(de=xt,Ke=xt+1):We=xt-1;}let Sn=Ae.slice(0,de),bt=o.measure(Zt(Sn,P.style),P.style);b.spans.push({range:{paragraphId:n,start:Fe,end:Fe+de},text:Sn,props:P.props,style:P.style,box:{x:H()+b.width,y:0,width:bt,height:z.height},...P.link?{link:P.link}:{},...P.noteNav?{noteNav:P.noteNav}:{},...v(P)}),b.width+=bt,b.height=Math.max(b.height,z.height),b.baseline=Math.max(b.baseline,z.baseline),b.end=Fe+de,we(),Ae=Ae.slice(de),Fe+=de,un=o.measure(Zt(Ae,P.style),P.style);}b.spans.push({range:ue?le:{paragraphId:n,start:Fe,end:P.start+ee},text:Ae,props:P.props,style:P.style,box:{x:H()+b.width,y:0,width:un,height:z.height},...P.link?{link:P.link}:{},...ue&&!P.positionalTab?{projected:true}:{},...P.noteNav?{noteNav:P.noteNav}:{},...v(P)}),b.width+=un,b.height=Math.max(b.height,z.height),b.baseline=Math.max(b.baseline,z.baseline),b.end=ue?P.end:P.start+ee,Se=Q,$=ee;}}return (b.spans.length>0||b.drawings.length>0||M.length===0||sn)&&we({includeParagraphMark:true}),i!==null&&a&&a.set(i,M.map(Ag)),M}var Bs=32,Gg=4096,A0=128,D0=/[\u0000-\u001F\u007F-\u009F]/,_0={major:null,minor:null};function Pr(e){return e.kind!=="textValue"}function Bo(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Mo(e,n){for(let t of e.children)if(Pr(t)&&t.localName===n)return t}function wr(e){return !(e===void 0||e.length===0||e.length>A0||D0.test(e)||I(e))}function H0(e){return e==="1"||e==="true"||e==="on"}function Cs(e){return e.map(n=>n.attributes?{n:n.localName,a:n.attributes}:{n:n.localName})}function Ha(e){if(e){for(let n of e.children)if(Pr(n)&&(n.kind==="runProperties"||n.localName==="rPr"))return n}}function Ms(e){if(e){for(let n of e.children)if(Pr(n)&&(n.kind==="paragraphProperties"||n.localName==="pPr"))return n}}var Hg=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function Fo(e){return e.some(n=>Hg.has(n.localName))?e.filter(n=>!Hg.has(n.localName)):e}function z0(e){let n=Mo(e,"docDefaults");if(!n)return {run:[],paragraph:[],paragraphNode:void 0};let t=Mo(n,"rPrDefault"),r=Mo(n,"pPrDefault"),o=Ha(t),a=Ms(r);return {run:Fo(vn(o)),paragraph:Fo(vn(a)),paragraphNode:a}}function j0(e){let n=Bo(e,"styleId");if(!wr(n))return null;let t=Bo(e,"type")??"",r=(()=>{let u=Mo(e,"basedOn");return u?Bo(u,"val"):void 0})(),o=wr(r)?r:null,a=(()=>{let u=Mo(e,"next");return u?Bo(u,"val"):void 0})(),i=wr(a)?a:null,s=Ms(e),l=Ha(e),d=new Map,c=0;for(let u of e.children){if(u.kind==="textValue"||u.localName!=="tblStylePr")continue;if(c>=G0)break;c+=1;let f=Bo(u,"type");f&&!d.has(f)&&d.set(f,u);}return {styleId:n,type:t,basedOn:o,next:i,isDefault:H0(Bo(e,"default")),paragraphProperties:Fo(vn(s)),runProperties:Fo(vn(l)),paragraphPropertiesNode:s,tablePropertiesNode:Mo(e,"tblPr"),conditionalTableFormats:d}}var G0=32,Os=Object.freeze({tablePropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function Wg(e,n){let t=n&&wr(n)?n:null,r=t?jg(e,t):null;if(r)return r;let o=e.defaultTableStyleId;return !o||o===t?Os:jg(e,o)??Os}var zg=new WeakMap;function jg(e,n){let t=zg.get(e);t||(t=new Map,zg.set(e,t));let r=t.get(n);if(r)return r;let o=W0(e,n);return o?(t.set(n,o),o):null}function W0(e,n){let t=jc(e,n,"table");if(t.length===0)return null;let r=[],o=[],a=[],i=[],s=new Map;for(let l of t){l.tablePropertiesNode&&r.push(l.tablePropertiesNode),l.paragraphPropertiesNode&&o.push(l.paragraphPropertiesNode),a.push(...l.paragraphProperties),i.push(...l.runProperties);for(let[d,c]of l.conditionalTableFormats)s.set(d,c);}return Object.freeze({tablePropertyNodes:Object.freeze(r),paragraphPropertyNodes:Object.freeze(o),paragraphProperties:Object.freeze(a),runProperties:Object.freeze(i),conditional:V0(s)})}function V0(e){let n=Object.freeze({get:t=>e.get(t),has:t=>e.has(t),forEach:(t,r)=>{for(let[o,a]of e)t.call(r,a,o,n);},keys:()=>e.keys(),values:()=>e.values(),entries:()=>e.entries(),[Symbol.iterator]:()=>e[Symbol.iterator](),[Symbol.toStringTag]:"Map",get size(){return e.size}});return n}function Vg(e){return e.paragraphPropertyNodes.length>0||e.paragraphProperties.length>0||e.runProperties.length>0||e.conditional.size>0}var Hc=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function $g(e,n){let t=[...e.paragraphPropertyNodes],r=[...e.paragraphProperties],o=[...e.runProperties];for(let a of n){let i=e.conditional.get(a);if(!i)continue;let s=Ms(i);s&&(t.push(s),r.push(...Fo(vn(s))));let l=Ha(i);l&&o.push(...Fo(vn(l)));}return t.length===0&&r.length===0&&o.length===0?Hc:{paragraphProperties:r,paragraphPropertyNodes:t,runProperties:o}}function $0(e,n=_0){let t=new Map;if(!e)return {cacheToken:y({empty:true,theme:n}),docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,defaultTableStyleId:null,themeFonts:n,styles:t};let r=z0(e),o=null,a=null,i=null,s=0;for(let d of e.children){if(!Pr(d)||d.localName!=="style")continue;if(s>=Gg)break;s+=1;let c=j0(d);if(!c)continue;let{isDefault:u,...f}=c;t.set(f.styleId,f),f.type==="paragraph"?u?o=f.styleId:o===f.styleId&&(o=null):f.type==="character"?u?a=f.styleId:a===f.styleId&&(a=null):f.type==="table"&&(u?i=f.styleId:i===f.styleId&&(i=null));}return {cacheToken:y({dR:Cs(r.run),dP:Cs(r.paragraph),defP:o,defC:a,defT:i,theme:n,styles:[...t.values()].map(d=>({id:d.styleId,type:d.type,basedOn:d.basedOn,p:Cs(d.paragraphProperties),r:Cs(d.runProperties)}))}),docDefaultsRun:r.run,docDefaultsParagraph:r.paragraph,docDefaultsParagraphNode:r.paragraphNode,defaultParagraphStyleId:o,defaultCharacterStyleId:a,defaultTableStyleId:i,themeFonts:n,styles:t}}function zc(e,n){let t=null;for(let r of e){if(r.localName!==n)continue;let o=r.attributes?.val;t=wr(o)?o:null;}return t}function jc(e,n,t){let r=e.styles.get(n);if(!r||r.type!==t)return [];let o=[],a=new Set,i=n,s=0;for(;i!==null&&s<Bs&&!(a.has(i)||!wr(i));){a.add(i);let l=e.styles.get(i);if(!l)break;o.push(l),i=l.basedOn,s+=1;}return o.reverse()}function Lo(e,n,t){let r=vn(n),o=zc(r,"pStyle")??e.defaultParagraphStyleId,a=o?jc(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...t?.paragraphProperties??[],...a.flatMap(p=>p.paragraphProperties)],s=[...i,...r],l=[];e.docDefaultsParagraphNode&&l.push(e.docDefaultsParagraphNode),t&&l.push(...t.paragraphPropertyNodes);for(let p of a)p.paragraphPropertiesNode&&l.push(p.paragraphPropertiesNode);n&&l.push(n);let d=Ha(n&&Pr(n)?n:void 0),c=vn(d),u=[...e.docDefaultsRun,...t?.runProperties??[],...a.flatMap(p=>p.runProperties)],f=c.length===0?u:[...u,...c];return {paragraphProperties:s,inheritedParagraphProperties:i,paragraphPropertyNodes:l,runProperties:u,markRunProperties:f,styleId:o??null}}function Xg(e){let n;for(let t of e){if(!t||t.kind==="textValue")continue;let r=false;for(let o of t.children)if(Pr(o)&&o.localName==="pBdr"){r=true;break}r&&(n=It(t).bottom);}return n}function Mt(e,n,t){let r=[];if(t){let a=zc(n,"rStyle")??t.defaultCharacterStyleId;a&&(r=jc(t,a,"character").flatMap(i=>i.runProperties));}return e.length===0&&r.length===0?n:n.length===0&&r.length===0?e:[...e,...r,...n]}function za(e,n,t,r,o,a=false){let i=Ms(e),s=t?Lo(t,i,o):null,l=s?[...s.paragraphProperties]:vn(i),d=vn(Ha(i&&Pr(i)?i:void 0)),c=s?s.runProperties:[],u=s?s.markRunProperties:d,f=_a(l),p=0,m=0;if(r)p=r.indent.hanging,m=r.indent.firstLine;else for(let y of l){if(y.localName!=="ind")continue;let x=Da(y.attributes?.hanging),k=Da(y.attributes?.firstLine);(y.attributes?.hanging!==void 0||y.attributes?.firstLine!==void 0)&&(p=x!==null?Math.max(0,id(x)):0,m=k!==null?id(k):0);}let g=r?{left:r.indent.left,right:r.indent.right,hanging:p,firstLine:m}:{left:f.left,right:f.right,hanging:p,firstLine:m},h=s?Zd(s.paragraphPropertyNodes):Jd(i);return {props:l,indent:g,available:Math.max(1,n-g.left-g.right),alignment:_g(l),spacing:jd(l,{inList:r!==void 0,inTableCell:a}),lineSpacing:Gd(l),contextualSpacing:Vd(l),styleId:s?s.styleId:zc(l,"pStyle")??null,bottomBorder:s?Xg(s.paragraphPropertyNodes):It(i).bottom,borders:s?ba(s.paragraphPropertyNodes):It(i),shading:Kd(l),inheritedRunProperties:c,markRunProperties:u,tabStops:h,tabStopsCacheToken:gr(h),...r?{listItem:r}:{}}}var Yg=new WeakMap;function X0(e){let n=Yg.get(e);if(n!==void 0)return n;let t=o=>o.some(a=>a.localName==="pBdr"),r=t(e.docDefaultsParagraph);if(!r){for(let o of e.styles.values())if(t(o.paragraphProperties)){r=true;break}}return Yg.set(e,r),r}function Kg(e,n){return !n||!X0(n)?It(e):ba(Lo(n,e).paragraphPropertyNodes)}var Y0=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Gc(e){let n=e?.val;return n!=="0"&&n!=="false"&&n!=="off"}function Ug(e){let n=false,t=false,r=true;for(let o of e)switch(o.localName){case "keepNext":n=Gc(o.attributes);break;case "keepLines":t=Gc(o.attributes);break;case "widowControl":r=Gc(o.attributes);break;}return !n&&!t&&r?Y0:{keepNext:n,keepLines:t,widowControl:r}}function qg(e,n,t,r,o){if(e<=n)return e;if(r.keepLines&&!o)return n;if(!r.widowControl||t<2)return e;let a=e;return t-a<2&&(a-=1),a-n===1&&(a-=1),a<n&&(a=n),a===n&&o?e:a}function Zg(e,n,t,r){let o=0,a=t;for(let i=n;i-n<8;i+=1){let s=e[i];if(!s||s.kind!=="paragraph"||!s.spacing||!s.keeps)return null;o+=Math.max(s.spacing.before,a)-a;let l=r(i);if(!s.keeps.keepNext||i+1>=e.length)return o+=l[0]??0,s.keeps.widowControl&&l.length>1&&(o+=l[1]),o;for(let d of l)o+=d;o+=s.spacing.after,a=s.spacing.after;}return null}function K0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);o!==void 0&&(t===e&&(t=[...e]),t[r]=`${t[r]}~mk~${o}`);}return t}function U0(e,n,t){let r=e;for(let o=0;o<e.length;o+=1){if(!n(o))continue;let a=t(o);if(a===null)continue;let i=o>0&&t(o-1)===a,s=o+1<e.length&&t(o+1)===a;r===e&&(r=[...e]),r[o]=`${r[o]}~cs~${i?1:0}${s?1:0}`;}return r}function q0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);if(o==="")continue;let a=r>0&&n(r-1)===o,i=r+1<e.length&&n(r+1)===o;t===e&&(t=[...e]),t[r]=`${t[r]}~bg~${a?1:0}${i?1:0}`;}return t}function Z0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);o!==""&&(t===e&&(t=[...e]),t[r]=`${t[r]}~toc~${o}`);}return t}function J0(e,n){let t=e,r=0;for(let o=e.length-2;o>=0;o-=1)n(o)&&r<8?(t===e&&(t=[...e]),t[o]=`${e[o]}~kn~${t[o+1]}`,r+=1):r=0;return t}function Jg(e,n){let t=U0(e,n.contextualSpacingAt,n.styleIdAt);return t=q0(t,n.borderGroupKeyAt),n.tocVerdicts.length>0&&(t=Z0(t,r=>n.tocVerdicts[r])),t=K0(t,n.markerTextAt),t=J0(t,n.keepsNextAt),t}function Fs(e){let n=[],t=0;for(let r of e.members){let o=Fe(r).length;n.push({paragraphId:r.id,base:t,length:o}),t+=o;}return {members:n,total:t}}function Wc(e,n){let t;for(let r of e.members){if(r.base>n)break;(t===void 0||r.length>0||r.base>t.base)&&(t=r);}return t??e.members[e.members.length-1]}function Qg(e,n){let t=Wc(n,e.start);if(!t)return e;let r=e.end-t.base;return {paragraphId:t.paragraphId,start:e.start-t.base,end:Math.min(r,t.length)}}function Q0(e,n){return {...e,range:Qg(e.range,n)}}function Ls(e,n){return e.map(t=>{let r=t.spans.map(u=>Q0(u,n)),o=r[0],a=t.drawings?.map(u=>{let f=Wc(n,u.start);return f?{...u,paragraphId:f.paragraphId,start:u.start-f.base}:u}),i=o?r.filter(u=>u.range.paragraphId===o.range.paragraphId):[],s=o?(a??[]).filter(u=>u.paragraphId===o.range.paragraphId):[],l=o?{paragraphId:o.range.paragraphId,start:Math.min(o.range.start,...s.map(u=>u.start)),end:Math.max(i[i.length-1].range.end,...s.map(u=>u.start+1))}:Qg(t.range,n),d=a,c=t.deletedRanges?.map(u=>({deleted:u,member:Wc(n,u.start)})).filter(({member:u})=>u?.paragraphId===l.paragraphId).map(({deleted:u,member:f})=>({start:u.start-(f?.base??0),end:u.end-(f?.base??0)}));return {...t,range:l,spans:r,...d?{drawings:d}:{},...c?{deletedRanges:c}:{}}})}var eI=xo;function Kn(e,n){if(e.kind!=="textValue"){for(let t of e.children)if(t.kind!=="textValue"&&t.namespaceUri===ca$1&&t.localName===n)return t}}function eh(e){if(e.kind==="textValue")return false;let n=Kn(e,"paragraphProperties")??Kn(e,"pPr");if(!n)return false;let t=Kn(n,"runProperties")??Kn(n,"rPr");return t===void 0?false:Kn(t,"del")!==void 0||Kn(t,"moveFrom")!==void 0}function nh(e,n){if(e.kind==="textValue"||n>eI)return true;let t=(r,o)=>{for(let a of r){if(a.kind==="textValue")continue;if(a.kind==="run"){for(let s of a.children){if(s.kind==="text"){for(let l of s.children)if(l.kind==="textValue"&&l.value.length>0)return false;continue}if(s.kind!=="runProperties")return false}continue}if(kc$1(a)){if(o>=jc$1)continue;let s=mc$1(a);if(s&&!t(s,o+1))return false;continue}if((a.kind==="hyperlink"||a.kind==="revisionInsert"||a.kind==="revisionMoveTo")&&!nh(a,o+1))return false}return true};return t(e.children,n)}function th(e,n){if(n==="all-markup"||e.kind==="textValue")return false;let t=Kn(e,"paragraphProperties")??Kn(e,"pPr");if(!t)return false;let r=Kn(t,"runProperties")??Kn(t,"rPr");return r===void 0?false:(n==="proposed"?["del","moveFrom"]:["ins","moveTo"]).some(a=>Kn(r,a)!==void 0)}function Vc(e,n="proposed"){return e.kind!=="paragraph"||n!=="proposed"||!eh(e)?false:nh(e,0)}function nI(e){let n=e.root;if(n.localName==="hdr"||n.localName==="ftr")return n;let t=r=>{if(r.kind!=="textValue"){if(r.kind==="body")return r;for(let o of r.children){let a=t(o);if(a)return a}}};return t(n)}function tI(e,n){return !(e.kind==="paragraph"&&Vc(e,n))}var sh=new WeakMap;function Es(e){return sh.get(e)??null}function lh(e,n){let t=n.children.filter(a=>rh(a)),r=e.flatMap(a=>a.children.filter(i=>!rh(i))),o={...n,children:[...t,...r]};return sh.set(o,{merged:o,members:e}),o}function rh(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function rI(e,n){if(n==="all-markup")return e.map(i=>i.block);let t=[],r=[],o=null,a=()=>{t.push(...oh(r)),r=[],o=null;};for(let{block:i,parentKey:s}of e){if(r.length>0&&s!==o&&a(),i.kind!=="paragraph"){a(),t.push(i);continue}let l=th(i,n);if((l||r.length>0)&&!iI(i,n)){a(),t.push(i);continue}if(l){r.push(i),o=s;continue}if(r.length===0){t.push(i);continue}let d=[...r,i];r=[],o=null,t.push(lh(d,i));}return t.push(...oh(r)),t}function oh(e){if(e.length<2)return e;let n=e[e.length-1];return [lh(e,n)]}function ja(e,n){return rI(aI(e),n).filter(r=>tI(r,n))}var oI=new Set(["pPr","bookmarkStart","bookmarkEnd","proofErr","permStart","permEnd"]);function dh(e){for(let n of e.children){if(n.kind==="textValue"){if(n.value.length>0)return false;continue}if(n.namespaceUri!==ca$1||!oI.has(n.localName))return false}return true}function aI(e){let n=[],t=(r,o,a)=>{for(let i of r)if(i.kind!=="textValue"){if(i.kind==="paragraph"||i.kind==="table"){n.push({block:i,parentKey:a});continue}kc$1(i)&&o<jc$1&&t(nc$1(i),o+1,i.id);}};return t(e,0,""),n}var ah=new WeakMap;function iI(e,n){let t=ah.get(e),r=t?.get(n);if(r!==void 0)return r;let o=sI(e,n);return t?t.set(n,o):ah.set(e,new Map([[n,o]])),o}function sI(e,n){if(!lI(e))return false;let t=us(e,[],void 0,void 0,void 0,void 0,n),r=0;for(let o of t)r=Math.max(r,o.end);return r<=Fe(e).length}function lI(e){let n=0,t=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===ca$1&&o.localName==="fldChar"){let a=o.attributes.find(i=>i.localName==="fldCharType")?.value;a==="begin"?n+=1:a==="end"&&(n-=1,n<0&&(t=true));}for(let a of o.children)r(a);}};return r(e),n===0&&!t}var ih=Jf(16);function Ft(e,n="all-markup"){let t=ih.get(e),r=t?.[n];if(r)return r;let o=nI(e),a=o?ja(o.children,n):[];return t?t[n]=a:ih.set(e,{[n]:a}),a}function Ns(e,n="all-markup"){return e.kind!=="note"?[]:ja(e.children,n)}function $c(e,n="all-markup"){return e.kind==="textValue"?[]:ja(e.children,n)}function ch(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function Xc(e,n,t,r,o){let a=ch(o);if(!(e.length===0||!a||!o.inlineDrawingLayout||!o.anchorFrameBase||!o.pageContentClip))for(let i of e){let s=null,l=null,d=i.lines;for(let u of n){for(let f of u.blocks)if(f.kind==="paragraph"&&f.paragraphId===i.paragraphId){s=f.box,d=f.lines,l=u.box;break}if(s)break}if(!s)continue;let c=l??Object.freeze({x:i.cellOriginX,y:t,width:i.cellContentWidth,height:r});a(nr({paragraph:i.paragraph,paragraphId:i.paragraphId,paragraphBox:s,lines:d,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(s)??s,cellBox:c,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{}}));}}function uh(e,n){let t=ch(e),r=e.deferAnchoredDrawings;return !t&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:t,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{n.push(i);}},flushDeferred:(i,s,l)=>{if(n.length!==0){if(t&&!e.anchorDeferOnly)Xc(n,i,s,l,e);else if(r)for(let d of n)r(d);n.length=0;}}}}var dI={state:"none"},fh=(e,n)=>n.state==="omitted"?e:n;function As(e,n,t={}){return e.state==="omitted"?n:e.state==="none"?dI:e}function Yc(e,n){let t=fh;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right),insideH:t(e.insideH,n.insideH),insideV:t(e.insideV,n.insideV)}}function Kc(e,n){let t=fh;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right)}}function Ds(e=1048576){let n=e|0;return {intervalsRemaining:n>0?n:0}}function ph(e,n,t,r){let o=Math.max(0,Math.min(n|0,1024)),a=new Array(e.length);for(let i=0;i<e.length;i+=1){if(r&&r.intervalsRemaining<=0){a[i]=[];continue}a[i]=cI(e[i],o,t,r);}return a}function cI(e,n,t,r){let o=[];for(let c=0;c<e.length;c+=1){let u=e[c],f=Math.max(0,u.gridColumn|0),p=Math.min(n,f+Math.max(0,u.gridSpan|0));f>=p||(o.push({x:f,kind:1,cellIndex:c,cell:u}),o.push({x:p,kind:0,cellIndex:c,cell:u}));}if(o.length===0)return [];o.sort((c,u)=>c.x!==u.x?c.x-u.x:c.kind!==u.kind?c.kind-u.kind:c.cellIndex-u.cellIndex);let a=new Map,i,s=o[0].x,l=[],d=()=>{i=void 0;for(let c of a.values())(!i||c.cellIndex<i.cellIndex)&&(i=c);};for(let c of o){if(c.x>s&&i&&(!r||r.intervalsRemaining>0)){let u=l[l.length-1];u&&u.end===s&&u.cellIndex===i.cellIndex&&u.cell===i.cell?l[l.length-1]={start:u.start,end:c.x,cell:u.cell,cellIndex:u.cellIndex}:(l.push({start:s,end:c.x,cell:i.cell,cellIndex:i.cellIndex}),t&&(t.ownershipSlotsWritten+=1),r&&(r.intervalsRemaining-=1));}c.kind===1?a.set(c.cellIndex,{cell:c.cell,cellIndex:c.cellIndex}):a.delete(c.cellIndex),d(),s=c.x;}return l}function uI(e,n){let t=0,r=e.length;for(;t<r;){let o=t+r>>1;e[o].start<=n?t=o+1:r=o;}return t}function Uc(e,n,t,r){r&&(r.columnLookups+=1);let o=e[n];if(!o||t<0)return;let a=uI(o,t)-1;if(a<0)return;let i=o[a];if(!(t>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var yh=256,Ue={state:"omitted"},Ws={state:"none"},bh={top:Ue,left:Ue,bottom:Ue,right:Ue,insideH:Ue,insideV:Ue},xh={top:Ue,left:Ue,bottom:Ue,right:Ue},mh={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},pI=new Map([["single","single"],["thick","thick"],["double","double"],["dotted","dotted"],["dashed","dashed"],["dashSmallGap","dashed"],["dotDash","dashed"],["dotDotDash","dashed"],["triple","triple"],["wave","single"],["hairline","single"],["inset","single"],["outset","single"]]);function Eo(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function qc(e,n){return e.attributes.find(t=>t.localName===n)?.value}function mI(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function gI(e){if(e===null)return .5;let n=e/8;return !Number.isFinite(n)||n<=0?.5:n>ya?ya:n}function Vs(e){if(!e)return Ue;let n=qc(e,"val");if(!n)return Ue;if(n==="nil"||n==="none")return Ws;let t=pI.get(n)??"single",r=qc(e,"color"),o=r===void 0||r==="auto"?null:Gi(r)??null;return {state:"edge",style:t,color:o,widthPt:gI(mI(qc(e,"sz")))}}function Sh(e,n){if(!e)return xh;let t={top:Ue,left:Ue,bottom:Ue,right:Ue};for(let r of n){let o=r==="left"?"start":r==="right"?"end":void 0,a=Eo(e,r)??(o?Eo(e,o):void 0);t[r]=Vs(a);}return t}function $s(e){let n=e&&Eo(e,"tblBorders");return n?{...Sh(n,["top","left","bottom","right"]),insideH:Vs(Eo(n,"insideH")),insideV:Vs(Eo(n,"insideV"))}:bh}function Xs(e){return Sh(e&&Eo(e,"tcBorders"),["top","left","bottom","right"])}function Zc(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function gh(e){if(!e)return 0;let n=Number.parseInt(e.slice(0,2),16),t=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return n+t+r}function Rh(e,n,t=true){if(e.state==="omitted")return n.state==="omitted"?Ue:n;if(n.state==="omitted")return e;if(e.state==="none")return n.state==="none"?Ws:n;if(n.state==="none")return e;let r=Zc(e),o=Zc(n);if(r>o)return e;if(o>r)return n;let a=mh[e.style],i=mh[n.style];if(a!==i)return a>i?e:n;let s=gh(e.color),l=gh(n.color);return s<l?e:l<s?n:t?e:n}function _s(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function hI(e,n,t){return t?n==="top"||n==="bottom"?e.insideH:e.insideV:e[n]}function yI(e,n){return e===void 0&&n===void 0?true:!e||!n?false:e.style===n.style&&e.color===n.color&&e.widthPt===n.widthPt}function Hs(e){if(e.length===0)return [];let n=[],t={...e[0]};for(let r=1;r<e.length;r+=1){let o=e[r];t.gridEnd===o.gridStart&&yI(t.edge,o.edge)?t={...t,gridEnd:o.gridEnd}:(n.push(t),t={...o});}return n.push(t),n}function zs(e,n,t){let r=e.filter(a=>a.edge!==void 0);if(r.length!==1)return;let o=r[0];if(!(o.gridStart!==n||o.gridEnd!==t))return o.edge}function hh(e,n,t){let r=0,o=Math.min(t,e.length);for(let a=Math.max(0,n);a<o;a+=1)r+=e[a];return r}function bI(e){if(!(!e||e.style!=="double"))return ro(e.widthPt)}function js(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function xI(e,n){return n?e==="outer"?n.insetPt:n.insetPt+n.strokePt+n.gapPt:0}function SI(e,n,t){return t?e==="outer"?n-t.insetPt:n-t.insetPt-t.strokePt-t.gapPt:n}function RI(e,n){return n?e==="outer"?n.insetPt+n.strokePt:n.insetPt+n.extentPt:0}function wI(e,n,t){return t?e==="outer"?n-t.insetPt-t.strokePt:n-t.insetPt-t.extentPt:n}function tr(e,n){e.length>=yh||!(n.width>0)||!(n.height>0)||e.push(n);}function PI(e,n,t,r,o,a,i,s,l,d,c){let u=ro(t.widthPt),{strokePt:f,gapPt:p,extentPt:m,insetPt:g}=u,h=Math.abs(r)<1e-6,y=Math.abs(o-a)<1e-6,x=Math.abs(r)<1e-6,k=Math.abs(o-i)<1e-6;if(n==="top"||n==="bottom"){let L=n==="top"?g:i-g-f,I=n==="top"?g+f+p:i-g-m;for(let S of ["outer","inner"]){let w=r,T=o;h&&(w=xI(S,s)),y&&(T=SI(S,a,l)),tr(e,{side:n,role:S,color:t.color,cssStyle:"solid",x:w,y:S==="outer"?L:I,width:T-w,height:f});}return}let B=n==="left"?g:a-g-f,v=n==="left"?g+f+p:a-g-m;for(let L of ["outer","inner"]){let I=r,S=o;x&&(I=RI(L,d)),k&&(S=wI(L,i,c)),tr(e,{side:n,role:L,color:t.color,cssStyle:"solid",x:L==="outer"?B:v,y:I,width:f,height:S-I});}}function II(e,n,t,r,o,a,i){let s=t.widthPt,l=Math.max(1,s),d=s*3+l*2;if(n==="top"||n==="bottom"){let u=n==="top"?0:i-d;for(let f=0;f<3;f+=1)tr(e,{side:n,role:f===0?"outer":f===1?"middle":"inner",color:t.color,cssStyle:"solid",x:r,y:u+f*(s+l),width:o-r,height:s});return}let c=n==="left"?0:a-d;for(let u=0;u<3;u+=1)tr(e,{side:n,role:u===0?"outer":u===1?"middle":"inner",color:t.color,cssStyle:"solid",x:c+u*(s+l),y:r,width:s,height:o-r});}function vI(e,n,t,r,o,a,i){let s=t.widthPt;n==="top"?tr(e,{side:n,role:"edge",color:t.color,cssStyle:js(t.style),x:r,y:0,width:o-r,height:s}):n==="bottom"?tr(e,{side:n,role:"edge",color:t.color,cssStyle:js(t.style),x:r,y:i-s,width:o-r,height:s}):n==="left"?tr(e,{side:n,role:"edge",color:t.color,cssStyle:js(t.style),x:0,y:r,width:s,height:o-r}):tr(e,{side:n,role:"edge",color:t.color,cssStyle:js(t.style),x:a-s,y:r,width:s,height:o-r});}function Gs(e,n){if(e.length===0)return;let t=e[0];return bI(t.edge)}function TI(e,n,t,r,o,a,i,s,l,d){let c=(M,b,W)=>{let _=[];for(let F of b){if(!F.edge)continue;let E,O;W?(E=hh(i,s,F.gridStart),O=hh(i,s,F.gridEnd)):(E=l[F.gridStart-d]??0,O=l[F.gridEnd-d]??a),_.push({side:M,gridStart:F.gridStart,gridEnd:F.gridEnd,startPt:E,endPt:O,edge:F.edge});}return _},u=c("top",e,true),f=c("left",n,false),p=c("bottom",t,true),m=c("right",r,false),g=[...u,...m,...p,...f],h=Gs(n),y=Gs(r),x=Gs(e),k=Gs(t),B=(M,b)=>M.length===1&&Math.abs(M[0].startPt)<1e-6&&Math.abs(M[0].endPt-b)<1e-6,v=B(u,o),L=B(f,a),I=B(p,o),S=B(m,a),w=[],T=(M,b,W)=>{for(let _ of b){let{edge:F,startPt:E,endPt:O}=_;F.style==="double"?PI(w,M,F,E,O,o,a,M==="top"||M==="bottom"?h:void 0,M==="top"||M==="bottom"?y:void 0,M==="left"||M==="right"?x:void 0,M==="left"||M==="right"?k:void 0):F.style==="triple"?II(w,M,F,E,O,o,a):W||vI(w,M,F,E,O,o,a);}};T("top",u,v),T("left",f,L),T("bottom",p,I),T("right",m,S);let N={};return v&&u[0]&&(N.top=u[0].edge),L&&f[0]&&(N.left=f[0].edge),I&&p[0]&&(N.bottom=p[0].edge),S&&m[0]&&(N.right=m[0].edge),g.length>0&&(N.edgeSegments=g),w.length>0&&(N.strokes=w),N}function Jc(e,n,t,r,o,a){let i=e.length,s=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let l=ph(e,t,o,a),d=(u,f,p)=>As(u.borders[f],hI(n,f,p),{}),c=(u,f,p,m)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?Ws:Rh(p,m);for(let u=0;u<i;u+=1){let f=e[u];for(let p=0;p<f.length;p+=1){let m=f[p];if(m.vMergeContinue){s[u][p]={};continue}let g=m.mergeRowSpan??1,h=u+g-1,y=u===0,x=h===i-1,k=m.gridColumn===0,B=m.gridColumn+m.gridSpan-1,v=B>=t-1,L=[];if(y)for(let E=m.gridColumn;E<=B;E+=1)L.push({gridStart:E,gridEnd:E+1,edge:_s(d(m,"top",false))});let I=[];if(k)for(let E=u;E<=h;E+=1)I.push({gridStart:E,gridEnd:E+1,edge:_s(d(m,"left",false))});let S=[];for(let E=m.gridColumn;E<=B;E+=1){let O;if(x)O=d(m,"bottom",false);else {let R=Uc(l,h+1,E,o);R?.cell.vMergeContinue?O=Ue:O=c(m.borders.bottom,R?R.cell.borders.top:Ue,d(m,"bottom",true),R?d(R.cell,"top",true):n.insideH);}S.push({gridStart:E,gridEnd:E+1,edge:_s(O)});}let w=[];for(let E=u;E<=h;E+=1){let O;if(v)O=d(m,"right",false);else {let R=Uc(l,E,B+1,o);O=c(m.borders.right,R?R.cell.borders.left:Ue,d(m,"right",true),R?d(R.cell,"left",true):n.insideV);}w.push({gridStart:E,gridEnd:E+1,edge:_s(O)});}let T=Hs(L),N=Hs(I),M=Hs(S),b=Hs(w);if(!r){let E={},O=zs(T,m.gridColumn,B+1),R=zs(N,u,h+1),V=zs(M,m.gridColumn,B+1),A=zs(b,u,h+1);O&&(E.top=O),R&&(E.left=R),V&&(E.bottom=V),A&&(E.right=A);let G=[],U=(H,X)=>{for(let Z of X)Z.edge&&G.push({side:H,gridStart:Z.gridStart,gridEnd:Z.gridEnd,startPt:Z.gridStart,endPt:Z.gridEnd,edge:Z.edge});};U("top",T),U("left",N),U("bottom",M),U("right",b),G.length>0&&(E.edgeSegments=G),s[u][p]=E;continue}let W=r.cellBoxes[u][p],_=[0],F=0;for(let E=u;E<=h;E+=1){let O=r.rowBands[E];F+=O.height,_.push(F);}_.length>1&&(_[_.length-1]=W.height),s[u][p]=TI(T,N,M,b,W.width,W.height,r.columnWidthsPt,m.gridColumn,_,u);}}return s}function rr(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var Qc=bh,eu=xh;var Ph=31680/20,Un=Object.freeze({type:"auto",value:0}),kI=100,CI=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function OI(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function tu(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Ih(e){if(/^\d{1,9}$/.test(e)){let r=Number(e)/20;return Number.isFinite(r)?{kind:"length",pt:r}:null}let n=/^(\d{1,7}(?:\.\d{1,4})?)%$/.exec(e);if(n){let r=Number(n[1]);return Number.isFinite(r)?{kind:"percent",percent:r}:null}let t=/^(\d{1,9}(?:\.\d{1,4})?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(t){let r=Number(t[1])*CI[t[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function Ir(e){if(!e)return Un;let n=tu(e,"type");if(n!==void 0&&n!=="pct"&&n!=="dxa")return n==="nil"?{type:"nil",value:0}:Un;let t=tu(e,"w");if(t===void 0)return Un;let r=Ih(t);if(!r)return Un;let o=/^\d{1,9}$/.test(t);if(r.kind==="percent"||o&&n==="pct"){let a=r.kind==="percent"?r.percent:Number(t)/50;return !Number.isFinite(a)||a<=0?Un:{type:"pct",value:Math.min(a,kI)}}return !Number.isFinite(r.pt)||r.pt<=0?Un:{type:"dxa",value:Math.min(r.pt,Ph)}}function Ga(e,n){if(!e)return;let t=Ir(e);if(t.type==="dxa")return Math.min(t.value,n)}function vh(e){let n=OI(e,"tblGrid");if(!n)return [];let t=[];for(let r of n.children)if(r.kind!=="textValue"&&r.localName==="gridCol"&&(t.push(r),t.length>=1024))break;return t}function BI(e){let n=[];for(let t of e){let r=tu(t,"w"),o=r===void 0?null:Ih(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){n.push(void 0);continue}n.push(o.pt>Ph?void 0:o.pt);}return n}var nu=1,wh=.001;function MI(e,n,t,r){let o=[];for(let i=0;i<t;i+=1)o.push(e[i]);let a=n.filter(i=>i.start<t&&(i.preferred.type==="dxa"||i.preferred.type==="pct"&&r>0)).sort((i,s)=>i.span-s.span);for(let i of a){let s=Math.min(i.start+i.span,t);if(s<=i.start)continue;let l=i.preferred.type==="pct"?r*i.preferred.value/100:i.preferred.value;if(!Number.isFinite(l)||l<=0)continue;if(s-i.start===1){let f=o[i.start];o[i.start]=f===void 0?l:Math.max(f,l);continue}let d=[],c=l;for(let f=i.start;f<s;f+=1){let p=o[f];p===void 0?d.push(f):c-=p;}if(d.length===0||c<=0)continue;let u=c/d.length;for(let f of d)o[f]=u;}return o}function Th(e){let{columnCount:n,tableWidth:t}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:nu,a=t.type==="dxa"?t.value:t.type==="pct"?o*t.value/100:0,i=BI(e.gridCols),s=MI(i,e.claims,n,a),l=0,d=0;for(let y of s)y===void 0?d+=1:l+=y;let c=[];if(d>0){let y=l>0?l/Math.max(n-d,1):o/n,x=Math.max(o-l,0)/d,k=Math.max(Math.min(x,y),nu);for(let B of s)c.push(B??k);}else for(let y of s)c.push(y);let u=c.reduce((y,x)=>y+x,0);if(!Number.isFinite(u)||u<=0)return new Array(n).fill(o/n);let f=n*nu,p=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,m=Math.max(a>0?Math.min(a,p):Math.min(u,p),f),g=t.type==="pct"&&a>0;if(u<=m+wh&&!g||Math.abs(u-m)<=wh)return c;let h=m/u;return c.map(y=>y*h)}function No(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function FI(e,n){return e.attributes.find(t=>t.localName===n)?.value}var Ch=3,kh=108/20,Wa=31680/20,ru={top:0,right:kh,bottom:0,left:kh};function Ys(e){if(!e)return;let n=FI(e,"w");if(n===void 0||!/^\d{1,9}$/.test(n))return;let t=Number(n);if(!Number.isFinite(t)||t<0)return;let r=t/20;return r>Wa?Wa:r}function Ks(e){if(!e)return {};let n=Ys(No(e,"top")),t=Ys(No(e,"left")??No(e,"start")),r=Ys(No(e,"bottom")),o=Ys(No(e,"right")??No(e,"end"));return {...n===void 0?{}:{top:n},...t===void 0?{}:{left:t},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function Us(e,n){return {top:n.top??e.top,right:n.right??e.right,bottom:n.bottom??e.bottom,left:n.left??e.left}}var qs=16,Gh=31680/20,Oh=1023,LI=256,Bh=31680/20;function Mh(e){let n=e&&ye(e,"jc");if(!n)return;let t=je(n,"val");if(t==="center")return "center";if(t==="right"||t==="end")return "right";if(t==="left"||t==="start")return "left"}var Fh=31680/20;function ye(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function je(e,n){return e.attributes.find(t=>t.localName===n)?.value}function EI(e){let n=e&&ye(e,"gridSpan"),t=n&&je(n,"val");if(!t||!/^\d{1,7}$/.test(t))return 1;let r=Number(t);return Number.isInteger(r)&&r>1?Math.min(r,1024):1}function Lh(e,n){let t=e&&ye(e,n),r=t&&je(t,"val");if(!r||!/^\d{1,7}$/.test(r))return 0;let o=Number(r);return Number.isInteger(o)&&o>0?Math.min(o,1024):0}function NI(e){let n=e&&ye(e,"vMerge");return n?je(n,"val")!=="restart":false}function AI(e){let n=e&&ye(e,"vAlign"),t=n&&je(n,"val");return t==="center"?"center":t==="bottom"?"bottom":"top"}function Eh(e){return Yd(e&&ye(e,"shd"))}function Nh(e,n){let t=e&&ye(e,n);if(!t)return false;let r=je(t,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var Va=Object.freeze({rule:"auto"});function DI(e){let n=e&&ye(e,"trHeight");if(!n)return Va;let t=je(n,"hRule"),r=t==="auto"||t==="exact"||t==="atLeast"?t:void 0;if(r==="auto")return Va;let o=je(n,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return Va;let a=Number(o);if(!Number.isFinite(a)||a<=0)return Va;let i=Math.min(a/20,Gh);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:Va}function $a(e,n){let t=e.columnWidthsPt.reduce((o,a)=>o+a,0),r=n-t;return !Number.isFinite(r)||r<=0?0:e.alignment==="center"?r/2:e.alignment==="right"?r:Math.min(e.indentPt,r)}function Ah(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function Dh(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return;let n=Number(e);if(!Number.isFinite(n))return;let t=n/20;return Math.max(-Fh,Math.min(Fh,t))}function _h(e){let n=e&&ye(e,"tblpPr");if(!n)return;let t=je(n,"tblpXSpec"),r=t==="left"||t==="center"||t==="right"||t==="inside"||t==="outside"?t:void 0,o=je(n,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:Ah(je(n,"horzAnchor"))??"text",vertAnchor:Ah(je(n,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:Dh(je(n,"tblpX"))??0,...a?{ySpec:a}:{},yPt:Dh(je(n,"tblpY"))??0}}function Wh(e,n,t){let r=t[e.horzAnchor],o=r.width-n,a;if(e.xSpec==="center"?a=r.left+o/2:e.xSpec==="right"||e.xSpec==="outside"?a=r.left+o:e.xSpec?a=r.left:a=r.left+e.xPt,!Number.isFinite(a))return r.left;let i=t.page.left+t.page.width;return Math.max(t.page.left,Math.min(a,i))}var _I=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function Lt(e,n){let t=je(e,n);if(t!==void 0)return t!=="0"&&t!=="false"&&t!=="off"}function HI(e){let n=e&&ye(e,"tblLook");if(!n)return _I;let t=je(n,"val"),r=t&&/^[0-9A-Fa-f]{1,4}$/.test(t)?Number.parseInt(t,16):0;return {firstRow:Lt(n,"firstRow")??(r&32)!==0,lastRow:Lt(n,"lastRow")??(r&64)!==0,firstColumn:Lt(n,"firstColumn")??(r&128)!==0,lastColumn:Lt(n,"lastColumn")??(r&256)!==0,rowBanding:Lt(n,"noHBand")===void 0?(r&512)===0:!Lt(n,"noHBand"),columnBanding:Lt(n,"noVBand")===void 0?(r&1024)===0:!Lt(n,"noVBand")}}var ou=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],Hh=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function zh(e,n){let t=e&&ye(e,"cnfStyle");if(!t)return;let r=je(t,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<ou.length;o+=1)r[o]==="1"&&n.add(ou[o]);for(let o=0;o<Hh.length;o+=1)Lt(t,Hh[o])===true&&n.add(ou[o]);}var zI=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function jI(e){let n=new Set;zh(e.rowProperties,n),zh(e.cellProperties,n);let{look:t,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:s}=e,l=n.has("firstRow")||t.firstRow&&r===0,d=n.has("lastRow")||t.lastRow&&r===o-1,c=n.has("firstCol")||t.firstColumn&&a===0,u=n.has("lastCol")||t.lastColumn&&a+i>=s;if(!(n.has("band1Vert")||n.has("band2Vert"))&&t.columnBanding&&!c&&!u){let g=a-(t.firstColumn?1:0);n.add(g%2===0?"band1Vert":"band2Vert");}if(!(n.has("band1Horz")||n.has("band2Horz"))&&t.rowBanding&&!l&&!d){let g=r-(t.firstRow?1:0);n.add(g%2===0?"band1Horz":"band2Horz");}c&&n.add("firstCol"),u&&n.add("lastCol"),l&&n.add("firstRow"),d&&n.add("lastRow"),l&&c&&n.add("nwCell"),l&&u&&n.add("neCell"),d&&c&&n.add("swCell"),d&&u&&n.add("seCell");let m=[];for(let g of zI)n.has(g)&&m.push(g);return m}var jh=new WeakMap;function Ao(e,n,t,r,o="all-markup"){let a=jh.get(e);if(a&&a.contentWidthPt===n&&a.depth===t&&a.styleCascade===r&&a.displayMode===o)return a.structure;let i=GI(e,n,t,r,o);return jh.set(e,{contentWidthPt:n,depth:t,styleCascade:r,displayMode:o,structure:i}),i}function GI(e,n,t,r,o){if(t>=qs||e.kind!=="table")return null;let a=ye(e,"tblPr"),i=a&&ye(a,"tblStyle")?je(ye(a,"tblStyle"),"val"):void 0,s=r?Wg(r,i):Os,l=HI(a),d=ru,c=Qc;for(let A of s.tablePropertyNodes)d=Us(d,Ks(ye(A,"tblCellMar"))),c=Yc(c,$s(A));let u=Us(d,Ks(a&&ye(a,"tblCellMar"))),f=Yc(c,a?$s(a):Qc),p=new Map,m=Vg(s),g=A=>{if(!m)return Hc;let G=A.join("|"),U=p.get(G);if(U)return U;let H=$g(s,A);return p.size<LI&&p.set(G,H),H},h=[],y=[],x=1;for(let A of nf$1(e.children)){if(A.kind!=="tableRow")continue;let G=ye(A,"trPr"),U=[],H=[],X=[],Z=Math.min(Lh(G,"gridBefore"),Oh);Z>0&&y.push({start:0,span:Z,preferred:Ir(G&&ye(G,"wBefore"))});let j=Z,K=nf$1(A.children);for(let De of K){if(De.kind!=="tableCell")continue;let ce=ye(De,"tcPr"),xe=Math.min(j,Oh),be=Math.min(EI(ce),1024-xe),Ce=Ir(ce&&ye(ce,"tcW"));U.push(xe),H.push(be),X.push(Ce),y.push({start:xe,span:be,preferred:Ce}),j=xe+be;}let fe=Lh(G,"gridAfter"),Be=Math.min(j+fe,1024);fe>0&&j<1024&&y.push({start:j,span:Math.min(fe,1024-j),preferred:Ir(G&&ye(G,"wAfter"))}),Be>x&&(x=Be),h.push({node:A,cells:K,properties:G,starts:U,spans:H,preferred:X,gridColumns:Be});}let k=vh(e),B=k.length>0?k.length:x,v=h.length,L=[];for(let A=0;A<h.length;A+=1){let G=h[A],U=G.node,H=G.properties,X=0,Z=[];for(let ce of G.cells){if(ce.kind!=="tableCell")continue;let xe=ye(ce,"tcPr"),be=G.starts[X],Ce=G.spans[X],Ie=G.preferred[X]??Un,me=jI({look:l,rowIndex:A,rowCount:v,gridColumn:be,gridSpan:Ce,columnCount:B,rowProperties:H,cellProperties:xe});X+=1;let Me,se=eu;for(let an of me){let Hn=s.conditional.get(an);if(!Hn)continue;let gn=ye(Hn,"tcPr");Me=Eh(gn)??Me,se=Kc(se,Xs(gn));}let _e=Eh(xe)??Me,rn=Us(u,Ks(xe&&ye(xe,"tcMar"))),Se=ja(ce.children,o);Z.push({id:ce.id,gridSpan:Ce,gridColumn:be,...k[be]?.id?{gridColumnId:k[be].id}:{},vMergeContinue:NI(xe),vAlign:AI(xe),margins:rn,borders:Kc(se,xe?Xs(xe):eu),..._e===void 0?{}:{shading:_e},preferredWidth:Ie,styleFormatting:g(me),blocks:Se});}let j=H?ye(H,"ins")??ye(H,"del"):void 0,K=j?j.localName==="ins"?"insert":"delete":void 0,fe=j&&je(j,"id"),Be=j&&je(j,"author"),De=j&&je(j,"date");L.push({id:U.id,...K?{revisionKind:K}:{},...fe!==void 0?{revisionId:fe}:{},...Be!==void 0?{revisionAuthor:Be}:{},...De!==void 0?{revisionDate:De}:{},isHeader:Nh(H,"tblHeader"),cantSplit:Nh(H,"cantSplit"),height:DI(H),cells:Z});}let I=Un,S,w,T,N,M;for(let A of s.tablePropertyNodes){let G=ye(A,"tblW");G&&(I=Ir(G));let U=ye(A,"tblLayout");U&&(S=je(U,"type")==="fixed"),w=Ga(ye(A,"tblInd"),Bh)??w,T=Mh(A)??T,N=Ga(ye(A,"tblCellSpacing"),Wa)??N,M=_h(A)??M;}let b=a&&ye(a,"tblW"),W=b?Ir(b):I,_=a&&ye(a,"tblLayout"),F=_?je(_,"type")==="fixed":S??false,E=Ga(a&&ye(a,"tblInd"),Bh)??w??0,O=Mh(a)??T??"left",R=t===0?_h(a)??M:void 0,V=Ga(a&&ye(a,"tblCellSpacing"),Wa)??N??0;return {columnWidthsPt:Th({gridCols:k,claims:y,columnCount:B,contentWidthPt:n,tableWidth:W,layoutFixed:F}),rows:L,tableWidth:W,layoutFixed:F,indentPt:E,alignment:O,...R?{float:R}:{},cellSpacingPt:V,tableBorders:f,defaultMargins:u}}var iu=512,$h=9,qn=31680/20,WI=8,VI=128;function Xa(e,n){return e.kind!=="textValue"&&e.namespaceUri===ca$1&&e.localName===n}function qe(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function Tn(e,n){for(let t of e.children)if(Xa(t,n))return t}function Et(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function $I(e){let n=e/20;return !Number.isFinite(n)||n<=0?0:n>qn?qn:n}function au(e){let n=e/20;return Number.isFinite(n)?n>qn?qn:n<-qn?-qn:n:0}function XI(e){let n={left:0,right:0,hanging:0,firstLine:0};if(!e)return n;let t=Tn(e,"ind");if(!t)return n;let r=Et(qe(t,"left")??qe(t,"start"),true),o=Et(qe(t,"right")??qe(t,"end"),true),a=Et(qe(t,"hanging")),i=Et(qe(t,"firstLine"),true);return {left:r===null?0:au(r),right:o===null?0:au(o),hanging:a===null?0:$I(a),firstLine:i===null?0:au(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function YI(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function KI(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function UI(e,n){let t=Tn(e,n);if(!t)return false;let r=qe(t,"val");return r!=="0"&&r!=="false"&&r!=="off"}function Vh(e,n){let t=Tn(e,n);if(!t)return;let r=qe(t,"val");if(!(r===void 0||r.length===0||r.length>VI))return r}function qI(e,n){for(let t of e){if(t.localName!==n)continue;let r=t.attributes?.val;return !(r==="0"||r==="false")}return false}function Xh(e){let n=Et(qe(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=Tn(e,"start"),r=1;if(t){let y=Et(qe(t,"val"));y!==null&&y>=0&&(r=Math.min(y,9999));}let o=Tn(e,"numFmt"),a=(o?qe(o,"val"):void 0)??"decimal",i=Tn(e,"lvlText"),s=i?qe(i,"val")??"":"",l=Tn(e,"lvlJc"),d=KI(l?qe(l,"val"):void 0),c=Tn(e,"suff"),u=YI(c?qe(c,"val"):void 0),f=Tn(e,"lvlRestart"),p;if(f){let y=Et(qe(f,"val"));y!==null&&y>=0&&y<=9&&(p=y);}let m=Tn(e,"pPr"),g=Tn(e,"rPr"),h=g?po(g):[];return {ilvl:n,start:r,numFmt:a.length>64?"decimal":a,lvlText:s.length>64?s.slice(0,64):s,lvlJc:d,suff:u,indent:XI(m),...p!==void 0?{lvlRestart:p}:{},isLgl:UI(e,"isLgl"),runProperties:h,vanish:qI(h,"vanish")}}function ZI(e){let n=qe(e,"abstractNumId");if(n===void 0||n.length===0||n.length>64)return null;let t=new Map;for(let a of e.children){if(!Xa(a,"lvl"))continue;if(t.size>=9)break;let i=Xh(a);i&&!t.has(i.ilvl)&&t.set(i.ilvl,i);}let r=Vh(e,"numStyleLink"),o=Vh(e,"styleLink");return {abstractNumId:n,levels:t,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function JI(e){let n=Et(qe(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=Tn(e,"startOverride"),r;if(t){let i=Et(qe(t,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=Tn(e,"lvl"),a=o?Xh(o)??void 0:void 0;return r===void 0&&a===void 0?{ilvl:n,override:{}}:{ilvl:n,override:{...r!==void 0?{startOverride:r}:{},...a?{level:a}:{}}}}function QI(e){let n=qe(e,"numId");if(n===void 0||n.length===0||n.length>64)return null;let t=Tn(e,"abstractNumId"),r=t?qe(t,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!Xa(a,"lvlOverride"))continue;if(o.size>=$h)break;let i=JI(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:n,abstractNumId:r,overrides:o}}function ev(e){let n=new Map,t=new Map;if(!e)return {abstractNums:n,nums:t};let r=0,o=0;for(let a of e.children){if(Xa(a,"abstractNum")){if(r>=iu)continue;r+=1;let i=ZI(a);i&&!n.has(i.abstractNumId)&&n.set(i.abstractNumId,i);continue}if(Xa(a,"num")){if(o>=iu)continue;o+=1;let i=QI(a);i&&!t.has(i.numId)&&t.set(i.numId,i);}}return {abstractNums:n,nums:t}}function nv(e,n,t){let r=new Set([n.abstractNumId]),o=n;for(let a=0;a<WI;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let s=t(i);if(s===void 0)return null;let l=e.nums.get(s);if(!l)return null;let d=e.abstractNums.get(l.abstractNumId);if(!d||r.has(d.abstractNumId))return null;r.add(d.abstractNumId),o=d;}return null}function Yh(e,n){let t=false,r=new Map(e.abstractNums);for(let[o,a]of e.abstractNums){if(a.numStyleLink===void 0)continue;let i=nv(e,a,n);!i||i.levels===a.levels||i.levels.size===0||(r.set(o,{...a,levels:i.levels}),t=true);}return t?{abstractNums:r,nums:e.nums}:e}function Do(e,n,t){if(t<0||t>8)return null;let r=e.nums.get(n);if(!r)return null;let o=e.abstractNums.get(r.abstractNumId);if(!o)return null;let a=r.overrides.get(t),i=a?.level??o.levels.get(t);return i?{abstractNumId:r.abstractNumId,level:i,...a?.startOverride!==void 0?{startOverride:a.startOverride}:{}}:null}var su=Object.freeze({abstractNums:new Map,nums:new Map});function tv(e,n){let t=e.nums.get(n),r=[];for(let o=0;o<=8;o+=1){let a=Do(e,n,o);if(!a){r.push(1);continue}let i=t?.overrides.get(o)?.startOverride;r.push(i??a.level.start);}return r}function rv(e,n,t){let r=[];for(let o=0;o<=8;o+=1){let a=Do(e,n,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...t]}}function ov(e,n){if(n===0)return null;if(n===void 0)return e-1;let t=n-1;return t>=e?null:t}function lu(e){let n=new Map,t=new Map,r=new Map,o=a=>{let i=n.get(a);i||(i=[0,0,0,0,0,0,0,0,0],n.set(a,i));let s=t.get(a);s||(s=[false,false,false,false,false,false,false,false,false],t.set(a,s));let l=r.get(a);return l||(l=tv(e,a),r.set(a,l)),{counters:i,initialized:s,starts:l}};return {advance(a,i){if(i<0||i>8||a.length===0||a.length>64)return null;let s=Do(e,a,i);if(!s)return null;let{abstractNumId:l,level:d}=s,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=rv(e,a,f);for(let B=i+1;B<=8;B+=1){let v=Do(e,a,B);if(!v)continue;let L=ov(B,v.level.lvlRestart);L!==null&&i<=L&&(u[B]=false);}let m=f[i]??d.start;u[i]?c[i]+=1:(c[i]=m,u[i]=true);let g=c.slice(),h=u.slice(),y=g.map((B,v)=>h[v]?B:f[v]??1),x=d.isLgl?p.map(B=>B==="bullet"||B==="none"?B:"decimal"):p,k=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:lc(d.lvlText,y,x);return {abstractNumId:l,numId:a,ilvl:i,level:d,counters:g,markerText:k}}}}var uu=new WeakMap;function jF(e,n){let t=n.dependencyKeys.size===0||[...n.dependencyKeys].every(r=>r===g.story);uu.set(e,{preservesNumberedSequence:n.impact==="text-local"&&!n.structural&&n.created.size===0&&n.deleted.size===0&&t});}function iv(e){let n=uu.get(e);return uu.delete(e),n}function sv(e){return [e.fontFamily??"",e.fontSizePt,e.bold?1:0,e.italic?1:0,e.characterSpacingPt,e.horizontalScalePercent,e.verticalAlign,e.hidden?1:0,e.kerningMinPt,e.caps?1:0,e.smallCaps?1:0].join(",")}function fu(e){return e.kind!=="textValue"}function Kh(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function Zs(e,n){for(let t of e.children)if(fu(t)&&t.localName===n)return t}function pu(e){let n=null;for(let t of e){if(!fu(t))continue;let r=Zs(t,"numPr");if(!r)continue;let o=Zs(r,"ilvl"),a=Zs(r,"numId"),i=a?Kh(a,"val"):void 0,s=o?Kh(o,"val"):"0";if(!i||i==="0"){n=null;continue}if(i.length>64){n=null;continue}let l=/^\d{1,2}$/.test(s??"")?Number(s):0;if(l<0||l>8){n=null;continue}n={numId:i,ilvl:l};}return n}function lv(e,n){let t=new Set,r=e.styles.get(n);for(let o=0;r!==void 0&&o<Bs;o+=1){if(t.has(r.styleId))return;t.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?pu([a]):null;if(i)return i.numId;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}var du=new WeakMap;function Ya(e,n){if(!n)return e;let t=du.get(e);if(t&&t.styleCascade===n)return t.linked;let r=Yh(e,a=>lv(n,a)),o={styleCascade:n,linked:r};return du.set(e,o),du.set(r,o),r}function Uh(e){return Number.isFinite(e)?e>qn?qn:e<-qn?-qn:e:0}function qh(e){let n=null;for(let t of e){if(t.localName!=="ind")continue;let r=t.attributes?.hanging,o=t.attributes?.firstLine;r===void 0&&o===void 0||(n={hanging:r!==void 0&&/^\d{1,9}$/.test(r)?Uh(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?Uh(Number(o)/20):0});}return n}function Zh(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.start!==void 0))}function Jh(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.end!==void 0))}function ty(e,n,t=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=_a(n),a=_a(t),i={hanging:e.hanging,firstLine:e.firstLine},s=Zh(t)?a.left:r.left?e.left:Zh(n)?o.left:e.left,l=Jh(t)?a.right:r.right?e.right:Jh(n)?o.right:e.right,d=qh(t)??(r.firstLineOffset?i:qh(n)??i);return {left:s,right:l,...d}}function mu(e,n=8){let t=[],r=(o,a)=>{for(let i of o){if(i.kind==="paragraph"){t.push(i);continue}if(!(i.kind!=="table"||a>=n)){for(let s of nf$1(i.children))if(s.kind==="tableRow")for(let l of nf$1(s.children)){if(l.kind!=="tableCell")continue;let d=oc$1(l.children);r(d,a+1);}}}};return r(e,0),t}var Qh=new WeakMap;function ry(e,n){let t=Qh.get(e);if(t&&t.styleCascade===n)return t;let r=e.children.find(l=>l.kind==="paragraphProperties"),o=n?Lo(n,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&fu(r)?Zs(r,"rPr"):void 0,s={styleCascade:n,numPr:pu(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:vn(r),inheritedMarkProps:o?o.markRunProperties:vn(i),perLevel:new WeakMap};return Qh.set(e,s),s}function Js(e,n,t,r){let o=new Map;if(n.nums.size===0)return o;let a=Ya(n,t),i=lu(a);for(let s of mu(e)){let l=ry(s,t),d=l.numPr;if(!d)continue;let c=i.advance(d.numId,d.ilvl);if(!c)continue;let u=l.perLevel.get(c.level);if(!u){let h=ty(c.level.indent,l.inheritedParagraphProperties,l.directProps),y=Mt(l.inheritedMarkProps,c.level.runProperties,t);u={indent:h,markerStyle:Ne(y,t?.themeFonts)},l.perLevel.set(c.level,u);}let{indent:f,markerStyle:p}=u,m=mo(c.markerText,p.fontFamily,r),g=[c.numId,c.ilvl,c.level.numFmt,c.level.lvlText,f.left,f.right,f.hanging,f.firstLine,c.level.lvlJc,c.level.suff,c.level.vanish?1:0,m,sv(p)].join("|");o.set(s.id,{numId:c.numId,ilvl:c.ilvl,abstractNumId:c.abstractNumId,numFmt:c.level.numFmt,markerText:m,markerAlign:c.level.lvlJc,suffix:c.level.suff,indent:f,markerStyle:p,cacheToken:g});}return o}var oy=new WeakMap,ay=new WeakMap;function ey(e,n,t){let r=t?ay.get(t):oy.get(n);if(r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable)return r}function dv(e,n,t){n?ay.set(n,t):oy.set(e,t);}function iy(e,n,t){if(e.listItems===void 0){let i=ey(e,n,t);if(i&&t===void 0)return {...e,numberingIndex:i.linkedIndex,...i.listItems?{listItems:i.listItems}:{}}}let r=e.listItems===void 0?ey(e,n,t):void 0,o=r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable?r.linkedIndex:Ya(e.numberingIndex??su,e.styleCascade),a=e.listItems??(o.nums.size>0?pv(n,e.numberingIndex,o,e.styleCascade,e.isFontAvailable,t):void 0);return e.listItems===void 0&&dv(n,t,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:o,listItems:a}),{...e,numberingIndex:o,...a?{listItems:a}:{}}}function vr(e,n){return iy(e,n,void 0)}function sy(e,n,t){return iy(e,n,t)}var ny=new WeakMap,cv=Object.freeze([]);function uv(e,n){let t=ny.get(e);if(t&&t.styleCascade===n)return t.numbered;let r=mu([e]).filter(a=>ry(a,n).numPr!==null),o=r.length>0?r:cv;return ny.set(e,{styleCascade:n,numbered:o}),o}var _o=new WeakMap,cu=new WeakMap;function fv(e,n){return e.length===n.length&&e.every((t,r)=>{let o=n[r];if(!o||t.id!==o.id)return false;let a=t.children.find(s=>s.kind==="paragraphProperties"),i=o.children.find(s=>s.kind==="paragraphProperties");return a===i})}function pv(e,n,t,r,o,a){let i=e[0],s=e[e.length-1],l=a?cu.get(a):(i?_o.get(i):void 0)??(s?_o.get(s):void 0);if((a?iv(a):void 0)?.preservesNumberedSequence&&l&&l.rawIndex===n&&l.styleCascade===r&&l.isFontAvailable===o)return l.listItems;let c=new Array(e.length),u=l!==void 0&&l.rawIndex===n&&l.styleCascade===r&&l.isFontAvailable===o&&l.blocks.length===e.length;for(let m=0;m<e.length;m+=1){let g=e[m],h=l&&l.blocks[m]===g?l.numberedByBlock[m]:uv(g,r);c[m]=h,u&&!fv(h,l.numberedByBlock[m])&&(u=false);}if(l&&u){let m={...l,blocks:e,numberedByBlock:c};return a?cu.set(a,m):(i&&_o.set(i,m),s&&s!==i&&_o.set(s,m)),l.listItems}let f=Js(e,t,r,o),p={rawIndex:n,styleCascade:r,isFontAvailable:o,blocks:e,numberedByBlock:c,listItems:f};return a?cu.set(a,p):(i&&_o.set(i,p),s&&s!==i&&_o.set(s,p)),f}function Qs(e,n,t,r){if((!e.markerText||e.indent.hanging<=0&&n<=0)&&!e.markerText||!e.markerText)return null;let o=e.indent.left,a=e.indent.hanging,i=Math.min(0,o),s=Math.max(i,o-a),l=Math.max(a,n),d=s;return e.markerAlign==="right"?d=o-n:e.markerAlign==="center"&&(d=s+(l-n)/2),d<i&&(d=i),{x:d,y:t,width:Math.max(n,0),height:r}}function mv(e,n,t=so,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=n.measure(e.markerText,e.markerStyle),a=Qs(e,o,0,0);if(!a)return 0;let i=e.indent.left,s=a.x+a.width;return e.suffix==="nothing"?s-i:e.suffix==="space"?s+n.measure(" ",e.markerStyle)-i:s<=i?0:lo(t,s,r).positionPt-i}function el(e,n,t,r,o){return e?mv(e,t,r,o===void 0?void 0:n.left+o):n.hanging>0?-n.hanging:n.firstLine}function nl(e,n,t,r=0){if(!e||!e.markerText||!t)return;let o=n.measure(e.markerText,e.markerStyle),a=Qs(e,o,t.y,t.height);if(a)return {text:e.markerText,style:e.markerStyle,box:{x:a.x+r,y:a.y,width:a.width,height:a.height},level:e.ilvl,numId:e.numId,numFmt:e.numFmt}}var ly=new WeakMap,dy=new WeakMap,cy=new WeakMap,uy=new WeakMap;function fy(e){let n=uy.get(e);if(n)return n;let t=new Set,r=[];for(let o of Ve(e)){for(let a of o.lines)for(let i of tn(a))t.has(i.paragraphId)||(t.add(i.paragraphId),r.push(i.paragraphId));o.lines.length===0&&!t.has(o.paragraphId)&&(t.add(o.paragraphId),r.push(o.paragraphId));}return uy.set(e,r),r}function Tr(e){let n=ly.get(e);if(n)return n;let t=new Set,r=[];for(let o of e.pages)for(let a of fy(o))t.has(a)||(t.add(a),r.push(a));return ly.set(e,r),r}function kr(e){let n=dy.get(e);if(n)return n;let t=new Map;for(let[r,o]of Tr(e).entries())t.set(o,r);return dy.set(e,t),t}function py(e){let n=cy.get(e);if(n)return n;let t=new Set,r=[],o=a=>{for(let i of xn(a)){for(let s of i.lines)for(let l of tn(s))t.has(l.paragraphId)||(t.add(l.paragraphId),r.push(l.paragraphId));i.lines.length===0&&!t.has(i.paragraphId)&&(t.add(i.paragraphId),r.push(i.paragraphId));}};for(let a of e.pages){for(let i of fy(a))t.has(i)||(t.add(i),r.push(i));for(let i of [a.header,a.footer])i&&o(i.fragments);for(let i of [a.footnotes,a.endnotes])if(i){i.separator&&o(i.separator.fragments);for(let s of i.notes)o(s.fragments);}}return cy.set(e,r),r}var my=new WeakMap;function gu(e){let n=my.get(e);if(n)return n;let t=[...Ve(e)];for(let r of [e.header,e.footer])r&&t.push(...xn(r.fragments));for(let r of [e.footnotes,e.endnotes])if(r)for(let o of r.notes)t.push(...xn(o.fragments));return my.set(e,t),t}var gy=new WeakMap;function tn(e){let n=gy.get(e);if(n)return n;let t={paragraphId:e.range.paragraphId,start:e.range.start,end:e.range.end,spans:e.spans,drawings:e.drawings??[]},o=e.spans.some(a=>a.range.paragraphId!==e.range.paragraphId)?gv(e):[t];return gy.set(e,o),o}function gv(e){let n=[];for(let t of e.spans){let r=n[n.length-1];if(r&&r.paragraphId===t.range.paragraphId){n[n.length-1]={...r,start:Math.min(r.start,t.range.start),end:Math.max(r.end,t.range.end),spans:[...r.spans,t]};continue}n.push({paragraphId:t.range.paragraphId,start:t.range.start,end:t.range.end,spans:[t],drawings:[]});}return n.map(t=>({...t,drawings:(e.drawings??[]).filter(r=>r.paragraphId===t.paragraphId)}))}function gt(e,n){return tn(e).find(t=>t.paragraphId===n)??null}function Cr(e,n,t,r){let o=kr(e),a=o.get(n.paragraphId)??-1,i=o.get(t.paragraphId)??-1,s=o.get(r.paragraphId)??-1;if(a<i||a>s)return null;let l=a===i?Math.max(n.start,t.offset):n.start,d=a===s?Math.min(n.end,r.offset):n.end;return d>l?{start:l,end:d}:null}function QF(e,n){for(let t of e.pages)for(let r of Ve(t)){let o=or(r).indexOf(n);if(o>0)return or(r).slice(0,o).reverse()}return []}var hy=new WeakMap;function or(e){let n=hy.get(e);if(n)return n;let t=[];for(let r of e.lines??[])for(let o of tn(r))t.includes(o.paragraphId)||t.push(o.paragraphId);return t.includes(e.paragraphId)||t.push(e.paragraphId),hy.set(e,t),t}function hv(e,n){let t=or(e);if(t.length===1)return t[0]===n?{start:e.range.start,end:e.range.end}:null;let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let a of e.lines??[]){let i=gt(a,n);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function hu(e,n,t){let r=hv(e,n);return r!==null&&t>=r.start&&t<r.end}function eL(e,n){for(let t of e.pages)for(let r of gu(t))if(r.paragraphId===n)return r;for(let t of e.pages)for(let r of gu(t))if(or(r).includes(n))return r;return null}var Ru=8,yy=new WeakMap;function rl(e){let n=yy.get(e);if(n)return n;let t=[],r=new Map,o=new Map,a=new Map,i=new Map,s=new Map,l=(c,u)=>{for(let f of c){if(f.kind==="paragraph"){if(!u)for(let p of f.lines)o.set(p.range.paragraphId,p.id);continue}for(let p of f.rows){if(!p.isHeaderRepeat&&!r.has(p.id)){let m=a.get(f.tableId)??0;r.set(p.id,m),a.set(f.tableId,m+1);}for(let m of p.cells){if(!p.isHeaderRepeat&&!u){let g=`${f.tableId}|${m.gridColumn}`;if(m.blocks.length===0){let h=s.get(g);h&&i.set(m,h);}else s.set(g,{row:p,cell:m});}l(m.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)t.push(c.box.y),l(c.fragments,false);let d={pageTops:t,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return yy.set(e,d),d}function qa(e,n){let t=rl(e).pageTops;if(t.length===0)return -1;let r=0,o=t.length-1,a=0;for(;r<=o;){let i=r+o>>1;t[i]<=n?(a=i,r=i+1):o=i-1;}return a}function yv(e,n){let t=e.pages[qa(e,n.y)];if(!t)return false;for(let r of [t.header,t.footer])if(r&&al(r.box,n))return true;return false}function xu(e,n,t,r=false){if(!e||e.length===0)return null;let o=[...e].sort((a,i)=>a.behindDocument!==i.behindDocument?a.behindDocument?-1:1:i.relativeHeight-a.relativeHeight);for(let a of o){if(r&&a.behindDocument||!Ka(a,n))continue;let i={paragraphId:a.anchorParagraphId,offset:a.start};return {position:i,caret:{position:i,x:a.x,y:a.y,height:a.height,lineId:"",pageIndex:t},pageIndex:t,lineId:"",cell:null,contentControlId:null,onGlyphs:true,drawing:Object.freeze({drawingNodeId:a.drawingNodeId,paragraphId:a.anchorParagraphId,start:a.start})}}return null}function ol(e,n,t,r={}){let o=e.pages[n];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??Ru,measurer:r.measurer},i=by(e,o.index,t),s=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),l=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=xu(s,t,a.pageIndex);if(d)return {...d,contentControlId:i};let c=tl(o.fragments,t,a,null);if(c?.onGlyphs)return {...c,contentControlId:i};let u=xu(l,t,a.pageIndex);if(u)return {...u,contentControlId:i};if(c)return {...c,contentControlId:i};for(let f=1;f<e.pages.length;f+=1)for(let p of [n-f,n+f]){let m=e.pages[p];if(!m)continue;let g=tl(m.fragments,t,{...a,pageIndex:m.index},null);if(g)return {...g,contentControlId:by(e,m.index,t)}}return null}function sL(e,n,t,r,o={}){let a=e.pages[n];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??Ru,measurer:o.measurer};return tl(t,r,i,null)}function bv(e,n,t={}){let r=e.pages[qa(e,n.y)];if(!r)return null;for(let o of [r.header,r.footer]){if(!o?.anchoredDrawings||o.anchoredDrawings.length===0)continue;let a=Object.freeze({x:n.x-o.box.x,y:n.y-o.box.y}),i=xu(o.anchoredDrawings,a,r.index);if(i)return i}return ol(e,r.index,{x:n.x-r.contentBox.x,y:n.y-r.contentBox.y},t)}function al(e,n){return n.x>=e.x&&n.x<e.x+e.width&&n.y>=e.y&&n.y<e.y+e.height}function il(e,n,t){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===n&&al(i.box,t)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function by(e,n,t){return il(e,n,t)?.id??null}function Su(e,n,t){let r=Math.max(e.x-n.x,0,n.x-(e.x+e.width)),o=Math.max(e.y-n.y,0,n.y-(e.y+e.height));return r+o*t}function xv(e,n,t){return e.kind!=="table"||Math.max(e.box.y-n.y,0,n.y-(e.box.y+e.box.height))>0?Su(e.box,n,t):0}function tl(e,n,t,r){if(e.length===0)return null;let o=null;for(let i of e){if(!al(i.box,n))continue;o=i;let s=xy(i,n,t,r);if(s)return s;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:xv(i,n,t.verticalWeight)})).sort((i,s)=>i.score-s.score);for(let{block:i}of a){let s=xy(i,n,t,r);if(s)return s}return null}function xy(e,n,t,r){return e.kind==="paragraph"?Sv(e,n,t,r,al(e.box,n)):Cv(e,n,t)}function Sv(e,n,t,r,o){let a=Rv(e.lines,n.y);if(!a)return null;let i=vv(a,n.x,n.y,t),s=Pv(a,n.x),l=Math.min(Math.max(i.offset,s.start),s.end),d={paragraphId:s.paragraphId,offset:l},c=Za(a,l,t.measurer,s);return {position:d,caret:{position:d,x:i.x,y:c.y,height:c.height,lineId:a.id,pageIndex:t.pageIndex},pageIndex:t.pageIndex,lineId:a.id,cell:r,onGlyphs:o&&i.withinSpan&&n.y>=a.box.y&&n.y<a.box.y+a.box.height,contentControlId:null,drawing:i.drawing&&i.withinSpan?wv(i.drawing):null}}function Rv(e,n){if(e.length===0)return null;for(let o of e)if(n>=o.box.y&&n<o.box.y+o.box.height)return o;let t=e[0],r=Number.POSITIVE_INFINITY;for(let o of e){let a=n<o.box.y?o.box.y-n:n-(o.box.y+o.box.height);a<r&&(r=a,t=o);}return t}function wv(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function Pv(e,n){let t=tn(e),r=t[0];for(let o of t){let a=o.spans[0];if(a===void 0)continue;let i=o.spans[o.spans.length-1];if(n>=a.box.x&&(r=o),n<i.box.x+i.box.width)break}return r}function Iv(e,n,t){for(let r of t??e.drawings??[])if(r.start===n||r.start+1===n)return r;return null}function Ka(e,n){let t=e.hitBounds;return n.x<t.x||n.x>=t.x+t.width||n.y<t.y||n.y>=t.y+t.height?false:wc(n.x,n.y,e.geometry)}function vv(e,n,t,r){let o=e.spans;for(let l of e.drawings??[])if(Ka(l,{x:n,y:t}))return {offset:l.start,x:l.hitBounds.x,withinSpan:true,drawing:l};if(o.length===0&&(e.drawings?.length??0)>0){let l=e.drawings[0];if(n<=l.advanceStart)return {offset:e.range.start,x:l.advanceStart,withinSpan:false,drawing:l};let d=e.drawings[e.drawings.length-1];if(n>=d.advanceEnd)return yu(e,d.advanceEnd,r);for(let c of e.drawings??[])if(n>=c.advanceStart&&n<c.advanceEnd){let u=n>=c.x+c.width/2;return {offset:u?c.start+1:c.start,x:u?c.advanceEnd:c.advanceStart,withinSpan:Ka(c,{x:n,y:t}),drawing:c}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=o[0];if(n<=a.box.x)return {offset:e.range.start,x:a.box.x,withinSpan:false};let i=o[o.length-1],s=i.box.x+i.box.width;if(n>=s)return yu(e,s,r);for(let l of o)if(n>=l.box.x&&n<l.box.x+l.box.width)return Tv(l,n,r);for(let l=0;l<o.length;l+=1){let d=o[l];for(let c of e.drawings??[]){if(n>=c.advanceStart&&n<c.advanceEnd){let u=Ka(c,{x:n,y:t}),f=n>=c.x+c.width/2;return {offset:f?c.start+1:c.start,x:f?c.advanceEnd:c.advanceStart,withinSpan:u,drawing:c}}if(!(c.start<=d.range.start&&c.hitBounds.x+c.hitBounds.width<=d.box.x)){if(Ka(c,{x:n,y:t}))return {offset:c.start,x:c.hitBounds.x,withinSpan:true,drawing:c};if(n<d.box.x&&n>=c.hitBounds.x+c.hitBounds.width)return {offset:c.start+1,x:c.hitBounds.x+c.hitBounds.width,withinSpan:false,drawing:c};if(n<c.hitBounds.x&&n>=(o[l-1]?.box.x??e.contentX))return {offset:c.start,x:c.hitBounds.x,withinSpan:false,drawing:c}}}if(n<d.box.x){let c=o[l-1],u=c.box.x+c.box.width;return n-u<=d.box.x-n?{offset:c.range.end,x:u,withinSpan:false}:{offset:d.range.start,x:d.box.x,withinSpan:false}}}return yu(e,s,r)}function yu(e,n,t){let r=vy(t.layout,e);if(r===e.range.end)return {offset:r,x:n,withinSpan:false};for(let o=e.spans.length-1;o>=0;o-=1){let a=e.spans[o];if(r<a.range.start)continue;let i=r-a.range.start,s=t.measurer?Ua(a,i,t.measurer):a.box.width*(a.range.end>a.range.start?i/(a.range.end-a.range.start):0);return {offset:r,x:a.box.x+s,withinSpan:false}}return {offset:r,x:n,withinSpan:false}}function vy(e,n){let t=n.range.end;if(t>n.range.start&&bu(n,t-1)===zc$1)return t-1;if(rl(e).lastLineIdOfParagraph.get(n.range.paragraphId)===n.id)return t;let r=t;for(r>n.range.start&&bu(n,r-1)===`
15
+ `&&(r-=1);r>n.range.start&&bu(n,r-1)===" ";)r-=1;return r}function bu(e,n){for(let t of e.spans)if(!(n<t.range.start||n>=t.range.end))return t.text.length!==t.range.end-t.range.start?null:t.text[n-t.range.start]??null;return null}var Sy=new WeakMap,Ry=new WeakMap;function wy(e){let n=Bd(),t=Sy.get(e);if(t&&t.epoch===n)return t.boundaries;let r=[0];for(let o of $n(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),Sy.set(e,{epoch:n,boundaries:r}),r}function Ua(e,n,t){let r=e.caretEdges;if(r&&n>=0&&n<r.length)return r[n];let o=Ry.get(t);o||(o=new WeakMap,Ry.set(t,o));let a=o.get(e);a||(a=new Map,o.set(e,a));let i=a.get(n);if(i!==void 0)return i;let s=n<=0?0:Nn(e.text.slice(0,n),e.style,t);return a.set(n,s),s}function wu(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function sl(e,n,t){let r=e.range.end-e.range.start;if(r<=0)return e.box.x;let o=Math.max(0,Math.min(n-e.range.start,r)),a=e.caretEdges;return a&&o<a.length?e.box.x+a[o]:!t||wu(e)?e.box.x+e.box.width*(o/r):e.box.x+Ua(e,o,t)}function Za(e,n,t,r){let o=Iv(e,n,r?.drawings);if(o)return {x:n>o.start?o.advanceEnd:o.advanceStart,y:o.y,height:o.height};let a=r?r.spans:e.spans;if(a.length===0){let d=e.leading??0,c=Math.max(0,e.box.height-d-(e.trailingSpacing??0));if(c<=0&&e.box.height<=0){let u=Math.max(0,e.baseline);return {x:e.contentX,y:e.box.y-u,height:u}}return {x:e.contentX,y:e.box.y+d,height:c}}let i=a[0];for(let d=0;d<a.length;d+=1){let c=a[d];if(n>c.range.start&&n<c.range.end){i=c;break}if(n===c.range.end){let u=a[d+1];if(u&&u.range.start===n&&wu(c)){i=u;break}if(u&&u.range.start===n&&c.text.endsWith(" ")&&u.box.x-(c.box.x+c.box.width)>.25){i=u;break}i=c;}else n>c.range.end&&(i=c);}let s=sl(i,n,t),l=t?.lineMetrics(i.style);return !l||l.height<=0?{x:s,y:e.box.y,height:e.box.height}:{x:s,y:e.box.y+e.baseline-l.baseline-mc(i.style),height:l.height}}function Tv(e,n,t){let r=n-e.box.x,o=e.range.end-e.range.start;if(o<=0||wu(e)){let p=r>e.box.width/2;return {offset:p?e.range.end:e.range.start,x:p?e.box.x+e.box.width:e.box.x,withinSpan:true}}if(!t.measurer){let p=Math.max(0,Math.min(1,r/Math.max(e.box.width,Number.EPSILON))),m=Math.round(p*o),g=wy(e),h=g[0],y=Number.POSITIVE_INFINITY;for(let x of g){let k=Math.abs(x-m);k<y&&(y=k,h=x);}return {offset:e.range.start+h,x:e.box.x+e.box.width*(h/o),withinSpan:true}}let a=wy(e),i=1,s=a.length-1;for(;i<s;){let p=i+s>>1;Ua(e,a[p],t.measurer)<r?i=p+1:s=p;}let l=a[i],d=a[i-1],c=Ua(e,l,t.measurer),u=Ua(e,d,t.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:l),x:e.box.x+(f?u:c),withinSpan:true}}function Py(e,n,t,r){if(e.length===0)return null;for(let i of e){let s=t(i);if(n>=s&&n<s+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let s=t(i),l=n<s?s-n:n-(s+r(i));l<a&&(a=l,o=i);}return o}function kv(e,n,t,r){return {tableId:n.tableId,rowId:t.id,cellId:r.id,rowIndex:rl(e).rowIndexById.get(t.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function Cv(e,n,t,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],s=Py(a,n.y,d=>d.box.y,d=>d.box.height);if(s){let d=Py(s.cells,n.x,c=>c.box.x,c=>c.box.width);d&&i.push(Ov(t,s,d));}let l=[];for(let d of a)for(let c of d.cells)c.blocks.length!==0&&(i.some(u=>u.cell===c)||l.push({entry:{row:d,cell:c},score:Su(c.box,n,t.verticalWeight)}));l.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...l.map(u=>u.entry)]){let u=kv(t.layout,e,d,c),f=tl(c.blocks,n,t,u);if(f)return f}return null}function Ov(e,n,t){return t.blocks.length>0?{row:n,cell:t}:rl(e.layout).mergeOriginOf.get(t)??{row:n,cell:t}}function Ty(e,n){let t=n.paintBounds;return t.width<=0||t.height<=0?null:Object.freeze({pageIndex:e,x:t.x,y:t.y,width:t.width,height:t.height,record:n})}function Bv(e,n,t){for(let r of n.lines)for(let o of r.drawings??[])if(o.drawingNodeId===t)return Ty(e,o);return null}function ky(e,n,t){if(n.kind==="paragraph")return Bv(e,n,t);for(let r of n.rows)for(let o of r.cells)for(let a of o.blocks){let i=ky(e,a,t);if(i)return i}return null}function Iy(e,n,t){for(let r of n){let o=ky(e,r,t);if(o)return o}return null}function Mv(e,n){for(let t of e.pages){for(let o of t.anchoredDrawings??[])if(o.drawingNodeId===n)return Ty(t.index,o);let r=Iy(t.index,t.fragments,n);if(r)return r;for(let o of [t.header,t.footer]){if(!o)continue;for(let i of o.anchoredDrawings??[]){if(i.drawingNodeId!==n)continue;let s=i.paintBounds;return s.width<=0||s.height<=0?null:Object.freeze({pageIndex:t.index,x:o.box.x+s.x-t.contentBox.x,y:o.box.y+s.y-t.contentBox.y,width:s.width,height:s.height,record:i})}let a=Iy(t.index,o.fragments,n);if(a){let i=a.record.paintBounds;return Object.freeze({pageIndex:t.index,x:t.header?.box.x===o.box.x||t.footer?.box.x===o.box.x?o.box.x+i.x-t.contentBox.x:a.x,y:o.box.y+i.y-t.contentBox.y,width:a.width,height:a.height,record:a.record})}}}return null}function Fv(e){let n=[0],t=0;for(let r of e)t+=r,n.push(t);return n}function Lv(e,n){let t=n.get(e.id);return t===void 0&&(e.isHeaderRepeat?t=0:(t=n.size,n.set(e.id,t))),{...e,rowIndex:t}}function ll(e,n,t,r){return {...e,nestingDepth:t,columnEdges:e.columnEdges??Fv(n),rows:e.rows.map(o=>Lv(o,r))}}var Cy=new WeakMap,Ho=4,Pu=6,Oy=14,Ev={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function Iu(e,n,t,r,o){for(let a of e){if(a.kind!=="table")continue;let i=a.nestingDepth??r;for(let s of a.rows){o({pageIndex:n,table:a,row:s,rowOrdinal:s.rowIndex,nestingDepth:i,editable:!s.isHeaderRepeat,pageContentBox:t});for(let l of s.cells)Iu(l.blocks,n,t,i+1,o);}}}function cL(e){let n=Cy.get(e);if(n)return n;let t=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o],i=s=>{t.push(s);};Iu(a.fragments,o,a.contentBox,0,i);for(let s of [a.header,a.footer])s&&Iu(s.fragments,o,s.box,0,i);}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(t)});return Cy.set(e,r),r}function uL(e){let n=e.sourceRevision;switch(e.kind){case "rowDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function fL(e){switch(e.kind){case "rowDivider":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function pL(e,n){if(n.kind==="insertRow"){for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat)return t.editable?{kind:"insertRow",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}:null;return null}for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat&&t.editable)for(let r=0;r<t.table.columnEdges.length-1;r+=1){let o=Ja(t.row,r);if(o===n.gridColumnId)return {kind:"insertColumn",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,gridColumnId:o,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}}return null}function Ja(e,n){for(let t of e.cells)if(t.gridColumn===n)return t.gridColumnId??null;return null}function Nv(e,n,t,r,o){if(!e.pages[n.pageIndex])return null;let i=n.pageContentBox,s=t-i.x-o,l=r-i.y,d=n.table,c=s-d.box.x,u=l-d.box.y;return c<-Ho||u<-Oy||c>d.box.width+Ho||u>d.box.height+Pu?null:{x:c,y:u}}function Av(e,n,t,r){if(n.row.isHeaderRepeat)return null;let o=n.table,a=n.row.box.y-o.box.y+n.row.box.height;if(!o.columnEdges.slice(1).some(l=>Math.abs(t-l)<=Ho)&&t>=0&&t<=o.box.width&&Math.abs(r-a)<=Ho)return {kind:"rowDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeY:a};if(r<n.row.box.y-n.table.box.y||r>n.row.box.y-n.table.box.y+n.row.box.height)return null;for(let l=1;l<o.columnEdges.length-1;l+=1){let d=o.columnEdges[l];if(Math.abs(t-d)>Ho)continue;let c=Ja(n.row,l-1),u=Ja(n.row,l);if(!(!c||!u))return {kind:"columnDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,leftGridColumnId:c,rightGridColumnId:u,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:d,sheetY:n.pageContentBox.y+o.box.y+r}}let s=o.columnEdges.at(-1);if(Math.abs(t-s)<=Ho){let l=o.columnEdges.length-2,d=Ja(n.row,l);return d?{kind:"rightEdge",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,gridColumnId:d,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:s,sheetY:n.pageContentBox.y+o.box.y+r}:null}return null}function mL(e,n,t,r,o=0,a){let i=a??qa(r,t),s=i>=0?o:0,l=null,d=-1,c=-1,u=f=>{if(!f)return;let p=Ev[f.kind];f.nestingDepth<d||f.nestingDepth===d&&p<=c||(d=f.nestingDepth,c=p,l=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let p=Nv(r,f,n,t,s);if(!p||(u(Av(e,f,p.x,p.y)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let m=f.row.box.y-f.table.box.y;p.x<=Pu&&Math.abs(p.y-(m+f.row.box.height/2))<=f.row.box.height/2+Pu&&u({kind:"insertRow",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});for(let g=0;g<f.table.columnEdges.length-1;g+=1){let h=f.table.columnEdges[g],y=f.table.columnEdges[g+1],x=(h+y)/2;if(Math.abs(p.x-x)>(y-h)/2+2||p.y>Oy)continue;let k=Ja(f.row,g);if(k){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:k,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return l}var By=1048576;function vu(e=By){let n=e|0;return {cellsRemaining:n>0?n:0}}function dl(e,n,t,r){let o=new Map,a=new Map,i=r?.pageFragment===true,s=i?new Set:null,l=i,c=p=>{let m=a.get(p);m&&(o.set(m.id,m.span),a.delete(p));},u=()=>t!==void 0&&t.cellsRemaining<=0,f=()=>{for(let p of [...a.keys()])c(p);};for(let p of e){if(u()){f();break}l&&p.isHeaderRepeat!==true&&(l=false,f(),s?.clear());let m=new Set,g=false;for(let h of p.cells){if(t){if(t.cellsRemaining<=0){g=true;break}t.cellsRemaining-=1;}let y=Math.max(0,Math.min(h.gridColumn|0,1023));if(m.add(y),h.vMergeContinue){let x=a.get(y);x?x.span+=1:s&&!s.has(y)&&(a.set(y,{id:h.id,span:1}));}else c(y),a.set(y,{id:h.id,span:1});s?.add(y);}if(g){f();break}for(let h of [...a.keys()])m.has(h)||c(h);}return f(),o}var cl=.001;function Dv(e,n){return {...e,height:{rule:"auto"},cells:[n]}}function _v(e){let n=dl(e),t=[],r=new Map;for(let o=0;o<e.length;o+=1)for(let a of e[o].cells){let i=n.get(a.id);if(i===void 0||i<2)continue;let s=Math.min(o+i-1,e.length-1);if(s<=o)continue;t.push({span:{headRow:o,endRow:s,headCellId:a.id},cell:a});let l=r.get(o);l?l.add(a.id):r.set(o,new Set([a.id]));}return {heads:t,headIdsByRow:r}}function Hv(e,n){if(e.length===0||!e.some(S=>S.cells.some(w=>w.vMergeContinue)))return null;let{heads:t,headIdsByRow:r}=_v(e);if(t.length===0)return null;let o=new Map(t.map(S=>[S.span,S])),a=new Map;for(let S of t){let w=a.get(S.span.headRow);w?w.push(S.span):a.set(S.span.headRow,[S.span]);}for(let S of a.values())S.sort((w,T)=>T.endRow-w.endRow);let i=new Map,s=new Map,l=new Map,d=new Map,c=new Set,u=new Set,f=new Set,p=new Set,m=new Map,g=new Map,h=(S,w,T)=>{let N=new Set;for(let F of r.get(S)??[])(f.has(F)||F===w)&&N.add(F);let M=T===void 0?"":`@${T.toFixed(2)}`,b=`${S}${M}\0${[...N].sort().join("\0")}`,W=i.get(b);if(W!==void 0)return W;let _=n(e[S],N,T);return i.set(b,_),_},y=(S,w)=>{let T=w===void 0?S:`${S.headCellId}@${w.toFixed(2)}`,N=s.get(T);if(N!==void 0)return N;let M=o.get(S),b=n(Dv(e[S.headRow],M.cell),void 0,w);return s.set(T,b),b},x=(S,w,T)=>h(S,w,T)+(l.get(S)??0),k=S=>{for(let w=S.headRow+1;w<=S.endRow;w+=1)if(r.has(w))return true;return false},B=(S,w)=>{let T=0;for(let N=S.headRow;N<=S.endRow;N+=1)T+=x(N,S.headCellId,w===void 0?void 0:w+T);return T},v=(S,w)=>{let T=new Map,N=0;for(let M=S.headRow;M<=S.endRow;M+=1){let b=x(M,S.headCellId,w===void 0?void 0:w+N);T.set(M,b),N+=b;}return T},L=S=>{for(let w=S.endRow;w>=S.headRow;w-=1)if(e[w].height.rule!=="exact")return w},I=(S,w)=>{if(k(S)||p.has(S.headRow)&&!u.has(S))return Number.POSITIVE_INFINITY;let T=B(S,w);return L(S)===void 0?T:Math.max(T,y(S,w))};return {spansAt:S=>a.get(S)??[],heightOf:I,accept:(S,w)=>{if(u.has(S)||k(S)||p.has(S.headRow))return;let T=v(S,w),N=0;for(let _ of T.values())N+=_;let M=L(S),b=y(S,w);if(M===void 0&&b>N+cl)return;let W=M===void 0?0:b-N;u.add(S),f.add(S.headCellId),p.add(S.headRow),W>cl&&(l.set(M,(l.get(M)??0)+W),T.set(M,(T.get(M)??0)+W));for(let[_,F]of T)c.add(_),d.set(_,Math.max(d.get(_)??0,F));m.set(S,w),g.set(S,W>cl?M:void 0);},withdrawAt:S=>{for(let w of a.get(S)??[]){if(!u.delete(w))continue;f.delete(w.headCellId),p.delete(w.headRow),m.delete(w);let T=g.get(w);T!==void 0&&l.delete(T),g.delete(w);for(let N=w.headRow;N<=w.endRow;N+=1)c.delete(N),d.delete(N);}},rowOptions:S=>{if(!c.has(S))return;let w;for(let T of a.get(S)??[])u.has(T)&&(w??=new Map,w.set(T.headCellId,I(T,m.get(T))));return {...w?{detachedSpanHeightPtByCellId:w}:{},heightFloorPt:d.get(S)??x(S)}}}}function My(e,n,t,r){for(let o of e?.spansAt(n)??[])t+e.heightOf(o,t)>r+cl||e.accept(o,t);return e?.rowOptions(n)}function Fy(e,n,t,r,o){return Hv(e.rows,(a,i,s)=>o(a,e.columnWidthsPt,typeof n=="function"?n():n,t,r,e.cellSpacingPt,i?{detachedSpanHeightPtByCellId:new Map([...i].map(l=>[l,Number.POSITIVE_INFINITY]))}:void 0,s))}function Ly(e,n,t){for(let r of e?.spansAt(n)??[])e.accept(r,t);return e?.rowOptions(n)}function ul(e,n){return {top:e.top+rr(n.top),right:e.right+rr(n.right),bottom:e.bottom+rr(n.bottom),left:e.left+rr(n.left)}}function zv(e,n,t){return {top:n?{state:"none"}:e.top,left:e.left,bottom:t?{state:"none"}:e.bottom,right:e.right}}function fl(e,n,t){return !n&&!t?e:{...e,cells:e.cells.map(r=>({...r,borders:zv(r.borders,n,t)}))}}function jv(e,n,t,r){if(!(!r.onAnchorRepublish||!r.inlineDrawingLayout||!r.anchorFrameBase||!r.pageContentClip))for(let o of e){if(o.kind!=="paragraph")continue;let a=n.find(s=>s.kind==="paragraph"&&s.id===o.paragraphId);!a||a.kind!=="paragraph"||Mn(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,nr({paragraph:a,paragraphId:o.paragraphId,paragraphBox:o.box,lines:o.lines,drawingLayout:r.inlineDrawingLayout,frameBase:r.anchorFrameBase(),columnBox:r.columnBoxForParagraph?.(o.box)??o.box,cellBox:t,pageClip:r.pageContentClip(),measurer:r.measurer,...r.layoutTextboxStoryFor?{layoutTextboxStory:r.layoutTextboxStoryFor}:{},...r.displayMode?{displayMode:r.displayMode}:{}}));}}function pl(e,n){return n===0?[...e]:e.map(t=>t.kind==="table"?{...t,box:{...t.box,y:t.box.y+n},rows:t.rows.map(r=>({...r,box:{...r.box,y:r.box.y+n},cells:r.cells.map(o=>({...o,box:{...o.box,y:o.box.y+n},blocks:pl(o.blocks,n)}))}))}:{...t,box:{...t.box,y:t.box.y+n},...t.shadingBox?{shadingBox:{...t.shadingBox,y:t.shadingBox.y+n}}:{},...t.bottomBorder?{bottomBorder:{...t.bottomBorder,box:{...t.bottomBorder.box,y:t.bottomBorder.box.y+n}}}:{},...t.borders?{borders:t.borders.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}:{},...t.marker?{marker:{...t.marker,box:{...t.marker.box,y:t.marker.box.y+n}}}:{},lines:t.lines.map(r=>({...r,box:{...r.box,y:r.box.y+n},spans:r.spans.map(o=>({...o,box:{...o.box,y:o.box.y+n}})),...r.drawings?{drawings:r.drawings.map(o=>ys(o,0,n))}:{}}))})}function Qa(e,n,t,r,o,a,i,s){if(e.length===0)return [];let l=new Map;for(let h of t)for(let y of h.cells)l.set(y.id,y);let d=dl(e,a,o,{pageFragment:true}),c=e.map((h,y)=>({...h,cells:h.cells.map(x=>{let k=d.get(x.id);if(x.vMergeContinue&&k===void 0)return {...x,paintInert:true,rowSpan:1,borders:{},blocks:[]};let B=x.vMergeContinue,v=k??1,L=x.box.height;if(v>1){let T=e[y+v-1];L=T.box.y+T.box.height-x.box.y;}let I=l.get(x.id),S=x.blocks;if(I&&I.vAlign!=="top"&&S.length>0){let T=ul(I.margins,I.borders),N=Number.POSITIVE_INFINITY,M=Number.NEGATIVE_INFINITY;for(let b of S)N=Math.min(N,b.box.y),M=Math.max(M,b.box.y+b.box.height);if(Number.isFinite(N)&&Number.isFinite(M)){let b=L-T.top-T.bottom-(M-N),_=x.box.y+T.top+(b>0?I.vAlign==="center"?b/2:b:0)-N;if(Math.abs(_)>.001){S=pl(S,_);for(let F of S)F.kind==="paragraph"&&i?.(F.paragraphId,_);}}}let w=Object.freeze({x:x.box.x,y:x.box.y,width:x.box.width,height:L});return I&&s&&(v>1||I.vAlign!=="top"&&S.length>0)&&jv(S,I.blocks,w,s),{...x,...B?{vMergeContinue:false,paintInert:false}:{},rowSpan:v,blocks:S,box:{...x.box,height:L}}})})),u=c.map(h=>h.cells.map(y=>{let x=l.get(y.id);return {gridColumn:y.gridColumn,gridSpan:y.gridSpan,vMergeContinue:y.vMergeContinue,borders:x?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:y.rowSpan??1}})),f=n.columnWidthsPt.length,p=n.tableBorders,m={columnWidthsPt:n.columnWidthsPt,rowBands:c.map(h=>({y:h.box.y,height:h.box.height})),cellBoxes:c.map(h=>h.cells.map(y=>({width:y.box.width,height:y.box.height})))},g=Jc(u,p,f,m,void 0,r);return c.map((h,y)=>({...h,cells:h.cells.map((x,k)=>{let B=g[y][k];return x.paintInert||x.vMergeContinue?{...x,borders:{},paintInert:true}:{...x,borders:B}})}))}function Ny(e,n,t,r){let o=new Map,a=0,i=s=>{let l=Ao(s,n,0,t,r);if(l)for(let d of l.rows)for(let c of d.cells)for(let u of c.blocks)u.localName==="p"?o.set(u.id,a++):u.localName==="tbl"&&i(u);};for(let s of e)s.kind==="paragraph"&&s.paragraph?o.set(s.paragraph.id,a++):s.kind==="table"&&s.table&&i(s.table);return o}var gl=4096,Ey=1,_n=class extends Error{code;constructor(n,t){super(t),this.name="TablePaginationError",this.code=n;}};function Tu(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false}))}function ml(e,n,t){let r=0;for(let o=n;o<t&&o<e.length;o+=1)r+=e[o];return r}function Gv(e,n,t,r,o,a,i){let s=e.id,l=o.listItems?.get(s),{props:d,indent:c,available:u,alignment:f,spacing:p,lineSpacing:m,bottomBorder:g,borders:h,shading:y,inheritedRunProperties:x,markRunProperties:k,tabStops:B,tabStopsCacheToken:v}=za(e,t,o.styleCascade,l,i?.tableCellStyle,true),L=wa(B,o.defaultTabStopPt),I=L===B?v:gr(L),S=el(l,c,o.measurer,L,u),w=o.pageExclusionZones?.()??Object.freeze([]),T=o.paragraphOrderIndex?.(s)??Number.MAX_SAFE_INTEGER,N=o.paragraphOrderIndex?Eg(w,T,z=>o.paragraphOrderIndex?.(z)):w,M=Lg(N,n,0,{left:0,right:c.left+u+c.right}),b=pt(M),W=b?`${r.toFixed(3)}|${b}`:"",_=Sr({paragraph:e,properties:[...d,...x,...k,{localName:"tabStops",attributes:{token:I}},...l?[{localName:"list",attributes:{token:l.cacheToken}}]:[]],width:u,producer:o.producer,...o.drawingTokenForParagraph?.(e)?{drawingToken:o.drawingTokenForParagraph(e)}:o.drawingLayoutToken?{drawingToken:o.drawingLayoutToken}:{},...W?{exclusionToken:W}:{}});o.cache&&o.onCellBreakKey?.(_);let F=ks(e,s,c.left,u,o.measurer,o.cache,o.cache?_:null,x,L,o.pageContext,o.styleCascade?(z,$)=>Mt(z,$,o.styleCascade):void 0,{lineSpacing:m,equationCacheToken:o.producer,firstLineOffset:S,marginExtent:{left:0,right:c.left+u+c.right},...o.projectLink?{projectLink:o.projectLink}:{},...o.projectFieldLink?{projectFieldLink:o.projectFieldLink}:{},...o.documentProperties?{documentProperties:o.documentProperties}:{},...o.bodyPageFields?{bodyPageFields:o.bodyPageFields}:{},displayMode:o.displayMode,...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:c.left+u+c.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:c.left+u+c.right,height:Math.max(1,u)}),...M.length>0?{pageExclusionZones:M}:{},...o.styleCascade?{themeFonts:o.styleCascade.themeFonts}:{},markRunProperties:k}),E=i?.lineStart??0,O=i?.fragmentIndex??0,R=i?.maxBottom??Number.POSITIVE_INFINITY,V=i?.includeAfter??true,A=i?.includeBottomBorder??true,G=()=>l!==void 0||o.displayMode==="all-markup"&&(br(e).length>0||So(e)!==null),U=(i?.collapseHeight??false)&&!G(),H=E===0&&!U?io(p.before,a):0,X=n+c.left,Z=E===0&&!U?Vt(h.top):0,j=[],K=r+H+Z,fe=E,Be=false;for(let z=E;z<F.length;z+=1){let $=F[z],ee=z===F.length-1,Q=ee&&A&&g&&!U?Vt(g):0,ue=ee&&V&&!U?p.after:0,le=U?0:M.length>0?mt(K,$.height,M):$.exclusionSkipBefore??0;if((U?K:K+le+$.height+Q+ue)>R+.001)break;K+=le;let Ge=n+c.left+(z===0?S:0),ve=Math.max(1,u-(z===0?S:0)),Ae=$.spans.map(de=>({...de,range:{...de.range,paragraphId:s},box:{...de.box,x:de.box.x+n,y:K}})),Fe=vs(Ae,o.measurer,Ge,ve,f,ee,f==="center"||f==="right"?$.width:void 0),un=Ae.length>0&&Fe.length>0?Fe[0].box.x-Ae[0].box.x:f!=="left"&&f!=="both"?(()=>{let de=ve-$.width;return de<=0?0:f==="center"?de/2:de})():0,Ke=Object.freeze({x:n,y:r,width:t,height:Math.max(0,R-r)}),We=Ts($.drawings.map(de=>bs(Object.freeze({...de,paragraphId:s,x:n+de.x,advanceStart:n+de.advanceStart,advanceEnd:n+de.advanceEnd,y:K+de.y,paintBounds:Object.freeze({...de.paintBounds,x:n+de.paintBounds.x,y:K+de.paintBounds.y}),hitBounds:Object.freeze({...de.hitBounds,x:n+de.hitBounds.x,y:K+de.hitBounds.y})}),Ke)),un);j.push({id:o.nextLineId(s,$.start,z),range:{paragraphId:s,start:$.start,end:$.end},spans:Fe,...We.length>0?{drawings:We}:{},box:{x:n+c.left,y:K,width:u,height:U?0:$.height},contentX:Fe[0]?.box.x??Ge+un,baseline:U?Math.max(0,Math.min($.baseline,i?.collapseBandAbove??0)):$.baseline,leading:U?0:$.leading,trailingSpacing:U?0:$.trailingSpacing,...$.deletedRanges?{deletedRanges:$.deletedRanges}:{},...$.anchorRevisions?{anchorRevisions:$.anchorRevisions}:{}}),U||(K+=$.height),fe=z+1,Be=true;}if(!Be)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:E,complete:false,fitted:false};let De=fe>=F.length,ce=j[0].box.y,xe=K,be=[],Ce,Ie=ce,me=xe,Me=h.left?wn(h.left):0,se=h.right?wn(h.right):0,_e=h.left?X-h.left.spacePt-Me:X,rn=h.right?X+u+h.right.spacePt+se:X+u,Se=Math.max(rn-_e,0);if(Z>0&&h.top){let z=wn(h.top),$=ce-h.top.spacePt-z;be.push({side:"top",edge:h.top,box:{x:_e,y:$,width:Se,height:z}}),Ie=$;}if(De&&A&&g&&!U){let z=wn(g),$=xe+g.spacePt,ee={x:_e,y:$,width:Se,height:z};Ce={edge:g,box:ee},be.push({side:"bottom",edge:g,box:ee}),me=$+z;}let an=Math.max(me-Ie,0);if(h.left&&be.push({side:"left",edge:h.left,box:{x:X-h.left.spacePt-Me,y:Ie,width:Me,height:an}}),h.right&&be.push({side:"right",edge:h.right,box:{x:X+u+h.right.spacePt,y:Ie,width:se,height:an}}),h.bar){let z=wn(h.bar);be.push({side:"bar",edge:h.bar,box:{x:X-h.bar.spacePt-z,y:ce,width:z,height:Math.max(xe-ce,0)}});}let Hn=De&&V&&!U?p.after:0,gn=me+Hn,Dt=y===void 0?void 0:h.left||h.right?{x:_e,y:Ie,width:Se,height:Math.max(me-Ie,0)}:Sa(j,X,u),yt=De&&o.displayMode==="all-markup",hn=yt?br(e):[],Jn=yt?So(e):null,we=E===0?nl(l,o.measurer,j[0]?{y:j[0].box.y,height:j[0].box.height}:void 0,n):void 0,sn=Es(e),D=sn?Ls(j,Fs(sn)):j,P={kind:"paragraph",id:`${s}#f${O}`,paragraphId:s,fragmentIndex:O,range:{paragraphId:s,start:D[0].range.start,end:D[D.length-1].range.end},props:d,spacing:{before:H,after:Hn},indent:c,tabStops:L,...Ce?{bottomBorder:Ce}:{},...be.length>0?{borders:be}:{},...y===void 0?{}:{shading:y},...Dt===void 0?{}:{shadingBox:Dt},...we?{marker:we}:{},...ls(hn,Jn),lines:D,box:{x:X,y:r,width:u,height:gn-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let z=Object.freeze({x:n,y:r,width:t,height:Math.max(0,R-r)}),$=P.box,ee={paragraph:e,paragraphId:s,paragraphBox:$,lines:D};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...ee,cellOriginX:n,cellContentWidth:t}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(nr({paragraph:e,paragraphId:s,paragraphBox:$,lines:D,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.($)??$,cellBox:z,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{}}));}return {fragment:P,bottom:gn,spaceAfter:Hn,nextLineIndex:fe,complete:De,fitted:true}}function Or(e,n,t,r,o,a){let i=Ay(e,n,t,r,Number.POSITIVE_INFINITY,o,a,{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false});return {blocks:i.blocks,bottom:i.bottom}}function Ay(e,n,t,r,o,a,i,s,l,d=false){let c=[],u=r,f=s.previousSpaceAfter,p=s.blockIndex,m=s.lineIndex,g=s.paragraphFragmentIndex,h=false,y=false,x=s.precededByEmittedTable;for(;p<e.length;){let k=e[p];if(k.kind==="table"){m!==0&&(m=0),f=0;let L=$v(k,n,t,u,a+1,i);if(!L){x=false,p+=1;continue}if(L.bottom>o+.001){y=!h;break}c.push(L.fragment),u=L.bottom,h=true,x=true,p+=1,m=0;continue}if(k.kind!=="paragraph"){x=false,p+=1,m=0;continue}let B=d&&p===e.length-1&&x&&dh(k),v=Gv(k,n,Math.max(1,t-n),u,i,f,{lineStart:m,fragmentIndex:g,maxBottom:o,includeAfter:true,includeBottomBorder:true,collapseHeight:B,collapseBandAbove:u-r,...l?{tableCellStyle:l}:{}});if(!v.fitted||!v.fragment)break;if(c.push(v.fragment),u=v.bottom,h=true,v.complete)f=v.spaceAfter,x=false,p+=1,m=0,g=0;else return {blocks:c,bottom:u,cursor:{blockIndex:p,lineIndex:v.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:g+1,precededByEmittedTable:x},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:c,bottom:u,cursor:{blockIndex:p,lineIndex:m,previousSpaceAfter:f,paragraphFragmentIndex:g,precededByEmittedTable:x},complete:p>=e.length,fitted:h,nestedSplitBlocked:y}}function ei(e,n,t,r,o,a,i,s=0,l,d=Number.POSITIVE_INFINITY){return ku(e,n,t,r,Number.POSITIVE_INFINITY,o,false,a,i,Tu(e),s,l,d)}function ku(e,n,t,r,o,a,i,s,l,d,c=0,u,f=o){let p=u?.detachedSpanHeightPtByCellId,m=ml(n,0,n.length),g=Number.isFinite(c)&&c>0?c/2:0,h=l.measurer.lineMetrics(dt).height,y=e.height,x=y.rule==="exact"?y.valuePt:void 0,k=y.rule==="atLeast"?y.valuePt:void 0,B=[],{rowDeps:v,flushDeferred:L}=uh(l,B),I=a&&l.pageOccurrenceKey?{...v,nextLineId:(O,R,V)=>v.nextLineId(O,R,V,l.pageOccurrenceKey())}:v,S=x===void 0?o:Math.min(o,r+Math.max(0,x)),w=[],T=false,N=false,M=r;for(let O=0;O<e.cells.length;O+=1){let R=e.cells[O],V=d[O]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false},A=R.gridSpan,G=R.gridColumn,U=t+ml(n,0,G),H=ml(n,G,Math.min(G+A,n.length))||m,X=Math.min(g,Math.max((H-Ey)/2,0)),Z=U+X,j=Math.max(H-2*X,Ey),K=ul(R.margins,R.borders),fe=i?rr(R.borders.top):K.top,Be=r+fe,De=p?.get(R.id),ce=De!==void 0,xe=ce?Math.min(f,r+De):S,be=xe-K.bottom,Ce=[],Ie=Be,me=V,Me=true,se=false,_e=false;if(!R.vMergeContinue)if(be<Be+.001)Me=V.blockIndex>=R.blocks.length;else {let Se=Ay(R.blocks,Z+K.left,Z+j-K.right,Be,be,s,I,V,R.styleFormatting,true);Ce=Se.blocks,Ie=Se.bottom,me=Se.cursor,Me=Se.complete,se=Se.fitted,_e=Se.nestedSplitBlocked,se&&(T=true),_e&&(N=true);}let rn=Math.min(xe,se?Ie+K.bottom:r+fe+h+K.bottom);rn>M&&!ce&&(M=rn),w.push({cell:R,x:Z,width:j,gridColumn:G,blocks:Ce,contentTop:Be,contentBottom:Ie,insets:{...K,top:fe},nextCursor:me,complete:R.vMergeContinue?true:Me,fitted:se,nestedSplitBlocked:_e});}M=Math.min(S,Math.max(M,r));for(let O of w){if(p?.has(O.cell.id)===true)continue;let R=O.fitted?O.contentBottom+O.insets.bottom:r+O.insets.top+h+O.insets.bottom;R>M&&R<=S+.001&&(M=R);}if(M<=r+.001&&w.length>0){let O=r;for(let R of w){let V=r+R.insets.top+h+R.insets.bottom;V>O&&(O=V);}M=Math.min(S,O);}M=Math.min(S,M);let b=false;if(x!==void 0){let O=r+x;O<=o+.001?(M=O,b=true):M=Math.min(o,M);}else {let O=i?0:u?.heightFloorPt??0,R=r+Math.max(k??0,O);R>M&&R<=o+.001&&w.every(A=>A.complete)&&(M=R);}M=Math.min(o,M);let W=Math.max(0,M-r),_=w.map(O=>{let R=O.blocks,V=b?true:O.complete;if(!O.cell.vMergeContinue&&V&&O.cell.vAlign!=="top"&&R.length>0){let A=O.contentBottom-O.contentTop,G=W-O.insets.top-O.insets.bottom-A;if(G>0){let U=O.cell.vAlign==="center"?G/2:G;R=pl(R,U);}}return {id:O.cell.id,gridColumn:O.gridColumn,...O.cell.gridColumnId?{gridColumnId:O.cell.gridColumnId}:{},gridSpan:O.cell.gridSpan,vMergeContinue:O.cell.vMergeContinue,...O.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...O.cell.shading===void 0?{}:{shading:O.cell.shading},blocks:R,box:{x:O.x,y:r,width:O.width,height:W}}}),F=b||w.every(O=>O.complete)?null:w.map(O=>O.nextCursor),E=b||w.every(O=>O.complete);return L(_,r,W),{record:{id:e.id,...e.revisionKind?{revisionKind:e.revisionKind}:{},...e.revisionId!==void 0?{revisionId:e.revisionId}:{},...e.revisionAuthor!==void 0?{revisionAuthor:e.revisionAuthor}:{},...e.revisionDate!==void 0?{revisionDate:e.revisionDate}:{},rowIndex:0,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:_,box:{x:t,y:r,width:m,height:W}},bottom:M,remainder:E?null:F,fitted:T||e.cells.every(O=>O.vMergeContinue)||b,nestedSplitBlocked:N}}function Wv(e){return {...e,measuringOnly:true,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function Cu(e,n,t,r,o,a=0,i,s){let l=0,d=s!==void 0,c={...Wv(o),...d?{}:{pageExclusionZones:void 0},nextLineId:()=>`probe-${l++}`};return ei(e,n,t,s??0,false,r,c,a,i).record.box.height}function Vv(e,n,t,r,o,a,i,s,l){let d=u=>ei(e,n.columnWidthsPt,t,r,i,o,a,n.cellSpacingPt,u),c=d(s);return c.remainder===null||s===void 0?c:(l(),d(void 0))}var Ou=(e,n,t,r,o)=>r.measuringOnly===true?null:Fy(o?{...e,rows:o}:e,n,t,r,Cu);function $v(e,n,t,r,o,a){if(o>=qs)return null;let i=Math.max(1,t-n),s=Ao(e,i,o,a.styleCascade,a.displayMode);if(!s||s.rows.length===0)return null;let l=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:y=>{l.push(y);}},c=n+$a(s,i),u=Ou(s,c,o,d),f=[],p=r;for(let[y,x]of s.rows.entries()){let k=l.length,B=Vv(x,s,c,p,o,d,false,Ly(u,y,p),()=>{l.length=k,u?.withdrawAt(y);});f.push(B.record),p=B.bottom;}let m=Qa(f,s,s.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let y of l)for(let x of m)if(x.cells.some(B=>B.blocks.some(v=>v.kind==="paragraph"&&v.paragraphId===y.paragraphId))){Xc([y],x.cells,x.box.y,x.box.height,a);break}let g=ml(s.columnWidthsPt,0,s.columnWidthsPt.length),h=new Map;return {fragment:ll({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:m,box:{x:c,y:r,width:g,height:p-r}},s.columnWidthsPt,o,h),bottom:p}}function Dy(e,n){let{columnWidth:t,columnLeft:r,contentHeight:o,advanceColumn:a,anchorFrames:i,styleCascade:s,displayMode:l,deps:d,shiftAnchor:c,publishFragment:u}=n,f=t(),p=Ao(e,f,0,s,l);if(!p||p.rows.length===0)return;let m=p.columnWidthsPt.reduce((F,E)=>F+E,0),g=()=>p.float?Wh(p.float,m,i()):r()+$a(p,t()),h=g();p.float&&p.float.vertAnchor==="text"&&!p.float.ySpec&&(n.cursorY=Math.max(0,Math.min(n.cursorY+p.float.yPt,o())));let y=F=>Cu(F,p.columnWidthsPt,h,0,d,p.cellSpacingPt),x=[];for(let F of p.rows)if(F.isHeader)x.push(F);else break;let k=0,B=n.cursorY,v=[],L=new Map,I=[],S=()=>{if(v.length===0)return;let F=Qa(v,p,I,d.borderOwnershipBudget,d.vMergeResolveBudget,void 0,c,d),E=F[F.length-1];u(ll({kind:"table",id:`${e.id}#f${k}`,tableId:e.id,fragmentIndex:k,rows:F,box:{x:h,y:B,width:p.columnWidthsPt.reduce((O,R)=>O+R,0),height:E.box.y+E.box.height-B}},p.columnWidthsPt,0,L)),k+=1,v=[],I=[];},w=F=>{if(x.length===0)return;let E=0;for(let O of x)E+=y(O);if(E>o()+.001)throw new _n("table-row-overheight",`Table header group (${x.length} row(s)) is taller than the page content box`);n.cursorY+E>o()+.001&&n.cursorY>0&&(S(),a(),h=g(),B=n.cursorY);for(let O of x){let R=ei(O,p.columnWidthsPt,h,n.cursorY,F,0,d,p.cellSpacingPt);if(R.bottom>o()+.001)throw new _n("table-row-overheight",`Table header row ${O.id} overflowed the page content box`);v.push(R.record),I.push(O),n.cursorY=R.bottom;}},T=F=>{S(),a(),h=g(),B=n.cursorY,w(true);};w(false);let N=p.rows.slice(x.length),M=Ou(p,()=>h,0,d,N),b,W=0,_=(F,E)=>{b=My(M,F,n.cursorY,o()),W=b?.heightFloorPt??(E?y(E):W);};for(let[F,E]of N.entries()){_(F,E);let O=Tu(E),R=false,V=0,A=false;for(!(b!==void 0&&b.detachedSpanHeightPtByCellId===void 0)&&W<=o()+.001&&n.cursorY+W>o()+.001&&n.cursorY>0&&(T(),A=true,_(F));;){if(V+=1,V>gl)throw new _n("table-row-fragment-limit",`Table row ${E.id} exceeded ${gl} page fragments`);let U=o()-n.cursorY;if(U<=.001&&n.cursorY>0){if(A)throw new _n("table-row-overheight",`Table row ${E.id} cannot fit after repeated header rows`);T(),A=true,_(F);continue}if(!R&&W<=U+.001){let j=ei(E,p.columnWidthsPt,h,n.cursorY,false,0,d,p.cellSpacingPt,b,o());if(j.bottom>o()+.001)throw new _n("table-row-overheight",`Table row ${E.id} overflowed the page content box after placement`);let K=j.remainder!==null;if(v.push(j.record),I.push(K?fl(E,R,true):E),n.cursorY=j.bottom,!K)break;O=j.remainder,R=true,A=false,T();continue}if(!R&&(E.cantSplit||E.height.rule==="exact")){if(n.cursorY>0&&!A){T(),A=true,_(F);continue}throw new _n("table-row-overheight",E.height.rule==="exact"?`Table row ${E.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${E.id} has w:cantSplit and is taller than the available page content`)}let H=ku(E,p.columnWidthsPt,h,n.cursorY,o(),false,R,0,d,O,p.cellSpacingPt,b);if(!H.fitted&&n.cursorY>0&&!A){T(),A=true,_(F);continue}if(!H.fitted)throw new _n(H.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",H.nestedSplitBlocked?`Table row ${E.id} contains a nested table taller than the page content box`:`Table row ${E.id} has content that cannot fit a page content box`);if(H.bottom>o()+.001)throw new _n("table-row-overheight",`Table row ${E.id} overflowed the page content box`);let X=H.remainder!==null,Z=fl(E,R,X);if(v.push(H.record),I.push(Z),n.cursorY=H.bottom,!X)break;O=H.remainder,R=true,A=false,T();}}S();}function _y(e){let n=e.picture;return n?.embeddedRelationshipId?`embed:${e.ownerPartName}:${n.embeddedRelationshipId}`:n?.linkedRelationshipId?`link:${e.ownerPartName}:${n.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var Hy=new WeakMap,Bu=new Map,Xv=16,Yv=32;function Vy(e,n){let t=Hy.get(e);if(t)return t;let r;if(e.kind==="drawing"||_a$1(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:Bu,visited:1,deepest:0};else if((n<2||e.children.length>=Xv)&&n<Yv){let o=null,a=1,i=0;for(let s of e.children){let l=Vy(s,n+1);if(a+=l.visited,l.deepest+1>i&&(i=l.deepest+1),l.atoms.size>0){o||(o=new Map);for(let[d,c]of l.atoms)o.set(d,c);}}r={atoms:o??Bu,visited:a,deepest:i};}else {let o=new Map,a=0,i=0,s=[{node:e,depth:0}];for(;s.length>0;){let l=s.pop();if(a+=1,a>Ya$1)break;l.depth>i&&(i=l.depth);let d=l.node;if(d.kind==="drawing"||_a$1(d)){o.set(d.id,d);continue}if("children"in d)for(let c=d.children.length-1;c>=0;c-=1)s.push({node:d.children[c],depth:l.depth+1});}r={atoms:o.size>0?o:Bu,visited:a,deepest:i};}return Hy.set(e,r),r}function zy(e){let n=Vy(e.root,0);return n.visited>Ya$1||n.deepest>Wa$1.maxDrawingDepth?null:n.atoms}function Mu(e){let n=e.position,t=e.anchor,r=e.picture,o=e.wrapGeometry;return [e.drawingNodeId,e.ownerPartName,e.kind,e.hidden?"1":"0",String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.effectExtentEmu.top),String(e.effectExtentEmu.right),String(e.effectExtentEmu.bottom),String(e.effectExtentEmu.left),e.compatibilityBranchNodeId??"",t?.simplePos?"sp":"pv",t?String(t.relativeHeight):"",t?t.layoutInCell?"1":"0":"",r?[String(r.crop.left),String(r.crop.top),String(r.crop.right),String(r.crop.bottom),String(r.transform.rotationDegrees),r.transform.flipHorizontal?"1":"0",r.transform.flipVertical?"1":"0",String(r.transform.offsetEmu.x),String(r.transform.offsetEmu.y),String(r.transform.extentEmu.cx),String(r.transform.extentEmu.cy),r.embeddedRelationshipId??"",r.linkedRelationshipId??"",r.presetGeometry??""].join(":"):"",o?[o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length)].join(":"):"",n?[n.horizontal.relativeFrom,n.horizontal.align??"",String(n.horizontal.offsetEmu??""),n.vertical.relativeFrom,n.vertical.align??"",String(n.vertical.offsetEmu??""),String(n.simplePosition.xEmu),String(n.simplePosition.yEmu)].join(":"):""].join("|")}function ni(e){switch(e.kind){case "ready":return `ready:${e.resourceKey}:${e.contentId}:${e.pixelWidth}x${e.pixelHeight}`;case "pending":return `pending:${e.resourceKey}`;case "external":return `external:${e.relationshipId}:${e.sinkSafe?"1":"0"}`;case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}var Kv=1;function Fu(e,n){if(e.kind==="drawing"||_a$1(e)){n.push(e.id);return}if("children"in e)for(let t of e.children)Fu(t,n);}function Uv(e){if(e.kind!=="paragraph")return [];let n=[];for(let t of e.children)Fu(t,n);return Object.freeze(n)}function qv(e){let{ownerPartName:n,part:t,pkg:r,lookup:o,onResourceSettled:a,rememberReadyHandle:i,forgetReadyHandle:s}=e,l=false,d=0,c=new Map,u=new Set,f=new Map,p=new WeakMap,m=new WeakMap,g=0,h=Za$1(r,n),y=cb$1(t,{resolveRelationship:h}),x=zy(t),k=(w,T)=>{if(l||u.has(T))return;u.add(T);let N=d;o.resolveForProjection(w).then(M=>{l||N!==d||(c.set(T,M),M.kind==="ready"&&i(M.validatedHandle),g+=1,f.set(T,g),a(n));}).catch(()=>{l||N!==d||(c.set(T,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(T,g),a(n));}).finally(()=>{u.delete(T);});},B=w=>{let T=_y(w),N=c.get(T);if(N)return N;let M=w.picture?.linkedRelationshipId;if(M){let W=o.resolveLinked(n,M);return c.set(T,W),g+=1,f.set(T,g),W}let b=Object.freeze({kind:"pending",resourceKey:T});return c.set(T,b),g+=1,f.set(T,g),k(w,T),b},v=w=>y.get(w)??null,L=Object.freeze({ownerPartName:n,projectionForAtom:v,project:w=>v(w.id),resourceOf:B}),I=w=>{let T=m.get(w);if(T)return T;let N=Uv(w),M=null,b=(_,F)=>{if(!(F>=Kv))for(let E of _){let O=y.get(E)?.textboxStory;if(!O)continue;let R=[];if(Fu(O.content,R),R.length!==0){M||(M=[...N]);for(let V of R)M.push(V);b(R,F+1);}}};b(N,0);let W=M??N;return m.set(w,W),W};return {context:L,cacheTokenForPart:()=>`${n}|${g}|${d}|${y.size}`,drawingTokenForParagraph:w=>{let T=p.get(w);if(T?.resourceEpoch===g)return T.token;let N=I(w);if(N.length===0)return p.set(w,{resourceEpoch:g,token:""}),"";let b=N.map(W=>{let _=y.get(W);if(!_)return `${W}:refused`;let F=B(_);return [W,Mu(_),ni(F),String(f.get(_y(_))??0)].join("|")}).sort().join(";");return p.set(w,{resourceEpoch:g,token:b}),b},isCompatibleWith:(w,T)=>{if(w===t)return true;let N=zy(w);if(x&&N&&x.size===N.size){let b=true;for(let[W,_]of x)if(N.get(W)!==_){b=false;break}if(b)return true}let M=cb$1(w,{resolveRelationship:Za$1(T,n)});if(M.size!==y.size)return false;for(let[b,W]of y){let _=M.get(b);if(!_||Mu(_)!==Mu(W))return false}return true},dispose:()=>{l=true,d+=1;for(let w of c.values())w.kind==="ready"&&s(w.validatedHandle);c.clear(),u.clear(),f.clear();}}}var jy=0;function sE(e){let n=e.session.packageRevision(),t=e.session.currentPackage(),r=e.resourceLookup??pb$1(t,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new WeakMap,s=new Map,l=new Map,d=m=>{s.set(m.resourceKey,m);let g=eb$1(m);g&&l.set(m.resourceKey,g);},c=m=>{s.delete(m.resourceKey);let g=l.get(m.resourceKey);g&&(fb$1(g),l.delete(m.resourceKey));},u=(m,g)=>{let y=g.currentPackage().parts.get(m)??a.get(m);if(y)return y;if(m===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${m}`)},f=(m,g)=>{let h=o.get(m);if(h)return h;let y=u(m,g);a.set(m,y);let x=qv({ownerPartName:m,part:y,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:d,forgetReadyHandle:c});return o.set(m,x),jy+=1,i.set(x,jy),x},p=m=>{let g=m.currentPackage();if(g.partBytes===t.partBytes&&g.relationships===t.relationships&&g.contentTypes===t.contentTypes){for(let[y,x]of o){let k=g.parts.get(y)??(y===m.part().name?m.part():void 0);if(k&&x.isCompatibleWith(k,g)){a.set(y,k);continue}x.dispose(),o.delete(y),a.delete(y);}n=m.packageRevision(),t=g;return}for(let y of o.values())y.dispose();o.clear(),a.clear();for(let y of l.values())fb$1(y);l.clear(),s.clear(),e.resourceLookup||r.dispose(),n=m.packageRevision(),t=g,r=e.resourceLookup??pb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return f(e.session.part().name,e.session).context},contextForPart(m){return f(m,e.session).context},cacheTokenForPart(m){let g=f(m,e.session);return `${i.get(g)??0}|${g.cacheTokenForPart()}`},drawingTokenForParagraph(m,g){let h=f(g,e.session);return `${i.get(h)??0}|${h.drawingTokenForParagraph(m)}`},mintValidatedBytes(m,g){return db$1(m,g)},sync(m){m.packageRevision()!==n&&p(m);},dispose(){for(let m of o.values())m.dispose();o.clear(),a.clear();for(let m of l.values())fb$1(m);l.clear(),s.clear(),e.resourceLookup||r.dispose();}})}function $y(e,n,t){if(n===void 0)return Wy(e,t);let r=Gy.get(e);if(r&&r.epoch===n)return r.token;let o=Wy(e,t);return Gy.set(e,{epoch:n,token:o}),o}var Gy=new WeakMap;function Wy(e,n){let t=[],r=o=>{if(o.kind==="paragraph"){let a=n(o);a&&t.push(a);return}if("children"in o)for(let a of o.children)r(a);};return r(e),t.sort().join(";")}var Xy=new WeakMap;function Zv(e){let n=Xy.get(e);if(n!==void 0)return n;let t=Jv(e);return Xy.set(e,t),t}function Jv(e){let n=t=>{if(t.kind==="textValue"||Hc$1(t)||Fc$1(t)!==null)return false;if(t.kind==="text"||t.localName==="t"){for(let r of t.children)if(r.kind==="textValue"&&r.value.trim().length>0)return true;return false}for(let r of t.children)if(r.kind!=="textValue"&&n(r))return true;return false};for(let t of e.children)if(t.kind!=="textValue"&&n(t))return true;return false}function qy(e,n){for(let t of n.resultParagraphIds){let r=Ca$1(e,t);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&Zv(r))return true}return false}var Yy=new WeakMap,Ky=new WeakMap,Uy=new WeakMap;function Lu(e){let n=Yy.get(e);if(n)return n;let t=new Set;for(let r of cd(e))t.add(r.beginParagraphId),t.add(r.endParagraphId);return Yy.set(e,t),t}function Eu(e){let n=Ky.get(e);if(n)return n;let t=new Set;for(let r of cd(e))qy(e,r)||t.add(r.beginParagraphId);return Ky.set(e,t),t}function Nu(e){let n=Uy.get(e);if(n)return n;let t=new Set;for(let r of cd(e))if(!qy(e,r))for(let o of r.resultParagraphIds)t.add(o);return Uy.set(e,t),t}var Qv=4,Au=256;function eT(e){return `txbx-${e}`}var Zy=new WeakMap;function rb(e,n,t,r="all-markup"){if(!n||n.nums.size===0)return;let o=Zy.get(e);if(o&&o.rawIndex===n&&o.styleCascade===t&&o.displayMode===r)return o.listItems;let a=Ya(n,t),i=$c(e,r),s=Js(i,a,t),l=s.size>0?s:void 0;return Zy.set(e,{rawIndex:n,styleCascade:t,displayMode:r,listItems:l}),l}var nT=2e4,tT=Object.freeze({contents:Object.freeze([]),truncated:false}),Jy=new WeakMap;function rT(e){let n=Jy.get(e);if(n)return n;let t=[],r=0,o=false,a=[e];for(;a.length>0;){let s=a.pop();if(r+=1,r>nT){o=true;break}if(s.kind!=="textValue"&&s.localName==="txbxContent"){t.push(s);continue}if("children"in s)for(let l=s.children.length-1;l>=0;l-=1)a.push(s.children[l]);}let i=t.length>0||o?Object.freeze({contents:Object.freeze(t),truncated:o}):tT;return Jy.set(e,i),i}var Qy=1,eb=new WeakMap;function oT(e){let n=eb.get(e);return n===void 0&&(n=Qy,Qy+=1,eb.set(e,n)),n}var nb=new WeakMap;function ob(e,n,t,r="all-markup"){if(!n||n.nums.size===0)return "";let o=rT(e);if(o.contents.length===0&&!o.truncated)return "";let a=nb.get(e);if(a&&a.rawIndex===n&&a.styleCascade===t&&a.displayMode===r)return a.token;let i=[];for(let l of o.contents){let d=rb(l,n,t,r);if(d)for(let[c,u]of d)i.push(`${c}=${u.cacheToken}`);}o.truncated&&i.push(`truncated:${oT(n)}`);let s=i.length===0?"":`|txbxlist:${i.join(",")}`;return nb.set(e,{rawIndex:n,styleCascade:t,displayMode:r,token:s}),s}function hl(e,n){let t=e.textboxStory;if(!t)return null;let r=on(e.extentEmu.cx),o=on(e.extentEmu.cy),a=on(t.insetsEmu.left),i=on(t.insetsEmu.right),s=on(t.insetsEmu.top),l=on(t.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-s-l),u=on(t.strokeWidthEmu),f={fillHex:t.fillHex,strokeHex:t.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((n.depth??0)>=Qv)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:s},...f,fallbackReason:"textbox-nesting-limit"};let m=$c(t.content,n.displayMode),g=rb(t.content,n.numberingIndex,n.styleCascade,n.displayMode),h=eT(e.drawingNodeId),y=0,x=Or(m,0,d,0,0,{measurer:n.measurer,cache:n.cache,producer:`${n.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${h}-line-${y++}`,styleCascade:n.styleCascade,...g?{listItems:g}:{},...n.pageContext?{pageContext:n.pageContext}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...n.displayMode?{displayMode:n.displayMode}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},...n.drawingTokenForParagraph?{drawingTokenForParagraph:n.drawingTokenForParagraph}:{}}),k=x.blocks,B=x.bottom,v,L=[];if(k.length>Au){tb(k.slice(Au),L),k=k.slice(0,Au);let w=k[k.length-1];B=w?w.box.y+w.box.height:0,v="textbox-fragment-limit";}if(B>c+.001){let w=k.filter(T=>T.box.y<c-.001);w.length<k.length&&(tb(k.filter(T=>T.box.y>=c-.001),L),k=w,v=v??"textbox-height-clip");}let I=Math.max(0,c-B),S=t.verticalAnchor==="center"?I/2:t.verticalAnchor==="bottom"?I:0;return {fragments:k,flowHeight:B,contentOffset:{x:a,y:s+S},...f,...v?{fallbackReason:v}:{},...L.length>0?{clippedResourceToken:L.join("!")}:{}}}function tb(e,n){fa({fragments:e},t=>{n.push(ni(t.resource));});}var aT=128,ab=new WeakMap;function iT(e){let n=ab.get(e);if(n!==void 0)return n;let t=y(na(e));return ab.set(e,t),t}function sT(e){let n=Math.max(1,Math.floor(e)),t=new Map;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>n;){let a=t.keys().next();if(a.done)break;t.delete(a.value);}},get size(){return t.size}}}function lT(e,n,t,r,o,a,i,s=aT,l,d=ze,c,u,f,p,m,g){let h=ac(e.root),y=sT(s),x=Ft(e,d),k=vr({numberingIndex:g?.numberingIndex,styleCascade:a},x).listItems,B=iT(e),v,L=I=>{let S=Kt(h)||c?I:void 0,w=S?.pageNumber??p?.pageNumber??1,T=uc(S,h)+(c?`|pn:${w}`:"");if(T===""){if(v)return v}else {let E=y.get(T);if(E)return E}let N=0,M=[],b=()=>{let E=S?.pageNumber??p?.pageNumber??1,O=p?.pageWidth??n,R=p?.pageHeight??Math.max(1,n),V=p?.marginLeft??0,A=p?.marginRight??0,G=p?.marginTop??0,U=p?.marginBottom??0,H=Math.max(1,R-G-U);return Object.freeze({pageNumber:E,pageWidth:O,pageHeight:R,marginLeft:V,marginRight:A,marginBottom:U,contentInsetTop:G,contentInsetBottom:U,contentWidth:n,contentHeight:H,contentBandHeight:H,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},W=Object.freeze([]),_;if(c){let E=false;for(let O=0;O<Rr;O+=1){M.splice(0,M.length),N=0,_=Or(x,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+T+(d===ze?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${N++}`,styleCascade:a,...k?{listItems:k}:{},pageContext:S,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,anchorFrameBase:b,pageContentClip:()=>Aa(b()),layoutTextboxStoryFor:V=>hl(V,{measurer:t,producer:r+T+(d===ze?"":`|rev:${d}`),cache:o,styleCascade:a,...S?{pageContext:S}:{},...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{},...g?.numberingIndex?{numberingIndex:g.numberingIndex}:{}}),collectAnchoredDrawings:V=>{M.push(...V);},columnBoxForParagraph:V=>Object.freeze({x:0,y:V.y,width:n,height:V.height}),pageExclusionZones:()=>W,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{}});let R=Ac(M,c,0,n);if(R.length===0){E=true,W=R;break}if(O>0&&pt(W)===pt(R)){E=true,W=R;break}W=R;}if(!E)throw new ko(`header/footer exclusion reflow did not converge within ${Rr} passes`)}else _=Or(x,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+T+(d===ze?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${N++}`,styleCascade:a,...k?{listItems:k}:{},pageContext:S,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{}});let F={partName:e.name,part:e,contentKey:B,fragments:_.blocks,flowHeight:_.bottom,pageFieldNeeds:h,...M.length>0?{anchoredDrawings:Object.freeze([...M])}:{},withPageContext:E=>!Kt(h)&&!F.anchoredDrawings?.length?v??F:L(E)};return T===""?v=F:y.set(T,F),F};return L(i)}function ti(e,n,t){let r=t-e.box.y,o=u=>({...u,y:u.y+r}),a=u=>{if(!u)return;let f={...u,box:o(u.box),...u.anchoredDrawings?{anchoredDrawings:u.anchoredDrawings}:{}};if(!u.pageFieldProjector)return pc(u,f,r),f;let p=u.pageFieldProjector;return {...f,pageFieldProjector:m=>{let g=p(m);return {...g,box:o(g.box)}}}},i=u=>{if(u)return {...u,box:o(u.box),...u.separator?{separator:{...u.separator,box:o(u.separator.box)}}:{},notes:u.notes.map(f=>({...f,box:o(f.box)}))}},s=a(e.header),l=a(e.footer),d=i(e.footnotes),c=i(e.endnotes);return {...e,id:`page-${n}`,index:n,box:o(e.box),contentBox:o(e.contentBox),...s?{header:s}:{},...l?{footer:l}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}var ib=new WeakMap;function Du(e){let n=ib.get(e);if(n!==void 0)return n;let t=[];_d(e,o=>{let a=o.marker;a&&t.push(`${o.paragraphId}=${a.text}@${a.numFmt}:${a.level}`);});let r=t.length===0?"":`|list:${t.join(",")}`;return ib.set(e,r),r}var sb=new WeakMap;function _u(e){let n=sb.get(e);if(n!==void 0)return n;let t=[];fa(e,o=>{t.push(ni(o.resource)),o.kind==="anchoredDrawing"&&o.textboxStory?.clippedResourceToken&&t.push(`clip:${o.textboxStory.clippedResourceToken}`);});let r=t.length===0?"":`!${t.join("!")}`;return sb.set(e,r),r}function lb(e,n,t){if(!e)return "";let r=(o,a)=>[...a].map(([i,s])=>`${o}${i}=${s.flowHeight}@${s.contentKey}${_u(s)}${Du(s)}`).sort().join(",");return `|hf:${n},${t},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+r("h",e.headers)+";"+r("f",e.footers)}function Hu(e,n,t){return e?.titlePage&&t===0?"first":e?.evenAndOddHeaders&&(n+t+1)%2===0?"even":"default"}function db(e){let{furniture:n,pageHeight:t,marginTop:r,marginBottom:o}=e,a=t*.4,i=new Map,s=(l,d,c)=>Math.min(a,Math.max(c,d?l+d.flowHeight:0));return l=>{if(l===0&&e.continuedPageInsets)return e.continuedPageInsets;let d=Hu(n,e.pageIndexStart,l),c=i.get(d);if(c)return c;let u=s(e.headerDistance,n?.headers.get(d),r),f=s(e.footerDistance,n?.footers.get(d),o),p=Object.freeze({top:u,bottom:f,height:t-u-f});return i.set(d,p),p}}var cb=new WeakMap;function ri(e,n){cb.set(e,n);}function zu(e,n,t,r){return cb.get(e)?.(n,t,r)}var dT=24;function ub(e){let{furniture:n,geometry:t,headerDistance:r,footerDistance:o,pageIndexStart:a}=e,i=c=>({x:0,y:c*(t.height+dT),width:t.width,height:t.height}),s=c=>Hu(n,a,c),l=(c,u,f)=>{if(!n)return;let p=s(u),m=(c==="header"?n.headers:n.footers).get(p);if(!m)return;let g=L=>{let I=c==="header"?f.y+r:f.y+t.height-o-L.flowHeight;return {kind:c,variant:p,partName:L.partName,...L.part?{part:L.part}:{},...L.rId?{rId:L.rId}:{},box:{x:f.x+t.margin.left,y:I,width:e.contentWidth,height:L.flowHeight},fragments:L.fragments,...L.anchoredDrawings?{anchoredDrawings:L.anchoredDrawings}:{}}},h=a+u+1,y={pageNumber:h,pageCount:Math.max(h,e.pageCount()+1),sectionPageCount:u+1},x=m.pageFieldNeeds,B=Kt(x)||(m.anchoredDrawings?.length??0)>0?m.withPageContext(y):m,v=g(B);return Kt(x)?{...v,pageFieldProjector:L=>g(m.withPageContext(L))}:v};return {pageBox:i,variantFor:s,furnitureFor:l,overflowShellAt:(c,u)=>{let f=c-a,p=l("header",f,u),m=l("footer",f,u);return {insets:e.insetsFor(f),...p?{header:p}:{},...m?{footer:m}:{}}}}}function fb(e){if(e.delta===0)return true;let n=e.delta%2===0||!e.evenAndOddHeaders&&!e.parityDependent&&!e.usedPageParity,r=!(e.titlePage||e.continuedInsets)||e.markPageCount>0&&e.delta+e.markPageCount>0;return n&&r&&!e.hasNoteReserves&&!e.hasExclusionZones}var cT="http://schemas.openxmlformats.org/wordprocessingml/2006/main",uT="http://schemas.microsoft.com/office/word/2010/wordml",fT="http://schemas.microsoft.com/office/word/2012/wordml";function pT(e){if(e.kind!=="textValue"){for(let n of e.attributes)if(n.localName==="val"&&n.namespaceUri===cT)return n.value}}function zo(e){for(let n of e.children)if(n.kind!=="textValue"&&(n.kind==="contentControlProperties"||n.localName==="sdtPr"))return n}function Br(e,n){if(e){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function Nt(e,n){let t=Br(e,n);return t?pT(t):void 0}function oi(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function yl(e){if(!e)return "richText";for(let n of e.children){if(n.kind==="textValue")continue;let t=n.kind,r=n.localName,o=n.namespaceUri;if(t==="contentControlDropDownList"||r==="dropDownList")return "dropdown";if(t==="contentControlComboBox"||r==="comboBox")return "comboBox";if(t==="contentControlDate"||r==="date")return "date";if(r==="picture")return "picture";if(t==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(t==="contentControlCheckbox"||r==="checkbox"&&o===uT)return "checkbox";if(r==="repeatingSection"&&o===fT)return "repeatingSection"}return "richText"}function pb(e){let n=(t,r)=>{for(let o of t)if(o.kind!=="textValue"){if(o.kind==="tableRow")return "row";if(o.kind==="tableCell")return "cell";if(o.kind==="paragraph"||o.kind==="table")return "block";if(kc$1(o)&&r<jc$1){let a=n(nc$1(o),r+1);if(a)return a}}return null};return n(nc$1(e),0)??"inline"}function jo(e){let n=mb.get(e);if(n!==void 0)return n;let t=mT(e);return bl!==null&&bl===t?t=bl:bl=t,mb.set(e,t),t}var bl=null,mb=new WeakMap,gb=new WeakMap;function mT(e){let n=(t,r)=>{if(t.kind==="textValue")return "";let o=t.kind==="paragraph"||t.kind==="table"||kc$1(t);if(o){let i=gb.get(t);if(i!==void 0&&i.depth===r)return i.token}let a;if(kc$1(t)){if(r>=jc$1)return "";let i=zo(t),s=[t.id,Nt(i,"alias")??"",Nt(i,"tag")??"",oi(Nt(i,"lock")),yl(i),Br(i,"showingPlcHdr")?"1":"0",Br(i,"dataBinding")?"1":"0"].join(":"),l=nc$1(t).map(d=>n(d,r+1)).filter(d=>d.length>0);a=[s,...l].join("|");}else a=t.children.map(i=>n(i,r)).filter(i=>i.length>0).join("|");return o&&gb.set(t,{depth:r,token:a}),a};return n(e.root,0)}function yb(e,n){let t=[n],r=new Set([n]);for(let o of e.pages)for(let a of [o.header,o.footer])!a?.part||r.has(a.part)||(r.add(a.part),t.push(a.part));return t}var ju=new WeakMap,hb=new WeakMap;function bb(e){if(e.length===1)return ai(e[0]);let n=ju.get(e[0]);if(n&&xl(n.parts,e))return n.index;let t=e.map(d=>ai(d)),r=hb.get(t[0]);if(r&&xl(r.indexes,t))return ju.set(e[0],{parts:e,index:r.index}),r.index;let o=[],a=new Set,i=new Set;for(let d of t){for(let c of d.controls)o.push(c);for(let c of d.neededBlockIds)a.add(c);for(let c of d.neededParagraphIds)i.add(c);}let s=`${[...a].sort().join(",")};${[...i].sort().join(",")}`,l={controls:o,neededBlockIds:a,neededParagraphIds:i,neededToken:s};return hb.set(t[0],{indexes:t,index:l}),ju.set(e[0],{parts:e,index:l}),l}function Sl(e){if(e.kind==="textValue")return e.value.length;if(e.kind==="tab"||e.kind==="hardBreak")return 1;if(e.kind==="runProperties"||e.kind==="paragraphProperties"||e.kind==="generic")return 0;if(kc$1(e)){let t=0;for(let r of nc$1(e))t+=Sl(r);return t}let n=0;for(let t of e.children)n+=Sl(t);return n}var Gu=new WeakMap;function xl(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(e[t]!==n[t])return false;return true}var xb=new WeakMap;function gT(e){for(let n of Ef(e))if(n.root.kind!=="textValue"){for(let t of n.root.children)if(t.kind!=="textValue")return t}return null}function ai(e){let n=Gu.get(e);if(n!==void 0)return n;let t=yT(e),r=gT(e),o=r?xb.get(r):void 0;if(o&&xl(o.lists,t))return Gu.set(e,o.index),o.index;let a=[];for(let d of t)for(let c of d)a.push(c);let i=new Set,s=new Set;for(let d of a){for(let c of d.blockIds)i.add(c);d.paragraphId!==void 0&&s.add(d.paragraphId);}let l={controls:a,neededBlockIds:i,neededParagraphIds:s,neededToken:`${[...i].sort().join(",")};${[...s].sort().join(",")}`};return r&&xb.set(r,{lists:t,index:l}),Gu.set(e,l),l}var hT=Object.freeze([]);function yT(e){let n=[],t=(i,s)=>{for(let l of i){if(l.kind==="paragraph"||l.kind==="table"){s.push(l.id);continue}if(kc$1(l)){t(nc$1(l),s);continue}(l.kind==="tableRow"||l.kind==="tableCell")&&t(l.children,s);}},r=(i,s,l,d,c)=>{let u=l;for(let f of i)if(!(f.kind==="textValue"||f.kind==="paragraphProperties")){if(kc$1(f)){if(d>=jc$1){u+=Sl(f);continue}let p=zo(f),m=oi(Nt(p,"lock")),g=[...c,m],h=u,y=r(nc$1(f),s,u,d+1,g);n.push({control:f,nestingDepth:d,lockStack:g,level:"inline",paragraphId:s,range:{start:h,end:y},blockIds:[]}),u=y;continue}if(f.kind==="hyperlink"){u=r(f.children,s,u,d,c);continue}u+=Sl(f);}return u},o=(i,s,l)=>{for(let d of i){if(d.kind==="textValue")continue;if(d.kind==="paragraph"){r(d.children,d.id,0,s,l);continue}if(d.kind==="table"){for(let h of d.children)h.kind==="tableRow"&&o([h],s,l);continue}if(d.kind==="tableRow"){for(let h of d.children)h.kind==="tableCell"?o(h.children,s,l):kc$1(h)&&o([h],s,l);continue}if(!kc$1(d)||s>=jc$1)continue;let c=zo(d),u=oi(Nt(c,"lock")),f=[...l,u],p=pb(d),m=nc$1(d);if(p==="inline"){o(m,s+1,f);continue}let g=[];t(m,g),n.push({control:d,nestingDepth:s,lockStack:f,level:p,blockIds:g}),o(m,s+1,f);}},a=[];for(let i of Ef(e))if(i.root.kind!=="textValue")for(let s of i.root.children){if(s.kind==="textValue")continue;let l=Sb.get(s);if(l!==void 0){a.push(l);continue}let d=n.length;o([s],0,[]);let c=n.length===d?hT:Object.freeze(n.slice(d));Sb.set(s,c),a.push(c);}return a}var Sb=new WeakMap,Wu=1<<20,Rb=new WeakMap,wb=null,Pb=0;function bT(e){return e!==wb&&(wb=e,Pb+=1),Pb}function xT(e,n,t,r){let o=Rb.get(e);if(o!==void 0&&o.neededStamp===t)return o;let a=[],i=[],s=e.index*Wu,l=0,d=0,c=p=>l===0&&d===0?p:{x:p.x+l,y:p.y+d,width:p.width,height:p.height},u=(p,m)=>{if(m.kind==="paragraph"){n.neededBlockIds.has(m.paragraphId)&&(a.push({pageIndex:p,blockId:m.paragraphId,box:c(m.box)}));let g=n.neededParagraphIds.has(m.paragraphId);for(let h of m.lines){let y=s;if(s=Math.min(s+1,e.index*Wu+Wu-1),!g)continue;let x=Math.max(0,h.box.height-h.leading-(h.trailingSpacing??0));for(let k of h.spans)i.push({pageIndex:p,paragraphId:k.range.paragraphId,start:k.range.start,end:k.range.end,line:y,box:{x:k.box.x+l,y:k.box.y+h.leading+d,width:k.box.width,height:x}});}return}n.neededBlockIds.has(m.tableId)&&(a.push({pageIndex:p,blockId:m.tableId,box:c(m.box)}));for(let g of m.rows)if(!g.isHeaderRepeat)for(let h of g.cells)for(let y of h.blocks)u(p,y);};for(let p of e.fragments)u(e.index,p);for(let p of [e.header,e.footer])if(p){l=p.box.x-e.contentBox.x,d=p.box.y-e.contentBox.y;for(let m of p.fragments)u(e.index,m);}l=0,d=0;let f={neededStamp:t,blocks:a,spans:i};return Rb.set(e,f),f}function ST(e,n,t){let r=bT(n.neededToken),o=new Map,a=new Map,i=new Set;for(let s of e.pages){let l=xT(s,n,r);for(let d of l.blocks){let c=o.get(d.blockId);c?c.push(d):o.set(d.blockId,[d]);}for(let d of l.spans){let c=a.get(d.paragraphId);c?(d.start<c[c.length-1].start&&i.add(d.paragraphId),c.push(d)):a.set(d.paragraphId,[d]);}}return {blocksById:o,spansByParagraph:a,repeatedParagraphs:i}}function RT(e,n,t){let r=new Map,o=new Set;for(let a of e)if(!o.has(a)){o.add(a);for(let i of n.blocksById.get(a)??[]){let s=r.get(i.pageIndex);s?s.push(i.box):r.set(i.pageIndex,[i.box]);}}return [...r.entries()].sort(([a],[i])=>a-i).flatMap(([a,i])=>{let s=ma(i);return s?[{pageIndex:a,box:s}]:[]})}function wT(e,n,t,r){let o=t.spansByParagraph.get(e)??[],a=new Map,i=t.repeatedParagraphs.has(e),s=0,l=o.length;for(;!i&&s<l;){let d=s+(l-s>>1);(n.start===n.end?o[d].end<n.start:o[d].end<=n.start)?s=d+1:l=d;}i&&(s=0);for(let d=s;d<o.length;d+=1){let c=o[d];if(c.end<=n.start)continue;if(c.start>=n.end){if(i)continue;break}let u=a.get(c.line);u?u.boxes.push(c.box):a.set(c.line,{pageIndex:c.pageIndex,boxes:[c.box]});}if(a.size===0&&n.start===n.end){let d=[],c=new Set;for(let u=s;u<o.length;u+=1){let f=o[u];if(f.start>n.start){if(i)continue;break}if(n.start>f.end||c.has(f.pageIndex))continue;c.add(f.pageIndex);let p=f.start===f.end?f.box.x:f.box.x+f.box.width*(n.start-f.start)/Math.max(1,f.end-f.start);if(d.push({pageIndex:f.pageIndex,box:{x:p,y:f.box.y,width:0,height:f.box.height}}),!i)break}if(d.length>0)return d}return [...a.entries()].sort(([d],[c])=>d-c).flatMap(([,d])=>{let c=ma(d.boxes);return c?[{pageIndex:d.pageIndex,box:c}]:[]})}var Ib=new WeakMap;function PT(e){let n=Ib.get(e);if(n!==void 0)return n;let t=zo(e),r=Nt(t,"alias"),o=Nt(t,"tag"),a={...r!==void 0?{alias:r}:{},...o!==void 0?{tag:o}:{},controlType:yl(t),placeholder:Br(t,"showingPlcHdr")!==void 0,bound:Br(t,"dataBinding")!==void 0};return Ib.set(e,a),a}function IT(e,n,t){let r=e.level==="inline"&&e.paragraphId&&e.range?wT(e.paragraphId,e.range,n):RT(e.blockIds,n);return {...Xu(e),fragments:r}}function vT(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];if(r!==o&&(r.pageIndex!==o.pageIndex||r.box.x!==o.box.x||r.box.y!==o.box.y||r.box.width!==o.box.width||r.box.height!==o.box.height))return false}return true}function TT(e,n){return e.id===n.id&&e.alias===n.alias&&e.tag===n.tag&&e.controlType===n.controlType&&e.lock===n.lock&&e.effectiveLock===n.effectiveLock&&e.placeholder===n.placeholder&&e.bound===n.bound&&e.nestingDepth===n.nestingDepth&&e.level===n.level&&vT(e.fragments,n.fragments)}function Go(e,n){if(!e)return n.length===0;if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(!TT(e[t],n[t]))return false;return true}function Vu(e,n){return {revision:e.revision,pages:e.pages,...n.contentControls!==void 0?{contentControls:n.contentControls}:{},...n.controlContextToken!==void 0?{controlContextToken:n.controlContextToken}:{}}}var vb=new WeakMap;function $u(e,n,t=jo(n),r){let o=yb(e,n);if(o.length>1){let f=o.map(p=>jo(p));t=f.some(p=>p!=="")?f.join("|"):"";}if(t===""){let f=e.pages.some(m=>m.contentControls!==void 0&&m.contentControls.length>0);if(!f&&e.controlContextToken===t&&Go(e.contentControls,[]))return e;let p=f?e.pages.map(m=>m.contentControls!==void 0&&m.contentControls.length>0?{...m,contentControls:[]}:m):e.pages;return {revision:e.revision,pages:p,contentControls:[],controlContextToken:t}}let a=bb(o),i=ST(e,a),s=a.controls.map(f=>IT(f,i)),l=new Map;for(let f of s)for(let p of f.fragments){let m=l.get(p.pageIndex),g={...f,fragments:[p]};m?m.push(g):l.set(p.pageIndex,[g]);}if(e.controlContextToken===t&&Go(e.contentControls,s)&&e.pages.every(f=>Go(f.contentControls,l.get(f.index)??[])))return e;let d=false,c=e.pages.map(f=>{let p=l.get(f.index)??[];if(Go(f.contentControls,p)||p.length===0&&!f.contentControls)return f;d=true;let m=vb.get(f);if(m&&Go(m.controls,p))return m.wrapped;let g={...f,contentControls:p};return vb.set(f,{controls:p,wrapped:g}),g}),u=d?c:e.pages;return u===e.pages&&e.controlContextToken===t&&Go(e.contentControls,s)?e:{revision:e.revision,pages:u,contentControls:s,controlContextToken:t}}function kT(e,n){return ai(e).controls.filter(r=>n?r.paragraphId!==void 0?n.has(r.paragraphId):Tb(r.control).some(o=>n.has(o)):true).map(Xu)}function Tb(e){let n=[],t=r=>{for(let o of r)if(o.kind!=="textValue"){if(o.kind==="paragraph"){n.push(o.id);continue}if(kc$1(o)){t(nc$1(o));continue}t(o.children);}};return t(nc$1(e)),n}function CT(e,n){let t=null;for(let r of ai(e).controls)(r.paragraphId===n||r.blockIds.includes(n)||Tb(r.control).includes(n))&&(!t||r.nestingDepth>=t.nestingDepth)&&(t=r);return t?Xu(t):null}function Xu(e){let n=PT(e.control);return {id:e.control.id,...n.alias!==void 0?{alias:n.alias}:{},...n.tag!==void 0?{tag:n.tag}:{},controlType:n.controlType,lock:e.lockStack[e.lockStack.length-1]??"unlocked",effectiveLock:_i(e.lockStack),placeholder:n.placeholder,bound:n.bound,nestingDepth:e.nestingDepth,level:e.level,fragments:[]}}var Rl=4096,Zn=Object.freeze({pageSize:Object.freeze({widthTwips:12240,heightTwips:15840}),margins:Object.freeze({topTwips:1440,rightTwips:1440,bottomTwips:1440,leftTwips:1440,headerTwips:720,footerTwips:720,gutterTwips:0}),columns:Object.freeze({count:1,gapTwips:720,equalWidth:true,separator:false,definitions:Object.freeze([])}),landscape:false,titlePage:false,breakType:"nextPage"});function Yu(e,n,t=31680*2){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<=0||r>t?n:r}function Mr(e,n){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let t=Number(e);return !Number.isFinite(t)||Math.abs(t)>31680?n:t}function Mb(e,n,t=31680){if(e===void 0||!/^\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<0||r>t?n:r}var Ze=(e,n)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes??[])if(t.localName===n)return t.value}},Fr=(e,n)=>{if(e.kind!=="textValue"){for(let t of e.children??[])if(t.kind!=="textValue"&&"localName"in t&&t.localName===n)return t}};function kb(e,n,t){let r=Ze(e,n);return r===void 0?t:r==="0"||r==="false"||r==="off"||r==="no"?false:r==="1"||r==="true"||r==="on"||r==="yes"?true:t}function OT(e){if(!e)return 1;let n=Ze(e,"num");return !n||!/^\d{1,7}$/.test(n)?1:Math.max(1,Math.min(12,Number(n)))}function BT(e,n,t){if(!e||e.kind==="textValue")return [];let r=[];for(let o of e.children??[]){if(r.length>=n||o.kind==="textValue"||!("localName"in o)||o.localName!=="col")continue;let a=r.length;r.push({widthTwips:Yu(Ze(o,"w"),1,31680),gapTwips:a===n-1?0:Mb(Ze(o,"space"),t)});}return r}function MT(e){let n=e?Fr(e,"type"):void 0,t=n?Ze(n,"val"):void 0;return t==="continuous"||t==="evenPage"||t==="oddPage"||t==="nextColumn"?t:"nextPage"}var FT=new Set(["hyphen","period","colon","emDash","enDash"]);function Fb(e){let n=Fr(e,"pgNumType");if(!n||n.kind==="textValue")return;let t={},r=Ze(n,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let s=Number(r);Number.isFinite(s)&&s>=0&&s<=9999&&(t.start=s);}let o=Ze(n,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(t.fmt=o);let a=Ze(n,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let s=Number(a);Number.isFinite(s)&&s>=0&&s<=9&&(t.chapStyle=s);}let i=Ze(n,"chapSep");return i!==void 0&&FT.has(i)&&(t.chapSep=i),t}var Cb=new WeakMap;function wl(e){if(!e)return Zn;let n=Cb.get(e);if(n!==void 0)return n;let t=LT(e);return Cb.set(e,t),t}function LT(e){let n=Fr(e,"pgSz"),t=Fr(e,"pgMar"),r=Fr(e,"cols"),o=Zn,a=n?Ze(n,"orient"):void 0,i=n?Yu(Ze(n,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,s=n?Yu(Ze(n,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,l=Fb(e),d=OT(r),c=r?Mb(Ze(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?kb(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:s},margins:{topTwips:t?Mr(Ze(t,"top"),1440):o.margins.topTwips,rightTwips:t?Mr(Ze(t,"right"),1440):o.margins.rightTwips,bottomTwips:t?Mr(Ze(t,"bottom"),1440):o.margins.bottomTwips,leftTwips:t?Mr(Ze(t,"left"),1440):o.margins.leftTwips,headerTwips:t?Mr(Ze(t,"header"),720):o.margins.headerTwips,footerTwips:t?Mr(Ze(t,"footer"),720):o.margins.footerTwips,gutterTwips:t?Mr(Ze(t,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?kb(r,"sep",false):false,definitions:u?[]:BT(r,d,c)},landscape:a==="landscape"||i>s,titlePage:la$1(e,"titlePg"),breakType:MT(e),...l!==void 0?{pageNumbering:l}:{}}}function ET(e){let n=t=>{if(t.kind!=="textValue"){if(t.kind==="body")return Fr(t,"sectPr");for(let r of t.children??[]){let o=n(r);if(o)return o}}};return n(e.root)}var Ob=new WeakMap;function Pl(e){let n=Ob.get(e);if(n!==void 0)return n??void 0;let t=e.children.find(a=>a.kind==="paragraphProperties"),r=t?Fr(t,"sectPr"):void 0,o=r&&r.kind!=="textValue"?r:void 0;return Ob.set(e,o??null),o}function NT(e){let n=Lb(e);return n[n.length-1]?.properties??Zn}function Lb(e,n="all-markup"){return Eb(e,n).sections}function Eb(e,n="all-markup"){return Ku(e,Ft(e,n))}var Bb=Jf(16);function Ku(e,n){let t=Bb.get(n);if(t&&t.part===e)return t.result;let r=AT(e,n);return Bb.set(n,{part:e,result:r}),r}function AT(e,n){let t=[],r=0,o=false;for(let i=0;i<n.length;i+=1){let s=n[i];if(s.kind!=="paragraph")continue;let l=Pl(s);if(l){if(t.length>=Rl){o=true;continue}t.push({index:t.length,properties:wl(l),blockStart:r,blockEndExclusive:i+1}),r=i+1;}}if(o){if(t.length>0){let i=t[t.length-1];t[t.length-1]={...i,blockEndExclusive:n.length};}return {sections:t,truncated:true}}let a=ET(e);if(r<n.length||t.length===0){if(t.length>=Rl){let i=t[t.length-1];return t[t.length-1]={...i,blockEndExclusive:n.length},{sections:t,truncated:true}}t.push({index:t.length,properties:wl(a),blockStart:r,blockEndExclusive:n.length});}else if(a){if(t.length>=Rl)return {sections:t,truncated:true};t.push({index:t.length,properties:wl(a),blockStart:r,blockEndExclusive:n.length});}return {sections:t,truncated:o}}function Lr(e){let n=id(gd(e.pageSize.widthTwips)),t=id(gd(e.pageSize.heightTwips)),r=id(gd(e.margins.leftTwips+e.margins.gutterTwips)),o=id(gd(e.margins.rightTwips)),a=id(gd(e.margins.topTwips)),i=id(gd(e.margins.bottomTwips));return n-r-o<=0||t-a-i<=0?ga:{width:n,height:t,margin:{top:a,right:o,bottom:i,left:r},headerDistance:id(gd(Math.max(0,e.margins.headerTwips))),footerDistance:id(gd(Math.max(0,e.margins.footerTwips)))}}var Wo=1;function Uu(e,n){let t=Math.max(Wo,n),r=Math.max(1,Math.min(12,Math.floor(e.count))),o=e.definitions??[],a=e.equalWidth===false&&o.length===r&&o.every(c=>c.widthTwips>0),i,s;if(a){i=o.map(p=>Math.max(Wo,id(gd(p.widthTwips)))),s=o.slice(0,-1).map(p=>Math.max(0,id(gd(p.gapTwips))));let c=s.reduce((p,m)=>p+m,0),u=Math.max(r*Wo,t-c),f=i.reduce((p,m)=>p+m,0);if(f>u){let p=u/f;i=i.map(m=>Math.max(Wo,m*p));}}else {let c=Math.max(0,id(gd(e.gapTwips))),u=Math.min(c,Math.max(0,(t-r*Wo)/(r-1||1)));s=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(Wo,(t-s.reduce((p,m)=>p+m,0))/r);i=Array.from({length:r},()=>f);}let l=[],d=0;for(let c=0;c<r;c+=1)l.push(d),d+=i[c]+(s[c]??0);return {count:r,widths:i,gaps:s,lefts:l,separator:e.separator===true&&r>1}}function DT(e,n,t){return ii(e,n,()=>t)}function ii(e,n,t){let r=[],o=null,a=-1,i=-1;for(let s of n){let l=t(s.sectionIndex);if(s.customMarkFollows){r.push({noteId:s.noteId,mark:null});continue}o===null?(o=l.numStart,a=s.sectionIndex,i=s.pageIndex??-1):l.numRestart==="eachSect"&&s.sectionIndex!==a?(o=l.numStart,a=s.sectionIndex):l.numRestart==="eachPage"&&s.pageIndex!==void 0&&s.pageIndex!==i?(o=l.numStart,i=s.pageIndex):l.numRestart==="eachSect"?a=s.sectionIndex:l.numRestart==="eachPage"&&s.pageIndex!==void 0&&(i=s.pageIndex);let d=o;o+=1,r.push({noteId:s.noteId,mark:kt(l.numFmt,d),displayNumber:d});}return r}function Nb(e){let n=new Map;for(let t of e)n.set(t.noteId,t.mark);return n}var Vo=de,si=512,qu=6,_T=1/3;function Ab(e,n){return `note-${e}-${n}`}function HT(e){if(!e)return [];let n=[];for(let t of fe(e.root)){if(n.length>=Vo)break;Yd$1(t)&&n.push(t);}return n}function Db(e,n){if(e){for(let t of fe(e.root))if(Xd$1(t)===n)return t}}function Zu(e,n,t){let r=Vd$1(e),o=Wd$1(e);if(!r||o===null)return null;let a=Md$1(r,o),i=Ns(e),s=Ab(r,o),l=0,d=Math.max(1,n),c=t.maxFlowHeightPt??Number.POSITIVE_INFINITY,u=t.noteMarks?{...t.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},f=t.ownerPartName?t.drawingsForPart?.(t.ownerPartName):void 0,p=vr({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},i).listItems,m=Or(i,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|${a}`,nextLineId:()=>`${s}-line-${l++}`,styleCascade:t.styleCascade,...p?{listItems:p}:{},noteMarks:u,...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{},...f?{inlineDrawingLayout:f.inlineDrawingLayout,...f.drawingTokenForParagraph?{drawingTokenForParagraph:f.drawingTokenForParagraph}:{}}:{}}),g=m.blocks,h=m.bottom,y;if(g.length>si){g=g.slice(0,si);let x=g[g.length-1];h=x?x.box.y+x.box.height:0,y="note-fragment-limit";}if(h>c){let x=[],k=0;for(let B of g){let v=B.box.y+B.box.height;if(v>c+.001&&x.length>0)break;x.push(B),k=v;}g=x,h=k,y=y??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:Xd$1(e),fragments:g,flowHeight:h,...y?{fallbackReason:y}:{}}}function Il(e,n,t,r){if(!e)return null;let o=ge(e.root,n);return o?Zu(o,t,{...r,ownerPartName:e.name}):null}function _b(e,n){return "single"}function Hb(e){let n=Ns(e);if(n.length===0)return true;for(let t of n){if(t.kind!=="paragraph")return false;let r=t.children.find(o=>o.kind==="paragraphProperties");if(Object.keys(It(r)).length>0||!zT(t))return false}return true}function zT(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="paragraphProperties"){if(n.kind==="run"){if(!jT(n))return false;continue}return false}return true}function jT(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="runProperties"&&!(Td$1(n)||Ud$1(n)||Sd$1(n))){if(n.kind==="text"){if(n.children.map(r=>r.value).join("").trim().length>0)return false;continue}return false}return true}function li(e,n,t,r,o,a){let i=_b(),s=Db(e,n);if(s){if(Hb(s))return {kind:n,fragments:[],flowHeight:qu,synthetic:false,ruleStyle:i};let l=Zu(s,t,{...r,...e?{ownerPartName:e.name}:{}});if(l&&l.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return l.flowHeight>d+.001?{kind:n,fragments:[],flowHeight:qu,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:n,fragments:l.fragments,flowHeight:l.flowHeight,synthetic:false}}}return {kind:n,fragments:[],flowHeight:qu,synthetic:true,ruleStyle:i}}function zb(e,n){let t=Math.max(1,e*_T);return {x:0,y:Math.max(0,(n-.75)/2),width:t,height:.75}}function vl(e,n,t,r){if(e.ruleStyle!==void 0||e.synthetic){let o=zb(t,e.flowHeight);return {x:n+o.x,y:r+o.y,width:o.width,height:Math.max(o.height,e.ruleStyle==="double"?2.25:.75)}}return {x:n,y:r,width:t,height:e.flowHeight}}var Qu=8,Qb=4096,ex=256,nx=14,ef=12;function GT(e){let n=[];for(let t of e)n.push(`${t.noteKind}|${t.noteId}|${t.paragraphId}|${t.atomOffset}|${t.customMarkFollows?1:0}|${t.sectionIndex}`);return n.join(";")}function Tl(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function WT(e){return e.drawingsForPart!==void 0&&e.drawingLayoutEpoch===void 0?null:[e.producer,e.defaultTabStopPt??"",e.drawingLayoutEpoch??"",Tl(e.documentFootnoteProps),Tl(e.documentEndnoteProps),e.footnotePropsBySection.map(Tl).join(";"),e.endnotePropsBySection.map(Tl).join(";")].join("\0")}var jb=new WeakMap;function VT(e,n,t){if(!e)return {memo:null,allHits:n,reused:false};let r=WT(t);if(r===null)return e.notes=null,{memo:null,allHits:n,reused:false};let o=GT(n),a=e.notes;if(a&&a.hitsFingerprint===o){let s=jb.get(a);if(a.inputFingerprint===r&&s&&s.footnotesPart===t.footnotesPart&&s.endnotesPart===t.endnotesPart&&s.measurer===t.measurer&&s.cache===t.cache&&s.styleCascade===t.styleCascade&&s.numberingIndex===t.numberingIndex)return {memo:a,allHits:a.allHits,reused:true}}let i={hitsFingerprint:o,inputFingerprint:r,allHits:n,provisionalMarks:df(n,t),finalMarks:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return jb.set(i,{footnotesPart:t.footnotesPart,endnotesPart:t.endnotesPart,measurer:t.measurer,cache:t.cache,styleCascade:t.styleCascade,numberingIndex:t.numberingIndex}),e.notes=i,{memo:i,allHits:n,reused:false}}function $T(e,n){return n>=e.range.start&&n<e.range.end}var Gb=new WeakMap;function tx(e){let n=Gb.get(e);if(n)return n;let t=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){t.push(a);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)r(s.blocks);}};return r(e),Gb.set(e,t),t}var Wb=new WeakMap;function rf(e){let n=Wb.get(e);if(n)return n;let t=new Map;for(let r of e){let o=t.get(r.paragraphId);o?o.push(r):t.set(r.paragraphId,[r]);}return Wb.set(e,t),t}var Vb=new WeakMap;function Cl(e,n,t){let r=tx(e.fragments);if(!t)return n.filter(s=>r.some(l=>hu(l,s.paragraphId,s.atomOffset)));let o=Vb.get(e.fragments);if(o&&o.refIndex===t)return o.result;let a=[],i=new Set;for(let s of r)for(let l of or(s)){let d=t.get(l);if(d)for(let c of d)i.has(c)||hu(s,l,c.atomOffset)&&(i.add(c),a.push(c));}return Vb.set(e.fragments,{refIndex:t,result:a}),a}function rx(){let e=new Map;return {get(n,t,r,o,a,i,s){let d=`${n?.name??"none"}\0${o}\0${t}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=li(n,t,r,i,o,a);return e.set(d,u),u.fallbackReason&&s.push(u.fallbackReason),u}}}function XT(e,n){let t=[];for(let r of e){if(t.length>=Vo)break;t.push({...r,sectionIndex:n.get(r.paragraphId)??0});}return t}function $o(e,n){return e.footnotePropsBySection[n]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function of(e,n){return e.endnotePropsBySection[n]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function ox(e,n){return {measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:e.defaultTabStopPt,projectLink:e.projectLink,projectFieldLink:e.projectFieldLink,documentProperties:e.documentProperties,noteMarks:n,drawingsForPart:e.drawingsForPart}}function YT(e,n){return n===0?e:{...e,box:{...e.box,y:e.box.y+n},...e.shadingBox?{shadingBox:{...e.shadingBox,y:e.shadingBox.y+n}}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:{...e.bottomBorder.box,y:e.bottomBorder.box.y+n}}}:{},...e.borders?{borders:e.borders.map(t=>({...t,box:{...t.box,y:t.box.y+n}}))}:{},...e.marker?{marker:{...e.marker,box:{...e.marker.box,y:e.marker.box.y+n}}}:{},lines:e.lines.map(t=>({...t,box:{...t.box,y:t.box.y+n},spans:t.spans.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}))}}function $b(e,n){return n===0?[...e]:e.map(t=>t.kind==="paragraph"?YT(t,n):{...t,box:{...t.box,y:t.box.y+n}})}function KT(e,n){if(e.lines.length===0)return e.box.y+e.box.height<=n+.001?{head:e,tail:null}:{head:null,tail:e};let t=0;for(;t<e.lines.length;t+=1){let g=e.lines[t];if(g.box.y+g.box.height>n+.001)break}if(t===0)return {head:null,tail:e};if(t>=e.lines.length)return {head:e,tail:null};let r=e.lines.slice(0,t),o=e.lines.slice(t),a=r[r.length-1],i=e.box.y,s=a.box.y+a.box.height,l=e.borders?.filter(g=>g.side!=="bottom"),d={...e,range:{paragraphId:e.paragraphId,start:r[0].range.start,end:a.range.end},spacing:{before:e.spacing.before,after:0},lines:r,box:{...e.box,height:Math.max(0,s-i)},...l&&l.length>0?{borders:l}:{borders:void 0},bottomBorder:void 0,...e.shadingBox?{shadingBox:{...e.shadingBox,height:Math.max(0,s-e.shadingBox.y)}}:{}},c=o[o.length-1],u=o[0].box.y,f=c.box.y+c.box.height,p=e.borders?.filter(g=>g.side!=="top"),m={...e,id:`${e.paragraphId}#f${e.fragmentIndex+1}`,fragmentIndex:e.fragmentIndex+1,range:{paragraphId:e.paragraphId,start:o[0].range.start,end:o[o.length-1].range.end},spacing:{before:0,after:e.spacing.after},lines:o,box:{x:e.box.x,y:u,width:e.box.width,height:Math.max(0,f-u)},marker:void 0,...p&&p.length>0?{borders:p}:{borders:void 0},...e.bottomBorder?{bottomBorder:e.bottomBorder}:{},...e.shadingBox?{shadingBox:{x:e.shadingBox.x,y:u,width:e.shadingBox.width,height:Math.max(0,f-u)}}:{}};return {head:d,tail:m}}function UT(e){let n=0;for(let t of e)n=Math.max(n,t.box.y+t.box.height);return n}function Ol(e,n,t){if(e.flowHeight<=n+.001)return {head:e.fragments,headHeight:e.flowHeight,tail:[],tailHeight:0};if(n<=.001)return {head:[],headHeight:0,tail:e.fragments,tailHeight:e.flowHeight};let r=[],o=0,a=0,i=null;for(let u=0;u<e.fragments.length&&u<si;u+=1){let f=e.fragments[u],p=f.box.y+f.box.height;if(p<=n+.001){r.push(f),o=p,a=u+1;continue}if(f.kind==="paragraph"){let m=KT(f,n);if(m.head)r.push(m.head),o=m.head.box.y+m.head.box.height,i=m.tail,a=u+1;else {let g=t?.fullContentHeight??n,y=f.lines[0]?.box.height??f.box.height;if(r.length===0&&n>=g-.001&&y>g+.001){t?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let x=e.fragments.slice(a),k=x[0]?.box.y??0;return {head:[],headHeight:0,tail:$b(x,-k),tailHeight:Math.max(0,e.flowHeight-k)}}a=u,i=null;}break}a=u;break}let s=[...i?[i]:[],...e.fragments.slice(a)];if(s.length===0)return {head:r,headHeight:o,tail:[],tailHeight:0};let l=s[0]?.box.y??0,d=$b(s,-l),c=UT(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}function qT(e,n){let t="FootnoteReference";if(!n)return {...dt,verticalAlign:"superscript"};let r=Mt([],[{localName:"rStyle",attributes:{val:t}}],n);return Ne(r,n.themeFonts)}function ZT(e,n,t,r){let o=new Set;for(let c of e.values())c&&c.length>0&&o.add(c);let a=Math.max(n.footnotePropsBySection.length,n.endnotePropsBySection.length,1,...t.map(c=>c.sectionIndex+1),...r.map(c=>c.sectionIndex+1)),i=false;for(let c=0;c<a;c+=1){let u=$o(n,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<ef;p+=1){let m=kt(u.numFmt,u.numStart+p);m.length>0&&o.add(m);}}let f=of(n,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<ef;p+=1){let m=kt(f.numFmt,f.numStart+p);m.length>0&&o.add(m);}}}if(!i||o.size===0)return;let s=qT("footnote",n.styleCascade),l,d=-1;for(let c of o){let u=n.measurer.measure(c,s);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(l?.length??0))&&(l=c,d=u);}return l}function ax(e,n,t){let r=ii("footnote",e,s=>$o(t,s)),o=ii("endnote",n,s=>of(t,s)),a=new Map;for(let s of r)a.set(xr("footnote",s.noteId),s.mark);for(let s of o)a.set(xr("endnote",s.noteId),s.mark);let i=ZT(a,t,e,n);return {marks:a,...i?{reservedMarkText:i}:{}}}function Bl(e){let n=0;for(let t of e.fragments)n=Math.max(n,t.box.y+t.box.height);return n}function nf(e){if(e.footnotes===void 0&&e.endnotes===void 0&&e.noteStream===void 0)return e;let{footnotes:n,endnotes:t,noteStream:r,...o}=e;return o}function JT(e,n){if(n.marks.size===0)return e;let t=false,r=e.pages.map(o=>{if(!QT(o.fragments))return o;let a=ix(o.fragments,n);return a===o.fragments?o:(t=true,{...o,fragments:a})});return t?{revision:e.revision,pages:r}:e}var Xb=new WeakMap;function QT(e){let n=Xb.get(e);if(n!==void 0)return n;let t=false,r=o=>{for(let a of o){if(t)return;if(a.kind==="paragraph"){for(let i of a.lines)for(let s of i.spans)if(s.projected&&s.noteNav?.direction==="to-note"){t=true;return}continue}for(let i of a.rows)for(let s of i.cells)r(s.blocks);}};return r(e),Xb.set(e,t),t}function ix(e,n){let t=false,r=e.map(o=>{if(o.kind==="paragraph"){let s=ek(o,n);return s!==o&&(t=true),s}let a=false,i=o.rows.map(s=>{let l=false,d=s.cells.map(c=>{let u=ix(c.blocks,n);return u===c.blocks?c:(l=true,{...c,blocks:u})});return l?(a=true,{...s,cells:d}):s});return a?(t=true,{...o,rows:i}):o});return t?r:e}function ek(e,n){let t=false,r=e.lines.map(o=>{let a=nk(o,n);return a!==o&&(t=true),a});return t?{...e,lines:r}:e}function nk(e,n){let t=false,r=e.spans.map(o=>{let a=tk(o,n);return a!==o&&(t=true),a});return t?{...e,spans:r}:e}function tk(e,n){if(!e.projected||e.noteNav?.direction!=="to-note")return e;let t=n.marks.get(e.noteNav.scopeId);if(t===void 0)return e;let r=t??"";return e.text===r?e:{...e,text:r}}function rk(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function sx(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function ok(e){for(let n=e.length-1;n>=0;n-=1)if(sx(e[n]))return n;return Math.max(0,e.length-1)}function af(e,n,t,r,o,a,i,s){let l=new Map(a),d=n.filter(_=>_.noteKind==="footnote"),c=e.contentBox.width,u=ox(t,r),f=[],p=0,m=Qb,g=a.size>0?"continuationSeparator":"separator",h=Math.max(0,e.contentBox.height),y=s?.separatorCache?s.separatorCache.get(t.footnotesPart,g,c,"footnote",h,u,i):(()=>{let _=li(t.footnotesPart,g,c,u,"footnote",h);return _.fallbackReason&&i.push(_.fallbackReason),_})(),x=Math.max(0,e.contentBox.height-Bl(e)-y.flowHeight),k=Math.max(0,e.contentBox.height-nx-y.flowHeight),B=s?.reserveColumnBudget?k:x,L={fullContentHeight:Math.max(0,e.contentBox.height-y.flowHeight),reasons:i};for(let[_,F]of a){let E=_.match(/^(footnote|endnote):(-?\d+)$/);if(!E||E[1]!=="footnote")continue;let O=Number(E[2]),R=Math.max(0,B-p);if(F.height<=R+.001)f.push({noteKind:"footnote",noteId:O,scopeId:_,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:F.height},fragments:F.fragments}),p+=F.height,l.delete(_);else {let V=Ol({fragments:F.fragments,flowHeight:F.height},R,L);V.head.length>0&&(f.push({noteKind:"footnote",noteId:O,scopeId:_,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:V.headHeight},fragments:V.head}),p+=V.headHeight),V.tail.length>0?l.set(_,{fragments:V.tail,height:V.tailHeight,mark:null}):l.delete(_);}}for(let _ of d){if(f.length>=Vo){i.push("note-count-limit");break}let F=Il(t.footnotesPart,_.noteId,c,u);if(!F){i.push("missing-note-body");continue}let E=r.marks.get(xr("footnote",_.noteId))??null,O=Math.max(0,B-p);if(m-=F.fragments.length,m<0){i.push("note-area-fragment-limit");break}if(F.flowHeight<=O+.001)f.push({noteKind:"footnote",noteId:_.noteId,scopeId:F.scopeId,mark:_.customMarkFollows?null:E,box:{x:e.contentBox.x,y:0,width:c,height:F.flowHeight},fragments:F.fragments}),p+=F.flowHeight;else {let R=Ol(F,O,L);R.head.length>0&&(f.push({noteKind:"footnote",noteId:_.noteId,scopeId:F.scopeId,mark:_.customMarkFollows?null:E,box:{x:e.contentBox.x,y:0,width:c,height:R.headHeight},fragments:R.head}),p+=R.headHeight),R.tail.length>0&&l.set(F.scopeId,{fragments:R.tail,height:R.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:l};let I=y.flowHeight,S=I+p,w=Bl(e),T;o==="beneathText"?T=e.contentBox.y+w:(T=e.contentBox.y+e.contentBox.height-S,T=Math.max(T,e.contentBox.y+w));let N=T+I,M=f.map(_=>{let F={..._,box:{..._.box,y:N}};return N+=_.box.height,F}),b=vl(y,e.contentBox.x,c,T);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:T,width:c,height:S},separator:{kind:g,box:b,fragments:y.fragments,synthetic:y.synthetic,...y.ruleStyle!==void 0?{ruleStyle:y.ruleStyle}:{}},notes:M},nextCarry:l}}function lx(e,n){let t=Math.min(Math.max(n,0),e.length-1);for(;t>0&&e[t].noteStream!==void 0;)t-=1;return t}function ak(e){return n=>{let t=zu(e,n.sectionAnchorIndex,n.landingIndex,n.template.box);return ik(n.template,n.landingIndex,n.noteStream,t)}}function ik(e,n,t,r){let o=r?{x:e.contentBox.x,y:e.box.y+r.insets.top,width:e.contentBox.width,height:r.insets.height}:e.contentBox,a=r?r.header:e.header,i=r?r.footer:e.footer;return {id:`page-${n}`,index:n,box:e.box,contentBox:o,fragments:[],...t?{noteStream:t}:{},...a?{header:a}:{},...i?{footer:i}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+1}}:{}}}function sk(e,n){let t=null,r=false,o=e.map((a,i)=>{if(a.noteStream===void 0)return t=a.index,a;if(t===null)return a;let s=zu(n,t,i,a.box);if(!s)return a;let l=a.box.y+s.insets.top;if(l===a.contentBox.y&&s.insets.height===a.contentBox.height&&s.header?.variant===a.header?.variant&&s.footer?.variant===a.footer?.variant)return a;let c={...a.contentBox,y:l,height:s.insets.height},u=l+c.height,f=a.contentBox.y+a.contentBox.height,p=lk(a,l-a.contentBox.y,u-f);if(!p.fits(l,u))return a;r=true;let{header:m,footer:g,...h}=a;return {...h,contentBox:c,...p.footnotes?{footnotes:p.footnotes}:{},...p.endnotes?{endnotes:p.endnotes}:{},...s.header?{header:s.header}:{},...s.footer?{footer:s.footer}:{}}});return r?o:[...e]}function Yb(e,n){if(n===0)return e;let t=r=>({...r,y:r.y+n});return {...e,box:t(e.box),...e.separator?{separator:{...e.separator,box:t(e.separator.box)}}:{},notes:e.notes.map(r=>({...r,box:t(r.box)}))}}function lk(e,n,t){let r=i=>i.placement==="pageBottom"?t:n,o=e.footnotes?Yb(e.footnotes,r(e.footnotes)):void 0,a=e.endnotes?Yb(e.endnotes,r(e.endnotes)):void 0;return {...o?{footnotes:o}:{},...a?{endnotes:a}:{},fits(i,s){let l=d=>d===void 0||d.box.y>=i-.001&&d.box.y+d.box.height<=s+.001;return l(o)&&l(a)}}}function sf(e,n){let t=new Set;for(let r of tx(e.fragments))t.add(n.get(r.paragraphId)??0);return [...t].sort((r,o)=>r-o)}function dx(e,n,t){for(let r=e.length-1;r>=0;r-=1)if(sf(e[r],t).includes(n))return r;return Math.max(0,e.length-1)}function dk(e,n,t){let r=dx(e,n,t);for(let o=r+1;o<e.length;o+=1){let a=e[o];if(a.noteStream==="footnote-drain"||a.noteStream==="endnote-overflow"||a.fragments.length===0&&(a.footnotes?.notes.length??0)>0)continue;let i=sf(a,t);if(i.length!==0&&!i.includes(n))return o}return e.length}function ck(e){return e.map((n,t)=>n.index===t&&n.id===`page-${t}`?n:{...n,id:`page-${t}`,index:t})}function uk(e){let n=ck(e);return [...Ut({revision:0,pages:n}).pages]}function fk(e,n,t,r,o,a,i,s){let l=new Map(a),d=[];if(n.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};let c=e.contentBox.width,u=ox(t,r),f=s?.separatorKind??"separator",p=O=>O==="footnote"?t.footnotesPart:t.endnotesPart,m=t.endnotesPart??t.footnotesPart,g=Math.max(0,e.contentBox.height),h=s?.separatorCache?s.separatorCache.get(m,f,c,"endnote",g,u,i):(()=>{let O=li(m,f,c,u,"endnote",g);return O.fallbackReason&&i.push(O.fallbackReason),O})(),y=h.flowHeight,x=Bl(e),k=e.endnotes?Math.max(x,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):x,B=rk(e),v=Math.max(0,B-k-y),I={fullContentHeight:Math.max(0,B-y),reasons:i},S=[],w=0,T=Qb;for(let[O,R]of a){let V=O.match(/^(footnote|endnote):(-?\d+)$/);if(!V)continue;let A=V[1],G=Number(V[2]),U=Math.max(0,v-w);if(R.height<=U+.001)S.push({noteKind:A,noteId:G,scopeId:O,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:R.height},fragments:R.fragments}),w+=R.height,l.delete(O);else {let H=Ol({fragments:R.fragments,flowHeight:R.height},U,I);H.head.length>0&&(S.push({noteKind:A,noteId:G,scopeId:O,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:H.headHeight},fragments:H.head}),w+=H.headHeight),H.tail.length>0?l.set(O,{fragments:H.tail,height:H.tailHeight,mark:null}):l.delete(O);}}for(let O=0;O<n.length;O+=1){let R=n[O];if(S.length>=Vo){i.push("note-count-limit"),d.push(...n.slice(O));break}let V=p(R.noteKind),A=Il(V,R.noteId,c,u);if(!A){i.push("missing-note-body");continue}let G=r.marks.get(xr(R.noteKind,R.noteId))??null,U=Math.max(0,v-w);if(T-=A.fragments.length,T<0){i.push("note-area-fragment-limit"),d.push(...n.slice(O));break}if(A.flowHeight<=U+.001)S.push({noteKind:R.noteKind,noteId:R.noteId,scopeId:A.scopeId,mark:R.customMarkFollows?null:G,box:{x:e.contentBox.x,y:0,width:c,height:A.flowHeight},fragments:A.fragments}),w+=A.flowHeight;else {let H=Ol(A,U,I);H.head.length>0&&(S.push({noteKind:R.noteKind,noteId:R.noteId,scopeId:A.scopeId,mark:R.customMarkFollows?null:G,box:{x:e.contentBox.x,y:0,width:c,height:H.headHeight},fragments:H.head}),w+=H.headHeight),H.tail.length>0&&l.set(A.scopeId,{fragments:H.tail,height:H.tailHeight,mark:null}),d.push(...n.slice(O+1));break}}if(S.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};if(S.length===0)return {area:void 0,nextCarry:l,remainingRefs:d};let N=e.contentBox.y+k,M=N+y,b=S.map(O=>{let R={...O,box:{...O.box,y:M}};return M+=O.box.height,R}),W=vl(h,e.contentBox.x,c,N),_=y+w,F=Math.max(0,B-k),E=Math.min(_,F);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:N,width:c,height:E},separator:{kind:f,box:W,fragments:h.fragments,synthetic:h.synthetic,...h.ruleStyle!==void 0?{ruleStyle:h.ruleStyle}:{}},notes:b},nextCarry:l,remainingRefs:d}}function pk(e,n,t,r,o,a,i,s){let l=e,d=n,c=e[lx(e,e.length-1)].index;for(;d.size>0&&a.remaining>0;){let u=l[l.length-1],f=s({template:u,landingIndex:l.length,noteStream:"footnote-drain",sectionAnchorIndex:c}),p=af(f,[],t,r,"pageBottom",d,o,{separatorCache:i}),m=p.area?.notes.length??0;if(d=p.nextCarry,m===0){o.push("note-overflow-stalled"),p.area&&(l=[...l,{...f,footnotes:p.area}],a.remaining-=1);break}l=[...l,{...f,footnotes:p.area}],a.remaining-=1;}return d.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:l,carry:d}}function mk(e,n,t,r,o,a="endnote-overflow"){let i=r({template:t,landingIndex:n,noteStream:a,sectionAnchorIndex:o});return {pages:[...e.slice(0,n),i,...e.slice(n)],pageIndex:n}}function Kb(e,n,t){if(t<=n||n>=e.length)return e;let r=Math.min(t,e.length),o=e[n],a=o.pageFieldSource?.pageNumber??n+1,i=o.pageFieldSource?.format,s=r-n,l=[...e];for(let d=n;d<r;d+=1){let c=l[d];l[d]={...c,pageFieldSource:{pageNumber:a+(d-n),sectionPageCount:s,...i?{format:i}:{}}};}return l}function Ub(e,n,t,r,o,a,i,s,l){if(t.length===0||e.length===0)return e;let d=e[lx(e,n)].index,c=[...e],u=[...t],f=new Map,p=n,m=0,g="separator",h=l?.stopBeforeIndex??Number.POSITIVE_INFINITY,y=l?.sectionStartIndex??n,x=l?.stopBeforeIndex!==void 0,k=l?.separatorCache;for(;u.length>0||f.size>0;){if(p>=c.length||p>=h){if(s.remaining<=0){i.push("note-overflow-page-limit");break}let I=c[Math.min(Math.max(p,1),c.length)-1]??c[c.length-1],S=Math.min(p,h,c.length),w=mk(c,S,I,l.mint,d,"endnote-overflow");c=w.pages,p=w.pageIndex,x&&(h=S+1),m+=1,s.remaining-=1;}let B=c[p];if(!sx(B)){p+=1;continue}let v=fk(B,u,r,o,a,f,i,{separatorKind:g,...k?{separatorCache:k}:{}});f=v.nextCarry,u=v.remainingRefs;let L=v.area?.notes.length??0;if(v.area){let I=c[p];c[p]={...I,endnotes:I.endnotes?{...v.area,notes:[...I.endnotes.notes,...v.area.notes],box:{...v.area.box,y:I.endnotes.box.y,height:I.endnotes.box.height+v.area.box.height}}:v.area};}else {if(f.size===0&&u.length===0)break;if(!v.area&&f.size===0&&u.length>0){p+=1,g="separator";continue}}if(L===0&&(f.size>0||u.length>0)&&B.fragments.length===0&&B.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(f.size>0||u.length>0){g="continuationSeparator",p+=1;continue}break}return (u.length>0||f.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),x?c=Kb(c,y,Math.min(h,c.length)):m>0&&(c=Kb(c,y,c.length)),c}function cx(e,n,t,r,o){let a=o??null,i=new Map,s=[],l=new Map,d=rf(n),c=rx();for(let f of e.pages){let p=nf(f),g=Cl(p,n,d).filter(S=>S.noteKind==="footnote"),h=g[0]?.sectionIndex??0,y=$o(t,h);if(y.pos==="sectEnd"||y.pos==="docEnd")continue;if(a&&l.size===0){let S=a.pageReserve.get(f);if(S&&S.allHits===n&&S.marks===r){for(let w of S.reasons)s.push(w);S.reserve>0&&i.set(f.index,Math.max(i.get(f.index)??0,S.reserve));continue}}let x=Math.max(0,p.contentBox.height-nx),k=l.size===0,B=s.length,{area:v,nextCarry:L}=af(p,g,t,r,y.pos,l,s,{reserveColumnBudget:true,separatorCache:c});l=L;let I=Math.min(v?.box.height??0,x);if(a&&k&&l.size===0&&a.pageReserve.set(f,{allHits:n,marks:r,reserve:I>0?I:0,reasons:s.slice(B)}),I>0){let S=i.get(f.index)??0;i.set(f.index,Math.max(S,I));}}let u=true;for(let f of e.pages){let p=i.get(f.index)??0;if(p<=0)continue;if(Bl(nf(f))+p>f.contentBox.height+.5){u=false;break}}return {reserves:i,stable:u,reasons:s}}function ux(e,n,t,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,s={remaining:ex},l=rf(n),d=rx(),c=ak(e),u=[],f=[];for(let v of e.pages)for(let L of Cl(v,n,l)){let I={noteId:L.noteId,sectionIndex:L.sectionIndex,pageIndex:v.index,customMarkFollows:L.customMarkFollows};L.noteKind==="footnote"?u.push(I):f.push(I);}let p=o?[...u,...f].map(v=>`${v.noteId}|${v.sectionIndex}|${v.pageIndex??""}|${v.customMarkFollows?1:0}`).join(";"):"",m;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===p?m=o.finalMarks.marks:(m=ax(u,f,t),o&&(o.finalMarks={sitesFingerprint:p,marks:m}));let g=new Map,h=new Map,y=[],x=e.pages.map(v=>{let L=Cl(v,n,l),I=L.filter(F=>F.noteKind==="footnote"),S=L.filter(F=>F.noteKind==="endnote");for(let F of S)if(of(t,F.sectionIndex).pos==="sectEnd"){let O=h.get(F.sectionIndex)??[];O.push(F),h.set(F.sectionIndex,O);}else y.push(F);for(let F of I){let E=$o(t,F.sectionIndex);if(E.pos==="sectEnd"){let O=h.get(F.sectionIndex)??[];O.push(F),h.set(F.sectionIndex,O);}else E.pos==="docEnd"&&y.push(F);}if(o&&g.size===0){let F=o.pageAttach.get(v);if(F&&F.allHits===n&&F.marks===m){for(let E of F.reasons)a.push(E);return F.attached}}let w=nf(v),T=I[0]?.sectionIndex??0,N=$o(t,T),M,b=g.size===0,W=a.length;if(N.pos==="pageBottom"||N.pos==="beneathText"){let F=I.filter(O=>{let R=$o(t,O.sectionIndex).pos;return R==="pageBottom"||R==="beneathText"}),E=af(w,F,t,m,N.pos,g,a,{separatorCache:d});M=E.area,g=E.nextCarry;}let _=M?{...w,footnotes:M}:w;return o&&b&&g.size===0&&o.pageAttach.set(v,{allHits:n,marks:m,attached:_,reserve:0,reasons:a.slice(W)}),_}),k=x.length;if(g.size>0){let v=pk(x,g,t,m,a,s,d,c);x=v.pages,g=v.carry;}if(h.size>0&&x.length>0){let v=[...h.keys()].sort((L,I)=>L-I);for(let L of v){let I=h.get(L),S=dx(x,L,i),w=dk(x,L,i),T=S;for(let N=0;N<=S;N+=1)if(sf(x[N],i).includes(L)){T=N;break}x=Ub(x,S,I,t,m,"sectEnd",a,s,{stopBeforeIndex:w,sectionStartIndex:T,separatorCache:d,mint:c});}}return y.length>0&&x.length>0&&(x=Ub(x,ok(x),y,t,m,"docEnd",a,s,{separatorCache:d,mint:c})),x.length!==k&&(x=sk(x,e),x=uk(x)),{layout:JT({revision:e.revision,pages:x},m),fallbackReasons:a,noteMarks:m}}function gk(e){return Ne$1(e).map(n=>({noteKind:n.noteKind,noteId:n.noteId,paragraphId:n.paragraphId,atomOffset:n.atomOffset,customMarkFollows:n.customMarkFollows}))}var qb=new WeakMap;function hk(e,n){return `${n};${e.map(t=>`${t.blockStart}-${t.blockEndExclusive}`).join(",")}`}function yk(e,n){if(e.kind!==n.kind)return false;if(e.kind==="paragraph")return e.id===n.id;let t=tf(e),r=tf(n);if(t.length!==r.length)return false;for(let o=0;o<t.length;o+=1)if(t[o]!==r[o])return false;return true}function bk(e,n,t,r){let o=Ft(e,t),a=hk(n,t),i=r?qb.get(r):void 0;if(i&&i.boundsFingerprint===a&&i.blocks.length===o.length){let l=true;for(let d=0;d<o.length;d+=1){let c=o[d],u=i.blocks[d];if(c!==u&&!yk(c,u)){l=false;break}}if(l)return i.blocks=o,i.map}let s=new Map;for(let l=0;l<n.length;l+=1){let d=n[l];for(let c=d.blockStart;c<d.blockEndExclusive;c+=1){let u=o[c];if(u){if(u.kind==="paragraph"){s.set(u.id,l);continue}for(let f of tf(u))s.set(f,l);}}}return r&&qb.set(r,{blocks:o,boundsFingerprint:a,map:s}),s}var Zb=new WeakMap;function tf(e){let n=Zb.get(e);if(n)return n;let t=[],r=(o,a)=>{if(!(a>32)&&o.kind!=="textValue"){if(o.kind==="paragraph"){t.push(o.id);return}for(let i of o.children)r(i,a+1);}};return r(e,0),Zb.set(e,t),t}function lf(e,n,t){if(!e)return "";let r=[];for(let[o,a]of e){let i=o-n;i>=0&&i<t&&r.push([i,a]);}return r.length===0?"":(r.sort((o,a)=>o[0]-a[0]),`|nr:${r.map(([o,a])=>`${o}=${a}`).join(",")}`)}function Er(e){let n=new Map;for(let[t,r]of e)r>0&&n.set(t,r);return n}function Ju(e,n){let t=Er(e),r=Er(n);if(t.size!==r.size)return false;for(let[o,a]of t)if((r.get(o)??0)!==a)return false;return true}function Jb(e,n){let t=Er(e);for(let[r,o]of n)o<=0||t.set(r,Math.max(t.get(r)??0,o));return t}function kl(e){return [...Er(e)].map(([n,t])=>`${n}=${t}`).sort().join(",")}function fx(e,n,t,r,o){let a=gk(e);if(a.length===0)return t.session&&(t.session.notes=null,t.session.notePageBottomReserves=null),o({...t,noteMarks:void 0,pageBottomReserves:void 0});let i=bk(e,n,t.displayMode??ze,t.session),s=XT(a,i),l=VT(t.session,s,r),d=l.memo,c=l.allHits,u=d?.provisionalMarks??df(c,r),f=t.session?.notePageBottomReserves,p=f?Er(f):new Map,m=[],g=o({...t,noteMarks:u,pageBottomReserves:p}),h=new Set([kl(p)]);for(let x=0;x<Qu;x+=1){let k=cx(g,c,r,u,d);if(m=[...k.reasons],k.stable&&Ju(k.reserves,p))break;let B=k.stable?Er(k.reserves):Jb(p,k.reserves);if(Ju(B,p)){m.push("note-reflow-exhausted");break}let v=kl(B);if(h.has(v)){B=Jb(p,k.reserves);let L=kl(B);if(Ju(B,p)||h.has(L)){m.push("note-reflow-exhausted");break}}p=B,h.add(kl(p)),g=o({...t,noteMarks:u,pageBottomReserves:p}),x===Qu-1&&m.push("note-reflow-exhausted");}let y=ux(g,c,r,{fallbackReasons:m,paragraphSectionIndex:i,memo:d});return t.session&&(t.session.previous=y.layout,t.session.notePageBottomReserves=Er(p)),y.layout}function df(e,n){let t=[],r=[];for(let o of e){let a={noteId:o.noteId,sectionIndex:o.sectionIndex,customMarkFollows:o.customMarkFollows};o.noteKind==="footnote"?t.push(a):r.push(a);}return ax(t,r,n)}function px(e,n){let t=e.projectLink??n.projectLink,r=e.projectFieldLink??n.projectFieldLink,o=e.documentProperties??n.documentProperties;return {...e,...t?{projectLink:t}:{},...r?{projectFieldLink:r}:{},...o?{documentProperties:o}:{}}}var mx=null;function yx(e,n){let t=mx;if(t&&t.base===e&&t.token===n)return t.producer;let r=`${e??"unversioned-measurer"}|cc:${n}`;return mx={base:e,token:n,producer:r},r}var gx=new WeakMap,hx=null;function xk(e,n,t,r,o,a){return e!=null&&e.base===n&&e.noteMarks===t&&e.defaultTabStopPt===r&&e.displayMode===o&&e.pageNumberFormat===a}function bx(e,n,t,r,o,a){let i=n?gx.get(n):hx;if(xk(i,e,t,r,o,a))return i.producer;let s=(e??"unversioned-measurer")+(n?`|sc:${n.cacheToken}`:"")+(t?`|nm:${Km(t)}`:"")+(r!==void 0?`|dts:${r}`:"")+(o===ze?"":`|rev:${o}`)+(a!==void 0?`|pnf:${a}`:""),l={base:e,noteMarks:t,defaultTabStopPt:r,displayMode:o,pageNumberFormat:a,producer:s};return n?gx.set(n,l):hx=l,s}var Sk={kind:"covered",id:"hashed",paragraphId:"covered",fragmentIndex:"covered",range:"hashed",props:"hashed",spacing:"hashed",indent:"hashed",bottomBorder:"hashed",borders:"hashed",shading:"hashed",shadingBox:"hashed",markRevisions:"hashed",markRevision:"covered",markFormatRevision:"hashed",marker:"hashed",tabStops:"hashed",lines:"hashed",box:"hashed"},Rk={kind:"covered",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function Rx(e){return Object.keys(e).filter(n=>e[n]==="hashed")}var wk=Rx(Sk),Pk=Rx(Rk),xx=new WeakMap;function Sx(e){let n=xx.get(e);if(n!==void 0)return n;let t=e.kind==="table"?JSON.stringify(Pk.map(r=>e[r])):JSON.stringify(wk.map(r=>e[r]));return xx.set(e,t),t}function wx(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];if(r!==o&&Sx(r)!==Sx(o))return false}return true}function cf(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(e[t]!==n[t])return false;return true}var Px=Object.freeze([]),Ix=new Map;function vx(e,n){if(e===n)return true;if(e.size!==n.size)return false;for(let[t,r]of e)if(n.get(t)!==r)return false;return true}function Ml(){return {previous:null,checkpoints:[],keys:[],context:"",producer:"",parityDependent:false,startPageParity:0,prepass:null,startLineCounter:0,endLineCounter:0,endCursorY:0,endSpaceAfter:0,endsOpenPage:true,stats:{placed:0,total:0,reusedPages:0,fullPasses:0},balanceLimit:null,multi:null,notePageBottomReserves:null,notes:null}}function Tx(e,n){return [...e].map(([t,r])=>`${t}=${r.flowHeight}`).sort().join(",")}function Ox(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${Tx(e.headers)};f:${Tx(e.footers)}`:""}function Fl(e,n,t){if(e.sectionFurniture)return e.sectionFurniture[n];if(n===t-1)return e.furniture}function Ik(e,n){return e.map((t,r)=>{let o=Lr(t.properties),a=Fl(n,r,e.length),i=t.properties.pageNumbering,s=i?`pn:${i.start??""},${i.fmt??""},${i.chapStyle??""},${i.chapSep??""}`:"pn:",l=t.properties.columns,d=`cols:${l.count},${l.gapTwips},${l.equalWidth===false?0:1},${l.separator?1:0};${(l.definitions??[]).map(c=>`${c.widthTwips}/${c.gapTwips}`).join(",")}`;return [t.properties.breakType,o.width,o.height,o.margin.top,o.margin.right,o.margin.bottom,o.margin.left,o.headerDistance??36,o.footerDistance??36,Ox(a),s,d].join(":")}).join("|")}function vk(e,n,t){if(!e)return null;let r=e.multi;if(r&&r.structureKey===n&&r.sections.length===t)return r;let o={structureKey:n,sections:Array.from({length:t},()=>Ml()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1};return e.multi=o,o}function Tk(e){return e!=="continuous"}function kk(e,n){return e.width===n.width&&e.height===n.height}function Ck(e){let n=e.contentBox.y-e.box.y;return {top:n,bottom:e.box.height-n-e.contentBox.height,height:e.contentBox.height}}function Ok(e,n){if(n.fragments.length===0&&!n.columnSeparators?.length&&!n.anchoredDrawings?.length)return e;let t=e.anchoredDrawings||n.anchoredDrawings?Object.freeze([...e.anchoredDrawings??[],...n.anchoredDrawings??[]]):void 0;return {...e,fragments:n.fragments.length>0?[...e.fragments,...n.fragments]:e.fragments,...(e.columnSeparators?.length||n.columnSeparators?.length)&&{columnSeparators:[...e.columnSeparators??[],...n.columnSeparators??[]]},...t?{anchoredDrawings:t}:{}}}function kx(e,n,t){e.previous=n,e.startLineCounter=0,e.endLineCounter=t,e.keys=[],e.checkpoints=[],e.context="",e.producer="";}var Cx=new WeakMap;function Bk(e,n,t,r,o,a){let i=Cx.get(e);if(i&&i.globalIndex===n&&i.sheetY===t&&i.pageNumber===r&&i.sectionPageCount===o&&i.format===a)return i.published;let s=ti(e,n,t),l=fo([s],r,o,a)[0];return Cx.set(e,{globalIndex:n,sheetY:t,pageNumber:r,sectionPageCount:o,format:a,published:l}),l}function Bx(e,n,t,r,o){let{session:a,...i}=r,s=Ik(n,r),l=vk(a,s,n.length),d=i.cache&&i.retainKeys!==false?i.retainKeys??(i.cache.retentionPassDue?.()??true?new Set:false):false,c=()=>{d&&!i.retainKeys&&i.cache?.retain(d);},u=[],f=[],p=[],m=0,g=0,h=0,y=0,x=0,k=0,B=0,v=true,L=[],I=null,S="",w=1;for(let M=0;M<n.length;M+=1){let b=n[M],W=e.slice(b.blockStart,b.blockEndExclusive),_=Lr(b.properties),F=Fl(r,M,n.length),E=u.length,O=m,R=l?.spans[M],V=Ox(F);if(W.length===0&&!Tk(b.properties.breakType)){p.push({startIndex:E,pageCount:0,sheetY:O,remappedPages:[],sourcePages:[]});continue}let A=M>0&&b.properties.breakType==="continuous"&&u.length>0&&v&&I!==null&&kk(I,_)&&S===V,G=l?.sections[M],U=b.properties.columns.count>1&&n[M+1]?.properties.breakType==="continuous",H=A?Ck(u[u.length-1]):void 0,X=b.properties.pageNumbering?.fmt,Z=A?u[u.length-1]?.pageFieldSource?.format:void 0,j=A&&!Yt("PAGE",Z)?Z:X,K=o(W,t,{...i,retainKeys:d,geometry:_,furniture:F,sectionColumns:b.properties.columns,...U?{balanceColumns:U}:{},lineCounterStart:g,pageIndexStart:A?E-1:E,...A?{flowStartY:k,spaceBeforeCarry:B}:{},...H?{continuedPageInsets:H}:{},...j!==void 0?{bodyPageNumberFormat:j}:{},...G?{session:G}:{}});L.push({startIndex:E,at:K.overflowShellAt}),g=K.lineCounter,k=K.endCursorY,B=K.endSpaceAfter,v=K.endsOpenPage,I=_,S=V,G?(h+=G.stats.placed,y+=G.stats.total):(h+=W.length,y+=W.length);let fe=G!==void 0&&G.stats.placed===0&&G.stats.reusedPages===K.pages.length&&R!==void 0&&R.pageCount===K.pages.length&&R.sourcePages.length===K.pages.length&&R.sourcePages.every((me,Me)=>me===K.pages[Me]),Be=R!==void 0&&R.startIndex===E&&R.sheetY===O&&R.remappedPages.length===K.pages.length,De=b.properties.pageNumbering,ce=De?.start!==void 0?De.start:w,xe=De?.fmt,be=R?.remappedPages[0],Ce=R===void 0||R.remappedPages.length===0||be?.pageFieldSource!==void 0&&be.pageFieldSource.pageNumber===ce&&be.pageFieldSource.sectionPageCount===R.remappedPages.length&&be.pageFieldSource.format===xe,Ie;if(A){let me=u.length-1,Me=u[me],se=Ok(Me,K.pages[0]);if(se!==Me){u[me]=se;let Se=f.lastIndexOf(Me);Se!==-1&&(f[Se]=se);}let _e=[];for(let Se of K.pages.slice(1)){let an=ti(Se,u.length+_e.length,m);_e.push(an),m=an.box.y+an.box.height+24;}let rn=_e.length+1;Ie=fo(_e,ce+1,rn,xe);for(let Se of Ie)u.push(Se),f.push(Se);w=ce+rn;}else if(fe&&Be&&Ce){Ie=R.remappedPages,x+=Ie.length;for(let me of Ie)u.push(me),f.push(me),m=me.box.y+me.box.height+24;w=ce+Ie.length;}else {let me=[];for(let Me of K.pages){let se=Bk(Me,u.length+me.length,m,ce+me.length,K.pages.length,xe);me.push(se),m=se.box.y+se.box.height+24;}Ie=me;for(let Me of Ie)u.push(Me),f.push(Me);w=ce+Ie.length;}p.push({startIndex:E,pageCount:Ie.length,sheetY:O,remappedPages:Ie,sourcePages:K.pages});}if(u.length===0){let M=Lr(n[0]?.properties??Zn),b=o([],t,{...i,retainKeys:d,geometry:M,sectionColumns:n[0]?.properties.columns??Zn.columns});c();let W=Ut({revision:t,pages:b.pages});return ri(W,(_,F,E)=>b.overflowShellAt(F,E)),l&&(l.spans=[],l.previousRemapped=b.pages,l.previousFinalized=W,l.previousPageCount=W.pages.length),a&&(kx(a,W,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),W}let T=Ut({revision:t,pages:u}),N=T;if(l?.previousFinalized&&l.previousPageCount===T.pages.length&&l.previousRemapped.length===f.length){let M=l.previousFinalized.pages,b=l.previousRemapped,W=T.pages.map((_,F)=>f[F]===b[F]&&M[F]?M[F]:_);N={revision:t,pages:W};}return l&&(l.spans=p,l.previousRemapped=f,l.previousFinalized=N,l.previousPageCount=N.pages.length),a&&(kx(a,N,g),a.stats={placed:h,total:y||1,reusedPages:x,fullPasses:a.stats.fullPasses+(h===y&&x===0?1:0)}),ri(N,(M,b,W)=>{let _=L[0];for(let E of L)E.startIndex<=M&&(_=E);return (_??L[L.length-1])?.at(b,W)}),c(),N}function Ll(e=6,n=14){let t=r=>r.fontSizePt/11;return {measure:(r,o)=>r.length*e*t(o)*(o.horizontalScalePercent/100)+r.length*o.characterSpacingPt,lineMetrics:r=>{let o=r.verticalAlign==="baseline"?1:.75,a=n*t(r)*o;return {height:a,baseline:a*.8}}}}var Mk=2;function Fk(e,n){if(!n||n.size===0)return "";let t=[],r=o=>{if(o.kind==="paragraph"){let a=n.get(o.id)?.cacheToken;a&&t.push(a);return}if("children"in o)for(let a of o.children)r(a);};return r(e),t.join(";")}var Mx=new WeakMap,Fx=new WeakMap;function ff(e){if(e===void 0||e.size===0)return "";let n=Fx.get(e);if(n!==void 0)return n;let t=[...e].join(",");return Fx.set(e,t),t}function Lk(e){let n=ff(e.chrome),t=ff(e.placeholder),r=ff(e.suppressed);return n===""&&t===""&&r===""?"":`${n}|${t}|${r}`}function Ek(e,n){let t=n.chrome?.has(e)??false,r=n.placeholder?.has(e)??false,o=n.suppressed?.has(e)??false;return !t&&!r&&!o?"":`${t?1:0}${r?1:0}${o?1:0}`}var Lx=new WeakMap;function Nk(e,n,t){let r=t.displayMode??ze,o=Ft(e,r),a=Ku(e,o).sections,i=jo(e),s={...t,producer:yx(t.producer,i),tocFieldChromeParagraphIds:t.tocFieldChromeParagraphIds??Lu(e),emptyTocPlaceholderParagraphIds:t.emptyTocPlaceholderParagraphIds??Eu(e),emptyTocSuppressedResultParagraphIds:t.emptyTocSuppressedResultParagraphIds??Nu(e)},l=t.drawingSourceOrder;!l&&t.inlineDrawingLayout&&(l=Lx.get(t.inlineDrawingLayout),l||(l=(()=>{let p=new Map;return bb$1(e).forEach((m,g)=>{p.set(m.drawingNodeId,g);}),p})(),Lx.set(t.inlineDrawingLayout,l)));let d=t.session?sy(l?{...s,drawingSourceOrder:l}:s,o,t.session):vr(l?{...s,drawingSourceOrder:l}:s,o),c=p=>{if(a.length>1)return Bx(o,a,n,p,Xo);let m=a[0],g=p.geometry??(m?Lr(m.properties):ga),h=Fl(p,0,a.length)??p.furniture,y=m?.properties.pageNumbering,x=Xo(o,n,{...p,geometry:g,furniture:h,sectionColumns:m?.properties.columns??Zn.columns,...y?.fmt?{bodyPageNumberFormat:y.fmt}:{}}),k=y,B=Vu({revision:x.layout.revision,pages:fo(x.pages,k?.start??1,x.pages.length,k?.fmt)},x.layout),v=Ut(B);return ri(v,(L,I,S)=>x.overflowShellAt(I,S)),p.session&&(p.session.multi=null,p.session.previous=v),v},u=p=>{let m=$u(p,e,i);return t.session&&(t.session.previous=m),m};if(!t.notes)return t.session&&(t.session.notes=null,t.session.notePageBottomReserves=null),u(c(d));let f=px(t.notes,t);return u(fx(e,a,d,f,c))}function Ex(e,n,t,r){let o=`line:${e}:${t}:${n}`;return r===void 0?o:`${o}:occ:${r}`}function Nr(e,n,t){let r=t.geometry,o=r.width-r.margin.left-r.margin.right,a=Uu(t.sectionColumns??Zn.columns,o);if(t.inlineDrawingLayout&&t.drawingExclusionPass===void 0&&!t.drawingExclusionConverged){let C=J=>t.drawingSourceOrder?.get(J),Y=Object.freeze({columnCount:a.count,columnGapPt:a.gaps[0]??0,contentWidth:o,columnLefts:a.lefts,columnWidths:a.widths}),q=new Map,oe=null,Te=false,Pe=new Set,he=t.session?.previous?.pages;if(he){if(q=Dc(he,t.inlineDrawingLayout,t.drawingLayoutEpoch,o,t.drawingSourceOrder,Y),oe=Xo(e,n,{...t,drawingExclusionPass:0,drawingExclusionZonesByPage:q}),oe.pages===he)return oe;let J=Dc(oe.pages,t.inlineDrawingLayout,t.drawingLayoutEpoch,o,t.drawingSourceOrder,Y);if(Rs(q,J))return oe;q=new Map(J),Pe.add(ws(J));}for(let J=0;J<Rr;J+=1){oe=Xo(e,n,{...t,session:void 0,drawingExclusionPass:J,drawingExclusionZonesByPage:q});let ge=Ss(oe.pages,t.inlineDrawingLayout,o,C,Y);if(ge.size===0){Te=true,q=ge;break}let te=ws(ge);if(Pe.has(te)){Te=true,q=ge;break}if(Pe.add(te),J>0&&Rs(q,ge)){Te=true,q=ge;break}q=new Map(ge);}if(!Te)for(let J=0;J<Mk&&!Te;J+=1){oe=Xo(e,n,{...t,session:void 0,drawingExclusionPass:Rr+J,drawingExclusionZonesByPage:q});let ge=Ss(oe.pages,t.inlineDrawingLayout,o,C,Y),te=ws(ge);if(Rs(q,ge)||Pe.has(te)){Te=true,q=ge;break}Pe.add(te),q=new Map(ge);}if(!Te)throw new ko(`wrap exclusion reflow did not converge within ${Rr} passes`);return Xo(e,n,{...t,drawingExclusionConverged:true,drawingExclusionZonesByPage:q})}let i=t.measurer,s$1=t.cache,l=t.styleCascade,d=t.listItems,c=t.defaultTabStopPt,u=t.displayMode??ze,f=u==="all-markup",p=t.tocFieldChromeParagraphIds,m=t.emptyTocPlaceholderParagraphIds,g=t.emptyTocSuppressedResultParagraphIds,h={chrome:p,placeholder:m,suppressed:g},y=Lk(h),x=bx(t.producer,l,t.noteMarks,c,u,t.bodyPageNumberFormat),k=a.widths[0],B=t.furniture,v=r.headerDistance??36,L=r.footerDistance??36,I=t.pageBottomReserves,S=t.session,w=t.lineCounterStart??0,T=lb(B,v,L),N=t.flowStartY??0,M=t.spaceBeforeCarry??0,b=t.pageIndexStart??0,W=db({...B?{furniture:B}:{},pageHeight:r.height,marginTop:r.margin.top,marginBottom:r.margin.bottom,headerDistance:v,footerDistance:L,pageIndexStart:b,...t.continuedPageInsets?{continuedPageInsets:t.continuedPageInsets}:{}}),_=Object.freeze(t.bodyPageNumberFormat!==void 0?{format:t.bodyPageNumberFormat}:{}),F=S?.previous?S.previous.pages.length+1:1/0,E=t.columnRegionBottom,O=`|cols:${a.widths.join(",")};${a.gaps.join(",")};${a.separator?1:0}${E!==void 0?`;bal:${E}`:""}`,R=t.continuedPageInsets,V=R?`|cont:${R.top},${R.height}`:"",A=C=>`${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|fs:${N},${M}${V}${T}${C}${O}`,G=A(lf(I,b,F)),U=b&1,H=false,X=null,Z=()=>{H=true;},j=[],K=ub({...B?{furniture:B}:{},geometry:r,headerDistance:v,footerDistance:L,pageIndexStart:b,contentWidth:o,insetsFor:W,pageCount:()=>j.length}),{pageBox:fe,furnitureFor:Be,overflowShellAt:De}=K,ce=()=>{let C=Math.max(1,W(j.length).height-(I?.get(b+j.length)??0));return E!==void 0&&j.length===0?Math.max(1,Math.min(C,E)):C},xe=(C,Y)=>{let q=C.kind==="paragraph"?t.drawingTokenForParagraph?.(C)??t.drawingLayoutToken??"":C.kind==="table"&&t.drawingTokenForParagraph?$y(C,t.drawingLayoutEpoch,t.drawingTokenForParagraph):"",oe=ob(C,t.numberingIndex,l,u),Te=(C.kind==="table"?Fk(C,d):d?.get(C.id)?.cacheToken??"")+oe,Pe=Mx.get(C);if(Pe&&Pe.contentWidth===Y&&Pe.producer===x&&Pe.drawingToken===q&&Pe.listToken===Te)return Pe.entry;let he;if(C.kind==="table")he={kind:"table",table:C,key:Sr({paragraph:C,properties:oe?[{localName:"txbxList",attributes:{token:oe}}]:[],width:Y,producer:x,...q?{drawingToken:q}:{}})};else {let J=d?.get(C.id),ge=za(C,Y,l,J),{props:te,indent:Re,available:Xe,alignment:Ln,spacing:He,lineSpacing:En,contextualSpacing:fn,styleId:Qn,shading:kn,inheritedRunProperties:zn,markRunProperties:Dr}=ge,jn=Kg(C.children.find(Hr=>Hr.kind==="paragraphProperties"),l),Uo=$d(jn),_r=wa(ge.tabStops,c),pi=_r===ge.tabStops?ge.tabStopsCacheToken:gr(_r);he={kind:"paragraph",paragraph:C,props:te,indent:Re,available:Xe,alignment:Ln,spacing:He,lineSpacing:En,contextualSpacing:fn,styleId:Qn,borders:jn,borderGroupKey:Uo===""?"":`${Uo}@${Re.left},${Re.right}`,shading:kn,inheritedRunProperties:zn,markRunProperties:Dr,tabStops:_r,keeps:Ug(te),...J?{listItem:J}:{},key:Sr({paragraph:C,properties:[...te,...zn,...Dr,{localName:"tabStops",attributes:{token:pi}},...J?[{localName:"list",attributes:{token:J.cacheToken}}]:[],...oe?[{localName:"txbxList",attributes:{token:oe}}]:[]],width:Xe,producer:x,...q?{drawingToken:q}:{}})};}return Mx.set(C,{contentWidth:Y,producer:x,drawingToken:q,listToken:Te,entry:he}),he},be=t.drawingTokenForParagraph===void 0&&t.drawingLayoutToken===void 0?t.drawingLayoutEpoch??"":t.drawingLayoutEpoch??null,Ce=S?.prepass,Ie=Ce!=null&&be!==null&&Ce.drawingEpoch===be&&Ce.producer===x&&Ce.contentWidth===k&&Ce.styleCascade===l&&Ce.listItems===d&&Ce.tocToken===y&&Ce.bodies.length===e.length&&Ce.bodies.every((C,Y)=>C===e[Y]),me=Ie?Ce:Me();function Me(){let C=e.map(te=>xe(te,k)),Y=C.map(te=>te.key),q=C.map(te=>te.kind==="paragraph"&&te.keeps.keepNext),oe=C.map(te=>te.kind==="paragraph"?d?.get(te.paragraph.id)?.markerText:void 0),Te=C.map(te=>te.kind==="paragraph"&&te.contextualSpacing),Pe=C.map(te=>te.kind==="paragraph"?te.styleId:null),he=C.map(te=>te.kind==="paragraph"?te.borderGroupKey:""),J=y===""?[]:C.map(te=>te.kind==="paragraph"?Ek(te.paragraph.id,h):""),ge=Jg(Y,{contextualSpacingAt:te=>Te[te],styleIdAt:te=>Pe[te]??null,borderGroupKeyAt:te=>he[te],tocVerdicts:J,markerTextAt:te=>oe[te],keepsNextAt:te=>q[te]});return {bodies:e,producer:x,contentWidth:k,styleCascade:l,listItems:d,drawingEpoch:be??"",prepared:C,keys:Y,paragraphDocumentOrder:Ny(C,k,l,u),keepsNext:q,markerTexts:oe,tocToken:y,flowKeys:ge}}S&&be!==null&&!Ie&&(S.prepass=me);let{prepared:se,keys:_e,paragraphDocumentOrder:rn,keepsNext:Se,flowKeys:an}=me,Hn=()=>{t.retainKeys!==false&&(t.retainKeys===void 0&&s$1&&!(s$1.retentionPassDue?.()??true)||ig(s$1,t.retainKeys,_e,se.flatMap(C=>C.kind==="table"?[C.table]:[])));},gn=S?.previous??null,Dt=gn!==null&&S!==void 0&&S.context===G&&S.producer===x&&(!S.parityDependent||S.startPageParity===U),yt=a.count===1&&Dt,hn=0;if(Dt){let C=Math.min(an.length,S.keys.length);for(;hn<C&&an[hn]===S.keys[hn];)hn+=1;}let Jn=0;if(yt){let C=Math.min(an.length,S.keys.length)-hn;for(;Jn<C&&an[an.length-1-Jn]===S.keys[S.keys.length-1-Jn];)Jn+=1;}if(Dt&&hn===se.length&&se.length===S.keys.length){let C=Vu({revision:n,pages:gn.pages},gn),Y=w+(S.endLineCounter-S.startLineCounter);return S.previous=C,S.startLineCounter=w,S.endLineCounter=Y,S.startPageParity=U,S.stats={placed:0,total:se.length,reusedPages:gn.pages.length,fullPasses:S.stats.fullPasses},Hn(),{layout:C,pages:C.pages,lineCounter:Y,endCursorY:S.endCursorY,endSpaceAfter:S.endSpaceAfter,endsOpenPage:S.endsOpenPage,overflowShellAt:De}}let we=[],sn=0,D=0,P=()=>a.lefts[sn],z=()=>a.widths[sn],$=()=>({text:{left:P(),width:z()},margin:{left:0,width:o},page:{left:-r.margin.left,width:r.width}}),ee=()=>we.length>D,Q=[],ue=[],le=new Map,ie=N,Ge=N,ve=0,Ae=w,Fe=M,un=[],Ke=()=>({pageCount:j.length,pageFragments:[...we],pendingAnchoredDrawings:[...Q],deferredAnchoredDrawings:ue.length>0?[...ue]:Px,anchorPageDeferCounts:le.size>0?new Map(le):Ix,cursorY:ie,lineCounter:Ae,previousSpaceAfter:Fe,flowColumnIndex:ve}),We=0,de=0,Sn=0,bt=N===0;if(yt&&hn>0&&hn<S.checkpoints.length){let C=S.checkpoints[hn];j.push(...gn.pages.slice(0,C.pageCount)),we=[...C.pageFragments],Q=[...C.pendingAnchoredDrawings],ue=[...C.deferredAnchoredDrawings],le.clear();for(let[Y,q]of C.anchorPageDeferCounts)le.set(Y,q);ie=C.cursorY,ve=C.flowColumnIndex,sn=C.flowColumnIndex,Ae=C.lineCounter,Fe=C.previousSpaceAfter,We=hn,bt=false,Sn=j.length,un.push(...S.checkpoints.slice(0,hn));}let xt=a.count,ir=P,zl=C=>Object.freeze({x:a.lefts[ve]??0,y:C.y,width:a.widths[ve]??k,height:C.height}),jl=()=>{let C=W(j.length);return Object.freeze({pageNumber:b+j.length+1,onPageParityRead:Z,pageWidth:r.width,pageHeight:r.height,marginLeft:r.margin.left,marginRight:r.margin.right,marginBottom:r.margin.bottom,contentInsetTop:C.top,contentInsetBottom:C.bottom,contentWidth:k,contentHeight:ce(),contentBandHeight:C.height,ownerPartName:t.inlineDrawingLayout?.ownerPartName??s,storyKind:"body"})},xf=()=>Aa(jl()),Gl=C=>t.drawingSourceOrder?.get(C),ui=C=>{if(C.length===0)return;for(let q of C)Q.some(oe=>oe.drawingNodeId===q.drawingNodeId)||Q.push(q.sourceOrder===void 0&&Gl(q.drawingNodeId)!==void 0?Object.freeze({...q,sourceOrder:Gl(q.drawingNodeId)}):q);if(!t.inlineDrawingLayout)return;let Y=Mg(Q,{pageBottom:ce()});if(Q.splice(0,Q.length,...Y.drawings),Y.deferred.length>0)for(let q of Y.deferred){let oe=(le.get(q.drawingNodeId)??0)+1;le.set(q.drawingNodeId,oe),oe>=Bc?Q.push(Nc(q,"page-defer-exhausted")):ue.push(q);}},Sf=()=>{if(ue.length===0)return;let C=ue.map(Y=>Lc(Y,ie-Y.y));ue=[],ui(C);},Ar=()=>{let C=j.length,Y=fe(C),q=Be("header",C,Y),oe=Be("footer",C,Y),{usedBottom:Te,hasBodyPageFields:Pe}=fc(we,Ge),he=W(C);j.push({id:`page-${C}`,index:C,box:Y,contentBox:{x:Y.x+r.margin.left,y:Y.y+he.top,width:o,height:he.height},fragments:we,hasBodyPageFields:Pe,...a.separator?{columnSeparators:a.gaps.map((J,ge)=>({x:a.lefts[ge]+a.widths[ge]+J/2-.375,y:Ge,width:.75,height:Math.max(0,Te-Ge)}))}:{},...Q.length>0?{anchoredDrawings:Bg(Q)}:{},...q?{header:q}:{},...oe?{footer:oe}:{}}),we=[],Q=[],ie=0,sn=0,ve=0,Ge=0,D=0;},SS=(C,Y)=>{if(C.kind!=="paragraph"||C.listItem!==void 0||C.shading!==void 0)return false;let{top:q,bottom:oe,left:Te,right:Pe,between:he}=C.borders;if(q??oe??Te??Pe??he)return false;let J=t.inlineDrawingLayout;return J&&Mn(C.paragraph,J).length>0?false:Y.every(ge=>ge.drawings.length===0&&!ge.pageBreakAfter&&!ge.columnBreakAfter&&ge.spans.every(te=>te.text.length===0))},fi=()=>{if(sn+1<a.count){sn+=1,ve=sn,ie=Ge,Fe=0,D=we.length;return}Ar(),Sf();},Rf=C=>hl(C,{measurer:i,producer:x,cache:s$1,styleCascade:l,...c!==void 0?{defaultTabStopPt:c}:{},...u?{displayMode:u}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.numberingIndex?{numberingIndex:t.numberingIndex}:{},inlineDrawingLayout:t.inlineDrawingLayout,drawingTokenForParagraph:t.drawingTokenForParagraph}),RS={measurer:i,cache:s$1,producer:x,onCellBreakKey:C=>{X?.push(C);},nextLineId:(C,Y,q,oe)=>(Ae+=1,Ex(C,Y,q,oe)),pageOccurrenceKey:()=>String(j.length),styleCascade:l,listItems:d,...c!==void 0?{defaultTabStopPt:c}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},bodyPageFields:_,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:t.drawingLayoutToken?{drawingLayoutToken:t.drawingLayoutToken}:{},...t.inlineDrawingLayout?{anchorFrameBase:jl,pageContentClip:xf,layoutTextboxStoryFor:Rf,publishAnchoredDrawings:ui,collectAnchoredDrawings:ui,columnBoxForParagraph:zl,pageExclusionZones:()=>t.drawingExclusionZonesByPage?.get(j.length)??Object.freeze([]),paragraphOrderIndex:C=>rn.get(C),onAnchorShift:(C,Y)=>kc(Q,C,Y),onAnchorRepublish:(C,Y)=>{for(let q=Q.length-1;q>=0;q-=1)Q[q].anchorParagraphId===C&&Q.splice(q,1);Q.push(...Y);}}:{},borderOwnershipBudget:Ds(),vMergeResolveBudget:vu(),displayMode:u},Wl=C=>el(d?.get(C.paragraph.id)??C.listItem,C.indent,i,C.tabStops,C.available),Vl=(C,Y,q=0)=>{let oe=C.paragraph.id,Pe=!(m?.has(oe)??false)&&((p?.has(oe)??false)||(g?.has(oe)??false)),he=C.available,J=ir(),te=(t.drawingExclusionZonesByPage?.get(j.length)??Object.freeze([])).filter(En=>{let fn=rn.get(C.paragraph.id),Qn=rn.get(En.anchorParagraphId);if(fn!==void 0&&Qn!==void 0){if(Qn>fn)return false}else {let kn=se.findIndex(zn=>zn.kind==="paragraph"&&zn.paragraph.id===En.anchorParagraphId);if(kn<0||kn>Y)return false}return !(xt>1&&En.columnIndex!==ve)}),Re=pt(te),Xe=t.drawingTokenForParagraph?.(C.paragraph)??t.drawingLayoutToken??(t.inlineDrawingLayout?"drawing":void 0),Ln=s$1&&!Pe?Re||Xe?Sr({paragraph:C.paragraph,properties:C.props,width:he,producer:x,...Xe?{drawingToken:Xe}:{},...Re?{exclusionToken:`${ve}|${ie.toFixed(3)}|${Re}`}:{},...q>0?{startOffset:q}:{}}):q===0?C.key:`${C.key}|from:${q}`:null,He=xt>1;return ks(C.paragraph,oe,C.indent.left,he,i,s$1,Ln,C.inheritedRunProperties,C.tabStops,void 0,l?(En,fn)=>Mt(En,fn,l):void 0,{lineSpacing:C.lineSpacing,equationCacheToken:x,firstLineOffset:q===0?Wl(C):0,startOffset:q,marginExtent:{left:0,right:C.indent.left+he+C.indent.right},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},bodyPageFields:_,displayMode:u,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},contentLeft:He?J:0,contentRight:He?J+z():C.indent.left+he+C.indent.right,paragraphStartY:ie,...te.length>0?{pageExclusionZones:te}:{},...Pe?{suppressEmptyPlaceholderLine:true}:{},...l?{themeFonts:l.themeFonts}:{},markRunProperties:C.markRunProperties})},wf=(C,Y)=>(t.drawingExclusionZonesByPage?.get(j.length)??Object.freeze([])).filter(oe=>{let Te=rn.get(C.paragraph.id),Pe=rn.get(oe.anchorParagraphId);if(Te!==void 0&&Pe!==void 0){if(Pe>Te)return false}else {let he=se.findIndex(J=>J.kind==="paragraph"&&J.paragraph.id===oe.anchorParagraphId);if(he<0||he>Y)return false}return !(xt>1&&oe.columnIndex!==ve||oe.anchorParagraphId===C.paragraph.id&&oe.input.mode==="topAndBottom")}),Pf=(C,Y,q,oe,Te,Pe,he)=>{let J=wf(C,Y);if(!t.inlineDrawingLayout||oe<=Te)return J;let ge=Yn(C.paragraph),te=new Map,Re=0;for(let fn=Te;fn<oe;fn+=1){let Qn=q[fn];for(let zn of ge.values())zn>=Qn.start&&zn<Qn.end&&te.set(zn,Re);let kn=he.get(fn)??q[fn].exclusionSkipBefore??0;Re+=kn+q[fn].height;}if(te.size===0)return J;let Xe=xt>1,Ln=C.available,He=ir(),En=xs({paragraph:C.paragraph,paragraphId:C.paragraph.id,drawingLayout:t.inlineDrawingLayout,contentLeft:Xe?He:0,contentRight:Xe?He+z():C.indent.left+Ln+C.indent.right,paragraphStartY:Pe,anchorLineTopByModelStart:te,columnIndex:ve,displayMode:u});return Object.freeze([...J,...En])},wS=(C,Y,q,oe,Te,Pe,he,J)=>{if(t.inlineDrawingLayout){let Xe=[...Yn(C.paragraph).values()];if(Xe.length>0){let Ln=Math.min(...Xe);if(he.end<=Ln||Xe.some(He=>He>=he.start&&He<he.end)&&he.end<=Ln+1)return 0}}let ge=Pf(C,Y,q,oe,Te,Pe,J),te=ge.length>0?mt(ie,he.height,ge):0,Re=he.exclusionSkipBefore??0;return te>.001?te:Re},PS=C=>{let Y={cursorY:ie,columnWidth:z,columnLeft:P,contentHeight:ce,advanceColumn:()=>{ie=Y.cursorY,fi(),Y.cursorY=ie;},anchorFrames:$,styleCascade:l,displayMode:u,deps:RS,shiftAnchor:(q,oe)=>kc(Q,q,oe),publishFragment:q=>we.push(q)};Dy(C,Y),ie=Y.cursorY;},_t=false,$l=se.length,Xl=0;for(let C=We;C<se.length;C+=1){let Y=xe(e[C],z());if(un[C]=Ke(),yt&&Jn>0&&C>=se.length-Jn){let re=S.checkpoints[C+(S.keys.length-se.length)];if(re&&re.cursorY===ie&&re.previousSpaceAfter===Fe&&re.flowColumnIndex===ve&&wx(re.pageFragments,we)&&cf(re.pendingAnchoredDrawings,Q)&&cf(re.deferredAnchoredDrawings,ue)&&vx(re.anchorPageDeferCounts,le)){let ae=j.length-re.pageCount;if(fb({delta:ae,titlePage:B?.titlePage===true,evenAndOddHeaders:B?.evenAndOddHeaders===true,parityDependent:S.parityDependent,usedPageParity:H,markPageCount:re.pageCount,continuedInsets:R!==void 0,hasNoteReserves:I!==void 0,hasExclusionZones:(t.drawingExclusionZonesByPage?.size??0)>0})){let Cn=ae===0?gn.pages.slice(re.pageCount):gn.pages.slice(re.pageCount).map((yn,et)=>ti(yn,j.length+et,fe(j.length+et).y));j.push(...Cn),Sn+=Cn.length,_t=true,$l=C,Xl=ae,Ae+=S.endLineCounter-re.lineCounter;break}}}if(de+=1,Y.kind==="table"){Fe=0,X=[];try{PS(Y.table),ag(Y.table,X);}finally{X=null;}continue}let{paragraph:q,props:oe,spacing:Te,contextualSpacing:Pe,styleId:he,borders:J,shading:ge,keeps:te}=Y,{indent:Re,alignment:Xe,markRunProperties:Ln}=Y,He=Y.available,En=C>0?se[C-1]:void 0,fn=se[C+1],Qn=re=>re?.kind==="paragraph"&&re.styleId===he&&he!==null,kn=Pe?{before:Qn(En)?0:Te.before,after:Qn(fn)?0:Te.after}:Te,zn=d?.get(q.id)??Y.listItem,Dr=Wl(Y),jn=q.id,Uo=Y.borderGroupKey,_r=re=>Uo!==""&&re?.kind==="paragraph"&&re.borderGroupKey===Uo,pi=_r(En),Hr=_r(fn),qo=pi?void 0:J.top,zr=Hr?J.between:J.bottom,sr=Vt(qo),Bf=Vt(zr);zd(oe)&&(we.length>0||j.length===0)&&(Ar(),Fe=0);let Je=Vl(Y,C);if(Je.length===0)continue;let vS=Pl(q)!==void 0&&SS(Y,Je),Mf=()=>vS&&E===void 0&&sn+1>=a.count,Yl=re=>{let ae=xe(q,z());ae.kind==="paragraph"&&(Re=ae.indent,Xe=ae.alignment,He=ae.available,Ln=ae.markRunProperties,Dr=re===0?Wl(ae):0,Je=[...Vl(ae,C,re)]);};{let re=io(kn.before,Fe),ae=Ln.length===0?dt:Ne(Ln,l?.themeFonts),pn=Je.length<=1?Bf+kn.after:0,Cn=ie+re+sr,yn=Pf(Y,C,Je,0,0,Cn,new Map),et=Je[0]?_c(Cn,Je[0],yn,pn):i.lineMetrics(ae).height+pn,zt=re+sr+et;if(te.keepNext&&!Se[C-1]){let Qe=Zg(se,C,Fe,St=>{let nt=se[St];return nt?.kind==="paragraph"?Vl(nt,St).map(Gn=>Gn.height):[]});Qe!==null&&Qe+sr<=ce()&&(zt=Math.max(zt,Qe+sr));}ie+zt>ce()&&ie>0&&!Mf()&&(fi(),Fe=0,Yl(0));}let TS=ie===0&&!ee(),Kl=Xd(kn.before,Fe,TS,bt);Kl>0&&(ie+=Kl),sr>0&&(ie+=sr),bt=false;let lr=0,Le=[],Ff=Je[0]?.start??0,jr=Kl,dr=sr,Ul=false,Zo=ie,Lf=0,mi=new Map;Fe=0;let Ef=t.inlineDrawingLayout!==void 0&&Mn(Y.paragraph,t.inlineDrawingLayout).length>0,Nf=false,ql=null,kS=br(Y.paragraph),Af=Es(Y.paragraph),Df=Af?Fs(Af):null,CS=()=>{let re=Le[0];if(!re)return 0;let ae=Lf;if(ae<=.001)return 0;let pn=mt(Zo,re.box.height,wf(Y,C));return Math.max(0,ae-pn)},gi=re=>{if(Le.length===0)return;let ae=P(),pn=ir(),Cn=Le[0].box.y,yn=Cn-jr-dr,et=Le[Le.length-1].box.y+Le[Le.length-1].box.height,zt=re?kn.after:0,Qe=[],St,nt=Cn,Gn=et,jt=J.left?wn(J.left):0,Qo=J.right?wn(J.right):0,Gr=J.left?ae+Re.left-J.left.spacePt-jt:ae+Re.left,Jl=J.right?ae+Re.left+He+J.right.spacePt+Qo:ae+Re.left+He,Wr=Math.max(Jl-Gr,0);if(dr>0&&qo){let ln=wn(qo),tt=Cn-qo.spacePt-ln;Qe.push({side:"top",edge:qo,box:{x:Gr,y:tt,width:Wr,height:ln}}),nt=tt;}if(re&&zr){let ln=wn(zr),tt=et+zr.spacePt,Gt={x:Gr,y:tt,width:Wr,height:ln};Qe.push({side:Hr?"between":"bottom",edge:zr,box:Gt}),Hr||(St={edge:zr,box:Gt}),Gn=tt+ln;}re&&(ie=Math.max(ie,Gn+zt));let Vr=Math.max(Gn+zt-yn,0),Oe=pi&&lr===0?yn:nt,Rt=Hr&&re?yn+Vr:Gn,$r=Math.max(Rt-Oe,0);if(J.left&&Qe.push({side:"left",edge:J.left,box:{x:ae+Re.left-J.left.spacePt-jt,y:Oe,width:jt,height:$r}}),J.right&&Qe.push({side:"right",edge:J.right,box:{x:ae+Re.left+He+J.right.spacePt,y:Oe,width:Qo,height:$r}}),J.bar){let ln=wn(J.bar);Qe.push({side:"bar",edge:J.bar,box:{x:ae+Re.left-J.bar.spacePt-ln,y:Cn,width:ln,height:Math.max(et-Cn,0)}});}let Xr=Df?Ls(Le,Df):null,Yr=lr===0?nl(zn,i,Le[0]?{y:Le[0].box.y,height:Le[0].box.height}:void 0):void 0,hi=Yr?{...Yr,box:{...Yr.box,x:Yr.box.x+ae}}:void 0;if(we.push({kind:"paragraph",id:`${jn}#f${lr}`,paragraphId:jn,fragmentIndex:lr,range:Xr?Xr[Xr.length-1].range:{paragraphId:jn,start:Ff,end:Le[Le.length-1].range.end},props:oe,spacing:{before:jr,after:zt},indent:Re,...St?{bottomBorder:St}:{},...Qe.length>0?{borders:Qe}:{},...ge===void 0?{}:{shading:ge,shadingBox:J.left||J.right?{x:Gr,y:nt,width:Wr,height:Math.max(Gn-nt,0)}:Sa(Le,ae+Re.left,He)},tabStops:Y.tabStops,...hi?{marker:hi}:{},...re&&f?ls(kS,So(Y.paragraph)):{},lines:Xr??Le,box:{x:pn+Re.left,y:yn,width:He,height:Vr}}),t.inlineDrawingLayout&&Ef&&!Nf){Nf=true;let ln=[...Yn(Y.paragraph).values()],tt=ln.length>0&&ln.every(On=>Le.some(cr=>On>=cr.range.start&&On<cr.range.end)),Gt,yi,Ql;if(tt){let On=yn-CS();Gt=Le,yi={x:pn+Re.left,y:On,width:He,height:Vr},Ql=zl({x:pn+Re.left,y:On,height:Vr});}else {let On=ql??{columnX:pn,columnWidth:z(),startY:yn},cr=On.startY;Gt=Je.map((Wn,OS)=>{let BS={id:`anchor-line-${OS}`,range:{paragraphId:jn,start:Wn.start,end:Wn.end},box:{x:On.columnX+Re.left,y:cr,width:He,height:Wn.height},contentX:Wn.spans.length>0?Wn.spans[0].box.x+On.columnX:On.columnX+Re.left,baseline:Wn.baseline,leading:Wn.leading,trailingSpacing:Wn.trailingSpacing,spans:Wn.spans.map(ed=>({...ed,box:{...ed.box,x:ed.box.x+On.columnX,y:cr}}))};return cr+=Wn.height+(Wn.exclusionSkipBefore??0),BS});let _f=On.startY;yi={x:On.columnX+Re.left,y:_f,width:He,height:Math.max(cr-_f,Le[0]?.box.height??0)},Ql=zl(yi);}ui(nr({paragraph:Y.paragraph,paragraphId:jn,paragraphBox:yi,lines:Gt,drawingLayout:t.inlineDrawingLayout,frameBase:jl(),columnBox:Ql,cellBox:null,pageClip:xf(),measurer:i,sourceOrderOf:Gl,layoutTextboxStory:Rf,displayMode:u}));}lr+=1,Ff=Le[Le.length-1].range.end,Le=[],jr=0,dr=0;},Ht=0,Zl=0,Jo=Je.length+8;for(let re=0;re<Je.length;re+=1){let ae=Je[re],pn=re===Je.length-1,Cn=pn?Bf+kn.after:0;re===Ht&&(Zo=ie,Ef&&ql===null&&lr===0&&(ql=Object.freeze({columnX:ir(),columnWidth:z(),startY:Zo})));let yn=wS(Y,C,Je,re,Ht,Zo,ae,mi),et=yn+Math.max(0,ae.height-ae.trailingSpacing)+Cn;if(ie+et>ce()&&!Mf()&&(Le.length>0||we.length>0||j.length>0)){let Oe=!ee(),Rt=Zl<Jo?qg(re,Ht,Je.length,te,Oe):re,$r=Rt<re;for(let ln=re;ln>Rt;ln-=1){Le.pop();let tt=Je[ln-1],Gt=mi.get(ln-1)??tt.exclusionSkipBefore??0;mi.delete(ln-1),ie-=tt.height+Gt,Ae-=1;}let Xr=$r&&Le.length===0&&lr===0,Yr=Je[Rt].start,hi=z();if(gi(false),fi(),jr=0,Xr?ie=dr:dr=0,z()!==hi){Yl(Yr),Jo=Math.max(Jo,Je.length+8),Ht=0,$r&&(Zl+=1),re=-1;continue}if(Ht=Rt,Zo=ie,$r){Zl+=1,re=Rt-1;continue}}let Qe=ir();mi.set(re,yn),ie+=yn;let St=Qe+Re.left+(re===0?Dr:0),nt=Math.max(1,He-(re===0?Dr:0)),Gn=ae.spans.map(Oe=>({...Oe,range:{...Oe.range,paragraphId:jn},box:{...Oe.box,x:Oe.box.x+Qe,y:ie}})),jt=vs(Gn,i,St,nt,Xe,pn,Xe==="center"||Xe==="right"?ae.width:void 0),Qo=Gn.length>0&&jt.length>0?jt[0].box.x-Gn[0].box.x:Xe!=="left"&&Xe!=="both"?(()=>{let Oe=nt-ae.width;return Oe<=0?0:Xe==="center"?Oe/2:Oe})():0,Gr=Object.freeze({x:0,y:0,width:k,height:ce()}),Jl=ae.drawings.map(Oe=>{let Rt=Object.freeze({...Oe,paragraphId:jn,x:Qe+Oe.x,y:ie+Oe.y,advanceStart:Oe.advanceStart+Qe,advanceEnd:Oe.advanceEnd+Qe,paintBounds:Object.freeze({...Oe.paintBounds,x:Qe+Oe.paintBounds.x,y:ie+Oe.paintBounds.y}),hitBounds:Object.freeze({...Oe.hitBounds,x:Qe+Oe.hitBounds.x,y:ie+Oe.hitBounds.y})});return bs(Rt,Gr)}),Wr=Ts(Jl,Qo),Vr={id:Ex(q.id,ae.start,re),range:{paragraphId:jn,start:ae.start,end:ae.end},spans:jt,box:{x:ir()+Re.left,y:ie,width:He,height:ae.height},contentX:jt[0]?.box.x??St+Qo,baseline:ae.baseline,leading:ae.leading,trailingSpacing:ae.trailingSpacing,...ae.deletedRanges?{deletedRanges:ae.deletedRanges}:{},...Wr.length>0?{drawings:Wr}:{},...ae.anchorRevisions?{anchorRevisions:ae.anchorRevisions}:{}};if(Ae+=1,Le.length===0&&(Lf=yn),Le.push(Vr),ie+=ae.height,ae.columnBreakAfter){let Oe=z();if(gi(pn),fi(),jr=0,dr=0,Ul=true,!pn&&z()!==Oe){Yl(ae.end),Jo=Math.max(Jo,Je.length+8),Ht=0,re=-1;continue}Ht=re+1;}else ae.pageBreakAfter&&(gi(pn),Ar(),jr=0,dr=0,Ul=true,Ht=re+1);}gi(true),Fe=Ul?0:kn.after;}_t||(un[se.length]=Ke());let If=_t&&S?S.endCursorY:ie,vf=_t&&S?S.endSpaceAfter:Fe,Tf=!_t&&(we.length>0||j.length===0),kf=_t&&S?S.endsOpenPage:Tf;Tf&&Ar();let Cf=0,IS=Bc*4+8;for(;(Q.length>0||ue.length>0)&&Cf<IS;)Cf+=1,Q.length===0&&Sf(),Ar();ue.length>0&&(Q.push(...ue.map(C=>Nc(C,"page-defer-exhausted"))),ue=[],Ar()),Hn();let Of={revision:n,pages:j};if(S){S.previous=Of,S.checkpoints=_t?[...un.slice(0,$l),...S.checkpoints.slice($l+(S.keys.length-se.length)).map(Y=>Xl===0?Y:{...Y,pageCount:Y.pageCount+Xl})]:un,S.keys=an,S.context=j.length+1===F?G:A(lf(I,b,j.length+1)),S.producer=x;let C=H||B?.evenAndOddHeaders===true;S.parityDependent=We===0&&!_t?C:S.parityDependent||C,S.startPageParity=U,S.startLineCounter=w,S.endLineCounter=Ae,S.endCursorY=If,S.endSpaceAfter=vf,S.endsOpenPage=kf,S.stats={placed:de,total:se.length,reusedPages:Sn,fullPasses:S.stats.fullPasses+(We===0?1:0)};}return {layout:Of,pages:j,lineCounter:Ae,endCursorY:If,endSpaceAfter:vf,endsOpenPage:kf,overflowShellAt:De}}function Nx(e,n,t){let r=n.lefts.map(()=>t);for(let o of e.fragments){let a=0;for(let i=n.count-1;i>=0;i-=1)if(o.box.x+.5>=n.lefts[i]){a=i;break}r[a]=Math.max(r[a],o.box.y+o.box.height);}return r}var Ak=.25,Dk=20;function Xo(e,n,t){let r=Uu(t.sectionColumns??Zn.columns,t.geometry.width-t.geometry.margin.left-t.geometry.margin.right);if(!t.balanceColumns||r.count<2||t.columnRegionBottom!==void 0)return t.session&&(t.session.balanceLimit=null),Nr(e,n,t);let o=t.session,a=t.flowStartY??0,{session:i,...s}=t,l=h=>{let y=h.pages[0],x=y?Math.max(...Nx(y,r,a)):h.endCursorY;return o&&(o.endCursorY=x),{...h,endCursorY:x}};if(o&&o.balanceLimit!==null){let h=o.balanceLimit,y=Nr(e,n,{...t,columnRegionBottom:h});if(o.stats.placed===0&&o.stats.reusedPages===y.pages.length)return o.balanceLimit=h,l(y)}let d=Nr(e,n,s);if(d.pages.length!==1||!d.endsOpenPage)return o&&(o.balanceLimit=null),Nr(e,n,t);let c=Nx(d.pages[0],r,a),u=c.reduce((h,y)=>h+Math.max(0,y-a),0);if(u<=0)return o&&(o.balanceLimit=null),Nr(e,n,t);let f=a+u/r.count,p=Math.max(...c)+.01,m=h=>{try{let y=Nr(e,n,{...s,columnRegionBottom:h});return y.pages.length===1&&y.endsOpenPage}catch{return false}};for(let h=0;h<Dk&&p-f>Ak;h+=1){let y=(f+p)/2;m(y)?p=y:f=y;}let g=Nr(e,n,{...t,columnRegionBottom:p});return o&&(o.balanceLimit=p),l(g)}var Hx="Calibri, Carlito, Helvetica, Arial, sans-serif",MA=new Map([["calibri","Carlito"]]),_k=65536,Hk=256;function Ax(e,n){return e===void 0?Math.max(1,Math.floor(n)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function Dx(e){let n=new Map,t=0;return {get(r){let o=n.get(r);if(o!==void 0)return n.delete(r),n.set(r,o),o},set(r,o){for(n.has(r)&&n.delete(r),n.set(r,o);n.size>e;){let a=n.keys().next();if(a.done)break;n.delete(a.value),t+=1;}},get size(){return n.size},get evictions(){return t}}}var _x=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function zx(e=null){return e!=null&&typeof e.measureText=="function"}function jx(e={}){let n=e.scale??1;if(!(n>0)||!Number.isFinite(n))return null;let t=e.fallbackFamily??Hx,r=e.context??null;if(!zx(r))return null;let o=r,a=Dx(Ax(e.maxWidthEntries,_k)),i=Dx(Ax(e.maxMetricsEntries,Hk)),s=e.fontAlias,l=c=>{let u=c.fontFamily&&_x.test(c.fontFamily)?c.fontFamily:null,f=u?s?.(u):void 0,p=f&&_x.test(f)?f:null,m=u?p?`"${p}", "${u}", ${t}`:`"${u}", ${t}`:t,g=c.bold?"bold":"normal",h=c.italic?"italic":"normal",y=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*n;return `${h} ${g} ${y}px ${m}`},d=(c,u,f)=>c/n*(f.horizontalScalePercent/100)+u.length*f.characterSpacingPt;return {measure(c,u){if(c.length===0)return 0;let f=l(u),p=`${f}\0${c}`,m=a.get(p);if(m!==void 0)return d(m,c,u);o.font=f;let g=o.measureText(c).width;return a.set(p,g),d(g,c,u)},lineMetrics(c){let u=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75),f=l(c),p=i.get(f);if(p)return p;let m=u*1.15,g=u*.8;o.font=f;let h=o.measureText("Hxg"),y=h.fontBoundingBoxAscent,x=h.fontBoundingBoxDescent;if(typeof y=="number"&&Number.isFinite(y)&&y>0&&(g=y/n,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let B=(y+x)/n;B>0&&(m=Math.max(B,m));}m>0||(m=u*1.15);let k={height:m,baseline:g};return i.set(f,k),k}}}function zk(e=1,n={}){let t=jx({...n,scale:n.scale??e});return t?{measurer:t,producer:n.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:Ll(),producer:"fixed-measurer"}}function jk(e){return e.box}function Gx(e,n){if(e.kind==="paragraph"){n.add(e.paragraphId);return}for(let t of e.rows)for(let r of t.cells)for(let o of r.blocks)Gx(o,n);}function Gk(e){let n=new Map,t=(o,a,i)=>{if(!(o.kind==="textValue"||i>gf$1*4)){for(let s of o.children)if(s.kind!=="textValue"){if(s.kind==="paragraph"){for(let l of r)n.get(l)?.push(s.id);t(s,s.id,i+1);continue}if(s.kind==="contentControl"){n.set(s.id,[]),r.push(s.id);let l=qf(s);l&&t(l,a,i+1),r.pop();let d=n.get(s.id);d&&d.length===0&&a!==null&&d.push(a);continue}t(s,a,i+1);}}},r=[];return t(e,null,0),n}function Wk(e,n){let t=Math.min(e.x,n.x),r=Math.min(e.y,n.y);return {x:t,y:r,width:Math.max(e.x+e.width,n.x+n.width)-t,height:Math.max(e.y+e.height,n.y+n.height)-r}}function Vk(e,n){let t=uf(e.root);if(t.length===0)return $k;let r=new Map;n.pages.forEach((i,s)=>{(d=>{for(let c of d){let u=new Set;Gx(c,u);for(let f of u){let p=r.get(f)??[];p.push({pageIndex:s,box:jk(c)}),r.set(f,p);}}})(i.fragments);});let o=Gk(e.root),a=[];for(let i of t){let s=sf$1(i.node),l=[...i.ancestors.map(f=>sf$1(f).lock),s.lock],d=o.get(i.node.id)??[],c=new Map;for(let f of d)for(let p of r.get(f)??[]){let m=c.get(p.pageIndex);c.set(p.pageIndex,m?Wk(m,p.box):p.box);}let u=[...c.entries()].sort((f,p)=>f[0]-p[0]).map(([f,p])=>({pageIndex:f,...p}));a.push({controlId:i.node.id,type:s.type,level:tf$1(i.node),depth:i.depth,lock:s.lock,effectiveLock:xf(l),showingPlaceholder:s.showingPlaceholder,temporary:s.temporary,...s.tag===void 0?{}:{tag:s.tag},...s.alias===void 0?{}:{alias:s.alias},...s.id===void 0?{}:{id:s.id},...s.dataBinding===void 0?{}:{dataBinding:s.dataBinding},paragraphIds:d,fragments:u});}return a}var $k=Object.freeze([]);function Vx(e,n,t){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return t<o.range.end;let i=a.filter(s=>s.range.paragraphId===n);return i.length===a.length?t<o.range.end:i.length>0&&t<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function tC(e,n){let t=new Map;for(let r of e.pages)for(let[o,a]of rC(r,n))t.has(o)||t.set(o,a);return t}var Wx=new WeakMap;function rC(e,n){let t=Wx.get(n);t||(t=new WeakMap,Wx.set(n,t));let r=t.get(e);if(r)return r;let o=new Map;for(let a of n(e)){let i=new Set([a.paragraphId]);for(let s of a.lines??[])for(let l of s.spans??[])i.add(l.range.paragraphId);for(let s of i)o.has(s)||o.set(s,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return t.set(e,o),o}function oC(e,n){let t=Y(e);if(!t)return null;let r=n.get(t.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+Vx(r,t.start.paragraphId,t.start.offset)}:null}var aC=.5,iC=4,$x=e=>e.verticalAlign==="baseline"?1:.75;function pf(e){let n=Math.round(e.fontSizePt*2);return Math.max(1,n)}function sC(e){let{shaper:n,resolveFont:t,fallback:r,shapingLibrary:o,unicodeDataVersion:a,fixedPointScale:i=1e3,script:s="Latn",language:l="en"}=e,d=new WeakMap,c=new WeakMap,u=new WeakMap,f=g=>{let h=u.get(g);if(h!==void 0)return h;let y=t(g);return u.set(g,y),y},p=(g,h)=>{let y=d.get(g);y||(y=new Map,d.set(g,y));let x=y.get(h);return x||(x=new Map,y.set(h,x)),x},m=(g,h,y)=>n.shape({text:g,fontSizeHalfPoints:pf(y),bidiLevel:0,environment:fr({font:h,variationAxes:{},shapingLibrary:o,unicodeDataVersion:a,normalization:"none",script:s,language:l,direction:"ltr",features:{},fallbackOrder:[],fixedPointScale:i,roundingMode:"halfToEven"})});return {measure(g,h){if(g.length===0)return 0;let y=f(h);if(!y)return r.measure(g,h);let x=p(y,pf(h)),k=x.get(g);if(k===void 0){let B=0;try{for(let v of m(g,y,h).glyphs)B+=v.advanceX;}catch{return r.measure(g,h)}k=B/i,x.set(g,k);}return k*$x(h)*(h.horizontalScalePercent/100)+g.length*h.characterSpacingPt},lineMetrics(g){let h=f(g);if(!h)return r.lineMetrics(g);let y=$x(g),x=c.get(h);x||(x=new Map,c.set(h,x));let k=pf(g),B=x.get(k);if(B)return y===1?B:{height:B.height*y,baseline:B.baseline*y};let v,L=true;try{let I=m(" ",h,g),S=I.metrics.ascent/i,w=I.metrics.descent/i,T=k/2,N=S+w,M=T*iC,b=N>M?M/N:1,W=N*b,_=Math.min(Math.max(0,I.metrics.lineGap/i),W*aC),F=W+_;F>0?v={height:F,baseline:S*b}:(v=r.lineMetrics(g),L=!1);}catch{v=r.lineMetrics(g),L=false;}return L?(x.set(k,v),y===1?v:{height:v.height*y,baseline:v.baseline*y}):v}}}function lC(e){let{layout:n,viewport:t}=e,r=new Set;if(!t){for(let l of n.pages)r.add(l.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=t.top+t.height,i=-1,s=-1;for(let l of n.pages){let d=l.box.y;d+l.box.height>=t.top&&d<=a&&(i===-1&&(i=l.index),s=l.index);}if(i===-1){let l=dC(n,t.top);l!==null&&(i=l,s=l);}if(i!==-1){let l=Math.max(0,i-o),d=Math.min(n.pages.length-1,s+o);for(let c=l;c<=d;c+=1)r.add(c);}for(let l of e.pinnedPages??[])l>=0&&l<n.pages.length&&r.add(l);return r}function dC(e,n){let t=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=n<o.box.y?o.box.y-n:n>o.box.y+o.box.height?n-(o.box.y+o.box.height):0;a<r&&(r=a,t=o.index);}return t}var Xx=["text-local","paragraph-local","flow-structural","global"];function Yx(e,n){return Xx.indexOf(n)>Xx.indexOf(e)?n:e}function cC(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function uC(e){let{run:n,currentRevision:t,publish:r,schedule:o}=e,a=null,i=null,s=null,l=0,d=0;function c(h){let y=e.runCooperatively;if(!y)return n(h);let x=y(h);s=x;try{for(;;){let k=x.step();if(k)return k;if(t()!==h.revision)return x.cancel(),d+=1,null;if(s!==x)return null}}finally{s===x&&(s=null);}}function u(h){let y=p(t());y.impact=Yx(y.impact,h.impact),y.structural=y.structural||h.structural;for(let x of h.paragraphIds)y.paragraphIds.add(x);for(let x of h.created)y.created.add(x);for(let x of h.deleted)y.deleted.add(x);for(let x of h.dependencyKeys)y.dependencyKeys.add(x);}let f=h=>({impact:h.impact,paragraphIds:h.paragraphIds,created:h.created,deleted:h.deleted,dependencyKeys:h.dependencyKeys,structural:h.structural,revision:h.revision});function p(h){return a||(a=cC(h)),a.revision=Math.max(a.revision,h),a}function m(){!o||i||(i=o(()=>{i=null,g();}));}function g(){i&&(i(),i=null),s&&(s.cancel(),s=null,d+=1);let h=a;if(!h)return false;a=null;let y=f(h),x=c(y);return !x||x.revision!==t()?(l+=1,u(y),m(),false):(r(x,y),true)}return {notify(h){let y=p(t());y.impact=Yx(y.impact,h.impact);for(let x of h.dirty)y.paragraphIds.add(x);for(let x of h.created)y.created.add(x),y.paragraphIds.add(x);for(let x of h.deleted)y.deleted.add(x),y.paragraphIds.add(x);for(let x of h.dependencyKeys)y.dependencyKeys.add(x);for(let x of h.splitJoin)y.structural=true,"split"in x?(y.paragraphIds.add(x.split.from),y.paragraphIds.add(x.split.tail)):(y.paragraphIds.add(x.join.kept),y.paragraphIds.add(x.join.removed));(h.impact==="flow-structural"||h.impact==="global")&&(y.structural=true),m();},invalidateAll(h,y){let x=p(h);x.impact="flow-structural",x.structural=true,y&&x.dependencyKeys.add(y),m();},flush:g,pending:()=>a?f(a):null,cancel(){i?.(),i=null,s?.cancel(),s=null,a=null;},get staleDiscards(){return l},get cancelledRuns(){return d}}}function ht(e,n,t,r){let o=r?r.spans:e.spans;for(let i of r?r.drawings:e.drawings??[]){if(n===i.start)return i.advanceStart;if(n===i.start+1)return i.advanceEnd}let a=r?r.spans[0]?.box.x??e.contentX:e.contentX;for(let i of o){if(n<=i.range.start)return i.box.x;if(n>=i.range.end){a=i.box.x+i.box.width;continue}return sl(i,n,t)}return a}function qx(e,n,t){return Zx(e,n,t,true)}function JA(e,n,t){return Zx(e,n,t,false)}var Kx=new WeakMap,Ux=new WeakMap;function fC(e){let n=Kx.get(e);if(n)return n;let t=new Map;for(let r of e.pages)for(let o of Ve(r))for(let a of o.lines)for(let i of tn(a)){let s=t.get(i.paragraphId);(!s||i.end>s.end||i.end===s.end&&i.start>s.start)&&t.set(i.paragraphId,{end:i.end,start:i.start});}return Kx.set(e,t),t}function pC(e){let n=Ux.get(e);if(n)return n;let t=new Map(e.map((r,o)=>[r,o]));return Ux.set(e,t),t}function mC(e){return Math.max(3,Math.min(8,e*.25))}function Zx(e,n,t,r){let o=El(n,t);if(!o)return [];let a=pC(t),i=a.get(o.from.paragraphId),s=a.get(o.to.paragraphId),l=fC(e),d=[];for(let c of e.pages)for(let u of Ve(c))for(let f of u.lines){let p=tn(f);for(let[m,g]of p.entries()){let h=Cr(e,g,o.from,o.to),y=a.get(g.paragraphId),x=l.get(g.paragraphId),k=i!==void 0&&s!==void 0&&y!==void 0&&y>=i&&y<s&&x?.end===g.end&&x.start===g.start&&m===p.length-1;if((!r||!h)&&!k)continue;let B=r&&h?ht(f,h.start,void 0,g):null,v=r&&h?ht(f,h.end,void 0,g):null,L=k?ht(f,g.end,void 0,g):null,I=L!==null?L+mC(Math.max(0,f.box.height-f.leading-(f.trailingSpacing??0))):null,S=[B,v,L,I].filter(N=>N!==null),w=Math.min(...S),T=Math.max(...S);d.push({pageIndex:c.index,x:w,y:f.box.y,width:T-w,height:f.box.height});}}return d}function Jx(e,n,t){let r=new Map;if(n.length===0)return r;for(let o of e.pages)if(!(t&&!t.has(o.index)))for(let a of Ve(o))for(let i of a.lines)for(let s of tn(i))for(let l of n){let d=Cr(e,s,l.from,l.to);if(!d)continue;let c=ht(i,d.start,void 0,s),u=ht(i,d.end,void 0,s),f=r.get(l.key)??[];f.push({pageIndex:o.index,x:Math.min(c,u),y:i.box.y,width:Math.abs(u-c),height:i.box.height}),r.set(l.key,f);}return r}function QA(e,n,t){if(kr(e).has(n))return {x:0,y:0};let r=e.pages[t];if(!r)return {x:0,y:0};let o=a=>xn(a).some(i=>i.paragraphId===n);if(r.header&&o(r.header.fragments))return {x:r.header.box.x-r.contentBox.x,y:r.header.box.y-r.contentBox.y};if(r.footer&&o(r.footer.fragments))return {x:r.footer.box.x-r.contentBox.x,y:r.footer.box.y-r.contentBox.y};for(let a of [r.footnotes,r.endnotes])if(a){for(let i of a.notes)if(o(i.fragments))return {x:i.box.x-r.contentBox.x,y:i.box.y-r.contentBox.y}}return {x:0,y:0}}function eD(e,n,t,r){let o=new Map,a=[];for(let s of n){let l=El({anchor:s.from,head:s.to},t);l&&a.push({key:s.key,from:l.from,to:l.to});}if(a.length===0)return o;let i=(s,l,d,c)=>{for(let u of xn(s))for(let f of u.lines){for(let p of tn(f))for(let m of a){let g=Cr(e,p,m.from,m.to);if(!g)continue;let h=ht(f,g.start,void 0,p),y=ht(f,g.end,void 0,p),x=o.get(m.key)??[];x.push({pageIndex:l,x:Math.min(h,y)+d,y:f.box.y+c,width:Math.abs(y-h),height:f.box.height}),o.set(m.key,x);}}};for(let s of e.pages)if(!(r&&!r.has(s.index))){i(s.fragments,s.index,0,0);for(let l of [s.header,s.footer])l&&i(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);for(let l of [s.footnotes,s.endnotes])if(l)for(let d of l.notes)i(d.fragments,s.index,d.box.x-s.contentBox.x,d.box.y-s.contentBox.y);}return o}function mf(e){let n=new Map;for(let t=0;t<e.length;t+=1){let r=e[t].position,o=n.get(r.paragraphId);o||(o=new Map,n.set(r.paragraphId,o)),o.has(r.offset)||o.set(r.offset,t);}return {stops:e,index:n}}var Nl=class{#n=new WeakMap;#s=new WeakMap;get(n,t,r,o){let a;if(!r)a=this.#n.get(n)??new Map,this.#n.has(n)||this.#n.set(n,a);else {let l=this.#s.get(n);l||(l=new WeakMap,this.#s.set(n,l)),a=l.get(r)??new Map,l.has(r)||l.set(r,a);}let i=a.get(t);if(i)return i;let s=o();return a.set(t,s),s}};function Qx(e){let n=[],t=new Set;for(let r of e)t.has(r.lineId)||(t.add(r.lineId),n.push(r.lineId));return n}function eS(e,n,t){let r=null;for(let o of e)o.lineId===n&&(!r||Math.abs(o.x-t)<Math.abs(r.x-t))&&(r=o);return r}function di(e,n){let t=null;for(let r of e)r.position.paragraphId===n.paragraphId&&(!t||Math.abs(r.position.offset-n.offset)<Math.abs(t.position.offset-n.offset))&&(t=r);return t}function gf(e,n,t){let r=null;for(let o of e){if(o.position.paragraphId!==n.paragraphId)continue;let a=o.position.offset;t===1?a>n.offset&&(!r||a<r.position.offset)&&(r=o):a<n.offset&&(!r||a>r.position.offset)&&(r=o);}return r}function nS(e,n,t){let r=t.index.get(e.paragraphId)?.get(e.offset),o=r===void 0?di(t.stops,e):t.stops[r];if(!o)return null;let a=o.lineId,i=t.stops.filter(s=>s.lineId===a);return (n===-1?i[0]:i[i.length-1])?.position??null}function tS(e,n,t,r,o){let a=o(e.paragraphId),i=a.index.get(e.paragraphId)?.get(e.offset);if(i===void 0){let c=gf(a.stops,e,n);if(c)return {position:c.position,desiredX:null}}else {let c=i+n;if(c>=0&&c<a.stops.length)return {position:a.stops[c].position,desiredX:null}}let s=t[r+n];if(!s)return {position:e,desiredX:null};let l=o(s).stops,d=n===-1?l[l.length-1]:l[0];return d?{position:d.position,desiredX:null}:null}function rS(e,n,t){let r=e===-1?n[0]:n[n.length-1];if(!r)return null;let o=t(r).stops;return (e===-1?o[0]:o[o.length-1])?.position??null}function oS(e,n,t,r,o,a){let i=a(e.paragraphId),s=i.index.get(e.paragraphId)?.get(e.offset),l=s===void 0?di(i.stops,e):i.stops[s];if(!l)return null;let d=t??l.x,c=Qx(i.stops),u=c.indexOf(l.lineId),f=c[u+n];if(f){let m=eS(i.stops,f,d);return m?{position:m.position,desiredX:d}:null}for(let m=o+n;m>=0&&m<r.length;m+=n){let g=a(r[m]),h=Qx(g.stops),y=n===-1?h[h.length-1]:h[0];if(!y)continue;let x=eS(g.stops,y,d);if(x)return {position:x.position,desiredX:d}}let p=n===-1?i.stops[0]:i.stops[i.stops.length-1];return p?{position:p.position,desiredX:d}:null}var aS=new WeakMap,iS=new WeakMap;function Fn(e){let n=aS.get(e);if(n)return n;let t=new Map;for(let r of e.pages)for(let[o,a]of yC(r)){let i=t.get(o);i?i.push(...a):t.set(o,[...a]);}return aS.set(e,t),t}function yC(e){let n=iS.get(e);if(n)return n;let t=new Map,r=(a,i)=>{for(let s of tn(a)){let l={line:a,pageIndex:i},d=t.get(s.paragraphId);d?d.push(l):t.set(s.paragraphId,[l]);}},o=(a,i)=>{let s=l=>{for(let d of l){if(d.kind==="paragraph"){for(let c of d.lines)r(c,i);continue}for(let c of d.rows)if(!c.isHeaderRepeat)for(let u of c.cells)s(u.blocks);}};s(a);};for(let a of Ve(e))for(let i of a.lines)r(i,e.index);e.header&&o(e.header.fragments,e.index),e.footer&&o(e.footer.fragments,e.index);for(let a of [e.footnotes,e.endnotes])if(a)for(let i of a.notes)o(i.fragments,e.index);return iS.set(e,t),t}function iD(e,n,t){let r=Fn(e).get(n);if(r&&r.length>0){let o=pa(e,n,t,r.map(a=>a.line));if(o)return o}return pa(e,n,t)}var sS=new WeakMap;function hf(e,n){let t=sS.get(e);t||(t=new Map,sS.set(e,t));let r=t.get(n);if(r)return r;let o=[];for(let{line:i}of Fn(e).get(n)??[])if(i.range.paragraphId===n)for(let s of i.deletedRanges??[])o.push({start:s.start,end:s.end});o.sort((i,s)=>i.start-s.start);let a=[];for(let i of o){let s=a[a.length-1];s&&i.start<=s.end?s.end=Math.max(s.end,i.end):a.push(i);}return t.set(n,a),a}function lS(e,n){for(let t of e)if(n>t.start&&n<t.end)return true;return false}function dS(e,n){for(let t of hf(e,n.paragraphId))if(n.offset>t.start&&n.offset<t.end)return {paragraphId:n.paragraphId,offset:t.end};return n}var bC=/[\p{L}\p{N}_'\u2019]/u;function ci(e,n,t,r=xC){let o=i=>{let s=e[i];return s!==void 0&&bC.test(s)},a=Math.max(0,Math.min(n,e.length));if(t===-1){for(;a>0&&!o(a-1);)if(a-=1,r.has(a))return a;for(;a>0&&o(a-1);)if(a-=1,r.has(a))return a;return a}for(;a<e.length&&!o(a);)if(a+=1,r.has(a))return a;for(;a<e.length&&o(a);)if(a+=1,r.has(a))return a;return a}var xC=new Set;function SC(e,n,t){let r=Fn(e).get(n.range.paragraphId)??[],o=false;for(let a of r){if(a.line===n){o=true;continue}if(o&&a.line.range.start===t)return true}return false}function RC(e,n,t){for(let{line:r}of Fn(e).get(n)??[])if(r.range.start===t&&r.drawings?.some(o=>o.start===t))return r;return null}function wC(e,n,t){for(let r of t?t.spans:e.spans)if(!(n<=r.range.start||n>=r.range.end)&&(r.projected||r.text.length!==r.range.end-r.range.start))return true;return false}function fS(e){let n=e.spans[e.spans.length-1]?.text;return n===`
16
+ `||n===zc$1}function PC(e,n){if(n.end-n.start!==1||!e.drawings?.some(t=>t.start===n.start))return false;for(let t of n.spans)if(t.range.end>t.range.start)return false;return true}function _l(e,n,t,r,o,a,i){for(let s of tn(t))i!==void 0&&s.paragraphId!==i||IC(e,n,t,s,r,o,a);}function IC(e,n,t,r,o,a,i){let s=tn(t).length>1,l=hf(n,r.paragraphId),d=c=>r.spans.some(u=>u.range.start<=c&&c<=u.range.end);for(let c=r.start;c<=r.end;c+=1)if(!(c===r.end&&c>r.start&&!s&&fS(t)&&SC(n,t,c))){if(c===r.start&&c>a&&e.length>0){let u=e[e.length-1];if(u.position.paragraphId===r.paragraphId&&u.position.offset===c)continue}wC(t,c,r)||lS(l,c)&&!d(c)||e.push({position:{paragraphId:r.paragraphId,offset:c},x:ht(t,c,i,r),y:t.box.y,height:t.box.height,lineId:t.id,pageIndex:o});}}function pS(e,n,t,r,o){for(let a of n){if(a.kind==="paragraph"){for(let i of a.lines)_l(r,e,i,t,a.range.start,o);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)pS(e,s.blocks,t,r,o);}}var vC=new Nl;function mS(e,n){let t=[];for(let r of e.pages)for(let o of Ve(r))for(let a of o.lines)_l(t,e,a,r.index,o.range.start,n);return t}function TC(e,n,t){let o=(Fn(e).get(n.paragraphId)??[]).find(({line:i})=>{let s=gt(i,n.paragraphId);return s!==null&&n.offset>=s.start&&n.offset<=s.end});if(!o||tn(o.line).length<2)return null;let a=[];return _l(a,e,o.line,o.pageIndex,0,t),mf(a)}function Al(e,n,t){return vC.get(e,n,t,()=>{let r=[];for(let{line:o,pageIndex:a}of Fn(e).get(n)??[])_l(r,e,o,a,0,t,n);return mf(r)})}function kC(e,n,t,r){if(!e.pages[n])return [];let o=[];return pS(e,t,n,o,r),o}function CC(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function OC(e,n,t){let r=e.pages[n];if(!r)return [];let o=[];for(let a of Ve(r,true))if(a.paragraphId===t)for(let i of a.lines)o.push({line:i,pageIndex:n});return o}function gS(e,n,t){let r=CC(t),o=Fn(e).get(n.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?[]:OC(e,a,n.paragraphId),s=new Set(o.map(f=>f.line.id)),l=i.filter(f=>!s.has(f.line.id)),d=l.length>0?[...o,...l]:o,c=a===void 0?d:[...d].sort((f,p)=>{let m=f.pageIndex===a?0:1,g=p.pageIndex===a?0:1;return m-g}),u=null;for(let{line:f,pageIndex:p}of c){let m=gt(f,n.paragraphId);if(!m||n.offset<m.start||n.offset>m.end)continue;if(n.offset===m.end&&n.offset>m.start&&tn(f).length===1&&(fS(f)||PC(f,m))){u??={line:f,pageIndex:p};continue}if(n.offset===m.end&&n.offset>m.start&&RC(e,n.paragraphId,n.offset))continue;let g=Za(f,n.offset,r.measurer,m);return {position:n,x:g.x,y:g.y,height:g.height,lineId:f.id,pageIndex:p}}if(u){let f=Za(u.line,n.offset,r.measurer,gt(u.line,n.paragraphId));return {position:n,x:f.x,y:f.y,height:f.height,lineId:u.line.id,pageIndex:u.pageIndex}}return null}function BC(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return ol(e,t,n)?.caret??null}function MC(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return il(e,t,n)}function FC(e){return Di(e)}var cS=new WeakMap;function Dl(e,n){let t=cS.get(e);return t||(t=new Map,e.forEach((r,o)=>{t.has(r)||t.set(r,o);}),cS.set(e,t)),t.get(n)??-1}function El(e,n){if(e.anchor.paragraphId===e.head.paragraphId)return e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor};let t=Dl(n,e.anchor.paragraphId),r=Dl(n,e.head.paragraphId);return t===-1||r===-1?null:t<r||t===r&&e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor}}function Yo(e,n){let t=[],r=new Set;for(let{line:a}of Fn(e).get(n)??[]){let i=gt(a,n);if(i){for(let s of i.spans){if(s.range.end===s.range.start)continue;let l=`${s.range.start}:${s.range.end}`;if(r.has(l))continue;r.add(l);let d=s.range.end-s.range.start,c=s.text.length===d?s.text:s.text.slice(0,d).padEnd(d," ");t.push({start:s.range.start,text:c});}for(let s of i.drawings){let l=s.start,d=l+1,c=`${l}:${d}`;r.has(c)||(r.add(c),t.push({start:l,text:"\uFFFC"}));}}}t.sort((a,i)=>a.start-i.start);let o="";for(let a of t)a.start>o.length&&(o+=" ".repeat(a.start-o.length)),o=o.slice(0,a.start)+a.text;return o}function yf(e,n){let t=new Set;for(let{line:r}of Fn(e).get(n)??[]){let o=gt(r,n);if(o)for(let a of o.spans)a.range.end!==a.range.start&&a.revisions?.some(i=>i.kind==="delete"||i.kind==="moveFrom")&&(t.add(a.range.start),t.add(a.range.end));}return t}function uS(e,n,t,r){let o=Tr(e),a=kr(e).get(n.paragraphId);return a===void 0?null:tS(n,t,o,a,i=>Al(e,i,r))}function LC(e,n,t,r=null,o={}){if(!o.stops&&(t==="left"||t==="right"))return uS(e,n,t==="left"?-1:1,o.measurer);if(!o.stops&&(t==="wordLeft"||t==="wordRight")){let l=t==="wordLeft"?-1:1,d=ci(Yo(e,n.paragraphId),n.offset,l,yf(e,n.paragraphId));return d===n.offset?uS(e,n,l,o.measurer):{position:{paragraphId:n.paragraphId,offset:d},desiredX:null}}if(!o.stops&&(t==="lineStart"||t==="lineEnd")){let l=nS(n,t==="lineStart"?-1:1,TC(e,n,o.measurer)??Al(e,n.paragraphId,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(t==="documentStart"||t==="documentEnd")){let l=rS(t==="documentStart"?-1:1,Tr(e),d=>Al(e,d,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(t==="up"||t==="down")){let l=kr(e).get(n.paragraphId);return l===void 0?null:oS(n,t==="up"?-1:1,r,Tr(e),l,d=>Al(e,d,o.measurer))}let a=o.stops?[...o.stops]:mS(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(l=>l.position.paragraphId===n.paragraphId&&l.position.offset===n.offset);if(i===-1){if(t==="left"||t==="right"){let d=gf(a,n,t==="left"?-1:1)??di(a,n);return d?{position:d.position,desiredX:null}:null}let l=di(a,n);if(!l)return null;i=a.indexOf(l);}let s=a[i];switch(t){case "left":return {position:a[Math.max(0,i-1)].position,desiredX:null};case "right":return {position:a[Math.min(a.length-1,i+1)].position,desiredX:null};case "lineStart":return {position:a.filter(d=>d.lineId===s.lineId)[0].position,desiredX:null};case "lineEnd":{let l=a.filter(d=>d.lineId===s.lineId);return {position:l[l.length-1].position,desiredX:null}}case "wordLeft":case "wordRight":{let l=Yo(e,n.paragraphId),d=t==="wordLeft"?-1:1,c=ci(l,n.offset,d,yf(e,n.paragraphId));return c===n.offset?{position:a[d===-1?Math.max(0,i-1):Math.min(a.length-1,i+1)].position,desiredX:null}:{position:{paragraphId:n.paragraphId,offset:c},desiredX:null}}case "documentStart":return {position:a[0].position,desiredX:null};case "documentEnd":return {position:a[a.length-1].position,desiredX:null};case "pageUp":case "pageDown":{let l=r??s.x,d=s.pageIndex+(t==="pageUp"?-1:1),c=a.filter(p=>p.pageIndex===d);if(c.length===0)return {position:(t==="pageUp"?a[0]:a[a.length-1]).position,desiredX:l};let u=c[0],f=Number.POSITIVE_INFINITY;for(let p of c){let m=Math.abs(p.y-s.y)*1e3+Math.abs(p.x-l);m<f&&(f=m,u=p);}return {position:u.position,desiredX:l}}case "up":case "down":{let l=r??s.x,d=[],c=new Set;for(let g of a)c.has(g.lineId)||(c.add(g.lineId),d.push(g.lineId));let u=d.indexOf(s.lineId),f=t==="up"?u-1:u+1;if(f<0||f>=d.length)return {position:(t==="up"?a[0]:a[a.length-1]).position,desiredX:l};let p=a.filter(g=>g.lineId===d[f]),m=p[0];for(let g of p)Math.abs(g.x-l)<Math.abs(m.x-l)&&(m=g);return {position:m.position,desiredX:l}}default:return null}}function EC(e,n){return gS(e,n)}function NC(e,n,t){let r=El(n,t);if(!r)return [];if(r.from.paragraphId===r.to.paragraphId&&r.from.offset===r.to.offset)return AC(e,r.from);let o=[];if(r.from.paragraphId===r.to.paragraphId){for(let{line:l}of Fn(e).get(r.from.paragraphId)??[]){let d=gt(l,r.from.paragraphId);if(!d)continue;let c=Cr(e,d,r.from,r.to);if(c)for(let u of d.spans)u.range.end>c.start&&u.range.start<c.end&&o.push(u);}return o}let a=Fn(e),i=Dl(t,r.from.paragraphId),s=Dl(t,r.to.paragraphId);if(i===-1||s===-1)return [];for(let l=i;l<=s;l+=1)for(let{line:d}of a.get(t[l])??[]){let c=gt(d,t[l]);if(!c)continue;let u=Cr(e,c,r.from,r.to);if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&o.push(f);}return o}function AC(e,n){let t=null;for(let{line:r}of Fn(e).get(n.paragraphId)??[])for(let o of gt(r,n.paragraphId)?.spans??[]){if(o.range.start<n.offset&&n.offset<=o.range.end)return [o];t===null&&o.range.start===n.offset&&(t=o);}return t?[t]:[]}var hS=new WeakMap;function At(e){let n=hS.get(e);if(n)return n;let t=new Map,r=new Map,o=new Map,a=(s,l,d,c)=>{for(let u of s){if(u.kind==="paragraph")continue;let f=u.tableId,p=o.get(f);p||(p=new Map,o.set(f,p),t.set(f,[]),r.set(f,new Map));for(let m of u.rows){let g=p.get(m.id);g===void 0&&(g=p.size,p.set(m.id,g),r.get(f).set(g,m.cells));for(let h of m.cells)t.get(f).push({pageIndex:l,tableId:f,row:m,cell:h,rowIndex:g,isHeaderRepeat:m.isHeaderRepeat,offsetX:d,offsetY:c}),a(h.blocks,l,d,c);}}};for(let s of e.pages){a(s.fragments,s.index,0,0);for(let l of [s.header,s.footer])l&&a(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);for(let l of [s.footnotes,s.endnotes])if(l)for(let d of l.notes)a(d.fragments,s.index,d.box.x-s.contentBox.x,d.box.y-s.contentBox.y);}let i=new Map;for(let[s,l]of t)i.set(s,{placed:l,rows:r.get(s)??new Map});return hS.set(e,i),i}function bS(e){let n=0;for(let t of e.rows.values())for(let r of t)n=Math.max(n,ar(r).to+1);return n}var ar=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function DC(e,n,t){if(n.tableId!==t.tableId)return null;let r=At(e).get(n.tableId);if(!r)return null;let o=Math.min(n.rowIndex,t.rowIndex),a=Math.max(n.rowIndex,t.rowIndex),i=Math.min(ar(n).from,ar(t).from),s=Math.max(ar(n).to,ar(t).to),l=p=>{let{from:m,to:g}=ar(p);return g>=i&&m<=s},d=p=>(r.rows.get(p)??[]).some(m=>m.vMergeContinue&&l(m)),c=r.rows.size+bS(r)+2;for(let p=0;!(p>c);p+=1){let m=false;for(let[g,h]of r.rows)if(!(g<o||g>a))for(let y of h){if(!l(y))continue;let{from:x,to:k}=ar(y);x<i&&(i=x,m=true),k>s&&(s=k,m=true);}for(;o>0&&d(o);)o-=1,m=true;for(;d(a+1);)a+=1,m=true;if(!m)break}let u=[],f=new Set;for(let p of r.placed){if(p.isHeaderRepeat||p.rowIndex<o||p.rowIndex>a)continue;let{from:m,to:g}=ar(p.cell);g<i||m>s||f.has(p.cell.id)||(f.add(p.cell.id),u.push(p.cell.id));}return u.length===0?null:{kind:"cells",tableId:n.tableId,cellIds:u,rows:{from:o,to:a},columns:{from:i,to:s},text:_C(e,n.tableId,u)}}function kD(e,n){return xS(e,n,true)}function Hl(e,n){return xS(e,n,false)}function xS(e,n,t){let r=new Set(n),o=[],a=new Set;for(let i of At(e).values())for(let s of i.placed)if(!(s.isHeaderRepeat||!r.has(s.cell.id)))for(let l of s.cell.blocks)t&&l.kind!=="paragraph"||Ko(l,o,a);return o}function Ko(e,n,t){if(e.kind==="paragraph"){for(let r of or(e))t.has(r)||(t.add(r),n.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)Ko(a,n,t);}function _C(e,n,t){let r=Hl(e,t),o=r[0],a=r[r.length-1];return !o||!a?HC(e,n):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Yo(e,a).length}}}function HC(e,n){let t=At(e).get(n);for(let o of t?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let s of o.cell.blocks)Ko(s,a,new Set);let i=a[0];if(i){let s={paragraphId:i,offset:0};return {anchor:s,head:s}}}for(let o of e.pages)for(let a of Ve(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function zC(e){let n=[...Ve(e)];for(let t of [e.header,e.footer])t&&n.push(...xn(t.fragments));for(let t of [e.footnotes,e.endnotes])if(t)for(let r of t.notes)n.push(...xn(r.fragments));return n}function jC(e,n){let t=new Set(Hl(e,n)),r=[],o=new Set;for(let a of e.pages)for(let i of zC(a))if(t.has(i.paragraphId))for(let s of i.lines)for(let l of s.spans){let d=`${l.range.paragraphId}:${l.range.start}:${l.range.end}`;o.has(d)||(o.add(d),r.push(l));}return r}function GC(e,n){let t=new Set(n),r=[];for(let o of At(e).values())for(let a of o.placed)t.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function WC(e,n){let t=At(e).get(n.tableId);if(!t)return "";let r=new Set(n.cellIds),o=new Map,a=new Set;for(let i of t.placed){if(i.isHeaderRepeat||!r.has(i.cell.id)||a.has(i.cell.id))continue;a.add(i.cell.id);let s=Hl(e,[i.cell.id]).map(d=>Yo(e,d)).join(`
17
+ `),l=o.get(i.rowIndex);l?l.set(i.cell.gridColumn,s):o.set(i.rowIndex,new Map([[i.cell.gridColumn,s]]));}return [...o.keys()].sort((i,s)=>i-s).map(i=>{let s=o.get(i),l=[];for(let d=n.columns.from;d<=n.columns.to;d+=1)l.push(s.get(d)??"");return l.join(" ")}).join(`
18
+ `)}function bf(e,n){let t=null,r=-1;for(let[o,a]of At(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)Ko(d,s,new Set);if(!s.includes(n))continue;let l=o.length;l<=r||(r=l,t={tableId:o,rows:a.rows.size,columns:bS(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return t}function CD(e,n,t){if(t){let a=bf(e,n);if(!a||a.tableId!==t.tableId)return null;let i=t.cellIds[0];if(!i)return null;let s=At(e).get(t.tableId);if(!s)return null;for(let l of s.placed)if(l.cell.id===i)return {tableId:t.tableId,rowId:l.row.id,cellId:i,cellIds:t.cellIds,gridColumnIndex:l.cell.gridColumn,isHeaderRepeat:l.isHeaderRepeat};return null}let r=bf(e,n);if(!r)return null;let o=At(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let s of a.cell.blocks)Ko(s,i,new Set);if(i.includes(n))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}var yS=new WeakMap;function OD(e,n){let t=yS.get(e);if(t)return t.get(n)??null;let r=new Map;for(let[o,a]of At(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)Ko(d,s,new Set);let l={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let d of s){let c=r.get(d);c&&c.tableId.length>=o.length||r.set(d,l);}}return yS.set(e,r),r.get(n)??null}export{fa as $,Im as $a,ru as $b,ET as $c,kC as $d,$n as A,$d as Aa,Oc as Ab,yv as Ac,cx as Ad,AR as B,io as Ba,Ps as Bb,ol as Bc,ux as Bd,DR as C,Xd as Ca,_g as Cb,sL as Cc,df as Cd,_R as D,Gi as Da,Bs as Db,bv as Dc,Ml as Dd,Ei as E,xa as Ea,Gg as Eb,il as Ec,Ll as Ed,zR as F,Yd as Fa,wr as Fb,vy as Fc,Nk as Fd,Md as G,Kd as Ga,$0 as Gb,sl as Gc,Hx as Gd,Ni as H,Sa as Ha,Lo as Hb,Za as Hc,MA as Hd,jR as I,fw as Ia,Xg as Ib,Mv as Ic,zx as Id,GR as J,pw as Ja,Mt as Jb,cL as Jc,jx as Jd,WR as K,mw as Ka,za as Kb,uL as Kc,zk as Kd,Ld as L,gw as La,Ug as Lb,fL as Lc,Vk as Ld,Kp as M,Ud as Ma,eh as Mb,pL as Mc,Vx as Md,Up as N,so as Na,Vc as Nb,mL as Nc,tC as Nd,qp as O,Zd as Oa,Ft as Ob,gl as Oc,oC as Od,Zp as P,Jd as Pa,Ns as Pb,_n as Pc,sC as Pd,Jp as Q,wa as Qa,As as Qb,sE as Qc,lC as Qd,Qp as R,Sw as Ra,yh as Rb,Lu as Rc,uC as Rd,YR as S,lo as Sa,Vs as Sb,Eu as Sc,qx as Sd,KR as T,Qd as Ta,$s as Tb,Nu as Tc,JA as Td,to as U,gr as Ua,Xs as Ub,lT as Uc,Jx as Ud,ZR as V,vw as Va,Zc as Vb,kT as Vc,QA as Vd,Nd as W,Tw as Wa,Rh as Wb,CT as Wc,eD as Wd,Ve as X,Tt as Xa,Jc as Xb,Rl as Xc,iD as Xd,xn as Y,Xt as Ya,rr as Yb,Zn as Yc,dS as Yd,Dd as Z,Pm as Za,Un as Zb,Fb as Zc,ci as Zd,nw as _,ic as _a,Ch as _b,wl as _c,mS as _d,hd as a,om as aa,sc as ab,qs as ac,Pl as ad,gS as ae,yd as b,pa as ba,vm as bb,Gh as bc,NT as bd,BC as be,bd as c,Di as ca,kt as cb,$a as cc,Lb as cd,MC as ce,Wt as d,ma as da,lc as db,Ao as dc,Eb as dd,FC as de,qr as e,_i as ea,cc as eb,iu as ec,Lr as ed,Yo as ee,Ti as f,ga as fa,dt as fb,$h as fc,DT as fd,yf as fe,ES as g,am as ga,Ne as gb,ev as gc,ii as gd,LC as ge,at as h,Hi as ha,Zt as hb,Do as hc,Nb as hd,EC as he,fr as i,ro as ia,Nn as ib,su as ic,Vo as id,NC as ie,Dp as j,zd as ja,Zw as jb,lu as jc,si as jd,DC as je,Pd as k,lm as ka,mc as kb,jF as kc,Ab as kd,kD as ke,Bi as l,ya as la,ze as lb,pu as lc,HT as ld,Hl as le,DS as m,dm as ma,ke as mb,Ya as mc,Db as md,jC as me,la as n,cm as na,br as nb,ty as nc,Zu as nd,GC as ne,_S as o,ao as oa,So as ob,mu as oc,Il as od,WC as oe,HS as p,um as pa,yc as pb,Js as pc,_b as pd,bf as pe,Ee as q,uO as qa,Hm as qb,vr as qc,Hb as qd,CD as qe,mR as r,jd as ra,lP as rb,Qs as rc,li as rd,OD as re,Hp as s,Gd as sa,dP as sb,Tr as sc,zb as sd,OR as t,Wd as ta,Xn as tb,py as tc,vl as td,Mi as u,Vd as ua,xr as ub,tn as uc,Qu as ud,MR as v,It as va,xc as vb,QF as vc,ex as vd,FR as w,ba as wa,Jm as wb,or as wc,ef as wd,LR as x,wn as xa,Sr as xb,eL as xc,$T as xd,Cd as y,Vt as ya,BP as yb,Ru as yc,rf as yd,Bd as z,cw as za,eM as zb,qa as zc,Cl as zd};