@docx-editor.dev/core 2.20.0 → 2.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/README.md +38 -59
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +11 -10
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +9 -9
  7. package/dist/binding.js +1 -1
  8. package/dist/chunk-25OQBAKA.js +2 -0
  9. package/dist/chunk-3B3DQMSL.js +11 -0
  10. package/dist/chunk-3P3DNJYM.js +5 -0
  11. package/dist/chunk-3PA64KPK.js +5 -0
  12. package/dist/chunk-4TYA4RLP.cjs +1 -0
  13. package/dist/chunk-7N77EN2Z.cjs +2 -0
  14. package/dist/{chunk-GSEUM6AI.cjs → chunk-AGWWNVIJ.cjs} +1 -1
  15. package/dist/chunk-AJCCS53D.js +1 -0
  16. package/dist/chunk-BF2TOG2V.js +1 -0
  17. package/dist/chunk-DFTVN25X.cjs +5 -0
  18. package/dist/chunk-DGONGMAV.js +2 -0
  19. package/dist/chunk-DZYKU2HG.js +1 -0
  20. package/dist/chunk-E5OUYRNM.cjs +5 -0
  21. package/dist/chunk-F4H3LC6M.cjs +2 -0
  22. package/dist/{chunk-CAIWEQLC.js → chunk-FPDIJ4RF.js} +1 -1
  23. package/dist/chunk-IUTTOBQW.cjs +20 -0
  24. package/dist/{chunk-OA6LFCTG.cjs → chunk-IYCXQAFT.cjs} +3 -3
  25. package/dist/chunk-JL3SI5SZ.js +18 -0
  26. package/dist/chunk-OFWUHH52.js +20 -0
  27. package/dist/chunk-OKY6JRJL.js +4 -0
  28. package/dist/{chunk-PIBYJZIH.cjs → chunk-P24FHMQW.cjs} +1 -1
  29. package/dist/chunk-QBKAOSVF.cjs +18 -0
  30. package/dist/{chunk-2HQXLL5L.cjs → chunk-RA2TDTEQ.cjs} +1 -1
  31. package/dist/chunk-S6J4O5XP.js +1 -0
  32. package/dist/{chunk-WTILOUPG.cjs → chunk-T5B4NMKF.cjs} +1 -1
  33. package/dist/chunk-TKQH7BNE.cjs +1 -0
  34. package/dist/{chunk-OHVJYJOA.js → chunk-U5GUJKTS.js} +1 -1
  35. package/dist/chunk-UKVVUHZL.cjs +1 -0
  36. package/dist/chunk-XRYSPKKC.js +1 -0
  37. package/dist/chunk-ZZRCVDQU.cjs +11 -0
  38. package/dist/collaboration/replication.cjs +1 -1
  39. package/dist/collaboration/replication.d.ts +13 -4
  40. package/dist/collaboration/replication.js +1 -1
  41. package/dist/collaboration.d.ts +4 -3
  42. package/dist/contracts/document.d.ts +3 -2
  43. package/dist/contracts/editor.cjs +1 -1
  44. package/dist/contracts/editor.d.ts +9 -9
  45. package/dist/contracts/editor.js +1 -1
  46. package/dist/contracts/interaction.d.ts +2 -2
  47. package/dist/contracts/modules.cjs +1 -1
  48. package/dist/contracts/modules.d.ts +9 -7
  49. package/dist/contracts/modules.js +1 -1
  50. package/dist/contracts/types.d.ts +2 -1
  51. package/dist/{custom-node-writes-piokwVR5.d.ts → custom-node-writes-CncR6KfC.d.ts} +2 -2
  52. package/dist/{document-protection-C6RvCHx-.d.ts → document-protection-DM6mA8Rf.d.ts} +1 -1
  53. package/dist/{editor-BgtcHulQ.d.ts → editor-BRh7GuZF.d.ts} +33 -30
  54. package/dist/editor-scope-OHPwVQ5l.d.ts +84 -0
  55. package/dist/editor.cjs +1 -1
  56. package/dist/editor.css +1 -1
  57. package/dist/editor.d.ts +130 -27
  58. package/dist/editor.js +1 -1
  59. package/dist/export.cjs +2 -2
  60. package/dist/export.d.ts +13 -13
  61. package/dist/export.js +1 -1
  62. package/dist/{font-resolver-Bv2Z25-J.d.ts → font-resolver-DwuQYj3P.d.ts} +1 -1
  63. package/dist/{headless-document-view-DHKMN_3Y.d.ts → headless-document-view-C3fc_jV0.d.ts} +2 -2
  64. package/dist/{image-resources-C51LuAAu.d.ts → image-resources-DxF-SN_8.d.ts} +1 -1
  65. package/dist/{index-3lr8xXF8.d.ts → index-3pNnG4z4.d.ts} +122 -30
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.d.ts +18 -18
  68. package/dist/index.js +1 -1
  69. package/dist/{layout-shaping-CKBUSaS7.d.ts → layout-shaping-_GGjhhVc.d.ts} +1 -1
  70. package/dist/layout.cjs +1 -1
  71. package/dist/layout.d.ts +43 -18
  72. package/dist/layout.js +1 -1
  73. package/dist/{note-properties-CcXUgqr8.d.ts → note-properties-CjT31AuP.d.ts} +1 -1
  74. package/dist/{omml-equation-C5P6Ym3v.d.ts → omml-equation-Bk3OP1fv.d.ts} +1 -1
  75. package/dist/output.cjs +1 -1
  76. package/dist/output.d.ts +8 -7
  77. package/dist/output.js +1 -1
  78. package/dist/{protocol-CsawNZkt.d.ts → protocol-CrbTIW2Z.d.ts} +2 -2
  79. package/dist/{review-paragraph-order-BCIqjopY.d.ts → review-paragraph-order-D3KZohIL.d.ts} +1 -1
  80. package/dist/{revision-projection-BcRnC4Yj.d.ts → revision-projection-kVd7p6Wd.d.ts} +16 -2
  81. package/dist/{semantic-cell-selection-R9wrenwR.d.ts → semantic-cell-selection-CkSsZHDL.d.ts} +11 -4
  82. package/dist/{semantic-interaction-B7beVwH7.d.ts → semantic-interaction-Z2Xa68U5.d.ts} +1 -1
  83. package/dist/{semantic-paint-CLvHwf8y.d.ts → semantic-paint-BHKprI9P.d.ts} +18 -2
  84. package/dist/{semantic-records-CbXwnS80.d.ts → semantic-records-StH-AnHK.d.ts} +153 -10
  85. package/dist/store.cjs +1 -1
  86. package/dist/store.d.ts +468 -439
  87. package/dist/store.js +1 -1
  88. package/dist/{note-lifecycle-D4AOFCAt.d.ts → tree-package-fragment-CpEV1gl3.d.ts} +183 -143
  89. package/dist/{tree-session-contract-DTQxw2zL.d.ts → tree-session-contract-CTT9nM7Z.d.ts} +13 -8
  90. package/dist/{types-barrel-CEOy-Jv0.d.ts → types-barrel-PwcfEkaX.d.ts} +1481 -1433
  91. package/package.json +2 -2
  92. package/dist/chunk-2H4ABRMB.cjs +0 -20
  93. package/dist/chunk-3EZO3O6I.js +0 -4
  94. package/dist/chunk-44SIVFJT.cjs +0 -5
  95. package/dist/chunk-6UCDHGXI.js +0 -1
  96. package/dist/chunk-7VMVDRRU.js +0 -2
  97. package/dist/chunk-CEXC2VHI.cjs +0 -1
  98. package/dist/chunk-CF3JR35B.js +0 -11
  99. package/dist/chunk-D2V4YBWJ.cjs +0 -2
  100. package/dist/chunk-D5EHDHYV.js +0 -1
  101. package/dist/chunk-DGSJZMAE.cjs +0 -11
  102. package/dist/chunk-EHBPYFRE.js +0 -20
  103. package/dist/chunk-GOEBQ26R.js +0 -1
  104. package/dist/chunk-H6WDEAOJ.js +0 -18
  105. package/dist/chunk-I6LSEDUL.cjs +0 -18
  106. package/dist/chunk-IW35GWJN.js +0 -1
  107. package/dist/chunk-JRBGCIR2.js +0 -5
  108. package/dist/chunk-K5HIOS6J.cjs +0 -3
  109. package/dist/chunk-KLQXP27K.js +0 -3
  110. package/dist/chunk-MZFFU66H.cjs +0 -2
  111. package/dist/chunk-MZPNLIP3.js +0 -2
  112. package/dist/chunk-OHJQ7GPZ.cjs +0 -1
  113. package/dist/chunk-P4TGGDK3.js +0 -1
  114. package/dist/chunk-ZKWRCLT2.cjs +0 -1
  115. package/dist/editor-scope-DZJT4ukT.d.ts +0 -53
@@ -0,0 +1,18 @@
1
+ import {a}from'./chunk-VP7SDFCM.js';import {b,c,B}from'./chunk-3P3DNJYM.js';import {m,ug as ug$1,rd as rd$1,da as da$1,qe,pe,I,cf as cf$1,g,pa as pa$1,af as af$1,Lf as Lf$1,Mf as Mf$1,Nf as Nf$1,Of as Of$1,Pf as Pf$1,Kf as Kf$1,Jf as Jf$1,td as td$1,kd as kd$1,_c as _c$1,pd as pd$1,fd as fd$1,gd as gd$1,dd as dd$1,ld as ld$1,md as md$1,id as id$1,nd as nd$1,Ec as Ec$1,Ud as Ud$1,Cb as Cb$1,rb as rb$1,pb as pb$1,Wf as Wf$1,Xf as Xf$1,Af as Af$1,Be,Hd as Hd$1,jd as jd$1,hd as hd$1,vd as vd$1,ed as ed$1,Id as Id$1,Pd as Pd$1,la as la$1,ra as ra$1,Wa as Wa$1,xd as xd$1,Dd as Dd$1,W,Mh as Mh$1,Ee as Ee$1,q,L,x,Ha as Ha$1,Ed as Ed$1,Ae,Ue,nb as nb$1,hb as hb$1,cb as cb$1,ob as ob$1,ab as ab$1,Gd as Gd$1,na as na$1,a as a$1,re,oe,tc as tc$1,fe as fe$1,Va as Va$1,he,yd as yd$1,gb as gb$1,eb,Yf as Yf$1,ka,ce,de,me,le,ib as ib$1,Ta,Vd as Vd$1,ee,Xd as Xd$1,ae,_d as _d$1,ma as ma$1,E,Se,lb as lb$1,ke,qb as qb$1,s,Md as Md$1}from'./chunk-3B3DQMSL.js';import YI from'bidi-js';var Fh=6,Oh=14,pN=`fixed:char-width=${Fh}:line-height=${Oh}`;function jv(e=Fh,t=Oh){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 Hv=/^[0-9A-Fa-f]{6}$/;function Zu(e){if(!(e===void 0||e==="auto"||e==="nil")&&Hv.test(e))return e.toUpperCase()}function Zs(e){if(e&&e.val!=="nil")return Zu(e.fill)}function Ch(e){if(!e||e.localName!=="shd")return;let t={};for(let n of e.attributes)t[n.localName]=n.value;return Zs(t)}function Mh(e){let t;for(let n of e)n.localName==="shd"&&(t=Zs(n.attributes));return t}function Js(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",Bh=/^[0-9a-f]{6}$/i;function Lh(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"||!Bh.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 Eh(e){let t=e.attributes?.w,n=e.attributes?.outlineColor;if(!t||!/^\d{1,8}$/.test(t)||!n||!Bh.test(n))return;let r=Number(t);return r>0&&r<=20116800?Object.freeze({widthPt:r/12700,color:n.toUpperCase()}):void 0}var zv=new Set(["b","bCs","caps","emboss","i","iCs","imprint","outline","shadow","smallCaps","strike","vanish"]);function Vn(e){let t=e.attributes?.val;return t===void 0||!(t==="0"||t==="false"||t==="off")}var Nh=new WeakMap;function Qs(e){let t=[],n;for(let r of e){let o=r.role==="carried"?Nh.get(r.properties):void 0,a;for(let i of r.properties){if(!zv.has(i.localName)){r.emit&&t.push(i);continue}o||(a||(a=new Map),a.set(i.localName,Vn(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 Nh.set(t,n),t}var On=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}),Wv=/^[0-9A-Fa-f]{6}$/;function tl(e,t=false){return e===void 0||!(t?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function Ah(e){return e===void 0||e==="auto"?null:Wv.test(e)?e.toUpperCase():null}var _h={major:null,minor:null,majorEastAsia:null,minorEastAsia:null};function De(e,t){let n={...On},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=tl(a.attributes?.val);i!==null&&i>0&&(n.fontSizePt=i/2);break}case "color":{n.color=Ah(a.attributes?.val);break}case "b":n.bold=Vn(a);break;case "textOutline":n.textOutline=Eh(a);break;case "i":n.italic=Vn(a);break;case "u":{let i=a.attributes?.val??"single";n.underline=i==="none"||!Vn(a)?null:{variant:i,color:Ah(a.attributes?.color)};break}case "strike":n.strike=Vn(a);break;case "dstrike":n.doubleStrike=Vn(a);break;case "highlight":{let i=a.attributes?.val;n.highlight=i&&i!=="none"?i:null;break}case "shd":{n.shading=Zs(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=tl(a.attributes?.val,true);i!==null&&(n.baselineShiftPt=i/2);break}case "caps":n.caps=Vn(a);break;case "smallCaps":n.smallCaps=Vn(a);break;case "spacing":{let i=tl(a.attributes?.val,true);i!==null&&(n.characterSpacingPt=i/20);break}case "w":{let i=tl(a.attributes?.val);i!==null&&i>0&&(n.horizontalScalePercent=i);break}case "kern":{let i=tl(a.attributes?.val);i!==null&&(n.kerningMinPt=i/2);break}case "vanish":n.hidden=Vn(a);break;}return o||(n.fontFamily??=t?.minor??null),n.fontFamilyEastAsia??=t?.minorEastAsia??c(r),n}var Dh=new WeakMap;function ed(e,t){if(e.fontFamily===t)return e;let n=Dh.get(e);n||(n=new Map,Dh.set(e,n));let r=n.get(t);return r||(r=Object.freeze({...e,fontFamily:t}),n.set(t,r)),r}function sn(e,t){return t.caps?e.toUpperCase():e}function tt(e,t,n){return n.measure(sn(e,t),t)}function jh(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 wN="und";function kN(){return typeof Intl.Segmenter=="function"}function Vv(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function Gv(){let e=new(Vv())("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 zh=Gv(),ef=zh,Wh=0;function rd(){return Wh}var _a=null,Lo=null,td=null,nl=null;function Ze(e){if(_a===e&&Lo)return Lo;if(td===e&&nl){let n=nl;return td=_a,nl=Lo,_a=e,Lo=n,n}let t=ef.segment(e);return td=_a,nl=Lo,_a=e,Lo=t,t}function vN(e){ef=e,Vh();}function IN(){ef=zh,Vh();}function Vh(){Wh+=1,_a=null,Lo=null,td=null,nl=null,Ju=null,nd=null,Qu=0;}function TN(e){return Ze(e).length}var Ju=null,nd=null,Qu=0;function $v(e){if(Ju===e&&nd)return {offsets:nd,count:Qu};let t=Ze(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,Ju=e,nd=n,Qu=t.length,{offsets:n,count:t.length}}function FN(e,t){let n=Math.max(0,Math.min(t,e.length)),{offsets:r}=$v(e);return r[n]}function ON(e,t){let n=Ze(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 Gh(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 $h(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 tf(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 fe=(e,t,n)=>e>=t&&e<=n,od=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(t){super(`Unsupported Unicode script at U+${t.toString(16).toUpperCase()}`),this.codePoint=t;}},Yh=e=>{if(fe(e,65313,65338)||fe(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(fe(e,1424,1535)||fe(e,64285,64335))return {slot:"cs",script:"Hebr"};if(fe(e,1536,1791)||fe(e,1872,1919)||fe(e,2160,2207)||fe(e,2208,2303)||fe(e,64336,65023)||fe(e,65136,65279)||fe(e,126464,126719))return {slot:"cs",script:"Arab"};if(fe(e,4352,4607)||fe(e,11904,12351)||fe(e,12352,12543)||fe(e,12544,12687)||fe(e,12784,12799)||fe(e,13312,19903)||fe(e,19968,40959)||fe(e,44032,55215)||fe(e,63744,64255)||fe(e,65382,65437)||fe(e,65440,65500)||fe(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(fe(e,2304,2431)||fe(e,43232,43263))return {slot:"cs",script:"Deva"};if(fe(e,2432,2559))return {slot:"cs",script:"Beng"};if(fe(e,880,1023)||fe(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(fe(e,1024,1327)||fe(e,7296,7311)||fe(e,11744,11775)||fe(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(fe(e,3584,3711))return {slot:"cs",script:"Thai"};if(fe(e,6016,6143)||fe(e,6624,6655))return {slot:"cs",script:"Khmr"};if(fe(e,768,879)||fe(e,6832,6911)||fe(e,7616,7679)||fe(e,8400,8447)||fe(e,8192,8303)||fe(e,65056,65071)||e<=47||fe(e,58,64)||fe(e,91,96)||fe(e,123,191)||e===5760||fe(e,8192,11263)||fe(e,65024,65039)||fe(e,65280,65381)||fe(e,65438,65439)||fe(e,65501,65535)||fe(e,126976,129791)||fe(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(fe(e,192,687)||fe(e,7424,7551)||fe(e,7552,7615)||fe(e,7680,7935)||fe(e,11360,11391)||fe(e,42784,43007)||fe(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new od(e)};function Kv(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:Yh(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 Uh(e,t,n){let r=Kv(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 We(e,t){if(t!=="eastAsia")return e;let n=e.fontFamilyEastAsia;return n===null?e:ed(e,n)}var Kh=e=>{let t;try{t=Yh(e);}catch(n){if(n instanceof od)return "base";throw n}return t===null?"common":t.slot==="eastAsia"?"eastAsia":"base"},Xh=e=>{for(let t=0;t<e.length;t+=1)if(e.charCodeAt(t)>=128)return false;return true};function qh(e,t=[]){let n=[],r=(m,p,g)=>{let y=n.at(-1);y&&y.segment===m&&y.to===p?n[n.length-1]={segment:m,from:y.from,to:g}:n.push({segment:m,from:p,to:g});},o=null,i=e.some((m,p)=>{if(!t[p]||Xh(m))return false;for(let g of m)if(tf(g.codePointAt(0)))return true;return false})?Ze(e.join("")):null,l=0,s=0,d=false,c=[],u=m=>{for(let p of c)m==="eastAsia"&&!p.ascii&&r(p.segment,p.from,p.to);c.length=0;};for(let m=0;m<e.length;m+=1){let p=e[m],g=s;if(s+=p.length,!i&&Xh(p)){/[0-9A-Za-z]/.test(p)&&(u("base"),o="base");continue}for(let y=0;y<p.length;){let x=p.codePointAt(y),b=y+(x>65535?2:1),h=false;if(i){let R=g+y;for(;i[l].utf16To<=R;)l+=1;let P=i[l];x=P.text.codePointAt(0),b=Math.min(p.length,P.utf16To-g),R===P.utf16From&&(d=!!t[m]&&tf(x)),h=d;}if(h){let R=Kh(x);R!=="common"&&(u(R),o=R),r(m,y,b),y=b;continue}let v=Kh(x);v==="common"?o===null?c.push({segment:m,from:y,to:b,ascii:x<=127}):o==="eastAsia"&&x>127&&r(m,y,b):(u(v),o=v,v==="eastAsia"&&r(m,y,b)),y=b;}}if(n.length<2)return n;n.sort((m,p)=>m.segment-p.segment||m.from-p.from);let f=[n[0]];for(let m=1;m<n.length;m+=1){let p=n[m],g=f[f.length-1];g.segment===p.segment&&p.from<=g.to?p.to>g.to&&(f[f.length-1]={...g,to:p.to}):f.push(p);}return f}function Zh(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 Tt(e,t=false){return dn(e.fragments,t)}var Jh=new WeakMap;function dn(e,t=false){let n=Jh.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={},Jh.set(e,n)),n[r]=a,a}function ey(e){let t=[];for(let n of e.pages)for(let r of Tt(n))t.push(...r.lines);return t}function Xv(e){return e.anchoredDrawings??[]}var Yv=Object.freeze({x:0,y:0,width:0,height:0});function ja(e){let t=e??Yv;return {box:t,origin:Object.freeze({x:t.x,y:t.y})}}var Uv={fragments:true,anchoredDrawings:true,header:true,footer:true,footnotes:true,endnotes:true},qv=Object.freeze(Object.keys(Uv));var Zv={separator:true,notes:true},Jv=Object.freeze(Object.keys(Zv));function Qh(e,t,n,r){let o=t.kind??(n==="footnote"?"footnotes":"endnotes");for(let a of Jv)switch(a){case "separator":t.separator&&r({page:e,story:"note-separator",host:t.separator,...ja(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,...ja(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;case "endnote":r({page:e,story:"endnote",host:i,...ja(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;}break;}}function Qv(e,t){for(let n of qv)switch(n){case "fragments":t({page:e,story:"body",host:e,...ja(e.contentBox),noteScopeId:null,noteAreaKind:null});break;case "anchoredDrawings":break;case "header":e.header&&t({page:e,story:"header",host:e.header,...ja(e.header.box),noteScopeId:null,noteAreaKind:null});break;case "footer":e.footer&&t({page:e,story:"footer",host:e.footer,...ja(e.footer.box),noteScopeId:null,noteAreaKind:null});break;case "footnotes":e.footnotes&&Qh(e,e.footnotes,"footnote",t);break;case "endnotes":e.endnotes&&Qh(e,e.endnotes,"endnote",t);break;}}function eI(e,t){for(let n of e.pages)Qv(n,t);}var ty=16,nf=Object.freeze({x:0,y:0});function ny(e,t,n){let r=t.textboxStory?.contentOffset??nf,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 Ha(e,t,n=nf,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>ty)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]),ny(d,u,l===0?r?.(u):void 0));for(let u of i.fragments)o(u,c);};a(e,0,Object.freeze([]),n);}function jN(e,t){eI(e,n=>{let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:l}=n,s=o==="header"||o==="footer"?d=>Zh(d,n.origin,{x:r.box.x,y:r.box.y}):void 0;Ha(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=m=>Object.freeze({x:u.x+m.x-d.x,y:u.y+m.y-d.y,width:m.width,height:m.height});t({page:r,story:c.textboxDepth===0?o:"textbox",rootStory:o,noteScopeId:i,noteAreaKind: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 rf(e,t,n=nf,r){let o=(a,i,l,s)=>{if(!(i>ty)){for(let d of dn(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]),ny(s,d,i===0?r?.(d):void 0));}};o(e,0,Object.freeze([]),n);}function tI(e,t){let n=[];for(let r of e.pages)for(let o of Tt(r))o.paragraphId===t&&n.push(o);return n.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function ad(e,t,n,r){for(let o of r??ey(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 of(e){return e.contentControls??[]}function id(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 af(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 ld=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});var ry=new WeakMap,oy=new WeakMap,ay=new WeakMap,iy=new WeakMap;function ly(e){let t=iy.get(e);if(t)return t;let n=new Set,r=[];for(let o of Tt(e)){for(let a of o.lines)for(let i of za(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 iy.set(e,r),r}function Wa(e){let t=ry.get(e);if(t)return t;let n=new Set,r=[];for(let o of e.pages)for(let a of ly(o))n.has(a)||(n.add(a),r.push(a));return ry.set(e,r),r}function Eo(e){let t=oy.get(e);if(t)return t;let n=new Map;for(let[r,o]of Wa(e).entries())n.set(o,r);return oy.set(e,n),n}function nI(e){let t=ay.get(e);if(t)return t;let n=new Set,r=[],o=a=>{for(let i of dn(a)){for(let l of i.lines)for(let s of za(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 ly(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 ay.set(e,r),r}var sy=new WeakMap;function rl(e){let t=sy.get(e);if(t)return t;let n=[...Tt(e)];for(let r of [e.header,e.footer])r&&n.push(...dn(r.fragments));for(let r of [e.footnotes,e.endnotes])if(r)for(let o of r.notes)n.push(...dn(o.fragments));return sy.set(e,n),n}function uy(e,t,n){return e.paragraphId===t&&n>=e.start&&n<e.end}var dy=new WeakMap;function St(e){let t=dy.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)?rI(e):[n];return dy.set(e,o),o}function za(e){let t=St(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 rI(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 br(e,t){return St(e).find(n=>n.paragraphId===t)??null}function No(e,t,n,r,o=Eo(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 ZN(e,t){for(let n of e.pages)for(let r of Tt(n)){let o=Va(r).indexOf(t);if(o>0)return Va(r).slice(0,o).reverse()}return []}var cy=new WeakMap;function Va(e){let t=cy.get(e);if(t)return t;let n=[];for(let r of e.lines??[])for(let o of za(r))n.includes(o.paragraphId)||n.push(o.paragraphId);return n.includes(e.paragraphId)||n.push(e.paragraphId),cy.set(e,n),n}function oI(e,t){let n=Va(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=br(a,t);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function xr(e,t,n){let r=oI(e,t);return r!==null&&n>=r.start&&n<r.end}function JN(e,t){for(let n of e.pages)for(let r of rl(n))if(r.paragraphId===t)return r;for(let n of e.pages)for(let r of rl(n))if(Va(r).includes(t))return r;return null}function fy(e,t){return t?{...e,range:{paragraphId:t.paragraphId,start:t.start,end:t.end},spans:t.spans,drawings:t.drawings}:e}function tA(e){return e==="simple-markup"?"proposed":e}var je="all-markup",aI=Object.freeze({hiddenAuthors:Object.freeze(new Set),resolvedMarkup:"plain",cacheKey:"plain"}),py=new WeakMap;function nA(e){if(!e)return aI;if(e.resolvedMarkup==="plain")return e;let t=py.get(e);return t||(t=Object.freeze({...e,resolvedMarkup:"plain",cacheKey:`${e.cacheKey}|plain`}),py.set(e,t)),t}var dd=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]()}},rA=new dd([]);function oA(e){let t=new Set;for(let o of e)t.add(o);if(t.size===0)return;let n=[...t].sort(),r=new dd(n);return Object.freeze({hiddenAuthors:r,includes:o=>!r.has(o.author),includesNode:(o,a)=>!r.has(a),cacheKey:JSON.stringify(n)})}function Pr(e,t){return e.includes?.(t)??ud(e,t.nodeId,t.author)}function ud(e,t,n){return e.includesNode?.(t,n)??!e.hiddenAuthors.has(n)}function ol(e,t,n){return Pr(e,t)?n:e.excludedNodeMode?.(t.nodeId,t.author)??"proposed"}function gy(e,t,n,r){return ud(e,t,n)?r:e.excludedNodeMode?.(t,n)??"proposed"}var xn=Object.freeze([]),iI=32,lI={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function Sr(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 Xt(e){if(e.kind==="textValue")return null;let t=lI[e.kind];if(t===void 0)return null;let n=Sr(e,"date");return {kind:t,id:Sr(e,"id")??"",author:Sr(e,"author")??"",...n===void 0?{}:{date:n},nodeId:e.id}}function en(e,t){return e.length===0?[t]:[...e,t]}function zt(e){return e.kind!=="textValue"&&ka(e.kind)}var fd=iI;function Ee(e,t,n){if(e.length===0||t==="all-markup"&&!n)return true;for(let r of e){let o=n?ol(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 lf(e,t,n){if(!n&&t==="all-markup")return e;if(!Ee(e,t,n))return null;if(t!=="all-markup"&&n?.resolvedMarkup==="plain")return xn;if(!n)return e;let r=e.filter(o=>Pr(n,o));return r.length===0?xn:r}function al(e,t,n){if(t==="all-markup"||e.length===0)return xn;if(!n)return e;let r=e.filter(o=>Pr(n,o));return r.length===0?xn:r}function my(e,t,n){return t==="all-markup"&&(!n||Pr(n,e))}function sI(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 Pr(t,{kind:"format",id:n.attributes?.id??"",author:n.attributes?.author??"",...n.attributes?.date===void 0?{}:{date:n.attributes.date},nodeId:r})}):e}function pd(e,t,n,r){let o=lf(e,n,r);if(o===null)return null;let a=r?sI(t,r):t,i=al(e,n,r);return {props:a,...o.length===0?{}:{revisions:o},...i.length===0?{}:{changeSites:i}}}function md(e,t,n){if(t!=="all-markup")return {revisions:xn,formatRevision:null};if(!n)return {revisions:Vr(e),formatRevision:cd(e)};let r=Vr(e).filter(a=>my(a,t,n)),o=cd(e);return {revisions:r,formatRevision:o&&my(o,t,n)?o:null}}function hy(e,t,n){let r=Vr(e);if(!n)return r.length>0||cd(e)!==null;if(r.some(a=>Pr(n,a)))return true;let o=cd(e);return o!==null&&Pr(n,o)}function Vr(e){if(e.kind==="textValue")return sd;let t=e.children.find(o=>o.kind==="paragraphProperties");if(!t||t.kind==="textValue")return sd;let n=t.children.find(o=>o.kind==="runProperties");if(!n||n.kind==="textValue")return sd;let r=[];for(let o of n.children){if(o.kind==="textValue"||o.namespaceUri!==da$1)continue;let a=dI[o.localName];if(a===void 0)continue;let i=Sr(o,"date");r.push({kind:a,id:Sr(o,"id")??"",author:Sr(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:sd}var dI={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function cd(e){if(e.kind==="textValue")return null;let t=e.children.find(r=>r.kind==="paragraphProperties");if(!t||t.kind==="textValue")return null;let n=t.children.find(r=>r.kind==="runProperties");if(!n||n.kind==="textValue")return null;for(let r of n.children){if(r.kind==="textValue"||r.namespaceUri!==da$1||r.localName!=="rPrChange")continue;let o=Sr(r,"date");return {kind:"format",id:Sr(r,"id")??"",author:Sr(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var sd=Object.freeze([]);function yy(e){return e.find(t=>cI(t))??e[0]}function cI(e){return e.kind==="delete"||e.kind==="moveFrom"}function gd(e,t){let n=yy(e);return {...n?{markRevisions:e,markRevision:n}:{},...t?{markFormatRevision:t}:{}}}function aA(e){return yy(Vr(e))??null}function hd(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 Gn(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}})}var by=4096,Wt=64,uf=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),xy=/\s*\\\*\s*MERGEFORMAT\s*$/i;function Ao(e){if(e.length>pe)return null;let t=e.replace(/\s+/g," ").trim().toUpperCase();return t.length>pe?null:t.replace(xy,"").trim()}var uI=/\s*\\#\s*(?:"([^"]*)"|([^\\"]+))$/;function fI(e){if(e.length>pe)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>pe)return null;let n=t.replace(xy,"").trim(),r=uI.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 Ga(e){let t=fI(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 Gr(e){return Ga(e)?.kind??null}function Ft(e,t){return ce(e,t)}function Rr(e){return de(e)}function wr(){return {nodes:0,exhausted:false}}function ut(e){return e.exhausted?false:(e.nodes+=1,e.nodes>by?(e.exhausted=true,false):true)}function Do(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function il(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 $a(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function pI(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function _o(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>qe?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function Ka(e){return e.nesting<2||e.nesting>qe?null:e.inner[e.nesting-2]??null}function Sy(e){if(e.nesting===1)return e.phase==="instruction";let t=Ka(e);return t!==null&&!t.separated}function df(e,t){if(!Sy(e))return false;if(e.nesting===1)return t?!e.deletedInstructionOverflow:!e.instructionOverflow;let n=Ka(e);return t?!n.deletedOverflow:!n.overflow}function Py(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let t=Ka(e);t&&(t.sawLive=true);}function cf(e,t){if(e.nesting===1){t?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let n=Ka(e);n&&(t?(n.deletedOverflow=true,n.deletedInstruction=""):(n.overflow=true,n.instruction=""));}function sf(e){cf(e,false),cf(e,true);}function mI(e,t,n=false){if(!df(e,n))return;let r=Ka(e);n||Py(e);let o=r?n?r.deletedInstruction:r.instruction:n?e.deletedInstruction:e.instruction;if(o.length+t.length>pe){cf(e,n);return}r?n?r.deletedInstruction=o+t:r.instruction=o+t:n?e.deletedInstruction=o+t:e.instruction=o+t;}function jo(e,t,n,r){if(!Sy(e))return;let o=ee(t);if(o||Py(e),!df(e,o))return;if(r>Wt){sf(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(!ut(n)){sf(e);return}if(l.depth>Wt){sf(e);return}if(l.node.kind==="textValue"){if(mI(e,l.node.value,o),!df(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 Ho(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=$a(e);return r.overflow?null:Ga(r.instruction)}let t=Ka(e);if(!t||t.separated)return null;t.separated=true;let n=pI(t);return n.overflow?null:Ga(n.instruction)}function zo(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&il(e);}function Ry(e){return e.phase==="instruction"&&e.nesting>=1}function wy(e){return e.phase==="result"&&e.nesting>=1}function ff(e){let t=false,n=false,r=false,o=wr(),a=Do(),i=()=>t&&n&&r,l=m=>{m==="PAGE"?t=true:m==="NUMPAGES"?n=true:r=true;},s=false,d=[],c=(m,p)=>{if(m.kind!=="runProperties"){if(Ft(m,"begin")){_o(a),a.nestingOverflow&&(s=true);return}if(Rr(m)){jo(a,m,o,p);return}if(Ft(m,"separate")){let g=a.nesting,y=a.phase,x=Ho(a);if(s)return;x&&(g<=1||y==="result")&&d.push(x.kind);return}if(Ft(m,"end")&&(zo(a),a.nesting===0)){if(!s)for(let g of d)l(g);d.length=0;}}},u=(m,p)=>{if(m.kind==="run")for(let g of m.children){if(!ut(o))return;if(c(g,p+1),(g.kind==="drawing"||g.kind==="generic")&&!Rr(g)&&"children"in g&&g.children.length>0){let y={...a,inner:a.inner.map(h=>({...h}))},x=s,b=d;d=[],f(g,p+1),Object.assign(a,y),s=x,d=b;}if(i()||o.exhausted)return}},f=(m,p)=>{if(!i()&&ut(o)&&!(p>Wt)&&m.kind!=="textValue"){if(m.kind==="paragraph"){il(a),s=false,d.length=0;for(let g of m.children)if(f(g,p+1),i()||o.exhausted)return;il(a),s=false,d.length=0;return}if(m.kind==="run"){u(m,p);return}if(fe$1(m)){let g=Gr(he(m)??"");if(g){l(g);return}}for(let g of m.children)if(f(g,p+1),i()||o.exhausted)return}};return f(e,0),!t&&!n&&!r?uf:{hasPage:t,hasNumPages:n,hasSectionPages:r}}var ll=256,gI=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:false}),hI=Object.freeze({suppressNonDelimiterText:true,noteRef:false,pageRef:false}),yI=Object.freeze({suppressNonDelimiterText:false,noteRef:true,pageRef:false}),bI=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:true}),yd=new WeakMap;function Cn(e){return yd.get(e)??gI}function xI(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>pe)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>pe)return null;let n=xI(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>ll||o.startsWith("\\"))return null;if(r==="NOTEREF")return SI(n,o);if(r==="PAGEREF")return PI(n,o);let a=false,i=false,l=false,s=false,d=false;for(let f=2;f<n.length;f+=1){let m=n[f].toUpperCase();if(m==="\\R")i=true;else if(m==="\\W")l=true;else if(m==="\\N")a=true;else if(m==="\\T")s=true;else if(m==="\\H")d=true;else if(m==="\\*"&&n[f+1]?.toUpperCase()==="MERGEFORMAT")f+=1;else {if(m==="\\*MERGEFORMAT")continue;return null}}let u={bookmark:o,numberSwitch:a?"n":i?"r":l?"w":null,hyperlink:d};return s&&yd.set(u,hI),u}function SI(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 yd.set(r,yI),r}function PI(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 yd.set(r,bI),r}var fA=64,pA=64,RI=[{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 Kr(e){if(!Number.isFinite(e))return 1;let t=Math.trunc(e);return t<0?1:t>9999?9999:t}function Wo(e){return String(Kr(e))}function wI(e){let t=Kr(e);return t<10?`0${t}`:String(t)}function ky(e){let t=Kr(e);t>3999&&(t=3999);let n="";for(let{value:r,glyph:o}of RI)for(;t>=r;)if(n+=o,t-=r,n.length>=64)return n.slice(0,64);return n||"I"}function kI(e){return ky(e).toLowerCase()}function vy(e){let t=Kr(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 vI(e){return vy(e).toLowerCase()}function II(e){let t=Kr(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 TI(e){return Kr(e).toString(16).toUpperCase()}function FI(e){let t=["*","\u2020","\u2021","\xA7"],n=Kr(e);if(n<=0)return t[0];let r=(n-1)%t.length,o=Math.min(Math.floor((n-1)/t.length)+1,OI);return t[r].repeat(o)}var OI=8,bd=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],CI=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function xd(e){let t=Kr(e);if(t<20)return bd[t];if(t<100){let r=t%10;return CI[Math.floor(t/10)]+(r===0?"":`-${bd[r]}`)}if(t<1e3){let r=t%100;return `${bd[Math.floor(t/100)]} hundred${r===0?"":` ${xd(r)}`}`}let n=t%1e3;return `${bd[Math.floor(t/1e3)]} thousand${n===0?"":` ${xd(n)}`}`}function Iy(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function MI(e){return Iy(xd(e))}var BI=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function LI(e){let t=BI.get(e);return t!==void 0?t:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function EI(e){let t=xd(e),n=Math.max(t.lastIndexOf(" "),t.lastIndexOf("-")),r=n<0?"":t.slice(0,n+1);return Iy(r+LI(t.slice(n+1)))}function $n(e,t){switch(e){case "decimal":return Wo(t);case "decimalZero":return wI(t);case "upperRoman":return ky(t);case "lowerRoman":return kI(t);case "upperLetter":return vy(t);case "lowerLetter":return vI(t);case "ordinal":return II(t);case "cardinalText":return MI(t);case "ordinalText":return EI(t);case "hex":return TI(t);case "chicago":return FI(t);case "numberInDash":return `- ${Wo(t)} -`;case "none":case "bullet":return "";default:return Wo(t)}}function pf(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"?"":$n(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}function NI(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 Vo(e){if(Ao(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=NI(d),o===null)return null;continue}return null}return {kind:r,numFmt:o,suppressPeriod:a}}function Ty(e,t){let n=$n(e.numFmt??"decimal",t);return n.length===0?"":e.suppressPeriod?n:`${n}.`}function Xa(e,t){if(e.kind!=="textValue"){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da$1&&n.localName===t)return n}}function RA(e){if(e.kind==="textValue")return false;let t=Xa(e,"paragraphProperties")??Xa(e,"pPr");if(!t)return false;let n=Xa(t,"runProperties")??Xa(t,"rPr");return n===void 0?false:Xa(n,"del")!==void 0||Xa(n,"moveFrom")!==void 0}function mf(e,t,n,r,o=[]){if(e.kind==="textValue"||t>=la$1)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(Ed$1(s)){if(l+1>=la$1)continue;let u=Gd$1(s);if(u&&!a(u,l+1))return false;continue}if(na$1(s)&&!zt(s)){if(!mf(s,l+1,n,r,o))return false;continue}if(!zt(s))continue;let d=Xt(s);if(!d)continue;let c=en(o,d);if(Ee(c,n,r)&&!mf(s,l+1,n,r,c))return false}return true};return a(e.children,t)}function gf(e,t,n){if(t==="all-markup"&&!n)return false;for(let r of Vr(e)){let o=n?ol(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 Fy(e,t="proposed",n){return e.kind!=="paragraph"||!gf(e,t,n)?false:mf(e,0,t,n)}var Oy=new WeakMap;function My(e){let t=Oy.get(e);if(t)return t;let n=new Map;for(let r of Be(e)){let o=Ae(r);if(o)for(let a of new Set([o.separateParagraphId,...r.resultParagraphIds,r.endParagraphId])){let i=Ha$1(e,a);if(i?.kind!=="paragraph")continue;let l=Ue(i),s=r.beginParagraphId===r.endParagraphId?l.spanOf(r.beginNodeId):void 0,d=s?.start??(a===o.separateParagraphId?l.spanOf(o.separateNodeId)?.end:0),c=s?.end??(a===r.endParagraphId?l.spanOf(o.endNodeId)?.start:l.length);if(d===void 0||c===void 0||c<=d)continue;let u=n.get(a)??[];u.push({start:d,end:c}),n.set(a,u);}}return Oy.set(e,n),n}function By(e,t,n){return !e||!t?.length?e:(r,o)=>e(r,t.some(a=>n()>=a.start&&n()<a.end)?o.filter(a=>!(a.localName==="rStyle"&&a.attributes?.val==="Hyperlink")):o)}var Cy=new WeakMap;function Ly(e){if(e.size===0)return "";let t=Cy.get(e);if(t!==void 0)return t;let n=B([...e]);return Cy.set(e,n),n}function sl(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"?Xd$1(e):""}function Ya(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=Lh(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 kr(e,t,n){let r=Ya(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return n?[...n(t,r)]:t.length===0?r:[...t,...r]}function AI(e){let t="",n=[];for(let r of e){let o=n.every(Boolean);if(ce(r,"begin")){if(n.length>=qe)return null;o&&(t+="{"),n.push(true);}else if(ce(r,"separate"))n.length&&(n[n.length-1]=false);else if(ce(r,"end"))n.pop(),n.every(Boolean)&&(t+="}");else if(o&&fe$1(r))t+=`{${he(r)??""}}`;else if(o&&de(r)&&r.kind!=="textValue")for(let a of r.children)a.kind==="textValue"&&(t+=a.value);if(t.length>pe)return null}return t||null}function hf(e,t,n,r,o,a,i,l=[]){if(e.kind!=="paragraph")return [...t];let s=re(e);if(s.length===0&&l.length===0)return [...t];let d=[];if(!oe(e,d,{left:4096}))return [...t];let c=Ue(e),u=new Map,f=new Map,m=(g,y,x)=>{if(g.kind==="textValue"||x>64)return;let b=zt(g)?en(y,Xt(g)):y;f.set(g.id,b),g.kind==="run"&&u.set(g.id,g);for(let h of g.children)m(h,b,x+1);};m(e,[],0);let p=[...t];for(let g of s){let y=new Set(g.removeNodeIds),x=d.filter(S=>y.has(S.node.id)&&Ee(f.get(S.node.id)??[],a,i)).map(S=>S.node),b=AI(x),h=c.spanOf(g.node);if(!b||!h)continue;let v=g.addressing==="atomic"?h.start+1:h.end;if(g.addressing!=="atomic")for(let S of x)v=Math.max(v,c.spanOf(S)?.end??v);let R=t.find(S=>S.start>=h.start&&S.end<=v&&S.fieldAtom),P=f.get(g.node.id)??[];if(!Ee(P,a,i))continue;let O=u.get(g.formatRunIds[0]??g.runId),k=R?.props??(O?kr(O,n,r):n),I=R?.style??De(k,o);if(I.hidden)continue;let T={text:b,props:k,style:I,start:h.start,end:v,projected:true,fieldAtom:{formField:false},...P.length?{revisions:P}:{}};p=p.filter(S=>!(S.start>=h.start&&S.end<=v&&(S.end>S.start||S.fieldAtom))),p.push(T);}for(let g of l)if(p=p.filter(y=>y.end<=g.start||y.start>=g.end),g.code){let y=g.sourceNodeId?f.get(g.sourceNodeId)??[]:[];if(!Ee(y,a,i))continue;let x=d.find(R=>R.node.id===g.sourceNodeId),b=x&&u.get(x.runId),h=b?kr(b,n,r):n,v=De(h,o);if(v.hidden)continue;p.push({text:g.code,props:h,style:v,...y.length?{revisions:y}:{},start:g.start,end:g.end,projected:true,fieldAtom:{formField:false}});}return p.sort((g,y)=>g.start-y.start)}var DI=`
2
+ \r`,_I=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function Ey(e,t){let n=t;for(;n<e.length&&DI.includes(e[n]);)n+=1;return n}function Ny(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 Sd(e){if(e.length===0||e.length>256)return null;let t=Ey(e,0);if(e[t]==='"')return null;let n=Ny(e,t),r=e.slice(t,n).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=Ey(e,n);if(o>=e.length)return null;let a=Ny(e,o),i=e.slice(a).trim();for(;;){let l=i.replace(_I,"").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 Ay=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),jI=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function HI(e){let t=e;for(;;){let n=t.replace(jI,"").trimEnd();if(n===t)return t;t=n;}}function zI(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 Pd(e){let t=Ao(e);if(t===null||t.length===0)return null;let n=HI(t),r=Ay[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=zI(o);if(a===null)return null;let i=Ay[a];return i?{property:i}:null}function Rd(e,t){if(!t)return null;let n=t[e.property];return n!==void 0&&n.length>0?n:null}function wd(e){if(e.length>pe)return null;let t=[],n=0;for(;n<e.length;){if(/\s/.test(e[n])){n++;continue}let l=e[n]==='"',s=l?++n:n;for(;n<e.length&&(l?e[n]!=='"':!/\s/.test(e[n]));)n++;if(l&&n===e.length||(t.push({value:e.slice(s,n),quoted:l}),l&&(n++,n<e.length&&!/\s/.test(e[n]))))return null}let[r,o]=t;if(!r||r.quoted||!o)return null;let a=r.value.toUpperCase();if(!["REF","PAGEREF","NOTEREF"].includes(a)||!o.value||o.value.length>ll||o.value.startsWith("\\"))return null;let i=false;for(let l=2;l<t.length;l++){let s=t[l];if(s.quoted)return null;let d=s.value.toLowerCase();if(d==="\\h")i=true;else {if(d==="\\p")continue;if(a==="REF"&&["\\r","\\w","\\n","\\t","\\f"].includes(d))continue;if(a==="NOTEREF"&&d==="\\f")continue;if(d==="\\*mergeformat")continue;if(d==="\\*"||d==="\\#"||a==="REF"&&d==="\\d"){let c=t[++l];if(!c||!c.quoted&&c.value.startsWith("\\"))return null}else return null}}return i?{target:null,anchor:o.value,tooltip:null}:null}var WI=pe,VI=2048,GI=256;function $I(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 KI=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function kd(e){if(e.length===0||e.length>WI)return null;let t=$I(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(!KI.has(u))continue;let f=t[d+1];if(!f||!f.quoted&&f.value.startsWith("\\"))continue;d+=1;let m=f.value.length>0&&f.value.length<=GI;u==="\\l"?i||(i=true,m&&(a=f.value)):u==="\\o"&&(s||(s=true,m&&(l=f.value)));continue}o||(o=true,c.value.length>0&&c.value.length<=VI&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:l}}var Go=1024;function dl(e,t){for(let n of e.attributes)if(n.namespaceUri===da$1&&n.localName===t)return n.value}function yf(e){return e.kind==="drawing"||e.localName==="drawing"||e.localName==="pict"}function _y(e,t){let n="",r=(o,a)=>{if(!(o.kind==="textValue"||n.length>=Go)&&!(t.exhausted||a>Wt)&&ut(t)){if(o.kind==="text"){for(let i of o.children)i.kind==="textValue"&&(n+=i.value.slice(0,Go-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 Dy=new WeakMap;function jy(e,t){let n=Dy.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,l="",s=wr(),d=u=>{let f=Go-l.length;if(f<=0){a=true;return}l+=u.length>f?u.slice(0,f):u;},c=(u,f,m)=>{if(a||u.kind==="textValue"||m>=la$1||s.exhausted||f>Wt)return;if(u.kind==="bookmarkStart"){!o&&dl(u,"name")===t&&(o=true,i=dl(u,"id"));return}if(u.kind==="bookmarkEnd"){o&&i!==void 0&&dl(u,"id")===i&&(a=true);return}if(u.kind==="run"){if(!o)return;for(let g of u.children){if(a||!ut(s))return;if(g.kind==="text")for(let y of g.children)y.kind==="textValue"&&d(y.value);else g.kind==="tab"&&d(" ");}return}if(yf(u)||fe$1(u)||!ut(s))return;let p=ma$1(u,m);for(let g of u.children)c(g,f+1,p);};for(let u of e.children){if(a||!ut(s))break;c(u,1,0);}return n||(n=new Map,Dy.set(e,n)),n.set(t,l),l}var zy=new WeakMap,Hy=new WeakMap;function vd(e,t){return t&&zy.set(e,t),e}function cl(e){return e?zy.get(e):void 0}function Wy(e){let t=cl(e);if(!t)return "";let n=Hy.get(t);return n||(n=B(ra$1(t)),Hy.set(t,n)),n}function Xr(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 ul=new WeakMap,Vy=new WeakMap;function Id(e){return e&&e.kind!=="textValue"?Vy.get(e)??null:null}function $o(e,t){return e.kind!=="textValue"&&e.namespaceUri===da$1&&e.localName===t}function Ua(e,t,n){if(t==="all-markup"||e.kind==="textValue")return [];let r=[...al(Vr(e),t,n)],o=e.children.find(s=>s.kind==="paragraphProperties"),a=Id(o);a&&r.push(a);let i=o&&o.kind!=="textValue"?o.children.find(s=>s.kind==="runProperties"):void 0,l=Id(i);return l&&r.push(l),r}function bf(e,t,n,r=0){if(t==="all-markup"&&!n||r>=W)return e;let o=`${t}|${n?.cacheKey??""}`,a=ul.get(e)?.get(o);if(a)return a;let i=e.children,l=null,s=$o(e,"pPr")?"pPrChange":$o(e,"rPr")?"rPrChange":null,d=s?i.find(p=>$o(p,s)):void 0;if(d&&d.kind!=="textValue"){let p=h=>d.attributes.find(v=>v.namespaceUri===da$1&&v.localName===h)?.value??"",g=p("date"),y={kind:"format",nodeId:d.id,id:p("id"),author:p("author"),...g===""?{}:{date:g}},x=n?ol(n,y,t):t,b=x==="original"?Mh$1(d):null;x==="proposed"&&(i=i.filter(h=>h!==d)),l=x==="proposed"&&(!n||Pr(n,y))?y:null,b!==null&&(s==="pPrChange"?i=[...b.filter(h=>!$o(h,"rPr")&&!$o(h,"sectPr")),...i.filter(h=>$o(h,"rPr")||$o(h,"sectPr"))]:i=[...i.filter(Ee$1),...b.filter(h=>!Ee$1(h))]);}let c=i!==e.children,u=i.map(p=>{if(p.kind==="textValue"||p.localName.endsWith("PrChange"))return p;let g=bf(p,t,n,r+1);return c||=g!==p,g}),f=c?{...e,children:u}:e;l&&Vy.set(f,l);let m=ul.get(e);if(m||ul.set(e,m=new Map),Xr(m,o,f),f!==e){let p=ul.get(f);p||ul.set(f,p=new Map),Xr(p,o,f);}return f}function qa(e,t,n){let r=[],o=0,a=e.members.length-1;return e.members.forEach((i,l)=>{let s=Ue(i).length,d=l<a&&t?Ua(i,t,n):[];r.push({paragraphId:i.id,base:o,length:s,...d.length>0?{markChangeSites:d}:{}}),o+=s;}),{members:r,total:o}}function xf(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 Gy(e,t){let n=xf(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 XI(e,t){return {...e,range:Gy(e.range,t)}}function Td(e,t){let n=t.members.filter(r=>r.markChangeSites!==void 0).map(r=>({offset:r.base+r.length,sites:r.markChangeSites}));return e.map(r=>{let o=n.filter(p=>p.offset>=r.range.start&&(p.offset<r.range.end||p.offset===r.range.end&&p.offset===t.total)).flatMap(p=>p.sites),a=o.length>0?[...r.changeSites??[],...o]:r.changeSites,i=r.spans.map(p=>XI(p,t)),l=i[0],s=r.drawings?.map(p=>{let g=xf(t,p.start);return g?{...p,paragraphId:g.paragraphId,start:p.start-g.base}:p}),d=l?i.filter(p=>p.range.paragraphId===l.range.paragraphId):[],c=l?(s??[]).filter(p=>p.paragraphId===l.range.paragraphId):[],u=l?{paragraphId:l.range.paragraphId,start:Math.min(l.range.start,...c.map(p=>p.start)),end:Math.max(d[d.length-1].range.end,...c.map(p=>p.start+1))}:Gy(r.range,t),f=s,m=r.deletedRanges?.map(p=>({deleted:p,member:xf(t,p.start)})).filter(({member:p})=>p?.paragraphId===u.paragraphId).map(({deleted:p,member:g})=>({start:p.start-(g?.base??0),end:p.end-(g?.base??0)}));return {...r,range:u,spans:i,...f?{drawings:f}:{},...m?{deletedRanges:m}:{},...a?{changeSites:a}:{}}})}function $y(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)&&jh(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 Ky(e){let t="children"in e?Yr(e):null;return t?new Set(qa(t).members.map(n=>n.base)):void 0}var Za=YI();function Ot(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 Fd(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 Yy=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/u;function UI(e,t,n){let r=Za.getEmbeddingLevels(t,n?"rtl":"ltr");if(Yy.test(t))return r;let o=0;for(let a=0;a<e.length;){let i=Fd(e[a].props),l=a,s=0;for(;l<e.length&&Fd(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 Uy(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=>Fd(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=UI(e,r,t),a=!Yy.test(r),i=[],l=0;for(let s of $y(e,n)){let d;try{d=Uh(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:Fd(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 Xy(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 Sf(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 Sf(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 Xy(e,n,c.start,c.end,c.rtl))r.push(u);}else for(let l of Xy(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 Od(e,t){return e.length?e.reduce((n,r)=>Math.min(n,r.box.x),1/0):t}function Pf(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 qy(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,tt(a,We(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 qI=new WeakMap;function Zy(e,t){qI.set(e,t);}function ZI(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 JI(e){return e.map(ZI).join("\0;")}var QI=1<<18,eT=new TextEncoder;function Cd(e){return a$1(eT.encode(e))}var tT=2048,Jy=2*1024*1024,Ko=new Map,Rf=0,nT;function fl(e){if(e.length===0)return nT??=Cd(e);let t=Ko.get(e);if(t)return Ko.delete(e),Ko.set(e,t),t.digest;let n=Cd(e),r=e.length*2;if(r<=Jy)for(Ko.set(e,{digest:n,bytes:r}),Rf+=r;Ko.size>tT||Rf>Jy;){let o=Ko.entries().next();if(o.done)break;Ko.delete(o.value[0]),Rf-=o.value[1].bytes;}return n}function pl(e,t){return `${e}|${t?"drawing":""}`}function ne(e){let t="";for(let n of e)t+=`${n.length}:${n}`;return t}var Qy=new WeakMap;function tb(e,t){if(!t||t.size===0)return "";let n=Qy.get(e),r=n?.get(t);if(r!==void 0)return r;let o=Xo(e,a=>t.get(a.id)?.cacheToken??"");return o.length<=QI&&(n||(n=new WeakMap,Qy.set(e,n)),n.set(t,o)),o}function Xo(e,t){let n=[],r=false,o=[e];for(;o.length>0;){let a=o.pop();if(a.kind==="paragraph"){let i=t(a);i&&(r=true),n.push(i);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}return r?ne(n):""}function wf(e){return e?{nodeDigests:new WeakMap,paragraphKeys:new WeakMap}:{nodeDigests:new Map,paragraphKeys:new Map}}var nb=wf(true);function rb(e,t){if(e.kind==="textValue")return Cd(kf(e));let n=t.nodeDigests.get(e);if(n!==void 0)return n;let r=Cd(kf(e,t));return t.nodeDigests.set(e,r),r}function kf(e,t=nb){if(e.kind==="textValue")return ne(["text",e.value]);let n=[];for(let o of e.attributes)n.push(ne([o.namespaceUri??"",o.localName,o.value]));n.sort();let r=[];for(let o of e.children)r.push(o.kind==="textValue"?kf(o):ne(["child-digest",rb(o,t)]));return ne(["element",e.kind,e.localName,e.id,ne(n),ne(r)])}var rT=8;function Md(e){return ob(e,nb)}function ob(e,t){let n=Math.round(e.width*1e3),r=e.drawingToken??"",o=e.projectionToken??"",a=e.exclusionToken??"",i=fl(JI(e.properties)),l=rb(e.paragraph,t),s=fl(e.producer),d=fl(r),c=fl(o),u=fl(a),f=t.paragraphKeys.get(e.paragraph),m=f?.entries.findIndex(y=>y.producerIdentity===s&&y.width===n&&y.drawingIdentity===d&&y.projectionIdentity===c&&y.exclusionIdentity===u&&y.propertiesToken===i);if(f&&m!==void 0&&m>=0){let[y]=f.entries.splice(m,1);return f.entries.push(y),y.key}let p=`plk:${l}:${s}:${n}:${d}:${c}:${u}:${i}`;f||(f={entries:[]},t.paragraphKeys.set(e.paragraph,f));let g=f.entries.find(y=>y.propertiesToken===i)?.propertiesToken??i;return f.entries.push({producerIdentity:s,width:n,drawingIdentity:d,projectionIdentity:c,exclusionIdentity:u,propertiesToken:g,key:p}),f.entries.length>rT&&f.entries.shift(),p}var ab=new WeakMap;function Bd(e,t){ab.set(e,t);}function ib(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=ab.get(a);if(i)for(let l of i)o.add(l);}t||e.retain(o);}var oT=8,aT=8;function vD(e={}){let t=Math.max(1,e.maxEntries??4096),n=e.retainAcrossPasses??true,r=t*8,o=new Map,a=wf(n),i=0,l=0,s=0,d=0,c=0,u=0,f=0,m=0,p=0,g=0,y={retainAcrossPasses:n,keyFor(x){return ob(x,a)},get(x){let b=o.get(x);if(b===void 0){d+=1;return}return s+=1,o.delete(x),b.generation=i,o.set(x,b),b.value},set(x,b){for(o.has(x)&&o.delete(x),o.set(x,{value:b,generation:i});o.size>t;){let h=o.entries().next();if(h.done||h.value[1].generation>=i&&o.size<=r)break;o.size>r?f+=1:u+=1,o.delete(h.value[0]),c+=1;}},release(x){!n&&o.delete(x)&&(p+=1);},retentionPassDue(){return l+=1,l%oT===0},retain(x){i+=1;for(let b of x){let h=o.get(b);h&&(h.generation=i);}for(let[b,h]of o)i-h.generation>aT&&(o.delete(b),c+=1,m+=1);},clear(){g+=o.size,o.clear(),a=wf(n);},get stats(){return {hits:s,misses:d,evictions:c,size:o.size}}};return Zy(y,{snapshot(){let x=0;for(let b of o.keys())x+=b.length*2;return {hits:s,misses:d,evictions:c,size:o.size,softLimit:t,hardLimit:r,keyTextBytes:x,softLimitEvictions:u,hardLimitEvictions:f,staleEvictions:m,releasedEntries:p,clearedEntries:g}},visit(x){for(let b of o.values())x(b.value);}}),y}var lb=512,iT=9,Mn=31680/20,lT=8,sT=128;function ml(e,t){return e.kind!=="textValue"&&e.namespaceUri===da$1&&e.localName===t}function ft(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function tn(e,t){for(let n of e.children)if(ml(n,t))return n}function Kn(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function dT(e){let t=e/20;return !Number.isFinite(t)||t<=0?0:t>Mn?Mn:t}function Ld(e){let t=e/20;return Number.isFinite(t)?t>Mn?Mn:t<-Mn?-Mn:t:0}function cT(e){let t={left:0,right:0,hanging:0,firstLine:0};if(!e)return t;let n=tn(e,"ind");if(!n)return t;let r={};for(let s of ["left","right","start","end"]){let d=Kn(ft(n,s),true);d!==null&&(r[s]=Ld(d));}let o=Kn(ft(n,"left")??ft(n,"start"),true),a=Kn(ft(n,"right")??ft(n,"end"),true),i=Kn(ft(n,"hanging")),l=Kn(ft(n,"firstLine"),true);return {...r.start!==void 0||r.end!==void 0?{authored:r}:{},left:o===null?0:Ld(o),right:a===null?0:Ld(a),hanging:i===null?0:dT(i),firstLine:l===null?0:Ld(l),stated:{left:o!==null,right:a!==null,firstLineOffset:i!==null||l!==null}}}function uT(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function fT(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function pT(e,t){let n=tn(e,t);if(!n)return false;let r=ft(n,"val");return r!=="0"&&r!=="false"&&r!=="off"}function sb(e,t){let n=tn(e,t);if(!n)return;let r=ft(n,"val");if(!(r===void 0||r.length===0||r.length>sT))return r}function mT(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 db(e){let t=Kn(ft(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=tn(e,"start"),r=1;if(n){let x=Kn(ft(n,"val"));x!==null&&x>=0&&(r=Math.min(x,9999));}let o=tn(e,"numFmt"),a=(o?ft(o,"val"):void 0)??"decimal",i=tn(e,"lvlText"),l=i?ft(i,"val")??"":"",s=tn(e,"lvlJc"),d=fT(s?ft(s,"val"):void 0),c=tn(e,"suff"),u=uT(c?ft(c,"val"):void 0),f=tn(e,"lvlRestart"),m;if(f){let x=Kn(ft(f,"val"));x!==null&&x>=0&&x<=9&&(m=x);}let p=tn(e,"pPr"),g=tn(e,"rPr"),y=g?Ya(g):[];return vd({ilvl:t,start:r,numFmt:a.length>64?"decimal":a,lvlText:l.length>64?l.slice(0,64):l,lvlJc:d,suff:u,indent:cT(p),...m!==void 0?{lvlRestart:m}:{},isLgl:pT(e,"isLgl"),runProperties:y,vanish:mT(y,"vanish")},p)}function gT(e){let t=ft(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(!ml(a,"lvl"))continue;if(n.size>=9)break;let i=db(a);i&&!n.has(i.ilvl)&&n.set(i.ilvl,i);}let r=sb(e,"numStyleLink"),o=sb(e,"styleLink");return {abstractNumId:t,levels:n,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function hT(e){let t=Kn(ft(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=tn(e,"startOverride"),r;if(n){let i=Kn(ft(n,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=tn(e,"lvl"),a=o?db(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 yT(e){let t=ft(e,"numId");if(t===void 0||t.length===0||t.length>64)return null;let n=tn(e,"abstractNumId"),r=n?ft(n,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!ml(a,"lvlOverride"))continue;if(o.size>=iT)break;let i=hT(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:t,abstractNumId:r,overrides:o}}function cb(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(ml(a,"abstractNum")){if(r>=lb)continue;r+=1;let i=gT(a);i&&!t.has(i.abstractNumId)&&t.set(i.abstractNumId,i);continue}if(ml(a,"num")){if(o>=lb)continue;o+=1;let i=yT(a);i&&!n.has(i.numId)&&n.set(i.numId,i);}}return {abstractNums:t,nums:n}}function bT(e,t,n){let r=new Set([t.abstractNumId]),o=t;for(let a=0;a<lT;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 ub(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=bT(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 Ja(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 fb=Object.freeze({abstractNums:new Map,nums:new Map});function xT(e,t){let n=e.nums.get(t),r=[];for(let o=0;o<=8;o+=1){let a=Ja(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 ST(e,t,n){let r=[];for(let o=0;o<=8;o+=1){let a=Ja(e,t,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...n]}}function pb(e,t){return t?e.map(n=>n==="bullet"||n==="none"?n:"decimal"):e}function PT(e,t){if(t===0)return null;if(t===void 0)return e-1;let n=t-1;return n>=e?null:n}function mb(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=xT(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=Ja(e,a,i);if(!l)return null;let{abstractNumId:s,level:d}=l,{counters:c,initialized:u,starts:f}=o(a),{formats:m}=ST(e,a,f);for(let R=i+1;R<=8;R+=1){let P=Ja(e,a,R);if(!P)continue;let O=PT(R,P.level.lvlRestart);O!==null&&i<=O&&(u[R]=false);}let p=f[i]??d.start;u[i]?c[i]+=1:(c[i]=p,u[i]=true);let g=c.slice(),y=u.slice(),x=g.map((R,P)=>y[P]?R:f[P]??1),b=pb(m,d.isLgl),h=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:pf(d.lvlText,x,b),v={abstractNumId:s,numId:a,ilvl:i,level:d,counters:g,markerText:h};return gb.set(v,x),v}}}var gb=new WeakMap;function hb(e){return gb.get(e)??e.counters}var RT=/[\p{L}\s]/u;function wT(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}RT.test(r)||(t+=r);}return t}function yb(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 m=0;m<=8;m+=1){let p=Ja(r,o,m);l.push(m<=a?p?.level??null:null),s.push(p?.level.numFmt??"decimal");}let d=m=>m!==null&&m.numFmt!=="bullet"&&m.numFmt!=="none"&&m.lvlText.length>0;if(!d(l[a]??null))return null;let c=[],u=[];for(let m=a;m>=0&&!(t&&m!==a);m-=1){let p=l[m];d(p)&&(m!==a&&u.some(g=>g.includes(`%${m+1}`))||(c.push(m),u.push(p.lvlText)));}c.reverse();let f="";for(let m of c){let p=l[m],g=n?wT(p.lvlText):p.lvlText;f+=pf(g,i,pb(s,p.isLgl));}return f.length>0?f:null}var vf=Object.freeze({kinsoku:true,overflowPunctuation:true,characterWrap:false}),Ed=e=>!["0","false","off"].includes(e??"");function bb(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=Ed(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 Nd(e,t){let{kinsoku:n,overflowPunctuation:r,characterWrap:o}=vf;for(let a of e)a.localName==="kinsoku"&&(n=Ed(a.attributes?.val)),a.localName==="overflowPunct"&&(r=Ed(a.attributes?.val)),a.localName==="wordWrap"&&(o=!Ed(a.attributes?.val));return {settings:t,kinsoku:n,overflowPunctuation:r,characterWrap:o}}function gl(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 kT="!%),.:;?]}\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",vT="$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFF62\uFFE1\uFFE5",IT="!%),.:;>?]}\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",TT="$([{\xA3\xA5\xB7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFE5D\uFF04\uFF08\uFF0E\uFF3B\uFF5B\uFFE1\uFFE5",FT="! ),.:;?]}\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(" ",""),OT="([{\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",CT="!%),.:;?]}\xA2\xB0\u2019\u201D\u2032\u2033\u2103\u3009\u300B\u300D\u300F\u3011\u3015\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFFE0",MT="$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFFE1\uFFE5\uFFE6",BT="\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 xb(e,t){let n=e.split("-")[0],r=/^zh-(tw|hk|mo|hant)(-|$)/.test(e),o=n==="zh"?r?FT:IT:n==="ko"?CT:kT,a=n==="zh"?r?OT:TT:n==="ko"?MT:vT;return n==="ja"&&t?.strict&&(o+=BT),o=t?.before[e]??o,a=t?.after[e]??a,{before:o,after:a}}function Yo(e){return e>=11904&&e<=12591||e>=12736&&e<=40959||e>=63744&&e<=64255||e>=65072&&e<=65103||e>=65281&&e<=65439||e>=131072&&e<=205743}var Rb=e=>new Set([...e].map(t=>t.codePointAt(0))),hl=Rb("\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"),yl=Rb("\u300C\u300E\uFF08\u3010\u3008\u300A\u3014\u3016\u3018\u301A\uFF5B\uFF3B\uFF1C\uFF62\uFF04\uFFE5");function wb(e,t){return !(!Yo(e)||!Yo(t)||yl.has(e)||hl.has(t))}function Bn(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 Dd=new Set(["-","\u2010","\u2013","\u2014"]),Sb=11904;function LT(e){let t=null;return n=>{if(t===null){t=new Set;for(let r of Ze(e))t.add(r.utf16From);t.add(e.length);}return t.has(n)}}function ET(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 Uo(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===" "||Dd.has(a)&&o>0&&e[o-1]!==" "&&o+1<e.length&&e[o+1]!==" "&&!Dd.has(e[o+1]))&&n.push(o+1);}let r=n;if(t){let o=[],a=LT(e);for(let i=0;i<e.length;){let l=e.codePointAt(i),s=i+(l>65535?2:1);if(s>=e.length)break;wb(l,e.codePointAt(s))&&a(s)&&o.push(s),i=s;}o.length>0&&(r=ET(n,o));}return r[r.length-1]!==e.length&&r.push(e.length),r}function _d(e,t){return !(t!==void 0&&hl.has(t)||e!==void 0&&yl.has(e))}function kb(e,t){return t<=0||t>=e.length?true:_d(Bn(e.slice(0,t)),e.codePointAt(t))}var Ad=new Map,Pb=-1;function NT(e,t){let n=rd();(Pb!==n||Ad.size>=2048)&&(Ad.clear(),Pb=n);let r=e*1114112+t,o=Ad.get(r);if(o!==void 0)return o;let a=0;for(let l of Ze(String.fromCodePoint(e,t)))a+=1;let i=a>1;return Ad.set(r,i),i}function jd(e,t,n){let r=n||e===""||/[\s ]$/.test(e)||/^[\s ]/.test(t)||Dd.has(e[e.length-1])&&!Dd.has(t[0]),o=e.length===0?0:e.charCodeAt(e.length-1);if(o<Sb&&t.charCodeAt(0)<Sb)return r?"opens":"continues";if(o===9)return "opens";let a=Bn(e),i=t.codePointAt(0);return a!==void 0&&!NT(a,i)||!_d(a,i)?"forbidden":r||a!==void 0&&wb(a,i)?"opens":"continues"}function Ur(e){return e>=4352&&e<=4607||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=44032&&e<=55295}var at=e=>Yo(e)||Ur(e),Tf=e=>/[\u1100-\u11ff\u2e80-\u318f\u31c0-\u9fff\ua960-\ua97f\uac00-\ud7ff\uf900-\ufaff\ufe30-\ufe4f\uff01-\uff9f\u{20000}-\u{323af}]/u.test(e),vb=e=>e>=65296&&e<=65305||e>=65313&&e<=65338||e>=65345&&e<=65370,If=e=>!e.projected&&!e.positionalTab&&!e.inlineDrawing&&!e.equation&&e.end-e.start===e.text.length;function Hd(e,t){if(!t.characterWrap&&!e.some(R=>/[\u1100-\u11ff\u2e80-\ud7ff\uf900-\uffef\u{20000}-\u{323af}]/u.test(R.text)||gl(R.props)))return null;let n=new Map,r=[],o=0;for(let R of e){n.set(R,o);let P=If(R)?R.text:"\uFFFC".repeat(Math.min(R.text.length,1));r.push(P),o+=P.length;}let a=r.join(""),i=Ze(a),l=new Map([[0,"opens"],[a.length,"opens"]]),s=new Set(Uo(a,false)),d=new Set,c=/[$¥£₩+-$£¥+\-]?[0-90-9]+(?:[.,:/.,:/][0-90-9]+)*(?:[%%‰])?|[A-Za-z]+/gu;for(let R of a.matchAll(c))if(/[0-9A-Za-z]/u.test(R[0]))for(let P=R.index+1;P<R.index+R[0].length;P++)d.add(P);let u=0,f=0,m=i.some(R=>Ur(R.text.codePointAt(0))),p=m?"ko-kr":/[\u3040-\u30ff\uff66-\uff9f]/u.test(a)?"ja-jp":"zh-cn",g=[],y=false;for(let R of i)/^[\p{P}\p{S}\p{M}]+$/u.test(R.text)||(y=at(R.text.codePointAt(0))),g.push(y||at(R.text.codePointAt(0)));let x=e.map(R=>gl(R.props)),b=new Map,h=R=>{let P=b.get(R);return P||(P=xb(R,t.settings),b.set(R,P)),P};for(let R=1;R<i.length;R++){let P=i[R-1],O=i[R],k=O.utf16From;for(;u+1<e.length&&n.get(e[u+1])<=k;)u++;for(;f+1<e.length&&n.get(e[f+1])<=P.utf16From;)f++;let I=Bn(P.text),T=P.text.codePointAt(0),S=O.text.codePointAt(0);if(/[\t\n\f\ufffc]/u.test(P.text+O.text)){l.set(k,"opens");continue}if(/[\u00a0\u202f\u2060\ufeff]/u.test(P.text+O.text)){l.set(k,"forbidden");continue}let F=false;if(t.kinsoku){let D=x[u]??(t.settings&&(at(S)||g[R-1]&&/^[\p{P}\p{S}]+$/u.test(O.text))?p:void 0),B=x[f]??(t.settings&&(at(T)||at(S)&&/^[\p{P}\p{S}]+$/u.test(P.text))?p:void 0);if(D||B)F=(D?h(D).before.includes(String.fromCodePoint(S)):hl.has(S))||(B?h(B).after.includes(String.fromCodePoint(I)):yl.has(I));else if(F=hl.has(S)||yl.has(I),g[R-1]||at(S)){let j=Ur(I)||Ur(S)?"ko-kr":"ja-jp",V=h(j);F||=g[R-1]&&V.before.includes(String.fromCodePoint(S))||at(S)&&V.after.includes(String.fromCodePoint(I));}}if(F){l.set(k,"forbidden");continue}if(d.has(k)){l.set(k,"continues");continue}let C=at(T)&&!vb(T)||at(S)&&!vb(S)||g[R-1]&&/^[\p{P}\p{S}]+$/u.test(P.text),E=t.characterWrap&&(!m||Ur(T)&&Ur(S)),H=Ur(T)&&Ur(S)&&!E,A=s.has(k)||/\s$/u.test(P.text)||/^\s/u.test(O.text)||C&&!H||E;l.set(k,A?"opens":"continues");}let v=new Map;for(let R of e){let P=n.get(R);if(!If(R)){v.set(R,Uo(R.text,false));continue}let O=[];for(let k=1;k<R.text.length;k++){let I=l.get(P+k);(I==="opens"||d.has(P+k)&&I==="continues")&&O.push(k);}O.push(R.text.length),v.set(R,O);}return {boundaries:R=>v.get(R),decision:(R,P)=>If(R)?l.get(n.get(R)+P)??"forbidden":"opens",cutAllowed:(R,P,O)=>l.get(n.get(R)+P+O)!=="forbidden"&&l.has(n.get(R)+P+O)}}function Ib(e,t,n){if(!e.some(d=>Tf(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||!Tf(d.text)){r.push(d);continue}let c=Ze(d.text),u=[],f=0;for(let x=1;x<c.length;x++)(at(Bn(c[x-1].text))||at(c[x].text.codePointAt(0)))&&(u.push({from:f,to:c[x].utf16From}),f=c[x].utf16From);if(u.push({from:f,to:d.text.length}),u.length===1){r.push(d);continue}let m=We(d.style,d.fontSlot),p=u.map(x=>tt(d.text.slice(x.from,x.to),m,t)),g=p.reduce((x,b)=>x+b,0),y=d.box.x;for(let x=0;x<u.length;x++){let b=u[x],h=g>0?p[x]*d.box.width/g:0,{caretEdges:v,...R}=d;r.push({...R,text:d.text.slice(b.from,b.to),range:{...d.range,start:d.range.start+b.from,end:d.range.start+b.to},box:{...d.box,x:y,width:h}}),y+=h;}}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=Hd(a,vf);for(let d=1;d<r.length;d++){let c=r[d-1],u=r[d],f=Bn(c.text),m=u.text.codePointAt(0);f===void 0||m===void 0||u.lineEndWhitespace||u.text===`
6
+ `||(c.text.endsWith(" ")||(at(f)||at(m))&&i?.decision(a[d],0)==="opens"&&_d(f,m)&&!/[\u00a0\u202f\u2060\ufeff]/u.test(c.text.slice(-1)+u.text[0]))&&o.add(d);}if(o.size===0)return e;let 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 Tb=.001;function Ff(e){let t=Ot(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 AT(e){return e.endsWith(" ")}function DT(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===Ud$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)<=Tb;if(s<l&&u&&(o==="center"||o==="right")){let x=r-c;if(x<=0)return e;let b=o==="center"?x/2:x,h=(i??0)>=r-Tb,v=e[s].box.x+b;return e.map((R,P)=>{if(P<s)return {...R,box:{...R.box,x:R.box.x+b}};if(!h)return {...R,box:{...R.box,x:R.box.x+b}};let O=Math.min(R.box.width,Math.max(0,n+r-v)),k={...R,box:{...R.box,x:v,width:O}};return v+=O,k})}let f=e[e.length-1],p=i??c??(()=>{let x=f.text.replace(/\s+$/,""),b=x===f.text?0:f.box.width-tt(x,We(f.style,f.fontSlot),t);return f.box.x-n+f.box.width-b})(),g=r-p;if(g<=0)return e;if(o==="both"){if(a)return e;let x=Ib(e,t,g);if(x)return x;let b=[];for(let P=1;P<s;P+=1)AT(e[P-1].text)&&b.push(P);if(b.length===0)return e;let h=g/b.length,v=new Set(b),R=0;return e.map((P,O)=>(v.has(O)&&(R+=h),R===0?P:{...P,box:{...P.box,x:P.box.x+R}}))}let y=o==="center"?g/2:g;return e.map(x=>({...x,box:{...x.box,x:x.box.x+y}}))}function bl(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 Sf(DT(qy(e,t),t,n,r,s,a,i),l)}var _T=/^[、。〈〉《》「」『』【】〔〕〖〗〘〙〚〛!(),.:;?[]{}]$/u,xl=/^[〈《「『【〔〖〘〚([{]$/u,Of=/^[、。〉》」』】〕〗〙〛),.]}]$/u,jT=/^[\u3041-\u3096\u30a1-\u30fa][\u3099\u309a]?$/u;function Fb(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 Ob(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,tt(a.text,We(i.style,i.fontSlot),n));}return r}var HT=e=>!e.projected&&!e.style.textOutline&&e.style.shaping?.direction!=="rtl"&&!e.style.underline&&!e.style.strike&&!e.style.doubleStrike&&!e.revisions?.length&&!hd(e.props)&&e.measureText===void 0&&!e.positionalTab&&!e.equation&&!e.inlineDrawing&&e.end-e.start===e.text.length;function zT(e,t,n,r){let o=[],a=0,i=e.map(c=>{o.push(a);let u=HT(c)?c.text:"\uFFFC";return a+=u.length,u}).join(""),l=new Map,s=0,d=Ze(i);for(let c=0;c<d.length;c++){let u=d[c],f=d[c-1]?.text,m=d[c+1]?.text;for(;s+1<e.length&&o[s+1]<=u.utf16From;)s++;let p=e[s],g=xl.test(u.text)&&f!==void 0&&xl.test(f),y=m!==void 0&&(Of.test(u.text)&&(xl.test(m)||Of.test(m)||m==="\uFF1A")||u.text==="\uFF1A"&&(xl.test(m)||Of.test(m))&&!r&&!p.style.highlight&&!p.style.shading),x=g||y?.5:t&&jT.test(u.text)?.125:0;if(!x)continue;let b=We(p.style,p.fontSlot),h=tt(u.text,b,n),v=g||y?tt(u.text,{...b,characterSpacingPt:0},n):h,R=v*x;if(u.text==="\uFF1A"&&m!==void 0){let O=s,k=d[c+1].utf16From;for(;O+1<e.length&&o[O+1]<=k;)O++;let I=e[O],T=We(I.style,I.fontSlot);if(xl.test(m)){let S=tt(m,{...T,characterSpacingPt:0},n);R=Math.min(R,Math.max(0,S/2));}else {let S=n.inkBounds?.(u.text,b),F=n.inkBounds?.(m,T),C=tt(m,T,n);if(!S||!F||![S.left,S.right,F.left,F.right].every(Number.isFinite)||S.left<0||F.left<0||S.right<S.left||F.right<F.left||S.right>v||S.right>h/2+C||F.right>C||I.style.highlight||I.style.shading)continue;R=h/2;}}let P=Math.max(0,Math.min(h,R))/u.text.length;for(let O=s;O<e.length&&o[O]<u.utf16To;O++){let k=e[O],I=Math.max(0,u.utf16From-o[O]),T=Math.min(k.text.length,u.utf16To-o[O]);if(I===T)continue;let S=l.get(k);S||(S=[],l.set(k,S)),S.push({from:I,to:T,reduction:P,glyphOffset:g?-P:y?0:void 0});}}return l}function Cb(e,t,n,r=false){let o=t.settings?.compression;if(!o||o==="doNotCompress")return e;let a=[],i=new WeakMap,l=zT(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,m=i.get(s.style);m||(m=new Map,i.set(s.style,m));let p=m.get(f);p||(p={...s.style,characterSpacingPt:f},m.set(f,p)),a.push({...s,text:s.text.slice(u.from,u.to),start:s.start+u.from,end:s.start+u.to,style:p,...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 Qa(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)||!_T.test(a)&&!gl(t.props))return false;let i=Ze(e).at(-1)?.text;if(!i||!/^[\p{Pe}\p{Pf}\p{Po}]$/u.test(i))return false;let l=tt(i,We(t.style,t.fontSlot),o);return r-l<=n+.001&&n>=-1e-3}var Mb=/^[〈《「『【〔〖〘〚([{]$/u,Bb=/^[、。〉》」』】〕〗〙〛),.]}]$/u,Sl=/^[〈《「『【〔〖〘〚([{、。〉》」』】〕〗〙〛),.]}:]$/u,Lb=/[〈《「『【〔〖〘〚([{、。〉》」』】〕〗〙〛),.]}:]/u,qr=.001;function Eb(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"&&!hd(e.props)}function Nb(e){return e.every(t=>Eb(t)&&!t.projected&&!t.fieldAtom&&!t.equation&&!t.positionalTab&&!t.inlineDrawing&&t.measureText===void 0&&t.end-t.start===t.text.length&&Ze(t.text).every(n=>/^[ \n\f]$/u.test(n.text)||at(n.text.codePointAt(0))||Sl.test(n.text)))}function WT(e){return Eb(e)&&!e.projected&&!e.fieldAtom&&!e.equation&&!e.caretEdges&&!e.lineEndWhitespace&&!e.wrapAdvanceBefore&&e.range.end-e.range.start===e.text.length}function VT(e,t,n){let r=[],o=0;for(let[a,i]of e.entries()){if(o+=i.text.length,o>4096||!WT(i))return;let l=We(i.style,i.fontSlot),s=0;for(let d of Ze(i.text)){if(d.text!==" "&&!at(d.text.codePointAt(0))&&!Sl.test(d.text))return;let c=d.utf16To===i.text.length?i.box.width:tt(i.text.slice(0,d.utf16To),l,t),u=c-s,f=i.range.start+d.utf16From,m=0,p=n.length-1;for(;m<p;){let y=m+p+1>>1;n[y].start<=f?m=y:p=y-1;}let g=n[m];r.push({sourceIndex:a,alreadyReduced:Math.max(0,(g.style.characterSpacingPt-i.style.characterSpacingPt)*d.text.length),natural:tt(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 Cf(e){return e.ink!==void 0&&Number.isFinite(e.ink.left)&&Number.isFinite(e.ink.right)&&e.ink.right>=e.ink.left}function GT(e,t,n,r,o){let a=t.reduce((b,h)=>b+h.box.width,0),i=e.width+a-n;if(i<=qr||!r.inkBounds||e.drawings.length||!t.some(b=>Lb.test(b.text))&&!e.spans.some(b=>Lb.test(b.text)))return;for(let b=1;b<e.spans.length;b++){let h=e.spans[b-1];if(Math.abs(h.box.x+h.box.width-e.spans[b].box.x)>qr)return}let l=e.spans.length,s=VT([...e.spans,...t],r,o);if(!s)return;let d=s.find(b=>b.sourceIndex===l);if(at(d.span.text.codePointAt(0))&&!Sl.test(d.span.text)&&n-e.width+qr<d.natural/2)return;let c=s.at(-1);if(Bb.test(c.span.text)&&Cf(c)){let b=Math.max(c.natural/2,c.ink.right+(c.span.glyphOffsetPt??0));c.reduction=Math.min(i,Math.max(0,c.span.box.width-b)),i-=c.reduction;}let u=[];for(let b=1;b<s.length;b++){let h=s[b-1],v=s[b],R=h.span.text,P=v.span.text,O,k;if(Mb.test(P)&&at(R.codePointAt(0))&&!Sl.test(R))O=v,k=true;else if(R==="\uFF1A"&&Mb.test(P)||Bb.test(R)&&at(P.codePointAt(0))&&!Sl.test(P))O=h,k=false;else continue;if(!Cf(h)||!Cf(v))continue;let I=h.span.box.width+(v.span.glyphOffsetPt??0)+v.ink.left-(h.span.glyphOffsetPt??0)-h.ink.right,T=Math.max(0,Math.min(O.natural/2-O.alreadyReduced,O.span.box.width-O.reduction,k?v.ink.left+(v.span.glyphOffsetPt??0):1/0,I));T>qr&&u.push({cell:O,capacity:T,left:k});}if(i>u.reduce((b,h)=>b+h.capacity,0)+qr)return;let f=u;for(;i>qr&&f.length;){let b=i/f.length,h=[];for(let v of f){let R=Math.min(b,v.capacity);v.cell.reduction+=R,v.left&&(v.cell.shift-=R),i-=R,v.capacity-R>qr&&h.push({...v,capacity:v.capacity-R});}f=h;}let m=[],p=[],g=[],y=e.spans[0]?.box.x??t[0].box.x,x=0;for(let b of s){let h=b.span,v=b.reduction>0,R={...h,...v?{style:{...h.style,characterSpacingPt:h.style.characterSpacingPt-b.reduction/h.text.length},glyphOffsetPt:(h.glyphOffsetPt??0)+b.shift}:{},box:{...h.box,x:y,width:h.box.width-b.reduction}};y+=R.box.width,b.sourceIndex<l?(g[b.sourceIndex]??=m.length,m.push(R)):(p.push(R),x+=R.box.width);}g[l]=m.length,e.spans.length=0;for(let b of m)e.spans.push(b);return e.width=n-x,{candidate:p,width:x,spanStarts:g}}function Ab(e,t,n,r){let o=new Map;return (a,i,l,s,d,c,u,f)=>{let m=o.get(s.start);if(m)return o.delete(s.start),m;if(!f||!n.inkBounds||!t)return;let p=[],g=i,y=l,x=s,b=d,h=c,v=0;for(;;){let T=e[g];if(T.projected||T.measureText!==void 0||T.equation||T.positionalTab||T.inlineDrawing||T.revisions?.length||(v+=y.length,v>4096||p.length>=256))return;if(p.push({text:y,range:x,props:T.props,style:T.style,fontSlot:T.fontSlot,glyphOffsetPt:T.glyphOffsetPt,fieldAtom:T.fieldAtom,box:{x:h,y:0,width:b,height:n.lineMetrics(We(T.style,T.fontSlot)).height}}),h+=b,x.end<T.end)break;let S=e[g+1];if(!S||t.decision(S,0)==="opens")break;g++;let F=t.boundaries(S)[0]??S.text.length;y=S.text.slice(0,F),x={...s,start:S.start,end:S.start+F},b=tt(y,We(S.style,S.fontSlot),n);}let R=0,P=false;for(let T=p.length-1;T>=0;T--){let S=p[T],F=S.text.replace(/ +$/u,"");if(R+=tt(S.text.slice(F.length),We(S.style,S.fontSlot),n),F.length){P=true;break}}if(R>0&&P&&h-c-R<=u-a.width+qr||r&&Qa(p.map(T=>T.text).join(""),e[g],u-a.width,h-c,n))return;let O=GT(a,p,u,n,e);if(!O)return;let k,I=0;for(let T of p){let S=[],F=0;for(;I<O.candidate.length&&O.candidate[I].range.start<T.range.end;){let E=O.candidate[I++];S.push(E),F+=E.box.width;}let C={candidate:S,width:F};k?o.set(T.range.start,C):k={...C,spanStarts:O.spanStarts};}return k}}function Db(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 p1=64,m1=31680,g1=720,h1=36,_b=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),Pl=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),$T=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),KT=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function Rl(e){return e.kind!=="textValue"}function zd(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Mf(e,t){for(let n of e.children)if(Rl(n)&&n.localName===t)return n}function jb(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function XT(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function Hb(e,t){if(!t)return;let n=0;for(let r of t.children){if(n>=128)break;if(n+=1,!Rl(r)||r.localName!=="tab")continue;let o=XT(jb(zd(r,"pos"))??NaN);if(o===null)continue;let a=zd(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=$T.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let l=zd(r,"leader");e.set(o,{alignment:i,...l!==void 0&&KT.has(l)?{leader:l}:{}});}}function zb(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,...YT(i)});}return {stops:Object.freeze(r),defaultIntervalPt:t}}function YT(e){return e.leader?{leader:e.leader}:{}}function Wb(e){let t=new Map;for(let n of e)!n||!Rl(n)||Hb(t,Mf(n,"tabs"));return zb(t)}function y1(e){if(!e||!Rl(e))return Pl;let t=new Map;return Hb(t,Mf(e,"tabs")),zb(t)}function Vb(e,t){return t===void 0||!Number.isFinite(t)||t<=0||t===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:t}}function Gb(e){if(!e||!Rl(e))return 36;let t=Mf(e,"defaultTabStop");if(!t)return 36;let n=jb(zd(t,"val"));return n===null||n<=0||n>31680?36:n/20}function ei(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 $b(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 Wd(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 UT=1,Bf=1;function wl(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 qT=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function ZT(e){return qT.has(e)}function Vd(e,t){return ZT(e)?wl(t).extentPt:t}var JT=new Set(["single","thick","double","dotted","dashed","dotDash","dotDotDash","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","wave","doubleWave","dashSmallGap","dashDotStroked","threeDEmboss","threeDEngrave","outset","inset"]);function Kb(e){return JT.has(e)}function Yb(e){if(!("children"in e))return false;let t=e.children.find(n=>n.kind==="paragraphProperties");return t!==void 0&&"children"in t&&t.children.some(n=>n.kind==="runProperties"&&n.children.length>0)}function Ub(e){let t=false;for(let n of e){if(n.localName!=="pageBreakBefore")continue;let r=n.attributes?.val;t=r===void 0||Gd(r);}return t}var Lf=31680/20,$d=12,QT=3168,eF=14,vl=Object.freeze({rule:"auto",value:240}),tF=132,nF=1584,rF=["top","left","bottom","right","between","bar"],oF=Object.freeze({}),aF=/^[0-9A-Fa-f]{6}$/,iF=new Set(["nil","none"]);function ti(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function Il(e,t){return !Number.isFinite(e)||e<=0?0:e>t?t:e}function Xb(e){let t=ti(e,true);return t===null?0:Il(cf$1(af$1(t)),Lf)}function Gd(e){return e!=="0"&&e!=="false"&&e!=="off"}function lF(e){return e===void 0||e==="auto"?null:aF.test(e)?e.toUpperCase():null}function kl(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Xn(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function R1(e,t){let n=null;for(let r of e)r.localName===t&&(n={...n??{},...r.attributes??{}});return n}function Tl(e,t){let n=0,r=0,o=null,a=null,i=false,l=false;for(let s of e){if(s.localName!=="spacing")continue;let d=s.attributes?.before,c=s.attributes?.after;d!==void 0&&(n=Xb(d)),c!==void 0&&(r=Xb(c)),s.attributes?.beforeLines!==void 0&&(o=ti(s.attributes.beforeLines,true)),s.attributes?.afterLines!==void 0&&(a=ti(s.attributes.afterLines,true));let u=s.attributes?.beforeAutospacing,f=s.attributes?.afterAutospacing;u!==void 0&&(i=Gd(u)),f!==void 0&&(l=Gd(f));}if(o!==null&&(n=Il(o*(t?.lineUnitPt??12)/100,Lf)),a!==null&&(r=Il(a*(t?.lineUnitPt??12)/100,Lf)),i||l){let s=t?.inList||t?.inTableCell?0:eF;i&&(n=s),l&&(r=s);}return {before:n,after:r}}function qb(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=ti(l,true);s!==null&&(n=s);}}if(n===void 0)return vl;let r=t??"auto";if(r==="auto"){let a=n/240;return a>0?{rule:"auto",value:Math.min(a,tF)*240}:vl}let o=n/20;return o>0?{rule:r,value:Math.min(o,nF)}:vl}function Kd(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 Zb(e){let t=false;for(let n of e){if(n.localName!=="contextualSpacing")continue;let r=n.attributes?.val;t=r===void 0||Gd(r);}return t}function Zr(e){if(!e)return;let t=kl(e,"val");if(!t||iF.has(t))return;let n=ti(kl(e,"sz")),r=n===null?.5:Il(n/8,$d)||.5,o=ti(kl(e,"space")),a=o===null?0:Il(o,QT),i=kl(e,"shadow"),l=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:t,color:lF(kl(e,"color")),widthPt:r,spacePt:a,...l?{shadow:true}:{}}}function Jb(e){let t=Zr(Xn(e,"top")),n=Zr(Xn(e,"left")??Xn(e,"start")),r=Zr(Xn(e,"bottom")),o=Zr(Xn(e,"right")??Xn(e,"end")),a=Zr(Xn(e,"between")),i=Zr(Xn(e,"bar"));return {...t?{top:t}:{},...n?{left:n}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function Xd(e){if(!e||e.kind==="textValue")return {};let t=Xn(e,"pBdr");return t?Jb(t):{}}function Qb(e){let t=oF;for(let n of e){if(!n||n.kind==="textValue")continue;let r=Xn(n,"pBdr");r&&(t=Jb(r));}return t}function cn(e){return Vd(e.val,e.widthPt)}function qo(e){return e?e.spacePt+cn(e):0}function w1(e){return qo(e)}function ex(e){let t=[];for(let n of rF){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 ni(e,t){return Math.max(e,t)-t}function tx(e,t,n,r){return n&&!r?0:ni(e,t)}function Zo(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 nx=21600;function it(e){return Number.isFinite(e)?e:0}function Fl(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 Ud(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 Fl(n)}function Ef(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 Fl(r)}function sF(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 ox(e,t){return ri(e,t)}function Nf(e,t,n){return ox(ri(e,t),n)}function dF(e,t){let n=[],r=Math.min(e.length,Et);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 cF(e,t){let n=[],r=Math.min(e.length,Et);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 Fl(n)}function rx(e,t,n){let r=uF(dF(e,t),n),o=cF(e,t);return Fl([...r,...o])}function uF(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 fF(e,t){return Object.freeze({top:it(e.top)+it(t.top),right:it(e.right)+it(t.right),bottom:it(e.bottom)+it(t.bottom),left:it(e.left)+it(t.left)})}function pF(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,m=((n.x-e.x)*d-(n.y-e.y)*s)/c;if(f<-1e-9||f>1+1e-9||m<-1e-9||m>1+1e-9)return null;let p=e.y+f*l;return !Number.isFinite(p)||p<o-1e-6||p>a+1e-6?null:p}function mF(e,t,n,r){let o=[],a=Math.min(e.length,Et),i=Math.min(t.length,Et);if(a<2||i<2)return Object.freeze([]);let l=Et*Et,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 m=t[f],p=t[(f+1)%i],g=pF(c,u,m,p,n,r);g!==null&&o.push(g);}}return Object.freeze(o)}function gF(e,t,n){let r=new Set;r.add(t),r.add(n);for(let o of e){let a=Math.min(o.length,Et);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),m=Math.max(d,c);u>=f&&u<=m&&r.add(u);}}}if(e.length>=2)for(let o of mF(e[0],e[1],t,n))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function hF(e,t,n,r){let o=rx(e,n,r);return t&&t.length>=3&&(o=Ud(o,rx(t,n,"nonzero"))),o}function ax(e,t,n,r,o=null){let a=it(n.top),i=it(n.bottom),l=it(n.left),s=it(n.right),d=t-i,c=t+a,u=gF(o&&o.length>=3?[e,o]:[e],d,c),f=[],m=u.length>=2?u.flatMap((p,g)=>{if(g+1>=u.length)return [];let y=u[g+1];return y<=p+1e-6?[p]:[p,y,(p+y)/2]}):[d];for(let p of m){let g=hF(e,o,p,r);for(let y of g)f.push(Object.freeze({start:y.start-l,end:y.end+s}));}return Fl(f)}function ix(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 yF(e){let t=Math.max(0,it(e.extentWidthPt)),n=Math.max(0,it(e.extentHeightPt)),r=qd(e.transform,t,n),o=Math.min(e.polygonEmu.length,Et);if(o<3)return ix({x:e.anchorX,y:e.anchorY,width:t,height:n});let a=r.width/nx,i=r.height/nx,l=[];for(let s=0;s<o;s+=1){let d=e.polygonEmu[s];l.push(Object.freeze({x:it(d.x)*a,y:it(d.y)*i}));}return Zd({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 bF(e,t){let n=t.effectInsets??Yd,r=t.wrapDistances??Yd,o=it(t.contentLeft),a=it(t.contentRight);if(t.mode==="topAndBottom"){let c=ox(ri(t.contentBounds,n),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Ef([{start:o,end:a}],o,a)}if(t.mode==="square"){let c=Nf(t.contentBounds,n,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):Ef([{start:c.x,end:c.x+c.width}],o,a)}let i=t.polygon&&t.polygon.length>=3?t.polygon:ix(t.contentBounds),l=t.mode==="through"?"evenodd":"nonzero",s=fF(r,n),d=ax(i,e,s,l,t.clipPolygon);return Ef(d,o,a)}function xF(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 SF(e,t,n,r,o){if(n==="bothSides"||t.length===0)return e;let a=xF(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 lx(e,t){let n=bF(e,t),r=sF(n,t.contentLeft,t.contentRight);return SF(r,n,t.textSide,t.contentLeft,t.contentRight)}function PF(e,t,n,r){return n.length<3?false:ax(n,t,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function Af(e,t,n){let r=n.effectInsets??Yd,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 PF(e,t,n.clipPolygon,r);let a=ri(n.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height}function sx(e){let t=Object.freeze({top:it(e.wrapDistancesEmu.top/Yn),right:it(e.wrapDistancesEmu.right/Yn),bottom:it(e.wrapDistancesEmu.bottom/Yn),left:it(e.wrapDistancesEmu.left/Yn)}),n=e.mode==="tight"||e.mode==="through"?yF({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 nn=1e5,Et=m.maxPolygonPoints,Yd=Object.freeze({top:0,right:0,bottom:0,left:0}),RF=32,wF=.1,kF=new Set(["rect","ellipse","roundRect"]);function ve(e){return Number.isFinite(e)?e:0}function Sn(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):t}function dx(e,t){let n=e+t;return Number.isFinite(n)?n:0}function cx(e,t,n){let r=Sn(e,0,n),o=Sn(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 vF(e){let t=cx(Sn(e.left,0,nn),Sn(e.right,0,nn),nn),n=cx(Sn(e.top,0,nn),Sn(e.bottom,0,nn),nn);return Object.freeze({left:t.left,top:n.left,right:t.right,bottom:n.right})}function IF(e){let t=vF({left:e.left*nn,top:e.top*nn,right:e.right*nn,bottom:e.bottom*nn});return Object.freeze({left:t.left/nn,top:t.top/nn,right:t.right/nn,bottom:t.bottom/nn})}function TF(e){let t=n=>{if(!Number.isFinite(n))return 0;let r=n/Yn;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 ri(e,t){let n=ve(t.left),r=ve(t.right),o=ve(t.top),a=ve(t.bottom);return Object.freeze({x:e.x-n,y:e.y-o,width:Math.max(0,dx(e.width,n+r)),height:Math.max(0,dx(e.height,o+a))})}function FF(e,t,n){let r=e*Sn(n.left,0,1),o=t*Sn(n.top,0,1),a=e*(1-Sn(n.right,0,1)),i=t*(1-Sn(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 qd(e,t,n){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?ve(Jr(r)??t):Math.max(0,ve(t)),l=o>0?ve(Jr(o)??n):Math.max(0,ve(n));return Object.freeze({offsetX:ve(Jr(a.x)??0),offsetY:ve(Jr(a.y)??0),width:i,height:l})}function OF(e,t,n,r){let o=FF(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,Et);for(let u=0;u<c;u+=1){let f=e[u],m=a<=0?o.left:o.left+Sn(f.x/l,0,1)*a,p=i<=0?o.top:o.top+Sn(f.y/s,0,1)*i;d.push(Object.freeze({x:ve(m),y:ve(p)}));}return Object.freeze(d)}function ux(e,t,n){let r=e.x-t.x,o=e.y-t.y;n.flipHorizontal&&(r=-r),n.flipVertical&&(o=-o);let a=ve(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:ve(s+t.x),y:ve(d+t.y)})}function fx(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,Et);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 Df(e){let t=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),n=Ol(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let l of n)r.push(ux(Object.freeze({x:l.x+e.offsetX,y:l.y+e.offsetY}),t,e.transform));let o=fx(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,ve(e.layoutWidth))/a,scaleY:Math.max(0,ve(e.layoutHeight))/i,anchorX:ve(e.anchorX),anchorY:ve(e.anchorY)})}function CF(e,t){return Object.freeze({x:ve(t.anchorX+(e.x-t.bboxX)*t.scaleX),y:ve(t.anchorY+(e.y-t.bboxY)*t.scaleY)})}function Zd(e){let t=e.mapping??Df({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=OF(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(n.length>0?n.length:e.points.length,Et),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:ve(s.x+e.offsetX),y:ve(s.y+e.offsetY)});i.push(CF(ux(d,a,e.transform),t));}return Object.freeze(i)}function Ol(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 MF(e,t,n){if(!e||!kF.has(e))return null;if(t<=0||n<=0)return Ol(0,0,Math.max(0,t),Math.max(0,n));if(e==="rect")return Ol(0,0,t,n);if(e==="ellipse"){let l=[],s=t/2,d=n/2,c=t/2,u=n/2,f=Math.min(RF,Et);for(let m=0;m<f;m+=1){let p=m/f*Math.PI*2;l.push(Object.freeze({x:s+c*Math.cos(p),y:d+u*Math.sin(p)}));}return Object.freeze(l)}let r=Math.min(t,n)*wF,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 ai(e){return Object.freeze({x:ve(e.x),y:ve(e.y)})}function BF(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,Et);for(let u=0;u<c;u+=1){let f=ai(i[u]),m=ai(i[(u+1)%c]),p=l(f),g=l(m);if(p&&g?d.push(m):p&&!g?d.push(ai(s(f,m))):!p&&g&&(d.push(ai(s(f,m))),d.push(m)),d.length>=Et)break}return Object.freeze(d.slice(0,Et))},a=e.slice(0,Et).map(ai);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:ve(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:ve(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:ve(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:ve(i.x+d*(l.x-i.x)),y:r})})],Object.freeze(a)}function LF(e){let t=fx(e);return Object.freeze({x:t.x,y:t.y,width:t.width,height:t.height})}function Jd(e,t){let n=EF(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=BF(a,t);return i.length>=3?Object.freeze(i.map(ai)):Object.freeze([])};return Object.freeze({...e,paintBounds:n,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function EF(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 NF(e){let t=Math.max(0,ve(e.extentWidth)),n=Math.max(0,ve(e.extentHeight)),r=ve(e.anchorX),o=ve(e.anchorY),a=IF(e.crop),i=TF(e.effectExtentEmu),l=qd(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=Df(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=Zd({points:Ol(0,0,l.width,l.height),...d,crop:u,mapping:c}),m=MF(e.presetGeometry,l.width,l.height),p="none",g=m;g||(p=e.presetGeometry?"unsupported-preset":"none",g=Ol(0,0,l.width,l.height));let y=Zd({points:g,...d,crop:u,mapping:c}),x=LF(y.length>=3?y:f),b=ri(x,i);return Object.freeze({contentBounds:s,paintBounds:b,hitBounds:b,transformedCorners:f,clipPolygon:y.length>=3?y:f,clipFallback:p,effectInsets:i})}function ii(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 NF({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 AF(e){let{transform:t,contentWidth:n,contentHeight:r}=e;if(n<=0||r<=0)return null;let o=qd(t,n,r),a=o.width,i=o.height,l=Df({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:t,layoutWidth:n,layoutHeight:r,anchorX:0,anchorY:0}),s=ve(t.rotationDegrees),d=Math.abs(s%360)>1e-4,c=t.flipHorizontal?-1:1,u=t.flipVertical?-1:1,f=l.scaleX,m=l.scaleY,p=a>0?a/n:1,g=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(m-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(g-1)<1e-4)return null;let x=s*Math.PI/180,b=Math.cos(x),h=Math.sin(x),v=o.offsetX+a/2,R=o.offsetY+i/2,P=f*b*c,O=-f*h*u,k=m*h*c,I=m*b*u,T=f*(v-b*c*(a/2)+h*u*(i/2)-l.bboxX),S=m*(R-h*c*(a/2)-b*u*(i/2)-l.bboxY);return Object.freeze({a:ve(P*p),b:ve(k*p),c:ve(O*g),d:ve(I*g),e:ve(T),f:ve(S)})}function M1(e){let t=AF(e);if(t)return `matrix(${oi(t.a)}, ${oi(t.b)}, ${oi(t.c)}, ${oi(t.d)}, ${oi(t.e)}, ${oi(t.f)})`}function oi(e){return Number.isFinite(e)?String(e):"0"}function px(e,t){let n=(r,o)=>{if(!(o>=la$1)){if(r.kind==="run"){for(let a of r.children)t(a);return}if(na$1(r)){for(let a of r.children)n(a,o+1);return}if(Ed$1(r))for(let a of Hd$1(r))n(a,o+1);}};for(let r of e.children)n(r,0);}function Qd(e,t){let n=[],r=(o,a)=>{if(!(a>=la$1)){if(o.kind==="run"){for(let i of o.children)(i.kind==="drawing"||ib$1(i)||Ta(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(Ed$1(o)){n.push(o);for(let i of Hd$1(o))r(i,a+1);n.pop();}}};for(let o of e.children)r(o,0);}var mx=new WeakMap;function DF(e){if(e.kind!=="run")return false;let t=mx.get(e);return t===void 0&&(t=De(kr(e,[])).hidden,mx.set(e,t)),t}function Yt(e,t){if(e.kind!=="paragraph")return [];let n=[];return Qd(e,(r,o,a)=>{let i=xn;for(let l of o){let s=zt(l)?Xt(l):null;s&&(i=en(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(ib$1(r)||Ta(r)){if(Ta(r)&&DF(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 px(e,r=>{if(r.kind!=="drawing"&&!ib$1(r)&&!Ta(r))return;let o=(n??=Ue(e)).spanOf(r);o&&t.set(r.id,o.start);}),t}var _F=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"]]),jF=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),HF=Object.freeze({left:0,top:0,right:0,bottom:0});function yx(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=_F.get(o)??"graphic";break}n===null&&(n="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:t?.crop??HF,transform:t?.transform??jF,placeholderGraphicKind:t||e.legacyGraphic?null:n,vectorShape:e.vectorShape})}var Yn=12700;function Ct(e){return e/Yn}function Jr(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*Yn*72)return null;let t=e/Yn;return Number.isFinite(t)?t:null}function qn(e){let t=Ct(e.inlineDistancesEmu.left),n=Ct(e.inlineDistancesEmu.right),r=Ct(e.inlineDistancesEmu.top),o=Ct(e.inlineDistancesEmu.bottom),a=Ct(e.effectExtentEmu.left),i=Ct(e.effectExtentEmu.right),l=Ct(e.effectExtentEmu.top),s=Ct(e.effectExtentEmu.bottom),d=Ct(e.extentEmu.cx),c=Ct(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 bx(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 ec(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 Zn(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:ec(e.geometry,t,n)})}function _f(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:ec(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 jf(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 tc(e,t){let n=jf(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=ec(e.geometry,o,a);return Object.freeze({...e,paintBounds:n,hitBounds:r,geometry:Jd(i,t)})}var gx=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),hx=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function Un(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function xx(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 Sx(e,t){if(xx(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 Un(t)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return Un(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 Un(t)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return Un(t)?{left:r,right:r,center:r}:{left:n,right:n,center:n};default:return null}}function Px(e,t){if(xx(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 Un(t)?{top:u,bottom:u+f,center:u+f/2}:{top:u+f,bottom:u+f,center:u+f};case "outsideMargin":return Un(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 Un(t)?{top:i,bottom:i,center:i}:{top:l,bottom:l,center:l};case "outsideMargin":return Un(t)?{top:a,bottom:a,center:a}:{top:n,bottom:n,center:n};default:return null}}function Rx(e){return e===null?0:Jr(e)}function zF(e,t,n){let r=Un(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 WF(e,t,n){let r=Un(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 VF(e,t,n,r,o){let a=Sx(e,o);if(!a)return null;let i=Rx(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=zF(t,r,o);if(l!==null)return l+i}return a.left+i}function GF(e,t,n,r,o){let a=Px(e,o);if(!a)return null;let i=Rx(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=WF(t,r,o);if(l!==null)return l+i}return a.top+i}function Hf(e,t){let n=qn(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=Jr(r.simplePosition.xEmu),y=Jr(r.simplePosition.yEmu);return Object.freeze(g===null||y===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:y-t.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let l=r.horizontal.relativeFrom,s=r.vertical.relativeFrom,d=Sx(l,t),c=Px(s,t),u=d?.left??0,f=c?.top??0;if(!gx.has(l)||!hx.has(s))return Object.freeze({x:0,y:0,horizontalFrame:gx.has(l)?l:a,verticalFrame:hx.has(s)?s:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let m=VF(l,r.horizontal.align,r.horizontal.offsetEmu,n.width,t),p=GF(s,r.vertical.align,r.vertical.offsetEmu,n.height,t);return Object.freeze(m===null||p===null?{x:0,y:0,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:m,y:p,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function $F(e){let t=e.input.projection,n=t.anchor,r=qn(t),o=ii({projection:t,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?jf(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?Jd(o,e.clipRegion):o,resource:e.input.resource,accessibility:lb$1(t),...yx(t)})}function KF(e,t,n){let r=(a,i,l)=>tt(a,We(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 XF(e,t){let n=e.range.start;for(let r of e.spans)r.range.end<=t&&(n=r.range.end);return n}function zf(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:ec(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 Qr(e){let t=Yt(e.paragraph,e.drawingLayout);if(t.length===0)return [];let n=Pn(e.paragraph),r=e.displayMode??je,o=[];for(let a of t){let i=a.projection;if(i.hidden)continue;let l=lf(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(h=>s>=h.range.start&&s<h.range.end);if(!d)continue;let c=i.anchor?.layoutInCell??true,f=i.position?.horizontal.relativeFrom==="character"?XF(d,s):s,m=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:d.box,anchorCharacterX:KF(d,f,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:c}),p=Hf(i,m),g=i.wrap!=="inFront"&&i.wrap!=="behind"&&c&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0,y=i.position?.vertical.relativeFrom==="margin"?e.pageClip:Zo(e.frameBase),x=g?e.cellBox:y,b=$F({input:Object.freeze({drawingNodeId:a.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:i,resource:e.drawingLayout.resourceOf(i)}),anchorParagraphId:e.paragraphId,start:f,resolved:p,clipRegion:x,revisions:l,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(i.drawingNodeId)}:{},...i.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(i)}:{}});o.push(b);}return Object.freeze(o)}function wx(e){let t=qn(e.input.projection),n=e.slotX+t.distL+t.effectL,r=ii({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=jf(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:Jd(r,o),resource:e.input.resource,accessibility:lb$1(e.input.projection),...yx(e.input.projection),...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{}})}var YF=256,Gf=8,Jo=8,li=class extends Error{name="DrawingExclusionConvergenceError";constructor(t="drawing exclusion reflow did not converge"){super(t);}};function UF(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 Vf(e){return e.behindDocument?"behind":"inFront"}function vx(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function qF(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 ZF(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function $f(e){let t=qF(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 sx({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"?ZF(e.projection.wrap):n.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Kf(e){if(e.mode==="topAndBottom"||e.mode==="square")return Nf(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 JF(e){if(e.drawing.behindDocument||!vx(e.drawing.wrap))return null;let t=e.yOverride??e.drawing.y,n=$f({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:Vf(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:t,verticalBand:Kf(n),input:n}):null}function Ix(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 QF(e,t){let n=Vf(e),r=Vf(t);return n!==r?n==="behind"?-1:1:e.relativeHeight!==t.relativeHeight?e.relativeHeight-t.relativeHeight:Ix(e,t)}function Tx(e){return Object.freeze([...e].sort(QF))}function Wf(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 Xf(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 Fx(e,t){let n=t.maxAttempts??YF,r=[...e].sort(Ix),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=>Wf(g.paintBounds,s.paintBounds));){let m=o.find(g=>Wf(g.paintBounds,s.paintBounds)),p=m.paintBounds.y+m.paintBounds.height-s.paintBounds.y+.001;s=Xf(s,p),d+=1;}let c=o.some(f=>Wf(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 vr(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=lx(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),m=Math.min(c.end,u.end);m>f+1e-6&&d.push(Object.freeze({start:f,end:m}));}if(o=d,o.length===0)break}return a&&(o=o.filter(i=>i.end-i.start>18.001)),Object.freeze(o)}function Ox(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 eO(e,t){for(let n of t)if(n.end>e+1e-6)return n;return null}function Yf(e,t){let n=eO(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 tO(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 Uf(e,t){return Object.freeze({...e,layoutFallback:t})}function nc(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({...tO(i,-t,-n),contentLeft:r?.left??i.contentLeft-t,contentRight:r?.right??i.contentRight-t})})}))}function Cx(e,t,n){return Object.freeze(e.filter(r=>{let o=n(r.anchorParagraphId);return o===void 0?r.sourceOrder<=t:o<=t}))}function Mx(e){let t=Yt(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=Pn(e.paragraph),r=e.displayMode??je,o=Math.max(1,e.contentRight-e.contentLeft),a=[];for(let i of t){if(!Ee(i.revisions,r,e.revisionAuthorFilter)||i.projection.anchor?.behindDocument||!vx(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=Hf(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,m=qn(i.projection),p=ii({projection:i.projection,anchorX:u.x,anchorY:f,extentWidth:m.width,extentHeight:m.height}),g=$f({projection:i.projection,geometry:p,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:u.x,anchorY:f});g&&a.push(Object.freeze({drawingNodeId:i.atomId,anchorParagraphId:e.paragraphId,anchorModelStart: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:Kf(g),input:g}));}return a.sort((i,l)=>i.sourceOrder-l.sourceOrder),Object.freeze(a)}function rc(e){let t=Yt(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=Pn(e.paragraph),r=e.displayMode??je,o=[];for(let a of t){if(!Ee(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=qn(a.projection),c=ii({projection:a.projection,anchorX:e.contentLeft,anchorY:s,extentWidth:d.width,extentHeight:d.height}),u=$f({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:Kf(u),input:u}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}var nO=8;function rO(e,t,n,r){return e<r&&t>n}function eo(e,t,n){if(t<=0||n.length===0)return 0;let r=0;for(let o=0;o<nO;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;rO(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 oO(e){return e.map(t=>`${t.start.toFixed(3)}-${t.end.toFixed(3)}`).join(",")}function aO(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 Jn(e){return e.length===0?"":e.map(t=>{let n=t.verticalBand,r=t.y+t.input.contentBounds.height/2,o=vr(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),aO(t.input),oO(o)].join("|")}).join(`
8
+ `)}function qf(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?UF(l,a):0,u=JF({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 Zf(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=qf(s,t,0,n,r,a);d.length>0&&i.set(l.index,d);}return i}var kx=new WeakMap;function lO(e){return e?`${e.columnCount};${e.columnGapPt};${e.contentWidth};${(e.columnLefts??[]).join(",")};${(e.columnWidths??[]).join(",")}`:""}function Bx(e,t,n,r,o,a){let i=lO(a),l=kx.get(e);if(l&&l.drawingLayout===t&&l.drawingLayoutEpoch===n&&l.contentWidth===r&&l.drawingSourceOrder===o&&l.columnToken===i)return l.zones;let s=Zf(e,t,r,o?d=>{let c=t.projectionForAtom?.(d)?.drawingNodeId??d;return o.get(c)}:void 0,a);return kx.set(e,{drawingLayout:t,drawingLayoutEpoch:n,contentWidth:r,drawingSourceOrder:o,columnToken:i,zones:s}),s}function oc(e,t){if(e.size!==t.size)return false;for(let[n,r]of e){let o=t.get(n);if(!o||Jn(r)!==Jn(o))return false}return true}function ac(e){return e.size===0?"":[...e.entries()].sort(([t],[n])=>t-n).map(([t,n])=>`${t}:${Jn(n)}`).join(`
9
+ `)}var nt=.001,sO=32,Jf=128;function Lx(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-nt&&a>t+nt}function dO(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>Jf)return;if(r.size>Jf)return}return [...r].filter(Number.isFinite).sort((a,i)=>a-i)}function cO(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)<nt||Math.abs(a.x-n)<nt||Math.abs(a.y-r)<nt||Math.abs(a.y-o)<nt)&&(Math.abs(a.x-l.x)<nt||Math.abs(a.y-l.y)<nt)}):false}function Ex(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(m=>m.input.mode==="square"||m.input.mode==="topAndBottom"||m.input.mode==="tight"&&cO(m.input.polygon)),l,s=()=>l??=n.filter(m=>Lx(m,r,o)),d=m=>{let p=m,g=[...s()].sort((y,x)=>y.verticalBand.y-x.verticalBand.y);for(let y of g){if(y.verticalBand.y>=p+t-nt)break;p=Math.max(p,y.verticalBand.y+y.verticalBand.height);}return p-e},c=0,u=false,f=e;for(let m=0;m<sO;m++){let p=i.filter(h=>h.verticalBand.y<f+t-nt&&h.verticalBand.y+h.verticalBand.height>f+nt);if(p.length===0&&!u)return f-e;let g=p.some(h=>h.sourceKind==="table"&&Lx(h,r,o));if(a===0&&!g&&!u)return f-e;let y=[{start:r,end:o}],x=[f+nt,f+t-nt];for(let h of p)x.push(Math.max(f,h.verticalBand.y)+nt);for(let h of x)if(y=Ud(y,vr(h,i,r,o)).filter(v=>v.end-v.start>=a-nt),y.length===0)break;if(y.length>0){if(!u&&(!g||i.length===n.length))return f-e;let h=dO(s(),f,f+t);if(!h)return d(f);let v=[{start:r,end:o}],R=[f+nt,f+t-nt];for(let P of h)P>f&&P<f+t&&(R.push(Math.max(f+nt,P-nt)),R.push(Math.min(f+t-nt,P+nt)));for(let P of R){if(++c>Jf)return d(f);if(v=Ud(v,vr(P,n,r,o)).filter(O=>O.end-O.start>=a-nt),v.length===0)break}if(v.length>0)return f-e;u=true,f=Math.min(f+t,h.find(P=>P>f+nt)??1/0);continue}g&&i.length!==n.length&&(u=true);let b=1/0;for(let h of p){let v=h.verticalBand.y+h.verticalBand.height;v>f+nt&&(b=Math.min(b,v));}if(!Number.isFinite(b)||b<=f||b-e>1e5)return u?d(f):f-e;f=b;}return u?d(f):f-e}function Nx(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=eo(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=Ex(e.top()+(l.exclusionSkipBefore??0),Math.max(d.height,Kd(e.lineSpacing,d.height,d.baseline).height),s,e.left(),e.right,e.measurer.measure(sn(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(eo(e.top(),a.height,i),a.exclusionSkipBefore??0);l>.001?a.exclusionSkipBefore=l:delete a.exclusionSkipBefore;}}}var si=.7,uO=1.25,fO="Cambria Math";function lc(e){return ed(e,fO)}function Qn(e,t,n,r){return Object.freeze({x:e,y:t,width:n,height:r})}function un(e,t,n){return Object.freeze({...e,box:Qn(t,n,e.box.width,e.box.height)})}var pO=4,mO=8,Ax=new WeakMap;function gO(e){let t=lc(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 hO(e,t){if(t===void 0)return {projections:new WeakMap};let n=Ax.get(e);n||(n=new Map,Ax.set(e,n));let r=n.get(t);if(r)return n.delete(t),n.set(t,r),r;if(n.size>=pO){let a=n.keys().next().value;a!==void 0&&n.delete(a);}let o={projections:new WeakMap};return n.set(t,o),o}function di(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 Dx(e,t,n,r){let o=r.metrics.get(n);if(o)return o;let a=e.lineMetrics(di(t,n,r));return r.metrics.set(n,a),a}function ic(e,t,n,r,o,a){let i=di(r,o,a),l=Dx(n,r,o,a);return Object.freeze({kind:e,text:t,fontSizePt:i.fontSizePt,box:Qn(0,0,tt(t,i,n),l.height),baseline:l.baseline})}function yO(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=un(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 Rn(e,t,n,r,o){switch(e.kind){case "text":return ic("text",e.value,t,n,r,o);case "fallback":return ic("fallback",e.text||"\u2026",t,n,r,o);case "row":return yO(e.items.map(a=>Rn(a,t,n,r,o)),Dx(t,n,r,o));case "fraction":{let a=di(n,r,o),i=Rn(e.numerator,t,n,r*si,o),l=Rn(e.denominator,t,n,r*si,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,m=f+c+d,p=m+l.box.height,g=Math.min(p,f+c/2+a.fontSizePt*.22);return Object.freeze({kind:"fraction",numerator:un(i,(u-i.box.width)/2,0),denominator:un(l,(u-l.box.width)/2,m),bar:Qn(s/2,f,u-s,c),box:Qn(0,0,u,p),baseline:g})}case "radical":{let a=di(n,r,o),i=Rn(e.radicand,t,n,r,o),l=ic("text","\u221A",t,n,r,o),s=e.degree?Rn(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,m=f+l.box.width,p=u+i.baseline,g=Math.max(u+i.box.height,p+(l.box.height-l.baseline));return Object.freeze({kind:"radical",sign:un(l,f,p-l.baseline),radicand:un(i,m,u),...s?{degree:un(s,0,0)}:{},bar:Qn(m,0,i.box.width,d),box:Qn(0,0,m+i.box.width,g),baseline:p})}case "script":{let a=di(n,r,o),i=Rn(e.base,t,n,r,o),l=e.subscript?Rn(e.subscript,t,n,r*si,o):void 0,s=e.superscript?Rn(e.superscript,t,n,r*si,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,m=f+i.baseline,p=m+a.fontSizePt*.08,g=c+Math.max(l?.box.width??0,s?.box.width??0,-d),y=Math.max(f+i.box.height,s?u+s.box.height:0,l?p+l.box.height:0);return Object.freeze({kind:"script",base:un(i,0,f),...l?{subscript:un(l,c,p)}:{},...s?{superscript:un(s,c,u)}:{},box:Qn(0,0,g,y),baseline:m})}case "nary":{let a=di(n,r,o),i=ic("text",e.operator,t,n,r*uO,o),l=Rn(e.body,t,n,r,o),s=e.lowerLimit?Rn(e.lowerLimit,t,n,r*si,o):void 0,d=e.upperLimit?Rn(e.upperLimit,t,n,r*si,o):void 0,c=Math.max(.5,a.fontSizePt*.05),u=Math.max(i.box.width,s?.box.width??0,d?.box.width??0),m=d?d.box.height+c:0,p=m+i.baseline,g=m+i.box.height+(s?c:0),y=u+c,x=p-l.baseline,h=-Math.min(0,m,x,s?g:0),v=p+h,R=Math.max(m+i.box.height,s?g+s.box.height:0,x+l.box.height)+h;return Object.freeze({kind:"nary",operator:un(i,(u-i.box.width)/2,m+h),body:un(l,y,x+h),...s?{lowerLimit:un(s,(u-s.box.width)/2,g+h)}:{},...d?{upperLimit:un(d,(u-d.box.width)/2,h)}:{},box:Qn(0,0,y+l.box.width,R),baseline:v})}}}function bO(e,t,n){let r=lc(n),o={styles:new Map,metrics:new Map};return Object.freeze({sourceNodeId:e.sourceNodeId,geometry:Rn(e.expression,t,r,1,o),fallbackText:e.fallbackText,truncated:e.truncated})}function _x(e,t){let n=hO(e,t);return (r,o)=>{let a=gO(o),i=n.projections.get(r),l=i?.get(a);if(l&&i)return i.delete(a),i.set(a,l),l;let s=bO(r,e,o);if(i||(i=new Map,n.projections.set(r,i)),i.size>=mO){let d=i.keys().next().value;d!==void 0&&i.delete(d);}return i.set(a,s),s}}function ci(e){if(e.length===0)return false;for(let t of e)if(t!==" "&&t!=="\u3000")return false;return true}function sc(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 jx(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 Hx(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="",m=0,p=-1,g=()=>u===0?o:0,y=()=>Math.max(1,r-g()),x=b=>{s=b,d.push(b),c=0,u+=1;};for(let b of t){let h=i(b);if(h){let P=h.geometry.box.width;c>0&&c+P>y()&&x(b.start),c+=P,f="",p=-1;continue}if(b.inlineDrawing){let P=qn(b.inlineDrawing.projection).totalWidth;c>0&&c+P>y()&&x(b.start),c+=P,f="",p=-1;continue}if(b.text===`
10
+ `||b.text===Ud$1){x(b.end);continue}let v=!!b.projected||!!b.positionalTab||b.end-b.start!==b.text.length,R=0;for(let P of e.cjkBreaks?.boundaries(b)??Uo(b.text,!v)){let O=b.text.slice(R,P);if(O.length===0)continue;let k=We(b.style,b.fontSlot),I=A=>n.measure(sn(A,k),k),T=b.fieldAtom?.formControl?.kind==="checkbox"?k.fontSizePt:I(b.measureText??O);if(!v&&b.measureText===void 0){let A=y()-c;T=sc(O,T,A,I,.001)?.width??T,c>0&&ci(O)&&(T=Math.min(T,Math.max(0,A)));}let S=b.start+R,F=e.cjkBreaks?.decision(b,R)??jd(f,O,R>0),C=F==="opens";C&&(m=S,p=c);let E=e.typography?.overflowPunctuation&&Qa(O,b,y()-c,T,n),H=e.colonNaturalWidths?.get(b)??T;if(!E&&c>0&&c+H>y()){if(!(F==="forbidden"&&p<=0))if(C||p<=0)x(S);else {let A=c-p;x(m),c=A;}p=0;}c+=T,f=O,R=P;}}for(let b of a){let h=0,v=d.length-1;for(;h<v;){let R=h+v+1>>1;d[R]<=b?h=R:v=R-1;}l.set(b,d[h]);}return l}function SO(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 zx(e,t,n,r){if(n<=r.remainingLineWidth()+r.overflowTolerancePt)return {text:e,modelStart:t,width:n,brokeLine:false};let o=Ze(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,m=a;for(;u<=f;){let y=u+f>>1,x=o[y-1].utf16To;r.measureText(e.slice(i,x))<=c+r.overflowTolerancePt?(m=y,u=y+1):f=y-1;}if(m===a&&r.lineHasText()&&!(i===0&&r.keepWithPrevious)){r.closeLine(),s=true;continue}if(m===a&&(m+=1),m=SO(e,o,a,m,r.cutAllowedAt),m===o.length)break;let p=o[m-1].utf16To,g=e.slice(i,p);r.appendPrefix({text:g,modelStart:t+i,width:r.measureText(g)}),r.closeLine(),s=true,a=m,i=p,l=r.measureText(e.slice(i));}return {text:e.slice(i),modelStart:t+i,width:l,brokeLine:s}}var PO={props:true,style:true,fontSlot:true,glyphOffsetPt:true,caretEdges:true,tabLeader:true,tabLeaderAdvancePt:true,link:true,wrapAdvanceBefore:true,revisions:true,changeSites:true,fieldAtom:true,projected:true,equation:true,noteNav:true,lineEndWhitespace:true},RO=Object.keys(PO);function wO(e,t){for(let n of RO)if(e[n]!==t[n])return false;return true}function kO(e,t){if(e.glyphOffsetPt||t.glyphOffsetPt||e.caretEdges!==void 0||t.caretEdges!==void 0)return false;let n=Bn(e.text),r=t.text.codePointAt(0);return n===void 0||r===void 0||!Yo(n)||!Yo(r)||e.range.paragraphId!==t.range.paragraphId||e.range.end!==t.range.start||Math.abs(e.box.x+e.box.width-t.box.x)>.01||e.box.height!==t.box.height?false:wO(e,t)}function Wx(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&&kO(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 Qf(e,t,n){return Math.max(eo(t,e.height,n),e.exclusionSkipBefore??0)}function ep(e,t,n,r=0){return Qf(t,e,n)+Math.max(0,t.height-t.trailingSpacing)+r}function Vx(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)}:{},...e.changeSites?{changeSites:Object.freeze(e.changeSites)}:{}})}function Cl(e,t){return t===0||e.length===0?e:e.map(n=>Zn(n,t,0))}var Ml=.001;function lt(e){return Ya(e)}function vO(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===Ud$1?a[i]=0:l!==" "&&!ci(l)?a[i]=1:a[i]=a[i+1];}t[r]=a,n=a[0]===1;}return t}function IO(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=We(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===Ud$1)return {width:o,decimalOffset:i?a:o};let m=u+1,p=s.text.slice(u,m),g=r.measure(sn(p,d),d);!i&&f==="."?i=true:i||(a+=g),o+=g,u=m;}}return {width:o,decimalOffset:i?a:o}}function TO(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 dc=31680;function Bl(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let t=Number(e);return Number.isFinite(t)?t>dc?af$1(dc):t<-dc?af$1(-dc):af$1(t):null}function Ll(e){let t=0,n=0,r=Ot(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=Bl(a),s=Bl(i);l!==null&&(t=cf$1(l)),s!==null&&(n=cf$1(s));}return {left:t,right:n}}function tp(e,t,n,r,o,a,i,l=[],s=Pl,d,c,u,f=false){let m=i!==null&&a?a.get(i):void 0;if(m)return m;let p=u?.lineSpacing??vl,g=u?.firstLineOffset??0,y=[],x=[],b=cc(e,l,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??je,y,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false,u?.refFields,u?.revisionAuthorFilter,u?.showFieldCodes,u?.fieldCodeRanges,u?.tocLinkStyleRanges,x),h=Uy(b,u?.paragraphRtl??Ot(lt("children"in e?e.children.find(_=>_.kind==="paragraphProperties"):void 0)),Ky(e)),v=Math.max(0,u?.startOffset??0),R=h.flatMap(_=>{if(_.end<=v&&!((v===0||u?.showFieldCodes)&&_.projected&&_.start===_.end&&_.start===v))return [];if(_.start>=v)return [_];let M=v-_.start;return [{..._,text:_.projected?_.text:_.text.slice(M),start:v}]}),P=u?.typography??Nd(lt("children"in e?e.children.find(_=>_.kind==="paragraphProperties"):void 0)),O=Cb(R,P,o,f),k=Ob(O,R,o),I=P.settings?.compression!==void 0&&P.settings.compression!=="doNotCompress"&&!u?.pageExclusionZones?.length&&o.inkBounds!==void 0&&Nb(h),T=I&&!f,S=vO(O),F=Hd(O,P),C=Ab(O,F,o,P.overflowPunctuation),E=_x(o,u?.equationCacheToken),H=_=>_.equation?E(_.equation,_.style):null;if(O.length===0&&u?.suppressEmptyPlaceholderLine)return [];let A=_=>({..._.revisions===void 0?{}:{revisions:_.revisions},..._.changeSites===void 0?{}:{changeSites:_.changeSites},..._.fieldAtom===void 0?{}:{fieldAtom:_.fieldAtom}}),D=u?.markRunProperties??l,B=D.length===0?On:De(D,u?.themeFonts),j=Yb(e),V=n+r,z=u?.contentLeft??n,Z=u?.contentRight??V,U=u?.contentOriginX??0,te=Math.min(Z,U+V),K=[],Q=0,w={spans:[],start:v,end:v,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},N=new Map,J=u?.displayMode??je,$=(()=>{let _=new Set;if(!u?.inlineDrawingLayout)return _;let M=Pn(e);for(let ee of Yt(e,u.inlineDrawingLayout)){if(!Ee(ee.revisions,J,u?.revisionAuthorFilter)||ee.projection.wrap!=="topAndBottom")continue;let ie=M.get(ee.atomId);ie!==void 0&&_.add(ie);}return _})(),W=(()=>{let _=new Set;if(!u?.inlineDrawingLayout)return _;let M=Pn(e);for(let ee of Yt(e,u.inlineDrawingLayout)){if(!Ee(ee.revisions,J,u?.revisionAuthorFilter)||ee.projection.anchor?.behindDocument||ee.projection.wrap==="topAndBottom"||ee.projection.wrap==="inline"||ee.projection.wrap==="behind"||ee.projection.wrap==="inFront")continue;let ie=M.get(ee.atomId);ie!==void 0&&_.add(ie);}return _})(),q=[...(u?.pageExclusionZones??[]).filter(_=>_.anchorParagraphId===t).map(_=>_.anchorModelStart),...$,...W],X=Hx({colonNaturalWidths:k,typography:P,cjkBreaks:F,pieces:O,measurer:o,available:r,firstLineOffset:g,anchorStarts:q,equationLayoutOf:H});for(let _ of W){let M=X.get(_);M!==void 0&&N.set(_,M);}let ae=_=>{if(_.anchorParagraphId!==t)return true;let M=X.get(_.anchorModelStart);return M!==void 0&&w.start>=M||w.end>=_.anchorModelStart},re=()=>{let _=u?.pageExclusionZones?.filter(ie=>!(!ae(ie)||ie.anchorParagraphId===t&&(!ie.sourceKind&&ie.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],M=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&N.size>0?Mx({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:z,contentRight:Z,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:N,anchorCellBox:u.anchorCellBox,displayMode:J,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]),ee=u?.inlineDrawingLayout&&N.size>0?rc({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:z,contentRight:Z,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:N,displayMode:J,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]);return Object.freeze([..._,...M,...ee])},he=()=>K.length===0?g:0,ce=()=>U+n+he(),ye=()=>Math.max(1,r-he()),be=()=>K.reduce((_,M)=>_+M.height+(M.exclusionSkipBefore??0),0),xe=()=>(u?.paragraphStartY??0)+be(),ke=_=>{$.has(_)&&N.set(_,be());},{applyTopAndBottomSkipIfNeeded:Me,applyNarrowWrapSkipIfNeeded:we,finalizeTopAndBottomClearance:_e}=Nx({line:()=>w,top:xe,zones:re,left:()=>Math.max(z,ce()),right:te,emptyStyle:B,measurer:o,lineSpacing:p}),Be=()=>xe()+(w.exclusionSkipBefore??0)+.001,Vt=()=>{let _=re();if(_.length===0)return true;Me();let M=vr(Be(),_,z,te),ee=ce()+w.width,ie=Yf(ee,M);return ie?(ie.x>ee+.001&&(w.width=ie.x-ce()),true):false},Je=()=>{let _=ye(),M=re();if(M.length===0)return Math.max(_,Q-ce());if(Me(),!Vt())return 0;let ee=vr(Be(),M,z,te),ie=ce()+w.width,Te=Ox(ie,ee);return Te<=.001?0:Math.min(_,w.width+Te)},Ne=()=>Math.max(0,Je()-w.width),pn=()=>{let _=re();if(_.length===0||!_.some(Re=>Re.anchorParagraphId!==t||w.end>Re.anchorModelStart))return false;let ee=vr(Be(),_,z,te),ie=ce()+w.width,Te=false;for(let Re of ee){if(!Te){ie>=Re.start-1e-6&&ie<Re.end-1e-6&&(Te=true);continue}if(Re.end-Re.start>.001)return w.width=Re.start-ce(),true}return false},mn=_=>{if(q.length===0||_<Math.min(...q))return;let M=re().filter(Y=>Y.anchorParagraphId===t&&_>=Y.anchorModelStart);if(M.length===0)return;Me();let ee=vr(Be(),M,z,te),ie=ce()+w.width,Te=-1;for(let Y=0;Y<ee.length;Y+=1){let Le=ee[Y];if(ie>=Le.start-.001&&ie<Le.end-.001){Te=Y;break}}if(Te>=0)return;let Re=Yf(ie,ee);Re&&Re.x>ie+.001&&(w.width=Re.x-ce());},Mr=_=>{re().filter(ee=>ee.input.mode==="topAndBottom"&&ee.anchorParagraphId===t&&_>=ee.anchorModelStart).length!==0&&((w.spans.length>0||w.drawings.length>0)&&Ae(),Me());},dt=(_,M=0)=>M>64?Ne()>=_:(Me(),Vt()?_<=Ne()+.001?true:w.spans.length>0||w.drawings.length>0?pn()&&_<=Ne()+.001?true:(Ae(),dt(_,M+1)):pn()?dt(_,M+1):true:w.spans.length>0||w.drawings.length>0?(Ae(),dt(_,M+1)):true),rn=(_,M)=>y.filter(ee=>ee.start<M&&ee.end>_).map(ee=>({start:Math.max(ee.start,_),end:Math.min(ee.end,M)})),Gi=_=>`${_.kind}|${_.id}|${_.author}|${_.nodeId}`,on=_=>{let M=new Set,ee=[];for(let ie of _)if(ie)for(let Te of ie){let Re=Gi(Te);M.has(Re)||(M.add(Re),ee.push(Te));}return ee},sr=new Set,xo=(_,M,ee)=>{let ie=[];for(let Te of x){let Re=Te.start<_.end&&Te.end>_.start,Y=_.start===_.end&&Te.start<=_.start&&Te.end>=_.start;!Re&&!Y||(sr.add(Te),ie.push(...Te.revisions));}return on([ee,...M.map(Te=>Te.changeSites),ie])},Dt=_=>{let M=_[_.length-1];if(!M)return;let ee=x.filter(ie=>!sr.has(ie));if(ee.length!==0){for(let ie of ee)sr.add(ie);M.changeSites=on([M.changeSites,...ee.map(ie=>ie.revisions)]);}},Ke=-1,_t=0,dr=0,Pt="",Qe=(_,M)=>{let ee=o.lineMetrics(_),ie=bx(ee.baseline,w.height||ee.height,M);return w.height===0?(w.height=ie.lineHeight,w.baseline=ie.baseline):(ie.lineHeight>w.height&&(w.height=ie.lineHeight),w.baseline=Math.max(w.baseline,ie.baseline)),{extentTopY:ie.extentTopY}},Oe=()=>{if(w.drawings.length===0)return;w.spans.length===0&&(w.baseline=Math.max(w.baseline,...w.drawings.map(M=>M.y+M.height)));let _=_f(w.drawings,w.baseline);w.drawings.splice(0,w.drawings.length,..._),w.baseline=Math.max(w.baseline,...w.drawings.map(M=>M.y+M.height));},Ie=()=>{if(w.drawings.length===0)return;let _=_f(w.drawings,w.baseline);w.drawings.splice(0,w.drawings.length,..._);},jt=_=>{let M=0;for(let ee of w.spans)M=Math.max(M,o.lineMetrics(We(ee.style,ee.fontSlot)).height);return M>0?M:_},pt=()=>{if(w.drawings.length===0)return;let _=Math.max(0,...w.drawings.map(M=>M.y+M.height+M.distB));w.height=Math.max(w.height,_);},Br=()=>{Oe(),pt();},So=()=>{if(!(w.spans.length<2))for(let _=1;_<w.spans.length;_+=1){let M=w.spans[_-1],ee=w.spans[_],ie=ee.box.x-(M.box.x+M.box.width);ie<=.001||w.drawings.some(Re=>Re.start>=M.range.end&&Re.start<ee.range.start)||(w.spans[_]={...ee,wrapAdvanceBefore:ie});}},Ae=_=>{let M=o.lineMetrics(B),ee=w.baseline;w.height===0?(w.height=M.height,w.baseline=M.baseline,ee=M.baseline):_?.includeParagraphMark&&j&&(w.height=Math.max(w.height,M.height)),Br();let ie=w.height,Te=w.drawings.length>0||w.spans.some(Ce=>Ce.equation!==void 0),Re=p.rule==="auto"&&Te,Y=Re?jt(M.height):ie,Le=Kd(p,Y,w.baseline);Re||(w.baseline=Le.baseline),w.leading=Math.max(0,w.baseline-ee),w.height=Re?Math.max(Le.height,ie):Le.height,Ie(),p.rule!=="exact"&&pt(),w.trailingSpacing=w.drawings.length===0&&p.rule!=="exact"?Math.max(0,Le.height-ie):0,_e(),Wx(w),So();let Xe=rn(w.start,w.end);Xe.length>0&&(w.deletedRanges=Xe);let Mt=xo(w,w.spans,w.changeSites);Mt.length>0&&(w.changeSites=Mt),K.push(w),Ke=-1,_t=0,Q=0,w={spans:[],drawings:[],start:w.end,end:w.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},Me();},yt=false;for(let _=0;_<O.length;_+=1){let M=O[_];if(M.breakKind==="column"){let Y=o.lineMetrics(M.style);w.spans.push({range:{paragraphId:t,start:M.start,end:M.end},text:M.text,props:M.props,style:M.style,box:{x:ce()+w.width,y:0,width:0,height:Y.height},...M.link?{link:M.link}:{},...A(M)}),w.height=Math.max(w.height,Y.height),w.baseline=Math.max(w.baseline,Y.baseline),w.end=M.end,Ae(),K[K.length-1].columnBreakAfter=true,yt=true;continue}if(M.equation){let Y=H(M),Le=Y.geometry.box.width;if((w.spans.length>0||w.drawings.length>0)&&w.width+Le>Je()&&Ae(),!dt(Le))continue;let Mt=Math.max(0,w.height-w.baseline),Ce=Math.max(0,Y.geometry.box.height-Y.geometry.baseline);w.baseline=Math.max(w.baseline,Y.geometry.baseline),w.height=w.baseline+Math.max(Mt,Ce),w.spans.push({range:{paragraphId:t,start:M.start,end:M.end},text:"\uFFFC",props:M.props,style:M.style,box:{x:ce()+w.width,y:0,width:Le,height:Y.geometry.box.height},projected:true,equation:Y,...A(M)}),w.width+=Le,w.end=M.end,Ke=-1,Pt="";continue}if(M.projected&&!M.inlineDrawing&&M.text==="\uFFFC"){ke(M.start),M.anchoredAtom&&M.revisions!==void 0&&Ee(M.revisions,J,u?.revisionAuthorFilter)&&(w.anchorRevisions=[...w.anchorRevisions??[],...M.revisions]),M.anchoredAtom&&M.changeSites&&(w.changeSites=[...w.changeSites??[],...M.changeSites]),w.end=M.end;continue}if(M.inlineDrawing){ke(M.start);let Y=qn(M.inlineDrawing.projection),Le=Y.totalWidth;if((w.spans.length>0||w.drawings.length>0)&&w.width+Le>Je()&&Ae(),!dt(Le))continue;let{extentTopY:Mt}=Qe(M.style,Y),Ce=ce()+w.width;w.drawings.push(wx({input:M.inlineDrawing,paragraphId:t,start:M.start,slotX:Ce,y:Mt,baseline:w.baseline,contentLeft:U,contentRight:U+V,...M.revisions?{revisions:M.revisions}:{}})),M.changeSites&&(w.changeSites=[...w.changeSites??[],...M.changeSites]),w.width+=Le,w.end=M.end,Ke=-1,Pt="";continue}if(M.text===Ud$1){let Y=o.lineMetrics(M.style);w.spans.push({range:{paragraphId:t,start:M.start,end:M.end},text:Ud$1,props:M.props,style:M.style,box:{x:ce()+w.width,y:0,width:0,height:Y.height},...M.link?{link:M.link}:{},...A(M)}),w.height=Math.max(w.height,Y.height),w.baseline=Math.max(w.baseline,Y.baseline),w.end=M.end,Ae(),K[K.length-1].pageBreakAfter=true,yt=false;continue}if(M.text===`
13
+ `){M.breakKind==="line"&&(w.manualBreakAfter=true);let Y=o.lineMetrics(M.style);w.spans.push({range:{paragraphId:t,start:M.start,end:M.end},text:`
14
+ `,props:M.props,style:M.style,box:{x:ce()+w.width,y:0,width:0,height:Y.height},...M.link?{link:M.link}:{},...A(M)}),w.height=Math.max(w.height,Y.height),w.baseline=Math.max(w.baseline,Y.baseline),w.end=M.end,Ae(),yt=true;continue}yt=false,Mr(M.start),q.length>0&&M.start>=Math.min(...q)&&mn(M.start);let ee=We(M.style,M.fontSlot),ie=o.lineMetrics(ee),Te=!!M.projected||!!M.positionalTab||M.end-M.start!==M.text.length,Re=0;for(let Y of F?.boundaries(M)??Uo(M.text,!Te)){let Le=M.text.slice(Re,Y);if(Le.length===0)continue;let Xe=Te?{paragraphId:t,start:M.start,end:M.end}:{paragraphId:t,start:M.start+Re,end:M.start+Y};if(Le===" "){(w.spans.length>0||w.drawings.length>0)&&w.width>=Je()&&S[_][Y]===1&&Ae();let $e=ce()+w.width,Ye=IO(O,_,Y,o),Ht=M.positionalTab?TO(M.positionalTab,n,V,u?.marginExtent):null,cr=re().length===0?Math.max(V,u?.marginExtent?.right??V):V,Rs=ei(s,$e,cr),qt=Ht===null?Rs.alignment==="left"?ei(s,$e,V):Rs:Ht.positionPt>$e?Ht:{...ei(s,$e,V),...Ht.leader?{leader:Ht.leader}:{}};qt.alignment!=="left"&&(Q=Math.max(Q,Math.min(qt.positionPt,cr)));let ur=$b(qt.alignment,$e,qt.positionPt,Ye.width,Ye.decimalOffset);w.spans.push({range:Xe,text:" ",props:M.props,style:M.style,box:{x:$e,y:0,width:ur,height:ie.height},...qt.leader?{tabLeader:qt.leader,tabLeaderAdvancePt:o.measure(_b.get(qt.leader)??".",M.style)}:{},...M.link?{link:M.link}:{},...qt.leader?{tabLeader:qt.leader}:{},...Te&&!M.positionalTab?{projected:true}:{},...M.noteNav?{noteNav:M.noteNav}:{},...A(M)}),w.width+=ur,w.height=Math.max(w.height,ie.height),w.baseline=Math.max(w.baseline,ie.baseline),w.end=Te?M.end:M.start+Y,Pt=" ",Re=Y;continue}let Mt=M.measureText??Le,Ce=M.fieldAtom?.formControl?.kind==="checkbox"?ee.fontSizePt:o.measure(sn(Mt,ee),ee),Dn=F?.decision(M,Re)??jd(Pt,Le,Re>0),Lr=Dn==="opens";Lr&&(Ke=w.spans.length,_t=w.width,dr=w.end),mn(M.start+Re),we(Le,ee);let $i=I&&q.length===0&&Y===M.text.length&&O[_+1]!==void 0&&F?.decision(O[_+1],0)==="forbidden",Po=!Te&&M.measureText===void 0&&!$i?sc(Le,Ce,Je()-w.width,$e=>o.measure(sn($e,ee),ee),Ml):void 0;Ce=Po?.width??Ce;let Ki=P.overflowPunctuation&&Qa(Le,M,Je()-w.width,Ce,o),xa=T&&q.length===0?()=>{let $e=C(w,_,Le,Xe,Ce,ce()+w.width,Je(),!ci(Le)||Lr&&S[_][Y]===1);return $e&&(Ce=$e.width,Ke>=0&&$e.spanStarts&&(Ke=$e.spanStarts[Ke],_t=Ke<w.spans.length?w.spans[Ke].box.x-ce():w.width)),$e}:void 0,Ro=w,Er=xa?.(),wo=!$i&&ci(Le)&&(S[_][Y]!==1||!Te&&(w.spans.length>0||w.drawings.length>0)&&w.width+Ce>Je()+Ml);wo&&(Ce=Math.min(Ce,Math.max(0,Je()-w.width)));let gn=Er?Ce:k.get(M)??Ce;if(!Ki&&w.width+gn>Je()+Ml&&(w.spans.length>0||w.drawings.length>0)){if(!(Dn==="forbidden"&&Ke<=0))if(!Lr&&Ke===0)pn();else if(Lr||Ke<0){if(!(pn()&&w.width+gn<=Je()+.001)){if(Ae(),!dt(gn))continue;Ke=0,_t=0,dr=w.end;}}else {let $e=w.spans.splice(Ke);w.width=_t,w.end=dr,w.height=0,w.baseline=0;for(let Ye of w.spans){let Ht=o.lineMetrics(We(Ye.style,Ye.fontSlot));w.height=Math.max(w.height,Ht.height),w.baseline=Math.max(w.baseline,Ht.baseline);}Ae();for(let Ye of $e){let Ht=o.lineMetrics(We(Ye.style,Ye.fontSlot));w.spans.push({...Ye,box:{...Ye.box,x:ce()+w.width}}),w.width+=Ye.box.width,w.height=Math.max(w.height,Ht.height),w.baseline=Math.max(w.baseline,Ht.baseline),w.end=Ye.range.end;}Ke=0,_t=0;}}else if(w.spans.length===0&&w.drawings.length===0&&gn>Je()+.001&&!dt(gn))continue;!Er&&w!==Ro&&(Er=xa?.());let ko=Le,Nr=M.start+Re,Sa=Ce;if(!Te&&M.measureText===void 0&&!Ki&&(w.spans.length===0||!Lr&&Ke===0)&&Ce>Ne()+Ml){let $e=zx(Le,Nr,Ce,{remainingLineWidth:Ne,lineHasText:()=>w.spans.length>0,measureText:Ye=>o.measure(sn(Ye,ee),ee),appendPrefix:Ye=>{w.spans.push({range:{paragraphId:t,start:Ye.modelStart,end:Ye.modelStart+Ye.text.length},text:Ye.text,props:M.props,style:M.style,box:{x:ce()+w.width,y:0,width:Ye.width,height:ie.height},...M.link?{link:M.link}:{},...M.noteNav?{noteNav:M.noteNav}:{},...M.fontSlot?{fontSlot:M.fontSlot}:{},...M.glyphOffsetPt!==void 0?{glyphOffsetPt:M.glyphOffsetPt}:{},...A(M)}),w.width+=Ye.width,w.height=Math.max(w.height,ie.height),w.baseline=Math.max(w.baseline,ie.baseline),w.end=Ye.modelStart+Ye.text.length;},closeLine:Ae,overflowTolerancePt:Ml,keepWithPrevious:Dn==="forbidden",cutAllowedAt:F?(Ye,Ht)=>F.cutAllowed(M,Re,Ht):kb});ko=$e.text,Nr=$e.modelStart,Sa=$e.width,$e.brokeLine&&(Ke=0,_t=0,dr=w.end);}if(ko.length>0){let $e={range:Te?Xe:{paragraphId:t,start:Nr,end:M.start+Y},text:ko,props:M.props,style:M.style,box:{x:ce()+w.width,y:0,width:Sa,height:ie.height},...M.link?{link:M.link}:{},...Te&&!M.positionalTab?{projected:true}:{},...M.noteNav?{noteNav:M.noteNav}:{},...M.fontSlot?{fontSlot:M.fontSlot}:{},...M.glyphOffsetPt!==void 0?{glyphOffsetPt:M.glyphOffsetPt}:{},...wo?{lineEndWhitespace:true}:{},...A(M)};Er?Db(w.spans,$e,Er):jx(w.spans,$e,Po),w.width+=Sa,w.height=Math.max(w.height,ie.height),w.baseline=Math.max(w.baseline,ie.baseline),w.end=Te?M.end:M.start+Y;}Pt=Le,Re=Y;}}return (w.spans.length>0||w.drawings.length>0||K.length===0||yt)&&Ae({includeParagraphMark:true}),!f&&Fb(K)?tp(e,t,n,r,o,a,i,l,s,d,c,u,true):(Dt(K),i!==null&&a&&a.set(i,a.retainAcrossPasses===false?K:K.map(Vx)),K)}var FO=128,OO=/[\u0000-\u001F\u007F-\u009F]/,CO=32;function no(e){return e.kind!=="textValue"}function ui(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Qo(e,t){for(let n of e.children)if(no(n)&&n.localName===t)return n}function to(e){return e===void 0||e.length===0||e.length>FO?false:!OO.test(e)&&!I(e)}function MO(e){return e==="1"||e==="true"||e==="on"}function fi(e){if(e){for(let t of e.children)if(no(t)&&(t.kind==="runProperties"||t.localName==="rPr"))return t}}function El(e){if(e){for(let t of e.children)if(no(t)&&(t.kind==="paragraphProperties"||t.localName==="pPr"))return t}}var Gx=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function ea(e){return e.some(t=>Gx.has(t.localName))?e.filter(t=>!Gx.has(t.localName)):e}function $x(e){let t=Qo(e,"docDefaults");if(!t)return {run:[],paragraph:[],paragraphNode:void 0};let n=fi(Qo(t,"rPrDefault")),r=El(Qo(t,"pPrDefault"));return {run:ea(lt(n)),paragraph:ea(lt(r)),paragraphNode:r}}function Kx(e){let t=ui(e,"styleId");if(!to(t))return null;let n=ui(e,"type")??"",r=Qo(e,"basedOn"),o=r?ui(r,"val"):void 0,a$1=to(o)?o:null,i=Qo(e,"next"),l=i?ui(i,"val"):void 0,s=to(l)?l:null,d=El(e),c=fi(e),u=new Map,f=0;for(let m of e.children){if(m.kind==="textValue"||m.localName!=="tblStylePr")continue;if(f>=CO)break;f+=1;let p=ui(m,"type");p&&!u.has(p)&&u.set(p,m);}return {styleId:t,type:n,basedOn:a$1,next:s,outlineLevel:a(e),isDefault:MO(ui(e,"default")),paragraphProperties:ea(lt(d)),runProperties:ea(lt(c)),paragraphPropertiesNode:d,tablePropertiesNode:Qo(e,"tblPr"),tableRowPropertiesNode:Qo(e,"trPr"),conditionalTableFormats:u}}var rp=32,BO=4096;function uc(e){return e.map(t=>t.attributes?{n:t.localName,a:t.attributes}:{n:t.localName})}function np(e){return e?B(ra$1(e)):""}function LO(e){return [...e.conditionalTableFormats].map(([t,n])=>[t,np(n)])}var fc=Object.freeze({tablePropertyNodes:Object.freeze([]),tableRowPropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function Ux(e,t){let n=t&&to(t)?t:null,r=n?Yx(e,n):null;if(r)return r;let o=e.defaultTableStyleId;return !o||o===n?fc:Yx(e,o)??fc}var Xx=new WeakMap;function Yx(e,t){let n=Xx.get(e);n||(n=new Map,Xx.set(e,n));let r=n.get(t);if(r)return r;let o=EO(e,t);return o?(n.set(t,o),o):null}function EO(e,t){let n=pc(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:NO(s)})}function NO(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 qx(e){return e.paragraphPropertyNodes.length>0||e.paragraphProperties.length>0||e.runProperties.length>0||e.conditional.size>0}var op=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function Zx(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=El(i);l&&(n.push(l),r.push(...ea(lt(l))));let s=fi(i);s&&o.push(...ea(lt(s)));}return n.length===0&&r.length===0&&o.length===0?op:{paragraphProperties:r,paragraphPropertyNodes:n,runProperties:o}}function AO(e){return {major:e.major??null,minor:e.minor??null,majorEastAsia:e.majorEastAsia??null,minorEastAsia:e.minorEastAsia??null,majorBidi:e.majorBidi??null,minorBidi:e.minorBidi??null,majorSupplemental:e.majorSupplemental??null,minorSupplemental:e.minorSupplemental??null}}function Jx(e,t=_h,n=null){let r=bb(n),o=new Map,a=AO(t);if(!e)return {cacheToken:B({empty:true,theme:a,typography:r}),typography:r,docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,defaultTableStyleId:null,themeFonts:t,styles:o};let i=$x(e),l=null,s=null,d=null,c=0;for(let f of e.children){if(!no(f)||f.localName!=="style")continue;if(c>=BO)break;c+=1;let m=Kx(f);if(!m)continue;let{isDefault:p,...g}=m;o.set(g.styleId,g),g.type==="paragraph"?p?l=g.styleId:l===g.styleId&&(l=null):g.type==="character"?p?s=g.styleId:s===g.styleId&&(s=null):g.type==="table"&&(p?d=g.styleId:d===g.styleId&&(d=null));}return {cacheToken:B({typography:r,dR:uc(i.run),dP:uc(i.paragraph),defP:l,defC:s,defT:d,theme:a,styles:[...o.values()].map(f=>({id:f.styleId,type:f.type,basedOn:f.basedOn,outlineLevel:f.outlineLevel,p:uc(f.paragraphProperties),r:uc(f.runProperties),tPr:np(f.tablePropertiesNode),trPr:np(f.tableRowPropertiesNode),tblStylePr:LO(f)}))}),typography:r,docDefaultsRun:i.run,docDefaultsParagraph:i.paragraph,docDefaultsParagraphNode:i.paragraphNode,defaultParagraphStyleId:l,defaultCharacterStyleId:s,defaultTableStyleId:d,themeFonts:t,styles:o}}function ap(e,t){let n=null;for(let r of e){if(r.localName!==t)continue;let o=r.attributes?.val;n=to(o)?o:null;}return n}function pc(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<rp&&!(a.has(i)||!to(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 mc(e,t,n){return Qx(e,t,n)}function Qx(e,t,n,r){let o=lt(t),a=ap(o,"pStyle")??e.defaultParagraphStyleId,i=a?pc(e,a,"paragraph"):[],l=o.some(g=>g.localName==="numPr"),s=[...e.docDefaultsParagraph,...n?.paragraphProperties??[],...l?[]:lt(r),...i.flatMap(g=>g.paragraphProperties),...l?lt(r):[]],d=[...s,...o],c=[];e.docDefaultsParagraphNode&&c.push(e.docDefaultsParagraphNode),n&&c.push(...n.paragraphPropertyNodes),r&&!l&&c.push(r);for(let g of i)g.paragraphPropertiesNode&&c.push(g.paragraphPropertiesNode);r&&l&&c.push(r),t&&c.push(t);let u=fi(t&&no(t)?t:void 0),f=lt(u),m=Qs([{properties:e.docDefaultsRun,role:"defaults",emit:true},{properties:n?.runProperties??[],role:"xor",emit:true},{properties:i.flatMap(g=>g.runProperties),role:"xor",emit:true}]),p=f.length===0?m:Qs([{properties:m,role:"carried",emit:true},{properties:f,role:"direct",emit:true}]);return {paragraphProperties:d,inheritedParagraphProperties:s,paragraphPropertyNodes:c,runProperties:m,markRunProperties:p,styleId:a??null}}function DO(e){let t;for(let n of e){if(!n||n.kind==="textValue")continue;let r=false;for(let o of n.children)if(no(o)&&o.localName==="pBdr"){r=true;break}r&&(t=Xd(n).bottom);}return t}function pi(e,t,n){let r=[];if(n){let i=ap(t,"rStyle")??n.defaultCharacterStyleId;i&&(r=pc(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:Qs([...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 ta(e,t,n,r,o,a=false,i=12){let l=El(e),s=cl(r),d=n?Qx(n,l,o,s):null,c=d?.paragraphPropertyNodes??[s,l].filter(O=>O!==void 0),u=d?[...d.paragraphProperties]:[...lt(s),...lt(l)],f=lt(fi(l&&no(l)?l:void 0)),m=d?d.runProperties:[],p=d?d.markRunProperties:f,g=Ll(u),y=0,x=0;if(r)y=r.indent.hanging,x=r.indent.firstLine;else for(let O of u){if(O.localName!=="ind")continue;let k=Bl(O.attributes?.hanging),I=Bl(O.attributes?.firstLine);(O.attributes?.hanging!==void 0||O.attributes?.firstLine!==void 0)&&(y=k!==null?Math.max(0,cf$1(k)):0,x=I!==null?cf$1(I):0);}let b=r?{left:r.indent.left,right:r.indent.right,hanging:y,firstLine:x}:{left:g.left,right:g.right,hanging:y,firstLine:x},h=Wb(c),v=d?d.styleId:ap(u,"pStyle")??null,R=null,P=false;for(let O of u){if(O.localName!=="outlineLvl")continue;P=true;let k=O.attributes?.val;R=k!==void 0&&/^[0-8]$/.test(k)?Number(k):null;}if(!P&&n&&v){let O=pc(n,v,"paragraph");for(let k=O.length-1;k>=0;k-=1){let I=O[k].outlineLevel;if(I!==null){R=I;break}}}if(!P&&R===null&&v){let O=/^heading\s*([1-9])$/i.exec(v.trim());O&&(R=Number(O[1])-1);}return {props:u,indent:b,available:Math.max(1,t-b.left-b.right),alignment:Ff(u),spacing:Tl(u,{inList:r!==void 0,inTableCell:a,lineUnitPt:i}),lineSpacing:qb(u),contextualSpacing:Zb(u),styleId:v,outlineLevel:R,bottomBorder:DO(c),borders:Qb(c),shading:Mh(u),inheritedRunProperties:m,markRunProperties:p,tabStops:h,tabStopsCacheToken:Wd(h),...r?{listItem:r}:{}}}var _O=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),eS=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),tS=new Map([[167,"\u25AA"],[183,"\u2022"]]),nS=new Map([["symbol",_O],["wingdings",eS],["wingdings 2",tS],["wingdings 3",tS],["webdings",eS]]),jO=64;function na(e){return !e||e.length>jO?false:nS.has(e.toLowerCase())}function mi(e,t,n){if(e.length===0||!na(t))return e;let r=nS.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 sp=new WeakMap;function Ej(e,t){let n=t.dependencyKeys.size===0||[...t.dependencyKeys].every(r=>r===g.story);sp.set(e,{preservesNumberedSequence:t.impact==="text-local"&&!t.structural&&t.created.size===0&&t.deleted.size===0&&n});}function zO(e){let t=sp.get(e);return sp.delete(e),t}function WO(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 uS=new WeakMap;function fS(e){return uS.get(e)}function dp(e){return e.kind!=="textValue"}function rS(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function gc(e,t){for(let n of e.children)if(dp(n)&&n.localName===t)return n}function pS(e){if(!dp(e))return null;let t=gc(e,"numPr");if(!t)return null;let n=gc(t,"numId"),r=gc(t,"ilvl"),o;if(n){let i=rS(n,"val");o=i!==void 0&&i!=="0"&&i.length<=64?i:null;}let a;if(r){let i=rS(r,"val"),l=/^\d{1,2}$/.test(i??"")?Number(i):0;a=l<=8?l:null;}return {numId:o,ilvl:a}}function VO(e){let t=null,n=0;for(let r of e){let o=pS(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 GO(e,t){let n=new Set,r=e.styles.get(t);for(let o=0;r!==void 0&&o<rp;o+=1){if(n.has(r.styleId))return;n.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?pS(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 ip=new WeakMap;function hc(e,t){if(!t)return e;let n=ip.get(e);if(n&&n.styleCascade===t)return n.linked;let r=ub(e,a=>GO(t,a)),o={styleCascade:t,linked:r};return ip.set(e,o),ip.set(r,o),r}function oS(e){return Number.isFinite(e)?e>Mn?Mn:e<-Mn?-Mn:e:0}function aS(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)?oS(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?oS(Number(o)/20):0});}return t}function iS(e,t=false){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.[t?"end":"start"]!==void 0))}function lS(e,t=false){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.[t?"start":"end"]!==void 0))}function $O(e,t,n=[]){let r=Ot([...t,...n]),o={localName:"bidi",attributes:{val:r?"1":"0"}};if(e.authored){let f=e.authored,m=f.left??(r?f.end:f.start),p=f.right??(r?f.start:f.end);e={...e,left:m??0,right:p??0,stated:{left:m!==void 0,right:p!==void 0,firstLineOffset:e.stated?.firstLineOffset??false}};}let a=e.stated??{left:false,right:false,firstLineOffset:false},i=Ll([...t,o]),l=Ll([...n,o]),s={hanging:e.hanging,firstLine:e.firstLine},d=iS(n,r)?l.left:a.left?e.left:iS(t,r)?i.left:e.left,c=lS(n,r)?l.right:a.right?e.right:lS(t,r)?i.right:e.right,u=aS(n)??(a.firstLineOffset?s:aS(t)??s);return {left:d,right:c,...u}}function ra(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 Ec$1(i.children))if(l.kind==="tableRow")for(let s of Ec$1(l.children)){if(s.kind!=="tableCell")continue;let d=Id$1(s.children);r(d,a+1);}}}};return r(e,0),n}var sS=new WeakMap;function mS(e,t){let n=sS.get(e);if(n&&n.styleCascade===t)return n;let r=e.children.find(s=>s.kind==="paragraphProperties"),o=t?mc(t,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&dp(r)?gc(r,"rPr"):void 0,l={styleCascade:t,numPr:VO(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:lt(r),inheritedMarkProps:o?o.markRunProperties:lt(i),perLevel:new WeakMap};return sS.set(e,l),l}function cp(e,t,n,r){let o=new Map;if(t.nums.size===0)return o;let a=hc(t,n),i=mb(a);for(let l of ra(e)){let s=mS(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 x=$O(c.level.indent,s.inheritedParagraphProperties,s.directProps),b=pi(s.inheritedMarkProps,c.level.runProperties,n);u={indent:x,markerStyle:De(b,n?.themeFonts)},s.perLevel.set(c.level,u);}let{indent:f,markerStyle:m}=u,p=mi(c.markerText,m.fontFamily,r),g=ne([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,Wy(c.level),p,WO(m)].map(String)),y={numId:c.numId,ilvl:c.ilvl,abstractNumId:c.abstractNumId,numFmt:c.level.numFmt,markerText:p,...c.level.numFmt==="bullet"?{}:{ordinal:c.counters[c.ilvl]??1},markerAlign:c.level.lvlJc,suffix:c.level.suff,indent:f,markerStyle:m,cacheToken:g};vd(y,cl(c.level)),uS.set(y,{index:a,numId:c.numId,ilvl:c.ilvl,expandCounters:hb(c)}),o.set(l.id,y);}return o}var gS=new WeakMap,hS=new WeakMap;function dS(e,t,n){let r=n?hS.get(n):gS.get(t);if(r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable)return r}function KO(e,t,n){t?hS.set(t,n):gS.set(e,n);}function yS(e,t,n){if(e.listItems===void 0){let i=dS(e,t,n);if(i&&n===void 0)return {...e,numberingIndex:i.linkedIndex,...i.listItems?{listItems:i.listItems}:{}}}let r=e.listItems===void 0?dS(e,t,n):void 0,o=r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable?r.linkedIndex:hc(e.numberingIndex??fb,e.styleCascade),a=e.listItems??(o.nums.size>0?qO(t,e.numberingIndex,o,e.styleCascade,e.isFontAvailable,n):void 0);return e.listItems===void 0&&KO(t,n,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:o,listItems:a}),{...e,numberingIndex:o,...a?{listItems:a}:{}}}function hi(e,t){return yS(e,t,void 0)}function bS(e,t,n){return yS(e,t,n)}var cS=new WeakMap,XO=Object.freeze([]);function YO(e,t){let n=cS.get(e);if(n&&n.styleCascade===t)return n.numbered;let r=ra([e]).filter(a=>mS(a,t).numPr!==null),o=r.length>0?r:XO;return cS.set(e,{styleCascade:t,numbered:o}),o}var gi=new WeakMap,lp=new WeakMap;function UO(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 qO(e,t,n,r,o,a){let i=e[0],l=e[e.length-1],s=a?lp.get(a):(i?gi.get(i):void 0)??(l?gi.get(l):void 0);if((a?zO(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 p=0;p<e.length;p+=1){let g=e[p],y=s&&s.blocks[p]===g?s.numberedByBlock[p]:YO(g,r);c[p]=y,u&&!UO(y,s.numberedByBlock[p])&&(u=false);}if(s&&u){let p={...s,blocks:e,numberedByBlock:c};return a?lp.set(a,p):(i&&gi.set(i,p),l&&l!==i&&gi.set(l,p)),s.listItems}let f=cp(e,n,r,o),m={rawIndex:t,styleCascade:r,isFontAvailable:o,blocks:e,numberedByBlock:c,listItems:f};return a?lp.set(a,m):(i&&gi.set(i,m),l&&l!==i&&gi.set(l,m)),f}function up(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 ZO(e,t,n=Pl,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=t.measure(e.markerText,e.markerStyle),a=up(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:ei(n,l,r).positionPt-i}function xS(e,t,n,r,o){return e?ZO(e,n,r,o===void 0?void 0:t.left+o):t.hanging>0?-t.hanging:t.firstLine}function Dj(e,t,n){return yi(e,t,()=>n)}function yi(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:$n(s.numFmt,d),displayNumber:d});}return r}function JO(e){let t=new Map;for(let n of e)t.set(n.noteId,n.mark);return t}var QO=["top","left","bottom","right"];function fp(e,t){if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes??[])if(n.localName===t)return n.value}}function Nl(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 yc(e){let t=Zr(e);if(!(!t||!Kb(t.val)))return t}function eC(e){return e==="firstPage"||e==="notFirstPage"?e:"allPages"}function SS(e){let t=Nl(e,"pgBorders");if(!t)return;let n=yc(Nl(t,"top")),r=yc(Nl(t,"left")),o=yc(Nl(t,"bottom")),a=yc(Nl(t,"right"));if(!(!n&&!r&&!o&&!a))return {offsetFrom:fp(t,"offsetFrom")==="page"?"page":"text",display:eC(fp(t,"display")),zOrder:fp(t,"zOrder")==="back"?"back":"front",...n?{top:n}:{},...r?{left:r}:{},...o?{bottom:o}:{},...a?{right:a}:{}}}function bc(e){if(!e)return "";let t=[e.offsetFrom,e.display,e.zOrder];for(let n of QO){let r=e[n];r&&t.push(`${n}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt}`);}return t.join(",")}var pp=4096,Ln=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 gp(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 oa(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 hp(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 st=(e,t)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes??[])if(n.localName===t)return n.value}},ro=(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 PS(e,t,n){let r=st(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 tC(e){if(!e)return 1;let t=st(e,"num");return !t||!/^\d{1,7}$/.test(t)?1:Math.max(1,Math.min(12,Number(t)))}function nC(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:gp(st(o,"w"),1,31680),gapTwips:a===t-1?0:hp(st(o,"space"),n)});}return r}function rC(e){let t=e?ro(e,"type"):void 0,n=t?st(t,"val"):void 0;return n==="continuous"||n==="evenPage"||n==="oddPage"||n==="nextColumn"?n:"nextPage"}var oC=new Set(["hyphen","period","colon","emDash","enDash"]);function aC(e){let t=ro(e,"pgNumType");if(!t||t.kind==="textValue")return;let n={},r=st(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=st(t,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(n.fmt=o);let a=st(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=st(t,"chapSep");return i!==void 0&&oC.has(i)&&(n.chapSep=i),n}var RS=new WeakMap;function mp(e){if(!e)return Ln;let t=RS.get(e);if(t!==void 0)return t;let n=iC(e);return RS.set(e,n),n}function iC(e){let t=ro(e,"pgSz"),n=ro(e,"pgMar"),r=ro(e,"cols"),o=Ln,a=ro(e,"docGrid"),i=a?st(a,"type"):void 0,l=a?hp(st(a,"linePitch"),0):0,s=t?st(t,"orient"):void 0,d=t?gp(st(t,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,c=t?gp(st(t,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,u=aC(e),f=SS(e),m=tC(r),p=r?hp(st(r,"space"),o.columns.gapTwips):o.columns.gapTwips,g=r?PS(r,"equalWidth",true):true;return {...(i==="lines"||i==="linesAndChars")&&l>0?{gridLinePitchTwips:l}:{},pageSize:{widthTwips:d,heightTwips:c},margins:{topTwips:n?oa(st(n,"top"),1440):o.margins.topTwips,rightTwips:n?oa(st(n,"right"),1440):o.margins.rightTwips,bottomTwips:n?oa(st(n,"bottom"),1440):o.margins.bottomTwips,leftTwips:n?oa(st(n,"left"),1440):o.margins.leftTwips,headerTwips:n?oa(st(n,"header"),720):o.margins.headerTwips,footerTwips:n?oa(st(n,"footer"),720):o.margins.footerTwips,gutterTwips:n?oa(st(n,"gutter"),0):o.margins.gutterTwips},columns:{count:m,gapTwips:p,equalWidth:g,separator:r?PS(r,"sep",false):false,definitions:g?[]:nC(r,m,p)},landscape:s==="landscape"||d>c,titlePage:pa$1(e,"titlePg"),breakType:rC(e),...u!==void 0?{pageNumbering:u}:{},...f!==void 0?{pageBorders:f}:{}}}function lC(e){let t=n=>{if(n.kind!=="textValue"){if(n.kind==="body")return ro(n,"sectPr");for(let r of n.children??[]){let o=t(r);if(o)return o}}};return t(e.root)}var wS=new WeakMap;function er(e){let t=wS.get(e);if(t!==void 0)return t??void 0;let n=e.children.find(a=>a.kind==="paragraphProperties"),r=n?ro(n,"sectPr"):void 0,o=r&&r.kind!=="textValue"?r:void 0;return wS.set(e,o??null),o}function Xj(e){let t=yp(e);return t[t.length-1]?.properties??Ln}function yp(e,t="all-markup",n){return bp(e,t,n).sections}function vS(e,t="all-markup",n){let r=wn(e,t,n),o=aa(e,r).sections,a=wn(e,"all-markup"),i=aa(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"&&er(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"||!er(c)?l:s.get(c.id)??l})}function bp(e,t="all-markup",n){return aa(e,wn(e,t,n))}var kS=ug$1(16);function aa(e,t){let n=kS.get(t);if(n&&n.part===e)return n.result;let r=sC(e,t);return kS.set(t,{part:e,result:r}),r}function sC(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=er(l);if(s){if(n.length>=pp){o=true;continue}n.push({index:n.length,properties:mp(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=lC(e);if(r<t.length||n.length===0){if(n.length>=pp){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:mp(a),blockStart:r,blockEndExclusive:t.length});}else if(a){if(n.length>=pp)return {sections:n,truncated:true};n.push({index:n.length,properties:mp(a),blockStart:r,blockEndExclusive:t.length});}return {sections:n,truncated:o}}function oo(e){let t=cf$1(af$1(e.pageSize.widthTwips)),n=cf$1(af$1(e.pageSize.heightTwips)),r=cf$1(af$1(e.margins.leftTwips+e.margins.gutterTwips)),o=cf$1(af$1(e.margins.rightTwips)),a=cf$1(af$1(e.margins.topTwips)),i=cf$1(af$1(e.margins.bottomTwips));return t-r-o<=0||n-a-i<=0?ld:{width:t,height:n,margin:{top:a,right:o,bottom:i,left:r},headerDistance:cf$1(af$1(Math.max(0,e.margins.headerTwips))),footerDistance:cf$1(af$1(Math.max(0,e.margins.footerTwips)))}}var IS=4096,TS=new WeakMap;function MS(e,t){let n=TS.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 TS.set(e,{sections:t,input:r}),r}function oH(e,t,n){let r=Lf$1(e),o=Mf$1(r),a=Nf$1(r),i=Of$1(void 0,o),l=Pf$1(void 0,a),s=aa(t,n).sections,d=c=>{if(c.blockStart===c.blockEndExclusive)return;let u=n[c.blockEndExclusive-1];return u?.kind==="paragraph"?er(u):void 0};return {sections:s,footnotePropsBySection:s.map(c=>Of$1(Jf$1(d(c)),o)),endnotePropsBySection:s.map(c=>Pf$1(Kf$1(d(c)),a)),documentFootnoteProps:i,documentEndnoteProps:l}}var dC=Object.freeze([]);function cC(e){for(let t of e.attributes){if(t.localName!=="customMarkFollows"||t.namespaceUri!==da$1&&t.namespaceUri!=="")continue;let n=t.value;return !(n==="0"||n==="false"||n==="off")}return false}var FS=new WeakMap;function uC(e){let t=FS.get(e);if(t)return t;let n=null;for(let o of Se(e)){let a=o.node;if(a.kind!=="noteReference")continue;let i=ld$1(a),l=id$1(a);i===null||l===null||(n??=[]).push({nodeId:a.id,noteKind:i,noteId:l,customMarkFollows:cC(a)});}let r=n===null?dC:Object.freeze(n);return FS.set(e,r),r}function fC(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function pC(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}var mC=new Map,OS=new WeakMap;function BS(e,t){let n=OS.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<IS;f+=1){for(;s<t.sections.length-1&&f>=t.sections[s].blockEndExclusive;)s+=1;let m=t.sections.length>0?s:0;for(let p of ra([e[f]]))for(let g of uC(p)){if(l>=IS)break;l+=1;let y={noteId:g.noteId,sectionIndex:m,customMarkFollows:g.customMarkFollows};g.noteKind==="footnote"?(r.push(y),o.push(g.nodeId)):(a.push(y),i.push(g.nodeId));}}let d=null,c=(f,m,p,g)=>{if(m.length===0||(f==="footnote"?t.footnotePropsBySection.length>0?t.footnotePropsBySection:[t.documentFootnoteProps]:t.endnotePropsBySection.length>0?t.endnotePropsBySection:[t.documentEndnoteProps]).some(b=>b.numRestart==="eachPage"))return;let x=yi(f,m,g);for(let b=0;b<x.length;b+=1){let h=x[b].mark,v=p[b];h!==null&&h.length>0&&v!==void 0&&(d??=new Map).set(v,h);}};c("footnote",r,o,f=>fC(t,f)),c("endnote",a,i,f=>pC(t,f));let u=d??mC;return OS.set(e,{input:t,index:u}),u}function xp(e,t){for(let n of e.attributes)if(n.namespaceUri===da$1&&n.localName===t)return n.value}var CS=new WeakMap;function LS(e,t){let n=CS.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,l=null,s=wr(),d=(c,u,f)=>{if(a||c.kind==="textValue"||f>=la$1||s.exhausted||u>Wt)return;if(c.kind==="bookmarkStart"){!o&&xp(c,"name")===t&&(o=true,i=xp(c,"id"));return}if(c.kind==="bookmarkEnd"){o&&i!==void 0&&xp(c,"id")===i&&(a=true);return}if(o&&c.kind==="noteReference"){l=c.id,a=true;return}if(!ut(s))return;let m=ma$1(c,f);for(let p of c.children)d(p,u+1,m);};for(let c of e.children){if(a||!ut(s))break;d(c,1,0);}return n||(n=new Map,CS.set(e,n)),n.set(t,l),l}var gC=512,hC=2048,ES=4096,zS=Object.freeze([]),WS=Object.freeze([]),yC=Object.freeze({fields:WS,bookmarks:zS});function Sp(e){return e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}var NS=new WeakMap;function bC(e){let t=NS.get(e);if(t)return t;let n=null,r=null,o=wr(),a=Do(),i=null,l=null,s=xn,d=xn,c=()=>{if(a.nesting!==1||a.phase!=="instruction"||a.nestingOverflow)return;let p=$a(a);if(p.overflow||l===null)return;let g=$r(p.instruction);if(g){i={spec:g,autonum:null,anchorId:l,cached:"",revisions:d};return}let y=Vo(p.instruction);y&&(i={spec:null,autonum:y,anchorId:l,cached:"",revisions:d});},u=()=>{i&&((n??=[]).push({spec:i.spec,autonum:i.autonum,anchorId:i.anchorId,cached:Sp(i.cached),revisions:i.revisions}),i=null);},f=(p,g,y)=>{if(p.kind==="textValue"||y>=la$1||o.exhausted||g>Wt)return;if(p.kind==="bookmarkStart"){let b=dl(p,"name");b!==void 0&&b.length>0&&b.length<=ll&&(r??=[]).push(b);return}if(p.kind==="run"){for(let b of p.children){if(!ut(o))return;if(b.kind!=="runProperties"){if(Ft(b,"begin")){_o(a),a.nesting===1&&(l=b.id,d=s,i=null);continue}if(Rr(b)){jo(a,b,o,g+1);continue}if(Ft(b,"separate")){c(),Ho(a);continue}if(Ft(b,"end")){let h=a.nesting===1;c(),zo(a),h&&u();continue}if(i&&a.nesting===1&&a.phase==="result")if(b.kind==="text")for(let h of b.children)h.kind==="textValue"&&i.cached.length<Go&&(i.cached+=h.value.slice(0,Go-i.cached.length));else b.kind==="tab"&&i.cached.length<Go&&(i.cached+=" ");}}return}if(fe$1(p)){let b=he(p)??"",h=$r(b),v=h===null?Vo(b):null;(h||v)&&(n??=[]).push({spec:h,autonum:v,anchorId:p.id,cached:Sp(_y(p,o)),revisions:s});return}if(yf(p)||!ut(o))return;if(zt(p)){let b=Xt(p);if(b){let h=s;s=en(h,b);let v=ma$1(p,y);for(let R of p.children)f(R,g+1,v);s=h;return}}let x=ma$1(p,y);for(let b of p.children)f(b,g+1,x);};for(let p of e.children){if(!ut(o))break;f(p,1,0);}let m=n===null&&r===null?yC:Object.freeze({fields:n??WS,bookmarks:r??zS});return NS.set(e,m),m}var xC=Object.freeze({fieldsByParagraph:null,bookmarkOwners:null}),AS=new WeakMap;function SC(e){let t=AS.get(e);if(t)return t;let n=null,r=null;for(let a of ra([e])){let i=bC(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<hC&&r.set(l,a);}let o=n===null&&r===null?xC:Object.freeze({fieldsByParagraph:n,bookmarkOwners:r});return AS.set(e,o),o}var xc=new WeakMap;function PC(e){let t=e[0],n=e[e.length-1],r=(t?xc.get(t):void 0)??(n?xc.get(n):void 0)??new Map;return t&&xc.set(t,r),n&&xc.set(n,r),r}var Sc=new WeakMap;function RC(e){let t=e[0],n=e[e.length-1],r=(t?Sc.get(t):void 0)??(n?Sc.get(n):void 0)??new Map;return t&&Sc.set(t,r),n&&Sc.set(n,r),r}function DS(e){return e.length>1&&e.endsWith(".")?e.slice(0,-1):e}var _S=new WeakMap;function jS(e,t=je,n){if(!e)return [];let r=`${t}|${n?.cacheKey??""}`,o=_S.get(e),a=o?.get(r);if(a)return a;let i=[];for(let l of td$1(e.root)){if(i.length>=rd$1)break;if(!kd$1(l))continue;let s=Al(l,t,n);s.length>0&&i.push(s);}return o?Xr(o,r,i):_S.set(e,new Map([[r,i]])),i}var HS=new WeakMap;function wC(e,t,n,r,o,a){let i=new Map,l=[],s=0,d=k=>{for(let I of k){let T=SC(I);if(l.push(T),!!T.fieldsByParagraph)for(let[S,F]of T.fieldsByParagraph){if(s>=gC)break;i.set(S,F),s+=F.length;}}};if(d(e),n){for(let k of jS(n.footnotesPart,o,a))d(k);for(let k of jS(n.endnotesPart,o,a))d(k);}if(i.size===0)return null;let c=new Set;for(let k of i.values())for(let I of k)I.spec&&c.add(I.spec.bookmark);let u=new Map;for(let k of l)if(k.bookmarkOwners)for(let[I,T]of k.bookmarkOwners)c.has(I)&&!u.has(I)&&u.set(I,T);let f=new Map,m=new Map,p=new Map;for(let[k,I]of i)for(let T of I){if(!T.autonum||!Ee(T.revisions,o,a))continue;let S=(p.get(T.autonum.kind)??0)+1;p.set(T.autonum.kind,S);let F=Ty(T.autonum,S);F.length!==0&&(f.set(T.anchorId,F),m.has(k)||m.set(k,F));}let g=k=>{let I=Cn(k);if(I.pageRef)return null;let T=u.get(k.bookmark);if(!T)return null;if(I.noteRef){if(r===void 0)return null;let F=LS(T,k.bookmark);return F===null?null:BS(e,r).get(F)??null}if(k.numberSwitch!==null){let F=t?.get(T.id);if(!F){if(I.suppressNonDelimiterText)return null;let D=m.get(T.id);return D!==void 0?DS(D):null}let C=fS(F),E=C!==void 0?yb(C,k.numberSwitch==="n",I.suppressNonDelimiterText):null,H=!I.suppressNonDelimiterText&&F.numFmt!=="bullet"&&F.numFmt!=="none"&&F.markerText.length>0?F.markerText:null,A=E??H;return A===null?null:DS(A)}if(I.suppressNonDelimiterText)return null;let S=jy(T,k.bookmark);return S.length>0?S:null},y=new Map,x=k=>{let I=Cn(k),T=`${I.suppressNonDelimiterText?"t":""}${I.noteRef?"x":""}`,S=`${k.numberSwitch??"-"}${T}\0${k.bookmark}`;if(y.has(S))return y.get(S)??null;let F=g(k);return y.set(S,F),F},b=PC(e),h=RC(e),v=new Map,R=new Map,P=new Map,O=[];for(let[k,I]of i){let T=[];for(let F of I){if(F.spec===null){let A=F.autonum?f.get(F.anchorId)??null:null;T.push(A!==null?`a${A}`:`c${F.cached}`);continue}if(Cn(F.spec).pageRef){let A=u.get(F.spec.bookmark);if(A){let D=h.get(F.anchorId);D===void 0&&h.size<ES&&(D=Object.freeze({}),h.set(F.anchorId,D)),D!==void 0&&R.set(F.anchorId,{spec:F.spec,projection:{targetParagraphId:A.id,cached:F.cached,calibration:D}});}T.push(`c${F.cached}${A?.id??""}`);continue}let C=x(F.spec),E=b.get(F.anchorId);E===void 0&&(E=F.cached.length===0||C!==null&&Sp(C)===F.cached,F.cached.length>0&&b.size<ES&&b.set(F.anchorId,E));let H=E?C:null;v.set(F.anchorId,{spec:F.spec,live:H}),T.push(H!==null?`l${H}`:`c${F.cached}`);}let S=T.join("");P.set(k,S),O.push(k,S);}return {valuesToken:ne(O),tokenForParagraph:k=>P.get(k)??"",liveValueOf:(k,I)=>{let T=v.get(k);return !T||T.live===null||T.spec.bookmark!==I.bookmark||T.spec.numberSwitch!==I.numberSwitch||Cn(T.spec)!==Cn(I)?null:T.live},autonumValueOf:k=>f.get(k)??null,pageRefProjectionOf:(k,I)=>{let T=R.get(k);return !T||T.spec.bookmark!==I.bookmark||Cn(T.spec)!==Cn(I)?null:T.projection}}}function SH(e,t,n){return Pp(e,t,n,void 0)}function Pp(e,t,n,r,o=je,a){let i=n?.footnotesPart??null,l=n?.endnotesPart??null,s=HS.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=wC(e,t,n,r,o,a);return HS.set(e,{listItems:t,footnotesPart:i,endnotesPart:l,noteNumbering:r,displayMode:o,authorFilterKey:a?.cacheKey??"",context:d}),d}function VS(e,t){let n=[];for(let r of ra([e])){let o=t.tokenForParagraph(r.id);o&&n.push(o);}return n.join(";")}var ao=61440,Dl=61695,Rp=128;function bi(e){return e.kind==="generic"&&e.namespaceUri===da$1&&e.localName==="sym"}function GS(e,t){if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes)if(n.localName===t&&(n.namespaceUri===da$1||n.namespaceUri===""))return n.value}}function kC(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function Pc(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 xi(e){if(!bi(e))return null;let t=kC(GS(e,"char"));if(t===null)return null;let n=GS(e,"font"),r=n&&n.length<=Rp?n:null,o=na(r),a=o&&t<=255&&t+ao<=Dl?t+ao:t;if(o&&a>=ao&&a<=Dl){let i=mi(String.fromCodePoint(a),r),l=i.codePointAt(0)<ao;return {text:i,font:r,unicode:l}}return Pc(t)?{text:String.fromCodePoint(t),font:r,unicode:t<57344||t>63743}:null}function wp(e,t,n){if(!t.font)return {props:e,style:De(e,n)};let r=[...e,{localName:"rFonts",attributes:{ascii:t.font,hAnsi:t.font,eastAsia:t.font,hint:"default"}}];return {props:r,style:De(r,n)}}var vC=256,IC=9;function TC(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 FC(e){if(e.quoted)return null;let t=e.value;if(t.length===0||t.length>IC)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 Rc(e){if(e.length===0||e.length>vC)return null;let t=TC(e);if(t.length<2)return null;let n=t[0];if(n.quoted||n.value.toUpperCase()!=="SYMBOL")return null;let r=FC(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<=Rp&&(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 wc(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=De(o,n);if(e.unicode)return Pc(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(na(i)){let l=e.code<=255&&e.code+ao<=Dl?e.code+ao:e.code;if(l>=ao&&l<=Dl)return {text:mi(String.fromCodePoint(l),i),props:o,style:a}}return Pc(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function kc(e,t){if(!Number.isFinite(e)||e<0||t.length===0||t.length>64||t.includes(".")||t.includes(";")||t.includes("'"))return null;let n=String(Math.floor(e)),r=[],o=false;for(let p=0;p<t.length;p+=1)r.push(o),t[p]==="0"&&(o=true);let a=n.length,i=false,l=0,s=0,d=[],c=-1;for(let p=t.length-1;p>=0;p-=1){let g=t[p];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[p])&&(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(""),m=d.slice(0,c+1).reverse().join("");return f+u.reverse().join("")+m}function En(e){return "outOfFlow"in e&&e.outOfFlow===true}var Si="0";function io(e,t){return e!=="PAGE"||!t||t==="decimal"}function vc(e,t,n){return t===void 0||!io(e,n)?Si:kc(0,t)??Si}function Ip(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 Wo(n);let o=$n(r,n);return o.length>0?o:Wo(n)}function Ir(e,t,n){if(e==="PAGE"){if(n!==void 0&&io(e,t.format)){let o=kc(t.pageNumber,n);if(o!==null)return o}return Ip(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=kc(r,n);if(o!==null)return o}return Wo(Math.floor(r))}function lo(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function Tp(e,t=uf){if(!e||!lo(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 Ri(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 OC(e){for(let t of e.spans)if(t.fieldAtom?.pageField||t.fieldAtom?.pageRef)return true;return false}function KS(e){if(e.kind==="paragraph"){for(let t of e.lines)if(OC(t))return true;return false}for(let t of e.rows)for(let n of t.cells)for(let r of n.blocks)if(KS(r))return true;return false}function Fp(e,t){let n=t,r=false;for(let o of e)En(o)||(n=Math.max(n,o.box.y+o.box.height)),!r&&KS(o)&&(r=true);return {usedBottom:n,hasBodyPageFields:r}}var kp=new WeakMap;function CC(e,t,n,r){let o=kp.get(e);if(o)return t.length>0&&n!==t&&o.revision===r?(kp.delete(e),false):true;let a=t.length===0||t===n;return a&&Number.isFinite(r)&&kp.set(e,{revision:r}),a}function XS(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)XS(o,t);}function YS(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)YS(i,t,n,r);}var $S=new WeakMap;function US(e){let t=$S.get(e);if(t!==void 0)return t;let n=MC(e);return $S.set(e,n),n}function MC(e){let t=null;for(let o of e)if(o.hasBodyPageFields!==false)for(let a of o.fragments)XS(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)YS(l,t,i,n);}let r="";for(let[o,a]of n)r+=`${o}@${a.pageNumber}/${a.format??""};`;return {hosts:n,token:r}}function Op(e){return US(e)?.token??""}function BC(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=Ip(d.pageNumber,d.format);if(c.length===0)continue;let f=CC(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=Ir(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 qS(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=BC(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],m=qS(f.blocks,t,n);m!==f.blocks&&(c||(c=d.cells.slice()),c[u]={...f,blocks:m});}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 Pi=new WeakMap;function DH(e){for(let t of Array.isArray(e.pages)?e.pages:[])t.header&&Pi.delete(t.header),t.footer&&Pi.delete(t.footer);}function LC(e,t){return e.pageNumber===t.pageNumber&&e.pageCount===t.pageCount&&(e.sectionPageCount??e.pageCount)===(t.sectionPageCount??t.pageCount)&&e.format===t.format}function Cp(e,t,n){let r=Pi.get(e);r&&Pi.set(t,{context:r.context,projector:r.projector,dy:r.dy+n});}var vp=new WeakMap;function so(e){let t=e.pages.length;if(t===0)return e;let n=US(e.pages),r=n?.token??"",o=false,a=e.pages.map(i=>{let l=vp.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 y=g.pageFieldProjector,x=0;if(!y){let O=Pi.get(g);if(!O||LC(O.context,d))return g;y=O.projector,x=O.dy;}o=true;let b=y(d),{pageFieldProjector:h,box:v,...R}=b,P={...R,box:x===0?v:{...v,y:v.y+x}};return Pi.set(P,{context:d,projector:y,dy:x}),P},u=c(i.header),f=c(i.footer),m=i.hasBodyPageFields===false?i.fragments:qS(i.fragments,d,n?{hosts:n.hosts,revision:e.revision}:void 0);if(u===i.header&&f===i.footer&&m===i.fragments)return vp.set(i,{pageCount:t,pageRefToken:r,result:i}),i;m!==i.fragments&&(o=true);let p={...i,...u!==void 0?{header:u}:{},...f!==void 0?{footer:f}:{},...m!==i.fragments?{fragments:m}:{}};return vp.set(i,{pageCount:t,pageRefToken:r,result:p}),p});return o?{...e,pages:a}:e}function Ic(){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)?Ir(e.kind,i,e.picture):"";return o(),l?d:null},reset:o,noteResult(a){n=true,a&&(r=true);}}}function EC(e){let{simple:t,depth:n,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:l,cascadeRuns:s,themeFonts:d}=e,c="",u,f,m=false,p=Do(),g=Ic(),y=(b,h)=>{u||(u=b,f=h);},x=(b,h,v)=>{if(!(b.kind==="textValue"||h>Wt)){for(let R of b.children)if(R.kind!=="textValue"){if(!ut(o))return;if(R.kind==="run"){let P=kr(R,l,s),O=De(P,d);for(let k of R.children){if(k.kind==="runProperties")continue;if(Ft(k,"begin")){_o(p),p.nesting===1&&g.reset();continue}if(Rr(k)){jo(p,k,o,h+1);continue}if(Ft(k,"separate")){let C=p.nesting,E=p.phase,H=Ho(p);(C===1||E==="result"&&!p.nestingOverflow)&&g.onSeparate(r?H:null,C);continue}if(Ft(k,"end")){let C=g.onEnd(p.nesting,r);C!==null&&(c+=C),zo(p);continue}if(ke(k))continue;if(bi(k)){if(Ee(v,i,e.authorFilter)&&(m=true),g.active){g.noteResult(!O.hidden&&Ee(v,i,e.authorFilter));continue}let C=xi(k);if(!C?.unicode||O.hidden||!Ee(v,i,e.authorFilter))continue;y(P,O),c+=C.text;continue}let I=sl(k);if(I.length===0)continue;let T=Gn(v),S=!Ee(v,i,e.authorFilter)||k.kind==="deletedText"&&!T;S||(m=true);let F=O.hidden||S;if(g.active){g.noteResult(!F),F||y(P,O);continue}F||(y(P,O),c+=I);}continue}if(fe$1(R)){let P=g.active?null:Ga(he(R)??"");if(P&&r){if(!Ee(v,i,e.authorFilter))continue;let O=c.length;x(R,h+1,v),c=c.slice(0,O),c+=Ir(P.kind,r,P.picture);continue}x(R,h+1,v);continue}if(R.kind==="hyperlink"){x(R,h+1,v);continue}if(zt(R)&&v.length<fd){let P=Xt(R);x(R,h+1,P?en(v,P):v);continue}x(R,h+1,v);}}};return x(t,n,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:m}}function ZS(e){let t=NC(e);if(!t||e.currentLink)return t;let n=he(e.simple)??"",r=kd(n)??wd(n),o=r?e.projectFieldLink?.(r):null;return o?{...t,link:o}:t}function NC(e){let{simple:t,pageContext:n,inheritedRunProperties:r,themeFonts:o}=e,a=EC(e),i=he(t)??"",l=a.resultProps??r,s=Ga(i);if(s&&n){let m=a.resultStyle??De(r,o);return m.hidden?null:{text:Ir(s.kind,n,s.picture),props:l,style:m}}if(s&&e.bodyPageFields&&!n&&a.text.length===0&&!a.sawResultContent){let m=a.resultStyle??De(r,o);if(m.hidden)return null;let g=s.picture!==void 0&&io(s.kind,e.bodyPageFields.format)?s.picture:void 0;return {text:vc(s.kind,g,e.bodyPageFields.format),props:l,style:m,pageField:g===void 0?{kind:s.kind}:{kind:s.kind,picture:g}}}let d=Rc(i);if(d){let m=wc(d,l,o);if(m)return m.style.hidden?null:{text:m.text,props:m.props,style:m.style}}if(e.refFields){let m=$r(i);if(m){let p=e.refFields.liveValueOf(t.id,m);if(p!==null){let g=a.resultStyle??De(r,o);return g.hidden?null:{text:p,props:l,style:g}}if(e.bodyPageFields&&e.refFields.pageRefProjectionOf){let g=e.refFields.pageRefProjectionOf(t.id,m);if(g){let y=a.resultStyle??De(r,o);if(y.hidden)return null;if(a.text.length>0)return {text:a.text,props:l,style:y,pageRef:g};if(!a.sawResultContent)return {text:Si,props:l,style:y,pageRef:g}}}}else if(e.refFields.autonumValueOf&&Vo(i)){let p=e.refFields.autonumValueOf(t.id);if(p!==null){let g=a.resultStyle??De(r,o);return g.hidden?null:{text:p,props:l,style:g}}}}let c=a.text.length===0&&!a.sawResultContent;if(c){let m=Pd(i);if(m){let p=Rd(m,e.documentProperties);if(p!==null){let g=a.resultStyle??De(r,o);return g.hidden?null:{text:p,props:l,style:g}}}}let u=c?Sd(i):null;if(u){let m=a.resultStyle??De(r,o);return m.hidden?null:{text:u.display,props:l,style:m}}if(a.text.length===0)return null;let f=a.resultStyle??De(r,o);return f.hidden?null:{text:a.text,props:l,style:f}}var AC="\u2612",DC="\u2610";function _C(e){let t=Ao(e);return t==="FORMCHECKBOX"?"checkbox":t==="FORMDROPDOWN"?"dropdown":null}function _l(e,t){e.symbolSpec=Rc(t),!e.symbolSpec&&(e.linkSpec=kd(t),!e.linkSpec&&(e.formSpec=_C(t),!e.formSpec&&(e.buttonSpec=Sd(t),!e.buttonSpec&&(e.docPropertySpec=Pd(t),!e.docPropertySpec&&(e.linkSpec=wd(t),e.refSpec=$r(t),!e.refSpec&&(e.autonumSpec=Vo(t)))))));}function mz(e,t){if(t.allowPageFields&&t.hasSeparate&&Gr(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return _l(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!Cn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null||n.formSpec!==null&&t.hasLegacyFormData}function gz(e,t){if(t.allowPageFields&&Gr(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return _l(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!Cn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null}function JS(e){if(e.formSpec==="dropdown"&&e.formData?.kind==="dropdown")return {...e.formData,...e.formAccessibleName?{accessibleName:e.formAccessibleName}:{}};if(!(e.formSpec!=="checkbox"||e.formData?.kind!=="checkbox"))return {kind:"checkbox",checked:e.formData.checked,...e.formAccessibleName?{accessibleName:e.formAccessibleName}:{}}}function QS(e,t){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let n=e.formData.checked?AC:DC;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:De(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===void 0?null:{text:n||"\xA0",props:e.props,style:e.style}}return null}function eP(e,t){if(e.symbolSpec){let r=wc(e.symbolSpec,e.props,t.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let n=QS(e,t.themeFonts);if(n)return {text:n.text,props:n.props,style:n.style};if(e.kind&&t.pageContext)return {text:Ir(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:Si,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&&io(e.kind,t.bodyPageFields.format)?e.picture:void 0;return {text:vc(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=Rd(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 jC(e,t,n,r){r.length===0||n<=t||e.push({start:t,end:n,revisions:r});}function tP(e,t,n){return e?(r,o,a)=>jC(e,r,o,al(a,t,n)):()=>{}}function Bp(e){return e.capturedResultRevisions?{revisionsOverride:e.resultRevisions,formatSiteOverride:e.resultFormatSite}:{}}function nP(e,t){return t?{...e,changeSites:[...e.changeSites??[],t]}:e}function co(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 HC=new Set(["left","center","right"]),zC=new Set(["margin","indent","leftMargin"]),WC=new Set(["dot","hyphen","underscore","middleDot"]);function Lp(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==da$1)return null;let t="left",n="margin",r;for(let o of e.attributes)o.namespaceUri===da$1&&(o.localName==="alignment"?t=o.value:o.localName==="relativeTo"?n=o.value:o.localName==="leader"&&(r=o.value));return {alignment:HC.has(t)?t:"left",relativeTo:zC.has(n)?n:"margin",...r!==void 0&&WC.has(r)?{leader:r}:{}}}function Mp(e,t,n,r){return {...e,text:e.text.slice(t,n),start:e.start+t,end:e.start+n,...r?{fontSlot:r}:{}}}function Ep(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(Gh(c.props)&&!na(c.style.fontFamily)&&!$h(c.props,c.style.fontFamilyEastAsia,t)));}let a=qh(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 p=0;for(let g of u)g.from>p&&l.push(Mp(c,p,g.from,void 0)),l.push(Mp(c,g.from,g.to,"eastAsia")),p=g.to;p<c.text.length&&l.push(Mp(c,p,c.text.length,void 0));}return l}function rP(e){return e.kind==="drawing"||ib$1(e)||Ta(e)}function oP(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=Gn(r),l=e.hiddenRun||!Ee(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 aP(e){if(e.kind==="textValue")return;let t=e.children.slice(0,256).find(r=>r.kind!=="textValue"&&r.namespaceUri===da$1&&r.localName==="ffData");if(!t||t.kind==="textValue"||t.children.length>256||!t.children.some(r=>r.kind!=="textValue"&&r.namespaceUri===da$1&&(r.localName==="checkBox"||r.localName==="ddList"))||t.children.some(r=>r.kind!=="textValue"&&r.namespaceUri===da$1&&(r.localName==="entryMacro"||r.localName==="exitMacro")))return;let n=t.children.find(r=>r.kind!=="textValue"&&r.namespaceUri===da$1&&r.localName==="name");if(!(!n||n.kind==="textValue"))return n.attributes.slice(0,64).find(r=>r.localName==="val"&&(r.namespaceUri===da$1||r.namespaceUri===""))?.value.slice(0,256).replace(/[\u0000-\u001f\u007f\u202a-\u202e\u2066-\u2069]/g,"").trim()||void 0}function iP(e){let t=re(e,{maxNesting:qe,maxInstructionChars:pe}),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 wi(e,t){return _c$1(e,t)}function sP(e,t){if(!pd$1(e))return null;if(fd$1(e)||gd$1(e))return {text:"",projected:true,kind:null,noteId:null};let n=dd$1(e),r=ld$1(e)??md$1(e);if(!r)return null;let o=id$1(e),a=o!==null?wi(r,o):n?void 0:t?.activeNoteKey,i=o!==null?o:a?VC(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&&nd$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 VC(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 dP(e){return dd$1(e)||ed$1(e)||fd$1(e)||gd$1(e)}function GC(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 lP=new WeakMap;function cP(e){if(!e)return "";let t=lP.get(e);if(t!==void 0)return t;let n=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${GC(n)}`;return lP.set(e,r),r}function cc(e,t=[],n,r,o,a,i=je,l,s,d,c,u,f=false,m,p,g=false,y,x,b){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let h=tP(b,i,p),v=null,R=[],P=0;r=By(r,g?void 0:x,()=>C?.atomic?C.atomStart:P);let O,{atomBeginIds:k,editableResultBeginIds:I,coveredIds:T}=iP(e),S=Do(),F=wr(),C=null,E=null,H=Ic(),A=xn,D=(K,Q,w,N,J,$,W)=>{if(K.length===0&&!N&&!W?.inlineDrawing)return;let q=W?.linkOverride??O,X=pd(W?.revisionsOverride??A,Q,i,p);if(X===null)return;let ae=nP(X,W?.revisionsOverride?W.formatSiteOverride??null:v),re=q?{link:q}:{};if(N){R.push({text:K,...ae,style:w,start:J,end:$,projected:true,...W?.measureText!==void 0?{measureText:W.measureText}:{},...W?.noteNav?{noteNav:W.noteNav}:{},...W?.inlineDrawing?{inlineDrawing:W.inlineDrawing}:{},...W?.anchoredAtom?{anchoredAtom:true}:{},...W?.equation?{equation:W.equation}:{},...W?.fieldAtom?{fieldAtom:W.fieldAtom}:{},...re});return}K.length!==0&&R.push({text:K,...ae,style:w,start:J,end:$,...W?.positionalTab?{positionalTab:W.positionalTab}:{},...W?.breakKind?{breakKind:W.breakKind}:{},...re});},B=()=>{if(!C||!C.atomic){C=null,E=null;return}let K=C.atomStart,Q=K+1;if(C.style.hidden){C=null,E=null;return}if(!Ee(C.resultRevisions,i,p)){l&&Gn(C.resultRevisions)&&co(l,K,Q),h(K,Q,C.resultRevisions),C=null,E=null;return}let{resultLink:w,linkSpec:N,formField:J}=C,$=Bp(C),W=JS(C),q,X=()=>{if(q)return q;let re=!w&&N?c?.(N)??null:null,he=w??re;return q={...$,...he?{linkOverride:he}:{},fieldAtom:{formField:J,...W?{formControl:W}:{}}},q},ae=eP(C,{pageContext:n,themeFonts:d,documentProperties:u,bodyPageFields:f,...m?{refFields:m}:{}});if(ae){let re=X(),he=ae.pageField||ae.pageRefField?{...re,fieldAtom:{formField:C.formField,...ae.pageField?{pageField:ae.pageField}:{},...ae.pageRefField?{pageRef:ae.pageRefField}:{}}}:re;D(ae.text,ae.props,ae.style,true,K,Q,he);}C=null,E=null;},j=()=>{if(!C)return;let K=!C.resultLink&&C.linkSpec?c?.(C.linkSpec)??null:null,Q=w=>K&&!w.link?{...w,link:K}:w;if(C.atomic){P=C.atomStart;for(let w of C.buffered)R.push({...Q(w),start:P,end:P+(w.end-w.start)}),P+=w.end-w.start;C.cachedText.length>0&&C.buffered.length===0&&(D(C.cachedText,C.props,C.style,false,P,P+C.cachedText.length,{...Bp(C),...K?{linkOverride:K}:{}}),P+=C.cachedText.length);}else {for(let w of C.buffered)R.push(Q(w));P=C.bufferOffset;}C=null,E=null;},V=(K,Q,w)=>{if(rP(K)){let X=P;P+=1;let ae=P;if(!s)return;let re=oP({node:K,layout:s,hiddenRun:w.hidden,revisions:A,displayMode:i,authorFilter:p});re.recordDeleted&&l&&co(l,X,ae),re.emit||h(X,ae,A),re.emit&&D("\uFFFC",Q,w,true,X,ae,re.extras);return}if(dP(K)){let X=sP(K,a),ae=P,re=ae+1;if(P=re,w.hidden||!X||X.text.length===0&&!X.measureText)return;let he=X.scopeId&&X.nav?{scopeId:X.scopeId,direction:X.nav}:void 0;D(X.text.length>0?X.text:X.measureText??"",Q,w,true,ae,re,{...X.measureText!==void 0?{measureText:X.measureText}:{},...he?{noteNav:he}:{}});return}let N=Lp(K);if(N){w.hidden||D(" ",Q,w,false,P,P,{positionalTab:N});return}if(bi(K)){let X=xi(K);if(!X||w.hidden||!Ee(A,i,p))return;let ae=wp(Q,X,d);D(X.text,ae.props,ae.style,true,P,P);return}let J=sl(K);if(J.length===0)return;let $=Gn(A),W=!Ee(A,i,p),q=w.hidden||W||K.kind==="deletedText"&&!$;W&&!w.hidden&&h(P,P+J.length,A),q||D(J,Q,w,false,P,P+J.length,{...K.kind==="hardBreak"?{breakKind:Vd$1(K)}:{}}),$&&l&&co(l,P,P+J.length),P+=J.length;},z=(K,Q)=>{if(K.kind!=="run")return;let w=kr(K,t,r),N=De(w,d);v=Id(K.children.find($=>$.kind==="runProperties"));let J=()=>{C&&(C.capturedResultStyle||(C.props=w,C.style=N,C.capturedResultStyle=true),C.capturedResultRevisions||(C.resultRevisions=A,C.resultFormatSite=v,C.capturedResultRevisions=true,!C.resultLink&&O&&(C.resultLink=O)));};for(let $ of K.children){if(!ut(F)){if(j(),il(S),H.reset(),$.kind==="runProperties"||Ft($,"begin")||Ft($,"separate")||Ft($,"end")||Rr($)||T.has($.id)&&E===null)continue;V($,w,N);continue}if($.kind!=="runProperties"){if(Ft($,"begin")){let W=k.has($.id);if(_o(S),S.nesting===1){j(),H.reset(),E=W?$.id:null;let q=me($);C={kind:null,picture:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null,formData:q,formAccessibleName:q?aP($):void 0,beginId:$.id,atomic:W,editableResult:I.has($.id),atomStart:P,props:w,style:N,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:P,resultRevisions:A,resultFormatSite:v,capturedResultRevisions:A.length>0,formField:le($),...O?{resultLink:O}:{}},W&&(P+=1);}continue}if(Rr($)){jo(S,$,F,Q+1);continue}if(Ft($,"separate")){let W=S.nesting===1&&S.phase==="instruction",q=S.nesting,X=Ho(S);if(W&&C){C.kind=X?.kind??null,C.picture=X?.picture??null;let ae=$a(S);!C.kind&&!ae.overflow&&!S.nestingOverflow&&_l(C,ae.instruction),C.props=w,C.style=N;}else C?.atomic&&S.phase==="result"&&!S.nestingOverflow&&H.onSeparate(n?X:null,q);continue}if(Ft($,"end")){let W=S.nesting===1;if(W&&C?.atomic&&S.phase==="instruction"){let X=$a(S);!X.overflow&&!S.nestingOverflow&&_l(C,X.instruction);}let q=H.onEnd(S.nesting,n);q!==null&&C?.atomic&&(C.cachedText+=q),zo(S),W&&(C?.atomic?B():j());continue}if(!(Ry(S)&&C?.atomic)){if(C&&wy(S)){if(bi($)){if(C.atomic){if(Ee(A,i,p)&&(C.sawResultContent=true),H.active){H.noteResult(!N.hidden&&Ee(A,i,p));continue}if(!N.hidden&&Ee(A,i,p)){let xe=xi($);xe?.unicode&&(J(),C.cachedText+=xe.text);}continue}let ce=xi($);if(!ce||N.hidden)continue;let ye=wp(w,ce,d),be=pd(A,ye.props,i,p);if(be===null)continue;C.buffered.push({text:ce.text,style:ye.style,start:P,end:P,projected:true,...be,...O?{link:O}:{},fieldAtom:{formField:C.formField}});continue}let W=C.atomic?null:Lp($),q=W?" ":sl($),X=W?0:q.length;if(q.length===0)continue;let ae=Gn(A),re=pd(A,w,i,p),he=re===null||$.kind==="deletedText"&&!ae;if(C.atomic&&!he&&(C.sawResultContent=true),re===null&&(C.atomic?h(C.atomStart,C.atomStart+1,A):h(P,P+X,A)),ae&&l&&(C.atomic?co(l,C.atomStart,C.atomStart+1):co(l,P,P+X)),he){C.atomic&&H.active&&H.noteResult(false),C.atomic||(P+=X,C.bufferOffset=P);continue}if(C.atomic){if(H.active){if(H.noteResult(!N.hidden),N.hidden)continue;J();continue}if(N.hidden)continue;J(),C.cachedText+=q;continue}if(N.hidden){P+=X,C.bufferOffset=P;continue}C.capturedResultStyle||(C.props=w,C.style=N,C.capturedResultStyle=true),C.buffered.push({text:q,style:N,start:P,end:P+X,...W?{positionalTab:W}:{},...re,...O?{link:O}:{},fieldAtom:{formField:C.formField}}),P+=X,C.bufferOffset=P;continue}T.has($.id)&&E===null&&k.size>0,V($,w,N);}}}};if(!ut(F))return Ep(g?hf(e,R,t,r,d,i,p,y):R,d);let Z=Wa$1(),U=(K,Q)=>{let w=P;if(P+=1,K.kind==="textValue")return;if(Gn(A)&&l&&co(l,w,w+1),!Ee(A,i,p)){h(w,w+1,A);return}let N=ZS({simple:K,depth:Q,pageContext:n,budget:F,revisions:A,displayMode:i,authorFilter:p,inheritedRunProperties:t,cascadeRuns:r,themeFonts:d,currentLink:O,projectFieldLink:c,documentProperties:u,bodyPageFields:f,...m?{refFields:m}:{}});N&&D(N.text,N.props,N.style,true,w,w+1,{fieldAtom:{formField:false,...N.pageField?{pageField:N.pageField}:{},...N.pageRef?{pageRef:N.pageRef}:{}},...N.link?{linkOverride:N.link}:{}});},te=(K,Q,w,N)=>{if(N>=la$1)return;let J=tc$1(K);if(J){let W=P++;Gn(A)&&l&&co(l,W,P);let q=lc(De(t,d));return !q.hidden&&!Ee(A,i,p)&&h(W,P,A),q.hidden||!Ee(A,i,p)?void 0:D("\uFFFC",t,q,true,W,P,{equation:J})}if(fe$1(K)){U(K,Q);return}if(K.kind==="run"){z(K,Q),v=null;return}if(Ed$1(K)){if(Q>Wt)return;for(let W of Hd$1(K))te(W,Q+1,w,N+1);return}if(Q>Wt)return;let $=K.kind!=="textValue"&&"localName"in K?Va$1(w,K):w;if(K.kind==="hyperlink"){let W=O;O=o?.(K)??void 0;for(let q of K.children)te(q,Q+1,$,N+1);O=W;return}if(zt(K)){let W=Xt(K);if(!W||!ut(F))return;let q=A;A=en(q,W);for(let X of K.children)te(X,Q+1,$,N+1);A=q;return}if(na$1(K))for(let W of K.children)te(W,Q+1,$,N+1);};for(let K of e.children)te(K,1,Z,0);return j(),Ep(g?hf(e,R,t,r,d,i,p,y):R,d)}function Tc(e,t=[],n,r,o,a,i=je,l,s,d,c,u,f=false,m,p){return cc(e,t,n,r,o,a,i,l,s,d,c,u,f,m,p)}function $C(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 KC(e,t,n){return !(e.kind==="paragraph"&&Fy(e,t,n))}var gP=new WeakMap;function Yr(e){return gP.get(e)??null}function hP(e,t){let n=t.children.filter(a=>uP(a)),r=e.flatMap(a=>a.children.filter(i=>!uP(i))),o={...t,children:[...n,...r]};return gP.set(o,{merged:o,members:e}),o}function uP(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function XC(e,t,n){if(t==="all-markup"&&!n)return e.map(l=>l.block);let r=[],o=[],a=null,i=()=>{r.push(...fP(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=gf(l,t,n);if((d||o.length>0)&&!qC(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(hP(c,l));}return r.push(...fP(o)),r}function fP(e){if(e.length<2)return e;let t=e[e.length-1];return [hP(e,t)]}function jl(e,t,n){let r=UC(e).map(a=>({...a,block:bf(a.block,t,n)}));return XC(r,t,n).filter(a=>KC(a,t,n))}var YC=new Set(["pPr","bookmarkStart","bookmarkEnd","proofErr","permStart","permEnd"]);function yP(e){for(let t of e.children){if(t.kind==="textValue"){if(t.value.length>0)return false;continue}if(t.namespaceUri!==da$1||!YC.has(t.localName))return false}return true}function UC(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=xd$1(i);l!==null&&o<Dd$1&&n(l,o+1,i.id);}};return n(e,0,""),t}var pP=new WeakMap;function qC(e,t,n){let r=`${t}|${n?.cacheKey??""}`,o=pP.get(e),a=o?.get(r);if(a!==void 0)return a;let i=ZC(e,t,n);return o?Xr(o,r,i):pP.set(e,new Map([[r,i]])),i}function ZC(e,t,n){if(!JC(e))return false;let r=Tc(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<=Ue(e).length}function JC(e){let t=0,n=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===da$1&&o.localName==="fldChar"){let a=o.attributes.find(i=>i.localName==="fldCharType")?.value;a==="begin"?t+=1:a==="end"&&(t-=1,t<0&&(n=true));}for(let a of o.children)r(a);}};return r(e),t===0&&!n}var mP=ug$1(16);function wn(e,t="all-markup",n){let r=`${t}|${n?.cacheKey??""}`,o=mP.get(e),a=o?.get(r);if(a)return a;let i=$C(e),l=i?jl(i.children,t,n):[];return o?Xr(o,r,l):mP.set(e,new Map([[r,l]])),l}function Al(e,t="all-markup",n){return e.kind!=="note"?[]:jl(e.children,t,n)}function Np(e,t="all-markup",n){return e.kind==="textValue"?[]:jl(e.children,t,n)}var QC="http://schemas.microsoft.com/office/word";function bP(e){if(!e||e.namespaceUri!==da$1||e.localName!=="settings")return;let t,n=false;for(let r of e.children)if(!(r.kind==="textValue"||r.namespaceUri!==da$1||r.localName!=="compat"))for(let o of r.children){if(o.kind==="textValue"||o.namespaceUri!==da$1||o.localName!=="compatSetting")continue;let a=l=>o.attributes.find(s=>s.namespaceUri===da$1&&s.localName===l)?.value;if(a("name")!=="compatibilityMode"||a("uri")!==QC)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 EW(e){let t,n,r,o,a,i,l,s,d,c,u,f,m,p,g,y,x;return {styleCascade(){let b=e.stylesRoot(),h=e.documentThemeFonts(),v=e.settingsRoot();return (f===void 0||b!==r||v!==m||h.major!==o||h.minor!==a||h.majorEastAsia!==i||h.minorEastAsia!==l||h.majorBidi!==s||h.minorBidi!==d||h.majorSupplemental!==c||h.minorSupplemental!==u)&&(r=b,o=h.major,a=h.minor,i=h.majorEastAsia,l=h.minorEastAsia,s=h.majorBidi,d=h.minorBidi,c=h.majorSupplemental,u=h.minorSupplemental,m=v,f=Jx(b,h,v)),f},defaultTabStopPt(){let b=e.settingsRoot();return (g===void 0||b!==p)&&(p=b,g=Gb(b)),g},compatibilityMode(){let b=e.settingsRoot();return b!==y&&(y=b,x=bP(b)),x},numberingIndex(){let b=e.numberingRoot();return (n===void 0||b!==t)&&(t=b,n=cb(b)),n}}}var eM={state:"none"},xP=(e,t)=>t.state==="omitted"?e:t;function Ap(e,t,n={}){return e.state==="omitted"?t:e.state==="none"?eM:e}function Dp(e,t){let n=xP;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 _p(e,t){let n=xP;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 uo(e=1048576){let t=e|0;return {intervalsRemaining:t>0?t:0}}function SP(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]=tM(e[i],o,n,r);}return a}function tM(e,t,n,r){let o=[];for(let c=0;c<e.length;c+=1){let u=e[c],f=Math.max(0,u.gridColumn|0),m=Math.min(t,f+Math.max(0,u.gridSpan|0));f>=m||(o.push({x:f,kind:1,cellIndex:c,cell:u}),o.push({x:m,kind:0,cellIndex:c,cell:u}));}if(o.length===0)return [];o.sort((c,u)=>c.x!==u.x?c.x-u.x:c.kind!==u.kind?c.kind-u.kind:c.cellIndex-u.cellIndex);let a=new Map,i,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 nM(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 jp(e,t,n,r){r&&(r.columnLookups+=1);let o=e[t];if(!o||n<0)return;let a=nM(o,n)-1;if(a<0)return;let i=o[a];if(!(n>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var oM=256,ht={state:"omitted"},Lc={state:"none"},vP={top:ht,left:ht,bottom:ht,right:ht,insideH:ht,insideV:ht},IP={top:ht,left:ht,bottom:ht,right:ht},PP={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},aM=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 ki(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Hp(e,t){return e.attributes.find(n=>n.localName===t)?.value}function iM(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function lM(e){if(e===null)return .5;let t=e/8;return !Number.isFinite(t)||t<=0?.5:t>$d?$d:t}function zp(e){if(!e)return ht;let t=Hp(e,"val");if(!t)return ht;if(t==="nil"||t==="none")return Lc;let n=aM.get(t)??"single",r=Hp(e,"color"),o=r===void 0||r==="auto"?null:Zu(r)??null;return {state:"edge",style:n,color:o,widthPt:lM(iM(Hp(e,"sz")))}}function TP(e,t){if(!e)return IP;let n={top:ht,left:ht,bottom:ht,right:ht};for(let r of t){let o=r==="left"?"start":r==="right"?"end":void 0,a=ki(e,r)??(o?ki(e,o):void 0);n[r]=zp(a);}return n}function Wp(e){let t=e&&ki(e,"tblBorders");return t?{...TP(t,["top","left","bottom","right"]),insideH:zp(ki(t,"insideH")),insideV:zp(ki(t,"insideV"))}:vP}function Vp(e){return TP(e&&ki(e,"tcBorders"),["top","left","bottom","right"])}function RP(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function wP(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 sM(e,t,n=true){if(e.state==="omitted")return t.state==="omitted"?ht:t;if(t.state==="omitted")return e;if(e.state==="none")return t.state==="none"?Lc:t;if(t.state==="none")return e;let r=RP(e),o=RP(t);if(r>o)return e;if(o>r)return t;let a=PP[e.style],i=PP[t.style];if(a!==i)return a>i?e:t;let l=wP(e.color),s=wP(t.color);return l<s?e:s<l?t:n?e:t}function Fc(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function dM(e,t,n){return n?t==="top"||t==="bottom"?e.insideH:e.insideV:e[t]}function cM(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&&cM(n.edge,o.edge)?n={...n,gridEnd:o.gridEnd}:(t.push(n),n={...o});}return t.push(n),t}function Cc(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 kP(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 uM(e){if(!(!e||e.style!=="double"))return wl(e.widthPt)}function Mc(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function fM(e,t){return t?e==="outer"?t.insetPt:t.insetPt+t.strokePt+t.gapPt:0}function pM(e,t,n){return n?e==="outer"?t-n.insetPt:t-n.insetPt-n.strokePt-n.gapPt:t}function mM(e,t){return t?e==="outer"?t.insetPt+t.strokePt:t.insetPt+t.extentPt:0}function gM(e,t,n){return n?e==="outer"?t-n.insetPt-n.strokePt:t-n.insetPt-n.extentPt:t}function fo(e,t){e.length>=oM||!(t.width>0)||!(t.height>0)||e.push(t);}function hM(e,t,n,r,o,a,i,l,s,d,c){let u=wl(n.widthPt),{strokePt:f,gapPt:m,extentPt:p,insetPt:g}=u,y=Math.abs(r)<1e-6,x=Math.abs(o-a)<1e-6,b=Math.abs(r)<1e-6,h=Math.abs(o-i)<1e-6;if(t==="top"||t==="bottom"){let P=t==="top"?g:i-g-f,O=t==="top"?g+f+m:i-g-p;for(let k of ["outer","inner"]){let I=r,T=o;y&&(I=fM(k,l)),x&&(T=pM(k,a,s)),fo(e,{side:t,role:k,color:n.color,cssStyle:"solid",x:I,y:k==="outer"?P:O,width:T-I,height:f});}return}let v=t==="left"?g:a-g-f,R=t==="left"?g+f+m:a-g-p;for(let P of ["outer","inner"]){let O=r,k=o;b&&(O=mM(P,d)),h&&(k=gM(P,i,c)),fo(e,{side:t,role:P,color:n.color,cssStyle:"solid",x:P==="outer"?v:R,y:O,width:f,height:k-O});}}function yM(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)fo(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)fo(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 bM(e,t,n,r,o,a,i){let l=n.widthPt;t==="top"?fo(e,{side:t,role:"edge",color:n.color,cssStyle:Mc(n.style),x:r,y:0,width:o-r,height:l}):t==="bottom"?fo(e,{side:t,role:"edge",color:n.color,cssStyle:Mc(n.style),x:r,y:i-l,width:o-r,height:l}):t==="left"?fo(e,{side:t,role:"edge",color:n.color,cssStyle:Mc(n.style),x:0,y:r,width:l,height:o-r}):fo(e,{side:t,role:"edge",color:n.color,cssStyle:Mc(n.style),x:a-l,y:r,width:l,height:o-r});}function Bc(e,t){if(e.length===0)return;let n=e[0];return uM(n.edge)}function xM(e,t,n,r,o,a,i,l,s,d){let c=(F,C,E)=>{let H=[];for(let A of C){if(!A.edge)continue;let D,B;E?(D=kP(i,l,A.gridStart),B=kP(i,l,A.gridEnd)):(D=s[A.gridStart-d]??0,B=s[A.gridEnd-d]??a),H.push({side:F,gridStart:A.gridStart,gridEnd:A.gridEnd,startPt:D,endPt:B,edge:A.edge});}return H},u=c("top",e,true),f=c("left",t,false),m=c("bottom",n,true),p=c("right",r,false),g=[...u,...p,...m,...f],y=Bc(t),x=Bc(r),b=Bc(e),h=Bc(n),v=(F,C)=>F.length===1&&Math.abs(F[0].startPt)<1e-6&&Math.abs(F[0].endPt-C)<1e-6,R=v(u,o),P=v(f,a),O=v(m,o),k=v(p,a),I=[],T=(F,C,E)=>{for(let H of C){let{edge:A,startPt:D,endPt:B}=H;A.style==="double"?hM(I,F,A,D,B,o,a,F==="top"||F==="bottom"?y:void 0,F==="top"||F==="bottom"?x:void 0,F==="left"||F==="right"?b:void 0,F==="left"||F==="right"?h:void 0):A.style==="triple"?yM(I,F,A,D,B,o,a):E||bM(I,F,A,D,B,o,a);}};T("top",u,R),T("left",f,P),T("bottom",m,O),T("right",p,k);let S={};return R&&u[0]&&(S.top=u[0].edge),P&&f[0]&&(S.left=f[0].edge),O&&m[0]&&(S.bottom=m[0].edge),k&&p[0]&&(S.right=p[0].edge),g.length>0&&(S.edgeSegments=g),I.length>0&&(S.strokes=I),S}function Ec(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=SP(e,n,o,a),d=(u,f,m)=>Ap(u.borders[f],dM(t,f,m),{}),c=(u,f,m,p)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?Lc:sM(m,p);for(let u=0;u<i;u+=1){let f=e[u];for(let m=0;m<f.length;m+=1){let p=f[m];if(p.vMergeContinue){l[u][m]={};continue}let g=p.mergeRowSpan??1,y=u+g-1,x=u===0,b=y===i-1,h=p.gridColumn===0,v=p.gridColumn+p.gridSpan-1,R=v>=n-1,P=[];if(x)for(let D=p.gridColumn;D<=v;D+=1)P.push({gridStart:D,gridEnd:D+1,edge:Fc(d(p,"top",false))});let O=[];if(h)for(let D=u;D<=y;D+=1)O.push({gridStart:D,gridEnd:D+1,edge:Fc(d(p,"left",false))});let k=[];for(let D=p.gridColumn;D<=v;D+=1){let B;if(b)B=d(p,"bottom",false);else {let j=jp(s,y+1,D,o);j?.cell.vMergeContinue?B=ht:B=c(p.borders.bottom,j?j.cell.borders.top:ht,d(p,"bottom",true),j?d(j.cell,"top",true):t.insideH);}k.push({gridStart:D,gridEnd:D+1,edge:Fc(B)});}let I=[];for(let D=u;D<=y;D+=1){let B;if(R)B=d(p,"right",false);else {let j=jp(s,D,v+1,o);B=c(p.borders.right,j?j.cell.borders.left:ht,d(p,"right",true),j?d(j.cell,"left",true):t.insideV);}I.push({gridStart:D,gridEnd:D+1,edge:Fc(B)});}let T=Oc(P),S=Oc(O),F=Oc(k),C=Oc(I);if(!r){let D={},B=Cc(T,p.gridColumn,v+1),j=Cc(S,u,y+1),V=Cc(F,p.gridColumn,v+1),z=Cc(C,u,y+1);B&&(D.top=B),j&&(D.left=j),V&&(D.bottom=V),z&&(D.right=z);let Z=[],U=(te,K)=>{for(let Q of K)Q.edge&&Z.push({side:te,gridStart:Q.gridStart,gridEnd:Q.gridEnd,startPt:Q.gridStart,endPt:Q.gridEnd,edge:Q.edge});};U("top",T),U("left",S),U("bottom",F),U("right",C),Z.length>0&&(D.edgeSegments=Z),l[u][m]=D;continue}let E=r.cellBoxes[u][m],H=[0],A=0;for(let D=u;D<=y;D+=1){let B=r.rowBands[D];A+=B.height,H.push(A);}H.length>1&&(H[H.length-1]=E.height),l[u][m]=xM(T,S,F,C,E.width,E.height,r.columnWidthsPt,p.gridColumn,H,u);}}return l}function Tr(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var Gp=vP,$p=IP;var OP=31680/20,tr=Object.freeze({type:"auto",value:0}),SM=100,PM=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function RM(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Xp(e,t){return e.attributes.find(n=>n.localName===t)?.value}function CP(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])*PM[n[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function ia(e){if(!e)return tr;let t=Xp(e,"type");if(t!==void 0&&t!=="pct"&&t!=="dxa")return t==="nil"?{type:"nil",value:0}:tr;let n=Xp(e,"w");if(n===void 0)return tr;let r=CP(n);if(!r)return tr;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?tr:{type:"pct",value:Math.min(a,SM)}}return !Number.isFinite(r.pt)||r.pt<=0?tr:{type:"dxa",value:Math.min(r.pt,OP)}}function Hl(e,t){if(!e)return;let n=ia(e);if(n.type==="dxa")return Math.min(n.value,t)}function MP(e){let t=RM(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 wM(e){let t=[];for(let n of e){let r=Xp(n,"w"),o=r===void 0?null:CP(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){t.push(void 0);continue}t.push(o.pt>OP?void 0:o.pt);}return t}var Kp=1,FP=.001;function kM(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 m=o[f];m===void 0?d.push(f):c-=m;}if(d.length===0||c<=0)continue;let u=c/d.length;for(let f of d)o[f]=u;}return o}function BP(e){let{columnCount:t,tableWidth:n}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:Kp,a=n.type==="dxa"?n.value:n.type==="pct"?o*n.value/100:0,i=wM(e.gridCols),l=kM(i,e.claims,t,a),s=0,d=0;for(let x of l)x===void 0?d+=1:s+=x;let c=[];if(d>0){let x=s>0?s/Math.max(t-d,1):o/t,b=Math.max(o-s,0)/d,h=Math.max(Math.min(b,x),Kp);for(let v of l)c.push(v??h);}else for(let x of l)c.push(x);let u=c.reduce((x,b)=>x+b,0);if(!Number.isFinite(u)||u<=0)return new Array(t).fill(o/t);let f=t*Kp,m=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,p=Math.max(a>0?Math.min(a,m):Math.min(u,m),f),g=n.type==="pct"&&a>0;if(u<=p+FP&&!g||Math.abs(u-p)<=FP)return c;let y=p/u;return c.map(x=>x*y)}function vi(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function vM(e,t){return e.attributes.find(n=>n.localName===t)?.value}var IM=3,LP=108/20,zl=31680/20,EP={top:0,right:LP,bottom:0,left:LP};function Nc(e){if(!e)return;let t=vM(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>zl?zl:r}function Ac(e){if(!e)return {};let t=Nc(vi(e,"top")),n=Nc(vi(e,"left")??vi(e,"start")),r=Nc(vi(e,"bottom")),o=Nc(vi(e,"right")??vi(e,"end"));return {...t===void 0?{}:{top:t},...n===void 0?{}:{left:n},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function Dc(e,t){return {top:t.top??e.top,right:t.right??e.right,bottom:t.bottom??e.bottom,left:t.left??e.left}}function Wl(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 la(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 TM(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Nn(e,t){return e.attributes.find(n=>n.localName===t)?.value}var NP=31680/20;function AP(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function Ii(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(-NP,Math.min(NP,n))}function Yp(e){let t=e&&TM(e,"tblpPr");if(!t)return;let n=Nn(t,"tblpXSpec"),r=n==="left"||n==="center"||n==="right"||n==="inside"||n==="outside"?n:void 0,o=Nn(t,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:AP(Nn(t,"horzAnchor"))??"text",vertAnchor:AP(Nn(t,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:Ii(Nn(t,"tblpX"))??0,...a?{ySpec:a}:{},yPt:Ii(Nn(t,"tblpY"))??0,...["topFromText","rightFromText","bottomFromText","leftFromText"].some(i=>Nn(t,i)!==void 0)?{distances:{top:Math.max(0,Ii(Nn(t,"topFromText"))??0),right:Math.max(0,Ii(Nn(t,"rightFromText"))??0),bottom:Math.max(0,Ii(Nn(t,"bottomFromText"))??0),left:Math.max(0,Ii(Nn(t,"leftFromText"))??0)}}:{}}}function _P(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 jP(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 HP(e,t){return {x:t.x+t.height-(e.y-t.y),y:t.y+(e.x-t.x)}}var DP=new WeakMap,zP=new WeakSet;function FM(e){let t=DP.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 dn(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 DP.set(e,n),n}function WP(e,t,n){let r=FM(e).get(n)??[];return r.find(o=>o.pageIndex===t)??r[0]}function Ti(e,t){let n=WP(e,t.pageIndex,t.position.paragraphId);if(!n)return t;let r=OM(t,n.cell.box),o={...t,...r};return zP.add(o),o}function QW(e){return zP.has(e)}function Up(e,t,n){let r=WP(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 OM(e,t){return {x:t.x+(e.y-t.y),y:t.y+t.height-(e.x-t.x)}}function VP(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 GP(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da$1&&n.localName===t)return n}}function qp(e){let t=GP(e,"tblHeader");if(!t)return;let n=t.attributes.find(r=>r.namespaceUri===da$1&&r.localName==="val")?.value;return n===void 0||n!=="0"&&n!=="false"&&n!=="off"}function $P(e,t,n){let r=false;for(let o of e.tableRowPropertyNodes)r=qp(o)??r;for(let o of t)r=qp(GP(e.conditional.get(o),"trPr"))??r;return qp(n)??r}function CM(e){if(e.namespaceUri!==da$1)return false;let t=new Set;for(let n of e.children){if(n.kind==="textValue")continue;let r=n.localName==="start"?"left":n.localName==="end"?"right":n.localName;if(n.namespaceUri!==da$1||!["top","left","bottom","right"].includes(r)||t.has(r))return false;t.add(r);let o=n.attributes.filter(i=>i.localName==="w"),a=n.attributes.filter(i=>i.localName==="type");if(o.length!==1||o[0].namespaceUri!==da$1||!/^\d{1,9}$/.test(o[0].value)||Number(o[0].value)>31680||a.length>1||a.length===1&&(a[0].namespaceUri!==da$1||a[0].value!=="dxa"))return false}return true}function KP(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(!CM(o))return false}else n.push(o);}return true}var Zp=31680/20,XP=.001;function YP(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=nr(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+XP?{...o,preferred:{type:"dxa",value:l}}:o})}function Vl(e,t){let n;for(let r of e.children)if(!(r.kind==="textValue"||r.localName!==t)){if(n||r.namespaceUri!==da$1)return;n=r;}return n}function nr(e,t){let n=e?.attributes.filter(r=>r.localName===t);return n?.length===1&&n[0].namespaceUri===da$1?n[0].value:void 0}function UP(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>Zp||a<1||a>1024)return;let i=Vl(r,"tblPr");if(!i)return;let l=Vl(i,"tblW"),s=Vl(i,"tblInd"),d=nr(l,"w");if(nr(l,"type")!=="pct"||d!=="5000"&&d!=="100%"||nr(s,"type")!=="dxa"||nr(s,"w")!=="0"||nr(Vl(i,"tblLayout"),"type")!=="autofit")return;for(let b of [...e.propertyNodes,i])for(let h of b.children)if(h.kind!=="textValue"&&(["jc","tblCellSpacing"].includes(h.localName)&&h.namespaceUri!==da$1||h.localName==="tblpPr"||h.localName==="bidiVisual"||h.localName==="jc"&&!["left","start"].includes(nr(h,"val")??"")||h.localName==="tblCellSpacing"&&(nr(h,"type")!=="dxa"||nr(h,"w")!=="0")))return;let c=o[0]?.cells[0],u=o[0]?.cells.at(-1);if(!c||!u||!KP(r,e.propertyNodes))return;let f=c.margins.left,m=u.margins.right,p=n+f+m;if(!Number.isFinite(p)||f<0||m<0||f+m<=0||p>Zp)return;for(let b of o){let h=b.cells[0],v=b.cells.at(-1);if(!h||!v||h.gridColumn!==0||v.gridColumn+v.gridSpan!==a||h.margins.left!==f||v.margins.right!==m)return}let g=Vl(r,"tblGrid");if(!g)return;let y=0,x=0;for(let b of g.children){if(b.kind==="textValue")continue;if(b.localName!=="gridCol"||b.namespaceUri!==da$1)return;let h=nr(b,"w");if(h===void 0||!/^\d{1,9}$/.test(h))return;let v=Number(h)/20;if(v<1||v>Zp||++y>1024)return;x+=v;}return y===a&&Math.abs(x-p)<XP?p:void 0}var tm=16,MM=31680/20,qP=1023,BM=256,ZP=31680/20;function JP(e){let t=e&&Ve(e,"jc");if(!t)return;let n=fn(t,"val");if(n==="center")return "center";if(n==="right"||n==="end")return "right";if(n==="left"||n==="start")return "left"}function Ve(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}function Jp(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===da$1&&n.localName===t)return n}function sa(e,t){return e.attributes.find(n=>n.namespaceUri===da$1&&n.localName===t)?.value}function LM(e){let t=e&&Ve(e,"gridSpan"),n=t&&fn(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 QP(e,t){let n=e&&Ve(e,t),r=n&&fn(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 EM(e){let t=e&&Ve(e,"vMerge");return t?fn(t,"val")!=="restart":false}function eR(e){return Ch(e&&Ve(e,"shd"))}function Qp(e,t){let n=e&&Ve(e,t);if(!n)return false;let r=fn(n,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var Gl=Object.freeze({rule:"auto"});function NM(e){let t=e&&Ve(e,"trHeight");if(!t)return Gl;let n=fn(t,"hRule"),r=n==="auto"||n==="exact"||n==="atLeast"?n:void 0;if(r==="auto")return Gl;let o=fn(t,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return Gl;let a=Number(o);if(!Number.isFinite(a)||a<=0)return Gl;let i=Math.min(a/20,MM);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:Gl}var AM=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function Fr(e,t){let n=fn(e,t);if(n!==void 0)return n!=="0"&&n!=="false"&&n!=="off"}function DM(e){let t=e&&Ve(e,"tblLook");if(!t)return AM;let n=fn(t,"val"),r=n&&/^[0-9A-Fa-f]{1,4}$/.test(n)?Number.parseInt(n,16):0;return {firstRow:Fr(t,"firstRow")??(r&32)!==0,lastRow:Fr(t,"lastRow")??(r&64)!==0,firstColumn:Fr(t,"firstColumn")??(r&128)!==0,lastColumn:Fr(t,"lastColumn")??(r&256)!==0,rowBanding:Fr(t,"noHBand")===void 0?(r&512)===0:!Fr(t,"noHBand"),columnBanding:Fr(t,"noVBand")===void 0?(r&1024)===0:!Fr(t,"noVBand")}}var em=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],tR=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function nR(e,t){let n=e&&Ve(e,"cnfStyle");if(!n)return;let r=fn(n,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<em.length;o+=1)r[o]==="1"&&t.add(em[o]);for(let o=0;o<tR.length;o+=1)Fr(n,tR[o])===true&&t.add(em[o]);}var _M=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function rR(e){let t=new Set;nR(e.rowProperties,t),nR(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 p=[];for(let g of _M)t.has(g)&&p.push(g);return p}var jM=new WeakMap,HM=new WeakMap;function Ut(e,t,n,r,o="all-markup",a,i){let l=a?HM:jM,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=zM(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 zM(e,t,n,r,o,a,i){if(n>=tm||e.kind!=="table")return null;let l=Ve(e,"tblPr"),s=l&&Ve(l,"tblStyle")?fn(Ve(l,"tblStyle"),"val"):void 0,d=r?Ux(r,s):fc,c=DM(l),u=false;for(let w of d.tablePropertyNodes)Ve(w,"bidiVisual")&&(u=Qp(w,"bidiVisual"));l&&Ve(l,"bidiVisual")&&(u=Qp(l,"bidiVisual"));let f=EP,m=Gp;for(let w of d.tablePropertyNodes)f=Dc(f,Ac(Ve(w,"tblCellMar"))),m=Dp(m,Wp(w));let p=Dc(f,Ac(l&&Ve(l,"tblCellMar"))),g=Dp(m,l?Wp(l):Gp),y=new Map,x=qx(d),b=w=>{if(!x)return op;let N=w.join("|"),J=y.get(N);if(J)return J;let $=Zx(d,w);return y.size<BM&&y.set(N,$),$},h=[],v=[],R=1;for(let w of Ec$1(e.children)){if(w.kind!=="tableRow")continue;let N=Jp(w,"trPr"),J=N?Jp(N,"ins")??Jp(N,"del"):void 0,$=J?.localName,W=J?sa(J,"author")??"":void 0,q=J&&W!==void 0&&a?gy(a,J.id,W,o):o;if(q==="proposed"&&$==="del"||q==="original"&&$==="ins")continue;let X=q==="all-markup"?J:void 0,ae=J&&q!=="all-markup"&&W!==void 0&&(!a||ud(a,J.id,W))?[{kind:$==="ins"?"insert":"delete",id:sa(J,"id")??"",author:W,...sa(J,"date")===void 0?{}:{date:sa(J,"date")},nodeId:J.id}]:void 0,re=[],he=[],ce=[],ye=Math.min(QP(N,"gridBefore"),qP);ye>0&&v.push({start:0,span:ye,preferred:ia(N&&Ve(N,"wBefore"))});let be=ye,xe=Ec$1(w.children);for(let we of xe){if(we.kind!=="tableCell")continue;let _e=Ve(we,"tcPr"),Be=Math.min(be,qP),Vt=Math.min(LM(_e),1024-Be),Je=ia(_e&&Ve(_e,"tcW"));re.push(Be),he.push(Vt),ce.push(Je),v.push({start:Be,span:Vt,preferred:Je}),be=Be+Vt;}let ke=QP(N,"gridAfter"),Me=Math.min(be+ke,1024);ke>0&&be<1024&&v.push({start:be,span:Math.min(ke,1024-be),preferred:ia(N&&Ve(N,"wAfter"))}),Me>R&&(R=Me),h.push({node:w,revision:X,changeSites:ae,cells:xe,properties:N,starts:re,spans:he,preferred:ce,gridColumns:Me});}let P=MP(e),O=P.length>0?P.length:R,k=h.length,I=[];for(let w=0;w<h.length;w+=1){let N=h[w],J=N.node,$=N.properties,W=rR({look:c,rowIndex:w,rowCount:k,gridColumn:0,gridSpan:Math.max(1,O),columnCount:Math.max(1,O),rowProperties:$,cellProperties:void 0}),q=$P(d,W,$),X=0,ae=[];for(let xe of N.cells){if(xe.kind!=="tableCell")continue;let ke=Ve(xe,"tcPr"),Me=N.starts[X],we=N.spans[X],_e=N.preferred[X]??tr,Be=rR({look:c,rowIndex:w,rowCount:k,gridColumn:Me,gridSpan:we,columnCount:O,rowProperties:$,cellProperties:ke});X+=1;let Vt,Je=$p;for(let Mr of Be){let dt=d.conditional.get(Mr);if(!dt)continue;let rn=Ve(dt,"tcPr");Vt=eR(rn)??Vt,Je=_p(Je,Vp(rn));}let Ne=eR(ke)??Vt,pn=Dc(p,Ac(ke&&Ve(ke,"tcMar"))),mn=jl(xe.children,o,a);ae.push({id:xe.id,gridSpan:we,gridColumn:Me,...P[Me]?.id?{gridColumnId:P[Me].id}:{},vMergeContinue:EM(ke),vAlign:VP(ke),textDirection:_P(ke),margins:pn,borders:_p(Je,ke?Vp(ke):$p),...Ne===void 0?{}:{shading:Ne},preferredWidth:_e,styleFormatting:b(Be),blocks:mn});}let re=N.revision,he=re?re.localName==="ins"?"insert":"delete":void 0,ce=re&&sa(re,"id"),ye=re&&sa(re,"author"),be=re&&sa(re,"date");I.push({id:J.id,...he?{revisionKind:he}:{},...ce!==void 0?{revisionId:ce}:{},...ye!==void 0?{revisionAuthor:ye}:{},...be!==void 0?{revisionDate:be}:{},...N.changeSites?{changeSites:N.changeSites}:{},isHeader:q,cantSplit:Qp($,"cantSplit"),height:NM($),cells:ae});}let T=tr,S,F,C,E,H;for(let w of d.tablePropertyNodes){let N=Ve(w,"tblW");N&&(T=ia(N));let J=Ve(w,"tblLayout");J&&(S=fn(J,"type")==="fixed"),F=Hl(Ve(w,"tblInd"),ZP)??F,C=JP(w)??C,E=Hl(Ve(w,"tblCellSpacing"),zl)??E,H=Yp(w)??H;}let A=l&&Ve(l,"tblW"),D=A?ia(A):T,B=l&&Ve(l,"tblLayout"),j=B?fn(B,"type")==="fixed":S??false,V=Hl(l&&Ve(l,"tblInd"),ZP)??F??0,z=JP(l)??C??"left",Z=n===0?Yp(l)??H:void 0,U=Hl(l&&Ve(l,"tblCellSpacing"),zl)??E??0,te=UP({table:e,propertyNodes:d.tablePropertyNodes,rows:I,columnCount:O,contentWidthPt:t,compatibilityMode:i,depth:n,tableWidth:D,layoutFixed:j,alignment:z,indentPt:V,cellSpacingPt:U,floating:Z!==void 0}),K=BP({gridCols:P,claims:te===void 0?v:YP(v,P,te),columnCount:O,contentWidthPt:te??t,tableWidth:D,layoutFixed:j}),Q=u?I.map(w=>({...w,cells:w.cells.map(N=>({...N,margins:{...N.margins,left:N.margins.right,right:N.margins.left},borders:{...N.borders,left:N.borders.right,right:N.borders.left},logicalGridColumn:N.gridColumn,gridColumn:Math.max(0,K.length-N.gridColumn-N.gridSpan)}))})):I;return {...u?{bidiVisual:true}:{},columnWidthsPt:u?[...K].reverse():K,rows:te===void 0?Q:Q.map(w=>({...w,cells:w.cells.map(N=>({...N,legacyContentAlignment:true}))})),...te===void 0?{}:{legacyContentAlignment:true},tableWidth:D,layoutFixed:j,indentPt:V,alignment:u?z==="left"?"right":z==="right"?"left":z:z,...Z?{float:Z}:{},cellSpacingPt:U,tableBorders:u?{...g,left:g.right,right:g.left}:g,defaultMargins:u?{...p,left:p.right,right:p.left}:p}}var jc=65536;function CV(e,t){if(e.length>jc)return;let n=new Array(e.length+1).fill(0),r=Ze(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 MV(e,t,n,r,o){if(e.length>jc||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+_c(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+_c(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 _c(e){let t=0;for(let n=0;n<e.length;n++)e[n]===" "&&t++;return t}var oR=new WeakMap;function aR(e,t,n){let r=oR.get(n);r||(r=new WeakMap,oR.set(n,r));let o=r.get(e),a=We(e.style,e.fontSlot),i=sn(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 m=0;o=f.map((p,g)=>g===0?0:(m=Math.max(m,Math.min(l,Number.isFinite(p)?p:m)),g===i.length?l:m));}}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=sn(e.text.slice(0,s),a);if(o)return o[d.length]??l;let c=a.shaping?.wordSpacingPt??0,u=Math.max(0,l-_c(i)*c);return Math.max(0,Math.min(l,u*d.length/Math.max(1,i.length)+_c(d)*c))}function rr(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 mR=8;function am(e,t){return t?{...t,caret:Ti(e,t.caret)}:null}var iR=new WeakMap;function zc(e){let t=iR.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 m of f.lines)o.set(m.range.paragraphId,m.id);continue}for(let m of f.rows){if(!m.isHeaderRepeat&&!r.has(m.id)){let p=a.get(f.tableId)??0;r.set(m.id,p),a.set(f.tableId,p+1);}for(let p of m.cells){if(!m.isHeaderRepeat&&!u){let g=`${f.tableId}|${p.gridColumn}`;if(p.blocks.length===0){let y=l.get(g);y&&i.set(p,y);}else l.set(g,{row:m,cell:p});}s(p.blocks,u||m.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 iR.set(e,d),d}function Wc(e,t){let n=zc(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 KV(e,t){let n=e.pages[Wc(e,t.y)];if(!n)return false;for(let r of [n.header,n.footer])if(r&&Fi(r.box,t))return true;return false}function im(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||!$l(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 sm(e,t,n,r={}){let o=e.pages[t];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??mR,measurer:r.measurer},i=lR(e,o.index,n),l=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),s=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=im(l,n,a.pageIndex);if(d)return {...d,contentControlId:i};let c=am(e,Hc(o.fragments,n,a,null));if(c?.onGlyphs)return {...c,contentControlId:i};let u=im(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 m of [t-f,t+f]){let p=e.pages[m];if(!p)continue;let g=am(e,Hc(p.fragments,n,{...a,pageIndex:p.index},null));if(g)return {...g,contentControlId:lR(e,p.index,n)}}return null}function XV(e,t,n,r,o={}){let a=e.pages[t];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??mR,measurer:o.measurer};return am(e,Hc(n,r,i,null))}function YV(e,t,n={}){let r=e.pages[Wc(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=im(o.anchoredDrawings,a,r.index);if(i)return i}return sm(e,r.index,{x:t.x-r.contentBox.x,y:t.y-r.contentBox.y},n)}function Fi(e,t){return t.x>=e.x&&t.x<e.x+e.width&&t.y>=e.y&&t.y<e.y+e.height}function dm(e,t,n){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===t&&Fi(i.box,n)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function lR(e,t,n){return dm(e,t,n)?.id??null}function lm(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 WM(e,t,n){return e.kind!=="table"||Math.max(e.box.y-t.y,0,t.y-(e.box.y+e.box.height))>0?lm(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&&Fi(i.box,t)))for(let i=e.length-1;i>=0;i-=1){let l=e[i];if(!Fi(l.box,t))continue;let s=nm(l,t,n,r);if(s)return s}let o=null;for(let i of e){if(!Fi(i.box,t))continue;o=i;let l=nm(i,t,n,r);if(l)return l;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:WM(i,t,n.verticalWeight)})).sort((i,l)=>i.score-l.score);for(let{block:i}of a){let l=nm(i,t,n,r);if(l)return l}return null}function nm(e,t,n,r){return e.kind==="paragraph"?VM(e,t,n,r,Fi(e.box,t)):qM(e,t,n)}function VM(e,t,n,r,o){if(e.clipToBox&&!o)return null;let a=GM(e.lines,t.y);if(!a)return null;let i=YM(a,t.x,t.y,n),l=KM(a,t.x),s=Math.min(Math.max(i.offset,l.start),l.end),d={paragraphId:l.paragraphId,offset:s},c=Xl(a,s,n.measurer,l),u=rr({...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?$M(i.drawing):null}:null}function GM(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 $M(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function KM(e,t){let n=St(e),r=Pf(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 XM(e,t,n){for(let r of n??e.drawings??[])if(r.start===t||r.start+1===t)return r;return null}function $l(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:Af(t.x,t.y,e.geometry)}function YM(e,t,n,r){let o=e.spans;for(let d of e.drawings??[])if($l(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 rm(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:$l(u,{x:t,y:n}),drawing:u}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=Pf(o,t);if(a){let d=uR(a,Math.max(a.box.x,Math.min(t,a.box.x+a.box.width)),r),c=St(e).find(m=>m.paragraphId===a.range.paragraphId),u=fy(e,c),f=Math.min(d.offset,gR(r.layout,u));return f===d.offset?d:{...d,offset:f,x:Xl(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 rm(e,s,r);for(let d of o)if(t>=d.box.x&&t<d.box.x+d.box.width)return uR(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=$l(u,{x:t,y:n}),m=t>=u.x+u.width/2;return {offset:m?u.start+1:u.start,x:m?u.advanceEnd:u.advanceStart,withinSpan:f,drawing:u}}if(!(u.start<=c.range.start&&u.hitBounds.x+u.hitBounds.width<=c.box.x)){if($l(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 rm(e,s,r)}function rm(e,t,n){let r=gR(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?Kl(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 gR(e,t){let n=t.range.end;if(n>t.range.start&&om(t,n-1)===Ud$1)return n-1;if(zc(e).lastLineIdOfParagraph.get(t.range.paragraphId)===t.id)return n;let r=n;for(r>t.range.start&&om(t,r-1)===`
17
+ `&&(r-=1);r>t.range.start&&om(t,r-1)===" ";)r-=1;return r}function om(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 sR=new WeakMap,dR=new WeakMap;function cR(e){let t=rd(),n=sR.get(e);if(n&&n.epoch===t)return n.boundaries;let r=[0];for(let o of Ze(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),sR.set(e,{epoch:t,boundaries:r}),r}function Kl(e,t,n){let r=e.caretEdges;if(r&&t>=0&&t<r.length)return r[t];if(e.style.shaping)return aR(e,t,n);let o=dR.get(n);o||(o=new WeakMap,dR.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:tt(e.text.slice(0,t),We(e.style,e.fontSlot),n),s=e.lineEndWhitespace?Math.min(l,e.box.width):l;return a.set(t,s),s}function cm(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function or(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||cm(e)?a(e.box.width*(o/r)):a(Kl(e,o,n))}function Xl(e,t,n,r){let o=XM(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&&cm(c)){i=u;break}if(u&&u.range.start===t){let f=at(Bn(c.text)??0)||at(u.text.codePointAt(0)??0),m=u.box.x-(c.box.x+c.box.width)-(u.wrapAdvanceBefore??0);if(c.text.endsWith(" ")&&m>.25||f&&m>.001){i=u;break}}i=c;}else t>c.range.end&&(i=c);}let l=or(i,t,n),s=n?.lineMetrics(We(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 uR(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||cm(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))),y=Math.round(g*i),x=cR(e),b=x[0],h=Number.POSITIVE_INFINITY;for(let v of x){let R=Math.abs(v-y);R<h&&(h=R,b=v);}return {offset:e.range.start+b,x:a(e.box.width*(b/i)),withinSpan:true}}let l=cR(e),s=1,d=l.length-1;for(;s<d;){let g=s+d>>1;Kl(e,l[g],n.measurer)<o?s=g+1:d=g;}let c=l[s],u=l[s-1],f=Kl(e,c,n.measurer),m=Kl(e,u,n.measurer),p=o-m<=f-o;return {offset:e.range.start+(p?u:c),x:a(p?m:f),withinSpan:true}}function fR(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 UM(e,t,n,r){return {tableId:t.tableId,rowId:n.id,cellId:r.id,rowIndex:zc(e).rowIndexById.get(n.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function qM(e,t,n,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],l=fR(a,t.y,d=>d.box.y,d=>d.box.height);if(l){let d=fR(l.cells,t.x,c=>c.box.x,c=>c.box.width);d&&i.push(ZM(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:lm(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=UM(n.layout,e,d,c),f=c.textDirection==="btLr"?HP(t,c.box):t,m=Hc(c.blocks,f,n,u);if(m)return m}return null}function ZM(e,t,n){return n.blocks.length>0?{row:t,cell:n}:zc(e.layout).mergeOriginOf.get(n)??{row:t,cell:n}}function hR(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 JM(e,t,n){for(let r of t.lines)for(let o of r.drawings??[])if(o.drawingNodeId===n)return hR(e,o);return null}function yR(e,t,n){if(t.kind==="paragraph")return JM(e,t,n);for(let r of t.rows)for(let o of r.cells)for(let a of o.blocks){let i=yR(e,a,n);if(i)return i}return null}function pR(e,t,n){for(let r of t){let o=yR(e,r,n);if(o)return o}return null}function UV(e,t){for(let n of e.pages){for(let o of n.anchoredDrawings??[])if(o.drawingNodeId===t)return hR(n.index,o);let r=pR(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=pR(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 um(e,t,n,r,o){return t?{before:r!==void 0&&r===n?0:e.before,after:o!==void 0&&o===n?0:e.after}:e}function bR(e,t,n){if(e?.kind!=="paragraph")return;let r=e.children.find(o=>o.kind==="paragraphProperties");return t?mc(t,r,n).styleId:lt(r).find(o=>o.localName==="pStyle")?.attributes?.val??null}function xR(e,t,n,r,o,a){return t?um(e,true,n,bR(r?.previous,o,a),bR(r?.next,o,a)):e}function Vc(e,t,n){return e.some(r=>r.spans.length>0||(r.drawings?.length??0)>0)?{}:{emptyParagraphStyle:t.length===0?On:De(t,n)}}function ar(e){return {...e,measuringOnly:true,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function SR(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function fm(e,t,n,r,o){let a=SR(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(Qr({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 PR(e,t){let n=SR(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)fm(t,i,l,s,e);else if(r)for(let d of t)r(d);t.length=0;}}}}function Gc(e,t,n){let r=Vb(e.tabStops,t),{left:o,hanging:a,firstLine:i}=e.indent;(a>0||i<0)&&o>0&&!r.stops.some(s=>s.positionPt===o)&&(r={...r,stops:[...r.stops,{positionPt:o,alignment:"left"}].sort((s,d)=>s.positionPt-d.positionPt)});let l=r===e.tabStops?e.tabStopsCacheToken:Wd(r);return {tabStops:r,properties:[...e.props,...e.inheritedRunProperties,...e.markRunProperties,{localName:"tabStops",attributes:{token:l}},...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 pm(e,t){return e?`${t.toFixed(3)}|${e}`:""}function RR(e,t){let n=pm(t.exclusionToken,t.paragraphStartY),r=e;return n&&(r+=`\0excl:${t.columnIndex}|${n}`),t.startOffset>0&&(r+=`\0from:${t.startOffset}`),r}function $c(e){let{formatting:t,styleCascade:n}=e;return tp(e.paragraph,e.paragraphId,e.indentLeft,e.available,e.measurer,e.cache,e.cacheKey,t.inheritedRunProperties,e.tabStops,e.pageContext,n?(r,o)=>pi(r,o,n):void 0,{...e.flow,paragraphRtl:Ot(t.props),lineSpacing:t.lineSpacing,typography:Nd(t.props,n?.typography),equationCacheToken:e.producer,...n?{themeFonts:n.themeFonts}:{},markRunProperties:t.markRunProperties})}var wR=new WeakMap;function Yl(e){let t=ex(e.borders);return t===""?"":`${t}@${e.indent.left},${e.indent.right}`}function kR(e,t,n){wR.set(e,{styleCascade:t.styleCascade,tableCellStyle:t.tableCellStyle,listItem:t.listItems?.get(e.id),key:n});}function QM(e,t){let n=t.listItems?.get(e.id),r=wR.get(e);if(r&&r.styleCascade===t.styleCascade&&r.tableCellStyle===t.tableCellStyle&&r.listItem===n)return r.key;let o=Yl(ta(e,1,t.styleCascade,n,t.tableCellStyle,true));return kR(e,t,o),o}function eB(e,t){return e&&e.kind==="paragraph"?QM(e,t):""}function vR(e,t,n,r){kR(e,n,t);let o=a=>t!==""&&eB(a,n)===t;return {continuesAbove:o(r?.previous),continuesBelow:o(r?.next)}}function IR(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 Kc(e,t,n,r,o,a){return xS(e&&IR(e,a),a&&e?{...t,left:t.right}:t,n,r,o)}function Xc(e,t,n,r=0,o){if(!e||!e.markerText||!n)return;let a=t.measure(e.markerText,e.markerStyle),i=up(IR(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 tB(e){let t=[0],n=0;for(let r of e)n+=r,t.push(n);return t}function nB(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 ql(e,t,n,r){return {...e,nestingDepth:n,columnEdges:e.columnEdges??tB(t),rows:e.rows.map(o=>nB(o,r))}}var TR=new WeakMap,FR=new WeakMap;function rB(e){let t=FR.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 FR.set(e,n),n}var Oi=4,mm=6,OR=14,oB={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function gm(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)gm(s.blocks,t,n,i+1,o);}}}function yG(e){let t=TR.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);};gm(a.fragments,o,a.contentBox,0,i);for(let l of [a.header,a.footer])l&&gm(l.fragments,o,l.box,0,i);}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(n)});return TR.set(e,r),r}function bG(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 xG(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 SG(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=Ul(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 Ul(e,t){for(let n of e.cells)if(n.gridColumn===t)return n.gridColumnId??null;return null}function aB(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<-Oi||u<-OR||c>d.box.width+Oi||u>d.box.height+mm?null:{x:c,y:u}}function iB(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)<=Oi)&&n>=0&&n<=o.box.width&&Math.abs(r-a)<=Oi)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||rB(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)>Oi)continue;let c=Ul(t.row,s-1),u=Ul(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)<=Oi){let s=o.columnEdges.length-2,d=Ul(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 PG(e,t,n,r,o=0,a){let i=a??Wc(r,n),l=i>=0?o:0,s=null,d=-1,c=-1,u=f=>{if(!f)return;let m=oB[f.kind];f.nestingDepth<d||f.nestingDepth===d&&m<=c||(d=f.nestingDepth,c=m,s=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let m=aB(r,f,t,n,l);if(!m||(u(iB(e,f,m.x,m.y)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let p=f.row.box.y-f.table.box.y;m.x<=mm&&Math.abs(m.y-(p+f.row.box.height/2))<=f.row.box.height/2+mm&&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 y=f.table.columnEdges[g],x=f.table.columnEdges[g+1],b=(y+x)/2;if(Math.abs(m.x-b)>(x-y)/2+2||m.y>OR)continue;let h=Ul(f.row,g);if(h){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:h,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return s}var CR=1048576;function da(e=CR){let t=e|0;return {cellsRemaining:t>0?t:0}}function Yc(e,t,n,r){let o=new Map,a=new Map,i=r?.pageFragment===true,l=i?new Set:null,s=i,c=m=>{let p=a.get(m);p&&(o.set(p.id,p.span),a.delete(m));},u=()=>n!==void 0&&n.cellsRemaining<=0,f=()=>{for(let m of [...a.keys()])c(m);};for(let m of e){if(u()){f();break}s&&m.isHeaderRepeat!==true&&(s=false,f(),l?.clear());let p=new Set,g=false;for(let y of m.cells){if(n){if(n.cellsRemaining<=0){g=true;break}n.cellsRemaining-=1;}let x=Math.max(0,Math.min(y.gridColumn|0,1023));if(p.add(x),y.vMergeContinue){let b=a.get(x);b?b.span+=1:l&&!l.has(x)&&(a.set(x,{id:y.id,span:1}));}else c(x),a.set(x,{id:y.id,span:1});l?.add(x);}if(g){f();break}for(let y of [...a.keys()])p.has(y)||c(y);}return f(),o}var Uc=.001;function lB(e,t){return {...e,height:{rule:"auto"},cells:[t]}}function sB(e){let t=Yc(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 dB(e,t){if(e.length===0||!e.some(k=>k.cells.some(I=>I.vMergeContinue)))return null;let{heads:n,headIdsByRow:r}=sB(e);if(n.length===0)return null;let o=new Map(n.map(k=>[k.span,k])),a=new Map;for(let k of n){let I=a.get(k.span.headRow);I?I.push(k.span):a.set(k.span.headRow,[k.span]);}for(let k of a.values())k.sort((I,T)=>T.endRow-I.endRow);let i=new Map,l=new Map,s=new Map,d=new Map,c=new Set,u=new Set,f=new Set,m=new Set,p=new Map,g=new Map,y=(k,I,T)=>{let S=new Set;for(let A of r.get(k)??[])(f.has(A)||A===I)&&S.add(A);let F=T===void 0?"":`@${T.toFixed(2)}`,C=`${k}${F}\0${[...S].sort().join("\0")}`,E=i.get(C);if(E!==void 0)return E;let H=t(e[k],S,T);return i.set(C,H),H},x=(k,I)=>{let T=I===void 0?k:`${k.headCellId}@${I.toFixed(2)}`,S=l.get(T);if(S!==void 0)return S;let F=o.get(k),C=t(lB(e[k.headRow],F.cell),void 0,I);return l.set(T,C),C},b=(k,I,T)=>y(k,I,T)+(s.get(k)??0),h=k=>{for(let I=k.headRow+1;I<=k.endRow;I+=1)if(r.has(I))return true;return false},v=(k,I)=>{let T=0;for(let S=k.headRow;S<=k.endRow;S+=1)T+=b(S,k.headCellId,I===void 0?void 0:I+T);return T},R=(k,I)=>{let T=new Map,S=0;for(let F=k.headRow;F<=k.endRow;F+=1){let C=b(F,k.headCellId,I===void 0?void 0:I+S);T.set(F,C),S+=C;}return T},P=k=>{for(let I=k.endRow;I>=k.headRow;I-=1)if(e[I].height.rule!=="exact")return I},O=(k,I)=>{if(h(k)||m.has(k.headRow)&&!u.has(k))return Number.POSITIVE_INFINITY;let T=v(k,I);return P(k)===void 0?T:Math.max(T,x(k,I))};return {spansAt:k=>a.get(k)??[],heightOf:O,accept:(k,I)=>{if(u.has(k)||h(k)||m.has(k.headRow))return;let T=R(k,I),S=0;for(let H of T.values())S+=H;let F=P(k),C=x(k,I);if(F===void 0&&C>S+Uc)return;let E=F===void 0?0:C-S;u.add(k),f.add(k.headCellId),m.add(k.headRow),E>Uc&&(s.set(F,(s.get(F)??0)+E),T.set(F,(T.get(F)??0)+E));for(let[H,A]of T)c.add(H),d.set(H,Math.max(d.get(H)??0,A));p.set(k,I),g.set(k,E>Uc?F:void 0);},withdrawAt:k=>{for(let I of a.get(k)??[]){if(!u.delete(I))continue;f.delete(I.headCellId),m.delete(I.headRow),p.delete(I);let T=g.get(I);T!==void 0&&s.delete(T),g.delete(I);for(let S=I.headRow;S<=I.endRow;S+=1)c.delete(S),d.delete(S);}},rowOptions:k=>{if(!c.has(k))return;let I;for(let T of a.get(k)??[])u.has(T)&&(I??=new Map,I.set(T.headCellId,O(T,p.get(T))));return {...I?{detachedSpanHeightPtByCellId:I}:{},heightFloorPt:d.get(k)??b(k)}}}}function MR(e,t,n,r){for(let o of e?.spansAt(t)??[])n+e.heightOf(o,n)>r+Uc||e.accept(o,n);return e?.rowOptions(t)}function BR(e,t,n,r,o){return dB(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 LR(e,t,n){for(let r of e?.spansAt(t)??[])e.accept(r,n);return e?.rowOptions(t)}function po(e,t,n=false){let r=Tr(t.left),o=Tr(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+Tr(t.top),right:e.right+(i?0:o),bottom:e.bottom+Tr(t.bottom),left:e.left+(i?0:r)}}function cB(e,t,n){return {top:t?{state:"none"}:e.top,left:e.left,bottom:n?{state:"none"}:e.bottom,right:e.right}}function qc(e,t,n){return !t&&!n?e:{...e,cells:e.cells.map(r=>({...r,borders:cB(r.borders,t,n)}))}}function uB(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"||Yt(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,Qr({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 Ci(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:Ci(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=>Zn(o,0,t))}:{}}))})}function Mi(e,t,n,r,o,a,i,l,s){if(e.length===0)return [];let d=new Map;for(let x of n)for(let b of x.cells)d.set(b.id,b);let c=Yc(e,a,o,{pageFragment:true}),u=e.map((x,b)=>({...x,cells:x.cells.map(h=>{let v=c.get(h.id);if(h.vMergeContinue&&v===void 0)return {...h,paintInert:true,rowSpan:1,borders:{},blocks:[]};let R=h.vMergeContinue,P=v??1,O=h.box.height;if(P>1){let S=e[b+P-1];O=S.box.y+S.box.height-h.box.y;}let k=d.get(h.id),I=h.blocks;if(k&&k.vAlign!=="top"&&I.length>0){let S=s?.get(x)?.get(h.id)??po(k.margins,k.borders,k.legacyContentAlignment===true&&t.cellSpacingPt===0),F=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY;for(let E of I)F=Math.min(F,E.box.y),C=Math.max(C,E.box.y+E.box.height);if(Number.isFinite(F)&&Number.isFinite(C)){let E=k.textDirection==="btLr",H=(E?h.box.width-S.left-S.right:O-S.top-S.bottom)-(C-F),D=h.box.y+(E?S.left:S.top)+(H>0?k.vAlign==="center"?H/2:H:0)-F;if(Math.abs(D)>.001){I=Ci(I,D);for(let B of I)B.kind==="paragraph"&&i?.(B.paragraphId,D);}}}let T=Object.freeze({x:h.box.x,y:h.box.y,width:h.box.width,height:O});return k&&l&&(P>1||k.vAlign!=="top"&&I.length>0)&&uB(I,k.blocks,T,l),{...h,...R?{vMergeContinue:false,paintInert:false}:{},rowSpan:P,blocks:I,box:{...h.box,height:O}}})})),f=u.map(x=>x.cells.map(b=>{let h=d.get(b.id);return {gridColumn:b.gridColumn,gridSpan:b.gridSpan,vMergeContinue:b.vMergeContinue,borders:h?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:b.rowSpan??1}})),m=t.columnWidthsPt.length,p=t.tableBorders,g={columnWidthsPt:t.columnWidthsPt,rowBands:u.map(x=>({y:x.box.y,height:x.box.height})),cellBoxes:u.map(x=>x.cells.map(b=>({width:b.box.width,height:b.box.height})))},y=Ec(f,p,m,g,void 0,r);return u.map((x,b)=>({...x,cells:x.cells.map((h,v)=>{let R=y[b][v];return h.paintInert||h.vMergeContinue?{...h,borders:{},paintInert:true}:{...h,borders:R}})}))}function hm(e,t,n,r,o,a){let i=new Map,l=0,s=d=>{let c=Ut(d,t,0,n,r,o,a);if(c)for(let u of c.rows)for(let f of u.cells)for(let m of f.blocks)m.localName==="p"?i.set(m.id,l++):m.localName==="tbl"&&s(m);};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 ym=4096,ER=1,ir=class extends Error{code;constructor(t,n){super(n),this.name="TablePaginationError",this.code=t;}};function bm(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false}))}function Zl(e,t,n){let r=0;for(let o=t;o<n&&o<e.length;o+=1)r+=e[o];return r}function fB(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=ta(e,n,o.styleCascade,d,i?.tableCellStyle,true,o.paragraphLineUnitPt),{props:u,indent:f,available:m,alignment:p,styleId:g,outlineLevel:y,spacing:x,bottomBorder:b,borders:h,shading:v}=c,R=xR(x,c.contextualSpacing,g,i?.borderNeighbours,o.styleCascade,i?.tableCellStyle),P=Ot(u),{continuesAbove:O,continuesBelow:k}=vR(e,Yl(c),{styleCascade:o.styleCascade,tableCellStyle:i?.tableCellStyle,listItems:o.listItems},i?.borderNeighbours),I=O?void 0:h.top,T=k?h.between:b,{tabStops:S,properties:F}=Gc(c,o.defaultTabStopPt,{listToken:d?.cacheToken,hostedListToken:o.hostedStory?.hostedListTokenForParagraph?.(e)??"",refToken:o.refFields?.tokenForParagraph(l)??""}),C=Kc(d,f,o.measurer,S,m,P),E=o.pageExclusionZones?.()??Object.freeze([]),H=o.paragraphOrderIndex?.(l)??Number.MAX_SAFE_INTEGER,A=o.paragraphOrderIndex?Cx(E,H,Oe=>o.paragraphOrderIndex?.(Oe)):E,D=nc(A,t,0,{left:0,right:f.left+m+f.right}),B=Jn(D),j=pm(B,r),V=s({paragraph:e,properties:F,width:m,producer:o.producer,drawingToken:pl(o.drawingTokenForParagraph?.(e)||o.drawingLayoutToken||"",o.inlineDrawingLayout!==void 0),projectionToken:o.projectionTokenForParagraph?.(e)??"",...j?{exclusionToken:j}:{}});o.cache&&o.onCellBreakKey?.(V);let z=$c({paragraph:e,paragraphId:l,indentLeft:f.left,available:m,measurer:o.measurer,cache:o.cache,cacheKey:o.cache?V:null,formatting:c,producer:o.producer,styleCascade:o.styleCascade,tabStops:S,...o.pageContext?{pageContext:o.pageContext}:{},flow:{firstLineOffset:C,marginExtent:{left:0,right:f.left+m+f.right},...o.projectLink?{projectLink:o.projectLink}:{},...o.projectFieldLink?{projectFieldLink:o.projectFieldLink}:{},showFieldCodes:o.showFieldCodes,fieldCodeRanges:o.fieldCodeRanges?.get(l),tocLinkStyleRanges:o.tocLinkStyleRanges?.get(l),suppressEmptyPlaceholderLine:o.fieldCodeRanges?.get(l)?.some(Oe=>Oe.suppressParagraph),...o.documentProperties?{documentProperties:o.documentProperties}:{},...o.bodyPageFields?{bodyPageFields:o.bodyPageFields}:{},...o.refFields?{refFields:o.refFields}:{},displayMode:o.displayMode,...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{},...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:f.left+m+f.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:f.left+m+f.right,height:Math.max(1,m)}),...D.length>0?{pageExclusionZones:D}:{}}}),Z=i?.lineStart??0,U=i?.fragmentIndex??0,te=i?.maxBottom??Number.POSITIVE_INFINITY,K=i?.includeAfter??true,Q=i?.includeBottomBorder??true,w=()=>d!==void 0||o.displayMode==="all-markup"&&hy(e,"all-markup",o.revisionAuthorFilter),N=(i?.collapseHeight??false)&&!w(),J=Z===0&&!N?ni(R.before,a):0,$=t+f.left,W=Z===0&&!N?qo(I):0,q=[],X=r+J+W,ae=Z,re=false;for(let Oe=Z;Oe<z.length;Oe+=1){let Ie=z[Oe],jt=Oe===z.length-1,pt=jt&&Q&&T&&!N?qo(T):0,Br=jt&&K&&!N?R.after:0,So=N?0:Qf(Ie,X,D);if((N?X:X+So+Ie.height+pt+Br)>te+.001)break;X+=So;let yt=t+f.left+(Oe===0&&!P?C:0),_=Math.max(1,m-(Oe===0?C:0)),M=Ie.spans.map(Y=>({...Y,range:{...Y.range,paragraphId:l},box:{...Y.box,x:Y.box.x+t-(P&&Oe===0?C:0),y:X}})),ee=bl(M,o.measurer,yt,_,p,jt,p==="center"||p==="right"?Ie.width:void 0,P),ie=M.length>0&&ee.length>0?ee[0].box.x-M[0].box.x:p!=="left"&&p!=="both"?(()=>{let Y=_-Ie.width;return Y<=0?0:p==="center"?Y/2:Y})():0,Te=Object.freeze({x:t,y:r,width:n,height:Math.max(0,te-r)}),Re=Cl(Ie.drawings.map(Y=>tc(Object.freeze({...Zn(Y,t,X),paragraphId:l}),Te)),ie);q.push({id:o.nextLineId(l,Ie.start,Oe),range:{paragraphId:l,start:Ie.start,end:Ie.end},spans:ee,...Re.length>0?{drawings:Re}:{},box:{x:t+f.left,y:X,width:m,height:N?0:Ie.height},contentX:Od(ee,yt+ie),baseline:N?Math.max(0,Math.min(Ie.baseline,i?.collapseBandAbove??0)):Ie.baseline,leading:N?0:Ie.leading,trailingSpacing:N?0:Ie.trailingSpacing,...Ie.manualBreakAfter?{manualBreakAfter:true}:{},...Ie.deletedRanges?{deletedRanges:Ie.deletedRanges}:{},...Ie.anchorRevisions?{anchorRevisions:Ie.anchorRevisions}:{},...Ie.changeSites?{changeSites:Ie.changeSites}:{}}),N||(X+=Ie.height),ae=Oe+1,re=true;}if(!re)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:Z,complete:false,fitted:false};let he=ae>=z.length,ce=q[0].box.y,ye=X,be=[],xe,ke=ce,Me=ye,we=h.left?cn(h.left):0,_e=h.right?cn(h.right):0,Be=h.left?$-h.left.spacePt-we:$,Vt=h.right?$+m+h.right.spacePt+_e:$+m,Je=Math.max(Vt-Be,0);if(W>0&&I){let Oe=cn(I),Ie=ce-I.spacePt-Oe;be.push({side:"top",edge:I,box:{x:Be,y:Ie,width:Je,height:Oe}}),ke=Ie;}if(he&&Q&&T&&!N){let Oe=cn(T),Ie=ye+T.spacePt,jt={x:Be,y:Ie,width:Je,height:Oe};k||(xe={edge:T,box:jt}),be.push({side:k?"between":"bottom",edge:T,box:jt}),Me=Ie+Oe;}let Ne=he&&K&&!N?R.after:0,pn=O&&Z===0?r:ke,mn=k&&he?Me+Ne:Me,Mr=Math.max(mn-pn,0);if(h.left&&be.push({side:"left",edge:h.left,box:{x:$-h.left.spacePt-we,y:pn,width:we,height:Mr}}),h.right&&be.push({side:"right",edge:h.right,box:{x:$+m+h.right.spacePt,y:pn,width:_e,height:Mr}}),h.bar){let Oe=cn(h.bar);be.push({side:"bar",edge:h.bar,box:{x:$-h.bar.spacePt-Oe,y:ce,width:Oe,height:Math.max(ye-ce,0)}});}let dt=Me+Ne,rn=v===void 0?void 0:h.left||h.right?{x:Be,y:ke,width:Je,height:Math.max(Me-ke,0)}:Js(q,$,m),on=he&&o.displayMode==="all-markup"?md(e,"all-markup",o.revisionAuthorFilter):null,sr=on?.revisions??[],xo=on?.formatRevision??null,Dt=o.displayMode??"proposed",Ke=he?Ua(e,Dt,o.revisionAuthorFilter):[],_t=Z===0?Xc(d,o.measurer,q[0]?{y:q[0].box.y,height:q[0].box.height}:void 0,t,P?f.left+m+f.right:void 0):void 0,dr=Yr(e),Pt=dr?Td(q,qa(dr,Dt,o.revisionAuthorFilter)):q,Qe={kind:"paragraph",id:`${l}#f${U}`,...he?{paragraphEnd:true}:{},paragraphId:l,fragmentIndex:U,range:{paragraphId:l,start:Pt[0].range.start,end:Pt[Pt.length-1].range.end},props:u,styleId:g,outlineLevel:y,alignment:p,spacing:{before:J,after:Ne},indent:f,tabStops:S,...xe?{bottomBorder:xe}:{},...be.length>0?{borders:be}:{},...v===void 0?{}:{shading:v},...rn===void 0?{}:{shadingBox:rn},..._t?{marker:_t}:{},...gd(sr,xo),...Ke.length>0?{markChangeSites:Ke}:{},lines:Pt,...Vc(Pt,c.markRunProperties,o.styleCascade?.themeFonts),box:{x:$,y:r,width:m,height:dt-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let Oe=Object.freeze({x:t,y:r,width:n,height:Math.max(0,te-r)}),Ie=Qe.box,jt={paragraph:e,paragraphId:l,paragraphBox:Ie,lines:Pt};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...jt,cellOriginX:t,cellContentWidth:n}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(Qr({paragraph:e,paragraphId:l,paragraphBox:Ie,lines:Pt,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(Ie)??Ie,cellBox:Oe,pageClip:o.pageContentClip(),measurer:o.measurer,...o.hostedStory?{layoutTextboxStory:o.hostedStory.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{},...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{}}));}return {fragment:Qe,bottom:dt,spaceAfter:Ne,nextLineIndex:ae,complete:he,fitted:true}}function ca(e,t,n,r,o,a){let i=NR(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 NR(e,t,n,r,o,a,i,l,s,d=false){let c=[],u=r,f=l.previousSpaceAfter,m=l.blockIndex,p=l.lineIndex,g=l.paragraphFragmentIndex,y=false,x=false,b=l.precededByEmittedTable;for(;m<e.length;){let h=e[m];if(h.kind==="table"){p!==0&&(p=0),f=0;let P=mB(h,t,n,u,a+1,i);if(!P){b=false,m+=1;continue}if(P.bottom>o+.001){x=!y;break}c.push(P.fragment),u=P.bottom,y=true,b=true,m+=1,p=0;continue}if(h.kind!=="paragraph"){b=false,m+=1,p=0;continue}let v=d&&m===e.length-1&&b&&yP(h),R=fB(h,t,Math.max(1,n-t),u,i,f,{lineStart:p,fragmentIndex:g,maxBottom:o,includeAfter:true,includeBottomBorder:true,collapseHeight:v,collapseBandAbove:u-r,...s?{tableCellStyle:s}:{},borderNeighbours:{previous:m>0?e[m-1]:void 0,next:e[m+1]}});if(!R.fitted||!R.fragment)break;if(c.push(R.fragment),u=R.bottom,y=true,R.complete)f=R.spaceAfter,b=false,m+=1,p=0,g=0;else return {blocks:c,bottom:u,cursor:{blockIndex:m,lineIndex:R.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:g+1,precededByEmittedTable:b},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:c,bottom:u,cursor:{blockIndex:m,lineIndex:p,previousSpaceAfter:f,paragraphFragmentIndex:g,precededByEmittedTable:b},complete:m>=e.length,fitted:y,nestedSplitBlocked:x}}function lr(e,t,n,r,o,a,i,l=0,s,d=Number.POSITIVE_INFINITY){return Jl(e,t,n,r,Number.POSITIVE_INFINITY,o,false,a,i,bm(e),l,s,d)}function Jl(e,t,n,r,o,a,i,l,s,d,c=0,u,f=o){let m=u?.detachedSpanHeightPtByCellId,p=Zl(t,0,t.length),g=Number.isFinite(c)&&c>0?c/2:0,y=s.measurer.lineMetrics(On).height,x=e.height,b=x.rule==="exact"?x.valuePt:void 0,h=x.rule==="atLeast"?x.valuePt:void 0,v=[],{rowDeps:R,flushDeferred:P}=PR(s,v),O=a&&s.pageOccurrenceKey?{...R,nextLineId:(B,j,V)=>R.nextLineId(B,j,V,s.pageOccurrenceKey())}:R,k=b===void 0?o:Math.min(o,r+Math.max(0,b)),I=[],T=false,S=false,F=r;for(let B=0;B<e.cells.length;B+=1){let j=e.cells[B],V=d[B]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false},z=j.gridSpan,Z=j.gridColumn,U=n+Zl(t,0,Z),te=Zl(t,Z,Math.min(Z+z,t.length))||p,K=Math.min(g,Math.max((te-ER)/2,0)),Q=U+K,w=Math.max(te-2*K,ER),N=s.cellContentInsets?.get(j.id)??po(j.margins,j.borders,j.legacyContentAlignment===true&&c===0),J=i?Tr(j.borders.top):N.top,$=m?.get(j.id),W=$!==void 0,q=W?Math.min(f,r+$):k,X=j.textDirection==="btLr",ae=X?Q+N.bottom:Q+N.left,re=X?Q+Math.max(0,q-r)-J:Q+w-N.right,he=X?r+N.left:r+J,ce=X?r+w-N.right:q-N.bottom,ye=[],be=he,xe=V,ke=true,Me=false,we=false;if(!j.vMergeContinue)if(ce<he+.001)ke=V.blockIndex>=j.blocks.length;else {let Be=NR(j.blocks,ae,re,he,ce,l,O,V,j.styleFormatting,true);ye=Be.blocks,be=Be.bottom,xe=Be.cursor,ke=Be.complete,Me=Be.fitted,we=Be.nestedSplitBlocked,Me&&(T=true),we&&(S=true);}let _e=Math.min(q,X&&Me?r+J+(jP(ye,ae)-ae)+N.bottom:Me?be+N.bottom:r+J+y+N.bottom);_e>F&&!W&&(F=_e),I.push({cell:j,x:Q,width:w,gridColumn:Z,blocks:ye,contentTop:he,contentBottom:be,physicalBottom:_e,insets:{...N,top:J},nextCursor:xe,complete:j.vMergeContinue?true:ke,fitted:Me,nestedSplitBlocked:we});}F=Math.min(k,Math.max(F,r));for(let B of I){if(m?.has(B.cell.id)===true)continue;let j=B.physicalBottom;j>F&&j<=k+.001&&(F=j);}if(F<=r+.001&&I.length>0){let B=r;for(let j of I){let V=r+j.insets.top+y+j.insets.bottom;V>B&&(B=V);}F=Math.min(k,B);}F=Math.min(k,F);let C=false;if(b!==void 0){let B=r+b;B<=o+.001?(F=B,C=true):F=Math.min(o,F);}else {let B=i?0:u?.heightFloorPt??0,j=r+Math.max(h??0,B);j>F&&j<=o+.001&&I.every(z=>z.complete)&&(F=j);}F=Math.min(o,F);let E=Math.max(0,F-r),H=I.map(B=>{let j=B.blocks,V=C?true:B.complete;if(!B.cell.vMergeContinue&&V&&B.cell.vAlign!=="top"&&j.length>0){let z=B.contentBottom-B.contentTop,Z=B.cell.textDirection==="btLr"?B.width-B.insets.left-B.insets.right-z:E-B.insets.top-B.insets.bottom-z;if(Z>0){let U=B.cell.vAlign==="center"?Z/2:Z;j=Ci(j,U);}}return {id:B.cell.id,gridColumn:B.gridColumn,...B.cell.logicalGridColumn===void 0?{}:{logicalGridColumn:B.cell.logicalGridColumn},...B.cell.gridColumnId?{gridColumnId:B.cell.gridColumnId}:{},gridSpan:B.cell.gridSpan,vMergeContinue:B.cell.vMergeContinue,...B.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...B.cell.shading===void 0?{}:{shading:B.cell.shading},...B.cell.textDirection==="btLr"?{textDirection:"btLr"}:{},blocks:j,box:{x:B.x,y:r,width:B.width,height:E}}}),A=C||I.every(B=>B.complete)?null:I.map(B=>B.nextCursor),D=C||I.every(B=>B.complete);return P(H,r,E),{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}:{},...e.changeSites?{changeSites:e.changeSites}:{},rowIndex:0,isHeaderRow:e.isHeader,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:H,box:{x:n,y:r,width:p,height:E}},bottom:F,remainder:D?null:A,fitted:T||e.cells.every(B=>B.vMergeContinue)||C,nestedSplitBlocked:S}}function xm(e,t,n,r,o,a=0,i,l){let s=0,d=l!==void 0,c={...ar(o),...d?{}:{pageExclusionZones:void 0},nextLineId:()=>`probe-${s++}`};return lr(e,t,n,l??0,false,r,c,a,i).record.box.height}function pB(e,t,n,r,o,a,i,l,s){let d=u=>lr(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 Sm=(e,t,n,r,o)=>r.measuringOnly===true?null:BR(o?{...e,rows:o}:e,t,n,r,xm);function mB(e,t,n,r,o,a){if(o>=tm)return null;let i=Math.max(1,n-t),l=Ut(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:x=>{s.push(x);}},c=t+Wl(l,i),u=Sm(l,c,o,d),f=[],m=r;for(let[x,b]of l.rows.entries()){let h=s.length,v=pB(b,l,c,m,o,d,false,LR(u,x,m),()=>{s.length=h,u?.withdrawAt(x);});f.push(v.record),m=v.bottom;}let p=Mi(f,l,l.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let x of s)for(let b of p)if(b.cells.some(v=>v.blocks.some(R=>R.kind==="paragraph"&&R.paragraphId===x.paragraphId))){fm([x],b.cells,b.box.y,b.box.height,a);break}let g=Zl(l.columnWidthsPt,0,l.columnWidthsPt.length),y=new Map;return {fragment:ql({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:p,box:{x:c,y:r,width:g,height:m-r}},l.columnWidthsPt,o,y),bottom:m}}function Ql(e,t,n,r,o,a,i,l=()=>false){let s=[],d=n;for(let m of e.rows){let p=lr(m,e.columnWidthsPt,t,d,l(m),a,i,e.cellSpacingPt);s.push(p.record),d=p.bottom;}let c=Mi(s,e,e.rows,i.borderOwnershipBudget,i.vMergeResolveBudget),u=Zl(e.columnWidthsPt,0,e.columnWidthsPt.length),f=new Map;return {fragment:ql({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 AR=new WeakMap,gB=0;function DR(e){let t=AR.get(e.content);return t===void 0&&(t=++gB,AR.set(e.content,t)),ne([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 _R(e){let t=e.picture;return t?.embeddedRelationshipId?`embed:${e.ownerPartName}:${t.embeddedRelationshipId}`:t?.linkedRelationshipId?`link:${e.ownerPartName}:${t.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var jR=new WeakMap,Pm=new Map,hB=16,yB=32;function GR(e,t){let n=jR.get(e);if(n)return n;let r;if(e.kind==="drawing"||ib$1(e)||Ta(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:Pm,visited:1,deepest:0};else if((t<2||e.children.length>=hB)&&t<yB){let o=null,a=1,i=0;for(let l of e.children){let s=GR(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??Pm,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>gb$1)break;s.depth>i&&(i=s.depth);let d=s.node;if(d.kind==="drawing"||ib$1(d)||Ta(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:Pm,visited:a,deepest:i};}return jR.set(e,r),r}function Rm(e){let t=GR(e.root,0);return t.visited>gb$1||t.deepest>eb.maxDrawingDepth?null:t.atoms}var HR=new WeakMap;function $R(e,t){let n=HR.get(e.root),r=n?.get(t);if(r)return r;let o=Rm(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 nb$1(e))a.set(l.drawingNodeId,i),i+=1;return n||(n=new WeakMap,HR.set(e.root,n)),n.set(t,a),a}var wm=new Float64Array(1),Zc=new Uint32Array(wm.buffer);function bB(e){An[0]=2166136261,An[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"),km(i,An);}let o=n.arrowheadsEmu;if(t.push(String(o?.length??0)),o)for(let a of o)t.push(String(a.length)),km(a,An);}return [String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.components.length),t.join(","),An[0].toString(36),An[1].toString(36)].join(";")}var An=new Uint32Array(2);function xB(e){return An[0]=2166136261,An[1]=268435859,km(e,An),`${An[0].toString(36)}:${An[1].toString(36)}`}function km(e,t){let n=t[0],r=t[1];for(let o of e)wm[0]=o.x,n=Math.imul(n^Zc[0],16777619),r=Math.imul(r^Zc[1],16777651),wm[0]=o.y,n=Math.imul(n^Zc[1],16777619),r=Math.imul(r^Zc[0],16777651);t[0]=n,t[1]=r;}function vm(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:ne(e.diagnostics.map(l=>ne([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:ne([String(e.extentEmu.cx),String(e.extentEmu.cy)]),effectExtentEmu:ne([String(e.effectExtentEmu.top),String(e.effectExtentEmu.right),String(e.effectExtentEmu.bottom),String(e.effectExtentEmu.left)]),inlineDistancesEmu:ne([String(e.inlineDistancesEmu.top),String(e.inlineDistancesEmu.right),String(e.inlineDistancesEmu.bottom),String(e.inlineDistancesEmu.left)]),wrap:e.wrap,textboxStory:e.textboxStory?DR(e.textboxStory):"",compatibilityBranchNodeId:e.compatibilityBranchNodeId??"",anchor:n?ne([String(n.simplePos),String(n.relativeHeight),String(n.layoutInCell),String(n.allowOverlap),String(n.behindDocument)]):"",locks:ne([String(e.locks.select),String(e.locks.move),String(e.locks.resize),String(e.locks.changeAspect)]),effects:ne([String(e.effects.grayscale),String(e.effects.brightness),String(e.effects.contrast),String(e.effects.bilevel??"")]),picture:r?ne([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?bB(a):"",wrapGeometry:o?ne([o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length),xB(o.polygon)]):"",position:t?ne([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 ne(Object.values(i))}function es(e){switch(e.kind){case "ready":return ne(["ready",e.resourceKey,e.contentId,`${e.pixelWidth}x${e.pixelHeight}`]);case "pending":return ne(["pending",e.resourceKey]);case "external":return ne(["external",e.relationshipId,e.sinkSafe?"1":"0"]);case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}var SB=1;function KR(e,t){if(e.kind==="paragraph"){for(let n of XR(e))t.push(n);return}if("children"in e)for(let n of e.children)KR(n,t);}function XR(e){if(e.kind!=="paragraph")return [];let t=[];return Qd(e,n=>t.push(n.id)),Object.freeze(t)}function PB(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,m=new WeakMap,p=new WeakMap,g=0,y=hb$1(r,t),x=cb$1(r),b=ob$1(n,{resolveRelationship:y,resolveSchemeColor:x.resolveSchemeColor,resolveStyleMatrixReference:x.resolveStyleMatrixReference}),h=Rm(n),v=(T,S)=>{if(s||u.has(S))return;u.add(S);let F=d;o.resolveForProjection(T).then(C=>{s||F!==d||(c.set(S,C),C.kind==="ready"&&i(C.validatedHandle),g+=1,f.set(S,g),u.delete(S),a(t));}).catch(()=>{s||F!==d||(c.set(S,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(S,g),u.delete(S),a(t));});},R=T=>{let S=_R(T),F=c.get(S);if(F)return F;let C=T.picture?.linkedRelationshipId;if(C){let H=o.resolveLinked(t,C);return c.set(S,H),g+=1,f.set(S,g),H}let E=Object.freeze({kind:"pending",resourceKey:S});return c.set(S,E),g+=1,f.set(S,g),v(T,S),E},P=T=>b.get(T)??null,O=Object.freeze({ownerPartName:t,projectionForAtom:P,project:T=>P(T.id),resourceOf:R}),k=T=>{let S=p.get(T);if(S)return S;let F=XR(T),C=null,E=(A,D)=>{if(!(D>=SB))for(let B of A){let j=b.get(B)?.textboxStory;if(!j)continue;let V=[];if(KR(j.content,V),V.length!==0){C||(C=[...F]);for(let z of V)C.push(z);E(V,D+1);}}};E(F,0);let H=C??F;return p.set(T,H),H};return {context:O,cacheTokenForPart:()=>`${t}|${g}|${d}|${b.size}`,drawingTokenForParagraph:T=>{let S=m.get(T);if(S?.resourceEpoch===g)return S.token;let F=k(T);if(F.length===0)return m.set(T,{resourceEpoch:g,token:""}),"";let C=F.map(H=>RB(b.get(H)??null,H,R,A=>f.get(_R(A))??0)).sort(),E=ne(C);return m.set(T,{resourceEpoch:g,token:E}),E},pendingResourceCount:()=>u.size,isCompatibleWith:(T,S)=>{let F=cb$1(S);if(F.cacheToken!==x.cacheToken)return false;if(T===n)return true;let C=Rm(T);if(h&&C&&h.size===C.size){let H=true;for(let[A,D]of h)if(C.get(A)!==D){H=false;break}if(H)return true}let E=ob$1(T,{resolveRelationship:hb$1(S,t),resolveSchemeColor:F.resolveSchemeColor,resolveStyleMatrixReference:F.resolveStyleMatrixReference});if(E.size!==b.size)return false;for(let[H,A]of b){let D=E.get(H);if(!D||vm(D)!==vm(A))return false}return true},dispose:()=>{s=true,d+=1;for(let T of c.values())T.kind==="ready"&&l(T.validatedHandle);c.clear(),u.clear(),f.clear();}}}var zR=0;function I$(e){let t=e.session.packageRevision(),n=e.session.currentPackage(),r=e.resourceLookup??Cb$1(n,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new WeakMap,l=new Map,s=new Map,d=p=>{l.set(p.resourceKey,p);let g=qb$1(p);g&&s.set(p.resourceKey,g);},c=p=>{l.delete(p.resourceKey);let g=s.get(p.resourceKey);g&&(rb$1(g),s.delete(p.resourceKey));},u=(p,g)=>{let x=g.currentPackage().parts.get(p)??a.get(p);if(x)return x;if(p===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${p}`)},f=(p,g)=>{let y=o.get(p);if(y)return y;let x=u(p,g);a.set(p,x);let b=PB({ownerPartName:p,part:x,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:d,forgetReadyHandle:c});return o.set(p,b),zR+=1,i.set(b,zR),b},m=p=>{let g=p.currentPackage();if(g.partBytes===n.partBytes&&g.relationships===n.relationships&&g.contentTypes===n.contentTypes){for(let[x,b]of o){let h=g.parts.get(x)??(x===p.part().name?p.part():void 0);if(h&&b.isCompatibleWith(h,g)){a.set(x,h);continue}b.dispose(),o.delete(x),a.delete(x);}t=p.packageRevision(),n=g;return}for(let x of o.values())x.dispose();o.clear(),a.clear();for(let x of s.values())rb$1(x);s.clear(),l.clear(),e.resourceLookup||r.dispose(),t=p.packageRevision(),n=g,r=e.resourceLookup??Cb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return f(e.session.part().name,e.session).context},contextForPart(p){return f(p,e.session).context},cacheTokenForPart(p){let g=f(p,e.session);return `${i.get(g)??0}|${g.cacheTokenForPart()}`},drawingTokenForParagraph(p,g){let y=f(g,e.session);return `${i.get(y)??0}|${y.drawingTokenForParagraph(p)}`},pendingResourceCount(){let p=0;for(let g of o.values())p+=g.pendingResourceCount();return p},mintValidatedBytes(p,g){return l.get(p.resourceKey)!==p?null:pb$1(p,g)},sync(p){p.packageRevision()===t&&p.currentPackage()===n||m(p);},dispose(){for(let p of o.values())p.dispose();o.clear(),a.clear();for(let p of s.values())rb$1(p);s.clear(),l.clear(),e.resourceLookup||r.dispose();}})}function RB(e,t,n,r){if(!e)return ne([t,"refused"]);let o=[t,vm(e),es(n(e))];return r&&o.push(String(r(e))),ne(o)}function YR(e,t,n){if(t===void 0)return VR(e,n);let r=WR.get(e);if(r&&r.epoch===t)return r.token;let o=VR(e,n);return WR.set(e,{epoch:t,token:o}),o}var WR=new WeakMap;function VR(e,t){return Xo(e,t)}var wB=4,Im=256;function kB(e){return `txbx-${e}`}var UR=new WeakMap;function e0(e,t,n,r="all-markup",o){if(!t||t.nums.size===0)return;let a=UR.get(e);if(a&&a.rawIndex===t&&a.styleCascade===n&&a.displayMode===r&&a.authorFilter===o)return a.listItems;let i=hc(t,n),l=Np(e,r,o),s=cp(l,i,n),d=s.size>0?s:void 0;return UR.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,listItems:d}),d}var t0=2e4,Tm=Object.freeze({contents:Object.freeze([]),truncated:false}),ts=new WeakMap;function vB(e){let t=[],n=0,r=false,o=[e];for(;o.length>0;){let a=o.pop();if(n+=1,n>t0){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}):Tm}function IB(e){let t=ts.get(e);if(t)return t;if(e.kind!=="table"){let l=vB(e);return ts.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"){ts.has(l.scan.paragraph)||ts.set(l.scan.paragraph,l.scan.contents.length>0?Object.freeze({contents:Object.freeze(l.scan.contents),truncated:false}):Tm);continue}let s=l.node;if(r+=1,r>t0){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}):Tm;return ts.set(e,i),i}var qR=1,ZR=new WeakMap;function TB(e){let t=ZR.get(e);return t===void 0&&(t=qR,qR+=1,ZR.set(e,t)),t}var JR=new WeakMap;function FB(e,t,n,r="all-markup",o){if(t.nums.size===0)return "";let a=IB(e);if(a.contents.length===0&&!a.truncated)return "";let i=JR.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=e0(d,t,n,r,o);if(c)for(let[u,f]of c)l.push(ne([u,f.cacheToken]));}a.truncated&&l.push(`truncated:${TB(t)}`);let s=l.length===0?"":`|txbxlist:${ne(l)}`;return JR.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,token:s}),s}function Jc(e,t,n,r,o){return Object.freeze({layoutTextboxStoryFor:e,hostedListTokenForParagraph:!t||t.nums.size===0?null:a=>FB(a,t,n,r,o)})}function Qc(e,t){let n=e.textboxStory;if(!n)return null;let r=Ct(e.extentEmu.cx),o=Ct(e.extentEmu.cy),a=Ct(n.insetsEmu.left),i=Ct(n.insetsEmu.right),l=Ct(n.insetsEmu.top),s=Ct(n.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-l-s),u=Ct(n.strokeWidthEmu),f={fillHex:n.fillHex,strokeHex:n.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((t.depth??0)>=wB)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:l},...f,fallbackReason:"textbox-nesting-limit"};let p=Np(n.content,t.displayMode,t.revisionAuthorFilter),g=e0(n.content,t.numberingIndex,t.styleCascade,t.displayMode,t.revisionAuthorFilter),y=kB(e.drawingNodeId),x=0,b=ca(p,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}${t.showFieldCodes?"|field-codes":""}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${y}-line-${x++}`,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}:{},showFieldCodes:t.showFieldCodes,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}:{}}),h=b.blocks,v=b.bottom,R,P=[];if(h.length>Im){QR(h.slice(Im),P),h=h.slice(0,Im);let I=h[h.length-1];v=I?I.box.y+I.box.height:0,R="textbox-fragment-limit";}if(v>c+.001){let I=h.filter(T=>T.box.y<c-.001);I.length<h.length&&(QR(h.filter(T=>T.box.y>=c-.001),P),h=I,R=R??"textbox-height-clip");}let O=Math.max(0,c-v),k=n.verticalAnchor==="center"?O/2:n.verticalAnchor==="bottom"?O:0;return {fragments:h,flowHeight:v,contentOffset:{x:a,y:l+k},...f,...R?{fallbackReason:R}:{},...P.length>0?{clippedResourceToken:ne(P)}:{}}}function QR(e,t){Ha({fragments:e},n=>{t.push(es(n.resource));});}function ua(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 Fm(e,t){return t===0?[...e]:e.map(n=>n.kind==="paragraph"?ua(n,t):{...n,box:{...n.box,y:n.box.y+t}})}function ns(e){let t=0;for(let n of e)En(n)||(t=Math.max(t,n.box.y+n.box.height));return t}function rs(e){let t=0;for(let n of e.fragments)t=Math.max(t,Om(n));return t}function Om(e){if(En(e))return 0;let t=e.kind==="paragraph"?e.spacing.after:0;return e.box.y+e.box.height-t}function eu(e){let t=Number.POSITIVE_INFINITY;for(let n of e.fragments){if(En(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 n0=new WeakMap;function os(e,t){let n=n0.get(e.fragments);n||(n=new WeakMap,n0.set(e.fragments,n));let r=n.get(t);if(r)return r;let o=OB(e,t);return n.set(t,o),o}function OB(e,t){let n=0,r=0,o=0,a=false;for(let d of e.fragments){if(d.kind==="paragraph"){if(!xr(d,t.paragraphId,t.atomOffset))continue;let c=CB(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&&!En(d));continue}if(MB(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 CB(e,t){for(let n of e.lines)for(let r of St(n))if(uy(r,t.paragraphId,t.atomOffset))return {top:n.box.y,bottom:n.box.y+n.box.height};return null}function MB(e,t){let n=r=>{for(let o of r){if(o.kind==="paragraph"){for(let a of t)if(xr(o,a.paragraphId,a.atomOffset))return true;continue}for(let a of o.rows)if(!a.isHeaderRepeat){for(let i of a.cells)if(n(i.blocks))return true}}return false};for(let r of e.rows)if(!r.isHeaderRepeat){for(let o of r.cells)if(n(o.blocks))return true}return false}function Cm(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 Mm=e=>e.kind!=="textValue",Or=(e,t)=>Mm(e)&&e.namespaceUri===da$1&&e.localName===t,r0=e=>e.children.filter(Mm),BB=(e,t)=>{let n=e.attributes.filter(r=>r.localName===t);return n.length===1&&n[0].namespaceUri===da$1?n[0].value:void 0};function as(e,{leadingTab:t=false,allowDecoration:n=false}={}){let r=0,o="",a="",i="",l=0;for(let s of r0(e))if(!Or(s,"pPr")){if(!Or(s,"r"))return;for(let d of r0(s)){if(Or(d,"rPr"))continue;if(Or(d,"tab")&&r===0&&!a&&!l&&t&&!d.children.length){l++;continue}if(Or(d,"fldChar")&&!d.children.length){let u=BB(d,"fldCharType");if(r===0&&u==="begin")r=1;else if(r===1&&u==="separate"&&Gr(o)==="PAGE")r=2;else if(r===2&&u==="end")r=3;else return;continue}if(d.children.some(Mm))return;let c=d.children.map(u=>u.kind==="textValue"?u.value:"").join("");if(Or(d,"instrText")&&r===1)o+=c;else if(n&&Or(d,"t")&&r===0)a+=c;else if(n&&Or(d,"t")&&r===3)i+=c;else if(!(Or(d,"t")&&r===2&&/^\d*$/.test(c)))return}}return r===3&&Gr(o)==="PAGE"&&l===Number(t)&&(!a&&!i||a==="- "&&i===" -")?a+i:void 0}var Lm=31680/20,l0=e=>e.kind!=="textValue",fa=(e,t)=>l0(e)&&e.namespaceUri===da$1&&e.localName===t,Li=e=>e.children.filter(l0),Bi=(e,t)=>{let n=e.attributes.filter(r=>r.localName===t);return n.length===1&&n[0].namespaceUri===da$1?n[0].value:void 0};function Bm(e,t){let n=Li(e).filter(r=>r.localName===t);return n.length===1&&fa(n[0],t)?n[0]:void 0}function o0(e){if(e===void 0||!/^\d{1,5}$/.test(e))return;let t=Number(e)/20;return t<=Lm?t:void 0}function a0(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 LB(e,t){return t.lines[0].spans.length===0&&Li(e).every(n=>fa(n,"pPr")||fa(n,"r")&&Li(n).every(r=>fa(r,"rPr")))}function i0(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 s0(e,t,n){if(!n||!fa(e.root,"ftr")||t.blocks.length!==2||!Number.isFinite(n.pageWidth)||n.pageWidth<=0||n.pageWidth>Lm||!Number.isFinite(n.marginLeft)||n.marginLeft<0||n.marginLeft>n.pageWidth)return t;let r=Li(e.root),[o,a]=t.blocks;if(r.length!==2||r.some(R=>R.kind!=="paragraph")||!o||!a||!a0(o)||!a0(a)||!i0(o,true)||!i0(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>Lm)return t;let i=Bm(r[0],"pPr"),l=Bm(r[1],"pPr");if(!i||!l||Li(i).some(R=>!["framePr","pStyle","tabs","jc","rPr"].some(P=>fa(R,P)))||Li(l).some(R=>!["pStyle","jc","ind","rPr"].some(P=>fa(R,P)))||as(r[0],{leadingTab:true,allowDecoration:true})===void 0||as(r[1],{allowDecoration:true})===void 0&&!LB(r[1],a))return t;let d=Bm(i,"framePr"),c=new Set(["w","wrap","vAnchor","hAnchor","x","yAlign"]);if(!d||d.children.length||d.attributes.some(R=>R.namespaceUri!==da$1||!c.has(R.localName))||Bi(d,"wrap")!=="around"||Bi(d,"vAnchor")!=="text"||Bi(d,"hAnchor")!=="page"||Bi(d,"yAlign")!=="center")return t;let u=o0(Bi(d,"w")),f=o0(Bi(d,"x"));if(u===void 0||u<=0||f===void 0||f+u>n.pageWidth)return t;let m=o.lines[0],p=1/0,g=-1/0;for(let R of m.spans)R.box.width<=0||R.text===" "||R.text.trim()===""||(p=Math.min(p,R.box.x-o.box.x),g=Math.max(g,R.box.x+R.box.width-o.box.x));if(!Number.isFinite(p)||!Number.isFinite(g)||p<0||!(g<=u||p>=u))return t;let y=ua(a,-a.box.y),x=(a.box.height-o.box.height)/2;if(x<0)return t;let b=ua(o,x-o.box.y),h=f-n.marginLeft-o.box.x,v={...b,clipToBox:true,box:{...b.box,x:o.box.x+h,width:u},lines:b.lines.map(R=>({...R,box:{...R.box,x:R.box.x+h},contentX:R.contentX+h,spans:R.spans.map(P=>({...P,box:{...P.box,x:P.box.x+h}}))}))};return {...t,blocks:[v,y],bottom:y.box.height}}var c0=e=>e.kind!=="textValue",Nt=(e,t)=>c0(e)&&e.namespaceUri===da$1&&e.localName===t,mo=(e,t)=>e.attributes.find(n=>n.namespaceUri===da$1&&n.localName===t)?.value;function pa(e){return e.children.filter(c0)}function EB(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()&&!Nt(r,"t")&&!Nt(r,"instrText"))return false;t.push({node:a,depth:o+1});}}}return true}function NB(e){let t="";for(let n of e.children){if(n.kind!=="textValue")return null;t+=n.value;}return t}function AB(e){let t=pa(e.root);if(t.length!==2||t.some(p=>p.kind!=="paragraph"))return null;let[n,r]=t,o=pa(n).find(p=>Nt(p,"pPr")),a=pa(r).find(p=>Nt(p,"pPr"));if(!o||!a)return null;let i=pa(o),l=pa(a);if(i.filter(p=>Nt(p,"framePr")).length!==1||i.filter(p=>Nt(p,"pStyle")).length!==1||l.filter(p=>Nt(p,"pStyle")).length!==1||i.some(p=>!["pStyle","framePr","jc","rPr"].some(g=>Nt(p,g)))||l.some(p=>!["pStyle","jc","rPr"].some(g=>Nt(p,g))))return null;let s=i.find(p=>Nt(p,"pStyle")),d=l.find(p=>Nt(p,"pStyle")),c=i.find(p=>Nt(p,"framePr"));if(!mo(s,"val")||mo(s,"val")!==mo(d,"val"))return null;let u="";for(let p of pa(r))if(!Nt(p,"pPr")){if(!Nt(p,"r"))return null;for(let g of pa(p)){if(Nt(g,"rPr"))continue;if(!Nt(g,"t"))return null;let y=NB(g);if(y===null)return null;u+=y;}}if(u&&!/^· {1,15}·$/.test(u))return null;let f=new Set(["wrap","vAnchor","hAnchor","xAlign","y"]);if(c.children.length||c.attributes.some(p=>p.namespaceUri!==da$1||!f.has(p.localName))||mo(c,"wrap")!=="around"||mo(c,"vAnchor")!=="text"||mo(c,"hAnchor")!=="margin"||mo(c,"xAlign")!=="center")return null;let m=mo(c,"y")??"0";return !["0","1"].includes(m)||as(n)!==""?null:{first:n.id,empty:r.id,y:Number(m)/20,decoration:u}}function d0(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 u0(e,t,n,r){if(!Nt(e.root,"ftr")||!EB(e))return t;let o=AB(e);if(!o)return s0(e,t,r);if(t.blocks.length!==2)return t;let[a,i]=t.blocks;if(!a||!i||!d0(a)||!d0(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=ua(a,o.y-a.box.y),s=ua(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,m=(n-(f-c))/2-c,p={...l,alignment:"center",box:{...l.box,x:c+m,width:f-c},lines:[{...d,box:{...d.box,x:c+m,width:f-c},contentX:d.contentX+m,spans:d.spans.map(g=>({...g,box:{...g.box,x:g.box.x+m}}))}]};return {...t,blocks:[p,s],bottom:Math.max(p.box.y+p.box.height,s.box.y+s.box.height)}}var DB=128,f0=new WeakMap;function _B(e){let t=f0.get(e);if(t!==void 0)return t;let n=B(ra$1(e));return f0.set(e,n),n}function jB(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 g0(e,t,n,r,o,a,i,l=DB,s,d=je,c,u,f,m,p,g){g?.showFieldCodes&&(r+="|field-codes");let y=g?.revisionAuthorFilter,x=ff(e.root),b=jB(l),h=wn(e,d,y),v=hi({numberingIndex:g?.numberingIndex,styleCascade:a},h).listItems,R=_B(e),P,O=k=>{let I=lo(x)||c?k:void 0,T=I?.pageNumber??m?.pageNumber??1,S=c&&I?.contentInsetTop!==void 0&&I.contentInsetBottom!==void 0&&I.storyTop!==void 0?`|hf:${I.contentInsetTop},${I.contentInsetBottom},${I.storyTop}`:"",F=Tp(I,x)+(c?`|pn:${T}`:"")+S;if(F===""){if(P)return P}else {let z=b.get(F);if(z)return z}let C=0,E=[],H=()=>{let z=I?.pageNumber??m?.pageNumber??1,Z=m?.pageWidth??t,U=m?.pageHeight??Math.max(1,t),te=m?.marginLeft??0,K=m?.marginRight??0,Q=m?.marginTop??0,w=m?.marginBottom??0,N=Math.max(1,U-Q-w),J=I?.contentInsetTop!==void 0&&I.contentInsetBottom!==void 0&&I.storyTop!==void 0?Object.freeze({top:I.contentInsetTop-I.storyTop,height:Math.max(1,U-I.contentInsetTop-I.contentInsetBottom)}):void 0;return Object.freeze({pageNumber:z,pageWidth:Z,pageHeight:U,marginLeft:te,marginRight:K,marginBottom:w,contentInsetTop:Q,contentInsetBottom:w,contentWidth:t,...J?{verticalMarginFrame:J}:{},contentHeight:N,contentBandHeight:N,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},D=c?Jc(z=>Qc(z,{measurer:n,producer:r+F+(d===je?"":`|rev:${d}`)+(y?`|reviewers:${y.cacheKey}`:""),cache:o,styleCascade:a,...I?{pageContext:I}:{},...s!==void 0?{defaultTabStopPt:s}:{},compatibilityMode:g?.compatibilityMode,displayMode:d,...y?{revisionAuthorFilter:y}:{},...p?{documentProperties:p}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},showFieldCodes:g?.showFieldCodes,inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},...g?.numberingIndex?{numberingIndex:g.numberingIndex}:{}}),g?.numberingIndex,a,d,y):void 0,B=Object.freeze([]),j;if(c){let z=false;for(let Z=0;Z<Jo;Z+=1){E.splice(0,E.length),C=0,j=ca(h,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+F+(d===je?"":`|rev:${d}`)+(y?`|reviewers:${y.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${C++}`,styleCascade:a,...v?{listItems:v}:{},hostedStory:D,pageContext:I,...s!==void 0?{defaultTabStopPt:s}:{},compatibilityMode:g?.compatibilityMode,tableNestingOffset:1,displayMode:d,...y?{revisionAuthorFilter:y}:{},...p?{documentProperties:p}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},showFieldCodes:g?.showFieldCodes,...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},inlineDrawingLayout:c,anchorFrameBase:H,pageContentClip:()=>{let te=H();return I?.storyTop!==void 0?Object.freeze({x:-te.marginLeft,y:-I.storyTop,width:te.pageWidth,height:te.pageHeight}):Zo(te)},collectAnchoredDrawings:te=>{E.push(...te);},columnBoxForParagraph:te=>Object.freeze({x:0,y:te.y,width:t,height:te.height}),pageExclusionZones:()=>B,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});let U=qf(E,c,0,t);if(U.length===0){z=true,B=U;break}if(Z>0&&Jn(B)===Jn(U)){z=true,B=U;break}B=U;}if(!z)throw new li(`header/footer exclusion reflow did not converge within ${Jo} passes`)}else j=ca(h,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+F+(d===je?"":`|rev:${d}`)+(y?`|reviewers:${y.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${C++}`,styleCascade:a,...v?{listItems:v}:{},pageContext:I,...s!==void 0?{defaultTabStopPt:s}:{},compatibilityMode:g?.compatibilityMode,tableNestingOffset:1,displayMode:d,...y?{revisionAuthorFilter:y}:{},...p?{documentProperties:p}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},showFieldCodes:g?.showFieldCodes,...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});j=u0(e,j,t,m);let V={partName:e.name,part:e,contentKey:R,...g?.projectionEpoch?{projectionEpoch:g.projectionEpoch}:{},fragments:j.blocks,flowHeight:j.bottom,pageFieldNeeds:x,...E.length>0?{anchoredDrawings:Object.freeze([...E])}:{},withPageContext:z=>!lo(x)&&!V.anchoredDrawings?.length?P??V:O(z)};return F===""?P=V:b.set(F,V),V};return O(i)}function ma(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 Cp(u,f,r),f;let m=u.pageFieldProjector;return {...f,pageFieldProjector:p=>{let g=m(p);return {...g,box:o(g.box)}}}},i=u=>{if(u)return {...u,box:o(u.box),...u.separator?{separator:{...u.separator,box:o(u.separator.box)}}:{},notes:u.notes.map(f=>({...f,box:o(f.box)}))}},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 p0=new WeakMap;function HB(e){let t=p0.get(e);if(t!==void 0)return t;let n=[];rf(e,o=>{let a=o.marker;a&&n.push(ne([o.paragraphId,a.text,a.numFmt,String(a.level)]));});let r=n.length===0?"":`|list:${ne(n)}`;return p0.set(e,r),r}var m0=new WeakMap;function zB(e){let t=m0.get(e);if(t!==void 0)return t;let n=[];Ha(e,o=>{n.push(es(o.resource)),o.kind==="anchoredDrawing"&&o.textboxStory?.clippedResourceToken&&n.push(`clip:${o.textboxStory.clippedResourceToken}`);});let r=n.length===0?"":`!${ne(n)}`;return m0.set(e,r),r}function Em(e,t){return ne([e,String(t.flowHeight),t.contentKey,t.projectionEpoch??"",zB(t),HB(t)])}function h0(e,t,n){if(!e)return "";let r=(o,a)=>ne([...a].map(([i,l])=>Em(`${o}${i}`,l)).sort());return `|hf:${t},${n},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+ne([r("h",e.headers),r("f",e.footers)])}var WB="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",VB="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";function GB(e){let t=new Map;for(let n of e.relationships.get(e.mainDocumentPart)??[]){if(n.type!==WB&&n.type!==VB)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 $B(e){return e.relationships.get(e.mainDocumentPart)??e.relationships}function gK(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:m,linkProjectors:p,projectFieldLink:g,showFieldCodes:y}=e,x=new WeakMap,b=new WeakMap,h=(T,S,F)=>{if(S.rId===F)return S;let C=b.get(T);C||(C=new WeakMap,b.set(T,C));let E=C.get(S),H=E?.get(F);if(H)return H;let A={...S,rId:F,withPageContext:D=>h(T,S.withPageContext(D),F)};return E||(E=new Map,C.set(S,E)),E.set(F,A),A},v=new Map,R=null,P=(T,S,F)=>(R!==S&&(R=S,v=GB(T)),v.get(F)),O=(T,S,F)=>{let C=p.epochForPart(T.name),E=c?.cacheKey??"",H=l?.(),A=s?.(),D=f?.(T.name)??"",B=i?.(),j=a?.(),V=p.projectLinkForPart(T.name),z=x.get(T);if(z&&z.width===S&&z.pageHeight===F.height&&z.marginTop===F.margin.top&&z.marginBottom===F.margin.bottom&&z.marginLeft===F.margin.left&&z.marginRight===F.margin.right&&z.producer===r&&z.projectionEpoch===C&&z.revisionAuthorFilterKey===E&&z.defaultTabStopPt===H&&z.compatibilityMode===A&&z.drawingLayoutToken===D&&z.numberingIndex===B&&z.styleCascade===j)return z.story;let Z=g0(T,S,n,r,o,j,void 0,void 0,H,d,u?.(T.name),m?U=>m(T.name,U):void 0,void 0,{pageNumber:1,pageWidth:F.width,pageHeight:F.height,marginLeft:F.margin.left,marginRight:F.margin.right,marginTop:F.margin.top,marginBottom:F.margin.bottom},t.documentProperties(),{compatibilityMode:A,...B?{numberingIndex:B}:{},projectLink:V,...g?{projectFieldLink:g}:{},showFieldCodes:y,projectionEpoch:C,projectionTokenForParagraph:U=>p.tokenForParagraphForPart(T.name,U),projectionTokenForTable:U=>p.tokenForTableForPart(T.name,U),...c?{revisionAuthorFilter:c}:{}});return x.set(T,{width:S,pageHeight:F.height,marginTop:F.margin.top,marginBottom:F.margin.bottom,marginLeft:F.margin.left,marginRight:F.margin.right,producer:r,projectionEpoch:C,revisionAuthorFilterKey:E,defaultTabStopPt:H,compatibilityMode:A,drawingLayoutToken:D,numberingIndex:B,styleCascade:j,story:Z}),Z},k=(T,S,F,C,E)=>{if(!F||F.headers.size===0&&F.footers.size===0)return;let H=E.width-E.margin.left-E.margin.right,A=(D,B)=>{let j=new Map;for(let[V,z]of D){let Z=B?.get(V),U=Z?.partName===z.name?Z.rId:P(T,S,z.name),te=O(z,H,E);j.set(V,U?h(S,te,U):te);}return j};return {titlePage:F.titlePage,evenAndOddHeaders:F.evenAndOddHeaders,headers:A(F.headers,C?.headers),footers:A(F.footers,C?.footers)}},I=()=>{let T=t.currentPackage(),S=$B(T),F=yp(t.part(),d,c),C=vS(t.part(),d,c),E=t.headerFooterPartsBySection(),H=t.headerFooterResolutionBySection?.()??Pd$1(T);return F.map((A,D)=>{let B=C[D]??D;return k(T,S,E[B],H[B],oo(A.properties))})};return {sectionFurniture:I,furniture(){let T=I();return T[T.length-1]}}}function KB(e,t,n,r,o){let a=wn(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"?er(s):void 0});let i=[];for(let l of a){if(l.kind!=="paragraph")continue;let s=er(l);s&&i.push(s);}for(;i.length<t.length;)i.push(void 0);return i}function wK(e){let t=e.view.currentPackage(),n=Wf$1(t,"footnote"),r=Wf$1(t,"endnote");if(!n&&!r)return;let o=e.view.part();if(Xf$1(o).length===0)return;let a=Lf$1(t),i=Mf$1(a),l=Nf$1(a),s=Of$1(void 0,i),d=Pf$1(void 0,l),c=bp(o,e.displayMode,e.revisionAuthorFilter),u=KB(o,c.sections,c.truncated,e.displayMode,e.revisionAuthorFilter),f=c.sections.map((y,x)=>Of$1(Jf$1(u[x]),i)),m=c.sections.map((y,x)=>Pf$1(Kf$1(u[x]),l)),p=e.inlineDrawingLayoutForPart?y=>{let x=e.inlineDrawingLayoutForPart(y);if(x)return {inlineDrawingLayout:x,...e.drawingTokenForParagraphForPart?{drawingTokenForParagraph:b=>e.drawingTokenForParagraphForPart(y,b)}:{}}}:void 0,g=[n,r];return {footnotesPart:n,endnotesPart:r,footnotePropsBySection:f.length>0?f:[s],endnotePropsBySection:m.length>0?m:[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(y=>y?e.linkProjectors.epochForPart(y.name):"").join("\0"),...e.projectFieldLink?{projectFieldLink:e.projectFieldLink}:{},showFieldCodes:e.showFieldCodes,projectionTokenForParagraphForPart:e.linkProjectors.tokenForParagraphForPart,projectionTokenForTableForPart:e.linkProjectors.tokenForTableForPart,projectionEpoch:g.map(y=>y?e.linkProjectors.epochForPart(y.name):"").join("\0"),...p?{drawingsForPart:p}:{},...p&&e.drawingLayoutEpochForPart?{drawingLayoutEpoch:g.map(y=>y?e.drawingLayoutEpochForPart(y.name):"").join("\0")}:{}}}function kK(e,t,n){return Af$1(e.currentPackage(),t,n)}var XB=new TextEncoder,YB=512,go=Object.freeze({title:"field-projected",creator:"field-projected",subject:"field-projected",keywords:"field-projected",lastModifiedBy:"field-projected",description:"field-projected",company:"reserved",manager:"reserved"}),UB=Object.freeze({title:go.title,creator:go.creator,subject:go.subject,keywords:go.keywords,lastModifiedBy:go.lastModifiedBy,description:go.description}),Nm=Object.freeze(Object.keys(UB)),y0=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"}),b0=new WeakMap;function qB(e){let t=b0.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=Tc(s,[],void 0,void 0,void 0,void 0,"all-markup",void 0,void 0,void 0,void 0,y0),c=new Set(d.map(u=>u.text));for(let u of Nm)c.has(y0[u])&&a.add(u);}let i=Nm.filter(s=>a.has(s)),l=Object.freeze({links:Object.freeze(n),documentProperties:Object.freeze(i)});return b0.set(e,l),l}function x0(e){return a$1(XB.encode(ne(e)))}var S0=new WeakMap;function P0(e,t){let n=new WeakMap,r=new WeakMap,o=l=>{let s=e.packageRevision(),d=e.currentPackage(),c=S0.get(e);(!c||c.revision!==s||c.pkg!==d)&&(c={revision:s,pkg:d,epochs:new Map},S0.set(e,c));let u=c.epochs.get(l);if(u!==void 0)return u;let f=["story-projection-part:v1",l];f.push(ne(Object.keys(go).map(g=>`${g}:${go[g]}`)));for(let g of d.relationships.get(l)??[])f.push(ne([g.id,g.type,g.rawTarget,g.targetMode,String(g.order)]));for(let g of d.externalTargets)g.ownerPart===l&&f.push(ne([g.id,g.type,g.rawTarget,g.sinkSafe?"1":"0"]));let m=e.documentProperties();for(let g of Nm)f.push(ne([g,m[g]??""]));let p=`story-projection-part:${x0(f)}`;return c.epochs.size<YB&&c.epochs.set(l,p),p},a=(l,s)=>{let d=qB(s);if(d.links.length===0&&d.documentProperties.length===0)return "";let c=t(l),u=o(l),f=n.get(s),m=f?.get(c);if(m?.epoch===u)return m.token;let p=e.documentProperties(),g=["story-projection:v1"];for(let b of d.links){let h=c(b);g.push(h?ne([h.id,h.kind,h.href??"",h.anchor??"",h.tooltip??""]):"no-link");}for(let b of d.documentProperties)g.push(ne([b,p[b]??""]));let y=`story-projection:${x0(g)}`,x=f??new WeakMap;return x.set(c,{epoch:u,token:y}),f||n.set(s,x),y};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 m=Xo(s,g=>a(l,g)),p=u??new WeakMap;return p.set(d,{epoch:c,token:m}),u||r.set(s,p),m},epochForPart:o})}var ZB=512;function R0(e){return t=>{if(t.kind==="textValue")return null;let n=ab$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 BK(e){let t=R0(o=>e.relationshipTarget(o)),n=new Map,r=o=>{let a=n.get(o);if(a)return a;let i=R0(l=>Af$1(e.currentPackage(),o,l));return n.size<ZB&&n.set(o,i),i};return Object.freeze({projectLink:t,projectLinkForPart:r,...P0(e,r)})}var JB=4096;function QB(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 AK(){let e=new Map,t=new Map,n=0;return {project(r){let o=QB(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>=JB)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 w0=new WeakMap;function eL(e){let t=w0.get(e);if(t!==void 0)return t;let n=tL(e);return w0.set(e,n),n}function tL(e){let t=(n,r)=>{if(n.kind==="textValue"||r>=la$1||ae(n)||_d$1(n)!==null)return false;if(n.kind==="text"||n.localName==="t"){for(let a of n.children)if(a.kind==="textValue"&&a.value.trim().length>0)return true;return false}let o=ma$1(n,r);for(let a of n.children)if(a.kind!=="textValue"&&t(a,o))return true;return false};for(let n of e.children)if(n.kind!=="textValue"&&t(n,0))return true;return false}function T0(e,t){for(let n of t.resultParagraphIds){let r=Ha$1(e,n);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&eL(r))return true}return false}var k0=new WeakMap,v0=new WeakMap,I0=new WeakMap;function F0(e){let t=k0.get(e);if(t)return t;let n=new Set;for(let r of Be(e))n.add(r.beginParagraphId),n.add(r.endParagraphId);return k0.set(e,n),n}function O0(e){let t=v0.get(e);if(t)return t;let n=new Set;for(let r of Be(e))T0(e,r)||n.add(r.beginParagraphId);return v0.set(e,n),n}function C0(e){let t=I0.get(e);if(t)return t;let n=new Set;for(let r of Be(e))if(!T0(e,r))for(let o of r.resultParagraphIds)n.add(o);return I0.set(e,n),n}function is(e){return e?Vd(e.val,e.widthPt):0}function tu(e,t,n){return e==="page"?t?.spacePt??0:Math.max(0,n-(t?.spacePt??0)-is(t))}function nu(e,t,n){if(!e||e.display==="firstPage"&&!n||e.display==="notFirstPage"&&n)return;let r=is(e.top),o=is(e.left),a=is(e.bottom),i=is(e.right),l=tu(e.offsetFrom,e.top,t.margin.top),s=tu(e.offsetFrom,e.left,t.margin.left),d=t.height-tu(e.offsetFrom,e.bottom,t.margin.bottom),c=t.width-tu(e.offsetFrom,e.right,t.margin.right),u=c-s,f=d-l;if(u<=0||f<=0)return;let m=[];if(e.top&&m.push({side:"top",edge:e.top,box:{x:s,y:l,width:u,height:r}}),e.bottom&&m.push({side:"bottom",edge:e.bottom,box:{x:s,y:d-a,width:u,height:a}}),e.left&&m.push({side:"left",edge:e.left,box:{x:s,y:l,width:o,height:f}}),e.right&&m.push({side:"right",edge:e.right,box:{x:c-i,y:l,width:i,height:f}}),m.length!==0)return {zOrder:e.zOrder,display:e.display,strokes:m}}function M0(e){if(e.clipToBox)return e.box;let t=e.box.x,n=t+e.box.width,r=o=>{t=Math.min(t,o.x),n=Math.max(n,o.x+o.width);};e.marker&&r(e.marker.box);for(let o of e.lines){for(let a of o.spans)r(a.box);for(let a of o.drawings??[])r(a);}return t===e.box.x&&n===e.box.x+e.box.width?e.box:{...e.box,x:t,width:n-t}}var nL="http://schemas.openxmlformats.org/wordprocessingml/2006/main",rL="http://schemas.microsoft.com/office/word/2010/wordml",oL="http://schemas.microsoft.com/office/word/2012/wordml";function aL(e){if(e.kind!=="textValue"){for(let t of e.attributes)if(t.localName==="val"&&t.namespaceUri===nL)return t.value}}function Ei(e){for(let t of e.children)if(t.kind!=="textValue"&&(t.kind==="contentControlProperties"||t.localName==="sdtPr"))return t}function ga(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}}function Cr(e,t){let n=ga(e,t);return n?aL(n):void 0}function ls(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function ru(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(r==="docPartList")return "buildingBlockGallery";if(n==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(n==="contentControlCheckbox"||r==="checkbox"&&o===rL)return "checkbox";if(r==="repeatingSection"&&o===oL)return "repeatingSection"}return "richText"}function B0(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(Ed$1(o)&&r<Dd$1){let a=t(Hd$1(o),r+1);if(a)return a}}return null};return t(Hd$1(e),0)??"inline"}function Ni(e){let t=L0.get(e);if(t!==void 0)return t;let n=iL(e);return ou!==null&&ou===n?n=ou:ou=n,L0.set(e,n),n}var ou=null,L0=new WeakMap,E0=new WeakMap;function iL(e){let t=(n,r)=>{if(n.kind==="textValue")return "";let o=n.kind==="paragraph"||n.kind==="table"||Ed$1(n);if(o){let i=E0.get(n);if(i!==void 0&&i.depth===r)return i.token}let a;if(Ed$1(n)){if(r>=Dd$1)return "";let i=Ei(n),l=[n.id,Cr(i,"alias")??"",Cr(i,"tag")??"",ls(Cr(i,"lock")),ru(i),ga(i,"showingPlcHdr")?"1":"0",ga(i,"dataBinding")?"1":"0"].join(":"),s=Hd$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&&E0.set(n,{depth:r,token:a}),a};return t(e.root,0)}function A0(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 Am=new WeakMap,N0=new WeakMap;function D0(e){if(e.length===1)return ss(e[0]);let t=Am.get(e[0]);if(t&&au(t.parts,e))return t.index;let n=e.map(d=>ss(d)),r=N0.get(n[0]);if(r&&au(r.indexes,n))return Am.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 N0.set(n[0],{indexes:n,index:s}),Am.set(e[0],{parts:e,index:s}),s}var Dm=new WeakMap;function au(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 _0=new WeakMap;function lL(e){for(let t of yd$1(e))if(t.root.kind!=="textValue"){for(let n of t.root.children)if(n.kind!=="textValue")return n}return null}function ss(e){let t=Dm.get(e);if(t!==void 0)return t;let n=dL(e),r=lL(e),o=r?_0.get(r):void 0;if(o&&au(o.lists,n))return Dm.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&&_0.set(r,{lists:n,index:s}),Dm.set(e,s),s}var sL=Object.freeze([]);function dL(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=xd$1(d);if(c!==null&&s<Dd$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$1)){for(let u of i)if(!(u.kind==="textValue"||u.kind==="paragraphProperties")){if(Ed$1(u)){let f=Ue(l).spanOf(u);if(!f)continue;let m=Ei(u),p=ls(Cr(m,"lock")),g=[...c,p];r(Hd$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 x of c.children)x.kind==="tableRow"&&o([x],l,s,d);continue}if(c.kind==="tableRow"){for(let x of c.children)x.kind==="tableCell"?o(x.children,l,s,d):Ed$1(x)&&o([x],l,s,d);continue}if(!Ed$1(c)){let x=xd$1(c);x!==null&&d<Dd$1&&o(x,l,s,d+1);continue}if(l>=Dd$1)continue;let u=Ei(c),f=ls(Cr(u,"lock")),m=[...s,f],p=B0(c),g=xd$1(c)??[];if(p==="inline"){o(g,l+1,m,d+1);continue}let y=[];n(g,y),t.push({control:c,nestingDepth:l,lockStack:m,level:p,blockIds:y}),o(g,l+1,m,d+1);}},a=[];for(let i of yd$1(e))if(i.root.kind!=="textValue")for(let l of i.root.children){if(l.kind==="textValue")continue;let s=j0.get(l);if(s!==void 0){a.push(s);continue}let d=t.length;o([l],0,[]);let c=t.length===d?sL:Object.freeze(t.slice(d));j0.set(l,c),a.push(c);}return a}var j0=new WeakMap,_m=1<<20,H0=new WeakMap,z0=null,W0=0;function cL(e){return e!==z0&&(z0=e,W0+=1),W0}function uL(e,t,n,r){let o=H0.get(e);if(o!==void 0&&o.neededStamp===n)return o;let a=[],i=[],l=e.index*_m,s=0,d=0,c=m=>s===0&&d===0?m:{x:m.x+s,y:m.y+d,width:m.width,height:m.height},u=(m,p)=>{if(p.kind==="paragraph"){t.neededBlockIds.has(p.paragraphId)&&(a.push({pageIndex:m,blockId:p.paragraphId,box:c(M0(p))}));let g=t.neededParagraphIds.has(p.paragraphId);for(let y of p.lines){let x=l;if(l=Math.min(l+1,e.index*_m+_m-1),!g)continue;let b=Math.max(0,y.box.height-y.leading-(y.trailingSpacing??0)),h=[];for(let v of y.spans)h.push({pageIndex:m,paragraphId:v.range.paragraphId,start:v.range.start,end:v.range.end,line:x,box:{x:v.box.x+s,y:v.box.y+y.leading+d,width:v.box.width,height:b}});for(let v of y.drawings??[])h.push({pageIndex:m,paragraphId:v.paragraphId,start:v.start,end:v.start+1,line:x,box:c(v.paintBounds)});y.drawings?.length&&h.sort((v,R)=>v.start-R.start||v.end-R.end);for(let v of h)i.push(v);}return}t.neededBlockIds.has(p.tableId)&&(a.push({pageIndex:m,blockId:p.tableId,box:c(p.box)}));for(let g of p.rows)if(!g.isHeaderRepeat)for(let y of g.cells)for(let x of y.blocks)u(m,x);};for(let m of e.fragments)u(e.index,m);for(let m of [e.header,e.footer])if(m){s=m.box.x-e.contentBox.x,d=m.box.y-e.contentBox.y;for(let p of m.fragments)u(e.index,p);}s=0,d=0;let f={neededStamp:n,blocks:a,spans:i};return H0.set(e,f),f}function fL(e,t,n){let r=cL(t.neededToken),o=new Map,a=new Map,i=new Set;for(let l of e.pages){let s=uL(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 pL(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=id(i);return l?[{pageIndex:a,box:l}]:[]})}function mL(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;if(c.add(f.pageIndex),f.start===f.end&&f.start===t.start&&f.box.width>0){if(d.push({pageIndex:f.pageIndex,box:f.box}),!i)break;continue}let m=f.start===f.end?f.box.x:f.box.x+f.box.width*(t.start-f.start)/Math.max(1,f.end-f.start);if(d.push({pageIndex:f.pageIndex,box:{x:m,y:f.box.y,width:0,height:f.box.height}}),!i)break}if(d.length>0)return d}return [...a.entries()].sort(([d],[c])=>d-c).flatMap(([,d])=>{let c=id(d.boxes);return c?[{pageIndex:d.pageIndex,box:c}]:[]})}var V0=new WeakMap;function gL(e){let t=V0.get(e);if(t!==void 0)return t;let n=Ei(e),r=Cr(n,"alias"),o=Cr(n,"tag"),a={...r!==void 0?{alias:r}:{},...o!==void 0?{tag:o}:{},controlType:ru(n),placeholder:ga(n,"showingPlcHdr")!==void 0,bound:ga(n,"dataBinding")!==void 0};return V0.set(e,a),a}function hL(e,t,n){let r=e.level==="inline"&&e.paragraphId&&e.range?mL(e.paragraphId,e.range,t):pL(e.blockIds,t);return {...zm(e),fragments:r}}function yL(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 bL(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&&yL(e.fragments,t.fragments)}function Ai(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(!bL(e[n],t[n]))return false;return true}function jm(e,t){return {...t,revision:e.revision,pages:e.pages}}var G0=new WeakMap;function Hm(e,t,n=Ni(t),r){let o=A0(e,t);if(o.length>1){let f=o.map(m=>Ni(m));n=f.some(m=>m!=="")?f.join("|"):"";}if(n===""){let f=e.pages.some(p=>p.contentControls!==void 0&&p.contentControls.length>0);if(!f&&e.controlContextToken===n&&Ai(e.contentControls,[]))return e;let m=f?e.pages.map(p=>p.contentControls!==void 0&&p.contentControls.length>0?{...p,contentControls:[]}:p):e.pages;return {...e,pages:m,contentControls:[],controlContextToken:n}}let a=D0(o),i=fL(e,a),l=a.controls.map(f=>hL(f,i)),s=new Map;for(let f of l)for(let m of f.fragments){let p=s.get(m.pageIndex),g={...f,fragments:[m]};p?p.push(g):s.set(m.pageIndex,[g]);}if(e.controlContextToken===n&&Ai(e.contentControls,l)&&e.pages.every(f=>Ai(f.contentControls,s.get(f.index)??[])))return e;let d=false,c=e.pages.map(f=>{let m=s.get(f.index)??[];if(Ai(f.contentControls,m)||m.length===0&&!f.contentControls)return f;d=true;let p=G0.get(f);if(p&&Ai(p.controls,m))return p.wrapped;let g={...f,contentControls:m};return G0.set(f,{controls:m,wrapped:g}),g}),u=d?c:e.pages;return u===e.pages&&e.controlContextToken===n&&Ai(e.contentControls,l)?e:{...e,pages:u,contentControls:l,controlContextToken:n}}function s2(e,t){return ss(e).controls.filter(r=>t?r.paragraphId!==void 0?t.has(r.paragraphId):$0(r.control).some(o=>t.has(o)):true).map(zm)}function $0(e){let t=[],n=r=>{for(let o of r)if(o.kind!=="textValue"){if(o.kind==="paragraph"){t.push(o.id);continue}if(Ed$1(o)){n(Hd$1(o));continue}n(o.children);}};return n(Hd$1(e)),t}function d2(e,t){let n=null;for(let r of ss(e).controls)(r.paragraphId===t||r.blockIds.includes(t)||$0(r.control).includes(t))&&(!n||r.nestingDepth>=n.nestingDepth)&&(n=r);return n?zm(n):null}function zm(e){let t=gL(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:af(e.lockStack),placeholder:t.placeholder,bound:t.bound,nestingDepth:e.nestingDepth,level:e.level,fragments:[]}}var ds=rd$1,iu=512,Wm=6,xL=1/3;function SL(e,t){return `note-${e}-${t}`}function y2(e){if(!e)return [];let t=[];for(let n of td$1(e.root)){if(t.length>=ds)break;kd$1(n)&&t.push(n);}return t}function PL(e,t){if(e){for(let n of td$1(e.root))if(jd$1(n)===t)return n}}function X0(e,t,n){let r=hd$1(e),o=id$1(e);if(!r||o===null)return null;let a=_c$1(r,o),i=n.displayMode??je,l=Al(e,i,n.revisionAuthorFilter),s=SL(r,o),d=0,c=Math.max(1,t),u=n.maxFlowHeightPt??Number.POSITIVE_INFINITY,f=n.noteMarks?{...n.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},m=n.ownerPartName?n.drawingsForPart?.(n.ownerPartName):void 0,p=(n.ownerPartName?n.projectLinkForPart?.(n.ownerPartName):void 0)??n.projectLink,g=hi({numberingIndex:n.numberingIndex,styleCascade:n.styleCascade},l).listItems,y=ca(l,0,c,0,0,{measurer:n.measurer,cache:n.cache,producer:n.producer+(n.showFieldCodes?"|field-codes":"")+(i===je?"":`|rev:${i}`)+(n.revisionAuthorFilter?`|reviewers:${n.revisionAuthorFilter.cacheKey}`:"")+`|${a}`,nextLineId:()=>`${s}-line-${d++}`,styleCascade:n.styleCascade,...g?{listItems:g}:{},noteMarks:f,...p?{projectLink:p}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},showFieldCodes:n.showFieldCodes,...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.ownerPartName&&n.projectionTokenForParagraphForPart?{projectionTokenForParagraph:v=>n.projectionTokenForParagraphForPart(n.ownerPartName,v)}:{},...n.ownerPartName&&n.projectionTokenForTableForPart?{projectionTokenForTable:v=>n.projectionTokenForTableForPart(n.ownerPartName,v)}:{},...n.refFields?{refFields:n.refFields}:{},displayMode:i,compatibilityMode:n.compatibilityMode,tableNestingOffset:1,...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...m?{inlineDrawingLayout:m.inlineDrawingLayout,...m.drawingTokenForParagraph?{drawingTokenForParagraph:m.drawingTokenForParagraph}:{}}:{},...n.revisionAuthorFilter?{revisionAuthorFilter:n.revisionAuthorFilter}:{}}),x=y.blocks,b=y.bottom,h;if(x.length>iu){x=x.slice(0,iu);let v=x[x.length-1];b=v?v.box.y+v.box.height:0,h="note-fragment-limit";}if(b>u){let v=[],R=0;for(let P of x){let O=P.box.y+P.box.height;if(O>u+.001&&v.length>0)break;v.push(P),R=O;}x=v,b=R,h=h??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:jd$1(e),fragments:x,flowHeight:b,...h?{fallbackReason:h}:{}}}function K0(e,t,n,r){if(!e)return null;let o=vd$1(e.root,t);return o?X0(o,n,{...r,ownerPartName:e.name}):null}function cs(e,t,n,r,o){if(!o)return K0(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=K0(e,t,n,r);return o.set(a,l),l}function RL(e,t){return "single"}function wL(e,t,n){let r=Al(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(Xd(a)).length>0||!kL(o))return false}return true}function kL(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="paragraphProperties"){if(t.kind==="run"){if(!vL(t))return false;continue}return false}return true}function vL(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="runProperties"&&!(fd$1(t)||gd$1(t)||ed$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 Vm(e,t,n,r,o,a){let i=RL(),l=PL(e,t);if(l){if(wL(l,r.displayMode,r.revisionAuthorFilter))return {kind:t,fragments:[],flowHeight:Wm,synthetic:false,ruleStyle:i};let s=X0(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:Wm,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:t,fragments:s.fragments,flowHeight:s.flowHeight,synthetic:false}}}return {kind:t,fragments:[],flowHeight:Wm,synthetic:true,ruleStyle:i}}function IL(e,t){let n=Math.max(1,e*xL);return {x:0,y:Math.max(0,(t-.75)/2),width:n,height:.75}}function Gm(e,t,n,r){if(e.ruleStyle!==void 0||e.synthetic){let o=IL(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 Y0=new WeakMap,U0=new WeakMap;function TL(e,t,n){let r=e.map(o=>`${o.blockStart}-${o.blockEndExclusive}`).join(",");return `${t};${n?.cacheKey??""};${r}`}function $m(e){let t=Yr(e);return t?t.members.map(n=>n.id):[e.id]}function Km(e){let t=U0.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),U0.set(e,n),n}function FL(e,t){if(e.kind!==t.kind)return false;let n=e.kind==="paragraph"?$m(e):Km(e),r=t.kind==="paragraph"?$m(t):Km(t);return n.length===r.length&&n.every((o,a)=>o===r[a])}function q0(e,t,n,r,o){let a=wn(e,n,r),i=TL(t,n,r),l=o?Y0.get(o):void 0;if(l?.boundsFingerprint===i&&l.blocks.length===a.length&&a.every((d,c)=>d===l.blocks[c]||FL(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 m=f.kind==="paragraph"?$m(f):Km(f);for(let p of m)s.set(p,d);}}return o&&Y0.set(o,{blocks:a,boundsFingerprint:i,map:s}),s}function Di(e,t){return Math.max(0,e-14-t)}var us=.5,Z0=2*us;function lu(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 J0(e,t,n){n<=0||e.set(t,Math.max(e.get(t)??0,n));}function ho(e){let t=new Map;for(let[n,r]of e)r>0&&t.set(n,r);return t}function su(e,t){let n=ho(e),r=ho(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 Q0(e,t){let n=ho(e);for(let[r,o]of t)o<=0||n.set(r,Math.max(n.get(r)??0,o));return n}function _i(e){return [...ho(e)].map(([t,n])=>`${t}=${n}`).sort().join(",")}function OL(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,m=e.borders?.filter(g=>g.side!=="top"),p={...e,id:`${e.paragraphId}#f${e.fragmentIndex+1}`,fragmentIndex:e.fragmentIndex+1,range:{paragraphId:e.paragraphId,start:o[0].range.start,end:o[o.length-1].range.end},spacing:{before:0,after:e.spacing.after},lines:o,box:{x:e.box.x,y:u,width:e.box.width,height:Math.max(0,f-u)},marker:void 0,...m&&m.length>0?{borders:m}:{borders:void 0},...e.bottomBorder?{bottomBorder:e.bottomBorder}:{},...e.shadingBox?{shadingBox:{x:e.shadingBox.x,y:u,width:e.shadingBox.width,height:Math.max(0,f-u)}}:{}};return {head:d,tail:p}}function fs(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<iu;u+=1){let f=e.fragments[u],m=f.box.y+f.box.height;if(m<=t+.001){r.push(f),o=m,a=u+1;continue}if(f.kind==="paragraph"){let p=OL(f,t);if(p.head)r.push(p.head),o=p.head.box.y+p.head.box.height,i=p.tail,a=u+1;else {let g=n?.fullContentHeight??t,x=f.lines[0]?.box.height??f.box.height;if(r.length===0&&t>=g-.001&&x>g+.001){n?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let b=e.fragments.slice(a),h=b[0]?.box.y??0;return {head:[],headHeight:0,tail:Fm(b,-h),tailHeight:Math.max(0,e.flowHeight-h)}}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=Fm(l,-s),c=ns(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}var yo=8,ew=2,CL=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Xm(e){let t=e?.val;return t!=="0"&&t!=="false"&&t!=="off"}function tw(e){let t=false,n=false,r=true;for(let o of e)switch(o.localName){case "keepNext":t=Xm(o.attributes);break;case "keepLines":n=Xm(o.attributes);break;case "widowControl":r=Xm(o.attributes);break;}return !t&&!n&&r?CL:{keepNext:t,keepLines:n,widowControl:r}}function nw(e,t,n,r,o){if(e<=t)return e;if(r.keepLines&&!o)return t;if(!r.widowControl||n<ew)return e;let a=e;return n-a<ew&&(a-=1),a-t===1&&(a-=1),a<t&&(a=t),a===t&&o?e:a}function rw(e,t,n,r,o){let a=0,i=n;for(let l=t;l-t<yo;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 ML(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 BL(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 LL(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 EL(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 NL(e,t,n){let r=e,o=0,a=-1;for(let i=e.length-1;i>=0;i-=1)n?.(i)||(a>=0&&t(i)&&o<yo?(r===e&&(r=[...e]),r[i]=`${e[i]}~kn~${r[a]}`,o+=1):o=0,a=i);return r}function ow(e,t){let n=t.terminalTableGroup,r=n?e.map((a,i)=>i>=n.start&&i<=n.anchorIndex?ne([a,n.token]):a):e,o=BL(r,t.contextualSpacingAt,t.styleIdAt);return o=LL(o,t.borderGroupKeyAt),t.tocVerdicts.length>0&&(o=EL(o,a=>t.tocVerdicts[a])),o=ML(o,t.markerTextAt),o=NL(o,t.keepsNextAt,t.skipKeepNextAt),o}var AL=yo+1;function aw(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 S of o){let F=os(r,S);F.bottom<=F.top||(!a||F.bottom<a.bottom-.001)&&(a=F,i=S);}if(!a||!i)return 0;let l=a.bottom-a.top,s=rs(t),d=t.contentBox.height;if(d-s<l-.001)return 0;let c,u=0;for(let S of r.fragments){if(S.kind!=="paragraph"||u>=AL)return 0;if(u+=1,xr(S,i.paragraphId,i.atomOffset)){c=S;break}}if(!c)return 0;let f=o.filter(S=>xr(c,S.paragraphId,S.atomOffset));if(f.length===0)return 0;let m=eu(r),p=Math.max(0,a.bottom-m),g=Math.max(0,Om(c)-m),y=t.contentBox.width,x=Di(d,e.plainSeparatorHeight),b=0;for(let S of f){let F=cs(e.footnotesPart,S.noteId,y,e.opts,e.noteLayoutCache);if(!F)continue;let C=os(r,S),E=C.evictable?C.bottom-C.blockTop:0;F.flowHeight>x-E+.001||(b+=F.flowHeight);}if(b<=0)return 0;let h=(e.existingAreaHeight>0?e.existingAreaHeight:e.plainSeparatorHeight)+b,v=Math.max(0,d-s-us);if(!(s+p+l+h<=d+.001))return v;if(s+g+l+h<=d+.001)return 0;let{usedReservePt:O}=e;if(O===void 0)return 0;let k=Math.max(0,d-O-s),I=p+l>k+.001,T=Math.abs(O-v)<=Z0;return I&&!T?0:v}var iw=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",showFieldCodes:"content-fingerprint",projectFieldLink:"pass-projector",documentProperties:"content-fingerprint",refFields:"content-fingerprint",drawingsForPart:"drawing-epoch-guarded",drawingLayoutEpoch:"content-fingerprint"});function Ym(e,t){for(let n of Object.keys(iw))if(iw[n]===t&&e[n]!==void 0)return true;return false}function du(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function lw(e){return Ym(e,"drawing-epoch-guarded")&&e.drawingLayoutEpoch===void 0||Ym(e,"relationship-epoch-guarded")&&e.linkRelsEpoch===void 0||Ym(e,"projection-epoch-guarded")&&e.projectionEpoch===void 0?null:[e.producer,e.displayMode??je,e.revisionAuthorFilter?.cacheKey??"",e.showFieldCodes??false,e.defaultTabStopPt??"",e.compatibilityMode??"",e.drawingLayoutEpoch??"",e.linkRelsEpoch??"",e.projectionEpoch??"",e.refFields?.valuesToken??"",e.documentProperties?JSON.stringify(e.documentProperties):"",du(e.documentFootnoteProps),du(e.documentEndnoteProps),e.footnotePropsBySection.map(du).join(";"),e.endnotePropsBySection.map(du).join(";")].join("\0")}var DL=.4;function Um(e,t,n){return e&&Md$1(e,"first")&&n===0?"first":e&&Md$1(e,"even")&&(t+n+1)%2===0?"even":"default"}function sw(e){let{furniture:t,pageHeight:n,marginTop:r,marginBottom:o}=e,a=n*DL,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=Um(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),m=Object.freeze({top:u,bottom:f,height:n-u-f});return i.set(d,m),m}}var qm=new WeakMap;function D2(e){qm.delete(e);}function ps(e,t){qm.set(e,t);}function Zm(e,t,n,r){return qm.get(e)?.(t,n,r)}var ha=24;function dw(e){let{furniture:t,geometry:n,headerDistance:r,footerDistance:o,pageIndexStart:a}=e,i=c=>({x:0,y:c*(n.height+ha),width:n.width,height:n.height}),l=c=>Um(t,a,c),s=(c,u,f)=>{if(!t)return;let m=l(u),p=(c==="header"?t.headers:t.footers).get(m);if(!p)return;let g=k=>{let I=c==="header"?f.y+r:f.y+n.height-o-k.flowHeight;return {kind:c,variant:m,partName:k.partName,...k.part?{part:k.part}:{},...k.rId?{rId:k.rId}:{},box:{x:f.x+n.margin.left,y:I,width:e.contentWidth,height:k.flowHeight},fragments:k.fragments,...k.anchoredDrawings?{anchoredDrawings:k.anchoredDrawings}:{}}},y=a+u+1,x={pageNumber:y,pageCount:Math.max(y,e.pageCount()+1),sectionPageCount:u+1},b=e.insetsFor(u),h=k=>{let I=p;for(let T=0;T<8;T+=1){let S=c==="header"?r:n.height-o-I.flowHeight,F={...k,contentInsetTop:b.top,contentInsetBottom:b.bottom,storyTop:S},C=p.withPageContext(F);if(Math.abs(C.flowHeight-I.flowHeight)<=.001)return C;I=C;}throw new Error("header/footer attached-page anchor layout did not converge")},v=p.pageFieldNeeds,P=lo(v)||(p.anchoredDrawings?.length??0)>0?h(x):p,O=g(P);return lo(v)?{...O,pageFieldProjector:k=>g(h(k))}:O};return {pageBox:i,variantFor:l,furnitureFor:s,overflowShellAt:(c,u)=>{let f=c-a,m=s("header",f,u),p=s("footer",f,u),g=nu(e.pageBorders,n,f===0);return {insets:e.insetsFor(f),...m?{header:m}:{},...p?{footer:p}:{},...g?{pageBorders:g}:{}}}}}function cw(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:ma(n,r,t);return t+=n.box.height+ha,i})}function uw(e){if(e.kind!=="tableRow")return null;let t=e.children.find(a=>a.namespaceUri===da$1&&a.localName==="trPr");if(!t)return null;let n=null;for(let a of t.children)if(a.kind!=="textValue"&&a.namespaceUri===da$1&&!(a.localName!=="ins"&&a.localName!=="del")){n=a;break}if(!n)return null;let r=a=>n.attributes.find(i=>i.namespaceUri===da$1&&i.localName===a)?.value,o=r("date");return {kind:n.localName==="ins"?"insert":"delete",id:r("id")??"",author:r("author")??"",...o===void 0?{}:{date:o},nodeId:n.id}}function fw(e,t,n){let r=[];for(let o of e){let a=zt(o)?Xt(o):uw(o);if(a){if(r.length>=fd)return false;r=en(r,a);}}return Ee(r,t,n)}function pw(e){let t=[];for(let n of e){let r=zt(n)?Xt(n):uw(n);r&&t.push([r.kind,r.nodeId,r.author]);}return JSON.stringify(t)}function cu(e){return `${e.noteKind}|${e.noteId}|${e.paragraphId}|${e.customMarkFollows?1:0}|${e.sectionIndex}`}function mw(e){return e.map(t=>`${cu(t)}|${t.atomOffset}`).join(";")}function Jm(e){return e.map(cu).join(";")}function Qm(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||cu(r)!==cu(o))return false}return true}var Tw=64,Fw=8,hw=Tw+2*Fw,Ow=4096,_L=256,yw=12,bw=new WeakMap;function jL(e,t,n){if(!e)return {memo:null,allHits:t,reused:false};let r=lw(n);if(r===null)return e.notes=null,{memo:null,allHits:t,reused:false};let o=mw(t),a=null,i=e.notes;if(i){let s=bw.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?Jm(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??Jm(t),inputFingerprint:r,allHits:t,provisionalMarks:Ww(t,n),finalMarks:null,settledReserves:null,reflowSpent:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return bw.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 bX(e,t){return t>=e.range.start&&t<e.range.end}var xw=new WeakMap;function Cw(e){let t=xw.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),xw.set(e,n),n}var Sw=new WeakMap;function Mw(e){let t=Sw.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 Sw.set(e,n),n}var Pw=new WeakMap;function uu(e,t,n){let r=Cw(e.fragments);if(!n)return t.filter(l=>r.some(s=>xr(s,l.paragraphId,l.atomOffset)));let o=Pw.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 Va(l)){let d=n.get(s);if(d)for(let c of d)i.has(c)||xr(l,s,c.atomOffset)&&(i.add(c),a.push(c));}return Pw.set(e.fragments,{refIndex:n,result:a}),a}function Bw(){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=Vm(t,n,r,i,o,a);return e.set(d,u),u.fallbackReason&&l.push(u.fallbackReason),u}}}function Lw(e){return e==="sectEnd"||e==="docEnd"}var Rw=new WeakMap;function Ew(e){let t=Rw.get(e);return t||(t=new Map,Rw.set(e,t)),t}function Nw(e,t,n,r,o,a,i,l){if(e)return e.get(t,n,r,o,a,i,l);let s=Vm(t,n,r,i,o,a);return s.fallbackReason&&l.push(s.fallbackReason),s}function HL(e,t){let n=[];for(let r of e){if(n.length>=ds)break;n.push({...r,sectionIndex:t.get(r.paragraphId)??0});}return n}function ya(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function eg(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function tg(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,showFieldCodes:e.showFieldCodes,documentProperties:e.documentProperties,refFields:e.refFields,noteMarks:t,drawingsForPart:e.drawingsForPart,projectionTokenForParagraphForPart:e.projectionTokenForParagraphForPart,projectionTokenForTableForPart:e.projectionTokenForTableForPart}}function zL(e,t){let n="FootnoteReference";if(!t)return {...On,verticalAlign:"superscript"};let r=pi([],[{localName:"rStyle",attributes:{val:n}}],t);return De(r,t.themeFonts)}function WL(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=ya(t,c);if(u.numRestart==="eachPage"){i=true;for(let m=0;m<yw;m+=1){let p=$n(u.numFmt,u.numStart+m);p.length>0&&o.add(p);}}let f=eg(t,c);if(f.numRestart==="eachPage"){i=true;for(let m=0;m<yw;m+=1){let p=$n(f.numFmt,f.numStart+m);p.length>0&&o.add(p);}}}if(!i||o.size===0)return;let l=zL("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 Aw(e,t,n){let r=yi("footnote",e,l=>ya(n,l)),o=yi("endnote",t,l=>eg(n,l)),a=new Map;for(let l of r)a.set(wi("footnote",l.noteId),l.mark);for(let l of o)a.set(wi("endnote",l.noteId),l.mark);let i=WL(a,n,e,t);return {marks:a,...i?{reservedMarkText:i}:{}}}function VL(e,t){if(t.marks.size===0)return e;let n=false,r=e.pages.map(o=>{if(!GL(o.fragments))return o;let a=Dw(o.fragments,t);return a===o.fragments?o:(n=true,{...o,fragments:a})});return n?{...e,pages:r}:e}var ww=new WeakMap;function GL(e){let t=ww.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),ww.set(e,n),n}function Dw(e,t){let n=false,r=e.map(o=>{if(o.kind==="paragraph"){let l=$L(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=Dw(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 $L(e,t){let n=false,r=e.lines.map(o=>{let a=KL(o,t);return a!==o&&(n=true),a});return n?{...e,lines:r}:e}function KL(e,t){let n=false,r=e.spans.map(o=>{let a=XL(o,t);return a!==o&&(n=true),a});return n?{...e,spans:r}:e}function XL(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 YL(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function _w(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function UL(e){for(let t=e.length-1;t>=0;t-=1)if(_w(e[t]))return t;return Math.max(0,e.length-1)}function ng(e,t,n,r,o,a,i,l){let s=new Map(a),d=t.filter(V=>V.noteKind==="footnote"),c=e.contentBox.width,u=tg(n,r),f=[],m=0,p=Ow,g=a.size>0?"continuationSeparator":"separator",y=Math.max(0,e.contentBox.height),x=V=>Nw(l?.separatorCache,n.footnotesPart,V,c,"footnote",y,u,i),b=x(g),h=rs(e),v=Math.max(0,e.contentBox.height-h-b.flowHeight),R=Di(e.contentBox.height,b.flowHeight),P=l?.reserveColumnBudget?R:v,k={fullContentHeight:Math.max(0,e.contentBox.height-b.flowHeight),reasons:i},I=l?.reserveBandOf?g==="separator"?R:Di(e.contentBox.height,x("separator").flowHeight):0,T=l?.reserveBandOf?eu(e):0;for(let[V,z]of a){let Z=V.match(/^(footnote|endnote):(-?\d+)$/);if(!Z||Z[1]!=="footnote")continue;let U=Number(Z[2]),te=Math.max(0,P-m);if(z.height<=te+.001)f.push({noteKind:"footnote",noteId:U,scopeId:V,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:z.height},fragments:z.fragments}),m+=z.height,s.delete(V);else {let K=fs({fragments:z.fragments,flowHeight:z.height},te,k);K.head.length>0&&(f.push({noteKind:"footnote",noteId:U,scopeId:V,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:K.headHeight},fragments:K.head}),m+=K.headHeight),K.tail.length>0?s.set(V,{fragments:K.tail,height:K.tailHeight,mark:null}):s.delete(V);}}let S;for(let V of d){if(f.length>=ds){i.push("note-count-limit");break}let z=l?.reserveBandOf?.(V);if(S!==void 0&&z&&z.evictable&&z.bottom>S+.001)continue;let Z=cs(n.footnotesPart,V.noteId,c,u,l?.noteLayoutCache);if(!Z){i.push("missing-note-body");continue}let U=r.marks.get(wi("footnote",V.noteId))??null,te=z?Math.min(P,Math.max(0,e.contentBox.height-Math.max(14,z.bottom)-b.flowHeight)):P,K=Math.max(0,te-m);if(z&&z.evictable&&l?.evictionAllowed!==false&&Z.flowHeight>K+.001&&Z.flowHeight<=I-(z.bottom-z.blockTop)+.001&&z.top>T+.001&&z.top>=14){S=S===void 0?z.top:Math.min(S,z.top);continue}if(p-=Z.fragments.length,p<0){i.push("note-area-fragment-limit");break}if(Z.flowHeight<=K+.001)f.push({noteKind:"footnote",noteId:V.noteId,scopeId:Z.scopeId,mark:V.customMarkFollows?null:U,box:{x:e.contentBox.x,y:0,width:c,height:Z.flowHeight},fragments:Z.fragments}),m+=Z.flowHeight;else {let Q=fs(Z,K,k);Q.head.length>0&&(f.push({noteKind:"footnote",noteId:V.noteId,scopeId:Z.scopeId,mark:V.customMarkFollows?null:U,box:{x:e.contentBox.x,y:0,width:c,height:Q.headHeight},fragments:Q.head}),m+=Q.headHeight),Q.tail.length>0&&s.set(Z.scopeId,{fragments:Q.tail,height:Q.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:s,evictionTopPt:S};let F=b.flowHeight,C=F+m,E=ns(e.fragments),H;o==="beneathText"?H=e.contentBox.y+Math.max(h,Math.min(E,e.contentBox.height-C)):(H=e.contentBox.y+e.contentBox.height-C,H=Math.max(H,e.contentBox.y+h));let A=H+F,D=f.map(V=>{let z={...V,box:{...V.box,y:A}};return A+=V.box.height,z}),B=Gm(b,e.contentBox.x,c,H);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:H,width:c,height:C},separator:{kind:g,box:B,fragments:b.fragments,synthetic:b.synthetic,...b.ruleStyle!==void 0?{ruleStyle:b.ruleStyle}:{}},notes:D},nextCarry:s,evictionTopPt:S}}function jw(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 qL(e){return t=>{let n=Zm(e,t.sectionAnchorIndex,t.landingIndex,t.template.box);return ZL(t.template,t.landingIndex,t.noteStream,n)}}function ZL(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,l=r?r.pageBorders:e.pageBorders?.display!=="firstPage"?e.pageBorders:void 0;return {id:`page-${t}`,index:t,box:e.box,contentBox:o,fragments:[],...l?{pageBorders:l}:{},...n?{noteStream:n}:{},...a?{header:a}:{},...i?{footer:i}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+1}}:{}}}function JL(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=Zm(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,m=QL(a,s-a.contentBox.y,u-f);if(!m.fits(s,u))return a;r=true;let{header:p,footer:g,...y}=a;return {...y,contentBox:c,...m.footnotes?{footnotes:m.footnotes}:{},...m.endnotes?{endnotes:m.endnotes}:{},...l.header?{header:l.header}:{},...l.footer?{footer:l.footer}:{}}});return r?o:[...e]}function kw(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 QL(e,t,n){let r=i=>i.placement==="pageBottom"?n:t,o=e.footnotes?kw(e.footnotes,r(e.footnotes)):void 0,a=e.endnotes?kw(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 rg(e,t){let n=new Set;for(let r of Cw(e.fragments))n.add(t.get(r.paragraphId)??0);return [...n].sort((r,o)=>r-o)}function Hw(e,t,n){for(let r=e.length-1;r>=0;r-=1)if(rg(e[r],n).includes(t))return r;return Math.max(0,e.length-1)}function eE(e,t,n){let r=Hw(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=rg(a,n);if(i.length!==0&&!i.includes(t))return o}return e.length}function tE(e,t){let n=cw(e);return [...so({revision:t,pages:n}).pages]}function nE(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=tg(n,r),f=l?.separatorKind??"separator",m=B=>B==="footnote"?n.footnotesPart:n.endnotesPart,p=n.endnotesPart??n.footnotesPart,g=Math.max(0,e.contentBox.height),y=Nw(l?.separatorCache,p,f,c,"endnote",g,u,i),x=y.flowHeight,b=ns(e.fragments),h=e.endnotes?Math.max(b,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):b,v=YL(e),R=Math.max(0,v-h-x),O={fullContentHeight:Math.max(0,v-x),reasons:i},k=[],I=0,T=Ow;for(let[B,j]of a){let V=B.match(/^(footnote|endnote):(-?\d+)$/);if(!V)continue;let z=V[1],Z=Number(V[2]),U=Math.max(0,R-I);if(j.height<=U+.001)k.push({noteKind:z,noteId:Z,scopeId:B,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:j.height},fragments:j.fragments}),I+=j.height,s.delete(B);else {let te=fs({fragments:j.fragments,flowHeight:j.height},U,O);te.head.length>0&&(k.push({noteKind:z,noteId:Z,scopeId:B,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:te.headHeight},fragments:te.head}),I+=te.headHeight),te.tail.length>0?s.set(B,{fragments:te.tail,height:te.tailHeight,mark:null}):s.delete(B);}}for(let B=0;B<t.length;B+=1){let j=t[B];if(k.length>=ds){i.push("note-count-limit"),d.push(...t.slice(B));break}let V=m(j.noteKind),z=cs(V,j.noteId,c,u,l?.noteLayoutCache);if(!z){i.push("missing-note-body");continue}let Z=r.marks.get(wi(j.noteKind,j.noteId))??null,U=Math.max(0,R-I);if(T-=z.fragments.length,T<0){i.push("note-area-fragment-limit"),d.push(...t.slice(B));break}if(z.flowHeight<=U+.001)k.push({noteKind:j.noteKind,noteId:j.noteId,scopeId:z.scopeId,mark:j.customMarkFollows?null:Z,box:{x:e.contentBox.x,y:0,width:c,height:z.flowHeight},fragments:z.fragments}),I+=z.flowHeight;else {let te=fs(z,U,O);te.head.length>0&&(k.push({noteKind:j.noteKind,noteId:j.noteId,scopeId:z.scopeId,mark:j.customMarkFollows?null:Z,box:{x:e.contentBox.x,y:0,width:c,height:te.headHeight},fragments:te.head}),I+=te.headHeight),te.tail.length>0&&s.set(z.scopeId,{fragments:te.tail,height:te.tailHeight,mark:null}),d.push(...t.slice(B+1));break}}if(k.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};if(k.length===0)return {area:void 0,nextCarry:s,remainingRefs:d};let S=e.contentBox.y+h,F=S+x,C=k.map(B=>{let j={...B,box:{...B.box,y:F}};return F+=B.box.height,j}),E=Gm(y,e.contentBox.x,c,S),H=x+I,A=Math.max(0,v-h),D=Math.min(H,A);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:S,width:c,height:D},separator:{kind:f,box:E,fragments:y.fragments,synthetic:y.synthetic,...y.ruleStyle!==void 0?{ruleStyle:y.ruleStyle}:{}},notes:C},nextCarry:s,remainingRefs:d}}function rE(e,t,n,r,o,a,i,l,s){let d=e,c=t,u=e[jw(e,e.length-1)].index;for(;c.size>0&&a.remaining>0;){let f=d[d.length-1],m=s({template:f,landingIndex:d.length,noteStream:"footnote-drain",sectionAnchorIndex:u}),p=ng(m,[],n,r,"pageBottom",c,o,{separatorCache:i,noteLayoutCache:l}),g=p.area?.notes.length??0;if(c=p.nextCarry,g===0){o.push("note-overflow-stalled"),p.area&&(d=[...d,{...m,footnotes:p.area}],a.remaining-=1);break}d=[...d,{...m,footnotes:p.area}],a.remaining-=1;}return c.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:d,carry:c}}function oE(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 vw(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 Iw(e,t,n,r,o,a,i,l,s){if(n.length===0||e.length===0)return e;let d=e[jw(e,t)].index,c=[...e],u=[...n],f=new Map,m=t,p=0,g="separator",y=s?.stopBeforeIndex??Number.POSITIVE_INFINITY,x=s?.sectionStartIndex??t,b=s?.stopBeforeIndex!==void 0,h=s?.separatorCache;for(;u.length>0||f.size>0;){if(m>=c.length||m>=y){if(l.remaining<=0){i.push("note-overflow-page-limit");break}let O=c[Math.min(Math.max(m,1),c.length)-1]??c[c.length-1],k=Math.min(m,y,c.length),I=oE(c,k,O,s.mint,d,"endnote-overflow");c=I.pages,m=I.pageIndex,b&&(y=k+1),p+=1,l.remaining-=1;}let v=c[m];if(!_w(v)){m+=1;continue}let R=nE(v,u,r,o,a,f,i,{separatorKind:g,...h?{separatorCache:h}:{},...s.noteLayoutCache?{noteLayoutCache:s.noteLayoutCache}:{}});f=R.nextCarry,u=R.remainingRefs;let P=R.area?.notes.length??0;if(R.area){let O=c[m];c[m]={...O,endnotes:O.endnotes?{...R.area,notes:[...O.endnotes.notes,...R.area.notes],box:{...R.area.box,y:O.endnotes.box.y,height:O.endnotes.box.height+R.area.box.height}}:R.area};}else {if(f.size===0&&u.length===0)break;if(!R.area&&f.size===0&&u.length>0){m+=1,g="separator";continue}}if(P===0&&(f.size>0||u.length>0)&&v.fragments.length===0&&v.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(f.size>0||u.length>0){g="continuationSeparator",m+=1;continue}break}return (u.length>0||f.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),b?c=vw(c,x,Math.min(y,c.length)):p>0&&(c=vw(c,x,c.length)),c}function aE(e,t,n,r,o,a){let i=o??null,l=new Map,s=[],d=new Map,c=Mw(t),u=Bw(),f=Ew(r),m=tg(n,r),p=h=>h.noteKind==="footnote"&&!Lw(ya(n,h.sectionIndex).pos),g=t.some(p),y=h=>uu(h,t,c).filter(p),x=(h,v,R)=>J0(l,h,Math.min(v,R));for(let h=0;h<e.pages.length;h+=1){let v=e.pages[h],R=Cm(v),O=uu(R,t,c).filter(U=>U.noteKind==="footnote"),k=O.filter(p),I=k[0]?.sectionIndex??0,T=ya(n,I),S=e.pages[h+1],F=a?a.get(v.index)??0:void 0,C=Di(R.contentBox.height,0),E=U=>g?aw({bodyPage:R,nextPage:S,existingAreaHeight:U,usedReservePt:F,pageBottomRefsOf:y,footnotesPart:n.footnotesPart,opts:m,plainSeparatorHeight:u.get(n.footnotesPart,"separator",R.contentBox.width,"footnote",Math.max(0,R.contentBox.height),m,s).flowHeight,noteLayoutCache:f}):0;if(k.length===0&&d.size===0){x(v.index,E(0),C);continue}if(i&&d.size===0){let U=i.pageReserve.get(v);if(U&&U.marks===r&&Qm(O,U.pageRefs)){for(let te of U.reasons)s.push(te);x(v.index,Math.max(U.reserve,E(U.areaHeight)),C);continue}}let H=d.size===0,A=s.length,{area:D,nextCarry:B,evictionTopPt:j}=ng(R,k,n,r,T.pos,d,s,{reserveColumnBudget:true,reserveBandOf:U=>os(R,U),separatorCache:u,noteLayoutCache:f,evictionAllowed:!S||S.contentBox.width===R.contentBox.width&&S.contentBox.height===R.contentBox.height});d=B;let V=j!==void 0?Math.max(0,R.contentBox.height-j-us):0,z=D?.box.height??0,Z=Math.min(Math.max(z,V),C);i&&H&&d.size===0&&i.pageReserve.set(v,{pageRefs:O,marks:r,reserve:Z,areaHeight:z,reasons:s.slice(A)}),x(v.index,Math.max(Z,E(z)),C);}let b=true;for(let h of e.pages){let v=l.get(h.index)??0;if(v<=0)continue;if(rs(h)+v>h.contentBox.height+.5){b=false;break}}return {reserves:l,stable:b,reasons:s}}function iE(e,t,n,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,l={remaining:_L},s=Mw(t),d=Bw(),c=qL(e),u=[],f=[];for(let P of e.pages)for(let O of uu(P,t,s)){let k={noteId:O.noteId,sectionIndex:O.sectionIndex,pageIndex:P.index,customMarkFollows:O.customMarkFollows};O.noteKind==="footnote"?u.push(k):f.push(k);}let m=o?[...u,...f].map(P=>`${P.noteId}|${P.sectionIndex}|${P.pageIndex??""}|${P.customMarkFollows?1:0}`).join(";"):"",p;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===m?p=o.finalMarks.marks:(p=Aw(u,f,n),o&&(o.finalMarks={sitesFingerprint:m,marks:p}));let g=Ew(p),y=new Map,x=new Map,b=[],h=e.pages.map(P=>{let O=uu(P,t,s),k=O.filter(B=>B.noteKind==="footnote"),I=O.filter(B=>B.noteKind==="endnote");for(let B of I)if(eg(n,B.sectionIndex).pos==="sectEnd"){let V=x.get(B.sectionIndex)??[];V.push(B),x.set(B.sectionIndex,V);}else b.push(B);for(let B of k){let j=ya(n,B.sectionIndex);if(j.pos==="sectEnd"){let V=x.get(B.sectionIndex)??[];V.push(B),x.set(B.sectionIndex,V);}else j.pos==="docEnd"&&b.push(B);}if(o&&y.size===0){let B=o.pageAttach.get(P);if(B&&B.marks===p&&Qm(k,B.pageRefs)){for(let j of B.reasons)a.push(j);return B.attached}}let T=Cm(P),S=k.filter(B=>{let j=ya(n,B.sectionIndex).pos;return j==="pageBottom"||j==="beneathText"}),F=S[0]?.sectionIndex??0,C=ya(n,F),E,H=y.size===0,A=a.length;if(S.length>0||y.size>0||k.length===0&&!Lw(C.pos)){let B=ng(T,S,n,p,C.pos,y,a,{separatorCache:d,noteLayoutCache:g});E=B.area,y=B.nextCarry;}let D=E?{...T,footnotes:E}:T;if(o&&H&&y.size===0){let B={pageRefs:k,marks:p,attached:D,reserve:0,reasons:a.slice(A)};if(o.pageAttach.set(D,B),D!==P){let j=o.pageReserve.get(P);j&&o.pageReserve.set(D,j);}}return D}),v=h.length;if(y.size>0){let P=rE(h,y,n,p,a,l,d,g,c);h=P.pages,y=P.carry;}if(x.size>0&&h.length>0){let P=[...x.keys()].sort((O,k)=>O-k);for(let O of P){let k=x.get(O),I=Hw(h,O,i),T=eE(h,O,i),S=I;for(let F=0;F<=I;F+=1)if(rg(h[F],i).includes(O)){S=F;break}h=Iw(h,I,k,n,p,"sectEnd",a,l,{stopBeforeIndex:T,sectionStartIndex:S,separatorCache:d,noteLayoutCache:g,mint:c});}}return b.length>0&&h.length>0&&(h=Iw(h,UL(h),b,n,p,"docEnd",a,l,{separatorCache:d,noteLayoutCache:g,mint:c})),h.length!==v&&(h=JL(h,e),h=tE(h,e.revision)),{layout:VL({...e,pages:h},p),fallbackReasons:a,noteMarks:p}}function lE(e,t,n){return (t==="all-markup"&&n===void 0?Xf$1(e):Yf$1(e,{includeReference:(a,i)=>fw(i,t,n),projectionKey:`${t};${n?.cacheKey??""}`,ancestryKey:pw})).map(a=>({noteKind:a.noteKind,noteId:a.noteId,paragraphId:a.paragraphId,atomOffset:a.atomOffset,customMarkFollows:a.customMarkFollows}))}function zw(e,t,n,r,o){let a=n.displayMode??je,i=n.revisionAuthorFilter,l=lE(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=q0(e,t,a,i,n.session),d=HL(l,s),c=jL(n.session,d,r),u=c.memo,f=c.allHits,m=u?.provisionalMarks??Ww(f,r),p=n.session?.notePageBottomReserves,g=p?ho(p):new Map,y=[],x=o({...n,noteMarks:m,pageBottomReserves:g}),b=_i(g),h=c.reused&&u?.settledReserves&&u.settledReserves.part===e&&u.settledReserves.fingerprint===b?u.settledReserves:null;if(h)y=[...h.reasons];else {let R=new Set([b]),P=u&&u.reflowSpent&&u.reflowSpent.part===e?u.reflowSpent:{part:e,adopted:0};u&&(u.reflowSpent=P);let O=0,k=p&&g.size>0?Fw:Tw,I=x.pages.length,T=Math.max(8,Math.ceil(I/16)),S=0;for(let F=0;F<k;F+=1){let C=aE(x,f,r,m,u,g);if(y=[...C.reasons],C.stable&&su(C.reserves,g))break;if(P.adopted>=hw){y.push("note-reflow-exhausted");break}if(S>=T){y.push("note-reflow-exhausted");break}let E=ho(C.reserves);if(su(E,g)){y.push("note-reflow-exhausted");break}let H=_i(E);if(R.has(H)){E=Q0(g,C.reserves);let A=_i(E);if(su(E,g)||R.has(A)){y.push("note-reflow-exhausted");break}}g=E,R.add(_i(g)),P.adopted+=1,O+=1,x=o({...n,noteMarks:m,pageBottomReserves:g}),S=x.pages.length>I?S+1:0,I=x.pages.length,F===k-1&&y.push("note-reflow-exhausted");}u&&(O===0||P.adopted>=hw)&&(u.settledReserves={part:e,fingerprint:_i(g),reasons:[...y]});}let v=iE(x,f,r,{fallbackReasons:y,paragraphSectionIndex:s,memo:u});return n.session&&(n.session.previous=v.layout,n.session.notePageBottomReserves=ho(g)),v.layout}function Ww(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 Aw(n,r,t)}function Vw(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}:{},showFieldCodes:e.showFieldCodes??t.showFieldCodes,...o?{documentProperties:o}:{},...a?{refFields:a}:{},...i?{displayMode:i}:{},...l?{revisionAuthorFilter:l}:{}}}function bo(){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 og(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);}var Gw=new WeakMap;function $w(e){let t=Gw.get(e);if(t)return t;let n=new Map;for(let r of Be(e)){if(r.beginParagraphId===r.endParagraphId)continue;let o=Ae(r);if(o)for(let a of new Set([r.beginParagraphId,...r.resultParagraphIds,r.endParagraphId])){let i=Ha$1(e,a);if(i?.kind!=="paragraph")continue;let l=Ue(i),s=a===r.beginParagraphId,d=s?l.spanOf(r.beginNodeId)?.start??0:0,c=a===r.endParagraphId?l.spanOf(o.endNodeId)?.end??l.length:l.length,u={start:d,end:c,...s?{code:`{ ${r.instruction.raw} }`,sourceNodeId:r.beginNodeId}:{},suppressParagraph:!s&&d===0&&c===l.length},f=n.get(a);f?f.push(u):n.set(a,[u]);}}return Gw.set(e,n),n}var Kw=new WeakMap;function ag(e){if(e===void 0||e.size===0)return "";let t=Kw.get(e);if(t!==void 0)return t;let n=[...e].join(",");return Kw.set(e,n),n}function Xw(e){let t=ag(e.chrome),n=ag(e.placeholder),r=ag(e.suppressed);return t===""&&n===""&&r===""?"":`${t}|${n}|${r}`}function Yw(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 Uw(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 qw(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 Zw(e,t){return e!==1?"columns":t?.size?JSON.stringify([...t].sort()):"body"}function Jw(e,t=12){return e.map((n,r)=>{if(n.kind!=="paragraph"||!n.listItem&&!n.contextualSpacing)return n;let o=d=>d?.kind==="paragraph"&&(n.listItem!==void 0&&d.listItem?.numId===n.listItem.numId||n.contextualSpacing&&d.styleId===n.styleId),a=Tl(n.props,{lineUnitPt:t}),i=Tl(n.props,{inList:n.listItem!==void 0,lineUnitPt:t}),l=n.listItem&&r===0||o(e[r-1])?i.before:a.before,s=o(e[r+1])?i.after:a.after;if(n.contextualSpacing){let d=e[r-1],c=e[r+1];d?.kind==="paragraph"&&d.styleId===n.styleId&&(l=0),c?.kind==="paragraph"&&c.styleId===n.styleId&&(s=0);}return l===n.spacing.before&&s===n.spacing.after?n:{...n,spacing:{before:l,after:s}}})}function Qw(e,t){let n=e;return t.forEach((r,o)=>{r.kind!=="paragraph"||r.listItem===void 0||(n===e&&(n=[...e]),n[o]=`${n[o]}~ls~${r.spacing.before},${r.spacing.after}`);}),n}var dE=1584,ek=1e4,cE="http://schemas.openxmlformats.org/wordprocessingml/2006/main";function ms(e){if(e===void 0||!/^-?\d{1,8}$/.test(e))return null;let t=Number(e)/20;return Math.abs(t)<=dE?t:null}function tk(e){let t=[e],n=0;for(;t.length;){let r=t.pop();if(++n>ek||r.namespaceUri!==cE||["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>ek)return false;for(let o of r.children)o.kind!=="textValue"&&t.push(o);}return true}function nk(e){let t;for(let m of e)m.localName==="framePr"&&(t=m);if(!t?.attributes)return null;let n=t.attributes,r=new Set(["x","y","w","hAnchor","vAnchor","wrap","anchorLock","hSpace","vSpace"]);if(Object.keys(n).some(m=>!r.has(m)))return null;let o=n.wrap??"around";if(!["around","none","notBeside"].includes(o))return null;let a=ms(n.hSpace??"0"),i=ms(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=ms(n.x),s=ms(n.y),d=ms(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=ne(Object.keys(n).sort().map(m=>ne([m,n[m]])));return {x:l,y:s,width:d,wrap:o,hSpace:a,vSpace:i,horizontalAnchor:c,verticalAnchor:u,token:f}}function rk(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=>Zn(l,r,o))}:{}}))}}function ok(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 ak=new WeakMap;function ig(e){let t=ak.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 ak.set(e,n),n}function ik(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=Ut(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 uE(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 lg(e,t){let n=t.pendingPositionedTableTokens,r=e.pendingPositionedTableTokens;return (n===r||n?.length===r?.length&&n?.signature===r?.signature)&&uE(e.positionedTableAnchorSignals,t.positionedTableAnchorSignals??[])}function lk(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(ne([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 m=r.get(u[f]);m&&d.add(m);}a=s.pendingPositionedTableTokens,l(d),c.splice(0,c.length,...s.positionedTableAnchorSignals??[]);},same(s,d,c,u){return l(c),lg({pendingPositionedTableTokens:s,positionedTableAnchorSignals:d},{pendingPositionedTableTokens:a,positionedTableAnchorSignals:u})}}}function sk(e,t,n,r,o){let a=ig(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 m=n.length;o(f.table,l.column,l.anchorY,d);for(let p=m;p<n.length;p++){let g=n[p];g.kind==="table"&&(n[p]={...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 fu(e){return e.kind==="table"&&e.outOfFlow===true}function dk(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 ck(e,t){for(let n=t;n<e.length;n+=1){let r=e[n];if(!En(r))return true}return false}function sg(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 pE={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",markChangeSites:"hashed",marker:"hashed",tabStops:"hashed",lines:"hashed",box:"hashed"},mE={kind:"covered",floatingWrap:"hashed",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function fk(e){return Object.keys(e).filter(t=>e[t]==="hashed")}var gE=fk(pE),hE=fk(mE),uk=new WeakMap;function pu(e){let t=uk.get(e);if(t!==void 0)return t;let n=e.kind==="table"?JSON.stringify([fu(e),...hE.map(r=>e[r])]):JSON.stringify(gE.map(r=>e[r]));return uk.set(e,n),n}function pk(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&&pu(r)!==pu(o))return false}return true}function dg(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 mk=Object.freeze([]),gk=new Map;function hk(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 yk(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(ne(e.slice(r,i+1))));n===e&&(n=[...e]);for(let s=r;s<=i;s++)n[s]=ne([e[s],l]);r=-1;}return n}function cg(e,t){return e===t||e?.length===t?.length&&e?.signature===t?.signature}var mu=class{pending;checkpoint(){return this.pending}restore(t){this.pending=t;}same(t){return cg(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(ne([this.pending?.signature??"",t.token,r,String(l.sourceOrder),pu(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=rk(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)}}))}};function Sk(e,t,n,r,o,a){return e.some(i=>{if(i.kind!=="table")return false;let l=Ut(i,t,0,n,r,o,a)?.float;return l!==void 0&&l.ySpec!=="inline"})}function Pk(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,m=n.columnWidths?.[u]??n.contentWidth,p={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+m?"topAndBottom":"square",contentBounds:d,polygon:null,clipPolygon:null,wrapDistances:c,effectInsets:{top:0,right:0,bottom:0,left:0},textSide:"bothSides",contentLeft:f,contentRight:f+m}};i||(r??=new Map(t),i=[...t.get(o)??[]],r.set(o,i)),i.push(p);}}return r??t}var bk=new WeakMap;function gu(e,t,n){let r;if(!n.inlineDrawingLayout){let d=bk.get(n);d||bk.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=Ut(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=Ql(o,0,0,0,e.id,0,{...ar(n),onCellBreakKey:void 0,borderOwnershipBudget:uo(),vMergeResolveBudget:da(),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 Rk(e,t,n,r,o,a){if(t.size===0)return 0;let i=0;for(let l of ig(e).get(n)??[]){if(!t.has(l.table.id))continue;let s=ug(l.table,a.anchorY,r,a.frames,a.earlier,o),d=gu(l.table,r,o)+s-a.anchorY+Math.min(0,l.float.yPt);i=Math.max(i,d);}return i}function ug(e,t,n,r,o,a){let i=Ut(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((p,g)=>p+g,0),d=l.distances??{top:0,right:0,left:0},c=la(l,s,r)-d.left,u=gu(e,n,a)-Math.max(0,l.yPt)+d.top,f=t+l.yPt-d.top,m=o.flatMap(p=>p.kind==="table"?p.floatingWrap?[]:[p.box]:p.lines.flatMap(g=>[...g.spans.filter(y=>y.text.trim()).map(y=>y.box),...(g.drawings??[]).map(y=>y.paintBounds)])).sort((p,g)=>p.y-g.y);for(let p of m)c<p.x+p.width&&c+s+d.left+d.right>p.x&&f<p.y+p.height&&f+u>p.y&&(f=p.y+p.height);return f+d.top-l.yPt}function wk(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 xk=new WeakMap;function kk(e,t,n){if(!n.pageExclusionZones||!t?.size)return false;let r=xk.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},xk.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 vk=new WeakMap;function Ik(e,t){if(t){let n=vk.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}vk.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 Tk(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,m=n.columnWidths?.[u]??n.contentWidth,p={left:d.hSpace,right:d.hSpace,top:d.vSpace,bottom:d.vSpace},g=c.x-d.hSpace<=f&&c.x+c.width+d.hSpace>=f+m,y={sourceKind:"frame",sourceOrder:d.sourceOrder,drawingNodeId:`frame:${d.groupId}`,anchorParagraphId:d.anchorId,anchorModelStart:0,paintLayer:"inFront",relativeHeight:0,allowOverlap:true,columnIndex:u,y:c.y,verticalBand:{x:c.x-d.hSpace,y:c.y-d.vSpace,width:c.width+2*d.hSpace,height:c.height+2*d.vSpace},input:{mode:d.wrap==="none"||d.wrap==="notBeside"||g?"topAndBottom":"square",contentBounds:c,polygon:null,clipPolygon:null,wrapDistances:p,effectInsets:{left:0,right:0,top:0,bottom:0},textSide:"bothSides",contentLeft:f,contentRight:f+m}};l??=[...t.get(o)??[]],l.push(y);}l&&(r??=new Map(t),r.set(o,l));}return r??t}function fg(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 Fk(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 Ok(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&&Yt(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 Ck(e,t,n,r,o,a,i,l,s,d=0){let c=0,u={...ar(l),cache:void 0,borderOwnershipBudget:void 0,vMergeResolveBudget:void 0,onCellBreakKey:void 0,nextLineId:()=>`probe-progress-${c++}`};return Jl(e,t,n,r,o,false,a,i,u,s,d).fitted}var xE="http://schemas.openxmlformats.org/wordprocessingml/2006/main",Mk=8192,SE=32,PE=64,Bk=new WeakMap;function RE(e){let t=Bk.get(e);if(t!==void 0)return t;let n=e.rows.some(r=>r.cells.some(o=>o.vMergeContinue));return Bk.set(e,n),n}var wE=new Set(["p","r","t","tab","br","cr","noBreakHyphen","softHyphen","hyperlink","fldSimple","fldChar","instrText","bookmarkStart","bookmarkEnd","proofErr","pPr","rPr"]);function pg(e){return e.cells[0]?.logicalGridColumn===void 0?e.cells:[...e.cells].reverse()}function kE(e,t){let n=0;for(let r of e){let o=0;for(let a of pg(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>Mk||d>SE)return false;if(s.kind==="textValue")continue;if(s.namespaceUri!==xE||!c&&!wE.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>Mk)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 Lk(e,t,n,r,o,a,i,l,s){if(e.cellSpacingPt>0||e.float||t.length===0||t.length>PE||e.columnWidthsPt.length>1024||![r,o,a,i,l].every(Number.isFinite)||RE(e)||(s.pageExclusionZones?.().length??0)>0||!kE([...t,n],e.columnWidthsPt.length))return;let d=t.reduce((P,O)=>P+O.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=pg(c),f=pg(n),m=Ec([u,f],e.tableBorders,e.columnWidthsPt.length)[0],p=new Map,g=[];for(let[P,O]of u.entries()){let k=0;for(let I of m[P].edgeSegments??[]){if(I.side!=="bottom")continue;let T=Tr(I.edge);k=Math.max(k,T),g.push({start:I.gridStart,end:I.gridEnd,extent:T});}p.set(O.id,{...po(O.margins,O.borders,O.legacyContentAlignment===true),bottom:O.margins.bottom+k});}let y=0;for(let P of f){let O=0,k=P.gridColumn+P.gridSpan;for(;y<g.length&&g[y].end<=P.gridColumn;)y++;for(let I=y;I<g.length&&g[I].start<k;I++)O=Math.max(O,g[I].extent);p.set(P.id,{...po(P.margins,P.borders,P.legacyContentAlignment===true),top:P.margins.top+O});}if([c,n].every(P=>P.cells.every(O=>{let k=po(O.margins,O.borders,O.legacyContentAlignment===true),I=p.get(O.id);return k.top===I.top&&k.bottom===I.bottom})))return;let x=0,b={...ar(s),cache:void 0,borderOwnershipBudget:void 0,vMergeResolveBudget:void 0,onCellBreakKey:void 0,cellContentInsets:p,nextLineId:()=>`probe-header-border-${x++}`},h=o;for(let P of t){let O=lr(P,e.columnWidthsPt,r,h,true,0,b);if(h=O.bottom,O.remainder!==null||h>a+.001)return null}let v=h-o,R=lr(n,e.columnWidthsPt,r,h,false,0,b);return R.remainder!==null||R.bottom>a+.001?null:{bodyRowId:n.id,headerHeight:v,bodyHeight:R.bottom-h,deps:{...s,cellContentInsets:p}}}var vE=Number.MAX_SAFE_INTEGER/1024;function Ek(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:m}=t,p=n(),g=Ut(e,p,0,s,d,c,t.compatibilityMode);if(!g||g.rows.length===0)return {outOfFlow:false};let y=g.float!==void 0&&(g.float.vertAnchor!=="text"||t.positionTextTable===true)&&g.float.ySpec!=="inline",x=t.cursorY,b=y?l():void 0,h=y?()=>vE:o,v=g.columnWidthsPt.reduce(($,W)=>$+W,0),R=()=>g.float?la(g.float,v,i()):r()+Wl(g,n()),P=R();!y&&g.float&&g.float.vertAnchor==="text"&&!g.float.ySpec?t.cursorY=Math.max(0,Math.min(t.cursorY+g.float.yPt,h())):y&&g.float&&b&&(t.cursorY=sg(g.float,0,b));let O=($,W=t.cursorY)=>xm($,g.columnWidthsPt,P,0,u,g.cellSpacingPt,void 0,u.pageExclusionZones?.().length?W:void 0),k=[];for(let $ of g.rows)if($.isHeader)k.push($);else break;let I=0;for(let $ of k)I+=O($,t.cursorY+I);let T=I>(t.unreservedContentHeight?.()??h())+.001,S=!T,F=0,C=t.cursorY,E=[],H=new Map,A=[],D=new Map,B,j,V=($,W)=>{W.cellContentInsets&&D.set($,W.cellContentInsets);},z=()=>{if(E.length===0)return;let $=Mi(E,g,A,u.borderOwnershipBudget,u.vMergeResolveBudget,void 0,f,u,D),W=$[$.length-1],q=ql({kind:"table",...y?{outOfFlow:true}:{},id:`${e.id}#f${F}`,tableId:e.id,fragmentIndex:F,rows:$,box:{x:P,y:C,width:g.columnWidthsPt.reduce((ae,re)=>ae+re,0),height:W.box.y+W.box.height-C}},g.columnWidthsPt,0,H),X=q;if(y&&g.float&&b){let re=sg(g.float,q.box.height,b)-q.box.y;if(X=Ci([q],re)[0],Math.abs(re)>.001){let he=ce=>{for(let ye of ce)if(ye.kind==="paragraph")f(ye.paragraphId,re);else for(let be of ye.rows)for(let xe of be.cells)he(xe.blocks);};for(let ce of q.rows)for(let ye of ce.cells)he(ye.blocks);}}m(X),F+=1,E=[],A=[],D=new Map,B=void 0;},Z=($,W)=>{if(k.length===0)return;let q=$?j?.():void 0;if(q===null)return;let X=q?.headerHeight??I;if($&&t.cursorY+X>h()+.001)return;t.cursorY+X>h()+.001&&t.cursorY>0&&(z(),a(),P=R(),C=t.cursorY);let ae=!$&&t.cursorY+X>h()+.001?t.unreservedContentHeight?.()??h():h();if(!$&&t.cursorY+X>ae+.001){T=true,S=false;return}if($&&!q&&W&&!W(t.cursorY+X))return;let re=q?.deps??u;for(let he of k){let ce=lr(he,g.columnWidthsPt,P,t.cursorY,$,0,re,g.cellSpacingPt);if(ce.bottom>ae+.001)throw new ir("table-row-overheight",`Table header row ${he.id} overflowed the page content box`);E.push(ce.record),V(ce.record,re),A.push(he),t.cursorY=ce.bottom;}B=q;},U=$=>{z(),a(),P=R(),C=t.cursorY,S&&Z(true,$);};T||Z(false);let te=g.rows.slice(T?0:k.length),K=Sm(g,()=>P,0,u,te),Q,w=0,N=0,J=($,W)=>{Q=MR(K,$,t.cursorY,h()),N=Q?.heightFloorPt??O(W??te[$]),w=Q?.heightFloorPt??(B?.bodyRowId===te[$]?.id?B.bodyHeight:N);};for(let[$,W]of te.entries()){T&&$>=k.length&&(S=true),J($,W);let q=bm(W),X=false,ae=0,re=false,he=()=>B?.bodyRowId===W.id?B.deps:u;j=()=>X?void 0:Lk(g,k,W,P,t.cursorY,h(),I,N,u);let ce=Q!==void 0&&Q.detachedSpanHeightPtByCellId===void 0,ye=be=>{let xe=h(),ke=xe-be;return ke<=.001?false:!X&&w<=ke+.001?true:!X&&(W.cantSplit||W.height.rule==="exact")?false:Ck(W,g.columnWidthsPt,P,be,xe,X,0,u,q,g.cellSpacingPt)};for(!ce&&w<=h()+.001&&t.cursorY+w>h()+.001&&t.cursorY>0&&(U(ye),re=true,J($));;){if(ae+=1,ae>ym)throw new ir("table-row-fragment-limit",`Table row ${W.id} exceeded ${ym} page fragments`);let be=h()-t.cursorY;if(be<=.001&&t.cursorY>0){if(re)throw new ir("table-row-overheight",`Table row ${W.id} cannot fit after repeated header rows`);U(ye),re=true,J($);continue}if(!X&&w<=be+.001){let _e=lr(W,g.columnWidthsPt,P,t.cursorY,false,0,he(),g.cellSpacingPt,Q,h());if(_e.bottom>h()+.001)throw new ir("table-row-overheight",`Table row ${W.id} overflowed the page content box after placement`);let Be=_e.remainder!==null;if(E.push(_e.record),V(_e.record,he()),A.push(Be?qc(W,X,true):W),t.cursorY=_e.bottom,!Be)break;q=_e.remainder,X=true,re=false,U(ye);continue}if(!X&&(W.cantSplit||W.height.rule==="exact")){if(t.cursorY>0&&!re){U(ye),re=true,J($);continue}let _e=t.unreservedContentHeight?.()??h();if(_e>h()+.001&&w<=_e-t.cursorY+.001){let Be=lr(W,g.columnWidthsPt,P,t.cursorY,false,0,he(),g.cellSpacingPt,Q,_e);if(Be.bottom<=_e+.001&&Be.remainder===null){E.push(Be.record),V(Be.record,he()),A.push(W),t.cursorY=Be.bottom;break}}throw new ir("table-row-overheight",W.height.rule==="exact"?`Table row ${W.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${W.id} has w:cantSplit and is taller than the available page content`)}let xe=Jl(W,g.columnWidthsPt,P,t.cursorY,h(),false,X,0,u,q,g.cellSpacingPt,Q);if(!xe.fitted&&t.cursorY>0&&!re){U(ye),re=true,J($);continue}let ke=t.unreservedContentHeight?.()??h();if(!xe.fitted&&t.cursorY<=.001&&!re&&ke>h()+.001){U(ye),re=true,J($);continue}if(!xe.fitted)throw new ir(xe.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",xe.nestedSplitBlocked?`Table row ${W.id} contains a nested table taller than the page content box`:`Table row ${W.id} has content that cannot fit a page content box`);if(xe.bottom>h()+.001)throw new ir("table-row-overheight",`Table row ${W.id} overflowed the page content box`);let Me=xe.remainder!==null,we=qc(W,X,Me);if(E.push(xe.record),A.push(we),t.cursorY=xe.bottom,!Me)break;q=xe.remainder,X=true,re=false,U(ye);}}return z(),y&&(t.cursorY=x),{outOfFlow:y}}var ji="http://schemas.openxmlformats.org/wordprocessingml/2006/main",IE=32,Nk=1e4,Ak=1e4;function TE(e){if(e.kind!=="paragraph"||e.listItem||e.shading||e.paragraph.children.some(r=>r.kind==="paragraphProperties"?false:r.kind==="textValue"||r.namespaceUri!==ji?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>Ak||r.namespaceUri!==ji||["ins","del","moveFrom","moveTo","pPrChange","rPrChange","vanish","webHidden"].includes(r.localName)||n+t.length+r.children.length>Ak)return false;for(let o of r.children){if(o.kind==="textValue")return false;t.push(o);}}return true}function FE(e){let t=[e],n=0;for(;t.length;){let r=t.pop();if(++n>Nk||r.namespaceUri!==ji||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===ji&&o.localName==="val"&&o.value==="overlap")||n+t.length+r.children.length>Nk)return false;for(let o of r.children)o.kind!=="textValue"&&t.push(o);}return true}function OE(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!==ji||r.children.length)return false;let o=new Set;for(let a of r.attributes){if(a.namespaceUri!==ji||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 Dk(e,t,n,r,o,a){let i=e.length-1,l=e[i];if(!l||!TE(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(!FE(f.table)||!OE(f.table))return;let p=Ut(f.table,t,0,n,r,o,a)?.float;if(!p||p.vertAnchor!=="text"||p.ySpec||d.length>=IE)return;d.push(f.table),c.push(f.key),s=u;}if(d.length)return {start:s,anchorIndex:i,tables:d.reverse(),token:ne(c)}}function _k(e,t){let{cursorY:n,anchorHeight:r,contentWidth:o,contentHeight:a}=t;if(!Number.isFinite(r)||r<=0||n+r>a+.001)return;let i=e.tables.map(m=>Ut(m,o,0,t.styleCascade,t.displayMode,t.authorFilter,t.deps.compatibilityMode)),l=[],s=n+r,d=0,c={...ar(t.deps),onCellBreakKey:void 0,borderOwnershipBudget:uo(),vMergeResolveBudget:da(),nextLineId:()=>`terminal-table-probe-${d++}`};for(let m=0;m<i.length;m+=1){let p=i[m];if(!p?.float||!p.rows.length)return;let g=p.columnWidthsPt.reduce((h,v)=>h+v,0),y=la(p.float,g,t.frames),x=n+p.float.yPt;if(![y,x,g].every(Number.isFinite)||g<=0||y<0||y+g>o+.001||x<n||x>a)return;let b=Ql(p,y,x,0,e.tables[m].id,0,c);if(!Number.isFinite(b.bottom)||b.bottom>a+.001||l.some(h=>y<h.right&&y+g>h.left&&x<h.bottom&&b.bottom>h.top))return;s=Math.max(s,b.bottom),l.push({left:y,top:x,right:y+g,bottom:b.bottom});}let u=[];return {fragments:i.map((m,p)=>{let g=[];u.push(g);let{left:y,top:x}=l[p];return {...Ql(m,y,x,0,e.tables[p].id,0,{...t.deps,onCellBreakKey:h=>g.push(h)}).fragment,outOfFlow:true}}),bottom:s,cellBreakKeys:u}}function mg(e,t,n,r){let o=`line:${e}:${n}:${t}`;return r===void 0?o:`${o}:occ:${r}`}function jk(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.firstPageBorders)||e.markPageCount>0&&e.delta+e.markPageCount>0;return t&&r&&!e.hasNoteReserves&&!e.hasExclusionZones}function Hk(e){let{geometry:t,columns:n,columnRegionBottom:r,continuedInsets:o}=e,a=`|cols:${n.widths.join(",")};${n.gaps.join(",")};${n.separator?1:0}${r!==void 0?`;bal:${r}`:""}`,i=o?`|cont:${o.top},${o.height}`:"",l=e.sectionPageBorders?`|pgb:${bc(e.sectionPageBorders)}`:"",s=`${t.width}x${t.height}|${t.margin.top},${t.margin.right},${t.margin.bottom},${t.margin.left}|fs:${e.flowStartY},${e.spaceBeforeCarry}${i}${e.furnitureContext}`;return d=>`${s}${d}${a}${l}`}var Hi=1;function hu(e,t){let n=Math.max(Hi,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(m=>Math.max(Hi,cf$1(af$1(m.widthTwips)))),l=o.slice(0,-1).map(m=>Math.max(0,cf$1(af$1(m.gapTwips))));let c=l.reduce((m,p)=>m+p,0),u=Math.max(r*Hi,n-c),f=i.reduce((m,p)=>m+p,0);if(f>u){let m=u/f;i=i.map(p=>Math.max(Hi,p*m));}}else {let c=Math.max(0,cf$1(af$1(e.gapTwips))),u=Math.min(c,Math.max(0,(n-r*Hi)/(r-1||1)));l=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(Hi,(n-l.reduce((m,p)=>m+p,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 ME=8,zi=[],zk=new TextEncoder;function BE(e,t){let n=a$1(zk.encode(e===void 0?"undefined":`string:${e}`)),r=a$1(zk.encode(t));return `control-producer:v1:${n}:${r}`}function gg(e,t){let n=zi.findIndex(o=>o.base===e&&o.token===t);if(n>=0){let[o]=zi.splice(n,1);return zi.push(o),o.producer}let r=BE(e,t);return zi.push({base:e,token:t,producer:r}),zi.length>ME&&zi.shift(),r}var Wk=new WeakMap,Vk=null;function LE(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 Gk(e,t,n,r,o,a,i,l){let s=t?Wk.get(t):Vk;if(LE(s,e,n,r,o,a,i,l))return s.producer;let d=(e??"unversioned-measurer")+(t?`|sc:${t.cacheToken}`:"")+(n?`|nm:${cP(n)}`:"")+(r!==void 0?`|dts:${r}`:"")+(o===je?"":`|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?Wk.set(t,c):Vk=c,d}var yu=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]:mk,anchorPageDeferCounts:i.size>0?new Map(i):gk,...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 $k(e,t){return e.cursorY===t.cursorY&&e.previousSpaceAfter===t.previousSpaceAfter&&e.flowColumnIndex===t.flowColumnIndex&&pk(e.pageFragments,t.pageFragments)&&cg(e.pendingParagraphFrames,t.pendingParagraphFrames)&&dg(e.pendingAnchoredDrawings,t.pendingAnchoredDrawings)&&dg(e.deferredAnchoredDrawings,t.deferredAnchoredDrawings)&&hk(e.anchorPageDeferCounts,t.anchorPageDeferCounts)&&lg(e,t)}function Kk(e,t,n){return ne([...e].map(([r,o])=>`${n}${r}=${o.flowHeight}`).sort())}function Uk(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${Kk(e.headers,false,"h")};f:${Kk(e.footers,false,"f")}`:""}function bu(e,t,n){if(e.sectionFurniture)return e.sectionFurniture[t];if(t===n-1)return e.furniture}function EE(e,t){let n=e.map((r,o)=>{let a=oo(r.properties),i=bu(t,o,e.length),l=r.properties.pageNumbering,s=l?`pn:${ne([l.start??"",l.fmt??"",l.chapStyle??"",l.chapSep??""].map(String))}`:"pn:",d=r.properties.columns,c=`pgb:${bc(r.properties.pageBorders)}`,u=`cols:${d.count},${d.gapTwips},${d.equalWidth===false?0:1},${d.separator?1:0};${(d.definitions??[]).map(f=>`${f.widthTwips}/${f.gapTwips}`).join(",")}`;return ne([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,Uk(i),s,u,c].map(String))});return ne(n)}function NE(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},()=>bo()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1,previousPageRefToken:""};return e.multi=o,o}function AE(e){return e!=="continuous"}function DE(e,t){return e.width===t.width&&e.height===t.height}function _E(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 jE(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 Xk(e,t,n){e.previous=t,e.startLineCounter=0,e.endLineCounter=n,e.keys=[],e.checkpoints=[],e.context="",e.producer="";}var Yk=new WeakMap;function HE(e,t,n,r,o,a){let i=Yk.get(e);if(i&&i.globalIndex===t&&i.sheetY===n&&i.pageNumber===r&&i.sectionPageCount===o&&i.format===a)return i.published;let l=ma(e,t,n),s=Ri([l],r,o,a)[0];return Yk.set(e,{globalIndex:t,sheetY:n,pageNumber:r,sectionPageCount:o,format:a,published:s}),s}function qk(e,t,n,r,o){let{session:a,...i}=r,l=EE(t,r),s=NE(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=[],m=[],p=0,g=0,y=0,x=0,b=0,h=0,v=0,R=true,P=[],O=null,k="",I=1;for(let C=0;C<t.length;C+=1){let E=t[C],H=e.slice(E.blockStart,E.blockEndExclusive),A=oo(E.properties),D=bu(r,C,t.length),B=u.length,j=p,V=s?.spans[C],z=Uk(D);if(H.length===0&&!AE(E.properties.breakType)){m.push({startIndex:B,pageCount:0,sheetY:j,remappedPages:[],sourcePages:[]});continue}let Z=C>0&&E.properties.breakType==="continuous"&&u.length>0&&R&&O!==null&&DE(O,A)&&k===z,U=s?.sections[C],te=E.properties.columns.count>1&&t[C+1]?.properties.breakType==="continuous",K=Z?_E(u[u.length-1]):void 0,Q=E.properties.pageNumbering?.fmt,w=Z?u[u.length-1]?.pageFieldSource?.format:void 0,N=Z&&!io("PAGE",w)?w:Q,J=o(H,n,{...i,retainKeys:d,geometry:A,furniture:D,sectionColumns:E.properties.columns,paragraphLineUnitPt:(E.properties.gridLinePitchTwips??240)/20,...E.properties.pageBorders?{sectionPageBorders:E.properties.pageBorders}:{},...te?{balanceColumns:te}:{},lineCounterStart:g,pageIndexStart:Z?B-1:B,...Z?{flowStartY:h,spaceBeforeCarry:v}:{},...K?{continuedPageInsets:K}:{},...N!==void 0?{bodyPageNumberFormat:N}:{},...U?{session:U}:{}});P.push({startIndex:B,at:J.overflowShellAt}),g=J.lineCounter,h=J.endCursorY,v=J.endSpaceAfter,R=J.endsOpenPage,O=A,k=z,U?(y+=U.stats.placed,x+=U.stats.total):(y+=H.length,x+=H.length);let $=U!==void 0&&U.stats.placed===0&&U.stats.reusedPages===J.pages.length&&V!==void 0&&V.pageCount===J.pages.length&&V.sourcePages.length===J.pages.length&&V.sourcePages.every((ye,be)=>ye===J.pages[be]),W=V!==void 0&&V.startIndex===B&&V.sheetY===j&&V.remappedPages.length===J.pages.length,q=E.properties.pageNumbering,X=q?.start!==void 0?q.start:I,ae=q?.fmt,re=V?.remappedPages[0],he=V===void 0||V.remappedPages.length===0||re?.pageFieldSource!==void 0&&re.pageFieldSource.pageNumber===X&&re.pageFieldSource.sectionPageCount===V.remappedPages.length&&re.pageFieldSource.format===ae,ce;if(Z){let ye=u.length-1,be=u[ye],xe=jE(be,J.pages[0]);if(xe!==be){u[ye]=xe;let we=f.lastIndexOf(be);we!==-1&&(f[we]=xe);}let ke=[];for(let we of J.pages.slice(1)){let _e=ma(we,u.length+ke.length,p);ke.push(_e),p=_e.box.y+_e.box.height+ha;}let Me=ke.length+1;ce=Ri(ke,X+1,Me,ae);for(let we of ce)u.push(we),f.push(we);I=X+Me;}else if($&&W&&he){ce=V.remappedPages,b+=ce.length;for(let ye of ce)u.push(ye),f.push(ye),p=ye.box.y+ye.box.height+ha;I=X+ce.length;}else {let ye=[];for(let be of J.pages){let xe=HE(be,u.length+ye.length,p,X+ye.length,J.pages.length,ae);ye.push(xe),p=xe.box.y+xe.box.height+ha;}ce=ye;for(let be of ce)u.push(be),f.push(be);I=X+ce.length;}m.push({startIndex:B,pageCount:ce.length,sheetY:j,remappedPages:ce,sourcePages:J.pages});}if(u.length===0){let C=oo(t[0]?.properties??Ln),E=o([],n,{...i,retainKeys:d,geometry:C,paragraphLineUnitPt:(t[0]?.properties.gridLinePitchTwips??240)/20,sectionColumns:t[0]?.properties.columns??Ln.columns,...t[0]?.properties.pageBorders?{sectionPageBorders:t[0].properties.pageBorders}:{}});c();let H=so({revision:n,pages:E.pages});return ps(H,(A,D,B)=>E.overflowShellAt(D,B)),s&&(s.spans=[],s.previousRemapped=E.pages,s.previousFinalized=H,s.previousPageCount=H.pages.length,s.previousPageRefToken=Op(E.pages)),a&&(Xk(a,H,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),H}let T=so({revision:n,pages:u}),S=T,F=Op(u);if(s?.previousFinalized&&s.previousPageCount===T.pages.length&&s.previousRemapped.length===f.length&&s.previousPageRefToken===F){let C=s.previousFinalized.pages,E=s.previousRemapped,H=T.pages.map((A,D)=>f[D]===E[D]&&C[D]?C[D]:A);S={...T,pages:H};}return s&&(s.spans=m,s.previousRemapped=f,s.previousFinalized=S,s.previousPageCount=S.pages.length,s.previousPageRefToken=F),a&&(Xk(a,S,g),a.stats={placed:y,total:x||1,reusedPages:b,fullPasses:a.stats.fullPasses+(y===x&&b===0?1:0)}),ps(S,(C,E,H)=>{let A=P[0];for(let B of P)B.startIndex<=C&&(A=B);return (A??P[P.length-1])?.at(E,H)}),c(),S}function Zk(e,t,n){let r=t.lefts.map(()=>n);for(let o of e.fragments){if(En(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 zE=.25,WE=20;function Jk(e,t,n,r){let o=hu(n.sectionColumns??Ln.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=y=>{let x=y.pages[0],b=x?Math.max(...Zk(x,o,i)):y.endCursorY;return a&&(a.endCursorY=b),{...y,endCursorY:b}};if(a&&a.balanceLimit!==null){let y=a.balanceLimit,x=r(e,t,{...n,columnRegionBottom:y});if(a.stats.placed===0&&a.stats.reusedPages===x.pages.length)return a.balanceLimit=y,s(x)}let d=r(e,t,l);if(d.pages.length!==1||!d.endsOpenPage)return a&&(a.balanceLimit=null),r(e,t,n);let c=Zk(d.pages[0],o,i),u=c.reduce((y,x)=>y+Math.max(0,x-i),0);if(u<=0)return a&&(a.balanceLimit=null),r(e,t,n);let f=i+u/o.count,m=Math.max(...c)+.01,p=y=>{try{let x=r(e,t,{...l,columnRegionBottom:y});return x.pages.length===1&&x.endsOpenPage}catch{return false}};for(let y=0;y<WE&&m-f>zE;y+=1){let x=(f+m)/2;p(x)?m=x:f=x;}let g=r(e,t,{...n,columnRegionBottom:m});return a&&(a.balanceLimit=m),s(g)}var GE=2,Qk=new WeakMap;function KU(e,t,n){let r=n.displayMode??je,o=n.revisionAuthorFilter,a=wn(e,r,o),i=aa(e,a).sections,l=Ni(e),s=My(e),d={...n,fieldCodeRanges:n.showFieldCodes?$w(e):void 0,tocLinkStyleRanges:s,displayMode:r,producer:gg(gg(n.showFieldCodes?`${n.producer??""}|field-codes`:n.producer,l),Ly(s)),tocFieldChromeParagraphIds:n.tocFieldChromeParagraphIds??F0(e),emptyTocPlaceholderParagraphIds:n.emptyTocPlaceholderParagraphIds??O0(e),emptyTocSuppressedResultParagraphIds:n.emptyTocSuppressedResultParagraphIds??C0(e)},c=n.drawingSourceOrder;!c&&n.inlineDrawingLayout&&(c=$R(e,n.inlineDrawingLayout));let u=n.session?bS(c?{...d,drawingSourceOrder:c}:d,a,n.session):hi(c?{...d,drawingSourceOrder:c}:d,a),f=Pp(a,u.listItems,n.notes?{footnotesPart:n.notes.footnotesPart,endnotesPart:n.notes.endnotesPart}:void 0,n.notes?MS(n.notes,i):void 0,r,o),m=f===null?u:{...u,refFields:f},p=x=>{if(i.length>1)return qk(a,i,t,x,xu);let b=i[0],h=x.geometry??(b?oo(b.properties):ld),v=bu(x,0,i.length)??x.furniture,R=b?.properties.pageNumbering,P=xu(a,t,{...x,geometry:h,furniture:v,paragraphLineUnitPt:(b?.properties.gridLinePitchTwips??240)/20,sectionColumns:b?.properties.columns??Ln.columns,...b?.properties.pageBorders?{sectionPageBorders:b.properties.pageBorders}:{},...R?.fmt?{bodyPageNumberFormat:R.fmt}:{}}),O=R,k=jm({revision:P.layout.revision,pages:Ri(P.pages,O?.start??1,P.pages.length,O?.fmt)},P.layout),I=so(k);return ps(I,(T,S,F)=>P.overflowShellAt(S,F)),x.session&&(x.session.multi=null,x.session.previous=I),I},g=x=>{let b=x;if(x.displayMode!==r){let{contentControls:v,controlContextToken:R,...P}=x;b={...P,displayMode:r,...v!==void 0?{contentControls:v}:{},...R!==void 0?{controlContextToken:R}:{}};}let h=Hm(b,e,l);return n.session&&(n.session.previous=h),h};if(!n.notes)return n.session&&(n.session.notes=null,n.session.notePageBottomReserves=null),g(p(m));let y=Vw(n.notes,f?{...n,refFields:f}:n);return g(zw(e,i,m,y,p))}function $E(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=hu(n.sectionColumns??Ln.columns,a);if((n.inlineDrawingLayout||Ik(e,n.styleCascade)||Sk(e,a,n.styleCascade,n.displayMode??je,n.revisionAuthorFilter,n.compatibilityMode))&&n.drawingExclusionPass===void 0&&!n.drawingExclusionConverged){let L=de=>{let Se=n.inlineDrawingLayout?.projectionForAtom?.(de)?.drawingNodeId??de;return n.drawingSourceOrder?.get(Se)},G=Object.freeze({columnCount:i.count,columnGapPt:i.gaps[0]??0,contentWidth:a,columnLefts:i.lefts,columnWidths:i.widths}),oe=(de,Se=false)=>{let et=n.inlineDrawingLayout?Se?Bx(de,n.inlineDrawingLayout,n.drawingLayoutEpoch,a,n.drawingSourceOrder,G):Zf(de,n.inlineDrawingLayout,a,L,G):new Map;return Tk(de,Pk(de,et,G),G)},le=new Map,Pe=null,Ge=false,Fe=new Set,me=de=>(xu(e,t,de)),Ue=de=>{let Se=fg(de.pages);if(Se.size===0)return null;let et=n.paragraphFrameFallbackRound??0,He=new Set(n.disabledParagraphFrameIds);for(let kn of et>=3?fg(de.pages,true):Se)He.add(kn);let ze=n.session?bo():void 0,Gt=xu(e,t,{...n,session:ze,disabledParagraphFrameIds:He,paragraphFrameFallbackRound:et+1});return n.session&&ze&&og(n.session,ze),Gt},rt=n.session?.previous?.pages;if(rt){le=oe(rt,true),Pe=me({...n,drawingExclusionPass:0,drawingExclusionZonesByPage:le});let de=Ue(Pe);if(de)return de;if(Pe.pages===rt)return Pe;let Se=oe(Pe.pages,true);if(oc(le,Se))return Pe;le=new Map(Se),Fe.add(ac(Se));}let ot=(de,Se)=>(n.session&&Se&&og(n.session,Se),de),pe=de=>{let Se=n.session?bo():void 0;return ot(me({...n,session:Se,drawingExclusionConverged:true,drawingExclusionZonesByPage:de}),Se)};for(let de=0;de<Jo;de+=1){let Se=n.session?bo():void 0;Pe=me({...n,session:Se,drawingExclusionPass:de,drawingExclusionZonesByPage:le});let et=Ue(Pe);if(et)return et;let He=oe(Pe.pages);if(He.size===0)return de===0&&le.size===0?ot(Pe,Se):pe(He);if(oc(le,He))return ot(Pe,Se);let ze=ac(He);if(Fe.has(ze)){Ge=true,le=He;break}Fe.add(ze),le=new Map(He);}if(!Ge)for(let de=0;de<GE&&!Ge;de+=1){let Se=n.session?bo():void 0;Pe=me({...n,session:Se,drawingExclusionPass:Jo+de,drawingExclusionZonesByPage:le});let et=Ue(Pe);if(et)return et;let He=oe(Pe.pages),ze=ac(He);if(oc(le,He))return ot(Pe,Se);if(Fe.has(ze)){Ge=true,le=He;break}Fe.add(ze),le=new Map(He);}if(!Ge)throw new li(`wrap exclusion reflow did not converge within ${Jo} passes`);return pe(le)}let l=n.measurer,s$1=n.cache,d=n.styleCascade,c=n.listItems,u=n.refFields,f=n.defaultTabStopPt,m=n.displayMode??je,p=n.revisionAuthorFilter,g=m==="all-markup",y=n.tocFieldChromeParagraphIds,x=n.emptyTocPlaceholderParagraphIds,b=n.emptyTocSuppressedResultParagraphIds,h={chrome:y,placeholder:x,suppressed:b},v=Xw(h),R=Gk(n.disabledParagraphFrameIds?.size?ne([n.producer??"",ne([...n.disabledParagraphFrameIds].sort())]):n.producer,d,n.noteMarks,f,m,p,n.bodyPageNumberFormat,n.compatibilityMode),P=i.widths[0],O=n.furniture,k=r.headerDistance??36,I=r.footerDistance??36,T=n.pageBottomReserves,S=n.session,F=n.lineCounterStart??0,C=h0(O,k,I),E=n.flowStartY??0,H=n.spaceBeforeCarry??0,A=n.pageIndexStart??0,D=sw({...O?{furniture:O}:{},pageHeight:r.height,marginTop:r.margin.top,marginBottom:r.margin.bottom,headerDistance:k,footerDistance:I,pageIndexStart:A,...n.continuedPageInsets?{continuedPageInsets:n.continuedPageInsets}:{}}),B=Object.freeze(n.bodyPageNumberFormat!==void 0?{format:n.bodyPageNumberFormat}:{}),j=S?.previous?S.previous.pages.length+1:1/0,V=n.columnRegionBottom,z=n.continuedPageInsets,Z=Hk({geometry:r,flowStartY:E,spaceBeforeCarry:H,continuedInsets:z,furnitureContext:C,columns:i,columnRegionBottom:V,sectionPageBorders:n.sectionPageBorders}),U=Z(lu(T,A,j)),te=A&1,K=false,Q=null,w=()=>{K=true;},N=[],J=dw({...O?{furniture:O}:{},geometry:r,headerDistance:k,footerDistance:I,pageIndexStart:A,contentWidth:a,insetsFor:D,pageCount:()=>N.length,...n.sectionPageBorders?{pageBorders:n.sectionPageBorders}:{}}),{pageBox:$,furnitureFor:W,overflowShellAt:q}=J,X=L=>{let G=Math.max(1,D(N.length).height-L);return V!==void 0&&N.length===0?Math.max(1,Math.min(G,V)):G},ae=()=>X(T?.get(A+N.length)??0),re=()=>X(0),he=n.inlineDrawingLayout!==void 0,ye=he?Jc(L=>Qc(L,{measurer:l,producer:R,cache:s$1,styleCascade:d,...f!==void 0?{defaultTabStopPt:f}:{},compatibilityMode:n.compatibilityMode,...m?{displayMode:m}:{},...p?{revisionAuthorFilter:p}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},showFieldCodes:n.showFieldCodes,...n.numberingIndex?{numberingIndex:n.numberingIndex}:{},inlineDrawingLayout:n.inlineDrawingLayout,drawingTokenForParagraph:n.drawingTokenForParagraph,projectionTokenForParagraph:n.projectionTokenForParagraph,projectionTokenForTable:n.projectionTokenForTable}),n.numberingIndex,d,m,p):void 0,be=(L,G)=>{let oe=L.kind==="paragraph"?n.drawingTokenForParagraph?.(L)||n.drawingLayoutToken||"":L.kind==="table"&&n.drawingTokenForParagraph?YR(L,n.drawingLayoutEpoch,n.drawingTokenForParagraph)||n.drawingLayoutToken||"":n.drawingLayoutToken||"",le=L.kind==="paragraph"?n.projectionTokenForParagraph?.(L)??"":L.kind==="table"&&n.projectionTokenForParagraph?n.projectionTokenForTable?.(L)??Xo(L,n.projectionTokenForParagraph):"",Pe=ye?.hostedListTokenForParagraph?.(L)??"",Ge=L.kind==="table"?tb(L,c):c?.get(L.id)?.cacheToken??"",Fe=Ge===""&&Pe===""?"":ne([Ge,Pe]),me=u===void 0?"":L.kind==="table"?VS(L,u):u.tokenForParagraph(L.id),Ue=Qk.get(L);if(Ue&&Ue.contentWidth===G&&Ue.frameEnabled===(i.count===1&&!n.disabledParagraphFrameIds?.has(L.id))&&Ue.producer===R&&Ue.drawingToken===oe&&Ue.projectionToken===le&&Ue.listToken===Fe&&Ue.refToken===me&&Ue.drawingContext===he)return Ue.entry;let rt=pl(oe,he),ot;if(L.kind==="table")ot={kind:"table",table:L,key:o({paragraph:L,properties:[...Fe?[{localName:"list",attributes:{token:Fe}}]:[],...me?[{localName:"refFields",attributes:{token:me}}]:[]],width:G,producer:R,drawingToken:rt,projectionToken:`${le??""}|${n.paragraphLineUnitPt??12}`})};else {let pe=c?.get(L.id),de=ta(L,G,d,pe,void 0,false,n.paragraphLineUnitPt),Se=i.count===1&&!n.disabledParagraphFrameIds?.has(L.id)?nk(de.props):null,et=Se&&tk(L)?Se:void 0;et&&(de=ta(L,et.width,d,pe,void 0,false,n.paragraphLineUnitPt));let{props:He,indent:ze,available:Gt,alignment:kn,spacing:Pa,lineSpacing:Fu,contextualSpacing:Ra,styleId:$t,outlineLevel:Is,shading:Ts,inheritedRunProperties:Fs,markRunProperties:wa}=de,Ar=de.borders,{tabStops:Dr,properties:pr}=Gc(de,f,{listToken:pe?.cacheToken,hostedListToken:Pe,refToken:me});ot={kind:"paragraph",...et?{frame:et}:{},paragraph:L,props:He,indent:ze,available:Gt,alignment:kn,spacing:Pa,lineSpacing:Fu,contextualSpacing:Ra,styleId:$t,outlineLevel:Is,borders:Ar,borderGroupKey:Yl({borders:Ar,indent:ze}),shading:Ts,inheritedRunProperties:Fs,markRunProperties:wa,tabStops:Dr,keeps:tw(He),...pe?{listItem:pe}:{},key:o({paragraph:L,properties:pr,width:Gt,producer:R,drawingToken:rt,projectionToken:`${le??""}|${n.paragraphLineUnitPt??12}`})};}return Qk.set(L,{contentWidth:G,frameEnabled:i.count===1&&!n.disabledParagraphFrameIds?.has(L.id),producer:R,drawingToken:oe,projectionToken:le,listToken:Fe,refToken:me,drawingContext:he,entry:ot}),ot},xe=(n.drawingTokenForParagraph!==void 0||n.drawingLayoutToken!==void 0)&&n.drawingLayoutEpoch===void 0?null:pl(n.drawingLayoutEpoch??"",he),ke=n.projectionTokenForParagraph!==void 0&&n.projectionEpoch===void 0?null:n.projectionEpoch??"",Me=Zw(i.count,n.disabledParagraphFrameIds)+`|${n.paragraphLineUnitPt??12}`,we=S?.prepass,_e=we!=null&&we.framePolicy===Me&&xe!==null&&ke!==null&&we.drawingEpoch===xe&&we.projectionEpoch===ke&&we.producer===R&&we.contentWidth===P&&we.styleCascade===d&&we.listItems===c&&we.numberingIndex===n.numberingIndex&&we.tocToken===v&&we.refToken===(u?.valuesToken??""),Be=_e&&we.bodies.length===e.length&&we.bodies.every((L,G)=>L===e[G]),Vt=Be?we:Je();function Je(){let L=_e&&i.count===1&&!n.disabledParagraphFrameIds?we:null,G=Jw(Uw(e,L,pe=>be(pe,P)),n.paragraphLineUnitPt),oe=G.map(pe=>pe.key),le=Dk(G,P,d,m,p,n.compatibilityMode),Pe=G.map(pe=>pe.kind==="paragraph"&&pe.keeps.keepNext),Ge=G.map(pe=>pe.kind==="paragraph"?c?.get(pe.paragraph.id)?.markerText:void 0),Fe=G.map(pe=>pe.kind==="paragraph"&&pe.contextualSpacing),me=G.map(pe=>pe.kind==="paragraph"?pe.styleId??"":null),Ue=G.map(pe=>pe.kind==="paragraph"?pe.borderGroupKey:""),rt=v===""?[]:G.map(pe=>pe.kind==="paragraph"?Yw(pe.paragraph.id,h):""),ot=ow(Qw(yk(oe,G),G),{terminalTableGroup:le,contextualSpacingAt:pe=>Fe[pe],styleIdAt:pe=>me[pe]??null,borderGroupKeyAt:pe=>Ue[pe],tocVerdicts:rt,markerTextAt:pe=>Ge[pe],keepsNextAt:pe=>Pe[pe],skipKeepNextAt:pe=>G[pe]?.kind==="paragraph"&&!!G[pe].frame});return {framePolicy:Me,bodies:e,producer:R,contentWidth:P,styleCascade:d,listItems:c,numberingIndex:n.numberingIndex,drawingEpoch:xe??"",projectionEpoch:ke??"",prepared:G,keys:oe,paragraphDocumentOrder:L&&qw(L.bodies,e)?L.paragraphDocumentOrder:hm(G,P,d,m,p,n.compatibilityMode),keepsNext:Pe,markerTexts:Ge,tocToken:v,refToken:u?.valuesToken??"",flowKeys:ot,terminalTextTables:le}}S&&xe!==null&&ke!==null&&!Be&&(S.prepass=Vt);let{prepared:Ne,keys:pn,paragraphDocumentOrder:mn,keepsNext:Mr,flowKeys:dt,terminalTextTables:rn}=Vt,Gi=()=>{n.retainKeys!==false&&(n.retainKeys===void 0&&s$1&&!(s$1.retentionPassDue?.()??true)||ib(s$1,n.retainKeys,pn,Ne.flatMap(L=>L.kind==="table"?[L.table]:[])));},on=S?.previous??null,sr=on!==null&&S!==void 0&&S.context===U&&S.producer===R&&(!S.parityDependent||S.startPageParity===te),xo=i.count===1&&sr,Dt=0;if(sr){let L=Math.min(dt.length,S.keys.length);for(;Dt<L&&dt[Dt]===S.keys[Dt];)Dt+=1;}let Ke=0;if(xo){let L=Math.min(dt.length,S.keys.length)-Dt;for(;Ke<L&&dt[dt.length-1-Ke]===S.keys[S.keys.length-1-Ke];)Ke+=1;}if(sr&&Dt===Ne.length&&Ne.length===S.keys.length){let L=jm({revision:t,pages:on.pages},on),G=F+(S.endLineCounter-S.startLineCounter);return S.previous=L,S.startLineCounter=F,S.endLineCounter=G,S.startPageParity=te,S.stats={placed:0,total:Ne.length,reusedPages:on.pages.length,fullPasses:S.stats.fullPasses},Gi(),{layout:L,pages:L.pages,lineCounter:G,endCursorY:S.endCursorY,endSpaceAfter:S.endSpaceAfter,endsOpenPage:S.endsOpenPage,overflowShellAt:q}}let _t=ik(Ne,P,d,m,p,n.compatibilityMode),dr=new Set(_t.map(({table:L})=>L.id)),Pt=lk(_t,dt),Qe=[],Oe=0,Ie=0,jt=()=>i.lefts[Oe],pt=()=>i.widths[Oe],Br=()=>({text:{left:jt(),width:pt()},margin:{left:0,width:a},page:{left:-r.margin.left,width:r.width}}),So=()=>ck(Qe,Ie),Ae=[],yt=[],_=new Map,M=new Set,ee=[],ie=new Set,Te=0,Re=new mu,Y=E,Le=E,Xe=0,Mt=F,Ce=H,Dn=[],Lr=new yu({paragraphFrames:Re,positionedFlow:Pt,pendingFloatIds:M,floatSignals:ee,anchorPageDeferCounts:_}),$i=()=>Lr.capture({pageCount:N.length,pageFragments:Qe,pendingAnchoredDrawings:Ae,deferredAnchoredDrawings:yt,cursorY:Y,lineCounter:Mt,previousSpaceAfter:Ce,flowColumnIndex:Xe}),Po=0,Ki=0,xa=0,Ro=E===0;if(xo&&Dt>0&&Dt<S.checkpoints.length){let L=S.checkpoints[Dt];N.push(...on.pages.slice(0,L.pageCount)),{pageFragments:Qe,pendingAnchoredDrawings:Ae,deferredAnchoredDrawings:yt,cursorY:Y,flowColumnIndex:Xe,lineCounter:Mt,previousSpaceAfter:Ce}=Lr.restore(L),Oe=Xe,Po=Dt,Ro=false,xa=N.length,Dn.push(...S.checkpoints.slice(0,Dt));}let Er=(L,G)=>{let oe=D(N.length).top;for(let le of Re.publish({page:{x:-r.margin.left,y:-oe},margin:{x:0,y:r.margin.top-oe},text:{x:jt(),y:G}},L,Xe))Qe.push(le);},wo=i.count,gn=jt,ko=L=>Object.freeze({x:i.lefts[Xe]??0,y:L.y,width:i.widths[Xe]??P,height:L.height}),Nr=()=>Fk({pageNumber:A+N.length+1,onPageParityRead:w,geometry:r,insets:D(N.length),contentWidth:P,contentHeight:ae(),ownerPartName:n.inlineDrawingLayout?.ownerPartName??s}),Sa=()=>Zo(Nr()),Ps=L=>{let G=n.inlineDrawingLayout?.projectionForAtom?.(L)?.drawingNodeId??L;return n.drawingSourceOrder?.get(G)},$e=L=>{if(L.length===0)return;for(let oe of L)Ae.some(le=>le.drawingNodeId===oe.drawingNodeId)||Ae.push(oe.sourceOrder===void 0&&Ps(oe.drawingNodeId)!==void 0?Object.freeze({...oe,sourceOrder:Ps(oe.drawingNodeId)}):oe);if(!n.inlineDrawingLayout)return;let G=Fx(Ae,{pageBottom:ae()});if(Ae.splice(0,Ae.length,...G.drawings),G.deferred.length>0)for(let oe of G.deferred){let le=(_.get(oe.drawingNodeId)??0)+1;_.set(oe.drawingNodeId,le),le>=Gf?Ae.push(Uf(oe,"page-defer-exhausted")):yt.push(oe);}},Ye=()=>{if(yt.length===0)return;let L=yt.map(G=>Xf(G,Y-G.y));yt=[],$e(L);},Ht=()=>{},cr=()=>{Ht();let L=N.length,G=$(L),oe=W("header",L,G),le=W("footer",L,G),{usedBottom:Pe,hasBodyPageFields:Ge}=Fp(Qe,Le),Fe=D(L),me=nu(n.sectionPageBorders,r,L===0);N.push({id:`page-${L}`,index:L,box:G,contentBox:{x:G.x+r.margin.left,y:G.y+Fe.top,width:a,height:Fe.height},fragments:Qe,hasBodyPageFields:Ge,...i.separator?{columnSeparators:i.gaps.map((Ue,rt)=>({x:i.lefts[rt]+i.widths[rt]+Ue/2-.375,y:Le,width:.75,height:Math.max(0,Pe-Le)}))}:{},...me?{pageBorders:me}:{},...Ae.length>0?{anchoredDrawings:Tx(Ae)}:{},...oe?{header:oe}:{},...le?{footer:le}:{}}),Qe=[],Ae=[],Y=0,Oe=0,Xe=0,Le=0,Ie=0;},Rs=(L,G)=>L.kind==="paragraph"&&Ok(L,G,n.inlineDrawingLayout),qt=()=>{if(Oe+1<i.count){Oe+=1,Xe=Oe,Y=Le,Ce=0,Ie=Qe.length;return}cr(),Ye();},ur={paragraphLineUnitPt:n.paragraphLineUnitPt,measurer:l,cache:s$1,producer:R,onCellBreakKey:L=>{Q?.push(L);},nextLineId:(L,G,oe,le)=>(Mt+=1,mg(L,G,oe,le)),pageOccurrenceKey:()=>String(N.length),styleCascade:d,listItems:c,...f!==void 0?{defaultTabStopPt:f}:{},compatibilityMode:n.compatibilityMode,...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},showFieldCodes:n.showFieldCodes,fieldCodeRanges:n.fieldCodeRanges,tocLinkStyleRanges:n.tocLinkStyleRanges,...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:B,...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:Nr,pageContentClip:Sa,hostedStory:ye,publishAnchoredDrawings:$e,collectAnchoredDrawings:$e,columnBoxForParagraph:ko,pageExclusionZones:()=>n.drawingExclusionZonesByPage?.get(N.length)??Object.freeze([]),paragraphOrderIndex:L=>mn.get(L),onAnchorShift:(L,G)=>zf(Ae,L,G),onAnchorRepublish:(L,G)=>{for(let oe=Ae.length-1;oe>=0;oe-=1)Ae[oe].anchorParagraphId===L&&Ae.splice(oe,1);Ae.push(...G);}}:{},borderOwnershipBudget:uo(),vMergeResolveBudget:da(),displayMode:m,...p?{revisionAuthorFilter:p}:{}},vu=L=>Kc(c?.get(L.paragraph.id)??L.listItem,L.indent,l,L.tabStops,L.available,Ot(L.props)),ws=new Map,Ov=(L,G)=>{let oe=ws.get(L);oe||(oe=new Set,ws.set(L,oe)),oe.add(G);},Ig=L=>{let G=ws.get(L);if(!(!G||!s$1)){for(let oe of G)s$1.release?.(oe);ws.delete(L);}},ks=(L,G,oe=0)=>{let le=L.paragraph.id,Pe=x?.has(le)??false,Ge=n.fieldCodeRanges?.get(le)?.some(Se=>Se.suppressParagraph)||!Pe&&((y?.has(le)??false)||(b?.has(le)??false)),Fe=L.available,me=gn(),rt=(L.frame?[]:n.drawingExclusionZonesByPage?.get(N.length)??Object.freeze([])).filter(Se=>{let et=mn.get(L.paragraph.id),He=mn.get(Se.anchorParagraphId);if(et!==void 0&&He!==void 0){if(He>et)return false}else {let ze=Ne.findIndex(Gt=>Gt.kind==="paragraph"&&Gt.paragraph.id===Se.anchorParagraphId);if(ze<0||ze>G)return false}return !(wo>1&&Se.columnIndex!==Xe)}),ot=me===0?rt:nc(rt,me,0),pe=Jn(ot),de=null;return s$1&&!Ge&&(de=RR(L.key,{exclusionToken:pe,paragraphStartY:Y,columnIndex:Xe,startOffset:oe}),Ov(le,de)),$c({paragraph:L.paragraph,paragraphId:le,indentLeft:L.indent.left,available:Fe,measurer:l,cache:s$1,cacheKey:de,formatting:L,producer:R,styleCascade:d,tabStops:L.tabStops,flow:{firstLineOffset:oe===0?vu(L):0,startOffset:oe,marginExtent:{left:0,right:L.indent.left+Fe+L.indent.right},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},showFieldCodes:n.showFieldCodes,fieldCodeRanges:n.fieldCodeRanges?.get(le),tocLinkStyleRanges:n.tocLinkStyleRanges?.get(le),...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:B,...u?{refFields:u}:{},displayMode:m,...p?{revisionAuthorFilter:p}:{},...n.noteMarks?{noteMarks:n.noteMarks}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},contentLeft:0,contentRight:wo>1?pt():L.indent.left+Fe+L.indent.right,paragraphStartY:Y,...ot.length>0?{pageExclusionZones:ot}:{},...Ge?{suppressEmptyPlaceholderLine:true}:{}}})},Tg=(L,G)=>(n.drawingExclusionZonesByPage?.get(N.length)??Object.freeze([])).filter(le=>{let Pe=mn.get(L.paragraph.id),Ge=mn.get(le.anchorParagraphId);if(Pe!==void 0&&Ge!==void 0){if(Ge>Pe)return false}else {let Fe=Ne.findIndex(me=>me.kind==="paragraph"&&me.paragraph.id===le.anchorParagraphId);if(Fe<0||Fe>G)return false}return !(wo>1&&le.columnIndex!==Xe||!le.sourceKind&&le.anchorParagraphId===L.paragraph.id&&le.input.mode==="topAndBottom")}),Fg=(L,G,oe,le,Pe,Ge,Fe)=>{let me=Tg(L,G);if(!n.inlineDrawingLayout||le<=Pe)return me;let Ue=Pn(L.paragraph),rt=new Map,ot=0;for(let He=Pe;He<le;He+=1){let ze=oe[He];for(let kn of Ue.values())kn>=ze.start&&kn<ze.end&&rt.set(kn,ot);let Gt=Fe.get(He)??oe[He].exclusionSkipBefore??0;ot+=Gt+oe[He].height;}if(rt.size===0)return me;let pe=wo>1,de=L.available,Se=gn(),et=rc({paragraph:L.paragraph,paragraphId:L.paragraph.id,drawingLayout:n.inlineDrawingLayout,contentLeft:pe?Se:0,contentRight:pe?Se+pt():L.indent.left+de+L.indent.right,paragraphStartY:Ge,anchorLineTopByModelStart:rt,columnIndex:Xe,displayMode:m,...p?{revisionAuthorFilter:p}:{}});return Object.freeze([...me,...et])},Cv=(L,G,oe,le,Pe,Ge,Fe,me)=>{if(n.inlineDrawingLayout){let pe=[...Pn(L.paragraph).values()];if(pe.length>0){let de=Math.min(...pe);if(Fe.end<=de||pe.some(Se=>Se>=Fe.start&&Se<Fe.end)&&Fe.end<=de+1)return 0}}let Ue=Fg(L,G,oe,le,Pe,Ge,me),rt=Ue.length>0?eo(Y,Fe.height,Ue):0,ot=Fe.exclusionSkipBefore??0;return Math.max(rt,ot)},Og=(L,G=Y,oe=false)=>{let le=Y,Pe={positionTextTable:oe,cursorY:G,columnWidth:pt,columnLeft:jt,contentHeight:ae,unreservedContentHeight:re,advanceColumn:()=>{Y=Pe.cursorY,qt(),Pe.cursorY=Y;},anchorFrames:Br,verticalAnchorFrames:()=>dk(Nr(),G,r.margin.top),styleCascade:d,displayMode:m,...p?{revisionAuthorFilter:p}:{},deps:ur,compatibilityMode:n.compatibilityMode,shiftAnchor:(Fe,me)=>zf(Ae,Fe,me),publishFragment:Fe=>Qe.push(Fe)},Ge=Ek(L,Pe);return Y=Ge.outOfFlow?le:Pe.cursorY,Ge.outOfFlow};Ht=()=>sk(_t,M,Qe,ee,(L,G,oe,le)=>{let Pe=Oe,Ge=Xe;Oe=G,Xe=G,Q=[];try{let Fe=ug(L,oe,pt(),Br(),Qe.slice(0,le),ur);Og(L,Fe,!0),Bd(L,Q);}finally{Q=null,Oe=Pe,Xe=Ge;}});let fr=false,Iu=Ne.length,Tu=0;for(let L=Po;L<Ne.length;L+=1){let G=be(e[L],pt());if(Dn[L]=$i(),xo&&Ke>0&&L>=Ne.length-Ke){let ge=S.checkpoints[L+(S.keys.length-Ne.length)];if(ge&&$k(ge,Dn[L])){let ue=N.length-ge.pageCount;if(jk({delta:ue,titlePage:O?.titlePage===true,evenAndOddHeaders:O?.evenAndOddHeaders===true,parityDependent:S.parityDependent,usedPageParity:K,markPageCount:ge.pageCount,continuedInsets:z!==void 0,firstPageBorders:n.sectionPageBorders!==void 0&&n.sectionPageBorders.display!=="allPages",hasNoteReserves:T!==void 0,hasExclusionZones:(n.drawingExclusionZonesByPage?.size??0)>0})){let mt=ue===0?on.pages.slice(ge.pageCount):on.pages.slice(ge.pageCount).map((gt,Bt)=>ma(gt,N.length+Bt,$(N.length+Bt).y));N.push(...mt),xa+=mt.length,fr=true,Iu=L,Tu=ue,Mt+=S.endLineCounter-ge.lineCounter;break}}}if(Ki+=1,G.kind==="table"){if(ie.has(G.table.id))continue;if(rn?.start===L&&i.count===1&&M.size===0&&!Qe.some(fu)&&!n.drawingExclusionZonesByPage?.get(N.length)?.length){let ge=Ne[rn.anchorIndex];if(ge.kind==="paragraph"){let ue=ks(ge,rn.anchorIndex);if(ue.length===1&&ue[0].spans.length===0){let Rt=ni(ge.spacing.before,Ce),mt=_k(rn,{cursorY:Y+Rt,anchorHeight:ue[0].height,contentWidth:P,contentHeight:ae(),frames:Br(),deps:ur,styleCascade:d,displayMode:m,authorFilter:p});if(mt){for(let gt of mt.fragments){let Bt=_t.find(_n=>_n.table.id===gt.tableId);Qe.push({...gt,floatingWrap:{anchorId:Bt.anchorId,columnIndex:Xe,float:Bt.float,sourceOrder:Bt.sourceIndex}});}for(let[gt,Bt]of rn.tables.entries())ie.add(Bt.id),Bd(Bt,mt.cellBreakKeys[gt]);Te=mt.bottom;continue}}}}if(dr.has(G.table.id)&&!kk(G.table,n.drawingExclusionZonesByPage,ur)&&gu(G.table,Math.min(...i.widths),ur)<=ae()){Pt.add(M,G.table.id);continue}Q=[];try{Og(G.table)||(Ce=0),Bd(G.table,Q);}finally{Q=null;}continue}let oe=G.frame,{paragraph:le,props:Pe,contextualSpacing:Ge,styleId:Fe,borders:me,shading:Ue,keeps:rt}=G,ot=Ne[L],pe=ot.kind==="paragraph"?ot.spacing:G.spacing,{indent:de,alignment:Se,markRunProperties:et}=G,He=Ot(G.props),ze=G.available,Gt=L>0?Ne[L-1]:void 0,kn=Ne[L+1],Pa=um(pe,Ge,Fe,Gt?.kind==="paragraph"?Gt.styleId:void 0,kn?.kind==="paragraph"?kn.styleId:void 0),Fu=c?.get(le.id)??G.listItem,Ra=vu(G),$t=le.id,Is=G.borderGroupKey,Ts=ge=>Is!==""&&ge?.kind==="paragraph"&&ge.borderGroupKey===Is,Fs=Ts(Gt),wa=Ts(kn),Ar=Fs?void 0:me.top,Dr=wa?me.between:me.bottom,pr=qo(Ar),Ng=qo(Dr);Ub(Pe)&&(Qe.length>0||Y>0)&&(cr(),Ce=0);let bt=ks(G,L);if(bt.length===0){Ig($t),Pt.note(ee,le.id,Xe,Qe.length,Y);continue}let Bv=er(le)!==void 0&&Rs(G,bt),Ag=()=>Bv&&V===void 0&&Oe+1>=i.count,Ou=ge=>{let ue=be(le,pt());ue.kind==="paragraph"&&(de=ue.indent,Se=ue.alignment,ze=ue.available,et=ue.markRunProperties,Ra=ge===0?vu(ue):0,bt=[...ks(ue,L,ge)]);},Os=oe?{cursorY:Y,previousSpaceAfter:Ce,firstParagraphOfSection:Ro}:null,Cs=oe?Re.start(oe,Gt?.kind==="paragraph"?Gt.paragraph.id:void 0):null;if(Cs&&(Y=Cs.cursorY,Ce=Cs.previousSpaceAfter),!oe){let ge=ni(Pa.before,Ce),ue=et.length===0?On:De(et,d?.themeFonts),Rt=bt.length<=1?Ng:0,mt=Y+ge+pr,gt=Fg(G,L,bt,0,0,mt,new Map),Bt=bt[0]?ep(mt,bt[0],gt,Rt):l.lineMetrics(ue).height+Rt,_n=ge+pr+Math.max(Bt,Rk(_t,M,$t,pt(),ur,{anchorY:mt,frames:Br(),earlier:Qe}));if(rt.keepNext&&!Mr[L-1]){let Kt=rw(Ne,L,Ce,hn=>{let jn=be(e[hn],pt());return jn.kind==="paragraph"?ks(jn,hn).map(vn=>vn.height):[]},hn=>Ne[hn]?.kind==="paragraph"&&!!Ne[hn].frame);Kt!==null&&Kt+pr<=ae()&&(_n=Math.max(_n,Kt+pr));}Y+_n>ae()&&Y>0&&!Ag()&&(qt(),Ce=0,Ou(0));}let Lv=Y===0&&!So(),Cu=tx(Pa.before,Ce,oe?false:Lv,oe?false:Ro);Cu>0&&(Y+=Cu),pr>0&&(Y+=pr),Ro=false;let _r=0,qe=[],Dg=bt[0]?.start??0,ka=Cu,vo=pr,Mu=false,Io=Y,_g=0,Ms=new Map;Ce=0;let jg=n.inlineDrawingLayout!==void 0&&Yt(G.paragraph,n.inlineDrawingLayout).length>0,Hg=false,Bu=null,{revisions:Ev,formatRevision:Nv}=md(G.paragraph,m,p),zg=Ua(G.paragraph,m,p),Wg=Yr(G.paragraph),Vg=Wg?qa(Wg,m,p):null,Av=()=>{let ge=qe[0];if(!ge)return 0;let ue=_g;if(ue<=.001)return 0;let Rt=eo(Io,ge.box.height,Tg(G,L));return Math.max(0,ue-Rt)},Bs=ge=>{if(qe.length===0)return;let ue=jt(),Rt=gn(),mt=qe[0].box.y,gt=mt-ka-vo,Bt=qe[qe.length-1].box.y+qe[qe.length-1].box.height,_n=ge?Pa.after:0,Kt=[],hn,jn=mt,vn=Bt,Hr=me.left?cn(me.left):0,Yi=me.right?cn(me.right):0,va=me.left?ue+de.left-me.left.spacePt-Hr:ue+de.left,Eu=me.right?ue+de.left+ze+me.right.spacePt+Yi:ue+de.left+ze,Ia=Math.max(Eu-va,0);if(vo>0&&Ar){let Zt=cn(Ar),gr=mt-Ar.spacePt-Zt;Kt.push({side:"top",edge:Ar,box:{x:va,y:gr,width:Ia,height:Zt}}),jn=gr;}if(ge&&Dr){let Zt=cn(Dr),gr=Bt+Dr.spacePt,Ma={x:va,y:gr,width:Ia,height:Zt};Kt.push({side:wa?"between":"bottom",edge:Dr,box:Ma}),wa||(hn={edge:Dr,box:Ma}),vn=gr+Zt;}ge&&(Y=Math.max(Y,vn+_n));let Ta=Math.max(vn+_n-gt,0),wt=Fs&&_r===0?gt:jn,mr=wa&&ge?gt+Ta:vn,Fa=Math.max(mr-wt,0);if(me.left&&Kt.push({side:"left",edge:me.left,box:{x:ue+de.left-me.left.spacePt-Hr,y:wt,width:Hr,height:Fa}}),me.right&&Kt.push({side:"right",edge:me.right,box:{x:ue+de.left+ze+me.right.spacePt,y:wt,width:Yi,height:Fa}}),me.bar){let Zt=cn(me.bar);Kt.push({side:"bar",edge:me.bar,box:{x:ue+de.left-me.bar.spacePt-Zt,y:mt,width:Zt,height:Math.max(Bt-mt,0)}});}let Oa=Vg?Td(qe,Vg):null,Ca=_r===0?Xc(Fu,l,qe[0]?{y:qe[0].box.y,height:qe[0].box.height}:void 0,0,He?de.left+ze+de.right:void 0):void 0,Ls=Ca?{...Ca,box:{...Ca.box,x:Ca.box.x+ue}}:void 0;!oe&&_r===0&&(Er($t,Io),Pt.note(ee,$t,Xe,Qe.length,Io));let zr={kind:"paragraph",id:`${$t}#f${_r}`,paragraphId:$t,fragmentIndex:_r,range:Oa?Oa[Oa.length-1].range:{paragraphId:$t,start:Dg,end:qe[qe.length-1].range.end},props:Pe,styleId:G.styleId,outlineLevel:G.outlineLevel,alignment:G.alignment,spacing:{before:ka,after:_n},indent:de,...hn?{bottomBorder:hn}:{},...Kt.length>0?{borders:Kt}:{},...Ue===void 0?{}:{shading:Ue,shadingBox:me.left||me.right?{x:va,y:jn,width:Ia,height:Math.max(vn-jn,0)}:Js(qe,ue+de.left,ze)},tabStops:G.tabStops,...Ls?{marker:Ls}:{},...ge?{paragraphEnd:true}:{},...ge&&g?gd(Ev,Nv):{},...ge&&zg.length>0?{markChangeSites:zg}:{},lines:Oa??qe,...Vc(qe,et,d?.themeFonts),box:{x:Rt+de.left,y:gt,width:ze,height:Ta}};if(oe?Re.add(oe,zr,Cs?.groupId,L):Qe.push(zr),n.inlineDrawingLayout&&jg&&!Hg){Hg=true;let Zt=[...Pn(G.paragraph).values()],gr=Zt.length>0&&Zt.every(an=>qe.some(To=>an>=To.range.start&&an<To.range.end)),Ma,Es,Nu;if(gr){let an=gt-Av();Ma=qe,Es={x:Rt+de.left,y:an,width:ze,height:Ta},Nu=ko({x:Rt+de.left,y:an,height:Ta});}else {let an=Bu??{columnX:Rt,columnWidth:pt(),startY:gt},To=an.startY;Ma=bt.map((In,Dv)=>{let _v={id:`anchor-line-${Dv}`,range:{paragraphId:$t,start:In.start,end:In.end},box:{x:an.columnX+de.left,y:To,width:ze,height:In.height},contentX:In.spans.length>0?In.spans[0].box.x+an.columnX:an.columnX+de.left,baseline:In.baseline,leading:In.leading,trailingSpacing:In.trailingSpacing,spans:In.spans.map(Au=>({...Au,box:{...Au.box,x:Au.box.x+an.columnX,y:To}}))};return To+=In.height+(In.exclusionSkipBefore??0),_v});let Gg=an.startY;Es={x:an.columnX+de.left,y:Gg,width:ze,height:Math.max(To-Gg,qe[0]?.box.height??0)},Nu=ko(Es);}$e(Qr({paragraph:G.paragraph,paragraphId:$t,paragraphBox:Es,lines:Ma,drawingLayout:n.inlineDrawingLayout,frameBase:Nr(),columnBox:Nu,cellBox:null,pageClip:Sa(),measurer:l,sourceOrderOf:Ps,layoutTextboxStory:ye.layoutTextboxStoryFor,displayMode:m,...p?{revisionAuthorFilter:p}:{}}));}_r+=1,Dg=qe[qe.length-1].range.end,qe=[],ka=0,vo=0;},jr=0,Lu=0,Xi=bt.length+yo;for(let ge=0;ge<bt.length;ge+=1){let ue=bt[ge],Rt=ge===bt.length-1,mt=Rt?Ng:0;ge===jr&&(Io=Y,jg&&Bu===null&&_r===0&&(Bu=Object.freeze({columnX:gn(),columnWidth:pt(),startY:Io})));let gt=oe?0:Cv(G,L,bt,ge,jr,Io,ue,Ms),Bt=gt+Math.max(0,ue.height-ue.trailingSpacing)+mt;if(!oe&&Y+Bt>ae()&&!Ag()&&(qe.length>0||Qe.length>0||N.length>0&&Math.max(0,ue.height-ue.trailingSpacing)+mt<=ae())){let wt=!So(),mr=Lu<Xi?nw(ge,jr,bt.length,rt,wt):ge,Fa=mr<ge;for(let zr=ge;zr>mr;zr-=1){qe.pop();let Zt=bt[zr-1],gr=Ms.get(zr-1)??Zt.exclusionSkipBefore??0;Ms.delete(zr-1),Y-=Zt.height+gr,Mt-=1;}let Oa=Fa&&qe.length===0&&_r===0,Ca=bt[mr].start,Ls=pt();if(Bs(false),qt(),ka=0,Oa?Y=vo:vo=0,pt()!==Ls){Ou(Ca),Xi=Math.max(Xi,bt.length+yo),jr=0,Fa&&(Lu+=1),ge=-1;continue}if(jr=mr,Io=Y,Fa){Lu+=1,ge=mr-1;continue}}let Kt=gn();Ms.set(ge,gt),Y+=gt;let hn=Kt+de.left+(ge===0&&!He?Ra:0),jn=Math.max(1,ze-(ge===0?Ra:0)),vn=ue.spans.map(wt=>({...wt,range:{...wt.range,paragraphId:$t},box:{...wt.box,x:wt.box.x+Kt-(He&&ge===0?Ra:0),y:Y}})),Hr=bl(vn,l,hn,jn,Se,Rt,Se==="center"||Se==="right"?ue.width:void 0,He),Yi=vn.length>0&&Hr.length>0?Hr[0].box.x-vn[0].box.x:Se!=="left"&&Se!=="both"?(()=>{let wt=jn-ue.width;return wt<=0?0:Se==="center"?wt/2:wt})():0,va=Object.freeze({x:0,y:0,width:a,height:ae()}),Eu=ue.drawings.map(wt=>{let mr=Object.freeze({...Zn(wt,Kt,Y),paragraphId:$t});return tc(mr,va)}),Ia=Cl(Eu,Yi),Ta={id:mg(le.id,ue.start,ge),range:{paragraphId:$t,start:ue.start,end:ue.end},spans:Hr,box:{x:gn()+de.left,y:Y,width:ze,height:ue.height},contentX:Od(Hr,hn+Yi),baseline:ue.baseline,leading:ue.leading,trailingSpacing:ue.trailingSpacing,...ue.manualBreakAfter?{manualBreakAfter:true}:{},...ue.deletedRanges?{deletedRanges:ue.deletedRanges}:{},...Ia.length>0?{drawings:Ia}:{},...ue.anchorRevisions?{anchorRevisions:ue.anchorRevisions}:{},...ue.changeSites?{changeSites:ue.changeSites}:{}};if(Mt+=1,qe.length===0&&(_g=gt),qe.push(Ta),Y+=ue.height,ue.columnBreakAfter){let wt=pt();if(Bs(Rt),qt(),ka=0,vo=0,Mu=true,!Rt&&pt()!==wt){Ou(ue.end),Xi=Math.max(Xi,bt.length+yo),jr=0,ge=-1;continue}jr=ge+1;}else ue.pageBreakAfter&&(Bs(Rt),cr(),ka=0,vo=0,Mu=true,jr=ge+1);}Bs(true),Ig($t),Ce=Mu?0:Pa.after,Os&&(Y=Os.cursorY,Ce=Os.previousSpaceAfter,Ro=Os.firstParagraphOfSection);}fr||Er("",Y),fr||(Dn[Ne.length]=$i());let vs=fr&&S?S.endCursorY:Math.max(Y,Te),Cg=fr&&S?S.endSpaceAfter:Ce,Mg=!fr&&(Qe.length>0||ee.length>0||N.length===0),Bg=fr&&S?S.endsOpenPage:Mg;Mg&&(cr(),vs=Math.max(vs,wk(N.at(-1).fragments),ok(N.at(-1).fragments)));let Lg=0,Mv=Gf*4+8;for(;(Ae.length>0||yt.length>0)&&Lg<Mv;)Lg+=1,Ae.length===0&&Ye(),cr();yt.length>0&&(Ae.push(...yt.map(L=>Uf(L,"page-defer-exhausted"))),yt=[],cr()),Gi();let Eg={revision:t,pages:N,...n.displayMode?{displayMode:n.displayMode}:{}};if(S){S.previous=Eg,S.checkpoints=fr?[...Dn.slice(0,Iu),...S.checkpoints.slice(Iu+(S.keys.length-Ne.length)).map(G=>Tu===0?G:{...G,pageCount:G.pageCount+Tu})]:Dn,S.keys=dt,S.context=N.length+1===j?U:Z(lu(T,A,N.length+1)),S.producer=R;let L=K||O?.evenAndOddHeaders===true;S.parityDependent=Po===0&&!fr?L:S.parityDependent||L,S.startPageParity=te,S.startLineCounter=F,S.endLineCounter=Mt,S.endCursorY=vs,S.endSpaceAfter=Cg,S.endsOpenPage=Bg,S.stats={placed:Ki,total:Ne.length,reusedPages:xa,fullPasses:S.stats.fullPasses+(Po===0?1:0)};}return {layout:Eg,pages:N,lineCounter:Mt,endCursorY:vs,endSpaceAfter:Cg,endsOpenPage:Bg,overflowShellAt:q}}function xu(e,t,n){return Jk(e,t,n,$E)}var ev=new WeakMap,tv=new WeakMap;function At(e){let t=ev.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let[o,a]of KE(r)){let i=n.get(o);i?i.push(...a):n.set(o,[...a]);}return ev.set(e,n),n}function KE(e){let t=tv.get(e);if(t)return t;let n=new Map,r=(a,i,l)=>{for(let s of St(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 Tt(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 tv.set(e,n),n}function QU(e,t,n){let r=At(e).get(t);if(r&&r.length>0){let o=ad(e,t,n,r.map(a=>a.line));if(o)return o}return ad(e,t,n)}var nv=new WeakMap;function hg(e,t){let n=nv.get(e);n||(n=new Map,nv.set(e,n));let r=n.get(t);if(r)return r;let o=[];for(let{line:i}of At(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 rv(e,t){for(let n of e)if(t>n.start&&t<n.end)return true;return false}function XE(e,t){for(let n of hg(e,t.paragraphId))if(t.offset>n.start&&t.offset<n.end)return {paragraphId:t.paragraphId,offset:n.end};return t}var YE=/[\p{L}\p{N}_'\u2019]/u;function gs(e,t,n,r=UE){let o=i=>{let l=e[i];return l!==void 0&&YE.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 UE=new Set;function Wi(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?or(i,i.range.start,n):i.box.x;if(t>=i.range.end){a=i.style.shaping?or(i,i.range.end,n):i.box.x+i.box.width;continue}return or(i,t,n)}return a}function yg(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 ov=new WeakMap,qE=/^[\p{Control}\p{Default_Ignorable_Code_Point}]+$/u,ZE=/[\p{Letter}\p{Number}\p{Punctuation}\p{Symbol}]/u;function JE(e,t,n,r){if(qE.test(e.text.slice(t-e.range.start,n-e.range.start)))return null;if(e.style.shaping&&r&&e.text.length<=jc&&e.text.length===e.range.end-e.range.start){let o=ov.get(e);o||(o=Ze(e.text),ov.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=or(e,e.range.start+l.utf16From,r);if(ZE.test(l.text)&&or(e,n,r)===s){let d=n+1,c=e.range.end;for(;d<c;){let u=Math.floor((d+c)/2);or(e,u,r)===s?d=u+1:c=u;}n=Math.min(d,e.range.end);}}}return [or(e,t,r),or(e,n,r)]}function Su(e,t,n,r,o){let a=o?.spans??e.spans;if(!a.some(l=>l.style.shaping!==void 0)){let l=Wi(e,t,r,o),s=Wi(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=JE(l,s,d,r);if(!c)continue;let[u,f]=c;i.push({x:Math.min(u,f),width:Math.abs(f-u)});}return yg(i)}var av=new WeakMap;function bg(e,t){let n=av.get(e);if(n||av.set(e,n=new Map),n.has(t))return n.get(t);let r=At(e),o=new Set([t]),a=new Map,i=new Map,l=new Map;for(let u of o){let f;for(let m of r.get(u)??[]){let p=m.line.id;a.set(p,m),l.has(p)||l.set(p,0);for(let g of St(m.line))o.add(g.paragraphId);if(f&&f!==p){let g=i.get(f);g||i.set(f,g=new Set),g.has(p)||(g.add(p),l.set(p,l.get(p)+1));}f=p;}}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 m of i.get(f)??[])l.set(m,l.get(m)-1),l.get(m)===0&&s.push(m);}let c={members:[...o],lines:d};for(let u of o)n.set(u,c);return c}var iv=new WeakMap;function hs(e,t){let n=iv.get(e);if(n||iv.set(e,n=new Map),!n.get(t.lineId)?.has(t.position.paragraphId)){let r=At(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&&rl(a).find(l=>l.range.paragraphId===t.position.paragraphId);i&&Ot(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 lv=new WeakMap;function Sg(e){let t=lv.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))}]))},lv.set(e,t),t}function xg(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 ba(e,t,n,r){let o=e[t],a=r(o);if(a===void 0)return {target:e[t+n],logicalDirection:n};let i=Sg(e),l=i.groups.get(o.lineId),d=xg(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),m=[...l.paragraphIds].some(y=>f.paragraphIds.has(y)),p=m?xg(f):f.logical;return {target:(m?n:c)===1?p[0]:p.at(-1),logicalDirection:c}}function ys(e,t,n,r){let o=Sg(e).groups.get(t.lineId),a=r(t),i=a===void 0?o.logical:xg(o);return n*(a??1)===-1?i[0]:i.at(-1)}function Pg(e,t,n,r,o,a){let i=t[n];if(o(i)===void 0)return gs(e,i.position.offset,r,a);let l=Sg(t).indexes,s=i,d=false;for(let c=0;c<t.length;c++){let u=ba(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 m=/[\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&&!m)break;d||=m;}else if(d)break;if(s=u,a.has(s.position.offset))break}return s.position.offset}function Vi(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 Rg(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 bs=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 cv(e,t){for(let n=e.length-1;n>=0;n--)if(e[n].position.paragraphId===t)return e[n]}function sv(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 dv(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 xs(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 wg(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 uv(e,t,n,r=()=>{}){let o=n.index.get(e.paragraphId)?.get(e.offset),a=o===void 0?xs(n.stops,e):n.stops[o];return a?ys(n.stops,a,t,r).position:null}function fv(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=Vi(i.stops,e,t,a);let f=wg(i.stops,e,s);if(f)return {position:f.position,desiredX:null}}else {let f=ba(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 pv(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 mv(e,t,n,r,o,a){let i=a(e.paragraphId),l=i.index.get(e.paragraphId)?.get(e.offset),s=l===void 0?xs(i.stops,e):i.stops[l];if(!s)return null;let d=n??s.x,c=sv(i.stops),u=c.indexOf(s.lineId),f=c[u+t];if(f){let p=dv(i.stops,f,d);return p?{position:p.position,desiredX:d}:null}for(let p=o+t;p>=0&&p<r.length;p+=t){let g=a(r[p]),y=sv(g.stops),x=t===-1?y[y.length-1]:y[0];if(!x)continue;let b=dv(g.stops,x,d);if(b)return {position:b.position,desiredX:d}}let m=t===-1?i.stops[0]:i.stops[i.stops.length-1];return m?{position:m.position,desiredX:d}:null}function gv(e,t,n){let r=At(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 hv(e,t,n){for(let{line:r}of At(e).get(t)??[])if(r.range.start===n&&r.drawings?.some(o=>o.start===n))return r;return null}function yv(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 kg(e){let t=e.spans[e.spans.length-1]?.text;return t===`
18
+ `||t===Ud$1}function bv(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 wu(e,t,n,r,o,a,i){for(let l of St(n))a!==void 0&&l.paragraphId!==a||tN(e,t,n,l,r,o,i);}function tN(e,t,n,r,o,a,i){let l=St(n).length>1,s=hg(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&&kg(n)&&gv(t,n,c)||c===r.start&&r.start>0&&e.length>0&&cv(e,r.paragraphId)?.position.offset===c||yv(n,c,r)||rv(s,c)&&!d(c))continue;let u=rr({x:Wi(n,c,a,r),y:n.box.y,width:0,height:n.box.height},i);u&&e.push(Ti(t,{position:{paragraphId:r.paragraphId,offset:c},x:u.x,y:u.y,height:u.height,lineId:n.id,pageIndex:o}));}}function wv(e,t,n,r,o){for(let a of t){if(a.kind==="paragraph"){for(let i of a.lines)wu(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)wv(e,l.blocks,n,r,o);}}var nN=new bs;function rN(e,t){let n=[];for(let r of e.pages)for(let o of Tt(r))for(let a of o.lines)wu(n,e,a,r.index,t,void 0,o.clipToBox?o.box:void 0);return n}var oN=new bs;function vg(e,t,n){let r=bg(e,t);return r?oN.get(e,r.members[0],n,()=>{let o=[];for(let{line:a,pageIndex:i,clipBox:l}of r.lines)wu(o,e,a,i,n,void 0,l);return Rg(o)}):Pu(e,t,n)}function Pu(e,t,n){return nN.get(e,t,n,()=>{let r=[];for(let{line:o,pageIndex:a,clipBox:i}of At(e).get(t)??[])wu(r,e,o,a,n,t,i);return Rg(r)})}function E6(e,t,n,r){if(!e.pages[t])return [];let o=[];return wv(e,n,t,o,r),o}function aN(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function iN(e,t,n){let r=e.pages[t];if(!r)return [];let o=[];for(let a of Tt(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 lN(e,t,n){let r=aN(n),o=At(e).get(t.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?[]:iN(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,m)=>{let p=f.pageIndex===a?0:1,g=m.pageIndex===a?0:1;return p-g}),u=null;for(let{line:f,pageIndex:m,clipBox:p}of c){let g=br(f,t.paragraphId);if(!g||t.offset<g.start||t.offset>g.end)continue;if(t.offset===g.end&&t.offset>g.start&&St(f).length===1&&(kg(f)||bv(f,g))){u??={line:f,pageIndex:m,clipBox:p};continue}if(t.offset===g.end&&t.offset>g.start&&hv(e,t.paragraphId,t.offset))continue;let y=rr({...Xl(f,t.offset,r.measurer,g),width:0},p);if(y)return Ti(e,{position:t,x:y.x,y:y.y,height:y.height,lineId:f.id,pageIndex:m})}if(u){let f=rr({...Xl(u.line,t.offset,r.measurer,br(u.line,t.paragraphId)),width:0},u.clipBox);return f?Ti(e,{position:t,x:f.x,y:f.y,height:f.height,lineId:u.line.id,pageIndex:u.pageIndex}):null}return null}function N6(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return sm(e,n,t)?.caret??null}function A6(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return dm(e,n,t)}function D6(e){return of(e)}var xv=new WeakMap;function kv(e){let t=xv.get(e);return t||(t=new Map,e.forEach((n,r)=>{t.has(n)||t.set(n,r);}),xv.set(e,t)),t}function Ru(e,t){return kv(e).get(t)??-1}function ku(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=Ru(t,e.anchor.paragraphId),r=Ru(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 Sv(e,t){let n=[],r=new Set;for(let{line:a}of At(e).get(t)??[]){let i=br(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 Pv(e,t){let n=new Set;for(let{line:r}of At(e).get(t)??[]){let o=br(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 Rv(e,t,n,r){let o=Wa(e),a=Eo(e),i=a.get(t.paragraphId);if(i===void 0)return null;let l=bg(e,t.paragraphId),s=vg(e,t.paragraphId,r),d=c=>hs(e,c);if(l){let c=s.index.get(t.paragraphId)?.get(t.offset),u=c===void 0?Vi(s.stops,t,n,d):ba(s.stops,c,n,d).logicalDirection,f=l.members.map(m=>a.get(m)).filter(m=>m!==void 0);i=u===-1?Math.min(...f):Math.max(...f);}return fv(t,n,o,i,c=>c===t.paragraphId?s:Pu(e,c,r),d)}function _6(e,t,n,r=null,o={}){let a=d=>hs(e,d);if(!o.stops&&(n==="left"||n==="right"))return Rv(e,t,n==="left"?-1:1,o.measurer);if(!o.stops&&(n==="wordLeft"||n==="wordRight")){let d=n==="wordLeft"?-1:1,c=vg(e,t.paragraphId,o.measurer),u=c.index.get(t.paragraphId)?.get(t.offset),f=Sv(e,t.paragraphId),m=Pv(e,t.paragraphId),p=u===void 0?gs(f,t.offset,Vi(c.stops,t,d,a),m):Pg(f,c.stops,u,d,a,m);return p===t.offset?Rv(e,t,d,o.measurer):{position:{paragraphId:t.paragraphId,offset:p},desiredX:null}}if(!o.stops&&(n==="lineStart"||n==="lineEnd")){let d=uv(t,n==="lineStart"?-1:1,vg(e,t.paragraphId,o.measurer),a);return d?{position:d,desiredX:null}:null}if(!o.stops&&(n==="documentStart"||n==="documentEnd")){let d=pv(n==="documentStart"?-1:1,Wa(e),c=>Pu(e,c,o.measurer));return d?{position:d,desiredX:null}:null}if(!o.stops&&(n==="up"||n==="down")){let d=Eo(e).get(t.paragraphId);return d===void 0?null:mv(t,n==="up"?-1:1,r,Wa(e),d,c=>Pu(e,c,o.measurer))}let i=o.stops??rN(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=wg(i,t,Vi(i,t,n==="left"?-1:1,a))??xs(i,t);return c?{position:c.position,desiredX:null}:null}let d=xs(i,t);if(!d)return null;l=i.indexOf(d);}let s=i[l];switch(n){case "left":case "right":return {position:(ba(i,l,n==="left"?-1:1,c=>hs(e,c)).target??s).position,desiredX:null};case "lineStart":return {position:ys(i,s,-1,a).position,desiredX:null};case "lineEnd":return {position:ys(i,s,1,a).position,desiredX:null};case "wordLeft":case "wordRight":{let d=Sv(e,t.paragraphId),c=Pg(d,i,l,n==="wordLeft"?-1:1,a,Pv(e,t.paragraphId));return c===t.offset?{position:(ba(i,l,n==="wordLeft"?-1:1,f=>hs(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(p=>p.pageIndex===c);if(u.length===0)return {position:(n==="pageUp"?i[0]:i[i.length-1]).position,desiredX:d};let f=u[0],m=Number.POSITIVE_INFINITY;for(let p of u){let g=Math.abs(p.y-s.y)*1e3+Math.abs(p.x-d);g<m&&(m=g,f=p);}return {position:f.position,desiredX:d}}case "up":case "down":{let d=r??s.x,c=[],u=new Set;for(let y of i)u.has(y.lineId)||(u.add(y.lineId),c.push(y.lineId));let f=c.indexOf(s.lineId),m=n==="up"?f-1:f+1;if(m<0||m>=c.length)return {position:(n==="up"?i[0]:i[i.length-1]).position,desiredX:d};let p=i.filter(y=>y.lineId===c[m]),g=p[0];for(let y of p)Math.abs(y.x-d)<Math.abs(g.x-d)&&(g=y);return {position:g.position,desiredX:d}}default:return null}}function j6(e,t,n){return lN(e,t,n)}function H6(e,t,n){let r=ku(t,n);if(!r)return [];if(r.from.paragraphId===r.to.paragraphId&&r.from.offset===r.to.offset)return sN(e,r.from);let o=[];if(r.from.paragraphId===r.to.paragraphId){for(let{line:s}of At(e).get(r.from.paragraphId)??[]){let d=br(s,r.from.paragraphId);if(!d)continue;let c=No(e,d,r.from,r.to);if(c)for(let u of d.spans)u.range.end>c.start&&u.range.start<c.end&&o.push(u);}return o}let a=At(e),i=Ru(n,r.from.paragraphId),l=Ru(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=br(d,n[s]);if(!c)continue;let u=No(e,c,r.from,r.to,kv(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 sN(e,t){let n=null,r=null;for(let{line:o}of At(e).get(t.paragraphId)??[])for(let a of br(o,t.paragraphId)?.spans??[]){if(a.range.start<t.offset&&t.offset<=a.range.end)return [a];a.range.start===t.offset&&(a.range.end===a.range.start&&a.projected?r??=a:n??=a);}return n?[n]:r?[r]:[]}function QE(e,t,n,r){return Fv(e,t,n,true,r)}function eq(e,t,n,r){return Fv(e,t,n,false,r)}var vv=new WeakMap,Iv=new WeakMap;function dN(e){let t=vv.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let o of Tt(r))for(let a of o.lines)for(let i of St(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 vv.set(e,n),n}function Tv(e){let t=Iv.get(e);if(t)return t;let n=new Map(e.map((r,o)=>[r,o]));return Iv.set(e,n),n}function cN(e){return Math.max(3,Math.min(8,e*.25))}function Fv(e,t,n,r,o){if(t.anchor.paragraphId===t.head.paragraphId&&t.anchor.offset===t.head.offset)return [];let a=ku(t,n);if(!a)return [];let i=Tv(n),l=i.get(a.from.paragraphId),s=i.get(a.to.paragraphId),d=dN(e),c=[];for(let u of e.pages)for(let f of Tt(u))for(let m of f.lines){let p=za(m);for(let[g,y]of p.entries()){let x=No(e,y,a.from,a.to),b=i.get(y.paragraphId),h=d.get(y.paragraphId),v=l!==void 0&&s!==void 0&&b!==void 0&&b>=l&&b<s&&h?.end===y.end&&h.start===y.start&&g===p.length-1;if((!r||!x)&&!v)continue;let R=r&&x?Su(m,x.start,x.end,o,y):[];if(v){let P=cN(Math.max(0,m.box.height-m.leading-(m.trailingSpacing??0))),O=y.spans[0]?.style.shaping?.baseLevel,k=O===void 0?Ot(f.props):O%2===1,I=Wi(m,y.end,o,y);if(y.spans.some(T=>T.style.shaping!==void 0)){I=k?1/0:-1/0;for(let T of y.spans)I=k?Math.min(I,T.box.x):Math.max(I,T.box.x+T.box.width);}R.push({x:k?I-P:I,width:P});}for(let P of yg(R)){let O=rr({pageIndex:u.index,...P,y:m.box.y,height:m.box.height},f.clipToBox?f.box:void 0);O&&c.push(Up(e,y.paragraphId,O));}}}return c}function eN(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 Tt(a))for(let l of i.lines)for(let s of St(l))for(let d of t){let c=No(e,s,d.from,d.to);if(!c)continue;let u=o.get(d.key)??[];for(let f of Su(l,c.start,c.end,r,s)){let m=rr({pageIndex:a.index,...f,y:l.box.y,height:l.box.height},i.clipToBox?i.box:void 0);m&&(u.push(Up(e,s.paragraphId,m)),o.set(d.key,u));}}return o}function tq(e){return {x:e.contentBox.x,y:e.contentBox.y}}function Ss(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function nq(e,t,n){if(Eo(e).has(t))return {x:0,y:0};let r=e.pages[n];if(!r)return {x:0,y:0};let o=a=>dn(a).some(i=>i.paragraphId===t);if(r.header&&o(r.header.fragments))return Ss(r,r.header.box);if(r.footer&&o(r.footer.fragments))return Ss(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 Ss(r,i.box)}return {x:0,y:0}}function rq(e,t,n,r,o){let a=new Map,i=[];for(let d of t){let c=ku({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=Tv(n),s=(d,c,u,f)=>{for(let m of dn(d))for(let p of m.lines){for(let g of St(p))for(let y of i){let x=No(e,g,y.from,y.to,l);if(!x)continue;let b=a.get(y.key)??[];for(let h of Su(p,x.start,x.end,o,g)){let v=rr({pageIndex:c,...h,y:p.box.y,height:p.box.height},m.clipToBox?m.box:void 0);v&&(b.push({...v,x:v.x+u,y:v.y+f}),a.set(y.key,b));}}}};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=Ss(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=Ss(d,u.box);s(u.fragments,d.index,f.x,f.y);}}return a}export{oA as $,UT as $a,lC as $b,YV as $c,QU as $d,Zh as A,$n as Aa,dc as Ab,I$ as Ac,M0 as Ad,Tt as B,pf as Ba,to as Bb,Ap as Bc,s2 as Bd,dn as C,Vo as Ca,rp as Cb,oM as Cc,d2 as Cd,ey as D,RA as Da,BO as Db,zp as Dc,ds as Dd,Xv as E,gf as Ea,Jx as Eb,Wp as Ec,iu as Ed,Qv as F,Fy as Fa,mc as Fb,Vp as Fc,SL as Fd,eI as G,jl as Ga,DO as Gb,RP as Gc,y2 as Gd,Ha as H,wn as Ha,pi as Hb,sM as Hc,PL as Hd,jN as I,Al as Ia,ta as Ib,Ec as Ic,X0 as Id,rf as J,Ot as Ja,Ej as Jb,Tr as Jc,K0 as Jd,tI as K,Md as Ka,VO as Kb,tr as Kc,RL as Kd,ad as L,vD as La,hc as Lb,IM as Lc,wL as Ld,of as M,mb as Ma,$O as Mb,EP as Mc,Vm as Md,id as N,Ff as Na,ra as Nb,QW as Nc,IL as Nd,af as O,p1 as Oa,cp as Ob,Wl as Oc,Gm as Od,ld as P,m1 as Pa,hi as Pb,tm as Pc,Tw as Pd,St as Q,g1 as Qa,up as Qb,MM as Qc,_L as Qd,za as R,h1 as Ra,Dj as Rb,Ut as Rc,yw as Rd,ZN as S,_b as Sa,yi as Sb,CV as Sc,bX as Sd,Va as T,Pl as Ta,JO as Tb,MV as Tc,Mw as Td,JN as U,Wb as Ua,QO as Ub,_c as Uc,uu as Ud,Wa as V,y1 as Va,SS as Vb,rr as Vc,aE as Vd,nI as W,Vb as Wa,bc as Wb,mR as Wc,iE as Wd,tA as X,Gb as Xa,pp as Xb,Wc as Xc,Ww as Xd,je as Y,ei as Ya,Ln as Yb,KV as Yc,bo as Yd,nA as Z,$b as Za,aC as Zb,sm as Zc,KU as Zd,rA as _,Wd as _a,mp as _b,XV as _c,At as _d,pN as a,Ee as aa,Bf as ab,er as ac,dm as ad,XE as ae,jv as b,Vr as ba,wl as bb,Xj as bc,gR as bd,gs as be,Zu as c,cd as ca,Ub as cb,yp as cc,or as cd,hs as ce,Zs as d,yy as da,Lf as db,vS as dc,Xl as dd,Wi as de,Ch as e,cI as ea,$d as eb,bp as ec,UV as ed,QE as ee,Mh as f,aA as fa,QT as fb,oo as fc,yG as fd,eq as fe,Js as g,hd as ga,eF as gb,oH as gc,bG as gd,eN as ge,On as h,Gn as ha,vl as hb,jS as hc,xG as hd,tq as he,De as i,Do as ia,rF as ib,SH as ic,SG as id,Ss as ie,sn as j,il as ja,R1 as jb,Pp as jc,PG as jd,nq as je,tt as k,$a as ka,Tl as kb,Rc as kc,ym as kd,rq as ke,jh as l,_o as la,qb as lb,Ip as lc,ir as ld,rN as le,Hh as m,mI as ma,Kd as mb,CC as mc,e0 as md,E6 as me,wN as n,Ho as na,Zb as nb,US as nc,IB as nd,lN as ne,kN as o,zo as oa,Xd as ob,DH as oc,g0 as od,N6 as oe,zh as p,wy as pa,Qb as pb,mz as pc,gK as pd,A6 as pe,rd as q,$r as qa,cn as qb,gz as qc,wK as qd,D6 as qe,Ze as r,fA as ra,qo as rb,wi as rc,kK as rd,Sv as re,vN as s,pA as sa,w1 as sb,sP as sc,BK as sd,Pv as se,IN as t,Kr as ta,ex as tb,Tc as tc,AK as td,_6 as te,TN as u,Wo as ua,ni as ub,lb as uc,tw as ud,j6 as ue,FN as v,wI as va,tx as vb,iT as vc,F0 as vd,H6 as ve,ON as w,ky as wa,M1 as wb,cb as wc,O0 as wd,od as x,kI as xa,Vf as xb,Ja as xc,C0 as xd,Uh as y,vy as ya,fO as yb,fb as yc,D2 as yd,We as z,vI as za,bO as zb,EW as zc,nu as zd};