@eigenpal/docx-editor-agents 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +13 -16
  2. package/dist/bridge.d.mts +1 -1
  3. package/dist/bridge.d.ts +1 -1
  4. package/dist/bridge.js +1 -1
  5. package/dist/bridge.mjs +1 -1
  6. package/dist/{chunk-NGMVN6QV.mjs → chunk-6KT5LOQB.mjs} +1 -1
  7. package/dist/chunk-B3LQVYMR.js +74 -0
  8. package/dist/{chunk-DDW6L3LZ.js → chunk-DIXFGAF5.js} +2 -2
  9. package/dist/chunk-EPRXZTIE.js +1 -0
  10. package/dist/{chunk-JQBSMHZA.mjs → chunk-HTU7NUTJ.mjs} +1 -1
  11. package/dist/chunk-L7LXQOTH.mjs +74 -0
  12. package/dist/chunk-MHUG23P6.js +5 -0
  13. package/dist/chunk-MK47WH2X.mjs +5 -0
  14. package/dist/{chunk-SCYZRJWI.js → chunk-NSFRE2VK.js} +1 -1
  15. package/dist/chunk-XDZHYYU6.mjs +1 -0
  16. package/dist/executor-SBR6X4JZ.mjs +1 -0
  17. package/dist/executor-ZTSOZMKE.js +1 -0
  18. package/dist/headless-6C4JSKYY.mjs +1 -0
  19. package/dist/headless-VGNLVFAJ.js +1 -0
  20. package/dist/index.d.mts +2 -2
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.js +1 -1
  23. package/dist/index.mjs +1 -1
  24. package/dist/mcp.d.mts +1 -1
  25. package/dist/mcp.d.ts +1 -1
  26. package/dist/react.d.mts +2 -2
  27. package/dist/react.d.ts +2 -2
  28. package/dist/react.js +1 -1
  29. package/dist/react.mjs +1 -1
  30. package/dist/{server-CGxgyhy-.d.mts → server-uM9UUIhk.d.mts} +190 -108
  31. package/dist/{server-CGxgyhy-.d.ts → server-uM9UUIhk.d.ts} +190 -108
  32. package/dist/server.d.mts +1 -1
  33. package/dist/server.d.ts +1 -1
  34. package/dist/server.js +1 -1
  35. package/dist/server.mjs +1 -1
  36. package/dist/vue.js +2 -2
  37. package/dist/vue.mjs +18 -20
  38. package/package.json +2 -2
  39. package/dist/chunk-7C5RGTQY.js +0 -71
  40. package/dist/chunk-MOAJJKKG.js +0 -5
  41. package/dist/chunk-NISW2GF6.js +0 -1
  42. package/dist/chunk-OHVUJUDE.mjs +0 -71
  43. package/dist/chunk-PSSPSJR4.mjs +0 -5
  44. package/dist/chunk-X4YGLGUM.mjs +0 -1
  45. package/dist/executor-QBMOTUCJ.js +0 -1
  46. package/dist/executor-RSQI3VOF.mjs +0 -1
  47. package/dist/headless-3IX5WQEZ.js +0 -1
  48. package/dist/headless-V7JUUMG6.mjs +0 -1
package/LICENSE CHANGED
@@ -55,7 +55,7 @@
55
55
  to the Licensor or its representatives, including but not limited to
56
56
  communication on electronic mailing lists, source code control systems,
57
57
  and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of tracking or improving the Work, but
58
+ Licensor for the purpose of discussing and improving the Work, but
59
59
  excluding communication that is conspicuously marked or otherwise
60
60
  designated in writing by the copyright owner as "Not a Contribution."
61
61
 
@@ -137,8 +137,8 @@
137
137
 
138
138
  6. Trademarks. This License does not grant permission to use the trade
139
139
  names, trademarks, service marks, or product names of the Licensor,
140
- except as required for describing the origin of the Work and
141
- reproducing the content of the NOTICE file.
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
142
 
143
143
  7. Disclaimer of Warranty. Unless required by applicable law or
144
144
  agreed to in writing, Licensor provides the Work (and each
@@ -162,7 +162,7 @@
162
162
  other commercial damages or losses), even if such Contributor
163
163
  has been advised of the possibility of such damages.
164
164
 
165
- 9. Accepting Warranty or Support. While redistributing
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
166
  the Work or Derivative Works thereof, You may choose to offer,
167
167
  and charge a fee for, acceptance of support, warranty, indemnity,
168
168
  or other liability obligations and/or rights consistent with this
@@ -171,7 +171,7 @@
171
171
  of any other Contributor, and only if You agree to indemnify,
172
172
  defend, and hold each Contributor harmless for any liability
173
173
  incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or support.
174
+ of your accepting any such warranty or additional liability.
175
175
 
176
176
  END OF TERMS AND CONDITIONS
177
177
 
@@ -181,13 +181,12 @@
181
181
  boilerplate notice, with the fields enclosed by brackets "[]"
