@eigenpal/docx-editor-core 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/agent/index.js +1 -1
  2. package/dist/agent/index.mjs +1 -1
  3. package/dist/chunk-3GNIP6IX.mjs +4 -0
  4. package/dist/chunk-7UTXBQKF.mjs +1 -0
  5. package/dist/{chunk-CKXAHSJQ.js → chunk-AFMMYLPX.js} +2 -2
  6. package/dist/{chunk-J7ULKGU2.mjs → chunk-AGNZEOVL.mjs} +1 -1
  7. package/dist/chunk-BD4CYYFB.js +1 -0
  8. package/dist/{chunk-6ILFFGGS.js → chunk-C6GSFUV2.js} +1 -1
  9. package/dist/chunk-DN36K5JU.mjs +1 -0
  10. package/dist/{chunk-CWAP26GB.js → chunk-DV6IEOP5.js} +3 -3
  11. package/dist/{chunk-23CP3TOP.js → chunk-GH5N36F7.js} +1 -1
  12. package/dist/chunk-GNPLUGUG.mjs +1 -0
  13. package/dist/chunk-HVZMO3BU.js +1 -0
  14. package/dist/chunk-ITVXBQGR.mjs +1 -0
  15. package/dist/{chunk-S7IKPRC3.js → chunk-KSYEBTYE.js} +1 -1
  16. package/dist/{chunk-ZRZ2VRQQ.mjs → chunk-LDAOONXZ.mjs} +1 -1
  17. package/dist/{chunk-36VIYQHD.mjs → chunk-N3GIC2UI.mjs} +1 -1
  18. package/dist/{chunk-FC6QL3E6.js → chunk-NFYCMDM5.js} +1 -1
  19. package/dist/chunk-P3AXSRLG.mjs +1 -0
  20. package/dist/chunk-PK4PDRTA.js +1 -0
  21. package/dist/{chunk-VKTCTMIO.mjs → chunk-R7RR6M4A.mjs} +1 -1
  22. package/dist/{chunk-BGC7QKP5.mjs → chunk-RSMS6OTE.mjs} +1 -1
  23. package/dist/chunk-TZJUO3NW.js +1 -0
  24. package/dist/chunk-YE357WVA.js +1 -0
  25. package/dist/core-plugins.js +1 -1
  26. package/dist/core-plugins.mjs +1 -1
  27. package/dist/core.d.mts +1 -1
  28. package/dist/core.d.ts +1 -1
  29. package/dist/core.js +1 -1
  30. package/dist/core.mjs +1 -1
  31. package/dist/docx/index.js +1 -1
  32. package/dist/docx/index.mjs +1 -1
  33. package/dist/docx/parser.js +1 -1
  34. package/dist/docx/parser.mjs +1 -1
  35. package/dist/headless.js +1 -1
  36. package/dist/headless.mjs +1 -1
  37. package/dist/layout-bridge/index.d.mts +1 -1
  38. package/dist/layout-bridge/index.d.ts +1 -1
  39. package/dist/layout-bridge/index.js +1 -1
  40. package/dist/layout-bridge/index.mjs +1 -1
  41. package/dist/layout-bridge/measuring/index.d.mts +17 -1
  42. package/dist/layout-bridge/measuring/index.d.ts +17 -1
  43. package/dist/layout-bridge/measuring/index.js +1 -1
  44. package/dist/layout-bridge/measuring/index.mjs +1 -1
  45. package/dist/layout-bridge/tableInsertHover.js +1 -1
  46. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  47. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  48. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  49. package/dist/layout-engine/types.d.mts +8 -4
  50. package/dist/layout-engine/types.d.ts +8 -4
  51. package/dist/layout-painter/index.js +1 -1
  52. package/dist/layout-painter/index.mjs +1 -1
  53. package/dist/layout-painter/renderPage.d.mts +7 -0
  54. package/dist/layout-painter/renderPage.d.ts +7 -0
  55. package/dist/layout-painter/renderPage.js +1 -1
  56. package/dist/layout-painter/renderPage.mjs +1 -1
  57. package/dist/mcp-cli.mjs +15 -15
  58. package/dist/mcp.js +2 -2
  59. package/dist/mcp.mjs +1 -1
  60. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  61. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  62. package/dist/prosemirror/conversion/index.js +1 -1
  63. package/dist/prosemirror/conversion/index.mjs +1 -1
  64. package/dist/prosemirror/index.js +1 -1
  65. package/dist/prosemirror/index.mjs +1 -1
  66. package/package.json +1 -1
  67. package/dist/chunk-4AJYHCPB.js +0 -2
  68. package/dist/chunk-7GHQ4YCJ.mjs +0 -1
  69. package/dist/chunk-BWHUD2XC.mjs +0 -4
  70. package/dist/chunk-DY2MJCSV.js +0 -1
  71. package/dist/chunk-G6Y4UZMJ.mjs +0 -1
  72. package/dist/chunk-LMF2ELOB.js +0 -1
  73. package/dist/chunk-N27FJQTG.js +0 -1
  74. package/dist/chunk-UIROUI5I.mjs +0 -1
  75. package/dist/chunk-UOFQYE2L.mjs +0 -1
  76. package/dist/chunk-V7BKPX67.mjs +0 -2
  77. package/dist/chunk-Y7JZPBBW.js +0 -1
