@docx-editor.dev/core 2.16.0 → 2.16.2

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 (90) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +6 -6
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +10 -10
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-4RDCLCLB.js +2 -0
  8. package/dist/chunk-7QG5FJ4X.js +1 -0
  9. package/dist/chunk-BML3CNUT.js +2 -0
  10. package/dist/chunk-FRRMJK2G.js +5 -0
  11. package/dist/{chunk-FAD7DH6Q.cjs → chunk-G5GLQ4SX.cjs} +1 -1
  12. package/dist/chunk-JP253KIZ.cjs +2 -0
  13. package/dist/chunk-JROG4U3Z.cjs +21 -0
  14. package/dist/{chunk-DYPT6YDY.js → chunk-MBXGQN6J.js} +1 -1
  15. package/dist/{chunk-QVJO5FUR.js → chunk-MDMM3XVQ.js} +6 -6
  16. package/dist/{chunk-4MIFIUEV.cjs → chunk-NO7U62I2.cjs} +1 -1
  17. package/dist/{chunk-WGHVIB6B.cjs → chunk-NPZX5O23.cjs} +1 -1
  18. package/dist/chunk-OISZDVXT.cjs +5 -0
  19. package/dist/{chunk-YRTRPSSA.cjs → chunk-PRNYSOQL.cjs} +1 -1
  20. package/dist/chunk-QQP2SGAT.js +20 -0
  21. package/dist/chunk-RXPOTTQQ.js +21 -0
  22. package/dist/chunk-T7JERNXT.cjs +2 -0
  23. package/dist/{chunk-TDHR2QLH.cjs → chunk-TDMGSCCL.cjs} +1 -1
  24. package/dist/{chunk-BPSGGVP5.cjs → chunk-UIB2MDE3.cjs} +1 -1
  25. package/dist/{chunk-I4ENGOOZ.js → chunk-UXAWPVH6.js} +1 -1
  26. package/dist/{chunk-AEIAYDCG.js → chunk-VYQTZIYH.js} +1 -1
  27. package/dist/chunk-W7GY2IJC.js +2 -0
  28. package/dist/chunk-XC7YDJBL.cjs +20 -0
  29. package/dist/{chunk-YKDRBDI2.js → chunk-XXLS6O6B.js} +1 -1
  30. package/dist/{chunk-GHNTGVKG.cjs → chunk-ZFBNCHRP.cjs} +6 -6
  31. package/dist/collaboration/replication.cjs +1 -1
  32. package/dist/collaboration/replication.d.ts +4 -4
  33. package/dist/collaboration/replication.js +1 -1
  34. package/dist/collaboration.d.ts +4 -4
  35. package/dist/contracts/editor.d.ts +7 -7
  36. package/dist/contracts/modules.d.ts +8 -8
  37. package/dist/{custom-node-writes-4WOL8JB_.d.ts → custom-node-writes-ClTkWM7s.d.ts} +2 -2
  38. package/dist/{editor-PDx0fqSo.d.ts → editor-BlerWPyk.d.ts} +21 -3
  39. package/dist/editor.cjs +1 -1
  40. package/dist/editor.css +1 -1
  41. package/dist/editor.d.ts +26 -26
  42. package/dist/editor.js +1 -1
  43. package/dist/export.cjs +1 -1
  44. package/dist/export.d.ts +11 -11
  45. package/dist/export.js +1 -1
  46. package/dist/{font-resolver-CdqOugwZ.d.ts → font-resolver-DtADJcLL.d.ts} +1 -1
  47. package/dist/{headless-document-view-C9ONlGtf.d.ts → headless-document-view-BDSeMGoK.d.ts} +2 -2
  48. package/dist/{hf-references-BZVHctVD.d.ts → hf-references-kSSFMq9X.d.ts} +1 -1
  49. package/dist/{index-BVb4a6O3.d.ts → index-D51bUVBE.d.ts} +96 -15
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.d.ts +18 -18
  52. package/dist/index.js +1 -1
  53. package/dist/{layout-shaping-D_U5z-Qh.d.ts → layout-shaping-rTElghj2.d.ts} +1 -1
  54. package/dist/layout.cjs +1 -1
  55. package/dist/layout.d.ts +21 -19
  56. package/dist/layout.js +1 -1
  57. package/dist/{note-properties-BosjbkGC.d.ts → note-properties-D5_fXW9K.d.ts} +1 -1
  58. package/dist/{omml-equation-oLlbPpVy.d.ts → omml-equation-C9AJfWy5.d.ts} +1 -1
  59. package/dist/output.cjs +1 -1
  60. package/dist/output.d.ts +6 -6
  61. package/dist/output.js +1 -1
  62. package/dist/{protocol-CUsqt13U.d.ts → protocol-K-Djpjjw.d.ts} +2 -2
  63. package/dist/{review-items-kC-YI70C.d.ts → review-items-CiliAz8H.d.ts} +11 -1
  64. package/dist/review-paragraph-order-BlSnyg9a.d.ts +79 -0
  65. package/dist/{revision-projection-CN_DiOl_.d.ts → revision-projection-JiDclAFU.d.ts} +1 -1
  66. package/dist/{semantic-cell-selection-BMrXDniV.d.ts → semantic-cell-selection-C-VsxNee.d.ts} +4 -4
  67. package/dist/{semantic-interaction-NGeYzYCN.d.ts → semantic-interaction-2vPh96Ey.d.ts} +1 -1
  68. package/dist/{semantic-paint-CM8F-8pH.d.ts → semantic-paint-BEjYcsPK.d.ts} +4 -2
  69. package/dist/{semantic-records-BreR44Ki.d.ts → semantic-records-Bc-MGXbM.d.ts} +9 -3
  70. package/dist/store.cjs +1 -1
  71. package/dist/store.d.ts +99 -15
  72. package/dist/store.js +1 -1
  73. package/dist/{tree-op-types-C5rZzoAz.d.ts → tree-op-types-C71G7rIv.d.ts} +6 -2
  74. package/dist/{tree-package-fragment-DDQHk8sv.d.ts → tree-package-fragment-DRJkmfTW.d.ts} +3 -3
  75. package/dist/{tree-session-contract-dKgbKH9A.d.ts → tree-session-contract-Cp5W25RC.d.ts} +7 -7
  76. package/dist/{tree-store-DU192chS.d.ts → tree-store-BRfhZceK.d.ts} +1 -1
  77. package/package.json +2 -2
  78. package/dist/chunk-66DTF4TD.cjs +0 -2
  79. package/dist/chunk-67U2OZS7.cjs +0 -2
  80. package/dist/chunk-6EGMDUL7.js +0 -21
  81. package/dist/chunk-ABXCIZVW.js +0 -2
  82. package/dist/chunk-CMV2MTDE.js +0 -5
  83. package/dist/chunk-EWV5JMJY.cjs +0 -21
  84. package/dist/chunk-GQVKCK33.js +0 -2
  85. package/dist/chunk-IZHDCQUC.js +0 -20
  86. package/dist/chunk-KEXMDQ2Z.js +0 -1
  87. package/dist/chunk-KQEUFAAG.cjs +0 -20
  88. package/dist/chunk-SIUUTE5M.js +0 -2
  89. package/dist/chunk-XKQTITOJ.cjs +0 -5
  90. package/dist/review-reads-DdvADsmp.d.ts +0 -161
@@ -1,21 +0,0 @@
1
- import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {a as a$1}from'./chunk-VP7SDFCM.js';import {b,A}from'./chunk-ABXCIZVW.js';import {Ba}from'./chunk-GQVKCK33.js';import {fg as fg$1,m,pd as pd$1,a,oe,ne,da as da$1,I,We,g,pa as pa$1,Ue,Yc as Yc$1,nd,dd,ed,bd as bd$1,jd as jd$1,kd as kd$1,gd as gd$1,ld,Bb as Bb$1,qb as qb$1,ob as ob$1,Cc as Cc$1,Sd as Sd$1,If as If$1,Jf as Jf$1,xf,yf,zf as zf$1,Af as Af$1,Bf as Bf$1,vf as vf$1,wf,of,ye,Fd as Fd$1,rd,id,hd as hd$1,fd,td,cd,$g as $g$1,Jc as Jc$1,Hc as Hc$1,Mc as Mc$1,Ic as Ic$1,Gd as Gd$1,Nd as Nd$1,la as la$1,vd as vd$1,Bd as Bd$1,ra as ra$1,q as q$1,L,x,Ga as Ga$1,Cd as Cd$1,mb as mb$1,ch as ch$1,bh as bh$1,ah as ah$1,$a as $a$1,gb as gb$1,bb as bb$1,nb as nb$1,Ed as Ed$1,na as na$1,de,fe,wd as wd$1,fb as fb$1,db as db$1,Kf as Kf$1,vc as vc$1,Fc as Fc$1,ka,Me as Me$1,hb as hb$1,Sa as Sa$1,Va as Va$1,be,_d as _d$1,Yd as Yd$1,ma as ma$1,E,pe,rc as rc$1,Ua as Ua$1,Ke,ae,ce,kb as kb$1,je,ke,Td as Td$1,Vd as Vd$1,ie,pb as pb$1,s,Kd as Kd$1}from'./chunk-QVJO5FUR.js';var rI=Symbol("validated-resolved-font"),oI=4,za=64*1024*1024,hr=256,Kr=128*1024*1024,Vr=class extends Error{name="FontResolutionError";request;code;limit;actual;diagnostic;expectedHash;actualHash;constructor(t,n,r={}){super(`Font resolution failed (${t}) for ${$r(n)}`),this.code=t,this.request=Xr(n),this.limit=r.limit,this.actual=r.actual,this.diagnostic=r.diagnostic,this.expectedHash=r.expectedHash,this.actualHash=r.actualHash;}},Hy=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")},Xr=e=>(Hy(e),Object.freeze({family:e.family,weight:e.weight,style:e.style})),vf=e=>{let t={family:e.family,weight:e.weight,style:e.style};return Xr(t)},_y=Symbol("prepared-font-resource"),Tf=new WeakMap,aI=new Uint8Array(0),zy=Object.getPrototypeOf(Uint8Array.prototype),iI=Object.getOwnPropertyDescriptor(zy,"length").get,sI=Object.getOwnPropertyDescriptor(zy,"byteLength").get;function Wa(e){if(!ArrayBuffer.isView(e))throw new TypeError("Font bytes must be a genuine byte array");let t,n;try{t=iI.call(e),n=sI.call(e);}catch{throw new TypeError("Font bytes must be a genuine byte array")}if(t!==n)throw new TypeError("Font bytes must use one-byte elements");return n}function Wy(e){let t=new Uint8Array(Wa(e));return Uint8Array.prototype.set.call(t,e),t}function Gy(e,t){let n=Xr(e.request);if(e.availability==="forbidden"){let i=Object.freeze({...e,request:n,actualHash:null,[_y]:true});return Tf.set(i,null),i}let r=Wy(e.bytes);t?.onOwnedByteCopy?.(),t?.onHash?.();let o=a(r),a$1=Object.freeze({...e,request:n,bytes:r,actualHash:o,[_y]:true});return Tf.set(a$1,o),a$1}function Ga(e){return Tf.get(e)}var Vy=e=>{if(!Number.isFinite(e.heightEm)||!Number.isFinite(e.baselineEm)||e.heightEm<=0||e.heightEm>oI||e.baselineEm<0||e.baselineEm>e.heightEm)throw new RangeError("Font substitution line metrics must fit within a bounded em box");return Object.freeze({heightEm:e.heightEm,baselineEm:e.baselineEm})},$r=e=>(Hy(e),JSON.stringify([e.family.trim().toLowerCase(),e.weight,e.style])),Ff=class{[rI]=true;id;identity;request;family;byteLength;hash;faceIndex;substitution;constructor(t,n){if(t.id.length===0)throw new TypeError("Resolved font id must not be empty");if(!Number.isInteger(t.faceIndex)||t.faceIndex<0)throw new RangeError("Font face index must be a non-negative integer");this.id=t.id,this.request=Xr(t.request),this.family=this.request.family,this.hash=t.hash,this.faceIndex=t.faceIndex,this.identity=`${this.hash}#${this.faceIndex}`,this.byteLength=t.byteLength,this.substitution=null,n&&(this.substitution=Object.freeze({requested:Xr(n.requested),resolved:Xr(n.resolved),...n.lineMetrics?{lineMetrics:Vy(n.lineMetrics)}:{}})),Object.freeze(this);}get bytes(){return pd(this).slice()}},Ky=new WeakSet,$y=new WeakMap,Xy=new WeakMap,Uy=(e,t,n,r)=>{let o=new Ff(e,r);return $y.set(o,t),Xy.set(o,n),Ky.add(o),o},pd=e=>{Va(e);let t=$y.get(e);if(!t)throw new TypeError("Resolved font has no owned byte capability");return t},md=e=>{Va(e);let t=Xy.get(e);if(!t)throw new TypeError("Resolved font has no admitted table metadata");return t},Va=e=>{if(typeof e!="object"||e===null||!Ky.has(e))throw new TypeError("Shaping requires a validated resolved font")},Yy=(e,t)=>e[t]<<8|e[t+1],Ha=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,jy=(e,t)=>{if(t>e.byteLength-12)return {valid:false,diagnostic:"truncated sfnt header"};let n=String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3]);if(!(e[t]===0&&e[t+1]===1&&e[t+2]===0&&e[t+3]===0)&&n!=="OTTO"&&n!=="true"&&n!=="typ1")return {valid:false,diagnostic:"unsupported sfnt signature"};let o=Yy(e,t+4),a=t+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=t+12+i*16,l=Ha(e,s+8),d=Ha(e,s+12);if(l>e.byteLength||d>e.byteLength-l)return {valid:false,diagnostic:"sfnt table range exceeds font bytes"}}return {valid:true}},lI=(e,t)=>{let r=String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Ha(e,12+t*4):0,o=Yy(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)},gd=(e,t)=>{if(!Number.isSafeInteger(t)||t<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 t!==0?{valid:false,diagnostic:"standalone sfnt has only face index zero"}:jy(e,0);let r=Ha(e,4);if(r!==65536&&r!==131072)return {valid:false,diagnostic:"unsupported TTC version"};let o=Ha(e,8),a=12+o*4;if(o===0||!Number.isSafeInteger(a)||a>e.byteLength||t>=o)return {valid:false,diagnostic:"invalid TTC face directory"};let i=Ha(e,12+t*4);return i<a?{valid:false,diagnostic:"invalid TTC face offset"}:jy(e,i)},dI=(e,t,n,r)=>{if(e.availability==="forbidden")return {kind:"forbidden"};let o=Wa(e.bytes);if(o>t)return {kind:"overLimit",actual:o};let a$1=Ga(e),i=a$1===void 0?Wy(e.bytes):e.bytes;a$1===void 0&&r?.onOwnedByteCopy?.(),a$1===void 0&&r?.onHash?.();let s=a$1??a(i);if(e.hash!==s)return {kind:"hashMismatch",expectedHash:e.hash,actualHash:s};let l=gd(i,e.faceIndex);if(!l.valid)return {kind:"malformed",diagnostic:l.diagnostic};r?.onTableScan?.();let d=lI(i,e.faceIndex);try{let u=n(i,e.faceIndex);if(!u.valid)return {kind:"malformed",diagnostic:u.diagnostic}}catch(u){return {kind:"malformed",diagnostic:u instanceof Error?u.message:"font validator threw"}}let c={kind:"resolved",font:Uy({...e,byteLength:i.byteLength},i,d)};return r?.onAdmission?.(),c},If=e=>{let t=e.epoch,n=e.maxFontBytes,r=e.validateFont,o=e.instrumentation,a=e.resources,i=e.substitutions;if(!Number.isSafeInteger(t)||t<0)throw new RangeError("Font resource epoch must be a non-negative safe integer");if(!Number.isSafeInteger(n)||n<=0||n>za)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${za}`);if(typeof r!="function")throw new TypeError("Font snapshot requires a validator");let s=a.length,l=i?.length??0;if(s>hr)throw new RangeError(`Font source count must not exceed ${hr}`);if(l>hr)throw new RangeError(`Font substitution count must not exceed ${hr}`);let d=0,c=[];for(let g=0;g<s;g+=1){let h=a[g];if(Ga(h)!==void 0){let v=h.availability==="forbidden"?0:Wa(h.bytes);if(v>Kr-d)throw new RangeError(`Aggregate font bytes must not exceed ${Kr}`);d+=v,c.push(h);continue}let y=vf(h.request),b=h.id,x=h.hash,T=h.faceIndex,S=h.availability,I=S==="forbidden"?aI:h.bytes,F=S==="forbidden"?0:Wa(I);if(F>Kr-d)throw new RangeError(`Aggregate font bytes must not exceed ${Kr}`);d+=F,c.push(Object.freeze({request:y,id:b,bytes:I,hash:x,faceIndex:T,...S?{availability:S}:{}}));}let u=[];if(i)for(let g=0;g<l;g+=1){let h=i[g],y=vf(h.from),b=vf(h.to),x=h.lineMetrics;u.push(Object.freeze({from:y,to:b,...x?{lineMetrics:Object.freeze({heightEm:x.heightEm,baselineEm:x.baselineEm})}:{}}));}let f=new Map;for(let g of c){let h=$r(g.request);f.has(h)||f.set(h,dI(g,n,r,o));}let m=new Map;for(let g of u){let h=$r(g.from);m.has(h)||m.set(h,Object.freeze({to:Xr(g.to),...g.lineMetrics?{lineMetrics:Vy(g.lineMetrics)}:{}}));}return Object.freeze({epoch:t,resolve:g=>{let h=Xr(g),y=$r(h),b=m.get(y),x=b?.to??h,T=f.get($r(x));return T?T.kind==="forbidden"?new Vr("forbidden",h):T.kind==="overLimit"?new Vr("overLimit",h,{limit:n,actual:T.actual}):T.kind==="malformed"?new Vr("malformed",h,{diagnostic:T.diagnostic}):T.kind==="hashMismatch"?new Vr("hashMismatch",h,{expectedHash:T.expectedHash,actualHash:T.actualHash}):b?Uy({request:T.font.request,id:T.font.id,hash:T.font.hash,faceIndex:T.font.faceIndex,byteLength:T.font.byteLength},pd(T.font),md(T.font),{requested:h,resolved:b.to,...b.lineMetrics?{lineMetrics:b.lineMetrics}:{}}):T.font:new Vr("missing",h)}})};var Gn=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},hd=(e,t)=>{if(e.trim().length===0||/[\u0000-\u001f\u007f]/.test(e))throw new TypeError(`${t} must be non-blank and contain no control characters`)},cI=(e,t)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${t} must be a four-byte ASCII tag`)},qy=(e,t,n)=>{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(cI(a,`${t} key`),!Number.isFinite(i)||n&&(!Number.isSafeInteger(i)||i<0))throw new RangeError(`${t} value must be ${n?"a non-negative safe integer":"finite"}`);if(n&&i>4294967295)throw new RangeError(`${t} value must fit an unsigned 32-bit integer`);o[a]=i;}return Object.freeze(o)},kf=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),uI=e=>e?Object.freeze({requested:kf(e.requested),resolved:kf(e.resolved),...e.lineMetrics?{lineMetrics:Object.freeze({...e.lineMetrics})}:{}}):void 0,Zy=new WeakSet,Cf=e=>{if(Va(e),!Zy.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");Zy.add(e);}},Of=e=>(Cf(e),e),bd=e=>(Cf(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:kf(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:uI(e.substitution)??null})),Oo=e=>{if(hd(e.shapingLibrary.name,"shaping library name"),hd(e.shapingLibrary.version,"shaping library version"),hd(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(hd(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 t=Of(e.font),n=e.fallbackOrder.map(Of),r=new Set;for(let o of n){let a=JSON.stringify(bd(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:t,variationAxes:qy(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:qy(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...n]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Qy=e=>{let t=Oo(e);return Object.freeze({font:bd(t.font),variationAxes:Object.freeze(Object.entries(t.variationAxes).map(n=>Object.freeze(n))),shapingLibrary:Object.freeze({name:t.shapingLibrary.name,version:t.shapingLibrary.version}),unicodeDataVersion:t.unicodeDataVersion,normalization:t.normalization,script:t.script,language:t.language,direction:t.direction,features:Object.freeze(Object.entries(t.features).map(n=>Object.freeze(n))),fallbackOrder:Object.freeze(t.fallbackOrder.map(bd)),fixedPointScale:t.fixedPointScale,roundingMode:t.roundingMode})},Ef=e=>JSON.stringify(Qy(e)),ko=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},Rn=e=>{try{return Gn(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Jy=new WeakMap,yd=e=>{let t=Jy.get(e);if(t)return t;Cf(e);let n=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 Jy.set(e,n),n},xd=(e,t)=>{let n=Oo(t);if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("Shaped run direction must be ltr or rtl");if(e.direction!==n.direction)throw new TypeError("Shaped run direction does not match shaping environment");if(ko(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=>{ko(l.id,"glyph id"),ko(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:Rn(l.originX),originY:Rn(l.originY),advanceX:Rn(l.advanceX),advanceY:Rn(l.advanceY),offsetX:Rn(l.offsetX),offsetY:Rn(l.offsetY),outline:d})}),a=e.fontSpans.map(l=>{if(ko(l.glyphStart,"font span start"),ko(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&&ko(l.fallbackIndex,"fallback index");let d=Of(l.font);if(l.fallbackIndex===null){if(yd(d)!==yd(n.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=n.fallbackOrder[l.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(yd(d)!==yd(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]])ko(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:Rn(l.advance),caretEdges:Object.freeze(l.caretEdges.map(Rn))})}),s=Object.freeze({ascent:Rn(e.metrics.ascent),descent:Rn(e.metrics.descent),lineGap:Rn(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})},fI=(e,t)=>{let n=xd(e,t);return Object.freeze({text:n.text,direction:n.direction,script:t.script,language:t.language,bidiLevel:n.bidiLevel,glyphs:n.glyphs,clusters:n.clusters,fontSpans:Object.freeze(n.fontSpans.map(r=>Object.freeze({glyphStart:r.glyphStart,glyphEnd:r.glyphEnd,fallbackIndex:r.fallbackIndex,font:bd(r.font)}))),metrics:n.metrics})};var Co=Object.freeze({name:"HarfBuzz",version:"14.3.0"}),us=null,ds=null;function Lf(){return us?Promise.resolve():ds||(ds=import('./dist-OSUJGKTK.js').then(e=>{let t=e.versionString();if(t!==Co.version)throw new Xe("shapingLibraryMismatch",{diagnostic:f(Co.version,t)});us=e;}).catch(e$1=>{throw ds=null,e$1 instanceof Xe?e$1:c(e$1)?new Xe("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new Xe("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),ds)}function pI(){return us!==null}function mI(){if(!us)throw new Xe("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return us}var Xe=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},gI=16*1024*1024,hI=1e6,yI=1e6,bI=1e6,xI=4,SI=512,RI=1024*1024,PI=16*1024*1024,wI=32*1024*1024,vI=64*1024*1024,TI=64*1024*1024,FI=1e6,II=1e6,kI=1e6,OI=64,CI=4096,EI=4*1024*1024,MI=64*1024*1024,LI=64*1024*1024,BI=256*1024*1024,NI=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),eb=["cmap","head","hhea","hmtx","maxp"],AI=(e,t)=>e[t]<<8|e[t+1],DI=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,_I=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?DI(e,12+t*4):0,jI=(e,t)=>{let n=_I(e,t),r=AI(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},HI=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),zI=(e,t)=>{let n=gd(e,t);if(!n.valid)return n;let r=jI(e,t);for(let o of eb)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},Bf=zI,Vn=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},WI=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let d=i*2n;(d>t||d===t&&(n==="halfAwayFromZero"||n==="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},tb=(e,t,n,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n)||n<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");return Gn(WI(BigInt(e)*BigInt(n),BigInt(t),r))},GI=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>tb(i,a,o,r)},VI=(e,t)=>{if(t.length===0)return [];let n=[...new Set(t.map(i=>i.cluster))].sort((i,s)=>i-s),r=new Map;for(let i=0;i<n.length;i+=1)r.set(n[i],n[i+1]??e.length);let o=[],a=0;for(;a<t.length;){let i=t[a].cluster,s=a+1;for(;s<t.length&&t[s].cluster===i;)s+=1;let l=t.slice(a,s).reduce((c,u)=>c+u.advanceX,0),d=Gn(l);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:s,advance:d,caretEdges:Object.freeze([Gn(0),d]),fontSpan:0}),a=s;}return o},Kn=64,yr=8,Eo=8,KI=32,nb=Kn+2*yr,$I=Kn+yr+Eo,XI=Kn+yr+Eo,UI=Kn+yr+Eo,rb=Kn+8*yr,ob=Kn+8*Eo+yr,YI=Kn+6*Eo+yr,qI=Kn+3*Eo+2*yr,ZI=Kn+3*Eo,fs=e=>Kn+e.length*Uint16Array.BYTES_PER_ELEMENT,Nf=e=>UI+fs(e),cs=e=>KI+e*yr,JI=(e,t)=>nb+fs(e)+$I+Nf(t),QI=e=>rb+fs(e)+cs(e.length)+e.length*ob,ek=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return rb+fs(e.text)+cs(e.glyphs.length)+e.glyphs.length*ob+cs(e.clusters.length)+e.clusters.length*YI+e.clusters.reduce((n,r)=>n+cs(r.caretEdges.length),0)+cs(e.fontSpans.length)+e.fontSpans.length*qI+ZI+[...t].reduce((n,r)=>n+Nf(r.path),0)},tk=(e,t)=>nb+fs(e)+XI+t,Mf=class{#e;#s;#u;#f;#p;#y;#b;#m;#g;#l;#h;#d;#t;#o=new Map;#a=new Map;#n=new Map;#i=0;#r=0;#c;constructor(t,n){this.#e=t,this.#s=Vn(n.maxFontBytes??gI,"maximum font bytes",TI),this.#u=Vn(n.maxInputUtf16??hI,"maximum input UTF-16 code units",FI),this.#f=Vn(n.maxCodepoints??yI,"maximum input code points",II),this.#p=Vn(n.maxGlyphs??bI,"maximum shaped glyphs",kI),this.#y=Vn(n.maxCachedFaces??xI,"maximum cached faces",OI),this.#b=Vn(n.maxCachedShapes??SI,"maximum cached shape results",CI),this.#m=Vn(n.maxOutlineBytes??RI,"maximum outline bytes",EI),this.#g=Vn(n.maxCachedOutlineBytes??PI,"maximum cached outline bytes",MI),this.#l=Vn(n.maxShapedRunBytes??wI,"maximum shaped run bytes",LI),this.#h=Vn(n.maxCachedShapeBytes??vI,"maximum cached shape bytes",BI),this.#d=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#c=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#n.clear(),this.#i=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#c=void 0;}#S(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=md(t);for(let c of eb)if(!o.has(c))throw new Xe("malformedFont",{diagnostic:`missing required ${c} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(HI(n)),i=new this.#e.Face(a,t.faceIndex),s=new this.#e.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 Xe("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:t.identity,blob:a,face:i,font:s,unitsPerEm:i.upem};return this.#o.set(t.identity,d),this.#d?.(Object.freeze({kind:"created",identity:t.identity})),d}#R(t,n,r){let o=JSON.stringify([t.identity,t.unitsPerEm,r,n]),a=this.#a.get(o);if(a)return this.#a.delete(o),this.#a.set(o,a),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#i})),a.outline;this.#t?.onOutlinePathCall?.();let i=t.font.glyphToPath(n),s=Nf(i);if(s>this.#m)throw new Xe("outlineOverLimit",{limit:this.#m,actual:s});let l=Object.freeze({path:i,unitsPerEm:t.unitsPerEm}),d=JI(o,i);if(d>this.#g)return this.#t?.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.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#i}));}return this.#a.set(o,{outline:l,bytes:d}),this.#i+=d,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),l}#x(t){if(t.length>this.#u)throw new Xe("textOverLimit",{limit:this.#u,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#f)throw new Xe("codepointsOverLimit",{limit:this.#f,actual:n})}}shape(t){if(!this.#c)throw new Xe("disposed");if(Va(t.environment.font),t.environment.font.byteLength>this.#s)throw new Xe("fontOverLimit",{limit:this.#s,actual:t.environment.font.byteLength});this.#x(t.text);let n=QI(t.text);if(n>this.#l)throw new Xe("shapedRunOverLimit",{limit:this.#l,actual:n});let r=Oo(t.environment),o=JSON.stringify([t.text,t.fontSizeHalfPoints,t.bidiLevel,Ef(r)]),a=this.#n.get(o);if(a)return this.#n.delete(o),this.#n.set(o,a),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==Co.name||r.shapingLibrary.version!==Co.version)throw new Xe("shapingLibraryMismatch");if(r.normalization!=="none")throw new Xe("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r.direction==="rtl"))throw new Xe("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new Xe("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new Xe("unsupportedFallback");let i=pd(r.font),s=md(r.font);if([...NI].some(d=>s.has(d)))throw new Xe("unsupportedColorFont");let l=t.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.#e.Direction.RTL:this.#e.Direction.LTR),f.setScript(r.script),f.setLanguage(r.language),f.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let m=Object.entries(r.features).map(([w,k])=>new this.#e.Feature(w,k));this.#t?.onShapeCall?.(),this.#e.shape(u,f,m);let p=f.getGlyphInfosAndPositions();if(p.length>this.#p)throw new Xe("glyphOverLimit",{limit:this.#p,actual:p.length});let g=GI(c.upem,t.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),h=Gn(0),y=Gn(0),b=new Map,x=JSON.stringify(Object.entries(r.variationAxes).sort(([w],[k])=>w.localeCompare(k))),T=p.map(w=>{let k=g(w.xAdvance??0),P=g(w.yAdvance??0),O={id:w.codepoint,cluster:w.cluster,originX:h,originY:y,advanceX:k,advanceY:P,offsetX:g(w.xOffset??0),offsetY:g(w.yOffset??0),outline:b.get(w.codepoint)??(()=>{let L=this.#R(d,w.codepoint,x);return b.set(w.codepoint,L),L})()};return h=Gn(h+k),y=Gn(y+P),O}),S=u.hExtents(),I=xd({text:l,direction:r.direction,bidiLevel:t.bidiLevel,glyphs:T,clusters:VI(l,T),fontSpans:T.length===0?[]:[{glyphStart:0,glyphEnd:T.length,font:r.font,fallbackIndex:null}],metrics:{ascent:g(S.ascender),descent:g(-S.descender),lineGap:g(S.lineGap)}},r),F=ek(I);if(F>this.#l)throw new Xe("shapedRunOverLimit",{limit:this.#l,actual:F});let v=tk(o,F);if(v>this.#h)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),I;for(;this.#n.size>=this.#b||this.#r+v>this.#h;){let w=this.#n.keys().next().value;if(w===void 0)break;let k=this.#n.get(w);this.#n.delete(w),this.#r-=k.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o,{run:I,bytes:v}),this.#r+=v,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),I}catch(d){throw d instanceof Xe?d:new Xe("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},Af=(e={})=>new Mf(mI(),e);var ab=6,ib=14,sb=`fixed:char-width=${ab}:line-height=${ib}`;function Sd(e=ab,t=ib){let n=r=>r.fontSizePt/11;return {measure:(r,o)=>r.length*e*n(o)*(o.horizontalScalePercent/100)+r.length*o.characterSpacingPt,lineMetrics:r=>{let o=r.verticalAlign==="baseline"?1:.75,a=t*n(r)*o;return {height:a,baseline:a*.8}}}}var lb=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:4,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024});function db(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${a(new TextEncoder().encode(JSON.stringify(n)))}`}var nk=Object.freeze({}),cb=hr,rk="16.0.0",ok="none",ak=1e3,ik="halfToEven",pb="cluster-edges-only",sk="Latn",lk=new Uint8Array(0);var br=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function dk(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a=e.substitutions,i=e.defaultFont,s=e.language;if(!Number.isSafeInteger(r)||r<=0||r>za)throw new br(`Font byte ceiling must not exceed the engine hard maximum of ${za}`);let l=o.length,d=a?.length??0;if(l===0||l>hr)throw new br(`Font source count must be between 1 and ${hr}`);if(d>cb)throw new br(`Font substitution count must not exceed ${cb}`);let c=0,u=[];for(let p=0;p<l;p+=1){let g=o[p],h=g.request,y=g.availability,b=g.id,x=g.hash,T=g.faceIndex,S=y==="forbidden",I=S?lk:g.bytes;if(!S){if(typeof b!="string"||b.length===0)throw new TypeError("Resolved font id must not be empty");let F;try{F=Wa(I);}catch{throw new br(`Font source ${b} must provide genuine bytes`)}if(F>r)throw new br(`Font source ${b} exceeds the per-font byte ceiling`);if(c+=F,c>Kr)throw new br(`Font sources exceed the aggregate byte ceiling of ${Kr}`)}u.push(t&&Ga(g)!==void 0?g:Object.freeze({request:Object.freeze({family:h.family,weight:h.weight,style:h.style}),id:b,bytes:I,hash:x,faceIndex:T,...y?{availability:y}:{}}));}let f;if(a){f=[];for(let p=0;p<d;p+=1){let g=a[p],h=g.from,y=g.to,b=g.lineMetrics;f.push(Object.freeze({from:Object.freeze({family:h.family,weight:h.weight,style:h.style}),to:Object.freeze({family:y.family,weight:y.weight,style:y.style}),...b?{lineMetrics:Object.freeze({heightEm:b.heightEm,baselineEm:b.baselineEm})}:{}}));}}let m={epoch:n,maxFontBytes:r,sources:Object.freeze(u),substitutions:f?Object.freeze(f):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:s};return Object.freeze(m)}function ub(e,t){let n=e.map((o,a)=>({value:o,index:a,key:$r(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function ck(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function fb(e,t){let n=l=>({family:l.family,weight:l.weight,style:l.style}),r=t?e.sources:ub(e.sources,l=>l.request),o=e.substitutions??[],a=t?o:ub(o,l=>l.from),i={sources:r.map(l=>{let d=l.availability??"available",c={request:n(l.request),availability:d};if(d==="forbidden")return {...c,...t?{id:l.id,faceIndex:l.faceIndex,declaredHash:l.hash}:{}};let u=Ga(l);if(u==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...c,...t?{id:l.id}:{},faceIndex:l.faceIndex,declaredHash:l.hash,actualHash:u,byteLength:l.bytes.byteLength}}),substitutions:a.map(l=>({from:n(l.from),to:n(l.to),lineMetrics:l.lineMetrics?{heightEm:l.lineMetrics.heightEm,baselineEm:l.lineMetrics.baselineEm}:null})),defaultFont:ck(e.defaultFont,t),language:e.language||"en"},s={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?s:{},...i}}var uk=Symbol("prepared-layout-font-configuration"),Rd=new WeakMap;function fk(e){return Rd.has(e)}function pk(e){let t=Rd.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function Y1(e){let t=Rd.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function Df(e,t){return mb(e,t,false)}function q1(e,t){return mb(e,t,true)}function mb(e,t,n){let r=dk(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(u=>n&&Ga(u)!==void 0?u:Gy(u,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a$1=new TextEncoder,i=fb(o,true),s=a$1.encode(JSON.stringify(i)),l=fb(o,false),d=a$1.encode(JSON.stringify(l)),c=Object.freeze({[uk]:true,fingerprint:`font-config:${a(s)}`});return Rd.set(c,{configuration:o,sharedShapingFingerprint:`shared-font-config:${a(d)}`}),c}function mk(e){return Df(e).fingerprint}function gk(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:db(t),ligatureCaretPolicy:pb,fallback:sb}));return `shaping:${a(n)}`}async function gb(e,t,n,r){let a=fk(e)?e:Df(e,t),i=pk(a),{epoch:s,maxFontBytes:l,sources:d,substitutions:c,defaultFont:u}=i,f=i.language||"en",m=a.fingerprint,p=If({epoch:s,maxFontBytes:l,resources:d,substitutions:c,validateFont:Bf,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await Lf();let g=Object.freeze({script:sk,variationAxes:Object.freeze({}),shapingLibrary:Co,unicodeDataVersion:rk,normalization:ok,language:f,features:nk,fixedPointScale:ak,roundingMode:ik});return Object.freeze({fonts:p,shaper:n??Af(r),defaultFont:u,environment:g,ligatureCaretPolicy:pb,operation:Object.freeze({resourceEpoch:p.epoch,configEpoch:s,extensionFingerprint:m,shapingHash:gk(g,r),producerVersion:1})})}async function hk(e,t){return gb(e,t,void 0,lb)}async function Z1(e,t,n,r){return gb(e,r,t,n)}function yk(e){e.shaper.dispose?.();}var bk=/^[0-9A-Fa-f]{6}$/;function Pd(e){if(!(e===void 0||e==="auto"||e==="nil")&&bk.test(e))return e.toUpperCase()}function ps(e){if(e&&e.val!=="nil")return Pd(e.fill)}function _f(e){if(!e||e.localName!=="shd")return;let t={};for(let n of e.attributes)t[n.localName]=n.value;return ps(t)}function jf(e){let t;for(let n of e)n.localName==="shd"&&(t=ps(n.attributes));return t}function ms(e,t,n){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:t,y:r,width:n,height:Math.max(o.y+o.height-r,0)}}var Mo="http://schemas.microsoft.com/office/word/2010/wordml",hb=/^[0-9a-f]{6}$/i;function yb(e){if(e.namespaceUri!==Mo||e.localName!=="textOutline")return null;let t={localName:"textOutline"},n={};for(let s of e.attributes){if(s.namespaceUri!==Mo||!["w","cap","cmpd","algn"].includes(s.localName))return t;n[s.localName]=s.value;}if(n.cmpd!==void 0&&n.cmpd!=="sng"||n.algn!==void 0&&n.algn!=="ctr"||n.cap!==void 0&&!["flat","rnd","sq"].includes(n.cap)||!/^\d{1,8}$/.test(n.w??"")||Number(n.w)>20116800)return t;let r,o=false,a=false,i=false;if(e.children.length>7)return t;for(let s of e.children){if(s.kind==="textValue"){if(s.value.trim())return t;continue}if(s.namespaceUri!==Mo)return t;if(s.localName==="solidFill"&&!o&&s.attributes.length===0){if(o=true,s.children.length>3||s.children.some(u=>u.kind==="textValue"&&u.value.trim()))return t;let l=s.children.filter(u=>u.kind!=="textValue");if(l.length!==1)return t;let d=l[0];if(d.namespaceUri!==Mo||d.localName!=="srgbClr"||d.children.length!==0||d.attributes.length!==1)return t;let c=d.attributes[0];if(c.namespaceUri!==Mo||c.localName!=="val"||!hb.test(c.value))return t;r=c.value.toUpperCase();}else if(s.localName==="prstDash"&&!a){a=true;let l=s.attributes[0];if(s.children.length||s.attributes.length!==1||l?.namespaceUri!==Mo||l.localName!=="val"||l.value!=="solid")return t}else if(["round","bevel","miter"].includes(s.localName)&&!i){if(i=true,s.children.length)return t;if(s.localName==="miter"){if(s.attributes.length>1)return t;let l=s.attributes[0];if(l&&(l.namespaceUri!==Mo||l.localName!=="lim"||!/^\d{1,8}$/.test(l.value)))return t}else if(s.attributes.length)return t}else return t}return r&&Number(n.w)>0?{localName:"textOutline",attributes:{w:n.w,outlineColor:r}}:t}function bb(e){let t=e.attributes?.w,n=e.attributes?.outlineColor;if(!t||!/^\d{1,8}$/.test(t)||!n||!hb.test(n))return;let r=Number(t);return r>0&&r<=20116800?Object.freeze({widthPt:r/12700,color:n.toUpperCase()}):void 0}var xk=new Set(["b","bCs","caps","emboss","i","iCs","imprint","outline","shadow","smallCaps","strike","vanish"]);function $n(e){let t=e.attributes?.val;return t===void 0||!(t==="0"||t==="false"||t==="off")}var xb=new WeakMap;function wd(e){let t=[],n;for(let r of e){let o=r.role==="carried"?xb.get(r.properties):void 0,a;for(let i of r.properties){if(!xk.has(i.localName)){r.emit&&t.push(i);continue}o||(a||(a=new Map),a.set(i.localName,$n(i)));}if(o){if(o.size>0){n||(n=new Map);for(let[i,s]of o)n.set(i,s);}continue}if(a){n||(n=new Map);for(let[i,s]of a){let l=n.get(i);r.role==="direct"?n.set(i,{value:s,forced:false}):s?r.role==="defaults"?n.set(i,{value:true,forced:true}):n.set(i,{value:l?.forced===true?true:!(l?.value??false),forced:l?.forced===true}):n.set(i,{value:false,forced:false});}}}if(!n)return t;for(let[r,o]of n)t.push(o.value?{localName:r}:{localName:r,attributes:{val:"0"}});return xb.set(t,n),t}var Xn=Object.freeze({fontFamily:null,fontFamilyEastAsia: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}),Sk=/^[0-9A-Fa-f]{6}$/;function gs(e,t=false){return e===void 0||!(t?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function Sb(e){return e===void 0||e==="auto"?null:Sk.test(e)?e.toUpperCase():null}var Pb={major:null,minor:null,majorEastAsia:null,minorEastAsia:null};function He(e,t){let n={...Xn};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(t?b(o?.asciiTheme,t)??b(o?.hAnsiTheme,t):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(n.fontFamily=i);let l=(t?b(o?.eastAsiaTheme,t):null)??o?.eastAsia;l&&l.length<=128&&(n.fontFamilyEastAsia=l);break}case "sz":{let o=gs(r.attributes?.val);o!==null&&o>0&&(n.fontSizePt=o/2);break}case "color":{n.color=Sb(r.attributes?.val);break}case "b":n.bold=$n(r);break;case "textOutline":n.textOutline=bb(r);break;case "i":n.italic=$n(r);break;case "u":{let o=r.attributes?.val??"single";n.underline=o==="none"||!$n(r)?null:{variant:o,color:Sb(r.attributes?.color)};break}case "strike":n.strike=$n(r);break;case "dstrike":n.doubleStrike=$n(r);break;case "highlight":{let o=r.attributes?.val;n.highlight=o&&o!=="none"?o:null;break}case "shd":{n.shading=ps(r.attributes)??null;break}case "vertAlign":{let o=r.attributes?.val;o==="superscript"||o==="subscript"?n.verticalAlign=o:o==="baseline"&&(n.verticalAlign="baseline");break}case "position":{let o=gs(r.attributes?.val,true);o!==null&&(n.baselineShiftPt=o/2);break}case "caps":n.caps=$n(r);break;case "smallCaps":n.smallCaps=$n(r);break;case "spacing":{let o=gs(r.attributes?.val,true);o!==null&&(n.characterSpacingPt=o/20);break}case "w":{let o=gs(r.attributes?.val);o!==null&&o>0&&(n.horizontalScalePercent=o);break}case "kern":{let o=gs(r.attributes?.val);o!==null&&(n.kerningMinPt=o/2);break}case "vanish":n.hidden=$n(r);break;}return n}var Rb=new WeakMap;function vd(e,t){if(e.fontFamily===t)return e;let n=Rb.get(e);n||(n=new Map,Rb.set(e,n));let r=n.get(t);return r||(r=Object.freeze({...e,fontFamily:t}),n.set(t,r)),r}function Pn(e,t){return t.caps?e.toUpperCase():e}function Gt(e,t,n){return n.measure(Pn(e,t),t)}function Rk(e,t){return e.fontFamily===t.fontFamily&&e.fontFamilyEastAsia===t.fontFamilyEastAsia&&e.fontSizePt===t.fontSizePt&&e.color===t.color&&e.textOutline?.widthPt===t.textOutline?.widthPt&&e.textOutline?.color===t.textOutline?.color&&e.bold===t.bold&&e.italic===t.italic&&e.strike===t.strike&&e.doubleStrike===t.doubleStrike&&e.highlight===t.highlight&&e.shading===t.shading&&e.verticalAlign===t.verticalAlign&&e.baselineShiftPt===t.baselineShiftPt&&e.caps===t.caps&&e.smallCaps===t.smallCaps&&e.characterSpacingPt===t.characterSpacingPt&&e.horizontalScalePercent===t.horizontalScalePercent&&e.kerningMinPt===t.kerningMinPt&&e.hidden===t.hidden&&e.underline?.variant===t.underline?.variant&&e.underline?.color===t.underline?.color}function Hf(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}function wb(e){let t,n=false,r=false;for(let o of e)if(o.localName==="rFonts"&&o.attributes?.hint!==void 0)t=o.attributes.hint;else if(o.localName==="cs"||o.localName==="rtl"){let a=!["0","false","off"].includes(o.attributes?.val??"1");o.localName==="cs"?n=a:r=a;}return t==="eastAsia"&&!n&&!r}function vb(e,t,n){if(t?.toLowerCase()!=="times new roman")return false;let r,o,a=(i,s)=>((n?b(i,n):null)??s)?.toLowerCase()??null;for(let i of e){if(i.localName!=="rFonts")continue;let s=i.attributes;(s?.asciiTheme!==void 0||s?.ascii!==void 0)&&(r=a(s.asciiTheme,s.ascii)),(s?.hAnsiTheme!==void 0||s?.hAnsi!==void 0)&&(o=a(s.hAnsiTheme,s.hAnsi));}return r==null||o==null?true:r===o}function zf(e){return e===161||e===164||e>=167&&e<=168||e===170||e===173||e===175||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===215||e===247||e>=688&&e<=767||e>=880&&e<=975||e>=1024&&e<=1279||e>=8192&&e<=8202||e>=8208&&e<=8231||e>=8240&&e<=8287||e>=8304&&e<=8399||e>=8448&&e<=10175||e>=64256&&e<=64284}var Pk="und";function wk(){return typeof Intl.Segmenter=="function"}function vk(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function Tk(){let e=new(vk())("und",{granularity:"grapheme"});return {segment(t){let n=[],r=0;for(let o of e.segment(t)){let a=o.index,i=a+o.segment.length;n.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return n}}}var Vf=Tk(),Kf=Vf,Tb=0;function ys(){return Tb}var Ka=null,Lo=null,Td=null,hs=null;function Ye(e){if(Ka===e&&Lo)return Lo;if(Td===e&&hs){let n=hs;return Td=Ka,hs=Lo,Ka=e,Lo=n,n}let t=Kf.segment(e);return Td=Ka,hs=Lo,Ka=e,Lo=t,t}function Fk(e){Kf=e,Fb();}function Ik(){Kf=Vf,Fb();}function Fb(){Tb+=1,Ka=null,Lo=null,Td=null,hs=null,Wf=null,Fd=null,Gf=0;}function kk(e){return Ye(e).length}var Wf=null,Fd=null,Gf=0;function Ok(e){if(Wf===e&&Fd)return {offsets:Fd,count:Gf};let t=Ye(e),n=new Int32Array(e.length+1);for(let r of t)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)n[o]=r.index;return n[e.length]=t.length,Wf=e,Fd=n,Gf=t.length,{offsets:n,count:t.length}}function Id(e,t){let n=Math.max(0,Math.min(t,e.length)),{offsets:r}=Ok(e);return r[n]}function Ck(e,t){let n=Ye(e);if(n.length===0)return 0;let r=Math.max(0,Math.min(t,n.length));return r>=n.length?e.length:n[r].utf16From}var se=(e,t,n)=>e>=t&&e<=n,bs=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(t){super(`Unsupported Unicode script at U+${t.toString(16).toUpperCase()}`),this.codePoint=t;}},Ob=e=>{if(se(e,65313,65338)||se(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(se(e,1424,1535)||se(e,64285,64335))return {slot:"cs",script:"Hebr"};if(se(e,1536,1791)||se(e,1872,1919)||se(e,2160,2207)||se(e,2208,2303)||se(e,64336,65023)||se(e,65136,65279)||se(e,126464,126719))return {slot:"cs",script:"Arab"};if(se(e,4352,4607)||se(e,11904,12351)||se(e,12352,12543)||se(e,12544,12687)||se(e,12784,12799)||se(e,13312,19903)||se(e,19968,40959)||se(e,44032,55215)||se(e,63744,64255)||se(e,65382,65437)||se(e,65440,65500)||se(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(se(e,2304,2431)||se(e,43232,43263))return {slot:"cs",script:"Deva"};if(se(e,2432,2559))return {slot:"cs",script:"Beng"};if(se(e,880,1023)||se(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(se(e,1024,1327)||se(e,7296,7311)||se(e,11744,11775)||se(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(se(e,3584,3711))return {slot:"cs",script:"Thai"};if(se(e,6016,6143)||se(e,6624,6655))return {slot:"cs",script:"Khmr"};if(se(e,768,879)||se(e,6832,6911)||se(e,7616,7679)||se(e,8400,8447)||se(e,8192,8303)||se(e,65056,65071)||e<=47||se(e,58,64)||se(e,91,96)||se(e,123,191)||e===5760||se(e,8192,11263)||se(e,65024,65039)||se(e,65280,65381)||se(e,65438,65439)||se(e,65501,65535)||se(e,126976,129791)||se(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(se(e,192,687)||se(e,7424,7551)||se(e,7552,7615)||se(e,7680,7935)||se(e,11360,11391)||se(e,42784,43007)||se(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new bs(e)};function Ek(e){let t=[];for(let r=0;r<e.length;){let o=e.codePointAt(r),a=r+(o>65535?2:1);t.push({from:r,to:a,classified:Ob(o)}),r=a;}let n=null;for(let r of t)r.classified?n=r.classified:n&&(r.classified=n);n=null;for(let r=t.length-1;r>=0;r-=1){let o=t[r];o.classified?n=o.classified:n&&(o.classified=n);}return t}function Mk(e,t,n){let r=Ek(e),o=[],a=r.every(({from:i})=>e.codePointAt(i)<=127)?"ascii":"hAnsi";for(let i of r){let s=n.levels[t+i.from]??0,l=(s&1)===1?"rtl":"ltr",d=i.classified??{slot:a,script:"Zyyy"},c=o.at(-1);c&&c.to===i.from&&c.bidiLevel===s&&c.slot===d.slot&&c.script===d.script?o[o.length-1]={...c,to:i.to}:o.push({from:i.from,to:i.to,direction:l,bidiLevel:s,script:d.script,slot:d.slot});}return o}function ut(e,t){if(t!=="eastAsia")return e;let n=e.fontFamilyEastAsia;return n===null?e:vd(e,n)}var Ib=e=>{let t;try{t=Ob(e);}catch(n){if(n instanceof bs)return "base";throw n}return t===null?"common":t.slot==="eastAsia"?"eastAsia":"base"},kb=e=>{for(let t=0;t<e.length;t+=1)if(e.charCodeAt(t)>=128)return false;return true};function Cb(e,t=[]){let n=[],r=(m,p,g)=>{let h=n.at(-1);h&&h.segment===m&&h.to===p?n[n.length-1]={segment:m,from:h.from,to:g}:n.push({segment:m,from:p,to:g});},o=null,i=e.some((m,p)=>{if(!t[p]||kb(m))return false;for(let g of m)if(zf(g.codePointAt(0)))return true;return false})?Ye(e.join("")):null,s=0,l=0,d=false,c=[],u=m=>{for(let p of c)m==="eastAsia"&&!p.ascii&&r(p.segment,p.from,p.to);c.length=0;};for(let m=0;m<e.length;m+=1){let p=e[m],g=l;if(l+=p.length,!i&&kb(p)){/[0-9A-Za-z]/.test(p)&&(u("base"),o="base");continue}for(let h=0;h<p.length;){let y=p.codePointAt(h),b=h+(y>65535?2:1),x=false;if(i){let S=g+h;for(;i[s].utf16To<=S;)s+=1;let I=i[s];y=I.text.codePointAt(0),b=Math.min(p.length,I.utf16To-g),S===I.utf16From&&(d=!!t[m]&&zf(y)),x=d;}if(x){let S=Ib(y);S!=="common"&&(u(S),o=S),r(m,h,b),h=b;continue}let T=Ib(y);T==="common"?o===null?c.push({segment:m,from:h,to:b,ascii:y<=127}):o==="eastAsia"&&y>127&&r(m,h,b):(u(T),o=T,T==="eastAsia"&&r(m,h,b)),h=b;}}if(n.length<2)return n;n.sort((m,p)=>m.segment-p.segment||m.from-p.from);let f=[n[0]];for(let m=1;m<n.length;m+=1){let p=n[m],g=f[f.length-1];g.segment===p.segment&&p.from<=g.to?p.to>g.to&&(f[f.length-1]={...g,to:p.to}):f.push(p);}return f}function $f(e){let t=new Set([0,e.text.length]);for(let r of Ye(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function kd(e,t){return $f(e).includes(t)}function Lk(e,t){return kd(e,t)}function Bk(e,t,n){return n>=t&&kd(e,t)&&kd(e,n)}function Nk(e){let t=Ye(e.text);return $f(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var Uf="und";function Bb(){return typeof Intl.Segmenter=="function"}function Ak(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Uf})`);return e}function Nb(){let e=new(Ak())(Uf,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var Dk=/^[\p{L}\p{N}']$/u,_k=/^\s$/u;function Eb(e){return Dk.test(e)}function Mb(e){return _k.test(e)}function Xf(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function Ab(e){let t=Ye(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(Mb(o.text)){let a=r+1;for(;a<t.length&&Mb(t[a].text);)a+=1;n.push(Xf(t,r,a,false)),r=a;continue}if(Eb(o.text)){let a=r+1;for(;a<t.length&&Eb(t[a].text);)a+=1;n.push(Xf(t,r,a,true)),r=a;continue}n.push(Xf(t,r,r+1,false)),r+=1;}return n}function Db(){return {segment:Ab}}function _b(e={}){let t=e.isIntlAvailable??Bb,n=e.createIntlBoundary??Nb,r=e.createFallbackBoundary??Db;if(!t())return r();try{return n()}catch{return r()}}var Lb;function jb(){return Lb??=_b(),Lb}function jk(e,t=jb()){return t.segment(e)}function Hk(e,t){return t.map(n=>({graphemeFrom:Id(e,n.utf16From),graphemeTo:Id(e,n.utf16To),wordLike:n.wordLike}))}var Hb={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},Zf=Object.keys(Hb),zb=Zf.filter(e=>Hb[e]==="coarse-gate"),Od=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},$a=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},zk={resourceEpoch:Od,configEpoch:Od,extensionFingerprint:$a,shapingHash:$a,producerVersion:Od},Wk=(e,t)=>{zk[t](e[t],t);},Xa=e=>{for(let t of Zf)Wk(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},Gk=(e,t)=>{let n=Xa(e),r=Xa(t),o=Zf.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},Yf=e=>{let t=e.map(({key:n,fingerprint:r})=>($a(n,"resource dependency key"),$a(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},Vk=e=>(Od(e.revision,"revision"),$a(e.dependencyFingerprint,"dependencyFingerprint"),$a(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:Yf(e.resourceDependencies),...Xa(e)})),Kk=(e,t)=>{let n=Yf(e),r=Yf(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[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 $k(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=Kk(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of zb)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var qf=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=$k(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:Vk(r)});}evictEpoch(t){let n=Xa(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;zb.some(s=>i[s]!==n[s])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=Xa(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(l=>n.get(l.key)!==l.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function Cd(e,t,n){return Object.freeze({x:e.horizontalFrame==="page"?n.x+e.x-e.horizontalFrameOrigin:t.x+e.x,y:e.verticalFrame==="page"?n.y+e.y-e.verticalFrameOrigin:t.y+e.y})}function Je(e,t=false){return It(e.fragments,t)}var Wb=new WeakMap;function It(e,t=false){let n=Wb.get(e),r=t?"withRepeats":"withoutRepeats",o=n?.[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&&!t))for(let c of d.cells)i(c.blocks);}};return i(e),n||(n={},Wb.set(e,n)),n[r]=a,a}function Jf(e){let t=[];for(let n of e.pages)for(let r of Je(n))t.push(...r.lines);return t}function Xk(e){return e.anchoredDrawings??[]}var Uk=Object.freeze({x:0,y:0,width:0,height:0});function Ua(e){let t=e??Uk;return {box:t,origin:Object.freeze({x:t.x,y:t.y})}}var Yk={fragments:true,anchoredDrawings:true,header:true,footer:true,footnotes:true,endnotes:true},qk=Object.freeze(Object.keys(Yk));var Zk={separator:true,notes:true},Jk=Object.freeze(Object.keys(Zk));function Gb(e,t,n,r){let o=t.kind??(n==="footnote"?"footnotes":"endnotes");for(let a of Jk)switch(a){case "separator":t.separator&&r({page:e,story:"note-separator",host:t.separator,...Ua(t.separator.box),noteScopeId:null,noteAreaKind:o});break;case "notes":for(let i of t.notes)switch(n){case "footnote":r({page:e,story:"footnote",host:i,...Ua(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;case "endnote":r({page:e,story:"endnote",host:i,...Ua(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;}break;}}function Qk(e,t){for(let n of qk)switch(n){case "fragments":t({page:e,story:"body",host:e,...Ua(e.contentBox),noteScopeId:null,noteAreaKind:null});break;case "anchoredDrawings":break;case "header":e.header&&t({page:e,story:"header",host:e.header,...Ua(e.header.box),noteScopeId:null,noteAreaKind:null});break;case "footer":e.footer&&t({page:e,story:"footer",host:e.footer,...Ua(e.footer.box),noteScopeId:null,noteAreaKind:null});break;case "footnotes":e.footnotes&&Gb(e,e.footnotes,"footnote",t);break;case "endnotes":e.endnotes&&Gb(e,e.endnotes,"endnote",t);break;}}function xs(e,t){for(let n of e.pages)Qk(n,t);}var Vb=16,Qf=Object.freeze({x:0,y:0});function Kb(e,t,n){let r=t.textboxStory?.contentOffset??Qf,o=n??{x:e.x+t.x,y:e.y+t.y};return Object.freeze({x:o.x+r.x,y:o.y+r.y})}function Ya(e,t,n=Qf,r){let o=(i,s)=>{if(i.kind==="table"){for(let l of i.rows)for(let d of l.cells)for(let c of d.blocks)o(c,s);return}for(let l of i.lines)for(let d of l.drawings??[])t(d,{...s,paragraph:i,line:l});},a=(i,s,l,d)=>{if(s>Vb)return;let c={storyOrigin:d,textboxDepth:s,textboxOwner:l[l.length-1]??null,textboxPath:l};for(let u of i.anchoredDrawings??[])t(u,{...c,paragraph:null,line:null}),u.textboxStory&&a(u.textboxStory,s+1,Object.freeze([...l,u]),Kb(d,u,s===0?r?.(u):void 0));for(let u of i.fragments)o(u,c);};a(e,0,Object.freeze([]),n);}function $b(e,t){xs(e,n=>{let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:s}=n,l=o==="header"||o==="footer"?d=>Cd(d,n.origin,{x:r.box.x,y:r.box.y}):void 0;Ya(a,(d,c)=>{let u=d.kind==="anchoredDrawing"&&c.textboxDepth===0&&l?l(d):Object.freeze({x:c.storyOrigin.x+d.x,y:c.storyOrigin.y+d.y}),f=m=>Object.freeze({x:u.x+m.x-d.x,y:u.y+m.y-d.y,width:m.width,height:m.height});t({page:r,story:c.textboxDepth===0?o:"textbox",rootStory:o,noteScopeId:i,noteAreaKind:s,root:n,drawingOrigin:u,absolutePaintBounds:f(d.paintBounds),absoluteHitBounds:f(d.hitBounds),paintLayer:d.kind==="inlineDrawing"?"inline":d.behindDocument?"behind-text":"in-front-of-text",drawing:d,...c});},n.origin,l);});}function Bo(e,t,n=Qf,r){let o=(a,i,s,l)=>{if(!(i>Vb)){for(let d of It(a.fragments,true))t(d,{storyOrigin:l,textboxDepth:i,textboxOwner:s[s.length-1]??null,textboxPath:s});for(let d of a.anchoredDrawings??[])d.textboxStory&&o(d.textboxStory,i+1,Object.freeze([...s,d]),Kb(l,d,i===0?r?.(d):void 0));}};o(e,0,Object.freeze([]),n);}function Xb(e,t){let n=[];for(let r of e.pages)for(let o of Je(r))o.paragraphId===t&&n.push(o);return n.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function Ss(e,t,n,r){for(let o of r??Jf(e)){let a=o.range.paragraphId===t?o.range.start:Number.NaN,i=o.range.paragraphId===t?o.range.end:Number.NaN;for(let s of o.spans)s.range.paragraphId===t&&(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===t&&(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)&&n>=a&&n<=i)return o}return null}function Ed(e){return e.contentControls??[]}function Rs(e){if(e.length===0)return null;let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:t,y:n,width:r-t,height:o-n}}function Md(e){let t=false,n=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(t=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(n=true);return t&&n?"sdtContentLocked":t?"contentLocked":n?"sdtLocked":"unlocked"}var Ps=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});var Ub=new WeakMap;function ep(e){let t=Ub.get(e);if(t)return t;let n=[...Je(e)];for(let r of [e.header,e.footer])r&&n.push(...It(r.fragments));for(let r of [e.footnotes,e.endnotes])if(r)for(let o of r.notes)n.push(...It(o.fragments));return Ub.set(e,n),n}function Zb(e,t,n){return e.paragraphId===t&&n>=e.start&&n<e.end}var Yb=new WeakMap;function qe(e){let t=Yb.get(e);if(t)return t;let n={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)||(e.drawings??[]).some(a=>a.paragraphId!==e.range.paragraphId)?eO(e):[n];return Yb.set(e,o),o}function eO(e){let t=[...e.spans.map((r,o)=>({paragraphId:r.range.paragraphId,x:r.box?.x??o,order:o*2+1})),...(e.drawings??[]).map((r,o)=>({paragraphId:r.paragraphId,x:r.advanceStart??r.x??e.spans.length+o,order:o*2}))].sort((r,o)=>r.x-o.x||r.order-o.order),n=[];for(let r of t)n.includes(r.paragraphId)||n.push(r.paragraphId);return n.map(r=>{let o=e.spans.filter(c=>c.range.paragraphId===r),a=(e.drawings??[]).filter(c=>c.paragraphId===r),i=[...o.map(c=>c.range.start),...a.map(c=>c.start)],s=[...o.map(c=>c.range.end),...a.map(c=>c.start+1)],l=i[0],d=s[0];for(let c=1;c<i.length;c+=1)i[c]<l&&(l=i[c]),s[c]>d&&(d=s[c]);return {paragraphId:r,start:l,end:d,spans:o,drawings:a}})}function Un(e,t){return qe(e).find(n=>n.paragraphId===t)??null}function No(e,t,n,r,o=Ao(e)){if(n.paragraphId===r.paragraphId){if(t.paragraphId!==n.paragraphId)return null;let c=Math.max(t.start,n.offset),u=Math.min(t.end,r.offset);return u>c?{start:c,end:u}:null}let a=o.get(t.paragraphId),i=o.get(n.paragraphId),s=o.get(r.paragraphId);if(a===void 0||i===void 0||s===void 0||a<i||a>s)return null;let l=a===i?Math.max(t.start,n.offset):t.start,d=a===s?Math.min(t.end,r.offset):t.end;return d>l?{start:l,end:d}:null}function O_(e,t){for(let n of e.pages)for(let r of Je(n)){let o=Ur(r).indexOf(t);if(o>0)return Ur(r).slice(0,o).reverse()}return []}var qb=new WeakMap;function Ur(e){let t=qb.get(e);if(t)return t;let n=[];for(let r of e.lines??[])for(let o of qe(r))n.includes(o.paragraphId)||n.push(o.paragraphId);return n.includes(e.paragraphId)||n.push(e.paragraphId),qb.set(e,n),n}function tO(e,t){let n=Ur(e);if(n.length===1)return n[0]===t?{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=Un(a,t);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function xr(e,t,n){let r=tO(e,t);return r!==null&&n>=r.start&&n<r.end}function C_(e,t){for(let n of e.pages)for(let r of ep(n))if(r.paragraphId===t)return r;for(let n of e.pages)for(let r of ep(n))if(Ur(r).includes(t))return r;return null}var Jb=new WeakMap,Qb=new WeakMap,ex=new WeakMap,tx=new WeakMap;function nx(e){let t=tx.get(e);if(t)return t;let n=new Set,r=[];for(let o of Je(e)){for(let a of o.lines)for(let i of qe(a))n.has(i.paragraphId)||(n.add(i.paragraphId),r.push(i.paragraphId));o.lines.length===0&&!n.has(o.paragraphId)&&(n.add(o.paragraphId),r.push(o.paragraphId));}return tx.set(e,r),r}function Do(e){let t=Jb.get(e);if(t)return t;let n=new Set,r=[];for(let o of e.pages)for(let a of nx(o))n.has(a)||(n.add(a),r.push(a));return Jb.set(e,r),r}function Ao(e){let t=Qb.get(e);if(t)return t;let n=new Map;for(let[r,o]of Do(e).entries())n.set(o,r);return Qb.set(e,n),n}function Ld(e){let t=ex.get(e);if(t)return t;let n=new Set,r=[],o=a=>{for(let i of It(a)){for(let s of i.lines)for(let l of qe(s))n.has(l.paragraphId)||(n.add(l.paragraphId),r.push(l.paragraphId));i.lines.length===0&&!n.has(i.paragraphId)&&(n.add(i.paragraphId),r.push(i.paragraphId));}};for(let a of e.pages){for(let i of nx(a))n.has(i)||(n.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 ex.set(e,r),r}function rx(e){return e.projected===true?null:e.range}function nO(e,t,n){let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:s}=e,l=o==="header"||o==="footer"?d=>Cd(d,e.origin,{x:r.box.x,y:r.box.y}):void 0;Bo(a,(d,c)=>{let{textboxDepth:u,textboxOwner:f,textboxPath:m,storyOrigin:p}=c,g=u===0?o:"textbox";for(let h of d.lines){let y=[...qe(h)].sort((b,x)=>(t.get(b.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(x.paragraphId)??Number.MAX_SAFE_INTEGER));for(let b of y)for(let x of b.spans)n({page:r,story:g,rootStory:o,root:e,storyOrigin:p,absoluteBox:Object.freeze({x:p.x+x.box.x,y:p.y+x.box.y,width:x.box.width,height:x.box.height}),noteScopeId:i,noteAreaKind:s,textboxDepth:u,textboxOwner:f,textboxPath:m,paragraph:d,paragraphId:b.paragraphId,line:h,span:x,sourceRange:rx(x)});}},e.origin,l);}function rO(e,t){let n=new Map(Ld(e).map((r,o)=>[r,o]));xs(e,r=>nO(r,n,t));}var ox=4096,Dt=64,op=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),ax=/\s*\\\*\s*MERGEFORMAT\s*$/i;function _o(e){if(e.length>ne)return null;let t=e.replace(/\s+/g," ").trim().toUpperCase();return t.length>ne?null:t.replace(ax,"").trim()}var oO=/\s*\\#\s*(?:"([^"]*)"|([^\\"]+))$/;function aO(e){if(e.length>ne)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>ne)return null;let n=t.replace(ax,"").trim(),r=oO.exec(n);if(!r)return {keyword:n.toUpperCase(),picture:void 0};let o=r[1]??r[2]??"";return {keyword:n.slice(0,r.index).trim().toUpperCase(),picture:o.length>0?o:void 0}}function qa(e){let t=aO(e);if(t===null)return null;let{keyword:n,picture:r}=t;return n!=="PAGE"&&n!=="NUMPAGES"&&n!=="SECTIONPAGES"?null:r===void 0?{kind:n}:{kind:n,picture:r}}function Yr(e){return qa(e)?.kind??null}function vt(e,t){return ae(e,t)}function Sr(e){return be(e)}function Rr(){return {nodes:0,exhausted:false}}function st(e){return e.exhausted?false:(e.nodes+=1,e.nodes>ox?(e.exhausted=true,false):true)}function jo(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function ws(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 Za(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function iO(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function Ho(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>oe?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function Ja(e){return e.nesting<2||e.nesting>oe?null:e.inner[e.nesting-2]??null}function ix(e){if(e.nesting===1)return e.phase==="instruction";let t=Ja(e);return t!==null&&!t.separated}function np(e,t){if(!ix(e))return false;if(e.nesting===1)return t?!e.deletedInstructionOverflow:!e.instructionOverflow;let n=Ja(e);return t?!n.deletedOverflow:!n.overflow}function sx(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let t=Ja(e);t&&(t.sawLive=true);}function rp(e,t){if(e.nesting===1){t?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let n=Ja(e);n&&(t?(n.deletedOverflow=true,n.deletedInstruction=""):(n.overflow=true,n.instruction=""));}function tp(e){rp(e,false),rp(e,true);}function sO(e,t,n=false){if(!np(e,n))return;let r=Ja(e);n||sx(e);let o=r?n?r.deletedInstruction:r.instruction:n?e.deletedInstruction:e.instruction;if(o.length+t.length>ne){rp(e,n);return}r?n?r.deletedInstruction=o+t:r.instruction=o+t:n?e.deletedInstruction=o+t:e.instruction=o+t;}function zo(e,t,n,r){if(!ix(e))return;let o=ce(t);if(o||sx(e),!np(e,o))return;if(r>Dt){tp(e);return}let a=[],i=t.kind==="textValue"?[]:t.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(!st(n)){tp(e);return}if(s.depth>Dt){tp(e);return}if(s.node.kind==="textValue"){if(sO(e,s.node.value,o),!np(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 Wo(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=Za(e);return r.overflow?null:qa(r.instruction)}let t=Ja(e);if(!t||t.separated)return null;t.separated=true;let n=iO(t);return n.overflow?null:qa(n.instruction)}function Go(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&ws(e);}function lx(e){return e.phase==="instruction"&&e.nesting>=1}function dx(e){return e.phase==="result"&&e.nesting>=1}function ap(e){let t=false,n=false,r=false,o=Rr(),a=jo(),i=()=>t&&n&&r,s=m=>{m==="PAGE"?t=true:m==="NUMPAGES"?n=true:r=true;},l=false,d=[],c=(m,p)=>{if(m.kind!=="runProperties"){if(vt(m,"begin")){Ho(a),a.nestingOverflow&&(l=true);return}if(Sr(m)){zo(a,m,o,p);return}if(vt(m,"separate")){let g=a.nesting,h=a.phase,y=Wo(a);if(l)return;y&&(g<=1||h==="result")&&d.push(y.kind);return}if(vt(m,"end")&&(Go(a),a.nesting===0)){if(!l)for(let g of d)s(g);d.length=0;}}},u=(m,p)=>{if(m.kind==="run")for(let g of m.children){if(!st(o))return;if(c(g,p+1),(g.kind==="drawing"||g.kind==="generic")&&!Sr(g)&&"children"in g&&g.children.length>0){let h={...a,inner:a.inner.map(x=>({...x}))},y=l,b=d;d=[],f(g,p+1),Object.assign(a,h),l=y,d=b;}if(i()||o.exhausted)return}},f=(m,p)=>{if(!i()&&st(o)&&!(p>Dt)&&m.kind!=="textValue"){if(m.kind==="paragraph"){ws(a),l=false,d.length=0;for(let g of m.children)if(f(g,p+1),i()||o.exhausted)return;ws(a),l=false,d.length=0;return}if(m.kind==="run"){u(m,p);return}if(de(m)){let g=Yr(fe(m)??"");if(g){s(g);return}}for(let g of m.children)if(f(g,p+1),i()||o.exhausted)return}};return f(e,0),!t&&!n&&!r?op:{hasPage:t,hasNumPages:n,hasSectionPages:r}}function Bd(e,t){if(!Number.isFinite(e)||e<0||t.length===0||t.length>64||t.includes(".")||t.includes(";")||t.includes("'"))return null;let n=String(Math.floor(e)),r=[],o=false;for(let p=0;p<t.length;p+=1)r.push(o),t[p]==="0"&&(o=true);let a=n.length,i=false,s=0,l=0,d=[],c=-1;for(let p=t.length-1;p>=0;p-=1){let g=t[p];if(g==="0"||g==="#"){i=true,s+=1,c=d.length,a>0?(a-=1,d.push(n[a])):d.push(g==="0"?"0":" ");continue}if(g===","){l===0&&(l=s),s=0,(a>0||r[p])&&(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(n[a]);let f=d.slice(c+1).reverse().join(""),m=d.slice(0,c+1).reverse().join("");return f+u.reverse().join("")+m}var lO=64,dO=64,cO=[{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 Pr(e){if(!Number.isFinite(e))return 1;let t=Math.trunc(e);return t<0?1:t>9999?9999:t}function qr(e){return String(Pr(e))}function cx(e){let t=Pr(e);return t<10?`0${t}`:String(t)}function ip(e){let t=Pr(e);t>3999&&(t=3999);let n="";for(let{value:r,glyph:o}of cO)for(;t>=r;)if(n+=o,t-=r,n.length>=64)return n.slice(0,64);return n||"I"}function ux(e){return ip(e).toLowerCase()}function sp(e){let t=Pr(e),n="";for(;t>0&&n.length<8;)t-=1,n=String.fromCharCode(65+t%26)+n,t=Math.floor(t/26);return n||"A"}function fx(e){return sp(e).toLowerCase()}function uO(e){let t=Pr(e),n=t%100,r=t%10,o=n>=11&&n<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${t}${o}`}function fO(e){return Pr(e).toString(16).toUpperCase()}function pO(e){let t=["*","\u2020","\u2021","\xA7"],n=Pr(e);if(n<=0)return t[0];let r=(n-1)%t.length,o=Math.min(Math.floor((n-1)/t.length)+1,mO);return t[r].repeat(o)}var mO=8,Nd=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],gO=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Ad(e){let t=Pr(e);if(t<20)return Nd[t];if(t<100){let r=t%10;return gO[Math.floor(t/10)]+(r===0?"":`-${Nd[r]}`)}if(t<1e3){let r=t%100;return `${Nd[Math.floor(t/100)]} hundred${r===0?"":` ${Ad(r)}`}`}let n=t%1e3;return `${Nd[Math.floor(t/1e3)]} thousand${n===0?"":` ${Ad(n)}`}`}function px(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function hO(e){return px(Ad(e))}var yO=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function bO(e){let t=yO.get(e);return t!==void 0?t:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function xO(e){let t=Ad(e),n=Math.max(t.lastIndexOf(" "),t.lastIndexOf("-")),r=n<0?"":t.slice(0,n+1);return px(r+bO(t.slice(n+1)))}function wn(e,t){switch(e){case "decimal":return qr(t);case "decimalZero":return cx(t);case "upperRoman":return ip(t);case "lowerRoman":return ux(t);case "upperLetter":return sp(t);case "lowerLetter":return fx(t);case "ordinal":return uO(t);case "cardinalText":return hO(t);case "ordinalText":return xO(t);case "hex":return fO(t);case "chicago":return pO(t);case "numberInDash":return `- ${qr(t)} -`;case "none":case "bullet":return "";default:return qr(t)}}function Dd(e,t,n){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=n[l]??"decimal",c=t[l]??1,u=d==="bullet"?"":wn(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}function vn(e){return "outOfFlow"in e&&e.outOfFlow===true}var Qa="0";function Zr(e,t){return e!=="PAGE"||!t||t==="decimal"}function _d(e,t,n){return t===void 0||!Zr(e,n)?Qa:Bd(0,t)??Qa}function ti(e,t){if(!Number.isFinite(e)||e<0)return "";let n=Math.floor(e),r=t&&t.length>0?t:"decimal";if(r==="none"||r==="bullet")return qr(n);let o=wn(r,n);return o.length>0?o:qr(n)}function wr(e,t,n){if(e==="PAGE"){if(n!==void 0&&Zr(e,t.format)){let o=Bd(t.pageNumber,n);if(o!==null)return o}return ti(t.pageNumber,t.format)}let r=e==="NUMPAGES"?t.pageCount:t.sectionPageCount??t.pageCount;if(!Number.isFinite(r)||r<0)return "";if(n!==void 0){let o=Bd(r,n);if(o!==null)return o}return qr(Math.floor(r))}function Jr(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function cp(e,t=op){if(!e||!Jr(t))return "";let n=[];return t.hasPage&&(n.push(`p${e.pageNumber}`),e.format&&n.push(`f${e.format}`)),t.hasNumPages&&n.push(`n${e.pageCount}`),t.hasSectionPages&&n.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${n.join("/")}`}function ni(e,t,n,r){let o=false,a=e.map((i,s)=>{let l=t+s,d=i.pageFieldSource;return d&&d.pageNumber===l&&d.sectionPageCount===n&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:l,sectionPageCount:n,...r?{format:r}:{}}})});return o?a:e}function SO(e){for(let t of e.spans)if(t.fieldAtom?.pageField||t.fieldAtom?.pageRef)return true;return false}function gx(e){if(e.kind==="paragraph"){for(let t of e.lines)if(SO(t))return true;return false}for(let t of e.rows)for(let n of t.cells)for(let r of n.blocks)if(gx(r))return true;return false}function up(e,t){let n=t,r=false;for(let o of e)vn(o)||(n=Math.max(n,o.box.y+o.box.height)),!r&&gx(o)&&(r=true);return {usedBottom:n,hasBodyPageFields:r}}var lp=new WeakMap;function fp(e,t,n,r){let o=lp.get(e);if(o)return t.length>0&&n!==t&&o.revision===r?(lp.delete(e),false):true;let a=t.length===0||t===n;return a&&Number.isFinite(r)&&lp.set(e,{revision:r}),a}function hx(e,t){if(e.kind==="paragraph"){for(let n of e.lines)for(let r of n.spans){let o=r.fieldAtom?.pageRef?.targetParagraphId;o!==void 0&&t.add(o);}return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)hx(o,t);}function yx(e,t,n,r){if(e.kind==="paragraph"){t.has(e.paragraphId)&&!r.has(e.paragraphId)&&r.set(e.paragraphId,n);return}for(let o of e.rows)for(let a of o.cells)for(let i of a.blocks)yx(i,t,n,r);}var mx=new WeakMap;function jd(e){let t=mx.get(e);if(t!==void 0)return t;let n=RO(e);return mx.set(e,n),n}function RO(e){let t=null;for(let o of e)if(o.hasBodyPageFields!==false)for(let a of o.fragments)hx(a,t??=new Set);if(!t||t.size===0)return null;let n=new Map;for(let o of e){if(n.size>=t.size)break;let a=o.pageFieldSource,i={pageNumber:a?.pageNumber??o.index+1,...a?.format?{format:a.format}:{}};for(let s of o.fragments)yx(s,t,i,n);}let r="";for(let[o,a]of n)r+=`${o}@${a.pageNumber}/${a.format??""};`;return {hosts:n,token:r}}function pp(e){return jd(e)?.token??""}function PO(e,t,n){let r=null;for(let o=0;o<e.spans.length;o+=1){let a=e.spans[o],i=a.fieldAtom?.pageRef;if(i){let d=n?.hosts.get(i.targetParagraphId);if(!d)continue;let c=ti(d.pageNumber,d.format);if(c.length===0)continue;let f=fp(i.calibration,i.cached,c,n.revision)?c:i.cached;if(f.length===0||f===a.text)continue;r||(r=e.spans.slice()),r[o]={...a,text:f};continue}let s=a.fieldAtom?.pageField;if(!s)continue;let l=wr(s.kind,t,s.picture);l!==a.text&&(r||(r=e.spans.slice()),r[o]={...a,text:l});}return r?{...e,spans:r}:e}function bx(e,t,n){let r=null;for(let o=0;o<e.length;o+=1){let a=e[o],i=a;if(a.kind==="paragraph"){let s=null;for(let l=0;l<a.lines.length;l+=1){let d=a.lines[l],c=PO(d,t,n);c!==d&&(s||(s=a.lines.slice()),s[l]=c);}s&&(i={...a,lines:s});}else {let s=null;for(let l=0;l<a.rows.length;l+=1){let d=a.rows[l],c=null;for(let u=0;u<d.cells.length;u+=1){let f=d.cells[u],m=bx(f.blocks,t,n);m!==f.blocks&&(c||(c=d.cells.slice()),c[u]={...f,blocks:m});}c&&(s||(s=a.rows.slice()),s[l]={...d,cells:c});}s&&(i={...a,rows:s});}i!==a&&(r||(r=e.slice()),r[o]=i);}return r??e}var ei=new WeakMap;function Z_(e){for(let t of Array.isArray(e.pages)?e.pages:[])t.header&&ei.delete(t.header),t.footer&&ei.delete(t.footer);}function wO(e,t){return e.pageNumber===t.pageNumber&&e.pageCount===t.pageCount&&(e.sectionPageCount??e.pageCount)===(t.sectionPageCount??t.pageCount)&&e.format===t.format}function mp(e,t,n){let r=ei.get(e);r&&ei.set(t,{context:r.context,projector:r.projector,dy:r.dy+n});}var dp=new WeakMap;function Qr(e){let t=e.pages.length;if(t===0)return e;let n=jd(e.pages),r=n?.token??"",o=false,a=e.pages.map(i=>{let s=dp.get(i);if(s&&s.pageCount===t&&s.pageRefToken===r)return s.result!==i&&(o=true),s.result;let l=i.pageFieldSource,d={pageNumber:l?.pageNumber??i.index+1,pageCount:t,sectionPageCount:l?.sectionPageCount??t,...l?.format?{format:l.format}:{}},c=g=>{if(!g)return g;let h=g.pageFieldProjector,y=0;if(!h){let F=ei.get(g);if(!F||wO(F.context,d))return g;h=F.projector,y=F.dy;}o=true;let b=h(d),{pageFieldProjector:x,box:T,...S}=b,I={...S,box:y===0?T:{...T,y:T.y+y}};return ei.set(I,{context:d,projector:h,dy:y}),I},u=c(i.header),f=c(i.footer),m=i.hasBodyPageFields===false?i.fragments:bx(i.fragments,d,n?{hosts:n.hosts,revision:e.revision}:void 0);if(u===i.header&&f===i.footer&&m===i.fragments)return dp.set(i,{pageCount:t,pageRefToken:r,result:i}),i;m!==i.fragments&&(o=true);let p={...i,...u!==void 0?{header:u}:{},...f!==void 0?{footer:f}:{},...m!==i.fragments?{fragments:m}:{}};return dp.set(i,{pageCount:t,pageRefToken:r,result:p}),p});return o?{...e,pages:a}:e}var vO=`
2
- \r`,TO=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function xx(e,t){let n=t;for(;n<e.length&&vO.includes(e[n]);)n+=1;return n}function Sx(e,t){if(e[t]==='"'){let r=t+1;for(;r<e.length&&e[r]!=='"';)r+=1;return r<e.length?r+1:r}let n=t;for(;n<e.length&&!`
3
- \r"`.includes(e[n]);)n+=1;return n}function Hd(e){if(e.length===0||e.length>256)return null;let t=xx(e,0);if(e[t]==='"')return null;let n=Sx(e,t),r=e.slice(t,n).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=xx(e,n);if(o>=e.length)return null;let a=Sx(e,o),i=e.slice(a).trim();for(;;){let s=i.replace(TO,"").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 Rx=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),FO=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function IO(e){let t=e;for(;;){let n=t.replace(FO,"").trimEnd();if(n===t)return t;t=n;}}function kO(e){let t=e.trimStart();if(t.length===0)return null;if(t[0]==='"'){let o=t.indexOf('"',1),a=o===-1?t.slice(1):t.slice(1,o);return a.length>0?a:null}let n=t.search(/\s/),r=n===-1?t:t.slice(0,n);return r.length>0?r:null}function zd(e){let t=_o(e);if(t===null||t.length===0)return null;let n=IO(t),r=Rx[n];if(r)return {property:r};if(!n.startsWith("DOCPROPERTY"))return null;let o=n.slice(11);if(o.length===0||!/^\s/.test(o))return null;let a=kO(o);if(a===null)return null;let i=Rx[a];return i?{property:i}:null}function Wd(e,t){if(!t)return null;let n=t[e.property];return n!==void 0&&n.length>0?n:null}var OO=ne,CO=2048,EO=256;function MO(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "||r===" "||r===`
4
- `||r==="\r"){n+=1;continue}if(r==='"'){let a=n+1;for(;a<e.length&&e[a]!=='"';)a+=1;t.push({value:e.slice(n+1,a),quoted:true}),n=a<e.length?a+1:a;continue}let o=n;for(;o<e.length&&!`
5
- \r"`.includes(e[o]);)o+=1;t.push({value:e.slice(n,o),quoted:false}),n=o;}return t}var LO=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function Gd(e){if(e.length===0||e.length>OO)return null;let t=MO(e);if(t.length<2)return null;let n=t[0];if(n.quoted||n.value.toUpperCase()!=="HYPERLINK")return null;let r=null,o=false,a=null,i=false,s=null,l=false;for(let d=1;d<t.length;d+=1){let c=t[d];if(!c.quoted&&c.value.startsWith("\\")){let u=c.value.toLowerCase();if(!LO.has(u))continue;let f=t[d+1];if(!f||!f.quoted&&f.value.startsWith("\\"))continue;d+=1;let m=f.value.length>0&&f.value.length<=EO;u==="\\l"?i||(i=true,m&&(a=f.value)):u==="\\o"&&(l||(l=true,m&&(s=f.value)));continue}o||(o=true,c.value.length>0&&c.value.length<=CO&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:s}}function BO(e){let t=e.toUpperCase(),n=e[0]===e[0]?.toUpperCase();switch(t){case "ARABIC":return "decimal";case "ALPHABETIC":return n?"upperLetter":"lowerLetter";case "ROMAN":return n?"upperRoman":"lowerRoman";case "ORDINAL":return "ordinal";case "CARDTEXT":return "cardinalText";case "ORDTEXT":return "ordinalText";case "HEX":return "hex";default:return null}}function eo(e){if(_o(e)===null)return null;let n=e.replace(/\s+/g," ").trim().split(" "),r=n[0]?.toUpperCase();if(r!=="AUTONUM"&&r!=="AUTONUMLGL"&&r!=="AUTONUMOUT")return null;let o=null,a=false;for(let i=1;i<n.length;i+=1){let l=n[i].toUpperCase();if(l==="\\E"){a=true;continue}if(l==="\\*"){let d=n[i+1];if(d===void 0)return null;if(i+=1,d.toUpperCase()==="MERGEFORMAT")continue;if(o=BO(d),o===null)return null;continue}return null}return {kind:r,numFmt:o,suppressPeriod:a}}function Px(e,t){let n=wn(e.numFmt??"decimal",t);return n.length===0?"":e.suppressPeriod?n:`${n}.`}var Vo=1024;function vs(e,t){for(let n of e.attributes)if(n.namespaceUri===da$1&&n.localName===t)return n.value}function gp(e){return e.kind==="drawing"||e.localName==="drawing"||e.localName==="pict"}function vx(e,t){let n="",r=(o,a)=>{if(!(o.kind==="textValue"||n.length>=Vo)&&!(t.exhausted||a>Dt)&&st(t)){if(o.kind==="text"){for(let i of o.children)i.kind==="textValue"&&(n+=i.value.slice(0,Vo-n.length));return}for(let i of o.children)r(i,a+1);}};for(let o of e.children)r(o,1);return n}var wx=new WeakMap;function Tx(e,t){let n=wx.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,s="",l=Rr(),d=u=>{let f=Vo-s.length;if(f<=0){a=true;return}s+=u.length>f?u.slice(0,f):u;},c=(u,f,m)=>{if(a||u.kind==="textValue"||m>=la$1||l.exhausted||f>Dt)return;if(u.kind==="bookmarkStart"){!o&&vs(u,"name")===t&&(o=true,i=vs(u,"id"));return}if(u.kind==="bookmarkEnd"){o&&i!==void 0&&vs(u,"id")===i&&(a=true);return}if(u.kind==="run"){if(!o)return;for(let g of u.children){if(a||!st(l))return;if(g.kind==="text")for(let h of g.children)h.kind==="textValue"&&d(h.value);else g.kind==="tab"&&d(" ");}return}if(gp(u)||de(u)||!st(l))return;let p=ma$1(u,m);for(let g of u.children)c(g,f+1,p);};for(let u of e.children){if(a||!st(l))break;c(u,1,0);}return n||(n=new Map,wx.set(e,n)),n.set(t,s),s}var hp=256,NO=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:false}),AO=Object.freeze({suppressNonDelimiterText:true,noteRef:false,pageRef:false}),DO=Object.freeze({suppressNonDelimiterText:false,noteRef:true,pageRef:false}),_O=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:true}),Vd=new WeakMap;function Tn(e){return Vd.get(e)??NO}function jO(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "){n+=1;continue}if(r==='"'){let a=e.indexOf('"',n+1);if(a===-1)return null;t.push(e.slice(n+1,a)),n=a+1;continue}let o=n;for(;o<e.length&&e[o]!==" ";)o+=1;t.push(e.slice(n,o)),n=o;}return t}function Fn(e){if(e.length>ne)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>ne)return null;let n=jO(t);if(n===null||n.length<2)return null;let r=n[0].toUpperCase();if(r!=="REF"&&r!=="NOTEREF"&&r!=="PAGEREF")return null;let o=n[1];if(o.length===0||o.length>hp||o.startsWith("\\"))return null;if(r==="NOTEREF")return HO(n,o);if(r==="PAGEREF")return zO(n,o);let a=false,i=false,s=false,l=false,d=false;for(let f=2;f<n.length;f+=1){let m=n[f].toUpperCase();if(m==="\\R")i=true;else if(m==="\\W")s=true;else if(m==="\\N")a=true;else if(m==="\\T")l=true;else if(m==="\\H")d=true;else if(m==="\\*"&&n[f+1]?.toUpperCase()==="MERGEFORMAT")f+=1;else {if(m==="\\*MERGEFORMAT")continue;return null}}let u={bookmark:o,numberSwitch:a?"n":i?"r":s?"w":null,hyperlink:d};return l&&Vd.set(u,AO),u}function HO(e,t){let n=false;for(let o=2;o<e.length;o+=1){let a=e[o].toUpperCase();if(a==="\\H")n=true;else if(a==="\\*"&&e[o+1]?.toUpperCase()==="MERGEFORMAT")o+=1;else {if(a==="\\*MERGEFORMAT")continue;return null}}let r={bookmark:t,numberSwitch:null,hyperlink:n};return Vd.set(r,DO),r}function zO(e,t){let n=false;for(let o=2;o<e.length;o+=1){let a=e[o].toUpperCase();if(a==="\\H")n=true;else if(a==="\\*"&&e[o+1]?.toUpperCase()==="MERGEFORMAT")o+=1;else {if(a==="\\*MERGEFORMAT")continue;return null}}let r={bookmark:t,numberSwitch:null,hyperlink:n};return Vd.set(r,_O),r}function Ts(e,t,n){if(!e.has(t)&&e.size>=8){let r=e.keys().next();r.done||e.delete(r.value);}e.set(t,n);}var Me="all-markup",$d=class{#e;constructor(t){this.#e=new Set(t),Object.freeze(this);}get size(){return this.#e.size}has(t){return this.#e.has(t)}forEach(t,n){this.#e.forEach(r=>t.call(n,r,r,this));}entries(){return this.#e.entries()}keys(){return this.#e.keys()}values(){return this.#e.values()}union(t){let n=new Set(this.#e),r=t.keys(),o=r.next();for(;!o.done;)n.add(o.value),o=r.next();return n}intersection(t){let n=new Set;for(let r of this.#e)t.has(r)&&n.add(r);return n}difference(t){let n=new Set;for(let r of this.#e)t.has(r)||n.add(r);return n}symmetricDifference(t){let n=new Set(this.#e),r=t.keys(),o=r.next();for(;!o.done;){let a=o.value;this.#e.has(a)?n.delete(a):n.add(a),o=r.next();}return n}isSubsetOf(t){if(this.size>t.size)return false;for(let n of this.#e)if(!t.has(n))return false;return true}isSupersetOf(t){if(this.size<t.size)return false;let n=t.keys(),r=n.next();for(;!r.done;){if(!this.#e.has(r.value))return false;r=n.next();}return true}isDisjointFrom(t){for(let n of this.#e)if(t.has(n))return false;return true}[Symbol.iterator](){return this.#e[Symbol.iterator]()}},gj=new $d([]);function WO(e){let t=new Set;for(let o of e)t.add(o);if(t.size===0)return;let n=[...t].sort(),r=new $d(n);return Object.freeze({hiddenAuthors:r,includes:o=>!r.has(o.author),includesNode:(o,a)=>!r.has(a),cacheKey:JSON.stringify(n)})}function ri(e,t){return e.includes?.(t)??Ix(e,t.nodeId,t.author)}function Ix(e,t,n){return e.includesNode?.(t,n)??!e.hiddenAuthors.has(n)}function yp(e,t,n){return ri(e,t)?n:e.excludedNodeMode?.(t.nodeId,t.author)??"proposed"}function kx(e,t,n,r){return Ix(e,t,n)?r:e.excludedNodeMode?.(t,n)??"proposed"}var Tr=Object.freeze([]),GO=32,VO={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function vr(e,t){for(let n of e.attributes)if(n.localName===t&&n.namespaceUri===e.namespaceUri&&(n.kind==="wmlVal"||n.kind==="genericExtension"||n.kind==="xmlSpace"))return n.value}function qt(e){if(e.kind==="textValue")return null;let t=VO[e.kind];if(t===void 0)return null;let n=vr(e,"date");return {kind:t,id:vr(e,"id")??"",author:vr(e,"author")??"",...n===void 0?{}:{date:n},nodeId:e.id}}function dn(e,t){return e.length===0?[t]:[...e,t]}function Vt(e){return e.kind!=="textValue"&&ka(e.kind)}var Xd=GO;function Le(e,t,n){if(e.length===0||t==="all-markup"&&!n)return true;for(let r of e){let o=n?yp(n,r,t):t;if(o==="all-markup")continue;if(o==="proposed"?r.kind==="delete"||r.kind==="moveFrom":r.kind==="insert"||r.kind==="moveTo")return false}return true}function Ud(e,t,n){if(!n&&t==="all-markup")return e;if(!Le(e,t,n))return null;if(!n)return e;let r=e.filter(o=>ri(n,o));return r.length===0?Tr:r}function Fx(e,t,n){return t==="all-markup"&&(!n||ri(n,e))}function Ox(e,t){return t?e.filter(n=>{if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")return true;let r="revisionNodeId"in n&&typeof n.revisionNodeId=="string"?n.revisionNodeId:"";return ri(t,{kind:"format",id:n.attributes?.id??"",author:n.attributes?.author??"",...n.attributes?.date===void 0?{}:{date:n.attributes.date},nodeId:r})}):e}function Yd(e,t,n){if(t!=="all-markup")return {revisions:Tr,formatRevision:null};if(!n)return {revisions:Ko(e),formatRevision:Fs(e)};let r=Ko(e).filter(a=>Fx(a,t,n)),o=Fs(e);return {revisions:r,formatRevision:o&&Fx(o,t,n)?o:null}}function Cx(e,t,n){let r=Ko(e);if(!n)return r.length>0||Fs(e)!==null;if(r.some(a=>ri(n,a)))return true;let o=Fs(e);return o!==null&&ri(n,o)}function Ko(e){if(e.kind==="textValue")return Kd;let t=e.children.find(o=>o.kind==="paragraphProperties");if(!t||t.kind==="textValue")return Kd;let n=t.children.find(o=>o.kind==="runProperties");if(!n||n.kind==="textValue")return Kd;let r=[];for(let o of n.children){if(o.kind==="textValue"||o.namespaceUri!==da$1)continue;let a=KO[o.localName];if(a===void 0)continue;let i=vr(o,"date");r.push({kind:a,id:vr(o,"id")??"",author:vr(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:Kd}var KO={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function Fs(e){if(e.kind==="textValue")return null;let t=e.children.find(r=>r.kind==="paragraphProperties");if(!t||t.kind==="textValue")return null;let n=t.children.find(r=>r.kind==="runProperties");if(!n||n.kind==="textValue")return null;for(let r of n.children){if(r.kind==="textValue"||r.namespaceUri!==da$1||r.localName!=="rPrChange")continue;let o=vr(r,"date");return {kind:"format",id:vr(r,"id")??"",author:vr(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var Kd=Object.freeze([]);function bp(e){return e.find(t=>Ex(t))??e[0]}function Ex(e){return e.kind==="delete"||e.kind==="moveFrom"}function qd(e,t){let n=bp(e);return {...n?{markRevisions:e,markRevision:n}:{},...t?{markFormatRevision:t}:{}}}function $O(e){return bp(Ko(e))??null}function XO(e){for(let t of e){if(t.localName!=="rPrChange"&&t.localName!=="pPrChange")continue;let n=t.attributes??{},r=n.date;return {kind:"format",id:n.id??"",author:n.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function In(e){return e.some(t=>{switch(t.kind){case "delete":case "moveFrom":return true;case "insert":case "moveTo":case "format":return false;default:return t.kind}})}function oi(e,t){if(e.kind!=="textValue"){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da$1&&n.localName===t)return n}}function UO(e){if(e.kind==="textValue")return false;let t=oi(e,"paragraphProperties")??oi(e,"pPr");if(!t)return false;let n=oi(t,"runProperties")??oi(t,"rPr");return n===void 0?false:oi(n,"del")!==void 0||oi(n,"moveFrom")!==void 0}function xp(e,t,n,r,o=[]){if(e.kind==="textValue"||t>=la$1)return true;let a=(i,s)=>{for(let l of i){if(l.kind==="textValue")continue;if(l.kind==="run"){for(let u of l.children){if(u.kind==="text"){for(let f of u.children)if(f.kind==="textValue"&&f.value.length>0)return false;continue}if(u.kind!=="runProperties")return false}continue}if(Cd$1(l)){if(s+1>=la$1)continue;let u=Ed$1(l);if(u&&!a(u,s+1))return false;continue}if(na$1(l)&&!Vt(l)){if(!xp(l,s+1,n,r,o))return false;continue}if(!Vt(l))continue;let d=qt(l);if(!d)continue;let c=dn(o,d);if(Le(c,n,r)&&!xp(l,s+1,n,r,c))return false}return true};return a(e.children,t)}function Sp(e,t,n){if(t==="all-markup"&&!n)return false;for(let r of Ko(e)){let o=n?yp(n,r,t):t;if(o==="all-markup")continue;let a=r.kind==="delete"||r.kind==="moveFrom";if(o==="proposed"&&a||o==="original"&&!a)return true}return false}function Rp(e,t="proposed",n){return e.kind!=="paragraph"||!Sp(e,t,n)?false:xp(e,0,t,n)}function YO(e){let t=e.root;if(t.localName==="hdr"||t.localName==="ftr")return t;let n=r=>{if(r.kind!=="textValue"){if(r.kind==="body")return r;for(let o of r.children){let a=n(o);if(a)return a}}};return n(t)}function qO(e,t,n){return !(e.kind==="paragraph"&&Rp(e,t,n))}var Ax=new WeakMap;function ai(e){return Ax.get(e)??null}function Dx(e,t){let n=t.children.filter(a=>Mx(a)),r=e.flatMap(a=>a.children.filter(i=>!Mx(i))),o={...t,children:[...n,...r]};return Ax.set(o,{merged:o,members:e}),o}function Mx(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function ZO(e,t,n){if(t==="all-markup"&&!n)return e.map(s=>s.block);let r=[],o=[],a=null,i=()=>{r.push(...Lx(o)),o=[],a=null;};for(let{block:s,parentKey:l}of e){if(o.length>0&&l!==a&&i(),s.kind!=="paragraph"){i(),r.push(s);continue}let d=Sp(s,t,n);if((d||o.length>0)&&!eC(s,t,n)){i(),r.push(s);continue}if(d){o.push(s),a=l;continue}if(o.length===0){r.push(s);continue}let c=[...o,s];o=[],a=null,r.push(Dx(c,s));}return r.push(...Lx(o)),r}function Lx(e){if(e.length<2)return e;let t=e[e.length-1];return [Dx(e,t)]}function Is(e,t,n){return ZO(QO(e),t,n).filter(o=>qO(o,t,n))}var JO=new Set(["pPr","bookmarkStart","bookmarkEnd","proofErr","permStart","permEnd"]);function _x(e){for(let t of e.children){if(t.kind==="textValue"){if(t.value.length>0)return false;continue}if(t.namespaceUri!==da$1||!JO.has(t.localName))return false}return true}function QO(e){let t=[],n=(r,o,a)=>{for(let i of r){if(i.kind==="textValue")continue;if(i.kind==="paragraph"||i.kind==="table"){t.push({block:i,parentKey:a});continue}let s=vd$1(i);s!==null&&o<Bd$1&&n(s,o+1,i.id);}};return n(e,0,""),t}var Bx=new WeakMap;function eC(e,t,n){let r=`${t}|${n?.cacheKey??""}`,o=Bx.get(e),a=o?.get(r);if(a!==void 0)return a;let i=tC(e,t,n);return o?Ts(o,r,i):Bx.set(e,new Map([[r,i]])),i}function tC(e,t,n){if(!nC(e))return false;let r=si(e,[],void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,n),o=0;for(let a of r)o=Math.max(o,a.end);return o<=Me$1(e).length}function nC(e){let t=0,n=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===da$1&&o.localName==="fldChar"){let a=o.attributes.find(i=>i.localName==="fldCharType")?.value;a==="begin"?t+=1:a==="end"&&(t-=1,t<0&&(n=true));}for(let a of o.children)r(a);}};return r(e),t===0&&!n}var Nx=fg$1(16);function _t(e,t="all-markup",n){let r=`${t}|${n?.cacheKey??""}`,o=Nx.get(e),a=o?.get(r);if(a)return a;let i=YO(e),s=i?Is(i.children,t,n):[];return o?Ts(o,r,s):Nx.set(e,new Map([[r,s]])),s}function ii(e,t="all-markup",n){return e.kind!=="note"?[]:Is(e.children,t,n)}function Pp(e,t="all-markup",n){return e.kind==="textValue"?[]:Is(e.children,t,n)}var rC=new WeakMap;function jx(e,t){rC.set(e,t);}function oC(e){let t=Object.entries(e.attributes??{}).sort(([n],[r])=>n<r?-1:n>r?1:0).map(([n,r])=>`${n}=${r}`).join("\0,");return `${e.localName}(\0${t}\0)`}function aC(e){return e.map(oC).join("\0;")}var iC=1<<18,sC=new TextEncoder;function vp(e){return a(sC.encode(e))}var lC=2048,Hx=2*1024*1024,$o=new Map,wp=0;function ks(e){let t=$o.get(e);if(t)return $o.delete(e),$o.set(e,t),t.digest;let n=vp(e),r=e.length*2;if(r<=Hx)for($o.set(e,{digest:n,bytes:r}),wp+=r;$o.size>lC||wp>Hx;){let o=$o.entries().next();if(o.done)break;$o.delete(o.value[0]),wp-=o.value[1].bytes;}return n}function Os(e,t){return `${e}|${t?"drawing":""}`}function q(e){let t="";for(let n of e)t+=`${n.length}:${n}`;return t}var zx=new WeakMap;function Gx(e,t){if(!t||t.size===0)return "";let n=zx.get(e),r=n?.get(t);if(r!==void 0)return r;let o=Xo(e,a=>t.get(a.id)?.cacheToken??"");return o.length<=iC&&(n||(n=new WeakMap,zx.set(e,n)),n.set(t,o)),o}function Xo(e,t){let n=[],r=false,o=[e];for(;o.length>0;){let a=o.pop();if(a.kind==="paragraph"){let i=t(a);i&&(r=true),n.push(i);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}return r?q(n):""}function Tp(e){return e?{nodeDigests:new WeakMap,paragraphKeys:new WeakMap}:{nodeDigests:new Map,paragraphKeys:new Map}}var Vx=Tp(true);function Kx(e,t){if(e.kind==="textValue")return vp(Fp(e));let n=t.nodeDigests.get(e);if(n!==void 0)return n;let r=vp(Fp(e,t));return t.nodeDigests.set(e,r),r}function Fp(e,t=Vx){if(e.kind==="textValue")return q(["text",e.value]);let n=[];for(let o of e.attributes)n.push(q([o.namespaceUri??"",o.localName,o.value]));n.sort();let r=[];for(let o of e.children)r.push(o.kind==="textValue"?Fp(o):q(["child-digest",Kx(o,t)]));return q(["element",e.kind,e.localName,e.id,q(n),q(r)])}var dC=8;function Cs(e){return $x(e,Vx)}function $x(e,t){let n=Math.round(e.width*1e3),r=e.drawingToken??"",o=e.projectionToken??"",a=e.exclusionToken??"",i=ks(aC(e.properties)),s=Kx(e.paragraph,t),l=ks(e.producer),d=ks(r),c=ks(o),u=ks(a),f=t.paragraphKeys.get(e.paragraph),m=f?.entries.findIndex(h=>h.producerIdentity===l&&h.width===n&&h.drawingIdentity===d&&h.projectionIdentity===c&&h.exclusionIdentity===u&&h.propertiesToken===i);if(f&&m!==void 0&&m>=0){let[h]=f.entries.splice(m,1);return f.entries.push(h),h.key}let p=`plk:${s}:${l}:${n}:${d}:${c}:${u}:${i}`;f||(f={entries:[]},t.paragraphKeys.set(e.paragraph,f));let g=f.entries.find(h=>h.propertiesToken===i)?.propertiesToken??i;return f.entries.push({producerIdentity:l,width:n,drawingIdentity:d,projectionIdentity:c,exclusionIdentity:u,propertiesToken:g,key:p}),f.entries.length>dC&&f.entries.shift(),p}var Xx=new WeakMap;function Zd(e,t){Xx.set(e,t);}function Ux(e,t,n,r){if(!e)return;let o=t??new Set;for(let a of n)o.add(a);for(let a of r){let i=Xx.get(a);if(i)for(let s of i)o.add(s);}t||e.retain(o);}var cC=8,uC=8;function fC(e={}){let t=Math.max(1,e.maxEntries??4096),n=e.retainAcrossPasses??true,r=t*8,o=new Map,a=Tp(n),i=0,s=0,l=0,d=0,c=0,u=0,f=0,m=0,p=0,g=0,h={retainAcrossPasses:n,keyFor(y){return $x(y,a)},get(y){let b=o.get(y);if(b===void 0){d+=1;return}return l+=1,o.delete(y),b.generation=i,o.set(y,b),b.value},set(y,b){for(o.has(y)&&o.delete(y),o.set(y,{value:b,generation:i});o.size>t;){let x=o.entries().next();if(x.done||x.value[1].generation>=i&&o.size<=r)break;o.size>r?f+=1:u+=1,o.delete(x.value[0]),c+=1;}},release(y){!n&&o.delete(y)&&(p+=1);},retentionPassDue(){return s+=1,s%cC===0},retain(y){i+=1;for(let b of y){let x=o.get(b);x&&(x.generation=i);}for(let[b,x]of o)i-x.generation>uC&&(o.delete(b),c+=1,m+=1);},clear(){g+=o.size,o.clear(),a=Tp(n);},get stats(){return {hits:l,misses:d,evictions:c,size:o.size}}};return jx(h,{snapshot(){let y=0;for(let b of o.keys())y+=b.length*2;return {hits:l,misses:d,evictions:c,size:o.size,softLimit:t,hardLimit:r,keyTextBytes:y,softLimitEvictions:u,hardLimitEvictions:f,staleEvictions:m,releasedEntries:p,clearedEntries:g}},visit(y){for(let b of o.values())y(b.value);}}),h}function pC(e,t){let n=e.nums.get(t),r=[];for(let o=0;o<=8;o+=1){let a=Uo(e,t,o);if(!a){r.push(1);continue}let i=n?.overrides.get(o)?.startOverride;r.push(i??a.level.start);}return r}function mC(e,t,n){let r=[];for(let o=0;o<=8;o+=1){let a=Uo(e,t,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...n]}}function Yx(e,t){return t?e.map(n=>n==="bullet"||n==="none"?n:"decimal"):e}function gC(e,t){if(t===0)return null;if(t===void 0)return e-1;let n=t-1;return n>=e?null:n}function Ip(e){let t=new Map,n=new Map,r=new Map,o=a=>{let i=t.get(a);i||(i=[0,0,0,0,0,0,0,0,0],t.set(a,i));let s=n.get(a);s||(s=[false,false,false,false,false,false,false,false,false],n.set(a,s));let l=r.get(a);return l||(l=pC(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=Uo(e,a,i);if(!s)return null;let{abstractNumId:l,level:d}=s,{counters:c,initialized:u,starts:f}=o(a),{formats:m}=mC(e,a,f);for(let S=i+1;S<=8;S+=1){let I=Uo(e,a,S);if(!I)continue;let F=gC(S,I.level.lvlRestart);F!==null&&i<=F&&(u[S]=false);}let p=f[i]??d.start;u[i]?c[i]+=1:(c[i]=p,u[i]=true);let g=c.slice(),h=u.slice(),y=g.map((S,I)=>h[I]?S:f[I]??1),b=Yx(m,d.isLgl),x=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:Dd(d.lvlText,y,b),T={abstractNumId:l,numId:a,ilvl:i,level:d,counters:g,markerText:x};return qx.set(T,y),T}}}var qx=new WeakMap;function Zx(e){return qx.get(e)??e.counters}var hC=/[\p{L}\s]/u;function yC(e){let t="";for(let n=0;n<e.length;n+=1){let r=e[n],o=e[n+1];if(r==="%"&&o!==void 0&&o>="1"&&o<="9"){t+=r+o,n+=1;continue}hC.test(r)||(t+=r);}return t}function Jx(e,t=false,n=false){let{index:r,numId:o,ilvl:a,expandCounters:i}=e;if(a<0||a>8)return null;let s=[],l=[];for(let m=0;m<=8;m+=1){let p=Uo(r,o,m);s.push(m<=a?p?.level??null:null),l.push(p?.level.numFmt??"decimal");}let d=m=>m!==null&&m.numFmt!=="bullet"&&m.numFmt!=="none"&&m.lvlText.length>0;if(!d(s[a]??null))return null;let c=[],u=[];for(let m=a;m>=0&&!(t&&m!==a);m-=1){let p=s[m];d(p)&&(m!==a&&u.some(g=>g.includes(`%${m+1}`))||(c.push(m),u.push(p.lvlText)));}c.reverse();let f="";for(let m of c){let p=s[m],g=n?yC(p.lvlText):p.lvlText;f+=Dd(g,i,Yx(l,p.isLgl));}return f.length>0?f:null}var kp=Object.freeze({kinsoku:true,overflowPunctuation:true,characterWrap:false}),Jd=e=>!["0","false","off"].includes(e??"");function Qx(e){let t=false,n="doNotCompress",r=Object.create(null),o=Object.create(null);for(let a of e?.children??[]){if(!("localName"in a)||a.namespaceUri!=="http://schemas.openxmlformats.org/wordprocessingml/2006/main")continue;let i=a.attributes.find(d=>d.localName==="val"&&d.namespaceUri===a.namespaceUri)?.value;if(a.localName==="strictFirstAndLastChars"&&(t=Jd(i)),a.localName==="characterSpacingControl"&&(i==="doNotCompress"||i==="compressPunctuation"||i==="compressPunctuationAndJapaneseKana")&&(n=i),a.localName!=="noLineBreaksBefore"&&a.localName!=="noLineBreaksAfter")continue;let s=a.attributes.find(d=>d.localName==="lang"&&d.namespaceUri===a.namespaceUri)?.value.toLowerCase();if(!s||!/^[a-z]{2,3}(?:-[a-z0-9]{2,8}){0,3}$/.test(s))continue;let l=a.localName==="noLineBreaksBefore"?r:o;(Object.keys(l).length<64||Object.hasOwn(l,s))&&(l[s]=(i??"").slice(0,4096));}return Object.freeze({strict:t,compression:n,before:Object.freeze(r),after:Object.freeze(o)})}function Qd(e,t){let{kinsoku:n,overflowPunctuation:r,characterWrap:o}=kp;for(let a of e)a.localName==="kinsoku"&&(n=Jd(a.attributes?.val)),a.localName==="overflowPunct"&&(r=Jd(a.attributes?.val)),a.localName==="wordWrap"&&(o=!Jd(a.attributes?.val));return {settings:t,kinsoku:n,overflowPunctuation:r,characterWrap:o}}function Es(e){let t;for(let n of e){if(n.localName!=="lang")continue;let r=n.attributes?.eastAsia??n.attributes?.val;r&&/^(ja|zh|ko)(-|$)/i.test(r)&&(t=r.toLowerCase());}return t}var bC="!%),.:;?]}\xA2\xB0\u2019\u201D\u2030\u2032\u2033\u2103\u3001\u3002\u3005\u3009\u300B\u300D\u300F\u3011\u3015\u309B\u309C\u309D\u309E\u30FB\u30FD\u30FE\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF61\uFF63\uFF64\uFF65\uFF9E\uFF9F\uFFE0",xC="$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFF62\uFFE1\uFFE5",SC="!%),.:;>?]}\xA2\xA8\xB0\xB7\u02C7\u02C9\u2015\u2016\u2019\u201D\u2026\u2030\u2032\u2033\u203A\u2103\u2236\u3001\u3002\u3003\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u301E\uFE36\uFE3A\uFE3E\uFE40\uFE44\uFE5A\uFE5C\uFE5E\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF40\uFF5C\uFF5D\uFF5E\uFFE0",RC="$([{\xA3\xA5\xB7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFE5D\uFF04\uFF08\uFF0E\uFF3B\uFF5B\uFFE1\uFFE5",PC="! ),.:;?]}\xA2\xB7\u2013\u2014\u2019\u201D\u2022\u2025\u2026\u2027\u2032\u2574\u3001\u3002\u3009\u300B\u300D\u300F\u3011\u3015\u301E\uFE30\uFE31\uFE33\uFE34\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE4F\uFE50\uFE51\uFE52\uFE54\uFE55\uFE56\uFE57\uFE5A\uFE5C\uFE5E\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5C\uFF5D\uFF64".replace(" ",""),wC="([{\xA3\xA5\u2018\u201C\u2035\u3008\u300A\u300C\u300E\u3010\u3014\u301D\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE59\uFE5B\uFE5D\uFF08\uFF5B",vC="!%),.:;?]}\xA2\xB0\u2019\u201D\u2032\u2033\u2103\u3009\u300B\u300D\u300F\u3011\u3015\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFFE0",TC="$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFFE1\uFFE5\uFFE6",FC="\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FC\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70";function eS(e,t){let n=e.split("-")[0],r=/^zh-(tw|hk|mo|hant)(-|$)/.test(e),o=n==="zh"?r?PC:SC:n==="ko"?vC:bC,a=n==="zh"?r?wC:RC:n==="ko"?TC:xC;return n==="ja"&&t?.strict&&(o+=FC),o=t?.before[e]??o,a=t?.after[e]??a,{before:o,after:a}}function Yo(e){return e>=11904&&e<=12591||e>=12736&&e<=40959||e>=63744&&e<=64255||e>=65072&&e<=65103||e>=65281&&e<=65439||e>=131072&&e<=205743}var rS=e=>new Set([...e].map(t=>t.codePointAt(0))),Ms=rS("\u3002\uFF0E\uFF0C\u3001\uFF1B\uFF1A\uFF1F\uFF01\u300D\u300F\uFF09\u3011\u3009\u300B\u3015\u3017\u3019\u301B\uFF5D\uFF3D\uFF1E\uFF05\u3000\u30FB\uFF61\uFF63\uFF64\uFF65\uFF70\uFF9E\uFF9F\u3005\u301C\u309D\u309E\u30FD\u30FE\u30FC\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F"),Ls=rS("\u300C\u300E\uFF08\u3010\u3008\u300A\u3014\u3016\u3018\u301A\uFF5B\uFF3B\uFF1C\uFF62\uFF04\uFFE5");function oS(e,t){return !(!Yo(e)||!Yo(t)||Ls.has(e)||Ms.has(t))}function kn(e){if(e.length===0)return;let t=e.charCodeAt(e.length-1);return t>=56320&&t<=57343&&e.length>=2?e.codePointAt(e.length-2):t}var tc=new Set(["-","\u2010","\u2013","\u2014"]),tS=11904;function IC(e){let t=null;return n=>{if(t===null){t=new Set;for(let r of Ye(e))t.add(r.utf16From);t.add(e.length);}return t.has(n)}}function kC(e,t){let n=[],r=0,o=0;for(;r<e.length||o<t.length;){let a=r<e.length?e[r]:Number.POSITIVE_INFINITY,i=o<t.length?t[o]:Number.POSITIVE_INFINITY;a<i?(n.push(a),r+=1):(n.push(i),o+=1);}return n}function qo(e,t){let n=[];for(let o=0;o<e.length;o+=1){let a=e[o];a===" "?(o>0&&n[n.length-1]!==o&&n.push(o),n.push(o+1)):(a===" "||tc.has(a)&&o>0&&e[o-1]!==" "&&o+1<e.length&&e[o+1]!==" "&&!tc.has(e[o+1]))&&n.push(o+1);}let r=n;if(t){let o=[],a=IC(e);for(let i=0;i<e.length;){let s=e.codePointAt(i),l=i+(s>65535?2:1);if(l>=e.length)break;oS(s,e.codePointAt(l))&&a(l)&&o.push(l),i=l;}o.length>0&&(r=kC(n,o));}return r[r.length-1]!==e.length&&r.push(e.length),r}function nc(e,t){return !(t!==void 0&&Ms.has(t)||e!==void 0&&Ls.has(e))}function aS(e,t){return t<=0||t>=e.length?true:nc(kn(e.slice(0,t)),e.codePointAt(t))}var ec=new Map,nS=-1;function OC(e,t){let n=ys();(nS!==n||ec.size>=2048)&&(ec.clear(),nS=n);let r=e*1114112+t,o=ec.get(r);if(o!==void 0)return o;let a=0;for(let s of Ye(String.fromCodePoint(e,t)))a+=1;let i=a>1;return ec.set(r,i),i}function rc(e,t,n){let r=n||e===""||/[\s ]$/.test(e)||/^[\s ]/.test(t)||tc.has(e[e.length-1])&&!tc.has(t[0]),o=e.length===0?0:e.charCodeAt(e.length-1);if(o<tS&&t.charCodeAt(0)<tS)return r?"opens":"continues";if(o===9)return "opens";let a=kn(e),i=t.codePointAt(0);return a!==void 0&&!OC(a,i)||!nc(a,i)?"forbidden":r||a!==void 0&&oS(a,i)?"opens":"continues"}function to(e){return e>=4352&&e<=4607||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=44032&&e<=55295}var kt=e=>Yo(e)||to(e),Cp=e=>/[\u1100-\u11ff\u2e80-\u318f\u31c0-\u9fff\ua960-\ua97f\uac00-\ud7ff\uf900-\ufaff\ufe30-\ufe4f\uff01-\uff9f\u{20000}-\u{323af}]/u.test(e),iS=e=>e>=65296&&e<=65305||e>=65313&&e<=65338||e>=65345&&e<=65370,Op=e=>!e.projected&&!e.positionalTab&&!e.inlineDrawing&&!e.equation&&e.end-e.start===e.text.length;function oc(e,t){if(!t.characterWrap&&!e.some(S=>/[\u1100-\u11ff\u2e80-\ud7ff\uf900-\uffef\u{20000}-\u{323af}]/u.test(S.text)||Es(S.props)))return null;let n=new Map,r=[],o=0;for(let S of e){n.set(S,o);let I=Op(S)?S.text:"\uFFFC".repeat(Math.min(S.text.length,1));r.push(I),o+=I.length;}let a=r.join(""),i=Ye(a),s=new Map([[0,"opens"],[a.length,"opens"]]),l=new Set(qo(a,false)),d=new Set,c=/[$¥£₩+-$£¥+\-]?[0-90-9]+(?:[.,:/.,:/][0-90-9]+)*(?:[%%‰])?|[A-Za-z]+/gu;for(let S of a.matchAll(c))if(/[0-9A-Za-z]/u.test(S[0]))for(let I=S.index+1;I<S.index+S[0].length;I++)d.add(I);let u=0,f=0,m=i.some(S=>to(S.text.codePointAt(0))),p=m?"ko-kr":/[\u3040-\u30ff\uff66-\uff9f]/u.test(a)?"ja-jp":"zh-cn",g=[],h=false;for(let S of i)/^[\p{P}\p{S}\p{M}]+$/u.test(S.text)||(h=kt(S.text.codePointAt(0))),g.push(h||kt(S.text.codePointAt(0)));let y=e.map(S=>Es(S.props)),b=new Map,x=S=>{let I=b.get(S);return I||(I=eS(S,t.settings),b.set(S,I)),I};for(let S=1;S<i.length;S++){let I=i[S-1],F=i[S],v=F.utf16From;for(;u+1<e.length&&n.get(e[u+1])<=v;)u++;for(;f+1<e.length&&n.get(e[f+1])<=I.utf16From;)f++;let w=kn(I.text),k=I.text.codePointAt(0),P=F.text.codePointAt(0);if(/[\t\n\f\ufffc]/u.test(I.text+F.text)){s.set(v,"opens");continue}if(/[\u00a0\u202f\u2060\ufeff]/u.test(I.text+F.text)){s.set(v,"forbidden");continue}let O=false;if(t.kinsoku){let R=y[u]??(t.settings&&(kt(P)||g[S-1]&&/^[\p{P}\p{S}]+$/u.test(F.text))?p:void 0),C=y[f]??(t.settings&&(kt(k)||kt(P)&&/^[\p{P}\p{S}]+$/u.test(I.text))?p:void 0);if(R||C)O=(R?x(R).before.includes(String.fromCodePoint(P)):Ms.has(P))||(C?x(C).after.includes(String.fromCodePoint(w)):Ls.has(w));else if(O=Ms.has(P)||Ls.has(w),g[S-1]||kt(P)){let M=to(w)||to(P)?"ko-kr":"ja-jp",N=x(M);O||=g[S-1]&&N.before.includes(String.fromCodePoint(P))||kt(P)&&N.after.includes(String.fromCodePoint(w));}}if(O){s.set(v,"forbidden");continue}if(d.has(v)){s.set(v,"continues");continue}let L=kt(k)&&!iS(k)||kt(P)&&!iS(P)||g[S-1]&&/^[\p{P}\p{S}]+$/u.test(I.text),A=t.characterWrap&&(!m||to(k)&&to(P)),j=to(k)&&to(P)&&!A,W=l.has(v)||/\s$/u.test(I.text)||/^\s/u.test(F.text)||L&&!j||A;s.set(v,W?"opens":"continues");}let T=new Map;for(let S of e){let I=n.get(S);if(!Op(S)){T.set(S,qo(S.text,false));continue}let F=[];for(let v=1;v<S.text.length;v++){let w=s.get(I+v);(w==="opens"||d.has(I+v)&&w==="continues")&&F.push(v);}F.push(S.text.length),T.set(S,F);}return {boundaries:S=>T.get(S),decision:(S,I)=>Op(S)?s.get(n.get(S)+I)??"forbidden":"opens",cutAllowed:(S,I,F)=>s.get(n.get(S)+I+F)!=="forbidden"&&s.has(n.get(S)+I+F)}}function sS(e,t,n){if(!e.some(d=>Cp(d.text)))return null;if(e.some(d=>d.text.includes(" ")||d.wrapAdvanceBefore))return e;let r=[];for(let d of e){if(d.projected||d.equation||d.range.end-d.range.start!==d.text.length||!Cp(d.text)){r.push(d);continue}let c=Ye(d.text),u=[],f=0;for(let y=1;y<c.length;y++)(kt(kn(c[y-1].text))||kt(c[y].text.codePointAt(0)))&&(u.push({from:f,to:c[y].utf16From}),f=c[y].utf16From);if(u.push({from:f,to:d.text.length}),u.length===1){r.push(d);continue}let m=ut(d.style,d.fontSlot),p=u.map(y=>Gt(d.text.slice(y.from,y.to),m,t)),g=p.reduce((y,b)=>y+b,0),h=d.box.x;for(let y=0;y<u.length;y++){let b=u[y],x=g>0?p[y]*d.box.width/g:0,{caretEdges:T,...S}=d;r.push({...S,text:d.text.slice(b.from,b.to),range:{...d.range,start:d.range.start+b.from,end:d.range.start+b.to},box:{...d.box,x:h,width:x}}),h+=x;}}let o=new Set,a=r.map(d=>({text:d.text,props:d.props,style:d.style,start:d.range.start,end:d.range.end,projected:!!(d.projected||d.equation)})),i=oc(a,kp);for(let d=1;d<r.length;d++){let c=r[d-1],u=r[d],f=kn(c.text),m=u.text.codePointAt(0);f===void 0||m===void 0||u.lineEndWhitespace||u.text===`
6
- `||(c.text.endsWith(" ")||(kt(f)||kt(m))&&i?.decision(a[d],0)==="opens"&&nc(f,m)&&!/[\u00a0\u202f\u2060\ufeff]/u.test(c.text.slice(-1)+u.text[0]))&&o.add(d);}if(o.size===0)return e;let s=n/o.size,l=0;return r.map((d,c)=>(o.has(c)&&(l+=s),l===0?d:{...d,box:{...d.box,x:d.box.x+l}}))}var lS=/^[、。〈〉《》「」『』【】〔〕〖〗〘〙〚〛!(),.:;?[]{}]$/u,CC=/^[\u3041-\u3096\u30a1-\u30fa][\u3099\u309a]?$/u,EC=e=>!e.projected&&e.measureText===void 0&&!e.positionalTab&&!e.equation&&!e.inlineDrawing&&e.end-e.start===e.text.length;function MC(e,t,n){let r=[],o=0,a=e.map(l=>{r.push(o);let d=EC(l)?l.text:"\uFFFC";return o+=d.length,d}).join(""),i=new Map,s=0;for(let l of Ye(a)){let d=lS.test(l.text)?.5:t&&CC.test(l.text)?.125:0;if(!d)continue;for(;s+1<e.length&&r[s+1]<=l.utf16From;)s++;let c=e[s],u=Gt(l.text,ut(c.style,c.fontSlot),n),f=Math.max(0,u*d)/l.text.length;for(let m=s;m<e.length&&r[m]<l.utf16To;m++){let p=e[m],g=Math.max(0,l.utf16From-r[m]),h=Math.min(p.text.length,l.utf16To-r[m]);if(g===h)continue;let y=i.get(p);y||(y=[],i.set(p,y)),y.push({from:g,to:h,reduction:f});}}return i}function dS(e,t,n){let r=t.settings?.compression;if(!r||r==="doNotCompress")return e;let o=[],a=new WeakMap,i=MC(e,r==="compressPunctuationAndJapaneseKana",n);for(let s of e){let l=i.get(s);if(!l){o.push(s);continue}let d=0;for(let c of l){c.from>d&&o.push({...s,text:s.text.slice(d,c.from),start:s.start+d,end:s.start+c.from});let u=s.style.characterSpacingPt-c.reduction,f=a.get(s.style);f||(f=new Map,a.set(s.style,f));let m=f.get(u);m||(m={...s.style,characterSpacingPt:u},f.set(u,m)),o.push({...s,text:s.text.slice(c.from,c.to),start:s.start+c.from,end:s.start+c.to,style:m}),d=c.to;}d===0?o.push(s):d<s.text.length&&o.push({...s,text:s.text.slice(d),start:s.start+d});}return o}function ac(e,t,n,r,o){if(t.projected||t.measureText!==void 0)return false;let a=e[e.length-1];if(!a||!/^[\p{Pe}\p{Pf}\p{Po}]$/u.test(a)||!lS.test(a)&&!Es(t.props))return false;let i=Ye(e).at(-1)?.text;if(!i||!/^[\p{Pe}\p{Pf}\p{Po}]$/u.test(i))return false;let s=Gt(i,ut(t.style,t.fontSlot),o);return r-s<=n+.001&&n>=-1e-3}var LC=64,BC=31680,NC=720,AC=36,Ep=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),li=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),DC=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),_C=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function Bs(e){return e.kind!=="textValue"}function ic(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Mp(e,t){for(let n of e.children)if(Bs(n)&&n.localName===t)return n}function cS(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function jC(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function uS(e,t){if(!t)return;let n=0;for(let r of t.children){if(n>=128)break;if(n+=1,!Bs(r)||r.localName!=="tab")continue;let o=jC(cS(ic(r,"pos"))??NaN);if(o===null)continue;let a=ic(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=DC.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let s=ic(r,"leader");e.set(o,{alignment:i,...s!==void 0&&_C.has(s)?{leader:s}:{}});}}function fS(e,t=36){let n=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<n.length&&o<64;o+=1){let[a,i]=n[o];r.push({positionPt:a/20,alignment:i.alignment,...HC(i)});}return {stops:Object.freeze(r),defaultIntervalPt:t}}function HC(e){return e.leader?{leader:e.leader}:{}}function Lp(e){let t=new Map;for(let n of e)!n||!Bs(n)||uS(t,Mp(n,"tabs"));return fS(t)}function Bp(e){if(!e||!Bs(e))return li;let t=new Map;return uS(t,Mp(e,"tabs")),fS(t)}function Np(e,t){return t===void 0||!Number.isFinite(t)||t<=0||t===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:t}}function Ap(e){if(!e||!Bs(e))return 36;let t=Mp(e,"defaultTabStop");if(!t)return 36;let n=cS(ic(t,"val"));return n===null||n<=0||n>31680?36:n/20}function di(e,t,n){let r=Math.max(t,n);for(let i of e.stops)if(i.positionPt>t)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((t+1e-9)/o)*o;return a<=t&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function Dp(e,t,n,r,o){let a=n;switch(e){case "center":a=n-r/2;break;case "right":a=n-r;break;case "decimal":a=n-o;break;default:a=n;}let i=a-t;return i>0?i:0}function Ns(e){return `tabs(${e.stops.map(n=>`${n.alignment}@${Math.round(n.positionPt*1e3)}${n.leader?`/${n.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var pS=1,sc=1;function ci(e){let t=Math.max(e,1),n=3;if(t>=n){let i=t/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:t,insetPt:0}}let r=1,o=1,a=Math.max(t,n);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(t-a)/2}}var zC=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function WC(e){return zC.has(e)}function mS(e,t){return WC(e)?ci(t).extentPt:t}function jp(e){let t=false;for(let n of e){if(n.localName!=="pageBreakBefore")continue;let r=n.attributes?.val;t=r===void 0||dc(r);}return t}var hS=31680/20,Ds=12,yS=3168,bS=14,fi=Object.freeze({rule:"auto",value:240}),GC=132,VC=1584,xS=["top","left","bottom","right","between","bar"],KC=Object.freeze({}),$C=/^[0-9A-Fa-f]{6}$/,XC=new Set(["nil","none"]);function lc(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function _p(e,t){return !Number.isFinite(e)||e<=0?0:e>t?t:e}function gS(e){let t=lc(e,true);return t===null?0:_p(We(Ue(t)),hS)}function dc(e){return e!=="0"&&e!=="false"&&e!=="off"}function UC(e){return e===void 0||e==="auto"?null:$C.test(e)?e.toUpperCase():null}function As(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Yn(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function lH(e,t){let n=null;for(let r of e)r.localName===t&&(n={...n??{},...r.attributes??{}});return n}function Hp(e,t){let n=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&&(n=gS(s)),l!==void 0&&(r=gS(l));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=dc(d)),c!==void 0&&(a=dc(c));}if(o||a){let i=t?.inList||t?.inTableCell?0:bS;o&&(n=i),a&&(r=i);}return {before:n,after:r}}function zp(e){let t,n;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(t=i);let s=a.attributes?.line;if(s!==void 0){let l=lc(s,true);l!==null&&(n=l);}}if(n===void 0)return fi;let r=t??"auto";if(r==="auto"){let a=n/240;return a>0?{rule:"auto",value:Math.min(a,GC)*240}:fi}let o=n/20;return o>0?{rule:r,value:Math.min(o,VC)}:fi}function _s(e,t,n){let r=e.rule==="auto"?t*(e.value/240):e.rule==="exact"?e.value:Math.max(t,e.value),o=r-t;return o<0?{height:r,baseline:Math.max(0,Math.min(n,r))}:e.rule==="exact"?{height:r,baseline:n+o/2}:{height:r,baseline:n}}function Wp(e){let t=false;for(let n of e){if(n.localName!=="contextualSpacing")continue;let r=n.attributes?.val;t=r===void 0||dc(r);}return t}function ui(e){if(!e)return;let t=As(e,"val");if(!t||XC.has(t))return;let n=lc(As(e,"sz")),r=n===null?.5:_p(n/8,Ds)||.5,o=lc(As(e,"space")),a=o===null?0:_p(o,yS),i=As(e,"shadow"),s=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:t,color:UC(As(e,"color")),widthPt:r,spacePt:a,...s?{shadow:true}:{}}}function SS(e){let t=ui(Yn(e,"top")),n=ui(Yn(e,"left")??Yn(e,"start")),r=ui(Yn(e,"bottom")),o=ui(Yn(e,"right")??Yn(e,"end")),a=ui(Yn(e,"between")),i=ui(Yn(e,"bar"));return {...t?{top:t}:{},...n?{left:n}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function Fr(e){if(!e||e.kind==="textValue")return {};let t=Yn(e,"pBdr");return t?SS(t):{}}function js(e){let t=KC;for(let n of e){if(!n||n.kind==="textValue")continue;let r=Yn(n,"pBdr");r&&(t=SS(r));}return t}function Kt(e){return mS(e.val,e.widthPt)}function no(e){return e?e.spacePt+Kt(e):0}function YC(e){return no(e)}function Gp(e){let t=[];for(let n of xS){let r=e[n];r&&t.push(`${n}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return t.join("|")}function Zo(e,t){return Math.max(e,t)-t}function Vp(e,t,n,r){return n&&!r?0:Zo(e,t)}function Jo(e){let t=e.pageHeight;return Object.freeze({x:-e.marginLeft,y:-e.contentInsetTop,width:e.pageWidth,height:t!==void 0&&Number.isFinite(t)&&t>0?t:e.contentBandHeight+e.contentInsetTop+e.contentInsetBottom})}var RS=21600;function Qe(e){return Number.isFinite(e)?e:0}function Hs(e){if(e.length===0)return Object.freeze([]);let t=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),n=[],r=t[0];for(let o=1;o<t.length;o+=1){let a=t[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(n.push(r),r=a);}return n.push(r),Object.freeze(n)}function $p(e,t){let n=[];for(let r of e)for(let o of t){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&n.push(Object.freeze({start:a,end:i}));}return Hs(n)}function Kp(e,t,n){let r=[];for(let o of e){let a=Math.max(o.start,t),i=Math.min(o.end,n);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return Hs(r)}function qC(e,t,n){let r=[],o=t;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<n&&r.push(Object.freeze({start:o,end:n})),Object.freeze(r)}function wS(e,t){return pi(e,t)}function Xp(e,t,n){return wS(pi(e,t),n)}function ZC(e,t){let n=[],r=Math.min(e.length,Ot);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(t<d||t>c||t===c&&l>s||t===d&&l<s)continue;let u=(t-s)/(l-s),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&n.push({x:f,delta:l>s?1:-1});}return n.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(n)}function JC(e,t){let n=[],r=Math.min(e.length,Ot);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(t-a.y)>1e-6)continue;let s=Math.min(a.x,i.x),l=Math.max(a.x,i.x);l>s&&n.push(Object.freeze({start:s,end:l}));}return Hs(n)}function PS(e,t,n){let r=QC(ZC(e,t),n),o=JC(e,t);return Hs([...r,...o])}function QC(e,t){if(e.length===0)return Object.freeze([]);let n=[];if(t==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,s=e[a+1].x;s>i&&n.push(Object.freeze({start:i,end:s}));}return Object.freeze(n)}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&&n.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(n)}function eE(e,t){return Object.freeze({top:Qe(e.top)+Qe(t.top),right:Qe(e.right)+Qe(t.right),bottom:Qe(e.bottom)+Qe(t.bottom),left:Qe(e.left)+Qe(t.left)})}function tE(e,t,n,r,o,a){let i=t.x-e.x,s=t.y-e.y,l=r.x-n.x,d=r.y-n.y,c=i*d-s*l;if(Math.abs(c)<1e-12)return null;let f=((n.x-e.x)*s-(n.y-e.y)*i)/c,m=((n.x-e.x)*d-(n.y-e.y)*l)/c;if(f<-1e-9||f>1+1e-9||m<-1e-9||m>1+1e-9)return null;let p=e.y+f*s;return !Number.isFinite(p)||p<o-1e-6||p>a+1e-6?null:p}function nE(e,t,n,r){let o=[],a=Math.min(e.length,Ot),i=Math.min(t.length,Ot);if(a<2||i<2)return Object.freeze([]);let s=Ot*Ot,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 m=t[f],p=t[(f+1)%i],g=tE(c,u,m,p,n,r);g!==null&&o.push(g);}}return Object.freeze(o)}function rE(e,t,n){let r=new Set;r.add(t),r.add(n);for(let o of e){let a=Math.min(o.length,Ot);for(let i=0;i<a;i+=1){let s=o[i].y;Number.isFinite(s)&&s>=t-1e-6&&s<=n+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 [t,n]){let f=Math.min(d,c),m=Math.max(d,c);u>=f&&u<=m&&r.add(u);}}}if(e.length>=2)for(let o of nE(e[0],e[1],t,n))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function oE(e,t,n,r){let o=PS(e,n,r);return t&&t.length>=3&&(o=$p(o,PS(t,n,"nonzero"))),o}function vS(e,t,n,r,o=null){let a=Qe(n.top),i=Qe(n.bottom),s=Qe(n.left),l=Qe(n.right),d=t-i,c=t+a,u=rE(o&&o.length>=3?[e,o]:[e],d,c),f=[],m=u.length>=2?u.flatMap((p,g)=>{if(g+1>=u.length)return [];let h=u[g+1];return h<=p+1e-6?[p]:[p,h,(p+h)/2]}):[d];for(let p of m){let g=oE(e,o,p,r);for(let h of g)f.push(Object.freeze({start:h.start-s,end:h.end+l}));}return Hs(f)}function TS(e){let{x:t,y:n,width:r,height:o}=e;return Object.freeze([Object.freeze({x:t,y:n}),Object.freeze({x:t+r,y:n}),Object.freeze({x:t+r,y:n+o}),Object.freeze({x:t,y:n+o})])}function aE(e){let t=Math.max(0,Qe(e.extentWidthPt)),n=Math.max(0,Qe(e.extentHeightPt)),r=uc(e.transform,t,n),o=Math.min(e.polygonEmu.length,Ot);if(o<3)return TS({x:e.anchorX,y:e.anchorY,width:t,height:n});let a=r.width/RS,i=r.height/RS,s=[];for(let l=0;l<o;l+=1){let d=e.polygonEmu[l];s.push(Object.freeze({x:Qe(d.x)*a,y:Qe(d.y)*i}));}return fc({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:t,layoutHeight:n,anchorX:e.anchorX,anchorY:e.anchorY})}function iE(e,t){let n=t.effectInsets??cc,r=t.wrapDistances??cc,o=Qe(t.contentLeft),a=Qe(t.contentRight);if(t.mode==="topAndBottom"){let c=wS(pi(t.contentBounds,n),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Kp([{start:o,end:a}],o,a)}if(t.mode==="square"){let c=Xp(t.contentBounds,n,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Kp([{start:c.x,end:c.x+c.width}],o,a)}let i=t.polygon&&t.polygon.length>=3?t.polygon:TS(t.contentBounds),s=t.mode==="through"?"evenodd":"nonzero",l=eE(r,n),d=vS(i,e,l,s,t.clipPolygon);return Kp(d,o,a)}function sE(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(t=>t.start)),end:Math.max(...e.map(t=>t.end))})}function lE(e,t,n,r,o){if(n==="bothSides"||t.length===0)return e;let a=sE(t);if(!a)return e;if(n==="left")return Object.freeze(e.filter(l=>l.end<=a.start+1e-4));if(n==="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 FS(e,t){let n=iE(e,t),r=qC(n,t.contentLeft,t.contentRight);return lE(r,n,t.textSide,t.contentLeft,t.contentRight)}function dE(e,t,n,r){return n.length<3?false:vS(n,t,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function Up(e,t,n){let r=n.effectInsets??cc,o=n.hitBounds;if(e<o.x||e>o.x+o.width||t<o.y||t>o.y+o.height)return false;if(n.clipPolygon&&n.clipPolygon.length>=3)return dE(e,t,n.clipPolygon,r);let a=pi(n.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height}function IS(e){let t=Object.freeze({top:Qe(e.wrapDistancesEmu.top/qn),right:Qe(e.wrapDistancesEmu.right/qn),bottom:Qe(e.wrapDistancesEmu.bottom/qn),left:Qe(e.wrapDistancesEmu.left/qn)}),n=e.mode==="tight"||e.mode==="through"?aE({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:n,clipPolygon:e.geometry.clipPolygon,wrapDistances:t,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var $t=1e5,Ot=m.maxPolygonPoints,cc=Object.freeze({top:0,right:0,bottom:0,left:0}),cE=32,uE=.1,fE=new Set(["rect","ellipse","roundRect"]);function Te(e){return Number.isFinite(e)?e:0}function cn(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):t}function kS(e,t){let n=e+t;return Number.isFinite(n)?n:0}function OS(e,t,n){let r=cn(e,0,n),o=cn(t,0,n);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=n){let i=(n-1)/a;r*=i,o*=i;}return {left:r,right:o}}function pE(e){let t=OS(cn(e.left,0,$t),cn(e.right,0,$t),$t),n=OS(cn(e.top,0,$t),cn(e.bottom,0,$t),$t);return Object.freeze({left:t.left,top:n.left,right:t.right,bottom:n.right})}function mE(e){let t=pE({left:e.left*$t,top:e.top*$t,right:e.right*$t,bottom:e.bottom*$t});return Object.freeze({left:t.left/$t,top:t.top/$t,right:t.right/$t,bottom:t.bottom/$t})}function gE(e){let t=n=>{if(!Number.isFinite(n))return 0;let r=n/qn;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:t(e.top),right:t(e.right),bottom:t(e.bottom),left:t(e.left)})}function pi(e,t){let n=Te(t.left),r=Te(t.right),o=Te(t.top),a=Te(t.bottom);return Object.freeze({x:e.x-n,y:e.y-o,width:Math.max(0,kS(e.width,n+r)),height:Math.max(0,kS(e.height,o+a))})}function hE(e,t,n){let r=e*cn(n.left,0,1),o=t*cn(n.top,0,1),a=e*(1-cn(n.right,0,1)),i=t*(1-cn(n.bottom,0,1));if(a<=r||i<=o){let s=e/2,l=t/2;return Object.freeze({left:s,top:l,right:s,bottom:l})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function uc(e,t,n){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?Te(ro(r)??t):Math.max(0,Te(t)),s=o>0?Te(ro(o)??n):Math.max(0,Te(n));return Object.freeze({offsetX:Te(ro(a.x)??0),offsetY:Te(ro(a.y)??0),width:i,height:s})}function yE(e,t,n,r){let o=hE(t,n,r),a=o.right-o.left,i=o.bottom-o.top,s=t>0?t:1,l=n>0?n:1,d=[],c=Math.min(e.length,Ot);for(let u=0;u<c;u+=1){let f=e[u],m=a<=0?o.left:o.left+cn(f.x/s,0,1)*a,p=i<=0?o.top:o.top+cn(f.y/l,0,1)*i;d.push(Object.freeze({x:Te(m),y:Te(p)}));}return Object.freeze(d)}function CS(e,t,n){let r=e.x-t.x,o=e.y-t.y;n.flipHorizontal&&(r=-r),n.flipVertical&&(o=-o);let a=Te(n.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:Te(l+t.x),y:Te(d+t.y)})}function ES(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let t=e[0].x,n=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,Ot);for(let i=1;i<a;i+=1){let s=e[i];!Number.isFinite(s.x)||!Number.isFinite(s.y)||(t=Math.min(t,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),o=Math.max(o,s.y));}return Object.freeze({x:t,y:r,width:Math.max(0,n-t),height:Math.max(0,o-r)})}function Yp(e){let t=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),n=zs(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let s of n)r.push(CS(Object.freeze({x:s.x+e.offsetX,y:s.y+e.offsetY}),t,e.transform));let o=ES(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,Te(e.layoutWidth))/a,scaleY:Math.max(0,Te(e.layoutHeight))/i,anchorX:Te(e.anchorX),anchorY:Te(e.anchorY)})}function bE(e,t){return Object.freeze({x:Te(t.anchorX+(e.x-t.bboxX)*t.scaleX),y:Te(t.anchorY+(e.y-t.bboxY)*t.scaleY)})}function fc(e){let t=e.mapping??Yp({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}),n=yE(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(n.length>0?n.length:e.points.length,Ot),o=n.length>0?n: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:Te(l.x+e.offsetX),y:Te(l.y+e.offsetY)});i.push(bE(CS(d,a,e.transform),t));}return Object.freeze(i)}function zs(e,t,n,r){if(n<=0||r<=0){let o=Object.freeze({x:e,y:t});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:t}),Object.freeze({x:e+n,y:t}),Object.freeze({x:e+n,y:t+r}),Object.freeze({x:e,y:t+r})])}function xE(e,t,n){if(!e||!fE.has(e))return null;if(t<=0||n<=0)return zs(0,0,Math.max(0,t),Math.max(0,n));if(e==="rect")return zs(0,0,t,n);if(e==="ellipse"){let s=[],l=t/2,d=n/2,c=t/2,u=n/2,f=Math.min(cE,Ot);for(let m=0;m<f;m+=1){let p=m/f*Math.PI*2;s.push(Object.freeze({x:l+c*Math.cos(p),y:d+u*Math.sin(p)}));}return Object.freeze(s)}let r=Math.min(t,n)*uE,o=Math.max(0,r),a=t,i=n;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 gi(e){return Object.freeze({x:Te(e.x),y:Te(e.y)})}function SE(e,t){if(e.length===0)return Object.freeze([]);let n=t.x+t.width,r=t.y+t.height,o=(i,s,l)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,Ot);for(let u=0;u<c;u+=1){let f=gi(i[u]),m=gi(i[(u+1)%c]),p=s(f),g=s(m);if(p&&g?d.push(m):p&&!g?d.push(gi(l(f,m))):!p&&g&&(d.push(gi(l(f,m))),d.push(m)),d.length>=Ot)break}return Object.freeze(d.slice(0,Ot))},a=e.slice(0,Ot).map(gi);return a=[...o(a,i=>i.x>=t.x,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(t.x-i.x)/l:0;return Object.freeze({x:t.x,y:Te(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.x<=n,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(n-i.x)/l:0;return Object.freeze({x:n,y:Te(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.y>=t.y,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(t.y-i.y)/l:0;return Object.freeze({x:Te(i.x+d*(s.x-i.x)),y:t.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:Te(i.x+d*(s.x-i.x)),y:r})})],Object.freeze(a)}function RE(e){let t=ES(e);return Object.freeze({x:t.x,y:t.y,width:t.width,height:t.height})}function pc(e,t){let n=PE(e.paintBounds,t),r=n.width>0&&n.height>0?n:Object.freeze({...n}),o=a=>{if(!a||a.length===0)return a;let i=SE(a,t);return i.length>=3?Object.freeze(i.map(gi)):Object.freeze([])};return Object.freeze({...e,paintBounds:n,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function PE(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return o<=n||a<=r?Object.freeze({x:n,y:r,width:0,height:0}):Object.freeze({x:n,y:r,width:o-n,height:a-r})}function wE(e){let t=Math.max(0,Te(e.extentWidth)),n=Math.max(0,Te(e.extentHeight)),r=Te(e.anchorX),o=Te(e.anchorY),a=mE(e.crop),i=gE(e.effectExtentEmu),s=uc(e.transform,t,n),l=Object.freeze({x:r,y:o,width:t,height:n}),d={sourceWidth:s.width,sourceHeight:s.height,offsetX:s.offsetX,offsetY:s.offsetY,crop:a,transform:e.transform,layoutWidth:t,layoutHeight:n,anchorX:r,anchorY:o},c=Yp(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=fc({points:zs(0,0,s.width,s.height),...d,crop:u,mapping:c}),m=xE(e.presetGeometry,s.width,s.height),p="none",g=m;g||(p=e.presetGeometry?"unsupported-preset":"none",g=zs(0,0,s.width,s.height));let h=fc({points:g,...d,crop:u,mapping:c}),y=RE(h.length>=3?h:f),b=pi(y,i);return Object.freeze({contentBounds:l,paintBounds:b,hitBounds:b,transformedCorners:f,clipPolygon:h.length>=3?h:f,clipFallback:p,effectInsets:i})}function hi(e){let t=e.projection.picture,n=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return wE({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:t?.crop??{left:0,top:0,right:0,bottom:0},transform:t?.transform??n,presetGeometry:t?.presetGeometry??null})}function vE(e){let{transform:t,contentWidth:n,contentHeight:r}=e;if(n<=0||r<=0)return null;let o=uc(t,n,r),a=o.width,i=o.height,s=Yp({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:t,layoutWidth:n,layoutHeight:r,anchorX:0,anchorY:0}),l=Te(t.rotationDegrees),d=Math.abs(l%360)>1e-4,c=t.flipHorizontal?-1:1,u=t.flipVertical?-1:1,f=s.scaleX,m=s.scaleY,p=a>0?a/n:1,g=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(m-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(g-1)<1e-4)return null;let y=l*Math.PI/180,b=Math.cos(y),x=Math.sin(y),T=o.offsetX+a/2,S=o.offsetY+i/2,I=f*b*c,F=-f*x*u,v=m*x*c,w=m*b*u,k=f*(T-b*c*(a/2)+x*u*(i/2)-s.bboxX),P=m*(S-x*c*(a/2)-b*u*(i/2)-s.bboxY);return Object.freeze({a:Te(I*p),b:Te(v*p),c:Te(F*g),d:Te(w*g),e:Te(k),f:Te(P)})}function hH(e){let t=vE(e);if(t)return `matrix(${mi(t.a)}, ${mi(t.b)}, ${mi(t.c)}, ${mi(t.d)}, ${mi(t.e)}, ${mi(t.f)})`}function mi(e){return Number.isFinite(e)?String(e):"0"}function MS(e,t){let n=(r,o)=>{if(!(o>=la$1)){if(r.kind==="run"){for(let a of r.children)t(a);return}if(na$1(r)){for(let a of r.children)n(a,o+1);return}if(Cd$1(r))for(let a of Fd$1(r))n(a,o+1);}};for(let r of e.children)n(r,0);}function mc(e,t){let n=[],r=(o,a)=>{if(!(a>=la$1)){if(o.kind==="run"){for(let i of o.children)(i.kind==="drawing"||hb$1(i)||Sa$1(i))&&t(i,n,o);return}if(na$1(o)){n.push(o);for(let i of o.children)r(i,a+1);n.pop();return}if(Cd$1(o)){n.push(o);for(let i of Fd$1(o))r(i,a+1);n.pop();}}};for(let o of e.children)r(o,0);}function Ws(e){if(e.kind==="text"||e.kind==="deletedText"){let t="";for(let n of e.children)n.kind==="textValue"&&(t+=n.value);return t}return e.kind==="tab"?" ":e.kind==="hardBreak"?Vd$1(e):""}function yi(e){if(!e||e.kind==="textValue")return [];let t=[];for(let n of e.children){if(n.kind==="textValue")continue;if(n.localName==="textOutline"){let a=yb(n);a&&t.push(a);continue}let r={};for(let a of n.attributes)r[a.localName]=a.value;let o=Object.keys(r).length>0;if(n.localName==="rPrChange"||n.localName==="pPrChange"){let a=o?{localName:n.localName,attributes:r,revisionNodeId:n.id}:{localName:n.localName,revisionNodeId:n.id};t.push(a);continue}t.push(o?{localName:n.localName,attributes:r}:{localName:n.localName});}return t}function bi(e,t,n){let r=yi(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return n?[...n(t,r)]:t.length===0?r:[...t,...r]}var LS=new WeakMap;function TE(e){if(e.kind!=="run")return false;let t=LS.get(e);return t===void 0&&(t=He(bi(e,[])).hidden,LS.set(e,t)),t}function jt(e,t){if(e.kind!=="paragraph")return [];let n=[];return mc(e,(r,o,a)=>{let i=Tr;for(let s of o){let l=Vt(s)?qt(s):null;l&&(i=dn(i,l));}if(r.kind==="drawing"){let s=t.projectionForAtom?.(r.id)??t.project(r);s?.kind==="anchored"&&n.push({atomId:r.id,projection:s,revisions:i});return}if(hb$1(r)||Sa$1(r)){if(Sa$1(r)&&TE(a))return;let s=t.projectionForAtom?.(r.id)??null;s?.kind==="anchored"&&n.push({atomId:r.id,projection:s,revisions:i});}}),Object.freeze(n)}function un(e){let t=new Map;if(e.kind!=="paragraph")return t;let n;return MS(e,r=>{if(r.kind!=="drawing"&&!hb$1(r)&&!Sa$1(r))return;let o=(n??=Me$1(e)).spanOf(r);o&&t.set(r.id,o.start);}),t}var FE=new Map([["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"]]),IE=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),kE=Object.freeze({left:0,top:0,right:0,bottom:0});function AS(e){let t=e.picture,n=null;if(!t){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";n=FE.get(o)??"graphic";break}n===null&&(n="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:t?.crop??kE,transform:t?.transform??IE,placeholderGraphicKind:t||e.legacyGraphic?null:n,vectorShape:e.vectorShape})}var qn=12700;function Tt(e){return e/qn}function ro(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*qn*72)return null;let t=e/qn;return Number.isFinite(t)?t:null}function Jn(e){let t=Tt(e.inlineDistancesEmu.left),n=Tt(e.inlineDistancesEmu.right),r=Tt(e.inlineDistancesEmu.top),o=Tt(e.inlineDistancesEmu.bottom),a=Tt(e.effectExtentEmu.left),i=Tt(e.effectExtentEmu.right),s=Tt(e.effectExtentEmu.top),l=Tt(e.effectExtentEmu.bottom),d=Tt(e.extentEmu.cx),c=Tt(e.extentEmu.cy);return Object.freeze({distL:t,distR:n,distT:r,distB:o,effectL:a,effectR:i,effectT:s,effectB:l,width:d,height:c,totalWidth:t+a+d+i+n,lineContribution:r+s+c+l+o})}function DS(e,t,n){let r=Math.max(n.distT+n.effectT,e-n.height),o=Math.max(t,r-n.effectT+n.height+n.effectB+n.distB),a=r+n.height+n.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function gc(e,t,n){if(Math.abs(t)<1e-4&&Math.abs(n)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+t,y:a.y+n}),o=a=>Object.freeze({x:a.x+t,y:a.y+n});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 Qn(e,t,n){return Math.abs(t)<1e-4&&Math.abs(n)<1e-4?e:Object.freeze({...e,x:e.x+t,y:e.y+n,advanceStart:e.advanceStart+t,advanceEnd:e.advanceEnd+t,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+t,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+t,y:e.hitBounds.y+n}),geometry:gc(e.geometry,t,n)})}function qp(e,t){return e.length===0?e:e.map(n=>{let r=n.geometry.effectInsets.bottom,o=t-n.height-r,a=o-n.y;return Math.abs(a)<1e-4&&n.baselineOffset===t?n:Object.freeze({...n,y:o,baselineOffset:t,geometry:gc(n.geometry,0,a),paintBounds:Object.freeze({...n.paintBounds,y:n.paintBounds.y+a}),hitBounds:Object.freeze({...n.hitBounds,y:n.hitBounds.y+a})})})}function Zp(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return o<=n||a<=r?Object.freeze({x:n,y:r,width:0,height:0}):Object.freeze({x:n,y:r,width:o-n,height:a-r})}function hc(e,t){let n=Zp(e.paintBounds,t),r=n.width>0&&n.height>0?n:Object.freeze({...n}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=gc(e.geometry,o,a);return Object.freeze({...e,paintBounds:n,hitBounds:r,geometry:pc(i,t)})}var BS=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),NS=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function Zn(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function _S(e,t){return !(!t.layoutInCell||t.cellBox===null||!Number.isFinite(t.cellBox.height)||t.cellBox.height<=0||!Number.isFinite(t.cellBox.width)||t.cellBox.width<=0)}function jS(e,t){if(_S(e,t)){let l=t.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:t.anchorCharacterX,right:t.anchorCharacterX,center:t.anchorCharacterX};case "insideMargin":return Zn(t)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return Zn(t)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let n=-t.marginLeft,r=t.contentWidth+t.marginRight,o=0,a=t.contentWidth,i=t.columnBox.x,s=t.columnBox.x+t.columnBox.width;switch(e){case "page":return {left:n,right:r,center:(n+r)/2};case "margin":return {left:o,right:a,center:o+t.contentWidth/2};case "column":return {left:i,right:s,center:i+t.columnBox.width/2};case "character":return {left:t.anchorCharacterX,right:t.anchorCharacterX,center:t.anchorCharacterX};case "leftMargin":return {left:n,right:n,center:n};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return Zn(t)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return Zn(t)?{left:r,right:r,center:r}:{left:n,right:n,center:n};default:return null}}function HS(e,t){if(_S(e,t)){let c=t.cellBox;if(!c)return null;let{y:u,height:f}=c;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:u,bottom:u+f,center:u+f/2};case "paragraph":return {top:t.paragraphBox.y,bottom:t.paragraphBox.y+t.paragraphBox.height,center:t.paragraphBox.y+t.paragraphBox.height/2};case "line":return {top:t.anchorLineBox.y,bottom:t.anchorLineBox.y+t.anchorLineBox.height,center:t.anchorLineBox.y+t.anchorLineBox.height/2};case "insideMargin":return Zn(t)?{top:u,bottom:u+f,center:u+f/2}:{top:u+f,bottom:u+f,center:u+f};case "outsideMargin":return Zn(t)?{top:u+f,bottom:u+f,center:u+f}:{top:u,bottom:u+f,center:u+f/2};default:return null}}let n=-t.contentInsetTop,r=t.contentBandHeight,o=n+t.pageHeight-t.marginBottom,a=r+t.contentInsetBottom,i=0,s=t.contentHeight,l=t.verticalMarginFrame?.top??i,d=l+(t.verticalMarginFrame?.height??t.contentHeight);switch(e){case "page":return {top:n,bottom:a,center:(n+a)/2};case "margin":return {top:l,bottom:d,center:(l+d)/2};case "paragraph":return {top:t.paragraphBox.y,bottom:t.paragraphBox.y+t.paragraphBox.height,center:t.paragraphBox.y+t.paragraphBox.height/2};case "line":return {top:t.anchorLineBox.y,bottom:t.anchorLineBox.y+t.anchorLineBox.height,center:t.anchorLineBox.y+t.anchorLineBox.height/2};case "topMargin":return {top:n,bottom:n,center:n};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return Zn(t)?{top:i,bottom:i,center:i}:{top:s,bottom:s,center:s};case "outsideMargin":return Zn(t)?{top:a,bottom:a,center:a}:{top:n,bottom:n,center:n};default:return null}}function zS(e){return e===null?0:ro(e)}function OE(e,t,n){let r=Zn(n);if(n.layoutInCell&&n.cellBox&&Number.isFinite(n.cellBox.width)&&n.cellBox.width>0){let{x:o,width:a}=n.cellBox;return e==="inside"?r?o:o+a-t:e==="outside"?r?o+a-t:o:null}return e==="inside"?r?0:n.contentWidth-t:e==="outside"?r?n.contentWidth-t:0:null}function CE(e,t,n){let r=Zn(n),o=n.contentBandHeight;if(n.layoutInCell&&n.cellBox&&Number.isFinite(n.cellBox.height)&&n.cellBox.height>0){let{y:a,height:i}=n.cellBox;return e==="inside"?r?a:a+i-t:e==="outside"?r?a+i-t:a:null}return e==="inside"?r?0:o-t:e==="outside"?r?o-t:0:null}function EE(e,t,n,r,o){let a=jS(e,o);if(!a)return null;let i=zS(n);if(i===null)return null;if(t==="left")return a.left+i;if(t==="center")return a.center-r/2+i;if(t==="right")return a.right-r+i;if(t==="inside"||t==="outside"){let s=OE(t,r,o);if(s!==null)return s+i}return a.left+i}function ME(e,t,n,r,o){let a=HS(e,o);if(!a)return null;let i=zS(n);if(i===null)return null;if(t==="top")return a.top+i;if(t==="center")return a.center-r/2+i;if(t==="bottom")return a.bottom-r+i;if(t==="inside"||t==="outside"){let s=CE(t,r,o);if(s!==null)return s+i}return a.top+i}function Jp(e,t){let n=Jn(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=ro(r.simplePosition.xEmu),h=ro(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-t.marginLeft,y:h-t.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let s=r.horizontal.relativeFrom,l=r.vertical.relativeFrom,d=jS(s,t),c=HS(l,t),u=d?.left??0,f=c?.top??0;if(!BS.has(s)||!NS.has(l))return Object.freeze({x:0,y:0,horizontalFrame:BS.has(s)?s:a,verticalFrame:NS.has(l)?l:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let m=EE(s,r.horizontal.align,r.horizontal.offsetEmu,n.width,t),p=ME(l,r.vertical.align,r.vertical.offsetEmu,n.height,t);return Object.freeze(m===null||p===null?{x:0,y:0,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:m,y:p,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function LE(e){let t=e.input.projection,n=t.anchor,r=Jn(t),o=hi({projection:t,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?Zp(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:n?.behindDocument??false,allowOverlap:n?.allowOverlap??true,layoutInCell:n?.layoutInCell??true,relativeHeight:n?.relativeHeight??0,wrap:t.wrap==="inline"?"inFront":t.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?pc(o,e.clipRegion):o,resource:e.input.resource,accessibility:kb$1(t),...AS(t)})}function BE(e,t,n){let r=(a,i,s)=>Gt(a,ut(i,s),n);for(let a of e.spans){if(t<a.range.start)break;if(t<a.range.end){if(n&&a.text!==void 0&&a.style!==void 0){let l=t-a.range.start;return a.box.x+r(a.text.slice(0,l),a.style,a.fontSlot)}let i=a.range.end-a.range.start;if(i<=0)return a.box.x;let s=t-a.range.start;return a.box.x+a.box.width*s/i}if(t===a.range.end)return n&&a.text!==void 0&&a.style!==void 0?a.box.x+r(a.text,a.style,a.fontSlot):a.box.x+a.box.width}let o;for(let a of e.spans)a.range.end<=t&&(o=a);return o?n&&o.text!==void 0&&o.style!==void 0?o.box.x+r(o.text,o.style,o.fontSlot):o.box.x+o.box.width:e.box.x}function NE(e,t){let n=e.range.start;for(let r of e.spans)r.range.end<=t&&(n=r.range.end);return n}function Qp(e,t,n){if(!(Math.abs(n)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===t&&(!o.layoutInCell&&!["paragraph","line"].includes(o.verticalFrame)||(e[r]=Object.freeze({...o,y:o.y+n,geometry:gc(o.geometry,0,n),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+n}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+n})})));}}function oo(e){let t=jt(e.paragraph,e.drawingLayout);if(t.length===0)return [];let n=un(e.paragraph),r=e.displayMode??Me,o=[];for(let a of t){let i=a.projection;if(i.hidden)continue;let s=Ud(a.revisions,r,e.revisionAuthorFilter);if(s===null)continue;let l=n.get(a.atomId);if(l===void 0||e.fragmentRange&&(l<e.fragmentRange.start||l>=e.fragmentRange.end))continue;let d=e.lines.find(x=>l>=x.range.start&&l<x.range.end);if(!d)continue;let c=i.anchor?.layoutInCell??true,f=i.position?.horizontal.relativeFrom==="character"?NE(d,l):l,m=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:d.box,anchorCharacterX:BE(d,f,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:c}),p=Jp(i,m),g=i.wrap!=="inFront"&&i.wrap!=="behind"&&c&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0,h=i.position?.vertical.relativeFrom==="margin"?e.pageClip:Jo(e.frameBase),y=g?e.cellBox:h,b=LE({input:Object.freeze({drawingNodeId:a.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:i,resource:e.drawingLayout.resourceOf(i)}),anchorParagraphId:e.paragraphId,start:f,resolved:p,clipRegion:y,revisions:s,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(i.drawingNodeId)}:{},...i.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(i)}:{}});o.push(b);}return Object.freeze(o)}function WS(e){let t=Jn(e.input.projection),n=e.slotX+t.distL+t.effectL,r=hi({projection:e.input.projection,anchorX:n,anchorY:e.y,extentWidth:t.width,extentHeight:t.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=Zp(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:n,y:e.y,width:t.width,height:t.height,distL:t.distL,distR:t.distR,distT:t.distT,distB:t.distB,advanceStart:e.slotX,advanceEnd:e.slotX+t.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:pc(r,o),resource:e.input.resource,accessibility:kb$1(e.input.projection),...AS(e.input.projection),...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{}})}var AE=256,nm=8,Qo=8,xi=class extends Error{name="DrawingExclusionConvergenceError";constructor(t="drawing exclusion reflow did not converge"){super(t);}};function DE(e,t){let n=Math.max(1,t.columnCount);if(n<=1)return 0;let r=e.x+e.width/2;if(t.columnLefts&&t.columnWidths&&t.columnLefts.length===n){for(let i=0;i<n;i+=1){let s=t.columnLefts[i],l=s+t.columnWidths[i];if(r>=s-.001&&r<l+.001)return i}return n-1}let o=t.columnGapPt,a=(t.contentWidth-o*(n-1))/n;for(let i=0;i<n;i+=1){let s=i*(a+o),l=s+a;if(r>=s-.001&&r<l+.001)return i}return n-1}function tm(e){return e.behindDocument?"behind":"inFront"}function VS(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function _E(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 jE(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function rm(e){let t=_E(e.projection.wrap);if(!t||!e.projection.wrapGeometry)return null;let n=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return IS({mode:t,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:n.distancesEmu,polygonEmu:n.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:t==="square"?jE(e.projection.wrap):n.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function om(e){if(e.mode==="topAndBottom"||e.mode==="square")return Xp(e.contentBounds,e.effectInsets,e.wrapDistances);let t=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)t.push(o.y);let n=Math.min(...t)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...t)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:n,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-n)})}function HE(e){if(e.drawing.behindDocument||!VS(e.drawing.wrap))return null;let t=e.yOverride??e.drawing.y,n=rm({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:t});return n?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:tm(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:t,verticalBand:om(n),input:n}):null}function KS(e,t){let n=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=t.sourceOrder??Number.MAX_SAFE_INTEGER;return n!==r?n-r:e.drawingNodeId.localeCompare(t.drawingNodeId)}function zE(e,t){let n=tm(e),r=tm(t);return n!==r?n==="behind"?-1:1:e.relativeHeight!==t.relativeHeight?e.relativeHeight-t.relativeHeight:KS(e,t)}function $S(e){return Object.freeze([...e].sort(zE))}function em(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function am(e,t){if(Math.abs(t)<=1e-4)return e;let n=e.geometry;return Object.freeze({...e,y:e.y+t,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+t}),geometry:Object.freeze({...n,contentBounds:Object.freeze({...n.contentBounds,y:n.contentBounds.y+t}),paintBounds:Object.freeze({...n.paintBounds,y:n.paintBounds.y+t}),hitBounds:Object.freeze({...n.hitBounds,y:n.hitBounds.y+t}),transformedCorners:n.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+t})),clipPolygon:n.clipPolygon?n.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+t})):null})})}function XS(e,t){let n=t.maxAttempts??AE,r=[...e].sort(KS),o=[],a=[],i=[];for(let s of r){if(s.allowOverlap){o.push(s);continue}let l=s,d=0;for(;d<n&&o.some(g=>em(g.paintBounds,l.paintBounds));){let m=o.find(g=>em(g.paintBounds,l.paintBounds)),p=m.paintBounds.y+m.paintBounds.height-l.paintBounds.y+.001;l=am(l,p),d+=1;}let c=o.some(f=>em(f.paintBounds,l.paintBounds)),u=l.paintBounds.y+l.paintBounds.height>t.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 ao(e,t,n,r){let o=[{start:n,end:r}];for(let a of t){let i=a.verticalBand;if(e<i.y||e>=i.y+i.height)continue;let s=FS(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 US(e,t){for(let n of t)if(e>=n.start-1e-6&&e<n.end-1e-6)return Math.max(0,n.end-e);return 0}function WE(e,t){for(let n of t)if(n.end>e+1e-6)return n;return null}function im(e,t){let n=WE(e,t);if(!n)return null;let r=Math.max(e,n.start),o=n.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function GE(e,t,n){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+t,y:r.y+n}),contentLeft:e.contentLeft+t,contentRight:e.contentRight+t,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+t,y:o.y+n}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+t,y:o.y+n}))}:{}})}function sm(e,t){return Object.freeze({...e,layoutFallback:t})}function YS(e,t,n,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-n,verticalBand:Object.freeze({...a,x:a.x-t,y:a.y-n}),input:Object.freeze({...GE(i,-t,-n),contentLeft:r?.left,contentRight:r?.right??i.contentRight-t})})}))}function qS(e,t,n){return Object.freeze(e.filter(r=>{let o=n(r.anchorParagraphId);return o===void 0?r.sourceOrder<=t:o<=t}))}function ZS(e){let t=jt(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=un(e.paragraph),r=e.displayMode??Me,o=Math.max(1,e.contentRight-e.contentLeft),a=[];for(let i of t){if(!Le(i.revisions,r,e.revisionAuthorFilter)||i.projection.anchor?.behindDocument||!VS(i.projection.wrap)||i.projection.wrap==="topAndBottom")continue;let s=n.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=Jp(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,m=Jn(i.projection),p=hi({projection:i.projection,anchorX:u.x,anchorY:f,extentWidth:m.width,extentHeight:m.height}),g=rm({projection:i.projection,geometry:p,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.projection.drawingNodeId)??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:om(g),input:g}));}return a.sort((i,s)=>i.sourceOrder-s.sourceOrder),Object.freeze(a)}function yc(e){let t=jt(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=un(e.paragraph),r=e.displayMode??Me,o=[];for(let a of t){if(!Le(a.revisions,r,e.revisionAuthorFilter)||a.projection.anchor?.behindDocument||a.projection.wrap!=="topAndBottom")continue;let i=n.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=Jn(a.projection),c=hi({projection:a.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:d.width,extentHeight:d.height}),u=rm({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.projection.drawingNodeId)??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:om(u),input:u}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}var VE=8;function KE(e,t,n,r){return e<r&&t>n}function io(e,t,n){if(t<=0||n.length===0)return 0;let r=0;for(let o=0;o<VE;o+=1){let a=e+r,i=a+t,s=a,l=false;for(let c of n){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;KE(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 $E(e){return e.map(t=>`${t.start.toFixed(3)}-${t.end.toFixed(3)}`).join(",")}function XE(e){let t=e.contentBounds,n=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,t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),n.top.toFixed(3),n.right.toFixed(3),n.bottom.toFixed(3),n.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function er(e){return e.length===0?"":e.map(t=>{let n=t.verticalBand,r=t.y+t.input.contentBounds.height/2,o=ao(r,[t],t.input.contentLeft,t.input.contentRight);return [t.drawingNodeId,t.sourceKind??"",String(t.sourceOrder),String(t.columnIndex),t.y.toFixed(3),n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),XE(t.input),$E(o)].join("|")}).join(`
7
- `)}function lm(e,t,n,r,o,a){let i=[];for(let s of e){let l=t.projectionForAtom?.(s.drawingNodeId);if(!l)continue;let d=s.sourceOrder??o?.(s.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?DE(s,a):0,u=HE({drawing:s,projection:l,sourceOrder:d,contentLeft:n,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((s,l)=>s.sourceOrder-l.sourceOrder),Object.freeze(i)}function dm(e,t,n,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:n}),i=new Map;for(let s of e){let l=s.anchoredDrawings??[],d=lm(l,t,0,n,r,a);d.length>0&&i.set(s.index,d);}return i}var GS=new WeakMap;function YE(e){return e?`${e.columnCount};${e.columnGapPt};${e.contentWidth};${(e.columnLefts??[]).join(",")};${(e.columnWidths??[]).join(",")}`:""}function JS(e,t,n,r,o,a){let i=YE(a),s=GS.get(e);if(s&&s.drawingLayout===t&&s.drawingLayoutEpoch===n&&s.contentWidth===r&&s.drawingSourceOrder===o&&s.columnToken===i)return s.zones;let l=dm(e,t,r,o?d=>{let c=t.projectionForAtom?.(d)?.drawingNodeId??d;return o.get(c)}:void 0,a);return GS.set(e,{drawingLayout:t,drawingLayoutEpoch:n,contentWidth:r,drawingSourceOrder:o,columnToken:i,zones:l}),l}function bc(e,t){if(e.size!==t.size)return false;for(let[n,r]of e){let o=t.get(n);if(!o||er(r)!==er(o))return false}return true}function xc(e){return e.size===0?"":[...e.entries()].sort(([t],[n])=>t-n).map(([t,n])=>`${t}:${er(n)}`).join(`
8
- `)}var Zt=.001,qE=32;function ZE(e){if(!e||e.length<4)return false;let t=1/0,n=-1/0,r=1/0,o=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.max(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.y);return n>t&&o>r?e.every((a,i)=>{let s=e[(i+1)%e.length];return (Math.abs(a.x-t)<Zt||Math.abs(a.x-n)<Zt||Math.abs(a.y-r)<Zt||Math.abs(a.y-o)<Zt)&&(Math.abs(a.x-s.x)<Zt||Math.abs(a.y-s.y)<Zt)}):false}function QS(e,t,n,r,o,a){if(!(t>0&&a>0&&a<=o-r)||n.length===0)return 0;let i=e;for(let s=0;s<qE;s++){let l=n.filter(f=>f.verticalBand.y<i+t-Zt&&f.verticalBand.y+f.verticalBand.height>i+Zt);if(l.length===0||l.some(f=>f.input.mode!=="square"&&f.input.mode!=="topAndBottom"&&!(f.input.mode==="tight"&&ZE(f.input.polygon))))return i-e;let d=[{start:r,end:o}],c=[i+Zt,i+t-Zt];for(let f of l)c.push(Math.max(i,f.verticalBand.y)+Zt);for(let f of c)if(d=$p(d,ao(f,n,r,o)).filter(m=>m.end-m.start>=a-Zt),d.length===0)break;if(d.length>0)return i-e;let u=1/0;for(let f of l){let m=f.verticalBand.y+f.verticalBand.height;m>i+Zt&&(u=Math.min(u,m));}if(!Number.isFinite(u)||u<=i||u-e>1e5)return i-e;i=u;}return i-e}function eR(e){let t,n=()=>{let a=e.line();if(t===a||a.spans.length>0||a.drawings.length>0)return;let i=e.zones();if(i.length===0)return;let s=e.measurer.lineMetrics(e.emptyStyle),l=io(e.top(),a.height>0?a.height:s.height,i);l>.001&&(t=a,a.exclusionSkipBefore=l);};return {applyTopAndBottomSkipIfNeeded:n,applyNarrowWrapSkipIfNeeded:(a,i)=>{let s=e.line();if(s.spans.length>0||s.drawings.length>0)return;n();let l=e.zones();if(l.length===0)return;let d=e.measurer.lineMetrics(i),c=a.codePointAt(0),u=c===void 0?"":String.fromCodePoint(c),f=QS(e.top()+(s.exclusionSkipBefore??0),Math.max(d.height,_s(e.lineSpacing,d.height,d.baseline).height),l,e.left(),e.right,e.measurer.measure(Pn(u,i),i));f>.001&&(s.exclusionSkipBefore=(s.exclusionSkipBefore??0)+f,s.width=0,t=s);},finalizeTopAndBottomClearance:()=>{let a=e.line(),i=e.zones();if(i.length===0)return;let s=Math.max(io(e.top(),a.height,i),a.exclusionSkipBefore??0);s>.001?a.exclusionSkipBefore=s:delete a.exclusionSkipBefore;}}}var Si=.7,JE=1.25,QE="Cambria Math";function Rc(e){return vd(e,QE)}function tr(e,t,n,r){return Object.freeze({x:e,y:t,width:n,height:r})}function Jt(e,t,n){return Object.freeze({...e,box:tr(t,n,e.box.width,e.box.height)})}var eM=4,tM=8,tR=new WeakMap;function nM(e){let t=Rc(e);return [t.fontFamily??"",t.fontSizePt,t.bold?1:0,t.italic?1:0,t.verticalAlign,t.baselineShiftPt,t.caps?1:0,t.smallCaps?1:0,t.characterSpacingPt,t.horizontalScalePercent,t.kerningMinPt].join("|")}function rM(e,t){if(t===void 0)return {projections:new WeakMap};let n=tR.get(e);n||(n=new Map,tR.set(e,n));let r=n.get(t);if(r)return n.delete(t),n.set(t,r),r;if(n.size>=eM){let a=n.keys().next().value;a!==void 0&&n.delete(a);}let o={projections:new WeakMap};return n.set(t,o),o}function Ri(e,t,n){let r=n.styles.get(t);if(r)return r;let o=t===1?e:Object.freeze({...e,fontSizePt:e.fontSizePt*t,characterSpacingPt:e.characterSpacingPt*t});return n.styles.set(t,o),o}function nR(e,t,n,r){let o=r.metrics.get(n);if(o)return o;let a=e.lineMetrics(Ri(t,n,r));return r.metrics.set(n,a),a}function Sc(e,t,n,r,o,a){let i=Ri(r,o,a),s=nR(n,r,o,a);return Object.freeze({kind:e,text:t,fontSizePt:i.fontSizePt,box:tr(0,0,Gt(t,i,n),s.height),baseline:s.baseline})}function oM(e,t){if(e.length===0)return Object.freeze({kind:"row",items:Object.freeze([]),box:tr(0,0,0,t.height),baseline:t.baseline});let n=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=Jt(i,o,n-i.baseline);return o+=i.box.width,s});return Object.freeze({kind:"row",items:Object.freeze(a),box:tr(0,0,o,n+r),baseline:n})}function fn(e,t,n,r,o){switch(e.kind){case "text":return Sc("text",e.value,t,n,r,o);case "fallback":return Sc("fallback",e.text||"\u2026",t,n,r,o);case "row":return oM(e.items.map(a=>fn(a,t,n,r,o)),nR(t,n,r,o));case "fraction":{let a=Ri(n,r,o),i=fn(e.numerator,t,n,r*Si,o),s=fn(e.denominator,t,n,r*Si,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,m=f+c+d,p=m+s.box.height,g=Math.min(p,f+c/2+a.fontSizePt*.22);return Object.freeze({kind:"fraction",numerator:Jt(i,(u-i.box.width)/2,0),denominator:Jt(s,(u-s.box.width)/2,m),bar:tr(l/2,f,u-l,c),box:tr(0,0,u,p),baseline:g})}case "radical":{let a=Ri(n,r,o),i=fn(e.radicand,t,n,r,o),s=Sc("text","\u221A",t,n,r,o),l=e.degree?fn(e.degree,t,n,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,m=f+s.box.width,p=u+i.baseline,g=Math.max(u+i.box.height,p+(s.box.height-s.baseline));return Object.freeze({kind:"radical",sign:Jt(s,f,p-s.baseline),radicand:Jt(i,m,u),...l?{degree:Jt(l,0,0)}:{},bar:tr(m,0,i.box.width,d),box:tr(0,0,m+i.box.width,g),baseline:p})}case "script":{let a=Ri(n,r,o),i=fn(e.base,t,n,r,o),s=e.subscript?fn(e.subscript,t,n,r*Si,o):void 0,l=e.superscript?fn(e.superscript,t,n,r*Si,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,m=f+i.baseline,p=m+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?p+s.box.height:0);return Object.freeze({kind:"script",base:Jt(i,0,f),...s?{subscript:Jt(s,c,p)}:{},...l?{superscript:Jt(l,c,u)}:{},box:tr(0,0,g,h),baseline:m})}case "nary":{let a=Ri(n,r,o),i=Sc("text",e.operator,t,n,r*JE,o),s=fn(e.body,t,n,r,o),l=e.lowerLimit?fn(e.lowerLimit,t,n,r*Si,o):void 0,d=e.upperLimit?fn(e.upperLimit,t,n,r*Si,o):void 0,c=Math.max(.5,a.fontSizePt*.05),u=Math.max(i.box.width,l?.box.width??0,d?.box.width??0),m=d?d.box.height+c:0,p=m+i.baseline,g=m+i.box.height+(l?c:0),h=u+c,y=p-s.baseline,x=-Math.min(0,m,y,l?g:0),T=p+x,S=Math.max(m+i.box.height,l?g+l.box.height:0,y+s.box.height)+x;return Object.freeze({kind:"nary",operator:Jt(i,(u-i.box.width)/2,m+x),body:Jt(s,h,y+x),...l?{lowerLimit:Jt(l,(u-l.box.width)/2,g+x)}:{},...d?{upperLimit:Jt(d,(u-d.box.width)/2,x)}:{},box:tr(0,0,h+s.box.width,S),baseline:T})}}}function rR(e,t,n){let r=Rc(n),o={styles:new Map,metrics:new Map};return Object.freeze({sourceNodeId:e.sourceNodeId,geometry:fn(e.expression,t,r,1,o),fallbackText:e.fallbackText,truncated:e.truncated})}function oR(e,t){let n=rM(e,t);return (r,o)=>{let a=nM(o),i=n.projections.get(r),s=i?.get(a);if(s&&i)return i.delete(a),i.set(a,s),s;let l=rR(r,e,o);if(i||(i=new Map,n.projections.set(r,i)),i.size>=tM){let d=i.keys().next().value;d!==void 0&&i.delete(d);}return i.set(a,l),l}}function Gs(e){if(e.length===0)return false;for(let t of e)if(t!==" "&&t!=="\u3000")return false;return true}function Pc(e,t,n,r,o){if(t<=n+o)return;let a=e.length;for(;a>0&&e[a-1]===" ";)a--;if(a===0||a===e.length)return;let i=r(e.slice(0,a));if(!(i>n+o))return {length:a,visibleWidth:i,width:Math.max(i,n)}}function aR(e,t,n){if(!n){e.push(t);return}let r=t.range.start+n.length;e.push({...t,text:t.text.slice(0,n.length),range:{...t.range,end:r},box:{...t.box,width:n.visibleWidth}},{...t,text:t.text.slice(n.length),range:{...t.range,start:r},box:{...t.box,x:t.box.x+n.visibleWidth,width:Math.max(0,t.box.width-n.visibleWidth)},lineEndWhitespace:true});}function iR(e){let{pieces:t,measurer:n,available:r,firstLineOffset:o,anchorStarts:a,equationLayoutOf:i}=e,s=new Map;if(a.length===0)return s;let l=t[0]?.start??0,d=[l],c=0,u=0,f="",m=0,p=-1,g=()=>u===0?o:0,h=()=>Math.max(1,r-g()),y=b=>{l=b,d.push(b),c=0,u+=1;};for(let b of t){let x=i(b);if(x){let I=x.geometry.box.width;c>0&&c+I>h()&&y(b.start),c+=I,f="",p=-1;continue}if(b.inlineDrawing){let I=Jn(b.inlineDrawing.projection).totalWidth;c>0&&c+I>h()&&y(b.start),c+=I,f="",p=-1;continue}if(b.text===`
9
- `||b.text===Sd$1){y(b.end);continue}let T=!!b.projected||!!b.positionalTab||b.end-b.start!==b.text.length,S=0;for(let I of e.cjkBreaks?.boundaries(b)??qo(b.text,!T)){let F=b.text.slice(S,I);if(F.length===0)continue;let v=ut(b.style,b.fontSlot),w=j=>n.measure(Pn(j,v),v),k=w(b.measureText??F);if(!T&&b.measureText===void 0){let j=h()-c;k=Pc(F,k,j,w,.001)?.width??k,c>0&&Gs(F)&&(k=Math.min(k,Math.max(0,j)));}let P=b.start+S,O=e.cjkBreaks?.decision(b,S)??rc(f,F,S>0),L=O==="opens";if(L&&(m=P,p=c),!(e.typography?.overflowPunctuation&&ac(F,b,h()-c,k,n))&&c>0&&c+k>h()){if(!(O==="forbidden"&&p<=0))if(L||p<=0)y(P);else {let j=c-p;y(m),c=j;}p=0;}c+=k,f=F,S=I;}}for(let b of a){let x=0,T=d.length-1;for(;x<T;){let S=x+T+1>>1;d[S]<=b?x=S:T=S-1;}s.set(b,d[x]);}return s}function iM(e,t,n,r,o){if(o===void 0||o(e,t[r-1].utf16To))return r;for(let a=r-1;a>n;a-=1)if(o(e,t[a-1].utf16To))return a;for(let a=r+1;a<=t.length;a+=1)if(o(e,t[a-1].utf16To))return a;return t.length}function sR(e,t,n,r){if(n<=r.remainingLineWidth()+r.overflowTolerancePt)return {text:e,modelStart:t,width:n,brokeLine:false};let o=Ye(e),a=0,i=0,s=n,l=false;for(;a<o.length&&s>r.remainingLineWidth()+r.overflowTolerancePt;){if(o.length-a===1){if(r.lineHasText()&&!(i===0&&r.keepWithPrevious)){r.closeLine(),l=true;continue}break}let c=r.remainingLineWidth(),u=a+1,f=o.length-1,m=a;for(;u<=f;){let h=u+f>>1,y=o[h-1].utf16To;r.measureText(e.slice(i,y))<=c+r.overflowTolerancePt?(m=h,u=h+1):f=h-1;}if(m===a&&r.lineHasText()&&!(i===0&&r.keepWithPrevious)){r.closeLine(),l=true;continue}if(m===a&&(m+=1),m=iM(e,o,a,m,r.cutAllowedAt),m===o.length)break;let p=o[m-1].utf16To,g=e.slice(i,p);r.appendPrefix({text:g,modelStart:t+i,width:r.measureText(g)}),r.closeLine(),l=true,a=m,i=p,s=r.measureText(e.slice(i));}return {text:e.slice(i),modelStart:t+i,width:s,brokeLine:l}}var sM={props:true,style:true,fontSlot:true,caretEdges:true,tabLeader:true,tabLeaderAdvancePt:true,link:true,wrapAdvanceBefore:true,revisions:true,fieldAtom:true,projected:true,equation:true,noteNav:true,lineEndWhitespace:true},lM=Object.keys(sM);function dM(e,t){for(let n of lM)if(e[n]!==t[n])return false;return true}function cM(e,t){if(e.caretEdges!==void 0||t.caretEdges!==void 0)return false;let n=kn(e.text),r=t.text.codePointAt(0);return n===void 0||r===void 0||!Yo(n)||!Yo(r)||e.range.paragraphId!==t.range.paragraphId||e.range.end!==t.range.start||Math.abs(e.box.x+e.box.width-t.box.x)>.01||e.box.height!==t.box.height?false:dM(e,t)}function lR(e){if(e.spans.length<2)return;let t=[];for(let n=0;n<e.spans.length;){let r=n;for(;r+1<e.spans.length&&cM(e.spans[r],e.spans[r+1]);)r+=1;let o=e.spans[n];if(r===n){t.push(o),n+=1;continue}let a=[],i=0;for(let s=n;s<=r;s+=1)a.push(e.spans[s].text),i+=e.spans[s].box.width;t.push({...o,range:{...o.range,end:e.spans[r].range.end},text:a.join(""),box:{...o.box,width:i}}),n=r+1;}if(t.length!==e.spans.length){e.spans.length=0;for(let n of t)e.spans.push(n);}}function cm(e,t,n){return Math.max(io(t,e.height,n),e.exclusionSkipBefore??0)}function um(e,t,n,r=0){return cm(t,e,n)+Math.max(0,t.height-t.trailingSpacing)+r}function dR(e){return Object.freeze({spans:e.spans.map(t=>Object.freeze({...t,box:Object.freeze({...t.box})})),drawings:e.drawings.map(t=>Object.freeze({...t,paintBounds:Object.freeze({...t.paintBounds}),hitBounds:Object.freeze({...t.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 ea=.001;function Mt(e){return yi(e)}function uM(e){let t=new Array(e.length),n=false;for(let r=e.length-1;r>=0;r-=1){let o=e[r],a=new Uint8Array(o.text.length+1);if(a[o.text.length]=n?1:0,o.inlineDrawing)a.fill(1);else for(let i=o.text.length-1;i>=0;i-=1){let s=o.text[i];s===`
10
- `||s===Sd$1?a[i]=0:s!==" "&&!Gs(s)?a[i]=1:a[i]=a[i+1];}t[r]=a,n=a[0]===1;}return t}function fM(e,t,n,r){let o=0,a=0,i=false;for(let s=t;s<e.length;s+=1){let l=e[s],d=ut(l.style,l.fontSlot),c=s===t?n:0;for(let u=c;u<l.text.length;){let f=l.text[u];if(f===" "||f===`
11
- `||f===Sd$1)return {width:o,decimalOffset:i?a:o};let m=u+1,p=l.text.slice(u,m),g=r.measure(Pn(p,d),d);!i&&f==="."?i=true:i||(a+=g),o+=g,u=m;}}return {width:o,decimalOffset:i?a:o}}function pM(e,t,n,r){let o=e.relativeTo==="indent"||!r?{left:t,right:n}: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 wc=31680;function Vs(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let t=Number(e);return Number.isFinite(t)?t>wc?Ue(wc):t<-wc?Ue(-wc):Ue(t):null}function Ks(e){let t=0,n=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=Vs(o),s=Vs(a);i!==null&&(t=We(i)),s!==null&&(n=We(s));}return {left:t,right:n}}function cR(e){let t="left";for(let n of e)if(n.localName==="jc")switch(n.attributes?.val){case "center":t="center";break;case "right":case "end":t="right";break;case "both":case "distribute":t="both";break;default:t="left";}return t}function mM(e){return e.endsWith(" ")}function vc(e,t,n,r,o,a,i){if(e.length===0||o==="left")return e;let s=e.length;for(;s>0&&e[s-1].box.width===0&&(e[s-1].text===`
12
- `||e[s-1].text===Sd$1);)s-=1;let l=s;for(;l>0&&e[l-1].lineEndWhitespace;)l-=1;let d=e[s-1],c=l<e.length?e[l].box.x-n:void 0,u=i!==void 0&&d!==void 0&&Math.abs(d.box.x+d.box.width-n-i)<=ea;if(l<s&&u&&(o==="center"||o==="right")){let y=r-c;if(y<=0)return e;let b=o==="center"?y/2:y,x=(i??0)>=r-ea,T=e[l].box.x+b;return e.map((S,I)=>{if(I<l)return {...S,box:{...S.box,x:S.box.x+b}};if(!x)return {...S,box:{...S.box,x:S.box.x+b}};let F=Math.min(S.box.width,Math.max(0,n+r-T)),v={...S,box:{...S.box,x:T,width:F}};return T+=F,v})}let f=e[e.length-1],p=i??c??(()=>{let y=f.text.replace(/\s+$/,""),b=y===f.text?0:f.box.width-Gt(y,ut(f.style,f.fontSlot),t);return f.box.x-n+f.box.width-b})(),g=r-p;if(g<=0)return e;if(o==="both"){if(a)return e;let y=sS(e,t,g);if(y)return y;let b=[];for(let I=1;I<l;I+=1)mM(e[I-1].text)&&b.push(I);if(b.length===0)return e;let x=g/b.length,T=new Set(b),S=0;return e.map((I,F)=>(T.has(F)&&(S+=x),S===0?I:{...I,box:{...I.box,x:I.box.x+S}}))}let h=o==="center"?g/2:g;return e.map(y=>({...y,box:{...y.box,x:y.box.x+h}}))}function Tc(e,t){return t===0||e.length===0?e:e.map(n=>Qn(n,t,0))}function uR(e,t,n,r,o,a,i,s=[],l=li,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let m=u?.lineSpacing??fi,p=u?.firstLineOffset??0,g=[],h=si(e,s,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??Me,g,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false,u?.refFields,u?.revisionAuthorFilter),y=Math.max(0,u?.startOffset??0),b=h.flatMap(V=>{if(V.end<=y)return [];if(V.start>=y)return [V];let E=y-V.start;return [{...V,text:V.projected?V.text:V.text.slice(E),start:y}]}),x=u?.typography??Qd(Mt("children"in e?e.children.find(V=>V.kind==="paragraphProperties"):void 0)),T=dS(b,x,o),S=uM(T),I=oc(T,x),F=oR(o,u?.equationCacheToken),v=V=>V.equation?F(V.equation,V.style):null;if(T.length===0&&u?.suppressEmptyPlaceholderLine)return [];let w=V=>({...V.revisions===void 0?{}:{revisions:V.revisions},...V.fieldAtom===void 0?{}:{fieldAtom:V.fieldAtom}}),k=u?.markRunProperties??s,P=k.length===0?Xn:He(k,u?.themeFonts),O=n+r,L=u?.contentLeft??n,A=u?.contentRight??O,j=u?.contentOriginX??0,W=[],R={spans:[],start:y,end:y,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},C=new Map,M=u?.displayMode??Me,N=(()=>{let V=new Set;if(!u?.inlineDrawingLayout)return V;let E=un(e);for(let oe of jt(e,u.inlineDrawingLayout)){if(!Le(oe.revisions,M,u?.revisionAuthorFilter)||oe.projection.wrap!=="topAndBottom")continue;let te=E.get(oe.atomId);te!==void 0&&V.add(te);}return V})(),D=(()=>{let V=new Set;if(!u?.inlineDrawingLayout)return V;let E=un(e);for(let oe of jt(e,u.inlineDrawingLayout)){if(!Le(oe.revisions,M,u?.revisionAuthorFilter)||oe.projection.anchor?.behindDocument||oe.projection.wrap==="topAndBottom"||oe.projection.wrap==="inline"||oe.projection.wrap==="behind"||oe.projection.wrap==="inFront")continue;let te=E.get(oe.atomId);te!==void 0&&V.add(te);}return V})(),_=[...(u?.pageExclusionZones??[]).filter(V=>V.anchorParagraphId===t).map(V=>V.anchorModelStart),...N,...D],K=iR({typography:x,cjkBreaks:I,pieces:T,measurer:o,available:r,firstLineOffset:p,anchorStarts:_,equationLayoutOf:v});for(let V of D){let E=K.get(V);E!==void 0&&C.set(V,E);}let H=V=>{if(V.anchorParagraphId!==t)return true;let E=K.get(V.anchorModelStart);return E!==void 0&&R.start>=E||R.end>=V.anchorModelStart},z=()=>{let V=u?.pageExclusionZones?.filter(te=>!(!H(te)||te.anchorParagraphId===t&&(!te.sourceKind&&te.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],E=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&C.size>0?ZS({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:L,contentRight:A,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:C,anchorCellBox:u.anchorCellBox,displayMode:M,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]),oe=u?.inlineDrawingLayout&&C.size>0?yc({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:L,contentRight:A,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:C,displayMode:M,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]);return Object.freeze([...V,...E,...oe])},$=()=>W.length===0?p:0,U=()=>j+n+$(),ie=()=>Math.max(1,r-$()),Z=()=>W.reduce((V,E)=>V+E.height+(E.exclusionSkipBefore??0),0),X=()=>(u?.paragraphStartY??0)+Z(),Q=V=>{N.has(V)&&C.set(V,Z());},{applyTopAndBottomSkipIfNeeded:pe,applyNarrowWrapSkipIfNeeded:ue,finalizeTopAndBottomClearance:Ie}=eR({line:()=>R,top:X,zones:z,left:()=>Math.max(L,U()),right:A,emptyStyle:P,measurer:o,lineSpacing:m}),me=()=>X()+(R.exclusionSkipBefore??0)+.001,Pe=()=>{let V=z();if(V.length===0)return true;pe();let E=ao(me(),V,L,A),oe=U()+R.width,te=im(oe,E);return te?(te.x>oe+.001&&(R.width=te.x-U()),true):false},ce=()=>{let V=ie(),E=z();if(E.length===0)return V;if(pe(),!Pe())return 0;let oe=ao(me(),E,L,A),te=U()+R.width,Ee=US(te,oe);return Ee<=.001?0:Math.min(V,R.width+Ee)},re=()=>Math.max(0,ce()-R.width),we=()=>{let V=z();if(V.length===0||!V.some(ke=>ke.anchorParagraphId!==t||R.end>ke.anchorModelStart))return false;let oe=ao(me(),V,L,A),te=U()+R.width,Ee=false;for(let ke of oe){if(!Ee){te>=ke.start-1e-6&&te<ke.end-1e-6&&(Ee=true);continue}if(ke.end-ke.start>.001)return R.width=ke.start-U(),true}return false},ye=V=>{if(_.length===0||V<Math.min(..._))return;let E=z().filter(ee=>ee.anchorParagraphId===t&&V>=ee.anchorModelStart);if(E.length===0)return;pe();let oe=ao(me(),E,L,A),te=U()+R.width,Ee=-1;for(let ee=0;ee<oe.length;ee+=1){let ne=oe[ee];if(te>=ne.start-.001&&te<ne.end-.001){Ee=ee;break}}if(Ee>=0)return;let ke=im(te,oe);ke&&ke.x>te+.001&&(R.width=ke.x-U());},_e=V=>{z().filter(oe=>oe.input.mode==="topAndBottom"&&oe.anchorParagraphId===t&&V>=oe.anchorModelStart).length!==0&&((R.spans.length>0||R.drawings.length>0)&&lt(),pe());},Ce=(V,E=0)=>E>64?re()>=V:(pe(),Pe()?V<=re()+.001?true:R.spans.length>0||R.drawings.length>0?we()&&V<=re()+.001?true:(lt(),Ce(V,E+1)):we()?Ce(V,E+1):true:R.spans.length>0||R.drawings.length>0?(lt(),Ce(V,E+1)):true),Be=(V,E)=>g.filter(oe=>oe.start<E&&oe.end>V).map(oe=>({start:Math.max(oe.start,V),end:Math.min(oe.end,E)})),Se=-1,xe=0,Ht=0,en="",An=(V,E)=>{let oe=o.lineMetrics(V),te=DS(oe.baseline,R.height||oe.height,E);return R.height===0?(R.height=te.lineHeight,R.baseline=te.baseline):(te.lineHeight>R.height&&(R.height=te.lineHeight),R.baseline=Math.max(R.baseline,te.baseline)),{extentTopY:te.extentTopY}},mn=()=>{if(R.drawings.length===0)return;R.spans.length===0&&(R.baseline=Math.max(R.baseline,...R.drawings.map(E=>E.y+E.height)));let V=qp(R.drawings,R.baseline);R.drawings.splice(0,R.drawings.length,...V),R.baseline=Math.max(R.baseline,...R.drawings.map(E=>E.y+E.height));},We=()=>{if(R.drawings.length===0)return;let V=qp(R.drawings,R.baseline);R.drawings.splice(0,R.drawings.length,...V);},Zi=V=>{let E=0;for(let oe of R.spans)E=Math.max(E,o.lineMetrics(ut(oe.style,oe.fontSlot)).height);return E>0?E:V},gn=()=>{if(R.drawings.length===0)return;let V=Math.max(0,...R.drawings.map(E=>E.y+E.height+E.distB));R.height=Math.max(R.height,V);},Ra=()=>{mn(),gn();},tn=()=>{if(!(R.spans.length<2))for(let V=1;V<R.spans.length;V+=1){let E=R.spans[V-1],oe=R.spans[V],te=oe.box.x-(E.box.x+E.box.width);te<=.001||R.drawings.some(ke=>ke.start>=E.range.end&&ke.start<oe.range.start)||(R.spans[V]={...oe,wrapAdvanceBefore:te});}},lt=V=>{let E=o.lineMetrics(P),oe=R.baseline;R.height===0?(R.height=E.height,R.baseline=E.baseline,oe=E.baseline):V?.includeParagraphMark&&(R.height=Math.max(R.height,E.height)),Ra();let te=R.height,Ee=R.drawings.length>0||R.spans.some(et=>et.equation!==void 0),ke=m.rule==="auto"&&Ee,ee=ke?Zi(E.height):te,ne=_s(m,ee,R.baseline);ke||(R.baseline=ne.baseline),R.leading=Math.max(0,R.baseline-oe),R.height=ke?Math.max(ne.height,te):ne.height,We(),m.rule!=="exact"&&gn(),R.trailingSpacing=R.drawings.length===0&&m.rule!=="exact"?Math.max(0,ne.height-te):0,Ie(),lR(R),tn();let Oe=Be(R.start,R.end);Oe.length>0&&(R.deletedRanges=Oe),W.push(R),Se=-1,xe=0,R={spans:[],drawings:[],start:R.end,end:R.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},pe();},hn=false;for(let V=0;V<T.length;V+=1){let E=T[V];if(E.breakKind==="column"){let ee=o.lineMetrics(E.style);R.spans.push({range:{paragraphId:t,start:E.start,end:E.end},text:E.text,props:E.props,style:E.style,box:{x:U()+R.width,y:0,width:0,height:ee.height},...E.link?{link:E.link}:{},...w(E)}),R.height=Math.max(R.height,ee.height),R.baseline=Math.max(R.baseline,ee.baseline),R.end=E.end,lt(),W[W.length-1].columnBreakAfter=true,hn=true;continue}if(E.equation){let ee=v(E),ne=ee.geometry.box.width;if((R.spans.length>0||R.drawings.length>0)&&R.width+ne>ce()&&lt(),!Ce(ne))continue;let et=Math.max(0,R.height-R.baseline),Ue=Math.max(0,ee.geometry.box.height-ee.geometry.baseline);R.baseline=Math.max(R.baseline,ee.geometry.baseline),R.height=R.baseline+Math.max(et,Ue),R.spans.push({range:{paragraphId:t,start:E.start,end:E.end},text:"\uFFFC",props:E.props,style:E.style,box:{x:U()+R.width,y:0,width:ne,height:ee.geometry.box.height},projected:true,equation:ee,...w(E)}),R.width+=ne,R.end=E.end,Se=-1,en="";continue}if(E.projected&&!E.inlineDrawing&&E.text==="\uFFFC"){Q(E.start),E.anchoredAtom&&E.revisions!==void 0&&Le(E.revisions,M,u?.revisionAuthorFilter)&&(R.anchorRevisions=[...R.anchorRevisions??[],...E.revisions]),R.end=E.end;continue}if(E.inlineDrawing){Q(E.start);let ee=Jn(E.inlineDrawing.projection),ne=ee.totalWidth;if((R.spans.length>0||R.drawings.length>0)&&R.width+ne>ce()&&lt(),!Ce(ne))continue;let{extentTopY:et}=An(E.style,ee),Ue=U()+R.width;R.drawings.push(WS({input:E.inlineDrawing,paragraphId:t,start:E.start,slotX:Ue,y:et,baseline:R.baseline,contentLeft:j,contentRight:j+O,...E.revisions?{revisions:E.revisions}:{}})),R.width+=ne,R.end=E.end,Se=-1,en="";continue}if(E.text===Sd$1){let ee=o.lineMetrics(E.style);R.spans.push({range:{paragraphId:t,start:E.start,end:E.end},text:Sd$1,props:E.props,style:E.style,box:{x:U()+R.width,y:0,width:0,height:ee.height},...E.link?{link:E.link}:{},...w(E)}),R.height=Math.max(R.height,ee.height),R.baseline=Math.max(R.baseline,ee.baseline),R.end=E.end,lt(),W[W.length-1].pageBreakAfter=true,hn=false;continue}if(E.text===`
13
- `){let ee=o.lineMetrics(E.style);R.spans.push({range:{paragraphId:t,start:E.start,end:E.end},text:`
14
- `,props:E.props,style:E.style,box:{x:U()+R.width,y:0,width:0,height:ee.height},...E.link?{link:E.link}:{},...w(E)}),R.height=Math.max(R.height,ee.height),R.baseline=Math.max(R.baseline,ee.baseline),R.end=E.end,lt(),hn=true;continue}hn=false,_e(E.start),_.length>0&&E.start>=Math.min(..._)&&ye(E.start);let oe=ut(E.style,E.fontSlot),te=o.lineMetrics(oe),Ee=!!E.projected||!!E.positionalTab||E.end-E.start!==E.text.length,ke=0;for(let ee of I?.boundaries(E)??qo(E.text,!Ee)){let ne=E.text.slice(ke,ee);if(ne.length===0)continue;let Oe=Ee?{paragraphId:t,start:E.start,end:E.end}:{paragraphId:t,start:E.start+ke,end:E.start+ee};if(ne===" "){(R.spans.length>0||R.drawings.length>0)&&R.width>=ce()&&S[V][ee]===1&&lt();let ze=U()+R.width,Ke=fM(T,V,ee,o),bt=E.positionalTab?pM(E.positionalTab,n,O,u?.marginExtent):null,be=bt===null?di(l,ze,O):bt.positionPt>ze?bt:{...di(l,ze,O),...bt.leader?{leader:bt.leader}:{}},Dr=Dp(be.alignment,ze,be.positionPt,Ke.width,Ke.decimalOffset);R.spans.push({range:Oe,text:" ",props:E.props,style:E.style,box:{x:ze,y:0,width:Dr,height:te.height},...be.leader?{tabLeader:be.leader,tabLeaderAdvancePt:o.measure(Ep.get(be.leader)??".",E.style)}:{},...E.link?{link:E.link}:{},...be.leader?{tabLeader:be.leader}:{},...Ee&&!E.positionalTab?{projected:true}:{},...E.noteNav?{noteNav:E.noteNav}:{},...w(E)}),R.width+=Dr,R.height=Math.max(R.height,te.height),R.baseline=Math.max(R.baseline,te.baseline),R.end=Ee?E.end:E.start+ee,en=" ",ke=ee;continue}let et=E.measureText??ne,Ue=o.measure(Pn(et,oe),oe),nn=I?.decision(E,ke)??rc(en,ne,ke>0),tt=nn==="opens";tt&&(Se=R.spans.length,xe=R.width,Ht=R.end),ye(E.start+ke),ue(ne,oe);let Dn=!Ee&&E.measureText===void 0?Pc(ne,Ue,ce()-R.width,ze=>o.measure(Pn(ze,oe),oe),ea):void 0;Ue=Dn?.width??Ue;let Ar=Gs(ne)&&(S[V][ee]!==1||!Ee&&(R.spans.length>0||R.drawings.length>0)&&R.width+Ue>ce()+ea);Ar&&(Ue=Math.min(Ue,Math.max(0,ce()-R.width)));let Ve=x.overflowPunctuation&&ac(ne,E,ce()-R.width,Ue,o);if(!Ve&&R.width+Ue>ce()+ea&&(R.spans.length>0||R.drawings.length>0)){if(!(nn==="forbidden"&&Se<=0))if(!tt&&Se===0)we();else if(tt||Se<0){if(!(we()&&R.width+Ue<=ce()+.001)){if(lt(),!Ce(Ue))continue;Se=0,xe=0,Ht=R.end;}}else {let ze=R.spans.splice(Se);R.width=xe,R.end=Ht,R.height=0,R.baseline=0;for(let Ke of R.spans){let bt=o.lineMetrics(ut(Ke.style,Ke.fontSlot));R.height=Math.max(R.height,bt.height),R.baseline=Math.max(R.baseline,bt.baseline);}lt();for(let Ke of ze){let bt=o.lineMetrics(ut(Ke.style,Ke.fontSlot));R.spans.push({...Ke,box:{...Ke.box,x:U()+R.width}}),R.width+=Ke.box.width,R.height=Math.max(R.height,bt.height),R.baseline=Math.max(R.baseline,bt.baseline),R.end=Ke.range.end;}Se=0,xe=0;}}else if(R.spans.length===0&&R.drawings.length===0&&Ue>ce()+.001&&!Ce(Ue))continue;let gt=ne,_n=E.start+ke,yn=Ue;if(!Ee&&E.measureText===void 0&&!Ve&&(R.spans.length===0||!tt&&Se===0)&&Ue>re()+ea){let ze=sR(ne,_n,Ue,{remainingLineWidth:re,lineHasText:()=>R.spans.length>0,measureText:Ke=>o.measure(Pn(Ke,oe),oe),appendPrefix:Ke=>{R.spans.push({range:{paragraphId:t,start:Ke.modelStart,end:Ke.modelStart+Ke.text.length},text:Ke.text,props:E.props,style:E.style,box:{x:U()+R.width,y:0,width:Ke.width,height:te.height},...E.link?{link:E.link}:{},...E.noteNav?{noteNav:E.noteNav}:{},...E.fontSlot?{fontSlot:E.fontSlot}:{},...w(E)}),R.width+=Ke.width,R.height=Math.max(R.height,te.height),R.baseline=Math.max(R.baseline,te.baseline),R.end=Ke.modelStart+Ke.text.length;},closeLine:lt,overflowTolerancePt:ea,keepWithPrevious:nn==="forbidden",cutAllowedAt:I?(Ke,bt)=>I.cutAllowed(E,ke,bt):aS});gt=ze.text,_n=ze.modelStart,yn=ze.width,ze.brokeLine&&(Se=0,xe=0,Ht=R.end);}if(gt.length>0){let ze={range:Ee?Oe:{paragraphId:t,start:_n,end:E.start+ee},text:gt,props:E.props,style:E.style,box:{x:U()+R.width,y:0,width:yn,height:te.height},...E.link?{link:E.link}:{},...Ee&&!E.positionalTab?{projected:true}:{},...E.noteNav?{noteNav:E.noteNav}:{},...E.fontSlot?{fontSlot:E.fontSlot}:{},...Ar?{lineEndWhitespace:true}:{},...w(E)};aR(R.spans,ze,Dn),R.width+=yn,R.height=Math.max(R.height,te.height),R.baseline=Math.max(R.baseline,te.baseline),R.end=Ee?E.end:E.start+ee;}en=ne,ke=ee;}}return (R.spans.length>0||R.drawings.length>0||W.length===0||hn)&&lt({includeParagraphMark:true}),i!==null&&a&&a.set(i,a.retainAcrossPasses===false?W:W.map(dR)),W}var gM=128,hM=/[\u0000-\u001F\u007F-\u009F]/,yM=32;function so(e){return e.kind!=="textValue"}function Pi(e,t){return e.attributes.find(n=>n.localName===t)?.value}function ta(e,t){for(let n of e.children)if(so(n)&&n.localName===t)return n}function Ir(e){return e===void 0||e.length===0||e.length>gM?false:!hM.test(e)&&!I(e)}function bM(e){return e==="1"||e==="true"||e==="on"}function wi(e){if(e){for(let t of e.children)if(so(t)&&(t.kind==="runProperties"||t.localName==="rPr"))return t}}function $s(e){if(e){for(let t of e.children)if(so(t)&&(t.kind==="paragraphProperties"||t.localName==="pPr"))return t}}var fR=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function na(e){return e.some(t=>fR.has(t.localName))?e.filter(t=>!fR.has(t.localName)):e}function pR(e){let t=ta(e,"docDefaults");if(!t)return {run:[],paragraph:[],paragraphNode:void 0};let n=wi(ta(t,"rPrDefault")),r=$s(ta(t,"pPrDefault"));return {run:na(Mt(n)),paragraph:na(Mt(r)),paragraphNode:r}}function mR(e){let t=Pi(e,"styleId");if(!Ir(t))return null;let n=Pi(e,"type")??"",r=ta(e,"basedOn"),o=r?Pi(r,"val"):void 0,a=Ir(o)?o:null,i=ta(e,"next"),s=i?Pi(i,"val"):void 0,l=Ir(s)?s:null,d=$s(e),c=wi(e),u=new Map,f=0;for(let m of e.children){if(m.kind==="textValue"||m.localName!=="tblStylePr")continue;if(f>=yM)break;f+=1;let p=Pi(m,"type");p&&!u.has(p)&&u.set(p,m);}return {styleId:t,type:n,basedOn:a,next:l,outlineLevel:a$1(e),isDefault:bM(Pi(e,"default")),paragraphProperties:na(Mt(d)),runProperties:na(Mt(c)),paragraphPropertiesNode:d,tablePropertiesNode:ta(e,"tblPr"),tableRowPropertiesNode:ta(e,"trPr"),conditionalTableFormats:u}}var kc=32,yR=4096;function Fc(e){return e.map(t=>t.attributes?{n:t.localName,a:t.attributes}:{n:t.localName})}function fm(e){return e?A(ra$1(e)):""}function xM(e){return [...e.conditionalTableFormats].map(([t,n])=>[t,fm(n)])}var Ic=Object.freeze({tablePropertyNodes:Object.freeze([]),tableRowPropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function bR(e,t){let n=t&&Ir(t)?t:null,r=n?hR(e,n):null;if(r)return r;let o=e.defaultTableStyleId;return !o||o===n?Ic:hR(e,o)??Ic}var gR=new WeakMap;function hR(e,t){let n=gR.get(e);n||(n=new Map,gR.set(e,n));let r=n.get(t);if(r)return r;let o=SM(e,t);return o?(n.set(t,o),o):null}function SM(e,t){let n=Oc(e,t,"table");if(n.length===0)return null;let r=[],o=[],a=[],i=[],s=[],l=new Map;for(let d of n){d.tablePropertiesNode&&r.push(d.tablePropertiesNode),d.tableRowPropertiesNode&&o.push(d.tableRowPropertiesNode),d.paragraphPropertiesNode&&a.push(d.paragraphPropertiesNode),i.push(...d.paragraphProperties),s.push(...d.runProperties);for(let[c,u]of d.conditionalTableFormats)l.set(c,u);}return Object.freeze({tablePropertyNodes:Object.freeze(r),tableRowPropertyNodes:Object.freeze(o),paragraphPropertyNodes:Object.freeze(a),paragraphProperties:Object.freeze(i),runProperties:Object.freeze(s),conditional:RM(l)})}function RM(e){let t=Object.freeze({get:n=>e.get(n),has:n=>e.has(n),forEach:(n,r)=>{for(let[o,a]of e)n.call(r,a,o,t);},keys:()=>e.keys(),values:()=>e.values(),entries:()=>e.entries(),[Symbol.iterator]:()=>e[Symbol.iterator](),[Symbol.toStringTag]:"Map",get size(){return e.size}});return t}function xR(e){return e.paragraphPropertyNodes.length>0||e.paragraphProperties.length>0||e.runProperties.length>0||e.conditional.size>0}var pm=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function SR(e,t){let n=[...e.paragraphPropertyNodes],r=[...e.paragraphProperties],o=[...e.runProperties];for(let a of t){let i=e.conditional.get(a);if(!i)continue;let s=$s(i);s&&(n.push(s),r.push(...na(Mt(s))));let l=wi(i);l&&o.push(...na(Mt(l)));}return n.length===0&&r.length===0&&o.length===0?pm:{paragraphProperties:r,paragraphPropertyNodes:n,runProperties:o}}function mm(e,t=Pb,n=null){let r=Qx(n),o=new Map;if(!e)return {cacheToken:A({empty:true,theme:t,typography:r}),typography:r,docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,defaultTableStyleId:null,themeFonts:t,styles:o};let a=pR(e),i=null,s=null,l=null,d=0;for(let u of e.children){if(!so(u)||u.localName!=="style")continue;if(d>=yR)break;d+=1;let f=mR(u);if(!f)continue;let{isDefault:m,...p}=f;o.set(p.styleId,p),p.type==="paragraph"?m?i=p.styleId:i===p.styleId&&(i=null):p.type==="character"?m?s=p.styleId:s===p.styleId&&(s=null):p.type==="table"&&(m?l=p.styleId:l===p.styleId&&(l=null));}return {cacheToken:A({typography:r,dR:Fc(a.run),dP:Fc(a.paragraph),defP:i,defC:s,defT:l,theme:t,styles:[...o.values()].map(u=>({id:u.styleId,type:u.type,basedOn:u.basedOn,outlineLevel:u.outlineLevel,p:Fc(u.paragraphProperties),r:Fc(u.runProperties),tPr:fm(u.tablePropertiesNode),trPr:fm(u.tableRowPropertiesNode),tblStylePr:xM(u)}))}),typography:r,docDefaultsRun:a.run,docDefaultsParagraph:a.paragraph,docDefaultsParagraphNode:a.paragraphNode,defaultParagraphStyleId:i,defaultCharacterStyleId:s,defaultTableStyleId:l,themeFonts:t,styles:o}}function gm(e,t){let n=null;for(let r of e){if(r.localName!==t)continue;let o=r.attributes?.val;n=Ir(o)?o:null;}return n}function Oc(e,t,n){let r=e.styles.get(t);if(!r||r.type!==n)return [];let o=[],a=new Set,i=t,s=0;for(;i!==null&&s<kc&&!(a.has(i)||!Ir(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 vi(e,t,n){let r=Mt(t),o=gm(r,"pStyle")??e.defaultParagraphStyleId,a=o?Oc(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...n?.paragraphProperties??[],...a.flatMap(m=>m.paragraphProperties)],s=[...i,...r],l=[];e.docDefaultsParagraphNode&&l.push(e.docDefaultsParagraphNode),n&&l.push(...n.paragraphPropertyNodes);for(let m of a)m.paragraphPropertiesNode&&l.push(m.paragraphPropertiesNode);t&&l.push(t);let d=wi(t&&so(t)?t:void 0),c=Mt(d),u=wd([{properties:e.docDefaultsRun,role:"defaults",emit:true},{properties:n?.runProperties??[],role:"xor",emit:true},{properties:a.flatMap(m=>m.runProperties),role:"xor",emit:true}]),f=c.length===0?u:wd([{properties:u,role:"carried",emit:true},{properties:c,role:"direct",emit:true}]);return {paragraphProperties:s,inheritedParagraphProperties:i,paragraphPropertyNodes:l,runProperties:u,markRunProperties:f,styleId:o??null}}function RR(e){let t;for(let n of e){if(!n||n.kind==="textValue")continue;let r=false;for(let o of n.children)if(so(o)&&o.localName==="pBdr"){r=true;break}r&&(t=Fr(n).bottom);}return t}function ra(e,t,n){let r=[];if(n){let i=gm(t,"rStyle")??n.defaultCharacterStyleId;i&&(r=Oc(n,i,"character").flatMap(s=>s.runProperties));}if(e.length===0&&r.length===0)return t;if(r.length===0&&t.length===0)return e;let o=r.length===0?e:wd([...e.length>0?[{properties:n?.docDefaultsRun??[],role:"defaults",emit:false}]:[],{properties:e,role:"carried",emit:true},{properties:r,role:"xor",emit:true}]);return t.length===0?o:[...o,...t]}function lo(e,t,n,r,o,a=false){let i=$s(e),s=n?vi(n,i,o):null,l=s?[...s.paragraphProperties]:Mt(i),d=Mt(wi(i&&so(i)?i:void 0)),c=s?s.runProperties:[],u=s?s.markRunProperties:d,f=Ks(l),m=0,p=0;if(r)m=r.indent.hanging,p=r.indent.firstLine;else for(let T of l){if(T.localName!=="ind")continue;let S=Vs(T.attributes?.hanging),I=Vs(T.attributes?.firstLine);(T.attributes?.hanging!==void 0||T.attributes?.firstLine!==void 0)&&(m=S!==null?Math.max(0,We(S)):0,p=I!==null?We(I):0);}let g=r?{left:r.indent.left,right:r.indent.right,hanging:m,firstLine:p}:{left:f.left,right:f.right,hanging:m,firstLine:p},h=s?Lp(s.paragraphPropertyNodes):Bp(i),y=s?s.styleId:gm(l,"pStyle")??null,b=null,x=false;for(let T of l){if(T.localName!=="outlineLvl")continue;x=true;let S=T.attributes?.val;b=S!==void 0&&/^[0-8]$/.test(S)?Number(S):null;}if(!x&&n&&y){let T=Oc(n,y,"paragraph");for(let S=T.length-1;S>=0;S-=1){let I=T[S].outlineLevel;if(I!==null){b=I;break}}}if(!x&&b===null&&y){let T=/^heading\s*([1-9])$/i.exec(y.trim());T&&(b=Number(T[1])-1);}return {props:l,indent:g,available:Math.max(1,t-g.left-g.right),alignment:cR(l),spacing:Hp(l,{inList:r!==void 0,inTableCell:a}),lineSpacing:zp(l),contextualSpacing:Wp(l),styleId:y,outlineLevel:b,bottomBorder:s?RR(s.paragraphPropertyNodes):Fr(i).bottom,borders:s?js(s.paragraphPropertyNodes):Fr(i),shading:jf(l),inheritedRunProperties:c,markRunProperties:u,tabStops:h,tabStopsCacheToken:Ns(h),...r?{listItem:r}:{}}}var PM=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),PR=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),wR=new Map([[167,"\u25AA"],[183,"\u2022"]]),vR=new Map([["symbol",PM],["wingdings",PR],["wingdings 2",wR],["wingdings 3",wR],["webdings",PR]]),wM=64;function oa(e){return !e||e.length>wM?false:vR.has(e.toLowerCase())}function Ti(e,t,n){if(e.length===0||!oa(t))return e;let r=vR.get(t.toLowerCase());if(n?.(t)===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 bm=new WeakMap;function pW(e,t){let n=t.dependencyKeys.size===0||[...t.dependencyKeys].every(r=>r===g.story);bm.set(e,{preservesNumberedSequence:t.impact==="text-local"&&!t.structural&&t.created.size===0&&t.deleted.size===0&&n});}function TM(e){let t=bm.get(e);return bm.delete(e),t}function FM(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(",")}var LR=new WeakMap;function BR(e){return LR.get(e)}function xm(e){return e.kind!=="textValue"}function TR(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function Cc(e,t){for(let n of e.children)if(xm(n)&&n.localName===t)return n}function NR(e){if(!xm(e))return null;let t=Cc(e,"numPr");if(!t)return null;let n=Cc(t,"numId"),r=Cc(t,"ilvl"),o;if(n){let i=TR(n,"val");o=i!==void 0&&i!=="0"&&i.length<=64?i:null;}let a;if(r){let i=TR(r,"val"),s=/^\d{1,2}$/.test(i??"")?Number(i):0;a=s<=8?s:null;}return {numId:o,ilvl:a}}function AR(e){let t=null,n=0;for(let r of e){let o=NR(r);o&&(o.numId!==void 0&&(t=o.numId),o.ilvl!==void 0&&(o.ilvl===null?t=null:n=o.ilvl));}return t===null?null:{numId:t,ilvl:n}}function IM(e,t){let n=new Set,r=e.styles.get(t);for(let o=0;r!==void 0&&o<kc;o+=1){if(n.has(r.styleId))return;n.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?NR(a):null;if(i&&i.numId!==void 0)return i.numId??void 0;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}var hm=new WeakMap;function Xs(e,t){if(!t)return e;let n=hm.get(e);if(n&&n.styleCascade===t)return n.linked;let r=GR(e,a=>IM(t,a)),o={styleCascade:t,linked:r};return hm.set(e,o),hm.set(r,o),r}function FR(e){return Number.isFinite(e)?e>On?On:e<-On?-On:e:0}function IR(e){let t=null;for(let n of e){if(n.localName!=="ind")continue;let r=n.attributes?.hanging,o=n.attributes?.firstLine;r===void 0&&o===void 0||(t={hanging:r!==void 0&&/^\d{1,9}$/.test(r)?FR(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?FR(Number(o)/20):0});}return t}function kR(e){return e.some(t=>t.localName==="ind"&&(t.attributes?.left!==void 0||t.attributes?.start!==void 0))}function OR(e){return e.some(t=>t.localName==="ind"&&(t.attributes?.right!==void 0||t.attributes?.end!==void 0))}function DR(e,t,n=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=Ks(t),a=Ks(n),i={hanging:e.hanging,firstLine:e.firstLine},s=kR(n)?a.left:r.left?e.left:kR(t)?o.left:e.left,l=OR(n)?a.right:r.right?e.right:OR(t)?o.right:e.right,d=IR(n)??(r.firstLineOffset?i:IR(t)??i);return {left:s,right:l,...d}}function Cn(e,t=8){let n=[],r=(o,a)=>{for(let i of o){if(i.kind==="paragraph"){n.push(i);continue}if(!(i.kind!=="table"||a>=t)){for(let s of Cc$1(i.children))if(s.kind==="tableRow")for(let l of Cc$1(s.children)){if(l.kind!=="tableCell")continue;let d=Gd$1(l.children);r(d,a+1);}}}};return r(e,0),n}var CR=new WeakMap;function _R(e,t){let n=CR.get(e);if(n&&n.styleCascade===t)return n;let r=e.children.find(l=>l.kind==="paragraphProperties"),o=t?vi(t,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&xm(r)?Cc(r,"rPr"):void 0,s={styleCascade:t,numPr:AR(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:Mt(r),inheritedMarkProps:o?o.markRunProperties:Mt(i),perLevel:new WeakMap};return CR.set(e,s),s}function Ec(e,t,n,r){let o=new Map;if(t.nums.size===0)return o;let a=Xs(t,n),i=Ip(a);for(let s of Cn(e)){let l=_R(s,n),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 y=DR(c.level.indent,l.inheritedParagraphProperties,l.directProps),b=ra(l.inheritedMarkProps,c.level.runProperties,n);u={indent:y,markerStyle:He(b,n?.themeFonts)},l.perLevel.set(c.level,u);}let{indent:f,markerStyle:m}=u,p=Ti(c.markerText,m.fontFamily,r),g=q([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,p,FM(m)].map(String)),h={numId:c.numId,ilvl:c.ilvl,abstractNumId:c.abstractNumId,numFmt:c.level.numFmt,markerText:p,...c.level.numFmt==="bullet"?{}:{ordinal:c.counters[c.ilvl]??1},markerAlign:c.level.lvlJc,suffix:c.level.suff,indent:f,markerStyle:m,cacheToken:g};LR.set(h,{index:a,numId:c.numId,ilvl:c.ilvl,expandCounters:Zx(c)}),o.set(s.id,h);}return o}var jR=new WeakMap,HR=new WeakMap;function ER(e,t,n){let r=n?HR.get(n):jR.get(t);if(r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable)return r}function kM(e,t,n){t?HR.set(t,n):jR.set(e,n);}function zR(e,t,n){if(e.listItems===void 0){let i=ER(e,t,n);if(i&&n===void 0)return {...e,numberingIndex:i.linkedIndex,...i.listItems?{listItems:i.listItems}:{}}}let r=e.listItems===void 0?ER(e,t,n):void 0,o=r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable?r.linkedIndex:Xs(e.numberingIndex??Sm,e.styleCascade),a=e.listItems??(o.nums.size>0?MM(t,e.numberingIndex,o,e.styleCascade,e.isFontAvailable,n):void 0);return e.listItems===void 0&&kM(t,n,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:o,listItems:a}),{...e,numberingIndex:o,...a?{listItems:a}:{}}}function kr(e,t){return zR(e,t,void 0)}function WR(e,t,n){return zR(e,t,n)}var MR=new WeakMap,OM=Object.freeze([]);function CM(e,t){let n=MR.get(e);if(n&&n.styleCascade===t)return n.numbered;let r=Cn([e]).filter(a=>_R(a,t).numPr!==null),o=r.length>0?r:OM;return MR.set(e,{styleCascade:t,numbered:o}),o}var Fi=new WeakMap,ym=new WeakMap;function EM(e,t){return e.length===t.length&&e.every((n,r)=>{let o=t[r];if(!o||n.id!==o.id)return false;let a=n.children.find(s=>s.kind==="paragraphProperties"),i=o.children.find(s=>s.kind==="paragraphProperties");return a===i})}function MM(e,t,n,r,o,a){let i=e[0],s=e[e.length-1],l=a?ym.get(a):(i?Fi.get(i):void 0)??(s?Fi.get(s):void 0);if((a?TM(a):void 0)?.preservesNumberedSequence&&l&&l.rawIndex===t&&l.styleCascade===r&&l.isFontAvailable===o)return l.listItems;let c=new Array(e.length),u=l!==void 0&&l.rawIndex===t&&l.styleCascade===r&&l.isFontAvailable===o&&l.blocks.length===e.length;for(let p=0;p<e.length;p+=1){let g=e[p],h=l&&l.blocks[p]===g?l.numberedByBlock[p]:CM(g,r);c[p]=h,u&&!EM(h,l.numberedByBlock[p])&&(u=false);}if(l&&u){let p={...l,blocks:e,numberedByBlock:c};return a?ym.set(a,p):(i&&Fi.set(i,p),s&&s!==i&&Fi.set(s,p)),l.listItems}let f=Ec(e,n,r,o),m={rawIndex:t,styleCascade:r,isFontAvailable:o,blocks:e,numberedByBlock:c,listItems:f};return a?ym.set(a,m):(i&&Fi.set(i,m),s&&s!==i&&Fi.set(s,m)),f}function Mc(e,t,n,r){if((!e.markerText||e.indent.hanging<=0&&t<=0)&&!e.markerText||!e.markerText)return null;let o=e.indent.left,a=e.indent.hanging,i=a>0?0:Math.max(0,e.indent.firstLine),s=Math.min(0,o),l=i>0?o+i:Math.max(s,o-a),d=Math.max(a,t),c=l;return e.markerAlign==="right"?c=i>0?l+d-t:o-t:e.markerAlign==="center"&&(c=l+(d-t)/2),c<s&&(c=s),{x:c,y:n,width:Math.max(t,0),height:r}}function LM(e,t,n=li,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=t.measure(e.markerText,e.markerStyle),a=Mc(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+t.measure(" ",e.markerStyle)-i:s<=i?0:di(n,s,r).positionPt-i}function Lc(e,t,n,r,o){return e?LM(e,n,r,o===void 0?void 0:t.left+o):t.hanging>0?-t.hanging:t.firstLine}function BM(e,t,n){return aa(e,t,()=>n)}function aa(e,t,n){let r=[],o=null,a=-1,i=-1;for(let s of t){let l=n(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:wn(l.numFmt,d),displayNumber:d});}return r}function VR(e){let t=new Map;for(let n of e)t.set(n.noteId,n.mark);return t}var Bc=4096,pn=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 Rm(e,t,n=31680*2){if(e===void 0||!/^-?\d{1,7}$/.test(e))return t;let r=Number(e);return !Number.isFinite(r)||r<=0||r>n?t:r}function ia(e,t){if(e===void 0||!/^-?\d{1,7}$/.test(e))return t;let n=Number(e);return !Number.isFinite(n)||Math.abs(n)>31680?t:n}function YR(e,t,n=31680){if(e===void 0||!/^\d{1,7}$/.test(e))return t;let r=Number(e);return !Number.isFinite(r)||r<0||r>n?t:r}var ft=(e,t)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes??[])if(n.localName===t)return n.value}},sa=(e,t)=>{if(e.kind!=="textValue"){for(let n of e.children??[])if(n.kind!=="textValue"&&"localName"in n&&n.localName===t)return n}};function KR(e,t,n){let r=ft(e,t);return r===void 0?n:r==="0"||r==="false"||r==="off"||r==="no"?false:r==="1"||r==="true"||r==="on"||r==="yes"?true:n}function NM(e){if(!e)return 1;let t=ft(e,"num");return !t||!/^\d{1,7}$/.test(t)?1:Math.max(1,Math.min(12,Number(t)))}function AM(e,t,n){if(!e||e.kind==="textValue")return [];let r=[];for(let o of e.children??[]){if(r.length>=t||o.kind==="textValue"||!("localName"in o)||o.localName!=="col")continue;let a=r.length;r.push({widthTwips:Rm(ft(o,"w"),1,31680),gapTwips:a===t-1?0:YR(ft(o,"space"),n)});}return r}function DM(e){let t=e?sa(e,"type"):void 0,n=t?ft(t,"val"):void 0;return n==="continuous"||n==="evenPage"||n==="oddPage"||n==="nextColumn"?n:"nextPage"}var _M=new Set(["hyphen","period","colon","emDash","enDash"]);function qR(e){let t=sa(e,"pgNumType");if(!t||t.kind==="textValue")return;let n={},r=ft(t,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let s=Number(r);Number.isFinite(s)&&s>=0&&s<=9999&&(n.start=s);}let o=ft(t,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(n.fmt=o);let a=ft(t,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let s=Number(a);Number.isFinite(s)&&s>=0&&s<=9&&(n.chapStyle=s);}let i=ft(t,"chapSep");return i!==void 0&&_M.has(i)&&(n.chapSep=i),n}var $R=new WeakMap;function Nc(e){if(!e)return pn;let t=$R.get(e);if(t!==void 0)return t;let n=jM(e);return $R.set(e,n),n}function jM(e){let t=sa(e,"pgSz"),n=sa(e,"pgMar"),r=sa(e,"cols"),o=pn,a=t?ft(t,"orient"):void 0,i=t?Rm(ft(t,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,s=t?Rm(ft(t,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,l=qR(e),d=NM(r),c=r?YR(ft(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?KR(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:s},margins:{topTwips:n?ia(ft(n,"top"),1440):o.margins.topTwips,rightTwips:n?ia(ft(n,"right"),1440):o.margins.rightTwips,bottomTwips:n?ia(ft(n,"bottom"),1440):o.margins.bottomTwips,leftTwips:n?ia(ft(n,"left"),1440):o.margins.leftTwips,headerTwips:n?ia(ft(n,"header"),720):o.margins.headerTwips,footerTwips:n?ia(ft(n,"footer"),720):o.margins.footerTwips,gutterTwips:n?ia(ft(n,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?KR(r,"sep",false):false,definitions:u?[]:AM(r,d,c)},landscape:a==="landscape"||i>s,titlePage:pa$1(e,"titlePg"),breakType:DM(e),...l!==void 0?{pageNumbering:l}:{}}}function HM(e){let t=n=>{if(n.kind!=="textValue"){if(n.kind==="body")return sa(n,"sectPr");for(let r of n.children??[]){let o=t(r);if(o)return o}}};return t(e.root)}var XR=new WeakMap;function En(e){let t=XR.get(e);if(t!==void 0)return t??void 0;let n=e.children.find(a=>a.kind==="paragraphProperties"),r=n?sa(n,"sectPr"):void 0,o=r&&r.kind!=="textValue"?r:void 0;return XR.set(e,o??null),o}function zM(e){let t=Ac(e);return t[t.length-1]?.properties??pn}function Ac(e,t="all-markup",n){return Dc(e,t,n).sections}function Pm(e,t="all-markup",n){let r=_t(e,t,n),o=la(e,r).sections,a=_t(e,"all-markup"),i=la(e,a).sections,s=Math.max(0,i.length-1),l=new Map;for(let d of i){if(d.blockStart===d.blockEndExclusive)continue;let c=a[d.blockEndExclusive-1];c?.kind==="paragraph"&&En(c)&&l.set(c.id,d.index);}return o.map(d=>{if(d.blockStart===d.blockEndExclusive)return s;let c=r[d.blockEndExclusive-1];return c?.kind!=="paragraph"||!En(c)?s:l.get(c.id)??s})}function Dc(e,t="all-markup",n){return la(e,_t(e,t,n))}var UR=fg$1(16);function la(e,t){let n=UR.get(t);if(n&&n.part===e)return n.result;let r=WM(e,t);return UR.set(t,{part:e,result:r}),r}function WM(e,t){let n=[],r=0,o=false;for(let i=0;i<t.length;i+=1){let s=t[i];if(s.kind!=="paragraph")continue;let l=En(s);if(l){if(n.length>=Bc){o=true;continue}n.push({index:n.length,properties:Nc(l),blockStart:r,blockEndExclusive:i+1}),r=i+1;}}if(o){if(n.length>0){let i=n[n.length-1];n[n.length-1]={...i,blockEndExclusive:t.length};}return {sections:n,truncated:true}}let a=HM(e);if(r<t.length||n.length===0){if(n.length>=Bc){let i=n[n.length-1];return n[n.length-1]={...i,blockEndExclusive:t.length},{sections:n,truncated:true}}n.push({index:n.length,properties:Nc(a),blockStart:r,blockEndExclusive:t.length});}else if(a){if(n.length>=Bc)return {sections:n,truncated:true};n.push({index:n.length,properties:Nc(a),blockStart:r,blockEndExclusive:t.length});}return {sections:n,truncated:o}}function Or(e){let t=We(Ue(e.pageSize.widthTwips)),n=We(Ue(e.pageSize.heightTwips)),r=We(Ue(e.margins.leftTwips+e.margins.gutterTwips)),o=We(Ue(e.margins.rightTwips)),a=We(Ue(e.margins.topTwips)),i=We(Ue(e.margins.bottomTwips));return t-r-o<=0||n-a-i<=0?Ps:{width:t,height:n,margin:{top:a,right:o,bottom:i,left:r},headerDistance:We(Ue(Math.max(0,e.margins.headerTwips))),footerDistance:We(Ue(Math.max(0,e.margins.footerTwips)))}}var ZR=4096,JR=new WeakMap;function nP(e,t){let n=JR.get(e);if(n&&n.sections===t)return n.input;let r={sections:t,footnotePropsBySection:e.footnotePropsBySection,endnotePropsBySection:e.endnotePropsBySection,documentFootnoteProps:e.documentFootnoteProps,documentEndnoteProps:e.documentEndnoteProps};return JR.set(e,{sections:t,input:r}),r}function rP(e,t,n){let r=xf(e),o=yf(r),a=zf$1(r),i=Af$1(void 0,o),s=Bf$1(void 0,a),l=la(t,n).sections,d=c=>{if(c.blockStart===c.blockEndExclusive)return;let u=n[c.blockEndExclusive-1];return u?.kind==="paragraph"?En(u):void 0};return {sections:l,footnotePropsBySection:l.map(c=>Af$1(vf$1(d(c)),o)),endnotePropsBySection:l.map(c=>Bf$1(wf(d(c)),a)),documentFootnoteProps:i,documentEndnoteProps:s}}var GM=Object.freeze([]);function VM(e){for(let t of e.attributes){if(t.localName!=="customMarkFollows"||t.namespaceUri!==da$1&&t.namespaceUri!=="")continue;let n=t.value;return !(n==="0"||n==="false"||n==="off")}return false}var QR=new WeakMap;function KM(e){let t=QR.get(e);if(t)return t;let n=null;for(let o of Ke(e)){let a=o.node;if(a.kind!=="noteReference")continue;let i=jd$1(a),s=gd$1(a);i===null||s===null||(n??=[]).push({nodeId:a.id,noteKind:i,noteId:s,customMarkFollows:VM(a)});}let r=n===null?GM:Object.freeze(n);return QR.set(e,r),r}function $M(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function XM(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}var UM=new Map,eP=new WeakMap;function oP(e,t){let n=eP.get(e);if(n&&n.input===t)return n.index;let r=[],o=[],a=[],i=[],s=0,l=0;for(let f=0;f<e.length&&s<ZR;f+=1){for(;l<t.sections.length-1&&f>=t.sections[l].blockEndExclusive;)l+=1;let m=t.sections.length>0?l:0;for(let p of Cn([e[f]]))for(let g of KM(p)){if(s>=ZR)break;s+=1;let h={noteId:g.noteId,sectionIndex:m,customMarkFollows:g.customMarkFollows};g.noteKind==="footnote"?(r.push(h),o.push(g.nodeId)):(a.push(h),i.push(g.nodeId));}}let d=null,c=(f,m,p,g)=>{if(m.length===0||(f==="footnote"?t.footnotePropsBySection.length>0?t.footnotePropsBySection:[t.documentFootnoteProps]:t.endnotePropsBySection.length>0?t.endnotePropsBySection:[t.documentEndnoteProps]).some(b=>b.numRestart==="eachPage"))return;let y=aa(f,m,g);for(let b=0;b<y.length;b+=1){let x=y[b].mark,T=p[b];x!==null&&x.length>0&&T!==void 0&&(d??=new Map).set(T,x);}};c("footnote",r,o,f=>$M(t,f)),c("endnote",a,i,f=>XM(t,f));let u=d??UM;return eP.set(e,{input:t,index:u}),u}function wm(e,t){for(let n of e.attributes)if(n.namespaceUri===da$1&&n.localName===t)return n.value}var tP=new WeakMap;function aP(e,t){let n=tP.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,s=null,l=Rr(),d=(c,u,f)=>{if(a||c.kind==="textValue"||f>=la$1||l.exhausted||u>Dt)return;if(c.kind==="bookmarkStart"){!o&&wm(c,"name")===t&&(o=true,i=wm(c,"id"));return}if(c.kind==="bookmarkEnd"){o&&i!==void 0&&wm(c,"id")===i&&(a=true);return}if(o&&c.kind==="noteReference"){s=c.id,a=true;return}if(!st(l))return;let m=ma$1(c,f);for(let p of c.children)d(p,u+1,m);};for(let c of e.children){if(a||!st(l))break;d(c,1,0);}return n||(n=new Map,tP.set(e,n)),n.set(t,s),s}var YM=512,qM=2048,iP=4096,fP=Object.freeze([]),pP=Object.freeze([]),ZM=Object.freeze({fields:pP,bookmarks:fP});function vm(e){return e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}var sP=new WeakMap;function JM(e){let t=sP.get(e);if(t)return t;let n=null,r=null,o=Rr(),a=jo(),i=null,s=null,l=Tr,d=Tr,c=()=>{if(a.nesting!==1||a.phase!=="instruction"||a.nestingOverflow)return;let p=Za(a);if(p.overflow||s===null)return;let g=Fn(p.instruction);if(g){i={spec:g,autonum:null,anchorId:s,cached:"",revisions:d};return}let h=eo(p.instruction);h&&(i={spec:null,autonum:h,anchorId:s,cached:"",revisions:d});},u=()=>{i&&((n??=[]).push({spec:i.spec,autonum:i.autonum,anchorId:i.anchorId,cached:vm(i.cached),revisions:i.revisions}),i=null);},f=(p,g,h)=>{if(p.kind==="textValue"||h>=la$1||o.exhausted||g>Dt)return;if(p.kind==="bookmarkStart"){let b=vs(p,"name");b!==void 0&&b.length>0&&b.length<=hp&&(r??=[]).push(b);return}if(p.kind==="run"){for(let b of p.children){if(!st(o))return;if(b.kind!=="runProperties"){if(vt(b,"begin")){Ho(a),a.nesting===1&&(s=b.id,d=l,i=null);continue}if(Sr(b)){zo(a,b,o,g+1);continue}if(vt(b,"separate")){c(),Wo(a);continue}if(vt(b,"end")){let x=a.nesting===1;c(),Go(a),x&&u();continue}if(i&&a.nesting===1&&a.phase==="result")if(b.kind==="text")for(let x of b.children)x.kind==="textValue"&&i.cached.length<Vo&&(i.cached+=x.value.slice(0,Vo-i.cached.length));else b.kind==="tab"&&i.cached.length<Vo&&(i.cached+=" ");}}return}if(de(p)){let b=fe(p)??"",x=Fn(b),T=x===null?eo(b):null;(x||T)&&(n??=[]).push({spec:x,autonum:T,anchorId:p.id,cached:vm(vx(p,o)),revisions:l});return}if(gp(p)||!st(o))return;if(Vt(p)){let b=qt(p);if(b){let x=l;l=dn(x,b);let T=ma$1(p,h);for(let S of p.children)f(S,g+1,T);l=x;return}}let y=ma$1(p,h);for(let b of p.children)f(b,g+1,y);};for(let p of e.children){if(!st(o))break;f(p,1,0);}let m=n===null&&r===null?ZM:Object.freeze({fields:n??pP,bookmarks:r??fP});return sP.set(e,m),m}var QM=Object.freeze({fieldsByParagraph:null,bookmarkOwners:null}),lP=new WeakMap;function eL(e){let t=lP.get(e);if(t)return t;let n=null,r=null;for(let a of Cn([e])){let i=JM(a);i.fields.length>0&&(n??=new Map).set(a.id,i.fields);for(let s of i.bookmarks)r??=new Map,!r.has(s)&&r.size<qM&&r.set(s,a);}let o=n===null&&r===null?QM:Object.freeze({fieldsByParagraph:n,bookmarkOwners:r});return lP.set(e,o),o}var _c=new WeakMap;function tL(e){let t=e[0],n=e[e.length-1],r=(t?_c.get(t):void 0)??(n?_c.get(n):void 0)??new Map;return t&&_c.set(t,r),n&&_c.set(n,r),r}var jc=new WeakMap;function nL(e){let t=e[0],n=e[e.length-1],r=(t?jc.get(t):void 0)??(n?jc.get(n):void 0)??new Map;return t&&jc.set(t,r),n&&jc.set(n,r),r}function dP(e){return e.length>1&&e.endsWith(".")?e.slice(0,-1):e}var cP=new WeakMap;function Hc(e,t=Me,n){if(!e)return [];let r=`${t}|${n?.cacheKey??""}`,o=cP.get(e),a=o?.get(r);if(a)return a;let i=[];for(let s of rd(e.root)){if(i.length>=pd$1)break;if(!id(s))continue;let l=ii(s,t,n);l.length>0&&i.push(l);}return o?Ts(o,r,i):cP.set(e,new Map([[r,i]])),i}var uP=new WeakMap;function rL(e,t,n,r,o,a){let i=new Map,s=[],l=0,d=v=>{for(let w of v){let k=eL(w);if(s.push(k),!!k.fieldsByParagraph)for(let[P,O]of k.fieldsByParagraph){if(l>=YM)break;i.set(P,O),l+=O.length;}}};if(d(e),n){for(let v of Hc(n.footnotesPart,o,a))d(v);for(let v of Hc(n.endnotesPart,o,a))d(v);}if(i.size===0)return null;let c=new Set;for(let v of i.values())for(let w of v)w.spec&&c.add(w.spec.bookmark);let u=new Map;for(let v of s)if(v.bookmarkOwners)for(let[w,k]of v.bookmarkOwners)c.has(w)&&!u.has(w)&&u.set(w,k);let f=new Map,m=new Map,p=new Map;for(let[v,w]of i)for(let k of w){if(!k.autonum||!Le(k.revisions,o,a))continue;let P=(p.get(k.autonum.kind)??0)+1;p.set(k.autonum.kind,P);let O=Px(k.autonum,P);O.length!==0&&(f.set(k.anchorId,O),m.has(v)||m.set(v,O));}let g=v=>{let w=Tn(v);if(w.pageRef)return null;let k=u.get(v.bookmark);if(!k)return null;if(w.noteRef){if(r===void 0)return null;let O=aP(k,v.bookmark);return O===null?null:oP(e,r).get(O)??null}if(v.numberSwitch!==null){let O=t?.get(k.id);if(!O){if(w.suppressNonDelimiterText)return null;let R=m.get(k.id);return R!==void 0?dP(R):null}let L=BR(O),A=L!==void 0?Jx(L,v.numberSwitch==="n",w.suppressNonDelimiterText):null,j=!w.suppressNonDelimiterText&&O.numFmt!=="bullet"&&O.numFmt!=="none"&&O.markerText.length>0?O.markerText:null,W=A??j;return W===null?null:dP(W)}if(w.suppressNonDelimiterText)return null;let P=Tx(k,v.bookmark);return P.length>0?P:null},h=new Map,y=v=>{let w=Tn(v),k=`${w.suppressNonDelimiterText?"t":""}${w.noteRef?"x":""}`,P=`${v.numberSwitch??"-"}${k}\0${v.bookmark}`;if(h.has(P))return h.get(P)??null;let O=g(v);return h.set(P,O),O},b=tL(e),x=nL(e),T=new Map,S=new Map,I=new Map,F=[];for(let[v,w]of i){let k=[];for(let O of w){if(O.spec===null){let W=O.autonum?f.get(O.anchorId)??null:null;k.push(W!==null?`a${W}`:`c${O.cached}`);continue}if(Tn(O.spec).pageRef){let W=u.get(O.spec.bookmark);if(W){let R=x.get(O.anchorId);R===void 0&&x.size<iP&&(R=Object.freeze({}),x.set(O.anchorId,R)),R!==void 0&&S.set(O.anchorId,{spec:O.spec,projection:{targetParagraphId:W.id,cached:O.cached,calibration:R}});}k.push(`c${O.cached}${W?.id??""}`);continue}let L=y(O.spec),A=b.get(O.anchorId);A===void 0&&(A=O.cached.length===0||L!==null&&vm(L)===O.cached,O.cached.length>0&&b.size<iP&&b.set(O.anchorId,A));let j=A?L:null;T.set(O.anchorId,{spec:O.spec,live:j}),k.push(j!==null?`l${j}`:`c${O.cached}`);}let P=k.join("");I.set(v,P),F.push(v,P);}return {valuesToken:q(F),tokenForParagraph:v=>I.get(v)??"",liveValueOf:(v,w)=>{let k=T.get(v);return !k||k.live===null||k.spec.bookmark!==w.bookmark||k.spec.numberSwitch!==w.numberSwitch||Tn(k.spec)!==Tn(w)?null:k.live},autonumValueOf:v=>f.get(v)??null,pageRefProjectionOf:(v,w)=>{let k=S.get(v);return !k||k.spec.bookmark!==w.bookmark||Tn(k.spec)!==Tn(w)?null:k.projection}}}function oL(e,t,n){return Us(e,t,n,void 0)}function Us(e,t,n,r,o=Me,a){let i=n?.footnotesPart??null,s=n?.endnotesPart??null,l=uP.get(e);if(l&&l.listItems===t&&l.footnotesPart===i&&l.endnotesPart===s&&l.noteNumbering===r&&l.displayMode===o&&l.authorFilterKey===(a?.cacheKey??""))return l.context;let d=rL(e,t,n,r,o,a);return uP.set(e,{listItems:t,footnotesPart:i,endnotesPart:s,noteNumbering:r,displayMode:o,authorFilterKey:a?.cacheKey??"",context:d}),d}function mP(e,t){let n=[];for(let r of Cn([e])){let o=t.tokenForParagraph(r.id);o&&n.push(o);}return n.join(";")}var co=61440,Ys=61695,Tm=128;function Ii(e){return e.kind==="generic"&&e.namespaceUri===da$1&&e.localName==="sym"}function gP(e,t){if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes)if(n.localName===t&&(n.namespaceUri===da$1||n.namespaceUri===""))return n.value}}function aL(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function zc(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 ki(e){if(!Ii(e))return null;let t=aL(gP(e,"char"));if(t===null)return null;let n=gP(e,"font"),r=n&&n.length<=Tm?n:null,o=oa(r),a=o&&t<=255&&t+co<=Ys?t+co:t;if(o&&a>=co&&a<=Ys){let i=Ti(String.fromCodePoint(a),r),s=i.codePointAt(0)<co;return {text:i,font:r,unicode:s}}return zc(t)?{text:String.fromCodePoint(t),font:r,unicode:t<57344||t>63743}:null}function Fm(e,t,n){if(!t.font)return {props:e,style:He(e,n)};let r=[...e,{localName:"rFonts",attributes:{ascii:t.font,hAnsi:t.font,eastAsia:t.font,hint:"default"}}];return {props:r,style:He(r,n)}}var iL=256,sL=9;function lL(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "||r===" "||r===`
15
- `||r==="\r"){n+=1;continue}if(r==='"'){let a=n+1;for(;a<e.length&&e[a]!=='"';)a+=1;t.push({value:e.slice(n+1,a),quoted:true}),n=a<e.length?a+1:a;continue}let o=n;for(;o<e.length&&!`
16
- \r"`.includes(e[o]);)o+=1;t.push({value:e.slice(n,o),quoted:false}),n=o;}return t}function dL(e){if(e.quoted)return null;let t=e.value;if(t.length===0||t.length>sL)return null;let n;if(t.startsWith("0x")||t.startsWith("0X")){let r=t.slice(2);if(!/^[0-9A-Fa-f]{1,6}$/.test(r))return null;n=Number.parseInt(r,16);}else {if(!/^\d{1,7}$/.test(t))return null;n=Number.parseInt(t,10);}return n>1114111||n>=55296&&n<=57343?null:n}function Wc(e){if(e.length===0||e.length>iL)return null;let t=lL(e);if(t.length<2)return null;let n=t[0];if(n.quoted||n.value.toUpperCase()!=="SYMBOL")return null;let r=dL(t[1]);if(r===null)return null;let o=null,a=null,i=false;for(let s=2;s<t.length;s+=1){let l=t[s];if(l.quoted||!l.value.startsWith("\\"))continue;let d=l.value.toLowerCase();if(d==="\\f"){let c=t[s+1];c&&c.value.length>0&&c.value.length<=Tm&&(c.quoted||!c.value.startsWith("\\"))&&(o=c.value,s+=1);continue}if(d==="\\s"){let c=t[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 Gc(e,t,n){let r=[];e.font&&r.push({localName:"rFonts",attributes:{ascii:e.font,hAnsi:e.font,eastAsia:e.font,hint:"default"}}),e.sizePt!==null&&r.push({localName:"sz",attributes:{val:String(e.sizePt*2)}});let o=r.length>0?[...t,...r]:t,a=He(o,n);if(e.unicode)return zc(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(oa(i)){let s=e.code<=255&&e.code+co<=Ys?e.code+co:e.code;if(s>=co&&s<=Ys)return {text:Ti(String.fromCodePoint(s),i),props:o,style:a}}return zc(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function Vc(){let e=null,t=0,n=false,r=false,o=()=>{e=null,t=0,n=false,r=false;};return {get active(){return e!==null},onSeparate(a,i){e===null&&a!==null&&(e=a,t=i,n=false,r=false);},onEnd(a,i){if(e===null||a>t)return null;let s=a===t,d=s&&i&&!(n&&!r)?wr(e.kind,i,e.picture):"";return o(),s?d:null},reset:o,noteResult(a){n=true,a&&(r=true);}}}function cL(e){let{simple:t,depth:n,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:s,cascadeRuns:l,themeFonts:d}=e,c="",u,f,m=false,p=jo(),g=Vc(),h=(b,x)=>{u||(u=b,f=x);},y=(b,x,T)=>{if(!(b.kind==="textValue"||x>Dt)){for(let S of b.children)if(S.kind!=="textValue"){if(!st(o))return;if(S.kind==="run"){let I=bi(S,s,l),F=He(I,d);for(let v of S.children){if(v.kind==="runProperties")continue;if(vt(v,"begin")){Ho(p),p.nesting===1&&g.reset();continue}if(Sr(v)){zo(p,v,o,x+1);continue}if(vt(v,"separate")){let L=p.nesting,A=p.phase,j=Wo(p);(L===1||A==="result"&&!p.nestingOverflow)&&g.onSeparate(r?j:null,L);continue}if(vt(v,"end")){let L=g.onEnd(p.nesting,r);L!==null&&(c+=L),Go(p);continue}if(ie(v))continue;if(Ii(v)){if(Le(T,i,e.authorFilter)&&(m=true),g.active){g.noteResult(!F.hidden&&Le(T,i,e.authorFilter));continue}let L=ki(v);if(!L?.unicode||F.hidden||!Le(T,i,e.authorFilter))continue;h(I,F),c+=L.text;continue}let w=Ws(v);if(w.length===0)continue;let k=In(T),P=!Le(T,i,e.authorFilter)||v.kind==="deletedText"&&!k;P||(m=true);let O=F.hidden||P;if(g.active){g.noteResult(!O),O||h(I,F);continue}O||(h(I,F),c+=w);}continue}if(de(S)){let I=g.active?null:qa(fe(S)??"");if(I&&r){if(!Le(T,i,e.authorFilter))continue;let F=c.length;y(S,x+1,T),c=c.slice(0,F),c+=wr(I.kind,r,I.picture);continue}y(S,x+1,T);continue}if(S.kind==="hyperlink"){y(S,x+1,T);continue}if(Vt(S)&&T.length<Xd){let I=qt(S);y(S,x+1,I?dn(T,I):T);continue}y(S,x+1,T);}}};return y(t,n,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:m}}function hP(e){let{simple:t,pageContext:n,inheritedRunProperties:r,themeFonts:o}=e,a=cL(e),i=fe(t)??"",s=a.resultProps??r,l=qa(i);if(l&&n){let g=a.resultStyle??He(r,o);return g.hidden?null:{text:wr(l.kind,n,l.picture),props:s,style:g}}if(l&&e.bodyPageFields&&!n&&a.text.length===0&&!a.sawResultContent){let g=a.resultStyle??He(r,o);if(g.hidden)return null;let y=l.picture!==void 0&&Zr(l.kind,e.bodyPageFields.format)?l.picture:void 0;return {text:_d(l.kind,y,e.bodyPageFields.format),props:s,style:g,pageField:y===void 0?{kind:l.kind}:{kind:l.kind,picture:y}}}let d=Wc(i);if(d){let g=Gc(d,s,o);if(g)return g.style.hidden?null:{text:g.text,props:g.props,style:g.style}}if(e.refFields){let g=Fn(i);if(g){let h=e.refFields.liveValueOf(t.id,g);if(h!==null){let y=a.resultStyle??He(r,o);return y.hidden?null:{text:h,props:s,style:y}}if(e.bodyPageFields&&e.refFields.pageRefProjectionOf){let y=e.refFields.pageRefProjectionOf(t.id,g);if(y){let b=a.resultStyle??He(r,o);if(b.hidden)return null;if(a.text.length>0)return {text:a.text,props:s,style:b,pageRef:y};if(!a.sawResultContent)return {text:Qa,props:s,style:b,pageRef:y}}}}else if(e.refFields.autonumValueOf&&eo(i)){let h=e.refFields.autonumValueOf(t.id);if(h!==null){let y=a.resultStyle??He(r,o);return y.hidden?null:{text:h,props:s,style:y}}}}let c=a.text.length===0&&!a.sawResultContent;if(c){let g=zd(i);if(g){let h=Wd(g,e.documentProperties);if(h!==null){let y=a.resultStyle??He(r,o);return y.hidden?null:{text:h,props:s,style:y}}}}let u=c?Hd(i):null;if(u){let g=a.resultStyle??He(r,o);return g.hidden?null:{text:u.display,props:s,style:g}}if(a.text.length===0)return null;let f=a.resultStyle??He(r,o);if(f.hidden)return null;let m=e.currentLink?null:Gd(i),p=m?e.projectFieldLink?.(m)??null:null;return {text:a.text,props:s,style:f,...p?{link:p}:{}}}var uL="\u2612",fL="\u2610";function pL(e){let t=_o(e);return t==="FORMCHECKBOX"?"checkbox":t==="FORMDROPDOWN"?"dropdown":null}function qs(e,t){e.symbolSpec=Wc(t),!e.symbolSpec&&(e.linkSpec=Gd(t),!e.linkSpec&&(e.formSpec=pL(t),!e.formSpec&&(e.buttonSpec=Hd(t),!e.buttonSpec&&(e.docPropertySpec=zd(t),!e.docPropertySpec&&(e.refSpec=Fn(t),!e.refSpec&&(e.autonumSpec=eo(t)))))));}function OG(e,t){if(t.allowPageFields&&t.hasSeparate&&Yr(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return qs(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!Tn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null||n.formSpec!==null&&t.hasLegacyFormData}function CG(e,t){if(t.allowPageFields&&Yr(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return qs(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!Tn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null}function yP(e,t){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let n=e.formData.checked?uL:fL;if(e.formData.sizeHalfPoints===null)return {text:n,props:e.props,style:e.style};let r=[...e.props,{localName:"sz",attributes:{val:String(e.formData.sizeHalfPoints)}}];return {text:n,props:r,style:He(r,t)}}if(e.formSpec==="dropdown"){if(e.cachedText.length>0||e.sawResultContent||e.formData?.kind!=="dropdown")return null;let n=e.formData.entries[e.formData.selectedIndex]??"";return n.length===0?null:{text:n,props:e.props,style:e.style}}return null}function bP(e,t){if(e.symbolSpec){let r=Gc(e.symbolSpec,e.props,t.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let n=yP(e,t.themeFonts);if(n)return {text:n.text,props:n.props,style:n.style};if(e.kind&&t.pageContext)return {text:wr(e.kind,t.pageContext,e.picture??void 0),props:e.props,style:e.style};if(e.refSpec&&t.refFields){let r=t.refFields.liveValueOf(e.beginId,e.refSpec);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.refSpec&&t.refFields?.pageRefProjectionOf&&t.bodyPageFields){let r=t.refFields.pageRefProjectionOf(e.beginId,e.refSpec);if(r){if(e.cachedText.length>0)return {text:e.cachedText,props:e.props,style:e.style,pageRefField:r};if(!e.sawResultContent)return {text:Qa,props:e.props,style:e.style,pageRefField:r}}}if(e.autonumSpec&&t.refFields?.autonumValueOf){let r=t.refFields.autonumValueOf(e.beginId);if(r!==null)return {text:r,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&&t.bodyPageFields){let o=e.picture!==null&&Zr(e.kind,t.bodyPageFields.format)?e.picture:void 0;return {text:_d(e.kind,o,t.bodyPageFields.format),props:e.props,style:e.style,pageField:{kind:e.kind,...o!==void 0?{picture:o}:{}}}}if(e.docPropertySpec){let r=Wd(e.docPropertySpec,t.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 uo(e,t,n){if(n<=t)return;let r=e[e.length-1];if(r&&r.end>=t){r.end=Math.max(r.end,n);return}e.push({start:t,end:n});}var mL=new Set(["left","center","right"]),gL=new Set(["margin","indent","leftMargin"]),hL=new Set(["dot","hyphen","underscore","middleDot"]);function xP(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==da$1)return null;let t="left",n="margin",r;for(let o of e.attributes)o.namespaceUri===da$1&&(o.localName==="alignment"?t=o.value:o.localName==="relativeTo"?n=o.value:o.localName==="leader"&&(r=o.value));return {alignment:mL.has(t)?t:"left",relativeTo:gL.has(n)?n:"margin",...r!==void 0&&hL.has(r)?{leader:r}:{}}}function Im(e,t,n,r){return {...e,text:e.text.slice(t,n),start:e.start+t,end:e.start+n,...r?{fontSlot:r}:{}}}function km(e,t){if(!e.some(({style:d})=>d.fontFamilyEastAsia!==null&&d.fontFamilyEastAsia!==d.fontFamily))return e;let n=[],r=[],o=[];for(let d=0;d<e.length;d+=1){let c=e[d];c.positionalTab||c.breakKind||c.inlineDrawing||c.anchoredAtom||c.equation||c.text.length!==0&&(n.push(d),r.push(c.text),o.push(wb(c.props)&&!oa(c.style.fontFamily)&&!vb(c.props,c.style.fontFamilyEastAsia,t)));}let a=Cb(r,o);if(a.length===0)return e;let i=new Map;for(let d of a){let c=i.get(d.segment);c?c.push({from:d.from,to:d.to}):i.set(d.segment,[{from:d.from,to:d.to}]);}let s=[],l=0;for(let d=0;d<e.length;d+=1){let c=e[d];if(n[l]!==d){s.push(c);continue}let u=i.get(l);l+=1;let{style:f}=c;if(!u||f.fontFamilyEastAsia===null||f.fontFamilyEastAsia===f.fontFamily){s.push(c);continue}if(!(!c.projected&&!c.fieldAtom&&!c.noteNav&&c.measureText===void 0&&c.end-c.start===c.text.length)){let g=u.length===1&&u[0].from===0&&u[0].to===c.text.length;s.push(g?{...c,fontSlot:"eastAsia"}:c);continue}let p=0;for(let g of u)g.from>p&&s.push(Im(c,p,g.from,void 0)),s.push(Im(c,g.from,g.to,"eastAsia")),p=g.to;p<c.text.length&&s.push(Im(c,p,c.text.length,void 0));}return s}function SP(e){return e.kind==="drawing"||hb$1(e)||Sa$1(e)}function RP(e){let{node:t,layout:n,revisions:r,displayMode:o}=e,a=n.projectionForAtom?.(t.id)??(t.kind==="drawing"?n.project(t):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=In(r),s=e.hiddenRun||!Le(r,o,e.authorFilter);return a.hidden||s?a.hidden?{recordDeleted:i,emit:true}:{recordDeleted:i,emit:false}:{recordDeleted:i,emit:true,extras:{inlineDrawing:Object.freeze({drawingNodeId:t.id,ownerPartName:n.ownerPartName,projection:a,resource:n.resourceOf(a)})}}}function PP(e){let t=pe(e,{maxNesting:oe,maxInstructionChars:ne}),n=t.filter(i=>i.addressing==="atomic"),r=new Set(n.filter(i=>i.kind==="complex").map(i=>i.node.id)),o=new Set(t.filter(i=>i.kind==="complex"&&i.addressing==="editable-result").map(i=>i.node.id)),a=new Set;for(let i of n)for(let s of i.removeNodeIds)a.add(s);return {atomBeginIds:r,editableResultBeginIds:o,coveredIds:a}}Object.freeze({marks:Object.freeze(new Map)});function da(e,t){return Yc$1(e,t)}function Om(e,t){if(!nd(e))return null;if(dd(e)||ed(e))return {text:"",projected:true,kind:null,noteId:null};let n=bd$1(e),r=jd$1(e)??kd$1(e);if(!r)return null;let o=gd$1(e),a=o!==null?da(r,o):n?void 0:t?.activeNoteKey,i=o!==null?o:a?yL(a,r)??null:null,s=a,l=s!==void 0?n?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...l?{nav:l}:{},...s?{scopeId:s}:{}};if(n&&o!==null&&ld(e))return {text:"",...d};if(!t||!a)return {text:"",...d};let c=t.marks.get(a);return c==null?{text:"",...d}:t.reservedMarkText&&t.reservedMarkText.length>0?{text:c,measureText:t.reservedMarkText,...d}:{text:c,...d}}function yL(e,t){let n=`${t}:`;if(!e.startsWith(n))return null;let r=e.slice(n.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function vP(e){return bd$1(e)||cd(e)||dd(e)||ed(e)}function bL(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return (t>>>0).toString(16).padStart(8,"0")}var wP=new WeakMap;function TP(e){if(!e)return "";let t=wP.get(e);if(t!==void 0)return t;let n=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${bL(n)}`;return wP.set(e,r),r}function si(e,t=[],n,r,o,a,i=Me,s,l,d,c,u,f=false,m,p){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let g=[],h=0,y,{atomBeginIds:b,editableResultBeginIds:x,coveredIds:T}=PP(e),S=jo(),I=Rr(),F=null,v=null,w=Vc(),k=Tr,P=(M,N,D,_,K,H,z)=>{if(M.length===0&&!_&&!z?.inlineDrawing)return;let $=z?.linkOverride??y,U=z?.revisionsOverride??k,ie=p?Ud(U,i,p):U;if(ie===null)return;let Z=p?Ox(N,p):N,X=$?{link:$}:{},Q=ie.length===0?{}:{revisions:ie};if(_){g.push({text:M,props:Z,style:D,start:K,end:H,projected:true,...z?.measureText!==void 0?{measureText:z.measureText}:{},...z?.noteNav?{noteNav:z.noteNav}:{},...z?.inlineDrawing?{inlineDrawing:z.inlineDrawing}:{},...z?.anchoredAtom?{anchoredAtom:true}:{},...z?.equation?{equation:z.equation}:{},...z?.fieldAtom?{fieldAtom:z.fieldAtom}:{},...X,...Q});return}M.length!==0&&g.push({text:M,props:Z,style:D,start:K,end:H,...z?.positionalTab?{positionalTab:z.positionalTab}:{},...z?.breakKind?{breakKind:z.breakKind}:{},...X,...Q});},O=()=>{if(!F||!F.atomic){F=null,v=null;return}let M=F.atomStart,N=M+1;if(F.style.hidden){F=null,v=null;return}if(!Le(F.resultRevisions,i,p)){s&&In(F.resultRevisions)&&uo(s,M,N),F=null,v=null;return}let{resultLink:D,linkSpec:_,resultRevisions:K,formField:H}=F,z,$=()=>{if(z)return z;let ie=!D&&_?c?.(_)??null:null,Z=D??ie;return z={...K.length>0?{revisionsOverride:K}:{},...Z?{linkOverride:Z}:{},fieldAtom:{formField:H}},z},U=bP(F,{pageContext:n,themeFonts:d,documentProperties:u,bodyPageFields:f,...m?{refFields:m}:{}});if(U){let ie=$(),Z=U.pageField||U.pageRefField?{...ie,fieldAtom:{formField:F.formField,...U.pageField?{pageField:U.pageField}:{},...U.pageRefField?{pageRef:U.pageRefField}:{}}}:ie;P(U.text,U.props,U.style,true,M,N,Z);}F=null,v=null;},L=()=>{if(!F)return;let M=!F.resultLink&&F.linkSpec?c?.(F.linkSpec)??null:null,N=D=>M&&!D.link?{...D,link:M}:D;if(F.atomic){h=F.atomStart;for(let D of F.buffered)g.push({...N(D),start:h,end:h+(D.end-D.start)}),h+=D.end-D.start;F.cachedText.length>0&&F.buffered.length===0&&(P(F.cachedText,F.props,F.style,false,h,h+F.cachedText.length,M?{linkOverride:M}:void 0),h+=F.cachedText.length);}else {for(let D of F.buffered)g.push(N(D));h=F.bufferOffset;}F=null,v=null;},A=(M,N,D)=>{if(SP(M)){let $=h;h+=1;let U=h;if(!l)return;let ie=RP({node:M,layout:l,hiddenRun:D.hidden,revisions:k,displayMode:i,authorFilter:p});ie.recordDeleted&&s&&uo(s,$,U),ie.emit&&P("\uFFFC",N,D,true,$,U,ie.extras);return}if(vP(M)){let $=Om(M,a),U=h,ie=U+1;if(h=ie,D.hidden||!$||$.text.length===0&&!$.measureText)return;let Z=$.scopeId&&$.nav?{scopeId:$.scopeId,direction:$.nav}:void 0;P($.text.length>0?$.text:$.measureText??"",N,D,true,U,ie,{...$.measureText!==void 0?{measureText:$.measureText}:{},...Z?{noteNav:Z}:{}});return}let _=xP(M);if(_){D.hidden||P(" ",N,D,false,h,h,{positionalTab:_});return}if(Ii(M)){let $=ki(M);if(!$||D.hidden||!Le(k,i,p))return;let U=Fm(N,$,d);P($.text,U.props,U.style,true,h,h);return}let K=Ws(M);if(K.length===0)return;let H=In(k);D.hidden||!Le(k,i,p)||M.kind==="deletedText"&&!H||P(K,N,D,false,h,h+K.length,{...M.kind==="hardBreak"?{breakKind:Td$1(M)}:{}}),H&&s&&uo(s,h,h+K.length),h+=K.length;},j=(M,N)=>{if(M.kind!=="run")return;let D=bi(M,t,r),_=He(D,d),K=()=>{F&&(F.capturedResultStyle||(F.props=D,F.style=_,F.capturedResultStyle=true),F.capturedResultRevisions||(F.resultRevisions=k,F.capturedResultRevisions=true,!F.resultLink&&y&&(F.resultLink=y)));};for(let H of M.children){if(!st(I)){if(L(),ws(S),w.reset(),H.kind==="runProperties"||vt(H,"begin")||vt(H,"separate")||vt(H,"end")||Sr(H)||T.has(H.id)&&v===null)continue;A(H,D,_);continue}if(H.kind!=="runProperties"){if(vt(H,"begin")){let z=b.has(H.id);Ho(S),S.nesting===1&&(L(),w.reset(),v=z?H.id:null,F={kind:null,picture:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null,formData:ke(H),beginId:H.id,atomic:z,editableResult:x.has(H.id),atomStart:h,props:D,style:_,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:h,resultRevisions:k,capturedResultRevisions:k.length>0,formField:je(H),...y?{resultLink:y}:{}},z&&(h+=1));continue}if(Sr(H)){zo(S,H,I,N+1);continue}if(vt(H,"separate")){let z=S.nesting===1&&S.phase==="instruction",$=S.nesting,U=Wo(S);if(z&&F){F.kind=U?.kind??null,F.picture=U?.picture??null;let ie=Za(S);!F.kind&&!ie.overflow&&!S.nestingOverflow&&qs(F,ie.instruction),F.props=D,F.style=_;}else F?.atomic&&S.phase==="result"&&!S.nestingOverflow&&w.onSeparate(n?U:null,$);continue}if(vt(H,"end")){let z=S.nesting===1;if(z&&F?.atomic&&S.phase==="instruction"){let U=Za(S);!U.overflow&&!S.nestingOverflow&&qs(F,U.instruction);}let $=w.onEnd(S.nesting,n);$!==null&&F?.atomic&&(F.cachedText+=$),Go(S),z&&(F?.atomic?O():L());continue}if(!(lx(S)&&F?.atomic)){if(F&&dx(S)){if(Ii(H)){if(F.atomic){if(Le(k,i,p)&&(F.sawResultContent=true),w.active){w.noteResult(!_.hidden&&Le(k,i,p));continue}if(!_.hidden&&Le(k,i,p)){let X=ki(H);X?.unicode&&(K(),F.cachedText+=X.text);}continue}let ie=ki(H);if(!ie||_.hidden||!Le(k,i,p))continue;let Z=Fm(D,ie,d);F.buffered.push({text:ie.text,props:Z.props,style:Z.style,start:h,end:h,projected:true,...k.length>0?{revisions:k}:{},...y?{link:y}:{},fieldAtom:{formField:F.formField}});continue}let z=Ws(H);if(z.length===0)continue;let $=In(k),U=!Le(k,i,p)||H.kind==="deletedText"&&!$;if(F.atomic&&!U&&(F.sawResultContent=true),$&&s&&(F.atomic?uo(s,F.atomStart,F.atomStart+1):uo(s,h,h+z.length)),U){F.atomic&&w.active&&w.noteResult(false),F.atomic||(h+=z.length,F.bufferOffset=h);continue}if(F.atomic){if(w.active){if(w.noteResult(!_.hidden),_.hidden)continue;K();continue}if(_.hidden)continue;K(),F.cachedText+=z;continue}if(_.hidden){h+=z.length,F.bufferOffset=h;continue}F.capturedResultStyle||(F.props=D,F.style=_,F.capturedResultStyle=true),F.buffered.push({text:z,props:D,style:_,start:h,end:h+z.length,...k.length>0?{revisions:k}:{},...y?{link:y}:{},fieldAtom:{formField:F.formField}}),h+=z.length,F.bufferOffset=h;continue}T.has(H.id)&&v===null&&b.size>0,A(H,D,_);}}}};if(!st(I))return km(g,d);let W=Va$1(),R=(M,N)=>{let D=h;if(h+=1,M.kind==="textValue"||(In(k)&&s&&uo(s,D,D+1),!Le(k,i,p)))return;let _=hP({simple:M,depth:N,pageContext:n,budget:I,revisions:k,displayMode:i,authorFilter:p,inheritedRunProperties:t,cascadeRuns:r,themeFonts:d,currentLink:y,projectFieldLink:c,documentProperties:u,bodyPageFields:f,...m?{refFields:m}:{}});_&&P(_.text,_.props,_.style,true,D,D+1,{fieldAtom:{formField:false,..._.pageField?{pageField:_.pageField}:{},..._.pageRef?{pageRef:_.pageRef}:{}},..._.link?{linkOverride:_.link}:{}});},C=(M,N,D,_)=>{if(_>=la$1)return;let K=rc$1(M);if(K){let z=h++;In(k)&&s&&uo(s,z,h);let $=Rc(He(t,d));return $.hidden||!Le(k,i,p)?void 0:P("\uFFFC",t,$,true,z,h,{equation:K})}if(de(M)){R(M,N);return}if(M.kind==="run"){j(M,N);return}if(Cd$1(M)){if(N>Dt)return;for(let z of Fd$1(M))C(z,N+1,D,_+1);return}if(N>Dt)return;let H=M.kind!=="textValue"&&"localName"in M?Ua$1(D,M):D;if(M.kind==="hyperlink"){let z=y;y=o?.(M)??void 0;for(let $ of M.children)C($,N+1,H,_+1);y=z;return}if(Vt(M)){let z=qt(M);if(!z||!st(I))return;let $=k;k=dn($,z);for(let U of M.children)C(U,N+1,H,_+1);k=$;return}if(na$1(M))for(let z of M.children)C(z,N+1,H,_+1);};for(let M of e.children)C(M,1,W,0);return L(),km(g,d)}var Em=512,IP=9,On=31680/20,xL=8,SL=128;function Zs(e,t){return e.kind!=="textValue"&&e.namespaceUri===da$1&&e.localName===t}function pt(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function Xt(e,t){for(let n of e.children)if(Zs(n,t))return n}function Cr(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function RL(e){let t=e/20;return !Number.isFinite(t)||t<=0?0:t>On?On:t}function Cm(e){let t=e/20;return Number.isFinite(t)?t>On?On:t<-On?-On:t:0}function PL(e){let t={left:0,right:0,hanging:0,firstLine:0};if(!e)return t;let n=Xt(e,"ind");if(!n)return t;let r=Cr(pt(n,"left")??pt(n,"start"),true),o=Cr(pt(n,"right")??pt(n,"end"),true),a=Cr(pt(n,"hanging")),i=Cr(pt(n,"firstLine"),true);return {left:r===null?0:Cm(r),right:o===null?0:Cm(o),hanging:a===null?0:RL(a),firstLine:i===null?0:Cm(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function wL(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function vL(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function TL(e,t){let n=Xt(e,t);if(!n)return false;let r=pt(n,"val");return r!=="0"&&r!=="false"&&r!=="off"}function FP(e,t){let n=Xt(e,t);if(!n)return;let r=pt(n,"val");if(!(r===void 0||r.length===0||r.length>SL))return r}function FL(e,t){for(let n of e){if(n.localName!==t)continue;let r=n.attributes?.val;return !(r==="0"||r==="false")}return false}function kP(e){let t=Cr(pt(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=Xt(e,"start"),r=1;if(n){let y=Cr(pt(n,"val"));y!==null&&y>=0&&(r=Math.min(y,9999));}let o=Xt(e,"numFmt"),a=(o?pt(o,"val"):void 0)??"decimal",i=Xt(e,"lvlText"),s=i?pt(i,"val")??"":"",l=Xt(e,"lvlJc"),d=vL(l?pt(l,"val"):void 0),c=Xt(e,"suff"),u=wL(c?pt(c,"val"):void 0),f=Xt(e,"lvlRestart"),m;if(f){let y=Cr(pt(f,"val"));y!==null&&y>=0&&y<=9&&(m=y);}let p=Xt(e,"pPr"),g=Xt(e,"rPr"),h=g?yi(g):[];return {ilvl:t,start:r,numFmt:a.length>64?"decimal":a,lvlText:s.length>64?s.slice(0,64):s,lvlJc:d,suff:u,indent:PL(p),...m!==void 0?{lvlRestart:m}:{},isLgl:TL(e,"isLgl"),runProperties:h,vanish:FL(h,"vanish")}}function IL(e){let t=pt(e,"abstractNumId");if(t===void 0||t.length===0||t.length>64)return null;let n=new Map;for(let a of e.children){if(!Zs(a,"lvl"))continue;if(n.size>=9)break;let i=kP(a);i&&!n.has(i.ilvl)&&n.set(i.ilvl,i);}let r=FP(e,"numStyleLink"),o=FP(e,"styleLink");return {abstractNumId:t,levels:n,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function kL(e){let t=Cr(pt(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=Xt(e,"startOverride"),r;if(n){let i=Cr(pt(n,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=Xt(e,"lvl"),a=o?kP(o)??void 0:void 0;return r===void 0&&a===void 0?{ilvl:t,override:{}}:{ilvl:t,override:{...r!==void 0?{startOverride:r}:{},...a?{level:a}:{}}}}function OL(e){let t=pt(e,"numId");if(t===void 0||t.length===0||t.length>64)return null;let n=Xt(e,"abstractNumId"),r=n?pt(n,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!Zs(a,"lvlOverride"))continue;if(o.size>=IP)break;let i=kL(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:t,abstractNumId:r,overrides:o}}function Mm(e){let t=new Map,n=new Map;if(!e)return {abstractNums:t,nums:n};let r=0,o=0;for(let a of e.children){if(Zs(a,"abstractNum")){if(r>=Em)continue;r+=1;let i=IL(a);i&&!t.has(i.abstractNumId)&&t.set(i.abstractNumId,i);continue}if(Zs(a,"num")){if(o>=Em)continue;o+=1;let i=OL(a);i&&!n.has(i.numId)&&n.set(i.numId,i);}}return {abstractNums:t,nums:n}}function CL(e,t,n){let r=new Set([t.abstractNumId]),o=t;for(let a=0;a<xL;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let s=n(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 GR(e,t){let n=false,r=new Map(e.abstractNums);for(let[o,a]of e.abstractNums){if(a.numStyleLink===void 0)continue;let i=CL(e,a,t);!i||i.levels===a.levels||i.levels.size===0||(r.set(o,{...a,levels:i.levels}),n=true);}return n?{abstractNums:r,nums:e.nums}:e}function Uo(e,t,n){if(n<0||n>8)return null;let r=e.nums.get(t);if(!r)return null;let o=e.abstractNums.get(r.abstractNumId);if(!o)return null;let a=r.overrides.get(n),i=a?.level??o.levels.get(n);return i?{abstractNumId:r.abstractNumId,level:i,...a?.startOverride!==void 0?{startOverride:a.startOverride}:{}}:null}var Sm=Object.freeze({abstractNums:new Map,nums:new Map});var EL="http://schemas.microsoft.com/office/word";function OP(e){if(!e||e.namespaceUri!==da$1||e.localName!=="settings")return;let t,n=false;for(let r of e.children)if(!(r.kind==="textValue"||r.namespaceUri!==da$1||r.localName!=="compat"))for(let o of r.children){if(o.kind==="textValue"||o.namespaceUri!==da$1||o.localName!=="compatSetting")continue;let a=s=>o.attributes.find(l=>l.namespaceUri===da$1&&l.localName===s)?.value;if(a("name")!=="compatibilityMode"||a("uri")!==EL)continue;if(n)return;n=true;let i=a("val");t=i==="11"||i==="12"||i==="14"||i==="15"?Number(i):void 0;}return t}function ML(e){let t,n,r,o,a,i,s,l,d,c,u,f,m;return {styleCascade(){let p=e.stylesRoot(),g=e.documentThemeFonts(),h=e.settingsRoot();return (l===void 0||p!==r||h!==d||g.major!==o||g.minor!==a||g.majorEastAsia!==i||g.minorEastAsia!==s)&&(r=p,o=g.major,a=g.minor,i=g.majorEastAsia,s=g.minorEastAsia,d=h,l=mm(p,g,h)),l},defaultTabStopPt(){let p=e.settingsRoot();return (u===void 0||p!==c)&&(c=p,u=Ap(p)),u},compatibilityMode(){let p=e.settingsRoot();return p!==f&&(f=p,m=OP(p)),m},numberingIndex(){let p=e.numberingRoot();return (n===void 0||p!==t)&&(t=p,n=Mm(p)),n}}}var CP=new WeakMap,LL=0;function EP(e){let t=CP.get(e.content);return t===void 0&&(t=++LL,CP.set(e.content,t)),q([String(t),e.contentNodeId,String(e.insetsEmu.top),String(e.insetsEmu.right),String(e.insetsEmu.bottom),String(e.insetsEmu.left),e.verticalAnchor,e.autofit,e.fillHex??"",e.strokeHex??"",String(e.strokeWidthEmu)])}function MP(e){let t=e.picture;return t?.embeddedRelationshipId?`embed:${e.ownerPartName}:${t.embeddedRelationshipId}`:t?.linkedRelationshipId?`link:${e.ownerPartName}:${t.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var LP=new WeakMap,Lm=new Map,BL=16,NL=32;function _P(e,t){let n=LP.get(e);if(n)return n;let r;if(e.kind==="drawing"||hb$1(e)||Sa$1(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:Lm,visited:1,deepest:0};else if((t<2||e.children.length>=BL)&&t<NL){let o=null,a=1,i=0;for(let s of e.children){let l=_P(s,t+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??Lm,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>fb$1)break;l.depth>i&&(i=l.depth);let d=l.node;if(d.kind==="drawing"||hb$1(d)||Sa$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:Lm,visited:a,deepest:i};}return LP.set(e,r),r}function Bm(e){let t=_P(e.root,0);return t.visited>fb$1||t.deepest>db$1.maxDrawingDepth?null:t.atoms}var BP=new WeakMap;function jP(e,t){let n=BP.get(e.root),r=n?.get(t);if(r)return r;let o=Bm(e),a=new Map,i=0;if(o)for(let s of o.keys()){let l=t.projectionForAtom?.(s)?.drawingNodeId??s;a.set(l,i),i+=1;}else for(let s of mb$1(e))a.set(s.drawingNodeId,i),i+=1;return n||(n=new WeakMap,BP.set(e.root,n)),n.set(t,a),a}var Nm=new Float64Array(1),Kc=new Uint32Array(Nm.buffer);function AL(e){Mn[0]=2166136261,Mn[1]=268435859;let t=[];for(let n of e.components){t.push(n.fillHex??"",String(n.fillAlpha),n.strokeHex??"",String(n.strokeAlpha),String(n.strokeWidthEmu),String(n.subpathsEmu.length));let r=n.subpathsEmu;for(let a=0;a<r.length;a+=1){let i=r[a];t.push(String(i.length),n.subpathsClosed?.[a]===false?"0":"1"),Am(i,Mn);}let o=n.arrowheadsEmu;if(t.push(String(o?.length??0)),o)for(let a of o)t.push(String(a.length)),Am(a,Mn);}return [String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.components.length),t.join(","),Mn[0].toString(36),Mn[1].toString(36)].join(";")}var Mn=new Uint32Array(2);function DL(e){return Mn[0]=2166136261,Mn[1]=268435859,Am(e,Mn),`${Mn[0].toString(36)}:${Mn[1].toString(36)}`}function Am(e,t){let n=t[0],r=t[1];for(let o of e)Nm[0]=o.x,n=Math.imul(n^Kc[0],16777619),r=Math.imul(r^Kc[1],16777651),Nm[0]=o.y,n=Math.imul(n^Kc[1],16777619),r=Math.imul(r^Kc[0],16777651);t[0]=n,t[1]=r;}function Dm(e){let t=e.position,n=e.anchor,r=e.picture,o=e.wrapGeometry,a=e.vectorShape,i={drawingNodeId:e.drawingNodeId,ownerPartName:e.ownerPartName,kind:e.kind,diagnostics:q(e.diagnostics.map(s=>q([s.code,s.nodeId,s.detail??""]))),relationshipId:e.relationshipId??"",docPrId:String(e.docPrId??""),name:e.name,title:e.title,description:e.description,hyperlinkHref:e.hyperlinkHref??"",hidden:String(e.hidden),extentEmu:q([String(e.extentEmu.cx),String(e.extentEmu.cy)]),effectExtentEmu:q([String(e.effectExtentEmu.top),String(e.effectExtentEmu.right),String(e.effectExtentEmu.bottom),String(e.effectExtentEmu.left)]),inlineDistancesEmu:q([String(e.inlineDistancesEmu.top),String(e.inlineDistancesEmu.right),String(e.inlineDistancesEmu.bottom),String(e.inlineDistancesEmu.left)]),wrap:e.wrap,textboxStory:e.textboxStory?EP(e.textboxStory):"",compatibilityBranchNodeId:e.compatibilityBranchNodeId??"",anchor:n?q([String(n.simplePos),String(n.relativeHeight),String(n.layoutInCell),String(n.allowOverlap),String(n.behindDocument)]):"",locks:q([String(e.locks.select),String(e.locks.move),String(e.locks.resize),String(e.locks.changeAspect)]),effects:q([String(e.effects.grayscale),String(e.effects.brightness),String(e.effects.contrast),String(e.effects.bilevel??"")]),picture:r?q([String(r.crop.left),String(r.crop.top),String(r.crop.right),String(r.crop.bottom),String(r.transform.rotationDegrees),String(r.transform.flipHorizontal),String(r.transform.flipVertical),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??"",r.fillMode]):"",legacyGraphic:e.legacyGraphic?JSON.stringify(e.legacyGraphic):"",vectorShape:a?AL(a):"",wrapGeometry:o?q([o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length),DL(o.polygon)]):"",position:t?q([t.horizontal.relativeFrom,t.horizontal.align??"",String(t.horizontal.offsetEmu??""),t.vertical.relativeFrom,t.vertical.align??"",String(t.vertical.offsetEmu??""),String(t.simplePosition.xEmu),String(t.simplePosition.yEmu)]):""};return q(Object.values(i))}function Js(e){switch(e.kind){case "ready":return q(["ready",e.resourceKey,e.contentId,`${e.pixelWidth}x${e.pixelHeight}`]);case "pending":return q(["pending",e.resourceKey]);case "external":return q(["external",e.relationshipId,e.sinkSafe?"1":"0"]);case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}var _L=1;function HP(e,t){if(e.kind==="paragraph"){for(let n of zP(e))t.push(n);return}if("children"in e)for(let n of e.children)HP(n,t);}function zP(e){if(e.kind!=="paragraph")return [];let t=[];return mc(e,n=>t.push(n.id)),Object.freeze(t)}function jL(e){let{ownerPartName:t,part:n,pkg:r,lookup:o,onResourceSettled:a,rememberReadyHandle:i,forgetReadyHandle:s}=e,l=false,d=0,c=new Map,u=new Set,f=new Map,m=new WeakMap,p=new WeakMap,g=0,h=gb$1(r,t),y=bb$1(r),b=nb$1(n,{resolveRelationship:h,resolveSchemeColor:y.resolveSchemeColor,resolveStyleMatrixReference:y.resolveStyleMatrixReference}),x=Bm(n),T=(k,P)=>{if(l||u.has(P))return;u.add(P);let O=d;o.resolveForProjection(k).then(L=>{l||O!==d||(c.set(P,L),L.kind==="ready"&&i(L.validatedHandle),g+=1,f.set(P,g),u.delete(P),a(t));}).catch(()=>{l||O!==d||(c.set(P,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(P,g),u.delete(P),a(t));});},S=k=>{let P=MP(k),O=c.get(P);if(O)return O;let L=k.picture?.linkedRelationshipId;if(L){let j=o.resolveLinked(t,L);return c.set(P,j),g+=1,f.set(P,g),j}let A=Object.freeze({kind:"pending",resourceKey:P});return c.set(P,A),g+=1,f.set(P,g),T(k,P),A},I=k=>b.get(k)??null,F=Object.freeze({ownerPartName:t,projectionForAtom:I,project:k=>I(k.id),resourceOf:S}),v=k=>{let P=p.get(k);if(P)return P;let O=zP(k),L=null,A=(W,R)=>{if(!(R>=_L))for(let C of W){let M=b.get(C)?.textboxStory;if(!M)continue;let N=[];if(HP(M.content,N),N.length!==0){L||(L=[...O]);for(let D of N)L.push(D);A(N,R+1);}}};A(O,0);let j=L??O;return p.set(k,j),j};return {context:F,cacheTokenForPart:()=>`${t}|${g}|${d}|${b.size}`,drawingTokenForParagraph:k=>{let P=m.get(k);if(P?.resourceEpoch===g)return P.token;let O=v(k);if(O.length===0)return m.set(k,{resourceEpoch:g,token:""}),"";let L=O.map(j=>HL(b.get(j)??null,j,S,W=>f.get(MP(W))??0)).sort(),A=q(L);return m.set(k,{resourceEpoch:g,token:A}),A},pendingResourceCount:()=>u.size,isCompatibleWith:(k,P)=>{let O=bb$1(P);if(O.cacheToken!==y.cacheToken)return false;if(k===n)return true;let L=Bm(k);if(x&&L&&x.size===L.size){let j=true;for(let[W,R]of x)if(L.get(W)!==R){j=false;break}if(j)return true}let A=nb$1(k,{resolveRelationship:gb$1(P,t),resolveSchemeColor:O.resolveSchemeColor,resolveStyleMatrixReference:O.resolveStyleMatrixReference});if(A.size!==b.size)return false;for(let[j,W]of b){let R=A.get(j);if(!R||Dm(R)!==Dm(W))return false}return true},dispose:()=>{l=true,d+=1;for(let k of c.values())k.kind==="ready"&&s(k.validatedHandle);c.clear(),u.clear(),f.clear();}}}var NP=0;function zV(e){let t=e.session.packageRevision(),n=e.session.currentPackage(),r=e.resourceLookup??Bb$1(n,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new WeakMap,s=new Map,l=new Map,d=p=>{s.set(p.resourceKey,p);let g=pb$1(p);g&&l.set(p.resourceKey,g);},c=p=>{s.delete(p.resourceKey);let g=l.get(p.resourceKey);g&&(qb$1(g),l.delete(p.resourceKey));},u=(p,g)=>{let y=g.currentPackage().parts.get(p)??a.get(p);if(y)return y;if(p===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${p}`)},f=(p,g)=>{let h=o.get(p);if(h)return h;let y=u(p,g);a.set(p,y);let b=jL({ownerPartName:p,part:y,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:d,forgetReadyHandle:c});return o.set(p,b),NP+=1,i.set(b,NP),b},m=p=>{let g=p.currentPackage();if(g.partBytes===n.partBytes&&g.relationships===n.relationships&&g.contentTypes===n.contentTypes){for(let[y,b]of o){let x=g.parts.get(y)??(y===p.part().name?p.part():void 0);if(x&&b.isCompatibleWith(x,g)){a.set(y,x);continue}b.dispose(),o.delete(y),a.delete(y);}t=p.packageRevision(),n=g;return}for(let y of o.values())y.dispose();o.clear(),a.clear();for(let y of l.values())qb$1(y);l.clear(),s.clear(),e.resourceLookup||r.dispose(),t=p.packageRevision(),n=g,r=e.resourceLookup??Bb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return f(e.session.part().name,e.session).context},contextForPart(p){return f(p,e.session).context},cacheTokenForPart(p){let g=f(p,e.session);return `${i.get(g)??0}|${g.cacheTokenForPart()}`},drawingTokenForParagraph(p,g){let h=f(g,e.session);return `${i.get(h)??0}|${h.drawingTokenForParagraph(p)}`},pendingResourceCount(){let p=0;for(let g of o.values())p+=g.pendingResourceCount();return p},mintValidatedBytes(p,g){return s.get(p.resourceKey)!==p?null:ob$1(p,g)},sync(p){p.packageRevision()===t&&p.currentPackage()===n||m(p);},dispose(){for(let p of o.values())p.dispose();o.clear(),a.clear();for(let p of l.values())qb$1(p);l.clear(),s.clear(),e.resourceLookup||r.dispose();}})}function HL(e,t,n,r){if(!e)return q([t,"refused"]);let o=[t,Dm(e),Js(n(e))];return r&&o.push(String(r(e))),q(o)}function WP(e,t,n){if(t===void 0)return DP(e,n);let r=AP.get(e);if(r&&r.epoch===t)return r.token;let o=DP(e,n);return AP.set(e,{epoch:t,token:o}),o}var AP=new WeakMap;function DP(e,t){return Xo(e,t)}function nr(e){return {...e,measuringOnly:true,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function $c(e){let t=[],n=0;for(let r of e.members){let o=Me$1(r).length;t.push({paragraphId:r.id,base:n,length:o}),n+=o;}return {members:t,total:n}}function _m(e,t){let n;for(let r of e.members){if(r.base>t)break;(n===void 0||r.length>0||r.base>n.base)&&(n=r);}return n??e.members[e.members.length-1]}function GP(e,t){let n=_m(t,e.start);if(!n)return e;let r=e.end-n.base;return {paragraphId:n.paragraphId,start:e.start-n.base,end:Math.min(r,n.length)}}function zL(e,t){return {...e,range:GP(e.range,t)}}function Xc(e,t){return e.map(n=>{let r=n.spans.map(u=>zL(u,t)),o=r[0],a=n.drawings?.map(u=>{let f=_m(t,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))}:GP(n.range,t),d=a,c=n.deletedRanges?.map(u=>({deleted:u,member:_m(t,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 {...n,range:l,spans:r,...d?{drawings:d}:{},...c?{deletedRanges:c}:{}}})}function VP(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function jm(e,t,n,r,o){let a=VP(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 t){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:n,width:i.cellContentWidth,height:r});a(oo({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.hostedStory?{layoutTextboxStory:o.hostedStory.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{}}));}}function KP(e,t){let n=VP(e),r=e.deferAnchoredDrawings;return !n&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:n,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{t.push(i);}},flushDeferred:(i,s,l)=>{if(t.length!==0){if(n&&!e.anchorDeferOnly)jm(t,i,s,l,e);else if(r)for(let d of t)r(d);t.length=0;}}}}function Uc(e,t,n){let r=Np(e.tabStops,t),o=r===e.tabStops?e.tabStopsCacheToken:Ns(r);return {tabStops:r,properties:[...e.props,...e.inheritedRunProperties,...e.markRunProperties,{localName:"tabStops",attributes:{token:o}},...n.listToken!==void 0?[{localName:"list",attributes:{token:n.listToken}}]:[],...n.hostedListToken?[{localName:"txbxList",attributes:{token:n.hostedListToken}}]:[],...n.refToken?[{localName:"refFields",attributes:{token:n.refToken}}]:[]]}}function Hm(e,t){return e?`${t.toFixed(3)}|${e}`:""}function $P(e,t){let n=Hm(t.exclusionToken,t.paragraphStartY),r=e;return n&&(r+=`\0excl:${t.columnIndex}|${n}`),t.startOffset>0&&(r+=`\0from:${t.startOffset}`),r}function Yc(e){let{formatting:t,styleCascade:n}=e;return uR(e.paragraph,e.paragraphId,e.indentLeft,e.available,e.measurer,e.cache,e.cacheKey,t.inheritedRunProperties,e.tabStops,e.pageContext,n?(r,o)=>ra(r,o,n):void 0,{...e.flow,lineSpacing:t.lineSpacing,typography:Qd(t.props,n?.typography),equationCacheToken:e.producer,...n?{themeFonts:n.themeFonts}:{},markRunProperties:t.markRunProperties})}var XP=new WeakMap;function Qs(e){let t=Gp(e.borders);return t===""?"":`${t}@${e.indent.left},${e.indent.right}`}function zm(e,t,n){XP.set(e,{styleCascade:t.styleCascade,tableCellStyle:t.tableCellStyle,listItem:t.listItems?.get(e.id),key:n});}function WL(e,t){let n=t.listItems?.get(e.id),r=XP.get(e);if(r&&r.styleCascade===t.styleCascade&&r.tableCellStyle===t.tableCellStyle&&r.listItem===n)return r.key;let o=Qs(lo(e,1,t.styleCascade,n,t.tableCellStyle,true));return zm(e,t,o),o}function UP(e,t){return e&&e.kind==="paragraph"?WL(e,t):""}function GL(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Ln(e,t){return e.attributes.find(n=>n.localName===t)?.value}var YP=31680/20;function qP(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function Oi(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return;let t=Number(e);if(!Number.isFinite(t))return;let n=t/20;return Math.max(-YP,Math.min(YP,n))}function Wm(e){let t=e&&GL(e,"tblpPr");if(!t)return;let n=Ln(t,"tblpXSpec"),r=n==="left"||n==="center"||n==="right"||n==="inside"||n==="outside"?n:void 0,o=Ln(t,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:qP(Ln(t,"horzAnchor"))??"text",vertAnchor:qP(Ln(t,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:Oi(Ln(t,"tblpX"))??0,...a?{ySpec:a}:{},yPt:Oi(Ln(t,"tblpY"))??0,...["topFromText","rightFromText","bottomFromText","leftFromText"].some(i=>Ln(t,i)!==void 0)?{distances:{top:Math.max(0,Oi(Ln(t,"topFromText"))??0),right:Math.max(0,Oi(Ln(t,"rightFromText"))??0),bottom:Math.max(0,Oi(Ln(t,"bottomFromText"))??0),left:Math.max(0,Oi(Ln(t,"leftFromText"))??0)}}:{}}}var VL={state:"none"},ZP=(e,t)=>t.state==="omitted"?e:t;function qc(e,t,n={}){return e.state==="omitted"?t:e.state==="none"?VL:e}function Gm(e,t){let n=ZP;return {top:n(e.top,t.top),left:n(e.left,t.left),bottom:n(e.bottom,t.bottom),right:n(e.right,t.right),insideH:n(e.insideH,t.insideH),insideV:n(e.insideV,t.insideV)}}function Vm(e,t){let n=ZP;return {top:n(e.top,t.top),left:n(e.left,t.left),bottom:n(e.bottom,t.bottom),right:n(e.right,t.right)}}function fo(e=1048576){let t=e|0;return {intervalsRemaining:t>0?t:0}}function JP(e,t,n,r){let o=Math.max(0,Math.min(t|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]=KL(e[i],o,n,r);}return a}function KL(e,t,n,r){let o=[];for(let c=0;c<e.length;c+=1){let u=e[c],f=Math.max(0,u.gridColumn|0),m=Math.min(t,f+Math.max(0,u.gridSpan|0));f>=m||(o.push({x:f,kind:1,cellIndex:c,cell:u}),o.push({x:m,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}),n&&(n.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 $L(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>1;e[o].start<=t?n=o+1:r=o;}return n}function Km(e,t,n,r){r&&(r.columnLookups+=1);let o=e[t];if(!o||n<0)return;let a=$L(o,n)-1;if(a<0)return;let i=o[a];if(!(n>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var nw=256,mt={state:"omitted"},nu={state:"none"},rw={top:mt,left:mt,bottom:mt,right:mt,insideH:mt,insideV:mt},ow={top:mt,left:mt,bottom:mt,right:mt},QP={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},UL=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 Ci(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function $m(e,t){return e.attributes.find(n=>n.localName===t)?.value}function YL(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function qL(e){if(e===null)return .5;let t=e/8;return !Number.isFinite(t)||t<=0?.5:t>Ds?Ds:t}function ru(e){if(!e)return mt;let t=$m(e,"val");if(!t)return mt;if(t==="nil"||t==="none")return nu;let n=UL.get(t)??"single",r=$m(e,"color"),o=r===void 0||r==="auto"?null:Pd(r)??null;return {state:"edge",style:n,color:o,widthPt:qL(YL($m(e,"sz")))}}function aw(e,t){if(!e)return ow;let n={top:mt,left:mt,bottom:mt,right:mt};for(let r of t){let o=r==="left"?"start":r==="right"?"end":void 0,a=Ci(e,r)??(o?Ci(e,o):void 0);n[r]=ru(a);}return n}function ou(e){let t=e&&Ci(e,"tblBorders");return t?{...aw(t,["top","left","bottom","right"]),insideH:ru(Ci(t,"insideH")),insideV:ru(Ci(t,"insideV"))}:rw}function au(e){return aw(e&&Ci(e,"tcBorders"),["top","left","bottom","right"])}function Xm(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function ew(e){if(!e)return 0;let t=Number.parseInt(e.slice(0,2),16),n=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return t+n+r}function iw(e,t,n=true){if(e.state==="omitted")return t.state==="omitted"?mt:t;if(t.state==="omitted")return e;if(e.state==="none")return t.state==="none"?nu:t;if(t.state==="none")return e;let r=Xm(e),o=Xm(t);if(r>o)return e;if(o>r)return t;let a=QP[e.style],i=QP[t.style];if(a!==i)return a>i?e:t;let s=ew(e.color),l=ew(t.color);return s<l?e:l<s?t:n?e:t}function Zc(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function ZL(e,t,n){return n?t==="top"||t==="bottom"?e.insideH:e.insideV:e[t]}function JL(e,t){return e===void 0&&t===void 0?true:!e||!t?false:e.style===t.style&&e.color===t.color&&e.widthPt===t.widthPt}function Jc(e){if(e.length===0)return [];let t=[],n={...e[0]};for(let r=1;r<e.length;r+=1){let o=e[r];n.gridEnd===o.gridStart&&JL(n.edge,o.edge)?n={...n,gridEnd:o.gridEnd}:(t.push(n),n={...o});}return t.push(n),t}function Qc(e,t,n){let r=e.filter(a=>a.edge!==void 0);if(r.length!==1)return;let o=r[0];if(!(o.gridStart!==t||o.gridEnd!==n))return o.edge}function tw(e,t,n){let r=0,o=Math.min(n,e.length);for(let a=Math.max(0,t);a<o;a+=1)r+=e[a];return r}function QL(e){if(!(!e||e.style!=="double"))return ci(e.widthPt)}function eu(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function eB(e,t){return t?e==="outer"?t.insetPt:t.insetPt+t.strokePt+t.gapPt:0}function tB(e,t,n){return n?e==="outer"?t-n.insetPt:t-n.insetPt-n.strokePt-n.gapPt:t}function nB(e,t){return t?e==="outer"?t.insetPt+t.strokePt:t.insetPt+t.extentPt:0}function rB(e,t,n){return n?e==="outer"?t-n.insetPt-n.strokePt:t-n.insetPt-n.extentPt:t}function po(e,t){e.length>=nw||!(t.width>0)||!(t.height>0)||e.push(t);}function oB(e,t,n,r,o,a,i,s,l,d,c){let u=ci(n.widthPt),{strokePt:f,gapPt:m,extentPt:p,insetPt:g}=u,h=Math.abs(r)<1e-6,y=Math.abs(o-a)<1e-6,b=Math.abs(r)<1e-6,x=Math.abs(o-i)<1e-6;if(t==="top"||t==="bottom"){let I=t==="top"?g:i-g-f,F=t==="top"?g+f+m:i-g-p;for(let v of ["outer","inner"]){let w=r,k=o;h&&(w=eB(v,s)),y&&(k=tB(v,a,l)),po(e,{side:t,role:v,color:n.color,cssStyle:"solid",x:w,y:v==="outer"?I:F,width:k-w,height:f});}return}let T=t==="left"?g:a-g-f,S=t==="left"?g+f+m:a-g-p;for(let I of ["outer","inner"]){let F=r,v=o;b&&(F=nB(I,d)),x&&(v=rB(I,i,c)),po(e,{side:t,role:I,color:n.color,cssStyle:"solid",x:I==="outer"?T:S,y:F,width:f,height:v-F});}}function aB(e,t,n,r,o,a,i){let s=n.widthPt,l=Math.max(1,s),d=s*3+l*2;if(t==="top"||t==="bottom"){let u=t==="top"?0:i-d;for(let f=0;f<3;f+=1)po(e,{side:t,role:f===0?"outer":f===1?"middle":"inner",color:n.color,cssStyle:"solid",x:r,y:u+f*(s+l),width:o-r,height:s});return}let c=t==="left"?0:a-d;for(let u=0;u<3;u+=1)po(e,{side:t,role:u===0?"outer":u===1?"middle":"inner",color:n.color,cssStyle:"solid",x:c+u*(s+l),y:r,width:s,height:o-r});}function iB(e,t,n,r,o,a,i){let s=n.widthPt;t==="top"?po(e,{side:t,role:"edge",color:n.color,cssStyle:eu(n.style),x:r,y:0,width:o-r,height:s}):t==="bottom"?po(e,{side:t,role:"edge",color:n.color,cssStyle:eu(n.style),x:r,y:i-s,width:o-r,height:s}):t==="left"?po(e,{side:t,role:"edge",color:n.color,cssStyle:eu(n.style),x:0,y:r,width:s,height:o-r}):po(e,{side:t,role:"edge",color:n.color,cssStyle:eu(n.style),x:a-s,y:r,width:s,height:o-r});}function tu(e,t){if(e.length===0)return;let n=e[0];return QL(n.edge)}function sB(e,t,n,r,o,a,i,s,l,d){let c=(O,L,A)=>{let j=[];for(let W of L){if(!W.edge)continue;let R,C;A?(R=tw(i,s,W.gridStart),C=tw(i,s,W.gridEnd)):(R=l[W.gridStart-d]??0,C=l[W.gridEnd-d]??a),j.push({side:O,gridStart:W.gridStart,gridEnd:W.gridEnd,startPt:R,endPt:C,edge:W.edge});}return j},u=c("top",e,true),f=c("left",t,false),m=c("bottom",n,true),p=c("right",r,false),g=[...u,...p,...m,...f],h=tu(t),y=tu(r),b=tu(e),x=tu(n),T=(O,L)=>O.length===1&&Math.abs(O[0].startPt)<1e-6&&Math.abs(O[0].endPt-L)<1e-6,S=T(u,o),I=T(f,a),F=T(m,o),v=T(p,a),w=[],k=(O,L,A)=>{for(let j of L){let{edge:W,startPt:R,endPt:C}=j;W.style==="double"?oB(w,O,W,R,C,o,a,O==="top"||O==="bottom"?h:void 0,O==="top"||O==="bottom"?y:void 0,O==="left"||O==="right"?b:void 0,O==="left"||O==="right"?x:void 0):W.style==="triple"?aB(w,O,W,R,C,o,a):A||iB(w,O,W,R,C,o,a);}};k("top",u,S),k("left",f,I),k("bottom",m,F),k("right",p,v);let P={};return S&&u[0]&&(P.top=u[0].edge),I&&f[0]&&(P.left=f[0].edge),F&&m[0]&&(P.bottom=m[0].edge),v&&p[0]&&(P.right=p[0].edge),g.length>0&&(P.edgeSegments=g),w.length>0&&(P.strokes=w),P}function el(e,t,n,r,o,a){let i=e.length,s=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let l=JP(e,n,o,a),d=(u,f,m)=>qc(u.borders[f],ZL(t,f,m),{}),c=(u,f,m,p)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?nu:iw(m,p);for(let u=0;u<i;u+=1){let f=e[u];for(let m=0;m<f.length;m+=1){let p=f[m];if(p.vMergeContinue){s[u][m]={};continue}let g=p.mergeRowSpan??1,h=u+g-1,y=u===0,b=h===i-1,x=p.gridColumn===0,T=p.gridColumn+p.gridSpan-1,S=T>=n-1,I=[];if(y)for(let R=p.gridColumn;R<=T;R+=1)I.push({gridStart:R,gridEnd:R+1,edge:Zc(d(p,"top",false))});let F=[];if(x)for(let R=u;R<=h;R+=1)F.push({gridStart:R,gridEnd:R+1,edge:Zc(d(p,"left",false))});let v=[];for(let R=p.gridColumn;R<=T;R+=1){let C;if(b)C=d(p,"bottom",false);else {let M=Km(l,h+1,R,o);M?.cell.vMergeContinue?C=mt:C=c(p.borders.bottom,M?M.cell.borders.top:mt,d(p,"bottom",true),M?d(M.cell,"top",true):t.insideH);}v.push({gridStart:R,gridEnd:R+1,edge:Zc(C)});}let w=[];for(let R=u;R<=h;R+=1){let C;if(S)C=d(p,"right",false);else {let M=Km(l,R,T+1,o);C=c(p.borders.right,M?M.cell.borders.left:mt,d(p,"right",true),M?d(M.cell,"left",true):t.insideV);}w.push({gridStart:R,gridEnd:R+1,edge:Zc(C)});}let k=Jc(I),P=Jc(F),O=Jc(v),L=Jc(w);if(!r){let R={},C=Qc(k,p.gridColumn,T+1),M=Qc(P,u,h+1),N=Qc(O,p.gridColumn,T+1),D=Qc(L,u,h+1);C&&(R.top=C),M&&(R.left=M),N&&(R.bottom=N),D&&(R.right=D);let _=[],K=(H,z)=>{for(let $ of z)$.edge&&_.push({side:H,gridStart:$.gridStart,gridEnd:$.gridEnd,startPt:$.gridStart,endPt:$.gridEnd,edge:$.edge});};K("top",k),K("left",P),K("bottom",O),K("right",L),_.length>0&&(R.edgeSegments=_),s[u][m]=R;continue}let A=r.cellBoxes[u][m],j=[0],W=0;for(let R=u;R<=h;R+=1){let C=r.rowBands[R];W+=C.height,j.push(W);}j.length>1&&(j[j.length-1]=A.height),s[u][m]=sB(k,P,O,L,A.width,A.height,r.columnWidthsPt,p.gridColumn,j,u);}}return s}function rr(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var Um=rw,Ym=ow;var lw=31680/20,Bn=Object.freeze({type:"auto",value:0}),lB=100,dB=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function cB(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Zm(e,t){return e.attributes.find(n=>n.localName===t)?.value}function dw(e){if(/^\d{1,9}$/.test(e)){let r=Number(e)/20;return Number.isFinite(r)?{kind:"length",pt:r}:null}let t=/^(\d{1,7}(?:\.\d{1,4})?)%$/.exec(e);if(t){let r=Number(t[1]);return Number.isFinite(r)?{kind:"percent",percent:r}:null}let n=/^(\d{1,9}(?:\.\d{1,4})?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(n){let r=Number(n[1])*dB[n[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function ca(e){if(!e)return Bn;let t=Zm(e,"type");if(t!==void 0&&t!=="pct"&&t!=="dxa")return t==="nil"?{type:"nil",value:0}:Bn;let n=Zm(e,"w");if(n===void 0)return Bn;let r=dw(n);if(!r)return Bn;let o=/^\d{1,9}$/.test(n);if(r.kind==="percent"||o&&t==="pct"){let a=r.kind==="percent"?r.percent:Number(n)/50;return !Number.isFinite(a)||a<=0?Bn:{type:"pct",value:Math.min(a,lB)}}return !Number.isFinite(r.pt)||r.pt<=0?Bn:{type:"dxa",value:Math.min(r.pt,lw)}}function tl(e,t){if(!e)return;let n=ca(e);if(n.type==="dxa")return Math.min(n.value,t)}function cw(e){let t=cB(e,"tblGrid");if(!t)return [];let n=[];for(let r of t.children)if(r.kind!=="textValue"&&r.localName==="gridCol"&&(n.push(r),n.length>=1024))break;return n}function uB(e){let t=[];for(let n of e){let r=Zm(n,"w"),o=r===void 0?null:dw(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){t.push(void 0);continue}t.push(o.pt>lw?void 0:o.pt);}return t}var qm=1,sw=.001;function fB(e,t,n,r){let o=[];for(let i=0;i<n;i+=1)o.push(e[i]);let a=t.filter(i=>i.start<n&&(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,n);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 m=o[f];m===void 0?d.push(f):c-=m;}if(d.length===0||c<=0)continue;let u=c/d.length;for(let f of d)o[f]=u;}return o}function uw(e){let{columnCount:t,tableWidth:n}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:qm,a=n.type==="dxa"?n.value:n.type==="pct"?o*n.value/100:0,i=uB(e.gridCols),s=fB(i,e.claims,t,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(t-d,1):o/t,b=Math.max(o-l,0)/d,x=Math.max(Math.min(b,y),qm);for(let T of s)c.push(T??x);}else for(let y of s)c.push(y);let u=c.reduce((y,b)=>y+b,0);if(!Number.isFinite(u)||u<=0)return new Array(t).fill(o/t);let f=t*qm,m=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,p=Math.max(a>0?Math.min(a,m):Math.min(u,m),f),g=n.type==="pct"&&a>0;if(u<=p+sw&&!g||Math.abs(u-p)<=sw)return c;let h=p/u;return c.map(y=>y*h)}function Ei(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function pB(e,t){return e.attributes.find(n=>n.localName===t)?.value}var pw=3,fw=108/20,nl=31680/20,Jm={top:0,right:fw,bottom:0,left:fw};function iu(e){if(!e)return;let t=pB(e,"w");if(t===void 0||!/^\d{1,9}$/.test(t))return;let n=Number(t);if(!Number.isFinite(n)||n<0)return;let r=n/20;return r>nl?nl:r}function su(e){if(!e)return {};let t=iu(Ei(e,"top")),n=iu(Ei(e,"left")??Ei(e,"start")),r=iu(Ei(e,"bottom")),o=iu(Ei(e,"right")??Ei(e,"end"));return {...t===void 0?{}:{top:t},...n===void 0?{}:{left:n},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function lu(e,t){return {top:t.top??e.top,right:t.right??e.right,bottom:t.bottom??e.bottom,left:t.left??e.left}}function gw(e){let t=e?.children.find(r=>r.kind!=="textValue"&&r.localName==="textDirection");return !t||t.kind==="textValue"?"horizontal":t?.attributes.find(r=>r.localName==="val")?.value==="btLr"?"btLr":"horizontal"}function hw(e,t){let n=t;for(let r of e){if(r.kind==="table"){n=Math.max(n,r.box.x+r.box.width);continue}for(let o of r.lines){n=Math.max(n,o.contentX);for(let a of o.spans)n=Math.max(n,a.box.x+a.box.width);for(let a of o.drawings??[])n=Math.max(n,a.advanceEnd);}}return n}function yw(e,t){return {x:t.x+t.height-(e.y-t.y),y:t.y+(e.x-t.x)}}var mw=new WeakMap,bw=new WeakSet;function mB(e){let t=mw.get(e);if(t)return t;let n=new Map,r=(o,a)=>{for(let i of o)if(i.kind==="table")for(let s of i.rows)for(let l of s.cells)if(l.textDirection==="btLr")for(let d of It(l.blocks)){let c=n.get(d.paragraphId)??[];c.push({pageIndex:a,cell:l}),n.set(d.paragraphId,c);}else r(l.blocks,a);};for(let o of e.pages){r(o.fragments,o.index),o.header&&r(o.header.fragments,o.index),o.footer&&r(o.footer.fragments,o.index);for(let a of [o.footnotes,o.endnotes])if(a){a.separator&&r(a.separator.fragments,o.index);for(let i of a.notes)r(i.fragments,o.index);}}return mw.set(e,n),n}function xw(e,t,n){let r=mB(e).get(n)??[];return r.find(o=>o.pageIndex===t)??r[0]}function Mi(e,t){let n=xw(e,t.pageIndex,t.position.paragraphId);if(!n)return t;let r=gB(t,n.cell.box),o={...t,...r};return bw.add(o),o}function bK(e){return bw.has(e)}function Qm(e,t,n){let r=xw(e,n.pageIndex,t);if(!r)return n;let o=r.cell.box;return {...n,x:o.x+(n.y-o.y),y:o.y+o.height-(n.x-o.x)-n.width,width:n.height,height:n.width}}function gB(e,t){return {x:t.x+(e.y-t.y),y:t.y+t.height-(e.x-t.x)}}function Sw(e){let t;for(let r of e?.children??[])if(r.kind!=="textValue"&&r.localName==="vAlign"){t=r;break}let n=t?.attributes.find(r=>r.localName==="val")?.value;return n==="center"?"center":n==="bottom"?"bottom":"top"}function Rw(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da$1&&n.localName===t)return n}}function eg(e){let t=Rw(e,"tblHeader");if(!t)return;let n=t.attributes.find(r=>r.namespaceUri===da$1&&r.localName==="val")?.value;return n===void 0||n!=="0"&&n!=="false"&&n!=="off"}function Pw(e,t,n){let r=false;for(let o of e.tableRowPropertyNodes)r=eg(o)??r;for(let o of t)r=eg(Rw(e.conditional.get(o),"trPr"))??r;return eg(n)??r}function hB(e){if(e.namespaceUri!==da$1)return false;let t=new Set;for(let n of e.children){if(n.kind==="textValue")continue;let r=n.localName==="start"?"left":n.localName==="end"?"right":n.localName;if(n.namespaceUri!==da$1||!["top","left","bottom","right"].includes(r)||t.has(r))return false;t.add(r);let o=n.attributes.filter(i=>i.localName==="w"),a=n.attributes.filter(i=>i.localName==="type");if(o.length!==1||o[0].namespaceUri!==da$1||!/^\d{1,9}$/.test(o[0].value)||Number(o[0].value)>31680||a.length>1||a.length===1&&(a[0].namespaceUri!==da$1||a[0].value!=="dxa"))return false}return true}function ww(e,t){let n=[e,...t];for(;n.length>0;){let r=n.pop();for(let o of r.children)if(!(o.kind==="textValue"||o.kind==="paragraph"||o.kind==="table"))if(o.localName==="tblCellMar"||o.localName==="tcMar"){if(!hB(o))return false}else n.push(o);}return true}var tg=31680/20,vw=.001;function Tw(e,t,n){let r=n/1e4+.025;return e.map(o=>{if(o.span!==1||o.preferred.type!=="pct")return o;let a=o.preferred.value*50;if(Math.abs(a-Math.round(a))>1e-8)return o;let i=or(t[o.start],"w");if(i===void 0||!/^\d{1,9}$/.test(i))return o;let s=Number(i)/20,l=n*o.preferred.value/100-s;return l>0&&l<=r+vw?{...o,preferred:{type:"dxa",value:s}}:o})}function rl(e,t){let n;for(let r of e.children)if(!(r.kind==="textValue"||r.localName!==t)){if(n||r.namespaceUri!==da$1)return;n=r;}return n}function or(e,t){let n=e?.attributes.filter(r=>r.localName===t);return n?.length===1&&n[0].namespaceUri===da$1?n[0].value:void 0}function Fw(e){let{compatibilityMode:t,contentWidthPt:n,table:r,rows:o,columnCount:a}=e;if(t!==11&&t!==12&&t!==14||e.depth!==0||e.floating||e.layoutFixed||e.alignment!=="left"||e.indentPt!==0||e.cellSpacingPt!==0||e.tableWidth.type!=="pct"||e.tableWidth.value!==100||!Number.isFinite(n)||n<=0||n>tg||a<1||a>1024)return;let i=rl(r,"tblPr");if(!i)return;let s=rl(i,"tblW"),l=rl(i,"tblInd"),d=or(s,"w");if(or(s,"type")!=="pct"||d!=="5000"&&d!=="100%"||or(l,"type")!=="dxa"||or(l,"w")!=="0"||or(rl(i,"tblLayout"),"type")!=="autofit")return;for(let b of [...e.propertyNodes,i])for(let x of b.children)if(x.kind!=="textValue"&&(["jc","tblCellSpacing"].includes(x.localName)&&x.namespaceUri!==da$1||x.localName==="tblpPr"||x.localName==="bidiVisual"||x.localName==="jc"&&!["left","start"].includes(or(x,"val")??"")||x.localName==="tblCellSpacing"&&(or(x,"type")!=="dxa"||or(x,"w")!=="0")))return;let c=o[0]?.cells[0],u=o[0]?.cells.at(-1);if(!c||!u||!ww(r,e.propertyNodes))return;let f=c.margins.left,m=u.margins.right,p=n+f+m;if(!Number.isFinite(p)||f<0||m<0||f+m<=0||p>tg)return;for(let b of o){let x=b.cells[0],T=b.cells.at(-1);if(!x||!T||x.gridColumn!==0||T.gridColumn+T.gridSpan!==a||x.margins.left!==f||T.margins.right!==m)return}let g=rl(r,"tblGrid");if(!g)return;let h=0,y=0;for(let b of g.children){if(b.kind==="textValue")continue;if(b.localName!=="gridCol"||b.namespaceUri!==da$1)return;let x=or(b,"w");if(x===void 0||!/^\d{1,9}$/.test(x))return;let T=Number(x)/20;if(T<1||T>tg||++h>1024)return;y+=T;}return h===a&&Math.abs(y-p)<vw?p:void 0}function Li(e,t){if(e.legacyContentAlignment)return -(e.rows[0]?.cells[0]?.margins.left??0);let n=e.columnWidthsPt.reduce((o,a)=>o+a,0),r=t-n;return !Number.isFinite(r)||r<=0?0:e.alignment==="center"?r/2:e.alignment==="right"?r:Math.min(e.indentPt,r)}function ua(e,t,n){let r=n[e.horzAnchor],o=r.width-t,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=n.page.left+n.page.width;return Math.max(n.page.left,Math.min(a,i))}var cu=16,Nw=31680/20,Iw=1023,yB=256,kw=31680/20;function Ow(e){let t=e&&Ge(e,"jc");if(!t)return;let n=Qt(t,"val");if(n==="center")return "center";if(n==="right"||n==="end")return "right";if(n==="left"||n==="start")return "left"}function Ge(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Qt(e,t){return e.attributes.find(n=>n.localName===t)?.value}function ng(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da$1&&n.localName===t)return n}function du(e,t){return e.attributes.find(n=>n.namespaceUri===da$1&&n.localName===t)?.value}function bB(e){let t=e&&Ge(e,"gridSpan"),n=t&&Qt(t,"val");if(!n||!/^\d{1,7}$/.test(n))return 1;let r=Number(n);return Number.isInteger(r)&&r>1?Math.min(r,1024):1}function Cw(e,t){let n=e&&Ge(e,t),r=n&&Qt(n,"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 xB(e){let t=e&&Ge(e,"vMerge");return t?Qt(t,"val")!=="restart":false}function Ew(e){return _f(e&&Ge(e,"shd"))}function SB(e,t){let n=e&&Ge(e,t);if(!n)return false;let r=Qt(n,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var ol=Object.freeze({rule:"auto"});function RB(e){let t=e&&Ge(e,"trHeight");if(!t)return ol;let n=Qt(t,"hRule"),r=n==="auto"||n==="exact"||n==="atLeast"?n:void 0;if(r==="auto")return ol;let o=Qt(t,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return ol;let a=Number(o);if(!Number.isFinite(a)||a<=0)return ol;let i=Math.min(a/20,Nw);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:ol}var PB=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function Er(e,t){let n=Qt(e,t);if(n!==void 0)return n!=="0"&&n!=="false"&&n!=="off"}function wB(e){let t=e&&Ge(e,"tblLook");if(!t)return PB;let n=Qt(t,"val"),r=n&&/^[0-9A-Fa-f]{1,4}$/.test(n)?Number.parseInt(n,16):0;return {firstRow:Er(t,"firstRow")??(r&32)!==0,lastRow:Er(t,"lastRow")??(r&64)!==0,firstColumn:Er(t,"firstColumn")??(r&128)!==0,lastColumn:Er(t,"lastColumn")??(r&256)!==0,rowBanding:Er(t,"noHBand")===void 0?(r&512)===0:!Er(t,"noHBand"),columnBanding:Er(t,"noVBand")===void 0?(r&1024)===0:!Er(t,"noVBand")}}var rg=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],Mw=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function Lw(e,t){let n=e&&Ge(e,"cnfStyle");if(!n)return;let r=Qt(n,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<rg.length;o+=1)r[o]==="1"&&t.add(rg[o]);for(let o=0;o<Mw.length;o+=1)Er(n,Mw[o])===true&&t.add(rg[o]);}var vB=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function Bw(e){let t=new Set;Lw(e.rowProperties,t),Lw(e.cellProperties,t);let{look:n,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:s}=e,l=t.has("firstRow")||n.firstRow&&r===0,d=t.has("lastRow")||n.lastRow&&r===o-1,c=t.has("firstCol")||n.firstColumn&&a===0,u=t.has("lastCol")||n.lastColumn&&a+i>=s;if(!(t.has("band1Vert")||t.has("band2Vert"))&&n.columnBanding&&!c&&!u){let g=a-(n.firstColumn?1:0);t.add(g%2===0?"band1Vert":"band2Vert");}if(!(t.has("band1Horz")||t.has("band2Horz"))&&n.rowBanding&&!l&&!d){let g=r-(n.firstRow?1:0);t.add(g%2===0?"band1Horz":"band2Horz");}c&&t.add("firstCol"),u&&t.add("lastCol"),l&&t.add("firstRow"),d&&t.add("lastRow"),l&&c&&t.add("nwCell"),l&&u&&t.add("neCell"),d&&c&&t.add("swCell"),d&&u&&t.add("seCell");let p=[];for(let g of vB)t.has(g)&&p.push(g);return p}var TB=new WeakMap,FB=new WeakMap;function Lt(e,t,n,r,o="all-markup",a,i){let s=a?FB:TB,l=s.get(e);if(l&&l.contentWidthPt===t&&l.depth===n&&l.styleCascade===r&&l.displayMode===o&&l.authorFilter===a&&l.compatibilityMode===i)return l.structure;let d=IB(e,t,n,r,o,a,i),c={contentWidthPt:t,depth:n,styleCascade:r,displayMode:o,authorFilter:a,compatibilityMode:i,structure:d};return s.set(e,c),d}function IB(e,t,n,r,o,a,i){if(n>=cu||e.kind!=="table")return null;let s=Ge(e,"tblPr"),l=s&&Ge(s,"tblStyle")?Qt(Ge(s,"tblStyle"),"val"):void 0,d=r?bR(r,l):Ic,c=wB(s),u=Jm,f=Um;for(let H of d.tablePropertyNodes)u=lu(u,su(Ge(H,"tblCellMar"))),f=Gm(f,ou(H));let m=lu(u,su(s&&Ge(s,"tblCellMar"))),p=Gm(f,s?ou(s):Um),g=new Map,h=xR(d),y=H=>{if(!h)return pm;let z=H.join("|"),$=g.get(z);if($)return $;let U=SR(d,H);return g.size<yB&&g.set(z,U),U},b=[],x=[],T=1;for(let H of Cc$1(e.children)){if(H.kind!=="tableRow")continue;let z=ng(H,"trPr"),$=z?ng(z,"ins")??ng(z,"del"):void 0,U=$?.localName,ie=$?du($,"author")??"":void 0,Z=$&&ie!==void 0&&a?kx(a,$.id,ie,o):o;if(Z==="proposed"&&U==="del"||Z==="original"&&U==="ins")continue;let X=Z==="all-markup"?$:void 0,Q=[],pe=[],ue=[],Ie=Math.min(Cw(z,"gridBefore"),Iw);Ie>0&&x.push({start:0,span:Ie,preferred:ca(z&&Ge(z,"wBefore"))});let me=Ie,Pe=Cc$1(H.children);for(let we of Pe){if(we.kind!=="tableCell")continue;let ye=Ge(we,"tcPr"),_e=Math.min(me,Iw),Ce=Math.min(bB(ye),1024-_e),Be=ca(ye&&Ge(ye,"tcW"));Q.push(_e),pe.push(Ce),ue.push(Be),x.push({start:_e,span:Ce,preferred:Be}),me=_e+Ce;}let ce=Cw(z,"gridAfter"),re=Math.min(me+ce,1024);ce>0&&me<1024&&x.push({start:me,span:Math.min(ce,1024-me),preferred:ca(z&&Ge(z,"wAfter"))}),re>T&&(T=re),b.push({node:H,revision:X,cells:Pe,properties:z,starts:Q,spans:pe,preferred:ue,gridColumns:re});}let S=cw(e),I=S.length>0?S.length:T,F=b.length,v=[];for(let H=0;H<b.length;H+=1){let z=b[H],$=z.node,U=z.properties,ie=Bw({look:c,rowIndex:H,rowCount:F,gridColumn:0,gridSpan:Math.max(1,I),columnCount:Math.max(1,I),rowProperties:U,cellProperties:void 0}),Z=Pw(d,ie,U),X=0,Q=[];for(let ce of z.cells){if(ce.kind!=="tableCell")continue;let re=Ge(ce,"tcPr"),we=z.starts[X],ye=z.spans[X],_e=z.preferred[X]??Bn,Ce=Bw({look:c,rowIndex:H,rowCount:F,gridColumn:we,gridSpan:ye,columnCount:I,rowProperties:U,cellProperties:re});X+=1;let Be,Se=Ym;for(let An of Ce){let mn=d.conditional.get(An);if(!mn)continue;let We=Ge(mn,"tcPr");Be=Ew(We)??Be,Se=Vm(Se,au(We));}let xe=Ew(re)??Be,Ht=lu(m,su(re&&Ge(re,"tcMar"))),en=Is(ce.children,o,a);Q.push({id:ce.id,gridSpan:ye,gridColumn:we,...S[we]?.id?{gridColumnId:S[we].id}:{},vMergeContinue:xB(re),vAlign:Sw(re),textDirection:gw(re),margins:Ht,borders:Vm(Se,re?au(re):Ym),...xe===void 0?{}:{shading:xe},preferredWidth:_e,styleFormatting:y(Ce),blocks:en});}let pe=z.revision,ue=pe?pe.localName==="ins"?"insert":"delete":void 0,Ie=pe&&du(pe,"id"),me=pe&&du(pe,"author"),Pe=pe&&du(pe,"date");v.push({id:$.id,...ue?{revisionKind:ue}:{},...Ie!==void 0?{revisionId:Ie}:{},...me!==void 0?{revisionAuthor:me}:{},...Pe!==void 0?{revisionDate:Pe}:{},isHeader:Z,cantSplit:SB(U,"cantSplit"),height:RB(U),cells:Q});}let w=Bn,k,P,O,L,A;for(let H of d.tablePropertyNodes){let z=Ge(H,"tblW");z&&(w=ca(z));let $=Ge(H,"tblLayout");$&&(k=Qt($,"type")==="fixed"),P=tl(Ge(H,"tblInd"),kw)??P,O=Ow(H)??O,L=tl(Ge(H,"tblCellSpacing"),nl)??L,A=Wm(H)??A;}let j=s&&Ge(s,"tblW"),W=j?ca(j):w,R=s&&Ge(s,"tblLayout"),C=R?Qt(R,"type")==="fixed":k??false,M=tl(s&&Ge(s,"tblInd"),kw)??P??0,N=Ow(s)??O??"left",D=n===0?Wm(s)??A:void 0,_=tl(s&&Ge(s,"tblCellSpacing"),nl)??L??0,K=Fw({table:e,propertyNodes:d.tablePropertyNodes,rows:v,columnCount:I,contentWidthPt:t,compatibilityMode:i,depth:n,tableWidth:W,layoutFixed:C,alignment:N,indentPt:M,cellSpacingPt:_,floating:D!==void 0});return {columnWidthsPt:uw({gridCols:S,claims:K===void 0?x:Tw(x,S,K),columnCount:I,contentWidthPt:K??t,tableWidth:W,layoutFixed:C}),rows:K===void 0?v:v.map(H=>({...H,cells:H.cells.map(z=>({...z,legacyContentAlignment:true}))})),...K===void 0?{}:{legacyContentAlignment:true},tableWidth:W,layoutFixed:C,indentPt:M,alignment:N,...D?{float:D}:{},cellSpacingPt:_,tableBorders:p,defaultMargins:m}}function uu(e,t,n,r=0){if(!e||!e.markerText||!n)return;let o=t.measure(e.markerText,e.markerStyle),a=Mc(e,o,n.y,n.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,...e.ordinal===void 0?{}:{ordinal:e.ordinal}}}function ar(e,t){if(!t)return e;let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return a<=r||(e.width===0?o<n:o<=n)?null:{...e,x:n,y:r,width:o-n,height:a-r}}var cg=8;function sg(e,t){return t?{...t,caret:Mi(e,t.caret)}:null}var Aw=new WeakMap;function pu(e){let t=Aw.get(e);if(t)return t;let n=[],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 m of f.lines)o.set(m.range.paragraphId,m.id);continue}for(let m of f.rows){if(!m.isHeaderRepeat&&!r.has(m.id)){let p=a.get(f.tableId)??0;r.set(m.id,p),a.set(f.tableId,p+1);}for(let p of m.cells){if(!m.isHeaderRepeat&&!u){let g=`${f.tableId}|${p.gridColumn}`;if(p.blocks.length===0){let h=s.get(g);h&&i.set(p,h);}else s.set(g,{row:m,cell:p});}l(p.blocks,u||m.isHeaderRepeat);}}}};for(let c of e.pages)n.push(c.box.y),l(c.fragments,false);let d={pageTops:n,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return Aw.set(e,d),d}function sl(e,t){let n=pu(e).pageTops;if(n.length===0)return -1;let r=0,o=n.length-1,a=0;for(;r<=o;){let i=r+o>>1;n[i]<=t?(a=i,r=i+1):o=i-1;}return a}function kB(e,t){let n=e.pages[sl(e,t.y)];if(!n)return false;for(let r of [n.header,n.footer])if(r&&Bi(r.box,t))return true;return false}function lg(e,t,n,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||!al(a,t))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:n},pageIndex:n,lineId:"",cell:null,contentControlId:null,onGlyphs:true,drawing:Object.freeze({drawingNodeId:a.drawingNodeId,paragraphId:a.anchorParagraphId,start:a.start})}}return null}function mu(e,t,n,r={}){let o=e.pages[t];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??cg,measurer:r.measurer},i=Dw(e,o.index,n),s=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),l=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=lg(s,n,a.pageIndex);if(d)return {...d,contentControlId:i};let c=sg(e,fu(o.fragments,n,a,null));if(c?.onGlyphs)return {...c,contentControlId:i};let u=lg(l,n,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 m of [t-f,t+f]){let p=e.pages[m];if(!p)continue;let g=sg(e,fu(p.fragments,n,{...a,pageIndex:p.index},null));if(g)return {...g,contentControlId:Dw(e,p.index,n)}}return null}function i$(e,t,n,r,o={}){let a=e.pages[t];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??cg,measurer:o.measurer};return sg(e,fu(n,r,i,null))}function OB(e,t,n={}){let r=e.pages[sl(e,t.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:t.x-o.box.x,y:t.y-o.box.y}),i=lg(o.anchoredDrawings,a,r.index);if(i)return i}return mu(e,r.index,{x:t.x-r.contentBox.x,y:t.y-r.contentBox.y},n)}function Bi(e,t){return t.x>=e.x&&t.x<e.x+e.width&&t.y>=e.y&&t.y<e.y+e.height}function gu(e,t,n){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===t&&Bi(i.box,n)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function Dw(e,t,n){return gu(e,t,n)?.id??null}function dg(e,t,n){let r=Math.max(e.x-t.x,0,t.x-(e.x+e.width)),o=Math.max(e.y-t.y,0,t.y-(e.y+e.height));return r+o*n}function CB(e,t,n){return e.kind!=="table"||Math.max(e.box.y-t.y,0,t.y-(e.box.y+e.box.height))>0?dg(e.box,t,n):0}function fu(e,t,n,r){if(e.length===0)return null;if(e.some(i=>i.kind==="paragraph"&&i.outOfFlow&&Bi(i.box,t)))for(let i=e.length-1;i>=0;i-=1){let s=e[i];if(!Bi(s.box,t))continue;let l=og(s,t,n,r);if(l)return l}let o=null;for(let i of e){if(!Bi(i.box,t))continue;o=i;let s=og(i,t,n,r);if(s)return s;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:CB(i,t,n.verticalWeight)})).sort((i,s)=>i.score-s.score);for(let{block:i}of a){let s=og(i,t,n,r);if(s)return s}return null}function og(e,t,n,r){return e.kind==="paragraph"?EB(e,t,n,r,Bi(e.box,t)):jB(e,t,n)}function EB(e,t,n,r,o){if(e.clipToBox&&!o)return null;let a=MB(e.lines,t.y);if(!a)return null;let i=AB(a,t.x,t.y,n),s=BB(a,t.x),l=Math.min(Math.max(i.offset,s.start),s.end),d={paragraphId:s.paragraphId,offset:l},c=ll(a,l,n.measurer,s),u=ar({...c,x:i.x,width:0},e.clipToBox?e.box:void 0);return u?{position:d,caret:{position:d,x:u.x,y:u.y,height:u.height,lineId:a.id,pageIndex:n.pageIndex},pageIndex:n.pageIndex,lineId:a.id,cell:r,onGlyphs:o&&i.withinSpan&&t.y>=a.box.y&&t.y<a.box.y+a.box.height,contentControlId:null,drawing:i.drawing&&i.withinSpan?LB(i.drawing):null}:null}function MB(e,t){if(e.length===0)return null;for(let o of e)if(t>=o.box.y&&t<o.box.y+o.box.height)return o;let n=e[0],r=Number.POSITIVE_INFINITY;for(let o of e){let a=t<o.box.y?o.box.y-t:t-(o.box.y+o.box.height);a<r&&(r=a,n=o);}return n}function LB(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function BB(e,t){let n=qe(e),r=n[0];for(let o of n){let a=o.spans[0];if(a===void 0)continue;let i=o.spans[o.spans.length-1];if(t>=a.box.x&&(r=o),t<i.box.x+i.box.width)break}return r}function NB(e,t,n){for(let r of n??e.drawings??[])if(r.start===t||r.start+1===t)return r;return null}function al(e,t){let n=e.hitBounds;return t.x<n.x||t.x>=n.x+n.width||t.y<n.y||t.y>=n.y+n.height?false:Up(t.x,t.y,e.geometry)}function AB(e,t,n,r){let o=e.spans;for(let l of e.drawings??[])if(al(l,{x:t,y:n}))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(t<=l.advanceStart)return {offset:e.range.start,x:l.advanceStart,withinSpan:false,drawing:l};let d=e.drawings[e.drawings.length-1];if(t>=d.advanceEnd)return ag(e,d.advanceEnd,r);for(let c of e.drawings??[])if(t>=c.advanceStart&&t<c.advanceEnd){let u=t>=c.x+c.width/2;return {offset:u?c.start+1:c.start,x:u?c.advanceEnd:c.advanceStart,withinSpan:al(c,{x:t,y:n}),drawing:c}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=o[0];if(t<=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(t>=s)return ag(e,s,r);for(let l of o)if(t>=l.box.x&&t<l.box.x+l.box.width)return DB(l,t,r);for(let l=0;l<o.length;l+=1){let d=o[l];for(let c of e.drawings??[]){if(t>=c.advanceStart&&t<c.advanceEnd){let u=al(c,{x:t,y:n}),f=t>=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(al(c,{x:t,y:n}))return {offset:c.start,x:c.hitBounds.x,withinSpan:true,drawing:c};if(t<d.box.x&&t>=c.hitBounds.x+c.hitBounds.width)return {offset:c.start+1,x:c.hitBounds.x+c.hitBounds.width,withinSpan:false,drawing:c};if(t<c.hitBounds.x&&t>=(o[l-1]?.box.x??e.contentX))return {offset:c.start,x:c.hitBounds.x,withinSpan:false,drawing:c}}}if(t<d.box.x){let c=o[l-1],u=c.box.x+c.box.width;return t-u<=d.box.x-t?{offset:c.range.end,x:u,withinSpan:false}:{offset:d.range.start,x:d.box.x,withinSpan:false}}}return ag(e,s,r)}function ag(e,t,n){let r=Gw(n.layout,e);if(r===e.range.end)return {offset:r,x:t,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=n.measurer?il(a,i,n.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:t,withinSpan:false}}function Gw(e,t){let n=t.range.end;if(n>t.range.start&&ig(t,n-1)===Sd$1)return n-1;if(pu(e).lastLineIdOfParagraph.get(t.range.paragraphId)===t.id)return n;let r=n;for(r>t.range.start&&ig(t,r-1)===`
17
- `&&(r-=1);r>t.range.start&&ig(t,r-1)===" ";)r-=1;return r}function ig(e,t){for(let n of e.spans)if(!(t<n.range.start||t>=n.range.end))return n.text.length!==n.range.end-n.range.start?null:n.text[t-n.range.start]??null;return null}var _w=new WeakMap,jw=new WeakMap;function Hw(e){let t=ys(),n=_w.get(e);if(n&&n.epoch===t)return n.boundaries;let r=[0];for(let o of Ye(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),_w.set(e,{epoch:t,boundaries:r}),r}function il(e,t,n){let r=e.caretEdges;if(r&&t>=0&&t<r.length)return r[t];let o=jw.get(n);o||(o=new WeakMap,jw.set(n,o));let a=o.get(e);a||(a=new Map,o.set(e,a));let i=a.get(t);if(i!==void 0)return i;let s=t<=0?0:Gt(e.text.slice(0,t),ut(e.style,e.fontSlot),n),l=e.lineEndWhitespace?Math.min(s,e.box.width):s;return a.set(t,l),l}function ug(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function hu(e,t,n){let r=e.range.end-e.range.start;if(r<=0)return e.box.x;let o=Math.max(0,Math.min(t-e.range.start,r)),a=e.caretEdges;return a&&o<a.length?e.box.x+a[o]:!n||ug(e)?e.box.x+e.box.width*(o/r):e.box.x+il(e,o,n)}function ll(e,t,n,r){let o=NB(e,t,r?.drawings);if(o)return {x:t>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(t>c.range.start&&t<c.range.end){i=c;break}if(t===c.range.end){let u=a[d+1];if(u&&u.range.start===t&&ug(c)){i=u;break}if(u&&u.range.start===t){let f=kt(kn(c.text)??0)||kt(u.text.codePointAt(0)??0),m=u.box.x-(c.box.x+c.box.width)-(u.wrapAdvanceBefore??0);if(c.text.endsWith(" ")&&m>.25||f&&m>.001){i=u;break}}i=c;}else t>c.range.end&&(i=c);}let s=hu(i,t,n),l=n?.lineMetrics(ut(i.style,i.fontSlot));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-Hf(i.style),height:l.height}}function DB(e,t,n){let r=t-e.box.x,o=e.range.end-e.range.start;if(o<=0||ug(e)){let m=r>e.box.width/2;return {offset:m?e.range.end:e.range.start,x:m?e.box.x+e.box.width:e.box.x,withinSpan:true}}if(!n.measurer){let m=Math.max(0,Math.min(1,r/Math.max(e.box.width,Number.EPSILON))),p=Math.round(m*o),g=Hw(e),h=g[0],y=Number.POSITIVE_INFINITY;for(let b of g){let x=Math.abs(b-p);x<y&&(y=x,h=b);}return {offset:e.range.start+h,x:e.box.x+e.box.width*(h/o),withinSpan:true}}let a=Hw(e),i=1,s=a.length-1;for(;i<s;){let m=i+s>>1;il(e,a[m],n.measurer)<r?i=m+1:s=m;}let l=a[i],d=a[i-1],c=il(e,l,n.measurer),u=il(e,d,n.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:l),x:e.box.x+(f?u:c),withinSpan:true}}function zw(e,t,n,r){if(e.length===0)return null;for(let i of e){let s=n(i);if(t>=s&&t<s+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let s=n(i),l=t<s?s-t:t-(s+r(i));l<a&&(a=l,o=i);}return o}function _B(e,t,n,r){return {tableId:t.tableId,rowId:n.id,cellId:r.id,rowIndex:pu(e).rowIndexById.get(n.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function jB(e,t,n,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],s=zw(a,t.y,d=>d.box.y,d=>d.box.height);if(s){let d=zw(s.cells,t.x,c=>c.box.x,c=>c.box.width);d&&i.push(HB(n,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:dg(c.box,t,n.verticalWeight)}));l.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...l.map(u=>u.entry)]){let u=_B(n.layout,e,d,c),f=c.textDirection==="btLr"?yw(t,c.box):t,m=fu(c.blocks,f,n,u);if(m)return m}return null}function HB(e,t,n){return n.blocks.length>0?{row:t,cell:n}:pu(e.layout).mergeOriginOf.get(n)??{row:t,cell:n}}function Vw(e,t){let n=t.paintBounds;return n.width<=0||n.height<=0?null:Object.freeze({pageIndex:e,x:n.x,y:n.y,width:n.width,height:n.height,record:t})}function zB(e,t,n){for(let r of t.lines)for(let o of r.drawings??[])if(o.drawingNodeId===n)return Vw(e,o);return null}function Kw(e,t,n){if(t.kind==="paragraph")return zB(e,t,n);for(let r of t.rows)for(let o of r.cells)for(let a of o.blocks){let i=Kw(e,a,n);if(i)return i}return null}function Ww(e,t,n){for(let r of t){let o=Kw(e,r,n);if(o)return o}return null}function WB(e,t){for(let n of e.pages){for(let o of n.anchoredDrawings??[])if(o.drawingNodeId===t)return Vw(n.index,o);let r=Ww(n.index,n.fragments,t);if(r)return r;for(let o of [n.header,n.footer]){if(!o)continue;for(let i of o.anchoredDrawings??[]){if(i.drawingNodeId!==t)continue;let s=i.paintBounds;return s.width<=0||s.height<=0?null:Object.freeze({pageIndex:n.index,x:o.box.x+s.x-n.contentBox.x,y:o.box.y+s.y-n.contentBox.y,width:s.width,height:s.height,record:i})}let a=Ww(n.index,o.fragments,t);if(a){let i=a.record.paintBounds;return Object.freeze({pageIndex:n.index,x:n.header?.box.x===o.box.x||n.footer?.box.x===o.box.x?o.box.x+i.x-n.contentBox.x:a.x,y:o.box.y+i.y-n.contentBox.y,width:a.width,height:a.height,record:a.record})}}}return null}function GB(e){let t=[0],n=0;for(let r of e)n+=r,t.push(n);return t}function VB(e,t){let n=t.get(e.id);return n===void 0&&(e.isHeaderRepeat?n=0:(n=t.size,t.set(e.id,n))),{...e,rowIndex:n}}function cl(e,t,n,r){return {...e,nestingDepth:n,columnEdges:e.columnEdges??GB(t),rows:e.rows.map(o=>VB(o,r))}}var $w=new WeakMap,Ni=4,fg=6,Xw=14,KB={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function pg(e,t,n,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:t,table:a,row:s,rowOrdinal:s.rowIndex,nestingDepth:i,editable:!s.isHeaderRepeat,pageContentBox:n});for(let l of s.cells)pg(l.blocks,t,n,i+1,o);}}}function d$(e){let t=$w.get(e);if(t)return t;let n=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o],i=s=>{n.push(s);};pg(a.fragments,o,a.contentBox,0,i);for(let s of [a.header,a.footer])s&&pg(s.fragments,o,s.box,0,i);}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(n)});return $w.set(e,r),r}function c$(e){let t=e.sourceRevision;switch(e.kind){case "rowDivider":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function u$(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 f$(e,t){if(t.kind==="insertRow"){for(let n of e.occurrences)if(n.pageIndex===t.pageIndex&&n.table.tableId===t.tableId&&n.row.id===t.rowId&&n.row.isHeaderRepeat===t.isHeaderRepeat)return n.editable?{kind:"insertRow",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:n.table.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth}:null;return null}for(let n of e.occurrences)if(n.pageIndex===t.pageIndex&&n.table.tableId===t.tableId&&n.row.id===t.rowId&&n.row.isHeaderRepeat===t.isHeaderRepeat&&n.editable)for(let r=0;r<n.table.columnEdges.length-1;r+=1){let o=dl(n.row,r);if(o===t.gridColumnId)return {kind:"insertColumn",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:n.table.tableId,rowId:n.row.id,gridColumnId:o,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth}}return null}function dl(e,t){for(let n of e.cells)if(n.gridColumn===t)return n.gridColumnId??null;return null}function $B(e,t,n,r,o){if(!e.pages[t.pageIndex])return null;let i=t.pageContentBox,s=n-i.x-o,l=r-i.y,d=t.table,c=s-d.box.x,u=l-d.box.y;return c<-Ni||u<-Xw||c>d.box.width+Ni||u>d.box.height+fg?null:{x:c,y:u}}function XB(e,t,n,r){if(t.row.isHeaderRepeat)return null;let o=t.table,a=t.row.box.y-o.box.y+t.row.box.height;if(!o.columnEdges.slice(1).some(l=>Math.abs(n-l)<=Ni)&&n>=0&&n<=o.box.width&&Math.abs(r-a)<=Ni)return {kind:"rowDivider",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeY:a};if(r<t.row.box.y-t.table.box.y||r>t.row.box.y-t.table.box.y+t.row.box.height)return null;for(let l=1;l<o.columnEdges.length-1;l+=1){let d=o.columnEdges[l];if(Math.abs(n-d)>Ni)continue;let c=dl(t.row,l-1),u=dl(t.row,l);if(!(!c||!u))return {kind:"columnDivider",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,leftGridColumnId:c,rightGridColumnId:u,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeX:d,sheetY:t.pageContentBox.y+o.box.y+r}}let s=o.columnEdges.at(-1);if(Math.abs(n-s)<=Ni){let l=o.columnEdges.length-2,d=dl(t.row,l);return d?{kind:"rightEdge",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,gridColumnId:d,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeX:s,sheetY:t.pageContentBox.y+o.box.y+r}:null}return null}function p$(e,t,n,r,o=0,a){let i=a??sl(r,n),s=i>=0?o:0,l=null,d=-1,c=-1,u=f=>{if(!f)return;let m=KB[f.kind];f.nestingDepth<d||f.nestingDepth===d&&m<=c||(d=f.nestingDepth,c=m,l=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let m=$B(r,f,t,n,s);if(!m||(u(XB(e,f,m.x,m.y)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let p=f.row.box.y-f.table.box.y;m.x<=fg&&Math.abs(m.y-(p+f.row.box.height/2))<=f.row.box.height/2+fg&&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],b=(h+y)/2;if(Math.abs(m.x-b)>(y-h)/2+2||m.y>Xw)continue;let x=dl(f.row,g);if(x){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:x,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return l}var Uw=1048576;function fa(e=Uw){let t=e|0;return {cellsRemaining:t>0?t:0}}function yu(e,t,n,r){let o=new Map,a=new Map,i=r?.pageFragment===true,s=i?new Set:null,l=i,c=m=>{let p=a.get(m);p&&(o.set(p.id,p.span),a.delete(m));},u=()=>n!==void 0&&n.cellsRemaining<=0,f=()=>{for(let m of [...a.keys()])c(m);};for(let m of e){if(u()){f();break}l&&m.isHeaderRepeat!==true&&(l=false,f(),s?.clear());let p=new Set,g=false;for(let h of m.cells){if(n){if(n.cellsRemaining<=0){g=true;break}n.cellsRemaining-=1;}let y=Math.max(0,Math.min(h.gridColumn|0,1023));if(p.add(y),h.vMergeContinue){let b=a.get(y);b?b.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()])p.has(h)||c(h);}return f(),o}var bu=.001;function UB(e,t){return {...e,height:{rule:"auto"},cells:[t]}}function YB(e){let t=yu(e),n=[],r=new Map;for(let o=0;o<e.length;o+=1)for(let a of e[o].cells){let i=t.get(a.id);if(i===void 0||i<2)continue;let s=Math.min(o+i-1,e.length-1);if(s<=o)continue;n.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:n,headIdsByRow:r}}function qB(e,t){if(e.length===0||!e.some(v=>v.cells.some(w=>w.vMergeContinue)))return null;let{heads:n,headIdsByRow:r}=YB(e);if(n.length===0)return null;let o=new Map(n.map(v=>[v.span,v])),a=new Map;for(let v of n){let w=a.get(v.span.headRow);w?w.push(v.span):a.set(v.span.headRow,[v.span]);}for(let v of a.values())v.sort((w,k)=>k.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,m=new Set,p=new Map,g=new Map,h=(v,w,k)=>{let P=new Set;for(let W of r.get(v)??[])(f.has(W)||W===w)&&P.add(W);let O=k===void 0?"":`@${k.toFixed(2)}`,L=`${v}${O}\0${[...P].sort().join("\0")}`,A=i.get(L);if(A!==void 0)return A;let j=t(e[v],P,k);return i.set(L,j),j},y=(v,w)=>{let k=w===void 0?v:`${v.headCellId}@${w.toFixed(2)}`,P=s.get(k);if(P!==void 0)return P;let O=o.get(v),L=t(UB(e[v.headRow],O.cell),void 0,w);return s.set(k,L),L},b=(v,w,k)=>h(v,w,k)+(l.get(v)??0),x=v=>{for(let w=v.headRow+1;w<=v.endRow;w+=1)if(r.has(w))return true;return false},T=(v,w)=>{let k=0;for(let P=v.headRow;P<=v.endRow;P+=1)k+=b(P,v.headCellId,w===void 0?void 0:w+k);return k},S=(v,w)=>{let k=new Map,P=0;for(let O=v.headRow;O<=v.endRow;O+=1){let L=b(O,v.headCellId,w===void 0?void 0:w+P);k.set(O,L),P+=L;}return k},I=v=>{for(let w=v.endRow;w>=v.headRow;w-=1)if(e[w].height.rule!=="exact")return w},F=(v,w)=>{if(x(v)||m.has(v.headRow)&&!u.has(v))return Number.POSITIVE_INFINITY;let k=T(v,w);return I(v)===void 0?k:Math.max(k,y(v,w))};return {spansAt:v=>a.get(v)??[],heightOf:F,accept:(v,w)=>{if(u.has(v)||x(v)||m.has(v.headRow))return;let k=S(v,w),P=0;for(let j of k.values())P+=j;let O=I(v),L=y(v,w);if(O===void 0&&L>P+bu)return;let A=O===void 0?0:L-P;u.add(v),f.add(v.headCellId),m.add(v.headRow),A>bu&&(l.set(O,(l.get(O)??0)+A),k.set(O,(k.get(O)??0)+A));for(let[j,W]of k)c.add(j),d.set(j,Math.max(d.get(j)??0,W));p.set(v,w),g.set(v,A>bu?O:void 0);},withdrawAt:v=>{for(let w of a.get(v)??[]){if(!u.delete(w))continue;f.delete(w.headCellId),m.delete(w.headRow),p.delete(w);let k=g.get(w);k!==void 0&&l.delete(k),g.delete(w);for(let P=w.headRow;P<=w.endRow;P+=1)c.delete(P),d.delete(P);}},rowOptions:v=>{if(!c.has(v))return;let w;for(let k of a.get(v)??[])u.has(k)&&(w??=new Map,w.set(k.headCellId,F(k,p.get(k))));return {...w?{detachedSpanHeightPtByCellId:w}:{},heightFloorPt:d.get(v)??b(v)}}}}function Yw(e,t,n,r){for(let o of e?.spansAt(t)??[])n+e.heightOf(o,n)>r+bu||e.accept(o,n);return e?.rowOptions(t)}function qw(e,t,n,r,o){return qB(e.rows,(a,i,s)=>o(a,e.columnWidthsPt,typeof t=="function"?t():t,n,r,e.cellSpacingPt,i?{detachedSpanHeightPtByCellId:new Map([...i].map(l=>[l,Number.POSITIVE_INFINITY]))}:void 0,s))}function Zw(e,t,n){for(let r of e?.spansAt(t)??[])e.accept(r,n);return e?.rowOptions(t)}function mo(e,t,n=false){let r=rr(t.left),o=rr(t.right),a=[t.left,t.right].every(s=>s.state!=="edge"||s.style==="single"||s.style==="thick"),i=n&&a&&e.left>=r&&e.right>=o;return {top:e.top+rr(t.top),right:e.right+(i?0:o),bottom:e.bottom+rr(t.bottom),left:e.left+(i?0:r)}}function ZB(e,t,n){return {top:t?{state:"none"}:e.top,left:e.left,bottom:n?{state:"none"}:e.bottom,right:e.right}}function xu(e,t,n){return !t&&!n?e:{...e,cells:e.cells.map(r=>({...r,borders:ZB(r.borders,t,n)}))}}function JB(e,t,n,r){if(!(!r.onAnchorRepublish||!r.inlineDrawingLayout||!r.anchorFrameBase||!r.pageContentClip))for(let o of e){if(o.kind!=="paragraph")continue;let a=t.find(s=>s.kind==="paragraph"&&s.id===o.paragraphId);!a||a.kind!=="paragraph"||jt(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,oo({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:n,pageClip:r.pageContentClip(),measurer:r.measurer,...r.hostedStory?{layoutTextboxStory:r.hostedStory.layoutTextboxStoryFor}:{},...r.displayMode?{displayMode:r.displayMode}:{}}));}}function Ai(e,t){return t===0?[...e]:e.map(n=>n.kind==="table"?{...n,box:{...n.box,y:n.box.y+t},rows:n.rows.map(r=>({...r,box:{...r.box,y:r.box.y+t},cells:r.cells.map(o=>({...o,box:{...o.box,y:o.box.y+t},blocks:Ai(o.blocks,t)}))}))}:{...n,box:{...n.box,y:n.box.y+t},...n.shadingBox?{shadingBox:{...n.shadingBox,y:n.shadingBox.y+t}}:{},...n.bottomBorder?{bottomBorder:{...n.bottomBorder,box:{...n.bottomBorder.box,y:n.bottomBorder.box.y+t}}}:{},...n.borders?{borders:n.borders.map(r=>({...r,box:{...r.box,y:r.box.y+t}}))}:{},...n.marker?{marker:{...n.marker,box:{...n.marker.box,y:n.marker.box.y+t}}}:{},lines:n.lines.map(r=>({...r,box:{...r.box,y:r.box.y+t},spans:r.spans.map(o=>({...o,box:{...o.box,y:o.box.y+t}})),...r.drawings?{drawings:r.drawings.map(o=>Qn(o,0,t))}:{}}))})}function Di(e,t,n,r,o,a,i,s,l){if(e.length===0)return [];let d=new Map;for(let y of n)for(let b of y.cells)d.set(b.id,b);let c=yu(e,a,o,{pageFragment:true}),u=e.map((y,b)=>({...y,cells:y.cells.map(x=>{let T=c.get(x.id);if(x.vMergeContinue&&T===void 0)return {...x,paintInert:true,rowSpan:1,borders:{},blocks:[]};let S=x.vMergeContinue,I=T??1,F=x.box.height;if(I>1){let P=e[b+I-1];F=P.box.y+P.box.height-x.box.y;}let v=d.get(x.id),w=x.blocks;if(v&&v.vAlign!=="top"&&w.length>0){let P=l?.get(y)?.get(x.id)??mo(v.margins,v.borders,v.legacyContentAlignment===true&&t.cellSpacingPt===0),O=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY;for(let A of w)O=Math.min(O,A.box.y),L=Math.max(L,A.box.y+A.box.height);if(Number.isFinite(O)&&Number.isFinite(L)){let A=v.textDirection==="btLr",j=(A?x.box.width-P.left-P.right:F-P.top-P.bottom)-(L-O),R=x.box.y+(A?P.left:P.top)+(j>0?v.vAlign==="center"?j/2:j:0)-O;if(Math.abs(R)>.001){w=Ai(w,R);for(let C of w)C.kind==="paragraph"&&i?.(C.paragraphId,R);}}}let k=Object.freeze({x:x.box.x,y:x.box.y,width:x.box.width,height:F});return v&&s&&(I>1||v.vAlign!=="top"&&w.length>0)&&JB(w,v.blocks,k,s),{...x,...S?{vMergeContinue:false,paintInert:false}:{},rowSpan:I,blocks:w,box:{...x.box,height:F}}})})),f=u.map(y=>y.cells.map(b=>{let x=d.get(b.id);return {gridColumn:b.gridColumn,gridSpan:b.gridSpan,vMergeContinue:b.vMergeContinue,borders:x?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:b.rowSpan??1}})),m=t.columnWidthsPt.length,p=t.tableBorders,g={columnWidthsPt:t.columnWidthsPt,rowBands:u.map(y=>({y:y.box.y,height:y.box.height})),cellBoxes:u.map(y=>y.cells.map(b=>({width:b.box.width,height:b.box.height})))},h=el(f,p,m,g,void 0,r);return u.map((y,b)=>({...y,cells:y.cells.map((x,T)=>{let S=h[b][T];return x.paintInert||x.vMergeContinue?{...x,borders:{},paintInert:true}:{...x,borders:S}})}))}function mg(e,t,n,r,o,a){let i=new Map,s=0,l=d=>{let c=Lt(d,t,0,n,r,o,a);if(c)for(let u of c.rows)for(let f of u.cells)for(let m of f.blocks)m.localName==="p"?i.set(m.id,s++):m.localName==="tbl"&&l(m);};for(let d of e)d.kind==="paragraph"&&d.paragraph?i.set(d.paragraph.id,s++):d.kind==="table"&&d.table&&l(d.table);return i}var Su=4096,Jw=1,Nn=class extends Error{code;constructor(t,n){super(n),this.name="TablePaginationError",this.code=t;}};function gg(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false}))}function ul(e,t,n){let r=0;for(let o=t;o<n&&o<e.length;o+=1)r+=e[o];return r}function QB(e,t,n,r,o,a,i){let s=e.id,l=o.cache?.keyFor?.bind(o.cache)??Cs,d=o.listItems?.get(s),c=lo(e,n,o.styleCascade,d,i?.tableCellStyle,true),{props:u,indent:f,available:m,alignment:p,styleId:g,outlineLevel:h,spacing:y,bottomBorder:b,borders:x,shading:T}=c,S={styleCascade:o.styleCascade,tableCellStyle:i?.tableCellStyle,listItems:o.listItems},I=Qs(c);zm(e,S,I);let F=ee=>I!==""&&UP(ee,S)===I,v=F(i?.borderNeighbours?.previous),w=F(i?.borderNeighbours?.next),k=v?void 0:x.top,P=w?x.between:b,{tabStops:O,properties:L}=Uc(c,o.defaultTabStopPt,{listToken:d?.cacheToken,hostedListToken:o.hostedStory?.hostedListTokenForParagraph?.(e)??"",refToken:o.refFields?.tokenForParagraph(s)??""}),A=Lc(d,f,o.measurer,O,m),j=o.pageExclusionZones?.()??Object.freeze([]),W=o.paragraphOrderIndex?.(s)??Number.MAX_SAFE_INTEGER,R=o.paragraphOrderIndex?qS(j,W,ee=>o.paragraphOrderIndex?.(ee)):j,C=YS(R,t,0,{left:0,right:f.left+m+f.right}),M=er(C),N=Hm(M,r),D=l({paragraph:e,properties:L,width:m,producer:o.producer,drawingToken:Os(o.drawingTokenForParagraph?.(e)||o.drawingLayoutToken||"",o.inlineDrawingLayout!==void 0),projectionToken:o.projectionTokenForParagraph?.(e)??"",...N?{exclusionToken:N}:{}});o.cache&&o.onCellBreakKey?.(D);let _=Yc({paragraph:e,paragraphId:s,indentLeft:f.left,available:m,measurer:o.measurer,cache:o.cache,cacheKey:o.cache?D:null,formatting:c,producer:o.producer,styleCascade:o.styleCascade,tabStops:O,...o.pageContext?{pageContext:o.pageContext}:{},flow:{firstLineOffset:A,marginExtent:{left:0,right:f.left+m+f.right},...o.projectLink?{projectLink:o.projectLink}:{},...o.projectFieldLink?{projectFieldLink:o.projectFieldLink}:{},...o.documentProperties?{documentProperties:o.documentProperties}:{},...o.bodyPageFields?{bodyPageFields:o.bodyPageFields}:{},...o.refFields?{refFields:o.refFields}:{},displayMode:o.displayMode,...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{},...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:f.left+m+f.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:f.left+m+f.right,height:Math.max(1,m)}),...C.length>0?{pageExclusionZones:C}:{}}}),K=i?.lineStart??0,H=i?.fragmentIndex??0,z=i?.maxBottom??Number.POSITIVE_INFINITY,$=i?.includeAfter??true,U=i?.includeBottomBorder??true,ie=()=>d!==void 0||o.displayMode==="all-markup"&&Cx(e,"all-markup",o.revisionAuthorFilter),Z=(i?.collapseHeight??false)&&!ie(),X=K===0&&!Z?Zo(y.before,a):0,Q=t+f.left,pe=K===0&&!Z?no(k):0,ue=[],Ie=r+X+pe,me=K,Pe=false;for(let ee=K;ee<_.length;ee+=1){let ne=_[ee],Oe=ee===_.length-1,et=Oe&&U&&P&&!Z?no(P):0,Ue=Oe&&$&&!Z?y.after:0,nn=Z?0:cm(ne,Ie,C);if((Z?Ie:Ie+nn+ne.height+et+Ue)>z+.001)break;Ie+=nn;let Dn=t+f.left+(ee===0?A:0),Ar=Math.max(1,m-(ee===0?A:0)),Ve=ne.spans.map(ze=>({...ze,range:{...ze.range,paragraphId:s},box:{...ze.box,x:ze.box.x+t,y:Ie}})),gt=vc(Ve,o.measurer,Dn,Ar,p,Oe,p==="center"||p==="right"?ne.width:void 0),_n=Ve.length>0&&gt.length>0?gt[0].box.x-Ve[0].box.x:p!=="left"&&p!=="both"?(()=>{let ze=Ar-ne.width;return ze<=0?0:p==="center"?ze/2:ze})():0,yn=Object.freeze({x:t,y:r,width:n,height:Math.max(0,z-r)}),lr=Tc(ne.drawings.map(ze=>hc(Object.freeze({...Qn(ze,t,Ie),paragraphId:s}),yn)),_n);ue.push({id:o.nextLineId(s,ne.start,ee),range:{paragraphId:s,start:ne.start,end:ne.end},spans:gt,...lr.length>0?{drawings:lr}:{},box:{x:t+f.left,y:Ie,width:m,height:Z?0:ne.height},contentX:gt[0]?.box.x??Dn+_n,baseline:Z?Math.max(0,Math.min(ne.baseline,i?.collapseBandAbove??0)):ne.baseline,leading:Z?0:ne.leading,trailingSpacing:Z?0:ne.trailingSpacing,...ne.deletedRanges?{deletedRanges:ne.deletedRanges}:{},...ne.anchorRevisions?{anchorRevisions:ne.anchorRevisions}:{}}),Z||(Ie+=ne.height),me=ee+1,Pe=true;}if(!Pe)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:K,complete:false,fitted:false};let ce=me>=_.length,re=ue[0].box.y,we=Ie,ye=[],_e,Ce=re,Be=we,Se=x.left?Kt(x.left):0,xe=x.right?Kt(x.right):0,Ht=x.left?Q-x.left.spacePt-Se:Q,en=x.right?Q+m+x.right.spacePt+xe:Q+m,An=Math.max(en-Ht,0);if(pe>0&&k){let ee=Kt(k),ne=re-k.spacePt-ee;ye.push({side:"top",edge:k,box:{x:Ht,y:ne,width:An,height:ee}}),Ce=ne;}if(ce&&U&&P&&!Z){let ee=Kt(P),ne=we+P.spacePt,Oe={x:Ht,y:ne,width:An,height:ee};w||(_e={edge:P,box:Oe}),ye.push({side:w?"between":"bottom",edge:P,box:Oe}),Be=ne+ee;}let mn=ce&&$&&!Z?y.after:0,We=v&&K===0?r:Ce,Zi=w&&ce?Be+mn:Be,gn=Math.max(Zi-We,0);if(x.left&&ye.push({side:"left",edge:x.left,box:{x:Q-x.left.spacePt-Se,y:We,width:Se,height:gn}}),x.right&&ye.push({side:"right",edge:x.right,box:{x:Q+m+x.right.spacePt,y:We,width:xe,height:gn}}),x.bar){let ee=Kt(x.bar);ye.push({side:"bar",edge:x.bar,box:{x:Q-x.bar.spacePt-ee,y:re,width:ee,height:Math.max(we-re,0)}});}let Ra=Be+mn,tn=T===void 0?void 0:x.left||x.right?{x:Ht,y:Ce,width:An,height:Math.max(Be-Ce,0)}:ms(ue,Q,m),hn=ce&&o.displayMode==="all-markup"?Yd(e,"all-markup",o.revisionAuthorFilter):null,V=hn?.revisions??[],E=hn?.formatRevision??null,oe=K===0?uu(d,o.measurer,ue[0]?{y:ue[0].box.y,height:ue[0].box.height}:void 0,t):void 0,te=ai(e),Ee=te?Xc(ue,$c(te)):ue,ke={kind:"paragraph",id:`${s}#f${H}`,paragraphId:s,fragmentIndex:H,range:{paragraphId:s,start:Ee[0].range.start,end:Ee[Ee.length-1].range.end},props:u,styleId:g,outlineLevel:h,alignment:p,spacing:{before:X,after:mn},indent:f,tabStops:O,..._e?{bottomBorder:_e}:{},...ye.length>0?{borders:ye}:{},...T===void 0?{}:{shading:T},...tn===void 0?{}:{shadingBox:tn},...oe?{marker:oe}:{},...qd(V,E),lines:Ee,box:{x:Q,y:r,width:m,height:Ra-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let ee=Object.freeze({x:t,y:r,width:n,height:Math.max(0,z-r)}),ne=ke.box,Oe={paragraph:e,paragraphId:s,paragraphBox:ne,lines:Ee};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...Oe,cellOriginX:t,cellContentWidth:n}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(oo({paragraph:e,paragraphId:s,paragraphBox:ne,lines:Ee,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(ne)??ne,cellBox:ee,pageClip:o.pageContentClip(),measurer:o.measurer,...o.hostedStory?{layoutTextboxStory:o.hostedStory.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{},...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{}}));}return {fragment:ke,bottom:Ra,spaceAfter:mn,nextLineIndex:me,complete:ce,fitted:true}}function pa(e,t,n,r,o,a){let i=Qw(e,t,n,r,Number.POSITIVE_INFINITY,o,a,{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false});return {blocks:i.blocks,bottom:i.bottom}}function Qw(e,t,n,r,o,a,i,s,l,d=false){let c=[],u=r,f=s.previousSpaceAfter,m=s.blockIndex,p=s.lineIndex,g=s.paragraphFragmentIndex,h=false,y=false,b=s.precededByEmittedTable;for(;m<e.length;){let x=e[m];if(x.kind==="table"){p!==0&&(p=0),f=0;let I=tN(x,t,n,u,a+1,i);if(!I){b=false,m+=1;continue}if(I.bottom>o+.001){y=!h;break}c.push(I.fragment),u=I.bottom,h=true,b=true,m+=1,p=0;continue}if(x.kind!=="paragraph"){b=false,m+=1,p=0;continue}let T=d&&m===e.length-1&&b&&_x(x),S=QB(x,t,Math.max(1,n-t),u,i,f,{lineStart:p,fragmentIndex:g,maxBottom:o,includeAfter:true,includeBottomBorder:true,collapseHeight:T,collapseBandAbove:u-r,...l?{tableCellStyle:l}:{},borderNeighbours:{previous:m>0?e[m-1]:void 0,next:e[m+1]}});if(!S.fitted||!S.fragment)break;if(c.push(S.fragment),u=S.bottom,h=true,S.complete)f=S.spaceAfter,b=false,m+=1,p=0,g=0;else return {blocks:c,bottom:u,cursor:{blockIndex:m,lineIndex:S.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:g+1,precededByEmittedTable:b},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:c,bottom:u,cursor:{blockIndex:m,lineIndex:p,previousSpaceAfter:f,paragraphFragmentIndex:g,precededByEmittedTable:b},complete:m>=e.length,fitted:h,nestedSplitBlocked:y}}function ir(e,t,n,r,o,a,i,s=0,l,d=Number.POSITIVE_INFINITY){return fl(e,t,n,r,Number.POSITIVE_INFINITY,o,false,a,i,gg(e),s,l,d)}function fl(e,t,n,r,o,a,i,s,l,d,c=0,u,f=o){let m=u?.detachedSpanHeightPtByCellId,p=ul(t,0,t.length),g=Number.isFinite(c)&&c>0?c/2:0,h=l.measurer.lineMetrics(Xn).height,y=e.height,b=y.rule==="exact"?y.valuePt:void 0,x=y.rule==="atLeast"?y.valuePt:void 0,T=[],{rowDeps:S,flushDeferred:I}=KP(l,T),F=a&&l.pageOccurrenceKey?{...S,nextLineId:(C,M,N)=>S.nextLineId(C,M,N,l.pageOccurrenceKey())}:S,v=b===void 0?o:Math.min(o,r+Math.max(0,b)),w=[],k=false,P=false,O=r;for(let C=0;C<e.cells.length;C+=1){let M=e.cells[C],N=d[C]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false},D=M.gridSpan,_=M.gridColumn,K=n+ul(t,0,_),H=ul(t,_,Math.min(_+D,t.length))||p,z=Math.min(g,Math.max((H-Jw)/2,0)),$=K+z,U=Math.max(H-2*z,Jw),ie=l.cellContentInsets?.get(M.id)??mo(M.margins,M.borders,M.legacyContentAlignment===true&&c===0),Z=i?rr(M.borders.top):ie.top,X=m?.get(M.id),Q=X!==void 0,pe=Q?Math.min(f,r+X):v,ue=M.textDirection==="btLr",Ie=ue?$+ie.bottom:$+ie.left,me=ue?$+Math.max(0,pe-r)-Z:$+U-ie.right,Pe=ue?r+ie.left:r+Z,ce=ue?r+U-ie.right:pe-ie.bottom,re=[],we=Pe,ye=N,_e=true,Ce=false,Be=false;if(!M.vMergeContinue)if(ce<Pe+.001)_e=N.blockIndex>=M.blocks.length;else {let xe=Qw(M.blocks,Ie,me,Pe,ce,s,F,N,M.styleFormatting,true);re=xe.blocks,we=xe.bottom,ye=xe.cursor,_e=xe.complete,Ce=xe.fitted,Be=xe.nestedSplitBlocked,Ce&&(k=true),Be&&(P=true);}let Se=Math.min(pe,ue&&Ce?r+Z+(hw(re,Ie)-Ie)+ie.bottom:Ce?we+ie.bottom:r+Z+h+ie.bottom);Se>O&&!Q&&(O=Se),w.push({cell:M,x:$,width:U,gridColumn:_,blocks:re,contentTop:Pe,contentBottom:we,physicalBottom:Se,insets:{...ie,top:Z},nextCursor:ye,complete:M.vMergeContinue?true:_e,fitted:Ce,nestedSplitBlocked:Be});}O=Math.min(v,Math.max(O,r));for(let C of w){if(m?.has(C.cell.id)===true)continue;let M=C.physicalBottom;M>O&&M<=v+.001&&(O=M);}if(O<=r+.001&&w.length>0){let C=r;for(let M of w){let N=r+M.insets.top+h+M.insets.bottom;N>C&&(C=N);}O=Math.min(v,C);}O=Math.min(v,O);let L=false;if(b!==void 0){let C=r+b;C<=o+.001?(O=C,L=true):O=Math.min(o,O);}else {let C=i?0:u?.heightFloorPt??0,M=r+Math.max(x??0,C);M>O&&M<=o+.001&&w.every(D=>D.complete)&&(O=M);}O=Math.min(o,O);let A=Math.max(0,O-r),j=w.map(C=>{let M=C.blocks,N=L?true:C.complete;if(!C.cell.vMergeContinue&&N&&C.cell.vAlign!=="top"&&M.length>0){let D=C.contentBottom-C.contentTop,_=C.cell.textDirection==="btLr"?C.width-C.insets.left-C.insets.right-D:A-C.insets.top-C.insets.bottom-D;if(_>0){let K=C.cell.vAlign==="center"?_/2:_;M=Ai(M,K);}}return {id:C.cell.id,gridColumn:C.gridColumn,...C.cell.gridColumnId?{gridColumnId:C.cell.gridColumnId}:{},gridSpan:C.cell.gridSpan,vMergeContinue:C.cell.vMergeContinue,...C.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...C.cell.shading===void 0?{}:{shading:C.cell.shading},...C.cell.textDirection==="btLr"?{textDirection:"btLr"}:{},blocks:M,box:{x:C.x,y:r,width:C.width,height:A}}}),W=L||w.every(C=>C.complete)?null:w.map(C=>C.nextCursor),R=L||w.every(C=>C.complete);return I(j,r,A),{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,isHeaderRow:e.isHeader,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:j,box:{x:n,y:r,width:p,height:A}},bottom:O,remainder:R?null:W,fitted:k||e.cells.every(C=>C.vMergeContinue)||L,nestedSplitBlocked:P}}function hg(e,t,n,r,o,a=0,i,s){let l=0,d=s!==void 0,c={...nr(o),...d?{}:{pageExclusionZones:void 0},nextLineId:()=>`probe-${l++}`};return ir(e,t,n,s??0,false,r,c,a,i).record.box.height}function eN(e,t,n,r,o,a,i,s,l){let d=u=>ir(e,t.columnWidthsPt,n,r,i,o,a,t.cellSpacingPt,u),c=d(s);return c.remainder===null||s===void 0?c:(l(),d(void 0))}var yg=(e,t,n,r,o)=>r.measuringOnly===true?null:qw(o?{...e,rows:o}:e,t,n,r,hg);function tN(e,t,n,r,o,a){if(o>=cu)return null;let i=Math.max(1,n-t),s=Lt(e,i,o-(a.tableNestingOffset??0),a.styleCascade,a.displayMode,a.revisionAuthorFilter,a.compatibilityMode);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=t+Li(s,i),u=yg(s,c,o,d),f=[],m=r;for(let[y,b]of s.rows.entries()){let x=l.length,T=eN(b,s,c,m,o,d,false,Zw(u,y,m),()=>{l.length=x,u?.withdrawAt(y);});f.push(T.record),m=T.bottom;}let p=Di(f,s,s.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let y of l)for(let b of p)if(b.cells.some(T=>T.blocks.some(S=>S.kind==="paragraph"&&S.paragraphId===y.paragraphId))){jm([y],b.cells,b.box.y,b.box.height,a);break}let g=ul(s.columnWidthsPt,0,s.columnWidthsPt.length),h=new Map;return {fragment:cl({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:p,box:{x:c,y:r,width:g,height:m-r}},s.columnWidthsPt,o,h),bottom:m}}function pl(e,t,n,r,o,a,i,s=()=>false){let l=[],d=n;for(let m of e.rows){let p=ir(m,e.columnWidthsPt,t,d,s(m),a,i,e.cellSpacingPt);l.push(p.record),d=p.bottom;}let c=Di(l,e,e.rows,i.borderOwnershipBudget,i.vMergeResolveBudget),u=ul(e.columnWidthsPt,0,e.columnWidthsPt.length),f=new Map;return {fragment:cl({kind:"table",id:`${o}#f${r}`,tableId:o,fragmentIndex:r,rows:c,box:{x:t,y:n,width:u,height:d-n}},e.columnWidthsPt,a,f),bottom:d}}var nN=4,bg=256;function rN(e){return `txbx-${e}`}var e0=new WeakMap;function a0(e,t,n,r="all-markup",o){if(!t||t.nums.size===0)return;let a=e0.get(e);if(a&&a.rawIndex===t&&a.styleCascade===n&&a.displayMode===r&&a.authorFilter===o)return a.listItems;let i=Xs(t,n),s=Pp(e,r,o),l=Ec(s,i,n),d=l.size>0?l:void 0;return e0.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,listItems:d}),d}var i0=2e4,xg=Object.freeze({contents:Object.freeze([]),truncated:false}),ml=new WeakMap;function oN(e){let t=[],n=0,r=false,o=[e];for(;o.length>0;){let a=o.pop();if(n+=1,n>i0){r=true;break}if(a.kind!=="textValue"&&a.localName==="txbxContent"){t.push(a);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}return t.length>0||r?Object.freeze({contents:Object.freeze(t),truncated:r}):xg}function aN(e){let t=ml.get(e);if(t)return t;if(e.kind!=="table"){let s=oN(e);return ml.set(e,s),s}let n=[],r=0,o=false,a=[{phase:"enter",node:e,paragraphOwners:[]}];for(;a.length>0;){let s=a.pop();if(s.phase==="exit-paragraph"){ml.has(s.scan.paragraph)||ml.set(s.scan.paragraph,s.scan.contents.length>0?Object.freeze({contents:Object.freeze(s.scan.contents),truncated:false}):xg);continue}let l=s.node;if(r+=1,r>i0){o=true;break}if(l.kind!=="textValue"&&l.localName==="txbxContent"){n.push(l);for(let c of s.paragraphOwners)c.contents.push(l);continue}if(!("children"in l))continue;let d=s.paragraphOwners;if(l.kind==="paragraph"){let c={paragraph:l,contents:[]};d=Object.freeze([...d,c]),a.push({phase:"exit-paragraph",scan:c});}for(let c=l.children.length-1;c>=0;c-=1)a.push({phase:"enter",node:l.children[c],paragraphOwners:d});}let i=n.length>0||o?Object.freeze({contents:Object.freeze(n),truncated:o}):xg;return ml.set(e,i),i}var t0=1,n0=new WeakMap;function iN(e){let t=n0.get(e);return t===void 0&&(t=t0,t0+=1,n0.set(e,t)),t}var r0=new WeakMap;function sN(e,t,n,r="all-markup",o){if(t.nums.size===0)return "";let a=aN(e);if(a.contents.length===0&&!a.truncated)return "";let i=r0.get(e);if(i&&i.rawIndex===t&&i.styleCascade===n&&i.displayMode===r&&i.authorFilter===o)return i.token;let s=[];for(let d of a.contents){let c=a0(d,t,n,r,o);if(c)for(let[u,f]of c)s.push(q([u,f.cacheToken]));}a.truncated&&s.push(`truncated:${iN(t)}`);let l=s.length===0?"":`|txbxlist:${q(s)}`;return r0.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,token:l}),l}function Ru(e,t,n,r,o){return Object.freeze({layoutTextboxStoryFor:e,hostedListTokenForParagraph:!t||t.nums.size===0?null:a=>sN(a,t,n,r,o)})}function Pu(e,t){let n=e.textboxStory;if(!n)return null;let r=Tt(e.extentEmu.cx),o=Tt(e.extentEmu.cy),a=Tt(n.insetsEmu.left),i=Tt(n.insetsEmu.right),s=Tt(n.insetsEmu.top),l=Tt(n.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-s-l),u=Tt(n.strokeWidthEmu),f={fillHex:n.fillHex,strokeHex:n.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((t.depth??0)>=nN)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:s},...f,fallbackReason:"textbox-nesting-limit"};let p=Pp(n.content,t.displayMode,t.revisionAuthorFilter),g=a0(n.content,t.numberingIndex,t.styleCascade,t.displayMode,t.revisionAuthorFilter),h=rN(e.drawingNodeId),y=0,b=pa(p,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${h}-line-${y++}`,styleCascade:t.styleCascade,...g?{listItems:g}:{},...t.pageContext?{pageContext:t.pageContext}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},compatibilityMode:t.compatibilityMode,tableNestingOffset:1,...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{},...t.displayMode?{displayMode:t.displayMode}:{},...t.revisionAuthorFilter?{revisionAuthorFilter:t.revisionAuthorFilter}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:{},...t.projectionTokenForParagraph?{projectionTokenForParagraph:t.projectionTokenForParagraph}:{},...t.projectionTokenForTable?{projectionTokenForTable:t.projectionTokenForTable}:{}}),x=b.blocks,T=b.bottom,S,I=[];if(x.length>bg){o0(x.slice(bg),I),x=x.slice(0,bg);let w=x[x.length-1];T=w?w.box.y+w.box.height:0,S="textbox-fragment-limit";}if(T>c+.001){let w=x.filter(k=>k.box.y<c-.001);w.length<x.length&&(o0(x.filter(k=>k.box.y>=c-.001),I),x=w,S=S??"textbox-height-clip");}let F=Math.max(0,c-T),v=n.verticalAnchor==="center"?F/2:n.verticalAnchor==="bottom"?F:0;return {fragments:x,flowHeight:T,contentOffset:{x:a,y:s+v},...f,...S?{fallbackReason:S}:{},...I.length>0?{clippedResourceToken:q(I)}:{}}}function o0(e,t){Ya({fragments:e},n=>{t.push(Js(n.resource));});}function ma(e,t){return t===0?e:{...e,box:{...e.box,y:e.box.y+t},...e.shadingBox?{shadingBox:{...e.shadingBox,y:e.shadingBox.y+t}}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:{...e.bottomBorder.box,y:e.bottomBorder.box.y+t}}}:{},...e.borders?{borders:e.borders.map(n=>({...n,box:{...n.box,y:n.box.y+t}}))}:{},...e.marker?{marker:{...e.marker,box:{...e.marker.box,y:e.marker.box.y+t}}}:{},lines:e.lines.map(n=>({...n,box:{...n.box,y:n.box.y+t},spans:n.spans.map(r=>({...r,box:{...r.box,y:r.box.y+t}}))}))}}function Sg(e,t){return t===0?[...e]:e.map(n=>n.kind==="paragraph"?ma(n,t):{...n,box:{...n.box,y:n.box.y+t}})}function gl(e){let t=0;for(let n of e)vn(n)||(t=Math.max(t,n.box.y+n.box.height));return t}function hl(e){let t=0;for(let n of e.fragments)t=Math.max(t,Rg(n));return t}function Rg(e){if(vn(e))return 0;let t=e.kind==="paragraph"?e.spacing.after:0;return e.box.y+e.box.height-t}function wu(e){let t=Number.POSITIVE_INFINITY;for(let n of e.fragments){if(vn(n))continue;let r=n.kind==="paragraph"?n.lines[0]?.box.y??n.box.y:n.box.y;t=Math.min(t,r);}return Number.isFinite(t)?t:0}var s0=new WeakMap;function yl(e,t){let n=s0.get(e.fragments);n||(n=new WeakMap,s0.set(e.fragments,n));let r=n.get(t);if(r)return r;let o=lN(e,t);return n.set(t,o),o}function lN(e,t){let n=0,r=0,o=0,a=false;for(let d of e.fragments){if(d.kind==="paragraph"){if(!xr(d,t.paragraphId,t.atomOffset))continue;let c=dN(d,t),u=c?.top??d.box.y,f=c?.bottom??d.box.y+d.box.height;f>r&&(n=u,r=f,o=d.box.y,a=c!==null&&!vn(d));continue}if(cN(d,[t])){let c=d.box.y+d.box.height;c>r&&(n=d.box.y,r=c,a=false);}}let i=d=>Math.min(Math.max(0,d),e.contentBox.height),s=i(n),l=i(r);return {top:s,bottom:l,blockTop:i(o),evictable:a&&l>s}}function dN(e,t){for(let n of e.lines)for(let r of qe(n))if(Zb(r,t.paragraphId,t.atomOffset))return {top:n.box.y,bottom:n.box.y+n.box.height};return null}function cN(e,t){let n=r=>{for(let o of r){if(o.kind==="paragraph"){for(let a of t)if(xr(o,a.paragraphId,a.atomOffset))return true;continue}for(let a of o.rows)if(!a.isHeaderRepeat){for(let i of a.cells)if(n(i.blocks))return true}}return false};for(let r of e.rows)if(!r.isHeaderRepeat){for(let o of r.cells)if(n(o.blocks))return true}return false}function Pg(e){if(e.footnotes===void 0&&e.endnotes===void 0&&e.noteStream===void 0)return e;let{footnotes:t,endnotes:n,noteStream:r,...o}=e;return o}var wg=e=>e.kind!=="textValue",Mr=(e,t)=>wg(e)&&e.namespaceUri===da$1&&e.localName===t,l0=e=>e.children.filter(wg),uN=(e,t)=>{let n=e.attributes.filter(r=>r.localName===t);return n.length===1&&n[0].namespaceUri===da$1?n[0].value:void 0};function bl(e,{leadingTab:t=false,allowDecoration:n=false}={}){let r=0,o="",a="",i="",s=0;for(let l of l0(e))if(!Mr(l,"pPr")){if(!Mr(l,"r"))return;for(let d of l0(l)){if(Mr(d,"rPr"))continue;if(Mr(d,"tab")&&r===0&&!a&&!s&&t&&!d.children.length){s++;continue}if(Mr(d,"fldChar")&&!d.children.length){let u=uN(d,"fldCharType");if(r===0&&u==="begin")r=1;else if(r===1&&u==="separate"&&Yr(o)==="PAGE")r=2;else if(r===2&&u==="end")r=3;else return;continue}if(d.children.some(wg))return;let c=d.children.map(u=>u.kind==="textValue"?u.value:"").join("");if(Mr(d,"instrText")&&r===1)o+=c;else if(n&&Mr(d,"t")&&r===0)a+=c;else if(n&&Mr(d,"t")&&r===3)i+=c;else if(!(Mr(d,"t")&&r===2&&/^\d*$/.test(c)))return}}return r===3&&Yr(o)==="PAGE"&&s===Number(t)&&(!a&&!i||a==="- "&&i===" -")?a+i:void 0}var Tg=31680/20,f0=e=>e.kind!=="textValue",ga=(e,t)=>f0(e)&&e.namespaceUri===da$1&&e.localName===t,ji=e=>e.children.filter(f0),_i=(e,t)=>{let n=e.attributes.filter(r=>r.localName===t);return n.length===1&&n[0].namespaceUri===da$1?n[0].value:void 0};function vg(e,t){let n=ji(e).filter(r=>r.localName===t);return n.length===1&&ga(n[0],t)?n[0]:void 0}function d0(e){if(e===void 0||!/^\d{1,5}$/.test(e))return;let t=Number(e)/20;return t<=Tg?t:void 0}function c0(e){return e.kind==="paragraph"&&e.lines.length===1&&!e.marker&&!e.borders?.length&&!e.shading&&!e.lines[0].drawings?.length&&e.spacing.before===0&&e.spacing.after===0&&e.indent.left===0&&e.indent.firstLine===0&&e.indent.hanging===0}function fN(e,t){return t.lines[0].spans.length===0&&ji(e).every(n=>ga(n,"pPr")||ga(n,"r")&&ji(n).every(r=>ga(r,"rPr")))}function u0(e,t){let n=new Set(["pStyle","tabs","jc","rPr","ind","spacing","widowControl","contextualSpacing","snapToGrid",...t?["framePr"]:[]]);return e.props.length<=64&&e.props.every(r=>n.has(r.localName))&&e.props.filter(r=>r.localName==="framePr").length===Number(t)}function p0(e,t,n){if(!n||!ga(e.root,"ftr")||t.blocks.length!==2||!Number.isFinite(n.pageWidth)||n.pageWidth<=0||n.pageWidth>Tg||!Number.isFinite(n.marginLeft)||n.marginLeft<0||n.marginLeft>n.pageWidth)return t;let r=ji(e.root),[o,a]=t.blocks;if(r.length!==2||r.some(S=>S.kind!=="paragraph")||!o||!a||!c0(o)||!c0(a)||!u0(o,true)||!u0(a,false)||o.paragraphId!==r[0].id||a.paragraphId!==r[1].id||o.alignment!=="left"||o.indent.right!==0||a.indent.right<0||a.indent.right>Tg)return t;let i=vg(r[0],"pPr"),s=vg(r[1],"pPr");if(!i||!s||ji(i).some(S=>!["framePr","pStyle","tabs","jc","rPr"].some(I=>ga(S,I)))||ji(s).some(S=>!["pStyle","jc","ind","rPr"].some(I=>ga(S,I)))||bl(r[0],{leadingTab:true,allowDecoration:true})===void 0||bl(r[1],{allowDecoration:true})===void 0&&!fN(r[1],a))return t;let d=vg(i,"framePr"),c=new Set(["w","wrap","vAnchor","hAnchor","x","yAlign"]);if(!d||d.children.length||d.attributes.some(S=>S.namespaceUri!==da$1||!c.has(S.localName))||_i(d,"wrap")!=="around"||_i(d,"vAnchor")!=="text"||_i(d,"hAnchor")!=="page"||_i(d,"yAlign")!=="center")return t;let u=d0(_i(d,"w")),f=d0(_i(d,"x"));if(u===void 0||u<=0||f===void 0||f+u>n.pageWidth)return t;let m=o.lines[0],p=1/0,g=-1/0;for(let S of m.spans)S.box.width<=0||S.text===" "||S.text.trim()===""||(p=Math.min(p,S.box.x-o.box.x),g=Math.max(g,S.box.x+S.box.width-o.box.x));if(!Number.isFinite(p)||!Number.isFinite(g)||p<0||!(g<=u||p>=u))return t;let h=ma(a,-a.box.y),y=(a.box.height-o.box.height)/2;if(y<0)return t;let b=ma(o,y-o.box.y),x=f-n.marginLeft-o.box.x,T={...b,clipToBox:true,box:{...b.box,x:o.box.x+x,width:u},lines:b.lines.map(S=>({...S,box:{...S.box,x:S.box.x+x},contentX:S.contentX+x,spans:S.spans.map(I=>({...I,box:{...I.box,x:I.box.x+x}}))}))};return {...t,blocks:[T,h],bottom:h.box.height}}var g0=e=>e.kind!=="textValue",Ct=(e,t)=>g0(e)&&e.namespaceUri===da$1&&e.localName===t,go=(e,t)=>e.attributes.find(n=>n.namespaceUri===da$1&&n.localName===t)?.value;function ha(e){return e.children.filter(g0)}function pN(e){let t=[{node:e.root,depth:0}],n=0;for(;t.length;){let{node:r,depth:o}=t.pop();if(++n>512||o>16)return false;if(r.kind==="textValue"){if(r.value.length>256)return false}else {if(n+t.length+r.children.length>512||r.attributes.length>32||r.attributes.some(a=>a.value.length>1024))return false;for(let a of r.children){if(a.kind==="textValue"&&a.value.trim()&&!Ct(r,"t")&&!Ct(r,"instrText"))return false;t.push({node:a,depth:o+1});}}}return true}function mN(e){let t="";for(let n of e.children){if(n.kind!=="textValue")return null;t+=n.value;}return t}function gN(e){let t=ha(e.root);if(t.length!==2||t.some(p=>p.kind!=="paragraph"))return null;let[n,r]=t,o=ha(n).find(p=>Ct(p,"pPr")),a=ha(r).find(p=>Ct(p,"pPr"));if(!o||!a)return null;let i=ha(o),s=ha(a);if(i.filter(p=>Ct(p,"framePr")).length!==1||i.filter(p=>Ct(p,"pStyle")).length!==1||s.filter(p=>Ct(p,"pStyle")).length!==1||i.some(p=>!["pStyle","framePr","jc","rPr"].some(g=>Ct(p,g)))||s.some(p=>!["pStyle","jc","rPr"].some(g=>Ct(p,g))))return null;let l=i.find(p=>Ct(p,"pStyle")),d=s.find(p=>Ct(p,"pStyle")),c=i.find(p=>Ct(p,"framePr"));if(!go(l,"val")||go(l,"val")!==go(d,"val"))return null;let u="";for(let p of ha(r))if(!Ct(p,"pPr")){if(!Ct(p,"r"))return null;for(let g of ha(p)){if(Ct(g,"rPr"))continue;if(!Ct(g,"t"))return null;let h=mN(g);if(h===null)return null;u+=h;}}if(u&&!/^· {1,15}·$/.test(u))return null;let f=new Set(["wrap","vAnchor","hAnchor","xAlign","y"]);if(c.children.length||c.attributes.some(p=>p.namespaceUri!==da$1||!f.has(p.localName))||go(c,"wrap")!=="around"||go(c,"vAnchor")!=="text"||go(c,"hAnchor")!=="margin"||go(c,"xAlign")!=="center")return null;let m=go(c,"y")??"0";return !["0","1"].includes(m)||bl(n)!==""?null:{first:n.id,empty:r.id,y:Number(m)/20,decoration:u}}function m0(e){return e.kind==="paragraph"&&e.lines.length===1&&!e.marker&&!e.borders?.length&&!e.shading&&!e.lines[0].drawings?.length&&e.spacing.before===0&&e.spacing.after===0&&Object.values(e.indent).every(t=>t===0)}function h0(e,t,n,r){if(!Ct(e.root,"ftr")||!pN(e))return t;let o=gN(e);if(!o)return p0(e,t,r);if(t.blocks.length!==2)return t;let[a,i]=t.blocks;if(!a||!i||!m0(a)||!m0(i)||a.paragraphId!==o.first||i.paragraphId!==o.empty||(o.decoration?i.alignment!=="center"||i.lines[0].spans.map(g=>g.text).join("")!==o.decoration:i.lines[0].spans.length>0))return t;let s=ma(a,o.y-a.box.y),l=ma(i,-i.box.y),d=s.lines[0],c=d.spans[0]?.box.x??d.contentX,u=d.spans.at(-1),f=u?u.box.x+u.box.width:c,m=(n-(f-c))/2-c,p={...s,alignment:"center",box:{...s.box,x:c+m,width:f-c},lines:[{...d,box:{...d.box,x:c+m,width:f-c},contentX:d.contentX+m,spans:d.spans.map(g=>({...g,box:{...g.box,x:g.box.x+m}}))}]};return {...t,blocks:[p,l],bottom:Math.max(p.box.y+p.box.height,l.box.y+l.box.height)}}var hN=128,y0=new WeakMap;function yN(e){let t=y0.get(e);if(t!==void 0)return t;let n=A(ra$1(e));return y0.set(e,n),n}function bN(e){let t=Math.max(1,Math.floor(e)),n=new Map;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>t;){let a=n.keys().next();if(a.done)break;n.delete(a.value);}},get size(){return n.size}}}function Fg(e,t,n,r,o,a,i,s=hN,l,d=Me,c,u,f,m,p,g){let h=g?.revisionAuthorFilter,y=ap(e.root),b=bN(s),x=_t(e,d,h),T=kr({numberingIndex:g?.numberingIndex,styleCascade:a},x).listItems,S=yN(e),I,F=v=>{let w=Jr(y)||c?v:void 0,k=w?.pageNumber??m?.pageNumber??1,P=c&&w?.contentInsetTop!==void 0&&w.contentInsetBottom!==void 0&&w.storyTop!==void 0?`|hf:${w.contentInsetTop},${w.contentInsetBottom},${w.storyTop}`:"",O=cp(w,y)+(c?`|pn:${k}`:"")+P;if(O===""){if(I)return I}else {let D=b.get(O);if(D)return D}let L=0,A=[],j=()=>{let D=w?.pageNumber??m?.pageNumber??1,_=m?.pageWidth??t,K=m?.pageHeight??Math.max(1,t),H=m?.marginLeft??0,z=m?.marginRight??0,$=m?.marginTop??0,U=m?.marginBottom??0,ie=Math.max(1,K-$-U),Z=w?.contentInsetTop!==void 0&&w.contentInsetBottom!==void 0&&w.storyTop!==void 0?Object.freeze({top:w.contentInsetTop-w.storyTop,height:Math.max(1,K-w.contentInsetTop-w.contentInsetBottom)}):void 0;return Object.freeze({pageNumber:D,pageWidth:_,pageHeight:K,marginLeft:H,marginRight:z,marginBottom:U,contentInsetTop:$,contentInsetBottom:U,contentWidth:t,...Z?{verticalMarginFrame:Z}:{},contentHeight:ie,contentBandHeight:ie,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},R=c?Ru(D=>Pu(D,{measurer:n,producer:r+O+(d===Me?"":`|rev:${d}`)+(h?`|reviewers:${h.cacheKey}`:""),cache:o,styleCascade:a,...w?{pageContext:w}:{},...l!==void 0?{defaultTabStopPt:l}:{},compatibilityMode:g?.compatibilityMode,displayMode:d,...h?{revisionAuthorFilter:h}:{},...p?{documentProperties:p}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},...g?.numberingIndex?{numberingIndex:g.numberingIndex}:{}}),g?.numberingIndex,a,d,h):void 0,C=Object.freeze([]),M;if(c){let D=false;for(let _=0;_<Qo;_+=1){A.splice(0,A.length),L=0,M=pa(x,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+O+(d===Me?"":`|rev:${d}`)+(h?`|reviewers:${h.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${L++}`,styleCascade:a,...T?{listItems:T}:{},hostedStory:R,pageContext:w,...l!==void 0?{defaultTabStopPt:l}:{},compatibilityMode:g?.compatibilityMode,tableNestingOffset:1,displayMode:d,...h?{revisionAuthorFilter:h}:{},...p?{documentProperties:p}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},inlineDrawingLayout:c,anchorFrameBase:j,pageContentClip:()=>{let H=j();return w?.storyTop!==void 0?Object.freeze({x:-H.marginLeft,y:-w.storyTop,width:H.pageWidth,height:H.pageHeight}):Jo(H)},collectAnchoredDrawings:H=>{A.push(...H);},columnBoxForParagraph:H=>Object.freeze({x:0,y:H.y,width:t,height:H.height}),pageExclusionZones:()=>C,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});let K=lm(A,c,0,t);if(K.length===0){D=true,C=K;break}if(_>0&&er(C)===er(K)){D=true,C=K;break}C=K;}if(!D)throw new xi(`header/footer exclusion reflow did not converge within ${Qo} passes`)}else M=pa(x,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+O+(d===Me?"":`|rev:${d}`)+(h?`|reviewers:${h.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${L++}`,styleCascade:a,...T?{listItems:T}:{},pageContext:w,...l!==void 0?{defaultTabStopPt:l}:{},compatibilityMode:g?.compatibilityMode,tableNestingOffset:1,displayMode:d,...h?{revisionAuthorFilter:h}:{},...p?{documentProperties:p}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});M=h0(e,M,t,m);let N={partName:e.name,part:e,contentKey:S,...g?.projectionEpoch?{projectionEpoch:g.projectionEpoch}:{},fragments:M.blocks,flowHeight:M.bottom,pageFieldNeeds:y,...A.length>0?{anchoredDrawings:Object.freeze([...A])}:{},withPageContext:D=>!Jr(y)&&!N.anchoredDrawings?.length?I??N:F(D)};return O===""?I=N:b.set(O,N),N};return F(i)}function ya(e,t,n){let r=n-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 mp(u,f,r),f;let m=u.pageFieldProjector;return {...f,pageFieldProjector:p=>{let g=m(p);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-${t}`,index:t,box:o(e.box),contentBox:o(e.contentBox),...s?{header:s}:{},...l?{footer:l}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}var b0=new WeakMap;function xN(e){let t=b0.get(e);if(t!==void 0)return t;let n=[];Bo(e,o=>{let a=o.marker;a&&n.push(q([o.paragraphId,a.text,a.numFmt,String(a.level)]));});let r=n.length===0?"":`|list:${q(n)}`;return b0.set(e,r),r}var x0=new WeakMap;function SN(e){let t=x0.get(e);if(t!==void 0)return t;let n=[];Ya(e,o=>{n.push(Js(o.resource)),o.kind==="anchoredDrawing"&&o.textboxStory?.clippedResourceToken&&n.push(`clip:${o.textboxStory.clippedResourceToken}`);});let r=n.length===0?"":`!${q(n)}`;return x0.set(e,r),r}function Ig(e,t){return q([e,String(t.flowHeight),t.contentKey,t.projectionEpoch??"",SN(t),xN(t)])}function S0(e,t,n){if(!e)return "";let r=(o,a)=>q([...a].map(([i,s])=>Ig(`${o}${i}`,s)).sort());return `|hf:${t},${n},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+q([r("h",e.headers),r("f",e.footers)])}var RN="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",PN="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";function wN(e){let t=new Map;for(let n of e.relationships.get(e.mainDocumentPart)??[]){if(n.type!==RN&&n.type!==PN)continue;let r=E(n);r.mode!=="Internal"||!r.target.ok||t.has(r.target.partName)||t.set(r.target.partName,n.id);}return t}function vN(e){return e.relationships.get(e.mainDocumentPart)??e.relationships}function TN(e){let{view:t,measurer:n,producer:r,cache:o,styleCascade:a,numberingIndex:i,defaultTabStopPt:s,compatibilityMode:l,displayMode:d,revisionAuthorFilter:c,inlineDrawingLayoutForPart:u,drawingLayoutTokenForPart:f,drawingTokenForParagraphForPart:m,linkProjectors:p,projectFieldLink:g}=e,h=new WeakMap,y=new WeakMap,b=(w,k,P)=>{if(k.rId===P)return k;let O=y.get(w);O||(O=new WeakMap,y.set(w,O));let L=O.get(k),A=L?.get(P);if(A)return A;let j={...k,rId:P,withPageContext:W=>b(w,k.withPageContext(W),P)};return L||(L=new Map,O.set(k,L)),L.set(P,j),j},x=new Map,T=null,S=(w,k,P)=>(T!==k&&(T=k,x=wN(w)),x.get(P)),I=(w,k,P)=>{let O=p.epochForPart(w.name),L=c?.cacheKey??"",A=s?.(),j=l?.(),W=f?.(w.name)??"",R=i?.(),C=a?.(),M=p.projectLinkForPart(w.name),N=h.get(w);if(N&&N.width===k&&N.pageHeight===P.height&&N.marginTop===P.margin.top&&N.marginBottom===P.margin.bottom&&N.marginLeft===P.margin.left&&N.marginRight===P.margin.right&&N.producer===r&&N.projectionEpoch===O&&N.revisionAuthorFilterKey===L&&N.defaultTabStopPt===A&&N.compatibilityMode===j&&N.drawingLayoutToken===W&&N.numberingIndex===R&&N.styleCascade===C)return N.story;let D=Fg(w,k,n,r,o,C,void 0,void 0,A,d,u?.(w.name),m?_=>m(w.name,_):void 0,void 0,{pageNumber:1,pageWidth:P.width,pageHeight:P.height,marginLeft:P.margin.left,marginRight:P.margin.right,marginTop:P.margin.top,marginBottom:P.margin.bottom},t.documentProperties(),{compatibilityMode:j,...R?{numberingIndex:R}:{},projectLink:M,...g?{projectFieldLink:g}:{},projectionEpoch:O,projectionTokenForParagraph:_=>p.tokenForParagraphForPart(w.name,_),projectionTokenForTable:_=>p.tokenForTableForPart(w.name,_),...c?{revisionAuthorFilter:c}:{}});return h.set(w,{width:k,pageHeight:P.height,marginTop:P.margin.top,marginBottom:P.margin.bottom,marginLeft:P.margin.left,marginRight:P.margin.right,producer:r,projectionEpoch:O,revisionAuthorFilterKey:L,defaultTabStopPt:A,compatibilityMode:j,drawingLayoutToken:W,numberingIndex:R,styleCascade:C,story:D}),D},F=(w,k,P,O,L)=>{if(!P||P.headers.size===0&&P.footers.size===0)return;let A=L.width-L.margin.left-L.margin.right,j=(W,R)=>{let C=new Map;for(let[M,N]of W){let D=R?.get(M),_=D?.partName===N.name?D.rId:S(w,k,N.name),K=I(N,A,L);C.set(M,_?b(k,K,_):K);}return C};return {titlePage:P.titlePage,evenAndOddHeaders:P.evenAndOddHeaders,headers:j(P.headers,O?.headers),footers:j(P.footers,O?.footers)}},v=()=>{let w=t.currentPackage(),k=vN(w),P=Ac(t.part(),d,c),O=Pm(t.part(),d,c),L=t.headerFooterPartsBySection(),A=t.headerFooterResolutionBySection?.()??Nd$1(w);return P.map((j,W)=>{let R=O[W]??W;return F(w,k,L[R],A[R],Or(j.properties))})};return {sectionFurniture:v,furniture(){let w=v();return w[w.length-1]}}}function FN(e,t,n,r,o){let a=_t(e,r,o);if(!n)return t.map(s=>{if(s.blockStart===s.blockEndExclusive)return;let l=a[s.blockEndExclusive-1];return l?.kind==="paragraph"?En(l):void 0});let i=[];for(let s of a){if(s.kind!=="paragraph")continue;let l=En(s);l&&i.push(l);}for(;i.length<t.length;)i.push(void 0);return i}function IN(e){let t=e.view.currentPackage(),n=If$1(t,"footnote"),r=If$1(t,"endnote");if(!n&&!r)return;let o=e.view.part();if(Jf$1(o).length===0)return;let a=xf(t),i=yf(a),s=zf$1(a),l=Af$1(void 0,i),d=Bf$1(void 0,s),c=Dc(o,e.displayMode,e.revisionAuthorFilter),u=FN(o,c.sections,c.truncated,e.displayMode,e.revisionAuthorFilter),f=c.sections.map((h,y)=>Af$1(vf$1(u[y]),i)),m=c.sections.map((h,y)=>Bf$1(wf(u[y]),s)),p=e.inlineDrawingLayoutForPart?h=>{let y=e.inlineDrawingLayoutForPart(h);if(y)return {inlineDrawingLayout:y,...e.drawingTokenForParagraphForPart?{drawingTokenForParagraph:b=>e.drawingTokenForParagraphForPart(h,b)}:{}}}:void 0,g=[n,r];return {footnotesPart:n,endnotesPart:r,footnotePropsBySection:f.length>0?f:[l],endnotePropsBySection:m.length>0?m:[d],documentFootnoteProps:l,documentEndnoteProps:d,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade?.(),numberingIndex:e.numberingIndex?.(),defaultTabStopPt:e.defaultTabStopPt,compatibilityMode:e.compatibilityMode,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,projectLinkForPart:e.linkProjectors.projectLinkForPart,linkRelsEpoch:g.map(h=>h?e.linkProjectors.epochForPart(h.name):"").join("\0"),...e.projectFieldLink?{projectFieldLink:e.projectFieldLink}:{},projectionTokenForParagraphForPart:e.linkProjectors.tokenForParagraphForPart,projectionTokenForTableForPart:e.linkProjectors.tokenForTableForPart,projectionEpoch:g.map(h=>h?e.linkProjectors.epochForPart(h.name):"").join("\0"),...p?{drawingsForPart:p}:{},...p&&e.drawingLayoutEpochForPart?{drawingLayoutEpoch:g.map(h=>h?e.drawingLayoutEpochForPart(h.name):"").join("\0")}:{}}}function kN(e,t,n){return of(e.currentPackage(),t,n)}var ON=new TextEncoder,CN=512,ho=Object.freeze({title:"field-projected",creator:"field-projected",subject:"field-projected",keywords:"field-projected",lastModifiedBy:"field-projected",description:"field-projected",company:"reserved",manager:"reserved"}),EN=Object.freeze({title:ho.title,creator:ho.creator,subject:ho.subject,keywords:ho.keywords,lastModifiedBy:ho.lastModifiedBy,description:ho.description}),kg=Object.freeze(Object.keys(EN)),R0=Object.freeze({title:"doc-property:title",creator:"doc-property:creator",subject:"doc-property:subject",keywords:"doc-property:keywords",lastModifiedBy:"doc-property:lastModifiedBy",description:"doc-property:description"}),P0=new WeakMap;function MN(e){let t=P0.get(e);if(t)return t;let n=[],r=[e],o=[e];for(;o.length>0;){let l=o.pop();if(l!==e&&l.kind==="paragraph"&&r.push(l),l.kind==="hyperlink"&&n.push(l),l.kind!=="textValue")for(let d=l.children.length-1;d>=0;d-=1)o.push(l.children[d]);}let a=new Set;for(let l of r){let d=si(l,[],void 0,void 0,void 0,void 0,"all-markup",void 0,void 0,void 0,void 0,R0),c=new Set(d.map(u=>u.text));for(let u of kg)c.has(R0[u])&&a.add(u);}let i=kg.filter(l=>a.has(l)),s=Object.freeze({links:Object.freeze(n),documentProperties:Object.freeze(i)});return P0.set(e,s),s}function w0(e){return a(ON.encode(q(e)))}var v0=new WeakMap;function T0(e,t){let n=new WeakMap,r=new WeakMap,o=s=>{let l=e.packageRevision(),d=e.currentPackage(),c=v0.get(e);(!c||c.revision!==l||c.pkg!==d)&&(c={revision:l,pkg:d,epochs:new Map},v0.set(e,c));let u=c.epochs.get(s);if(u!==void 0)return u;let f=["story-projection-part:v1",s];f.push(q(Object.keys(ho).map(g=>`${g}:${ho[g]}`)));for(let g of d.relationships.get(s)??[])f.push(q([g.id,g.type,g.rawTarget,g.targetMode,String(g.order)]));for(let g of d.externalTargets)g.ownerPart===s&&f.push(q([g.id,g.type,g.rawTarget,g.sinkSafe?"1":"0"]));let m=e.documentProperties();for(let g of kg)f.push(q([g,m[g]??""]));let p=`story-projection-part:${w0(f)}`;return c.epochs.size<CN&&c.epochs.set(s,p),p},a=(s,l)=>{let d=MN(l);if(d.links.length===0&&d.documentProperties.length===0)return "";let c=t(s),u=o(s),f=n.get(l),m=f?.get(c);if(m?.epoch===u)return m.token;let p=e.documentProperties(),g=["story-projection:v1"];for(let b of d.links){let x=c(b);g.push(x?q([x.id,x.kind,x.href??"",x.anchor??"",x.tooltip??""]):"no-link");}for(let b of d.documentProperties)g.push(q([b,p[b]??""]));let h=`story-projection:${w0(g)}`,y=f??new WeakMap;return y.set(c,{epoch:u,token:h}),f||n.set(l,y),h};return Object.freeze({tokenForParagraphForPart:a,tokenForTableForPart:(s,l)=>{let d=t(s),c=o(s),u=r.get(l),f=u?.get(d);if(f?.epoch===c)return f.token;let m=Xo(l,g=>a(s,g)),p=u??new WeakMap;return p.set(d,{epoch:c,token:m}),u||r.set(l,p),m},epochForPart:o})}var LN=512;function F0(e){return t=>{if(t.kind==="textValue")return null;let n=$a$1(t,e);return {id:t.id,kind:n.kind,href:n.href,...n.anchor!==void 0?{anchor:n.anchor}:{},...n.tooltip!==void 0?{tooltip:n.tooltip}:{}}}}function BN(e){let t=F0(o=>e.relationshipTarget(o)),n=new Map,r=o=>{let a=n.get(o);if(a)return a;let i=F0(s=>of(e.currentPackage(),o,s));return n.size<LN&&n.set(o,i),i};return Object.freeze({projectLink:t,projectLinkForPart:r,...T0(e,r)})}var NN=4096;function AN(e){let t=e.tooltip!==null?{tooltip:q$1(e.tooltip)}:{};if(e.target!==null){let o=L(e.target);if(o.ok&&o.href.length>0&&x(o.href).ok){let i=e.anchor!==null&&!o.href.includes("#")?L(q$1(e.anchor)):null;return {kind:"external",href:i&&i.ok&&i.href.length>0?`${o.href}#${i.href}`:o.href,authored:e.target,...e.anchor!==null?{anchor:q$1(e.anchor)}:{},...t}}if(e.anchor===null)return null}if(e.anchor===null)return null;let n=q$1(e.anchor),r=L(n);return {kind:"internal",href:r.ok&&r.href.length>0?`#${r.href}`:null,authored:e.anchor,anchor:n,...t}}function DN(){let e=new Map,t=new Map,n=0;return {project(r){let o=AN(r);if(!o)return null;let a=`${r.target??""}\0${r.anchor??""}\0${r.tooltip??""}`,i=e.get(a);if(i===void 0){if(e.size>=NN)return null;i=`field-hyperlink:${++n}`,e.set(a,i),t.set(i,Object.freeze({id:i,paragraphId:"",start:0,end:0,text:"",kind:o.kind,href:o.href,authored:o.authored,...o.anchor!==void 0?{anchor:o.anchor}:{},...o.tooltip!==void 0?{tooltip:o.tooltip}:{}}));}return {id:i,kind:o.kind,href:o.href,...o.anchor!==void 0?{anchor:o.anchor}:{},...o.tooltip!==void 0?{tooltip:o.tooltip}:{}}},linkById:r=>t.get(r)??null,clear(){e.clear(),t.clear();}}}function I0(e,t,n){if(!t)return e.map(n);let r=0;if(e.length!==t.bodies.length)for(;r<Math.min(e.length,t.bodies.length)&&e[e.length-1-r]===t.bodies[t.bodies.length-1-r];)r+=1;return e.map((o,a)=>o===t.bodies[a]?t.prepared[a]:a>=e.length-r?t.prepared[a+t.bodies.length-e.length]:n(o))}function k0(e,t){return e.length===t.length&&e.every((n,r)=>{let o=t[r];return n===o||n.kind==="paragraph"&&o.kind==="paragraph"&&n.id===o.id})}function O0(e,t){return e!==1?"columns":t?.size?JSON.stringify([...t].sort()):"body"}var jN=1584,C0=1e4,HN="http://schemas.openxmlformats.org/wordprocessingml/2006/main";function xl(e){if(e===void 0||!/^-?\d{1,8}$/.test(e))return null;let t=Number(e)/20;return Math.abs(t)<=jN?t:null}function E0(e){let t=[e],n=0;for(;t.length;){let r=t.pop();if(++n>C0||r.namespaceUri!==HN||["drawing","pict","object","sectPr","footnoteReference","endnoteReference","pageBreakBefore","ins","del","moveFrom","moveTo","pPrChange","rPrChange"].includes(r.localName)||r.localName==="br"&&r.attributes.some(o=>o.localName==="type"&&o.value!=="textWrapping")||n+t.length+r.children.length>C0)return false;for(let o of r.children)o.kind!=="textValue"&&t.push(o);}return true}function M0(e){let t;for(let m of e)m.localName==="framePr"&&(t=m);if(!t?.attributes)return null;let n=t.attributes,r=new Set(["x","y","w","hAnchor","vAnchor","wrap","anchorLock","hSpace","vSpace"]);if(Object.keys(n).some(m=>!r.has(m)))return null;let o=n.wrap??"around";if(!["around","none","notBeside"].includes(o))return null;let a=xl(n.hSpace??"0"),i=xl(n.vSpace??"0");if(a===null||i===null||a<0||i<0||n.anchorLock!==void 0&&!["0","1","true","false","on","off"].includes(n.anchorLock))return null;let s=xl(n.x),l=xl(n.y),d=xl(n.w);if(s===null||l===null||d===null||d<=0)return null;let c=n.hAnchor??"text",u=n.vAnchor??"text";if(!["page","margin","text"].includes(c)||!["page","margin","text"].includes(u)||u==="text"&&l<0)return null;let f=q(Object.keys(n).sort().map(m=>q([m,n[m]])));return {x:s,y:l,width:d,wrap:o,hSpace:a,vSpace:i,horizontalAnchor:c,verticalAnchor:u,token:f}}function L0(e,t,n){let r=n[t.horizontalAnchor].x+t.x,o=n[t.verticalAnchor].y+t.y,a=i=>({...i,x:i.x+r,y:i.y+o});return {...e,outOfFlow:true,box:a(e.box),...e.shadingBox?{shadingBox:a(e.shadingBox)}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:a(e.bottomBorder.box)}}:{},...e.borders?{borders:e.borders.map(i=>({...i,box:a(i.box)}))}:{},...e.marker?{marker:{...e.marker,box:a(e.marker.box)}}:{},lines:e.lines.map(i=>({...i,box:a(i.box),contentX:i.contentX+r,spans:i.spans.map(s=>({...s,box:a(s.box)})),...i.drawings?{drawings:i.drawings.map(s=>Qn(s,r,o))}:{}}))}}function B0(e){let t=0;for(let n of e){if(n.kind!=="paragraph"||!n.positionedFrame)continue;let{box:r,vSpace:o}=n.positionedFrame;t=Math.max(t,r.y+r.height+o);}return t}var N0=new WeakMap;function Og(e){let t=N0.get(e);if(t)return t;let n=new Map;for(let r of e){let o=n.get(r.anchorId)??[];o.push(r),n.set(r.anchorId,o);}return N0.set(e,n),n}function A0(e,t,n,r,o,a){let i=[],s;for(let l=e.length-1;l>=0;l-=1){let d=e[l];if(d.kind==="paragraph"&&!d.props.some(u=>u.localName==="framePr")){s=d.paragraph.id;continue}if(d.kind!=="table")continue;let c=Lt(d.table,t,0,n,r,o,a)?.float;!c||c.ySpec==="inline"||s&&i.push({table:d.table,sourceIndex:l,anchorId:s,float:c});}return i.reverse()}function zN(e,t){let n=e??[];return n.length===t.length&&n.every((r,o)=>r.anchorId===t[o].anchorId&&r.column===t[o].column&&r.fragmentIndex===t[o].fragmentIndex&&r.anchorY===t[o].anchorY)}function Cg(e,t){let n=t.pendingPositionedTableTokens,r=e.pendingPositionedTableTokens;return (n===r||n?.length===r?.length&&n?.signature===r?.signature)&&zN(e.positionedTableAnchorSignals,t.positionedTableAnchorSignals??[])}function D0(e,t){let n=new Map,r=new Map,o=new Set;for(let l of e){let d=JSON.stringify([l.table.id,t[l.sourceIndex]]);n.set(l.table.id,d),r.set(d,l.table.id),o.add(l.anchorId);}let a$1,i=l=>{a$1={token:l,previous:a$1,length:(a$1?.length??0)+1,signature:a(new TextEncoder().encode(q([a$1?.signature??"",l])))};},s=l=>{if((a$1?.length??0)!==l.size){a$1=void 0;for(let d of l){let c=n.get(d);c&&i(c);}}};return {add(l,d){if(s(l),l.has(d))return;let c=n.get(d);c&&(l.add(d),i(c));},note(l,d,c,u,f){o.has(d)&&l.push({anchorId:d,column:c,fragmentIndex:u,anchorY:f});},checkpoint(l,d){return s(l),{pendingPositionedTableTokens:a$1,positionedTableAnchorSignals:[...d]}},restore(l,d,c){d.clear();let u=[];for(let f=l.pendingPositionedTableTokens;f;f=f.previous)u.push(f.token);for(let f=u.length-1;f>=0;f--){let m=r.get(u[f]);m&&d.add(m);}a$1=l.pendingPositionedTableTokens,s(d),c.splice(0,c.length,...l.positionedTableAnchorSignals??[]);},same(l,d,c,u){return s(c),Cg({pendingPositionedTableTokens:l,positionedTableAnchorSignals:d},{pendingPositionedTableTokens:a$1,positionedTableAnchorSignals:u})}}}function _0(e,t,n,r,o){let a=Og(e),i=0;for(let s of r){let l=a.get(s.anchorId);if(!l)continue;let d=s.fragmentIndex+i,c=n.length;for(let f of l){if(!t.has(f.table.id))continue;let m=n.length;o(f.table,s.column,s.anchorY,d);for(let p=m;p<n.length;p++){let g=n[p];g.kind==="table"&&(n[p]={...g,floatingWrap:{anchorId:s.anchorId,columnIndex:s.column,float:f.float,sourceOrder:f.sourceIndex}});}t.delete(f.table.id);}let u=n.splice(c);n.splice(d,0,...u),i+=u.length;}r.length=0;}function vu(e){return e.kind==="table"&&e.outOfFlow===true}function j0(e,t,n){return {text:{top:t,height:Math.max(0,e.contentHeight-t)},margin:{top:n-e.contentInsetTop,height:Math.max(0,e.pageHeight-n-e.marginBottom)},page:{top:-e.contentInsetTop,height:e.pageHeight}}}function H0(e,t){for(let n=t;n<e.length;n+=1){let r=e[n];if(!vn(r))return true}return false}function Eg(e,t,n){let r=n[e.vertAnchor],o=r.height-t,a;if(e.ySpec==="center"?a=r.top+o/2:e.ySpec==="bottom"||e.ySpec==="outside"?a=r.top+o:e.ySpec?a=r.top:a=r.top+e.yPt,!Number.isFinite(a))return r.top;let i=n.page.top+n.page.height;return Math.max(n.page.top,Math.min(a,i))}var GN={kind:"covered",id:"hashed",paragraphId:"covered",fragmentIndex:"covered",clipToBox:"hashed",outOfFlow:"hashed",positionedFrame:"hashed",range:"hashed",props:"hashed",styleId:"hashed",outlineLevel:"hashed",alignment:"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"},VN={kind:"covered",floatingWrap:"hashed",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function W0(e){return Object.keys(e).filter(t=>e[t]==="hashed")}var KN=W0(GN),$N=W0(VN),z0=new WeakMap;function Tu(e){let t=z0.get(e);if(t!==void 0)return t;let n=e.kind==="table"?JSON.stringify([vu(e),...$N.map(r=>e[r])]):JSON.stringify(KN.map(r=>e[r]));return z0.set(e,n),n}function G0(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r!==o&&Tu(r)!==Tu(o))return false}return true}function Mg(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return false;return true}var V0=Object.freeze([]),K0=new Map;function $0(e,t){if(e===t)return true;if(e.size!==t.size)return false;for(let[n,r]of e)if(t.get(n)!==r)return false;return true}function X0(e,t){let n=e,r=-1;for(let o=0;o<=t.length;o++){let a$1=t[o];if(a$1?.frame&&r<0&&(r=o),r<0||a$1&&(a$1.frame||a$1.kind!=="paragraph"))continue;let i=Math.min(o,e.length-1),s=a(new TextEncoder().encode(q(e.slice(r,i+1))));n===e&&(n=[...e]);for(let l=r;l<=i;l++)n[l]=q([e[l],s]);r=-1;}return n}function Lg(e,t){return e===t||e?.length===t?.length&&e?.signature===t?.signature}var Fu=class{pending;checkpoint(){return this.pending}restore(t){this.pending=t;}same(t){return Lg(this.pending,t)}start(t,n){let r=this.pending?.item;return r&&r.fragment.paragraphId===n&&r.frame.token===t.token?{cursorY:r.fragment.box.y+r.fragment.box.height,previousSpaceAfter:r.fragment.spacing.after,groupId:r.groupId}:{cursorY:0,previousSpaceAfter:0}}add(t,n,r=n.paragraphId,o=0){let a$1=this.pending?.item,i=a$1?.groupId===r?a$1:void 0,s={frame:t,fragment:n,groupId:r,sourceOrder:i?.sourceOrder??o},l=a(new TextEncoder().encode(q([this.pending?.signature??"",t.token,r,String(s.sourceOrder),Tu(n)])));this.pending={item:s,previous:this.pending,length:(this.pending?.length??0)+1,signature:l};}publish(t,n,r){if(!this.pending)return [];let o=new Array(this.pending.length);for(let s=this.pending;s;s=s.previous)o[s.length-1]=s.item;let a=new Map,i=o.map(s=>{let l=L0(s.fragment,s.frame,t),d={x:t[s.frame.horizontalAnchor].x+s.frame.x,y:l.box.y,width:s.frame.width,height:l.box.height},c=a.get(s.groupId);if(c){let u=Math.max(c.x+c.width,d.x+d.width),f=Math.max(c.y+c.height,d.y+d.height);c.x=Math.min(c.x,d.x),c.y=Math.min(c.y,d.y),c.width=u-c.x,c.height=f-c.y;}else a.set(s.groupId,d);return {item:s,fragment:l}});return this.pending=void 0,i.map(({item:s,fragment:l})=>({...l,positionedFrame:{anchorId:n,columnIndex:r,groupId:s.groupId,sourceOrder:s.sourceOrder,wrap:s.frame.wrap,hSpace:s.frame.hSpace,vSpace:s.frame.vSpace,box:a.get(s.groupId)}}))}};var U0=new WeakMap;function XN(e){let t=U0.get(e);if(t!==void 0)return t;let n=o=>o.some(a=>a.localName==="pBdr"),r=n(e.docDefaultsParagraph);if(!r){for(let o of e.styles.values())if(n(o.paragraphProperties)){r=true;break}}return U0.set(e,r),r}function Y0(e,t){return !t||!XN(t)?Fr(e):js(vi(t,e).paragraphPropertyNodes)}var yo=8,q0=2,UN=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Bg(e){let t=e?.val;return t!=="0"&&t!=="false"&&t!=="off"}function Z0(e){let t=false,n=false,r=true;for(let o of e)switch(o.localName){case "keepNext":t=Bg(o.attributes);break;case "keepLines":n=Bg(o.attributes);break;case "widowControl":r=Bg(o.attributes);break;}return !t&&!n&&r?UN:{keepNext:t,keepLines:n,widowControl:r}}function J0(e,t,n,r,o){if(e<=t)return e;if(r.keepLines&&!o)return t;if(!r.widowControl||n<q0)return e;let a=e;return n-a<q0&&(a-=1),a-t===1&&(a-=1),a<t&&(a=t),a===t&&o?e:a}function Q0(e,t,n,r,o){let a=0,i=n;for(let s=t;s-t<yo;s+=1){let l=e[s];if(l&&o?.(s))continue;if(!l||l.kind!=="paragraph"||!l.spacing||!l.keeps)return null;a+=Math.max(l.spacing.before,i)-i;let d=r(s);if(!l.keeps.keepNext||s+1>=e.length)return a+=d[0]??0,l.keeps.widowControl&&d.length>1&&(a+=d[1]),a;for(let c of d)a+=c;a+=l.spacing.after,i=l.spacing.after;}return null}function YN(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);o!==void 0&&(n===e&&(n=[...e]),n[r]=`${n[r]}~mk~${o}`);}return n}function qN(e,t,n){let r=e;for(let o=0;o<e.length;o+=1){if(!t(o))continue;let a=n(o);if(a===null)continue;let i=o>0&&n(o-1)===a,s=o+1<e.length&&n(o+1)===a;r===e&&(r=[...e]),r[o]=`${r[o]}~cs~${i?1:0}${s?1:0}`;}return r}function ZN(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);if(o==="")continue;let a=r>0&&t(r-1)===o,i=r+1<e.length&&t(r+1)===o;n===e&&(n=[...e]),n[r]=`${n[r]}~bg~${a?1:0}${i?1:0}`;}return n}function JN(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);o!==""&&(n===e&&(n=[...e]),n[r]=`${n[r]}~toc~${o}`);}return n}function QN(e,t,n){let r=e,o=0,a=-1;for(let i=e.length-1;i>=0;i-=1)n?.(i)||(a>=0&&t(i)&&o<yo?(r===e&&(r=[...e]),r[i]=`${e[i]}~kn~${r[a]}`,o+=1):o=0,a=i);return r}function ev(e,t){let n=t.terminalTableGroup,r=n?e.map((a,i)=>i>=n.start&&i<=n.anchorIndex?q([a,n.token]):a):e,o=qN(r,t.contextualSpacingAt,t.styleIdAt);return o=ZN(o,t.borderGroupKeyAt),t.tocVerdicts.length>0&&(o=JN(o,a=>t.tocVerdicts[a])),o=YN(o,t.markerTextAt),o=QN(o,t.keepsNextAt,t.skipKeepNextAt),o}function rv(e,t,n,r,o,a){return e.some(i=>{if(i.kind!=="table")return false;let s=Lt(i,t,0,n,r,o,a)?.float;return s!==void 0&&s.ySpec!=="inline"})}function ov(e,t,n){let r;for(let[o,a]of e.entries()){let i;for(let s of a.fragments){if(s.kind!=="table")continue;let l=s.floatingWrap;if(!l)continue;let d=s.box,c=l.float.distances??{top:0,right:0,bottom:0,left:0},u=l.columnIndex,f=n.columnLefts?.[u]??0,m=n.columnWidths?.[u]??n.contentWidth,p={sourceKind:"table",drawingNodeId:`table:${s.tableId}`,anchorParagraphId:l.anchorId,anchorModelStart:0,sourceOrder:l.sourceOrder,paintLayer:"inFront",relativeHeight:0,allowOverlap:true,columnIndex:u,y:d.y,verticalBand:{x:d.x-c.left,y:d.y-c.top,width:d.width+c.left+c.right,height:d.height+c.top+c.bottom},input:{mode:d.x-c.left<=f&&d.x+d.width+c.right>=f+m?"topAndBottom":"square",contentBounds:d,polygon:null,clipPolygon:null,wrapDistances:c,effectInsets:{top:0,right:0,bottom:0,left:0},textSide:"bothSides",contentLeft:f,contentRight:f+m}};i||(r??=new Map(t),i=[...t.get(o)??[]],r.set(o,i)),i.push(p);}}return r??t}var tv=new WeakMap;function Iu(e,t,n){let r;if(!n.inlineDrawingLayout){let d=tv.get(n);d||tv.set(n,d=new WeakMap),r=d.get(e),r||d.set(e,r=new Map);let c=r.get(t);if(c!==void 0)return c}let o=Lt(e,t,0,n.styleCascade,n.displayMode,n.revisionAuthorFilter,n.compatibilityMode);if(!o?.float||o.float.vertAnchor!=="text")return 0;if(o.float.ySpec)return 1/0;let a=e.children.find(d=>d.kind==="tableProperties");if(a&&a.kind!=="textValue"&&a.children.some(d=>d.kind!=="textValue"&&d.localName==="tblOverlap"&&d.attributes.some(c=>c.localName==="val"&&c.value==="never")))return 1/0;let i=0,s=pl(o,0,0,0,e.id,0,{...nr(n),onCellBreakKey:void 0,borderOwnershipBudget:fo(),vMergeResolveBudget:fa(),nextLineId:()=>`floating-table-probe-${i++}`}),l=Math.max(0,o.float.yPt)+s.bottom+(o.float.distances?.bottom??0);return r?.set(t,l),l}function av(e,t,n,r,o,a){if(t.size===0)return 0;let i=0;for(let s of Og(e).get(n)??[]){if(!t.has(s.table.id))continue;let l=Ng(s.table,a.anchorY,r,a.frames,a.earlier,o),d=Iu(s.table,r,o)+l-a.anchorY+Math.min(0,s.float.yPt);i=Math.max(i,d);}return i}function Ng(e,t,n,r,o,a){let i=Lt(e,n,0,a.styleCascade,a.displayMode,a.revisionAuthorFilter,a.compatibilityMode),s=i?.float;if(!i||!s||s.vertAnchor!=="text"||s.ySpec)return t;let l=i.columnWidthsPt.reduce((p,g)=>p+g,0),d=s.distances??{top:0,right:0,left:0},c=ua(s,l,r)-d.left,u=Iu(e,n,a)-Math.max(0,s.yPt)+d.top,f=t+s.yPt-d.top,m=o.flatMap(p=>p.kind==="table"?p.floatingWrap?[]:[p.box]:p.lines.flatMap(g=>[...g.spans.filter(h=>h.text.trim()).map(h=>h.box),...(g.drawings??[]).map(h=>h.paintBounds)])).sort((p,g)=>p.y-g.y);for(let p of m)c<p.x+p.width&&c+l+d.left+d.right>p.x&&f<p.y+p.height&&f+u>p.y&&(f=p.y+p.height);return f+d.top-s.yPt}function iv(e){let t=0;for(let n of e)n.kind!=="table"||n.floatingWrap?.float.vertAnchor!=="text"||(t=Math.max(t,n.box.y+n.box.height+(n.floatingWrap.float.distances?.bottom??0)));return t}var nv=new WeakMap;function sv(e,t,n){if(!n.pageExclusionZones||!t?.size)return false;let r=nv.get(n);if(r?.zones!==t){let i=1/0;for(let s of t.values())for(let l of s)i=Math.min(i,n.paragraphOrderIndex?.(l.anchorParagraphId)??l.sourceOrder);r={zones:t,order:i},nv.set(n,r);}let o=[e],a=0;for(;o.length;){let i=o.pop();if(++a>1e4)return true;if(i.kind==="paragraph"){if(r.order<=(n.paragraphOrderIndex?.(i.id)??Number.MAX_SAFE_INTEGER))return true;continue}if(a+o.length+i.children.length>1e4)return true;for(let s of i.children)s.kind!=="textValue"&&o.push(s);}return false}var lv=new WeakMap;function dv(e,t){if(t){let n=lv.get(t);if(n===void 0){n=t.docDefaultsParagraph.some(r=>r.localName==="framePr");for(let r of t.styles.values())if(r.paragraphProperties.some(o=>o.localName==="framePr")){n=true;break}lv.set(t,n);}if(n)return true}return e.some(n=>n.kind==="paragraph"&&n.children.some(r=>r.kind==="paragraphProperties"&&r.children.some(o=>o.localName==="framePr")))}function cv(e,t,n){let r;for(let[o,a]of e.entries()){let i=new Set,s;for(let l of a.fragments){if(l.kind!=="paragraph")continue;let d=l.positionedFrame;if(!d||i.has(d.groupId))continue;i.add(d.groupId);let c=d.box,u=d.columnIndex,f=n.columnLefts?.[u]??0,m=n.columnWidths?.[u]??n.contentWidth,p={left:d.hSpace,right:d.hSpace,top:d.vSpace,bottom:d.vSpace},g=c.x-d.hSpace<=f&&c.x+c.width+d.hSpace>=f+m,h={sourceKind:"frame",sourceOrder:d.sourceOrder,drawingNodeId:`frame:${d.groupId}`,anchorParagraphId:d.anchorId,anchorModelStart:0,paintLayer:"inFront",relativeHeight:0,allowOverlap:true,columnIndex:u,y:c.y,verticalBand:{x:c.x-d.hSpace,y:c.y-d.vSpace,width:c.width+2*d.hSpace,height:c.height+2*d.vSpace},input:{mode:d.wrap==="none"||d.wrap==="notBeside"||g?"topAndBottom":"square",contentBounds:c,polygon:null,clipPolygon:null,wrapDistances:p,effectInsets:{left:0,right:0,top:0,bottom:0},textSide:"bothSides",contentLeft:f,contentRight:f+m}};s??=[...t.get(o)??[]],s.push(h);}s&&(r??=new Map(t),r.set(o,s));}return r??t}function Ag(e,t=false){let n=new Set;for(let r of e){let o=new Set;for(let a of r.fragments){if(a.kind!=="paragraph"||!a.positionedFrame)continue;let i=a.positionedFrame,s=i.wrap!=="around"||i.box.x-i.hSpace<=0&&i.box.x+i.box.width+i.hSpace>=r.contentBox.width,l=i.box.y-i.vSpace,d=i.box.y+i.box.height+i.vSpace;(t||s&&d>0&&l<r.contentBox.height&&i.box.height+2*i.vSpace>=r.contentBox.height-.001)&&o.add(i.groupId);}for(let a of r.fragments)a.kind==="paragraph"&&a.positionedFrame&&o.has(a.positionedFrame.groupId)&&n.add(a.paragraphId);}return n}function uv(e){let{geometry:t,insets:n}=e;return Object.freeze({pageNumber:e.pageNumber,onPageParityRead:e.onPageParityRead,pageWidth:t.width,pageHeight:t.height,marginLeft:t.margin.left,marginRight:t.margin.right,marginBottom:t.margin.bottom,contentInsetTop:n.top,contentInsetBottom:n.bottom,contentWidth:e.contentWidth,contentHeight:e.contentHeight,contentBandHeight:n.height,ownerPartName:e.ownerPartName,storyKind:"body"})}function fv(e,t,n){if(e.listItem!==void 0||e.shading!==void 0)return false;let{top:r,bottom:o,left:a,right:i,between:s}=e.borders;return (r??o??a??i??s)||n&&jt(e.paragraph,n).length>0?false:t.every(l=>l.drawings.length===0&&!l.pageBreakAfter&&!l.columnBreakAfter&&l.spans.every(d=>d.text.length===0))}function pv(e,t,n,r,o,a,i,s,l,d=0){let c=0,u={...nr(s),cache:void 0,borderOwnershipBudget:void 0,vMergeResolveBudget:void 0,onCellBreakKey:void 0,nextLineId:()=>`probe-progress-${c++}`};return fl(e,t,n,r,o,false,a,i,u,l,d).fitted}var nA="http://schemas.openxmlformats.org/wordprocessingml/2006/main",mv=8192,rA=32,oA=64,gv=new WeakMap;function aA(e){let t=gv.get(e);if(t!==void 0)return t;let n=e.rows.some(r=>r.cells.some(o=>o.vMergeContinue));return gv.set(e,n),n}var iA=new Set(["p","r","t","tab","br","cr","noBreakHyphen","softHyphen","hyperlink","fldSimple","fldChar","instrText","bookmarkStart","bookmarkEnd","proofErr","pPr","rPr"]);function sA(e,t){let n=0;for(let r of e){let o=0;for(let a of r.cells){if(a.vMergeContinue||a.textDirection!=="horizontal"||a.gridColumn!==o||(o+=a.gridSpan,o>t))return false;for(let i of a.blocks){if(i.kind!=="paragraph")return false;let s=[{node:i,depth:0,properties:false}];for(;s.length>0;){let{node:l,depth:d,properties:c}=s.pop();if(++n>mv||d>rA)return false;if(l.kind==="textValue")continue;if(l.namespaceUri!==nA||!c&&!iA.has(l.localName)||l.localName==="br"&&l.attributes.some(f=>f.localName==="type"&&f.value!=="textWrapping")||["drawing","pict","object","txbxContent","tbl","vMerge","framePr"].includes(l.localName)||n+s.length+l.children.length>mv)return false;let u=c||l.localName==="pPr"||l.localName==="rPr";for(let f of l.children)s.push({node:f,depth:d+1,properties:u});}}}if(o!==t)return false}return true}function hv(e,t,n,r,o,a,i,s,l){if(e.cellSpacingPt>0||e.float||t.length===0||t.length>oA||e.columnWidthsPt.length>1024||![r,o,a,i,s].every(Number.isFinite)||aA(e)||(l.pageExclusionZones?.().length??0)>0||!sA([...t,n],e.columnWidthsPt.length))return;let d=t.reduce((T,S)=>T+S.cells.length,n.cells.length);if(l.borderOwnershipBudget&&l.borderOwnershipBudget.intervalsRemaining<d||!n.cantSplit&&n.height.rule!=="exact"&&s>a-o-i+.001)return;let c=t[t.length-1],u=el([c.cells,n.cells],e.tableBorders,e.columnWidthsPt.length)[0],f=new Map,m=[];for(let[T,S]of c.cells.entries()){let I=0;for(let F of u[T].edgeSegments??[]){if(F.side!=="bottom")continue;let v=rr(F.edge);I=Math.max(I,v),m.push({start:F.gridStart,end:F.gridEnd,extent:v});}f.set(S.id,{...mo(S.margins,S.borders,S.legacyContentAlignment===true),bottom:S.margins.bottom+I});}let p=0;for(let T of n.cells){let S=0,I=T.gridColumn+T.gridSpan;for(;p<m.length&&m[p].end<=T.gridColumn;)p++;for(let F=p;F<m.length&&m[F].start<I;F++)S=Math.max(S,m[F].extent);f.set(T.id,{...mo(T.margins,T.borders,T.legacyContentAlignment===true),top:T.margins.top+S});}if([c,n].every(T=>T.cells.every(S=>{let I=mo(S.margins,S.borders,S.legacyContentAlignment===true),F=f.get(S.id);return I.top===F.top&&I.bottom===F.bottom})))return;let g=0,h={...nr(l),cache:void 0,borderOwnershipBudget:void 0,vMergeResolveBudget:void 0,onCellBreakKey:void 0,cellContentInsets:f,nextLineId:()=>`probe-header-border-${g++}`},y=o;for(let T of t){let S=ir(T,e.columnWidthsPt,r,y,true,0,h);if(y=S.bottom,S.remainder!==null||y>a+.001)return null}let b=y-o,x=ir(n,e.columnWidthsPt,r,y,false,0,h);return x.remainder!==null||x.bottom>a+.001?null:{bodyRowId:n.id,headerHeight:b,bodyHeight:x.bottom-y,deps:{...l,cellContentInsets:f}}}var lA=Number.MAX_SAFE_INTEGER/1024;function yv(e,t){let{columnWidth:n,columnLeft:r,contentHeight:o,advanceColumn:a,anchorFrames:i,verticalAnchorFrames:s,styleCascade:l,displayMode:d,revisionAuthorFilter:c,deps:u,shiftAnchor:f,publishFragment:m}=t,p=n(),g=Lt(e,p,0,l,d,c,t.compatibilityMode);if(!g||g.rows.length===0)return {outOfFlow:false};let h=g.float!==void 0&&(g.float.vertAnchor!=="text"||t.positionTextTable===true)&&g.float.ySpec!=="inline",y=t.cursorY,b=h?s():void 0,x=h?()=>lA:o,T=g.columnWidthsPt.reduce((X,Q)=>X+Q,0),S=()=>g.float?ua(g.float,T,i()):r()+Li(g,n()),I=S();!h&&g.float&&g.float.vertAnchor==="text"&&!g.float.ySpec?t.cursorY=Math.max(0,Math.min(t.cursorY+g.float.yPt,x())):h&&g.float&&b&&(t.cursorY=Eg(g.float,0,b));let F=(X,Q=t.cursorY)=>hg(X,g.columnWidthsPt,I,0,u,g.cellSpacingPt,void 0,u.pageExclusionZones?.().length?Q:void 0),v=[];for(let X of g.rows)if(X.isHeader)v.push(X);else break;let w=0;for(let X of v)w+=F(X,t.cursorY+w);let k=w>(t.unreservedContentHeight?.()??x())+.001,P=!k,O=0,L=t.cursorY,A=[],j=new Map,W=[],R=new Map,C,M,N=(X,Q)=>{Q.cellContentInsets&&R.set(X,Q.cellContentInsets);},D=()=>{if(A.length===0)return;let X=Di(A,g,W,u.borderOwnershipBudget,u.vMergeResolveBudget,void 0,f,u,R),Q=X[X.length-1],pe=cl({kind:"table",...h?{outOfFlow:true}:{},id:`${e.id}#f${O}`,tableId:e.id,fragmentIndex:O,rows:X,box:{x:I,y:L,width:g.columnWidthsPt.reduce((Ie,me)=>Ie+me,0),height:Q.box.y+Q.box.height-L}},g.columnWidthsPt,0,j),ue=pe;if(h&&g.float&&b){let me=Eg(g.float,pe.box.height,b)-pe.box.y;if(ue=Ai([pe],me)[0],Math.abs(me)>.001){let Pe=ce=>{for(let re of ce)if(re.kind==="paragraph")f(re.paragraphId,me);else for(let we of re.rows)for(let ye of we.cells)Pe(ye.blocks);};for(let ce of pe.rows)for(let re of ce.cells)Pe(re.blocks);}}m(ue),O+=1,A=[],W=[],R=new Map,C=void 0;},_=(X,Q)=>{if(v.length===0)return;let pe=X?M?.():void 0;if(pe===null)return;let ue=pe?.headerHeight??w;if(X&&t.cursorY+ue>x()+.001)return;t.cursorY+ue>x()+.001&&t.cursorY>0&&(D(),a(),I=S(),L=t.cursorY);let Ie=!X&&t.cursorY+ue>x()+.001?t.unreservedContentHeight?.()??x():x();if(!X&&t.cursorY+ue>Ie+.001){k=true,P=false;return}if(X&&!pe&&Q&&!Q(t.cursorY+ue))return;let me=pe?.deps??u;for(let Pe of v){let ce=ir(Pe,g.columnWidthsPt,I,t.cursorY,X,0,me,g.cellSpacingPt);if(ce.bottom>Ie+.001)throw new Nn("table-row-overheight",`Table header row ${Pe.id} overflowed the page content box`);A.push(ce.record),N(ce.record,me),W.push(Pe),t.cursorY=ce.bottom;}C=pe;},K=X=>{D(),a(),I=S(),L=t.cursorY,P&&_(true,X);};k||_(false);let H=g.rows.slice(k?0:v.length),z=yg(g,()=>I,0,u,H),$,U=0,ie=0,Z=(X,Q)=>{$=Yw(z,X,t.cursorY,x()),ie=$?.heightFloorPt??F(Q??H[X]),U=$?.heightFloorPt??(C?.bodyRowId===H[X]?.id?C.bodyHeight:ie);};for(let[X,Q]of H.entries()){k&&X>=v.length&&(P=true),Z(X,Q);let pe=gg(Q),ue=false,Ie=0,me=false,Pe=()=>C?.bodyRowId===Q.id?C.deps:u;M=()=>ue?void 0:hv(g,v,Q,I,t.cursorY,x(),w,ie,u);let ce=$!==void 0&&$.detachedSpanHeightPtByCellId===void 0,re=we=>{let ye=x(),_e=ye-we;return _e<=.001?false:!ue&&U<=_e+.001?true:!ue&&(Q.cantSplit||Q.height.rule==="exact")?false:pv(Q,g.columnWidthsPt,I,we,ye,ue,0,u,pe,g.cellSpacingPt)};for(!ce&&U<=x()+.001&&t.cursorY+U>x()+.001&&t.cursorY>0&&(K(re),me=true,Z(X));;){if(Ie+=1,Ie>Su)throw new Nn("table-row-fragment-limit",`Table row ${Q.id} exceeded ${Su} page fragments`);let we=x()-t.cursorY;if(we<=.001&&t.cursorY>0){if(me)throw new Nn("table-row-overheight",`Table row ${Q.id} cannot fit after repeated header rows`);K(re),me=true,Z(X);continue}if(!ue&&U<=we+.001){let Se=ir(Q,g.columnWidthsPt,I,t.cursorY,false,0,Pe(),g.cellSpacingPt,$,x());if(Se.bottom>x()+.001)throw new Nn("table-row-overheight",`Table row ${Q.id} overflowed the page content box after placement`);let xe=Se.remainder!==null;if(A.push(Se.record),N(Se.record,Pe()),W.push(xe?xu(Q,ue,true):Q),t.cursorY=Se.bottom,!xe)break;pe=Se.remainder,ue=true,me=false,K(re);continue}if(!ue&&(Q.cantSplit||Q.height.rule==="exact")){if(t.cursorY>0&&!me){K(re),me=true,Z(X);continue}let Se=t.unreservedContentHeight?.()??x();if(Se>x()+.001&&U<=Se-t.cursorY+.001){let xe=ir(Q,g.columnWidthsPt,I,t.cursorY,false,0,Pe(),g.cellSpacingPt,$,Se);if(xe.bottom<=Se+.001&&xe.remainder===null){A.push(xe.record),N(xe.record,Pe()),W.push(Q),t.cursorY=xe.bottom;break}}throw new Nn("table-row-overheight",Q.height.rule==="exact"?`Table row ${Q.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${Q.id} has w:cantSplit and is taller than the available page content`)}let ye=fl(Q,g.columnWidthsPt,I,t.cursorY,x(),false,ue,0,u,pe,g.cellSpacingPt,$);if(!ye.fitted&&t.cursorY>0&&!me){K(re),me=true,Z(X);continue}let _e=t.unreservedContentHeight?.()??x();if(!ye.fitted&&t.cursorY<=.001&&!me&&_e>x()+.001){K(re),me=true,Z(X);continue}if(!ye.fitted)throw new Nn(ye.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",ye.nestedSplitBlocked?`Table row ${Q.id} contains a nested table taller than the page content box`:`Table row ${Q.id} has content that cannot fit a page content box`);if(ye.bottom>x()+.001)throw new Nn("table-row-overheight",`Table row ${Q.id} overflowed the page content box`);let Ce=ye.remainder!==null,Be=xu(Q,ue,Ce);if(A.push(ye.record),W.push(Be),t.cursorY=ye.bottom,!Ce)break;pe=ye.remainder,ue=true,me=false,K(re);}}return D(),h&&(t.cursorY=y),{outOfFlow:h}}var Hi="http://schemas.openxmlformats.org/wordprocessingml/2006/main",dA=32,bv=1e4,xv=1e4;function cA(e){if(e.kind!=="paragraph"||e.listItem||e.shading||e.paragraph.children.some(r=>r.kind==="paragraphProperties"?false:r.kind==="textValue"||r.namespaceUri!==Hi?true:["bookmarkStart","bookmarkEnd","proofErr"].includes(r.localName)?r.children.length!==0:r.kind!=="run"||r.children.some(o=>o.kind!=="runProperties"))||e.props.some(r=>["framePr","numPr","pBdr","shd","pageBreakBefore"].includes(r.localName)))return false;let t=[e.paragraph],n=0;for(;t.length;){let r=t.pop();if(++n>xv||r.namespaceUri!==Hi||["ins","del","moveFrom","moveTo","pPrChange","rPrChange","vanish","webHidden"].includes(r.localName)||n+t.length+r.children.length>xv)return false;for(let o of r.children){if(o.kind==="textValue")return false;t.push(o);}}return true}function uA(e){let t=[e],n=0;for(;t.length;){let r=t.pop();if(++n>bv||r.namespaceUri!==Hi||r!==e&&r.kind==="table"||["vMerge","hMerge","tblHeader","drawing","pict","object","fldChar","fldSimple","instrText","footnoteReference","endnoteReference","ins","del","moveFrom","moveTo","sdt","altChunk","framePr"].includes(r.localName)||r.localName==="tblOverlap"&&!r.attributes.some(o=>o.namespaceUri===Hi&&o.localName==="val"&&o.value==="overlap")||n+t.length+r.children.length>bv)return false;for(let o of r.children)o.kind!=="textValue"&&t.push(o);}return true}function fA(e){let t;for(let a of e.children)if(a.kind==="tableProperties"){if(t)return false;t=a;}if(!t)return false;let n=t.children.filter(a=>a.kind!=="textValue"&&a.localName==="tblpPr");if(n.length!==1)return false;let r=n[0];if(r.kind==="textValue"||r.namespaceUri!==Hi||r.children.length)return false;let o=new Set;for(let a of r.attributes){if(a.namespaceUri!==Hi||o.has(a.localName))return false;if(o.add(a.localName),a.localName==="vertAnchor"){if(a.value!=="text")return false}else if(a.localName==="horzAnchor"){if(!["text","margin","page"].includes(a.value))return false}else if(a.localName==="tblpXSpec"){if(!["left","center","right","inside","outside"].includes(a.value))return false}else if(a.localName==="tblpX"||a.localName==="tblpY"){if(!/^-?\d+$/.test(a.value)||Math.abs(Number(a.value))>31680)return false}else if(["leftFromText","rightFromText","topFromText","bottomFromText"].includes(a.localName)){if(!/^\d+$/.test(a.value)||Number(a.value)>31680||(a.localName==="topFromText"||a.localName==="bottomFromText")&&Number(a.value)!==0)return false}else return false}return o.has("vertAnchor")}function Sv(e,t,n,r,o,a){let i=e.length-1,s=e[i];if(!s||!cA(s))return;let l=i,d=[],c=[s.key];for(let u=i-1;u>=0;u-=1){let f=e[u];if(f.kind!=="table")break;if(!uA(f.table)||!fA(f.table))return;let p=Lt(f.table,t,0,n,r,o,a)?.float;if(!p||p.vertAnchor!=="text"||p.ySpec||d.length>=dA)return;d.push(f.table),c.push(f.key),l=u;}if(d.length)return {start:l,anchorIndex:i,tables:d.reverse(),token:q(c)}}function Rv(e,t){let{cursorY:n,anchorHeight:r,contentWidth:o,contentHeight:a}=t;if(!Number.isFinite(r)||r<=0||n+r>a+.001)return;let i=e.tables.map(m=>Lt(m,o,0,t.styleCascade,t.displayMode,t.authorFilter,t.deps.compatibilityMode)),s=[],l=n+r,d=0,c={...nr(t.deps),onCellBreakKey:void 0,borderOwnershipBudget:fo(),vMergeResolveBudget:fa(),nextLineId:()=>`terminal-table-probe-${d++}`};for(let m=0;m<i.length;m+=1){let p=i[m];if(!p?.float||!p.rows.length)return;let g=p.columnWidthsPt.reduce((x,T)=>x+T,0),h=ua(p.float,g,t.frames),y=n+p.float.yPt;if(![h,y,g].every(Number.isFinite)||g<=0||h<0||h+g>o+.001||y<n||y>a)return;let b=pl(p,h,y,0,e.tables[m].id,0,c);if(!Number.isFinite(b.bottom)||b.bottom>a+.001||s.some(x=>h<x.right&&h+g>x.left&&y<x.bottom&&b.bottom>x.top))return;l=Math.max(l,b.bottom),s.push({left:h,top:y,right:h+g,bottom:b.bottom});}let u=[];return {fragments:i.map((m,p)=>{let g=[];u.push(g);let{left:h,top:y}=s[p];return {...pl(m,h,y,0,e.tables[p].id,0,{...t.deps,onCellBreakKey:x=>g.push(x)}).fragment,outOfFlow:true}}),bottom:l,cellBreakKeys:u}}function Dg(e,t,n,r){let o=`line:${e}:${n}:${t}`;return r===void 0?o:`${o}:occ:${r}`}var Pv=new WeakMap;function mA(e){let t=Pv.get(e);if(t!==void 0)return t;let n=gA(e);return Pv.set(e,n),n}function gA(e){let t=(n,r)=>{if(n.kind==="textValue"||r>=la$1||_d$1(n)||Yd$1(n)!==null)return false;if(n.kind==="text"||n.localName==="t"){for(let a of n.children)if(a.kind==="textValue"&&a.value.trim().length>0)return true;return false}let o=ma$1(n,r);for(let a of n.children)if(a.kind!=="textValue"&&t(a,o))return true;return false};for(let n of e.children)if(n.kind!=="textValue"&&t(n,0))return true;return false}function Fv(e,t){for(let n of t.resultParagraphIds){let r=Ga$1(e,n);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&mA(r))return true}return false}var wv=new WeakMap,vv=new WeakMap,Tv=new WeakMap;function _g(e){let t=wv.get(e);if(t)return t;let n=new Set;for(let r of ye(e))n.add(r.beginParagraphId),n.add(r.endParagraphId);return wv.set(e,n),n}function jg(e){let t=vv.get(e);if(t)return t;let n=new Set;for(let r of ye(e))Fv(e,r)||n.add(r.beginParagraphId);return vv.set(e,n),n}function Hg(e){let t=Tv.get(e);if(t)return t;let n=new Set;for(let r of ye(e))if(!Fv(e,r))for(let o of r.resultParagraphIds)n.add(o);return Tv.set(e,n),n}var hA=.4;function zg(e,t,n){return e&&Kd$1(e,"first")&&n===0?"first":e&&Kd$1(e,"even")&&(t+n+1)%2===0?"even":"default"}function Iv(e){let{furniture:t,pageHeight:n,marginTop:r,marginBottom:o}=e,a=n*hA,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=zg(t,e.pageIndexStart,l),c=i.get(d);if(c)return c;let u=s(e.headerDistance,t?.headers.get(d),r),f=s(e.footerDistance,t?.footers.get(d),o),m=Object.freeze({top:u,bottom:f,height:n-u-f});return i.set(d,m),m}}var Wg=new WeakMap;function cY(e){Wg.delete(e);}function Sl(e,t){Wg.set(e,t);}function Gg(e,t,n,r){return Wg.get(e)?.(t,n,r)}var ba=24;function kv(e){let{furniture:t,geometry:n,headerDistance:r,footerDistance:o,pageIndexStart:a}=e,i=c=>({x:0,y:c*(n.height+ba),width:n.width,height:n.height}),s=c=>zg(t,a,c),l=(c,u,f)=>{if(!t)return;let m=s(u),p=(c==="header"?t.headers:t.footers).get(m);if(!p)return;let g=v=>{let w=c==="header"?f.y+r:f.y+n.height-o-v.flowHeight;return {kind:c,variant:m,partName:v.partName,...v.part?{part:v.part}:{},...v.rId?{rId:v.rId}:{},box:{x:f.x+n.margin.left,y:w,width:e.contentWidth,height:v.flowHeight},fragments:v.fragments,...v.anchoredDrawings?{anchoredDrawings:v.anchoredDrawings}:{}}},h=a+u+1,y={pageNumber:h,pageCount:Math.max(h,e.pageCount()+1),sectionPageCount:u+1},b=e.insetsFor(u),x=v=>{let w=p;for(let k=0;k<8;k+=1){let P=c==="header"?r:n.height-o-w.flowHeight,O={...v,contentInsetTop:b.top,contentInsetBottom:b.bottom,storyTop:P},L=p.withPageContext(O);if(Math.abs(L.flowHeight-w.flowHeight)<=.001)return L;w=L;}throw new Error("header/footer attached-page anchor layout did not converge")},T=p.pageFieldNeeds,I=Jr(T)||(p.anchoredDrawings?.length??0)>0?x(y):p,F=g(I);return Jr(T)?{...F,pageFieldProjector:v=>g(x(v))}:F};return {pageBox:i,variantFor:s,furnitureFor:l,overflowShellAt:(c,u)=>{let f=c-a,m=l("header",f,u),p=l("footer",f,u);return {insets:e.insetsFor(f),...m?{header:m}:{},...p?{footer:p}:{}}}}}function Ov(e){if(e.delta===0)return true;let t=e.delta%2===0||!e.evenAndOddHeaders&&!e.parityDependent&&!e.usedPageParity,r=!(e.titlePage||e.continuedInsets)||e.markPageCount>0&&e.delta+e.markPageCount>0;return t&&r&&!e.hasNoteReserves&&!e.hasExclusionZones}var yA="http://schemas.openxmlformats.org/wordprocessingml/2006/main",bA="http://schemas.microsoft.com/office/word/2010/wordml",xA="http://schemas.microsoft.com/office/word/2012/wordml";function SA(e){if(e.kind!=="textValue"){for(let t of e.attributes)if(t.localName==="val"&&t.namespaceUri===yA)return t.value}}function zi(e){for(let t of e.children)if(t.kind!=="textValue"&&(t.kind==="contentControlProperties"||t.localName==="sdtPr"))return t}function xa(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}}function Lr(e,t){let n=xa(e,t);return n?SA(n):void 0}function Rl(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function ku(e){if(!e)return "richText";for(let t of e.children){if(t.kind==="textValue")continue;let n=t.kind,r=t.localName,o=t.namespaceUri;if(n==="contentControlDropDownList"||r==="dropDownList")return "dropdown";if(n==="contentControlComboBox"||r==="comboBox")return "comboBox";if(n==="contentControlDate"||r==="date")return "date";if(r==="picture")return "picture";if(n==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(n==="contentControlCheckbox"||r==="checkbox"&&o===bA)return "checkbox";if(r==="repeatingSection"&&o===xA)return "repeatingSection"}return "richText"}function Cv(e){let t=(n,r)=>{for(let o of n)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(Cd$1(o)&&r<Bd$1){let a=t(Fd$1(o),r+1);if(a)return a}}return null};return t(Fd$1(e),0)??"inline"}function Wi(e){let t=Ev.get(e);if(t!==void 0)return t;let n=RA(e);return Ou!==null&&Ou===n?n=Ou:Ou=n,Ev.set(e,n),n}var Ou=null,Ev=new WeakMap,Mv=new WeakMap;function RA(e){let t=(n,r)=>{if(n.kind==="textValue")return "";let o=n.kind==="paragraph"||n.kind==="table"||Cd$1(n);if(o){let i=Mv.get(n);if(i!==void 0&&i.depth===r)return i.token}let a;if(Cd$1(n)){if(r>=Bd$1)return "";let i=zi(n),s=[n.id,Lr(i,"alias")??"",Lr(i,"tag")??"",Rl(Lr(i,"lock")),ku(i),xa(i,"showingPlcHdr")?"1":"0",xa(i,"dataBinding")?"1":"0"].join(":"),l=Fd$1(n).map(d=>t(d,r+1)).filter(d=>d.length>0);a=[s,...l].join("|");}else a=n.children.map(i=>t(i,r)).filter(i=>i.length>0).join("|");return o&&Mv.set(n,{depth:r,token:a}),a};return t(e.root,0)}function Bv(e,t){let n=[t],r=new Set([t]);for(let o of e.pages)for(let a of [o.header,o.footer])!a?.part||r.has(a.part)||(r.add(a.part),n.push(a.part));return n}var Vg=new WeakMap,Lv=new WeakMap;function Nv(e){if(e.length===1)return Pl(e[0]);let t=Vg.get(e[0]);if(t&&Cu(t.parts,e))return t.index;let n=e.map(d=>Pl(d)),r=Lv.get(n[0]);if(r&&Cu(r.indexes,n))return Vg.set(e[0],{parts:e,index:r.index}),r.index;let o=[],a=new Set,i=new Set;for(let d of n){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 Lv.set(n[0],{indexes:n,index:l}),Vg.set(e[0],{parts:e,index:l}),l}var Kg=new WeakMap;function Cu(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return false;return true}var Av=new WeakMap;function PA(e){for(let t of wd$1(e))if(t.root.kind!=="textValue"){for(let n of t.root.children)if(n.kind!=="textValue")return n}return null}function Pl(e){let t=Kg.get(e);if(t!==void 0)return t;let n=vA(e),r=PA(e),o=r?Av.get(r):void 0;if(o&&Cu(o.lists,n))return Kg.set(e,o.index),o.index;let a=[];for(let d of n)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&&Av.set(r,{lists:n,index:l}),Kg.set(e,l),l}var wA=Object.freeze([]);function vA(e){let t=[],n=(i,s,l=0)=>{for(let d of i){if(d.kind==="paragraph"||d.kind==="table"){s.push(d.id);continue}let c=vd$1(d);if(c!==null&&l<Bd$1){n(c,s,l+1);continue}(d.kind==="tableRow"||d.kind==="tableCell")&&n(d.children,s,l);}},r=(i,s,l,d,c)=>{if(!(d>=la$1)){for(let u of i)if(!(u.kind==="textValue"||u.kind==="paragraphProperties")){if(Cd$1(u)){let f=Me$1(s).spanOf(u);if(!f)continue;let m=zi(u),p=Rl(Lr(m,"lock")),g=[...c,p];r(Fd$1(u),s,l+1,d+1,g),t.push({control:u,nestingDepth:l,lockStack:g,level:"inline",paragraphId:s.id,range:f,blockIds:[]});continue}na$1(u)&&r(u.children,s,l,d+1,c);}}},o=(i,s,l,d=0)=>{for(let c of i){if(c.kind==="textValue")continue;if(c.kind==="paragraph"){r(c.children,c,s,0,l);continue}if(c.kind==="table"){for(let y of c.children)y.kind==="tableRow"&&o([y],s,l,d);continue}if(c.kind==="tableRow"){for(let y of c.children)y.kind==="tableCell"?o(y.children,s,l,d):Cd$1(y)&&o([y],s,l,d);continue}if(!Cd$1(c)){let y=vd$1(c);y!==null&&d<Bd$1&&o(y,s,l,d+1);continue}if(s>=Bd$1)continue;let u=zi(c),f=Rl(Lr(u,"lock")),m=[...l,f],p=Cv(c),g=vd$1(c)??[];if(p==="inline"){o(g,s+1,m,d+1);continue}let h=[];n(g,h),t.push({control:c,nestingDepth:s,lockStack:m,level:p,blockIds:h}),o(g,s+1,m,d+1);}},a=[];for(let i of wd$1(e))if(i.root.kind!=="textValue")for(let s of i.root.children){if(s.kind==="textValue")continue;let l=Dv.get(s);if(l!==void 0){a.push(l);continue}let d=t.length;o([s],0,[]);let c=t.length===d?wA:Object.freeze(t.slice(d));Dv.set(s,c),a.push(c);}return a}var Dv=new WeakMap,$g=1<<20,_v=new WeakMap,jv=null,Hv=0;function TA(e){return e!==jv&&(jv=e,Hv+=1),Hv}function FA(e,t,n,r){let o=_v.get(e);if(o!==void 0&&o.neededStamp===n)return o;let a=[],i=[],s=e.index*$g,l=0,d=0,c=m=>l===0&&d===0?m:{x:m.x+l,y:m.y+d,width:m.width,height:m.height},u=(m,p)=>{if(p.kind==="paragraph"){t.neededBlockIds.has(p.paragraphId)&&(a.push({pageIndex:m,blockId:p.paragraphId,box:c(p.box)}));let g=t.neededParagraphIds.has(p.paragraphId);for(let h of p.lines){let y=s;if(s=Math.min(s+1,e.index*$g+$g-1),!g)continue;let b=Math.max(0,h.box.height-h.leading-(h.trailingSpacing??0));for(let x of h.spans)i.push({pageIndex:m,paragraphId:x.range.paragraphId,start:x.range.start,end:x.range.end,line:y,box:{x:x.box.x+l,y:x.box.y+h.leading+d,width:x.box.width,height:b}});}return}t.neededBlockIds.has(p.tableId)&&(a.push({pageIndex:m,blockId:p.tableId,box:c(p.box)}));for(let g of p.rows)if(!g.isHeaderRepeat)for(let h of g.cells)for(let y of h.blocks)u(m,y);};for(let m of e.fragments)u(e.index,m);for(let m of [e.header,e.footer])if(m){l=m.box.x-e.contentBox.x,d=m.box.y-e.contentBox.y;for(let p of m.fragments)u(e.index,p);}l=0,d=0;let f={neededStamp:n,blocks:a,spans:i};return _v.set(e,f),f}function IA(e,t,n){let r=TA(t.neededToken),o=new Map,a=new Map,i=new Set;for(let s of e.pages){let l=FA(s,t,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 kA(e,t,n){let r=new Map,o=new Set;for(let a of e)if(!o.has(a)){o.add(a);for(let i of t.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=Rs(i);return s?[{pageIndex:a,box:s}]:[]})}function OA(e,t,n,r){let o=n.spansByParagraph.get(e)??[],a=new Map,i=n.repeatedParagraphs.has(e),s=0,l=o.length;for(;!i&&s<l;){let d=s+(l-s>>1);(t.start===t.end?o[d].end<t.start:o[d].end<=t.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<=t.start)continue;if(c.start>=t.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&&t.start===t.end){let d=[],c=new Set;for(let u=s;u<o.length;u+=1){let f=o[u];if(f.start>t.start){if(i)continue;break}if(t.start>f.end||c.has(f.pageIndex))continue;c.add(f.pageIndex);let m=f.start===f.end?f.box.x:f.box.x+f.box.width*(t.start-f.start)/Math.max(1,f.end-f.start);if(d.push({pageIndex:f.pageIndex,box:{x:m,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=Rs(d.boxes);return c?[{pageIndex:d.pageIndex,box:c}]:[]})}var zv=new WeakMap;function CA(e){let t=zv.get(e);if(t!==void 0)return t;let n=zi(e),r=Lr(n,"alias"),o=Lr(n,"tag"),a={...r!==void 0?{alias:r}:{},...o!==void 0?{tag:o}:{},controlType:ku(n),placeholder:xa(n,"showingPlcHdr")!==void 0,bound:xa(n,"dataBinding")!==void 0};return zv.set(e,a),a}function EA(e,t,n){let r=e.level==="inline"&&e.paragraphId&&e.range?OA(e.paragraphId,e.range,t):kA(e.blockIds,t);return {...Yg(e),fragments:r}}function MA(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];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 LA(e,t){return e.id===t.id&&e.alias===t.alias&&e.tag===t.tag&&e.controlType===t.controlType&&e.lock===t.lock&&e.effectiveLock===t.effectiveLock&&e.placeholder===t.placeholder&&e.bound===t.bound&&e.nestingDepth===t.nestingDepth&&e.level===t.level&&MA(e.fragments,t.fragments)}function Gi(e,t){if(!e)return t.length===0;if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(!LA(e[n],t[n]))return false;return true}function Xg(e,t){return {...t,revision:e.revision,pages:e.pages}}var Wv=new WeakMap;function Ug(e,t,n=Wi(t),r){let o=Bv(e,t);if(o.length>1){let f=o.map(m=>Wi(m));n=f.some(m=>m!=="")?f.join("|"):"";}if(n===""){let f=e.pages.some(p=>p.contentControls!==void 0&&p.contentControls.length>0);if(!f&&e.controlContextToken===n&&Gi(e.contentControls,[]))return e;let m=f?e.pages.map(p=>p.contentControls!==void 0&&p.contentControls.length>0?{...p,contentControls:[]}:p):e.pages;return {...e,pages:m,contentControls:[],controlContextToken:n}}let a=Nv(o),i=IA(e,a),s=a.controls.map(f=>EA(f,i)),l=new Map;for(let f of s)for(let m of f.fragments){let p=l.get(m.pageIndex),g={...f,fragments:[m]};p?p.push(g):l.set(m.pageIndex,[g]);}if(e.controlContextToken===n&&Gi(e.contentControls,s)&&e.pages.every(f=>Gi(f.contentControls,l.get(f.index)??[])))return e;let d=false,c=e.pages.map(f=>{let m=l.get(f.index)??[];if(Gi(f.contentControls,m)||m.length===0&&!f.contentControls)return f;d=true;let p=Wv.get(f);if(p&&Gi(p.controls,m))return p.wrapped;let g={...f,contentControls:m};return Wv.set(f,{controls:m,wrapped:g}),g}),u=d?c:e.pages;return u===e.pages&&e.controlContextToken===n&&Gi(e.contentControls,s)?e:{...e,pages:u,contentControls:s,controlContextToken:n}}function BA(e,t){return Pl(e).controls.filter(r=>t?r.paragraphId!==void 0?t.has(r.paragraphId):Gv(r.control).some(o=>t.has(o)):true).map(Yg)}function Gv(e){let t=[],n=r=>{for(let o of r)if(o.kind!=="textValue"){if(o.kind==="paragraph"){t.push(o.id);continue}if(Cd$1(o)){n(Fd$1(o));continue}n(o.children);}};return n(Fd$1(e)),t}function NA(e,t){let n=null;for(let r of Pl(e).controls)(r.paragraphId===t||r.blockIds.includes(t)||Gv(r.control).includes(t))&&(!n||r.nestingDepth>=n.nestingDepth)&&(n=r);return n?Yg(n):null}function Yg(e){let t=CA(e.control);return {id:e.control.id,...t.alias!==void 0?{alias:t.alias}:{},...t.tag!==void 0?{tag:t.tag}:{},controlType:t.controlType,lock:e.lockStack[e.lockStack.length-1]??"unlocked",effectiveLock:Md(e.lockStack),placeholder:t.placeholder,bound:t.bound,nestingDepth:e.nestingDepth,level:e.level,fragments:[]}}var Vi=1;function Eu(e,t){let n=Math.max(Vi,t),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(m=>Math.max(Vi,We(Ue(m.widthTwips)))),s=o.slice(0,-1).map(m=>Math.max(0,We(Ue(m.gapTwips))));let c=s.reduce((m,p)=>m+p,0),u=Math.max(r*Vi,n-c),f=i.reduce((m,p)=>m+p,0);if(f>u){let m=u/f;i=i.map(p=>Math.max(Vi,p*m));}}else {let c=Math.max(0,We(Ue(e.gapTwips))),u=Math.min(c,Math.max(0,(n-r*Vi)/(r-1||1)));s=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(Vi,(n-s.reduce((m,p)=>m+p,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}}var Vv=new WeakMap,Kv=new WeakMap;function AA(e,t,n){let r=e.map(o=>`${o.blockStart}-${o.blockEndExclusive}`).join(",");return `${t};${n?.cacheKey??""};${r}`}function qg(e){let t=ai(e);return t?t.members.map(n=>n.id):[e.id]}function Zg(e){let t=Kv.get(e);if(t)return t;let n=[],r=(o,a)=>{if(!(a>32||o.kind==="textValue")){if(o.kind==="paragraph"){n.push(o.id);return}for(let i of o.children)r(i,a+1);}};return r(e,0),Kv.set(e,n),n}function DA(e,t){if(e.kind!==t.kind)return false;let n=e.kind==="paragraph"?qg(e):Zg(e),r=t.kind==="paragraph"?qg(t):Zg(t);return n.length===r.length&&n.every((o,a)=>o===r[a])}function $v(e,t,n,r,o){let a=_t(e,n,r),i=AA(t,n,r),s=o?Vv.get(o):void 0;if(s?.boundsFingerprint===i&&s.blocks.length===a.length&&a.every((d,c)=>d===s.blocks[c]||DA(d,s.blocks[c])))return s.blocks=a,s.map;let l=new Map;for(let d=0;d<t.length;d+=1){let c=t[d];for(let u=c.blockStart;u<c.blockEndExclusive;u+=1){let f=a[u];if(!f)continue;let m=f.kind==="paragraph"?qg(f):Zg(f);for(let p of m)l.set(p,d);}}return o&&Vv.set(o,{blocks:a,boundsFingerprint:i,map:l}),l}var Ki=pd$1,wl=512,Jg=6,_A=1/3;function Xv(e,t){return `note-${e}-${t}`}function jA(e){if(!e)return [];let t=[];for(let n of rd(e.root)){if(t.length>=Ki)break;id(n)&&t.push(n);}return t}function Uv(e,t){if(e){for(let n of rd(e.root))if(hd$1(n)===t)return n}}function eh(e,t,n){let r=fd(e),o=gd$1(e);if(!r||o===null)return null;let a=Yc$1(r,o),i=n.displayMode??Me,s=ii(e,i,n.revisionAuthorFilter),l=Xv(r,o),d=0,c=Math.max(1,t),u=n.maxFlowHeightPt??Number.POSITIVE_INFINITY,f=n.noteMarks?{...n.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},m=n.ownerPartName?n.drawingsForPart?.(n.ownerPartName):void 0,p=(n.ownerPartName?n.projectLinkForPart?.(n.ownerPartName):void 0)??n.projectLink,g=kr({numberingIndex:n.numberingIndex,styleCascade:n.styleCascade},s).listItems,h=pa(s,0,c,0,0,{measurer:n.measurer,cache:n.cache,producer:n.producer+(i===Me?"":`|rev:${i}`)+(n.revisionAuthorFilter?`|reviewers:${n.revisionAuthorFilter.cacheKey}`:"")+`|${a}`,nextLineId:()=>`${l}-line-${d++}`,styleCascade:n.styleCascade,...g?{listItems:g}:{},noteMarks:f,...p?{projectLink:p}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.ownerPartName&&n.projectionTokenForParagraphForPart?{projectionTokenForParagraph:T=>n.projectionTokenForParagraphForPart(n.ownerPartName,T)}:{},...n.ownerPartName&&n.projectionTokenForTableForPart?{projectionTokenForTable:T=>n.projectionTokenForTableForPart(n.ownerPartName,T)}:{},...n.refFields?{refFields:n.refFields}:{},displayMode:i,compatibilityMode:n.compatibilityMode,tableNestingOffset:1,...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...m?{inlineDrawingLayout:m.inlineDrawingLayout,...m.drawingTokenForParagraph?{drawingTokenForParagraph:m.drawingTokenForParagraph}:{}}:{},...n.revisionAuthorFilter?{revisionAuthorFilter:n.revisionAuthorFilter}:{}}),y=h.blocks,b=h.bottom,x;if(y.length>wl){y=y.slice(0,wl);let T=y[y.length-1];b=T?T.box.y+T.box.height:0,x="note-fragment-limit";}if(b>u){let T=[],S=0;for(let I of y){let F=I.box.y+I.box.height;if(F>u+.001&&T.length>0)break;T.push(I),S=F;}y=T,b=S,x=x??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:hd$1(e),fragments:y,flowHeight:b,...x?{fallbackReason:x}:{}}}function Qg(e,t,n,r){if(!e)return null;let o=td(e.root,t);return o?eh(o,n,{...r,ownerPartName:e.name}):null}function vl(e,t,n,r,o){if(!o)return Qg(e,t,n,r);let a=`${e?.name??"none"}\0${t}\0${n}`,i=o.get(a);if(i!==void 0)return i;let s=Qg(e,t,n,r);return o.set(a,s),s}function Yv(e,t){return "single"}function qv(e,t,n){let r=ii(e,t,n);if(r.length===0)return true;for(let o of r){if(o.kind!=="paragraph")return false;let a=o.children.find(i=>i.kind==="paragraphProperties");if(Object.keys(Fr(a)).length>0||!HA(o))return false}return true}function HA(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="paragraphProperties"){if(t.kind==="run"){if(!zA(t))return false;continue}return false}return true}function zA(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="runProperties"&&!(dd(t)||ed(t)||cd(t))){if(t.kind==="text"){if(t.children.map(r=>r.value).join("").trim().length>0)return false;continue}return false}return true}function Mu(e,t,n,r,o,a){let i=Yv(),s=Uv(e,t);if(s){if(qv(s,r.displayMode,r.revisionAuthorFilter))return {kind:t,fragments:[],flowHeight:Jg,synthetic:false,ruleStyle:i};let l=eh(s,n,{...r,...e?{ownerPartName:e.name}:{}});if(l&&l.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return l.flowHeight>d+.001?{kind:t,fragments:[],flowHeight:Jg,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:t,fragments:l.fragments,flowHeight:l.flowHeight,synthetic:false}}}return {kind:t,fragments:[],flowHeight:Jg,synthetic:true,ruleStyle:i}}function Zv(e,t){let n=Math.max(1,e*_A);return {x:0,y:Math.max(0,(t-.75)/2),width:n,height:.75}}function Lu(e,t,n,r){if(e.ruleStyle!==void 0||e.synthetic){let o=Zv(n,e.flowHeight);return {x:t+o.x,y:r+o.y,width:o.width,height:Math.max(o.height,e.ruleStyle==="double"?2.25:.75)}}return {x:t,y:r,width:n,height:e.flowHeight}}function $i(e,t){return Math.max(0,e-14-t)}var Tl=.5,Jv=2*Tl;function Bu(e,t,n){if(!e)return "";let r=[];for(let[o,a]of e){let i=o-t;i>=0&&i<n&&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 Qv(e,t,n){n<=0||e.set(t,Math.max(e.get(t)??0,n));}function bo(e){let t=new Map;for(let[n,r]of e)r>0&&t.set(n,r);return t}function Nu(e,t){let n=bo(e),r=bo(t);if(n.size!==r.size)return false;for(let[o,a]of n)if((r.get(o)??0)!==a)return false;return true}function eT(e,t){let n=bo(e);for(let[r,o]of t)o<=0||n.set(r,Math.max(n.get(r)??0,o));return n}function Xi(e){return [...bo(e)].map(([t,n])=>`${t}=${n}`).sort().join(",")}function WA(e,t){if(e.lines.length===0)return e.box.y+e.box.height<=t+.001?{head:e,tail:null}:{head:null,tail:e};let n=0;for(;n<e.lines.length;n+=1){let g=e.lines[n];if(g.box.y+g.box.height>t+.001)break}if(n===0)return {head:null,tail:e};if(n>=e.lines.length)return {head:e,tail:null};let r=e.lines.slice(0,n),o=e.lines.slice(n),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,m=e.borders?.filter(g=>g.side!=="top"),p={...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,...m&&m.length>0?{borders:m}:{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:p}}function Fl(e,t,n){if(e.flowHeight<=t+.001)return {head:e.fragments,headHeight:e.flowHeight,tail:[],tailHeight:0};if(t<=.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<wl;u+=1){let f=e.fragments[u],m=f.box.y+f.box.height;if(m<=t+.001){r.push(f),o=m,a=u+1;continue}if(f.kind==="paragraph"){let p=WA(f,t);if(p.head)r.push(p.head),o=p.head.box.y+p.head.box.height,i=p.tail,a=u+1;else {let g=n?.fullContentHeight??t,y=f.lines[0]?.box.height??f.box.height;if(r.length===0&&t>=g-.001&&y>g+.001){n?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let b=e.fragments.slice(a),x=b[0]?.box.y??0;return {head:[],headHeight:0,tail:Sg(b,-x),tailHeight:Math.max(0,e.flowHeight-x)}}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=Sg(s,-l),c=gl(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}var GA=yo+1;function tT(e){let{bodyPage:t,nextPage:n}=e;if(!n||n.contentBox.width!==t.contentBox.width||n.contentBox.height!==t.contentBox.height)return 0;let r=n,o=e.pageBottomRefsOf(r);if(o.length===0)return 0;let a,i;for(let P of o){let O=yl(r,P);O.bottom<=O.top||(!a||O.bottom<a.bottom-.001)&&(a=O,i=P);}if(!a||!i)return 0;let s=a.bottom-a.top,l=hl(t),d=t.contentBox.height;if(d-l<s-.001)return 0;let c,u=0;for(let P of r.fragments){if(P.kind!=="paragraph"||u>=GA)return 0;if(u+=1,xr(P,i.paragraphId,i.atomOffset)){c=P;break}}if(!c)return 0;let f=o.filter(P=>xr(c,P.paragraphId,P.atomOffset));if(f.length===0)return 0;let m=wu(r),p=Math.max(0,a.bottom-m),g=Math.max(0,Rg(c)-m),h=t.contentBox.width,y=$i(d,e.plainSeparatorHeight),b=0;for(let P of f){let O=vl(e.footnotesPart,P.noteId,h,e.opts,e.noteLayoutCache);if(!O)continue;let L=yl(r,P),A=L.evictable?L.bottom-L.blockTop:0;O.flowHeight>y-A+.001||(b+=O.flowHeight);}if(b<=0)return 0;let x=(e.existingAreaHeight>0?e.existingAreaHeight:e.plainSeparatorHeight)+b,T=Math.max(0,d-l-Tl);if(!(l+p+s+x<=d+.001))return T;if(l+g+s+x<=d+.001)return 0;let{usedReservePt:F}=e;if(F===void 0)return 0;let v=Math.max(0,d-F-l),w=p+s>v+.001,k=Math.abs(F-T)<=Jv;return w&&!k?0:T}var nT=Object.freeze({footnotesPart:"identity-check",endnotesPart:"identity-check",footnotePropsBySection:"content-fingerprint",endnotePropsBySection:"content-fingerprint",documentFootnoteProps:"content-fingerprint",documentEndnoteProps:"content-fingerprint",measurer:"identity-check",producer:"content-fingerprint",displayMode:"content-fingerprint",revisionAuthorFilter:"content-fingerprint",cache:"identity-check",styleCascade:"identity-check",numberingIndex:"identity-check",defaultTabStopPt:"content-fingerprint",compatibilityMode:"content-fingerprint",projectLink:"pass-projector",projectLinkForPart:"relationship-epoch-guarded",linkRelsEpoch:"content-fingerprint",projectionTokenForParagraphForPart:"projection-epoch-guarded",projectionTokenForTableForPart:"projection-epoch-guarded",projectionEpoch:"content-fingerprint",projectFieldLink:"pass-projector",documentProperties:"content-fingerprint",refFields:"content-fingerprint",drawingsForPart:"drawing-epoch-guarded",drawingLayoutEpoch:"content-fingerprint"});function th(e,t){for(let n of Object.keys(nT))if(nT[n]===t&&e[n]!==void 0)return true;return false}function Au(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function rT(e){return th(e,"drawing-epoch-guarded")&&e.drawingLayoutEpoch===void 0||th(e,"relationship-epoch-guarded")&&e.linkRelsEpoch===void 0||th(e,"projection-epoch-guarded")&&e.projectionEpoch===void 0?null:[e.producer,e.displayMode??Me,e.revisionAuthorFilter?.cacheKey??"",e.defaultTabStopPt??"",e.compatibilityMode??"",e.drawingLayoutEpoch??"",e.linkRelsEpoch??"",e.projectionEpoch??"",e.refFields?.valuesToken??"",e.documentProperties?JSON.stringify(e.documentProperties):"",Au(e.documentFootnoteProps),Au(e.documentEndnoteProps),e.footnotePropsBySection.map(Au).join(";"),e.endnotePropsBySection.map(Au).join(";")].join("\0")}function oT(e){let t=0;return e.map((n,r)=>{let o=`page-${r}`,i=n.index===r&&n.id===o&&n.box.y===t?n:ya(n,r,t);return t+=n.box.height+ba,i})}function aT(e){if(e.kind!=="tableRow")return null;let t=e.children.find(a=>a.namespaceUri===da$1&&a.localName==="trPr");if(!t)return null;let n=null;for(let a of t.children)if(a.kind!=="textValue"&&a.namespaceUri===da$1&&!(a.localName!=="ins"&&a.localName!=="del")){n=a;break}if(!n)return null;let r=a=>n.attributes.find(i=>i.namespaceUri===da$1&&i.localName===a)?.value,o=r("date");return {kind:n.localName==="ins"?"insert":"delete",id:r("id")??"",author:r("author")??"",...o===void 0?{}:{date:o},nodeId:n.id}}function iT(e,t,n){let r=[];for(let o of e){let a=Vt(o)?qt(o):aT(o);if(a){if(r.length>=Xd)return false;r=dn(r,a);}}return Le(r,t,n)}function sT(e){let t=[];for(let n of e){let r=Vt(n)?qt(n):aT(n);r&&t.push([r.kind,r.nodeId,r.author]);}return JSON.stringify(t)}function Du(e){return `${e.noteKind}|${e.noteId}|${e.paragraphId}|${e.customMarkFollows?1:0}|${e.sectionIndex}`}function lT(e){return e.map(t=>`${Du(t)}|${t.atomOffset}`).join(";")}function nh(e){return e.map(Du).join(";")}function rh(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r.atomOffset!==o.atomOffset||Du(r)!==Du(o))return false}return true}var ah=64,ST=8,cT=ah+2*ST,RT=4096,PT=256,oh=12,uT=new WeakMap;function VA(e,t,n){if(!e)return {memo:null,allHits:t,reused:false};let r=rT(n);if(r===null)return e.notes=null,{memo:null,allHits:t,reused:false};let o=lT(t),a=null,i=e.notes;if(i){let l=uT.get(i),d=i.inputFingerprint===r&&l!==void 0&&l.footnotesPart===n.footnotesPart&&l.endnotesPart===n.endnotesPart&&l.measurer===n.measurer&&l.cache===n.cache&&l.styleCascade===n.styleCascade&&l.numberingIndex===n.numberingIndex;if(d&&i.hitsFingerprint===o)return {memo:i,allHits:i.allHits,reused:true};if(a=d?nh(t):null,a!==null&&i.identityFingerprint===a)return i.hitsFingerprint=o,i.allHits=t,{memo:i,allHits:t,reused:true}}let s={hitsFingerprint:o,identityFingerprint:a??nh(t),inputFingerprint:r,allHits:t,provisionalMarks:uh(t,n),finalMarks:null,settledReserves:null,reflowSpent:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return uT.set(s,{footnotesPart:n.footnotesPart,endnotesPart:n.endnotesPart,measurer:n.measurer,cache:n.cache,styleCascade:n.styleCascade,numberingIndex:n.numberingIndex}),e.notes=s,{memo:s,allHits:t,reused:false}}function KA(e,t){return t>=e.range.start&&t<e.range.end}var fT=new WeakMap;function wT(e){let t=fT.get(e);if(t)return t;let n=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){n.push(a);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)r(s.blocks);}};return r(e),fT.set(e,n),n}var pT=new WeakMap;function ih(e){let t=pT.get(e);if(t)return t;let n=new Map;for(let r of e){let o=n.get(r.paragraphId);o?o.push(r):n.set(r.paragraphId,[r]);}return pT.set(e,n),n}var mT=new WeakMap;function Il(e,t,n){let r=wT(e.fragments);if(!n)return t.filter(s=>r.some(l=>xr(l,s.paragraphId,s.atomOffset)));let o=mT.get(e.fragments);if(o&&o.refIndex===n)return o.result;let a=[],i=new Set;for(let s of r)for(let l of Ur(s)){let d=n.get(l);if(d)for(let c of d)i.has(c)||xr(s,l,c.atomOffset)&&(i.add(c),a.push(c));}return mT.set(e.fragments,{refIndex:n,result:a}),a}function vT(){let e=new Map;return {get(t,n,r,o,a,i,s){let d=`${t?.name??"none"}\0${o}\0${n}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=Mu(t,n,r,i,o,a);return e.set(d,u),u.fallbackReason&&s.push(u.fallbackReason),u}}}function TT(e){return e==="sectEnd"||e==="docEnd"}var gT=new WeakMap;function FT(e){let t=gT.get(e);return t||(t=new Map,gT.set(e,t)),t}function IT(e,t,n,r,o,a,i,s){if(e)return e.get(t,n,r,o,a,i,s);let l=Mu(t,n,r,i,o,a);return l.fallbackReason&&s.push(l.fallbackReason),l}function $A(e,t){let n=[];for(let r of e){if(n.length>=Ki)break;n.push({...r,sectionIndex:t.get(r.paragraphId)??0});}return n}function Sa(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function sh(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function lh(e,t){return {measurer:e.measurer,producer:e.producer,displayMode:e.displayMode,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:e.defaultTabStopPt,compatibilityMode:e.compatibilityMode,revisionAuthorFilter:e.revisionAuthorFilter,projectLink:e.projectLink,projectLinkForPart:e.projectLinkForPart,projectFieldLink:e.projectFieldLink,documentProperties:e.documentProperties,refFields:e.refFields,noteMarks:t,drawingsForPart:e.drawingsForPart,projectionTokenForParagraphForPart:e.projectionTokenForParagraphForPart,projectionTokenForTableForPart:e.projectionTokenForTableForPart}}function XA(e,t){let n="FootnoteReference";if(!t)return {...Xn,verticalAlign:"superscript"};let r=ra([],[{localName:"rStyle",attributes:{val:n}}],t);return He(r,t.themeFonts)}function UA(e,t,n,r){let o=new Set;for(let c of e.values())c&&c.length>0&&o.add(c);let a=Math.max(t.footnotePropsBySection.length,t.endnotePropsBySection.length,1,...n.map(c=>c.sectionIndex+1),...r.map(c=>c.sectionIndex+1)),i=false;for(let c=0;c<a;c+=1){let u=Sa(t,c);if(u.numRestart==="eachPage"){i=true;for(let m=0;m<oh;m+=1){let p=wn(u.numFmt,u.numStart+m);p.length>0&&o.add(p);}}let f=sh(t,c);if(f.numRestart==="eachPage"){i=true;for(let m=0;m<oh;m+=1){let p=wn(f.numFmt,f.numStart+m);p.length>0&&o.add(p);}}}if(!i||o.size===0)return;let s=XA("footnote",t.styleCascade),l,d=-1;for(let c of o){let u=t.measurer.measure(c,s);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(l?.length??0))&&(l=c,d=u);}return l}function kT(e,t,n){let r=aa("footnote",e,s=>Sa(n,s)),o=aa("endnote",t,s=>sh(n,s)),a=new Map;for(let s of r)a.set(da("footnote",s.noteId),s.mark);for(let s of o)a.set(da("endnote",s.noteId),s.mark);let i=UA(a,n,e,t);return {marks:a,...i?{reservedMarkText:i}:{}}}function YA(e,t){if(t.marks.size===0)return e;let n=false,r=e.pages.map(o=>{if(!qA(o.fragments))return o;let a=OT(o.fragments,t);return a===o.fragments?o:(n=true,{...o,fragments:a})});return n?{...e,pages:r}:e}var hT=new WeakMap;function qA(e){let t=hT.get(e);if(t!==void 0)return t;let n=false,r=o=>{for(let a of o){if(n)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"){n=true;return}continue}for(let i of a.rows)for(let s of i.cells)r(s.blocks);}};return r(e),hT.set(e,n),n}function OT(e,t){let n=false,r=e.map(o=>{if(o.kind==="paragraph"){let s=ZA(o,t);return s!==o&&(n=true),s}let a=false,i=o.rows.map(s=>{let l=false,d=s.cells.map(c=>{let u=OT(c.blocks,t);return u===c.blocks?c:(l=true,{...c,blocks:u})});return l?(a=true,{...s,cells:d}):s});return a?(n=true,{...o,rows:i}):o});return n?r:e}function ZA(e,t){let n=false,r=e.lines.map(o=>{let a=JA(o,t);return a!==o&&(n=true),a});return n?{...e,lines:r}:e}function JA(e,t){let n=false,r=e.spans.map(o=>{let a=QA(o,t);return a!==o&&(n=true),a});return n?{...e,spans:r}:e}function QA(e,t){if(!e.projected||e.noteNav?.direction!=="to-note")return e;let n=t.marks.get(e.noteNav.scopeId);if(n===void 0)return e;let r=n??"";return e.text===r?e:{...e,text:r}}function eD(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function CT(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function tD(e){for(let t=e.length-1;t>=0;t-=1)if(CT(e[t]))return t;return Math.max(0,e.length-1)}function dh(e,t,n,r,o,a,i,s){let l=new Map(a),d=t.filter(N=>N.noteKind==="footnote"),c=e.contentBox.width,u=lh(n,r),f=[],m=0,p=RT,g=a.size>0?"continuationSeparator":"separator",h=Math.max(0,e.contentBox.height),y=N=>IT(s?.separatorCache,n.footnotesPart,N,c,"footnote",h,u,i),b=y(g),x=hl(e),T=Math.max(0,e.contentBox.height-x-b.flowHeight),S=$i(e.contentBox.height,b.flowHeight),I=s?.reserveColumnBudget?S:T,v={fullContentHeight:Math.max(0,e.contentBox.height-b.flowHeight),reasons:i},w=s?.reserveBandOf?g==="separator"?S:$i(e.contentBox.height,y("separator").flowHeight):0,k=s?.reserveBandOf?wu(e):0;for(let[N,D]of a){let _=N.match(/^(footnote|endnote):(-?\d+)$/);if(!_||_[1]!=="footnote")continue;let K=Number(_[2]),H=Math.max(0,I-m);if(D.height<=H+.001)f.push({noteKind:"footnote",noteId:K,scopeId:N,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:D.height},fragments:D.fragments}),m+=D.height,l.delete(N);else {let z=Fl({fragments:D.fragments,flowHeight:D.height},H,v);z.head.length>0&&(f.push({noteKind:"footnote",noteId:K,scopeId:N,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:z.headHeight},fragments:z.head}),m+=z.headHeight),z.tail.length>0?l.set(N,{fragments:z.tail,height:z.tailHeight,mark:null}):l.delete(N);}}let P;for(let N of d){if(f.length>=Ki){i.push("note-count-limit");break}let D=s?.reserveBandOf?.(N);if(P!==void 0&&D&&D.evictable&&D.bottom>P+.001)continue;let _=vl(n.footnotesPart,N.noteId,c,u,s?.noteLayoutCache);if(!_){i.push("missing-note-body");continue}let K=r.marks.get(da("footnote",N.noteId))??null,H=D?Math.min(I,Math.max(0,e.contentBox.height-Math.max(14,D.bottom)-b.flowHeight)):I,z=Math.max(0,H-m);if(D&&D.evictable&&s?.evictionAllowed!==false&&_.flowHeight>z+.001&&_.flowHeight<=w-(D.bottom-D.blockTop)+.001&&D.top>k+.001&&D.top>=14){P=P===void 0?D.top:Math.min(P,D.top);continue}if(p-=_.fragments.length,p<0){i.push("note-area-fragment-limit");break}if(_.flowHeight<=z+.001)f.push({noteKind:"footnote",noteId:N.noteId,scopeId:_.scopeId,mark:N.customMarkFollows?null:K,box:{x:e.contentBox.x,y:0,width:c,height:_.flowHeight},fragments:_.fragments}),m+=_.flowHeight;else {let $=Fl(_,z,v);$.head.length>0&&(f.push({noteKind:"footnote",noteId:N.noteId,scopeId:_.scopeId,mark:N.customMarkFollows?null:K,box:{x:e.contentBox.x,y:0,width:c,height:$.headHeight},fragments:$.head}),m+=$.headHeight),$.tail.length>0&&l.set(_.scopeId,{fragments:$.tail,height:$.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:l,evictionTopPt:P};let O=b.flowHeight,L=O+m,A=gl(e.fragments),j;o==="beneathText"?j=e.contentBox.y+Math.max(x,Math.min(A,e.contentBox.height-L)):(j=e.contentBox.y+e.contentBox.height-L,j=Math.max(j,e.contentBox.y+x));let W=j+O,R=f.map(N=>{let D={...N,box:{...N.box,y:W}};return W+=N.box.height,D}),C=Lu(b,e.contentBox.x,c,j);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:j,width:c,height:L},separator:{kind:g,box:C,fragments:b.fragments,synthetic:b.synthetic,...b.ruleStyle!==void 0?{ruleStyle:b.ruleStyle}:{}},notes:R},nextCarry:l,evictionTopPt:P}}function ET(e,t){let n=Math.min(Math.max(t,0),e.length-1);for(;n>0&&e[n].noteStream!==void 0;)n-=1;return n}function nD(e){return t=>{let n=Gg(e,t.sectionAnchorIndex,t.landingIndex,t.template.box);return rD(t.template,t.landingIndex,t.noteStream,n)}}function rD(e,t,n,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-${t}`,index:t,box:e.box,contentBox:o,fragments:[],...n?{noteStream:n}:{},...a?{header:a}:{},...i?{footer:i}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+1}}:{}}}function oD(e,t){let n=null,r=false,o=e.map((a,i)=>{if(a.noteStream===void 0)return n=a.index,a;if(n===null)return a;let s=Gg(t,n,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,m=aD(a,l-a.contentBox.y,u-f);if(!m.fits(l,u))return a;r=true;let{header:p,footer:g,...h}=a;return {...h,contentBox:c,...m.footnotes?{footnotes:m.footnotes}:{},...m.endnotes?{endnotes:m.endnotes}:{},...s.header?{header:s.header}:{},...s.footer?{footer:s.footer}:{}}});return r?o:[...e]}function yT(e,t){if(t===0)return e;let n=r=>({...r,y:r.y+t});return {...e,box:n(e.box),...e.separator?{separator:{...e.separator,box:n(e.separator.box)}}:{},notes:e.notes.map(r=>({...r,box:n(r.box)}))}}function aD(e,t,n){let r=i=>i.placement==="pageBottom"?n:t,o=e.footnotes?yT(e.footnotes,r(e.footnotes)):void 0,a=e.endnotes?yT(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 ch(e,t){let n=new Set;for(let r of wT(e.fragments))n.add(t.get(r.paragraphId)??0);return [...n].sort((r,o)=>r-o)}function MT(e,t,n){for(let r=e.length-1;r>=0;r-=1)if(ch(e[r],n).includes(t))return r;return Math.max(0,e.length-1)}function iD(e,t,n){let r=MT(e,t,n);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=ch(a,n);if(i.length!==0&&!i.includes(t))return o}return e.length}function sD(e,t){let n=oT(e);return [...Qr({revision:t,pages:n}).pages]}function lD(e,t,n,r,o,a,i,s){let l=new Map(a),d=[];if(t.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};let c=e.contentBox.width,u=lh(n,r),f=s?.separatorKind??"separator",m=C=>C==="footnote"?n.footnotesPart:n.endnotesPart,p=n.endnotesPart??n.footnotesPart,g=Math.max(0,e.contentBox.height),h=IT(s?.separatorCache,p,f,c,"endnote",g,u,i),y=h.flowHeight,b=gl(e.fragments),x=e.endnotes?Math.max(b,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):b,T=eD(e),S=Math.max(0,T-x-y),F={fullContentHeight:Math.max(0,T-y),reasons:i},v=[],w=0,k=RT;for(let[C,M]of a){let N=C.match(/^(footnote|endnote):(-?\d+)$/);if(!N)continue;let D=N[1],_=Number(N[2]),K=Math.max(0,S-w);if(M.height<=K+.001)v.push({noteKind:D,noteId:_,scopeId:C,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:M.height},fragments:M.fragments}),w+=M.height,l.delete(C);else {let H=Fl({fragments:M.fragments,flowHeight:M.height},K,F);H.head.length>0&&(v.push({noteKind:D,noteId:_,scopeId:C,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(C,{fragments:H.tail,height:H.tailHeight,mark:null}):l.delete(C);}}for(let C=0;C<t.length;C+=1){let M=t[C];if(v.length>=Ki){i.push("note-count-limit"),d.push(...t.slice(C));break}let N=m(M.noteKind),D=vl(N,M.noteId,c,u,s?.noteLayoutCache);if(!D){i.push("missing-note-body");continue}let _=r.marks.get(da(M.noteKind,M.noteId))??null,K=Math.max(0,S-w);if(k-=D.fragments.length,k<0){i.push("note-area-fragment-limit"),d.push(...t.slice(C));break}if(D.flowHeight<=K+.001)v.push({noteKind:M.noteKind,noteId:M.noteId,scopeId:D.scopeId,mark:M.customMarkFollows?null:_,box:{x:e.contentBox.x,y:0,width:c,height:D.flowHeight},fragments:D.fragments}),w+=D.flowHeight;else {let H=Fl(D,K,F);H.head.length>0&&(v.push({noteKind:M.noteKind,noteId:M.noteId,scopeId:D.scopeId,mark:M.customMarkFollows?null:_,box:{x:e.contentBox.x,y:0,width:c,height:H.headHeight},fragments:H.head}),w+=H.headHeight),H.tail.length>0&&l.set(D.scopeId,{fragments:H.tail,height:H.tailHeight,mark:null}),d.push(...t.slice(C+1));break}}if(v.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};if(v.length===0)return {area:void 0,nextCarry:l,remainingRefs:d};let P=e.contentBox.y+x,O=P+y,L=v.map(C=>{let M={...C,box:{...C.box,y:O}};return O+=C.box.height,M}),A=Lu(h,e.contentBox.x,c,P),j=y+w,W=Math.max(0,T-x),R=Math.min(j,W);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:P,width:c,height:R},separator:{kind:f,box:A,fragments:h.fragments,synthetic:h.synthetic,...h.ruleStyle!==void 0?{ruleStyle:h.ruleStyle}:{}},notes:L},nextCarry:l,remainingRefs:d}}function dD(e,t,n,r,o,a,i,s,l){let d=e,c=t,u=e[ET(e,e.length-1)].index;for(;c.size>0&&a.remaining>0;){let f=d[d.length-1],m=l({template:f,landingIndex:d.length,noteStream:"footnote-drain",sectionAnchorIndex:u}),p=dh(m,[],n,r,"pageBottom",c,o,{separatorCache:i,noteLayoutCache:s}),g=p.area?.notes.length??0;if(c=p.nextCarry,g===0){o.push("note-overflow-stalled"),p.area&&(d=[...d,{...m,footnotes:p.area}],a.remaining-=1);break}d=[...d,{...m,footnotes:p.area}],a.remaining-=1;}return c.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:d,carry:c}}function cD(e,t,n,r,o,a="endnote-overflow"){let i=r({template:n,landingIndex:t,noteStream:a,sectionAnchorIndex:o});return {pages:[...e.slice(0,t),i,...e.slice(t)],pageIndex:t}}function bT(e,t,n){if(n<=t||t>=e.length)return e;let r=Math.min(n,e.length),o=e[t],a=o.pageFieldSource?.pageNumber??t+1,i=o.pageFieldSource?.format,s=r-t,l=[...e];for(let d=t;d<r;d+=1){let c=l[d];l[d]={...c,pageFieldSource:{pageNumber:a+(d-t),sectionPageCount:s,...i?{format:i}:{}}};}return l}function xT(e,t,n,r,o,a,i,s,l){if(n.length===0||e.length===0)return e;let d=e[ET(e,t)].index,c=[...e],u=[...n],f=new Map,m=t,p=0,g="separator",h=l?.stopBeforeIndex??Number.POSITIVE_INFINITY,y=l?.sectionStartIndex??t,b=l?.stopBeforeIndex!==void 0,x=l?.separatorCache;for(;u.length>0||f.size>0;){if(m>=c.length||m>=h){if(s.remaining<=0){i.push("note-overflow-page-limit");break}let F=c[Math.min(Math.max(m,1),c.length)-1]??c[c.length-1],v=Math.min(m,h,c.length),w=cD(c,v,F,l.mint,d,"endnote-overflow");c=w.pages,m=w.pageIndex,b&&(h=v+1),p+=1,s.remaining-=1;}let T=c[m];if(!CT(T)){m+=1;continue}let S=lD(T,u,r,o,a,f,i,{separatorKind:g,...x?{separatorCache:x}:{},...l.noteLayoutCache?{noteLayoutCache:l.noteLayoutCache}:{}});f=S.nextCarry,u=S.remainingRefs;let I=S.area?.notes.length??0;if(S.area){let F=c[m];c[m]={...F,endnotes:F.endnotes?{...S.area,notes:[...F.endnotes.notes,...S.area.notes],box:{...S.area.box,y:F.endnotes.box.y,height:F.endnotes.box.height+S.area.box.height}}:S.area};}else {if(f.size===0&&u.length===0)break;if(!S.area&&f.size===0&&u.length>0){m+=1,g="separator";continue}}if(I===0&&(f.size>0||u.length>0)&&T.fragments.length===0&&T.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(f.size>0||u.length>0){g="continuationSeparator",m+=1;continue}break}return (u.length>0||f.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),b?c=bT(c,y,Math.min(h,c.length)):p>0&&(c=bT(c,y,c.length)),c}function LT(e,t,n,r,o,a){let i=o??null,s=new Map,l=[],d=new Map,c=ih(t),u=vT(),f=FT(r),m=lh(n,r),p=x=>x.noteKind==="footnote"&&!TT(Sa(n,x.sectionIndex).pos),g=t.some(p),h=x=>Il(x,t,c).filter(p),y=(x,T,S)=>Qv(s,x,Math.min(T,S));for(let x=0;x<e.pages.length;x+=1){let T=e.pages[x],S=Pg(T),F=Il(S,t,c).filter(K=>K.noteKind==="footnote"),v=F.filter(p),w=v[0]?.sectionIndex??0,k=Sa(n,w),P=e.pages[x+1],O=a?a.get(T.index)??0:void 0,L=$i(S.contentBox.height,0),A=K=>g?tT({bodyPage:S,nextPage:P,existingAreaHeight:K,usedReservePt:O,pageBottomRefsOf:h,footnotesPart:n.footnotesPart,opts:m,plainSeparatorHeight:u.get(n.footnotesPart,"separator",S.contentBox.width,"footnote",Math.max(0,S.contentBox.height),m,l).flowHeight,noteLayoutCache:f}):0;if(v.length===0&&d.size===0){y(T.index,A(0),L);continue}if(i&&d.size===0){let K=i.pageReserve.get(T);if(K&&K.marks===r&&rh(F,K.pageRefs)){for(let H of K.reasons)l.push(H);y(T.index,Math.max(K.reserve,A(K.areaHeight)),L);continue}}let j=d.size===0,W=l.length,{area:R,nextCarry:C,evictionTopPt:M}=dh(S,v,n,r,k.pos,d,l,{reserveColumnBudget:true,reserveBandOf:K=>yl(S,K),separatorCache:u,noteLayoutCache:f,evictionAllowed:!P||P.contentBox.width===S.contentBox.width&&P.contentBox.height===S.contentBox.height});d=C;let N=M!==void 0?Math.max(0,S.contentBox.height-M-Tl):0,D=R?.box.height??0,_=Math.min(Math.max(D,N),L);i&&j&&d.size===0&&i.pageReserve.set(T,{pageRefs:F,marks:r,reserve:_,areaHeight:D,reasons:l.slice(W)}),y(T.index,Math.max(_,A(D)),L);}let b=true;for(let x of e.pages){let T=s.get(x.index)??0;if(T<=0)continue;if(hl(x)+T>x.contentBox.height+.5){b=false;break}}return {reserves:s,stable:b,reasons:l}}function BT(e,t,n,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,s={remaining:PT},l=ih(t),d=vT(),c=nD(e),u=[],f=[];for(let I of e.pages)for(let F of Il(I,t,l)){let v={noteId:F.noteId,sectionIndex:F.sectionIndex,pageIndex:I.index,customMarkFollows:F.customMarkFollows};F.noteKind==="footnote"?u.push(v):f.push(v);}let m=o?[...u,...f].map(I=>`${I.noteId}|${I.sectionIndex}|${I.pageIndex??""}|${I.customMarkFollows?1:0}`).join(";"):"",p;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===m?p=o.finalMarks.marks:(p=kT(u,f,n),o&&(o.finalMarks={sitesFingerprint:m,marks:p}));let g=FT(p),h=new Map,y=new Map,b=[],x=e.pages.map(I=>{let F=Il(I,t,l),v=F.filter(C=>C.noteKind==="footnote"),w=F.filter(C=>C.noteKind==="endnote");for(let C of w)if(sh(n,C.sectionIndex).pos==="sectEnd"){let N=y.get(C.sectionIndex)??[];N.push(C),y.set(C.sectionIndex,N);}else b.push(C);for(let C of v){let M=Sa(n,C.sectionIndex);if(M.pos==="sectEnd"){let N=y.get(C.sectionIndex)??[];N.push(C),y.set(C.sectionIndex,N);}else M.pos==="docEnd"&&b.push(C);}if(o&&h.size===0){let C=o.pageAttach.get(I);if(C&&C.marks===p&&rh(v,C.pageRefs)){for(let M of C.reasons)a.push(M);return C.attached}}let k=Pg(I),P=v.filter(C=>{let M=Sa(n,C.sectionIndex).pos;return M==="pageBottom"||M==="beneathText"}),O=P[0]?.sectionIndex??0,L=Sa(n,O),A,j=h.size===0,W=a.length;if(P.length>0||h.size>0||v.length===0&&!TT(L.pos)){let C=dh(k,P,n,p,L.pos,h,a,{separatorCache:d,noteLayoutCache:g});A=C.area,h=C.nextCarry;}let R=A?{...k,footnotes:A}:k;if(o&&j&&h.size===0){let C={pageRefs:v,marks:p,attached:R,reserve:0,reasons:a.slice(W)};if(o.pageAttach.set(R,C),R!==I){let M=o.pageReserve.get(I);M&&o.pageReserve.set(R,M);}}return R}),T=x.length;if(h.size>0){let I=dD(x,h,n,p,a,s,d,g,c);x=I.pages,h=I.carry;}if(y.size>0&&x.length>0){let I=[...y.keys()].sort((F,v)=>F-v);for(let F of I){let v=y.get(F),w=MT(x,F,i),k=iD(x,F,i),P=w;for(let O=0;O<=w;O+=1)if(ch(x[O],i).includes(F)){P=O;break}x=xT(x,w,v,n,p,"sectEnd",a,s,{stopBeforeIndex:k,sectionStartIndex:P,separatorCache:d,noteLayoutCache:g,mint:c});}}return b.length>0&&x.length>0&&(x=xT(x,tD(x),b,n,p,"docEnd",a,s,{separatorCache:d,noteLayoutCache:g,mint:c})),x.length!==T&&(x=oD(x,e),x=sD(x,e.revision)),{layout:YA({...e,pages:x},p),fallbackReasons:a,noteMarks:p}}function uD(e,t,n){return (t==="all-markup"&&n===void 0?Jf$1(e):Kf$1(e,{includeReference:(a,i)=>iT(i,t,n),projectionKey:`${t};${n?.cacheKey??""}`,ancestryKey:sT})).map(a=>({noteKind:a.noteKind,noteId:a.noteId,paragraphId:a.paragraphId,atomOffset:a.atomOffset,customMarkFollows:a.customMarkFollows}))}function NT(e,t,n,r,o){let a=n.displayMode??Me,i=n.revisionAuthorFilter,s=uD(e,a,i);if(s.length===0)return n.session&&(n.session.notes=null,n.session.notePageBottomReserves=null),o({...n,noteMarks:void 0,pageBottomReserves:void 0});let l=$v(e,t,a,i,n.session),d=$A(s,l),c=VA(n.session,d,r),u=c.memo,f=c.allHits,m=u?.provisionalMarks??uh(f,r),p=n.session?.notePageBottomReserves,g=p?bo(p):new Map,h=[],y=o({...n,noteMarks:m,pageBottomReserves:g}),b=Xi(g),x=c.reused&&u?.settledReserves&&u.settledReserves.part===e&&u.settledReserves.fingerprint===b?u.settledReserves:null;if(x)h=[...x.reasons];else {let S=new Set([b]),I=u&&u.reflowSpent&&u.reflowSpent.part===e?u.reflowSpent:{part:e,adopted:0};u&&(u.reflowSpent=I);let F=0,v=p&&g.size>0?ST:ah,w=y.pages.length,k=Math.max(8,Math.ceil(w/16)),P=0;for(let O=0;O<v;O+=1){let L=LT(y,f,r,m,u,g);if(h=[...L.reasons],L.stable&&Nu(L.reserves,g))break;if(I.adopted>=cT){h.push("note-reflow-exhausted");break}if(P>=k){h.push("note-reflow-exhausted");break}let A=bo(L.reserves);if(Nu(A,g)){h.push("note-reflow-exhausted");break}let j=Xi(A);if(S.has(j)){A=eT(g,L.reserves);let W=Xi(A);if(Nu(A,g)||S.has(W)){h.push("note-reflow-exhausted");break}}g=A,S.add(Xi(g)),I.adopted+=1,F+=1,y=o({...n,noteMarks:m,pageBottomReserves:g}),P=y.pages.length>w?P+1:0,w=y.pages.length,O===v-1&&h.push("note-reflow-exhausted");}u&&(F===0||I.adopted>=cT)&&(u.settledReserves={part:e,fingerprint:Xi(g),reasons:[...h]});}let T=BT(y,f,r,{fallbackReasons:h,paragraphSectionIndex:l,memo:u});return n.session&&(n.session.previous=T.layout,n.session.notePageBottomReserves=bo(g)),T.layout}function uh(e,t){let n=[],r=[];for(let o of e){let a={noteId:o.noteId,sectionIndex:o.sectionIndex,customMarkFollows:o.customMarkFollows};o.noteKind==="footnote"?n.push(a):r.push(a);}return kT(n,r,t)}function AT(e,t){let n=e.projectLink??t.projectLink,r=e.projectFieldLink??t.projectFieldLink,o=e.documentProperties??t.documentProperties,a=e.refFields??t.refFields,i=e.displayMode??t.displayMode,s=e.revisionAuthorFilter??t.revisionAuthorFilter;return {...e,...n?{projectLink:n}:{},...r?{projectFieldLink:r}:{},...o?{documentProperties:o}:{},...a?{refFields:a}:{},...i?{displayMode:i}:{},...s?{revisionAuthorFilter:s}:{}}}var fD=8,Ui=[],DT=new TextEncoder;function pD(e,t){let n=a(DT.encode(e===void 0?"undefined":`string:${e}`)),r=a(DT.encode(t));return `control-producer:v1:${n}:${r}`}function HT(e,t){let n=Ui.findIndex(o=>o.base===e&&o.token===t);if(n>=0){let[o]=Ui.splice(n,1);return Ui.push(o),o.producer}let r=pD(e,t);return Ui.push({base:e,token:t,producer:r}),Ui.length>fD&&Ui.shift(),r}var _T=new WeakMap,jT=null;function mD(e,t,n,r,o,a,i,s){return e!=null&&e.base===t&&e.noteMarks===n&&e.defaultTabStopPt===r&&e.displayMode===o&&e.authorFilter===a&&e.pageNumberFormat===i&&e.compatibilityMode===s}function zT(e,t,n,r,o,a,i,s){let l=t?_T.get(t):jT;if(mD(l,e,n,r,o,a,i,s))return l.producer;let d=(e??"unversioned-measurer")+(t?`|sc:${t.cacheToken}`:"")+(n?`|nm:${TP(n)}`:"")+(r!==void 0?`|dts:${r}`:"")+(o===Me?"":`|rev:${o}`)+(a?`|reviewers:${a.cacheKey}`:"")+(i!==void 0?`|pnf:${i}`:"")+(s!==void 0?`|compat:${s}`:""),c={base:e,noteMarks:n,defaultTabStopPt:r,displayMode:o,authorFilter:a,pageNumberFormat:i,compatibilityMode:s,producer:d};return t?_T.set(t,c):jT=c,d}var _u=class{constructor(t){this.dependencies=t;}dependencies;capture(t){let{paragraphFrames:n,positionedFlow:r,pendingFloatIds:o,floatSignals:a,anchorPageDeferCounts:i}=this.dependencies;return {pageCount:t.pageCount,pageFragments:[...t.pageFragments],pendingAnchoredDrawings:[...t.pendingAnchoredDrawings],pendingParagraphFrames:n.checkpoint(),deferredAnchoredDrawings:t.deferredAnchoredDrawings.length>0?[...t.deferredAnchoredDrawings]:V0,anchorPageDeferCounts:i.size>0?new Map(i):K0,...r.checkpoint(o,a),cursorY:t.cursorY,lineCounter:t.lineCounter,previousSpaceAfter:t.previousSpaceAfter,flowColumnIndex:t.flowColumnIndex}}restore(t){let{paragraphFrames:n,positionedFlow:r,pendingFloatIds:o,floatSignals:a,anchorPageDeferCounts:i}=this.dependencies;n.restore(t.pendingParagraphFrames),i.clear();for(let[s,l]of t.anchorPageDeferCounts)i.set(s,l);return r.restore(t,o,a),{pageCount:t.pageCount,pageFragments:[...t.pageFragments],pendingAnchoredDrawings:[...t.pendingAnchoredDrawings],deferredAnchoredDrawings:[...t.deferredAnchoredDrawings],cursorY:t.cursorY,lineCounter:t.lineCounter,previousSpaceAfter:t.previousSpaceAfter,flowColumnIndex:t.flowColumnIndex}}};function WT(e,t){return e.cursorY===t.cursorY&&e.previousSpaceAfter===t.previousSpaceAfter&&e.flowColumnIndex===t.flowColumnIndex&&G0(e.pageFragments,t.pageFragments)&&Lg(e.pendingParagraphFrames,t.pendingParagraphFrames)&&Mg(e.pendingAnchoredDrawings,t.pendingAnchoredDrawings)&&Mg(e.deferredAnchoredDrawings,t.deferredAnchoredDrawings)&&$0(e.anchorPageDeferCounts,t.anchorPageDeferCounts)&&Cg(e,t)}function Br(){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 fh(e,t){let n={previous:t.previous,checkpoints:t.checkpoints,keys:t.keys,context:t.context,producer:t.producer,parityDependent:t.parityDependent,startPageParity:t.startPageParity,prepass:t.prepass,notes:t.notes,startLineCounter:t.startLineCounter,endLineCounter:t.endLineCounter,endCursorY:t.endCursorY,endSpaceAfter:t.endSpaceAfter,endsOpenPage:t.endsOpenPage,stats:t.stats,balanceLimit:t.balanceLimit,multi:t.multi,notePageBottomReserves:t.notePageBottomReserves};Object.assign(e,n);}function GT(e,t,n){return q([...e].map(([r,o])=>`${n}${r}=${o.flowHeight}`).sort())}function $T(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${GT(e.headers,false,"h")};f:${GT(e.footers,false,"f")}`:""}function ju(e,t,n){if(e.sectionFurniture)return e.sectionFurniture[t];if(t===n-1)return e.furniture}function gD(e,t){let n=e.map((r,o)=>{let a=Or(r.properties),i=ju(t,o,e.length),s=r.properties.pageNumbering,l=s?`pn:${q([s.start??"",s.fmt??"",s.chapStyle??"",s.chapSep??""].map(String))}`:"pn:",d=r.properties.columns,c=`cols:${d.count},${d.gapTwips},${d.equalWidth===false?0:1},${d.separator?1:0};${(d.definitions??[]).map(u=>`${u.widthTwips}/${u.gapTwips}`).join(",")}`;return q([r.properties.breakType,a.width,a.height,a.margin.top,a.margin.right,a.margin.bottom,a.margin.left,a.headerDistance??36,a.footerDistance??36,$T(i),l,c].map(String))});return q(n)}function hD(e,t,n){if(!e)return null;let r=e.multi;if(r&&r.structureKey===t&&r.sections.length===n)return r;let o={structureKey:t,sections:Array.from({length:n},()=>Br()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1,previousPageRefToken:""};return e.multi=o,o}function yD(e){return e!=="continuous"}function bD(e,t){return e.width===t.width&&e.height===t.height}function xD(e){let t=e.contentBox.y-e.box.y;return {top:t,bottom:e.box.height-t-e.contentBox.height,height:e.contentBox.height}}function SD(e,t){if(t.fragments.length===0&&!t.columnSeparators?.length&&!t.anchoredDrawings?.length)return e;let n=e.anchoredDrawings||t.anchoredDrawings?Object.freeze([...e.anchoredDrawings??[],...t.anchoredDrawings??[]]):void 0;return {...e,fragments:t.fragments.length>0?[...e.fragments,...t.fragments]:e.fragments,...(e.columnSeparators?.length||t.columnSeparators?.length)&&{columnSeparators:[...e.columnSeparators??[],...t.columnSeparators??[]]},...n?{anchoredDrawings:n}:{}}}function VT(e,t,n){e.previous=t,e.startLineCounter=0,e.endLineCounter=n,e.keys=[],e.checkpoints=[],e.context="",e.producer="";}var KT=new WeakMap;function RD(e,t,n,r,o,a){let i=KT.get(e);if(i&&i.globalIndex===t&&i.sheetY===n&&i.pageNumber===r&&i.sectionPageCount===o&&i.format===a)return i.published;let s=ya(e,t,n),l=ni([s],r,o,a)[0];return KT.set(e,{globalIndex:t,sheetY:n,pageNumber:r,sectionPageCount:o,format:a,published:l}),l}function XT(e,t,n,r,o){let{session:a,...i}=r,s=gD(t,r),l=hD(a,s,t.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=[],m=[],p=0,g=0,h=0,y=0,b=0,x=0,T=0,S=true,I=[],F=null,v="",w=1;for(let L=0;L<t.length;L+=1){let A=t[L],j=e.slice(A.blockStart,A.blockEndExclusive),W=Or(A.properties),R=ju(r,L,t.length),C=u.length,M=p,N=l?.spans[L],D=$T(R);if(j.length===0&&!yD(A.properties.breakType)){m.push({startIndex:C,pageCount:0,sheetY:M,remappedPages:[],sourcePages:[]});continue}let _=L>0&&A.properties.breakType==="continuous"&&u.length>0&&S&&F!==null&&bD(F,W)&&v===D,K=l?.sections[L],H=A.properties.columns.count>1&&t[L+1]?.properties.breakType==="continuous",z=_?xD(u[u.length-1]):void 0,$=A.properties.pageNumbering?.fmt,U=_?u[u.length-1]?.pageFieldSource?.format:void 0,ie=_&&!Zr("PAGE",U)?U:$,Z=o(j,n,{...i,retainKeys:d,geometry:W,furniture:R,sectionColumns:A.properties.columns,...H?{balanceColumns:H}:{},lineCounterStart:g,pageIndexStart:_?C-1:C,..._?{flowStartY:x,spaceBeforeCarry:T}:{},...z?{continuedPageInsets:z}:{},...ie!==void 0?{bodyPageNumberFormat:ie}:{},...K?{session:K}:{}});I.push({startIndex:C,at:Z.overflowShellAt}),g=Z.lineCounter,x=Z.endCursorY,T=Z.endSpaceAfter,S=Z.endsOpenPage,F=W,v=D,K?(h+=K.stats.placed,y+=K.stats.total):(h+=j.length,y+=j.length);let X=K!==void 0&&K.stats.placed===0&&K.stats.reusedPages===Z.pages.length&&N!==void 0&&N.pageCount===Z.pages.length&&N.sourcePages.length===Z.pages.length&&N.sourcePages.every((re,we)=>re===Z.pages[we]),Q=N!==void 0&&N.startIndex===C&&N.sheetY===M&&N.remappedPages.length===Z.pages.length,pe=A.properties.pageNumbering,ue=pe?.start!==void 0?pe.start:w,Ie=pe?.fmt,me=N?.remappedPages[0],Pe=N===void 0||N.remappedPages.length===0||me?.pageFieldSource!==void 0&&me.pageFieldSource.pageNumber===ue&&me.pageFieldSource.sectionPageCount===N.remappedPages.length&&me.pageFieldSource.format===Ie,ce;if(_){let re=u.length-1,we=u[re],ye=SD(we,Z.pages[0]);if(ye!==we){u[re]=ye;let Be=f.lastIndexOf(we);Be!==-1&&(f[Be]=ye);}let _e=[];for(let Be of Z.pages.slice(1)){let Se=ya(Be,u.length+_e.length,p);_e.push(Se),p=Se.box.y+Se.box.height+ba;}let Ce=_e.length+1;ce=ni(_e,ue+1,Ce,Ie);for(let Be of ce)u.push(Be),f.push(Be);w=ue+Ce;}else if(X&&Q&&Pe){ce=N.remappedPages,b+=ce.length;for(let re of ce)u.push(re),f.push(re),p=re.box.y+re.box.height+ba;w=ue+ce.length;}else {let re=[];for(let we of Z.pages){let ye=RD(we,u.length+re.length,p,ue+re.length,Z.pages.length,Ie);re.push(ye),p=ye.box.y+ye.box.height+ba;}ce=re;for(let we of ce)u.push(we),f.push(we);w=ue+ce.length;}m.push({startIndex:C,pageCount:ce.length,sheetY:M,remappedPages:ce,sourcePages:Z.pages});}if(u.length===0){let L=Or(t[0]?.properties??pn),A=o([],n,{...i,retainKeys:d,geometry:L,sectionColumns:t[0]?.properties.columns??pn.columns});c();let j=Qr({revision:n,pages:A.pages});return Sl(j,(W,R,C)=>A.overflowShellAt(R,C)),l&&(l.spans=[],l.previousRemapped=A.pages,l.previousFinalized=j,l.previousPageCount=j.pages.length,l.previousPageRefToken=pp(A.pages)),a&&(VT(a,j,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),j}let k=Qr({revision:n,pages:u}),P=k,O=pp(u);if(l?.previousFinalized&&l.previousPageCount===k.pages.length&&l.previousRemapped.length===f.length&&l.previousPageRefToken===O){let L=l.previousFinalized.pages,A=l.previousRemapped,j=k.pages.map((W,R)=>f[R]===A[R]&&L[R]?L[R]:W);P={...k,pages:j};}return l&&(l.spans=m,l.previousRemapped=f,l.previousFinalized=P,l.previousPageCount=P.pages.length,l.previousPageRefToken=O),a&&(VT(a,P,g),a.stats={placed:h,total:y||1,reusedPages:b,fullPasses:a.stats.fullPasses+(h===y&&b===0?1:0)}),Sl(P,(L,A,j)=>{let W=I[0];for(let C of I)C.startIndex<=L&&(W=C);return (W??I[I.length-1])?.at(A,j)}),c(),P}function UT(e,t,n){let r=t.lefts.map(()=>n);for(let o of e.fragments){if(vn(o))continue;let a=0;for(let i=t.count-1;i>=0;i-=1)if(o.box.x+.5>=t.lefts[i]){a=i;break}r[a]=Math.max(r[a],o.box.y+o.box.height);}return r}var PD=.25,wD=20;function YT(e,t,n,r){let o=Eu(n.sectionColumns??pn.columns,n.geometry.width-n.geometry.margin.left-n.geometry.margin.right);if(!n.balanceColumns||o.count<2||n.columnRegionBottom!==void 0)return n.session&&(n.session.balanceLimit=null),r(e,t,n);let a=n.session,i=n.flowStartY??0,s={...n,session:void 0},l=h=>{let y=h.pages[0],b=y?Math.max(...UT(y,o,i)):h.endCursorY;return a&&(a.endCursorY=b),{...h,endCursorY:b}};if(a&&a.balanceLimit!==null){let h=a.balanceLimit,y=r(e,t,{...n,columnRegionBottom:h});if(a.stats.placed===0&&a.stats.reusedPages===y.pages.length)return a.balanceLimit=h,l(y)}let d=r(e,t,s);if(d.pages.length!==1||!d.endsOpenPage)return a&&(a.balanceLimit=null),r(e,t,n);let c=UT(d.pages[0],o,i),u=c.reduce((h,y)=>h+Math.max(0,y-i),0);if(u<=0)return a&&(a.balanceLimit=null),r(e,t,n);let f=i+u/o.count,m=Math.max(...c)+.01,p=h=>{try{let y=r(e,t,{...s,columnRegionBottom:h});return y.pages.length===1&&y.endsOpenPage}catch{return false}};for(let h=0;h<wD&&m-f>PD;h+=1){let y=(f+m)/2;p(y)?m=y:f=y;}let g=r(e,t,{...n,columnRegionBottom:m});return a&&(a.balanceLimit=m),l(g)}var TD=2,qT=new WeakMap,ZT=new WeakMap;function ph(e){if(e===void 0||e.size===0)return "";let t=ZT.get(e);if(t!==void 0)return t;let n=[...e].join(",");return ZT.set(e,n),n}function FD(e){let t=ph(e.chrome),n=ph(e.placeholder),r=ph(e.suppressed);return t===""&&n===""&&r===""?"":`${t}|${n}|${r}`}function ID(e,t){let n=t.chrome?.has(e)??false,r=t.placeholder?.has(e)??false,o=t.suppressed?.has(e)??false;return !n&&!r&&!o?"":`${n?1:0}${r?1:0}${o?1:0}`}function kD(e,t,n){let r=n.displayMode??Me,o=n.revisionAuthorFilter,a=_t(e,r,o),i=la(e,a).sections,s=Wi(e),l={...n,displayMode:r,producer:HT(n.producer,s),tocFieldChromeParagraphIds:n.tocFieldChromeParagraphIds??_g(e),emptyTocPlaceholderParagraphIds:n.emptyTocPlaceholderParagraphIds??jg(e),emptyTocSuppressedResultParagraphIds:n.emptyTocSuppressedResultParagraphIds??Hg(e)},d=n.drawingSourceOrder;!d&&n.inlineDrawingLayout&&(d=jP(e,n.inlineDrawingLayout));let c=n.session?WR(d?{...l,drawingSourceOrder:d}:l,a,n.session):kr(d?{...l,drawingSourceOrder:d}:l,a),u=Us(a,c.listItems,n.notes?{footnotesPart:n.notes.footnotesPart,endnotesPart:n.notes.endnotesPart}:void 0,n.notes?nP(n.notes,i):void 0,r,o),f=u===null?c:{...c,refFields:u},m=h=>{if(i.length>1)return XT(a,i,t,h,Hu);let y=i[0],b=h.geometry??(y?Or(y.properties):Ps),x=ju(h,0,i.length)??h.furniture,T=y?.properties.pageNumbering,S=Hu(a,t,{...h,geometry:b,furniture:x,sectionColumns:y?.properties.columns??pn.columns,...T?.fmt?{bodyPageNumberFormat:T.fmt}:{}}),I=T,F=Xg({revision:S.layout.revision,pages:ni(S.pages,I?.start??1,S.pages.length,I?.fmt)},S.layout),v=Qr(F);return Sl(v,(w,k,P)=>S.overflowShellAt(k,P)),h.session&&(h.session.multi=null,h.session.previous=v),v},p=h=>{let y=h;if(h.displayMode!==r){let{contentControls:x,controlContextToken:T,...S}=h;y={...S,displayMode:r,...x!==void 0?{contentControls:x}:{},...T!==void 0?{controlContextToken:T}:{}};}let b=Ug(y,e,s);return n.session&&(n.session.previous=b),b};if(!n.notes)return n.session&&(n.session.notes=null,n.session.notePageBottomReserves=null),p(m(f));let g=AT(n.notes,u?{...n,refFields:u}:n);return p(NT(e,i,f,g,m))}function OD(e,t,n){let r=n.geometry,o=n.cache?.keyFor?.bind(n.cache)??Cs,a=r.width-r.margin.left-r.margin.right,i=Eu(n.sectionColumns??pn.columns,a);if((n.inlineDrawingLayout||dv(e,n.styleCascade)||rv(e,a,n.styleCascade,n.displayMode??Me,n.revisionAuthorFilter,n.compatibilityMode))&&n.drawingExclusionPass===void 0&&!n.drawingExclusionConverged){let B=he=>{let ve=n.inlineDrawingLayout?.projectionForAtom?.(he)?.drawingNodeId??he;return n.drawingSourceOrder?.get(ve)},G=Object.freeze({columnCount:i.count,columnGapPt:i.gaps[0]??0,contentWidth:a,columnLefts:i.lefts,columnWidths:i.widths}),J=(he,ve=false)=>{let Ne=n.inlineDrawingLayout?ve?JS(he,n.inlineDrawingLayout,n.drawingLayoutEpoch,a,n.drawingSourceOrder,G):dm(he,n.inlineDrawingLayout,a,B,G):new Map;return cv(he,ov(he,Ne,G),G)},ae=new Map,Re=null,Ae=false,Fe=new Set,je=he=>(Hu(e,t,he)),ge=he=>{let ve=Ag(he.pages);if(ve.size===0)return null;let Ne=n.paragraphFrameFallbackRound??0,De=new Set(n.disabledParagraphFrameIds);for(let on of Ne>=3?Ag(he.pages,true):ve)De.add(on);let ot=n.session?Br():void 0,rn=Hu(e,t,{...n,session:ot,disabledParagraphFrameIds:De,paragraphFrameFallbackRound:Ne+1});return n.session&&ot&&fh(n.session,ot),rn},nt=n.session?.previous?.pages;if(nt){ae=J(nt,true),Re=je({...n,drawingExclusionPass:0,drawingExclusionZonesByPage:ae});let he=ge(Re);if(he)return he;if(Re.pages===nt)return Re;let ve=J(Re.pages,true);if(bc(ae,ve))return Re;ae=new Map(ve),Fe.add(xc(ve));}let rt=(he,ve)=>(n.session&&ve&&fh(n.session,ve),he),Y=he=>{let ve=n.session?Br():void 0;return rt(je({...n,session:ve,drawingExclusionConverged:true,drawingExclusionZonesByPage:he}),ve)};for(let he=0;he<Qo;he+=1){let ve=n.session?Br():void 0;Re=je({...n,session:ve,drawingExclusionPass:he,drawingExclusionZonesByPage:ae});let Ne=ge(Re);if(Ne)return Ne;let De=J(Re.pages);if(De.size===0)return he===0&&ae.size===0?rt(Re,ve):Y(De);if(bc(ae,De))return rt(Re,ve);let ot=xc(De);if(Fe.has(ot)){Ae=true,ae=De;break}Fe.add(ot),ae=new Map(De);}if(!Ae)for(let he=0;he<TD&&!Ae;he+=1){let ve=n.session?Br():void 0;Re=je({...n,session:ve,drawingExclusionPass:Qo+he,drawingExclusionZonesByPage:ae});let Ne=ge(Re);if(Ne)return Ne;let De=J(Re.pages),ot=xc(De);if(bc(ae,De))return rt(Re,ve);if(Fe.has(ot)){Ae=true,ae=De;break}Fe.add(ot),ae=new Map(De);}if(!Ae)throw new xi(`wrap exclusion reflow did not converge within ${Qo} passes`);return Y(ae)}let s$1=n.measurer,l=n.cache,d=n.styleCascade,c=n.listItems,u=n.refFields,f=n.defaultTabStopPt,m=n.displayMode??Me,p=n.revisionAuthorFilter,g=m==="all-markup",h=n.tocFieldChromeParagraphIds,y=n.emptyTocPlaceholderParagraphIds,b=n.emptyTocSuppressedResultParagraphIds,x={chrome:h,placeholder:y,suppressed:b},T=FD(x),S=zT(n.disabledParagraphFrameIds?.size?q([n.producer??"",q([...n.disabledParagraphFrameIds].sort())]):n.producer,d,n.noteMarks,f,m,p,n.bodyPageNumberFormat,n.compatibilityMode),I=i.widths[0],F=n.furniture,v=r.headerDistance??36,w=r.footerDistance??36,k=n.pageBottomReserves,P=n.session,O=n.lineCounterStart??0,L=S0(F,v,w),A=n.flowStartY??0,j=n.spaceBeforeCarry??0,W=n.pageIndexStart??0,R=Iv({...F?{furniture:F}:{},pageHeight:r.height,marginTop:r.margin.top,marginBottom:r.margin.bottom,headerDistance:v,footerDistance:w,pageIndexStart:W,...n.continuedPageInsets?{continuedPageInsets:n.continuedPageInsets}:{}}),C=Object.freeze(n.bodyPageNumberFormat!==void 0?{format:n.bodyPageNumberFormat}:{}),M=P?.previous?P.previous.pages.length+1:1/0,N=n.columnRegionBottom,D=`|cols:${i.widths.join(",")};${i.gaps.join(",")};${i.separator?1:0}${N!==void 0?`;bal:${N}`:""}`,_=n.continuedPageInsets,K=_?`|cont:${_.top},${_.height}`:"",H=B=>`${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|fs:${A},${j}${K}${L}${B}${D}`,z=H(Bu(k,W,M)),$=W&1,U=false,ie=null,Z=()=>{U=true;},X=[],Q=kv({...F?{furniture:F}:{},geometry:r,headerDistance:v,footerDistance:w,pageIndexStart:W,contentWidth:a,insetsFor:R,pageCount:()=>X.length}),{pageBox:pe,furnitureFor:ue,overflowShellAt:Ie}=Q,me=B=>{let G=Math.max(1,R(X.length).height-B);return N!==void 0&&X.length===0?Math.max(1,Math.min(G,N)):G},Pe=()=>me(k?.get(W+X.length)??0),ce=()=>me(0),re=n.inlineDrawingLayout!==void 0,ye=re?Ru(B=>Pu(B,{measurer:s$1,producer:S,cache:l,styleCascade:d,...f!==void 0?{defaultTabStopPt:f}:{},compatibilityMode:n.compatibilityMode,...m?{displayMode:m}:{},...p?{revisionAuthorFilter:p}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.numberingIndex?{numberingIndex:n.numberingIndex}:{},inlineDrawingLayout:n.inlineDrawingLayout,drawingTokenForParagraph:n.drawingTokenForParagraph,projectionTokenForParagraph:n.projectionTokenForParagraph,projectionTokenForTable:n.projectionTokenForTable}),n.numberingIndex,d,m,p):void 0,_e=(B,G)=>{let J=B.kind==="paragraph"?n.drawingTokenForParagraph?.(B)||n.drawingLayoutToken||"":B.kind==="table"&&n.drawingTokenForParagraph?WP(B,n.drawingLayoutEpoch,n.drawingTokenForParagraph)||n.drawingLayoutToken||"":n.drawingLayoutToken||"",ae=B.kind==="paragraph"?n.projectionTokenForParagraph?.(B)??"":B.kind==="table"&&n.projectionTokenForParagraph?n.projectionTokenForTable?.(B)??Xo(B,n.projectionTokenForParagraph):"",Re=ye?.hostedListTokenForParagraph?.(B)??"",Ae=B.kind==="table"?Gx(B,c):c?.get(B.id)?.cacheToken??"",Fe=Ae===""&&Re===""?"":q([Ae,Re]),je=u===void 0?"":B.kind==="table"?mP(B,u):u.tokenForParagraph(B.id),ge=qT.get(B);if(ge&&ge.contentWidth===G&&ge.frameEnabled===(i.count===1&&!n.disabledParagraphFrameIds?.has(B.id))&&ge.producer===S&&ge.drawingToken===J&&ge.projectionToken===ae&&ge.listToken===Fe&&ge.refToken===je&&ge.drawingContext===re)return ge.entry;let nt=Os(J,re),rt;if(B.kind==="table")rt={kind:"table",table:B,key:o({paragraph:B,properties:[...Fe?[{localName:"list",attributes:{token:Fe}}]:[],...je?[{localName:"refFields",attributes:{token:je}}]:[]],width:G,producer:S,drawingToken:nt,projectionToken:ae})};else {let Y=c?.get(B.id),he=lo(B,G,d,Y),ve=i.count===1&&!n.disabledParagraphFrameIds?.has(B.id)?M0(he.props):null,Ne=ve&&E0(B)?ve:void 0;Ne&&(he=lo(B,Ne.width,d,Y));let{props:De,indent:ot,available:rn,alignment:on,spacing:ef,lineSpacing:Qi,contextualSpacing:Bt,styleId:Hl,outlineLevel:zl,shading:Wl,inheritedRunProperties:Fa,markRunProperties:So}=he,cr=Y0(B.children.find(at=>at.kind==="paragraphProperties"),d),{tabStops:ur,properties:Gl}=Uc(he,f,{listToken:Y?.cacheToken,hostedListToken:Re,refToken:je});rt={kind:"paragraph",...Ne?{frame:Ne}:{},paragraph:B,props:De,indent:ot,available:rn,alignment:on,spacing:ef,lineSpacing:Qi,contextualSpacing:Bt,styleId:Hl,outlineLevel:zl,borders:cr,borderGroupKey:Qs({borders:cr,indent:ot}),shading:Wl,inheritedRunProperties:Fa,markRunProperties:So,tabStops:ur,keeps:Z0(De),...Y?{listItem:Y}:{},key:o({paragraph:B,properties:Gl,width:rn,producer:S,drawingToken:nt,projectionToken:ae})};}return qT.set(B,{contentWidth:G,frameEnabled:i.count===1&&!n.disabledParagraphFrameIds?.has(B.id),producer:S,drawingToken:J,projectionToken:ae,listToken:Fe,refToken:je,drawingContext:re,entry:rt}),rt},Ce=(n.drawingTokenForParagraph!==void 0||n.drawingLayoutToken!==void 0)&&n.drawingLayoutEpoch===void 0?null:Os(n.drawingLayoutEpoch??"",re),Be=n.projectionTokenForParagraph!==void 0&&n.projectionEpoch===void 0?null:n.projectionEpoch??"",Se=O0(i.count,n.disabledParagraphFrameIds),xe=P?.prepass,Ht=xe!=null&&xe.framePolicy===Se&&Ce!==null&&Be!==null&&xe.drawingEpoch===Ce&&xe.projectionEpoch===Be&&xe.producer===S&&xe.contentWidth===I&&xe.styleCascade===d&&xe.listItems===c&&xe.numberingIndex===n.numberingIndex&&xe.tocToken===T&&xe.refToken===(u?.valuesToken??""),en=Ht&&xe.bodies.length===e.length&&xe.bodies.every((B,G)=>B===e[G]),An=en?xe:mn();function mn(){let B=Ht&&i.count===1&&!n.disabledParagraphFrameIds?xe:null,G=I0(e,B,Y=>_e(Y,I)),J=G.map(Y=>Y.key),ae=Sv(G,I,d,m,p,n.compatibilityMode),Re=G.map(Y=>Y.kind==="paragraph"&&Y.keeps.keepNext),Ae=G.map(Y=>Y.kind==="paragraph"?c?.get(Y.paragraph.id)?.markerText:void 0),Fe=G.map(Y=>Y.kind==="paragraph"&&Y.contextualSpacing),je=G.map(Y=>Y.kind==="paragraph"?Y.styleId:null),ge=G.map(Y=>Y.kind==="paragraph"?Y.borderGroupKey:""),nt=T===""?[]:G.map(Y=>Y.kind==="paragraph"?ID(Y.paragraph.id,x):""),rt=ev(X0(J,G),{terminalTableGroup:ae,contextualSpacingAt:Y=>Fe[Y],styleIdAt:Y=>je[Y]??null,borderGroupKeyAt:Y=>ge[Y],tocVerdicts:nt,markerTextAt:Y=>Ae[Y],keepsNextAt:Y=>Re[Y],skipKeepNextAt:Y=>G[Y]?.kind==="paragraph"&&!!G[Y].frame});return {framePolicy:Se,bodies:e,producer:S,contentWidth:I,styleCascade:d,listItems:c,numberingIndex:n.numberingIndex,drawingEpoch:Ce??"",projectionEpoch:Be??"",prepared:G,keys:J,paragraphDocumentOrder:B&&k0(B.bodies,e)?B.paragraphDocumentOrder:mg(G,I,d,m,p,n.compatibilityMode),keepsNext:Re,markerTexts:Ae,tocToken:T,refToken:u?.valuesToken??"",flowKeys:rt,terminalTextTables:ae}}P&&Ce!==null&&Be!==null&&!en&&(P.prepass=An);let{prepared:We,keys:Zi,paragraphDocumentOrder:gn,keepsNext:Ra,flowKeys:tn,terminalTextTables:lt}=An,hn=()=>{n.retainKeys!==false&&(n.retainKeys===void 0&&l&&!(l.retentionPassDue?.()??true)||Ux(l,n.retainKeys,Zi,We.flatMap(B=>B.kind==="table"?[B.table]:[])));},V=P?.previous??null,E=V!==null&&P!==void 0&&P.context===z&&P.producer===S&&(!P.parityDependent||P.startPageParity===$),oe=i.count===1&&E,te=0;if(E){let B=Math.min(tn.length,P.keys.length);for(;te<B&&tn[te]===P.keys[te];)te+=1;}let Ee=0;if(oe){let B=Math.min(tn.length,P.keys.length)-te;for(;Ee<B&&tn[tn.length-1-Ee]===P.keys[P.keys.length-1-Ee];)Ee+=1;}if(E&&te===We.length&&We.length===P.keys.length){let B=Xg({revision:t,pages:V.pages},V),G=O+(P.endLineCounter-P.startLineCounter);return P.previous=B,P.startLineCounter=O,P.endLineCounter=G,P.startPageParity=$,P.stats={placed:0,total:We.length,reusedPages:V.pages.length,fullPasses:P.stats.fullPasses},hn(),{layout:B,pages:B.pages,lineCounter:G,endCursorY:P.endCursorY,endSpaceAfter:P.endSpaceAfter,endsOpenPage:P.endsOpenPage,overflowShellAt:Ie}}let ke=A0(We,I,d,m,p,n.compatibilityMode),ee=new Set(ke.map(({table:B})=>B.id)),ne=D0(ke,tn),Oe=[],et=0,Ue=0,nn=()=>i.lefts[et],tt=()=>i.widths[et],Dn=()=>({text:{left:nn(),width:tt()},margin:{left:0,width:a},page:{left:-r.margin.left,width:r.width}}),Ar=()=>H0(Oe,Ue),Ve=[],gt=[],_n=new Map,yn=new Set,lr=[],ze=new Set,Ke=0,bt=new Fu,be=A,Dr=A,xt=0,_r=O,Et=j,Pa=[],Sh=new _u({paragraphFrames:bt,positionedFlow:ne,pendingFloatIds:yn,floatSignals:lr,anchorPageDeferCounts:_n}),Rh=()=>Sh.capture({pageCount:X.length,pageFragments:Oe,pendingAnchoredDrawings:Ve,deferredAnchoredDrawings:gt,cursorY:be,lineCounter:_r,previousSpaceAfter:Et,flowColumnIndex:xt}),Ml=0,Ph=0,Uu=0,Ji=A===0;if(oe&&te>0&&te<P.checkpoints.length){let B=P.checkpoints[te];X.push(...V.pages.slice(0,B.pageCount)),{pageFragments:Oe,pendingAnchoredDrawings:Ve,deferredAnchoredDrawings:gt,cursorY:be,flowColumnIndex:xt,lineCounter:_r,previousSpaceAfter:Et}=Sh.restore(B),et=xt,Ml=te,Ji=false,Uu=X.length,Pa.push(...P.checkpoints.slice(0,te));}let wh=(B,G)=>{let J=R(X.length).top;for(let ae of bt.publish({page:{x:-r.margin.left,y:-J},margin:{x:0,y:r.margin.top-J},text:{x:nn(),y:G}},B,xt))Oe.push(ae);},Ll=i.count,wa=nn,Yu=B=>Object.freeze({x:i.lefts[xt]??0,y:B.y,width:i.widths[xt]??I,height:B.height}),Bl=()=>uv({pageNumber:W+X.length+1,onPageParityRead:Z,geometry:r,insets:R(X.length),contentWidth:I,contentHeight:Pe(),ownerPartName:n.inlineDrawingLayout?.ownerPartName??s}),vh=()=>Jo(Bl()),qu=B=>{let G=n.inlineDrawingLayout?.projectionForAtom?.(B)?.drawingNodeId??B;return n.drawingSourceOrder?.get(G)},Nl=B=>{if(B.length===0)return;for(let J of B)Ve.some(ae=>ae.drawingNodeId===J.drawingNodeId)||Ve.push(J.sourceOrder===void 0&&qu(J.drawingNodeId)!==void 0?Object.freeze({...J,sourceOrder:qu(J.drawingNodeId)}):J);if(!n.inlineDrawingLayout)return;let G=XS(Ve,{pageBottom:Pe()});if(Ve.splice(0,Ve.length,...G.drawings),G.deferred.length>0)for(let J of G.deferred){let ae=(_n.get(J.drawingNodeId)??0)+1;_n.set(J.drawingNodeId,ae),ae>=nm?Ve.push(sm(J,"page-defer-exhausted")):gt.push(J);}},Th=()=>{if(gt.length===0)return;let B=gt.map(G=>am(G,be-G.y));gt=[],Nl(B);},Fh=()=>{},va=()=>{Fh();let B=X.length,G=pe(B),J=ue("header",B,G),ae=ue("footer",B,G),{usedBottom:Re,hasBodyPageFields:Ae}=up(Oe,Dr),Fe=R(B);X.push({id:`page-${B}`,index:B,box:G,contentBox:{x:G.x+r.margin.left,y:G.y+Fe.top,width:a,height:Fe.height},fragments:Oe,hasBodyPageFields:Ae,...i.separator?{columnSeparators:i.gaps.map((je,ge)=>({x:i.lefts[ge]+i.widths[ge]+je/2-.375,y:Dr,width:.75,height:Math.max(0,Re-Dr)}))}:{},...Ve.length>0?{anchoredDrawings:$S(Ve)}:{},...J?{header:J}:{},...ae?{footer:ae}:{}}),Oe=[],Ve=[],be=0,et=0,xt=0,Dr=0,Ue=0;},$F=(B,G)=>B.kind==="paragraph"&&fv(B,G,n.inlineDrawingLayout),Al=()=>{if(et+1<i.count){et+=1,xt=et,be=Dr,Et=0,Ue=Oe.length;return}va(),Th();},Ta={measurer:s$1,cache:l,producer:S,onCellBreakKey:B=>{ie?.push(B);},nextLineId:(B,G,J,ae)=>(_r+=1,Dg(B,G,J,ae)),pageOccurrenceKey:()=>String(X.length),styleCascade:d,listItems:c,...f!==void 0?{defaultTabStopPt:f}:{},compatibilityMode:n.compatibilityMode,...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:C,...u?{refFields:u}:{},...n.noteMarks?{noteMarks:n.noteMarks}:{},...n.inlineDrawingLayout!==void 0?{inlineDrawingLayout:n.inlineDrawingLayout}:{},...n.drawingTokenForParagraph?{drawingTokenForParagraph:n.drawingTokenForParagraph}:n.drawingLayoutToken?{drawingLayoutToken:n.drawingLayoutToken}:{},...n.projectionTokenForParagraph?{projectionTokenForParagraph:n.projectionTokenForParagraph}:{},...n.inlineDrawingLayout?{anchorFrameBase:Bl,pageContentClip:vh,hostedStory:ye,publishAnchoredDrawings:Nl,collectAnchoredDrawings:Nl,columnBoxForParagraph:Yu,pageExclusionZones:()=>n.drawingExclusionZonesByPage?.get(X.length)??Object.freeze([]),paragraphOrderIndex:B=>gn.get(B),onAnchorShift:(B,G)=>Qp(Ve,B,G),onAnchorRepublish:(B,G)=>{for(let J=Ve.length-1;J>=0;J-=1)Ve[J].anchorParagraphId===B&&Ve.splice(J,1);Ve.push(...G);}}:{},borderOwnershipBudget:fo(),vMergeResolveBudget:fa(),displayMode:m,...p?{revisionAuthorFilter:p}:{}},Zu=B=>Lc(c?.get(B.paragraph.id)??B.listItem,B.indent,s$1,B.tabStops,B.available),Dl=new Map,XF=(B,G)=>{let J=Dl.get(B);J||(J=new Set,Dl.set(B,J)),J.add(G);},Ih=B=>{let G=Dl.get(B);if(!(!G||!l)){for(let J of G)l.release?.(J);Dl.delete(B);}},_l=(B,G,J=0)=>{let ae=B.paragraph.id,Ae=!(y?.has(ae)??false)&&((h?.has(ae)??false)||(b?.has(ae)??false)),Fe=B.available,je=wa(),nt=(B.frame?[]:n.drawingExclusionZonesByPage?.get(X.length)??Object.freeze([])).filter(ve=>{let Ne=gn.get(B.paragraph.id),De=gn.get(ve.anchorParagraphId);if(Ne!==void 0&&De!==void 0){if(De>Ne)return false}else {let ot=We.findIndex(rn=>rn.kind==="paragraph"&&rn.paragraph.id===ve.anchorParagraphId);if(ot<0||ot>G)return false}return !(Ll>1&&ve.columnIndex!==xt)}),rt=er(nt),Y=null;l&&!Ae&&(Y=$P(B.key,{exclusionToken:rt,paragraphStartY:be,columnIndex:xt,startOffset:J}),XF(ae,Y));let he=Ll>1;return Yc({paragraph:B.paragraph,paragraphId:ae,indentLeft:B.indent.left,available:Fe,measurer:s$1,cache:l,cacheKey:Y,formatting:B,producer:S,styleCascade:d,tabStops:B.tabStops,flow:{firstLineOffset:J===0?Zu(B):0,startOffset:J,marginExtent:{left:0,right:B.indent.left+Fe+B.indent.right},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:C,...u?{refFields:u}:{},displayMode:m,...p?{revisionAuthorFilter:p}:{},...n.noteMarks?{noteMarks:n.noteMarks}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},contentLeft:he?je:0,contentRight:he?je+tt():B.indent.left+Fe+B.indent.right,paragraphStartY:be,...nt.length>0?{pageExclusionZones:nt}:{},...Ae?{suppressEmptyPlaceholderLine:true}:{}}})},kh=(B,G)=>(n.drawingExclusionZonesByPage?.get(X.length)??Object.freeze([])).filter(ae=>{let Re=gn.get(B.paragraph.id),Ae=gn.get(ae.anchorParagraphId);if(Re!==void 0&&Ae!==void 0){if(Ae>Re)return false}else {let Fe=We.findIndex(je=>je.kind==="paragraph"&&je.paragraph.id===ae.anchorParagraphId);if(Fe<0||Fe>G)return false}return !(Ll>1&&ae.columnIndex!==xt||!ae.sourceKind&&ae.anchorParagraphId===B.paragraph.id&&ae.input.mode==="topAndBottom")}),Oh=(B,G,J,ae,Re,Ae,Fe)=>{let je=kh(B,G);if(!n.inlineDrawingLayout||ae<=Re)return je;let ge=un(B.paragraph),nt=new Map,rt=0;for(let De=Re;De<ae;De+=1){let ot=J[De];for(let on of ge.values())on>=ot.start&&on<ot.end&&nt.set(on,rt);let rn=Fe.get(De)??J[De].exclusionSkipBefore??0;rt+=rn+J[De].height;}if(nt.size===0)return je;let Y=Ll>1,he=B.available,ve=wa(),Ne=yc({paragraph:B.paragraph,paragraphId:B.paragraph.id,drawingLayout:n.inlineDrawingLayout,contentLeft:Y?ve:0,contentRight:Y?ve+tt():B.indent.left+he+B.indent.right,paragraphStartY:Ae,anchorLineTopByModelStart:nt,columnIndex:xt,displayMode:m,...p?{revisionAuthorFilter:p}:{}});return Object.freeze([...je,...Ne])},UF=(B,G,J,ae,Re,Ae,Fe,je)=>{if(n.inlineDrawingLayout){let Y=[...un(B.paragraph).values()];if(Y.length>0){let he=Math.min(...Y);if(Fe.end<=he||Y.some(ve=>ve>=Fe.start&&ve<Fe.end)&&Fe.end<=he+1)return 0}}let ge=Oh(B,G,J,ae,Re,Ae,je),nt=ge.length>0?io(be,Fe.height,ge):0,rt=Fe.exclusionSkipBefore??0;return Math.max(nt,rt)},Ch=(B,G=be,J=false)=>{let ae=be,Re={positionTextTable:J,cursorY:G,columnWidth:tt,columnLeft:nn,contentHeight:Pe,unreservedContentHeight:ce,advanceColumn:()=>{be=Re.cursorY,Al(),Re.cursorY=be;},anchorFrames:Dn,verticalAnchorFrames:()=>j0(Bl(),G,r.margin.top),styleCascade:d,displayMode:m,...p?{revisionAuthorFilter:p}:{},deps:Ta,compatibilityMode:n.compatibilityMode,shiftAnchor:(Fe,je)=>Qp(Ve,Fe,je),publishFragment:Fe=>Oe.push(Fe)},Ae=yv(B,Re);return be=Ae.outOfFlow?ae:Re.cursorY,Ae.outOfFlow};Fh=()=>_0(ke,yn,Oe,lr,(B,G,J,ae)=>{let Re=et,Ae=xt;et=G,xt=G,ie=[];try{let Fe=Ng(B,J,tt(),Dn(),Oe.slice(0,ae),Ta);Ch(B,Fe,!0),Zd(B,ie);}finally{ie=null,et=Re,xt=Ae;}});let dr=false,Ju=We.length,Qu=0;for(let B=Ml;B<We.length;B+=1){let G=_e(e[B],tt());if(Pa[B]=Rh(),oe&&Ee>0&&B>=We.length-Ee){let fe=P.checkpoints[B+(P.keys.length-We.length)];if(fe&&WT(fe,Pa[B])){let de=X.length-fe.pageCount;if(Ov({delta:de,titlePage:F?.titlePage===true,evenAndOddHeaders:F?.evenAndOddHeaders===true,parityDependent:P.parityDependent,usedPageParity:U,markPageCount:fe.pageCount,continuedInsets:_!==void 0,hasNoteReserves:k!==void 0,hasExclusionZones:(n.drawingExclusionZonesByPage?.size??0)>0})){let dt=de===0?V.pages.slice(fe.pageCount):V.pages.slice(fe.pageCount).map((ct,Ft)=>ya(ct,X.length+Ft,pe(X.length+Ft).y));X.push(...dt),Uu+=dt.length,dr=true,Ju=B,Qu=de,_r+=P.endLineCounter-fe.lineCounter;break}}}if(Ph+=1,G.kind==="table"){if(ze.has(G.table.id))continue;if(lt?.start===B&&i.count===1&&yn.size===0&&!Oe.some(vu)&&!n.drawingExclusionZonesByPage?.get(X.length)?.length){let fe=We[lt.anchorIndex];if(fe.kind==="paragraph"){let de=_l(fe,lt.anchorIndex);if(de.length===1&&de[0].spans.length===0){let St=Zo(fe.spacing.before,Et),dt=Rv(lt,{cursorY:be+St,anchorHeight:de[0].height,contentWidth:I,contentHeight:Pe(),frames:Dn(),deps:Ta,styleCascade:d,displayMode:m,authorFilter:p});if(dt){for(let ct of dt.fragments){let Ft=ke.find(jn=>jn.table.id===ct.tableId);Oe.push({...ct,floatingWrap:{anchorId:Ft.anchorId,columnIndex:xt,float:Ft.float,sourceOrder:Ft.sourceIndex}});}for(let[ct,Ft]of lt.tables.entries())ze.add(Ft.id),Zd(Ft,dt.cellBreakKeys[ct]);Ke=dt.bottom;continue}}}}if(ee.has(G.table.id)&&!sv(G.table,n.drawingExclusionZonesByPage,Ta)&&Iu(G.table,Math.min(...i.widths),Ta)<=Pe()){ne.add(yn,G.table.id);continue}ie=[];try{Ch(G.table)||(Et=0),Zd(G.table,ie);}finally{ie=null;}continue}let J=G.frame,{paragraph:ae,props:Re,spacing:Ae,contextualSpacing:Fe,styleId:je,borders:ge,shading:nt,keeps:rt}=G,{indent:Y,alignment:he,markRunProperties:ve}=G,Ne=G.available,De=B>0?We[B-1]:void 0,ot=We[B+1],rn=fe=>fe?.kind==="paragraph"&&fe.styleId===je&&je!==null,on=Fe?{before:rn(De)?0:Ae.before,after:rn(ot)?0:Ae.after}:Ae,ef=c?.get(ae.id)??G.listItem,Qi=Zu(G),Bt=ae.id,Hl=G.borderGroupKey,zl=fe=>Hl!==""&&fe?.kind==="paragraph"&&fe.borderGroupKey===Hl,Wl=zl(De),Fa=zl(ot),So=Wl?void 0:ge.top,cr=Fa?ge.between:ge.bottom,ur=no(So),Gl=no(cr);jp(Re)&&(Oe.length>0||X.length===0)&&(va(),Et=0);let at=_l(G,B);if(at.length===0){Ih(Bt),ne.note(lr,ae.id,xt,Oe.length,be);continue}let qF=En(ae)!==void 0&&$F(G,at),Ah=()=>qF&&N===void 0&&et+1>=i.count,tf=fe=>{let de=_e(ae,tt());de.kind==="paragraph"&&(Y=de.indent,he=de.alignment,Ne=de.available,ve=de.markRunProperties,Qi=fe===0?Zu(de):0,at=[..._l(de,B,fe)]);},Vl=J?{cursorY:be,previousSpaceAfter:Et,firstParagraphOfSection:Ji}:null,Kl=J?bt.start(J,De?.kind==="paragraph"?De.paragraph.id:void 0):null;if(Kl&&(be=Kl.cursorY,Et=Kl.previousSpaceAfter),!J){let fe=Zo(on.before,Et),de=ve.length===0?Xn:He(ve,d?.themeFonts),St=at.length<=1?Gl:0,dt=be+fe+ur,ct=Oh(G,B,at,0,0,dt,new Map),Ft=at[0]?um(dt,at[0],ct,St):s$1.lineMetrics(de).height+St,jn=fe+ur+Math.max(Ft,av(ke,yn,Bt,tt(),Ta,{anchorY:dt,frames:Dn(),earlier:Oe}));if(rt.keepNext&&!Ra[B-1]){let Nt=Q0(We,B,Et,an=>{let Hn=_e(e[an],tt());return Hn.kind==="paragraph"?_l(Hn,an).map(bn=>bn.height):[]},an=>We[an]?.kind==="paragraph"&&!!We[an].frame);Nt!==null&&Nt+ur<=Pe()&&(jn=Math.max(jn,Nt+ur));}be+jn>Pe()&&be>0&&!Ah()&&(Al(),Et=0,tf(0));}let ZF=be===0&&!Ar(),nf=Vp(on.before,Et,J?false:ZF,J?false:Ji);nf>0&&(be+=nf),ur>0&&(be+=ur),Ji=false;let jr=0,$e=[],Dh=at[0]?.start??0,Ia=nf,Ro=ur,rf=false,Po=be,_h=0,$l=new Map;Et=0;let jh=n.inlineDrawingLayout!==void 0&&jt(G.paragraph,n.inlineDrawingLayout).length>0,Hh=false,of=null,{revisions:JF,formatRevision:QF}=Yd(G.paragraph,m,p),zh=ai(G.paragraph),Wh=zh?$c(zh):null,eI=()=>{let fe=$e[0];if(!fe)return 0;let de=_h;if(de<=.001)return 0;let St=io(Po,fe.box.height,kh(G,B));return Math.max(0,de-St)},Xl=fe=>{if($e.length===0)return;let de=nn(),St=wa(),dt=$e[0].box.y,ct=dt-Ia-Ro,Ft=$e[$e.length-1].box.y+$e[$e.length-1].box.height,jn=fe?on.after:0,Nt=[],an,Hn=dt,bn=Ft,zr=ge.left?Kt(ge.left):0,ts=ge.right?Kt(ge.right):0,ka=ge.left?de+Y.left-ge.left.spacePt-zr:de+Y.left,sf=ge.right?de+Y.left+Ne+ge.right.spacePt+ts:de+Y.left+Ne,Oa=Math.max(sf-ka,0);if(Ro>0&&So){let zt=Kt(So),pr=dt-So.spacePt-zt;Nt.push({side:"top",edge:So,box:{x:ka,y:pr,width:Oa,height:zt}}),Hn=pr;}if(fe&&cr){let zt=Kt(cr),pr=Ft+cr.spacePt,Ba={x:ka,y:pr,width:Oa,height:zt};Nt.push({side:Fa?"between":"bottom",edge:cr,box:Ba}),Fa||(an={edge:cr,box:Ba}),bn=pr+zt;}fe&&(be=Math.max(be,bn+jn));let Ca=Math.max(bn+jn-ct,0),Rt=Wl&&jr===0?ct:Hn,fr=Fa&&fe?ct+Ca:bn,Ea=Math.max(fr-Rt,0);if(ge.left&&Nt.push({side:"left",edge:ge.left,box:{x:de+Y.left-ge.left.spacePt-zr,y:Rt,width:zr,height:Ea}}),ge.right&&Nt.push({side:"right",edge:ge.right,box:{x:de+Y.left+Ne+ge.right.spacePt,y:Rt,width:ts,height:Ea}}),ge.bar){let zt=Kt(ge.bar);Nt.push({side:"bar",edge:ge.bar,box:{x:de+Y.left-ge.bar.spacePt-zt,y:dt,width:zt,height:Math.max(Ft-dt,0)}});}let Ma=Wh?Xc($e,Wh):null,La=jr===0?uu(ef,s$1,$e[0]?{y:$e[0].box.y,height:$e[0].box.height}:void 0):void 0,Ul=La?{...La,box:{...La.box,x:La.box.x+de}}:void 0;!J&&jr===0&&(wh(Bt,Po),ne.note(lr,Bt,xt,Oe.length,Po));let Wr={kind:"paragraph",id:`${Bt}#f${jr}`,paragraphId:Bt,fragmentIndex:jr,range:Ma?Ma[Ma.length-1].range:{paragraphId:Bt,start:Dh,end:$e[$e.length-1].range.end},props:Re,styleId:G.styleId,outlineLevel:G.outlineLevel,alignment:G.alignment,spacing:{before:Ia,after:jn},indent:Y,...an?{bottomBorder:an}:{},...Nt.length>0?{borders:Nt}:{},...nt===void 0?{}:{shading:nt,shadingBox:ge.left||ge.right?{x:ka,y:Hn,width:Oa,height:Math.max(bn-Hn,0)}:ms($e,de+Y.left,Ne)},tabStops:G.tabStops,...Ul?{marker:Ul}:{},...fe&&g?qd(JF,QF):{},lines:Ma??$e,box:{x:St+Y.left,y:ct,width:Ne,height:Ca}};if(J?bt.add(J,Wr,Kl?.groupId,B):Oe.push(Wr),n.inlineDrawingLayout&&jh&&!Hh){Hh=true;let zt=[...un(G.paragraph).values()],pr=zt.length>0&&zt.every(Yt=>$e.some(wo=>Yt>=wo.range.start&&Yt<wo.range.end)),Ba,Yl,lf;if(pr){let Yt=ct-eI();Ba=$e,Yl={x:St+Y.left,y:Yt,width:Ne,height:Ca},lf=Yu({x:St+Y.left,y:Yt,height:Ca});}else {let Yt=of??{columnX:St,columnWidth:tt(),startY:ct},wo=Yt.startY;Ba=at.map((xn,tI)=>{let nI={id:`anchor-line-${tI}`,range:{paragraphId:Bt,start:xn.start,end:xn.end},box:{x:Yt.columnX+Y.left,y:wo,width:Ne,height:xn.height},contentX:xn.spans.length>0?xn.spans[0].box.x+Yt.columnX:Yt.columnX+Y.left,baseline:xn.baseline,leading:xn.leading,trailingSpacing:xn.trailingSpacing,spans:xn.spans.map(df=>({...df,box:{...df.box,x:df.box.x+Yt.columnX,y:wo}}))};return wo+=xn.height+(xn.exclusionSkipBefore??0),nI});let Gh=Yt.startY;Yl={x:Yt.columnX+Y.left,y:Gh,width:Ne,height:Math.max(wo-Gh,$e[0]?.box.height??0)},lf=Yu(Yl);}Nl(oo({paragraph:G.paragraph,paragraphId:Bt,paragraphBox:Yl,lines:Ba,drawingLayout:n.inlineDrawingLayout,frameBase:Bl(),columnBox:lf,cellBox:null,pageClip:vh(),measurer:s$1,sourceOrderOf:qu,layoutTextboxStory:ye.layoutTextboxStoryFor,displayMode:m,...p?{revisionAuthorFilter:p}:{}}));}jr+=1,Dh=$e[$e.length-1].range.end,$e=[],Ia=0,Ro=0;},Hr=0,af=0,es=at.length+yo;for(let fe=0;fe<at.length;fe+=1){let de=at[fe],St=fe===at.length-1,dt=St?Gl:0;fe===Hr&&(Po=be,jh&&of===null&&jr===0&&(of=Object.freeze({columnX:wa(),columnWidth:tt(),startY:Po})));let ct=J?0:UF(G,B,at,fe,Hr,Po,de,$l),Ft=ct+Math.max(0,de.height-de.trailingSpacing)+dt;if(!J&&be+Ft>Pe()&&!Ah()&&($e.length>0||Oe.length>0||X.length>0&&Math.max(0,de.height-de.trailingSpacing)+dt<=Pe())){let Rt=!Ar(),fr=af<es?J0(fe,Hr,at.length,rt,Rt):fe,Ea=fr<fe;for(let Wr=fe;Wr>fr;Wr-=1){$e.pop();let zt=at[Wr-1],pr=$l.get(Wr-1)??zt.exclusionSkipBefore??0;$l.delete(Wr-1),be-=zt.height+pr,_r-=1;}let Ma=Ea&&$e.length===0&&jr===0,La=at[fr].start,Ul=tt();if(Xl(false),Al(),Ia=0,Ma?be=Ro:Ro=0,tt()!==Ul){tf(La),es=Math.max(es,at.length+yo),Hr=0,Ea&&(af+=1),fe=-1;continue}if(Hr=fr,Po=be,Ea){af+=1,fe=fr-1;continue}}let Nt=wa();$l.set(fe,ct),be+=ct;let an=Nt+Y.left+(fe===0?Qi:0),Hn=Math.max(1,Ne-(fe===0?Qi:0)),bn=de.spans.map(Rt=>({...Rt,range:{...Rt.range,paragraphId:Bt},box:{...Rt.box,x:Rt.box.x+Nt,y:be}})),zr=vc(bn,s$1,an,Hn,he,St,he==="center"||he==="right"?de.width:void 0),ts=bn.length>0&&zr.length>0?zr[0].box.x-bn[0].box.x:he!=="left"&&he!=="both"?(()=>{let Rt=Hn-de.width;return Rt<=0?0:he==="center"?Rt/2:Rt})():0,ka=Object.freeze({x:0,y:0,width:a,height:Pe()}),sf=de.drawings.map(Rt=>{let fr=Object.freeze({...Qn(Rt,Nt,be),paragraphId:Bt});return hc(fr,ka)}),Oa=Tc(sf,ts),Ca={id:Dg(ae.id,de.start,fe),range:{paragraphId:Bt,start:de.start,end:de.end},spans:zr,box:{x:wa()+Y.left,y:be,width:Ne,height:de.height},contentX:zr[0]?.box.x??an+ts,baseline:de.baseline,leading:de.leading,trailingSpacing:de.trailingSpacing,...de.deletedRanges?{deletedRanges:de.deletedRanges}:{},...Oa.length>0?{drawings:Oa}:{},...de.anchorRevisions?{anchorRevisions:de.anchorRevisions}:{}};if(_r+=1,$e.length===0&&(_h=ct),$e.push(Ca),be+=de.height,de.columnBreakAfter){let Rt=tt();if(Xl(St),Al(),Ia=0,Ro=0,rf=true,!St&&tt()!==Rt){tf(de.end),es=Math.max(es,at.length+yo),Hr=0,fe=-1;continue}Hr=fe+1;}else de.pageBreakAfter&&(Xl(St),va(),Ia=0,Ro=0,rf=true,Hr=fe+1);}Xl(true),Ih(Bt),Et=rf?0:on.after,Vl&&(be=Vl.cursorY,Et=Vl.previousSpaceAfter,Ji=Vl.firstParagraphOfSection);}dr||wh("",be),dr||(Pa[We.length]=Rh());let jl=dr&&P?P.endCursorY:Math.max(be,Ke),Eh=dr&&P?P.endSpaceAfter:Et,Mh=!dr&&(Oe.length>0||lr.length>0||X.length===0),Lh=dr&&P?P.endsOpenPage:Mh;Mh&&(va(),jl=Math.max(jl,iv(X.at(-1).fragments),B0(X.at(-1).fragments)));let Bh=0,YF=nm*4+8;for(;(Ve.length>0||gt.length>0)&&Bh<YF;)Bh+=1,Ve.length===0&&Th(),va();gt.length>0&&(Ve.push(...gt.map(B=>sm(B,"page-defer-exhausted"))),gt=[],va()),hn();let Nh={revision:t,pages:X,...n.displayMode?{displayMode:n.displayMode}:{}};if(P){P.previous=Nh,P.checkpoints=dr?[...Pa.slice(0,Ju),...P.checkpoints.slice(Ju+(P.keys.length-We.length)).map(G=>Qu===0?G:{...G,pageCount:G.pageCount+Qu})]:Pa,P.keys=tn,P.context=X.length+1===M?z:H(Bu(k,W,X.length+1)),P.producer=S;let B=U||F?.evenAndOddHeaders===true;P.parityDependent=Ml===0&&!dr?B:P.parityDependent||B,P.startPageParity=$,P.startLineCounter=O,P.endLineCounter=_r,P.endCursorY=jl,P.endSpaceAfter=Eh,P.endsOpenPage=Lh,P.stats={placed:Ph,total:We.length,reusedPages:Uu,fullPasses:P.stats.fullPasses+(Ml===0?1:0)};}return {layout:Nh,pages:X,lineCounter:_r,endCursorY:jl,endSpaceAfter:Eh,endsOpenPage:Lh,overflowShellAt:Ie}}function Hu(e,t,n){return YT(e,t,n,OD)}var tF="Calibri, Carlito, Helvetica, Arial, sans-serif",Jq=new Map([["calibri","Carlito"]]),CD=65536,ED=256;function JT(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function QT(e){let t=new Map,n=0;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>e;){let a=t.keys().next();if(a.done)break;t.delete(a.value),n+=1;}},get size(){return t.size},get evictions(){return n}}}var eF=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function nF(e=null){return e!=null&&typeof e.measureText=="function"}function rF(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??tF,r=e.context??null;if(!nF(r))return null;let o=r,a=QT(JT(e.maxWidthEntries,CD)),i=QT(JT(e.maxMetricsEntries,ED)),s=e.fontAlias,l=c=>{let u=c.fontFamily&&eF.test(c.fontFamily)?c.fontFamily:null,f=u?s?.(u):void 0,m=f&&eF.test(f)?f:null,p=u?m?`"${m}", "${u}", ${n}`:`"${u}", ${n}`:n,g=c.bold?"bold":"normal",h=c.italic?"italic":"normal",y=c.smallCaps?"small-caps":"normal",b=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*t;return `${h} ${y} ${g} ${b}px ${p}`},d=(c,u,f)=>c/t*(f.horizontalScalePercent/100)+u.length*f.characterSpacingPt;return {measure(c,u){if(c.length===0)return 0;let f=l(u),m=`${f}\0${c}`,p=a.get(m);if(p!==void 0)return d(p,c,u);o.font=f;let g=o.measureText(c).width;return a.set(m,g),d(g,c,u)},lineMetrics(c){let u=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75),f=l(c),m=i.get(f);if(m)return m;let p=u*1.15,g=u*.8;o.font=f;let h=o.measureText("Hxg"),y=h.fontBoundingBoxAscent,b=h.fontBoundingBoxDescent;if(typeof y=="number"&&Number.isFinite(y)&&y>0&&(g=y/t,typeof b=="number"&&Number.isFinite(b)&&b>=0)){let T=(y+b)/t;T>0&&(p=Math.max(T,p));}p>0||(p=u*1.15);let x={height:p,baseline:g};return i.set(f,x),x}}}function MD(e=1,t={}){let n=rF({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:Sd(),producer:"fixed-measurer"}}function LD(e){let t;return n=>{t===void 0&&(t=jd(e.pages)?.hosts??null);let r=t?.get(n);return r?ti(r.pageNumber,r.format):null}}function oF(e,t){let n=_t(e,t.displayMode??Me),r=kr({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:If$1(t.package,"footnote"),endnotesPart:If$1(t.package,"endnote")}:void 0,a=Us(n,r,o,t.package?rP(t.package,e,n):void 0,t.displayMode??Me);return {blocks:n,notes:o,context:a}}function aF(e,t,n,r,o){for(let a of t){if(r.length>=$g$1)return;if(n.tokenForParagraph(a.id)!==""&&ch$1(e,a.id)===null)for(let i of bh$1(a)){if(r.length>=$g$1)return;if(!i.rewritable)continue;let s=Fn(i.instruction);if(s===null)continue;let l=n.liveValueOf(i.fieldNodeId,s);if(l===null&&o&&n.pageRefProjectionOf){let d=n.pageRefProjectionOf(i.fieldNodeId,s);if(d){let c=o(d.targetParagraphId);c!==null&&c.length>0&&fp(d.calibration,d.cached,c,Number.NaN)&&(l=c);}}l===null||l===i.cachedText||l.length>ah$1||l.includes(`
18
- `)||l.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:l});}}}function BD(e,t){let{blocks:n,context:r}=oF(e,t);if(r===null)return null;let o=[];return aF(e,Cn(n),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function l6(e,t){let{notes:n,context:r}=oF(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:s}of a){if(!s)continue;let l=[];for(let d of Hc(s,t.displayMode??Me)){if(l.length>=$g$1)break;aF(s,Cn(d),r,l);}l.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:l}});}return o}function ND(e){return e.box}function iF(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)iF(o,t);}function AD(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>vc$1*4)){for(let s of o.children)if(s.kind!=="textValue"){if(s.kind==="paragraph"){for(let l of r)t.get(l)?.push(s.id);n(s,s.id,i+1);continue}if(s.kind==="contentControl"){t.set(s.id,[]),r.push(s.id);let l=Fc$1(s);l&&n(l,a,i+1),r.pop();let d=t.get(s.id);d&&d.length===0&&a!==null&&d.push(a);continue}n(s,a,i+1);}}},r=[];return n(e,null,0),t}function DD(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function _D(e,t){let n=Jc$1(e.root);if(n.length===0)return jD;let r=new Map;t.pages.forEach((i,s)=>{(d=>{for(let c of d){let u=new Set;iF(c,u);for(let f of u){let m=r.get(f)??[];m.push({pageIndex:s,box:ND(c)}),r.set(f,m);}}})(i.fragments);});let o=AD(e.root),a=[];for(let i of n){let s=Hc$1(i.node),l=[...i.ancestors.map(f=>Hc$1(f).lock),s.lock],d=o.get(i.node.id)??[],c=new Map;for(let f of d)for(let m of r.get(f)??[]){let p=c.get(m.pageIndex);c.set(m.pageIndex,p?DD(p,m.box):m.box);}let u=[...c.entries()].sort((f,m)=>f[0]-m[0]).map(([f,m])=>({pageIndex:f,...m}));a.push({controlId:i.node.id,type:s.type,level:Ic$1(i.node),depth:i.depth,lock:s.lock,effectiveLock:Mc$1(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 jD=Object.freeze([]);function lF(e,t,n){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return n<o.range.end;let i=a.filter(s=>s.range.paragraphId===t);return i.length===a.length?n<o.range.end:i.length>0&&n<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function qD(e,t){let n=new Map;for(let r of e.pages)for(let[o,a]of ZD(r,t))n.has(o)||n.set(o,a);return n}var sF=new WeakMap;function ZD(e,t){let n=sF.get(t);n||(n=new WeakMap,sF.set(t,n));let r=n.get(e);if(r)return r;let o=new Map;for(let a of t(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 n.set(e,o),o}function JD(e,t){let n=Ba(e);if(!n)return null;let r=t.get(n.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+lF(r,n.start.paragraphId,n.start.offset)}:null}var QD="abcdefghijklmnopqrstuvwxyz";function zu(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function kl(e,t,n,r,o){return e.shape({text:o,fontSizeHalfPoints:zu(r),bidiLevel:0,environment:Oo({...t,font:n,direction:"ltr",features:r.smallCaps?{...t.features,smcp:1}:t.features,fallbackOrder:[]})})}function dF(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let s of QD){let l=kl(e,t,n,{...r,smallCaps:!0},s),d=kl(e,t,n,{...r,smallCaps:!1},s);if(!(l.glyphs.length!==d.glyphs.length||l.glyphs.some((u,f)=>u.id!==d.glyphs[f]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}var e1=.5,t1=4,cF=4096,uF=e=>e.verticalAlign==="baseline"?1:.75;function fF(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o,fallback:a}=e,i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},s=new WeakMap,l=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,f=new Array(cF),m=0,p=(y,b,x)=>{let T=f[m];T&&T.cache.delete(T.text),y.set(b,x),f[m]={cache:y,text:b},m=(m+1)%cF;},g=y=>{let b=c.get(y);if(b!==void 0)return b;let x=o(y);return c.set(y,x),x},h=(y,b,x)=>{let T=x?l:s,S=T.get(y);S||(S=new Map,T.set(y,S));let I=S.get(b);return I||(I=new Map,S.set(b,I)),I};return {measure(y,b){if(y.length===0)return 0;let x=g(b);if(!x)return a.measure(y,b);let T=h(x,zu(b),b.smallCaps),S=T.get(y);if(S===void 0){let I=0;try{if(b.smallCaps&&!dF(r,i,x,b,u))return a.measure(y,b);let F=kl(r,i,x,b,y);for(let v of F.glyphs)I+=v.advanceX;}catch{return a.measure(y,b)}S=I/i.fixedPointScale,p(T,y,S);}return S*uF(b)*(b.horizontalScalePercent/100)+y.length*b.characterSpacingPt},lineMetrics(y){let b=g(y);if(!b)return a.lineMetrics(y);let x=uF(y),T=d.get(b);T||(T=new Map,d.set(b,T));let S=zu(y),I=T.get(S);if(I)return x===1?I:{height:I.height*x,baseline:I.baseline*x};let F,v=true,w=b.substitution?.lineMetrics;if(w){let k=S/2;F={height:w.heightEm*k,baseline:w.baselineEm*k};}else try{let k=kl(r,i,b,y," "),P=k.metrics.ascent/i.fixedPointScale,O=k.metrics.descent/i.fixedPointScale,L=S/2,A=P+O,j=L*t1,W=A>j?j/A:1,R=A*W,C=Math.min(Math.max(0,k.metrics.lineGap/i.fixedPointScale),R*e1),M=R+C;M>0?F={height:M,baseline:P*W}:(F=a.lineMetrics(y),v=!1);}catch{F=a.lineMetrics(y),v=false;}return v?(T.set(S,F),x===1?F:{height:F.height*x,baseline:F.baseline*x}):F}}}function n1(e,t){return fF({...t,shaper:e.shaper,environment:e.environment})}function r1(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let l of t.pages)r.add(l.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,s=-1;for(let l of t.pages){let d=l.box.y;d+l.box.height>=n.top&&d<=a&&(i===-1&&(i=l.index),s=l.index);}if(i===-1){let l=o1(t,n.top);l!==null&&(i=l,s=l);}if(i!==-1){let l=Math.max(0,i-o),d=Math.min(t.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<t.pages.length&&r.add(l);return r}function o1(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var pF=["text-local","paragraph-local","flow-structural","global"];function mF(e,t){return pF.indexOf(t)>pF.indexOf(e)?t:e}function a1(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function i1(e){let{run:t,currentRevision:n,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 t(h);let b=y(h);s=b;try{for(;;){let x=b.step();if(x)return x;if(n()!==h.revision)return b.cancel(),d+=1,null;if(s!==b)return null}}finally{s===b&&(s=null);}}function u(h){let y=m(n());y.impact=mF(y.impact,h.impact),y.structural=y.structural||h.structural;for(let b of h.paragraphIds)y.paragraphIds.add(b);for(let b of h.created)y.created.add(b);for(let b of h.deleted)y.deleted.add(b);for(let b of h.dependencyKeys)y.dependencyKeys.add(b);}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 m(h){return a||(a=a1(h)),a.revision=Math.max(a.revision,h),a}function p(){!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),b=c(y);return !b||b.revision!==n()?(l+=1,u(y),p(),false):(r(b,y),true)}return {notify(h){let y=m(n());y.impact=mF(y.impact,h.impact);for(let b of h.dirty)y.paragraphIds.add(b);for(let b of h.created)y.created.add(b),y.paragraphIds.add(b);for(let b of h.deleted)y.deleted.add(b),y.paragraphIds.add(b);for(let b of h.dependencyKeys)y.dependencyKeys.add(b);for(let b of h.splitJoin)y.structural=true,"split"in b?(y.paragraphIds.add(b.split.from),y.paragraphIds.add(b.split.tail)):(y.paragraphIds.add(b.join.kept),y.paragraphIds.add(b.join.removed));(h.impact==="flow-structural"||h.impact==="global")&&(y.structural=true),p();},invalidateAll(h,y){let b=m(h);b.impact="flow-structural",b.structural=true,y&&b.dependencyKeys.add(y),p();},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 sr(e,t,n,r){let o=r?r.spans:e.spans;for(let i of r?r.drawings:e.drawings??[]){if(t===i.start)return i.advanceStart;if(t===i.start+1)return i.advanceEnd}let a=r?r.spans[0]?.box.x??e.contentX:e.contentX;for(let i of o){if(t<=i.range.start)return i.box.x;if(t>=i.range.end){a=i.box.x+i.box.width;continue}return hu(i,t,n)}return a}function yF(e,t,n,r){return xF(e,t,n,true,r)}function L6(e,t,n,r){return xF(e,t,n,false,r)}var gF=new WeakMap,hF=new WeakMap;function s1(e){let t=gF.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let o of Je(r))for(let a of o.lines)for(let i of qe(a)){let s=n.get(i.paragraphId);(!s||i.end>s.end||i.end===s.end&&i.start>s.start)&&n.set(i.paragraphId,{end:i.end,start:i.start});}return gF.set(e,n),n}function bF(e){let t=hF.get(e);if(t)return t;let n=new Map(e.map((r,o)=>[r,o]));return hF.set(e,n),n}function l1(e){return Math.max(3,Math.min(8,e*.25))}function xF(e,t,n,r,o){let a=Wu(t,n);if(!a)return [];let i=bF(n),s=i.get(a.from.paragraphId),l=i.get(a.to.paragraphId),d=s1(e),c=[];for(let u of e.pages)for(let f of Je(u))for(let m of f.lines){let p=qe(m);for(let[g,h]of p.entries()){let y=No(e,h,a.from,a.to),b=i.get(h.paragraphId),x=d.get(h.paragraphId),T=s!==void 0&&l!==void 0&&b!==void 0&&b>=s&&b<l&&x?.end===h.end&&x.start===h.start&&g===p.length-1;if((!r||!y)&&!T)continue;let S=r&&y?sr(m,y.start,o,h):null,I=r&&y?sr(m,y.end,o,h):null,F=T?sr(m,h.end,o,h):null,v=F!==null?F+l1(Math.max(0,m.box.height-m.leading-(m.trailingSpacing??0))):null,w=[S,I,F,v].filter(L=>L!==null),k=Math.min(...w),P=Math.max(...w),O=ar({pageIndex:u.index,x:k,y:m.box.y,width:P-k,height:m.box.height},f.clipToBox?f.box:void 0);O&&c.push(Qm(e,h.paragraphId,O));}}return c}function SF(e,t,n,r){let o=new Map;if(t.length===0)return o;for(let a of e.pages)if(!(n&&!n.has(a.index)))for(let i of Je(a))for(let s of i.lines)for(let l of qe(s))for(let d of t){let c=No(e,l,d.from,d.to);if(!c)continue;let u=sr(s,c.start,r,l),f=sr(s,c.end,r,l),m=o.get(d.key)??[],p=ar({pageIndex:a.index,x:Math.min(u,f),y:s.box.y,width:Math.abs(f-u),height:s.box.height},i.clipToBox?i.box:void 0);p&&(m.push(Qm(e,l.paragraphId,p)),o.set(d.key,m));}return o}function B6(e){return {x:e.contentBox.x,y:e.contentBox.y}}function Ol(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function N6(e,t,n){if(Ao(e).has(t))return {x:0,y:0};let r=e.pages[n];if(!r)return {x:0,y:0};let o=a=>It(a).some(i=>i.paragraphId===t);if(r.header&&o(r.header.fragments))return Ol(r,r.header.box);if(r.footer&&o(r.footer.fragments))return Ol(r,r.footer.box);for(let a of [r.footnotes,r.endnotes])if(a){for(let i of a.notes)if(o(i.fragments))return Ol(r,i.box)}return {x:0,y:0}}function A6(e,t,n,r,o){let a=new Map,i=[];for(let d of t){let c=Wu({anchor:d.from,head:d.to},n);c&&i.push({key:d.key,from:c.from,to:c.to});}if(i.length===0)return a;let s=bF(n),l=(d,c,u,f)=>{for(let m of It(d))for(let p of m.lines){for(let g of qe(p))for(let h of i){let y=No(e,g,h.from,h.to,s);if(!y)continue;let b=sr(p,y.start,o,g),x=sr(p,y.end,o,g),T=a.get(h.key)??[],S=ar({pageIndex:c,x:Math.min(b,x),y:p.box.y,width:Math.abs(x-b),height:p.box.height},m.clipToBox?m.box:void 0);S&&(T.push({...S,x:S.x+u,y:S.y+f}),a.set(h.key,T));}}};for(let d of e.pages)if(!(r&&!r.has(d.index))){l(d.fragments,d.index,0,0);for(let c of [d.header,d.footer]){if(!c)continue;let u=Ol(d,c.box);l(c.fragments,d.index,u.x,u.y);}for(let c of [d.footnotes,d.endnotes])if(c)for(let u of c.notes){let f=Ol(d,u.box);l(u.fragments,d.index,f.x,f.y);}}return a}function mh(e){let t=new Map;for(let n=0;n<e.length;n+=1){let r=e[n].position,o=t.get(r.paragraphId);o||(o=new Map,t.set(r.paragraphId,o)),o.has(r.offset)||o.set(r.offset,n);}return {stops:e,index:t}}var Gu=class{#e=new WeakMap;#s=new WeakMap;get(t,n,r,o){let a;if(!r)a=this.#e.get(t)??new Map,this.#e.has(t)||this.#e.set(t,a);else {let l=this.#s.get(t);l||(l=new WeakMap,this.#s.set(t,l)),a=l.get(r)??new Map,l.has(r)||l.set(r,a);}let i=a.get(n);if(i)return i;let s=o();return a.set(n,s),s}};function RF(e){let t=[],n=new Set;for(let r of e)n.has(r.lineId)||(n.add(r.lineId),t.push(r.lineId));return t}function PF(e,t,n){let r=null;for(let o of e)o.lineId===t&&(!r||Math.abs(o.x-n)<Math.abs(r.x-n))&&(r=o);return r}function Cl(e,t){let n=null;for(let r of e)r.position.paragraphId===t.paragraphId&&(!n||Math.abs(r.position.offset-t.offset)<Math.abs(n.position.offset-t.offset))&&(n=r);return n}function gh(e,t,n){let r=null;for(let o of e){if(o.position.paragraphId!==t.paragraphId)continue;let a=o.position.offset;n===1?a>t.offset&&(!r||a<r.position.offset)&&(r=o):a<t.offset&&(!r||a>r.position.offset)&&(r=o);}return r}function wF(e,t,n){let r=n.index.get(e.paragraphId)?.get(e.offset),o=r===void 0?Cl(n.stops,e):n.stops[r];if(!o)return null;let a=o.lineId,i=n.stops.filter(s=>s.lineId===a);return (t===-1?i[0]:i[i.length-1])?.position??null}function vF(e,t,n,r,o){let a=o(e.paragraphId),i=a.index.get(e.paragraphId)?.get(e.offset);if(i===void 0){let c=gh(a.stops,e,t);if(c)return {position:c.position,desiredX:null}}else {let c=i+t;if(c>=0&&c<a.stops.length)return {position:a.stops[c].position,desiredX:null}}let s=n[r+t];if(!s)return {position:e,desiredX:null};let l=o(s).stops,d=t===-1?l[l.length-1]:l[0];return d?{position:d.position,desiredX:null}:null}function TF(e,t,n){let r=e===-1?t[0]:t[t.length-1];if(!r)return null;let o=n(r).stops;return (e===-1?o[0]:o[o.length-1])?.position??null}function FF(e,t,n,r,o,a){let i=a(e.paragraphId),s=i.index.get(e.paragraphId)?.get(e.offset),l=s===void 0?Cl(i.stops,e):i.stops[s];if(!l)return null;let d=n??l.x,c=RF(i.stops),u=c.indexOf(l.lineId),f=c[u+t];if(f){let p=PF(i.stops,f,d);return p?{position:p.position,desiredX:d}:null}for(let p=o+t;p>=0&&p<r.length;p+=t){let g=a(r[p]),h=RF(g.stops),y=t===-1?h[h.length-1]:h[0];if(!y)continue;let b=PF(g.stops,y,d);if(b)return {position:b.position,desiredX:d}}let m=t===-1?i.stops[0]:i.stops[i.stops.length-1];return m?{position:m.position,desiredX:d}:null}var IF=new WeakMap,kF=new WeakMap;function Ut(e){let t=IF.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let[o,a]of u1(r)){let i=n.get(o);i?i.push(...a):n.set(o,[...a]);}return IF.set(e,n),n}function u1(e){let t=kF.get(e);if(t)return t;let n=new Map,r=(a,i,s)=>{for(let l of qe(a)){let d={line:a,pageIndex:i,...s?{clipBox:s}:{}},c=n.get(l.paragraphId);c?c.push(d):n.set(l.paragraphId,[d]);}},o=(a,i)=>{let s=l=>{for(let d of l){if(d.kind==="paragraph"){for(let c of d.lines)r(c,i,d.clipToBox?d.box:void 0);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 Je(e))for(let i of a.lines)r(i,e.index,a.clipToBox?a.box:void 0);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 kF.set(e,n),n}function W6(e,t,n){let r=Ut(e).get(t);if(r&&r.length>0){let o=Ss(e,t,n,r.map(a=>a.line));if(o)return o}return Ss(e,t,n)}var OF=new WeakMap;function hh(e,t){let n=OF.get(e);n||(n=new Map,OF.set(e,n));let r=n.get(t);if(r)return r;let o=[];for(let{line:i}of Ut(e).get(t)??[])if(i.range.paragraphId===t)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 n.set(t,a),a}function CF(e,t){for(let n of e)if(t>n.start&&t<n.end)return true;return false}function EF(e,t){for(let n of hh(e,t.paragraphId))if(t.offset>n.start&&t.offset<n.end)return {paragraphId:t.paragraphId,offset:n.end};return t}var f1=/[\p{L}\p{N}_'\u2019]/u;function El(e,t,n,r=p1){let o=i=>{let s=e[i];return s!==void 0&&f1.test(s)},a=Math.max(0,Math.min(t,e.length));if(n===-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 p1=new Set;function MF(e,t,n){let r=Ut(e).get(t.range.paragraphId)??[],o=false;for(let a of r){if(a.line===t){o=true;continue}if(o&&a.line.range.start===n)return true}return false}function LF(e,t,n){for(let{line:r}of Ut(e).get(t)??[])if(r.range.start===n&&r.drawings?.some(o=>o.start===n))return r;return null}function BF(e,t,n){for(let r of n?n.spans:e.spans)if(!(t<=r.range.start||t>=r.range.end)&&(r.projected||r.text.length!==r.range.end-r.range.start))return true;return false}function yh(e){let t=e.spans[e.spans.length-1]?.text;return t===`
19
- `||t===Sd$1}function NF(e,t){if(t.end-t.start!==1||!e.drawings?.some(n=>n.start===t.start))return false;for(let n of t.spans)if(n.range.end>n.range.start)return false;return true}function $u(e,t,n,r,o,a,i,s){for(let l of qe(n))i!==void 0&&l.paragraphId!==i||m1(e,t,n,l,r,o,a,s);}function m1(e,t,n,r,o,a,i,s){let l=qe(n).length>1,d=hh(t,r.paragraphId),c=u=>r.spans.some(f=>f.range.start<=u&&u<=f.range.end);for(let u=r.start;u<=r.end;u+=1){if(u===r.end&&u>r.start&&!l&&yh(n)&&MF(t,n,u))continue;if(u===r.start&&u>a&&e.length>0){let m=e[e.length-1];if(m.position.paragraphId===r.paragraphId&&m.position.offset===u)continue}if(BF(n,u,r)||CF(d,u)&&!c(u))continue;let f=ar({x:sr(n,u,i,r),y:n.box.y,width:0,height:n.box.height},s);f&&e.push(Mi(t,{position:{paragraphId:r.paragraphId,offset:u},x:f.x,y:f.y,height:f.height,lineId:n.id,pageIndex:o}));}}function _F(e,t,n,r,o){for(let a of t){if(a.kind==="paragraph"){for(let i of a.lines)$u(r,e,i,n,a.range.start,o,void 0,a.clipToBox?a.box:void 0);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)_F(e,s.blocks,n,r,o);}}var g1=new Gu;function jF(e,t){let n=[];for(let r of e.pages)for(let o of Je(r))for(let a of o.lines)$u(n,e,a,r.index,o.range.start,t,void 0,o.clipToBox?o.box:void 0);return n}function h1(e,t,n){let o=(Ut(e).get(t.paragraphId)??[]).find(({line:i})=>{let s=Un(i,t.paragraphId);return s!==null&&t.offset>=s.start&&t.offset<=s.end});if(!o||qe(o.line).length<2)return null;let a=[];return $u(a,e,o.line,o.pageIndex,0,n,void 0,o.clipBox),mh(a)}function Vu(e,t,n){return g1.get(e,t,n,()=>{let r=[];for(let{line:o,pageIndex:a,clipBox:i}of Ut(e).get(t)??[])$u(r,e,o,a,0,n,t,i);return mh(r)})}function y1(e,t,n,r){if(!e.pages[t])return [];let o=[];return _F(e,n,t,o,r),o}function b1(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function x1(e,t,n){let r=e.pages[t];if(!r)return [];let o=[];for(let a of Je(r,true))if(a.paragraphId===n)for(let i of a.lines)o.push({line:i,pageIndex:t,...a.clipToBox?{clipBox:a.box}:{}});return o}function HF(e,t,n){let r=b1(n),o=Ut(e).get(t.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?[]:x1(e,a,t.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,m)=>{let p=f.pageIndex===a?0:1,g=m.pageIndex===a?0:1;return p-g}),u=null;for(let{line:f,pageIndex:m,clipBox:p}of c){let g=Un(f,t.paragraphId);if(!g||t.offset<g.start||t.offset>g.end)continue;if(t.offset===g.end&&t.offset>g.start&&qe(f).length===1&&(yh(f)||NF(f,g))){u??={line:f,pageIndex:m,clipBox:p};continue}if(t.offset===g.end&&t.offset>g.start&&LF(e,t.paragraphId,t.offset))continue;let h=ar({...ll(f,t.offset,r.measurer,g),width:0},p);if(h)return Mi(e,{position:t,x:h.x,y:h.y,height:h.height,lineId:f.id,pageIndex:m})}if(u){let f=ar({...ll(u.line,t.offset,r.measurer,Un(u.line,t.paragraphId)),width:0},u.clipBox);return f?Mi(e,{position:t,x:f.x,y:f.y,height:f.height,lineId:u.line.id,pageIndex:u.pageIndex}):null}return null}function S1(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return mu(e,n,t)?.caret??null}function R1(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return gu(e,n,t)}function P1(e){return Ed(e)}var AF=new WeakMap;function zF(e){let t=AF.get(e);return t||(t=new Map,e.forEach((n,r)=>{t.has(n)||t.set(n,r);}),AF.set(e,t)),t}function Ku(e,t){return zF(e).get(t)??-1}function Wu(e,t){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 n=Ku(t,e.anchor.paragraphId),r=Ku(t,e.head.paragraphId);return n===-1||r===-1?null:n<r||n===r&&e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor}}function Yi(e,t){let n=[],r=new Set;for(let{line:a}of Ut(e).get(t)??[]){let i=Un(a,t);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," ");n.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),n.push({start:l,text:"\uFFFC"}));}}}n.sort((a,i)=>a.start-i.start);let o="";for(let a of n)a.start>o.length&&(o+=" ".repeat(a.start-o.length)),o=o.slice(0,a.start)+a.text;return o}function bh(e,t){let n=new Set;for(let{line:r}of Ut(e).get(t)??[]){let o=Un(r,t);if(o)for(let a of o.spans)a.range.end!==a.range.start&&a.revisions?.some(i=>i.kind==="delete"||i.kind==="moveFrom")&&(n.add(a.range.start),n.add(a.range.end));}return n}function DF(e,t,n,r){let o=Do(e),a=Ao(e).get(t.paragraphId);return a===void 0?null:vF(t,n,o,a,i=>Vu(e,i,r))}function w1(e,t,n,r=null,o={}){if(!o.stops&&(n==="left"||n==="right"))return DF(e,t,n==="left"?-1:1,o.measurer);if(!o.stops&&(n==="wordLeft"||n==="wordRight")){let l=n==="wordLeft"?-1:1,d=El(Yi(e,t.paragraphId),t.offset,l,bh(e,t.paragraphId));return d===t.offset?DF(e,t,l,o.measurer):{position:{paragraphId:t.paragraphId,offset:d},desiredX:null}}if(!o.stops&&(n==="lineStart"||n==="lineEnd")){let l=wF(t,n==="lineStart"?-1:1,h1(e,t,o.measurer)??Vu(e,t.paragraphId,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(n==="documentStart"||n==="documentEnd")){let l=TF(n==="documentStart"?-1:1,Do(e),d=>Vu(e,d,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(n==="up"||n==="down")){let l=Ao(e).get(t.paragraphId);return l===void 0?null:FF(t,n==="up"?-1:1,r,Do(e),l,d=>Vu(e,d,o.measurer))}let a=o.stops?[...o.stops]:jF(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(l=>l.position.paragraphId===t.paragraphId&&l.position.offset===t.offset);if(i===-1){if(n==="left"||n==="right"){let d=gh(a,t,n==="left"?-1:1)??Cl(a,t);return d?{position:d.position,desiredX:null}:null}let l=Cl(a,t);if(!l)return null;i=a.indexOf(l);}let s=a[i];switch(n){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=Yi(e,t.paragraphId),d=n==="wordLeft"?-1:1,c=El(l,t.offset,d,bh(e,t.paragraphId));return c===t.offset?{position:a[d===-1?Math.max(0,i-1):Math.min(a.length-1,i+1)].position,desiredX:null}:{position:{paragraphId:t.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+(n==="pageUp"?-1:1),c=a.filter(m=>m.pageIndex===d);if(c.length===0)return {position:(n==="pageUp"?a[0]:a[a.length-1]).position,desiredX:l};let u=c[0],f=Number.POSITIVE_INFINITY;for(let m of c){let p=Math.abs(m.y-s.y)*1e3+Math.abs(m.x-l);p<f&&(f=p,u=m);}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=n==="up"?u-1:u+1;if(f<0||f>=d.length)return {position:(n==="up"?a[0]:a[a.length-1]).position,desiredX:l};let m=a.filter(g=>g.lineId===d[f]),p=m[0];for(let g of m)Math.abs(g.x-l)<Math.abs(p.x-l)&&(p=g);return {position:p.position,desiredX:l}}default:return null}}function v1(e,t,n){return HF(e,t,n)}function T1(e,t,n){let r=Wu(t,n);if(!r)return [];if(r.from.paragraphId===r.to.paragraphId&&r.from.offset===r.to.offset)return F1(e,r.from);let o=[];if(r.from.paragraphId===r.to.paragraphId){for(let{line:l}of Ut(e).get(r.from.paragraphId)??[]){let d=Un(l,r.from.paragraphId);if(!d)continue;let c=No(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=Ut(e),i=Ku(n,r.from.paragraphId),s=Ku(n,r.to.paragraphId);if(i===-1||s===-1)return [];for(let l=i;l<=s;l+=1)for(let{line:d}of a.get(n[l])??[]){let c=Un(d,n[l]);if(!c)continue;let u=No(e,c,r.from,r.to,zF(n));if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&o.push(f);}return o}function F1(e,t){let n=null;for(let{line:r}of Ut(e).get(t.paragraphId)??[])for(let o of Un(r,t.paragraphId)?.spans??[]){if(o.range.start<t.offset&&t.offset<=o.range.end)return [o];n===null&&o.range.start===t.offset&&(n=o);}return n?[n]:[]}var WF=new WeakMap;function Nr(e){let t=WF.get(e);if(t)return t;let n=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,m=o.get(f);m||(m=new Map,o.set(f,m),n.set(f,[]),r.set(f,new Map));for(let p of u.rows){let g=m.get(p.id);g===void 0&&(g=m.size,m.set(p.id,g),r.get(f).set(g,p.cells));for(let h of p.cells)n.get(f).push({pageIndex:l,tableId:f,row:p,cell:h,rowIndex:g,isHeaderRepeat:p.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 n)i.set(s,{placed:l,rows:r.get(s)??new Map});return WF.set(e,i),i}function VF(e){let t=0;for(let n of e.rows.values())for(let r of n)t=Math.max(t,xo(r).to+1);return t}var xo=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function I1(e,t,n){if(t.tableId!==n.tableId)return null;let r=Nr(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min(xo(t).from,xo(n).from),s=Math.max(xo(t).to,xo(n).to),l=m=>{let{from:p,to:g}=xo(m);return g>=i&&p<=s},d=m=>(r.rows.get(m)??[]).some(p=>p.vMergeContinue&&l(p)),c=r.rows.size+VF(r)+2;for(let m=0;!(m>c);m+=1){let p=false;for(let[g,h]of r.rows)if(!(g<o||g>a))for(let y of h){if(!l(y))continue;let{from:b,to:x}=xo(y);b<i&&(i=b,p=true),x>s&&(s=x,p=true);}for(;o>0&&d(o);)o-=1,p=true;for(;d(a+1);)a+=1,p=true;if(!p)break}let u=[],f=new Set;for(let m of r.placed){if(m.isHeaderRepeat||m.rowIndex<o||m.rowIndex>a)continue;let{from:p,to:g}=xo(m.cell);g<i||p>s||f.has(m.cell.id)||(f.add(m.cell.id),u.push(m.cell.id));}return u.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:u,rows:{from:o,to:a},columns:{from:i,to:s},text:k1(e,t.tableId,u)}}function m4(e,t){return KF(e,t,true)}function Xu(e,t){return KF(e,t,false)}function KF(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of Nr(e).values())for(let s of i.placed)if(!(s.isHeaderRepeat||!r.has(s.cell.id)))for(let l of s.cell.blocks)n&&l.kind!=="paragraph"||qi(l,o,a);return o}function qi(e,t,n){if(e.kind==="paragraph"){for(let r of Ur(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)qi(a,t,n);}function k1(e,t,n){let r=Xu(e,n),o=r[0],a=r[r.length-1];return !o||!a?O1(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Yi(e,a).length}}}function O1(e,t){let n=Nr(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let s of o.cell.blocks)qi(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 Je(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function C1(e){let t=[...Je(e)];for(let n of [e.header,e.footer])n&&t.push(...It(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...It(r.fragments));return t}function E1(e,t){let n=new Set(Xu(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of C1(a))if(n.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 M1(e,t){let n=new Set(t),r=[];for(let o of Nr(e).values())for(let a of o.placed)n.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 L1(e,t){let n=Nr(e).get(t.tableId);if(!n)return "";let r=new Set(t.cellIds),o=new Map,a=new Set;for(let i of n.placed){if(i.isHeaderRepeat||!r.has(i.cell.id)||a.has(i.cell.id))continue;a.add(i.cell.id);let s=Xu(e,[i.cell.id]).map(d=>Yi(e,d)).join(`
20
- `),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=t.columns.from;d<=t.columns.to;d+=1)l.push(s.get(d)??"");return l.join(" ")}).join(`
21
- `)}function xh(e,t){let n=null,r=-1;for(let[o,a]of Nr(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)qi(d,s,new Set);if(!s.includes(t))continue;let l=o.length;l<=r||(r=l,n={tableId:o,rows:a.rows.size,columns:VF(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return n}function g4(e,t,n){if(n){let a=xh(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let s=Nr(e).get(n.tableId);if(!s)return null;for(let l of s.placed)if(l.cell.id===i)return {tableId:n.tableId,rowId:l.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:l.cell.gridColumn,isHeaderRepeat:l.isHeaderRepeat};return null}let r=xh(e,t);if(!r)return null;let o=Nr(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)qi(s,i,new Set);if(i.includes(t))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 GF=new WeakMap;function h4(e,t){let n=GF.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of Nr(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)qi(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 GF.set(e,r),r.get(t)??null}export{Ik as $,Go as $a,hS as $b,Or as $c,kN as $d,SF as $e,br as A,Jf as Aa,In as Ab,yR as Ac,Li as Ad,Il as Ae,h4 as Af,fk as B,Xk as Ba,UO as Bb,mm as Bc,cu as Bd,LT as Be,pk as C,Qk as Ca,Sp as Cb,vi as Cc,Nw as Cd,BT as Ce,Y1 as D,xs as Da,Rp as Db,RR as Dc,Lt as Dd,uh as De,Df as E,Ya as Ea,Is as Eb,ra as Ec,cg as Ed,Br as Ee,q1 as F,$b as Fa,_t as Fb,lo as Fc,sl as Fd,kD as Fe,mk as G,Bo as Ga,ii as Gb,pW as Gc,kB as Gd,tF as Ge,hk as H,Xb as Ha,Cs as Hb,AR as Hc,mu as Hd,Jq as He,Z1 as I,Ss as Ia,fC as Ib,Xs as Ic,i$ as Id,nF as Ie,yk as J,Ed as Ja,Ip as Jb,DR as Jc,OB as Jd,rF as Je,Pd as K,Rs as Ka,LC as Kb,Cn as Kc,gu as Kd,MD as Ke,ps as L,Md as La,BC as Lb,Ec as Lc,Gw as Ld,LD as Le,_f as M,Ps as Ma,NC as Mb,kr as Mc,hu as Md,BD as Me,jf as N,qe as Na,AC as Nb,Mc as Nc,ll as Nd,l6 as Ne,ms as O,O_ as Oa,Ep as Ob,BM as Oc,WB as Od,_D as Oe,Xn as P,Ur as Pa,li as Pb,aa as Pc,d$ as Pd,lF as Pe,He as Q,C_ as Qa,Lp as Qb,VR as Qc,c$ as Qd,qD as Qe,Pn as R,Do as Ra,Bp as Rb,Bc as Rc,u$ as Rd,JD as Re,Gt as S,Ld as Sa,Np as Sb,pn as Sc,f$ as Sd,kl as Se,Rk as T,rx as Ta,Ap as Tb,qR as Tc,p$ as Td,dF as Te,Hf as U,rO as Ua,di as Ub,Nc as Uc,Su as Ud,fF as Ue,Pk as V,jo as Va,Dp as Vb,HM as Vc,Nn as Vd,n1 as Ve,wk as W,ws as Wa,Ns as Wb,En as Wc,a0 as Wd,r1 as We,Vf as X,Za as Xa,pS as Xb,zM as Xc,aN as Xd,i1 as Xe,ys as Y,Ho as Ya,sc as Yb,Ac as Yc,Fg as Yd,sr as Ye,Ye as Z,sO as Za,ci as Zb,Pm as Zc,TN as Zd,yF as Ze,Fk as _,Wo as _a,jp as _b,Dc as _c,IN as _d,L6 as _e,za as a,kk as aa,dx as ab,Ds as ac,oL as ad,BN as ae,B6 as af,hr as b,Id as ba,lO as bb,yS as bc,Wc as bd,DN as be,Ol as bf,Kr as c,Ck as ca,dO as cb,bS as cc,OG as cd,Z0 as ce,N6 as cf,Vr as d,bs as da,Pr as db,fi as dc,CG as dd,_g as de,A6 as df,Wa as e,Mk as ea,qr as eb,xS as ec,da as ed,jg as ee,W6 as ef,Gy as f,ut as fa,cx as fb,lH as fc,Om as fd,Hg as fe,EF as ff,$r as g,$f as ga,ip as gb,Hp as gc,Em as gd,cY as ge,El as gf,pd as h,kd as ha,ux as hb,zp as hc,IP as hd,BA as he,jF as hf,gd as i,Lk as ia,sp as ib,_s as ic,Mm as id,NA as ie,y1 as if,If as j,Bk as ja,fx as jb,Wp as jc,Uo as jd,Ki as je,HF as jf,Gn as k,Nk as ka,wn as kb,Fr as kc,Sm as kd,wl as ke,S1 as kf,Oo as l,Uf as la,Dd as lb,js as lc,ML as ld,Xv as le,R1 as lf,Qy as m,Bb as ma,ti as mb,Kt as mc,zV as md,jA as me,P1 as mf,Ef as n,Nb as na,Z_ as nb,no as nc,qc as nd,Uv as ne,Yi as nf,xd as o,Ab as oa,eo as ob,YC as oc,nw as od,eh as oe,bh as of,fI as p,Db as pa,Fn as pb,Gp as pc,ru as pd,Qg as pe,w1 as pf,Co as q,_b as qa,Me as qb,Zo as qc,ou as qd,Yv as qe,v1 as qf,Lf as r,jb as ra,gj as rb,Vp as rc,au as rd,qv as re,T1 as rf,pI as s,jk as sa,WO as sb,hH as sc,Xm as sd,Mu as se,I1 as sf,Xe as t,Hk as ta,Le as tb,tm as tc,iw as td,Zv as te,m4 as tf,Bf as u,Xa as ua,Ko as ub,QE as uc,el as ud,Lu as ue,Xu as uf,tb as v,Gk as va,Fs as vb,rR as vc,rr as vd,ah as ve,E1 as vf,Af as w,qf as wa,bp as wb,wc,Bn as wd,PT as we,M1 as wf,sb as x,Cd as xa,Ex as xb,cR as xc,pw as xd,oh as xe,L1 as xf,Sd as y,Je as ya,$O as yb,Ir as yc,Jm as yd,KA as ye,xh as yf,lb as z,It as za,XO as zb,kc as zc,bK as zd,ih as ze,g4 as zf};