@eigenpal/docx-editor-core 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-25775MLP.mjs +2 -0
- package/dist/{chunk-DKUHG27E.js → chunk-2AEZLDY4.js} +1 -1
- package/dist/chunk-2EFI3BAN.js +59 -0
- package/dist/{chunk-XCXQWCV2.js → chunk-2EKWMNCY.js} +1 -1
- package/dist/chunk-3QQLHMB6.mjs +4 -0
- package/dist/{chunk-DEQFU56O.js → chunk-455DUC37.js} +1 -1
- package/dist/chunk-4EATD3FP.js +2 -0
- package/dist/chunk-4VLKSJRK.mjs +1 -0
- package/dist/{chunk-WTIN6QHX.js → chunk-5CLYWBNI.js} +1 -1
- package/dist/{chunk-NKIDBERV.js → chunk-5TLT5TUD.js} +1 -1
- package/dist/{chunk-DUXHJ6QP.js → chunk-5ZAMEYCA.js} +1 -1
- package/dist/{chunk-O4RCQNUW.mjs → chunk-6BAIXYUY.mjs} +1 -1
- package/dist/{chunk-7EU6E64E.mjs → chunk-6UCWVS7Y.mjs} +1 -1
- package/dist/chunk-7E2TOWBX.mjs +1 -0
- package/dist/{chunk-YSBX4LFA.mjs → chunk-7LPUPZAO.mjs} +2 -2
- package/dist/{chunk-OWGY46IW.mjs → chunk-AC6JHCPC.mjs} +1 -1
- package/dist/chunk-B3SVS2AF.js +1 -0
- package/dist/{chunk-4HNEXEGS.js → chunk-BA4OW45H.js} +1 -1
- package/dist/{chunk-KPWWI5UW.mjs → chunk-CF4SIWV2.mjs} +1 -1
- package/dist/{chunk-GFM6PERG.js → chunk-CMZXBKDH.js} +1 -1
- package/dist/chunk-CRQO6WI3.mjs +2 -0
- package/dist/chunk-DPMR7U7D.js +2 -0
- package/dist/{chunk-QZPVZY6S.mjs → chunk-EEEED6FG.mjs} +1 -1
- package/dist/{chunk-HQ76VZAN.mjs → chunk-IJ2PPHRN.mjs} +1 -1
- package/dist/chunk-IUYHWUBF.mjs +1 -0
- package/dist/chunk-LMGFGJTJ.mjs +1 -0
- package/dist/chunk-LZTEPSU2.js +4 -0
- package/dist/{chunk-TXAB4I4M.mjs → chunk-NJBEJTIO.mjs} +1 -1
- package/dist/chunk-OBRTIXHC.mjs +59 -0
- package/dist/{chunk-TT3ILFZC.js → chunk-OTXLG6KM.js} +1 -1
- package/dist/chunk-QI6JDDGO.js +1 -0
- package/dist/{chunk-DUVSDFRG.js → chunk-R5DGXEWJ.js} +1 -1
- package/dist/{chunk-DU5TWD2W.mjs → chunk-RT5AAIEK.mjs} +1 -1
- package/dist/{chunk-KEDY4GFG.js → chunk-SSL74NAS.js} +3 -3
- package/dist/{chunk-NN2EJIO7.mjs → chunk-T5G3IWCO.mjs} +1 -1
- package/dist/{chunk-QRBFMR7Z.mjs → chunk-U55TPVTA.mjs} +1 -1
- package/dist/{chunk-ICNIAAH7.mjs → chunk-V4DLVFYG.mjs} +1 -1
- package/dist/chunk-WA4IJOGH.js +1 -0
- package/dist/{chunk-PM4KDJJ2.js → chunk-XLY5A37T.js} +1 -1
- package/dist/{chunk-K7NSOCSY.js → chunk-XRJFWDCV.js} +1 -1
- package/dist/chunk-ZCYUN3EC.js +1 -0
- package/dist/{chunk-A7C3DGQA.mjs → chunk-ZW3VG4TK.mjs} +1 -1
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +2 -2
- package/dist/docx/rezip.d.ts +2 -2
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.mjs +1 -1
- package/dist/executor-LAWUSXNG.mjs +1 -0
- package/dist/executor-SJOHUTMY.js +1 -0
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.js +8 -8
- package/dist/mcp.mjs +1 -1
- package/dist/prosemirror/applyFormatting.js +1 -1
- package/dist/prosemirror/applyFormatting.mjs +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +1 -1
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-2LVK7EF5.mjs +0 -2
- package/dist/chunk-47SKD7QB.mjs +0 -4
- package/dist/chunk-4JPHW7ZI.js +0 -2
- package/dist/chunk-4U2S3WV2.js +0 -1
- package/dist/chunk-5EP47PMQ.mjs +0 -2
- package/dist/chunk-B6FA4MJ5.mjs +0 -1
- package/dist/chunk-C2BAPYGJ.js +0 -1
- package/dist/chunk-DFDL337G.js +0 -4
- package/dist/chunk-F24WZXN4.mjs +0 -59
- package/dist/chunk-FETIBXTH.js +0 -1
- package/dist/chunk-JQUIUKRO.js +0 -59
- package/dist/chunk-LE67NTCN.mjs +0 -1
- package/dist/chunk-SHZOAUHB.mjs +0 -1
- package/dist/chunk-WVY2UXAK.js +0 -2
- package/dist/executor-FHL5D4CB.js +0 -1
- package/dist/executor-FL6XGVP3.mjs +0 -1
package/dist/chunk-5EP47PMQ.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a,r,s,t,u as u$1,A,z,q as q$1,B,D,O,N,C,b as b$3}from'./chunk-47SKD7QB.mjs';import {b as b$1}from'./chunk-MOCGHQ4A.mjs';import {u,q}from'./chunk-CDBKFBC2.mjs';import {b,a as a$2}from'./chunk-W77JXDEV.mjs';import {b as b$2}from'./chunk-DI6CRWSW.mjs';import {a as a$1}from'./chunk-VJFIAFZ5.mjs';import {c,f,e,l,j as j$1,a as a$3,i,m}from'./chunk-3ANZ3252.mjs';import He from'jszip';async function G(t){let n=await He.loadAsync(t),e={documentXml:null,stylesXml:null,themeXml:null,numberingXml:null,fontTableXml:null,settingsXml:null,webSettingsXml:null,headers:new Map,footers:new Map,footnotesXml:null,endnotesXml:null,commentsXml:null,commentsExtensibleXml:null,commentsExtendedXml:null,documentRels:null,packageRels:null,contentTypesXml:null,corePropsXml:null,appPropsXml:null,customPropsXml:null,media:new Map,fonts:new Map,allXml:new Map,originalZip:n,originalBuffer:t};for(let[o,i]of Object.entries(n.files)){if(i.dir)continue;let r=o.toLowerCase();if(r.endsWith(".xml")||r.endsWith(".rels")){let a=await i.async("text");if(e.allXml.set(o,a),r==="word/document.xml")e.documentXml=a;else if(r==="word/styles.xml")e.stylesXml=a;else if(r==="word/theme/theme1.xml")e.themeXml=a;else if(r==="word/numbering.xml")e.numberingXml=a;else if(r==="word/fonttable.xml")e.fontTableXml=a;else if(r==="word/settings.xml")e.settingsXml=a;else if(r==="word/websettings.xml")e.webSettingsXml=a;else if(r==="word/footnotes.xml")e.footnotesXml=a;else if(r==="word/endnotes.xml")e.endnotesXml=a;else if(r==="word/comments.xml")e.commentsXml=a;else if(r==="word/commentsextensible.xml")e.commentsExtensibleXml=a;else if(r==="word/commentsextended.xml")e.commentsExtendedXml=a;else if(r==="word/_rels/document.xml.rels")e.documentRels=a;else if(r==="_rels/.rels")e.packageRels=a;else if(r==="[content_types].xml")e.contentTypesXml=a;else if(r==="docprops/core.xml")e.corePropsXml=a;else if(r==="docprops/app.xml")e.appPropsXml=a;else if(r==="docprops/custom.xml")e.customPropsXml=a;else if(r.match(/^word\/header\d+\.xml$/)){let c=o.split("/").pop()||o;e.headers.set(c,a);}else if(r.match(/^word\/footer\d+\.xml$/)){let c=o.split("/").pop()||o;e.footers.set(c,a);}}else if(r.startsWith("word/media/")){let a=await i.async("arraybuffer");e.media.set(o,a);}else if(r.startsWith("word/fonts/")){let a=await i.async("arraybuffer");e.fonts.set(o,a);}}return e}function Me(t){switch(t.toLowerCase().split(".").pop()){case "png":return "image/png";case "jpg":case "jpeg":return "image/jpeg";case "gif":return "image/gif";case "bmp":return "image/bmp";case "tif":case "tiff":return "image/tiff";case "wmf":return "image/x-wmf";case "emf":return "image/x-emf";case "svg":return "image/svg+xml";case "webp":return "image/webp";default:return "application/octet-stream"}}function Y(t,n,e,o){let i={};return t&&t!=="auto"?i.rgb=t:t==="auto"&&(i.auto=true),n&&(i.themeColor=n),e&&(i.themeTint=e),o&&(i.themeShade=o),i}function W(t){if(!t)return;let n={},e=j$1(t,"w","color");e&&e!=="auto"&&(n.color={rgb:e});let o=j$1(t,"w","fill");o&&o!=="auto"&&(n.fill={rgb:o});let i=j$1(t,"w","themeFill");i&&(n.fill=n.fill||{},n.fill.themeColor=i);let r=j$1(t,"w","themeFillTint");r&&n.fill&&(n.fill.themeTint=r);let a=j$1(t,"w","themeFillShade");a&&n.fill&&(n.fill.themeShade=a);let c=j$1(t,"w","val");return c&&(n.pattern=c),Object.keys(n).length>0?n:void 0}function $(t,n){if(!t)return;let e$1={},o=e(t,"w","b");o&&(e$1.bold=m(o));let i=e(t,"w","bCs");i&&(e$1.boldCs=m(i));let r=e(t,"w","i");r&&(e$1.italic=m(r));let a=e(t,"w","iCs");a&&(e$1.italicCs=m(a));let c=e(t,"w","u");if(c){let m=j$1(c,"w","val");if(m){e$1.underline={style:m};let P=j$1(c,"w","color"),I=j$1(c,"w","themeColor");(P||I)&&(e$1.underline.color=Y(P,I,j$1(c,"w","themeTint"),j$1(c,"w","themeShade")));}}let g=e(t,"w","strike");g&&(e$1.strike=m(g));let d=e(t,"w","dstrike");d&&(e$1.doubleStrike=m(d));let h=e(t,"w","vertAlign");if(h){let m=j$1(h,"w","val");(m==="superscript"||m==="subscript"||m==="baseline")&&(e$1.vertAlign=m);}let b=e(t,"w","smallCaps");b&&(e$1.smallCaps=m(b));let u=e(t,"w","caps");u&&(e$1.allCaps=m(u));let S=e(t,"w","vanish");S&&(e$1.hidden=m(S));let f=e(t,"w","color");f&&(e$1.color=Y(j$1(f,"w","val"),j$1(f,"w","themeColor"),j$1(f,"w","themeTint"),j$1(f,"w","themeShade")));let y=e(t,"w","highlight");if(y){let m=j$1(y,"w","val");m&&(e$1.highlight=m);}let C=e(t,"w","shd");C&&(e$1.shading=W(C));let D=e(t,"w","sz");if(D){let m=l(D,"w","val");m!==void 0&&(e$1.fontSize=m);}let B=e(t,"w","szCs");if(B){let m=l(B,"w","val");m!==void 0&&(e$1.fontSizeCs=m);}let v=e(t,"w","rFonts");if(v){e$1.fontFamily={ascii:j$1(v,"w","ascii")??void 0,hAnsi:j$1(v,"w","hAnsi")??void 0,eastAsia:j$1(v,"w","eastAsia")??void 0,cs:j$1(v,"w","cs")??void 0};let m=j$1(v,"w","asciiTheme");m&&(e$1.fontFamily.asciiTheme=m,n&&!e$1.fontFamily.ascii&&(e$1.fontFamily.ascii=b$3(n,m)));let P=j$1(v,"w","hAnsiTheme");P&&(e$1.fontFamily.hAnsiTheme=P,n&&!e$1.fontFamily.hAnsi&&(e$1.fontFamily.hAnsi=b$3(n,P)));let I=j$1(v,"w","eastAsiaTheme");I&&(e$1.fontFamily.eastAsiaTheme=I,n&&!e$1.fontFamily.eastAsia&&(e$1.fontFamily.eastAsia=b$3(n,I)));let U=j$1(v,"w","cstheme");U&&(e$1.fontFamily.csTheme=U,n&&!e$1.fontFamily.cs&&(e$1.fontFamily.cs=b$3(n,U)));}let X=e(t,"w","spacing");if(X){let m=l(X,"w","val");m!==void 0&&(e$1.spacing=m);}let p=e(t,"w","position");if(p){let m=l(p,"w","val");m!==void 0&&(e$1.position=m);}let x=e(t,"w","w");if(x){let m=l(x,"w","val");m!==void 0&&(e$1.scale=m);}let F=e(t,"w","kern");if(F){let m=l(F,"w","val");m!==void 0&&(e$1.kerning=m);}let A=e(t,"w","effect");if(A){let m=j$1(A,"w","val");m&&(e$1.effect=m);}let k=e(t,"w","em");if(k){let m=j$1(k,"w","val");m&&(e$1.emphasisMark=m);}let M=e(t,"w","emboss");M&&(e$1.emboss=m(M));let R=e(t,"w","imprint");R&&(e$1.imprint=m(R));let V=e(t,"w","outline");V&&(e$1.outline=m(V));let L=e(t,"w","shadow");L&&(e$1.shadow=m(L));let N=e(t,"w","rtl");N&&(e$1.rtl=m(N));let H=e(t,"w","cs");H&&(e$1.cs=m(H));let _=e(t,"w","rStyle");if(_){let m=j$1(_,"w","val");m&&(e$1.styleId=m);}return Object.keys(e$1).length>0?e$1:void 0}function E(t){if(!t)return;let n=j$1(t,"w","val");if(!n)return;let e={style:n},o=j$1(t,"w","color"),i=j$1(t,"w","themeColor");(o||i)&&(e.color=Y(o,i,j$1(t,"w","themeTint"),j$1(t,"w","themeShade")));let r=l(t,"w","sz");r!==void 0&&(e.size=r);let a=l(t,"w","space");a!==void 0&&(e.space=a);let c=j$1(t,"w","shadow");c&&(e.shadow=c==="1"||c==="true");let g=j$1(t,"w","frame");return g&&(e.frame=g==="1"||g==="true"),e}function je(t){if(!t)return;let n=f(t,"w","tab");if(n.length===0)return;let e=[];for(let o of n){let i=l(o,"w","pos"),r=j$1(o,"w","val");if(i!==void 0&&r){let a={position:i,alignment:r},c=j$1(o,"w","leader");c&&(a.leader=c),e.push(a);}}return e.length>0?e:void 0}function K(t,n){if(!t)return;let e$1={},o=e(t,"w","jc");if(o){let p=j$1(o,"w","val");p&&(e$1.alignment=p);}let i=e(t,"w","bidi");i&&(e$1.bidi=m(i));let r=e(t,"w","spacing");if(r){let p=l(r,"w","before");p!==void 0&&(e$1.spaceBefore=p);let x=l(r,"w","after");x!==void 0&&(e$1.spaceAfter=x);let F=l(r,"w","line");F!==void 0&&(e$1.lineSpacing=F);let A=j$1(r,"w","lineRule");A&&(e$1.lineSpacingRule=A);let k=j$1(r,"w","beforeAutospacing");k&&(e$1.beforeAutospacing=k==="1"||k==="true");let M=j$1(r,"w","afterAutospacing");M&&(e$1.afterAutospacing=M==="1"||M==="true");}let a=e(t,"w","ind");if(a){let p=l(a,"w","left");p!==void 0&&(e$1.indentLeft=p);let x=l(a,"w","right");x!==void 0&&(e$1.indentRight=x);let F=l(a,"w","firstLine");F!==void 0&&(e$1.indentFirstLine=F);let A=l(a,"w","hanging");A!==void 0&&(e$1.indentFirstLine=-A,e$1.hangingIndent=true);}let c=e(t,"w","pBdr");if(c){let p={},x=E(e(c,"w","top"));x&&(p.top=x);let F=E(e(c,"w","bottom"));F&&(p.bottom=F);let A=E(e(c,"w","left"));A&&(p.left=A);let k=E(e(c,"w","right"));k&&(p.right=k);let M=E(e(c,"w","between"));M&&(p.between=M);let R=E(e(c,"w","bar"));R&&(p.bar=R),Object.keys(p).length>0&&(e$1.borders=p);}let g=e(t,"w","shd");g&&(e$1.shading=W(g));let d=e(t,"w","tabs");d&&(e$1.tabs=je(d));let h=e(t,"w","keepNext");h&&(e$1.keepNext=m(h));let b=e(t,"w","keepLines");b&&(e$1.keepLines=m(b));let u=e(t,"w","widowControl");u&&(e$1.widowControl=m(u));let S=e(t,"w","pageBreakBefore");S&&(e$1.pageBreakBefore=m(S));let f=e(t,"w","contextualSpacing");f&&(e$1.contextualSpacing=m(f));let y=e(t,"w","numPr");if(y){let p=e(y,"w","numId"),x=e(y,"w","ilvl");if(p||x){if(e$1.numPr={},p){let F=l(p,"w","val");F!==void 0&&(e$1.numPr.numId=F);}if(x){let F=l(x,"w","val");F!==void 0&&(e$1.numPr.ilvl=F);}}}let C=e(t,"w","outlineLvl");if(C){let p=l(C,"w","val");p!==void 0&&(e$1.outlineLevel=p);}let D=e(t,"w","pStyle");if(D){let p=j$1(D,"w","val");p&&(e$1.styleId=p);}let B=e(t,"w","suppressLineNumbers");B&&(e$1.suppressLineNumbers=m(B));let v=e(t,"w","suppressAutoHyphens");v&&(e$1.suppressAutoHyphens=m(v));let X=e(t,"w","rPr");return X&&(e$1.runProperties=$(X,n)),Object.keys(e$1).length>0?e$1:void 0}function j(t){if(!t)return;let n=l(t,"w","w"),e=j$1(t,"w","type");if(n!==void 0&&e)return {value:n,type:e}}function De(t){if(!t)return;let n={},e$1=E(e(t,"w","top"));e$1&&(n.top=e$1);let o=E(e(t,"w","bottom"));o&&(n.bottom=o);let i=E(e(t,"w","left"));i&&(n.left=i);let r=E(e(t,"w","right"));r&&(n.right=r);let a=E(e(t,"w","insideH"));a&&(n.insideH=a);let c=E(e(t,"w","insideV"));return c&&(n.insideV=c),Object.keys(n).length>0?n:void 0}function Ae(t){if(!t)return;let n={},e$1=j(e(t,"w","top"));e$1&&(n.top=e$1);let o=j(e(t,"w","bottom"));o&&(n.bottom=o);let i=j(e(t,"w","left"));i&&(n.left=i);let r=j(e(t,"w","right"));return r&&(n.right=r),Object.keys(n).length>0?n:void 0}function Le(t){if(!t)return;let n={},e=j$1(t,"w","val");if(e){let d=parseInt(e,16);isNaN(d)||(n.firstRow=(d&32)!==0,n.lastRow=(d&64)!==0,n.firstColumn=(d&128)!==0,n.lastColumn=(d&256)!==0,n.noHBand=(d&512)!==0,n.noVBand=(d&1024)!==0);}let o=j$1(t,"w","firstColumn");o&&(n.firstColumn=o==="1");let i=j$1(t,"w","firstRow");i&&(n.firstRow=i==="1");let r=j$1(t,"w","lastColumn");r&&(n.lastColumn=r==="1");let a=j$1(t,"w","lastRow");a&&(n.lastRow=a==="1");let c=j$1(t,"w","noHBand");c&&(n.noHBand=c==="1");let g=j$1(t,"w","noVBand");return g&&(n.noVBand=g==="1"),Object.keys(n).length>0?n:void 0}function le(t,n){if(!t)return;let e$1={},o=e(t,"w","tblW");o&&(e$1.width=j(o));let i=e(t,"w","jc");if(i){let f=j$1(i,"w","val");(f==="left"||f==="center"||f==="right")&&(e$1.justification=f);}let r=e(t,"w","tblCellSpacing");r&&(e$1.cellSpacing=j(r));let a=e(t,"w","tblInd");a&&(e$1.indent=j(a));let c=e(t,"w","tblBorders");c&&(e$1.borders=De(c));let g=e(t,"w","tblCellMar");g&&(e$1.cellMargins=Ae(g));let d=e(t,"w","tblLayout");if(d){let f=j$1(d,"w","type");(f==="fixed"||f==="autofit")&&(e$1.layout=f);}let h=e(t,"w","tblStyle");if(h){let f=j$1(h,"w","val");f&&(e$1.styleId=f);}let b=e(t,"w","tblLook");b&&(e$1.look=Le(b));let u=e(t,"w","shd");u&&(e$1.shading=W(u));let S=e(t,"w","bidiVisual");return S&&(e$1.bidi=m(S)),Object.keys(e$1).length>0?e$1:void 0}function ce(t){if(!t)return;let n={},e$1=e(t,"w","trHeight");if(e$1){n.height=j(e$1);let c=j$1(e$1,"w","hRule");c&&(n.heightRule=c);}let o=e(t,"w","tblHeader");o&&(n.header=m(o));let i=e(t,"w","cantSplit");i&&(n.cantSplit=m(i));let r=e(t,"w","jc");if(r){let c=j$1(r,"w","val");(c==="left"||c==="center"||c==="right")&&(n.justification=c);}let a=e(t,"w","hidden");return a&&(n.hidden=m(a)),Object.keys(n).length>0?n:void 0}function fe(t,n){if(!t)return;let e$1={},o=e(t,"w","tcW");o&&(e$1.width=j(o));let i=e(t,"w","tcBorders");i&&(e$1.borders=De(i));let r=e(t,"w","tcMar");r&&(e$1.margins=Ae(r));let a=e(t,"w","shd");a&&(e$1.shading=W(a));let c=e(t,"w","vAlign");if(c){let f=j$1(c,"w","val");(f==="top"||f==="center"||f==="bottom")&&(e$1.verticalAlign=f);}let g=e(t,"w","textDirection");if(g){let f=j$1(g,"w","val");f&&(e$1.textDirection=f);}let d=e(t,"w","gridSpan");if(d){let f=l(d,"w","val");f!==void 0&&(e$1.gridSpan=f);}let h=e(t,"w","vMerge");if(h){let f=j$1(h,"w","val");e$1.vMerge=f==="restart"?"restart":"continue";}let b=e(t,"w","tcFitText");b&&(e$1.fitText=m(b));let u=e(t,"w","noWrap");u&&(e$1.noWrap=m(u));let S=e(t,"w","hideMark");return S&&(e$1.hideMark=m(S)),Object.keys(e$1).length>0?e$1:void 0}function Ue(t,n){let e$1={styleId:j$1(t,"w","styleId")??"",type:j$1(t,"w","type")??"paragraph"},o=j$1(t,"w","default");o&&(e$1.default=o==="1"||o==="true");let i=e(t,"w","name");i&&(e$1.name=j$1(i,"w","val")??void 0);let r=e(t,"w","basedOn");r&&(e$1.basedOn=j$1(r,"w","val")??void 0);let a=e(t,"w","next");a&&(e$1.next=j$1(a,"w","val")??void 0);let c=e(t,"w","link");c&&(e$1.link=j$1(c,"w","val")??void 0);let g=e(t,"w","uiPriority");if(g){let X=l(g,"w","val");X!==void 0&&(e$1.uiPriority=X);}let d=e(t,"w","hidden");d&&(e$1.hidden=m(d));let h=e(t,"w","semiHidden");h&&(e$1.semiHidden=m(h));let b=e(t,"w","unhideWhenUsed");b&&(e$1.unhideWhenUsed=m(b));let u=e(t,"w","qFormat");u&&(e$1.qFormat=m(u));let S=e(t,"w","personal");S&&(e$1.personal=m(S));let f$1=e(t,"w","pPr");f$1&&(e$1.pPr=K(f$1,n));let y=e(t,"w","rPr");y&&(e$1.rPr=$(y,n));let C=e(t,"w","tblPr");C&&(e$1.tblPr=le(C));let D=e(t,"w","trPr");D&&(e$1.trPr=ce(D));let B=e(t,"w","tcPr");B&&(e$1.tcPr=fe(B));let v=f(t,"w","tblStylePr");if(v.length>0){e$1.tblStylePr=[];for(let X of v){let p=j$1(X,"w","type");if(p){let x={type:p},F=e(X,"w","pPr");F&&(x.pPr=K(F,n));let A=e(X,"w","rPr");A&&(x.rPr=$(A,n));let k=e(X,"w","tblPr");k&&(x.tblPr=le(k));let M=e(X,"w","trPr");M&&(x.trPr=ce(M));let R=e(X,"w","tcPr");R&&(x.tcPr=fe(R)),e$1.tblStylePr.push(x);}}}return e$1}function Oe(t,n){if(!t)return;let e$1={},o=e(t,"w","rPrDefault");if(o){let r=e(o,"w","rPr");r&&(e$1.rPr=$(r,n));}let i=e(t,"w","pPrDefault");if(i){let r=e(i,"w","pPr");r&&(e$1.pPr=K(r,n));}return e$1.rPr||e$1.pPr?e$1:void 0}function ze(t,n){if(!n)return t;if(!t)return n?{...n}:void 0;let e={...t};for(let o of Object.keys(n)){let i=n[o];if(i!==void 0)if(o==="runProperties")e.runProperties=b$2(e.runProperties,n.runProperties);else if(o==="borders"||o==="numPr"||o==="frame"){let r=e[o],a=i;e[o]={...r||{},...a||{}};}else o==="tabs"&&Array.isArray(i)?e.tabs=[...i]:e[o]=i;}return e}function Be(t,n,e,o=new Set){if(o.has(t.styleId)||(o.add(t.styleId),!t.basedOn))return t;let i=n.get(t.basedOn);if(!i)return t;let r=Be(i,n,e,o),a={...t,pPr:ze(r.pPr,t.pPr),rPr:b$2(r.rPr,t.rPr)};return t.type==="table"&&((r.tblPr||t.tblPr)&&(a.tblPr={...r.tblPr||{},...t.tblPr||{}}),(r.trPr||t.trPr)&&(a.trPr={...r.trPr||{},...t.trPr||{}}),(r.tcPr||t.tcPr)&&(a.tcPr={...r.tcPr||{},...t.tcPr||{}})),a}function ue(t,n){let e=new Map;try{let o=c(t);if(!o)return e;let i=f(o,"w","style");for(let r of i){let a=Ue(r,n);a.styleId&&e.set(a.styleId,a);}for(let[r,a]of e){let c=Be(a,e,n);e.set(r,c);}}catch(o){console.warn("Failed to parse styles:",o);}return e}function ke(t,n){let e$1={styles:[]};try{let o=c(t);if(!o)return e$1;let i=e(o,"w","docDefaults");e$1.docDefaults=Oe(i,n);let r=e(o,"w","latentStyles");r&&(e$1.latentStyles={defLockedState:j$1(r,"w","defLockedState")==="1",defUIPriority:l(r,"w","defUIPriority"),defSemiHidden:j$1(r,"w","defSemiHidden")==="1",defUnhideWhenUsed:j$1(r,"w","defUnhideWhenUsed")==="1",defQFormat:j$1(r,"w","defQFormat")==="1",count:l(r,"w","count")});let a=ue(t,n);e$1.styles=Array.from(a.values());}catch(o){console.warn("Failed to parse style definitions:",o);}return e$1}var Ie=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function Re(t){let n=[],e;for(Ie.lastIndex=0;(e=Ie.exec(t))!==null;){let o=e[1].trim();o&&!n.includes(o)&&n.push(o);}return n}function ee(t){let n=[];for(let e of t)if(e.type==="paragraph"){let o=N(e),i=Re(o);for(let r of i)n.includes(r)||n.push(r);}else if(e.type==="table"){let o=Ee(e);for(let i of o)n.includes(i)||n.push(i);}return n}function Ee(t){let n=[];for(let e of t.rows)for(let o of e.cells)for(let i of o.content)if(i.type==="paragraph"){let r=N(i),a=Re(r);for(let c of a)n.includes(c)||n.push(c);}else if(i.type==="table"){let r=Ee(i);for(let a of r)n.includes(a)||n.push(a);}return n}function We(t,n){let e=[],o=[];for(let i of t)o.push(i),i.type==="paragraph"&&i.sectionProperties&&(e.push({properties:i.sectionProperties,content:o}),o=[]);return (o.length>0||e.length===0)&&e.push({properties:n??C(),content:o}),e}function te(t,n=null,e$1=null,o=null,i=null,r=null){let a={content:[]};if(!t)return a;let c=a$3(t);if(!c)return a;let g=(c.elements??[]).find(u=>u.type==="element"&&(u.name==="w:document"||u.name?.endsWith(":document")));if(!g)return a;let d=e(g,"w","body");if(!d)return a;a.content=q$1(d,n,e$1,o,i,r);let h=e(d,"w","sectPr");h&&(a.finalSectionProperties=B(h,i));let b=We(a.content,a.finalSectionProperties);return a.sections=D(b),a.finalSectionProperties&&a.sections.length>0&&(a.finalSectionProperties=a.sections[a.sections.length-1].properties),a}function $e(t){let n=new Map,e$1=a$3(t);if(!e$1)return n;let o=e(e$1,"w16cex","commentsExtensible")??e$1;for(let i$1 of i(o)){if((i$1.name?.replace(/^.*:/,"")??"")!=="comment")continue;let a=j$1(i$1,"w16cex","paraId")??j$1(i$1,"w15","paraId")??i$1.attributes?.["w16cex:paraId"]??i$1.attributes?.["w15:paraId"],c=j$1(i$1,"w16cex","dateUtc")??j$1(i$1,"w15","dateUtc")??i$1.attributes?.["w16cex:dateUtc"]??i$1.attributes?.["w15:dateUtc"];a&&c&&n.set(String(a).toUpperCase(),String(c));}return n}function _e(t){let n=new Map,e$1=new Map,o=a$3(t);if(!o)return {parentByParaId:n,doneByParaId:e$1};let i$1=e(o,"w15","commentsEx")??o;for(let r of i(i$1)){if((r.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let c=j$1(r,"w15","paraId")??r.attributes?.["w15:paraId"],g=j$1(r,"w15","paraIdParent")??r.attributes?.["w15:paraIdParent"],d=j$1(r,"w15","done")??r.attributes?.["w15:done"];if(c){let h=String(c).toUpperCase();g&&n.set(h,String(g).toUpperCase()),d==="1"&&e$1.set(h,true);}}return {parentByParaId:n,doneByParaId:e$1}}function Ne(t,n,e$1,o,i$1,r,a){if(!t)return [];let c=a$3(t);if(!c)return [];let g=r?$e(r):new Map,d=a?_e(a):null,h=e(c,"w","comments")??c,b=i(h),u=[],S=[];for(let f of b){if((f.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(j$1(f,"w","id")??"0",10),D=j$1(f,"w","author")??"Unknown",B=j$1(f,"w","initials"),v=B!=null?String(B):void 0,X=j$1(f,"w","date"),p=X!=null?String(X):void 0,x=j$1(f,"w14","paraId")??f.attributes?.["w14:paraId"]??j$1(f,"w","paraId"),A=(x?g.get(String(x).toUpperCase()):void 0)??p,k=j$1(f,"w","done")??f.attributes?.["w:done"],M=k==="1"||k==="true"?true:void 0,R=j$1(f,"w16cid","parentId")??j$1(f,"w","parentId")??f.attributes?.["w16cid:parentId"]??f.attributes?.["w:parentId"],V=R!=null?parseInt(String(R),10):void 0,L=[],N="";for(let H of i(f))if((H.name?.replace(/^.*:/,"")??"")==="p"){let m=O(H,n,e$1,null,o,i$1);L.push(m);let P=j$1(H,"w14","paraId")??H.attributes?.["w14:paraId"];P&&(N=String(P).toUpperCase());}M==null&&d&&N&&d.doneByParaId.get(N)&&(M=true),S.push(N),u.push({id:C,author:D,initials:v,date:A,content:L,...M!=null?{done:M}:{},...V!=null&&!isNaN(V)?{parentId:V}:{}});}if(d&&d.parentByParaId.size>0){let f=new Map;for(let y=0;y<u.length;y++){let C=S[y];C&&f.set(C,u[y].id);}for(let y=0;y<u.length;y++){if(u[y].parentId!=null)continue;let C=S[y];if(!C)continue;let D=d.parentByParaId.get(C);if(!D)continue;let B=f.get(D);B!=null&&(u[y]={...u[y],parentId:B});}}return u}async function Ve(t,n={}){let e=t instanceof ArrayBuffer?t:await u(t),{onProgress:o=()=>{},preloadFonts:i=true,parseHeadersFooters:r=true,parseNotes:a$2=true,detectVariables:c=true}=n,g=[];try{let u=function(P,I){let U=performance.now(),oe=I(),O=performance.now()-U;return b$2.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe};var d=u;let h=performance.now(),b$2=[];async function S(P,I){let U=performance.now(),oe=await I(),O=performance.now()-U;return b$2.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe}o("Extracting DOCX...",0);let f=await S("unzip",()=>G(e));o("Extracted DOCX",10),o("Parsing relationships...",10);let y=u("relationships",()=>f.documentRels?b(f.documentRels):new Map);o("Parsed relationships",15),o("Parsing theme...",15);let C=u("theme",()=>a(f.themeXml));o("Parsed theme",20),o("Parsing styles...",20);let D=null,B;u("styles",()=>{f.stylesXml&&(D=ue(f.stylesXml,C),B=ke(f.stylesXml,C));}),o("Parsed styles",30),o("Parsing numbering...",30);let v=u("numbering",()=>a$1(f.numberingXml)),X=u("settings",()=>b$1(f.settingsXml));o("Parsed numbering",35),o("Processing media files...",35);let p=u("media",()=>Ze(f,y));o("Processed media",40),o("Parsing document body...",40);let x={content:[]};u("documentBody",()=>{f.documentXml?x=te(f.documentXml,D,C,v,y,p):g.push("No document.xml found in DOCX");}),o("Parsed document body",55);let F,A;if(r){o("Parsing headers/footers...",55);let P=u("headersFooters",()=>qe(f,D,C,v,y,p));F=P.headers,A=P.footers,o("Parsed headers/footers",65);}else o("Skipping headers/footers",65);let k,M,R,V;if(a$2){o("Parsing footnotes/endnotes...",65);let P=u("footnotesEndnotes",()=>Je(f,D,C,v,y,p));k=P.footnotes,M=P.endnotes,R=P.footnoteSeparators,V=P.endnoteSeparators,o("Parsed footnotes/endnotes",75);}else o("Skipping footnotes/endnotes",75);o("Parsing comments...",75);let L=u("comments",()=>Ne(f.commentsXml,D,C,y,p,f.commentsExtensibleXml,f.commentsExtendedXml));L.length>0&&(x.comments=L);let N;c?(o("Detecting template variables...",75),N=u("variables",()=>ee(x.content)),o("Detected variables",80)):o("Skipping variable detection",80),i?(o("Loading fonts...",80),await S("fonts",()=>Qe(C,B,x)),o("Loaded fonts",95)):o("Skipping font loading",95),o("Assembling document...",95);let _={package:{document:x,styles:B,theme:C,numbering:v.definitions,settings:X,headers:F,footers:A,footnotes:k,endnotes:M,footnoteSeparators:R,endnoteSeparators:V,relationships:y,media:p},originalBuffer:e,templateVariables:N,warnings:g.length>0?g:void 0},m=performance.now()-h;if(m>2e3){let P=b$2.filter(I=>I.ms>100).map(I=>`${I.stage}: ${Math.round(I.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(m)}ms`+(P?` (${P})`:""));}return o("Complete",100),_}catch(h){let b=h instanceof Error?h.message:String(h);throw console.error("[parseDocx] Failed to parse DOCX:",b,h),new Error(`Failed to parse DOCX: ${b}`)}}function Ze(t,n){let e=new Map;for(let[o,i]of t.media.entries()){let r=o.split("/").pop()||o,a=Me(o),c=new Uint8Array(i),g="";for(let S=0;S<c.length;S++)g+=String.fromCharCode(c[S]);let d=btoa(g),h=`data:${a};base64,${d}`,b={path:o,filename:r,mimeType:a,data:i,dataUrl:h};e.set(o,b);let u=o.replace(/^word\//,"");u!==o&&e.set(u,b);}return e}function ne(t,n){let e=n.toLowerCase();for(let[o,i]of t.entries())if(o.toLowerCase()===e)return i}function qe(t,n,e,o,i,r$1){let a=new Map,c=new Map;for(let[g,d]of i.entries())if(d.type===a$2.header&&d.target){let h=d.target.split("/").pop()||d.target,b$1=ne(t.headers,h);if(b$1){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?b(S):i,y=r(b$1,"default",n,e,o,f,r$1);a.set(g,y);}}else if(d.type===a$2.footer&&d.target){let h=d.target.split("/").pop()||d.target,b$1=ne(t.footers,h);if(b$1){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?b(S):i,y=s(b$1,"default",n,e,o,f,r$1);c.set(g,y);}}return {headers:a,footers:c}}function Je(t$1,n,e,o,i,r){let a=t(t$1.footnotesXml,n,e,o,i,r),c=u$1(t$1.endnotesXml,n,e,o,i,r);return {footnotes:a.getNormalFootnotes(),endnotes:c.getNormalEndnotes(),footnoteSeparators:a.footnotes.filter(z),endnoteSeparators:c.endnotes.filter(A)}}async function Qe(t,n,e){let o=new Set;if(t?.fontScheme){let{majorFont:i,minorFont:r}=t.fontScheme;i?.latin&&o.add(i.latin),r?.latin&&o.add(r.latin);}if(n?.docDefaults?.rPr?.fontFamily?.ascii&&o.add(n.docDefaults.rPr.fontFamily.ascii),n?.styles)for(let i of n.styles)i.rPr?.fontFamily?.ascii&&o.add(i.rPr.fontFamily.ascii),i.rPr?.fontFamily?.hAnsi&&o.add(i.rPr.fontFamily.hAnsi);if(e.content){for(let i of e.content)if(i.type==="paragraph")for(let r of i.content)r.type==="run"&&r.formatting?.fontFamily&&(r.formatting.fontFamily.ascii&&o.add(r.formatting.fontFamily.ascii),r.formatting.fontFamily.hAnsi&&o.add(r.formatting.fontFamily.hAnsi));}if(o.size>0)try{await q(Array.from(o));}catch(i){console.warn("Failed to load some fonts:",i);}}async function Et(t){return Ve(t,{preloadFonts:false,parseHeadersFooters:false,parseNotes:false,detectVariables:true})}async function Nt(t,n){return Ve(t,{onProgress:n,preloadFonts:true,parseHeadersFooters:true,parseNotes:true,detectVariables:true})}async function Vt(t){let n=await G(t);if(!n.documentXml)return [];let e=te(n.documentXml);return ee(e.content)}async function Ht(t){let n=await G(t),e=n.documentXml?ee(te(n.documentXml).content):[];return {hasDocument:n.documentXml!==null,hasStyles:n.stylesXml!==null,hasTheme:n.themeXml!==null,hasNumbering:n.numberingXml!==null,headerCount:n.headers.size,footerCount:n.footers.size,mediaCount:n.media.size,variableCount:e.length}}
|
|
2
|
-
export{Ve as a,Et as b,Nt as c,Vt as d,Ht as e};
|
package/dist/chunk-B6FA4MJ5.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-3NRMSZX2.mjs';import {g as g$1}from'./chunk-KNY7SXPJ.mjs';function h(c){return JSON.parse(JSON.stringify(c))}function g(c,t){let a=0;for(let r=0;r<c.content.length;r++)if(c.content[r].type==="paragraph"){if(a===t)return r;a++;}return -1}function I(c){let t="";for(let a of c.content)if(a.type==="run")for(let r of a.content)r.type==="text"&&(t+=r.text);else if(a.type==="hyperlink"){for(let r of a.children)if(r.type==="run")for(let e of r.content)e.type==="text"&&(t+=e.text);}return t}function b(c,t){return {type:"run",formatting:t,content:[{type:"text",text:c}]}}function P(c,t,a,r){let e=[],o=0,p=false;for(let n of c.content)if(n.type==="run"){let s=n.content.filter(l=>l.type==="text").map(l=>l.text).join(""),i=o,u=o+s.length;if(!p&&t>=i&&t<=u){let l=t-i;l>0&&e.push({...n,content:[{type:"text",text:s.slice(0,l)}]}),e.push(b(a,r||n.formatting)),l<s.length&&e.push({...n,content:[{type:"text",text:s.slice(l)}]}),p=true;}else e.push(n);o=u;}else e.push(n);return p||e.push(b(a,r)),e}function m(c,t,a){let r=[],e=0;for(let o of c.content)if(o.type==="run"){let p=o.content.filter(i=>i.type==="text").map(i=>i.text).join(""),n=e,s=e+p.length;if(s<=t||n>=a)r.push(o);else {let i="";n<t&&(i+=p.slice(0,t-n)),s>a&&(i+=p.slice(a-n)),i.length>0&&r.push({...o,content:[{type:"text",text:i}]});}e=s;}else r.push(o);return r}function C(c,t,a,r){let e=[],o=0;for(let p of c.content)if(p.type==="run"){let n=p.content.filter(u=>u.type==="text").map(u=>u.text).join(""),s=o,i=o+n.length;if(i<=t||s>=a)e.push(p);else if(s>=t&&i<=a)e.push({...p,formatting:{...p.formatting,...r}});else {let u=Math.max(t,s),l=Math.min(a,i);s<u&&e.push({...p,content:[{type:"text",text:n.slice(0,u-s)}]}),e.push({...p,formatting:{...p.formatting,...r},content:[{type:"text",text:n.slice(u-s,l-s)}]}),i>l&&e.push({...p,content:[{type:"text",text:n.slice(l-s)}]});}o=i;}else e.push(p);return e}function v(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e];return o.content=P(o,t.position.offset,t.text,t.formatting),a}function B(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset),n.content=P(n,e.offset,t.text,t.formatting);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length),n.content=P(n,e.offset,t.text,t.formatting);let i=[];for(let u=e.paragraphIndex+1;u<=o.paragraphIndex;u++)i.push(g(r,u));for(let u=i.length-1;u>=0;u--)i[u]!==-1&&r.content.splice(i[u],1);}return a}function A(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length);let i=g(r,o.paragraphIndex),u=r.content[i];u.content=m(u,0,o.offset),n.content.push(...u.content);let l=[];for(let f=e.paragraphIndex+1;f<=o.paragraphIndex;f++)l.push(g(r,f));for(let f=l.length-1;f>=0;f--)l[f]!==-1&&r.content.splice(l[f],1);}return a}function E(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=C(n,e.offset,o.offset,t.formatting);}else for(let p=e.paragraphIndex;p<=o.paragraphIndex;p++){let n=g(r,p);if(n===-1)continue;let s=r.content[n],i=I(s),u=0,l=i.length;p===e.paragraphIndex&&(u=e.offset),p===o.paragraphIndex&&(l=o.offset),s.content=C(s,u,l,t.formatting);}return a}function S(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];if(o.formatting={...o.formatting,...t.formatting},"numPr"in t.formatting){let p=t.formatting.numPr;if(p&&p.numId!==void 0&&p.numId!==0){let n=p.ilvl??0,s=p.numId===1,i=s?"\u2022":"1.";if(a.package.numbering){let u=a.package.numbering.nums.find(l=>l.numId===p.numId);if(u){let l=a.package.numbering.abstractNums.find(f=>f.abstractNumId===u.abstractNumId);if(l){let f=l.levels.find(x=>x.ilvl===n);f&&(i=f.lvlText||i);}}}o.listRendering={level:n,numId:p.numId,marker:i,isBullet:s};}else delete o.listRendering;}return a}function F(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];return o.formatting={...o.formatting,styleId:t.styleId},a}function V(c,t){let a=h(c),r=a.package.document,e=[];for(let n=0;n<t.rows;n++){let s=[];for(let i=0;i<t.columns;i++){let u=t.data?.[n]?.[i]||"";s.push({type:"tableCell",content:[{type:"paragraph",content:u?[b(u)]:[]}]});}e.push({type:"tableRow",formatting:n===0&&t.hasHeader?{header:true}:void 0,cells:s});}let o={type:"table",rows:e},p=g(r,t.position.paragraphIndex);return p===-1?r.content.push(o):r.content.splice(p+1,0,o),a}function H(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],n={type:"run",content:[{type:"drawing",image:{type:"image",rId:`rId_img_${Date.now()}`,src:t.src,alt:t.alt,size:{width:g$1(t.width||100),height:g$1(t.height||100)},wrap:{type:"inline"}}}]},s=P(o,t.position.offset,"",void 0),i=false,u=0;for(let l=0;l<s.length;l++){let f=s[l];if(f.type==="run"){let x=f.content.filter(d=>d.type==="text").map(d=>d.text).join("");if(u+=x.length,!i&&u>=t.position.offset){s.splice(l+1,0,n),i=true;break}}}return i||s.push(n),o.content=s,a}function $(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex!==o.paragraphIndex)throw new Error("Hyperlinks cannot span multiple paragraphs");let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p],s=I(n),i=t.displayText||s.slice(e.offset,o.offset);n.content=m(n,e.offset,o.offset);let u={type:"hyperlink",href:t.url,tooltip:t.tooltip,children:[b(i)]},l=false,f=0,x=[];for(let d of n.content)if(d.type==="run"){let T=d.content.filter(y=>y.type==="text").map(y=>y.text).join(""),w=f+T.length;if(!l&&f<=e.offset&&e.offset<=w){let y=e.offset-f;y>0&&x.push({...d,content:[{type:"text",text:T.slice(0,y)}]}),x.push(u),y<T.length&&x.push({...d,content:[{type:"text",text:T.slice(y)}]}),l=true;}else x.push(d);f=w;}else x.push(d);return l||x.push(u),n.content=x,a}function j(c,t){let a=h(c),r=a.package.document,{start:e}=t.range,o=g(r,e.paragraphIndex);if(o===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let p=r.content[o],n=[];for(let s of p.content)if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&n.push(i);else n.push(s);return p.content=n,a}function D(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],p=I(o),n=m({...o,content:[...o.content]},t.position.offset,p.length),s=m({...o,content:[...o.content]},0,t.position.offset);o.content=n;let i={type:"paragraph",formatting:o.formatting,content:s};return r.content.splice(e+1,0,i),a}function M(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e],p=[];for(let n=1;n<=t.count;n++){let s=g(r,t.paragraphIndex+n);if(s!==-1){let i=r.content[s];o.content.push(...i.content),p.push(s);}}for(let n=p.length-1;n>=0;n--)r.content.splice(p[n],1);return a}function N(c,t){return D(c,{position:t.position})}function O(c,t){let a=h(c);return a.templateVariables||(a.templateVariables=[]),a.templateVariables.includes(t.name)||a.templateVariables.push(t.name),a}function _(c,t){let a=h(c),r=a.package.document;function e(n){for(let s of n.content)if(s.type==="text")for(let[i,u]of Object.entries(t.values)){let l=new RegExp(`\\{${i}\\}`,"g");s.text=s.text.replace(l,u);}}function o(n){for(let s of n.content)if(s.type==="run")e(s);else if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&e(i);}function p(n){if(n.type==="paragraph")o(n);else if(n.type==="table")for(let s of n.rows)for(let i of s.cells)for(let u of i.content)p(u);}for(let n of r.content)p(n);return a}function J(c,t){let a=b$1.getCommandHandler(t.type);if(a)return a(c,t);switch(t.type){case "insertText":return v(c,t);case "replaceText":return B(c,t);case "deleteText":return A(c,t);case "formatText":return E(c,t);case "formatParagraph":return S(c,t);case "applyStyle":return F(c,t);case "insertTable":return V(c,t);case "insertImage":return H(c,t);case "insertHyperlink":return $(c,t);case "removeHyperlink":return j(c,t);case "insertParagraphBreak":return D(c,t);case "mergeParagraphs":return M(c,t);case "splitParagraph":return N(c,t);case "setVariable":return O(c,t);case "applyVariables":return _(c,t);default:{let r=t;throw new Error(`Unknown command type: ${r.type}`)}}}function at(c,t){return t.reduce((a,r)=>J(a,r),c)}export{J as a,at as b};
|
package/dist/chunk-C2BAPYGJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';function t(){return Math.floor(Math.random()*2147483647).toString(16).toUpperCase().padStart(8,"0")}exports.a=t;
|
package/dist/chunk-DFDL337G.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkLW5OFHSW_js=require('./chunk-LW5OFHSW.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js'),chunkH57LNDBH_js=require('./chunk-H57LNDBH.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js');var Xe={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},ee={majorFont:{latin:"Calibri Light",ea:"",cs:"",fonts:{}},minorFont:{latin:"Calibri",ea:"",cs:"",fonts:{}}},we={name:"Office Theme",colorScheme:Xe,fontScheme:ee},yt=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function bt(e){if(!e)return null;switch(chunk3R7QHNI5_js.d(e.name||"")){case "srgbClr":return chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val")??null;case "sysClr":{let n=chunk3R7QHNI5_js.j(e,"a","lastClr")??chunk3R7QHNI5_js.j(e,null,"lastClr");if(n)return n;switch(chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val")){case "windowText":case "menuText":case "captionText":case "btnText":return "000000";case "window":case "menu":case "btnFace":case "btnHighlight":return "FFFFFF";case "highlight":return "0078D7";case "highlightText":return "FFFFFF";case "grayText":return "808080";default:return null}}case "schemeClr":{chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val");return null}default:return null}}function Tt(e){let t={...Xe};if(!e)return t;for(let n of yt){let o=chunk3R7QHNI5_js.e(e,"a",n);if(o){let r=chunk3R7QHNI5_js.i(o);if(r.length>0){let a=bt(r[0]);a&&(t[n]=a);}}}return t}function He(e){let t={latin:"",ea:"",cs:"",fonts:{}};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"a","latin");n&&(t.latin=chunk3R7QHNI5_js.j(n,"a","typeface")??chunk3R7QHNI5_js.j(n,null,"typeface")??"");let o=chunk3R7QHNI5_js.e(e,"a","ea");o&&(t.ea=chunk3R7QHNI5_js.j(o,"a","typeface")??chunk3R7QHNI5_js.j(o,null,"typeface")??"");let r=chunk3R7QHNI5_js.e(e,"a","cs");r&&(t.cs=chunk3R7QHNI5_js.j(r,"a","typeface")??chunk3R7QHNI5_js.j(r,null,"typeface")??"");let a=chunk3R7QHNI5_js.f(e,"a","font");for(let u of a){let l=chunk3R7QHNI5_js.j(u,"a","script")??chunk3R7QHNI5_js.j(u,null,"script"),f=chunk3R7QHNI5_js.j(u,"a","typeface")??chunk3R7QHNI5_js.j(u,null,"typeface");l&&f&&(t.fonts=t.fonts||{},t.fonts[l]=f);}return t}function xt(e){let t={...ee};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"a","majorFont");n&&(t.majorFont=He(n));let o=chunk3R7QHNI5_js.e(e,"a","minorFont");return o&&(t.minorFont=He(o)),t}function In(e){if(!e)return {...we};try{let t=chunk3R7QHNI5_js.c(e);if(!t)return {...we};let n=chunk3R7QHNI5_js.j(t,"a","name")??chunk3R7QHNI5_js.j(t,null,"name")??"Office Theme",o=chunk3R7QHNI5_js.e(t,"a","themeElements"),r=chunk3R7QHNI5_js.e(o,"a","clrScheme"),a=Tt(r),u=chunk3R7QHNI5_js.e(o,"a","fontScheme"),l=xt(u);return {name:n,colorScheme:a,fontScheme:l}}catch(t){return console.warn("Failed to parse theme:",t),{...we}}}function Ft(e,t="latin"){if(!e?.fontScheme?.majorFont)return ee.majorFont?.latin??"Calibri Light";let n=e.fontScheme.majorFont;return t==="latin"?n.latin||"Calibri Light":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri Light"}function Le(e,t="latin"){if(!e?.fontScheme?.minorFont)return ee.minorFont?.latin??"Calibri";let n=e.fontScheme.minorFont;return t==="latin"?n.latin||"Calibri":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri"}function Y(e,t){if(!t)return "Calibri";let n=t.toLowerCase().includes("major"),o=t.toLowerCase().includes("minor"),r="latin",a=t.toLowerCase();return a.includes("eastasia")?r="ea":(a.includes("bidi")||a.includes("cs"))&&(r="cs"),n?Ft(e,r):o?Le(e,r):Le(e,"latin")}function De(e){if(!e)return;let t=chunk3R7QHNI5_js.l(e,"w","w")??0,n=chunk3R7QHNI5_js.j(e,"w","type")??"dxa",o="dxa";return (n==="auto"||n==="dxa"||n==="nil"||n==="pct")&&(o=n),{value:t,type:o}}function D(e){return De(e)}function j(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=(chunk3R7QHNI5_js.j(e,"w","author")??"").trim(),r=(chunk3R7QHNI5_js.j(e,"w","date")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0}}function te(e){return j(e)}function V(e){if(!e)return;let o={style:chunk3R7QHNI5_js.j(e,"w","val")??"none"},r=chunk3R7QHNI5_js.l(e,"w","sz");r!==void 0&&(o.size=r);let a=chunk3R7QHNI5_js.l(e,"w","space");a!==void 0&&(o.space=a);let u=chunk3R7QHNI5_js.j(e,"w","color"),l=chunk3R7QHNI5_js.j(e,"w","themeColor"),f=chunk3R7QHNI5_js.j(e,"w","themeTint"),c=chunk3R7QHNI5_js.j(e,"w","themeShade");(u||l||f||c)&&(o.color={rgb:u??void 0,themeColor:l,themeTint:f??void 0,themeShade:c??void 0});let d=chunk3R7QHNI5_js.j(e,"w","shadow");(d==="1"||d==="true")&&(o.shadow=true);let p=chunk3R7QHNI5_js.j(e,"w","frame");return (p==="1"||p==="true")&&(o.frame=true),o}function ne(e){if(!e)return;let t={},n=V(chunk3R7QHNI5_js.e(e,"w","top"));n&&(t.top=n);let o=V(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(t.bottom=o);let r=V(chunk3R7QHNI5_js.e(e,"w","left")??chunk3R7QHNI5_js.e(e,"w","start"));r&&(t.left=r);let a=V(chunk3R7QHNI5_js.e(e,"w","right")??chunk3R7QHNI5_js.e(e,"w","end"));a&&(t.right=a);let u=V(chunk3R7QHNI5_js.e(e,"w","insideH"));u&&(t.insideH=u);let l=V(chunk3R7QHNI5_js.e(e,"w","insideV"));if(l&&(t.insideV=l),Object.keys(t).length!==0)return t}function oe(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","top"));n&&(t.top=n);let o=D(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(t.bottom=o);let r=D(chunk3R7QHNI5_js.e(e,"w","left")??chunk3R7QHNI5_js.e(e,"w","start"));r&&(t.left=r);let a=D(chunk3R7QHNI5_js.e(e,"w","right")??chunk3R7QHNI5_js.e(e,"w","end"));if(a&&(t.right=a),Object.keys(t).length!==0)return t}function re(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","fill");n&&n!=="auto"&&(t.fill={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","themeFill");if(o){t.fill={themeColor:o};let u=chunk3R7QHNI5_js.j(e,"w","themeFillTint");u&&t.fill&&(t.fill.themeTint=u);let l=chunk3R7QHNI5_js.j(e,"w","themeFillShade");l&&t.fill&&(t.fill.themeShade=l);}let r=chunk3R7QHNI5_js.j(e,"w","color");r&&r!=="auto"&&(t.color={rgb:r});let a=chunk3R7QHNI5_js.j(e,"w","val");if(a&&(t.pattern=a),Object.keys(t).length!==0)return t}function ye(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=chunk3R7QHNI5_js.j(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=chunk3R7QHNI5_js.j(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=chunk3R7QHNI5_js.j(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=chunk3R7QHNI5_js.j(e,"w","noHBand");(u==="1"||u==="true")&&(t.noHBand=true);let l=chunk3R7QHNI5_js.j(e,"w","noVBand");(l==="1"||l==="true")&&(t.noVBand=true);let f=chunk3R7QHNI5_js.j(e,"w","val");if(f){let c=parseInt(f,16);isNaN(c)||(c&32&&(t.firstRow=true),c&64&&(t.lastRow=true),c&128&&(t.firstColumn=true),c&256&&(t.lastColumn=true),c&512&&(t.noHBand=true),c&1024&&(t.noVBand=true));}if(Object.keys(t).length!==0)return t}function be(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","horzAnchor");(n==="margin"||n==="page"||n==="text")&&(t.horzAnchor=n);let o=chunk3R7QHNI5_js.j(e,"w","vertAnchor");(o==="margin"||o==="page"||o==="text")&&(t.vertAnchor=o);let r=chunk3R7QHNI5_js.l(e,"w","tblpX");r!==void 0&&(t.tblpX=r);let a=chunk3R7QHNI5_js.j(e,"w","tblpXSpec");a&&(t.tblpXSpec=a);let u=chunk3R7QHNI5_js.l(e,"w","tblpY");u!==void 0&&(t.tblpY=u);let l=chunk3R7QHNI5_js.j(e,"w","tblpYSpec");l&&(t.tblpYSpec=l);let f=chunk3R7QHNI5_js.l(e,"w","topFromText");f!==void 0&&(t.topFromText=f);let c=chunk3R7QHNI5_js.l(e,"w","bottomFromText");c!==void 0&&(t.bottomFromText=c);let d=chunk3R7QHNI5_js.l(e,"w","leftFromText");d!==void 0&&(t.leftFromText=d);let p=chunk3R7QHNI5_js.l(e,"w","rightFromText");if(p!==void 0&&(t.rightFromText=p),Object.keys(t).length!==0)return t}function Ct(e){return e.columnWidths&&e.columnWidths.length>0?e.columnWidths.length:e.rows.length===0?0:e.rows[0].cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function kt(e){return e.rows.length}function St(e){return e.formatting?.vMerge==="continue"}function Mt(e){return e.formatting?.vMerge==="restart"}function Rt(e){return e.rows.length===0?false:e.rows[0].formatting?.header===true}var Et={richText:"richText",text:"plainText",date:"date",dropDownList:"dropDownList",comboBox:"comboBox",picture:"picture",docPartObj:"buildingBlockGallery",docPartList:"buildingBlockGallery",group:"group",equation:"equation",citation:"citation",bibliography:"bibliography",checkbox:"checkbox"};function Pt(e){if(!e||!e.elements)return "richText";for(let t of e.elements){if(t.type!=="element"||!t.name)continue;let n=chunk3R7QHNI5_js.d(t.name),o=Et[n];if(o)return o}return "richText"}function Bt(e){let t=[];for(let n of e.elements??[])n.type==="element"&&chunk3R7QHNI5_js.d(n.name||"")==="listItem"&&t.push({displayText:chunk3R7QHNI5_js.j(n,"w","displayText")||"",value:chunk3R7QHNI5_js.j(n,"w","value")||""});return t}function ie(e,t){let n={sdtType:Pt(e)};if(e){n.rawPropertiesXml=chunk3R7QHNI5_js.b(e);for(let o of e.elements??[]){if(o.type!=="element"||!o.name)continue;switch(chunk3R7QHNI5_js.d(o.name)){case "id":{let a=chunk3R7QHNI5_js.j(o,"w","val");if(a!=null){let u=parseInt(a,10);Number.isNaN(u)||(n.id=u);}break}case "alias":n.alias=chunk3R7QHNI5_js.j(o,"w","val")??void 0;break;case "tag":n.tag=chunk3R7QHNI5_js.j(o,"w","val")??void 0;break;case "lock":n.lock=chunk3R7QHNI5_js.j(o,"w","val")??"unlocked";break;case "placeholder":{let a=chunk3R7QHNI5_js.e(o,"w","docPart");a&&(n.placeholder=chunk3R7QHNI5_js.j(a,"w","val")??void 0);break}case "showingPlcHdr":{let a=chunk3R7QHNI5_js.j(o,"w","val");n.showingPlaceholder=a==null||!/^(0|false|off)$/i.test(a);break}case "date":{let a=chunk3R7QHNI5_js.e(o,"w","dateFormat");a&&(n.dateFormat=chunk3R7QHNI5_js.j(a,"w","val")??void 0);break}case "dropDownList":case "comboBox":n.listItems=Bt(o);break;case "checkbox":{let a=chunk3R7QHNI5_js.e(o,"w14","checked")??chunk3R7QHNI5_js.e(o,"w","checked");n.checked=a?chunk3R7QHNI5_js.j(a,"w14","val")==="1"||chunk3R7QHNI5_js.j(a,"w","val")==="1":false;break}case "dataBinding":{let a={},u=chunk3R7QHNI5_js.j(o,"w","xpath"),l=chunk3R7QHNI5_js.j(o,"w","storeItemID"),f=chunk3R7QHNI5_js.j(o,"w","prefixMappings");u!=null&&(a.xpath=u),l!=null&&(a.storeItemID=l),f!=null&&(a.prefixMappings=f),n.dataBinding=a;break}}}}return t&&(n.rawEndPropertiesXml=chunk3R7QHNI5_js.b(t)),n}var Oe={183:"\u2022",111:"\u25CB",167:"\u25A0",252:"\u2713",110:"\u25A0",113:"\u25CB",117:"\u25C6",118:"\u2756",168:"\u2713",251:"\u2713",254:"\u2713",61623:"\u2022",61550:"\u25A0",61551:"\u25CB",61607:"\u25A0",61692:"\u2713",8226:"\u2022",9679:"\u25CF",9675:"\u25CB",9632:"\u25A0",9633:"\u25A1",9670:"\u25C6",9671:"\u25C7",8211:"\u2013",8212:"\u2014",62:">",45:"-"};function vt(e){if(!e||e.trim()==="")return "\u2022";let t=e.charCodeAt(0);return Oe[t]?Oe[t]:t>=57344&&t<=63743||t<32||t>=127&&t<160?"\u2022":e}function Nt(e){let t=e.listRendering;t&&t.isBullet&&(t.marker=vt(t.marker||""));}function At(e,t,n,o,r,a,u){if(e.content.length===0)return;let l=chunk3R7QHNI5_js.i(t),f=0;function c(d){if(!chunkLW5OFHSW_js.h(d))return;let p=chunkLW5OFHSW_js.j(d);if(!p)return;let w=chunk3R7QHNI5_js.n(d,"wps","wsp");if(w){let h=chunkLW5OFHSW_js.k(w);h&&(p.content=chunkLW5OFHSW_js.g(h,Z,null,n,o,r,a??void 0,u??void 0));}let T={type:"shape",shapeType:"rect",size:p.size,position:p.position,wrap:p.wrap,fill:p.fill,outline:p.outline,textBody:{content:p.content,margins:p.margins}};p.id&&(T.id=p.id);let y={type:"shape",shape:T},x=f;if(x>=e.content.length){x=-1;for(let h=e.content.length-1;h>=0;h--)if(e.content[h].type==="run"){x=h;break}}if(x>=0){let h=e.content[x];h.type==="run"&&h.content.push(y);}}for(let d of l){if(chunk3R7QHNI5_js.d(d.name??"")!=="r")continue;let p=chunk3R7QHNI5_js.i(d);for(let w of p){let T=chunk3R7QHNI5_js.d(w.name??"");if(T==="drawing")c(w);else if(T==="AlternateContent"){let y=chunk3R7QHNI5_js.i(w),h=y.find(P=>chunk3R7QHNI5_js.d(P.name??"")==="Choice")??y.find(P=>chunk3R7QHNI5_js.d(P.name??"")==="Fallback");if(h)for(let P of chunk3R7QHNI5_js.i(h))chunk3R7QHNI5_js.d(P.name??"")==="drawing"&&c(P);}}f++;}}function q(e,t,n,o,r,a,u){let l=[],f=chunk3R7QHNI5_js.i(e);for(let c of f){let d=c.name??"";if(d==="w:p"||d.endsWith(":p")){let p=Z(c,t,n,o,r,a,u);At(p,c,t,n,o,r,a),Nt(p),l.push(p);}else if(d==="w:tbl"||d.endsWith(":tbl")){let p=Te(c,t,n,o,r,a,u);l.push(p);}else (d==="w:sdt"||d.endsWith(":sdt"))&&l.push(It(c,t,n,o,r,a,u));}return l}function It(e,t,n,o,r,a,u){let l=chunk3R7QHNI5_js.e(e,"w","sdtPr"),f=chunk3R7QHNI5_js.e(e,"w","sdtEndPr"),c=chunk3R7QHNI5_js.e(e,"w","sdtContent"),d=ie(l,f),p=c?q(c,t,n,o,r,a,u):[];return {type:"blockSdt",properties:d,content:p}}function ae(e){let t={};if(!e)return t;for(let n of e.split(";")){let o=n.indexOf(":");if(o<0)continue;let r=n.slice(0,o).trim().toLowerCase(),a=n.slice(o+1).trim();r&&(t[r]=a);}return t}function Ht(e){if(!e)return "#C0C0C0";let t=e.trim();return t.startsWith("#")?t:/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:t}function We(e){if(!e)return;let t=e.match(/^(-?[0-9.]+)(pt|px|in|cm|mm)?$/);if(!t)return;let n=parseFloat(t[1]);if(!isNaN(n))switch(t[2]){case "in":return n*96;case "cm":return n/2.54*96;case "mm":return n/25.4*96;case "px":return n;default:return n*96/72}}var Ve=914400/96;function Lt(e,t,n){if(!e||!t)return {};let o=t.get(e);if(!o?.target)return {};let r=o.target,a=r.split("/").pop()??r,u=[r,r.replace(/^\/+/,""),`word/${r.replace(/^\/+/,"")}`,`word/media/${a}`,`media/${a}`];if(n)for(let l of u){let f=l.toLowerCase();for(let[c,d]of n.entries())if(c.toLowerCase()===f)return {dataUrl:d.dataUrl??d.base64,mediaPath:d.path,contentType:d.mimeType}}return {}}function xe(e,t){if(t.includes("watermark")||(chunk3R7QHNI5_js.j(e,null,"type")??"").includes("_t136"))return true;let o=chunk3R7QHNI5_js.i(e).find(r=>r.name==="v:imagedata"||r.name?.endsWith(":imagedata"));return !!(o&&(chunk3R7QHNI5_js.j(o,null,"gain")||chunk3R7QHNI5_js.j(o,"o","gain")||chunk3R7QHNI5_js.j(o,null,"blacklevel")))}function je(e,t=null,n=null){if(!e)return;let o=chunk3R7QHNI5_js.o(e,"v","shape");for(let r of o){let a=(chunk3R7QHNI5_js.j(r,null,"id")??"").toLowerCase(),u=chunk3R7QHNI5_js.i(r),l=u.find(w=>w.name==="v:textpath"||w.name?.endsWith(":textpath")),f=u.find(w=>w.name==="v:imagedata"||w.name?.endsWith(":imagedata"));if(!xe(r,a)&&!l)continue;let c=ae(chunk3R7QHNI5_js.j(r,null,"style")),d=parseFloat(c.rotation??"0")||0,p=Math.abs(d)>5;if(l){let w=chunk3R7QHNI5_js.j(l,null,"string")??"",x=(ae(chunk3R7QHNI5_js.j(l,null,"style"))["font-family"]??"Calibri").replace(/["']/g,"").replace(/^"|"$/g,"").trim()||"Calibri",h=u.find(M=>M.name==="v:fill"||M.name?.endsWith(":fill")),P=h?chunk3R7QHNI5_js.j(h,null,"opacity"):null,C=P!=null&&parseFloat(P)<1;return {kind:"text",text:w,font:x,color:Ht(chunk3R7QHNI5_js.j(r,null,"fillcolor")),semitransparent:C,layout:p?"diagonal":"horizontal",fontSize:void 0}}if(f){let w=chunk3R7QHNI5_js.j(f,"r","id")??chunk3R7QHNI5_js.j(f,"r","embed")??chunk3R7QHNI5_js.j(f,null,"id")??"",{dataUrl:T,mediaPath:y,contentType:x}=Lt(w,t,n),h=chunk3R7QHNI5_js.j(f,null,"gain"),P=chunk3R7QHNI5_js.j(f,null,"blacklevel"),C=h!=null||P!=null,M=We(c.width),m=We(c.height);return {kind:"picture",relId:w||void 0,mediaPath:y,contentType:x,dataUrl:T,scale:1,washout:C,widthEmu:M!=null?Math.round(M*Ve):void 0,heightEmu:m!=null?Math.round(m*Ve):void 0}}}}function Ue(e){switch(e){case "first":return "first";case "even":return "even";default:return "default"}}function ze(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"r","id")??"";return {type:Ue(t),rId:n}}function _e(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"r","id")??"";return {type:Ue(t),rId:n}}function Qn(e,t="default",n=null,o=null,r=null,a=null,u=null){let l={type:"header",hdrFtrType:t,content:[]};if(!e)return l;let f=chunk3R7QHNI5_js.a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:hdr"||p.name?.endsWith(":hdr")));if(!c)return l;l.content=q(c,n,o,r,a,u,{inHeaderFooter:true});let d=je(c,a,u);return d&&(l.watermark=d),l}function Jn(e,t="default",n=null,o=null,r=null,a=null,u=null){let l={type:"footer",hdrFtrType:t,content:[]};if(!e)return l;let f=chunk3R7QHNI5_js.a(e);if(!f)return l;let c=f.elements?.find(d=>d.type==="element"&&(d.name==="w:ftr"||d.name?.endsWith(":ftr")));return c&&(l.content=q(c,n,o,r,a,u,{inHeaderFooter:true})),l}function Ge(e){switch(e){case "separator":return "separator";case "continuationSeparator":return "continuationSeparator";case "continuationNotice":return "continuationNotice";default:return "normal"}}function qe(e,t,n,o,r,a){let u=q(e,t,n,o,r,a),l=false;for(let f of chunk3R7QHNI5_js.i(e)){let c=f.name??"";if(c==="w:bookmarkStart"||c.endsWith(":bookmarkStart")||c==="w:bookmarkEnd"||c.endsWith(":bookmarkEnd")||c==="w:customXml"||c.endsWith(":customXml")){l=true;break}}return {blocks:u,hasUnmodeled:l}}function Xt(e,t,n,o,r,a){let u=chunk3R7QHNI5_js.l(e,"w","id")??0,l=chunk3R7QHNI5_js.j(e,"w","type"),f=Ge(l),{blocks:c,hasUnmodeled:d}=qe(e,t,n,o,r,a);return {type:"footnote",id:u,noteType:f,content:c,...d?{verbatimXml:chunk3R7QHNI5_js.b(e)}:{}}}function oo(e,t=null,n=null,o=null,r=null,a=null){let u=new Map,l=[];if(!e)return le(u,l);let f=chunk3R7QHNI5_js.a(e);if(!f)return le(u,l);let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:footnotes"||p.name?.endsWith(":footnotes")));if(!c)return le(u,l);let d=chunk3R7QHNI5_js.f(c,"w","footnote");for(let p of d){let w=Xt(p,t,n,o,r,a);u.set(w.id,w),l.push(w);}return le(u,l)}function le(e,t){return {byId:e,footnotes:t,getFootnote(n){return e.get(n)},hasFootnote(n){return e.has(n)},getNormalFootnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function Dt(e,t,n,o,r,a){let u=chunk3R7QHNI5_js.l(e,"w","id")??0,l=chunk3R7QHNI5_js.j(e,"w","type"),f=Ge(l),{blocks:c,hasUnmodeled:d}=qe(e,t,n,o,r,a);return {type:"endnote",id:u,noteType:f,content:c,...d?{verbatimXml:chunk3R7QHNI5_js.b(e)}:{}}}function ro(e,t=null,n=null,o=null,r=null,a=null){let u=new Map,l=[];if(!e)return se(u,l);let f=chunk3R7QHNI5_js.a(e);if(!f)return se(u,l);let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:endnotes"||p.name?.endsWith(":endnotes")));if(!c)return se(u,l);let d=chunk3R7QHNI5_js.f(c,"w","endnote");for(let p of d){let w=Dt(p,t,n,o,r,a);u.set(w.id,w),l.push(w);}return se(u,l)}function se(e,t){return {byId:e,endnotes:t,getEndnote(n){return e.get(n)},hasEndnote(n){return e.has(n)},getNormalEndnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function $e(e){return e?{decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",bullet:"bullet",chicago:"chicago",none:"none"}[e]:void 0}function Ot(e){switch(e){case "pageBottom":return "pageBottom";case "beneathText":return "beneathText";case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Wt(e){switch(e){case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Ye(e){switch(e){case "continuous":return "continuous";case "eachSect":return "eachSect";case "eachPage":return "eachPage";default:return}}function Ze(e){let t={};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"w","pos");if(n){let u=chunk3R7QHNI5_js.j(n,"w","val");t.position=Ot(u);}let o=chunk3R7QHNI5_js.e(e,"w","numFmt");if(o){let u=chunk3R7QHNI5_js.j(o,"w","val");t.numFmt=$e(u);}let r=chunk3R7QHNI5_js.e(e,"w","numStart");r&&(t.numStart=chunk3R7QHNI5_js.l(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","numRestart");if(a){let u=chunk3R7QHNI5_js.j(a,"w","val");t.numRestart=Ye(u);}return t}function Ke(e){let t={};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"w","pos");if(n){let u=chunk3R7QHNI5_js.j(n,"w","val");t.position=Wt(u);}let o=chunk3R7QHNI5_js.e(e,"w","numFmt");if(o){let u=chunk3R7QHNI5_js.j(o,"w","val");t.numFmt=$e(u);}let r=chunk3R7QHNI5_js.e(e,"w","numStart");r&&(t.numStart=chunk3R7QHNI5_js.l(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","numRestart");if(a){let u=chunk3R7QHNI5_js.j(a,"w","val");t.numRestart=Ye(u);}return t}function io(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
|
|
2
|
-
`)}function ao(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
|
|
3
|
-
`)}function lo(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function so(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Vt(e,t,n,o){if(!e&&!t)return;let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),Object.keys(r).length>0?r:void 0}function ue(e){if(!e)return;let o={style:chunk3R7QHNI5_js.j(e,"w","val")??"none"},r=chunk3R7QHNI5_js.l(e,"w","sz");r!==void 0&&(o.size=r);let a=chunk3R7QHNI5_js.l(e,"w","space");a!==void 0&&(o.space=a);let u=chunk3R7QHNI5_js.j(e,"w","color"),l=chunk3R7QHNI5_js.j(e,"w","themeColor"),f=chunk3R7QHNI5_js.j(e,"w","themeTint"),c=chunk3R7QHNI5_js.j(e,"w","themeShade"),d=Vt(u,l,f,c);d&&(o.color=d);let p=chunk3R7QHNI5_js.j(e,"w","shadow");(p==="1"||p==="true")&&(o.shadow=true);let w=chunk3R7QHNI5_js.j(e,"w","frame");return (w==="1"||w==="true")&&(o.frame=true),o}function jt(e){switch(e){case "landscape":return "landscape";case "portrait":return "portrait";default:return}}function Ut(e){switch(e){case "continuous":return "continuous";case "nextPage":return "nextPage";case "oddPage":return "oddPage";case "evenPage":return "evenPage";case "nextColumn":return "nextColumn";default:return}}function zt(e){switch(e){case "top":return "top";case "center":return "center";case "both":return "both";case "bottom":return "bottom";default:return}}function _t(e){switch(e){case "continuous":return "continuous";case "newPage":return "newPage";case "newSection":return "newSection";default:return}}function Je(e,t){let n={};if(!e)return n;let o=chunk3R7QHNI5_js.e(e,"w","pgSz");if(o){let m=chunk3R7QHNI5_js.l(o,"w","w");m!==void 0&&(n.pageWidth=m);let F=chunk3R7QHNI5_js.l(o,"w","h");F!==void 0&&(n.pageHeight=F);let E=chunk3R7QHNI5_js.j(o,"w","orient"),b=jt(E);b&&(n.orientation=b);}let r=chunk3R7QHNI5_js.e(e,"w","pgMar");if(r){let m=chunk3R7QHNI5_js.l(r,"w","top");m!==void 0&&(n.marginTop=m);let F=chunk3R7QHNI5_js.l(r,"w","bottom");F!==void 0&&(n.marginBottom=F);let E=chunk3R7QHNI5_js.l(r,"w","left");E!==void 0&&(n.marginLeft=E);let b=chunk3R7QHNI5_js.l(r,"w","right");b!==void 0&&(n.marginRight=b);let k=chunk3R7QHNI5_js.l(r,"w","header");k!==void 0&&(n.headerDistance=k);let B=chunk3R7QHNI5_js.l(r,"w","footer");B!==void 0&&(n.footerDistance=B);let N=chunk3R7QHNI5_js.l(r,"w","gutter");N!==void 0&&(n.gutter=N);}let a=chunk3R7QHNI5_js.e(e,"w","cols");if(a){let m=chunk3R7QHNI5_js.l(a,"w","num");m!==void 0&&(n.columnCount=m);let F=chunk3R7QHNI5_js.l(a,"w","space");F!==void 0&&(n.columnSpace=F);let E=chunk3R7QHNI5_js.j(a,"w","equalWidth");E==="1"||E==="true"?n.equalWidth=true:(E==="0"||E==="false")&&(n.equalWidth=false);let b=chunk3R7QHNI5_js.j(a,"w","sep");(b==="1"||b==="true")&&(n.separator=true);let k=chunk3R7QHNI5_js.f(a,"w","col");if(k.length>0){n.columns=[];for(let B of k){let N={},H=chunk3R7QHNI5_js.l(B,"w","w");H!==void 0&&(N.width=H);let I=chunk3R7QHNI5_js.l(B,"w","space");I!==void 0&&(N.space=I),n.columns.push(N);}n.columnCount===void 0&&(n.columnCount=k.length);}}let u=chunk3R7QHNI5_js.e(e,"w","type");if(u){let m=chunk3R7QHNI5_js.j(u,"w","val"),F=Ut(m);F&&(n.sectionStart=F);}let l=chunk3R7QHNI5_js.e(e,"w","vAlign");if(l){let m=chunk3R7QHNI5_js.j(l,"w","val"),F=zt(m);F&&(n.verticalAlign=F);}let f=chunk3R7QHNI5_js.e(e,"w","bidi");f&&(n.bidi=chunk3R7QHNI5_js.m(f));let c=chunk3R7QHNI5_js.f(e,"w","headerReference");c.length>0&&(n.headerReferences=c.map(m=>ze(m)));let d=chunk3R7QHNI5_js.f(e,"w","footerReference");d.length>0&&(n.footerReferences=d.map(m=>_e(m)));let p=chunk3R7QHNI5_js.e(e,"w","titlePg");p&&(n.titlePg=chunk3R7QHNI5_js.m(p));let w=chunk3R7QHNI5_js.e(e,"w","evenAndOddHeaders");w&&(n.evenAndOddHeaders=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","lnNumType");if(T){n.lineNumbers={};let m=chunk3R7QHNI5_js.l(T,"w","start");m!==void 0&&(n.lineNumbers.start=m);let F=chunk3R7QHNI5_js.l(T,"w","countBy");F!==void 0&&(n.lineNumbers.countBy=F);let E=chunk3R7QHNI5_js.l(T,"w","distance");E!==void 0&&(n.lineNumbers.distance=E);let b=chunk3R7QHNI5_js.j(T,"w","restart"),k=_t(b);k&&(n.lineNumbers.restart=k);}let y=chunk3R7QHNI5_js.e(e,"w","pgBorders");if(y){n.pageBorders={};let m=ue(chunk3R7QHNI5_js.e(y,"w","top"));m&&(n.pageBorders.top=m);let F=ue(chunk3R7QHNI5_js.e(y,"w","bottom"));F&&(n.pageBorders.bottom=F);let E=ue(chunk3R7QHNI5_js.e(y,"w","left"));E&&(n.pageBorders.left=E);let b=ue(chunk3R7QHNI5_js.e(y,"w","right"));b&&(n.pageBorders.right=b);let k=chunk3R7QHNI5_js.j(y,"w","display");(k==="allPages"||k==="firstPage"||k==="notFirstPage")&&(n.pageBorders.display=k);let B=chunk3R7QHNI5_js.j(y,"w","offsetFrom");(B==="page"||B==="text")&&(n.pageBorders.offsetFrom=B);let N=chunk3R7QHNI5_js.j(y,"w","zOrder");(N==="front"||N==="back")&&(n.pageBorders.zOrder=N);}let x=chunk3R7QHNI5_js.e(e,"w","background");if(x){n.background={};let m=chunk3R7QHNI5_js.j(x,"w","color");m&&m!=="auto"&&(n.background.color={rgb:m});let F=chunk3R7QHNI5_js.j(x,"w","themeColor");F&&(n.background.themeColor=F);let E=chunk3R7QHNI5_js.j(x,"w","themeTint");E&&(n.background.themeTint=E);let b=chunk3R7QHNI5_js.j(x,"w","themeShade");b&&(n.background.themeShade=b);}let h=chunk3R7QHNI5_js.e(e,"w","footnotePr");if(h){let m=Ze(h);Object.keys(m).length>0&&(n.footnotePr=m);}let P=chunk3R7QHNI5_js.e(e,"w","endnotePr");if(P){let m=Ke(P);Object.keys(m).length>0&&(n.endnotePr=m);}let C=chunk3R7QHNI5_js.e(e,"w","docGrid");if(C){n.docGrid={};let m=chunk3R7QHNI5_js.j(C,"w","type");(m==="default"||m==="lines"||m==="linesAndChars"||m==="snapToChars")&&(n.docGrid.type=m);let F=chunk3R7QHNI5_js.l(C,"w","linePitch");F!==void 0&&(n.docGrid.linePitch=F);let E=chunk3R7QHNI5_js.l(C,"w","charSpace");E!==void 0&&(n.docGrid.charSpace=E);}let M=chunk3R7QHNI5_js.e(e,"w","paperSrc");if(M){let m=chunk3R7QHNI5_js.l(M,"w","first");m!==void 0&&(n.paperSrcFirst=m);let F=chunk3R7QHNI5_js.l(M,"w","other");F!==void 0&&(n.paperSrcOther=F);}return n}function mo(){return {pageWidth:12240,pageHeight:15840,orientation:"portrait",marginTop:1440,marginBottom:1440,marginLeft:1440,marginRight:1440,headerDistance:720,footerDistance:720,gutter:0,columnCount:1,columnSpace:720,equalWidth:true,sectionStart:"nextPage",verticalAlign:"top"}}function Qe(e,t){if(!t||t.length===0)return e;let n=new Set((e??[]).map(r=>r.type)),o=t.filter(r=>!n.has(r.type));return o.length===0?e:[...e??[],...o]}function go(e){if(e.length<2)return e;let t=[e[0]];for(let n=1;n<e.length;n++){let o=t[n-1].properties,r=e[n].properties,a=Qe(r.headerReferences,o.headerReferences),u=Qe(r.footerReferences,o.footerReferences),l=r.titlePg!==void 0?r.titlePg:o.titlePg;if(a===r.headerReferences&&u===r.footerReferences&&l===r.titlePg){t.push(e[n]);continue}t.push({...e[n],properties:{...r,headerReferences:a,footerReferences:u,titlePg:l}});}return t}function et(e){if(!e)return;let t=/^(-?[\d.]+)\s*(pt|in|px|cm|mm|pc)?$/.exec(e.trim());if(!t)return;let n=parseFloat(t[1]);if(!isNaN(n))switch(t[2]){case "pt":return n/72*96;case "in":return n*96;case "cm":return n/2.54*96;case "mm":return n/25.4*96;case "pc":return n/6*96;case "px":case void 0:return n;default:return}}function Gt(e){return chunk3R7QHNI5_js.j(e,"r","id")??chunk3R7QHNI5_js.j(e,"r","embed")??chunk3R7QHNI5_js.j(e,null,"id")??""}function qt(e){if(!e)return null;let t;if(e.startsWith("data:")){let n=e.indexOf(",");if(n<0)return null;t=e.slice(n+1);}else if(/^[A-Za-z0-9+/]/.test(e)&&!e.includes(":"))t=e;else return null;try{let n=typeof atob=="function"?atob(t):globalThis.Buffer?.from(t,"base64").toString("binary");if(typeof n!="string")return null;let o=new Uint8Array(n.length);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return o}catch{return null}}function $t(e){if(!e||e.length<24)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71)return {width:t.getUint32(16),height:t.getUint32(20)};if(e[0]===71&&e[1]===73&&e[2]===70)return {width:e[6]|e[7]<<8,height:e[8]|e[9]<<8};if(e[0]===66&&e[1]===77&&e.length>=26)return {width:t.getInt32(18,true),height:Math.abs(t.getInt32(22,true))};if(e[0]===255&&e[1]===216){let n=2;for(;n+9<e.length;){if(e[n]!==255){n++;continue}let o=e[n+1];if(o>=192&&o<=207&&o!==196&&o!==200&&o!==204)return {height:e[n+5]<<8|e[n+6],width:e[n+7]<<8|e[n+8]};let r=e[n+2]<<8|e[n+3];if(r<2)break;n+=2+r;}}return null}function tt(e,t,n){let o=[...chunk3R7QHNI5_js.o(e,"v","shape"),...chunk3R7QHNI5_js.o(e,"v","rect"),...chunk3R7QHNI5_js.o(e,"v","roundrect"),...chunk3R7QHNI5_js.o(e,"v","oval")];for(let r of o){let a=chunk3R7QHNI5_js.i(r).find(h=>h.name==="v:imagedata"||h.name?.endsWith(":imagedata"));if(!a)continue;let u=Gt(a);if(!u)continue;let l=(chunk3R7QHNI5_js.j(r,null,"id")??"").toLowerCase();if(xe(r,l))continue;let{src:f,mimeType:c,filename:d}=chunkLW5OFHSW_js.y(u,t??void 0,n??void 0),p=ae(chunk3R7QHNI5_js.j(r,null,"style")),w=et(p.width),T=et(p.height);if(w==null||T==null){let h=$t(qt(f));h&&h.width>0&&h.height>0&&(w==null&&T==null?(w=h.width,T=h.height):w==null?w=T*(h.width/h.height):T=w*(h.height/h.width));}let y={type:"image",rId:u,size:{width:w!=null?chunkBJSG6TEG_js.g(w):0,height:T!=null?chunkBJSG6TEG_js.g(T):0},wrap:{type:"inline"}};f&&(y.src=f),c&&(y.mimeType=c),d&&(y.filename=d);let x=chunk3R7QHNI5_js.j(a,"o","title")??void 0;return x&&(y.title=x),{type:"drawing",image:y}}return null}function nt(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function Yt(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=chunk3R7QHNI5_js.j(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=chunk3R7QHNI5_js.j(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=chunk3R7QHNI5_js.j(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=chunk3R7QHNI5_js.j(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function ce(e,t,n){if(!e)return;let o={},r=chunk3R7QHNI5_js.e(e,"w","b");r&&(o.bold=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(e,"w","bCs");a&&(o.boldCs=chunk3R7QHNI5_js.m(a));let u=chunk3R7QHNI5_js.e(e,"w","i");u&&(o.italic=chunk3R7QHNI5_js.m(u));let l=chunk3R7QHNI5_js.e(e,"w","iCs");l&&(o.italicCs=chunk3R7QHNI5_js.m(l));let f=chunk3R7QHNI5_js.e(e,"w","u");if(f){let S=chunk3R7QHNI5_js.j(f,"w","val");if(S){o.underline={style:S};let z=chunk3R7QHNI5_js.j(f,"w","color"),_=chunk3R7QHNI5_js.j(f,"w","themeColor");(z||_)&&(o.underline.color=nt(z,_,chunk3R7QHNI5_js.j(f,"w","themeTint"),chunk3R7QHNI5_js.j(f,"w","themeShade")));}}let c=chunk3R7QHNI5_js.e(e,"w","strike");c&&(o.strike=chunk3R7QHNI5_js.m(c));let d=chunk3R7QHNI5_js.e(e,"w","dstrike");d&&(o.doubleStrike=chunk3R7QHNI5_js.m(d));let p=chunk3R7QHNI5_js.e(e,"w","vertAlign");if(p){let S=chunk3R7QHNI5_js.j(p,"w","val");(S==="superscript"||S==="subscript"||S==="baseline")&&(o.vertAlign=S);}let w=chunk3R7QHNI5_js.e(e,"w","smallCaps");w&&(o.smallCaps=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","caps");T&&(o.allCaps=chunk3R7QHNI5_js.m(T));let y=chunk3R7QHNI5_js.e(e,"w","vanish");y&&(o.hidden=chunk3R7QHNI5_js.m(y));let x=chunk3R7QHNI5_js.e(e,"w","color");x&&(o.color=nt(chunk3R7QHNI5_js.j(x,"w","val"),chunk3R7QHNI5_js.j(x,"w","themeColor"),chunk3R7QHNI5_js.j(x,"w","themeTint"),chunk3R7QHNI5_js.j(x,"w","themeShade")));let h=chunk3R7QHNI5_js.e(e,"w","highlight");if(h){let S=chunk3R7QHNI5_js.j(h,"w","val");S&&(o.highlight=S);}let P=chunk3R7QHNI5_js.e(e,"w","shd");P&&(o.shading=Yt(P));let C=chunk3R7QHNI5_js.e(e,"w","sz");if(C){let S=chunk3R7QHNI5_js.l(C,"w","val");S!==void 0&&(o.fontSize=S);}let M=chunk3R7QHNI5_js.e(e,"w","szCs");if(M){let S=chunk3R7QHNI5_js.l(M,"w","val");S!==void 0&&(o.fontSizeCs=S);}let m=chunk3R7QHNI5_js.e(e,"w","rFonts");if(m){o.fontFamily={ascii:chunk3R7QHNI5_js.j(m,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(m,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(m,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(m,"w","cs")??void 0};let S=chunk3R7QHNI5_js.j(m,"w","asciiTheme");S&&(o.fontFamily.asciiTheme=S,t&&!o.fontFamily.ascii&&(o.fontFamily.ascii=Y(t,S)));let z=chunk3R7QHNI5_js.j(m,"w","hAnsiTheme");z&&(o.fontFamily.hAnsiTheme=z,t&&!o.fontFamily.hAnsi&&(o.fontFamily.hAnsi=Y(t,z)));let _=chunk3R7QHNI5_js.j(m,"w","eastAsiaTheme");_&&(o.fontFamily.eastAsiaTheme=_,t&&!o.fontFamily.eastAsia&&(o.fontFamily.eastAsia=Y(t,_)));let pe=chunk3R7QHNI5_js.j(m,"w","cstheme");pe&&(o.fontFamily.csTheme=pe,t&&!o.fontFamily.cs&&(o.fontFamily.cs=Y(t,pe)));}let F=chunk3R7QHNI5_js.e(e,"w","spacing");if(F){let S=chunk3R7QHNI5_js.l(F,"w","val");S!==void 0&&(o.spacing=S);}let E=chunk3R7QHNI5_js.e(e,"w","position");if(E){let S=chunk3R7QHNI5_js.l(E,"w","val");S!==void 0&&(o.position=S);}let b=chunk3R7QHNI5_js.e(e,"w","w");if(b){let S=chunk3R7QHNI5_js.l(b,"w","val");S!==void 0&&(o.scale=S);}let k=chunk3R7QHNI5_js.e(e,"w","kern");if(k){let S=chunk3R7QHNI5_js.l(k,"w","val");S!==void 0&&(o.kerning=S);}let B=chunk3R7QHNI5_js.e(e,"w","effect");if(B){let S=chunk3R7QHNI5_js.j(B,"w","val");S&&(o.effect=S);}let N=chunk3R7QHNI5_js.e(e,"w","em");if(N){let S=chunk3R7QHNI5_js.j(N,"w","val");S&&(o.emphasisMark=S);}let H=chunk3R7QHNI5_js.e(e,"w","emboss");H&&(o.emboss=chunk3R7QHNI5_js.m(H));let I=chunk3R7QHNI5_js.e(e,"w","imprint");I&&(o.imprint=chunk3R7QHNI5_js.m(I));let X=chunk3R7QHNI5_js.e(e,"w","outline");X&&(o.outline=chunk3R7QHNI5_js.m(X));let Fe=chunk3R7QHNI5_js.e(e,"w","shadow");Fe&&(o.shadow=chunk3R7QHNI5_js.m(Fe));let Ce=chunk3R7QHNI5_js.e(e,"w","rtl");Ce&&(o.rtl=chunk3R7QHNI5_js.m(Ce));let ke=chunk3R7QHNI5_js.e(e,"w","cs");ke&&(o.cs=chunk3R7QHNI5_js.m(ke));let Se=chunk3R7QHNI5_js.e(e,"w","rStyle");if(Se){let S=chunk3R7QHNI5_js.j(Se,"w","val");S&&(o.styleId=S);}return Object.keys(o).length>0?o:void 0}function Zt(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=(chunk3R7QHNI5_js.j(e,"w","author")??"").trim(),r=(chunk3R7QHNI5_js.j(e,"w","date")??"").trim(),a=(chunk3R7QHNI5_js.j(e,"w","rsid")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0,rsid:a.length>0?a:void 0}}function Kt(e,t,n,o){if(!e)return;let r=chunk3R7QHNI5_js.f(e,"w","rPrChange").map(a=>{let u=chunk3R7QHNI5_js.e(a,"w","rPr");return {type:"runPropertyChange",info:Zt(a),previousFormatting:ce(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function Qt(e){let t=chunk3R7QHNI5_js.k(e),n=chunk3R7QHNI5_js.j(e,"xml","space")==="preserve";return {type:"text",text:t,preserveSpace:n||void 0}}function Jt(){return {type:"tab"}}function en(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"w","clear"),o={type:"break"};return (t==="page"||t==="column"||t==="textWrapping")&&(o.breakType=t),(n==="none"||n==="left"||n==="right"||n==="all")&&(o.clear=n),o}function tn(e){let t=chunk3R7QHNI5_js.j(e,"w","font")??"",n=chunk3R7QHNI5_js.j(e,"w","char")??"";return {type:"symbol",font:t,char:n}}function nn(e){return {type:"footnoteRef",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function on(e){return {type:"endnoteRef",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function rn(e){let t=chunk3R7QHNI5_js.j(e,"w","fldCharType"),n=chunk3R7QHNI5_js.j(e,"w","fldLock")==="true"||chunk3R7QHNI5_js.j(e,"w","fldLock")==="1",o=chunk3R7QHNI5_js.j(e,"w","dirty")==="true"||chunk3R7QHNI5_js.j(e,"w","dirty")==="1",r="begin";return t==="separate"?r="separate":t==="end"&&(r="end"),{type:"fieldChar",charType:r,fldLock:n||void 0,dirty:o||void 0}}function an(e){return {type:"instrText",text:chunk3R7QHNI5_js.k(e)}}function ot(e,t,n){let o=chunkLW5OFHSW_js.A(e,t??void 0,n??void 0);return o?{type:"drawing",image:o}:null}function fe(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function ln(e,t,n){let o=[],r=chunk3R7QHNI5_js.i(e);for(let a of r)switch(fe(a.name)){case "t":o.push(Qt(a));break;case "tab":o.push(Jt());break;case "br":o.push(en(a));break;case "sym":o.push(tn(a));break;case "footnoteReference":o.push(nn(a));break;case "endnoteReference":o.push(on(a));break;case "fldChar":o.push(rn(a));break;case "instrText":o.push(an(a));break;case "softHyphen":o.push({type:"softHyphen"});break;case "noBreakHyphen":o.push({type:"noBreakHyphen"});break;case "drawing":let l=ot(a,t,n);l&&o.push(l);break;case "pict":case "object":{let f=tt(a,t,n);f&&o.push(f);break}case "rPr":break;case "lastRenderedPageBreak":break;case "cr":o.push({type:"break",breakType:"textWrapping"});break;case "AlternateContent":{let c=chunk3R7QHNI5_js.i(a).find(d=>fe(d.name)==="Choice")??chunk3R7QHNI5_js.i(a).find(d=>fe(d.name)==="Fallback");if(c){for(let d of chunk3R7QHNI5_js.i(c))if(fe(d.name)==="drawing"){let w=ot(d,t,n);w?.image?.src&&o.push(w);}}break}case "footnoteRef":o.push({type:"footnoteRefMark"});break;case "endnoteRef":o.push({type:"endnoteRefMark"});break;case "separator":o.push({type:"separator"});break;case "continuationSeparator":o.push({type:"continuationSeparator"});break;}return o}function K(e,t,n,o=null,r=null){let a={type:"run",content:[]},u=chunk3R7QHNI5_js.e(e,"w","rPr");return u&&(a.formatting=ce(u,n),a.propertyChanges=Kt(u,n,t,a.formatting)),a.content=ln(e,o,r),a}function sn(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function un(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=chunk3R7QHNI5_js.j(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=chunk3R7QHNI5_js.j(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=chunk3R7QHNI5_js.j(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=chunk3R7QHNI5_js.j(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function $(e){if(!e)return;let t=chunk3R7QHNI5_js.j(e,"w","val");if(!t)return;let n={style:t},o=chunk3R7QHNI5_js.j(e,"w","color"),r=chunk3R7QHNI5_js.j(e,"w","themeColor");(o||r)&&(n.color=sn(o,r,chunk3R7QHNI5_js.j(e,"w","themeTint"),chunk3R7QHNI5_js.j(e,"w","themeShade")));let a=chunk3R7QHNI5_js.l(e,"w","sz");a!==void 0&&(n.size=a);let u=chunk3R7QHNI5_js.l(e,"w","space");u!==void 0&&(n.space=u);let l=chunk3R7QHNI5_js.j(e,"w","shadow");l&&(n.shadow=l==="1"||l==="true");let f=chunk3R7QHNI5_js.j(e,"w","frame");return f&&(n.frame=f==="1"||f==="true"),n}function fn(e){if(!e)return;let t=chunk3R7QHNI5_js.f(e,"w","tab");if(t.length===0)return;let n=[];for(let o of t){let r=chunk3R7QHNI5_js.l(o,"w","pos"),a=chunk3R7QHNI5_js.j(o,"w","val");if(r!==void 0&&a){let u={position:r,alignment:a},l=chunk3R7QHNI5_js.j(o,"w","leader");l&&(u.leader=l),n.push(u);}}return n.length>0?n:void 0}function cn(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.l(e,"w","w");n!==void 0&&(t.width=n);let o=chunk3R7QHNI5_js.l(e,"w","h");o!==void 0&&(t.height=o);let r=chunk3R7QHNI5_js.j(e,"w","hAnchor");(r==="text"||r==="margin"||r==="page")&&(t.hAnchor=r);let a=chunk3R7QHNI5_js.j(e,"w","vAnchor");(a==="text"||a==="margin"||a==="page")&&(t.vAnchor=a);let u=chunk3R7QHNI5_js.l(e,"w","x");u!==void 0&&(t.x=u);let l=chunk3R7QHNI5_js.l(e,"w","y");l!==void 0&&(t.y=l);let f=chunk3R7QHNI5_js.j(e,"w","xAlign");f&&(t.xAlign=f);let c=chunk3R7QHNI5_js.j(e,"w","yAlign");c&&(t.yAlign=c);let d=chunk3R7QHNI5_js.j(e,"w","wrap");return d&&(t.wrap=d),Object.keys(t).length>0?t:void 0}function de(e,t,n){if(!e)return;let o={},r=chunk3R7QHNI5_js.e(e,"w","jc");if(r){let b=chunk3R7QHNI5_js.j(r,"w","val");b&&(o.alignment=b);}let a=chunk3R7QHNI5_js.e(e,"w","bidi");a&&(o.bidi=chunk3R7QHNI5_js.m(a));let u=chunk3R7QHNI5_js.e(e,"w","spacing");if(u){let b=chunk3R7QHNI5_js.l(u,"w","before");b!==void 0&&(o.spaceBefore=b);let k=chunk3R7QHNI5_js.l(u,"w","after");k!==void 0&&(o.spaceAfter=k);let B=chunk3R7QHNI5_js.l(u,"w","line");B!==void 0&&(o.lineSpacing=B);let N={};b!==void 0&&(N.before=true),k!==void 0&&(N.after=true),(N.before||N.after)&&(o.spacingExplicit=N);let H=chunk3R7QHNI5_js.j(u,"w","lineRule");H&&(o.lineSpacingRule=H);let I=chunk3R7QHNI5_js.j(u,"w","beforeAutospacing");I&&(o.beforeAutospacing=I==="1"||I==="true");let X=chunk3R7QHNI5_js.j(u,"w","afterAutospacing");X&&(o.afterAutospacing=X==="1"||X==="true");}let l=chunk3R7QHNI5_js.e(e,"w","ind");if(l){let b=chunk3R7QHNI5_js.l(l,"w","left");b!==void 0&&(o.indentLeft=b);let k=chunk3R7QHNI5_js.l(l,"w","right");k!==void 0&&(o.indentRight=k);let B=chunk3R7QHNI5_js.l(l,"w","firstLine");B!==void 0&&(o.indentFirstLine=B);let N=chunk3R7QHNI5_js.l(l,"w","hanging");N!==void 0&&(o.indentFirstLine=-N,o.hangingIndent=true);let H=chunk3R7QHNI5_js.l(l,"w","start");H!==void 0&&o.indentLeft===void 0&&(o.indentLeft=H);let I=chunk3R7QHNI5_js.l(l,"w","end");I!==void 0&&o.indentRight===void 0&&(o.indentRight=I);}let f=chunk3R7QHNI5_js.e(e,"w","pBdr");if(f){let b={},k=$(chunk3R7QHNI5_js.e(f,"w","top"));k&&(b.top=k);let B=$(chunk3R7QHNI5_js.e(f,"w","bottom"));B&&(b.bottom=B);let N=$(chunk3R7QHNI5_js.e(f,"w","left"));N&&(b.left=N);let H=$(chunk3R7QHNI5_js.e(f,"w","right"));H&&(b.right=H);let I=$(chunk3R7QHNI5_js.e(f,"w","between"));I&&(b.between=I);let X=$(chunk3R7QHNI5_js.e(f,"w","bar"));X&&(b.bar=X),Object.keys(b).length>0&&(o.borders=b);}let c=chunk3R7QHNI5_js.e(e,"w","shd");c&&(o.shading=un(c));let d=chunk3R7QHNI5_js.e(e,"w","tabs");d&&(o.tabs=fn(d));let p=chunk3R7QHNI5_js.e(e,"w","keepNext");p&&(o.keepNext=chunk3R7QHNI5_js.m(p));let w=chunk3R7QHNI5_js.e(e,"w","keepLines");w&&(o.keepLines=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","widowControl");T&&(o.widowControl=chunk3R7QHNI5_js.m(T));let y=chunk3R7QHNI5_js.e(e,"w","pageBreakBefore");y&&(o.pageBreakBefore=chunk3R7QHNI5_js.m(y));let x=chunk3R7QHNI5_js.e(e,"w","contextualSpacing");x&&(o.contextualSpacing=chunk3R7QHNI5_js.m(x));let h=chunk3R7QHNI5_js.e(e,"w","numPr");if(h){let b=chunk3R7QHNI5_js.e(h,"w","numId"),k=chunk3R7QHNI5_js.e(h,"w","ilvl");if(b||k){if(o.numPr={},b){let B=chunk3R7QHNI5_js.l(b,"w","val");B!==void 0&&(o.numPr.numId=B);}if(k){let B=chunk3R7QHNI5_js.l(k,"w","val");B!==void 0&&(o.numPr.ilvl=B);}}}let P=chunk3R7QHNI5_js.e(e,"w","outlineLvl");if(P){let b=chunk3R7QHNI5_js.l(P,"w","val");b!==void 0&&(o.outlineLevel=b);}let C=chunk3R7QHNI5_js.e(e,"w","pStyle");if(C){let b=chunk3R7QHNI5_js.j(C,"w","val");b&&(o.styleId=b);}let M=chunk3R7QHNI5_js.e(e,"w","framePr");M&&(o.frame=cn(M));let m=chunk3R7QHNI5_js.e(e,"w","suppressLineNumbers");m&&(o.suppressLineNumbers=chunk3R7QHNI5_js.m(m));let F=chunk3R7QHNI5_js.e(e,"w","suppressAutoHyphens");F&&(o.suppressAutoHyphens=chunk3R7QHNI5_js.m(F));let E=chunk3R7QHNI5_js.e(e,"w","rPr");return E&&(o.runProperties=ce(E,t)),Object.keys(o).length>0?o:void 0}function dn(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function pn(e){let t=chunk3R7QHNI5_js.l(e,"w","id")??0,n=chunk3R7QHNI5_js.j(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=chunk3R7QHNI5_js.l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=chunk3R7QHNI5_js.l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function mn(e){return {type:"bookmarkEnd",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function rt(e,t,n=null,o=null,r=null){let a={type:"hyperlink",children:[]},u=chunk3R7QHNI5_js.j(e,"r","id");if(u&&(a.rId=u,t)){let T=t.get(u);T&&(chunkZ3LGMBJC_js.c(T),a.href=T.target);}let l=chunk3R7QHNI5_js.j(e,"w","anchor");l&&(a.anchor=l,a.href||(a.href=`#${l}`));let f=chunk3R7QHNI5_js.j(e,"w","tooltip");f&&(a.tooltip=f);let c=chunk3R7QHNI5_js.j(e,"w","tgtFrame");c&&(a.target=c);let d=chunk3R7QHNI5_js.j(e,"w","history");(d==="1"||d==="true")&&(a.history=true);let p=chunk3R7QHNI5_js.j(e,"w","docLocation");p&&(a.docLocation=p);let w=chunk3R7QHNI5_js.i(e);for(let T of w)switch(dn(T.name)){case "r":a.children.push(K(T,n,o,t,r));break;case "bookmarkStart":a.children.push(pn(T));break;case "bookmarkEnd":a.children.push(mn(T));break}return a}function Ao(e){let t="";for(let n of e.children)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"&&(t+=" ");return t}function Io(e){return e.href?/^https?:\/\/|^mailto:|^tel:|^ftp:/i.test(e.href):!!e.rId&&!e.anchor}function Ho(e){return !!e.anchor}function Lo(e){return e.href}function Xo(e){return e.children.some(t=>t.type==="run")}function Do(e){return e.children.filter(t=>t.type==="run")}function Oo(e,t){if(e.rId){let n=t.get(e.rId);if(n)return chunkZ3LGMBJC_js.c(n),e.href=n.target,e.href}return e.anchor&&!e.href&&(e.href=`#${e.anchor}`),e.href}function it(e){let t=chunk3R7QHNI5_js.l(e,"w","id")??0,n=chunk3R7QHNI5_js.j(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=chunk3R7QHNI5_js.l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=chunk3R7QHNI5_js.l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function at(e){return {type:"bookmarkEnd",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function st(e){let t="";if(e.type==="text"&&typeof e.text=="string")return e.text;if(e.elements)for(let n of e.elements)if((n.name?.replace(/^.*:/,"")??"")==="t"&&n.elements)for(let r of n.elements)r.type==="text"&&typeof r.text=="string"&&(t+=r.text);else t+=st(n);return t}function J(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function ut(e){let t=new Set(["hyperlink","smartTag","sdt","sdtContent","fldSimple","customXml","ins","del","moveFrom","moveTo"]),n=new Set(["pPr","proofErr","bookmarkStart","bookmarkEnd","commentRangeStart","commentRangeEnd","commentReference","permStart","permEnd","rsidR"]),o=new Set(["t","tab","br","cr","sym","drawing","pict","object","softHyphen","noBreakHyphen","fldChar","instrText","pgNum","separator","continuationSeparator","footnoteRef","endnoteRef","footnoteReference","endnoteReference","ptab","monthShort","monthLong","yearShort","yearLong","dayShort","dayLong"]),r=false;function a(l){for(let f of chunk3R7QHNI5_js.i(l)){let c=J(f.name);if(!n.has(c)){if(c==="lastRenderedPageBreak"){r=true;continue}if(c==="r"){for(let d of chunk3R7QHNI5_js.i(f)){let p=J(d.name);if(p!=="rPr"){if(p==="lastRenderedPageBreak"){r=true;continue}if(p==="br"&&chunk3R7QHNI5_js.j(d,"w","type")==="page")return "forced";if(o.has(p))return "visible"}}continue}if(t.has(c)){let d=a(f);if(d!=="continue")return d;continue}return "continue"}}return "continue"}let u=a(e);return u==="forced"?true:u==="visible"?r:false}function lt(e,t){if(!e)return `w:${t}`;let n=e.indexOf(":");return n<0?t:`${e.substring(0,n+1)}${t}`}function ft(e){if(e.type!=="element")return e;let t=J(e.name),n=e.name;return t==="delText"?n=lt(e.name,"t"):t==="delInstrText"&&(n=lt(e.name,"instrText")),{...e,name:n,elements:e.elements?.map(ft)}}function Q(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=chunk3R7QHNI5_js.j(e,"w","author"),r=chunk3R7QHNI5_js.j(e,"w","date"),a=o?.trim()??"",u=r?.trim()??"";return {id:Number.isInteger(n)&&n>=0?n:0,author:a.length>0?a:"Unknown",date:u.length>0?u:void 0}}function gn(e){return Q(e)}function ct(e,t,n,o){if(!e)return;let r=chunk3R7QHNI5_js.f(e,"w","pPrChange").map(a=>{let u=chunk3R7QHNI5_js.e(a,"w","pPr");return {type:"paragraphPropertyChange",info:gn(a),previousFormatting:de(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function hn(e,t,n,o,r){return rt(e,t,n,o,r)}function wn(e){return it(e)}function yn(e){return at(e)}function dt(e){let t=e.trim().match(/^\\?([A-Z]+)/i);if(!t)return "UNKNOWN";let n=t[1].toUpperCase();return ["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE","EDITTIME","REVNUM","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS"].includes(n)?n:"UNKNOWN"}function bn(e,t,n,o,r){let a=chunk3R7QHNI5_js.j(e,"w","instr")??"",u=dt(a),l={type:"simpleField",instruction:a,fieldType:u,content:[]},f=chunk3R7QHNI5_js.j(e,"w","fldLock");(f==="1"||f==="true")&&(l.fldLock=true);let c=chunk3R7QHNI5_js.j(e,"w","dirty");(c==="1"||c==="true")&&(l.dirty=true);let d=chunk3R7QHNI5_js.i(e);for(let p of d)J(p.name)==="r"&&l.content.push(K(p,t,n,o,r));return l}function U(e,t,n,o,r,a,u="default"){let l=[],f=chunk3R7QHNI5_js.i(e),c=false,d="",p=[],w=[],T=false,y=false,x=false;for(let h of f){let P=J(h.name);switch(P){case "r":{let C=u==="deletion"?ft(h):h,M=K(C,t,n,r,a),m=false,F=false,E=false,b="";for(let k of M.content)k.type==="fieldChar"?k.charType==="begin"?(m=true,k.fldLock&&(y=true),k.dirty&&(x=true)):k.charType==="separate"?F=true:k.charType==="end"&&(E=true):k.type==="instrText"&&(b+=k.text);if(m&&(c=true,T=false,d="",p=[],w=[],y=false,x=false),c){if(b&&(d+=b),F&&(T=true),T&&!E?F||w.push(M):!T&&!m&&p.push(M),E){let k={type:"complexField",instruction:d.trim(),fieldType:dt(d),fieldCode:p,fieldResult:w};y&&(k.fldLock=true),x&&(k.dirty=true),l.push(k),c=false;}}else l.push(M);break}case "hyperlink":l.push(hn(h,r,t,n,a));break;case "bookmarkStart":l.push(wn(h));break;case "bookmarkEnd":l.push(yn(h));break;case "fldSimple":l.push(bn(h,t,n,r,a));break;case "pPr":break;case "proofErr":case "permStart":case "permEnd":case "customXml":break;case "sdt":{let C=(h.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtPr"||m.name?.endsWith(":sdtPr"))),M=(h.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtContent"||m.name?.endsWith(":sdtContent")));if(M){let m=U(M,t,n,null,r,a,u),E={type:"inlineSdt",properties:ie(C??null),content:m.filter(b=>b.type==="run"||b.type==="hyperlink"||b.type==="simpleField"||b.type==="complexField"||b.type==="inlineSdt"||b.type==="mathEquation")};l.push(E);}break}case "ins":{let C=Q(h),M=U(h,t,n,null,r,a),m={type:"insertion",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "del":{let C=Q(h),M=U(h,t,n,null,r,a,"deletion"),m={type:"deletion",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "moveFrom":{let C=Q(h),M=U(h,t,n,null,r,a,"deletion"),m={type:"moveFrom",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "moveTo":{let C=Q(h),M=U(h,t,n,null,r,a),m={type:"moveTo",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "smartTag":break;case "moveFromRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10),M=chunk3R7QHNI5_js.j(h,"w","name")??"";l.push({type:"moveFromRangeStart",id:C,name:M});break}case "moveFromRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"moveFromRangeEnd",id:C});break}case "moveToRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10),M=chunk3R7QHNI5_js.j(h,"w","name")??"";l.push({type:"moveToRangeStart",id:C,name:M});break}case "moveToRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"moveToRangeEnd",id:C});break}case "commentRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"commentRangeStart",id:C});break}case "commentRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"commentRangeEnd",id:C});break}case "oMath":case "oMathPara":{let C=P==="oMathPara",M=chunk3R7QHNI5_js.b(h),m=st(h),F={type:"mathEquation",display:C?"block":"inline",ommlXml:M,plainText:m||void 0};l.push(F);break}}}return l}function Tn(e){let t="";for(let n of e.content)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"?t+=" ":o.type==="break"&&(o.breakType==="page"?t+="\f":t+=`
|
|
4
|
-
`);else if(n.type==="hyperlink"){for(let o of n.children)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="simpleField"){for(let o of n.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="complexField")for(let o of n.fieldResult)for(let r of o.content)r.type==="text"&&(t+=r.text);return t}function pt(e){let t=chunk3R7QHNI5_js.j(e,"w","id");if(t==null)return null;let n=parseInt(t,10);if(Number.isNaN(n))return null;let o=chunk3R7QHNI5_js.j(e,"w","author")??"",r=chunk3R7QHNI5_js.j(e,"w","date")??void 0,a={id:n,author:o};return r&&(a.date=r),a}function Z(e,t,n,o,r=null,a=null,u){let l={type:"paragraph",content:[]},f=chunk3R7QHNI5_js.j(e,"w14","paraId")??chunk3R7QHNI5_js.j(e,"w","paraId");f&&(l.paraId=f);let c=chunk3R7QHNI5_js.j(e,"w14","textId")??chunk3R7QHNI5_js.j(e,"w","textId");c&&(l.textId=c),!u?.inHeaderFooter&&ut(e)&&(l.renderedPageBreakBefore=true);let d=chunk3R7QHNI5_js.e(e,"w","pPr");if(d){l.formatting=de(d,n),l.propertyChanges=ct(d,n,t,l.formatting);let y=chunk3R7QHNI5_js.e(d,"w","rPr");if(y){let h=chunk3R7QHNI5_js.e(y,"w","ins");if(h){let C=pt(h);C&&(l.pPrIns=C);}let P=chunk3R7QHNI5_js.e(y,"w","del");if(P){let C=pt(P);C&&(l.pPrDel=C);}}let x=chunk3R7QHNI5_js.e(d,"w","sectPr");x&&(l.sectionProperties=Je(x));}let p=U(e,t,n,o,r,a);l.content=p;let w=l.formatting?.numPr,T=false;if(!w&&l.formatting?.styleId&&t){let y=t.get(l.formatting.styleId);y?.pPr?.numPr&&(w=y.pPr.numPr,T=true,l.formatting||(l.formatting={}),l.formatting.numPr=w,l.formatting.numPrFromStyle=w);}if(w&&o){let y=chunkH57LNDBH_js.d(w,o);if(y){l.listRendering=y;let x=T?xn(l.formatting?.styleId,t):{left:false,firstLine:false},h=o.getLevel(y.numId,y.level);if(h?.pPr){l.formatting||(l.formatting={});let P=d?chunk3R7QHNI5_js.e(d,"w","ind"):null,C=P!=null&&(chunk3R7QHNI5_js.j(P,"w","left")!==null||chunk3R7QHNI5_js.j(P,"w","start")!==null),M=F=>{let E=P?chunk3R7QHNI5_js.j(P,"w",F):null;if(E===null)return false;let b=parseInt(E,10);return Number.isNaN(b)||b!==0},m=P!=null&&(M("firstLine")||M("hanging"));!C&&!x.left&&h.pPr.indentLeft!==void 0&&(l.formatting.indentLeft=h.pPr.indentLeft),!m&&!x.firstLine&&(h.pPr.indentFirstLine!==void 0&&(l.formatting.indentFirstLine=h.pPr.indentFirstLine),h.pPr.hangingIndent!==void 0&&(l.formatting.hangingIndent=h.pPr.hangingIndent));}}}return l}function xn(e,t){let n={left:false,firstLine:false};if(!e||!t)return n;let o=new Set,r=e;for(;r&&!o.has(r);){o.add(r);let a=t.get(r);if(!a)break;let u=a.pPr;if(u&&(n.left||(n.left=u.indentLeft!==void 0),n.firstLine||(n.firstLine=u.indentFirstLine!==void 0||u.hangingIndent!==void 0)),n.left&&n.firstLine)break;r=a.basedOn;}return n}function mt(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","tblW"));n&&(t.width=n);let o=chunk3R7QHNI5_js.e(e,"w","jc");if(o){let x=chunk3R7QHNI5_js.j(o,"w","val");(x==="left"||x==="center"||x==="right"||x==="start")&&(t.justification=x==="start"?"left":x);}let r=D(chunk3R7QHNI5_js.e(e,"w","tblCellSpacing"));r&&(t.cellSpacing=r);let a=D(chunk3R7QHNI5_js.e(e,"w","tblInd"));a&&(t.indent=a);let u=ne(chunk3R7QHNI5_js.e(e,"w","tblBorders"));u&&(t.borders=u);let l=oe(chunk3R7QHNI5_js.e(e,"w","tblCellMar"));l&&(t.cellMargins=l);let f=chunk3R7QHNI5_js.e(e,"w","tblLayout");if(f){let x=chunk3R7QHNI5_js.j(f,"w","type");(x==="fixed"||x==="autofit")&&(t.layout=x);}let c=chunk3R7QHNI5_js.e(e,"w","tblStyle");if(c){let x=chunk3R7QHNI5_js.j(c,"w","val");x&&(t.styleId=x);}let d=ye(chunk3R7QHNI5_js.e(e,"w","tblLook"));d&&(t.look=d);let p=re(chunk3R7QHNI5_js.e(e,"w","shd"));p&&(t.shading=p);let w=chunk3R7QHNI5_js.e(e,"w","tblOverlap");if(w){let x=chunk3R7QHNI5_js.j(w,"w","val");(x==="never"||x==="overlap")&&(t.overlap=x);}let T=be(chunk3R7QHNI5_js.e(e,"w","tblpPr"));if(T&&(t.floating=T),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","bidiVisual"))&&(t.bidi=true),Object.keys(t).length!==0)return t}function Fn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","tblPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","tblPr");return {type:"tablePropertyChange",info:te(o),previousFormatting:mt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function Cn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","trPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","trPr");return {type:"tableRowPropertyChange",info:te(o),previousFormatting:gt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function kn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","tcPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","tcPr");return {type:"tableCellPropertyChange",info:te(o),previousFormatting:wt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function Sn(e){if(!e)return;let t=chunk3R7QHNI5_js.e(e,"w","ins");if(t)return {type:"tableRowInsertion",info:j(t)};let n=chunk3R7QHNI5_js.e(e,"w","del");if(n)return {type:"tableRowDeletion",info:j(n)}}function Mn(e){if(!e)return;let t=chunk3R7QHNI5_js.e(e,"w","cellIns");if(t)return {type:"tableCellInsertion",info:j(t)};let n=chunk3R7QHNI5_js.e(e,"w","cellDel");if(n)return {type:"tableCellDeletion",info:j(n)};let o=chunk3R7QHNI5_js.e(e,"w","cellMerge");if(o){let r=chunk3R7QHNI5_js.j(o,"w","vMerge"),a=chunk3R7QHNI5_js.j(o,"w","vMergeOrig"),u=l=>l==="rest"||l==="cont";return {type:"tableCellMerge",info:j(o),...u(r)?{vMerge:r}:{},...u(a)?{vMergeOrig:a}:{}}}}function gt(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.e(e,"w","trHeight");if(n){let f=chunk3R7QHNI5_js.l(n,"w","val");f!==void 0&&f>0&&(t.height={value:f,type:"dxa"});let c=chunk3R7QHNI5_js.j(n,"w","hRule");(c==="auto"||c==="atLeast"||c==="exact")&&(t.heightRule=c);}chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","tblHeader"))&&(t.header=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","cantSplit"))&&(t.cantSplit=true);let a=chunk3R7QHNI5_js.e(e,"w","jc");if(a){let f=chunk3R7QHNI5_js.j(a,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","hidden"))&&(t.hidden=true);let l=ht(chunk3R7QHNI5_js.e(e,"w","cnfStyle"));if(l&&(t.conditionalFormat=l),Object.keys(t).length!==0)return t}function ht(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=chunk3R7QHNI5_js.j(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=chunk3R7QHNI5_js.j(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=chunk3R7QHNI5_js.j(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=chunk3R7QHNI5_js.j(e,"w","oddHBand");(u==="1"||u==="true")&&(t.oddHBand=true);let l=chunk3R7QHNI5_js.j(e,"w","evenHBand");(l==="1"||l==="true")&&(t.evenHBand=true);let f=chunk3R7QHNI5_js.j(e,"w","oddVBand");(f==="1"||f==="true")&&(t.oddVBand=true);let c=chunk3R7QHNI5_js.j(e,"w","evenVBand");(c==="1"||c==="true")&&(t.evenVBand=true);let d=chunk3R7QHNI5_js.j(e,"w","firstRowFirstColumn");(d==="1"||d==="true")&&(t.nwCell=true);let p=chunk3R7QHNI5_js.j(e,"w","firstRowLastColumn");(p==="1"||p==="true")&&(t.neCell=true);let w=chunk3R7QHNI5_js.j(e,"w","lastRowFirstColumn");(w==="1"||w==="true")&&(t.swCell=true);let T=chunk3R7QHNI5_js.j(e,"w","lastRowLastColumn");(T==="1"||T==="true")&&(t.seCell=true);let y=chunk3R7QHNI5_js.j(e,"w","val");if(y&&y.length===12&&(y[0]==="1"&&(t.firstRow=true),y[1]==="1"&&(t.lastRow=true),y[2]==="1"&&(t.firstColumn=true),y[3]==="1"&&(t.lastColumn=true),y[4]==="1"&&(t.oddVBand=true),y[5]==="1"&&(t.evenVBand=true),y[6]==="1"&&(t.oddHBand=true),y[7]==="1"&&(t.evenHBand=true),y[8]==="1"&&(t.nwCell=true),y[9]==="1"&&(t.neCell=true),y[10]==="1"&&(t.swCell=true),y[11]==="1"&&(t.seCell=true)),Object.keys(t).length!==0)return t}function wt(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","tcW"));n&&(t.width=n);let o=ne(chunk3R7QHNI5_js.e(e,"w","tcBorders"));o&&(t.borders=o);let r=oe(chunk3R7QHNI5_js.e(e,"w","tcMar"));r&&(t.margins=r);let a=re(chunk3R7QHNI5_js.e(e,"w","shd"));a&&(t.shading=a);let u=chunk3R7QHNI5_js.e(e,"w","vAlign");if(u){let y=chunk3R7QHNI5_js.j(u,"w","val");(y==="top"||y==="center"||y==="bottom")&&(t.verticalAlign=y);}let l=chunk3R7QHNI5_js.e(e,"w","textDirection");if(l){let y=chunk3R7QHNI5_js.j(l,"w","val");y&&(t.textDirection=y);}let f=chunk3R7QHNI5_js.e(e,"w","gridSpan");if(f){let y=chunk3R7QHNI5_js.l(f,"w","val");y!==void 0&&y>1&&(t.gridSpan=y);}let c=chunk3R7QHNI5_js.e(e,"w","vMerge");c&&(chunk3R7QHNI5_js.j(c,"w","val")==="restart"?t.vMerge="restart":t.vMerge="continue"),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","tcFitText"))&&(t.fitText=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","noWrap"))&&(t.noWrap=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","hideMark"))&&(t.hideMark=true);let T=ht(chunk3R7QHNI5_js.e(e,"w","cnfStyle"));if(T&&(t.conditionalFormat=T),Object.keys(t).length!==0)return t}function Rn(e,t,n,o,r,a,u){let l=[],f=e.elements||[];for(let c of f){if(!c.name)continue;let d=c.name.split(":").pop();if(d==="p"){let p=Z(c,t,n,o,r,a,u);l.push(p);}else if(d==="tbl"){let p=Te(c,t,n,o,r,a,u);l.push(p);}}return l.length===0&&l.push({type:"paragraph",content:[]}),l}function En(e,t,n,o,r,a,u){let l={type:"tableCell",content:[]},f=chunk3R7QHNI5_js.e(e,"w","tcPr"),c=wt(f);return c&&(l.formatting=c),l.propertyChanges=kn(f,c),l.structuralChange=Mn(f),l.content=Rn(e,t,n,o,r,a,u),l}function Pn(e,t,n,o,r,a,u){let l={type:"tableRow",cells:[]},f=chunk3R7QHNI5_js.e(e,"w","trPr"),c=gt(f);c&&(l.formatting=c),l.propertyChanges=Cn(f,c),l.structuralChange=Sn(f);let d=chunk3R7QHNI5_js.f(e,"w","tc");for(let p of d){let w=En(p,t,n,o,r,a,u);l.cells.push(w);}return l}function Bn(e){if(!e)return;let t=[],n=chunk3R7QHNI5_js.f(e,"w","gridCol");for(let o of n){let r=chunk3R7QHNI5_js.l(o,"w","w")??0;t.push(r);}if(!(t.length>0&&t.every(o=>o<=0)))return t.length>0?t:void 0}function vn(e){return e.cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function Nn(e){let t=Math.max(e.columnWidths?.length??0,...e.rows.map(n=>vn(n)));if(!(t<=1))for(let n of e.rows){if(n.cells.length!==1)continue;let o=n.cells[0];(o.formatting?.gridSpan??1)>=t||o.formatting?.vMerge||o.formatting?.gridSpan==null&&(o.formatting={...o.formatting??{},gridSpan:t});}}function Te(e,t,n,o,r,a,u){let l={type:"table",rows:[]},f=chunk3R7QHNI5_js.e(e,"w","tblPr"),c=mt(f);c&&(l.formatting=c),l.propertyChanges=Fn(f,c);let d=Bn(chunk3R7QHNI5_js.e(e,"w","tblGrid"));d&&(l.columnWidths=d);let p=chunk3R7QHNI5_js.f(e,"w","tr");for(let w of p){let T=Pn(w,t,n,o,r,a,u);l.rows.push(T);}return Nn(l),l}exports.A=so;exports.B=Je;exports.C=mo;exports.D=go;exports.E=K;exports.F=rt;exports.G=Ao;exports.H=Io;exports.I=Ho;exports.J=Lo;exports.K=Xo;exports.L=Do;exports.M=Oo;exports.N=Tn;exports.O=Z;exports.a=In;exports.b=Y;exports.c=De;exports.d=V;exports.e=ne;exports.f=oe;exports.g=re;exports.h=ye;exports.i=be;exports.j=Ct;exports.k=kt;exports.l=St;exports.m=Mt;exports.n=Rt;exports.o=mt;exports.p=vt;exports.q=q;exports.r=Qn;exports.s=Jn;exports.t=oo;exports.u=ro;exports.v=Ze;exports.w=Ke;exports.x=io;exports.y=ao;exports.z=lo;
|
package/dist/chunk-F24WZXN4.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {i,h,a as a$1,j as j$1,l,m,n,o,p}from'./chunk-2LVK7EF5.mjs';import {a}from'./chunk-W77JXDEV.mjs';import x from'jszip';var se=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;function P(n){return n.startsWith("/")?n.slice(1):`word/${n}`}function I(n){let e=[{relsPath:"word/_rels/document.xml.rels",blocks:n.package.document.content}],t=n.package.relationships;if(!t)return e;let o=(r,s)=>{if(r)for(let[a,i]of r.entries()){let c=t.get(a);if(!c||c.type!==s||!c.target)continue;let m=P(c.target).replace(/^word\//,"");e.push({relsPath:`word/_rels/${m}.rels`,blocks:i.content});}};return o(n.package.headers,a.header),o(n.package.footers,a.footer),e}async function T(n,e){let t=n.file(e);return (t?await t.async("text"):se).replace(/<Relationships([^>]*)\/>/,"<Relationships$1></Relationships>")}function y(n){let e=0;for(let t of n.matchAll(/Id="rId(\d+)"/g)){let o=parseInt(t[1],10);o>e&&(e=o);}return e}function A(n,e){return e||{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp",wmf:"image/x-wmf",emf:"image/x-emf"}[n]||"application/octet-stream"}function j(n){let e=[],t=o=>{for(let r of o.content)r.type==="drawing"&&r.image?.src?.startsWith("data:")&&e.push(r.image);};for(let o of n)if(o.type==="paragraph"){for(let r of o.content)if(r.type==="run")t(r);else if(r.type==="insertion"||r.type==="deletion"||r.type==="moveFrom"||r.type==="moveTo")for(let s of r.content)s.type==="run"&&t(s);}else if(o.type==="table")for(let r of o.rows)for(let s of r.cells)e.push(...j(s.content));return e}var ie={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function W(n){let e=n.match(/^data:([^;]+);base64,(.+)$/);if(!e)throw new Error("Invalid data URL");let t=atob(e[2]),o=new Uint8Array(t.length);for(let r=0;r<t.length;r++)o[r]=t.charCodeAt(r);return {data:o.buffer,extension:ie[e[1]]||"png"}}async function z(n,e,t){if(e.size===0)return;let o=n.file("[Content_Types].xml");if(!o)return;let r=await o.async("text"),s=false;for(let a of e)if(!r.includes(`Extension="${a}"`)){let i=A(a,"");r=r.replace("</Types>",`<Default Extension="${a}" ContentType="${i}"/></Types>`),s=true;}s&&n.file("[Content_Types].xml",r,{compression:"DEFLATE",compressionOptions:{level:t}});}function q(n){let e=0;return n.forEach(t=>{let o=t.match(/^word\/media\/image(\d+)\./);if(o){let r=parseInt(o[1],10);r>e&&(e=r);}}),e}async function F(n,e,t){let o=q(e),r=new Set;for(let{relsPath:s,blocks:a$1}of n){let i=j(a$1);if(i.length===0)continue;let c=await T(e,s),l=y(c),m=[];for(let f of i){let{data:d,extension:g}=W(f.src);o++,l++;let w=`image${o}.${g}`,E=`rId${l}`;e.file(`word/media/${w}`,d,{compression:"DEFLATE",compressionOptions:{level:t}}),m.push(`<Relationship Id="${E}" Type="${a.image}" Target="media/${w}"/>`),r.add(g),f.rId=E;}let p=c.replace("</Relationships>",m.join("")+"</Relationships>");e.file(s,p,{compression:"DEFLATE",compressionOptions:{level:t}});}await z(e,r,t);}function Y(n){return n.replace(/^\.?\/?(?:word\/)?/,"")}function ae(n,e){let t=Y(e),o=/<Relationship\b[^>]*?>/g,r;for(;(r=o.exec(n))!==null;){let s=r[0],a=/Target="([^"]*)"/.exec(s)?.[1];if(a&&Y(a)===t)return /Id="([^"]*)"/.exec(s)?.[1]??null}return null}async function b(n,e,t){let o=n.package.headers,r=n.package.relationships;if(!o||!r)return;let s=new Set,a$1=new Map,i=q(e);function c(l){if(l.mediaPath){let m=l.mediaPath.split("/").pop();if(m)return m}if(l.dataUrl&&l.dataUrl.startsWith("data:")){let m=a$1.get(l.dataUrl);if(m)return m;let{data:p,extension:f}=W(l.dataUrl);i++;let d=`image${i}.${f}`;return e.file(`word/media/${d}`,p,{compression:"DEFLATE",compressionOptions:{level:t}}),s.add(f),a$1.set(l.dataUrl,d),d}return null}for(let[l,m]of o.entries()){let p=m.watermark;if(!p||p.kind!=="picture")continue;let f=r.get(l);if(!f?.target)continue;let g=`word/_rels/${P(f.target).replace(/^word\//,"")}.rels`,w=await T(e,g);if(p.relId&&new RegExp(`Id="${p.relId}"`).test(w))continue;let E=c(p);if(!E)continue;let N=`media/${E}`,_=ae(w,N);if(_){p.relId=_;continue}let S=`rId${y(w)+1}`,re=w.replace("</Relationships>",`<Relationship Id="${S}" Type="${a.image}" Target="${N}"/></Relationships>`);e.file(g,re,{compression:"DEFLATE",compressionOptions:{level:t}}),p.relId=S;}await z(e,s,t);}function V(n){let e=[];for(let t of n)if(t.type==="paragraph")for(let o of t.content)o.type==="hyperlink"&&o.href&&!o.rId&&!o.anchor&&e.push(o);else if(t.type==="table")for(let o of t.rows)for(let r of o.cells)e.push(...V(r.content));return e}async function O(n,e,t){for(let{relsPath:o,blocks:r}of n){let s=V(r);if(s.length===0)continue;let a$2=await T(e,o),i=y(a$2),c=[];for(let m of s){i++;let p=`rId${i}`;c.push(`<Relationship Id="${p}" Type="${a.hyperlink}" Target="${a$1(m.href)}" TargetMode="External"/>`),m.rId=p;}let l=a$2.replace("</Relationships>",c.join("")+"</Relationships>");e.file(o,l,{compression:"DEFLATE",compressionOptions:{level:t}});}}var ce="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",le="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",G="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",K="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",Q="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",ee="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function R(n,e,t){let o=n.package.relationships;if(!o)return;let r=[];for(let[l,m]of o){if(!m.target)continue;let p=m.type===a.header?ce:m.type===a.footer?le:null;p&&r.push({rId:l,target:m.target.replace(/^(\/?word\/)/,""),contentType:p,relType:m.type});}if(r.length===0)return;let s=e.file("[Content_Types].xml");if(s){let l=await s.async("text"),m=false;for(let{target:p,contentType:f}of r){let d=`/word/${p}`;l.includes(`PartName="${d}"`)||(l=l.replace("</Types>",`<Override PartName="${d}" ContentType="${f}"/></Types>`),m=true);}m&&e.file("[Content_Types].xml",l,{compression:"DEFLATE",compressionOptions:{level:t}});}let a$1="word/_rels/document.xml.rels",i=await T(e,a$1),c=false;for(let{rId:l,relType:m,target:p}of r)i.includes(`Id="${l}"`)||(i=i.replace("</Relationships>",`<Relationship Id="${l}" Type="${m}" Target="${p}"/></Relationships>`),c=true);c&&e.file(a$1,i,{compression:"DEFLATE",compressionOptions:{level:t}});}async function pe(n,e){let t=[{partName:"/word/comments.xml",contentType:G,target:"comments.xml",relType:a.comments},{partName:"/word/commentsExtended.xml",contentType:K,target:"commentsExtended.xml",relType:a.commentsExtended},{partName:"/word/commentsIds.xml",contentType:Q,target:"commentsIds.xml",relType:a.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:ee,target:"commentsExtensible.xml",relType:a.commentsExtensible}],o=n.file("[Content_Types].xml");if(o){let a=await o.async("text"),i=false;for(let{partName:c,contentType:l}of t)a.includes(c)||(a=a.replace("</Types>",`<Override PartName="${c}" ContentType="${l}"/></Types>`),i=true);i&&n.file("[Content_Types].xml",a,{compression:"DEFLATE",compressionOptions:{level:e}});}let r="word/_rels/document.xml.rels",s=n.file(r);if(s){let a=await s.async("text"),i=false;for(let{target:c,relType:l}of t)if(!a.includes(c)){let m=`rId${y(a)+1}`;a=a.replace("</Relationships>",`<Relationship Id="${m}" Type="${l}" Target="${c}"/></Relationships>`),i=true;}i&&n.file(r,a,{compression:"DEFLATE",compressionOptions:{level:e}});}}async function v(n$1,e,t){let o=n$1.package.document.comments;if(!o||o.length===0)return;let{xml:r,paraInfos:s}=j$1(o);e.file("word/comments.xml",r,{compression:"DEFLATE",compressionOptions:{level:t}});let a=l(s);a&&e.file("word/commentsExtended.xml",a,{compression:"DEFLATE",compressionOptions:{level:t}});let i=m(s);i&&e.file("word/commentsIds.xml",i,{compression:"DEFLATE",compressionOptions:{level:t}});let c=n(s,o);c&&e.file("word/commentsExtensible.xml",c,{compression:"DEFLATE",compressionOptions:{level:t}}),await pe(e,t);}function C(n,e,t){let o$1=n.package.footnotes??[],r=n.package.footnoteSeparators??[];if(o$1.length===0&&r.length===0)return;let s=o([...r,...o$1]);e.file("word/footnotes.xml",s,{compression:"DEFLATE",compressionOptions:{level:t}});}function $(n,e,t){let o=n.package.endnotes??[],r=n.package.endnoteSeparators??[];if(o.length===0&&r.length===0)return;let s=p([...r,...o]);e.file("word/endnotes.xml",s,{compression:"DEFLATE",compressionOptions:{level:t}});}function te(n){let e=new Map,t=n.package.relationships;if(!t)return e;let o=[{map:n.package.headers,type:a.header},{map:n.package.footers,type:a.footer}];for(let{map:r,type:s}of o)if(r)for(let[a,i$1]of r.entries()){let c=t.get(a);c&&c.type===s&&c.target&&e.set(P(c.target),i(i$1));}return e}function M(n,e,t){let o={level:t};for(let[r,s]of te(n))e.file(r,s,{compression:"DEFLATE",compressionOptions:o});}async function k(){let n=new x;n.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
3
|
-
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
|
4
|
-
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
|
|
5
|
-
<Default Extension="xml" ContentType="application/xml"/>
|
|
6
|
-
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
|
|
7
|
-
<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
|
|
8
|
-
<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
|
|
9
|
-
<Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
|
|
10
|
-
</Types>`),n.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
11
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
12
|
-
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
|
|
13
|
-
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
|
|
14
|
-
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
|
|
15
|
-
</Relationships>`),n.file("word/_rels/document.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
16
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
17
|
-
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
|
|
18
|
-
</Relationships>`),n.file("word/document.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
19
|
-
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
|
|
20
|
-
<w:body>
|
|
21
|
-
<w:p>
|
|
22
|
-
<w:r>
|
|
23
|
-
<w:t></w:t>
|
|
24
|
-
</w:r>
|
|
25
|
-
</w:p>
|
|
26
|
-
<w:sectPr>
|
|
27
|
-
<w:pgSz w:w="12240" w:h="15840"/>
|
|
28
|
-
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
|
|
29
|
-
</w:sectPr>
|
|
30
|
-
</w:body>
|
|
31
|
-
</w:document>`),n.file("word/styles.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
32
|
-
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
|
33
|
-
<w:docDefaults>
|
|
34
|
-
<w:rPrDefault>
|
|
35
|
-
<w:rPr>
|
|
36
|
-
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
|
|
37
|
-
<w:sz w:val="22"/>
|
|
38
|
-
</w:rPr>
|
|
39
|
-
</w:rPrDefault>
|
|
40
|
-
<w:pPrDefault>
|
|
41
|
-
<w:pPr>
|
|
42
|
-
<w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
|
|
43
|
-
</w:pPr>
|
|
44
|
-
</w:pPrDefault>
|
|
45
|
-
</w:docDefaults>
|
|
46
|
-
<w:style w:type="paragraph" w:default="1" w:styleId="Normal">
|
|
47
|
-
<w:name w:val="Normal"/>
|
|
48
|
-
</w:style>
|
|
49
|
-
</w:styles>`);let e=new Date().toISOString();return n.file("docProps/core.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
50
|
-
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
51
|
-
<dc:creator>EigenPal DOCX Editor</dc:creator>
|
|
52
|
-
<dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created>
|
|
53
|
-
<dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified>
|
|
54
|
-
</cp:coreProperties>`),n.file("docProps/app.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
55
|
-
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
|
|
56
|
-
<Application>EigenPal DOCX Editor</Application>
|
|
57
|
-
<AppVersion>1.0.0</AppVersion>
|
|
58
|
-
</Properties>`),n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}})}async function oe(n,e={}){if(!n.originalBuffer)throw new Error("Cannot repack document: no original buffer for round-trip. Use createDocx() for new documents.");let{compressionLevel:t=6,updateModifiedDate:o=true,modifiedBy:r}=e,s=n,a=await x.loadAsync(n.originalBuffer),i=new x;for(let[p,f]of Object.entries(a.files)){if(f.dir){i.folder(p.replace(/\/$/,""));continue}let d=await f.async("arraybuffer");i.file(p,d,{compression:"DEFLATE",compressionOptions:{level:t}});}let c=I(s);await F(c,i,t),await b(s,i,t),await O(c,i,t);let l=h(s);if(i.file("word/document.xml",l,{compression:"DEFLATE",compressionOptions:{level:t}}),M(s,i,t),await R(s,i,t),await v(s,i,t),C(s,i,t),$(s,i,t),o){let p="docProps/core.xml",f=a.file(p);if(f){let d=await f.async("text"),g=ne(d,{updateModifiedDate:o,modifiedBy:r});i.file(p,g,{compression:"DEFLATE",compressionOptions:{level:t}});}}return await i.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:t}})}async function Le(n,e,t={}){let{compressionLevel:o=6,updateModifiedDate:r=true,modifiedBy:s}=t,a=n,i=new x;for(let[p,f]of Object.entries(e.originalZip.files)){if(f.dir){i.folder(p.replace(/\/$/,""));continue}let d=await f.async("arraybuffer");i.file(p,d,{compression:"DEFLATE",compressionOptions:{level:o}});}let c=I(a);await F(c,i,o),await b(a,i,o),await O(c,i,o);let l=h(a);if(i.file("word/document.xml",l,{compression:"DEFLATE",compressionOptions:{level:o}}),M(a,i,o),await R(a,i,o),await v(a,i,o),C(a,i,o),$(a,i,o),r&&e.corePropsXml){let p=ne(e.corePropsXml,{updateModifiedDate:r,modifiedBy:s});i.file("docProps/core.xml",p,{compression:"DEFLATE",compressionOptions:{level:o}});}return await i.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Xe(n,e,t={}){let{compressionLevel:o=6}=t,r=await x.loadAsync(n);return r.file("word/document.xml",e,{compression:"DEFLATE",compressionOptions:{level:o}}),r.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Ze(n,e,t,o={}){let{compressionLevel:r=6}=o,s=await x.loadAsync(n);return s.file(e,t,{compression:"DEFLATE",compressionOptions:{level:r}}),s.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:r}})}async function He(n,e,t={}){let o=await x.loadAsync(n);return fe(o,e,t)}async function fe(n,e,t={}){let{compressionLevel:o=6}=t;for(let[r,s]of e)n.file(r,s,{compression:"DEFLATE",compressionOptions:{level:o}});return n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function de(n,e){let t=await x.loadAsync(n),o="word/_rels/document.xml.rels",r=t.file(o);if(!r)throw new Error("document.xml.rels not found in DOCX");let s=await r.async("text"),a=`rId${y(s)+1}`,i=e.targetMode==="External"?' TargetMode="External"':"",c=`<Relationship Id="${a}" Type="${e.type}" Target="${a$1(e.target)}"${i}/>`,l=s.replace("</Relationships>",`${c}</Relationships>`);return t.file(o,l),{buffer:await t.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a}}async function Ue(n,e,t,o){let r=await x.loadAsync(n),s=`word/media/${e}`;r.file(s,t);let a=await de(await r.generateAsync({type:"arraybuffer"}),{type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",target:`media/${e}`}),i=r.file("[Content_Types].xml");if(i){let c=await i.async("text"),l=e.split(".").pop()?.toLowerCase()||"";if(!c.includes(`Extension="${l}"`)&&l){let p=A(l,o),f=`<Default Extension="${l}" ContentType="${p}"/>`,d=c.replace("</Types>",`${f}</Types>`),g=await x.loadAsync(a.buffer);return g.file("[Content_Types].xml",d),{buffer:await g.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a.rId,path:s}}}return {buffer:a.buffer,rId:a.rId,path:s}}function ne(n,e){let t=n;if(e.updateModifiedDate){let o=new Date().toISOString();t.includes("<dcterms:modified")?t=t.replace(/<dcterms:modified[^>]*>[^<]*<\/dcterms:modified>/,`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified>`):t=t.replace("</cp:coreProperties>",`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified></cp:coreProperties>`);}return e.modifiedBy&&(t.includes("<cp:lastModifiedBy")?t=t.replace(/<cp:lastModifiedBy>[^<]*<\/cp:lastModifiedBy>/,`<cp:lastModifiedBy>${a$1(e.modifiedBy)}</cp:lastModifiedBy>`):t=t.replace("</cp:coreProperties>",`<cp:lastModifiedBy>${a$1(e.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)),t}async function Je(n){let e=[],t=[];try{let o=await x.loadAsync(n),r=["[Content_Types].xml","word/document.xml"];for(let c of r)o.file(c)||e.push(`Missing required file: ${c}`);let s=["_rels/.rels","word/_rels/document.xml.rels","word/styles.xml"];for(let c of s)o.file(c)||t.push(`Missing recommended file: ${c}`);let a=o.file("word/document.xml");if(a){let c=await a.async("text");c.includes("<?xml")||t.push("document.xml missing XML declaration"),c.includes("<w:document")||e.push("document.xml missing w:document element"),c.includes("<w:body>")||e.push("document.xml missing w:body element");}let i=o.file("[Content_Types].xml");if(i){let c=await i.async("text");!c.includes("word/document.xml")&&!c.includes("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml")&&t.push("Content_Types.xml may be missing document.xml type declaration");}}catch(o){e.push(`Failed to read as ZIP: ${o instanceof Error?o.message:"Unknown error"}`);}return {valid:e.length===0,errors:e,warnings:t}}function Ye(n){if(n.byteLength<4)return false;let e=new Uint8Array(n);return e[0]===80&&e[1]===75}async function je(n){let e=await k(),t={...n,originalBuffer:e};return oe(t)}var We=oe;
|
|
59
|
-
export{P as a,y as b,G as c,K as d,Q as e,ee as f,te as g,k as h,oe as i,Le as j,Xe as k,Ze as l,He as m,fe as n,de as o,Ue as p,ne as q,Je as r,Ye as s,je as t,We as u};
|
package/dist/chunk-FETIBXTH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js');function h(c){return JSON.parse(JSON.stringify(c))}function g(c,t){let a=0;for(let r=0;r<c.content.length;r++)if(c.content[r].type==="paragraph"){if(a===t)return r;a++;}return -1}function I(c){let t="";for(let a of c.content)if(a.type==="run")for(let r of a.content)r.type==="text"&&(t+=r.text);else if(a.type==="hyperlink"){for(let r of a.children)if(r.type==="run")for(let e of r.content)e.type==="text"&&(t+=e.text);}return t}function b(c,t){return {type:"run",formatting:t,content:[{type:"text",text:c}]}}function P(c,t,a,r){let e=[],o=0,p=false;for(let n of c.content)if(n.type==="run"){let s=n.content.filter(l=>l.type==="text").map(l=>l.text).join(""),i=o,u=o+s.length;if(!p&&t>=i&&t<=u){let l=t-i;l>0&&e.push({...n,content:[{type:"text",text:s.slice(0,l)}]}),e.push(b(a,r||n.formatting)),l<s.length&&e.push({...n,content:[{type:"text",text:s.slice(l)}]}),p=true;}else e.push(n);o=u;}else e.push(n);return p||e.push(b(a,r)),e}function m(c,t,a){let r=[],e=0;for(let o of c.content)if(o.type==="run"){let p=o.content.filter(i=>i.type==="text").map(i=>i.text).join(""),n=e,s=e+p.length;if(s<=t||n>=a)r.push(o);else {let i="";n<t&&(i+=p.slice(0,t-n)),s>a&&(i+=p.slice(a-n)),i.length>0&&r.push({...o,content:[{type:"text",text:i}]});}e=s;}else r.push(o);return r}function C(c,t,a,r){let e=[],o=0;for(let p of c.content)if(p.type==="run"){let n=p.content.filter(u=>u.type==="text").map(u=>u.text).join(""),s=o,i=o+n.length;if(i<=t||s>=a)e.push(p);else if(s>=t&&i<=a)e.push({...p,formatting:{...p.formatting,...r}});else {let u=Math.max(t,s),l=Math.min(a,i);s<u&&e.push({...p,content:[{type:"text",text:n.slice(0,u-s)}]}),e.push({...p,formatting:{...p.formatting,...r},content:[{type:"text",text:n.slice(u-s,l-s)}]}),i>l&&e.push({...p,content:[{type:"text",text:n.slice(l-s)}]});}o=i;}else e.push(p);return e}function v(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e];return o.content=P(o,t.position.offset,t.text,t.formatting),a}function B(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset),n.content=P(n,e.offset,t.text,t.formatting);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length),n.content=P(n,e.offset,t.text,t.formatting);let i=[];for(let u=e.paragraphIndex+1;u<=o.paragraphIndex;u++)i.push(g(r,u));for(let u=i.length-1;u>=0;u--)i[u]!==-1&&r.content.splice(i[u],1);}return a}function A(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length);let i=g(r,o.paragraphIndex),u=r.content[i];u.content=m(u,0,o.offset),n.content.push(...u.content);let l=[];for(let f=e.paragraphIndex+1;f<=o.paragraphIndex;f++)l.push(g(r,f));for(let f=l.length-1;f>=0;f--)l[f]!==-1&&r.content.splice(l[f],1);}return a}function E(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=C(n,e.offset,o.offset,t.formatting);}else for(let p=e.paragraphIndex;p<=o.paragraphIndex;p++){let n=g(r,p);if(n===-1)continue;let s=r.content[n],i=I(s),u=0,l=i.length;p===e.paragraphIndex&&(u=e.offset),p===o.paragraphIndex&&(l=o.offset),s.content=C(s,u,l,t.formatting);}return a}function S(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];if(o.formatting={...o.formatting,...t.formatting},"numPr"in t.formatting){let p=t.formatting.numPr;if(p&&p.numId!==void 0&&p.numId!==0){let n=p.ilvl??0,s=p.numId===1,i=s?"\u2022":"1.";if(a.package.numbering){let u=a.package.numbering.nums.find(l=>l.numId===p.numId);if(u){let l=a.package.numbering.abstractNums.find(f=>f.abstractNumId===u.abstractNumId);if(l){let f=l.levels.find(x=>x.ilvl===n);f&&(i=f.lvlText||i);}}}o.listRendering={level:n,numId:p.numId,marker:i,isBullet:s};}else delete o.listRendering;}return a}function F(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];return o.formatting={...o.formatting,styleId:t.styleId},a}function V(c,t){let a=h(c),r=a.package.document,e=[];for(let n=0;n<t.rows;n++){let s=[];for(let i=0;i<t.columns;i++){let u=t.data?.[n]?.[i]||"";s.push({type:"tableCell",content:[{type:"paragraph",content:u?[b(u)]:[]}]});}e.push({type:"tableRow",formatting:n===0&&t.hasHeader?{header:true}:void 0,cells:s});}let o={type:"table",rows:e},p=g(r,t.position.paragraphIndex);return p===-1?r.content.push(o):r.content.splice(p+1,0,o),a}function H(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],n={type:"run",content:[{type:"drawing",image:{type:"image",rId:`rId_img_${Date.now()}`,src:t.src,alt:t.alt,size:{width:chunkBJSG6TEG_js.g(t.width||100),height:chunkBJSG6TEG_js.g(t.height||100)},wrap:{type:"inline"}}}]},s=P(o,t.position.offset,"",void 0),i=false,u=0;for(let l=0;l<s.length;l++){let f=s[l];if(f.type==="run"){let x=f.content.filter(d=>d.type==="text").map(d=>d.text).join("");if(u+=x.length,!i&&u>=t.position.offset){s.splice(l+1,0,n),i=true;break}}}return i||s.push(n),o.content=s,a}function $(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex!==o.paragraphIndex)throw new Error("Hyperlinks cannot span multiple paragraphs");let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p],s=I(n),i=t.displayText||s.slice(e.offset,o.offset);n.content=m(n,e.offset,o.offset);let u={type:"hyperlink",href:t.url,tooltip:t.tooltip,children:[b(i)]},l=false,f=0,x=[];for(let d of n.content)if(d.type==="run"){let T=d.content.filter(y=>y.type==="text").map(y=>y.text).join(""),w=f+T.length;if(!l&&f<=e.offset&&e.offset<=w){let y=e.offset-f;y>0&&x.push({...d,content:[{type:"text",text:T.slice(0,y)}]}),x.push(u),y<T.length&&x.push({...d,content:[{type:"text",text:T.slice(y)}]}),l=true;}else x.push(d);f=w;}else x.push(d);return l||x.push(u),n.content=x,a}function j(c,t){let a=h(c),r=a.package.document,{start:e}=t.range,o=g(r,e.paragraphIndex);if(o===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let p=r.content[o],n=[];for(let s of p.content)if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&n.push(i);else n.push(s);return p.content=n,a}function D(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],p=I(o),n=m({...o,content:[...o.content]},t.position.offset,p.length),s=m({...o,content:[...o.content]},0,t.position.offset);o.content=n;let i={type:"paragraph",formatting:o.formatting,content:s};return r.content.splice(e+1,0,i),a}function M(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e],p=[];for(let n=1;n<=t.count;n++){let s=g(r,t.paragraphIndex+n);if(s!==-1){let i=r.content[s];o.content.push(...i.content),p.push(s);}}for(let n=p.length-1;n>=0;n--)r.content.splice(p[n],1);return a}function N(c,t){return D(c,{position:t.position})}function O(c,t){let a=h(c);return a.templateVariables||(a.templateVariables=[]),a.templateVariables.includes(t.name)||a.templateVariables.push(t.name),a}function _(c,t){let a=h(c),r=a.package.document;function e(n){for(let s of n.content)if(s.type==="text")for(let[i,u]of Object.entries(t.values)){let l=new RegExp(`\\{${i}\\}`,"g");s.text=s.text.replace(l,u);}}function o(n){for(let s of n.content)if(s.type==="run")e(s);else if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&e(i);}function p(n){if(n.type==="paragraph")o(n);else if(n.type==="table")for(let s of n.rows)for(let i of s.cells)for(let u of i.content)p(u);}for(let n of r.content)p(n);return a}function J(c,t){let a=chunk4BFNWPKW_js.b.getCommandHandler(t.type);if(a)return a(c,t);switch(t.type){case "insertText":return v(c,t);case "replaceText":return B(c,t);case "deleteText":return A(c,t);case "formatText":return E(c,t);case "formatParagraph":return S(c,t);case "applyStyle":return F(c,t);case "insertTable":return V(c,t);case "insertImage":return H(c,t);case "insertHyperlink":return $(c,t);case "removeHyperlink":return j(c,t);case "insertParagraphBreak":return D(c,t);case "mergeParagraphs":return M(c,t);case "splitParagraph":return N(c,t);case "setVariable":return O(c,t);case "applyVariables":return _(c,t);default:{let r=t;throw new Error(`Unknown command type: ${r.type}`)}}}function at(c,t){return t.reduce((a,r)=>J(a,r),c)}exports.a=J;exports.b=at;
|
package/dist/chunk-JQUIUKRO.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk4JPHW7ZI_js=require('./chunk-4JPHW7ZI.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),x=require('jszip');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var x__default=/*#__PURE__*/_interopDefault(x);var se=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;function P(n){return n.startsWith("/")?n.slice(1):`word/${n}`}function I(n){let e=[{relsPath:"word/_rels/document.xml.rels",blocks:n.package.document.content}],t=n.package.relationships;if(!t)return e;let o=(r,s)=>{if(r)for(let[a,i]of r.entries()){let c=t.get(a);if(!c||c.type!==s||!c.target)continue;let m=P(c.target).replace(/^word\//,"");e.push({relsPath:`word/_rels/${m}.rels`,blocks:i.content});}};return o(n.package.headers,chunkZ3LGMBJC_js.a.header),o(n.package.footers,chunkZ3LGMBJC_js.a.footer),e}async function T(n,e){let t=n.file(e);return (t?await t.async("text"):se).replace(/<Relationships([^>]*)\/>/,"<Relationships$1></Relationships>")}function y(n){let e=0;for(let t of n.matchAll(/Id="rId(\d+)"/g)){let o=parseInt(t[1],10);o>e&&(e=o);}return e}function A(n,e){return e||{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp",wmf:"image/x-wmf",emf:"image/x-emf"}[n]||"application/octet-stream"}function j(n){let e=[],t=o=>{for(let r of o.content)r.type==="drawing"&&r.image?.src?.startsWith("data:")&&e.push(r.image);};for(let o of n)if(o.type==="paragraph"){for(let r of o.content)if(r.type==="run")t(r);else if(r.type==="insertion"||r.type==="deletion"||r.type==="moveFrom"||r.type==="moveTo")for(let s of r.content)s.type==="run"&&t(s);}else if(o.type==="table")for(let r of o.rows)for(let s of r.cells)e.push(...j(s.content));return e}var ie={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function W(n){let e=n.match(/^data:([^;]+);base64,(.+)$/);if(!e)throw new Error("Invalid data URL");let t=atob(e[2]),o=new Uint8Array(t.length);for(let r=0;r<t.length;r++)o[r]=t.charCodeAt(r);return {data:o.buffer,extension:ie[e[1]]||"png"}}async function z(n,e,t){if(e.size===0)return;let o=n.file("[Content_Types].xml");if(!o)return;let r=await o.async("text"),s=false;for(let a of e)if(!r.includes(`Extension="${a}"`)){let i=A(a,"");r=r.replace("</Types>",`<Default Extension="${a}" ContentType="${i}"/></Types>`),s=true;}s&&n.file("[Content_Types].xml",r,{compression:"DEFLATE",compressionOptions:{level:t}});}function q(n){let e=0;return n.forEach(t=>{let o=t.match(/^word\/media\/image(\d+)\./);if(o){let r=parseInt(o[1],10);r>e&&(e=r);}}),e}async function F(n,e,t){let o=q(e),r=new Set;for(let{relsPath:s,blocks:a}of n){let i=j(a);if(i.length===0)continue;let c=await T(e,s),l=y(c),m=[];for(let f of i){let{data:d,extension:g}=W(f.src);o++,l++;let w=`image${o}.${g}`,E=`rId${l}`;e.file(`word/media/${w}`,d,{compression:"DEFLATE",compressionOptions:{level:t}}),m.push(`<Relationship Id="${E}" Type="${chunkZ3LGMBJC_js.a.image}" Target="media/${w}"/>`),r.add(g),f.rId=E;}let p=c.replace("</Relationships>",m.join("")+"</Relationships>");e.file(s,p,{compression:"DEFLATE",compressionOptions:{level:t}});}await z(e,r,t);}function Y(n){return n.replace(/^\.?\/?(?:word\/)?/,"")}function ae(n,e){let t=Y(e),o=/<Relationship\b[^>]*?>/g,r;for(;(r=o.exec(n))!==null;){let s=r[0],a=/Target="([^"]*)"/.exec(s)?.[1];if(a&&Y(a)===t)return /Id="([^"]*)"/.exec(s)?.[1]??null}return null}async function b(n,e,t){let o=n.package.headers,r=n.package.relationships;if(!o||!r)return;let s=new Set,a=new Map,i=q(e);function c(l){if(l.mediaPath){let m=l.mediaPath.split("/").pop();if(m)return m}if(l.dataUrl&&l.dataUrl.startsWith("data:")){let m=a.get(l.dataUrl);if(m)return m;let{data:p,extension:f}=W(l.dataUrl);i++;let d=`image${i}.${f}`;return e.file(`word/media/${d}`,p,{compression:"DEFLATE",compressionOptions:{level:t}}),s.add(f),a.set(l.dataUrl,d),d}return null}for(let[l,m]of o.entries()){let p=m.watermark;if(!p||p.kind!=="picture")continue;let f=r.get(l);if(!f?.target)continue;let g=`word/_rels/${P(f.target).replace(/^word\//,"")}.rels`,w=await T(e,g);if(p.relId&&new RegExp(`Id="${p.relId}"`).test(w))continue;let E=c(p);if(!E)continue;let N=`media/${E}`,_=ae(w,N);if(_){p.relId=_;continue}let S=`rId${y(w)+1}`,re=w.replace("</Relationships>",`<Relationship Id="${S}" Type="${chunkZ3LGMBJC_js.a.image}" Target="${N}"/></Relationships>`);e.file(g,re,{compression:"DEFLATE",compressionOptions:{level:t}}),p.relId=S;}await z(e,s,t);}function V(n){let e=[];for(let t of n)if(t.type==="paragraph")for(let o of t.content)o.type==="hyperlink"&&o.href&&!o.rId&&!o.anchor&&e.push(o);else if(t.type==="table")for(let o of t.rows)for(let r of o.cells)e.push(...V(r.content));return e}async function O(n,e,t){for(let{relsPath:o,blocks:r}of n){let s=V(r);if(s.length===0)continue;let a=await T(e,o),i=y(a),c=[];for(let m of s){i++;let p=`rId${i}`;c.push(`<Relationship Id="${p}" Type="${chunkZ3LGMBJC_js.a.hyperlink}" Target="${chunk4JPHW7ZI_js.a(m.href)}" TargetMode="External"/>`),m.rId=p;}let l=a.replace("</Relationships>",c.join("")+"</Relationships>");e.file(o,l,{compression:"DEFLATE",compressionOptions:{level:t}});}}var ce="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",le="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",G="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",K="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",Q="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",ee="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function R(n,e,t){let o=n.package.relationships;if(!o)return;let r=[];for(let[l,m]of o){if(!m.target)continue;let p=m.type===chunkZ3LGMBJC_js.a.header?ce:m.type===chunkZ3LGMBJC_js.a.footer?le:null;p&&r.push({rId:l,target:m.target.replace(/^(\/?word\/)/,""),contentType:p,relType:m.type});}if(r.length===0)return;let s=e.file("[Content_Types].xml");if(s){let l=await s.async("text"),m=false;for(let{target:p,contentType:f}of r){let d=`/word/${p}`;l.includes(`PartName="${d}"`)||(l=l.replace("</Types>",`<Override PartName="${d}" ContentType="${f}"/></Types>`),m=true);}m&&e.file("[Content_Types].xml",l,{compression:"DEFLATE",compressionOptions:{level:t}});}let a="word/_rels/document.xml.rels",i=await T(e,a),c=false;for(let{rId:l,relType:m,target:p}of r)i.includes(`Id="${l}"`)||(i=i.replace("</Relationships>",`<Relationship Id="${l}" Type="${m}" Target="${p}"/></Relationships>`),c=true);c&&e.file(a,i,{compression:"DEFLATE",compressionOptions:{level:t}});}async function pe(n,e){let t=[{partName:"/word/comments.xml",contentType:G,target:"comments.xml",relType:chunkZ3LGMBJC_js.a.comments},{partName:"/word/commentsExtended.xml",contentType:K,target:"commentsExtended.xml",relType:chunkZ3LGMBJC_js.a.commentsExtended},{partName:"/word/commentsIds.xml",contentType:Q,target:"commentsIds.xml",relType:chunkZ3LGMBJC_js.a.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:ee,target:"commentsExtensible.xml",relType:chunkZ3LGMBJC_js.a.commentsExtensible}],o=n.file("[Content_Types].xml");if(o){let a=await o.async("text"),i=false;for(let{partName:c,contentType:l}of t)a.includes(c)||(a=a.replace("</Types>",`<Override PartName="${c}" ContentType="${l}"/></Types>`),i=true);i&&n.file("[Content_Types].xml",a,{compression:"DEFLATE",compressionOptions:{level:e}});}let r="word/_rels/document.xml.rels",s=n.file(r);if(s){let a=await s.async("text"),i=false;for(let{target:c,relType:l}of t)if(!a.includes(c)){let m=`rId${y(a)+1}`;a=a.replace("</Relationships>",`<Relationship Id="${m}" Type="${l}" Target="${c}"/></Relationships>`),i=true;}i&&n.file(r,a,{compression:"DEFLATE",compressionOptions:{level:e}});}}async function v(n,e,t){let o=n.package.document.comments;if(!o||o.length===0)return;let{xml:r,paraInfos:s}=chunk4JPHW7ZI_js.j(o);e.file("word/comments.xml",r,{compression:"DEFLATE",compressionOptions:{level:t}});let a=chunk4JPHW7ZI_js.l(s);a&&e.file("word/commentsExtended.xml",a,{compression:"DEFLATE",compressionOptions:{level:t}});let i=chunk4JPHW7ZI_js.m(s);i&&e.file("word/commentsIds.xml",i,{compression:"DEFLATE",compressionOptions:{level:t}});let c=chunk4JPHW7ZI_js.n(s,o);c&&e.file("word/commentsExtensible.xml",c,{compression:"DEFLATE",compressionOptions:{level:t}}),await pe(e,t);}function C(n,e,t){let o=n.package.footnotes??[],r=n.package.footnoteSeparators??[];if(o.length===0&&r.length===0)return;let s=chunk4JPHW7ZI_js.o([...r,...o]);e.file("word/footnotes.xml",s,{compression:"DEFLATE",compressionOptions:{level:t}});}function $(n,e,t){let o=n.package.endnotes??[],r=n.package.endnoteSeparators??[];if(o.length===0&&r.length===0)return;let s=chunk4JPHW7ZI_js.p([...r,...o]);e.file("word/endnotes.xml",s,{compression:"DEFLATE",compressionOptions:{level:t}});}function te(n){let e=new Map,t=n.package.relationships;if(!t)return e;let o=[{map:n.package.headers,type:chunkZ3LGMBJC_js.a.header},{map:n.package.footers,type:chunkZ3LGMBJC_js.a.footer}];for(let{map:r,type:s}of o)if(r)for(let[a,i]of r.entries()){let c=t.get(a);c&&c.type===s&&c.target&&e.set(P(c.target),chunk4JPHW7ZI_js.i(i));}return e}function M(n,e,t){let o={level:t};for(let[r,s]of te(n))e.file(r,s,{compression:"DEFLATE",compressionOptions:o});}async function k(){let n=new x__default.default;n.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
3
|
-
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
|
4
|
-
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
|
|
5
|
-
<Default Extension="xml" ContentType="application/xml"/>
|
|
6
|
-
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
|
|
7
|
-
<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
|
|
8
|
-
<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
|
|
9
|
-
<Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
|
|
10
|
-
</Types>`),n.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
11
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
12
|
-
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
|
|
13
|
-
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
|
|
14
|
-
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
|
|
15
|
-
</Relationships>`),n.file("word/_rels/document.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
16
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
17
|
-
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
|
|
18
|
-
</Relationships>`),n.file("word/document.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
19
|
-
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
|
|
20
|
-
<w:body>
|
|
21
|
-
<w:p>
|
|
22
|
-
<w:r>
|
|
23
|
-
<w:t></w:t>
|
|
24
|
-
</w:r>
|
|
25
|
-
</w:p>
|
|
26
|
-
<w:sectPr>
|
|
27
|
-
<w:pgSz w:w="12240" w:h="15840"/>
|
|
28
|
-
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
|
|
29
|
-
</w:sectPr>
|
|
30
|
-
</w:body>
|
|
31
|
-
</w:document>`),n.file("word/styles.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
32
|
-
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
|
33
|
-
<w:docDefaults>
|
|
34
|
-
<w:rPrDefault>
|
|
35
|
-
<w:rPr>
|
|
36
|
-
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
|
|
37
|
-
<w:sz w:val="22"/>
|
|
38
|
-
</w:rPr>
|
|
39
|
-
</w:rPrDefault>
|
|
40
|
-
<w:pPrDefault>
|
|
41
|
-
<w:pPr>
|
|
42
|
-
<w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
|
|
43
|
-
</w:pPr>
|
|
44
|
-
</w:pPrDefault>
|
|
45
|
-
</w:docDefaults>
|
|
46
|
-
<w:style w:type="paragraph" w:default="1" w:styleId="Normal">
|
|
47
|
-
<w:name w:val="Normal"/>
|
|
48
|
-
</w:style>
|
|
49
|
-
</w:styles>`);let e=new Date().toISOString();return n.file("docProps/core.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
50
|
-
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
51
|
-
<dc:creator>EigenPal DOCX Editor</dc:creator>
|
|
52
|
-
<dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created>
|
|
53
|
-
<dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified>
|
|
54
|
-
</cp:coreProperties>`),n.file("docProps/app.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
55
|
-
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
|
|
56
|
-
<Application>EigenPal DOCX Editor</Application>
|
|
57
|
-
<AppVersion>1.0.0</AppVersion>
|
|
58
|
-
</Properties>`),n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}})}async function oe(n,e={}){if(!n.originalBuffer)throw new Error("Cannot repack document: no original buffer for round-trip. Use createDocx() for new documents.");let{compressionLevel:t=6,updateModifiedDate:o=true,modifiedBy:r}=e,s=n,a=await x__default.default.loadAsync(n.originalBuffer),i=new x__default.default;for(let[p,f]of Object.entries(a.files)){if(f.dir){i.folder(p.replace(/\/$/,""));continue}let d=await f.async("arraybuffer");i.file(p,d,{compression:"DEFLATE",compressionOptions:{level:t}});}let c=I(s);await F(c,i,t),await b(s,i,t),await O(c,i,t);let l=chunk4JPHW7ZI_js.h(s);if(i.file("word/document.xml",l,{compression:"DEFLATE",compressionOptions:{level:t}}),M(s,i,t),await R(s,i,t),await v(s,i,t),C(s,i,t),$(s,i,t),o){let p="docProps/core.xml",f=a.file(p);if(f){let d=await f.async("text"),g=ne(d,{updateModifiedDate:o,modifiedBy:r});i.file(p,g,{compression:"DEFLATE",compressionOptions:{level:t}});}}return await i.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:t}})}async function Le(n,e,t={}){let{compressionLevel:o=6,updateModifiedDate:r=true,modifiedBy:s}=t,a=n,i=new x__default.default;for(let[p,f]of Object.entries(e.originalZip.files)){if(f.dir){i.folder(p.replace(/\/$/,""));continue}let d=await f.async("arraybuffer");i.file(p,d,{compression:"DEFLATE",compressionOptions:{level:o}});}let c=I(a);await F(c,i,o),await b(a,i,o),await O(c,i,o);let l=chunk4JPHW7ZI_js.h(a);if(i.file("word/document.xml",l,{compression:"DEFLATE",compressionOptions:{level:o}}),M(a,i,o),await R(a,i,o),await v(a,i,o),C(a,i,o),$(a,i,o),r&&e.corePropsXml){let p=ne(e.corePropsXml,{updateModifiedDate:r,modifiedBy:s});i.file("docProps/core.xml",p,{compression:"DEFLATE",compressionOptions:{level:o}});}return await i.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Xe(n,e,t={}){let{compressionLevel:o=6}=t,r=await x__default.default.loadAsync(n);return r.file("word/document.xml",e,{compression:"DEFLATE",compressionOptions:{level:o}}),r.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Ze(n,e,t,o={}){let{compressionLevel:r=6}=o,s=await x__default.default.loadAsync(n);return s.file(e,t,{compression:"DEFLATE",compressionOptions:{level:r}}),s.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:r}})}async function He(n,e,t={}){let o=await x__default.default.loadAsync(n);return fe(o,e,t)}async function fe(n,e,t={}){let{compressionLevel:o=6}=t;for(let[r,s]of e)n.file(r,s,{compression:"DEFLATE",compressionOptions:{level:o}});return n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function de(n,e){let t=await x__default.default.loadAsync(n),o="word/_rels/document.xml.rels",r=t.file(o);if(!r)throw new Error("document.xml.rels not found in DOCX");let s=await r.async("text"),a=`rId${y(s)+1}`,i=e.targetMode==="External"?' TargetMode="External"':"",c=`<Relationship Id="${a}" Type="${e.type}" Target="${chunk4JPHW7ZI_js.a(e.target)}"${i}/>`,l=s.replace("</Relationships>",`${c}</Relationships>`);return t.file(o,l),{buffer:await t.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a}}async function Ue(n,e,t,o){let r=await x__default.default.loadAsync(n),s=`word/media/${e}`;r.file(s,t);let a=await de(await r.generateAsync({type:"arraybuffer"}),{type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",target:`media/${e}`}),i=r.file("[Content_Types].xml");if(i){let c=await i.async("text"),l=e.split(".").pop()?.toLowerCase()||"";if(!c.includes(`Extension="${l}"`)&&l){let p=A(l,o),f=`<Default Extension="${l}" ContentType="${p}"/>`,d=c.replace("</Types>",`${f}</Types>`),g=await x__default.default.loadAsync(a.buffer);return g.file("[Content_Types].xml",d),{buffer:await g.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a.rId,path:s}}}return {buffer:a.buffer,rId:a.rId,path:s}}function ne(n,e){let t=n;if(e.updateModifiedDate){let o=new Date().toISOString();t.includes("<dcterms:modified")?t=t.replace(/<dcterms:modified[^>]*>[^<]*<\/dcterms:modified>/,`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified>`):t=t.replace("</cp:coreProperties>",`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified></cp:coreProperties>`);}return e.modifiedBy&&(t.includes("<cp:lastModifiedBy")?t=t.replace(/<cp:lastModifiedBy>[^<]*<\/cp:lastModifiedBy>/,`<cp:lastModifiedBy>${chunk4JPHW7ZI_js.a(e.modifiedBy)}</cp:lastModifiedBy>`):t=t.replace("</cp:coreProperties>",`<cp:lastModifiedBy>${chunk4JPHW7ZI_js.a(e.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)),t}async function Je(n){let e=[],t=[];try{let o=await x__default.default.loadAsync(n),r=["[Content_Types].xml","word/document.xml"];for(let c of r)o.file(c)||e.push(`Missing required file: ${c}`);let s=["_rels/.rels","word/_rels/document.xml.rels","word/styles.xml"];for(let c of s)o.file(c)||t.push(`Missing recommended file: ${c}`);let a=o.file("word/document.xml");if(a){let c=await a.async("text");c.includes("<?xml")||t.push("document.xml missing XML declaration"),c.includes("<w:document")||e.push("document.xml missing w:document element"),c.includes("<w:body>")||e.push("document.xml missing w:body element");}let i=o.file("[Content_Types].xml");if(i){let c=await i.async("text");!c.includes("word/document.xml")&&!c.includes("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml")&&t.push("Content_Types.xml may be missing document.xml type declaration");}}catch(o){e.push(`Failed to read as ZIP: ${o instanceof Error?o.message:"Unknown error"}`);}return {valid:e.length===0,errors:e,warnings:t}}function Ye(n){if(n.byteLength<4)return false;let e=new Uint8Array(n);return e[0]===80&&e[1]===75}async function je(n){let e=await k(),t={...n,originalBuffer:e};return oe(t)}var We=oe;
|
|
59
|
-
exports.a=P;exports.b=y;exports.c=G;exports.d=K;exports.e=Q;exports.f=ee;exports.g=te;exports.h=k;exports.i=oe;exports.j=Le;exports.k=Xe;exports.l=Ze;exports.m=He;exports.n=fe;exports.o=de;exports.p=Ue;exports.q=ne;exports.r=Je;exports.s=Ye;exports.t=je;exports.u=We;
|
package/dist/chunk-LE67NTCN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(){return Math.floor(Math.random()*2147483647).toString(16).toUpperCase().padStart(8,"0")}export{t as a};
|
package/dist/chunk-SHZOAUHB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {r,q}from'./chunk-TXAB4I4M.mjs';var t=new r(q());t.buildSchema();t.initializeRuntime();var s=t,n=t.getSchema();export{s as a,n as b};
|