@@ -1 +0,0 @@
1
- 'use strict';var chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js');var Ze=1440,X=96,ue=Ze/X,le=11,ce="Calibri",Be=1,$e=.8,De=.2,O=null;function _(){if(!O){let e=typeof document<"u"?document.createElement("canvas"):null;if(!e)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(O=e.getContext("2d"),!O)throw new Error("Failed to get 2D context from canvas")}return O}function Ne(){O=null;}var se=new Map;function fe(e){let t=se.get(e);if(t===void 0){let n=chunkN3Y5BUKV_js.a(e);t={cssFallback:n.cssFallback,singleLineRatio:n.singleLineRatio},se.set(e,t);}return t}function Ue(e){return fe(e).cssFallback}function A(e){let t=[];e.italic&&t.push("italic"),e.bold&&t.push("bold");let n=e.fontSize??le,i=S(n);t.push(`${i}px`);let r=e.fontFamily??ce;return t.push(Ue(r)),t.join(" ")}function H(e){let t=e.fontSize??le,n=e.fontFamily??ce,i=S(t),r=i*$e,s=i*De,g=i*Be;try{let m=_();m.font=A(e);let d=m.measureText("Hg");typeof d.actualBoundingBoxAscent=="number"&&typeof d.actualBoundingBoxDescent=="number"&&(r=d.actualBoundingBoxAscent,s=d.actualBoundingBoxDescent);}catch{}g=Math.max(g,r+s);let f=fe(n).singleLineRatio;return {fontSize:t,ascent:r,descent:s,lineHeight:g,fontFamily:n,singleLineRatio:f}}function y(e,t){if(!e)return 0;let n=_();n.font=A(t);let r=n.measureText(e).width;return t.letterSpacing&&e.length>1&&(r+=t.letterSpacing*(e.length-1)),r}function Ye(e,t){let n=y(e,t),i=H(t);return {width:n,height:i.ascent+i.descent,ascent:i.ascent,descent:i.descent}}function j(e,t){let n=H(t);if(!e)return {width:0,charWidths:[],metrics:n};let i=_();i.font=A(t);let r=t.letterSpacing??0,s=[],g=0;for(let f=0;f<e.length;f++){let m=e[f],C=i.measureText(m).width;r&&f<e.length-1&&(C+=r),s.push(C),g+=C;}return {width:g,charWidths:s,metrics:n}}function Xe(e,t){if(t.length===0||e<=0)return 0;let n=0;for(let i=0;i<t.length;i++){let r=t[i],s=n+r/2;if(e<=s)return i;n+=r;}return t.length}function je(e,t){if(e<=0||t.length===0)return 0;let n=Math.min(e,t.length),i=0;for(let r=0;r<n;r++)i+=t[r];return i}function G(e){return e/ue}function Ge(e){return Math.round(e*ue)}function S(e){return e*X/72}function he(e){return e*72/X}function Ke(e){return S(e/2)}function qe(e){return he(e)*2}function Je(e,t){return e.map(n=>{let i=n.x-n.distLeft,r=n.x+n.width+n.distRight,s=n.y-n.distTop,g=n.y+n.height+n.distBottom,f=0,m=0,d,C=n.wrapText??"bothSides";return C==="right"?f=K(r):C==="left"?m=q(i,t):C==="largest"?{leftMargin:f,rightMargin:m}=tt(i,r,t):Ve(i,r,t)?d=et(i,r,t):n.side==="left"?f=K(r):m=q(i,t),{leftMargin:f,rightMargin:m,topY:s,bottomY:g,segments:d}})}function J(e,t){return e.segments?.reduce((i,r)=>i+r.availableWidth,0)??t-e.leftMargin-e.rightMargin}function Z(e,t,n,i){if(!n||n.length===0)return {leftMargin:0,rightMargin:0};let r=0,s=0,g,f=i+e,m=f+t;for(let d of n)if(!(m<=d.topY||f>=d.bottomY)){if(d.segments?.length){g=g?Qe(g,d.segments):d.segments;continue}r=Math.max(r,d.leftMargin),s=Math.max(s,d.rightMargin);}return {leftMargin:r,rightMargin:s,segments:g}}function Qe(e,t){let n=[];for(let i of e)for(let r of t){let s=Math.max(i.leftOffset,r.leftOffset),g=Math.min(i.leftOffset+i.availableWidth,r.leftOffset+r.availableWidth);g>s&&n.push({leftOffset:s,availableWidth:g-s});}return n}function Ve(e,t,n){return e>0&&t<n}function et(e,t,n){return [{leftOffset:0,availableWidth:Math.max(0,e)},{leftOffset:Math.max(0,t),availableWidth:Math.max(0,n-t)}].filter(i=>i.availableWidth>1)}function tt(e,t,n){let i=Math.max(0,e);return Math.max(0,n-t)>=i?{leftMargin:K(t),rightMargin:0}:{leftMargin:0,rightMargin:q(e,n)}}function K(e){return Math.max(0,e)}function q(e,t){return Math.max(0,t-e)}var L=11,I="Calibri",nt=1.15,$=1,W=.5;function it(e,t){if(t&&t.length>0)for(let i of t){let r=G(i.pos);if(r>e+.5)return Math.max(1,r-e)}let n=e%V;return Math.max(1,n<.5?V:V-n)}function ge(e,t,n,i=false){let r=1,s=e.length,g=0;for(;r<=s;){let f=r+s>>>1;y(e.slice(0,f),t)<=n?(g=f,r=f+1):s=f-1;}return i&&g===0?1:g}function B(e){return {fontFamily:e.fontFamily??I,fontSize:e.fontSize??L,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function de(e,t,n){let i=S(e),r=n?.ascent??i*.8,s=n?.descent??i*.2,g=n?.singleLineRatio??1.15,f=i*g,m;if(t?.lineRule==="exact"&&t.line!==void 0)m=t.line;else if(t?.lineRule==="atLeast"&&t.line!==void 0){let d=f*$;m=Math.max(t.line,d);}else t?.line!==void 0&&t?.lineUnit==="multiplier"?m=f*t.line:t?.line!==void 0&&t?.lineUnit==="px"?m=t.line:m=f*$;return {ascent:r,descent:s,lineHeight:m}}function me(e,t,n){let i=H({fontSize:e,fontFamily:n??I}),r=de(e,t,i),s=t?.lineRule??"auto";if(s==="auto"||s==="atLeast"){let g=S(e),f=Math.max(r.lineHeight,g*nt);if(f!==r.lineHeight)return {...r,lineHeight:f}}return r}function Q(e){return e.kind==="text"}function rt(e){return e.kind==="tab"}function at(e){return e.kind==="image"}function ot(e){return e.kind==="lineBreak"}function st(e){return e.kind==="field"}function ut(e){return !e.text||e.text.replace(/\u00a0/g," ").trim().length===0}function lt(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];(i===" "||i==="-"||i===" ")&&t.push(n+1);}return t}var V=48;function pe(e,t,n){let i=e.runs,r=e.attrs,s=r?.spacing,g=n?.floatingZones,f=n?.paragraphYOffset??0,m=r?.indent,d=m?.left??0,C=m?.right??0,We=(m?.firstLine??0)-(m?.hanging??0),te=Math.max(1,t-d-C),ke=Math.max(1,te-We),ne=0,He=S(L)*$,z=Z(0,He,g,f),Oe=Math.max(1,J(z,ke)),F=[];if(i.length===0){if(r?.suppressEmptyParagraphHeight)return F.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:F,totalHeight:0};let o=r?.defaultFontSize??L,u=r?.defaultFontFamily??I,c=me(o,s,u);F.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...c});let l=c.lineHeight;return s?.before&&(l+=s.before),s?.after&&(l+=s.after),{kind:"paragraph",lines:F,totalHeight:l}}if(i.length===1&&Q(i[0])&&ut(i[0])){let o=i[0],u=o.fontSize??r?.defaultFontSize??L,c=o.fontFamily??r?.defaultFontFamily??I,l=me(u,s,c);F.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...l});let h=l.lineHeight;return s?.before&&(h+=s.before),s?.after&&(h+=s.after),{kind:"paragraph",lines:F,totalHeight:h}}let a={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:L,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:Oe,leftOffset:z.leftMargin,rightOffset:z.rightMargin,segmentZones:z.segments},ie=()=>{let o=de(a.maxFontSize,s,a.maxFontMetrics),u={...o};if(a.maxImageHeightPx>u.lineHeight){let l=a.maxImageHeightPx,h=u.descent;u.lineHeight=l+h*2,u.ascent=l+h;}let c={fromRun:a.fromRun,fromChar:a.fromChar,toRun:a.toRun,toChar:a.toChar,width:a.width,...u};a.leftOffset>0&&(c.leftOffset=a.leftOffset),a.rightOffset>0&&(c.rightOffset=a.rightOffset),a.segmentZones?.length&&(c.segments=Ie(c,a.segmentZones)),F.push(c),ne+=o.lineHeight;},Ie=(o,u)=>{let c=u[0],l=u[1];if(!c)return;if(!l||o.width<=c.availableWidth+W)return [{fromRun:o.fromRun,fromChar:o.fromChar,toRun:o.toRun,toChar:o.toChar,width:o.width,leftOffset:c.leftOffset,availableWidth:c.availableWidth}];if(o.fromRun!==o.toRun)return;let h=i[o.fromRun];if(!h||!Q(h))return;let T=h,p=T.text.slice(o.fromChar,o.toChar),M=B(T),b=ge(p,M,c.availableWidth);if(b<=0||b>=p.length)return;let k=o.fromChar+b,x=p.slice(0,b),N=p.slice(b);return [{fromRun:o.fromRun,fromChar:o.fromChar,toRun:o.toRun,toChar:k,width:y(x,M),leftOffset:c.leftOffset,availableWidth:c.availableWidth},{fromRun:o.fromRun,fromChar:k,toRun:o.toRun,toChar:o.toChar,width:y(N,M),leftOffset:l.leftOffset,availableWidth:l.availableWidth}]},R=(o,u)=>{ie();let c=S(L)*$,l=Z(ne,c,g,f),h=Math.max(1,J(l,te));a={fromRun:o,fromChar:u,toRun:o,toChar:u,width:0,maxFontSize:L,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:h,leftOffset:l.leftMargin,rightOffset:l.rightMargin,segmentZones:l.segments};},E=o=>{let u=o.fontSize??L;(!a.maxFontMetrics||u>a.maxFontSize)&&(a.maxFontSize=u,a.maxFontMetrics=H(o));};for(let o=0;o<i.length;o++){let u=i[o];if(ot(u)){a.toRun=o,a.toChar=0,R(o+1,0);continue}if(rt(u)){let c=B(u);E(c);let l=r?.tabs,h=a.width+(a.leftOffset??0),T=it(h,l);a.width+T>a.availableWidth+W&&(R(o,0),E(c)),a.width+=T,a.toRun=o,a.toChar=1;continue}if(at(u)){let c=u.wrapType,l=u.displayMode==="float"||chunkJFZIXFRC_js.c(c);if(u.position&&l){a.toRun=o,a.toChar=1;continue}if(c==="topAndBottom"||u.displayMode==="block"){a.width>0&&R(o,0);let p=u.height,M=u.distTop??6,b=u.distBottom??6;a.toRun=o,a.toChar=1,a.maxImageHeightPx=p+M+b,R(o+1,0);continue}let h=u.width,T=u.height;T>a.maxImageHeightPx&&(a.maxImageHeightPx=T),a.width+h>a.availableWidth+W&&R(o,0),a.width+=h,a.toRun=o,a.toChar=1;continue}if(st(u)){let c=u.fallback||"1",l={fontFamily:u.fontFamily??I,fontSize:u.fontSize??L,bold:u.bold,italic:u.italic};E(l);let h=y(c,l);a.width>0&&a.width+h>a.availableWidth+W&&(R(o,0),E(l)),a.width+=h,a.toRun=o,a.toChar=1;continue}if(Q(u)){let c=u,l=c.text,h=B(c);if(E(h),!l||l.length===0){a.toRun=o,a.toChar=0;continue}let T=lt(l),p=0;for(;p<l.length;){let M=l.length;for(let x of T)if(x>p){M=x;break}let b=l.slice(p,M),k=y(b,h);if(k>a.availableWidth+W){let x=0;for(;x<b.length;){let N=a.availableWidth-a.width+W,ze=b.slice(x),U=ge(ze,h,N);if(U===0){if(a.width>0){R(o,p+x),E(h);continue}U=1;}let Y=x+U,_e=b.slice(x,Y),Ae=y(_e,h);a.width+=Ae,a.toRun=o,a.toChar=p+Y,x=Y,x<b.length&&(R(o,p+x),E(h));}p=M;continue}a.width>0&&a.width+k>a.availableWidth+W&&(R(o,p),E(h)),a.width+=k,a.toRun=o,a.toChar=M,p=M;}}}ie();let re=F.reduce((o,u)=>o+u.lineHeight,0);r?.listMarker&&!r?.listMarkerHidden&&(m?.hanging??0)===0&&F.length>0&&(re+=F[0].lineHeight);let D=re;return s?.before&&(D+=s.before),s?.after&&(D+=s.after),{kind:"paragraph",lines:F,totalHeight:D}}function ct(e,t){return e.map(n=>pe(n,t))}function ft(e){let t=B(e);return j(e.text,t).charWidths}var be=2e4,P=new Map;function xe(e,t,n){return `${e}|${t}|${n||0}`}function Fe(){for(;P.size>be;){let e=P.keys().next().value;if(e===void 0)break;P.delete(e);}}function ht(e,t,n=0){let i=xe(e,t,n),r=P.get(i);if(r!==void 0)return P.delete(i),P.set(i,r),r.width}function gt(e,t,n,i){let r=xe(e,t,n);P.set(r,{width:i}),Fe();}function Me(){P.clear();}function mt(e){!Number.isFinite(e)||e<=0||(be=e,Fe());}function Te(){return P.size}var dt=1e3,Ce=dt,w=new Map;function Re(e,t,n=false,i=false){return `${e}|${t}|${n}|${i}`}function ye(){for(;w.size>Ce;){let e=w.keys().next().value;if(e===void 0)break;w.delete(e);}}function pt(e,t,n=false,i=false){let r=Re(e,t,n,i),s=w.get(r);if(s!==void 0)return w.delete(r),w.set(r,s),s}function bt(e,t,n,i,r){let s=Re(e,t,n,i);w.set(s,r),ye();}function Se(){w.clear();}function xt(e){!Number.isFinite(e)||e<=0||(Ce=e,ye());}function Le(){return w.size}var Ft=5e3,Pe=Ft,v=new Map;function ee(e){let t=[];for(let i of e.runs)i.kind==="text"?t.push(`t:${i.text}|${i.fontFamily}|${i.fontSize}|${i.bold}|${i.italic}`):i.kind==="tab"?t.push(`tab:${i.width}`):i.kind==="image"?t.push(`img:${i.width}x${i.height}`):i.kind==="lineBreak"&&t.push("br");let n=e.attrs;if(n){n.alignment&&t.push(`align:${n.alignment}`),n.indent&&t.push(`indent:${n.indent.left}|${n.indent.right}|${n.indent.firstLine}|${n.indent.hanging}`),n.spacing&&t.push(`spacing:${n.spacing.before}|${n.spacing.after}|${n.spacing.line}|${n.spacing.lineRule}`),n.defaultFontSize!=null&&t.push(`dfs:${n.defaultFontSize}`),n.defaultFontFamily!=null&&t.push(`dff:${n.defaultFontFamily}`);let i=n.borders;if(i){let r=s=>s?`${s.width??""},${s.style??""},${s.color??""}`:"";t.push(`bdr:${r(i.top)}|${r(i.bottom)}|${r(i.left)}|${r(i.right)}`);}n.suppressEmptyParagraphHeight&&t.push("sup");}return t.join("||")}function we(){for(;v.size>Pe;){let e=v.keys().next().value;if(e===void 0)break;v.delete(e);}}function Mt(e,t){let n=ee(e),i=v.get(n);if(i!==void 0&&i.maxWidth===t)return v.delete(n),v.set(n,i),i.measure}function Tt(e,t,n){let i=ee(e);v.set(i,{measure:n,maxWidth:t}),we();}function ve(){v.clear();}function Ct(e){!Number.isFinite(e)||e<=0||(Pe=e,we());}function Ee(){return v.size}function Rt(){Me(),Se(),ve();}function yt(){return Te()+Le()+Ee()}exports.A=bt;exports.B=Se;exports.C=xt;exports.D=Le;exports.E=ee;exports.F=Mt;exports.G=Tt;exports.H=ve;exports.I=Ct;exports.J=Ee;exports.K=Rt;exports.L=yt;exports.a=_;exports.b=Ne;exports.c=A;exports.d=H;exports.e=y;exports.f=Ye;exports.g=j;exports.h=Xe;exports.i=je;exports.j=G;exports.k=Ge;exports.l=S;exports.m=he;exports.n=Ke;exports.o=qe;exports.p=Je;exports.q=Z;exports.r=pe;exports.s=ct;exports.t=ft;exports.u=ht;exports.v=gt;exports.w=Me;exports.x=mt;exports.y=Te;exports.z=pt;
@@ -1 +0,0 @@
1
- import {c}from'./chunk-QPFJJPIC.mjs';import {a}from'./chunk-AMENZY5F.mjs';var Ze=1440,X=96,ue=Ze/X,le=11,ce="Calibri",Be=1,$e=.8,De=.2,O=null;function _(){if(!O){let e=typeof document<"u"?document.createElement("canvas"):null;if(!e)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(O=e.getContext("2d"),!O)throw new Error("Failed to get 2D context from canvas")}return O}function Ne(){O=null;}var se=new Map;function fe(e){let t=se.get(e);if(t===void 0){let n=a(e);t={cssFallback:n.cssFallback,singleLineRatio:n.singleLineRatio},se.set(e,t);}return t}function Ue(e){return fe(e).cssFallback}function A(e){let t=[];e.italic&&t.push("italic"),e.bold&&t.push("bold");let n=e.fontSize??le,i=S(n);t.push(`${i}px`);let r=e.fontFamily??ce;return t.push(Ue(r)),t.join(" ")}function H(e){let t=e.fontSize??le,n=e.fontFamily??ce,i=S(t),r=i*$e,s=i*De,g=i*Be;try{let m=_();m.font=A(e);let d=m.measureText("Hg");typeof d.actualBoundingBoxAscent=="number"&&typeof d.actualBoundingBoxDescent=="number"&&(r=d.actualBoundingBoxAscent,s=d.actualBoundingBoxDescent);}catch{}g=Math.max(g,r+s);let f=fe(n).singleLineRatio;return {fontSize:t,ascent:r,descent:s,lineHeight:g,fontFamily:n,singleLineRatio:f}}function y(e,t){if(!e)return 0;let n=_();n.font=A(t);let r=n.measureText(e).width;return t.letterSpacing&&e.length>1&&(r+=t.letterSpacing*(e.length-1)),r}function Ye(e,t){let n=y(e,t),i=H(t);return {width:n,height:i.ascent+i.descent,ascent:i.ascent,descent:i.descent}}function j(e,t){let n=H(t);if(!e)return {width:0,charWidths:[],metrics:n};let i=_();i.font=A(t);let r=t.letterSpacing??0,s=[],g=0;for(let f=0;f<e.length;f++){let m=e[f],C=i.measureText(m).width;r&&f<e.length-1&&(C+=r),s.push(C),g+=C;}return {width:g,charWidths:s,metrics:n}}function Xe(e,t){if(t.length===0||e<=0)return 0;let n=0;for(let i=0;i<t.length;i++){let r=t[i],s=n+r/2;if(e<=s)return i;n+=r;}return t.length}function je(e,t){if(e<=0||t.length===0)return 0;let n=Math.min(e,t.length),i=0;for(let r=0;r<n;r++)i+=t[r];return i}function G(e){return e/ue}function Ge(e){return Math.round(e*ue)}function S(e){return e*X/72}function he(e){return e*72/X}function Ke(e){return S(e/2)}function qe(e){return he(e)*2}function Je(e,t){return e.map(n=>{let i=n.x-n.distLeft,r=n.x+n.width+n.distRight,s=n.y-n.distTop,g=n.y+n.height+n.distBottom,f=0,m=0,d,C=n.wrapText??"bothSides";return C==="right"?f=K(r):C==="left"?m=q(i,t):C==="largest"?{leftMargin:f,rightMargin:m}=tt(i,r,t):Ve(i,r,t)?d=et(i,r,t):n.side==="left"?f=K(r):m=q(i,t),{leftMargin:f,rightMargin:m,topY:s,bottomY:g,segments:d}})}function J(e,t){return e.segments?.reduce((i,r)=>i+r.availableWidth,0)??t-e.leftMargin-e.rightMargin}function Z(e,t,n,i){if(!n||n.length===0)return {leftMargin:0,rightMargin:0};let r=0,s=0,g,f=i+e,m=f+t;for(let d of n)if(!(m<=d.topY||f>=d.bottomY)){if(d.segments?.length){g=g?Qe(g,d.segments):d.segments;continue}r=Math.max(r,d.leftMargin),s=Math.max(s,d.rightMargin);}return {leftMargin:r,rightMargin:s,segments:g}}function Qe(e,t){let n=[];for(let i of e)for(let r of t){let s=Math.max(i.leftOffset,r.leftOffset),g=Math.min(i.leftOffset+i.availableWidth,r.leftOffset+r.availableWidth);g>s&&n.push({leftOffset:s,availableWidth:g-s});}return n}function Ve(e,t,n){return e>0&&t<n}function et(e,t,n){return [{leftOffset:0,availableWidth:Math.max(0,e)},{leftOffset:Math.max(0,t),availableWidth:Math.max(0,n-t)}].filter(i=>i.availableWidth>1)}function tt(e,t,n){let i=Math.max(0,e);return Math.max(0,n-t)>=i?{leftMargin:K(t),rightMargin:0}:{leftMargin:0,rightMargin:q(e,n)}}function K(e){return Math.max(0,e)}function q(e,t){return Math.max(0,t-e)}var L=11,I="Calibri",nt=1.15,$=1,W=.5;function it(e,t){if(t&&t.length>0)for(let i of t){let r=G(i.pos);if(r>e+.5)return Math.max(1,r-e)}let n=e%V;return Math.max(1,n<.5?V:V-n)}function ge(e,t,n,i=false){let r=1,s=e.length,g=0;for(;r<=s;){let f=r+s>>>1;y(e.slice(0,f),t)<=n?(g=f,r=f+1):s=f-1;}return i&&g===0?1:g}function B(e){return {fontFamily:e.fontFamily??I,fontSize:e.fontSize??L,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function de(e,t,n){let i=S(e),r=n?.ascent??i*.8,s=n?.descent??i*.2,g=n?.singleLineRatio??1.15,f=i*g,m;if(t?.lineRule==="exact"&&t.line!==void 0)m=t.line;else if(t?.lineRule==="atLeast"&&t.line!==void 0){let d=f*$;m=Math.max(t.line,d);}else t?.line!==void 0&&t?.lineUnit==="multiplier"?m=f*t.line:t?.line!==void 0&&t?.lineUnit==="px"?m=t.line:m=f*$;return {ascent:r,descent:s,lineHeight:m}}function me(e,t,n){let i=H({fontSize:e,fontFamily:n??I}),r=de(e,t,i),s=t?.lineRule??"auto";if(s==="auto"||s==="atLeast"){let g=S(e),f=Math.max(r.lineHeight,g*nt);if(f!==r.lineHeight)return {...r,lineHeight:f}}return r}function Q(e){return e.kind==="text"}function rt(e){return e.kind==="tab"}function at(e){return e.kind==="image"}function ot(e){return e.kind==="lineBreak"}function st(e){return e.kind==="field"}function ut(e){return !e.text||e.text.replace(/\u00a0/g," ").trim().length===0}function lt(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];(i===" "||i==="-"||i===" ")&&t.push(n+1);}return t}var V=48;function pe(e,t,n){let i=e.runs,r=e.attrs,s=r?.spacing,g=n?.floatingZones,f=n?.paragraphYOffset??0,m=r?.indent,d=m?.left??0,C=m?.right??0,We=(m?.firstLine??0)-(m?.hanging??0),te=Math.max(1,t-d-C),ke=Math.max(1,te-We),ne=0,He=S(L)*$,z=Z(0,He,g,f),Oe=Math.max(1,J(z,ke)),F=[];if(i.length===0){if(r?.suppressEmptyParagraphHeight)return F.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:F,totalHeight:0};let o=r?.defaultFontSize??L,u=r?.defaultFontFamily??I,c=me(o,s,u);F.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...c});let l=c.lineHeight;return s?.before&&(l+=s.before),s?.after&&(l+=s.after),{kind:"paragraph",lines:F,totalHeight:l}}if(i.length===1&&Q(i[0])&&ut(i[0])){let o=i[0],u=o.fontSize??r?.defaultFontSize??L,c=o.fontFamily??r?.defaultFontFamily??I,l=me(u,s,c);F.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...l});let h=l.lineHeight;return s?.before&&(h+=s.before),s?.after&&(h+=s.after),{kind:"paragraph",lines:F,totalHeight:h}}let a={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:L,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:Oe,leftOffset:z.leftMargin,rightOffset:z.rightMargin,segmentZones:z.segments},ie=()=>{let o=de(a.maxFontSize,s,a.maxFontMetrics),u={...o};if(a.maxImageHeightPx>u.lineHeight){let l=a.maxImageHeightPx,h=u.descent;u.lineHeight=l+h*2,u.ascent=l+h;}let c={fromRun:a.fromRun,fromChar:a.fromChar,toRun:a.toRun,toChar:a.toChar,width:a.width,...u};a.leftOffset>0&&(c.leftOffset=a.leftOffset),a.rightOffset>0&&(c.rightOffset=a.rightOffset),a.segmentZones?.length&&(c.segments=Ie(c,a.segmentZones)),F.push(c),ne+=o.lineHeight;},Ie=(o,u)=>{let c=u[0],l=u[1];if(!c)return;if(!l||o.width<=c.availableWidth+W)return [{fromRun:o.fromRun,fromChar:o.fromChar,toRun:o.toRun,toChar:o.toChar,width:o.width,leftOffset:c.leftOffset,availableWidth:c.availableWidth}];if(o.fromRun!==o.toRun)return;let h=i[o.fromRun];if(!h||!Q(h))return;let T=h,p=T.text.slice(o.fromChar,o.toChar),M=B(T),b=ge(p,M,c.availableWidth);if(b<=0||b>=p.length)return;let k=o.fromChar+b,x=p.slice(0,b),N=p.slice(b);return [{fromRun:o.fromRun,fromChar:o.fromChar,toRun:o.toRun,toChar:k,width:y(x,M),leftOffset:c.leftOffset,availableWidth:c.availableWidth},{fromRun:o.fromRun,fromChar:k,toRun:o.toRun,toChar:o.toChar,width:y(N,M),leftOffset:l.leftOffset,availableWidth:l.availableWidth}]},R=(o,u)=>{ie();let c=S(L)*$,l=Z(ne,c,g,f),h=Math.max(1,J(l,te));a={fromRun:o,fromChar:u,toRun:o,toChar:u,width:0,maxFontSize:L,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:h,leftOffset:l.leftMargin,rightOffset:l.rightMargin,segmentZones:l.segments};},E=o=>{let u=o.fontSize??L;(!a.maxFontMetrics||u>a.maxFontSize)&&(a.maxFontSize=u,a.maxFontMetrics=H(o));};for(let o=0;o<i.length;o++){let u=i[o];if(ot(u)){a.toRun=o,a.toChar=0,R(o+1,0);continue}if(rt(u)){let c=B(u);E(c);let l=r?.tabs,h=a.width+(a.leftOffset??0),T=it(h,l);a.width+T>a.availableWidth+W&&(R(o,0),E(c)),a.width+=T,a.toRun=o,a.toChar=1;continue}if(at(u)){let c$1=u.wrapType,l=u.displayMode==="float"||c(c$1);if(u.position&&l){a.toRun=o,a.toChar=1;continue}if(c$1==="topAndBottom"||u.displayMode==="block"){a.width>0&&R(o,0);let p=u.height,M=u.distTop??6,b=u.distBottom??6;a.toRun=o,a.toChar=1,a.maxImageHeightPx=p+M+b,R(o+1,0);continue}let h=u.width,T=u.height;T>a.maxImageHeightPx&&(a.maxImageHeightPx=T),a.width+h>a.availableWidth+W&&R(o,0),a.width+=h,a.toRun=o,a.toChar=1;continue}if(st(u)){let c=u.fallback||"1",l={fontFamily:u.fontFamily??I,fontSize:u.fontSize??L,bold:u.bold,italic:u.italic};E(l);let h=y(c,l);a.width>0&&a.width+h>a.availableWidth+W&&(R(o,0),E(l)),a.width+=h,a.toRun=o,a.toChar=1;continue}if(Q(u)){let c=u,l=c.text,h=B(c);if(E(h),!l||l.length===0){a.toRun=o,a.toChar=0;continue}let T=lt(l),p=0;for(;p<l.length;){let M=l.length;for(let x of T)if(x>p){M=x;break}let b=l.slice(p,M),k=y(b,h);if(k>a.availableWidth+W){let x=0;for(;x<b.length;){let N=a.availableWidth-a.width+W,ze=b.slice(x),U=ge(ze,h,N);if(U===0){if(a.width>0){R(o,p+x),E(h);continue}U=1;}let Y=x+U,_e=b.slice(x,Y),Ae=y(_e,h);a.width+=Ae,a.toRun=o,a.toChar=p+Y,x=Y,x<b.length&&(R(o,p+x),E(h));}p=M;continue}a.width>0&&a.width+k>a.availableWidth+W&&(R(o,p),E(h)),a.width+=k,a.toRun=o,a.toChar=M,p=M;}}}ie();let re=F.reduce((o,u)=>o+u.lineHeight,0);r?.listMarker&&!r?.listMarkerHidden&&(m?.hanging??0)===0&&F.length>0&&(re+=F[0].lineHeight);let D=re;return s?.before&&(D+=s.before),s?.after&&(D+=s.after),{kind:"paragraph",lines:F,totalHeight:D}}function ct(e,t){return e.map(n=>pe(n,t))}function ft(e){let t=B(e);return j(e.text,t).charWidths}var be=2e4,P=new Map;function xe(e,t,n){return `${e}|${t}|${n||0}`}function Fe(){for(;P.size>be;){let e=P.keys().next().value;if(e===void 0)break;P.delete(e);}}function ht(e,t,n=0){let i=xe(e,t,n),r=P.get(i);if(r!==void 0)return P.delete(i),P.set(i,r),r.width}function gt(e,t,n,i){let r=xe(e,t,n);P.set(r,{width:i}),Fe();}function Me(){P.clear();}function mt(e){!Number.isFinite(e)||e<=0||(be=e,Fe());}function Te(){return P.size}var dt=1e3,Ce=dt,w=new Map;function Re(e,t,n=false,i=false){return `${e}|${t}|${n}|${i}`}function ye(){for(;w.size>Ce;){let e=w.keys().next().value;if(e===void 0)break;w.delete(e);}}function pt(e,t,n=false,i=false){let r=Re(e,t,n,i),s=w.get(r);if(s!==void 0)return w.delete(r),w.set(r,s),s}function bt(e,t,n,i,r){let s=Re(e,t,n,i);w.set(s,r),ye();}function Se(){w.clear();}function xt(e){!Number.isFinite(e)||e<=0||(Ce=e,ye());}function Le(){return w.size}var Ft=5e3,Pe=Ft,v=new Map;function ee(e){let t=[];for(let i of e.runs)i.kind==="text"?t.push(`t:${i.text}|${i.fontFamily}|${i.fontSize}|${i.bold}|${i.italic}`):i.kind==="tab"?t.push(`tab:${i.width}`):i.kind==="image"?t.push(`img:${i.width}x${i.height}`):i.kind==="lineBreak"&&t.push("br");let n=e.attrs;if(n){n.alignment&&t.push(`align:${n.alignment}`),n.indent&&t.push(`indent:${n.indent.left}|${n.indent.right}|${n.indent.firstLine}|${n.indent.hanging}`),n.spacing&&t.push(`spacing:${n.spacing.before}|${n.spacing.after}|${n.spacing.line}|${n.spacing.lineRule}`),n.defaultFontSize!=null&&t.push(`dfs:${n.defaultFontSize}`),n.defaultFontFamily!=null&&t.push(`dff:${n.defaultFontFamily}`);let i=n.borders;if(i){let r=s=>s?`${s.width??""},${s.style??""},${s.color??""}`:"";t.push(`bdr:${r(i.top)}|${r(i.bottom)}|${r(i.left)}|${r(i.right)}`);}n.suppressEmptyParagraphHeight&&t.push("sup");}return t.join("||")}function we(){for(;v.size>Pe;){let e=v.keys().next().value;if(e===void 0)break;v.delete(e);}}function Mt(e,t){let n=ee(e),i=v.get(n);if(i!==void 0&&i.maxWidth===t)return v.delete(n),v.set(n,i),i.measure}function Tt(e,t,n){let i=ee(e);v.set(i,{measure:n,maxWidth:t}),we();}function ve(){v.clear();}function Ct(e){!Number.isFinite(e)||e<=0||(Pe=e,we());}function Ee(){return v.size}function Rt(){Me(),Se(),ve();}function yt(){return Te()+Le()+Ee()}export{bt as A,Se as B,xt as C,Le as D,ee as E,Mt as F,Tt as G,ve as H,Ct as I,Ee as J,Rt as K,yt as L,_ as a,Ne as b,A as c,H as d,y as e,Ye as f,j as g,Xe as h,je as i,G as j,Ge as k,S as l,he as m,Ke as n,qe as o,Je as p,Z as q,pe as r,ct as s,ft as t,ht as u,gt as v,Me as w,mt as x,Te as y,pt as z};
@@ -1 +0,0 @@
1
- 'use strict';var chunkD4RPOJC7_js=require('./chunk-D4RPOJC7.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function k(t){let e=new Map,n=new Map;return t.descendants(i=>{let o=i.marks.find(r=>r.type.name==="insertion"),a=i.marks.find(r=>r.type.name==="deletion");if(o){let r=Number(o.attrs.revisionId);Number.isFinite(r)&&e.set(r,(e.get(r)??0)+1);}if(a){let r=Number(a.attrs.revisionId);Number.isFinite(r)&&n.set(r,(n.get(r)??0)+1);}}),{insertionById:e,deletionById:n}}function A(t){return t.attrs.href||""}function B(t){let e=t.filter(n=>n.type.name!=="hyperlink");return e.length===0?"":e.map(n=>`${n.type.name}:${JSON.stringify(n.attrs)}`).sort().join("|")}function T(t){let e={};for(let n of t)switch(n.type.name){case "bold":e.bold=true,e.boldCs=true;break;case "italic":e.italic=true,e.italicCs=true;break;case "underline":{let i=n.attrs;e.underline={style:i.style||"single",color:i.color};break}case "strike":n.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":{let i=n.attrs;e.color={rgb:i.rgb,themeColor:i.themeColor,themeTint:i.themeTint,themeShade:i.themeShade};break}case "highlight":e.highlight=n.attrs.color;break;case "fontSize":e.fontSize=n.attrs.size,e.fontSizeCs=n.attrs.size;break;case "fontFamily":{let i=n.attrs;e.fontFamily={ascii:i.ascii,hAnsi:i.hAnsi,eastAsia:i.eastAsia||void 0,cs:i.cs||i.ascii||void 0,asciiTheme:i.asciiTheme,hAnsiTheme:i.hAnsiTheme||void 0,eastAsiaTheme:i.eastAsiaTheme||void 0,csTheme:i.csTheme||void 0};break}case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break;case "allCaps":e.allCaps=true;break;case "smallCaps":e.smallCaps=true;break;case "characterSpacing":{n.attrs.spacing!=null&&(e.spacing=n.attrs.spacing),n.attrs.position!=null&&(e.position=n.attrs.position),n.attrs.scale!=null&&(e.scale=n.attrs.scale),n.attrs.kerning!=null&&(e.kerning=n.attrs.kerning);break}case "emboss":e.emboss=true;break;case "imprint":e.imprint=true;break;case "textShadow":e.shadow=true;break;case "emphasisMark":e.emphasisMark=n.attrs.type||"dot";break;case "textOutline":e.outline=true;break;case "hidden":e.hidden=true;break;case "rtl":e.rtl=true;break;case "textEffect":e.effect=n.attrs.effect||"blinkBackground";break}return e}function N(t){let e=t.attrs.href;return e?.startsWith("#")?{type:"hyperlink",anchor:e.substring(1),tooltip:t.attrs.tooltip||void 0,children:[]}:{type:"hyperlink",href:e,tooltip:t.attrs.tooltip||void 0,rId:t.attrs.rId||void 0,children:[]}}function x(t,e){if(e.isText&&e.text){let n=e.marks.filter(o=>o.type.name!=="hyperlink"),i=C(e.text,n);t.children.push(i);}}function C(t,e){let n=T(e),i={type:"text",text:t};return {type:"run",formatting:Object.keys(n).length>0?n:void 0,content:[i]}}function E(t,e){let n=t.content[t.content.length-1];n&&n.type==="text"?n.text+=e:t.content.push({type:"text",text:e});}function L(){return {type:"run",content:[{type:"break",breakType:"textWrapping"}]}}function H(){return {type:"run",content:[{type:"tab"}]}}function O(t,e){let n=t.attrs,i=e&&e.length>0?T(e):void 0,o=n.displayText||"";if(!o)switch(n.fieldType){case "PAGE":o="1";break;case "NUMPAGES":o="1";break;default:o=" ";break}let a={type:"run",content:[{type:"text",text:o}],...i&&Object.keys(i).length>0?{formatting:i}:{}};return n.fieldKind==="complex"?{type:"complexField",instruction:n.instruction,fieldType:n.fieldType,fieldCode:[],fieldResult:[a],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}:{type:"simpleField",instruction:n.instruction,fieldType:n.fieldType,content:[a],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}}function W(t){let e=t.attrs;return {type:"mathEquation",display:e.display||"inline",ommlXml:e.ommlXml,plainText:e.plainText||void 0}}function D(t){let e=t.attrs,i={type:e.wrapType||"inline"};e.distTop!==void 0&&(i.distT=chunk4Q2IP5FW_js.f(e.distTop)),e.distBottom!==void 0&&(i.distB=chunk4Q2IP5FW_js.f(e.distBottom)),e.distLeft!==void 0&&(i.distL=chunk4Q2IP5FW_js.f(e.distLeft)),e.distRight!==void 0&&(i.distR=chunk4Q2IP5FW_js.f(e.distRight)),e.wrapText&&(i.wrapText=e.wrapText);let o={type:"image",rId:e.rId||"",src:e.src,alt:e.alt||void 0,title:e.title||void 0,size:{width:chunk4Q2IP5FW_js.f(e.width||0),height:chunk4Q2IP5FW_js.f(e.height||0)},wrap:i};if(e.transform){let r=e.transform,l={},s=r.match(/rotate\(([-\d.]+)deg\)/);s&&(l.rotation=parseFloat(s[1])),r.includes("scaleX(-1)")&&(l.flipH=true),r.includes("scaleY(-1)")&&(l.flipV=true),(l.rotation||l.flipH||l.flipV)&&(o.transform=l);}if(e.position?.horizontal&&e.position?.vertical){let r=e.position;o.position={horizontal:{relativeTo:r.horizontal.relativeTo||"column",alignment:r.horizontal.align,posOffset:r.horizontal.posOffset},vertical:{relativeTo:r.vertical.relativeTo||"paragraph",alignment:r.vertical.align,posOffset:r.vertical.posOffset}};}if(e.borderWidth&&e.borderWidth>0){let r={solid:"solid",dotted:"dot",dashed:"dash",double:"solid",groove:"solid",ridge:"solid",inset:"solid",outset:"solid"};o.outline={width:chunk4Q2IP5FW_js.f(e.borderWidth),color:e.borderColor?{rgb:e.borderColor.replace("#","")}:void 0,style:e.borderStyle&&r[e.borderStyle]||"solid"};}if(e.hlinkHref&&(o.hlinkHref=e.hlinkHref),e.cropTop!==void 0||e.cropRight!==void 0||e.cropBottom!==void 0||e.cropLeft!==void 0){let r={};e.cropTop!==void 0&&e.cropTop!==null&&(r.top=e.cropTop),e.cropRight!==void 0&&e.cropRight!==null&&(r.right=e.cropRight),e.cropBottom!==void 0&&e.cropBottom!==null&&(r.bottom=e.cropBottom),e.cropLeft!==void 0&&e.cropLeft!==null&&(r.left=e.cropLeft),Object.keys(r).length>0&&(o.crop=r);}if(e.opacity!==void 0&&e.opacity!==null&&e.opacity<1&&(o.opacity=e.opacity),e.layoutInCell!==void 0&&e.layoutInCell!==null&&(o.layoutInCell=e.layoutInCell),e.allowOverlap!==void 0&&e.allowOverlap!==null&&(o.allowOverlap=e.allowOverlap),e.effectExtentTop||e.effectExtentBottom||e.effectExtentLeft||e.effectExtentRight){let r={};e.effectExtentTop&&(r.top=chunk4Q2IP5FW_js.f(e.effectExtentTop)),e.effectExtentBottom&&(r.bottom=chunk4Q2IP5FW_js.f(e.effectExtentBottom)),e.effectExtentLeft&&(r.left=chunk4Q2IP5FW_js.f(e.effectExtentLeft)),e.effectExtentRight&&(r.right=chunk4Q2IP5FW_js.f(e.effectExtentRight)),Object.keys(r).length>0&&(o.padding=r);}return {type:"run",content:[{type:"drawing",image:o}]}}function j(t){let e=t.attrs,n={type:"shape",shapeType:e.shapeType||"rect",id:e.shapeId||void 0,size:{width:e.width?chunk4Q2IP5FW_js.f(e.width):0,height:e.height?chunk4Q2IP5FW_js.f(e.height):0}};if(e.fillType==="gradient"&&e.gradientStops)try{let o=JSON.parse(e.gradientStops);n.fill={type:"gradient",gradient:{type:e.gradientType||"linear",angle:e.gradientAngle||void 0,stops:o.map(a=>({position:a.position,color:{rgb:a.color.replace("#","")}}))}};}catch{n.fill={type:"solid",color:{rgb:(e.fillColor||"000000").replace("#","")}};}else e.fillColor?n.fill={type:e.fillType||"solid",color:{rgb:e.fillColor.replace("#","")}}:e.fillType==="none"&&(n.fill={type:"none"});if(e.outlineWidth&&e.outlineWidth>0){let o={solid:"solid",dotted:"dot",dashed:"dash"};n.outline={width:chunk4Q2IP5FW_js.f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&o[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:n}]}}function b(t,e){let n=t.attrs,i=J(z(t,e),t),o=n.bookmarks;if(o&&o.length>0){let r=o.map(s=>({type:"bookmarkStart",id:s.id,name:s.name})),l=o.map(s=>({type:"bookmarkEnd",id:s.id}));i=[...r,...i,...l];}let a={type:"paragraph",paraId:n.paraId||void 0,textId:n.textId||void 0,formatting:q(n),content:i};return n.renderedPageBreakBefore&&(a.renderedPageBreakBefore=true),n._sectionProperties?a.sectionProperties=n._sectionProperties:n.sectionBreakType&&(a.sectionProperties={sectionStart:n.sectionBreakType}),a}function J(t,e){let n=new Set;if(e.forEach(r=>{for(let l of r.marks)l.type.name==="comment"&&n.add(l.attrs.commentId);}),n.size===0)return t;let i=[],o=new Set,a=0;e.forEach(r=>{let l=new Set;for(let s of r.marks)s.type.name==="comment"&&l.add(s.attrs.commentId);for(let s of [...o])l.has(s)||(i.push({type:"commentRangeEnd",id:s}),o.delete(s));for(let s of l)o.has(s)||(i.push({type:"commentRangeStart",id:s}),o.add(s));a<t.length&&i.push(t[a]),a++;});for(let r of o)i.push({type:"commentRangeEnd",id:r});return i}function q(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.alignment!==(n.alignment||void 0)&&(i.alignment=t.alignment||void 0),t.numPr!==n.numPr&&JSON.stringify(t.numPr)!==JSON.stringify(n.numPr)&&(i.numPr=t.numPr||void 0),t.styleId!==(n.styleId||void 0)&&(i.styleId=t.styleId||void 0),t.pageBreakBefore!==(n.pageBreakBefore||void 0)&&(i.pageBreakBefore=t.pageBreakBefore||void 0),t.bidi!==(n.bidi||void 0)&&(i.bidi=t.bidi||void 0),i}if(t.alignment||t.spaceBefore||t.spaceAfter||t.lineSpacing||t.indentLeft||t.indentRight||t.indentFirstLine||t.numPr||t.styleId||t.borders||t.shading||t.tabs||t.outlineLevel!=null||t.contextualSpacing||t.bidi)return {alignment:t.alignment||void 0,spaceBefore:t.spaceBefore||void 0,spaceAfter:t.spaceAfter||void 0,lineSpacing:t.lineSpacing||void 0,lineSpacingRule:t.lineSpacingRule||void 0,indentLeft:t.indentLeft||void 0,indentRight:t.indentRight||void 0,indentFirstLine:t.indentFirstLine||void 0,hangingIndent:t.hangingIndent||void 0,numPr:t.numPr||void 0,styleId:t.styleId||void 0,borders:t.borders||void 0,shading:t.shading||void 0,tabs:t.tabs||void 0,outlineLevel:t.outlineLevel??void 0,contextualSpacing:t.contextualSpacing||void 0,bidi:t.bidi||void 0}}function z(t,e){let n=[],i=e??k(t),o=null,a=null,r=null;return t.forEach(l=>{let s=l.marks.find(p=>p.type.name==="footnoteRef");if(s){o&&(n.push(o),o=null,a=null),r&&(n.push(r),r=null);let u={type:s.attrs.noteType==="endnote"?"endnoteRef":"footnoteRef",id:parseInt(s.attrs.id,10)||0};n.push({type:"run",content:[u]});return}let d=l.marks.find(p=>p.type.name==="insertion"),m=l.marks.find(p=>p.type.name==="deletion");if(d||m){o&&(n.push(o),o=null,a=null),r&&(n.push(r),r=null);let p=d||m,u=l.marks.filter(R=>R.type.name!=="insertion"&&R.type.name!=="deletion"),h=T(u),y={type:"run",content:l.isText&&l.text?[{type:"text",text:l.text}]:[],...Object.keys(h).length>0?{formatting:h}:{}},g={id:p.attrs.revisionId,author:p.attrs.author||"Unknown",date:p.attrs.date||void 0},M=g.id,K=(i.insertionById.get(M)??0)>0,V=(i.deletionById.get(M)??0)>0,v=K&&V;d?v?n.push({type:"moveTo",info:g,content:[y]}):n.push({type:"insertion",info:g,content:[y]}):v?n.push({type:"moveFrom",info:g,content:[y]}):n.push({type:"deletion",info:g,content:[y]});return}let f=l.marks.find(p=>p.type.name==="hyperlink");if(f){let p=A(f),u=r?.href||(r?.anchor?`#${r.anchor}`:"");r&&u===p?x(r,l):(o&&(n.push(o),o=null,a=null),r&&n.push(r),r=N(f),x(r,l));return}if(r&&(n.push(r),r=null),l.isText){let p=B(l.marks);o&&a===p?E(o,l.text||""):(o&&n.push(o),o=C(l.text||"",l.marks),a=p);}else l.type.name==="hardBreak"?(o&&(n.push(o),o=null,a=null),n.push(L())):l.type.name==="image"?(o&&(n.push(o),o=null,a=null),n.push(D(l))):l.type.name==="shape"?(o&&(n.push(o),o=null,a=null),n.push(j(l))):l.type.name==="tab"?(o&&(n.push(o),o=null,a=null),n.push(H())):l.type.name==="field"?(o&&(n.push(o),o=null,a=null),n.push(O(l,l.marks))):l.type.name==="sdt"?(o&&(n.push(o),o=null,a=null),n.push(U(l))):l.type.name==="math"&&(o&&(n.push(o),o=null,a=null),n.push(W(l)));}),o&&n.push(o),r&&n.push(r),n}function U(t){let e=t.attrs,n={sdtType:e.sdtType??"richText",alias:e.alias??void 0,tag:e.tag??void 0,lock:e.lock??void 0,placeholder:e.placeholder??void 0,showingPlaceholder:e.showingPlaceholder??void 0,dateFormat:e.dateFormat??void 0,listItems:e.listItems?JSON.parse(e.listItems):void 0,checked:e.checked!=null?e.checked:void 0},o=z(t).filter(a=>a.type==="run"||a.type==="hyperlink"||a.type==="simpleField"||a.type==="complexField"||a.type==="inlineSdt"||a.type==="mathEquation");return {type:"inlineSdt",properties:n,content:o}}function X(t){for(let e of t)for(let n of e.cells){let i=n.formatting?.borders;if(i){let o=i.top||i.left||i.right||i.bottom||i.insideH||i.insideV;return o?{top:i.top??o,bottom:i.bottom??o,left:i.left??o,right:i.right??o,insideH:i.insideH??i.bottom??o,insideV:i.insideV??i.right??o}:void 0}}}function G(t,e){let n=[],i=[],o=0;for(let a=0;a<t.childCount;a++){let r=t.child(a),l=0;r.forEach(s=>{if(s.type.name!=="tableCell"&&s.type.name!=="tableHeader")return;for(;n[a]?.[l];)l++;let d=s.attrs.rowspan||1,m=s.attrs.colspan||1;i.push({row:a,col:l,rowspan:d,colspan:m,cell:Z(s,e)});for(let f=a;f<a+d;f++){let p=n[f]??[];n[f]=p;for(let u=l;u<l+m;u++)p[u]=true;}l+=m,o=Math.max(o,l);});}return {anchors:i,totalCols:o}}function P(t,e){let n=t.attrs,{anchors:i,totalCols:o}=G(t,e),a=new Map,r=new Map;for(let d of i){a.set(`${d.row}-${d.col}`,d);for(let m=d.row;m<d.row+d.rowspan;m++)for(let f=d.col;f<d.col+d.colspan;f++)r.set(`${m}-${f}`,d);}let l=[];for(let d=0;d<t.childCount;d++){let m=t.child(d),f=[];for(let p=0;p<o;){let u=a.get(`${d}-${p}`);if(u){let g={...u.cell.formatting??{}};u.colspan>1?g.gridSpan=u.colspan:delete g.gridSpan,u.rowspan>1?g.vMerge="restart":delete g.vMerge,f.push({...u.cell,formatting:Object.keys(g).length?g:void 0}),p+=u.colspan;continue}let h=r.get(`${d}-${p}`);if(!h){p++;continue}let y={...h.cell.formatting??{}};h.colspan>1?y.gridSpan=h.colspan:delete y.gridSpan,y.vMerge="continue",f.push({...h.cell,content:[],formatting:y}),p+=h.colspan;}l.push({type:"tableRow",formatting:Q(m.attrs),cells:f});}let s=Y(n)||void 0;if(!s?.borders){let d=X(l);if(d)if(s)s.borders=d;else return {type:"table",columnWidths:n.columnWidths||void 0,formatting:{borders:d},rows:l}}return {type:"table",columnWidths:n.columnWidths||void 0,formatting:s,rows:l}}function Y(t){if(t._originalFormatting){let o=t._originalFormatting,a={...o};t.styleId!==(o.styleId||void 0)&&(a.styleId=t.styleId||void 0),t.justification!==(o.justification||void 0)&&(a.justification=t.justification||void 0),t.floating!==(o.floating||void 0)&&(a.floating=t.floating||void 0),t.look!==(o.look||void 0)&&(a.look=t.look||void 0);let r=o.width?.value,l=o.width?.type;return (t.width!==r||t.widthType!==l)&&(t.width!=null||t.widthType?a.width={value:t.width??0,type:t.widthType||"dxa"}:a.width=void 0),t.cellMargins&&(a.cellMargins={top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}),a}if(!(t.styleId||t.width!=null||t.widthType||t.justification||t.floating||t.cellMargins||t.look))return;let n=t.cellMargins?{top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}:void 0,i;return (t.width!=null||t.widthType)&&(i={value:t.width??0,type:t.widthType||"dxa"}),{styleId:t.styleId||void 0,width:i,justification:t.justification||void 0,floating:t.floating||void 0,cellMargins:n,look:t.look||void 0}}function Q(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.height!==(n.height?.value||void 0)&&(i.height=t.height?{value:t.height,type:"dxa"}:void 0),t.heightRule!==(n.heightRule||void 0)&&(i.heightRule=t.heightRule||void 0),t.isHeader!==(n.header||void 0)&&(i.header=t.isHeader||void 0),i}if(t.height||t.isHeader)return {height:t.height?{value:t.height,type:"dxa"}:void 0,heightRule:t.heightRule||void 0,header:t.isHeader||void 0}}function Z(t,e){let n=t.attrs,i=[];return t.forEach(o=>{o.type.name==="paragraph"?i.push(b(o,e)):o.type.name==="table"&&i.push(P(o,e));}),{type:"tableCell",formatting:ee(n),content:i}}function ee(t){if(t._originalFormatting){let i=t._originalFormatting,o={...i};if(t.colspan>1&&(o.gridSpan=t.colspan),t.width!=null&&(o.width={value:t.width,type:t.widthType||"dxa"}),t.verticalAlign!==(i.verticalAlign||void 0)&&(o.verticalAlign=t.verticalAlign||void 0),t.backgroundColor?t._originalResolvedFill===t.backgroundColor&&i.shading?o.shading=i.shading:o.shading={fill:{rgb:t.backgroundColor}}:i.shading&&(o.shading=void 0),t.borders&&(o.borders=t.borders),t.margins){let a=t.margins,r={};a.top!=null&&(r.top={value:a.top,type:"dxa"}),a.bottom!=null&&(r.bottom={value:a.bottom,type:"dxa"}),a.left!=null&&(r.left={value:a.left,type:"dxa"}),a.right!=null&&(r.right={value:a.right,type:"dxa"}),o.margins=r;}return t.textDirection!==(i.textDirection||void 0)&&(o.textDirection=t.textDirection||void 0),o}if(!(t.colspan>1||t.rowspan>1||t.width!=null||t.verticalAlign||t.backgroundColor||t.borders||t.margins||t.textDirection))return;let n;if(t.margins){let i=t.margins;n={},i.top!=null&&(n.top={value:i.top,type:"dxa"}),i.bottom!=null&&(n.bottom={value:i.bottom,type:"dxa"}),i.left!=null&&(n.left={value:i.left,type:"dxa"}),i.right!=null&&(n.right={value:i.right,type:"dxa"});}return {gridSpan:t.colspan>1?t.colspan:void 0,width:t.width!=null?{value:t.width,type:t.widthType||"dxa"}:void 0,verticalAlign:t.verticalAlign||void 0,textDirection:t.textDirection||void 0,shading:t.backgroundColor?{fill:{rgb:t.backgroundColor}}:void 0,borders:t.borders,margins:n}}function w(t){let e=t.attrs,n=[];t.forEach(l=>{l.type.name==="paragraph"&&n.push(b(l));});let i={type:"shape",shapeType:"rect",id:e.textBoxId||void 0,size:{width:e.width?chunk4Q2IP5FW_js.f(e.width):0,height:e.height?chunk4Q2IP5FW_js.f(e.height):0},textBody:{content:n.length>0?n:[{type:"paragraph",content:[]}],margins:{top:e.marginTop!=null?chunk4Q2IP5FW_js.f(e.marginTop):void 0,bottom:e.marginBottom!=null?chunk4Q2IP5FW_js.f(e.marginBottom):void 0,left:e.marginLeft!=null?chunk4Q2IP5FW_js.f(e.marginLeft):void 0,right:e.marginRight!=null?chunk4Q2IP5FW_js.f(e.marginRight):void 0}}},o=chunkD4RPOJC7_js.d(e);o&&(i.position=o);let a=chunkD4RPOJC7_js.e(e);if(a&&(i.wrap=a),e.fillColor&&(i.fill={type:"solid",color:{rgb:e.fillColor.replace("#","")}}),e.outlineWidth&&e.outlineWidth>0){let l={solid:"solid",dotted:"dot",dashed:"dash"};i.outline={width:chunk4Q2IP5FW_js.f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&l[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:i}]}}function _(t){return {type:"paragraph",content:[w(t)]}}function te(t,e){let i={content:$(t),finalSectionProperties:e?.package.document.finalSectionProperties,sections:e?.package.document.sections,comments:e?.package.document.comments};return e?{...e,package:{...e.package,document:i}}:{package:{document:i}}}function $(t){let e=[],n=k(t),i=[],o=()=>{for(let a of i)e.push({type:"paragraph",content:[a]});i=[];};return t.forEach(a=>{if(a.type.name==="paragraph"){let r=b(a,n);i.length>0&&(r.content=[...i,...r.content],i=[]),e.push(r);}else if(a.type.name==="table")o(),e.push(P(a,n));else if(a.type.name==="textBox"){let r=a.attrs;chunkD4RPOJC7_js.c(r)?i.push(w(a)):(o(),e.push(_(a)));}else a.type.name==="pageBreak"&&(o(),e.push(ne()));}),o(),e}function ne(){return {type:"paragraph",content:[{type:"run",content:[{type:"break",breakType:"page"}]}]}}function xe(t,e){return te(e,t)}function Ce(t){return $(t)}exports.a=te;exports.b=xe;exports.c=Ce;
@@ -1 +0,0 @@
1
- 'use strict';var chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkCWAP26GB_js=require('./chunk-CWAP26GB.js'),chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function m(t){return t/1440*96}function x(t,i,r){if(!r||i<=r)return {width:t,height:i};let n=r/i;return {width:Math.round(t*n),height:r}}var z=0;function h(){return `block-${++z}`}function _(){z=0;}function E(t,i){let r={};for(let n of t)switch(n.type.name){case "bold":r.bold=true;break;case "italic":r.italic=true;break;case "underline":{let e=n.attrs;if(e.style||e.color){let a=e.color?chunkMJ5FQX7Q_js.a(e.color,i):void 0;r.underline={style:e.style,color:a};}else r.underline=true;break}case "strike":r.strike=true;break;case "textColor":{let e=n.attrs;(e.themeColor||e.rgb)&&(r.color=chunkMJ5FQX7Q_js.a({rgb:e.rgb,themeColor:e.themeColor,themeTint:e.themeTint,themeShade:e.themeShade},i));break}case "highlight":r.highlight=chunkMJ5FQX7Q_js.o(n.attrs.color);break;case "fontSize":{let e=n.attrs;r.fontSize=e.size/2;break}case "fontFamily":{let e=n.attrs;r.fontFamily=e.ascii||e.hAnsi;break}case "characterSpacing":{let e=n.attrs;e.spacing!=null&&e.spacing!==0&&(r.letterSpacing=m(e.spacing)),e.position!=null&&e.position!==0&&(r.positionPx=chunk4Q2IP5FW_js.j(e.position)),e.scale!=null&&e.scale!==100&&(r.horizontalScale=e.scale),e.kerning!=null&&e.kerning>0&&(r.kerningMinPt=chunk4Q2IP5FW_js.k(e.kerning));break}case "allCaps":r.allCaps=true;break;case "smallCaps":r.smallCaps=true;break;case "emboss":r.emboss=true;break;case "imprint":r.imprint=true;break;case "textShadow":r.textShadow=true;break;case "textOutline":r.textOutline=true;break;case "hidden":r.hidden=true;break;case "rtl":r.rtl=true;break;case "textEffect":{let e=n.attrs.effect;(e==="blinkBackground"||e==="lights"||e==="antsBlack"||e==="antsRed"||e==="shimmer"||e==="sparkle")&&(r.textEffect=e);break}case "emphasisMark":{let e=n.attrs.type;e==="dot"||e==="comma"||e==="circle"||e==="underDot"?r.emphasisMark=e:r.emphasisMark="dot";break}case "superscript":r.superscript=true;break;case "subscript":r.subscript=true;break;case "hyperlink":{let e=n.attrs;r.hyperlink={href:e.href,tooltip:e.tooltip};break}case "footnoteRef":{let e=n.attrs,a=typeof e.id=="string"?parseInt(e.id,10):e.id;e.noteType==="endnote"?r.endnoteRefId=a:r.footnoteRefId=a;break}case "comment":{let e=n.attrs.commentId;e&&(r.commentIds||(r.commentIds=[]),r.commentIds.push(e));break}case "insertion":r.isInsertion=true,r.changeAuthor=n.attrs.author,r.changeDate=n.attrs.date,r.changeRevisionId=n.attrs.revisionId;break;case "deletion":r.isDeletion=true,r.changeAuthor=n.attrs.author,r.changeDate=n.attrs.date,r.changeRevisionId=n.attrs.revisionId;break}return r}function U(t){let i=t.defaultTextFormatting;if(!i)return {};let r={};if(i.fontFamily){let n=i.fontFamily.ascii||i.fontFamily.hAnsi;n&&(r.fontFamily=n);}return i.fontSize!=null&&(r.fontSize=i.fontSize/2),r}function L(t,i,r){let n=[],e=i+1,a=r.theme,s=U(t.attrs);function d(u,c){if(u.isText&&u.text){let l=E(u.marks,a),o={kind:"text",text:u.text,...s,...l,pmStart:c,pmEnd:c+u.nodeSize};n.push(o);}else if(u.type.name==="hardBreak")n.push({kind:"lineBreak",pmStart:c,pmEnd:c+u.nodeSize});else if(u.type.name==="tab"){let l=E(u.marks,a),o={kind:"tab",...s,...l,pmStart:c,pmEnd:c+u.nodeSize};n.push(o);}else if(u.type.name==="image"){let l=u.attrs,o=x(l.width||100,l.height||100,r.pageContentHeight),p={kind:"image",src:l.src,width:o.width,height:o.height,alt:l.alt,transform:l.transform,wrapType:l.wrapType,displayMode:l.displayMode,cssFloat:l.cssFloat,distTop:l.distTop,distBottom:l.distBottom,distLeft:l.distLeft,distRight:l.distRight,position:l.position,cropTop:l.cropTop,cropRight:l.cropRight,cropBottom:l.cropBottom,cropLeft:l.cropLeft,opacity:l.opacity,pmStart:c,pmEnd:c+u.nodeSize};n.push(p);}else if(u.type.name==="field"){let l=u.attrs.fieldType,o=l==="PAGE"?"PAGE":l==="NUMPAGES"?"NUMPAGES":l==="DATE"?"DATE":l==="TIME"?"TIME":"OTHER";n.push({kind:"field",fieldType:o,fallback:u.attrs.displayText||"",pmStart:c,pmEnd:c+u.nodeSize});}else if(u.type.name==="math"){let l=u.attrs.plainText||"[equation]";n.push({kind:"text",text:l,italic:true,fontFamily:"Cambria Math",pmStart:c,pmEnd:c+u.nodeSize});}else if(u.type.name==="sdt"){let l=c+1;u.forEach((o,p)=>{d(o,l+p);});}}return t.forEach((u,c)=>{d(u,e+c);}),n}function Y(t){return Math.max(1,Math.round(t/8*1.333))}var $={single:"solid",double:"double",dotted:"dotted",dashed:"dashed",thick:"solid",dashSmallGap:"dashed",dotDash:"dashed",dotDotDash:"dotted",triple:"double",wave:"solid",doubleWave:"double",threeDEmboss:"ridge",threeDEngrave:"groove",outset:"outset",inset:"inset"};function S(t,i){if(!t||!t.style||t.style==="none"||t.style==="nil")return;let r={style:$[t.style]||"solid",width:Y(t.size??0),color:t.color?chunkMJ5FQX7Q_js.a(t.color,i):"#000000"};return t.space!==void 0&&(r.space=chunk4Q2IP5FW_js.i(t.space)),r}function N(t,i){let r=t.borders;if(!r)return;let n={},e=["top","bottom","left","right"];for(let a of e){let s=r[a],d=s?S(s,i):void 0;n[a]=d??{width:0,style:"none"};}return Object.keys(n).length>0?n:void 0}function G(t,i){let r=[];for(let n=0;n<=i;n+=1){let e=t[n]??0;if(e<=0)break;r.push(e);}return r.length===0?"1.":`${r.join(".")}.`}var j=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function O(t,i){if(t<=0)return "";let r=t,n="";for(let[e,a]of j)for(;r>=e;)n+=a,r-=e;return i?n:n.toLowerCase()}function D(t,i){if(t<=0)return "";let r=t,n="";for(;r>0;){let e=(r-1)%26;n=String.fromCharCode(65+e)+n,r=Math.floor((r-1)/26);}return i?n:n.toLowerCase()}function V(t,i){if(t<=0)return "";switch(i){case "upperRoman":return O(t,true);case "lowerRoman":return O(t,false);case "upperLetter":return D(t,true);case "lowerLetter":return D(t,false);case "decimalZero":return t<10?`0${t}`:String(t);case "none":return "";default:return String(t)}}function W(t,i,r){return t.replace(/%(\d)([.):\]])?/g,(n,e,a="")=>{let s=parseInt(e,10)-1;if(s<0)return "";let d=i[s]??0,u=r?.[s]??"decimal",c=V(d,u);return c?c+a:""})}function X(t,i,r){let n=t.numPr;if(!n)return null;let e=n.numId;if(e==null||e===0)return null;if(t.listIsBullet)return chunkCWAP26GB_js.J(t.listMarker||"");let a=n.ilvl??0,s=t.listAbstractNumId??e,d=i.get(s)??new Array(9).fill(0),u=`${e}:${a}`;r.has(u)||(r.add(u),t.listStartOverride!=null&&(d[a]=t.listStartOverride-1)),d[a]=(d[a]??0)+1;for(let c=a+1;c<d.length;c+=1)d[c]=0;return i.set(s,d),t.listMarker&&t.listMarker.includes("%")?W(t.listMarker,d,t.listLevelNumFmts??void 0):t.listMarker?t.listMarker:G(d,a)}var q="Calibri",K=11;function Z(t,i,r,n){let e={};if(t.alignment){let o=t.alignment;o==="both"||o==="distribute"?e.alignment="justify":o==="left"?e.alignment="left":o==="center"?e.alignment="center":o==="right"&&(e.alignment="right");}(t.spaceBefore!=null||t.spaceAfter!=null||t.lineSpacing!=null)&&(e.spacing={},t.spaceBefore!=null&&(e.spacing.before=m(t.spaceBefore)),t.spaceAfter!=null&&(e.spacing.after=m(t.spaceAfter)),t.lineSpacing!=null&&(t.lineSpacingRule==="exact"||t.lineSpacingRule==="atLeast"?(e.spacing.line=m(t.lineSpacing),e.spacing.lineUnit="px",e.spacing.lineRule=t.lineSpacingRule):(e.spacing.line=t.lineSpacing/240,e.spacing.lineUnit="multiplier",e.spacing.lineRule="auto"))),t.spacingExplicit&&(e.spacingExplicit=t.spacingExplicit);let a=t.indentLeft,s=t.indentFirstLine,d=t.hangingIndent;if(t.numPr?.numId&&a==null&&(a=((t.numPr.ilvl??0)+1)*720,s==null&&(s=-360,d=true)),(a!=null||t.indentRight!=null||s!=null)&&(e.indent={},a!=null&&(e.indent.left=m(a)),t.indentRight!=null&&(e.indent.right=m(t.indentRight)),s!=null&&(d?e.indent.hanging=Math.abs(m(s)):e.indent.firstLine=m(s))),t.styleId&&(e.styleId=t.styleId),t.borders){let o=t.borders;e.borders={};let p=f=>f?S(f,i):void 0;o.top&&(e.borders.top=p(o.top)),o.bottom&&(e.borders.bottom=p(o.bottom)),o.left&&(e.borders.left=p(o.left)),o.right&&(e.borders.right=p(o.right)),o.between&&(e.borders.between=p(o.between)),o.bar&&(e.borders.bar=p(o.bar)),!e.borders.top&&!e.borders.bottom&&!e.borders.left&&!e.borders.right&&!e.borders.between&&!e.borders.bar&&delete e.borders;}let u=chunkMJ5FQX7Q_js.b(t.shading?.fill,i);u&&(e.shading=`#${u}`),t.tabs&&t.tabs.length>0&&(e.tabs=t.tabs.map(o=>({val:J(o.alignment),pos:o.position,leader:o.leader}))),t.pageBreakBefore&&(e.pageBreakBefore=true),t.keepNext&&(e.keepNext=true),t.keepLines&&(e.keepLines=true),t.contextualSpacing&&(e.contextualSpacing=true),t.bidi&&(e.bidi=true),t.styleId&&(e.styleId=t.styleId),t.numPr&&(e.numPr={numId:t.numPr.numId,ilvl:t.numPr.ilvl});let c=r&&n?X(t,r,n):null;c!=null?e.listMarker=c:t.listMarker&&(e.listMarker=t.listMarker),t.listIsBullet!=null&&(e.listIsBullet=t.listIsBullet),t.listMarkerHidden&&(e.listMarkerHidden=true),t.listMarkerFontFamily&&(e.listMarkerFontFamily=t.listMarkerFontFamily),t.listMarkerFontSize&&(e.listMarkerFontSize=t.listMarkerFontSize);let l=t.defaultTextFormatting;return l&&(l.fontSize!=null&&(e.defaultFontSize=l.fontSize/2),l.fontFamily&&(e.defaultFontFamily=l.fontFamily.ascii||l.fontFamily.hAnsi)),e}function J(t){switch(t){case "left":return "start";case "right":return "end";case "center":return "center";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "start";default:return "start"}}function B(t,i,r){let n=t.attrs,e=L(t,i,r),a=Z(n,r.theme,r.listCounters,r.listSeenNumIds);return {kind:"paragraph",id:h(),runs:e,attrs:a,pmStart:i,pmEnd:i+t.nodeSize}}function Q(t,i,r,n){let e=[],a=i+1;t.forEach(f=>{f.type.name==="paragraph"?e.push(B(f,a,r)):f.type.name==="table"&&e.push(H(f,a,r)),a+=f.nodeSize;});let s=t.attrs,d=s.width,u=s.widthType,c=d&&(!u||u==="dxa"||u==="auto")?m(d):void 0,l=s.margins,o=(f,g)=>{if(f!=null){let b=m(f);if(b>0)return b}if(g!=null){let b=m(g);if(b>=0)return b}return 0},p={top:o(l?.top,n?.top),right:o(l?.right,n?.right),bottom:o(l?.bottom,n?.bottom),left:o(l?.left,n?.left)};return {id:h(),blocks:e,colSpan:s.colspan,rowSpan:s.rowspan,width:c,widthValue:d,widthType:u,verticalAlign:s.verticalAlign,background:s.backgroundColor?`#${s.backgroundColor}`:void 0,borders:N(s,r.theme),padding:p,noWrap:s.noWrap||void 0}}function A(t,i,r,n){let e=[],a=i+1;t.forEach(d=>{(d.type.name==="tableCell"||d.type.name==="tableHeader")&&e.push(Q(d,a,r,n)),a+=d.nodeSize;});let s=t.attrs;return {id:h(),cells:e,height:s.height?m(s.height):void 0,heightRule:s.heightRule??void 0,isHeader:s.isHeader}}function H(t,i,r){let n=[],e=i+1,a=t.attrs.cellMargins;t.forEach(b=>{b.type.name==="tableRow"&&n.push(A(b,e,r,a)),e+=b.nodeSize;});let d=t.attrs.columnWidths?.map(m),u=t.attrs.width,c=t.attrs.widthType;if(!d&&n.length>0){let F=n[0].cells.map(y=>y.width);F.every(y=>y!==void 0&&y>0)&&(d=F);}let l=t.attrs.justification,o=t.attrs._originalFormatting,p=o?.indent?.value&&o.indent.type==="dxa"?m(o.indent.value):void 0,f=t.attrs.floating,g=f?{horzAnchor:f.horzAnchor,vertAnchor:f.vertAnchor,tblpX:f.tblpX!==void 0?m(f.tblpX):void 0,tblpXSpec:f.tblpXSpec,tblpY:f.tblpY!==void 0?m(f.tblpY):void 0,tblpYSpec:f.tblpYSpec,topFromText:f.topFromText!==void 0?m(f.topFromText):void 0,bottomFromText:f.bottomFromText!==void 0?m(f.bottomFromText):void 0,leftFromText:f.leftFromText!==void 0?m(f.leftFromText):void 0,rightFromText:f.rightFromText!==void 0?m(f.rightFromText):void 0}:void 0;return {kind:"table",id:h(),rows:n,columnWidths:d,width:u,widthType:c,justification:l,indent:p,floating:g,pmStart:i,pmEnd:i+t.nodeSize}}function ee(t,i,r){let n=t.attrs,e=n.wrapType,a=e==="behind"||e==="inFront",s=x(n.width||100,n.height||100,r);return {kind:"image",id:h(),src:n.src,width:s.width,height:s.height,alt:n.alt,transform:n.transform,anchor:a?{isAnchored:true,offsetH:n.distLeft,offsetV:n.distTop,behindDoc:e==="behind"}:void 0,hlinkHref:n.hlinkHref,pmStart:i,pmEnd:i+t.nodeSize}}function te(t,i,r){let n=t.attrs,e=[];return t.forEach((a,s)=>{if(a.type.name==="paragraph"){let d=B(a,i+1+s,r);e.push(d);}}),{kind:"textBox",id:h(),width:n.width??chunkDROCYKAR_js.b,height:n.height??void 0,fillColor:n.fillColor,outlineWidth:n.outlineWidth,outlineColor:n.outlineColor,outlineStyle:n.outlineStyle,margins:{top:n.marginTop??chunkDROCYKAR_js.a.top,bottom:n.marginBottom??chunkDROCYKAR_js.a.bottom,left:n.marginLeft??chunkDROCYKAR_js.a.left,right:n.marginRight??chunkDROCYKAR_js.a.right},content:e,displayMode:n.displayMode,cssFloat:n.cssFloat,wrapType:n.wrapType,wrapText:n.wrapText,anchorTarget:n.anchorTarget,position:n.position,distTop:n.distTop,distBottom:n.distBottom,distLeft:n.distLeft,distRight:n.distRight,pmStart:i,pmEnd:i+t.nodeSize}}function ke(t,i={}){let r={...i,defaultFont:i.defaultFont??q,defaultSize:i.defaultSize??K},n=[],e=0,a={top:1440,bottom:1440,left:1440,right:1440};return r.listCounters||(r.listCounters=new Map),r.listSeenNumIds||(r.listSeenNumIds=new Set),t.forEach((s,d)=>{let u=e+d;switch(s.type.name){case "paragraph":{let c=B(s,u,r),l=s.attrs;n.push(c);let o=l._sectionProperties;if(o||l.sectionBreakType){let p={kind:"sectionBreak",id:h(),type:o?.sectionStart??l.sectionBreakType};if(o){if((o.pageWidth!==void 0||o.pageHeight!==void 0)&&(p.pageSize={w:m(o.pageWidth??12240),h:m(o.pageHeight??15840)}),o.marginTop!==void 0||o.marginBottom!==void 0||o.marginLeft!==void 0||o.marginRight!==void 0){let g={top:o.marginTop??a.top,bottom:o.marginBottom??a.bottom,left:o.marginLeft??a.left,right:o.marginRight??a.right};p.margins={top:m(g.top),bottom:m(g.bottom),left:m(g.left),right:m(g.right)},a=g;}let f=o.columnCount??1;if(f>1){let g={count:f,gap:m(o.columnSpace??720),equalWidth:o.equalWidth??true,separator:o.separator};p.columns=g;}}n.push(p);}}break;case "table":n.push(H(s,u,r));break;case "image":n.push(ee(s,u,r.pageContentHeight));break;case "textBox":n.push(te(s,u,r));break;case "horizontalRule":case "pageBreak":{let c={kind:"pageBreak",id:h(),pmStart:u,pmEnd:u+s.nodeSize};n.push(c);break}}}),n}exports.a=_;exports.b=S;exports.c=W;exports.d=ke;
@@ -1 +0,0 @@
1
- import {a as a$1,b as b$2}from'./chunk-LBKMYD3M.mjs';import {b}from'./chunk-NBLJPT54.mjs';import {b as b$4}from'./chunk-QPFJJPIC.mjs';import {a}from'./chunk-ILJUDEZ5.mjs';import {b as b$1}from'./chunk-JKVXID22.mjs';import {b as b$3}from'./chunk-67LVRQIR.mjs';import {e}from'./chunk-VW22RZ6C.mjs';function _(e){if(!e)return [];let n=[];return e.bold&&n.push(b$1.mark("bold")),e.italic&&n.push(b$1.mark("italic")),e.underline&&e.underline.style!=="none"&&n.push(b$1.mark("underline",{style:e.underline.style,color:e.underline.color})),(e.strike||e.doubleStrike)&&n.push(b$1.mark("strike",{double:e.doubleStrike||false})),e.color&&!e.color.auto&&n.push(b$1.mark("textColor",{rgb:e.color.rgb,themeColor:e.color.themeColor,themeTint:e.color.themeTint,themeShade:e.color.themeShade})),e.highlight&&e.highlight!=="none"&&n.push(b$1.mark("highlight",{color:e.highlight})),e.fontSize&&n.push(b$1.mark("fontSize",{size:e.fontSize})),e.fontFamily&&n.push(b$1.mark("fontFamily",{ascii:e.fontFamily.ascii,hAnsi:e.fontFamily.hAnsi,eastAsia:e.fontFamily.eastAsia,cs:e.fontFamily.cs,asciiTheme:e.fontFamily.asciiTheme,hAnsiTheme:e.fontFamily.hAnsiTheme,eastAsiaTheme:e.fontFamily.eastAsiaTheme,csTheme:e.fontFamily.csTheme})),e.vertAlign==="superscript"?n.push(b$1.mark("superscript")):e.vertAlign==="subscript"&&n.push(b$1.mark("subscript")),e.allCaps&&n.push(b$1.mark("allCaps")),e.smallCaps&&n.push(b$1.mark("smallCaps")),(e.spacing!=null||e.position!=null||e.scale!=null||e.kerning!=null)&&n.push(b$1.mark("characterSpacing",{spacing:e.spacing??null,position:e.position??null,scale:e.scale??null,kerning:e.kerning??null})),e.emboss&&n.push(b$1.mark("emboss")),e.imprint&&n.push(b$1.mark("imprint")),e.shadow&&n.push(b$1.mark("textShadow")),e.emphasisMark&&e.emphasisMark!=="none"&&n.push(b$1.mark("emphasisMark",{type:e.emphasisMark})),e.outline&&n.push(b$1.mark("textOutline")),e.hidden&&n.push(b$1.mark("hidden")),e.rtl&&n.push(b$1.mark("rtl")),e.effect&&e.effect!=="none"&&n.push(b$1.mark("textEffect",{effect:e.effect})),n}function A(e,n){if(!e)return;if(!n)return e;let r=n.resolveRunStyle(e.styleId);return r?a(r,e):e}function ee(e,n){let r="",i,t=e.type==="simpleField"?e.content:e.fieldResult;if(t){for(let s of t)if(s.type==="run"){for(let f of s.content)f.type==="text"&&(r+=f.text);!i&&s.formatting&&(i=s.formatting);}}let l=a(n,i),o=_(l);return b$1.node("field",{fieldType:e.fieldType,instruction:e.instruction,displayText:r,fieldKind:e.type==="simpleField"?"simple":"complex",fldLock:e.fldLock??false,dirty:e.dirty??false},void 0,o)}function te(e){return b$1.node("math",{display:e.display,ommlXml:e.ommlXml,plainText:e.plainText||""})}function q(e,n,r){let i=[],t=e.formatting?.styleId?r?.getRunStyleOwnProperties(e.formatting.styleId):void 0,l=a(a(n,t),e.formatting),o=_(l);for(let s of e.content){let f=ge(s,o);i.push(...f);}return i}function ge(e,n){switch(e.type){case "text":return e.text?[b$1.text(e.text,n)]:[];case "break":return e.breakType==="textWrapping"||!e.breakType?[b$1.node("hardBreak")]:[];case "tab":return [b$1.node("tab")];case "drawing":return e.image?[Te(e.image)]:[];case "shape":{let t=e.shape;return t.textBody&&t.textBody.content.length>0?[]:[be(t)]}case "footnoteRef":let r=b$1.mark("footnoteRef",{id:e.id.toString(),noteType:"footnote"});return [b$1.text(e.id.toString(),[...n,r])];case "endnoteRef":let i=b$1.mark("footnoteRef",{id:e.id.toString(),noteType:"endnote"});return [b$1.text(e.id.toString(),[...n,i])];default:return []}}function Te(e$1){let n=e$1.size?.width?e(e$1.size.width):void 0,r=e$1.size?.height?e(e$1.size.height):void 0,i=e$1.wrap.type,t=e$1.wrap.wrapText,l=e$1.position?.horizontal?.alignment,o;i==="inline"||i==="topAndBottom"?o="none":i==="square"||i==="tight"||i==="through"?t==="left"?o="right":t==="right"||l==="left"?o="left":l==="right"?o="right":o="none":o="none";let s="inline";i==="inline"?s="inline":i==="topAndBottom"?s="block":b$4(i)||o&&o!=="none"?s="float":s="block";let f;if(e$1.transform){let y=[];e$1.transform.rotation&&y.push(`rotate(${e$1.transform.rotation}deg)`),e$1.transform.flipH&&y.push("scaleX(-1)"),e$1.transform.flipV&&y.push("scaleY(-1)"),y.length>0&&(f=y.join(" "));}let p=e$1.wrap.distT?e(e$1.wrap.distT):void 0,c=e$1.wrap.distB?e(e$1.wrap.distB):void 0,d=e$1.wrap.distL?e(e$1.wrap.distL):void 0,m=e$1.wrap.distR?e(e$1.wrap.distR):void 0,u;e$1.position&&(u={horizontal:e$1.position.horizontal?{relativeTo:e$1.position.horizontal.relativeTo,posOffset:e$1.position.horizontal.posOffset,align:e$1.position.horizontal.alignment}:void 0,vertical:e$1.position.vertical?{relativeTo:e$1.position.vertical.relativeTo,posOffset:e$1.position.vertical.posOffset,align:e$1.position.vertical.alignment}:void 0});let F,k,v;if(e$1.outline&&e$1.outline.width){F=Math.round(e$1.outline.width/914400*96*100)/100,e$1.outline.color?.rgb&&(k=`#${e$1.outline.color.rgb}`);let y={solid:"solid",dot:"dotted",dash:"dashed",lgDash:"dashed",dashDot:"dashed",lgDashDot:"dashed",lgDashDotDot:"dashed",sysDot:"dotted",sysDash:"dashed",sysDashDot:"dashed",sysDashDotDot:"dashed"};v=e$1.outline.style&&y[e$1.outline.style]||"solid";}let N=e$1.padding?.top?e(e$1.padding.top):void 0,R=e$1.padding?.bottom?e(e$1.padding.bottom):void 0,B=e$1.padding?.left?e(e$1.padding.left):void 0,h=e$1.padding?.right?e(e$1.padding.right):void 0;return b$1.node("image",{src:e$1.src||"",alt:e$1.alt,title:e$1.title,width:n,height:r,rId:e$1.rId,wrapType:i,displayMode:s,cssFloat:o,transform:f,distTop:p,distBottom:c,distLeft:d,distRight:m,position:u,borderWidth:F,borderColor:k,borderStyle:v,wrapText:t,hlinkHref:e$1.hlinkHref,cropTop:e$1.crop?.top,cropRight:e$1.crop?.right,cropBottom:e$1.crop?.bottom,cropLeft:e$1.crop?.left,opacity:e$1.opacity,effectExtentTop:N,effectExtentBottom:R,effectExtentLeft:B,effectExtentRight:h,layoutInCell:e$1.layoutInCell,allowOverlap:e$1.allowOverlap})}function j(e,n,r){let i=[],t=e.href||(e.anchor?`#${e.anchor}`:""),l=b$1.mark("hyperlink",{href:t,tooltip:e.tooltip,rId:e.rId});for(let o of e.children)if(o.type==="run"){let s=o.formatting?.styleId?r?.resolveRunStyle(o.formatting.styleId):void 0,f=a(a(n,s),o.formatting),c=[..._(f),l];for(let d of o.content)d.type==="text"&&d.text&&i.push(b$1.text(d.text,c));}return i}function be(e$1){let n=e$1.size?.width?e(e$1.size.width):100,r=e$1.size?.height?e(e$1.size.height):80,i,t="solid",l,o,s;if(e$1.fill&&(t=e$1.fill.type,e$1.fill.color?.rgb&&(i=`#${e$1.fill.color.rgb}`),e$1.fill.type==="gradient"&&e$1.fill.gradient)){let m=e$1.fill.gradient;l=m.type,o=m.angle,s=JSON.stringify(m.stops.map(u=>({position:u.position,color:u.color.rgb?`#${u.color.rgb}`:"#000000"})));}let f,p,c;e$1.outline&&(e$1.outline.width&&(f=Math.round(e$1.outline.width/914400*96*100)/100),e$1.outline.color?.rgb&&(p=`#${e$1.outline.color.rgb}`),c=e$1.outline.style||"solid");let d;if(e$1.transform){let m=[];e$1.transform.rotation&&m.push(`rotate(${e$1.transform.rotation}deg)`),e$1.transform.flipH&&m.push("scaleX(-1)"),e$1.transform.flipV&&m.push("scaleY(-1)"),m.length>0&&(d=m.join(" "));}return b$1.node("shape",{shapeType:e$1.shapeType||"rect",shapeId:e$1.id,width:n,height:r,fillColor:i,fillType:t,gradientType:l,gradientAngle:o,gradientStops:s,outlineWidth:f,outlineColor:p,outlineStyle:c,transform:d})}function E(e,n,r,i){let t=ye(e,n),l=[],o,s=new Set,f;n&&(f=n.resolveParagraphStyle(e.formatting?.styleId).runFormatting);let p=a(f,i);for(let c of e.content){if(c.type==="commentRangeStart")s.add(c.id);else if(c.type==="commentRangeEnd")s.delete(c.id);else if(c.type==="run"){let d=q(c,p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="hyperlink"){let d=j(c,p,n);l.push(...d);}else if(c.type==="simpleField"||c.type==="complexField"){let d=ee(c,p);d&&l.push(d);}else if(c.type==="inlineSdt"){let d=fe(c,p,n);d&&l.push(d);}else if(c.type==="insertion"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="deletion"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveFrom"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveTo"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="mathEquation"){let d=te(c);d&&l.push(d);}c.type==="bookmarkStart"&&(o||(o=[]),o.push({id:c.id,name:c.name}));}return o&&(t.bookmarks=o),b$1.node("paragraph",t,l)}function D(e,n){if(n.size===0)return e;let r=[...n][0],i=b$1.marks.comment.create({commentId:r});return e.map(t=>t.isText?t.mark(i.addToSet(t.marks)):t)}function X(e,n,r,i){let t=[];for(let o of e.content)o.type==="run"?t.push(...q(o,r,i)):o.type==="hyperlink"&&t.push(...j(o,r,i));let l=b$1.marks[n].create({revisionId:e.info.id,author:e.info.author,date:e.info.date??null});return t.map(o=>o.isText?o.mark(l.addToSet(o.marks)):o)}function ye(e,n){let r=e.formatting,i=r?.styleId,t={paraId:e.paraId??void 0,textId:e.textId??void 0,styleId:i,numPr:r?.numPr,listNumFmt:e.listRendering?.numFmt,listIsBullet:e.listRendering?.isBullet,listMarker:e.listRendering?.marker,listMarkerHidden:e.listRendering?.markerHidden||void 0,listMarkerFontFamily:e.listRendering?.markerFontFamily||void 0,listMarkerFontSize:e.listRendering?.markerFontSize||void 0,listLevelNumFmts:e.listRendering?.levelNumFmts||void 0,listAbstractNumId:e.listRendering?.abstractNumId,listStartOverride:e.listRendering?.startOverride,_originalFormatting:r||void 0};if(n){let l=n.resolveParagraphStyle(i),o=l.paragraphFormatting,s=l.runFormatting;t.alignment=r?.alignment??o?.alignment,t.spaceBefore=r?.spaceBefore??o?.spaceBefore,t.spaceAfter=r?.spaceAfter??o?.spaceAfter,t.lineSpacing=r?.lineSpacing??o?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule??o?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft??o?.indentLeft,t.indentRight=r?.indentRight??o?.indentRight,t.indentFirstLine=r?.indentFirstLine??o?.indentFirstLine,t.hangingIndent=r?.hangingIndent??o?.hangingIndent,t.borders=r?.borders??o?.borders,t.shading=r?.shading??o?.shading,t.tabs=r?.tabs??o?.tabs,t.pageBreakBefore=r?.pageBreakBefore??o?.pageBreakBefore,t.keepNext=r?.keepNext??o?.keepNext,t.keepLines=r?.keepLines??o?.keepLines,t.contextualSpacing=r?.contextualSpacing??o?.contextualSpacing,t.outlineLevel=r?.outlineLevel??o?.outlineLevel,t.bidi=r?.bidi??o?.bidi;let f=n.getDefaultCharacterStyle()?.rPr,p=f?a(s,f):s,c=A(r?.runProperties,n);t.defaultTextFormatting=a(p,c),!r?.numPr&&o?.numPr&&o.numPr.numId!==0&&(t.numPr=o.numPr);}else t.alignment=r?.alignment,t.spaceBefore=r?.spaceBefore,t.spaceAfter=r?.spaceAfter,t.lineSpacing=r?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft,t.indentRight=r?.indentRight,t.indentFirstLine=r?.indentFirstLine,t.hangingIndent=r?.hangingIndent,t.borders=r?.borders,t.shading=r?.shading,t.tabs=r?.tabs,t.pageBreakBefore=r?.pageBreakBefore,t.keepNext=r?.keepNext,t.keepLines=r?.keepLines,t.outlineLevel=r?.outlineLevel,t.bidi=r?.bidi,t.defaultTextFormatting=A(r?.runProperties,n);if(e.sectionProperties){t._sectionProperties=e.sectionProperties;let l=e.sectionProperties.sectionStart;(l==="nextPage"||l==="continuous"||l==="oddPage"||l==="evenPage")&&(t.sectionBreakType=l);}return e.renderedPageBreakBefore&&(t.renderedPageBreakBefore=true),t}function fe(e,n,r){let i=e.properties,t=[];for(let l of e.content)if(l.type==="run"){let o=q(l,n,r);t.push(...o);}else if(l.type==="hyperlink"){let o=j(l,n,r);t.push(...o);}else if(l.type==="simpleField"||l.type==="complexField"){let o=ee(l,n);o&&t.push(o);}else if(l.type==="inlineSdt"){let o=fe(l,n,r);o&&t.push(o);}else if(l.type==="mathEquation"){let o=te(l);o&&t.push(o);}return b$1.node("sdt",{sdtType:i.sdtType,alias:i.alias??null,tag:i.tag??null,lock:i.lock??null,placeholder:i.placeholder??null,showingPlaceholder:i.showingPlaceholder??false,dateFormat:i.dateFormat??null,listItems:i.listItems?JSON.stringify(i.listItems):null,checked:i.checked??null},t.length>0?t:void 0)}function ce(e){function n(i){return i.type==="break"&&i.breakType==="page"}function r(i){if(i.type==="run"){for(let t of i.content)if(n(t))return true;return false}if(i.type==="hyperlink"){for(let t of i.children)if(t.type==="run"&&r(t))return true;return false}if(i.type==="insertion"||i.type==="deletion"){let t=i;for(let l of t.content)if(r(l))return true;return false}return false}for(let i of e.content)if(r(i))return true;return false}function x(e,n,r){if(!e||!n)return;let i=e.getStyle(n);if(!i?.tblStylePr)return;let t=i.tblStylePr.find(f=>f.type===r);if(!t)return;let l=A(t.pPr?.runProperties,e),o=A(t.rPr,e),s=a(l,o);return {tcPr:t.tcPr,rPr:s}}function M(e,n){if(!e&&!n)return;if(!e)return n;if(!n)return e;let r={},i=e.tcPr,t=n.tcPr;if(i||t){let l={...i??{},...t??{}};(i?.borders||t?.borders)&&(l.borders={...i?.borders??{},...t?.borders??{}}),(i?.shading||t?.shading)&&(l.shading={...i?.shading??{},...t?.shading??{}}),(i?.margins||t?.margins)&&(l.margins={...i?.margins??{},...t?.margins??{}}),r.tcPr=l;}return r.rPr=a(e.rPr,n.rPr),r}function Pe(e){let n=new Map,r=e.rows.length,i=new Map;for(let t=0;t<r;t++){let l=e.rows[t],o=0;for(let s=0;s<l.cells.length;s++){let f=l.cells[s],p=f.formatting?.gridSpan??1,c=f.formatting?.vMerge,d=`${t}-${o}`;if(c==="restart")i.set(o,t),n.set(d,{rowSpan:1,skip:false});else if(c==="continue"){let m=i.get(o);if(m!==void 0){let u=`${m}-${o}`,F=n.get(u);F&&F.rowSpan++;}n.set(d,{rowSpan:1,skip:true});}else i.delete(o),n.set(d,{rowSpan:1,skip:false});o+=p;}}return n}function K(e,n,r){let i=Pe(e),t=e.columnWidths,l=t?.reduce((y,S)=>y+S,0)??0,o=e.formatting?.styleId,s=e.formatting?.look,f=o?n?.getStyle(o):void 0,p=n?.getDefaultTableStyle(),c=e.formatting?.borders??f?.tblPr?.borders??p?.tblPr?.borders,d=e.formatting?.cellMargins??f?.tblPr?.cellMargins??p?.tblPr?.cellMargins??void 0,m=d?{top:d.top?.value,bottom:d.bottom?.value,left:d.left?.value,right:d.right?.value}:void 0,u={styleId:e.formatting?.styleId,width:e.formatting?.width?.value,widthType:e.formatting?.width?.type,justification:e.formatting?.justification,columnWidths:t,floating:e.formatting?.floating,cellMargins:m,look:e.formatting?.look,_originalFormatting:e.formatting||void 0},F={wholeTable:x(n,o,"wholeTable"),firstRow:x(n,o,"firstRow"),lastRow:x(n,o,"lastRow"),firstCol:x(n,o,"firstCol"),lastCol:x(n,o,"lastCol"),band1Horz:x(n,o,"band1Horz"),band2Horz:x(n,o,"band2Horz"),band1Vert:x(n,o,"band1Vert"),band2Vert:x(n,o,"band2Vert"),nwCell:x(n,o,"nwCell"),neCell:x(n,o,"neCell"),swCell:x(n,o,"swCell"),seCell:x(n,o,"seCell")},k=s?.noHBand!==true,v=s?.noVBand!==true,N=0,R=e.rows.length,B=t?.length??Math.max(0,...e.rows.map(y=>y.cells.reduce((S,w)=>S+(w.formatting?.gridSpan??1),0))),h=e.rows.map((y,S)=>{let w=S===0&&!!s?.firstRow,C=S===R-1&&!!s?.lastRow,I=k&&!w&&!C?N%2===0?F.band1Horz:F.band2Horz:void 0;return k&&!w&&!C&&N++,Fe(y,n,w,t,l,F,I,v,s,c,S,R,B,i,m,r)});return b$1.node("table",u,h)}function Fe(e,n,r,i,t,l,o,s,f,p,c,d,m,u,F,k){let v={height:e.formatting?.height?.value,heightRule:e.formatting?.heightRule,isHeader:!!e.formatting?.header,_originalFormatting:e.formatting||void 0},N=e.cells.length,R=c===0,B=c===(d??1)-1,h=e.formatting?.conditionalFormat,y=h?.firstRow??R,S=h?.lastRow??B,w=m??N,C=0,I=[];for(let J=0;J<e.cells.length;J++){let Y=e.cells[J],L=Y.formatting?.gridSpan??1,pe=`${c??0}-${C}`,oe=u?.get(pe),me=oe?.skip??false,he=oe?.rowSpan??1,re;if(i&&t&&t>0){let W=0;for(let z=0;z<L&&C+z<i.length;z++)W+=i[C+z];re=Math.round(W/t*100);}if(C+=L,me)continue;let ie=C-L===0,le=C===w,T=Y.formatting?.conditionalFormat,G=T?.firstRow??y,Q=T?.lastRow??S,O=T?.firstColumn??ie,V=T?.lastColumn??le,$;if(s){let W=f?.firstColumn?1:0,z=C-L-W;z>=0&&!(f?.lastColumn&&V)&&!(f?.firstColumn&&O)&&($=z%2===0?l?.band1Vert:l?.band2Vert);}T?.oddVBand?$=l?.band1Vert:T?.evenVBand&&($=l?.band2Vert);let H=o;h?.oddHBand?H=l?.band1Horz:h?.evenHBand&&(H=l?.band2Horz),T?.oddHBand?H=l?.band1Horz:T?.evenHBand&&(H=l?.band2Horz);let g=l?.wholeTable;g=M(g,H),g=M(g,$),G&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(g=M(g,l?.firstRow)),Q&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(g=M(g,l?.lastRow)),O&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.firstCol)),V&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.lastCol)),G&&O&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.nwCell)),G&&V&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.neCell)),Q&&O&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.swCell)),Q&&V&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.seCell)),I.push(Ce(Y,n,r,re,g,p,R,B,ie,le,he,F,k));}return b$1.node("tableRow",v,I)}var we=["top","bottom","left","right","insideH","insideV"];function xe(e,n){if(!e)return e;let r;for(let i of we){let t=e[i];if(!t?.color?.themeColor||t.color.auto)continue;let l=b$3(t.color,n);l&&(r??(r={...e}),r[i]={...t,color:{rgb:l}});}return r??e}function Ce(e,n,r,i,t,l,o,s,f,p,c,d,m){let u=e.formatting,F=c??1,k=u?.width?.value,v=u?.width?.type;k===void 0&&i!==void 0&&(k=i,v="pct");let N=b$3(u?.shading?.fill??t?.tcPr?.shading?.fill,m),R=l?{top:o?l.top:l.insideH,bottom:s?l.bottom:l.insideH,left:f?l.left:l.insideV,right:p?l.right:l.insideV}:void 0,B=t?.tcPr?.borders,h=u?.borders,y=xe(R||B||h?{...R??{},...B??{},...h??{}}:void 0,m),S={colspan:u?.gridSpan??1,rowspan:F,width:k,widthType:v,verticalAlign:u?.verticalAlign,backgroundColor:N,textDirection:u?.textDirection,noWrap:u?.noWrap,borders:y,margins:u?.margins?{top:u.margins.top?.value,bottom:u.margins.bottom?.value,left:u.margins.left?.value,right:u.margins.right?.value}:t?.tcPr?.margins?{top:t.tcPr.margins.top?.value,bottom:t.tcPr.margins.bottom?.value,left:t.tcPr.margins.left?.value,right:t.tcPr.margins.right?.value}:d,_originalFormatting:u||void 0,_originalResolvedFill:N},w=[];for(let I of e.content)I.type==="paragraph"?w.push(E(I,n,void 0,t?.rPr)):I.type==="table"&&w.push(K(I,n));w.length===0&&w.push(b$1.node("paragraph",{},[]));let C=r?"tableHeader":"tableCell";return b$1.node(C,S,w)}function ne(e,n){let r=Se(e),i=E(e,n),t=[],l=r.length>0&&i.content.size===0,{anchored:o,inFlow:s}=ke(r);for(let f of o)t.push(ue(f,n));l||t.push(i);for(let f of s)t.push(ue(f,n));return t}function ke(e){let n=[],r=[];for(let i of e)a$1(i)?n.push(i):r.push(i);return {anchored:n,inFlow:r}}function Se(e){let n=[];for(let r of e.content)if(r.type==="run"){for(let i of r.content)if(i.type==="shape"&&"shape"in i){let t=i.shape;t.textBody&&t.textBody.content.length>0&&n.push({type:"textBox",id:t.id,size:t.size,position:t.position,wrap:t.wrap,fill:t.fill,outline:t.outline,content:t.textBody.content,margins:t.textBody.margins});}}return n}function ue(e$1,n){let r=e$1.size?.width?e(e$1.size.width):200,i=e$1.size?.height?e(e$1.size.height):void 0,t;e$1.fill?.color?.rgb&&(t=`#${e$1.fill.color.rgb}`);let l,o,s;e$1.outline&&e$1.outline.width&&(l=Math.round(e$1.outline.width/914400*96*100)/100,e$1.outline.color?.rgb&&(o=`#${e$1.outline.color.rgb}`),s=e$1.outline.style||"solid");let f=e$1.margins?.top!=null?e(e$1.margins.top):4,p=e$1.margins?.bottom!=null?e(e$1.margins.bottom):4,c=e$1.margins?.left!=null?e(e$1.margins.left):7,d=e$1.margins?.right!=null?e(e$1.margins.right):7,m=[];for(let u of e$1.content)m.push(E(u,n));return m.length===0&&m.push(b$1.node("paragraph",{},[])),b$1.node("textBox",{width:r,height:i,textBoxId:e$1.id,fillColor:t,outlineWidth:l,outlineColor:o,outlineStyle:s,marginTop:f,marginBottom:p,marginLeft:c,marginRight:d,...b$2(e$1)},m)}function it(e,n){let r=e.package.document.content,i=[],t=e.package.theme??null,l=n?.styles?b(n.styles):null;for(let o of r)if(o.type==="paragraph")i.push(...ne(o,l)),ce(o)&&i.push(b$1.node("pageBreak"));else if(o.type==="table"){let s=K(o,l,t);i.push(s);}return i.length===0&&i.push(b$1.node("paragraph",{},[])),b$1.node("doc",null,i)}function Re(e,n){let r=[],i=n?.styles?b(n.styles):null,t=n?.theme??null;for(let l of e)l.type==="paragraph"?r.push(...ne(l,i)):l.type==="table"&&r.push(K(l,i,t));return r.length===0&&r.push(b$1.node("paragraph",{},[])),b$1.node("doc",null,r)}function lt(e,n){return Re(e,n)}function st(){return b$1.node("doc",null,[b$1.node("paragraph",{},[])])}export{it as a,Re as b,lt as c,st as d};
@@ -1 +0,0 @@
1
- import {c,d,e}from'./chunk-LBKMYD3M.mjs';import {f}from'./chunk-VW22RZ6C.mjs';function k(t){let e=new Map,n=new Map;return t.descendants(i=>{let o=i.marks.find(r=>r.type.name==="insertion"),a=i.marks.find(r=>r.type.name==="deletion");if(o){let r=Number(o.attrs.revisionId);Number.isFinite(r)&&e.set(r,(e.get(r)??0)+1);}if(a){let r=Number(a.attrs.revisionId);Number.isFinite(r)&&n.set(r,(n.get(r)??0)+1);}}),{insertionById:e,deletionById:n}}function A(t){return t.attrs.href||""}function B(t){let e=t.filter(n=>n.type.name!=="hyperlink");return e.length===0?"":e.map(n=>`${n.type.name}:${JSON.stringify(n.attrs)}`).sort().join("|")}function T(t){let e={};for(let n of t)switch(n.type.name){case "bold":e.bold=true,e.boldCs=true;break;case "italic":e.italic=true,e.italicCs=true;break;case "underline":{let i=n.attrs;e.underline={style:i.style||"single",color:i.color};break}case "strike":n.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":{let i=n.attrs;e.color={rgb:i.rgb,themeColor:i.themeColor,themeTint:i.themeTint,themeShade:i.themeShade};break}case "highlight":e.highlight=n.attrs.color;break;case "fontSize":e.fontSize=n.attrs.size,e.fontSizeCs=n.attrs.size;break;case "fontFamily":{let i=n.attrs;e.fontFamily={ascii:i.ascii,hAnsi:i.hAnsi,eastAsia:i.eastAsia||void 0,cs:i.cs||i.ascii||void 0,asciiTheme:i.asciiTheme,hAnsiTheme:i.hAnsiTheme||void 0,eastAsiaTheme:i.eastAsiaTheme||void 0,csTheme:i.csTheme||void 0};break}case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break;case "allCaps":e.allCaps=true;break;case "smallCaps":e.smallCaps=true;break;case "characterSpacing":{n.attrs.spacing!=null&&(e.spacing=n.attrs.spacing),n.attrs.position!=null&&(e.position=n.attrs.position),n.attrs.scale!=null&&(e.scale=n.attrs.scale),n.attrs.kerning!=null&&(e.kerning=n.attrs.kerning);break}case "emboss":e.emboss=true;break;case "imprint":e.imprint=true;break;case "textShadow":e.shadow=true;break;case "emphasisMark":e.emphasisMark=n.attrs.type||"dot";break;case "textOutline":e.outline=true;break;case "hidden":e.hidden=true;break;case "rtl":e.rtl=true;break;case "textEffect":e.effect=n.attrs.effect||"blinkBackground";break}return e}function N(t){let e=t.attrs.href;return e?.startsWith("#")?{type:"hyperlink",anchor:e.substring(1),tooltip:t.attrs.tooltip||void 0,children:[]}:{type:"hyperlink",href:e,tooltip:t.attrs.tooltip||void 0,rId:t.attrs.rId||void 0,children:[]}}function x(t,e){if(e.isText&&e.text){let n=e.marks.filter(o=>o.type.name!=="hyperlink"),i=C(e.text,n);t.children.push(i);}}function C(t,e){let n=T(e),i={type:"text",text:t};return {type:"run",formatting:Object.keys(n).length>0?n:void 0,content:[i]}}function E(t,e){let n=t.content[t.content.length-1];n&&n.type==="text"?n.text+=e:t.content.push({type:"text",text:e});}function L(){return {type:"run",content:[{type:"break",breakType:"textWrapping"}]}}function H(){return {type:"run",content:[{type:"tab"}]}}function O(t,e){let n=t.attrs,i=e&&e.length>0?T(e):void 0,o=n.displayText||"";if(!o)switch(n.fieldType){case "PAGE":o="1";break;case "NUMPAGES":o="1";break;default:o=" ";break}let a={type:"run",content:[{type:"text",text:o}],...i&&Object.keys(i).length>0?{formatting:i}:{}};return n.fieldKind==="complex"?{type:"complexField",instruction:n.instruction,fieldType:n.fieldType,fieldCode:[],fieldResult:[a],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}:{type:"simpleField",instruction:n.instruction,fieldType:n.fieldType,content:[a],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}}function W(t){let e=t.attrs;return {type:"mathEquation",display:e.display||"inline",ommlXml:e.ommlXml,plainText:e.plainText||void 0}}function D(t){let e=t.attrs,i={type:e.wrapType||"inline"};e.distTop!==void 0&&(i.distT=f(e.distTop)),e.distBottom!==void 0&&(i.distB=f(e.distBottom)),e.distLeft!==void 0&&(i.distL=f(e.distLeft)),e.distRight!==void 0&&(i.distR=f(e.distRight)),e.wrapText&&(i.wrapText=e.wrapText);let o={type:"image",rId:e.rId||"",src:e.src,alt:e.alt||void 0,title:e.title||void 0,size:{width:f(e.width||0),height:f(e.height||0)},wrap:i};if(e.transform){let r=e.transform,l={},s=r.match(/rotate\(([-\d.]+)deg\)/);s&&(l.rotation=parseFloat(s[1])),r.includes("scaleX(-1)")&&(l.flipH=true),r.includes("scaleY(-1)")&&(l.flipV=true),(l.rotation||l.flipH||l.flipV)&&(o.transform=l);}if(e.position?.horizontal&&e.position?.vertical){let r=e.position;o.position={horizontal:{relativeTo:r.horizontal.relativeTo||"column",alignment:r.horizontal.align,posOffset:r.horizontal.posOffset},vertical:{relativeTo:r.vertical.relativeTo||"paragraph",alignment:r.vertical.align,posOffset:r.vertical.posOffset}};}if(e.borderWidth&&e.borderWidth>0){let r={solid:"solid",dotted:"dot",dashed:"dash",double:"solid",groove:"solid",ridge:"solid",inset:"solid",outset:"solid"};o.outline={width:f(e.borderWidth),color:e.borderColor?{rgb:e.borderColor.replace("#","")}:void 0,style:e.borderStyle&&r[e.borderStyle]||"solid"};}if(e.hlinkHref&&(o.hlinkHref=e.hlinkHref),e.cropTop!==void 0||e.cropRight!==void 0||e.cropBottom!==void 0||e.cropLeft!==void 0){let r={};e.cropTop!==void 0&&e.cropTop!==null&&(r.top=e.cropTop),e.cropRight!==void 0&&e.cropRight!==null&&(r.right=e.cropRight),e.cropBottom!==void 0&&e.cropBottom!==null&&(r.bottom=e.cropBottom),e.cropLeft!==void 0&&e.cropLeft!==null&&(r.left=e.cropLeft),Object.keys(r).length>0&&(o.crop=r);}if(e.opacity!==void 0&&e.opacity!==null&&e.opacity<1&&(o.opacity=e.opacity),e.layoutInCell!==void 0&&e.layoutInCell!==null&&(o.layoutInCell=e.layoutInCell),e.allowOverlap!==void 0&&e.allowOverlap!==null&&(o.allowOverlap=e.allowOverlap),e.effectExtentTop||e.effectExtentBottom||e.effectExtentLeft||e.effectExtentRight){let r={};e.effectExtentTop&&(r.top=f(e.effectExtentTop)),e.effectExtentBottom&&(r.bottom=f(e.effectExtentBottom)),e.effectExtentLeft&&(r.left=f(e.effectExtentLeft)),e.effectExtentRight&&(r.right=f(e.effectExtentRight)),Object.keys(r).length>0&&(o.padding=r);}return {type:"run",content:[{type:"drawing",image:o}]}}function j(t){let e=t.attrs,n={type:"shape",shapeType:e.shapeType||"rect",id:e.shapeId||void 0,size:{width:e.width?f(e.width):0,height:e.height?f(e.height):0}};if(e.fillType==="gradient"&&e.gradientStops)try{let o=JSON.parse(e.gradientStops);n.fill={type:"gradient",gradient:{type:e.gradientType||"linear",angle:e.gradientAngle||void 0,stops:o.map(a=>({position:a.position,color:{rgb:a.color.replace("#","")}}))}};}catch{n.fill={type:"solid",color:{rgb:(e.fillColor||"000000").replace("#","")}};}else e.fillColor?n.fill={type:e.fillType||"solid",color:{rgb:e.fillColor.replace("#","")}}:e.fillType==="none"&&(n.fill={type:"none"});if(e.outlineWidth&&e.outlineWidth>0){let o={solid:"solid",dotted:"dot",dashed:"dash"};n.outline={width:f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&o[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:n}]}}function b(t,e){let n=t.attrs,i=J(z(t,e),t),o=n.bookmarks;if(o&&o.length>0){let r=o.map(s=>({type:"bookmarkStart",id:s.id,name:s.name})),l=o.map(s=>({type:"bookmarkEnd",id:s.id}));i=[...r,...i,...l];}let a={type:"paragraph",paraId:n.paraId||void 0,textId:n.textId||void 0,formatting:q(n),content:i};return n.renderedPageBreakBefore&&(a.renderedPageBreakBefore=true),n._sectionProperties?a.sectionProperties=n._sectionProperties:n.sectionBreakType&&(a.sectionProperties={sectionStart:n.sectionBreakType}),a}function J(t,e){let n=new Set;if(e.forEach(r=>{for(let l of r.marks)l.type.name==="comment"&&n.add(l.attrs.commentId);}),n.size===0)return t;let i=[],o=new Set,a=0;e.forEach(r=>{let l=new Set;for(let s of r.marks)s.type.name==="comment"&&l.add(s.attrs.commentId);for(let s of [...o])l.has(s)||(i.push({type:"commentRangeEnd",id:s}),o.delete(s));for(let s of l)o.has(s)||(i.push({type:"commentRangeStart",id:s}),o.add(s));a<t.length&&i.push(t[a]),a++;});for(let r of o)i.push({type:"commentRangeEnd",id:r});return i}function q(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.alignment!==(n.alignment||void 0)&&(i.alignment=t.alignment||void 0),t.numPr!==n.numPr&&JSON.stringify(t.numPr)!==JSON.stringify(n.numPr)&&(i.numPr=t.numPr||void 0),t.styleId!==(n.styleId||void 0)&&(i.styleId=t.styleId||void 0),t.pageBreakBefore!==(n.pageBreakBefore||void 0)&&(i.pageBreakBefore=t.pageBreakBefore||void 0),t.bidi!==(n.bidi||void 0)&&(i.bidi=t.bidi||void 0),i}if(t.alignment||t.spaceBefore||t.spaceAfter||t.lineSpacing||t.indentLeft||t.indentRight||t.indentFirstLine||t.numPr||t.styleId||t.borders||t.shading||t.tabs||t.outlineLevel!=null||t.contextualSpacing||t.bidi)return {alignment:t.alignment||void 0,spaceBefore:t.spaceBefore||void 0,spaceAfter:t.spaceAfter||void 0,lineSpacing:t.lineSpacing||void 0,lineSpacingRule:t.lineSpacingRule||void 0,indentLeft:t.indentLeft||void 0,indentRight:t.indentRight||void 0,indentFirstLine:t.indentFirstLine||void 0,hangingIndent:t.hangingIndent||void 0,numPr:t.numPr||void 0,styleId:t.styleId||void 0,borders:t.borders||void 0,shading:t.shading||void 0,tabs:t.tabs||void 0,outlineLevel:t.outlineLevel??void 0,contextualSpacing:t.contextualSpacing||void 0,bidi:t.bidi||void 0}}function z(t,e){let n=[],i=e??k(t),o=null,a=null,r=null;return t.forEach(l=>{let s=l.marks.find(p=>p.type.name==="footnoteRef");if(s){o&&(n.push(o),o=null,a=null),r&&(n.push(r),r=null);let u={type:s.attrs.noteType==="endnote"?"endnoteRef":"footnoteRef",id:parseInt(s.attrs.id,10)||0};n.push({type:"run",content:[u]});return}let d=l.marks.find(p=>p.type.name==="insertion"),m=l.marks.find(p=>p.type.name==="deletion");if(d||m){o&&(n.push(o),o=null,a=null),r&&(n.push(r),r=null);let p=d||m,u=l.marks.filter(R=>R.type.name!=="insertion"&&R.type.name!=="deletion"),h=T(u),y={type:"run",content:l.isText&&l.text?[{type:"text",text:l.text}]:[],...Object.keys(h).length>0?{formatting:h}:{}},g={id:p.attrs.revisionId,author:p.attrs.author||"Unknown",date:p.attrs.date||void 0},M=g.id,K=(i.insertionById.get(M)??0)>0,V=(i.deletionById.get(M)??0)>0,v=K&&V;d?v?n.push({type:"moveTo",info:g,content:[y]}):n.push({type:"insertion",info:g,content:[y]}):v?n.push({type:"moveFrom",info:g,content:[y]}):n.push({type:"deletion",info:g,content:[y]});return}let f=l.marks.find(p=>p.type.name==="hyperlink");if(f){let p=A(f),u=r?.href||(r?.anchor?`#${r.anchor}`:"");r&&u===p?x(r,l):(o&&(n.push(o),o=null,a=null),r&&n.push(r),r=N(f),x(r,l));return}if(r&&(n.push(r),r=null),l.isText){let p=B(l.marks);o&&a===p?E(o,l.text||""):(o&&n.push(o),o=C(l.text||"",l.marks),a=p);}else l.type.name==="hardBreak"?(o&&(n.push(o),o=null,a=null),n.push(L())):l.type.name==="image"?(o&&(n.push(o),o=null,a=null),n.push(D(l))):l.type.name==="shape"?(o&&(n.push(o),o=null,a=null),n.push(j(l))):l.type.name==="tab"?(o&&(n.push(o),o=null,a=null),n.push(H())):l.type.name==="field"?(o&&(n.push(o),o=null,a=null),n.push(O(l,l.marks))):l.type.name==="sdt"?(o&&(n.push(o),o=null,a=null),n.push(U(l))):l.type.name==="math"&&(o&&(n.push(o),o=null,a=null),n.push(W(l)));}),o&&n.push(o),r&&n.push(r),n}function U(t){let e=t.attrs,n={sdtType:e.sdtType??"richText",alias:e.alias??void 0,tag:e.tag??void 0,lock:e.lock??void 0,placeholder:e.placeholder??void 0,showingPlaceholder:e.showingPlaceholder??void 0,dateFormat:e.dateFormat??void 0,listItems:e.listItems?JSON.parse(e.listItems):void 0,checked:e.checked!=null?e.checked:void 0},o=z(t).filter(a=>a.type==="run"||a.type==="hyperlink"||a.type==="simpleField"||a.type==="complexField"||a.type==="inlineSdt"||a.type==="mathEquation");return {type:"inlineSdt",properties:n,content:o}}function X(t){for(let e of t)for(let n of e.cells){let i=n.formatting?.borders;if(i){let o=i.top||i.left||i.right||i.bottom||i.insideH||i.insideV;return o?{top:i.top??o,bottom:i.bottom??o,left:i.left??o,right:i.right??o,insideH:i.insideH??i.bottom??o,insideV:i.insideV??i.right??o}:void 0}}}function G(t,e){let n=[],i=[],o=0;for(let a=0;a<t.childCount;a++){let r=t.child(a),l=0;r.forEach(s=>{if(s.type.name!=="tableCell"&&s.type.name!=="tableHeader")return;for(;n[a]?.[l];)l++;let d=s.attrs.rowspan||1,m=s.attrs.colspan||1;i.push({row:a,col:l,rowspan:d,colspan:m,cell:Z(s,e)});for(let f=a;f<a+d;f++){let p=n[f]??[];n[f]=p;for(let u=l;u<l+m;u++)p[u]=true;}l+=m,o=Math.max(o,l);});}return {anchors:i,totalCols:o}}function P(t,e){let n=t.attrs,{anchors:i,totalCols:o}=G(t,e),a=new Map,r=new Map;for(let d of i){a.set(`${d.row}-${d.col}`,d);for(let m=d.row;m<d.row+d.rowspan;m++)for(let f=d.col;f<d.col+d.colspan;f++)r.set(`${m}-${f}`,d);}let l=[];for(let d=0;d<t.childCount;d++){let m=t.child(d),f=[];for(let p=0;p<o;){let u=a.get(`${d}-${p}`);if(u){let g={...u.cell.formatting??{}};u.colspan>1?g.gridSpan=u.colspan:delete g.gridSpan,u.rowspan>1?g.vMerge="restart":delete g.vMerge,f.push({...u.cell,formatting:Object.keys(g).length?g:void 0}),p+=u.colspan;continue}let h=r.get(`${d}-${p}`);if(!h){p++;continue}let y={...h.cell.formatting??{}};h.colspan>1?y.gridSpan=h.colspan:delete y.gridSpan,y.vMerge="continue",f.push({...h.cell,content:[],formatting:y}),p+=h.colspan;}l.push({type:"tableRow",formatting:Q(m.attrs),cells:f});}let s=Y(n)||void 0;if(!s?.borders){let d=X(l);if(d)if(s)s.borders=d;else return {type:"table",columnWidths:n.columnWidths||void 0,formatting:{borders:d},rows:l}}return {type:"table",columnWidths:n.columnWidths||void 0,formatting:s,rows:l}}function Y(t){if(t._originalFormatting){let o=t._originalFormatting,a={...o};t.styleId!==(o.styleId||void 0)&&(a.styleId=t.styleId||void 0),t.justification!==(o.justification||void 0)&&(a.justification=t.justification||void 0),t.floating!==(o.floating||void 0)&&(a.floating=t.floating||void 0),t.look!==(o.look||void 0)&&(a.look=t.look||void 0);let r=o.width?.value,l=o.width?.type;return (t.width!==r||t.widthType!==l)&&(t.width!=null||t.widthType?a.width={value:t.width??0,type:t.widthType||"dxa"}:a.width=void 0),t.cellMargins&&(a.cellMargins={top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}),a}if(!(t.styleId||t.width!=null||t.widthType||t.justification||t.floating||t.cellMargins||t.look))return;let n=t.cellMargins?{top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}:void 0,i;return (t.width!=null||t.widthType)&&(i={value:t.width??0,type:t.widthType||"dxa"}),{styleId:t.styleId||void 0,width:i,justification:t.justification||void 0,floating:t.floating||void 0,cellMargins:n,look:t.look||void 0}}function Q(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.height!==(n.height?.value||void 0)&&(i.height=t.height?{value:t.height,type:"dxa"}:void 0),t.heightRule!==(n.heightRule||void 0)&&(i.heightRule=t.heightRule||void 0),t.isHeader!==(n.header||void 0)&&(i.header=t.isHeader||void 0),i}if(t.height||t.isHeader)return {height:t.height?{value:t.height,type:"dxa"}:void 0,heightRule:t.heightRule||void 0,header:t.isHeader||void 0}}function Z(t,e){let n=t.attrs,i=[];return t.forEach(o=>{o.type.name==="paragraph"?i.push(b(o,e)):o.type.name==="table"&&i.push(P(o,e));}),{type:"tableCell",formatting:ee(n),content:i}}function ee(t){if(t._originalFormatting){let i=t._originalFormatting,o={...i};if(t.colspan>1&&(o.gridSpan=t.colspan),t.width!=null&&(o.width={value:t.width,type:t.widthType||"dxa"}),t.verticalAlign!==(i.verticalAlign||void 0)&&(o.verticalAlign=t.verticalAlign||void 0),t.backgroundColor?t._originalResolvedFill===t.backgroundColor&&i.shading?o.shading=i.shading:o.shading={fill:{rgb:t.backgroundColor}}:i.shading&&(o.shading=void 0),t.borders&&(o.borders=t.borders),t.margins){let a=t.margins,r={};a.top!=null&&(r.top={value:a.top,type:"dxa"}),a.bottom!=null&&(r.bottom={value:a.bottom,type:"dxa"}),a.left!=null&&(r.left={value:a.left,type:"dxa"}),a.right!=null&&(r.right={value:a.right,type:"dxa"}),o.margins=r;}return t.textDirection!==(i.textDirection||void 0)&&(o.textDirection=t.textDirection||void 0),o}if(!(t.colspan>1||t.rowspan>1||t.width!=null||t.verticalAlign||t.backgroundColor||t.borders||t.margins||t.textDirection))return;let n;if(t.margins){let i=t.margins;n={},i.top!=null&&(n.top={value:i.top,type:"dxa"}),i.bottom!=null&&(n.bottom={value:i.bottom,type:"dxa"}),i.left!=null&&(n.left={value:i.left,type:"dxa"}),i.right!=null&&(n.right={value:i.right,type:"dxa"});}return {gridSpan:t.colspan>1?t.colspan:void 0,width:t.width!=null?{value:t.width,type:t.widthType||"dxa"}:void 0,verticalAlign:t.verticalAlign||void 0,textDirection:t.textDirection||void 0,shading:t.backgroundColor?{fill:{rgb:t.backgroundColor}}:void 0,borders:t.borders,margins:n}}function w(t){let e$1=t.attrs,n=[];t.forEach(l=>{l.type.name==="paragraph"&&n.push(b(l));});let i={type:"shape",shapeType:"rect",id:e$1.textBoxId||void 0,size:{width:e$1.width?f(e$1.width):0,height:e$1.height?f(e$1.height):0},textBody:{content:n.length>0?n:[{type:"paragraph",content:[]}],margins:{top:e$1.marginTop!=null?f(e$1.marginTop):void 0,bottom:e$1.marginBottom!=null?f(e$1.marginBottom):void 0,left:e$1.marginLeft!=null?f(e$1.marginLeft):void 0,right:e$1.marginRight!=null?f(e$1.marginRight):void 0}}},o=d(e$1);o&&(i.position=o);let a=e(e$1);if(a&&(i.wrap=a),e$1.fillColor&&(i.fill={type:"solid",color:{rgb:e$1.fillColor.replace("#","")}}),e$1.outlineWidth&&e$1.outlineWidth>0){let l={solid:"solid",dotted:"dot",dashed:"dash"};i.outline={width:f(e$1.outlineWidth),color:e$1.outlineColor?{rgb:e$1.outlineColor.replace("#","")}:void 0,style:e$1.outlineStyle&&l[e$1.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:i}]}}function _(t){return {type:"paragraph",content:[w(t)]}}function te(t,e){let i={content:$(t),finalSectionProperties:e?.package.document.finalSectionProperties,sections:e?.package.document.sections,comments:e?.package.document.comments};return e?{...e,package:{...e.package,document:i}}:{package:{document:i}}}function $(t){let e=[],n=k(t),i=[],o=()=>{for(let a of i)e.push({type:"paragraph",content:[a]});i=[];};return t.forEach(a=>{if(a.type.name==="paragraph"){let r=b(a,n);i.length>0&&(r.content=[...i,...r.content],i=[]),e.push(r);}else if(a.type.name==="table")o(),e.push(P(a,n));else if(a.type.name==="textBox"){let r=a.attrs;c(r)?i.push(w(a)):(o(),e.push(_(a)));}else a.type.name==="pageBreak"&&(o(),e.push(ne()));}),o(),e}function ne(){return {type:"paragraph",content:[{type:"run",content:[{type:"break",breakType:"page"}]}]}}function xe(t,e){return te(e,t)}function Ce(t){return $(t)}export{te as a,xe as b,Ce as c};
@@ -1,2 +0,0 @@
1
- import {d}from'./chunk-7GHQ4YCJ.mjs';import {q as q$1,g,h}from'./chunk-5N5DBQJV.mjs';import {a as a$2}from'./chunk-7E5VBRDL.mjs';import {p,r}from'./chunk-G6Y4UZMJ.mjs';import {v as v$1}from'./chunk-BWHUD2XC.mjs';import {c as c$1}from'./chunk-UIROUI5I.mjs';import {b,a,c}from'./chunk-QPFJJPIC.mjs';import {c as c$2}from'./chunk-MOKKS75W.mjs';import {a as a$1}from'./chunk-AMENZY5F.mjs';import {i,e}from'./chunk-VW22RZ6C.mjs';var _={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function st(e){return e.kind==="paragraph"}function lt(e){return e.kind==="table"}function dt(e){return e.kind==="image"}function ne(e){e.style.position="absolute",e.style.overflow="hidden";}function pt(e,t,n){let o=n.createElement("div");return o.className=`${_.fragment} ${_.paragraph}`,ne(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function ct(e,t,n){let o=n.createElement("div");return o.className=`${_.fragment} ${_.table}`,ne(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function gt(e,t,n){let o=n.createElement("div");return o.className=`${_.fragment} ${_.image}`,ne(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function xe(e,t,n={}){let o=n.document??document;if(st(e))return pt(e,t,o);if(lt(e))return ct(e,t,o);if(dt(e))return gt(e,t,o);let r=o.createElement("div");r.className=_.fragment,ne(r);let i=e;return i.blockId!==void 0&&(r.dataset.blockId=String(i.blockId)),i.kind&&(r.dataset.kind=i.kind),r}var E={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function W(e){return e.kind==="text"}function j(e){return e.kind==="tab"}function K(e){return e.kind==="image"}function U(e){return e.kind==="lineBreak"}function X(e){return e.kind==="field"}function Z(e){return !b(e.wrapType)&&e.wrapType!=="topAndBottom"}function G(e){return e.wrapType==="behind"}function H(e){return a(e.wrapType)?true:e.displayMode==="float"}function ft(e){return b(e.wrapType)||e.wrapType==="topAndBottom"?false:c(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}function oe(e){return e==="left"?"right":e==="right"?"left":"bothSides"}var je={image:"layout-image",imageAnchored:"layout-image-anchored"};function q(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function J(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,i=t.cropLeft??0;(n||o||r||i)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${i*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function re(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=je.image,e.isAnchored&&a.classList.add(je.imageAnchored),a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",e.zIndex!==void 0&&(a.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(a.style.zIndex="-1"),a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let l=i.createElement("img");if(l.src=t.src,l.alt=t.alt??"",l.style.width="100%",l.style.height="100%",l.style.objectFit="contain",l.style.display="block",t.transform&&(l.style.transform=t.transform),l.draggable=false,t.hlinkHref){let d=i.createElement("a");d.href=t.hlinkHref,d.target="_blank",d.rel="noopener noreferrer",d.style.display="block",d.style.width="100%",d.style.height="100%",d.appendChild(l),a.appendChild(d);}else a.appendChild(l);return a}function mt(e,t,n){if(t.fontFamily&&(e.style.fontFamily=a$1(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",i=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=i,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=i;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(i=>!n||!n.has(i));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function D(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function ie(e,t,n){let o=t.createElement("span");if(o.className=`${E.run} ${E.text}`,mt(o,e,n),D(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text;let i=e.color||"#0563c1";r.style.color=i,r.style.textDecoration="underline",o.style.color=i,o.appendChild(r);}else o.textContent=e.text;return o}function Te(e,t,n,o){let r=t.createElement("span");if(r.className=`${E.run} ${E.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,r.style.overflow="hidden",D(r,e.pmStart,e.pmEnd),o&&o!=="none"){let i=ht(o);i&&(r.style.backgroundImage=`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='4' height='16'><text x='0' y='12' font-size='12' fill='%23000'>${i}</text></svg>`)}")`,r.style.backgroundRepeat="repeat-x",r.style.backgroundPosition="bottom");}return r.textContent="\xA0",r}function ht(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function Ke(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ue(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),i=Math.abs(Math.cos(o));return {w:e*i+t*r,h:e*r+t*i}}function ut(e,t){let n=t.createElement("img");n.className=`${E.run} ${E.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),q(e)&&J(n,e);let o=Ke(e.transform);if(o!==0){let r=Ue(e.width,e.height,o),i=t.createElement("span");return i.style.display="inline-block",i.style.position="relative",i.style.width=`${r.w}px`,i.style.height=`${r.h}px`,i.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,D(i,e.pmStart,e.pmEnd),i.appendChild(n),i}return n.style.display="inline-block",n.style.verticalAlign="middle",D(n,e.pmStart,e.pmEnd),n}function Ye(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),q(e)&&J(o,e);let r=Ke(e.transform);if(r!==0){let i=Ue(e.width,e.height,r);n.style.height=`${i.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return D(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function Se(e,t){return H(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?Ye(e,t):ut(e,t)}function we(e,t){let n=t.createElement("br");return n.className=`${E.run} ${E.lineBreak}`,D(n,e.pmStart,e.pmEnd),n}function Fe(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={text:o,bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,color:e.color,highlight:e.highlight,fontFamily:e.fontFamily,fontSize:e.fontSize,pmStart:e.pmStart,pmEnd:e.pmEnd};return ie(r,t,n?.resolvedCommentIds)}function Xe(e,t,n){if(W(e))return ie(e,t,n?.resolvedCommentIds);if(j(e))return Te(e,t,48,void 0);if(K(e))return Se(e,t);if(U(e))return we(e,t);if(X(e)&&n)return Fe(e,t,n);let o=t.createElement("span");return o.className=E.run,o}function ke(e){return e/1440*96}function yt(e){return e/96*1440}function bt(e){let{explicitStops:t=[],defaultTabInterval:n=720,leftIndent:o=0}=e,r=t.filter(c=>c.val!=="clear").filter(c=>c.pos>=o),i=t.filter(c=>c.val==="clear").map(c=>c.pos),a=r.reduce((c,x)=>Math.max(c,x.pos),0),l=[...r];o>0&&!r.some(c=>c.pos<=o)&&(i.some(x=>Math.abs(x-o)<20)||l.push({val:"start",pos:o,leader:"none"}));let g=a>0?Math.max(a,o):o,s=o+14400;for(;g<s;){g+=n;let c=r.some(f=>Math.abs(f.pos-g)<20),x=i.some(f=>Math.abs(f-g)<20),b=o>0&&Math.abs(g-o)<20;!c&&!x&&!b&&l.push({val:"start",pos:g,leader:"none"});}return l.sort((c,x)=>c.pos-x.pos)}function Ze(e,t,n="",o,r="."){let{defaultTabInterval:i=720}=t,a=yt(e),d=bt(t).find(c=>c.pos>a);if(!d){let c=ke(i),x=c-e%c;return x<=0&&(x=c),{width:x,alignment:"default"}}let s=ke(d.pos)-e;if(d.val==="center"||d.val==="end"){let c=o?o(n):0;d.val==="center"?s-=c/2:s-=c;}else if(d.val==="decimal"){let c=n.indexOf(r);if(c>=0&&o){let x=n.slice(0,c),b=o(x);s-=b;}}else if(d.val==="bar")return {width:0,leader:d.leader,alignment:"bar"};if(s<1){let c=ke(i),x=c-e%c;return x<=0&&(x=c),{width:x,alignment:"default"}}return {width:s,leader:d.leader,alignment:d.val}}function qe(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let i=o[r];if(i)if(W(i)){let a=r===t.fromRun?t.fromChar:0,l=r===t.toRun?t.toChar:i.text.length;if(a>0||l<i.text.length){let d=i.text.slice(a,l);n.push({...i,text:d,pmStart:i.pmStart!==void 0?i.pmStart+a:void 0,pmEnd:i.pmStart!==void 0?i.pmStart+l:void 0});}else n.push(i);}else n.push(i);}return n}function xt(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function Tt(e){return {val:e.val,pos:e.pos,leader:e.leader}}function St(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let i=e[r];if(W(i))o+=i.text;else if(X(i))i.fieldType==="PAGE"&&n?o+=String(n.pageNumber):i.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=i.fallback??"";else if(j(i)||U(i))break}return o}function wt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,i="Calibri")=>{if(!n)return o.length*7;let a=a$1(i).cssFallback,l=r*96/72;return n.font=`${l}px ${a}`,n.measureText(o).width}}function ae(e,t,n,o,r){let i=o.createElement("div");i.className=E.line,i.style.height=`${t.lineHeight}px`,i.style.lineHeight=`${t.lineHeight}px`;let a=qe(e,t);if(a.length===1&&K(a[0])){let p=a[0].position?.horizontal?.align??n;i.style.display="flex",i.style.alignItems="center",i.style.justifyContent=p==="center"?"center":p==="right"?"flex-end":"flex-start";}if(a.length===0){let h=o.createElement("span");return h.className=`${E.run} layout-empty-run`,h.innerHTML="&nbsp;",i.appendChild(h),i}let l=n==="justify",d=false;l&&r&&(d=!r.isLastLine||r.paragraphEndsWithLineBreak,d&&(i.style.textAlign="justify",i.style.textAlignLast="justify",i.style.width=`${r.availableWidth}px`)),i.style.whiteSpace="pre";let g=a.some(h=>W(h)&&h.highlight);i.style.overflow=g?"hidden":"visible";let s=a.some(j),c,x=wt(o);if(s){let h=r?.tabStops?.map(Tt),m=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;c={explicitStops:h,leftIndent:m};}let b=0,f=r?.leftIndentPx??0;if(r?.isFirstLine){let h=r?.firstLineIndentPx??0;b=f+h;}else b=f;for(let h=0;h<a.length;h++){let m=a[h];if(j(m)&&c){let p=St(a,h,r?.context),y=Ze(b,c,p,x),u=Te(m,o,y.width,y.leader);i.appendChild(u),b+=y.width;}else if(W(m)){let p=ie(m,o,r?.context?.resolvedCommentIds);if(m.highlight){let F=(m.fontSize?m.fontSize*96/72:14.67)*1.2,S=Math.max(0,t.lineHeight-F);if(S>0){let I=S/2;p.style.paddingTop=`${I}px`,p.style.paddingBottom=`${I}px`;}}i.appendChild(p);let y=m.fontSize||11,u=m.fontFamily||"Calibri";b+=x(m.text,y,u);}else if(K(m)){if(H(m))continue;let p=xt(m);if(r?.renderedInlineImageKeys?.has(p))continue;r?.renderedInlineImageKeys?.add(p);let y=Se(m,o);i.appendChild(y),m.displayMode!=="block"&&m.wrapType!=="topAndBottom"&&(b+=m.width);}else if(U(m)){let p=we(m,o);i.appendChild(p);}else if(X(m)&&r?.context){let p=Fe(m,o,r.context);i.appendChild(p);let y=m.fallback??"";m.fieldType==="PAGE"?y=String(r.context.pageNumber):m.fieldType==="NUMPAGES"&&(y=String(r.context.totalPages));let u=m.fontSize||11,w=m.fontFamily||"Calibri";b+=x(y,u,w);}else {let p=Xe(m,o,r?.context);i.appendChild(p);}}return i}function Q(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function Je(e,t){return !e&&!t||!e||!t?false:Q(e.top,t.top)&&Q(e.bottom,t.bottom)&&Q(e.left,t.left)&&Q(e.right,t.right)&&Q(e.between,t.between)}function v(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=E.fragment,a.style.position=o.positioning==="absolute"?"absolute":"relative",a.dataset.blockId=String(e.blockId),a.dataset.fromLine=String(e.fromLine),a.dataset.toLine=String(e.toLine),D(a,e.pmStart,e.pmEnd),e.continuesFromPrev&&(a.dataset.continuesFromPrev="true"),e.continuesOnNext&&(a.dataset.continuesOnNext="true");let l=n.lines.slice(e.fromLine,e.toLine),d=t.attrs?.alignment;t.attrs?.styleId&&(a.dataset.styleId=t.attrs.styleId);let g=t.attrs?.bidi;g&&(a.dir="rtl"),d?d==="center"?a.style.textAlign="center":d==="right"?a.style.textAlign="right":d==="left"?a.style.textAlign="left":a.style.textAlign=g?"right":"left":g&&(a.style.textAlign="right");let s=t.attrs?.indent,c=0,x=0;s&&(g?(s.left&&s.left>0&&(x=s.left),s.right&&s.right>0&&(c=s.right)):(s.left&&s.left>0&&(c=s.left),s.right&&s.right>0&&(x=s.right)));let b=t.attrs?.borders;if(b){let w=R=>{switch(R){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};a.style.boxSizing="border-box";let F=R=>`${R.width}px ${w(R.style)} ${R.color}`,S=Je(r.prevBorders,b),I=Je(b,r.nextBorders),C=S?b.between:b.top,T=I?void 0:b.bottom,k=i.createElement("div");if(k.className="layout-paragraph-border",k.style.position="absolute",k.style.pointerEvents="none",k.style.boxSizing="border-box",k.style.left=`${c-(b.left?.space??0)}px`,k.style.right=`${x-(b.right?.space??0)}px`,k.style.top=`${-(C?.space??0)}px`,k.style.bottom=`${-(T?.space??0)}px`,C&&(k.style.borderTop=F(C)),T&&(k.style.borderBottom=F(T)),b.left&&(k.style.borderLeft=F(b.left)),b.right&&(k.style.borderRight=F(b.right)),(C||T||b.left||b.right)&&a.appendChild(k),b.bar){let R=i.createElement("div");R.style.position="absolute",R.style.left="-8px",R.style.top="0",R.style.bottom="0",R.style.borderLeft=F(b.bar),a.style.position="relative",a.appendChild(R);}}t.attrs?.shading&&(a.style.backgroundColor=t.attrs.shading);let f=e.width-c-x,m=t.runs[t.runs.length-1]?.kind==="lineBreak",p=n.lines.length,y=0;s?.hanging&&s.hanging>0?y=-s.hanging:s?.firstLine&&s.firstLine>0&&(y=s.firstLine);let u=r.renderedInlineImageKeys??new Set;for(let w=0;w<l.length;w++){let F=l[w],S=e.fromLine+w,I=S===p-1,C=S===0&&!e.continuesFromPrev,T=F.leftOffset??0,k=F.rightOffset??0,P=f;if(C){let B=s?.hanging&&s.hanging>0,L=s?.firstLine&&s.firstLine>0;B&&s?.hanging?P=f+s.hanging:L&&s?.firstLine&&(P=f-s.firstLine);}if(Ft(F,t)){let B=i.createElement("div");B.className=`${E.line} layout-line-split`,B.style.position="relative",B.style.height=`${F.lineHeight}px`,B.style.lineHeight=`${F.lineHeight}px`;for(let L of F.segments){let he={fromRun:L.fromRun,fromChar:L.fromChar,toRun:L.toRun,toChar:L.toChar,width:L.width,ascent:F.ascent,descent:F.descent,lineHeight:F.lineHeight},O=ae(t,he,d,i,{availableWidth:L.availableWidth,isLastLine:I,isFirstLine:C,paragraphEndsWithLineBreak:m,tabStops:t.attrs?.tabs,leftIndentPx:c,firstLineIndentPx:C?y:0,context:o,renderedInlineImageKeys:u});O.className+=" layout-line-segment",O.style.position="absolute",O.style.left=`${L.leftOffset}px`,O.style.top="0",O.style.width=`${L.availableWidth}px`,B.appendChild(O);}a.appendChild(B);continue}let R=ae(t,F,d,i,{availableWidth:P-T-k,isLastLine:I,isFirstLine:C,paragraphEndsWithLineBreak:m,tabStops:t.attrs?.tabs,leftIndentPx:c,firstLineIndentPx:C?y:0,context:o,renderedInlineImageKeys:u});if(T>0||k>0){T>0&&(R.style.marginLeft=`${T}px`),k>0&&(R.style.marginRight=`${k}px`);let B=P-T-k;B>0&&(R.style.width=`${B}px`);}let Be=s?.hanging&&s.hanging>0,Me=s?.firstLine&&s.firstLine>0;if(C?c>0&&Be?(R.style.paddingLeft=`${c}px`,R.style.textIndent=`-${s.hanging}px`):c>0&&Me?(R.style.paddingLeft=`${c}px`,R.style.textIndent=`${s.firstLine}px`):c>0?R.style.paddingLeft=`${c}px`:Me&&(R.style.textIndent=`${s.firstLine}px`):c>0?R.style.paddingLeft=`${c}px`:Be&&(R.style.paddingLeft=`${s.hanging}px`),x>0&&(R.style.paddingRight=`${x}px`),C&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let B=Math.max(0,c-(s?.hanging??0));R.style.paddingLeft=`${B}px`,R.style.textIndent="0";let L;if(!t.attrs.listMarkerFontFamily||!t.attrs.listMarkerFontSize)for(let $=F.fromRun;$<=F.toRun;$++){let ue=t.runs[$];if(ue&&ue.kind==="text"){L=ue;break}}let he=t.attrs.listMarkerFontFamily??L?.fontFamily??t.attrs.defaultFontFamily,O=t.attrs.listMarkerFontSize??L?.fontSize??t.attrs.defaultFontSize,ve=kt(t.attrs.listMarker,s,i,he,O);if((s?.hanging??0)>0)R.insertBefore(ve,R.firstChild);else {let $=i.createElement("div");$.className="layout-line layout-list-marker-line",$.style.height=`${F.lineHeight}px`,$.style.lineHeight=`${F.lineHeight}px`,$.appendChild(ve),a.appendChild($);}}a.appendChild(R);}return a}function Ft(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function kt(e,t,n,o,r){let i=n.createElement("span");if(i.className="layout-list-marker",o&&(i.style.fontFamily=a$1(o).cssFallback),r){let l=r*96/72;i.style.fontSize=`${l}px`;}i.textContent=e,i.style.textAlign="left",i.style.boxSizing="border-box";let a=t?.hanging??0;return i.style.display="inline-block",a>0&&(i.style.minWidth=`${a}px`),i}function V(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let i=t.createElement("div");i.className=n.itemClass,i.style.position="absolute",i.style.pointerEvents="auto",i.style.top=`${r.y}px`,i.style.left=`${r.x}px`,r.pmStart!==void 0&&(i.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(i.dataset.pmEnd=String(r.pmEnd));let a=t.createElement("img");a.src=r.src,a.style.width=`${r.width}px`,a.style.height=`${r.height}px`,a.style.display="block",r.alt&&(a.alt=r.alt),r.transform&&(a.style.transform=r.transform,a.style.transformOrigin="center center"),q(r)&&J(a,r),i.appendChild(a),o.appendChild(i);}return o}var A={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function It(e$1,t,n){let o=[],r=0;for(let i=0;i<e$1.blocks.length;i++){let a=e$1.blocks[i];if(a?.kind!=="paragraph"){let g=t.blocks[i];g&&g.kind==="table"&&(r+=g.totalHeight??0);continue}let l=a;for(let g of l.runs){if(g.kind!=="image")continue;let s=g;if(!H(s))continue;let c=s.position,x=s.distTop??0,b=s.distBottom??0,f=s.distLeft??12,h=s.distRight??12,m="left",p=0;if(c?.horizontal){let u=c.horizontal;u.align==="right"?(m="right",p=n-s.width):u.align==="left"?p=0:u.align==="center"?p=(n-s.width)/2:u.posOffset!==void 0&&(p=e(u.posOffset),m=p>n/2?"right":"left");}else s.cssFloat==="right"&&(m="right",p=n-s.width);let y=r;if(c?.vertical){let u=c.vertical;u.posOffset!==void 0?y=r+e(u.posOffset):u.align==="top"&&(y=0);}p=Math.max(0,Math.min(p,n-s.width)),o.push({src:s.src,width:s.width,height:s.height,alt:s.alt,transform:s.transform,x:p,y,side:m,distTop:x,distBottom:b,distLeft:f,distRight:h,wrapText:oe(s.cssFloat),wrapType:s.wrapType,pmStart:s.pmStart,pmEnd:s.pmEnd});}let d=t.blocks[i];d&&d.kind==="paragraph"&&(r+=d.totalHeight);}return o}function Rt(e,t,n,o){let r$1=o.createElement("div");r$1.className=A.cellContent,r$1.style.position="relative";let i=e.padding?.left??7,a=e.padding?.right??7,l=Math.max(0,t.width-i-a);r$1.style.width=`${l}px`;let d=It(e,t,l),g;if(d.length>0){g=d.filter(Z).map(f=>{let h=f.x+f.width+f.distRight,m=f.y-f.distTop,p=f.y+f.height+f.distBottom,y=0,u=0,w=f.wrapText??"bothSides";return w==="right"?y=h:w==="left"?u=l-(f.x-f.distLeft):f.side==="left"?y=h:u=l-(f.x-f.distLeft),{leftMargin:y,rightMargin:u,topY:m,bottomY:p}});let b=d.filter(G);b.length>0&&r$1.appendChild(V(b,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let s=0,c=0;for(let b=0;b<e.blocks.length;b++){let f=e.blocks[b],h=t.blocks[b];if(f?.kind==="paragraph"&&h?.kind==="paragraph"){let m=f,p=h,y=m.attrs?.spacing,u=Math.max(c,y?.before??0);s+=u,g&&g.length>0&&(p=r(m,l,{floatingZones:g,paragraphYOffset:s}));let w={blockId:m.id,width:l,height:p.totalHeight,fromLine:0,toLine:p.lines.length,pmStart:m.pmStart,pmEnd:m.pmEnd},F={...n,insideTableCell:true},S=v(w,m,p,F,{document:o});S.style.position="relative",u>0&&(S.style.marginTop=`${u}px`),r$1.appendChild(S),s+=p.totalHeight,c=y?.after??0;}else if(f?.kind==="table"&&h?.kind==="table"){let m=f,p=h,y=c,u=Ct(m,p,n,o);u.style.position="relative",y>0&&(u.style.marginTop=`${y}px`),r$1.appendChild(u),s+=y+(h.totalHeight??0),c=0;}}c>0&&(r$1.style.paddingBottom=`${c}px`);let x=d.filter(b=>!G(b));return x.length>0&&r$1.appendChild(V(x,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r$1}function Ct(e,t,n,o){let r=o.createElement("div");r.className=`${A.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let i=[],a=0;for(let g=0;g<t.rows.length;g++)i.push(a),a+=t.rows[g]?.height??0;i.push(a);let l=new Map,d=0;for(let g=0;g<e.rows.length;g++){let s=e.rows[g],c=t.rows[g];if(!s||!c)continue;let x=Ie(s,c,g,d,t.columnWidths,e.rows.length,n,o,l,i);r.appendChild(x),d+=c.height;}return r.style.height=`${d}px`,r}function se(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,i=n.color??"#000000",a=n.style??"solid";e.style[o]=`${r}px ${a} ${i}`;}}function Pt(e,t,n,o,r,i,a){let l=a.createElement("div");l.className=A.cell,l.style.position="absolute",l.style.left=`${n}px`,l.style.top="0",l.style.width=`${t.width}px`,l.style.height=`${o}px`,l.style.overflow="hidden",l.style.boxSizing="border-box";let d=e.padding?.top??1,g=e.padding?.right??7,s=e.padding?.bottom??1,c=e.padding?.left??7;if(l.style.padding=`${d}px ${g}px ${s}px ${c}px`,e.borders&&(r.isFirstRow&&se(l,"top",e.borders.top),se(l,"right",e.borders.right),se(l,"bottom",e.borders.bottom),r.isFirstCol&&se(l,"left",e.borders.left)),e.background&&(l.style.backgroundColor=e.background),e.noWrap&&(l.style.whiteSpace="nowrap"),e.verticalAlign)switch(l.style.display="flex",l.style.flexDirection="column",e.verticalAlign){case "top":l.style.justifyContent="flex-start";break;case "center":l.style.justifyContent="center";break;case "bottom":l.style.justifyContent="flex-end";break}let x=Rt(e,t,i,a);if(l.appendChild(x),e.blocks.length>0){let b=e.blocks[0],f=e.blocks[e.blocks.length-1];b&&"pmStart"in b&&b.pmStart!==void 0&&(l.dataset.pmStart=String(b.pmStart)),f&&"pmEnd"in f&&f.pmEnd!==void 0&&(l.dataset.pmEnd=String(f.pmEnd));}return l}function Ie(e,t,n,o,r,i,a,l,d,g,s){let c=l.createElement("div");c.className=A.row,c.style.position="absolute",c.style.left="0",c.style.top=`${o}px`,c.style.width="100%",c.style.height=`${t.height}px`,c.dataset.rowIndex=String(n);let x=new Set;if(d){for(let[,h]of d)if(h.startRow<n&&h.startRow+h.rowSpan>n)for(let m=0;m<h.colSpan;m++)x.add(h.columnIndex+m);}let b=0,f=0;for(;x.has(f);)b+=r[f]??0,f++;for(let h=0;h<e.cells.length;h++){let m=e.cells[h],p=t.cells[h];if(!m||!p)continue;let y=m.colSpan??1,u=m.rowSpan??1,w=t.height;if(u>1&&g){w=0;for(let k=n;k<n+u&&k<g.length-1;k++)w+=(g[k+1]??0)-(g[k]??0);w===0&&(w=t.height*u);}let F=n===0||s===true,I=f===0;f+y>=r.length;let T=Pt(m,p,b,w,{isFirstRow:F,isFirstCol:I},a,l);if(T.dataset.cellIndex=String(h),T.dataset.columnIndex=String(f),u>1&&(T.dataset.rowSpan=String(u)),c.appendChild(T),u>1&&d){let k=`${n}-${f}`;d.set(k,{cell:m,cellMeasure:p,columnIndex:f,startRow:n,rowSpan:u,colSpan:y,x:b,totalHeight:w});}for(let k=0;k<y&&f+k<r.length;k++)b+=r[f+k]??0;for(f+=y;x.has(f);)b+=r[f]??0,f++;}return c}function Y(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=A.table,a.style.position=o.positioning==="flow"?"relative":"absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.dataset.blockId=String(e.blockId),a.dataset.fromRow=String(e.fromRow),a.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let l=0;for(let f=0;f<n.columnWidths.length-1;f++){l+=n.columnWidths[f]??0;let h=i.createElement("div");h.className=A.resizeHandle,h.style.position="absolute",h.style.left=`${l-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(f),h.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),a.appendChild(h);}let d=[],g=0;for(let f=0;f<n.rows.length;f++)d.push(g),g+=n.rows[f]?.height??0;d.push(g);let s=new Map,c=e.headerRowCount??0,x=0;if(c>0&&e.continuesFromPrev)for(let f=0;f<c;f++){let h=t.rows[f],m=n.rows[f];if(!h||!m)continue;let p=Ie(h,m,f,x,n.columnWidths,t.rows.length,o,i,s,d,f===0);p.dataset.repeatedHeader="true",a.appendChild(p),x+=m.height;}for(let f=e.fromRow;f<e.toRow;f++){let h=t.rows[f],m=n.rows[f];if(!h||!m)continue;let p=c>0&&e.continuesFromPrev?false:e.continuesFromPrev&&f===e.fromRow,y=Ie(h,m,f,x,n.columnWidths,t.rows.length,o,i,s,d,p);a.appendChild(y),x+=m.height;}let b=0;for(let f=e.fromRow;f<e.toRow;f++)if(b+=n.rows[f]?.height??0,f<e.toRow-1){let h=i.createElement("div");h.className=A.rowResizeHandle,h.style.position="absolute",h.style.left="0",h.style.top=`${b-3}px`,h.style.width="100%",h.style.height="6px",h.style.cursor="row-resize",h.style.zIndex="10",h.dataset.rowIndex=String(f),h.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),a.appendChild(h);}if(e.toRow===t.rows.length){let f=i.createElement("div");f.className=A.tableEdgeHandleBottom,f.style.position="absolute",f.style.left="0",f.style.top=`${b-3}px`,f.style.width="100%",f.style.height="6px",f.style.cursor="row-resize",f.style.zIndex="10",f.dataset.rowIndex=String(t.rows.length-1),f.dataset.tableBlockId=String(e.blockId),f.dataset.isEdge="bottom",e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),a.appendChild(f);}if(e.toRow===t.rows.length){let f=n.columnWidths.reduce((m,p)=>m+p,0),h=i.createElement("div");h.className=A.tableEdgeHandleRight,h.style.position="absolute",h.style.left=`${f-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(n.columnWidths.length-1),h.dataset.tableBlockId=String(e.blockId),h.dataset.isEdge="right",e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),a.appendChild(h);}return a}var Et={textBox:"layout-textbox"};function le(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");if(a.className=Et.textBox,a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.style.boxSizing="border-box",Lt(a,e),t.fillColor&&(a.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let s=t.outlineStyle||"solid",c=t.outlineColor||"#000000";a.style.border=`${t.outlineWidth}px ${s} ${c}`;}let l=t.margins??a$2;a.style.padding=`${l.top}px ${l.right}px ${l.bottom}px ${l.left}px`,a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let d=e.width-l.left-l.right,g=0;for(let s=0;s<t.content.length;s++){let c=t.content[s],x=n.innerMeasures[s];if(!x)continue;let b={blockId:c.id,width:d,height:x.totalHeight,pmStart:c.pmStart,pmEnd:c.pmEnd,fromLine:0,toLine:x.lines.length},f=v(b,c,x,{...o,positioning:"flow"},{document:i});a.appendChild(f),g+=x.totalHeight;}return a}function Lt(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function Qe(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Re(e,t,n,o){let{x:r,side:i}=Bt(e,n,o),a=vt(e,t,o);return {x:r,y:a,side:i}}function Bt(e$1,t,n){let o=e$1.position?.horizontal;if(!o)return e$1.cssFloat==="right"?{x:t-e$1.width,side:"right"}:{x:0,side:"left"};let r=Mt(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e$1.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e$1.width)/2:0,side:"left"};if(o.posOffset!==void 0){let i=r.base+e(o.posOffset);return {x:i,side:i>t/2?"right":"left"}}return {x:r.base,side:"left"}}function Mt(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function vt(e$1,t,n){let o=e$1.position?.vertical;if(!o)return t;let r=$t(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e$1.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e$1.height:t:o.posOffset!==void 0?r.base+e(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function $t(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,i=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:i,size:r};default:return {base:0,size:i}}}function et(e){return e?.align??e?.alignment}function Ht(e$1,t){let n=e$1.position.vertical;if(!n)return e$1.paragraphY;let o=et(n),r=n.posOffset!==void 0?e(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e$1.height-t.flowTop;if(o==="center")return (t.pageHeight-e$1.height)/2-t.flowTop}if(n.relativeTo==="margin"){let i=t.margins.top,a=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return i+r-t.flowTop;if(o==="top")return i-t.flowTop;if(o==="bottom")return i+a-e$1.height-t.flowTop;if(o==="center")return i+(a-e$1.height)/2-t.flowTop}return r!==void 0?e$1.paragraphY+r:e$1.paragraphY}function At(e$1,t,n){let o=t.position.horizontal;if(!o){e$1.style.left="0";return}let r=et(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e$1.style.left=`${e(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e$1.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e$1.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e$1.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e$1.style.left=`${e(o.posOffset)}px`;return}if(r==="right"){e$1.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e$1.style.left=`${(n.contentWidth-t.width)/2}px`;return}e$1.style.left="0";}function tt(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Ce(e,t,n,o){let r=n.document??document,i=r.createElement("div");i.style.position="relative";let a=t.contentWidth??600,l=[],d=0;for(let g=0;g<e.blocks.length;g++){let s=e.blocks[g],c=e.measures[g];if(!(!s||!c)){if(s.kind==="paragraph"&&c.kind==="paragraph"){let x=s,b=c,f=x.attrs?.spacing?.before??0,h=d,m=[];for(let w of x.runs)if(w.kind==="image"&&"position"in w&&w.position){let F=w;l.push({src:F.src,width:F.width,height:F.height,alt:F.alt,paragraphY:h,position:F.position});}else m.push(w);let p={...x,runs:m},y={blockId:x.id,width:a,height:b.totalHeight,fromLine:0,toLine:b.lines.length},u=v(y,p,b,{...t,positioning:"absolute"},{document:r});u.style.top=`${d+f}px`,u.style.left="0",u.style.width=`${a}px`,i.appendChild(u),d+=b.totalHeight;}else if(s.kind==="table"&&c.kind==="table"){let x={blockId:s.id,width:c.totalWidth,height:c.totalHeight,fromRow:0,toRow:c.rows.length,pmStart:s.pmStart,pmEnd:s.pmEnd},b=Y(x,s,c,{...t,positioning:"absolute"},{document:r});if(s.floating){let{left:f,top:h}=tt(s.floating,o);b.style.top=`${h}px`,b.style.left=`${f}px`,i.appendChild(b);}else b.style.top=`${d}px`,b.style.left="0",i.appendChild(b),d+=c.totalHeight;}}}for(let g of l){let s=r.createElement("img");s.src=g.src,s.width=g.width,s.height=g.height,g.alt&&(s.alt=g.alt),s.style.position="absolute",s.style.display="block",s.style.width=`${g.width}px`,s.style.height=`${g.height}px`,s.style.maxWidth="none",s.style.maxHeight="none",At(s,g,o),s.style.top=`${Ht(g,o)}px`,i.appendChild(s);}return i}var de=12,nt=6;function zt(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Pe=8;function jn(e){let t=[];for(let n of e)if(n.kind==="paragraph")for(let o of n.runs)o.kind==="text"&&o.footnoteRefId!=null&&t.push({footnoteId:o.footnoteRefId,pmPos:o.pmStart??0});return t}function Ee(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let i=false;for(let a of r.fragments){let l=a.pmStart??-1,d=a.pmEnd??-1;if(l>=0&&d>=0&&o.pmPos>=l&&o.pmPos<d){let g=n.get(r.number)??[];g.includes(o.footnoteId)||g.push(o.footnoteId),n.set(r.number,g),i=true;break}}if(i)break}return n}function Ot(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Pe,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let i=r;return {...i,runs:i.runs.map(a=>(a.kind==="text"||a.kind==="tab")&&a.fontSize==null?{...a,fontSize:Pe}:a)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Pe,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function Nt(e,t,n,o){let r=c$1(e.content,{styles:o.styles??void 0,theme:o.theme??null}),i=d(r,{theme:o.theme??void 0}),a=Ot(i,t),l=o.measureBlocks(a,n),d$1=l.reduce((g,s)=>s.kind==="paragraph"||s.kind==="table"?g+s.totalHeight:s.kind==="image"||s.kind==="textBox"?g+s.height:g,0);return {id:e.id,displayNumber:t,blocks:a,measures:l,height:d$1}}function Yn(e,t,n,o){let r=new Map,i=new Map;for(let d of e)(d.noteType==="normal"||d.noteType==null)&&i.set(d.id,d);let a=1,l=new Set;for(let d of t){if(l.has(d.footnoteId))continue;l.add(d.footnoteId);let g=i.get(d.footnoteId);g&&(r.set(d.footnoteId,Nt(g,a,n,o)),a++);}return r}function ot(e,t){let n=new Map;for(let[o,r]of e){let i=0;for(let a of r){let l=t.get(a);l&&(i+=l.height);}i>0&&(i+=de,n.set(o,i));}return n}function Kn(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:i,initialLayout:a}=e,l=Ee(a.pages,r),d=ot(l,i);if(d.size===0)return {layout:a,pageFootnoteMap:l,converged:true};let g=a,s=false;for(let c=0;c<nt;c++){g=q$1(t,n,{...o,footnoteReservedHeights:d});let x=Ee(g.pages,r),b=ot(x,i);if(l=x,zt(d,b)){d=b,s=true;break}d=b;}s||(g=q$1(t,n,{...o,footnoteReservedHeights:d}),l=Ee(g.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${nt} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[c,x]of l){let b=g.pages.find(f=>f.number===c);b&&(b.footnoteIds=x);}return {layout:g,pageFootnoteMap:l,converged:s}}function Un(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let i of n.package.footnotes)i.noteType&&i.noteType!=="normal"||r.set(i.id,i);for(let[i,a]of e){let l=[];for(let d of a){let g=r.get(d);if(!g)continue;let s=t.get(d),c=s?.displayNumber??0;l.push({displayNumber:String(c),text:v$1(g),content:s});}l.length>0&&o.set(i,l);}return o}function Dt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let i=0;for(let a=0;a<e.blocks.length;a++){let l=e.blocks[a],d=e.measures[a];if(!(!l||!d)){if(l.kind==="paragraph"&&d.kind==="paragraph"){let g=l.attrs?.spacing?.before??0,s={blockId:l.id,width:t,height:d.totalHeight,pmStart:l.pmStart,pmEnd:l.pmEnd,fromLine:0,toLine:d.lines.length},c=v(s,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});c.style.top=`${i+g}px`,c.style.left="0",c.style.width=`${t}px`,c.style.height=`${d.totalHeight}px`,r.appendChild(c),i+=d.totalHeight;}else if(l.kind==="table"&&d.kind==="table"){let g={blockId:l.id,width:d.totalWidth,height:d.totalHeight,pmStart:l.pmStart,pmEnd:l.pmEnd,fromRow:0,toRow:d.rows.length},s=Y(g,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.totalHeight;}else if(l.kind==="image"&&d.kind==="image"){let g={blockId:l.id,width:d.width,height:d.height,pmStart:l.pmStart,pmEnd:l.pmEnd},s=re(g,l,d,{...n},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.height;}else if(l.kind==="textBox"&&d.kind==="textBox"){let g={blockId:l.id,width:d.width,height:d.height,pmStart:l.pmStart,pmEnd:l.pmEnd},s=le(g,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.height;}}}return r}function _t(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function rt(e){let t=de;for(let n of e)n.content&&(t+=n.content.height);return t}function it(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let i=o.createElement("div"),a=.5,l=(de-a)/2;i.style.width="33%",i.style.height=`${a}px`,i.style.backgroundColor="#000",i.style.marginBottom=`${l}px`,i.style.marginTop=`${l}px`,r.appendChild(i);for(let d of e)r.appendChild(d.content?Dt(d.content,t,n,o):_t(d,o));return r}function Le(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let i=n.footnotesByPage.get(e.number);i&&i.length>0&&(r.footnoteArea=i);}return {context:o,pageOptions:r}}function at(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function Wt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function Gt(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var pe=2,Vt=8;function jt(e,t,n={}){let o=e.length,r=n.pageGap??24,i=t,a=i.__pageRenderState,l=Wt(n),d=o>=Vt;if(a&&a.optionsHash===l&&d){let m=a.pageStates,p=a.pageDataMap,y=i.__pageObserver,u=[];for(let S of e)u.push(at(S));let w=a.totalPages!==o,F=Math.min(m.length,e.length);for(let S=0;S<F;S++){let I=m[S],C=u[S];if(I.fingerprint===C&&!w){let P=p.get(I.element);P&&(P.page=e[S]);continue}let T=I.element,k=p.get(T);k&&(k.page=e[S],k.rendered&&Yt(T,p,o,n)),I.fingerprint=C,ee(T,e[S].size.w,e[S].size.h,n),T.dataset.pageNumber=String(e[S].number);}if(e.length>m.length){let S=n.document??document;for(let I=m.length;I<e.length;I++){let C=e[I],T=S.createElement("div");T.className=n.pageClassName??z.page,T.dataset.pageNumber=String(C.number),T.dataset.pageIndex=String(I),ee(T,C.size.w,C.size.h,n),t.appendChild(T),m.push({element:T,fingerprint:u[I]}),p.set(T,{page:C,index:I,rendered:false}),y&&y.observe(T);}}if(e.length<m.length){for(let S=m.length-1;S>=e.length;S--){let I=m[S].element;y&&y.unobserve(I),p.delete(I),t.removeChild(I);}m.length=e.length;}for(let S=0;S<m.length;S++){let I=p.get(m[S].element);I&&(I.index=S);}return a.totalPages=o,a.currentOptions=n,"incremental"}let s=i.__pageObserver;s&&(s.disconnect(),i.__pageObserver=void 0),t.innerHTML="",i.__pageRenderState=void 0,Gt(t,r);let c=[],x=[];for(let m=0;m<e.length;m++){let p=e[m];if(x.push(at(p)),d){let u=(n.document??document).createElement("div");u.className=n.pageClassName??z.page,u.dataset.pageNumber=String(p.number),u.dataset.pageIndex=String(m),ee(u,p.size.w,p.size.h,n),t.appendChild(u),c.push(u);}else {let{context:y,pageOptions:u}=Le(p,o,n),w=ge(p,y,u);t.appendChild(w),c.push(w);}}if(!d)return "full";let b=new Map;for(let m=0;m<e.length;m++)b.set(c[m],{page:e[m],index:m,rendered:false});let f=new IntersectionObserver(m=>{let p=i.__pageRenderState;if(!p)return;let{currentOptions:y,totalPages:u,pageDataMap:w}=p;for(let C of m){let T=C.target,k=w.get(T);if(k&&C.isIntersecting){ce(T,w,u,y);for(let P=-pe;P<=pe;P++){let R=k.index+P;R>=0&&R<p.pageStates.length&&R!==k.index&&ce(p.pageStates[R].element,w,u,y);}}}let F=window.innerHeight,S=F*3,I=new Set;for(let[C,T]of w){if(!T.rendered)continue;let k=C.getBoundingClientRect();k.bottom>-S&&k.top<F+S&&I.add(T.index);}for(let[C,T]of w){if(!T.rendered)continue;let k=false;for(let P of I)if(Math.abs(T.index-P)<=pe+1){k=true;break}!k&&I.size>0&&Kt(C,w);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let m of c)f.observe(m);i.__pageObserver=f,i.__pageRenderState={pageStates:c.map((m,p)=>({element:m,fingerprint:x[p]})),totalPages:o,optionsHash:l,pageDataMap:b,currentOptions:n};let h=Math.min(e.length,pe+3);for(let m=0;m<h;m++)ce(c[m],b,o,n);return "full"}function ce(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:i,pageOptions:a}=Le(r.page,n,o),l=ge(r.page,i,a);for(;l.firstChild;)e.appendChild(l.firstChild);r.rendered=true;}function Yt(e,t,n,o){let r=t.get(e);if(!r)return;let{context:i,pageOptions:a}=Le(r.page,n,o),d=ge(r.page,i,a).querySelector(`.${z.content}`),g=e.querySelector(`.${z.content}`);d&&g?e.replaceChild(d,g):(e.innerHTML="",r.rendered=false,ce(e,t,n,o));}function Kt(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}var z={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function ee(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=a$1("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function Ut(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function fe(e){return e?.space!==void 0?i(e.space):0}function me(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=c$2(t,n,o);for(let[d,g]of Object.entries(r))e.style[d]=String(g);let i=`border${n}Style`,a=`border${n}Width`;if(e.style[i]==="double"){let d=parseFloat(e.style[a]);(!Number.isFinite(d)||d<3)&&(e.style[a]="3px");}}function Xt(e,t,n){let o=t.pageBorders;if(!o||!Ut(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(c=>c&&c.style!=="none"&&c.style!=="nil"))return null;let i=o.offsetFrom??"text",a=fe(o.top),l=fe(o.right),d=fe(o.bottom),g=fe(o.left),s=n.createElement("div");return s.className="layout-page-border",s.style.position="absolute",s.style.pointerEvents="none",s.style.boxSizing="border-box",s.style.zIndex=o.zOrder==="back"?"0":"20",i==="page"?(s.style.top=`${a}px`,s.style.right=`${l}px`,s.style.bottom=`${d}px`,s.style.left=`${g}px`):(s.style.top=`${Math.max(0,e.margins.top-a)}px`,s.style.right=`${Math.max(0,e.margins.right-l)}px`,s.style.bottom=`${Math.max(0,e.margins.bottom-d)}px`,s.style.left=`${Math.max(0,e.margins.left-g)}px`),me(s,o.top,"Top",t.theme),me(s,o.bottom,"Bottom",t.theme),me(s,o.left,"Left",t.theme),me(s,o.right,"Right",t.theme),s}function Zt(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function qt(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function Jt(e,t,n,o){let r=[];for(let i of e.runs){if(i.kind!=="image")continue;let a=i;if(!H(a))continue;let l=a.distTop??0,d=a.distBottom??0,g=a.distLeft??12,s=a.distRight??12,{x:c,y:x,side:b}=Re(a,t,n,o);r.push({src:a.src,width:a.width,height:a.height,alt:a.alt,transform:a.transform,side:b,x:c,y:x,distTop:l,distBottom:d,distLeft:g,distRight:s,pmStart:a.pmStart,pmEnd:a.pmEnd,wrapText:oe(a.cssFloat),wrapType:a.wrapType,cropTop:a.cropTop,cropRight:a.cropRight,cropBottom:a.cropBottom,cropLeft:a.cropLeft,opacity:a.opacity});}return r}function ge(e,t,n={}){let o=n.document??document,r$1=o.createElement("div");r$1.className=n.pageClassName??z.page,r$1.dataset.pageNumber=String(e.number),ee(r$1,e.size.w,e.size.h,n);let i=Xt(e,n,o);i&&n.pageBorders?.zOrder==="back"&&r$1.appendChild(i);let a=o.createElement("div");a.className=z.content,Zt(a,e);let l=Qe(e),d=l.contentWidth,g$1=[],s=[];for(let p of e.fragments)if(p.kind==="paragraph"&&n.blockLookup){let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind==="paragraph"){let u=y.block,w=p.y-e.margins.top,F=Jt(u,w,d,l);g$1.push(...F);}}for(let p of g$1)Z(p)&&s.push({side:p.side,x:p.x,y:p.y,width:p.width,height:p.height,distTop:p.distTop,distBottom:p.distBottom,distLeft:p.distLeft,distRight:p.distRight,wrapText:p.wrapText,wrapType:p.wrapType});if(n.blockLookup)for(let p of e.fragments){if(p.kind!=="table")continue;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind!=="table")continue;let w=y.block.floating;if(!w)continue;let F=p.x-e.margins.left,S=p.y-e.margins.top,I=w.topFromText??0,C=w.bottomFromText??0,T=w.leftFromText??12,k=w.rightFromText??12,P=F<d/2?"left":"right";s.push({side:P,x:F,y:S,width:p.width,height:p.height,distTop:I,distBottom:C,distLeft:T,distRight:k});}if(n.blockLookup)for(let p of e.fragments){if(p.kind!=="textBox")continue;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind!=="textBox")continue;let u=y.block;if(!g(u))continue;let w=p.y-e.margins.top,F=Re({width:p.width,height:p.height,position:u.position,cssFloat:u.cssFloat},w,d,l);p.x=e.margins.left+F.x,p.y=e.margins.top+F.y,h(u)&&s.push({side:F.side,x:F.x,y:F.y,width:p.width,height:p.height,distTop:u.distTop??0,distBottom:u.distBottom??0,distLeft:u.distLeft??12,distRight:u.distRight??12,wrapText:u.wrapText,wrapType:u.wrapType});}let c=s.length>0?p(s,d):[],x=g$1.filter(G),b=g$1.filter(p=>!G(p));if(x.length>0){let p=V(x,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});a.appendChild(p);}let f=p=>{if(p.kind!=="paragraph"||!n.blockLookup||!p.blockId)return;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind==="paragraph")return y.block.attrs?.borders},h$1,m=new Map;for(let p=0;p<e.fragments.length;p++){let y=e.fragments[p],u,w={...t,section:"body",contentWidth:d},F=y.y-e.margins.top;if(n.blockLookup&&y.blockId){let S=n.blockLookup.get(String(y.blockId));if(y.kind==="paragraph"&&S?.block.kind==="paragraph"&&S?.measure.kind==="paragraph"){let I=S.block,C=p+1<e.fragments.length?f(e.fragments[p+1]):void 0,T=String(y.blockId),k=m.get(T);k||(k=new Set,m.set(T,k));let P=S.measure;c.length>0&&(P=r(I,d,{floatingZones:c,paragraphYOffset:F})),u=v(y,I,P,w,{document:o,prevBorders:h$1,nextBorders:C,renderedInlineImageKeys:k}),h$1=I.attrs?.borders;}else y.kind==="table"&&S?.block.kind==="table"&&S?.measure.kind==="table"?(u=Y(y,S.block,S.measure,w,{document:o}),h$1=void 0):y.kind==="image"&&S?.block.kind==="image"&&S?.measure.kind==="image"?(u=re(y,S.block,S.measure,w,{document:o}),h$1=void 0):y.kind==="textBox"&&S?.block.kind==="textBox"&&S?.measure.kind==="textBox"?(u=le(y,S.block,S.measure,w,{document:o}),h$1=void 0):(u=xe(y,w,{document:o}),h$1=void 0);}else u=xe(y,w,{document:o}),h$1=void 0;qt(u,y,{left:e.margins.left,top:e.margins.top}),a.appendChild(u);}if(b.length>0){let p=V(b,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});a.appendChild(p);}if(e.columns&&e.columns.separator&&e.columns.count>1){let p=e.columns.count,y=e.columns.gap,u=(d-(p-1)*y)/p,w=e.size.h-e.margins.top-e.margins.bottom;for(let F=0;F<p-1;F++){let S=(F+1)*u+F*y+y/2,I=o.createElement("div");I.style.position="absolute",I.style.left=`${S}px`,I.style.top="0",I.style.height=`${w}px`,I.style.width="0.5px",I.style.backgroundColor="#000",I.style.pointerEvents="none",a.appendChild(I);}}if(n.footnoteArea&&n.footnoteArea.length>0){let p=it(n.footnoteArea,d,t,o);p.style.position="absolute";let y=Math.max(e.footnoteReservedHeight??0,rt(n.footnoteArea)),u=e.size.h-e.margins.bottom-e.margins.top;p.style.top=`${Math.max(-e.margins.top,u-y)}px`,p.style.left="0",p.style.right="0",a.appendChild(p);}r$1.appendChild(a);{let y=n.headerDistance??e.margins.header??48,u=e.size.w-e.margins.left-e.margins.right,w=Math.max(e.margins.top-y,48),F=n.headerContent?.visualTop??0,S=n.headerContent?.visualBottom??n.headerContent?.height??0,I=Math.max(S-F,24),C=S>w,T=o.createElement("div");T.className=z.header,T.style.position="absolute",T.style.top=`${y+F}px`,T.style.left=`${e.margins.left}px`,T.style.right=`${e.margins.right}px`,T.style.width=`${u}px`,T.style.height=`${I}px`,T.style.minHeight=`${I}px`;let k=!C;if(n.headerContent&&n.headerContent.blocks.length>0){let P={flowTop:y,flowLeft:e.margins.left,contentWidth:u,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},R=Ce(n.headerContent,{...t,section:"header",contentWidth:u},n,P);R.style.top=`${-F}px`,R.querySelector("img")&&(k=false),T.appendChild(R);}k&&(T.style.maxHeight=`${w}px`,T.style.overflow="hidden"),r$1.appendChild(T);}{let y=n.footerDistance??e.margins.footer??48,u=e.size.w-e.margins.left-e.margins.right,w=Math.max(e.margins.bottom-y,48),F=n.footerContent?.visualTop??0,S=n.footerContent?.visualBottom??n.footerContent?.height??0,I=Math.max(S-F,24),C=I>w,T=o.createElement("div");T.className=z.footer,T.style.position="absolute",T.style.top=`${e.size.h-y-I}px`,T.style.left=`${e.margins.left}px`,T.style.right=`${e.margins.right}px`,T.style.width=`${u}px`,T.style.height=`${I}px`,T.style.minHeight=`${I}px`;let k=!C;if(n.footerContent&&n.footerContent.blocks.length>0){let P={flowTop:e.size.h-y-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:u,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},R=Ce(n.footerContent,{...t,section:"footer",contentWidth:u},n,P);R.style.top=`${-F}px`,R.querySelector("img")&&(k=false),T.appendChild(R);}k&&(T.style.maxHeight=`${w}px`,T.style.overflow="hidden"),r$1.appendChild(T);}return i&&n.pageBorders?.zOrder!=="back"&&r$1.appendChild(i),r$1}
2
- export{le as A,tt as B,jt as C,z as D,ee as E,ge as F,de as a,nt as b,zt as c,jn as d,Ee as e,Ot as f,Nt as g,Yn as h,ot as i,Kn as j,Un as k,_ as l,xe as m,Z as n,G as o,H as p,ft as q,je as r,re as s,qe as t,ae as u,v,V as w,A as x,Y as y,Et as z};
@@ -1 +0,0 @@
1
- 'use strict';var chunkD4RPOJC7_js=require('./chunk-D4RPOJC7.js'),chunkIP2VXNWG_js=require('./chunk-IP2VXNWG.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkMZOVDLYL_js=require('./chunk-MZOVDLYL.js'),chunkSUXJX72X_js=require('./chunk-SUXJX72X.js'),chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function _(e){if(!e)return [];let n=[];return e.bold&&n.push(chunkSUXJX72X_js.b.mark("bold")),e.italic&&n.push(chunkSUXJX72X_js.b.mark("italic")),e.underline&&e.underline.style!=="none"&&n.push(chunkSUXJX72X_js.b.mark("underline",{style:e.underline.style,color:e.underline.color})),(e.strike||e.doubleStrike)&&n.push(chunkSUXJX72X_js.b.mark("strike",{double:e.doubleStrike||false})),e.color&&!e.color.auto&&n.push(chunkSUXJX72X_js.b.mark("textColor",{rgb:e.color.rgb,themeColor:e.color.themeColor,themeTint:e.color.themeTint,themeShade:e.color.themeShade})),e.highlight&&e.highlight!=="none"&&n.push(chunkSUXJX72X_js.b.mark("highlight",{color:e.highlight})),e.fontSize&&n.push(chunkSUXJX72X_js.b.mark("fontSize",{size:e.fontSize})),e.fontFamily&&n.push(chunkSUXJX72X_js.b.mark("fontFamily",{ascii:e.fontFamily.ascii,hAnsi:e.fontFamily.hAnsi,eastAsia:e.fontFamily.eastAsia,cs:e.fontFamily.cs,asciiTheme:e.fontFamily.asciiTheme,hAnsiTheme:e.fontFamily.hAnsiTheme,eastAsiaTheme:e.fontFamily.eastAsiaTheme,csTheme:e.fontFamily.csTheme})),e.vertAlign==="superscript"?n.push(chunkSUXJX72X_js.b.mark("superscript")):e.vertAlign==="subscript"&&n.push(chunkSUXJX72X_js.b.mark("subscript")),e.allCaps&&n.push(chunkSUXJX72X_js.b.mark("allCaps")),e.smallCaps&&n.push(chunkSUXJX72X_js.b.mark("smallCaps")),(e.spacing!=null||e.position!=null||e.scale!=null||e.kerning!=null)&&n.push(chunkSUXJX72X_js.b.mark("characterSpacing",{spacing:e.spacing??null,position:e.position??null,scale:e.scale??null,kerning:e.kerning??null})),e.emboss&&n.push(chunkSUXJX72X_js.b.mark("emboss")),e.imprint&&n.push(chunkSUXJX72X_js.b.mark("imprint")),e.shadow&&n.push(chunkSUXJX72X_js.b.mark("textShadow")),e.emphasisMark&&e.emphasisMark!=="none"&&n.push(chunkSUXJX72X_js.b.mark("emphasisMark",{type:e.emphasisMark})),e.outline&&n.push(chunkSUXJX72X_js.b.mark("textOutline")),e.hidden&&n.push(chunkSUXJX72X_js.b.mark("hidden")),e.rtl&&n.push(chunkSUXJX72X_js.b.mark("rtl")),e.effect&&e.effect!=="none"&&n.push(chunkSUXJX72X_js.b.mark("textEffect",{effect:e.effect})),n}function A(e,n){if(!e)return;if(!n)return e;let r=n.resolveRunStyle(e.styleId);return r?chunkMZOVDLYL_js.a(r,e):e}function ee(e,n){let r="",i,t=e.type==="simpleField"?e.content:e.fieldResult;if(t){for(let s of t)if(s.type==="run"){for(let f of s.content)f.type==="text"&&(r+=f.text);!i&&s.formatting&&(i=s.formatting);}}let l=chunkMZOVDLYL_js.a(n,i),o=_(l);return chunkSUXJX72X_js.b.node("field",{fieldType:e.fieldType,instruction:e.instruction,displayText:r,fieldKind:e.type==="simpleField"?"simple":"complex",fldLock:e.fldLock??false,dirty:e.dirty??false},void 0,o)}function te(e){return chunkSUXJX72X_js.b.node("math",{display:e.display,ommlXml:e.ommlXml,plainText:e.plainText||""})}function q(e,n,r){let i=[],t=e.formatting?.styleId?r?.getRunStyleOwnProperties(e.formatting.styleId):void 0,l=chunkMZOVDLYL_js.a(chunkMZOVDLYL_js.a(n,t),e.formatting),o=_(l);for(let s of e.content){let f=ge(s,o);i.push(...f);}return i}function ge(e,n){switch(e.type){case "text":return e.text?[chunkSUXJX72X_js.b.text(e.text,n)]:[];case "break":return e.breakType==="textWrapping"||!e.breakType?[chunkSUXJX72X_js.b.node("hardBreak")]:[];case "tab":return [chunkSUXJX72X_js.b.node("tab")];case "drawing":return e.image?[Te(e.image)]:[];case "shape":{let t=e.shape;return t.textBody&&t.textBody.content.length>0?[]:[be(t)]}case "footnoteRef":let r=chunkSUXJX72X_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"footnote"});return [chunkSUXJX72X_js.b.text(e.id.toString(),[...n,r])];case "endnoteRef":let i=chunkSUXJX72X_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"endnote"});return [chunkSUXJX72X_js.b.text(e.id.toString(),[...n,i])];default:return []}}function Te(e){let n=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):void 0,r=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):void 0,i=e.wrap.type,t=e.wrap.wrapText,l=e.position?.horizontal?.alignment,o;i==="inline"||i==="topAndBottom"?o="none":i==="square"||i==="tight"||i==="through"?t==="left"?o="right":t==="right"||l==="left"?o="left":l==="right"?o="right":o="none":o="none";let s="inline";i==="inline"?s="inline":i==="topAndBottom"?s="block":chunkJFZIXFRC_js.b(i)||o&&o!=="none"?s="float":s="block";let f;if(e.transform){let y=[];e.transform.rotation&&y.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&y.push("scaleX(-1)"),e.transform.flipV&&y.push("scaleY(-1)"),y.length>0&&(f=y.join(" "));}let p=e.wrap.distT?chunk4Q2IP5FW_js.e(e.wrap.distT):void 0,c=e.wrap.distB?chunk4Q2IP5FW_js.e(e.wrap.distB):void 0,d=e.wrap.distL?chunk4Q2IP5FW_js.e(e.wrap.distL):void 0,m=e.wrap.distR?chunk4Q2IP5FW_js.e(e.wrap.distR):void 0,u;e.position&&(u={horizontal:e.position.horizontal?{relativeTo:e.position.horizontal.relativeTo,posOffset:e.position.horizontal.posOffset,align:e.position.horizontal.alignment}:void 0,vertical:e.position.vertical?{relativeTo:e.position.vertical.relativeTo,posOffset:e.position.vertical.posOffset,align:e.position.vertical.alignment}:void 0});let F,k,v;if(e.outline&&e.outline.width){F=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(k=`#${e.outline.color.rgb}`);let y={solid:"solid",dot:"dotted",dash:"dashed",lgDash:"dashed",dashDot:"dashed",lgDashDot:"dashed",lgDashDotDot:"dashed",sysDot:"dotted",sysDash:"dashed",sysDashDot:"dashed",sysDashDotDot:"dashed"};v=e.outline.style&&y[e.outline.style]||"solid";}let N=e.padding?.top?chunk4Q2IP5FW_js.e(e.padding.top):void 0,R=e.padding?.bottom?chunk4Q2IP5FW_js.e(e.padding.bottom):void 0,B=e.padding?.left?chunk4Q2IP5FW_js.e(e.padding.left):void 0,h=e.padding?.right?chunk4Q2IP5FW_js.e(e.padding.right):void 0;return chunkSUXJX72X_js.b.node("image",{src:e.src||"",alt:e.alt,title:e.title,width:n,height:r,rId:e.rId,wrapType:i,displayMode:s,cssFloat:o,transform:f,distTop:p,distBottom:c,distLeft:d,distRight:m,position:u,borderWidth:F,borderColor:k,borderStyle:v,wrapText:t,hlinkHref:e.hlinkHref,cropTop:e.crop?.top,cropRight:e.crop?.right,cropBottom:e.crop?.bottom,cropLeft:e.crop?.left,opacity:e.opacity,effectExtentTop:N,effectExtentBottom:R,effectExtentLeft:B,effectExtentRight:h,layoutInCell:e.layoutInCell,allowOverlap:e.allowOverlap})}function j(e,n,r){let i=[],t=e.href||(e.anchor?`#${e.anchor}`:""),l=chunkSUXJX72X_js.b.mark("hyperlink",{href:t,tooltip:e.tooltip,rId:e.rId});for(let o of e.children)if(o.type==="run"){let s=o.formatting?.styleId?r?.resolveRunStyle(o.formatting.styleId):void 0,f=chunkMZOVDLYL_js.a(chunkMZOVDLYL_js.a(n,s),o.formatting),c=[..._(f),l];for(let d of o.content)d.type==="text"&&d.text&&i.push(chunkSUXJX72X_js.b.text(d.text,c));}return i}function be(e){let n=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):100,r=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):80,i,t="solid",l,o,s;if(e.fill&&(t=e.fill.type,e.fill.color?.rgb&&(i=`#${e.fill.color.rgb}`),e.fill.type==="gradient"&&e.fill.gradient)){let m=e.fill.gradient;l=m.type,o=m.angle,s=JSON.stringify(m.stops.map(u=>({position:u.position,color:u.color.rgb?`#${u.color.rgb}`:"#000000"})));}let f,p,c;e.outline&&(e.outline.width&&(f=Math.round(e.outline.width/914400*96*100)/100),e.outline.color?.rgb&&(p=`#${e.outline.color.rgb}`),c=e.outline.style||"solid");let d;if(e.transform){let m=[];e.transform.rotation&&m.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&m.push("scaleX(-1)"),e.transform.flipV&&m.push("scaleY(-1)"),m.length>0&&(d=m.join(" "));}return chunkSUXJX72X_js.b.node("shape",{shapeType:e.shapeType||"rect",shapeId:e.id,width:n,height:r,fillColor:i,fillType:t,gradientType:l,gradientAngle:o,gradientStops:s,outlineWidth:f,outlineColor:p,outlineStyle:c,transform:d})}function E(e,n,r,i){let t=ye(e,n),l=[],o,s=new Set,f;n&&(f=n.resolveParagraphStyle(e.formatting?.styleId).runFormatting);let p=chunkMZOVDLYL_js.a(f,i);for(let c of e.content){if(c.type==="commentRangeStart")s.add(c.id);else if(c.type==="commentRangeEnd")s.delete(c.id);else if(c.type==="run"){let d=q(c,p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="hyperlink"){let d=j(c,p,n);l.push(...d);}else if(c.type==="simpleField"||c.type==="complexField"){let d=ee(c,p);d&&l.push(d);}else if(c.type==="inlineSdt"){let d=fe(c,p,n);d&&l.push(d);}else if(c.type==="insertion"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="deletion"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveFrom"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveTo"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="mathEquation"){let d=te(c);d&&l.push(d);}c.type==="bookmarkStart"&&(o||(o=[]),o.push({id:c.id,name:c.name}));}return o&&(t.bookmarks=o),chunkSUXJX72X_js.b.node("paragraph",t,l)}function D(e,n){if(n.size===0)return e;let r=[...n][0],i=chunkSUXJX72X_js.b.marks.comment.create({commentId:r});return e.map(t=>t.isText?t.mark(i.addToSet(t.marks)):t)}function X(e,n,r,i){let t=[];for(let o of e.content)o.type==="run"?t.push(...q(o,r,i)):o.type==="hyperlink"&&t.push(...j(o,r,i));let l=chunkSUXJX72X_js.b.marks[n].create({revisionId:e.info.id,author:e.info.author,date:e.info.date??null});return t.map(o=>o.isText?o.mark(l.addToSet(o.marks)):o)}function ye(e,n){let r=e.formatting,i=r?.styleId,t={paraId:e.paraId??void 0,textId:e.textId??void 0,styleId:i,numPr:r?.numPr,listNumFmt:e.listRendering?.numFmt,listIsBullet:e.listRendering?.isBullet,listMarker:e.listRendering?.marker,listMarkerHidden:e.listRendering?.markerHidden||void 0,listMarkerFontFamily:e.listRendering?.markerFontFamily||void 0,listMarkerFontSize:e.listRendering?.markerFontSize||void 0,listLevelNumFmts:e.listRendering?.levelNumFmts||void 0,listAbstractNumId:e.listRendering?.abstractNumId,listStartOverride:e.listRendering?.startOverride,_originalFormatting:r||void 0};if(n){let l=n.resolveParagraphStyle(i),o=l.paragraphFormatting,s=l.runFormatting;t.alignment=r?.alignment??o?.alignment,t.spaceBefore=r?.spaceBefore??o?.spaceBefore,t.spaceAfter=r?.spaceAfter??o?.spaceAfter,t.lineSpacing=r?.lineSpacing??o?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule??o?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft??o?.indentLeft,t.indentRight=r?.indentRight??o?.indentRight,t.indentFirstLine=r?.indentFirstLine??o?.indentFirstLine,t.hangingIndent=r?.hangingIndent??o?.hangingIndent,t.borders=r?.borders??o?.borders,t.shading=r?.shading??o?.shading,t.tabs=r?.tabs??o?.tabs,t.pageBreakBefore=r?.pageBreakBefore??o?.pageBreakBefore,t.keepNext=r?.keepNext??o?.keepNext,t.keepLines=r?.keepLines??o?.keepLines,t.contextualSpacing=r?.contextualSpacing??o?.contextualSpacing,t.outlineLevel=r?.outlineLevel??o?.outlineLevel,t.bidi=r?.bidi??o?.bidi;let f=n.getDefaultCharacterStyle()?.rPr,p=f?chunkMZOVDLYL_js.a(s,f):s,c=A(r?.runProperties,n);t.defaultTextFormatting=chunkMZOVDLYL_js.a(p,c),!r?.numPr&&o?.numPr&&o.numPr.numId!==0&&(t.numPr=o.numPr);}else t.alignment=r?.alignment,t.spaceBefore=r?.spaceBefore,t.spaceAfter=r?.spaceAfter,t.lineSpacing=r?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft,t.indentRight=r?.indentRight,t.indentFirstLine=r?.indentFirstLine,t.hangingIndent=r?.hangingIndent,t.borders=r?.borders,t.shading=r?.shading,t.tabs=r?.tabs,t.pageBreakBefore=r?.pageBreakBefore,t.keepNext=r?.keepNext,t.keepLines=r?.keepLines,t.outlineLevel=r?.outlineLevel,t.bidi=r?.bidi,t.defaultTextFormatting=A(r?.runProperties,n);if(e.sectionProperties){t._sectionProperties=e.sectionProperties;let l=e.sectionProperties.sectionStart;(l==="nextPage"||l==="continuous"||l==="oddPage"||l==="evenPage")&&(t.sectionBreakType=l);}return e.renderedPageBreakBefore&&(t.renderedPageBreakBefore=true),t}function fe(e,n,r){let i=e.properties,t=[];for(let l of e.content)if(l.type==="run"){let o=q(l,n,r);t.push(...o);}else if(l.type==="hyperlink"){let o=j(l,n,r);t.push(...o);}else if(l.type==="simpleField"||l.type==="complexField"){let o=ee(l,n);o&&t.push(o);}else if(l.type==="inlineSdt"){let o=fe(l,n,r);o&&t.push(o);}else if(l.type==="mathEquation"){let o=te(l);o&&t.push(o);}return chunkSUXJX72X_js.b.node("sdt",{sdtType:i.sdtType,alias:i.alias??null,tag:i.tag??null,lock:i.lock??null,placeholder:i.placeholder??null,showingPlaceholder:i.showingPlaceholder??false,dateFormat:i.dateFormat??null,listItems:i.listItems?JSON.stringify(i.listItems):null,checked:i.checked??null},t.length>0?t:void 0)}function ce(e){function n(i){return i.type==="break"&&i.breakType==="page"}function r(i){if(i.type==="run"){for(let t of i.content)if(n(t))return true;return false}if(i.type==="hyperlink"){for(let t of i.children)if(t.type==="run"&&r(t))return true;return false}if(i.type==="insertion"||i.type==="deletion"){let t=i;for(let l of t.content)if(r(l))return true;return false}return false}for(let i of e.content)if(r(i))return true;return false}function x(e,n,r){if(!e||!n)return;let i=e.getStyle(n);if(!i?.tblStylePr)return;let t=i.tblStylePr.find(f=>f.type===r);if(!t)return;let l=A(t.pPr?.runProperties,e),o=A(t.rPr,e),s=chunkMZOVDLYL_js.a(l,o);return {tcPr:t.tcPr,rPr:s}}function M(e,n){if(!e&&!n)return;if(!e)return n;if(!n)return e;let r={},i=e.tcPr,t=n.tcPr;if(i||t){let l={...i??{},...t??{}};(i?.borders||t?.borders)&&(l.borders={...i?.borders??{},...t?.borders??{}}),(i?.shading||t?.shading)&&(l.shading={...i?.shading??{},...t?.shading??{}}),(i?.margins||t?.margins)&&(l.margins={...i?.margins??{},...t?.margins??{}}),r.tcPr=l;}return r.rPr=chunkMZOVDLYL_js.a(e.rPr,n.rPr),r}function Pe(e){let n=new Map,r=e.rows.length,i=new Map;for(let t=0;t<r;t++){let l=e.rows[t],o=0;for(let s=0;s<l.cells.length;s++){let f=l.cells[s],p=f.formatting?.gridSpan??1,c=f.formatting?.vMerge,d=`${t}-${o}`;if(c==="restart")i.set(o,t),n.set(d,{rowSpan:1,skip:false});else if(c==="continue"){let m=i.get(o);if(m!==void 0){let u=`${m}-${o}`,F=n.get(u);F&&F.rowSpan++;}n.set(d,{rowSpan:1,skip:true});}else i.delete(o),n.set(d,{rowSpan:1,skip:false});o+=p;}}return n}function K(e,n,r){let i=Pe(e),t=e.columnWidths,l=t?.reduce((y,S)=>y+S,0)??0,o=e.formatting?.styleId,s=e.formatting?.look,f=o?n?.getStyle(o):void 0,p=n?.getDefaultTableStyle(),c=e.formatting?.borders??f?.tblPr?.borders??p?.tblPr?.borders,d=e.formatting?.cellMargins??f?.tblPr?.cellMargins??p?.tblPr?.cellMargins??void 0,m=d?{top:d.top?.value,bottom:d.bottom?.value,left:d.left?.value,right:d.right?.value}:void 0,u={styleId:e.formatting?.styleId,width:e.formatting?.width?.value,widthType:e.formatting?.width?.type,justification:e.formatting?.justification,columnWidths:t,floating:e.formatting?.floating,cellMargins:m,look:e.formatting?.look,_originalFormatting:e.formatting||void 0},F={wholeTable:x(n,o,"wholeTable"),firstRow:x(n,o,"firstRow"),lastRow:x(n,o,"lastRow"),firstCol:x(n,o,"firstCol"),lastCol:x(n,o,"lastCol"),band1Horz:x(n,o,"band1Horz"),band2Horz:x(n,o,"band2Horz"),band1Vert:x(n,o,"band1Vert"),band2Vert:x(n,o,"band2Vert"),nwCell:x(n,o,"nwCell"),neCell:x(n,o,"neCell"),swCell:x(n,o,"swCell"),seCell:x(n,o,"seCell")},k=s?.noHBand!==true,v=s?.noVBand!==true,N=0,R=e.rows.length,B=t?.length??Math.max(0,...e.rows.map(y=>y.cells.reduce((S,w)=>S+(w.formatting?.gridSpan??1),0))),h=e.rows.map((y,S)=>{let w=S===0&&!!s?.firstRow,C=S===R-1&&!!s?.lastRow,I=k&&!w&&!C?N%2===0?F.band1Horz:F.band2Horz:void 0;return k&&!w&&!C&&N++,Fe(y,n,w,t,l,F,I,v,s,c,S,R,B,i,m,r)});return chunkSUXJX72X_js.b.node("table",u,h)}function Fe(e,n,r,i,t,l,o,s,f,p,c,d,m,u,F,k){let v={height:e.formatting?.height?.value,heightRule:e.formatting?.heightRule,isHeader:!!e.formatting?.header,_originalFormatting:e.formatting||void 0},N=e.cells.length,R=c===0,B=c===(d??1)-1,h=e.formatting?.conditionalFormat,y=h?.firstRow??R,S=h?.lastRow??B,w=m??N,C=0,I=[];for(let J=0;J<e.cells.length;J++){let Y=e.cells[J],L=Y.formatting?.gridSpan??1,pe=`${c??0}-${C}`,oe=u?.get(pe),me=oe?.skip??false,he=oe?.rowSpan??1,re;if(i&&t&&t>0){let W=0;for(let z=0;z<L&&C+z<i.length;z++)W+=i[C+z];re=Math.round(W/t*100);}if(C+=L,me)continue;let ie=C-L===0,le=C===w,T=Y.formatting?.conditionalFormat,G=T?.firstRow??y,Q=T?.lastRow??S,O=T?.firstColumn??ie,V=T?.lastColumn??le,$;if(s){let W=f?.firstColumn?1:0,z=C-L-W;z>=0&&!(f?.lastColumn&&V)&&!(f?.firstColumn&&O)&&($=z%2===0?l?.band1Vert:l?.band2Vert);}T?.oddVBand?$=l?.band1Vert:T?.evenVBand&&($=l?.band2Vert);let H=o;h?.oddHBand?H=l?.band1Horz:h?.evenHBand&&(H=l?.band2Horz),T?.oddHBand?H=l?.band1Horz:T?.evenHBand&&(H=l?.band2Horz);let g=l?.wholeTable;g=M(g,H),g=M(g,$),G&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(g=M(g,l?.firstRow)),Q&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(g=M(g,l?.lastRow)),O&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.firstCol)),V&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.lastCol)),G&&O&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.nwCell)),G&&V&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.neCell)),Q&&O&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.swCell)),Q&&V&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.seCell)),I.push(Ce(Y,n,r,re,g,p,R,B,ie,le,he,F,k));}return chunkSUXJX72X_js.b.node("tableRow",v,I)}var we=["top","bottom","left","right","insideH","insideV"];function xe(e,n){if(!e)return e;let r;for(let i of we){let t=e[i];if(!t?.color?.themeColor||t.color.auto)continue;let l=chunkMJ5FQX7Q_js.b(t.color,n);l&&(r??(r={...e}),r[i]={...t,color:{rgb:l}});}return r??e}function Ce(e,n,r,i,t,l,o,s,f,p,c,d,m){let u=e.formatting,F=c??1,k=u?.width?.value,v=u?.width?.type;k===void 0&&i!==void 0&&(k=i,v="pct");let N=chunkMJ5FQX7Q_js.b(u?.shading?.fill??t?.tcPr?.shading?.fill,m),R=l?{top:o?l.top:l.insideH,bottom:s?l.bottom:l.insideH,left:f?l.left:l.insideV,right:p?l.right:l.insideV}:void 0,B=t?.tcPr?.borders,h=u?.borders,y=xe(R||B||h?{...R??{},...B??{},...h??{}}:void 0,m),S={colspan:u?.gridSpan??1,rowspan:F,width:k,widthType:v,verticalAlign:u?.verticalAlign,backgroundColor:N,textDirection:u?.textDirection,noWrap:u?.noWrap,borders:y,margins:u?.margins?{top:u.margins.top?.value,bottom:u.margins.bottom?.value,left:u.margins.left?.value,right:u.margins.right?.value}:t?.tcPr?.margins?{top:t.tcPr.margins.top?.value,bottom:t.tcPr.margins.bottom?.value,left:t.tcPr.margins.left?.value,right:t.tcPr.margins.right?.value}:d,_originalFormatting:u||void 0,_originalResolvedFill:N},w=[];for(let I of e.content)I.type==="paragraph"?w.push(E(I,n,void 0,t?.rPr)):I.type==="table"&&w.push(K(I,n));w.length===0&&w.push(chunkSUXJX72X_js.b.node("paragraph",{},[]));let C=r?"tableHeader":"tableCell";return chunkSUXJX72X_js.b.node(C,S,w)}function ne(e,n){let r=Se(e),i=E(e,n),t=[],l=r.length>0&&i.content.size===0,{anchored:o,inFlow:s}=ke(r);for(let f of o)t.push(ue(f,n));l||t.push(i);for(let f of s)t.push(ue(f,n));return t}function ke(e){let n=[],r=[];for(let i of e)chunkD4RPOJC7_js.a(i)?n.push(i):r.push(i);return {anchored:n,inFlow:r}}function Se(e){let n=[];for(let r of e.content)if(r.type==="run"){for(let i of r.content)if(i.type==="shape"&&"shape"in i){let t=i.shape;t.textBody&&t.textBody.content.length>0&&n.push({type:"textBox",id:t.id,size:t.size,position:t.position,wrap:t.wrap,fill:t.fill,outline:t.outline,content:t.textBody.content,margins:t.textBody.margins});}}return n}function ue(e,n){let r=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):200,i=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):void 0,t;e.fill?.color?.rgb&&(t=`#${e.fill.color.rgb}`);let l,o,s;e.outline&&e.outline.width&&(l=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(o=`#${e.outline.color.rgb}`),s=e.outline.style||"solid");let f=e.margins?.top!=null?chunk4Q2IP5FW_js.e(e.margins.top):4,p=e.margins?.bottom!=null?chunk4Q2IP5FW_js.e(e.margins.bottom):4,c=e.margins?.left!=null?chunk4Q2IP5FW_js.e(e.margins.left):7,d=e.margins?.right!=null?chunk4Q2IP5FW_js.e(e.margins.right):7,m=[];for(let u of e.content)m.push(E(u,n));return m.length===0&&m.push(chunkSUXJX72X_js.b.node("paragraph",{},[])),chunkSUXJX72X_js.b.node("textBox",{width:r,height:i,textBoxId:e.id,fillColor:t,outlineWidth:l,outlineColor:o,outlineStyle:s,marginTop:f,marginBottom:p,marginLeft:c,marginRight:d,...chunkD4RPOJC7_js.b(e)},m)}function it(e,n){let r=e.package.document.content,i=[],t=e.package.theme??null,l=n?.styles?chunkIP2VXNWG_js.b(n.styles):null;for(let o of r)if(o.type==="paragraph")i.push(...ne(o,l)),ce(o)&&i.push(chunkSUXJX72X_js.b.node("pageBreak"));else if(o.type==="table"){let s=K(o,l,t);i.push(s);}return i.length===0&&i.push(chunkSUXJX72X_js.b.node("paragraph",{},[])),chunkSUXJX72X_js.b.node("doc",null,i)}function Re(e,n){let r=[],i=n?.styles?chunkIP2VXNWG_js.b(n.styles):null,t=n?.theme??null;for(let l of e)l.type==="paragraph"?r.push(...ne(l,i)):l.type==="table"&&r.push(K(l,i,t));return r.length===0&&r.push(chunkSUXJX72X_js.b.node("paragraph",{},[])),chunkSUXJX72X_js.b.node("doc",null,r)}function lt(e,n){return Re(e,n)}function st(){return chunkSUXJX72X_js.b.node("doc",null,[chunkSUXJX72X_js.b.node("paragraph",{},[])])}exports.a=it;exports.b=Re;exports.c=lt;exports.d=st;