@docx-editor.dev/core 2.19.0 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +10 -9
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +8 -9
- package/dist/binding.js +1 -1
- package/dist/chunk-2H4ABRMB.cjs +20 -0
- package/dist/{chunk-YVYEJBLL.cjs → chunk-2HQXLL5L.cjs} +1 -1
- package/dist/chunk-3EZO3O6I.js +4 -0
- package/dist/{chunk-SUEX3CL7.cjs → chunk-44SIVFJT.cjs} +5 -5
- package/dist/chunk-6UCDHGXI.js +1 -0
- package/dist/chunk-7VMVDRRU.js +2 -0
- package/dist/{chunk-4DB7ZFQN.js → chunk-CAIWEQLC.js} +1 -1
- package/dist/{chunk-PBM6WERF.cjs → chunk-CEXC2VHI.cjs} +1 -1
- package/dist/chunk-CF3JR35B.js +11 -0
- package/dist/chunk-D2V4YBWJ.cjs +2 -0
- package/dist/chunk-DGSJZMAE.cjs +11 -0
- package/dist/chunk-EHBPYFRE.js +20 -0
- package/dist/chunk-GSEUM6AI.cjs +1 -0
- package/dist/chunk-H6WDEAOJ.js +18 -0
- package/dist/chunk-I6LSEDUL.cjs +18 -0
- package/dist/{chunk-ZMM5RNM6.js → chunk-IW35GWJN.js} +1 -1
- package/dist/chunk-JRBGCIR2.js +5 -0
- package/dist/chunk-K5HIOS6J.cjs +3 -0
- package/dist/chunk-KLQXP27K.js +3 -0
- package/dist/{chunk-FZ2BIMCY.cjs → chunk-MZFFU66H.cjs} +1 -1
- package/dist/{chunk-2ZEU42EA.js → chunk-MZPNLIP3.js} +1 -1
- package/dist/{chunk-NJONXJJY.cjs → chunk-OA6LFCTG.cjs} +2 -2
- package/dist/{chunk-OODFC5R2.js → chunk-OHVJYJOA.js} +1 -1
- package/dist/{chunk-THCGTV53.js → chunk-P4TGGDK3.js} +1 -1
- package/dist/{chunk-KDYD5TAW.cjs → chunk-PIBYJZIH.cjs} +1 -1
- package/dist/{chunk-CG7CP632.cjs → chunk-WTILOUPG.cjs} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -3
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/modules.d.ts +5 -7
- package/dist/contracts/types.d.ts +1 -562
- package/dist/{custom-node-writes-BqIv94ei.d.ts → custom-node-writes-piokwVR5.d.ts} +2 -2
- package/dist/{document-protection-BL5zp8cU.d.ts → document-protection-C6RvCHx-.d.ts} +1 -1
- package/dist/{editor-WXbTSXx1.d.ts → editor-BgtcHulQ.d.ts} +19 -14
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.d.ts +25 -27
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +12 -13
- package/dist/export.js +1 -1
- package/dist/{font-resolver-BSrKnTeR.d.ts → font-resolver-Bv2Z25-J.d.ts} +1 -1
- package/dist/{headless-document-view-C4ttQJ5H.d.ts → headless-document-view-DHKMN_3Y.d.ts} +2 -2
- package/dist/image-resources-C51LuAAu.d.ts +210 -0
- package/dist/{index-C3As-Xxp.d.ts → index-3lr8xXF8.d.ts} +14 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +17 -18
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-Dqu3JW3p.d.ts → layout-shaping-CKBUSaS7.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +48 -19
- package/dist/layout.js +1 -1
- package/dist/{tree-package-fragment-1pdDnhZ_.d.ts → note-lifecycle-D4AOFCAt.d.ts} +142 -141
- package/dist/{note-properties-RjYgbmXe.d.ts → note-properties-CcXUgqr8.d.ts} +2 -2
- package/dist/{omml-equation-hcP9AUFX.d.ts → omml-equation-C5P6Ym3v.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +7 -7
- package/dist/output.js +1 -1
- package/dist/{protocol-OdRd17KZ.d.ts → protocol-CsawNZkt.d.ts} +14 -4
- package/dist/{review-paragraph-order--jLHXIcd.d.ts → review-paragraph-order-BCIqjopY.d.ts} +2 -3
- package/dist/{revision-projection-BIHO_qvw.d.ts → revision-projection-BcRnC4Yj.d.ts} +1 -1
- package/dist/{semantic-cell-selection-lCYAVCCF.d.ts → semantic-cell-selection-R9wrenwR.d.ts} +4 -4
- package/dist/{semantic-interaction-0vQXcMZk.d.ts → semantic-interaction-B7beVwH7.d.ts} +1 -1
- package/dist/{semantic-paint-BSan4pBk.d.ts → semantic-paint-CLvHwf8y.d.ts} +2 -2
- package/dist/{semantic-records-ZcYuB4-H.d.ts → semantic-records-CbXwnS80.d.ts} +5 -4
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +13 -14
- package/dist/store.js +1 -1
- package/dist/{tree-session-contract-Cgn6fQ-M.d.ts → tree-session-contract-DTQxw2zL.d.ts} +5 -5
- package/dist/{tree-op-types-DbdM7fJV.d.ts → types-barrel-CEOy-Jv0.d.ts} +961 -210
- package/package.json +2 -2
- package/dist/chunk-4KMSEFIG.js +0 -3
- package/dist/chunk-72BDQFHY.js +0 -18
- package/dist/chunk-77DD4EBC.cjs +0 -11
- package/dist/chunk-BEOPUDAB.js +0 -5
- package/dist/chunk-CJCFEXTA.js +0 -11
- package/dist/chunk-DQS4KZUX.js +0 -4
- package/dist/chunk-GUPITGJQ.cjs +0 -2
- package/dist/chunk-LQ6XWTKQ.cjs +0 -18
- package/dist/chunk-MDP5SNK4.cjs +0 -3
- package/dist/chunk-MRPPCGCX.cjs +0 -20
- package/dist/chunk-MSIFK7TJ.js +0 -1
- package/dist/chunk-P6VGDI57.js +0 -2
- package/dist/chunk-QBMAXYN7.js +0 -20
- package/dist/chunk-ZKQX2PNF.cjs +0 -1
- package/dist/review-items-CJz-kAW8.d.ts +0 -370
package/dist/chunk-72BDQFHY.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-VP7SDFCM.js';import {b,c,B}from'./chunk-4KMSEFIG.js';import {m,lg,qd as qd$1,pe,oe,da,I,Ze,g,pa,Xe,Cf as Cf$1,Df as Df$1,Ef as Ef$1,Ff as Ff$1,Gf as Gf$1,Bf as Bf$1,Af as Af$1,sd as sd$1,jd as jd$1,Zc as Zc$1,od as od$1,ed as ed$1,fd as fd$1,cd as cd$1,kd as kd$1,ld as ld$1,hd as hd$1,md as md$1,Va as Va$1,Dc as Dc$1,Td as Td$1,Bb as Bb$1,qb as qb$1,ob as ob$1,Nf as Nf$1,Of as Of$1,rf as rf$1,ze,Gd as Gd$1,id as id$1,gd as gd$1,ud as ud$1,dd as dd$1,Hd as Hd$1,Od as Od$1,la,sc as sc$1,ee,Dd as Dd$1,Ua as Ua$1,na as na$1,ra as ra$1,qe,wd as wd$1,Cd as Cd$1,W,rh,Be,q,L,x,Ga as Ga$1,mb as mb$1,$a as $a$1,ke,le,ka,gb as gb$1,bb as bb$1,nb as nb$1,Fd as Fd$1,a as a$1,ge,xd as xd$1,fb as fb$1,db as db$1,Pf as Pf$1,be,ce,Ud as Ud$1,de,Wd as Wd$1,Pe,hb as hb$1,Sa,$d as $d$1,Zd as Zd$1,ma,E,je as je$1,Ne as Ne$1,kb as kb$1,pb as pb$1,s,Ld as Ld$1}from'./chunk-CJCFEXTA.js';import lT from'bidi-js';var oh=6,ah=14,yE=`fixed:char-width=${oh}:line-height=${ah}`;function Uk(e=oh,t=ah){let n=r=>r.fontSizePt/11;return {measure:(r,o)=>r.length*e*n(o)*(o.horizontalScalePercent/100)+r.length*o.characterSpacingPt,lineMetrics:r=>{let o=r.verticalAlign==="baseline"?1:.75,a=t*n(r)*o;return {height:a,baseline:a*.8}}}}var qk=/^[0-9A-Fa-f]{6}$/;function Iu(e){if(!(e===void 0||e==="auto"||e==="nil")&&qk.test(e))return e.toUpperCase()}function As(e){if(e&&e.val!=="nil")return Iu(e.fill)}function ih(e){if(!e||e.localName!=="shd")return;let t={};for(let n of e.attributes)t[n.localName]=n.value;return As(t)}function lh(e){let t;for(let n of e)n.localName==="shd"&&(t=As(n.attributes));return t}function Ds(e,t,n){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:t,y:r,width:n,height:Math.max(o.y+o.height-r,0)}}var bo="http://schemas.microsoft.com/office/word/2010/wordml",sh=/^[0-9a-f]{6}$/i;function dh(e){if(e.namespaceUri!==bo||e.localName!=="textOutline")return null;let t={localName:"textOutline"},n={};for(let l of e.attributes){if(l.namespaceUri!==bo||!["w","cap","cmpd","algn"].includes(l.localName))return t;n[l.localName]=l.value;}if(n.cmpd!==void 0&&n.cmpd!=="sng"||n.algn!==void 0&&n.algn!=="ctr"||n.cap!==void 0&&!["flat","rnd","sq"].includes(n.cap)||!/^\d{1,8}$/.test(n.w??"")||Number(n.w)>20116800)return t;let r,o=false,a=false,i=false;if(e.children.length>7)return t;for(let l of e.children){if(l.kind==="textValue"){if(l.value.trim())return t;continue}if(l.namespaceUri!==bo)return t;if(l.localName==="solidFill"&&!o&&l.attributes.length===0){if(o=true,l.children.length>3||l.children.some(u=>u.kind==="textValue"&&u.value.trim()))return t;let s=l.children.filter(u=>u.kind!=="textValue");if(s.length!==1)return t;let d=s[0];if(d.namespaceUri!==bo||d.localName!=="srgbClr"||d.children.length!==0||d.attributes.length!==1)return t;let c=d.attributes[0];if(c.namespaceUri!==bo||c.localName!=="val"||!sh.test(c.value))return t;r=c.value.toUpperCase();}else if(l.localName==="prstDash"&&!a){a=true;let s=l.attributes[0];if(l.children.length||l.attributes.length!==1||s?.namespaceUri!==bo||s.localName!=="val"||s.value!=="solid")return t}else if(["round","bevel","miter"].includes(l.localName)&&!i){if(i=true,l.children.length)return t;if(l.localName==="miter"){if(l.attributes.length>1)return t;let s=l.attributes[0];if(s&&(s.namespaceUri!==bo||s.localName!=="lim"||!/^\d{1,8}$/.test(s.value)))return t}else if(l.attributes.length)return t}else return t}return r&&Number(n.w)>0?{localName:"textOutline",attributes:{w:n.w,outlineColor:r}}:t}function ch(e){let t=e.attributes?.w,n=e.attributes?.outlineColor;if(!t||!/^\d{1,8}$/.test(t)||!n||!sh.test(n))return;let r=Number(t);return r>0&&r<=20116800?Object.freeze({widthPt:r/12700,color:n.toUpperCase()}):void 0}var Zk=new Set(["b","bCs","caps","emboss","i","iCs","imprint","outline","shadow","smallCaps","strike","vanish"]);function Hn(e){let t=e.attributes?.val;return t===void 0||!(t==="0"||t==="false"||t==="off")}var uh=new WeakMap;function _s(e){let t=[],n;for(let r of e){let o=r.role==="carried"?uh.get(r.properties):void 0,a;for(let i of r.properties){if(!Zk.has(i.localName)){r.emit&&t.push(i);continue}o||(a||(a=new Map),a.set(i.localName,Hn(i)));}if(o){if(o.size>0){n||(n=new Map);for(let[i,l]of o)n.set(i,l);}continue}if(a){n||(n=new Map);for(let[i,l]of a){let s=n.get(i);r.role==="direct"?n.set(i,{value:l,forced:false}):l?r.role==="defaults"?n.set(i,{value:true,forced:true}):n.set(i,{value:s?.forced===true?true:!(s?.value??false),forced:s?.forced===true}):n.set(i,{value:false,forced:false});}}}if(!n)return t;for(let[r,o]of n)t.push(o.value?{localName:r}:{localName:r,attributes:{val:"0"}});return uh.set(t,n),t}var wn=Object.freeze({fontFamily:null,fontFamilyEastAsia:null,fontSizePt:10,color:null,bold:false,italic:false,underline:null,strike:false,doubleStrike:false,highlight:null,shading:null,verticalAlign:"baseline",baselineShiftPt:0,caps:false,smallCaps:false,characterSpacingPt:0,horizontalScalePercent:100,kerningMinPt:0,hidden:false}),Jk=/^[0-9A-Fa-f]{6}$/;function Gi(e,t=false){return e===void 0||!(t?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function fh(e){return e===void 0||e==="auto"?null:Jk.test(e)?e.toUpperCase():null}var ph={major:null,minor:null,majorEastAsia:null,minorEastAsia:null};function Ne(e,t){let n={...wn},r,o=false;for(let a of e)a.localName==="lang"&&a.attributes?.eastAsia!==void 0&&(r=a.attributes.eastAsia);for(let a of e)switch(a.localName){case "rFonts":{let i=a.attributes;o||=["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(u=>!!i?.[u]);let s=(t?b(i?.asciiTheme,t,r)??b(i?.hAnsiTheme,t,r):null)??i?.ascii??i?.hAnsi;s&&s.length<=128&&(n.fontFamily=s);let c=(t?b(i?.eastAsiaTheme,t,r):null)??i?.eastAsia;c&&c.length<=128&&(n.fontFamilyEastAsia=c);break}case "sz":{let i=Gi(a.attributes?.val);i!==null&&i>0&&(n.fontSizePt=i/2);break}case "color":{n.color=fh(a.attributes?.val);break}case "b":n.bold=Hn(a);break;case "textOutline":n.textOutline=ch(a);break;case "i":n.italic=Hn(a);break;case "u":{let i=a.attributes?.val??"single";n.underline=i==="none"||!Hn(a)?null:{variant:i,color:fh(a.attributes?.color)};break}case "strike":n.strike=Hn(a);break;case "dstrike":n.doubleStrike=Hn(a);break;case "highlight":{let i=a.attributes?.val;n.highlight=i&&i!=="none"?i:null;break}case "shd":{n.shading=As(a.attributes)??null;break}case "vertAlign":{let i=a.attributes?.val;i==="superscript"||i==="subscript"?n.verticalAlign=i:i==="baseline"&&(n.verticalAlign="baseline");break}case "position":{let i=Gi(a.attributes?.val,true);i!==null&&(n.baselineShiftPt=i/2);break}case "caps":n.caps=Hn(a);break;case "smallCaps":n.smallCaps=Hn(a);break;case "spacing":{let i=Gi(a.attributes?.val,true);i!==null&&(n.characterSpacingPt=i/20);break}case "w":{let i=Gi(a.attributes?.val);i!==null&&i>0&&(n.horizontalScalePercent=i);break}case "kern":{let i=Gi(a.attributes?.val);i!==null&&(n.kerningMinPt=i/2);break}case "vanish":n.hidden=Hn(a);break;}return o||(n.fontFamily??=t?.minor??null),n.fontFamilyEastAsia??=t?.minorEastAsia??c(r),n}var mh=new WeakMap;function js(e,t){if(e.fontFamily===t)return e;let n=mh.get(e);n||(n=new Map,mh.set(e,n));let r=n.get(t);return r||(r=Object.freeze({...e,fontFamily:t}),n.set(t,r)),r}function Qt(e,t){return t.caps?e.toUpperCase():e}function Je(e,t,n){return n.measure(Qt(e,t),t)}function gh(e,t){return e.shaping?.script===t.shaping?.script&&e.shaping?.direction===t.shaping?.direction&&e.shaping?.level===t.shaping?.level&&e.shaping?.baseLevel===t.shaping?.baseLevel&&e.shaping?.runDirection===t.shaping?.runDirection&&e.shaping?.wordSpacingPt===t.shaping?.wordSpacingPt&&e.fontFamily===t.fontFamily&&e.fontFamilyEastAsia===t.fontFamilyEastAsia&&e.fontSizePt===t.fontSizePt&&e.color===t.color&&e.textOutline?.widthPt===t.textOutline?.widthPt&&e.textOutline?.color===t.textOutline?.color&&e.bold===t.bold&&e.italic===t.italic&&e.strike===t.strike&&e.doubleStrike===t.doubleStrike&&e.highlight===t.highlight&&e.shading===t.shading&&e.verticalAlign===t.verticalAlign&&e.baselineShiftPt===t.baselineShiftPt&&e.caps===t.caps&&e.smallCaps===t.smallCaps&&e.characterSpacingPt===t.characterSpacingPt&&e.horizontalScalePercent===t.horizontalScalePercent&&e.kerningMinPt===t.kerningMinPt&&e.hidden===t.hidden&&e.underline?.variant===t.underline?.variant&&e.underline?.color===t.underline?.color}function hh(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var IE="und";function OE(){return typeof Intl.Segmenter=="function"}function Qk(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function ev(){let e=new(Qk())("und",{granularity:"grapheme"});return {segment(t){let n=[],r=0;for(let o of e.segment(t)){let a=o.index,i=a+o.segment.length;n.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return n}}}var yh=ev(),Cu=yh,bh=0;function Ws(){return bh}var va=null,xo=null,Hs=null,$i=null;function Ye(e){if(va===e&&xo)return xo;if(Hs===e&&$i){let n=$i;return Hs=va,$i=xo,va=e,xo=n,n}let t=Cu.segment(e);return Hs=va,$i=xo,va=e,xo=t,t}function FE(e){Cu=e,xh();}function CE(){Cu=yh,xh();}function xh(){bh+=1,va=null,xo=null,Hs=null,$i=null,Ou=null,zs=null,Fu=0;}function ME(e){return Ye(e).length}var Ou=null,zs=null,Fu=0;function tv(e){if(Ou===e&&zs)return {offsets:zs,count:Fu};let t=Ye(e),n=new Int32Array(e.length+1);for(let r of t)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)n[o]=r.index;return n[e.length]=t.length,Ou=e,zs=n,Fu=t.length,{offsets:n,count:t.length}}function BE(e,t){let n=Math.max(0,Math.min(t,e.length)),{offsets:r}=tv(e);return r[n]}function LE(e,t){let n=Ye(e);if(n.length===0)return 0;let r=Math.max(0,Math.min(t,n.length));return r>=n.length?e.length:n[r].utf16From}function Sh(e){let t,n=false,r=false;for(let o of e)if(o.localName==="rFonts"&&o.attributes?.hint!==void 0)t=o.attributes.hint;else if(o.localName==="cs"||o.localName==="rtl"){let a=!["0","false","off"].includes(o.attributes?.val??"1");o.localName==="cs"?n=a:r=a;}return t==="eastAsia"&&!n&&!r}function Ph(e,t,n){if(t?.toLowerCase()!=="times new roman")return false;let r,o,a=(i,l)=>((n?b(i,n):null)??l)?.toLowerCase()??null;for(let i of e){if(i.localName!=="rFonts")continue;let l=i.attributes;(l?.asciiTheme!==void 0||l?.ascii!==void 0)&&(r=a(l.asciiTheme,l.ascii)),(l?.hAnsiTheme!==void 0||l?.hAnsi!==void 0)&&(o=a(l.hAnsiTheme,l.hAnsi));}return r==null||o==null?true:r===o}function Mu(e){return e===161||e===164||e>=167&&e<=168||e===170||e===173||e===175||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===215||e===247||e>=688&&e<=767||e>=880&&e<=975||e>=1024&&e<=1279||e>=8192&&e<=8202||e>=8208&&e<=8231||e>=8240&&e<=8287||e>=8304&&e<=8399||e>=8448&&e<=10175||e>=64256&&e<=64284}var ae=(e,t,n)=>e>=t&&e<=n,Vs=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(t){super(`Unsupported Unicode script at U+${t.toString(16).toUpperCase()}`),this.codePoint=t;}},kh=e=>{if(ae(e,65313,65338)||ae(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(ae(e,1424,1535)||ae(e,64285,64335))return {slot:"cs",script:"Hebr"};if(ae(e,1536,1791)||ae(e,1872,1919)||ae(e,2160,2207)||ae(e,2208,2303)||ae(e,64336,65023)||ae(e,65136,65279)||ae(e,126464,126719))return {slot:"cs",script:"Arab"};if(ae(e,4352,4607)||ae(e,11904,12351)||ae(e,12352,12543)||ae(e,12544,12687)||ae(e,12784,12799)||ae(e,13312,19903)||ae(e,19968,40959)||ae(e,44032,55215)||ae(e,63744,64255)||ae(e,65382,65437)||ae(e,65440,65500)||ae(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(ae(e,2304,2431)||ae(e,43232,43263))return {slot:"cs",script:"Deva"};if(ae(e,2432,2559))return {slot:"cs",script:"Beng"};if(ae(e,880,1023)||ae(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(ae(e,1024,1327)||ae(e,7296,7311)||ae(e,11744,11775)||ae(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(ae(e,3584,3711))return {slot:"cs",script:"Thai"};if(ae(e,6016,6143)||ae(e,6624,6655))return {slot:"cs",script:"Khmr"};if(ae(e,768,879)||ae(e,6832,6911)||ae(e,7616,7679)||ae(e,8400,8447)||ae(e,8192,8303)||ae(e,65056,65071)||e<=47||ae(e,58,64)||ae(e,91,96)||ae(e,123,191)||e===5760||ae(e,8192,11263)||ae(e,65024,65039)||ae(e,65280,65381)||ae(e,65438,65439)||ae(e,65501,65535)||ae(e,126976,129791)||ae(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(ae(e,192,687)||ae(e,7424,7551)||ae(e,7552,7615)||ae(e,7680,7935)||ae(e,11360,11391)||ae(e,42784,43007)||ae(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Vs(e)};function nv(e){let t=[];for(let r=0;r<e.length;){let o=e.codePointAt(r),a=r+(o>65535?2:1);t.push({from:r,to:a,classified:kh(o)}),r=a;}let n=null;for(let r of t)r.classified?n=r.classified:n&&(r.classified=n);n=null;for(let r=t.length-1;r>=0;r-=1){let o=t[r];o.classified?n=o.classified:n&&(o.classified=n);}return t}function vh(e,t,n){let r=nv(e),o=[],a=r.every(({from:i})=>e.codePointAt(i)<=127)?"ascii":"hAnsi";for(let i of r){let l=n.levels[t+i.from]??0,s=(l&1)===1?"rtl":"ltr",d=i.classified??{slot:a,script:"Zyyy"},c=o.at(-1);c&&c.to===i.from&&c.bidiLevel===l&&c.slot===d.slot&&c.script===d.script?o[o.length-1]={...c,to:i.to}:o.push({from:i.from,to:i.to,direction:s,bidiLevel:l,script:d.script,slot:d.slot});}return o}function De(e,t){if(t!=="eastAsia")return e;let n=e.fontFamilyEastAsia;return n===null?e:js(e,n)}var Rh=e=>{let t;try{t=kh(e);}catch(n){if(n instanceof Vs)return "base";throw n}return t===null?"common":t.slot==="eastAsia"?"eastAsia":"base"},wh=e=>{for(let t=0;t<e.length;t+=1)if(e.charCodeAt(t)>=128)return false;return true};function Th(e,t=[]){let n=[],r=(p,m,g)=>{let h=n.at(-1);h&&h.segment===p&&h.to===m?n[n.length-1]={segment:p,from:h.from,to:g}:n.push({segment:p,from:m,to:g});},o=null,i=e.some((p,m)=>{if(!t[m]||wh(p))return false;for(let g of p)if(Mu(g.codePointAt(0)))return true;return false})?Ye(e.join("")):null,l=0,s=0,d=false,c=[],u=p=>{for(let m of c)p==="eastAsia"&&!m.ascii&&r(m.segment,m.from,m.to);c.length=0;};for(let p=0;p<e.length;p+=1){let m=e[p],g=s;if(s+=m.length,!i&&wh(m)){/[0-9A-Za-z]/.test(m)&&(u("base"),o="base");continue}for(let h=0;h<m.length;){let b=m.codePointAt(h),x=h+(b>65535?2:1),y=false;if(i){let S=g+h;for(;i[l].utf16To<=S;)l+=1;let T=i[l];b=T.text.codePointAt(0),x=Math.min(m.length,T.utf16To-g),S===T.utf16From&&(d=!!t[p]&&Mu(b)),y=d;}if(y){let S=Rh(b);S!=="common"&&(u(S),o=S),r(p,h,x),h=x;continue}let O=Rh(b);O==="common"?o===null?c.push({segment:p,from:h,to:x,ascii:b<=127}):o==="eastAsia"&&b>127&&r(p,h,x):(u(O),o=O,O==="eastAsia"&&r(p,h,x)),h=x;}}if(n.length<2)return n;n.sort((p,m)=>p.segment-m.segment||p.from-m.from);let f=[n[0]];for(let p=1;p<n.length;p+=1){let m=n[p],g=f[f.length-1];g.segment===m.segment&&m.from<=g.to?m.to>g.to&&(f[f.length-1]={...g,to:m.to}):f.push(m);}return f}function Ih(e,t,n){return Object.freeze({x:e.horizontalFrame==="page"?n.x+e.x-e.horizontalFrameOrigin:t.x+e.x,y:e.verticalFrame==="page"?n.y+e.y-e.verticalFrameOrigin:t.y+e.y})}function wt(e,t=false){return en(e.fragments,t)}var Oh=new WeakMap;function en(e,t=false){let n=Oh.get(e),r=t?"withRepeats":"withoutRepeats",o=n?.[r];if(o)return o;let a=[],i=l=>{for(let s of l){if(s.kind==="paragraph"){a.push(s);continue}for(let d of s.rows)if(!(d.isHeaderRepeat&&!t))for(let c of d.cells)i(c.blocks);}};return i(e),n||(n={},Oh.set(e,n)),n[r]=a,a}function Ch(e){let t=[];for(let n of e.pages)for(let r of wt(n))t.push(...r.lines);return t}function rv(e){return e.anchoredDrawings??[]}var ov=Object.freeze({x:0,y:0,width:0,height:0});function Ta(e){let t=e??ov;return {box:t,origin:Object.freeze({x:t.x,y:t.y})}}var av={fragments:true,anchoredDrawings:true,header:true,footer:true,footnotes:true,endnotes:true},iv=Object.freeze(Object.keys(av));var lv={separator:true,notes:true},sv=Object.freeze(Object.keys(lv));function Fh(e,t,n,r){let o=t.kind??(n==="footnote"?"footnotes":"endnotes");for(let a of sv)switch(a){case "separator":t.separator&&r({page:e,story:"note-separator",host:t.separator,...Ta(t.separator.box),noteScopeId:null,noteAreaKind:o});break;case "notes":for(let i of t.notes)switch(n){case "footnote":r({page:e,story:"footnote",host:i,...Ta(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;case "endnote":r({page:e,story:"endnote",host:i,...Ta(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;}break;}}function dv(e,t){for(let n of iv)switch(n){case "fragments":t({page:e,story:"body",host:e,...Ta(e.contentBox),noteScopeId:null,noteAreaKind:null});break;case "anchoredDrawings":break;case "header":e.header&&t({page:e,story:"header",host:e.header,...Ta(e.header.box),noteScopeId:null,noteAreaKind:null});break;case "footer":e.footer&&t({page:e,story:"footer",host:e.footer,...Ta(e.footer.box),noteScopeId:null,noteAreaKind:null});break;case "footnotes":e.footnotes&&Fh(e,e.footnotes,"footnote",t);break;case "endnotes":e.endnotes&&Fh(e,e.endnotes,"endnote",t);break;}}function cv(e,t){for(let n of e.pages)dv(n,t);}var Mh=16,Bu=Object.freeze({x:0,y:0});function Bh(e,t,n){let r=t.textboxStory?.contentOffset??Bu,o=n??{x:e.x+t.x,y:e.y+t.y};return Object.freeze({x:o.x+r.x,y:o.y+r.y})}function Ia(e,t,n=Bu,r){let o=(i,l)=>{if(i.kind==="table"){for(let s of i.rows)for(let d of s.cells)for(let c of d.blocks)o(c,l);return}for(let s of i.lines)for(let d of s.drawings??[])t(d,{...l,paragraph:i,line:s});},a=(i,l,s,d)=>{if(l>Mh)return;let c={storyOrigin:d,textboxDepth:l,textboxOwner:s[s.length-1]??null,textboxPath:s};for(let u of i.anchoredDrawings??[])t(u,{...c,paragraph:null,line:null}),u.textboxStory&&a(u.textboxStory,l+1,Object.freeze([...s,u]),Bh(d,u,l===0?r?.(u):void 0));for(let u of i.fragments)o(u,c);};a(e,0,Object.freeze([]),n);}function VE(e,t){cv(e,n=>{let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:l}=n,s=o==="header"||o==="footer"?d=>Ih(d,n.origin,{x:r.box.x,y:r.box.y}):void 0;Ia(a,(d,c)=>{let u=d.kind==="anchoredDrawing"&&c.textboxDepth===0&&s?s(d):Object.freeze({x:c.storyOrigin.x+d.x,y:c.storyOrigin.y+d.y}),f=p=>Object.freeze({x:u.x+p.x-d.x,y:u.y+p.y-d.y,width:p.width,height:p.height});t({page:r,story:c.textboxDepth===0?o:"textbox",rootStory:o,noteScopeId:i,noteAreaKind:l,root:n,drawingOrigin:u,absolutePaintBounds:f(d.paintBounds),absoluteHitBounds:f(d.hitBounds),paintLayer:d.kind==="inlineDrawing"?"inline":d.behindDocument?"behind-text":"in-front-of-text",drawing:d,...c});},n.origin,s);});}function Lu(e,t,n=Bu,r){let o=(a,i,l,s)=>{if(!(i>Mh)){for(let d of en(a.fragments,true))t(d,{storyOrigin:s,textboxDepth:i,textboxOwner:l[l.length-1]??null,textboxPath:l});for(let d of a.anchoredDrawings??[])d.textboxStory&&o(d.textboxStory,i+1,Object.freeze([...l,d]),Bh(s,d,i===0?r?.(d):void 0));}};o(e,0,Object.freeze([]),n);}function uv(e,t){let n=[];for(let r of e.pages)for(let o of wt(r))o.paragraphId===t&&n.push(o);return n.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function Gs(e,t,n,r){for(let o of r??Ch(e)){let a=o.range.paragraphId===t?o.range.start:Number.NaN,i=o.range.paragraphId===t?o.range.end:Number.NaN;for(let l of o.spans)l.range.paragraphId===t&&(a=Number.isNaN(a)?l.range.start:Math.min(a,l.range.start),i=Number.isNaN(i)?l.range.end:Math.max(i,l.range.end));for(let l of o.drawings??[])l.paragraphId===t&&(a=Number.isNaN(a)?l.start:Math.min(a,l.start),i=Number.isNaN(i)?l.start+1:Math.max(i,l.start+1));if(!Number.isNaN(a)&&n>=a&&n<=i)return o}return null}function Eu(e){return e.contentControls??[]}function $s(e){if(e.length===0)return null;let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:t,y:n,width:r-t,height:o-n}}function Nu(e){let t=false,n=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(t=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(n=true);return t&&n?"sdtContentLocked":t?"contentLocked":n?"sdtLocked":"unlocked"}var Ks=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});var Lh=new WeakMap,Eh=new WeakMap,Nh=new WeakMap,Ah=new WeakMap;function Dh(e){let t=Ah.get(e);if(t)return t;let n=new Set,r=[];for(let o of wt(e)){for(let a of o.lines)for(let i of Oa(a))n.has(i.paragraphId)||(n.add(i.paragraphId),r.push(i.paragraphId));o.lines.length===0&&!n.has(o.paragraphId)&&(n.add(o.paragraphId),r.push(o.paragraphId));}return Ah.set(e,r),r}function Fa(e){let t=Lh.get(e);if(t)return t;let n=new Set,r=[];for(let o of e.pages)for(let a of Dh(o))n.has(a)||(n.add(a),r.push(a));return Lh.set(e,r),r}function So(e){let t=Eh.get(e);if(t)return t;let n=new Map;for(let[r,o]of Fa(e).entries())n.set(o,r);return Eh.set(e,n),n}function fv(e){let t=Nh.get(e);if(t)return t;let n=new Set,r=[],o=a=>{for(let i of en(a)){for(let l of i.lines)for(let s of Oa(l))n.has(s.paragraphId)||(n.add(s.paragraphId),r.push(s.paragraphId));i.lines.length===0&&!n.has(i.paragraphId)&&(n.add(i.paragraphId),r.push(i.paragraphId));}};for(let a of e.pages){for(let i of Dh(a))n.has(i)||(n.add(i),r.push(i));for(let i of [a.header,a.footer])i&&o(i.fragments);for(let i of [a.footnotes,a.endnotes])if(i){i.separator&&o(i.separator.fragments);for(let l of i.notes)o(l.fragments);}}return Nh.set(e,r),r}var _h=new WeakMap;function Ki(e){let t=_h.get(e);if(t)return t;let n=[...wt(e)];for(let r of [e.header,e.footer])r&&n.push(...en(r.fragments));for(let r of [e.footnotes,e.endnotes])if(r)for(let o of r.notes)n.push(...en(o.fragments));return _h.set(e,n),n}function zh(e,t,n){return e.paragraphId===t&&n>=e.start&&n<e.end}var jh=new WeakMap;function yt(e){let t=jh.get(e);if(t)return t;let n={paragraphId:e.range.paragraphId,start:e.range.start,end:e.range.end,spans:e.spans,drawings:e.drawings??[]},o=e.spans.some(a=>a.range.paragraphId!==e.range.paragraphId)||(e.drawings??[]).some(a=>a.paragraphId!==e.range.paragraphId)?mv(e):[n];return jh.set(e,o),o}function Oa(e){let t=yt(e);if(t.length<2||!e.spans.some(o=>o.style.shaping))return t;let n=new Map(t.map(o=>[o.paragraphId,o])),r=[];for(let o of e.spans){let a=n.get(o.range.paragraphId);a&&(r.push(a),n.delete(a.paragraphId));}return [...r,...n.values()]}function mv(e){let t=[...e.spans.map((r,o)=>({paragraphId:r.range.paragraphId,x:r.box?.x??o,order:o*2+1})),...(e.drawings??[]).map((r,o)=>({paragraphId:r.paragraphId,x:r.advanceStart??r.x??e.spans.length+o,order:o*2}))].sort((r,o)=>r.x-o.x||r.order-o.order),n=[];for(let r of t)n.includes(r.paragraphId)||n.push(r.paragraphId);return n.map(r=>{let o=e.spans.filter(c=>c.range.paragraphId===r),a=(e.drawings??[]).filter(c=>c.paragraphId===r),i=[...o.map(c=>c.range.start),...a.map(c=>c.start)],l=[...o.map(c=>c.range.end),...a.map(c=>c.start+1)],s=i[0],d=l[0];for(let c=1;c<i.length;c+=1)i[c]<s&&(s=i[c]),l[c]>d&&(d=l[c]);return {paragraphId:r,start:s,end:d,spans:o,drawings:a}})}function fr(e,t){return yt(e).find(n=>n.paragraphId===t)??null}function Po(e,t,n,r,o=So(e)){if(n.paragraphId===r.paragraphId){if(t.paragraphId!==n.paragraphId)return null;let c=Math.max(t.start,n.offset),u=Math.min(t.end,r.offset);return u>c?{start:c,end:u}:null}let a=o.get(t.paragraphId),i=o.get(n.paragraphId),l=o.get(r.paragraphId);if(a===void 0||i===void 0||l===void 0||a<i||a>l)return null;let s=a===i?Math.max(t.start,n.offset):t.start,d=a===l?Math.min(t.end,r.offset):t.end;return d>s?{start:s,end:d}:null}function tN(e,t){for(let n of e.pages)for(let r of wt(n)){let o=Ca(r).indexOf(t);if(o>0)return Ca(r).slice(0,o).reverse()}return []}var Hh=new WeakMap;function Ca(e){let t=Hh.get(e);if(t)return t;let n=[];for(let r of e.lines??[])for(let o of Oa(r))n.includes(o.paragraphId)||n.push(o.paragraphId);return n.includes(e.paragraphId)||n.push(e.paragraphId),Hh.set(e,n),n}function pv(e,t){let n=Ca(e);if(n.length===1)return n[0]===t?{start:e.range.start,end:e.range.end}:null;let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let a of e.lines??[]){let i=fr(a,t);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function mr(e,t,n){let r=pv(e,t);return r!==null&&n>=r.start&&n<r.end}function nN(e,t){for(let n of e.pages)for(let r of Ki(n))if(r.paragraphId===t)return r;for(let n of e.pages)for(let r of Ki(n))if(Ca(r).includes(t))return r;return null}function Wh(e,t){return t?{...e,range:{paragraphId:t.paragraphId,start:t.start,end:t.end},spans:t.spans,drawings:t.drawings}:e}var oN=64,aN=64,gv=[{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 Lr(e){if(!Number.isFinite(e))return 1;let t=Math.trunc(e);return t<0?1:t>9999?9999:t}function Ro(e){return String(Lr(e))}function hv(e){let t=Lr(e);return t<10?`0${t}`:String(t)}function Vh(e){let t=Lr(e);t>3999&&(t=3999);let n="";for(let{value:r,glyph:o}of gv)for(;t>=r;)if(n+=o,t-=r,n.length>=64)return n.slice(0,64);return n||"I"}function yv(e){return Vh(e).toLowerCase()}function Gh(e){let t=Lr(e),n="";for(;t>0&&n.length<8;)t-=1,n=String.fromCharCode(65+t%26)+n,t=Math.floor(t/26);return n||"A"}function bv(e){return Gh(e).toLowerCase()}function xv(e){let t=Lr(e),n=t%100,r=t%10,o=n>=11&&n<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${t}${o}`}function Sv(e){return Lr(e).toString(16).toUpperCase()}function Pv(e){let t=["*","\u2020","\u2021","\xA7"],n=Lr(e);if(n<=0)return t[0];let r=(n-1)%t.length,o=Math.min(Math.floor((n-1)/t.length)+1,Rv);return t[r].repeat(o)}var Rv=8,Xs=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],wv=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Ys(e){let t=Lr(e);if(t<20)return Xs[t];if(t<100){let r=t%10;return wv[Math.floor(t/10)]+(r===0?"":`-${Xs[r]}`)}if(t<1e3){let r=t%100;return `${Xs[Math.floor(t/100)]} hundred${r===0?"":` ${Ys(r)}`}`}let n=t%1e3;return `${Xs[Math.floor(t/1e3)]} thousand${n===0?"":` ${Ys(n)}`}`}function $h(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function kv(e){return $h(Ys(e))}var vv=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function Tv(e){let t=vv.get(e);return t!==void 0?t:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function Iv(e){let t=Ys(e),n=Math.max(t.lastIndexOf(" "),t.lastIndexOf("-")),r=n<0?"":t.slice(0,n+1);return $h(r+Tv(t.slice(n+1)))}function zn(e,t){switch(e){case "decimal":return Ro(t);case "decimalZero":return hv(t);case "upperRoman":return Vh(t);case "lowerRoman":return yv(t);case "upperLetter":return Gh(t);case "lowerLetter":return bv(t);case "ordinal":return xv(t);case "cardinalText":return kv(t);case "ordinalText":return Iv(t);case "hex":return Sv(t);case "chicago":return Pv(t);case "numberInDash":return `- ${Ro(t)} -`;case "none":case "bullet":return "";default:return Ro(t)}}function Au(e,t,n){let r=e.length>64?e.slice(0,64):e,o="";for(let a=0;a<r.length&&!(o.length>=64);a+=1){let i=r[a];if(i==="%"&&a+1<r.length){let l=r[a+1];if(l>="1"&&l<="9"){let s=Number(l)-1,d=n[s]??"decimal",c=t[s]??1,u=d==="bullet"?"":zn(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}var Kh=4096,Ht=64,Hu=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),Xh=/\s*\\\*\s*MERGEFORMAT\s*$/i;function wo(e){if(e.length>oe)return null;let t=e.replace(/\s+/g," ").trim().toUpperCase();return t.length>oe?null:t.replace(Xh,"").trim()}var Ov=/\s*\\#\s*(?:"([^"]*)"|([^\\"]+))$/;function Fv(e){if(e.length>oe)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>oe)return null;let n=t.replace(Xh,"").trim(),r=Ov.exec(n);if(!r)return {keyword:n.toUpperCase(),picture:void 0};let o=r[1]??r[2]??"";return {keyword:n.slice(0,r.index).trim().toUpperCase(),picture:o.length>0?o:void 0}}function Ma(e){let t=Fv(e);if(t===null)return null;let{keyword:n,picture:r}=t;return n!=="PAGE"&&n!=="NUMPAGES"&&n!=="SECTIONPAGES"?null:r===void 0?{kind:n}:{kind:n,picture:r}}function Er(e){return Ma(e)?.kind??null}function kt(e,t){return be(e,t)}function pr(e){return ce(e)}function gr(){return {nodes:0,exhausted:false}}function lt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>Kh?(e.exhausted=true,false):true)}function ko(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function Xi(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="idle",e.inner.length=0;}function Ba(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function Cv(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function vo(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="instruction",e.inner.length=0),e.nesting+=1,e.nesting>pe?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function La(e){return e.nesting<2||e.nesting>pe?null:e.inner[e.nesting-2]??null}function Yh(e){if(e.nesting===1)return e.phase==="instruction";let t=La(e);return t!==null&&!t.separated}function _u(e,t){if(!Yh(e))return false;if(e.nesting===1)return t?!e.deletedInstructionOverflow:!e.instructionOverflow;let n=La(e);return t?!n.deletedOverflow:!n.overflow}function Uh(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let t=La(e);t&&(t.sawLive=true);}function ju(e,t){if(e.nesting===1){t?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let n=La(e);n&&(t?(n.deletedOverflow=true,n.deletedInstruction=""):(n.overflow=true,n.instruction=""));}function Du(e){ju(e,false),ju(e,true);}function Mv(e,t,n=false){if(!_u(e,n))return;let r=La(e);n||Uh(e);let o=r?n?r.deletedInstruction:r.instruction:n?e.deletedInstruction:e.instruction;if(o.length+t.length>oe){ju(e,n);return}r?n?r.deletedInstruction=o+t:r.instruction=o+t:n?e.deletedInstruction=o+t:e.instruction=o+t;}function To(e,t,n,r){if(!Yh(e))return;let o=de(t);if(o||Uh(e),!_u(e,o))return;if(r>Ht){Du(e);return}let a=[],i=t.kind==="textValue"?[]:t.children??[];for(let l=i.length-1;l>=0;l-=1)a.push({node:i[l],depth:r+1});for(;a.length>0;){let l=a.pop();if(!lt(n)){Du(e);return}if(l.depth>Ht){Du(e);return}if(l.node.kind==="textValue"){if(Mv(e,l.node.value,o),!_u(e,o))return;continue}let s=l.node.children??[];for(let d=s.length-1;d>=0;d-=1)a.push({node:s[d],depth:l.depth+1});}}function Io(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=Ba(e);return r.overflow?null:Ma(r.instruction)}let t=La(e);if(!t||t.separated)return null;t.separated=true;let n=Cv(t);return n.overflow?null:Ma(n.instruction)}function Oo(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&Xi(e);}function qh(e){return e.phase==="instruction"&&e.nesting>=1}function Zh(e){return e.phase==="result"&&e.nesting>=1}function zu(e){let t=false,n=false,r=false,o=gr(),a=ko(),i=()=>t&&n&&r,l=p=>{p==="PAGE"?t=true:p==="NUMPAGES"?n=true:r=true;},s=false,d=[],c=(p,m)=>{if(p.kind!=="runProperties"){if(kt(p,"begin")){vo(a),a.nestingOverflow&&(s=true);return}if(pr(p)){To(a,p,o,m);return}if(kt(p,"separate")){let g=a.nesting,h=a.phase,b=Io(a);if(s)return;b&&(g<=1||h==="result")&&d.push(b.kind);return}if(kt(p,"end")&&(Oo(a),a.nesting===0)){if(!s)for(let g of d)l(g);d.length=0;}}},u=(p,m)=>{if(p.kind==="run")for(let g of p.children){if(!lt(o))return;if(c(g,m+1),(g.kind==="drawing"||g.kind==="generic")&&!pr(g)&&"children"in g&&g.children.length>0){let h={...a,inner:a.inner.map(y=>({...y}))},b=s,x=d;d=[],f(g,m+1),Object.assign(a,h),s=b,d=x;}if(i()||o.exhausted)return}},f=(p,m)=>{if(!i()&<(o)&&!(m>Ht)&&p.kind!=="textValue"){if(p.kind==="paragraph"){Xi(a),s=false,d.length=0;for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return;Xi(a),s=false,d.length=0;return}if(p.kind==="run"){u(p,m);return}if(ee(p)){let g=Er(ge(p)??"");if(g){l(g);return}}for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return}};return f(e,0),!t&&!n&&!r?Hu:{hasPage:t,hasNumPages:n,hasSectionPages:r}}function Us(e,t){if(!Number.isFinite(e)||e<0||t.length===0||t.length>64||t.includes(".")||t.includes(";")||t.includes("'"))return null;let n=String(Math.floor(e)),r=[],o=false;for(let m=0;m<t.length;m+=1)r.push(o),t[m]==="0"&&(o=true);let a=n.length,i=false,l=0,s=0,d=[],c=-1;for(let m=t.length-1;m>=0;m-=1){let g=t[m];if(g==="0"||g==="#"){i=true,l+=1,c=d.length,a>0?(a-=1,d.push(n[a])):d.push(g==="0"?"0":" ");continue}if(g===","){s===0&&(s=l),l=0,(a>0||r[m])&&(c=d.length,d.push(","));continue}d.push(g);}if(!i)return null;let u=[];for(;a>0;)s>0&&l>=s&&(u.push(","),l=0),a-=1,l+=1,u.push(n[a]);let f=d.slice(c+1).reverse().join(""),p=d.slice(0,c+1).reverse().join("");return f+u.reverse().join("")+p}function kn(e){return "outOfFlow"in e&&e.outOfFlow===true}var Ea="0";function Nr(e,t){return e!=="PAGE"||!t||t==="decimal"}function qs(e,t,n){return t===void 0||!Nr(e,n)?Ea:Us(0,t)??Ea}function Gu(e,t){if(!Number.isFinite(e)||e<0)return "";let n=Math.floor(e),r=t&&t.length>0?t:"decimal";if(r==="none"||r==="bullet")return Ro(n);let o=zn(r,n);return o.length>0?o:Ro(n)}function hr(e,t,n){if(e==="PAGE"){if(n!==void 0&&Nr(e,t.format)){let o=Us(t.pageNumber,n);if(o!==null)return o}return Gu(t.pageNumber,t.format)}let r=e==="NUMPAGES"?t.pageCount:t.sectionPageCount??t.pageCount;if(!Number.isFinite(r)||r<0)return "";if(n!==void 0){let o=Us(r,n);if(o!==null)return o}return Ro(Math.floor(r))}function Ar(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function $u(e,t=Hu){if(!e||!Ar(t))return "";let n=[];return t.hasPage&&(n.push(`p${e.pageNumber}`),e.format&&n.push(`f${e.format}`)),t.hasNumPages&&n.push(`n${e.pageCount}`),t.hasSectionPages&&n.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${n.join("/")}`}function Aa(e,t,n,r){let o=false,a=e.map((i,l)=>{let s=t+l,d=i.pageFieldSource;return d&&d.pageNumber===s&&d.sectionPageCount===n&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:s,sectionPageCount:n,...r?{format:r}:{}}})});return o?a:e}function Bv(e){for(let t of e.spans)if(t.fieldAtom?.pageField||t.fieldAtom?.pageRef)return true;return false}function Qh(e){if(e.kind==="paragraph"){for(let t of e.lines)if(Bv(t))return true;return false}for(let t of e.rows)for(let n of t.cells)for(let r of n.blocks)if(Qh(r))return true;return false}function Ku(e,t){let n=t,r=false;for(let o of e)kn(o)||(n=Math.max(n,o.box.y+o.box.height)),!r&&Qh(o)&&(r=true);return {usedBottom:n,hasBodyPageFields:r}}var Wu=new WeakMap;function Lv(e,t,n,r){let o=Wu.get(e);if(o)return t.length>0&&n!==t&&o.revision===r?(Wu.delete(e),false):true;let a=t.length===0||t===n;return a&&Number.isFinite(r)&&Wu.set(e,{revision:r}),a}function ey(e,t){if(e.kind==="paragraph"){for(let n of e.lines)for(let r of n.spans){let o=r.fieldAtom?.pageRef?.targetParagraphId;o!==void 0&&t.add(o);}return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)ey(o,t);}function ty(e,t,n,r){if(e.kind==="paragraph"){t.has(e.paragraphId)&&!r.has(e.paragraphId)&&r.set(e.paragraphId,n);return}for(let o of e.rows)for(let a of o.cells)for(let i of a.blocks)ty(i,t,n,r);}var Jh=new WeakMap;function ny(e){let t=Jh.get(e);if(t!==void 0)return t;let n=Ev(e);return Jh.set(e,n),n}function Ev(e){let t=null;for(let o of e)if(o.hasBodyPageFields!==false)for(let a of o.fragments)ey(a,t??=new Set);if(!t||t.size===0)return null;let n=new Map;for(let o of e){if(n.size>=t.size)break;let a=o.pageFieldSource,i={pageNumber:a?.pageNumber??o.index+1,...a?.format?{format:a.format}:{}};for(let l of o.fragments)ty(l,t,i,n);}let r="";for(let[o,a]of n)r+=`${o}@${a.pageNumber}/${a.format??""};`;return {hosts:n,token:r}}function Xu(e){return ny(e)?.token??""}function Nv(e,t,n){let r=null;for(let o=0;o<e.spans.length;o+=1){let a=e.spans[o],i=a.fieldAtom?.pageRef;if(i){let d=n?.hosts.get(i.targetParagraphId);if(!d)continue;let c=Gu(d.pageNumber,d.format);if(c.length===0)continue;let f=Lv(i.calibration,i.cached,c,n.revision)?c:i.cached;if(f.length===0||f===a.text)continue;r||(r=e.spans.slice()),r[o]={...a,text:f};continue}let l=a.fieldAtom?.pageField;if(!l)continue;let s=hr(l.kind,t,l.picture);s!==a.text&&(r||(r=e.spans.slice()),r[o]={...a,text:s});}return r?{...e,spans:r}:e}function ry(e,t,n){let r=null;for(let o=0;o<e.length;o+=1){let a=e[o],i=a;if(a.kind==="paragraph"){let l=null;for(let s=0;s<a.lines.length;s+=1){let d=a.lines[s],c=Nv(d,t,n);c!==d&&(l||(l=a.lines.slice()),l[s]=c);}l&&(i={...a,lines:l});}else {let l=null;for(let s=0;s<a.rows.length;s+=1){let d=a.rows[s],c=null;for(let u=0;u<d.cells.length;u+=1){let f=d.cells[u],p=ry(f.blocks,t,n);p!==f.blocks&&(c||(c=d.cells.slice()),c[u]={...f,blocks:p});}c&&(l||(l=a.rows.slice()),l[s]={...d,cells:c});}l&&(i={...a,rows:l});}i!==a&&(r||(r=e.slice()),r[o]=i);}return r??e}var Na=new WeakMap;function hN(e){for(let t of Array.isArray(e.pages)?e.pages:[])t.header&&Na.delete(t.header),t.footer&&Na.delete(t.footer);}function Av(e,t){return e.pageNumber===t.pageNumber&&e.pageCount===t.pageCount&&(e.sectionPageCount??e.pageCount)===(t.sectionPageCount??t.pageCount)&&e.format===t.format}function Yu(e,t,n){let r=Na.get(e);r&&Na.set(t,{context:r.context,projector:r.projector,dy:r.dy+n});}var Vu=new WeakMap;function Dr(e){let t=e.pages.length;if(t===0)return e;let n=ny(e.pages),r=n?.token??"",o=false,a=e.pages.map(i=>{let l=Vu.get(i);if(l&&l.pageCount===t&&l.pageRefToken===r)return l.result!==i&&(o=true),l.result;let s=i.pageFieldSource,d={pageNumber:s?.pageNumber??i.index+1,pageCount:t,sectionPageCount:s?.sectionPageCount??t,...s?.format?{format:s.format}:{}},c=g=>{if(!g)return g;let h=g.pageFieldProjector,b=0;if(!h){let k=Na.get(g);if(!k||Av(k.context,d))return g;h=k.projector,b=k.dy;}o=true;let x=h(d),{pageFieldProjector:y,box:O,...S}=x,T={...S,box:b===0?O:{...O,y:O.y+b}};return Na.set(T,{context:d,projector:h,dy:b}),T},u=c(i.header),f=c(i.footer),p=i.hasBodyPageFields===false?i.fragments:ry(i.fragments,d,n?{hosts:n.hosts,revision:e.revision}:void 0);if(u===i.header&&f===i.footer&&p===i.fragments)return Vu.set(i,{pageCount:t,pageRefToken:r,result:i}),i;p!==i.fragments&&(o=true);let m={...i,...u!==void 0?{header:u}:{},...f!==void 0?{footer:f}:{},...p!==i.fragments?{fragments:p}:{}};return Vu.set(i,{pageCount:t,pageRefToken:r,result:m}),m});return o?{...e,pages:a}:e}function Dv(e){let t=e.toUpperCase(),n=e[0]===e[0]?.toUpperCase();switch(t){case "ARABIC":return "decimal";case "ALPHABETIC":return n?"upperLetter":"lowerLetter";case "ROMAN":return n?"upperRoman":"lowerRoman";case "ORDINAL":return "ordinal";case "CARDTEXT":return "cardinalText";case "ORDTEXT":return "ordinalText";case "HEX":return "hex";default:return null}}function Fo(e){if(wo(e)===null)return null;let n=e.replace(/\s+/g," ").trim().split(" "),r=n[0]?.toUpperCase();if(r!=="AUTONUM"&&r!=="AUTONUMLGL"&&r!=="AUTONUMOUT")return null;let o=null,a=false;for(let i=1;i<n.length;i+=1){let s=n[i].toUpperCase();if(s==="\\E"){a=true;continue}if(s==="\\*"){let d=n[i+1];if(d===void 0)return null;if(i+=1,d.toUpperCase()==="MERGEFORMAT")continue;if(o=Dv(d),o===null)return null;continue}return null}return {kind:r,numFmt:o,suppressPeriod:a}}function oy(e,t){let n=zn(e.numFmt??"decimal",t);return n.length===0?"":e.suppressPeriod?n:`${n}.`}var Uu=256,_v=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:false}),jv=Object.freeze({suppressNonDelimiterText:true,noteRef:false,pageRef:false}),Hv=Object.freeze({suppressNonDelimiterText:false,noteRef:true,pageRef:false}),zv=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:true}),Zs=new WeakMap;function vn(e){return Zs.get(e)??_v}function Wv(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "){n+=1;continue}if(r==='"'){let a=e.indexOf('"',n+1);if(a===-1)return null;t.push(e.slice(n+1,a)),n=a+1;continue}let o=n;for(;o<e.length&&e[o]!==" ";)o+=1;t.push(e.slice(n,o)),n=o;}return t}function _r(e){if(e.length>oe)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>oe)return null;let n=Wv(t);if(n===null||n.length<2)return null;let r=n[0].toUpperCase();if(r!=="REF"&&r!=="NOTEREF"&&r!=="PAGEREF")return null;let o=n[1];if(o.length===0||o.length>Uu||o.startsWith("\\"))return null;if(r==="NOTEREF")return Vv(n,o);if(r==="PAGEREF")return Gv(n,o);let a=false,i=false,l=false,s=false,d=false;for(let f=2;f<n.length;f+=1){let p=n[f].toUpperCase();if(p==="\\R")i=true;else if(p==="\\W")l=true;else if(p==="\\N")a=true;else if(p==="\\T")s=true;else if(p==="\\H")d=true;else if(p==="\\*"&&n[f+1]?.toUpperCase()==="MERGEFORMAT")f+=1;else {if(p==="\\*MERGEFORMAT")continue;return null}}let u={bookmark:o,numberSwitch:a?"n":i?"r":l?"w":null,hyperlink:d};return s&&Zs.set(u,jv),u}function Vv(e,t){let n=false;for(let o=2;o<e.length;o+=1){let a=e[o].toUpperCase();if(a==="\\H")n=true;else if(a==="\\*"&&e[o+1]?.toUpperCase()==="MERGEFORMAT")o+=1;else {if(a==="\\*MERGEFORMAT")continue;return null}}let r={bookmark:t,numberSwitch:null,hyperlink:n};return Zs.set(r,Hv),r}function Gv(e,t){let n=false;for(let o=2;o<e.length;o+=1){let a=e[o].toUpperCase();if(a==="\\H")n=true;else if(a==="\\*"&&e[o+1]?.toUpperCase()==="MERGEFORMAT")o+=1;else {if(a==="\\*MERGEFORMAT")continue;return null}}let r={bookmark:t,numberSwitch:null,hyperlink:n};return Zs.set(r,zv),r}var _e="all-markup",Qs=class{#e;constructor(t){this.#e=new Set(t),Object.freeze(this);}get size(){return this.#e.size}has(t){return this.#e.has(t)}forEach(t,n){this.#e.forEach(r=>t.call(n,r,r,this));}entries(){return this.#e.entries()}keys(){return this.#e.keys()}values(){return this.#e.values()}union(t){let n=new Set(this.#e),r=t.keys(),o=r.next();for(;!o.done;)n.add(o.value),o=r.next();return n}intersection(t){let n=new Set;for(let r of this.#e)t.has(r)&&n.add(r);return n}difference(t){let n=new Set;for(let r of this.#e)t.has(r)||n.add(r);return n}symmetricDifference(t){let n=new Set(this.#e),r=t.keys(),o=r.next();for(;!o.done;){let a=o.value;this.#e.has(a)?n.delete(a):n.add(a),o=r.next();}return n}isSubsetOf(t){if(this.size>t.size)return false;for(let n of this.#e)if(!t.has(n))return false;return true}isSupersetOf(t){if(this.size<t.size)return false;let n=t.keys(),r=n.next();for(;!r.done;){if(!this.#e.has(r.value))return false;r=n.next();}return true}isDisjointFrom(t){for(let n of this.#e)if(t.has(n))return false;return true}[Symbol.iterator](){return this.#e[Symbol.iterator]()}},kN=new Qs([]);function vN(e){let t=new Set;for(let o of e)t.add(o);if(t.size===0)return;let n=[...t].sort(),r=new Qs(n);return Object.freeze({hiddenAuthors:r,includes:o=>!r.has(o.author),includesNode:(o,a)=>!r.has(a),cacheKey:JSON.stringify(n)})}function Da(e,t){return e.includes?.(t)??iy(e,t.nodeId,t.author)}function iy(e,t,n){return e.includesNode?.(t,n)??!e.hiddenAuthors.has(n)}function Yi(e,t,n){return Da(e,t)?n:e.excludedNodeMode?.(t.nodeId,t.author)??"proposed"}function ly(e,t,n,r){return iy(e,t,n)?r:e.excludedNodeMode?.(t,n)??"proposed"}var br=Object.freeze([]),$v=32,Kv={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function yr(e,t){for(let n of e.attributes)if(n.localName===t&&n.namespaceUri===e.namespaceUri&&(n.kind==="wmlVal"||n.kind==="genericExtension"||n.kind==="xmlSpace"))return n.value}function tn(e){if(e.kind==="textValue")return null;let t=Kv[e.kind];if(t===void 0)return null;let n=yr(e,"date");return {kind:t,id:yr(e,"id")??"",author:yr(e,"author")??"",...n===void 0?{}:{date:n},nodeId:e.id}}function fn(e,t){return e.length===0?[t]:[...e,t]}function Xt(e){return e.kind!=="textValue"&&ka(e.kind)}var td=$v;function je(e,t,n){if(e.length===0||t==="all-markup"&&!n)return true;for(let r of e){let o=n?Yi(n,r,t):t;if(o==="all-markup")continue;if(o==="proposed"?r.kind==="delete"||r.kind==="moveFrom":r.kind==="insert"||r.kind==="moveTo")return false}return true}function qu(e,t,n){if(!n&&t==="all-markup")return e;if(!je(e,t,n))return null;if(!n)return e;let r=e.filter(o=>Da(n,o));return r.length===0?br:r}function ay(e,t,n){return t==="all-markup"&&(!n||Da(n,e))}function Xv(e,t){return t?e.filter(n=>{if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")return true;let r="revisionNodeId"in n&&typeof n.revisionNodeId=="string"?n.revisionNodeId:"";return Da(t,{kind:"format",id:n.attributes?.id??"",author:n.attributes?.author??"",...n.attributes?.date===void 0?{}:{date:n.attributes.date},nodeId:r})}):e}function nd(e,t,n,r){let o=qu(e,n,r);if(o===null)return null;let a=r?Xv(t,r):t;return o.length===0?{props:a}:{props:a,revisions:o}}function rd(e,t,n){if(t!=="all-markup")return {revisions:br,formatRevision:null};if(!n)return {revisions:_a(e),formatRevision:ed(e)};let r=_a(e).filter(a=>ay(a,t,n)),o=ed(e);return {revisions:r,formatRevision:o&&ay(o,t,n)?o:null}}function sy(e,t,n){let r=_a(e);if(!n)return r.length>0||ed(e)!==null;if(r.some(a=>Da(n,a)))return true;let o=ed(e);return o!==null&&Da(n,o)}function _a(e){if(e.kind==="textValue")return Js;let t=e.children.find(o=>o.kind==="paragraphProperties");if(!t||t.kind==="textValue")return Js;let n=t.children.find(o=>o.kind==="runProperties");if(!n||n.kind==="textValue")return Js;let r=[];for(let o of n.children){if(o.kind==="textValue"||o.namespaceUri!==da)continue;let a=Yv[o.localName];if(a===void 0)continue;let i=yr(o,"date");r.push({kind:a,id:yr(o,"id")??"",author:yr(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:Js}var Yv={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function ed(e){if(e.kind==="textValue")return null;let t=e.children.find(r=>r.kind==="paragraphProperties");if(!t||t.kind==="textValue")return null;let n=t.children.find(r=>r.kind==="runProperties");if(!n||n.kind==="textValue")return null;for(let r of n.children){if(r.kind==="textValue"||r.namespaceUri!==da||r.localName!=="rPrChange")continue;let o=yr(r,"date");return {kind:"format",id:yr(r,"id")??"",author:yr(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var Js=Object.freeze([]);function dy(e){return e.find(t=>Uv(t))??e[0]}function Uv(e){return e.kind==="delete"||e.kind==="moveFrom"}function od(e,t){let n=dy(e);return {...n?{markRevisions:e,markRevision:n}:{},...t?{markFormatRevision:t}:{}}}function TN(e){return dy(_a(e))??null}function ad(e){for(let t of e){if(t.localName!=="rPrChange"&&t.localName!=="pPrChange")continue;let n=t.attributes??{},r=n.date;return {kind:"format",id:n.id??"",author:n.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function Wn(e){return e.some(t=>{switch(t.kind){case "delete":case "moveFrom":return true;case "insert":case "moveTo":case "format":return false;default:return t.kind}})}function ja(e,t){if(e.kind!=="textValue"){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da&&n.localName===t)return n}}function BN(e){if(e.kind==="textValue")return false;let t=ja(e,"paragraphProperties")??ja(e,"pPr");if(!t)return false;let n=ja(t,"runProperties")??ja(t,"rPr");return n===void 0?false:ja(n,"del")!==void 0||ja(n,"moveFrom")!==void 0}function Zu(e,t,n,r,o=[]){if(e.kind==="textValue"||t>=la)return true;let a=(i,l)=>{for(let s of i){if(s.kind==="textValue")continue;if(s.kind==="run"){for(let u of s.children){if(u.kind==="text"){for(let f of u.children)if(f.kind==="textValue"&&f.value.length>0)return false;continue}if(u.kind!=="runProperties")return false}continue}if(Dd$1(s)){if(l+1>=la)continue;let u=Fd$1(s);if(u&&!a(u,l+1))return false;continue}if(na$1(s)&&!Xt(s)){if(!Zu(s,l+1,n,r,o))return false;continue}if(!Xt(s))continue;let d=tn(s);if(!d)continue;let c=fn(o,d);if(je(c,n,r)&&!Zu(s,l+1,n,r,c))return false}return true};return a(e.children,t)}function Ju(e,t,n){if(t==="all-markup"&&!n)return false;for(let r of _a(e)){let o=n?Yi(n,r,t):t;if(o==="all-markup")continue;let a=r.kind==="delete"||r.kind==="moveFrom";if(o==="proposed"&&a||o==="original"&&!a)return true}return false}function cy(e,t="proposed",n){return e.kind!=="paragraph"||!Ju(e,t,n)?false:Zu(e,0,t,n)}var qv=`
|
|
2
|
-
\r`,Zv=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function uy(e,t){let n=t;for(;n<e.length&&qv.includes(e[n]);)n+=1;return n}function fy(e,t){if(e[t]==='"'){let r=t+1;for(;r<e.length&&e[r]!=='"';)r+=1;return r<e.length?r+1:r}let n=t;for(;n<e.length&&!`
|
|
3
|
-
\r"`.includes(e[n]);)n+=1;return n}function id(e){if(e.length===0||e.length>256)return null;let t=uy(e,0);if(e[t]==='"')return null;let n=fy(e,t),r=e.slice(t,n).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=uy(e,n);if(o>=e.length)return null;let a=fy(e,o),i=e.slice(a).trim();for(;;){let l=i.replace(Zv,"").trimEnd();if(l===i)break;i=l;}if(i[0]==='"'){let l=i.indexOf('"',1);l===-1?i=i.slice(1):l===i.length-1&&(i=i.slice(1,-1));}return i.length===0?null:{display:i}}var my=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),Jv=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function Qv(e){let t=e;for(;;){let n=t.replace(Jv,"").trimEnd();if(n===t)return t;t=n;}}function eT(e){let t=e.trimStart();if(t.length===0)return null;if(t[0]==='"'){let o=t.indexOf('"',1),a=o===-1?t.slice(1):t.slice(1,o);return a.length>0?a:null}let n=t.search(/\s/),r=n===-1?t:t.slice(0,n);return r.length>0?r:null}function ld(e){let t=wo(e);if(t===null||t.length===0)return null;let n=Qv(t),r=my[n];if(r)return {property:r};if(!n.startsWith("DOCPROPERTY"))return null;let o=n.slice(11);if(o.length===0||!/^\s/.test(o))return null;let a=eT(o);if(a===null)return null;let i=my[a];return i?{property:i}:null}function sd(e,t){if(!t)return null;let n=t[e.property];return n!==void 0&&n.length>0?n:null}var tT=oe,nT=2048,rT=256;function oT(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "||r===" "||r===`
|
|
4
|
-
`||r==="\r"){n+=1;continue}if(r==='"'){let a=n+1;for(;a<e.length&&e[a]!=='"';)a+=1;t.push({value:e.slice(n+1,a),quoted:true}),n=a<e.length?a+1:a;continue}let o=n;for(;o<e.length&&!`
|
|
5
|
-
\r"`.includes(e[o]);)o+=1;t.push({value:e.slice(n,o),quoted:false}),n=o;}return t}var aT=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function dd(e){if(e.length===0||e.length>tT)return null;let t=oT(e);if(t.length<2)return null;let n=t[0];if(n.quoted||n.value.toUpperCase()!=="HYPERLINK")return null;let r=null,o=false,a=null,i=false,l=null,s=false;for(let d=1;d<t.length;d+=1){let c=t[d];if(!c.quoted&&c.value.startsWith("\\")){let u=c.value.toLowerCase();if(!aT.has(u))continue;let f=t[d+1];if(!f||!f.quoted&&f.value.startsWith("\\"))continue;d+=1;let p=f.value.length>0&&f.value.length<=rT;u==="\\l"?i||(i=true,p&&(a=f.value)):u==="\\o"&&(s||(s=true,p&&(l=f.value)));continue}o||(o=true,c.value.length>0&&c.value.length<=nT&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:l}}var Co=1024;function Ui(e,t){for(let n of e.attributes)if(n.namespaceUri===da&&n.localName===t)return n.value}function Qu(e){return e.kind==="drawing"||e.localName==="drawing"||e.localName==="pict"}function gy(e,t){let n="",r=(o,a)=>{if(!(o.kind==="textValue"||n.length>=Co)&&!(t.exhausted||a>Ht)&<(t)){if(o.kind==="text"){for(let i of o.children)i.kind==="textValue"&&(n+=i.value.slice(0,Co-n.length));return}for(let i of o.children)r(i,a+1);}};for(let o of e.children)r(o,1);return n}var py=new WeakMap;function hy(e,t){let n=py.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,l="",s=gr(),d=u=>{let f=Co-l.length;if(f<=0){a=true;return}l+=u.length>f?u.slice(0,f):u;},c=(u,f,p)=>{if(a||u.kind==="textValue"||p>=la||s.exhausted||f>Ht)return;if(u.kind==="bookmarkStart"){!o&&Ui(u,"name")===t&&(o=true,i=Ui(u,"id"));return}if(u.kind==="bookmarkEnd"){o&&i!==void 0&&Ui(u,"id")===i&&(a=true);return}if(u.kind==="run"){if(!o)return;for(let g of u.children){if(a||!lt(s))return;if(g.kind==="text")for(let h of g.children)h.kind==="textValue"&&d(h.value);else g.kind==="tab"&&d(" ");}return}if(Qu(u)||ee(u)||!lt(s))return;let m=ma(u,p);for(let g of u.children)c(g,f+1,m);};for(let u of e.children){if(a||!lt(s))break;c(u,1,0);}return n||(n=new Map,py.set(e,n)),n.set(t,l),l}function Ha(e){let t=[],n=0;for(let r of e.members){let o=Pe(r).length;t.push({paragraphId:r.id,base:n,length:o}),n+=o;}return {members:t,total:n}}function ef(e,t){let n;for(let r of e.members){if(r.base>t)break;(n===void 0||r.length>0||r.base>n.base)&&(n=r);}return n??e.members[e.members.length-1]}function yy(e,t){let n=ef(t,e.start);if(!n)return e;let r=e.end-n.base;return {paragraphId:n.paragraphId,start:e.start-n.base,end:Math.min(r,n.length)}}function iT(e,t){return {...e,range:yy(e.range,t)}}function cd(e,t){return e.map(n=>{let r=n.spans.map(u=>iT(u,t)),o=r[0],a=n.drawings?.map(u=>{let f=ef(t,u.start);return f?{...u,paragraphId:f.paragraphId,start:u.start-f.base}:u}),i=o?r.filter(u=>u.range.paragraphId===o.range.paragraphId):[],l=o?(a??[]).filter(u=>u.paragraphId===o.range.paragraphId):[],s=o?{paragraphId:o.range.paragraphId,start:Math.min(o.range.start,...l.map(u=>u.start)),end:Math.max(i[i.length-1].range.end,...l.map(u=>u.start+1))}:yy(n.range,t),d=a,c=n.deletedRanges?.map(u=>({deleted:u,member:ef(t,u.start)})).filter(({member:u})=>u?.paragraphId===s.paragraphId).map(({deleted:u,member:f})=>({start:u.start-(f?.base??0),end:u.end-(f?.base??0)}));return {...n,range:s,spans:r,...d?{drawings:d}:{},...c?{deletedRanges:c}:{}}})}function by(e,t){let n=e.map(o=>{if(o.projected||o.inlineDrawing||o.anchoredAtom||o.equation||o.positionalTab||o.breakKind||o.measureText!==void 0||o.fieldAtom||o.end-o.start!==o.text.length||/[\t\r\n]/u.test(o.text))return null;let{text:a,start:i,end:l,style:s,...d}=o;return JSON.stringify(d)}),r=[];for(let o=0;o<e.length;){let a=o+1;for(;a<e.length&&n[o]!==null&&n[a]===n[o]&&e[a-1].end===e[a].start&&!t?.has(e[a].start)&&gh(e[o].style,e[a].style);)a++;let i=e[o];r.push(a===o+1?i:{...i,text:e.slice(o,a).map(l=>l.text).join(""),end:e[a-1].end}),o=a;}return r}function xy(e){let t="children"in e?jr(e):null;return t?new Set(Ha(t).members.map(n=>n.base)):void 0}var za=lT();function vt(e){let t=false;for(let n of e)if(n.localName==="bidi"){let r=n.attributes?.val;t=r===void 0||r==="1"||r==="true"||r==="on";}return t}function ud(e){let t=false;for(let n of e){if(n.localName!=="rtl")continue;let r=n.attributes?.val;t=r===void 0||r==="1"||r==="true"||r==="on";}return t}var Py=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/u;function sT(e,t,n){let r=za.getEmbeddingLevels(t,n?"rtl":"ltr");if(Py.test(t))return r;let o=0;for(let a=0;a<e.length;){let i=ud(e[a].props),l=a,s=0;for(;l<e.length&&ud(e[l].props)===i;)s+=e[l].text.length,l++;let d=za.getEmbeddingLevels(t.slice(o,o+s),i?"rtl":"ltr");r.levels.set(d.levels,o),o+=s,a=l;}return r}function Ry(e,t,n){let r=e.map(s=>s.text).join("");if(!t&&!/[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufeff]/u.test(r)&&!e.some(s=>ud(s.props))||e.some(s=>s.projected||s.inlineDrawing||s.equation||s.positionalTab||s.measureText!==void 0||s.end-s.start!==s.text.length||s.text.includes(" ")))return e;let o=sT(e,r,t),a=!Py.test(r),i=[],l=0;for(let s of by(e,n)){let d;try{d=vh(s.text,l,o);}catch{return e}for(let c of d){let u={...s.style,shaping:{script:c.script,direction:c.direction,level:c.bidiLevel,baseLevel:t?1:0,...a?{runDirection:ud(s.props)?"rtl":"ltr"}:{}}};i.push({...s,text:s.text.slice(c.from,c.to),start:s.start+c.from,end:s.start+c.to,style:u});}l+=s.text.length;}return i}function Sy(e,t,n,r,o){for(let s=r-1;s>=n&&Array.from(e[s].text).every(d=>["WS","B","S"].includes(za.getBidiCharTypeName(d)));s--)t[s]=o?1:0;let a=Array.from({length:r-n},(s,d)=>n+d),i=0,l=1/0;for(let s=n;s<r;s++)i=Math.max(i,t[s]),t[s]%2&&(l=Math.min(l,t[s]));for(let s=i;s>=l;s--)for(let d=0;d<a.length;){if(t[a[d]]<s){d++;continue}let c=d+1;for(;c<a.length&&t[a[c]]>=s;)c++;for(let u=d,f=c-1;u<f;u++,f--)[a[u],a[f]]=[a[f],a[u]];d=c;}return a}function tf(e,t=e.some(n=>n.style.shaping?.baseLevel===1)){if(!e.some(l=>l.style.shaping))return e;if(e.some((l,s)=>s>0&&(l.wrapAdvanceBefore??0)>0)){let l=[],s=0;for(let d=1;d<=e.length;d++)if(!(d<e.length&&!(e[d].wrapAdvanceBefore>0))){for(let c of tf(e.slice(s,d),t))l.push(c);s=d;}return l}let n=e.map(l=>l.style.shaping?.level??0),r=[];if(e.every(l=>l.style.shaping?.runDirection!==void 0)){let l=e.length;for(;l>0&&Array.from(e[l-1].text).every(c=>["WS","B","S"].includes(za.getBidiCharTypeName(c)));)l--;let s=c=>c>=l?t:e[c].style.shaping?.runDirection==="rtl",d=[];for(let c=0;c<e.length;){let u=s(c),f=c+1;for(;f<e.length&&s(f)===u;)f++;d.push({start:c,end:f,rtl:u}),c=f;}t&&d.reverse();for(let c of d)for(let u of Sy(e,n,c.start,c.end,c.rtl))r.push(u);}else for(let l of Sy(e,n,0,e.length,t))r.push(l);let o=[...e],a=e.reduce((l,s)=>Math.min(l,s.box.x),1/0),i=e.map((l,s)=>l.box.width+Math.max(0,(e[s+1]?.box.x??l.box.x+l.box.width)-l.box.x-l.box.width));for(let l of r){let s=e[l],d=n[l]%2?"rtl":"ltr",c=i[l]-s.box.width,u=s.text.split(" ").length-1,f=u>0?c/u:0;o[l]={...s,style:s.style.shaping?{...s.style,shaping:{...s.style.shaping,direction:d,...f>0?{wordSpacingPt:f}:{}}}:s.style,box:{...s.box,x:a,width:i[l]}},a+=i[l];}return o}function fd(e,t){return e.length?e.reduce((n,r)=>Math.min(n,r.box.x),1/0):t}function nf(e,t){if(!e.some(o=>o.style.shaping!==void 0))return null;let n=null,r=1/0;for(let o of e){let a=Math.max(o.box.x-t,t-o.box.x-o.box.width,0);a<r&&(n=o,r=a);}return n}function wy(e,t){if(!e.some(n=>n.style.shaping))return e;for(let n=e.length-1;n>=0;n--){let r=e[n],o=r.text.length;for(;o>0&&["WS","B","S"].includes(za.getBidiCharTypeName(r.text[o-1]));)o--;if(o===0)continue;if(o===r.text.length)return e;let a=r.text.slice(o),i=Math.min(r.box.width,Je(a,De(r.style,r.fontSlot),t)),l={...r,text:r.text.slice(0,o),range:{...r.range,end:r.range.start+o},box:{...r.box,width:r.box.width-i}},s={...r,text:a,range:{...r.range,start:r.range.start+o},box:{...r.box,x:r.box.x+r.box.width-i,width:i}};return [...e.slice(0,n),l,s,...e.slice(n+1)]}return e}var dT=new WeakMap;function ky(e,t){dT.set(e,t);}function cT(e){let t=Object.entries(e.attributes??{}).sort(([n],[r])=>n<r?-1:n>r?1:0).map(([n,r])=>`${n}=${r}`).join("\0,");return `${e.localName}(\0${t}\0)`}function uT(e){return e.map(cT).join("\0;")}var fT=1<<18,mT=new TextEncoder;function of(e){return a$1(mT.encode(e))}var pT=2048,vy=2*1024*1024,Mo=new Map,rf=0;function qi(e){let t=Mo.get(e);if(t)return Mo.delete(e),Mo.set(e,t),t.digest;let n=of(e),r=e.length*2;if(r<=vy)for(Mo.set(e,{digest:n,bytes:r}),rf+=r;Mo.size>pT||rf>vy;){let o=Mo.entries().next();if(o.done)break;Mo.delete(o.value[0]),rf-=o.value[1].bytes;}return n}function Zi(e,t){return `${e}|${t?"drawing":""}`}function J(e){let t="";for(let n of e)t+=`${n.length}:${n}`;return t}var Ty=new WeakMap;function Oy(e,t){if(!t||t.size===0)return "";let n=Ty.get(e),r=n?.get(t);if(r!==void 0)return r;let o=Bo(e,a=>t.get(a.id)?.cacheToken??"");return o.length<=fT&&(n||(n=new WeakMap,Ty.set(e,n)),n.set(t,o)),o}function Bo(e,t){let n=[],r=false,o=[e];for(;o.length>0;){let a=o.pop();if(a.kind==="paragraph"){let i=t(a);i&&(r=true),n.push(i);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}return r?J(n):""}function af(e){return e?{nodeDigests:new WeakMap,paragraphKeys:new WeakMap}:{nodeDigests:new Map,paragraphKeys:new Map}}var Fy=af(true);function Cy(e,t){if(e.kind==="textValue")return of(lf(e));let n=t.nodeDigests.get(e);if(n!==void 0)return n;let r=of(lf(e,t));return t.nodeDigests.set(e,r),r}function lf(e,t=Fy){if(e.kind==="textValue")return J(["text",e.value]);let n=[];for(let o of e.attributes)n.push(J([o.namespaceUri??"",o.localName,o.value]));n.sort();let r=[];for(let o of e.children)r.push(o.kind==="textValue"?lf(o):J(["child-digest",Cy(o,t)]));return J(["element",e.kind,e.localName,e.id,J(n),J(r)])}var gT=8;function md(e){return My(e,Fy)}function My(e,t){let n=Math.round(e.width*1e3),r=e.drawingToken??"",o=e.projectionToken??"",a=e.exclusionToken??"",i=qi(uT(e.properties)),l=Cy(e.paragraph,t),s=qi(e.producer),d=qi(r),c=qi(o),u=qi(a),f=t.paragraphKeys.get(e.paragraph),p=f?.entries.findIndex(h=>h.producerIdentity===s&&h.width===n&&h.drawingIdentity===d&&h.projectionIdentity===c&&h.exclusionIdentity===u&&h.propertiesToken===i);if(f&&p!==void 0&&p>=0){let[h]=f.entries.splice(p,1);return f.entries.push(h),h.key}let m=`plk:${l}:${s}:${n}:${d}:${c}:${u}:${i}`;f||(f={entries:[]},t.paragraphKeys.set(e.paragraph,f));let g=f.entries.find(h=>h.propertiesToken===i)?.propertiesToken??i;return f.entries.push({producerIdentity:s,width:n,drawingIdentity:d,projectionIdentity:c,exclusionIdentity:u,propertiesToken:g,key:m}),f.entries.length>gT&&f.entries.shift(),m}var By=new WeakMap;function pd(e,t){By.set(e,t);}function Ly(e,t,n,r){if(!e)return;let o=t??new Set;for(let a of n)o.add(a);for(let a of r){let i=By.get(a);if(i)for(let l of i)o.add(l);}t||e.retain(o);}var hT=8,yT=8;function iA(e={}){let t=Math.max(1,e.maxEntries??4096),n=e.retainAcrossPasses??true,r=t*8,o=new Map,a=af(n),i=0,l=0,s=0,d=0,c=0,u=0,f=0,p=0,m=0,g=0,h={retainAcrossPasses:n,keyFor(b){return My(b,a)},get(b){let x=o.get(b);if(x===void 0){d+=1;return}return s+=1,o.delete(b),x.generation=i,o.set(b,x),x.value},set(b,x){for(o.has(b)&&o.delete(b),o.set(b,{value:x,generation:i});o.size>t;){let y=o.entries().next();if(y.done||y.value[1].generation>=i&&o.size<=r)break;o.size>r?f+=1:u+=1,o.delete(y.value[0]),c+=1;}},release(b){!n&&o.delete(b)&&(m+=1);},retentionPassDue(){return l+=1,l%hT===0},retain(b){i+=1;for(let x of b){let y=o.get(x);y&&(y.generation=i);}for(let[x,y]of o)i-y.generation>yT&&(o.delete(x),c+=1,p+=1);},clear(){g+=o.size,o.clear(),a=af(n);},get stats(){return {hits:s,misses:d,evictions:c,size:o.size}}};return ky(h,{snapshot(){let b=0;for(let x of o.keys())b+=x.length*2;return {hits:s,misses:d,evictions:c,size:o.size,softLimit:t,hardLimit:r,keyTextBytes:b,softLimitEvictions:u,hardLimitEvictions:f,staleEvictions:p,releasedEntries:m,clearedEntries:g}},visit(b){for(let x of o.values())b(x.value);}}),h}var Ey=512,bT=9,Tn=31680/20,xT=8,ST=128;function Ji(e,t){return e.kind!=="textValue"&&e.namespaceUri===da&&e.localName===t}function st(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function Yt(e,t){for(let n of e.children)if(Ji(n,t))return n}function Vn(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function PT(e){let t=e/20;return !Number.isFinite(t)||t<=0?0:t>Tn?Tn:t}function gd(e){let t=e/20;return Number.isFinite(t)?t>Tn?Tn:t<-Tn?-Tn:t:0}function RT(e){let t={left:0,right:0,hanging:0,firstLine:0};if(!e)return t;let n=Yt(e,"ind");if(!n)return t;let r={};for(let s of ["left","right","start","end"]){let d=Vn(st(n,s),true);d!==null&&(r[s]=gd(d));}let o=Vn(st(n,"left")??st(n,"start"),true),a=Vn(st(n,"right")??st(n,"end"),true),i=Vn(st(n,"hanging")),l=Vn(st(n,"firstLine"),true);return {...r.start!==void 0||r.end!==void 0?{authored:r}:{},left:o===null?0:gd(o),right:a===null?0:gd(a),hanging:i===null?0:PT(i),firstLine:l===null?0:gd(l),stated:{left:o!==null,right:a!==null,firstLineOffset:i!==null||l!==null}}}function wT(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function kT(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function vT(e,t){let n=Yt(e,t);if(!n)return false;let r=st(n,"val");return r!=="0"&&r!=="false"&&r!=="off"}function Ny(e,t){let n=Yt(e,t);if(!n)return;let r=st(n,"val");if(!(r===void 0||r.length===0||r.length>ST))return r}function TT(e,t){for(let n of e){if(n.localName!==t)continue;let r=n.attributes?.val;return !(r==="0"||r==="false")}return false}function Ay(e){let t=Vn(st(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=Yt(e,"start"),r=1;if(n){let b=Vn(st(n,"val"));b!==null&&b>=0&&(r=Math.min(b,9999));}let o=Yt(e,"numFmt"),a=(o?st(o,"val"):void 0)??"decimal",i=Yt(e,"lvlText"),l=i?st(i,"val")??"":"",s=Yt(e,"lvlJc"),d=kT(s?st(s,"val"):void 0),c=Yt(e,"suff"),u=wT(c?st(c,"val"):void 0),f=Yt(e,"lvlRestart"),p;if(f){let b=Vn(st(f,"val"));b!==null&&b>=0&&b<=9&&(p=b);}let m=Yt(e,"pPr"),g=Yt(e,"rPr"),h=g?Wa(g):[];return {ilvl:t,start:r,numFmt:a.length>64?"decimal":a,lvlText:l.length>64?l.slice(0,64):l,lvlJc:d,suff:u,indent:RT(m),...p!==void 0?{lvlRestart:p}:{},isLgl:vT(e,"isLgl"),runProperties:h,vanish:TT(h,"vanish")}}function IT(e){let t=st(e,"abstractNumId");if(t===void 0||t.length===0||t.length>64)return null;let n=new Map;for(let a of e.children){if(!Ji(a,"lvl"))continue;if(n.size>=9)break;let i=Ay(a);i&&!n.has(i.ilvl)&&n.set(i.ilvl,i);}let r=Ny(e,"numStyleLink"),o=Ny(e,"styleLink");return {abstractNumId:t,levels:n,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function OT(e){let t=Vn(st(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=Yt(e,"startOverride"),r;if(n){let i=Vn(st(n,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=Yt(e,"lvl"),a=o?Ay(o)??void 0:void 0;return r===void 0&&a===void 0?{ilvl:t,override:{}}:{ilvl:t,override:{...r!==void 0?{startOverride:r}:{},...a?{level:a}:{}}}}function FT(e){let t=st(e,"numId");if(t===void 0||t.length===0||t.length>64)return null;let n=Yt(e,"abstractNumId"),r=n?st(n,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!Ji(a,"lvlOverride"))continue;if(o.size>=bT)break;let i=OT(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:t,abstractNumId:r,overrides:o}}function Dy(e){let t=new Map,n=new Map;if(!e)return {abstractNums:t,nums:n};let r=0,o=0;for(let a of e.children){if(Ji(a,"abstractNum")){if(r>=Ey)continue;r+=1;let i=IT(a);i&&!t.has(i.abstractNumId)&&t.set(i.abstractNumId,i);continue}if(Ji(a,"num")){if(o>=Ey)continue;o+=1;let i=FT(a);i&&!n.has(i.numId)&&n.set(i.numId,i);}}return {abstractNums:t,nums:n}}function CT(e,t,n){let r=new Set([t.abstractNumId]),o=t;for(let a=0;a<xT;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let l=n(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 _y(e,t){let n=false,r=new Map(e.abstractNums);for(let[o,a]of e.abstractNums){if(a.numStyleLink===void 0)continue;let i=CT(e,a,t);!i||i.levels===a.levels||i.levels.size===0||(r.set(o,{...a,levels:i.levels}),n=true);}return n?{abstractNums:r,nums:e.nums}:e}function Va(e,t,n){if(n<0||n>8)return null;let r=e.nums.get(t);if(!r)return null;let o=e.abstractNums.get(r.abstractNumId);if(!o)return null;let a=r.overrides.get(n),i=a?.level??o.levels.get(n);return i?{abstractNumId:r.abstractNumId,level:i,...a?.startOverride!==void 0?{startOverride:a.startOverride}:{}}:null}var jy=Object.freeze({abstractNums:new Map,nums:new Map});function MT(e,t){let n=e.nums.get(t),r=[];for(let o=0;o<=8;o+=1){let a=Va(e,t,o);if(!a){r.push(1);continue}let i=n?.overrides.get(o)?.startOverride;r.push(i??a.level.start);}return r}function BT(e,t,n){let r=[];for(let o=0;o<=8;o+=1){let a=Va(e,t,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...n]}}function Hy(e,t){return t?e.map(n=>n==="bullet"||n==="none"?n:"decimal"):e}function LT(e,t){if(t===0)return null;if(t===void 0)return e-1;let n=t-1;return n>=e?null:n}function zy(e){let t=new Map,n=new Map,r=new Map,o=a=>{let i=t.get(a);i||(i=[0,0,0,0,0,0,0,0,0],t.set(a,i));let l=n.get(a);l||(l=[false,false,false,false,false,false,false,false,false],n.set(a,l));let s=r.get(a);return s||(s=MT(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=Va(e,a,i);if(!l)return null;let{abstractNumId:s,level:d}=l,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=BT(e,a,f);for(let S=i+1;S<=8;S+=1){let T=Va(e,a,S);if(!T)continue;let k=LT(S,T.level.lvlRestart);k!==null&&i<=k&&(u[S]=false);}let m=f[i]??d.start;u[i]?c[i]+=1:(c[i]=m,u[i]=true);let g=c.slice(),h=u.slice(),b=g.map((S,T)=>h[T]?S:f[T]??1),x=Hy(p,d.isLgl),y=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:Au(d.lvlText,b,x),O={abstractNumId:s,numId:a,ilvl:i,level:d,counters:g,markerText:y};return Wy.set(O,b),O}}}var Wy=new WeakMap;function Vy(e){return Wy.get(e)??e.counters}var ET=/[\p{L}\s]/u;function NT(e){let t="";for(let n=0;n<e.length;n+=1){let r=e[n],o=e[n+1];if(r==="%"&&o!==void 0&&o>="1"&&o<="9"){t+=r+o,n+=1;continue}ET.test(r)||(t+=r);}return t}function Gy(e,t=false,n=false){let{index:r,numId:o,ilvl:a,expandCounters:i}=e;if(a<0||a>8)return null;let l=[],s=[];for(let p=0;p<=8;p+=1){let m=Va(r,o,p);l.push(p<=a?m?.level??null:null),s.push(m?.level.numFmt??"decimal");}let d=p=>p!==null&&p.numFmt!=="bullet"&&p.numFmt!=="none"&&p.lvlText.length>0;if(!d(l[a]??null))return null;let c=[],u=[];for(let p=a;p>=0&&!(t&&p!==a);p-=1){let m=l[p];d(m)&&(p!==a&&u.some(g=>g.includes(`%${p+1}`))||(c.push(p),u.push(m.lvlText)));}c.reverse();let f="";for(let p of c){let m=l[p],g=n?NT(m.lvlText):m.lvlText;f+=Au(g,i,Hy(s,m.isLgl));}return f.length>0?f:null}var sf=Object.freeze({kinsoku:true,overflowPunctuation:true,characterWrap:false}),hd=e=>!["0","false","off"].includes(e??"");function $y(e){let t=false,n="doNotCompress",r=Object.create(null),o=Object.create(null);for(let a of e?.children??[]){if(!("localName"in a)||a.namespaceUri!=="http://schemas.openxmlformats.org/wordprocessingml/2006/main")continue;let i=a.attributes.find(d=>d.localName==="val"&&d.namespaceUri===a.namespaceUri)?.value;if(a.localName==="strictFirstAndLastChars"&&(t=hd(i)),a.localName==="characterSpacingControl"&&(i==="doNotCompress"||i==="compressPunctuation"||i==="compressPunctuationAndJapaneseKana")&&(n=i),a.localName!=="noLineBreaksBefore"&&a.localName!=="noLineBreaksAfter")continue;let l=a.attributes.find(d=>d.localName==="lang"&&d.namespaceUri===a.namespaceUri)?.value.toLowerCase();if(!l||!/^[a-z]{2,3}(?:-[a-z0-9]{2,8}){0,3}$/.test(l))continue;let s=a.localName==="noLineBreaksBefore"?r:o;(Object.keys(s).length<64||Object.hasOwn(s,l))&&(s[l]=(i??"").slice(0,4096));}return Object.freeze({strict:t,compression:n,before:Object.freeze(r),after:Object.freeze(o)})}function yd(e,t){let{kinsoku:n,overflowPunctuation:r,characterWrap:o}=sf;for(let a of e)a.localName==="kinsoku"&&(n=hd(a.attributes?.val)),a.localName==="overflowPunct"&&(r=hd(a.attributes?.val)),a.localName==="wordWrap"&&(o=!hd(a.attributes?.val));return {settings:t,kinsoku:n,overflowPunctuation:r,characterWrap:o}}function Qi(e){let t;for(let n of e){if(n.localName!=="lang")continue;let r=n.attributes?.eastAsia??n.attributes?.val;r&&/^(ja|zh|ko)(-|$)/i.test(r)&&(t=r.toLowerCase());}return t}var AT="!%),.:;?]}\xA2\xB0\u2019\u201D\u2030\u2032\u2033\u2103\u3001\u3002\u3005\u3009\u300B\u300D\u300F\u3011\u3015\u309B\u309C\u309D\u309E\u30FB\u30FD\u30FE\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF61\uFF63\uFF64\uFF65\uFF9E\uFF9F\uFFE0",DT="$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFF62\uFFE1\uFFE5",_T="!%),.:;>?]}\xA2\xA8\xB0\xB7\u02C7\u02C9\u2015\u2016\u2019\u201D\u2026\u2030\u2032\u2033\u203A\u2103\u2236\u3001\u3002\u3003\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u301E\uFE36\uFE3A\uFE3E\uFE40\uFE44\uFE5A\uFE5C\uFE5E\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF40\uFF5C\uFF5D\uFF5E\uFFE0",jT="$([{\xA3\xA5\xB7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFE5D\uFF04\uFF08\uFF0E\uFF3B\uFF5B\uFFE1\uFFE5",HT="! ),.:;?]}\xA2\xB7\u2013\u2014\u2019\u201D\u2022\u2025\u2026\u2027\u2032\u2574\u3001\u3002\u3009\u300B\u300D\u300F\u3011\u3015\u301E\uFE30\uFE31\uFE33\uFE34\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE4F\uFE50\uFE51\uFE52\uFE54\uFE55\uFE56\uFE57\uFE5A\uFE5C\uFE5E\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5C\uFF5D\uFF64".replace(" ",""),zT="([{\xA3\xA5\u2018\u201C\u2035\u3008\u300A\u300C\u300E\u3010\u3014\u301D\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE59\uFE5B\uFE5D\uFF08\uFF5B",WT="!%),.:;?]}\xA2\xB0\u2019\u201D\u2032\u2033\u2103\u3009\u300B\u300D\u300F\u3011\u3015\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFFE0",VT="$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFFE1\uFFE5\uFFE6",GT="\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FC\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70";function Ky(e,t){let n=e.split("-")[0],r=/^zh-(tw|hk|mo|hant)(-|$)/.test(e),o=n==="zh"?r?HT:_T:n==="ko"?WT:AT,a=n==="zh"?r?zT:jT:n==="ko"?VT:DT;return n==="ja"&&t?.strict&&(o+=GT),o=t?.before[e]??o,a=t?.after[e]??a,{before:o,after:a}}function Lo(e){return e>=11904&&e<=12591||e>=12736&&e<=40959||e>=63744&&e<=64255||e>=65072&&e<=65103||e>=65281&&e<=65439||e>=131072&&e<=205743}var Uy=e=>new Set([...e].map(t=>t.codePointAt(0))),el=Uy("\u3002\uFF0E\uFF0C\u3001\uFF1B\uFF1A\uFF1F\uFF01\u300D\u300F\uFF09\u3011\u3009\u300B\u3015\u3017\u3019\u301B\uFF5D\uFF3D\uFF1E\uFF05\u3000\u30FB\uFF61\uFF63\uFF64\uFF65\uFF70\uFF9E\uFF9F\u3005\u301C\u309D\u309E\u30FD\u30FE\u30FC\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F"),tl=Uy("\u300C\u300E\uFF08\u3010\u3008\u300A\u3014\u3016\u3018\u301A\uFF5B\uFF3B\uFF1C\uFF62\uFF04\uFFE5");function qy(e,t){return !(!Lo(e)||!Lo(t)||tl.has(e)||el.has(t))}function In(e){if(e.length===0)return;let t=e.charCodeAt(e.length-1);return t>=56320&&t<=57343&&e.length>=2?e.codePointAt(e.length-2):t}var xd=new Set(["-","\u2010","\u2013","\u2014"]),Xy=11904;function $T(e){let t=null;return n=>{if(t===null){t=new Set;for(let r of Ye(e))t.add(r.utf16From);t.add(e.length);}return t.has(n)}}function KT(e,t){let n=[],r=0,o=0;for(;r<e.length||o<t.length;){let a=r<e.length?e[r]:Number.POSITIVE_INFINITY,i=o<t.length?t[o]:Number.POSITIVE_INFINITY;a<i?(n.push(a),r+=1):(n.push(i),o+=1);}return n}function Eo(e,t){let n=[];for(let o=0;o<e.length;o+=1){let a=e[o];a===" "?(o>0&&n[n.length-1]!==o&&n.push(o),n.push(o+1)):(a===" "||xd.has(a)&&o>0&&e[o-1]!==" "&&o+1<e.length&&e[o+1]!==" "&&!xd.has(e[o+1]))&&n.push(o+1);}let r=n;if(t){let o=[],a=$T(e);for(let i=0;i<e.length;){let l=e.codePointAt(i),s=i+(l>65535?2:1);if(s>=e.length)break;qy(l,e.codePointAt(s))&&a(s)&&o.push(s),i=s;}o.length>0&&(r=KT(n,o));}return r[r.length-1]!==e.length&&r.push(e.length),r}function Sd(e,t){return !(t!==void 0&&el.has(t)||e!==void 0&&tl.has(e))}function Zy(e,t){return t<=0||t>=e.length?true:Sd(In(e.slice(0,t)),e.codePointAt(t))}var bd=new Map,Yy=-1;function XT(e,t){let n=Ws();(Yy!==n||bd.size>=2048)&&(bd.clear(),Yy=n);let r=e*1114112+t,o=bd.get(r);if(o!==void 0)return o;let a=0;for(let l of Ye(String.fromCodePoint(e,t)))a+=1;let i=a>1;return bd.set(r,i),i}function Pd(e,t,n){let r=n||e===""||/[\s ]$/.test(e)||/^[\s ]/.test(t)||xd.has(e[e.length-1])&&!xd.has(t[0]),o=e.length===0?0:e.charCodeAt(e.length-1);if(o<Xy&&t.charCodeAt(0)<Xy)return r?"opens":"continues";if(o===9)return "opens";let a=In(e),i=t.codePointAt(0);return a!==void 0&&!XT(a,i)||!Sd(a,i)?"forbidden":r||a!==void 0&&qy(a,i)?"opens":"continues"}function Hr(e){return e>=4352&&e<=4607||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=44032&&e<=55295}var nt=e=>Lo(e)||Hr(e),cf=e=>/[\u1100-\u11ff\u2e80-\u318f\u31c0-\u9fff\ua960-\ua97f\uac00-\ud7ff\uf900-\ufaff\ufe30-\ufe4f\uff01-\uff9f\u{20000}-\u{323af}]/u.test(e),Jy=e=>e>=65296&&e<=65305||e>=65313&&e<=65338||e>=65345&&e<=65370,df=e=>!e.projected&&!e.positionalTab&&!e.inlineDrawing&&!e.equation&&e.end-e.start===e.text.length;function Rd(e,t){if(!t.characterWrap&&!e.some(S=>/[\u1100-\u11ff\u2e80-\ud7ff\uf900-\uffef\u{20000}-\u{323af}]/u.test(S.text)||Qi(S.props)))return null;let n=new Map,r=[],o=0;for(let S of e){n.set(S,o);let T=df(S)?S.text:"\uFFFC".repeat(Math.min(S.text.length,1));r.push(T),o+=T.length;}let a=r.join(""),i=Ye(a),l=new Map([[0,"opens"],[a.length,"opens"]]),s=new Set(Eo(a,false)),d=new Set,c=/[$¥£₩+-$£¥+\-]?[0-90-9]+(?:[.,:/.,:/][0-90-9]+)*(?:[%%‰])?|[A-Za-z]+/gu;for(let S of a.matchAll(c))if(/[0-9A-Za-z]/u.test(S[0]))for(let T=S.index+1;T<S.index+S[0].length;T++)d.add(T);let u=0,f=0,p=i.some(S=>Hr(S.text.codePointAt(0))),m=p?"ko-kr":/[\u3040-\u30ff\uff66-\uff9f]/u.test(a)?"ja-jp":"zh-cn",g=[],h=false;for(let S of i)/^[\p{P}\p{S}\p{M}]+$/u.test(S.text)||(h=nt(S.text.codePointAt(0))),g.push(h||nt(S.text.codePointAt(0)));let b=e.map(S=>Qi(S.props)),x=new Map,y=S=>{let T=x.get(S);return T||(T=Ky(S,t.settings),x.set(S,T)),T};for(let S=1;S<i.length;S++){let T=i[S-1],k=i[S],w=k.utf16From;for(;u+1<e.length&&n.get(e[u+1])<=w;)u++;for(;f+1<e.length&&n.get(e[f+1])<=T.utf16From;)f++;let v=In(T.text),I=T.text.codePointAt(0),P=k.text.codePointAt(0);if(/[\t\n\f\ufffc]/u.test(T.text+k.text)){l.set(w,"opens");continue}if(/[\u00a0\u202f\u2060\ufeff]/u.test(T.text+k.text)){l.set(w,"forbidden");continue}let C=false;if(t.kinsoku){let j=b[u]??(t.settings&&(nt(P)||g[S-1]&&/^[\p{P}\p{S}]+$/u.test(k.text))?m:void 0),M=b[f]??(t.settings&&(nt(I)||nt(P)&&/^[\p{P}\p{S}]+$/u.test(T.text))?m:void 0);if(j||M)C=(j?y(j).before.includes(String.fromCodePoint(P)):el.has(P))||(M?y(M).after.includes(String.fromCodePoint(v)):tl.has(v));else if(C=el.has(P)||tl.has(v),g[S-1]||nt(P)){let B=Hr(v)||Hr(P)?"ko-kr":"ja-jp",N=y(B);C||=g[S-1]&&N.before.includes(String.fromCodePoint(P))||nt(P)&&N.after.includes(String.fromCodePoint(v));}}if(C){l.set(w,"forbidden");continue}if(d.has(w)){l.set(w,"continues");continue}let E=nt(I)&&!Jy(I)||nt(P)&&!Jy(P)||g[S-1]&&/^[\p{P}\p{S}]+$/u.test(T.text),D=t.characterWrap&&(!p||Hr(I)&&Hr(P)),z=Hr(I)&&Hr(P)&&!D,W=s.has(w)||/\s$/u.test(T.text)||/^\s/u.test(k.text)||E&&!z||D;l.set(w,W?"opens":"continues");}let O=new Map;for(let S of e){let T=n.get(S);if(!df(S)){O.set(S,Eo(S.text,false));continue}let k=[];for(let w=1;w<S.text.length;w++){let v=l.get(T+w);(v==="opens"||d.has(T+w)&&v==="continues")&&k.push(w);}k.push(S.text.length),O.set(S,k);}return {boundaries:S=>O.get(S),decision:(S,T)=>df(S)?l.get(n.get(S)+T)??"forbidden":"opens",cutAllowed:(S,T,k)=>l.get(n.get(S)+T+k)!=="forbidden"&&l.has(n.get(S)+T+k)}}function Qy(e,t,n){if(!e.some(d=>cf(d.text)))return null;if(e.some(d=>d.text.includes(" ")||d.wrapAdvanceBefore))return e;let r=[];for(let d of e){if(d.projected||d.equation||d.range.end-d.range.start!==d.text.length||!cf(d.text)){r.push(d);continue}let c=Ye(d.text),u=[],f=0;for(let b=1;b<c.length;b++)(nt(In(c[b-1].text))||nt(c[b].text.codePointAt(0)))&&(u.push({from:f,to:c[b].utf16From}),f=c[b].utf16From);if(u.push({from:f,to:d.text.length}),u.length===1){r.push(d);continue}let p=De(d.style,d.fontSlot),m=u.map(b=>Je(d.text.slice(b.from,b.to),p,t)),g=m.reduce((b,x)=>b+x,0),h=d.box.x;for(let b=0;b<u.length;b++){let x=u[b],y=g>0?m[b]*d.box.width/g:0,{caretEdges:O,...S}=d;r.push({...S,text:d.text.slice(x.from,x.to),range:{...d.range,start:d.range.start+x.from,end:d.range.start+x.to},box:{...d.box,x:h,width:y}}),h+=y;}}let o=new Set,a=r.map(d=>({text:d.text,props:d.props,style:d.style,start:d.range.start,end:d.range.end,projected:!!(d.projected||d.equation)})),i=Rd(a,sf);for(let d=1;d<r.length;d++){let c=r[d-1],u=r[d],f=In(c.text),p=u.text.codePointAt(0);f===void 0||p===void 0||u.lineEndWhitespace||u.text===`
|
|
6
|
-
`||(c.text.endsWith(" ")||(nt(f)||nt(p))&&i?.decision(a[d],0)==="opens"&&Sd(f,p)&&!/[\u00a0\u202f\u2060\ufeff]/u.test(c.text.slice(-1)+u.text[0]))&&o.add(d);}if(o.size===0)return e;let l=n/o.size,s=0;return r.map((d,c)=>(o.has(c)&&(s+=l),s===0?d:{...d,box:{...d.box,x:d.box.x+s}}))}var eb=.001;function uf(e){let t=vt(e),n=t?"right":"left";for(let r of e)if(r.localName==="jc")switch(r.attributes?.val){case "center":n="center";break;case "right":n="right";break;case "start":n=t?"right":"left";break;case "end":n=t?"left":"right";break;case "both":case "distribute":n="both";break;default:n="left";}return n}function YT(e){return e.endsWith(" ")}function UT(e,t,n,r,o,a,i){if(e.length===0||o==="left")return e;let l=e.length;for(;l>0&&e[l-1].box.width===0&&(e[l-1].text===`
|
|
7
|
-
`||e[l-1].text===Td$1);)l-=1;let s=l;for(;s>0&&e[s-1].lineEndWhitespace;)s-=1;let d=e[l-1],c=s<e.length?e[s].box.x-n:void 0,u=i!==void 0&&d!==void 0&&Math.abs(d.box.x+d.box.width-n-i)<=eb;if(s<l&&u&&(o==="center"||o==="right")){let b=r-c;if(b<=0)return e;let x=o==="center"?b/2:b,y=(i??0)>=r-eb,O=e[s].box.x+x;return e.map((S,T)=>{if(T<s)return {...S,box:{...S.box,x:S.box.x+x}};if(!y)return {...S,box:{...S.box,x:S.box.x+x}};let k=Math.min(S.box.width,Math.max(0,n+r-O)),w={...S,box:{...S.box,x:O,width:k}};return O+=k,w})}let f=e[e.length-1],m=i??c??(()=>{let b=f.text.replace(/\s+$/,""),x=b===f.text?0:f.box.width-Je(b,De(f.style,f.fontSlot),t);return f.box.x-n+f.box.width-x})(),g=r-m;if(g<=0)return e;if(o==="both"){if(a)return e;let b=Qy(e,t,g);if(b)return b;let x=[];for(let T=1;T<s;T+=1)YT(e[T-1].text)&&x.push(T);if(x.length===0)return e;let y=g/x.length,O=new Set(x),S=0;return e.map((T,k)=>(O.has(k)&&(S+=y),S===0?T:{...T,box:{...T.box,x:T.box.x+S}}))}let h=o==="center"?g/2:g;return e.map(b=>({...b,box:{...b.box,x:b.box.x+h}}))}function nl(e,t,n,r,o,a,i,l=e.some(s=>s.style.shaping?.baseLevel===1)){let s=o==="both"&&a&&l?"right":o;return tf(UT(wy(e,t),t,n,r,s,a,i),l)}var qT=/^[、。〈〉《》「」『』【】〔〕〖〗〘〙〚〛!(),.:;?[]{}]$/u,rl=/^[〈《「『【〔〖〘〚([{]$/u,ff=/^[、。〉》」』】〕〗〙〛),.]}]$/u,ZT=/^[\u3041-\u3096\u30a1-\u30fa][\u3099\u309a]?$/u;function tb(e){return e.some(t=>t.spans.some((n,r)=>n.glyphOffsetPt===0&&n.text.endsWith("\uFF1A")&&(!t.spans[r+1]||(t.spans[r+1].wrapAdvanceBefore??0)>0)))}function nb(e,t,n){let r=new Map,o=0;for(let a of e){if(a.glyphOffsetPt!==0||a.text!=="\uFF1A")continue;for(;o+1<t.length&&t[o].end<=a.start;)o++;let i=t[o];r.set(a,Je(a.text,De(i.style,i.fontSlot),n));}return r}var JT=e=>!e.projected&&!e.style.textOutline&&e.style.shaping?.direction!=="rtl"&&!e.style.underline&&!e.style.strike&&!e.style.doubleStrike&&!e.revisions?.length&&!ad(e.props)&&e.measureText===void 0&&!e.positionalTab&&!e.equation&&!e.inlineDrawing&&e.end-e.start===e.text.length;function QT(e,t,n,r){let o=[],a=0,i=e.map(c=>{o.push(a);let u=JT(c)?c.text:"\uFFFC";return a+=u.length,u}).join(""),l=new Map,s=0,d=Ye(i);for(let c=0;c<d.length;c++){let u=d[c],f=d[c-1]?.text,p=d[c+1]?.text;for(;s+1<e.length&&o[s+1]<=u.utf16From;)s++;let m=e[s],g=rl.test(u.text)&&f!==void 0&&rl.test(f),h=p!==void 0&&(ff.test(u.text)&&(rl.test(p)||ff.test(p)||p==="\uFF1A")||u.text==="\uFF1A"&&(rl.test(p)||ff.test(p))&&!r&&!m.style.highlight&&!m.style.shading),b=g||h?.5:t&&ZT.test(u.text)?.125:0;if(!b)continue;let x=De(m.style,m.fontSlot),y=Je(u.text,x,n),O=g||h?Je(u.text,{...x,characterSpacingPt:0},n):y,S=O*b;if(u.text==="\uFF1A"&&p!==void 0){let k=s,w=d[c+1].utf16From;for(;k+1<e.length&&o[k+1]<=w;)k++;let v=e[k],I=De(v.style,v.fontSlot);if(rl.test(p)){let P=Je(p,{...I,characterSpacingPt:0},n);S=Math.min(S,Math.max(0,P/2));}else {let P=n.inkBounds?.(u.text,x),C=n.inkBounds?.(p,I),E=Je(p,I,n);if(!P||!C||![P.left,P.right,C.left,C.right].every(Number.isFinite)||P.left<0||C.left<0||P.right<P.left||C.right<C.left||P.right>O||P.right>y/2+E||C.right>E||v.style.highlight||v.style.shading)continue;S=y/2;}}let T=Math.max(0,Math.min(y,S))/u.text.length;for(let k=s;k<e.length&&o[k]<u.utf16To;k++){let w=e[k],v=Math.max(0,u.utf16From-o[k]),I=Math.min(w.text.length,u.utf16To-o[k]);if(v===I)continue;let P=l.get(w);P||(P=[],l.set(w,P)),P.push({from:v,to:I,reduction:T,glyphOffset:g?-T:h?0:void 0});}}return l}function rb(e,t,n,r=false){let o=t.settings?.compression;if(!o||o==="doNotCompress")return e;let a=[],i=new WeakMap,l=QT(e,o==="compressPunctuationAndJapaneseKana",n,r);for(let s of e){let d=l.get(s);if(!d){a.push(s);continue}let c=0;for(let u of d){u.from>c&&a.push({...s,text:s.text.slice(c,u.from),start:s.start+c,end:s.start+u.from});let f=s.style.characterSpacingPt-u.reduction,p=i.get(s.style);p||(p=new Map,i.set(s.style,p));let m=p.get(f);m||(m={...s.style,characterSpacingPt:f},p.set(f,m)),a.push({...s,text:s.text.slice(u.from,u.to),start:s.start+u.from,end:s.start+u.to,style:m,...u.glyphOffset!==void 0?{glyphOffsetPt:u.glyphOffset}:{}}),c=u.to;}c===0?a.push(s):c<s.text.length&&a.push({...s,text:s.text.slice(c),start:s.start+c});}return a}function Ga(e,t,n,r,o){if(t.projected||t.measureText!==void 0)return false;let a=e[e.length-1];if(!a||!/^[\p{Pe}\p{Pf}\p{Po}]$/u.test(a)||!qT.test(a)&&!Qi(t.props))return false;let i=Ye(e).at(-1)?.text;if(!i||!/^[\p{Pe}\p{Pf}\p{Po}]$/u.test(i))return false;let l=Je(i,De(t.style,t.fontSlot),o);return r-l<=n+.001&&n>=-1e-3}var ob=/^[〈《「『【〔〖〘〚([{]$/u,ab=/^[、。〉》」』】〕〗〙〛),.]}]$/u,ol=/^[〈《「『【〔〖〘〚([{、。〉》」』】〕〗〙〛),.]}:]$/u,ib=/[〈《「『【〔〖〘〚([{、。〉》」』】〕〗〙〛),.]}:]/u,zr=.001;function lb(e){let t=e.style;return !e.revisions?.length&&!t.textOutline&&!t.underline&&!t.strike&&!t.doubleStrike&&!t.highlight&&!t.shading&&t.shaping?.direction!=="rtl"&&!ad(e.props)}function sb(e){return e.every(t=>lb(t)&&!t.projected&&!t.fieldAtom&&!t.equation&&!t.positionalTab&&!t.inlineDrawing&&t.measureText===void 0&&t.end-t.start===t.text.length&&Ye(t.text).every(n=>/^[ \n\f]$/u.test(n.text)||nt(n.text.codePointAt(0))||ol.test(n.text)))}function eI(e){return lb(e)&&!e.projected&&!e.fieldAtom&&!e.equation&&!e.caretEdges&&!e.lineEndWhitespace&&!e.wrapAdvanceBefore&&e.range.end-e.range.start===e.text.length}function tI(e,t,n){let r=[],o=0;for(let[a,i]of e.entries()){if(o+=i.text.length,o>4096||!eI(i))return;let l=De(i.style,i.fontSlot),s=0;for(let d of Ye(i.text)){if(d.text!==" "&&!nt(d.text.codePointAt(0))&&!ol.test(d.text))return;let c=d.utf16To===i.text.length?i.box.width:Je(i.text.slice(0,d.utf16To),l,t),u=c-s,f=i.range.start+d.utf16From,p=0,m=n.length-1;for(;p<m;){let h=p+m+1>>1;n[h].start<=f?p=h:m=h-1;}let g=n[p];r.push({sourceIndex:a,alreadyReduced:Math.max(0,(g.style.characterSpacingPt-i.style.characterSpacingPt)*d.text.length),natural:Je(d.text,{...l,characterSpacingPt:0},t),ink:t.inkBounds?.(d.text,l),reduction:0,shift:0,span:{...i,text:d.text,range:{...i.range,start:i.range.start+d.utf16From,end:i.range.start+d.utf16To},box:{...i.box,x:i.box.x+s,width:u}}}),s=c;}}return r}function mf(e){return e.ink!==void 0&&Number.isFinite(e.ink.left)&&Number.isFinite(e.ink.right)&&e.ink.right>=e.ink.left}function nI(e,t,n,r,o){let a=t.reduce((x,y)=>x+y.box.width,0),i=e.width+a-n;if(i<=zr||!r.inkBounds||e.drawings.length||!t.some(x=>ib.test(x.text))&&!e.spans.some(x=>ib.test(x.text)))return;for(let x=1;x<e.spans.length;x++){let y=e.spans[x-1];if(Math.abs(y.box.x+y.box.width-e.spans[x].box.x)>zr)return}let l=e.spans.length,s=tI([...e.spans,...t],r,o);if(!s)return;let d=s.find(x=>x.sourceIndex===l);if(nt(d.span.text.codePointAt(0))&&!ol.test(d.span.text)&&n-e.width+zr<d.natural/2)return;let c=s.at(-1);if(ab.test(c.span.text)&&mf(c)){let x=Math.max(c.natural/2,c.ink.right+(c.span.glyphOffsetPt??0));c.reduction=Math.min(i,Math.max(0,c.span.box.width-x)),i-=c.reduction;}let u=[];for(let x=1;x<s.length;x++){let y=s[x-1],O=s[x],S=y.span.text,T=O.span.text,k,w;if(ob.test(T)&&nt(S.codePointAt(0))&&!ol.test(S))k=O,w=true;else if(S==="\uFF1A"&&ob.test(T)||ab.test(S)&&nt(T.codePointAt(0))&&!ol.test(T))k=y,w=false;else continue;if(!mf(y)||!mf(O))continue;let v=y.span.box.width+(O.span.glyphOffsetPt??0)+O.ink.left-(y.span.glyphOffsetPt??0)-y.ink.right,I=Math.max(0,Math.min(k.natural/2-k.alreadyReduced,k.span.box.width-k.reduction,w?O.ink.left+(O.span.glyphOffsetPt??0):1/0,v));I>zr&&u.push({cell:k,capacity:I,left:w});}if(i>u.reduce((x,y)=>x+y.capacity,0)+zr)return;let f=u;for(;i>zr&&f.length;){let x=i/f.length,y=[];for(let O of f){let S=Math.min(x,O.capacity);O.cell.reduction+=S,O.left&&(O.cell.shift-=S),i-=S,O.capacity-S>zr&&y.push({...O,capacity:O.capacity-S});}f=y;}let p=[],m=[],g=[],h=e.spans[0]?.box.x??t[0].box.x,b=0;for(let x of s){let y=x.span,O=x.reduction>0,S={...y,...O?{style:{...y.style,characterSpacingPt:y.style.characterSpacingPt-x.reduction/y.text.length},glyphOffsetPt:(y.glyphOffsetPt??0)+x.shift}:{},box:{...y.box,x:h,width:y.box.width-x.reduction}};h+=S.box.width,x.sourceIndex<l?(g[x.sourceIndex]??=p.length,p.push(S)):(m.push(S),b+=S.box.width);}g[l]=p.length,e.spans.length=0;for(let x of p)e.spans.push(x);return e.width=n-b,{candidate:m,width:b,spanStarts:g}}function db(e,t,n,r){let o=new Map;return (a,i,l,s,d,c,u,f)=>{let p=o.get(s.start);if(p)return o.delete(s.start),p;if(!f||!n.inkBounds||!t)return;let m=[],g=i,h=l,b=s,x=d,y=c,O=0;for(;;){let I=e[g];if(I.projected||I.measureText!==void 0||I.equation||I.positionalTab||I.inlineDrawing||I.revisions?.length||(O+=h.length,O>4096||m.length>=256))return;if(m.push({text:h,range:b,props:I.props,style:I.style,fontSlot:I.fontSlot,glyphOffsetPt:I.glyphOffsetPt,fieldAtom:I.fieldAtom,box:{x:y,y:0,width:x,height:n.lineMetrics(De(I.style,I.fontSlot)).height}}),y+=x,b.end<I.end)break;let P=e[g+1];if(!P||t.decision(P,0)==="opens")break;g++;let C=t.boundaries(P)[0]??P.text.length;h=P.text.slice(0,C),b={...s,start:P.start,end:P.start+C},x=Je(h,De(P.style,P.fontSlot),n);}let S=0,T=false;for(let I=m.length-1;I>=0;I--){let P=m[I],C=P.text.replace(/ +$/u,"");if(S+=Je(P.text.slice(C.length),De(P.style,P.fontSlot),n),C.length){T=true;break}}if(S>0&&T&&y-c-S<=u-a.width+zr||r&&Ga(m.map(I=>I.text).join(""),e[g],u-a.width,y-c,n))return;let k=nI(a,m,u,n,e);if(!k)return;let w,v=0;for(let I of m){let P=[],C=0;for(;v<k.candidate.length&&k.candidate[v].range.start<I.range.end;){let D=k.candidate[v++];P.push(D),C+=D.box.width;}let E={candidate:P,width:C};w?o.set(I.range.start,E):w={...E,spanStarts:k.spanStarts};}return w}}function cb(e,t,n){let r=t.box.x;for(let o of n.candidate)e.push({...t,text:o.text,range:o.range,style:o.style,glyphOffsetPt:o.glyphOffsetPt,box:{...t.box,x:r,width:o.box.width}}),r+=o.box.width;}var XA=64,YA=31680,UA=720,qA=36,ub=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),al=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),rI=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),oI=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function il(e){return e.kind!=="textValue"}function wd(e,t){return e.attributes.find(n=>n.localName===t)?.value}function pf(e,t){for(let n of e.children)if(il(n)&&n.localName===t)return n}function fb(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function aI(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function mb(e,t){if(!t)return;let n=0;for(let r of t.children){if(n>=128)break;if(n+=1,!il(r)||r.localName!=="tab")continue;let o=aI(fb(wd(r,"pos"))??NaN);if(o===null)continue;let a=wd(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=rI.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let l=wd(r,"leader");e.set(o,{alignment:i,...l!==void 0&&oI.has(l)?{leader:l}:{}});}}function pb(e,t=36){let n=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<n.length&&o<64;o+=1){let[a,i]=n[o];r.push({positionPt:a/20,alignment:i.alignment,...iI(i)});}return {stops:Object.freeze(r),defaultIntervalPt:t}}function iI(e){return e.leader?{leader:e.leader}:{}}function gb(e){let t=new Map;for(let n of e)!n||!il(n)||mb(t,pf(n,"tabs"));return pb(t)}function hb(e){if(!e||!il(e))return al;let t=new Map;return mb(t,pf(e,"tabs")),pb(t)}function yb(e,t){return t===void 0||!Number.isFinite(t)||t<=0||t===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:t}}function bb(e){if(!e||!il(e))return 36;let t=pf(e,"defaultTabStop");if(!t)return 36;let n=fb(wd(t,"val"));return n===null||n<=0||n>31680?36:n/20}function ll(e,t,n){let r=Math.max(t,n);for(let i of e.stops)if(i.positionPt>t)return {positionPt:Math.min(i.positionPt,r),alignment:i.alignment,...i.leader?{leader:i.leader}:{}};let o=e.defaultIntervalPt>0?e.defaultIntervalPt:36,a=Math.ceil((t+1e-9)/o)*o;return a<=t&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function xb(e,t,n,r,o){let a=n;switch(e){case "center":a=n-r/2;break;case "right":a=n-r;break;case "decimal":a=n-o;break;default:a=n;}let i=a-t;return i>0?i:0}function kd(e){return `tabs(${e.stops.map(n=>`${n.alignment}@${Math.round(n.positionPt*1e3)}${n.leader?`/${n.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var lI=1,gf=1;function sl(e){let t=Math.max(e,1),n=3;if(t>=n){let i=t/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:t,insetPt:0}}let r=1,o=1,a=Math.max(t,n);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(t-a)/2}}var sI=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function dI(e){return sI.has(e)}function Sb(e,t){return dI(e)?sl(t).extentPt:t}function Rb(e){let t=false;for(let n of e){if(n.localName!=="pageBreakBefore")continue;let r=n.attributes?.val;t=r===void 0||Td(r);}return t}var cI=31680/20,Id=12,uI=3168,fI=14,cl=Object.freeze({rule:"auto",value:240}),mI=132,pI=1584,gI=["top","left","bottom","right","between","bar"],hI=Object.freeze({}),yI=/^[0-9A-Fa-f]{6}$/,bI=new Set(["nil","none"]);function vd(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function hf(e,t){return !Number.isFinite(e)||e<=0?0:e>t?t:e}function Pb(e){let t=vd(e,true);return t===null?0:hf(Ze(Xe(t)),cI)}function Td(e){return e!=="0"&&e!=="false"&&e!=="off"}function xI(e){return e===void 0||e==="auto"?null:yI.test(e)?e.toUpperCase():null}function dl(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Gn(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function tD(e,t){let n=null;for(let r of e)r.localName===t&&(n={...n??{},...r.attributes??{}});return n}function wb(e,t){let n=0,r=0,o=false,a=false;for(let i of e){if(i.localName!=="spacing")continue;let l=i.attributes?.before,s=i.attributes?.after;l!==void 0&&(n=Pb(l)),s!==void 0&&(r=Pb(s));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=Td(d)),c!==void 0&&(a=Td(c));}if(o||a){let i=t?.inList||t?.inTableCell?0:fI;o&&(n=i),a&&(r=i);}return {before:n,after:r}}function kb(e){let t,n;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(t=i);let l=a.attributes?.line;if(l!==void 0){let s=vd(l,true);s!==null&&(n=s);}}if(n===void 0)return cl;let r=t??"auto";if(r==="auto"){let a=n/240;return a>0?{rule:"auto",value:Math.min(a,mI)*240}:cl}let o=n/20;return o>0?{rule:r,value:Math.min(o,pI)}:cl}function Od(e,t,n){let r=e.rule==="auto"?t*(e.value/240):e.rule==="exact"?e.value:Math.max(t,e.value),o=r-t;return o<0?{height:r,baseline:Math.max(0,Math.min(n,r))}:e.rule==="exact"?{height:r,baseline:n+o/2}:{height:r,baseline:n}}function vb(e){let t=false;for(let n of e){if(n.localName!=="contextualSpacing")continue;let r=n.attributes?.val;t=r===void 0||Td(r);}return t}function $a(e){if(!e)return;let t=dl(e,"val");if(!t||bI.has(t))return;let n=vd(dl(e,"sz")),r=n===null?.5:hf(n/8,Id)||.5,o=vd(dl(e,"space")),a=o===null?0:hf(o,uI),i=dl(e,"shadow"),l=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:t,color:xI(dl(e,"color")),widthPt:r,spacePt:a,...l?{shadow:true}:{}}}function Tb(e){let t=$a(Gn(e,"top")),n=$a(Gn(e,"left")??Gn(e,"start")),r=$a(Gn(e,"bottom")),o=$a(Gn(e,"right")??Gn(e,"end")),a=$a(Gn(e,"between")),i=$a(Gn(e,"bar"));return {...t?{top:t}:{},...n?{left:n}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function Wr(e){if(!e||e.kind==="textValue")return {};let t=Gn(e,"pBdr");return t?Tb(t):{}}function Fd(e){let t=hI;for(let n of e){if(!n||n.kind==="textValue")continue;let r=Gn(n,"pBdr");r&&(t=Tb(r));}return t}function nn(e){return Sb(e.val,e.widthPt)}function No(e){return e?e.spacePt+nn(e):0}function nD(e){return No(e)}function Ib(e){let t=[];for(let n of gI){let r=e[n];r&&t.push(`${n}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return t.join("|")}function Ka(e,t){return Math.max(e,t)-t}function Ob(e,t,n,r){return n&&!r?0:Ka(e,t)}function Ao(e){let t=e.pageHeight;return Object.freeze({x:-e.marginLeft,y:-e.contentInsetTop,width:e.pageWidth,height:t!==void 0&&Number.isFinite(t)&&t>0?t:e.contentBandHeight+e.contentInsetTop+e.contentInsetBottom})}var Fb=21600;function at(e){return Number.isFinite(e)?e:0}function ul(e){if(e.length===0)return Object.freeze([]);let t=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),n=[],r=t[0];for(let o=1;o<t.length;o+=1){let a=t[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(n.push(r),r=a);}return n.push(r),Object.freeze(n)}function Md(e,t){let n=[];for(let r of e)for(let o of t){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&n.push(Object.freeze({start:a,end:i}));}return ul(n)}function yf(e,t,n){let r=[];for(let o of e){let a=Math.max(o.start,t),i=Math.min(o.end,n);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return ul(r)}function SI(e,t,n){let r=[],o=t;for(let a of e)a.start>o&&r.push(Object.freeze({start:o,end:a.start})),o=Math.max(o,a.end);return o<n&&r.push(Object.freeze({start:o,end:n})),Object.freeze(r)}function Mb(e,t){return Xa(e,t)}function bf(e,t,n){return Mb(Xa(e,t),n)}function PI(e,t){let n=[],r=Math.min(e.length,Ct);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(t<d||t>c||t===c&&s>l||t===d&&s<l)continue;let u=(t-l)/(s-l),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&n.push({x:f,delta:s>l?1:-1});}return n.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(n)}function RI(e,t){let n=[],r=Math.min(e.length,Ct);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(t-a.y)>1e-6)continue;let l=Math.min(a.x,i.x),s=Math.max(a.x,i.x);s>l&&n.push(Object.freeze({start:l,end:s}));}return ul(n)}function Cb(e,t,n){let r=wI(PI(e,t),n),o=RI(e,t);return ul([...r,...o])}function wI(e,t){if(e.length===0)return Object.freeze([]);let n=[];if(t==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,l=e[a+1].x;l>i&&n.push(Object.freeze({start:i,end:l}));}return Object.freeze(n)}let r=0,o=null;for(let a of e){let i=r;r+=a.delta,i===0&&r!==0?o=a.x:i!==0&&r===0&&o!==null&&(a.x>o&&n.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(n)}function kI(e,t){return Object.freeze({top:at(e.top)+at(t.top),right:at(e.right)+at(t.right),bottom:at(e.bottom)+at(t.bottom),left:at(e.left)+at(t.left)})}function vI(e,t,n,r,o,a){let i=t.x-e.x,l=t.y-e.y,s=r.x-n.x,d=r.y-n.y,c=i*d-l*s;if(Math.abs(c)<1e-12)return null;let f=((n.x-e.x)*l-(n.y-e.y)*i)/c,p=((n.x-e.x)*d-(n.y-e.y)*s)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let m=e.y+f*l;return !Number.isFinite(m)||m<o-1e-6||m>a+1e-6?null:m}function TI(e,t,n,r){let o=[],a=Math.min(e.length,Ct),i=Math.min(t.length,Ct);if(a<2||i<2)return Object.freeze([]);let l=Ct*Ct,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=t[f],m=t[(f+1)%i],g=vI(c,u,p,m,n,r);g!==null&&o.push(g);}}return Object.freeze(o)}function II(e,t,n){let r=new Set;r.add(t),r.add(n);for(let o of e){let a=Math.min(o.length,Ct);for(let i=0;i<a;i+=1){let l=o[i].y;Number.isFinite(l)&&l>=t-1e-6&&l<=n+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 [t,n]){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 TI(e[0],e[1],t,n))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function OI(e,t,n,r){let o=Cb(e,n,r);return t&&t.length>=3&&(o=Md(o,Cb(t,n,"nonzero"))),o}function Bb(e,t,n,r,o=null){let a=at(n.top),i=at(n.bottom),l=at(n.left),s=at(n.right),d=t-i,c=t+a,u=II(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((m,g)=>{if(g+1>=u.length)return [];let h=u[g+1];return h<=m+1e-6?[m]:[m,h,(m+h)/2]}):[d];for(let m of p){let g=OI(e,o,m,r);for(let h of g)f.push(Object.freeze({start:h.start-l,end:h.end+s}));}return ul(f)}function Lb(e){let{x:t,y:n,width:r,height:o}=e;return Object.freeze([Object.freeze({x:t,y:n}),Object.freeze({x:t+r,y:n}),Object.freeze({x:t+r,y:n+o}),Object.freeze({x:t,y:n+o})])}function FI(e){let t=Math.max(0,at(e.extentWidthPt)),n=Math.max(0,at(e.extentHeightPt)),r=Bd(e.transform,t,n),o=Math.min(e.polygonEmu.length,Ct);if(o<3)return Lb({x:e.anchorX,y:e.anchorY,width:t,height:n});let a=r.width/Fb,i=r.height/Fb,l=[];for(let s=0;s<o;s+=1){let d=e.polygonEmu[s];l.push(Object.freeze({x:at(d.x)*a,y:at(d.y)*i}));}return Ld({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:t,layoutHeight:n,anchorX:e.anchorX,anchorY:e.anchorY})}function CI(e,t){let n=t.effectInsets??Cd,r=t.wrapDistances??Cd,o=at(t.contentLeft),a=at(t.contentRight);if(t.mode==="topAndBottom"){let c=Mb(Xa(t.contentBounds,n),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):yf([{start:o,end:a}],o,a)}if(t.mode==="square"){let c=bf(t.contentBounds,n,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):yf([{start:c.x,end:c.x+c.width}],o,a)}let i=t.polygon&&t.polygon.length>=3?t.polygon:Lb(t.contentBounds),l=t.mode==="through"?"evenodd":"nonzero",s=kI(r,n),d=Bb(i,e,s,l,t.clipPolygon);return yf(d,o,a)}function MI(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(t=>t.start)),end:Math.max(...e.map(t=>t.end))})}function BI(e,t,n,r,o){if(n==="bothSides"||t.length===0)return e;let a=MI(t);if(!a)return e;if(n==="left")return Object.freeze(e.filter(s=>s.end<=a.start+1e-4));if(n==="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 Eb(e,t){let n=CI(e,t),r=SI(n,t.contentLeft,t.contentRight);return BI(r,n,t.textSide,t.contentLeft,t.contentRight)}function LI(e,t,n,r){return n.length<3?false:Bb(n,t,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function xf(e,t,n){let r=n.effectInsets??Cd,o=n.hitBounds;if(e<o.x||e>o.x+o.width||t<o.y||t>o.y+o.height)return false;if(n.clipPolygon&&n.clipPolygon.length>=3)return LI(e,t,n.clipPolygon,r);let a=Xa(n.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height}function Nb(e){let t=Object.freeze({top:at(e.wrapDistancesEmu.top/$n),right:at(e.wrapDistancesEmu.right/$n),bottom:at(e.wrapDistancesEmu.bottom/$n),left:at(e.wrapDistancesEmu.left/$n)}),n=e.mode==="tight"||e.mode==="through"?FI({polygonEmu:e.polygonEmu,extentWidthPt:e.extentWidthPt,extentHeightPt:e.extentHeightPt,anchorX:e.contentBounds.x,anchorY:e.contentBounds.y,transform:e.transform}):null;return Object.freeze({mode:e.mode,contentBounds:e.contentBounds,polygon:n,clipPolygon:e.geometry.clipPolygon,wrapDistances:t,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var Ut=1e5,Ct=m.maxPolygonPoints,Cd=Object.freeze({top:0,right:0,bottom:0,left:0}),EI=32,NI=.1,AI=new Set(["rect","ellipse","roundRect"]);function Oe(e){return Number.isFinite(e)?e:0}function mn(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):t}function Ab(e,t){let n=e+t;return Number.isFinite(n)?n:0}function Db(e,t,n){let r=mn(e,0,n),o=mn(t,0,n);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=n){let i=(n-1)/a;r*=i,o*=i;}return {left:r,right:o}}function DI(e){let t=Db(mn(e.left,0,Ut),mn(e.right,0,Ut),Ut),n=Db(mn(e.top,0,Ut),mn(e.bottom,0,Ut),Ut);return Object.freeze({left:t.left,top:n.left,right:t.right,bottom:n.right})}function _I(e){let t=DI({left:e.left*Ut,top:e.top*Ut,right:e.right*Ut,bottom:e.bottom*Ut});return Object.freeze({left:t.left/Ut,top:t.top/Ut,right:t.right/Ut,bottom:t.bottom/Ut})}function jI(e){let t=n=>{if(!Number.isFinite(n))return 0;let r=n/$n;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:t(e.top),right:t(e.right),bottom:t(e.bottom),left:t(e.left)})}function Xa(e,t){let n=Oe(t.left),r=Oe(t.right),o=Oe(t.top),a=Oe(t.bottom);return Object.freeze({x:e.x-n,y:e.y-o,width:Math.max(0,Ab(e.width,n+r)),height:Math.max(0,Ab(e.height,o+a))})}function HI(e,t,n){let r=e*mn(n.left,0,1),o=t*mn(n.top,0,1),a=e*(1-mn(n.right,0,1)),i=t*(1-mn(n.bottom,0,1));if(a<=r||i<=o){let l=e/2,s=t/2;return Object.freeze({left:l,top:s,right:l,bottom:s})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function Bd(e,t,n){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?Oe(Vr(r)??t):Math.max(0,Oe(t)),l=o>0?Oe(Vr(o)??n):Math.max(0,Oe(n));return Object.freeze({offsetX:Oe(Vr(a.x)??0),offsetY:Oe(Vr(a.y)??0),width:i,height:l})}function zI(e,t,n,r){let o=HI(t,n,r),a=o.right-o.left,i=o.bottom-o.top,l=t>0?t:1,s=n>0?n:1,d=[],c=Math.min(e.length,Ct);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+mn(f.x/l,0,1)*a,m=i<=0?o.top:o.top+mn(f.y/s,0,1)*i;d.push(Object.freeze({x:Oe(p),y:Oe(m)}));}return Object.freeze(d)}function _b(e,t,n){let r=e.x-t.x,o=e.y-t.y;n.flipHorizontal&&(r=-r),n.flipVertical&&(o=-o);let a=Oe(n.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:Oe(s+t.x),y:Oe(d+t.y)})}function jb(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let t=e[0].x,n=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,Ct);for(let i=1;i<a;i+=1){let l=e[i];!Number.isFinite(l.x)||!Number.isFinite(l.y)||(t=Math.min(t,l.x),n=Math.max(n,l.x),r=Math.min(r,l.y),o=Math.max(o,l.y));}return Object.freeze({x:t,y:r,width:Math.max(0,n-t),height:Math.max(0,o-r)})}function Sf(e){let t=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),n=fl(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let l of n)r.push(_b(Object.freeze({x:l.x+e.offsetX,y:l.y+e.offsetY}),t,e.transform));let o=jb(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,Oe(e.layoutWidth))/a,scaleY:Math.max(0,Oe(e.layoutHeight))/i,anchorX:Oe(e.anchorX),anchorY:Oe(e.anchorY)})}function WI(e,t){return Object.freeze({x:Oe(t.anchorX+(e.x-t.bboxX)*t.scaleX),y:Oe(t.anchorY+(e.y-t.bboxY)*t.scaleY)})}function Ld(e){let t=e.mapping??Sf({sourceWidth:e.sourceWidth,sourceHeight:e.sourceHeight,offsetX:e.offsetX,offsetY:e.offsetY,transform:e.transform,layoutWidth:e.layoutWidth,layoutHeight:e.layoutHeight,anchorX:e.anchorX,anchorY:e.anchorY}),n=zI(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(n.length>0?n.length:e.points.length,Ct),o=n.length>0?n:e.points.slice(0,r),a=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),i=[];for(let l=0;l<r;l+=1){let s=o[l],d=Object.freeze({x:Oe(s.x+e.offsetX),y:Oe(s.y+e.offsetY)});i.push(WI(_b(d,a,e.transform),t));}return Object.freeze(i)}function fl(e,t,n,r){if(n<=0||r<=0){let o=Object.freeze({x:e,y:t});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:t}),Object.freeze({x:e+n,y:t}),Object.freeze({x:e+n,y:t+r}),Object.freeze({x:e,y:t+r})])}function VI(e,t,n){if(!e||!AI.has(e))return null;if(t<=0||n<=0)return fl(0,0,Math.max(0,t),Math.max(0,n));if(e==="rect")return fl(0,0,t,n);if(e==="ellipse"){let l=[],s=t/2,d=n/2,c=t/2,u=n/2,f=Math.min(EI,Ct);for(let p=0;p<f;p+=1){let m=p/f*Math.PI*2;l.push(Object.freeze({x:s+c*Math.cos(m),y:d+u*Math.sin(m)}));}return Object.freeze(l)}let r=Math.min(t,n)*NI,o=Math.max(0,r),a=t,i=n;return Object.freeze([Object.freeze({x:o,y:0}),Object.freeze({x:a-o,y:0}),Object.freeze({x:a,y:o}),Object.freeze({x:a,y:i-o}),Object.freeze({x:a-o,y:i}),Object.freeze({x:o,y:i}),Object.freeze({x:0,y:i-o}),Object.freeze({x:0,y:o})])}function Ua(e){return Object.freeze({x:Oe(e.x),y:Oe(e.y)})}function GI(e,t){if(e.length===0)return Object.freeze([]);let n=t.x+t.width,r=t.y+t.height,o=(i,l,s)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,Ct);for(let u=0;u<c;u+=1){let f=Ua(i[u]),p=Ua(i[(u+1)%c]),m=l(f),g=l(p);if(m&&g?d.push(p):m&&!g?d.push(Ua(s(f,p))):!m&&g&&(d.push(Ua(s(f,p))),d.push(p)),d.length>=Ct)break}return Object.freeze(d.slice(0,Ct))},a=e.slice(0,Ct).map(Ua);return a=[...o(a,i=>i.x>=t.x,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(t.x-i.x)/s:0;return Object.freeze({x:t.x,y:Oe(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.x<=n,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(n-i.x)/s:0;return Object.freeze({x:n,y:Oe(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.y>=t.y,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(t.y-i.y)/s:0;return Object.freeze({x:Oe(i.x+d*(l.x-i.x)),y:t.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:Oe(i.x+d*(l.x-i.x)),y:r})})],Object.freeze(a)}function $I(e){let t=jb(e);return Object.freeze({x:t.x,y:t.y,width:t.width,height:t.height})}function Ed(e,t){let n=KI(e.paintBounds,t),r=n.width>0&&n.height>0?n:Object.freeze({...n}),o=a=>{if(!a||a.length===0)return a;let i=GI(a,t);return i.length>=3?Object.freeze(i.map(Ua)):Object.freeze([])};return Object.freeze({...e,paintBounds:n,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function KI(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return o<=n||a<=r?Object.freeze({x:n,y:r,width:0,height:0}):Object.freeze({x:n,y:r,width:o-n,height:a-r})}function XI(e){let t=Math.max(0,Oe(e.extentWidth)),n=Math.max(0,Oe(e.extentHeight)),r=Oe(e.anchorX),o=Oe(e.anchorY),a=_I(e.crop),i=jI(e.effectExtentEmu),l=Bd(e.transform,t,n),s=Object.freeze({x:r,y:o,width:t,height:n}),d={sourceWidth:l.width,sourceHeight:l.height,offsetX:l.offsetX,offsetY:l.offsetY,crop:a,transform:e.transform,layoutWidth:t,layoutHeight:n,anchorX:r,anchorY:o},c=Sf(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=Ld({points:fl(0,0,l.width,l.height),...d,crop:u,mapping:c}),p=VI(e.presetGeometry,l.width,l.height),m="none",g=p;g||(m=e.presetGeometry?"unsupported-preset":"none",g=fl(0,0,l.width,l.height));let h=Ld({points:g,...d,crop:u,mapping:c}),b=$I(h.length>=3?h:f),x=Xa(b,i);return Object.freeze({contentBounds:s,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:h.length>=3?h:f,clipFallback:m,effectInsets:i})}function qa(e){let t=e.projection.picture,n=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return XI({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:t?.crop??{left:0,top:0,right:0,bottom:0},transform:t?.transform??n,presetGeometry:t?.presetGeometry??null})}function YI(e){let{transform:t,contentWidth:n,contentHeight:r}=e;if(n<=0||r<=0)return null;let o=Bd(t,n,r),a=o.width,i=o.height,l=Sf({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:t,layoutWidth:n,layoutHeight:r,anchorX:0,anchorY:0}),s=Oe(t.rotationDegrees),d=Math.abs(s%360)>1e-4,c=t.flipHorizontal?-1:1,u=t.flipVertical?-1:1,f=l.scaleX,p=l.scaleY,m=a>0?a/n:1,g=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(m-1)<1e-4&&Math.abs(g-1)<1e-4)return null;let b=s*Math.PI/180,x=Math.cos(b),y=Math.sin(b),O=o.offsetX+a/2,S=o.offsetY+i/2,T=f*x*c,k=-f*y*u,w=p*y*c,v=p*x*u,I=f*(O-x*c*(a/2)+y*u*(i/2)-l.bboxX),P=p*(S-y*c*(a/2)-x*u*(i/2)-l.bboxY);return Object.freeze({a:Oe(T*m),b:Oe(w*m),c:Oe(k*g),d:Oe(v*g),e:Oe(I),f:Oe(P)})}function cD(e){let t=YI(e);if(t)return `matrix(${Ya(t.a)}, ${Ya(t.b)}, ${Ya(t.c)}, ${Ya(t.d)}, ${Ya(t.e)}, ${Ya(t.f)})`}function Ya(e){return Number.isFinite(e)?String(e):"0"}function Hb(e,t){let n=(r,o)=>{if(!(o>=la)){if(r.kind==="run"){for(let a of r.children)t(a);return}if(na$1(r)){for(let a of r.children)n(a,o+1);return}if(Dd$1(r))for(let a of Gd$1(r))n(a,o+1);}};for(let r of e.children)n(r,0);}function Nd(e,t){let n=[],r=(o,a)=>{if(!(a>=la)){if(o.kind==="run"){for(let i of o.children)(i.kind==="drawing"||hb$1(i)||Sa(i))&&t(i,n,o);return}if(na$1(o)){n.push(o);for(let i of o.children)r(i,a+1);n.pop();return}if(Dd$1(o)){n.push(o);for(let i of Gd$1(o))r(i,a+1);n.pop();}}};for(let o of e.children)r(o,0);}function ml(e){if(e.kind==="text"||e.kind==="deletedText"){let t="";for(let n of e.children)n.kind==="textValue"&&(t+=n.value);return t}return e.kind==="tab"?" ":e.kind==="hardBreak"?Wd$1(e):""}function Wa(e){if(!e||e.kind==="textValue")return [];let t=[];for(let n of e.children){if(n.kind==="textValue")continue;if(n.localName==="textOutline"){let a=dh(n);a&&t.push(a);continue}let r={};for(let a of n.attributes)r[a.localName]=a.value;let o=Object.keys(r).length>0;if(n.localName==="rPrChange"||n.localName==="pPrChange"){let a=o?{localName:n.localName,attributes:r,revisionNodeId:n.id}:{localName:n.localName,revisionNodeId:n.id};t.push(a);continue}t.push(o?{localName:n.localName,attributes:r}:{localName:n.localName});}return t}function Za(e,t,n){let r=Wa(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return n?[...n(t,r)]:t.length===0?r:[...t,...r]}var zb=new WeakMap;function UI(e){if(e.kind!=="run")return false;let t=zb.get(e);return t===void 0&&(t=Ne(Za(e,[])).hidden,zb.set(e,t)),t}function zt(e,t){if(e.kind!=="paragraph")return [];let n=[];return Nd(e,(r,o,a)=>{let i=br;for(let l of o){let s=Xt(l)?tn(l):null;s&&(i=fn(i,s));}if(r.kind==="drawing"){let l=t.projectionForAtom?.(r.id)??t.project(r);l?.kind==="anchored"&&n.push({atomId:r.id,projection:l,revisions:i});return}if(hb$1(r)||Sa(r)){if(Sa(r)&&UI(a))return;let l=t.projectionForAtom?.(r.id)??null;l?.kind==="anchored"&&n.push({atomId:r.id,projection:l,revisions:i});}}),Object.freeze(n)}function pn(e){let t=new Map;if(e.kind!=="paragraph")return t;let n;return Hb(e,r=>{if(r.kind!=="drawing"&&!hb$1(r)&&!Sa(r))return;let o=(n??=Pe(e)).spanOf(r);o&&t.set(r.id,o.start);}),t}var qI=new Map([["http://schemas.openxmlformats.org/drawingml/2006/chart","chart"],["http://schemas.openxmlformats.org/drawingml/2006/diagram","diagram"],["http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","group"],["http://schemas.microsoft.com/office/word/2010/wordprocessingShape","textbox"],["http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas","canvas"]]),ZI=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),JI=Object.freeze({left:0,top:0,right:0,bottom:0});function Gb(e){let t=e.picture,n=null;if(!t){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";n=qI.get(o)??"graphic";break}n===null&&(n="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:t?.crop??JI,transform:t?.transform??ZI,placeholderGraphicKind:t||e.legacyGraphic?null:n,vectorShape:e.vectorShape})}var $n=12700;function Tt(e){return e/$n}function Vr(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*$n*72)return null;let t=e/$n;return Number.isFinite(t)?t:null}function Xn(e){let t=Tt(e.inlineDistancesEmu.left),n=Tt(e.inlineDistancesEmu.right),r=Tt(e.inlineDistancesEmu.top),o=Tt(e.inlineDistancesEmu.bottom),a=Tt(e.effectExtentEmu.left),i=Tt(e.effectExtentEmu.right),l=Tt(e.effectExtentEmu.top),s=Tt(e.effectExtentEmu.bottom),d=Tt(e.extentEmu.cx),c=Tt(e.extentEmu.cy);return Object.freeze({distL:t,distR:n,distT:r,distB:o,effectL:a,effectR:i,effectT:l,effectB:s,width:d,height:c,totalWidth:t+a+d+i+n,lineContribution:r+l+c+s+o})}function $b(e,t,n){let r=Math.max(n.distT+n.effectT,e-n.height),o=Math.max(t,r-n.effectT+n.height+n.effectB+n.distB),a=r+n.height+n.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function Ad(e,t,n){if(Math.abs(t)<1e-4&&Math.abs(n)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+t,y:a.y+n}),o=a=>Object.freeze({x:a.x+t,y:a.y+n});return Object.freeze({...e,contentBounds:r(e.contentBounds),paintBounds:r(e.paintBounds),hitBounds:r(e.hitBounds),transformedCorners:Object.freeze(e.transformedCorners.map(o)),clipPolygon:e.clipPolygon?Object.freeze(e.clipPolygon.map(o)):null})}function Yn(e,t,n){return Math.abs(t)<1e-4&&Math.abs(n)<1e-4?e:Object.freeze({...e,x:e.x+t,y:e.y+n,advanceStart:e.advanceStart+t,advanceEnd:e.advanceEnd+t,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+t,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+t,y:e.hitBounds.y+n}),geometry:Ad(e.geometry,t,n)})}function Pf(e,t){return e.length===0?e:e.map(n=>{let r=n.geometry.effectInsets.bottom,o=t-n.height-r,a=o-n.y;return Math.abs(a)<1e-4&&n.baselineOffset===t?n:Object.freeze({...n,y:o,baselineOffset:t,geometry:Ad(n.geometry,0,a),paintBounds:Object.freeze({...n.paintBounds,y:n.paintBounds.y+a}),hitBounds:Object.freeze({...n.hitBounds,y:n.hitBounds.y+a})})})}function Rf(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return o<=n||a<=r?Object.freeze({x:n,y:r,width:0,height:0}):Object.freeze({x:n,y:r,width:o-n,height:a-r})}function Dd(e,t){let n=Rf(e.paintBounds,t),r=n.width>0&&n.height>0?n:Object.freeze({...n}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=Ad(e.geometry,o,a);return Object.freeze({...e,paintBounds:n,hitBounds:r,geometry:Ed(i,t)})}var Wb=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),Vb=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function Kn(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function Kb(e,t){return !(!t.layoutInCell||t.cellBox===null||!Number.isFinite(t.cellBox.height)||t.cellBox.height<=0||!Number.isFinite(t.cellBox.width)||t.cellBox.width<=0)}function Xb(e,t){if(Kb(e,t)){let s=t.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:t.anchorCharacterX,right:t.anchorCharacterX,center:t.anchorCharacterX};case "insideMargin":return Kn(t)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return Kn(t)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let n=-t.marginLeft,r=t.contentWidth+t.marginRight,o=0,a=t.contentWidth,i=t.columnBox.x,l=t.columnBox.x+t.columnBox.width;switch(e){case "page":return {left:n,right:r,center:(n+r)/2};case "margin":return {left:o,right:a,center:o+t.contentWidth/2};case "column":return {left:i,right:l,center:i+t.columnBox.width/2};case "character":return {left:t.anchorCharacterX,right:t.anchorCharacterX,center:t.anchorCharacterX};case "leftMargin":return {left:n,right:n,center:n};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return Kn(t)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return Kn(t)?{left:r,right:r,center:r}:{left:n,right:n,center:n};default:return null}}function Yb(e,t){if(Kb(e,t)){let c=t.cellBox;if(!c)return null;let{y:u,height:f}=c;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:u,bottom:u+f,center:u+f/2};case "paragraph":return {top:t.paragraphBox.y,bottom:t.paragraphBox.y+t.paragraphBox.height,center:t.paragraphBox.y+t.paragraphBox.height/2};case "line":return {top:t.anchorLineBox.y,bottom:t.anchorLineBox.y+t.anchorLineBox.height,center:t.anchorLineBox.y+t.anchorLineBox.height/2};case "insideMargin":return Kn(t)?{top:u,bottom:u+f,center:u+f/2}:{top:u+f,bottom:u+f,center:u+f};case "outsideMargin":return Kn(t)?{top:u+f,bottom:u+f,center:u+f}:{top:u,bottom:u+f,center:u+f/2};default:return null}}let n=-t.contentInsetTop,r=t.contentBandHeight,o=n+t.pageHeight-t.marginBottom,a=r+t.contentInsetBottom,i=0,l=t.contentHeight,s=t.verticalMarginFrame?.top??i,d=s+(t.verticalMarginFrame?.height??t.contentHeight);switch(e){case "page":return {top:n,bottom:a,center:(n+a)/2};case "margin":return {top:s,bottom:d,center:(s+d)/2};case "paragraph":return {top:t.paragraphBox.y,bottom:t.paragraphBox.y+t.paragraphBox.height,center:t.paragraphBox.y+t.paragraphBox.height/2};case "line":return {top:t.anchorLineBox.y,bottom:t.anchorLineBox.y+t.anchorLineBox.height,center:t.anchorLineBox.y+t.anchorLineBox.height/2};case "topMargin":return {top:n,bottom:n,center:n};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return Kn(t)?{top:i,bottom:i,center:i}:{top:l,bottom:l,center:l};case "outsideMargin":return Kn(t)?{top:a,bottom:a,center:a}:{top:n,bottom:n,center:n};default:return null}}function Ub(e){return e===null?0:Vr(e)}function QI(e,t,n){let r=Kn(n);if(n.layoutInCell&&n.cellBox&&Number.isFinite(n.cellBox.width)&&n.cellBox.width>0){let{x:o,width:a}=n.cellBox;return e==="inside"?r?o:o+a-t:e==="outside"?r?o+a-t:o:null}return e==="inside"?r?0:n.contentWidth-t:e==="outside"?r?n.contentWidth-t:0:null}function eO(e,t,n){let r=Kn(n),o=n.contentBandHeight;if(n.layoutInCell&&n.cellBox&&Number.isFinite(n.cellBox.height)&&n.cellBox.height>0){let{y:a,height:i}=n.cellBox;return e==="inside"?r?a:a+i-t:e==="outside"?r?a+i-t:a:null}return e==="inside"?r?0:o-t:e==="outside"?r?o-t:0:null}function tO(e,t,n,r,o){let a=Xb(e,o);if(!a)return null;let i=Ub(n);if(i===null)return null;if(t==="left")return a.left+i;if(t==="center")return a.center-r/2+i;if(t==="right")return a.right-r+i;if(t==="inside"||t==="outside"){let l=QI(t,r,o);if(l!==null)return l+i}return a.left+i}function nO(e,t,n,r,o){let a=Yb(e,o);if(!a)return null;let i=Ub(n);if(i===null)return null;if(t==="top")return a.top+i;if(t==="center")return a.center-r/2+i;if(t==="bottom")return a.bottom-r+i;if(t==="inside"||t==="outside"){let l=eO(t,r,o);if(l!==null)return l+i}return a.top+i}function wf(e,t){let n=Xn(e),r=e.position,o=e.anchor,a="page",i="page";if(!r||!o)return Object.freeze({x:0,y:0,horizontalFrame:a,verticalFrame:i,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"});if(o.simplePos){let g=Vr(r.simplePosition.xEmu),h=Vr(r.simplePosition.yEmu);return Object.freeze(g===null||h===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:g-t.marginLeft,y:h-t.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let l=r.horizontal.relativeFrom,s=r.vertical.relativeFrom,d=Xb(l,t),c=Yb(s,t),u=d?.left??0,f=c?.top??0;if(!Wb.has(l)||!Vb.has(s))return Object.freeze({x:0,y:0,horizontalFrame:Wb.has(l)?l:a,verticalFrame:Vb.has(s)?s:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=tO(l,r.horizontal.align,r.horizontal.offsetEmu,n.width,t),m=nO(s,r.vertical.align,r.vertical.offsetEmu,n.height,t);return Object.freeze(p===null||m===null?{x:0,y:0,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:m,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function rO(e){let t=e.input.projection,n=t.anchor,r=Xn(t),o=qa({projection:t,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?Rf(o.paintBounds,e.clipRegion):o.paintBounds,i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"anchoredDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.anchorParagraphId,anchorParagraphId:e.anchorParagraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:e.resolved.x,y:e.resolved.y,width:r.width,height:r.height,horizontalFrame:e.resolved.horizontalFrame,verticalFrame:e.resolved.verticalFrame,horizontalFrameOrigin:e.resolved.horizontalFrameOrigin,verticalFrameOrigin:e.resolved.verticalFrameOrigin,behindDocument:n?.behindDocument??false,allowOverlap:n?.allowOverlap??true,layoutInCell:n?.layoutInCell??true,relativeHeight:n?.relativeHeight??0,wrap:t.wrap==="inline"?"inFront":t.wrap,...e.sourceOrder!==void 0?{sourceOrder:e.sourceOrder}:{},...e.resolved.layoutFallback?{layoutFallback:e.resolved.layoutFallback}:{},...e.textboxStory?{textboxStory:e.textboxStory}:{},...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{},paintBounds:a,hitBounds:i,geometry:e.clipRegion?Ed(o,e.clipRegion):o,resource:e.input.resource,accessibility:kb$1(t),...Gb(t)})}function oO(e,t,n){let r=(a,i,l)=>Je(a,De(i,l),n);for(let a of e.spans){if(t<a.range.start)break;if(t<a.range.end){if(n&&a.text!==void 0&&a.style!==void 0){let s=t-a.range.start;return a.box.x+r(a.text.slice(0,s),a.style,a.fontSlot)}let i=a.range.end-a.range.start;if(i<=0)return a.box.x;let l=t-a.range.start;return a.box.x+a.box.width*l/i}if(t===a.range.end)return n&&a.text!==void 0&&a.style!==void 0?a.box.x+r(a.text,a.style,a.fontSlot):a.box.x+a.box.width}let o;for(let a of e.spans)a.range.end<=t&&(o=a);return o?n&&o.text!==void 0&&o.style!==void 0?o.box.x+r(o.text,o.style,o.fontSlot):o.box.x+o.box.width:e.box.x}function aO(e,t){let n=e.range.start;for(let r of e.spans)r.range.end<=t&&(n=r.range.end);return n}function kf(e,t,n){if(!(Math.abs(n)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===t&&(!o.layoutInCell&&!["paragraph","line"].includes(o.verticalFrame)||(e[r]=Object.freeze({...o,y:o.y+n,geometry:Ad(o.geometry,0,n),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+n}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+n})})));}}function Gr(e){let t=zt(e.paragraph,e.drawingLayout);if(t.length===0)return [];let n=pn(e.paragraph),r=e.displayMode??_e,o=[];for(let a of t){let i=a.projection;if(i.hidden)continue;let l=qu(a.revisions,r,e.revisionAuthorFilter);if(l===null)continue;let s=n.get(a.atomId);if(s===void 0||e.fragmentRange&&(s<e.fragmentRange.start||s>=e.fragmentRange.end))continue;let d=e.lines.find(y=>s>=y.range.start&&s<y.range.end);if(!d)continue;let c=i.anchor?.layoutInCell??true,f=i.position?.horizontal.relativeFrom==="character"?aO(d,s):s,p=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:d.box,anchorCharacterX:oO(d,f,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:c}),m=wf(i,p),g=i.wrap!=="inFront"&&i.wrap!=="behind"&&c&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0,h=i.position?.vertical.relativeFrom==="margin"?e.pageClip:Ao(e.frameBase),b=g?e.cellBox:h,x=rO({input:Object.freeze({drawingNodeId:a.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:i,resource:e.drawingLayout.resourceOf(i)}),anchorParagraphId:e.paragraphId,start:f,resolved:m,clipRegion:b,revisions:l,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(i.drawingNodeId)}:{},...i.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(i)}:{}});o.push(x);}return Object.freeze(o)}function qb(e){let t=Xn(e.input.projection),n=e.slotX+t.distL+t.effectL,r=qa({projection:e.input.projection,anchorX:n,anchorY:e.y,extentWidth:t.width,extentHeight:t.height}),o=e.contentTop!==void 0&&e.contentBottom!==void 0?Object.freeze({x:e.contentLeft,y:e.contentTop,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,e.contentBottom-e.contentTop)}):Object.freeze({x:e.contentLeft,y:r.paintBounds.y,width:Math.max(0,e.contentRight-e.contentLeft),height:r.paintBounds.height}),a=Rf(r.paintBounds,o),i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"inlineDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.paragraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:n,y:e.y,width:t.width,height:t.height,distL:t.distL,distR:t.distR,distT:t.distT,distB:t.distB,advanceStart:e.slotX,advanceEnd:e.slotX+t.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:Ed(r,o),resource:e.input.resource,accessibility:kb$1(e.input.projection),...Gb(e.input.projection),...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{}})}var iO=256,If=8,Do=8,Ja=class extends Error{name="DrawingExclusionConvergenceError";constructor(t="drawing exclusion reflow did not converge"){super(t);}};function lO(e,t){let n=Math.max(1,t.columnCount);if(n<=1)return 0;let r=e.x+e.width/2;if(t.columnLefts&&t.columnWidths&&t.columnLefts.length===n){for(let i=0;i<n;i+=1){let l=t.columnLefts[i],s=l+t.columnWidths[i];if(r>=l-.001&&r<s+.001)return i}return n-1}let o=t.columnGapPt,a=(t.contentWidth-o*(n-1))/n;for(let i=0;i<n;i+=1){let l=i*(a+o),s=l+a;if(r>=l-.001&&r<s+.001)return i}return n-1}function Tf(e){return e.behindDocument?"behind":"inFront"}function Jb(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function sO(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 dO(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function Of(e){let t=sO(e.projection.wrap);if(!t||!e.projection.wrapGeometry)return null;let n=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return Nb({mode:t,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:n.distancesEmu,polygonEmu:n.polygon,crop:e.projection.picture?.crop??{},transform:e.projection.picture?.transform??{rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:{x:0,y:0},extentEmu:{cx:0,cy:0}},extentWidthPt:e.geometry.contentBounds.width,extentHeightPt:e.geometry.contentBounds.height,textSide:t==="square"?dO(e.projection.wrap):n.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Ff(e){if(e.mode==="topAndBottom"||e.mode==="square")return bf(e.contentBounds,e.effectInsets,e.wrapDistances);let t=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)t.push(o.y);let n=Math.min(...t)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...t)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:n,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-n)})}function cO(e){if(e.drawing.behindDocument||!Jb(e.drawing.wrap))return null;let t=e.yOverride??e.drawing.y,n=Of({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:t});return n?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:Tf(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:t,verticalBand:Ff(n),input:n}):null}function Qb(e,t){let n=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=t.sourceOrder??Number.MAX_SAFE_INTEGER;return n!==r?n-r:e.drawingNodeId.localeCompare(t.drawingNodeId)}function uO(e,t){let n=Tf(e),r=Tf(t);return n!==r?n==="behind"?-1:1:e.relativeHeight!==t.relativeHeight?e.relativeHeight-t.relativeHeight:Qb(e,t)}function ex(e){return Object.freeze([...e].sort(uO))}function vf(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Cf(e,t){if(Math.abs(t)<=1e-4)return e;let n=e.geometry;return Object.freeze({...e,y:e.y+t,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+t}),geometry:Object.freeze({...n,contentBounds:Object.freeze({...n.contentBounds,y:n.contentBounds.y+t}),paintBounds:Object.freeze({...n.paintBounds,y:n.paintBounds.y+t}),hitBounds:Object.freeze({...n.hitBounds,y:n.hitBounds.y+t}),transformedCorners:n.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+t})),clipPolygon:n.clipPolygon?n.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+t})):null})})}function tx(e,t){let n=t.maxAttempts??iO,r=[...e].sort(Qb),o=[],a=[],i=[];for(let l of r){if(l.allowOverlap){o.push(l);continue}let s=l,d=0;for(;d<n&&o.some(g=>vf(g.paintBounds,s.paintBounds));){let p=o.find(g=>vf(g.paintBounds,s.paintBounds)),m=p.paintBounds.y+p.paintBounds.height-s.paintBounds.y+.001;s=Cf(s,m),d+=1;}let c=o.some(f=>vf(f.paintBounds,s.paintBounds)),u=s.paintBounds.y+s.paintBounds.height>t.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 xr(e,t,n,r){let o=[{start:n,end:r}],a=false;for(let i of t){let l=i.verticalBand;if(e<l.y||e>=l.y+l.height)continue;let s=Eb(e,i.input);i.sourceKind==="table"&&!s.some(c=>c.start<=n&&c.end>=r)&&(a=true);let d=[];for(let c of o)for(let u of s){let f=Math.max(c.start,u.start),p=Math.min(c.end,u.end);p>f+1e-6&&d.push(Object.freeze({start:f,end:p}));}if(o=d,o.length===0)break}return a&&(o=o.filter(i=>i.end-i.start>18.001)),Object.freeze(o)}function nx(e,t){for(let n of t)if(e>=n.start-1e-6&&e<n.end-1e-6)return Math.max(0,n.end-e);return 0}function fO(e,t){for(let n of t)if(n.end>e+1e-6)return n;return null}function Mf(e,t){let n=fO(e,t);if(!n)return null;let r=Math.max(e,n.start),o=n.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function mO(e,t,n){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+t,y:r.y+n}),contentLeft:e.contentLeft+t,contentRight:e.contentRight+t,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+t,y:o.y+n}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+t,y:o.y+n}))}:{}})}function Bf(e,t){return Object.freeze({...e,layoutFallback:t})}function _d(e,t,n,r){return e.length===0?e:Object.freeze(e.map(o=>{let a=o.verticalBand,i=o.input;return Object.freeze({...o,y:o.y-n,verticalBand:Object.freeze({...a,x:a.x-t,y:a.y-n}),input:Object.freeze({...mO(i,-t,-n),contentLeft:r?.left??i.contentLeft-t,contentRight:r?.right??i.contentRight-t})})}))}function rx(e,t,n){return Object.freeze(e.filter(r=>{let o=n(r.anchorParagraphId);return o===void 0?r.sourceOrder<=t:o<=t}))}function ox(e){let t=zt(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=pn(e.paragraph),r=e.displayMode??_e,o=Math.max(1,e.contentRight-e.contentLeft),a=[];for(let i of t){if(!je(i.revisions,r,e.revisionAuthorFilter)||i.projection.anchor?.behindDocument||!Jb(i.projection.wrap)||i.projection.wrap==="topAndBottom")continue;let l=n.get(i.atomId);if(l===void 0)continue;let s=e.anchorLineTopByModelStart.get(l);if(s===void 0)continue;let d=Object.freeze({x:e.contentLeft,y:s,width:o,height:14}),c=e.anchorCellBox!=null,u=wf(i.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+o,pageHeight:792,marginLeft:e.contentLeft,marginRight:0,marginBottom:0,contentInsetTop:0,contentInsetBottom:0,contentWidth:o,contentHeight:648,contentBandHeight:648,paragraphBox:d,anchorLineBox:d,anchorCharacterX:e.contentLeft,columnBox:d,cellBox:c?e.anchorCellBox:null,layoutInCell:c,ownerPartName:e.drawingLayout.ownerPartName,storyKind:"body"}),f=e.paragraphStartY+s,p=Xn(i.projection),m=qa({projection:i.projection,anchorX:u.x,anchorY:f,extentWidth:p.width,extentHeight:p.height}),g=Of({projection:i.projection,geometry:m,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:u.x,anchorY:f});g&&a.push(Object.freeze({drawingNodeId:i.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:l,sourceOrder:e.sourceOrderOf?.(i.projection.drawingNodeId)??Number.MAX_SAFE_INTEGER,paintLayer:i.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:i.projection.anchor?.relativeHeight??0,allowOverlap:i.projection.anchor?.allowOverlap??true,columnIndex:0,y:f,verticalBand:Ff(g),input:g}));}return a.sort((i,l)=>i.sourceOrder-l.sourceOrder),Object.freeze(a)}function jd(e){let t=zt(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=pn(e.paragraph),r=e.displayMode??_e,o=[];for(let a of t){if(!je(a.revisions,r,e.revisionAuthorFilter)||a.projection.anchor?.behindDocument||a.projection.wrap!=="topAndBottom")continue;let i=n.get(a.atomId);if(i===void 0)continue;let l=e.anchorLineTopByModelStart.get(i);if(l===void 0)continue;let s=e.paragraphStartY+l,d=Xn(a.projection),c=qa({projection:a.projection,anchorX:e.contentLeft,anchorY:s,extentWidth:d.width,extentHeight:d.height}),u=Of({projection:a.projection,geometry:c,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:s});u&&o.push(Object.freeze({drawingNodeId:a.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:i,sourceOrder:e.sourceOrderOf?.(a.projection.drawingNodeId)??Number.MAX_SAFE_INTEGER,paintLayer:a.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:a.projection.anchor?.relativeHeight??0,allowOverlap:a.projection.anchor?.allowOverlap??true,columnIndex:e.columnIndex??0,y:s,verticalBand:Ff(u),input:u}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}var pO=8;function gO(e,t,n,r){return e<r&&t>n}function $r(e,t,n){if(t<=0||n.length===0)return 0;let r=0;for(let o=0;o<pO;o+=1){let a=e+r,i=a+t,l=a,s=false;for(let c of n){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;gO(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 hO(e){return e.map(t=>`${t.start.toFixed(3)}-${t.end.toFixed(3)}`).join(",")}function yO(e){let t=e.contentBounds,n=e.wrapDistances,r=e.effectInsets,o=e.polygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"",a=e.clipPolygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"";return [e.mode,e.textSide,t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),n.top.toFixed(3),n.right.toFixed(3),n.bottom.toFixed(3),n.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function Un(e){return e.length===0?"":e.map(t=>{let n=t.verticalBand,r=t.y+t.input.contentBounds.height/2,o=xr(r,[t],t.input.contentLeft,t.input.contentRight);return [t.drawingNodeId,t.sourceKind??"",String(t.sourceOrder),String(t.columnIndex),t.y.toFixed(3),n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),yO(t.input),hO(o)].join("|")}).join(`
|
|
8
|
-
`)}function Lf(e,t,n,r,o,a){let i=[];for(let l of e){let s=t.projectionForAtom?.(l.drawingNodeId);if(!s)continue;let d=l.sourceOrder??o?.(l.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?lO(l,a):0,u=cO({drawing:l,projection:s,sourceOrder:d,contentLeft:n,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((l,s)=>l.sourceOrder-s.sourceOrder),Object.freeze(i)}function Ef(e,t,n,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:n}),i=new Map;for(let l of e){let s=l.anchoredDrawings??[],d=Lf(s,t,0,n,r,a);d.length>0&&i.set(l.index,d);}return i}var Zb=new WeakMap;function xO(e){return e?`${e.columnCount};${e.columnGapPt};${e.contentWidth};${(e.columnLefts??[]).join(",")};${(e.columnWidths??[]).join(",")}`:""}function ax(e,t,n,r,o,a){let i=xO(a),l=Zb.get(e);if(l&&l.drawingLayout===t&&l.drawingLayoutEpoch===n&&l.contentWidth===r&&l.drawingSourceOrder===o&&l.columnToken===i)return l.zones;let s=Ef(e,t,r,o?d=>{let c=t.projectionForAtom?.(d)?.drawingNodeId??d;return o.get(c)}:void 0,a);return Zb.set(e,{drawingLayout:t,drawingLayoutEpoch:n,contentWidth:r,drawingSourceOrder:o,columnToken:i,zones:s}),s}function Hd(e,t){if(e.size!==t.size)return false;for(let[n,r]of e){let o=t.get(n);if(!o||Un(r)!==Un(o))return false}return true}function zd(e){return e.size===0?"":[...e.entries()].sort(([t],[n])=>t-n).map(([t,n])=>`${t}:${Un(n)}`).join(`
|
|
9
|
-
`)}var Qe=.001,SO=32,Nf=128;function ix(e,t,n){if(e.input.mode==="topAndBottom")return true;let r=e.input,o=r.contentBounds.x,a=o+r.contentBounds.width;for(let i of [r.polygon,r.clipPolygon])for(let l of i??[])o=Math.min(o,l.x),a=Math.max(a,l.x);return o-=r.wrapDistances.left+r.effectInsets.left,a+=r.wrapDistances.right+r.effectInsets.right,o<n-Qe&&a>t+Qe}function PO(e,t,n){let r=new Set,o=a=>{a>t&&a<n&&r.add(a);};for(let a of e){if(a.verticalBand.y>=n||a.verticalBand.y+a.verticalBand.height<=t)continue;o(a.verticalBand.y),o(a.verticalBand.y+a.verticalBand.height);let i=a.input.wrapDistances.top+a.input.effectInsets.top,l=a.input.wrapDistances.bottom+a.input.effectInsets.bottom;for(let s of [a.input.polygon,a.input.clipPolygon])for(let d of s??[])if(o(d.y-i),o(d.y+l),r.size>Nf)return;if(r.size>Nf)return}return [...r].filter(Number.isFinite).sort((a,i)=>a-i)}function RO(e){if(!e||e.length<4)return false;let t=1/0,n=-1/0,r=1/0,o=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.max(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.y);return n>t&&o>r?e.every((a,i)=>{let l=e[(i+1)%e.length];return (Math.abs(a.x-t)<Qe||Math.abs(a.x-n)<Qe||Math.abs(a.y-r)<Qe||Math.abs(a.y-o)<Qe)&&(Math.abs(a.x-l.x)<Qe||Math.abs(a.y-l.y)<Qe)}):false}function lx(e,t,n,r,o,a){if(!(t>0&&a>=0&&a<=o-r)||!Number.isFinite(a)||n.length===0)return 0;let i=n.filter(p=>p.input.mode==="square"||p.input.mode==="topAndBottom"||p.input.mode==="tight"&&RO(p.input.polygon)),l,s=()=>l??=n.filter(p=>ix(p,r,o)),d=p=>{let m=p,g=[...s()].sort((h,b)=>h.verticalBand.y-b.verticalBand.y);for(let h of g){if(h.verticalBand.y>=m+t-Qe)break;m=Math.max(m,h.verticalBand.y+h.verticalBand.height);}return m-e},c=0,u=false,f=e;for(let p=0;p<SO;p++){let m=i.filter(y=>y.verticalBand.y<f+t-Qe&&y.verticalBand.y+y.verticalBand.height>f+Qe);if(m.length===0&&!u)return f-e;let g=m.some(y=>y.sourceKind==="table"&&ix(y,r,o));if(a===0&&!g&&!u)return f-e;let h=[{start:r,end:o}],b=[f+Qe,f+t-Qe];for(let y of m)b.push(Math.max(f,y.verticalBand.y)+Qe);for(let y of b)if(h=Md(h,xr(y,i,r,o)).filter(O=>O.end-O.start>=a-Qe),h.length===0)break;if(h.length>0){if(!u&&(!g||i.length===n.length))return f-e;let y=PO(s(),f,f+t);if(!y)return d(f);let O=[{start:r,end:o}],S=[f+Qe,f+t-Qe];for(let T of y)T>f&&T<f+t&&(S.push(Math.max(f+Qe,T-Qe)),S.push(Math.min(f+t-Qe,T+Qe)));for(let T of S){if(++c>Nf)return d(f);if(O=Md(O,xr(T,n,r,o)).filter(k=>k.end-k.start>=a-Qe),O.length===0)break}if(O.length>0)return f-e;u=true,f=Math.min(f+t,y.find(T=>T>f+Qe)??1/0);continue}g&&i.length!==n.length&&(u=true);let x=1/0;for(let y of m){let O=y.verticalBand.y+y.verticalBand.height;O>f+Qe&&(x=Math.min(x,O));}if(!Number.isFinite(x)||x<=f||x-e>1e5)return u?d(f):f-e;f=x;}return u?d(f):f-e}function sx(e){let t,n=()=>{let a=e.line();if(t===a||a.spans.length>0||a.drawings.length>0)return;let i=e.zones();if(i.length===0)return;let l=e.measurer.lineMetrics(e.emptyStyle),s=$r(e.top(),a.height>0?a.height:l.height,i);s>.001&&(t=a,a.exclusionSkipBefore=s);};return {applyTopAndBottomSkipIfNeeded:n,applyNarrowWrapSkipIfNeeded:(a,i)=>{let l=e.line();if(l.spans.length>0||l.drawings.length>0)return;n();let s=e.zones();if(s.length===0)return;let d=e.measurer.lineMetrics(i),c=a.codePointAt(0),u=c===void 0?"":String.fromCodePoint(c),f=lx(e.top()+(l.exclusionSkipBefore??0),Math.max(d.height,Od(e.lineSpacing,d.height,d.baseline).height),s,e.left(),e.right,e.measurer.measure(Qt(u,i),i));f>.001&&(l.exclusionSkipBefore=(l.exclusionSkipBefore??0)+f,l.width=0,t=l);},finalizeTopAndBottomClearance:()=>{let a=e.line(),i=e.zones();if(i.length===0)return;let l=Math.max($r(e.top(),a.height,i),a.exclusionSkipBefore??0);l>.001?a.exclusionSkipBefore=l:delete a.exclusionSkipBefore;}}}var Qa=.7,wO=1.25,kO="Cambria Math";function Vd(e){return js(e,kO)}function qn(e,t,n,r){return Object.freeze({x:e,y:t,width:n,height:r})}function rn(e,t,n){return Object.freeze({...e,box:qn(t,n,e.box.width,e.box.height)})}var vO=4,TO=8,dx=new WeakMap;function IO(e){let t=Vd(e);return [t.fontFamily??"",t.fontSizePt,t.bold?1:0,t.italic?1:0,t.verticalAlign,t.baselineShiftPt,t.caps?1:0,t.smallCaps?1:0,t.characterSpacingPt,t.horizontalScalePercent,t.kerningMinPt].join("|")}function OO(e,t){if(t===void 0)return {projections:new WeakMap};let n=dx.get(e);n||(n=new Map,dx.set(e,n));let r=n.get(t);if(r)return n.delete(t),n.set(t,r),r;if(n.size>=vO){let a=n.keys().next().value;a!==void 0&&n.delete(a);}let o={projections:new WeakMap};return n.set(t,o),o}function ei(e,t,n){let r=n.styles.get(t);if(r)return r;let o=t===1?e:Object.freeze({...e,fontSizePt:e.fontSizePt*t,characterSpacingPt:e.characterSpacingPt*t});return n.styles.set(t,o),o}function cx(e,t,n,r){let o=r.metrics.get(n);if(o)return o;let a=e.lineMetrics(ei(t,n,r));return r.metrics.set(n,a),a}function Wd(e,t,n,r,o,a){let i=ei(r,o,a),l=cx(n,r,o,a);return Object.freeze({kind:e,text:t,fontSizePt:i.fontSizePt,box:qn(0,0,Je(t,i,n),l.height),baseline:l.baseline})}function FO(e,t){if(e.length===0)return Object.freeze({kind:"row",items:Object.freeze([]),box:qn(0,0,0,t.height),baseline:t.baseline});let n=Math.max(...e.map(i=>i.baseline)),r=Math.max(...e.map(i=>i.box.height-i.baseline)),o=0,a=e.map(i=>{let l=rn(i,o,n-i.baseline);return o+=i.box.width,l});return Object.freeze({kind:"row",items:Object.freeze(a),box:qn(0,0,o,n+r),baseline:n})}function gn(e,t,n,r,o){switch(e.kind){case "text":return Wd("text",e.value,t,n,r,o);case "fallback":return Wd("fallback",e.text||"\u2026",t,n,r,o);case "row":return FO(e.items.map(a=>gn(a,t,n,r,o)),cx(t,n,r,o));case "fraction":{let a=ei(n,r,o),i=gn(e.numerator,t,n,r*Qa,o),l=gn(e.denominator,t,n,r*Qa,o),s=Math.max(.75,a.fontSizePt*.08),d=Math.max(.75,a.fontSizePt*.08),c=Math.max(.6,a.fontSizePt*.055),u=Math.max(i.box.width,l.box.width)+s*2,f=i.box.height+d,p=f+c+d,m=p+l.box.height,g=Math.min(m,f+c/2+a.fontSizePt*.22);return Object.freeze({kind:"fraction",numerator:rn(i,(u-i.box.width)/2,0),denominator:rn(l,(u-l.box.width)/2,p),bar:qn(s/2,f,u-s,c),box:qn(0,0,u,m),baseline:g})}case "radical":{let a=ei(n,r,o),i=gn(e.radicand,t,n,r,o),l=Wd("text","\u221A",t,n,r,o),s=e.degree?gn(e.degree,t,n,r*.55,o):void 0,d=Math.max(.55,a.fontSizePt*.05),c=Math.max(.35,a.fontSizePt*.035),u=d+c,f=s?Math.max(0,s.box.width*.65):0,p=f+l.box.width,m=u+i.baseline,g=Math.max(u+i.box.height,m+(l.box.height-l.baseline));return Object.freeze({kind:"radical",sign:rn(l,f,m-l.baseline),radicand:rn(i,p,u),...s?{degree:rn(s,0,0)}:{},bar:qn(p,0,i.box.width,d),box:qn(0,0,p+i.box.width,g),baseline:m})}case "script":{let a=ei(n,r,o),i=gn(e.base,t,n,r,o),l=e.subscript?gn(e.subscript,t,n,r*Qa,o):void 0,s=e.superscript?gn(e.superscript,t,n,r*Qa,o):void 0,d=Math.max(.4,a.fontSizePt*.04),c=i.box.width+d,u=0,f=s?Math.max(0,s.box.height-i.baseline*.45):0,p=f+i.baseline,m=p+a.fontSizePt*.08,g=c+Math.max(l?.box.width??0,s?.box.width??0,-d),h=Math.max(f+i.box.height,s?u+s.box.height:0,l?m+l.box.height:0);return Object.freeze({kind:"script",base:rn(i,0,f),...l?{subscript:rn(l,c,m)}:{},...s?{superscript:rn(s,c,u)}:{},box:qn(0,0,g,h),baseline:p})}case "nary":{let a=ei(n,r,o),i=Wd("text",e.operator,t,n,r*wO,o),l=gn(e.body,t,n,r,o),s=e.lowerLimit?gn(e.lowerLimit,t,n,r*Qa,o):void 0,d=e.upperLimit?gn(e.upperLimit,t,n,r*Qa,o):void 0,c=Math.max(.5,a.fontSizePt*.05),u=Math.max(i.box.width,s?.box.width??0,d?.box.width??0),p=d?d.box.height+c:0,m=p+i.baseline,g=p+i.box.height+(s?c:0),h=u+c,b=m-l.baseline,y=-Math.min(0,p,b,s?g:0),O=m+y,S=Math.max(p+i.box.height,s?g+s.box.height:0,b+l.box.height)+y;return Object.freeze({kind:"nary",operator:rn(i,(u-i.box.width)/2,p+y),body:rn(l,h,b+y),...s?{lowerLimit:rn(s,(u-s.box.width)/2,g+y)}:{},...d?{upperLimit:rn(d,(u-d.box.width)/2,y)}:{},box:qn(0,0,h+l.box.width,S),baseline:O})}}}function CO(e,t,n){let r=Vd(n),o={styles:new Map,metrics:new Map};return Object.freeze({sourceNodeId:e.sourceNodeId,geometry:gn(e.expression,t,r,1,o),fallbackText:e.fallbackText,truncated:e.truncated})}function ux(e,t){let n=OO(e,t);return (r,o)=>{let a=IO(o),i=n.projections.get(r),l=i?.get(a);if(l&&i)return i.delete(a),i.set(a,l),l;let s=CO(r,e,o);if(i||(i=new Map,n.projections.set(r,i)),i.size>=TO){let d=i.keys().next().value;d!==void 0&&i.delete(d);}return i.set(a,s),s}}function ti(e){if(e.length===0)return false;for(let t of e)if(t!==" "&&t!=="\u3000")return false;return true}function Gd(e,t,n,r,o){if(t<=n+o)return;let a=e.length;for(;a>0&&e[a-1]===" ";)a--;if(a===0||a===e.length)return;let i=r(e.slice(0,a));if(!(i>n+o))return {length:a,visibleWidth:i,width:Math.max(i,n)}}function fx(e,t,n){if(!n){e.push(t);return}let r=t.range.start+n.length;e.push({...t,text:t.text.slice(0,n.length),range:{...t.range,end:r},box:{...t.box,width:n.visibleWidth}},{...t,text:t.text.slice(n.length),range:{...t.range,start:r},box:{...t.box,x:t.box.x+n.visibleWidth,width:Math.max(0,t.box.width-n.visibleWidth)},lineEndWhitespace:true});}function mx(e){let{pieces:t,measurer:n,available:r,firstLineOffset:o,anchorStarts:a,equationLayoutOf:i}=e,l=new Map;if(a.length===0)return l;let s=t[0]?.start??0,d=[s],c=0,u=0,f="",p=0,m=-1,g=()=>u===0?o:0,h=()=>Math.max(1,r-g()),b=x=>{s=x,d.push(x),c=0,u+=1;};for(let x of t){let y=i(x);if(y){let T=y.geometry.box.width;c>0&&c+T>h()&&b(x.start),c+=T,f="",m=-1;continue}if(x.inlineDrawing){let T=Xn(x.inlineDrawing.projection).totalWidth;c>0&&c+T>h()&&b(x.start),c+=T,f="",m=-1;continue}if(x.text===`
|
|
10
|
-
`||x.text===Td$1){b(x.end);continue}let O=!!x.projected||!!x.positionalTab||x.end-x.start!==x.text.length,S=0;for(let T of e.cjkBreaks?.boundaries(x)??Eo(x.text,!O)){let k=x.text.slice(S,T);if(k.length===0)continue;let w=De(x.style,x.fontSlot),v=W=>n.measure(Qt(W,w),w),I=v(x.measureText??k);if(!O&&x.measureText===void 0){let W=h()-c;I=Gd(k,I,W,v,.001)?.width??I,c>0&&ti(k)&&(I=Math.min(I,Math.max(0,W)));}let P=x.start+S,C=e.cjkBreaks?.decision(x,S)??Pd(f,k,S>0),E=C==="opens";E&&(p=P,m=c);let D=e.typography?.overflowPunctuation&&Ga(k,x,h()-c,I,n),z=e.colonNaturalWidths?.get(x)??I;if(!D&&c>0&&c+z>h()){if(!(C==="forbidden"&&m<=0))if(E||m<=0)b(P);else {let W=c-m;b(p),c=W;}m=0;}c+=I,f=k,S=T;}}for(let x of a){let y=0,O=d.length-1;for(;y<O;){let S=y+O+1>>1;d[S]<=x?y=S:O=S-1;}l.set(x,d[y]);}return l}function BO(e,t,n,r,o){if(o===void 0||o(e,t[r-1].utf16To))return r;for(let a=r-1;a>n;a-=1)if(o(e,t[a-1].utf16To))return a;for(let a=r+1;a<=t.length;a+=1)if(o(e,t[a-1].utf16To))return a;return t.length}function px(e,t,n,r){if(n<=r.remainingLineWidth()+r.overflowTolerancePt)return {text:e,modelStart:t,width:n,brokeLine:false};let o=Ye(e),a=0,i=0,l=n,s=false;for(;a<o.length&&l>r.remainingLineWidth()+r.overflowTolerancePt;){if(o.length-a===1){if(r.lineHasText()&&!(i===0&&r.keepWithPrevious)){r.closeLine(),s=true;continue}break}let c=r.remainingLineWidth(),u=a+1,f=o.length-1,p=a;for(;u<=f;){let h=u+f>>1,b=o[h-1].utf16To;r.measureText(e.slice(i,b))<=c+r.overflowTolerancePt?(p=h,u=h+1):f=h-1;}if(p===a&&r.lineHasText()&&!(i===0&&r.keepWithPrevious)){r.closeLine(),s=true;continue}if(p===a&&(p+=1),p=BO(e,o,a,p,r.cutAllowedAt),p===o.length)break;let m=o[p-1].utf16To,g=e.slice(i,m);r.appendPrefix({text:g,modelStart:t+i,width:r.measureText(g)}),r.closeLine(),s=true,a=p,i=m,l=r.measureText(e.slice(i));}return {text:e.slice(i),modelStart:t+i,width:l,brokeLine:s}}var LO={props:true,style:true,fontSlot:true,glyphOffsetPt:true,caretEdges:true,tabLeader:true,tabLeaderAdvancePt:true,link:true,wrapAdvanceBefore:true,revisions:true,fieldAtom:true,projected:true,equation:true,noteNav:true,lineEndWhitespace:true},EO=Object.keys(LO);function NO(e,t){for(let n of EO)if(e[n]!==t[n])return false;return true}function AO(e,t){if(e.glyphOffsetPt||t.glyphOffsetPt||e.caretEdges!==void 0||t.caretEdges!==void 0)return false;let n=In(e.text),r=t.text.codePointAt(0);return n===void 0||r===void 0||!Lo(n)||!Lo(r)||e.range.paragraphId!==t.range.paragraphId||e.range.end!==t.range.start||Math.abs(e.box.x+e.box.width-t.box.x)>.01||e.box.height!==t.box.height?false:NO(e,t)}function gx(e){if(e.spans.length<2)return;let t=[];for(let n=0;n<e.spans.length;){let r=n;for(;r+1<e.spans.length&&AO(e.spans[r],e.spans[r+1]);)r+=1;let o=e.spans[n];if(r===n){t.push(o),n+=1;continue}let a=[],i=0;for(let l=n;l<=r;l+=1)a.push(e.spans[l].text),i+=e.spans[l].box.width;t.push({...o,range:{...o.range,end:e.spans[r].range.end},text:a.join(""),box:{...o.box,width:i}}),n=r+1;}if(t.length!==e.spans.length){e.spans.length=0;for(let n of t)e.spans.push(n);}}function Af(e,t,n){return Math.max($r(t,e.height,n),e.exclusionSkipBefore??0)}function Df(e,t,n,r=0){return Af(t,e,n)+Math.max(0,t.height-t.trailingSpacing)+r}function hx(e){return Object.freeze({spans:e.spans.map(t=>Object.freeze({...t,box:Object.freeze({...t.box})})),drawings:e.drawings.map(t=>Object.freeze({...t,paintBounds:Object.freeze({...t.paintBounds}),hitBounds:Object.freeze({...t.hitBounds})})),start:e.start,end:e.end,width:e.width,height:e.height,baseline:e.baseline,leading:e.leading,trailingSpacing:e.trailingSpacing,...e.pageBreakAfter?{pageBreakAfter:true}:{},...e.columnBreakAfter?{columnBreakAfter:true}:{},...e.manualBreakAfter?{manualBreakAfter:true}:{},...e.deletedRanges?{deletedRanges:Object.freeze(e.deletedRanges)}:{},...e.exclusionSkipBefore?{exclusionSkipBefore:e.exclusionSkipBefore}:{},...e.anchorRevisions?{anchorRevisions:Object.freeze(e.anchorRevisions)}:{}})}function pl(e,t){return t===0||e.length===0?e:e.map(n=>Yn(n,t,0))}var gl=.001;function Mt(e){return Wa(e)}function DO(e){let t=new Array(e.length),n=false;for(let r=e.length-1;r>=0;r-=1){let o=e[r],a=new Uint8Array(o.text.length+1);if(a[o.text.length]=n?1:0,o.inlineDrawing)a.fill(1);else for(let i=o.text.length-1;i>=0;i-=1){let l=o.text[i];l===`
|
|
11
|
-
`||l===Td$1?a[i]=0:l!==" "&&!ti(l)?a[i]=1:a[i]=a[i+1];}t[r]=a,n=a[0]===1;}return t}function _O(e,t,n,r){let o=0,a=0,i=false;for(let l=t;l<e.length;l+=1){let s=e[l],d=De(s.style,s.fontSlot),c=l===t?n:0;for(let u=c;u<s.text.length;){let f=s.text[u];if(f===" "||f===`
|
|
12
|
-
`||f===Td$1)return {width:o,decimalOffset:i?a:o};let p=u+1,m=s.text.slice(u,p),g=r.measure(Qt(m,d),d);!i&&f==="."?i=true:i||(a+=g),o+=g,u=p;}}return {width:o,decimalOffset:i?a:o}}function jO(e,t,n,r){let o=e.relativeTo==="indent"||!r?{left:t,right:n}:r;return {positionPt:e.alignment==="right"?o.right:e.alignment==="center"?(o.left+o.right)/2:o.left,alignment:e.alignment,...e.leader?{leader:e.leader}:{}}}var $d=31680;function hl(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let t=Number(e);return Number.isFinite(t)?t>$d?Xe($d):t<-$d?Xe(-$d):Xe(t):null}function yl(e){let t=0,n=0,r=vt(e);for(let o of e){if(o.localName!=="ind")continue;let a=o.attributes?.left??(r?o.attributes?.end:o.attributes?.start),i=o.attributes?.right??(r?o.attributes?.start:o.attributes?.end),l=hl(a),s=hl(i);l!==null&&(t=Ze(l)),s!==null&&(n=Ze(s));}return {left:t,right:n}}function _f(e,t,n,r,o,a,i,l=[],s=al,d,c,u,f=false){let p=i!==null&&a?a.get(i):void 0;if(p)return p;let m=u?.lineSpacing??cl,g=u?.firstLineOffset??0,h=[],b=ni(e,l,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??_e,h,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false,u?.refFields,u?.revisionAuthorFilter),x=Ry(b,u?.paragraphRtl??vt(Mt("children"in e?e.children.find(_=>_.kind==="paragraphProperties"):void 0)),xy(e)),y=Math.max(0,u?.startOffset??0),O=x.flatMap(_=>{if(_.end<=y)return [];if(_.start>=y)return [_];let F=y-_.start;return [{..._,text:_.projected?_.text:_.text.slice(F),start:y}]}),S=u?.typography??yd(Mt("children"in e?e.children.find(_=>_.kind==="paragraphProperties"):void 0)),T=rb(O,S,o,f),k=nb(T,O,o),w=S.settings?.compression!==void 0&&S.settings.compression!=="doNotCompress"&&!u?.pageExclusionZones?.length&&o.inkBounds!==void 0&&sb(x),v=w&&!f,I=DO(T),P=Rd(T,S),C=db(T,P,o,S.overflowPunctuation),E=ux(o,u?.equationCacheToken),D=_=>_.equation?E(_.equation,_.style):null;if(T.length===0&&u?.suppressEmptyPlaceholderLine)return [];let z=_=>({..._.revisions===void 0?{}:{revisions:_.revisions},..._.fieldAtom===void 0?{}:{fieldAtom:_.fieldAtom}}),W=u?.markRunProperties??l,j=W.length===0?wn:Ne(W,u?.themeFonts),M=n+r,B=u?.contentLeft??n,N=u?.contentRight??M,A=u?.contentOriginX??0,H=Math.min(N,A+M),$=[],R={spans:[],start:y,end:y,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},Y=new Map,X=u?.displayMode??_e,U=(()=>{let _=new Set;if(!u?.inlineDrawingLayout)return _;let F=pn(e);for(let q of zt(e,u.inlineDrawingLayout)){if(!je(q.revisions,X,u?.revisionAuthorFilter)||q.projection.wrap!=="topAndBottom")continue;let le=F.get(q.atomId);le!==void 0&&_.add(le);}return _})(),K=(()=>{let _=new Set;if(!u?.inlineDrawingLayout)return _;let F=pn(e);for(let q of zt(e,u.inlineDrawingLayout)){if(!je(q.revisions,X,u?.revisionAuthorFilter)||q.projection.anchor?.behindDocument||q.projection.wrap==="topAndBottom"||q.projection.wrap==="inline"||q.projection.wrap==="behind"||q.projection.wrap==="inFront")continue;let le=F.get(q.atomId);le!==void 0&&_.add(le);}return _})(),Q=[...(u?.pageExclusionZones??[]).filter(_=>_.anchorParagraphId===t).map(_=>_.anchorModelStart),...U,...K],G=mx({colonNaturalWidths:k,typography:S,cjkBreaks:P,pieces:T,measurer:o,available:r,firstLineOffset:g,anchorStarts:Q,equationLayoutOf:D});for(let _ of K){let F=G.get(_);F!==void 0&&Y.set(_,F);}let ne=_=>{if(_.anchorParagraphId!==t)return true;let F=G.get(_.anchorModelStart);return F!==void 0&&R.start>=F||R.end>=_.anchorModelStart},ue=()=>{let _=u?.pageExclusionZones?.filter(le=>!(!ne(le)||le.anchorParagraphId===t&&(!le.sourceKind&&le.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],F=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&Y.size>0?ox({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:B,contentRight:N,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:Y,anchorCellBox:u.anchorCellBox,displayMode:X,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]),q=u?.inlineDrawingLayout&&Y.size>0?jd({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:B,contentRight:N,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:Y,displayMode:X,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]);return Object.freeze([..._,...F,...q])},pe=()=>$.length===0?g:0,de=()=>A+n+pe(),ce=()=>Math.max(1,r-pe()),Pe=()=>$.reduce((_,F)=>_+F.height+(F.exclusionSkipBefore??0),0),Ie=()=>(u?.paragraphStartY??0)+Pe(),oe=_=>{U.has(_)&&Y.set(_,Pe());},{applyTopAndBottomSkipIfNeeded:ke,applyNarrowWrapSkipIfNeeded:xe,finalizeTopAndBottomClearance:Re}=sx({line:()=>R,top:Ie,zones:ue,left:()=>Math.max(B,de()),right:H,emptyStyle:j,measurer:o,lineSpacing:m}),Me=()=>Ie()+(R.exclusionSkipBefore??0)+.001,Be=()=>{let _=ue();if(_.length===0)return true;ke();let F=xr(Me(),_,B,H),q=de()+R.width,le=Mf(q,F);return le?(le.x>q+.001&&(R.width=le.x-de()),true):false},he=()=>{let _=ce(),F=ue();if(F.length===0)return _;if(ke(),!Be())return 0;let q=xr(Me(),F,B,H),le=de()+R.width,ze=nx(le,q);return ze<=.001?0:Math.min(_,R.width+ze)},ye=()=>Math.max(0,he()-R.width),It=()=>{let _=ue();if(_.length===0||!_.some(be=>be.anchorParagraphId!==t||R.end>be.anchorModelStart))return false;let q=xr(Me(),_,B,H),le=de()+R.width,ze=false;for(let be of q){if(!ze){le>=be.start-1e-6&&le<be.end-1e-6&&(ze=true);continue}if(be.end-be.start>.001)return R.width=be.start-de(),true}return false},Vt=_=>{if(Q.length===0||_<Math.min(...Q))return;let F=ue().filter(fe=>fe.anchorParagraphId===t&&_>=fe.anchorModelStart);if(F.length===0)return;ke();let q=xr(Me(),F,B,H),le=de()+R.width,ze=-1;for(let fe=0;fe<q.length;fe+=1){let Ce=q[fe];if(le>=Ce.start-.001&&le<Ce.end-.001){ze=fe;break}}if(ze>=0)return;let be=Mf(le,q);be&&be.x>le+.001&&(R.width=be.x-de());},ar=_=>{ue().filter(q=>q.input.mode==="topAndBottom"&&q.anchorParagraphId===t&&_>=q.anchorModelStart).length!==0&&((R.spans.length>0||R.drawings.length>0)&&Ge(),ke());},Dt=(_,F=0)=>F>64?ye()>=_:(ke(),Be()?_<=ye()+.001?true:R.spans.length>0||R.drawings.length>0?It()&&_<=ye()+.001?true:(Ge(),Dt(_,F+1)):It()?Dt(_,F+1):true:R.spans.length>0||R.drawings.length>0?(Ge(),Dt(_,F+1)):true),We=(_,F)=>h.filter(q=>q.start<F&&q.end>_).map(q=>({start:Math.max(q.start,_),end:Math.min(q.end,F)})),Ue=-1,bt=0,an=0,Et="",Mn=(_,F)=>{let q=o.lineMetrics(_),le=$b(q.baseline,R.height||q.height,F);return R.height===0?(R.height=le.lineHeight,R.baseline=le.baseline):(le.lineHeight>R.height&&(R.height=le.lineHeight),R.baseline=Math.max(R.baseline,le.baseline)),{extentTopY:le.extentTopY}},Li=()=>{if(R.drawings.length===0)return;R.spans.length===0&&(R.baseline=Math.max(R.baseline,...R.drawings.map(F=>F.y+F.height)));let _=Pf(R.drawings,R.baseline);R.drawings.splice(0,R.drawings.length,..._),R.baseline=Math.max(R.baseline,...R.drawings.map(F=>F.y+F.height));},ln=()=>{if(R.drawings.length===0)return;let _=Pf(R.drawings,R.baseline);R.drawings.splice(0,R.drawings.length,..._);},io=_=>{let F=0;for(let q of R.spans)F=Math.max(F,o.lineMetrics(De(q.style,q.fontSlot)).height);return F>0?F:_},kr=()=>{if(R.drawings.length===0)return;let _=Math.max(0,...R.drawings.map(F=>F.y+F.height+F.distB));R.height=Math.max(R.height,_);},Nt=()=>{Li(),kr();},yn=()=>{if(!(R.spans.length<2))for(let _=1;_<R.spans.length;_+=1){let F=R.spans[_-1],q=R.spans[_],le=q.box.x-(F.box.x+F.box.width);le<=.001||R.drawings.some(be=>be.start>=F.range.end&&be.start<q.range.start)||(R.spans[_]={...q,wrapAdvanceBefore:le});}},Ge=_=>{let F=o.lineMetrics(j),q=R.baseline;R.height===0?(R.height=F.height,R.baseline=F.baseline,q=F.baseline):_?.includeParagraphMark&&(R.height=Math.max(R.height,F.height)),Nt();let le=R.height,ze=R.drawings.length>0||R.spans.some(rt=>rt.equation!==void 0),be=m.rule==="auto"&&ze,fe=be?io(F.height):le,Ce=Od(m,fe,R.baseline);be||(R.baseline=Ce.baseline),R.leading=Math.max(0,R.baseline-q),R.height=be?Math.max(Ce.height,le):Ce.height,ln(),m.rule!=="exact"&&kr(),R.trailingSpacing=R.drawings.length===0&&m.rule!=="exact"?Math.max(0,Ce.height-le):0,Re(),gx(R),yn();let Le=We(R.start,R.end);Le.length>0&&(R.deletedRanges=Le),$.push(R),Ue=-1,bt=0,R={spans:[],drawings:[],start:R.end,end:R.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},ke();},Bn=false;for(let _=0;_<T.length;_+=1){let F=T[_];if(F.breakKind==="column"){let fe=o.lineMetrics(F.style);R.spans.push({range:{paragraphId:t,start:F.start,end:F.end},text:F.text,props:F.props,style:F.style,box:{x:de()+R.width,y:0,width:0,height:fe.height},...F.link?{link:F.link}:{},...z(F)}),R.height=Math.max(R.height,fe.height),R.baseline=Math.max(R.baseline,fe.baseline),R.end=F.end,Ge(),$[$.length-1].columnBreakAfter=true,Bn=true;continue}if(F.equation){let fe=D(F),Ce=fe.geometry.box.width;if((R.spans.length>0||R.drawings.length>0)&&R.width+Ce>he()&&Ge(),!Dt(Ce))continue;let rt=Math.max(0,R.height-R.baseline),$e=Math.max(0,fe.geometry.box.height-fe.geometry.baseline);R.baseline=Math.max(R.baseline,fe.geometry.baseline),R.height=R.baseline+Math.max(rt,$e),R.spans.push({range:{paragraphId:t,start:F.start,end:F.end},text:"\uFFFC",props:F.props,style:F.style,box:{x:de()+R.width,y:0,width:Ce,height:fe.geometry.box.height},projected:true,equation:fe,...z(F)}),R.width+=Ce,R.end=F.end,Ue=-1,Et="";continue}if(F.projected&&!F.inlineDrawing&&F.text==="\uFFFC"){oe(F.start),F.anchoredAtom&&F.revisions!==void 0&&je(F.revisions,X,u?.revisionAuthorFilter)&&(R.anchorRevisions=[...R.anchorRevisions??[],...F.revisions]),R.end=F.end;continue}if(F.inlineDrawing){oe(F.start);let fe=Xn(F.inlineDrawing.projection),Ce=fe.totalWidth;if((R.spans.length>0||R.drawings.length>0)&&R.width+Ce>he()&&Ge(),!Dt(Ce))continue;let{extentTopY:rt}=Mn(F.style,fe),$e=de()+R.width;R.drawings.push(qb({input:F.inlineDrawing,paragraphId:t,start:F.start,slotX:$e,y:rt,baseline:R.baseline,contentLeft:A,contentRight:A+M,...F.revisions?{revisions:F.revisions}:{}})),R.width+=Ce,R.end=F.end,Ue=-1,Et="";continue}if(F.text===Td$1){let fe=o.lineMetrics(F.style);R.spans.push({range:{paragraphId:t,start:F.start,end:F.end},text:Td$1,props:F.props,style:F.style,box:{x:de()+R.width,y:0,width:0,height:fe.height},...F.link?{link:F.link}:{},...z(F)}),R.height=Math.max(R.height,fe.height),R.baseline=Math.max(R.baseline,fe.baseline),R.end=F.end,Ge(),$[$.length-1].pageBreakAfter=true,Bn=false;continue}if(F.text===`
|
|
13
|
-
`){F.breakKind==="line"&&(R.manualBreakAfter=true);let fe=o.lineMetrics(F.style);R.spans.push({range:{paragraphId:t,start:F.start,end:F.end},text:`
|
|
14
|
-
`,props:F.props,style:F.style,box:{x:de()+R.width,y:0,width:0,height:fe.height},...F.link?{link:F.link}:{},...z(F)}),R.height=Math.max(R.height,fe.height),R.baseline=Math.max(R.baseline,fe.baseline),R.end=F.end,Ge(),Bn=true;continue}Bn=false,ar(F.start),Q.length>0&&F.start>=Math.min(...Q)&&Vt(F.start);let q=De(F.style,F.fontSlot),le=o.lineMetrics(q),ze=!!F.projected||!!F.positionalTab||F.end-F.start!==F.text.length,be=0;for(let fe of P?.boundaries(F)??Eo(F.text,!ze)){let Ce=F.text.slice(be,fe);if(Ce.length===0)continue;let Le=ze?{paragraphId:t,start:F.start,end:F.end}:{paragraphId:t,start:F.start+be,end:F.start+fe};if(Ce===" "){(R.spans.length>0||R.drawings.length>0)&&R.width>=he()&&I[_][fe]===1&&Ge();let Xe=de()+R.width,Ve=_O(T,_,fe,o),pt=F.positionalTab?jO(F.positionalTab,n,M,u?.marginExtent):null,En=pt===null?ll(s,Xe,M):pt.positionPt>Xe?pt:{...ll(s,Xe,M),...pt.leader?{leader:pt.leader}:{}},co=xb(En.alignment,Xe,En.positionPt,Ve.width,Ve.decimalOffset);R.spans.push({range:Le,text:" ",props:F.props,style:F.style,box:{x:Xe,y:0,width:co,height:le.height},...En.leader?{tabLeader:En.leader,tabLeaderAdvancePt:o.measure(ub.get(En.leader)??".",F.style)}:{},...F.link?{link:F.link}:{},...En.leader?{tabLeader:En.leader}:{},...ze&&!F.positionalTab?{projected:true}:{},...F.noteNav?{noteNav:F.noteNav}:{},...z(F)}),R.width+=co,R.height=Math.max(R.height,le.height),R.baseline=Math.max(R.baseline,le.baseline),R.end=ze?F.end:F.start+fe,Et=" ",be=fe;continue}let rt=F.measureText??Ce,$e=o.measure(Qt(rt,q),q),sn=P?.decision(F,be)??Pd(Et,Ce,be>0),qt=sn==="opens";qt&&(Ue=R.spans.length,bt=R.width,an=R.end),Vt(F.start+be),xe(Ce,q);let vr=w&&Q.length===0&&fe===F.text.length&&T[_+1]!==void 0&&P?.decision(T[_+1],0)==="forbidden",At=!ze&&F.measureText===void 0&&!vr?Gd(Ce,$e,he()-R.width,Xe=>o.measure(Qt(Xe,q),q),gl):void 0;$e=At?.width??$e;let lo=S.overflowPunctuation&&Ga(Ce,F,he()-R.width,$e,o),we=v&&Q.length===0?()=>{let Xe=C(R,_,Ce,Le,$e,de()+R.width,he(),!ti(Ce)||qt&&I[_][fe]===1);return Xe&&($e=Xe.width,Ue>=0&&Xe.spanStarts&&(Ue=Xe.spanStarts[Ue],bt=Ue<R.spans.length?R.spans[Ue].box.x-de():R.width)),Xe}:void 0,so=R,Ze=we?.(),bn=!vr&&ti(Ce)&&(I[_][fe]!==1||!ze&&(R.spans.length>0||R.drawings.length>0)&&R.width+$e>he()+gl);bn&&($e=Math.min($e,Math.max(0,he()-R.width)));let ot=Ze?$e:k.get(F)??$e;if(!lo&&R.width+ot>he()+gl&&(R.spans.length>0||R.drawings.length>0)){if(!(sn==="forbidden"&&Ue<=0))if(!qt&&Ue===0)It();else if(qt||Ue<0){if(!(It()&&R.width+ot<=he()+.001)){if(Ge(),!Dt(ot))continue;Ue=0,bt=0,an=R.end;}}else {let Xe=R.spans.splice(Ue);R.width=bt,R.end=an,R.height=0,R.baseline=0;for(let Ve of R.spans){let pt=o.lineMetrics(De(Ve.style,Ve.fontSlot));R.height=Math.max(R.height,pt.height),R.baseline=Math.max(R.baseline,pt.baseline);}Ge();for(let Ve of Xe){let pt=o.lineMetrics(De(Ve.style,Ve.fontSlot));R.spans.push({...Ve,box:{...Ve.box,x:de()+R.width}}),R.width+=Ve.box.width,R.height=Math.max(R.height,pt.height),R.baseline=Math.max(R.baseline,pt.baseline),R.end=Ve.range.end;}Ue=0,bt=0;}}else if(R.spans.length===0&&R.drawings.length===0&&ot>he()+.001&&!Dt(ot))continue;!Ze&&R!==so&&(Ze=we?.());let Ln=Ce,aa=F.start+be,ia=$e;if(!ze&&F.measureText===void 0&&!lo&&(R.spans.length===0||!qt&&Ue===0)&&$e>ye()+gl){let Xe=px(Ce,aa,$e,{remainingLineWidth:ye,lineHasText:()=>R.spans.length>0,measureText:Ve=>o.measure(Qt(Ve,q),q),appendPrefix:Ve=>{R.spans.push({range:{paragraphId:t,start:Ve.modelStart,end:Ve.modelStart+Ve.text.length},text:Ve.text,props:F.props,style:F.style,box:{x:de()+R.width,y:0,width:Ve.width,height:le.height},...F.link?{link:F.link}:{},...F.noteNav?{noteNav:F.noteNav}:{},...F.fontSlot?{fontSlot:F.fontSlot}:{},...F.glyphOffsetPt!==void 0?{glyphOffsetPt:F.glyphOffsetPt}:{},...z(F)}),R.width+=Ve.width,R.height=Math.max(R.height,le.height),R.baseline=Math.max(R.baseline,le.baseline),R.end=Ve.modelStart+Ve.text.length;},closeLine:Ge,overflowTolerancePt:gl,keepWithPrevious:sn==="forbidden",cutAllowedAt:P?(Ve,pt)=>P.cutAllowed(F,be,pt):Zy});Ln=Xe.text,aa=Xe.modelStart,ia=Xe.width,Xe.brokeLine&&(Ue=0,bt=0,an=R.end);}if(Ln.length>0){let Xe={range:ze?Le:{paragraphId:t,start:aa,end:F.start+fe},text:Ln,props:F.props,style:F.style,box:{x:de()+R.width,y:0,width:ia,height:le.height},...F.link?{link:F.link}:{},...ze&&!F.positionalTab?{projected:true}:{},...F.noteNav?{noteNav:F.noteNav}:{},...F.fontSlot?{fontSlot:F.fontSlot}:{},...F.glyphOffsetPt!==void 0?{glyphOffsetPt:F.glyphOffsetPt}:{},...bn?{lineEndWhitespace:true}:{},...z(F)};Ze?cb(R.spans,Xe,Ze):fx(R.spans,Xe,At),R.width+=ia,R.height=Math.max(R.height,le.height),R.baseline=Math.max(R.baseline,le.baseline),R.end=ze?F.end:F.start+fe;}Et=Ce,be=fe;}}return (R.spans.length>0||R.drawings.length>0||$.length===0||Bn)&&Ge({includeParagraphMark:true}),!f&&tb($)?_f(e,t,n,r,o,a,i,l,s,d,c,u,true):(i!==null&&a&&a.set(i,a.retainAcrossPasses===false?$:$.map(hx)),$)}var HO=128,zO=/[\u0000-\u001F\u007F-\u009F]/,WO=32;function Xr(e){return e.kind!=="textValue"}function ri(e,t){return e.attributes.find(n=>n.localName===t)?.value}function _o(e,t){for(let n of e.children)if(Xr(n)&&n.localName===t)return n}function Kr(e){return e===void 0||e.length===0||e.length>HO?false:!zO.test(e)&&!I(e)}function VO(e){return e==="1"||e==="true"||e==="on"}function oi(e){if(e){for(let t of e.children)if(Xr(t)&&(t.kind==="runProperties"||t.localName==="rPr"))return t}}function bl(e){if(e){for(let t of e.children)if(Xr(t)&&(t.kind==="paragraphProperties"||t.localName==="pPr"))return t}}var yx=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function jo(e){return e.some(t=>yx.has(t.localName))?e.filter(t=>!yx.has(t.localName)):e}function bx(e){let t=_o(e,"docDefaults");if(!t)return {run:[],paragraph:[],paragraphNode:void 0};let n=oi(_o(t,"rPrDefault")),r=bl(_o(t,"pPrDefault"));return {run:jo(Mt(n)),paragraph:jo(Mt(r)),paragraphNode:r}}function xx(e){let t=ri(e,"styleId");if(!Kr(t))return null;let n=ri(e,"type")??"",r=_o(e,"basedOn"),o=r?ri(r,"val"):void 0,a$1=Kr(o)?o:null,i=_o(e,"next"),l=i?ri(i,"val"):void 0,s=Kr(l)?l:null,d=bl(e),c=oi(e),u=new Map,f=0;for(let p of e.children){if(p.kind==="textValue"||p.localName!=="tblStylePr")continue;if(f>=WO)break;f+=1;let m=ri(p,"type");m&&!u.has(m)&&u.set(m,p);}return {styleId:t,type:n,basedOn:a$1,next:s,outlineLevel:a(e),isDefault:VO(ri(e,"default")),paragraphProperties:jo(Mt(d)),runProperties:jo(Mt(c)),paragraphPropertiesNode:d,tablePropertiesNode:_o(e,"tblPr"),tableRowPropertiesNode:_o(e,"trPr"),conditionalTableFormats:u}}var Hf=32,GO=4096;function Kd(e){return e.map(t=>t.attributes?{n:t.localName,a:t.attributes}:{n:t.localName})}function jf(e){return e?B(ra$1(e)):""}function $O(e){return [...e.conditionalTableFormats].map(([t,n])=>[t,jf(n)])}var Xd=Object.freeze({tablePropertyNodes:Object.freeze([]),tableRowPropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function Rx(e,t){let n=t&&Kr(t)?t:null,r=n?Px(e,n):null;if(r)return r;let o=e.defaultTableStyleId;return !o||o===n?Xd:Px(e,o)??Xd}var Sx=new WeakMap;function Px(e,t){let n=Sx.get(e);n||(n=new Map,Sx.set(e,n));let r=n.get(t);if(r)return r;let o=KO(e,t);return o?(n.set(t,o),o):null}function KO(e,t){let n=Yd(e,t,"table");if(n.length===0)return null;let r=[],o=[],a=[],i=[],l=[],s=new Map;for(let d of n){d.tablePropertiesNode&&r.push(d.tablePropertiesNode),d.tableRowPropertiesNode&&o.push(d.tableRowPropertiesNode),d.paragraphPropertiesNode&&a.push(d.paragraphPropertiesNode),i.push(...d.paragraphProperties),l.push(...d.runProperties);for(let[c,u]of d.conditionalTableFormats)s.set(c,u);}return Object.freeze({tablePropertyNodes:Object.freeze(r),tableRowPropertyNodes:Object.freeze(o),paragraphPropertyNodes:Object.freeze(a),paragraphProperties:Object.freeze(i),runProperties:Object.freeze(l),conditional:XO(s)})}function XO(e){let t=Object.freeze({get:n=>e.get(n),has:n=>e.has(n),forEach:(n,r)=>{for(let[o,a]of e)n.call(r,a,o,t);},keys:()=>e.keys(),values:()=>e.values(),entries:()=>e.entries(),[Symbol.iterator]:()=>e[Symbol.iterator](),[Symbol.toStringTag]:"Map",get size(){return e.size}});return t}function wx(e){return e.paragraphPropertyNodes.length>0||e.paragraphProperties.length>0||e.runProperties.length>0||e.conditional.size>0}var zf=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function kx(e,t){let n=[...e.paragraphPropertyNodes],r=[...e.paragraphProperties],o=[...e.runProperties];for(let a of t){let i=e.conditional.get(a);if(!i)continue;let l=bl(i);l&&(n.push(l),r.push(...jo(Mt(l))));let s=oi(i);s&&o.push(...jo(Mt(s)));}return n.length===0&&r.length===0&&o.length===0?zf:{paragraphProperties:r,paragraphPropertyNodes:n,runProperties:o}}function vx(e,t=ph,n=null){let r=$y(n),o=new Map;if(!e)return {cacheToken:B({empty:true,theme:t,typography:r}),typography:r,docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,defaultTableStyleId:null,themeFonts:t,styles:o};let a=bx(e),i=null,l=null,s=null,d=0;for(let u of e.children){if(!Xr(u)||u.localName!=="style")continue;if(d>=GO)break;d+=1;let f=xx(u);if(!f)continue;let{isDefault:p,...m}=f;o.set(m.styleId,m),m.type==="paragraph"?p?i=m.styleId:i===m.styleId&&(i=null):m.type==="character"?p?l=m.styleId:l===m.styleId&&(l=null):m.type==="table"&&(p?s=m.styleId:s===m.styleId&&(s=null));}return {cacheToken:B({typography:r,dR:Kd(a.run),dP:Kd(a.paragraph),defP:i,defC:l,defT:s,theme:t,styles:[...o.values()].map(u=>({id:u.styleId,type:u.type,basedOn:u.basedOn,outlineLevel:u.outlineLevel,p:Kd(u.paragraphProperties),r:Kd(u.runProperties),tPr:jf(u.tablePropertiesNode),trPr:jf(u.tableRowPropertiesNode),tblStylePr:$O(u)}))}),typography:r,docDefaultsRun:a.run,docDefaultsParagraph:a.paragraph,docDefaultsParagraphNode:a.paragraphNode,defaultParagraphStyleId:i,defaultCharacterStyleId:l,defaultTableStyleId:s,themeFonts:t,styles:o}}function Wf(e,t){let n=null;for(let r of e){if(r.localName!==t)continue;let o=r.attributes?.val;n=Kr(o)?o:null;}return n}function Yd(e,t,n){let r=e.styles.get(t);if(!r||r.type!==n)return [];let o=[],a=new Set,i=t,l=0;for(;i!==null&&l<Hf&&!(a.has(i)||!Kr(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 xl(e,t,n){let r=Mt(t),o=Wf(r,"pStyle")??e.defaultParagraphStyleId,a=o?Yd(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...n?.paragraphProperties??[],...a.flatMap(p=>p.paragraphProperties)],l=[...i,...r],s=[];e.docDefaultsParagraphNode&&s.push(e.docDefaultsParagraphNode),n&&s.push(...n.paragraphPropertyNodes);for(let p of a)p.paragraphPropertiesNode&&s.push(p.paragraphPropertiesNode);t&&s.push(t);let d=oi(t&&Xr(t)?t:void 0),c=Mt(d),u=_s([{properties:e.docDefaultsRun,role:"defaults",emit:true},{properties:n?.runProperties??[],role:"xor",emit:true},{properties:a.flatMap(p=>p.runProperties),role:"xor",emit:true}]),f=c.length===0?u:_s([{properties:u,role:"carried",emit:true},{properties:c,role:"direct",emit:true}]);return {paragraphProperties:l,inheritedParagraphProperties:i,paragraphPropertyNodes:s,runProperties:u,markRunProperties:f,styleId:o??null}}function YO(e){let t;for(let n of e){if(!n||n.kind==="textValue")continue;let r=false;for(let o of n.children)if(Xr(o)&&o.localName==="pBdr"){r=true;break}r&&(t=Wr(n).bottom);}return t}function ai(e,t,n){let r=[];if(n){let i=Wf(t,"rStyle")??n.defaultCharacterStyleId;i&&(r=Yd(n,i,"character").flatMap(l=>l.runProperties));}if(e.length===0&&r.length===0)return t;if(r.length===0&&t.length===0)return e;let o=r.length===0?e:_s([...e.length>0?[{properties:n?.docDefaultsRun??[],role:"defaults",emit:false}]:[],{properties:e,role:"carried",emit:true},{properties:r,role:"xor",emit:true}]);return t.length===0?o:[...o,...t]}function Ho(e,t,n,r,o,a=false){let i=bl(e),l=n?xl(n,i,o):null,s=l?[...l.paragraphProperties]:Mt(i),d=Mt(oi(i&&Xr(i)?i:void 0)),c=l?l.runProperties:[],u=l?l.markRunProperties:d,f=yl(s),p=0,m=0;if(r)p=r.indent.hanging,m=r.indent.firstLine;else for(let O of s){if(O.localName!=="ind")continue;let S=hl(O.attributes?.hanging),T=hl(O.attributes?.firstLine);(O.attributes?.hanging!==void 0||O.attributes?.firstLine!==void 0)&&(p=S!==null?Math.max(0,Ze(S)):0,m=T!==null?Ze(T):0);}let g=r?{left:r.indent.left,right:r.indent.right,hanging:p,firstLine:m}:{left:f.left,right:f.right,hanging:p,firstLine:m},h=l?gb(l.paragraphPropertyNodes):hb(i),b=l?l.styleId:Wf(s,"pStyle")??null,x=null,y=false;for(let O of s){if(O.localName!=="outlineLvl")continue;y=true;let S=O.attributes?.val;x=S!==void 0&&/^[0-8]$/.test(S)?Number(S):null;}if(!y&&n&&b){let O=Yd(n,b,"paragraph");for(let S=O.length-1;S>=0;S-=1){let T=O[S].outlineLevel;if(T!==null){x=T;break}}}if(!y&&x===null&&b){let O=/^heading\s*([1-9])$/i.exec(b.trim());O&&(x=Number(O[1])-1);}return {props:s,indent:g,available:Math.max(1,t-g.left-g.right),alignment:uf(s),spacing:wb(s,{inList:r!==void 0,inTableCell:a}),lineSpacing:kb(s),contextualSpacing:vb(s),styleId:b,outlineLevel:x,bottomBorder:l?YO(l.paragraphPropertyNodes):Wr(i).bottom,borders:l?Fd(l.paragraphPropertyNodes):Wr(i),shading:lh(s),inheritedRunProperties:c,markRunProperties:u,tabStops:h,tabStopsCacheToken:kd(h),...r?{listItem:r}:{}}}var UO=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),Tx=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),Ix=new Map([[167,"\u25AA"],[183,"\u2022"]]),Ox=new Map([["symbol",UO],["wingdings",Tx],["wingdings 2",Ix],["wingdings 3",Ix],["webdings",Tx]]),qO=64;function zo(e){return !e||e.length>qO?false:Ox.has(e.toLowerCase())}function ii(e,t,n){if(e.length===0||!zo(t))return e;let r=Ox.get(t.toLowerCase());if(n?.(t)===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}var $f=new WeakMap;function m_(e,t){let n=t.dependencyKeys.size===0||[...t.dependencyKeys].every(r=>r===g.story);$f.set(e,{preservesNumberedSequence:t.impact==="text-local"&&!t.structural&&t.created.size===0&&t.deleted.size===0&&n});}function JO(e){let t=$f.get(e);return $f.delete(e),t}function QO(e){return [e.fontFamily??"",e.fontSizePt,e.bold?1:0,e.italic?1:0,e.characterSpacingPt,e.horizontalScalePercent,e.verticalAlign,e.hidden?1:0,e.kerningMinPt,e.caps?1:0,e.smallCaps?1:0].join(",")}var Dx=new WeakMap;function _x(e){return Dx.get(e)}function Kf(e){return e.kind!=="textValue"}function Fx(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function Ud(e,t){for(let n of e.children)if(Kf(n)&&n.localName===t)return n}function jx(e){if(!Kf(e))return null;let t=Ud(e,"numPr");if(!t)return null;let n=Ud(t,"numId"),r=Ud(t,"ilvl"),o;if(n){let i=Fx(n,"val");o=i!==void 0&&i!=="0"&&i.length<=64?i:null;}let a;if(r){let i=Fx(r,"val"),l=/^\d{1,2}$/.test(i??"")?Number(i):0;a=l<=8?l:null;}return {numId:o,ilvl:a}}function eF(e){let t=null,n=0;for(let r of e){let o=jx(r);o&&(o.numId!==void 0&&(t=o.numId),o.ilvl!==void 0&&(o.ilvl===null?t=null:n=o.ilvl));}return t===null?null:{numId:t,ilvl:n}}function tF(e,t){let n=new Set,r=e.styles.get(t);for(let o=0;r!==void 0&&o<Hf;o+=1){if(n.has(r.styleId))return;n.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?jx(a):null;if(i&&i.numId!==void 0)return i.numId??void 0;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}var Vf=new WeakMap;function qd(e,t){if(!t)return e;let n=Vf.get(e);if(n&&n.styleCascade===t)return n.linked;let r=_y(e,a=>tF(t,a)),o={styleCascade:t,linked:r};return Vf.set(e,o),Vf.set(r,o),r}function Cx(e){return Number.isFinite(e)?e>Tn?Tn:e<-Tn?-Tn:e:0}function Mx(e){let t=null;for(let n of e){if(n.localName!=="ind")continue;let r=n.attributes?.hanging,o=n.attributes?.firstLine;r===void 0&&o===void 0||(t={hanging:r!==void 0&&/^\d{1,9}$/.test(r)?Cx(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?Cx(Number(o)/20):0});}return t}function Bx(e,t=false){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.[t?"end":"start"]!==void 0))}function Lx(e,t=false){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.[t?"start":"end"]!==void 0))}function nF(e,t,n=[]){let r=vt([...t,...n]),o={localName:"bidi",attributes:{val:r?"1":"0"}};if(e.authored){let f=e.authored,p=f.left??(r?f.end:f.start),m=f.right??(r?f.start:f.end);e={...e,left:p??0,right:m??0,stated:{left:p!==void 0,right:m!==void 0,firstLineOffset:e.stated?.firstLineOffset??false}};}let a=e.stated??{left:false,right:false,firstLineOffset:false},i=yl([...t,o]),l=yl([...n,o]),s={hanging:e.hanging,firstLine:e.firstLine},d=Bx(n,r)?l.left:a.left?e.left:Bx(t,r)?i.left:e.left,c=Lx(n,r)?l.right:a.right?e.right:Lx(t,r)?i.right:e.right,u=Mx(n)??(a.firstLineOffset?s:Mx(t)??s);return {left:d,right:c,...u}}function Wo(e,t=8){let n=[],r=(o,a)=>{for(let i of o){if(i.kind==="paragraph"){n.push(i);continue}if(!(i.kind!=="table"||a>=t)){for(let l of Dc$1(i.children))if(l.kind==="tableRow")for(let s of Dc$1(l.children)){if(s.kind!=="tableCell")continue;let d=Hd$1(s.children);r(d,a+1);}}}};return r(e,0),n}var Ex=new WeakMap;function Hx(e,t){let n=Ex.get(e);if(n&&n.styleCascade===t)return n;let r=e.children.find(s=>s.kind==="paragraphProperties"),o=t?xl(t,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&Kf(r)?Ud(r,"rPr"):void 0,l={styleCascade:t,numPr:eF(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:Mt(r),inheritedMarkProps:o?o.markRunProperties:Mt(i),perLevel:new WeakMap};return Ex.set(e,l),l}function Xf(e,t,n,r){let o=new Map;if(t.nums.size===0)return o;let a=qd(t,n),i=zy(a);for(let l of Wo(e)){let s=Hx(l,n),d=s.numPr;if(!d)continue;let c=i.advance(d.numId,d.ilvl);if(!c)continue;let u=s.perLevel.get(c.level);if(!u){let b=nF(c.level.indent,s.inheritedParagraphProperties,s.directProps),x=ai(s.inheritedMarkProps,c.level.runProperties,n);u={indent:b,markerStyle:Ne(x,n?.themeFonts)},s.perLevel.set(c.level,u);}let{indent:f,markerStyle:p}=u,m=ii(c.markerText,p.fontFamily,r),g=J([c.numId,c.ilvl,c.level.numFmt,c.level.lvlText,f.left,f.right,f.hanging,f.firstLine,c.level.lvlJc,c.level.suff,c.level.vanish?1:0,m,QO(p)].map(String)),h={numId:c.numId,ilvl:c.ilvl,abstractNumId:c.abstractNumId,numFmt:c.level.numFmt,markerText:m,...c.level.numFmt==="bullet"?{}:{ordinal:c.counters[c.ilvl]??1},markerAlign:c.level.lvlJc,suffix:c.level.suff,indent:f,markerStyle:p,cacheToken:g};Dx.set(h,{index:a,numId:c.numId,ilvl:c.ilvl,expandCounters:Vy(c)}),o.set(l.id,h);}return o}var zx=new WeakMap,Wx=new WeakMap;function Nx(e,t,n){let r=n?Wx.get(n):zx.get(t);if(r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable)return r}function rF(e,t,n){t?Wx.set(t,n):zx.set(e,n);}function Vx(e,t,n){if(e.listItems===void 0){let i=Nx(e,t,n);if(i&&n===void 0)return {...e,numberingIndex:i.linkedIndex,...i.listItems?{listItems:i.listItems}:{}}}let r=e.listItems===void 0?Nx(e,t,n):void 0,o=r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable?r.linkedIndex:qd(e.numberingIndex??jy,e.styleCascade),a=e.listItems??(o.nums.size>0?lF(t,e.numberingIndex,o,e.styleCascade,e.isFontAvailable,n):void 0);return e.listItems===void 0&&rF(t,n,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:o,listItems:a}),{...e,numberingIndex:o,...a?{listItems:a}:{}}}function si(e,t){return Vx(e,t,void 0)}function Gx(e,t,n){return Vx(e,t,n)}var Ax=new WeakMap,oF=Object.freeze([]);function aF(e,t){let n=Ax.get(e);if(n&&n.styleCascade===t)return n.numbered;let r=Wo([e]).filter(a=>Hx(a,t).numPr!==null),o=r.length>0?r:oF;return Ax.set(e,{styleCascade:t,numbered:o}),o}var li=new WeakMap,Gf=new WeakMap;function iF(e,t){return e.length===t.length&&e.every((n,r)=>{let o=t[r];if(!o||n.id!==o.id)return false;let a=n.children.find(l=>l.kind==="paragraphProperties"),i=o.children.find(l=>l.kind==="paragraphProperties");return a===i})}function lF(e,t,n,r,o,a){let i=e[0],l=e[e.length-1],s=a?Gf.get(a):(i?li.get(i):void 0)??(l?li.get(l):void 0);if((a?JO(a):void 0)?.preservesNumberedSequence&&s&&s.rawIndex===t&&s.styleCascade===r&&s.isFontAvailable===o)return s.listItems;let c=new Array(e.length),u=s!==void 0&&s.rawIndex===t&&s.styleCascade===r&&s.isFontAvailable===o&&s.blocks.length===e.length;for(let m=0;m<e.length;m+=1){let g=e[m],h=s&&s.blocks[m]===g?s.numberedByBlock[m]:aF(g,r);c[m]=h,u&&!iF(h,s.numberedByBlock[m])&&(u=false);}if(s&&u){let m={...s,blocks:e,numberedByBlock:c};return a?Gf.set(a,m):(i&&li.set(i,m),l&&l!==i&&li.set(l,m)),s.listItems}let f=Xf(e,n,r,o),p={rawIndex:t,styleCascade:r,isFontAvailable:o,blocks:e,numberedByBlock:c,listItems:f};return a?Gf.set(a,p):(i&&li.set(i,p),l&&l!==i&&li.set(l,p)),f}function Yf(e,t,n,r){if((!e.markerText||e.indent.hanging<=0&&t<=0)&&!e.markerText||!e.markerText)return null;let o=e.indent.left,a=e.indent.hanging,i=a>0?0:Math.max(0,e.indent.firstLine),l=Math.min(0,o),s=i>0?o+i:Math.max(l,o-a),d=Math.max(a,t),c=s;return e.markerAlign==="right"?c=i>0?s+d-t:o-t:e.markerAlign==="center"&&(c=s+(d-t)/2),c<l&&(c=l),{x:c,y:n,width:Math.max(t,0),height:r}}function sF(e,t,n=al,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=t.measure(e.markerText,e.markerStyle),a=Yf(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+t.measure(" ",e.markerStyle)-i:l<=i?0:ll(n,l,r).positionPt-i}function $x(e,t,n,r,o){return e?sF(e,n,r,o===void 0?void 0:t.left+o):t.hanging>0?-t.hanging:t.firstLine}function h_(e,t,n){return di(e,t,()=>n)}function di(e,t,n){let r=[],o=null,a=-1,i=-1;for(let l of t){let s=n(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:zn(s.numFmt,d),displayNumber:d});}return r}function dF(e){let t=new Map;for(let n of e)t.set(n.noteId,n.mark);return t}var Uf=4096,On=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 Zf(e,t,n=31680*2){if(e===void 0||!/^-?\d{1,7}$/.test(e))return t;let r=Number(e);return !Number.isFinite(r)||r<=0||r>n?t:r}function Vo(e,t){if(e===void 0||!/^-?\d{1,7}$/.test(e))return t;let n=Number(e);return !Number.isFinite(n)||Math.abs(n)>31680?t:n}function qx(e,t,n=31680){if(e===void 0||!/^\d{1,7}$/.test(e))return t;let r=Number(e);return !Number.isFinite(r)||r<0||r>n?t:r}var ft=(e,t)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes??[])if(n.localName===t)return n.value}},Go=(e,t)=>{if(e.kind!=="textValue"){for(let n of e.children??[])if(n.kind!=="textValue"&&"localName"in n&&n.localName===t)return n}};function Kx(e,t,n){let r=ft(e,t);return r===void 0?n:r==="0"||r==="false"||r==="off"||r==="no"?false:r==="1"||r==="true"||r==="on"||r==="yes"?true:n}function cF(e){if(!e)return 1;let t=ft(e,"num");return !t||!/^\d{1,7}$/.test(t)?1:Math.max(1,Math.min(12,Number(t)))}function uF(e,t,n){if(!e||e.kind==="textValue")return [];let r=[];for(let o of e.children??[]){if(r.length>=t||o.kind==="textValue"||!("localName"in o)||o.localName!=="col")continue;let a=r.length;r.push({widthTwips:Zf(ft(o,"w"),1,31680),gapTwips:a===t-1?0:qx(ft(o,"space"),n)});}return r}function fF(e){let t=e?Go(e,"type"):void 0,n=t?ft(t,"val"):void 0;return n==="continuous"||n==="evenPage"||n==="oddPage"||n==="nextColumn"?n:"nextPage"}var mF=new Set(["hyphen","period","colon","emDash","enDash"]);function pF(e){let t=Go(e,"pgNumType");if(!t||t.kind==="textValue")return;let n={},r=ft(t,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let l=Number(r);Number.isFinite(l)&&l>=0&&l<=9999&&(n.start=l);}let o=ft(t,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(n.fmt=o);let a=ft(t,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let l=Number(a);Number.isFinite(l)&&l>=0&&l<=9&&(n.chapStyle=l);}let i=ft(t,"chapSep");return i!==void 0&&mF.has(i)&&(n.chapSep=i),n}var Xx=new WeakMap;function qf(e){if(!e)return On;let t=Xx.get(e);if(t!==void 0)return t;let n=gF(e);return Xx.set(e,n),n}function gF(e){let t=Go(e,"pgSz"),n=Go(e,"pgMar"),r=Go(e,"cols"),o=On,a=t?ft(t,"orient"):void 0,i=t?Zf(ft(t,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,l=t?Zf(ft(t,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,s=pF(e),d=cF(r),c=r?qx(ft(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?Kx(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:l},margins:{topTwips:n?Vo(ft(n,"top"),1440):o.margins.topTwips,rightTwips:n?Vo(ft(n,"right"),1440):o.margins.rightTwips,bottomTwips:n?Vo(ft(n,"bottom"),1440):o.margins.bottomTwips,leftTwips:n?Vo(ft(n,"left"),1440):o.margins.leftTwips,headerTwips:n?Vo(ft(n,"header"),720):o.margins.headerTwips,footerTwips:n?Vo(ft(n,"footer"),720):o.margins.footerTwips,gutterTwips:n?Vo(ft(n,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?Kx(r,"sep",false):false,definitions:u?[]:uF(r,d,c)},landscape:a==="landscape"||i>l,titlePage:pa(e,"titlePg"),breakType:fF(e),...s!==void 0?{pageNumbering:s}:{}}}function hF(e){let t=n=>{if(n.kind!=="textValue"){if(n.kind==="body")return Go(n,"sectPr");for(let r of n.children??[]){let o=t(r);if(o)return o}}};return t(e.root)}var Yx=new WeakMap;function Zn(e){let t=Yx.get(e);if(t!==void 0)return t??void 0;let n=e.children.find(a=>a.kind==="paragraphProperties"),r=n?Go(n,"sectPr"):void 0,o=r&&r.kind!=="textValue"?r:void 0;return Yx.set(e,o??null),o}function R_(e){let t=Jf(e);return t[t.length-1]?.properties??On}function Jf(e,t="all-markup",n){return Qf(e,t,n).sections}function Zx(e,t="all-markup",n){let r=hn(e,t,n),o=$o(e,r).sections,a=hn(e,"all-markup"),i=$o(e,a).sections,l=Math.max(0,i.length-1),s=new Map;for(let d of i){if(d.blockStart===d.blockEndExclusive)continue;let c=a[d.blockEndExclusive-1];c?.kind==="paragraph"&&Zn(c)&&s.set(c.id,d.index);}return o.map(d=>{if(d.blockStart===d.blockEndExclusive)return l;let c=r[d.blockEndExclusive-1];return c?.kind!=="paragraph"||!Zn(c)?l:s.get(c.id)??l})}function Qf(e,t="all-markup",n){return $o(e,hn(e,t,n))}var Ux=lg(16);function $o(e,t){let n=Ux.get(t);if(n&&n.part===e)return n.result;let r=yF(e,t);return Ux.set(t,{part:e,result:r}),r}function yF(e,t){let n=[],r=0,o=false;for(let i=0;i<t.length;i+=1){let l=t[i];if(l.kind!=="paragraph")continue;let s=Zn(l);if(s){if(n.length>=Uf){o=true;continue}n.push({index:n.length,properties:qf(s),blockStart:r,blockEndExclusive:i+1}),r=i+1;}}if(o){if(n.length>0){let i=n[n.length-1];n[n.length-1]={...i,blockEndExclusive:t.length};}return {sections:n,truncated:true}}let a=hF(e);if(r<t.length||n.length===0){if(n.length>=Uf){let i=n[n.length-1];return n[n.length-1]={...i,blockEndExclusive:t.length},{sections:n,truncated:true}}n.push({index:n.length,properties:qf(a),blockStart:r,blockEndExclusive:t.length});}else if(a){if(n.length>=Uf)return {sections:n,truncated:true};n.push({index:n.length,properties:qf(a),blockStart:r,blockEndExclusive:t.length});}return {sections:n,truncated:o}}function Yr(e){let t=Ze(Xe(e.pageSize.widthTwips)),n=Ze(Xe(e.pageSize.heightTwips)),r=Ze(Xe(e.margins.leftTwips+e.margins.gutterTwips)),o=Ze(Xe(e.margins.rightTwips)),a=Ze(Xe(e.margins.topTwips)),i=Ze(Xe(e.margins.bottomTwips));return t-r-o<=0||n-a-i<=0?Ks:{width:t,height:n,margin:{top:a,right:o,bottom:i,left:r},headerDistance:Ze(Xe(Math.max(0,e.margins.headerTwips))),footerDistance:Ze(Xe(Math.max(0,e.margins.footerTwips)))}}var Jx=4096,Qx=new WeakMap;function rS(e,t){let n=Qx.get(e);if(n&&n.sections===t)return n.input;let r={sections:t,footnotePropsBySection:e.footnotePropsBySection,endnotePropsBySection:e.endnotePropsBySection,documentFootnoteProps:e.documentFootnoteProps,documentEndnoteProps:e.documentEndnoteProps};return Qx.set(e,{sections:t,input:r}),r}function L_(e,t,n){let r=Cf$1(e),o=Df$1(r),a=Ef$1(r),i=Ff$1(void 0,o),l=Gf$1(void 0,a),s=$o(t,n).sections,d=c=>{if(c.blockStart===c.blockEndExclusive)return;let u=n[c.blockEndExclusive-1];return u?.kind==="paragraph"?Zn(u):void 0};return {sections:s,footnotePropsBySection:s.map(c=>Ff$1(Af$1(d(c)),o)),endnotePropsBySection:s.map(c=>Gf$1(Bf$1(d(c)),a)),documentFootnoteProps:i,documentEndnoteProps:l}}var bF=Object.freeze([]);function xF(e){for(let t of e.attributes){if(t.localName!=="customMarkFollows"||t.namespaceUri!==da&&t.namespaceUri!=="")continue;let n=t.value;return !(n==="0"||n==="false"||n==="off")}return false}var eS=new WeakMap;function SF(e){let t=eS.get(e);if(t)return t;let n=null;for(let o of Ne$1(e)){let a=o.node;if(a.kind!=="noteReference")continue;let i=kd$1(a),l=hd$1(a);i===null||l===null||(n??=[]).push({nodeId:a.id,noteKind:i,noteId:l,customMarkFollows:xF(a)});}let r=n===null?bF:Object.freeze(n);return eS.set(e,r),r}function PF(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function RF(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}var wF=new Map,tS=new WeakMap;function oS(e,t){let n=tS.get(e);if(n&&n.input===t)return n.index;let r=[],o=[],a=[],i=[],l=0,s=0;for(let f=0;f<e.length&&l<Jx;f+=1){for(;s<t.sections.length-1&&f>=t.sections[s].blockEndExclusive;)s+=1;let p=t.sections.length>0?s:0;for(let m of Wo([e[f]]))for(let g of SF(m)){if(l>=Jx)break;l+=1;let h={noteId:g.noteId,sectionIndex:p,customMarkFollows:g.customMarkFollows};g.noteKind==="footnote"?(r.push(h),o.push(g.nodeId)):(a.push(h),i.push(g.nodeId));}}let d=null,c=(f,p,m,g)=>{if(p.length===0||(f==="footnote"?t.footnotePropsBySection.length>0?t.footnotePropsBySection:[t.documentFootnoteProps]:t.endnotePropsBySection.length>0?t.endnotePropsBySection:[t.documentEndnoteProps]).some(x=>x.numRestart==="eachPage"))return;let b=di(f,p,g);for(let x=0;x<b.length;x+=1){let y=b[x].mark,O=m[x];y!==null&&y.length>0&&O!==void 0&&(d??=new Map).set(O,y);}};c("footnote",r,o,f=>PF(t,f)),c("endnote",a,i,f=>RF(t,f));let u=d??wF;return tS.set(e,{input:t,index:u}),u}function em(e,t){for(let n of e.attributes)if(n.namespaceUri===da&&n.localName===t)return n.value}var nS=new WeakMap;function aS(e,t){let n=nS.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,l=null,s=gr(),d=(c,u,f)=>{if(a||c.kind==="textValue"||f>=la||s.exhausted||u>Ht)return;if(c.kind==="bookmarkStart"){!o&&em(c,"name")===t&&(o=true,i=em(c,"id"));return}if(c.kind==="bookmarkEnd"){o&&i!==void 0&&em(c,"id")===i&&(a=true);return}if(o&&c.kind==="noteReference"){l=c.id,a=true;return}if(!lt(s))return;let p=ma(c,f);for(let m of c.children)d(m,u+1,p);};for(let c of e.children){if(a||!lt(s))break;d(c,1,0);}return n||(n=new Map,nS.set(e,n)),n.set(t,l),l}function Ur(e,t,n){if(!e.has(t)&&e.size>=8){let r=e.keys().next();r.done||e.delete(r.value);}e.set(t,n);}var kF=512,vF=2048,iS=4096,mS=Object.freeze([]),pS=Object.freeze([]),TF=Object.freeze({fields:pS,bookmarks:mS});function tm(e){return e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}var lS=new WeakMap;function IF(e){let t=lS.get(e);if(t)return t;let n=null,r=null,o=gr(),a=ko(),i=null,l=null,s=br,d=br,c=()=>{if(a.nesting!==1||a.phase!=="instruction"||a.nestingOverflow)return;let m=Ba(a);if(m.overflow||l===null)return;let g=_r(m.instruction);if(g){i={spec:g,autonum:null,anchorId:l,cached:"",revisions:d};return}let h=Fo(m.instruction);h&&(i={spec:null,autonum:h,anchorId:l,cached:"",revisions:d});},u=()=>{i&&((n??=[]).push({spec:i.spec,autonum:i.autonum,anchorId:i.anchorId,cached:tm(i.cached),revisions:i.revisions}),i=null);},f=(m,g,h)=>{if(m.kind==="textValue"||h>=la||o.exhausted||g>Ht)return;if(m.kind==="bookmarkStart"){let x=Ui(m,"name");x!==void 0&&x.length>0&&x.length<=Uu&&(r??=[]).push(x);return}if(m.kind==="run"){for(let x of m.children){if(!lt(o))return;if(x.kind!=="runProperties"){if(kt(x,"begin")){vo(a),a.nesting===1&&(l=x.id,d=s,i=null);continue}if(pr(x)){To(a,x,o,g+1);continue}if(kt(x,"separate")){c(),Io(a);continue}if(kt(x,"end")){let y=a.nesting===1;c(),Oo(a),y&&u();continue}if(i&&a.nesting===1&&a.phase==="result")if(x.kind==="text")for(let y of x.children)y.kind==="textValue"&&i.cached.length<Co&&(i.cached+=y.value.slice(0,Co-i.cached.length));else x.kind==="tab"&&i.cached.length<Co&&(i.cached+=" ");}}return}if(ee(m)){let x=ge(m)??"",y=_r(x),O=y===null?Fo(x):null;(y||O)&&(n??=[]).push({spec:y,autonum:O,anchorId:m.id,cached:tm(gy(m,o)),revisions:s});return}if(Qu(m)||!lt(o))return;if(Xt(m)){let x=tn(m);if(x){let y=s;s=fn(y,x);let O=ma(m,h);for(let S of m.children)f(S,g+1,O);s=y;return}}let b=ma(m,h);for(let x of m.children)f(x,g+1,b);};for(let m of e.children){if(!lt(o))break;f(m,1,0);}let p=n===null&&r===null?TF:Object.freeze({fields:n??pS,bookmarks:r??mS});return lS.set(e,p),p}var OF=Object.freeze({fieldsByParagraph:null,bookmarkOwners:null}),sS=new WeakMap;function FF(e){let t=sS.get(e);if(t)return t;let n=null,r=null;for(let a of Wo([e])){let i=IF(a);i.fields.length>0&&(n??=new Map).set(a.id,i.fields);for(let l of i.bookmarks)r??=new Map,!r.has(l)&&r.size<vF&&r.set(l,a);}let o=n===null&&r===null?OF:Object.freeze({fieldsByParagraph:n,bookmarkOwners:r});return sS.set(e,o),o}var Zd=new WeakMap;function CF(e){let t=e[0],n=e[e.length-1],r=(t?Zd.get(t):void 0)??(n?Zd.get(n):void 0)??new Map;return t&&Zd.set(t,r),n&&Zd.set(n,r),r}var Jd=new WeakMap;function MF(e){let t=e[0],n=e[e.length-1],r=(t?Jd.get(t):void 0)??(n?Jd.get(n):void 0)??new Map;return t&&Jd.set(t,r),n&&Jd.set(n,r),r}function dS(e){return e.length>1&&e.endsWith(".")?e.slice(0,-1):e}var cS=new WeakMap;function uS(e,t=_e,n){if(!e)return [];let r=`${t}|${n?.cacheKey??""}`,o=cS.get(e),a=o?.get(r);if(a)return a;let i=[];for(let l of sd$1(e.root)){if(i.length>=qd$1)break;if(!jd$1(l))continue;let s=Sl(l,t,n);s.length>0&&i.push(s);}return o?Ur(o,r,i):cS.set(e,new Map([[r,i]])),i}var fS=new WeakMap;function BF(e,t,n,r,o,a){let i=new Map,l=[],s=0,d=w=>{for(let v of w){let I=FF(v);if(l.push(I),!!I.fieldsByParagraph)for(let[P,C]of I.fieldsByParagraph){if(s>=kF)break;i.set(P,C),s+=C.length;}}};if(d(e),n){for(let w of uS(n.footnotesPart,o,a))d(w);for(let w of uS(n.endnotesPart,o,a))d(w);}if(i.size===0)return null;let c=new Set;for(let w of i.values())for(let v of w)v.spec&&c.add(v.spec.bookmark);let u=new Map;for(let w of l)if(w.bookmarkOwners)for(let[v,I]of w.bookmarkOwners)c.has(v)&&!u.has(v)&&u.set(v,I);let f=new Map,p=new Map,m=new Map;for(let[w,v]of i)for(let I of v){if(!I.autonum||!je(I.revisions,o,a))continue;let P=(m.get(I.autonum.kind)??0)+1;m.set(I.autonum.kind,P);let C=oy(I.autonum,P);C.length!==0&&(f.set(I.anchorId,C),p.has(w)||p.set(w,C));}let g=w=>{let v=vn(w);if(v.pageRef)return null;let I=u.get(w.bookmark);if(!I)return null;if(v.noteRef){if(r===void 0)return null;let C=aS(I,w.bookmark);return C===null?null:oS(e,r).get(C)??null}if(w.numberSwitch!==null){let C=t?.get(I.id);if(!C){if(v.suppressNonDelimiterText)return null;let j=p.get(I.id);return j!==void 0?dS(j):null}let E=_x(C),D=E!==void 0?Gy(E,w.numberSwitch==="n",v.suppressNonDelimiterText):null,z=!v.suppressNonDelimiterText&&C.numFmt!=="bullet"&&C.numFmt!=="none"&&C.markerText.length>0?C.markerText:null,W=D??z;return W===null?null:dS(W)}if(v.suppressNonDelimiterText)return null;let P=hy(I,w.bookmark);return P.length>0?P:null},h=new Map,b=w=>{let v=vn(w),I=`${v.suppressNonDelimiterText?"t":""}${v.noteRef?"x":""}`,P=`${w.numberSwitch??"-"}${I}\0${w.bookmark}`;if(h.has(P))return h.get(P)??null;let C=g(w);return h.set(P,C),C},x=CF(e),y=MF(e),O=new Map,S=new Map,T=new Map,k=[];for(let[w,v]of i){let I=[];for(let C of v){if(C.spec===null){let W=C.autonum?f.get(C.anchorId)??null:null;I.push(W!==null?`a${W}`:`c${C.cached}`);continue}if(vn(C.spec).pageRef){let W=u.get(C.spec.bookmark);if(W){let j=y.get(C.anchorId);j===void 0&&y.size<iS&&(j=Object.freeze({}),y.set(C.anchorId,j)),j!==void 0&&S.set(C.anchorId,{spec:C.spec,projection:{targetParagraphId:W.id,cached:C.cached,calibration:j}});}I.push(`c${C.cached}${W?.id??""}`);continue}let E=b(C.spec),D=x.get(C.anchorId);D===void 0&&(D=C.cached.length===0||E!==null&&tm(E)===C.cached,C.cached.length>0&&x.size<iS&&x.set(C.anchorId,D));let z=D?E:null;O.set(C.anchorId,{spec:C.spec,live:z}),I.push(z!==null?`l${z}`:`c${C.cached}`);}let P=I.join("");T.set(w,P),k.push(w,P);}return {valuesToken:J(k),tokenForParagraph:w=>T.get(w)??"",liveValueOf:(w,v)=>{let I=O.get(w);return !I||I.live===null||I.spec.bookmark!==v.bookmark||I.spec.numberSwitch!==v.numberSwitch||vn(I.spec)!==vn(v)?null:I.live},autonumValueOf:w=>f.get(w)??null,pageRefProjectionOf:(w,v)=>{let I=S.get(w);return !I||I.spec.bookmark!==v.bookmark||vn(I.spec)!==vn(v)?null:I.projection}}}function q_(e,t,n){return nm(e,t,n,void 0)}function nm(e,t,n,r,o=_e,a){let i=n?.footnotesPart??null,l=n?.endnotesPart??null,s=fS.get(e);if(s&&s.listItems===t&&s.footnotesPart===i&&s.endnotesPart===l&&s.noteNumbering===r&&s.displayMode===o&&s.authorFilterKey===(a?.cacheKey??""))return s.context;let d=BF(e,t,n,r,o,a);return fS.set(e,{listItems:t,footnotesPart:i,endnotesPart:l,noteNumbering:r,displayMode:o,authorFilterKey:a?.cacheKey??"",context:d}),d}function gS(e,t){let n=[];for(let r of Wo([e])){let o=t.tokenForParagraph(r.id);o&&n.push(o);}return n.join(";")}var qr=61440,Pl=61695,rm=128;function ci(e){return e.kind==="generic"&&e.namespaceUri===da&&e.localName==="sym"}function hS(e,t){if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes)if(n.localName===t&&(n.namespaceUri===da||n.namespaceUri===""))return n.value}}function LF(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function Qd(e){return !(!Number.isInteger(e)||e<32||e>1114111||e>=127&&e<=159||e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65534)===65534||e===65532)}function ui(e){if(!ci(e))return null;let t=LF(hS(e,"char"));if(t===null)return null;let n=hS(e,"font"),r=n&&n.length<=rm?n:null,o=zo(r),a=o&&t<=255&&t+qr<=Pl?t+qr:t;if(o&&a>=qr&&a<=Pl){let i=ii(String.fromCodePoint(a),r),l=i.codePointAt(0)<qr;return {text:i,font:r,unicode:l}}return Qd(t)?{text:String.fromCodePoint(t),font:r,unicode:t<57344||t>63743}:null}function om(e,t,n){if(!t.font)return {props:e,style:Ne(e,n)};let r=[...e,{localName:"rFonts",attributes:{ascii:t.font,hAnsi:t.font,eastAsia:t.font,hint:"default"}}];return {props:r,style:Ne(r,n)}}var EF=256,NF=9;function AF(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "||r===" "||r===`
|
|
15
|
-
`||r==="\r"){n+=1;continue}if(r==='"'){let a=n+1;for(;a<e.length&&e[a]!=='"';)a+=1;t.push({value:e.slice(n+1,a),quoted:true}),n=a<e.length?a+1:a;continue}let o=n;for(;o<e.length&&!`
|
|
16
|
-
\r"`.includes(e[o]);)o+=1;t.push({value:e.slice(n,o),quoted:false}),n=o;}return t}function DF(e){if(e.quoted)return null;let t=e.value;if(t.length===0||t.length>NF)return null;let n;if(t.startsWith("0x")||t.startsWith("0X")){let r=t.slice(2);if(!/^[0-9A-Fa-f]{1,6}$/.test(r))return null;n=Number.parseInt(r,16);}else {if(!/^\d{1,7}$/.test(t))return null;n=Number.parseInt(t,10);}return n>1114111||n>=55296&&n<=57343?null:n}function ec(e){if(e.length===0||e.length>EF)return null;let t=AF(e);if(t.length<2)return null;let n=t[0];if(n.quoted||n.value.toUpperCase()!=="SYMBOL")return null;let r=DF(t[1]);if(r===null)return null;let o=null,a=null,i=false;for(let l=2;l<t.length;l+=1){let s=t[l];if(s.quoted||!s.value.startsWith("\\"))continue;let d=s.value.toLowerCase();if(d==="\\f"){let c=t[l+1];c&&c.value.length>0&&c.value.length<=rm&&(c.quoted||!c.value.startsWith("\\"))&&(o=c.value,l+=1);continue}if(d==="\\s"){let c=t[l+1];if(c&&(c.quoted||!c.value.startsWith("\\"))&&(l+=1,/^\d{1,3}$/.test(c.value))){let u=Number(c.value);u>=1&&u<=999&&(a=u);}continue}d==="\\u"&&(i=true);}return {code:r,font:o,sizePt:a,unicode:i}}function tc(e,t,n){let r=[];e.font&&r.push({localName:"rFonts",attributes:{ascii:e.font,hAnsi:e.font,eastAsia:e.font,hint:"default"}}),e.sizePt!==null&&r.push({localName:"sz",attributes:{val:String(e.sizePt*2)}});let o=r.length>0?[...t,...r]:t,a=Ne(o,n);if(e.unicode)return Qd(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(zo(i)){let l=e.code<=255&&e.code+qr<=Pl?e.code+qr:e.code;if(l>=qr&&l<=Pl)return {text:ii(String.fromCodePoint(l),i),props:o,style:a}}return Qd(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function nc(){let e=null,t=0,n=false,r=false,o=()=>{e=null,t=0,n=false,r=false;};return {get active(){return e!==null},onSeparate(a,i){e===null&&a!==null&&(e=a,t=i,n=false,r=false);},onEnd(a,i){if(e===null||a>t)return null;let l=a===t,d=l&&i&&!(n&&!r)?hr(e.kind,i,e.picture):"";return o(),l?d:null},reset:o,noteResult(a){n=true,a&&(r=true);}}}function _F(e){let{simple:t,depth:n,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:l,cascadeRuns:s,themeFonts:d}=e,c="",u,f,p=false,m=ko(),g=nc(),h=(x,y)=>{u||(u=x,f=y);},b=(x,y,O)=>{if(!(x.kind==="textValue"||y>Ht)){for(let S of x.children)if(S.kind!=="textValue"){if(!lt(o))return;if(S.kind==="run"){let T=Za(S,l,s),k=Ne(T,d);for(let w of S.children){if(w.kind==="runProperties")continue;if(kt(w,"begin")){vo(m),m.nesting===1&&g.reset();continue}if(pr(w)){To(m,w,o,y+1);continue}if(kt(w,"separate")){let E=m.nesting,D=m.phase,z=Io(m);(E===1||D==="result"&&!m.nestingOverflow)&&g.onSeparate(r?z:null,E);continue}if(kt(w,"end")){let E=g.onEnd(m.nesting,r);E!==null&&(c+=E),Oo(m);continue}if(je$1(w))continue;if(ci(w)){if(je(O,i,e.authorFilter)&&(p=true),g.active){g.noteResult(!k.hidden&&je(O,i,e.authorFilter));continue}let E=ui(w);if(!E?.unicode||k.hidden||!je(O,i,e.authorFilter))continue;h(T,k),c+=E.text;continue}let v=ml(w);if(v.length===0)continue;let I=Wn(O),P=!je(O,i,e.authorFilter)||w.kind==="deletedText"&&!I;P||(p=true);let C=k.hidden||P;if(g.active){g.noteResult(!C),C||h(T,k);continue}C||(h(T,k),c+=v);}continue}if(ee(S)){let T=g.active?null:Ma(ge(S)??"");if(T&&r){if(!je(O,i,e.authorFilter))continue;let k=c.length;b(S,y+1,O),c=c.slice(0,k),c+=hr(T.kind,r,T.picture);continue}b(S,y+1,O);continue}if(S.kind==="hyperlink"){b(S,y+1,O);continue}if(Xt(S)&&O.length<td){let T=tn(S);b(S,y+1,T?fn(O,T):O);continue}b(S,y+1,O);}}};return b(t,n,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:p}}function yS(e){let{simple:t,pageContext:n,inheritedRunProperties:r,themeFonts:o}=e,a=_F(e),i=ge(t)??"",l=a.resultProps??r,s=Ma(i);if(s&&n){let g=a.resultStyle??Ne(r,o);return g.hidden?null:{text:hr(s.kind,n,s.picture),props:l,style:g}}if(s&&e.bodyPageFields&&!n&&a.text.length===0&&!a.sawResultContent){let g=a.resultStyle??Ne(r,o);if(g.hidden)return null;let b=s.picture!==void 0&&Nr(s.kind,e.bodyPageFields.format)?s.picture:void 0;return {text:qs(s.kind,b,e.bodyPageFields.format),props:l,style:g,pageField:b===void 0?{kind:s.kind}:{kind:s.kind,picture:b}}}let d=ec(i);if(d){let g=tc(d,l,o);if(g)return g.style.hidden?null:{text:g.text,props:g.props,style:g.style}}if(e.refFields){let g=_r(i);if(g){let h=e.refFields.liveValueOf(t.id,g);if(h!==null){let b=a.resultStyle??Ne(r,o);return b.hidden?null:{text:h,props:l,style:b}}if(e.bodyPageFields&&e.refFields.pageRefProjectionOf){let b=e.refFields.pageRefProjectionOf(t.id,g);if(b){let x=a.resultStyle??Ne(r,o);if(x.hidden)return null;if(a.text.length>0)return {text:a.text,props:l,style:x,pageRef:b};if(!a.sawResultContent)return {text:Ea,props:l,style:x,pageRef:b}}}}else if(e.refFields.autonumValueOf&&Fo(i)){let h=e.refFields.autonumValueOf(t.id);if(h!==null){let b=a.resultStyle??Ne(r,o);return b.hidden?null:{text:h,props:l,style:b}}}}let c=a.text.length===0&&!a.sawResultContent;if(c){let g=ld(i);if(g){let h=sd(g,e.documentProperties);if(h!==null){let b=a.resultStyle??Ne(r,o);return b.hidden?null:{text:h,props:l,style:b}}}}let u=c?id(i):null;if(u){let g=a.resultStyle??Ne(r,o);return g.hidden?null:{text:u.display,props:l,style:g}}if(a.text.length===0)return null;let f=a.resultStyle??Ne(r,o);if(f.hidden)return null;let p=e.currentLink?null:dd(i),m=p?e.projectFieldLink?.(p)??null:null;return {text:a.text,props:l,style:f,...m?{link:m}:{}}}var jF="\u2612",HF="\u2610";function zF(e){let t=wo(e);return t==="FORMCHECKBOX"?"checkbox":t==="FORMDROPDOWN"?"dropdown":null}function Rl(e,t){e.symbolSpec=ec(t),!e.symbolSpec&&(e.linkSpec=dd(t),!e.linkSpec&&(e.formSpec=zF(t),!e.formSpec&&(e.buttonSpec=id(t),!e.buttonSpec&&(e.docPropertySpec=ld(t),!e.docPropertySpec&&(e.refSpec=_r(t),!e.refSpec&&(e.autonumSpec=Fo(t)))))));}function Ej(e,t){if(t.allowPageFields&&t.hasSeparate&&Er(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return Rl(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!vn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null||n.formSpec!==null&&t.hasLegacyFormData}function Nj(e,t){if(t.allowPageFields&&Er(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return Rl(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!vn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null}function bS(e,t){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let n=e.formData.checked?jF:HF;if(e.formData.sizeHalfPoints===null)return {text:n,props:e.props,style:e.style};let r=[...e.props,{localName:"sz",attributes:{val:String(e.formData.sizeHalfPoints)}}];return {text:n,props:r,style:Ne(r,t)}}if(e.formSpec==="dropdown"){if(e.cachedText.length>0||e.sawResultContent||e.formData?.kind!=="dropdown")return null;let n=e.formData.entries[e.formData.selectedIndex]??"";return n.length===0?null:{text:n,props:e.props,style:e.style}}return null}function xS(e,t){if(e.symbolSpec){let r=tc(e.symbolSpec,e.props,t.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let n=bS(e,t.themeFonts);if(n)return {text:n.text,props:n.props,style:n.style};if(e.kind&&t.pageContext)return {text:hr(e.kind,t.pageContext,e.picture??void 0),props:e.props,style:e.style};if(e.refSpec&&t.refFields){let r=t.refFields.liveValueOf(e.beginId,e.refSpec);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.refSpec&&t.refFields?.pageRefProjectionOf&&t.bodyPageFields){let r=t.refFields.pageRefProjectionOf(e.beginId,e.refSpec);if(r){if(e.cachedText.length>0)return {text:e.cachedText,props:e.props,style:e.style,pageRefField:r};if(!e.sawResultContent)return {text:Ea,props:e.props,style:e.style,pageRefField:r}}}if(e.autonumSpec&&t.refFields?.autonumValueOf){let r=t.refFields.autonumValueOf(e.beginId);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.cachedText.length>0)return {text:e.cachedText,props:e.props,style:e.style};if(!e.sawResultContent){if(e.kind&&t.bodyPageFields){let o=e.picture!==null&&Nr(e.kind,t.bodyPageFields.format)?e.picture:void 0;return {text:qs(e.kind,o,t.bodyPageFields.format),props:e.props,style:e.style,pageField:{kind:e.kind,...o!==void 0?{picture:o}:{}}}}if(e.docPropertySpec){let r=sd(e.docPropertySpec,t.documentProperties);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.buttonSpec)return {text:e.buttonSpec.display,props:e.props,style:e.style}}return null}function Zr(e,t,n){if(n<=t)return;let r=e[e.length-1];if(r&&r.end>=t){r.end=Math.max(r.end,n);return}e.push({start:t,end:n});}var WF=new Set(["left","center","right"]),VF=new Set(["margin","indent","leftMargin"]),GF=new Set(["dot","hyphen","underscore","middleDot"]);function SS(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==da)return null;let t="left",n="margin",r;for(let o of e.attributes)o.namespaceUri===da&&(o.localName==="alignment"?t=o.value:o.localName==="relativeTo"?n=o.value:o.localName==="leader"&&(r=o.value));return {alignment:WF.has(t)?t:"left",relativeTo:VF.has(n)?n:"margin",...r!==void 0&&GF.has(r)?{leader:r}:{}}}function am(e,t,n,r){return {...e,text:e.text.slice(t,n),start:e.start+t,end:e.start+n,...r?{fontSlot:r}:{}}}function im(e,t){if(!e.some(({style:d})=>d.fontFamilyEastAsia!==null&&d.fontFamilyEastAsia!==d.fontFamily))return e;let n=[],r=[],o=[];for(let d=0;d<e.length;d+=1){let c=e[d];c.positionalTab||c.breakKind||c.inlineDrawing||c.anchoredAtom||c.equation||c.text.length!==0&&(n.push(d),r.push(c.text),o.push(Sh(c.props)&&!zo(c.style.fontFamily)&&!Ph(c.props,c.style.fontFamilyEastAsia,t)));}let a=Th(r,o);if(a.length===0)return e;let i=new Map;for(let d of a){let c=i.get(d.segment);c?c.push({from:d.from,to:d.to}):i.set(d.segment,[{from:d.from,to:d.to}]);}let l=[],s=0;for(let d=0;d<e.length;d+=1){let c=e[d];if(n[s]!==d){l.push(c);continue}let u=i.get(s);s+=1;let{style:f}=c;if(!u||f.fontFamilyEastAsia===null||f.fontFamilyEastAsia===f.fontFamily){l.push(c);continue}if(!(!c.projected&&!c.fieldAtom&&!c.noteNav&&c.measureText===void 0&&c.end-c.start===c.text.length)){let g=u.length===1&&u[0].from===0&&u[0].to===c.text.length;l.push(g?{...c,fontSlot:"eastAsia"}:c);continue}let m=0;for(let g of u)g.from>m&&l.push(am(c,m,g.from,void 0)),l.push(am(c,g.from,g.to,"eastAsia")),m=g.to;m<c.text.length&&l.push(am(c,m,c.text.length,void 0));}return l}function PS(e){return e.kind==="drawing"||hb$1(e)||Sa(e)}function RS(e){let{node:t,layout:n,revisions:r,displayMode:o}=e,a=n.projectionForAtom?.(t.id)??(t.kind==="drawing"?n.project(t):null);if(!a||a.kind!=="inline")return a?.kind==="anchored"&&!a.hidden?{recordDeleted:false,emit:true,extras:{anchoredAtom:true}}:{recordDeleted:false,emit:true};let i=Wn(r),l=e.hiddenRun||!je(r,o,e.authorFilter);return a.hidden||l?a.hidden?{recordDeleted:i,emit:true}:{recordDeleted:i,emit:false}:{recordDeleted:i,emit:true,extras:{inlineDrawing:Object.freeze({drawingNodeId:t.id,ownerPartName:n.ownerPartName,projection:a,resource:n.resourceOf(a)})}}}function wS(e){let t=qe(e,{maxNesting:pe,maxInstructionChars:oe}),n=t.filter(i=>i.addressing==="atomic"),r=new Set(n.filter(i=>i.kind==="complex").map(i=>i.node.id)),o=new Set(t.filter(i=>i.kind==="complex"&&i.addressing==="editable-result").map(i=>i.node.id)),a=new Set;for(let i of n)for(let l of i.removeNodeIds)a.add(l);return {atomBeginIds:r,editableResultBeginIds:o,coveredIds:a}}Object.freeze({marks:Object.freeze(new Map)});function fi(e,t){return Zc$1(e,t)}function vS(e,t){if(!od$1(e))return null;if(ed$1(e)||fd$1(e))return {text:"",projected:true,kind:null,noteId:null};let n=cd$1(e),r=kd$1(e)??ld$1(e);if(!r)return null;let o=hd$1(e),a=o!==null?fi(r,o):n?void 0:t?.activeNoteKey,i=o!==null?o:a?$F(a,r)??null:null,l=a,s=l!==void 0?n?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...s?{nav:s}:{},...l?{scopeId:l}:{}};if(n&&o!==null&&md$1(e))return {text:"",...d};if(!t||!a)return {text:"",...d};let c=t.marks.get(a);return c==null?{text:"",...d}:t.reservedMarkText&&t.reservedMarkText.length>0?{text:c,measureText:t.reservedMarkText,...d}:{text:c,...d}}function $F(e,t){let n=`${t}:`;if(!e.startsWith(n))return null;let r=e.slice(n.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function TS(e){return cd$1(e)||dd$1(e)||ed$1(e)||fd$1(e)}function KF(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return (t>>>0).toString(16).padStart(8,"0")}var kS=new WeakMap;function IS(e){if(!e)return "";let t=kS.get(e);if(t!==void 0)return t;let n=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${KF(n)}`;return kS.set(e,r),r}function ni(e,t=[],n,r,o,a,i=_e,l,s,d,c,u,f=false,p,m){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let g=[],h=0,b,{atomBeginIds:x,editableResultBeginIds:y,coveredIds:O}=wS(e),S=ko(),T=gr(),k=null,w=null,v=nc(),I=br,P=(B,N,A,H,$,R,Y)=>{if(B.length===0&&!H&&!Y?.inlineDrawing)return;let X=Y?.linkOverride??b,U=nd(Y?.revisionsOverride??I,N,i,m);if(U===null)return;let K=X?{link:X}:{};if(H){g.push({text:B,...U,style:A,start:$,end:R,projected:true,...Y?.measureText!==void 0?{measureText:Y.measureText}:{},...Y?.noteNav?{noteNav:Y.noteNav}:{},...Y?.inlineDrawing?{inlineDrawing:Y.inlineDrawing}:{},...Y?.anchoredAtom?{anchoredAtom:true}:{},...Y?.equation?{equation:Y.equation}:{},...Y?.fieldAtom?{fieldAtom:Y.fieldAtom}:{},...K});return}B.length!==0&&g.push({text:B,...U,style:A,start:$,end:R,...Y?.positionalTab?{positionalTab:Y.positionalTab}:{},...Y?.breakKind?{breakKind:Y.breakKind}:{},...K});},C=()=>{if(!k||!k.atomic){k=null,w=null;return}let B=k.atomStart,N=B+1;if(k.style.hidden){k=null,w=null;return}if(!je(k.resultRevisions,i,m)){l&&Wn(k.resultRevisions)&&Zr(l,B,N),k=null,w=null;return}let{resultLink:A,linkSpec:H,resultRevisions:$,capturedResultRevisions:R,formField:Y}=k,X,U=()=>{if(X)return X;let Q=!A&&H?c?.(H)??null:null,G=A??Q;return X={...R?{revisionsOverride:$}:{},...G?{linkOverride:G}:{},fieldAtom:{formField:Y}},X},K=xS(k,{pageContext:n,themeFonts:d,documentProperties:u,bodyPageFields:f,...p?{refFields:p}:{}});if(K){let Q=U(),G=K.pageField||K.pageRefField?{...Q,fieldAtom:{formField:k.formField,...K.pageField?{pageField:K.pageField}:{},...K.pageRefField?{pageRef:K.pageRefField}:{}}}:Q;P(K.text,K.props,K.style,true,B,N,G);}k=null,w=null;},E=()=>{if(!k)return;let B=!k.resultLink&&k.linkSpec?c?.(k.linkSpec)??null:null,N=A=>B&&!A.link?{...A,link:B}:A;if(k.atomic){h=k.atomStart;for(let A of k.buffered)g.push({...N(A),start:h,end:h+(A.end-A.start)}),h+=A.end-A.start;k.cachedText.length>0&&k.buffered.length===0&&(P(k.cachedText,k.props,k.style,false,h,h+k.cachedText.length,{...k.capturedResultRevisions?{revisionsOverride:k.resultRevisions}:{},...B?{linkOverride:B}:{}}),h+=k.cachedText.length);}else {for(let A of k.buffered)g.push(N(A));h=k.bufferOffset;}k=null,w=null;},D=(B,N,A)=>{if(PS(B)){let X=h;h+=1;let U=h;if(!s)return;let K=RS({node:B,layout:s,hiddenRun:A.hidden,revisions:I,displayMode:i,authorFilter:m});K.recordDeleted&&l&&Zr(l,X,U),K.emit&&P("\uFFFC",N,A,true,X,U,K.extras);return}if(TS(B)){let X=vS(B,a),U=h,K=U+1;if(h=K,A.hidden||!X||X.text.length===0&&!X.measureText)return;let Q=X.scopeId&&X.nav?{scopeId:X.scopeId,direction:X.nav}:void 0;P(X.text.length>0?X.text:X.measureText??"",N,A,true,U,K,{...X.measureText!==void 0?{measureText:X.measureText}:{},...Q?{noteNav:Q}:{}});return}let H=SS(B);if(H){A.hidden||P(" ",N,A,false,h,h,{positionalTab:H});return}if(ci(B)){let X=ui(B);if(!X||A.hidden||!je(I,i,m))return;let U=om(N,X,d);P(X.text,U.props,U.style,true,h,h);return}let $=ml(B);if($.length===0)return;let R=Wn(I);A.hidden||!je(I,i,m)||B.kind==="deletedText"&&!R||P($,N,A,false,h,h+$.length,{...B.kind==="hardBreak"?{breakKind:Ud$1(B)}:{}}),R&&l&&Zr(l,h,h+$.length),h+=$.length;},z=(B,N)=>{if(B.kind!=="run")return;let A=Za(B,t,r),H=Ne(A,d),$=()=>{k&&(k.capturedResultStyle||(k.props=A,k.style=H,k.capturedResultStyle=true),k.capturedResultRevisions||(k.resultRevisions=I,k.capturedResultRevisions=true,!k.resultLink&&b&&(k.resultLink=b)));};for(let R of B.children){if(!lt(T)){if(E(),Xi(S),v.reset(),R.kind==="runProperties"||kt(R,"begin")||kt(R,"separate")||kt(R,"end")||pr(R)||O.has(R.id)&&w===null)continue;D(R,A,H);continue}if(R.kind!=="runProperties"){if(kt(R,"begin")){let Y=x.has(R.id);vo(S),S.nesting===1&&(E(),v.reset(),w=Y?R.id:null,k={kind:null,picture:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null,formData:le(R),beginId:R.id,atomic:Y,editableResult:y.has(R.id),atomStart:h,props:A,style:H,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:h,resultRevisions:I,capturedResultRevisions:I.length>0,formField:ke(R),...b?{resultLink:b}:{}},Y&&(h+=1));continue}if(pr(R)){To(S,R,T,N+1);continue}if(kt(R,"separate")){let Y=S.nesting===1&&S.phase==="instruction",X=S.nesting,U=Io(S);if(Y&&k){k.kind=U?.kind??null,k.picture=U?.picture??null;let K=Ba(S);!k.kind&&!K.overflow&&!S.nestingOverflow&&Rl(k,K.instruction),k.props=A,k.style=H;}else k?.atomic&&S.phase==="result"&&!S.nestingOverflow&&v.onSeparate(n?U:null,X);continue}if(kt(R,"end")){let Y=S.nesting===1;if(Y&&k?.atomic&&S.phase==="instruction"){let U=Ba(S);!U.overflow&&!S.nestingOverflow&&Rl(k,U.instruction);}let X=v.onEnd(S.nesting,n);X!==null&&k?.atomic&&(k.cachedText+=X),Oo(S),Y&&(k?.atomic?C():E());continue}if(!(qh(S)&&k?.atomic)){if(k&&Zh(S)){if(ci(R)){if(k.atomic){if(je(I,i,m)&&(k.sawResultContent=true),v.active){v.noteResult(!H.hidden&&je(I,i,m));continue}if(!H.hidden&&je(I,i,m)){let ue=ui(R);ue?.unicode&&($(),k.cachedText+=ue.text);}continue}let Q=ui(R);if(!Q||H.hidden)continue;let G=om(A,Q,d),ne=nd(I,G.props,i,m);if(ne===null)continue;k.buffered.push({text:Q.text,style:G.style,start:h,end:h,projected:true,...ne,...b?{link:b}:{},fieldAtom:{formField:k.formField}});continue}let Y=ml(R);if(Y.length===0)continue;let X=Wn(I),U=nd(I,A,i,m),K=U===null||R.kind==="deletedText"&&!X;if(k.atomic&&!K&&(k.sawResultContent=true),X&&l&&(k.atomic?Zr(l,k.atomStart,k.atomStart+1):Zr(l,h,h+Y.length)),K){k.atomic&&v.active&&v.noteResult(false),k.atomic||(h+=Y.length,k.bufferOffset=h);continue}if(k.atomic){if(v.active){if(v.noteResult(!H.hidden),H.hidden)continue;$();continue}if(H.hidden)continue;$(),k.cachedText+=Y;continue}if(H.hidden){h+=Y.length,k.bufferOffset=h;continue}k.capturedResultStyle||(k.props=A,k.style=H,k.capturedResultStyle=true),k.buffered.push({text:Y,style:H,start:h,end:h+Y.length,...U,...b?{link:b}:{},fieldAtom:{formField:k.formField}}),h+=Y.length,k.bufferOffset=h;continue}O.has(R.id)&&w===null&&x.size>0,D(R,A,H);}}}};if(!lt(T))return im(g,d);let W=Va$1(),j=(B,N)=>{let A=h;if(h+=1,B.kind==="textValue"||(Wn(I)&&l&&Zr(l,A,A+1),!je(I,i,m)))return;let H=yS({simple:B,depth:N,pageContext:n,budget:T,revisions:I,displayMode:i,authorFilter:m,inheritedRunProperties:t,cascadeRuns:r,themeFonts:d,currentLink:b,projectFieldLink:c,documentProperties:u,bodyPageFields:f,...p?{refFields:p}:{}});H&&P(H.text,H.props,H.style,true,A,A+1,{fieldAtom:{formField:false,...H.pageField?{pageField:H.pageField}:{},...H.pageRef?{pageRef:H.pageRef}:{}},...H.link?{linkOverride:H.link}:{}});},M=(B,N,A,H)=>{if(H>=la)return;let $=sc$1(B);if($){let Y=h++;Wn(I)&&l&&Zr(l,Y,h);let X=Vd(Ne(t,d));return X.hidden||!je(I,i,m)?void 0:P("\uFFFC",t,X,true,Y,h,{equation:$})}if(ee(B)){j(B,N);return}if(B.kind==="run"){z(B,N);return}if(Dd$1(B)){if(N>Ht)return;for(let Y of Gd$1(B))M(Y,N+1,A,H+1);return}if(N>Ht)return;let R=B.kind!=="textValue"&&"localName"in B?Ua$1(A,B):A;if(B.kind==="hyperlink"){let Y=b;b=o?.(B)??void 0;for(let X of B.children)M(X,N+1,R,H+1);b=Y;return}if(Xt(B)){let Y=tn(B);if(!Y||!lt(T))return;let X=I;I=fn(X,Y);for(let U of B.children)M(U,N+1,R,H+1);I=X;return}if(na$1(B))for(let Y of B.children)M(Y,N+1,R,H+1);};for(let B of e.children)M(B,1,W,0);return E(),im(g,d)}var wl=new WeakMap;function Ko(e,t){return e.kind!=="textValue"&&e.namespaceUri===da&&e.localName===t}function lm(e,t,n,r=0){if(t==="all-markup"&&!n||r>=W)return e;let o=`${t}|${n?.cacheKey??""}`,a=wl.get(e)?.get(o);if(a)return a;let i=e.children,l=Ko(e,"pPr")?"pPrChange":Ko(e,"rPr")?"rPrChange":null,s=l?i.find(p=>Ko(p,l)):void 0;if(s&&s.kind!=="textValue"){let p=h=>s.attributes.find(b=>b.namespaceUri===da&&b.localName===h)?.value??"",m=n?Yi(n,{kind:"format",nodeId:s.id,id:p("id"),author:p("author")},t):t,g=m==="original"?rh(s):null;m==="proposed"&&(i=i.filter(h=>h!==s)),g!==null&&(l==="pPrChange"?i=[...g.filter(h=>!Ko(h,"rPr")&&!Ko(h,"sectPr")),...i.filter(h=>Ko(h,"rPr")||Ko(h,"sectPr"))]:i=[...i.filter(Be),...g.filter(h=>!Be(h))]);}let d=i!==e.children,c=i.map(p=>{if(p.kind==="textValue"||p.localName.endsWith("PrChange"))return p;let m=lm(p,t,n,r+1);return d||=m!==p,m}),u=d?{...e,children:c}:e,f=wl.get(e);if(f||wl.set(e,f=new Map),Ur(f,o,u),u!==e){let p=wl.get(u);p||wl.set(u,p=new Map),Ur(p,o,u);}return u}function XF(e){let t=e.root;if(t.localName==="hdr"||t.localName==="ftr")return t;let n=r=>{if(r.kind!=="textValue"){if(r.kind==="body")return r;for(let o of r.children){let a=n(o);if(a)return a}}};return n(t)}function YF(e,t,n){return !(e.kind==="paragraph"&&cy(e,t,n))}var BS=new WeakMap;function jr(e){return BS.get(e)??null}function LS(e,t){let n=t.children.filter(a=>OS(a)),r=e.flatMap(a=>a.children.filter(i=>!OS(i))),o={...t,children:[...n,...r]};return BS.set(o,{merged:o,members:e}),o}function OS(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function UF(e,t,n){if(t==="all-markup"&&!n)return e.map(l=>l.block);let r=[],o=[],a=null,i=()=>{r.push(...FS(o)),o=[],a=null;};for(let{block:l,parentKey:s}of e){if(o.length>0&&s!==a&&i(),l.kind!=="paragraph"){i(),r.push(l);continue}let d=Ju(l,t,n);if((d||o.length>0)&&!JF(l,t,n)){i(),r.push(l);continue}if(d){o.push(l),a=s;continue}if(o.length===0){r.push(l);continue}let c=[...o,l];o=[],a=null,r.push(LS(c,l));}return r.push(...FS(o)),r}function FS(e){if(e.length<2)return e;let t=e[e.length-1];return [LS(e,t)]}function kl(e,t,n){let r=ZF(e).map(a=>({...a,block:lm(a.block,t,n)}));return UF(r,t,n).filter(a=>YF(a,t,n))}var qF=new Set(["pPr","bookmarkStart","bookmarkEnd","proofErr","permStart","permEnd"]);function ES(e){for(let t of e.children){if(t.kind==="textValue"){if(t.value.length>0)return false;continue}if(t.namespaceUri!==da||!qF.has(t.localName))return false}return true}function ZF(e){let t=[],n=(r,o,a)=>{for(let i of r){if(i.kind==="textValue")continue;if(i.kind==="paragraph"||i.kind==="table"){t.push({block:i,parentKey:a});continue}let l=wd$1(i);l!==null&&o<Cd$1&&n(l,o+1,i.id);}};return n(e,0,""),t}var CS=new WeakMap;function JF(e,t,n){let r=`${t}|${n?.cacheKey??""}`,o=CS.get(e),a=o?.get(r);if(a!==void 0)return a;let i=QF(e,t,n);return o?Ur(o,r,i):CS.set(e,new Map([[r,i]])),i}function QF(e,t,n){if(!eC(e))return false;let r=ni(e,[],void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,n),o=0;for(let a of r)o=Math.max(o,a.end);return o<=Pe(e).length}function eC(e){let t=0,n=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===da&&o.localName==="fldChar"){let a=o.attributes.find(i=>i.localName==="fldCharType")?.value;a==="begin"?t+=1:a==="end"&&(t-=1,t<0&&(n=true));}for(let a of o.children)r(a);}};return r(e),t===0&&!n}var MS=lg(16);function hn(e,t="all-markup",n){let r=`${t}|${n?.cacheKey??""}`,o=MS.get(e),a=o?.get(r);if(a)return a;let i=XF(e),l=i?kl(i.children,t,n):[];return o?Ur(o,r,l):MS.set(e,new Map([[r,l]])),l}function Sl(e,t="all-markup",n){return e.kind!=="note"?[]:kl(e.children,t,n)}function sm(e,t="all-markup",n){return e.kind==="textValue"?[]:kl(e.children,t,n)}var tC="http://schemas.microsoft.com/office/word";function NS(e){if(!e||e.namespaceUri!==da||e.localName!=="settings")return;let t,n=false;for(let r of e.children)if(!(r.kind==="textValue"||r.namespaceUri!==da||r.localName!=="compat"))for(let o of r.children){if(o.kind==="textValue"||o.namespaceUri!==da||o.localName!=="compatSetting")continue;let a=l=>o.attributes.find(s=>s.namespaceUri===da&&s.localName===l)?.value;if(a("name")!=="compatibilityMode"||a("uri")!==tC)continue;if(n)return;n=true;let i=a("val");t=i==="11"||i==="12"||i==="14"||i==="15"?Number(i):void 0;}return t}function qH(e){let t,n,r,o,a,i,l,s,d,c,u,f,p,m,g,h,b;return {styleCascade(){let x=e.stylesRoot(),y=e.documentThemeFonts(),O=e.settingsRoot();return (f===void 0||x!==r||O!==p||y.major!==o||y.minor!==a||y.majorEastAsia!==i||y.minorEastAsia!==l||y.majorBidi!==s||y.minorBidi!==d||y.majorSupplemental!==c||y.minorSupplemental!==u)&&(r=x,o=y.major,a=y.minor,i=y.majorEastAsia,l=y.minorEastAsia,s=y.majorBidi,d=y.minorBidi,c=y.majorSupplemental,u=y.minorSupplemental,p=O,f=vx(x,y,O)),f},defaultTabStopPt(){let x=e.settingsRoot();return (g===void 0||x!==m)&&(m=x,g=bb(x)),g},compatibilityMode(){let x=e.settingsRoot();return x!==h&&(h=x,b=NS(x)),b},numberingIndex(){let x=e.numberingRoot();return (n===void 0||x!==t)&&(t=x,n=Dy(x)),n}}}var nC={state:"none"},AS=(e,t)=>t.state==="omitted"?e:t;function dm(e,t,n={}){return e.state==="omitted"?t:e.state==="none"?nC:e}function cm(e,t){let n=AS;return {top:n(e.top,t.top),left:n(e.left,t.left),bottom:n(e.bottom,t.bottom),right:n(e.right,t.right),insideH:n(e.insideH,t.insideH),insideV:n(e.insideV,t.insideV)}}function um(e,t){let n=AS;return {top:n(e.top,t.top),left:n(e.left,t.left),bottom:n(e.bottom,t.bottom),right:n(e.right,t.right)}}function Jr(e=1048576){let t=e|0;return {intervalsRemaining:t>0?t:0}}function DS(e,t,n,r){let o=Math.max(0,Math.min(t|0,1024)),a=new Array(e.length);for(let i=0;i<e.length;i+=1){if(r&&r.intervalsRemaining<=0){a[i]=[];continue}a[i]=rC(e[i],o,n,r);}return a}function rC(e,t,n,r){let o=[];for(let c=0;c<e.length;c+=1){let u=e[c],f=Math.max(0,u.gridColumn|0),p=Math.min(t,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}),n&&(n.ownershipSlotsWritten+=1),r&&(r.intervalsRemaining-=1));}c.kind===1?a.set(c.cellIndex,{cell:c.cell,cellIndex:c.cellIndex}):a.delete(c.cellIndex),d(),l=c.x;}return s}function oC(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>1;e[o].start<=t?n=o+1:r=o;}return n}function fm(e,t,n,r){r&&(r.columnLookups+=1);let o=e[t];if(!o||n<0)return;let a=oC(o,n)-1;if(a<0)return;let i=o[a];if(!(n>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var iC=256,mt={state:"omitted"},sc={state:"none"},WS={top:mt,left:mt,bottom:mt,right:mt,insideH:mt,insideV:mt},VS={top:mt,left:mt,bottom:mt,right:mt},_S={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},lC=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 mi(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function mm(e,t){return e.attributes.find(n=>n.localName===t)?.value}function sC(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function dC(e){if(e===null)return .5;let t=e/8;return !Number.isFinite(t)||t<=0?.5:t>Id?Id:t}function pm(e){if(!e)return mt;let t=mm(e,"val");if(!t)return mt;if(t==="nil"||t==="none")return sc;let n=lC.get(t)??"single",r=mm(e,"color"),o=r===void 0||r==="auto"?null:Iu(r)??null;return {state:"edge",style:n,color:o,widthPt:dC(sC(mm(e,"sz")))}}function GS(e,t){if(!e)return VS;let n={top:mt,left:mt,bottom:mt,right:mt};for(let r of t){let o=r==="left"?"start":r==="right"?"end":void 0,a=mi(e,r)??(o?mi(e,o):void 0);n[r]=pm(a);}return n}function gm(e){let t=e&&mi(e,"tblBorders");return t?{...GS(t,["top","left","bottom","right"]),insideH:pm(mi(t,"insideH")),insideV:pm(mi(t,"insideV"))}:WS}function hm(e){return GS(e&&mi(e,"tcBorders"),["top","left","bottom","right"])}function jS(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function HS(e){if(!e)return 0;let t=Number.parseInt(e.slice(0,2),16),n=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return t+n+r}function cC(e,t,n=true){if(e.state==="omitted")return t.state==="omitted"?mt:t;if(t.state==="omitted")return e;if(e.state==="none")return t.state==="none"?sc:t;if(t.state==="none")return e;let r=jS(e),o=jS(t);if(r>o)return e;if(o>r)return t;let a=_S[e.style],i=_S[t.style];if(a!==i)return a>i?e:t;let l=HS(e.color),s=HS(t.color);return l<s?e:s<l?t:n?e:t}function rc(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function uC(e,t,n){return n?t==="top"||t==="bottom"?e.insideH:e.insideV:e[t]}function fC(e,t){return e===void 0&&t===void 0?true:!e||!t?false:e.style===t.style&&e.color===t.color&&e.widthPt===t.widthPt}function oc(e){if(e.length===0)return [];let t=[],n={...e[0]};for(let r=1;r<e.length;r+=1){let o=e[r];n.gridEnd===o.gridStart&&fC(n.edge,o.edge)?n={...n,gridEnd:o.gridEnd}:(t.push(n),n={...o});}return t.push(n),t}function ac(e,t,n){let r=e.filter(a=>a.edge!==void 0);if(r.length!==1)return;let o=r[0];if(!(o.gridStart!==t||o.gridEnd!==n))return o.edge}function zS(e,t,n){let r=0,o=Math.min(n,e.length);for(let a=Math.max(0,t);a<o;a+=1)r+=e[a];return r}function mC(e){if(!(!e||e.style!=="double"))return sl(e.widthPt)}function ic(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function pC(e,t){return t?e==="outer"?t.insetPt:t.insetPt+t.strokePt+t.gapPt:0}function gC(e,t,n){return n?e==="outer"?t-n.insetPt:t-n.insetPt-n.strokePt-n.gapPt:t}function hC(e,t){return t?e==="outer"?t.insetPt+t.strokePt:t.insetPt+t.extentPt:0}function yC(e,t,n){return n?e==="outer"?t-n.insetPt-n.strokePt:t-n.insetPt-n.extentPt:t}function Qr(e,t){e.length>=iC||!(t.width>0)||!(t.height>0)||e.push(t);}function bC(e,t,n,r,o,a,i,l,s,d,c){let u=sl(n.widthPt),{strokePt:f,gapPt:p,extentPt:m,insetPt:g}=u,h=Math.abs(r)<1e-6,b=Math.abs(o-a)<1e-6,x=Math.abs(r)<1e-6,y=Math.abs(o-i)<1e-6;if(t==="top"||t==="bottom"){let T=t==="top"?g:i-g-f,k=t==="top"?g+f+p:i-g-m;for(let w of ["outer","inner"]){let v=r,I=o;h&&(v=pC(w,l)),b&&(I=gC(w,a,s)),Qr(e,{side:t,role:w,color:n.color,cssStyle:"solid",x:v,y:w==="outer"?T:k,width:I-v,height:f});}return}let O=t==="left"?g:a-g-f,S=t==="left"?g+f+p:a-g-m;for(let T of ["outer","inner"]){let k=r,w=o;x&&(k=hC(T,d)),y&&(w=yC(T,i,c)),Qr(e,{side:t,role:T,color:n.color,cssStyle:"solid",x:T==="outer"?O:S,y:k,width:f,height:w-k});}}function xC(e,t,n,r,o,a,i){let l=n.widthPt,s=Math.max(1,l),d=l*3+s*2;if(t==="top"||t==="bottom"){let u=t==="top"?0:i-d;for(let f=0;f<3;f+=1)Qr(e,{side:t,role:f===0?"outer":f===1?"middle":"inner",color:n.color,cssStyle:"solid",x:r,y:u+f*(l+s),width:o-r,height:l});return}let c=t==="left"?0:a-d;for(let u=0;u<3;u+=1)Qr(e,{side:t,role:u===0?"outer":u===1?"middle":"inner",color:n.color,cssStyle:"solid",x:c+u*(l+s),y:r,width:l,height:o-r});}function SC(e,t,n,r,o,a,i){let l=n.widthPt;t==="top"?Qr(e,{side:t,role:"edge",color:n.color,cssStyle:ic(n.style),x:r,y:0,width:o-r,height:l}):t==="bottom"?Qr(e,{side:t,role:"edge",color:n.color,cssStyle:ic(n.style),x:r,y:i-l,width:o-r,height:l}):t==="left"?Qr(e,{side:t,role:"edge",color:n.color,cssStyle:ic(n.style),x:0,y:r,width:l,height:o-r}):Qr(e,{side:t,role:"edge",color:n.color,cssStyle:ic(n.style),x:a-l,y:r,width:l,height:o-r});}function lc(e,t){if(e.length===0)return;let n=e[0];return mC(n.edge)}function PC(e,t,n,r,o,a,i,l,s,d){let c=(C,E,D)=>{let z=[];for(let W of E){if(!W.edge)continue;let j,M;D?(j=zS(i,l,W.gridStart),M=zS(i,l,W.gridEnd)):(j=s[W.gridStart-d]??0,M=s[W.gridEnd-d]??a),z.push({side:C,gridStart:W.gridStart,gridEnd:W.gridEnd,startPt:j,endPt:M,edge:W.edge});}return z},u=c("top",e,true),f=c("left",t,false),p=c("bottom",n,true),m=c("right",r,false),g=[...u,...m,...p,...f],h=lc(t),b=lc(r),x=lc(e),y=lc(n),O=(C,E)=>C.length===1&&Math.abs(C[0].startPt)<1e-6&&Math.abs(C[0].endPt-E)<1e-6,S=O(u,o),T=O(f,a),k=O(p,o),w=O(m,a),v=[],I=(C,E,D)=>{for(let z of E){let{edge:W,startPt:j,endPt:M}=z;W.style==="double"?bC(v,C,W,j,M,o,a,C==="top"||C==="bottom"?h:void 0,C==="top"||C==="bottom"?b:void 0,C==="left"||C==="right"?x:void 0,C==="left"||C==="right"?y:void 0):W.style==="triple"?xC(v,C,W,j,M,o,a):D||SC(v,C,W,j,M,o,a);}};I("top",u,S),I("left",f,T),I("bottom",p,k),I("right",m,w);let P={};return S&&u[0]&&(P.top=u[0].edge),T&&f[0]&&(P.left=f[0].edge),k&&p[0]&&(P.bottom=p[0].edge),w&&m[0]&&(P.right=m[0].edge),g.length>0&&(P.edgeSegments=g),v.length>0&&(P.strokes=v),P}function dc(e,t,n,r,o,a){let i=e.length,l=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let s=DS(e,n,o,a),d=(u,f,p)=>dm(u.borders[f],uC(t,f,p),{}),c=(u,f,p,m)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?sc:cC(p,m);for(let u=0;u<i;u+=1){let f=e[u];for(let p=0;p<f.length;p+=1){let m=f[p];if(m.vMergeContinue){l[u][p]={};continue}let g=m.mergeRowSpan??1,h=u+g-1,b=u===0,x=h===i-1,y=m.gridColumn===0,O=m.gridColumn+m.gridSpan-1,S=O>=n-1,T=[];if(b)for(let j=m.gridColumn;j<=O;j+=1)T.push({gridStart:j,gridEnd:j+1,edge:rc(d(m,"top",false))});let k=[];if(y)for(let j=u;j<=h;j+=1)k.push({gridStart:j,gridEnd:j+1,edge:rc(d(m,"left",false))});let w=[];for(let j=m.gridColumn;j<=O;j+=1){let M;if(x)M=d(m,"bottom",false);else {let B=fm(s,h+1,j,o);B?.cell.vMergeContinue?M=mt:M=c(m.borders.bottom,B?B.cell.borders.top:mt,d(m,"bottom",true),B?d(B.cell,"top",true):t.insideH);}w.push({gridStart:j,gridEnd:j+1,edge:rc(M)});}let v=[];for(let j=u;j<=h;j+=1){let M;if(S)M=d(m,"right",false);else {let B=fm(s,j,O+1,o);M=c(m.borders.right,B?B.cell.borders.left:mt,d(m,"right",true),B?d(B.cell,"left",true):t.insideV);}v.push({gridStart:j,gridEnd:j+1,edge:rc(M)});}let I=oc(T),P=oc(k),C=oc(w),E=oc(v);if(!r){let j={},M=ac(I,m.gridColumn,O+1),B=ac(P,u,h+1),N=ac(C,m.gridColumn,O+1),A=ac(E,u,h+1);M&&(j.top=M),B&&(j.left=B),N&&(j.bottom=N),A&&(j.right=A);let H=[],$=(R,Y)=>{for(let X of Y)X.edge&&H.push({side:R,gridStart:X.gridStart,gridEnd:X.gridEnd,startPt:X.gridStart,endPt:X.gridEnd,edge:X.edge});};$("top",I),$("left",P),$("bottom",C),$("right",E),H.length>0&&(j.edgeSegments=H),l[u][p]=j;continue}let D=r.cellBoxes[u][p],z=[0],W=0;for(let j=u;j<=h;j+=1){let M=r.rowBands[j];W+=M.height,z.push(W);}z.length>1&&(z[z.length-1]=D.height),l[u][p]=PC(I,P,C,E,D.width,D.height,r.columnWidthsPt,m.gridColumn,z,u);}}return l}function Sr(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var ym=WS,bm=VS;var KS=31680/20,Jn=Object.freeze({type:"auto",value:0}),RC=100,wC=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function kC(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Sm(e,t){return e.attributes.find(n=>n.localName===t)?.value}function XS(e){if(/^\d{1,9}$/.test(e)){let r=Number(e)/20;return Number.isFinite(r)?{kind:"length",pt:r}:null}let t=/^(\d{1,7}(?:\.\d{1,4})?)%$/.exec(e);if(t){let r=Number(t[1]);return Number.isFinite(r)?{kind:"percent",percent:r}:null}let n=/^(\d{1,9}(?:\.\d{1,4})?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(n){let r=Number(n[1])*wC[n[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function Xo(e){if(!e)return Jn;let t=Sm(e,"type");if(t!==void 0&&t!=="pct"&&t!=="dxa")return t==="nil"?{type:"nil",value:0}:Jn;let n=Sm(e,"w");if(n===void 0)return Jn;let r=XS(n);if(!r)return Jn;let o=/^\d{1,9}$/.test(n);if(r.kind==="percent"||o&&t==="pct"){let a=r.kind==="percent"?r.percent:Number(n)/50;return !Number.isFinite(a)||a<=0?Jn:{type:"pct",value:Math.min(a,RC)}}return !Number.isFinite(r.pt)||r.pt<=0?Jn:{type:"dxa",value:Math.min(r.pt,KS)}}function vl(e,t){if(!e)return;let n=Xo(e);if(n.type==="dxa")return Math.min(n.value,t)}function YS(e){let t=kC(e,"tblGrid");if(!t)return [];let n=[];for(let r of t.children)if(r.kind!=="textValue"&&r.localName==="gridCol"&&(n.push(r),n.length>=1024))break;return n}function vC(e){let t=[];for(let n of e){let r=Sm(n,"w"),o=r===void 0?null:XS(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){t.push(void 0);continue}t.push(o.pt>KS?void 0:o.pt);}return t}var xm=1,$S=.001;function TC(e,t,n,r){let o=[];for(let i=0;i<n;i+=1)o.push(e[i]);let a=t.filter(i=>i.start<n&&(i.preferred.type==="dxa"||i.preferred.type==="pct"&&r>0)).sort((i,l)=>i.span-l.span);for(let i of a){let l=Math.min(i.start+i.span,n);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 US(e){let{columnCount:t,tableWidth:n}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:xm,a=n.type==="dxa"?n.value:n.type==="pct"?o*n.value/100:0,i=vC(e.gridCols),l=TC(i,e.claims,t,a),s=0,d=0;for(let b of l)b===void 0?d+=1:s+=b;let c=[];if(d>0){let b=s>0?s/Math.max(t-d,1):o/t,x=Math.max(o-s,0)/d,y=Math.max(Math.min(x,b),xm);for(let O of l)c.push(O??y);}else for(let b of l)c.push(b);let u=c.reduce((b,x)=>b+x,0);if(!Number.isFinite(u)||u<=0)return new Array(t).fill(o/t);let f=t*xm,p=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,m=Math.max(a>0?Math.min(a,p):Math.min(u,p),f),g=n.type==="pct"&&a>0;if(u<=m+$S&&!g||Math.abs(u-m)<=$S)return c;let h=m/u;return c.map(b=>b*h)}function pi(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function IC(e,t){return e.attributes.find(n=>n.localName===t)?.value}var OC=3,qS=108/20,Tl=31680/20,ZS={top:0,right:qS,bottom:0,left:qS};function cc(e){if(!e)return;let t=IC(e,"w");if(t===void 0||!/^\d{1,9}$/.test(t))return;let n=Number(t);if(!Number.isFinite(n)||n<0)return;let r=n/20;return r>Tl?Tl:r}function uc(e){if(!e)return {};let t=cc(pi(e,"top")),n=cc(pi(e,"left")??pi(e,"start")),r=cc(pi(e,"bottom")),o=cc(pi(e,"right")??pi(e,"end"));return {...t===void 0?{}:{top:t},...n===void 0?{}:{left:n},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function fc(e,t){return {top:t.top??e.top,right:t.right??e.right,bottom:t.bottom??e.bottom,left:t.left??e.left}}function Il(e,t){if(e.legacyContentAlignment)return -(e.rows[0]?.cells[0]?.margins.left??0);let n=e.columnWidthsPt.reduce((o,a)=>o+a,0),r=t-n;return !Number.isFinite(r)||r<=0?0:e.alignment==="center"?r/2:e.alignment==="right"?e.bidiVisual?Math.max(0,r-e.indentPt):r:e.bidiVisual?0:Math.min(e.indentPt,r)}function Yo(e,t,n){let r=n[e.horzAnchor],o=r.width-t,a;if(e.xSpec==="center"?a=r.left+o/2:e.xSpec==="right"||e.xSpec==="outside"?a=r.left+o:e.xSpec?a=r.left:a=r.left+e.xPt,!Number.isFinite(a))return r.left;let i=n.page.left+n.page.width;return Math.max(n.page.left,Math.min(a,i))}function FC(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Fn(e,t){return e.attributes.find(n=>n.localName===t)?.value}var JS=31680/20;function QS(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function gi(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return;let t=Number(e);if(!Number.isFinite(t))return;let n=t/20;return Math.max(-JS,Math.min(JS,n))}function Pm(e){let t=e&&FC(e,"tblpPr");if(!t)return;let n=Fn(t,"tblpXSpec"),r=n==="left"||n==="center"||n==="right"||n==="inside"||n==="outside"?n:void 0,o=Fn(t,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:QS(Fn(t,"horzAnchor"))??"text",vertAnchor:QS(Fn(t,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:gi(Fn(t,"tblpX"))??0,...a?{ySpec:a}:{},yPt:gi(Fn(t,"tblpY"))??0,...["topFromText","rightFromText","bottomFromText","leftFromText"].some(i=>Fn(t,i)!==void 0)?{distances:{top:Math.max(0,gi(Fn(t,"topFromText"))??0),right:Math.max(0,gi(Fn(t,"rightFromText"))??0),bottom:Math.max(0,gi(Fn(t,"bottomFromText"))??0),left:Math.max(0,gi(Fn(t,"leftFromText"))??0)}}:{}}}function tP(e){let t=e?.children.find(r=>r.kind!=="textValue"&&r.localName==="textDirection");return !t||t.kind==="textValue"?"horizontal":t?.attributes.find(r=>r.localName==="val")?.value==="btLr"?"btLr":"horizontal"}function nP(e,t){let n=t;for(let r of e){if(r.kind==="table"){n=Math.max(n,r.box.x+r.box.width);continue}for(let o of r.lines){n=Math.max(n,o.contentX);for(let a of o.spans)n=Math.max(n,a.box.x+a.box.width);for(let a of o.drawings??[])n=Math.max(n,a.advanceEnd);}}return n}function rP(e,t){return {x:t.x+t.height-(e.y-t.y),y:t.y+(e.x-t.x)}}var eP=new WeakMap,oP=new WeakSet;function CC(e){let t=eP.get(e);if(t)return t;let n=new Map,r=(o,a)=>{for(let i of o)if(i.kind==="table")for(let l of i.rows)for(let s of l.cells)if(s.textDirection==="btLr")for(let d of en(s.blocks)){let c=n.get(d.paragraphId)??[];c.push({pageIndex:a,cell:s}),n.set(d.paragraphId,c);}else r(s.blocks,a);};for(let o of e.pages){r(o.fragments,o.index),o.header&&r(o.header.fragments,o.index),o.footer&&r(o.footer.fragments,o.index);for(let a of [o.footnotes,o.endnotes])if(a){a.separator&&r(a.separator.fragments,o.index);for(let i of a.notes)r(i.fragments,o.index);}}return eP.set(e,n),n}function aP(e,t,n){let r=CC(e).get(n)??[];return r.find(o=>o.pageIndex===t)??r[0]}function hi(e,t){let n=aP(e,t.pageIndex,t.position.paragraphId);if(!n)return t;let r=MC(t,n.cell.box),o={...t,...r};return oP.add(o),o}function gz(e){return oP.has(e)}function Rm(e,t,n){let r=aP(e,n.pageIndex,t);if(!r)return n;let o=r.cell.box;return {...n,x:o.x+(n.y-o.y),y:o.y+o.height-(n.x-o.x)-n.width,width:n.height,height:n.width}}function MC(e,t){return {x:t.x+(e.y-t.y),y:t.y+t.height-(e.x-t.x)}}function iP(e){let t;for(let r of e?.children??[])if(r.kind!=="textValue"&&r.localName==="vAlign"){t=r;break}let n=t?.attributes.find(r=>r.localName==="val")?.value;return n==="center"?"center":n==="bottom"?"bottom":"top"}function lP(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da&&n.localName===t)return n}}function wm(e){let t=lP(e,"tblHeader");if(!t)return;let n=t.attributes.find(r=>r.namespaceUri===da&&r.localName==="val")?.value;return n===void 0||n!=="0"&&n!=="false"&&n!=="off"}function sP(e,t,n){let r=false;for(let o of e.tableRowPropertyNodes)r=wm(o)??r;for(let o of t)r=wm(lP(e.conditional.get(o),"trPr"))??r;return wm(n)??r}function BC(e){if(e.namespaceUri!==da)return false;let t=new Set;for(let n of e.children){if(n.kind==="textValue")continue;let r=n.localName==="start"?"left":n.localName==="end"?"right":n.localName;if(n.namespaceUri!==da||!["top","left","bottom","right"].includes(r)||t.has(r))return false;t.add(r);let o=n.attributes.filter(i=>i.localName==="w"),a=n.attributes.filter(i=>i.localName==="type");if(o.length!==1||o[0].namespaceUri!==da||!/^\d{1,9}$/.test(o[0].value)||Number(o[0].value)>31680||a.length>1||a.length===1&&(a[0].namespaceUri!==da||a[0].value!=="dxa"))return false}return true}function dP(e,t){let n=[e,...t];for(;n.length>0;){let r=n.pop();for(let o of r.children)if(!(o.kind==="textValue"||o.kind==="paragraph"||o.kind==="table"))if(o.localName==="tblCellMar"||o.localName==="tcMar"){if(!BC(o))return false}else n.push(o);}return true}var km=31680/20,cP=.001;function uP(e,t,n){let r=n/1e4+.025;return e.map(o=>{if(o.span!==1||o.preferred.type!=="pct")return o;let a=o.preferred.value*50;if(Math.abs(a-Math.round(a))>1e-8)return o;let i=Qn(t[o.start],"w");if(i===void 0||!/^\d{1,9}$/.test(i))return o;let l=Number(i)/20,s=n*o.preferred.value/100-l;return s>0&&s<=r+cP?{...o,preferred:{type:"dxa",value:l}}:o})}function Ol(e,t){let n;for(let r of e.children)if(!(r.kind==="textValue"||r.localName!==t)){if(n||r.namespaceUri!==da)return;n=r;}return n}function Qn(e,t){let n=e?.attributes.filter(r=>r.localName===t);return n?.length===1&&n[0].namespaceUri===da?n[0].value:void 0}function fP(e){let{compatibilityMode:t,contentWidthPt:n,table:r,rows:o,columnCount:a}=e;if(t!==11&&t!==12&&t!==14||e.depth!==0||e.floating||e.layoutFixed||e.alignment!=="left"||e.indentPt!==0||e.cellSpacingPt!==0||e.tableWidth.type!=="pct"||e.tableWidth.value!==100||!Number.isFinite(n)||n<=0||n>km||a<1||a>1024)return;let i=Ol(r,"tblPr");if(!i)return;let l=Ol(i,"tblW"),s=Ol(i,"tblInd"),d=Qn(l,"w");if(Qn(l,"type")!=="pct"||d!=="5000"&&d!=="100%"||Qn(s,"type")!=="dxa"||Qn(s,"w")!=="0"||Qn(Ol(i,"tblLayout"),"type")!=="autofit")return;for(let x of [...e.propertyNodes,i])for(let y of x.children)if(y.kind!=="textValue"&&(["jc","tblCellSpacing"].includes(y.localName)&&y.namespaceUri!==da||y.localName==="tblpPr"||y.localName==="bidiVisual"||y.localName==="jc"&&!["left","start"].includes(Qn(y,"val")??"")||y.localName==="tblCellSpacing"&&(Qn(y,"type")!=="dxa"||Qn(y,"w")!=="0")))return;let c=o[0]?.cells[0],u=o[0]?.cells.at(-1);if(!c||!u||!dP(r,e.propertyNodes))return;let f=c.margins.left,p=u.margins.right,m=n+f+p;if(!Number.isFinite(m)||f<0||p<0||f+p<=0||m>km)return;for(let x of o){let y=x.cells[0],O=x.cells.at(-1);if(!y||!O||y.gridColumn!==0||O.gridColumn+O.gridSpan!==a||y.margins.left!==f||O.margins.right!==p)return}let g=Ol(r,"tblGrid");if(!g)return;let h=0,b=0;for(let x of g.children){if(x.kind==="textValue")continue;if(x.localName!=="gridCol"||x.namespaceUri!==da)return;let y=Qn(x,"w");if(y===void 0||!/^\d{1,9}$/.test(y))return;let O=Number(y)/20;if(O<1||O>km||++h>1024)return;b+=O;}return h===a&&Math.abs(b-m)<cP?m:void 0}var Om=16,LC=31680/20,mP=1023,EC=256,pP=31680/20;function gP(e){let t=e&&He(e,"jc");if(!t)return;let n=on(t,"val");if(n==="center")return "center";if(n==="right"||n==="end")return "right";if(n==="left"||n==="start")return "left"}function He(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function on(e,t){return e.attributes.find(n=>n.localName===t)?.value}function vm(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da&&n.localName===t)return n}function mc(e,t){return e.attributes.find(n=>n.namespaceUri===da&&n.localName===t)?.value}function NC(e){let t=e&&He(e,"gridSpan"),n=t&&on(t,"val");if(!n||!/^\d{1,7}$/.test(n))return 1;let r=Number(n);return Number.isInteger(r)&&r>1?Math.min(r,1024):1}function hP(e,t){let n=e&&He(e,t),r=n&&on(n,"val");if(!r||!/^\d{1,7}$/.test(r))return 0;let o=Number(r);return Number.isInteger(o)&&o>0?Math.min(o,1024):0}function AC(e){let t=e&&He(e,"vMerge");return t?on(t,"val")!=="restart":false}function yP(e){return ih(e&&He(e,"shd"))}function Tm(e,t){let n=e&&He(e,t);if(!n)return false;let r=on(n,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var Fl=Object.freeze({rule:"auto"});function DC(e){let t=e&&He(e,"trHeight");if(!t)return Fl;let n=on(t,"hRule"),r=n==="auto"||n==="exact"||n==="atLeast"?n:void 0;if(r==="auto")return Fl;let o=on(t,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return Fl;let a=Number(o);if(!Number.isFinite(a)||a<=0)return Fl;let i=Math.min(a/20,LC);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:Fl}var _C=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function Pr(e,t){let n=on(e,t);if(n!==void 0)return n!=="0"&&n!=="false"&&n!=="off"}function jC(e){let t=e&&He(e,"tblLook");if(!t)return _C;let n=on(t,"val"),r=n&&/^[0-9A-Fa-f]{1,4}$/.test(n)?Number.parseInt(n,16):0;return {firstRow:Pr(t,"firstRow")??(r&32)!==0,lastRow:Pr(t,"lastRow")??(r&64)!==0,firstColumn:Pr(t,"firstColumn")??(r&128)!==0,lastColumn:Pr(t,"lastColumn")??(r&256)!==0,rowBanding:Pr(t,"noHBand")===void 0?(r&512)===0:!Pr(t,"noHBand"),columnBanding:Pr(t,"noVBand")===void 0?(r&1024)===0:!Pr(t,"noVBand")}}var Im=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],bP=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function xP(e,t){let n=e&&He(e,"cnfStyle");if(!n)return;let r=on(n,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<Im.length;o+=1)r[o]==="1"&&t.add(Im[o]);for(let o=0;o<bP.length;o+=1)Pr(n,bP[o])===true&&t.add(Im[o]);}var HC=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function SP(e){let t=new Set;xP(e.rowProperties,t),xP(e.cellProperties,t);let{look:n,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:l}=e,s=t.has("firstRow")||n.firstRow&&r===0,d=t.has("lastRow")||n.lastRow&&r===o-1,c=t.has("firstCol")||n.firstColumn&&a===0,u=t.has("lastCol")||n.lastColumn&&a+i>=l;if(!(t.has("band1Vert")||t.has("band2Vert"))&&n.columnBanding&&!c&&!u){let g=a-(n.firstColumn?1:0);t.add(g%2===0?"band1Vert":"band2Vert");}if(!(t.has("band1Horz")||t.has("band2Horz"))&&n.rowBanding&&!s&&!d){let g=r-(n.firstRow?1:0);t.add(g%2===0?"band1Horz":"band2Horz");}c&&t.add("firstCol"),u&&t.add("lastCol"),s&&t.add("firstRow"),d&&t.add("lastRow"),s&&c&&t.add("nwCell"),s&&u&&t.add("neCell"),d&&c&&t.add("swCell"),d&&u&&t.add("seCell");let m=[];for(let g of HC)t.has(g)&&m.push(g);return m}var zC=new WeakMap,WC=new WeakMap;function Wt(e,t,n,r,o="all-markup",a,i){let l=a?WC:zC,s=l.get(e);if(s&&s.contentWidthPt===t&&s.depth===n&&s.styleCascade===r&&s.displayMode===o&&s.authorFilter===a&&s.compatibilityMode===i)return s.structure;let d=VC(e,t,n,r,o,a,i),c={contentWidthPt:t,depth:n,styleCascade:r,displayMode:o,authorFilter:a,compatibilityMode:i,structure:d};return l.set(e,c),d}function VC(e,t,n,r,o,a,i){if(n>=Om||e.kind!=="table")return null;let l=He(e,"tblPr"),s=l&&He(l,"tblStyle")?on(He(l,"tblStyle"),"val"):void 0,d=r?Rx(r,s):Xd,c=jC(l),u=false;for(let U of d.tablePropertyNodes)He(U,"bidiVisual")&&(u=Tm(U,"bidiVisual"));l&&He(l,"bidiVisual")&&(u=Tm(l,"bidiVisual"));let f=ZS,p=ym;for(let U of d.tablePropertyNodes)f=fc(f,uc(He(U,"tblCellMar"))),p=cm(p,gm(U));let m=fc(f,uc(l&&He(l,"tblCellMar"))),g=cm(p,l?gm(l):ym),h=new Map,b=wx(d),x=U=>{if(!b)return zf;let K=U.join("|"),Q=h.get(K);if(Q)return Q;let G=kx(d,U);return h.size<EC&&h.set(K,G),G},y=[],O=[],S=1;for(let U of Dc$1(e.children)){if(U.kind!=="tableRow")continue;let K=vm(U,"trPr"),Q=K?vm(K,"ins")??vm(K,"del"):void 0,G=Q?.localName,ne=Q?mc(Q,"author")??"":void 0,ue=Q&&ne!==void 0&&a?ly(a,Q.id,ne,o):o;if(ue==="proposed"&&G==="del"||ue==="original"&&G==="ins")continue;let pe=ue==="all-markup"?Q:void 0,de=[],ce=[],Pe=[],Ie=Math.min(hP(K,"gridBefore"),mP);Ie>0&&O.push({start:0,span:Ie,preferred:Xo(K&&He(K,"wBefore"))});let oe=Ie,ke=Dc$1(U.children);for(let Me of ke){if(Me.kind!=="tableCell")continue;let Be=He(Me,"tcPr"),he=Math.min(oe,mP),ye=Math.min(NC(Be),1024-he),It=Xo(Be&&He(Be,"tcW"));de.push(he),ce.push(ye),Pe.push(It),O.push({start:he,span:ye,preferred:It}),oe=he+ye;}let xe=hP(K,"gridAfter"),Re=Math.min(oe+xe,1024);xe>0&&oe<1024&&O.push({start:oe,span:Math.min(xe,1024-oe),preferred:Xo(K&&He(K,"wAfter"))}),Re>S&&(S=Re),y.push({node:U,revision:pe,cells:ke,properties:K,starts:de,spans:ce,preferred:Pe,gridColumns:Re});}let T=YS(e),k=T.length>0?T.length:S,w=y.length,v=[];for(let U=0;U<y.length;U+=1){let K=y[U],Q=K.node,G=K.properties,ne=SP({look:c,rowIndex:U,rowCount:w,gridColumn:0,gridSpan:Math.max(1,k),columnCount:Math.max(1,k),rowProperties:G,cellProperties:void 0}),ue=sP(d,ne,G),pe=0,de=[];for(let xe of K.cells){if(xe.kind!=="tableCell")continue;let Re=He(xe,"tcPr"),Me=K.starts[pe],Be=K.spans[pe],he=K.preferred[pe]??Jn,ye=SP({look:c,rowIndex:U,rowCount:w,gridColumn:Me,gridSpan:Be,columnCount:k,rowProperties:G,cellProperties:Re});pe+=1;let It,Vt=bm;for(let Ue of ye){let bt=d.conditional.get(Ue);if(!bt)continue;let an=He(bt,"tcPr");It=yP(an)??It,Vt=um(Vt,hm(an));}let ar=yP(Re)??It,Dt=fc(m,uc(Re&&He(Re,"tcMar"))),We=kl(xe.children,o,a);de.push({id:xe.id,gridSpan:Be,gridColumn:Me,...T[Me]?.id?{gridColumnId:T[Me].id}:{},vMergeContinue:AC(Re),vAlign:iP(Re),textDirection:tP(Re),margins:Dt,borders:um(Vt,Re?hm(Re):bm),...ar===void 0?{}:{shading:ar},preferredWidth:he,styleFormatting:x(ye),blocks:We});}let ce=K.revision,Pe=ce?ce.localName==="ins"?"insert":"delete":void 0,Ie=ce&&mc(ce,"id"),oe=ce&&mc(ce,"author"),ke=ce&&mc(ce,"date");v.push({id:Q.id,...Pe?{revisionKind:Pe}:{},...Ie!==void 0?{revisionId:Ie}:{},...oe!==void 0?{revisionAuthor:oe}:{},...ke!==void 0?{revisionDate:ke}:{},isHeader:ue,cantSplit:Tm(G,"cantSplit"),height:DC(G),cells:de});}let I=Jn,P,C,E,D,z;for(let U of d.tablePropertyNodes){let K=He(U,"tblW");K&&(I=Xo(K));let Q=He(U,"tblLayout");Q&&(P=on(Q,"type")==="fixed"),C=vl(He(U,"tblInd"),pP)??C,E=gP(U)??E,D=vl(He(U,"tblCellSpacing"),Tl)??D,z=Pm(U)??z;}let W=l&&He(l,"tblW"),j=W?Xo(W):I,M=l&&He(l,"tblLayout"),B=M?on(M,"type")==="fixed":P??false,N=vl(l&&He(l,"tblInd"),pP)??C??0,A=gP(l)??E??"left",H=n===0?Pm(l)??z:void 0,$=vl(l&&He(l,"tblCellSpacing"),Tl)??D??0,R=fP({table:e,propertyNodes:d.tablePropertyNodes,rows:v,columnCount:k,contentWidthPt:t,compatibilityMode:i,depth:n,tableWidth:j,layoutFixed:B,alignment:A,indentPt:N,cellSpacingPt:$,floating:H!==void 0}),Y=US({gridCols:T,claims:R===void 0?O:uP(O,T,R),columnCount:k,contentWidthPt:R??t,tableWidth:j,layoutFixed:B}),X=u?v.map(U=>({...U,cells:U.cells.map(K=>({...K,margins:{...K.margins,left:K.margins.right,right:K.margins.left},borders:{...K.borders,left:K.borders.right,right:K.borders.left},logicalGridColumn:K.gridColumn,gridColumn:Math.max(0,Y.length-K.gridColumn-K.gridSpan)}))})):v;return {...u?{bidiVisual:true}:{},columnWidthsPt:u?[...Y].reverse():Y,rows:R===void 0?X:X.map(U=>({...U,cells:U.cells.map(K=>({...K,legacyContentAlignment:true}))})),...R===void 0?{}:{legacyContentAlignment:true},tableWidth:j,layoutFixed:B,indentPt:N,alignment:u?A==="left"?"right":A==="right"?"left":A:A,...H?{float:H}:{},cellSpacingPt:$,tableBorders:u?{...g,left:g.right,right:g.left}:g,defaultMargins:u?{...m,left:m.right,right:m.left}:m}}var gc=65536;function Kz(e,t){if(e.length>gc)return;let n=new Array(e.length+1).fill(0),r=Ye(e),o=Math.max(0,t);for(let[a,i]of r.entries()){let l=o*a/r.length;for(let s=i.utf16From;s<i.utf16To;s++)n[s]=l;n[i.utf16To]=o*(a+1)/r.length;}return n}function Xz(e,t,n,r,o){if(e.length>gc||t.text!==e)return;let a=new Array(e.length+1).fill(0),i=[...t.clusters].sort((c,u)=>c.textStart-u.textStart);if(i.length===0&&e.length>0)return;let l=0,s=0,d=Math.max(0,t.glyphs.reduce((c,u)=>c+u.advanceX*n,0)+e.length*r+pc(e)*o);for(let c of i){if(c.textStart!==s||c.textEnd<=s||c.textEnd>e.length||!Number.isInteger(c.textEnd))return;for(let f=c.textStart;f<c.textEnd;f++)a[f]=l;let u=(c.textEnd-c.textStart)*r+pc(e.slice(c.textStart,c.textEnd))*o;l=Math.max(l,Math.min(d,l+c.advance*n+u)),a[c.textEnd]=l,s=c.textEnd;}if(s===e.length)return a[e.length]=d,a}function pc(e){let t=0;for(let n=0;n<e.length;n++)e[n]===" "&&t++;return t}var PP=new WeakMap;function RP(e,t,n){let r=PP.get(n);r||(r=new WeakMap,PP.set(n,r));let o=r.get(e),a=De(e.style,e.fontSlot),i=Qt(e.text,a),l=Math.max(0,e.box.width);if(o===void 0){o=null;try{let f=n.caretAdvances?.(i,a);if(f&&f.length===i.length+1){let p=0;o=f.map((m,g)=>g===0?0:(p=Math.max(p,Math.min(l,Number.isFinite(m)?m:p)),g===i.length?l:p));}}catch{}r.set(e,o);}let s=Math.max(0,Math.min(t,e.text.length));if(s===0)return 0;if(s===e.text.length)return l;let d=Qt(e.text.slice(0,s),a);if(o)return o[d.length]??l;let c=a.shaping?.wordSpacingPt??0,u=Math.max(0,l-pc(i)*c);return Math.max(0,Math.min(l,u*d.length/Math.max(1,i.length)+pc(d)*c))}function er(e,t){if(!t)return e;let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return a<=r||(e.width===0?o<n:o<=n)?null:{...e,x:n,y:r,width:o-n,height:a-r}}var MP=8;function Bm(e,t){return t?{...t,caret:hi(e,t.caret)}:null}var wP=new WeakMap;function yc(e){let t=wP.get(e);if(t)return t;let n=[],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 m=a.get(f.tableId)??0;r.set(p.id,m),a.set(f.tableId,m+1);}for(let m of p.cells){if(!p.isHeaderRepeat&&!u){let g=`${f.tableId}|${m.gridColumn}`;if(m.blocks.length===0){let h=l.get(g);h&&i.set(m,h);}else l.set(g,{row:p,cell:m});}s(m.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)n.push(c.box.y),s(c.fragments,false);let d={pageTops:n,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return wP.set(e,d),d}function bc(e,t){let n=yc(e).pageTops;if(n.length===0)return -1;let r=0,o=n.length-1,a=0;for(;r<=o;){let i=r+o>>1;n[i]<=t?(a=i,r=i+1):o=i-1;}return a}function sW(e,t){let n=e.pages[bc(e,t.y)];if(!n)return false;for(let r of [n.header,n.footer])if(r&&yi(r.box,t))return true;return false}function Lm(e,t,n,r=false){if(!e||e.length===0)return null;let o=[...e].sort((a,i)=>a.behindDocument!==i.behindDocument?a.behindDocument?-1:1:i.relativeHeight-a.relativeHeight);for(let a of o){if(r&&a.behindDocument||!Cl(a,t))continue;let i={paragraphId:a.anchorParagraphId,offset:a.start};return {position:i,caret:{position:i,x:a.x,y:a.y,height:a.height,lineId:"",pageIndex:n},pageIndex:n,lineId:"",cell:null,contentControlId:null,onGlyphs:true,drawing:Object.freeze({drawingNodeId:a.drawingNodeId,paragraphId:a.anchorParagraphId,start:a.start})}}return null}function Nm(e,t,n,r={}){let o=e.pages[t];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??MP,measurer:r.measurer},i=kP(e,o.index,n),l=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),s=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=Lm(l,n,a.pageIndex);if(d)return {...d,contentControlId:i};let c=Bm(e,hc(o.fragments,n,a,null));if(c?.onGlyphs)return {...c,contentControlId:i};let u=Lm(s,n,a.pageIndex);if(u)return {...u,contentControlId:i};if(c)return {...c,contentControlId:i};for(let f=1;f<e.pages.length;f+=1)for(let p of [t-f,t+f]){let m=e.pages[p];if(!m)continue;let g=Bm(e,hc(m.fragments,n,{...a,pageIndex:m.index},null));if(g)return {...g,contentControlId:kP(e,m.index,n)}}return null}function dW(e,t,n,r,o={}){let a=e.pages[t];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??MP,measurer:o.measurer};return Bm(e,hc(n,r,i,null))}function cW(e,t,n={}){let r=e.pages[bc(e,t.y)];if(!r)return null;for(let o of [r.header,r.footer]){if(!o?.anchoredDrawings||o.anchoredDrawings.length===0)continue;let a=Object.freeze({x:t.x-o.box.x,y:t.y-o.box.y}),i=Lm(o.anchoredDrawings,a,r.index);if(i)return i}return Nm(e,r.index,{x:t.x-r.contentBox.x,y:t.y-r.contentBox.y},n)}function yi(e,t){return t.x>=e.x&&t.x<e.x+e.width&&t.y>=e.y&&t.y<e.y+e.height}function Am(e,t,n){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===t&&yi(i.box,n)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function kP(e,t,n){return Am(e,t,n)?.id??null}function Em(e,t,n){let r=Math.max(e.x-t.x,0,t.x-(e.x+e.width)),o=Math.max(e.y-t.y,0,t.y-(e.y+e.height));return r+o*n}function GC(e,t,n){return e.kind!=="table"||Math.max(e.box.y-t.y,0,t.y-(e.box.y+e.box.height))>0?Em(e.box,t,n):0}function hc(e,t,n,r){if(e.length===0)return null;if(e.some(i=>i.kind==="paragraph"&&i.outOfFlow&&yi(i.box,t)))for(let i=e.length-1;i>=0;i-=1){let l=e[i];if(!yi(l.box,t))continue;let s=Fm(l,t,n,r);if(s)return s}let o=null;for(let i of e){if(!yi(i.box,t))continue;o=i;let l=Fm(i,t,n,r);if(l)return l;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:GC(i,t,n.verticalWeight)})).sort((i,l)=>i.score-l.score);for(let{block:i}of a){let l=Fm(i,t,n,r);if(l)return l}return null}function Fm(e,t,n,r){return e.kind==="paragraph"?$C(e,t,n,r,yi(e.box,t)):JC(e,t,n)}function $C(e,t,n,r,o){if(e.clipToBox&&!o)return null;let a=KC(e.lines,t.y);if(!a)return null;let i=qC(a,t.x,t.y,n),l=YC(a,t.x),s=Math.min(Math.max(i.offset,l.start),l.end),d={paragraphId:l.paragraphId,offset:s},c=Bl(a,s,n.measurer,l),u=er({...c,x:i.x,width:0},e.clipToBox?e.box:void 0);return u?{position:d,caret:{position:d,x:u.x,y:u.y,height:u.height,lineId:a.id,pageIndex:n.pageIndex},pageIndex:n.pageIndex,lineId:a.id,cell:r,onGlyphs:o&&i.withinSpan&&t.y>=a.box.y&&t.y<a.box.y+a.box.height,contentControlId:null,drawing:i.drawing&&i.withinSpan?XC(i.drawing):null}:null}function KC(e,t){if(e.length===0)return null;for(let o of e)if(t>=o.box.y&&t<o.box.y+o.box.height)return o;let n=e[0],r=Number.POSITIVE_INFINITY;for(let o of e){let a=t<o.box.y?o.box.y-t:t-(o.box.y+o.box.height);a<r&&(r=a,n=o);}return n}function XC(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function YC(e,t){let n=yt(e),r=nf(e.spans,t);if(r){let a=n.find(i=>i.paragraphId===r.range.paragraphId);if(a)return a}let o=n[0];for(let a of n){let i=a.spans[0];if(i===void 0)continue;let l=a.spans[a.spans.length-1];if(t>=i.box.x&&(o=a),t<l.box.x+l.box.width)break}return o}function UC(e,t,n){for(let r of n??e.drawings??[])if(r.start===t||r.start+1===t)return r;return null}function Cl(e,t){let n=e.hitBounds;return t.x<n.x||t.x>=n.x+n.width||t.y<n.y||t.y>=n.y+n.height?false:xf(t.x,t.y,e.geometry)}function qC(e,t,n,r){let o=e.spans;for(let d of e.drawings??[])if(Cl(d,{x:t,y:n}))return {offset:d.start,x:d.hitBounds.x,withinSpan:true,drawing:d};if(o.length===0&&(e.drawings?.length??0)>0){let d=e.drawings[0];if(t<=d.advanceStart)return {offset:e.range.start,x:d.advanceStart,withinSpan:false,drawing:d};let c=e.drawings[e.drawings.length-1];if(t>=c.advanceEnd)return Cm(e,c.advanceEnd,r);for(let u of e.drawings??[])if(t>=u.advanceStart&&t<u.advanceEnd){let f=t>=u.x+u.width/2;return {offset:f?u.start+1:u.start,x:f?u.advanceEnd:u.advanceStart,withinSpan:Cl(u,{x:t,y:n}),drawing:u}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=nf(o,t);if(a){let d=OP(a,Math.max(a.box.x,Math.min(t,a.box.x+a.box.width)),r),c=yt(e).find(p=>p.paragraphId===a.range.paragraphId),u=Wh(e,c),f=Math.min(d.offset,BP(r.layout,u));return f===d.offset?d:{...d,offset:f,x:Bl(e,f,r.measurer,c).x}}let i=o[0];if(t<=i.box.x)return {offset:e.range.start,x:i.box.x,withinSpan:false};let l=o[o.length-1],s=l.box.x+l.box.width;if(t>=s)return Cm(e,s,r);for(let d of o)if(t>=d.box.x&&t<d.box.x+d.box.width)return OP(d,t,r);for(let d=0;d<o.length;d+=1){let c=o[d];for(let u of e.drawings??[]){if(t>=u.advanceStart&&t<u.advanceEnd){let f=Cl(u,{x:t,y:n}),p=t>=u.x+u.width/2;return {offset:p?u.start+1:u.start,x:p?u.advanceEnd:u.advanceStart,withinSpan:f,drawing:u}}if(!(u.start<=c.range.start&&u.hitBounds.x+u.hitBounds.width<=c.box.x)){if(Cl(u,{x:t,y:n}))return {offset:u.start,x:u.hitBounds.x,withinSpan:true,drawing:u};if(t<c.box.x&&t>=u.hitBounds.x+u.hitBounds.width)return {offset:u.start+1,x:u.hitBounds.x+u.hitBounds.width,withinSpan:false,drawing:u};if(t<u.hitBounds.x&&t>=(o[d-1]?.box.x??e.contentX))return {offset:u.start,x:u.hitBounds.x,withinSpan:false,drawing:u}}}if(t<c.box.x){let u=o[d-1],f=u.box.x+u.box.width;return t-f<=c.box.x-t?{offset:u.range.end,x:f,withinSpan:false}:{offset:c.range.start,x:c.box.x,withinSpan:false}}}return Cm(e,s,r)}function Cm(e,t,n){let r=BP(n.layout,e);if(r===e.range.end)return {offset:r,x:t,withinSpan:false};for(let o=e.spans.length-1;o>=0;o-=1){let a=e.spans[o];if(r<a.range.start)continue;let i=r-a.range.start,l=n.measurer?Ml(a,i,n.measurer):a.box.width*(a.range.end>a.range.start?i/(a.range.end-a.range.start):0);return {offset:r,x:a.box.x+l,withinSpan:false}}return {offset:r,x:t,withinSpan:false}}function BP(e,t){let n=t.range.end;if(n>t.range.start&&Mm(t,n-1)===Td$1)return n-1;if(yc(e).lastLineIdOfParagraph.get(t.range.paragraphId)===t.id)return n;let r=n;for(r>t.range.start&&Mm(t,r-1)===`
|
|
17
|
-
`&&(r-=1);r>t.range.start&&Mm(t,r-1)===" ";)r-=1;return r}function Mm(e,t){for(let n of e.spans)if(!(t<n.range.start||t>=n.range.end))return n.text.length!==n.range.end-n.range.start?null:n.text[t-n.range.start]??null;return null}var vP=new WeakMap,TP=new WeakMap;function IP(e){let t=Ws(),n=vP.get(e);if(n&&n.epoch===t)return n.boundaries;let r=[0];for(let o of Ye(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),vP.set(e,{epoch:t,boundaries:r}),r}function Ml(e,t,n){let r=e.caretEdges;if(r&&t>=0&&t<r.length)return r[t];if(e.style.shaping)return RP(e,t,n);let o=TP.get(n);o||(o=new WeakMap,TP.set(n,o));let a=o.get(e);a||(a=new Map,o.set(e,a));let i=a.get(t);if(i!==void 0)return i;let l=t<=0?0:Je(e.text.slice(0,t),De(e.style,e.fontSlot),n),s=e.lineEndWhitespace?Math.min(l,e.box.width):l;return a.set(t,s),s}function Dm(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function tr(e,t,n){let r=e.range.end-e.range.start;if(r<=0)return e.box.x;let o=Math.max(0,Math.min(t-e.range.start,r)),a=l=>e.box.x+(e.style.shaping?.direction==="rtl"?e.box.width-l:l),i=e.caretEdges;return i&&o<i.length?e.box.x+i[o]:!n||Dm(e)?a(e.box.width*(o/r)):a(Ml(e,o,n))}function Bl(e,t,n,r){let o=UC(e,t,r?.drawings);if(o)return {x:t>o.start?o.advanceEnd:o.advanceStart,y:o.y,height:o.height};let a=r?r.spans:e.spans;if(a.length===0){let d=e.leading??0,c=Math.max(0,e.box.height-d-(e.trailingSpacing??0));if(c<=0&&e.box.height<=0){let u=Math.max(0,e.baseline);return {x:e.contentX,y:e.box.y-u,height:u}}return {x:e.contentX,y:e.box.y+d,height:c}}let i=a[0];for(let d=0;d<a.length;d+=1){let c=a[d];if(t>c.range.start&&t<c.range.end){i=c;break}if(t===c.range.end){let u=a[d+1];if(u?.range.start===t&&c.style.shaping&&u.style.shaping){i=u;break}if(u&&u.range.start===t&&Dm(c)){i=u;break}if(u&&u.range.start===t){let f=nt(In(c.text)??0)||nt(u.text.codePointAt(0)??0),p=u.box.x-(c.box.x+c.box.width)-(u.wrapAdvanceBefore??0);if(c.text.endsWith(" ")&&p>.25||f&&p>.001){i=u;break}}i=c;}else t>c.range.end&&(i=c);}let l=tr(i,t,n),s=n?.lineMetrics(De(i.style,i.fontSlot));return !s||s.height<=0?{x:l,y:e.box.y,height:e.box.height}:{x:l,y:e.box.y+e.baseline-s.baseline-hh(i.style),height:s.height}}function OP(e,t,n){let r=e.style.shaping?.direction==="rtl",o=r?e.box.x+e.box.width-t:t-e.box.x,a=g=>e.box.x+(r?e.box.width-g:g),i=e.range.end-e.range.start;if(i<=0||Dm(e)){let g=o>e.box.width/2;return {offset:g?e.range.end:e.range.start,x:a(g?e.box.width:0),withinSpan:true}}if(!n.measurer){let g=Math.max(0,Math.min(1,o/Math.max(e.box.width,Number.EPSILON))),h=Math.round(g*i),b=IP(e),x=b[0],y=Number.POSITIVE_INFINITY;for(let O of b){let S=Math.abs(O-h);S<y&&(y=S,x=O);}return {offset:e.range.start+x,x:a(e.box.width*(x/i)),withinSpan:true}}let l=IP(e),s=1,d=l.length-1;for(;s<d;){let g=s+d>>1;Ml(e,l[g],n.measurer)<o?s=g+1:d=g;}let c=l[s],u=l[s-1],f=Ml(e,c,n.measurer),p=Ml(e,u,n.measurer),m=o-p<=f-o;return {offset:e.range.start+(m?u:c),x:a(m?p:f),withinSpan:true}}function FP(e,t,n,r){if(e.length===0)return null;for(let i of e){let l=n(i);if(t>=l&&t<l+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let l=n(i),s=t<l?l-t:t-(l+r(i));s<a&&(a=s,o=i);}return o}function ZC(e,t,n,r){return {tableId:t.tableId,rowId:n.id,cellId:r.id,rowIndex:yc(e).rowIndexById.get(n.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function JC(e,t,n,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],l=FP(a,t.y,d=>d.box.y,d=>d.box.height);if(l){let d=FP(l.cells,t.x,c=>c.box.x,c=>c.box.width);d&&i.push(QC(n,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:Em(c.box,t,n.verticalWeight)}));s.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...s.map(u=>u.entry)]){let u=ZC(n.layout,e,d,c),f=c.textDirection==="btLr"?rP(t,c.box):t,p=hc(c.blocks,f,n,u);if(p)return p}return null}function QC(e,t,n){return n.blocks.length>0?{row:t,cell:n}:yc(e.layout).mergeOriginOf.get(n)??{row:t,cell:n}}function LP(e,t){let n=t.paintBounds;return n.width<=0||n.height<=0?null:Object.freeze({pageIndex:e,x:n.x,y:n.y,width:n.width,height:n.height,record:t})}function eM(e,t,n){for(let r of t.lines)for(let o of r.drawings??[])if(o.drawingNodeId===n)return LP(e,o);return null}function EP(e,t,n){if(t.kind==="paragraph")return eM(e,t,n);for(let r of t.rows)for(let o of r.cells)for(let a of o.blocks){let i=EP(e,a,n);if(i)return i}return null}function CP(e,t,n){for(let r of t){let o=EP(e,r,n);if(o)return o}return null}function uW(e,t){for(let n of e.pages){for(let o of n.anchoredDrawings??[])if(o.drawingNodeId===t)return LP(n.index,o);let r=CP(n.index,n.fragments,t);if(r)return r;for(let o of [n.header,n.footer]){if(!o)continue;for(let i of o.anchoredDrawings??[]){if(i.drawingNodeId!==t)continue;let l=i.paintBounds;return l.width<=0||l.height<=0?null:Object.freeze({pageIndex:n.index,x:o.box.x+l.x-n.contentBox.x,y:o.box.y+l.y-n.contentBox.y,width:l.width,height:l.height,record:i})}let a=CP(n.index,o.fragments,t);if(a){let i=a.record.paintBounds;return Object.freeze({pageIndex:n.index,x:n.header?.box.x===o.box.x||n.footer?.box.x===o.box.x?o.box.x+i.x-n.contentBox.x:a.x,y:o.box.y+i.y-n.contentBox.y,width:a.width,height:a.height,record:a.record})}}}return null}function xc(e,t,n){return e.some(r=>r.spans.length>0||(r.drawings?.length??0)>0)?{}:{emptyParagraphStyle:t.length===0?wn:Ne(t,n)}}function nr(e){return {...e,measuringOnly:true,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function NP(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function _m(e,t,n,r,o){let a=NP(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 t){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:n,width:i.cellContentWidth,height:r});a(Gr({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,...o.hostedStory?{layoutTextboxStory:o.hostedStory.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{}}));}}function AP(e,t){let n=NP(e),r=e.deferAnchoredDrawings;return !n&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:n,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{t.push(i);}},flushDeferred:(i,l,s)=>{if(t.length!==0){if(n&&!e.anchorDeferOnly)_m(t,i,l,s,e);else if(r)for(let d of t)r(d);t.length=0;}}}}function Sc(e,t,n){let r=yb(e.tabStops,t),o=r===e.tabStops?e.tabStopsCacheToken:kd(r);return {tabStops:r,properties:[...e.props,...e.inheritedRunProperties,...e.markRunProperties,{localName:"tabStops",attributes:{token:o}},...n.listToken!==void 0?[{localName:"list",attributes:{token:n.listToken}}]:[],...n.hostedListToken?[{localName:"txbxList",attributes:{token:n.hostedListToken}}]:[],...n.refToken?[{localName:"refFields",attributes:{token:n.refToken}}]:[]]}}function jm(e,t){return e?`${t.toFixed(3)}|${e}`:""}function DP(e,t){let n=jm(t.exclusionToken,t.paragraphStartY),r=e;return n&&(r+=`\0excl:${t.columnIndex}|${n}`),t.startOffset>0&&(r+=`\0from:${t.startOffset}`),r}function Pc(e){let{formatting:t,styleCascade:n}=e;return _f(e.paragraph,e.paragraphId,e.indentLeft,e.available,e.measurer,e.cache,e.cacheKey,t.inheritedRunProperties,e.tabStops,e.pageContext,n?(r,o)=>ai(r,o,n):void 0,{...e.flow,paragraphRtl:vt(t.props),lineSpacing:t.lineSpacing,typography:yd(t.props,n?.typography),equationCacheToken:e.producer,...n?{themeFonts:n.themeFonts}:{},markRunProperties:t.markRunProperties})}var _P=new WeakMap;function Ll(e){let t=Ib(e.borders);return t===""?"":`${t}@${e.indent.left},${e.indent.right}`}function Hm(e,t,n){_P.set(e,{styleCascade:t.styleCascade,tableCellStyle:t.tableCellStyle,listItem:t.listItems?.get(e.id),key:n});}function tM(e,t){let n=t.listItems?.get(e.id),r=_P.get(e);if(r&&r.styleCascade===t.styleCascade&&r.tableCellStyle===t.tableCellStyle&&r.listItem===n)return r.key;let o=Ll(Ho(e,1,t.styleCascade,n,t.tableCellStyle,true));return Hm(e,t,o),o}function jP(e,t){return e&&e.kind==="paragraph"?tM(e,t):""}function HP(e,t){return t?{...e,indent:{...e.indent,left:e.indent.right,right:e.indent.left},markerAlign:e.markerAlign==="left"?"right":e.markerAlign==="right"?"left":"center"}:e}function Rc(e,t,n,r,o,a){return $x(e&&HP(e,a),a&&e?{...t,left:t.right}:t,n,r,o)}function wc(e,t,n,r=0,o){if(!e||!e.markerText||!n)return;let a=t.measure(e.markerText,e.markerStyle),i=Yf(HP(e,o!==void 0),a,n.y,n.height);if(i)return {text:e.markerText,style:e.markerStyle,box:{x:r+(o===void 0?i.x:o-i.x-i.width),y:i.y,width:i.width,height:i.height},level:e.ilvl,numId:e.numId,numFmt:e.numFmt,...e.ordinal===void 0?{}:{ordinal:e.ordinal}}}function nM(e){let t=[0],n=0;for(let r of e)n+=r,t.push(n);return t}function rM(e,t){let n=t.get(e.id);return n===void 0&&(e.isHeaderRepeat?n=0:(n=t.size,t.set(e.id,n))),{...e,rowIndex:n}}function Nl(e,t,n,r){return {...e,nestingDepth:n,columnEdges:e.columnEdges??nM(t),rows:e.rows.map(o=>rM(o,r))}}var zP=new WeakMap,WP=new WeakMap;function oM(e){let t=WP.get(e);if(t)return t;let n=new Set;for(let r of e.occurrences)r.row.cells.some(o=>o.gridSpan>1||o.vMergeContinue||(o.rowSpan??1)>1)&&n.add(r.table.tableId);return WP.set(e,n),n}var bi=4,zm=6,VP=14,aM={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function Wm(e,t,n,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:t,table:a,row:l,rowOrdinal:l.rowIndex,nestingDepth:i,editable:!l.isHeaderRepeat,pageContentBox:n});for(let s of l.cells)Wm(s.blocks,t,n,i+1,o);}}}function CW(e){let t=zP.get(e);if(t)return t;let n=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o],i=l=>{n.push(l);};Wm(a.fragments,o,a.contentBox,0,i);for(let l of [a.header,a.footer])l&&Wm(l.fragments,o,l.box,0,i);}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(n)});return zP.set(e,r),r}function MW(e){let t=e.sourceRevision;switch(e.kind){case "rowDivider":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function BW(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 LW(e,t){if(t.kind==="insertRow"){for(let n of e.occurrences)if(n.pageIndex===t.pageIndex&&n.table.tableId===t.tableId&&n.row.id===t.rowId&&n.row.isHeaderRepeat===t.isHeaderRepeat)return n.editable?{kind:"insertRow",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:n.table.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth}:null;return null}for(let n of e.occurrences)if(n.pageIndex===t.pageIndex&&n.table.tableId===t.tableId&&n.row.id===t.rowId&&n.row.isHeaderRepeat===t.isHeaderRepeat&&n.editable)for(let r=0;r<n.table.columnEdges.length-1;r+=1){let o=El(n.row,r);if(o===t.gridColumnId)return {kind:"insertColumn",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:n.table.tableId,rowId:n.row.id,gridColumnId:o,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth}}return null}function El(e,t){for(let n of e.cells)if(n.gridColumn===t)return n.gridColumnId??null;return null}function iM(e,t,n,r,o){if(!e.pages[t.pageIndex])return null;let i=t.pageContentBox,l=n-i.x-o,s=r-i.y,d=t.table,c=l-d.box.x,u=s-d.box.y;return c<-bi||u<-VP||c>d.box.width+bi||u>d.box.height+zm?null:{x:c,y:u}}function lM(e,t,n,r){if(t.row.isHeaderRepeat)return null;let o=t.table,a=t.row.box.y-o.box.y+t.row.box.height;if(!o.columnEdges.slice(1).some(s=>Math.abs(n-s)<=bi)&&n>=0&&n<=o.box.width&&Math.abs(r-a)<=bi)return {kind:"rowDivider",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeY:a};if(r<t.row.box.y-t.table.box.y||r>t.row.box.y-t.table.box.y+t.row.box.height||oM(e).has(o.tableId))return null;for(let s=1;s<o.columnEdges.length-1;s+=1){let d=o.columnEdges[s];if(Math.abs(n-d)>bi)continue;let c=El(t.row,s-1),u=El(t.row,s);if(!(!c||!u))return {kind:"columnDivider",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,leftGridColumnId:c,rightGridColumnId:u,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeX:d,sheetY:t.pageContentBox.y+o.box.y+r}}let l=o.columnEdges.at(-1);if(Math.abs(n-l)<=bi){let s=o.columnEdges.length-2,d=El(t.row,s);return !d||t.row.cells.some(c=>c.logicalGridColumn!==void 0)?null:{kind:"rightEdge",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,gridColumnId:d,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeX:l,sheetY:t.pageContentBox.y+o.box.y+r}}return null}function EW(e,t,n,r,o=0,a){let i=a??bc(r,n),l=i>=0?o:0,s=null,d=-1,c=-1,u=f=>{if(!f)return;let p=aM[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=iM(r,f,t,n,l);if(!p||(u(lM(e,f,p.x,p.y)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let m=f.row.box.y-f.table.box.y;p.x<=zm&&Math.abs(p.y-(m+f.row.box.height/2))<=f.row.box.height/2+zm&&u({kind:"insertRow",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});for(let g=0;g<f.table.columnEdges.length-1;g+=1){let h=f.table.columnEdges[g],b=f.table.columnEdges[g+1],x=(h+b)/2;if(Math.abs(p.x-x)>(b-h)/2+2||p.y>VP)continue;let y=El(f.row,g);if(y){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:y,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return s}var GP=1048576;function Uo(e=GP){let t=e|0;return {cellsRemaining:t>0?t:0}}function kc(e,t,n,r){let o=new Map,a=new Map,i=r?.pageFragment===true,l=i?new Set:null,s=i,c=p=>{let m=a.get(p);m&&(o.set(m.id,m.span),a.delete(p));},u=()=>n!==void 0&&n.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 m=new Set,g=false;for(let h of p.cells){if(n){if(n.cellsRemaining<=0){g=true;break}n.cellsRemaining-=1;}let b=Math.max(0,Math.min(h.gridColumn|0,1023));if(m.add(b),h.vMergeContinue){let x=a.get(b);x?x.span+=1:l&&!l.has(b)&&(a.set(b,{id:h.id,span:1}));}else c(b),a.set(b,{id:h.id,span:1});l?.add(b);}if(g){f();break}for(let h of [...a.keys()])m.has(h)||c(h);}return f(),o}var vc=.001;function sM(e,t){return {...e,height:{rule:"auto"},cells:[t]}}function dM(e){let t=kc(e),n=[],r=new Map;for(let o=0;o<e.length;o+=1)for(let a of e[o].cells){let i=t.get(a.id);if(i===void 0||i<2)continue;let l=Math.min(o+i-1,e.length-1);if(l<=o)continue;n.push({span:{headRow:o,endRow:l,headCellId:a.id},cell:a});let s=r.get(o);s?s.add(a.id):r.set(o,new Set([a.id]));}return {heads:n,headIdsByRow:r}}function cM(e,t){if(e.length===0||!e.some(w=>w.cells.some(v=>v.vMergeContinue)))return null;let{heads:n,headIdsByRow:r}=dM(e);if(n.length===0)return null;let o=new Map(n.map(w=>[w.span,w])),a=new Map;for(let w of n){let v=a.get(w.span.headRow);v?v.push(w.span):a.set(w.span.headRow,[w.span]);}for(let w of a.values())w.sort((v,I)=>I.endRow-v.endRow);let i=new Map,l=new Map,s=new Map,d=new Map,c=new Set,u=new Set,f=new Set,p=new Set,m=new Map,g=new Map,h=(w,v,I)=>{let P=new Set;for(let W of r.get(w)??[])(f.has(W)||W===v)&&P.add(W);let C=I===void 0?"":`@${I.toFixed(2)}`,E=`${w}${C}\0${[...P].sort().join("\0")}`,D=i.get(E);if(D!==void 0)return D;let z=t(e[w],P,I);return i.set(E,z),z},b=(w,v)=>{let I=v===void 0?w:`${w.headCellId}@${v.toFixed(2)}`,P=l.get(I);if(P!==void 0)return P;let C=o.get(w),E=t(sM(e[w.headRow],C.cell),void 0,v);return l.set(I,E),E},x=(w,v,I)=>h(w,v,I)+(s.get(w)??0),y=w=>{for(let v=w.headRow+1;v<=w.endRow;v+=1)if(r.has(v))return true;return false},O=(w,v)=>{let I=0;for(let P=w.headRow;P<=w.endRow;P+=1)I+=x(P,w.headCellId,v===void 0?void 0:v+I);return I},S=(w,v)=>{let I=new Map,P=0;for(let C=w.headRow;C<=w.endRow;C+=1){let E=x(C,w.headCellId,v===void 0?void 0:v+P);I.set(C,E),P+=E;}return I},T=w=>{for(let v=w.endRow;v>=w.headRow;v-=1)if(e[v].height.rule!=="exact")return v},k=(w,v)=>{if(y(w)||p.has(w.headRow)&&!u.has(w))return Number.POSITIVE_INFINITY;let I=O(w,v);return T(w)===void 0?I:Math.max(I,b(w,v))};return {spansAt:w=>a.get(w)??[],heightOf:k,accept:(w,v)=>{if(u.has(w)||y(w)||p.has(w.headRow))return;let I=S(w,v),P=0;for(let z of I.values())P+=z;let C=T(w),E=b(w,v);if(C===void 0&&E>P+vc)return;let D=C===void 0?0:E-P;u.add(w),f.add(w.headCellId),p.add(w.headRow),D>vc&&(s.set(C,(s.get(C)??0)+D),I.set(C,(I.get(C)??0)+D));for(let[z,W]of I)c.add(z),d.set(z,Math.max(d.get(z)??0,W));m.set(w,v),g.set(w,D>vc?C:void 0);},withdrawAt:w=>{for(let v of a.get(w)??[]){if(!u.delete(v))continue;f.delete(v.headCellId),p.delete(v.headRow),m.delete(v);let I=g.get(v);I!==void 0&&s.delete(I),g.delete(v);for(let P=v.headRow;P<=v.endRow;P+=1)c.delete(P),d.delete(P);}},rowOptions:w=>{if(!c.has(w))return;let v;for(let I of a.get(w)??[])u.has(I)&&(v??=new Map,v.set(I.headCellId,k(I,m.get(I))));return {...v?{detachedSpanHeightPtByCellId:v}:{},heightFloorPt:d.get(w)??x(w)}}}}function $P(e,t,n,r){for(let o of e?.spansAt(t)??[])n+e.heightOf(o,n)>r+vc||e.accept(o,n);return e?.rowOptions(t)}function KP(e,t,n,r,o){return cM(e.rows,(a,i,l)=>o(a,e.columnWidthsPt,typeof t=="function"?t():t,n,r,e.cellSpacingPt,i?{detachedSpanHeightPtByCellId:new Map([...i].map(s=>[s,Number.POSITIVE_INFINITY]))}:void 0,l))}function XP(e,t,n){for(let r of e?.spansAt(t)??[])e.accept(r,n);return e?.rowOptions(t)}function eo(e,t,n=false){let r=Sr(t.left),o=Sr(t.right),a=[t.left,t.right].every(l=>l.state!=="edge"||l.style==="single"||l.style==="thick"),i=n&&a&&e.left>=r&&e.right>=o;return {top:e.top+Sr(t.top),right:e.right+(i?0:o),bottom:e.bottom+Sr(t.bottom),left:e.left+(i?0:r)}}function uM(e,t,n){return {top:t?{state:"none"}:e.top,left:e.left,bottom:n?{state:"none"}:e.bottom,right:e.right}}function Tc(e,t,n){return !t&&!n?e:{...e,cells:e.cells.map(r=>({...r,borders:uM(r.borders,t,n)}))}}function fM(e,t,n,r){if(!(!r.onAnchorRepublish||!r.inlineDrawingLayout||!r.anchorFrameBase||!r.pageContentClip))for(let o of e){if(o.kind!=="paragraph")continue;let a=t.find(l=>l.kind==="paragraph"&&l.id===o.paragraphId);!a||a.kind!=="paragraph"||zt(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,Gr({paragraph:a,paragraphId:o.paragraphId,paragraphBox:o.box,lines:o.lines,drawingLayout:r.inlineDrawingLayout,frameBase:r.anchorFrameBase(),columnBox:r.columnBoxForParagraph?.(o.box)??o.box,cellBox:n,pageClip:r.pageContentClip(),measurer:r.measurer,...r.hostedStory?{layoutTextboxStory:r.hostedStory.layoutTextboxStoryFor}:{},...r.displayMode?{displayMode:r.displayMode}:{}}));}}function xi(e,t){return t===0?[...e]:e.map(n=>n.kind==="table"?{...n,box:{...n.box,y:n.box.y+t},rows:n.rows.map(r=>({...r,box:{...r.box,y:r.box.y+t},cells:r.cells.map(o=>({...o,box:{...o.box,y:o.box.y+t},blocks:xi(o.blocks,t)}))}))}:{...n,box:{...n.box,y:n.box.y+t},...n.shadingBox?{shadingBox:{...n.shadingBox,y:n.shadingBox.y+t}}:{},...n.bottomBorder?{bottomBorder:{...n.bottomBorder,box:{...n.bottomBorder.box,y:n.bottomBorder.box.y+t}}}:{},...n.borders?{borders:n.borders.map(r=>({...r,box:{...r.box,y:r.box.y+t}}))}:{},...n.marker?{marker:{...n.marker,box:{...n.marker.box,y:n.marker.box.y+t}}}:{},lines:n.lines.map(r=>({...r,box:{...r.box,y:r.box.y+t},spans:r.spans.map(o=>({...o,box:{...o.box,y:o.box.y+t}})),...r.drawings?{drawings:r.drawings.map(o=>Yn(o,0,t))}:{}}))})}function Si(e,t,n,r,o,a,i,l,s){if(e.length===0)return [];let d=new Map;for(let b of n)for(let x of b.cells)d.set(x.id,x);let c=kc(e,a,o,{pageFragment:true}),u=e.map((b,x)=>({...b,cells:b.cells.map(y=>{let O=c.get(y.id);if(y.vMergeContinue&&O===void 0)return {...y,paintInert:true,rowSpan:1,borders:{},blocks:[]};let S=y.vMergeContinue,T=O??1,k=y.box.height;if(T>1){let P=e[x+T-1];k=P.box.y+P.box.height-y.box.y;}let w=d.get(y.id),v=y.blocks;if(w&&w.vAlign!=="top"&&v.length>0){let P=s?.get(b)?.get(y.id)??eo(w.margins,w.borders,w.legacyContentAlignment===true&&t.cellSpacingPt===0),C=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY;for(let D of v)C=Math.min(C,D.box.y),E=Math.max(E,D.box.y+D.box.height);if(Number.isFinite(C)&&Number.isFinite(E)){let D=w.textDirection==="btLr",z=(D?y.box.width-P.left-P.right:k-P.top-P.bottom)-(E-C),j=y.box.y+(D?P.left:P.top)+(z>0?w.vAlign==="center"?z/2:z:0)-C;if(Math.abs(j)>.001){v=xi(v,j);for(let M of v)M.kind==="paragraph"&&i?.(M.paragraphId,j);}}}let I=Object.freeze({x:y.box.x,y:y.box.y,width:y.box.width,height:k});return w&&l&&(T>1||w.vAlign!=="top"&&v.length>0)&&fM(v,w.blocks,I,l),{...y,...S?{vMergeContinue:false,paintInert:false}:{},rowSpan:T,blocks:v,box:{...y.box,height:k}}})})),f=u.map(b=>b.cells.map(x=>{let y=d.get(x.id);return {gridColumn:x.gridColumn,gridSpan:x.gridSpan,vMergeContinue:x.vMergeContinue,borders:y?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:x.rowSpan??1}})),p=t.columnWidthsPt.length,m=t.tableBorders,g={columnWidthsPt:t.columnWidthsPt,rowBands:u.map(b=>({y:b.box.y,height:b.box.height})),cellBoxes:u.map(b=>b.cells.map(x=>({width:x.box.width,height:x.box.height})))},h=dc(f,m,p,g,void 0,r);return u.map((b,x)=>({...b,cells:b.cells.map((y,O)=>{let S=h[x][O];return y.paintInert||y.vMergeContinue?{...y,borders:{},paintInert:true}:{...y,borders:S}})}))}function Vm(e,t,n,r,o,a){let i=new Map,l=0,s=d=>{let c=Wt(d,t,0,n,r,o,a);if(c)for(let u of c.rows)for(let f of u.cells)for(let p of f.blocks)p.localName==="p"?i.set(p.id,l++):p.localName==="tbl"&&s(p);};for(let d of e)d.kind==="paragraph"&&d.paragraph?i.set(d.paragraph.id,l++):d.kind==="table"&&d.table&&s(d.table);return i}var Gm=4096,YP=1,rr=class extends Error{code;constructor(t,n){super(n),this.name="TablePaginationError",this.code=t;}};function $m(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false}))}function Al(e,t,n){let r=0;for(let o=t;o<n&&o<e.length;o+=1)r+=e[o];return r}function mM(e,t,n,r,o,a,i){let l=e.id,s=o.cache?.keyFor?.bind(o.cache)??md,d=o.listItems?.get(l),c=Ho(e,n,o.styleCascade,d,i?.tableCellStyle,true),{props:u,indent:f,available:p,alignment:m,styleId:g,outlineLevel:h,spacing:b,bottomBorder:x,borders:y,shading:O}=c,S=vt(u),T={styleCascade:o.styleCascade,tableCellStyle:i?.tableCellStyle,listItems:o.listItems},k=Ll(c);Hm(e,T,k);let w=_=>k!==""&&jP(_,T)===k,v=w(i?.borderNeighbours?.previous),I=w(i?.borderNeighbours?.next),P=v?void 0:y.top,C=I?y.between:x,{tabStops:E,properties:D}=Sc(c,o.defaultTabStopPt,{listToken:d?.cacheToken,hostedListToken:o.hostedStory?.hostedListTokenForParagraph?.(e)??"",refToken:o.refFields?.tokenForParagraph(l)??""}),z=Rc(d,f,o.measurer,E,p,S),W=o.pageExclusionZones?.()??Object.freeze([]),j=o.paragraphOrderIndex?.(l)??Number.MAX_SAFE_INTEGER,M=o.paragraphOrderIndex?rx(W,j,_=>o.paragraphOrderIndex?.(_)):W,B=_d(M,t,0,{left:0,right:f.left+p+f.right}),N=Un(B),A=jm(N,r),H=s({paragraph:e,properties:D,width:p,producer:o.producer,drawingToken:Zi(o.drawingTokenForParagraph?.(e)||o.drawingLayoutToken||"",o.inlineDrawingLayout!==void 0),projectionToken:o.projectionTokenForParagraph?.(e)??"",...A?{exclusionToken:A}:{}});o.cache&&o.onCellBreakKey?.(H);let $=Pc({paragraph:e,paragraphId:l,indentLeft:f.left,available:p,measurer:o.measurer,cache:o.cache,cacheKey:o.cache?H:null,formatting:c,producer:o.producer,styleCascade:o.styleCascade,tabStops:E,...o.pageContext?{pageContext:o.pageContext}:{},flow:{firstLineOffset:z,marginExtent:{left:0,right:f.left+p+f.right},...o.projectLink?{projectLink:o.projectLink}:{},...o.projectFieldLink?{projectFieldLink:o.projectFieldLink}:{},...o.documentProperties?{documentProperties:o.documentProperties}:{},...o.bodyPageFields?{bodyPageFields:o.bodyPageFields}:{},...o.refFields?{refFields:o.refFields}:{},displayMode:o.displayMode,...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{},...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:f.left+p+f.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:f.left+p+f.right,height:Math.max(1,p)}),...B.length>0?{pageExclusionZones:B}:{}}}),R=i?.lineStart??0,Y=i?.fragmentIndex??0,X=i?.maxBottom??Number.POSITIVE_INFINITY,U=i?.includeAfter??true,K=i?.includeBottomBorder??true,Q=()=>d!==void 0||o.displayMode==="all-markup"&&sy(e,"all-markup",o.revisionAuthorFilter),G=(i?.collapseHeight??false)&&!Q(),ne=R===0&&!G?Ka(b.before,a):0,ue=t+f.left,pe=R===0&&!G?No(P):0,de=[],ce=r+ne+pe,Pe=R,Ie=false;for(let _=R;_<$.length;_+=1){let F=$[_],q=_===$.length-1,le=q&&K&&C&&!G?No(C):0,ze=q&&U&&!G?b.after:0,be=G?0:Af(F,ce,B);if((G?ce:ce+be+F.height+le+ze)>X+.001)break;ce+=be;let Ce=t+f.left+(_===0&&!S?z:0),Le=Math.max(1,p-(_===0?z:0)),rt=F.spans.map(At=>({...At,range:{...At.range,paragraphId:l},box:{...At.box,x:At.box.x+t-(S&&_===0?z:0),y:ce}})),$e=nl(rt,o.measurer,Ce,Le,m,q,m==="center"||m==="right"?F.width:void 0,S),sn=rt.length>0&&$e.length>0?$e[0].box.x-rt[0].box.x:m!=="left"&&m!=="both"?(()=>{let At=Le-F.width;return At<=0?0:m==="center"?At/2:At})():0,qt=Object.freeze({x:t,y:r,width:n,height:Math.max(0,X-r)}),vr=pl(F.drawings.map(At=>Dd(Object.freeze({...Yn(At,t,ce),paragraphId:l}),qt)),sn);de.push({id:o.nextLineId(l,F.start,_),range:{paragraphId:l,start:F.start,end:F.end},spans:$e,...vr.length>0?{drawings:vr}:{},box:{x:t+f.left,y:ce,width:p,height:G?0:F.height},contentX:fd($e,Ce+sn),baseline:G?Math.max(0,Math.min(F.baseline,i?.collapseBandAbove??0)):F.baseline,leading:G?0:F.leading,trailingSpacing:G?0:F.trailingSpacing,...F.manualBreakAfter?{manualBreakAfter:true}:{},...F.deletedRanges?{deletedRanges:F.deletedRanges}:{},...F.anchorRevisions?{anchorRevisions:F.anchorRevisions}:{}}),G||(ce+=F.height),Pe=_+1,Ie=true;}if(!Ie)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:R,complete:false,fitted:false};let oe=Pe>=$.length,ke=de[0].box.y,xe=ce,Re=[],Me,Be=ke,he=xe,ye=y.left?nn(y.left):0,It=y.right?nn(y.right):0,Vt=y.left?ue-y.left.spacePt-ye:ue,ar=y.right?ue+p+y.right.spacePt+It:ue+p,Dt=Math.max(ar-Vt,0);if(pe>0&&P){let _=nn(P),F=ke-P.spacePt-_;Re.push({side:"top",edge:P,box:{x:Vt,y:F,width:Dt,height:_}}),Be=F;}if(oe&&K&&C&&!G){let _=nn(C),F=xe+C.spacePt,q={x:Vt,y:F,width:Dt,height:_};I||(Me={edge:C,box:q}),Re.push({side:I?"between":"bottom",edge:C,box:q}),he=F+_;}let We=oe&&U&&!G?b.after:0,Ue=v&&R===0?r:Be,bt=I&&oe?he+We:he,an=Math.max(bt-Ue,0);if(y.left&&Re.push({side:"left",edge:y.left,box:{x:ue-y.left.spacePt-ye,y:Ue,width:ye,height:an}}),y.right&&Re.push({side:"right",edge:y.right,box:{x:ue+p+y.right.spacePt,y:Ue,width:It,height:an}}),y.bar){let _=nn(y.bar);Re.push({side:"bar",edge:y.bar,box:{x:ue-y.bar.spacePt-_,y:ke,width:_,height:Math.max(xe-ke,0)}});}let Et=he+We,Mn=O===void 0?void 0:y.left||y.right?{x:Vt,y:Be,width:Dt,height:Math.max(he-Be,0)}:Ds(de,ue,p),ln=oe&&o.displayMode==="all-markup"?rd(e,"all-markup",o.revisionAuthorFilter):null,io=ln?.revisions??[],kr=ln?.formatRevision??null,Nt=R===0?wc(d,o.measurer,de[0]?{y:de[0].box.y,height:de[0].box.height}:void 0,t,S?f.left+p+f.right:void 0):void 0,yn=jr(e),Ge=yn?cd(de,Ha(yn)):de,Bn={kind:"paragraph",id:`${l}#f${Y}`,...oe?{paragraphEnd:true}:{},paragraphId:l,fragmentIndex:Y,range:{paragraphId:l,start:Ge[0].range.start,end:Ge[Ge.length-1].range.end},props:u,styleId:g,outlineLevel:h,alignment:m,spacing:{before:ne,after:We},indent:f,tabStops:E,...Me?{bottomBorder:Me}:{},...Re.length>0?{borders:Re}:{},...O===void 0?{}:{shading:O},...Mn===void 0?{}:{shadingBox:Mn},...Nt?{marker:Nt}:{},...od(io,kr),lines:Ge,...xc(Ge,c.markRunProperties,o.styleCascade?.themeFonts),box:{x:ue,y:r,width:p,height:Et-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let _=Object.freeze({x:t,y:r,width:n,height:Math.max(0,X-r)}),F=Bn.box,q={paragraph:e,paragraphId:l,paragraphBox:F,lines:Ge};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...q,cellOriginX:t,cellContentWidth:n}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(Gr({paragraph:e,paragraphId:l,paragraphBox:F,lines:Ge,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(F)??F,cellBox:_,pageClip:o.pageContentClip(),measurer:o.measurer,...o.hostedStory?{layoutTextboxStory:o.hostedStory.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{},...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{}}));}return {fragment:Bn,bottom:Et,spaceAfter:We,nextLineIndex:Pe,complete:oe,fitted:true}}function qo(e,t,n,r,o,a){let i=UP(e,t,n,r,Number.POSITIVE_INFINITY,o,a,{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false});return {blocks:i.blocks,bottom:i.bottom}}function UP(e,t,n,r,o,a,i,l,s,d=false){let c=[],u=r,f=l.previousSpaceAfter,p=l.blockIndex,m=l.lineIndex,g=l.paragraphFragmentIndex,h=false,b=false,x=l.precededByEmittedTable;for(;p<e.length;){let y=e[p];if(y.kind==="table"){m!==0&&(m=0),f=0;let T=gM(y,t,n,u,a+1,i);if(!T){x=false,p+=1;continue}if(T.bottom>o+.001){b=!h;break}c.push(T.fragment),u=T.bottom,h=true,x=true,p+=1,m=0;continue}if(y.kind!=="paragraph"){x=false,p+=1,m=0;continue}let O=d&&p===e.length-1&&x&&ES(y),S=mM(y,t,Math.max(1,n-t),u,i,f,{lineStart:m,fragmentIndex:g,maxBottom:o,includeAfter:true,includeBottomBorder:true,collapseHeight:O,collapseBandAbove:u-r,...s?{tableCellStyle:s}:{},borderNeighbours:{previous:p>0?e[p-1]:void 0,next:e[p+1]}});if(!S.fitted||!S.fragment)break;if(c.push(S.fragment),u=S.bottom,h=true,S.complete)f=S.spaceAfter,x=false,p+=1,m=0,g=0;else return {blocks:c,bottom:u,cursor:{blockIndex:p,lineIndex:S.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:g+1,precededByEmittedTable:x},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:c,bottom:u,cursor:{blockIndex:p,lineIndex:m,previousSpaceAfter:f,paragraphFragmentIndex:g,precededByEmittedTable:x},complete:p>=e.length,fitted:h,nestedSplitBlocked:b}}function or(e,t,n,r,o,a,i,l=0,s,d=Number.POSITIVE_INFINITY){return Dl(e,t,n,r,Number.POSITIVE_INFINITY,o,false,a,i,$m(e),l,s,d)}function Dl(e,t,n,r,o,a,i,l,s,d,c=0,u,f=o){let p=u?.detachedSpanHeightPtByCellId,m=Al(t,0,t.length),g=Number.isFinite(c)&&c>0?c/2:0,h=s.measurer.lineMetrics(wn).height,b=e.height,x=b.rule==="exact"?b.valuePt:void 0,y=b.rule==="atLeast"?b.valuePt:void 0,O=[],{rowDeps:S,flushDeferred:T}=AP(s,O),k=a&&s.pageOccurrenceKey?{...S,nextLineId:(M,B,N)=>S.nextLineId(M,B,N,s.pageOccurrenceKey())}:S,w=x===void 0?o:Math.min(o,r+Math.max(0,x)),v=[],I=false,P=false,C=r;for(let M=0;M<e.cells.length;M+=1){let B=e.cells[M],N=d[M]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false},A=B.gridSpan,H=B.gridColumn,$=n+Al(t,0,H),R=Al(t,H,Math.min(H+A,t.length))||m,Y=Math.min(g,Math.max((R-YP)/2,0)),X=$+Y,U=Math.max(R-2*Y,YP),K=s.cellContentInsets?.get(B.id)??eo(B.margins,B.borders,B.legacyContentAlignment===true&&c===0),Q=i?Sr(B.borders.top):K.top,G=p?.get(B.id),ne=G!==void 0,ue=ne?Math.min(f,r+G):w,pe=B.textDirection==="btLr",de=pe?X+K.bottom:X+K.left,ce=pe?X+Math.max(0,ue-r)-Q:X+U-K.right,Pe=pe?r+K.left:r+Q,Ie=pe?r+U-K.right:ue-K.bottom,oe=[],ke=Pe,xe=N,Re=true,Me=false,Be=false;if(!B.vMergeContinue)if(Ie<Pe+.001)Re=N.blockIndex>=B.blocks.length;else {let ye=UP(B.blocks,de,ce,Pe,Ie,l,k,N,B.styleFormatting,true);oe=ye.blocks,ke=ye.bottom,xe=ye.cursor,Re=ye.complete,Me=ye.fitted,Be=ye.nestedSplitBlocked,Me&&(I=true),Be&&(P=true);}let he=Math.min(ue,pe&&Me?r+Q+(nP(oe,de)-de)+K.bottom:Me?ke+K.bottom:r+Q+h+K.bottom);he>C&&!ne&&(C=he),v.push({cell:B,x:X,width:U,gridColumn:H,blocks:oe,contentTop:Pe,contentBottom:ke,physicalBottom:he,insets:{...K,top:Q},nextCursor:xe,complete:B.vMergeContinue?true:Re,fitted:Me,nestedSplitBlocked:Be});}C=Math.min(w,Math.max(C,r));for(let M of v){if(p?.has(M.cell.id)===true)continue;let B=M.physicalBottom;B>C&&B<=w+.001&&(C=B);}if(C<=r+.001&&v.length>0){let M=r;for(let B of v){let N=r+B.insets.top+h+B.insets.bottom;N>M&&(M=N);}C=Math.min(w,M);}C=Math.min(w,C);let E=false;if(x!==void 0){let M=r+x;M<=o+.001?(C=M,E=true):C=Math.min(o,C);}else {let M=i?0:u?.heightFloorPt??0,B=r+Math.max(y??0,M);B>C&&B<=o+.001&&v.every(A=>A.complete)&&(C=B);}C=Math.min(o,C);let D=Math.max(0,C-r),z=v.map(M=>{let B=M.blocks,N=E?true:M.complete;if(!M.cell.vMergeContinue&&N&&M.cell.vAlign!=="top"&&B.length>0){let A=M.contentBottom-M.contentTop,H=M.cell.textDirection==="btLr"?M.width-M.insets.left-M.insets.right-A:D-M.insets.top-M.insets.bottom-A;if(H>0){let $=M.cell.vAlign==="center"?H/2:H;B=xi(B,$);}}return {id:M.cell.id,gridColumn:M.gridColumn,...M.cell.logicalGridColumn===void 0?{}:{logicalGridColumn:M.cell.logicalGridColumn},...M.cell.gridColumnId?{gridColumnId:M.cell.gridColumnId}:{},gridSpan:M.cell.gridSpan,vMergeContinue:M.cell.vMergeContinue,...M.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...M.cell.shading===void 0?{}:{shading:M.cell.shading},...M.cell.textDirection==="btLr"?{textDirection:"btLr"}:{},blocks:B,box:{x:M.x,y:r,width:M.width,height:D}}}),W=E||v.every(M=>M.complete)?null:v.map(M=>M.nextCursor),j=E||v.every(M=>M.complete);return T(z,r,D),{record:{id:e.id,...e.revisionKind?{revisionKind:e.revisionKind}:{},...e.revisionId!==void 0?{revisionId:e.revisionId}:{},...e.revisionAuthor!==void 0?{revisionAuthor:e.revisionAuthor}:{},...e.revisionDate!==void 0?{revisionDate:e.revisionDate}:{},rowIndex:0,isHeaderRow:e.isHeader,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:z,box:{x:n,y:r,width:m,height:D}},bottom:C,remainder:j?null:W,fitted:I||e.cells.every(M=>M.vMergeContinue)||E,nestedSplitBlocked:P}}function Km(e,t,n,r,o,a=0,i,l){let s=0,d=l!==void 0,c={...nr(o),...d?{}:{pageExclusionZones:void 0},nextLineId:()=>`probe-${s++}`};return or(e,t,n,l??0,false,r,c,a,i).record.box.height}function pM(e,t,n,r,o,a,i,l,s){let d=u=>or(e,t.columnWidthsPt,n,r,i,o,a,t.cellSpacingPt,u),c=d(l);return c.remainder===null||l===void 0?c:(s(),d(void 0))}var Xm=(e,t,n,r,o)=>r.measuringOnly===true?null:KP(o?{...e,rows:o}:e,t,n,r,Km);function gM(e,t,n,r,o,a){if(o>=Om)return null;let i=Math.max(1,n-t),l=Wt(e,i,o-(a.tableNestingOffset??0),a.styleCascade,a.displayMode,a.revisionAuthorFilter,a.compatibilityMode);if(!l||l.rows.length===0)return null;let s=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:b=>{s.push(b);}},c=t+Il(l,i),u=Xm(l,c,o,d),f=[],p=r;for(let[b,x]of l.rows.entries()){let y=s.length,O=pM(x,l,c,p,o,d,false,XP(u,b,p),()=>{s.length=y,u?.withdrawAt(b);});f.push(O.record),p=O.bottom;}let m=Si(f,l,l.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let b of s)for(let x of m)if(x.cells.some(O=>O.blocks.some(S=>S.kind==="paragraph"&&S.paragraphId===b.paragraphId))){_m([b],x.cells,x.box.y,x.box.height,a);break}let g=Al(l.columnWidthsPt,0,l.columnWidthsPt.length),h=new Map;return {fragment:Nl({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:m,box:{x:c,y:r,width:g,height:p-r}},l.columnWidthsPt,o,h),bottom:p}}function _l(e,t,n,r,o,a,i,l=()=>false){let s=[],d=n;for(let p of e.rows){let m=or(p,e.columnWidthsPt,t,d,l(p),a,i,e.cellSpacingPt);s.push(m.record),d=m.bottom;}let c=Si(s,e,e.rows,i.borderOwnershipBudget,i.vMergeResolveBudget),u=Al(e.columnWidthsPt,0,e.columnWidthsPt.length),f=new Map;return {fragment:Nl({kind:"table",id:`${o}#f${r}`,tableId:o,fragmentIndex:r,rows:c,box:{x:t,y:n,width:u,height:d-n}},e.columnWidthsPt,a,f),bottom:d}}var qP=new WeakMap,hM=0;function ZP(e){let t=qP.get(e.content);return t===void 0&&(t=++hM,qP.set(e.content,t)),J([String(t),e.contentNodeId,String(e.insetsEmu.top),String(e.insetsEmu.right),String(e.insetsEmu.bottom),String(e.insetsEmu.left),e.verticalAnchor,e.autofit,e.fillHex??"",e.strokeHex??"",String(e.strokeWidthEmu)])}function JP(e){let t=e.picture;return t?.embeddedRelationshipId?`embed:${e.ownerPartName}:${t.embeddedRelationshipId}`:t?.linkedRelationshipId?`link:${e.ownerPartName}:${t.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var QP=new WeakMap,Ym=new Map,yM=16,bM=32;function oR(e,t){let n=QP.get(e);if(n)return n;let r;if(e.kind==="drawing"||hb$1(e)||Sa(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:Ym,visited:1,deepest:0};else if((t<2||e.children.length>=yM)&&t<bM){let o=null,a=1,i=0;for(let l of e.children){let s=oR(l,t+1);if(a+=s.visited,s.deepest+1>i&&(i=s.deepest+1),s.atoms.size>0){o||(o=new Map);for(let[d,c]of s.atoms)o.set(d,c);}}r={atoms:o??Ym,visited:a,deepest:i};}else {let o=new Map,a=0,i=0,l=[{node:e,depth:0}];for(;l.length>0;){let s=l.pop();if(a+=1,a>fb$1)break;s.depth>i&&(i=s.depth);let d=s.node;if(d.kind==="drawing"||hb$1(d)||Sa(d)){o.set(d.id,d);continue}if("children"in d)for(let c=d.children.length-1;c>=0;c-=1)l.push({node:d.children[c],depth:s.depth+1});}r={atoms:o.size>0?o:Ym,visited:a,deepest:i};}return QP.set(e,r),r}function Um(e){let t=oR(e.root,0);return t.visited>fb$1||t.deepest>db$1.maxDrawingDepth?null:t.atoms}var eR=new WeakMap;function aR(e,t){let n=eR.get(e.root),r=n?.get(t);if(r)return r;let o=Um(e),a=new Map,i=0;if(o)for(let l of o.keys()){let s=t.projectionForAtom?.(l)?.drawingNodeId??l;a.set(s,i),i+=1;}else for(let l of mb$1(e))a.set(l.drawingNodeId,i),i+=1;return n||(n=new WeakMap,eR.set(e.root,n)),n.set(t,a),a}var qm=new Float64Array(1),Ic=new Uint32Array(qm.buffer);function xM(e){Cn[0]=2166136261,Cn[1]=268435859;let t=[];for(let n of e.components){t.push(n.fillHex??"",String(n.fillAlpha),n.strokeHex??"",String(n.strokeAlpha),String(n.strokeWidthEmu),String(n.subpathsEmu.length));let r=n.subpathsEmu;for(let a=0;a<r.length;a+=1){let i=r[a];t.push(String(i.length),n.subpathsClosed?.[a]===false?"0":"1"),Zm(i,Cn);}let o=n.arrowheadsEmu;if(t.push(String(o?.length??0)),o)for(let a of o)t.push(String(a.length)),Zm(a,Cn);}return [String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.components.length),t.join(","),Cn[0].toString(36),Cn[1].toString(36)].join(";")}var Cn=new Uint32Array(2);function SM(e){return Cn[0]=2166136261,Cn[1]=268435859,Zm(e,Cn),`${Cn[0].toString(36)}:${Cn[1].toString(36)}`}function Zm(e,t){let n=t[0],r=t[1];for(let o of e)qm[0]=o.x,n=Math.imul(n^Ic[0],16777619),r=Math.imul(r^Ic[1],16777651),qm[0]=o.y,n=Math.imul(n^Ic[1],16777619),r=Math.imul(r^Ic[0],16777651);t[0]=n,t[1]=r;}function Jm(e){let t=e.position,n=e.anchor,r=e.picture,o=e.wrapGeometry,a=e.vectorShape,i={drawingNodeId:e.drawingNodeId,ownerPartName:e.ownerPartName,kind:e.kind,diagnostics:J(e.diagnostics.map(l=>J([l.code,l.nodeId,l.detail??""]))),relationshipId:e.relationshipId??"",docPrId:String(e.docPrId??""),name:e.name,title:e.title,description:e.description,hyperlinkHref:e.hyperlinkHref??"",hidden:String(e.hidden),extentEmu:J([String(e.extentEmu.cx),String(e.extentEmu.cy)]),effectExtentEmu:J([String(e.effectExtentEmu.top),String(e.effectExtentEmu.right),String(e.effectExtentEmu.bottom),String(e.effectExtentEmu.left)]),inlineDistancesEmu:J([String(e.inlineDistancesEmu.top),String(e.inlineDistancesEmu.right),String(e.inlineDistancesEmu.bottom),String(e.inlineDistancesEmu.left)]),wrap:e.wrap,textboxStory:e.textboxStory?ZP(e.textboxStory):"",compatibilityBranchNodeId:e.compatibilityBranchNodeId??"",anchor:n?J([String(n.simplePos),String(n.relativeHeight),String(n.layoutInCell),String(n.allowOverlap),String(n.behindDocument)]):"",locks:J([String(e.locks.select),String(e.locks.move),String(e.locks.resize),String(e.locks.changeAspect)]),effects:J([String(e.effects.grayscale),String(e.effects.brightness),String(e.effects.contrast),String(e.effects.bilevel??"")]),picture:r?J([String(r.crop.left),String(r.crop.top),String(r.crop.right),String(r.crop.bottom),String(r.transform.rotationDegrees),String(r.transform.flipHorizontal),String(r.transform.flipVertical),String(r.transform.offsetEmu.x),String(r.transform.offsetEmu.y),String(r.transform.extentEmu.cx),String(r.transform.extentEmu.cy),r.embeddedRelationshipId??"",r.linkedRelationshipId??"",r.presetGeometry??"",r.fillMode]):"",legacyGraphic:e.legacyGraphic?JSON.stringify(e.legacyGraphic):"",vectorShape:a?xM(a):"",wrapGeometry:o?J([o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length),SM(o.polygon)]):"",position:t?J([t.horizontal.relativeFrom,t.horizontal.align??"",String(t.horizontal.offsetEmu??""),t.vertical.relativeFrom,t.vertical.align??"",String(t.vertical.offsetEmu??""),String(t.simplePosition.xEmu),String(t.simplePosition.yEmu)]):""};return J(Object.values(i))}function jl(e){switch(e.kind){case "ready":return J(["ready",e.resourceKey,e.contentId,`${e.pixelWidth}x${e.pixelHeight}`]);case "pending":return J(["pending",e.resourceKey]);case "external":return J(["external",e.relationshipId,e.sinkSafe?"1":"0"]);case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}var PM=1;function iR(e,t){if(e.kind==="paragraph"){for(let n of lR(e))t.push(n);return}if("children"in e)for(let n of e.children)iR(n,t);}function lR(e){if(e.kind!=="paragraph")return [];let t=[];return Nd(e,n=>t.push(n.id)),Object.freeze(t)}function RM(e){let{ownerPartName:t,part:n,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,m=new WeakMap,g=0,h=gb$1(r,t),b=bb$1(r),x=nb$1(n,{resolveRelationship:h,resolveSchemeColor:b.resolveSchemeColor,resolveStyleMatrixReference:b.resolveStyleMatrixReference}),y=Um(n),O=(I,P)=>{if(s||u.has(P))return;u.add(P);let C=d;o.resolveForProjection(I).then(E=>{s||C!==d||(c.set(P,E),E.kind==="ready"&&i(E.validatedHandle),g+=1,f.set(P,g),u.delete(P),a(t));}).catch(()=>{s||C!==d||(c.set(P,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(P,g),u.delete(P),a(t));});},S=I=>{let P=JP(I),C=c.get(P);if(C)return C;let E=I.picture?.linkedRelationshipId;if(E){let z=o.resolveLinked(t,E);return c.set(P,z),g+=1,f.set(P,g),z}let D=Object.freeze({kind:"pending",resourceKey:P});return c.set(P,D),g+=1,f.set(P,g),O(I,P),D},T=I=>x.get(I)??null,k=Object.freeze({ownerPartName:t,projectionForAtom:T,project:I=>T(I.id),resourceOf:S}),w=I=>{let P=m.get(I);if(P)return P;let C=lR(I),E=null,D=(W,j)=>{if(!(j>=PM))for(let M of W){let B=x.get(M)?.textboxStory;if(!B)continue;let N=[];if(iR(B.content,N),N.length!==0){E||(E=[...C]);for(let A of N)E.push(A);D(N,j+1);}}};D(C,0);let z=E??C;return m.set(I,z),z};return {context:k,cacheTokenForPart:()=>`${t}|${g}|${d}|${x.size}`,drawingTokenForParagraph:I=>{let P=p.get(I);if(P?.resourceEpoch===g)return P.token;let C=w(I);if(C.length===0)return p.set(I,{resourceEpoch:g,token:""}),"";let E=C.map(z=>wM(x.get(z)??null,z,S,W=>f.get(JP(W))??0)).sort(),D=J(E);return p.set(I,{resourceEpoch:g,token:D}),D},pendingResourceCount:()=>u.size,isCompatibleWith:(I,P)=>{let C=bb$1(P);if(C.cacheToken!==b.cacheToken)return false;if(I===n)return true;let E=Um(I);if(y&&E&&y.size===E.size){let z=true;for(let[W,j]of y)if(E.get(W)!==j){z=false;break}if(z)return true}let D=nb$1(I,{resolveRelationship:gb$1(P,t),resolveSchemeColor:C.resolveSchemeColor,resolveStyleMatrixReference:C.resolveStyleMatrixReference});if(D.size!==x.size)return false;for(let[z,W]of x){let j=D.get(z);if(!j||Jm(j)!==Jm(W))return false}return true},dispose:()=>{s=true,d+=1;for(let I of c.values())I.kind==="ready"&&l(I.validatedHandle);c.clear(),u.clear(),f.clear();}}}var tR=0;function DV(e){let t=e.session.packageRevision(),n=e.session.currentPackage(),r=e.resourceLookup??Bb$1(n,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new WeakMap,l=new Map,s=new Map,d=m=>{l.set(m.resourceKey,m);let g=pb$1(m);g&&s.set(m.resourceKey,g);},c=m=>{l.delete(m.resourceKey);let g=s.get(m.resourceKey);g&&(qb$1(g),s.delete(m.resourceKey));},u=(m,g)=>{let b=g.currentPackage().parts.get(m)??a.get(m);if(b)return b;if(m===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${m}`)},f=(m,g)=>{let h=o.get(m);if(h)return h;let b=u(m,g);a.set(m,b);let x=RM({ownerPartName:m,part:b,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:d,forgetReadyHandle:c});return o.set(m,x),tR+=1,i.set(x,tR),x},p=m=>{let g=m.currentPackage();if(g.partBytes===n.partBytes&&g.relationships===n.relationships&&g.contentTypes===n.contentTypes){for(let[b,x]of o){let y=g.parts.get(b)??(b===m.part().name?m.part():void 0);if(y&&x.isCompatibleWith(y,g)){a.set(b,y);continue}x.dispose(),o.delete(b),a.delete(b);}t=m.packageRevision(),n=g;return}for(let b of o.values())b.dispose();o.clear(),a.clear();for(let b of s.values())qb$1(b);s.clear(),l.clear(),e.resourceLookup||r.dispose(),t=m.packageRevision(),n=g,r=e.resourceLookup??Bb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return f(e.session.part().name,e.session).context},contextForPart(m){return f(m,e.session).context},cacheTokenForPart(m){let g=f(m,e.session);return `${i.get(g)??0}|${g.cacheTokenForPart()}`},drawingTokenForParagraph(m,g){let h=f(g,e.session);return `${i.get(h)??0}|${h.drawingTokenForParagraph(m)}`},pendingResourceCount(){let m=0;for(let g of o.values())m+=g.pendingResourceCount();return m},mintValidatedBytes(m,g){return l.get(m.resourceKey)!==m?null:ob$1(m,g)},sync(m){m.packageRevision()===t&&m.currentPackage()===n||p(m);},dispose(){for(let m of o.values())m.dispose();o.clear(),a.clear();for(let m of s.values())qb$1(m);s.clear(),l.clear(),e.resourceLookup||r.dispose();}})}function wM(e,t,n,r){if(!e)return J([t,"refused"]);let o=[t,Jm(e),jl(n(e))];return r&&o.push(String(r(e))),J(o)}function sR(e,t,n){if(t===void 0)return rR(e,n);let r=nR.get(e);if(r&&r.epoch===t)return r.token;let o=rR(e,n);return nR.set(e,{epoch:t,token:o}),o}var nR=new WeakMap;function rR(e,t){return Bo(e,t)}var kM=4,Qm=256;function vM(e){return `txbx-${e}`}var dR=new WeakMap;function pR(e,t,n,r="all-markup",o){if(!t||t.nums.size===0)return;let a=dR.get(e);if(a&&a.rawIndex===t&&a.styleCascade===n&&a.displayMode===r&&a.authorFilter===o)return a.listItems;let i=qd(t,n),l=sm(e,r,o),s=Xf(l,i,n),d=s.size>0?s:void 0;return dR.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,listItems:d}),d}var gR=2e4,ep=Object.freeze({contents:Object.freeze([]),truncated:false}),Hl=new WeakMap;function TM(e){let t=[],n=0,r=false,o=[e];for(;o.length>0;){let a=o.pop();if(n+=1,n>gR){r=true;break}if(a.kind!=="textValue"&&a.localName==="txbxContent"){t.push(a);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}return t.length>0||r?Object.freeze({contents:Object.freeze(t),truncated:r}):ep}function IM(e){let t=Hl.get(e);if(t)return t;if(e.kind!=="table"){let l=TM(e);return Hl.set(e,l),l}let n=[],r=0,o=false,a=[{phase:"enter",node:e,paragraphOwners:[]}];for(;a.length>0;){let l=a.pop();if(l.phase==="exit-paragraph"){Hl.has(l.scan.paragraph)||Hl.set(l.scan.paragraph,l.scan.contents.length>0?Object.freeze({contents:Object.freeze(l.scan.contents),truncated:false}):ep);continue}let s=l.node;if(r+=1,r>gR){o=true;break}if(s.kind!=="textValue"&&s.localName==="txbxContent"){n.push(s);for(let c of l.paragraphOwners)c.contents.push(s);continue}if(!("children"in s))continue;let d=l.paragraphOwners;if(s.kind==="paragraph"){let c={paragraph:s,contents:[]};d=Object.freeze([...d,c]),a.push({phase:"exit-paragraph",scan:c});}for(let c=s.children.length-1;c>=0;c-=1)a.push({phase:"enter",node:s.children[c],paragraphOwners:d});}let i=n.length>0||o?Object.freeze({contents:Object.freeze(n),truncated:o}):ep;return Hl.set(e,i),i}var cR=1,uR=new WeakMap;function OM(e){let t=uR.get(e);return t===void 0&&(t=cR,cR+=1,uR.set(e,t)),t}var fR=new WeakMap;function FM(e,t,n,r="all-markup",o){if(t.nums.size===0)return "";let a=IM(e);if(a.contents.length===0&&!a.truncated)return "";let i=fR.get(e);if(i&&i.rawIndex===t&&i.styleCascade===n&&i.displayMode===r&&i.authorFilter===o)return i.token;let l=[];for(let d of a.contents){let c=pR(d,t,n,r,o);if(c)for(let[u,f]of c)l.push(J([u,f.cacheToken]));}a.truncated&&l.push(`truncated:${OM(t)}`);let s=l.length===0?"":`|txbxlist:${J(l)}`;return fR.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,token:s}),s}function Oc(e,t,n,r,o){return Object.freeze({layoutTextboxStoryFor:e,hostedListTokenForParagraph:!t||t.nums.size===0?null:a=>FM(a,t,n,r,o)})}function Fc(e,t){let n=e.textboxStory;if(!n)return null;let r=Tt(e.extentEmu.cx),o=Tt(e.extentEmu.cy),a=Tt(n.insetsEmu.left),i=Tt(n.insetsEmu.right),l=Tt(n.insetsEmu.top),s=Tt(n.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-l-s),u=Tt(n.strokeWidthEmu),f={fillHex:n.fillHex,strokeHex:n.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((t.depth??0)>=kM)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:l},...f,fallbackReason:"textbox-nesting-limit"};let m=sm(n.content,t.displayMode,t.revisionAuthorFilter),g=pR(n.content,t.numberingIndex,t.styleCascade,t.displayMode,t.revisionAuthorFilter),h=vM(e.drawingNodeId),b=0,x=qo(m,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${h}-line-${b++}`,styleCascade:t.styleCascade,...g?{listItems:g}:{},...t.pageContext?{pageContext:t.pageContext}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},compatibilityMode:t.compatibilityMode,tableNestingOffset:1,...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{},...t.displayMode?{displayMode:t.displayMode}:{},...t.revisionAuthorFilter?{revisionAuthorFilter:t.revisionAuthorFilter}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:{},...t.projectionTokenForParagraph?{projectionTokenForParagraph:t.projectionTokenForParagraph}:{},...t.projectionTokenForTable?{projectionTokenForTable:t.projectionTokenForTable}:{}}),y=x.blocks,O=x.bottom,S,T=[];if(y.length>Qm){mR(y.slice(Qm),T),y=y.slice(0,Qm);let v=y[y.length-1];O=v?v.box.y+v.box.height:0,S="textbox-fragment-limit";}if(O>c+.001){let v=y.filter(I=>I.box.y<c-.001);v.length<y.length&&(mR(y.filter(I=>I.box.y>=c-.001),T),y=v,S=S??"textbox-height-clip");}let k=Math.max(0,c-O),w=n.verticalAnchor==="center"?k/2:n.verticalAnchor==="bottom"?k:0;return {fragments:y,flowHeight:O,contentOffset:{x:a,y:l+w},...f,...S?{fallbackReason:S}:{},...T.length>0?{clippedResourceToken:J(T)}:{}}}function mR(e,t){Ia({fragments:e},n=>{t.push(jl(n.resource));});}function Zo(e,t){return t===0?e:{...e,box:{...e.box,y:e.box.y+t},...e.shadingBox?{shadingBox:{...e.shadingBox,y:e.shadingBox.y+t}}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:{...e.bottomBorder.box,y:e.bottomBorder.box.y+t}}}:{},...e.borders?{borders:e.borders.map(n=>({...n,box:{...n.box,y:n.box.y+t}}))}:{},...e.marker?{marker:{...e.marker,box:{...e.marker.box,y:e.marker.box.y+t}}}:{},lines:e.lines.map(n=>({...n,box:{...n.box,y:n.box.y+t},spans:n.spans.map(r=>({...r,box:{...r.box,y:r.box.y+t}}))}))}}function tp(e,t){return t===0?[...e]:e.map(n=>n.kind==="paragraph"?Zo(n,t):{...n,box:{...n.box,y:n.box.y+t}})}function zl(e){let t=0;for(let n of e)kn(n)||(t=Math.max(t,n.box.y+n.box.height));return t}function Wl(e){let t=0;for(let n of e.fragments)t=Math.max(t,np(n));return t}function np(e){if(kn(e))return 0;let t=e.kind==="paragraph"?e.spacing.after:0;return e.box.y+e.box.height-t}function Cc(e){let t=Number.POSITIVE_INFINITY;for(let n of e.fragments){if(kn(n))continue;let r=n.kind==="paragraph"?n.lines[0]?.box.y??n.box.y:n.box.y;t=Math.min(t,r);}return Number.isFinite(t)?t:0}var hR=new WeakMap;function Vl(e,t){let n=hR.get(e.fragments);n||(n=new WeakMap,hR.set(e.fragments,n));let r=n.get(t);if(r)return r;let o=CM(e,t);return n.set(t,o),o}function CM(e,t){let n=0,r=0,o=0,a=false;for(let d of e.fragments){if(d.kind==="paragraph"){if(!mr(d,t.paragraphId,t.atomOffset))continue;let c=MM(d,t),u=c?.top??d.box.y,f=c?.bottom??d.box.y+d.box.height;f>r&&(n=u,r=f,o=d.box.y,a=c!==null&&!kn(d));continue}if(BM(d,[t])){let c=d.box.y+d.box.height;c>r&&(n=d.box.y,r=c,a=false);}}let i=d=>Math.min(Math.max(0,d),e.contentBox.height),l=i(n),s=i(r);return {top:l,bottom:s,blockTop:i(o),evictable:a&&s>l}}function MM(e,t){for(let n of e.lines)for(let r of yt(n))if(zh(r,t.paragraphId,t.atomOffset))return {top:n.box.y,bottom:n.box.y+n.box.height};return null}function BM(e,t){let n=r=>{for(let o of r){if(o.kind==="paragraph"){for(let a of t)if(mr(o,a.paragraphId,a.atomOffset))return true;continue}for(let a of o.rows)if(!a.isHeaderRepeat){for(let i of a.cells)if(n(i.blocks))return true}}return false};for(let r of e.rows)if(!r.isHeaderRepeat){for(let o of r.cells)if(n(o.blocks))return true}return false}function rp(e){if(e.footnotes===void 0&&e.endnotes===void 0&&e.noteStream===void 0)return e;let{footnotes:t,endnotes:n,noteStream:r,...o}=e;return o}var op=e=>e.kind!=="textValue",Rr=(e,t)=>op(e)&&e.namespaceUri===da&&e.localName===t,yR=e=>e.children.filter(op),LM=(e,t)=>{let n=e.attributes.filter(r=>r.localName===t);return n.length===1&&n[0].namespaceUri===da?n[0].value:void 0};function Gl(e,{leadingTab:t=false,allowDecoration:n=false}={}){let r=0,o="",a="",i="",l=0;for(let s of yR(e))if(!Rr(s,"pPr")){if(!Rr(s,"r"))return;for(let d of yR(s)){if(Rr(d,"rPr"))continue;if(Rr(d,"tab")&&r===0&&!a&&!l&&t&&!d.children.length){l++;continue}if(Rr(d,"fldChar")&&!d.children.length){let u=LM(d,"fldCharType");if(r===0&&u==="begin")r=1;else if(r===1&&u==="separate"&&Er(o)==="PAGE")r=2;else if(r===2&&u==="end")r=3;else return;continue}if(d.children.some(op))return;let c=d.children.map(u=>u.kind==="textValue"?u.value:"").join("");if(Rr(d,"instrText")&&r===1)o+=c;else if(n&&Rr(d,"t")&&r===0)a+=c;else if(n&&Rr(d,"t")&&r===3)i+=c;else if(!(Rr(d,"t")&&r===2&&/^\d*$/.test(c)))return}}return r===3&&Er(o)==="PAGE"&&l===Number(t)&&(!a&&!i||a==="- "&&i===" -")?a+i:void 0}var ip=31680/20,PR=e=>e.kind!=="textValue",Jo=(e,t)=>PR(e)&&e.namespaceUri===da&&e.localName===t,Ri=e=>e.children.filter(PR),Pi=(e,t)=>{let n=e.attributes.filter(r=>r.localName===t);return n.length===1&&n[0].namespaceUri===da?n[0].value:void 0};function ap(e,t){let n=Ri(e).filter(r=>r.localName===t);return n.length===1&&Jo(n[0],t)?n[0]:void 0}function bR(e){if(e===void 0||!/^\d{1,5}$/.test(e))return;let t=Number(e)/20;return t<=ip?t:void 0}function xR(e){return e.kind==="paragraph"&&e.lines.length===1&&!e.marker&&!e.borders?.length&&!e.shading&&!e.lines[0].drawings?.length&&e.spacing.before===0&&e.spacing.after===0&&e.indent.left===0&&e.indent.firstLine===0&&e.indent.hanging===0}function EM(e,t){return t.lines[0].spans.length===0&&Ri(e).every(n=>Jo(n,"pPr")||Jo(n,"r")&&Ri(n).every(r=>Jo(r,"rPr")))}function SR(e,t){let n=new Set(["pStyle","tabs","jc","rPr","ind","spacing","widowControl","contextualSpacing","snapToGrid",...t?["framePr"]:[]]);return e.props.length<=64&&e.props.every(r=>n.has(r.localName))&&e.props.filter(r=>r.localName==="framePr").length===Number(t)}function RR(e,t,n){if(!n||!Jo(e.root,"ftr")||t.blocks.length!==2||!Number.isFinite(n.pageWidth)||n.pageWidth<=0||n.pageWidth>ip||!Number.isFinite(n.marginLeft)||n.marginLeft<0||n.marginLeft>n.pageWidth)return t;let r=Ri(e.root),[o,a]=t.blocks;if(r.length!==2||r.some(S=>S.kind!=="paragraph")||!o||!a||!xR(o)||!xR(a)||!SR(o,true)||!SR(a,false)||o.paragraphId!==r[0].id||a.paragraphId!==r[1].id||o.alignment!=="left"||o.indent.right!==0||a.indent.right<0||a.indent.right>ip)return t;let i=ap(r[0],"pPr"),l=ap(r[1],"pPr");if(!i||!l||Ri(i).some(S=>!["framePr","pStyle","tabs","jc","rPr"].some(T=>Jo(S,T)))||Ri(l).some(S=>!["pStyle","jc","ind","rPr"].some(T=>Jo(S,T)))||Gl(r[0],{leadingTab:true,allowDecoration:true})===void 0||Gl(r[1],{allowDecoration:true})===void 0&&!EM(r[1],a))return t;let d=ap(i,"framePr"),c=new Set(["w","wrap","vAnchor","hAnchor","x","yAlign"]);if(!d||d.children.length||d.attributes.some(S=>S.namespaceUri!==da||!c.has(S.localName))||Pi(d,"wrap")!=="around"||Pi(d,"vAnchor")!=="text"||Pi(d,"hAnchor")!=="page"||Pi(d,"yAlign")!=="center")return t;let u=bR(Pi(d,"w")),f=bR(Pi(d,"x"));if(u===void 0||u<=0||f===void 0||f+u>n.pageWidth)return t;let p=o.lines[0],m=1/0,g=-1/0;for(let S of p.spans)S.box.width<=0||S.text===" "||S.text.trim()===""||(m=Math.min(m,S.box.x-o.box.x),g=Math.max(g,S.box.x+S.box.width-o.box.x));if(!Number.isFinite(m)||!Number.isFinite(g)||m<0||!(g<=u||m>=u))return t;let h=Zo(a,-a.box.y),b=(a.box.height-o.box.height)/2;if(b<0)return t;let x=Zo(o,b-o.box.y),y=f-n.marginLeft-o.box.x,O={...x,clipToBox:true,box:{...x.box,x:o.box.x+y,width:u},lines:x.lines.map(S=>({...S,box:{...S.box,x:S.box.x+y},contentX:S.contentX+y,spans:S.spans.map(T=>({...T,box:{...T.box,x:T.box.x+y}}))}))};return {...t,blocks:[O,h],bottom:h.box.height}}var kR=e=>e.kind!=="textValue",Bt=(e,t)=>kR(e)&&e.namespaceUri===da&&e.localName===t,to=(e,t)=>e.attributes.find(n=>n.namespaceUri===da&&n.localName===t)?.value;function Qo(e){return e.children.filter(kR)}function NM(e){let t=[{node:e.root,depth:0}],n=0;for(;t.length;){let{node:r,depth:o}=t.pop();if(++n>512||o>16)return false;if(r.kind==="textValue"){if(r.value.length>256)return false}else {if(n+t.length+r.children.length>512||r.attributes.length>32||r.attributes.some(a=>a.value.length>1024))return false;for(let a of r.children){if(a.kind==="textValue"&&a.value.trim()&&!Bt(r,"t")&&!Bt(r,"instrText"))return false;t.push({node:a,depth:o+1});}}}return true}function AM(e){let t="";for(let n of e.children){if(n.kind!=="textValue")return null;t+=n.value;}return t}function DM(e){let t=Qo(e.root);if(t.length!==2||t.some(m=>m.kind!=="paragraph"))return null;let[n,r]=t,o=Qo(n).find(m=>Bt(m,"pPr")),a=Qo(r).find(m=>Bt(m,"pPr"));if(!o||!a)return null;let i=Qo(o),l=Qo(a);if(i.filter(m=>Bt(m,"framePr")).length!==1||i.filter(m=>Bt(m,"pStyle")).length!==1||l.filter(m=>Bt(m,"pStyle")).length!==1||i.some(m=>!["pStyle","framePr","jc","rPr"].some(g=>Bt(m,g)))||l.some(m=>!["pStyle","jc","rPr"].some(g=>Bt(m,g))))return null;let s=i.find(m=>Bt(m,"pStyle")),d=l.find(m=>Bt(m,"pStyle")),c=i.find(m=>Bt(m,"framePr"));if(!to(s,"val")||to(s,"val")!==to(d,"val"))return null;let u="";for(let m of Qo(r))if(!Bt(m,"pPr")){if(!Bt(m,"r"))return null;for(let g of Qo(m)){if(Bt(g,"rPr"))continue;if(!Bt(g,"t"))return null;let h=AM(g);if(h===null)return null;u+=h;}}if(u&&!/^· {1,15}·$/.test(u))return null;let f=new Set(["wrap","vAnchor","hAnchor","xAlign","y"]);if(c.children.length||c.attributes.some(m=>m.namespaceUri!==da||!f.has(m.localName))||to(c,"wrap")!=="around"||to(c,"vAnchor")!=="text"||to(c,"hAnchor")!=="margin"||to(c,"xAlign")!=="center")return null;let p=to(c,"y")??"0";return !["0","1"].includes(p)||Gl(n)!==""?null:{first:n.id,empty:r.id,y:Number(p)/20,decoration:u}}function wR(e){return e.kind==="paragraph"&&e.lines.length===1&&!e.marker&&!e.borders?.length&&!e.shading&&!e.lines[0].drawings?.length&&e.spacing.before===0&&e.spacing.after===0&&Object.values(e.indent).every(t=>t===0)}function vR(e,t,n,r){if(!Bt(e.root,"ftr")||!NM(e))return t;let o=DM(e);if(!o)return RR(e,t,r);if(t.blocks.length!==2)return t;let[a,i]=t.blocks;if(!a||!i||!wR(a)||!wR(i)||a.paragraphId!==o.first||i.paragraphId!==o.empty||(o.decoration?i.alignment!=="center"||i.lines[0].spans.map(g=>g.text).join("")!==o.decoration:i.lines[0].spans.length>0))return t;let l=Zo(a,o.y-a.box.y),s=Zo(i,-i.box.y),d=l.lines[0],c=d.spans[0]?.box.x??d.contentX,u=d.spans.at(-1),f=u?u.box.x+u.box.width:c,p=(n-(f-c))/2-c,m={...l,alignment:"center",box:{...l.box,x:c+p,width:f-c},lines:[{...d,box:{...d.box,x:c+p,width:f-c},contentX:d.contentX+p,spans:d.spans.map(g=>({...g,box:{...g.box,x:g.box.x+p}}))}]};return {...t,blocks:[m,s],bottom:Math.max(m.box.y+m.box.height,s.box.y+s.box.height)}}var _M=128,TR=new WeakMap;function jM(e){let t=TR.get(e);if(t!==void 0)return t;let n=B(ra$1(e));return TR.set(e,n),n}function HM(e){let t=Math.max(1,Math.floor(e)),n=new Map;return {get(r){let o=n.get(r);if(o!==void 0)return n.delete(r),n.set(r,o),o},set(r,o){for(n.has(r)&&n.delete(r),n.set(r,o);n.size>t;){let a=n.keys().next();if(a.done)break;n.delete(a.value);}},get size(){return n.size}}}function FR(e,t,n,r,o,a,i,l=_M,s,d=_e,c,u,f,p,m,g){let h=g?.revisionAuthorFilter,b=zu(e.root),x=HM(l),y=hn(e,d,h),O=si({numberingIndex:g?.numberingIndex,styleCascade:a},y).listItems,S=jM(e),T,k=w=>{let v=Ar(b)||c?w:void 0,I=v?.pageNumber??p?.pageNumber??1,P=c&&v?.contentInsetTop!==void 0&&v.contentInsetBottom!==void 0&&v.storyTop!==void 0?`|hf:${v.contentInsetTop},${v.contentInsetBottom},${v.storyTop}`:"",C=$u(v,b)+(c?`|pn:${I}`:"")+P;if(C===""){if(T)return T}else {let A=x.get(C);if(A)return A}let E=0,D=[],z=()=>{let A=v?.pageNumber??p?.pageNumber??1,H=p?.pageWidth??t,$=p?.pageHeight??Math.max(1,t),R=p?.marginLeft??0,Y=p?.marginRight??0,X=p?.marginTop??0,U=p?.marginBottom??0,K=Math.max(1,$-X-U),Q=v?.contentInsetTop!==void 0&&v.contentInsetBottom!==void 0&&v.storyTop!==void 0?Object.freeze({top:v.contentInsetTop-v.storyTop,height:Math.max(1,$-v.contentInsetTop-v.contentInsetBottom)}):void 0;return Object.freeze({pageNumber:A,pageWidth:H,pageHeight:$,marginLeft:R,marginRight:Y,marginBottom:U,contentInsetTop:X,contentInsetBottom:U,contentWidth:t,...Q?{verticalMarginFrame:Q}:{},contentHeight:K,contentBandHeight:K,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},j=c?Oc(A=>Fc(A,{measurer:n,producer:r+C+(d===_e?"":`|rev:${d}`)+(h?`|reviewers:${h.cacheKey}`:""),cache:o,styleCascade:a,...v?{pageContext:v}:{},...s!==void 0?{defaultTabStopPt:s}:{},compatibilityMode:g?.compatibilityMode,displayMode:d,...h?{revisionAuthorFilter:h}:{},...m?{documentProperties:m}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},...g?.numberingIndex?{numberingIndex:g.numberingIndex}:{}}),g?.numberingIndex,a,d,h):void 0,M=Object.freeze([]),B;if(c){let A=false;for(let H=0;H<Do;H+=1){D.splice(0,D.length),E=0,B=qo(y,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+C+(d===_e?"":`|rev:${d}`)+(h?`|reviewers:${h.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${E++}`,styleCascade:a,...O?{listItems:O}:{},hostedStory:j,pageContext:v,...s!==void 0?{defaultTabStopPt:s}:{},compatibilityMode:g?.compatibilityMode,tableNestingOffset:1,displayMode:d,...h?{revisionAuthorFilter:h}:{},...m?{documentProperties:m}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},inlineDrawingLayout:c,anchorFrameBase:z,pageContentClip:()=>{let R=z();return v?.storyTop!==void 0?Object.freeze({x:-R.marginLeft,y:-v.storyTop,width:R.pageWidth,height:R.pageHeight}):Ao(R)},collectAnchoredDrawings:R=>{D.push(...R);},columnBoxForParagraph:R=>Object.freeze({x:0,y:R.y,width:t,height:R.height}),pageExclusionZones:()=>M,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});let $=Lf(D,c,0,t);if($.length===0){A=true,M=$;break}if(H>0&&Un(M)===Un($)){A=true,M=$;break}M=$;}if(!A)throw new Ja(`header/footer exclusion reflow did not converge within ${Do} passes`)}else B=qo(y,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+C+(d===_e?"":`|rev:${d}`)+(h?`|reviewers:${h.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${E++}`,styleCascade:a,...O?{listItems:O}:{},pageContext:v,...s!==void 0?{defaultTabStopPt:s}:{},compatibilityMode:g?.compatibilityMode,tableNestingOffset:1,displayMode:d,...h?{revisionAuthorFilter:h}:{},...m?{documentProperties:m}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});B=vR(e,B,t,p);let N={partName:e.name,part:e,contentKey:S,...g?.projectionEpoch?{projectionEpoch:g.projectionEpoch}:{},fragments:B.blocks,flowHeight:B.bottom,pageFieldNeeds:b,...D.length>0?{anchoredDrawings:Object.freeze([...D])}:{},withPageContext:A=>!Ar(b)&&!N.anchoredDrawings?.length?T??N:k(A)};return C===""?T=N:x.set(C,N),N};return k(i)}function ea(e,t,n){let r=n-e.box.y,o=u=>({...u,y:u.y+r}),a=u=>{if(!u)return;let f={...u,box:o(u.box),...u.anchoredDrawings?{anchoredDrawings:u.anchoredDrawings}:{}};if(!u.pageFieldProjector)return Yu(u,f,r),f;let p=u.pageFieldProjector;return {...f,pageFieldProjector:m=>{let g=p(m);return {...g,box:o(g.box)}}}},i=u=>{if(u)return {...u,box:o(u.box),...u.separator?{separator:{...u.separator,box:o(u.separator.box)}}:{},notes:u.notes.map(f=>({...f,box:o(f.box)}))}},l=a(e.header),s=a(e.footer),d=i(e.footnotes),c=i(e.endnotes);return {...e,id:`page-${t}`,index:t,box:o(e.box),contentBox:o(e.contentBox),...l?{header:l}:{},...s?{footer:s}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}var IR=new WeakMap;function zM(e){let t=IR.get(e);if(t!==void 0)return t;let n=[];Lu(e,o=>{let a=o.marker;a&&n.push(J([o.paragraphId,a.text,a.numFmt,String(a.level)]));});let r=n.length===0?"":`|list:${J(n)}`;return IR.set(e,r),r}var OR=new WeakMap;function WM(e){let t=OR.get(e);if(t!==void 0)return t;let n=[];Ia(e,o=>{n.push(jl(o.resource)),o.kind==="anchoredDrawing"&&o.textboxStory?.clippedResourceToken&&n.push(`clip:${o.textboxStory.clippedResourceToken}`);});let r=n.length===0?"":`!${J(n)}`;return OR.set(e,r),r}function lp(e,t){return J([e,String(t.flowHeight),t.contentKey,t.projectionEpoch??"",WM(t),zM(t)])}function CR(e,t,n){if(!e)return "";let r=(o,a)=>J([...a].map(([i,l])=>lp(`${o}${i}`,l)).sort());return `|hf:${t},${n},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+J([r("h",e.headers),r("f",e.footers)])}var VM="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",GM="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";function $M(e){let t=new Map;for(let n of e.relationships.get(e.mainDocumentPart)??[]){if(n.type!==VM&&n.type!==GM)continue;let r=E(n);r.mode!=="Internal"||!r.target.ok||t.has(r.target.partName)||t.set(r.target.partName,n.id);}return t}function KM(e){return e.relationships.get(e.mainDocumentPart)??e.relationships}function TG(e){let{view:t,measurer:n,producer:r,cache:o,styleCascade:a,numberingIndex:i,defaultTabStopPt:l,compatibilityMode:s,displayMode:d,revisionAuthorFilter:c,inlineDrawingLayoutForPart:u,drawingLayoutTokenForPart:f,drawingTokenForParagraphForPart:p,linkProjectors:m,projectFieldLink:g}=e,h=new WeakMap,b=new WeakMap,x=(v,I,P)=>{if(I.rId===P)return I;let C=b.get(v);C||(C=new WeakMap,b.set(v,C));let E=C.get(I),D=E?.get(P);if(D)return D;let z={...I,rId:P,withPageContext:W=>x(v,I.withPageContext(W),P)};return E||(E=new Map,C.set(I,E)),E.set(P,z),z},y=new Map,O=null,S=(v,I,P)=>(O!==I&&(O=I,y=$M(v)),y.get(P)),T=(v,I,P)=>{let C=m.epochForPart(v.name),E=c?.cacheKey??"",D=l?.(),z=s?.(),W=f?.(v.name)??"",j=i?.(),M=a?.(),B=m.projectLinkForPart(v.name),N=h.get(v);if(N&&N.width===I&&N.pageHeight===P.height&&N.marginTop===P.margin.top&&N.marginBottom===P.margin.bottom&&N.marginLeft===P.margin.left&&N.marginRight===P.margin.right&&N.producer===r&&N.projectionEpoch===C&&N.revisionAuthorFilterKey===E&&N.defaultTabStopPt===D&&N.compatibilityMode===z&&N.drawingLayoutToken===W&&N.numberingIndex===j&&N.styleCascade===M)return N.story;let A=FR(v,I,n,r,o,M,void 0,void 0,D,d,u?.(v.name),p?H=>p(v.name,H):void 0,void 0,{pageNumber:1,pageWidth:P.width,pageHeight:P.height,marginLeft:P.margin.left,marginRight:P.margin.right,marginTop:P.margin.top,marginBottom:P.margin.bottom},t.documentProperties(),{compatibilityMode:z,...j?{numberingIndex:j}:{},projectLink:B,...g?{projectFieldLink:g}:{},projectionEpoch:C,projectionTokenForParagraph:H=>m.tokenForParagraphForPart(v.name,H),projectionTokenForTable:H=>m.tokenForTableForPart(v.name,H),...c?{revisionAuthorFilter:c}:{}});return h.set(v,{width:I,pageHeight:P.height,marginTop:P.margin.top,marginBottom:P.margin.bottom,marginLeft:P.margin.left,marginRight:P.margin.right,producer:r,projectionEpoch:C,revisionAuthorFilterKey:E,defaultTabStopPt:D,compatibilityMode:z,drawingLayoutToken:W,numberingIndex:j,styleCascade:M,story:A}),A},k=(v,I,P,C,E)=>{if(!P||P.headers.size===0&&P.footers.size===0)return;let D=E.width-E.margin.left-E.margin.right,z=(W,j)=>{let M=new Map;for(let[B,N]of W){let A=j?.get(B),H=A?.partName===N.name?A.rId:S(v,I,N.name),$=T(N,D,E);M.set(B,H?x(I,$,H):$);}return M};return {titlePage:P.titlePage,evenAndOddHeaders:P.evenAndOddHeaders,headers:z(P.headers,C?.headers),footers:z(P.footers,C?.footers)}},w=()=>{let v=t.currentPackage(),I=KM(v),P=Jf(t.part(),d,c),C=Zx(t.part(),d,c),E=t.headerFooterPartsBySection(),D=t.headerFooterResolutionBySection?.()??Od$1(v);return P.map((z,W)=>{let j=C[W]??W;return k(v,I,E[j],D[j],Yr(z.properties))})};return {sectionFurniture:w,furniture(){let v=w();return v[v.length-1]}}}function XM(e,t,n,r,o){let a=hn(e,r,o);if(!n)return t.map(l=>{if(l.blockStart===l.blockEndExclusive)return;let s=a[l.blockEndExclusive-1];return s?.kind==="paragraph"?Zn(s):void 0});let i=[];for(let l of a){if(l.kind!=="paragraph")continue;let s=Zn(l);s&&i.push(s);}for(;i.length<t.length;)i.push(void 0);return i}function EG(e){let t=e.view.currentPackage(),n=Nf$1(t,"footnote"),r=Nf$1(t,"endnote");if(!n&&!r)return;let o=e.view.part();if(Of$1(o).length===0)return;let a=Cf$1(t),i=Df$1(a),l=Ef$1(a),s=Ff$1(void 0,i),d=Gf$1(void 0,l),c=Qf(o,e.displayMode,e.revisionAuthorFilter),u=XM(o,c.sections,c.truncated,e.displayMode,e.revisionAuthorFilter),f=c.sections.map((h,b)=>Ff$1(Af$1(u[b]),i)),p=c.sections.map((h,b)=>Gf$1(Bf$1(u[b]),l)),m=e.inlineDrawingLayoutForPart?h=>{let b=e.inlineDrawingLayoutForPart(h);if(b)return {inlineDrawingLayout:b,...e.drawingTokenForParagraphForPart?{drawingTokenForParagraph:x=>e.drawingTokenForParagraphForPart(h,x)}:{}}}:void 0,g=[n,r];return {footnotesPart:n,endnotesPart:r,footnotePropsBySection:f.length>0?f:[s],endnotePropsBySection:p.length>0?p:[d],documentFootnoteProps:s,documentEndnoteProps:d,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade?.(),numberingIndex:e.numberingIndex?.(),defaultTabStopPt:e.defaultTabStopPt,compatibilityMode:e.compatibilityMode,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,projectLinkForPart:e.linkProjectors.projectLinkForPart,linkRelsEpoch:g.map(h=>h?e.linkProjectors.epochForPart(h.name):"").join("\0"),...e.projectFieldLink?{projectFieldLink:e.projectFieldLink}:{},projectionTokenForParagraphForPart:e.linkProjectors.tokenForParagraphForPart,projectionTokenForTableForPart:e.linkProjectors.tokenForTableForPart,projectionEpoch:g.map(h=>h?e.linkProjectors.epochForPart(h.name):"").join("\0"),...m?{drawingsForPart:m}:{},...m&&e.drawingLayoutEpochForPart?{drawingLayoutEpoch:g.map(h=>h?e.drawingLayoutEpochForPart(h.name):"").join("\0")}:{}}}function NG(e,t,n){return rf$1(e.currentPackage(),t,n)}var YM=new TextEncoder,UM=512,no=Object.freeze({title:"field-projected",creator:"field-projected",subject:"field-projected",keywords:"field-projected",lastModifiedBy:"field-projected",description:"field-projected",company:"reserved",manager:"reserved"}),qM=Object.freeze({title:no.title,creator:no.creator,subject:no.subject,keywords:no.keywords,lastModifiedBy:no.lastModifiedBy,description:no.description}),sp=Object.freeze(Object.keys(qM)),MR=Object.freeze({title:"doc-property:title",creator:"doc-property:creator",subject:"doc-property:subject",keywords:"doc-property:keywords",lastModifiedBy:"doc-property:lastModifiedBy",description:"doc-property:description"}),BR=new WeakMap;function ZM(e){let t=BR.get(e);if(t)return t;let n=[],r=[e],o=[e];for(;o.length>0;){let s=o.pop();if(s!==e&&s.kind==="paragraph"&&r.push(s),s.kind==="hyperlink"&&n.push(s),s.kind!=="textValue")for(let d=s.children.length-1;d>=0;d-=1)o.push(s.children[d]);}let a=new Set;for(let s of r){let d=ni(s,[],void 0,void 0,void 0,void 0,"all-markup",void 0,void 0,void 0,void 0,MR),c=new Set(d.map(u=>u.text));for(let u of sp)c.has(MR[u])&&a.add(u);}let i=sp.filter(s=>a.has(s)),l=Object.freeze({links:Object.freeze(n),documentProperties:Object.freeze(i)});return BR.set(e,l),l}function LR(e){return a$1(YM.encode(J(e)))}var ER=new WeakMap;function NR(e,t){let n=new WeakMap,r=new WeakMap,o=l=>{let s=e.packageRevision(),d=e.currentPackage(),c=ER.get(e);(!c||c.revision!==s||c.pkg!==d)&&(c={revision:s,pkg:d,epochs:new Map},ER.set(e,c));let u=c.epochs.get(l);if(u!==void 0)return u;let f=["story-projection-part:v1",l];f.push(J(Object.keys(no).map(g=>`${g}:${no[g]}`)));for(let g of d.relationships.get(l)??[])f.push(J([g.id,g.type,g.rawTarget,g.targetMode,String(g.order)]));for(let g of d.externalTargets)g.ownerPart===l&&f.push(J([g.id,g.type,g.rawTarget,g.sinkSafe?"1":"0"]));let p=e.documentProperties();for(let g of sp)f.push(J([g,p[g]??""]));let m=`story-projection-part:${LR(f)}`;return c.epochs.size<UM&&c.epochs.set(l,m),m},a=(l,s)=>{let d=ZM(s);if(d.links.length===0&&d.documentProperties.length===0)return "";let c=t(l),u=o(l),f=n.get(s),p=f?.get(c);if(p?.epoch===u)return p.token;let m=e.documentProperties(),g=["story-projection:v1"];for(let x of d.links){let y=c(x);g.push(y?J([y.id,y.kind,y.href??"",y.anchor??"",y.tooltip??""]):"no-link");}for(let x of d.documentProperties)g.push(J([x,m[x]??""]));let h=`story-projection:${LR(g)}`,b=f??new WeakMap;return b.set(c,{epoch:u,token:h}),f||n.set(s,b),h};return Object.freeze({tokenForParagraphForPart:a,tokenForTableForPart:(l,s)=>{let d=t(l),c=o(l),u=r.get(s),f=u?.get(d);if(f?.epoch===c)return f.token;let p=Bo(s,g=>a(l,g)),m=u??new WeakMap;return m.set(d,{epoch:c,token:p}),u||r.set(s,m),p},epochForPart:o})}var JM=512;function AR(e){return t=>{if(t.kind==="textValue")return null;let n=$a$1(t,e);return {id:t.id,kind:n.kind,href:n.href,...n.anchor!==void 0?{anchor:n.anchor}:{},...n.tooltip!==void 0?{tooltip:n.tooltip}:{}}}}function VG(e){let t=AR(o=>e.relationshipTarget(o)),n=new Map,r=o=>{let a=n.get(o);if(a)return a;let i=AR(l=>rf$1(e.currentPackage(),o,l));return n.size<JM&&n.set(o,i),i};return Object.freeze({projectLink:t,projectLinkForPart:r,...NR(e,r)})}var QM=4096;function eB(e){let t=e.tooltip!==null?{tooltip:q(e.tooltip)}:{};if(e.target!==null){let o=L(e.target);if(o.ok&&o.href.length>0&&x(o.href).ok){let i=e.anchor!==null&&!o.href.includes("#")?L(q(e.anchor)):null;return {kind:"external",href:i&&i.ok&&i.href.length>0?`${o.href}#${i.href}`:o.href,authored:e.target,...e.anchor!==null?{anchor:q(e.anchor)}:{},...t}}if(e.anchor===null)return null}if(e.anchor===null)return null;let n=q(e.anchor),r=L(n);return {kind:"internal",href:r.ok&&r.href.length>0?`#${r.href}`:null,authored:e.anchor,anchor:n,...t}}function XG(){let e=new Map,t=new Map,n=0;return {project(r){let o=eB(r);if(!o)return null;let a=`${r.target??""}\0${r.anchor??""}\0${r.tooltip??""}`,i=e.get(a);if(i===void 0){if(e.size>=QM)return null;i=`field-hyperlink:${++n}`,e.set(a,i),t.set(i,Object.freeze({id:i,paragraphId:"",start:0,end:0,text:"",kind:o.kind,href:o.href,authored:o.authored,...o.anchor!==void 0?{anchor:o.anchor}:{},...o.tooltip!==void 0?{tooltip:o.tooltip}:{}}));}return {id:i,kind:o.kind,href:o.href,...o.anchor!==void 0?{anchor:o.anchor}:{},...o.tooltip!==void 0?{tooltip:o.tooltip}:{}}},linkById:r=>t.get(r)??null,clear(){e.clear(),t.clear();}}}var DR=new WeakMap;function tB(e){let t=DR.get(e);if(t!==void 0)return t;let n=nB(e);return DR.set(e,n),n}function nB(e){let t=(n,r)=>{if(n.kind==="textValue"||r>=la||$d$1(n)||Zd$1(n)!==null)return false;if(n.kind==="text"||n.localName==="t"){for(let a of n.children)if(a.kind==="textValue"&&a.value.trim().length>0)return true;return false}let o=ma(n,r);for(let a of n.children)if(a.kind!=="textValue"&&t(a,o))return true;return false};for(let n of e.children)if(n.kind!=="textValue"&&t(n,0))return true;return false}function zR(e,t){for(let n of t.resultParagraphIds){let r=Ga$1(e,n);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&tB(r))return true}return false}var _R=new WeakMap,jR=new WeakMap,HR=new WeakMap;function WR(e){let t=_R.get(e);if(t)return t;let n=new Set;for(let r of ze(e))n.add(r.beginParagraphId),n.add(r.endParagraphId);return _R.set(e,n),n}function VR(e){let t=jR.get(e);if(t)return t;let n=new Set;for(let r of ze(e))zR(e,r)||n.add(r.beginParagraphId);return jR.set(e,n),n}function GR(e){let t=HR.get(e);if(t)return t;let n=new Set;for(let r of ze(e))if(!zR(e,r))for(let o of r.resultParagraphIds)n.add(o);return HR.set(e,n),n}var rB="http://schemas.openxmlformats.org/wordprocessingml/2006/main",oB="http://schemas.microsoft.com/office/word/2010/wordml",aB="http://schemas.microsoft.com/office/word/2012/wordml";function iB(e){if(e.kind!=="textValue"){for(let t of e.attributes)if(t.localName==="val"&&t.namespaceUri===rB)return t.value}}function wi(e){for(let t of e.children)if(t.kind!=="textValue"&&(t.kind==="contentControlProperties"||t.localName==="sdtPr"))return t}function ta(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}}function wr(e,t){let n=ta(e,t);return n?iB(n):void 0}function $l(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function Mc(e){if(!e)return "richText";for(let t of e.children){if(t.kind==="textValue")continue;let n=t.kind,r=t.localName,o=t.namespaceUri;if(n==="contentControlDropDownList"||r==="dropDownList")return "dropdown";if(n==="contentControlComboBox"||r==="comboBox")return "comboBox";if(n==="contentControlDate"||r==="date")return "date";if(r==="picture")return "picture";if(n==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(n==="contentControlCheckbox"||r==="checkbox"&&o===oB)return "checkbox";if(r==="repeatingSection"&&o===aB)return "repeatingSection"}return "richText"}function $R(e){let t=(n,r)=>{for(let o of n)if(o.kind!=="textValue"){if(o.kind==="tableRow")return "row";if(o.kind==="tableCell")return "cell";if(o.kind==="paragraph"||o.kind==="table")return "block";if(Dd$1(o)&&r<Cd$1){let a=t(Gd$1(o),r+1);if(a)return a}}return null};return t(Gd$1(e),0)??"inline"}function ki(e){let t=KR.get(e);if(t!==void 0)return t;let n=lB(e);return Bc!==null&&Bc===n?n=Bc:Bc=n,KR.set(e,n),n}var Bc=null,KR=new WeakMap,XR=new WeakMap;function lB(e){let t=(n,r)=>{if(n.kind==="textValue")return "";let o=n.kind==="paragraph"||n.kind==="table"||Dd$1(n);if(o){let i=XR.get(n);if(i!==void 0&&i.depth===r)return i.token}let a;if(Dd$1(n)){if(r>=Cd$1)return "";let i=wi(n),l=[n.id,wr(i,"alias")??"",wr(i,"tag")??"",$l(wr(i,"lock")),Mc(i),ta(i,"showingPlcHdr")?"1":"0",ta(i,"dataBinding")?"1":"0"].join(":"),s=Gd$1(n).map(d=>t(d,r+1)).filter(d=>d.length>0);a=[l,...s].join("|");}else a=n.children.map(i=>t(i,r)).filter(i=>i.length>0).join("|");return o&&XR.set(n,{depth:r,token:a}),a};return t(e.root,0)}function UR(e,t){let n=[t],r=new Set([t]);for(let o of e.pages)for(let a of [o.header,o.footer])!a?.part||r.has(a.part)||(r.add(a.part),n.push(a.part));return n}var dp=new WeakMap,YR=new WeakMap;function qR(e){if(e.length===1)return Kl(e[0]);let t=dp.get(e[0]);if(t&&Lc(t.parts,e))return t.index;let n=e.map(d=>Kl(d)),r=YR.get(n[0]);if(r&&Lc(r.indexes,n))return dp.set(e[0],{parts:e,index:r.index}),r.index;let o=[],a=new Set,i=new Set;for(let d of n){for(let c of d.controls)o.push(c);for(let c of d.neededBlockIds)a.add(c);for(let c of d.neededParagraphIds)i.add(c);}let l=`${[...a].sort().join(",")};${[...i].sort().join(",")}`,s={controls:o,neededBlockIds:a,neededParagraphIds:i,neededToken:l};return YR.set(n[0],{indexes:n,index:s}),dp.set(e[0],{parts:e,index:s}),s}var cp=new WeakMap;function Lc(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return false;return true}var ZR=new WeakMap;function sB(e){for(let t of xd$1(e))if(t.root.kind!=="textValue"){for(let n of t.root.children)if(n.kind!=="textValue")return n}return null}function Kl(e){let t=cp.get(e);if(t!==void 0)return t;let n=cB(e),r=sB(e),o=r?ZR.get(r):void 0;if(o&&Lc(o.lists,n))return cp.set(e,o.index),o.index;let a=[];for(let d of n)for(let c of d)a.push(c);let i=new Set,l=new Set;for(let d of a){for(let c of d.blockIds)i.add(c);d.paragraphId!==void 0&&l.add(d.paragraphId);}let s={controls:a,neededBlockIds:i,neededParagraphIds:l,neededToken:`${[...i].sort().join(",")};${[...l].sort().join(",")}`};return r&&ZR.set(r,{lists:n,index:s}),cp.set(e,s),s}var dB=Object.freeze([]);function cB(e){let t=[],n=(i,l,s=0)=>{for(let d of i){if(d.kind==="paragraph"||d.kind==="table"){l.push(d.id);continue}let c=wd$1(d);if(c!==null&&s<Cd$1){n(c,l,s+1);continue}(d.kind==="tableRow"||d.kind==="tableCell")&&n(d.children,l,s);}},r=(i,l,s,d,c)=>{if(!(d>=la)){for(let u of i)if(!(u.kind==="textValue"||u.kind==="paragraphProperties")){if(Dd$1(u)){let f=Pe(l).spanOf(u);if(!f)continue;let p=wi(u),m=$l(wr(p,"lock")),g=[...c,m];r(Gd$1(u),l,s+1,d+1,g),t.push({control:u,nestingDepth:s,lockStack:g,level:"inline",paragraphId:l.id,range:f,blockIds:[]});continue}na$1(u)&&r(u.children,l,s,d+1,c);}}},o=(i,l,s,d=0)=>{for(let c of i){if(c.kind==="textValue")continue;if(c.kind==="paragraph"){r(c.children,c,l,0,s);continue}if(c.kind==="table"){for(let b of c.children)b.kind==="tableRow"&&o([b],l,s,d);continue}if(c.kind==="tableRow"){for(let b of c.children)b.kind==="tableCell"?o(b.children,l,s,d):Dd$1(b)&&o([b],l,s,d);continue}if(!Dd$1(c)){let b=wd$1(c);b!==null&&d<Cd$1&&o(b,l,s,d+1);continue}if(l>=Cd$1)continue;let u=wi(c),f=$l(wr(u,"lock")),p=[...s,f],m=$R(c),g=wd$1(c)??[];if(m==="inline"){o(g,l+1,p,d+1);continue}let h=[];n(g,h),t.push({control:c,nestingDepth:l,lockStack:p,level:m,blockIds:h}),o(g,l+1,p,d+1);}},a=[];for(let i of xd$1(e))if(i.root.kind!=="textValue")for(let l of i.root.children){if(l.kind==="textValue")continue;let s=JR.get(l);if(s!==void 0){a.push(s);continue}let d=t.length;o([l],0,[]);let c=t.length===d?dB:Object.freeze(t.slice(d));JR.set(l,c),a.push(c);}return a}var JR=new WeakMap,up=1<<20,QR=new WeakMap,e0=null,t0=0;function uB(e){return e!==e0&&(e0=e,t0+=1),t0}function fB(e,t,n,r){let o=QR.get(e);if(o!==void 0&&o.neededStamp===n)return o;let a=[],i=[],l=e.index*up,s=0,d=0,c=p=>s===0&&d===0?p:{x:p.x+s,y:p.y+d,width:p.width,height:p.height},u=(p,m)=>{if(m.kind==="paragraph"){t.neededBlockIds.has(m.paragraphId)&&(a.push({pageIndex:p,blockId:m.paragraphId,box:c(m.box)}));let g=t.neededParagraphIds.has(m.paragraphId);for(let h of m.lines){let b=l;if(l=Math.min(l+1,e.index*up+up-1),!g)continue;let x=Math.max(0,h.box.height-h.leading-(h.trailingSpacing??0));for(let y of h.spans)i.push({pageIndex:p,paragraphId:y.range.paragraphId,start:y.range.start,end:y.range.end,line:b,box:{x:y.box.x+s,y:y.box.y+h.leading+d,width:y.box.width,height:x}});}return}t.neededBlockIds.has(m.tableId)&&(a.push({pageIndex:p,blockId:m.tableId,box:c(m.box)}));for(let g of m.rows)if(!g.isHeaderRepeat)for(let h of g.cells)for(let b of h.blocks)u(p,b);};for(let p of e.fragments)u(e.index,p);for(let p of [e.header,e.footer])if(p){s=p.box.x-e.contentBox.x,d=p.box.y-e.contentBox.y;for(let m of p.fragments)u(e.index,m);}s=0,d=0;let f={neededStamp:n,blocks:a,spans:i};return QR.set(e,f),f}function mB(e,t,n){let r=uB(t.neededToken),o=new Map,a=new Map,i=new Set;for(let l of e.pages){let s=fB(l,t,r);for(let d of s.blocks){let c=o.get(d.blockId);c?c.push(d):o.set(d.blockId,[d]);}for(let d of s.spans){let c=a.get(d.paragraphId);c?(d.start<c[c.length-1].start&&i.add(d.paragraphId),c.push(d)):a.set(d.paragraphId,[d]);}}return {blocksById:o,spansByParagraph:a,repeatedParagraphs:i}}function pB(e,t,n){let r=new Map,o=new Set;for(let a of e)if(!o.has(a)){o.add(a);for(let i of t.blocksById.get(a)??[]){let 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=$s(i);return l?[{pageIndex:a,box:l}]:[]})}function gB(e,t,n,r){let o=n.spansByParagraph.get(e)??[],a=new Map,i=n.repeatedParagraphs.has(e),l=0,s=o.length;for(;!i&&l<s;){let d=l+(s-l>>1);(t.start===t.end?o[d].end<t.start:o[d].end<=t.start)?l=d+1:s=d;}i&&(l=0);for(let d=l;d<o.length;d+=1){let c=o[d];if(c.end<=t.start)continue;if(c.start>=t.end){if(i)continue;break}let u=a.get(c.line);u?u.boxes.push(c.box):a.set(c.line,{pageIndex:c.pageIndex,boxes:[c.box]});}if(a.size===0&&t.start===t.end){let d=[],c=new Set;for(let u=l;u<o.length;u+=1){let f=o[u];if(f.start>t.start){if(i)continue;break}if(t.start>f.end||c.has(f.pageIndex))continue;c.add(f.pageIndex);let p=f.start===f.end?f.box.x:f.box.x+f.box.width*(t.start-f.start)/Math.max(1,f.end-f.start);if(d.push({pageIndex:f.pageIndex,box:{x:p,y:f.box.y,width:0,height:f.box.height}}),!i)break}if(d.length>0)return d}return [...a.entries()].sort(([d],[c])=>d-c).flatMap(([,d])=>{let c=$s(d.boxes);return c?[{pageIndex:d.pageIndex,box:c}]:[]})}var n0=new WeakMap;function hB(e){let t=n0.get(e);if(t!==void 0)return t;let n=wi(e),r=wr(n,"alias"),o=wr(n,"tag"),a={...r!==void 0?{alias:r}:{},...o!==void 0?{tag:o}:{},controlType:Mc(n),placeholder:ta(n,"showingPlcHdr")!==void 0,bound:ta(n,"dataBinding")!==void 0};return n0.set(e,a),a}function yB(e,t,n){let r=e.level==="inline"&&e.paragraphId&&e.range?gB(e.paragraphId,e.range,t):pB(e.blockIds,t);return {...pp(e),fragments:r}}function bB(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r!==o&&(r.pageIndex!==o.pageIndex||r.box.x!==o.box.x||r.box.y!==o.box.y||r.box.width!==o.box.width||r.box.height!==o.box.height))return false}return true}function xB(e,t){return e.id===t.id&&e.alias===t.alias&&e.tag===t.tag&&e.controlType===t.controlType&&e.lock===t.lock&&e.effectiveLock===t.effectiveLock&&e.placeholder===t.placeholder&&e.bound===t.bound&&e.nestingDepth===t.nestingDepth&&e.level===t.level&&bB(e.fragments,t.fragments)}function vi(e,t){if(!e)return t.length===0;if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(!xB(e[n],t[n]))return false;return true}function fp(e,t){return {...t,revision:e.revision,pages:e.pages}}var r0=new WeakMap;function mp(e,t,n=ki(t),r){let o=UR(e,t);if(o.length>1){let f=o.map(p=>ki(p));n=f.some(p=>p!=="")?f.join("|"):"";}if(n===""){let f=e.pages.some(m=>m.contentControls!==void 0&&m.contentControls.length>0);if(!f&&e.controlContextToken===n&&vi(e.contentControls,[]))return e;let p=f?e.pages.map(m=>m.contentControls!==void 0&&m.contentControls.length>0?{...m,contentControls:[]}:m):e.pages;return {...e,pages:p,contentControls:[],controlContextToken:n}}let a=qR(o),i=mB(e,a),l=a.controls.map(f=>yB(f,i)),s=new Map;for(let f of l)for(let p of f.fragments){let m=s.get(p.pageIndex),g={...f,fragments:[p]};m?m.push(g):s.set(p.pageIndex,[g]);}if(e.controlContextToken===n&&vi(e.contentControls,l)&&e.pages.every(f=>vi(f.contentControls,s.get(f.index)??[])))return e;let d=false,c=e.pages.map(f=>{let p=s.get(f.index)??[];if(vi(f.contentControls,p)||p.length===0&&!f.contentControls)return f;d=true;let m=r0.get(f);if(m&&vi(m.controls,p))return m.wrapped;let g={...f,contentControls:p};return r0.set(f,{controls:p,wrapped:g}),g}),u=d?c:e.pages;return u===e.pages&&e.controlContextToken===n&&vi(e.contentControls,l)?e:{...e,pages:u,contentControls:l,controlContextToken:n}}function g$(e,t){return Kl(e).controls.filter(r=>t?r.paragraphId!==void 0?t.has(r.paragraphId):o0(r.control).some(o=>t.has(o)):true).map(pp)}function o0(e){let t=[],n=r=>{for(let o of r)if(o.kind!=="textValue"){if(o.kind==="paragraph"){t.push(o.id);continue}if(Dd$1(o)){n(Gd$1(o));continue}n(o.children);}};return n(Gd$1(e)),t}function h$(e,t){let n=null;for(let r of Kl(e).controls)(r.paragraphId===t||r.blockIds.includes(t)||o0(r.control).includes(t))&&(!n||r.nestingDepth>=n.nestingDepth)&&(n=r);return n?pp(n):null}function pp(e){let t=hB(e.control);return {id:e.control.id,...t.alias!==void 0?{alias:t.alias}:{},...t.tag!==void 0?{tag:t.tag}:{},controlType:t.controlType,lock:e.lockStack[e.lockStack.length-1]??"unlocked",effectiveLock:Nu(e.lockStack),placeholder:t.placeholder,bound:t.bound,nestingDepth:e.nestingDepth,level:e.level,fragments:[]}}var Xl=qd$1,Ec=512,gp=6,SB=1/3;function PB(e,t){return `note-${e}-${t}`}function k$(e){if(!e)return [];let t=[];for(let n of sd$1(e.root)){if(t.length>=Xl)break;jd$1(n)&&t.push(n);}return t}function RB(e,t){if(e){for(let n of sd$1(e.root))if(id$1(n)===t)return n}}function i0(e,t,n){let r=gd$1(e),o=hd$1(e);if(!r||o===null)return null;let a=Zc$1(r,o),i=n.displayMode??_e,l=Sl(e,i,n.revisionAuthorFilter),s=PB(r,o),d=0,c=Math.max(1,t),u=n.maxFlowHeightPt??Number.POSITIVE_INFINITY,f=n.noteMarks?{...n.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},p=n.ownerPartName?n.drawingsForPart?.(n.ownerPartName):void 0,m=(n.ownerPartName?n.projectLinkForPart?.(n.ownerPartName):void 0)??n.projectLink,g=si({numberingIndex:n.numberingIndex,styleCascade:n.styleCascade},l).listItems,h=qo(l,0,c,0,0,{measurer:n.measurer,cache:n.cache,producer:n.producer+(i===_e?"":`|rev:${i}`)+(n.revisionAuthorFilter?`|reviewers:${n.revisionAuthorFilter.cacheKey}`:"")+`|${a}`,nextLineId:()=>`${s}-line-${d++}`,styleCascade:n.styleCascade,...g?{listItems:g}:{},noteMarks:f,...m?{projectLink:m}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.ownerPartName&&n.projectionTokenForParagraphForPart?{projectionTokenForParagraph:O=>n.projectionTokenForParagraphForPart(n.ownerPartName,O)}:{},...n.ownerPartName&&n.projectionTokenForTableForPart?{projectionTokenForTable:O=>n.projectionTokenForTableForPart(n.ownerPartName,O)}:{},...n.refFields?{refFields:n.refFields}:{},displayMode:i,compatibilityMode:n.compatibilityMode,tableNestingOffset:1,...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...p?{inlineDrawingLayout:p.inlineDrawingLayout,...p.drawingTokenForParagraph?{drawingTokenForParagraph:p.drawingTokenForParagraph}:{}}:{},...n.revisionAuthorFilter?{revisionAuthorFilter:n.revisionAuthorFilter}:{}}),b=h.blocks,x=h.bottom,y;if(b.length>Ec){b=b.slice(0,Ec);let O=b[b.length-1];x=O?O.box.y+O.box.height:0,y="note-fragment-limit";}if(x>u){let O=[],S=0;for(let T of b){let k=T.box.y+T.box.height;if(k>u+.001&&O.length>0)break;O.push(T),S=k;}b=O,x=S,y=y??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:id$1(e),fragments:b,flowHeight:x,...y?{fallbackReason:y}:{}}}function a0(e,t,n,r){if(!e)return null;let o=ud$1(e.root,t);return o?i0(o,n,{...r,ownerPartName:e.name}):null}function Yl(e,t,n,r,o){if(!o)return a0(e,t,n,r);let a=`${e?.name??"none"}\0${t}\0${n}`,i=o.get(a);if(i!==void 0)return i;let l=a0(e,t,n,r);return o.set(a,l),l}function wB(e,t){return "single"}function kB(e,t,n){let r=Sl(e,t,n);if(r.length===0)return true;for(let o of r){if(o.kind!=="paragraph")return false;let a=o.children.find(i=>i.kind==="paragraphProperties");if(Object.keys(Wr(a)).length>0||!vB(o))return false}return true}function vB(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="paragraphProperties"){if(t.kind==="run"){if(!TB(t))return false;continue}return false}return true}function TB(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="runProperties"&&!(ed$1(t)||fd$1(t)||dd$1(t))){if(t.kind==="text"){if(t.children.map(r=>r.value).join("").trim().length>0)return false;continue}return false}return true}function hp(e,t,n,r,o,a){let i=wB(),l=RB(e,t);if(l){if(kB(l,r.displayMode,r.revisionAuthorFilter))return {kind:t,fragments:[],flowHeight:gp,synthetic:false,ruleStyle:i};let s=i0(l,n,{...r,...e?{ownerPartName:e.name}:{}});if(s&&s.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return s.flowHeight>d+.001?{kind:t,fragments:[],flowHeight:gp,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:t,fragments:s.fragments,flowHeight:s.flowHeight,synthetic:false}}}return {kind:t,fragments:[],flowHeight:gp,synthetic:true,ruleStyle:i}}function IB(e,t){let n=Math.max(1,e*SB);return {x:0,y:Math.max(0,(t-.75)/2),width:n,height:.75}}function yp(e,t,n,r){if(e.ruleStyle!==void 0||e.synthetic){let o=IB(n,e.flowHeight);return {x:t+o.x,y:r+o.y,width:o.width,height:Math.max(o.height,e.ruleStyle==="double"?2.25:.75)}}return {x:t,y:r,width:n,height:e.flowHeight}}var l0=new WeakMap,s0=new WeakMap;function OB(e,t,n){let r=e.map(o=>`${o.blockStart}-${o.blockEndExclusive}`).join(",");return `${t};${n?.cacheKey??""};${r}`}function bp(e){let t=jr(e);return t?t.members.map(n=>n.id):[e.id]}function xp(e){let t=s0.get(e);if(t)return t;let n=[],r=(o,a)=>{if(!(a>32||o.kind==="textValue")){if(o.kind==="paragraph"){n.push(o.id);return}for(let i of o.children)r(i,a+1);}};return r(e,0),s0.set(e,n),n}function FB(e,t){if(e.kind!==t.kind)return false;let n=e.kind==="paragraph"?bp(e):xp(e),r=t.kind==="paragraph"?bp(t):xp(t);return n.length===r.length&&n.every((o,a)=>o===r[a])}function d0(e,t,n,r,o){let a=hn(e,n,r),i=OB(t,n,r),l=o?l0.get(o):void 0;if(l?.boundsFingerprint===i&&l.blocks.length===a.length&&a.every((d,c)=>d===l.blocks[c]||FB(d,l.blocks[c])))return l.blocks=a,l.map;let s=new Map;for(let d=0;d<t.length;d+=1){let c=t[d];for(let u=c.blockStart;u<c.blockEndExclusive;u+=1){let f=a[u];if(!f)continue;let p=f.kind==="paragraph"?bp(f):xp(f);for(let m of p)s.set(m,d);}}return o&&l0.set(o,{blocks:a,boundsFingerprint:i,map:s}),s}function Ti(e,t){return Math.max(0,e-14-t)}var Ul=.5,c0=2*Ul;function Nc(e,t,n){if(!e)return "";let r=[];for(let[o,a]of e){let i=o-t;i>=0&&i<n&&r.push([i,a]);}return r.length===0?"":(r.sort((o,a)=>o[0]-a[0]),`|nr:${r.map(([o,a])=>`${o}=${a}`).join(",")}`)}function u0(e,t,n){n<=0||e.set(t,Math.max(e.get(t)??0,n));}function ro(e){let t=new Map;for(let[n,r]of e)r>0&&t.set(n,r);return t}function Ac(e,t){let n=ro(e),r=ro(t);if(n.size!==r.size)return false;for(let[o,a]of n)if((r.get(o)??0)!==a)return false;return true}function f0(e,t){let n=ro(e);for(let[r,o]of t)o<=0||n.set(r,Math.max(n.get(r)??0,o));return n}function Ii(e){return [...ro(e)].map(([t,n])=>`${t}=${n}`).sort().join(",")}function CB(e,t){if(e.lines.length===0)return e.box.y+e.box.height<=t+.001?{head:e,tail:null}:{head:null,tail:e};let n=0;for(;n<e.lines.length;n+=1){let g=e.lines[n];if(g.box.y+g.box.height>t+.001)break}if(n===0)return {head:null,tail:e};if(n>=e.lines.length)return {head:e,tail:null};let r=e.lines.slice(0,n),o=e.lines.slice(n),a=r[r.length-1],i=e.box.y,l=a.box.y+a.box.height,s=e.borders?.filter(g=>g.side!=="bottom"),d={...e,range:{paragraphId:e.paragraphId,start:r[0].range.start,end:a.range.end},spacing:{before:e.spacing.before,after:0},lines:r,box:{...e.box,height:Math.max(0,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(g=>g.side!=="top"),m={...e,id:`${e.paragraphId}#f${e.fragmentIndex+1}`,fragmentIndex:e.fragmentIndex+1,range:{paragraphId:e.paragraphId,start:o[0].range.start,end:o[o.length-1].range.end},spacing:{before:0,after:e.spacing.after},lines:o,box:{x:e.box.x,y:u,width:e.box.width,height:Math.max(0,f-u)},marker:void 0,...p&&p.length>0?{borders:p}:{borders:void 0},...e.bottomBorder?{bottomBorder:e.bottomBorder}:{},...e.shadingBox?{shadingBox:{x:e.shadingBox.x,y:u,width:e.shadingBox.width,height:Math.max(0,f-u)}}:{}};return {head:d,tail:m}}function ql(e,t,n){if(e.flowHeight<=t+.001)return {head:e.fragments,headHeight:e.flowHeight,tail:[],tailHeight:0};if(t<=.001)return {head:[],headHeight:0,tail:e.fragments,tailHeight:e.flowHeight};let r=[],o=0,a=0,i=null;for(let u=0;u<e.fragments.length&&u<Ec;u+=1){let f=e.fragments[u],p=f.box.y+f.box.height;if(p<=t+.001){r.push(f),o=p,a=u+1;continue}if(f.kind==="paragraph"){let m=CB(f,t);if(m.head)r.push(m.head),o=m.head.box.y+m.head.box.height,i=m.tail,a=u+1;else {let g=n?.fullContentHeight??t,b=f.lines[0]?.box.height??f.box.height;if(r.length===0&&t>=g-.001&&b>g+.001){n?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let x=e.fragments.slice(a),y=x[0]?.box.y??0;return {head:[],headHeight:0,tail:tp(x,-y),tailHeight:Math.max(0,e.flowHeight-y)}}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=tp(l,-s),c=zl(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}var oo=8,m0=2,MB=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Sp(e){let t=e?.val;return t!=="0"&&t!=="false"&&t!=="off"}function p0(e){let t=false,n=false,r=true;for(let o of e)switch(o.localName){case "keepNext":t=Sp(o.attributes);break;case "keepLines":n=Sp(o.attributes);break;case "widowControl":r=Sp(o.attributes);break;}return !t&&!n&&r?MB:{keepNext:t,keepLines:n,widowControl:r}}function g0(e,t,n,r,o){if(e<=t)return e;if(r.keepLines&&!o)return t;if(!r.widowControl||n<m0)return e;let a=e;return n-a<m0&&(a-=1),a-t===1&&(a-=1),a<t&&(a=t),a===t&&o?e:a}function h0(e,t,n,r,o){let a=0,i=n;for(let l=t;l-t<oo;l+=1){let s=e[l];if(s&&o?.(l))continue;if(!s||s.kind!=="paragraph"||!s.spacing||!s.keeps)return null;a+=Math.max(s.spacing.before,i)-i;let d=r(l);if(!s.keeps.keepNext||l+1>=e.length)return a+=d[0]??0,s.keeps.widowControl&&d.length>1&&(a+=d[1]),a;for(let c of d)a+=c;a+=s.spacing.after,i=s.spacing.after;}return null}function BB(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);o!==void 0&&(n===e&&(n=[...e]),n[r]=`${n[r]}~mk~${o}`);}return n}function LB(e,t,n){let r=e;for(let o=0;o<e.length;o+=1){if(!t(o))continue;let a=n(o);if(a===null)continue;let i=o>0&&n(o-1)===a,l=o+1<e.length&&n(o+1)===a;r===e&&(r=[...e]),r[o]=`${r[o]}~cs~${i?1:0}${l?1:0}`;}return r}function EB(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);if(o==="")continue;let a=r>0&&t(r-1)===o,i=r+1<e.length&&t(r+1)===o;n===e&&(n=[...e]),n[r]=`${n[r]}~bg~${a?1:0}${i?1:0}`;}return n}function NB(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);o!==""&&(n===e&&(n=[...e]),n[r]=`${n[r]}~toc~${o}`);}return n}function AB(e,t,n){let r=e,o=0,a=-1;for(let i=e.length-1;i>=0;i-=1)n?.(i)||(a>=0&&t(i)&&o<oo?(r===e&&(r=[...e]),r[i]=`${e[i]}~kn~${r[a]}`,o+=1):o=0,a=i);return r}function y0(e,t){let n=t.terminalTableGroup,r=n?e.map((a,i)=>i>=n.start&&i<=n.anchorIndex?J([a,n.token]):a):e,o=LB(r,t.contextualSpacingAt,t.styleIdAt);return o=EB(o,t.borderGroupKeyAt),t.tocVerdicts.length>0&&(o=NB(o,a=>t.tocVerdicts[a])),o=BB(o,t.markerTextAt),o=AB(o,t.keepsNextAt,t.skipKeepNextAt),o}var DB=oo+1;function b0(e){let{bodyPage:t,nextPage:n}=e;if(!n||n.contentBox.width!==t.contentBox.width||n.contentBox.height!==t.contentBox.height)return 0;let r=n,o=e.pageBottomRefsOf(r);if(o.length===0)return 0;let a,i;for(let P of o){let C=Vl(r,P);C.bottom<=C.top||(!a||C.bottom<a.bottom-.001)&&(a=C,i=P);}if(!a||!i)return 0;let l=a.bottom-a.top,s=Wl(t),d=t.contentBox.height;if(d-s<l-.001)return 0;let c,u=0;for(let P of r.fragments){if(P.kind!=="paragraph"||u>=DB)return 0;if(u+=1,mr(P,i.paragraphId,i.atomOffset)){c=P;break}}if(!c)return 0;let f=o.filter(P=>mr(c,P.paragraphId,P.atomOffset));if(f.length===0)return 0;let p=Cc(r),m=Math.max(0,a.bottom-p),g=Math.max(0,np(c)-p),h=t.contentBox.width,b=Ti(d,e.plainSeparatorHeight),x=0;for(let P of f){let C=Yl(e.footnotesPart,P.noteId,h,e.opts,e.noteLayoutCache);if(!C)continue;let E=Vl(r,P),D=E.evictable?E.bottom-E.blockTop:0;C.flowHeight>b-D+.001||(x+=C.flowHeight);}if(x<=0)return 0;let y=(e.existingAreaHeight>0?e.existingAreaHeight:e.plainSeparatorHeight)+x,O=Math.max(0,d-s-Ul);if(!(s+m+l+y<=d+.001))return O;if(s+g+l+y<=d+.001)return 0;let{usedReservePt:k}=e;if(k===void 0)return 0;let w=Math.max(0,d-k-s),v=m+l>w+.001,I=Math.abs(k-O)<=c0;return v&&!I?0:O}var x0=Object.freeze({footnotesPart:"identity-check",endnotesPart:"identity-check",footnotePropsBySection:"content-fingerprint",endnotePropsBySection:"content-fingerprint",documentFootnoteProps:"content-fingerprint",documentEndnoteProps:"content-fingerprint",measurer:"identity-check",producer:"content-fingerprint",displayMode:"content-fingerprint",revisionAuthorFilter:"content-fingerprint",cache:"identity-check",styleCascade:"identity-check",numberingIndex:"identity-check",defaultTabStopPt:"content-fingerprint",compatibilityMode:"content-fingerprint",projectLink:"pass-projector",projectLinkForPart:"relationship-epoch-guarded",linkRelsEpoch:"content-fingerprint",projectionTokenForParagraphForPart:"projection-epoch-guarded",projectionTokenForTableForPart:"projection-epoch-guarded",projectionEpoch:"content-fingerprint",projectFieldLink:"pass-projector",documentProperties:"content-fingerprint",refFields:"content-fingerprint",drawingsForPart:"drawing-epoch-guarded",drawingLayoutEpoch:"content-fingerprint"});function Pp(e,t){for(let n of Object.keys(x0))if(x0[n]===t&&e[n]!==void 0)return true;return false}function Dc(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function S0(e){return Pp(e,"drawing-epoch-guarded")&&e.drawingLayoutEpoch===void 0||Pp(e,"relationship-epoch-guarded")&&e.linkRelsEpoch===void 0||Pp(e,"projection-epoch-guarded")&&e.projectionEpoch===void 0?null:[e.producer,e.displayMode??_e,e.revisionAuthorFilter?.cacheKey??"",e.defaultTabStopPt??"",e.compatibilityMode??"",e.drawingLayoutEpoch??"",e.linkRelsEpoch??"",e.projectionEpoch??"",e.refFields?.valuesToken??"",e.documentProperties?JSON.stringify(e.documentProperties):"",Dc(e.documentFootnoteProps),Dc(e.documentEndnoteProps),e.footnotePropsBySection.map(Dc).join(";"),e.endnotePropsBySection.map(Dc).join(";")].join("\0")}var _B=.4;function Rp(e,t,n){return e&&Ld$1(e,"first")&&n===0?"first":e&&Ld$1(e,"even")&&(t+n+1)%2===0?"even":"default"}function P0(e){let{furniture:t,pageHeight:n,marginTop:r,marginBottom:o}=e,a=n*_B,i=new Map,l=(s,d,c)=>Math.min(a,Math.max(c,d?s+d.flowHeight:0));return s=>{if(s===0&&e.continuedPageInsets)return e.continuedPageInsets;let d=Rp(t,e.pageIndexStart,s),c=i.get(d);if(c)return c;let u=l(e.headerDistance,t?.headers.get(d),r),f=l(e.footerDistance,t?.footers.get(d),o),p=Object.freeze({top:u,bottom:f,height:n-u-f});return i.set(d,p),p}}var wp=new WeakMap;function G$(e){wp.delete(e);}function Zl(e,t){wp.set(e,t);}function kp(e,t,n,r){return wp.get(e)?.(t,n,r)}var na=24;function R0(e){let{furniture:t,geometry:n,headerDistance:r,footerDistance:o,pageIndexStart:a}=e,i=c=>({x:0,y:c*(n.height+na),width:n.width,height:n.height}),l=c=>Rp(t,a,c),s=(c,u,f)=>{if(!t)return;let p=l(u),m=(c==="header"?t.headers:t.footers).get(p);if(!m)return;let g=w=>{let v=c==="header"?f.y+r:f.y+n.height-o-w.flowHeight;return {kind:c,variant:p,partName:w.partName,...w.part?{part:w.part}:{},...w.rId?{rId:w.rId}:{},box:{x:f.x+n.margin.left,y:v,width:e.contentWidth,height:w.flowHeight},fragments:w.fragments,...w.anchoredDrawings?{anchoredDrawings:w.anchoredDrawings}:{}}},h=a+u+1,b={pageNumber:h,pageCount:Math.max(h,e.pageCount()+1),sectionPageCount:u+1},x=e.insetsFor(u),y=w=>{let v=m;for(let I=0;I<8;I+=1){let P=c==="header"?r:n.height-o-v.flowHeight,C={...w,contentInsetTop:x.top,contentInsetBottom:x.bottom,storyTop:P},E=m.withPageContext(C);if(Math.abs(E.flowHeight-v.flowHeight)<=.001)return E;v=E;}throw new Error("header/footer attached-page anchor layout did not converge")},O=m.pageFieldNeeds,T=Ar(O)||(m.anchoredDrawings?.length??0)>0?y(b):m,k=g(T);return Ar(O)?{...k,pageFieldProjector:w=>g(y(w))}:k};return {pageBox:i,variantFor:l,furnitureFor:s,overflowShellAt:(c,u)=>{let f=c-a,p=s("header",f,u),m=s("footer",f,u);return {insets:e.insetsFor(f),...p?{header:p}:{},...m?{footer:m}:{}}}}}function w0(e){let t=0;return e.map((n,r)=>{let o=`page-${r}`,i=n.index===r&&n.id===o&&n.box.y===t?n:ea(n,r,t);return t+=n.box.height+na,i})}function k0(e){if(e.kind!=="tableRow")return null;let t=e.children.find(a=>a.namespaceUri===da&&a.localName==="trPr");if(!t)return null;let n=null;for(let a of t.children)if(a.kind!=="textValue"&&a.namespaceUri===da&&!(a.localName!=="ins"&&a.localName!=="del")){n=a;break}if(!n)return null;let r=a=>n.attributes.find(i=>i.namespaceUri===da&&i.localName===a)?.value,o=r("date");return {kind:n.localName==="ins"?"insert":"delete",id:r("id")??"",author:r("author")??"",...o===void 0?{}:{date:o},nodeId:n.id}}function v0(e,t,n){let r=[];for(let o of e){let a=Xt(o)?tn(o):k0(o);if(a){if(r.length>=td)return false;r=fn(r,a);}}return je(r,t,n)}function T0(e){let t=[];for(let n of e){let r=Xt(n)?tn(n):k0(n);r&&t.push([r.kind,r.nodeId,r.author]);}return JSON.stringify(t)}function _c(e){return `${e.noteKind}|${e.noteId}|${e.paragraphId}|${e.customMarkFollows?1:0}|${e.sectionIndex}`}function I0(e){return e.map(t=>`${_c(t)}|${t.atomOffset}`).join(";")}function vp(e){return e.map(_c).join(";")}function Tp(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r.atomOffset!==o.atomOffset||_c(r)!==_c(o))return false}return true}var H0=64,z0=8,F0=H0+2*z0,W0=4096,jB=256,C0=12,M0=new WeakMap;function HB(e,t,n){if(!e)return {memo:null,allHits:t,reused:false};let r=S0(n);if(r===null)return e.notes=null,{memo:null,allHits:t,reused:false};let o=I0(t),a=null,i=e.notes;if(i){let s=M0.get(i),d=i.inputFingerprint===r&&s!==void 0&&s.footnotesPart===n.footnotesPart&&s.endnotesPart===n.endnotesPart&&s.measurer===n.measurer&&s.cache===n.cache&&s.styleCascade===n.styleCascade&&s.numberingIndex===n.numberingIndex;if(d&&i.hitsFingerprint===o)return {memo:i,allHits:i.allHits,reused:true};if(a=d?vp(t):null,a!==null&&i.identityFingerprint===a)return i.hitsFingerprint=o,i.allHits=t,{memo:i,allHits:t,reused:true}}let l={hitsFingerprint:o,identityFingerprint:a??vp(t),inputFingerprint:r,allHits:t,provisionalMarks:tw(t,n),finalMarks:null,settledReserves:null,reflowSpent:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return M0.set(l,{footnotesPart:n.footnotesPart,endnotesPart:n.endnotesPart,measurer:n.measurer,cache:n.cache,styleCascade:n.styleCascade,numberingIndex:n.numberingIndex}),e.notes=l,{memo:l,allHits:t,reused:false}}function kK(e,t){return t>=e.range.start&&t<e.range.end}var B0=new WeakMap;function V0(e){let t=B0.get(e);if(t)return t;let n=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){n.push(a);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let l of i.cells)r(l.blocks);}};return r(e),B0.set(e,n),n}var L0=new WeakMap;function G0(e){let t=L0.get(e);if(t)return t;let n=new Map;for(let r of e){let o=n.get(r.paragraphId);o?o.push(r):n.set(r.paragraphId,[r]);}return L0.set(e,n),n}var E0=new WeakMap;function jc(e,t,n){let r=V0(e.fragments);if(!n)return t.filter(l=>r.some(s=>mr(s,l.paragraphId,l.atomOffset)));let o=E0.get(e.fragments);if(o&&o.refIndex===n)return o.result;let a=[],i=new Set;for(let l of r)for(let s of Ca(l)){let d=n.get(s);if(d)for(let c of d)i.has(c)||mr(l,s,c.atomOffset)&&(i.add(c),a.push(c));}return E0.set(e.fragments,{refIndex:n,result:a}),a}function $0(){let e=new Map;return {get(t,n,r,o,a,i,l){let d=`${t?.name??"none"}\0${o}\0${n}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=hp(t,n,r,i,o,a);return e.set(d,u),u.fallbackReason&&l.push(u.fallbackReason),u}}}function K0(e){return e==="sectEnd"||e==="docEnd"}var N0=new WeakMap;function X0(e){let t=N0.get(e);return t||(t=new Map,N0.set(e,t)),t}function Y0(e,t,n,r,o,a,i,l){if(e)return e.get(t,n,r,o,a,i,l);let s=hp(t,n,r,i,o,a);return s.fallbackReason&&l.push(s.fallbackReason),s}function zB(e,t){let n=[];for(let r of e){if(n.length>=Xl)break;n.push({...r,sectionIndex:t.get(r.paragraphId)??0});}return n}function ra(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function Ip(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function Op(e,t){return {measurer:e.measurer,producer:e.producer,displayMode:e.displayMode,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:e.defaultTabStopPt,compatibilityMode:e.compatibilityMode,revisionAuthorFilter:e.revisionAuthorFilter,projectLink:e.projectLink,projectLinkForPart:e.projectLinkForPart,projectFieldLink:e.projectFieldLink,documentProperties:e.documentProperties,refFields:e.refFields,noteMarks:t,drawingsForPart:e.drawingsForPart,projectionTokenForParagraphForPart:e.projectionTokenForParagraphForPart,projectionTokenForTableForPart:e.projectionTokenForTableForPart}}function WB(e,t){let n="FootnoteReference";if(!t)return {...wn,verticalAlign:"superscript"};let r=ai([],[{localName:"rStyle",attributes:{val:n}}],t);return Ne(r,t.themeFonts)}function VB(e,t,n,r){let o=new Set;for(let c of e.values())c&&c.length>0&&o.add(c);let a=Math.max(t.footnotePropsBySection.length,t.endnotePropsBySection.length,1,...n.map(c=>c.sectionIndex+1),...r.map(c=>c.sectionIndex+1)),i=false;for(let c=0;c<a;c+=1){let u=ra(t,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<C0;p+=1){let m=zn(u.numFmt,u.numStart+p);m.length>0&&o.add(m);}}let f=Ip(t,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<C0;p+=1){let m=zn(f.numFmt,f.numStart+p);m.length>0&&o.add(m);}}}if(!i||o.size===0)return;let l=WB("footnote",t.styleCascade),s,d=-1;for(let c of o){let u=t.measurer.measure(c,l);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(s?.length??0))&&(s=c,d=u);}return s}function U0(e,t,n){let r=di("footnote",e,l=>ra(n,l)),o=di("endnote",t,l=>Ip(n,l)),a=new Map;for(let l of r)a.set(fi("footnote",l.noteId),l.mark);for(let l of o)a.set(fi("endnote",l.noteId),l.mark);let i=VB(a,n,e,t);return {marks:a,...i?{reservedMarkText:i}:{}}}function GB(e,t){if(t.marks.size===0)return e;let n=false,r=e.pages.map(o=>{if(!$B(o.fragments))return o;let a=q0(o.fragments,t);return a===o.fragments?o:(n=true,{...o,fragments:a})});return n?{...e,pages:r}:e}var A0=new WeakMap;function $B(e){let t=A0.get(e);if(t!==void 0)return t;let n=false,r=o=>{for(let a of o){if(n)return;if(a.kind==="paragraph"){for(let i of a.lines)for(let l of i.spans)if(l.projected&&l.noteNav?.direction==="to-note"){n=true;return}continue}for(let i of a.rows)for(let l of i.cells)r(l.blocks);}};return r(e),A0.set(e,n),n}function q0(e,t){let n=false,r=e.map(o=>{if(o.kind==="paragraph"){let l=KB(o,t);return l!==o&&(n=true),l}let a=false,i=o.rows.map(l=>{let s=false,d=l.cells.map(c=>{let u=q0(c.blocks,t);return u===c.blocks?c:(s=true,{...c,blocks:u})});return s?(a=true,{...l,cells:d}):l});return a?(n=true,{...o,rows:i}):o});return n?r:e}function KB(e,t){let n=false,r=e.lines.map(o=>{let a=XB(o,t);return a!==o&&(n=true),a});return n?{...e,lines:r}:e}function XB(e,t){let n=false,r=e.spans.map(o=>{let a=YB(o,t);return a!==o&&(n=true),a});return n?{...e,spans:r}:e}function YB(e,t){if(!e.projected||e.noteNav?.direction!=="to-note")return e;let n=t.marks.get(e.noteNav.scopeId);if(n===void 0)return e;let r=n??"";return e.text===r?e:{...e,text:r}}function UB(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function Z0(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function qB(e){for(let t=e.length-1;t>=0;t-=1)if(Z0(e[t]))return t;return Math.max(0,e.length-1)}function Fp(e,t,n,r,o,a,i,l){let s=new Map(a),d=t.filter(N=>N.noteKind==="footnote"),c=e.contentBox.width,u=Op(n,r),f=[],p=0,m=W0,g=a.size>0?"continuationSeparator":"separator",h=Math.max(0,e.contentBox.height),b=N=>Y0(l?.separatorCache,n.footnotesPart,N,c,"footnote",h,u,i),x=b(g),y=Wl(e),O=Math.max(0,e.contentBox.height-y-x.flowHeight),S=Ti(e.contentBox.height,x.flowHeight),T=l?.reserveColumnBudget?S:O,w={fullContentHeight:Math.max(0,e.contentBox.height-x.flowHeight),reasons:i},v=l?.reserveBandOf?g==="separator"?S:Ti(e.contentBox.height,b("separator").flowHeight):0,I=l?.reserveBandOf?Cc(e):0;for(let[N,A]of a){let H=N.match(/^(footnote|endnote):(-?\d+)$/);if(!H||H[1]!=="footnote")continue;let $=Number(H[2]),R=Math.max(0,T-p);if(A.height<=R+.001)f.push({noteKind:"footnote",noteId:$,scopeId:N,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:A.height},fragments:A.fragments}),p+=A.height,s.delete(N);else {let Y=ql({fragments:A.fragments,flowHeight:A.height},R,w);Y.head.length>0&&(f.push({noteKind:"footnote",noteId:$,scopeId:N,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:Y.headHeight},fragments:Y.head}),p+=Y.headHeight),Y.tail.length>0?s.set(N,{fragments:Y.tail,height:Y.tailHeight,mark:null}):s.delete(N);}}let P;for(let N of d){if(f.length>=Xl){i.push("note-count-limit");break}let A=l?.reserveBandOf?.(N);if(P!==void 0&&A&&A.evictable&&A.bottom>P+.001)continue;let H=Yl(n.footnotesPart,N.noteId,c,u,l?.noteLayoutCache);if(!H){i.push("missing-note-body");continue}let $=r.marks.get(fi("footnote",N.noteId))??null,R=A?Math.min(T,Math.max(0,e.contentBox.height-Math.max(14,A.bottom)-x.flowHeight)):T,Y=Math.max(0,R-p);if(A&&A.evictable&&l?.evictionAllowed!==false&&H.flowHeight>Y+.001&&H.flowHeight<=v-(A.bottom-A.blockTop)+.001&&A.top>I+.001&&A.top>=14){P=P===void 0?A.top:Math.min(P,A.top);continue}if(m-=H.fragments.length,m<0){i.push("note-area-fragment-limit");break}if(H.flowHeight<=Y+.001)f.push({noteKind:"footnote",noteId:N.noteId,scopeId:H.scopeId,mark:N.customMarkFollows?null:$,box:{x:e.contentBox.x,y:0,width:c,height:H.flowHeight},fragments:H.fragments}),p+=H.flowHeight;else {let X=ql(H,Y,w);X.head.length>0&&(f.push({noteKind:"footnote",noteId:N.noteId,scopeId:H.scopeId,mark:N.customMarkFollows?null:$,box:{x:e.contentBox.x,y:0,width:c,height:X.headHeight},fragments:X.head}),p+=X.headHeight),X.tail.length>0&&s.set(H.scopeId,{fragments:X.tail,height:X.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:s,evictionTopPt:P};let C=x.flowHeight,E=C+p,D=zl(e.fragments),z;o==="beneathText"?z=e.contentBox.y+Math.max(y,Math.min(D,e.contentBox.height-E)):(z=e.contentBox.y+e.contentBox.height-E,z=Math.max(z,e.contentBox.y+y));let W=z+C,j=f.map(N=>{let A={...N,box:{...N.box,y:W}};return W+=N.box.height,A}),M=yp(x,e.contentBox.x,c,z);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:z,width:c,height:E},separator:{kind:g,box:M,fragments:x.fragments,synthetic:x.synthetic,...x.ruleStyle!==void 0?{ruleStyle:x.ruleStyle}:{}},notes:j},nextCarry:s,evictionTopPt:P}}function J0(e,t){let n=Math.min(Math.max(t,0),e.length-1);for(;n>0&&e[n].noteStream!==void 0;)n-=1;return n}function ZB(e){return t=>{let n=kp(e,t.sectionAnchorIndex,t.landingIndex,t.template.box);return JB(t.template,t.landingIndex,t.noteStream,n)}}function JB(e,t,n,r){let o=r?{x:e.contentBox.x,y:e.box.y+r.insets.top,width:e.contentBox.width,height:r.insets.height}:e.contentBox,a=r?r.header:e.header,i=r?r.footer:e.footer;return {id:`page-${t}`,index:t,box:e.box,contentBox:o,fragments:[],...n?{noteStream:n}:{},...a?{header:a}:{},...i?{footer:i}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+1}}:{}}}function QB(e,t){let n=null,r=false,o=e.map((a,i)=>{if(a.noteStream===void 0)return n=a.index,a;if(n===null)return a;let l=kp(t,n,i,a.box);if(!l)return a;let s=a.box.y+l.insets.top;if(s===a.contentBox.y&&l.insets.height===a.contentBox.height&&l.header?.variant===a.header?.variant&&l.footer?.variant===a.footer?.variant)return a;let c={...a.contentBox,y:s,height:l.insets.height},u=s+c.height,f=a.contentBox.y+a.contentBox.height,p=eL(a,s-a.contentBox.y,u-f);if(!p.fits(s,u))return a;r=true;let{header:m,footer:g,...h}=a;return {...h,contentBox:c,...p.footnotes?{footnotes:p.footnotes}:{},...p.endnotes?{endnotes:p.endnotes}:{},...l.header?{header:l.header}:{},...l.footer?{footer:l.footer}:{}}});return r?o:[...e]}function D0(e,t){if(t===0)return e;let n=r=>({...r,y:r.y+t});return {...e,box:n(e.box),...e.separator?{separator:{...e.separator,box:n(e.separator.box)}}:{},notes:e.notes.map(r=>({...r,box:n(r.box)}))}}function eL(e,t,n){let r=i=>i.placement==="pageBottom"?n:t,o=e.footnotes?D0(e.footnotes,r(e.footnotes)):void 0,a=e.endnotes?D0(e.endnotes,r(e.endnotes)):void 0;return {...o?{footnotes:o}:{},...a?{endnotes:a}:{},fits(i,l){let s=d=>d===void 0||d.box.y>=i-.001&&d.box.y+d.box.height<=l+.001;return s(o)&&s(a)}}}function Cp(e,t){let n=new Set;for(let r of V0(e.fragments))n.add(t.get(r.paragraphId)??0);return [...n].sort((r,o)=>r-o)}function Q0(e,t,n){for(let r=e.length-1;r>=0;r-=1)if(Cp(e[r],n).includes(t))return r;return Math.max(0,e.length-1)}function tL(e,t,n){let r=Q0(e,t,n);for(let o=r+1;o<e.length;o+=1){let a=e[o];if(a.noteStream==="footnote-drain"||a.noteStream==="endnote-overflow"||a.fragments.length===0&&(a.footnotes?.notes.length??0)>0)continue;let i=Cp(a,n);if(i.length!==0&&!i.includes(t))return o}return e.length}function nL(e,t){let n=w0(e);return [...Dr({revision:t,pages:n}).pages]}function rL(e,t,n,r,o,a,i,l){let s=new Map(a),d=[];if(t.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};let c=e.contentBox.width,u=Op(n,r),f=l?.separatorKind??"separator",p=M=>M==="footnote"?n.footnotesPart:n.endnotesPart,m=n.endnotesPart??n.footnotesPart,g=Math.max(0,e.contentBox.height),h=Y0(l?.separatorCache,m,f,c,"endnote",g,u,i),b=h.flowHeight,x=zl(e.fragments),y=e.endnotes?Math.max(x,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):x,O=UB(e),S=Math.max(0,O-y-b),k={fullContentHeight:Math.max(0,O-b),reasons:i},w=[],v=0,I=W0;for(let[M,B]of a){let N=M.match(/^(footnote|endnote):(-?\d+)$/);if(!N)continue;let A=N[1],H=Number(N[2]),$=Math.max(0,S-v);if(B.height<=$+.001)w.push({noteKind:A,noteId:H,scopeId:M,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:B.height},fragments:B.fragments}),v+=B.height,s.delete(M);else {let R=ql({fragments:B.fragments,flowHeight:B.height},$,k);R.head.length>0&&(w.push({noteKind:A,noteId:H,scopeId:M,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:R.headHeight},fragments:R.head}),v+=R.headHeight),R.tail.length>0?s.set(M,{fragments:R.tail,height:R.tailHeight,mark:null}):s.delete(M);}}for(let M=0;M<t.length;M+=1){let B=t[M];if(w.length>=Xl){i.push("note-count-limit"),d.push(...t.slice(M));break}let N=p(B.noteKind),A=Yl(N,B.noteId,c,u,l?.noteLayoutCache);if(!A){i.push("missing-note-body");continue}let H=r.marks.get(fi(B.noteKind,B.noteId))??null,$=Math.max(0,S-v);if(I-=A.fragments.length,I<0){i.push("note-area-fragment-limit"),d.push(...t.slice(M));break}if(A.flowHeight<=$+.001)w.push({noteKind:B.noteKind,noteId:B.noteId,scopeId:A.scopeId,mark:B.customMarkFollows?null:H,box:{x:e.contentBox.x,y:0,width:c,height:A.flowHeight},fragments:A.fragments}),v+=A.flowHeight;else {let R=ql(A,$,k);R.head.length>0&&(w.push({noteKind:B.noteKind,noteId:B.noteId,scopeId:A.scopeId,mark:B.customMarkFollows?null:H,box:{x:e.contentBox.x,y:0,width:c,height:R.headHeight},fragments:R.head}),v+=R.headHeight),R.tail.length>0&&s.set(A.scopeId,{fragments:R.tail,height:R.tailHeight,mark:null}),d.push(...t.slice(M+1));break}}if(w.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};if(w.length===0)return {area:void 0,nextCarry:s,remainingRefs:d};let P=e.contentBox.y+y,C=P+b,E=w.map(M=>{let B={...M,box:{...M.box,y:C}};return C+=M.box.height,B}),D=yp(h,e.contentBox.x,c,P),z=b+v,W=Math.max(0,O-y),j=Math.min(z,W);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:P,width:c,height:j},separator:{kind:f,box:D,fragments:h.fragments,synthetic:h.synthetic,...h.ruleStyle!==void 0?{ruleStyle:h.ruleStyle}:{}},notes:E},nextCarry:s,remainingRefs:d}}function oL(e,t,n,r,o,a,i,l,s){let d=e,c=t,u=e[J0(e,e.length-1)].index;for(;c.size>0&&a.remaining>0;){let f=d[d.length-1],p=s({template:f,landingIndex:d.length,noteStream:"footnote-drain",sectionAnchorIndex:u}),m=Fp(p,[],n,r,"pageBottom",c,o,{separatorCache:i,noteLayoutCache:l}),g=m.area?.notes.length??0;if(c=m.nextCarry,g===0){o.push("note-overflow-stalled"),m.area&&(d=[...d,{...p,footnotes:m.area}],a.remaining-=1);break}d=[...d,{...p,footnotes:m.area}],a.remaining-=1;}return c.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:d,carry:c}}function aL(e,t,n,r,o,a="endnote-overflow"){let i=r({template:n,landingIndex:t,noteStream:a,sectionAnchorIndex:o});return {pages:[...e.slice(0,t),i,...e.slice(t)],pageIndex:t}}function _0(e,t,n){if(n<=t||t>=e.length)return e;let r=Math.min(n,e.length),o=e[t],a=o.pageFieldSource?.pageNumber??t+1,i=o.pageFieldSource?.format,l=r-t,s=[...e];for(let d=t;d<r;d+=1){let c=s[d];s[d]={...c,pageFieldSource:{pageNumber:a+(d-t),sectionPageCount:l,...i?{format:i}:{}}};}return s}function j0(e,t,n,r,o,a,i,l,s){if(n.length===0||e.length===0)return e;let d=e[J0(e,t)].index,c=[...e],u=[...n],f=new Map,p=t,m=0,g="separator",h=s?.stopBeforeIndex??Number.POSITIVE_INFINITY,b=s?.sectionStartIndex??t,x=s?.stopBeforeIndex!==void 0,y=s?.separatorCache;for(;u.length>0||f.size>0;){if(p>=c.length||p>=h){if(l.remaining<=0){i.push("note-overflow-page-limit");break}let k=c[Math.min(Math.max(p,1),c.length)-1]??c[c.length-1],w=Math.min(p,h,c.length),v=aL(c,w,k,s.mint,d,"endnote-overflow");c=v.pages,p=v.pageIndex,x&&(h=w+1),m+=1,l.remaining-=1;}let O=c[p];if(!Z0(O)){p+=1;continue}let S=rL(O,u,r,o,a,f,i,{separatorKind:g,...y?{separatorCache:y}:{},...s.noteLayoutCache?{noteLayoutCache:s.noteLayoutCache}:{}});f=S.nextCarry,u=S.remainingRefs;let T=S.area?.notes.length??0;if(S.area){let k=c[p];c[p]={...k,endnotes:k.endnotes?{...S.area,notes:[...k.endnotes.notes,...S.area.notes],box:{...S.area.box,y:k.endnotes.box.y,height:k.endnotes.box.height+S.area.box.height}}:S.area};}else {if(f.size===0&&u.length===0)break;if(!S.area&&f.size===0&&u.length>0){p+=1,g="separator";continue}}if(T===0&&(f.size>0||u.length>0)&&O.fragments.length===0&&O.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(f.size>0||u.length>0){g="continuationSeparator",p+=1;continue}break}return (u.length>0||f.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),x?c=_0(c,b,Math.min(h,c.length)):m>0&&(c=_0(c,b,c.length)),c}function iL(e,t,n,r,o,a){let i=o??null,l=new Map,s=[],d=new Map,c=G0(t),u=$0(),f=X0(r),p=Op(n,r),m=y=>y.noteKind==="footnote"&&!K0(ra(n,y.sectionIndex).pos),g=t.some(m),h=y=>jc(y,t,c).filter(m),b=(y,O,S)=>u0(l,y,Math.min(O,S));for(let y=0;y<e.pages.length;y+=1){let O=e.pages[y],S=rp(O),k=jc(S,t,c).filter($=>$.noteKind==="footnote"),w=k.filter(m),v=w[0]?.sectionIndex??0,I=ra(n,v),P=e.pages[y+1],C=a?a.get(O.index)??0:void 0,E=Ti(S.contentBox.height,0),D=$=>g?b0({bodyPage:S,nextPage:P,existingAreaHeight:$,usedReservePt:C,pageBottomRefsOf:h,footnotesPart:n.footnotesPart,opts:p,plainSeparatorHeight:u.get(n.footnotesPart,"separator",S.contentBox.width,"footnote",Math.max(0,S.contentBox.height),p,s).flowHeight,noteLayoutCache:f}):0;if(w.length===0&&d.size===0){b(O.index,D(0),E);continue}if(i&&d.size===0){let $=i.pageReserve.get(O);if($&&$.marks===r&&Tp(k,$.pageRefs)){for(let R of $.reasons)s.push(R);b(O.index,Math.max($.reserve,D($.areaHeight)),E);continue}}let z=d.size===0,W=s.length,{area:j,nextCarry:M,evictionTopPt:B}=Fp(S,w,n,r,I.pos,d,s,{reserveColumnBudget:true,reserveBandOf:$=>Vl(S,$),separatorCache:u,noteLayoutCache:f,evictionAllowed:!P||P.contentBox.width===S.contentBox.width&&P.contentBox.height===S.contentBox.height});d=M;let N=B!==void 0?Math.max(0,S.contentBox.height-B-Ul):0,A=j?.box.height??0,H=Math.min(Math.max(A,N),E);i&&z&&d.size===0&&i.pageReserve.set(O,{pageRefs:k,marks:r,reserve:H,areaHeight:A,reasons:s.slice(W)}),b(O.index,Math.max(H,D(A)),E);}let x=true;for(let y of e.pages){let O=l.get(y.index)??0;if(O<=0)continue;if(Wl(y)+O>y.contentBox.height+.5){x=false;break}}return {reserves:l,stable:x,reasons:s}}function lL(e,t,n,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,l={remaining:jB},s=G0(t),d=$0(),c=ZB(e),u=[],f=[];for(let T of e.pages)for(let k of jc(T,t,s)){let w={noteId:k.noteId,sectionIndex:k.sectionIndex,pageIndex:T.index,customMarkFollows:k.customMarkFollows};k.noteKind==="footnote"?u.push(w):f.push(w);}let p=o?[...u,...f].map(T=>`${T.noteId}|${T.sectionIndex}|${T.pageIndex??""}|${T.customMarkFollows?1:0}`).join(";"):"",m;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===p?m=o.finalMarks.marks:(m=U0(u,f,n),o&&(o.finalMarks={sitesFingerprint:p,marks:m}));let g=X0(m),h=new Map,b=new Map,x=[],y=e.pages.map(T=>{let k=jc(T,t,s),w=k.filter(M=>M.noteKind==="footnote"),v=k.filter(M=>M.noteKind==="endnote");for(let M of v)if(Ip(n,M.sectionIndex).pos==="sectEnd"){let N=b.get(M.sectionIndex)??[];N.push(M),b.set(M.sectionIndex,N);}else x.push(M);for(let M of w){let B=ra(n,M.sectionIndex);if(B.pos==="sectEnd"){let N=b.get(M.sectionIndex)??[];N.push(M),b.set(M.sectionIndex,N);}else B.pos==="docEnd"&&x.push(M);}if(o&&h.size===0){let M=o.pageAttach.get(T);if(M&&M.marks===m&&Tp(w,M.pageRefs)){for(let B of M.reasons)a.push(B);return M.attached}}let I=rp(T),P=w.filter(M=>{let B=ra(n,M.sectionIndex).pos;return B==="pageBottom"||B==="beneathText"}),C=P[0]?.sectionIndex??0,E=ra(n,C),D,z=h.size===0,W=a.length;if(P.length>0||h.size>0||w.length===0&&!K0(E.pos)){let M=Fp(I,P,n,m,E.pos,h,a,{separatorCache:d,noteLayoutCache:g});D=M.area,h=M.nextCarry;}let j=D?{...I,footnotes:D}:I;if(o&&z&&h.size===0){let M={pageRefs:w,marks:m,attached:j,reserve:0,reasons:a.slice(W)};if(o.pageAttach.set(j,M),j!==T){let B=o.pageReserve.get(T);B&&o.pageReserve.set(j,B);}}return j}),O=y.length;if(h.size>0){let T=oL(y,h,n,m,a,l,d,g,c);y=T.pages,h=T.carry;}if(b.size>0&&y.length>0){let T=[...b.keys()].sort((k,w)=>k-w);for(let k of T){let w=b.get(k),v=Q0(y,k,i),I=tL(y,k,i),P=v;for(let C=0;C<=v;C+=1)if(Cp(y[C],i).includes(k)){P=C;break}y=j0(y,v,w,n,m,"sectEnd",a,l,{stopBeforeIndex:I,sectionStartIndex:P,separatorCache:d,noteLayoutCache:g,mint:c});}}return x.length>0&&y.length>0&&(y=j0(y,qB(y),x,n,m,"docEnd",a,l,{separatorCache:d,noteLayoutCache:g,mint:c})),y.length!==O&&(y=QB(y,e),y=nL(y,e.revision)),{layout:GB({...e,pages:y},m),fallbackReasons:a,noteMarks:m}}function sL(e,t,n){return (t==="all-markup"&&n===void 0?Of$1(e):Pf$1(e,{includeReference:(a,i)=>v0(i,t,n),projectionKey:`${t};${n?.cacheKey??""}`,ancestryKey:T0})).map(a=>({noteKind:a.noteKind,noteId:a.noteId,paragraphId:a.paragraphId,atomOffset:a.atomOffset,customMarkFollows:a.customMarkFollows}))}function ew(e,t,n,r,o){let a=n.displayMode??_e,i=n.revisionAuthorFilter,l=sL(e,a,i);if(l.length===0)return n.session&&(n.session.notes=null,n.session.notePageBottomReserves=null),o({...n,noteMarks:void 0,pageBottomReserves:void 0});let s=d0(e,t,a,i,n.session),d=zB(l,s),c=HB(n.session,d,r),u=c.memo,f=c.allHits,p=u?.provisionalMarks??tw(f,r),m=n.session?.notePageBottomReserves,g=m?ro(m):new Map,h=[],b=o({...n,noteMarks:p,pageBottomReserves:g}),x=Ii(g),y=c.reused&&u?.settledReserves&&u.settledReserves.part===e&&u.settledReserves.fingerprint===x?u.settledReserves:null;if(y)h=[...y.reasons];else {let S=new Set([x]),T=u&&u.reflowSpent&&u.reflowSpent.part===e?u.reflowSpent:{part:e,adopted:0};u&&(u.reflowSpent=T);let k=0,w=m&&g.size>0?z0:H0,v=b.pages.length,I=Math.max(8,Math.ceil(v/16)),P=0;for(let C=0;C<w;C+=1){let E=iL(b,f,r,p,u,g);if(h=[...E.reasons],E.stable&&Ac(E.reserves,g))break;if(T.adopted>=F0){h.push("note-reflow-exhausted");break}if(P>=I){h.push("note-reflow-exhausted");break}let D=ro(E.reserves);if(Ac(D,g)){h.push("note-reflow-exhausted");break}let z=Ii(D);if(S.has(z)){D=f0(g,E.reserves);let W=Ii(D);if(Ac(D,g)||S.has(W)){h.push("note-reflow-exhausted");break}}g=D,S.add(Ii(g)),T.adopted+=1,k+=1,b=o({...n,noteMarks:p,pageBottomReserves:g}),P=b.pages.length>v?P+1:0,v=b.pages.length,C===w-1&&h.push("note-reflow-exhausted");}u&&(k===0||T.adopted>=F0)&&(u.settledReserves={part:e,fingerprint:Ii(g),reasons:[...h]});}let O=lL(b,f,r,{fallbackReasons:h,paragraphSectionIndex:s,memo:u});return n.session&&(n.session.previous=O.layout,n.session.notePageBottomReserves=ro(g)),O.layout}function tw(e,t){let n=[],r=[];for(let o of e){let a={noteId:o.noteId,sectionIndex:o.sectionIndex,customMarkFollows:o.customMarkFollows};o.noteKind==="footnote"?n.push(a):r.push(a);}return U0(n,r,t)}function nw(e,t){let n=e.projectLink??t.projectLink,r=e.projectFieldLink??t.projectFieldLink,o=e.documentProperties??t.documentProperties,a=e.refFields??t.refFields,i=e.displayMode??t.displayMode,l=e.revisionAuthorFilter??t.revisionAuthorFilter;return {...e,...n?{projectLink:n}:{},...r?{projectFieldLink:r}:{},...o?{documentProperties:o}:{},...a?{refFields:a}:{},...i?{displayMode:i}:{},...l?{revisionAuthorFilter:l}:{}}}function ao(){return {previous:null,checkpoints:[],keys:[],context:"",producer:"",parityDependent:false,startPageParity:0,prepass:null,startLineCounter:0,endLineCounter:0,endCursorY:0,endSpaceAfter:0,endsOpenPage:true,stats:{placed:0,total:0,reusedPages:0,fullPasses:0},balanceLimit:null,multi:null,notePageBottomReserves:null,notes:null}}function Mp(e,t){let n={previous:t.previous,checkpoints:t.checkpoints,keys:t.keys,context:t.context,producer:t.producer,parityDependent:t.parityDependent,startPageParity:t.startPageParity,prepass:t.prepass,notes:t.notes,startLineCounter:t.startLineCounter,endLineCounter:t.endLineCounter,endCursorY:t.endCursorY,endSpaceAfter:t.endSpaceAfter,endsOpenPage:t.endsOpenPage,stats:t.stats,balanceLimit:t.balanceLimit,multi:t.multi,notePageBottomReserves:t.notePageBottomReserves};Object.assign(e,n);}function rw(e,t,n){if(!t)return e.map(n);let r=0;if(e.length!==t.bodies.length)for(;r<Math.min(e.length,t.bodies.length)&&e[e.length-1-r]===t.bodies[t.bodies.length-1-r];)r+=1;return e.map((o,a)=>o===t.bodies[a]?t.prepared[a]:a>=e.length-r?t.prepared[a+t.bodies.length-e.length]:n(o))}function ow(e,t){return e.length===t.length&&e.every((n,r)=>{let o=t[r];return n===o||n.kind==="paragraph"&&o.kind==="paragraph"&&n.id===o.id})}function aw(e,t){return e!==1?"columns":t?.size?JSON.stringify([...t].sort()):"body"}var cL=1584,iw=1e4,uL="http://schemas.openxmlformats.org/wordprocessingml/2006/main";function Jl(e){if(e===void 0||!/^-?\d{1,8}$/.test(e))return null;let t=Number(e)/20;return Math.abs(t)<=cL?t:null}function lw(e){let t=[e],n=0;for(;t.length;){let r=t.pop();if(++n>iw||r.namespaceUri!==uL||["drawing","pict","object","sectPr","footnoteReference","endnoteReference","pageBreakBefore","ins","del","moveFrom","moveTo","pPrChange","rPrChange"].includes(r.localName)||r.localName==="br"&&r.attributes.some(o=>o.localName==="type"&&o.value!=="textWrapping")||n+t.length+r.children.length>iw)return false;for(let o of r.children)o.kind!=="textValue"&&t.push(o);}return true}function sw(e){let t;for(let p of e)p.localName==="framePr"&&(t=p);if(!t?.attributes)return null;let n=t.attributes,r=new Set(["x","y","w","hAnchor","vAnchor","wrap","anchorLock","hSpace","vSpace"]);if(Object.keys(n).some(p=>!r.has(p)))return null;let o=n.wrap??"around";if(!["around","none","notBeside"].includes(o))return null;let a=Jl(n.hSpace??"0"),i=Jl(n.vSpace??"0");if(a===null||i===null||a<0||i<0||n.anchorLock!==void 0&&!["0","1","true","false","on","off"].includes(n.anchorLock))return null;let l=Jl(n.x),s=Jl(n.y),d=Jl(n.w);if(l===null||s===null||d===null||d<=0)return null;let c=n.hAnchor??"text",u=n.vAnchor??"text";if(!["page","margin","text"].includes(c)||!["page","margin","text"].includes(u)||u==="text"&&s<0)return null;let f=J(Object.keys(n).sort().map(p=>J([p,n[p]])));return {x:l,y:s,width:d,wrap:o,hSpace:a,vSpace:i,horizontalAnchor:c,verticalAnchor:u,token:f}}function dw(e,t,n){let r=n[t.horizontalAnchor].x+t.x,o=n[t.verticalAnchor].y+t.y,a=i=>({...i,x:i.x+r,y:i.y+o});return {...e,outOfFlow:true,box:a(e.box),...e.shadingBox?{shadingBox:a(e.shadingBox)}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:a(e.bottomBorder.box)}}:{},...e.borders?{borders:e.borders.map(i=>({...i,box:a(i.box)}))}:{},...e.marker?{marker:{...e.marker,box:a(e.marker.box)}}:{},lines:e.lines.map(i=>({...i,box:a(i.box),contentX:i.contentX+r,spans:i.spans.map(l=>({...l,box:a(l.box)})),...i.drawings?{drawings:i.drawings.map(l=>Yn(l,r,o))}:{}}))}}function cw(e){let t=0;for(let n of e){if(n.kind!=="paragraph"||!n.positionedFrame)continue;let{box:r,vSpace:o}=n.positionedFrame;t=Math.max(t,r.y+r.height+o);}return t}var uw=new WeakMap;function Bp(e){let t=uw.get(e);if(t)return t;let n=new Map;for(let r of e){let o=n.get(r.anchorId)??[];o.push(r),n.set(r.anchorId,o);}return uw.set(e,n),n}function fw(e,t,n,r,o,a){let i=[],l;for(let s=e.length-1;s>=0;s-=1){let d=e[s];if(d.kind==="paragraph"&&!d.props.some(u=>u.localName==="framePr")){l=d.paragraph.id;continue}if(d.kind!=="table")continue;let c=Wt(d.table,t,0,n,r,o,a)?.float;!c||c.ySpec==="inline"||l&&i.push({table:d.table,sourceIndex:s,anchorId:l,float:c});}return i.reverse()}function fL(e,t){let n=e??[];return n.length===t.length&&n.every((r,o)=>r.anchorId===t[o].anchorId&&r.column===t[o].column&&r.fragmentIndex===t[o].fragmentIndex&&r.anchorY===t[o].anchorY)}function Lp(e,t){let n=t.pendingPositionedTableTokens,r=e.pendingPositionedTableTokens;return (n===r||n?.length===r?.length&&n?.signature===r?.signature)&&fL(e.positionedTableAnchorSignals,t.positionedTableAnchorSignals??[])}function mw(e,t){let n=new Map,r=new Map,o=new Set;for(let s of e){let d=JSON.stringify([s.table.id,t[s.sourceIndex]]);n.set(s.table.id,d),r.set(d,s.table.id),o.add(s.anchorId);}let a,i=s=>{a={token:s,previous:a,length:(a?.length??0)+1,signature:a$1(new TextEncoder().encode(J([a?.signature??"",s])))};},l=s=>{if((a?.length??0)!==s.size){a=void 0;for(let d of s){let c=n.get(d);c&&i(c);}}};return {add(s,d){if(l(s),s.has(d))return;let c=n.get(d);c&&(s.add(d),i(c));},note(s,d,c,u,f){o.has(d)&&s.push({anchorId:d,column:c,fragmentIndex:u,anchorY:f});},checkpoint(s,d){return l(s),{pendingPositionedTableTokens:a,positionedTableAnchorSignals:[...d]}},restore(s,d,c){d.clear();let u=[];for(let f=s.pendingPositionedTableTokens;f;f=f.previous)u.push(f.token);for(let f=u.length-1;f>=0;f--){let p=r.get(u[f]);p&&d.add(p);}a=s.pendingPositionedTableTokens,l(d),c.splice(0,c.length,...s.positionedTableAnchorSignals??[]);},same(s,d,c,u){return l(c),Lp({pendingPositionedTableTokens:s,positionedTableAnchorSignals:d},{pendingPositionedTableTokens:a,positionedTableAnchorSignals:u})}}}function pw(e,t,n,r,o){let a=Bp(e),i=0;for(let l of r){let s=a.get(l.anchorId);if(!s)continue;let d=l.fragmentIndex+i,c=n.length;for(let f of s){if(!t.has(f.table.id))continue;let p=n.length;o(f.table,l.column,l.anchorY,d);for(let m=p;m<n.length;m++){let g=n[m];g.kind==="table"&&(n[m]={...g,floatingWrap:{anchorId:l.anchorId,columnIndex:l.column,float:f.float,sourceOrder:f.sourceIndex}});}t.delete(f.table.id);}let u=n.splice(c);n.splice(d,0,...u),i+=u.length;}r.length=0;}function Hc(e){return e.kind==="table"&&e.outOfFlow===true}function gw(e,t,n){return {text:{top:t,height:Math.max(0,e.contentHeight-t)},margin:{top:n-e.contentInsetTop,height:Math.max(0,e.pageHeight-n-e.marginBottom)},page:{top:-e.contentInsetTop,height:e.pageHeight}}}function hw(e,t){for(let n=t;n<e.length;n+=1){let r=e[n];if(!kn(r))return true}return false}function Ep(e,t,n){let r=n[e.vertAnchor],o=r.height-t,a;if(e.ySpec==="center"?a=r.top+o/2:e.ySpec==="bottom"||e.ySpec==="outside"?a=r.top+o:e.ySpec?a=r.top:a=r.top+e.yPt,!Number.isFinite(a))return r.top;let i=n.page.top+n.page.height;return Math.max(n.page.top,Math.min(a,i))}var pL={kind:"covered",id:"hashed",paragraphId:"covered",fragmentIndex:"covered",clipToBox:"hashed",outOfFlow:"hashed",positionedFrame:"hashed",range:"hashed",props:"hashed",styleId:"hashed",outlineLevel:"hashed",alignment:"hashed",spacing:"hashed",indent:"hashed",bottomBorder:"hashed",borders:"hashed",shading:"hashed",shadingBox:"hashed",paragraphEnd:"hashed",emptyParagraphStyle:"hashed",markRevisions:"hashed",markRevision:"covered",markFormatRevision:"hashed",marker:"hashed",tabStops:"hashed",lines:"hashed",box:"hashed"},gL={kind:"covered",floatingWrap:"hashed",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function bw(e){return Object.keys(e).filter(t=>e[t]==="hashed")}var hL=bw(pL),yL=bw(gL),yw=new WeakMap;function zc(e){let t=yw.get(e);if(t!==void 0)return t;let n=e.kind==="table"?JSON.stringify([Hc(e),...yL.map(r=>e[r])]):JSON.stringify(hL.map(r=>e[r]));return yw.set(e,n),n}function xw(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r!==o&&zc(r)!==zc(o))return false}return true}function Np(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return false;return true}var Sw=Object.freeze([]),Pw=new Map;function Rw(e,t){if(e===t)return true;if(e.size!==t.size)return false;for(let[n,r]of e)if(t.get(n)!==r)return false;return true}function ww(e,t){let n=e,r=-1;for(let o=0;o<=t.length;o++){let a=t[o];if(a?.frame&&r<0&&(r=o),r<0||a&&(a.frame||a.kind!=="paragraph"))continue;let i=Math.min(o,e.length-1),l=a$1(new TextEncoder().encode(J(e.slice(r,i+1))));n===e&&(n=[...e]);for(let s=r;s<=i;s++)n[s]=J([e[s],l]);r=-1;}return n}function Ap(e,t){return e===t||e?.length===t?.length&&e?.signature===t?.signature}var Wc=class{pending;checkpoint(){return this.pending}restore(t){this.pending=t;}same(t){return Ap(this.pending,t)}start(t,n){let r=this.pending?.item;return r&&r.fragment.paragraphId===n&&r.frame.token===t.token?{cursorY:r.fragment.box.y+r.fragment.box.height,previousSpaceAfter:r.fragment.spacing.after,groupId:r.groupId}:{cursorY:0,previousSpaceAfter:0}}add(t,n,r=n.paragraphId,o=0){let a=this.pending?.item,i=a?.groupId===r?a:void 0,l={frame:t,fragment:n,groupId:r,sourceOrder:i?.sourceOrder??o},s=a$1(new TextEncoder().encode(J([this.pending?.signature??"",t.token,r,String(l.sourceOrder),zc(n)])));this.pending={item:l,previous:this.pending,length:(this.pending?.length??0)+1,signature:s};}publish(t,n,r){if(!this.pending)return [];let o=new Array(this.pending.length);for(let l=this.pending;l;l=l.previous)o[l.length-1]=l.item;let a=new Map,i=o.map(l=>{let s=dw(l.fragment,l.frame,t),d={x:t[l.frame.horizontalAnchor].x+l.frame.x,y:s.box.y,width:l.frame.width,height:s.box.height},c=a.get(l.groupId);if(c){let u=Math.max(c.x+c.width,d.x+d.width),f=Math.max(c.y+c.height,d.y+d.height);c.x=Math.min(c.x,d.x),c.y=Math.min(c.y,d.y),c.width=u-c.x,c.height=f-c.y;}else a.set(l.groupId,d);return {item:l,fragment:s}});return this.pending=void 0,i.map(({item:l,fragment:s})=>({...s,positionedFrame:{anchorId:n,columnIndex:r,groupId:l.groupId,sourceOrder:l.sourceOrder,wrap:l.frame.wrap,hSpace:l.frame.hSpace,vSpace:l.frame.vSpace,box:a.get(l.groupId)}}))}};var kw=new WeakMap;function bL(e){let t=kw.get(e);if(t!==void 0)return t;let n=o=>o.some(a=>a.localName==="pBdr"),r=n(e.docDefaultsParagraph);if(!r){for(let o of e.styles.values())if(n(o.paragraphProperties)){r=true;break}}return kw.set(e,r),r}function vw(e,t){return !t||!bL(t)?Wr(e):Fd(xl(t,e).paragraphPropertyNodes)}function Ow(e,t,n,r,o,a){return e.some(i=>{if(i.kind!=="table")return false;let l=Wt(i,t,0,n,r,o,a)?.float;return l!==void 0&&l.ySpec!=="inline"})}function Fw(e,t,n){let r;for(let[o,a]of e.entries()){let i;for(let l of a.fragments){if(l.kind!=="table")continue;let s=l.floatingWrap;if(!s)continue;let d=l.box,c=s.float.distances??{top:0,right:0,bottom:0,left:0},u=s.columnIndex,f=n.columnLefts?.[u]??0,p=n.columnWidths?.[u]??n.contentWidth,m={sourceKind:"table",drawingNodeId:`table:${l.tableId}`,anchorParagraphId:s.anchorId,anchorModelStart:0,sourceOrder:s.sourceOrder,paintLayer:"inFront",relativeHeight:0,allowOverlap:true,columnIndex:u,y:d.y,verticalBand:{x:d.x-c.left,y:d.y-c.top,width:d.width+c.left+c.right,height:d.height+c.top+c.bottom},input:{mode:d.x-c.left<=f&&d.x+d.width+c.right>=f+p?"topAndBottom":"square",contentBounds:d,polygon:null,clipPolygon:null,wrapDistances:c,effectInsets:{top:0,right:0,bottom:0,left:0},textSide:"bothSides",contentLeft:f,contentRight:f+p}};i||(r??=new Map(t),i=[...t.get(o)??[]],r.set(o,i)),i.push(m);}}return r??t}var Tw=new WeakMap;function Vc(e,t,n){let r;if(!n.inlineDrawingLayout){let d=Tw.get(n);d||Tw.set(n,d=new WeakMap),r=d.get(e),r||d.set(e,r=new Map);let c=r.get(t);if(c!==void 0)return c}let o=Wt(e,t,0,n.styleCascade,n.displayMode,n.revisionAuthorFilter,n.compatibilityMode);if(!o?.float||o.float.vertAnchor!=="text")return 0;if(o.float.ySpec)return 1/0;let a=e.children.find(d=>d.kind==="tableProperties");if(a&&a.kind!=="textValue"&&a.children.some(d=>d.kind!=="textValue"&&d.localName==="tblOverlap"&&d.attributes.some(c=>c.localName==="val"&&c.value==="never")))return 1/0;let i=0,l=_l(o,0,0,0,e.id,0,{...nr(n),onCellBreakKey:void 0,borderOwnershipBudget:Jr(),vMergeResolveBudget:Uo(),nextLineId:()=>`floating-table-probe-${i++}`}),s=Math.max(0,o.float.yPt)+l.bottom+(o.float.distances?.bottom??0);return r?.set(t,s),s}function Cw(e,t,n,r,o,a){if(t.size===0)return 0;let i=0;for(let l of Bp(e).get(n)??[]){if(!t.has(l.table.id))continue;let s=Dp(l.table,a.anchorY,r,a.frames,a.earlier,o),d=Vc(l.table,r,o)+s-a.anchorY+Math.min(0,l.float.yPt);i=Math.max(i,d);}return i}function Dp(e,t,n,r,o,a){let i=Wt(e,n,0,a.styleCascade,a.displayMode,a.revisionAuthorFilter,a.compatibilityMode),l=i?.float;if(!i||!l||l.vertAnchor!=="text"||l.ySpec)return t;let s=i.columnWidthsPt.reduce((m,g)=>m+g,0),d=l.distances??{top:0,right:0,left:0},c=Yo(l,s,r)-d.left,u=Vc(e,n,a)-Math.max(0,l.yPt)+d.top,f=t+l.yPt-d.top,p=o.flatMap(m=>m.kind==="table"?m.floatingWrap?[]:[m.box]:m.lines.flatMap(g=>[...g.spans.filter(h=>h.text.trim()).map(h=>h.box),...(g.drawings??[]).map(h=>h.paintBounds)])).sort((m,g)=>m.y-g.y);for(let m of p)c<m.x+m.width&&c+s+d.left+d.right>m.x&&f<m.y+m.height&&f+u>m.y&&(f=m.y+m.height);return f+d.top-l.yPt}function Mw(e){let t=0;for(let n of e)n.kind!=="table"||n.floatingWrap?.float.vertAnchor!=="text"||(t=Math.max(t,n.box.y+n.box.height+(n.floatingWrap.float.distances?.bottom??0)));return t}var Iw=new WeakMap;function Bw(e,t,n){if(!n.pageExclusionZones||!t?.size)return false;let r=Iw.get(n);if(r?.zones!==t){let i=1/0;for(let l of t.values())for(let s of l)i=Math.min(i,n.paragraphOrderIndex?.(s.anchorParagraphId)??s.sourceOrder);r={zones:t,order:i},Iw.set(n,r);}let o=[e],a=0;for(;o.length;){let i=o.pop();if(++a>1e4)return true;if(i.kind==="paragraph"){if(r.order<=(n.paragraphOrderIndex?.(i.id)??Number.MAX_SAFE_INTEGER))return true;continue}if(a+o.length+i.children.length>1e4)return true;for(let l of i.children)l.kind!=="textValue"&&o.push(l);}return false}var Lw=new WeakMap;function Ew(e,t){if(t){let n=Lw.get(t);if(n===void 0){n=t.docDefaultsParagraph.some(r=>r.localName==="framePr");for(let r of t.styles.values())if(r.paragraphProperties.some(o=>o.localName==="framePr")){n=true;break}Lw.set(t,n);}if(n)return true}return e.some(n=>n.kind==="paragraph"&&n.children.some(r=>r.kind==="paragraphProperties"&&r.children.some(o=>o.localName==="framePr")))}function Nw(e,t,n){let r;for(let[o,a]of e.entries()){let i=new Set,l;for(let s of a.fragments){if(s.kind!=="paragraph")continue;let d=s.positionedFrame;if(!d||i.has(d.groupId))continue;i.add(d.groupId);let c=d.box,u=d.columnIndex,f=n.columnLefts?.[u]??0,p=n.columnWidths?.[u]??n.contentWidth,m={left:d.hSpace,right:d.hSpace,top:d.vSpace,bottom:d.vSpace},g=c.x-d.hSpace<=f&&c.x+c.width+d.hSpace>=f+p,h={sourceKind:"frame",sourceOrder:d.sourceOrder,drawingNodeId:`frame:${d.groupId}`,anchorParagraphId:d.anchorId,anchorModelStart:0,paintLayer:"inFront",relativeHeight:0,allowOverlap:true,columnIndex:u,y:c.y,verticalBand:{x:c.x-d.hSpace,y:c.y-d.vSpace,width:c.width+2*d.hSpace,height:c.height+2*d.vSpace},input:{mode:d.wrap==="none"||d.wrap==="notBeside"||g?"topAndBottom":"square",contentBounds:c,polygon:null,clipPolygon:null,wrapDistances:m,effectInsets:{left:0,right:0,top:0,bottom:0},textSide:"bothSides",contentLeft:f,contentRight:f+p}};l??=[...t.get(o)??[]],l.push(h);}l&&(r??=new Map(t),r.set(o,l));}return r??t}function _p(e,t=false){let n=new Set;for(let r of e){let o=new Set;for(let a of r.fragments){if(a.kind!=="paragraph"||!a.positionedFrame)continue;let i=a.positionedFrame,l=i.wrap!=="around"||i.box.x-i.hSpace<=0&&i.box.x+i.box.width+i.hSpace>=r.contentBox.width,s=i.box.y-i.vSpace,d=i.box.y+i.box.height+i.vSpace;(t||l&&d>0&&s<r.contentBox.height&&i.box.height+2*i.vSpace>=r.contentBox.height-.001)&&o.add(i.groupId);}for(let a of r.fragments)a.kind==="paragraph"&&a.positionedFrame&&o.has(a.positionedFrame.groupId)&&n.add(a.paragraphId);}return n}function Aw(e){let{geometry:t,insets:n}=e;return Object.freeze({pageNumber:e.pageNumber,onPageParityRead:e.onPageParityRead,pageWidth:t.width,pageHeight:t.height,marginLeft:t.margin.left,marginRight:t.margin.right,marginBottom:t.margin.bottom,contentInsetTop:n.top,contentInsetBottom:n.bottom,contentWidth:e.contentWidth,contentHeight:e.contentHeight,contentBandHeight:n.height,ownerPartName:e.ownerPartName,storyKind:"body"})}function Dw(e,t,n){if(e.listItem!==void 0||e.shading!==void 0)return false;let{top:r,bottom:o,left:a,right:i,between:l}=e.borders;return (r??o??a??i??l)||n&&zt(e.paragraph,n).length>0?false:t.every(s=>s.drawings.length===0&&!s.pageBreakAfter&&!s.columnBreakAfter&&s.spans.every(d=>d.text.length===0))}function _w(e,t,n,r,o,a,i,l,s,d=0){let c=0,u={...nr(l),cache:void 0,borderOwnershipBudget:void 0,vMergeResolveBudget:void 0,onCellBreakKey:void 0,nextLineId:()=>`probe-progress-${c++}`};return Dl(e,t,n,r,o,false,a,i,u,s,d).fitted}var PL="http://schemas.openxmlformats.org/wordprocessingml/2006/main",jw=8192,RL=32,wL=64,Hw=new WeakMap;function kL(e){let t=Hw.get(e);if(t!==void 0)return t;let n=e.rows.some(r=>r.cells.some(o=>o.vMergeContinue));return Hw.set(e,n),n}var vL=new Set(["p","r","t","tab","br","cr","noBreakHyphen","softHyphen","hyperlink","fldSimple","fldChar","instrText","bookmarkStart","bookmarkEnd","proofErr","pPr","rPr"]);function jp(e){return e.cells[0]?.logicalGridColumn===void 0?e.cells:[...e.cells].reverse()}function TL(e,t){let n=0;for(let r of e){let o=0;for(let a of jp(r)){if(a.vMergeContinue||a.textDirection!=="horizontal"||a.gridColumn!==o||(o+=a.gridSpan,o>t))return false;for(let i of a.blocks){if(i.kind!=="paragraph")return false;let l=[{node:i,depth:0,properties:false}];for(;l.length>0;){let{node:s,depth:d,properties:c}=l.pop();if(++n>jw||d>RL)return false;if(s.kind==="textValue")continue;if(s.namespaceUri!==PL||!c&&!vL.has(s.localName)||s.localName==="br"&&s.attributes.some(f=>f.localName==="type"&&f.value!=="textWrapping")||["drawing","pict","object","txbxContent","tbl","vMerge","framePr"].includes(s.localName)||n+l.length+s.children.length>jw)return false;let u=c||s.localName==="pPr"||s.localName==="rPr";for(let f of s.children)l.push({node:f,depth:d+1,properties:u});}}}if(o!==t)return false}return true}function zw(e,t,n,r,o,a,i,l,s){if(e.cellSpacingPt>0||e.float||t.length===0||t.length>wL||e.columnWidthsPt.length>1024||![r,o,a,i,l].every(Number.isFinite)||kL(e)||(s.pageExclusionZones?.().length??0)>0||!TL([...t,n],e.columnWidthsPt.length))return;let d=t.reduce((T,k)=>T+k.cells.length,n.cells.length);if(s.borderOwnershipBudget&&s.borderOwnershipBudget.intervalsRemaining<d||!n.cantSplit&&n.height.rule!=="exact"&&l>a-o-i+.001)return;let c=t[t.length-1],u=jp(c),f=jp(n),p=dc([u,f],e.tableBorders,e.columnWidthsPt.length)[0],m=new Map,g=[];for(let[T,k]of u.entries()){let w=0;for(let v of p[T].edgeSegments??[]){if(v.side!=="bottom")continue;let I=Sr(v.edge);w=Math.max(w,I),g.push({start:v.gridStart,end:v.gridEnd,extent:I});}m.set(k.id,{...eo(k.margins,k.borders,k.legacyContentAlignment===true),bottom:k.margins.bottom+w});}let h=0;for(let T of f){let k=0,w=T.gridColumn+T.gridSpan;for(;h<g.length&&g[h].end<=T.gridColumn;)h++;for(let v=h;v<g.length&&g[v].start<w;v++)k=Math.max(k,g[v].extent);m.set(T.id,{...eo(T.margins,T.borders,T.legacyContentAlignment===true),top:T.margins.top+k});}if([c,n].every(T=>T.cells.every(k=>{let w=eo(k.margins,k.borders,k.legacyContentAlignment===true),v=m.get(k.id);return w.top===v.top&&w.bottom===v.bottom})))return;let b=0,x={...nr(s),cache:void 0,borderOwnershipBudget:void 0,vMergeResolveBudget:void 0,onCellBreakKey:void 0,cellContentInsets:m,nextLineId:()=>`probe-header-border-${b++}`},y=o;for(let T of t){let k=or(T,e.columnWidthsPt,r,y,true,0,x);if(y=k.bottom,k.remainder!==null||y>a+.001)return null}let O=y-o,S=or(n,e.columnWidthsPt,r,y,false,0,x);return S.remainder!==null||S.bottom>a+.001?null:{bodyRowId:n.id,headerHeight:O,bodyHeight:S.bottom-y,deps:{...s,cellContentInsets:m}}}var IL=Number.MAX_SAFE_INTEGER/1024;function Ww(e,t){let{columnWidth:n,columnLeft:r,contentHeight:o,advanceColumn:a,anchorFrames:i,verticalAnchorFrames:l,styleCascade:s,displayMode:d,revisionAuthorFilter:c,deps:u,shiftAnchor:f,publishFragment:p}=t,m=n(),g=Wt(e,m,0,s,d,c,t.compatibilityMode);if(!g||g.rows.length===0)return {outOfFlow:false};let h=g.float!==void 0&&(g.float.vertAnchor!=="text"||t.positionTextTable===true)&&g.float.ySpec!=="inline",b=t.cursorY,x=h?l():void 0,y=h?()=>IL:o,O=g.columnWidthsPt.reduce((G,ne)=>G+ne,0),S=()=>g.float?Yo(g.float,O,i()):r()+Il(g,n()),T=S();!h&&g.float&&g.float.vertAnchor==="text"&&!g.float.ySpec?t.cursorY=Math.max(0,Math.min(t.cursorY+g.float.yPt,y())):h&&g.float&&x&&(t.cursorY=Ep(g.float,0,x));let k=(G,ne=t.cursorY)=>Km(G,g.columnWidthsPt,T,0,u,g.cellSpacingPt,void 0,u.pageExclusionZones?.().length?ne:void 0),w=[];for(let G of g.rows)if(G.isHeader)w.push(G);else break;let v=0;for(let G of w)v+=k(G,t.cursorY+v);let I=v>(t.unreservedContentHeight?.()??y())+.001,P=!I,C=0,E=t.cursorY,D=[],z=new Map,W=[],j=new Map,M,B,N=(G,ne)=>{ne.cellContentInsets&&j.set(G,ne.cellContentInsets);},A=()=>{if(D.length===0)return;let G=Si(D,g,W,u.borderOwnershipBudget,u.vMergeResolveBudget,void 0,f,u,j),ne=G[G.length-1],ue=Nl({kind:"table",...h?{outOfFlow:true}:{},id:`${e.id}#f${C}`,tableId:e.id,fragmentIndex:C,rows:G,box:{x:T,y:E,width:g.columnWidthsPt.reduce((de,ce)=>de+ce,0),height:ne.box.y+ne.box.height-E}},g.columnWidthsPt,0,z),pe=ue;if(h&&g.float&&x){let ce=Ep(g.float,ue.box.height,x)-ue.box.y;if(pe=xi([ue],ce)[0],Math.abs(ce)>.001){let Pe=Ie=>{for(let oe of Ie)if(oe.kind==="paragraph")f(oe.paragraphId,ce);else for(let ke of oe.rows)for(let xe of ke.cells)Pe(xe.blocks);};for(let Ie of ue.rows)for(let oe of Ie.cells)Pe(oe.blocks);}}p(pe),C+=1,D=[],W=[],j=new Map,M=void 0;},H=(G,ne)=>{if(w.length===0)return;let ue=G?B?.():void 0;if(ue===null)return;let pe=ue?.headerHeight??v;if(G&&t.cursorY+pe>y()+.001)return;t.cursorY+pe>y()+.001&&t.cursorY>0&&(A(),a(),T=S(),E=t.cursorY);let de=!G&&t.cursorY+pe>y()+.001?t.unreservedContentHeight?.()??y():y();if(!G&&t.cursorY+pe>de+.001){I=true,P=false;return}if(G&&!ue&&ne&&!ne(t.cursorY+pe))return;let ce=ue?.deps??u;for(let Pe of w){let Ie=or(Pe,g.columnWidthsPt,T,t.cursorY,G,0,ce,g.cellSpacingPt);if(Ie.bottom>de+.001)throw new rr("table-row-overheight",`Table header row ${Pe.id} overflowed the page content box`);D.push(Ie.record),N(Ie.record,ce),W.push(Pe),t.cursorY=Ie.bottom;}M=ue;},$=G=>{A(),a(),T=S(),E=t.cursorY,P&&H(true,G);};I||H(false);let R=g.rows.slice(I?0:w.length),Y=Xm(g,()=>T,0,u,R),X,U=0,K=0,Q=(G,ne)=>{X=$P(Y,G,t.cursorY,y()),K=X?.heightFloorPt??k(ne??R[G]),U=X?.heightFloorPt??(M?.bodyRowId===R[G]?.id?M.bodyHeight:K);};for(let[G,ne]of R.entries()){I&&G>=w.length&&(P=true),Q(G,ne);let ue=$m(ne),pe=false,de=0,ce=false,Pe=()=>M?.bodyRowId===ne.id?M.deps:u;B=()=>pe?void 0:zw(g,w,ne,T,t.cursorY,y(),v,K,u);let Ie=X!==void 0&&X.detachedSpanHeightPtByCellId===void 0,oe=ke=>{let xe=y(),Re=xe-ke;return Re<=.001?false:!pe&&U<=Re+.001?true:!pe&&(ne.cantSplit||ne.height.rule==="exact")?false:_w(ne,g.columnWidthsPt,T,ke,xe,pe,0,u,ue,g.cellSpacingPt)};for(!Ie&&U<=y()+.001&&t.cursorY+U>y()+.001&&t.cursorY>0&&($(oe),ce=true,Q(G));;){if(de+=1,de>Gm)throw new rr("table-row-fragment-limit",`Table row ${ne.id} exceeded ${Gm} page fragments`);let ke=y()-t.cursorY;if(ke<=.001&&t.cursorY>0){if(ce)throw new rr("table-row-overheight",`Table row ${ne.id} cannot fit after repeated header rows`);$(oe),ce=true,Q(G);continue}if(!pe&&U<=ke+.001){let he=or(ne,g.columnWidthsPt,T,t.cursorY,false,0,Pe(),g.cellSpacingPt,X,y());if(he.bottom>y()+.001)throw new rr("table-row-overheight",`Table row ${ne.id} overflowed the page content box after placement`);let ye=he.remainder!==null;if(D.push(he.record),N(he.record,Pe()),W.push(ye?Tc(ne,pe,true):ne),t.cursorY=he.bottom,!ye)break;ue=he.remainder,pe=true,ce=false,$(oe);continue}if(!pe&&(ne.cantSplit||ne.height.rule==="exact")){if(t.cursorY>0&&!ce){$(oe),ce=true,Q(G);continue}let he=t.unreservedContentHeight?.()??y();if(he>y()+.001&&U<=he-t.cursorY+.001){let ye=or(ne,g.columnWidthsPt,T,t.cursorY,false,0,Pe(),g.cellSpacingPt,X,he);if(ye.bottom<=he+.001&&ye.remainder===null){D.push(ye.record),N(ye.record,Pe()),W.push(ne),t.cursorY=ye.bottom;break}}throw new rr("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 xe=Dl(ne,g.columnWidthsPt,T,t.cursorY,y(),false,pe,0,u,ue,g.cellSpacingPt,X);if(!xe.fitted&&t.cursorY>0&&!ce){$(oe),ce=true,Q(G);continue}let Re=t.unreservedContentHeight?.()??y();if(!xe.fitted&&t.cursorY<=.001&&!ce&&Re>y()+.001){$(oe),ce=true,Q(G);continue}if(!xe.fitted)throw new rr(xe.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",xe.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(xe.bottom>y()+.001)throw new rr("table-row-overheight",`Table row ${ne.id} overflowed the page content box`);let Me=xe.remainder!==null,Be=Tc(ne,pe,Me);if(D.push(xe.record),W.push(Be),t.cursorY=xe.bottom,!Me)break;ue=xe.remainder,pe=true,ce=false,$(oe);}}return A(),h&&(t.cursorY=b),{outOfFlow:h}}var Oi="http://schemas.openxmlformats.org/wordprocessingml/2006/main",OL=32,Vw=1e4,Gw=1e4;function FL(e){if(e.kind!=="paragraph"||e.listItem||e.shading||e.paragraph.children.some(r=>r.kind==="paragraphProperties"?false:r.kind==="textValue"||r.namespaceUri!==Oi?true:["bookmarkStart","bookmarkEnd","proofErr"].includes(r.localName)?r.children.length!==0:r.kind!=="run"||r.children.some(o=>o.kind!=="runProperties"))||e.props.some(r=>["framePr","numPr","pBdr","shd","pageBreakBefore"].includes(r.localName)))return false;let t=[e.paragraph],n=0;for(;t.length;){let r=t.pop();if(++n>Gw||r.namespaceUri!==Oi||["ins","del","moveFrom","moveTo","pPrChange","rPrChange","vanish","webHidden"].includes(r.localName)||n+t.length+r.children.length>Gw)return false;for(let o of r.children){if(o.kind==="textValue")return false;t.push(o);}}return true}function CL(e){let t=[e],n=0;for(;t.length;){let r=t.pop();if(++n>Vw||r.namespaceUri!==Oi||r!==e&&r.kind==="table"||["vMerge","hMerge","tblHeader","drawing","pict","object","fldChar","fldSimple","instrText","footnoteReference","endnoteReference","ins","del","moveFrom","moveTo","sdt","altChunk","framePr"].includes(r.localName)||r.localName==="tblOverlap"&&!r.attributes.some(o=>o.namespaceUri===Oi&&o.localName==="val"&&o.value==="overlap")||n+t.length+r.children.length>Vw)return false;for(let o of r.children)o.kind!=="textValue"&&t.push(o);}return true}function ML(e){let t;for(let a of e.children)if(a.kind==="tableProperties"){if(t)return false;t=a;}if(!t)return false;let n=t.children.filter(a=>a.kind!=="textValue"&&a.localName==="tblpPr");if(n.length!==1)return false;let r=n[0];if(r.kind==="textValue"||r.namespaceUri!==Oi||r.children.length)return false;let o=new Set;for(let a of r.attributes){if(a.namespaceUri!==Oi||o.has(a.localName))return false;if(o.add(a.localName),a.localName==="vertAnchor"){if(a.value!=="text")return false}else if(a.localName==="horzAnchor"){if(!["text","margin","page"].includes(a.value))return false}else if(a.localName==="tblpXSpec"){if(!["left","center","right","inside","outside"].includes(a.value))return false}else if(a.localName==="tblpX"||a.localName==="tblpY"){if(!/^-?\d+$/.test(a.value)||Math.abs(Number(a.value))>31680)return false}else if(["leftFromText","rightFromText","topFromText","bottomFromText"].includes(a.localName)){if(!/^\d+$/.test(a.value)||Number(a.value)>31680||(a.localName==="topFromText"||a.localName==="bottomFromText")&&Number(a.value)!==0)return false}else return false}return o.has("vertAnchor")}function $w(e,t,n,r,o,a){let i=e.length-1,l=e[i];if(!l||!FL(l))return;let s=i,d=[],c=[l.key];for(let u=i-1;u>=0;u-=1){let f=e[u];if(f.kind!=="table")break;if(!CL(f.table)||!ML(f.table))return;let m=Wt(f.table,t,0,n,r,o,a)?.float;if(!m||m.vertAnchor!=="text"||m.ySpec||d.length>=OL)return;d.push(f.table),c.push(f.key),s=u;}if(d.length)return {start:s,anchorIndex:i,tables:d.reverse(),token:J(c)}}function Kw(e,t){let{cursorY:n,anchorHeight:r,contentWidth:o,contentHeight:a}=t;if(!Number.isFinite(r)||r<=0||n+r>a+.001)return;let i=e.tables.map(p=>Wt(p,o,0,t.styleCascade,t.displayMode,t.authorFilter,t.deps.compatibilityMode)),l=[],s=n+r,d=0,c={...nr(t.deps),onCellBreakKey:void 0,borderOwnershipBudget:Jr(),vMergeResolveBudget:Uo(),nextLineId:()=>`terminal-table-probe-${d++}`};for(let p=0;p<i.length;p+=1){let m=i[p];if(!m?.float||!m.rows.length)return;let g=m.columnWidthsPt.reduce((y,O)=>y+O,0),h=Yo(m.float,g,t.frames),b=n+m.float.yPt;if(![h,b,g].every(Number.isFinite)||g<=0||h<0||h+g>o+.001||b<n||b>a)return;let x=_l(m,h,b,0,e.tables[p].id,0,c);if(!Number.isFinite(x.bottom)||x.bottom>a+.001||l.some(y=>h<y.right&&h+g>y.left&&b<y.bottom&&x.bottom>y.top))return;s=Math.max(s,x.bottom),l.push({left:h,top:b,right:h+g,bottom:x.bottom});}let u=[];return {fragments:i.map((p,m)=>{let g=[];u.push(g);let{left:h,top:b}=l[m];return {..._l(p,h,b,0,e.tables[m].id,0,{...t.deps,onCellBreakKey:y=>g.push(y)}).fragment,outOfFlow:true}}),bottom:s,cellBreakKeys:u}}function Hp(e,t,n,r){let o=`line:${e}:${n}:${t}`;return r===void 0?o:`${o}:occ:${r}`}function Xw(e){if(e.delta===0)return true;let t=e.delta%2===0||!e.evenAndOddHeaders&&!e.parityDependent&&!e.usedPageParity,r=!(e.titlePage||e.continuedInsets)||e.markPageCount>0&&e.delta+e.markPageCount>0;return t&&r&&!e.hasNoteReserves&&!e.hasExclusionZones}var Fi=1;function Gc(e,t){let n=Math.max(Fi,t),r=Math.max(1,Math.min(12,Math.floor(e.count))),o=e.definitions??[],a=e.equalWidth===false&&o.length===r&&o.every(c=>c.widthTwips>0),i,l;if(a){i=o.map(p=>Math.max(Fi,Ze(Xe(p.widthTwips)))),l=o.slice(0,-1).map(p=>Math.max(0,Ze(Xe(p.gapTwips))));let c=l.reduce((p,m)=>p+m,0),u=Math.max(r*Fi,n-c),f=i.reduce((p,m)=>p+m,0);if(f>u){let p=u/f;i=i.map(m=>Math.max(Fi,m*p));}}else {let c=Math.max(0,Ze(Xe(e.gapTwips))),u=Math.min(c,Math.max(0,(n-r*Fi)/(r-1||1)));l=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(Fi,(n-l.reduce((p,m)=>p+m,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}}var LL=8,Ci=[],Yw=new TextEncoder;function EL(e,t){let n=a$1(Yw.encode(e===void 0?"undefined":`string:${e}`)),r=a$1(Yw.encode(t));return `control-producer:v1:${n}:${r}`}function Zw(e,t){let n=Ci.findIndex(o=>o.base===e&&o.token===t);if(n>=0){let[o]=Ci.splice(n,1);return Ci.push(o),o.producer}let r=EL(e,t);return Ci.push({base:e,token:t,producer:r}),Ci.length>LL&&Ci.shift(),r}var Uw=new WeakMap,qw=null;function NL(e,t,n,r,o,a,i,l){return e!=null&&e.base===t&&e.noteMarks===n&&e.defaultTabStopPt===r&&e.displayMode===o&&e.authorFilter===a&&e.pageNumberFormat===i&&e.compatibilityMode===l}function Jw(e,t,n,r,o,a,i,l){let s=t?Uw.get(t):qw;if(NL(s,e,n,r,o,a,i,l))return s.producer;let d=(e??"unversioned-measurer")+(t?`|sc:${t.cacheToken}`:"")+(n?`|nm:${IS(n)}`:"")+(r!==void 0?`|dts:${r}`:"")+(o===_e?"":`|rev:${o}`)+(a?`|reviewers:${a.cacheKey}`:"")+(i!==void 0?`|pnf:${i}`:"")+(l!==void 0?`|compat:${l}`:""),c={base:e,noteMarks:n,defaultTabStopPt:r,displayMode:o,authorFilter:a,pageNumberFormat:i,compatibilityMode:l,producer:d};return t?Uw.set(t,c):qw=c,d}var $c=class{constructor(t){this.dependencies=t;}dependencies;capture(t){let{paragraphFrames:n,positionedFlow:r,pendingFloatIds:o,floatSignals:a,anchorPageDeferCounts:i}=this.dependencies;return {pageCount:t.pageCount,pageFragments:[...t.pageFragments],pendingAnchoredDrawings:[...t.pendingAnchoredDrawings],pendingParagraphFrames:n.checkpoint(),deferredAnchoredDrawings:t.deferredAnchoredDrawings.length>0?[...t.deferredAnchoredDrawings]:Sw,anchorPageDeferCounts:i.size>0?new Map(i):Pw,...r.checkpoint(o,a),cursorY:t.cursorY,lineCounter:t.lineCounter,previousSpaceAfter:t.previousSpaceAfter,flowColumnIndex:t.flowColumnIndex}}restore(t){let{paragraphFrames:n,positionedFlow:r,pendingFloatIds:o,floatSignals:a,anchorPageDeferCounts:i}=this.dependencies;n.restore(t.pendingParagraphFrames),i.clear();for(let[l,s]of t.anchorPageDeferCounts)i.set(l,s);return r.restore(t,o,a),{pageCount:t.pageCount,pageFragments:[...t.pageFragments],pendingAnchoredDrawings:[...t.pendingAnchoredDrawings],deferredAnchoredDrawings:[...t.deferredAnchoredDrawings],cursorY:t.cursorY,lineCounter:t.lineCounter,previousSpaceAfter:t.previousSpaceAfter,flowColumnIndex:t.flowColumnIndex}}};function Qw(e,t){return e.cursorY===t.cursorY&&e.previousSpaceAfter===t.previousSpaceAfter&&e.flowColumnIndex===t.flowColumnIndex&&xw(e.pageFragments,t.pageFragments)&&Ap(e.pendingParagraphFrames,t.pendingParagraphFrames)&&Np(e.pendingAnchoredDrawings,t.pendingAnchoredDrawings)&&Np(e.deferredAnchoredDrawings,t.deferredAnchoredDrawings)&&Rw(e.anchorPageDeferCounts,t.anchorPageDeferCounts)&&Lp(e,t)}function ek(e,t,n){return J([...e].map(([r,o])=>`${n}${r}=${o.flowHeight}`).sort())}function rk(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${ek(e.headers,false,"h")};f:${ek(e.footers,false,"f")}`:""}function Kc(e,t,n){if(e.sectionFurniture)return e.sectionFurniture[t];if(t===n-1)return e.furniture}function AL(e,t){let n=e.map((r,o)=>{let a=Yr(r.properties),i=Kc(t,o,e.length),l=r.properties.pageNumbering,s=l?`pn:${J([l.start??"",l.fmt??"",l.chapStyle??"",l.chapSep??""].map(String))}`:"pn:",d=r.properties.columns,c=`cols:${d.count},${d.gapTwips},${d.equalWidth===false?0:1},${d.separator?1:0};${(d.definitions??[]).map(u=>`${u.widthTwips}/${u.gapTwips}`).join(",")}`;return J([r.properties.breakType,a.width,a.height,a.margin.top,a.margin.right,a.margin.bottom,a.margin.left,a.headerDistance??36,a.footerDistance??36,rk(i),s,c].map(String))});return J(n)}function DL(e,t,n){if(!e)return null;let r=e.multi;if(r&&r.structureKey===t&&r.sections.length===n)return r;let o={structureKey:t,sections:Array.from({length:n},()=>ao()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1,previousPageRefToken:""};return e.multi=o,o}function _L(e){return e!=="continuous"}function jL(e,t){return e.width===t.width&&e.height===t.height}function HL(e){let t=e.contentBox.y-e.box.y;return {top:t,bottom:e.box.height-t-e.contentBox.height,height:e.contentBox.height}}function zL(e,t){if(t.fragments.length===0&&!t.columnSeparators?.length&&!t.anchoredDrawings?.length)return e;let n=e.anchoredDrawings||t.anchoredDrawings?Object.freeze([...e.anchoredDrawings??[],...t.anchoredDrawings??[]]):void 0;return {...e,fragments:t.fragments.length>0?[...e.fragments,...t.fragments]:e.fragments,...(e.columnSeparators?.length||t.columnSeparators?.length)&&{columnSeparators:[...e.columnSeparators??[],...t.columnSeparators??[]]},...n?{anchoredDrawings:n}:{}}}function tk(e,t,n){e.previous=t,e.startLineCounter=0,e.endLineCounter=n,e.keys=[],e.checkpoints=[],e.context="",e.producer="";}var nk=new WeakMap;function WL(e,t,n,r,o,a){let i=nk.get(e);if(i&&i.globalIndex===t&&i.sheetY===n&&i.pageNumber===r&&i.sectionPageCount===o&&i.format===a)return i.published;let l=ea(e,t,n),s=Aa([l],r,o,a)[0];return nk.set(e,{globalIndex:t,sheetY:n,pageNumber:r,sectionPageCount:o,format:a,published:s}),s}function ok(e,t,n,r,o){let{session:a,...i}=r,l=AL(t,r),s=DL(a,l,t.length),d=i.cache&&i.retainKeys!==false?i.retainKeys??(i.cache.retentionPassDue?.()??true?new Set:false):false,c=()=>{d&&!i.retainKeys&&i.cache?.retain(d);},u=[],f=[],p=[],m=0,g=0,h=0,b=0,x=0,y=0,O=0,S=true,T=[],k=null,w="",v=1;for(let E=0;E<t.length;E+=1){let D=t[E],z=e.slice(D.blockStart,D.blockEndExclusive),W=Yr(D.properties),j=Kc(r,E,t.length),M=u.length,B=m,N=s?.spans[E],A=rk(j);if(z.length===0&&!_L(D.properties.breakType)){p.push({startIndex:M,pageCount:0,sheetY:B,remappedPages:[],sourcePages:[]});continue}let H=E>0&&D.properties.breakType==="continuous"&&u.length>0&&S&&k!==null&&jL(k,W)&&w===A,$=s?.sections[E],R=D.properties.columns.count>1&&t[E+1]?.properties.breakType==="continuous",Y=H?HL(u[u.length-1]):void 0,X=D.properties.pageNumbering?.fmt,U=H?u[u.length-1]?.pageFieldSource?.format:void 0,K=H&&!Nr("PAGE",U)?U:X,Q=o(z,n,{...i,retainKeys:d,geometry:W,furniture:j,sectionColumns:D.properties.columns,...R?{balanceColumns:R}:{},lineCounterStart:g,pageIndexStart:H?M-1:M,...H?{flowStartY:y,spaceBeforeCarry:O}:{},...Y?{continuedPageInsets:Y}:{},...K!==void 0?{bodyPageNumberFormat:K}:{},...$?{session:$}:{}});T.push({startIndex:M,at:Q.overflowShellAt}),g=Q.lineCounter,y=Q.endCursorY,O=Q.endSpaceAfter,S=Q.endsOpenPage,k=W,w=A,$?(h+=$.stats.placed,b+=$.stats.total):(h+=z.length,b+=z.length);let G=$!==void 0&&$.stats.placed===0&&$.stats.reusedPages===Q.pages.length&&N!==void 0&&N.pageCount===Q.pages.length&&N.sourcePages.length===Q.pages.length&&N.sourcePages.every((oe,ke)=>oe===Q.pages[ke]),ne=N!==void 0&&N.startIndex===M&&N.sheetY===B&&N.remappedPages.length===Q.pages.length,ue=D.properties.pageNumbering,pe=ue?.start!==void 0?ue.start:v,de=ue?.fmt,ce=N?.remappedPages[0],Pe=N===void 0||N.remappedPages.length===0||ce?.pageFieldSource!==void 0&&ce.pageFieldSource.pageNumber===pe&&ce.pageFieldSource.sectionPageCount===N.remappedPages.length&&ce.pageFieldSource.format===de,Ie;if(H){let oe=u.length-1,ke=u[oe],xe=zL(ke,Q.pages[0]);if(xe!==ke){u[oe]=xe;let Be=f.lastIndexOf(ke);Be!==-1&&(f[Be]=xe);}let Re=[];for(let Be of Q.pages.slice(1)){let he=ea(Be,u.length+Re.length,m);Re.push(he),m=he.box.y+he.box.height+na;}let Me=Re.length+1;Ie=Aa(Re,pe+1,Me,de);for(let Be of Ie)u.push(Be),f.push(Be);v=pe+Me;}else if(G&&ne&&Pe){Ie=N.remappedPages,x+=Ie.length;for(let oe of Ie)u.push(oe),f.push(oe),m=oe.box.y+oe.box.height+na;v=pe+Ie.length;}else {let oe=[];for(let ke of Q.pages){let xe=WL(ke,u.length+oe.length,m,pe+oe.length,Q.pages.length,de);oe.push(xe),m=xe.box.y+xe.box.height+na;}Ie=oe;for(let ke of Ie)u.push(ke),f.push(ke);v=pe+Ie.length;}p.push({startIndex:M,pageCount:Ie.length,sheetY:B,remappedPages:Ie,sourcePages:Q.pages});}if(u.length===0){let E=Yr(t[0]?.properties??On),D=o([],n,{...i,retainKeys:d,geometry:E,sectionColumns:t[0]?.properties.columns??On.columns});c();let z=Dr({revision:n,pages:D.pages});return Zl(z,(W,j,M)=>D.overflowShellAt(j,M)),s&&(s.spans=[],s.previousRemapped=D.pages,s.previousFinalized=z,s.previousPageCount=z.pages.length,s.previousPageRefToken=Xu(D.pages)),a&&(tk(a,z,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),z}let I=Dr({revision:n,pages:u}),P=I,C=Xu(u);if(s?.previousFinalized&&s.previousPageCount===I.pages.length&&s.previousRemapped.length===f.length&&s.previousPageRefToken===C){let E=s.previousFinalized.pages,D=s.previousRemapped,z=I.pages.map((W,j)=>f[j]===D[j]&&E[j]?E[j]:W);P={...I,pages:z};}return s&&(s.spans=p,s.previousRemapped=f,s.previousFinalized=P,s.previousPageCount=P.pages.length,s.previousPageRefToken=C),a&&(tk(a,P,g),a.stats={placed:h,total:b||1,reusedPages:x,fullPasses:a.stats.fullPasses+(h===b&&x===0?1:0)}),Zl(P,(E,D,z)=>{let W=T[0];for(let M of T)M.startIndex<=E&&(W=M);return (W??T[T.length-1])?.at(D,z)}),c(),P}function ak(e,t,n){let r=t.lefts.map(()=>n);for(let o of e.fragments){if(kn(o))continue;let a=0;for(let i=t.count-1;i>=0;i-=1)if(o.box.x+.5>=t.lefts[i]){a=i;break}r[a]=Math.max(r[a],o.box.y+o.box.height);}return r}var VL=.25,GL=20;function ik(e,t,n,r){let o=Gc(n.sectionColumns??On.columns,n.geometry.width-n.geometry.margin.left-n.geometry.margin.right);if(!n.balanceColumns||o.count<2||n.columnRegionBottom!==void 0)return n.session&&(n.session.balanceLimit=null),r(e,t,n);let a=n.session,i=n.flowStartY??0,l={...n,session:void 0},s=h=>{let b=h.pages[0],x=b?Math.max(...ak(b,o,i)):h.endCursorY;return a&&(a.endCursorY=x),{...h,endCursorY:x}};if(a&&a.balanceLimit!==null){let h=a.balanceLimit,b=r(e,t,{...n,columnRegionBottom:h});if(a.stats.placed===0&&a.stats.reusedPages===b.pages.length)return a.balanceLimit=h,s(b)}let d=r(e,t,l);if(d.pages.length!==1||!d.endsOpenPage)return a&&(a.balanceLimit=null),r(e,t,n);let c=ak(d.pages[0],o,i),u=c.reduce((h,b)=>h+Math.max(0,b-i),0);if(u<=0)return a&&(a.balanceLimit=null),r(e,t,n);let f=i+u/o.count,p=Math.max(...c)+.01,m=h=>{try{let b=r(e,t,{...l,columnRegionBottom:h});return b.pages.length===1&&b.endsOpenPage}catch{return false}};for(let h=0;h<GL&&p-f>VL;h+=1){let b=(f+p)/2;m(b)?p=b:f=b;}let g=r(e,t,{...n,columnRegionBottom:p});return a&&(a.balanceLimit=p),s(g)}var KL=2,lk=new WeakMap,sk=new WeakMap;function zp(e){if(e===void 0||e.size===0)return "";let t=sk.get(e);if(t!==void 0)return t;let n=[...e].join(",");return sk.set(e,n),n}function XL(e){let t=zp(e.chrome),n=zp(e.placeholder),r=zp(e.suppressed);return t===""&&n===""&&r===""?"":`${t}|${n}|${r}`}function YL(e,t){let n=t.chrome?.has(e)??false,r=t.placeholder?.has(e)??false,o=t.suppressed?.has(e)??false;return !n&&!r&&!o?"":`${n?1:0}${r?1:0}${o?1:0}`}function _Y(e,t,n){let r=n.displayMode??_e,o=n.revisionAuthorFilter,a=hn(e,r,o),i=$o(e,a).sections,l=ki(e),s={...n,displayMode:r,producer:Zw(n.producer,l),tocFieldChromeParagraphIds:n.tocFieldChromeParagraphIds??WR(e),emptyTocPlaceholderParagraphIds:n.emptyTocPlaceholderParagraphIds??VR(e),emptyTocSuppressedResultParagraphIds:n.emptyTocSuppressedResultParagraphIds??GR(e)},d=n.drawingSourceOrder;!d&&n.inlineDrawingLayout&&(d=aR(e,n.inlineDrawingLayout));let c=n.session?Gx(d?{...s,drawingSourceOrder:d}:s,a,n.session):si(d?{...s,drawingSourceOrder:d}:s,a),u=nm(a,c.listItems,n.notes?{footnotesPart:n.notes.footnotesPart,endnotesPart:n.notes.endnotesPart}:void 0,n.notes?rS(n.notes,i):void 0,r,o),f=u===null?c:{...c,refFields:u},p=h=>{if(i.length>1)return ok(a,i,t,h,Xc);let b=i[0],x=h.geometry??(b?Yr(b.properties):Ks),y=Kc(h,0,i.length)??h.furniture,O=b?.properties.pageNumbering,S=Xc(a,t,{...h,geometry:x,furniture:y,sectionColumns:b?.properties.columns??On.columns,...O?.fmt?{bodyPageNumberFormat:O.fmt}:{}}),T=O,k=fp({revision:S.layout.revision,pages:Aa(S.pages,T?.start??1,S.pages.length,T?.fmt)},S.layout),w=Dr(k);return Zl(w,(v,I,P)=>S.overflowShellAt(I,P)),h.session&&(h.session.multi=null,h.session.previous=w),w},m=h=>{let b=h;if(h.displayMode!==r){let{contentControls:y,controlContextToken:O,...S}=h;b={...S,displayMode:r,...y!==void 0?{contentControls:y}:{},...O!==void 0?{controlContextToken:O}:{}};}let x=mp(b,e,l);return n.session&&(n.session.previous=x),x};if(!n.notes)return n.session&&(n.session.notes=null,n.session.notePageBottomReserves=null),m(p(f));let g=nw(n.notes,u?{...n,refFields:u}:n);return m(ew(e,i,f,g,p))}function UL(e,t,n){let r=n.geometry,o=n.cache?.keyFor?.bind(n.cache)??md,a=r.width-r.margin.left-r.margin.right,i=Gc(n.sectionColumns??On.columns,a);if((n.inlineDrawingLayout||Ew(e,n.styleCascade)||Ow(e,a,n.styleCascade,n.displayMode??_e,n.revisionAuthorFilter,n.compatibilityMode))&&n.drawingExclusionPass===void 0&&!n.drawingExclusionConverged){let L=me=>{let ve=n.inlineDrawingLayout?.projectionForAtom?.(me)?.drawingNodeId??me;return n.drawingSourceOrder?.get(ve)},V=Object.freeze({columnCount:i.count,columnGapPt:i.gaps[0]??0,contentWidth:a,columnLefts:i.lefts,columnWidths:i.widths}),ee=(me,ve=false)=>{let qe=n.inlineDrawingLayout?ve?ax(me,n.inlineDrawingLayout,n.drawingLayoutEpoch,a,n.drawingSourceOrder,V):Ef(me,n.inlineDrawingLayout,a,L,V):new Map;return Nw(me,Fw(me,qe,V),V)},te=new Map,Se=null,Ee=false,Fe=new Set,Ae=me=>(Xc(e,t,me)),ge=me=>{let ve=_p(me.pages);if(ve.size===0)return null;let qe=n.paragraphFrameFallbackRound??0,Te=new Set(n.disabledParagraphFrameIds);for(let Nn of qe>=3?_p(me.pages,true):ve)Te.add(Nn);let tt=n.session?ao():void 0,dn=Xc(e,t,{...n,session:tt,disabledParagraphFrameIds:Te,paragraphFrameFallbackRound:qe+1});return n.session&&tt&&Mp(n.session,tt),dn},dt=n.session?.previous?.pages;if(dt){te=ee(dt,true),Se=Ae({...n,drawingExclusionPass:0,drawingExclusionZonesByPage:te});let me=ge(Se);if(me)return me;if(Se.pages===dt)return Se;let ve=ee(Se.pages,true);if(Hd(te,ve))return Se;te=new Map(ve),Fe.add(zd(ve));}let et=(me,ve)=>(n.session&&ve&&Mp(n.session,ve),me),Z=me=>{let ve=n.session?ao():void 0;return et(Ae({...n,session:ve,drawingExclusionConverged:true,drawingExclusionZonesByPage:me}),ve)};for(let me=0;me<Do;me+=1){let ve=n.session?ao():void 0;Se=Ae({...n,session:ve,drawingExclusionPass:me,drawingExclusionZonesByPage:te});let qe=ge(Se);if(qe)return qe;let Te=ee(Se.pages);if(Te.size===0)return me===0&&te.size===0?et(Se,ve):Z(Te);if(Hd(te,Te))return et(Se,ve);let tt=zd(Te);if(Fe.has(tt)){Ee=true,te=Te;break}Fe.add(tt),te=new Map(Te);}if(!Ee)for(let me=0;me<KL&&!Ee;me+=1){let ve=n.session?ao():void 0;Se=Ae({...n,session:ve,drawingExclusionPass:Do+me,drawingExclusionZonesByPage:te});let qe=ge(Se);if(qe)return qe;let Te=ee(Se.pages),tt=zd(Te);if(Hd(te,Te))return et(Se,ve);if(Fe.has(tt)){Ee=true,te=Te;break}Fe.add(tt),te=new Map(Te);}if(!Ee)throw new Ja(`wrap exclusion reflow did not converge within ${Do} passes`);return Z(te)}let l=n.measurer,s$1=n.cache,d=n.styleCascade,c=n.listItems,u=n.refFields,f=n.defaultTabStopPt,p=n.displayMode??_e,m=n.revisionAuthorFilter,g=p==="all-markup",h=n.tocFieldChromeParagraphIds,b=n.emptyTocPlaceholderParagraphIds,x=n.emptyTocSuppressedResultParagraphIds,y={chrome:h,placeholder:b,suppressed:x},O=XL(y),S=Jw(n.disabledParagraphFrameIds?.size?J([n.producer??"",J([...n.disabledParagraphFrameIds].sort())]):n.producer,d,n.noteMarks,f,p,m,n.bodyPageNumberFormat,n.compatibilityMode),T=i.widths[0],k=n.furniture,w=r.headerDistance??36,v=r.footerDistance??36,I=n.pageBottomReserves,P=n.session,C=n.lineCounterStart??0,E=CR(k,w,v),D=n.flowStartY??0,z=n.spaceBeforeCarry??0,W=n.pageIndexStart??0,j=P0({...k?{furniture:k}:{},pageHeight:r.height,marginTop:r.margin.top,marginBottom:r.margin.bottom,headerDistance:w,footerDistance:v,pageIndexStart:W,...n.continuedPageInsets?{continuedPageInsets:n.continuedPageInsets}:{}}),M=Object.freeze(n.bodyPageNumberFormat!==void 0?{format:n.bodyPageNumberFormat}:{}),B=P?.previous?P.previous.pages.length+1:1/0,N=n.columnRegionBottom,A=`|cols:${i.widths.join(",")};${i.gaps.join(",")};${i.separator?1:0}${N!==void 0?`;bal:${N}`:""}`,H=n.continuedPageInsets,$=H?`|cont:${H.top},${H.height}`:"",R=L=>`${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|fs:${D},${z}${$}${E}${L}${A}`,Y=R(Nc(I,W,B)),X=W&1,U=false,K=null,Q=()=>{U=true;},G=[],ne=R0({...k?{furniture:k}:{},geometry:r,headerDistance:w,footerDistance:v,pageIndexStart:W,contentWidth:a,insetsFor:j,pageCount:()=>G.length}),{pageBox:ue,furnitureFor:pe,overflowShellAt:de}=ne,ce=L=>{let V=Math.max(1,j(G.length).height-L);return N!==void 0&&G.length===0?Math.max(1,Math.min(V,N)):V},Pe=()=>ce(I?.get(W+G.length)??0),Ie=()=>ce(0),oe=n.inlineDrawingLayout!==void 0,xe=oe?Oc(L=>Fc(L,{measurer:l,producer:S,cache:s$1,styleCascade:d,...f!==void 0?{defaultTabStopPt:f}:{},compatibilityMode:n.compatibilityMode,...p?{displayMode:p}:{},...m?{revisionAuthorFilter:m}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.numberingIndex?{numberingIndex:n.numberingIndex}:{},inlineDrawingLayout:n.inlineDrawingLayout,drawingTokenForParagraph:n.drawingTokenForParagraph,projectionTokenForParagraph:n.projectionTokenForParagraph,projectionTokenForTable:n.projectionTokenForTable}),n.numberingIndex,d,p,m):void 0,Re=(L,V)=>{let ee=L.kind==="paragraph"?n.drawingTokenForParagraph?.(L)||n.drawingLayoutToken||"":L.kind==="table"&&n.drawingTokenForParagraph?sR(L,n.drawingLayoutEpoch,n.drawingTokenForParagraph)||n.drawingLayoutToken||"":n.drawingLayoutToken||"",te=L.kind==="paragraph"?n.projectionTokenForParagraph?.(L)??"":L.kind==="table"&&n.projectionTokenForParagraph?n.projectionTokenForTable?.(L)??Bo(L,n.projectionTokenForParagraph):"",Se=xe?.hostedListTokenForParagraph?.(L)??"",Ee=L.kind==="table"?Oy(L,c):c?.get(L.id)?.cacheToken??"",Fe=Ee===""&&Se===""?"":J([Ee,Se]),Ae=u===void 0?"":L.kind==="table"?gS(L,u):u.tokenForParagraph(L.id),ge=lk.get(L);if(ge&&ge.contentWidth===V&&ge.frameEnabled===(i.count===1&&!n.disabledParagraphFrameIds?.has(L.id))&&ge.producer===S&&ge.drawingToken===ee&&ge.projectionToken===te&&ge.listToken===Fe&&ge.refToken===Ae&&ge.drawingContext===oe)return ge.entry;let dt=Zi(ee,oe),et;if(L.kind==="table")et={kind:"table",table:L,key:o({paragraph:L,properties:[...Fe?[{localName:"list",attributes:{token:Fe}}]:[],...Ae?[{localName:"refFields",attributes:{token:Ae}}]:[]],width:V,producer:S,drawingToken:dt,projectionToken:te})};else {let Z=c?.get(L.id),me=Ho(L,V,d,Z),ve=i.count===1&&!n.disabledParagraphFrameIds?.has(L.id)?sw(me.props):null,qe=ve&&lw(L)?ve:void 0;qe&&(me=Ho(L,qe.width,d,Z));let{props:Te,indent:tt,available:dn,alignment:Nn,spacing:ca,lineSpacing:ou,contextualSpacing:ua,styleId:_t,outlineLevel:us,shading:fs,inheritedRunProperties:ms,markRunProperties:fa}=me,Tr=vw(L.children.find(ps=>ps.kind==="paragraphProperties"),d),{tabStops:Ir,properties:lr}=Sc(me,f,{listToken:Z?.cacheToken,hostedListToken:Se,refToken:Ae});et={kind:"paragraph",...qe?{frame:qe}:{},paragraph:L,props:Te,indent:tt,available:dn,alignment:Nn,spacing:ca,lineSpacing:ou,contextualSpacing:ua,styleId:_t,outlineLevel:us,borders:Tr,borderGroupKey:Ll({borders:Tr,indent:tt}),shading:fs,inheritedRunProperties:ms,markRunProperties:fa,tabStops:Ir,keeps:p0(Te),...Z?{listItem:Z}:{},key:o({paragraph:L,properties:lr,width:dn,producer:S,drawingToken:dt,projectionToken:te})};}return lk.set(L,{contentWidth:V,frameEnabled:i.count===1&&!n.disabledParagraphFrameIds?.has(L.id),producer:S,drawingToken:ee,projectionToken:te,listToken:Fe,refToken:Ae,drawingContext:oe,entry:et}),et},Me=(n.drawingTokenForParagraph!==void 0||n.drawingLayoutToken!==void 0)&&n.drawingLayoutEpoch===void 0?null:Zi(n.drawingLayoutEpoch??"",oe),Be=n.projectionTokenForParagraph!==void 0&&n.projectionEpoch===void 0?null:n.projectionEpoch??"",he=aw(i.count,n.disabledParagraphFrameIds),ye=P?.prepass,It=ye!=null&&ye.framePolicy===he&&Me!==null&&Be!==null&&ye.drawingEpoch===Me&&ye.projectionEpoch===Be&&ye.producer===S&&ye.contentWidth===T&&ye.styleCascade===d&&ye.listItems===c&&ye.numberingIndex===n.numberingIndex&&ye.tocToken===O&&ye.refToken===(u?.valuesToken??""),Vt=It&&ye.bodies.length===e.length&&ye.bodies.every((L,V)=>L===e[V]),ar=Vt?ye:Dt();function Dt(){let L=It&&i.count===1&&!n.disabledParagraphFrameIds?ye:null,V=rw(e,L,Z=>Re(Z,T)),ee=V.map(Z=>Z.key),te=$w(V,T,d,p,m,n.compatibilityMode),Se=V.map(Z=>Z.kind==="paragraph"&&Z.keeps.keepNext),Ee=V.map(Z=>Z.kind==="paragraph"?c?.get(Z.paragraph.id)?.markerText:void 0),Fe=V.map(Z=>Z.kind==="paragraph"&&Z.contextualSpacing),Ae=V.map(Z=>Z.kind==="paragraph"?Z.styleId:null),ge=V.map(Z=>Z.kind==="paragraph"?Z.borderGroupKey:""),dt=O===""?[]:V.map(Z=>Z.kind==="paragraph"?YL(Z.paragraph.id,y):""),et=y0(ww(ee,V),{terminalTableGroup:te,contextualSpacingAt:Z=>Fe[Z],styleIdAt:Z=>Ae[Z]??null,borderGroupKeyAt:Z=>ge[Z],tocVerdicts:dt,markerTextAt:Z=>Ee[Z],keepsNextAt:Z=>Se[Z],skipKeepNextAt:Z=>V[Z]?.kind==="paragraph"&&!!V[Z].frame});return {framePolicy:he,bodies:e,producer:S,contentWidth:T,styleCascade:d,listItems:c,numberingIndex:n.numberingIndex,drawingEpoch:Me??"",projectionEpoch:Be??"",prepared:V,keys:ee,paragraphDocumentOrder:L&&ow(L.bodies,e)?L.paragraphDocumentOrder:Vm(V,T,d,p,m,n.compatibilityMode),keepsNext:Se,markerTexts:Ee,tocToken:O,refToken:u?.valuesToken??"",flowKeys:et,terminalTextTables:te}}P&&Me!==null&&Be!==null&&!Vt&&(P.prepass=ar);let{prepared:We,keys:Ue,paragraphDocumentOrder:bt,keepsNext:an,flowKeys:Et,terminalTextTables:Mn}=ar,Li=()=>{n.retainKeys!==false&&(n.retainKeys===void 0&&s$1&&!(s$1.retentionPassDue?.()??true)||Ly(s$1,n.retainKeys,Ue,We.flatMap(L=>L.kind==="table"?[L.table]:[])));},ln=P?.previous??null,io=ln!==null&&P!==void 0&&P.context===Y&&P.producer===S&&(!P.parityDependent||P.startPageParity===X),kr=i.count===1&&io,Nt=0;if(io){let L=Math.min(Et.length,P.keys.length);for(;Nt<L&&Et[Nt]===P.keys[Nt];)Nt+=1;}let yn=0;if(kr){let L=Math.min(Et.length,P.keys.length)-Nt;for(;yn<L&&Et[Et.length-1-yn]===P.keys[P.keys.length-1-yn];)yn+=1;}if(io&&Nt===We.length&&We.length===P.keys.length){let L=fp({revision:t,pages:ln.pages},ln),V=C+(P.endLineCounter-P.startLineCounter);return P.previous=L,P.startLineCounter=C,P.endLineCounter=V,P.startPageParity=X,P.stats={placed:0,total:We.length,reusedPages:ln.pages.length,fullPasses:P.stats.fullPasses},Li(),{layout:L,pages:L.pages,lineCounter:V,endCursorY:P.endCursorY,endSpaceAfter:P.endSpaceAfter,endsOpenPage:P.endsOpenPage,overflowShellAt:de}}let Ge=fw(We,T,d,p,m,n.compatibilityMode),Bn=new Set(Ge.map(({table:L})=>L.id)),_=mw(Ge,Et),F=[],q=0,le=0,ze=()=>i.lefts[q],be=()=>i.widths[q],fe=()=>({text:{left:ze(),width:be()},margin:{left:0,width:a},page:{left:-r.margin.left,width:r.width}}),Ce=()=>hw(F,le),Le=[],rt=[],$e=new Map,sn=new Set,qt=[],vr=new Set,At=0,lo=new Wc,we=D,so=D,Ze=0,bn=C,ot=z,Ln=[],aa=new $c({paragraphFrames:lo,positionedFlow:_,pendingFloatIds:sn,floatSignals:qt,anchorPageDeferCounts:$e}),ia=()=>aa.capture({pageCount:G.length,pageFragments:F,pendingAnchoredDrawings:Le,deferredAnchoredDrawings:rt,cursorY:we,lineCounter:bn,previousSpaceAfter:ot,flowColumnIndex:Ze}),Ei=0,Xe=0,Ve=0,pt=D===0;if(kr&&Nt>0&&Nt<P.checkpoints.length){let L=P.checkpoints[Nt];G.push(...ln.pages.slice(0,L.pageCount)),{pageFragments:F,pendingAnchoredDrawings:Le,deferredAnchoredDrawings:rt,cursorY:we,flowColumnIndex:Ze,lineCounter:bn,previousSpaceAfter:ot}=aa.restore(L),q=Ze,Ei=Nt,pt=false,Ve=G.length,Ln.push(...P.checkpoints.slice(0,Nt));}let En=(L,V)=>{let ee=j(G.length).top;for(let te of lo.publish({page:{x:-r.margin.left,y:-ee},margin:{x:0,y:r.margin.top-ee},text:{x:ze(),y:V}},L,Ze))F.push(te);},co=i.count,la=ze,Qc=L=>Object.freeze({x:i.lefts[Ze]??0,y:L.y,width:i.widths[Ze]??T,height:L.height}),as=()=>Aw({pageNumber:W+G.length+1,onPageParityRead:Q,geometry:r,insets:j(G.length),contentWidth:T,contentHeight:Pe(),ownerPartName:n.inlineDrawingLayout?.ownerPartName??s}),Jp=()=>Ao(as()),eu=L=>{let V=n.inlineDrawingLayout?.projectionForAtom?.(L)?.drawingNodeId??L;return n.drawingSourceOrder?.get(V)},is=L=>{if(L.length===0)return;for(let ee of L)Le.some(te=>te.drawingNodeId===ee.drawingNodeId)||Le.push(ee.sourceOrder===void 0&&eu(ee.drawingNodeId)!==void 0?Object.freeze({...ee,sourceOrder:eu(ee.drawingNodeId)}):ee);if(!n.inlineDrawingLayout)return;let V=tx(Le,{pageBottom:Pe()});if(Le.splice(0,Le.length,...V.drawings),V.deferred.length>0)for(let ee of V.deferred){let te=($e.get(ee.drawingNodeId)??0)+1;$e.set(ee.drawingNodeId,te),te>=If?Le.push(Bf(ee,"page-defer-exhausted")):rt.push(ee);}},Qp=()=>{if(rt.length===0)return;let L=rt.map(V=>Cf(V,we-V.y));rt=[],is(L);},eg=()=>{},sa=()=>{eg();let L=G.length,V=ue(L),ee=pe("header",L,V),te=pe("footer",L,V),{usedBottom:Se,hasBodyPageFields:Ee}=Ku(F,so),Fe=j(L);G.push({id:`page-${L}`,index:L,box:V,contentBox:{x:V.x+r.margin.left,y:V.y+Fe.top,width:a,height:Fe.height},fragments:F,hasBodyPageFields:Ee,...i.separator?{columnSeparators:i.gaps.map((Ae,ge)=>({x:i.lefts[ge]+i.widths[ge]+Ae/2-.375,y:so,width:.75,height:Math.max(0,Se-so)}))}:{},...Le.length>0?{anchoredDrawings:ex(Le)}:{},...ee?{header:ee}:{},...te?{footer:te}:{}}),F=[],Le=[],we=0,q=0,Ze=0,so=0,le=0;},_k=(L,V)=>L.kind==="paragraph"&&Dw(L,V,n.inlineDrawingLayout),ls=()=>{if(q+1<i.count){q+=1,Ze=q,we=so,ot=0,le=F.length;return}sa(),Qp();},da={measurer:l,cache:s$1,producer:S,onCellBreakKey:L=>{K?.push(L);},nextLineId:(L,V,ee,te)=>(bn+=1,Hp(L,V,ee,te)),pageOccurrenceKey:()=>String(G.length),styleCascade:d,listItems:c,...f!==void 0?{defaultTabStopPt:f}:{},compatibilityMode:n.compatibilityMode,...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:M,...u?{refFields:u}:{},...n.noteMarks?{noteMarks:n.noteMarks}:{},...n.inlineDrawingLayout!==void 0?{inlineDrawingLayout:n.inlineDrawingLayout}:{},...n.drawingTokenForParagraph?{drawingTokenForParagraph:n.drawingTokenForParagraph}:n.drawingLayoutToken?{drawingLayoutToken:n.drawingLayoutToken}:{},...n.projectionTokenForParagraph?{projectionTokenForParagraph:n.projectionTokenForParagraph}:{},...n.inlineDrawingLayout?{anchorFrameBase:as,pageContentClip:Jp,hostedStory:xe,publishAnchoredDrawings:is,collectAnchoredDrawings:is,columnBoxForParagraph:Qc,pageExclusionZones:()=>n.drawingExclusionZonesByPage?.get(G.length)??Object.freeze([]),paragraphOrderIndex:L=>bt.get(L),onAnchorShift:(L,V)=>kf(Le,L,V),onAnchorRepublish:(L,V)=>{for(let ee=Le.length-1;ee>=0;ee-=1)Le[ee].anchorParagraphId===L&&Le.splice(ee,1);Le.push(...V);}}:{},borderOwnershipBudget:Jr(),vMergeResolveBudget:Uo(),displayMode:p,...m?{revisionAuthorFilter:m}:{}},tu=L=>Rc(c?.get(L.paragraph.id)??L.listItem,L.indent,l,L.tabStops,L.available,vt(L.props)),ss=new Map,jk=(L,V)=>{let ee=ss.get(L);ee||(ee=new Set,ss.set(L,ee)),ee.add(V);},tg=L=>{let V=ss.get(L);if(!(!V||!s$1)){for(let ee of V)s$1.release?.(ee);ss.delete(L);}},ds=(L,V,ee=0)=>{let te=L.paragraph.id,Ee=!(b?.has(te)??false)&&((h?.has(te)??false)||(x?.has(te)??false)),Fe=L.available,Ae=la(),dt=(L.frame?[]:n.drawingExclusionZonesByPage?.get(G.length)??Object.freeze([])).filter(ve=>{let qe=bt.get(L.paragraph.id),Te=bt.get(ve.anchorParagraphId);if(qe!==void 0&&Te!==void 0){if(Te>qe)return false}else {let tt=We.findIndex(dn=>dn.kind==="paragraph"&&dn.paragraph.id===ve.anchorParagraphId);if(tt<0||tt>V)return false}return !(co>1&&ve.columnIndex!==Ze)}),et=Ae===0?dt:_d(dt,Ae,0),Z=Un(et),me=null;return s$1&&!Ee&&(me=DP(L.key,{exclusionToken:Z,paragraphStartY:we,columnIndex:Ze,startOffset:ee}),jk(te,me)),Pc({paragraph:L.paragraph,paragraphId:te,indentLeft:L.indent.left,available:Fe,measurer:l,cache:s$1,cacheKey:me,formatting:L,producer:S,styleCascade:d,tabStops:L.tabStops,flow:{firstLineOffset:ee===0?tu(L):0,startOffset:ee,marginExtent:{left:0,right:L.indent.left+Fe+L.indent.right},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:M,...u?{refFields:u}:{},displayMode:p,...m?{revisionAuthorFilter:m}:{},...n.noteMarks?{noteMarks:n.noteMarks}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},contentLeft:0,contentRight:co>1?be():L.indent.left+Fe+L.indent.right,paragraphStartY:we,...et.length>0?{pageExclusionZones:et}:{},...Ee?{suppressEmptyPlaceholderLine:true}:{}}})},ng=(L,V)=>(n.drawingExclusionZonesByPage?.get(G.length)??Object.freeze([])).filter(te=>{let Se=bt.get(L.paragraph.id),Ee=bt.get(te.anchorParagraphId);if(Se!==void 0&&Ee!==void 0){if(Ee>Se)return false}else {let Fe=We.findIndex(Ae=>Ae.kind==="paragraph"&&Ae.paragraph.id===te.anchorParagraphId);if(Fe<0||Fe>V)return false}return !(co>1&&te.columnIndex!==Ze||!te.sourceKind&&te.anchorParagraphId===L.paragraph.id&&te.input.mode==="topAndBottom")}),rg=(L,V,ee,te,Se,Ee,Fe)=>{let Ae=ng(L,V);if(!n.inlineDrawingLayout||te<=Se)return Ae;let ge=pn(L.paragraph),dt=new Map,et=0;for(let Te=Se;Te<te;Te+=1){let tt=ee[Te];for(let Nn of ge.values())Nn>=tt.start&&Nn<tt.end&&dt.set(Nn,et);let dn=Fe.get(Te)??ee[Te].exclusionSkipBefore??0;et+=dn+ee[Te].height;}if(dt.size===0)return Ae;let Z=co>1,me=L.available,ve=la(),qe=jd({paragraph:L.paragraph,paragraphId:L.paragraph.id,drawingLayout:n.inlineDrawingLayout,contentLeft:Z?ve:0,contentRight:Z?ve+be():L.indent.left+me+L.indent.right,paragraphStartY:Ee,anchorLineTopByModelStart:dt,columnIndex:Ze,displayMode:p,...m?{revisionAuthorFilter:m}:{}});return Object.freeze([...Ae,...qe])},Hk=(L,V,ee,te,Se,Ee,Fe,Ae)=>{if(n.inlineDrawingLayout){let Z=[...pn(L.paragraph).values()];if(Z.length>0){let me=Math.min(...Z);if(Fe.end<=me||Z.some(ve=>ve>=Fe.start&&ve<Fe.end)&&Fe.end<=me+1)return 0}}let ge=rg(L,V,ee,te,Se,Ee,Ae),dt=ge.length>0?$r(we,Fe.height,ge):0,et=Fe.exclusionSkipBefore??0;return Math.max(dt,et)},og=(L,V=we,ee=false)=>{let te=we,Se={positionTextTable:ee,cursorY:V,columnWidth:be,columnLeft:ze,contentHeight:Pe,unreservedContentHeight:Ie,advanceColumn:()=>{we=Se.cursorY,ls(),Se.cursorY=we;},anchorFrames:fe,verticalAnchorFrames:()=>gw(as(),V,r.margin.top),styleCascade:d,displayMode:p,...m?{revisionAuthorFilter:m}:{},deps:da,compatibilityMode:n.compatibilityMode,shiftAnchor:(Fe,Ae)=>kf(Le,Fe,Ae),publishFragment:Fe=>F.push(Fe)},Ee=Ww(L,Se);return we=Ee.outOfFlow?te:Se.cursorY,Ee.outOfFlow};eg=()=>pw(Ge,sn,F,qt,(L,V,ee,te)=>{let Se=q,Ee=Ze;q=V,Ze=V,K=[];try{let Fe=Dp(L,ee,be(),fe(),F.slice(0,te),da);og(L,Fe,!0),pd(L,K);}finally{K=null,q=Se,Ze=Ee;}});let ir=false,nu=We.length,ru=0;for(let L=Ei;L<We.length;L+=1){let V=Re(e[L],be());if(Ln[L]=ia(),kr&&yn>0&&L>=We.length-yn){let se=P.checkpoints[L+(P.keys.length-We.length)];if(se&&Qw(se,Ln[L])){let ie=G.length-se.pageCount;if(Xw({delta:ie,titlePage:k?.titlePage===true,evenAndOddHeaders:k?.evenAndOddHeaders===true,parityDependent:P.parityDependent,usedPageParity:U,markPageCount:se.pageCount,continuedInsets:H!==void 0,hasNoteReserves:I!==void 0,hasExclusionZones:(n.drawingExclusionZonesByPage?.size??0)>0})){let ct=ie===0?ln.pages.slice(se.pageCount):ln.pages.slice(se.pageCount).map((ut,Ot)=>ea(ut,G.length+Ot,ue(G.length+Ot).y));G.push(...ct),Ve+=ct.length,ir=true,nu=L,ru=ie,bn+=P.endLineCounter-se.lineCounter;break}}}if(Xe+=1,V.kind==="table"){if(vr.has(V.table.id))continue;if(Mn?.start===L&&i.count===1&&sn.size===0&&!F.some(Hc)&&!n.drawingExclusionZonesByPage?.get(G.length)?.length){let se=We[Mn.anchorIndex];if(se.kind==="paragraph"){let ie=ds(se,Mn.anchorIndex);if(ie.length===1&&ie[0].spans.length===0){let xt=Ka(se.spacing.before,ot),ct=Kw(Mn,{cursorY:we+xt,anchorHeight:ie[0].height,contentWidth:T,contentHeight:Pe(),frames:fe(),deps:da,styleCascade:d,displayMode:p,authorFilter:m});if(ct){for(let ut of ct.fragments){let Ot=Ge.find(An=>An.table.id===ut.tableId);F.push({...ut,floatingWrap:{anchorId:Ot.anchorId,columnIndex:Ze,float:Ot.float,sourceOrder:Ot.sourceIndex}});}for(let[ut,Ot]of Mn.tables.entries())vr.add(Ot.id),pd(Ot,ct.cellBreakKeys[ut]);At=ct.bottom;continue}}}}if(Bn.has(V.table.id)&&!Bw(V.table,n.drawingExclusionZonesByPage,da)&&Vc(V.table,Math.min(...i.widths),da)<=Pe()){_.add(sn,V.table.id);continue}K=[];try{og(V.table)||(ot=0),pd(V.table,K);}finally{K=null;}continue}let ee=V.frame,{paragraph:te,props:Se,spacing:Ee,contextualSpacing:Fe,styleId:Ae,borders:ge,shading:dt,keeps:et}=V,{indent:Z,alignment:me,markRunProperties:ve}=V,qe=vt(V.props),Te=V.available,tt=L>0?We[L-1]:void 0,dn=We[L+1],Nn=se=>se?.kind==="paragraph"&&se.styleId===Ae&&Ae!==null,ca=Fe?{before:Nn(tt)?0:Ee.before,after:Nn(dn)?0:Ee.after}:Ee,ou=c?.get(te.id)??V.listItem,ua=tu(V),_t=te.id,us=V.borderGroupKey,fs=se=>us!==""&&se?.kind==="paragraph"&&se.borderGroupKey===us,ms=fs(tt),fa=fs(dn),Tr=ms?void 0:ge.top,Ir=fa?ge.between:ge.bottom,lr=No(Tr),ps=No(Ir);Rb(Se)&&(F.length>0||G.length===0)&&(sa(),ot=0);let gt=ds(V,L);if(gt.length===0){tg(_t),_.note(qt,te.id,Ze,F.length,we);continue}let Wk=Zn(te)!==void 0&&_k(V,gt),cg=()=>Wk&&N===void 0&&q+1>=i.count,au=se=>{let ie=Re(te,be());ie.kind==="paragraph"&&(Z=ie.indent,me=ie.alignment,Te=ie.available,ve=ie.markRunProperties,ua=se===0?tu(ie):0,gt=[...ds(ie,L,se)]);},gs=ee?{cursorY:we,previousSpaceAfter:ot,firstParagraphOfSection:pt}:null,hs=ee?lo.start(ee,tt?.kind==="paragraph"?tt.paragraph.id:void 0):null;if(hs&&(we=hs.cursorY,ot=hs.previousSpaceAfter),!ee){let se=Ka(ca.before,ot),ie=ve.length===0?wn:Ne(ve,d?.themeFonts),xt=gt.length<=1?ps:0,ct=we+se+lr,ut=rg(V,L,gt,0,0,ct,new Map),Ot=gt[0]?Df(ct,gt[0],ut,xt):l.lineMetrics(ie).height+xt,An=se+lr+Math.max(Ot,Cw(Ge,sn,_t,be(),da,{anchorY:ct,frames:fe(),earlier:F}));if(et.keepNext&&!an[L-1]){let jt=h0(We,L,ot,cn=>{let Dn=Re(e[cn],be());return Dn.kind==="paragraph"?ds(Dn,cn).map(xn=>xn.height):[]},cn=>We[cn]?.kind==="paragraph"&&!!We[cn].frame);jt!==null&&jt+lr<=Pe()&&(An=Math.max(An,jt+lr));}we+An>Pe()&&we>0&&!cg()&&(ls(),ot=0,au(0));}let Vk=we===0&&!Ce(),iu=Ob(ca.before,ot,ee?false:Vk,ee?false:pt);iu>0&&(we+=iu),lr>0&&(we+=lr),pt=false;let Or=0,Ke=[],ug=gt[0]?.start??0,ma=iu,uo=lr,lu=false,fo=we,fg=0,ys=new Map;ot=0;let mg=n.inlineDrawingLayout!==void 0&&zt(V.paragraph,n.inlineDrawingLayout).length>0,pg=false,su=null,{revisions:Gk,formatRevision:$k}=rd(V.paragraph,p,m),gg=jr(V.paragraph),hg=gg?Ha(gg):null,Kk=()=>{let se=Ke[0];if(!se)return 0;let ie=fg;if(ie<=.001)return 0;let xt=$r(fo,se.box.height,ng(V,L));return Math.max(0,ie-xt)},bs=se=>{if(Ke.length===0)return;let ie=ze(),xt=la(),ct=Ke[0].box.y,ut=ct-ma-uo,Ot=Ke[Ke.length-1].box.y+Ke[Ke.length-1].box.height,An=se?ca.after:0,jt=[],cn,Dn=ct,xn=Ot,Cr=ge.left?nn(ge.left):0,Ai=ge.right?nn(ge.right):0,pa=ge.left?ie+Z.left-ge.left.spacePt-Cr:ie+Z.left,cu=ge.right?ie+Z.left+Te+ge.right.spacePt+Ai:ie+Z.left+Te,ga=Math.max(cu-pa,0);if(uo>0&&Tr){let Gt=nn(Tr),dr=ct-Tr.spacePt-Gt;jt.push({side:"top",edge:Tr,box:{x:pa,y:dr,width:ga,height:Gt}}),Dn=dr;}if(se&&Ir){let Gt=nn(Ir),dr=Ot+Ir.spacePt,Sa={x:pa,y:dr,width:ga,height:Gt};jt.push({side:fa?"between":"bottom",edge:Ir,box:Sa}),fa||(cn={edge:Ir,box:Sa}),xn=dr+Gt;}se&&(we=Math.max(we,xn+An));let ha=Math.max(xn+An-ut,0),St=ms&&Or===0?ut:Dn,sr=fa&&se?ut+ha:xn,ya=Math.max(sr-St,0);if(ge.left&&jt.push({side:"left",edge:ge.left,box:{x:ie+Z.left-ge.left.spacePt-Cr,y:St,width:Cr,height:ya}}),ge.right&&jt.push({side:"right",edge:ge.right,box:{x:ie+Z.left+Te+ge.right.spacePt,y:St,width:Ai,height:ya}}),ge.bar){let Gt=nn(ge.bar);jt.push({side:"bar",edge:ge.bar,box:{x:ie+Z.left-ge.bar.spacePt-Gt,y:ct,width:Gt,height:Math.max(Ot-ct,0)}});}let ba=hg?cd(Ke,hg):null,xa=Or===0?wc(ou,l,Ke[0]?{y:Ke[0].box.y,height:Ke[0].box.height}:void 0,0,qe?Z.left+Te+Z.right:void 0):void 0,xs=xa?{...xa,box:{...xa.box,x:xa.box.x+ie}}:void 0;!ee&&Or===0&&(En(_t,fo),_.note(qt,_t,Ze,F.length,fo));let Mr={kind:"paragraph",id:`${_t}#f${Or}`,paragraphId:_t,fragmentIndex:Or,range:ba?ba[ba.length-1].range:{paragraphId:_t,start:ug,end:Ke[Ke.length-1].range.end},props:Se,styleId:V.styleId,outlineLevel:V.outlineLevel,alignment:V.alignment,spacing:{before:ma,after:An},indent:Z,...cn?{bottomBorder:cn}:{},...jt.length>0?{borders:jt}:{},...dt===void 0?{}:{shading:dt,shadingBox:ge.left||ge.right?{x:pa,y:Dn,width:ga,height:Math.max(xn-Dn,0)}:Ds(Ke,ie+Z.left,Te)},tabStops:V.tabStops,...xs?{marker:xs}:{},...se?{paragraphEnd:true}:{},...se&&g?od(Gk,$k):{},lines:ba??Ke,...xc(Ke,ve,d?.themeFonts),box:{x:xt+Z.left,y:ut,width:Te,height:ha}};if(ee?lo.add(ee,Mr,hs?.groupId,L):F.push(Mr),n.inlineDrawingLayout&&mg&&!pg){pg=true;let Gt=[...pn(V.paragraph).values()],dr=Gt.length>0&&Gt.every(Zt=>Ke.some(mo=>Zt>=mo.range.start&&Zt<mo.range.end)),Sa,Ss,uu;if(dr){let Zt=ut-Kk();Sa=Ke,Ss={x:xt+Z.left,y:Zt,width:Te,height:ha},uu=Qc({x:xt+Z.left,y:Zt,height:ha});}else {let Zt=su??{columnX:xt,columnWidth:be(),startY:ut},mo=Zt.startY;Sa=gt.map((Sn,Xk)=>{let Yk={id:`anchor-line-${Xk}`,range:{paragraphId:_t,start:Sn.start,end:Sn.end},box:{x:Zt.columnX+Z.left,y:mo,width:Te,height:Sn.height},contentX:Sn.spans.length>0?Sn.spans[0].box.x+Zt.columnX:Zt.columnX+Z.left,baseline:Sn.baseline,leading:Sn.leading,trailingSpacing:Sn.trailingSpacing,spans:Sn.spans.map(fu=>({...fu,box:{...fu.box,x:fu.box.x+Zt.columnX,y:mo}}))};return mo+=Sn.height+(Sn.exclusionSkipBefore??0),Yk});let yg=Zt.startY;Ss={x:Zt.columnX+Z.left,y:yg,width:Te,height:Math.max(mo-yg,Ke[0]?.box.height??0)},uu=Qc(Ss);}is(Gr({paragraph:V.paragraph,paragraphId:_t,paragraphBox:Ss,lines:Sa,drawingLayout:n.inlineDrawingLayout,frameBase:as(),columnBox:uu,cellBox:null,pageClip:Jp(),measurer:l,sourceOrderOf:eu,layoutTextboxStory:xe.layoutTextboxStoryFor,displayMode:p,...m?{revisionAuthorFilter:m}:{}}));}Or+=1,ug=Ke[Ke.length-1].range.end,Ke=[],ma=0,uo=0;},Fr=0,du=0,Ni=gt.length+oo;for(let se=0;se<gt.length;se+=1){let ie=gt[se],xt=se===gt.length-1,ct=xt?ps:0;se===Fr&&(fo=we,mg&&su===null&&Or===0&&(su=Object.freeze({columnX:la(),columnWidth:be(),startY:fo})));let ut=ee?0:Hk(V,L,gt,se,Fr,fo,ie,ys),Ot=ut+Math.max(0,ie.height-ie.trailingSpacing)+ct;if(!ee&&we+Ot>Pe()&&!cg()&&(Ke.length>0||F.length>0||G.length>0&&Math.max(0,ie.height-ie.trailingSpacing)+ct<=Pe())){let St=!Ce(),sr=du<Ni?g0(se,Fr,gt.length,et,St):se,ya=sr<se;for(let Mr=se;Mr>sr;Mr-=1){Ke.pop();let Gt=gt[Mr-1],dr=ys.get(Mr-1)??Gt.exclusionSkipBefore??0;ys.delete(Mr-1),we-=Gt.height+dr,bn-=1;}let ba=ya&&Ke.length===0&&Or===0,xa=gt[sr].start,xs=be();if(bs(false),ls(),ma=0,ba?we=uo:uo=0,be()!==xs){au(xa),Ni=Math.max(Ni,gt.length+oo),Fr=0,ya&&(du+=1),se=-1;continue}if(Fr=sr,fo=we,ya){du+=1,se=sr-1;continue}}let jt=la();ys.set(se,ut),we+=ut;let cn=jt+Z.left+(se===0&&!qe?ua:0),Dn=Math.max(1,Te-(se===0?ua:0)),xn=ie.spans.map(St=>({...St,range:{...St.range,paragraphId:_t},box:{...St.box,x:St.box.x+jt-(qe&&se===0?ua:0),y:we}})),Cr=nl(xn,l,cn,Dn,me,xt,me==="center"||me==="right"?ie.width:void 0,qe),Ai=xn.length>0&&Cr.length>0?Cr[0].box.x-xn[0].box.x:me!=="left"&&me!=="both"?(()=>{let St=Dn-ie.width;return St<=0?0:me==="center"?St/2:St})():0,pa=Object.freeze({x:0,y:0,width:a,height:Pe()}),cu=ie.drawings.map(St=>{let sr=Object.freeze({...Yn(St,jt,we),paragraphId:_t});return Dd(sr,pa)}),ga=pl(cu,Ai),ha={id:Hp(te.id,ie.start,se),range:{paragraphId:_t,start:ie.start,end:ie.end},spans:Cr,box:{x:la()+Z.left,y:we,width:Te,height:ie.height},contentX:fd(Cr,cn+Ai),baseline:ie.baseline,leading:ie.leading,trailingSpacing:ie.trailingSpacing,...ie.manualBreakAfter?{manualBreakAfter:true}:{},...ie.deletedRanges?{deletedRanges:ie.deletedRanges}:{},...ga.length>0?{drawings:ga}:{},...ie.anchorRevisions?{anchorRevisions:ie.anchorRevisions}:{}};if(bn+=1,Ke.length===0&&(fg=ut),Ke.push(ha),we+=ie.height,ie.columnBreakAfter){let St=be();if(bs(xt),ls(),ma=0,uo=0,lu=true,!xt&&be()!==St){au(ie.end),Ni=Math.max(Ni,gt.length+oo),Fr=0,se=-1;continue}Fr=se+1;}else ie.pageBreakAfter&&(bs(xt),sa(),ma=0,uo=0,lu=true,Fr=se+1);}bs(true),tg(_t),ot=lu?0:ca.after,gs&&(we=gs.cursorY,ot=gs.previousSpaceAfter,pt=gs.firstParagraphOfSection);}ir||En("",we),ir||(Ln[We.length]=ia());let cs=ir&&P?P.endCursorY:Math.max(we,At),ag=ir&&P?P.endSpaceAfter:ot,ig=!ir&&(F.length>0||qt.length>0||G.length===0),lg=ir&&P?P.endsOpenPage:ig;ig&&(sa(),cs=Math.max(cs,Mw(G.at(-1).fragments),cw(G.at(-1).fragments)));let sg=0,zk=If*4+8;for(;(Le.length>0||rt.length>0)&&sg<zk;)sg+=1,Le.length===0&&Qp(),sa();rt.length>0&&(Le.push(...rt.map(L=>Bf(L,"page-defer-exhausted"))),rt=[],sa()),Li();let dg={revision:t,pages:G,...n.displayMode?{displayMode:n.displayMode}:{}};if(P){P.previous=dg,P.checkpoints=ir?[...Ln.slice(0,nu),...P.checkpoints.slice(nu+(P.keys.length-We.length)).map(V=>ru===0?V:{...V,pageCount:V.pageCount+ru})]:Ln,P.keys=Et,P.context=G.length+1===B?Y:R(Nc(I,W,G.length+1)),P.producer=S;let L=U||k?.evenAndOddHeaders===true;P.parityDependent=Ei===0&&!ir?L:P.parityDependent||L,P.startPageParity=X,P.startLineCounter=C,P.endLineCounter=bn,P.endCursorY=cs,P.endSpaceAfter=ag,P.endsOpenPage=lg,P.stats={placed:Xe,total:We.length,reusedPages:Ve,fullPasses:P.stats.fullPasses+(Ei===0?1:0)};}return {layout:dg,pages:G,lineCounter:bn,endCursorY:cs,endSpaceAfter:ag,endsOpenPage:lg,overflowShellAt:de}}function Xc(e,t,n){return ik(e,t,n,UL)}var dk=new WeakMap,ck=new WeakMap;function Lt(e){let t=dk.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let[o,a]of qL(r)){let i=n.get(o);i?i.push(...a):n.set(o,[...a]);}return dk.set(e,n),n}function qL(e){let t=ck.get(e);if(t)return t;let n=new Map,r=(a,i,l)=>{for(let s of yt(a)){let d={line:a,pageIndex:i,...l?{clipBox:l}:{}},c=n.get(s.paragraphId);c?c.push(d):n.set(s.paragraphId,[d]);}},o=(a,i)=>{let l=s=>{for(let d of s){if(d.kind==="paragraph"){for(let c of d.lines)r(c,i,d.clipToBox?d.box:void 0);continue}for(let c of d.rows)if(!c.isHeaderRepeat)for(let u of c.cells)l(u.blocks);}};l(a);};for(let a of wt(e))for(let i of a.lines)r(i,e.index,a.clipToBox?a.box:void 0);e.header&&o(e.header.fragments,e.index),e.footer&&o(e.footer.fragments,e.index);for(let a of [e.footnotes,e.endnotes])if(a)for(let i of a.notes)o(i.fragments,e.index);return ck.set(e,n),n}function $Y(e,t,n){let r=Lt(e).get(t);if(r&&r.length>0){let o=Gs(e,t,n,r.map(a=>a.line));if(o)return o}return Gs(e,t,n)}var uk=new WeakMap;function Wp(e,t){let n=uk.get(e);n||(n=new Map,uk.set(e,n));let r=n.get(t);if(r)return r;let o=[];for(let{line:i}of Lt(e).get(t)??[])if(i.range.paragraphId===t)for(let l of i.deletedRanges??[])o.push({start:l.start,end:l.end});o.sort((i,l)=>i.start-l.start);let a=[];for(let i of o){let l=a[a.length-1];l&&i.start<=l.end?l.end=Math.max(l.end,i.end):a.push(i);}return n.set(t,a),a}function fk(e,t){for(let n of e)if(t>n.start&&t<n.end)return true;return false}function ZL(e,t){for(let n of Wp(e,t.paragraphId))if(t.offset>n.start&&t.offset<n.end)return {paragraphId:t.paragraphId,offset:n.end};return t}var JL=/[\p{L}\p{N}_'\u2019]/u;function Ql(e,t,n,r=QL){let o=i=>{let l=e[i];return l!==void 0&&JL.test(l)},a=Math.max(0,Math.min(t,e.length));if(n===-1){for(;a>0&&!o(a-1);)if(a-=1,r.has(a))return a;for(;a>0&&o(a-1);)if(a-=1,r.has(a))return a;return a}for(;a<e.length&&!o(a);)if(a+=1,r.has(a))return a;for(;a<e.length&&o(a);)if(a+=1,r.has(a))return a;return a}var QL=new Set;function Mi(e,t,n,r){let o=r?r.spans:e.spans;for(let i of r?r.drawings:e.drawings??[]){if(t===i.start)return i.advanceStart;if(t===i.start+1)return i.advanceEnd}let a=r?r.spans[0]?.box.x??e.contentX:e.contentX;for(let i of o){if(t<=i.range.start)return i.style.shaping?tr(i,i.range.start,n):i.box.x;if(t>=i.range.end){a=i.style.shaping?tr(i,i.range.end,n):i.box.x+i.box.width;continue}return tr(i,t,n)}return a}function Vp(e){e.sort((n,r)=>n.x-r.x);let t=[];for(let n of e){let r=t.at(-1);r&&n.x<=r.x+r.width+.001?t[t.length-1]={x:r.x,width:Math.max(r.x+r.width,n.x+n.width)-r.x}:t.push(n);}return t}var mk=new WeakMap,eE=/^[\p{Control}\p{Default_Ignorable_Code_Point}]+$/u,tE=/[\p{Letter}\p{Number}\p{Punctuation}\p{Symbol}]/u;function nE(e,t,n,r){if(eE.test(e.text.slice(t-e.range.start,n-e.range.start)))return null;if(e.style.shaping&&r&&e.text.length<=gc&&e.text.length===e.range.end-e.range.start){let o=mk.get(e);o||(o=Ye(e.text),mk.set(e,o));let a=s=>{let d=0,c=o.length;for(;d<c;){let u=Math.floor((d+c)/2);o[u].utf16To<=s?d=u+1:c=u;}return o[d]},i=a(t-e.range.start),l=a(n-e.range.start-1);if(i&&l){t=e.range.start+i.utf16From,n=e.range.start+l.utf16To;let s=tr(e,e.range.start+l.utf16From,r);if(tE.test(l.text)&&tr(e,n,r)===s){let d=n+1,c=e.range.end;for(;d<c;){let u=Math.floor((d+c)/2);tr(e,u,r)===s?d=u+1:c=u;}n=Math.min(d,e.range.end);}}}return [tr(e,t,r),tr(e,n,r)]}function Yc(e,t,n,r,o){let a=o?.spans??e.spans;if(!a.some(l=>l.style.shaping!==void 0)){let l=Mi(e,t,r,o),s=Mi(e,n,r,o);return [{x:Math.min(l,s),width:Math.abs(s-l)}]}let i=[];for(let l of a){let s=Math.max(t,l.range.start),d=Math.min(n,l.range.end);if(s>=d)continue;let c=nE(l,s,d,r);if(!c)continue;let[u,f]=c;i.push({x:Math.min(u,f),width:Math.abs(f-u)});}return Vp(i)}var pk=new WeakMap;function Gp(e,t){let n=pk.get(e);if(n||pk.set(e,n=new Map),n.has(t))return n.get(t);let r=Lt(e),o=new Set([t]),a=new Map,i=new Map,l=new Map;for(let u of o){let f;for(let p of r.get(u)??[]){let m=p.line.id;a.set(m,p),l.has(m)||l.set(m,0);for(let g of yt(p.line))o.add(g.paragraphId);if(f&&f!==m){let g=i.get(f);g||i.set(f,g=new Set),g.has(m)||(g.add(m),l.set(m,l.get(m)+1));}f=m;}}if(o.size===1)return n.set(t,null),null;let s=[...a.keys()].filter(u=>l.get(u)===0),d=[];for(let u=0;u<s.length;u++){let f=s[u];d.push(a.get(f));for(let p of i.get(f)??[])l.set(p,l.get(p)-1),l.get(p)===0&&s.push(p);}let c={members:[...o],lines:d};for(let u of o)n.set(u,c);return c}var gk=new WeakMap;function es(e,t){let n=gk.get(e);if(n||gk.set(e,n=new Map),!n.get(t.lineId)?.has(t.position.paragraphId)){let r=Lt(e).get(t.position.paragraphId)??[],o=r.flatMap(({line:a})=>a.spans).find(a=>a.range.paragraphId===t.position.paragraphId&&a.style.shaping)?.style.shaping?.baseLevel;if(o===void 0&&r.every(({line:a})=>a.spans.length===0&&!a.drawings?.length)){let a=e.pages[r[0]?.pageIndex??-1],i=a&&Ki(a).find(l=>l.range.paragraphId===t.position.paragraphId);i&&vt(i.props)&&(o=1);}for(let{line:a}of r){let i=a.spans.find(s=>s.range.paragraphId===t.position.paragraphId&&s.style.shaping)?.style.shaping?.baseLevel??o,l=n.get(a.id);l||n.set(a.id,l=new Map),l.set(t.position.paragraphId,i===void 0?void 0:i%2?-1:1);}}return n.get(t.lineId)?.get(t.position.paragraphId)}var hk=new WeakMap;function Kp(e){let t=hk.get(e);if(t)return t;let n=new Map;for(let o of e){let a=n.get(o.lineId);a||n.set(o.lineId,a=[]),a.push(o);}let r=[...n.keys()];return t={indexes:new Map(e.map((o,a)=>[o,a])),lines:r,lineIndexes:new Map(r.map((o,a)=>[o,a])),groups:new Map([...n].map(([o,a])=>[o,{logical:a,paragraphIds:new Set(a.map(i=>i.position.paragraphId))}]))},hk.set(e,t),t}function $p(e){return e.visual||(e.visual=[...e.logical].sort((t,n)=>t.x-n.x),e.indexes=new Map(e.visual.map((t,n)=>[t,n]))),e.visual}function oa(e,t,n,r){let o=e[t],a=r(o);if(a===void 0)return {target:e[t+n],logicalDirection:n};let i=Kp(e),l=i.groups.get(o.lineId),d=$p(l)[l.indexes.get(o)+n],c=n*a;if(d)return {target:d,logicalDirection:c};let u=i.lines[i.lineIndexes.get(o.lineId)+c];if(!u)return {logicalDirection:c};let f=i.groups.get(u),p=[...l.paragraphIds].some(h=>f.paragraphIds.has(h)),m=p?$p(f):f.logical;return {target:(p?n:c)===1?m[0]:m.at(-1),logicalDirection:c}}function ts(e,t,n,r){let o=Kp(e).groups.get(t.lineId),a=r(t),i=a===void 0?o.logical:$p(o);return n*(a??1)===-1?i[0]:i.at(-1)}function Xp(e,t,n,r,o,a){let i=t[n];if(o(i)===void 0)return Ql(e,i.position.offset,r,a);let l=Kp(t).indexes,s=i,d=false;for(let c=0;c<t.length;c++){let u=oa(t,l.get(s),r,o).target;if(!u||u.position.paragraphId!==i.position.paragraphId)break;if(Math.abs(l.get(u)-l.get(s))===1){let p=/[\p{L}\p{N}\p{M}_'\u2019]/u.test(e.slice(Math.min(s.position.offset,u.position.offset),Math.max(s.position.offset,u.position.offset)));if(d&&!p)break;d||=p;}else if(d)break;if(s=u,a.has(s.position.offset))break}return s.position.offset}function Bi(e,t,n,r){let o,a;for(let l of e)l.position.paragraphId===t.paragraphId&&(l.position.offset<t.offset&&(!o||l.position.offset>o.position.offset)&&(o=l),l.position.offset>t.offset&&(!a||l.position.offset<a.position.offset)&&(a=l));if(o&&a&&o.lineId===a.lineId&&o.x!==a.x)return n*(a.x<o.x?-1:1);let i=o??a;return n*(i?r(i)??1:1)}function Yp(e){let t=new Map;for(let n=0;n<e.length;n+=1){let r=e[n].position,o=t.get(r.paragraphId);o||(o=new Map,t.set(r.paragraphId,o)),o.has(r.offset)||o.set(r.offset,n);}return {stops:e,index:t}}var ns=class{#e=new WeakMap;#t=new WeakMap;get(t,n,r,o){let a;if(!r)a=this.#e.get(t)??new Map,this.#e.has(t)||this.#e.set(t,a);else {let s=this.#t.get(t);s||(s=new WeakMap,this.#t.set(t,s)),a=s.get(r)??new Map,s.has(r)||s.set(r,a);}let i=a.get(n);if(i)return i;let l=o();return a.set(n,l),l}};function xk(e,t){for(let n=e.length-1;n>=0;n--)if(e[n].position.paragraphId===t)return e[n]}function yk(e){let t=[],n=new Set;for(let r of e)n.has(r.lineId)||(n.add(r.lineId),t.push(r.lineId));return t}function bk(e,t,n){let r=null;for(let o of e)o.lineId===t&&(!r||Math.abs(o.x-n)<Math.abs(r.x-n))&&(r=o);return r}function rs(e,t){let n=null;for(let r of e)r.position.paragraphId===t.paragraphId&&(!n||Math.abs(r.position.offset-t.offset)<Math.abs(n.position.offset-t.offset))&&(n=r);return n}function Up(e,t,n){let r=null;for(let o of e){if(o.position.paragraphId!==t.paragraphId)continue;let a=o.position.offset;n===1?a>t.offset&&(!r||a<r.position.offset)&&(r=o):a<t.offset&&(!r||a>r.position.offset)&&(r=o);}return r}function Sk(e,t,n,r=()=>{}){let o=n.index.get(e.paragraphId)?.get(e.offset),a=o===void 0?rs(n.stops,e):n.stops[o];return a?ts(n.stops,a,t,r).position:null}function Pk(e,t,n,r,o,a=()=>{}){let i=o(e.paragraphId),l=i.index.get(e.paragraphId)?.get(e.offset),s=t;if(l===void 0){s=Bi(i.stops,e,t,a);let f=Up(i.stops,e,s);if(f)return {position:f.position,desiredX:null}}else {let f=oa(i.stops,l,t,a);if(s=f.logicalDirection,f.target)return {position:f.target.position,desiredX:null}}let d=n[r+s];if(!d)return {position:e,desiredX:null};let c=o(d).stops,u=s===-1?c[c.length-1]:c[0];return u?{position:u.position,desiredX:null}:null}function Rk(e,t,n){let r=e===-1?t[0]:t[t.length-1];if(!r)return null;let o=n(r).stops;return (e===-1?o[0]:o[o.length-1])?.position??null}function wk(e,t,n,r,o,a){let i=a(e.paragraphId),l=i.index.get(e.paragraphId)?.get(e.offset),s=l===void 0?rs(i.stops,e):i.stops[l];if(!s)return null;let d=n??s.x,c=yk(i.stops),u=c.indexOf(s.lineId),f=c[u+t];if(f){let m=bk(i.stops,f,d);return m?{position:m.position,desiredX:d}:null}for(let m=o+t;m>=0&&m<r.length;m+=t){let g=a(r[m]),h=yk(g.stops),b=t===-1?h[h.length-1]:h[0];if(!b)continue;let x=bk(g.stops,b,d);if(x)return {position:x.position,desiredX:d}}let p=t===-1?i.stops[0]:i.stops[i.stops.length-1];return p?{position:p.position,desiredX:d}:null}function kk(e,t,n){let r=Lt(e).get(t.range.paragraphId)??[],o=false;for(let a of r){if(a.line===t){o=true;continue}if(o&&a.line.range.start===n)return true}return false}function vk(e,t,n){for(let{line:r}of Lt(e).get(t)??[])if(r.range.start===n&&r.drawings?.some(o=>o.start===n))return r;return null}function Tk(e,t,n){for(let r of n?n.spans:e.spans)if(!(t<=r.range.start||t>=r.range.end)&&(r.projected||r.text.length!==r.range.end-r.range.start))return true;return false}function qp(e){let t=e.spans[e.spans.length-1]?.text;return t===`
|
|
18
|
-
`||t===Td$1}function Ik(e,t){if(t.end-t.start!==1||!e.drawings?.some(n=>n.start===t.start))return false;for(let n of t.spans)if(n.range.end>n.range.start)return false;return true}function Zc(e,t,n,r,o,a,i){for(let l of yt(n))a!==void 0&&l.paragraphId!==a||aE(e,t,n,l,r,o,i);}function aE(e,t,n,r,o,a,i){let l=yt(n).length>1,s=Wp(t,r.paragraphId),d=c=>r.spans.some(u=>u.range.start<=c&&c<=u.range.end);for(let c=r.start;c<=r.end;c+=1){if(c===r.end&&c>r.start&&!l&&qp(n)&&kk(t,n,c)||c===r.start&&r.start>0&&e.length>0&&xk(e,r.paragraphId)?.position.offset===c||Tk(n,c,r)||fk(s,c)&&!d(c))continue;let u=er({x:Mi(n,c,a,r),y:n.box.y,width:0,height:n.box.height},i);u&&e.push(hi(t,{position:{paragraphId:r.paragraphId,offset:c},x:u.x,y:u.y,height:u.height,lineId:n.id,pageIndex:o}));}}function Bk(e,t,n,r,o){for(let a of t){if(a.kind==="paragraph"){for(let i of a.lines)Zc(r,e,i,n,o,void 0,a.clipToBox?a.box:void 0);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let l of i.cells)Bk(e,l.blocks,n,r,o);}}var iE=new ns;function lE(e,t){let n=[];for(let r of e.pages)for(let o of wt(r))for(let a of o.lines)Zc(n,e,a,r.index,t,void 0,o.clipToBox?o.box:void 0);return n}var sE=new ns;function Zp(e,t,n){let r=Gp(e,t);return r?sE.get(e,r.members[0],n,()=>{let o=[];for(let{line:a,pageIndex:i,clipBox:l}of r.lines)Zc(o,e,a,i,n,void 0,l);return Yp(o)}):Uc(e,t,n)}function Uc(e,t,n){return iE.get(e,t,n,()=>{let r=[];for(let{line:o,pageIndex:a,clipBox:i}of Lt(e).get(t)??[])Zc(r,e,o,a,n,t,i);return Yp(r)})}function T2(e,t,n,r){if(!e.pages[t])return [];let o=[];return Bk(e,n,t,o,r),o}function dE(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function cE(e,t,n){let r=e.pages[t];if(!r)return [];let o=[];for(let a of wt(r,true))if(a.paragraphId===n)for(let i of a.lines)o.push({line:i,pageIndex:t,...a.clipToBox?{clipBox:a.box}:{}});return o}function uE(e,t,n){let r=dE(n),o=Lt(e).get(t.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?[]:cE(e,a,t.paragraphId),l=new Set(o.map(f=>f.line.id)),s=i.filter(f=>!l.has(f.line.id)),d=s.length>0?[...o,...s]:o,c=a===void 0?d:[...d].sort((f,p)=>{let m=f.pageIndex===a?0:1,g=p.pageIndex===a?0:1;return m-g}),u=null;for(let{line:f,pageIndex:p,clipBox:m}of c){let g=fr(f,t.paragraphId);if(!g||t.offset<g.start||t.offset>g.end)continue;if(t.offset===g.end&&t.offset>g.start&&yt(f).length===1&&(qp(f)||Ik(f,g))){u??={line:f,pageIndex:p,clipBox:m};continue}if(t.offset===g.end&&t.offset>g.start&&vk(e,t.paragraphId,t.offset))continue;let h=er({...Bl(f,t.offset,r.measurer,g),width:0},m);if(h)return hi(e,{position:t,x:h.x,y:h.y,height:h.height,lineId:f.id,pageIndex:p})}if(u){let f=er({...Bl(u.line,t.offset,r.measurer,fr(u.line,t.paragraphId)),width:0},u.clipBox);return f?hi(e,{position:t,x:f.x,y:f.y,height:f.height,lineId:u.line.id,pageIndex:u.pageIndex}):null}return null}function I2(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return Nm(e,n,t)?.caret??null}function O2(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return Am(e,n,t)}function F2(e){return Eu(e)}var Ok=new WeakMap;function Lk(e){let t=Ok.get(e);return t||(t=new Map,e.forEach((n,r)=>{t.has(n)||t.set(n,r);}),Ok.set(e,t)),t}function qc(e,t){return Lk(e).get(t)??-1}function Jc(e,t){if(e.anchor.paragraphId===e.head.paragraphId)return e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor};let n=qc(t,e.anchor.paragraphId),r=qc(t,e.head.paragraphId);return n===-1||r===-1?null:n<r||n===r&&e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor}}function Fk(e,t){let n=[],r=new Set;for(let{line:a}of Lt(e).get(t)??[]){let i=fr(a,t);if(i){for(let l of i.spans){if(l.range.end===l.range.start)continue;let s=`${l.range.start}:${l.range.end}`;if(r.has(s))continue;r.add(s);let d=l.range.end-l.range.start,c=l.text.length===d?l.text:l.text.slice(0,d).padEnd(d," ");n.push({start:l.range.start,text:c});}for(let l of i.drawings){let s=l.start,d=s+1,c=`${s}:${d}`;r.has(c)||(r.add(c),n.push({start:s,text:"\uFFFC"}));}}}n.sort((a,i)=>a.start-i.start);let o="";for(let a of n)a.start>o.length&&(o+=" ".repeat(a.start-o.length)),o=o.slice(0,a.start)+a.text;return o}function Ck(e,t){let n=new Set;for(let{line:r}of Lt(e).get(t)??[]){let o=fr(r,t);if(o)for(let a of o.spans)a.range.end!==a.range.start&&a.revisions?.some(i=>i.kind==="delete"||i.kind==="moveFrom")&&(n.add(a.range.start),n.add(a.range.end));}return n}function Mk(e,t,n,r){let o=Fa(e),a=So(e),i=a.get(t.paragraphId);if(i===void 0)return null;let l=Gp(e,t.paragraphId),s=Zp(e,t.paragraphId,r),d=c=>es(e,c);if(l){let c=s.index.get(t.paragraphId)?.get(t.offset),u=c===void 0?Bi(s.stops,t,n,d):oa(s.stops,c,n,d).logicalDirection,f=l.members.map(p=>a.get(p)).filter(p=>p!==void 0);i=u===-1?Math.min(...f):Math.max(...f);}return Pk(t,n,o,i,c=>c===t.paragraphId?s:Uc(e,c,r),d)}function C2(e,t,n,r=null,o={}){let a=d=>es(e,d);if(!o.stops&&(n==="left"||n==="right"))return Mk(e,t,n==="left"?-1:1,o.measurer);if(!o.stops&&(n==="wordLeft"||n==="wordRight")){let d=n==="wordLeft"?-1:1,c=Zp(e,t.paragraphId,o.measurer),u=c.index.get(t.paragraphId)?.get(t.offset),f=Fk(e,t.paragraphId),p=Ck(e,t.paragraphId),m=u===void 0?Ql(f,t.offset,Bi(c.stops,t,d,a),p):Xp(f,c.stops,u,d,a,p);return m===t.offset?Mk(e,t,d,o.measurer):{position:{paragraphId:t.paragraphId,offset:m},desiredX:null}}if(!o.stops&&(n==="lineStart"||n==="lineEnd")){let d=Sk(t,n==="lineStart"?-1:1,Zp(e,t.paragraphId,o.measurer),a);return d?{position:d,desiredX:null}:null}if(!o.stops&&(n==="documentStart"||n==="documentEnd")){let d=Rk(n==="documentStart"?-1:1,Fa(e),c=>Uc(e,c,o.measurer));return d?{position:d,desiredX:null}:null}if(!o.stops&&(n==="up"||n==="down")){let d=So(e).get(t.paragraphId);return d===void 0?null:wk(t,n==="up"?-1:1,r,Fa(e),d,c=>Uc(e,c,o.measurer))}let i=o.stops??lE(e,o.measurer);if(i.length===0)return null;let l=i.findIndex(d=>d.position.paragraphId===t.paragraphId&&d.position.offset===t.offset);if(l===-1){if(n==="left"||n==="right"){let c=Up(i,t,Bi(i,t,n==="left"?-1:1,a))??rs(i,t);return c?{position:c.position,desiredX:null}:null}let d=rs(i,t);if(!d)return null;l=i.indexOf(d);}let s=i[l];switch(n){case "left":case "right":return {position:(oa(i,l,n==="left"?-1:1,c=>es(e,c)).target??s).position,desiredX:null};case "lineStart":return {position:ts(i,s,-1,a).position,desiredX:null};case "lineEnd":return {position:ts(i,s,1,a).position,desiredX:null};case "wordLeft":case "wordRight":{let d=Fk(e,t.paragraphId),c=Xp(d,i,l,n==="wordLeft"?-1:1,a,Ck(e,t.paragraphId));return c===t.offset?{position:(oa(i,l,n==="wordLeft"?-1:1,f=>es(e,f)).target??s).position,desiredX:null}:{position:{paragraphId:t.paragraphId,offset:c},desiredX:null}}case "documentStart":return {position:i[0].position,desiredX:null};case "documentEnd":return {position:i[i.length-1].position,desiredX:null};case "pageUp":case "pageDown":{let d=r??s.x,c=s.pageIndex+(n==="pageUp"?-1:1),u=i.filter(m=>m.pageIndex===c);if(u.length===0)return {position:(n==="pageUp"?i[0]:i[i.length-1]).position,desiredX:d};let f=u[0],p=Number.POSITIVE_INFINITY;for(let m of u){let g=Math.abs(m.y-s.y)*1e3+Math.abs(m.x-d);g<p&&(p=g,f=m);}return {position:f.position,desiredX:d}}case "up":case "down":{let d=r??s.x,c=[],u=new Set;for(let h of i)u.has(h.lineId)||(u.add(h.lineId),c.push(h.lineId));let f=c.indexOf(s.lineId),p=n==="up"?f-1:f+1;if(p<0||p>=c.length)return {position:(n==="up"?i[0]:i[i.length-1]).position,desiredX:d};let m=i.filter(h=>h.lineId===c[p]),g=m[0];for(let h of m)Math.abs(h.x-d)<Math.abs(g.x-d)&&(g=h);return {position:g.position,desiredX:d}}default:return null}}function M2(e,t,n){return uE(e,t,n)}function B2(e,t,n){let r=Jc(t,n);if(!r)return [];if(r.from.paragraphId===r.to.paragraphId&&r.from.offset===r.to.offset)return fE(e,r.from);let o=[];if(r.from.paragraphId===r.to.paragraphId){for(let{line:s}of Lt(e).get(r.from.paragraphId)??[]){let d=fr(s,r.from.paragraphId);if(!d)continue;let c=Po(e,d,r.from,r.to);if(c)for(let u of d.spans)u.range.end>c.start&&u.range.start<c.end&&o.push(u);}return o}let a=Lt(e),i=qc(n,r.from.paragraphId),l=qc(n,r.to.paragraphId);if(i===-1||l===-1)return [];for(let s=i;s<=l;s+=1)for(let{line:d}of a.get(n[s])??[]){let c=fr(d,n[s]);if(!c)continue;let u=Po(e,c,r.from,r.to,Lk(n));if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&o.push(f);}return o}function fE(e,t){let n=null;for(let{line:r}of Lt(e).get(t.paragraphId)??[])for(let o of fr(r,t.paragraphId)?.spans??[]){if(o.range.start<t.offset&&t.offset<=o.range.end)return [o];n===null&&o.range.start===t.offset&&(n=o);}return n?[n]:[]}function rE(e,t,n,r){return Dk(e,t,n,true,r)}function K2(e,t,n,r){return Dk(e,t,n,false,r)}var Ek=new WeakMap,Nk=new WeakMap;function mE(e){let t=Ek.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let o of wt(r))for(let a of o.lines)for(let i of yt(a)){let l=n.get(i.paragraphId);(!l||i.end>l.end||i.end===l.end&&i.start>l.start)&&n.set(i.paragraphId,{end:i.end,start:i.start});}return Ek.set(e,n),n}function Ak(e){let t=Nk.get(e);if(t)return t;let n=new Map(e.map((r,o)=>[r,o]));return Nk.set(e,n),n}function pE(e){return Math.max(3,Math.min(8,e*.25))}function Dk(e,t,n,r,o){let a=Jc(t,n);if(!a)return [];let i=Ak(n),l=i.get(a.from.paragraphId),s=i.get(a.to.paragraphId),d=mE(e),c=[];for(let u of e.pages)for(let f of wt(u))for(let p of f.lines){let m=Oa(p);for(let[g,h]of m.entries()){let b=Po(e,h,a.from,a.to),x=i.get(h.paragraphId),y=d.get(h.paragraphId),O=l!==void 0&&s!==void 0&&x!==void 0&&x>=l&&x<s&&y?.end===h.end&&y.start===h.start&&g===m.length-1;if((!r||!b)&&!O)continue;let S=r&&b?Yc(p,b.start,b.end,o,h):[];if(O){let T=pE(Math.max(0,p.box.height-p.leading-(p.trailingSpacing??0))),k=h.spans[0]?.style.shaping?.baseLevel,w=k===void 0?vt(f.props):k%2===1,v=Mi(p,h.end,o,h);if(h.spans.some(I=>I.style.shaping!==void 0)){v=w?1/0:-1/0;for(let I of h.spans)v=w?Math.min(v,I.box.x):Math.max(v,I.box.x+I.box.width);}S.push({x:w?v-T:v,width:T});}for(let T of Vp(S)){let k=er({pageIndex:u.index,...T,y:p.box.y,height:p.box.height},f.clipToBox?f.box:void 0);k&&c.push(Rm(e,h.paragraphId,k));}}}return c}function oE(e,t,n,r){let o=new Map;if(t.length===0)return o;for(let a of e.pages)if(!(n&&!n.has(a.index)))for(let i of wt(a))for(let l of i.lines)for(let s of yt(l))for(let d of t){let c=Po(e,s,d.from,d.to);if(!c)continue;let u=o.get(d.key)??[];for(let f of Yc(l,c.start,c.end,r,s)){let p=er({pageIndex:a.index,...f,y:l.box.y,height:l.box.height},i.clipToBox?i.box:void 0);p&&(u.push(Rm(e,s.paragraphId,p)),o.set(d.key,u));}}return o}function X2(e){return {x:e.contentBox.x,y:e.contentBox.y}}function os(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function Y2(e,t,n){if(So(e).has(t))return {x:0,y:0};let r=e.pages[n];if(!r)return {x:0,y:0};let o=a=>en(a).some(i=>i.paragraphId===t);if(r.header&&o(r.header.fragments))return os(r,r.header.box);if(r.footer&&o(r.footer.fragments))return os(r,r.footer.box);for(let a of [r.footnotes,r.endnotes])if(a){for(let i of a.notes)if(o(i.fragments))return os(r,i.box)}return {x:0,y:0}}function U2(e,t,n,r,o){let a=new Map,i=[];for(let d of t){let c=Jc({anchor:d.from,head:d.to},n);c&&i.push({key:d.key,from:c.from,to:c.to});}if(i.length===0)return a;let l=Ak(n),s=(d,c,u,f)=>{for(let p of en(d))for(let m of p.lines){for(let g of yt(m))for(let h of i){let b=Po(e,g,h.from,h.to,l);if(!b)continue;let x=a.get(h.key)??[];for(let y of Yc(m,b.start,b.end,o,g)){let O=er({pageIndex:c,...y,y:m.box.y,height:m.box.height},p.clipToBox?p.box:void 0);O&&(x.push({...O,x:O.x+u,y:O.y+f}),a.set(h.key,x));}}}};for(let d of e.pages)if(!(r&&!r.has(d.index))){s(d.fragments,d.index,0,0);for(let c of [d.header,d.footer]){if(!c)continue;let u=os(d,c.box);s(c.fragments,d.index,u.x,u.y);}for(let c of [d.footnotes,d.endnotes])if(c)for(let u of c.notes){let f=os(d,u.box);s(u.fragments,d.index,f.x,f.y);}}return a}export{Mv as $,xb as $a,Zn as $b,CW as $c,X2 as $d,Ih as A,dy as Aa,kO as Ab,hm as Ac,i0 as Ad,wt as B,Uv as Ba,CO as Bb,jS as Bc,a0 as Bd,en as C,TN as Ca,$d as Cb,cC as Cc,wB as Cd,Ch as D,ad as Da,Kr as Db,dc as Dc,kB as Dd,rv as E,Wn as Ea,Hf as Eb,Sr as Ec,hp as Ed,dv as F,BN as Fa,GO as Fb,Jn as Fc,IB as Fd,cv as G,Ju as Ga,vx as Gb,OC as Gc,yp as Gd,Ia as H,cy as Ha,xl as Hb,ZS as Hc,H0 as Hd,VE as I,kl as Ia,YO as Ib,gz as Ic,jB as Id,Lu as J,hn as Ja,ai as Jb,Il as Jc,C0 as Jd,uv as K,Sl as Ka,Ho as Kb,Om as Kc,kK as Kd,Gs as L,vt as La,m_ as Lb,LC as Lc,G0 as Ld,Eu as M,md as Ma,eF as Mb,Wt as Mc,jc as Md,$s as N,iA as Na,qd as Nb,Kz as Nc,iL as Nd,Nu as O,zy as Oa,nF as Ob,Xz as Oc,lL as Od,Ks as P,uf as Pa,Wo as Pb,pc as Pc,tw as Pd,yt as Q,XA as Qa,Xf as Qb,MP as Qc,ao as Qd,Oa as R,YA as Ra,si as Rb,bc as Rc,_Y as Rd,tN as S,UA as Sa,Yf as Sb,sW as Sc,Lt as Sd,Ca as T,qA as Ta,h_ as Tb,Nm as Tc,$Y as Td,nN as U,ub as Ua,di as Ub,dW as Uc,ZL as Ud,Fa as V,al as Va,dF as Vb,cW as Vc,Ql as Vd,fv as W,gb as Wa,Uf as Wb,Am as Wc,es as Wd,ko as X,hb as Xa,On as Xb,BP as Xc,Mi as Xd,Xi as Y,yb as Ya,pF as Yb,tr as Yc,rE as Yd,Ba as Z,bb as Za,qf as Zb,Bl as Zc,K2 as Zd,vo as _,ll as _a,hF as _b,uW as _c,oE as _d,yE as a,Io as aa,kd as ab,R_ as ac,MW as ad,os as ae,Uk as b,Oo as ba,lI as bb,Jf as bc,BW as bd,Y2 as be,Iu as c,Zh as ca,gf as cb,Zx as cc,LW as cd,U2 as ce,As as d,oN as da,sl as db,Qf as dc,EW as dd,lE as de,ih as e,aN as ea,Rb as eb,Yr as ec,Gm as ed,T2 as ee,lh as f,Lr as fa,cI as fb,L_ as fc,rr as fd,uE as fe,Ds as g,Ro as ga,Id as gb,uS as gc,pR as gd,I2 as ge,wn as h,hv as ha,uI as hb,q_ as hc,IM as hd,O2 as he,Ne as i,Vh as ia,fI as ib,nm as ic,FR as id,F2 as ie,Qt as j,yv as ja,cl as jb,ec as jc,TG as jd,Fk as je,Je as k,Gh as ka,gI as kb,Ej as kc,EG as kd,Ck as ke,gh as l,bv as la,tD as lb,Nj as lc,NG as ld,C2 as le,hh as m,zn as ma,wb as mb,fi as mc,VG as md,M2 as me,IE as n,Au as na,kb as nb,vS as nc,XG as nd,B2 as ne,OE as o,Gu as oa,Od as ob,ni as oc,p0 as od,yh as p,Lv as pa,vb as pb,Ey as pc,WR as pd,Ws as q,ny as qa,Wr as qb,bT as qc,VR as qd,Ye as r,hN as ra,Fd as rb,Dy as rc,GR as rd,FE as s,Fo as sa,nn as sb,Va as sc,G$ as sd,CE as t,_r as ta,No as tb,jy as tc,g$ as td,ME as u,_e as ua,nD as ub,qH as uc,h$ as ud,BE as v,kN as va,Ib as vb,DV as vc,Xl as vd,LE as w,vN as wa,Ka as wb,dm as wc,Ec as wd,Vs as x,je as xa,Ob as xb,iC as xc,PB as xd,vh as y,_a as ya,cD as yb,pm as yc,k$ as yd,De as z,ed as za,Tf as zb,gm as zc,RB as zd};
|