@eigenpal/docx-editor-agents 1.0.1 → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  'use strict';var chunkNISW2GF6_js=require('./chunk-NISW2GF6.js'),St=require('jszip'),xmlJs=require('xml-js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var St__default=/*#__PURE__*/_interopDefault(St);function E(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function F(e){return e==null||!Number.isFinite(e)?"0":String(Math.round(e))}var nn=1e5;function yt(){nn=1e5;}function rn(e){return e!=null&&e!==""&&e!==0?String(e):String(nn++)}function xt(e){if(!e)return "";if(e.rgb)return `<a:srgbClr val="${e.rgb.replace("#","")}"/>`;if(e.themeColor){let t=`<a:schemeClr val="${e.themeColor}"`;return e.themeTint?t+=`><a:tint val="${e.themeTint}"/></a:schemeClr>`:e.themeShade?t+=`><a:shade val="${e.themeShade}"/></a:schemeClr>`:t+="/>",t}return ""}function Go(e){if(!e||e.type==="none")return "<a:noFill/>";if(e.type==="solid"&&e.color)return `<a:solidFill>${xt(e.color)}</a:solidFill>`;if(e.type==="gradient"&&e.gradient){let t=e.gradient,n=t.stops.map(o=>`<a:gs pos="${o.position}">${xt(o.color)}</a:gs>`).join(""),r=t.type==="linear"?`<a:lin ang="${(t.angle||0)*6e4}" scaled="1"/>`:"";return `<a:gradFill><a:gsLst>${n}</a:gsLst>${r}</a:gradFill>`}return ""}function on(e){if(!e)return "";let t=[];e.width!=null&&t.push(`w="${e.width}"`),e.cap&&t.push(`cap="${e.cap}"`);let n=[];return e.color&&n.push(`<a:solidFill>${xt(e.color)}</a:solidFill>`),e.style&&e.style!=="solid"&&n.push(`<a:prstDash val="${e.style}"/>`),e.headEnd&&n.push(`<a:headEnd type="${e.headEnd.type}"${e.headEnd.width?` w="${e.headEnd.width}"`:""}${e.headEnd.length?` len="${e.headEnd.length}"`:""}/>`),e.tailEnd&&n.push(`<a:tailEnd type="${e.tailEnd.type}"${e.tailEnd.width?` w="${e.tailEnd.width}"`:""}${e.tailEnd.length?` len="${e.tailEnd.length}"`:""}/>`),n.length===0&&t.length===0?"":`<a:ln${t.length?" "+t.join(" "):""}>${n.join("")}</a:ln>`}function an(e){let t=[],n=e.horizontal;t.push(`<wp:positionH relativeFrom="${n.relativeTo}">`),n.alignment?t.push(`<wp:align>${n.alignment}</wp:align>`):t.push(`<wp:posOffset>${F(n.posOffset)}</wp:posOffset>`),t.push("</wp:positionH>");let r=e.vertical;return t.push(`<wp:positionV relativeFrom="${r.relativeTo}">`),r.alignment?t.push(`<wp:align>${r.alignment}</wp:align>`):t.push(`<wp:posOffset>${F(r.posOffset)}</wp:posOffset>`),t.push("</wp:positionV>"),t.join("")}function sn(e){let t=e.wrapText?` wrapText="${e.wrapText}"`:' wrapText="bothSides"';switch(e.type){case "square":return `<wp:wrapSquare${t}/>`;case "tight":return `<wp:wrapTight${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;case "through":return `<wp:wrapThrough${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`;case "topAndBottom":return "<wp:wrapTopAndBottom/>";case "behind":case "inFront":return "<wp:wrapNone/>";default:return "<wp:wrapNone/>"}}function Zo(e,t){let n=e.size.width,r=e.size.height,o=e.rId||"rId1",i=t,a=e.filename||`image${i}`,s="";e.transform?.rotation&&(s+=` rot="${Math.round(e.transform.rotation*6e4)}"`),e.transform?.flipH&&(s+=' flipH="1"'),e.transform?.flipV&&(s+=' flipV="1"');let c=e.opacity!==void 0&&e.opacity<1?`<a:alphaModFix amt="${Math.round(Math.max(0,Math.min(1,e.opacity))*1e5)}"/>`:"",f=c?`<a:blip r:embed="${o}">${c}</a:blip>`:`<a:blip r:embed="${o}"/>`,p=[];e.crop?.left&&p.push(`l="${Math.round(e.crop.left*1e5)}"`),e.crop?.top&&p.push(`t="${Math.round(e.crop.top*1e5)}"`),e.crop?.right&&p.push(`r="${Math.round(e.crop.right*1e5)}"`),e.crop?.bottom&&p.push(`b="${Math.round(e.crop.bottom*1e5)}"`);let m=p.length>0?`<a:srcRect ${p.join(" ")}/>`:"";return ['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">','<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">',"<pic:nvPicPr>",`<pic:cNvPr id="${i}" name="${E(a)}"${e.alt?` descr="${E(e.alt)}"`:""}/>`,"<pic:cNvPicPr/>","</pic:nvPicPr>","<pic:blipFill>",f,m,"<a:stretch><a:fillRect/></a:stretch>","</pic:blipFill>","<pic:spPr>",`<a:xfrm${s}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${F(n)}" cy="${F(r)}"/>`,"</a:xfrm>",'<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>',e.outline?on(e.outline):"","</pic:spPr>","</pic:pic>","</a:graphicData>","</a:graphic>"].join("")}function ln(e){let t=e.image,n=t.wrap.type!=="inline",r=t.size.width,o=t.size.height,i=t.wrap.distT??0,a=t.wrap.distB??0,s=t.wrap.distL??0,c=t.wrap.distR??0,f=t.padding?.left??0,p=t.padding?.top??0,m=t.padding?.right??0,g=t.padding?.bottom??0,b=`<wp:effectExtent l="${F(f)}" t="${F(p)}" r="${F(m)}" b="${F(g)}"/>`,d=rn(t.id),y=t.title||t.filename||`Picture ${d}`,T=Zo(t,d);if(!n)return ["<w:drawing>",`<wp:inline distT="${F(i)}" distB="${F(a)}" distL="${F(s)}" distR="${F(c)}">`,`<wp:extent cx="${F(r)}" cy="${F(o)}"/>`,b,`<wp:docPr id="${d}" name="${E(y)}"${t.alt?` descr="${E(t.alt)}"`:""}${t.decorative?' hidden="1"':""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',T,"</wp:inline>","</w:drawing>"].join("");let I=t.wrap.type==="behind"?"1":"0",v=t.position?an(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',S=sn(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${F(i)}" distB="${F(a)}" distL="${F(s)}" distR="${F(c)}" simplePos="0" relativeHeight="251658240" behindDoc="${I}" locked="0" layoutInCell="${t.layoutInCell===false?"0":"1"}" allowOverlap="${t.allowOverlap===false?"0":"1"}">`,'<wp:simplePos x="0" y="0"/>',v,`<wp:extent cx="${F(r)}" cy="${F(o)}"/>`,b,S,`<wp:docPr id="${d}" name="${E(y)}"${t.alt?` descr="${E(t.alt)}"`:""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',T,"</wp:anchor>","</w:drawing>"].join("")}function qo(e){return e.map(t=>le(t)).join("")}function cn(e){let t=e.shape,n=t.size.width,r=t.size.height,o=t.shapeType==="textBox",i=t.wrap&&t.wrap.type!=="inline",a=t.wrap?.distT??0,s=t.wrap?.distB??0,c=t.wrap?.distL??0,f=t.wrap?.distR??0,p=rn(t.id),m=t.name||(o?`TextBox ${p}`:`Shape ${p}`),g="";t.transform?.rotation&&(g+=` rot="${Math.round(t.transform.rotation*6e4)}"`),t.transform?.flipH&&(g+=' flipH="1"'),t.transform?.flipV&&(g+=' flipV="1"');let b=["<wps:spPr>",`<a:xfrm${g}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${F(n)}" cy="${F(r)}"/>`,"</a:xfrm>",`<a:prstGeom prst="${t.shapeType==="textBox"?"rect":t.shapeType}"><a:avLst/></a:prstGeom>`,Go(t.fill),on(t.outline),"</wps:spPr>"].join(""),d="";if(t.textBody){let w=t.textBody,x=['rot="0"','vert="horz"'];w.anchor&&x.push(`anchor="${w.anchor==="middle"?"ctr":w.anchor}"`),w.anchorCenter&&x.push('anchorCtr="1"'),w.margins&&(w.margins.left!=null&&x.push(`lIns="${F(w.margins.left)}"`),w.margins.top!=null&&x.push(`tIns="${F(w.margins.top)}"`),w.margins.right!=null&&x.push(`rIns="${F(w.margins.right)}"`),w.margins.bottom!=null&&x.push(`bIns="${F(w.margins.bottom)}"`)),o?d=["<wps:txbx><w:txbxContent>",qo(w.content),"</w:txbxContent></wps:txbx>",`<wps:bodyPr ${x.join(" ")}/>`].join(""):d=[`<wps:bodyPr ${x.join(" ")}/>`].join("");}let T=['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">',["<wps:wsp>",`<wps:cNvSpPr${o?' txBox="1"':""}/>`,b,d,"</wps:wsp>"].join(""),"</a:graphicData>","</a:graphic>"].join("");if(!i)return ["<w:drawing>",`<wp:inline distT="${F(a)}" distB="${F(s)}" distL="${F(c)}" distR="${F(f)}">`,`<wp:extent cx="${F(n)}" cy="${F(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',`<wp:docPr id="${p}" name="${E(m)}"/>`,"<wp:cNvGraphicFramePr/>",T,"</wp:inline>","</w:drawing>"].join("");let I=t.wrap?.type==="behind"?"1":"0",v=t.position?an(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',S=sn(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${F(a)}" distB="${F(s)}" distL="${F(c)}" distR="${F(f)}" simplePos="0" relativeHeight="251658240" behindDoc="${I}" locked="0" layoutInCell="1" allowOverlap="1">`,'<wp:simplePos x="0" y="0"/>',v,`<wp:extent cx="${F(n)}" cy="${F(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',S,`<wp:docPr id="${p}" name="${E(m)}"/>`,"<wp:cNvGraphicFramePr/>",T,"</wp:anchor>","</w:drawing>"].join("")}var Yo=new Set(["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","red","white","yellow"]);function Jo(e){if(!e)return "";let t=[];return e.auto?t.push('w:val="auto"'):e.rgb&&t.push(`w:val="${e.rgb}"`),e.themeColor&&t.push(`w:themeColor="${e.themeColor}"`),e.themeTint&&t.push(`w:themeTint="${e.themeTint}"`),e.themeShade&&t.push(`w:themeShade="${e.themeShade}"`),t.length===0?"":`<w:color ${t.join(" ")}/>`}function Ko(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function pe(e){if(!e)return "";let t=[];if(e.styleId&&t.push(`<w:rStyle w:val="${E(e.styleId)}"/>`),e.fontFamily){let o=[];e.fontFamily.ascii&&o.push(`w:ascii="${E(e.fontFamily.ascii)}"`),e.fontFamily.hAnsi&&o.push(`w:hAnsi="${E(e.fontFamily.hAnsi)}"`),e.fontFamily.eastAsia&&o.push(`w:eastAsia="${E(e.fontFamily.eastAsia)}"`),e.fontFamily.cs&&o.push(`w:cs="${E(e.fontFamily.cs)}"`),e.fontFamily.asciiTheme&&o.push(`w:asciiTheme="${e.fontFamily.asciiTheme}"`),e.fontFamily.hAnsiTheme&&o.push(`w:hAnsiTheme="${e.fontFamily.hAnsiTheme}"`),e.fontFamily.eastAsiaTheme&&o.push(`w:eastAsiaTheme="${e.fontFamily.eastAsiaTheme}"`),e.fontFamily.csTheme&&o.push(`w:csTheme="${e.fontFamily.csTheme}"`),o.length>0&&t.push(`<w:rFonts ${o.join(" ")}/>`);}e.bold===true?t.push("<w:b/>"):e.bold===false&&t.push('<w:b w:val="0"/>'),e.boldCs===true?t.push("<w:bCs/>"):e.boldCs===false&&t.push('<w:bCs w:val="0"/>'),e.italic===true?t.push("<w:i/>"):e.italic===false&&t.push('<w:i w:val="0"/>'),e.italicCs===true?t.push("<w:iCs/>"):e.italicCs===false&&t.push('<w:iCs w:val="0"/>'),e.allCaps&&t.push("<w:caps/>"),e.smallCaps&&t.push("<w:smallCaps/>"),e.strike&&t.push("<w:strike/>"),e.doubleStrike&&t.push("<w:dstrike/>"),e.outline&&t.push("<w:outline/>"),e.shadow&&t.push("<w:shadow/>"),e.emboss&&t.push("<w:emboss/>"),e.imprint&&t.push("<w:imprint/>"),e.hidden&&t.push("<w:vanish/>");let n=Jo(e.color);if(n&&t.push(n),e.spacing!==void 0&&t.push(`<w:spacing w:val="${F(e.spacing)}"/>`),e.scale!==void 0&&t.push(`<w:w w:val="${F(e.scale)}"/>`),e.kerning!==void 0&&t.push(`<w:kern w:val="${F(e.kerning)}"/>`),e.position!==void 0&&t.push(`<w:position w:val="${F(e.position)}"/>`),e.fontSize!==void 0&&t.push(`<w:sz w:val="${F(e.fontSize)}"/>`),e.fontSizeCs!==void 0&&t.push(`<w:szCs w:val="${F(e.fontSizeCs)}"/>`),e.highlight&&e.highlight!=="none"){if(Yo.has(e.highlight))t.push(`<w:highlight w:val="${e.highlight}"/>`);else if(!e.shading){let o=e.highlight.replace(/^#/,"");/^[0-9a-fA-F]{6}$/.test(o)&&t.push(`<w:shd w:val="clear" w:color="auto" w:fill="${o}"/>`);}}if(e.underline){let o=[`w:val="${e.underline.style}"`];e.underline.color&&(e.underline.color.rgb&&o.push(`w:color="${e.underline.color.rgb}"`),e.underline.color.themeColor&&o.push(`w:themeColor="${e.underline.color.themeColor}"`),e.underline.color.themeTint&&o.push(`w:themeTint="${e.underline.color.themeTint}"`),e.underline.color.themeShade&&o.push(`w:themeShade="${e.underline.color.themeShade}"`)),t.push(`<w:u ${o.join(" ")}/>`);}e.effect&&e.effect!=="none"&&t.push(`<w:effect w:val="${e.effect}"/>`),e.emphasisMark&&e.emphasisMark!=="none"&&t.push(`<w:em w:val="${e.emphasisMark}"/>`);let r=Ko(e.shading);return r&&t.push(r),e.vertAlign&&e.vertAlign!=="baseline"&&t.push(`<w:vertAlign w:val="${e.vertAlign}"/>`),e.rtl&&t.push("<w:rtl/>"),e.cs&&t.push("<w:cs/>"),t.length===0?"":`<w:rPr>${t.join("")}</w:rPr>`}function Qo(e){return !e.startsWith("<w:rPr>")||!e.endsWith("</w:rPr>")?"":e.slice(7,-8)}function ei(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.info.date=="string"?e.info.date.trim():void 0,i=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,a=[`w:id="${t}"`,`w:author="${E(r)}"`];o&&a.push(`w:date="${E(o)}"`),i&&a.push(`w:rsid="${E(i)}"`);let s=pe(e.previousFormatting)||"<w:rPr/>";return `<w:rPrChange ${a.join(" ")}>${s}</w:rPrChange>`}function ti(e,t){let n=pe(e),r=n?Qo(n):"",o=(t??[]).map(ei).join(""),i=`${r}${o}`;return i?`<w:rPr>${i}</w:rPr>`:""}function ni(e){return `<w:t${e.preserveSpace||e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${E(e.text)}</w:t>`}function ri(e){return "<w:tab/>"}function oi(e){let t=[];return e.breakType==="page"?t.push('w:type="page"'):e.breakType==="column"?t.push('w:type="column"'):e.breakType==="textWrapping"&&(t.push('w:type="textWrapping"'),e.clear&&e.clear!=="none"&&t.push(`w:clear="${e.clear}"`)),t.length===0?"<w:br/>":`<w:br ${t.join(" ")}/>`}function ii(e){return `<w:sym w:font="${E(e.font)}" w:char="${E(e.char)}"/>`}function ai(e){return e.type==="footnoteRef"?`<w:footnoteReference w:id="${e.id}"/>`:`<w:endnoteReference w:id="${e.id}"/>`}function si(e){let t=[`w:fldCharType="${e.charType}"`];return e.fldLock&&t.push('w:fldLock="true"'),e.dirty&&t.push('w:dirty="true"'),`<w:fldChar ${t.join(" ")}/>`}function li(e){return `<w:instrText${e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${E(e.text)}</w:instrText>`}function ci(e){return "<w:softHyphen/>"}function ui(e){return "<w:noBreakHyphen/>"}function fi(e){switch(e.type){case "text":return ni(e);case "tab":return ri();case "break":return oi(e);case "symbol":return ii(e);case "footnoteRef":case "endnoteRef":return ai(e);case "fieldChar":return si(e);case "instrText":return li(e);case "softHyphen":return ci();case "noBreakHyphen":return ui();case "drawing":return ln(e);case "shape":return cn(e);default:return ""}}function re(e){let t=[],n=ti(e.formatting,e.propertyChanges);n&&t.push(n);for(let r of e.content){let o=fi(r);o&&t.push(o);}return `<w:r>${t.join("")}</w:r>`}function pi(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${F(e.size)}"`),e.space!==void 0&&n.push(`w:space="${F(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}var di=["top","left","bottom","right","between","bar"];function un(e){if(!e)return "";let t=[];for(let n of di){let r=pi(e[n],n);r&&t.push(r);}return t.length===0?"":`<w:pBdr>${t.join("")}</w:pBdr>`}function fn(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function pn(e){return !e||e.length===0?"":`<w:tabs>${e.map(n=>{let r=[`w:val="${n.alignment}"`,`w:pos="${F(n.position)}"`];return n.leader&&n.leader!=="none"&&r.push(`w:leader="${n.leader}"`),`<w:tab ${r.join(" ")}/>`}).join("")}</w:tabs>`}function dn(e){let t=[];return e.spaceBefore!==void 0&&t.push(`w:before="${F(e.spaceBefore)}"`),e.spaceAfter!==void 0&&t.push(`w:after="${F(e.spaceAfter)}"`),e.lineSpacing!==void 0&&t.push(`w:line="${F(e.lineSpacing)}"`),e.lineSpacingRule&&t.push(`w:lineRule="${e.lineSpacingRule}"`),e.beforeAutospacing&&t.push('w:beforeAutospacing="1"'),e.afterAutospacing&&t.push('w:afterAutospacing="1"'),t.length===0?"":`<w:spacing ${t.join(" ")}/>`}function mn(e){let t=[];return e.indentLeft!==void 0&&t.push(`w:left="${F(e.indentLeft)}"`),e.indentRight!==void 0&&t.push(`w:right="${F(e.indentRight)}"`),e.indentFirstLine!==void 0&&(e.hangingIndent?t.push(`w:hanging="${F(Math.abs(e.indentFirstLine))}"`):e.indentFirstLine!==0&&t.push(`w:firstLine="${F(e.indentFirstLine)}"`)),t.length===0?"":`<w:ind ${t.join(" ")}/>`}function gn(e){if(!e)return "";let t=[];return e.ilvl!==void 0&&t.push(`<w:ilvl w:val="${F(e.ilvl)}"/>`),e.numId!==void 0&&t.push(`<w:numId w:val="${F(e.numId)}"/>`),t.length===0?"":`<w:numPr>${t.join("")}</w:numPr>`}function hn(e){if(!e)return "";let t=[];return e.width!==void 0&&t.push(`w:w="${F(e.width)}"`),e.height!==void 0&&t.push(`w:h="${F(e.height)}"`),e.hAnchor&&t.push(`w:hAnchor="${e.hAnchor}"`),e.vAnchor&&t.push(`w:vAnchor="${e.vAnchor}"`),e.x!==void 0&&t.push(`w:x="${F(e.x)}"`),e.y!==void 0&&t.push(`w:y="${F(e.y)}"`),e.xAlign&&t.push(`w:xAlign="${e.xAlign}"`),e.yAlign&&t.push(`w:yAlign="${e.yAlign}"`),e.wrap&&t.push(`w:wrap="${e.wrap}"`),t.length===0?"":`<w:framePr ${t.join(" ")}/>`}function xn(e){let t=[`w:id="${e.id}"`,`w:name="${E(e.name)}"`];return e.colFirst!==void 0&&t.push(`w:colFirst="${e.colFirst}"`),e.colLast!==void 0&&t.push(`w:colLast="${e.colLast}"`),`<w:bookmarkStart ${t.join(" ")}/>`}function yn(e){return `<w:bookmarkEnd w:id="${e.id}"/>`}function bt(e){let t=[];e.rId&&t.push(`r:id="${e.rId}"`),e.anchor&&t.push(`w:anchor="${E(e.anchor)}"`),e.tooltip&&t.push(`w:tooltip="${E(e.tooltip)}"`),e.target&&t.push(`w:tgtFrame="${E(e.target)}"`),e.history===false&&t.push('w:history="0"'),e.docLocation&&t.push(`w:docLocation="${E(e.docLocation)}"`);let n=e.children.map(o=>o.type==="run"?re(o):o.type==="bookmarkStart"?xn(o):o.type==="bookmarkEnd"?yn(o):"").join("");return `<w:hyperlink${t.length>0?" "+t.join(" "):""}>${n}</w:hyperlink>`}function bn(e){let t=[],n=e.content.find(s=>s.type==="run"),r=n?.formatting?pe(n.formatting):"",o=['w:fldCharType="begin"'];e.fldLock&&o.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${o.join(" ")}/></w:r>`);let a=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${a}>${E(e.instruction)}</w:instrText></w:r>`),t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`);for(let s of e.content)s.type==="run"&&t.push(re(s));return t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function Tn(e){let t=[],n=e.fieldResult?.[0]?.formatting,r=n?pe(n):"",o=['w:fldCharType="begin"'];if(e.fldLock&&o.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${o.join(" ")}/></w:r>`),e.fieldCode.length>0)t.push(...e.fieldCode.map(i=>re(i)));else {let a=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${a}>${E(e.instruction)}</w:instrText></w:r>`);}return t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`),t.push(...e.fieldResult.map(i=>re(i))),t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function Cn(e){let t=e.properties,n=[];switch(t.alias&&n.push(`<w:alias w:val="${E(t.alias)}"/>`),t.tag&&n.push(`<w:tag w:val="${E(t.tag)}"/>`),t.lock&&t.lock!=="unlocked"&&n.push(`<w:lock w:val="${t.lock}"/>`),t.showingPlaceholder&&n.push("<w:showingPlcHdr/>"),t.sdtType){case "plainText":n.push("<w:text/>");break;case "date":t.dateFormat?n.push(`<w:date w:fullDate="${E(t.dateFormat)}"/>`):n.push("<w:date/>");break;case "dropdown":{let o=(t.listItems??[]).map(i=>`<w:listItem w:displayText="${E(i.displayText)}" w:value="${E(i.value)}"/>`).join("");n.push(`<w:dropDownList>${o}</w:dropDownList>`);break}case "comboBox":{let o=(t.listItems??[]).map(i=>`<w:listItem w:displayText="${E(i.displayText)}" w:value="${E(i.value)}"/>`).join("");n.push(`<w:comboBox>${o}</w:comboBox>`);break}case "checkbox":n.push(`<w14:checkbox><w14:checked w14:val="${t.checked?"1":"0"}"/></w14:checkbox>`);break;case "picture":n.push("<w:picture/>");break}let r=e.content.map(o=>{switch(o.type){case "run":return re(o);case "hyperlink":return bt(o);case "simpleField":return bn(o);case "complexField":return Tn(o);case "inlineSdt":return Cn(o);case "mathEquation":return o.ommlXml||"";default:return o}}).join("");return `<w:sdt><w:sdtPr>${n.join("")}</w:sdtPr><w:sdtContent>${r}</w:sdtContent></w:sdt>`}function wn(e,t){let n=[`w:id="${t.id}"`,`w:name="${E(t.name)}"`];return `<w:${e} ${n.join(" ")}/>`}function $e(e,t){let n=t.info,r=Number.isInteger(n.id)&&n.id>=0?n.id:0,o=typeof n.author=="string"?n.author.trim():"",i=o.length>0?o:"Unknown",a=typeof n.date=="string"?n.date.trim():void 0,s=[`w:id="${r}"`,`w:author="${E(i)}"`];a&&s.push(`w:date="${E(a)}"`);let c=t.content.map(f=>f.type==="run"?e==="del"||e==="moveFrom"?re(f).replace(/<w:t\b/g,"<w:delText").replace(/<\/w:t>/g,"</w:delText>").replace(/<w:instrText\b/g,"<w:delInstrText").replace(/<\/w:instrText>/g,"</w:delInstrText>"):re(f):f.type==="hyperlink"?bt(f):"").join("");return `<w:${e} ${s.join(" ")}>${c}</w:${e}>`}function Fn(e){switch(e.type){case "run":return re(e);case "hyperlink":return bt(e);case "bookmarkStart":return xn(e);case "bookmarkEnd":return yn(e);case "simpleField":return bn(e);case "complexField":return Tn(e);case "inlineSdt":return Cn(e);case "commentRangeStart":return `<w:commentRangeStart w:id="${e.id}"/>`;case "commentRangeEnd":return `<w:commentRangeEnd w:id="${e.id}"/><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="${e.id}"/></w:r>`;case "insertion":return $e("ins",e);case "deletion":return $e("del",e);case "moveFrom":return $e("moveFrom",e);case "moveTo":return $e("moveTo",e);case "moveFromRangeStart":return wn("moveFromRangeStart",e);case "moveFromRangeEnd":return `<w:moveFromRangeEnd w:id="${e.id}"/>`;case "moveToRangeStart":return wn("moveToRangeStart",e);case "moveToRangeEnd":return `<w:moveToRangeEnd w:id="${e.id}"/>`;case "mathEquation":return e.ommlXml||"";default:return ""}}function Pn(e,t){let n=[];if(e){e.styleId&&n.push(`<w:pStyle w:val="${E(e.styleId)}"/>`),e.keepNext&&n.push("<w:keepNext/>"),e.keepLines&&n.push("<w:keepLines/>"),e.contextualSpacing&&n.push("<w:contextualSpacing/>"),e.pageBreakBefore&&n.push("<w:pageBreakBefore/>");let r=hn(e.frame);r&&n.push(r),e.widowControl===false?n.push('<w:widowControl w:val="0"/>'):e.widowControl===true&&n.push("<w:widowControl/>");let o=gn(e.numPr);o&&n.push(o);let i=un(e.borders);i&&n.push(i);let a=fn(e.shading);a&&n.push(a);let s=pn(e.tabs);s&&n.push(s),e.suppressLineNumbers&&n.push("<w:suppressLineNumbers/>"),e.suppressAutoHyphens&&n.push("<w:suppressAutoHyphens/>");let c=dn(e);c&&n.push(c);let f=mn(e);if(f&&n.push(f),e.bidi&&n.push("<w:bidi/>"),e.alignment&&n.push(`<w:jc w:val="${e.alignment}"/>`),e.outlineLevel!==void 0&&n.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`),e.runProperties){let p=pe(e.runProperties);p&&n.push(p);}}return t&&t.length>0&&n.push(...t.map(r=>gi(r))),n.length===0?"":`<w:pPr>${n.join("")}</w:pPr>`}function mi(e){return !e.startsWith("<w:pPr>")||!e.endsWith("</w:pPr>")?"":e.slice(7,-8)}function gi(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.info.date=="string"?e.info.date.trim():void 0,i=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,a=[`w:id="${t}"`,`w:author="${E(r)}"`];o&&a.push(`w:date="${E(o)}"`),i&&a.push(`w:rsid="${E(i)}"`);let s=Pn(e.previousFormatting)||"<w:pPr/>",c=mi(s),f=c.length>0?`<w:pPr>${c}</w:pPr>`:"<w:pPr/>";return `<w:pPrChange ${a.join(" ")}>${f}</w:pPrChange>`}function le(e){let t=[],n=[];e.paraId&&n.push(`w14:paraId="${e.paraId}"`),e.textId&&n.push(`w14:textId="${e.textId}"`);let r=n.length>0?" "+n.join(" "):"",o=Pn(e.formatting,e.propertyChanges);o&&t.push(o);let i=!!e.renderedPageBreakBefore;for(let a of e.content){let s=Fn(a);if(s){if(i){let c=hi(s);c&&(s=c,i=false);}t.push(s);}}return `<w:p${r}>${t.join("")}</w:p>`}function hi(e){let t=/<w:r(?=[\s>/])[^>]*>/;return t.test(e)?e.replace(t,n=>`${n}<w:lastRenderedPageBreak/>`):null}function wi(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"?e.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.date=="string"?e.date.trim():void 0;return {id:t,author:r,date:o}}function ue(e,t){let n=wi(e),r=[`w:id="${n.id}"`,`w:author="${E(n.author)}"`];return n.date&&r.push(`w:date="${E(n.date)}"`),t&&t.trim().length>0&&r.push(`w:rsid="${E(t.trim())}"`),r.join(" ")}function ce(e,t){if(!e)return "";let n=[`w:w="${F(e.value)}"`,`w:type="${e.type}"`];return `<w:${t} ${n.join(" ")}/>`}function we(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${F(e.size)}"`),e.space!==void 0&&n.push(`w:space="${F(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function Sn(e,t){if(!e)return "";let n=[];if(e.top){let r=we(e.top,"top");r&&n.push(r);}if(e.left){let r=we(e.left,"left");r&&n.push(r);}if(e.bottom){let r=we(e.bottom,"bottom");r&&n.push(r);}if(e.right){let r=we(e.right,"right");r&&n.push(r);}if(e.insideH){let r=we(e.insideH,"insideH");r&&n.push(r);}if(e.insideV){let r=we(e.insideV,"insideV");r&&n.push(r);}return n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function kn(e,t){if(!e)return "";let n=[];return e.top&&n.push(ce(e.top,"top")),e.left&&n.push(ce(e.left,"left")),e.bottom&&n.push(ce(e.bottom,"bottom")),e.right&&n.push(ce(e.right,"right")),n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function vn(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function xi(e){if(!e)return "";let t=[];return e.firstRow&&t.push('w:firstRow="1"'),e.lastRow&&t.push('w:lastRow="1"'),e.firstColumn&&t.push('w:firstColumn="1"'),e.lastColumn&&t.push('w:lastColumn="1"'),e.noHBand&&t.push('w:noHBand="1"'),e.noVBand&&t.push('w:noVBand="1"'),t.length===0?"":`<w:tblLook ${t.join(" ")}/>`}function yi(e){if(!e)return "";let t=[];return e.horzAnchor&&t.push(`w:horzAnchor="${e.horzAnchor}"`),e.vertAnchor&&t.push(`w:vertAnchor="${e.vertAnchor}"`),e.tblpX!==void 0&&t.push(`w:tblpX="${F(e.tblpX)}"`),e.tblpXSpec&&t.push(`w:tblpXSpec="${e.tblpXSpec}"`),e.tblpY!==void 0&&t.push(`w:tblpY="${F(e.tblpY)}"`),e.tblpYSpec&&t.push(`w:tblpYSpec="${e.tblpYSpec}"`),e.topFromText!==void 0&&t.push(`w:topFromText="${F(e.topFromText)}"`),e.bottomFromText!==void 0&&t.push(`w:bottomFromText="${F(e.bottomFromText)}"`),e.leftFromText!==void 0&&t.push(`w:leftFromText="${F(e.leftFromText)}"`),e.rightFromText!==void 0&&t.push(`w:rightFromText="${F(e.rightFromText)}"`),t.length===0?"":`<w:tblpPr ${t.join(" ")}/>`}function Rn(e,t){let n=[];if(e){e.styleId&&n.push(`<w:tblStyle w:val="${E(e.styleId)}"/>`);let r=yi(e.floating);r&&n.push(r),e.bidi&&n.push("<w:bidiVisual/>");let o=ce(e.width,"tblW");o&&n.push(o),e.justification&&n.push(`<w:jc w:val="${e.justification}"/>`);let i=ce(e.cellSpacing,"tblCellSpacing");i&&n.push(i);let a=ce(e.indent,"tblInd");a&&n.push(a);let s=Sn(e.borders,"tblBorders");s&&n.push(s);let c=kn(e.cellMargins,"tblCellMar");c&&n.push(c),e.layout&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);let f=vn(e.shading);f&&n.push(f);let p=xi(e.look);p&&n.push(p),e.overlap&&n.push(`<w:tblOverlap w:val="${e.overlap}"/>`);}return t&&t.length>0&&n.push(...t.map(r=>Ti(r))),n.length===0?"":`<w:tblPr>${n.join("")}</w:tblPr>`}function bi(e){return !e.startsWith("<w:tblPr>")||!e.endsWith("</w:tblPr>")?"":e.slice(9,-10)}function Ti(e){let t=ue(e.info,e.info.rsid),n=Rn(e.previousFormatting)||"<w:tblPr/>",r=bi(n),o=r.length>0?`<w:tblPr>${r}</w:tblPr>`:"<w:tblPr/>";return `<w:tblPrChange ${t}>${o}</w:tblPrChange>`}function In(e,t,n){let r=[];if(e){if(e.cantSplit&&r.push("<w:cantSplit/>"),e.header&&r.push("<w:tblHeader/>"),e.height){let o=[`w:val="${F(e.height.value)}"`];e.heightRule&&o.push(`w:hRule="${e.heightRule}"`),r.push(`<w:trHeight ${o.join(" ")}/>`);}e.justification&&r.push(`<w:jc w:val="${e.justification}"/>`),e.hidden&&r.push("<w:hidden/>");}return n&&(n.type==="tableRowInsertion"?r.push(`<w:ins ${ue(n.info)}/>`):n.type==="tableRowDeletion"&&r.push(`<w:del ${ue(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(o=>Fi(o))),r.length===0?"":`<w:trPr>${r.join("")}</w:trPr>`}function Ci(e){return !e.startsWith("<w:trPr>")||!e.endsWith("</w:trPr>")?"":e.slice(8,-9)}function Fi(e){let t=ue(e.info,e.info.rsid),n=In(e.previousFormatting)||"<w:trPr/>",r=Ci(n),o=r.length>0?`<w:trPr>${r}</w:trPr>`:"<w:trPr/>";return `<w:trPrChange ${t}>${o}</w:trPrChange>`}function Pi(e){if(!e)return "";let n=[e.firstRow?"1":"0",e.lastRow?"1":"0",e.firstColumn?"1":"0",e.lastColumn?"1":"0",e.oddVBand?"1":"0",e.evenVBand?"1":"0",e.oddHBand?"1":"0",e.evenHBand?"1":"0",e.nwCell?"1":"0",e.neCell?"1":"0",e.swCell?"1":"0",e.seCell?"1":"0"].join("");return n==="000000000000"?"":`<w:cnfStyle w:val="${n}"/>`}function En(e,t,n){let r=[];if(e){let o=Pi(e.conditionalFormat);o&&r.push(o);let i=ce(e.width,"tcW");i&&r.push(i),e.gridSpan&&e.gridSpan>1&&r.push(`<w:gridSpan w:val="${F(e.gridSpan)}"/>`),e.vMerge&&(e.vMerge==="restart"?r.push('<w:vMerge w:val="restart"/>'):r.push("<w:vMerge/>"));let a=Sn(e.borders,"tcBorders");a&&r.push(a);let s=vn(e.shading);s&&r.push(s),e.noWrap&&r.push("<w:noWrap/>");let c=kn(e.margins,"tcMar");c&&r.push(c),e.textDirection&&r.push(`<w:textDirection w:val="${e.textDirection}"/>`),e.fitText&&r.push("<w:tcFitText/>"),e.verticalAlign&&r.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.hideMark&&r.push("<w:hideMark/>");}return n&&(n.type==="tableCellInsertion"?r.push(`<w:cellIns ${ue(n.info)}/>`):n.type==="tableCellDeletion"?r.push(`<w:cellDel ${ue(n.info)}/>`):n.type==="tableCellMerge"&&r.push(`<w:cellMerge ${ue(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(o=>ki(o))),r.length===0?"":`<w:tcPr>${r.join("")}</w:tcPr>`}function Si(e){return !e.startsWith("<w:tcPr>")||!e.endsWith("</w:tcPr>")?"":e.slice(8,-9)}function ki(e){let t=ue(e.info,e.info.rsid),n=En(e.previousFormatting)||"<w:tcPr/>",r=Si(n),o=r.length>0?`<w:tcPr>${r}</w:tcPr>`:"<w:tcPr/>";return `<w:tcPrChange ${t}>${o}</w:tcPrChange>`}function vi(e){return !e||e.length===0?"":`<w:tblGrid>${e.map(n=>`<w:gridCol w:w="${F(n)}"/>`).join("")}</w:tblGrid>`}function Ri(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(le(n)):n.type==="table"&&t.push(Se(n));return t.length===0&&t.push("<w:p/>"),t.join("")}function Ii(e){let t=[],n=En(e.formatting,e.propertyChanges,e.structuralChange);return n&&t.push(n),t.push(Ri(e.content)),`<w:tc>${t.join("")}</w:tc>`}function Ei(e){let t=[],n=In(e.formatting,e.propertyChanges,e.structuralChange);n&&t.push(n);for(let r of e.cells)t.push(Ii(r));return `<w:tr>${t.join("")}</w:tr>`}function Se(e){let t=[],n=Rn(e.formatting,e.propertyChanges);n&&t.push(n);let r=vi(e.columnWidths);r&&t.push(r);for(let o of e.rows)t.push(Ei(o));return `<w:tbl>${t.join("")}</w:tbl>`}var U={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function Ai(){let e={wpc:U.wpc,mc:U.mc,o:U.o,r:U.r,m:U.m,v:U.v,wp14:U.wp14,wp:U.wp,w10:U.w10,w:U.w,w14:U.w14,w15:U.w15,wpg:U.wpg,wps:U.wps};return Object.entries(e).map(([t,n])=>`xmlns:${t}="${n}"`).join(" ")}function De(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${F(e.size)}"`),e.space!==void 0&&n.push(`w:space="${F(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function Mi(e){return `<w:headerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function Bi(e){return `<w:footerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function $i(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:footnotePr>${t.join("")}</w:footnotePr>`}function Di(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:endnotePr>${t.join("")}</w:endnotePr>`}function Ni(e){let t=[];return e.pageWidth!==void 0&&t.push(`w:w="${F(e.pageWidth)}"`),e.pageHeight!==void 0&&t.push(`w:h="${F(e.pageHeight)}"`),e.orientation==="landscape"&&t.push('w:orient="landscape"'),t.length===0?"":`<w:pgSz ${t.join(" ")}/>`}function Li(e){let t=[];return e.marginTop!==void 0&&t.push(`w:top="${F(e.marginTop)}"`),e.marginRight!==void 0&&t.push(`w:right="${F(e.marginRight)}"`),e.marginBottom!==void 0&&t.push(`w:bottom="${F(e.marginBottom)}"`),e.marginLeft!==void 0&&t.push(`w:left="${F(e.marginLeft)}"`),e.headerDistance!==void 0&&t.push(`w:header="${F(e.headerDistance)}"`),e.footerDistance!==void 0&&t.push(`w:footer="${F(e.footerDistance)}"`),e.gutter!==void 0&&t.push(`w:gutter="${F(e.gutter)}"`),t.length===0?"":`<w:pgMar ${t.join(" ")}/>`}function Hi(e){if(!e.columnCount&&!e.columns?.length)return "";let t=[];e.columnCount!==void 0&&e.columnCount>1&&t.push(`w:num="${F(e.columnCount)}"`),e.columnSpace!==void 0&&t.push(`w:space="${F(e.columnSpace)}"`),e.equalWidth!==void 0&&t.push(`w:equalWidth="${e.equalWidth?"1":"0"}"`),e.separator&&t.push('w:sep="1"');let n="";return e.columns&&e.columns.length>0&&(n=e.columns.map(o=>{let i=[];return o.width!==void 0&&i.push(`w:w="${F(o.width)}"`),o.space!==void 0&&i.push(`w:space="${F(o.space)}"`),`<w:col ${i.join(" ")}/>`}).join("")),t.length===0&&!n?"":`<w:cols${t.length>0?" "+t.join(" "):""}>${n}</w:cols>`}function Xi(e){if(!e.lineNumbers)return "";let t=e.lineNumbers,n=[];return t.countBy!==void 0&&n.push(`w:countBy="${F(t.countBy)}"`),t.start!==void 0&&n.push(`w:start="${F(t.start)}"`),t.distance!==void 0&&n.push(`w:distance="${F(t.distance)}"`),t.restart&&n.push(`w:restart="${t.restart}"`),n.length===0?"":`<w:lnNumType ${n.join(" ")}/>`}function Oi(e){if(!e.pageBorders)return "";let t=e.pageBorders,n=[],r=[];if(t.display&&n.push(`w:display="${t.display}"`),t.offsetFrom&&n.push(`w:offsetFrom="${t.offsetFrom}"`),t.zOrder&&n.push(`w:zOrder="${t.zOrder}"`),t.top){let i=De(t.top,"top");i&&r.push(i);}if(t.left){let i=De(t.left,"left");i&&r.push(i);}if(t.bottom){let i=De(t.bottom,"bottom");i&&r.push(i);}if(t.right){let i=De(t.right,"right");i&&r.push(i);}return r.length===0?"":`<w:pgBorders${n.length>0?" "+n.join(" "):""}>${r.join("")}</w:pgBorders>`}function zi(e){if(!e.docGrid)return "";let t=e.docGrid,n=[];return t.type&&n.push(`w:type="${t.type}"`),t.linePitch!==void 0&&n.push(`w:linePitch="${t.linePitch}"`),t.charSpace!==void 0&&n.push(`w:charSpace="${t.charSpace}"`),n.length===0?"":`<w:docGrid ${n.join(" ")}/>`}function An(e){if(!e)return "";let t=[];if(e.headerReferences)for(let p of e.headerReferences)t.push(Mi(p));if(e.footerReferences)for(let p of e.footerReferences)t.push(Bi(p));let n=$i(e.footnotePr);n&&t.push(n);let r=Di(e.endnotePr);r&&t.push(r),e.sectionStart&&t.push(`<w:type w:val="${e.sectionStart}"/>`);let o=Ni(e);o&&t.push(o);let i=Li(e);if(i&&t.push(i),e.paperSrcFirst!==void 0||e.paperSrcOther!==void 0){let p=[];e.paperSrcFirst!==void 0&&p.push(`w:first="${e.paperSrcFirst}"`),e.paperSrcOther!==void 0&&p.push(`w:other="${e.paperSrcOther}"`),t.push(`<w:paperSrc ${p.join(" ")}/>`);}let a=Oi(e);a&&t.push(a);let s=Xi(e);s&&t.push(s);let c=Hi(e);c&&t.push(c);let f=zi(e);return f&&t.push(f),e.verticalAlign&&t.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.bidi&&t.push("<w:bidi/>"),e.titlePg&&t.push("<w:titlePg/>"),e.evenAndOddHeaders&&t.push("<w:evenAndOddHeaders/>"),t.length===0?"":`<w:sectPr>${t.join("")}</w:sectPr>`}function Mn(e){if(e.type==="paragraph")return le(e);if(e.type==="table")return Se(e);if(e.type==="blockSdt"){let t=e.content.map(o=>Mn(o)).join(""),n=e.properties,r=[];return n.alias&&r.push(`<w:alias w:val="${n.alias}"/>`),n.tag&&r.push(`<w:tag w:val="${n.tag}"/>`),`<w:sdt><w:sdtPr>${r.join("")}</w:sdtPr><w:sdtContent>${t}</w:sdtContent></w:sdt>`}return ""}function ji(e){return e.map(t=>Mn(t)).join("")}function Bn(e){let t=[];return t.push(ji(e.content)),e.finalSectionProperties&&t.push(An(e.finalSectionProperties)),t.join("")}function ke(e){yt();let t=[];t.push('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>');let n=Ai();return t.push(`<w:document ${n} mc:Ignorable="w14 w15 wp14">`),t.push("<w:body>"),t.push(Bn(e.package.document)),t.push("</w:body>"),t.push("</w:document>"),t.join("")}function G(e){return xmlJs.xml2js(e,{compact:false,ignoreComment:true,ignoreInstruction:true,ignoreDoctype:true,alwaysArray:false,trim:false,captureSpacesBetweenElements:true,attributesKey:"attributes",textKey:"text"})}function $n(e){return xmlJs.js2xml({elements:[e]},{compact:false,spaces:0})}function oe(e){try{let t=G(e);return t.elements&&t.elements.length>0?t.elements.find(n=>n.type==="element")??null:t}catch(t){return console.warn("Failed to parse XML:",t),null}}function q(e){let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function Wi(e,t,n){if(!e.name)return false;let r=`${t}:${n}`;return e.name===r||q(e.name)===n}function u(e,t,n){if(!e||!e.elements)return null;let r=`${t}:${n}`;for(let o of e.elements)if(o.type==="element"&&(o.name===r||q(o.name||"")===n))return o;return null}function H(e,t,n){if(!e||!e.elements)return [];let r=`${t}:${n}`,o=[];for(let i of e.elements)i.type==="element"&&(i.name===r||q(i.name||"")===n)&&o.push(i);return o}function N(e,t){if(!e||!e.elements)return null;for(let n of e.elements)if(n.type==="element"&&n.name===t)return n;return null}function D(e){return !e||!e.elements?[]:e.elements.filter(t=>t.type==="element")}function l(e,t,n){if(!e||!e.attributes)return null;let r=e.attributes;if(t){let o=`${t}:${n}`;if(o in r)return r[o]}return n in r?r[n]:null}function ie(e){if(!e)return "";if("text"in e&&typeof e.text=="string")return e.text;if(!e.elements)return "";let t="";for(let n of e.elements)n.type==="text"&&"text"in n?t+=n.text??"":n.type==="element"&&(t+=ie(n));return t}function h(e,t,n,r=1){let o=l(e,t,n);if(o===null)return;let i=parseInt(o,10);if(!isNaN(i))return i*r}function k(e,t="w"){if(!e)return false;let n=l(e,t,"val");return n===null?true:!(n==="0"||n==="false"||n==="off")}function Tt(e,t,n){if(!e)return null;if(Wi(e,t,n))return e;if(e.elements)for(let r of e.elements){if(r.type!=="element")continue;let o=Tt(r,t,n);if(o)return o}return null}var j={image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",commentsIds:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",commentsExtensible:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"};function Ne(e){let t=new Map;if(!e||e.trim().length===0)return t;let n=oe(e);if(!n)return console.warn("Failed to parse relationships XML"),t;let r=D(n);for(let o of r){let i=o.name||"";if(!i.endsWith("Relationship")&&!i.includes(":Relationship"))continue;let a=l(o,null,"Id"),s=l(o,null,"Type"),c=l(o,null,"Target"),f=l(o,null,"TargetMode");if(!a||!s||!c){console.warn("Relationship missing required attributes:",{id:a,type:s,target:c});continue}let p={id:a,type:s,target:c};f==="External"?p.targetMode="External":f==="Internal"&&(p.targetMode="Internal"),t.set(a,p);}return t}function Ct(e,t){return e.get(t)?.target}var Ui=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
2
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;function Ft(e){return e.startsWith("/")?e.slice(1):`word/${e}`}function Nn(e){let t=[{relsPath:"word/_rels/document.xml.rels",blocks:e.package.document.content}],n=e.package.relationships;if(!n)return t;let r=(o,i)=>{if(o)for(let[a,s]of o.entries()){let c=n.get(a);if(!c||c.type!==i||!c.target)continue;let p=Ft(c.target).replace(/^word\//,"");t.push({relsPath:`word/_rels/${p}.rels`,blocks:s.content});}};return r(e.package.headers,j.header),r(e.package.footers,j.footer),t}async function xe(e,t){let n=e.file(t);return (n?await n.async("text"):Ui).replace(/<Relationships([^>]*)\/>/,"<Relationships$1></Relationships>")}function te(e){let t=0;for(let n of e.matchAll(/Id="rId(\d+)"/g)){let r=parseInt(n[1],10);r>t&&(t=r);}return t}function Ln(e,t){return {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"}[e]||"application/octet-stream"}function Hn(e){let t=[];for(let n of e)if(n.type==="paragraph"){for(let r of n.content)if(r.type==="run")for(let o of r.content)o.type==="drawing"&&o.image.src?.startsWith("data:")&&t.push(o.image);}else if(n.type==="table")for(let r of n.rows)for(let o of r.cells)t.push(...Hn(o.content));return t}var Gi={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function Zi(e){let t=e.match(/^data:([^;]+);base64,(.+)$/);if(!t)throw new Error("Invalid data URL");let n=atob(t[2]),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return {data:r.buffer,extension:Gi[t[1]]||"png"}}async function qi(e,t,n){if(t.size===0)return;let r=e.file("[Content_Types].xml");if(!r)return;let o=await r.async("text"),i=false;for(let a of t)if(!o.includes(`Extension="${a}"`)){let s=Ln(a);o=o.replace("</Types>",`<Default Extension="${a}" ContentType="${s}"/></Types>`),i=true;}i&&e.file("[Content_Types].xml",o,{compression:"DEFLATE",compressionOptions:{level:n}});}function Yi(e){let t=0;return e.forEach(n=>{let r=n.match(/^word\/media\/image(\d+)\./);if(r){let o=parseInt(r[1],10);o>t&&(t=o);}}),t}async function Xn(e,t,n){let r=Yi(t),o=new Set;for(let{relsPath:i,blocks:a}of e){let s=Hn(a);if(s.length===0)continue;let c=await xe(t,i),f=te(c),p=[];for(let g of s){let{data:b,extension:d}=Zi(g.src);r++,f++;let y=`image${r}.${d}`,T=`rId${f}`;t.file(`word/media/${y}`,b,{compression:"DEFLATE",compressionOptions:{level:n}}),p.push(`<Relationship Id="${T}" Type="${j.image}" Target="media/${y}"/>`),o.add(d),g.rId=T;}let m=c.replace("</Relationships>",p.join("")+"</Relationships>");t.file(i,m,{compression:"DEFLATE",compressionOptions:{level:n}});}await qi(t,o,n);}function On(e){let t=[];for(let n of e)if(n.type==="paragraph")for(let r of n.content)r.type==="hyperlink"&&r.href&&!r.rId&&!r.anchor&&t.push(r);else if(n.type==="table")for(let r of n.rows)for(let o of r.cells)t.push(...On(o.content));return t}async function zn(e,t,n){for(let{relsPath:r,blocks:o}of e){let i=On(o);if(i.length===0)continue;let a=await xe(t,r),s=te(a),c=[];for(let p of i){s++;let m=`rId${s}`;c.push(`<Relationship Id="${m}" Type="${j.hyperlink}" Target="${E(p.href)}" TargetMode="External"/>`),p.rId=m;}let f=a.replace("</Relationships>",c.join("")+"</Relationships>");t.file(r,f,{compression:"DEFLATE",compressionOptions:{level:n}});}}var Ji={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function Ki(){return Object.entries(Ji).map(([e,t])=>`xmlns:${e}="${t}"`).join(" ")}function Qi(e){return e.type==="paragraph"?le(e):e.type==="table"?Se(e):""}function jn(e){let t=e.type==="header"?"w:hdr":"w:ftr",n=Ki(),r=e.content.map(o=>Qi(o)).join("");return r||(r="<w:p><w:pPr/></w:p>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
- <${t} ${n}>${r}</${t}>`}function Pt(){return Math.floor(Math.random()*4294967296).toString(16).toUpperCase().padStart(8,"0")}var Le='xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"',He='mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"';function Un(e){let t="<w:r>",n=[];e.formatting?.bold&&n.push("<w:b/>"),e.formatting?.italic&&n.push("<w:i/>"),n.length>0&&(t+=`<w:rPr>${n.join("")}</w:rPr>`);for(let r of e.content)if(r.type==="text"){let o=r.text!==r.text.trim()||r.text.includes(" ");t+=o?`<w:t xml:space="preserve">${E(r.text)}</w:t>`:`<w:t>${E(r.text)}</w:t>`;}else r.type==="break"&&(t+="<w:br/>");return t+="</w:r>",t}function Vn(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";for(let r of e.content)r.type==="run"&&(n+=Un(r));return n+="</w:p>",n}function _n(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";n+='<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r>';for(let r of e.content)r.type==="run"&&(n+=Un(r));return n+="</w:p>",n}function Wn(e,t){let n=Pt(),r=[`w:id="${e.id}"`];if(e.author&&r.push(`w:author="${E(e.author)}"`),e.initials?r.push(`w:initials="${E(e.initials)}"`):r.push('w:initials=""'),e.date){let i=e.date.replace(/\.\d{3}Z$/,"Z");r.push(`w:date="${E(i)}"`);}let o=`<w:comment ${r.join(" ")}>`;if(e.content&&e.content.length>0)if(e.content.length===1)o+=_n(e.content[0],n);else {o+=_n(e.content[0]);for(let i=1;i<e.content.length-1;i++)o+=Vn(e.content[i]);o+=Vn(e.content[e.content.length-1],n);}else o+=`<w:p w14:paraId="${n}"><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>`;return o+="</w:comment>",t.push({commentId:e.id,lastParaId:n,durableId:Pt(),parentId:e.parentId,done:e.done}),o}function Xe(e){if(!e||e.length===0)return {xml:"",paraInfos:[]};let t=[],n=[];for(let i of e)(i.parentId==null?t:n).push(i);let r=[],o=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${Le} ${He}>`;for(let i of t)o+=Wn(i,r);for(let i of n)o+=Wn(i,r);return o+="</w:comments>",{xml:o,paraInfos:r}}function Oe(e){if(e.length===0)return "";let t=new Map;for(let r of e)t.set(r.commentId,r.lastParaId);let n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${Le} ${He}>`;for(let r of e){let o=`w15:paraId="${r.lastParaId}" w15:done="${r.done?"1":"0"}"`;if(r.parentId!=null){let i=t.get(r.parentId);i&&(o+=` w15:paraIdParent="${i}"`);}n+=`<w15:commentEx ${o} />`;}return n+="</w15:commentsEx>",n}function ze(e){if(e.length===0)return "";let t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cid:commentsIds ${Le} ${He}>`;for(let n of e)t+=`<w16cid:commentId w16cid:paraId="${n.lastParaId}" w16cid:durableId="${n.durableId}" />`;return t+="</w16cid:commentsIds>",t}function je(e,t){if(e.length===0)return "";let n=new Map;for(let o of t)n.set(o.id,o);let r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cex:commentsExtensible ${Le} ${He}>`;for(let o of e){let i=n.get(o.commentId);if(!i?.date)continue;let a=o.durableId,s=(i.date.endsWith("Z")?i.date:i.date+"Z").replace(/\.\d{3}Z$/,"Z");r+=`<w16cex:commentExtensible w16cex:durableId="${a}" w16cex:dateUtc="${s}"/>`;}return r+="</w16cex:commentsExtensible>",r}var ea="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",ta="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",Ve="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",_e="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",We="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",Ue="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function Gn(e,t,n){let r=e.package.relationships;if(!r)return;let o=[];for(let[f,p]of r){if(!p.target)continue;let m=p.type===j.header?ea:p.type===j.footer?ta:null;m&&o.push({rId:f,target:p.target.replace(/^(\/?word\/)/,""),contentType:m,relType:p.type});}if(o.length===0)return;let i=t.file("[Content_Types].xml");if(i){let f=await i.async("text"),p=false;for(let{target:m,contentType:g}of o){let b=`/word/${m}`;f.includes(`PartName="${b}"`)||(f=f.replace("</Types>",`<Override PartName="${b}" ContentType="${g}"/></Types>`),p=true);}p&&t.file("[Content_Types].xml",f,{compression:"DEFLATE",compressionOptions:{level:n}});}let a="word/_rels/document.xml.rels",s=await xe(t,a),c=false;for(let{rId:f,relType:p,target:m}of o)s.includes(`Id="${f}"`)||(s=s.replace("</Relationships>",`<Relationship Id="${f}" Type="${p}" Target="${m}"/></Relationships>`),c=true);c&&t.file(a,s,{compression:"DEFLATE",compressionOptions:{level:n}});}async function na(e,t){let n=[{partName:"/word/comments.xml",contentType:Ve,target:"comments.xml",relType:j.comments},{partName:"/word/commentsExtended.xml",contentType:_e,target:"commentsExtended.xml",relType:j.commentsExtended},{partName:"/word/commentsIds.xml",contentType:We,target:"commentsIds.xml",relType:j.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:Ue,target:"commentsExtensible.xml",relType:j.commentsExtensible}],r=e.file("[Content_Types].xml");if(r){let a=await r.async("text"),s=false;for(let{partName:c,contentType:f}of n)a.includes(c)||(a=a.replace("</Types>",`<Override PartName="${c}" ContentType="${f}"/></Types>`),s=true);s&&e.file("[Content_Types].xml",a,{compression:"DEFLATE",compressionOptions:{level:t}});}let o="word/_rels/document.xml.rels",i=e.file(o);if(i){let a=await i.async("text"),s=false;for(let{target:c,relType:f}of n)if(!a.includes(c)){let p=`rId${te(a)+1}`;a=a.replace("</Relationships>",`<Relationship Id="${p}" Type="${f}" Target="${c}"/></Relationships>`),s=true;}s&&e.file(o,a,{compression:"DEFLATE",compressionOptions:{level:t}});}}async function Zn(e,t,n){let r=e.package.document.comments;if(!r||r.length===0)return;let{xml:o,paraInfos:i}=Xe(r);t.file("word/comments.xml",o,{compression:"DEFLATE",compressionOptions:{level:n}});let a=Oe(i);a&&t.file("word/commentsExtended.xml",a,{compression:"DEFLATE",compressionOptions:{level:n}});let s=ze(i);s&&t.file("word/commentsIds.xml",s,{compression:"DEFLATE",compressionOptions:{level:n}});let c=je(i,r);c&&t.file("word/commentsExtensible.xml",c,{compression:"DEFLATE",compressionOptions:{level:n}}),await na(t,n);}function Ge(e){let t=new Map,n=e.package.relationships;if(!n)return t;let r=[{map:e.package.headers,type:j.header},{map:e.package.footers,type:j.footer}];for(let{map:o,type:i}of r)if(o)for(let[a,s]of o.entries()){let c=n.get(a);c&&c.type===i&&c.target&&t.set(Ft(c.target),jn(s));}return t}function qn(e,t,n){let r={level:n};for(let[o,i]of Ge(e))t.file(o,i,{compression:"DEFLATE",compressionOptions:r});}async function Yn(){let e=new St__default.default;e.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
+ <${t} ${n}>${r}</${t}>`}function Pt(){return Math.floor(Math.random()*2147483647).toString(16).toUpperCase().padStart(8,"0")}var Le='xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"',He='mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"';function Un(e){let t="<w:r>",n=[];e.formatting?.bold&&n.push("<w:b/>"),e.formatting?.italic&&n.push("<w:i/>"),n.length>0&&(t+=`<w:rPr>${n.join("")}</w:rPr>`);for(let r of e.content)if(r.type==="text"){let o=r.text!==r.text.trim()||r.text.includes(" ");t+=o?`<w:t xml:space="preserve">${E(r.text)}</w:t>`:`<w:t>${E(r.text)}</w:t>`;}else r.type==="break"&&(t+="<w:br/>");return t+="</w:r>",t}function Vn(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";for(let r of e.content)r.type==="run"&&(n+=Un(r));return n+="</w:p>",n}function _n(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";n+='<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r>';for(let r of e.content)r.type==="run"&&(n+=Un(r));return n+="</w:p>",n}function Wn(e,t){let n=Pt(),r=[`w:id="${e.id}"`];if(e.author&&r.push(`w:author="${E(e.author)}"`),e.initials?r.push(`w:initials="${E(e.initials)}"`):r.push('w:initials=""'),e.date){let i=e.date.replace(/\.\d{3}Z$/,"Z");r.push(`w:date="${E(i)}"`);}let o=`<w:comment ${r.join(" ")}>`;if(e.content&&e.content.length>0)if(e.content.length===1)o+=_n(e.content[0],n);else {o+=_n(e.content[0]);for(let i=1;i<e.content.length-1;i++)o+=Vn(e.content[i]);o+=Vn(e.content[e.content.length-1],n);}else o+=`<w:p w14:paraId="${n}"><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>`;return o+="</w:comment>",t.push({commentId:e.id,lastParaId:n,durableId:Pt(),parentId:e.parentId,done:e.done}),o}function Xe(e){if(!e||e.length===0)return {xml:"",paraInfos:[]};let t=[],n=[];for(let i of e)(i.parentId==null?t:n).push(i);let r=[],o=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${Le} ${He}>`;for(let i of t)o+=Wn(i,r);for(let i of n)o+=Wn(i,r);return o+="</w:comments>",{xml:o,paraInfos:r}}function Oe(e){if(e.length===0)return "";let t=new Map;for(let r of e)t.set(r.commentId,r.lastParaId);let n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${Le} ${He}>`;for(let r of e){let o=`w15:paraId="${r.lastParaId}" w15:done="${r.done?"1":"0"}"`;if(r.parentId!=null){let i=t.get(r.parentId);i&&(o+=` w15:paraIdParent="${i}"`);}n+=`<w15:commentEx ${o} />`;}return n+="</w15:commentsEx>",n}function ze(e){if(e.length===0)return "";let t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cid:commentsIds ${Le} ${He}>`;for(let n of e)t+=`<w16cid:commentId w16cid:paraId="${n.lastParaId}" w16cid:durableId="${n.durableId}" />`;return t+="</w16cid:commentsIds>",t}function je(e,t){if(e.length===0)return "";let n=new Map;for(let o of t)n.set(o.id,o);let r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cex:commentsExtensible ${Le} ${He}>`;for(let o of e){let i=n.get(o.commentId);if(!i?.date)continue;let a=o.durableId,s=(i.date.endsWith("Z")?i.date:i.date+"Z").replace(/\.\d{3}Z$/,"Z");r+=`<w16cex:commentExtensible w16cex:durableId="${a}" w16cex:dateUtc="${s}"/>`;}return r+="</w16cex:commentsExtensible>",r}var ea="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",ta="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",Ve="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",_e="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",We="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",Ue="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function Gn(e,t,n){let r=e.package.relationships;if(!r)return;let o=[];for(let[f,p]of r){if(!p.target)continue;let m=p.type===j.header?ea:p.type===j.footer?ta:null;m&&o.push({rId:f,target:p.target.replace(/^(\/?word\/)/,""),contentType:m,relType:p.type});}if(o.length===0)return;let i=t.file("[Content_Types].xml");if(i){let f=await i.async("text"),p=false;for(let{target:m,contentType:g}of o){let b=`/word/${m}`;f.includes(`PartName="${b}"`)||(f=f.replace("</Types>",`<Override PartName="${b}" ContentType="${g}"/></Types>`),p=true);}p&&t.file("[Content_Types].xml",f,{compression:"DEFLATE",compressionOptions:{level:n}});}let a="word/_rels/document.xml.rels",s=await xe(t,a),c=false;for(let{rId:f,relType:p,target:m}of o)s.includes(`Id="${f}"`)||(s=s.replace("</Relationships>",`<Relationship Id="${f}" Type="${p}" Target="${m}"/></Relationships>`),c=true);c&&t.file(a,s,{compression:"DEFLATE",compressionOptions:{level:n}});}async function na(e,t){let n=[{partName:"/word/comments.xml",contentType:Ve,target:"comments.xml",relType:j.comments},{partName:"/word/commentsExtended.xml",contentType:_e,target:"commentsExtended.xml",relType:j.commentsExtended},{partName:"/word/commentsIds.xml",contentType:We,target:"commentsIds.xml",relType:j.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:Ue,target:"commentsExtensible.xml",relType:j.commentsExtensible}],r=e.file("[Content_Types].xml");if(r){let a=await r.async("text"),s=false;for(let{partName:c,contentType:f}of n)a.includes(c)||(a=a.replace("</Types>",`<Override PartName="${c}" ContentType="${f}"/></Types>`),s=true);s&&e.file("[Content_Types].xml",a,{compression:"DEFLATE",compressionOptions:{level:t}});}let o="word/_rels/document.xml.rels",i=e.file(o);if(i){let a=await i.async("text"),s=false;for(let{target:c,relType:f}of n)if(!a.includes(c)){let p=`rId${te(a)+1}`;a=a.replace("</Relationships>",`<Relationship Id="${p}" Type="${f}" Target="${c}"/></Relationships>`),s=true;}s&&e.file(o,a,{compression:"DEFLATE",compressionOptions:{level:t}});}}async function Zn(e,t,n){let r=e.package.document.comments;if(!r||r.length===0)return;let{xml:o,paraInfos:i}=Xe(r);t.file("word/comments.xml",o,{compression:"DEFLATE",compressionOptions:{level:n}});let a=Oe(i);a&&t.file("word/commentsExtended.xml",a,{compression:"DEFLATE",compressionOptions:{level:n}});let s=ze(i);s&&t.file("word/commentsIds.xml",s,{compression:"DEFLATE",compressionOptions:{level:n}});let c=je(i,r);c&&t.file("word/commentsExtensible.xml",c,{compression:"DEFLATE",compressionOptions:{level:n}}),await na(t,n);}function Ge(e){let t=new Map,n=e.package.relationships;if(!n)return t;let r=[{map:e.package.headers,type:j.header},{map:e.package.footers,type:j.footer}];for(let{map:o,type:i}of r)if(o)for(let[a,s]of o.entries()){let c=n.get(a);c&&c.type===i&&c.target&&t.set(Ft(c.target),jn(s));}return t}function qn(e,t,n){let r={level:n};for(let[o,i]of Ge(e))t.file(o,i,{compression:"DEFLATE",compressionOptions:r});}async function Yn(){let e=new St__default.default;e.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
4
4
  <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
5
5
  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
6
6
  <Default Extension="xml" ContentType="application/xml"/>
@@ -1 +1 @@
1
- 'use strict';var chunkTFIRB2ZB_js=require('./chunk-TFIRB2ZB.js'),chunkDQH7AV5E_js=require('./chunk-DQH7AV5E.js');function g(o,e){let{paragraphIndex:t,author:n="AI",text:s,search:a}=e,r=chunkTFIRB2ZB_js.b(o,t),i=(o.comments??[]).map(m=>m.id),p=i.length>0?Math.max(...i)+1:1,c={id:p,author:n,date:new Date().toISOString(),content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:s}]}],formatting:{}}]};if(o.comments||(o.comments=[]),o.comments.push(c),a){let m=chunkTFIRB2ZB_js.i(r,a,t);r.content.splice(m.endRunIndex+1,0,{type:"commentRangeEnd",id:p}),r.content.splice(m.startRunIndex,0,{type:"commentRangeStart",id:p});}else r.content.unshift({type:"commentRangeStart",id:p}),r.content.push({type:"commentRangeEnd",id:p});return p}function y(o,e,t){let n=o.comments??[];if(!n.find(p=>p.id===e))throw new chunkTFIRB2ZB_js.h(e);let a=n.map(p=>p.id),r=Math.max(...a)+1,i={id:r,author:t.author??"AI",date:new Date().toISOString(),parentId:e,content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:t.text}]}],formatting:{}}]};return n.push(i),r}function E(o,e){let t=o.comments??[],n=t.find(r=>r.id===e);if(!n)throw new chunkTFIRB2ZB_js.h(e);let s=n.parentId!==void 0,a=new Set([e]);if(!s)for(let r of t)r.parentId===e&&a.add(r.id);o.comments=t.filter(r=>!a.has(r.id)),!s&&chunkTFIRB2ZB_js.c(o,r=>{for(let i=r.content.length-1;i>=0;i--){let p=r.content[i];(p.type==="commentRangeStart"||p.type==="commentRangeEnd")&&p.id===e&&r.content.splice(i,1);}});}function C(o,e){if(!W(o,e,"accept"))throw new chunkTFIRB2ZB_js.g(e)}function I(o,e){if(!W(o,e,"reject"))throw new chunkTFIRB2ZB_js.g(e)}function k(o){return M(o,"accept")}function F(o){return M(o,"reject")}function M(o,e){let t=0;return chunkTFIRB2ZB_js.c(o,n=>{for(let s=n.content.length-1;s>=0;s--){let a=n.content[s];chunkTFIRB2ZB_js.a(a)&&(G(n,s,a,e),t++);}}),t}function W(o,e,t){let n=false;return chunkTFIRB2ZB_js.c(o,s=>{for(let a=s.content.length-1;a>=0;a--){let r=s.content[a];chunkTFIRB2ZB_js.a(r)&&r.info.id===e&&(G(s,a,r,t),n=true);}if(n)return false}),n}function G(o,e,t,n){if(t.type==="insertion"&&n==="accept"||t.type==="deletion"&&n==="reject"||t.type==="moveTo"&&n==="accept"||t.type==="moveFrom"&&n==="reject"){let a=t.content;o.content.splice(e,1,...a);}else o.content.splice(e,1);}function x(o,e){let{paragraphIndex:t,search:n,author:s="AI",replaceWith:a}=e,r=chunkTFIRB2ZB_js.b(o,t),{startIndex:i,endIndex:p}=chunkTFIRB2ZB_js.j(r,n,t),c=new Date().toISOString(),m=w(o),h=r.content.slice(i,p+1),R={type:"deletion",info:{id:m,author:s,date:c},content:h},v={type:"insertion",info:{id:m+1,author:s,date:c},content:[{type:"run",content:[{type:"text",text:a}]}]};r.content.splice(i,p-i+1,R,v);}function H(o,e){let{paragraphIndex:t,author:n="AI",insertText:s,position:a="after",search:r}=e,i=chunkTFIRB2ZB_js.b(o,t),p=new Date().toISOString(),m={type:"insertion",info:{id:w(o),author:n,date:p},content:[{type:"run",content:[{type:"text",text:s}]}]};if(r){let{startIndex:h,endIndex:R}=chunkTFIRB2ZB_js.j(i,r,t),v=a==="after"?R+1:h;i.content.splice(v,0,m);}else a==="before"?i.content.unshift(m):i.content.push(m);}function L(o,e){let{paragraphIndex:t,search:n,author:s="AI"}=e,a=chunkTFIRB2ZB_js.b(o,t),{startIndex:r,endIndex:i}=chunkTFIRB2ZB_js.j(a,n,t),p=new Date().toISOString(),c=w(o),m=a.content.slice(r,i+1),h={type:"deletion",info:{id:c,author:s,date:p},content:m};a.content.splice(r,i-r+1,h);}var S=new WeakMap;function w(o){let e=S.get(o);e===void 0&&(e=0,chunkTFIRB2ZB_js.c(o,n=>{for(let s of n.content)chunkTFIRB2ZB_js.a(s)&&(e=Math.max(e,s.info.id));}));let t=e+1;return S.set(o,t+1),t}function N(o,e,t="AI"){let n=[],s=0,a=0,r=0,i=0,p=0;for(let c of e.accept??[])try{C(o,c),s++;}catch(m){n.push({operation:"accept",id:c,error:m.message});}for(let c of e.reject??[])try{I(o,c),a++;}catch(m){n.push({operation:"reject",id:c,error:m.message});}for(let c of e.comments??[])try{g(o,{...c,author:c.author??t}),r++;}catch(m){n.push({operation:"comment",search:c.search,error:m.message});}for(let c of e.replies??[])try{y(o,c.commentId,{author:c.author??t,text:c.text}),i++;}catch(m){n.push({operation:"reply",id:c.commentId,error:m.message});}for(let c of e.proposals??[])try{x(o,{...c,author:c.author??t}),p++;}catch(m){n.push({operation:"proposal",search:c.search,error:m.message});}return {accepted:s,rejected:a,commentsAdded:r,repliesAdded:i,proposalsAdded:p,errors:n}}var U=class o{constructor(e,t="AI",n){let s=n??e.originalBuffer,{originalBuffer:a,...r}=e;this.doc=structuredClone(r),s&&(this.doc.originalBuffer=s),this.author=t;}static async fromBuffer(e,t="AI"){let n=await chunkDQH7AV5E_js.w(e,{preloadFonts:false});return new o(n,t,e)}get body(){return this.doc.package.document}resolveAuthor(e){return e??this.author}getContent(e){return chunkTFIRB2ZB_js.d(this.body,e)}getContentAsText(e){return chunkTFIRB2ZB_js.e(chunkTFIRB2ZB_js.d(this.body,e))}getChanges(e){return chunkTFIRB2ZB_js.k(this.body,e)}getComments(e){return chunkTFIRB2ZB_js.l(this.body,e)}addComment(e,t){let n=typeof e=="number"?{paragraphIndex:e,text:t,author:this.author}:{...e,author:this.resolveAuthor(e.author)};return g(this.body,n)}replyTo(e,t){let n=typeof t=="string"?{text:t,author:this.author}:{...t,author:this.resolveAuthor(t.author)};return y(this.body,e,n)}removeComment(e){E(this.body,e);}replace(e,t,n){let s=typeof e=="number"?{paragraphIndex:e,search:t,replaceWith:n,author:this.author}:{...e,author:this.resolveAuthor(e.author)};x(this.body,s);}proposeReplacement(e){this.replace(e);}proposeInsertion(e){H(this.body,{...e,author:this.resolveAuthor(e.author)});}proposeDeletion(e){L(this.body,{...e,author:this.resolveAuthor(e.author)});}acceptChange(e){C(this.body,e);}rejectChange(e){I(this.body,e);}acceptAll(){return k(this.body)}rejectAll(){return F(this.body)}applyReview(e){return N(this.body,e,this.author)}toDocument(){return this.doc}async toBuffer(){if(!this.doc.originalBuffer)throw new Error("Cannot create buffer: no original DOCX buffer was provided. Use DocxReviewer.fromBuffer() or pass originalBuffer to the constructor.");let{repackDocx:e}=await import('./headless-ULW7Q5F4.js');return e(this.doc)}};exports.a=U;
1
+ 'use strict';var chunk6Z6UJ4RC_js=require('./chunk-6Z6UJ4RC.js'),chunkONK67NAB_js=require('./chunk-ONK67NAB.js');function g(o,e){let{paragraphIndex:t,author:n="AI",text:s,search:a}=e,r=chunk6Z6UJ4RC_js.b(o,t),i=(o.comments??[]).map(m=>m.id),p=i.length>0?Math.max(...i)+1:1,c={id:p,author:n,date:new Date().toISOString(),content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:s}]}],formatting:{}}]};if(o.comments||(o.comments=[]),o.comments.push(c),a){let m=chunk6Z6UJ4RC_js.i(r,a,t);r.content.splice(m.endRunIndex+1,0,{type:"commentRangeEnd",id:p}),r.content.splice(m.startRunIndex,0,{type:"commentRangeStart",id:p});}else r.content.unshift({type:"commentRangeStart",id:p}),r.content.push({type:"commentRangeEnd",id:p});return p}function y(o,e,t){let n=o.comments??[];if(!n.find(p=>p.id===e))throw new chunk6Z6UJ4RC_js.h(e);let a=n.map(p=>p.id),r=Math.max(...a)+1,i={id:r,author:t.author??"AI",date:new Date().toISOString(),parentId:e,content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:t.text}]}],formatting:{}}]};return n.push(i),r}function E(o,e){let t=o.comments??[],n=t.find(r=>r.id===e);if(!n)throw new chunk6Z6UJ4RC_js.h(e);let s=n.parentId!==void 0,a=new Set([e]);if(!s)for(let r of t)r.parentId===e&&a.add(r.id);o.comments=t.filter(r=>!a.has(r.id)),!s&&chunk6Z6UJ4RC_js.c(o,r=>{for(let i=r.content.length-1;i>=0;i--){let p=r.content[i];(p.type==="commentRangeStart"||p.type==="commentRangeEnd")&&p.id===e&&r.content.splice(i,1);}});}function C(o,e){if(!W(o,e,"accept"))throw new chunk6Z6UJ4RC_js.g(e)}function I(o,e){if(!W(o,e,"reject"))throw new chunk6Z6UJ4RC_js.g(e)}function k(o){return M(o,"accept")}function F(o){return M(o,"reject")}function M(o,e){let t=0;return chunk6Z6UJ4RC_js.c(o,n=>{for(let s=n.content.length-1;s>=0;s--){let a=n.content[s];chunk6Z6UJ4RC_js.a(a)&&(G(n,s,a,e),t++);}}),t}function W(o,e,t){let n=false;return chunk6Z6UJ4RC_js.c(o,s=>{for(let a=s.content.length-1;a>=0;a--){let r=s.content[a];chunk6Z6UJ4RC_js.a(r)&&r.info.id===e&&(G(s,a,r,t),n=true);}if(n)return false}),n}function G(o,e,t,n){if(t.type==="insertion"&&n==="accept"||t.type==="deletion"&&n==="reject"||t.type==="moveTo"&&n==="accept"||t.type==="moveFrom"&&n==="reject"){let a=t.content;o.content.splice(e,1,...a);}else o.content.splice(e,1);}function x(o,e){let{paragraphIndex:t,search:n,author:s="AI",replaceWith:a}=e,r=chunk6Z6UJ4RC_js.b(o,t),{startIndex:i,endIndex:p}=chunk6Z6UJ4RC_js.j(r,n,t),c=new Date().toISOString(),m=w(o),h=r.content.slice(i,p+1),R={type:"deletion",info:{id:m,author:s,date:c},content:h},v={type:"insertion",info:{id:m+1,author:s,date:c},content:[{type:"run",content:[{type:"text",text:a}]}]};r.content.splice(i,p-i+1,R,v);}function H(o,e){let{paragraphIndex:t,author:n="AI",insertText:s,position:a="after",search:r}=e,i=chunk6Z6UJ4RC_js.b(o,t),p=new Date().toISOString(),m={type:"insertion",info:{id:w(o),author:n,date:p},content:[{type:"run",content:[{type:"text",text:s}]}]};if(r){let{startIndex:h,endIndex:R}=chunk6Z6UJ4RC_js.j(i,r,t),v=a==="after"?R+1:h;i.content.splice(v,0,m);}else a==="before"?i.content.unshift(m):i.content.push(m);}function L(o,e){let{paragraphIndex:t,search:n,author:s="AI"}=e,a=chunk6Z6UJ4RC_js.b(o,t),{startIndex:r,endIndex:i}=chunk6Z6UJ4RC_js.j(a,n,t),p=new Date().toISOString(),c=w(o),m=a.content.slice(r,i+1),h={type:"deletion",info:{id:c,author:s,date:p},content:m};a.content.splice(r,i-r+1,h);}var S=new WeakMap;function w(o){let e=S.get(o);e===void 0&&(e=0,chunk6Z6UJ4RC_js.c(o,n=>{for(let s of n.content)chunk6Z6UJ4RC_js.a(s)&&(e=Math.max(e,s.info.id));}));let t=e+1;return S.set(o,t+1),t}function N(o,e,t="AI"){let n=[],s=0,a=0,r=0,i=0,p=0;for(let c of e.accept??[])try{C(o,c),s++;}catch(m){n.push({operation:"accept",id:c,error:m.message});}for(let c of e.reject??[])try{I(o,c),a++;}catch(m){n.push({operation:"reject",id:c,error:m.message});}for(let c of e.comments??[])try{g(o,{...c,author:c.author??t}),r++;}catch(m){n.push({operation:"comment",search:c.search,error:m.message});}for(let c of e.replies??[])try{y(o,c.commentId,{author:c.author??t,text:c.text}),i++;}catch(m){n.push({operation:"reply",id:c.commentId,error:m.message});}for(let c of e.proposals??[])try{x(o,{...c,author:c.author??t}),p++;}catch(m){n.push({operation:"proposal",search:c.search,error:m.message});}return {accepted:s,rejected:a,commentsAdded:r,repliesAdded:i,proposalsAdded:p,errors:n}}var U=class o{constructor(e,t="AI",n){let s=n??e.originalBuffer,{originalBuffer:a,...r}=e;this.doc=structuredClone(r),s&&(this.doc.originalBuffer=s),this.author=t;}static async fromBuffer(e,t="AI"){let n=await chunkONK67NAB_js.w(e,{preloadFonts:false});return new o(n,t,e)}get body(){return this.doc.package.document}resolveAuthor(e){return e??this.author}getContent(e){return chunk6Z6UJ4RC_js.d(this.body,e)}getContentAsText(e){return chunk6Z6UJ4RC_js.e(chunk6Z6UJ4RC_js.d(this.body,e))}getChanges(e){return chunk6Z6UJ4RC_js.k(this.body,e)}getComments(e){return chunk6Z6UJ4RC_js.l(this.body,e)}addComment(e,t){let n=typeof e=="number"?{paragraphIndex:e,text:t,author:this.author}:{...e,author:this.resolveAuthor(e.author)};return g(this.body,n)}replyTo(e,t){let n=typeof t=="string"?{text:t,author:this.author}:{...t,author:this.resolveAuthor(t.author)};return y(this.body,e,n)}removeComment(e){E(this.body,e);}replace(e,t,n){let s=typeof e=="number"?{paragraphIndex:e,search:t,replaceWith:n,author:this.author}:{...e,author:this.resolveAuthor(e.author)};x(this.body,s);}proposeReplacement(e){this.replace(e);}proposeInsertion(e){H(this.body,{...e,author:this.resolveAuthor(e.author)});}proposeDeletion(e){L(this.body,{...e,author:this.resolveAuthor(e.author)});}acceptChange(e){C(this.body,e);}rejectChange(e){I(this.body,e);}acceptAll(){return k(this.body)}rejectAll(){return F(this.body)}applyReview(e){return N(this.body,e,this.author)}toDocument(){return this.doc}async toBuffer(){if(!this.doc.originalBuffer)throw new Error("Cannot create buffer: no original DOCX buffer was provided. Use DocxReviewer.fromBuffer() or pass originalBuffer to the constructor.");let{repackDocx:e}=await import('./headless-JZRG6TNP.js');return e(this.doc)}};exports.a=U;
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkTFIRB2ZB_js=require('./chunk-TFIRB2ZB.js');function y(n){return !n||n.length===0?"":n.map(i=>{let s=i;return s?.content?s.content.map(e=>e.content?.map(t=>t.text||"").join("")||"").join(""):""}).join(`
2
- `)}function u(n){let i=n.getEditorRef();if(i){let e=i.getDocument();if(e?.package?.document)return e.package.document}return n.getDocument()?.package?.document??null}function T(n,i="AI"){function s(e){return e??i}return {getContentAsText(e){let t=u(n);return t?chunkTFIRB2ZB_js.e(chunkTFIRB2ZB_js.d(t,e)):""},getContent(e){let t=u(n);return t?chunkTFIRB2ZB_js.d(t,e):[]},getComments(e){let t=u(n);if(!t)return [];let r=chunkTFIRB2ZB_js.l(t,e);if(r.length>0)return r;let l=n.getComments();if(l.length===0)return [];let a=new Map,g=[];for(let o of l)if(o.parentId){let c=a.get(o.parentId);c?c.push(o):a.set(o.parentId,[o]);}else g.push(o);let m=[];for(let o of g){if(e?.author&&o.author!==e.author||e?.done!==void 0&&(o.done??false)!==e.done)continue;let c=a.get(o.id)??[];m.push({id:o.id,author:o.author,date:o.date??null,text:y(o.content),anchoredText:"",paragraphIndex:-1,replies:c.map(p=>({id:p.id,author:p.author,date:p.date??null,text:y(p.content)})),done:o.done??false});}return m},getChanges(e){let t=u(n);return t?chunkTFIRB2ZB_js.k(t,e):[]},findText(e,t){return n.findInDocument(e,t)},getSelection(){return n.getSelectionInfo()},addComment(e){return n.addComment({paraId:e.paraId,text:e.text,author:s(e.author),search:e.search})},replyTo(e,t){return n.replyToComment(e,t.text,s(t.author))},resolveComment(e){n.resolveComment(e);},proposeChange(e){return n.proposeChange({paraId:e.paraId,search:e.search,replaceWith:e.replaceWith,author:s(e.author)})},applyFormatting(e){return n.applyFormatting({paraId:e.paraId,search:e.search,marks:e.marks})},setParagraphStyle(e){return n.setParagraphStyle({paraId:e.paraId,styleId:e.styleId})},getPage(e){return n.getPageContent(e)},getPages(e){let t=n.getTotalPages(),r=Math.max(1,Math.min(e.from,t)),l=Math.max(r,Math.min(e.to,t)),a=[];for(let g=r;g<=l;g++){let m=n.getPageContent(g);m&&a.push(m);}return a},getTotalPages(){return n.getTotalPages()},getCurrentPage(){return n.getCurrentPage()},scrollTo(e){return n.scrollToParaId(e)},onContentChange(e){return n.onContentChange(()=>{let t=u(n),r=t?chunkTFIRB2ZB_js.l(t):[],l=t?chunkTFIRB2ZB_js.k(t):[];try{e({commentCount:r.length,changeCount:l.length,comments:r,changes:l});}catch(a){console.error("onContentChange listener threw:",a);}})},onSelectionChange(e){return n.onSelectionChange(()=>{try{e(n.getSelectionInfo());}catch(t){console.error("onSelectionChange listener threw:",t);}})}}}exports.a=T;
1
+ 'use strict';var chunk6Z6UJ4RC_js=require('./chunk-6Z6UJ4RC.js');function y(n){return !n||n.length===0?"":n.map(i=>{let s=i;return s?.content?s.content.map(e=>e.content?.map(t=>t.text||"").join("")||"").join(""):""}).join(`
2
+ `)}function u(n){let i=n.getEditorRef();if(i){let e=i.getDocument();if(e?.package?.document)return e.package.document}return n.getDocument()?.package?.document??null}function T(n,i="AI"){function s(e){return e??i}return {getContentAsText(e){let t=u(n);return t?chunk6Z6UJ4RC_js.e(chunk6Z6UJ4RC_js.d(t,e)):""},getContent(e){let t=u(n);return t?chunk6Z6UJ4RC_js.d(t,e):[]},getComments(e){let t=u(n);if(!t)return [];let r=chunk6Z6UJ4RC_js.l(t,e);if(r.length>0)return r;let l=n.getComments();if(l.length===0)return [];let a=new Map,g=[];for(let o of l)if(o.parentId){let c=a.get(o.parentId);c?c.push(o):a.set(o.parentId,[o]);}else g.push(o);let m=[];for(let o of g){if(e?.author&&o.author!==e.author||e?.done!==void 0&&(o.done??false)!==e.done)continue;let c=a.get(o.id)??[];m.push({id:o.id,author:o.author,date:o.date??null,text:y(o.content),anchoredText:"",paragraphIndex:-1,replies:c.map(p=>({id:p.id,author:p.author,date:p.date??null,text:y(p.content)})),done:o.done??false});}return m},getChanges(e){let t=u(n);return t?chunk6Z6UJ4RC_js.k(t,e):[]},findText(e,t){return n.findInDocument(e,t)},getSelection(){return n.getSelectionInfo()},addComment(e){return n.addComment({paraId:e.paraId,text:e.text,author:s(e.author),search:e.search})},replyTo(e,t){return n.replyToComment(e,t.text,s(t.author))},resolveComment(e){n.resolveComment(e);},proposeChange(e){return n.proposeChange({paraId:e.paraId,search:e.search,replaceWith:e.replaceWith,author:s(e.author)})},applyFormatting(e){return n.applyFormatting({paraId:e.paraId,search:e.search,marks:e.marks})},setParagraphStyle(e){return n.setParagraphStyle({paraId:e.paraId,styleId:e.styleId})},getPage(e){return n.getPageContent(e)},getPages(e){let t=n.getTotalPages(),r=Math.max(1,Math.min(e.from,t)),l=Math.max(r,Math.min(e.to,t)),a=[];for(let g=r;g<=l;g++){let m=n.getPageContent(g);m&&a.push(m);}return a},getTotalPages(){return n.getTotalPages()},getCurrentPage(){return n.getCurrentPage()},scrollTo(e){return n.scrollToParaId(e)},onContentChange(e){return n.onContentChange(()=>{let t=u(n),r=t?chunk6Z6UJ4RC_js.l(t):[],l=t?chunk6Z6UJ4RC_js.k(t):[];try{e({commentCount:r.length,changeCount:l.length,comments:r,changes:l});}catch(a){console.error("onContentChange listener threw:",a);}})},onSelectionChange(e){return n.onSelectionChange(()=>{try{e(n.getSelectionInfo());}catch(t){console.error("onSelectionChange listener threw:",t);}})}}}exports.a=T;
@@ -1 +1,2 @@
1
- .ai-ctx-backdrop[data-v-c30da7a7]{position:fixed;inset:0;z-index:499}.ai-ctx-menu[data-v-c30da7a7]{background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 16px #00000024;min-width:200px;padding:4px 0}.ai-ctx-menu__header[data-v-c30da7a7]{padding:6px 14px;font-size:11px;font-weight:600;color:#6b7280;text-transform:uppercase;letter-spacing:.04em}.ai-ctx-menu__item[data-v-c30da7a7]{display:flex;align-items:center;gap:10px;width:100%;padding:7px 14px;border:none;background:transparent;cursor:pointer;font-size:13px;color:#1f2937;text-align:left}.ai-ctx-menu__item[data-v-c30da7a7]:hover{background:#f3f4f6}.ai-ctx-menu__icon[data-v-c30da7a7]{font-size:14px;width:18px;text-align:center}.ai-ctx-menu__label[data-v-c30da7a7]{flex:1}.ai-ctx-menu__divider[data-v-c30da7a7]{height:1px;background:#e5e7eb;margin:4px 10px}.ai-ctx-menu__custom[data-v-c30da7a7]{padding:6px 10px}.ai-ctx-menu__input[data-v-c30da7a7]{width:100%;padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:12px;outline:none}.ai-ctx-menu__input[data-v-c30da7a7]:focus{border-color:#3b82f6}.ai-preview[data-v-1226b741]{background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 16px #0000001f;width:420px;max-width:90vw;overflow:hidden}.ai-preview__header[data-v-1226b741]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:#f0f4ff;border-bottom:1px solid #d0daf0}.ai-preview__title[data-v-1226b741]{font-size:13px;font-weight:600;color:#1557b0}.ai-preview__close[data-v-1226b741]{border:none;background:transparent;cursor:pointer;font-size:14px;color:#6b7280}.ai-preview__loading[data-v-1226b741]{display:flex;align-items:center;gap:10px;padding:24px 14px;color:#6b7280;font-size:13px}.ai-preview__spinner[data-v-1226b741]{width:16px;height:16px;border:2px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:spin-1226b741 .8s linear infinite}@keyframes spin-1226b741{to{transform:rotate(360deg)}}.ai-preview__error[data-v-1226b741]{padding:16px 14px;color:#dc2626;font-size:13px;display:flex;align-items:center;gap:8px}.ai-preview__retry[data-v-1226b741]{padding:4px 10px;border:1px solid #d1d5db;border-radius:3px;background:#fff;cursor:pointer;font-size:12px}.ai-preview__content[data-v-1226b741]{padding:12px 14px}.ai-preview__diff-label[data-v-1226b741]{font-size:11px;font-weight:600;color:#6b7280;margin-bottom:4px;text-transform:uppercase}.ai-preview__diff-text[data-v-1226b741]{font-size:13px;line-height:1.5;padding:8px 10px;border-radius:4px;margin-bottom:10px}.ai-preview__diff-text--old[data-v-1226b741]{background:#fef2f2;color:#991b1b}.ai-preview__diff-text--new[data-v-1226b741]{background:#f0fdf4;color:#166534}.ai-preview__result[data-v-1226b741]{font-size:13px;line-height:1.5;color:#1f2937}.ai-preview__textarea[data-v-1226b741]{width:100%;padding:8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;resize:vertical;margin-top:8px;outline:none}.ai-preview__textarea[data-v-1226b741]:focus{border-color:#3b82f6}.ai-preview__footer[data-v-1226b741]{display:flex;justify-content:flex-end;gap:6px;padding:10px 14px;border-top:1px solid #e5e7eb}.ai-preview__btn[data-v-1226b741]{padding:5px 14px;border:1px solid #d1d5db;border-radius:4px;background:#fff;cursor:pointer;font-size:12px;font-weight:500}.ai-preview__btn[data-v-1226b741]:hover{background:#f3f4f6}.ai-preview__btn--primary[data-v-1226b741]{background:#1a73e8;color:#fff;border-color:#1a73e8}.ai-preview__btn--primary[data-v-1226b741]:hover{background:#1557b0}
1
+ .ai-ctx-backdrop[data-v-c30da7a7]{z-index:499;position:fixed;inset:0}.ai-ctx-menu[data-v-c30da7a7]{background:#fff;border:1px solid #d1d5db;border-radius:8px;min-width:200px;padding:4px 0;box-shadow:0 4px 16px #00000024}.ai-ctx-menu__header[data-v-c30da7a7]{color:#6b7280;text-transform:uppercase;letter-spacing:.04em;padding:6px 14px;font-size:11px;font-weight:600}.ai-ctx-menu__item[data-v-c30da7a7]{cursor:pointer;color:#1f2937;text-align:left;background:0 0;border:none;align-items:center;gap:10px;width:100%;padding:7px 14px;font-size:13px;display:flex}.ai-ctx-menu__item[data-v-c30da7a7]:hover{background:#f3f4f6}.ai-ctx-menu__icon[data-v-c30da7a7]{text-align:center;width:18px;font-size:14px}.ai-ctx-menu__label[data-v-c30da7a7]{flex:1}.ai-ctx-menu__divider[data-v-c30da7a7]{background:#e5e7eb;height:1px;margin:4px 10px}.ai-ctx-menu__custom[data-v-c30da7a7]{padding:6px 10px}.ai-ctx-menu__input[data-v-c30da7a7]{border:1px solid #d1d5db;border-radius:4px;outline:none;width:100%;padding:6px 8px;font-size:12px}.ai-ctx-menu__input[data-v-c30da7a7]:focus{border-color:#3b82f6}.ai-preview[data-v-1226b741]{background:#fff;border:1px solid #d1d5db;border-radius:8px;width:420px;max-width:90vw;overflow:hidden;box-shadow:0 4px 16px #0000001f}.ai-preview__header[data-v-1226b741]{background:#f0f4ff;border-bottom:1px solid #d0daf0;justify-content:space-between;align-items:center;padding:10px 14px;display:flex}.ai-preview__title[data-v-1226b741]{color:#1557b0;font-size:13px;font-weight:600}.ai-preview__close[data-v-1226b741]{cursor:pointer;color:#6b7280;background:0 0;border:none;font-size:14px}.ai-preview__loading[data-v-1226b741]{color:#6b7280;align-items:center;gap:10px;padding:24px 14px;font-size:13px;display:flex}.ai-preview__spinner[data-v-1226b741]{border:2px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;width:16px;height:16px;animation:.8s linear infinite spin-1226b741}@keyframes spin-1226b741{to{transform:rotate(360deg)}}.ai-preview__error[data-v-1226b741]{color:#dc2626;align-items:center;gap:8px;padding:16px 14px;font-size:13px;display:flex}.ai-preview__retry[data-v-1226b741]{cursor:pointer;background:#fff;border:1px solid #d1d5db;border-radius:3px;padding:4px 10px;font-size:12px}.ai-preview__content[data-v-1226b741]{padding:12px 14px}.ai-preview__diff-label[data-v-1226b741]{color:#6b7280;text-transform:uppercase;margin-bottom:4px;font-size:11px;font-weight:600}.ai-preview__diff-text[data-v-1226b741]{border-radius:4px;margin-bottom:10px;padding:8px 10px;font-size:13px;line-height:1.5}.ai-preview__diff-text--old[data-v-1226b741]{color:#991b1b;background:#fef2f2}.ai-preview__diff-text--new[data-v-1226b741]{color:#166534;background:#f0fdf4}.ai-preview__result[data-v-1226b741]{color:#1f2937;font-size:13px;line-height:1.5}.ai-preview__textarea[data-v-1226b741]{resize:vertical;border:1px solid #d1d5db;border-radius:4px;outline:none;width:100%;margin-top:8px;padding:8px;font-family:inherit;font-size:13px}.ai-preview__textarea[data-v-1226b741]:focus{border-color:#3b82f6}.ai-preview__footer[data-v-1226b741]{border-top:1px solid #e5e7eb;justify-content:flex-end;gap:6px;padding:10px 14px;display:flex}.ai-preview__btn[data-v-1226b741]{cursor:pointer;background:#fff;border:1px solid #d1d5db;border-radius:4px;padding:5px 14px;font-size:12px;font-weight:500}.ai-preview__btn[data-v-1226b741]:hover{background:#f3f4f6}.ai-preview__btn--primary[data-v-1226b741]{color:#fff;background:#1a73e8;border-color:#1a73e8}.ai-preview__btn--primary[data-v-1226b741]:hover{background:#1557b0}
2
+ /*$vite$:1*/
@@ -1 +1 @@
1
- export{wa as DEFAULT_AI_ACTIONS,x as DocumentAgent,ya as VERSION,i as attemptSelectiveSave,na as blendColors,E as buildExtendedSelectionContext,h as buildPatchedDocumentXml,D as buildSelectionContext,B as buildSelectionContextFromContext,oa as colorsEqual,ta as comparePositions,M as countCharacters,L as countWords,y as createAgent,z as createAgentFromDocument,qa as createCollapsedRange,xa as createCommand,ba as createDocumentWithText,f as createDocx,aa as createEmptyDocument,ra as createRange,ka as createRgbColor,ja as createThemeColor,la as darkenColor,j as detectVariables,k as detectVariablesDetailed,l as detectVariablesInBody,m as detectVariablesInParagraph,v as documentHasVariables,n as extractVariablesFromText,r as formatVariable,va as getActionDescription,ua as getActionLabel,A as getAgentContext,$ as getBlockIndexForParagraph,O as getBodyCharacterCount,K as getBodyText,N as getBodyWordCount,ha as getContrastingColor,C as getDocumentSummary,R as getFormattingAtPosition,T as getHyperlinkAtPosition,I as getHyperlinkText,_ as getParagraphAtIndex,G as getParagraphText,Z as getParagraphs,H as getRunText,F as getSelectionFormattingSummary,J as getTableText,Q as getTextAfter,P as getTextBefore,X as hasHyperlinks,W as hasImages,Y as hasTables,o as hasTemplateVariables,fa as isBlack,U as isHeadingStyle,S as isPositionInHyperlink,sa as isPositionInRange,p as isValidVariableName,ga as isWhite,pa as isZodSchema,ma as lightenColor,ia as parseColorString,w as parseDocx,V as parseHeadingLevel,s as parseVariable,u as removeVariables,d as repackDocx,t as replaceVariables,ca as resolveColor,da as resolveHighlightColor,ea as resolveShadingColor,q as sanitizeVariableName,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties,e as updateMultipleFiles,g as validatePatchSafety}from'./chunk-NX2KNBB6.mjs';export{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-UILTIEBD.mjs';export{a as PluginRegistry,d as createPluginRegistrar,g as emuToPixels,i as emuToTwips,n as executeCommand,o as executeCommands,m as formatPx,l as halfPointsToPixels,h as pixelsToEmu,f as pixelsToTwips,b as pluginRegistry,k as pointsToPixels,c as registerPlugins,j as twipsToEmu,e as twipsToPixels}from'./chunk-X4YGLGUM.mjs';
1
+ export{wa as DEFAULT_AI_ACTIONS,x as DocumentAgent,ya as VERSION,i as attemptSelectiveSave,na as blendColors,E as buildExtendedSelectionContext,h as buildPatchedDocumentXml,D as buildSelectionContext,B as buildSelectionContextFromContext,oa as colorsEqual,ta as comparePositions,M as countCharacters,L as countWords,y as createAgent,z as createAgentFromDocument,qa as createCollapsedRange,xa as createCommand,ba as createDocumentWithText,f as createDocx,aa as createEmptyDocument,ra as createRange,ka as createRgbColor,ja as createThemeColor,la as darkenColor,j as detectVariables,k as detectVariablesDetailed,l as detectVariablesInBody,m as detectVariablesInParagraph,v as documentHasVariables,n as extractVariablesFromText,r as formatVariable,va as getActionDescription,ua as getActionLabel,A as getAgentContext,$ as getBlockIndexForParagraph,O as getBodyCharacterCount,K as getBodyText,N as getBodyWordCount,ha as getContrastingColor,C as getDocumentSummary,R as getFormattingAtPosition,T as getHyperlinkAtPosition,I as getHyperlinkText,_ as getParagraphAtIndex,G as getParagraphText,Z as getParagraphs,H as getRunText,F as getSelectionFormattingSummary,J as getTableText,Q as getTextAfter,P as getTextBefore,X as hasHyperlinks,W as hasImages,Y as hasTables,o as hasTemplateVariables,fa as isBlack,U as isHeadingStyle,S as isPositionInHyperlink,sa as isPositionInRange,p as isValidVariableName,ga as isWhite,pa as isZodSchema,ma as lightenColor,ia as parseColorString,w as parseDocx,V as parseHeadingLevel,s as parseVariable,u as removeVariables,d as repackDocx,t as replaceVariables,ca as resolveColor,da as resolveHighlightColor,ea as resolveShadingColor,q as sanitizeVariableName,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties,e as updateMultipleFiles,g as validatePatchSafety}from'./chunk-4UY5MI2V.mjs';export{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-UILTIEBD.mjs';export{a as PluginRegistry,d as createPluginRegistrar,g as emuToPixels,i as emuToTwips,n as executeCommand,o as executeCommands,m as formatPx,l as halfPointsToPixels,h as pixelsToEmu,f as pixelsToTwips,b as pluginRegistry,k as pointsToPixels,c as registerPlugins,j as twipsToEmu,e as twipsToPixels}from'./chunk-X4YGLGUM.mjs';
@@ -1 +1 @@
1
- 'use strict';var chunkDQH7AV5E_js=require('./chunk-DQH7AV5E.js'),chunk4QRVKNI4_js=require('./chunk-4QRVKNI4.js'),chunkNISW2GF6_js=require('./chunk-NISW2GF6.js');Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkDQH7AV5E_js.wa}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkDQH7AV5E_js.x}});Object.defineProperty(exports,"VERSION",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ya}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkDQH7AV5E_js.i}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkDQH7AV5E_js.na}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkDQH7AV5E_js.E}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkDQH7AV5E_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkDQH7AV5E_js.D}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunkDQH7AV5E_js.B}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkDQH7AV5E_js.oa}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ta}});Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunkDQH7AV5E_js.M}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunkDQH7AV5E_js.L}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunkDQH7AV5E_js.y}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunkDQH7AV5E_js.z}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkDQH7AV5E_js.qa}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkDQH7AV5E_js.xa}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ba}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkDQH7AV5E_js.f}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkDQH7AV5E_js.aa}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ra}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ka}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ja}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.la}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkDQH7AV5E_js.j}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkDQH7AV5E_js.k}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkDQH7AV5E_js.l}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkDQH7AV5E_js.m}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkDQH7AV5E_js.v}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkDQH7AV5E_js.n}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkDQH7AV5E_js.r}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkDQH7AV5E_js.va}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ua}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkDQH7AV5E_js.A}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunkDQH7AV5E_js.$}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunkDQH7AV5E_js.O}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunkDQH7AV5E_js.K}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunkDQH7AV5E_js.N}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ha}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkDQH7AV5E_js.C}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunkDQH7AV5E_js.R}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunkDQH7AV5E_js.T}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkDQH7AV5E_js.I}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunkDQH7AV5E_js._}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunkDQH7AV5E_js.G}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunkDQH7AV5E_js.Z}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunkDQH7AV5E_js.H}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunkDQH7AV5E_js.F}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunkDQH7AV5E_js.J}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunkDQH7AV5E_js.Q}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunkDQH7AV5E_js.P}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunkDQH7AV5E_js.X}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunkDQH7AV5E_js.W}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunkDQH7AV5E_js.Y}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkDQH7AV5E_js.o}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkDQH7AV5E_js.fa}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunkDQH7AV5E_js.U}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunkDQH7AV5E_js.S}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkDQH7AV5E_js.sa}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkDQH7AV5E_js.p}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ga}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunkDQH7AV5E_js.pa}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ma}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ia}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkDQH7AV5E_js.w}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunkDQH7AV5E_js.V}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkDQH7AV5E_js.s}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkDQH7AV5E_js.u}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkDQH7AV5E_js.d}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkDQH7AV5E_js.t}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ca}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.da}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkDQH7AV5E_js.ea}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkDQH7AV5E_js.q}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkDQH7AV5E_js.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkDQH7AV5E_js.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkDQH7AV5E_js.a}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkDQH7AV5E_js.e}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkDQH7AV5E_js.g}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunk4QRVKNI4_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunk4QRVKNI4_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunk4QRVKNI4_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunk4QRVKNI4_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunk4QRVKNI4_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunk4QRVKNI4_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.f}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunkNISW2GF6_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.g}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.i}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkNISW2GF6_js.n}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkNISW2GF6_js.o}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkNISW2GF6_js.m}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.l}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.h}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.f}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.b}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.k}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkNISW2GF6_js.c}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.j}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.e}});
1
+ 'use strict';var chunkONK67NAB_js=require('./chunk-ONK67NAB.js'),chunk4QRVKNI4_js=require('./chunk-4QRVKNI4.js'),chunkNISW2GF6_js=require('./chunk-NISW2GF6.js');Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkONK67NAB_js.wa}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkONK67NAB_js.x}});Object.defineProperty(exports,"VERSION",{enumerable:true,get:function(){return chunkONK67NAB_js.ya}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkONK67NAB_js.i}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkONK67NAB_js.na}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkONK67NAB_js.E}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkONK67NAB_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkONK67NAB_js.D}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunkONK67NAB_js.B}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkONK67NAB_js.oa}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkONK67NAB_js.ta}});Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunkONK67NAB_js.M}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunkONK67NAB_js.L}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunkONK67NAB_js.y}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunkONK67NAB_js.z}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkONK67NAB_js.qa}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkONK67NAB_js.xa}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkONK67NAB_js.ba}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.f}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkONK67NAB_js.aa}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkONK67NAB_js.ra}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ka}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ja}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkONK67NAB_js.la}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.j}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkONK67NAB_js.k}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkONK67NAB_js.l}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkONK67NAB_js.m}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.v}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkONK67NAB_js.n}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkONK67NAB_js.r}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkONK67NAB_js.va}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkONK67NAB_js.ua}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkONK67NAB_js.A}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunkONK67NAB_js.$}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunkONK67NAB_js.O}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunkONK67NAB_js.K}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunkONK67NAB_js.N}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ha}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkONK67NAB_js.C}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunkONK67NAB_js.R}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunkONK67NAB_js.T}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkONK67NAB_js.I}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunkONK67NAB_js._}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunkONK67NAB_js.G}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunkONK67NAB_js.Z}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunkONK67NAB_js.H}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunkONK67NAB_js.F}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunkONK67NAB_js.J}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunkONK67NAB_js.Q}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunkONK67NAB_js.P}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunkONK67NAB_js.X}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunkONK67NAB_js.W}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunkONK67NAB_js.Y}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.o}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkONK67NAB_js.fa}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunkONK67NAB_js.U}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunkONK67NAB_js.S}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkONK67NAB_js.sa}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkONK67NAB_js.p}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkONK67NAB_js.ga}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunkONK67NAB_js.pa}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ma}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkONK67NAB_js.ia}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.w}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunkONK67NAB_js.V}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkONK67NAB_js.s}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.u}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.d}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.t}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ca}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkONK67NAB_js.da}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ea}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkONK67NAB_js.q}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkONK67NAB_js.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkONK67NAB_js.a}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkONK67NAB_js.e}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkONK67NAB_js.g}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunk4QRVKNI4_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunk4QRVKNI4_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunk4QRVKNI4_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunk4QRVKNI4_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunk4QRVKNI4_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunk4QRVKNI4_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.f}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunkNISW2GF6_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.g}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.i}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkNISW2GF6_js.n}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkNISW2GF6_js.o}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkNISW2GF6_js.m}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.l}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.h}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.f}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.b}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.k}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkNISW2GF6_js.c}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.j}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.e}});
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkLSPYEWWJ_js=require('./chunk-LSPYEWWJ.js'),chunkTFIRB2ZB_js=require('./chunk-TFIRB2ZB.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"DocxReviewer",{enumerable:true,get:function(){return chunkLSPYEWWJ_js.a}});Object.defineProperty(exports,"ChangeNotFoundError",{enumerable:true,get:function(){return chunkTFIRB2ZB_js.g}});Object.defineProperty(exports,"CommentNotFoundError",{enumerable:true,get:function(){return chunkTFIRB2ZB_js.h}});Object.defineProperty(exports,"TextNotFoundError",{enumerable:true,get:function(){return chunkTFIRB2ZB_js.f}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunkTFIRB2ZB_js.m}});Object.defineProperty(exports,"agentTools",{enumerable:true,get:function(){return chunkRI5S75JY_js.a}});Object.defineProperty(exports,"executeToolCall",{enumerable:true,get:function(){return chunkRI5S75JY_js.b}});Object.defineProperty(exports,"getToolSchemas",{enumerable:true,get:function(){return chunkRI5S75JY_js.d}});
1
+ 'use strict';var chunkRP4LYHUB_js=require('./chunk-RP4LYHUB.js'),chunk6Z6UJ4RC_js=require('./chunk-6Z6UJ4RC.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"DocxReviewer",{enumerable:true,get:function(){return chunkRP4LYHUB_js.a}});Object.defineProperty(exports,"ChangeNotFoundError",{enumerable:true,get:function(){return chunk6Z6UJ4RC_js.g}});Object.defineProperty(exports,"CommentNotFoundError",{enumerable:true,get:function(){return chunk6Z6UJ4RC_js.h}});Object.defineProperty(exports,"TextNotFoundError",{enumerable:true,get:function(){return chunk6Z6UJ4RC_js.f}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunk6Z6UJ4RC_js.m}});Object.defineProperty(exports,"agentTools",{enumerable:true,get:function(){return chunkRI5S75JY_js.a}});Object.defineProperty(exports,"executeToolCall",{enumerable:true,get:function(){return chunkRI5S75JY_js.b}});Object.defineProperty(exports,"getToolSchemas",{enumerable:true,get:function(){return chunkRI5S75JY_js.d}});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export{a as DocxReviewer}from'./chunk-BJPVVT5W.mjs';export{g as ChangeNotFoundError,h as CommentNotFoundError,f as TextNotFoundError,m as createReviewerBridge}from'./chunk-DEDOV3KL.mjs';export{a as agentTools,b as executeToolCall,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';
1
+ export{a as DocxReviewer}from'./chunk-MQIZY6IO.mjs';export{g as ChangeNotFoundError,h as CommentNotFoundError,f as TextNotFoundError,m as createReviewerBridge}from'./chunk-EKCQF23W.mjs';export{a as agentTools,b as executeToolCall,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var chunkJH5VOTEK_js=require('./chunk-JH5VOTEK.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var te=chunkRI5S75JY_js.d();function ne(e){let{editorRef:t,author:l="AI"}=e,c=react.useMemo(()=>({get:()=>t.current?chunkJH5VOTEK_js.a(t.current,l):null}),[t,l]);return {executeToolCall:react.useCallback((d,p)=>{let r=c.get();return r?chunkRI5S75JY_js.b(d,p,r):{success:false,error:"Editor not ready"}},[c]),toolSchemas:te}}function re(e){let{editorRef:t,author:l="AI",tools:c,include:u,exclude:d}=e,p=!!c&&Object.keys(c).length>0,r=react.useCallback(i=>!(u&&!u.includes(i)||d&&d.includes(i)),[u,d]),f=react.useMemo(()=>{let i=u||d?chunkRI5S75JY_js.a.filter(n=>r(n.name)):chunkRI5S75JY_js.a;if(!p)return i.map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}));let o=new Map(i.map(n=>[n.name,n]));for(let[n,C]of Object.entries(c))o.set(n,C);return Array.from(o.values()).map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}))},[c,p,u,d,r]),g=react.useCallback((i,o)=>{let n=t.current;if(!n)return {success:false,error:"Editor not ready."};let C=chunkJH5VOTEK_js.a(n,l),k=c?.[i];if(k)try{return k.handler(o,C)}catch(T){return {success:false,error:T instanceof Error?T.message:String(T)}}return r(i)?chunkRI5S75JY_js.b(i,o,C):{success:false,error:`Tool '${i}' is not enabled.`}},[t,l,c,r]),x=react.useCallback(()=>{let i=t.current;if(!i)return {selection:null,currentPage:0,totalPages:0};let o=chunkJH5VOTEK_js.a(i,l);return {selection:o.getSelection(),currentPage:o.getCurrentPage(),totalPages:o.getTotalPages()}},[t,l]);return {tools:f,executeToolCall:g,getContext:x}}var y={agentPanel:{defaultTitle:"Assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var _="eigenpal:docx-editor:agentPanelWidth";function ae({size:e=22}){return jsxRuntime.jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}function le({size:e=18}){return jsxRuntime.jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}var ce=360,ue=280,de=600;function pe({title:e=y.agentPanel.defaultTitle,icon:t,closeLabel:l=y.agentPanel.close,resizeHandleLabel:c=y.agentPanel.resizeHandle,width:u,defaultWidth:d=ce,minWidth:p=ue,maxWidth:r=de,onWidthChange:f,onClose:g,children:x,className:i,closed:o=false}){let n=u!==void 0,[C,k]=react.useState(false),T=react.useRef(o);react.useEffect(()=>{if(T.current!==o){T.current=o,k(true);let m=window.setTimeout(()=>k(false),260);return ()=>window.clearTimeout(m)}},[o]);let[L,h]=react.useState(()=>{if(n)return u;if(typeof window>"u")return d;try{let m=window.localStorage.getItem(_);if(m){let S=Number(m);if(Number.isFinite(S)&&S>=p&&S<=r)return S}}catch{}return d}),E=n?u:L,v=react.useRef(null),B=react.useRef({minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f});B.current={minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f};let w=react.useRef(null);if(!w.current){let m=P=>{let D=v.current;if(!D)return;let I=B.current,q=D.startX-P.clientX,N=Math.min(I.maxWidth,Math.max(I.minWidth,D.startWidth+q));D.lastWidth=N,I.isControlled||h(N),I.onWidthChange?.(N);},S=()=>{let P=v.current;if(P&&(v.current=null,document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",S),!B.current.isControlled))try{window.localStorage.setItem(_,String(P.lastWidth));}catch{}};w.current={move:m,up:S};}let Y=react.useCallback(m=>{m.preventDefault();let S=n?u:L;v.current={startX:m.clientX,startWidth:S,lastWidth:S},document.addEventListener("pointermove",w.current.move),document.addEventListener("pointerup",w.current.up);},[]);return react.useEffect(()=>()=>{let m=w.current;m&&(document.removeEventListener("pointermove",m.move),document.removeEventListener("pointerup",m.up));},[]),jsxRuntime.jsxs("div",{className:`ep-agent-panel${i?` ${i}`:""}`,style:{width:o?0:E,flex:o?"0 0 0px":`0 0 ${E}px`,height:"calc(100% - 16px)",margin:o?"8px 0 8px 0":"8px 8px 8px 12px",display:"flex",flexDirection:"column",background:"#ffffff",border:o?"1px solid transparent":"1px solid #e3e3e3",borderRadius:16,boxShadow:o?"none":"0 1px 2px rgba(60,64,67,0.05), 0 4px 12px rgba(60,64,67,0.08)",opacity:o?0:1,pointerEvents:o?"none":"auto",position:"relative",boxSizing:"border-box",minWidth:o?0:p,overflow:"hidden",fontFamily:"'Google Sans', 'Google Sans Text', system-ui, -apple-system, sans-serif",transition:C?"flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), margin 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease":"opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease"},"aria-hidden":o,"data-testid":"agent-panel","data-state":o?"closed":"open",role:"complementary","aria-label":e,children:[jsxRuntime.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":c,onPointerDown:Y,style:{position:"absolute",left:-3,top:0,bottom:0,width:6,cursor:"col-resize",touchAction:"none",zIndex:1},"data-testid":"agent-panel-resize-handle"}),jsxRuntime.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 16px 10px",flex:"0 0 auto",background:"#ffffff"},children:[jsxRuntime.jsx("span",{style:{display:"inline-flex",alignItems:"center",color:"#0b57d0"},children:t??jsxRuntime.jsx(ae,{size:22})}),jsxRuntime.jsx("span",{style:{flex:1,fontSize:15,fontWeight:500,color:"#1f1f1f",letterSpacing:.1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),g&&jsxRuntime.jsx("button",{type:"button",onClick:g,"aria-label":l,title:l,"data-testid":"agent-panel-close",style:{border:"none",background:"transparent",padding:6,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#444746",borderRadius:999,transition:"background 0.15s"},onMouseEnter:m=>{m.currentTarget.style.background="#f1f3f4";},onMouseLeave:m=>{m.currentTarget.style.background="transparent";},children:jsxRuntime.jsx(le,{size:18})})]}),jsxRuntime.jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:x})]})}function ge(e){let t={},l=/(=\d+|\w+)\s*\{([^}]*)\}/g,c;for(;(c=l.exec(e))!==null;)t[c[1]]=c[2];return t}function F(e,t,l="en"){return t?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(u,d,p)=>{let r=Number(t[d]);if(isNaN(r))return u;let f=ge(p),g=f[`=${r}`];if(g!==void 0)return g.replace(/#/g,String(r));let x;try{x=new Intl.PluralRules(l).select(r);}catch{x=r===1?"one":"other";}return (f[x]??f.other??"").replace(/#/g,String(r))}).replace(/\{(\w+)\}/g,(u,d)=>{let p=t[d];return p!==void 0?String(p):`{${d}}`}):e}function V(e){let t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}var xe=y.agentPanel.thinking,he=y.agentPanel.composerPlaceholder,be=y.agentPanel.send,ye=e=>F(y.agentPanel.timeline.working,{count:e}),Ae=e=>F(y.agentPanel.timeline.summary,{count:e}),Se=e=>F(y.agentPanel.timeline.earlier,{count:e}),j="ep-agent-chat-keyframes",Ce=`
1
+ 'use strict';var chunkW6AWGFM4_js=require('./chunk-W6AWGFM4.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var te=chunkRI5S75JY_js.d();function ne(e){let{editorRef:t,author:l="AI"}=e,c=react.useMemo(()=>({get:()=>t.current?chunkW6AWGFM4_js.a(t.current,l):null}),[t,l]);return {executeToolCall:react.useCallback((d,p)=>{let r=c.get();return r?chunkRI5S75JY_js.b(d,p,r):{success:false,error:"Editor not ready"}},[c]),toolSchemas:te}}function re(e){let{editorRef:t,author:l="AI",tools:c,include:u,exclude:d}=e,p=!!c&&Object.keys(c).length>0,r=react.useCallback(i=>!(u&&!u.includes(i)||d&&d.includes(i)),[u,d]),f=react.useMemo(()=>{let i=u||d?chunkRI5S75JY_js.a.filter(n=>r(n.name)):chunkRI5S75JY_js.a;if(!p)return i.map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}));let o=new Map(i.map(n=>[n.name,n]));for(let[n,C]of Object.entries(c))o.set(n,C);return Array.from(o.values()).map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}))},[c,p,u,d,r]),g=react.useCallback((i,o)=>{let n=t.current;if(!n)return {success:false,error:"Editor not ready."};let C=chunkW6AWGFM4_js.a(n,l),k=c?.[i];if(k)try{return k.handler(o,C)}catch(T){return {success:false,error:T instanceof Error?T.message:String(T)}}return r(i)?chunkRI5S75JY_js.b(i,o,C):{success:false,error:`Tool '${i}' is not enabled.`}},[t,l,c,r]),x=react.useCallback(()=>{let i=t.current;if(!i)return {selection:null,currentPage:0,totalPages:0};let o=chunkW6AWGFM4_js.a(i,l);return {selection:o.getSelection(),currentPage:o.getCurrentPage(),totalPages:o.getTotalPages()}},[t,l]);return {tools:f,executeToolCall:g,getContext:x}}var y={agentPanel:{defaultTitle:"Assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var _="eigenpal:docx-editor:agentPanelWidth";function ae({size:e=22}){return jsxRuntime.jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}function le({size:e=18}){return jsxRuntime.jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}var ce=360,ue=280,de=600;function pe({title:e=y.agentPanel.defaultTitle,icon:t,closeLabel:l=y.agentPanel.close,resizeHandleLabel:c=y.agentPanel.resizeHandle,width:u,defaultWidth:d=ce,minWidth:p=ue,maxWidth:r=de,onWidthChange:f,onClose:g,children:x,className:i,closed:o=false}){let n=u!==void 0,[C,k]=react.useState(false),T=react.useRef(o);react.useEffect(()=>{if(T.current!==o){T.current=o,k(true);let m=window.setTimeout(()=>k(false),260);return ()=>window.clearTimeout(m)}},[o]);let[L,h]=react.useState(()=>{if(n)return u;if(typeof window>"u")return d;try{let m=window.localStorage.getItem(_);if(m){let S=Number(m);if(Number.isFinite(S)&&S>=p&&S<=r)return S}}catch{}return d}),E=n?u:L,v=react.useRef(null),B=react.useRef({minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f});B.current={minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f};let w=react.useRef(null);if(!w.current){let m=P=>{let D=v.current;if(!D)return;let I=B.current,q=D.startX-P.clientX,N=Math.min(I.maxWidth,Math.max(I.minWidth,D.startWidth+q));D.lastWidth=N,I.isControlled||h(N),I.onWidthChange?.(N);},S=()=>{let P=v.current;if(P&&(v.current=null,document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",S),!B.current.isControlled))try{window.localStorage.setItem(_,String(P.lastWidth));}catch{}};w.current={move:m,up:S};}let Y=react.useCallback(m=>{m.preventDefault();let S=n?u:L;v.current={startX:m.clientX,startWidth:S,lastWidth:S},document.addEventListener("pointermove",w.current.move),document.addEventListener("pointerup",w.current.up);},[]);return react.useEffect(()=>()=>{let m=w.current;m&&(document.removeEventListener("pointermove",m.move),document.removeEventListener("pointerup",m.up));},[]),jsxRuntime.jsxs("div",{className:`ep-agent-panel${i?` ${i}`:""}`,style:{width:o?0:E,flex:o?"0 0 0px":`0 0 ${E}px`,height:"calc(100% - 16px)",margin:o?"8px 0 8px 0":"8px 8px 8px 12px",display:"flex",flexDirection:"column",background:"#ffffff",border:o?"1px solid transparent":"1px solid #e3e3e3",borderRadius:16,boxShadow:o?"none":"0 1px 2px rgba(60,64,67,0.05), 0 4px 12px rgba(60,64,67,0.08)",opacity:o?0:1,pointerEvents:o?"none":"auto",position:"relative",boxSizing:"border-box",minWidth:o?0:p,overflow:"hidden",fontFamily:"'Google Sans', 'Google Sans Text', system-ui, -apple-system, sans-serif",transition:C?"flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), margin 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease":"opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease"},"aria-hidden":o,"data-testid":"agent-panel","data-state":o?"closed":"open",role:"complementary","aria-label":e,children:[jsxRuntime.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":c,onPointerDown:Y,style:{position:"absolute",left:-3,top:0,bottom:0,width:6,cursor:"col-resize",touchAction:"none",zIndex:1},"data-testid":"agent-panel-resize-handle"}),jsxRuntime.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 16px 10px",flex:"0 0 auto",background:"#ffffff"},children:[jsxRuntime.jsx("span",{style:{display:"inline-flex",alignItems:"center",color:"#0b57d0"},children:t??jsxRuntime.jsx(ae,{size:22})}),jsxRuntime.jsx("span",{style:{flex:1,fontSize:15,fontWeight:500,color:"#1f1f1f",letterSpacing:.1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),g&&jsxRuntime.jsx("button",{type:"button",onClick:g,"aria-label":l,title:l,"data-testid":"agent-panel-close",style:{border:"none",background:"transparent",padding:6,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#444746",borderRadius:999,transition:"background 0.15s"},onMouseEnter:m=>{m.currentTarget.style.background="#f1f3f4";},onMouseLeave:m=>{m.currentTarget.style.background="transparent";},children:jsxRuntime.jsx(le,{size:18})})]}),jsxRuntime.jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:x})]})}function ge(e){let t={},l=/(=\d+|\w+)\s*\{([^}]*)\}/g,c;for(;(c=l.exec(e))!==null;)t[c[1]]=c[2];return t}function F(e,t,l="en"){return t?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(u,d,p)=>{let r=Number(t[d]);if(isNaN(r))return u;let f=ge(p),g=f[`=${r}`];if(g!==void 0)return g.replace(/#/g,String(r));let x;try{x=new Intl.PluralRules(l).select(r);}catch{x=r===1?"one":"other";}return (f[x]??f.other??"").replace(/#/g,String(r))}).replace(/\{(\w+)\}/g,(u,d)=>{let p=t[d];return p!==void 0?String(p):`{${d}}`}):e}function V(e){let t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}var xe=y.agentPanel.thinking,he=y.agentPanel.composerPlaceholder,be=y.agentPanel.send,ye=e=>F(y.agentPanel.timeline.working,{count:e}),Ae=e=>F(y.agentPanel.timeline.summary,{count:e}),Se=e=>F(y.agentPanel.timeline.earlier,{count:e}),j="ep-agent-chat-keyframes",Ce=`
2
2
  @keyframes epAgentDot {
3
3
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
4
4
  40% { transform: scale(1); opacity: 1; }
package/dist/react.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-DZYPK4JQ.mjs';import {d,b,a as a$1}from'./chunk-24MVJKCP.mjs';export{c as getToolDisplayName}from'./chunk-24MVJKCP.mjs';import {useMemo,useCallback,useState,useRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var te=d();function ne(e){let{editorRef:t,author:l="AI"}=e,c=useMemo(()=>({get:()=>t.current?a(t.current,l):null}),[t,l]);return {executeToolCall:useCallback((d,p)=>{let r=c.get();return r?b(d,p,r):{success:false,error:"Editor not ready"}},[c]),toolSchemas:te}}function re(e){let{editorRef:t,author:l="AI",tools:c,include:u,exclude:d}=e,p=!!c&&Object.keys(c).length>0,r=useCallback(i=>!(u&&!u.includes(i)||d&&d.includes(i)),[u,d]),f=useMemo(()=>{let i=u||d?a$1.filter(n=>r(n.name)):a$1;if(!p)return i.map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}));let o=new Map(i.map(n=>[n.name,n]));for(let[n,C]of Object.entries(c))o.set(n,C);return Array.from(o.values()).map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}))},[c,p,u,d,r]),g=useCallback((i,o)=>{let n=t.current;if(!n)return {success:false,error:"Editor not ready."};let C=a(n,l),k=c?.[i];if(k)try{return k.handler(o,C)}catch(T){return {success:false,error:T instanceof Error?T.message:String(T)}}return r(i)?b(i,o,C):{success:false,error:`Tool '${i}' is not enabled.`}},[t,l,c,r]),x=useCallback(()=>{let i=t.current;if(!i)return {selection:null,currentPage:0,totalPages:0};let o=a(i,l);return {selection:o.getSelection(),currentPage:o.getCurrentPage(),totalPages:o.getTotalPages()}},[t,l]);return {tools:f,executeToolCall:g,getContext:x}}var y={agentPanel:{defaultTitle:"Assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var _="eigenpal:docx-editor:agentPanelWidth";function ae({size:e=22}){return jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}function le({size:e=18}){return jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}var ce=360,ue=280,de=600;function pe({title:e=y.agentPanel.defaultTitle,icon:t,closeLabel:l=y.agentPanel.close,resizeHandleLabel:c=y.agentPanel.resizeHandle,width:u,defaultWidth:d=ce,minWidth:p=ue,maxWidth:r=de,onWidthChange:f,onClose:g,children:x,className:i,closed:o=false}){let n=u!==void 0,[C,k]=useState(false),T=useRef(o);useEffect(()=>{if(T.current!==o){T.current=o,k(true);let m=window.setTimeout(()=>k(false),260);return ()=>window.clearTimeout(m)}},[o]);let[L,h]=useState(()=>{if(n)return u;if(typeof window>"u")return d;try{let m=window.localStorage.getItem(_);if(m){let S=Number(m);if(Number.isFinite(S)&&S>=p&&S<=r)return S}}catch{}return d}),E=n?u:L,v=useRef(null),B=useRef({minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f});B.current={minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f};let w=useRef(null);if(!w.current){let m=P=>{let D=v.current;if(!D)return;let I=B.current,q=D.startX-P.clientX,N=Math.min(I.maxWidth,Math.max(I.minWidth,D.startWidth+q));D.lastWidth=N,I.isControlled||h(N),I.onWidthChange?.(N);},S=()=>{let P=v.current;if(P&&(v.current=null,document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",S),!B.current.isControlled))try{window.localStorage.setItem(_,String(P.lastWidth));}catch{}};w.current={move:m,up:S};}let Y=useCallback(m=>{m.preventDefault();let S=n?u:L;v.current={startX:m.clientX,startWidth:S,lastWidth:S},document.addEventListener("pointermove",w.current.move),document.addEventListener("pointerup",w.current.up);},[]);return useEffect(()=>()=>{let m=w.current;m&&(document.removeEventListener("pointermove",m.move),document.removeEventListener("pointerup",m.up));},[]),jsxs("div",{className:`ep-agent-panel${i?` ${i}`:""}`,style:{width:o?0:E,flex:o?"0 0 0px":`0 0 ${E}px`,height:"calc(100% - 16px)",margin:o?"8px 0 8px 0":"8px 8px 8px 12px",display:"flex",flexDirection:"column",background:"#ffffff",border:o?"1px solid transparent":"1px solid #e3e3e3",borderRadius:16,boxShadow:o?"none":"0 1px 2px rgba(60,64,67,0.05), 0 4px 12px rgba(60,64,67,0.08)",opacity:o?0:1,pointerEvents:o?"none":"auto",position:"relative",boxSizing:"border-box",minWidth:o?0:p,overflow:"hidden",fontFamily:"'Google Sans', 'Google Sans Text', system-ui, -apple-system, sans-serif",transition:C?"flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), margin 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease":"opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease"},"aria-hidden":o,"data-testid":"agent-panel","data-state":o?"closed":"open",role:"complementary","aria-label":e,children:[jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":c,onPointerDown:Y,style:{position:"absolute",left:-3,top:0,bottom:0,width:6,cursor:"col-resize",touchAction:"none",zIndex:1},"data-testid":"agent-panel-resize-handle"}),jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 16px 10px",flex:"0 0 auto",background:"#ffffff"},children:[jsx("span",{style:{display:"inline-flex",alignItems:"center",color:"#0b57d0"},children:t??jsx(ae,{size:22})}),jsx("span",{style:{flex:1,fontSize:15,fontWeight:500,color:"#1f1f1f",letterSpacing:.1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),g&&jsx("button",{type:"button",onClick:g,"aria-label":l,title:l,"data-testid":"agent-panel-close",style:{border:"none",background:"transparent",padding:6,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#444746",borderRadius:999,transition:"background 0.15s"},onMouseEnter:m=>{m.currentTarget.style.background="#f1f3f4";},onMouseLeave:m=>{m.currentTarget.style.background="transparent";},children:jsx(le,{size:18})})]}),jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:x})]})}function ge(e){let t={},l=/(=\d+|\w+)\s*\{([^}]*)\}/g,c;for(;(c=l.exec(e))!==null;)t[c[1]]=c[2];return t}function F(e,t,l="en"){return t?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(u,d,p)=>{let r=Number(t[d]);if(isNaN(r))return u;let f=ge(p),g=f[`=${r}`];if(g!==void 0)return g.replace(/#/g,String(r));let x;try{x=new Intl.PluralRules(l).select(r);}catch{x=r===1?"one":"other";}return (f[x]??f.other??"").replace(/#/g,String(r))}).replace(/\{(\w+)\}/g,(u,d)=>{let p=t[d];return p!==void 0?String(p):`{${d}}`}):e}function V(e){let t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}var xe=y.agentPanel.thinking,he=y.agentPanel.composerPlaceholder,be=y.agentPanel.send,ye=e=>F(y.agentPanel.timeline.working,{count:e}),Ae=e=>F(y.agentPanel.timeline.summary,{count:e}),Se=e=>F(y.agentPanel.timeline.earlier,{count:e}),j="ep-agent-chat-keyframes",Ce=`
1
+ import {a}from'./chunk-J2BSSNNF.mjs';import {d,b,a as a$1}from'./chunk-24MVJKCP.mjs';export{c as getToolDisplayName}from'./chunk-24MVJKCP.mjs';import {useMemo,useCallback,useState,useRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var te=d();function ne(e){let{editorRef:t,author:l="AI"}=e,c=useMemo(()=>({get:()=>t.current?a(t.current,l):null}),[t,l]);return {executeToolCall:useCallback((d,p)=>{let r=c.get();return r?b(d,p,r):{success:false,error:"Editor not ready"}},[c]),toolSchemas:te}}function re(e){let{editorRef:t,author:l="AI",tools:c,include:u,exclude:d}=e,p=!!c&&Object.keys(c).length>0,r=useCallback(i=>!(u&&!u.includes(i)||d&&d.includes(i)),[u,d]),f=useMemo(()=>{let i=u||d?a$1.filter(n=>r(n.name)):a$1;if(!p)return i.map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}));let o=new Map(i.map(n=>[n.name,n]));for(let[n,C]of Object.entries(c))o.set(n,C);return Array.from(o.values()).map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}))},[c,p,u,d,r]),g=useCallback((i,o)=>{let n=t.current;if(!n)return {success:false,error:"Editor not ready."};let C=a(n,l),k=c?.[i];if(k)try{return k.handler(o,C)}catch(T){return {success:false,error:T instanceof Error?T.message:String(T)}}return r(i)?b(i,o,C):{success:false,error:`Tool '${i}' is not enabled.`}},[t,l,c,r]),x=useCallback(()=>{let i=t.current;if(!i)return {selection:null,currentPage:0,totalPages:0};let o=a(i,l);return {selection:o.getSelection(),currentPage:o.getCurrentPage(),totalPages:o.getTotalPages()}},[t,l]);return {tools:f,executeToolCall:g,getContext:x}}var y={agentPanel:{defaultTitle:"Assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var _="eigenpal:docx-editor:agentPanelWidth";function ae({size:e=22}){return jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}function le({size:e=18}){return jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}var ce=360,ue=280,de=600;function pe({title:e=y.agentPanel.defaultTitle,icon:t,closeLabel:l=y.agentPanel.close,resizeHandleLabel:c=y.agentPanel.resizeHandle,width:u,defaultWidth:d=ce,minWidth:p=ue,maxWidth:r=de,onWidthChange:f,onClose:g,children:x,className:i,closed:o=false}){let n=u!==void 0,[C,k]=useState(false),T=useRef(o);useEffect(()=>{if(T.current!==o){T.current=o,k(true);let m=window.setTimeout(()=>k(false),260);return ()=>window.clearTimeout(m)}},[o]);let[L,h]=useState(()=>{if(n)return u;if(typeof window>"u")return d;try{let m=window.localStorage.getItem(_);if(m){let S=Number(m);if(Number.isFinite(S)&&S>=p&&S<=r)return S}}catch{}return d}),E=n?u:L,v=useRef(null),B=useRef({minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f});B.current={minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f};let w=useRef(null);if(!w.current){let m=P=>{let D=v.current;if(!D)return;let I=B.current,q=D.startX-P.clientX,N=Math.min(I.maxWidth,Math.max(I.minWidth,D.startWidth+q));D.lastWidth=N,I.isControlled||h(N),I.onWidthChange?.(N);},S=()=>{let P=v.current;if(P&&(v.current=null,document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",S),!B.current.isControlled))try{window.localStorage.setItem(_,String(P.lastWidth));}catch{}};w.current={move:m,up:S};}let Y=useCallback(m=>{m.preventDefault();let S=n?u:L;v.current={startX:m.clientX,startWidth:S,lastWidth:S},document.addEventListener("pointermove",w.current.move),document.addEventListener("pointerup",w.current.up);},[]);return useEffect(()=>()=>{let m=w.current;m&&(document.removeEventListener("pointermove",m.move),document.removeEventListener("pointerup",m.up));},[]),jsxs("div",{className:`ep-agent-panel${i?` ${i}`:""}`,style:{width:o?0:E,flex:o?"0 0 0px":`0 0 ${E}px`,height:"calc(100% - 16px)",margin:o?"8px 0 8px 0":"8px 8px 8px 12px",display:"flex",flexDirection:"column",background:"#ffffff",border:o?"1px solid transparent":"1px solid #e3e3e3",borderRadius:16,boxShadow:o?"none":"0 1px 2px rgba(60,64,67,0.05), 0 4px 12px rgba(60,64,67,0.08)",opacity:o?0:1,pointerEvents:o?"none":"auto",position:"relative",boxSizing:"border-box",minWidth:o?0:p,overflow:"hidden",fontFamily:"'Google Sans', 'Google Sans Text', system-ui, -apple-system, sans-serif",transition:C?"flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), margin 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease":"opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease"},"aria-hidden":o,"data-testid":"agent-panel","data-state":o?"closed":"open",role:"complementary","aria-label":e,children:[jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":c,onPointerDown:Y,style:{position:"absolute",left:-3,top:0,bottom:0,width:6,cursor:"col-resize",touchAction:"none",zIndex:1},"data-testid":"agent-panel-resize-handle"}),jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 16px 10px",flex:"0 0 auto",background:"#ffffff"},children:[jsx("span",{style:{display:"inline-flex",alignItems:"center",color:"#0b57d0"},children:t??jsx(ae,{size:22})}),jsx("span",{style:{flex:1,fontSize:15,fontWeight:500,color:"#1f1f1f",letterSpacing:.1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),g&&jsx("button",{type:"button",onClick:g,"aria-label":l,title:l,"data-testid":"agent-panel-close",style:{border:"none",background:"transparent",padding:6,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#444746",borderRadius:999,transition:"background 0.15s"},onMouseEnter:m=>{m.currentTarget.style.background="#f1f3f4";},onMouseLeave:m=>{m.currentTarget.style.background="transparent";},children:jsx(le,{size:18})})]}),jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:x})]})}function ge(e){let t={},l=/(=\d+|\w+)\s*\{([^}]*)\}/g,c;for(;(c=l.exec(e))!==null;)t[c[1]]=c[2];return t}function F(e,t,l="en"){return t?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(u,d,p)=>{let r=Number(t[d]);if(isNaN(r))return u;let f=ge(p),g=f[`=${r}`];if(g!==void 0)return g.replace(/#/g,String(r));let x;try{x=new Intl.PluralRules(l).select(r);}catch{x=r===1?"one":"other";}return (f[x]??f.other??"").replace(/#/g,String(r))}).replace(/\{(\w+)\}/g,(u,d)=>{let p=t[d];return p!==void 0?String(p):`{${d}}`}):e}function V(e){let t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}var xe=y.agentPanel.thinking,he=y.agentPanel.composerPlaceholder,be=y.agentPanel.send,ye=e=>F(y.agentPanel.timeline.working,{count:e}),Ae=e=>F(y.agentPanel.timeline.summary,{count:e}),Se=e=>F(y.agentPanel.timeline.earlier,{count:e}),j="ep-agent-chat-keyframes",Ce=`
2
2
  @keyframes epAgentDot {
3
3
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
4
4
  40% { transform: scale(1); opacity: 1; }
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkLSPYEWWJ_js=require('./chunk-LSPYEWWJ.js'),chunkTFIRB2ZB_js=require('./chunk-TFIRB2ZB.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"DocxReviewer",{enumerable:true,get:function(){return chunkLSPYEWWJ_js.a}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunkTFIRB2ZB_js.m}});Object.defineProperty(exports,"docxAgentTools",{enumerable:true,get:function(){return chunkRI5S75JY_js.a}});Object.defineProperty(exports,"executeToolCall",{enumerable:true,get:function(){return chunkRI5S75JY_js.b}});Object.defineProperty(exports,"getToolDisplayName",{enumerable:true,get:function(){return chunkRI5S75JY_js.c}});Object.defineProperty(exports,"getToolSchemas",{enumerable:true,get:function(){return chunkRI5S75JY_js.d}});
1
+ 'use strict';var chunkRP4LYHUB_js=require('./chunk-RP4LYHUB.js'),chunk6Z6UJ4RC_js=require('./chunk-6Z6UJ4RC.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"DocxReviewer",{enumerable:true,get:function(){return chunkRP4LYHUB_js.a}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunk6Z6UJ4RC_js.m}});Object.defineProperty(exports,"docxAgentTools",{enumerable:true,get:function(){return chunkRI5S75JY_js.a}});Object.defineProperty(exports,"executeToolCall",{enumerable:true,get:function(){return chunkRI5S75JY_js.b}});Object.defineProperty(exports,"getToolDisplayName",{enumerable:true,get:function(){return chunkRI5S75JY_js.c}});Object.defineProperty(exports,"getToolSchemas",{enumerable:true,get:function(){return chunkRI5S75JY_js.d}});
package/dist/server.mjs CHANGED
@@ -1 +1 @@
1
- export{a as DocxReviewer}from'./chunk-BJPVVT5W.mjs';export{m as createReviewerBridge}from'./chunk-DEDOV3KL.mjs';export{a as docxAgentTools,b as executeToolCall,c as getToolDisplayName,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';
1
+ export{a as DocxReviewer}from'./chunk-MQIZY6IO.mjs';export{m as createReviewerBridge}from'./chunk-EKCQF23W.mjs';export{a as docxAgentTools,b as executeToolCall,c as getToolDisplayName,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';