@docx-editor.dev/core 2.30.0 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +24 -0
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +18 -27
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +17 -16
  7. package/dist/binding.js +1 -1
  8. package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
  9. package/dist/{chrome-print-BM3Js-6X.d.ts → chrome-print-CznJ0ucN.d.ts} +361 -41
  10. package/dist/chunk-25EXMBV2.cjs +5 -0
  11. package/dist/chunk-2CWQY27B.cjs +1 -0
  12. package/dist/chunk-3IEXDEFH.cjs +7 -0
  13. package/dist/chunk-65XBN67F.cjs +2 -0
  14. package/dist/chunk-6NVZNB7O.cjs +3 -0
  15. package/dist/chunk-6UDJUI3W.cjs +2 -0
  16. package/dist/chunk-ACLR4DMK.js +1 -0
  17. package/dist/{chunk-RJCQGJR7.js → chunk-B2BEELUE.js} +1 -1
  18. package/dist/chunk-DDFHKQFU.js +30 -0
  19. package/dist/chunk-E4IAO4CY.cjs +2 -0
  20. package/dist/chunk-ETDZFNMI.js +2 -0
  21. package/dist/chunk-FDSL5OJU.cjs +30 -0
  22. package/dist/chunk-FS7CMYLT.js +4 -0
  23. package/dist/chunk-GDS24SZN.js +30 -0
  24. package/dist/chunk-GIY6NT2X.js +5 -0
  25. package/dist/chunk-GWM3AKUD.js +18 -0
  26. package/dist/chunk-HDOXACHP.js +2 -0
  27. package/dist/chunk-IILEENID.js +1 -0
  28. package/dist/chunk-L5TYBFDB.js +1 -0
  29. package/dist/chunk-MNF2K7NN.cjs +30 -0
  30. package/dist/chunk-O324RB6R.cjs +1 -0
  31. package/dist/chunk-OKMEMSKB.cjs +1 -0
  32. package/dist/chunk-QXJKYNYZ.js +1 -0
  33. package/dist/chunk-RALTVLB6.js +2 -0
  34. package/dist/chunk-SRVKFUFI.js +3 -0
  35. package/dist/chunk-TELQ52LG.cjs +1 -0
  36. package/dist/chunk-TJHE5EET.cjs +1 -0
  37. package/dist/chunk-UMMRURPE.js +7 -0
  38. package/dist/chunk-WN7ICTA5.js +1 -0
  39. package/dist/{chunk-FLBEJC6X.cjs → chunk-XJYZVGQR.cjs} +1 -1
  40. package/dist/chunk-ZGTIE3QJ.cjs +4 -0
  41. package/dist/chunk-ZOZI27AW.cjs +18 -0
  42. package/dist/collaboration/replication.cjs +1 -1
  43. package/dist/collaboration/replication.d.ts +20 -5
  44. package/dist/collaboration/replication.js +1 -1
  45. package/dist/collaboration.cjs +1 -1
  46. package/dist/collaboration.d.ts +5 -6
  47. package/dist/collaboration.js +1 -1
  48. package/dist/contracts/document.d.ts +3 -3
  49. package/dist/contracts/editor.d.ts +13 -10
  50. package/dist/contracts/interaction.d.ts +2 -2
  51. package/dist/contracts/modules.d.ts +15 -13
  52. package/dist/contracts/types.d.ts +135 -2
  53. package/dist/{custom-node-writes-0v0Kgw1T.d.ts → custom-node-writes-CLJKGD9t.d.ts} +7 -2
  54. package/dist/{diagnostic-context-CcAO4q1s.d.ts → diagnostic-context-BtDUY3v2.d.ts} +3 -2
  55. package/dist/{diagnostic-hints-2Bke6H_w.d.ts → diagnostic-hints-DK8-V0fk.d.ts} +2 -2
  56. package/dist/{document-protection-8eyMWIJ0.d.ts → document-protection-NaniLHWF.d.ts} +1 -1
  57. package/dist/{editor-DaEJd2so.d.ts → editor-DZwOTmlR.d.ts} +386 -279
  58. package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
  59. package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-B3L-1ALc.d.ts} +57 -4
  60. package/dist/editor.cjs +1 -1
  61. package/dist/editor.css +6 -4
  62. package/dist/editor.d.ts +646 -31
  63. package/dist/editor.js +1 -1
  64. package/dist/export.cjs +2 -2
  65. package/dist/export.d.ts +9 -16
  66. package/dist/export.js +2 -2
  67. package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
  68. package/dist/{font-resolver-CL9BVKZo.d.ts → font-resolver-BlQNGdvR.d.ts} +1 -1
  69. package/dist/{headless-document-view-DZQN8Bnx.d.ts → headless-document-view-Bcz9_Qva.d.ts} +115 -4
  70. package/dist/index.cjs +1 -1
  71. package/dist/index.d.ts +27 -26
  72. package/dist/index.js +1 -1
  73. package/dist/{layout-shaping-cEnVrhWg.d.ts → layout-shaping-E5J4Z1Gf.d.ts} +1 -1
  74. package/dist/layout.cjs +1 -1
  75. package/dist/layout.d.ts +95 -23
  76. package/dist/layout.js +1 -1
  77. package/dist/{note-properties-9FH8zAeG.d.ts → note-properties-Ds5R2_3F.d.ts} +1 -1
  78. package/dist/output.cjs +1 -1
  79. package/dist/output.d.ts +24 -10
  80. package/dist/output.js +1 -1
  81. package/dist/{protocol-CZ1uUlPO.d.ts → protocol-DKa4qt7F.d.ts} +167 -5
  82. package/dist/{review-paragraph-order-CqVelc5A.d.ts → review-paragraph-order-Dc17w_6v.d.ts} +1 -1
  83. package/dist/revision-projection-Cn6rZJ7H.d.ts +258 -0
  84. package/dist/{semantic-cell-selection-Dr9yxFZt.d.ts → semantic-cell-selection-BaUR0iJ4.d.ts} +2 -2
  85. package/dist/{semantic-interaction-Dc3pf3hr.d.ts → semantic-interaction-CJoHLoOl.d.ts} +1 -1
  86. package/dist/{semantic-paint-Bz3FBAoH.d.ts → semantic-paint-BPw_n0li.d.ts} +7 -4
  87. package/dist/{semantic-record-queries-Bx0pl6kL.d.ts → semantic-record-queries-C0rJ3sB4.d.ts} +1 -1
  88. package/dist/{semantic-records-CjcF26ZL.d.ts → semantic-records-BvN-WWst.d.ts} +365 -512
  89. package/dist/store.cjs +1 -1
  90. package/dist/store.d.ts +47 -22
  91. package/dist/store.js +1 -1
  92. package/dist/{types-barrel-CA0xB8kH.d.ts → tree-op-types-C_S2niXW.d.ts} +1239 -747
  93. package/dist/{tree-package-store-DKhdEVym.d.ts → tree-package-store-CRHvMyNj.d.ts} +676 -646
  94. package/dist/{tree-session-contract-CwnTEVLF.d.ts → tree-session-contract-D1awo_dA.d.ts} +26 -13
  95. package/dist/unsupported-elements-CVos5cqe.d.ts +23 -0
  96. package/docs/accept-reject-without-scrolling.md +95 -0
  97. package/docs/comment-on-found-text.md +72 -0
  98. package/docs/custom-review-cards.md +178 -0
  99. package/docs/highlight-ranges.md +48 -0
  100. package/docs/index.md +36 -0
  101. package/docs/propose-rewrite.md +247 -0
  102. package/docs/tracked-replacement.md +68 -0
  103. package/package.json +3 -2
  104. package/dist/chunk-2PV5L5NJ.js +0 -5
  105. package/dist/chunk-5OTS2EJ7.js +0 -7
  106. package/dist/chunk-5P4223J4.cjs +0 -27
  107. package/dist/chunk-5RRAZMBU.cjs +0 -1
  108. package/dist/chunk-5SPITS5F.js +0 -18
  109. package/dist/chunk-6JIJOZDW.js +0 -1
  110. package/dist/chunk-7ATNKARV.js +0 -2
  111. package/dist/chunk-BGCUTKWE.cjs +0 -5
  112. package/dist/chunk-BTQKU64Q.cjs +0 -1
  113. package/dist/chunk-EBCXSH2W.js +0 -3
  114. package/dist/chunk-ERECKTIR.cjs +0 -2
  115. package/dist/chunk-HYASLE2G.cjs +0 -1
  116. package/dist/chunk-JC47NRJC.cjs +0 -3
  117. package/dist/chunk-KJRTNY2Q.cjs +0 -2
  118. package/dist/chunk-NKPUH3QJ.js +0 -1
  119. package/dist/chunk-PF5NJWS3.js +0 -2
  120. package/dist/chunk-PWTRJSES.cjs +0 -18
  121. package/dist/chunk-QFKGI242.cjs +0 -30
  122. package/dist/chunk-RPPV4S6T.cjs +0 -4
  123. package/dist/chunk-T32MGBJS.js +0 -1
  124. package/dist/chunk-UM26GH5B.js +0 -30
  125. package/dist/chunk-VRCZBFLH.js +0 -27
  126. package/dist/chunk-WF7JZ755.cjs +0 -1
  127. package/dist/chunk-WK5X2MMA.cjs +0 -7
  128. package/dist/chunk-WPDD2Y32.js +0 -2
  129. package/dist/chunk-YBMWBXST.cjs +0 -2
  130. package/dist/chunk-YZGUBCHP.js +0 -1
  131. package/dist/chunk-ZOS2PM4A.js +0 -4
  132. package/dist/image-resources-Bipz8toD.d.ts +0 -211
  133. package/dist/omml-equation-DP2WpUbK.d.ts +0 -97