182
182
  replaced with your own identifying information. (Don't include
183
183
  the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recognize that some
185
- additional formatting may help newer readers. Notice that the
186
- License also requires the Source form to retain the original
187
- copyright notice, and that the License also requires the License
188
- to be reproduced in any Derivative Works.
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
189
188
 
190
- Copyright 2024-2026 EigenPal
189
+ Copyright 2026 EigenPal Inc.
191
190
 
192
191
  Licensed under the Apache License, Version 2.0 (the "License");
193
192
  you may not use this file except in compliance with the License.
@@ -197,8 +196,6 @@
197
196
 
198
197
  Unless required by applicable law or agreed to in writing, software
199
198
  distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
201
- implied, including, without limitation, any warranties or conditions
202
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
203
- PARTICULAR PURPOSE. See the License for the specific language governing
204
- permissions and limitations under the License.
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/dist/bridge.d.mts CHANGED
@@ -15,4 +15,4 @@
15
15
  * @packageDocumentation
16
16
  * @public
17
17
  */
18
- export { j as AgentToolDefinition, k as AgentToolResult, h as ContentChangeEvent, E as EditorBridge, r as EditorRefLike, i as SelectionChangeEvent, n as agentTools, u as createEditorBridge, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-CGxgyhy-.mjs';
18
+ export { j as AgentToolDefinition, k as AgentToolResult, h as ContentChangeEvent, E as EditorBridge, r as EditorRefLike, i as SelectionChangeEvent, n as agentTools, u as createEditorBridge, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-uM9UUIhk.mjs';
package/dist/bridge.d.ts CHANGED
@@ -15,4 +15,4 @@
15
15
  * @packageDocumentation
16
16
  * @public
17
17
  */
18
- export { j as AgentToolDefinition, k as AgentToolResult, h as ContentChangeEvent, E as EditorBridge, r as EditorRefLike, i as SelectionChangeEvent, n as agentTools, u as createEditorBridge, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-CGxgyhy-.js';
18
+ export { j as AgentToolDefinition, k as AgentToolResult, h as ContentChangeEvent, E as EditorBridge, r as EditorRefLike, i as SelectionChangeEvent, n as agentTools, u as createEditorBridge, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-uM9UUIhk.js';
package/dist/bridge.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkDDW6L3LZ_js=require('./chunk-DDW6L3LZ.js'),chunkMOAJJKKG_js=require('./chunk-MOAJJKKG.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"createEditorBridge",{enumerable:true,get:function(){return chunkDDW6L3LZ_js.a}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunkMOAJJKKG_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 chunkDIXFGAF5_js=require('./chunk-DIXFGAF5.js'),chunkMHUG23P6_js=require('./chunk-MHUG23P6.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"createEditorBridge",{enumerable:true,get:function(){return chunkDIXFGAF5_js.a}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunkMHUG23P6_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/bridge.mjs CHANGED
@@ -1 +1 @@
1
- export{a as createEditorBridge}from'./chunk-JQBSMHZA.mjs';export{m as createReviewerBridge}from'./chunk-PSSPSJR4.mjs';export{a as agentTools,b as executeToolCall,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';
1
+ export{a as createEditorBridge}from'./chunk-HTU7NUTJ.mjs';export{m as createReviewerBridge}from'./chunk-MK47WH2X.mjs';export{a as agentTools,b as executeToolCall,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';
@@ -1 +1 @@
1
- import {d,e,k as k$1,l,b,i,h,c,j,g as g$1,a}from'./chunk-PSSPSJR4.mjs';import {w as w$1}from'./chunk-OHVUJUDE.mjs';function g(o,e){let{paragraphIndex:t,author:n="AI",text:s,search:a}=e,r=b(o,t),i$1=(o.comments??[]).map(m=>m.id),p=i$1.length>0?Math.max(...i$1)+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=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 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 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&&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 g$1(e)}function I(o,e){if(!W(o,e,"reject"))throw new g$1(e)}function k(o){return M(o,"accept")}function F(o){return M(o,"reject")}function M(o,e){let t=0;return c(o,n=>{for(let s=n.content.length-1;s>=0;s--){let a$1=n.content[s];a(a$1)&&(G(n,s,a$1,e),t++);}}),t}function W(o,e,t){let n=false;return c(o,s=>{for(let a$1=s.content.length-1;a$1>=0;a$1--){let r=s.content[a$1];a(r)&&r.info.id===e&&(G(s,a$1,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=b(o,t),{startIndex:i,endIndex:p}=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=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}=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=b(o,t),{startIndex:r,endIndex:i}=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,c(o,n=>{for(let s of n.content)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 w$1(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 d(this.body,e)}getContentAsText(e$1){return e(d(this.body,e$1))}getChanges(e){return k$1(this.body,e)}getComments(e){return 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-V7JUUMG6.mjs');return e(this.doc)}};export{U as a};
1
+ import {d,e,k as k$1,l,b,i,h,c,j,g as g$1,a}from'./chunk-MK47WH2X.mjs';import {w as w$1}from'./chunk-L7LXQOTH.mjs';function g(o,e){let{paragraphIndex:t,author:n="AI",text:s,search:a}=e,r=b(o,t),i$1=(o.comments??[]).map(m=>m.id),p=i$1.length>0?Math.max(...i$1)+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=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 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 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&&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 g$1(e)}function I(o,e){if(!W(o,e,"reject"))throw new g$1(e)}function k(o){return M(o,"accept")}function F(o){return M(o,"reject")}function M(o,e){let t=0;return c(o,n=>{for(let s=n.content.length-1;s>=0;s--){let a$1=n.content[s];a(a$1)&&(G(n,s,a$1,e),t++);}}),t}function W(o,e,t){let n=false;return c(o,s=>{for(let a$1=s.content.length-1;a$1>=0;a$1--){let r=s.content[a$1];a(r)&&r.info.id===e&&(G(s,a$1,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=b(o,t),{startIndex:i,endIndex:p}=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=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}=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=b(o,t),{startIndex:r,endIndex:i}=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,c(o,n=>{for(let s of n.content)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 w$1(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 d(this.body,e)}getContentAsText(e$1){return e(d(this.body,e$1))}getChanges(e){return k$1(this.body,e)}getComments(e){return 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-6C4JSKYY.mjs');return e(this.doc)}};export{U as a};