@docx-editor.dev/core 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -33
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +2 -2
- package/dist/automation.d.ts +2 -2
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +14 -8
- package/dist/binding.d.ts +14 -8
- package/dist/binding.js +1 -1
- package/dist/chunk-2DTQDAN7.js +2 -0
- package/dist/chunk-3JKQE4QJ.cjs +2 -0
- package/dist/chunk-4WWEDTTE.js +2 -0
- package/dist/chunk-6WIIHJFY.js +1 -0
- package/dist/chunk-7VQ7YLW3.cjs +1 -0
- package/dist/chunk-BS554B6D.cjs +2 -0
- package/dist/chunk-BZK64YU3.cjs +10 -0
- package/dist/chunk-F2VQQW5R.cjs +12 -0
- package/dist/chunk-GQQOL4PV.js +1 -0
- package/dist/chunk-JQFDLZXQ.cjs +2 -0
- package/dist/chunk-O2WQY7IT.cjs +5 -0
- package/dist/chunk-PC76F2HR.cjs +1 -0
- package/dist/chunk-QRAUDDVY.js +2 -0
- package/dist/chunk-RKNH4ZFT.js +12 -0
- package/dist/chunk-STCITBJK.js +12 -0
- package/dist/chunk-TBBXCC7D.js +5 -0
- package/dist/chunk-TSXT537P.cjs +12 -0
- package/dist/chunk-Y7TA7TPF.js +10 -0
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.cts +30 -3
- package/dist/contracts/modules.d.ts +30 -3
- package/dist/contracts/modules.js +1 -1
- package/dist/{tree-package-store-DOKMtCnh.d.cts → custom-node-writes-YqISlSRl.d.cts} +181 -4
- package/dist/{tree-package-store-D5S7VKs5.d.ts → custom-node-writes-ttKuYd0M.d.ts} +181 -4
- package/dist/{editor-D0UDock4.d.cts → editor-B93PggnR.d.cts} +24 -5
- package/dist/{editor-C1QRi1v4.d.ts → editor-CFsSrxGR.d.ts} +24 -5
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1368 -279
- package/dist/editor.d.cts +19 -19
- package/dist/editor.d.ts +19 -19
- package/dist/editor.js +1 -1
- package/dist/{image-resources-BJnTpG66.d.ts → image-resources-C_YnqPhn.d.ts} +19 -11
- package/dist/{image-resources-BpIydXtU.d.cts → image-resources-DwpNnTg3.d.cts} +19 -11
- package/dist/{index-CrW-IxXt.d.cts → index-DQhDm4o0.d.cts} +34 -13
- package/dist/{index-ZqBEOrTV.d.ts → index-DTbKoFJL.d.ts} +34 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +869 -819
- package/dist/layout.d.ts +869 -819
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +4 -4
- package/dist/output.d.ts +4 -4
- package/dist/output.js +1 -1
- package/dist/{protocol-oxHaWmt4.d.ts → protocol-BWVA3Q1p.d.ts} +56 -2
- package/dist/{protocol-CAkOBBGE.d.cts → protocol-FAz_nPm_.d.cts} +56 -2
- package/dist/review-reads-CsoXSvUg.d.ts +401 -0
- package/dist/review-reads-qW0jvdF1.d.cts +401 -0
- package/dist/{review-support-DS8DYX2a.d.cts → review-support-D64Wu236.d.cts} +37 -5
- package/dist/{review-support-Fy3vdIea.d.ts → review-support-nsLXC9jf.d.ts} +37 -5
- package/dist/{semantic-cell-selection-DsmHmLJ5.d.ts → semantic-cell-selection-D_8RbPII.d.ts} +2 -2
- package/dist/{semantic-cell-selection-CZjBSmMv.d.cts → semantic-cell-selection-DwLB71fF.d.cts} +2 -2
- package/dist/{semantic-interaction-Dy-dCUFF.d.ts → semantic-interaction-CXH2wFqi.d.ts} +1 -1
- package/dist/{semantic-interaction-D-Dszxrn.d.cts → semantic-interaction-DqcEonqD.d.cts} +1 -1
- package/dist/{semantic-paint-drawings-BA3z9jl8.d.ts → semantic-paint-drawings-B5Wk2so5.d.ts} +1 -1
- package/dist/{semantic-paint-drawings-D7qbB0E2.d.cts → semantic-paint-drawings-x8g44lD_.d.cts} +1 -1
- package/dist/{semantic-records-CJR3BvHs.d.cts → semantic-records-COVFW5aS.d.cts} +77 -4
- package/dist/{semantic-records-CWodBJsz.d.ts → semantic-records-zTC0_1zi.d.ts} +77 -4
- package/dist/{shaped-measurer-CNIT_svZ.d.cts → shaped-measurer-AFnFxoot.d.cts} +1 -1
- package/dist/{shaped-measurer-B-TAtcQU.d.ts → shaped-measurer-CZXL-a6v.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +223 -317
- package/dist/store.d.ts +223 -317
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-CwOeiaQ8.d.ts → tree-op-types-DWLCllG7.d.ts} +80 -25
- package/dist/{tree-op-types-DMiW6nIH.d.cts → tree-op-types-UOXlRUqQ.d.cts} +80 -25
- package/dist/{tree-session-CiUel5Kz.d.ts → tree-session-BtVFXsF6.d.ts} +45 -7
- package/dist/{tree-session-D47_imvR.d.cts → tree-session-DxIOHUOD.d.cts} +45 -7
- package/dist/{tree-store-CxifqwIv.d.cts → tree-store-B1lEkdXc.d.cts} +1 -1
- package/dist/{tree-store-hLtjeyWE.d.ts → tree-store-BscFPB7x.d.ts} +1 -1
- package/package.json +10 -5
- package/dist/chunk-5KSCB2OZ.js +0 -2
- package/dist/chunk-BSC44TIT.js +0 -5
- package/dist/chunk-DLPL5DAG.js +0 -12
- package/dist/chunk-DOEIARE2.js +0 -2
- package/dist/chunk-G7YCQBZE.cjs +0 -5
- package/dist/chunk-HR7K3W6A.js +0 -1
- package/dist/chunk-HVAV2JSN.js +0 -11
- package/dist/chunk-MYH2HCUJ.cjs +0 -2
- package/dist/chunk-NSM75TN6.cjs +0 -1
- package/dist/chunk-PHDVKUWZ.js +0 -1
- package/dist/chunk-QADYGK5L.cjs +0 -12
- package/dist/chunk-RNBHTPW7.js +0 -10
- package/dist/chunk-UD2ZXLFI.cjs +0 -2
- package/dist/chunk-VYAVK2AH.cjs +0 -1
- package/dist/chunk-YUK46A2N.cjs +0 -11
- package/dist/chunk-ZMIX42J7.cjs +0 -10
- package/dist/chunk-ZT55Q52J.cjs +0 -2
- package/dist/chunk-ZUALAR4M.js +0 -2
- package/dist/note-properties-CnmCoory.d.cts +0 -68
- package/dist/note-properties-m75hmP70.d.ts +0 -68
package/dist/chunk-HVAV2JSN.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {y}from'./chunk-DOEIARE2.js';import {D,pd as pd$1,j,g,h,f,Yc as Yc$1,nd as nd$1,dd as dd$1,ed as ed$1,bd as bd$1,jd,kd,gd as gd$1,ld as ld$1,la as la$1,R,ee,Mb as Mb$1,Ub as Ub$1,pb as pb$1,fb as fb$1,db as db$1,sc,sa as sa$1,rd as rd$1,id as id$1,hd as hd$1,fd as fd$1,sd as sd$1,cd as cd$1,bb as bb$1,le,je as je$1,oe,ke,Ea as Ea$1,wa as wa$1,Ib as Ib$1,Hb as Hb$1,Lb as Lb$1,Za as Za$1,cb as cb$1,Kb as Kb$1,Rd,Zd,he,Xa as Xa$1,_a as _a$1,ac,_b as _b$1,m,kc as kc$1,Va as Va$1,$a as $a$1,cc,dc,ec,Ua as Ua$1,qa as qa$1,Vb as Vb$1,Xb as Xb$1,eb as eb$1}from'./chunk-RNBHTPW7.js';var Hn=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},la=(e,n)=>{if(e.trim().length===0||/[\u0000-\u001f\u007f]/.test(e))throw new TypeError(`${n} must be non-blank and contain no control characters`)},qg=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},wc=(e,n,t)=>{let r=Object.entries(e).sort(([a],[i])=>a<i?-1:a>i?1:0),o=Object.create(null);for(let[a,i]of r){if(qg(a,`${n} key`),!Number.isFinite(i)||t&&(!Number.isSafeInteger(i)||i<0))throw new RangeError(`${n} value must be ${t?"a non-negative safe integer":"finite"}`);if(t&&i>4294967295)throw new RangeError(`${n} value must fit an unsigned 32-bit integer`);o[a]=i;}return Object.freeze(o)},ll=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),Jg=e=>e?Object.freeze({requested:ll(e.requested),resolved:ll(e.resolved)}):void 0,Rc=new WeakSet,dl=e=>{if(h(e),!Rc.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");Rc.add(e);}},sl=e=>(dl(e),e),da=e=>(dl(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:ll(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:Jg(e.substitution)??null})),zt=e=>{if(la(e.shapingLibrary.name,"shaping library name"),la(e.shapingLibrary.version,"shaping library version"),la(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(la(e.language,"language"),!/^(?:und|[A-Za-z]{2,8})(?:-[A-Za-z0-9]{1,8})*$/.test(e.language))throw new TypeError("language must be a BCP 47 language tag");if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("direction must be ltr or rtl");if(!["none","NFC","NFD","NFKC","NFKD"].includes(e.normalization))throw new TypeError("invalid normalization policy");if(!["halfAwayFromZero","halfToEven","towardZero"].includes(e.roundingMode))throw new TypeError("invalid fixed-point rounding mode");if(!Number.isSafeInteger(e.fixedPointScale)||e.fixedPointScale<=0)throw new RangeError("fixed-point scale must be a positive safe integer");let n=sl(e.font),t=e.fallbackOrder.map(sl),r=new Set;for(let o of t){let a=JSON.stringify(da(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:wc(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:wc(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Ic=e=>{let n=zt(e);return Object.freeze({font:da(n.font),variationAxes:Object.freeze(Object.entries(n.variationAxes).map(t=>Object.freeze(t))),shapingLibrary:Object.freeze({name:n.shapingLibrary.name,version:n.shapingLibrary.version}),unicodeDataVersion:n.unicodeDataVersion,normalization:n.normalization,script:n.script,language:n.language,direction:n.direction,features:Object.freeze(Object.entries(n.features).map(t=>Object.freeze(t))),fallbackOrder:Object.freeze(n.fallbackOrder.map(da)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},cl=e=>JSON.stringify(Ic(e)),_t=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},On=e=>{try{return Hn(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Pc=new WeakMap,sa=e=>{let n=Pc.get(e);if(n)return n;dl(e);let t=JSON.stringify({identity:e.identity,id:e.id,family:e.family,request:e.request,hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:e.substitution??null});return Pc.set(e,t),t},ca=(e,n)=>{let t=zt(n);if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("Shaped run direction must be ltr or rtl");if(e.direction!==t.direction)throw new TypeError("Shaped run direction does not match shaping environment");if(_t(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(s=>{_t(s.id,"glyph id"),_t(s.cluster,"glyph cluster");let d=r.get(s.outline);if(!d){if(!Number.isSafeInteger(s.outline.unitsPerEm)||s.outline.unitsPerEm<=0)throw new RangeError("Glyph outline units per em must be a positive safe integer");d=Object.isFrozen(s.outline)?s.outline:Object.freeze({path:s.outline.path,unitsPerEm:s.outline.unitsPerEm}),r.set(s.outline,d);}return Object.freeze({id:s.id,cluster:s.cluster,originX:On(s.originX),originY:On(s.originY),advanceX:On(s.advanceX),advanceY:On(s.advanceY),offsetX:On(s.offsetX),offsetY:On(s.offsetY),outline:d})}),a=e.fontSpans.map(s=>{if(_t(s.glyphStart,"font span start"),_t(s.glyphEnd,"font span end"),s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Font span glyph range is invalid");s.fallbackIndex!==null&&_t(s.fallbackIndex,"fallback index");let d=sl(s.font);if(s.fallbackIndex===null){if(sa(d)!==sa(t.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=t.fallbackOrder[s.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(sa(d)!==sa(c))throw new TypeError("Shaped fallback font does not match shaping environment provenance")}return Object.freeze({...s,font:d})});for(let s=0;s<a.length;s+=1){let d=s===0?0:a[s-1].glyphEnd;if(a[s].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(s=>{for(let[c,u]of [["cluster text start",s.textStart],["cluster text end",s.textEnd],["cluster glyph start",s.glyphStart],["cluster glyph end",s.glyphEnd],["cluster font span",s.fontSpan]])_t(u,c);if(s.textEnd<=s.textStart||s.textEnd>e.text.length||s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Shaped cluster range is invalid");let d=a[s.fontSpan];if(!d||s.glyphStart<d.glyphStart||s.glyphEnd>d.glyphEnd)throw new RangeError("Shaped cluster does not belong to its declared font span");return Object.freeze({...s,advance:On(s.advance),caretEdges:Object.freeze(s.caretEdges.map(On))})}),l=Object.freeze({ascent:On(e.metrics.ascent),descent:On(e.metrics.descent),lineGap:On(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:l})},Qg=(e,n)=>{let t=ca(e,n);return Object.freeze({text:t.text,direction:t.direction,script:n.script,language:n.language,bidiLevel:t.bidiLevel,glyphs:t.glyphs,clusters:t.clusters,fontSpans:Object.freeze(t.fontSpans.map(r=>Object.freeze({glyphStart:r.glyphStart,glyphEnd:r.glyphEnd,fallbackIndex:r.fallbackIndex,font:da(r.font)}))),metrics:t.metrics})};var no=Object.freeze({name:"HarfBuzz",version:"14.2.1"}),to=null,Qr=null;function em(){return to?Promise.resolve():Qr||(Qr=import('harfbuzzjs').then(e=>{let n=e.versionString();if(n!==no.version)throw new Ae("shapingLibraryMismatch",{diagnostic:`expected ${no.version}, loaded ${n}`});to=e;}).catch(e=>{throw Qr=null,e}),Qr)}function nm(){return to!==null}function tm(){if(!to)throw new Ae("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return to}var Ae=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(n,t={}){super(`HarfBuzz shaping failed (${n})`),this.code=n,this.limit=t.limit,this.actual=t.actual,this.diagnostic=t.diagnostic;}},rm=16*1024*1024,om=1e6,am=1e6,im=1e6,lm=4,sm=512,dm=1024*1024,cm=16*1024*1024,um=32*1024*1024,fm=64*1024*1024,pm=64*1024*1024,gm=1e6,mm=1e6,hm=1e6,ym=64,bm=4096,xm=4*1024*1024,Sm=64*1024*1024,wm=64*1024*1024,Rm=256*1024*1024,Pm=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),vc=["cmap","head","hhea","hmtx","maxp"],Im=(e,n)=>e[n]<<8|e[n+1],vm=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,Tm=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?vm(e,12+n*4):0,Bm=(e,n)=>{let t=Tm(e,n),r=Im(e,t+4),o=new Set;for(let a=0;a<r;a+=1){let i=t+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},Om=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Cm=(e,n)=>{let t=j(e,n);if(!t.valid)return t;let r=Bm(e,n);for(let o of vc)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},km=Cm,jn=(e,n,t)=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw new RangeError(`${n} must be a positive safe integer no greater than ${t}`);return e},Em=(e,n,t)=>{let r=e<0n,o=r?-e:e,a=o/n,i=o%n;if(t!=="towardZero"){let d=i*2n;(d>n||d===n&&(t==="halfAwayFromZero"||t==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let l=r?-a:a,s=Number(l);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Tc=(e,n,t,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(t)||t<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");return Hn(Em(BigInt(e)*BigInt(t),BigInt(n),r))},Lm=(e,n,t,r)=>{if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("font size must be a positive integer number of half points");if(n>Math.floor(Number.MAX_SAFE_INTEGER/t))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=n*t,a=e*2;return i=>Tc(i,a,o,r)},Mm=(e,n)=>{if(n.length===0)return [];let t=[...new Set(n.map(i=>i.cluster))].sort((i,l)=>i-l),r=new Map;for(let i=0;i<t.length;i+=1)r.set(t[i],t[i+1]??e.length);let o=[],a=0;for(;a<n.length;){let i=n[a].cluster,l=a+1;for(;l<n.length&&n[l].cluster===i;)l+=1;let s=n.slice(a,l).reduce((c,u)=>c+u.advanceX,0),d=Hn(s);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:l,advance:d,caretEdges:Object.freeze([Hn(0),d]),fontSpan:0}),a=l;}return o},Gn=64,tt=8,Ht=8,Nm=32,Bc=Gn+2*tt,Fm=Gn+tt+Ht,Am=Gn+tt+Ht,Dm=Gn+tt+Ht,Oc=Gn+8*tt,Cc=Gn+8*Ht+tt,_m=Gn+6*Ht+tt,zm=Gn+3*Ht+2*tt,Hm=Gn+3*Ht,ro=e=>Gn+e.length*Uint16Array.BYTES_PER_ELEMENT,fl=e=>Dm+ro(e),eo=e=>Nm+e*tt,jm=(e,n)=>Bc+ro(e)+Fm+fl(n),Gm=e=>Oc+ro(e)+eo(e.length)+e.length*Cc,Wm=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return Oc+ro(e.text)+eo(e.glyphs.length)+e.glyphs.length*Cc+eo(e.clusters.length)+e.clusters.length*_m+e.clusters.reduce((t,r)=>t+eo(r.caretEdges.length),0)+eo(e.fontSpans.length)+e.fontSpans.length*zm+Hm+[...n].reduce((t,r)=>t+fl(r.path),0)},$m=(e,n)=>Bc+ro(e)+Am+n,ul=class{#n;#c;#u;#f;#p;#y;#b;#g;#m;#l;#h;#s;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#d;constructor(n,t){this.#n=n,this.#c=jn(t.maxFontBytes??rm,"maximum font bytes",pm),this.#u=jn(t.maxInputUtf16??om,"maximum input UTF-16 code units",gm),this.#f=jn(t.maxCodepoints??am,"maximum input code points",mm),this.#p=jn(t.maxGlyphs??im,"maximum shaped glyphs",hm),this.#y=jn(t.maxCachedFaces??lm,"maximum cached faces",ym),this.#b=jn(t.maxCachedShapes??sm,"maximum cached shape results",bm),this.#g=jn(t.maxOutlineBytes??dm,"maximum outline bytes",xm),this.#m=jn(t.maxCachedOutlineBytes??cm,"maximum cached outline bytes",Sm),this.#l=jn(t.maxShapedRunBytes??um,"maximum shaped run bytes",wm),this.#h=jn(t.maxCachedShapeBytes??fm,"maximum cached shape bytes",Rm),this.#s=t.instrumentation?.onFaceCacheEvent,this.#e=t.instrumentation,this.#d=new this.#n.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#t.clear(),this.#i=0,this.#r=0,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#d=void 0;}#S(n,t){let r=this.#o.get(n.identity);if(r)return this.#o.delete(n.identity),this.#o.set(n.identity,r),this.#s?.(Object.freeze({kind:"hit",identity:n.identity})),r;let o=g(n);for(let c of vc)if(!o.has(c))throw new Ae("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(Om(t)),i=new this.#n.Face(a,n.faceIndex),l=new this.#n.Font(i),s=l.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new Ae("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(l.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.#s?.(Object.freeze({kind:"evicted",identity:c})));}let d={identity:n.identity,blob:a,face:i,font:l,unitsPerEm:i.upem};return this.#o.set(n.identity,d),this.#s?.(Object.freeze({kind:"created",identity:n.identity})),d}#w(n,t,r){let o=JSON.stringify([n.identity,n.unitsPerEm,r,t]),a=this.#a.get(o);if(a)return this.#a.delete(o),this.#a.set(o,a),this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#i})),a.outline;this.#e?.onOutlinePathCall?.();let i=n.font.glyphToPath(t),l=fl(i);if(l>this.#g)throw new Ae("outlineOverLimit",{limit:this.#g,actual:l});let s=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=jm(o,i);if(d>this.#m)return this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#i})),s;for(;this.#i+d>this.#m;){let c=this.#a.keys().next().value;if(c===void 0)break;let u=this.#a.get(c);this.#a.delete(c),this.#i-=u.bytes,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#i}));}return this.#a.set(o,{outline:s,bytes:d}),this.#i+=d,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),s}#x(n){if(n.length>this.#u)throw new Ae("textOverLimit",{limit:this.#u,actual:n.length});let t=0;for(let r=0;r<n.length;){let o=n.codePointAt(r);if(r+=o>65535?2:1,t+=1,t>this.#f)throw new Ae("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#d)throw new Ae("disposed");if(h(n.environment.font),n.environment.font.byteLength>this.#c)throw new Ae("fontOverLimit",{limit:this.#c,actual:n.environment.font.byteLength});this.#x(n.text);let t=Gm(n.text);if(t>this.#l)throw new Ae("shapedRunOverLimit",{limit:this.#l,actual:t});let r=zt(n.environment),o=JSON.stringify([n.text,n.fontSizeHalfPoints,n.bidiLevel,cl(r)]),a=this.#t.get(o);if(a)return this.#t.delete(o),this.#t.set(o,a),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==no.name||r.shapingLibrary.version!==no.version)throw new Ae("shapingLibraryMismatch");if(r.normalization!=="none")throw new Ae("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new Ae("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new Ae("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new Ae("unsupportedFallback");let i=f(r.font),l=g(r.font);if([...Pm].some(d=>l.has(d)))throw new Ae("unsupportedColorFont");let s=n.text;this.#x(s);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#d;f.reset(),f.addText(s),f.setDirection(r.direction==="rtl"?this.#n.Direction.RTL:this.#n.Direction.LTR),f.setScript(r.script),f.setLanguage(r.language),f.setClusterLevel(this.#n.ClusterLevel.MONOTONE_CHARACTERS);let p=Object.entries(r.features).map(([E,h])=>new this.#n.Feature(E,h));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let g=f.getGlyphInfosAndPositions();if(g.length>this.#p)throw new Ae("glyphOverLimit",{limit:this.#p,actual:g.length});let b=Lm(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),m=Hn(0),y=Hn(0),x=new Map,v=JSON.stringify(Object.entries(r.variationAxes).sort(([E],[h])=>E.localeCompare(h))),O=g.map(E=>{let h=b(E.xAdvance??0),I=b(E.yAdvance??0),R={id:E.codepoint,cluster:E.cluster,originX:m,originY:y,advanceX:h,advanceY:I,offsetX:b(E.xOffset??0),offsetY:b(E.yOffset??0),outline:x.get(E.codepoint)??(()=>{let D=this.#w(d,E.codepoint,v);return x.set(E.codepoint,D),D})()};return m=Hn(m+h),y=Hn(y+I),R}),_=u.hExtents(),W=ca({text:s,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:O,clusters:Mm(s,O),fontSpans:O.length===0?[]:[{glyphStart:0,glyphEnd:O.length,font:r.font,fallbackIndex:null}],metrics:{ascent:b(_.ascender),descent:b(-_.descender),lineGap:b(_.lineGap)}},r),N=Wm(W);if(N>this.#l)throw new Ae("shapedRunOverLimit",{limit:this.#l,actual:N});let B=$m(o,N);if(B>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),W;for(;this.#t.size>=this.#b||this.#r+B>this.#h;){let E=this.#t.keys().next().value;if(E===void 0)break;let h=this.#t.get(E);this.#t.delete(E),this.#r-=h.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:W,bytes:B}),this.#r+=B,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),W}catch(d){throw d instanceof Ae?d:new Ae("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},Xm=(e={})=>new ul(tm(),e);var Z=(e,n,t)=>e>=n&&e<=t,ua=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},Vm=e=>{if(Z(e,65313,65338)||Z(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(Z(e,1424,1535)||Z(e,64285,64335))return {slot:"cs",script:"Hebr"};if(Z(e,1536,1791)||Z(e,1872,1919)||Z(e,2160,2207)||Z(e,2208,2303)||Z(e,64336,65023)||Z(e,65136,65279)||Z(e,126464,126719))return {slot:"cs",script:"Arab"};if(Z(e,4352,4607)||Z(e,11904,12351)||Z(e,12352,12543)||Z(e,12544,12687)||Z(e,12784,12799)||Z(e,13312,19903)||Z(e,19968,40959)||Z(e,44032,55215)||Z(e,63744,64255)||Z(e,65382,65437)||Z(e,65440,65500)||Z(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(Z(e,2304,2431)||Z(e,43232,43263))return {slot:"cs",script:"Deva"};if(Z(e,2432,2559))return {slot:"cs",script:"Beng"};if(Z(e,880,1023)||Z(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(Z(e,1024,1327)||Z(e,7296,7311)||Z(e,11744,11775)||Z(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(Z(e,3584,3711))return {slot:"cs",script:"Thai"};if(Z(e,6016,6143)||Z(e,6624,6655))return {slot:"cs",script:"Khmr"};if(Z(e,768,879)||Z(e,6832,6911)||Z(e,7616,7679)||Z(e,8400,8447)||Z(e,8192,8303)||Z(e,65056,65071)||e<=47||Z(e,58,64)||Z(e,91,96)||Z(e,123,191)||e===5760||Z(e,8192,11263)||Z(e,65024,65039)||Z(e,65280,65381)||Z(e,65438,65439)||Z(e,65501,65535)||Z(e,126976,129791)||Z(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(Z(e,192,687)||Z(e,7424,7551)||Z(e,7552,7615)||Z(e,7680,7935)||Z(e,11360,11391)||Z(e,42784,43007)||Z(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new ua(e)};function Ym(e,n,t){let r=[];for(let l=0;l<e.length;){let s=e.codePointAt(l),d=l+(s>65535?2:1);r.push({from:l,to:d,classified:Vm(s)}),l=d;}let o=null;for(let l of r)l.classified?o=l.classified:o&&(l.classified=o);o=null;for(let l=r.length-1;l>=0;l-=1){let s=r[l];s.classified?o=s.classified:o&&(s.classified=o);}let a=[],i=r.every(({from:l})=>e.codePointAt(l)<=127)?"ascii":"hAnsi";for(let l of r){let s=t.levels[n+l.from]??0,d=(s&1)===1?"rtl":"ltr",c=l.classified??{slot:i,script:"Zyyy"},u=a.at(-1);u&&u.to===l.from&&u.bidiLevel===s&&u.slot===c.slot&&u.script===c.script?a[a.length-1]={...u,to:l.to}:a.push({from:l.from,to:l.to,direction:d,bidiLevel:s,script:c.script,slot:c.slot});}return a}var Km="und";function Um(){return typeof Intl.Segmenter=="function"}function Zm(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function qm(){let e=new(Zm())("und",{granularity:"grapheme"});return {segment(n){let t=[],r=0;for(let o of e.segment(n)){let a=o.index,i=a+o.segment.length;t.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return t}}}var ml=qm(),hl=ml,kc=0;function yl(){return kc}var mr=null,jt=null,fa=null,oo=null;function Cn(e){if(mr===e&&jt)return jt;if(fa===e&&oo){let t=oo;return fa=mr,oo=jt,mr=e,jt=t,t}let n=hl.segment(e);return fa=mr,oo=jt,mr=e,jt=n,n}function Jm(e){hl=e,Ec();}function Qm(){hl=ml,Ec();}function Ec(){kc+=1,mr=null,jt=null,fa=null,oo=null,pl=null,pa=null,gl=0;}function eh(e){return Cn(e).length}var pl=null,pa=null,gl=0;function nh(e){if(pl===e&&pa)return {offsets:pa,count:gl};let n=Cn(e),t=new Int32Array(e.length+1);for(let r of n)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)t[o]=r.index;return t[e.length]=n.length,pl=e,pa=t,gl=n.length,{offsets:t,count:n.length}}function ga(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=nh(e);return r[t]}function th(e,n){let t=Cn(e);if(t.length===0)return 0;let r=Math.max(0,Math.min(n,t.length));return r>=t.length?e.length:t[r].utf16From}function bl(e){let n=new Set([0,e.text.length]);for(let r of Cn(e.text))n.add(r.utf16From),n.add(r.utf16To);let t=new Set([0,e.text.length]);for(let r of e.clusters)t.add(r.textStart),t.add(r.textEnd);return [...n].filter(r=>t.has(r)).sort((r,o)=>r-o)}function ma(e,n){return bl(e).includes(n)}function rh(e,n){return ma(e,n)}function oh(e,n,t){return t>=n&&ma(e,n)&&ma(e,t)}function ah(e){let n=Cn(e.text);return bl(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var Sl="und";function Fc(){return typeof Intl.Segmenter=="function"}function ih(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Sl})`);return e}function Ac(){let e=new(ih())(Sl,{granularity:"word"});return {segment(n){let t=[];for(let r of e.segment(n)){let o=r.index,a=o+r.segment.length;t.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return t}}}var lh=/^[\p{L}\p{N}']$/u,sh=/^\s$/u;function Lc(e){return lh.test(e)}function Mc(e){return sh.test(e)}function xl(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function Dc(e){let n=Cn(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(Mc(o.text)){let a=r+1;for(;a<n.length&&Mc(n[a].text);)a+=1;t.push(xl(n,r,a,false)),r=a;continue}if(Lc(o.text)){let a=r+1;for(;a<n.length&&Lc(n[a].text);)a+=1;t.push(xl(n,r,a,true)),r=a;continue}t.push(xl(n,r,r+1,false)),r+=1;}return t}function _c(){return {segment:Dc}}function zc(e={}){let n=e.isIntlAvailable??Fc,t=e.createIntlBoundary??Ac,r=e.createFallbackBoundary??_c;if(!n())return r();try{return t()}catch{return r()}}var Nc;function Hc(){return Nc??=zc(),Nc}function dh(e,n=Hc()){return n.segment(e)}function ch(e,n){return n.map(t=>({graphemeFrom:ga(e,t.utf16From),graphemeTo:ga(e,t.utf16To),wordLike:t.wordLike}))}var ha=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},hr=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},yr=e=>(ha(e.resourceEpoch,"resourceEpoch"),ha(e.configEpoch,"configEpoch"),ha(e.producerVersion,"producerVersion"),hr(e.extensionFingerprint,"extensionFingerprint"),hr(e.shapingHash,"shapingHash"),Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})),uh=(e,n)=>{let t=yr(e),r=yr(n),a=["resourceEpoch","configEpoch","extensionFingerprint","shapingHash","producerVersion"].filter(i=>t[i]!==r[i]);return a.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(a)})},wl=e=>{let n=e.map(({key:t,fingerprint:r})=>(hr(t,"resource dependency key"),hr(r,"resource dependency fingerprint"),Object.freeze({key:t,fingerprint:r}))).sort((t,r)=>t.key<r.key?-1:t.key>r.key?1:0);for(let t=1;t<n.length;t+=1)if(n[t-1].key===n[t].key)throw new TypeError(`Duplicate resource dependency: ${n[t].key}`);return Object.freeze(n)},fh=e=>(ha(e.revision,"revision"),hr(e.dependencyFingerprint,"dependencyFingerprint"),hr(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:wl(e.resourceDependencies),...yr(e)})),ph=(e,n)=>{let t=wl(e),r=wl(n),o=Math.max(t.length,r.length);for(let a=0;a<o;a+=1){let i=t[a],l=r[a];if(i?.key!==l?.key||i?.fingerprint!==l?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??l.key}}return null};function gh(e,n){if(e.dependencyFingerprint!==n.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==n.inputFingerprint)return {hit:false,reason:"input-changed"};let t=ph(e.resourceDependencies,n.resourceDependencies);if(t)return t;let r=["configEpoch","extensionFingerprint","shapingHash","producerVersion"];for(let o of r)if(e[o]!==n[o])return {hit:false,reason:"epoch-changed",epoch:o};return null}var Rl=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=gh(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:fh(r)});}evictEpoch(n){let t=yr(n),r=0;for(let[o,a]of this.entries){let i=a.provenance;(i.configEpoch!==t.configEpoch||i.extensionFingerprint!==t.extensionFingerprint||i.shapingHash!==t.shapingHash||i.producerVersion!==t.producerVersion)&&(this.entries.delete(o),r+=1);}return r}evictResources(n,t){let r=yr(n),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>t.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};var ao=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});function bn(e,n=false){return jc(e.fragments,n)}function jc(e,n=false){let t=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){t.push(a);continue}for(let i of a.rows)if(!(i.isHeaderRepeat&&!n))for(let l of i.cells)r(l.blocks);}};return r(e),t}function Gc(e){let n=[];for(let t of e.pages)for(let r of bn(t))n.push(...r.lines);return n}function J0(e){return e.anchoredDrawings??[]}function mh(e,n){let t=[];for(let r of e.pages)for(let o of bn(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function hh(e,n,t){for(let r of Gc(e))if(r.range.paragraphId===n&&t>=r.range.start&&t<=r.range.end)return r;return null}function Pl(e){return e.contentControls??[]}function ya(e){if(e.length===0)return null;let n=1/0,t=1/0,r=-1/0,o=-1/0;for(let a of e)n=Math.min(n,a.x),t=Math.min(t,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:n,y:t,width:r-n,height:o-t}}function Il(e){let n=false,t=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(n=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(t=true);return n&&t?"sdtContentLocked":n?"contentLocked":t?"sdtLocked":"unlocked"}var Wc=1,ba=1;function br(e){let n=Math.max(e,1),t=3;if(n>=t){let i=n/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:n,insetPt:0}}let r=1,o=1,a=Math.max(n,t);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(n-a)/2}}var yh=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function bh(e){return yh.has(e)}function $c(e,n){return bh(e)?br(n).extentPt:n}function Tl(e){return e.some(n=>n.localName==="pageBreakBefore"&&n.attributes?.val!=="0"&&n.attributes?.val!=="false")}var Vc=31680/20,lo=12,Yc=3168,Sr=Object.freeze({rule:"auto",value:240}),xh=132,Sh=1584,Kc=["top","left","bottom","right","between","bar"],wh=Object.freeze({}),Rh=/^[0-9A-Fa-f]{6}$/,Ph=new Set(["nil","none"]);function xa(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function vl(e,n){return !Number.isFinite(e)||e<=0?0:e>n?n:e}function Xc(e){let n=xa(e,true);return n===null?0:vl(n/20,Vc)}function Ih(e){return e===void 0||e==="auto"?null:Rh.test(e)?e.toUpperCase():null}function io(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Wn(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Bl(e){let n=0,t=0;for(let r of e){if(r.localName!=="spacing")continue;let o=r.attributes?.before,a=r.attributes?.after;o!==void 0&&(n=Xc(o)),a!==void 0&&(t=Xc(a));}return {before:n,after:t}}function Ol(e){let n,t;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(n=i);let l=a.attributes?.line;if(l!==void 0){let s=xa(l,true);s!==null&&(t=s);}}if(t===void 0)return Sr;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,xh)*240}:Sr}let o=t/20;return o>0?{rule:r,value:Math.min(o,Sh)}:Sr}function Cl(e,n,t){let r=e.rule==="auto"?n*(e.value/240):e.rule==="exact"?e.value:Math.max(n,e.value),o=r-n;return o<0?{height:r,baseline:Math.max(0,Math.min(t,r))}:e.rule==="exact"?{height:r,baseline:t+o/2}:{height:r,baseline:t}}function kl(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r!=="0"&&r!=="false"&&r!=="off";}return n}function xr(e){if(!e)return;let n=io(e,"val");if(!n||Ph.has(n))return;let t=xa(io(e,"sz")),r=t===null?.5:vl(t/8,lo)||.5,o=xa(io(e,"space")),a=o===null?0:vl(o,Yc),i=io(e,"shadow"),l=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:Ih(io(e,"color")),widthPt:r,spacePt:a,...l?{shadow:true}:{}}}function Uc(e){let n=xr(Wn(e,"top")),t=xr(Wn(e,"left")??Wn(e,"start")),r=xr(Wn(e,"bottom")),o=xr(Wn(e,"right")??Wn(e,"end")),a=xr(Wn(e,"between")),i=xr(Wn(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function rt(e){if(!e||e.kind==="textValue")return {};let n=Wn(e,"pBdr");return n?Uc(n):{}}function so(e){let n=wh;for(let t of e){if(!t||t.kind==="textValue")continue;let r=Wn(t,"pBdr");r&&(n=Uc(r));}return n}function sn(e){return $c(e.val,e.widthPt)}function wt(e){return e?e.spacePt+sn(e):0}function vh(e){return wt(e)}function El(e){let n=[];for(let t of Kc){let r=e[t];r&&n.push(`${t}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return n.join("|")}function wr(e,n){return Math.max(e,n)-n}function Ll(e,n,t,r){return t&&!r?0:wr(e,n)}var Th=/^[0-9A-Fa-f]{6}$/;function Sa(e){if(!(e===void 0||e==="auto"||e==="nil")&&Th.test(e))return e.toUpperCase()}function co(e){if(e&&e.val!=="nil")return Sa(e.fill)}function Ml(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return co(n)}function Nl(e){let n;for(let t of e)t.localName==="shd"&&(n=co(t.attributes));return n}function uo(e,n,t){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:n,y:r,width:t,height:Math.max(o.y+o.height-r,0)}}var Bh=64,Oh=31680,Ch=720,kh=36,Fl=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),Rr=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),Eh=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),Lh=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function fo(e){return e.kind!=="textValue"}function wa(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Al(e,n){for(let t of e.children)if(fo(t)&&t.localName===n)return t}function Zc(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function Mh(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function qc(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!fo(r)||r.localName!=="tab")continue;let o=Mh(Zc(wa(r,"pos"))??NaN);if(o===null)continue;let a=wa(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=Eh.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let l=wa(r,"leader");e.set(o,{alignment:i,...l!==void 0&&Lh.has(l)?{leader:l}:{}});}}function Jc(e,n=36){let t=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<t.length&&o<64;o+=1){let[a,i]=t[o];r.push({positionPt:a/20,alignment:i.alignment,...Nh(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function Nh(e){return e.leader?{leader:e.leader}:{}}function Dl(e){let n=new Map;for(let t of e)!t||!fo(t)||qc(n,Al(t,"tabs"));return Jc(n)}function _l(e){if(!e||!fo(e))return Rr;let n=new Map;return qc(n,Al(e,"tabs")),Jc(n)}function po(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function Fh(e){if(!e||!fo(e))return 36;let n=Al(e,"defaultTabStop");if(!n)return 36;let t=Zc(wa(n,"val"));return t===null||t<=0||t>31680?36:t/20}function Pr(e,n,t){let r=Math.max(n,t);for(let i of e.stops)if(i.positionPt>n)return {positionPt:Math.min(i.positionPt,r),alignment:i.alignment,...i.leader?{leader:i.leader}:{}};let o=e.defaultIntervalPt>0?e.defaultIntervalPt:36,a=Math.ceil((n+1e-9)/o)*o;return a<=n&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function zl(e,n,t,r,o){let a=t;switch(e){case "center":a=t-r/2;break;case "right":a=t-r;break;case "decimal":a=t-o;break;default:a=t;}let i=a-n;return i>0?i:0}function Gt(e){return `tabs(${e.stops.map(t=>`${t.alignment}@${Math.round(t.positionPt*1e3)}${t.leader?`/${t.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var go=256,Hl=4,Qc=4096,Ir=64,jl=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),Ah=/\s*\\\*\s*MERGEFORMAT\s*$/i;function eu(e){if(e.length>go)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>go?null:n.replace(Ah,"").trim()}function nu(e){let n=eu(e);return n==="PAGE"||n==="NUMPAGES"||n==="SECTIONPAGES"?n:null}function $n(e,n){return cc(e,n)}function Ra(e){return dc(e)}function Gl(){return {nodes:0,exhausted:false}}function Wt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>Qc?(e.exhausted=true,false):true)}function Wl(){return {nesting:0,instruction:"",instructionOverflow:false,nestingOverflow:false,phase:"idle"}}function mo(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="idle";}function $l(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="instruction"),e.nesting+=1,e.nesting>Hl&&(e.nestingOverflow=true);}function Dh(e,n){if(!(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)){if(e.instruction.length+n.length>go){e.instructionOverflow=true,e.instruction="";return}e.instruction+=n;}}function Xl(e,n,t,r){if(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)return;if(r>Ir){e.instructionOverflow=true,e.instruction="";return}let o=[],a=n.kind==="textValue"?[]:n.children??[];for(let i=a.length-1;i>=0;i-=1)o.push({node:a[i],depth:r+1});for(;o.length>0;){let i=o.pop();if(!Wt(t)){e.instructionOverflow=true,e.instruction="";return}if(i.depth>Ir){e.instructionOverflow=true,e.instruction="";return}if(i.node.kind==="textValue"){if(Dh(e,i.node.value),e.instructionOverflow)return;continue}let l=i.node.children??[];for(let s=l.length-1;s>=0;s-=1)o.push({node:l[s],depth:i.depth+1});}}function Vl(e){return e.nesting!==1||e.phase!=="instruction"||(e.phase="result",e.instructionOverflow||e.nestingOverflow)?null:nu(e.instruction)}function Yl(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&mo(e);}function tu(e){return e.phase==="instruction"&&e.nesting>=1}function ru(e){return e.phase==="result"&&e.nesting>=1}function Kl(e){let n=false,t=false,r=false,o=Gl(),a=Wl(),i=()=>n&&t&&r,l=u=>{u==="PAGE"?n=true:u==="NUMPAGES"?t=true:r=true;},s=(u,f)=>{if(u.kind!=="runProperties"){if($n(u,"begin")){$l(a);return}if(Ra(u)){Xl(a,u,o,f);return}if($n(u,"separate")){let p=Vl(a);p&&l(p);return}$n(u,"end")&&Yl(a);}},d=(u,f)=>{if(u.kind==="run")for(let p of u.children){if(!Wt(o))return;s(p,f+1);}},c=(u,f)=>{if(!i()&&Wt(o)&&!(f>Ir)&&u.kind!=="textValue"){if(u.kind==="paragraph"){mo(a);for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return;mo(a);return}if(u.kind==="run"){d(u,f);return}for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return}};return c(e,0),!n&&!t&&!r?jl:{hasPage:n,hasNumPages:t,hasSectionPages:r}}var _h=64,zh=64,Hh=[{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 ot(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function Rt(e){return String(ot(e))}function ou(e){let n=ot(e);return n<10?`0${n}`:String(n)}function Ul(e){let n=ot(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of Hh)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function au(e){return Ul(e).toLowerCase()}function Zl(e){let n=ot(e),t="";for(;n>0&&t.length<8;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t||"A"}function iu(e){return Zl(e).toLowerCase()}function jh(e){let n=ot(e),t=n%100,r=n%10,o=t>=11&&t<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${n}${o}`}function Gh(e){return ot(e).toString(16).toUpperCase()}function Wh(e){let n=["*","\u2020","\u2021","\xA7"],t=ot(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,$h);return n[r].repeat(o)}var $h=8,Pa=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Xh=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Ia(e){let n=ot(e);if(n<20)return Pa[n];if(n<100){let r=n%10;return Xh[Math.floor(n/10)]+(r===0?"":`-${Pa[r]}`)}if(n<1e3){let r=n%100;return `${Pa[Math.floor(n/100)]} hundred${r===0?"":` ${Ia(r)}`}`}let t=n%1e3;return `${Pa[Math.floor(n/1e3)]} thousand${t===0?"":` ${Ia(t)}`}`}function lu(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function Vh(e){return lu(Ia(e))}var Yh=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function Kh(e){let n=Yh.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function Uh(e){let n=Ia(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return lu(r+Kh(n.slice(t+1)))}function at(e,n){switch(e){case "decimal":return Rt(n);case "decimalZero":return ou(n);case "upperRoman":return Ul(n);case "lowerRoman":return au(n);case "upperLetter":return Zl(n);case "lowerLetter":return iu(n);case "ordinal":return jh(n);case "cardinalText":return Vh(n);case "ordinalText":return Uh(n);case "hex":return Gh(n);case "chicago":return Wh(n);case "numberInDash":return `- ${Rt(n)} -`;case "none":case "bullet":return "";default:return Rt(n)}}function ql(e,n,t){let r=e.length>64?e.slice(0,64):e,o="";for(let a=0;a<r.length&&!(o.length>=64);a+=1){let i=r[a];if(i==="%"&&a+1<r.length){let l=r[a+1];if(l>="1"&&l<="9"){let s=Number(l)-1,d=t[s]??"decimal",c=n[s]??1,u=d==="bullet"?"":at(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}Object.freeze({marks:Object.freeze(new Map)});function $t(e,n){return Yc$1(e,n)}function Jl(e,n){if(!nd$1(e))return null;if(dd$1(e)||ed$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=bd$1(e),r=jd(e)??kd(e);if(!r)return null;let o=gd$1(e),a=o!==null?$t(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?Zh(a,r)??null:null,l=a,s=l!==void 0?t?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...s?{nav:s}:{},...l?{scopeId:l}:{}};if(t&&o!==null&&ld$1(e))return {text:"",...d};if(!n||!a)return {text:"",...d};let c=n.marks.get(a);return c==null?{text:"",...d}:n.reservedMarkText&&n.reservedMarkText.length>0?{text:c,measureText:n.reservedMarkText,...d}:{text:c,...d}}function Zh(e,n){let t=`${n}:`;if(!e.startsWith(t))return null;let r=e.slice(t.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function su(e){return bd$1(e)||cd$1(e)||dd$1(e)||ed$1(e)}var it="all-markup",du=Object.freeze([]),qh=32,Jh={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function vr(e,n){for(let t of e.attributes)if(t.localName===n&&t.namespaceUri===e.namespaceUri&&(t.kind==="wmlVal"||t.kind==="genericExtension"||t.kind==="xmlSpace"))return t.value}function cu(e){if(e.kind==="textValue")return null;let n=Jh[e.kind];if(n===void 0)return null;let t=vr(e,"date");return {kind:n,id:vr(e,"id")??"",author:vr(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function uu(e,n){return e.length===0?[n]:[...e,n]}function fu(e){return e.kind!=="textValue"&&qa$1(e.kind)}var va=qh;function ho(e,n){if(n==="all-markup"||e.length===0)return true;for(let t of e)if(n==="proposed"?t.kind==="delete"||t.kind==="moveFrom":t.kind==="insert"||t.kind==="moveTo")return false;return true}function Ql(e){if(e.kind==="textValue")return null;let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n||n.kind==="textValue")return null;let t=n.children.find(r=>r.kind==="runProperties");if(!t||t.kind==="textValue")return null;for(let r of t.children){if(r.kind==="textValue"||r.namespaceUri!==la$1)continue;let o=r.localName==="ins"?"insert":r.localName==="del"?"delete":null;if(o===null)continue;let a=vr(r,"date");return {kind:o,id:vr(r,"id")??"",author:vr(r,"author")??"",...a===void 0?{}:{date:a},nodeId:r.id}}return null}function Qh(e){for(let n of e){if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")continue;let t=n.attributes??{},r=t.date;return {kind:"format",id:t.id??"",author:t.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function yo(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}var Xn=Object.freeze({fontFamily:null,fontSizePt:10,color:null,bold:false,italic:false,underline:null,strike:false,doubleStrike:false,highlight:null,shading:null,verticalAlign:"baseline",baselineShiftPt:0,caps:false,smallCaps:false,characterSpacingPt:0,horizontalScalePercent:100,kerningMinPt:0,hidden:false}),ey=/^[0-9A-Fa-f]{6}$/;function Pt(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function bo(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function pu(e){return e===void 0||e==="auto"?null:ey.test(e)?e.toUpperCase():null}function gu(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function kn(e,n){let t={...Xn};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?gu(o?.asciiTheme,n)??gu(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=bo(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=pu(r.attributes?.val);break}case "b":t.bold=Pt(r);break;case "i":t.italic=Pt(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!Pt(r)?null:{variant:o,color:pu(r.attributes?.color)};break}case "strike":t.strike=Pt(r);break;case "dstrike":t.doubleStrike=Pt(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=co(r.attributes)??null;break}case "vertAlign":{let o=r.attributes?.val;o==="superscript"||o==="subscript"?t.verticalAlign=o:o==="baseline"&&(t.verticalAlign="baseline");break}case "position":{let o=bo(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=Pt(r);break;case "smallCaps":t.smallCaps=Pt(r);break;case "spacing":{let o=bo(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=bo(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=bo(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=Pt(r);break;}return t}function It(e,n){return n.caps?e.toUpperCase():e}function Vn(e,n,t){return t.measure(It(e,n),n)}function ny(e,n){return e.fontFamily===n.fontFamily&&e.fontSizePt===n.fontSizePt&&e.color===n.color&&e.bold===n.bold&&e.italic===n.italic&&e.strike===n.strike&&e.doubleStrike===n.doubleStrike&&e.highlight===n.highlight&&e.shading===n.shading&&e.verticalAlign===n.verticalAlign&&e.baselineShiftPt===n.baselineShiftPt&&e.caps===n.caps&&e.smallCaps===n.smallCaps&&e.characterSpacingPt===n.characterSpacingPt&&e.horizontalScalePercent===n.horizontalScalePercent&&e.kerningMinPt===n.kerningMinPt&&e.hidden===n.hidden&&e.underline?.variant===n.underline?.variant&&e.underline?.color===n.underline?.color}function es(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}function ns(e,n,t){if(t<=n)return;let r=e[e.length-1];if(r&&r.end>=n){r.end=Math.max(r.end,t);return}e.push({start:n,end:t});}var ty=new Set(["left","center","right"]),ry=new Set(["margin","indent","leftMargin"]),oy=new Set(["dot","hyphen","underscore","middleDot"]);function ay(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==la$1)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===la$1&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:ty.has(n)?n:"left",relativeTo:ry.has(t)?t:"margin",...r!==void 0&&oy.has(r)?{leader:r}:{}}}function hu(e,n){if(!Number.isFinite(e)||e<0)return "";let t=Math.floor(e),r=n&&n.length>0?n:"decimal";if(r==="none"||r==="bullet")return Rt(t);let o=at(r,t);return o.length>0?o:Rt(t)}function iy(e,n){if(e==="PAGE")return hu(n.pageNumber,n.format);let t=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;return !Number.isFinite(t)||t<0?"":Rt(Math.floor(t))}function ly(e,n,t){let r=xo(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}function xo(e){if(!e||e.kind==="textValue")return [];let n=[];for(let t of e.children){if(t.kind==="textValue")continue;let r={};for(let o of t.attributes)r[o.localName]=o.value;n.push(Object.keys(r).length>0?{localName:t.localName,attributes:r}:{localName:t.localName});}return n}function mu(e){if(e.kind==="text"||e.kind==="deletedText"){let n="";for(let t of e.children)t.kind==="textValue"&&(n+=t.value);return n}return e.kind==="tab"?" ":e.kind==="hardBreak"?Xb$1(e):""}function yu(e,n=[],t,r,o,a,i=it,l,s,d){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let c=[],u=0,f,p=kc$1(e,{maxNesting:Hl,maxInstructionChars:go}),g=new Set(p.filter(R=>R.kind==="complex").map(R=>R.node.id)),b=new Set;for(let R of p)for(let D of R.removeNodeIds)b.add(D);let m=Wl(),y=Gl(),x=null,v=null,O=du,_=(R,D,T,C,k,M,L)=>{if(R.length===0&&!C&&!L?.inlineDrawing)return;let z=f?{link:f}:{},F=O.length===0?{}:{revisions:O};if(C){c.push({text:R,props:D,style:T,start:k,end:M,projected:true,...L?.measureText!==void 0?{measureText:L.measureText}:{},...L?.noteNav?{noteNav:L.noteNav}:{},...L?.inlineDrawing?{inlineDrawing:L.inlineDrawing}:{},...z,...F});return}R.length!==0&&c.push({text:R,props:D,style:T,start:k,end:M,...L?.positionalTab?{positionalTab:L.positionalTab}:{},...L?.breakKind?{breakKind:L.breakKind}:{},...z,...F});},W=()=>{if(!x||!x.atomic){x=null,v=null;return}let R=x.atomStart,D=R+1;if(x.style.hidden){x=null,v=null;return}if(x.kind&&t){let T=iy(x.kind,t);_(T,x.props,x.style,true,R,D);}else x.cachedText.length>0&&_(x.cachedText,x.props,x.style,true,R,D);x=null,v=null;},N=()=>{if(x){if(x.atomic){u=x.atomStart;for(let R of x.buffered)c.push({...R,start:u,end:u+(R.end-R.start)}),u+=R.end-R.start;x.cachedText.length>0&&x.buffered.length===0&&(_(x.cachedText,x.props,x.style,false,u,u+x.cachedText.length),u+=x.cachedText.length);}else {for(let R of x.buffered)c.push(R);u=x.bufferOffset;}x=null,v=null;}},B=(R,D,T)=>{let C=(F,j,G,Y)=>{let K=yo(O),U=T.hidden||!ho(O,i)||K;if(j.hidden||U){if(K&&l&&ns(l,G,Y),!j.hidden)return;_("\uFFFC",D,T,true,G,Y);return}_("\uFFFC",D,T,true,G,Y,{inlineDrawing:Object.freeze({drawingNodeId:F,ownerPartName:s.ownerPartName,projection:j,resource:s.resourceOf(j)})});};if(R.kind==="drawing"){let F=u;u+=1;let j=u;if(!s)return;let G=s.projectionForAtom?.(R.id)??(R.kind==="drawing"?s.project(R):null);if(!G||G.kind!=="inline"){_("\uFFFC",D,T,true,F,j);return}C(R.id,G,F,j);return}if(_a$1(R)){let F=u;u+=1;let j=u;if(!s)return;let G=s.projectionForAtom?.(R.id)??null;if(!G||G.kind!=="inline"){_("\uFFFC",D,T,true,F,j);return}C(R.id,G,F,j);return}if(su(R)){let F=Jl(R,a),j=u,G=j+1;if(u=G,T.hidden||!F||F.text.length===0&&!F.measureText)return;let Y=F.scopeId&&F.nav?{scopeId:F.scopeId,direction:F.nav}:void 0;_(F.text.length>0?F.text:F.measureText??"",D,T,true,j,G,{...F.measureText!==void 0?{measureText:F.measureText}:{},...Y?{noteNav:Y}:{}});return}let k=ay(R);if(k){T.hidden||_(" ",D,T,false,u,u,{positionalTab:k});return}let M=mu(R);if(M.length===0)return;let L=yo(O);T.hidden||!ho(O,i)||R.kind==="deletedText"&&!L||_(M,D,T,false,u,u+M.length,{...R.kind==="hardBreak"?{breakKind:Vb$1(R)}:{}}),L&&l&&ns(l,u,u+M.length),u+=M.length;},E=(R,D)=>{if(R.kind!=="run")return;let T=ly(R,n,r),C=kn(T,d);for(let k of R.children){if(!Wt(y)){if(N(),mo(m),k.kind==="runProperties"||$n(k,"begin")||$n(k,"separate")||$n(k,"end")||Ra(k)||b.has(k.id)&&v===null)continue;B(k,T,C);continue}if(k.kind!=="runProperties"){if($n(k,"begin")){let M=g.has(k.id);$l(m),m.nesting===1&&(N(),v=M?k.id:null,x={kind:null,atomic:M,atomStart:u,props:T,style:C,capturedResultStyle:false,cachedText:"",buffered:[],bufferOffset:u},M&&(u+=1));continue}if(Ra(k)){Xl(m,k,y,D+1);continue}if($n(k,"separate")){let M=m.nesting===1&&m.phase==="instruction",L=Vl(m);M&&x&&(x.kind=L&&t?L:null,x.props=T,x.style=C);continue}if($n(k,"end")){let M=m.nesting===1;Yl(m),M&&(x?.atomic?W():N());continue}if(!(tu(m)&&x?.atomic)){if(x&&ru(m)){let M=mu(k);if(M.length===0)continue;let L=yo(O);if(!ho(O,i)||k.kind==="deletedText"&&!L){x.atomic||(u+=M.length,x.bufferOffset=u),L&&l&&ns(l,u-M.length,u);continue}if(x.atomic){if(C.hidden)continue;x.capturedResultStyle||(x.props=T,x.style=C,x.capturedResultStyle=true),x.cachedText+=M;continue}if(C.hidden){u+=M.length,x.bufferOffset=u;continue}x.capturedResultStyle||(x.props=T,x.style=C,x.capturedResultStyle=true),x.buffered.push({text:M,props:T,style:C,start:u,end:u+M.length}),u+=M.length,x.bufferOffset=u;continue}b.has(k.id)&&v===null&&g.size>0,B(k,T,C);}}}};if(!Wt(y))return c;let h=Va$1(),I=(R,D,T,C)=>{if(ec(R)){u+=1;return}if(R.kind==="run"){E(R,D);return}if(Ib$1(R)){if(C>=Hb$1||D>Ir)return;for(let z of Lb$1(R))I(z,D+1,T,C+1);return}if(D>Ir||D>=va)return;let k=R.kind!=="textValue"&&"localName"in R?Ua$1(T,R):T;if(R.kind==="hyperlink"){let z=f;f=o?.(R)??void 0;for(let F of R.children)I(F,D+1,k,C);f=z;return}if(!fu(R))return;let M=cu(R);if(!M||!Wt(y))return;let L=O;O=uu(L,M);for(let z of R.children)I(z,D+1,k,C);O=L;};for(let R of e.children)I(R,1,h,0);return N(),c}function Xt(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function bu(e,n=jl){if(!e||!Xt(n))return "";let t=[];return n.hasPage&&(t.push(`p${e.pageNumber}`),e.format&&t.push(`f${e.format}`)),n.hasNumPages&&t.push(`n${e.pageCount}`),n.hasSectionPages&&t.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${t.join("/")}`}function So(e,n,t,r){let o=false,a=e.map((i,l)=>{let s=n+l,d=i.pageFieldSource;return d&&d.pageNumber===s&&d.sectionPageCount===t&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:s,sectionPageCount:t,...r?{format:r}:{}}})});return o?a:e}function Vt(e){let n=e.pages.length;if(n===0)return e;let t=false,r=e.pages.map(o=>{let a=o.pageFieldSource,i={pageNumber:a?.pageNumber??o.index+1,pageCount:n,sectionPageCount:a?.sectionPageCount??n,...a?.format?{format:a.format}:{}},l=c=>{if(!c?.pageFieldProjector)return c;t=true;let u=c.pageFieldProjector(i),{pageFieldProjector:f,...p}=u;return p},s=l(o.header),d=l(o.footer);return s===o.header&&d===o.footer?o:{...o,...s!==void 0?{header:s}:{},...d!==void 0?{footer:d}:{}}});return t?{revision:e.revision,pages:r}:e}function sy(e){let n=Object.entries(e.attributes??{}).sort(([t],[r])=>t<r?-1:t>r?1:0).map(([t,r])=>`${t}=${r}`).join(",");return `${e.localName}(${n})`}function dy(e){return e.map(sy).join(";")}function xu(e){if(e.kind==="textValue")return `t:${e.value}`;let n=[`${e.kind}:${"localName"in e?e.localName:""}#${"id"in e?e.id:""}`];if("attributes"in e&&Array.isArray(e.attributes)){let t=[...e.attributes].map(r=>`${r.namespaceUri??""}:${r.localName}=${r.value}`).sort();for(let r of t)n.push(r);}for(let t of e.children??[])n.push(xu(t));return `(${n.join("|")})`}function Yt(e){let n=Math.round(e.width*1e3);return [e.producer,n,e.drawingToken??"",e.exclusionToken??"",dy(e.properties),xu(e.paragraph)].join("\0")}function cy(e={}){let n=Math.max(1,e.maxEntries??4096),t=new Map,r=0,o=0,a=0;return {get(i){let l=t.get(i);if(l===void 0){o+=1;return}return r+=1,t.delete(i),t.set(i,l),l},set(i,l){for(t.has(i)&&t.delete(i),t.set(i,l);t.size>n;){let s=t.keys().next();if(s.done)break;t.delete(s.value),a+=1;}},retain(i){for(let l of [...t.keys()])i.has(l)||(t.delete(l),a+=1);},clear(){t.clear();},get stats(){return {hits:r,misses:o,evictions:a,size:t.size}}}}var Su=21600;function ze(e){return Number.isFinite(e)?e:0}function wo(e){if(e.length===0)return Object.freeze([]);let n=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),t=[],r=n[0];for(let o=1;o<n.length;o+=1){let a=n[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(t.push(r),r=a);}return t.push(r),Object.freeze(t)}function uy(e,n){let t=[];for(let r of e)for(let o of n){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&t.push(Object.freeze({start:a,end:i}));}return wo(t)}function ts(e,n,t){let r=[];for(let o of e){let a=Math.max(o.start,n),i=Math.min(o.end,t);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return wo(r)}function fy(e,n,t){let r=[],o=n;for(let a of e)a.start>o&&r.push(Object.freeze({start:o,end:a.start})),o=Math.max(o,a.end);return o<t&&r.push(Object.freeze({start:o,end:t})),Object.freeze(r)}function Ru(e,n){return Tr(e,n)}function rs(e,n,t){return Ru(Tr(e,n),t)}function py(e,n){let t=[],r=Math.min(e.length,Qe);if(r<2)return Object.freeze([]);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r],l=a.y,s=i.y;if(l===s)continue;let d=Math.min(l,s),c=Math.max(l,s);if(n<d||n>c||n===c&&s>l||n===d&&s<l)continue;let u=(n-l)/(s-l),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&t.push({x:f,delta:s>l?1:-1});}return t.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(t)}function gy(e,n){let t=[],r=Math.min(e.length,Qe);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(n-a.y)>1e-6)continue;let l=Math.min(a.x,i.x),s=Math.max(a.x,i.x);s>l&&t.push(Object.freeze({start:l,end:s}));}return wo(t)}function wu(e,n,t){let r=my(py(e,n),t),o=gy(e,n);return wo([...r,...o])}function my(e,n){if(e.length===0)return Object.freeze([]);let t=[];if(n==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,l=e[a+1].x;l>i&&t.push(Object.freeze({start:i,end:l}));}return Object.freeze(t)}let r=0,o=null;for(let a of e){let i=r;r+=a.delta,i===0&&r!==0?o=a.x:i!==0&&r===0&&o!==null&&(a.x>o&&t.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(t)}function hy(e,n){return Object.freeze({top:ze(e.top)+ze(n.top),right:ze(e.right)+ze(n.right),bottom:ze(e.bottom)+ze(n.bottom),left:ze(e.left)+ze(n.left)})}function yy(e,n,t,r,o,a){let i=n.x-e.x,l=n.y-e.y,s=r.x-t.x,d=r.y-t.y,c=i*d-l*s;if(Math.abs(c)<1e-12)return null;let f=((t.x-e.x)*l-(t.y-e.y)*i)/c,p=((t.x-e.x)*d-(t.y-e.y)*s)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let g=e.y+f*l;return !Number.isFinite(g)||g<o-1e-6||g>a+1e-6?null:g}function by(e,n,t,r){let o=[],a=Math.min(e.length,Qe),i=Math.min(n.length,Qe);if(a<2||i<2)return Object.freeze([]);let l=Qe*Qe,s=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(s>=l)return Object.freeze(o);s+=1;let p=n[f],g=n[(f+1)%i],b=yy(c,u,p,g,t,r);b!==null&&o.push(b);}}return Object.freeze(o)}function xy(e,n,t){let r=new Set;r.add(n),r.add(t);for(let o of e){let a=Math.min(o.length,Qe);for(let i=0;i<a;i+=1){let l=o[i].y;Number.isFinite(l)&&l>=n-1e-6&&l<=t+1e-6&&r.add(l);}for(let i=0;i<a;i+=1){let l=o[i],s=o[(i+1)%a],d=l.y,c=s.y;if(d!==c)for(let u of [n,t]){let f=Math.min(d,c),p=Math.max(d,c);u>=f&&u<=p&&r.add(u);}}}if(e.length>=2)for(let o of by(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function Sy(e,n,t,r){let o=wu(e,t,r);return n&&n.length>=3&&(o=uy(o,wu(n,t,"nonzero"))),o}function Pu(e,n,t,r,o=null){let a=ze(t.top),i=ze(t.bottom),l=ze(t.left),s=ze(t.right),d=n-i,c=n+a,u=xy(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((g,b)=>{if(b+1>=u.length)return [];let m=u[b+1];return m<=g+1e-6?[g]:[g,m,(g+m)/2]}):[d];for(let g of p){let b=Sy(e,o,g,r);for(let m of b)f.push(Object.freeze({start:m.start-l,end:m.end+s}));}return wo(f)}function Iu(e){let{x:n,y:t,width:r,height:o}=e;return Object.freeze([Object.freeze({x:n,y:t}),Object.freeze({x:n+r,y:t}),Object.freeze({x:n+r,y:t+o}),Object.freeze({x:n,y:t+o})])}function wy(e){let n=Math.max(0,ze(e.extentWidthPt)),t=Math.max(0,ze(e.extentHeightPt)),r=Ba(e.transform,n,t),o=Math.min(e.polygonEmu.length,Qe);if(o<3)return Iu({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/Su,i=r.height/Su,l=[];for(let s=0;s<o;s+=1){let d=e.polygonEmu[s];l.push(Object.freeze({x:ze(d.x)*a,y:ze(d.y)*i}));}return Oa({points:Object.freeze(l),sourceWidth:r.width,sourceHeight:r.height,offsetX:r.offsetX,offsetY:r.offsetY,crop:{left:0,top:0,right:0,bottom:0},transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:e.anchorX,anchorY:e.anchorY})}function Ry(e,n){let t=n.effectInsets??Ta,r=n.wrapDistances??Ta,o=ze(n.contentLeft),a=ze(n.contentRight);if(n.mode==="topAndBottom"){let c=Ru(Tr(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ts([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=rs(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ts([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:Iu(n.contentBounds),l=n.mode==="through"?"evenodd":"nonzero",s=hy(r,t),d=Pu(i,e,s,l,n.clipPolygon);return ts(d,o,a)}function Py(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(n=>n.start)),end:Math.max(...e.map(n=>n.end))})}function Iy(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=Py(n);if(!a)return e;if(t==="left")return Object.freeze(e.filter(s=>s.end<=a.start+1e-4));if(t==="right")return Object.freeze(e.filter(s=>s.start>=a.end-1e-4));let i=Math.max(0,a.start-r),l=Math.max(0,o-a.end);return i===l?Object.freeze(e.filter(s=>s.start>=a.end-1e-4)):i>l?Object.freeze(e.filter(s=>s.end<=a.start+1e-4)):Object.freeze(e.filter(s=>s.start>=a.end-1e-4))}function vu(e,n){let t=Ry(e,n),r=fy(t,n.contentLeft,n.contentRight);return Iy(r,t,n.textSide,n.contentLeft,n.contentRight)}function vy(e,n,t,r){return t.length<3?false:Pu(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function os(e,n,t){let r=t.effectInsets??Ta,o=t.hitBounds;if(e<o.x||e>o.x+o.width||n<o.y||n>o.y+o.height)return false;if(t.clipPolygon&&t.clipPolygon.length>=3)return vy(e,n,t.clipPolygon,r);let a=Tr(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Tu(e){let n=Object.freeze({top:ze(e.wrapDistancesEmu.top/Yn),right:ze(e.wrapDistancesEmu.right/Yn),bottom:ze(e.wrapDistancesEmu.bottom/Yn),left:ze(e.wrapDistancesEmu.left/Yn)}),t=e.mode==="tight"||e.mode==="through"?wy({polygonEmu:e.polygonEmu,extentWidthPt:e.extentWidthPt,extentHeightPt:e.extentHeightPt,anchorX:e.contentBounds.x,anchorY:e.contentBounds.y,transform:e.transform}):null;return Object.freeze({mode:e.mode,contentBounds:e.contentBounds,polygon:t,clipPolygon:e.geometry.clipPolygon,wrapDistances:n,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var dn=1e5,Qe=D.maxPolygonPoints,Ta=Object.freeze({top:0,right:0,bottom:0,left:0}),Ty=32,By=.1,Oy=new Set(["rect","ellipse","roundRect"]);function se(e){return Number.isFinite(e)?e:0}function xn(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function Bu(e,n){let t=e+n;return Number.isFinite(t)?t:0}function Ou(e,n,t){let r=xn(e,0,t),o=xn(n,0,t);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=t){let i=(t-1)/a;r*=i,o*=i;}return {left:r,right:o}}function Cy(e){let n=Ou(xn(e.left,0,dn),xn(e.right,0,dn),dn),t=Ou(xn(e.top,0,dn),xn(e.bottom,0,dn),dn);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function ky(e){let n=Cy({left:e.left*dn,top:e.top*dn,right:e.right*dn,bottom:e.bottom*dn});return Object.freeze({left:n.left/dn,top:n.top/dn,right:n.right/dn,bottom:n.bottom/dn})}function Ey(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/Yn;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)})}function Tr(e,n){let t=se(n.left),r=se(n.right),o=se(n.top),a=se(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,Bu(e.width,t+r)),height:Math.max(0,Bu(e.height,o+a))})}function Ly(e,n,t){let r=e*xn(t.left,0,1),o=n*xn(t.top,0,1),a=e*(1-xn(t.right,0,1)),i=n*(1-xn(t.bottom,0,1));if(a<=r||i<=o){let l=e/2,s=n/2;return Object.freeze({left:l,top:s,right:l,bottom:s})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function Ba(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?se(vt(r)??n):Math.max(0,se(n)),l=o>0?se(vt(o)??t):Math.max(0,se(t));return Object.freeze({offsetX:se(vt(a.x)??0),offsetY:se(vt(a.y)??0),width:i,height:l})}function My(e,n,t,r){let o=Ly(n,t,r),a=o.right-o.left,i=o.bottom-o.top,l=Math.max(n,1),s=Math.max(t,1),d=[],c=Math.min(e.length,Qe);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+xn(f.x/l,0,1)*a,g=i<=0?o.top:o.top+xn(f.y/s,0,1)*i;d.push(Object.freeze({x:se(p),y:se(g)}));}return Object.freeze(d)}function Cu(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=se(t.rotationDegrees)*Math.PI/180,i=Math.cos(a),l=Math.sin(a),s=r*i-o*l,d=r*l+o*i;return Object.freeze({x:se(s+n.x),y:se(d+n.y)})}function ku(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let n=e[0].x,t=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,Qe);for(let i=1;i<a;i+=1){let l=e[i];!Number.isFinite(l.x)||!Number.isFinite(l.y)||(n=Math.min(n,l.x),t=Math.max(t,l.x),r=Math.min(r,l.y),o=Math.max(o,l.y));}return Object.freeze({x:n,y:r,width:Math.max(0,t-n),height:Math.max(0,o-r)})}function as(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=Ro(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let l of t)r.push(Cu(Object.freeze({x:l.x+e.offsetX,y:l.y+e.offsetY}),n,e.transform));let o=ku(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,se(e.layoutWidth))/a,scaleY:Math.max(0,se(e.layoutHeight))/i,anchorX:se(e.anchorX),anchorY:se(e.anchorY)})}function Ny(e,n){return Object.freeze({x:se(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:se(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function Oa(e){let n=e.mapping??as({sourceWidth:e.sourceWidth,sourceHeight:e.sourceHeight,offsetX:e.offsetX,offsetY:e.offsetY,transform:e.transform,layoutWidth:e.layoutWidth,layoutHeight:e.layoutHeight,anchorX:e.anchorX,anchorY:e.anchorY}),t=My(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(t.length>0?t.length:e.points.length,Qe),o=t.length>0?t:e.points.slice(0,r),a=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),i=[];for(let l=0;l<r;l+=1){let s=o[l],d=Object.freeze({x:se(s.x+e.offsetX),y:se(s.y+e.offsetY)});i.push(Ny(Cu(d,a,e.transform),n));}return Object.freeze(i)}function Ro(e,n,t,r){if(t<=0||r<=0){let o=Object.freeze({x:e,y:n});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:n}),Object.freeze({x:e+t,y:n}),Object.freeze({x:e+t,y:n+r}),Object.freeze({x:e,y:n+r})])}function Fy(e,n,t){if(!e||!Oy.has(e))return null;if(n<=0||t<=0)return Ro(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return Ro(0,0,n,t);if(e==="ellipse"){let l=[],s=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(Ty,Qe);for(let p=0;p<f;p+=1){let g=p/f*Math.PI*2;l.push(Object.freeze({x:s+c*Math.cos(g),y:d+u*Math.sin(g)}));}return Object.freeze(l)}let r=Math.min(n,t)*By,o=Math.max(0,r),a=n,i=t;return Object.freeze([Object.freeze({x:o,y:0}),Object.freeze({x:a-o,y:0}),Object.freeze({x:a,y:o}),Object.freeze({x:a,y:i-o}),Object.freeze({x:a-o,y:i}),Object.freeze({x:o,y:i}),Object.freeze({x:0,y:i-o}),Object.freeze({x:0,y:o})])}function Or(e){return Object.freeze({x:se(e.x),y:se(e.y)})}function Ay(e,n){if(e.length===0)return Object.freeze([]);let t=n.x+n.width,r=n.y+n.height,o=(i,l,s)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,Qe);for(let u=0;u<c;u+=1){let f=Or(i[u]),p=Or(i[(u+1)%c]),g=l(f),b=l(p);if(g&&b?d.push(p):g&&!b?d.push(Or(s(f,p))):!g&&b&&(d.push(Or(s(f,p))),d.push(p)),d.length>=Qe)break}return Object.freeze(d.slice(0,Qe))},a=e.slice(0,Qe).map(Or);return a=[...o(a,i=>i.x>=n.x,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(n.x-i.x)/s:0;return Object.freeze({x:n.x,y:se(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.x<=t,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(t-i.x)/s:0;return Object.freeze({x:t,y:se(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.y>=n.y,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(n.y-i.y)/s:0;return Object.freeze({x:se(i.x+d*(l.x-i.x)),y:n.y})})],a=[...o(a,i=>i.y<=r,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(r-i.y)/s:0;return Object.freeze({x:se(i.x+d*(l.x-i.x)),y:r})})],Object.freeze(a)}function Dy(e){let n=ku(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function Ca(e,n){let t=_y(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=a=>{if(!a||a.length===0)return a;let i=Ay(a,n);return i.length>=3?Object.freeze(i.map(Or)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function _y(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function zy(e){let n=Math.max(0,se(e.extentWidth)),t=Math.max(0,se(e.extentHeight)),r=se(e.anchorX),o=se(e.anchorY),a=ky(e.crop),i=Ey(e.effectExtentEmu),l=Ba(e.transform,n,t),s=Object.freeze({x:r,y:o,width:n,height:t}),d={sourceWidth:l.width,sourceHeight:l.height,offsetX:l.offsetX,offsetY:l.offsetY,crop:a,transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:r,anchorY:o},c=as(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=Oa({points:Ro(0,0,l.width,l.height),...d,crop:u,mapping:c}),p=Fy(e.presetGeometry,l.width,l.height),g="none",b=p;b||(g=e.presetGeometry?"unsupported-preset":"none",b=Ro(0,0,l.width,l.height));let m=Oa({points:b,...d,crop:u,mapping:c}),y=Dy(m.length>=3?m:f),x=Tr(y,i);return Object.freeze({contentBounds:s,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:m.length>=3?m:f,clipFallback:g,effectInsets:i})}function Cr(e){let n=e.projection.picture,t=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return zy({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:n?.crop??{left:0,top:0,right:0,bottom:0},transform:n?.transform??t,presetGeometry:n?.presetGeometry??null})}function Hy(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=Ba(n,t,r),a=o.width,i=o.height,l=as({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),s=se(n.rotationDegrees),d=Math.abs(s%360)>1e-4,c=n.flipHorizontal?-1:1,u=n.flipVertical?-1:1,f=l.scaleX,p=l.scaleY,g=a>0?a/t:1,b=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(g-1)<1e-4&&Math.abs(b-1)<1e-4)return null;let y=s*Math.PI/180,x=Math.cos(y),v=Math.sin(y),O=o.offsetX+a/2,_=o.offsetY+i/2,W=f*x*c,N=-f*v*u,B=p*v*c,E=p*x*u,h=f*(O-x*c*(a/2)+v*u*(i/2)-l.bboxX),I=p*(_-v*c*(a/2)-x*u*(i/2)-l.bboxY);return Object.freeze({a:se(W*g),b:se(B*g),c:se(N*b),d:se(E*b),e:se(h),f:se(I)})}function Lw(e){let n=Hy(e);if(n)return `matrix(${Br(n.a)}, ${Br(n.b)}, ${Br(n.c)}, ${Br(n.d)}, ${Br(n.e)}, ${Br(n.f)})`}function Br(e){return Number.isFinite(e)?String(e):"0"}var jy=Object.freeze({"http://schemas.openxmlformats.org/drawingml/2006/chart":"chart","http://schemas.openxmlformats.org/drawingml/2006/diagram":"diagram","http://schemas.microsoft.com/office/word/2010/wordprocessingGroup":"group","http://schemas.microsoft.com/office/word/2010/wordprocessingShape":"textbox","http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas":"canvas"}),Gy=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),Wy=Object.freeze({left:0,top:0,right:0,bottom:0});function Mu(e){let n=e.picture,t=null;if(!n){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";t=jy[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??Wy,transform:n?.transform??Gy,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var Yn=12700;function Kn(e){return e/Yn}function vt(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*Yn*72)return null;let n=e/Yn;return Number.isFinite(n)?n:null}function lt(e){let n=Kn(e.inlineDistancesEmu.left),t=Kn(e.inlineDistancesEmu.right),r=Kn(e.inlineDistancesEmu.top),o=Kn(e.inlineDistancesEmu.bottom),a=Kn(e.effectExtentEmu.left),i=Kn(e.effectExtentEmu.right),l=Kn(e.effectExtentEmu.top),s=Kn(e.effectExtentEmu.bottom),d=Kn(e.extentEmu.cx),c=Kn(e.extentEmu.cy);return Object.freeze({distL:n,distR:t,distT:r,distB:o,effectL:a,effectR:i,effectT:l,effectB:s,width:d,height:c,totalWidth:n+a+d+i+t,lineContribution:r+l+c+s+o})}function Nu(e,n,t){let r=Math.max(t.distT+t.effectT,e-t.height),o=Math.max(n,r-t.effectT+t.height+t.effectB+t.distB),a=r+t.height+t.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function ka(e,n,t){if(Math.abs(n)<1e-4&&Math.abs(t)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+n,y:a.y+t}),o=a=>Object.freeze({x:a.x+n,y:a.y+t});return Object.freeze({...e,contentBounds:r(e.contentBounds),paintBounds:r(e.paintBounds),hitBounds:r(e.hitBounds),transformedCorners:Object.freeze(e.transformedCorners.map(o)),clipPolygon:e.clipPolygon?Object.freeze(e.clipPolygon.map(o)):null})}function Ea(e,n,t){return Math.abs(n)<1e-4&&Math.abs(t)<1e-4?e:Object.freeze({...e,x:e.x+n,y:e.y+t,advanceStart:e.advanceStart+n,advanceEnd:e.advanceEnd+n,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+n,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+n,y:e.hitBounds.y+t}),geometry:ka(e.geometry,n,t)})}function is(e,n){return e.length===0?e:e.map(t=>{let r=t.geometry.effectInsets.bottom,o=n-t.height-r,a=o-t.y;return Math.abs(a)<1e-4&&t.baselineOffset===n?t:Object.freeze({...t,y:o,baselineOffset:n,geometry:ka(t.geometry,0,a),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+a}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+a})})})}function ls(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function La(e,n){let t=ls(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=ka(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:Ca(i,n)})}var Eu=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),Lu=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function Un(e){return e%2===1}function Fu(e,n){return !(!n.layoutInCell||n.cellBox===null||!Number.isFinite(n.cellBox.height)||n.cellBox.height<=0||!Number.isFinite(n.cellBox.width)||n.cellBox.width<=0)}function Au(e,n){if(Fu(e,n)){let s=n.cellBox;if(!s)return null;let{x:d,width:c}=s;switch(e){case "page":case "column":case "margin":case "leftMargin":return {left:d,right:d+c,center:d+c/2};case "rightMargin":return {left:d,right:d+c,center:d+c/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "insideMargin":return Un(n.pageNumber)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return Un(n.pageNumber)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let t=-n.marginLeft,r=n.contentWidth+n.marginRight,o=0,a=n.contentWidth,i=n.columnBox.x,l=n.columnBox.x+n.columnBox.width;switch(e){case "page":return {left:t,right:r,center:(t+r)/2};case "margin":return {left:o,right:a,center:o+n.contentWidth/2};case "column":return {left:i,right:l,center:i+n.columnBox.width/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "leftMargin":return {left:t,right:t,center:t};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return Un(n.pageNumber)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return Un(n.pageNumber)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function Du(e,n){if(Fu(e,n)){let s=n.cellBox;if(!s)return null;let{y:d,height:c}=s;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:d,bottom:d+c,center:d+c/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "insideMargin":return Un(n.pageNumber)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return Un(n.pageNumber)?{top:d+c,bottom:d+c,center:d+c}:{top:d,bottom:d+c,center:d+c/2};default:return null}}let t=-n.marginTop,r=n.physicalContentHeight??n.contentHeight,o=r,a=r+n.marginBottom,i=0,l=n.contentHeight;switch(e){case "page":return {top:t,bottom:a,center:(t+a)/2};case "margin":return {top:i,bottom:l,center:i+n.contentHeight/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "topMargin":return {top:t,bottom:t,center:t};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return Un(n.pageNumber)?{top:i,bottom:i,center:i}:{top:l,bottom:l,center:l};case "outsideMargin":return Un(n.pageNumber)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function _u(e){return e===null?0:vt(e)}function $y(e,n,t){let r=Un(t.pageNumber);if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.width)&&t.cellBox.width>0){let{x:o,width:a}=t.cellBox;return e==="inside"?r?o:o+a-n:e==="outside"?r?o+a-n:o:null}return e==="inside"?r?0:t.contentWidth-n:e==="outside"?r?t.contentWidth-n:0:null}function Xy(e,n,t){let r=Un(t.pageNumber),o=t.physicalContentHeight??t.contentHeight;if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.height)&&t.cellBox.height>0){let{y:a,height:i}=t.cellBox;return e==="inside"?r?a:a+i-n:e==="outside"?r?a+i-n:a:null}return e==="inside"?r?0:o-n:e==="outside"?r?o-n:0:null}function Vy(e,n,t,r,o){let a=Au(e,o);if(!a)return null;let i=_u(t);if(i===null)return null;if(n==="left")return a.left+i;if(n==="center")return a.center-r/2+i;if(n==="right")return a.right-r+i;if(n==="inside"||n==="outside"){let l=$y(n,r,o);if(l!==null)return l+i}return a.left+i}function Yy(e,n,t,r,o){let a=Du(e,o);if(!a)return null;let i=_u(t);if(i===null)return null;if(n==="top")return a.top+i;if(n==="center")return a.center-r/2+i;if(n==="bottom")return a.bottom-r+i;if(n==="inside"||n==="outside"){let l=Xy(n,r,o);if(l!==null)return l+i}return a.top+i}function Po(e){let n=e.physicalContentHeight??e.contentHeight;return Object.freeze({x:-e.marginLeft,y:-e.marginTop,width:e.contentWidth+e.marginLeft+e.marginRight,height:n+e.marginTop+e.marginBottom})}function ss(e,n){let t=lt(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 b=vt(r.simplePosition.xEmu),m=vt(r.simplePosition.yEmu);return Object.freeze(b===null||m===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:b-n.marginLeft,y:m-n.marginTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let l=r.horizontal.relativeFrom,s=r.vertical.relativeFrom,d=Au(l,n),c=Du(s,n),u=d?.left??0,f=c?.top??0;if(!Eu.has(l)||!Lu.has(s))return Object.freeze({x:0,y:0,horizontalFrame:Eu.has(l)?l:a,verticalFrame:Lu.has(s)?s:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=Vy(l,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),g=Yy(s,r.vertical.align,r.vertical.offsetEmu,t.height,n);return Object.freeze(p===null||g===null?{x:0,y:0,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:g,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function Ky(e){let n=e.input.projection,t=n.anchor,r=lt(n),o=Cr({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?ls(o.paintBounds,e.clipRegion):o.paintBounds,i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"anchoredDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.anchorParagraphId,anchorParagraphId:e.anchorParagraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:e.resolved.x,y:e.resolved.y,width:r.width,height:r.height,horizontalFrame:e.resolved.horizontalFrame,verticalFrame:e.resolved.verticalFrame,horizontalFrameOrigin:e.resolved.horizontalFrameOrigin,verticalFrameOrigin:e.resolved.verticalFrameOrigin,behindDocument:t?.behindDocument??false,allowOverlap:t?.allowOverlap??true,layoutInCell:t?.layoutInCell??true,relativeHeight:t?.relativeHeight??0,wrap:n.wrap==="inline"?"inFront":n.wrap,...e.sourceOrder!==void 0?{sourceOrder:e.sourceOrder}:{},...e.resolved.layoutFallback?{layoutFallback:e.resolved.layoutFallback}:{},paintBounds:a,hitBounds:i,geometry:e.clipRegion?Ca(o,e.clipRegion):o,resource:e.input.resource,accessibility:$a$1(n),...Mu(n)})}function Sn(e,n){if(e.kind!=="paragraph")return [];let t=[],r=o=>{if(o.kind==="drawing"){let a=n.projectionForAtom?.(o.id)??n.project(o);a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if(_a$1(o)){let a=n.projectionForAtom?.(o.id)??null;a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children)r(o);return Object.freeze(t)}function En(e){let n=new Map;if(e.kind!=="paragraph")return n;let t=0,r=o=>{if(o.kind==="drawing"||_a$1(o)){n.set(o.id,t),t+=1;return}if(o.kind==="textValue"){t+=o.value.length;return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children){if(o.kind==="run"){for(let a of o.children)r(a);continue}if(o.kind==="hyperlink"){for(let a of o.children)if(a.kind==="run")for(let i of a.children)r(i);}}return n}function Uy(e,n,t){for(let o of e.spans){if(n<o.range.start)break;if(n<o.range.end){if(t&&o.text!==void 0&&o.style!==void 0){let l=n-o.range.start;return o.box.x+Vn(o.text.slice(0,l),o.style,t)}let a=o.range.end-o.range.start;if(a<=0)return o.box.x;let i=n-o.range.start;return o.box.x+o.box.width*i/a}if(n===o.range.end)return t&&o.text!==void 0&&o.style!==void 0?o.box.x+Vn(o.text,o.style,t):o.box.x+o.box.width}let r;for(let o of e.spans)o.range.end<=n&&(r=o);return r?t&&r.text!==void 0&&r.style!==void 0?r.box.x+Vn(r.text,r.style,t):r.box.x+r.box.width:e.box.x}function Zy(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function ds(e,n,t){if(!(Math.abs(t)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===n&&(e[r]=Object.freeze({...o,y:o.y+t,geometry:ka(o.geometry,0,t),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+t}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+t})}));}}function kr(e){let n=Sn(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=En(e.paragraph),r=[];for(let o of n){let a=o.projection;if(a.hidden)continue;let i=t.get(o.atomId);if(i===void 0||e.fragmentRange&&(i<e.fragmentRange.start||i>=e.fragmentRange.end))continue;let l=e.lines.find(m=>i>=m.range.start&&i<m.range.end);if(!l)continue;let s=a.anchor?.layoutInCell??true,c=a.position?.horizontal.relativeFrom==="character"?Zy(l,i):i,u=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:l.box,anchorCharacterX:Uy(l,c,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:s}),f=ss(a,u),g=s&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0?e.cellBox:Po(e.frameBase),b=Ky({input:Object.freeze({drawingNodeId:o.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:a,resource:e.drawingLayout.resourceOf(a)}),anchorParagraphId:e.paragraphId,start:c,resolved:f,clipRegion:g,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(o.atomId)}:{}});r.push(b);}return Object.freeze(r)}function zu(e){let n=lt(e.input.projection),t=e.slotX+n.distL+n.effectL,r=Cr({projection:e.input.projection,anchorX:t,anchorY:e.y,extentWidth:n.width,extentHeight:n.height}),o=e.contentTop!==void 0&&e.contentBottom!==void 0?Object.freeze({x:e.contentLeft,y:e.contentTop,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,e.contentBottom-e.contentTop)}):Object.freeze({x:e.contentLeft,y:r.paintBounds.y,width:Math.max(0,e.contentRight-e.contentLeft),height:r.paintBounds.height}),a=ls(r.paintBounds,o),i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"inlineDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.paragraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:t,y:e.y,width:n.width,height:n.height,distL:n.distL,distR:n.distR,distT:n.distT,distB:n.distB,advanceStart:e.slotX,advanceEnd:e.slotX+n.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:Ca(r,o),resource:e.input.resource,accessibility:$a$1(e.input.projection),...Mu(e.input.projection)})}var qy=256,fs=8,Kt=8,Er=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function Jy(e,n){let t=Math.max(1,n.columnCount);if(t<=1)return 0;let r=e.x+e.width/2;if(n.columnLefts&&n.columnWidths&&n.columnLefts.length===t){for(let i=0;i<t;i+=1){let l=n.columnLefts[i],s=l+n.columnWidths[i];if(r>=l-.001&&r<s+.001)return i}return t-1}let o=n.columnGapPt,a=(n.contentWidth-o*(t-1))/t;for(let i=0;i<t;i+=1){let l=i*(a+o),s=l+a;if(r>=l-.001&&r<s+.001)return i}return t-1}function us(e){return e.behindDocument?"behind":"inFront"}function Hu(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function Qy(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 eb(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function ps(e){let n=Qy(e.projection.wrap);if(!n||!e.projection.wrapGeometry)return null;let t=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return Tu({mode:n,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:t.distancesEmu,polygonEmu:t.polygon,crop:e.projection.picture?.crop??{},transform:e.projection.picture?.transform??{rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:{x:0,y:0},extentEmu:{cx:0,cy:0}},extentWidthPt:e.geometry.contentBounds.width,extentHeightPt:e.geometry.contentBounds.height,textSide:n==="square"?eb(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function gs(e){if(e.mode==="topAndBottom"||e.mode==="square")return rs(e.contentBounds,e.effectInsets,e.wrapDistances);let n=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)n.push(o.y);let t=Math.min(...n)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...n)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:t,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-t)})}function nb(e){if(e.drawing.behindDocument||!Hu(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=ps({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:n});return t?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:us(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:gs(t),input:t}):null}function ju(e,n){let t=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=n.sourceOrder??Number.MAX_SAFE_INTEGER;return t!==r?t-r:e.drawingNodeId.localeCompare(n.drawingNodeId)}function tb(e,n){let t=us(e),r=us(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:ju(e,n)}function Gu(e){return Object.freeze([...e].sort(tb))}function cs(e,n){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function ms(e,n){if(Math.abs(n)<=1e-4)return e;let t=e.geometry;return Object.freeze({...e,y:e.y+n,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+n}),geometry:Object.freeze({...t,contentBounds:Object.freeze({...t.contentBounds,y:t.contentBounds.y+n}),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+n}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+n}),transformedCorners:t.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+n})),clipPolygon:t.clipPolygon?t.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+n})):null})})}function Wu(e,n){let t=n.maxAttempts??qy,r=[...e].sort(ju),o=[],a=[],i=[];for(let l of r){if(l.allowOverlap){o.push(l);continue}let s=l,d=0;for(;d<t&&o.some(b=>cs(b.paintBounds,s.paintBounds));){let p=o.find(b=>cs(b.paintBounds,s.paintBounds)),g=p.paintBounds.y+p.paintBounds.height-s.paintBounds.y+.001;s=ms(s,g),d+=1;}let c=o.some(f=>cs(f.paintBounds,s.paintBounds)),u=s.paintBounds.y+s.paintBounds.height>n.pageBottom+.001;if(c||u){a.push(s),i.push(s.drawingNodeId);continue}o.push(s);}return Object.freeze({drawings:Object.freeze(o),deferred:Object.freeze(a),deferredNodeIds:Object.freeze(i)})}function Lr(e,n,t,r){let o=[{start:t,end:r}];for(let a of n){let i=a.verticalBand;if(e<i.y||e>=i.y+i.height)continue;let l=vu(e,a.input),s=[];for(let d of o)for(let c of l){let u=Math.max(d.start,c.start),f=Math.min(d.end,c.end);f>u+1e-6&&s.push(Object.freeze({start:u,end:f}));}if(o=s,o.length===0)break}return Object.freeze(o)}function $u(e,n){for(let t of n)if(e>=t.start-1e-6&&e<t.end-1e-6)return Math.max(0,t.end-e);return 0}function rb(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function hs(e,n){let t=rb(e,n);if(!t)return null;let r=Math.max(e,t.start),o=t.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function ob(e,n,t){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+n,y:r.y+t}),contentLeft:e.contentLeft+n,contentRight:e.contentRight+n,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{}})}function ys(e,n){return Object.freeze({...e,layoutFallback:n})}function Xu(e,n,t,r){return e.length===0?e:Object.freeze(e.map(o=>{let a=o.verticalBand,i=o.input;return Object.freeze({...o,y:o.y-t,verticalBand:Object.freeze({...a,x:a.x-n,y:a.y-t}),input:Object.freeze({...ob(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function Vu(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function Yu(e){let n=Sn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=En(e.paragraph),r=Math.max(1,e.contentRight-e.contentLeft),o=[];for(let a of n){if(a.projection.anchor?.behindDocument||!Hu(a.projection.wrap)||a.projection.wrap==="topAndBottom")continue;let i=t.get(a.atomId);if(i===void 0)continue;let l=e.anchorLineTopByModelStart.get(i);if(l===void 0)continue;let s=Object.freeze({x:e.contentLeft,y:l,width:r,height:14}),d=e.anchorCellBox!=null,c=ss(a.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+r,marginLeft:e.contentLeft,marginRight:0,marginTop:0,marginBottom:0,contentWidth:r,contentHeight:648,physicalContentHeight:648,paragraphBox:s,anchorLineBox:s,anchorCharacterX:e.contentLeft,columnBox:s,cellBox:d?e.anchorCellBox:null,layoutInCell:d,ownerPartName:e.drawingLayout.ownerPartName}),u=e.paragraphStartY+l,f=lt(a.projection),p=Cr({projection:a.projection,anchorX:c.x,anchorY:u,extentWidth:f.width,extentHeight:f.height}),g=ps({projection:a.projection,geometry:p,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:c.x,anchorY:u});g&&o.push(Object.freeze({drawingNodeId:a.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:i,sourceOrder:e.sourceOrderOf?.(a.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:a.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:a.projection.anchor?.relativeHeight??0,allowOverlap:a.projection.anchor?.allowOverlap??true,columnIndex:0,y:u,verticalBand:gs(g),input:g}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}function Ma(e){let n=Sn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=En(e.paragraph),r=[];for(let o of n){if(o.projection.anchor?.behindDocument||o.projection.wrap!=="topAndBottom")continue;let a=t.get(o.atomId);if(a===void 0)continue;let i=e.anchorLineTopByModelStart.get(a);if(i===void 0)continue;let l=e.paragraphStartY+i,s=lt(o.projection),d=Cr({projection:o.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:s.width,extentHeight:s.height}),c=ps({projection:o.projection,geometry:d,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:l});c&&r.push(Object.freeze({drawingNodeId:o.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:a,sourceOrder:e.sourceOrderOf?.(o.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:o.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:o.projection.anchor?.relativeHeight??0,allowOverlap:o.projection.anchor?.allowOverlap??true,columnIndex:e.columnIndex??0,y:l,verticalBand:gs(c),input:c}));}return r.sort((o,a)=>o.sourceOrder-a.sourceOrder),Object.freeze(r)}var ab=8;function ib(e,n,t,r){return e<r&&n>t}function st(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<ab;o+=1){let a=e+r,i=a+n,l=a,s=false;for(let c of t){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;ib(a,i,u,f)&&(s=true,l=Math.max(l,f));}if(!s)break;let d=l-e;if(d<=r+.001)break;r=d;}return r}function lb(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function sb(e){let n=e.contentBounds,t=e.wrapDistances,r=e.effectInsets,o=e.polygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"",a=e.clipPolygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"";return [e.mode,e.textSide,n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),t.top.toFixed(3),t.right.toFixed(3),t.bottom.toFixed(3),t.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function Zn(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=Lr(r,[n],n.input.contentLeft,n.input.contentRight);return [n.drawingNodeId,String(n.sourceOrder),String(n.columnIndex),n.y.toFixed(3),t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),sb(n.input),lb(o)].join("|")}).join(`
|
|
2
|
-
`)}function bs(e,n,t,r,o,a){let i=[];for(let l of e){let s=n.projectionForAtom?.(l.drawingNodeId);if(!s)continue;let d=l.sourceOrder??o?.(l.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?Jy(l,a):0,u=nb({drawing:l,projection:s,sourceOrder:d,contentLeft:t,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((l,s)=>l.sourceOrder-s.sourceOrder),Object.freeze(i)}function Io(e,n,t,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:t}),i=new Map;for(let l of e){let s=l.anchoredDrawings??[],d=bs(s,n,0,t,r,a);d.length>0&&i.set(l.index,d);}return i}function Na(e,n){if(e.size!==n.size)return false;for(let[t,r]of e){let o=n.get(t);if(!o||Zn(r)!==Zn(o))return false}return true}function Fa(e){return e.size===0?"":[...e.entries()].sort(([n],[t])=>n-t).map(([n,t])=>`${n}:${Zn(t)}`).join(`
|
|
3
|
-
`)}var db=.001;function hn(e){return xo(e)}var Da=new Set(["-","\u2010","\u2013","\u2014"]);function Ku(e){let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];r===" "?(t>0&&n[n.length-1]!==t&&n.push(t),n.push(t+1)):(r===" "||Da.has(r)&&t>0&&e[t-1]!==" "&&t+1<e.length&&e[t+1]!==" "&&!Da.has(e[t+1]))&&n.push(t+1);}return n[n.length-1]!==e.length&&n.push(e.length),n}function cb(e,n,t,r){let o=0,a=0,i=false;for(let l=n;l<e.length;l+=1){let s=e[l],d=l===n?t:0;for(let c=d;c<s.text.length;){let u=s.text[c];if(u===" "||u===`
|
|
4
|
-
`||u===Ub$1)return {width:o,decimalOffset:i?a:o};let f=c+1,p=s.text.slice(c,f),g=r.measure(It(p,s.style),s.style);!i&&u==="."?i=true:i||(a+=g),o+=g,c=f;}}return {width:o,decimalOffset:i?a:o}}function ub(e,n,t,r){let o=e.relativeTo==="indent"||!r?{left:n,right:t}:r;return {positionPt:e.alignment==="right"?o.right:e.alignment==="center"?(o.left+o.right)/2:o.left,alignment:e.alignment,...e.leader?{leader:e.leader}:{}}}function Uu(e,n,t,r=0){return (t.length>0?st(e,n.height,t):n.exclusionSkipBefore??0)+Math.max(0,n.height-n.trailingSpacing)+r}function fb(e){return Object.freeze({spans:e.spans.map(n=>Object.freeze({...n,box:Object.freeze({...n.box})})),drawings:e.drawings.map(n=>Object.freeze({...n,paintBounds:Object.freeze({...n.paintBounds}),hitBounds:Object.freeze({...n.hitBounds})})),start:e.start,end:e.end,width:e.width,height:e.height,baseline:e.baseline,leading:e.leading,trailingSpacing:e.trailingSpacing,...e.pageBreakAfter?{pageBreakAfter:true}:{},...e.columnBreakAfter?{columnBreakAfter:true}:{},...e.deletedRanges?{deletedRanges:Object.freeze(e.deletedRanges)}:{},...e.exclusionSkipBefore?{exclusionSkipBefore:e.exclusionSkipBefore}:{}})}var Aa=31680;function vo(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let n=Number(e);return Number.isFinite(n)?n>Aa?Aa:n<-Aa?-Aa:n:null}function To(e){let n=0,t=0;for(let r of e){if(r.localName!=="ind")continue;let o=r.attributes?.left??r.attributes?.start,a=r.attributes?.right??r.attributes?.end,i=vo(o),l=vo(a);i!==null&&(n=i/20),l!==null&&(t=l/20);}return {left:n,right:t}}function Zu(e){let n="left";for(let t of e)if(t.localName==="jc")switch(t.attributes?.val){case "center":n="center";break;case "right":case "end":n="right";break;case "both":case "distribute":n="both";break;default:n="left";}return n}function pb(e){return e.endsWith(" ")}function gb(e,n){let t=e.range.end-e.range.start;if(t<=0||e.text===" "||e.projected||e.text.length!==t)return Object.freeze([0,e.box.width]);let r=[0];for(let o=1;o<=e.text.length;o+=1)r.push(Vn(e.text.slice(0,o),e.style,n));return Object.freeze(r)}function Mr(e,n){return e.map(t=>t.caretEdges?t:{...t,caretEdges:gb(t,n)})}function _a(e,n,t,r,o,a,i){if(e.length===0)return e;if(o==="left")return Mr(e,n);let l=e[e.length-1],s=l.text.replace(/\s+$/,""),d=s===l.text?0:l.box.width-Vn(s,l.style,n),c=i??l.box.x-t+l.box.width-d,u=r-c;if(u<=0)return Mr(e,n);if(o==="both"){if(a)return Mr(e,n);let p=[];for(let y=1;y<e.length;y+=1)pb(e[y-1].text)&&p.push(y);if(p.length===0)return Mr(e,n);let g=u/p.length,b=new Set(p),m=0;return Mr(e.map((y,x)=>(b.has(x)&&(m+=g),m===0?y:{...y,box:{...y.box,x:y.box.x+m}})),n)}let f=o==="center"?u/2:u;return Mr(e.map(p=>({...p,box:{...p.box,x:p.box.x+f}})),n)}function za(e,n){return n===0||e.length===0?e:e.map(t=>Ea(t,n,0))}function Ha(e,n,t,r,o,a,i,l=[],s=Rr,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let p=u?.lineSpacing??Sr,g=u?.firstLineOffset??0,b=[],m=yu(e,l,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??it,b,u?.inlineDrawingLayout,u?.themeFonts),y=Math.max(0,u?.startOffset??0),x=m.flatMap(P=>{if(P.end<=y)return [];if(P.start>=y)return [P];let S=y-P.start;return [{...P,text:P.projected?P.text:P.text.slice(S),start:y}]});if(x.length===0&&u?.suppressEmptyPlaceholderLine)return [];let v=P=>P.revisions===void 0?{}:{revisions:P.revisions},O=l.length===0?Xn:kn(l,u?.themeFonts),_=t+r,W=u?.contentLeft??t,N=u?.contentRight??_,B=u?.contentOriginX??0,E=[],h={spans:[],start:y,end:y,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},I=false,R=new Map,D=(()=>{let P=new Set;if(!u?.inlineDrawingLayout)return P;let S=En(e);for(let H of Sn(e,u.inlineDrawingLayout)){if(H.projection.wrap!=="topAndBottom")continue;let q=S.get(H.atomId);q!==void 0&&P.add(q);}return P})(),T=(()=>{let P=new Set;if(!u?.inlineDrawingLayout)return P;let S=En(e);for(let H of Sn(e,u.inlineDrawingLayout)){if(H.projection.anchor?.behindDocument||H.projection.wrap==="topAndBottom"||H.projection.wrap==="inline"||H.projection.wrap==="behind"||H.projection.wrap==="inFront")continue;let q=S.get(H.atomId);q!==void 0&&P.add(q);}return P})(),C=[...(u?.pageExclusionZones??[]).filter(P=>P.anchorParagraphId===n).map(P=>P.anchorModelStart),...D,...T],k=(()=>{let P=new Map;if(C.length===0)return P;let S=0,H=0,q=0,Q=()=>q===0?g:0,ge=()=>Math.max(1,r-Q()),ve=fe=>{S=fe,H=0,q+=1;};for(let fe of x){if(fe.inlineDrawing){let $e=lt(fe.inlineDrawing.projection).totalWidth;H>0&&H+$e>ge()&&ve(fe.start),C.includes(fe.start)&&P.set(fe.start,S),H+=$e;continue}if(fe.text===`
|
|
5
|
-
`||fe.text===Ub$1){ve(fe.end);continue}let nn=0;for(let $e of Ku(fe.text)){let Rn=fe.text.slice(nn,$e);if(Rn.length===0)continue;let qe=fe.style,Ue=o.measure(Rn,qe),be=fe.start+nn;H>0&&H+Ue>ge()&&ve(be),C.includes(be)&&P.set(be,S),C.includes(fe.start)&&P.set(fe.start,S),H+=Ue,nn=$e;}}for(let fe of C)P.has(fe)||P.set(fe,S);return P})();for(let P of T){let S=k.get(P);S!==void 0&&R.set(P,S);}let M=P=>{if(P.anchorParagraphId!==n)return true;let S=k.get(P.anchorModelStart);return S!==void 0&&h.start>=S||h.end>=P.anchorModelStart},L=()=>{let P=u?.pageExclusionZones?.filter(q=>!(!M(q)||q.anchorParagraphId===n&&(q.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],S=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&R.size>0?Yu({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:W,contentRight:N,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:R,anchorCellBox:u.anchorCellBox}):Object.freeze([]),H=u?.inlineDrawingLayout&&R.size>0?Ma({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:W,contentRight:N,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:R}):Object.freeze([]);return Object.freeze([...P,...S,...H])},z=()=>E.length===0?g:0,F=()=>B+t+z(),j=()=>Math.max(1,r-z()),G=()=>E.reduce((P,S)=>P+S.height+(S.exclusionSkipBefore??0),0),Y=()=>(u?.paragraphStartY??0)+G(),K=P=>{D.has(P)&&R.set(P,G());},U=()=>{if(I)return;let P=L();if(P.length===0||h.spans.length>0||h.drawings.length>0)return;let S=o.lineMetrics(O),H=st(Y(),h.height>0?h.height:S.height,P);H>.001&&(I=true,h.exclusionSkipBefore=H);},ae=()=>Y()+(h.exclusionSkipBefore??0)+.001,we=()=>{let P=L();if(P.length===0)return true;U();let S=Lr(ae(),P,W,N),H=F()+h.width,q=hs(H,S);return q?(q.x>H+.001&&(h.width=q.x-F()),true):false},de=()=>{let P=j(),S=L();if(S.length===0)return P;if(U(),!we())return 0;let H=Lr(ae(),S,W,N),q=F()+h.width,Q=$u(q,H);return Q<=.001?0:Math.min(P,h.width+Q)},pe=()=>Math.max(0,de()-h.width),Pe=()=>{let P=L();if(P.length===0||!P.some(ge=>ge.anchorParagraphId!==n||h.end>ge.anchorModelStart))return false;let H=Lr(ae(),P,W,N),q=F()+h.width,Q=false;for(let ge of H){if(!Q){q>=ge.start-1e-6&&q<ge.end-1e-6&&(Q=true);continue}if(ge.end-ge.start>.001)return h.width=ge.start-F(),true}return false},Re=P=>{if(C.length===0||P<Math.min(...C))return;let S=L().filter(ve=>ve.anchorParagraphId===n&&P>=ve.anchorModelStart);if(S.length===0)return;U();let H=Lr(ae(),S,W,N),q=F()+h.width,Q=-1;for(let ve=0;ve<H.length;ve+=1){let fe=H[ve];if(q>=fe.start-.001&&q<fe.end-.001){Q=ve;break}}if(Q>=0)return;let ge=hs(q,H);ge&&ge.x>q+.001&&(h.width=ge.x-F());},Ie=P=>{L().filter(H=>H.input.mode==="topAndBottom"&&H.anchorParagraphId===n&&P>=H.anchorModelStart).length!==0&&((h.spans.length>0||h.drawings.length>0)&&X(),U());},te=(P,S=0)=>S>64?pe()>=P:(U(),we()?P<=pe()+.001?true:h.spans.length>0||h.drawings.length>0?Pe()&&P<=pe()+.001?true:(X(),te(P,S+1)):Pe()?te(P,S+1):true:h.spans.length>0||h.drawings.length>0?(X(),te(P,S+1)):true),Ee=(P,S)=>b.filter(H=>H.start<S&&H.end>P).map(H=>({start:Math.max(H.start,P),end:Math.min(H.end,S)})),me=-1,We=0,tn=0,Ke="",De=(P,S)=>{let H=o.lineMetrics(P),q=Nu(H.baseline,h.height||H.height,S);return h.height===0?(h.height=q.lineHeight,h.baseline=q.baseline):(q.lineHeight>h.height&&(h.height=q.lineHeight),h.baseline=Math.max(h.baseline,q.baseline)),{extentTopY:q.extentTopY}},pt=()=>{if(h.drawings.length===0)return;h.spans.length===0&&(h.baseline=Math.max(h.baseline,...h.drawings.map(S=>S.y+S.height)));let P=is(h.drawings,h.baseline);h.drawings.splice(0,h.drawings.length,...P),h.baseline=Math.max(h.baseline,...h.drawings.map(S=>S.y+S.height));},Fn=()=>{if(h.drawings.length===0)return;let P=is(h.drawings,h.baseline);h.drawings.splice(0,h.drawings.length,...P);},ye=()=>{if(h.drawings.length===0)return;let P=Math.max(0,...h.drawings.map(S=>S.y+S.height+S.distB));h.height=Math.max(h.height,P);},en=()=>{pt(),ye();},An=()=>{if(!(h.spans.length<2))for(let P=1;P<h.spans.length;P+=1){let S=h.spans[P-1],H=h.spans[P],q=H.box.x-(S.box.x+S.box.width);q<=.001||h.drawings.some(ge=>ge.start>=S.range.end&&ge.start<H.range.start)||(h.spans[P]={...H,wrapAdvanceBefore:q});}},X=P=>{let S=o.lineMetrics(O),H=h.baseline;h.height===0?(h.height=S.height,h.baseline=S.baseline,H=S.baseline):P?.includeParagraphMark&&(h.height=Math.max(h.height,S.height)),en();let q=h.height,Q=Cl(p,q,h.baseline);h.baseline=Q.baseline,h.leading=Math.max(0,Q.baseline-H),h.height=Q.height,Fn(),p.rule!=="exact"&&ye(),h.trailingSpacing=h.drawings.length===0&&p.rule!=="exact"?Math.max(0,Q.height-q):0,(()=>{let fe=L();if(fe.length===0)return;let nn=st(Y(),h.height,fe);nn>.001?h.exclusionSkipBefore=nn:delete h.exclusionSkipBefore;})(),An();let ve=Ee(h.start,h.end);ve.length>0&&(h.deletedRanges=ve),E.push(h),me=-1,We=0,I=false,h={spans:[],drawings:[],start:h.end,end:h.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},U();},he=false;for(let P=0;P<x.length;P+=1){let S=x[P];if(S.breakKind==="column"){let Q=o.lineMetrics(S.style);h.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:S.text,props:S.props,style:S.style,box:{x:F()+h.width,y:0,width:0,height:Q.height},...S.link?{link:S.link}:{},...v(S)}),h.height=Math.max(h.height,Q.height),h.baseline=Math.max(h.baseline,Q.baseline),h.end=S.end,X(),E[E.length-1].columnBreakAfter=true,he=true;continue}if(S.projected&&!S.inlineDrawing&&S.text==="\uFFFC"){K(S.start),h.end=S.end;continue}if(S.inlineDrawing){K(S.start);let Q=lt(S.inlineDrawing.projection),ge=Q.totalWidth;if((h.spans.length>0||h.drawings.length>0)&&h.width+ge>de()&&X(),!te(ge))continue;let{extentTopY:fe}=De(S.style,Q),nn=F()+h.width;h.drawings.push(zu({input:S.inlineDrawing,paragraphId:n,start:S.start,slotX:nn,y:fe,baseline:h.baseline,contentLeft:W,contentRight:N})),h.width+=ge,h.end=S.end,me=-1,Ke="";continue}if(S.text===Ub$1){let Q=o.lineMetrics(S.style);h.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:Ub$1,props:S.props,style:S.style,box:{x:F()+h.width,y:0,width:0,height:Q.height},...S.link?{link:S.link}:{},...v(S)}),h.height=Math.max(h.height,Q.height),h.baseline=Math.max(h.baseline,Q.baseline),h.end=S.end,X(),E[E.length-1].pageBreakAfter=true,he=false;continue}if(S.text===`
|
|
6
|
-
`){let Q=o.lineMetrics(S.style);h.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:`
|
|
7
|
-
`,props:S.props,style:S.style,box:{x:F()+h.width,y:0,width:0,height:Q.height},...S.link?{link:S.link}:{},...v(S)}),h.height=Math.max(h.height,Q.height),h.baseline=Math.max(h.baseline,Q.baseline),h.end=S.end,X(),he=true;continue}he=false,Ie(S.start),C.length>0&&S.start>=Math.min(...C)&&Re(S.start);let H=o.lineMetrics(S.style),q=0;for(let Q of Ku(S.text)){let ge=S.text.slice(q,Q);if(ge.length===0)continue;let ve=!!S.projected||!!S.positionalTab||S.end-S.start!==S.text.length,fe=ve?{paragraphId:n,start:S.start,end:S.end}:{paragraphId:n,start:S.start+q,end:S.start+Q};if(ge===" "){(h.spans.length>0||h.drawings.length>0)&&h.width>=de()&&X();let rn=F()+h.width,Je=cb(x,P,Q,o),_e=S.positionalTab?ub(S.positionalTab,t,_,u?.marginExtent):null,on=_e===null?Pr(s,rn,_):_e.positionPt>rn?_e:{...Pr(s,rn,_),..._e.leader?{leader:_e.leader}:{}},gt=zl(on.alignment,rn,on.positionPt,Je.width,Je.decimalOffset);h.spans.push({range:fe,text:" ",props:S.props,style:S.style,box:{x:rn,y:0,width:gt,height:H.height},...on.leader?{tabLeader:on.leader,tabLeaderAdvancePt:o.measure(Fl.get(on.leader)??".",S.style)}:{},...S.link?{link:S.link}:{},...on.leader?{tabLeader:on.leader}:{},...ve&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...v(S)}),h.width+=gt,h.height=Math.max(h.height,H.height),h.baseline=Math.max(h.baseline,H.baseline),h.end=ve?S.end:S.start+Q,Ke=" ",q=Q;continue}let nn=S.measureText??ge,$e=o.measure(It(nn,S.style),S.style),Rn=q>0||Ke===""||/[\s\u00a0]$/.test(Ke)||/^[\s\u00a0]/.test(ge)||Da.has(Ke[Ke.length-1])&&!Da.has(ge[0]);if(Rn&&(me=h.spans.length,We=h.width,tn=h.end),Re(S.start+q),h.width+$e>de()+db&&(h.spans.length>0||h.drawings.length>0))if(Rn||me<=0){if(!(Pe()&&h.width+$e<=de()+.001)){if(X(),!te($e))continue}}else {let rn=h.spans.splice(me);h.width=We,h.end=tn,h.height=0,h.baseline=0;for(let Je of h.spans){let _e=o.lineMetrics(Je.style);h.height=Math.max(h.height,_e.height),h.baseline=Math.max(h.baseline,_e.baseline);}X();for(let Je of rn){let _e=o.lineMetrics(Je.style);h.spans.push({...Je,box:{...Je.box,x:F()+h.width}}),h.width+=Je.box.width,h.height=Math.max(h.height,_e.height),h.baseline=Math.max(h.baseline,_e.baseline),h.end=Je.range.end;}me=0,We=0;}else if(h.spans.length===0&&h.drawings.length===0&&$e>de()+.001&&!te($e))continue;let qe=ge,Ue=S.start+q,be=$e;if(!ve&&S.measureText===void 0)for(;h.spans.length===0&&qe.length>1&&be>de();){let rn=1,Je=qe.length-1,_e=1;for(;rn<=Je;){let Pn=rn+Je>>1;o.measure(It(qe.slice(0,Pn),S.style),S.style)<=de()?(_e=Pn,rn=Pn+1):Je=Pn-1;}let on=qe.slice(0,_e),gt=o.measure(It(on,S.style),S.style);h.spans.push({range:{paragraphId:n,start:Ue,end:Ue+_e},text:on,props:S.props,style:S.style,box:{x:F()+h.width,y:0,width:gt,height:H.height},...S.link?{link:S.link}:{},...S.noteNav?{noteNav:S.noteNav}:{},...v(S)}),h.width+=gt,h.height=Math.max(h.height,H.height),h.baseline=Math.max(h.baseline,H.baseline),h.end=Ue+_e,X(),qe=qe.slice(_e),Ue+=_e,be=o.measure(It(qe,S.style),S.style);}h.spans.push({range:ve?fe:{paragraphId:n,start:Ue,end:S.start+Q},text:qe,props:S.props,style:S.style,box:{x:F()+h.width,y:0,width:be,height:H.height},...S.link?{link:S.link}:{},...ve&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...v(S)}),h.width+=be,h.height=Math.max(h.height,H.height),h.baseline=Math.max(h.baseline,H.baseline),h.end=ve?S.end:S.start+Q,Ke=ge,q=Q;}}return (h.spans.length>0||h.drawings.length>0||E.length===0||he)&&X({includeParagraphMark:true}),i!==null&&a&&a.set(i,E.map(fb)),E}var Ga=32,Ju=4096,mb=128,hb=/[\u0000-\u001F\u007F-\u009F]/,yb={major:null,minor:null};function Ut(e){return e.kind!=="textValue"}function Bo(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Oo(e,n){for(let t of e.children)if(Ut(t)&&t.localName===n)return t}function Nr(e){return !(e===void 0||e.length===0||e.length>mb||hb.test(e)||R(e))}function bb(e){return e==="1"||e==="true"}function ja(e){return e.map(n=>n.attributes?{n:n.localName,a:n.attributes}:{n:n.localName})}function ko(e){if(e){for(let n of e.children)if(Ut(n)&&(n.kind==="runProperties"||n.localName==="rPr"))return n}}function Wa(e){if(e){for(let n of e.children)if(Ut(n)&&(n.kind==="paragraphProperties"||n.localName==="pPr"))return n}}var qu=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function Fr(e){return e.some(n=>qu.has(n.localName))?e.filter(n=>!qu.has(n.localName)):e}function xb(e){let n=Oo(e,"docDefaults");if(!n)return {run:[],paragraph:[],paragraphNode:void 0};let t=Oo(n,"rPrDefault"),r=Oo(n,"pPrDefault"),o=ko(t),a=Wa(r);return {run:Fr(hn(o)),paragraph:Fr(hn(a)),paragraphNode:a}}function Sb(e){let n=Bo(e,"styleId");if(!Nr(n))return null;let t=Bo(e,"type")??"",r=(()=>{let d=Oo(e,"basedOn");return d?Bo(d,"val"):void 0})(),o=Nr(r)?r:null,a=Wa(e),i=ko(e),l=new Map,s=0;for(let d of e.children){if(d.kind==="textValue"||d.localName!=="tblStylePr")continue;if(s>=wb)break;s+=1;let c=Bo(d,"type");c&&!l.has(c)&&l.set(c,d);}return {styleId:n,type:t,basedOn:o,isDefault:bb(Bo(e,"default")),paragraphProperties:Fr(hn(a)),runProperties:Fr(hn(i)),paragraphPropertiesNode:a,tablePropertiesNode:Oo(e,"tblPr"),conditionalTableFormats:l}}var wb=32,Co=Object.freeze({tablePropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function Qu(e,n){if(!n||!Nr(n))return Co;let t=ws(e,n,"table");if(t.length===0)return Co;let r=[],o=[],a=[],i=[],l=new Map;for(let s of t){s.tablePropertiesNode&&r.push(s.tablePropertiesNode),s.paragraphPropertiesNode&&o.push(s.paragraphPropertiesNode),a.push(...s.paragraphProperties),i.push(...s.runProperties);for(let[d,c]of s.conditionalTableFormats)l.set(d,c);}return {tablePropertyNodes:r,paragraphPropertyNodes:o,paragraphProperties:a,runProperties:i,conditional:l}}var xs=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function ef(e,n){let t=[...e.paragraphPropertyNodes],r=[...e.paragraphProperties],o=[...e.runProperties];for(let a of n){let i=e.conditional.get(a);if(!i)continue;let l=Wa(i);l&&(t.push(l),r.push(...Fr(hn(l))));let s=ko(i);s&&o.push(...Fr(hn(s)));}return t.length===0&&r.length===0&&o.length===0?xs:{paragraphProperties:r,paragraphPropertyNodes:t,runProperties:o}}function Rb(e,n=yb){let t=new Map;if(!e)return {cacheToken:y({empty:true,theme:n}),docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,themeFonts:n,styles:t};let r=xb(e),o=null,a=null,i=0;for(let s of e.children){if(!Ut(s)||s.localName!=="style")continue;if(i>=Ju)break;i+=1;let d=Sb(s);if(!d)continue;let{isDefault:c,...u}=d;t.set(u.styleId,u),u.type==="paragraph"?c?o=u.styleId:o===u.styleId&&(o=null):u.type==="character"&&(c?a=u.styleId:a===u.styleId&&(a=null));}return {cacheToken:y({dR:ja(r.run),dP:ja(r.paragraph),defP:o,defC:a,theme:n,styles:[...t.values()].map(s=>({id:s.styleId,type:s.type,basedOn:s.basedOn,p:ja(s.paragraphProperties),r:ja(s.runProperties)}))}),docDefaultsRun:r.run,docDefaultsParagraph:r.paragraph,docDefaultsParagraphNode:r.paragraphNode,defaultParagraphStyleId:o,defaultCharacterStyleId:a,themeFonts:n,styles:t}}function Ss(e,n){let t=null;for(let r of e){if(r.localName!==n)continue;let o=r.attributes?.val;t=Nr(o)?o:null;}return t}function ws(e,n,t){let r=e.styles.get(n);if(!r||r.type!==t)return [];let o=[],a=new Set,i=n,l=0;for(;i!==null&&l<Ga&&!(a.has(i)||!Nr(i));){a.add(i);let s=e.styles.get(i);if(!s)break;o.push(s),i=s.basedOn,l+=1;}return o.reverse()}function Ar(e,n,t){let r=hn(n),o=Ss(r,"pStyle")??e.defaultParagraphStyleId,a=o?ws(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...t?.paragraphProperties??[],...a.flatMap(u=>u.paragraphProperties)],l=[...i,...r],s=[];e.docDefaultsParagraphNode&&s.push(e.docDefaultsParagraphNode),t&&s.push(...t.paragraphPropertyNodes);for(let u of a)u.paragraphPropertiesNode&&s.push(u.paragraphPropertiesNode);n&&s.push(n);let d=ko(n&&Ut(n)?n:void 0),c=[...e.docDefaultsRun,...t?.runProperties??[],...a.flatMap(u=>u.runProperties),...hn(d)];return {paragraphProperties:l,inheritedParagraphProperties:i,paragraphPropertyNodes:s,runProperties:c,styleId:o??null}}function nf(e){let n;for(let t of e){if(!t||t.kind==="textValue")continue;let r=false;for(let o of t.children)if(Ut(o)&&o.localName==="pBdr"){r=true;break}r&&(n=rt(t).bottom);}return n}function dt(e,n,t){let r=[];if(t){let a=Ss(n,"rStyle")??t.defaultCharacterStyleId;a&&(r=ws(t,a,"character").flatMap(i=>i.runProperties));}return e.length===0&&r.length===0?n:n.length===0&&r.length===0?e:[...e,...r,...n]}function Eo(e,n,t,r,o){let a=Wa(e),i=t?Ar(t,a,o):null,l=i?[...i.paragraphProperties]:hn(a),s=i?i.runProperties:hn(ko(a&&Ut(a)?a:void 0)),d=To(l),c=0,u=0;if(r)c=r.indent.hanging,u=r.indent.firstLine;else for(let g of l){if(g.localName!=="ind")continue;let b=vo(g.attributes?.hanging),m=vo(g.attributes?.firstLine);(g.attributes?.hanging!==void 0||g.attributes?.firstLine!==void 0)&&(c=b!==null?Math.max(0,b)/20:0,u=m!==null?m/20:0);}let f=r?{left:r.indent.left,right:r.indent.right,hanging:c,firstLine:u}:{left:d.left,right:d.right,hanging:c,firstLine:u},p=i?Dl(i.paragraphPropertyNodes):_l(a);return {props:l,indent:f,available:Math.max(1,n-f.left-f.right),alignment:Zu(l),spacing:Bl(l),lineSpacing:Ol(l),contextualSpacing:kl(l),styleId:i?i.styleId:Ss(l,"pStyle")??null,bottomBorder:i?nf(i.paragraphPropertyNodes):rt(a).bottom,borders:i?so(i.paragraphPropertyNodes):rt(a),shading:Nl(l),inheritedRunProperties:s,tabStops:p,tabStopsCacheToken:Gt(p),...r?{listItem:r}:{}}}var tf=new WeakMap;function Pb(e){let n=tf.get(e);if(n!==void 0)return n;let t=o=>o.some(a=>a.localName==="pBdr"),r=t(e.docDefaultsParagraph);if(!r){for(let o of e.styles.values())if(t(o.paragraphProperties)){r=true;break}}return tf.set(e,r),r}function rf(e,n){return !n||!Pb(n)?rt(e):so(Ar(n,e).paragraphPropertyNodes)}var Ib=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Rs(e){let n=e?.val;return n!=="0"&&n!=="false"&&n!=="off"}function of(e){let n=false,t=false,r=true;for(let o of e)switch(o.localName){case "keepNext":n=Rs(o.attributes);break;case "keepLines":t=Rs(o.attributes);break;case "widowControl":r=Rs(o.attributes);break;}return !n&&!t&&r?Ib:{keepNext:n,keepLines:t,widowControl:r}}function af(e,n,t,r,o){if(e<=n)return e;if(r.keepLines&&!o)return n;if(!r.widowControl||t<2)return e;let a=e;return t-a<2&&(a-=1),a-n===1&&(a-=1),a<n&&(a=n),a===n&&o?e:a}function lf(e,n,t,r){let o=0,a=t;for(let i=n;i-n<8;i+=1){let l=e[i];if(!l||l.kind!=="paragraph"||!l.spacing||!l.keeps)return null;o+=Math.max(l.spacing.before,a)-a;let s=r(i);if(!l.keeps.keepNext||i+1>=e.length)return o+=s[0]??0,l.keeps.widowControl&&s.length>1&&(o+=s[1]),o;for(let d of s)o+=d;o+=l.spacing.after,a=l.spacing.after;}return null}function sf(e,n){let t=e,r=0;for(let o=e.length-2;o>=0;o-=1)n(o)&&r<8?(t===e&&(t=[...e]),t[o]=`${e[o]}~kn~${t[o+1]}`,r+=1):r=0;return t}var vb=va;function Lo(e,n){if(e.kind!=="textValue"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function df(e){if(e.kind==="textValue")return false;let n=Lo(e,"paragraphProperties")??Lo(e,"pPr");if(!n)return false;let t=Lo(n,"runProperties")??Lo(n,"rPr");return t!==void 0&&Lo(t,"del")!==void 0}function cf(e,n){if(e.kind==="textValue"||n>vb)return true;let t=(r,o)=>{for(let a of r){if(a.kind==="textValue")continue;if(a.kind==="run"){for(let l of a.children){if(l.kind==="text"){for(let s of l.children)if(s.kind==="textValue"&&s.value.length>0)return false;continue}if(l.kind!=="runProperties")return false}continue}if(Ib$1(a)){if(o>=Hb$1)continue;let l=Kb$1(a);if(l&&!t(l,o+1))return false;continue}if((a.kind==="hyperlink"||a.kind==="revisionInsert"||a.kind==="revisionMoveTo")&&!cf(a,o+1))return false}return true};return t(e.children,n)}function Mo(e,n="proposed"){return e.kind!=="paragraph"||n!=="proposed"||!df(e)?false:cf(e,0)}var Tb={state:"none"},uf=(e,n)=>n.state==="omitted"?e:n;function $a(e,n,t={}){return e.state==="omitted"?n:e.state==="none"?Tb:e}function Ps(e,n){let t=uf;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right),insideH:t(e.insideH,n.insideH),insideV:t(e.insideV,n.insideV)}}function Is(e,n){let t=uf;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right)}}function Xa(e=1048576){let n=e|0;return {intervalsRemaining:n>0?n:0}}function ff(e,n,t,r){let o=Math.max(0,Math.min(n|0,1024)),a=new Array(e.length);for(let i=0;i<e.length;i+=1){if(r&&r.intervalsRemaining<=0){a[i]=[];continue}a[i]=Bb(e[i],o,t,r);}return a}function Bb(e,n,t,r){let o=[];for(let c=0;c<e.length;c+=1){let u=e[c],f=Math.max(0,u.gridColumn|0),p=Math.min(n,f+Math.max(0,u.gridSpan|0));f>=p||(o.push({x:f,kind:1,cellIndex:c,cell:u}),o.push({x:p,kind:0,cellIndex:c,cell:u}));}if(o.length===0)return [];o.sort((c,u)=>c.x!==u.x?c.x-u.x:c.kind!==u.kind?c.kind-u.kind:c.cellIndex-u.cellIndex);let a=new Map,i,l=o[0].x,s=[],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>l&&i&&(!r||r.intervalsRemaining>0)){let u=s[s.length-1];u&&u.end===l&&u.cellIndex===i.cellIndex&&u.cell===i.cell?s[s.length-1]={start:u.start,end:c.x,cell:u.cell,cellIndex:u.cellIndex}:(s.push({start:l,end:c.x,cell:i.cell,cellIndex:i.cellIndex}),t&&(t.ownershipSlotsWritten+=1),r&&(r.intervalsRemaining-=1));}c.kind===1?a.set(c.cellIndex,{cell:c.cell,cellIndex:c.cellIndex}):a.delete(c.cellIndex),d(),l=c.x;}return s}function Ob(e,n){let t=0,r=e.length;for(;t<r;){let o=t+r>>1;e[o].start<=n?t=o+1:r=o;}return t}function vs(e,n,t,r){r&&(r.columnLookups+=1);let o=e[n];if(!o||t<0)return;let a=Ob(o,t)-1;if(a<0)return;let i=o[a];if(!(t>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var hf=256,He={state:"omitted"},qa={state:"none"},yf={top:He,left:He,bottom:He,right:He,insideH:He,insideV:He},bf={top:He,left:He,bottom:He,right:He},pf={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},kb=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 No(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Ts(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Eb(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function Lb(e){if(e===null)return .5;let n=e/8;return !Number.isFinite(n)||n<=0?.5:n>lo?lo:n}function Ja(e){if(!e)return He;let n=Ts(e,"val");if(!n)return He;if(n==="nil"||n==="none")return qa;let t=kb.get(n)??"single",r=Ts(e,"color"),o=r===void 0||r==="auto"?null:Sa(r)??null;return {state:"edge",style:t,color:o,widthPt:Lb(Eb(Ts(e,"sz")))}}function xf(e,n){if(!e)return bf;let t={top:He,left:He,bottom:He,right:He};for(let r of n)t[r]=Ja(No(e,r));return t}function Qa(e){let n=e&&No(e,"tblBorders");return n?{...xf(n,["top","left","bottom","right"]),insideH:Ja(No(n,"insideH")),insideV:Ja(No(n,"insideV"))}:yf}function ei(e){return xf(e&&No(e,"tcBorders"),["top","left","bottom","right"])}function Bs(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function gf(e){if(!e)return 0;let n=Number.parseInt(e.slice(0,2),16),t=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return n+t+r}function Sf(e,n,t=true){if(e.state==="omitted")return n.state==="omitted"?He:n;if(n.state==="omitted")return e;if(e.state==="none")return n.state==="none"?qa:n;if(n.state==="none")return e;let r=Bs(e),o=Bs(n);if(r>o)return e;if(o>r)return n;let a=pf[e.style],i=pf[n.style];if(a!==i)return a>i?e:n;let l=gf(e.color),s=gf(n.color);return l<s?e:s<l?n:t?e:n}function Va(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function Mb(e,n,t){return t?n==="top"||n==="bottom"?e.insideH:e.insideV:e[n]}function Nb(e,n){return e===void 0&&n===void 0?true:!e||!n?false:e.style===n.style&&e.color===n.color&&e.widthPt===n.widthPt}function Ya(e){if(e.length===0)return [];let n=[],t={...e[0]};for(let r=1;r<e.length;r+=1){let o=e[r];t.gridEnd===o.gridStart&&Nb(t.edge,o.edge)?t={...t,gridEnd:o.gridEnd}:(n.push(t),t={...o});}return n.push(t),n}function Ka(e,n,t){let r=e.filter(a=>a.edge!==void 0);if(r.length!==1)return;let o=r[0];if(!(o.gridStart!==n||o.gridEnd!==t))return o.edge}function mf(e,n,t){let r=0,o=Math.min(t,e.length);for(let a=Math.max(0,n);a<o;a+=1)r+=e[a];return r}function Fb(e){if(!(!e||e.style!=="double"))return br(e.widthPt)}function Ua(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function Ab(e,n){return n?e==="outer"?n.insetPt:n.insetPt+n.strokePt+n.gapPt:0}function Db(e,n,t){return t?e==="outer"?n-t.insetPt:n-t.insetPt-t.strokePt-t.gapPt:n}function _b(e,n){return n?e==="outer"?n.insetPt+n.strokePt:n.insetPt+n.extentPt:0}function zb(e,n,t){return t?e==="outer"?n-t.insetPt-t.strokePt:n-t.insetPt-t.extentPt:n}function Tt(e,n){e.length>=hf||!(n.width>0)||!(n.height>0)||e.push(n);}function Hb(e,n,t,r,o,a,i,l,s,d,c){let u=br(t.widthPt),{strokePt:f,gapPt:p,extentPt:g,insetPt:b}=u,m=Math.abs(r)<1e-6,y=Math.abs(o-a)<1e-6,x=Math.abs(r)<1e-6,v=Math.abs(o-i)<1e-6;if(n==="top"||n==="bottom"){let W=n==="top"?b:i-b-f,N=n==="top"?b+f+p:i-b-g;for(let B of ["outer","inner"]){let E=r,h=o;m&&(E=Ab(B,l)),y&&(h=Db(B,a,s)),Tt(e,{side:n,role:B,color:t.color,cssStyle:"solid",x:E,y:B==="outer"?W:N,width:h-E,height:f});}return}let O=n==="left"?b:a-b-f,_=n==="left"?b+f+p:a-b-g;for(let W of ["outer","inner"]){let N=r,B=o;x&&(N=_b(W,d)),v&&(B=zb(W,i,c)),Tt(e,{side:n,role:W,color:t.color,cssStyle:"solid",x:W==="outer"?O:_,y:N,width:f,height:B-N});}}function jb(e,n,t,r,o,a,i){let l=t.widthPt,s=Math.max(1,l),d=l*3+s*2;if(n==="top"||n==="bottom"){let u=n==="top"?0:i-d;for(let f=0;f<3;f+=1)Tt(e,{side:n,role:f===0?"outer":f===1?"middle":"inner",color:t.color,cssStyle:"solid",x:r,y:u+f*(l+s),width:o-r,height:l});return}let c=n==="left"?0:a-d;for(let u=0;u<3;u+=1)Tt(e,{side:n,role:u===0?"outer":u===1?"middle":"inner",color:t.color,cssStyle:"solid",x:c+u*(l+s),y:r,width:l,height:o-r});}function Gb(e,n,t,r,o,a,i){let l=t.widthPt;n==="top"?Tt(e,{side:n,role:"edge",color:t.color,cssStyle:Ua(t.style),x:r,y:0,width:o-r,height:l}):n==="bottom"?Tt(e,{side:n,role:"edge",color:t.color,cssStyle:Ua(t.style),x:r,y:i-l,width:o-r,height:l}):n==="left"?Tt(e,{side:n,role:"edge",color:t.color,cssStyle:Ua(t.style),x:0,y:r,width:l,height:o-r}):Tt(e,{side:n,role:"edge",color:t.color,cssStyle:Ua(t.style),x:a-l,y:r,width:l,height:o-r});}function Za(e,n){if(e.length===0)return;let t=e[0];return Fb(t.edge)}function Wb(e,n,t,r,o,a,i,l,s,d){let c=(R,D,T)=>{let C=[];for(let k of D){if(!k.edge)continue;let M,L;T?(M=mf(i,l,k.gridStart),L=mf(i,l,k.gridEnd)):(M=s[k.gridStart-d]??0,L=s[k.gridEnd-d]??a),C.push({side:R,gridStart:k.gridStart,gridEnd:k.gridEnd,startPt:M,endPt:L,edge:k.edge});}return C},u=c("top",e,true),f=c("left",n,false),p=c("bottom",t,true),g=c("right",r,false),b=[...u,...g,...p,...f],m=Za(n),y=Za(r),x=Za(e),v=Za(t),O=(R,D)=>R.length===1&&Math.abs(R[0].startPt)<1e-6&&Math.abs(R[0].endPt-D)<1e-6,_=O(u,o),W=O(f,a),N=O(p,o),B=O(g,a),E=[],h=(R,D,T)=>{for(let C of D){let{edge:k,startPt:M,endPt:L}=C;k.style==="double"?Hb(E,R,k,M,L,o,a,R==="top"||R==="bottom"?m:void 0,R==="top"||R==="bottom"?y:void 0,R==="left"||R==="right"?x:void 0,R==="left"||R==="right"?v:void 0):k.style==="triple"?jb(E,R,k,M,L,o,a):T||Gb(E,R,k,M,L,o,a);}};h("top",u,_),h("left",f,W),h("bottom",p,N),h("right",g,B);let I={};return _&&u[0]&&(I.top=u[0].edge),W&&f[0]&&(I.left=f[0].edge),N&&p[0]&&(I.bottom=p[0].edge),B&&g[0]&&(I.right=g[0].edge),b.length>0&&(I.edgeSegments=b),E.length>0&&(I.strokes=E),I}function Os(e,n,t,r,o,a){let i=e.length,l=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let s=ff(e,t,o,a),d=(u,f,p)=>$a(u.borders[f],Mb(n,f,p),{}),c=(u,f,p,g)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?qa:Sf(p,g);for(let u=0;u<i;u+=1){let f=e[u];for(let p=0;p<f.length;p+=1){let g=f[p];if(g.vMergeContinue){l[u][p]={};continue}let b=g.mergeRowSpan??1,m=u+b-1,y=u===0,x=m===i-1,v=g.gridColumn===0,O=g.gridColumn+g.gridSpan-1,_=O>=t-1,W=[];if(y)for(let M=g.gridColumn;M<=O;M+=1)W.push({gridStart:M,gridEnd:M+1,edge:Va(d(g,"top",false))});let N=[];if(v)for(let M=u;M<=m;M+=1)N.push({gridStart:M,gridEnd:M+1,edge:Va(d(g,"left",false))});let B=[];for(let M=g.gridColumn;M<=O;M+=1){let L;if(x)L=d(g,"bottom",false);else {let z=vs(s,m+1,M,o);z?.cell.vMergeContinue?L=He:L=c(g.borders.bottom,z?z.cell.borders.top:He,d(g,"bottom",true),z?d(z.cell,"top",true):n.insideH);}B.push({gridStart:M,gridEnd:M+1,edge:Va(L)});}let E=[];for(let M=u;M<=m;M+=1){let L;if(_)L=d(g,"right",false);else {let z=vs(s,M,O+1,o);L=c(g.borders.right,z?z.cell.borders.left:He,d(g,"right",true),z?d(z.cell,"left",true):n.insideV);}E.push({gridStart:M,gridEnd:M+1,edge:Va(L)});}let h=Ya(W),I=Ya(N),R=Ya(B),D=Ya(E);if(!r){let M={},L=Ka(h,g.gridColumn,O+1),z=Ka(I,u,m+1),F=Ka(R,g.gridColumn,O+1),j=Ka(D,u,m+1);L&&(M.top=L),z&&(M.left=z),F&&(M.bottom=F),j&&(M.right=j);let G=[],Y=(K,U)=>{for(let ae of U)ae.edge&&G.push({side:K,gridStart:ae.gridStart,gridEnd:ae.gridEnd,startPt:ae.gridStart,endPt:ae.gridEnd,edge:ae.edge});};Y("top",h),Y("left",I),Y("bottom",R),Y("right",D),G.length>0&&(M.edgeSegments=G),l[u][p]=M;continue}let T=r.cellBoxes[u][p],C=[0],k=0;for(let M=u;M<=m;M+=1){let L=r.rowBands[M];k+=L.height,C.push(k);}C.length>1&&(C[C.length-1]=T.height),l[u][p]=Wb(h,I,R,D,T.width,T.height,r.columnWidthsPt,g.gridColumn,C,u);}}return l}function Zt(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var Cs=yf,ks=bf;var Rf=31680/20,Ln=Object.freeze({type:"auto",value:0}),$b=100,Xb=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function Vb(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Ls(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Pf(e){if(/^\d{1,9}$/.test(e)){let r=Number(e)/20;return Number.isFinite(r)?{kind:"length",pt:r}:null}let n=/^(\d{1,7}(?:\.\d{1,4})?)%$/.exec(e);if(n){let r=Number(n[1]);return Number.isFinite(r)?{kind:"percent",percent:r}:null}let t=/^(\d{1,9}(?:\.\d{1,4})?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(t){let r=Number(t[1])*Xb[t[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function qt(e){if(!e)return Ln;let n=Ls(e,"type");if(n!==void 0&&n!=="pct"&&n!=="dxa")return n==="nil"?{type:"nil",value:0}:Ln;let t=Ls(e,"w");if(t===void 0)return Ln;let r=Pf(t);if(!r)return Ln;let o=/^\d{1,9}$/.test(t);if(r.kind==="percent"||o&&n==="pct"){let a=r.kind==="percent"?r.percent:Number(t)/50;return !Number.isFinite(a)||a<=0?Ln:{type:"pct",value:Math.min(a,$b)}}return !Number.isFinite(r.pt)||r.pt<=0?Ln:{type:"dxa",value:Math.min(r.pt,Rf)}}function Fo(e,n){if(!e)return;let t=qt(e);if(t.type==="dxa")return Math.min(t.value,n)}function If(e){let n=Vb(e,"tblGrid");if(!n)return [];let t=[];for(let r of n.children)if(r.kind!=="textValue"&&r.localName==="gridCol"&&(t.push(r),t.length>=1024))break;return t}function Yb(e){let n=[];for(let t of e){let r=Ls(t,"w"),o=r===void 0?null:Pf(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){n.push(void 0);continue}n.push(o.pt>Rf?void 0:o.pt);}return n}var Es=1,wf=.001;function Kb(e,n,t,r){let o=[];for(let i=0;i<t;i+=1)o.push(e[i]);let a=n.filter(i=>i.start<t&&(i.preferred.type==="dxa"||i.preferred.type==="pct"&&r>0)).sort((i,l)=>i.span-l.span);for(let i of a){let l=Math.min(i.start+i.span,t);if(l<=i.start)continue;let s=i.preferred.type==="pct"?r*i.preferred.value/100:i.preferred.value;if(!Number.isFinite(s)||s<=0)continue;if(l-i.start===1){let f=o[i.start];o[i.start]=f===void 0?s:Math.max(f,s);continue}let d=[],c=s;for(let f=i.start;f<l;f+=1){let p=o[f];p===void 0?d.push(f):c-=p;}if(d.length===0||c<=0)continue;let u=c/d.length;for(let f of d)o[f]=u;}return o}function vf(e){let{columnCount:n,tableWidth:t}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:Es,a=t.type==="dxa"?t.value:t.type==="pct"?o*t.value/100:0,i=Yb(e.gridCols),l=Kb(i,e.claims,n,a),s=0,d=0;for(let y of l)y===void 0?d+=1:s+=y;let c=[];if(d>0){let y=s>0?s/Math.max(n-d,1):o/n,x=Math.max(o-s,0)/d,v=Math.max(Math.min(x,y),Es);for(let O of l)c.push(O??v);}else for(let y of l)c.push(y);let u=c.reduce((y,x)=>y+x,0);if(!Number.isFinite(u)||u<=0)return new Array(n).fill(o/n);let f=n*Es,p=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,g=Math.max(a>0?Math.min(a,p):Math.min(u,p),f),b=t.type==="pct"&&a>0;if(u<=g+wf&&!b||Math.abs(u-g)<=wf)return c;let m=g/u;return c.map(y=>y*m)}var ri=16,Do=3,ti=31680/20,_f=31680/20,Tf=1023,Ub=256,Bf=31680/20;function Of(e){let n=e&&ue(e,"jc");if(!n)return;let t=Fe(n,"val");if(t==="center")return "center";if(t==="right"||t==="end")return "right";if(t==="left"||t==="start")return "left"}var Cf=31680/20,zf={top:Do,right:Do,bottom:Do,left:Do};function ue(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Fe(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Zb(e){let n=e&&ue(e,"gridSpan"),t=n&&Fe(n,"val");if(!t||!/^\d{1,7}$/.test(t))return 1;let r=Number(t);return Number.isInteger(r)&&r>1?Math.min(r,1024):1}function kf(e,n){let t=e&&ue(e,n),r=t&&Fe(t,"val");if(!r||!/^\d{1,7}$/.test(r))return 0;let o=Number(r);return Number.isInteger(o)&&o>0?Math.min(o,1024):0}function qb(e){let n=e&&ue(e,"vMerge");return n?Fe(n,"val")!=="restart":false}function Jb(e){let n=e&&ue(e,"vAlign"),t=n&&Fe(n,"val");return t==="center"?"center":t==="bottom"?"bottom":"top"}function Ef(e){return Ml(e&&ue(e,"shd"))}function Lf(e,n){let t=e&&ue(e,n);if(!t)return false;let r=Fe(t,"val");return r!=="0"&&r!=="false"}var Ao=Object.freeze({rule:"auto"});function Qb(e){let n=e&&ue(e,"trHeight");if(!n)return Ao;let t=Fe(n,"hRule"),r=t==="auto"||t==="exact"||t==="atLeast"?t:void 0;if(r==="auto")return Ao;let o=Fe(n,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return Ao;let a=Number(o);if(!Number.isFinite(a)||a<=0)return Ao;let i=Math.min(a/20,_f);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:Ao}function ni(e){if(!e)return;let n=Fe(e,"w");if(n===void 0||!/^\d{1,9}$/.test(n))return;let t=Number(n);if(!Number.isFinite(t)||t<0)return;let r=t/20;return r>ti?ti:r}function Ms(e){if(!e)return {};let n=ni(ue(e,"top")),t=ni(ue(e,"left")),r=ni(ue(e,"bottom")),o=ni(ue(e,"right"));return {...n===void 0?{}:{top:n},...t===void 0?{}:{left:t},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function Ns(e,n){return {top:n.top??e.top,right:n.right??e.right,bottom:n.bottom??e.bottom,left:n.left??e.left}}function _o(e,n){let t=e.columnWidthsPt.reduce((o,a)=>o+a,0),r=n-t;return !Number.isFinite(r)||r<=0?0:e.alignment==="center"?r/2:e.alignment==="right"?r:Math.min(e.indentPt,r)}function Mf(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function Nf(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return;let n=Number(e);if(!Number.isFinite(n))return;let t=n/20;return Math.max(-Cf,Math.min(Cf,t))}function Ff(e){let n=e&&ue(e,"tblpPr");if(!n)return;let t=Fe(n,"tblpXSpec"),r=t==="left"||t==="center"||t==="right"||t==="inside"||t==="outside"?t:void 0,o=Fe(n,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:Mf(Fe(n,"horzAnchor"))??"text",vertAnchor:Mf(Fe(n,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:Nf(Fe(n,"tblpX"))??0,...a?{ySpec:a}:{},yPt:Nf(Fe(n,"tblpY"))??0}}function Hf(e,n,t){let r=t[e.horzAnchor],o=r.width-n,a;if(e.xSpec==="center"?a=r.left+o/2:e.xSpec==="right"||e.xSpec==="outside"?a=r.left+o:e.xSpec?a=r.left:a=r.left+e.xPt,!Number.isFinite(a))return r.left;let i=t.page.left+t.page.width;return Math.max(t.page.left,Math.min(a,i))}var ex=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function ct(e,n){let t=Fe(e,n);if(t!==void 0)return t!=="0"&&t!=="false"&&t!=="off"}function nx(e){let n=e&&ue(e,"tblLook");if(!n)return ex;let t=Fe(n,"val"),r=t&&/^[0-9A-Fa-f]{1,4}$/.test(t)?Number.parseInt(t,16):0;return {firstRow:ct(n,"firstRow")??(r&32)!==0,lastRow:ct(n,"lastRow")??(r&64)!==0,firstColumn:ct(n,"firstColumn")??(r&128)!==0,lastColumn:ct(n,"lastColumn")??(r&256)!==0,rowBanding:ct(n,"noHBand")===void 0?(r&512)===0:!ct(n,"noHBand"),columnBanding:ct(n,"noVBand")===void 0?(r&1024)===0:!ct(n,"noVBand")}}var Fs=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],Af=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function Df(e,n){let t=e&&ue(e,"cnfStyle");if(!t)return;let r=Fe(t,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<Fs.length;o+=1)r[o]==="1"&&n.add(Fs[o]);for(let o=0;o<Af.length;o+=1)ct(t,Af[o])===true&&n.add(Fs[o]);}var tx=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function rx(e){let n=new Set;Df(e.rowProperties,n),Df(e.cellProperties,n);let{look:t,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:l}=e,s=n.has("firstRow")||t.firstRow&&r===0,d=n.has("lastRow")||t.lastRow&&r===o-1,c=n.has("firstCol")||t.firstColumn&&a===0,u=n.has("lastCol")||t.lastColumn&&a+i>=l;if(!(n.has("band1Vert")||n.has("band2Vert"))&&t.columnBanding&&!c&&!u){let b=a-(t.firstColumn?1:0);n.add(b%2===0?"band1Vert":"band2Vert");}if(!(n.has("band1Horz")||n.has("band2Horz"))&&t.rowBanding&&!s&&!d){let b=r-(t.firstRow?1:0);n.add(b%2===0?"band1Horz":"band2Horz");}c&&n.add("firstCol"),u&&n.add("lastCol"),s&&n.add("firstRow"),d&&n.add("lastRow"),s&&c&&n.add("nwCell"),s&&u&&n.add("neCell"),d&&c&&n.add("swCell"),d&&u&&n.add("seCell");let g=[];for(let b of tx)n.has(b)&&g.push(b);return g}function Dr(e,n,t,r,o="all-markup"){if(t>=ri||e.kind!=="table")return null;let a=ue(e,"tblPr"),i=a&&ue(a,"tblStyle")?Fe(ue(a,"tblStyle"),"val"):void 0,l=r?Qu(r,i):Co,s=nx(a),d=zf,c=Cs;for(let F of l.tablePropertyNodes)d=Ns(d,Ms(ue(F,"tblCellMar"))),c=Ps(c,Qa(F));let u=Ns(d,Ms(a&&ue(a,"tblCellMar"))),f=Ps(c,a?Qa(a):Cs),p=new Map,g=F=>{if(l===Co)return xs;let j=F.join("|"),G=p.get(j);if(G)return G;let Y=ef(l,F);return p.size<Ub&&p.set(j,Y),Y},b=[],m=[],y=1;for(let F of ee(e.children)){if(F.kind!=="tableRow")continue;let j=ue(F,"trPr"),G=[],Y=[],K=[],U=Math.min(kf(j,"gridBefore"),Tf);U>0&&m.push({start:0,span:U,preferred:qt(j&&ue(j,"wBefore"))});let ae=U,we=ee(F.children);for(let Pe of we){if(Pe.kind!=="tableCell")continue;let Re=ue(Pe,"tcPr"),Ie=Math.min(ae,Tf),te=Math.min(Zb(Re),1024-Ie),Ee=qt(Re&&ue(Re,"tcW"));G.push(Ie),Y.push(te),K.push(Ee),m.push({start:Ie,span:te,preferred:Ee}),ae=Ie+te;}let de=kf(j,"gridAfter"),pe=Math.min(ae+de,1024);de>0&&ae<1024&&m.push({start:ae,span:Math.min(de,1024-ae),preferred:qt(j&&ue(j,"wAfter"))}),pe>y&&(y=pe),b.push({node:F,cells:we,properties:j,starts:G,spans:Y,preferred:K,gridColumns:pe});}let x=If(e),v=x.length>0?x.length:y,O=b.length,_=[];for(let F=0;F<b.length;F+=1){let j=b[F],G=j.node,Y=j.properties,K=0,U=[];for(let Re of j.cells){if(Re.kind!=="tableCell")continue;let Ie=ue(Re,"tcPr"),te=j.starts[K],Ee=j.spans[K],me=j.preferred[K]??Ln,We=rx({look:s,rowIndex:F,rowCount:O,gridColumn:te,gridSpan:Ee,columnCount:v,rowProperties:Y,cellProperties:Ie});K+=1;let tn,Ke=ks;for(let ye of We){let en=l.conditional.get(ye);if(!en)continue;let An=ue(en,"tcPr");tn=Ef(An)??tn,Ke=Is(Ke,ei(An));}let De=Ef(Ie)??tn,pt=Ns(u,Ms(Ie&&ue(Ie,"tcMar"))),Fn=Mb$1(Re.children,0,ye=>!(ye.kind==="paragraph"&&Mo(ye,o)));U.push({id:Re.id,gridSpan:Ee,gridColumn:te,...x[te]?.id?{gridColumnId:x[te].id}:{},vMergeContinue:qb(Ie),vAlign:Jb(Ie),margins:pt,borders:Is(Ke,Ie?ei(Ie):ks),...De===void 0?{}:{shading:De},preferredWidth:me,styleFormatting:g(We),blocks:Fn});}let ae=Y?ue(Y,"ins")??ue(Y,"del"):void 0,we=ae?ae.localName==="ins"?"insert":"delete":void 0,de=ae&&Fe(ae,"id"),pe=ae&&Fe(ae,"author"),Pe=ae&&Fe(ae,"date");_.push({id:G.id,...we?{revisionKind:we}:{},...de!==void 0?{revisionId:de}:{},...pe!==void 0?{revisionAuthor:pe}:{},...Pe!==void 0?{revisionDate:Pe}:{},isHeader:Lf(Y,"tblHeader"),cantSplit:Lf(Y,"cantSplit"),height:Qb(Y),cells:U});}let W=Ln,N,B,E,h,I;for(let F of l.tablePropertyNodes){let j=ue(F,"tblW");j&&(W=qt(j));let G=ue(F,"tblLayout");G&&(N=Fe(G,"type")==="fixed"),B=Fo(ue(F,"tblInd"),Bf)??B,E=Of(F)??E,h=Fo(ue(F,"tblCellSpacing"),ti)??h,I=Ff(F)??I;}let R=a&&ue(a,"tblW"),D=R?qt(R):W,T=a&&ue(a,"tblLayout"),C=T?Fe(T,"type")==="fixed":N??false,k=Fo(a&&ue(a,"tblInd"),Bf)??B??0,M=Of(a)??E??"left",L=t===0?Ff(a)??I:void 0,z=Fo(a&&ue(a,"tblCellSpacing"),ti)??h??0;return {columnWidthsPt:vf({gridCols:x,claims:m,columnCount:v,contentWidthPt:n,tableWidth:D,layoutFixed:C}),rows:_,tableWidth:D,layoutFixed:C,indentPt:k,alignment:M,...L?{float:L}:{},cellSpacingPt:z,tableBorders:f,defaultMargins:u}}var Ds=512,Gf=9,Mn=31680/20,ox=8,ax=128;function zo(e,n){return e.kind!=="textValue"&&e.namespaceUri===la$1&&e.localName===n}function je(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function cn(e,n){for(let t of e.children)if(zo(t,n))return t}function ut(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function ix(e){let n=e/20;return !Number.isFinite(n)||n<=0?0:n>Mn?Mn:n}function As(e){let n=e/20;return Number.isFinite(n)?n>Mn?Mn:n<-Mn?-Mn:n:0}function lx(e){let n={left:0,right:0,hanging:0,firstLine:0};if(!e)return n;let t=cn(e,"ind");if(!t)return n;let r=ut(je(t,"left")??je(t,"start"),true),o=ut(je(t,"right")??je(t,"end"),true),a=ut(je(t,"hanging")),i=ut(je(t,"firstLine"),true);return {left:r===null?0:As(r),right:o===null?0:As(o),hanging:a===null?0:ix(a),firstLine:i===null?0:As(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function sx(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function dx(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function cx(e,n){let t=cn(e,n);if(!t)return false;let r=je(t,"val");return r!=="0"&&r!=="false"&&r!=="off"}function jf(e,n){let t=cn(e,n);if(!t)return;let r=je(t,"val");if(!(r===void 0||r.length===0||r.length>ax))return r}function ux(e,n){for(let t of e){if(t.localName!==n)continue;let r=t.attributes?.val;return !(r==="0"||r==="false")}return false}function Wf(e){let n=ut(je(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=cn(e,"start"),r=1;if(t){let y=ut(je(t,"val"));y!==null&&y>=0&&(r=Math.min(y,9999));}let o=cn(e,"numFmt"),a=(o?je(o,"val"):void 0)??"decimal",i=cn(e,"lvlText"),l=i?je(i,"val")??"":"",s=cn(e,"lvlJc"),d=dx(s?je(s,"val"):void 0),c=cn(e,"suff"),u=sx(c?je(c,"val"):void 0),f=cn(e,"lvlRestart"),p;if(f){let y=ut(je(f,"val"));y!==null&&y>=0&&y<=9&&(p=y);}let g=cn(e,"pPr"),b=cn(e,"rPr"),m=b?xo(b):[];return {ilvl:n,start:r,numFmt:a.length>64?"decimal":a,lvlText:l.length>64?l.slice(0,64):l,lvlJc:d,suff:u,indent:lx(g),...p!==void 0?{lvlRestart:p}:{},isLgl:cx(e,"isLgl"),runProperties:m,vanish:ux(m,"vanish")}}function fx(e){let n=je(e,"abstractNumId");if(n===void 0||n.length===0||n.length>64)return null;let t=new Map;for(let a of e.children){if(!zo(a,"lvl"))continue;if(t.size>=9)break;let i=Wf(a);i&&!t.has(i.ilvl)&&t.set(i.ilvl,i);}let r=jf(e,"numStyleLink"),o=jf(e,"styleLink");return {abstractNumId:n,levels:t,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function px(e){let n=ut(je(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=cn(e,"startOverride"),r;if(t){let i=ut(je(t,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=cn(e,"lvl"),a=o?Wf(o)??void 0:void 0;return r===void 0&&a===void 0?{ilvl:n,override:{}}:{ilvl:n,override:{...r!==void 0?{startOverride:r}:{},...a?{level:a}:{}}}}function gx(e){let n=je(e,"numId");if(n===void 0||n.length===0||n.length>64)return null;let t=cn(e,"abstractNumId"),r=t?je(t,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!zo(a,"lvlOverride"))continue;if(o.size>=Gf)break;let i=px(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:n,abstractNumId:r,overrides:o}}function mx(e){let n=new Map,t=new Map;if(!e)return {abstractNums:n,nums:t};let r=0,o=0;for(let a of e.children){if(zo(a,"abstractNum")){if(r>=Ds)continue;r+=1;let i=fx(a);i&&!n.has(i.abstractNumId)&&n.set(i.abstractNumId,i);continue}if(zo(a,"num")){if(o>=Ds)continue;o+=1;let i=gx(a);i&&!t.has(i.numId)&&t.set(i.numId,i);}}return {abstractNums:n,nums:t}}function hx(e,n,t){let r=new Set([n.abstractNumId]),o=n;for(let a=0;a<ox;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let l=t(i);if(l===void 0)return null;let s=e.nums.get(l);if(!s)return null;let d=e.abstractNums.get(s.abstractNumId);if(!d||r.has(d.abstractNumId))return null;r.add(d.abstractNumId),o=d;}return null}function $f(e,n){let t=false,r=new Map(e.abstractNums);for(let[o,a]of e.abstractNums){if(a.numStyleLink===void 0)continue;let i=hx(e,a,n);!i||i.levels===a.levels||i.levels.size===0||(r.set(o,{...a,levels:i.levels}),t=true);}return t?{abstractNums:r,nums:e.nums}:e}function _r(e,n,t){if(t<0||t>8)return null;let r=e.nums.get(n);if(!r)return null;let o=e.abstractNums.get(r.abstractNumId);if(!o)return null;let a=r.overrides.get(t),i=a?.level??o.levels.get(t);return i?{abstractNumId:r.abstractNumId,level:i,...a?.startOverride!==void 0?{startOverride:a.startOverride}:{}}:null}var _s=Object.freeze({abstractNums:new Map,nums:new Map});function yx(e,n){let t=e.nums.get(n),r=[];for(let o=0;o<=8;o+=1){let a=_r(e,n,o);if(!a){r.push(1);continue}let i=t?.overrides.get(o)?.startOverride;r.push(i??a.level.start);}return r}function bx(e,n,t){let r=[];for(let o=0;o<=8;o+=1){let a=_r(e,n,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...t]}}function xx(e,n){if(n===0)return null;if(n===void 0)return e-1;let t=n-1;return t>=e?null:t}function zs(e){let n=new Map,t=new Map,r=new Map,o=a=>{let i=n.get(a);i||(i=[0,0,0,0,0,0,0,0,0],n.set(a,i));let l=t.get(a);l||(l=[false,false,false,false,false,false,false,false,false],t.set(a,l));let s=r.get(a);return s||(s=yx(e,a),r.set(a,s)),{counters:i,initialized:l,starts:s}};return {advance(a,i){if(i<0||i>8||a.length===0||a.length>64)return null;let l=_r(e,a,i);if(!l)return null;let{abstractNumId:s,level:d}=l,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=bx(e,a,f);for(let O=i+1;O<=8;O+=1){let _=_r(e,a,O);if(!_)continue;let W=xx(O,_.level.lvlRestart);W!==null&&i<=W&&(u[O]=false);}let g=f[i]??d.start;u[i]?c[i]+=1:(c[i]=g,u[i]=true);let b=c.slice(),m=u.slice(),y=b.map((O,_)=>m[_]?O:f[_]??1),x=d.isLgl?p.map(O=>O==="bullet"||O==="none"?O:"decimal"):p,v=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:ql(d.lvlText,y,x);return {abstractNumId:s,numId:a,ilvl:i,level:d,counters:b,markerText:v}}}}var Sx=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),Xf=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),Vf=new Map([[167,"\u25AA"],[183,"\u2022"]]),Yf=new Map([["symbol",Sx],["wingdings",Xf],["wingdings 2",Vf],["wingdings 3",Vf],["webdings",Xf]]),wx=64;function Rx(e){return !e||e.length>wx?false:Yf.has(e.toLowerCase())}function Kf(e,n,t){if(e.length===0||!Rx(n))return e;let r=Yf.get(n.toLowerCase());if(t?.(n)===true)return e;let o="",a=false;for(let i of e){let l=i.codePointAt(0);if(l>=61440&&l<=61695){let s=r.get(l-61440);if(s!==void 0){o+=s,a=true;continue}}o+=i;}return a?o:e}function ep(e){return e.kind!=="textValue"}function Uf(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function Hs(e,n){for(let t of e.children)if(ep(t)&&t.localName===n)return t}function js(e){let n=null;for(let t of e){if(!ep(t))continue;let r=Hs(t,"numPr");if(!r)continue;let o=Hs(r,"ilvl"),a=Hs(r,"numId"),i=a?Uf(a,"val"):void 0,l=o?Uf(o,"val"):"0";if(!i||i==="0"){n=null;continue}if(i.length>64){n=null;continue}let s=/^\d{1,2}$/.test(l??"")?Number(l):0;if(s<0||s>8){n=null;continue}n={numId:i,ilvl:s};}return n}function Px(e,n){let t=new Set,r=e.styles.get(n);for(let o=0;r!==void 0&&o<Ga;o+=1){if(t.has(r.styleId))return;t.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?js([a]):null;if(i)return i.numId;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}function Gs(e,n){return n?$f(e,t=>Px(n,t)):e}function Zf(e){return Number.isFinite(e)?e>Mn?Mn:e<-Mn?-Mn:e:0}function qf(e){let n=null;for(let t of e){if(t.localName!=="ind")continue;let r=t.attributes?.hanging,o=t.attributes?.firstLine;r===void 0&&o===void 0||(n={hanging:r!==void 0&&/^\d{1,9}$/.test(r)?Zf(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?Zf(Number(o)/20):0});}return n}function Jf(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.start!==void 0))}function Qf(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.end!==void 0))}function np(e,n,t=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=To(n),a=To(t),i={hanging:e.hanging,firstLine:e.firstLine},l=Jf(t)?a.left:r.left?e.left:Jf(n)?o.left:e.left,s=Qf(t)?a.right:r.right?e.right:Qf(n)?o.right:e.right,d=qf(t)??(r.firstLineOffset?i:qf(n)??i);return {left:l,right:s,...d}}function tp(e,n=8){let t=[],r=(o,a)=>{for(let i of o){if(i.kind==="paragraph"){t.push(i);continue}if(!(i.kind!=="table"||a>=n)){for(let l of ee(i.children))if(l.kind==="tableRow")for(let s of ee(l.children)){if(s.kind!=="tableCell")continue;let d=Mb$1(s.children);r(d,a+1);}}}};return r(e,0),t}function rp(e,n,t,r){let o=new Map;if(n.nums.size===0)return o;let a=Gs(n,t),i=zs(a);for(let l of tp(e)){let s=l.children.find(v=>v.kind==="paragraphProperties"),d=t?Ar(t,s):null,c=d?d.paragraphPropertyNodes:s?[s]:[],u=js(c);if(!u)continue;let f=i.advance(u.numId,u.ilvl);if(!f)continue;let p=hn(s),g=np(f.level.indent,d?.inheritedParagraphProperties??[],p),b=dt(d?.runProperties??[],f.level.runProperties,t),m=kn(b,t?.themeFonts),y=Kf(f.markerText,m.fontFamily,r),x=[f.numId,f.ilvl,f.level.numFmt,f.level.lvlText,g.left,g.right,g.hanging,g.firstLine,f.level.lvlJc,f.level.suff,f.level.vanish?1:0,y.length].join("|");o.set(l.id,{numId:f.numId,ilvl:f.ilvl,abstractNumId:f.abstractNumId,numFmt:f.level.numFmt,markerText:y,markerAlign:f.level.lvlJc,suffix:f.level.suff,indent:g,markerStyle:m,cacheToken:x});}return o}function Ws(e,n){let t=Gs(e.numberingIndex??_s,e.styleCascade),r=e.listItems??(t.nums.size>0?rp(n,t,e.styleCascade,e.isFontAvailable):void 0);return {...e,numberingIndex:t,...r?{listItems:r}:{}}}function oi(e,n,t,r){if((!e.markerText||e.indent.hanging<=0&&n<=0)&&!e.markerText||!e.markerText)return null;let o=e.indent.left,a=e.indent.hanging,i=Math.min(0,o),l=Math.max(i,o-a),s=Math.max(a,n),d=l;return e.markerAlign==="right"?d=o-n:e.markerAlign==="center"&&(d=l+(s-n)/2),d<i&&(d=i),{x:d,y:t,width:Math.max(n,0),height:r}}function Ix(e,n,t=Rr,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=n.measure(e.markerText,e.markerStyle),a=oi(e,o,0,0);if(!a)return 0;let i=e.indent.left,l=a.x+a.width;return e.suffix==="nothing"?l-i:e.suffix==="space"?l+n.measure(" ",e.markerStyle)-i:l<=i?0:Pr(t,l,r).positionPt-i}function ai(e,n,t,r,o){return e?Ix(e,t,r,o===void 0?void 0:n.left+o):n.hanging>0?-n.hanging:n.firstLine}function ii(e,n,t,r=0){if(!e||!e.markerText||!t)return;let o=n.measure(e.markerText,e.markerStyle),a=oi(e,o,t.y,t.height);if(a)return {text:e.markerText,style:e.markerStyle,box:{x:a.x+r,y:a.y,width:a.width,height:a.height},level:e.ilvl,numId:e.numId,numFmt:e.numFmt}}var Ks=8,op=new WeakMap;function si(e){let n=op.get(e);if(n)return n;let t=[],r=new Map,o=new Map,a=new Map,i=new Map,l=new Map,s=(c,u)=>{for(let f of c){if(f.kind==="paragraph"){if(!u)for(let p of f.lines)o.set(p.range.paragraphId,p.id);continue}for(let p of f.rows){if(!p.isHeaderRepeat&&!r.has(p.id)){let g=a.get(f.tableId)??0;r.set(p.id,g),a.set(f.tableId,g+1);}for(let g of p.cells){if(!p.isHeaderRepeat&&!u){let b=`${f.tableId}|${g.gridColumn}`;if(g.blocks.length===0){let m=l.get(b);m&&i.set(g,m);}else l.set(b,{row:p,cell:g});}s(g.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)t.push(c.box.y),s(c.fragments,false);let d={pageTops:t,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return op.set(e,d),d}function Go(e,n){let t=si(e).pageTops;if(t.length===0)return -1;let r=0,o=t.length-1,a=0;for(;r<=o;){let i=r+o>>1;t[i]<=n?(a=i,r=i+1):o=i-1;}return a}function vx(e,n){let t=e.pages[Go(e,n.y)];if(!t)return false;for(let r of [t.header,t.footer])if(r&&ci(r.box,n))return true;return false}function Vs(e,n,t,r=false){if(!e||e.length===0)return null;let o=[...e].sort((a,i)=>a.behindDocument!==i.behindDocument?a.behindDocument?-1:1:i.relativeHeight-a.relativeHeight);for(let a of o){if(r&&a.behindDocument||!Ho(a,n))continue;let i={paragraphId:a.anchorParagraphId,offset:a.start};return {position:i,caret:{position:i,x:a.x,y:a.y,height:a.height,lineId:"",pageIndex:t},pageIndex:t,lineId:"",cell:null,contentControlId:null,onGlyphs:true,drawing:Object.freeze({drawingNodeId:a.drawingNodeId,paragraphId:a.anchorParagraphId,start:a.start})}}return null}function di(e,n,t,r={}){let o=e.pages[n];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??Ks,measurer:r.measurer},i=ap(e,o.index,t),l=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),s=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=Vs(l,t,a.pageIndex);if(d)return {...d,contentControlId:i};let c=li(o.fragments,t,a,null);if(c?.onGlyphs)return {...c,contentControlId:i};let u=Vs(s,t,a.pageIndex);if(u)return {...u,contentControlId:i};if(c)return {...c,contentControlId:i};for(let f=1;f<e.pages.length;f+=1)for(let p of [n-f,n+f]){let g=e.pages[p];if(!g)continue;let b=li(g.fragments,t,{...a,pageIndex:g.index},null);if(b)return {...b,contentControlId:ap(e,g.index,t)}}return null}function oP(e,n,t,r,o={}){let a=e.pages[n];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??Ks,measurer:o.measurer};return li(t,r,i,null)}function Tx(e,n,t={}){let r=e.pages[Go(e,n.y)];if(!r)return null;for(let o of [r.header,r.footer]){if(!o?.anchoredDrawings||o.anchoredDrawings.length===0)continue;let a=Object.freeze({x:n.x-o.box.x,y:n.y-o.box.y}),i=Vs(o.anchoredDrawings,a,r.index);if(i)return i}return di(e,r.index,{x:n.x-r.contentBox.x,y:n.y-r.contentBox.y},t)}function ci(e,n){return n.x>=e.x&&n.x<e.x+e.width&&n.y>=e.y&&n.y<e.y+e.height}function ui(e,n,t){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===n&&ci(i.box,t)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function ap(e,n,t){return ui(e,n,t)?.id??null}function Ys(e,n,t){let r=Math.max(e.x-n.x,0,n.x-(e.x+e.width)),o=Math.max(e.y-n.y,0,n.y-(e.y+e.height));return r+o*t}function Bx(e,n,t){return e.kind!=="table"||Math.max(e.box.y-n.y,0,n.y-(e.box.y+e.box.height))>0?Ys(e.box,n,t):0}function li(e,n,t,r){if(e.length===0)return null;let o=null;for(let i of e){if(!ci(i.box,n))continue;o=i;let l=ip(i,n,t,r);if(l)return l;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:Bx(i,n,t.verticalWeight)})).sort((i,l)=>i.score-l.score);for(let{block:i}of a){let l=ip(i,n,t,r);if(l)return l}return null}function ip(e,n,t,r){return e.kind==="paragraph"?Ox(e,n,t,r,ci(e.box,n)):Fx(e,n,t)}function Ox(e,n,t,r,o){let a=Cx(e.lines,n.y);if(!a)return null;let i=Lx(a,n.x,n.y,t),l={paragraphId:a.range.paragraphId,offset:i.offset},s=Wo(a,i.offset,t.measurer);return {position:l,caret:{position:l,x:i.x,y:s.y,height:s.height,lineId:a.id,pageIndex:t.pageIndex},pageIndex:t.pageIndex,lineId:a.id,cell:r,onGlyphs:o&&i.withinSpan&&n.y>=a.box.y&&n.y<a.box.y+a.box.height,contentControlId:null,drawing:i.drawing&&i.withinSpan?kx(a,i.drawing):null}}function Cx(e,n){if(e.length===0)return null;for(let o of e)if(n>=o.box.y&&n<o.box.y+o.box.height)return o;let t=e[0],r=Number.POSITIVE_INFINITY;for(let o of e){let a=n<o.box.y?o.box.y-n:n-(o.box.y+o.box.height);a<r&&(r=a,t=o);}return t}function kx(e,n){return Object.freeze({drawingNodeId:n.drawingNodeId,paragraphId:e.range.paragraphId,start:n.start})}function Ex(e,n){for(let t of e.drawings??[])if(t.start===n||t.start+1===n)return t;return null}function Ho(e,n){let t=e.hitBounds;return n.x<t.x||n.x>=t.x+t.width||n.y<t.y||n.y>=t.y+t.height?false:os(n.x,n.y,e.geometry)}function Lx(e,n,t,r){let o=e.spans;for(let s of e.drawings??[])if(Ho(s,{x:n,y:t}))return {offset:s.start,x:s.hitBounds.x,withinSpan:true,drawing:s};if(o.length===0&&(e.drawings?.length??0)>0){let s=e.drawings[0];if(n<=s.advanceStart)return {offset:e.range.start,x:s.advanceStart,withinSpan:false,drawing:s};let d=e.drawings[e.drawings.length-1];if(n>=d.advanceEnd)return $s(e,d.advanceEnd,r);for(let c of e.drawings??[])if(n>=c.advanceStart&&n<c.advanceEnd){let u=n>=c.x+c.width/2;return {offset:u?c.start+1:c.start,x:u?c.advanceEnd:c.advanceStart,withinSpan:Ho(c,{x:n,y:t}),drawing:c}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=o[0];if(n<=a.box.x)return {offset:e.range.start,x:a.box.x,withinSpan:false};let i=o[o.length-1],l=i.box.x+i.box.width;if(n>=l)return $s(e,l,r);for(let s of o)if(n>=s.box.x&&n<s.box.x+s.box.width)return Mx(s,n,r);for(let s=0;s<o.length;s+=1){let d=o[s];for(let c of e.drawings??[]){if(n>=c.advanceStart&&n<c.advanceEnd){let u=Ho(c,{x:n,y:t}),f=n>=c.x+c.width/2;return {offset:f?c.start+1:c.start,x:f?c.advanceEnd:c.advanceStart,withinSpan:u,drawing:c}}if(!(c.start<=d.range.start&&c.hitBounds.x+c.hitBounds.width<=d.box.x)){if(Ho(c,{x:n,y:t}))return {offset:c.start,x:c.hitBounds.x,withinSpan:true,drawing:c};if(n<d.box.x&&n>=c.hitBounds.x+c.hitBounds.width)return {offset:c.start+1,x:c.hitBounds.x+c.hitBounds.width,withinSpan:false,drawing:c};if(n<c.hitBounds.x&&n>=(o[s-1]?.box.x??e.contentX))return {offset:c.start,x:c.hitBounds.x,withinSpan:false,drawing:c}}}if(n<d.box.x){let c=o[s-1],u=c.box.x+c.box.width;return n-u<=d.box.x-n?{offset:c.range.end,x:u,withinSpan:false}:{offset:d.range.start,x:d.box.x,withinSpan:false}}}return $s(e,l,r)}function $s(e,n,t){let r=fp(t.layout,e);if(r===e.range.end)return {offset:r,x:n,withinSpan:false};for(let o=e.spans.length-1;o>=0;o-=1){let a=e.spans[o];if(r<a.range.start)continue;let i=r-a.range.start,l=t.measurer?jo(a,i,t.measurer):a.box.width*(a.range.end>a.range.start?i/(a.range.end-a.range.start):0);return {offset:r,x:a.box.x+l,withinSpan:false}}return {offset:r,x:n,withinSpan:false}}function fp(e,n){let t=n.range.end;if(t>n.range.start&&Xs(n,t-1)===Ub$1)return t-1;if(si(e).lastLineIdOfParagraph.get(n.range.paragraphId)===n.id)return t;let r=t;for(r>n.range.start&&Xs(n,r-1)===`
|
|
8
|
-
`&&(r-=1);r>n.range.start&&Xs(n,r-1)===" ";)r-=1;return r}function Xs(e,n){for(let t of e.spans)if(!(n<t.range.start||n>=t.range.end))return t.text.length!==t.range.end-t.range.start?null:t.text[n-t.range.start]??null;return null}var lp=new WeakMap,sp=new WeakMap;function dp(e){let n=yl(),t=lp.get(e);if(t&&t.epoch===n)return t.boundaries;let r=[0];for(let o of Cn(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),lp.set(e,{epoch:n,boundaries:r}),r}function jo(e,n,t){let r=e.caretEdges;if(r&&n>=0&&n<r.length)return r[n];let o=sp.get(t);o||(o=new WeakMap,sp.set(t,o));let a=o.get(e);a||(a=new Map,o.set(e,a));let i=a.get(n);if(i!==void 0)return i;let l=n<=0?0:Vn(e.text.slice(0,n),e.style,t);return a.set(n,l),l}function Us(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function fi(e,n,t){let r=e.range.end-e.range.start;if(r<=0)return e.box.x;let o=Math.max(0,Math.min(n-e.range.start,r)),a=e.caretEdges;return a&&o<a.length?e.box.x+a[o]:!t||Us(e)?e.box.x+e.box.width*(o/r):e.box.x+jo(e,o,t)}function Wo(e,n,t){let r=Ex(e,n);if(r)return {x:n>r.start?r.advanceEnd:r.advanceStart,y:r.y,height:r.height};let o=e.spans;if(o.length===0){let s=e.leading??0;return {x:e.contentX,y:e.box.y+s,height:Math.max(0,e.box.height-s-(e.trailingSpacing??0))}}let a=o[0];for(let s=0;s<o.length;s+=1){let d=o[s];if(n>d.range.start&&n<d.range.end){a=d;break}if(n===d.range.end){let c=o[s+1];if(c&&c.range.start===n&&Us(d)){a=c;break}if(c&&c.range.start===n&&d.text.endsWith(" ")&&c.box.x-(d.box.x+d.box.width)>.25){a=c;break}a=d;}else n>d.range.end&&(a=d);}let i=fi(a,n,t),l=t?.lineMetrics(a.style);return !l||l.height<=0?{x:i,y:e.box.y,height:e.box.height}:{x:i,y:e.box.y+e.baseline-l.baseline-es(a.style),height:l.height}}function Mx(e,n,t){let r=n-e.box.x,o=e.range.end-e.range.start;if(o<=0||Us(e)){let p=r>e.box.width/2;return {offset:p?e.range.end:e.range.start,x:p?e.box.x+e.box.width:e.box.x,withinSpan:true}}if(!t.measurer){let p=Math.max(0,Math.min(1,r/Math.max(e.box.width,Number.EPSILON))),g=Math.round(p*o),b=dp(e),m=b[0],y=Number.POSITIVE_INFINITY;for(let x of b){let v=Math.abs(x-g);v<y&&(y=v,m=x);}return {offset:e.range.start+m,x:e.box.x+e.box.width*(m/o),withinSpan:true}}let a=dp(e),i=1,l=a.length-1;for(;i<l;){let p=i+l>>1;jo(e,a[p],t.measurer)<r?i=p+1:l=p;}let s=a[i],d=a[i-1],c=jo(e,s,t.measurer),u=jo(e,d,t.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:s),x:e.box.x+(f?u:c),withinSpan:true}}function cp(e,n,t,r){if(e.length===0)return null;for(let i of e){let l=t(i);if(n>=l&&n<l+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let l=t(i),s=n<l?l-n:n-(l+r(i));s<a&&(a=s,o=i);}return o}function Nx(e,n,t,r){return {tableId:n.tableId,rowId:t.id,cellId:r.id,rowIndex:si(e).rowIndexById.get(t.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function Fx(e,n,t,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],l=cp(a,n.y,d=>d.box.y,d=>d.box.height);if(l){let d=cp(l.cells,n.x,c=>c.box.x,c=>c.box.width);d&&i.push(Ax(t,l,d));}let s=[];for(let d of a)for(let c of d.cells)c.blocks.length!==0&&(i.some(u=>u.cell===c)||s.push({entry:{row:d,cell:c},score:Ys(c.box,n,t.verticalWeight)}));s.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...s.map(u=>u.entry)]){let u=Nx(t.layout,e,d,c),f=li(c.blocks,n,t,u);if(f)return f}return null}function Ax(e,n,t){return t.blocks.length>0?{row:n,cell:t}:si(e.layout).mergeOriginOf.get(t)??{row:n,cell:t}}function pp(e,n){let t=n.paintBounds;return t.width<=0||t.height<=0?null:Object.freeze({pageIndex:e,x:t.x,y:t.y,width:t.width,height:t.height,record:n})}function Dx(e,n,t){for(let r of n.lines)for(let o of r.drawings??[])if(o.drawingNodeId===t)return pp(e,o);return null}function gp(e,n,t){if(n.kind==="paragraph")return Dx(e,n,t);for(let r of n.rows)for(let o of r.cells)for(let a of o.blocks){let i=gp(e,a,t);if(i)return i}return null}function up(e,n,t){for(let r of n){let o=gp(e,r,t);if(o)return o}return null}function _x(e,n){for(let t of e.pages){for(let o of t.anchoredDrawings??[])if(o.drawingNodeId===n)return pp(t.index,o);let r=up(t.index,t.fragments,n);if(r)return r;for(let o of [t.header,t.footer]){if(!o)continue;for(let i of o.anchoredDrawings??[]){if(i.drawingNodeId!==n)continue;let l=i.paintBounds;return l.width<=0||l.height<=0?null:Object.freeze({pageIndex:t.index,x:o.box.x+l.x-t.contentBox.x,y:o.box.y+l.y-t.contentBox.y,width:l.width,height:l.height,record:i})}let a=up(t.index,o.fragments,n);if(a){let i=a.record.paintBounds;return Object.freeze({pageIndex:t.index,x:t.header?.box.x===o.box.x||t.footer?.box.x===o.box.x?o.box.x+i.x-t.contentBox.x:a.x,y:o.box.y+i.y-t.contentBox.y,width:a.width,height:a.height,record:a.record})}}}return null}function zx(e){let n=[0],t=0;for(let r of e)t+=r,n.push(t);return n}function Hx(e,n){let t=n.get(e.id);return t===void 0&&(e.isHeaderRepeat?t=0:(t=n.size,n.set(e.id,t))),{...e,rowIndex:t}}function pi(e,n,t,r){return {...e,nestingDepth:t,columnEdges:e.columnEdges??zx(n),rows:e.rows.map(o=>Hx(o,r))}}var mp=new WeakMap,zr=4,Zs=6,hp=14,jx={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function yp(e,n,t,r,o){for(let a of e){if(a.kind!=="table")continue;let i=a.nestingDepth??r;for(let l of a.rows){o({pageIndex:n,table:a,row:l,rowOrdinal:l.rowIndex,nestingDepth:i,editable:!l.isHeaderRepeat,pageContentBox:t});for(let s of l.cells)yp(s.blocks,n,t,i+1,o);}}}function lP(e){let n=mp.get(e);if(n)return n;let t=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o];yp(a.fragments,o,a.contentBox,0,i=>{t.push(i);});}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(t)});return mp.set(e,r),r}function sP(e){let n=e.sourceRevision;switch(e.kind){case "rowDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function dP(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 cP(e,n){if(n.kind==="insertRow"){for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat)return t.editable?{kind:"insertRow",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}:null;return null}for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat&&t.editable)for(let r=0;r<t.table.columnEdges.length-1;r+=1){let o=$o(t.row,r);if(o===n.gridColumnId)return {kind:"insertColumn",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,gridColumnId:o,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}}return null}function $o(e,n){for(let t of e.cells)if(t.gridColumn===n)return t.gridColumnId??null;return null}function Gx(e,n,t,r,o){let a=e.pages[n.pageIndex];if(!a)return null;let i=t-a.contentBox.x-o,l=r-a.contentBox.y,s=n.table,d=i-s.box.x,c=l-s.box.y;return d<-zr||c<-hp||d>s.box.width+zr||c>s.box.height+Zs?null:{x:d,y:c}}function Wx(e,n,t,r,o){if(n.row.isHeaderRepeat)return null;let a=n.table,i=n.row.box.y-a.box.y+n.row.box.height;if(!a.columnEdges.slice(1).some(d=>Math.abs(t-d)<=zr)&&t>=0&&t<=a.box.width&&Math.abs(r-i)<=zr)return {kind:"rowDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeY:i};if(r<n.row.box.y-n.table.box.y||r>n.row.box.y-n.table.box.y+n.row.box.height)return null;for(let d=1;d<a.columnEdges.length-1;d+=1){let c=a.columnEdges[d];if(Math.abs(t-c)>zr)continue;let u=$o(n.row,d-1),f=$o(n.row,d);if(!u||!f)continue;let p=o.pages[n.pageIndex];return {kind:"columnDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,leftGridColumnId:u,rightGridColumnId:f,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:c,sheetY:p.contentBox.y+a.box.y+r}}let s=a.columnEdges.at(-1);if(Math.abs(t-s)<=zr){let d=a.columnEdges.length-2,c=$o(n.row,d);if(!c)return null;let u=o.pages[n.pageIndex];return {kind:"rightEdge",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,gridColumnId:c,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:s,sheetY:u.contentBox.y+a.box.y+r}}return null}function uP(e,n,t,r,o=0,a){let i=a??Go(r,t),l=i>=0?o:0,s=null,d=-1,c=-1,u=f=>{if(!f)return;let p=jx[f.kind];f.nestingDepth<d||f.nestingDepth===d&&p<=c||(d=f.nestingDepth,c=p,s=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let p=Gx(r,f,n,t,l);if(!p||(u(Wx(e,f,p.x,p.y,r)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let g=f.row.box.y-f.table.box.y;p.x<=Zs&&Math.abs(p.y-(g+f.row.box.height/2))<=f.row.box.height/2+Zs&&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 b=0;b<f.table.columnEdges.length-1;b+=1){let m=f.table.columnEdges[b],y=f.table.columnEdges[b+1],x=(m+y)/2;if(Math.abs(p.x-x)>(y-m)/2+2||p.y>hp)continue;let v=$o(f.row,b);if(v){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:v,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return s}var bp=1048576;function qs(e=bp){let n=e|0;return {cellsRemaining:n>0?n:0}}function Js(e,n,t,r){let o=new Map,a=new Map,i=r?.pageFragment===true,l=new Set,s=i,c=p=>{let g=a.get(p);g&&(o.set(g.id,g.span),a.delete(p));},u=()=>t!==void 0&&t.cellsRemaining<=0,f=()=>{for(let p of [...a.keys()])c(p);};for(let p of e){if(u()){f();break}s&&p.isHeaderRepeat!==true&&(s=false,f(),l?.clear());let g=new Set,b=false;for(let m of p.cells){if(t){if(t.cellsRemaining<=0){b=true;break}t.cellsRemaining-=1;}let y=Math.max(0,Math.min(m.gridColumn|0,1023));if(g.add(y),m.vMergeContinue){let x=a.get(y);x?x.span+=1:l&&!l.has(y)&&(a.set(y,{id:m.id,span:1}));}else c(y),a.set(y,{id:m.id,span:1});l?.add(y);}if(b){f();break}for(let m of [...a.keys()])g.has(m)||c(m);}return f(),o}function Sp(e,n,t,r){let o=new Map,a=0,i=l=>{let s=Dr(l,n,0,t,r);if(s)for(let d of s.rows)for(let c of d.cells)for(let u of c.blocks)u.localName==="p"?o.set(u.id,a++):u.localName==="tbl"&&i(u);};for(let l of e)l.kind==="paragraph"&&l.paragraph?o.set(l.paragraph.id,a++):l.kind==="table"&&l.table&&i(l.table);return o}var mi=4096,xp=1,wn=class extends Error{code;constructor(n,t){super(t),this.name="TablePaginationError",this.code=n;}};function Qs(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0}))}function wp(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function Rp(e,n,t,r,o){let a=wp(o);if(!(e.length===0||!a||!o.inlineDrawingLayout||!o.anchorFrameBase||!o.pageContentClip))for(let i of e){let l=null,s=null,d=i.lines;for(let u of n){for(let f of u.blocks)if(f.kind==="paragraph"&&f.paragraphId===i.paragraphId){l=f.box,d=f.lines,s=u.box;break}if(l)break}if(!l)continue;let c=s??Object.freeze({x:i.cellOriginX,y:t,width:i.cellContentWidth,height:r});a(kr({paragraph:i.paragraph,paragraphId:i.paragraphId,paragraphBox:l,lines:d,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(l)??l,cellBox:c,pageClip:o.pageContentClip(),measurer:o.measurer}));}}function $x(e,n,t,r){if(!(!r.onAnchorRepublish||!r.inlineDrawingLayout||!r.anchorFrameBase||!r.pageContentClip))for(let o of e){if(o.kind!=="paragraph")continue;let a=n.find(l=>l.kind==="paragraph"&&l.id===o.paragraphId);!a||a.kind!=="paragraph"||Sn(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,kr({paragraph:a,paragraphId:o.paragraphId,paragraphBox:o.box,lines:o.lines,drawingLayout:r.inlineDrawingLayout,frameBase:r.anchorFrameBase(),columnBox:r.columnBoxForParagraph?.(o.box)??o.box,cellBox:t,pageClip:r.pageContentClip(),measurer:r.measurer}));}}function Xx(e,n){let t=wp(e),r=e.deferAnchoredDrawings;return !t&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:t,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{n.push(i);}},flushDeferred:(i,l,s)=>{if(n.length!==0){if(t&&!e.anchorDeferOnly)Rp(n,i,l,s,e);else if(r)for(let d of n)r(d);n.length=0;}}}}function gi(e,n,t){let r=0;for(let o=n;o<t&&o<e.length;o+=1)r+=e[o];return r}function ed(e,n){return n===0?[...e]:e.map(t=>t.kind==="table"?{...t,box:{...t.box,y:t.box.y+n},rows:t.rows.map(r=>({...r,box:{...r.box,y:r.box.y+n},cells:r.cells.map(o=>({...o,box:{...o.box,y:o.box.y+n},blocks:ed(o.blocks,n)}))}))}:{...t,box:{...t.box,y:t.box.y+n},...t.shadingBox?{shadingBox:{...t.shadingBox,y:t.shadingBox.y+n}}:{},...t.bottomBorder?{bottomBorder:{...t.bottomBorder,box:{...t.bottomBorder.box,y:t.bottomBorder.box.y+n}}}:{},...t.borders?{borders:t.borders.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}:{},...t.marker?{marker:{...t.marker,box:{...t.marker.box,y:t.marker.box.y+n}}}:{},lines:t.lines.map(r=>({...r,box:{...r.box,y:r.box.y+n},spans:r.spans.map(o=>({...o,box:{...o.box,y:o.box.y+n}})),...r.drawings?{drawings:r.drawings.map(o=>Ea(o,0,n))}:{}}))})}function Vx(e,n,t,r,o,a,i){let l=e.id,s=o.listItems?.get(l),{props:d,indent:c,available:u,alignment:f,spacing:p,lineSpacing:g,bottomBorder:b,borders:m,shading:y,inheritedRunProperties:x,tabStops:v,tabStopsCacheToken:O}=Eo(e,t,o.styleCascade,s,i?.tableCellStyle),_=po(v,o.defaultTabStopPt),W=_===v?O:Gt(_),N=ai(s,c,o.measurer,_,u),B=o.pageExclusionZones?.()??Object.freeze([]),E=o.paragraphOrderIndex?.(l)??Number.MAX_SAFE_INTEGER,h=o.paragraphOrderIndex?Vu(B,E,he=>o.paragraphOrderIndex?.(he)):B,I=Xu(h,n,0,{left:0,right:c.left+u+c.right}),R=Zn(I),D=R?`${r.toFixed(3)}|${R}`:"",T=Yt({paragraph:e,properties:[...d,...x,{localName:"tabStops",attributes:{token:W}},...s?[{localName:"list",attributes:{token:s.cacheToken}}]:[]],width:u,producer:o.producer,...o.drawingTokenForParagraph?.(e)?{drawingToken:o.drawingTokenForParagraph(e)}:o.drawingLayoutToken?{drawingToken:o.drawingLayoutToken}:{},...D?{exclusionToken:D}:{}}),C=Ha(e,l,c.left,u,o.measurer,o.cache,o.cache?T:null,x,_,o.pageContext,o.styleCascade?(he,P)=>dt(he,P,o.styleCascade):void 0,{lineSpacing:g,firstLineOffset:N,marginExtent:{left:0,right:c.left+u+c.right},...o.projectLink?{projectLink:o.projectLink}:{},displayMode:o.displayMode,...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:c.left+u+c.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:c.left+u+c.right,height:Math.max(1,u)}),...I.length>0?{pageExclusionZones:I}:{},...o.styleCascade?{themeFonts:o.styleCascade.themeFonts}:{}}),k=i?.lineStart??0,M=i?.fragmentIndex??0,L=i?.maxBottom??Number.POSITIVE_INFINITY,z=i?.includeAfter??true,F=i?.includeBottomBorder??true,j=k===0?wr(p.before,a):0,G=n+c.left,Y=k===0?wt(m.top):0,K=[],U=r+j+Y,ae=k,we=false;for(let he=k;he<C.length;he+=1){let P=C[he],S=he===C.length-1,H=S&&F&&b?wt(b):0,q=S&&z?p.after:0,Q=I.length>0?st(U,P.height,I):P.exclusionSkipBefore??0;if(U+Q+P.height+H+q>L+.001)break;U+=Q;let ve=n+c.left+(he===0?N:0),fe=Math.max(1,u-(he===0?N:0)),nn=P.spans.map(be=>({...be,range:{...be.range,paragraphId:l},box:{...be.box,x:be.box.x+n,y:U}})),$e=_a(nn,o.measurer,ve,fe,f,S,f==="center"||f==="right"?P.width:void 0),Rn=nn.length>0&&$e.length>0?$e[0].box.x-nn[0].box.x:f!=="left"&&f!=="both"?(()=>{let be=fe-P.width;return be<=0?0:f==="center"?be/2:be})():0,qe=Object.freeze({x:n,y:r,width:t,height:Math.max(0,L-r)}),Ue=za(P.drawings.map(be=>La(Object.freeze({...be,paragraphId:l,x:n+be.x,advanceStart:n+be.advanceStart,advanceEnd:n+be.advanceEnd,y:U+be.y,paintBounds:Object.freeze({...be.paintBounds,x:n+be.paintBounds.x,y:U+be.paintBounds.y}),hitBounds:Object.freeze({...be.hitBounds,x:n+be.hitBounds.x,y:U+be.hitBounds.y})}),qe)),Rn);K.push({id:o.nextLineId(),range:{paragraphId:l,start:P.start,end:P.end},spans:$e,...Ue.length>0?{drawings:Ue}:{},box:{x:n+c.left,y:U,width:u,height:P.height},contentX:$e[0]?.box.x??ve+Rn,baseline:P.baseline,leading:P.leading,trailingSpacing:P.trailingSpacing,...P.deletedRanges?{deletedRanges:P.deletedRanges}:{}}),U+=P.height,ae=he+1,we=true;}if(!we)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:k,complete:false,fitted:false};let de=ae>=C.length,pe=K[0].box.y,Pe=U,Re=[],Ie,te=pe,Ee=Pe,me=m.left?sn(m.left):0,We=m.right?sn(m.right):0,tn=m.left?G-m.left.spacePt-me:G,Ke=m.right?G+u+m.right.spacePt+We:G+u,De=Math.max(Ke-tn,0);if(Y>0&&m.top){let he=sn(m.top),P=pe-m.top.spacePt-he;Re.push({side:"top",edge:m.top,box:{x:tn,y:P,width:De,height:he}}),te=P;}if(de&&F&&b){let he=sn(b),P=Pe+b.spacePt,S={x:tn,y:P,width:De,height:he};Ie={edge:b,box:S},Re.push({side:"bottom",edge:b,box:S}),Ee=P+he;}let pt=Math.max(Ee-te,0);if(m.left&&Re.push({side:"left",edge:m.left,box:{x:G-m.left.spacePt-me,y:te,width:me,height:pt}}),m.right&&Re.push({side:"right",edge:m.right,box:{x:G+u+m.right.spacePt,y:te,width:We,height:pt}}),m.bar){let he=sn(m.bar);Re.push({side:"bar",edge:m.bar,box:{x:G-m.bar.spacePt-he,y:pe,width:he,height:Math.max(Pe-pe,0)}});}let Fn=de&&z?p.after:0,ye=Ee+Fn,en=y===void 0?void 0:m.left||m.right?{x:tn,y:te,width:De,height:Math.max(Ee-te,0)}:uo(K,G,u),An=k===0?ii(s,o.measurer,K[0]?{y:K[0].box.y,height:K[0].box.height}:void 0,n):void 0,X={kind:"paragraph",id:`${l}#f${M}`,paragraphId:l,fragmentIndex:M,range:{paragraphId:l,start:K[0].range.start,end:K[K.length-1].range.end},props:d,spacing:{before:j,after:Fn},indent:c,...Ie?{bottomBorder:Ie}:{},...Re.length>0?{borders:Re}:{},...y===void 0?{}:{shading:y},...en===void 0?{}:{shadingBox:en},...An?{marker:An}:{},lines:K,box:{x:G,y:r,width:u,height:ye-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let he=Object.freeze({x:n,y:r,width:t,height:Math.max(0,L-r)}),P=X.box,S={paragraph:e,paragraphId:l,paragraphBox:P,lines:K};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...S,cellOriginX:n,cellContentWidth:t}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(kr({paragraph:e,paragraphId:l,paragraphBox:P,lines:K,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(P)??P,cellBox:he,pageClip:o.pageContentClip(),measurer:o.measurer}));}return {fragment:X,bottom:ye,spaceAfter:Fn,nextLineIndex:ae,complete:de,fitted:true}}function Xo(e,n,t,r,o,a){let i=Pp(e,n,t,r,Number.POSITIVE_INFINITY,o,a,{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0});return {blocks:i.blocks,bottom:i.bottom}}function Pp(e,n,t,r,o,a,i,l,s){let d=[],c=r,u=l.previousSpaceAfter,f=l.blockIndex,p=l.lineIndex,g=l.paragraphFragmentIndex,b=false,m=false;for(;f<e.length;){let y=e[f];if(y.kind==="table"){p!==0&&(p=0),u=0;let v=Ux(y,n,t,c,a+1,i);if(!v){f+=1;continue}if(v.bottom>o+.001){m=!b;break}d.push(v.fragment),c=v.bottom,b=true,f+=1,p=0;continue}if(y.kind!=="paragraph"){f+=1,p=0;continue}let x=Vx(y,n,Math.max(1,t-n),c,i,u,{lineStart:p,fragmentIndex:g,maxBottom:o,includeAfter:true,includeBottomBorder:true,...s?{tableCellStyle:s}:{}});if(!x.fitted||!x.fragment)break;if(d.push(x.fragment),c=x.bottom,b=true,x.complete)u=x.spaceAfter,f+=1,p=0,g=0;else return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:x.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:g+1},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:p,previousSpaceAfter:u,paragraphFragmentIndex:g},complete:f>=e.length,fitted:b,nestedSplitBlocked:m}}function Ip(e,n){return {top:e.top+Zt(n.top),right:e.right+Zt(n.right),bottom:e.bottom+Zt(n.bottom),left:e.left+Zt(n.left)}}function Yx(e,n,t){return {top:n?{state:"none"}:e.top,left:e.left,bottom:t?{state:"none"}:e.bottom,right:e.right}}function vp(e,n,t){return !n&&!t?e:{...e,cells:e.cells.map(r=>({...r,borders:Yx(r.borders,n,t)}))}}function Vo(e,n,t,r,o,a,i,l=0){let s=nd(e,n,t,r,Number.POSITIVE_INFINITY,o,false,a,i,Qs(e),l);return {record:s.record,bottom:s.bottom}}function nd(e,n,t,r,o,a,i,l,s,d,c=0){let u=gi(n,0,n.length),f=Number.isFinite(c)&&c>0?c/2:0,p=s.measurer.lineMetrics(Xn).height,g=e.height,b=g.rule==="exact"?g.valuePt:void 0,m=g.rule==="atLeast"?g.valuePt:void 0,y=[],{rowDeps:x,flushDeferred:v}=Xx(s,y),O=b===void 0?o:Math.min(o,r+Math.max(0,b)),_=[],W=false,N=false,B=r;for(let T=0;T<e.cells.length;T+=1){let C=e.cells[T],k=d[T]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0},M=C.gridSpan,L=C.gridColumn,z=t+gi(n,0,L),F=gi(n,L,Math.min(L+M,n.length))||u,j=Math.min(f,Math.max((F-xp)/2,0)),G=z+j,Y=Math.max(F-2*j,xp),K=Ip(C.margins,C.borders),U=i?Zt(C.borders.top):K.top,ae=r+U,we=O-K.bottom,de=[],pe=ae,Pe=k,Re=true,Ie=false,te=false;if(!C.vMergeContinue)if(we<ae+.001)Re=k.blockIndex>=C.blocks.length;else {let me=Pp(C.blocks,G+K.left,G+Y-K.right,ae,we,l,x,k,C.styleFormatting);de=me.blocks,pe=me.bottom,Pe=me.cursor,Re=me.complete,Ie=me.fitted,te=me.nestedSplitBlocked,Ie&&(W=true),te&&(N=true);}let Ee=Math.min(O,Ie?pe+K.bottom:r+U+p+K.bottom);Ee>B&&(B=Ee),_.push({cell:C,x:G,width:Y,gridColumn:L,blocks:de,contentTop:ae,contentBottom:pe,insets:{...K,top:U},nextCursor:Pe,complete:C.vMergeContinue?true:Re,fitted:Ie,nestedSplitBlocked:te});}B=Math.min(O,Math.max(B,r));for(let T of _){let C=T.fitted?T.contentBottom+T.insets.bottom:r+T.insets.top+p+T.insets.bottom;C>B&&C<=O+.001&&(B=C);}B=Math.min(O,B);let E=false;if(b!==void 0){let T=r+b;T<=o+.001?(B=T,E=true):B=Math.min(o,B);}else if(m!==void 0){let T=r+m;_.every(k=>k.complete)&&T<=o+.001&&T>B&&(B=T);}B=Math.min(o,B);let h=Math.max(0,B-r),I=_.map(T=>{let C=T.blocks,k=E?true:T.complete;if(!T.cell.vMergeContinue&&k&&T.cell.vAlign!=="top"&&C.length>0){let M=T.contentBottom-T.contentTop,L=h-T.insets.top-T.insets.bottom-M;if(L>0){let z=T.cell.vAlign==="center"?L/2:L;C=ed(C,z);}}return {id:T.cell.id,gridColumn:T.gridColumn,...T.cell.gridColumnId?{gridColumnId:T.cell.gridColumnId}:{},gridSpan:T.cell.gridSpan,vMergeContinue:T.cell.vMergeContinue,...T.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...T.cell.shading===void 0?{}:{shading:T.cell.shading},blocks:C,box:{x:T.x,y:r,width:T.width,height:h}}}),R=E||_.every(T=>T.complete)?null:_.map(T=>T.nextCursor),D=E||_.every(T=>T.complete);return v(I,r,h),{record:{id:e.id,...e.revisionKind?{revisionKind:e.revisionKind}:{},...e.revisionId!==void 0?{revisionId:e.revisionId}:{},...e.revisionAuthor!==void 0?{revisionAuthor:e.revisionAuthor}:{},...e.revisionDate!==void 0?{revisionDate:e.revisionDate}:{},rowIndex:0,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:I,box:{x:t,y:r,width:u,height:h}},bottom:B,remainder:D?null:R,fitted:W||e.cells.every(T=>T.vMergeContinue)||E,nestedSplitBlocked:N}}function Kx(e){return {...e,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function td(e,n,t,r,o,a=0){let i=0,l={...Kx(o),pageExclusionZones:void 0,nextLineId:()=>`probe-${i++}`};return Vo(e,n,t,0,false,r,l,a).record.box.height}function rd(e,n,t,r,o,a,i,l){if(e.length===0)return [];let s=new Map;for(let m of t)for(let y of m.cells)s.set(y.id,y);let d=Js(e,a,o,{pageFragment:true}),c=e.map((m,y)=>({...m,cells:m.cells.map(x=>{let v=d.get(x.id);if(x.vMergeContinue&&v===void 0)return {...x,paintInert:true,rowSpan:1,borders:{},blocks:[]};let O=x.vMergeContinue,_=v??1,W=x.box.height;if(_>1){let h=e[y+_-1];W=h.box.y+h.box.height-x.box.y;}let N=s.get(x.id),B=x.blocks;if(N&&N.vAlign!=="top"&&B.length>0){let h=Ip(N.margins,N.borders),I=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(let D of B)I=Math.min(I,D.box.y),R=Math.max(R,D.box.y+D.box.height);if(Number.isFinite(I)&&Number.isFinite(R)){let D=W-h.top-h.bottom-(R-I),C=x.box.y+h.top+(D>0?N.vAlign==="center"?D/2:D:0)-I;if(Math.abs(C)>.001){B=ed(B,C);for(let k of B)k.kind==="paragraph"&&i?.(k.paragraphId,C);}}}let E=Object.freeze({x:x.box.x,y:x.box.y,width:x.box.width,height:W});return N&&l&&(_>1||N.vAlign!=="top"&&B.length>0)&&$x(B,N.blocks,E,l),{...x,...O?{vMergeContinue:false,paintInert:false}:{},rowSpan:_,blocks:B,box:{...x.box,height:W}}})})),u=c.map(m=>m.cells.map(y=>{let x=s.get(y.id);return {gridColumn:y.gridColumn,gridSpan:y.gridSpan,vMergeContinue:y.vMergeContinue,borders:x?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:y.rowSpan??1}})),f=n.columnWidthsPt.length,p=n.tableBorders,g={columnWidthsPt:n.columnWidthsPt,rowBands:c.map(m=>({y:m.box.y,height:m.box.height})),cellBoxes:c.map(m=>m.cells.map(y=>({width:y.box.width,height:y.box.height})))},b=Os(u,p,f,g,void 0,r);return c.map((m,y)=>({...m,cells:m.cells.map((x,v)=>{let O=b[y][v];return x.paintInert||x.vMergeContinue?{...x,borders:{},paintInert:true}:{...x,borders:O}})}))}function Ux(e,n,t,r,o,a){if(o>=ri)return null;let i=Math.max(1,t-n),l=Dr(e,i,o,a.styleCascade,a.displayMode);if(!l||l.rows.length===0)return null;let s=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:m=>{s.push(m);}},c=n+_o(l,i),u=[],f=r;for(let m of l.rows){let y=Vo(m,l.columnWidthsPt,c,f,false,o,d,l.cellSpacingPt);u.push(y.record),f=y.bottom;}let p=rd(u,l,l.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let m of s)for(let y of p)if(y.cells.some(v=>v.blocks.some(O=>O.kind==="paragraph"&&O.paragraphId===m.paragraphId))){Rp([m],y.cells,y.box.y,y.box.height,a);break}let g=gi(l.columnWidthsPt,0,l.columnWidthsPt.length),b=new Map;return {fragment:pi({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:p,box:{x:c,y:r,width:g,height:f-r}},l.columnWidthsPt,o,b),bottom:f}}function Zx(e){let n=e.root;if(n.localName==="hdr"||n.localName==="ftr")return n;let t=r=>{if(r.kind!=="textValue"){if(r.kind==="body")return r;for(let o of r.children){let a=t(o);if(a)return a}}};return t(n)}function Tp(e,n){return !(e.kind==="paragraph"&&Mo(e,n))}function ft(e,n="all-markup"){let t=Zx(e);return t?Mb$1(t.children,0,r=>Tp(r,n)):[]}function hi(e,n="all-markup"){return e.kind!=="note"?[]:Mb$1(e.children,0,t=>Tp(t,n))}function Bp(e){let n=e.picture;return n?.embeddedRelationshipId?`embed:${e.ownerPartName}:${n.embeddedRelationshipId}`:n?.linkedRelationshipId?`link:${e.ownerPartName}:${n.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}function Op(e){let n=new Map,t=[{node:e.root,depth:0}],r=0;for(;t.length>0;){let o=t.pop();if(r+=1,r>Xa$1.maxVisitedElements||o.depth>Xa$1.maxDrawingDepth)return null;let{node:a}=o;if(a.kind==="drawing"||_a$1(a)){n.set(a.id,a);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)t.push({node:a.children[i],depth:o.depth+1});}return n}function od(e){let n=e.position,t=e.anchor,r=e.picture,o=e.wrapGeometry;return [e.drawingNodeId,e.ownerPartName,e.kind,e.hidden?"1":"0",String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.effectExtentEmu.top),String(e.effectExtentEmu.right),String(e.effectExtentEmu.bottom),String(e.effectExtentEmu.left),e.compatibilityBranchNodeId??"",t?.simplePos?"sp":"pv",t?String(t.relativeHeight):"",t?t.layoutInCell?"1":"0":"",r?[String(r.crop.left),String(r.crop.top),String(r.crop.right),String(r.crop.bottom),String(r.transform.rotationDegrees),r.transform.flipHorizontal?"1":"0",r.transform.flipVertical?"1":"0",String(r.transform.offsetEmu.x),String(r.transform.offsetEmu.y),String(r.transform.extentEmu.cx),String(r.transform.extentEmu.cy),r.embeddedRelationshipId??"",r.linkedRelationshipId??"",r.presetGeometry??""].join(":"):"",o?[o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length)].join(":"):"",n?[n.horizontal.relativeFrom,n.horizontal.align??"",String(n.horizontal.offsetEmu??""),n.vertical.relativeFrom,n.vertical.align??"",String(n.vertical.offsetEmu??""),String(n.simplePosition.xEmu),String(n.simplePosition.yEmu)].join(":"):""].join("|")}function qx(e){switch(e.kind){case "ready":return `ready:${e.resourceKey}:${e.contentId}:${e.pixelWidth}x${e.pixelHeight}`;case "pending":return `pending:${e.resourceKey}`;case "external":return `external:${e.relationshipId}:${e.sinkSafe?"1":"0"}`;case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}function Jx(e){if(e.kind!=="paragraph")return [];let n=[],t=r=>{if(r.kind==="drawing"){n.push(r.id);return}if(_a$1(r)){n.push(r.id);return}if("children"in r)for(let o of r.children)t(o);};for(let r of e.children)t(r);return Object.freeze(n)}function Qx(e){let{ownerPartName:n,part:t,pkg:r,lookup:o,onResourceSettled:a,rememberReadyHandle:i,forgetReadyHandle:l}=e,s=false,d=0,c=new Map,u=new Set,f=new Map,p=new WeakMap,g=0,b=Za$1(r,n),m=cb$1(t,{resolveRelationship:b}),y=Op(t),x=(N,B)=>{if(s||u.has(B))return;u.add(B);let E=d;o.resolveForProjection(N).then(h=>{s||E!==d||(c.set(B,h),h.kind==="ready"&&i(h.validatedHandle),g+=1,f.set(B,g),a(n));}).catch(()=>{s||E!==d||(c.set(B,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(B,g),a(n));}).finally(()=>{u.delete(B);});},v=N=>{let B=Bp(N),E=c.get(B);if(E)return E;let h=N.picture?.linkedRelationshipId;if(h){let R=o.resolveLinked(n,h);return c.set(B,R),g+=1,f.set(B,g),R}let I=Object.freeze({kind:"pending",resourceKey:B});return c.set(B,I),g+=1,f.set(B,g),x(N,B),I},O=N=>m.get(N)??null;return {context:Object.freeze({ownerPartName:n,projectionForAtom:O,project:N=>O(N.id),resourceOf:v}),cacheTokenForPart:()=>`${n}|${g}|${d}|${m.size}`,drawingTokenForParagraph:N=>{let B=p.get(N);if(B?.resourceEpoch===g)return B.token;let E=Jx(N);if(E.length===0)return p.set(N,{resourceEpoch:g,token:""}),"";let I=E.map(R=>{let D=m.get(R);if(!D)return `${R}:refused`;let T=v(D);return [R,od(D),qx(T),String(f.get(Bp(D))??0)].join("|")}).sort().join(";");return p.set(N,{resourceEpoch:g,token:I}),I},isCompatibleWith:(N,B)=>{if(N===t)return true;let E=Op(N);if(y&&E&&y.size===E.size){let I=true;for(let[R,D]of y)if(E.get(R)!==D){I=false;break}if(I)return true}let h=cb$1(N,{resolveRelationship:Za$1(B,n)});if(h.size!==m.size)return false;for(let[I,R]of m){let D=h.get(I);if(!D||od(D)!==od(R))return false}return true},dispose:()=>{s=true,d+=1;for(let N of c.values())N.kind==="ready"&&l(N.validatedHandle);c.clear(),u.clear(),f.clear();}}}function HP(e){let n=e.session.packageRevision(),t=e.session.currentPackage(),r=e.resourceLookup??pb$1(t,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new Map,l=new Map,s=p=>{i.set(p.resourceKey,p);let g=eb$1(p);g&&l.set(p.resourceKey,g);},d=p=>{i.delete(p.resourceKey);let g=l.get(p.resourceKey);g&&(fb$1(g),l.delete(p.resourceKey));},c=(p,g)=>{let m=g.currentPackage().parts.get(p)??a.get(p);if(m)return m;if(p===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${p}`)},u=(p,g)=>{let b=c(p,g);a.set(p,b);let m=o.get(p);return m||(m=Qx({ownerPartName:p,part:b,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:s,forgetReadyHandle:d}),o.set(p,m),m)},f=p=>{let g=p.currentPackage();if(g.partBytes===t.partBytes&&g.relationships===t.relationships&&g.contentTypes===t.contentTypes){for(let[m,y]of o){let x=g.parts.get(m)??(m===p.part().name?p.part():void 0);if(x&&y.isCompatibleWith(x,g)){a.set(m,x);continue}y.dispose(),o.delete(m),a.delete(m);}n=p.packageRevision(),t=g;return}for(let m of o.values())m.dispose();o.clear(),a.clear();for(let m of l.values())fb$1(m);l.clear(),i.clear(),e.resourceLookup||r.dispose(),n=p.packageRevision(),t=g,r=e.resourceLookup??pb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return u(e.session.part().name,e.session).context},contextForPart(p){return u(p,e.session).context},cacheTokenForPart(p){return u(p,e.session).cacheTokenForPart()},drawingTokenForParagraph(p,g){return u(g,e.session).drawingTokenForParagraph(p)},mintValidatedBytes(p,g){let b=i.get(p.resourceKey);return !b||b.contentId!==p.contentId?null:db$1(p,g)},sync(p){p.packageRevision()!==n&&f(p);},dispose(){for(let p of o.values())p.dispose();o.clear(),a.clear();for(let p of l.values())fb$1(p);l.clear(),i.clear(),e.resourceLookup||r.dispose();}})}function Cp(e,n){let t=[],r=o=>{if(o.kind==="paragraph"){let a=n(o);a&&t.push(a);return}if("children"in o)for(let a of o.children)r(a);};return r(e),t.sort().join(";")}function eS(e){let n=t=>{if(t.kind==="textValue"||ac(t)||_b$1(t)!==null)return false;if(t.kind==="text"||t.localName==="t"){for(let r of t.children)if(r.kind==="textValue"&&r.value.trim().length>0)return true;return false}for(let r of t.children)if(r.kind!=="textValue"&&n(r))return true;return false};for(let t of e.children)if(t.kind!=="textValue"&&n(t))return true;return false}function kp(e,n){for(let t of n.resultParagraphIds){let r=Ea$1(e,t);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&eS(r))return true}return false}function ad(e){let n=new Set;for(let t of sc(e))n.add(t.beginParagraphId),n.add(t.endParagraphId);return n}function id(e){let n=new Set;for(let t of sc(e))kp(e,t)||n.add(t.beginParagraphId);return n}function ld(e){let n=new Set;for(let t of sc(e))if(!kp(e,t))for(let r of t.resultParagraphIds)n.add(r);return n}var yi=4096,Bt=20,Nn=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 sd(e,n,t=31680*2){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<=0||r>t?n:r}function Jt(e,n){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let t=Number(e);return !Number.isFinite(t)||Math.abs(t)>31680?n:t}function Lp(e,n,t=31680){if(e===void 0||!/^\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<0||r>t?n:r}var Ge=(e,n)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes??[])if(t.localName===n)return t.value}},Qt=(e,n)=>{if(e.kind!=="textValue"){for(let t of e.children??[])if(t.kind!=="textValue"&&"localName"in t&&t.localName===n)return t}};function Ep(e,n,t){let r=Ge(e,n);return r===void 0?t:r==="0"||r==="false"||r==="off"||r==="no"?false:r==="1"||r==="true"||r==="on"||r==="yes"?true:t}function nS(e){if(!e)return 1;let n=Ge(e,"num");return !n||!/^\d{1,7}$/.test(n)?1:Math.max(1,Math.min(12,Number(n)))}function tS(e,n,t){if(!e||e.kind==="textValue")return [];let r=[];for(let o of e.children??[]){if(r.length>=n||o.kind==="textValue"||!("localName"in o)||o.localName!=="col")continue;let a=r.length;r.push({widthTwips:sd(Ge(o,"w"),1,31680),gapTwips:a===n-1?0:Lp(Ge(o,"space"),t)});}return r}function rS(e){let n=e?Qt(e,"type"):void 0,t=n?Ge(n,"val"):void 0;return t==="continuous"||t==="evenPage"||t==="oddPage"||t==="nextColumn"?t:"nextPage"}var oS=new Set(["hyphen","period","colon","emDash","enDash"]);function Mp(e){let n=Qt(e,"pgNumType");if(!n||n.kind==="textValue")return;let t={},r=Ge(n,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let l=Number(r);Number.isFinite(l)&&l>=0&&l<=9999&&(t.start=l);}let o=Ge(n,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(t.fmt=o);let a=Ge(n,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let l=Number(a);Number.isFinite(l)&&l>=0&&l<=9&&(t.chapStyle=l);}let i=Ge(n,"chapSep");return i!==void 0&&oS.has(i)&&(t.chapSep=i),t}function bi(e){if(!e)return Nn;let n=Qt(e,"pgSz"),t=Qt(e,"pgMar"),r=Qt(e,"cols"),o=Nn,a=n?Ge(n,"orient"):void 0,i=n?sd(Ge(n,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,l=n?sd(Ge(n,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,s=Mp(e),d=nS(r),c=r?Lp(Ge(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?Ep(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:l},margins:{topTwips:t?Jt(Ge(t,"top"),1440):o.margins.topTwips,rightTwips:t?Jt(Ge(t,"right"),1440):o.margins.rightTwips,bottomTwips:t?Jt(Ge(t,"bottom"),1440):o.margins.bottomTwips,leftTwips:t?Jt(Ge(t,"left"),1440):o.margins.leftTwips,headerTwips:t?Jt(Ge(t,"header"),720):o.margins.headerTwips,footerTwips:t?Jt(Ge(t,"footer"),720):o.margins.footerTwips,gutterTwips:t?Jt(Ge(t,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?Ep(r,"sep",false):false,definitions:u?[]:tS(r,d,c)},landscape:a==="landscape"||i>l,titlePage:sa$1(e,"titlePg"),breakType:rS(e),...s!==void 0?{pageNumbering:s}:{}}}function aS(e){let n=t=>{if(t.kind!=="textValue"){if(t.kind==="body")return Qt(t,"sectPr");for(let r of t.children??[]){let o=n(r);if(o)return o}}};return n(e.root)}function xi(e){let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n)return;let t=Qt(n,"sectPr");return t&&t.kind!=="textValue"?t:void 0}function iS(e){let n=Si(e);return n[n.length-1]?.properties??Nn}function Si(e,n="all-markup"){return Np(e,n).sections}function Np(e,n="all-markup"){let t=ft(e,n),r=[],o=0,a=false;for(let l=0;l<t.length;l+=1){let s=t[l];if(s.kind!=="paragraph")continue;let d=xi(s);if(d){if(r.length>=yi){a=true;continue}r.push({index:r.length,properties:bi(d),blockStart:o,blockEndExclusive:l+1}),o=l+1;}}if(a){if(r.length>0){let l=r[r.length-1];r[r.length-1]={...l,blockEndExclusive:t.length};}return {sections:r,truncated:true}}let i=aS(e);if(o<t.length||r.length===0){if(r.length>=yi){let l=r[r.length-1];return r[r.length-1]={...l,blockEndExclusive:t.length},{sections:r,truncated:true}}r.push({index:r.length,properties:bi(i),blockStart:o,blockEndExclusive:t.length});}else if(i){if(r.length>=yi)return {sections:r,truncated:true};r.push({index:r.length,properties:bi(i),blockStart:o,blockEndExclusive:t.length});}return {sections:r,truncated:a}}function er(e){let n=e.pageSize.widthTwips/Bt,t=e.pageSize.heightTwips/Bt,r=(e.margins.leftTwips+e.margins.gutterTwips)/Bt,o=e.margins.rightTwips/Bt,a=e.margins.topTwips/Bt,i=e.margins.bottomTwips/Bt;return n-r-o<=0||t-a-i<=0?ao:{width:n,height:t,margin:{top:a,right:o,bottom:i,left:r},headerDistance:Math.max(0,e.margins.headerTwips)/Bt,footerDistance:Math.max(0,e.margins.footerTwips)/Bt}}function dd(e,n){let t=Math.max(1,n),r=Math.max(1,Math.min(12,Math.floor(e.count))),o=e.definitions??[],a=e.equalWidth===false&&o.length===r&&o.every(c=>c.widthTwips>0),i,l;if(a){i=o.map(p=>Math.max(1,p.widthTwips/20)),l=o.slice(0,-1).map(p=>Math.max(0,p.gapTwips/20));let c=l.reduce((p,g)=>p+g,0),u=Math.max(r*1,t-c),f=i.reduce((p,g)=>p+g,0);if(f>u){let p=u/f;i=i.map(g=>Math.max(1,g*p));}}else {let c=Math.max(0,e.gapTwips/20),u=Math.min(c,Math.max(0,(t-r*1)/(r-1||1)));l=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(1,(t-l.reduce((p,g)=>p+g,0))/r);i=Array.from({length:r},()=>f);}let s=[],d=0;for(let c=0;c<r;c+=1)s.push(d),d+=i[c]+(l[c]??0);return {count:r,widths:i,gaps:l,lefts:s,separator:e.separator===true&&r>1}}function lS(e,n,t){return Yo(e,n,()=>t)}function Yo(e,n,t){let r=[],o=null,a=-1,i=-1;for(let l of n){let s=t(l.sectionIndex);if(l.customMarkFollows){r.push({noteId:l.noteId,mark:null});continue}o===null?(o=s.numStart,a=l.sectionIndex,i=l.pageIndex??-1):s.numRestart==="eachSect"&&l.sectionIndex!==a?(o=s.numStart,a=l.sectionIndex):s.numRestart==="eachPage"&&l.pageIndex!==void 0&&l.pageIndex!==i?(o=s.numStart,i=l.pageIndex):s.numRestart==="eachSect"?a=l.sectionIndex:s.numRestart==="eachPage"&&l.pageIndex!==void 0&&(i=l.pageIndex);let d=o;o+=1,r.push({noteId:l.noteId,mark:at(s.numFmt,d),displayNumber:d});}return r}function Fp(e){let n=new Map;for(let t of e)n.set(t.noteId,t.mark);return n}var Hr=pd$1,Ko=512,cd=6,sS=1/3;function Ap(e,n){return `note-${e}-${n}`}function dS(e){if(!e)return [];let n=[];for(let t of rd$1(e.root)){if(n.length>=Hr)break;id$1(t)&&n.push(t);}return n}function Dp(e,n){if(e){for(let t of rd$1(e.root))if(hd$1(t)===n)return t}}function ud(e,n,t){let r=fd$1(e),o=gd$1(e);if(!r||o===null)return null;let a=Yc$1(r,o),i=hi(e),l=Ap(r,o),s=0,d=Math.max(1,n),c=t.maxFlowHeightPt??Number.POSITIVE_INFINITY,u=t.noteMarks?{...t.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},f=Xo(i,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|${a}`,nextLineId:()=>`${l}-line-${s++}`,styleCascade:t.styleCascade,noteMarks:u,...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{}}),p=f.blocks,g=f.bottom,b;if(p.length>Ko){p=p.slice(0,Ko);let m=p[p.length-1];g=m?m.box.y+m.box.height:0,b="note-fragment-limit";}if(g>c){let m=[],y=0;for(let x of p){let v=x.box.y+x.box.height;if(v>c+.001&&m.length>0)break;m.push(x),y=v;}p=m,g=y,b=b??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:hd$1(e),fragments:p,flowHeight:g,...b?{fallbackReason:b}:{}}}function wi(e,n,t,r){if(!e)return null;let o=sd$1(e.root,n);return o?ud(o,t,r):null}function _p(e,n){return "single"}function zp(e){let n=hi(e);if(n.length===0)return true;for(let t of n){if(t.kind!=="paragraph")return false;let r=t.children.find(o=>o.kind==="paragraphProperties");if(Object.keys(rt(r)).length>0||!cS(t))return false}return true}function cS(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="paragraphProperties"){if(n.kind==="run"){if(!uS(n))return false;continue}return false}return true}function uS(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="runProperties"&&!(dd$1(n)||ed$1(n)||cd$1(n))){if(n.kind==="text"){if(n.children.map(r=>r.value).join("").trim().length>0)return false;continue}return false}return true}function Uo(e,n,t,r,o,a){let i=_p(),l=Dp(e,n);if(l){if(zp(l))return {kind:n,fragments:[],flowHeight:cd,synthetic:false,ruleStyle:i};let s=ud(l,t,r);if(s&&s.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return s.flowHeight>d+.001?{kind:n,fragments:[],flowHeight:cd,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:n,fragments:s.fragments,flowHeight:s.flowHeight,synthetic:false}}}return {kind:n,fragments:[],flowHeight:cd,synthetic:true,ruleStyle:i}}function Hp(e,n){let t=Math.max(1,e*sS);return {x:0,y:Math.max(0,(n-.75)/2),width:t,height:.75}}function Ri(e,n,t,r){if(e.ruleStyle!==void 0||e.synthetic){let o=Hp(t,e.flowHeight);return {x:n+o.x,y:r+o.y,width:o.width,height:Math.max(o.height,e.ruleStyle==="double"?2.25:.75)}}return {x:n,y:r,width:t,height:e.flowHeight}}var pd=8,Xp=4096,Vp=256,Yp=14,gd=12;function md(e,n){return n>=e.range.start&&n<e.range.end}function Kp(e){let n=[],t=r=>{for(let o of r){if(o.kind==="paragraph"){n.push(o);continue}for(let a of o.rows)if(!a.isHeaderRepeat)for(let i of a.cells)t(i.blocks);}};return t(e),n}function yd(e){let n=new Map;for(let t of e){let r=n.get(t.paragraphId);r?r.push(t):n.set(t.paragraphId,[t]);}return n}function Ii(e,n,t){let r=Kp(e.fragments);if(!t)return n.filter(i=>r.some(l=>l.paragraphId===i.paragraphId&&md(l,i.atomOffset)));let o=[],a=new Set;for(let i of r){let l=t.get(i.paragraphId);if(l)for(let s of l)a.has(s)||md(i,s.atomOffset)&&(a.add(s),o.push(s));}return o}function Up(){let e=new Map;return {get(n,t,r,o,a,i,l){let d=`${n?.name??"none"}\0${o}\0${t}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=Uo(n,t,r,i,o,a);return e.set(d,u),u.fallbackReason&&l.push(u.fallbackReason),u}}}function fS(e,n){let t=[];for(let r of e){if(t.length>=Hr)break;t.push({...r,sectionIndex:n.get(r.paragraphId)??0});}return t}function jr(e,n){return e.footnotePropsBySection[n]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function bd(e,n){return e.endnotePropsBySection[n]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function Zp(e,n){return {measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,defaultTabStopPt:e.defaultTabStopPt,noteMarks:n}}function pS(e,n){return n===0?e:{...e,box:{...e.box,y:e.box.y+n},...e.shadingBox?{shadingBox:{...e.shadingBox,y:e.shadingBox.y+n}}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:{...e.bottomBorder.box,y:e.bottomBorder.box.y+n}}}:{},...e.borders?{borders:e.borders.map(t=>({...t,box:{...t.box,y:t.box.y+n}}))}:{},...e.marker?{marker:{...e.marker,box:{...e.marker.box,y:e.marker.box.y+n}}}:{},lines:e.lines.map(t=>({...t,box:{...t.box,y:t.box.y+n},spans:t.spans.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}))}}function jp(e,n){return n===0?[...e]:e.map(t=>t.kind==="paragraph"?pS(t,n):{...t,box:{...t.box,y:t.box.y+n}})}function gS(e,n){if(e.lines.length===0)return e.box.y+e.box.height<=n+.001?{head:e,tail:null}:{head:null,tail:e};let t=0;for(;t<e.lines.length;t+=1){let b=e.lines[t];if(b.box.y+b.box.height>n+.001)break}if(t===0)return {head:null,tail:e};if(t>=e.lines.length)return {head:e,tail:null};let r=e.lines.slice(0,t),o=e.lines.slice(t),a=r[r.length-1],i=e.box.y,l=a.box.y+a.box.height,s=e.borders?.filter(b=>b.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,l-i)},...s&&s.length>0?{borders:s}:{borders:void 0},bottomBorder:void 0,...e.shadingBox?{shadingBox:{...e.shadingBox,height:Math.max(0,l-e.shadingBox.y)}}:{}},c=o[o.length-1],u=o[0].box.y,f=c.box.y+c.box.height,p=e.borders?.filter(b=>b.side!=="top"),g={...e,id:`${e.paragraphId}#f${e.fragmentIndex+1}`,fragmentIndex:e.fragmentIndex+1,range:{paragraphId:e.paragraphId,start:o[0].range.start,end:o[o.length-1].range.end},spacing:{before:0,after:e.spacing.after},lines:o,box:{x:e.box.x,y:u,width:e.box.width,height:Math.max(0,f-u)},marker:void 0,...p&&p.length>0?{borders:p}:{borders:void 0},...e.bottomBorder?{bottomBorder:e.bottomBorder}:{},...e.shadingBox?{shadingBox:{x:e.shadingBox.x,y:u,width:e.shadingBox.width,height:Math.max(0,f-u)}}:{}};return {head:d,tail:g}}function mS(e){let n=0;for(let t of e)n=Math.max(n,t.box.y+t.box.height);return n}function vi(e,n,t){if(e.flowHeight<=n+.001)return {head:e.fragments,headHeight:e.flowHeight,tail:[],tailHeight:0};if(n<=.001)return {head:[],headHeight:0,tail:e.fragments,tailHeight:e.flowHeight};let r=[],o=0,a=0,i=null;for(let u=0;u<e.fragments.length&&u<Ko;u+=1){let f=e.fragments[u],p=f.box.y+f.box.height;if(p<=n+.001){r.push(f),o=p,a=u+1;continue}if(f.kind==="paragraph"){let g=gS(f,n);if(g.head)r.push(g.head),o=g.head.box.y+g.head.box.height,i=g.tail,a=u+1;else {let b=t?.fullContentHeight??n,y=f.lines[0]?.box.height??f.box.height;if(r.length===0&&n>=b-.001&&y>b+.001){t?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let x=e.fragments.slice(a),v=x[0]?.box.y??0;return {head:[],headHeight:0,tail:jp(x,-v),tailHeight:Math.max(0,e.flowHeight-v)}}a=u,i=null;}break}a=u;break}let l=[...i?[i]:[],...e.fragments.slice(a)];if(l.length===0)return {head:r,headHeight:o,tail:[],tailHeight:0};let s=l[0]?.box.y??0,d=jp(l,-s),c=mS(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}function hS(e,n){let t="FootnoteReference";if(!n)return {...Xn,verticalAlign:"superscript"};let r=dt([],[{localName:"rStyle",attributes:{val:t}}],n);return kn(r,n.themeFonts)}function yS(e,n,t,r){let o=new Set;for(let c of e.values())c&&c.length>0&&o.add(c);let a=Math.max(n.footnotePropsBySection.length,n.endnotePropsBySection.length,1,...t.map(c=>c.sectionIndex+1),...r.map(c=>c.sectionIndex+1)),i=false;for(let c=0;c<a;c+=1){let u=jr(n,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<gd;p+=1){let g=at(u.numFmt,u.numStart+p);g.length>0&&o.add(g);}}let f=bd(n,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<gd;p+=1){let g=at(f.numFmt,f.numStart+p);g.length>0&&o.add(g);}}}if(!i||o.size===0)return;let l=hS("footnote",n.styleCascade),s,d=-1;for(let c of o){let u=n.measurer.measure(c,l);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(s?.length??0))&&(s=c,d=u);}return s}function qp(e,n,t){let r=Yo("footnote",e,l=>jr(t,l)),o=Yo("endnote",n,l=>bd(t,l)),a=new Map;for(let l of r)a.set($t("footnote",l.noteId),l.mark);for(let l of o)a.set($t("endnote",l.noteId),l.mark);let i=yS(a,t,e,n);return {marks:a,...i?{reservedMarkText:i}:{}}}function Ti(e){let n=0;for(let t of e.fragments)n=Math.max(n,t.box.y+t.box.height);return n}function hd(e){let{footnotes:n,endnotes:t,noteStream:r,...o}=e;return o}function bS(e,n){if(n.marks.size===0)return e;let t=false,r=e.pages.map(o=>{let a=Jp(o.fragments,n);return a===o.fragments?o:(t=true,{...o,fragments:a})});return t?{revision:e.revision,pages:r}:e}function Jp(e,n){let t=false,r=e.map(o=>{if(o.kind==="paragraph"){let l=xS(o,n);return l!==o&&(t=true),l}let a=false,i=o.rows.map(l=>{let s=false,d=l.cells.map(c=>{let u=Jp(c.blocks,n);return u===c.blocks?c:(s=true,{...c,blocks:u})});return s?(a=true,{...l,cells:d}):l});return a?(t=true,{...o,rows:i}):o});return t?r:e}function xS(e,n){let t=false,r=e.lines.map(o=>{let a=SS(o,n);return a!==o&&(t=true),a});return t?{...e,lines:r}:e}function SS(e,n){let t=false,r=e.spans.map(o=>{let a=wS(o,n);return a!==o&&(t=true),a});return t?{...e,spans:r}:e}function wS(e,n){if(!e.projected||e.noteNav?.direction!=="to-note")return e;let t=n.marks.get(e.noteNav.scopeId);if(t===void 0)return e;let r=t??"";return e.text===r?e:{...e,text:r}}function RS(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function Qp(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function PS(e){for(let n=e.length-1;n>=0;n-=1)if(Qp(e[n]))return n;return Math.max(0,e.length-1)}function xd(e,n,t,r,o,a,i,l){let s=new Map(a),d=n.filter(C=>C.noteKind==="footnote"),c=e.contentBox.width,u=Zp(t,r),f=[],p=0,g=Xp,b=a.size>0?"continuationSeparator":"separator",m=Math.max(0,e.contentBox.height),y=l?.separatorCache?l.separatorCache.get(t.footnotesPart,b,c,"footnote",m,u,i):(()=>{let C=Uo(t.footnotesPart,b,c,u,"footnote",m);return C.fallbackReason&&i.push(C.fallbackReason),C})(),x=Math.max(0,e.contentBox.height-Ti(e)-y.flowHeight),v=Math.max(0,e.contentBox.height-Yp-y.flowHeight),O=l?.reserveColumnBudget?v:x,W={fullContentHeight:Math.max(0,e.contentBox.height-y.flowHeight),reasons:i};for(let[C,k]of a){let M=C.match(/^(footnote|endnote):(-?\d+)$/);if(!M||M[1]!=="footnote")continue;let L=Number(M[2]),z=Math.max(0,O-p);if(k.height<=z+.001)f.push({noteKind:"footnote",noteId:L,scopeId:C,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:k.height},fragments:k.fragments}),p+=k.height,s.delete(C);else {let F=vi({fragments:k.fragments,flowHeight:k.height},z,W);F.head.length>0&&(f.push({noteKind:"footnote",noteId:L,scopeId:C,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:F.headHeight},fragments:F.head}),p+=F.headHeight),F.tail.length>0?s.set(C,{fragments:F.tail,height:F.tailHeight,mark:null}):s.delete(C);}}for(let C of d){if(f.length>=Hr){i.push("note-count-limit");break}let k=wi(t.footnotesPart,C.noteId,c,u);if(!k){i.push("missing-note-body");continue}let M=r.marks.get($t("footnote",C.noteId))??null,L=Math.max(0,O-p);if(g-=k.fragments.length,g<0){i.push("note-area-fragment-limit");break}if(k.flowHeight<=L+.001)f.push({noteKind:"footnote",noteId:C.noteId,scopeId:k.scopeId,mark:C.customMarkFollows?null:M,box:{x:e.contentBox.x,y:0,width:c,height:k.flowHeight},fragments:k.fragments}),p+=k.flowHeight;else {let z=vi(k,L,W);z.head.length>0&&(f.push({noteKind:"footnote",noteId:C.noteId,scopeId:k.scopeId,mark:C.customMarkFollows?null:M,box:{x:e.contentBox.x,y:0,width:c,height:z.headHeight},fragments:z.head}),p+=z.headHeight),z.tail.length>0&&s.set(k.scopeId,{fragments:z.tail,height:z.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:s};let N=y.flowHeight,B=N+p,E=Ti(e),h;o==="beneathText"?h=e.contentBox.y+E:(h=e.contentBox.y+e.contentBox.height-B,h=Math.max(h,e.contentBox.y+E));let I=h+N,R=f.map(C=>{let k={...C,box:{...C.box,y:I}};return I+=C.box.height,k}),D=Ri(y,e.contentBox.x,c,h);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:h,width:c,height:B},separator:{kind:b,box:D,fragments:y.fragments,synthetic:y.synthetic,...y.ruleStyle!==void 0?{ruleStyle:y.ruleStyle}:{}},notes:R},nextCarry:s}}function eg(e,n,t){return {id:`page-${n}`,index:n,box:e.box,contentBox:e.contentBox,fragments:[],...t?{noteStream:t}:{},...e.header?{header:e.header}:{},...e.footer?{footer:e.footer}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+(n-e.index)}}:{}}}function Sd(e,n){let t=new Set;for(let r of Kp(e.fragments))t.add(n.get(r.paragraphId)??0);return [...t].sort((r,o)=>r-o)}function ng(e,n,t){for(let r=e.length-1;r>=0;r-=1)if(Sd(e[r],t).includes(n))return r;return Math.max(0,e.length-1)}function IS(e,n,t){let r=ng(e,n,t);for(let o=r+1;o<e.length;o+=1){let a=e[o];if(a.noteStream==="footnote-drain"||a.noteStream==="endnote-overflow"||a.fragments.length===0&&(a.footnotes?.notes.length??0)>0)continue;let i=Sd(a,t);if(i.length!==0&&!i.includes(n))return o}return e.length}function vS(e){return e.map((n,t)=>n.index===t&&n.id===`page-${t}`?n:{...n,id:`page-${t}`,index:t})}function TS(e){let n=vS(e);return [...Vt({revision:0,pages:n}).pages]}function BS(e,n,t,r,o,a,i,l){let s=new Map(a),d=[];if(n.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};let c=e.contentBox.width,u=Zp(t,r),f=l?.separatorKind??"separator",p=L=>L==="footnote"?t.footnotesPart:t.endnotesPart,g=t.endnotesPart??t.footnotesPart,b=Math.max(0,e.contentBox.height),m=l?.separatorCache?l.separatorCache.get(g,f,c,"endnote",b,u,i):(()=>{let L=Uo(g,f,c,u,"endnote",b);return L.fallbackReason&&i.push(L.fallbackReason),L})(),y=m.flowHeight,x=Ti(e),v=e.endnotes?Math.max(x,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):x,O=RS(e),_=Math.max(0,O-v-y),N={fullContentHeight:Math.max(0,O-y),reasons:i},B=[],E=0,h=Xp;for(let[L,z]of a){let F=L.match(/^(footnote|endnote):(-?\d+)$/);if(!F)continue;let j=F[1],G=Number(F[2]),Y=Math.max(0,_-E);if(z.height<=Y+.001)B.push({noteKind:j,noteId:G,scopeId:L,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:z.height},fragments:z.fragments}),E+=z.height,s.delete(L);else {let K=vi({fragments:z.fragments,flowHeight:z.height},Y,N);K.head.length>0&&(B.push({noteKind:j,noteId:G,scopeId:L,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:K.headHeight},fragments:K.head}),E+=K.headHeight),K.tail.length>0?s.set(L,{fragments:K.tail,height:K.tailHeight,mark:null}):s.delete(L);}}for(let L=0;L<n.length;L+=1){let z=n[L];if(B.length>=Hr){i.push("note-count-limit"),d.push(...n.slice(L));break}let F=p(z.noteKind),j=wi(F,z.noteId,c,u);if(!j){i.push("missing-note-body");continue}let G=r.marks.get($t(z.noteKind,z.noteId))??null,Y=Math.max(0,_-E);if(h-=j.fragments.length,h<0){i.push("note-area-fragment-limit"),d.push(...n.slice(L));break}if(j.flowHeight<=Y+.001)B.push({noteKind:z.noteKind,noteId:z.noteId,scopeId:j.scopeId,mark:z.customMarkFollows?null:G,box:{x:e.contentBox.x,y:0,width:c,height:j.flowHeight},fragments:j.fragments}),E+=j.flowHeight;else {let K=vi(j,Y,N);K.head.length>0&&(B.push({noteKind:z.noteKind,noteId:z.noteId,scopeId:j.scopeId,mark:z.customMarkFollows?null:G,box:{x:e.contentBox.x,y:0,width:c,height:K.headHeight},fragments:K.head}),E+=K.headHeight),K.tail.length>0&&s.set(j.scopeId,{fragments:K.tail,height:K.tailHeight,mark:null}),d.push(...n.slice(L+1));break}}if(B.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};if(B.length===0)return {area:void 0,nextCarry:s,remainingRefs:d};let I=e.contentBox.y+v,R=I+y,D=B.map(L=>{let z={...L,box:{...L.box,y:R}};return R+=L.box.height,z}),T=Ri(m,e.contentBox.x,c,I),C=y+E,k=Math.max(0,O-v),M=Math.min(C,k);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:I,width:c,height:M},separator:{kind:f,box:T,fragments:m.fragments,synthetic:m.synthetic,...m.ruleStyle!==void 0?{ruleStyle:m.ruleStyle}:{}},notes:D},nextCarry:s,remainingRefs:d}}function OS(e,n,t,r,o,a,i){let l=e,s=n;for(;s.size>0&&a.remaining>0;){let d=l[l.length-1],c=eg(d,d.index+1,"footnote-drain"),u=xd(c,[],t,r,"pageBottom",s,o,{separatorCache:i}),f=u.area?.notes.length??0;if(s=u.nextCarry,f===0){o.push("note-overflow-stalled"),u.area&&(l=[...l,{...c,footnotes:u.area}],a.remaining-=1);break}l=[...l,{...c,footnotes:u.area}],a.remaining-=1;}return s.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:l,carry:s}}function CS(e,n,t,r="endnote-overflow"){let o=eg(t,n,r);return {pages:[...e.slice(0,n),o,...e.slice(n)],pageIndex:n}}function Gp(e,n,t){if(t<=n||n>=e.length)return e;let r=Math.min(t,e.length),o=e[n],a=o.pageFieldSource?.pageNumber??n+1,i=o.pageFieldSource?.format,l=r-n,s=[...e];for(let d=n;d<r;d+=1){let c=s[d];s[d]={...c,pageFieldSource:{pageNumber:a+(d-n),sectionPageCount:l,...i?{format:i}:{}}};}return s}function Wp(e,n,t,r,o,a,i,l,s){if(t.length===0||e.length===0)return e;let d=[...e],c=[...t],u=new Map,f=n,p=0,g="separator",b=s?.stopBeforeIndex??Number.POSITIVE_INFINITY,m=s?.sectionStartIndex??n,y=s?.stopBeforeIndex!==void 0,x=s?.separatorCache;for(;c.length>0||u.size>0;){if(f>=d.length||f>=b){if(l.remaining<=0){i.push("note-overflow-page-limit");break}let W=d[Math.min(Math.max(f,1),d.length)-1]??d[d.length-1],N=Math.min(f,b,d.length),B=CS(d,N,W,"endnote-overflow");d=B.pages,f=B.pageIndex,y&&(b=N+1),p+=1,l.remaining-=1;}let v=d[f];if(!Qp(v)){f+=1;continue}let O=BS(v,c,r,o,a,u,i,{separatorKind:g,...x?{separatorCache:x}:{}});u=O.nextCarry,c=O.remainingRefs;let _=O.area?.notes.length??0;if(O.area){let W=d[f];d[f]={...W,endnotes:W.endnotes?{...O.area,notes:[...W.endnotes.notes,...O.area.notes],box:{...O.area.box,y:W.endnotes.box.y,height:W.endnotes.box.height+O.area.box.height}}:O.area};}else {if(u.size===0&&c.length===0)break;if(!O.area&&u.size===0&&c.length>0){f+=1,g="separator";continue}}if(_===0&&(u.size>0||c.length>0)&&v.fragments.length===0&&v.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(u.size>0||c.length>0){g="continuationSeparator",f+=1;continue}break}return (c.length>0||u.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),y?d=Gp(d,m,Math.min(b,d.length)):p>0&&(d=Gp(d,m,d.length)),d}function tg(e,n,t,r){let o=new Map,a=[],i=new Map,l=yd(n),s=Up();for(let c of e.pages){let u=hd(c),p=Ii(u,n,l).filter(O=>O.noteKind==="footnote"),g=p[0]?.sectionIndex??0,b=jr(t,g);if(b.pos==="sectEnd"||b.pos==="docEnd")continue;let m=Math.max(0,u.contentBox.height-Yp),{area:y,nextCarry:x}=xd(u,p,t,r,b.pos,i,a,{reserveColumnBudget:true,separatorCache:s});i=x;let v=Math.min(y?.box.height??0,m);if(v>0){let O=o.get(c.index)??0;o.set(c.index,Math.max(O,v));}}let d=true;for(let c of e.pages){let u=o.get(c.index)??0;if(u<=0)continue;if(Ti(hd(c))+u>c.contentBox.height+.5){d=false;break}}return {reserves:o,stable:d,reasons:a}}function rg(e,n,t,r){let o=[...r?.fallbackReasons??[]],a=r?.paragraphSectionIndex??new Map,i={remaining:Vp},l=yd(n),s=Up(),d=[],c=[];for(let x of e.pages)for(let v of Ii(x,n,l)){let O={noteId:v.noteId,sectionIndex:v.sectionIndex,pageIndex:x.index,customMarkFollows:v.customMarkFollows};v.noteKind==="footnote"?d.push(O):c.push(O);}let u=qp(d,c,t),f=new Map,p=new Map,g=[],b=e.pages.map(x=>{let v=hd(x),O=Ii(x,n,l),_=O.filter(h=>h.noteKind==="footnote"),W=O.filter(h=>h.noteKind==="endnote");for(let h of W)if(bd(t,h.sectionIndex).pos==="sectEnd"){let R=p.get(h.sectionIndex)??[];R.push(h),p.set(h.sectionIndex,R);}else g.push(h);for(let h of _){let I=jr(t,h.sectionIndex);if(I.pos==="sectEnd"){let R=p.get(h.sectionIndex)??[];R.push(h),p.set(h.sectionIndex,R);}else I.pos==="docEnd"&&g.push(h);}let N=_[0]?.sectionIndex??0,B=jr(t,N),E;if(B.pos==="pageBottom"||B.pos==="beneathText"){let h=_.filter(R=>{let D=jr(t,R.sectionIndex).pos;return D==="pageBottom"||D==="beneathText"}),I=xd(v,h,t,u,B.pos,f,o,{separatorCache:s});E=I.area,f=I.nextCarry;}return {...v,...E?{footnotes:E}:{}}}),m=b.length;if(f.size>0){let x=OS(b,f,t,u,o,i,s);b=x.pages,f=x.carry;}if(p.size>0&&b.length>0){let x=[...p.keys()].sort((v,O)=>v-O);for(let v of x){let O=p.get(v),_=ng(b,v,a),W=IS(b,v,a),N=_;for(let B=0;B<=_;B+=1)if(Sd(b[B],a).includes(v)){N=B;break}b=Wp(b,_,O,t,u,"sectEnd",o,i,{stopBeforeIndex:W,sectionStartIndex:N,separatorCache:s});}}return g.length>0&&b.length>0&&(b=Wp(b,PS(b),g,t,u,"docEnd",o,i,{separatorCache:s})),b.length!==m&&(b=TS(b)),{layout:bS({revision:e.revision,pages:b},u),fallbackReasons:o,noteMarks:u}}function kS(e){return Rd(e).map(n=>({noteKind:n.noteKind,noteId:n.noteId,paragraphId:n.paragraphId,atomOffset:n.atomOffset,customMarkFollows:n.customMarkFollows}))}function ES(e,n){let t=new Map,r=ft(e);for(let o=0;o<n.length;o+=1){let a=n[o];for(let i=a.blockStart;i<a.blockEndExclusive;i+=1){let l=r[i];if(!l)continue;if(l.kind==="paragraph"){t.set(l.id,o);continue}let s=(d,c)=>{if(!(c>32)&&d.kind!=="textValue"){if(d.kind==="paragraph"){t.set(d.id,o);return}for(let u of d.children)s(u,c+1);}};s(l,0);}}return t}function nr(e){let n=new Map;for(let[t,r]of e)r>0&&n.set(t,r);return n}function fd(e,n){let t=nr(e),r=nr(n);if(t.size!==r.size)return false;for(let[o,a]of t)if((r.get(o)??0)!==a)return false;return true}function $p(e,n){let t=nr(e);for(let[r,o]of n)o<=0||t.set(r,Math.max(t.get(r)??0,o));return t}function Pi(e){return [...nr(e)].map(([n,t])=>`${n}=${t}`).sort().join(",")}function og(e,n,t,r,o){let a=kS(e),i=ES(e,n),l=fS(a,i),s=ag(l,r),d=t.session?.notePageBottomReserves,c=d?nr(d):new Map,u=[],f=o({...t,noteMarks:s,pageBottomReserves:c}),p=new Set([Pi(c)]);for(let b=0;b<pd;b+=1){let m=tg(f,l,r,s);if(u=[...m.reasons],m.stable&&fd(m.reserves,c))break;let y=m.stable?nr(m.reserves):$p(c,m.reserves);if(fd(y,c)){u.push("note-reflow-exhausted");break}let x=Pi(y);if(p.has(x)){y=$p(c,m.reserves);let v=Pi(y);if(fd(y,c)||p.has(v)){u.push("note-reflow-exhausted");break}}c=y,p.add(Pi(c)),f=o({...t,noteMarks:s,pageBottomReserves:c}),b===pd-1&&u.push("note-reflow-exhausted");}let g=rg(f,l,r,{fallbackReasons:u,paragraphSectionIndex:i});return t.session&&(t.session.previous=g.layout,t.session.notePageBottomReserves=nr(c)),g.layout}function ag(e,n){let t=[],r=[];for(let o of e){let a={noteId:o.noteId,sectionIndex:o.sectionIndex,customMarkFollows:o.customMarkFollows};o.noteKind==="footnote"?t.push(a):r.push(a);}return qp(t,r,n)}var ig=new WeakMap;function lg(e){let n=ig.get(e);if(n!==void 0)return n;let t=e.kind==="table"?JSON.stringify([e.id,e.tableId,e.fragmentIndex,e.nestingDepth,e.columnEdges,e.box,e.rows]):JSON.stringify([e.id,e.box,e.range,e.props,e.spacing,e.indent,e.bottomBorder,e.borders,e.shading,e.shadingBox,e.marker,e.lines.map(r=>[r.id,r.box,r.contentX,r.baseline,r.spans])]);return ig.set(e,t),t}function sg(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];if(r!==o&&lg(r)!==lg(o))return false}return true}function dg(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(e[t]!==n[t])return false;return true}var LS=128;function MS(e){return y(wa$1(e))}function NS(e){let n=Math.max(1,Math.floor(e)),t=new Map;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>n;){let a=t.keys().next();if(a.done)break;t.delete(a.value);}},get size(){return t.size}}}function FS(e,n,t,r,o,a,i,l=LS,s,d,c,u,f,p){let g=Kl(e.root),b=NS(l),m=ft(e),y=MS(e),x,v=O=>{let _=Xt(g)||c?O:void 0,W=_?.pageNumber??p?.pageNumber??1,N=bu(_,g)+(c?`|pn:${W}`:"");if(N===""){if(x)return x}else {let T=b.get(N);if(T)return T}let B=0,E=[],h=()=>{let T=_?.pageNumber??p?.pageNumber??1,C=p?.pageWidth??n,k=p?.pageHeight??Math.max(1,n),M=p?.marginLeft??0,L=p?.marginRight??0,z=p?.marginTop??0,F=p?.marginBottom??0,j=Math.max(1,k-z-F);return Object.freeze({pageNumber:T,pageWidth:C,pageHeight:k,marginLeft:M,marginRight:L,marginTop:z,marginBottom:F,contentWidth:n,contentHeight:j,physicalContentHeight:j,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},I=Object.freeze([]),R;if(c){let T=false;for(let C=0;C<Kt;C+=1){E.splice(0,E.length),B=0,R=Xo(m,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+N+(d?`|rev:${d}`:""),nextLineId:()=>`hf-${e.name}-line-${B++}`,styleCascade:a,pageContext:_,...s!==void 0?{defaultTabStopPt:s}:{},...d?{displayMode:d}:{},inlineDrawingLayout:c,anchorFrameBase:h,pageContentClip:()=>Po(h()),collectAnchoredDrawings:M=>{E.push(...M);},columnBoxForParagraph:M=>Object.freeze({x:0,y:M.y,width:n,height:M.height}),pageExclusionZones:()=>I,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{}});let k=bs(E,c,0,n);if(k.length===0){T=true,I=k;break}if(C>0&&Zn(I)===Zn(k)){T=true,I=k;break}I=k;}if(!T)throw new Er(`header/footer exclusion reflow did not converge within ${Kt} passes`)}else R=Xo(m,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+N+(d?`|rev:${d}`:""),nextLineId:()=>`hf-${e.name}-line-${B++}`,styleCascade:a,pageContext:_,...s!==void 0?{defaultTabStopPt:s}:{},...d?{displayMode:d}:{}});let D={partName:e.name,contentKey:y,fragments:R.blocks,flowHeight:R.bottom,pageFieldNeeds:g,...E.length>0?{anchoredDrawings:Object.freeze([...E])}:{},withPageContext:T=>!Xt(g)&&!D.anchoredDrawings?.length?x??D:v(T)};return N===""?x=D:b.set(N,D),D};return v(i)}function wd(e,n,t){let r=t-e.box.y,o=u=>({...u,y:u.y+r}),a=u=>{if(!u)return;let f={...u,box:o(u.box),...u.anchoredDrawings?{anchoredDrawings:u.anchoredDrawings}:{}};if(!u.pageFieldProjector)return f;let p=u.pageFieldProjector;return {...f,pageFieldProjector:g=>{let b=p(g);return {...b,box:o(b.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)}))}},l=a(e.header),s=a(e.footer),d=i(e.footnotes),c=i(e.endnotes);return {...e,id:`page-${n}`,index:n,box:o(e.box),contentBox:o(e.contentBox),...l?{header:l}:{},...s?{footer:s}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}function Bi(){return {previous:null,checkpoints:[],keys:[],context:"",endLineCounter:0,endCursorY:0,endSpaceAfter:0,endsOpenPage:true,stats:{placed:0,total:0,reusedPages:0,fullPasses:0},balanceLimit:null,multi:null,notePageBottomReserves:null}}function cg(e,n){return [...e].map(([t,r])=>`${t}=${r.flowHeight}`).sort().join(",")}function fg(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${cg(e.headers)};f:${cg(e.footers)}`:""}function Oi(e,n,t){if(e.sectionFurniture)return e.sectionFurniture[n];if(n===t-1)return e.furniture}function AS(e,n){return e.map((t,r)=>{let o=er(t.properties),a=Oi(n,r,e.length),i=t.properties.pageNumbering,l=i?`pn:${i.start??""},${i.fmt??""},${i.chapStyle??""},${i.chapSep??""}`:"pn:",s=t.properties.columns,d=`cols:${s.count},${s.gapTwips},${s.equalWidth===false?0:1},${s.separator?1:0};${(s.definitions??[]).map(c=>`${c.widthTwips}/${c.gapTwips}`).join(",")}`;return [t.blockStart,t.blockEndExclusive,t.properties.breakType,o.width,o.height,o.margin.top,o.margin.right,o.margin.bottom,o.margin.left,o.headerDistance??36,o.footerDistance??36,fg(a),l,d].join(":")}).join("|")}function DS(e,n,t){if(!e)return null;let r=e.multi;if(r&&r.structureKey===n&&r.sections.length===t)return r;let o={structureKey:n,sections:Array.from({length:t},()=>Bi()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1};return e.multi=o,o}function _S(e){return e!=="continuous"}function zS(e,n){return e.width===n.width&&e.height===n.height}function HS(e,n){if(n.fragments.length===0&&!n.columnSeparators?.length&&!n.anchoredDrawings?.length)return e;let t=e.anchoredDrawings||n.anchoredDrawings?Object.freeze([...e.anchoredDrawings??[],...n.anchoredDrawings??[]]):void 0;return {...e,fragments:n.fragments.length>0?[...e.fragments,...n.fragments]:e.fragments,...(e.columnSeparators?.length||n.columnSeparators?.length)&&{columnSeparators:[...e.columnSeparators??[],...n.columnSeparators??[]]},...t?{anchoredDrawings:t}:{}}}function ug(e,n,t){e.previous=n,e.endLineCounter=t,e.keys=[],e.checkpoints=[],e.context="";}function pg(e,n,t,r,o){let{session:a,...i}=r,l=AS(n,r),s=DS(a,l,n.length),d=[],c=[],u=[],f=0,p=0,g=0,b=0,m=0,y=0,x=0,v=true,O=null,_="",W=1;for(let E=0;E<n.length;E+=1){let h=n[E],I=e.slice(h.blockStart,h.blockEndExclusive),R=er(h.properties),D=Oi(r,E,n.length),T=d.length,C=f,k=s?.spans[E],M=fg(D);if(I.length===0&&!_S(h.properties.breakType)){u.push({startIndex:T,pageCount:0,sheetY:C,remappedPages:[]});continue}let L=E>0&&h.properties.breakType==="continuous"&&d.length>0&&v&&O!==null&&zS(O,R)&&_===M,z=s?.sections[E],F=h.properties.columns.count>1&&n[E+1]?.properties.breakType==="continuous",j=o(I,t,{...i,geometry:R,furniture:D,sectionColumns:h.properties.columns,...F?{balanceColumns:F}:{},lineCounterStart:p,pageIndexStart:L?T-1:T,...L?{flowStartY:y,spaceBeforeCarry:x}:{},...z?{session:z}:{}});p=j.lineCounter,y=j.endCursorY,x=j.endSpaceAfter,v=j.endsOpenPage,O=R,_=M,z?(g+=z.stats.placed,b+=z.stats.total):(g+=I.length,b+=I.length);let G=z!==void 0&&z.stats.placed===0&&z.stats.reusedPages===j.pages.length&&k!==void 0&&k.pageCount===j.pages.length,Y=k!==void 0&&k.startIndex===T&&k.sheetY===C&&k.remappedPages.length===j.pages.length,K=h.properties.pageNumbering,U=K?.start!==void 0?K.start:W,ae=K?.fmt,we;if(L){let de=d.length-1,pe=d[de],Pe=HS(pe,j.pages[0]);if(Pe!==pe){d[de]=Pe;let te=c.lastIndexOf(pe);te!==-1&&(c[te]=Pe);}let Re=[];for(let te of j.pages.slice(1)){let Ee=wd(te,d.length+Re.length,f);Re.push(Ee),f=Ee.box.y+Ee.box.height+24;}let Ie=Re.length+1;we=So(Re,U+1,Ie,ae);for(let te of we)d.push(te),c.push(te);W=U+Ie;}else if(G&&Y){we=k.remappedPages,m+=we.length;for(let de of we)d.push(de),c.push(de),f=de.box.y+de.box.height+24;W=U+we.length;}else {let de=[];for(let pe of j.pages){let Pe=wd(pe,d.length+de.length,f);de.push(Pe),f=Pe.box.y+Pe.box.height+24;}we=So(de,U,de.length,ae);for(let pe of we)d.push(pe),c.push(pe);W=U+we.length;}u.push({startIndex:T,pageCount:we.length,sheetY:C,remappedPages:we});}if(d.length===0){let E=er(n[0]?.properties??Nn),h=o([],t,{...i,geometry:E,sectionColumns:n[0]?.properties.columns??Nn.columns}),I=Vt({revision:t,pages:h.pages});return s&&(s.spans=[],s.previousRemapped=h.pages,s.previousFinalized=I,s.previousPageCount=I.pages.length),a&&(ug(a,I,p),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),I}let N=Vt({revision:t,pages:d}),B=N;if(s?.previousFinalized&&s.previousPageCount===N.pages.length&&s.previousRemapped.length===c.length){let E=s.previousFinalized.pages,h=s.previousRemapped,I=N.pages.map((R,D)=>c[D]===h[D]&&E[D]?E[D]:R);B={revision:t,pages:I};}return s&&(s.spans=u,s.previousRemapped=c,s.previousFinalized=B,s.previousPageCount=B.pages.length),a&&(ug(a,B,p),a.stats={placed:g,total:b||1,reusedPages:m,fullPasses:a.stats.fullPasses+(g===b&&m===0?1:0)}),B}function Ci(e=6,n=14){let t=r=>r.fontSizePt/11;return {measure:(r,o)=>r.length*e*t(o)*(o.horizontalScalePercent/100)+r.length*o.characterSpacingPt,lineMetrics:r=>{let o=r.verticalAlign==="baseline"?1:.75,a=n*t(r)*o;return {height:a,baseline:a*.8}}}}var jS=2,gg=new WeakMap,mg=new WeakMap;function GS(e,n,t){let r=t.displayMode??it,o=Si(e,r),a=ft(e,r),i=bg(e),l={...t,producer:`${t.producer??"unversioned-measurer"}|cc:${i}`,tocFieldChromeParagraphIds:t.tocFieldChromeParagraphIds??ad(e),emptyTocPlaceholderParagraphIds:t.emptyTocPlaceholderParagraphIds??id(e),emptyTocSuppressedResultParagraphIds:t.emptyTocSuppressedResultParagraphIds??ld(e)},s=t.drawingSourceOrder;!s&&t.inlineDrawingLayout&&(s=mg.get(t.inlineDrawingLayout),s||(s=(()=>{let f=new Map;return bb$1(e).forEach((p,g)=>{f.set(p.drawingNodeId,g);}),f})(),mg.set(t.inlineDrawingLayout,s)));let d=Ws(s?{...l,drawingSourceOrder:s}:l,a),c=f=>{if(o.length>1)return pg(a,o,n,f,Gr);let p=o[0],g=f.geometry??(p?er(p.properties):ao),b=Oi(f,0,o.length)??f.furniture,m=Gr(a,n,{...f,geometry:g,furniture:b,sectionColumns:p?.properties.columns??Nn.columns}),y=p?.properties.pageNumbering,x=xg({revision:m.layout.revision,pages:So(m.pages,y?.start??1,m.pages.length,y?.fmt)},m.layout),v=Vt(x);return f.session&&(f.session.multi=null,f.session.previous=v),v},u=f=>{let p=r0(f,e,i);return t.session&&(t.session.previous=p),p};return t.notes?u(og(e,o,d,t.notes,c)):u(c(d))}function tr(e,n,t){let r=t.geometry,o=r.width-r.margin.left-r.margin.right,a=dd(t.sectionColumns??Nn.columns,o);if(t.inlineDrawingLayout&&t.drawingExclusionPass===void 0&&!t.drawingExclusionConverged){let w=V=>t.drawingSourceOrder?.get(V),$=Object.freeze({columnCount:a.count,columnGapPt:a.gaps[0]??0,contentWidth:o,columnLefts:a.lefts,columnWidths:a.widths}),A=new Map,ee=null,le=false,ie=new Set,re=t.session?.previous?.pages;if(re){A=Io(re,t.inlineDrawingLayout,o,w,$),ee=Gr(e,n,{...t,drawingExclusionPass:0,drawingExclusionZonesByPage:A});let V=Io(ee.pages,t.inlineDrawingLayout,o,w,$);if(Na(A,V))return ee;A=new Map(V),ie.add(Fa(V));}for(let V=0;V<Kt;V+=1){ee=Gr(e,n,{...t,session:void 0,drawingExclusionPass:V,drawingExclusionZonesByPage:A});let ce=Io(ee.pages,t.inlineDrawingLayout,o,w,$);if(ce.size===0){le=true,A=ce;break}let xe=Fa(ce);if(ie.has(xe)){le=true,A=ce;break}if(ie.add(xe),V>0&&Na(A,ce)){le=true,A=ce;break}A=new Map(ce);}if(!le)for(let V=0;V<jS&&!le;V+=1){ee=Gr(e,n,{...t,session:void 0,drawingExclusionPass:Kt+V,drawingExclusionZonesByPage:A});let ce=Io(ee.pages,t.inlineDrawingLayout,o,w,$),xe=Fa(ce);if(Na(A,ce)||ie.has(xe)){le=true,A=ce;break}ie.add(xe),A=new Map(ce);}if(!le)throw new Er(`wrap exclusion reflow did not converge within ${Kt} passes`);return Gr(e,n,{...t,drawingExclusionConverged:true,drawingExclusionZonesByPage:A})}let i=t.measurer,l=t.cache,s=t.styleCascade,d=t.listItems,c=t.defaultTabStopPt,u=t.displayMode??it,f=t.tocFieldChromeParagraphIds,p=t.emptyTocPlaceholderParagraphIds,g=t.emptyTocSuppressedResultParagraphIds,b=(t.producer??"unversioned-measurer")+(s?`|sc:${s.cacheToken}`:"")+(d&&d.size>0?`|num:${d.size}`:"")+(c!==void 0?`|dts:${c}`:"")+(u===it?"":`|rev:${u}`),m$1=a.widths[0],y=t.furniture,x=r.headerDistance??36,v=r.footerDistance??36,O=w=>{let $=0;for(let A of w?.values()??[])$=Math.max($,A.flowHeight);return $},_=r.height*.4,W=Math.min(_,Math.max(r.margin.top,y?x+O(y.headers):0)),N=Math.min(_,Math.max(r.margin.bottom,y?v+O(y.footers):0)),B=r.height-W-N,E=r.height-r.margin.top-r.margin.bottom,h=t.pageBottomReserves,I=t.session,R=t.lineCounterStart??0,D=y?`|hf:${x},${v},${y.titlePage?1:0}${y.evenAndOddHeaders?1:0};`+[...y.headers].map(([w,$])=>`h${w}=${$.flowHeight}@${$.contentKey}`).sort().join(",")+";"+[...y.footers].map(([w,$])=>`f${w}=${$.flowHeight}@${$.contentKey}`).sort().join(","):"",T=t.flowStartY??0,C=t.spaceBeforeCarry??0,k=t.pageIndexStart??0,M=h?`|nr:${[...h].map(([w,$])=>`${w}=${$}`).join(",")}`:"",L=t.noteMarks?`|nm:${t.noteMarks.reservedMarkText??""}:${t.noteMarks.marks.size}`:"",z=t.columnRegionBottom,F=`|cols:${a.widths.join(",")};${a.gaps.join(",")};${a.separator?1:0}${z!==void 0?`;bal:${z}`:""}`,j=`${b}|${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|lc:${R}|fs:${T},${C}|pi:${k}${D}${M}${L}${F}`,G=[],Y=()=>{let w=Math.max(1,B-(h?.get(G.length)??0));return z!==void 0&&G.length===0?Math.max(1,Math.min(w,z)):w},K=(w,$)=>{let A=w.kind==="paragraph"?t.drawingTokenForParagraph?.(w)??t.drawingLayoutToken??"":w.kind==="table"&&t.drawingTokenForParagraph?Cp(w,t.drawingTokenForParagraph):"",ee=gg.get(w);if(ee&&ee.contentWidth===$&&ee.producer===b&&ee.drawingToken===A)return ee.entry;let le;if(w.kind==="table")le={kind:"table",table:w,key:Yt({paragraph:w,properties:[],width:$,producer:b,...A?{drawingToken:A}:{}})};else {let ie=d?.get(w.id),re=Eo(w,$,s,ie),{props:V,indent:ce,available:xe,alignment:Se,spacing:Te,lineSpacing:Ce,contextualSpacing:Be,styleId:Ze,shading:ne,inheritedRunProperties:Me}=re,ke=rf(w.children.find(Et=>Et.kind==="paragraphProperties"),s),Ne=El(ke),Dn=po(re.tabStops,c),Xe=Dn===re.tabStops?re.tabStopsCacheToken:Gt(Dn);le={kind:"paragraph",paragraph:w,props:V,indent:ce,available:xe,alignment:Se,spacing:Te,lineSpacing:Ce,contextualSpacing:Be,styleId:Ze,borders:ke,borderGroupKey:Ne===""?"":`${Ne}@${ce.left},${ce.left+xe}`,shading:ne,inheritedRunProperties:Me,tabStops:Dn,keeps:of(V),...ie?{listItem:ie}:{},key:Yt({paragraph:w,properties:[...V,...Me,{localName:"tabStops",attributes:{token:Xe}},...ie?[{localName:"list",attributes:{token:ie.cacheToken}}]:[]],width:xe,producer:b,...A?{drawingToken:A}:{}})};}return gg.set(w,{contentWidth:$,producer:b,drawingToken:A,entry:le}),le},U=e.map(w=>K(w,m$1)),ae=U.map(w=>w.key),we=Sp(U,m$1,s,u),de=U.map(w=>w.kind==="paragraph"&&w.keeps.keepNext),pe=sf(ae,w=>de[w]),Pe=I?.previous??null,Re=Pe!==null&&I!==void 0&&I.context===j,Ie=a.count===1&&Re,te=0;if(Re){let w=Math.min(pe.length,I.keys.length);for(;te<w&&pe[te]===I.keys[te];)te+=1;}let Ee=0;if(Ie){let w=Math.min(pe.length,I.keys.length)-te;for(;Ee<w&&pe[pe.length-1-Ee]===I.keys[I.keys.length-1-Ee];)Ee+=1;}if(Re&&te===U.length&&U.length===I.keys.length){let w=xg({revision:n,pages:Pe.pages},Pe);return I.previous=w,I.stats={placed:0,total:U.length,reusedPages:Pe.pages.length,fullPasses:I.stats.fullPasses},l?.retain(new Set(ae)),{layout:w,pages:w.pages,lineCounter:I.endLineCounter,endCursorY:I.endCursorY,endSpaceAfter:I.endSpaceAfter,endsOpenPage:I.endsOpenPage}}let me=[],We=0,tn=0,Ke=()=>a.lefts[We],De=()=>a.widths[We],pt=()=>({text:{left:Ke(),width:De()},margin:{left:0,width:o},page:{left:-r.margin.left,width:r.width}}),Fn=()=>me.length>tn,ye=[],en=[],An=new Map,X=T,he=T,P=0,S=R,H=C,q=[],Q=0,ge=0,ve=0,fe=T===0;if(Ie&&te>0&&te<I.checkpoints.length){let w=I.checkpoints[te];G.push(...Pe.pages.slice(0,w.pageCount)),me=[...w.pageFragments],ye=[...w.pendingAnchoredDrawings],X=w.cursorY,P=w.flowColumnIndex,We=w.flowColumnIndex,S=w.lineCounter,H=w.previousSpaceAfter,Q=te,fe=false,ve=G.length,q.push(...I.checkpoints.slice(0,te));}let nn=w=>({x:0,y:w*(r.height+24),width:r.width,height:r.height}),$e=w=>y?.titlePage&&w===0?"first":y?.evenAndOddHeaders&&(k+w+1)%2===0?"even":"default",Rn=(w,$,A)=>{if(!y)return;let ee=$e($),le=(w==="header"?y.headers:y.footers).get(ee);if(!le)return;let ie=Ce=>{let Be=w==="header"?A.y+x:A.y+r.height-v-Ce.flowHeight;return {kind:w,variant:ee,partName:Ce.partName,...Ce.rId?{rId:Ce.rId}:{},box:{x:A.x+r.margin.left,y:Be,width:o,height:Ce.flowHeight},fragments:Ce.fragments,...Ce.anchoredDrawings?{anchoredDrawings:Ce.anchoredDrawings}:{}}},re=k+$+1,V={pageNumber:re,pageCount:Math.max(re,G.length+1),sectionPageCount:$+1},ce=le.pageFieldNeeds,Se=Xt(ce)||(le.anchoredDrawings?.length??0)>0?le.withPageContext(V):le,Te=ie(Se);return Xt(ce)?{...Te,pageFieldProjector:Ce=>ie(le.withPageContext(Ce))}:Te},qe=a.count,Ue=Ke,be=w=>Object.freeze({x:a.lefts[P]??0,y:w.y,width:a.widths[P]??m$1,height:w.height}),rn=()=>Object.freeze({pageNumber:k+G.length+1,pageWidth:r.width,pageHeight:r.height,marginLeft:r.margin.left,marginRight:r.margin.right,marginTop:r.margin.top,marginBottom:r.margin.bottom,contentWidth:m$1,contentHeight:Y(),physicalContentHeight:E,ownerPartName:t.inlineDrawingLayout?.ownerPartName??m,storyKind:"body"}),Je=()=>Po(rn()),_e=w=>t.drawingSourceOrder?.get(w),on=w=>{if(w.length===0)return;for(let A of w)ye.some(ee=>ee.drawingNodeId===A.drawingNodeId)||ye.push(A.sourceOrder===void 0&&_e(A.drawingNodeId)!==void 0?Object.freeze({...A,sourceOrder:_e(A.drawingNodeId)}):A);if(!t.inlineDrawingLayout)return;let $=Wu(ye,{pageBottom:Y()});if(ye.splice(0,ye.length,...$.drawings),$.deferred.length>0)for(let A of $.deferred){let ee=(An.get(A.drawingNodeId)??0)+1;An.set(A.drawingNodeId,ee),ee>=fs?ye.push(ys(A,"page-defer-exhausted")):en.push(A);}},gt=()=>{if(en.length===0)return;let w=en.map($=>ms($,X-$.y));en=[],on(w);},Pn=()=>{let w=G.length,$=nn(w),A=Rn("header",w,$),ee=Rn("footer",w,$),le=me.reduce((ie,re)=>Math.max(ie,re.box.y+re.box.height),he);G.push({id:`page-${w}`,index:w,box:$,contentBox:{x:$.x+r.margin.left,y:$.y+W,width:o,height:B},fragments:me,...a.separator?{columnSeparators:a.gaps.map((ie,re)=>({x:a.lefts[re]+a.widths[re]+ie/2-.375,y:he,width:.75,height:Math.max(0,le-he)}))}:{},...ye.length>0?{anchoredDrawings:Gu(ye)}:{},...A?{header:A}:{},...ee?{footer:ee}:{}}),me=[],ye=[],X=0,We=0,P=0,he=0,tn=0;},vd=(w,$)=>{if(w.kind!=="paragraph"||w.listItem!==void 0||w.shading!==void 0)return false;let{top:A,bottom:ee,left:le,right:ie,between:re}=w.borders;if(A??ee??le??ie??re)return false;let V=t.inlineDrawingLayout;return V&&Sn(w.paragraph,V).length>0?false:$.every(ce=>ce.drawings.length===0&&!ce.pageBreakAfter&&!ce.columnBreakAfter&&ce.spans.every(xe=>xe.text.length===0))},Wr=()=>{if(We+1<a.count){We+=1,P=We,X=he,H=0,tn=me.length;return}Pn(),gt();},mt={measurer:i,cache:l,producer:b,nextLineId:()=>`line-${S++}`,styleCascade:s,listItems:d,...c!==void 0?{defaultTabStopPt:c}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:t.drawingLayoutToken?{drawingLayoutToken:t.drawingLayoutToken}:{},...t.inlineDrawingLayout?{anchorFrameBase:rn,pageContentClip:Je,publishAnchoredDrawings:on,collectAnchoredDrawings:on,columnBoxForParagraph:be,pageExclusionZones:()=>t.drawingExclusionZonesByPage?.get(G.length)??Object.freeze([]),paragraphOrderIndex:w=>we.get(w),onAnchorShift:(w,$)=>ds(ye,w,$),onAnchorRepublish:(w,$)=>{for(let A=ye.length-1;A>=0;A-=1)ye[A].anchorParagraphId===w&&ye.splice(A,1);ye.push(...$);}}:{},borderOwnershipBudget:Xa(),vMergeResolveBudget:qs(),displayMode:u},Ai=w=>ai(d?.get(w.paragraph.id)??w.listItem,w.indent,i,w.tabStops,w.available),Di=(w,$,A=0)=>{let ee=w.paragraph.id,ie=!(p?.has(ee)??false)&&((f?.has(ee)??false)||(g?.has(ee)??false)),re=w.available,V=Ue(),xe=(t.drawingExclusionZonesByPage?.get(G.length)??Object.freeze([])).filter(Ze=>{let ne=we.get(w.paragraph.id),Me=we.get(Ze.anchorParagraphId);if(ne!==void 0&&Me!==void 0){if(Me>ne)return false}else {let ke=U.findIndex(Ne=>Ne.kind==="paragraph"&&Ne.paragraph.id===Ze.anchorParagraphId);if(ke<0||ke>$)return false}return !(qe>1&&Ze.columnIndex!==P)}),Se=Zn(xe),Te=t.drawingTokenForParagraph?.(w.paragraph)??t.drawingLayoutToken??(t.inlineDrawingLayout?"drawing":void 0),Ce=l&&!ie?Se||Te?Yt({paragraph:w.paragraph,properties:w.props,width:re,producer:b,...Te?{drawingToken:Te}:{},...Se?{exclusionToken:`${P}|${X.toFixed(3)}|${Se}`}:{},...A>0?{startOffset:A}:{}}):A===0?w.key:`${w.key}|from:${A}`:null,Be=qe>1;return Ha(w.paragraph,ee,w.indent.left,re,i,l,Ce,w.inheritedRunProperties,w.tabStops,void 0,s?(Ze,ne)=>dt(Ze,ne,s):void 0,{lineSpacing:w.lineSpacing,firstLineOffset:A===0?Ai(w):0,startOffset:A,marginExtent:{left:0,right:w.indent.left+re+w.indent.right},...t.projectLink?{projectLink:t.projectLink}:{},displayMode:u,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},contentLeft:Be?V:0,contentRight:Be?V+De():w.indent.left+re+w.indent.right,paragraphStartY:X,...xe.length>0?{pageExclusionZones:xe}:{},...ie?{suppressEmptyPlaceholderLine:true}:{},...s?{themeFonts:s.themeFonts}:{}})},Td=(w,$)=>(t.drawingExclusionZonesByPage?.get(G.length)??Object.freeze([])).filter(ee=>{let le=we.get(w.paragraph.id),ie=we.get(ee.anchorParagraphId);if(le!==void 0&&ie!==void 0){if(ie>le)return false}else {let re=U.findIndex(V=>V.kind==="paragraph"&&V.paragraph.id===ee.anchorParagraphId);if(re<0||re>$)return false}return !(qe>1&&ee.columnIndex!==P||ee.anchorParagraphId===w.paragraph.id&&ee.input.mode==="topAndBottom")}),Bd=(w,$,A,ee,le,ie,re)=>{let V=Td(w,$);if(!t.inlineDrawingLayout||ee<=le)return V;let ce=En(w.paragraph),xe=new Map,Se=0;for(let ne=le;ne<ee;ne+=1){let Me=A[ne];for(let Ne of ce.values())Ne>=Me.start&&Ne<Me.end&&xe.set(Ne,Se);let ke=re.get(ne)??A[ne].exclusionSkipBefore??0;Se+=ke+A[ne].height;}if(xe.size===0)return V;let Te=qe>1,Ce=w.available,Be=Ue(),Ze=Ma({paragraph:w.paragraph,paragraphId:w.paragraph.id,drawingLayout:t.inlineDrawingLayout,contentLeft:Te?Be:0,contentRight:Te?Be+De():w.indent.left+Ce+w.indent.right,paragraphStartY:ie,anchorLineTopByModelStart:xe,columnIndex:P});return Object.freeze([...V,...Ze])},Wg=(w,$,A,ee,le,ie,re,V)=>{if(t.inlineDrawingLayout){let Te=[...En(w.paragraph).values()];if(Te.length>0){let Ce=Math.min(...Te);if(re.end<=Ce||Te.some(Be=>Be>=re.start&&Be<re.end)&&re.end<=Ce+1)return 0}}let ce=Bd(w,$,A,ee,le,ie,V),xe=ce.length>0?st(X,re.height,ce):0,Se=re.exclusionSkipBefore??0;return xe>.001?xe:Se},$g=w=>{let $=De(),A=Dr(w,$,0,s,u);if(!A||A.rows.length===0)return;let ee=A.columnWidthsPt.reduce((ne,Me)=>ne+Me,0),le=()=>A.float?Hf(A.float,ee,pt()):Ke()+_o(A,De()),ie=le();A.float&&A.float.vertAnchor==="text"&&!A.float.ySpec&&(X=Math.max(0,Math.min(X+A.float.yPt,Y())));let re=[];for(let ne of A.rows)if(ne.isHeader)re.push(ne);else break;let V=0,ce=X,xe=[],Se=new Map,Te=[],Ce=()=>{if(xe.length===0)return;let ne=rd(xe,A,Te,mt.borderOwnershipBudget,mt.vMergeResolveBudget,void 0,(ke,Ne)=>{ds(ye,ke,Ne);},mt),Me=ne[ne.length-1];me.push(pi({kind:"table",id:`${w.id}#f${V}`,tableId:w.id,fragmentIndex:V,rows:ne,box:{x:ie,y:ce,width:A.columnWidthsPt.reduce((ke,Ne)=>ke+Ne,0),height:Me.box.y+Me.box.height-ce}},A.columnWidthsPt,0,Se)),V+=1,xe=[],Te=[];},Be=ne=>{if(re.length===0)return;let Me=0;for(let ke of re)Me+=td(ke,A.columnWidthsPt,ie,0,mt,A.cellSpacingPt);if(Me>Y()+.001)throw new wn("table-row-overheight",`Table header group (${re.length} row(s)) is taller than the page content box`);X+Me>Y()+.001&&X>0&&(Ce(),Wr(),ie=le(),ce=X);for(let ke of re){let Ne=Vo(ke,A.columnWidthsPt,ie,X,ne,0,mt,A.cellSpacingPt);if(Ne.bottom>Y()+.001)throw new wn("table-row-overheight",`Table header row ${ke.id} overflowed the page content box`);xe.push(Ne.record),Te.push(ke),X=Ne.bottom;}},Ze=ne=>{Ce(),Wr(),ie=le(),ce=X,Be(true);};Be(false);for(let ne of A.rows.slice(re.length)){let Me=td(ne,A.columnWidthsPt,ie,0,mt,A.cellSpacingPt),ke=Qs(ne),Ne=false,Dn=0,Xe=false;for(Me<=Y()+.001&&X+Me>Y()+.001&&X>0&&(Ze(),Xe=true);;){if(Dn+=1,Dn>mi)throw new wn("table-row-fragment-limit",`Table row ${ne.id} exceeded ${mi} page fragments`);let Et=Y()-X;if(Et<=.001&&X>0){if(Xe)throw new wn("table-row-overheight",`Table row ${ne.id} cannot fit after repeated header rows`);Ze(),Xe=true;continue}if(!Ne&&Me<=Et+.001){let qn=Vo(ne,A.columnWidthsPt,ie,X,false,0,mt,A.cellSpacingPt);if(qn.bottom>Y()+.001)throw new wn("table-row-overheight",`Table row ${ne.id} overflowed the page content box after placement`);xe.push(qn.record),Te.push(ne),X=qn.bottom;break}if(ne.cantSplit||ne.height.rule==="exact"){if(X>0&&!Xe){Ze(),Xe=true;continue}throw new wn("table-row-overheight",ne.height.rule==="exact"?`Table row ${ne.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${ne.id} has w:cantSplit and is taller than the available page content`)}let yn=nd(ne,A.columnWidthsPt,ie,X,Y(),false,Ne,0,mt,ke,A.cellSpacingPt);if(!yn.fitted&&X>0&&!Xe){Ze(),Xe=true;continue}if(!yn.fitted)throw new wn(yn.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",yn.nestedSplitBlocked?`Table row ${ne.id} contains a nested table taller than the page content box`:`Table row ${ne.id} has content that cannot fit a page content box`);if(yn.bottom>Y()+.001)throw new wn("table-row-overheight",`Table row ${ne.id} overflowed the page content box`);let $r=yn.remainder!==null,ar=vp(ne,Ne,$r);if(xe.push(yn.record),Te.push(ar),X=yn.bottom,!$r)break;ke=yn.remainder,Ne=true,Xe=false,Ze();}}Ce();},kt=false,_i=U.length;for(let w=Q;w<U.length;w+=1){let $=K(e[w],De());if(q[w]={pageCount:G.length,pageFragments:[...me],pendingAnchoredDrawings:[...ye],cursorY:X,lineCounter:S,previousSpaceAfter:H,flowColumnIndex:P},Ie&&Ee>0&&w>=U.length-Ee){let J=I.checkpoints[w+(I.keys.length-U.length)];if(J&&J.cursorY===X&&J.lineCounter===S&&J.previousSpaceAfter===H&&J.flowColumnIndex===P&&J.pageCount===G.length&&sg(J.pageFragments,me)&&dg(J.pendingAnchoredDrawings,ye)){let oe=Pe.pages.slice(J.pageCount);G.push(...oe),ve+=oe.length,kt=true,_i=w,S=I.endLineCounter;break}}if(ge+=1,$.kind==="table"){H=0,$g($.table);continue}let{paragraph:A,props:ee,spacing:le,contextualSpacing:ie,styleId:re,borders:V,shading:ce,keeps:xe}=$,{indent:Se,alignment:Te,inheritedRunProperties:Ce}=$,Be=$.available,Ze=w>0?U[w-1]:void 0,ne=U[w+1],Me=J=>J?.kind==="paragraph"&&J.styleId===re&&re!==null,ke=ie?{before:Me(Ze)?0:le.before,after:Me(ne)?0:le.after}:le,Ne=d?.get(A.id)??$.listItem,Dn=Ai($),Xe=A.id,Et=$.borderGroupKey,yn=J=>Et!==""&&J?.kind==="paragraph"&&J.borderGroupKey===Et,$r=yn(Ze),ar=yn(ne),qn=$r?void 0:V.top,ir=ar?V.between:V.bottom,Lt=wt(qn),Nd=wt(ir);Tl(ee)&&(me.length>0||G.length===0)&&(Pn(),H=0);let Ve=Di($,w);if(Ve.length===0)continue;let Vg=xi(A)!==void 0&&vd($,Ve),Fd=()=>Vg&&z===void 0&&We+1>=a.count,zi=J=>{let oe=K(A,De());oe.kind==="paragraph"&&(Se=oe.indent,Te=oe.alignment,Be=oe.available,Ce=oe.inheritedRunProperties,Dn=J===0?Ai(oe):0,Ve=[...Di(oe,w,J)]);};{let J=wr(ke.before,H),oe=Ce.length===0?Xn:kn(Ce,s?.themeFonts),an=Ve.length<=1?Nd+ke.after:0,_n=X+J+Lt,un=Bd($,w,Ve,0,0,_n,new Map),Ft=Ve[0]?Uu(_n,Ve[0],un,an):i.lineMetrics(oe).height+an,yt=J+Lt+Ft;if(xe.keepNext&&!de[w-1]){let Ye=lf(U,w,H,Jn=>{let zn=U[Jn];return zn?.kind==="paragraph"?Di(zn,Jn).map(In=>In.height):[]});Ye!==null&&Ye+Lt<=Y()&&(yt=Math.max(yt,Ye+Lt));}X+yt>Y()&&X>0&&!Fd()&&(Wr(),H=0,zi(0));}let Yg=X===0&&!Fn(),Hi=Ll(ke.before,H,Yg,fe);Hi>0&&(X+=Hi),Lt>0&&(X+=Lt),fe=false;let Mt=0,Le=[],Ad=Ve[0]?.start??0,lr=Hi,Nt=Lt,ji=false,Xr=X,Dd=0,ea=new Map;H=0;let _d=t.inlineDrawingLayout!==void 0&&Sn($.paragraph,t.inlineDrawingLayout).length>0,zd=false,Gi=null,Hd=Ql($.paragraph),Kg=()=>{let J=Le[0];if(!J)return 0;let oe=Dd;if(oe<=.001)return 0;let an=st(Xr,J.box.height,Td($,w));return Math.max(0,oe-an)},na=J=>{if(Le.length===0)return;let oe=Ke(),an=Ue(),_n=Le[0].box.y,un=_n-lr-Nt,Ft=Le[Le.length-1].box.y+Le[Le.length-1].box.height,yt=J?ke.after:0,Ye=[],Jn,zn=_n,In=Ft,bt=V.left?sn(V.left):0,Yr=V.right?sn(V.right):0,sr=V.left?oe+Se.left-V.left.spacePt-bt:oe+Se.left,$i=V.right?oe+Se.left+Be+V.right.spacePt+Yr:oe+Se.left+Be,dr=Math.max($i-sr,0);if(Nt>0&&qn){let fn=sn(qn),pn=_n-qn.spacePt-fn;Ye.push({side:"top",edge:qn,box:{x:sr,y:pn,width:dr,height:fn}}),zn=pn;}if(J&&ir){let fn=sn(ir),pn=Ft+ir.spacePt,et={x:sr,y:pn,width:dr,height:fn};Ye.push({side:ar?"between":"bottom",edge:ir,box:et}),ar||(Jn={edge:ir,box:et}),In=pn+fn;}J&&(X=Math.max(X,In+yt));let cr=Math.max(In+yt-un,0),Oe=$r&&Mt===0?un:zn,Qn=ar&&J?un+cr:In,ur=Math.max(Qn-Oe,0);if(V.left&&Ye.push({side:"left",edge:V.left,box:{x:oe+Se.left-V.left.spacePt-bt,y:Oe,width:bt,height:ur}}),V.right&&Ye.push({side:"right",edge:V.right,box:{x:oe+Se.left+Be+V.right.spacePt,y:Oe,width:Yr,height:ur}}),V.bar){let fn=sn(V.bar);Ye.push({side:"bar",edge:V.bar,box:{x:oe+Se.left-V.bar.spacePt-fn,y:_n,width:fn,height:Math.max(Ft-_n,0)}});}let fr=Mt===0?ii(Ne,i,Le[0]?{y:Le[0].box.y,height:Le[0].box.height}:void 0):void 0,ta=fr?{...fr,box:{...fr.box,x:fr.box.x+oe}}:void 0;if(me.push({kind:"paragraph",id:`${Xe}#f${Mt}`,paragraphId:Xe,fragmentIndex:Mt,range:{paragraphId:Xe,start:Ad,end:Le[Le.length-1].range.end},props:ee,spacing:{before:lr,after:yt},indent:Se,...Jn?{bottomBorder:Jn}:{},...Ye.length>0?{borders:Ye}:{},...ce===void 0?{}:{shading:ce,shadingBox:V.left||V.right?{x:sr,y:zn,width:dr,height:Math.max(In-zn,0)}:uo(Le,oe+Se.left,Be)},...ta?{marker:ta}:{},...J&&Hd?{markRevision:Hd}:{},lines:Le,box:{x:an+Se.left,y:un,width:Be,height:cr}}),t.inlineDrawingLayout&&_d&&!zd){zd=true;let fn=[...En($.paragraph).values()],pn=fn.length>0&&fn.every(gn=>Le.some(At=>gn>=At.range.start&&gn<At.range.end)),et,pr,Xi;if(pn){let gn=un-Kg();et=Le,pr={x:an+Se.left,y:gn,width:Be,height:cr},Xi=be({x:an+Se.left,y:gn,height:cr});}else {let gn=Gi??{columnX:an,columnWidth:De(),startY:un},At=gn.startY;et=Ve.map((vn,Ug)=>{let Zg={id:`anchor-line-${Ug}`,range:{paragraphId:Xe,start:vn.start,end:vn.end},box:{x:gn.columnX+Se.left,y:At,width:Be,height:vn.height},contentX:vn.spans.length>0?vn.spans[0].box.x+gn.columnX:gn.columnX+Se.left,baseline:vn.baseline,leading:vn.leading,trailingSpacing:vn.trailingSpacing,spans:vn.spans.map(Vi=>({...Vi,box:{...Vi.box,x:Vi.box.x+gn.columnX,y:At}}))};return At+=vn.height+(vn.exclusionSkipBefore??0),Zg});let jd=gn.startY;pr={x:gn.columnX+Se.left,y:jd,width:Be,height:Math.max(At-jd,Le[0]?.box.height??0)},Xi=be(pr);}on(kr({paragraph:$.paragraph,paragraphId:Xe,paragraphBox:pr,lines:et,drawingLayout:t.inlineDrawingLayout,frameBase:rn(),columnBox:Xi,cellBox:null,pageClip:Je(),measurer:i,sourceOrderOf:_e}));}Mt+=1,Ad=Le[Le.length-1].range.end,Le=[],lr=0,Nt=0;},ht=0,Wi=0,Vr=Ve.length+8;for(let J=0;J<Ve.length;J+=1){let oe=Ve[J],an=J===Ve.length-1,_n=an?Nd+ke.after:0;J===ht&&(Xr=X,_d&&Gi===null&&Mt===0&&(Gi=Object.freeze({columnX:Ue(),columnWidth:De(),startY:Xr})));let un=Wg($,w,Ve,J,ht,Xr,oe,ea),Ft=un+Math.max(0,oe.height-oe.trailingSpacing)+_n;if(X+Ft>Y()&&!Fd()&&(Le.length>0||me.length>0||G.length>0)){let Oe=!Fn(),Qn=Wi<Vr?af(J,ht,Ve.length,xe,Oe):J,ur=Qn<J;for(let pn=J;pn>Qn;pn-=1){Le.pop();let et=Ve[pn-1],pr=ea.get(pn-1)??et.exclusionSkipBefore??0;ea.delete(pn-1),X-=et.height+pr,S-=1;}let fr=ur&&Le.length===0&&Mt===0,ta=Ve[Qn].start,fn=De();if(na(false),Wr(),lr=0,fr?X=Nt:Nt=0,De()!==fn){zi(ta),Vr=Math.max(Vr,Ve.length+8),ht=0,ur&&(Wi+=1),J=-1;continue}if(ht=Qn,Xr=X,ur){Wi+=1,J=Qn-1;continue}}let Ye=Ue();ea.set(J,un),X+=un;let Jn=Ye+Se.left+(J===0?Dn:0),zn=Math.max(1,Be-(J===0?Dn:0)),In=oe.spans.map(Oe=>({...Oe,range:{...Oe.range,paragraphId:Xe},box:{...Oe.box,x:Oe.box.x+Ye,y:X}})),bt=_a(In,i,Jn,zn,Te,an,Te==="center"||Te==="right"?oe.width:void 0),Yr=In.length>0&&bt.length>0?bt[0].box.x-In[0].box.x:Te!=="left"&&Te!=="both"?(()=>{let Oe=zn-oe.width;return Oe<=0?0:Te==="center"?Oe/2:Oe})():0,sr=Object.freeze({x:0,y:0,width:m$1,height:Y()}),$i=oe.drawings.map(Oe=>{let Qn=Object.freeze({...Oe,paragraphId:Xe,x:Ye+Oe.x,y:X+Oe.y,advanceStart:Oe.advanceStart+Ye,advanceEnd:Oe.advanceEnd+Ye,paintBounds:Object.freeze({...Oe.paintBounds,x:Ye+Oe.paintBounds.x,y:X+Oe.paintBounds.y}),hitBounds:Object.freeze({...Oe.hitBounds,x:Ye+Oe.hitBounds.x,y:X+Oe.hitBounds.y})});return La(Qn,sr)}),dr=za($i,Yr),cr={id:`line-${S}`,range:{paragraphId:Xe,start:oe.start,end:oe.end},spans:bt,box:{x:Ue()+Se.left,y:X,width:Be,height:oe.height},contentX:bt[0]?.box.x??Jn+Yr,baseline:oe.baseline,leading:oe.leading,trailingSpacing:oe.trailingSpacing,...oe.deletedRanges?{deletedRanges:oe.deletedRanges}:{},...dr.length>0?{drawings:dr}:{}};if(S+=1,Le.length===0&&(Dd=un),Le.push(cr),X+=oe.height,oe.columnBreakAfter){let Oe=De();if(na(an),Wr(),lr=0,Nt=0,ji=true,!an&&De()!==Oe){zi(oe.end),Vr=Math.max(Vr,Ve.length+8),ht=0,J=-1;continue}ht=J+1;}else oe.pageBreakAfter&&(na(an),Pn(),lr=0,Nt=0,ji=true,ht=J+1);}na(true),H=ji?0:ke.after;}kt||(q[U.length]={pageCount:G.length,pageFragments:[...me],pendingAnchoredDrawings:[...ye],cursorY:X,lineCounter:S,previousSpaceAfter:H,flowColumnIndex:P});let Od=kt&&I?I.endCursorY:X,Cd=kt&&I?I.endSpaceAfter:H,kd=!kt&&(me.length>0||G.length===0),Ed=kt&&I?I.endsOpenPage:kd;kd&&Pn();let Ld=0,Xg=fs*4+8;for(;(ye.length>0||en.length>0)&&Ld<Xg;)Ld+=1,ye.length===0&>(),Pn();en.length>0&&(ye.push(...en.map(w=>ys(w,"page-defer-exhausted"))),en=[],Pn()),l?.retain(new Set(ae));let Md={revision:n,pages:G};return I&&(I.previous=Md,I.checkpoints=kt?[...q.slice(0,_i),...I.checkpoints.slice(_i+(I.keys.length-U.length))]:q,I.keys=pe,I.context=j,I.endLineCounter=S,I.endCursorY=Od,I.endSpaceAfter=Cd,I.endsOpenPage=Ed,I.stats={placed:ge,total:U.length,reusedPages:ve,fullPasses:I.stats.fullPasses+(Q===0?1:0)}),{layout:Md,pages:G,lineCounter:S,endCursorY:Od,endSpaceAfter:Cd,endsOpenPage:Ed}}function hg(e,n,t){let r=n.lefts.map(()=>t);for(let o of e.fragments){let a=0;for(let i=n.count-1;i>=0;i-=1)if(o.box.x+.5>=n.lefts[i]){a=i;break}r[a]=Math.max(r[a],o.box.y+o.box.height);}return r}var WS=.25,$S=20;function Gr(e,n,t){let r=dd(t.sectionColumns??Nn.columns,t.geometry.width-t.geometry.margin.left-t.geometry.margin.right);if(!t.balanceColumns||r.count<2||t.columnRegionBottom!==void 0)return t.session&&(t.session.balanceLimit=null),tr(e,n,t);let o=t.session,a=t.flowStartY??0,{session:i,...l}=t,s=m=>{let y=m.pages[0],x=y?Math.max(...hg(y,r,a)):m.endCursorY;return o&&(o.endCursorY=x),{...m,endCursorY:x}};if(o&&o.balanceLimit!==null){let m=o.balanceLimit,y=tr(e,n,{...t,columnRegionBottom:m});if(o.stats.placed===0&&o.stats.reusedPages===y.pages.length)return o.balanceLimit=m,s(y)}let d=tr(e,n,l);if(d.pages.length!==1||!d.endsOpenPage)return o&&(o.balanceLimit=null),tr(e,n,t);let c=hg(d.pages[0],r,a),u=c.reduce((m,y)=>m+Math.max(0,y-a),0);if(u<=0)return o&&(o.balanceLimit=null),tr(e,n,t);let f=a+u/r.count,p=Math.max(...c)+.01,g=m=>{try{let y=tr(e,n,{...l,columnRegionBottom:m});return y.pages.length===1&&y.endsOpenPage}catch{return false}};for(let m=0;m<$S&&p-f>WS;m+=1){let y=(f+p)/2;g(y)?p=y:f=y;}let b=tr(e,n,{...t,columnRegionBottom:p});return o&&(o.balanceLimit=p),s(b)}var XS="http://schemas.openxmlformats.org/wordprocessingml/2006/main",VS="http://schemas.microsoft.com/office/word/2010/wordml",YS="http://schemas.microsoft.com/office/word/2012/wordml";function KS(e){if(e.kind!=="textValue"){for(let n of e.attributes)if(n.localName==="val"&&n.namespaceUri===XS)return n.value}}function Ei(e){for(let n of e.children)if(n.kind!=="textValue"&&(n.kind==="contentControlProperties"||n.localName==="sdtPr"))return n}function Zo(e,n){if(e){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function rr(e,n){let t=Zo(e,n);return t?KS(t):void 0}function Pd(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function yg(e){if(!e)return "richText";for(let n of e.children){if(n.kind==="textValue")continue;let t=n.kind,r=n.localName,o=n.namespaceUri;if(t==="contentControlDropDownList"||r==="dropDownList")return "dropdown";if(t==="contentControlComboBox"||r==="comboBox")return "comboBox";if(t==="contentControlDate"||r==="date")return "date";if(r==="picture")return "picture";if(t==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(t==="contentControlCheckbox"||r==="checkbox"&&o===VS)return "checkbox";if(r==="repeatingSection"&&o===YS)return "repeatingSection"}return "richText"}function US(e){let n=(t,r)=>{for(let o of t)if(o.kind!=="textValue"){if(o.kind==="tableRow")return "row";if(o.kind==="tableCell")return "cell";if(o.kind==="paragraph"||o.kind==="table")return "block";if(Ib$1(o)&&r<Hb$1){let a=n(Lb$1(o),r+1);if(a)return a}}return null};return n(Lb$1(e),0)??"inline"}function bg(e){let n=[],t=(r,o)=>{if(r.kind!=="textValue"){if(Ib$1(r)){if(o>=Hb$1)return;let a=Ei(r);n.push([r.id,rr(a,"alias")??"",rr(a,"tag")??"",Pd(rr(a,"lock")),yg(a),Zo(a,"showingPlcHdr")?"1":"0",Zo(a,"dataBinding")?"1":"0"].join(":"));for(let i of Lb$1(r))t(i,o+1);return}for(let a of r.children)t(a,o);}};return t(e.root,0),n.join("|")}function Li(e){if(e.kind==="textValue")return e.value.length;if(e.kind==="tab"||e.kind==="hardBreak")return 1;if(e.kind==="runProperties"||e.kind==="paragraphProperties"||e.kind==="generic")return 0;if(Ib$1(e)){let t=0;for(let r of Lb$1(e))t+=Li(r);return t}let n=0;for(let t of e.children)n+=Li(t);return n}function ZS(e){let n=[],t=(i,l)=>{for(let s of i){if(s.kind==="paragraph"||s.kind==="table"){l.push(s.id);continue}if(Ib$1(s)){t(Lb$1(s),l);continue}(s.kind==="tableRow"||s.kind==="tableCell")&&t(s.children,l);}},r=(i,l,s,d,c)=>{let u=s;for(let f of i)if(!(f.kind==="textValue"||f.kind==="paragraphProperties")){if(Ib$1(f)){if(d>=Hb$1){u+=Li(f);continue}let p=Ei(f),g=Pd(rr(p,"lock")),b=[...c,g],m=u,y=r(Lb$1(f),l,u,d+1,b);n.push({control:f,nestingDepth:d,lockStack:b,level:"inline",paragraphId:l,range:{start:m,end:y},blockIds:[]}),u=y;continue}if(f.kind==="hyperlink"){u=r(f.children,l,u,d,c);continue}u+=Li(f);}return u},o=(i,l,s)=>{for(let d of i){if(d.kind==="textValue")continue;if(d.kind==="paragraph"){r(d.children,d.id,0,l,s);continue}if(d.kind==="table"){for(let m of d.children)m.kind==="tableRow"&&o([m],l,s);continue}if(d.kind==="tableRow"){for(let m of d.children)m.kind==="tableCell"?o(m.children,l,s):Ib$1(m)&&o([m],l,s);continue}if(!Ib$1(d)||l>=Hb$1)continue;let c=Ei(d),u=Pd(rr(c,"lock")),f=[...s,u],p=US(d),g=Lb$1(d);if(p==="inline"){o(g,l+1,f);continue}let b=[];t(g,b),n.push({control:d,nestingDepth:l,lockStack:f,level:p,blockIds:b}),o(g,l+1,f);}},a=e.root.children.find(i=>i.kind==="body");return a&&a.kind!=="textValue"&&o(a.children,0,[]),n}function qS(e,n){let t=new Map,r=new Map,o=s=>{let d=t.get(s.blockId);d?d.push(s):t.set(s.blockId,[s]);},a=s=>{let d=r.get(s.paragraphId);d?d.push(s):r.set(s.paragraphId,[s]);},i=0,l=(s,d)=>{if(d.kind==="paragraph"){o({pageIndex:s,blockId:d.paragraphId,box:d.box});for(let c of d.lines){let u=i;i+=1;let f=Math.max(0,c.box.height-c.leading-(c.trailingSpacing??0));for(let p of c.spans)a({pageIndex:s,paragraphId:p.range.paragraphId,start:p.range.start,end:p.range.end,line:u,box:{x:p.box.x,y:p.box.y+c.leading,width:p.box.width,height:f}});}return}o({pageIndex:s,blockId:d.tableId,box:d.box});for(let c of d.rows)if(!c.isHeaderRepeat)for(let u of c.cells)for(let f of u.blocks)l(s,f);};for(let s of e.pages)for(let d of s.fragments)l(s.index,d);return {blocksById:t,spansByParagraph:r}}function JS(e,n,t){let r=new Map,o=new Set;for(let a of e)if(!o.has(a)){o.add(a);for(let i of n.blocksById.get(a)??[]){let l=r.get(i.pageIndex);l?l.push(i.box):r.set(i.pageIndex,[i.box]);}}return [...r.entries()].sort(([a],[i])=>a-i).flatMap(([a,i])=>{let l=ya(i);return l?[{pageIndex:a,box:l}]:[]})}function QS(e,n,t,r){let o=t.spansByParagraph.get(e)??[],a=new Map,i=0,l=o.length;for(;i<l;){let s=i+(l-i>>1);(n.start===n.end?o[s].end<n.start:o[s].end<=n.start)?i=s+1:l=s;}for(let s=i;s<o.length;s+=1){let d=o[s];if(d.end<=n.start)continue;if(d.start>=n.end)break;let c=a.get(d.line);c?c.boxes.push(d.box):a.set(d.line,{pageIndex:d.pageIndex,boxes:[d.box]});}if(a.size===0&&n.start===n.end)for(let s=i;s<o.length;s+=1){let d=o[s];if(d.start>n.start)break;if(n.start>d.end)continue;let c=d.start===d.end?d.box.x:d.box.x+d.box.width*(n.start-d.start)/Math.max(1,d.end-d.start);return [{pageIndex:d.pageIndex,box:{x:c,y:d.box.y,width:0,height:d.box.height}}]}return [...a.entries()].sort(([s],[d])=>s-d).flatMap(([,s])=>{let d=ya(s.boxes);return d?[{pageIndex:s.pageIndex,box:d}]:[]})}function e0(e,n,t){let r=Ei(e.control),o=rr(r,"alias"),a=rr(r,"tag"),i=e.lockStack[e.lockStack.length-1]??"unlocked",l=e.level==="inline"&&e.paragraphId&&e.range?QS(e.paragraphId,e.range,n):JS(e.blockIds,n);return {id:e.control.id,...o!==void 0?{alias:o}:{},...a!==void 0?{tag:a}:{},controlType:yg(r),lock:i,effectiveLock:Il(e.lockStack),placeholder:Zo(r,"showingPlcHdr")!==void 0,bound:Zo(r,"dataBinding")!==void 0,nestingDepth:e.nestingDepth,level:e.level,fragments:l}}function n0(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];if(r!==o&&(r.pageIndex!==o.pageIndex||r.box.x!==o.box.x||r.box.y!==o.box.y||r.box.width!==o.box.width||r.box.height!==o.box.height))return false}return true}function t0(e,n){return e.id===n.id&&e.alias===n.alias&&e.tag===n.tag&&e.controlType===n.controlType&&e.lock===n.lock&&e.effectiveLock===n.effectiveLock&&e.placeholder===n.placeholder&&e.bound===n.bound&&e.nestingDepth===n.nestingDepth&&e.level===n.level&&n0(e.fragments,n.fragments)}function ki(e,n){if(!e)return n.length===0;if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(!t0(e[t],n[t]))return false;return true}function xg(e,n){return {revision:e.revision,pages:e.pages,...n.contentControls!==void 0?{contentControls:n.contentControls}:{},...n.controlContextToken!==void 0?{controlContextToken:n.controlContextToken}:{}}}function r0(e,n,t=bg(n),r){let o=ZS(n),a=qS(e),i=o.map(u=>e0(u,a)),l=new Map;for(let u of i)for(let f of u.fragments){let p=l.get(f.pageIndex),g={...u,fragments:[f]};p?p.push(g):l.set(f.pageIndex,[g]);}if(e.controlContextToken===t&&ki(e.contentControls,i)&&e.pages.every(u=>ki(u.contentControls,l.get(u.index)??[])))return e;let s=false,d=e.pages.map(u=>{let f=l.get(u.index)??[];return ki(u.contentControls,f)||f.length===0&&!u.contentControls?u:(s=true,{...u,contentControls:f})}),c=s?d:e.pages;return c===e.pages&&e.controlContextToken===t&&ki(e.contentControls,i)?e:{revision:e.revision,pages:c,contentControls:i,controlContextToken:t}}var Pg="Calibri, Carlito, Helvetica, Arial, sans-serif",o0=4096,a0=256;function Sg(e,n){return e===void 0?Math.max(1,Math.floor(n)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function wg(e){let n=new Map,t=0;return {get(r){let o=n.get(r);if(o!==void 0)return n.delete(r),n.set(r,o),o},set(r,o){for(n.has(r)&&n.delete(r),n.set(r,o);n.size>e;){let a=n.keys().next();if(a.done)break;n.delete(a.value),t+=1;}},get size(){return n.size},get evictions(){return t}}}var Rg=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function Ig(e=null){return e!=null&&typeof e.measureText=="function"}function vg(e={}){let n=e.scale??1;if(!(n>0)||!Number.isFinite(n))return null;let t=e.fallbackFamily??Pg,r=e.context??null;if(!Ig(r))return null;let o=r,a=wg(Sg(e.maxWidthEntries,o0)),i=wg(Sg(e.maxMetricsEntries,a0)),l=e.fontAlias,s=c=>{let u=c.fontFamily&&Rg.test(c.fontFamily)?c.fontFamily:null,f=u?l?.(u):void 0,p=f&&Rg.test(f)?f:null,g=u?p?`"${p}", "${u}", ${t}`:`"${u}", ${t}`:t,b=c.bold?"bold":"normal",m=c.italic?"italic":"normal",y=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*n;return `${m} ${b} ${y}px ${g}`},d=(c,u,f)=>c/n*(f.horizontalScalePercent/100)+u.length*f.characterSpacingPt;return {measure(c,u){if(c.length===0)return 0;let f=s(u),p=`${f}\0${c}`,g=a.get(p);if(g!==void 0)return d(g,c,u);o.font=f;let b=o.measureText(c).width;return a.set(p,b),d(b,c,u)},lineMetrics(c){let u=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75),f=s(c),p=i.get(f);if(p)return p;let g=u*1.15,b=u*.8;o.font=f;let m=o.measureText("Hxg"),y=m.fontBoundingBoxAscent,x=m.fontBoundingBoxDescent;if(typeof y=="number"&&Number.isFinite(y)&&y>0&&(b=y/n,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let O=(y+x)/n;O>0&&(g=O);}g>0||(g=u*1.15);let v={height:g,baseline:b};return i.set(f,v),v}}}function i0(e=1,n={}){let t=vg({...n,scale:n.scale??e});return t?{measurer:t,producer:n.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:Ci(),producer:"fixed-measurer"}}function l0(e){return e.box}function Tg(e,n){if(e.kind==="paragraph"){n.add(e.paragraphId);return}for(let t of e.rows)for(let r of t.cells)for(let o of r.blocks)Tg(o,n);}function s0(e){let n=new Map,t=(o,a,i)=>{if(!(o.kind==="textValue"||i>Zd*4)){for(let l of o.children)if(l.kind!=="textValue"){if(l.kind==="paragraph"){for(let s of r)n.get(s)?.push(l.id);t(l,l.id,i+1);continue}if(l.kind==="contentControl"){n.set(l.id,[]),r.push(l.id);let s=he(l);s&&t(s,a,i+1),r.pop();let d=n.get(l.id);d&&d.length===0&&a!==null&&d.push(a);continue}t(l,a,i+1);}}},r=[];return t(e,null,0),n}function d0(e,n){let t=Math.min(e.x,n.x),r=Math.min(e.y,n.y);return {x:t,y:r,width:Math.max(e.x+e.width,n.x+n.width)-t,height:Math.max(e.y+e.height,n.y+n.height)-r}}function c0(e,n){let t=le(e.root);if(t.length===0)return u0;let r=new Map;n.pages.forEach((i,l)=>{(d=>{for(let c of d){let u=new Set;Tg(c,u);for(let f of u){let p=r.get(f)??[];p.push({pageIndex:l,box:l0(c)}),r.set(f,p);}}})(i.fragments);});let o=s0(e.root),a=[];for(let i of t){let l=je$1(i.node),s=[...i.ancestors.map(f=>je$1(f).lock),l.lock],d=o.get(i.node.id)??[],c=new Map;for(let f of d)for(let p of r.get(f)??[]){let g=c.get(p.pageIndex);c.set(p.pageIndex,g?d0(g,p.box):p.box);}let u=[...c.entries()].sort((f,p)=>f[0]-p[0]).map(([f,p])=>({pageIndex:f,...p}));a.push({controlId:i.node.id,type:l.type,level:ke(i.node),depth:i.depth,lock:l.lock,effectiveLock:oe(s),showingPlaceholder:l.showingPlaceholder,temporary:l.temporary,...l.tag===void 0?{}:{tag:l.tag},...l.alias===void 0?{}:{alias:l.alias},...l.id===void 0?{}:{id:l.id},...l.dataBinding===void 0?{}:{dataBinding:l.dataBinding},paragraphIds:d,fragments:u});}return a}var u0=Object.freeze([]);var f0=e=>e.verticalAlign==="baseline"?1:.75;function Bg(e){let n=Math.round(e.fontSizePt*f0(e)*2);return Math.max(1,n)}function p0(e){let{shaper:n,resolveFont:t,fallback:r,shapingLibrary:o,unicodeDataVersion:a,fixedPointScale:i=1e3,script:l="Latn",language:s="en"}=e,d=new Map,c=new Map,u=(p,g)=>`${p.identity}|${Bg(g)}`,f=(p,g,b)=>n.shape({text:p,fontSizeHalfPoints:Bg(b),bidiLevel:0,environment:zt({font:g,variationAxes:{},shapingLibrary:o,unicodeDataVersion:a,normalization:"none",script:l,language:s,direction:"ltr",features:{},fallbackOrder:[],fixedPointScale:i,roundingMode:"halfToEven"})});return {measure(p,g){if(p.length===0)return 0;let b=t(g);if(!b)return r.measure(p,g);let m=`${u(b,g)}|${p}`,y=d.get(m);if(y===void 0){let x=0;try{for(let v of f(p,b,g).glyphs)x+=v.advanceX;}catch{return r.measure(p,g)}y=x/i,d.set(m,y);}return y*(g.horizontalScalePercent/100)+p.length*g.characterSpacingPt},lineMetrics(p){let g=t(p);if(!g)return r.lineMetrics(p);let b=u(g,p),m=c.get(b);if(m)return m;let y;try{let x=f(" ",g,p),v=x.metrics.ascent/i,O=x.metrics.descent/i,_=v+O;y=_>0?{height:_,baseline:v}:r.lineMetrics(p);}catch{y=r.lineMetrics(p);}return c.set(b,y),y}}}function g0(e){let{layout:n,viewport:t}=e,r=new Set;if(!t){for(let s of n.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=t.top+t.height,i=-1,l=-1;for(let s of n.pages){let d=s.box.y;d+s.box.height>=t.top&&d<=a&&(i===-1&&(i=s.index),l=s.index);}if(i===-1){let s=m0(n,t.top);s!==null&&(i=s,l=s);}if(i!==-1){let s=Math.max(0,i-o),d=Math.min(n.pages.length-1,l+o);for(let c=s;c<=d;c+=1)r.add(c);}for(let s of e.pinnedPages??[])s>=0&&s<n.pages.length&&r.add(s);return r}function m0(e,n){let t=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=n<o.box.y?o.box.y-n:n>o.box.y+o.box.height?n-(o.box.y+o.box.height):0;a<r&&(r=a,t=o.index);}return t}var Og=["text-local","paragraph-local","flow-structural","global"];function Cg(e,n){return Og.indexOf(n)>Og.indexOf(e)?n:e}function h0(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function y0(e){let{run:n,currentRevision:t,publish:r,schedule:o}=e,a=null,i=null,l=null,s=0,d=0;function c(m){let y=e.runCooperatively;if(!y)return n(m);let x=y(m);l=x;try{for(;;){let v=x.step();if(v)return v;if(t()!==m.revision)return x.cancel(),d+=1,null;if(l!==x)return null}}finally{l===x&&(l=null);}}function u(m){let y=p(t());y.impact=Cg(y.impact,m.impact),y.structural=y.structural||m.structural;for(let x of m.paragraphIds)y.paragraphIds.add(x);for(let x of m.created)y.created.add(x);for(let x of m.deleted)y.deleted.add(x);for(let x of m.dependencyKeys)y.dependencyKeys.add(x);}let f=m=>({impact:m.impact,paragraphIds:m.paragraphIds,created:m.created,deleted:m.deleted,dependencyKeys:m.dependencyKeys,structural:m.structural,revision:m.revision});function p(m){return a||(a=h0(m)),a.revision=Math.max(a.revision,m),a}function g(){!o||i||(i=o(()=>{i=null,b();}));}function b(){i&&(i(),i=null),l&&(l.cancel(),l=null,d+=1);let m=a;if(!m)return false;a=null;let y=f(m),x=c(y);return !x||x.revision!==t()?(s+=1,u(y),g(),false):(r(x,y),true)}return {notify(m){let y=p(m.toRevision);y.impact=Cg(y.impact,m.impact);for(let x of m.dirty)y.paragraphIds.add(x);for(let x of m.created)y.created.add(x),y.paragraphIds.add(x);for(let x of m.deleted)y.deleted.add(x),y.paragraphIds.add(x);for(let x of m.dependencyKeys)y.dependencyKeys.add(x);for(let x of m.splitJoin)y.structural=true,"split"in x?(y.paragraphIds.add(x.split.from),y.paragraphIds.add(x.split.tail)):(y.paragraphIds.add(x.join.kept),y.paragraphIds.add(x.join.removed));(m.impact==="flow-structural"||m.impact==="global")&&(y.structural=true),g();},invalidateAll(m,y){let x=p(m);x.impact="flow-structural",x.structural=true,y&&x.dependencyKeys.add(y),g();},flush:b,pending:()=>a?f(a):null,cancel(){i?.(),i=null,l?.cancel(),l=null,a=null;},get staleDiscards(){return s},get cancelledRuns(){return d}}}var kg=new WeakMap;function or(e){let n=kg.get(e);if(n)return n;let t=new Map,r=(o,a)=>{let i=l=>{for(let s of l){if(s.kind==="paragraph"){for(let d of s.lines){let c=t.get(d.range.paragraphId),u={line:d,pageIndex:a};c?c.push(u):t.set(d.range.paragraphId,[u]);}continue}for(let d of s.rows)if(!d.isHeaderRepeat)for(let c of d.cells)i(c.blocks);}};i(o);};for(let o of e.pages){for(let a of bn(o))for(let i of a.lines){let l=t.get(i.range.paragraphId),s={line:i,pageIndex:o.index};l?l.push(s):t.set(i.range.paragraphId,[s]);}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)for(let i of a.notes)r(i.fragments,o.index);}return kg.set(e,t),t}function qo(e,n,t){for(let o of e.drawings??[]){if(n===o.start)return o.advanceStart;if(n===o.start+1)return o.advanceEnd}let r=e.contentX;for(let o of e.spans){if(n<=o.range.start)return o.box.x;if(n>=o.range.end){r=o.box.x+o.box.width;continue}return fi(o,n,t)}return r}function b0(e,n,t){let r=or(e).get(n.range.paragraphId)??[],o=false;for(let a of r){if(a.line===n){o=true;continue}if(o&&a.line.range.start===t)return true}return false}function x0(e,n,t){for(let{line:r}of or(e).get(n)??[])if(r.range.start===t&&r.drawings?.some(o=>o.start===t))return r;return null}function S0(e,n){let t=e.deletedRanges;if(t===void 0)return false;for(let r of t)if(n>r.start&&n<r.end)return true;return false}function w0(e,n){for(let t of e.spans)if(!(n<=t.range.start||n>=t.range.end)&&(t.projected||t.text.length!==t.range.end-t.range.start))return true;return false}function Mg(e){let n=e.spans[e.spans.length-1]?.text;return n===`
|
|
9
|
-
`||n===Ub$1}function Ng(e,n,t,r,o,a){for(let i=t.range.start;i<=t.range.end;i+=1)if(!(i===t.range.end&&i>t.range.start&&Mg(t)&&b0(n,t,i))){if(i===t.range.start&&i>o&&e.length>0){let l=e[e.length-1];if(l.position.paragraphId===t.range.paragraphId&&l.position.offset===i)continue}w0(t,i)||S0(t,i)||e.push({position:{paragraphId:t.range.paragraphId,offset:i},x:qo(t,i,a),y:t.box.y,height:t.box.height,lineId:t.id,pageIndex:r});}}function Fg(e,n,t,r,o){for(let a of n){if(a.kind==="paragraph"){for(let i of a.lines)Ng(r,e,i,t,a.range.start,o);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let l of i.cells)Fg(e,l.blocks,t,r,o);}}function Ag(e,n){let t=[];for(let r of e.pages)for(let o of bn(r))for(let a of o.lines)Ng(t,e,a,r.index,o.range.start,n);return t}function R0(e,n,t,r){if(!e.pages[n])return [];let o=[];return Fg(e,t,n,o,r),o}function P0(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function Dg(e,n,t){let r=P0(t),o=or(e).get(n.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?o:[...o].sort((s,d)=>{let c=s.pageIndex===a?0:1,u=d.pageIndex===a?0:1;return c-u}),l=null;for(let{line:s,pageIndex:d}of i){if(n.offset<s.range.start||n.offset>s.range.end)continue;if(n.offset===s.range.end&&n.offset>s.range.start&&Mg(s)){l??={line:s,pageIndex:d};continue}if(n.offset===s.range.end&&n.offset>s.range.start&&x0(e,n.paragraphId,n.offset))continue;let c=Wo(s,n.offset,r.measurer);return {position:n,x:c.x,y:c.y,height:c.height,lineId:s.id,pageIndex:d}}if(l){let s=Wo(l.line,n.offset,r.measurer);return {position:n,x:s.x,y:s.y,height:s.height,lineId:l.line.id,pageIndex:l.pageIndex}}return null}function I0(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return di(e,t,n)?.caret??null}function v0(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return ui(e,t,n)}function T0(e){return Pl(e)}function B0(e,n){let t=zg(e,n);if(!t)return [];let r=[];for(let o of e.pages)for(let a of bn(o))for(let i of a.lines){let l=Mi(e,i,t.from,t.to);if(!l)continue;let s=qo(i,l.start),d=qo(i,l.end);r.push({pageIndex:o.index,x:Math.min(s,d),y:i.box.y,width:Math.abs(d-s),height:i.box.height});}return r}function O0(e,n,t){let r=new Map;if(n.length===0)return r;for(let o of e.pages)if(!(t&&!t.has(o.index)))for(let a of bn(o))for(let i of a.lines)for(let l of n){let s=Mi(e,i,l.from,l.to);if(!s)continue;let d=qo(i,s.start),c=qo(i,s.end),u=r.get(l.key)??[];u.push({pageIndex:o.index,x:Math.min(d,c),y:i.box.y,width:Math.abs(c-d),height:i.box.height}),r.set(l.key,u);}return r}function Mi(e,n,t,r){let o=_g(e),a=o.get(n.range.paragraphId)??-1,i=o.get(t.paragraphId)??-1,l=o.get(r.paragraphId)??-1;if(a<i||a>l)return null;let s=a===i?Math.max(n.range.start,t.offset):n.range.start,d=a===l?Math.min(n.range.end,r.offset):n.range.end;return d>s?{start:s,end:d}:null}var Eg=new WeakMap,Lg=new WeakMap;function Ni(e){let n=Eg.get(e);if(n)return n;let t=new Set,r=[];for(let o of e.pages)for(let a of bn(o))t.has(a.paragraphId)||(t.add(a.paragraphId),r.push(a.paragraphId));return Eg.set(e,r),r}function _g(e){let n=Lg.get(e);if(n)return n;let t=new Map;for(let[r,o]of Ni(e).entries())t.set(o,r);return Lg.set(e,t),t}function zg(e,n){if(n.anchor.paragraphId===n.head.paragraphId)return n.anchor.offset<=n.head.offset?{from:n.anchor,to:n.head}:{from:n.head,to:n.anchor};let t=Ni(e),r=t.indexOf(n.anchor.paragraphId),o=t.indexOf(n.head.paragraphId);return r===-1||o===-1?null:r<o||r===o&&n.anchor.offset<=n.head.offset?{from:n.anchor,to:n.head}:{from:n.head,to:n.anchor}}function Jo(e,n){let t=[],r=new Set;for(let{line:a}of or(e).get(n)??[]){for(let i of a.spans){if(i.range.end===i.range.start)continue;let l=`${i.range.start}:${i.range.end}`;r.has(l)||(r.add(l),t.push({start:i.range.start,text:i.text}));}for(let i of a.drawings??[]){let l=i.start,s=l+1,d=`${l}:${s}`;r.has(d)||(r.add(d),t.push({start:l,text:"\uFFFC"}));}}t.sort((a,i)=>a.start-i.start);let o="";for(let a of t)a.start>o.length&&(o+=" ".repeat(a.start-o.length)),o=o.slice(0,a.start)+a.text;return o}var C0=/[\p{L}\p{N}_'\u2019]/u;function Hg(e,n,t){let r=a=>{let i=e[a];return i!==void 0&&C0.test(i)},o=Math.max(0,Math.min(n,e.length));if(t===-1){for(;o>0&&!r(o-1);)o-=1;for(;o>0&&r(o-1);)o-=1;return o}for(;o<e.length&&!r(o);)o+=1;for(;o<e.length&&r(o);)o+=1;return o}function k0(e,n,t,r=null,o={}){let a=o.stops?[...o.stops]:Ag(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(s=>s.position.paragraphId===n.paragraphId&&s.position.offset===n.offset);if(i===-1)return null;let l=a[i];switch(t){case "left":return {position:a[Math.max(0,i-1)].position,desiredX:null};case "right":return {position:a[Math.min(a.length-1,i+1)].position,desiredX:null};case "lineStart":return {position:a.filter(d=>d.lineId===l.lineId)[0].position,desiredX:null};case "lineEnd":{let s=a.filter(d=>d.lineId===l.lineId);return {position:s[s.length-1].position,desiredX:null}}case "wordLeft":case "wordRight":{let s=Jo(e,n.paragraphId),d=t==="wordLeft"?-1:1,c=Hg(s,n.offset,d);return c===n.offset?{position:a[d===-1?Math.max(0,i-1):Math.min(a.length-1,i+1)].position,desiredX:null}:{position:{paragraphId:n.paragraphId,offset:c},desiredX:null}}case "documentStart":return {position:a[0].position,desiredX:null};case "documentEnd":return {position:a[a.length-1].position,desiredX:null};case "pageUp":case "pageDown":{let s=r??l.x,d=l.pageIndex+(t==="pageUp"?-1:1),c=a.filter(p=>p.pageIndex===d);if(c.length===0)return {position:(t==="pageUp"?a[0]:a[a.length-1]).position,desiredX:s};let u=c[0],f=Number.POSITIVE_INFINITY;for(let p of c){let g=Math.abs(p.y-l.y)*1e3+Math.abs(p.x-s);g<f&&(f=g,u=p);}return {position:u.position,desiredX:s}}case "up":case "down":{let s=r??l.x,d=[];for(let g of a)d.includes(g.lineId)||d.push(g.lineId);let c=d.indexOf(l.lineId),u=t==="up"?c-1:c+1;if(u<0||u>=d.length)return {position:(t==="up"?a[0]:a[a.length-1]).position,desiredX:s};let f=a.filter(g=>g.lineId===d[u]),p=f[0];for(let g of f)Math.abs(g.x-s)<Math.abs(p.x-s)&&(p=g);return {position:p.position,desiredX:s}}default:return null}}function E0(e,n){return Dg(e,n)}function L0(e,n){let t=zg(e,n);if(!t)return [];if(t.from.paragraphId===t.to.paragraphId&&t.from.offset===t.to.offset)return M0(e,t.from);let r=[];if(t.from.paragraphId===t.to.paragraphId){for(let{line:d}of or(e).get(t.from.paragraphId)??[]){let c=Mi(e,d,t.from,t.to);if(c)for(let u of d.spans)u.range.end>c.start&&u.range.start<c.end&&r.push(u);}return r}let o=Ni(e),a=_g(e),i=or(e),l=a.get(t.from.paragraphId)??-1,s=a.get(t.to.paragraphId)??-1;if(l===-1||s===-1)return [];for(let d=l;d<=s;d+=1)for(let{line:c}of i.get(o[d])??[]){let u=Mi(e,c,t.from,t.to);if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&r.push(f);}return r}function M0(e,n){let t=null;for(let{line:r}of or(e).get(n.paragraphId)??[])for(let o of r.spans){if(o.range.start<n.offset&&n.offset<=o.range.end)return [o];t===null&&o.range.start===n.offset&&(t=o);}return t?[t]:[]}var jg=new WeakMap;function Ct(e){let n=jg.get(e);if(n)return n;let t=new Map,r=new Map,o=new Map,a=(l,s)=>{for(let d of l){if(d.kind==="paragraph")continue;let c=d.tableId,u=o.get(c);u||(u=new Map,o.set(c,u),t.set(c,[]),r.set(c,new Map));for(let f of d.rows){let p=u.get(f.id);p===void 0&&(p=u.size,u.set(f.id,p),r.get(c).set(p,f.cells));for(let g of f.cells)t.get(c).push({pageIndex:s,tableId:c,row:f,cell:g,rowIndex:p,isHeaderRepeat:f.isHeaderRepeat}),a(g.blocks,s);}}};for(let l of e.pages)a(l.fragments,l.index);let i=new Map;for(let[l,s]of t)i.set(l,{placed:s,rows:r.get(l)??new Map});return jg.set(e,i),i}function Gg(e){let n=0;for(let t of e.rows.values())for(let r of t)n=Math.max(n,Ot(r).to+1);return n}var Ot=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function N0(e,n,t){if(n.tableId!==t.tableId)return null;let r=Ct(e).get(n.tableId);if(!r)return null;let o=Math.min(n.rowIndex,t.rowIndex),a=Math.max(n.rowIndex,t.rowIndex),i=Math.min(Ot(n).from,Ot(t).from),l=Math.max(Ot(n).to,Ot(t).to),s=p=>{let{from:g,to:b}=Ot(p);return b>=i&&g<=l},d=p=>(r.rows.get(p)??[]).some(g=>g.vMergeContinue&&s(g)),c=r.rows.size+Gg(r)+2;for(let p=0;!(p>c);p+=1){let g=false;for(let[b,m]of r.rows)if(!(b<o||b>a))for(let y of m){if(!s(y))continue;let{from:x,to:v}=Ot(y);x<i&&(i=x,g=true),v>l&&(l=v,g=true);}for(;o>0&&d(o);)o-=1,g=true;for(;d(a+1);)a+=1,g=true;if(!g)break}let u=[],f=new Set;for(let p of r.placed){if(p.isHeaderRepeat||p.rowIndex<o||p.rowIndex>a)continue;let{from:g,to:b}=Ot(p.cell);b<i||g>l||f.has(p.cell.id)||(f.add(p.cell.id),u.push(p.cell.id));}return u.length===0?null:{kind:"cells",tableId:n.tableId,cellIds:u,rows:{from:o,to:a},columns:{from:i,to:l},text:F0(e,n.tableId,u)}}function Fi(e,n){let t=new Set(n),r=[],o=new Set;for(let a of Ct(e).values())for(let i of a.placed)if(!(i.isHeaderRepeat||!t.has(i.cell.id)))for(let l of i.cell.blocks)Qo(l,r,o);return r}function Qo(e,n,t){if(e.kind==="paragraph"){t.has(e.paragraphId)||(t.add(e.paragraphId),n.push(e.paragraphId));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)Qo(a,n,t);}function F0(e,n,t){let r=Fi(e,t),o=r[0],a=r[r.length-1];return !o||!a?A0(e,n):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Jo(e,a).length}}}function A0(e,n){let t=Ct(e).get(n);for(let o of t?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let l of o.cell.blocks)Qo(l,a,new Set);let i=a[0];if(i){let l={paragraphId:i,offset:0};return {anchor:l,head:l}}}for(let o of e.pages)for(let a of bn(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function D0(e,n){let t=new Set(Fi(e,n)),r=[],o=new Set;for(let a of e.pages)for(let i of bn(a))if(t.has(i.paragraphId))for(let l of i.lines)for(let s of l.spans){let d=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(d)||(o.add(d),r.push(s));}return r}function _0(e,n){let t=new Set(n),r=[];for(let o of Ct(e).values())for(let a of o.placed)t.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x,y:a.cell.box.y,width:a.cell.box.width,height:a.cell.box.height});return r}function z0(e,n){let t=Ct(e).get(n.tableId);if(!t)return "";let r=new Set(n.cellIds),o=new Map,a=new Set;for(let i of t.placed){if(i.isHeaderRepeat||!r.has(i.cell.id)||a.has(i.cell.id))continue;a.add(i.cell.id);let l=Fi(e,[i.cell.id]).map(d=>Jo(e,d)).join(`
|
|
10
|
-
`),s=o.get(i.rowIndex);s?s.set(i.cell.gridColumn,l):o.set(i.rowIndex,new Map([[i.cell.gridColumn,l]]));}return [...o.keys()].sort((i,l)=>i-l).map(i=>{let l=o.get(i),s=[];for(let d=n.columns.from;d<=n.columns.to;d+=1)s.push(l.get(d)??"");return s.join(" ")}).join(`
|
|
11
|
-
`)}function Id(e,n){let t=null,r=-1;for(let[o,a]of Ct(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let l=[];for(let d of i.cell.blocks)Qo(d,l,new Set);if(!l.includes(n))continue;let s=o.length;s<=r||(r=s,t={tableId:o,rows:a.rows.size,columns:Gg(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return t}function Ov(e,n,t){if(t){let a=Id(e,n);if(!a||a.tableId!==t.tableId)return null;let i=t.cellIds[0];if(!i)return null;let l=Ct(e).get(t.tableId);if(!l)return null;for(let s of l.placed)if(s.cell.id===i)return {tableId:t.tableId,rowId:s.row.id,cellId:i,cellIds:t.cellIds,gridColumnIndex:s.cell.gridColumn,isHeaderRepeat:s.isHeaderRepeat};return null}let r=Id(e,n);if(!r)return null;let o=Ct(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let l of a.cell.blocks)Qo(l,i,new Set);if(i.includes(n))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}export{ba as $,Qh as $a,Go as $b,rg as $c,ma as A,Ch as Aa,Qa as Ab,xi as Ac,L0 as Ad,rh as B,kh as Ba,ei as Bb,iS as Bc,N0 as Bd,oh as C,Fl as Ca,Bs as Cb,Si as Cc,Fi as Cd,ah as D,Rr as Da,Sf as Db,Np as Dc,D0 as Dd,Sl as E,Dl as Ea,Os as Eb,er as Ec,_0 as Ed,Fc as F,_l as Fa,Zt as Fb,lS as Fc,z0 as Fd,Ac as G,po as Ga,Ln as Gb,Yo as Gc,Id as Gd,Dc as H,Fh as Ha,ri as Hb,Fp as Hc,Ov as Hd,_c as I,Pr as Ia,Do as Ib,Hr as Ic,zc as J,zl as Ja,_f as Jb,Ko as Jc,Hc as K,Gt as Ka,zf as Kb,Ap as Kc,dh as L,_h as La,_o as Lb,dS as Lc,ch as M,zh as Ma,Dr as Mb,Dp as Mc,yr as N,ot as Na,Ds as Nb,ud as Nc,uh as O,Rt as Oa,Gf as Ob,wi as Oc,Rl as P,ou as Pa,mx as Pb,_p as Pc,ao as Q,Ul as Qa,_r as Qb,zp as Qc,bn as R,au as Ra,_s as Rb,Uo as Rc,jc as S,Zl as Sa,zs as Sb,Hp as Sc,Gc as T,iu as Ta,js as Tb,Ri as Tc,J0 as U,at as Ua,Gs as Ub,pd as Uc,mh as V,ql as Va,np as Vb,Vp as Vc,hh as W,$t as Wa,tp as Wb,gd as Wc,Pl as X,Jl as Xa,rp as Xb,md as Xc,ya as Y,it as Ya,Ws as Yb,yd as Yc,Il as Z,ho as Za,oi as Zb,Ii as Zc,Wc as _,Ql as _a,Ks as _b,tg as _c,Hn as a,br as aa,yo as ab,vx as ac,ag as ad,zt as b,Tl as ba,Xn as bb,di as bc,FS as bd,Ic as c,Vc as ca,kn as cb,oP as cc,Bi as cd,cl as d,lo as da,It as db,Tx as dc,Ci as dd,ca as e,Yc as ea,Vn as eb,ui as ec,GS as ed,Qg as f,Sr as fa,ny as fb,fp as fc,Pg as fd,no as g,Kc as ga,es as gb,fi as gc,Ig as gd,em as h,Bl as ha,hu as hb,Wo as hc,vg as hd,nm as i,Ol as ia,Yt as ib,_x as ic,i0 as id,Ae as j,Cl as ja,cy as jb,lP as jc,c0 as jd,km as k,kl as ka,Lw as kb,sP as kc,p0 as kd,Tc as l,rt as la,us as lb,dP as lc,g0 as ld,Xm as m,so as ma,Aa as mb,cP as mc,y0 as md,ua as n,sn as na,Ga as nb,uP as nc,Ag as nd,Ym as o,wt as oa,Ju as ob,mi as oc,R0 as od,Km as p,vh as pa,Nr as pb,wn as pc,Dg as pd,Um as q,El as qa,Rb as qb,ft as qc,I0 as qd,ml as r,wr as ra,Ar as rb,hi as rc,v0 as rd,yl as s,Ll as sa,nf as sb,HP as sc,T0 as sd,Cn as t,Sa as ta,dt as tb,ad as tc,B0 as td,Jm as u,co as ua,Eo as ub,id as uc,O0 as ud,Qm as v,Ml as va,df as vb,ld as vc,Ni as vd,eh as w,Nl as wa,Mo as wb,yi as wc,Jo as wd,ga as x,uo as xa,$a as xb,Nn as xc,Hg as xd,th as y,Bh as ya,hf as yb,Mp as yc,k0 as yd,bl as z,Oh as za,Ja as zb,bi as zc,E0 as zd};
|