@@ -0,0 +1 @@
1
+ 'use strict';var chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs');var W=new Set(["document","hdr","ftr","footnotes","endnotes"]),$=24,J=512,U=chunkZOZI27AW_cjs.yb($);function V(r){let n=r.root;return n.namespaceUri===chunkZOZI27AW_cjs.pa&&W.has(n.localName)}function Y(r){let n=[],e=t=>{if(t.kind!=="textValue"){t.namespaceUri===chunkZOZI27AW_cjs.pa&&t.localName==="p"&&n.push(t);for(let a of t.children)e(a);}};return e(r.root),n}function H(r){let n=chunkZOZI27AW_cjs.Ib(r);let e=[],t=new Set;for(let a of Y(n)){let i=chunkZOZI27AW_cjs.Ab(a);if(!i||!chunkZOZI27AW_cjs.zb(i))continue;let o=i.toUpperCase();if(t.has(o))continue;t.add(o);let s=chunkZOZI27AW_cjs.Tk(n,a.id);s!==null&&e.push(Object.freeze({paragraphId:o,nodeId:a.id,text:s}));}return Object.freeze(e)}function q(r){let n=U.get(r.root);if(n)return n;let e=chunkZOZI27AW_cjs.Ib(r);let t=new Map,a=new Set,i=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===chunkZOZI27AW_cjs.pa&&o.localName==="p"){let s=chunkZOZI27AW_cjs.Ab(o);if(s&&chunkZOZI27AW_cjs.zb(s)){let c=s.toUpperCase();a.has(c)||(a.add(c),o.kind==="paragraph"&&t.set(c,o.id));}}for(let s of o.children)i(s);}};return i(e.root),U.set(r.root,t),t}function _(r,n){if(r.length!==n.length)return false;for(let e=0;e<r.length;e+=1)if(r[e].root!==n[e])return false;return true}function B(r){let n=new Map,e=null,t=(i,o,s)=>{for(n.delete(i),n.set(i,{partName:o.name,root:o.root,nodeId:s});n.size>J;){let c=n.keys().next();if(c.done)break;n.delete(c.value);}},a=(i,o)=>{let s=n.get(i);if(!s)return null;let c=o.find(d=>d.name===s.partName);if(!c)return null;if(c.root===s.root)return {part:c,nodeId:s.nodeId};let l=chunkZOZI27AW_cjs.Xa(c,s.nodeId);if(!l||l.kind!=="paragraph")return null;let p=chunkZOZI27AW_cjs.Ab(l);return !p||p.toUpperCase()!==i?null:(t(i,c,s.nodeId),{part:c,nodeId:s.nodeId})};return i=>{let o=r(),s=a(i,o);if(s)return s;if(e&&e.ids.has(i)&&_(o,e.roots))return null;for(let c of o){let l=q(c).get(i);if(l!==void 0)return t(i,c,l),{part:c,nodeId:l}}return (!e||!_(o,e.roots))&&(e={roots:o.map(c=>c.root),ids:new Set}),e.ids.size<J&&e.ids.add(i),null}}function L(r,n){return chunkZOZI27AW_cjs.Qa(r,n)}var F=Object.freeze({kind:"body"}),Q=1e6;function O(r,n){if(n<=0||n>=r.length)return false;let e=r.charCodeAt(n-1),t=r.charCodeAt(n);return e>=55296&&e<=56319&&t>=56320&&t<=57343}function K(r,n,e){if(n===e)return [];let t=0,a=Math.min(n.length,e.length);for(;t<a&&n.charCodeAt(t)===e.charCodeAt(t);)t+=1;for(;t>0&&(O(n,t)||O(e,t));)t-=1;let i=0;for(;i<n.length-t&&i<e.length-t&&n.charCodeAt(n.length-i-1)===e.charCodeAt(e.length-i-1);)i+=1;for(;i>0&&(O(n,n.length-i)||O(e,e.length-i));)i-=1;let o=n.length-t-i,s=e.slice(t,e.length-i),c=[];return o>0&&c.push({op:"deleteText",paragraphId:r,start:t,end:t+o}),s.length>0&&c.push({op:"insertText",paragraphId:r,offset:t,text:s}),Object.freeze(c)}function tt(r){let n=t=>!!t&&t.kind!=="textValue"&&t.namespaceUri===chunkZOZI27AW_cjs.pa&&t.localName==="t"&&t.attributes.every(a=>a.namespaceUri===chunkZOZI27AW_cjs.qa&&a.localName==="space")&&t.children.every(a=>a.kind==="textValue"),e=[];for(let t of r){let a=e.at(-1);if(!n(a)||!n(t)){e.push(t);continue}let i=a.children.map(o=>o.kind==="textValue"?o.value:"").join("")+t.children.map(o=>o.kind==="textValue"?o.value:"").join("");e[e.length-1]={...a,attributes:/^\s|\s$/.test(i)?[{kind:"xmlSpace",namespaceUri:chunkZOZI27AW_cjs.qa,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:a.children[0]?.id??`${a.id}/text`,kind:"textValue",value:i}]};}return e}function G(r){if(r.kind==="textValue")return r;let n=false,e=r.children.map(t=>{let a=G(t);return a!==t&&(n=true),a});if(r.namespaceUri===chunkZOZI27AW_cjs.pa&&r.localName==="r"){let t=tt(e);(t.length!==e.length||t.some((a,i)=>a!==e[i]))&&(e=[...t],n=true);}return n?{...r,children:e}:r}function et(r,n,e){let t=r.parts.get(n);if(!t)return r;let a=false,i=new Set;for(let o of e)(o.op==="insertText"||o.op==="deleteText")&&!o.revision&&i.add(o.paragraphId);for(let o of i){let s=chunkZOZI27AW_cjs.Xa(t,o);if(!s||s.kind==="textValue")continue;let c=G(s);if(c===s)continue;let l=chunkZOZI27AW_cjs.bb(t,o,c,{deferValidation:true});l.ok&&(t=l.part,a=true);}return a?chunkZOZI27AW_cjs.Ne(r,t):r}function rt(r,n){let e=n.documentId.trim();if(e.length===0||e.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let t=()=>H(r.bodyStore().part),a,i=()=>{let l=r.bodyStore().part,p=r.currentPackage();if(a?.pkg===p&&a.body===l)return a.parts;let d=[l];for(let g of p.parts.values())g===l||!V(g)||d.push(g);return a={pkg:p,body:l,parts:Object.freeze(d)},a.parts},o=B(i),s=(l,p)=>{if(l.length===0)return {ok:true,changed:false};let d=t(),g=new Set,P=[];for(let u of l){if(typeof u.text!="string"||u.text.length>Q)return {ok:false,reason:"collaboration-text-limit"};if(typeof u.paragraphId!="string"||u.paragraphId.length===0||u.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let m=u.paragraphId.toUpperCase();if(g.has(m))return {ok:false,reason:"duplicate-paragraph-id"};g.add(m);let N=d.filter(X=>X.paragraphId===m);if(N.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let M=N[0];P.push(...K(M.nodeId,M.text,u.text));}if(P.length===0)return {ok:true,changed:false};let x=r.transact(F,u=>{for(let m of P)u.apply(m);u.applyPackage(m=>et(m,m.mainDocumentPart,P));},{origin:p.origin,actorId:p.actorId,operationId:p.operationId,recordsHistory:false});return x.ok?{ok:true,changed:x.change!==null}:{ok:false,reason:x.detail??x.reason}},c={documentId:e,interactive:n.interactive===true,paragraphs:t,paragraphByNodeId(l){return t().find(p=>p.nodeId===l)??null},paragraphTextOf(l){for(let p of i()){let d=chunkZOZI27AW_cjs.Tk(p,l);if(d!==null)return d}return null},paragraphByStableId(l){let p=l.toUpperCase(),d=o(p);if(!d)return null;let g=chunkZOZI27AW_cjs.Tk(d.part,d.nodeId);return g===null?null:Object.freeze({paragraphId:p,nodeId:d.nodeId,text:g})},applyParagraphText(l,p,d){return s([{paragraphId:l,text:p}],d)},applyParagraphTexts:s,applyRemotePackage(l,p){let d=r.publishRemotePackage(l,p);return d.ok?{ok:true,changed:d.change!==null}:{ok:false,reason:d.detail??d.reason}},revision:()=>r.packageRevision,subscribe:l=>r.subscribe(l),observePrimitiveJournal:l=>L(r,l),hasPendingJournals:()=>chunkZOZI27AW_cjs.Oa(r),flushPendingJournals:()=>{chunkZOZI27AW_cjs.Pa(r);},save:()=>chunkZOZI27AW_cjs.Le(r.currentPackage()),binaryPart(l){let p=r.currentPackage();return p.partBytes.get(l)??p.partBytes.get(l.startsWith("/")?l.slice(1):`/${l}`)??null}};return Object.freeze(c)}function nt(r,n,e){if(n===e||r>n.length)return Math.min(r,e.length);let t=0;for(;t<n.length&&t<e.length&&n[t]===e[t];)t+=1;let a=0;for(;a<n.length-t&&a<e.length-t&&n[n.length-1-a]===e[e.length-1-a];)a+=1;if(r<=t)return Math.min(r,e.length);if(r>n.length-a)return Math.min(e.length,r+e.length-n.length);let i=at(n,e,t,a),o=i.offsets.get(r);return o===void 0&&(o=(i.table?st(i.table,r,n,e,t):null)??pt(r,n,e,t,a)??t,i.offsets.set(r,o)),o}var f=[],ot=16;function at(r,n,e,t){let a=f.findIndex(o=>o.before===r&&o.after===n);if(a>=0){let[o]=f.splice(a,1);return f.push(o),o}let i={before:r,after:n,table:lt(r,n,e,t),offsets:new Map};return f.length>=ot&&f.shift(),f.push(i),i}var it=1<<18;function lt(r,n,e,t){let a=r.length-t-e,i=n.length-t-e;if(a*i>it)return null;let o=i+1,s=new Uint32Array((a+1)*o);for(let c=a-1;c>=0;c-=1)for(let l=i-1;l>=0;l-=1)s[c*o+l]=r[e+c]===n[e+l]?s[(c+1)*o+l+1]+1:Math.max(s[(c+1)*o+l],s[c*o+l+1]);return {lengths:s,width:o,columns:i}}function st(r,n,e,t,a){let{lengths:i,width:o,columns:s}=r,c=n-a,l=0,p=0;for(;l<c;)p<s&&e[a+l]===t[a+p]?(l+=1,p+=1):p>=s||i[(l+1)*o+p]>=i[l*o+p+1]?l+=1:p+=1;return a+p}var ct=[32,16,8,4];function pt(r,n,e,t,a){let i=e.slice(t,e.length-a),o=s=>{let c=i.indexOf(s);return c>=0&&i.indexOf(s,c+1)<0?c:null};for(let s of ct){let c=n.slice(Math.max(t,r-s),r);if(c.length===s){let p=o(c);if(p!==null)return t+p+c.length}let l=n.slice(r,Math.min(n.length-a,r+s));if(l.length===s){let p=o(l);if(p!==null)return t+p}}return null}exports.a=et;exports.b=rt;exports.c=nt;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs');function I(o){let n=[],t=[],a=new Map;for(let r of o){if(r.kind!=="revision")continue;let s=chunkZOZI27AW_cjs.Ej(r);for(let e of s)n.push(e);let p=new Set(r.ranges.map(e=>e.start.paragraphId)),u=r.revisionKind==="format"&&r.formattingKind==="pPrChange";if(p.size>1&&!u)for(let e of p)t.push(e);for(let e of r.ranges){let g=a.get(e.start.paragraphId)??[];for(let l of s)g.push(l);a.set(e.start.paragraphId,g);}}let i=new Map;for(let[r,s]of a)i.set(r,[...new Set(s)].sort().join("\0"));return {sites:n,paragraphs:i,spanning:t}}function w(o){return o.flatMap(n=>n.kind==="revision"?n.ranges.map(t=>t.start.paragraphId):[])}var c=new WeakMap,h=1,m={};function f(o){let n=o??m,t=c.get(n);return t===void 0&&(t=h++,c.set(n,t)),t}function b(o,n){return `${f(o)}:${f(n)}`}exports.a=I;exports.b=w;exports.c=b;
@@ -0,0 +1 @@
1
+ import {E as E$1,tf,kf,ag,Ya,ab,ka,Te,Ze,mf,Xe,rc,uf,td,Hc,vc,bb,jd,nf,_f,jf,$a,Nb,sf as sf$1,Ha,ff,nb,Mb,vd,Fa,Ia,Ea,za as za$1,Oa,se,Cd,tb,Gc,wc,ub,xd as xd$1,ze,Ke,Me as Me$1,Ad as Ad$1,Le}from'./chunk-DDFHKQFU.js';import {a,c}from'./chunk-L5TYBFDB.js';import {za,Z as Z$1,_}from'./chunk-HDOXACHP.js';import {pe,gd,fd,wk,Ej,Xa,Ya as Ya$1,lk,sf,Kj,qh,nf as nf$1,nb as nb$1,Yj,_j,wg,eb,Ad,Od,da,zd,yd,Sd,Rd,vd as vd$1,xd,pa,Ga,kk,rg,vk,pi,rk,mk,Ea as Ea$1}from'./chunk-GWM3AKUD.js';var Tr=Object.freeze({}),Fr=Object.freeze([]);function Nr(e){let t=Object.keys(e);if(t.length===0)return Tr;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function jr(e){let t=new Map(wg(e.part())),n=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!n.has(i)){n.add(i);for(let[s,c]of wg(i))t.has(s)||t.set(s,c);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=qh(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of wg(a))t.has(i)||t.set(i,s);}}return t}function _r(e,t){let n=ze(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=Ke(r),a=Me$1(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function Br(e,t){let n=[];for(let r of t.values()){let o=_r(e,r);o&&n.push(o);}return n.length===0?Fr:Object.freeze(n)}function $t(e,t){return {documentMetadata:Nr(e.documentProperties()),destinations:Br(t,jr(e))}}function Fn(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function Gt(e={}){return Object.freeze({async decode(t,n,r){let o=pe(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},...e.convertPreserved?{convertPreserved:e.convertPreserved}:{}})}var Yt=new WeakMap;function Xt(e,t){let n=Yt.get(e);n||(n=Xe(e),Yt.set(e,n));let r=n.styleCascade(),o=new Set;if(t===e.part())for(let c of Cd(t,void 0,void 0,r,n.numberingIndex()))for(let l of tb(c)?.slice(0,-1)??[])o.add(l.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let l=c.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===pa&&d.localName==="pPr"),p=l?.kind!=="textValue"?l?.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===pa&&d.localName==="rPr"):void 0;return p!==void 0&&Ea$1(p,"vanish")},i=0,s=(c,l)=>{if(++i>Od||l>da||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(Ad$1(c,r,false)||a(c))&&rg(c).length>0)return true;for(let p of c.children){if(i>=Od)break;if(s(p,l+1))return true}return false};return s(t.root,0)}var qt=new WeakMap,Vr=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function Kr(e,t){let n=qt.get(e.root);if(n&&n.stylesPart===t)return n.codes;let r=eb(t),o=new Set,a=[{node:e.root,scope:Ad(),depth:0,mcSelected:false,framed:false}],i=0;for(;a.length;){let{node:c,scope:l,depth:p,mcSelected:d,framed:g}=a.pop();if(++i>Od||p>da){o.add("scan-limit");break}if(c.kind==="textValue")continue;if(i+a.length+c.children.length>Od){o.add("scan-limit");break}let h=zd(l,c),x=g||r(c),m=yd(c)?c:void 0;if(m){if(Sd(m,h).drawing)continue;let y=Rd(m,h);y.refused&&o.add("scan-limit"),y.branch&&a.push({node:y.branch,scope:h,depth:p+1,mcSelected:true,framed:x});continue}if(!d&&vd$1(c)&&!(x&&c.localName==="object")){let y=xd(c,e.name)?.textboxStory?.content;y&&a.push({node:y,scope:h,depth:p+1,mcSelected:d,framed:x});continue}if(c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox"){o.add("legacy-textbox");continue}c.namespaceUri==="urn:schemas-microsoft-com:vml"&&Vr.has(c.localName)&&!c.children.some(y=>y.kind!=="textValue"&&y.namespaceUri==="urn:schemas-microsoft-com:vml"&&y.localName==="textbox")&&o.add("legacy-drawing");for(let y of c.children)a.push({node:y,scope:h,depth:p+1,mcSelected:d,framed:x});}let s=Object.freeze([...o]);return qt.set(e.root,{stylesPart:t,codes:s}),s}function Qt(e){let t=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let r of [n.headers,n.footers])for(let o of r.values())t.add(o);for(let n of ["footnote","endnote"]){let r=qh(e.currentPackage(),n);r&&t.add(r);}return Object.freeze([...t].flatMap(n=>[...Kr(n,fd(e.currentPackage())),...Xt(e,n)?["unsupported-style-separator"]:[]].map(r=>Object.freeze({code:r,partName:n.name}))))}function Jt(e){return sf(e.fieldResults,()=>sf$1(zr(e)))}function zr(e){return tf(e.fieldResults,Hr(e))}function*Hr(e){let t=e.defaultTabStopPt?.(),n=e.view.part().name,r={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=kf(r),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,fieldResults:e.fieldResults,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,bodyBlockLimit:e.bodyBlockLimit},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,fieldResults:a.fieldResults,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(n,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(n,s),projectionEpoch:a.linkProjectors.epochForPart(n),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter,bodyBlockLimit:a.bodyBlockLimit};return yield*ag(a.view.part(),a.revision,i)}var Wr=65536;function tr(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function Ur(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function $r(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function Gr(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return Ea(e,r=>{if(n||!$r(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>za$1(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;Ia(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);Ur(s,t.textboxPath)&&(n=tr(e,i.storyOrigin));},r.origin,o);}),n}function Yr(e,t){if(t.story==="textbox")return Gr(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?Le(e,e.header.box):{x:0,y:0};case "footer":return e.footer?Le(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?Le(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,r=n?.separator?.box;return n?.continuationNotice&&Ia(n.continuationNotice,o=>{o.paragraphId===t.source.start.paragraphId&&(r=n.continuationNotice.box);}),r?Le(e,r):{x:0,y:0}}default:return {x:0,y:0}}}function rr(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function nr(e,t){let n=Ke(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function Xr(e,t){let n=ze(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=Yr(r,t),a=Object.freeze([rr({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>nr(r,i)))})}function qr(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return or(t)?Xr(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>rr(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>nr(o,i)))})}function or(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function er(e,t){return `${e}\0${t}`}function Qr(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function Jr(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=Wr)return false;a+=1;let l=er(s.pageIndex,c),p=r.get(l);return p?p.push(s):r.set(l,[s]),true};for(let[s,c]of t.entries())for(let[l,p]of c.occurrences.entries()){if(or(p)||p.source.start.paragraphId!==p.source.end.paragraphId)continue;o.add(p.pageIndex);let d=`${s}\0${l}`,g={paragraphId:p.source.start.paragraphId,offset:p.source.start.offset},h={paragraphId:p.source.end.paragraphId,offset:p.source.end.offset},x=g.offset<=h.offset?{from:g,to:h}:{from:h,to:g};i({key:d,from:x.from,to:x.to,pageIndex:p.pageIndex},x.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&Ea(s,c=>{let l=c.story==="header"||c.story==="footer"?p=>za$1(p,c.origin,{x:s.box.x,y:s.box.y}):void 0;Ia(c.host,(p,d)=>{let g=tr(s,d.storyOrigin);for(let h of p.lines)for(let x of Oa(h)){let m=r.get(er(s.index,x.paragraphId));if(m)for(let y of m){let b=Qr(x,y.from,y.to);if(!b)continue;let w=se(h,b.start,void 0,x),v=se(h,b.end,void 0,x,b.end>b.start),R=n.get(y.key)??[];R.push({pageIndex:s.index,x:Math.min(w,v)+g.x,y:h.box.y+g.y,width:Math.abs(v-w),height:h.box.height}),n.set(y.key,R);}}},c.origin,l);});return n}function ar(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=Jr(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let l=`${a}\0${c}`,p=qr(e,s,r.get(l)??[]);return p?{...s,geometry:p}:s});return {...o,occurrences:Object.freeze(i)}})}function Zr(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function ir(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=Zr(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:mk,locations:rk,commentAnchors:pi,deepOrder:t};return Object.freeze({collectReviewItems:r=>vk(r,n),deepParagraphOrderOfPart:t})}var sr=new WeakMap,me={};function Oe(e,t){let n=sr.get(e??me)??new WeakMap;sr.set(e??me,n);let r=n.get(t??me);if(!r){let o=td(e);r={table:o,numbering:Hc(vc(t),o)},n.set(t??me,r);}return r}var Ie=new Set(["pPrChange","rPr","sectPr"]),Re=new Set(["rPrChange","ins","del","moveFrom","moveTo"]),en=new Set(["ind","spacing","rFonts","lang"]),tn={ind:[["firstLine","hanging"]],rFonts:[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","cstheme"]]},rn={ind:{start:"left",end:"right"}},nn={ind:new Set(["startChars","endChars","leftChars","rightChars","firstLineChars","hangingChars"])},ke=new Set(["dstrike","noProof","webHidden","specVanish","rtl","cs","oMath","keepNext","keepLines","pageBreakBefore","suppressLineNumbers","suppressAutoHyphens","contextualSpacing","mirrorIndents","suppressOverlap","bidi"]);for(let e of E$1)ke.add(e);var dr=new Set(["0","false","off"]);function on(e,t,n,r){if(ke.has(e))return t==="val"&&dr.has(n);switch(e){case "jc":return n==="start"||!r&&n==="left";case "ind":return n==="0";case "u":case "highlight":return n==="none";case "vertAlign":return n==="baseline";case "color":return n==="auto";case "position":return n==="0";case "w":return n==="100";default:return false}}function an(e){let t=rn[e.localName],n=nn[e.localName],r={};for(let[o,a]of Object.entries(e.attributes??{})){if(n?.has(o))return null;let i=t?.[o]??o;i!==o&&e.attributes?.[i]!==void 0||(r[i]=a);}return ke.has(e.localName)&&r.val===void 0&&(r.val="true"),r}function sn(e,t,n){let r={...t};for(let o of tn[e]??[])if(o.some(a=>n[a]!==void 0))for(let a of o)delete r[a];return Object.assign(r,n)}function lr(e,t){let n=new Map;for(let i of e){if(t.has(i.localName))continue;let s=an(i);if(!s)return null;let c=n.get(i.localName);n.set(i.localName,c&&en.has(i.localName)?sn(i.localName,c,s):s);}let r=n.get("bidi"),o=r!==void 0&&!dr.has(r.val??"true"),a=[];for(let[i,s]of n){let c=Object.entries(s).filter(([l,p])=>!on(i,l,p,o)).sort(([l],[p])=>l.localeCompare(p));c.length===0&&Object.keys(s).length>0||a.push(`${i}(${c.map(([l,p])=>`${l}=${p}`).join(",")})`);}return a.sort().join(" ")}function fe(e,t){let n=[];for(let r of e?.children??[]){if(r.kind==="textValue")continue;let o=r.namespaceUri===pa;o&&t.has(r.localName)||o&&!r.children.some(a=>a.kind!=="textValue")||n.push(Ga(r));}return n.join("\0")}function ye(e,t){let n="";for(let r of e)r.localName===t&&(n=r.attributes?.val??"");return n}function ur(e,t){let n=vd(e.table,t).paragraphPropertyNodes,r=Gc(n);if(!r||r.numId==="0")return null;let o=wc(e.numbering,r.numId,r.ilvl);return (o&&ub(o.level))??void 0}function cr(e,t){let n=ur(e,t);if(n===void 0)return null;let r=vd(e.table,t,void 0,n??void 0);return lr(r.paragraphProperties,Ie)}function pr(e,t,n){let r=Nb(t);if(ye(nb(n),"pStyle")!==ye(nb(r),"pStyle")||fe(n,Ie)!==fe(r,Ie))return false;let o=cr(e,n);return o!==null&&o===cr(e,r)}function mr(e,t,n,r){let o=Mb(t),a=nb(n),i=nb(o);if(ye(a,"rStyle")!==ye(i,"rStyle")||fe(n,Re)!==fe(o,Re))return false;let s=ur(e,r);if(s===void 0)return false;let c=vd(e.table,r,void 0,s??void 0).runProperties,l=d=>lr(xd$1(c,d,e.table),Re),p=l(a);return p!==null&&p===l(i)}function yr(e){return {pkg:e,stylesRoot:fd(e)?.root??null,numberingRoot:gd(e)}}var cn=64,fr=new WeakMap;function Ee(e){return e.kind==="revision"&&e.revisionKind==="format"&&(e.formattingKind==="pPrChange"||e.formattingKind==="rPrChange")&&!e.readOnly&&e.ranges.length>0}function dn(e,t){let n=null,r=Ya$1(e,t);for(let o=0;r&&o<cn;o+=1){if(r.kind==="tableCell"||r.localName==="tc")return null;r.kind==="paragraph"&&(n??=r),r=Ya$1(e,r.id);}return r?null:n}function ln(e,t,n,r){let o=Xa(e,t);if(!o||o.kind==="textValue")return false;let a=Ya$1(e,t);if(!a)return false;let i=dn(e,a.id);if(!i||!r.has(i.id))return false;let s=Nb(i),c=fr.get(o);if(c&&c.context===n&&c.current===a&&c.paragraph===s)return c.inert;let l=o.localName==="pPrChange"?a===s&&pr(n,o,a):o.localName==="rPrChange"&&mr(n,o,a,s);return fr.set(o,{context:n,current:a,paragraph:s,inert:l}),l}function gr(e,t,n){if(!Ee(e))return false;let r=t.pkg.parts.get(e.ranges[0].partName),o=Ej(e),a=new Set(e.ranges.map(i=>i.start.paragraphId));return !!r&&o.length>0&&o.every(i=>ln(r,i,n,a))}function hr(e,t){if(!e.some(Ee))return e;let n=Oe(t.stylesRoot,t.numberingRoot),r=e.filter(o=>!gr(o,t,n));return r.length===e.length?e:wk(r)}function _o(e,t){if(!e.some(Ee))return [];let n=Oe(t.stylesRoot,t.numberingRoot);return e.filter(r=>gr(r,t,n))}function un(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(kk(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function vr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of nf$1(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(qh(e,"footnote")),o(qh(e,"endnote")),n}function pn(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return qh(e,"footnote")?.name??null;case "endnote":return qh(e,"endnote")?.name??null;case "note-separator":return qh(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function mn(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),l=n.get(r.partName);n.set(r.partName,{lower:Math.min(l?.lower??s,s),upper:Math.max(l?.upper??c,c)});}return n}function fn(e,t,n,r,o){let a=new Map(n.map(d=>[d.name,o(d)])),i=mn(r,a),s=new Map,c=new Map,l=(d,g,h,x,m,y,b)=>{let w=a.get(d)?.get(m),v=i.get(d);if(w===void 0||!v||w<v.lower||w>v.upper)return;let R=s.get(d)??new Map;s.set(d,R);let V=c.get(d)??new Map;c.set(d,V);let U=JSON.stringify([g.story,g.noteScopeId,g.noteAreaKind]),K=h==="textbox"?JSON.stringify([U,"textbox",x]):U,$=R.get(m)??[],j=`${m}\0${g.page.index}\0${K}`,C=V.get(j);C||(C={pageIndex:g.page.index,story:h,rootStory:g.story,textboxPath:x,noteScopeId:g.noteScopeId,noteAreaKind:g.noteAreaKind,laneKey:K,intervals:[],intervalKeys:new Set},V.set(j,C),$.push(C),R.set(m,$));let G=`${y}\0${b}`;C.intervalKeys?.has(G)||(C.intervalKeys?.add(G),C.intervals.push({start:y,end:b}));};Fa(e,d=>{let g=pn(t,d);!g||!i.has(g)||Ia(d.host,(h,x)=>{let m=x.textboxDepth>0?"textbox":d.story,y=x.textboxPath.map(w=>w.drawingNodeId),b=[];for(let w of h.lines){for(let v of w.spans)b.push(v.range);for(let v of w.drawings??[])b.push({paragraphId:v.paragraphId,start:v.start,end:v.start+1});}b.length===0&&b.push({paragraphId:h.range.paragraphId,start:h.range.start,end:h.range.end});for(let{paragraphId:w,start:v,end:R}of b)l(g,d,m,y,w,v,R);});}),Ha(e,d=>{let g=d.drawing.ownerPartName;d.drawing.accessibility.hidden||!i.has(g)||l(g,d.root,d.story,d.textboxPath.map(h=>h.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let g of d.values())for(let h of g){h.intervals.sort((m,y)=>m.start-y.start||m.end-y.end);let x=[];for(let m of h.intervals){let y=x.at(-1);y&&m.start<=y.end?y.end=Math.max(y.end,m.end):x.push({...m});}h.intervals.splice(0,h.intervals.length,...x),h.intervalKeys=void 0;}let p=new Map;for(let[d,g]of s){let h=a.get(d);if(!h)continue;let x=[];for(let[m,y]of g){let b=h.get(m);b!==void 0&&x.push({paragraphId:m,position:b,laneKeys:new Set(y.map(({laneKey:w})=>w))});}x.sort((m,y)=>m.position-y.position),p.set(d,x);}return {byPart:s,orderByPart:a,visibleByPart:p}}function xr(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function yn(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),l=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),p=new Set([...c].filter(d=>l.has(d)));return p.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(xr(r,i),xr(r,s+1)).filter(d=>[...d.laneKeys].some(g=>p.has(g))).map(d=>d.paragraphId)}function gn(e,t,n,r){return r?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,n)};return a.end>a.start?[a]:[]})}function hn(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function wr(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let c of yn(i,t)){let l=t.byPart.get(i.partName)?.get(c)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,g=c===i.start.paragraphId?i.start.offset:0,h=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,x=d?hn(l,g):new Set;for(let m of l){let y=gn(m,g,h,d);d&&y.length===0&&x.has(m)&&(y=[{start:g,end:g}]);for(let b of y){let w=`${m.pageIndex}\0${m.story}\0${m.noteScopeId??""}\0${m.noteAreaKind??""}\0${m.textboxPath.join("\0")}\0${i.partName}\0${c}\0${b.start}\0${b.end}\0${s??""}`;o.has(w)||(o.add(w),r.push({pageIndex:m.pageIndex,physicalPageNumber:m.pageIndex+1,story:m.story,rootStory:m.rootStory,textboxPath:m.textboxPath,noteScopeId:m.noteScopeId,noteAreaKind:m.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:b.start},end:{paragraphId:c,offset:b.end}}}));}}}}return r}function Sr(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function br(e,t,n=Sr){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[c,l]of s.entries())o.set(l,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function xn(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:br("comment",t),revision:br("change",n)}}function B(e,t,n){return e.get(n)??Sr(t,n)}function wn(e,t,n){return e.kind==="revision"?{kind:"tracked-change",id:B(n.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:nb$1(e.text),replacedText:nb$1(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:B(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(r=>B(n.comment,"comment",r)),occurrences:t?wr(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:B(n.comment,"comment",e.id),author:e.comment.author,initials:_j(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:Yj(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:B(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:B(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(r=>B(n.comment,"comment",r)),orphaned:e.orphaned,occurrences:t&&e.range?wr([e.range],t):[]}}function Rr(e){let t=e.parts.get(e.mainDocumentPart);if(!t)return null;let n=vr(e,t),r=[t,...n],o=e.parts.get(Z$1(e,t.name));if(!un(r,o))return null;let a$1=ir(),i=a$1.collectReviewItems({storyPart:t,furnitureParts:n,commentsPart:o,commentsExtendedPart:e.parts.get(_(e,t.name))}),s=hr(i,yr(e)),c$1=new Set(s.map(d=>d.id)),l=a(i.filter(d=>!c$1.has(d.id))),p={sites:new Set(l.sites),paragraphs:l.paragraphs,key:c(fd(e)?.root??null,gd(e))};return {parts:r,derivation:a$1,items:s,unlistedSites:p}}var Pr=new WeakMap,bn={sites:new Set,paragraphs:new Map,key:""};function Ir(e){let t=Pr.get(e);if(!t){let n=e.parts.get(e.mainDocumentPart);t=n!==void 0&&[n,...vr(e,n)].some(o=>lk(o).some(a=>a.propertyChange))&&Rr(e)?.unlistedSites||bn,Pr.set(e,t);}return t}function Or(e,t){let n=Rr(t);if(!n)return [];let{parts:r,derivation:o,items:a}=n;if(a.length===0)return [];let i=a.flatMap(l=>Kj(l)),s=i.length>0?fn(e,t,r,i,o.deepParagraphOrderOfPart):null,c=xn(a);return a.map(l=>wn(l,s,c)).filter(l=>l!==null)}var Pn=new Set(["part","validatedHandle"]);function kr(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Z(e,t,n,r,o){if(!(r!==void 0&&Pn.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)Z(a,t,n,void 0,o);Object.freeze(e);return}if(!kr(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");Z(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Er(e){if(!kr(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),Z(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),Z(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),Z(o.value,new Set,a,r);}return Object.freeze(e),e}var vn=Object.freeze([]),E=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function Sn(e){try{return e instanceof E}catch{return false}}function Rn(e){try{return e instanceof ff}catch{return false}}function In(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function On(e){if(Sn(e))return e;let t=Rn(e),n=In(e),r=n?`: ${n}`:"",o=new E(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function kn(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Mr(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var En=50,Me=64;function Mn(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Dn(e){let t=false;return Ha(e,({drawing:n})=>{Mn(n.resource)&&(t=true);}),t}function Dr(e){return !ArrayBuffer.isView(e)}function ba(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};if(t.revisionAuthorSlots!==void 0&&(!t.revisionAuthorSlots||typeof t.revisionAuthorSlots!="object"||Array.isArray(t.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let n=t.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(t.revisionAuthorSlots).map(([f,P])=>{if(!Number.isSafeInteger(P)||P<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [f,P]}))),r=t.revisionMarkup?Ya(t.revisionMarkup):void 0,o=r?{revisionMarkup:r,hiddenAuthors:new Set,cacheKey:JSON.stringify(r)}:void 0,a=Mr(t.displayMode??ab),i=Dr(e),s=Dr(e)?{ok:true,view:e}:za(e);if(!s.ok)return s;let c=s.view,l=t.reuseAcrossRevisions??i,p=kn(t.resourceTimeoutMs),d=t.measurer??ka(),g=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),h=Te({retainAcrossPasses:l}),x=0,m=new Set,y=()=>{x+=1;for(let f of m)f();m.clear();},b=Ze({session:c,decodePort:t.imageDecodePort??Gt(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:y}),w={view:c,measurer:d,paragraphCache:h,sessions:new Map,completed:new Map,inFlight:new Map,styles:Xe(c),fieldLinks:new Map,links:mf(c),drawingBundle:b,furniture:new Map},v=new AbortController,R=t.signal,V=false,U=()=>V?new E("aborted","Export resource settlement was aborted"):new E("disposed","Export session has been disposed"),K=()=>{V=true,$();};function $(){let f=w;if(f){w=null,R?.removeEventListener("abort",K),v.abort(R?.reason),f.drawingBundle.dispose(),f.paragraphCache.clear();for(let P of f.completed.values())rc(P.internal),uf(P.internal);for(let P of f.fieldLinks.values())P.registry.clear();f.fieldLinks.clear(),f.completed.clear(),f.inFlight.clear(),f.furniture.clear(),f.sessions.clear(),y();}}R?.addEventListener("abort",K,{once:true}),R?.aborted&&K();let j=()=>{if(!w)throw U();if(v.signal.aborted)throw new E("aborted","Export resource settlement was aborted")},C=(f,P,M,u)=>x!==f||w?.view.packageRevision()!==P||w?.view.currentPackage()!==M?Promise.resolve():(j(),new Promise((_,O)=>{let k=false,T,D=F=>{k||(k=true,T!==void 0&&clearTimeout(T),m.delete(Y),v.signal.removeEventListener("abort",X),F?O(F):_());},Y=()=>D(),X=()=>D(new E("aborted","Export resource settlement was aborted")),L=()=>{if(w?.view.packageRevision()!==P||w?.view.currentPackage()!==M){D();return}let F=u-Date.now();if(F<=0){D(new E("timedOut",`Image resources did not settle within ${p}ms`));return}T=setTimeout(L,Math.min(En,F));};if(m.add(Y),v.signal.addEventListener("abort",X,{once:true}),x!==f||w?.view.packageRevision()!==P||w?.view.currentPackage()!==M){D();return}L();})),G=async(f,P=0,M=Date.now()+p)=>{if(j(),Date.now()>=M)throw new E("timedOut",`Export layout did not stabilize within ${p}ms`);let u=w,_=M,O=u.view.packageRevision(),k=u.view.currentPackage(),T=u.completed.get(f);if(T&&T.revision===O&&T.pkg===k)return T.published;let D=()=>{if(u.view.packageRevision()===O&&u.view.currentPackage()===k)return null;if(P>=Me-1)throw new E("nonConvergent","Document revision did not stabilize during export layout");return G(f,P+1,_)},Y=f==="simple-markup"?bb(o):o,X=f==="all-markup"||f==="simple-markup"?jd(Y,Ir(k),f==="simple-markup"):Y,L=u.fieldLinks.get(f);if(!L||L.revision!==O||L.pkg!==k){let I=L?.registry??nf();I.clear(),L={revision:O,pkg:k,registry:I},u.fieldLinks.set(f,L),u.furniture.delete(f);}let F=L.registry,Le=u.sessions.get(f)??_f();u.sessions.set(f,Le);let ee=u.furniture.get(f);ee||(ee=jf({view:u.view,measurer:u.measurer,producer:g,cache:u.paragraphCache,styleCascade:u.styles.styleCascade,numberingIndex:u.styles.numberingIndex,defaultTabStopPt:u.styles.defaultTabStopPt,compatibilityMode:u.styles.compatibilityMode,displayMode:$a(f),revisionAuthorFilter:X,showFieldCodes:false,inlineDrawingLayoutForPart:I=>u.drawingBundle.contextForPart(I),drawingLayoutTokenForPart:I=>u.drawingBundle.cacheTokenForPart(I),drawingTokenForParagraphForPart:(I,ge)=>u.drawingBundle.drawingTokenForParagraph(ge,I),linkProjectors:u.links,projectFieldLink:I=>F.project(I)}),u.furniture.set(f,ee));for(let I=0;I<Me;I+=1){let ge=x;u.drawingBundle.sync(u.view);let Ae=D();if(Ae)return Ae;let N=Jt({view:u.view,revision:u.view.packageRevision(),measurer:u.measurer,cache:u.paragraphCache,session:Le,producer:g,styleCascade:u.styles.styleCascade,defaultTabStopPt:u.styles.defaultTabStopPt,numberingIndex:u.styles.numberingIndex,furniture:ee,compatibilityMode:u.styles.compatibilityMode,linkProjectors:u.links,projectFieldLink:S=>F.project(S),inlineDrawingLayout:u.drawingBundle.bodyContext,inlineDrawingLayoutForPart:S=>u.drawingBundle.contextForPart(S),drawingTokenForParagraph:S=>u.drawingBundle.drawingTokenForParagraph(S,u.view.part().name),drawingTokenForParagraphForPart:(S,te)=>u.drawingBundle.drawingTokenForParagraph(te,S),drawingLayoutEpoch:u.drawingBundle.cacheTokenForPart(u.view.part().name),drawingLayoutEpochForPart:S=>u.drawingBundle.cacheTokenForPart(S),displayMode:$a(f),revisionAuthorFilter:X,showFieldCodes:false,bodyBlockLimit:void 0,fieldResults:"atomic"});if(!Dn(N)){let S=D();if(S)return S;l||(rc(N),uf(N),u.paragraphCache.clear(),u.sessions.delete(f),u.furniture.delete(f));let te=Or(N,k),Lr=te.length===0?vn:Object.freeze(ar(N,te)),Ar=$t(u.view,N),Cr={...N,...Ar,reviewDisplayMode:f,...r?{revisionMarkup:r}:{},...n?{revisionAuthorSlots:n}:{},facingPages:[...k.parts.values()].some(Ne=>Ne.root.localName==="settings"&&Ne.root.children.some(re=>re.kind!=="textValue"&&(re.localName==="mirrorMargins"||re.localName==="evenAndOddHeaders")&&!re.attributes.some(je=>je.localName==="val"&&["0","false","off"].includes(je.value)))),contentWarnings:Qt(u.view),reviewArtifacts:Lr},Fe=Er(Cr);return u.completed.set(f,{revision:O,pkg:k,internal:N,published:Fe}),Fe}let Ce=ge;for(;u.drawingBundle.pendingResourceCount()>0;){await C(Ce,O,k,_),Ce=x,j();let S=D();if(S)return S}j();let Te=D();if(Te)return Te}throw new E("nonConvergent",`Image resources did not reach quiescence after ${Me} layout passes`)},De=f=>{let P;try{P=Mr(f);}catch(O){return Promise.reject(O)}if(!w)return Promise.reject(U());let M=w,u=M.inFlight.get(P);if(u)return u;let _=G(P).catch(O=>{throw On(O)}).finally(()=>M.inFlight.delete(P));return M.inFlight.set(P,_),_};return {ok:true,session:{layout:()=>De(a),layoutFor:De,validatedImageBytes(f){let P=w;return !P||f.resource.kind!=="ready"?null:P.drawingBundle.mintValidatedBytes(f.resource.validatedHandle,f.resource.contentId)?.slice()??null},dispose:$}}}export{zr as a,Fn as b,Gt as c,yr as d,hr as e,_o as f,E as g,ba as h};
@@ -0,0 +1,2 @@
1
+ import {O,Q as Q$1,P}from'./chunk-SRVKFUFI.js';import {h,a,b,e,c,f,ee as ee$1,ac,dc,fc,gc,ec,ed,bc,cc,vc,td,Ic,hf,gf,d,y,Ob,da,Qb,ud,sc,xd}from'./chunk-DDFHKQFU.js';import {b as b$1,a as a$1}from'./chunk-B2BEELUE.js';import {vb,Aa,pa,Ba,ad,f as f$1,a as a$2,N}from'./chunk-GWM3AKUD.js';var tt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function V(e){let t=new Map;for(let n of e)if(Array.isArray(n)){for(let o of n.slice(0,2048)){if(typeof o!="string"||!tt.test(o))continue;let r=o.toLowerCase();if(t.has(r)||t.set(r,o),t.size===2048)break}if(t.size===2048)break}return Object.freeze([...t.values()])}function _t(e){let t=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(t===void 0||Array.isArray(t)&&t.length===0)?void 0:e}var Ue=64,ie=Object.freeze({family:"Calibri",sizeHalfPoints:22}),Lt=ie;function G(e,...t){let n=[e,...t],o=[],r=new Set;for(let l of n)for(let c of l.sources??[]){let u=h(c.request);r.has(u)||(r.add(u),o.push(c));}let s=[],i=new Set;for(let l of n)for(let c of l.substitutions??[]){let u=h(c.from);r.has(u)||i.has(u)||(i.add(u),s.push(c));}let a$1=V(n.map(l=>l.supportedFamilies));return Object.freeze({...a$1.length?{supportedFamilies:a$1}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??a,sources:Object.freeze(o),...s.length>0?{substitutions:Object.freeze(s)}:{},defaultFont:e.defaultFont??ie,...e.language!==void 0?{language:e.language}:{}})}var nt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function W(e){let t=e?.defaultFont?.family;return t!==void 0&&nt.test(t)?t:ie.family}var ot="docx-editor.dev/font-resolver",Ve=Symbol.for("docx-editor.dev/font-resolver");function zt(e){let t={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,Ve,t),Object.defineProperty(e,ot,t);}catch(n){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:n})}return e}function jt(e){return typeof e=="function"&&e[Ve]===true}var le=class extends RangeError{constructor(n,o,r){super(`Font source ${n.family} (${o} bytes) exceeds the shaping byte ceiling (${r} bytes)`);this.request=n;}request},ce=class extends AggregateError{causes;constructor(t){let n=Object.freeze(t.slice(0,b*2));super(n,`Font origin rejected all ${n.length} face and substitution candidates`),this.causes=n;}},Q=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function rt(e,t,n){let o=new Map(e.map(r=>[Q(r),r]));for(let[r,s]of t)o.set(r,s);for(let r of n)o.has(Q(r.to))&&o.set(Q(r.from),r.from);return [...o.values()]}async function Ut(e,t,n={}){return Xe(e,t,n)}async function $t(e,t,n={}){return Xe(e,t,n)}async function Xe(e,t,n){let o=n.maxExecutionFontBytes??a;if(!Number.isSafeInteger(o)||o<=0||o>a)throw new RangeError("Font execution byte ceiling is outside the supported range");let r=e.map(st),s,i=[],a$1=[],l=new Map,c=new Set,u=0,d=[],g=new Set,p=[],A=t.resolvedFaces??[],S=t.defaultFamily;for(let m=0;m<e.length;m+=1){Ke(t.signal);let F=e[m],h$1=rt(A,l,d),R;try{let w=r[m],O;if(w){let f=await $e(w,t.signal);if(!f.ok)throw f.cause;O=f.value;}else if(typeof F=="function"){let f=await $e(Promise.resolve(F(lt(t,S,h$1,u))).then(b=>({ok:!0,value:b}),b=>({ok:!1,cause:b})),t.signal);if(!f.ok)throw f.cause;O=f.value;}else O=F;if(O==null)continue;if(typeof O=="function"){J(n,F,m,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}let k="failures"in O?O.failures:void 0,P=[];if(Array.isArray(k)){let f=Math.min(k.length,b);for(let b=0;b<f;b++)P.push(k[b]);k.length>f&&P.push(new Error("Additional font-origin failures were omitted"));}else k!==void 0&&P.push(k);let v;try{v=it(O,c,u,g,s?"maxFontBytes"in s&&s.maxFontBytes!==void 0?s.maxFontBytes:a:void 0,n.reserveOwnedBytes,n.instrumentation,o);}catch(f){for(let b of new Set(P))J(n,F,m,b);throw f}R=v;for(let f of new Set([...v.dropped,...P]))J(n,F,m,f);let T=v.fragment;T.supportedFamilies&&i.push(T.supportedFamilies),p.push(...P);let j=(T.sources??[]).map(f=>(h(f.request),[Q(f.request),f.request])),x=[...T.substitutions??[]];!s&&"defaultFont"in T&&(S=W(T)),s||(s=T);let E=new Set(v.sourceKeys);if(E.size>0){d=d.filter(f=>!E.has(h(f.from)));for(let f of E)g.delete(f);}a$1.push(...T.sources??[]);for(let f of v.sourceKeys)c.add(f);u+=v.ownedBytes;for(let[f,b]of j)l.set(f,b);for(let f of x)d.push(f),g.add(h(f.from));}catch(w){if(R?.releaseOwnedBytes?.(),t.signal?.aborted)throw t.signal.reason??w;if(w instanceof Z)throw w.cause;J(n,F,m,w);continue}}if(!s)return;let{epoch:C,...L}=G({...s,supportedFamilies:V(i),sources:a$1,substitutions:d});return p.length===0?L:{...L,failures:Object.freeze(p)}}var Z=class extends Error{constructor(n){super("Unable to reserve owned font bytes");this.cause=n;this.name="FontOwnershipReservationError";}cause},ee=class extends RangeError{};async function $e(e,t){if(!t)return e;Ke(t);let n,o=new Promise((s,i)=>{n=i;}),r=()=>n?.(t.reason);t.addEventListener("abort",r,{once:true});try{return await Promise.race([e,o])}finally{t.removeEventListener("abort",r);}}function st(e){if(e===null||typeof e!="object")return;let t;try{t=e.then;}catch(n){return Promise.resolve({ok:false,cause:n})}if(typeof t=="function")return Promise.resolve(e).then(n=>({ok:true,value:n}),n=>({ok:false,cause:n}))}function it(e$1,t,n,o,r,s,i,a$1=a){let l=e$1.sources??[],c$1=e$1.substitutions??[],u="maxFontBytes"in e$1?e$1.maxFontBytes:void 0,d="defaultFont"in e$1?e$1.defaultFont:void 0,g="epoch"in e$1?e$1.epoch:void 0,p="language"in e$1?e$1.language:void 0;if(!Array.isArray(l)||!Array.isArray(c$1))throw new TypeError("Font origin sources and substitutions must be arrays");let A=l.length,S=c$1.length;if(A>b)throw new RangeError(`Font source count must not exceed ${b}`);if(S>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let C=u??a;if(!Number.isSafeInteger(C)||C<=0||C>a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${a}`);let L=Math.min(r??C,a$1),m=0,F=[],h$1=new Set,R=[],w=[];for(let x=0;x<A;x+=1){let E=l[x];try{let f=ae(E.request),b$1=h(f);if(t.has(b$1)||h$1.has(b$1))continue;let D=E.availability,M=E.faceIndex,q=E.hash,re=E.id;if(D!==void 0&&D!=="available"&&D!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(M)||M<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof q!="string"||q.length===0)throw new TypeError("Font source hash must be a non-empty string");let K;if(D!=="forbidden"){if(typeof re!="string"||re.length===0)throw new TypeError("Font source id must be a non-empty string");K=E.bytes;let U=e(K);if(U>L)throw U<=(r??C)?new le(f,U,a$1):new RangeError(`Font source ${f.family} (${U} bytes) exceeds the effective base byte ceiling (${L} bytes)`);if(t.has(b$1)||h$1.has(b$1))continue;if(n+m+U>c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${c}`);m+=U;}else K=new Uint8Array(0);if(t.has(b$1)||h$1.has(b$1))continue;if(t.size+h$1.size>=b)throw new ee(`Font source count must not exceed ${b}`);h$1.add(b$1),F.push(b$1),R.push(Object.freeze({request:f,id:re,bytes:K,hash:q,faceIndex:M,...D?{availability:D}:{}}));}catch(f){if(f instanceof ee)throw f;w.push(f);}}let O=new Set,k=[];for(let x=0;x<S;x+=1){let E=c$1[x];try{let f=ae(E.from),b=ae(E.to);h(f),h(b);let D=E.lineMetrics,M=D?Object.freeze({heightEm:D.heightEm,baselineEm:D.baselineEm}):void 0;if(M&&(!Number.isFinite(M.heightEm)||!Number.isFinite(M.baselineEm)||M.heightEm<=0||M.heightEm>4||M.baselineEm<0||M.baselineEm>M.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let q=h(f);if(t.has(q)||h$1.has(q)||o.has(q)||O.has(q))continue;O.add(q),k.push(Object.freeze({from:f,to:b,...M?{lineMetrics:M}:{}}));}catch(f){w.push(f);}}if((A>0||S>0)&&R.length===0&&k.length===0&&w.length>0)throw w.length===1?w[0]:new ce(w);let P=o.size;for(let x of h$1)o.has(x)&&(P-=1);if(P+O.size>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let v;if(d!==void 0){let x=d.family,E=d.sizeHalfPoints;if(h({family:x,weight:400,style:"normal"}),!Number.isSafeInteger(E)||E<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");v=Object.freeze({family:x,sizeHalfPoints:E});}if(g!==void 0&&(!Number.isSafeInteger(g)||g<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(p!==void 0&&typeof p!="string")throw new TypeError("Font shaping language must be a string");let T;if(m>0&&s)try{T=s(m);}catch(x){throw new Z(x)}let j;try{j=R.map(x=>f(x,i));}catch(x){throw T?.(),x}return {fragment:Object.freeze({supportedFamilies:V([e$1.supportedFamilies]),sources:Object.freeze(j),substitutions:Object.freeze(k),...g!==void 0?{epoch:g}:{},...u!==void 0?{maxFontBytes:u}:{},...v?{defaultFont:v}:{},...p!==void 0?{language:p}:{}}),sourceKeys:Object.freeze(F),ownedBytes:m,dropped:Object.freeze(w),releaseOwnedBytes:T}}function at(e){return !Number.isSafeInteger(e)||e<=0?0:e>c?c:e}function lt(e,t,n,o){let{committedSourceBytes:r,...s}=e,i=at(o);return {...s,defaultFamily:t,...n.length>0?{resolvedFaces:n}:{},...i>0?{committedSourceBytes:i}:{}}}function ae(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Ke(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function J(e,t,n,o){let r;try{typeof t=="function"&&t.name.length>0&&(r=t.name);}catch{}try{o instanceof Error&&o.stack;}catch{}let s=Object.freeze({originIndex:n,...r!==void 0?{originName:r}:{},cause:o});if(e.onOriginFailure)try{let a=e.onOriginFailure(s);Promise.resolve(a).catch(l=>{console.warn("[fonts] font-origin diagnostic callback failed",l);});return}catch(a){console.warn("[fonts] font-origin diagnostic callback failed",a);}let i="";try{o instanceof Error&&o.message.length>0&&(i=`: ${o.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${i}`,o);}var ct=256,ut=Object.freeze([]);function te(e){let t=new WeakMap;return (n,o)=>{let r=new Set;for(let s of n){let i=[{node:s,context:o,next:0}],a=l=>{i.pop();let c=i.at(-1)?.found??r;for(let u of l)c.add(u);};for(;i.length;){let l=i[i.length-1],c=t.get(l.node);if(c?.key===l.context.key){a(c.families);continue}if(!l.children){let g=e(l.node,l.context);l.children=g.children,l.found=new Set(g.families);}let u=l.children[l.next++];if(u){i.push({...u,next:0});continue}let d=l.found.size===0?ut:[...l.found];d.length<=ct&&vb(l.node)?t.set(l.node,{key:l.context.key,families:d}):t.delete(l.node),a(d);}}return [...r]}}function ne(e,t){return e.children.flatMap(n=>n.kind==="textValue"?[]:[{node:n,context:t}])}var He=new WeakMap,ft=4096;function Ye(e,t){let n=`${e.baseKey}|${e.depth+1}|${JSON.stringify(t)}`,o=He.get(e);o||He.set(e,o=new Map);let r=o.get(n);if(r)return r;let s={...e,depth:e.depth+1,cellStyle:t,key:n};return o.size<ft&&o.set(n,s),s}function dt(e,t){let{styles:n,theme:o,supplementalFamilies:r,depth:s}=t;if(e.kind==="table"){let l=ee$1(e,468,s,n),c=[];for(let u of l?.rows??[])for(let d of u.cells){let g=Ye(t,d.styleFormatting);for(let p of d.blocks)c.push({node:p,context:g});}return {children:c.reverse()}}let i=new Set;if(e.kind==="paragraph"){let l=e.children.find(u=>u.kind==="paragraphProperties"),c=ud(n,l,t.cellStyle).runProperties;for(let u of sc(e,c,void 0,(d,g)=>xd(d,g,n),void 0,void 0,"all-markup",void 0,void 0,o)){if(!u.text||u.fontSlot!=="eastAsia"&&!r.has(u.style.fontFamily??""))continue;let d=b$1((u.fontSlot==="eastAsia"?u.style.fontFamilyEastAsia:u.style.fontFamily)??void 0);d&&i.add(d);}}let a=e.localName==="txbxContent"?{...t,cellStyle:void 0,key:`${t.baseKey}|${s}|undefined`}:t;return {families:[...i],children:ne(e,a).reverse()}}function mt(){let e=te(dt),t,n,o=(s,i)=>{if(!t||n!==s||t.theme!==i){let a=td(s,i);n=s,t={key:`${a.cacheToken}|0|undefined`,baseKey:a.cacheToken,styles:a,theme:i,depth:0,supplementalFamilies:new Set([...Object.values(i.majorSupplemental??{}),...Object.values(i.minorSupplemental??{})])};}return t};return Object.assign((s,i,a)=>e([...s].reverse(),o(i,a)),{warmTableRows(s,i,a,l,c){let u=o(l,c),d=ee$1(s,468,u.depth,u.styles)?.rows??[];for(let g of d.slice(i,a))for(let p of g.cells)e(p.blocks,Ye(u,p.styleFormatting));return d.length}})}function Qt(e,t,n){return mt()(e,t,n)}function ue(e,t){return e.attributes.find(n=>n.localName===t)?.value}var gt=te((e,t)=>{let n=[];if(e.namespaceUri===pa){if(e.localName==="fldSimple"){let o=ed(ue(e,"instr")??"")?.font;o&&n.push(o);}if(e.localName==="p")for(let o of yt(e))n.push(o);}return {families:n,children:ne(e,t)}});function fn(e){let t=new Map;for(let n of gt(e,{key:""})){let o=b$1(n);o!==null&&!t.has(o.toLowerCase())&&t.set(o.toLowerCase(),o);}return [...t.values()]}function yt(e){let t=[],n=ac(),o=[];for(let r=e.children.length-1;r>=0;r-=1){let s=e.children[r];s.kind!=="textValue"&&o.push({node:s,containerDepth:0});}for(;o.length>0;){let{node:r,containerDepth:s}=o.pop();if(s>=Aa||r.namespaceUri===pa&&r.localName==="p")continue;if(r.namespaceUri===pa&&r.localName==="fldChar"){let a=ue(r,"fldCharType");a==="begin"?dc(n):a==="separate"?(n.nesting===1&&Ge(n,t),fc(n)):a==="end"&&(n.nesting===1&&Ge(n,t),gc(n));continue}if(r.namespaceUri===pa&&(r.localName==="instrText"||r.localName==="delInstrText")){ec(n,pt(r),r.localName==="delInstrText");continue}if(r.namespaceUri===pa&&r.localName==="fldSimple"){let a=ed(ue(r,"instr")??"");a?.font&&t.push(a.font);}let i=Ba(r,s);for(let a=r.children.length-1;a>=0;a-=1){let l=r.children[a];l.kind!=="textValue"&&o.push({node:l,containerDepth:i});}}return bc(n),t}function Ge(e,t){let n=cc(e);if(n.overflow)return;let o=ed(n.instruction);o?.font&&t.push(o.font);}function pt(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let o=n.pop();if(o.kind==="textValue")t+=o.value;else for(let r=o.children.length-1;r>=0;r-=1)n.push(o.children[r]);}return t}var Ft=()=>true,ht=/[ᄀ-ᇿ⺀-鿿ꥠ-꥿가-퟿豈-﫿︰-﹏＀-￯]/u;function dn(e,t,n,o){if(!t)return [];let r=vc(t),s=td(n,o),i=new Map;for(let a of e)for(let l of bt(a)){let c=ad(l.children),u=d=>{if(d)for(let g of d.values()){let p=g.markerText===void 0||ht.test(g.markerText);for(let A of [g.markerStyle.fontFamily,p?g.markerStyle.fontFamilyEastAsia:null]){let S=b$1(A??void 0);if(S===null)continue;let C=S.toLowerCase();i.has(C)||i.set(C,S);}}};u(Ic(c,r,s,Ft));for(let d of c){let g=hf(d);for(let p of g.contents)u(gf(p,r,s));}}return [...i.values()].sort((a,l)=>a.localeCompare(l))}function bt(e){if(e.localName==="document"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName==="body")return [t];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let t=[];for(let n of e.children)n.kind!=="textValue"&&(n.localName==="footnote"||n.localName==="endnote")&&t.push(n);return t}return [e]}var xt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",Je=256,wt=31;function X(e,t){return e.kind!=="textValue"&&e.localName===t&&e.namespaceUri===pa}function oe(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===pa)?.value}function Qe(e){let t=(e.relationships.get(e.mainDocumentPart)??[]).find(s=>s.type===xt),n=t?N(t):void 0,r=((n?.mode==="Internal"&&n.target.ok?e.parts.get(n.target.partName):void 0)??e.parts.get("/word/fontTable.xml"))?.root;return r&&X(r,"fonts")?r:void 0}function We(e,t){let n=e.children.find(o=>X(o,t));return n&&n.kind!=="textValue"?oe(n,"val"):void 0}function Ze(e){let t=Qe(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!X(r,"font"))continue;if(++o>Je)break;let s=a$1(oe(r,"name"));if(!s)continue;let i=O(We(r,"family"),We(r,"pitch")),a=s.trim().toLowerCase();i&&!n.has(a)&&n.set(a,i);}return n}function et(e){let t=Qe(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!X(r,"font"))continue;if(++o>Je)break;let s=a$1(oe(r,"name"));if(!s)continue;let i=r.children.find(u=>X(u,"altName")),a=i&&i.kind!=="textValue"?oe(i,"val"):void 0,l=a!==void 0&&a.length<=wt?a$1(a):null,c=s.trim().toLowerCase();l&&!n.has(c)&&n.set(c,l);}return n}function vn(e,t,n){let o=new Set,r=new Map;for(let s of e.substitutions??[]){let i=s.from.family.trim().toLowerCase();r.has(i)||r.set(i,s.to.family.trim().toLowerCase());}for(let s of e.substitutions??[]){let i=s.from.family.trim().toLowerCase(),a=s.to.family.trim().toLowerCase(),l=[t.alternates.get(i),t.fallbacks.get(i)].some(c=>{let u=c?.trim().toLowerCase();return u!==void 0&&u!==i&&(u===a||r.get(u)===a)});a!==i&&l&&!(n.resolve(s.from)instanceof d)&&o.add(s.from.family.toLowerCase());}return o}function St(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===pa)?.value}var Et=new Set(["document","hdr","ftr","footnotes","endnotes","comments","styles","numbering","glossaryDocument"]),Ot=new Set(["t","delText","instrText","delInstrText"]),Ct=2e6;function Rt(e,t){let n=e.stylesRoot(),o=e.documentThemeFonts(),r=[...y(n),...n?Ob(n).run:[]],s=da(r,o),i=a$1(s.fontFamily??void 0)??t,a=a$1(Qb([{text:"\xE9",props:r,style:s,start:0,end:1}],o)[0]?.style.fontFamily??void 0)??i,l=a$1(s.fontFamilyEastAsia??void 0),c=a$1(s.complexLane?.fontFamily??void 0)??o.minorBidi??t,u=Ze(e.currentPackage()),d=m=>u.get(m.trim().toLowerCase())??P(m),g=(m,F)=>{let h=d(m);if(!h)return F;let R=d(F);return R===void 0||R===h?F:Q$1[h]},p=new Map,A=new Map,S=0;for(let m of e.currentPackage().parts.values()){if(m.root.namespaceUri!==pa||!Et.has(m.root.localName))continue;let F=[m.root];for(;F.length>0&&S<Ct;){S++;let h=F.pop();if(h.kind!=="textValue"){if(h.namespaceUri===pa){if(Ot.has(h.localName))continue;if(h.localName==="rFonts"){for(let[R,w]of [["ascii",i],["hAnsi",a],["eastAsia",l],["cs",c]]){let O=a$1(St(h,R));if(!O||!w)continue;let k=O.trim().toLowerCase(),P=p.get(k)??new Set,v=R==="ascii"||R==="hAnsi",T=v?g(O,w):w;if(P.add(T),p.set(k,P),v&&d(O)){let j=A.get(k)??new Set;j.add(T),A.set(k,j);}}continue}}for(let R of h.children)F.push(R);}}}for(let m of a$2)p.delete(m);let C=new Map,L=[];for(let[m,F]of p){let h=A.get(m);F.size===1?C.set(m,[...F][0]):h?.size===1?C.set(m,[...h][0]):L.push(m);}return {fallbacks:C,ambiguousFamilies:L,defaults:new Map([...p].map(([m,F])=>[m,[...F]]))}}function kt(e,t,n=[],o="Calibri"){let r=et(e.currentPackage()),s=Rt(e,o),i=t.flatMap(c=>{let u=r.get(c.trim().toLowerCase());return u?[u]:[]}),a=new Map,l=t.flatMap(c=>s.defaults.get(c.trim().toLowerCase())??[]).filter(c=>c.trim().toLowerCase()!==o.trim().toLowerCase());for(let c of [...t,...i,...n,...l]){let u=a$1(c);if(u&&!a.has(u.trim().toLowerCase())&&a.set(u.trim().toLowerCase(),u),a.size===Ue)break}return {families:[...a.values()],alternates:r,fallbacks:s.fallbacks,ambiguousFamilies:s.ambiguousFamilies}}function Mn(e,t,n){let o=W(n),r=kt(e,t,[],o);return {plan:r,request:{families:r.families,defaultFamily:o}}}function Nn(e,t,n=t.fallbacks){let o=new Map(e.sources.map(c=>[h(c.request),c.request])),r=[],s=new Set((e.substitutions??[]).map(c=>h(c.from))),i=new Map((e.substitutions??[]).map(c=>[h(c.from),c])),a=c=>{let u=o.get(h(c));if(u)return {to:u};let d=i.get(h(c)),g=d&&o.get(h(d.to));if(!(!d||!g))return d.lineMetrics?{to:g,lineMetrics:d.lineMetrics}:{to:g}},l=Math.max(0,b-s.size);for(let c of t.families){let u=c.trim().toLowerCase(),d=t.alternates.get(u),g=n.get(u);for(let p of [400,700])for(let A of ["normal","italic"]){let S={family:c,weight:p,style:A};if(o.has(h(S)))continue;let C=i.has(h(S));for(let L of [d,g]){if(!L||L.trim().toLowerCase()===u)continue;let m={family:L,weight:p,style:A},F=o.get(h(m)),h$1=C?F?{to:F}:void 0:a(m);if(h$1){if(!s.has(h(S))){if(l===0)break;l--;}r.push({from:S,...h$1});break}}}}return G({...e,substitutions:[...r,...e.substitutions??[]]})}function _n(e,t,n){let o=new Set((e.substitutions??[]).map(s=>h(s.from))),r=new Set;for(let s of t.substitutions??[]){if(o.has(h(s.from)))continue;let i=s.from.family.trim().toLowerCase(),a=s.to.family.trim().toLowerCase();[n.alternates.get(i),n.fallbacks.get(i)].some(c=>c?.trim().toLowerCase()===a)||r.add(i);}return r}function Ln(e,t){let n=new Map;for(let[o,r]of e)t(o)||n.set(o,r);return n}var Tt={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function Bn(e,t){let n=[],o=[],r=0;for(let s of e){let i=s.bytes.byteLength;if(!Number.isSafeInteger(i)||i>t||i>a||i>c-r){o.push(s);continue}r+=i,n.push(s);}return {sources:n,dropped:o}}function Dn(e,t,n){let o=t.reduce((s,i)=>s+i.bytes.byteLength,0),r=new Set(t.filter(s=>s.request.family.trim().length>0).map(s=>h(s.request)));return At(e,{maxFontBytes:n,aggregateBudget:Math.max(0,c-o),shadowedRequests:r})}function At(e,t){let n=[],o=[],r=t.aggregateBudget,s=new Set;for(let i of e){let a=Tt[i.style],l=Object.freeze({family:i.family,weight:a.weight,style:a.style});if(i.family.trim().length===0){o.push({request:l,partName:i.partName,reason:"malformed"});continue}let c=h(l);if(!(t.shadowedRequests?.has(c)||s.has(c))){if(s.add(c),i.bytes.byteLength>t.maxFontBytes||i.bytes.byteLength>r){o.push({request:l,partName:i.partName,reason:"overLimit"});continue}r-=i.bytes.byteLength,n.push({request:l,id:`embedded:${i.partName}#${i.style}`,bytes:i.bytes,hash:f$1(i.bytes),faceIndex:0});}}return {sources:n,dropped:o}}
2
+ export{_n as A,Ln as B,Bn as C,Dn as D,At as E,V as a,_t as b,Ue as c,ie as d,Lt as e,G as f,W as g,ot as h,Ve as i,zt as j,jt as k,le as l,ce as m,Ut as n,$t as o,te as p,ne as q,mt as r,Qt as s,fn as t,yt as u,dn as v,vn as w,kt as x,Mn as y,Nn as z};
@@ -0,0 +1,3 @@
1
+ import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {Be as Be$1,n,l,p,j as j$1,k,r,i,o,u,a,g,f as f$2,pa as pa$1,ta,Va,Fa as Fa$1,Ve,Ue,ia as ia$1,od,ka,qc,oc,kc,Dc,bd,ab,G as G$1,F,q as q$1,Md,Ld,Sa as Sa$1,Aa as Aa$1,Qe as Qe$1,Nd,t,b,e as e$1,c as c$1,m,Ia as Ia$1,Oa as Oa$1,Cd,Jc,dd,ad,ic,pc,Ba as Ba$1,h,ja,za}from'./chunk-DDFHKQFU.js';import {f as f$1,Il,dc,bc,gc,cc,Lj,qh,Ll,Kl,Jl,Rb,$b,c as c$2,b as b$1}from'./chunk-GWM3AKUD.js';var or=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let u=i*2n;(u>t||u===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let c=r?-a:a,s=Number(c);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Ze=(e,t,n$1,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n$1)||n$1<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");if(e===0||n$1===0)return n(0);let o=e*n$1;if(Number.isSafeInteger(o)){let a=Math.abs(o),i=a%t,c=(a-i)/t;return r!=="towardZero"&&(i>t-i||i===t-i&&(r==="halfAwayFromZero"||r==="halfToEven"&&c%2!==0))&&(c+=1),n(c===0?0:o<0?-c:c)}return n(or(BigInt(e)*BigInt(n$1),BigInt(t),r))},$t=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>Ze(i,a,o,r)},qt=(e,t,n)=>{let r=t*n,o=e*2;return a=>a*r/o};var ar=4096,Zt=e=>typeof e=="number"?String(e):JSON.stringify(e)??typeof e,Oe=class{constructor(t){this.onRestart=t;}onRestart;#e=new Map;keyOf(t$1,n){let r=t(n),o=this.#e.get(r);o===void 0&&(this.#e.size>=ar&&(this.#e.clear(),this.onRestart()),o=this.#e.size,this.#e.set(r,o));let a=`${o}\0${Zt(t$1.fontSizeHalfPoints)}\0${Zt(t$1.bidiLevel)}\0`,i=t$1.context;return !i||i.before===""&&i.after===""?`${a}-${t$1.text}`:`${a}c${i.before.length},${i.after.length}\0${i.before}${i.after}${t$1.text}`}clear(){this.#e.clear();}};var Q=Object.freeze({name:"HarfBuzz",version:"14.4.0"}),se=null,ae=null;function Qe(){return se?Promise.resolve():ae||(ae=import('./dist-PKZR6RSH.js').then(e=>{let t=e.versionString();if(t!==Q.version)throw new O("shapingLibraryMismatch",{diagnostic:f(Q.version,t)});se=e;}).catch(e$1=>{throw ae=null,e$1 instanceof O?e$1:c(e$1)?new O("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new O("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),ae)}function ir(){return se!==null}function sr(){if(!se)throw new O("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return se}var O=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},cr=16*1024*1024,lr=1e6,ur=1e6,dr=1e6,pr=4,fr=512,yr=1024*1024,mr=16*1024*1024,hr=32*1024*1024,gr=64*1024*1024,Sr=64*1024*1024,xr=1e6,br=1e6,Rr=1e6,Fr=64,Cr=4096,vr=4*1024*1024,Er=64*1024*1024,Lr=64*1024*1024,Or=256*1024*1024,Tr=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Jt=["cmap","head","hhea","hmtx","maxp"],Br=(e,t)=>e[t]<<8|e[t+1],Ir=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,Ar=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Ir(e,12+t*4):0,wr=(e,t)=>{let n=Ar(e,t),r=Br(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},Pr=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),_r=(e,t)=>{let n=l(e,t);if(!n.valid)return n;let r=wr(e,t);for(let o of Jt)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},et=_r,z=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},Mr=(e,t,n$1)=>{if(t.length===0)return [];let r=[],o=0;for(;o<t.length;){let a=t[o].cluster,i=o+1,c=t[o].advanceX;for(;i<t.length&&t[i].cluster===a;)c+=t[i].advanceX,i+=1;let s=n(c);r.push({textStart:a,textEnd:n$1==="rtl"?t[o-1]?.cluster??e.length:t[i]?.cluster??e.length,glyphStart:o,glyphEnd:i,advance:s,caretEdges:Object.freeze([n(0),s]),fontSpan:0}),o=i;}return r},G=64,K=8,X=8,Qt=32,tt=G+2*K,kr=G+K+X,Nr=G+K+2*X,zr=G+K+X,en=G+8*K,tn=G+8*X+K,Dr=G+6*X+K,Hr=G+3*X+2*K,Gr=G+3*X,ce=e=>G+e.length*Uint16Array.BYTES_PER_ELEMENT,nt=e=>zr+ce(e),ie=e=>Qt+e*K,Ur=(e,t)=>tt+ce(e)+kr+nt(t),Wr=e=>en+ce(e)+ie(e.length)+e.length*tn,Kr=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return en+ce(e.text)+ie(e.glyphs.length)+e.glyphs.length*tn+ie(e.clusters.length)+e.clusters.length*Dr+e.clusters.reduce((n,r)=>n+ie(r.caretEdges.length),0)+ie(e.fontSpans.length)+e.fontSpans.length*Hr+(e.exactAdvancesX===void 0?0:Qt+e.exactAdvancesX.length*X)+Gr+[...t].reduce((n,r)=>n+nt(r.path),0)},Xr=(e,t)=>tt+ce(e)+Nr+t,Je=class{#e;#p;#f;#y;#m;#R;#h;#l=0;#F;#g;#S;#c;#x;#u;#t;#o=new Map;#i=new Map;#s=new Map;#n=new Map;#C=new Oe(()=>{this.#n.clear(),this.#r=0,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0}));});#a=0;#r=0;#b=0;#d;constructor(t,n){p(this),this.#e=t,this.#p=z(n.maxFontBytes??cr,"maximum font bytes",Sr),this.#f=z(n.maxInputUtf16??lr,"maximum input UTF-16 code units",xr),this.#y=z(n.maxCodepoints??ur,"maximum input code points",br),this.#m=z(n.maxGlyphs??dr,"maximum shaped glyphs",Rr),this.#h=z(n.maxCachedFontBytes??64*1024*1024,"maximum cached font bytes",64*1024*1024),this.#R=z(n.maxCachedFaces??pr,"maximum cached faces",Fr),this.#F=z(n.maxCachedShapes??fr,"maximum cached shape results",Cr),this.#g=z(n.maxOutlineBytes??yr,"maximum outline bytes",vr),this.#S=z(n.maxCachedOutlineBytes??mr,"maximum cached outline bytes",Er),this.#c=z(n.maxShapedRunBytes??hr,"maximum shaped run bytes",Lr),this.#x=z(n.maxCachedShapeBytes??gr,"maximum cached shape bytes",Or),this.#u=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#d=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#l=0,this.#i.clear(),this.#s.clear(),this.#n.clear(),this.#C.clear(),this.#a=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#d=void 0;}#E(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#u?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=j$1(t);for(let l of Jt)if(!o.has(l))throw new O("malformedFont",{diagnostic:`missing required ${l} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(Pr(n)),i=new this.#e.Face(a,t.faceIndex),c=new this.#e.Font(i),s=c.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new O("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});c.setScale(i.upem,i.upem);let u={identity:t.identity,blob:a,face:i,font:c,unitsPerEm:i.upem,byteLength:n.byteLength};if(n.byteLength<=this.#h){for(;this.#o.size>=this.#R||this.#l+n.byteLength>this.#h;){let l=this.#o.keys().next().value;if(l===void 0)break;this.#l-=this.#o.get(l).byteLength,this.#o.delete(l),this.#u?.(Object.freeze({kind:"evicted",identity:l}));}this.#o.set(t.identity,u),this.#l+=n.byteLength;}return this.#u?.(Object.freeze({kind:"created",identity:t.identity})),u}#L(t,n){let r=this.#i.get(t.identity)?.get(n);if(r)return this.#s.delete(r),this.#s.set(r,void 0),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#a})),r.outline;this.#t?.onOutlinePathCall?.();let o=t.font.glyphToPath(n),a=nt(o);if(a>this.#g)throw new O("outlineOverLimit",{limit:this.#g,actual:a});let i=Object.freeze({path:o,unitsPerEm:t.unitsPerEm}),c=Ur(t.identity,o)+3*tt+2*X;if(c>this.#S)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#a})),i;for(;this.#a+c>this.#S;){let l=this.#s.keys().next().value;if(l===void 0)break;this.#s.delete(l);let d=this.#i.get(l.identity);d.delete(l.glyphId),d.size===0&&this.#i.delete(l.identity),this.#a-=l.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#a}));}let s=this.#i.get(t.identity);s||this.#i.set(t.identity,s=new Map);let u={outline:i,bytes:c,identity:t.identity,glyphId:n};return s.set(n,u),this.#s.set(u,void 0),this.#a+=c,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#a})),i}#v(t){if(t.length>this.#f)throw new O("textOverLimit",{limit:this.#f,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#y)throw new O("codepointsOverLimit",{limit:this.#y,actual:n})}}shape(t){if(!this.#d)throw new O("disposed");if(k(t.environment.font),t.environment.font.byteLength>this.#p)throw new O("fontOverLimit",{limit:this.#p,actual:t.environment.font.byteLength});this.#v(t.text);let n$1=Wr(t.text);if(n$1>this.#c)throw new O("shapedRunOverLimit",{limit:this.#c,actual:n$1});let r$1=r(t.environment),o$1=this.#C.keyOf(t,r$1),a=this.#n.get(o$1);if(a)return this.#b-a.stamp>=Math.max(1,this.#n.size>>1)&&(this.#n.delete(o$1),this.#n.set(o$1,a),a.stamp=++this.#b),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r$1.shapingLibrary.name!==Q.name||r$1.shapingLibrary.version!==Q.version)throw new O("shapingLibraryMismatch");if(r$1.normalization!=="none")throw new O("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r$1.direction==="rtl"))throw new O("invalidBidiLevel");if(Object.keys(r$1.variationAxes).length>0)throw new O("unsupportedVariationAxes");if(r$1.fallbackOrder.length>0)throw new O("unsupportedFallback");let i$1=i(r$1.font),c=j$1(r$1.font);if([...Tr].some(m=>c.has(m))&&!c.has("glyf")&&!c.has("CFF "))throw new O("unsupportedColorFont");let s=t.text;this.#v(s);let u$1=t.context?.before??"",l=t.context?.after??"",d=o,g=Math.max(String(u$1).length,String(l).length);if(typeof u$1!="string"||typeof l!="string"||g>d)throw new O("textOverLimit",{limit:d,actual:g});try{let m=this.#E(r$1.font,i$1),{face:S,font:b}=m,f=this.#d;f.reset(),u$1||l?f.addText(u$1+s+l,u$1.length,s.length):f.addText(s),f.setDirection(r$1.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),f.setScript(r$1.script),f.setLanguage(r$1.language),f.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let h=Object.entries(r$1.features).map(([A,k])=>new this.#e.Feature(A,k));this.#t?.onShapeCall?.(),this.#e.shape(b,f,h);let x=f.getLength();if(x>this.#m)throw new O("glyphOverLimit",{limit:this.#m,actual:x});let R=f.getGlyphInfos(),F=f.getGlyphPositions(),v=$t(S.upem,t.fontSizeHalfPoints,r$1.fixedPointScale,r$1.roundingMode),I=qt(S.upem,t.fontSizeHalfPoints,r$1.fixedPointScale),T=[],y=n(0),p=n(0),C=new Map,E=R.map((A,k)=>{let W=F[k];T.push(I(W?.xAdvance??0));let ht=v(W?.xAdvance??0),gt=v(W?.yAdvance??0),rr={id:A.codepoint,cluster:A.cluster-u$1.length,originX:y,originY:p,advanceX:ht,advanceY:gt,offsetX:v(W?.xOffset??0),offsetY:v(W?.yOffset??0),outline:C.get(A.codepoint)??(()=>{let St=this.#L(m,A.codepoint);return C.set(A.codepoint,St),St})()};return y=n(y+ht),p=n(p+gt),rr}),L=b.hExtents(),B=u({text:s,direction:r$1.direction,bidiLevel:t.bidiLevel,glyphs:E,exactAdvancesX:T,clusters:Mr(s,E,r$1.direction),fontSpans:E.length===0?[]:[{glyphStart:0,glyphEnd:E.length,font:r$1.font,fallbackIndex:null}],metrics:{ascent:v(L.ascender),descent:v(-L.descender),lineGap:v(L.lineGap)}},r$1),M=Kr(B);if(M>this.#c)throw new O("shapedRunOverLimit",{limit:this.#c,actual:M});let w=Xr(o$1,M);if(w>this.#x)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),B;for(;this.#n.size>=this.#F||this.#r+w>this.#x;){let A=this.#n.keys().next().value;if(A===void 0)break;let k=this.#n.get(A);this.#n.delete(A),this.#r-=k.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o$1,{run:B,bytes:w,stamp:++this.#b}),this.#r+=w,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),B}catch(m){throw m instanceof O?m:new O("malformedFont",{diagnostic:m instanceof Error?m.message:"HarfBuzz shaping failed"})}}},rt=(e={})=>new Je(sr(),e);var ot=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:32,maxCachedFontBytes:64*1024*1024,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024}),Ka=Object.freeze({...ot,maxCachedShapes:4096});function nn(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${f$1(new TextEncoder().encode(JSON.stringify(n)))}`}function rn(e,t=ot){let n=e?.maxFontBytes??t.maxFontBytes;if(!Number.isSafeInteger(n)||n<=0||n>a)throw new RangeError(`Font shaping byte ceiling must be between 1 and ${a}`);return n===t.maxFontBytes?t:Object.freeze({...t,maxFontBytes:n})}function on(e,t,n=false){let r=false,o=Object.freeze({shape(a){if(r)throw new O("disposed");let i=a.environment.font;if(k(i),i.byteLength>t.maxFontBytes)throw new O("fontOverLimit",{limit:t.maxFontBytes,actual:i.byteLength});return e.shape(a)},dispose(){r||(r=true,n&&e.dispose?.());}});return q$1(e)?p(o):o}var jr=Object.freeze({}),an=b,Vr="16.0.0",Yr="none",$r=1e3,qr="halfToEven",ln="cluster-edges-only",Zr="Latn",Jr=new Uint8Array(0);var j=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function Qr(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a$1=e.substitutions,i=e.defaultFont,c=e.language;if(!Number.isSafeInteger(r)||r<=0||r>a)throw new j(`Font byte ceiling must not exceed the engine hard maximum of ${a}`);let s=o.length,u=a$1?.length??0;if(s===0||s>b)throw new j(`Font source count must be between 1 and ${b}`);if(u>an)throw new j(`Font substitution count must not exceed ${an}`);let l=0,d=[];for(let S=0;S<s;S+=1){let b=o[S],f=b.request,h=b.availability,x=b.id,R=b.hash,F=b.faceIndex,v=h==="forbidden",I=v?Jr:b.bytes;if(!v){if(typeof x!="string"||x.length===0)throw new TypeError("Resolved font id must not be empty");let T;try{T=e$1(I);}catch{throw new j(`Font source ${x} must provide genuine bytes`)}if(T>r)throw new j(`Font source ${x} exceeds the per-font byte ceiling`);if(l+=T,l>c$1)throw new j(`Font sources exceed the aggregate byte ceiling of ${c$1}`)}d.push(t&&g(b)!==void 0?b:Object.freeze({request:Object.freeze({family:f.family,weight:f.weight,style:f.style}),id:x,bytes:I,hash:R,faceIndex:F,...h?{availability:h}:{}}));}let g$1;if(a$1){g$1=[];for(let S=0;S<u;S+=1){let b=a$1[S],f=b.from,h=b.to,x=b.lineMetrics;g$1.push(Object.freeze({from:Object.freeze({family:f.family,weight:f.weight,style:f.style}),to:Object.freeze({family:h.family,weight:h.weight,style:h.style}),...x?{lineMetrics:Object.freeze({heightEm:x.heightEm,baselineEm:x.baselineEm})}:{}}));}}let m={epoch:n,maxFontBytes:r,sources:Object.freeze(d),substitutions:g$1?Object.freeze(g$1):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:c};return Object.freeze(m)}function sn(e,t){let n=e.map((o,a)=>({value:o,index:a,key:h(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function eo(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function cn(e,t){let n=s=>({family:s.family,weight:s.weight,style:s.style}),r=t?e.sources:sn(e.sources,s=>s.request),o=e.substitutions??[],a=t?o:sn(o,s=>s.from),i={sources:r.map(s=>{let u=s.availability??"available",l={request:n(s.request),availability:u};if(u==="forbidden")return {...l,...t?{id:s.id,faceIndex:s.faceIndex,declaredHash:s.hash}:{}};let d=g(s);if(d==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...l,...t?{id:s.id}:{},faceIndex:s.faceIndex,declaredHash:s.hash,actualHash:d,byteLength:s.bytes.byteLength}}),substitutions:a.map(s=>({from:n(s.from),to:n(s.to),lineMetrics:s.lineMetrics?{heightEm:s.lineMetrics.heightEm,baselineEm:s.lineMetrics.baselineEm}:null})),defaultFont:eo(e.defaultFont,t),language:e.language||"en"},c={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?c:{},...i}}var to=Symbol("prepared-layout-font-configuration"),Te=new WeakMap;function no(e){return Te.has(e)}function ro(e){let t=Te.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function ni(e){let t=Te.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function at(e,t){return un(e,t,false)}function ri(e,t){return un(e,t,true)}function un(e,t,n){let r=Qr(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(d=>n&&g(d)!==void 0?d:f$2(d,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a=new TextEncoder,i=cn(o,true),c=a.encode(JSON.stringify(i)),s=cn(o,false),u=a.encode(JSON.stringify(s)),l=Object.freeze({[to]:true,fingerprint:`font-config:${f$1(c)}`});return Te.set(l,{configuration:o,sharedShapingFingerprint:`shared-font-config:${f$1(u)}`}),l}function oo(e){return at(e).fingerprint}function ao(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:nn(t),ligatureCaretPolicy:ln,fallback:ja}));return `shaping:${f$1(n)}`}async function dn(e,t,n,r,o=false){let i=no(e)?e:at(e,t),c=ro(i),{epoch:s,maxFontBytes:u,sources:l,substitutions:d,defaultFont:g}=c,m$1=c.language||"en",S=i.fingerprint,b=m({epoch:s,maxFontBytes:u,resources:l,substitutions:d,validateFont:et,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await Qe();let f=Object.freeze({script:Zr,variationAxes:Object.freeze({}),shapingLibrary:Q,unicodeDataVersion:Vr,normalization:Yr,language:m$1,features:jr,...o?{documentLigatures:true}:{},fixedPointScale:$r,roundingMode:qr});return Object.freeze({fonts:b,shaper:on(n??rt(r),r,n===void 0),defaultFont:g,environment:f,ligatureCaretPolicy:ln,operation:Object.freeze({resourceEpoch:b.epoch,configEpoch:s,extensionFingerprint:S,shapingHash:ao(f,r),producerVersion:1})})}async function io(e,t,n){return dn(e,t,void 0,rn(n))}async function oi(e,t,n,r,o=false){return dn(e,r,t,n,o)}function so(e){e.shaper.dispose?.();}function it(e){let t=new Set([0,e.text.length]);for(let r of pa$1(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function Be(e,t){return it(e).includes(t)}function co(e,t){return Be(e,t)}function lo(e,t,n){return n>=t&&Be(e,t)&&Be(e,n)}function uo(e){let t=pa$1(e.text);return it(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var ct="und";function mn(){return typeof Intl.Segmenter=="function"}function po(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${ct})`);return e}function hn(){let e=new(po())(ct,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var fo=/^[\p{L}\p{N}']$/u,yo=/^\s$/u;function pn(e){return fo.test(e)}function fn(e){return yo.test(e)}function st(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function gn(e){let t=pa$1(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(fn(o.text)){let a=r+1;for(;a<t.length&&fn(t[a].text);)a+=1;n.push(st(t,r,a,false)),r=a;continue}if(pn(o.text)){let a=r+1;for(;a<t.length&&pn(t[a].text);)a+=1;n.push(st(t,r,a,true)),r=a;continue}n.push(st(t,r,r+1,false)),r+=1;}return n}function Sn(){return {segment:gn}}function xn(e={}){let t=e.isIntlAvailable??mn,n=e.createIntlBoundary??hn,r=e.createFallbackBoundary??Sn;if(!t())return r();try{return n()}catch{return r()}}var yn;function bn(){return yn??=xn(),yn}function mo(e,t=bn()){return t.segment(e)}function ho(e,t){return t.map(n=>({graphemeFrom:ta(e,n.utf16From),graphemeTo:ta(e,n.utf16To),wordLike:n.wordLike}))}var Rn={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},dt=Object.keys(Rn),Fn=dt.filter(e=>Rn[e]==="coarse-gate"),Ie=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},ee=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},go={resourceEpoch:Ie,configEpoch:Ie,extensionFingerprint:ee,shapingHash:ee,producerVersion:Ie},So=(e,t)=>{go[t](e[t],t);},te=e=>{for(let t of dt)So(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},xo=(e,t)=>{let n=te(e),r=te(t),o=dt.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},lt=e=>{let t=e.map(({key:n,fingerprint:r})=>(ee(n,"resource dependency key"),ee(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},bo=e=>(Ie(e.revision,"revision"),ee(e.dependencyFingerprint,"dependencyFingerprint"),ee(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:lt(e.resourceDependencies),...te(e)})),Ro=(e,t)=>{let n=lt(e),r=lt(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],c=r[a];if(i?.key!==c?.key||i?.fingerprint!==c?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??c.key}}return null};function Fo(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=Ro(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of Fn)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var ut=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=Fo(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:bo(r)});}evictEpoch(t){let n=te(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;Fn.some(c=>i[c]!==n[c])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=te(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>n.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function Cn(e){return e.projected===true?null:e.range}function vo(e,t,n){let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:c}=e,s=o==="header"||o==="footer"?u=>za(u,e.origin,{x:r.box.x,y:r.box.y}):void 0;Ia$1(a,(u,l)=>{let{textboxDepth:d,textboxOwner:g,textboxPath:m,storyOrigin:S}=l,b=d===0?o:"textbox";for(let f of u.lines){let h=[...Oa$1(f)].sort((x,R)=>(t.get(x.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(R.paragraphId)??Number.MAX_SAFE_INTEGER));for(let x of h)for(let R of x.spans)n({page:r,story:b,rootStory:o,root:e,storyOrigin:S,absoluteBox:Object.freeze({x:S.x+R.box.x,y:S.y+R.box.y,width:R.box.width,height:R.box.height}),noteScopeId:i,noteAreaKind:c,textboxDepth:d,textboxOwner:g,textboxPath:m,paragraph:u,paragraphId:x.paragraphId,line:f,span:R,sourceRange:Cn(R)});}},e.origin,s);}function Eo(e,t){let n=new Map(Va(e).map((r,o)=>[r,o]));Fa$1(e,r=>vo(r,n,t));}var Oo=1,vn=4,Y=Object.freeze({top:0,right:0,bottom:0,left:0}),En=new WeakMap;function To(e,t){let n=Bo(e);return n===Y?t:Ve(t,n)}function Bo(e){let t=e.vectorShape;if(!t)return Y;let{cx:n,cy:r}=t.extentEmu;if(!(n>=0)||!(r>=0)||n===0&&r===0)return Y;let o=En.get(t);if(o||(o=Io(t),En.set(t,o)),o===Y)return Y;let a=e.paintBounds,i=e.geometry.contentBounds;if(!(a.width>0||i.width<=0)||!(a.height>0||i.height<=0))return Y;let c=n>0?i.width/n:i.height/r,s=r>0?i.height/r:i.width/n,u=(d,g,m)=>{if(m<-1e-3)return 0;let S=d*g-Math.max(0,m);return Number.isFinite(S)&&S>0?S:0},l={left:u(o.left,c,i.x-a.x),top:u(o.top,s,i.y-a.y),right:u(o.right,c,a.x+a.width-(i.x+i.width)),bottom:u(o.bottom,s,a.y+a.height-(i.y+i.height))};return l.left||l.top||l.right||l.bottom?Object.freeze(l):Y}function Io(e){let{cx:t,cy:n}=e.extentEmu,r=0,o=0,a=t,i=n,c=(l,d)=>{r=Math.min(r,l),a=Math.max(a,l),o=Math.min(o,d),i=Math.max(i,d);},s=Oo,u=l=>l.x>=-s&&l.x<=t+s&&l.y>=-s&&l.y<=n+s;for(let l of e.components){if(l.strokeHex===null||l.strokeInset===true)continue;let d=Math.max(1,Ue(l.strokeWidthEmu))/2;l.subpathsEmu.forEach((g,m)=>{let S=l.subpathsClosed?.[m]!==false,b=Ao(g,S),f=S&&b.length>2?b.length:b.length-1,h=[];for(let R=0;R<f;R+=1){let F=b[R],v=b[(R+1)%b.length],I=Math.hypot(v.x-F.x,v.y-F.y),T={x:-(v.y-F.y)/I,y:(v.x-F.x)/I};if(h.push(T),!!wo(F,v,-s,t+s,-s,n+s))for(let y=0;y<2;y+=1){let p=V[y],C=F.x+(v.x-F.x)*p,E=F.y+(v.y-F.y)*p;c(C+T.x*d,E+T.y*d),c(C-T.x*d,E-T.y*d);}}if(!S&&h.length&&(l.strokeCap==="round"||l.strokeCap==="square")){for(let[R,F,v]of [[b[0],h[0],-1],[b[b.length-1],h[h.length-1],1]])if(u(R))if(l.strokeCap==="round")c(R.x-d,R.y-d),c(R.x+d,R.y+d);else {let I=R.x+v*F.y*d,T=R.y-v*F.x*d;c(I+F.x*d,T+F.y*d),c(I-F.x*d,T-F.y*d);}}let x=S&&b.length>2?h.length:h.length-1;for(let R=0;R<x;R+=1){let F=b[(R+1)%b.length];if(!u(F))continue;if(l.strokeJoin==="round"){c(F.x-d,F.y-d),c(F.x+d,F.y+d);continue}if(l.strokeJoin==="bevel")continue;let v=h[R],I=h[(R+1)%h.length],T=1+v.x*I.x+v.y*I.y;if(T<2/(vn*vn))continue;let y=v.y*-I.x- -v.x*I.y;if(y===0)continue;let p=y>0?-1:1;c(F.x+p*(v.x+I.x)*d/T,F.y+p*(v.y+I.y)*d/T);}});for(let g of l.arrowheadsEmu??[])if(!(!g[0]||!u(g[0])))for(let m of g)c(m.x,m.y);}return r>=0&&o>=0&&a<=t&&i<=n?Y:Object.freeze({left:-r,top:-o,right:a-t,bottom:i-n})}function Ao(e,t){let n=[];for(let a of e){let i=n[n.length-1];(!i||i.x!==a.x||i.y!==a.y)&&n.push(a);}let r=n[0],o=n[n.length-1];return t&&n.length>1&&r.x===o.x&&r.y===o.y&&n.pop(),n}var V=new Float64Array(2);function wo(e,t,n,r,o,a){let i=t.x-e.x,c=t.y-e.y;return V[0]=0,V[1]=1,Ae(-i,e.x-n)&&Ae(i,r-e.x)&&Ae(-c,e.y-o)&&Ae(c,a-e.y)}function Ae(e,t){if(e===0)return t>=0;let n=t/e;return e<0?V[0]=Math.max(V[0],n):V[1]=Math.min(V[1],n),V[0]<=V[1]}var Po=new Map([["roman","serif"],["swiss","sans"],["modern","mono"]]);function xi(e,t){return t==="fixed"?"mono":e?Po.get(e):void 0}var _o=new Map([["calibri","sans"],["arial","sans"],["helvetica","sans"],["verdana","sans"],["tahoma","sans"],["segoe ui","sans"],["aptos","sans"],["century gothic","sans"],["carlito","sans"],["cambria","serif"],["times new roman","serif"],["georgia","serif"],["garamond","serif"],["book antiqua","serif"],["palatino linotype","serif"],["caladea","serif"],["courier new","mono"],["consolas","mono"]]);function Ln(e){let t=e.trim().toLowerCase(),n=_o.get(t);if(n)return n;let r=t.split(/[\s_-]+/);if(r.includes("mono")||r.includes("monospace")||r.includes("courier"))return "mono";if(r.includes("sans"))return "sans";if(r.includes("serif")||r.includes("roman"))return "serif"}var bi={serif:"Times New Roman",sans:"Arial",mono:"Courier New"};var pt="Calibri, Carlito, Helvetica, Arial, sans-serif",Mo='"Times New Roman", "Liberation Serif", Tinos, serif',ko='"Courier New", "Liberation Mono", Cousine, monospace';function No(e,t=pt){if(!e)return t;let n=Ln(e);return n==="serif"?Mo:n==="mono"?ko:t}var Oi=new Map([["calibri","Carlito"]]),zo=65536,Do=256;function On(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function Tn(e){let t=new Map,n=0;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>e;){let a=t.keys().next();if(a.done)break;t.delete(a.value),n+=1;}},get size(){return t.size},get evictions(){return n}}}var Bn=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function In(e=null){return e!=null&&typeof e.measureText=="function"}function An(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??pt,r=e.context??null;if(!In(r))return null;let o=r,a=Tn(On(e.maxWidthEntries,zo)),i=Tn(On(e.maxMetricsEntries,Do)),c=e.fontAlias,s=l=>{let d=l.fontFamily&&Bn.test(l.fontFamily)?l.fontFamily:null,g=d?c?.(d):void 0,m=g&&Bn.test(g)?g:null,S=No(d,n),b=d?m?`"${m}", "${d}", ${S}`:`"${d}", ${S}`:n,f=l.bold?"bold":"normal",h=l.italic?"italic":"normal",x=l.smallCaps?"small-caps":"normal",R=l.fontSizePt*ia$1(l)*t;return `${h} ${x} ${f} ${R}px ${b}`},u=(l,d,g)=>l/t*(g.horizontalScalePercent/100)+d.length*g.characterSpacingPt;return {measure(l,d){if(l.length===0)return 0;let g=s(d),m=`${g}\0${od(d)}\0${l}`,S=a.get(m);if(S!==void 0)return u(S,l,d);o.font=g,"fontKerning"in o&&(o.fontKerning=od(d)?"normal":"none");let b=o.measureText(l).width;return a.set(m,b),u(b,l,d)},inkBounds(l,d){if(!l||l.length>2||d.shaping?.direction==="rtl"||pa$1(l).length!==1)return;o.font=s(d),"fontKerning"in o&&(o.fontKerning=od(d)?"normal":"none");let g=o.textAlign,m=o.direction,S;try{g!==void 0&&(o.textAlign="left"),m!==void 0&&(o.direction="ltr"),S=o.measureText(l);}finally{g!==void 0&&(o.textAlign=g),m!==void 0&&(o.direction=m);}let b=S.actualBoundingBoxLeft,f=S.actualBoundingBoxRight;if(b===void 0||f===void 0||!Number.isFinite(b)||!Number.isFinite(f))return;let h=d.horizontalScalePercent/(100*t);return {left:-b*h,right:f*h}},textOutline(l,d){if(!l||d.shaping?.direction==="rtl")return;o.font=s(d),"fontKerning"in o&&(o.fontKerning=od(d)?"normal":"none");let g=o.textAlign,m=o.textBaseline,S;try{g!==void 0&&(o.textAlign="left"),m!==void 0&&(o.textBaseline="alphabetic"),S=o.measureText(l);}finally{g!==void 0&&(o.textAlign=g),m!==void 0&&(o.textBaseline=m);}let b=[-(S.actualBoundingBoxLeft??NaN),-(S.actualBoundingBoxAscent??NaN),S.actualBoundingBoxRight??NaN,S.actualBoundingBoxDescent??NaN].map(F=>F/t);if(b.some(F=>!Number.isFinite(F)))return;let[f,h,x,R]=b;if(!(!(x>f)||!(R>h)))return {path:null,ink:{left:f,top:h,right:x,bottom:R}}},lineMetrics(l){let d=l.fontSizePt*ia$1(l),g=s(l),m=i.get(g);if(m)return m;let S=d*1.15,b=d*.8;o.font=g,"fontKerning"in o&&(o.fontKerning=od(l)?"normal":"none");let f=o.measureText("Hxg"),h=f.fontBoundingBoxAscent,x=f.fontBoundingBoxDescent;if(typeof h=="number"&&Number.isFinite(h)&&h>0&&(b=h/t,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let F=(h+x)/t;F>0&&(S=Math.max(F,S));}S>0||(S=d*1.15);let R={height:S,baseline:b};return i.set(g,R),R}}}function Ho(e=1,t={}){let n=An({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:ka(),producer:"fixed-measurer"}}function Go(e){let t;return n=>{t===void 0&&(t=qc(e.pages)?.hosts??null);let r=t?.get(n);return r?oc(r.pageNumber,r.format):null}}function wn(e,t){let n=Cd(e,t.displayMode??ab),r=Jc({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:qh(t.package,"footnote"),endnotesPart:qh(t.package,"endnote")}:void 0,a=dd(n,r,o,t.package?ad(t.package,e,n):void 0,t.displayMode??ab);return {blocks:n,notes:o,context:a}}function Pn(e,t,n,r,o){for(let a of t){if(r.length>=Il)return;if(n.tokenForParagraph(a.id)!==""&&Ll(e,a.id)===null)for(let i of Kl(a)){if(r.length>=Il)return;if(!i.rewritable)continue;let c=ic(i.instruction);if(c===null)continue;let s=n.liveValueOf(i.fieldNodeId,c);if(s===null&&o&&n.pageRefProjectionOf){let u=n.pageRefProjectionOf(i.fieldNodeId,c);if(u){let l=o(u.targetParagraphId);l!==null&&l.length>0&&pc(u.calibration,u.cached,l,Number.NaN)&&(s=l);}}s===null||s===i.cachedText||s.length>Jl||s.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:s});}}}function Uo(e,t){let{blocks:n,context:r}=wn(e,t);if(r===null)return null;let o=[];return Pn(e,kc(Dc(n)),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function zi(e,t){let{notes:n,context:r}=wn(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:c}of a){if(!c)continue;let s=[];for(let u of bd(c,t.displayMode??ab)){if(s.length>=Il)break;Pn(c,kc(Dc(u)),r,s);}s.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:s}});}return o}function Wo(e){return e.box}function _n(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)_n(o,t);}function Ko(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>Rb*4)){for(let c of o.children)if(c.kind!=="textValue"){if(c.kind==="paragraph"){for(let s of r)t.get(s)?.push(c.id);n(c,c.id,i+1);continue}if(c.kind==="contentControl"){t.set(c.id,[]),r.push(c.id);let s=$b(c);s&&n(s,a,i+1),r.pop();let u=t.get(c.id);u&&u.length===0&&a!==null&&u.push(a);continue}n(c,a,i+1);}}},r=[];return n(e,null,0),t}function Xo(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function jo(e,t){let n=dc(e.root);if(n.length===0)return Vo;let r=new Map;t.pages.forEach((i,c)=>{(u=>{for(let l of u){let d=new Set;_n(l,d);for(let g of d){let m=r.get(g)??[];m.push({pageIndex:c,box:Wo(l)}),r.set(g,m);}}})(i.fragments);});let o=Ko(e.root),a=[];for(let i of n){let c=bc(i.node),s=[...i.ancestors.map(g=>bc(g).lock),c.lock],u=o.get(i.node.id)??[],l=new Map;for(let g of u)for(let m of r.get(g)??[]){let S=l.get(m.pageIndex);l.set(m.pageIndex,S?Xo(S,m.box):m.box);}let d=[...l.entries()].sort((g,m)=>g[0]-m[0]).map(([g,m])=>({pageIndex:g,...m}));a.push({controlId:i.node.id,type:c.type,level:cc(i.node),depth:i.depth,lock:c.lock,effectiveLock:gc(s),showingPlaceholder:c.showingPlaceholder,temporary:c.temporary,...c.tag===void 0?{}:{tag:c.tag},...c.alias===void 0?{}:{alias:c.alias},...c.id===void 0?{}:{id:c.id},...c.dataBinding===void 0?{}:{dataBinding:c.dataBinding},paragraphIds:u,fragments:d});}return a}var Vo=Object.freeze([]);function Nn(e,t,n){for(let r of e.lines??[]){let o=r.spans;if(!o){if(n<r.range.end)return r.box.y;continue}let a=0,i=0;for(let c of o)c.range.paragraphId===t&&(a+=1,i=c.range.end);if(a===o.length?n<r.range.end:a>0&&n<i)return r.box.y}return e.fragmentY}function oa(e,t){let n=new Map;for(let r of e.pages)for(let[o,a]of aa(r,t))n.has(o)||n.set(o,a);return n}var Mn=new WeakMap;function aa(e,t){let n=Mn.get(t);n||(n=new WeakMap,Mn.set(t,n));let r=n.get(e);if(r)return r;let o=new Map;for(let a of t(e)){let i=new Set([a.paragraphId]);for(let c of a.lines??[])for(let s of c.spans??[])i.add(s.range.paragraphId);for(let c of i)o.has(c)||o.set(c,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return n.set(e,o),o}function ia(e,t){let n=Lj(e);if(!n)return null;let r=t.get(n.start.paragraphId);if(!r)return null;let o=kn.get(e);if(o?.anchor===r)return o.geometry;let a={pageIndex:r.pageIndex,y:r.contentY+Nn(r,n.start.paragraphId,n.start.offset)};return kn.set(e,{anchor:r,geometry:a}),a}var kn=new WeakMap;var zn=new WeakMap;function sa(e){let t=zn.get(e);if(t!==void 0)return t;let n=i(e),r=new DataView(n.buffer,n.byteOffset,n.byteLength),o=false,a=r.getUint32(0)===1953784678?r.getUint32(12+e.faceIndex*4):0,i$1=r.getUint16(a+4);for(let c=0;c<i$1;c++){let s=a+12+c*16;if(r.getUint32(s)!==1330851634)continue;let u=r.getUint32(s+8),l=r.getUint32(s+12);l>=86&&u<=n.byteLength-l&&r.getUint16(u)>=1&&(o=(r.getUint32(u+78)&1966080)!==0);break}return zn.set(e,o),o}function Dn(e,t,n,r,o){let a=n.height-r;if(Math.abs(a-t)>o||!sa(e))return n;let i=Math.max(n.height,t*1.3),c=n.baseline-r;return {height:i,baseline:c+(i-a)/2}}var ca="abcdefghijklmnopqrstuvwxyz";function D(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function U(e,t,n,r,o){let a=r.shaping?.context;return e.shape({text:o,fontSizeHalfPoints:D(r),bidiLevel:r.shaping?.direction==="rtl"?1:0,environment:la(t,n,r),...a?{context:a}:{}})}var Hn=new WeakMap;function la(e,t,n){if(!Object.isFrozen(e)||!Object.isFrozen(e.features)||!Object.isFrozen(e.variationAxes)||!Object.isFrozen(e.shapingLibrary))return Gn(e,t,n);let r=n.shaping?.direction??"ltr",o=n.shaping?.script,a=`${r}|${o??""}|${od(n)?1:0}|${e.documentLigatures?G$1(n):""}|${n.smallCaps?1:0}`,i=Hn.get(e);i||Hn.set(e,i=new WeakMap);let c=i.get(t);c||i.set(t,c=new Map);let s=c.get(a);return s||c.set(a,s=Gn(e,t,n)),s}function Gn(e,t,n){return r({...e,font:t,direction:n.shaping?.direction??"ltr",script:n.shaping?.script==="Zyyy"?e.script:n.shaping?.script??e.script,features:{...e.features,kern:od(n)?1:0,...e.documentLigatures?F(n):{},...n.smallCaps?{smcp:1}:{}},fallbackOrder:[]})}function we(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let c of ca){let s=U(e,t,n,{...r,smallCaps:!0},c),u=U(e,t,n,{...r,smallCaps:!1},c);if(!(s.glyphs.length!==u.glyphs.length||s.glyphs.some((d,g)=>d.id!==u.glyphs[g]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}function Un(e,t,n,r,o){let a=new WeakMap;return (i,c)=>{let s=ia$1(c),u=a.get(i);u||(u=new Map,a.set(i,u));let l=D(c),d=u.get(l);if(d)return s===1?d:{height:d.height*s,baseline:d.baseline*s};let g,m=true,S=i.substitution?.lineMetrics;if(S){let b=l/2;g={height:S.heightEm*b,baseline:S.baselineEm*b};}else try{let b=U(e,t,i,c,""),f=b.metrics.ascent/t.fixedPointScale,h=b.metrics.descent/t.fixedPointScale,x=l/2,R=f+h,F=x*r,v=R>F?F/R:1,I=R*v,T=Math.min(Math.max(0,b.metrics.lineGap/t.fixedPointScale),I*o),y=I+T;y>0?g=Dn(i,x,{height:y,baseline:f*v+T},T,2/t.fixedPointScale):(g=n.lineMetrics(c),m=!1);}catch{g=n.lineMetrics(c),m=false;}return m?(u.set(l,g),s===1?g:{height:g.height*s,baseline:g.baseline*s}):g}}var ft=2048,ua=32,da=new Map([["symbol",{ascent:2059,descent:450,advances:[512,682,1460,1024,1124,1706,1593,899,682,682,1024,1124,512,1124,512,569,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,569,569,1124,1124,1124,909,1124,1479,1366,1479,1253,1251,1563,1235,1479,682,1292,1479,1405,1821,1479,1479,1573,1518,1139,1212,1251,1413,899,1573,1321,1628,1251,682,1767,682,1348,1024,1024,1292,1124,1124,1012,899,1067,842,1235,674,1235,1124,1124,1180,1067,1124,1124,1067,1124,1235,899,1180,1460,1405,1010,1405,1012,983,410,983,1124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1270,506,1124,342,1460,1024,1542,1542,1542,1542,2134,2021,1235,2021,1235,819,1124,842,1124,1124,1460,1012,942,1124,1124,1124,1124,2048,1235,2048,1348,1686,1405,1628,2021,1573,1573,1686,1573,1573,1460,1460,1460,1460,1460,1460,1460,1573,1460,1618,1618,1823,1686,1124,512,1460,1235,1235,2134,2021,1235,2021,1235,1012,674,1618,1618,1610,1460,786,786,786,786,786,786,1012,1012,1012,1012,0,674,561,1405,1405,1405,786,786,786,786,786,786,1012,1012,1012,0]}],["wingdings",{ascent:1841,descent:432,advances:[2048,2110,2344,2665,2752,1830,2492,938,2220,1826,2319,2319,2399,2399,2951,2956,2245,2751,1431,1431,1826,1135,1233,2196,1941,2208,1924,1825,1826,1826,1825,1863,1863,1203,1624,1381,1381,1929,1929,1124,1124,1826,1727,1727,1727,2275,1352,1739,2230,1819,1803,1332,1665,1529,1529,1480,1420,1627,1813,1826,1834,1825,2368,2159,1974,2233,1927,1911,1937,2099,1902,2245,2181,1597,2150,2603,1529,1951,1529,1825,1825,1825,1825,937,1529,2020,1825,1183,2171,2171,1825,1826,1826,1086,1086,0,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,2048,2048,2048,2048,2048,2048,2048,2048,641,937,641,1825,1825,1825,1825,1825,1951,937,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2146,2146,2146,2146,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2566,2566,1627,1627,1825,1825,1825,1825,1825,1825,2006,2006,1825,1825,1589,1589,1589,1589,2186,2186,1825,1825,1787,1787,1787,1787,1825,1825,1660,1660,2171,1660,1601,1601,1601,1601,987,789,1301,1609,1826,1826,2119]}],["wingdings 2",{ascent:1727,descent:432,advances:[2048,2110,2090,2073,2086,2344,2045,2220,989,1431,1431,1826,1431,1431,1826,1431,1431,1826,1431,1431,2320,2246,1826,1826,1826,2320,2170,2170,1381,1381,1938,1938,1938,1938,1928,1928,1928,1928,1047,1047,1047,1047,1178,1178,1178,1178,1826,1321,1568,1826,1826,1826,1826,1825,1825,1826,1826,2226,1727,1548,1579,984,1035,864,1018,2048,2048,2048,2048,2048,2048,2048,2048,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,0,1899,1899,1453,1453,1673,1332,1431,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2048,2048,542,740,1135,1825,1825,1825,1825,1825,1825,1825,542,740,1135,1825,1825,1825,1825,1825,1825,1825,1825,1825,624,764,903,1461,2020,2020,2020,2020,2020,542,641,740,1135,1529,1529,1085,1085,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1496,1825,0,0,0,0,0,0]}],["wingdings 3",{ascent:1900,descent:432,advances:[2048,1825,1825,1135,1135,1444,1444,1444,1444,1825,1825,1135,1135,1677,1677,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1825,1825,1455,1455,1455,1455,2010,2010,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2220,1825,1751,1114,1115,1660,1660,1930,1930,1930,1930,1924,1924,1924,1924,1930,1930,1931,1931,1825,1825,1232,1232,1444,1444,1444,1444,1825,1232,2005,2005,2005,2005,1801,1801,1801,1801,1801,1801,1801,1801,1085,1085,1825,0,1825,1825,1825,1825,1825,1627,1627,1825,1825,1825,1825,789,789,1825,1825,987,987,1825,1825,1184,1184,1825,1825,1579,1579,1825,1825,888,888,1825,1825,1381,1381,1825,1825,1875,1875,1825,1825,1825,1825,1825,1825,1825,789,592,493,394,1825,1825,1825,1825,1825,1085,1085,1381,1381,1628,1628,1184,1184,900,900,1825,1825,1019,1019,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1291,1291,1291,1291,1961,1961,1825,1825,1540,1540,1540,1540,2096,2096,1825,1825,1688,1688,1688,1688,2277,2277,1825,1825,1885,1885,1885,1885,543,543,1234,1234,766,766,1234,1234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],["webdings",{ascent:1638,descent:410,advances:[1024,2048,2048,2048,2048,2028,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1100,1100,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1144,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,0,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2500,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1377,1377,2048,1726,1058,2048,2048,2048,2048,877,1240,2048,2048,2048,2048,1357,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2645,2048,2048,2048,2048]}]]);function pa(e){if(b$1(e))return da.get(e.toLowerCase())}function Wn(e,t,n,r){let o=D(r)/2*ia$1(r)*(r.horizontalScalePercent/100)/ft,a=[];for(let i=0;i<n.length;i++){let c=c$2(n.charCodeAt(i),t),s=c===null?0:e.advances[c-ua]??0;if(s===0)return;a.push(s*o+r.characterSpacingPt);}return a}function Kn(e){let t=new WeakMap,n=r=>{let o=t.get(r);return o===void 0&&(o=pa(r.fontFamily)??null,t.set(r,o)),o};return {...e,measure(r,o){let a=n(o),i=a&&Wn(a,o.fontFamily,r,o);if(!i)return e.measure(r,o);let c=0;for(let s of i)c+=s;return c},caretAdvances(r,o){let a=n(o),i=a&&Wn(a,o.fontFamily,r,o);if(!i)return e.caretAdvances?.(r,o);let c=[0];for(let s of i)c.push(c[c.length-1]+s);return c},lineMetrics(r,o){let a=n(r);if(!a)return e.lineMetrics(r,o);let i=D(r)/2*ia$1(r);return {height:(a.ascent+a.descent)*i/ft,baseline:a.ascent*i/ft}}}}var fa={M:2,L:2,Q:4,C:6,Z:0},Xn=e=>{let t=Math.round(e*1e3)/1e3;return String(Object.is(t,-0)?0:t)};function jn(e,t,n){if(!(t>0)||!(n>0))return;let r=[],o=0,a=1/0,i=-1/0,c=1/0,s=-1/0;for(let u of e.glyphs){if(u.id===0)return;let l=u.outline.path,d=u.outline.unitsPerEm;if(!l)continue;if(!(d>0)||!l.startsWith("M")||/[^MLQCZ0-9eE+.,\s-]/u.test(l))return;let g=t*(u.drawScale??1)/d,m=(u.originX+u.offsetX)/n,S=(u.originY+u.offsetY)/n;for(let b of l.matchAll(/([MLQCZ])([^MLQCZ]*)/gu)){let f=b[1],h=b[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(h.length!==fa[f]||h.some(R=>!Number.isFinite(R)))return;let x=f;for(let R=0;R<h.length;R+=2){let F=m+h[R]*g,v=-(S+h[R+1]*g);a=Math.min(a,F),i=Math.max(i,F),c=Math.min(c,v),s=Math.max(s,v),x+=`${R?" ":""}${Xn(F)} ${Xn(v)}`;}if(o+=x.length,o>2e6)return;r.push(x);}}if(!(!r.length||!(i>a)||!(s>c)))return Object.freeze({path:r.join(""),ink:Object.freeze({left:a,top:c,right:i,bottom:s})})}var yt=new WeakMap;function ya(e){let t=yt.get(e);if(t!==void 0)return t??void 0;let n=e.path;if(!n.startsWith("M")||n.length>1e6||/[^MLQCZ0-9eE+.,\s-]/u.test(n))return;let r=1/0,o=-1/0,a=n.matchAll(/([MLQCZ])([^MLQCZ]*)/gu);for(let c of a){let s=c[1]==="Z"?0:c[1]==="C"?6:c[1]==="Q"?4:2,u=c[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(u.length!==s||u.some(l=>!Number.isFinite(l))){yt.set(e,null);return}for(let l=0;l<u.length;l+=2)r=Math.min(r,u[l]),o=Math.max(o,u[l]);}let i=Number.isFinite(r)&&Number.isFinite(o)?{left:r,right:o}:void 0;return yt.set(e,i??null),i}function Vn(e,t,n,r){if(e.clusters.length!==1||e.glyphs.length===0)return;let o=1/0,a=-1/0;for(let c of e.glyphs){if(c.id===0)return;let s=ya(c.outline),u=c.outline.unitsPerEm;if(!s||!(u>0))return;let l=(c.originX+c.offsetX)/n;o=Math.min(o,l+s.left*t*(c.drawScale??1)/u),a=Math.max(a,l+s.right*t*(c.drawScale??1)/u);}let i={left:o*r,right:a*r};return Number.isFinite(i.left)&&Number.isFinite(i.right)?i:void 0}function ma(e,t,n){if(t<12)return null;if(e.getUint32(0)!==1953784678)return 0;let o=12+(Number.isSafeInteger(n)&&n>0?n:0)*4;if(o+4>t)return null;let a=e.getUint32(o);return a+12<=t?a:null}function Yn(e,t,n,r,o){let a=e.getUint16(n+4);if(a>4096||n+12+a*16>t)return null;for(let i=0;i<a;i+=1){let c=n+12+i*16;if(e.getUint32(c)!==r)continue;let s=e.getUint32(c+8),u=e.getUint32(c+12);return u<o||s+u>t?null:s}return null}function $n(e,t){let n=e.byteLength,r=new DataView(e.buffer,e.byteOffset,n),o=ma(r,n,t);if(o===null)return null;let a=Yn(r,n,o,1751474532,54);if(a===null)return null;let i=r.getUint16(a+18);if(i<=0)return null;let c=Yn(r,n,o,1330851634,30);if(c===null)return null;let s=r.getInt16(c+26)/i,u=r.getInt16(c+28)/i;return !(s>0)||s>1||!(Math.abs(u)<=1)?null:{offsetEm:u,thicknessEm:s}}var ha=.5,ga=4,qn=4096;function Zn(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o}=e,a=Kn(e.fallback),i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},c=new WeakMap,s=new WeakMap,u=q$1(r),l=Un(r,i,a,ga,ha),d=new WeakMap,g=new WeakMap,m=new Array(qn),S=0,b=(y,p,C)=>{let E=m[S];E&&E.cache.delete(E.text),y.set(p,C),m[S]={cache:y,text:p},S=(S+1)%qn;},f=y=>{let p=d.get(y);if(p!==void 0)return p;let C=o(y);return d.set(y,C),C},h=(y,p,C)=>{let E=C?s:c,L=E.get(y);L||(L=new Map,E.set(y,L));let B=L.get(p);return B||(B=new Map,L.set(p,B)),B},x=new WeakMap,R=y=>{if(!y.shaping?.wordSpacingPt)return y;let p=x.get(y);return p||(p={...y,shaping:{...y.shaping,wordSpacingPt:void 0}},x.set(y,p)),p},F=(y,p)=>p.shaping?.wordSpacingPt?Nd(y)*p.shaping.wordSpacingPt:0,v=(y,p)=>a.measure(y,R(p))+F(y,p),I=(y,p)=>{let C=Math.max(0,a.measure(y,R(p))),E=a.caretAdvances?.(y,R(p))??Ld(y,C);if(!E||E.length!==y.length+1)return Ld(y,v(y,p));let L=Math.max(0,v(y,p)),B=0,M=0;return E.map((w,A)=>{if(A===0)return 0;y[A-1]===" "&&M++;let k=w+M*(p.shaping?.wordSpacingPt??0);return B=Math.max(B,Math.min(L,Number.isFinite(k)?k:B)),A===y.length?L:B})},T=new WeakMap;return {hasResolvedFont(y){return f(y)!==null},strikeoutMetrics(y){let p=f(y);if(!p)return;let C=T.get(p);if(C===void 0&&(C=$n(p.bytes,p.faceIndex),T.set(p,C)),!C)return;let E=D(y)/2*ia$1(y);return {offsetPt:C.offsetEm*E,thicknessPt:C.thicknessEm*E}},measure(y,p){if(y.length===0)return 0;let C=f(p);if(!C)return v(y,p);let E=h(C,D(p),p.smallCaps),L=p.shaping?.context,B=p.shaping?`1:${JSON.stringify(L?[p.shaping.script,p.shaping.direction,y,L.before,L.after]:[p.shaping.script,p.shaping.direction,y])}`:`0:${y}`,M=`${od(p)?1:0}:${G$1(p)}:${B}`,w=E.get(M);if(w===void 0){let A=0;try{if(p.smallCaps&&!we(r,i,C,p,g))return v(y,p);let k=U(r,i,C,p,y);if(k.glyphs.some(W=>W.id===0))return v(y,p);for(let W of k.glyphs)A+=W.advanceX;}catch{return v(y,p)}w=A/i.fixedPointScale,b(E,M,w);}return w*ia$1(p)*(p.horizontalScalePercent/100)+y.length*p.characterSpacingPt+F(y,p)},inkBounds(y,p){if(!y||y.length>2||p.shaping?.direction==="rtl"||pa$1(y).length!==1)return;let C=f(p);if(!C)return a.inkBounds?.(y,p);try{if(p.smallCaps&&!we(r,i,C,p,g))return a.inkBounds?.(y,p);let E=U(r,i,C,p,y);return Vn(E,D(p)/2,i.fixedPointScale,ia$1(p)*p.horizontalScalePercent/100)}catch{return}},textOutline(y,p){let C=f(p);if(!C)return a.textOutline?.(y,p);try{let E=U(r,i,C,p,y);return jn(E,D(p)/2,i.fixedPointScale)??a.textOutline?.(y,p)}catch{return a.textOutline?.(y,p)}},caretAdvances(y,p){let C=f(p);if(!C)return I(y,p);try{if(p.smallCaps&&!we(r,i,C,p,g))return I(y,p);let E=U(r,i,C,p,y);return E.glyphs.some(L=>L.id===0)?I(y,p):Md(y,E,ia$1(p)*(p.horizontalScalePercent/100)/i.fixedPointScale,p.characterSpacingPt,p.shaping?.wordSpacingPt??0)??Ld(y,E.glyphs.reduce((L,B)=>L+B.advanceX,0)*ia$1(p)*(p.horizontalScalePercent/100)/i.fixedPointScale+y.length*p.characterSpacingPt+F(y,p))}catch{return I(y,p)}},lineMetrics(y,p){let C=f(y);if(!C)return a.lineMetrics(y,p);if(!p||/^[\t\n\r\f ]*$/.test(p))return l(C,y);if(u){let E=l(C,y),L=Math.max(0,E.baseline),B=Math.max(0,E.height-E.baseline);return L+B>0?{height:L+B,baseline:L}:E}try{let E=U(r,i,C,y,p),L=0,B=0;for(let M of E.fontSpans){let w=l(M.font,y);L=Math.max(L,w.baseline),B=Math.max(B,w.height-w.baseline);}if(L+B>0)return {height:L+B,baseline:L}}catch{}return l(C,y)}}}function Sa(e,t){return Zn({...t,shaper:e.shaper,environment:e.environment})}function xa(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let s of t.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,c=-1;for(let s of t.pages){let u=s.box.y;u+s.box.height>=n.top&&u<=a&&(i===-1&&(i=s.index),c=s.index);}if(i===-1){let s=ba(t,n.top);s!==null&&(i=s,c=s);}if(i!==-1){let s=Math.max(0,i-o),u=Math.min(t.pages.length-1,c+o);for(let l=s;l<=u;l+=1)r.add(l);}for(let s of e.pinnedPages??[])s>=0&&s<t.pages.length&&r.add(s);return r}function ba(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var Jn=["text-local","paragraph-local","flow-structural","global"];function Qn(e,t){return Jn.indexOf(t)>Jn.indexOf(e)?t:e}function Ra(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function Fa(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,c=null,s=0,u=0;function l(f){let h=e.runCooperatively;if(!h)return t(f);let x=h(f);c=x;try{for(;;){let R=x.step();if(R)return R;if(n()!==f.revision)return x.cancel(),u+=1,null;if(c!==x)return null}}finally{c===x&&(c=null);}}function d(f){let h=m(n());h.impact=Qn(h.impact,f.impact),h.structural=h.structural||f.structural;for(let x of f.paragraphIds)h.paragraphIds.add(x);for(let x of f.created)h.created.add(x);for(let x of f.deleted)h.deleted.add(x);for(let x of f.dependencyKeys)h.dependencyKeys.add(x);}let g=f=>({impact:f.impact,paragraphIds:f.paragraphIds,created:f.created,deleted:f.deleted,dependencyKeys:f.dependencyKeys,structural:f.structural,revision:f.revision});function m(f){return a||(a=Ra(f)),a.revision=Math.max(a.revision,f),a}function S(){!o||i||(i=o(()=>{i=null,b();}));}function b(){i&&(i(),i=null),c&&(c.cancel(),c=null,u+=1);let f=a;if(!f)return false;a=null;let h=g(f),x=l(h);return !x||x.revision!==n()?(s+=1,d(h),S(),false):(r(x,h),true)}return {notify(f){let h=m(n());h.impact=Qn(h.impact,f.impact);for(let x of f.dirty)h.paragraphIds.add(x);for(let x of f.created)h.created.add(x),h.paragraphIds.add(x);for(let x of f.deleted)h.deleted.add(x),h.paragraphIds.add(x);for(let x of f.dependencyKeys)h.dependencyKeys.add(x);for(let x of f.splitJoin)h.structural=true,"split"in x?(h.paragraphIds.add(x.split.from),h.paragraphIds.add(x.split.tail)):(h.paragraphIds.add(x.join.kept),h.paragraphIds.add(x.join.removed));(f.impact==="flow-structural"||f.impact==="global")&&(h.structural=true),S();},invalidateAll(f,h){let x=m(f);x.impact="flow-structural",x.structural=true,h&&x.dependencyKeys.add(h),S();},flush:b,pending:()=>a?g(a):null,cancel(){i?.(),i=null,c?.cancel(),c=null,a=null;},get staleDiscards(){return s},get cancelledRuns(){return u}}}var er=new WeakMap;function q(e){let t=er.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=new Map,i=(s,u,l,d)=>{for(let g of s){if(g.kind==="paragraph")continue;let m=g.tableId;a.set(m,Math.max(a.get(m)??0,(g.columnEdges?.length??1)-1));let S=o.get(m);S||(S=new Map,o.set(m,S),n.set(m,[]),r.set(m,new Map));for(let b of g.rows){let f=S.get(b.id);f===void 0&&(f=S.size,S.set(b.id,f),r.get(m).set(f,b.cells));for(let h of b.cells)n.get(m).push({pageIndex:u,tableId:m,row:b,cell:h,rowIndex:f,isHeaderRepeat:b.isHeaderRepeat,offsetX:l,offsetY:d}),i(h.blocks,u,l,d);}}};for(let s of e.pages){i(s.fragments,s.index,0,0);for(let u of [s.header,s.footer])u&&i(u.fragments,s.index,u.box.x-s.contentBox.x,u.box.y-s.contentBox.y);for(let u of [s.footnotes,s.endnotes])if(u)for(let l of u.notes)i(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);}let c=new Map;for(let[s,u]of n)c.set(s,{placed:u,rows:r.get(s)??new Map,columnCount:a.get(s)??0});return er.set(e,c),c}function Ca(e){let t=e.columnCount;for(let n of e.rows.values())for(let r of n)t=Math.max(t,$(r).to+1);return t}var $=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function va(e,t,n){if(t.tableId!==n.tableId)return null;let r=q(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min($(t).from,$(n).from),c=Math.max($(t).to,$(n).to),s=m=>{let{from:S,to:b}=$(m);return b>=i&&S<=c},u=m=>(r.rows.get(m)??[]).some(S=>S.vMergeContinue&&s(S)),l=r.rows.size+Ca(r)+2;for(let m=0;!(m>l);m+=1){let S=false;for(let[b,f]of r.rows)if(!(b<o||b>a))for(let h of f){if(!s(h))continue;let{from:x,to:R}=$(h);x<i&&(i=x,S=true),R>c&&(c=R,S=true);}for(;o>0&&u(o);)o-=1,S=true;for(;u(a+1);)a+=1,S=true;if(!S)break}let d=[],g=new Set;for(let m of r.placed){if(m.isHeaderRepeat||m.rowIndex<o||m.rowIndex>a)continue;let{from:S,to:b}=$(m.cell);b<i||S>c||g.has(m.cell.id)||(g.add(m.cell.id),d.push(m.cell.id));}return d.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:d,rows:{from:o,to:a},columns:{from:i,to:c},text:Ea(e,t.tableId,d)}}function Is(e,t){return nr(e,t,true)}function Pe(e,t){return nr(e,t,false)}function nr(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of q(e).values())for(let c of i.placed)if(!(c.isHeaderRepeat||!r.has(c.cell.id)))for(let s of c.cell.blocks)n&&s.kind!=="paragraph"||le(s,o,a);return o}function le(e,t,n){if(e.kind==="paragraph"){for(let r of Sa$1(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)le(a,t,n);}function Ea(e,t,n){let r=Pe(e,n),o=r[0],a=r[r.length-1];return !o||!a?La(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Be$1(e,a).length}}}function La(e,t){let n=q(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let c of o.cell.blocks)le(c,a,new Set);let i=a[0];if(i){let c={paragraphId:i,offset:0};return {anchor:c,head:c}}}for(let o of e.pages)for(let a of Aa$1(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function Oa(e){let t=[...Aa$1(e)];for(let n of [e.header,e.footer])n&&t.push(...Ba$1(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...Ba$1(r.fragments));return t}function Ta(e,t){let n=new Set(Pe(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of Oa(a))if(n.has(i.paragraphId))for(let c of i.lines)for(let s of c.spans){let u=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(u)||(o.add(u),r.push(s));}return r}function Ba(e,t){let n=new Set(t),r=[];for(let o of q(e).values())for(let a of o.placed)n.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function Ia(e,t,n=Be$1){let r=q(e).get(t.tableId);if(!r)return "";let o=new Set(t.cellIds),a=r.placed.some(s=>s.cell.logicalGridColumn!==void 0),i=new Map,c=new Set;for(let s of r.placed){if(s.isHeaderRepeat||!o.has(s.cell.id)||c.has(s.cell.id))continue;c.add(s.cell.id);let u=Pe(e,[s.cell.id]).map(g=>n(e,g)).join(`
2
+ `),l=i.get(s.rowIndex),d=s.cell.gridColumn+(a?Math.max(1,s.cell.gridSpan)-1:0);l?l.set(d,u):i.set(s.rowIndex,new Map([[d,u]]));}return [...i.keys()].sort((s,u)=>s-u).map(s=>{let u=i.get(s),l=[];for(let d=0;d<=t.columns.to-t.columns.from;d+=1){let g=a?t.columns.to-d:t.columns.from+d;l.push(u.get(g)??"");}return l.join(" ")}).join(`
3
+ `)}function mt(e,t){return Qe$1(e,t)}function As(e,t,n){if(n){let a=mt(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let c=q(e).get(n.tableId);if(!c)return null;for(let s of c.placed)if(s.cell.id===i)return {tableId:n.tableId,rowId:s.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:s.cell.logicalGridColumn??s.cell.gridColumn,isHeaderRepeat:s.isHeaderRepeat};return null}let r=mt(e,t);if(!r)return null;let o=q(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let c of a.cell.blocks)le(c,i,new Set);if(i.includes(t))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.logicalGridColumn??a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}var tr=new WeakMap;function ws(e,t){let n=tr.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of q(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let c=[];for(let u of i.cell.blocks)le(u,c,new Set);let s={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let u of c){let l=r.get(u);l&&l.tableId.length>=o.length||r.set(u,s);}}return tr.set(e,r),r.get(t)??null}function Aa(e,t,n){if(![e,t,n].every(Number.isFinite)||t<=0||n<=0)return {offsetPt:0,count:0};let r=Math.ceil(e/n-1e-9)*n;if(!Number.isFinite(r))return {offsetPt:0,count:0};let o=Math.max(0,r-e);return {offsetPt:o,count:Math.min(8192,Math.max(0,Math.floor((t-o)/n+1e-9)))}}export{Nn as $,mn as A,hn as B,gn as C,Sn as D,xn as E,bn as F,mo as G,ho as H,te as I,xo as J,ut as K,Cn as L,Eo as M,To as N,xi as O,Ln as P,bi as Q,pt as R,No as S,Oi as T,In as U,An as V,Ho as W,Go as X,Uo as Y,zi as Z,jo as _,Ze as a,oa as aa,Q as b,ia as ba,Qe as c,U as ca,ir as d,we as da,O as e,Zn as ea,et as f,Sa as fa,rt as g,xa as ga,Ka as h,Fa as ha,nn as i,va as ia,rn as j,Is as ja,j as k,Pe as ka,no as l,Ta as la,ro as m,Ba as ma,ni as n,Ia as na,at as o,mt as oa,ri as p,As as pa,oo as q,ws as qa,io as r,Aa as ra,oi as s,so as t,it as u,Be as v,co as w,lo as x,uo as y,ct as z};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkFDSL5OJU_cjs=require('./chunk-FDSL5OJU.cjs'),chunkOKMEMSKB_cjs=require('./chunk-OKMEMSKB.cjs'),chunk65XBN67F_cjs=require('./chunk-65XBN67F.cjs'),chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs');var Tr=Object.freeze({}),Fr=Object.freeze([]);function Nr(e){let t=Object.keys(e);if(t.length===0)return Tr;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function jr(e){let t=new Map(chunkZOZI27AW_cjs.wg(e.part())),n=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!n.has(i)){n.add(i);for(let[s,c]of chunkZOZI27AW_cjs.wg(i))t.has(s)||t.set(s,c);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=chunkZOZI27AW_cjs.qh(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of chunkZOZI27AW_cjs.wg(a))t.has(i)||t.set(i,s);}}return t}function _r(e,t){let n=chunkFDSL5OJU_cjs.ze(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=chunkFDSL5OJU_cjs.Ke(r),a=chunkFDSL5OJU_cjs.Me(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function Br(e,t){let n=[];for(let r of t.values()){let o=_r(e,r);o&&n.push(o);}return n.length===0?Fr:Object.freeze(n)}function $t(e,t){return {documentMetadata:Nr(e.documentProperties()),destinations:Br(t,jr(e))}}function Fn(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function Gt(e={}){return Object.freeze({async decode(t,n,r){let o=chunkZOZI27AW_cjs.pe(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},...e.convertPreserved?{convertPreserved:e.convertPreserved}:{}})}var Yt=new WeakMap;function Xt(e,t){let n=Yt.get(e);n||(n=chunkFDSL5OJU_cjs.Xe(e),Yt.set(e,n));let r=n.styleCascade(),o=new Set;if(t===e.part())for(let c of chunkFDSL5OJU_cjs.Cd(t,void 0,void 0,r,n.numberingIndex()))for(let l of chunkFDSL5OJU_cjs.tb(c)?.slice(0,-1)??[])o.add(l.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let l=c.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===chunkZOZI27AW_cjs.pa&&d.localName==="pPr"),p=l?.kind!=="textValue"?l?.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===chunkZOZI27AW_cjs.pa&&d.localName==="rPr"):void 0;return p!==void 0&&chunkZOZI27AW_cjs.Ea(p,"vanish")},i=0,s=(c,l)=>{if(++i>chunkZOZI27AW_cjs.Od||l>chunkZOZI27AW_cjs.da||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(chunkFDSL5OJU_cjs.Ad(c,r,false)||a(c))&&chunkZOZI27AW_cjs.rg(c).length>0)return true;for(let p of c.children){if(i>=chunkZOZI27AW_cjs.Od)break;if(s(p,l+1))return true}return false};return s(t.root,0)}var qt=new WeakMap,Vr=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function Kr(e,t){let n=qt.get(e.root);if(n&&n.stylesPart===t)return n.codes;let r=chunkZOZI27AW_cjs.eb(t),o=new Set,a=[{node:e.root,scope:chunkZOZI27AW_cjs.Ad(),depth:0,mcSelected:false,framed:false}],i=0;for(;a.length;){let{node:c,scope:l,depth:p,mcSelected:d,framed:g}=a.pop();if(++i>chunkZOZI27AW_cjs.Od||p>chunkZOZI27AW_cjs.da){o.add("scan-limit");break}if(c.kind==="textValue")continue;if(i+a.length+c.children.length>chunkZOZI27AW_cjs.Od){o.add("scan-limit");break}let h=chunkZOZI27AW_cjs.zd(l,c),x=g||r(c),m=chunkZOZI27AW_cjs.yd(c)?c:void 0;if(m){if(chunkZOZI27AW_cjs.Sd(m,h).drawing)continue;let y=chunkZOZI27AW_cjs.Rd(m,h);y.refused&&o.add("scan-limit"),y.branch&&a.push({node:y.branch,scope:h,depth:p+1,mcSelected:true,framed:x});continue}if(!d&&chunkZOZI27AW_cjs.vd(c)&&!(x&&c.localName==="object")){let y=chunkZOZI27AW_cjs.xd(c,e.name)?.textboxStory?.content;y&&a.push({node:y,scope:h,depth:p+1,mcSelected:d,framed:x});continue}if(c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox"){o.add("legacy-textbox");continue}c.namespaceUri==="urn:schemas-microsoft-com:vml"&&Vr.has(c.localName)&&!c.children.some(y=>y.kind!=="textValue"&&y.namespaceUri==="urn:schemas-microsoft-com:vml"&&y.localName==="textbox")&&o.add("legacy-drawing");for(let y of c.children)a.push({node:y,scope:h,depth:p+1,mcSelected:d,framed:x});}let s=Object.freeze([...o]);return qt.set(e.root,{stylesPart:t,codes:s}),s}function Qt(e){let t=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let r of [n.headers,n.footers])for(let o of r.values())t.add(o);for(let n of ["footnote","endnote"]){let r=chunkZOZI27AW_cjs.qh(e.currentPackage(),n);r&&t.add(r);}return Object.freeze([...t].flatMap(n=>[...Kr(n,chunkZOZI27AW_cjs.fd(e.currentPackage())),...Xt(e,n)?["unsupported-style-separator"]:[]].map(r=>Object.freeze({code:r,partName:n.name}))))}function Jt(e){return chunkZOZI27AW_cjs.sf(e.fieldResults,()=>chunkFDSL5OJU_cjs.sf(zr(e)))}function zr(e){return chunkFDSL5OJU_cjs.tf(e.fieldResults,Hr(e))}function*Hr(e){let t=e.defaultTabStopPt?.(),n=e.view.part().name,r={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=chunkFDSL5OJU_cjs.kf(r),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,fieldResults:e.fieldResults,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,bodyBlockLimit:e.bodyBlockLimit},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,fieldResults:a.fieldResults,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(n,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(n,s),projectionEpoch:a.linkProjectors.epochForPart(n),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter,bodyBlockLimit:a.bodyBlockLimit};return yield*chunkFDSL5OJU_cjs.ag(a.view.part(),a.revision,i)}var Wr=65536;function tr(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function Ur(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function $r(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function Gr(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return chunkFDSL5OJU_cjs.Ea(e,r=>{if(n||!$r(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>chunkFDSL5OJU_cjs.za(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;chunkFDSL5OJU_cjs.Ia(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);Ur(s,t.textboxPath)&&(n=tr(e,i.storyOrigin));},r.origin,o);}),n}function Yr(e,t){if(t.story==="textbox")return Gr(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?chunkFDSL5OJU_cjs.Le(e,e.header.box):{x:0,y:0};case "footer":return e.footer?chunkFDSL5OJU_cjs.Le(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?chunkFDSL5OJU_cjs.Le(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,r=n?.separator?.box;return n?.continuationNotice&&chunkFDSL5OJU_cjs.Ia(n.continuationNotice,o=>{o.paragraphId===t.source.start.paragraphId&&(r=n.continuationNotice.box);}),r?chunkFDSL5OJU_cjs.Le(e,r):{x:0,y:0}}default:return {x:0,y:0}}}function rr(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function nr(e,t){let n=chunkFDSL5OJU_cjs.Ke(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function Xr(e,t){let n=chunkFDSL5OJU_cjs.ze(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=Yr(r,t),a=Object.freeze([rr({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>nr(r,i)))})}function qr(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return or(t)?Xr(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>rr(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>nr(o,i)))})}function or(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function er(e,t){return `${e}\0${t}`}function Qr(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function Jr(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=Wr)return false;a+=1;let l=er(s.pageIndex,c),p=r.get(l);return p?p.push(s):r.set(l,[s]),true};for(let[s,c]of t.entries())for(let[l,p]of c.occurrences.entries()){if(or(p)||p.source.start.paragraphId!==p.source.end.paragraphId)continue;o.add(p.pageIndex);let d=`${s}\0${l}`,g={paragraphId:p.source.start.paragraphId,offset:p.source.start.offset},h={paragraphId:p.source.end.paragraphId,offset:p.source.end.offset},x=g.offset<=h.offset?{from:g,to:h}:{from:h,to:g};i({key:d,from:x.from,to:x.to,pageIndex:p.pageIndex},x.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&chunkFDSL5OJU_cjs.Ea(s,c=>{let l=c.story==="header"||c.story==="footer"?p=>chunkFDSL5OJU_cjs.za(p,c.origin,{x:s.box.x,y:s.box.y}):void 0;chunkFDSL5OJU_cjs.Ia(c.host,(p,d)=>{let g=tr(s,d.storyOrigin);for(let h of p.lines)for(let x of chunkFDSL5OJU_cjs.Oa(h)){let m=r.get(er(s.index,x.paragraphId));if(m)for(let y of m){let b=Qr(x,y.from,y.to);if(!b)continue;let w=chunkFDSL5OJU_cjs.se(h,b.start,void 0,x),v=chunkFDSL5OJU_cjs.se(h,b.end,void 0,x,b.end>b.start),R=n.get(y.key)??[];R.push({pageIndex:s.index,x:Math.min(w,v)+g.x,y:h.box.y+g.y,width:Math.abs(v-w),height:h.box.height}),n.set(y.key,R);}}},c.origin,l);});return n}function ar(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=Jr(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let l=`${a}\0${c}`,p=qr(e,s,r.get(l)??[]);return p?{...s,geometry:p}:s});return {...o,occurrences:Object.freeze(i)}})}function Zr(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function ir(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=Zr(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:chunkZOZI27AW_cjs.mk,locations:chunkZOZI27AW_cjs.rk,commentAnchors:chunkZOZI27AW_cjs.pi,deepOrder:t};return Object.freeze({collectReviewItems:r=>chunkZOZI27AW_cjs.vk(r,n),deepParagraphOrderOfPart:t})}var sr=new WeakMap,me={};function Oe(e,t){let n=sr.get(e??me)??new WeakMap;sr.set(e??me,n);let r=n.get(t??me);if(!r){let o=chunkFDSL5OJU_cjs.td(e);r={table:o,numbering:chunkFDSL5OJU_cjs.Hc(chunkFDSL5OJU_cjs.vc(t),o)},n.set(t??me,r);}return r}var Ie=new Set(["pPrChange","rPr","sectPr"]),Re=new Set(["rPrChange","ins","del","moveFrom","moveTo"]),en=new Set(["ind","spacing","rFonts","lang"]),tn={ind:[["firstLine","hanging"]],rFonts:[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","cstheme"]]},rn={ind:{start:"left",end:"right"}},nn={ind:new Set(["startChars","endChars","leftChars","rightChars","firstLineChars","hangingChars"])},ke=new Set(["dstrike","noProof","webHidden","specVanish","rtl","cs","oMath","keepNext","keepLines","pageBreakBefore","suppressLineNumbers","suppressAutoHyphens","contextualSpacing","mirrorIndents","suppressOverlap","bidi"]);for(let e of chunkFDSL5OJU_cjs.E)ke.add(e);var dr=new Set(["0","false","off"]);function on(e,t,n,r){if(ke.has(e))return t==="val"&&dr.has(n);switch(e){case "jc":return n==="start"||!r&&n==="left";case "ind":return n==="0";case "u":case "highlight":return n==="none";case "vertAlign":return n==="baseline";case "color":return n==="auto";case "position":return n==="0";case "w":return n==="100";default:return false}}function an(e){let t=rn[e.localName],n=nn[e.localName],r={};for(let[o,a]of Object.entries(e.attributes??{})){if(n?.has(o))return null;let i=t?.[o]??o;i!==o&&e.attributes?.[i]!==void 0||(r[i]=a);}return ke.has(e.localName)&&r.val===void 0&&(r.val="true"),r}function sn(e,t,n){let r={...t};for(let o of tn[e]??[])if(o.some(a=>n[a]!==void 0))for(let a of o)delete r[a];return Object.assign(r,n)}function lr(e,t){let n=new Map;for(let i of e){if(t.has(i.localName))continue;let s=an(i);if(!s)return null;let c=n.get(i.localName);n.set(i.localName,c&&en.has(i.localName)?sn(i.localName,c,s):s);}let r=n.get("bidi"),o=r!==void 0&&!dr.has(r.val??"true"),a=[];for(let[i,s]of n){let c=Object.entries(s).filter(([l,p])=>!on(i,l,p,o)).sort(([l],[p])=>l.localeCompare(p));c.length===0&&Object.keys(s).length>0||a.push(`${i}(${c.map(([l,p])=>`${l}=${p}`).join(",")})`);}return a.sort().join(" ")}function fe(e,t){let n=[];for(let r of e?.children??[]){if(r.kind==="textValue")continue;let o=r.namespaceUri===chunkZOZI27AW_cjs.pa;o&&t.has(r.localName)||o&&!r.children.some(a=>a.kind!=="textValue")||n.push(chunkZOZI27AW_cjs.Ga(r));}return n.join("\0")}function ye(e,t){let n="";for(let r of e)r.localName===t&&(n=r.attributes?.val??"");return n}function ur(e,t){let n=chunkFDSL5OJU_cjs.vd(e.table,t).paragraphPropertyNodes,r=chunkFDSL5OJU_cjs.Gc(n);if(!r||r.numId==="0")return null;let o=chunkFDSL5OJU_cjs.wc(e.numbering,r.numId,r.ilvl);return (o&&chunkFDSL5OJU_cjs.ub(o.level))??void 0}function cr(e,t){let n=ur(e,t);if(n===void 0)return null;let r=chunkFDSL5OJU_cjs.vd(e.table,t,void 0,n??void 0);return lr(r.paragraphProperties,Ie)}function pr(e,t,n){let r=chunkFDSL5OJU_cjs.Nb(t);if(ye(chunkFDSL5OJU_cjs.nb(n),"pStyle")!==ye(chunkFDSL5OJU_cjs.nb(r),"pStyle")||fe(n,Ie)!==fe(r,Ie))return false;let o=cr(e,n);return o!==null&&o===cr(e,r)}function mr(e,t,n,r){let o=chunkFDSL5OJU_cjs.Mb(t),a=chunkFDSL5OJU_cjs.nb(n),i=chunkFDSL5OJU_cjs.nb(o);if(ye(a,"rStyle")!==ye(i,"rStyle")||fe(n,Re)!==fe(o,Re))return false;let s=ur(e,r);if(s===void 0)return false;let c=chunkFDSL5OJU_cjs.vd(e.table,r,void 0,s??void 0).runProperties,l=d=>lr(chunkFDSL5OJU_cjs.xd(c,d,e.table),Re),p=l(a);return p!==null&&p===l(i)}function yr(e){return {pkg:e,stylesRoot:chunkZOZI27AW_cjs.fd(e)?.root??null,numberingRoot:chunkZOZI27AW_cjs.gd(e)}}var cn=64,fr=new WeakMap;function Ee(e){return e.kind==="revision"&&e.revisionKind==="format"&&(e.formattingKind==="pPrChange"||e.formattingKind==="rPrChange")&&!e.readOnly&&e.ranges.length>0}function dn(e,t){let n=null,r=chunkZOZI27AW_cjs.Ya(e,t);for(let o=0;r&&o<cn;o+=1){if(r.kind==="tableCell"||r.localName==="tc")return null;r.kind==="paragraph"&&(n??=r),r=chunkZOZI27AW_cjs.Ya(e,r.id);}return r?null:n}function ln(e,t,n,r){let o=chunkZOZI27AW_cjs.Xa(e,t);if(!o||o.kind==="textValue")return false;let a=chunkZOZI27AW_cjs.Ya(e,t);if(!a)return false;let i=dn(e,a.id);if(!i||!r.has(i.id))return false;let s=chunkFDSL5OJU_cjs.Nb(i),c=fr.get(o);if(c&&c.context===n&&c.current===a&&c.paragraph===s)return c.inert;let l=o.localName==="pPrChange"?a===s&&pr(n,o,a):o.localName==="rPrChange"&&mr(n,o,a,s);return fr.set(o,{context:n,current:a,paragraph:s,inert:l}),l}function gr(e,t,n){if(!Ee(e))return false;let r=t.pkg.parts.get(e.ranges[0].partName),o=chunkZOZI27AW_cjs.Ej(e),a=new Set(e.ranges.map(i=>i.start.paragraphId));return !!r&&o.length>0&&o.every(i=>ln(r,i,n,a))}function hr(e,t){if(!e.some(Ee))return e;let n=Oe(t.stylesRoot,t.numberingRoot),r=e.filter(o=>!gr(o,t,n));return r.length===e.length?e:chunkZOZI27AW_cjs.wk(r)}function _o(e,t){if(!e.some(Ee))return [];let n=Oe(t.stylesRoot,t.numberingRoot);return e.filter(r=>gr(r,t,n))}function un(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(chunkZOZI27AW_cjs.kk(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function vr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of chunkZOZI27AW_cjs.nf(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(chunkZOZI27AW_cjs.qh(e,"footnote")),o(chunkZOZI27AW_cjs.qh(e,"endnote")),n}function pn(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return chunkZOZI27AW_cjs.qh(e,"footnote")?.name??null;case "endnote":return chunkZOZI27AW_cjs.qh(e,"endnote")?.name??null;case "note-separator":return chunkZOZI27AW_cjs.qh(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function mn(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),l=n.get(r.partName);n.set(r.partName,{lower:Math.min(l?.lower??s,s),upper:Math.max(l?.upper??c,c)});}return n}function fn(e,t,n,r,o){let a=new Map(n.map(d=>[d.name,o(d)])),i=mn(r,a),s=new Map,c=new Map,l=(d,g,h,x,m,y,b)=>{let w=a.get(d)?.get(m),v=i.get(d);if(w===void 0||!v||w<v.lower||w>v.upper)return;let R=s.get(d)??new Map;s.set(d,R);let V=c.get(d)??new Map;c.set(d,V);let U=JSON.stringify([g.story,g.noteScopeId,g.noteAreaKind]),K=h==="textbox"?JSON.stringify([U,"textbox",x]):U,$=R.get(m)??[],j=`${m}\0${g.page.index}\0${K}`,C=V.get(j);C||(C={pageIndex:g.page.index,story:h,rootStory:g.story,textboxPath:x,noteScopeId:g.noteScopeId,noteAreaKind:g.noteAreaKind,laneKey:K,intervals:[],intervalKeys:new Set},V.set(j,C),$.push(C),R.set(m,$));let G=`${y}\0${b}`;C.intervalKeys?.has(G)||(C.intervalKeys?.add(G),C.intervals.push({start:y,end:b}));};chunkFDSL5OJU_cjs.Fa(e,d=>{let g=pn(t,d);!g||!i.has(g)||chunkFDSL5OJU_cjs.Ia(d.host,(h,x)=>{let m=x.textboxDepth>0?"textbox":d.story,y=x.textboxPath.map(w=>w.drawingNodeId),b=[];for(let w of h.lines){for(let v of w.spans)b.push(v.range);for(let v of w.drawings??[])b.push({paragraphId:v.paragraphId,start:v.start,end:v.start+1});}b.length===0&&b.push({paragraphId:h.range.paragraphId,start:h.range.start,end:h.range.end});for(let{paragraphId:w,start:v,end:R}of b)l(g,d,m,y,w,v,R);});}),chunkFDSL5OJU_cjs.Ha(e,d=>{let g=d.drawing.ownerPartName;d.drawing.accessibility.hidden||!i.has(g)||l(g,d.root,d.story,d.textboxPath.map(h=>h.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let g of d.values())for(let h of g){h.intervals.sort((m,y)=>m.start-y.start||m.end-y.end);let x=[];for(let m of h.intervals){let y=x.at(-1);y&&m.start<=y.end?y.end=Math.max(y.end,m.end):x.push({...m});}h.intervals.splice(0,h.intervals.length,...x),h.intervalKeys=void 0;}let p=new Map;for(let[d,g]of s){let h=a.get(d);if(!h)continue;let x=[];for(let[m,y]of g){let b=h.get(m);b!==void 0&&x.push({paragraphId:m,position:b,laneKeys:new Set(y.map(({laneKey:w})=>w))});}x.sort((m,y)=>m.position-y.position),p.set(d,x);}return {byPart:s,orderByPart:a,visibleByPart:p}}function xr(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function yn(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),l=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),p=new Set([...c].filter(d=>l.has(d)));return p.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(xr(r,i),xr(r,s+1)).filter(d=>[...d.laneKeys].some(g=>p.has(g))).map(d=>d.paragraphId)}function gn(e,t,n,r){return r?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,n)};return a.end>a.start?[a]:[]})}function hn(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function wr(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let c of yn(i,t)){let l=t.byPart.get(i.partName)?.get(c)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,g=c===i.start.paragraphId?i.start.offset:0,h=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,x=d?hn(l,g):new Set;for(let m of l){let y=gn(m,g,h,d);d&&y.length===0&&x.has(m)&&(y=[{start:g,end:g}]);for(let b of y){let w=`${m.pageIndex}\0${m.story}\0${m.noteScopeId??""}\0${m.noteAreaKind??""}\0${m.textboxPath.join("\0")}\0${i.partName}\0${c}\0${b.start}\0${b.end}\0${s??""}`;o.has(w)||(o.add(w),r.push({pageIndex:m.pageIndex,physicalPageNumber:m.pageIndex+1,story:m.story,rootStory:m.rootStory,textboxPath:m.textboxPath,noteScopeId:m.noteScopeId,noteAreaKind:m.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:b.start},end:{paragraphId:c,offset:b.end}}}));}}}}return r}function Sr(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function br(e,t,n=Sr){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[c,l]of s.entries())o.set(l,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function xn(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:br("comment",t),revision:br("change",n)}}function B(e,t,n){return e.get(n)??Sr(t,n)}function wn(e,t,n){return e.kind==="revision"?{kind:"tracked-change",id:B(n.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:chunkZOZI27AW_cjs.nb(e.text),replacedText:chunkZOZI27AW_cjs.nb(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:B(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(r=>B(n.comment,"comment",r)),occurrences:t?wr(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:B(n.comment,"comment",e.id),author:e.comment.author,initials:chunkZOZI27AW_cjs._j(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:chunkZOZI27AW_cjs.Yj(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:B(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:B(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(r=>B(n.comment,"comment",r)),orphaned:e.orphaned,occurrences:t&&e.range?wr([e.range],t):[]}}function Rr(e){let t=e.parts.get(e.mainDocumentPart);if(!t)return null;let n=vr(e,t),r=[t,...n],o=e.parts.get(chunk65XBN67F_cjs.Z(e,t.name));if(!un(r,o))return null;let a=ir(),i=a.collectReviewItems({storyPart:t,furnitureParts:n,commentsPart:o,commentsExtendedPart:e.parts.get(chunk65XBN67F_cjs._(e,t.name))}),s=hr(i,yr(e)),c=new Set(s.map(d=>d.id)),l=chunkOKMEMSKB_cjs.a(i.filter(d=>!c.has(d.id))),p={sites:new Set(l.sites),paragraphs:l.paragraphs,key:chunkOKMEMSKB_cjs.c(chunkZOZI27AW_cjs.fd(e)?.root??null,chunkZOZI27AW_cjs.gd(e))};return {parts:r,derivation:a,items:s,unlistedSites:p}}var Pr=new WeakMap,bn={sites:new Set,paragraphs:new Map,key:""};function Ir(e){let t=Pr.get(e);if(!t){let n=e.parts.get(e.mainDocumentPart);t=n!==void 0&&[n,...vr(e,n)].some(o=>chunkZOZI27AW_cjs.lk(o).some(a=>a.propertyChange))&&Rr(e)?.unlistedSites||bn,Pr.set(e,t);}return t}function Or(e,t){let n=Rr(t);if(!n)return [];let{parts:r,derivation:o,items:a}=n;if(a.length===0)return [];let i=a.flatMap(l=>chunkZOZI27AW_cjs.Kj(l)),s=i.length>0?fn(e,t,r,i,o.deepParagraphOrderOfPart):null,c=xn(a);return a.map(l=>wn(l,s,c)).filter(l=>l!==null)}var Pn=new Set(["part","validatedHandle"]);function kr(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Z(e,t,n,r,o){if(!(r!==void 0&&Pn.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)Z(a,t,n,void 0,o);Object.freeze(e);return}if(!kr(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");Z(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Er(e){if(!kr(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),Z(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),Z(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),Z(o.value,new Set,a,r);}return Object.freeze(e),e}var vn=Object.freeze([]),E=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function Sn(e){try{return e instanceof E}catch{return false}}function Rn(e){try{return e instanceof chunkFDSL5OJU_cjs.ff}catch{return false}}function In(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function On(e){if(Sn(e))return e;let t=Rn(e),n=In(e),r=n?`: ${n}`:"",o=new E(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function kn(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Mr(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var En=50,Me=64;function Mn(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Dn(e){let t=false;return chunkFDSL5OJU_cjs.Ha(e,({drawing:n})=>{Mn(n.resource)&&(t=true);}),t}function Dr(e){return !ArrayBuffer.isView(e)}function ba(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};if(t.revisionAuthorSlots!==void 0&&(!t.revisionAuthorSlots||typeof t.revisionAuthorSlots!="object"||Array.isArray(t.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let n=t.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(t.revisionAuthorSlots).map(([f,P])=>{if(!Number.isSafeInteger(P)||P<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [f,P]}))),r=t.revisionMarkup?chunkFDSL5OJU_cjs.Ya(t.revisionMarkup):void 0,o=r?{revisionMarkup:r,hiddenAuthors:new Set,cacheKey:JSON.stringify(r)}:void 0,a=Mr(t.displayMode??chunkFDSL5OJU_cjs.ab),i=Dr(e),s=Dr(e)?{ok:true,view:e}:chunk65XBN67F_cjs.za(e);if(!s.ok)return s;let c=s.view,l=t.reuseAcrossRevisions??i,p=kn(t.resourceTimeoutMs),d=t.measurer??chunkFDSL5OJU_cjs.ka(),g=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),h=chunkFDSL5OJU_cjs.Te({retainAcrossPasses:l}),x=0,m=new Set,y=()=>{x+=1;for(let f of m)f();m.clear();},b=chunkFDSL5OJU_cjs.Ze({session:c,decodePort:t.imageDecodePort??Gt(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:y}),w={view:c,measurer:d,paragraphCache:h,sessions:new Map,completed:new Map,inFlight:new Map,styles:chunkFDSL5OJU_cjs.Xe(c),fieldLinks:new Map,links:chunkFDSL5OJU_cjs.mf(c),drawingBundle:b,furniture:new Map},v=new AbortController,R=t.signal,V=false,U=()=>V?new E("aborted","Export resource settlement was aborted"):new E("disposed","Export session has been disposed"),K=()=>{V=true,$();};function $(){let f=w;if(f){w=null,R?.removeEventListener("abort",K),v.abort(R?.reason),f.drawingBundle.dispose(),f.paragraphCache.clear();for(let P of f.completed.values())chunkFDSL5OJU_cjs.rc(P.internal),chunkFDSL5OJU_cjs.uf(P.internal);for(let P of f.fieldLinks.values())P.registry.clear();f.fieldLinks.clear(),f.completed.clear(),f.inFlight.clear(),f.furniture.clear(),f.sessions.clear(),y();}}R?.addEventListener("abort",K,{once:true}),R?.aborted&&K();let j=()=>{if(!w)throw U();if(v.signal.aborted)throw new E("aborted","Export resource settlement was aborted")},C=(f,P,M,u)=>x!==f||w?.view.packageRevision()!==P||w?.view.currentPackage()!==M?Promise.resolve():(j(),new Promise((_,O)=>{let k=false,T,D=F=>{k||(k=true,T!==void 0&&clearTimeout(T),m.delete(Y),v.signal.removeEventListener("abort",X),F?O(F):_());},Y=()=>D(),X=()=>D(new E("aborted","Export resource settlement was aborted")),L=()=>{if(w?.view.packageRevision()!==P||w?.view.currentPackage()!==M){D();return}let F=u-Date.now();if(F<=0){D(new E("timedOut",`Image resources did not settle within ${p}ms`));return}T=setTimeout(L,Math.min(En,F));};if(m.add(Y),v.signal.addEventListener("abort",X,{once:true}),x!==f||w?.view.packageRevision()!==P||w?.view.currentPackage()!==M){D();return}L();})),G=async(f,P=0,M=Date.now()+p)=>{if(j(),Date.now()>=M)throw new E("timedOut",`Export layout did not stabilize within ${p}ms`);let u=w,_=M,O=u.view.packageRevision(),k=u.view.currentPackage(),T=u.completed.get(f);if(T&&T.revision===O&&T.pkg===k)return T.published;let D=()=>{if(u.view.packageRevision()===O&&u.view.currentPackage()===k)return null;if(P>=Me-1)throw new E("nonConvergent","Document revision did not stabilize during export layout");return G(f,P+1,_)},Y=f==="simple-markup"?chunkFDSL5OJU_cjs.bb(o):o,X=f==="all-markup"||f==="simple-markup"?chunkFDSL5OJU_cjs.jd(Y,Ir(k),f==="simple-markup"):Y,L=u.fieldLinks.get(f);if(!L||L.revision!==O||L.pkg!==k){let I=L?.registry??chunkFDSL5OJU_cjs.nf();I.clear(),L={revision:O,pkg:k,registry:I},u.fieldLinks.set(f,L),u.furniture.delete(f);}let F=L.registry,Le=u.sessions.get(f)??chunkFDSL5OJU_cjs._f();u.sessions.set(f,Le);let ee=u.furniture.get(f);ee||(ee=chunkFDSL5OJU_cjs.jf({view:u.view,measurer:u.measurer,producer:g,cache:u.paragraphCache,styleCascade:u.styles.styleCascade,numberingIndex:u.styles.numberingIndex,defaultTabStopPt:u.styles.defaultTabStopPt,compatibilityMode:u.styles.compatibilityMode,displayMode:chunkFDSL5OJU_cjs.$a(f),revisionAuthorFilter:X,showFieldCodes:false,inlineDrawingLayoutForPart:I=>u.drawingBundle.contextForPart(I),drawingLayoutTokenForPart:I=>u.drawingBundle.cacheTokenForPart(I),drawingTokenForParagraphForPart:(I,ge)=>u.drawingBundle.drawingTokenForParagraph(ge,I),linkProjectors:u.links,projectFieldLink:I=>F.project(I)}),u.furniture.set(f,ee));for(let I=0;I<Me;I+=1){let ge=x;u.drawingBundle.sync(u.view);let Ae=D();if(Ae)return Ae;let N=Jt({view:u.view,revision:u.view.packageRevision(),measurer:u.measurer,cache:u.paragraphCache,session:Le,producer:g,styleCascade:u.styles.styleCascade,defaultTabStopPt:u.styles.defaultTabStopPt,numberingIndex:u.styles.numberingIndex,furniture:ee,compatibilityMode:u.styles.compatibilityMode,linkProjectors:u.links,projectFieldLink:S=>F.project(S),inlineDrawingLayout:u.drawingBundle.bodyContext,inlineDrawingLayoutForPart:S=>u.drawingBundle.contextForPart(S),drawingTokenForParagraph:S=>u.drawingBundle.drawingTokenForParagraph(S,u.view.part().name),drawingTokenForParagraphForPart:(S,te)=>u.drawingBundle.drawingTokenForParagraph(te,S),drawingLayoutEpoch:u.drawingBundle.cacheTokenForPart(u.view.part().name),drawingLayoutEpochForPart:S=>u.drawingBundle.cacheTokenForPart(S),displayMode:chunkFDSL5OJU_cjs.$a(f),revisionAuthorFilter:X,showFieldCodes:false,bodyBlockLimit:void 0,fieldResults:"atomic"});if(!Dn(N)){let S=D();if(S)return S;l||(chunkFDSL5OJU_cjs.rc(N),chunkFDSL5OJU_cjs.uf(N),u.paragraphCache.clear(),u.sessions.delete(f),u.furniture.delete(f));let te=Or(N,k),Lr=te.length===0?vn:Object.freeze(ar(N,te)),Ar=$t(u.view,N),Cr={...N,...Ar,reviewDisplayMode:f,...r?{revisionMarkup:r}:{},...n?{revisionAuthorSlots:n}:{},facingPages:[...k.parts.values()].some(Ne=>Ne.root.localName==="settings"&&Ne.root.children.some(re=>re.kind!=="textValue"&&(re.localName==="mirrorMargins"||re.localName==="evenAndOddHeaders")&&!re.attributes.some(je=>je.localName==="val"&&["0","false","off"].includes(je.value)))),contentWarnings:Qt(u.view),reviewArtifacts:Lr},Fe=Er(Cr);return u.completed.set(f,{revision:O,pkg:k,internal:N,published:Fe}),Fe}let Ce=ge;for(;u.drawingBundle.pendingResourceCount()>0;){await C(Ce,O,k,_),Ce=x,j();let S=D();if(S)return S}j();let Te=D();if(Te)return Te}throw new E("nonConvergent",`Image resources did not reach quiescence after ${Me} layout passes`)},De=f=>{let P;try{P=Mr(f);}catch(O){return Promise.reject(O)}if(!w)return Promise.reject(U());let M=w,u=M.inFlight.get(P);if(u)return u;let _=G(P).catch(O=>{throw On(O)}).finally(()=>M.inFlight.delete(P));return M.inFlight.set(P,_),_};return {ok:true,session:{layout:()=>De(a),layoutFor:De,validatedImageBytes(f){let P=w;return !P||f.resource.kind!=="ready"?null:P.drawingBundle.mintValidatedBytes(f.resource.validatedHandle,f.resource.contentId)?.slice()??null},dispose:$}}}exports.a=zr;exports.b=Fn;exports.c=Gt;exports.d=yr;exports.e=hr;exports.f=_o;exports.g=E;exports.h=ba;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs');function X(e){return e.kind!=="textValue"}function k(e,t){for(let l of e.children)if(X(l)&&l.localName===t)return l}function j(e,t){return e.attributes.find(l=>l.localName===t)?.value}function q(e){let t=k(e,"pPr"),l=t?k(t,"outlineLvl"):void 0;if(l){let i=j(l,"val");return i!==void 0&&/^[0-8]$/.test(i)?Number(i):null}let n=k(e,"name"),o=n?/^heading\s+([1-9])$/i.exec(j(n,"val")?.trim()??""):null;return o?Number(o[1])-1:null}function h(e,t=0,l=e.length,n){let o=new Set,i=new Map,d=new Map,a=n?[n]:[];n&&o.add(n);for(let s=t;s<l;s+=1){let r=e[s].node;if(chunkZOZI27AW_cjs.Af(r,"begin")){a.push(r.id);continue}if(chunkZOZI27AW_cjs.Af(r,"separate")){let u=a[a.length-1];u&&(o.add(u),i.set(r.id,u));continue}if(chunkZOZI27AW_cjs.Af(r,"end")){let u=a.pop();u&&(o.add(u),d.set(r.id,u));}}return {activeBegins:o,separateBegin:i,endBegin:d}}function b(e,t,l){if(chunkZOZI27AW_cjs.Af(l,"begin"))return t.activeBegins.has(l.id)&&e.push({beginId:l.id,separated:false}),true;if(chunkZOZI27AW_cjs.Af(l,"separate")){let n=t.separateBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&(o.separated=true),true}if(chunkZOZI27AW_cjs.Af(l,"end")){let n=t.endBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&e.pop(),true}return false}function g(e){for(let t of e)if(!t.separated)return false;return true}function Q(e,t){let l=[];chunkZOZI27AW_cjs.Mf(e,l,t);let n=h(l),o=[];return {consume:i=>b(o,n,i),visible:()=>g(o)}}function C(e,t){return e==="original"?t.hiddenInOriginal:e==="current"&&t.hiddenInCurrent}var L=4096,v=chunkZOZI27AW_cjs.Nf*16;function O(){return {out:[],runs:[],symbols:[],symbolDisplays:[],length:0}}function V(e,t,l,n){if(t.length===0||l===n)return;let o=e.runs[e.runs.length-1];if(o?.runId===t&&o.end===l){e.runs[e.runs.length-1]={runId:t,start:o.start,end:n};return}e.runs.push({runId:t,start:l,end:n});}function N(e,t,l,n){let o=chunkZOZI27AW_cjs.Lf(t);if(o.length>n.left)return false;if(n.left-=o.length,o.length>0){let i=e.length;chunkZOZI27AW_cjs.ib(t)&&(e.symbols.push(i),e.symbolDisplays.push(chunkZOZI27AW_cjs.Xj(t))),e.out.push(o),e.length+=o.length,V(e,l,i,e.length);}return true}function H(e,t){let l=e.length;t.text.length>0&&e.out.push(t.text),e.length+=t.text.length;for(let n of t.runs)V(e,n.runId,l+n.start,l+n.end);for(let n of t.symbols??[])e.symbols.push(l+n);for(let n of t.symbolDisplays??[])e.symbolDisplays.push(n);}function w(e){let t=e.out.join("");return e.symbols.length>0?{text:t,runs:e.runs,symbols:e.symbols,symbolDisplays:e.symbolDisplays}:{text:t,runs:e.runs}}var $=Object.freeze({text:"",runs:[]});function M(){return {text:chunkZOZI27AW_cjs.vf,runs:[]}}function z(e,t,l,n){let o=[];if(!chunkZOZI27AW_cjs.Mf(e,o,l))return null;let i=o.reverse(),d=O();for(;i.length>0;){let a=i.pop();if(!C(t,a)){if(chunkZOZI27AW_cjs.Df(a.node)){let s=[];if(!chunkZOZI27AW_cjs.Mf(a.node,s,l))return null;for(let r=s.length-1;r>=0;r-=1)i.push(s[r]);continue}if(!chunkZOZI27AW_cjs.Bf(a.node)&&!N(d,a.node,a.runId,n))return null}}return w(d)}function G(e,t,l,n,o){let i=O(),d=[],a=h(e);for(let s of e){let r=s.node;if(!b(d,a,r)&&!chunkZOZI27AW_cjs.Bf(r)&&g(d)&&!C(t,s)){if(chunkZOZI27AW_cjs.Df(r)){let u=o>=chunkZOZI27AW_cjs.Of?z(r,t,l,n):U(r,t,l,n,o+1);if(u===null)return null;H(i,u);continue}if(!N(i,r,s.runId,n))return null}}return w(i)}function U(e,t,l,n,o){let i=[];return chunkZOZI27AW_cjs.Mf(e,i,l)?G(i,t,l,n,o):null}function Y(e,t,l){let n=t.node;return e.owned.has(n.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),n.id===e.endId?true:(n.id===e.span.node.id||b(e.states,e.markers,n)||e.overflow||chunkZOZI27AW_cjs.Bf(n)||chunkZOZI27AW_cjs.Df(n)||!e.owned.has(n.id)||!g(e.states)||C(l,t)||N(e.result,n,t.runId,e.chars)||(e.overflow=true),false)}function le(e,t,l="allMarkup"){let n=new Map,o=new Map,i=new Map;for(let r of t)r.kind==="complex"?o.set(r.node.id,r):i.set(r.node.id,r);let d=[];chunkZOZI27AW_cjs.Mf(e,d);let a=new Map;for(let r=0;r<d.length;r+=1)a.set(d[r].node.id,r);let s=null;for(let r=0;r<d.length;r+=1){let u=d[r],y=i.get(u.node.id);if(y)if(s!==null&&!g(s.states))n.set(y.node.id,$);else {let f={left:L},I={left:v},m=U(y.node,l,f,I,0);n.set(y.node.id,m??M());}if(s===null){let f=o.get(u.node.id);if(!f)continue;let I=new Set(f.removeNodeIds),m=-1;for(let S=f.removeNodeIds.length-1;S>=0;S-=1){let x=a.get(f.removeNodeIds[S]);if(!(x===void 0||x<=r)&&chunkZOZI27AW_cjs.Af(d[x].node,"end")){m=x;break}}let P=d[m];if(!P){n.set(f.node.id,M());continue}s={span:f,owned:I,states:[{beginId:f.node.id,separated:false}],markers:h(d,r+1,m,f.node.id),endId:P.node.id,result:O(),chars:{left:v},nodesLeft:L,overflow:false};}Y(s,u,l)&&(n.set(s.span.node.id,s.overflow?M():w(s.result)),s=null);}return s!==null&&n.set(s.span.node.id,M()),n}exports.a=q;exports.b=Q;exports.c=L;exports.d=le;