n8n-nodes-adeu 1.8.0 → 1.9.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.
@@ -10,7 +10,7 @@
10
10
  `):r,a=i.toLowerCase();if(n==="BatchValidationError"){let s="Batch validation failed.",l=`Review the listed failures:
11
11
  `+i;return a.includes("target text not found")?(s="An edit could not be applied: target text not found.",l="Verify the exact `target_text` string \u2014 including punctuation and whitespace \u2014 against the document. Check the individual failures:\n"+i):a.includes("ambiguous match")?(s="An edit matched multiple locations in the document.",l="Provide more surrounding context in `target_text` to uniquely identify the location:\n"+i):a.includes("read-only")||a.includes("readonly")?(s="An edit targeted a read-only structural element.",l=`Cross-references, footnotes, hyperlinks, and the Structural Appendix cannot be modified via text replacement:
12
12
  `+i):(a.includes("another author")||a.includes("nested"))&&(s="An edit overlaps with a pending tracked change by another author.",l=`Accept or reject the conflicting change first, or scope your edit outside of it:
13
- `+i),new n8nWorkflow.NodeApiError(this.getNode(),{message:i,errors:o},{message:s,description:l,itemIndex:t})}return a.includes("invalid docx")||a.includes("missing word/document.xml")?new n8nWorkflow.NodeApiError(this.getNode(),{message:r},{message:"The document could not be opened.",description:"Verify the input binary is a valid .docx file (not .doc, .pdf, or another format).",itemIndex:t}):new n8nWorkflow.NodeApiError(this.getNode(),{message:r},{message:"Adeu engine error.",description:r,itemIndex:t})}h(On,"mapAdeuErrorToNodeApiError");function Qo(e){if(!e||typeof e!="object")return false;let t=e;return typeof t.id=="string"&&typeof t.fileName=="string"&&typeof t.mimeType=="string"}h(Qo,"isStashedBinaryEntry");var Pn=[{displayName:"Static Data Key",name:"staticDataKey",type:"string",default:"adeu_last_redlined",required:true,placeholder:"e.g. adeu_last_redlined",description:"Key in workflow global static data to read the stashed binary metadata from (string). When the Apply Edits operation runs as an AI Agent tool, n8n's tool wrapper strips the binary from its output before any downstream node can see it. To work around that, Apply Edits writes the binary's storage id into workflow static data under 'adeu_last_redlined'. This operation reads that entry back, fetches the original buffer via getBinaryStream, and attaches a fresh IBinaryData onto the outgoing item. Leave the default unless you've customized the stash key on the Apply Edits side.",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"Output Binary Property",name:"outputBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the outgoing item that will hold the hydrated .docx (string, e.g. 'data'). Downstream nodes (e.g. Write Binary File, Gmail send) should be configured to read from this property name.",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"On Missing",name:"onMissing",type:"options",default:"emit_empty",description:"What to do when no stashed binary entry is found under the configured key. 'Emit Empty' is the typical AI Agent path: emits an item with json.hydrated=false and no binary, so a downstream If node can gate any write step on whether the LLM actually called Apply Edits this turn. 'Throw' is for deterministic pipelines where the stash MUST be present and a missing entry indicates a workflow bug.",options:[{name:"Emit Empty",value:"emit_empty",description:"Emit a single item with json.hydrated=false and no binary. Downstream If on json.hydrated gates the write."},{name:"Throw",value:"throw",description:"Throw a NodeOperationError. Use when a missing stash indicates a workflow bug."}],displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"Clear After Read",name:"clearAfterRead",type:"boolean",default:true,description:"Whether to delete the static data entry after a successful hydration so it does not leak across workflow runs. Set false if you want to inspect or re-read the entry from a later node in the same run.",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"Output Path Template",name:"outputPathTemplate",type:"string",default:"",placeholder:"e.g. C:\\Users\\Uzair\\.n8n-files\\{baseName}_{timestamp}.docx",description:"Optional template to compute the final write path on disk, returned on the output JSON as 'outputPath'. If set, you can configure downstream Write nodes to simply read '{{ $json.outputPath }}' with zero escaping risks. Supports these placeholders: '{baseName}' (filename with extension stripped), '{timestamp}' (current ISO 8601 timestamp with colons and dots replaced by dashes for Windows file compatibility), '{fileName}' (the stashed filename including extension), and '{ext}' (e.g., '.docx').",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}}];async function Mn(e){let t=this.getNodeParameter("staticDataKey",e),r=this.getNodeParameter("outputBinaryPropertyName",e),n=this.getNodeParameter("onMissing",e),o=this.getNodeParameter("clearAfterRead",e),i=this.getWorkflowStaticData("global"),a=i[t];if(!Qo(a)){if(n==="throw")throw new n8nWorkflow.NodeOperationError(this.getNode(),`No stashed binary found under static data key "${t}".`,{description:"The Apply Edits operation writes a stash entry into workflow static data only when it runs as an AI Agent tool and produces a binary. Verify that Apply Edits was actually called by the agent this turn, that it ran successfully, and that the key matches the one used on the writing side.",itemIndex:e});return [{json:{hydrated:false},pairedItem:{item:e}}]}let{id:s,fileName:l,mimeType:u}=a,f;try{let m=await this.helpers.getBinaryStream(s);f=await this.helpers.binaryToBuffer(m);}catch(m){throw new n8nWorkflow.NodeOperationError(this.getNode(),`Failed to load stashed binary (id=${s}) from external storage.`,{description:`The stash entry under "${t}" points at binary id "${s}", but the underlying data could not be loaded. This usually means the binary has been garbage-collected (n8n's execution data retention may be too short) or external storage is unavailable. Underlying error: ${m.message}`,itemIndex:e})}let c=u||et,d=await this.helpers.prepareBinaryData(f,l,c);o&&delete i[t];let p=this.getNodeParameter("outputPathTemplate",e,""),g;if(p.trim()!==""){let m=l.replace(/\.docx$/i,""),b=l.match(/\.docx$/i)?.[0]??".docx",y=new Date().toISOString().replace(/[:.]/g,"-").replace(/Z$/,"");g=p.replaceAll("{baseName}",m).replaceAll("{timestamp}",y).replaceAll("{fileName}",l).replaceAll("{ext}",b);}return [{json:{hydrated:true,fileName:l,sourceBinaryId:s,mimeType:c,...g!==void 0?{outputPath:g}:{}},binary:{[r]:d},pairedItem:{item:e}}]}h(Mn,"executeHydrateToolOutput");var zn=Lr(Bn());var Jo=(0, zn.createRequire)("/"),ft,Zo,Ko;try{ft=Jo("worker_threads"),Zo=ft.Worker,Ko=ft.isMarkedAsUntransferable;}catch{}var te=Uint8Array,we=Uint16Array,Qr=Int32Array,ur=new te([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),lr=new te([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wr=new te([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jn=h(function(e,t){for(var r=new we(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var o=new Qr(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return {b:r,r:o}},"freb"),ft=jn(ur,2),Wn=ft.b,Hr=ft.r;Wn[28]=258,Hr[258]=28;var Hn=jn(lr,0),ea=Hn.b,Fn=Hn.r,Vr=new we(32768);for(V=0;V<32768;++V)Fe=(V&43690)>>1|(V&21845)<<1,Fe=(Fe&52428)>>2|(Fe&13107)<<2,Fe=(Fe&61680)>>4|(Fe&3855)<<4,Vr[V]=((Fe&65280)>>8|(Fe&255)<<8)>>1;var Fe,V,Oe=h((function(e,t,r){for(var n=e.length,o=0,i=new we(t);o<n;++o)e[o]&&++i[e[o]-1];var a=new we(t);for(o=1;o<t;++o)a[o]=a[o-1]+i[o-1]<<1;var s;if(r){s=new we(1<<t);var l=15-t;for(o=0;o<n;++o)if(e[o])for(var u=o<<4|e[o],f=t-e[o],c=a[e[o]-1]++<<f,d=c|(1<<f)-1;c<=d;++c)s[Vr[c]>>l]=u;}else for(s=new we(n),o=0;o<n;++o)e[o]&&(s[o]=Vr[a[e[o]-1]++]>>15-e[o]);return s}),"hMap"),je=new te(288);for(V=0;V<144;++V)je[V]=8;var V;for(V=144;V<256;++V)je[V]=9;var V;for(V=256;V<280;++V)je[V]=7;var V;for(V=280;V<288;++V)je[V]=8;var V,Bt=new te(32);for(V=0;V<32;++V)Bt[V]=5;var V,ta=Oe(je,9,0),ra=Oe(je,9,1),na=Oe(Bt,5,0),ia=Oe(Bt,5,1),Ur=h(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),Te=h(function(e,t,r){var n=t/8|0;return (e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),qr=h(function(e,t){var r=t/8|0;return (e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),Jr=h(function(e){return (e+7)/8|0},"shft"),Ft=h(function(e,t,r){return (t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new te(e.subarray(t,r))},"slc");var oa=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],he=h(function(e,t,r){var n=new Error(t||oa[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,he),!r)throw n;return n},"err"),aa=h(function(e,t,r,n){var o=e.length,i=n?n.length:0;if(!o||t.f&&!t.l)return r||new te(0);var a=!r,s=a||t.i!=2,l=t.i;a&&(r=new te(o*3));var u=h(function(kt){var Pt=r.length;if(kt>Pt){var ct=new te(Math.max(Pt*2,kt));ct.set(r),r=ct;}},"cbuf"),f=t.f||0,c=t.p||0,d=t.b||0,p=t.l,g=t.d,m=t.m,b=t.n,y=o*8;do{if(!p){f=Te(e,c,1);var w=Te(e,c+1,3);if(c+=3,w)if(w==1)p=ra,g=ia,m=9,b=5;else if(w==2){var E=Te(e,c,31)+257,A=Te(e,c+10,15)+4,N=E+Te(e,c+5,31)+1;c+=14;for(var C=new te(N),F=new te(19),k=0;k<A;++k)F[Wr[k]]=Te(e,c+k*3,7);c+=A*3;for(var R=Ur(F),j=(1<<R)-1,O=Oe(F,R,1),k=0;k<N;){var G=O[Te(e,c,j)];c+=G&15;var v=G>>4;if(v<16)C[k++]=v;else {var z=0,L=0;for(v==16?(L=3+Te(e,c,3),c+=2,z=C[k-1]):v==17?(L=3+Te(e,c,7),c+=3):v==18&&(L=11+Te(e,c,127),c+=7);L--;)C[k++]=z;}}var Y=C.subarray(0,E),I=C.subarray(E);m=Ur(Y),b=Ur(I),p=Oe(Y,m,1),g=Oe(I,b,1);}else he(1);else {var v=Jr(c)+4,_=e[v-4]|e[v-3]<<8,D=v+_;if(D>o){l&&he(0);break}s&&u(d+_),r.set(e.subarray(v,D),d),t.b=d+=_,t.p=c=D*8,t.f=f;continue}if(c>y){l&&he(0);break}}s&&u(d+131072);for(var Z=(1<<m)-1,ie=(1<<b)-1,oe=c;;oe=c){var z=p[qr(e,c)&Z],_e=z>>4;if(c+=z&15,c>y){l&&he(0);break}if(z||he(2),_e<256)r[d++]=_e;else if(_e==256){oe=c,p=null;break}else {var ve=_e-254;if(_e>264){var k=_e-257,ee=ur[k];ve=Te(e,c,(1<<ee)-1)+Wn[k],c+=ee;}var xe=g[qr(e,c)&ie],ut=xe>>4;xe||he(3),c+=xe&15;var I=ea[ut];if(ut>3){var ee=lr[ut];I+=qr(e,c)&(1<<ee)-1,c+=ee;}if(c>y){l&&he(0);break}s&&u(d+131072);var lt=d+ve;if(d<I){var ir=i-I,or=Math.min(I,lt);for(ir+d<0&&he(3);d<or;++d)r[d]=n[ir+d];}for(;d<lt;++d)r[d]=r[d-I];}}t.l=p,t.p=oe,t.b=d,t.f=f,p&&(f=1,t.m=m,t.d=g,t.n=b);}while(!f);return d!=r.length&&a?Ft(r,0,d):r.subarray(0,d)},"inflt"),Le=h(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8;},"wbits"),Mt=h(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16;},"wbits16"),zr=h(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,i=r.slice();if(!o)return {t:Gn,l:0};if(o==1){var a=new te(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(D,E){return D.f-E.f}),r.push({s:-1,f:25001});var s=r[0],l=r[1],u=0,f=1,c=2;for(r[0]={s:-1,f:s.f+l.f,l:s,r:l};f!=o-1;)s=r[r[u].f<r[c].f?u++:c++],l=r[u!=f&&r[u].f<r[c].f?u++:c++],r[f++]={s:-1,f:s.f+l.f,l:s,r:l};for(var d=i[0].s,n=1;n<o;++n)i[n].s>d&&(d=i[n].s);var p=new we(d+1),g=Gr(r[f-1],p,0);if(g>t){var n=0,m=0,b=g-t,y=1<<b;for(i.sort(function(E,A){return p[A.s]-p[E.s]||E.f-A.f});n<o;++n){var w=i[n].s;if(p[w]>t)m+=y-(1<<g-p[w]),p[w]=t;else break}for(m>>=b;m>0;){var v=i[n].s;p[v]<t?m-=1<<t-p[v]++-1:++n;}for(;n>=0&&m;--n){var _=i[n].s;p[_]==t&&(--p[_],++m);}g=t;}return {t:new te(p),l:g}},"hTree"),Gr=h(function(e,t,r){return e.s==-1?Math.max(Gr(e.l,t,r+1),Gr(e.r,t,r+1)):t[e.s]=r},"ln"),Ln=h(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new we(++t),n=0,o=e[0],i=1,a=h(function(l){r[n++]=l;},"w"),s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else {if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0);}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0);}for(;i--;)a(o);i=1,o=e[s];}return {c:r.subarray(0,n),n:t}},"lc"),Rt=h(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),Vn=h(function(e,t,r){var n=r.length,o=Jr(t+2);e[o]=n&255,e[o+1]=n>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var i=0;i<n;++i)e[o+i+4]=r[i];return (o+4+n)*8},"wfblk"),$n=h(function(e,t,r,n,o,i,a,s,l,u,f){Le(t,f++,r),++o[256];for(var c=zr(o,15),d=c.t,p=c.l,g=zr(i,15),m=g.t,b=g.l,y=Ln(d),w=y.c,v=y.n,_=Ln(m),D=_.c,E=_.n,A=new we(19),N=0;N<w.length;++N)++A[w[N]&31];for(var N=0;N<D.length;++N)++A[D[N]&31];for(var C=zr(A,7),F=C.t,k=C.l,R=19;R>4&&!F[Wr[R-1]];--R);var j=u+5<<3,O=Rt(o,je)+Rt(i,Bt)+a,G=Rt(o,d)+Rt(i,m)+a+14+3*R+Rt(A,F)+2*A[16]+3*A[17]+7*A[18];if(l>=0&&j<=O&&j<=G)return Vn(t,f,e.subarray(l,l+u));var z,L,Y,I;if(Le(t,f,1+(G<O)),f+=2,G<O){z=Oe(d,p,0),L=d,Y=Oe(m,b,0),I=m;var Z=Oe(F,k,0);Le(t,f,v-257),Le(t,f+5,E-1),Le(t,f+10,R-4),f+=14;for(var N=0;N<R;++N)Le(t,f+3*N,F[Wr[N]]);f+=3*R;for(var ie=[w,D],oe=0;oe<2;++oe)for(var _e=ie[oe],N=0;N<_e.length;++N){var ve=_e[N]&31;Le(t,f,Z[ve]),f+=F[ve],ve>15&&(Le(t,f,_e[N]>>5&127),f+=_e[N]>>12);}}else z=ta,L=je,Y=na,I=Bt;for(var N=0;N<s;++N){var ee=n[N];if(ee>255){var ve=ee>>18&31;Mt(t,f,z[ve+257]),f+=L[ve+257],ve>7&&(Le(t,f,ee>>23&31),f+=ur[ve]);var xe=ee&31;Mt(t,f,Y[xe]),f+=I[xe],xe>3&&(Mt(t,f,ee>>5&8191),f+=lr[xe]);}else Mt(t,f,z[ee]),f+=L[ee];}return Mt(t,f,z[256]),f+L[256]},"wblk"),sa=new Qr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gn=new te(0),ua=h(function(e,t,r,n,o,i){var a=i.z||e.length,s=new te(n+a+5*(1+Math.ceil(a/7e3))+o),l=s.subarray(n,s.length-o),u=i.l,f=(i.r||0)&7;if(t){f&&(l[0]=i.r>>3);for(var c=sa[t-1],d=c>>13,p=c&8191,g=(1<<r)-1,m=i.p||new we(32768),b=i.h||new we(g+1),y=Math.ceil(r/3),w=2*y,v=h(function(Br){return (e[Br]^e[Br+1]<<y^e[Br+2]<<w)&g},"hsh"),_=new Qr(25e3),D=new we(288),E=new we(32),A=0,N=0,C=i.i||0,F=0,k=i.w||0,R=0;C+2<a;++C){var j=v(C),O=C&32767,G=b[j];if(m[O]=G,b[j]=O,k<=C){var z=a-C;if((A>7e3||F>24576)&&(z>423||!u)){f=$n(e,l,0,_,D,E,N,F,R,C-R,f),F=A=N=0,R=C;for(var L=0;L<286;++L)D[L]=0;for(var L=0;L<30;++L)E[L]=0;}var Y=2,I=0,Z=p,ie=O-G&32767;if(z>2&&j==v(C-ie))for(var oe=Math.min(d,z)-1,_e=Math.min(32767,C),ve=Math.min(258,z);ie<=_e&&--Z&&O!=G;){if(e[C+Y]==e[C+Y-ie]){for(var ee=0;ee<ve&&e[C+ee]==e[C+ee-ie];++ee);if(ee>Y){if(Y=ee,I=ie,ee>oe)break;for(var xe=Math.min(ie,ee-2),ut=0,L=0;L<xe;++L){var lt=C-ie+L&32767,ir=m[lt],or=lt-ir&32767;or>ut&&(ut=or,G=lt);}}}O=G,G=m[O],ie+=O-G&32767;}if(I){_[F++]=268435456|Hr[Y]<<18|Fn[I];var kt=Hr[Y]&31,Pt=Fn[I]&31;N+=ur[kt]+lr[Pt],++D[257+kt],++E[Pt],k=C+Y,++A;}else _[F++]=e[C],++D[e[C]];}}for(C=Math.max(C,k);C<a;++C)_[F++]=e[C],++D[e[C]];f=$n(e,l,u,_,D,E,N,F,R,C-R,f),u||(i.r=f&7|l[f/8|0]<<3,f-=7,i.h=b,i.p=m,i.i=C,i.w=k);}else {for(var C=i.w||0;C<a+u;C+=65535){var ct=C+65535;ct>=a&&(l[f/8|0]=u,ct=a),f=Vn(l,f+1,e.subarray(C,ct));}i.i=a;}return Ft(s,0,n+Jr(f)+o)},"dflt"),la=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r;}return e})(),ca=h(function(){var e=-1;return {p:h(function(t){for(var r=e,n=0;n<t.length;++n)r=la[r&255^t[n]]^r>>>8;e=r;},"p"),d:h(function(){return ~e},"d")}},"crc");var fa=h(function(e,t,r,n,o){if(!o&&(o={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),a=new te(i.length+e.length);a.set(i),a.set(e,i.length),e=a,o.w=i.length;}return ua(e,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,o)},"dopt"),Xn=h(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg");var Ie=h(function(e,t){return e[t]|e[t+1]<<8},"b2"),Ee=h(function(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),jr=h(function(e,t){return Ee(e,t)+Ee(e,t+4)*4294967296},"b8"),ue=h(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8;},"wbytes");function ha(e,t){return fa(e,t||{},0,0)}h(ha,"deflateSync");function da(e,t){return aa(e,{i:2},t&&t.out,t&&t.dictionary)}h(da,"inflateSync");var Yn=h(function(e,t,r,n){for(var o in e){var i=e[o],a=t+o,s=n;Array.isArray(i)&&(s=Xn(n,i[1]),i=i[0]),ArrayBuffer.isView(i)?r[a]=[i,s]:(r[a+="/"]=[new te(0),s],Yn(i,a,r,n));}},"fltn"),Un=typeof TextEncoder<"u"&&new TextEncoder,Xr=typeof TextDecoder<"u"&&new TextDecoder,pa=0;try{Xr.decode(Gn,{stream:!0}),pa=1;}catch{}var ma=h(function(e){for(var t="",r=0;;){var n=e[r++],o=(n>127)+(n>223)+(n>239);if(r+o>e.length)return {s:t,r:Ft(e,r-1)};o?o==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):o&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n);}},"dutf8");function sr(e,t){if(t){for(var r=new te(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(Un)return Un.encode(e);for(var o=e.length,i=new te(e.length+(e.length>>1)),a=0,s=h(function(f){i[a++]=f;},"w"),n=0;n<o;++n){if(a+5>i.length){var l=new te(a+8+(o-n<<1));l.set(i),i=l;}var u=e.charCodeAt(n);u<128||t?s(u):u<2048?(s(192|u>>6),s(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++n)&1023,s(240|u>>18),s(128|u>>12&63),s(128|u>>6&63),s(128|u&63)):(s(224|u>>12),s(128|u>>6&63),s(128|u&63));}return Ft(i,0,a)}h(sr,"strToU8");function cr(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else {if(Xr)return Xr.decode(e);var o=ma(e),i=o.s,r=o.r;return r.length&&he(8),i}}h(cr,"strFromU8");var ga=h(function(e,t){return t+30+Ie(e,t+26)+Ie(e,t+28)},"slzh"),_a=h(function(e,t,r){var n=Ie(e,t+28),o=Ie(e,t+30),i=cr(e.subarray(t+46,t+46+n),!(Ie(e,t+8)&2048)),a=t+46+n,s=va(e,a,o,r,Ee(e,t+20),Ee(e,t+24),Ee(e,t+42)),l=s[0],u=s[1],f=s[2];return [Ie(e,t+10),l,u,i,a+o+Ie(e,t+32),f]},"zh"),va=h(function(e,t,r,n,o,i,a){var s=o==4294967295,l=i==4294967295,u=a==4294967295,f=t+r,c=s+l+u;if(n&&c){for(;t+4<f;t+=4+Ie(e,t+2))if(Ie(e,t)==1)return [s?jr(e,t+4+8*l):o,l?jr(e,t+4):i,u?jr(e,t+4+8*(l+s)):a,1];n<2&&he(13);}return [o,i,a,0]},"z64hs"),Yr=h(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&he(9),t+=n+4;}return t},"exfl"),qn=h(function(e,t,r,n,o,i,a,s){var l=n.length,u=r.extra,f=s&&s.length,c=Yr(u);ue(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(i<0&&8),e[t++]=o&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var d=new Date(r.mtime==null?Date.now():r.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&he(10),ue(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,i!=-1&&(ue(e,t,r.crc),ue(e,t+4,i<0?-i-2:i),ue(e,t+8,r.size)),ue(e,t+12,l),ue(e,t+14,c),t+=16,a!=null&&(ue(e,t,f),ue(e,t+6,r.attrs),ue(e,t+10,a),t+=14),e.set(n,t),t+=l,c)for(var g in u){var m=u[g],b=m.length;ue(e,t,+g),ue(e,t+2,b),e.set(m,t+4),t+=4+b;}return f&&(e.set(s,t),t+=f),t},"wzh"),wa=h(function(e,t,r,n,o){ue(e,t,101010256),ue(e,t+8,r),ue(e,t+10,r),ue(e,t+12,n),ue(e,t+16,o);},"wzf");function Qn(e,t){t||(t={});var r={},n=[];Yn(e,"",r,t);var o=0,i=0;for(var a in r){var s=r[a],l=s[0],u=s[1],f=u.level==0?0:8,c=sr(a),d=c.length,p=u.comment,g=p&&sr(p),m=g&&g.length,b=Yr(u.extra);d>65535&&he(11);var y=f?ha(l,u):l,w=y.length,v=ca();v.p(l),n.push(Xn(u,{size:l.length,crc:v.d(),c:y,f:c,m:g,u:d!=a.length||g&&p.length!=m,o,compression:f})),o+=30+d+b+w,i+=76+2*(d+b)+(m||0)+w;}for(var _=new te(i+22),D=o,E=i-o,A=0;A<n.length;++A){var c=n[A];qn(_,c.o,c,c.f,c.u,c.c.length);var N=30+c.f.length+Yr(c.extra);_.set(c.c,c.o+N),qn(_,o,c,c.f,c.u,c.c.length,c.o,c.m),o+=16+N+(c.m?c.m.length:0);}return wa(_,o,n.length,E,D),_}h(Qn,"zipSync");function Jn(e,t){for(var r={},n=e.length-22;Ee(e,n)!=101010256;--n)(!n||e.length-n>65558)&&he(13);var o=Ie(e,n+8);if(!o)return {};var i=Ee(e,n+16),a=Ee(e,n-20)==117853008;if(a){var s=Ee(e,n-12);a=Ee(e,s)==101075792,a&&(o=Ee(e,s+32),i=Ee(e,s+48));}for(var l=t&&t.filter,u=0;u<o;++u){var f=_a(e,i,a),c=f[0],d=f[1],p=f[2],g=f[3],m=f[4],b=f[5],y=ga(e,b);i=m,(!l||l({name:g,size:d,originalSize:p,compression:c}))&&(c?c==8?r[g]=da(e.subarray(y,y+d),{out:new te(p)}):he(14,"unknown compression type "+c):r[g]=Ft(e,y,y+d));}return r}h(Jn,"unzipSync");var kr=Lr(ao()),xo=Lr(so());function P(e,t){for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];if(n.nodeType===1&&n.tagName===t)return n}return null}h(P,"findChild");function cu(e,t){let r=[];for(let n=0;n<e.childNodes.length;n++){let o=e.childNodes[n];o.nodeType===1&&o.tagName===t&&r.push(o);}return r}h(cu,"findChildren");function x(e,t){return Array.from(e.getElementsByTagName(t))}h(x,"findAllDescendants");function En(e){return new kr.DOMParser().parseFromString(e,"text/xml")}h(En,"parseXml");function fu(e){let t=new kr.XMLSerializer().serializeToString(e),n=/<([a-zA-Z0-9_:]+)(\s+[^>]+?)(>|\/>)/.exec(t);if(n&&!n[1].startsWith("?")){let o=n.index,i=t.substring(0,o);if(!i.includes("<")||i.trim().startsWith("<?xml")&&(i.match(/</g)||[]).length===1){let s=n[0],l=`<${n[1]}`,u=n[2],f=n[3],c=/([a-zA-Z0-9_:]+)\s*=\s*(["'])(.*?)\2/g,d=[],p;for(;(p=c.exec(u))!==null;)d.push(p[0].trim());d.sort((m,b)=>{let y=m.split("=")[0].trim(),w=b.split("=")[0].trim(),v=y.startsWith("xmlns"),_=w.startsWith("xmlns");return v&&!_?-1:!v&&_?1:y<w?-1:y>w?1:0});let g=d.length>0?`${l} ${d.join(" ")}${f}`:`${l}${f}`;t=t.substring(0,o)+g+t.substring(o+s.length);}}return t}h(fu,"serializeXml");var Ir=class{static{h(this,"Relationship");}constructor(e,t,r,n){this.id=e,this.type=t,this.target=r,this.isExternal=n;}id;type;target;isExternal},po=class{static{h(this,"Part");}constructor(e,t,r,n){this.partname=e,this.blob=t,this.contentType=n,this._element=r;}partname;blob;contentType;rels=new Map;_element;package;addRelationship(e,t,r,n=false){if(this.rels.set(e,new Ir(e,t,r,n)),this.partname.endsWith(".rels")){let o=this._element.ownerDocument;if(o){let i=o.createElementNS("http://schemas.openxmlformats.org/package/2006/relationships","Relationship");i.setAttribute("Id",e),i.setAttribute("Type",t),i.setAttribute("Target",r),n&&i.setAttribute("TargetMode","External"),this._element.appendChild(i);}}}},hu=class{static{h(this,"DocxPackage");}constructor(e){this.unzipped=e;}unzipped;parts=[];mainDocumentPart;getPartByPath(e){let t=e.startsWith("/")?e.substring(1):e;return this.parts.find(r=>r.partname===t||r.partname==="/"+t)}nextPartname(e){let t=1;for(;;){let r=e.replace("%d",t===1?"":t.toString());if(!this.getPartByPath(r))return r;t++;}}addPart(e,t,r){let n=En(r),o=new po(e,r,n.documentElement,t);o.package=this,this.parts.push(o);let i=this.getPartByPath("[Content_Types].xml");if(i){let a=i._element.ownerDocument;if(a){let s=a.createElement("Override");s.setAttribute("PartName",e),s.setAttribute("ContentType",t),i._element.appendChild(s);}}return o}getOrCreateRelsPart(e){let t=e.split("/"),r=t.pop(),n=t.join("/")+"/_rels/"+r+".rels",o=this.getPartByPath(n);return o||(o=this.addPart(n,"application/vnd.openxmlformats-package.relationships+xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
13
+ `+i),new n8nWorkflow.NodeApiError(this.getNode(),{message:i,errors:o},{message:s,description:l,itemIndex:t})}return a.includes("invalid docx")||a.includes("missing word/document.xml")?new n8nWorkflow.NodeApiError(this.getNode(),{message:r},{message:"The document could not be opened.",description:"Verify the input binary is a valid .docx file (not .doc, .pdf, or another format).",itemIndex:t}):new n8nWorkflow.NodeApiError(this.getNode(),{message:r},{message:"Adeu engine error.",description:r,itemIndex:t})}h(On,"mapAdeuErrorToNodeApiError");function Qo(e){if(!e||typeof e!="object")return false;let t=e;return typeof t.id=="string"&&typeof t.fileName=="string"&&typeof t.mimeType=="string"}h(Qo,"isStashedBinaryEntry");var Pn=[{displayName:"Static Data Key",name:"staticDataKey",type:"string",default:"adeu_last_redlined",required:true,placeholder:"e.g. adeu_last_redlined",description:"Key in workflow global static data to read the stashed binary metadata from (string). When the Apply Edits operation runs as an AI Agent tool, n8n's tool wrapper strips the binary from its output before any downstream node can see it. To work around that, Apply Edits writes the binary's storage id into workflow static data under 'adeu_last_redlined'. This operation reads that entry back, fetches the original buffer via getBinaryStream, and attaches a fresh IBinaryData onto the outgoing item. Leave the default unless you've customized the stash key on the Apply Edits side.",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"Output Binary Property",name:"outputBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the outgoing item that will hold the hydrated .docx (string, e.g. 'data'). Downstream nodes (e.g. Write Binary File, Gmail send) should be configured to read from this property name.",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"On Missing",name:"onMissing",type:"options",default:"emit_empty",description:"What to do when no stashed binary entry is found under the configured key. 'Emit Empty' is the typical AI Agent path: emits an item with json.hydrated=false and no binary, so a downstream If node can gate any write step on whether the LLM actually called Apply Edits this turn. 'Throw' is for deterministic pipelines where the stash MUST be present and a missing entry indicates a workflow bug.",options:[{name:"Emit Empty",value:"emit_empty",description:"Emit a single item with json.hydrated=false and no binary. Downstream If on json.hydrated gates the write."},{name:"Throw",value:"throw",description:"Throw a NodeOperationError. Use when a missing stash indicates a workflow bug."}],displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"Clear After Read",name:"clearAfterRead",type:"boolean",default:true,description:"Whether to delete the static data entry after a successful hydration so it does not leak across workflow runs. Set false if you want to inspect or re-read the entry from a later node in the same run.",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}},{displayName:"Output Path Template",name:"outputPathTemplate",type:"string",default:"",placeholder:"e.g. C:\\Users\\Uzair\\.n8n-files\\{baseName}_{timestamp}.docx",description:"Optional template to compute the final write path on disk, returned on the output JSON as 'outputPath'. If set, you can configure downstream Write nodes to simply read '{{ $json.outputPath }}' with zero escaping risks. Supports these placeholders: '{baseName}' (filename with extension stripped), '{timestamp}' (current ISO 8601 timestamp with colons and dots replaced by dashes for Windows file compatibility), '{fileName}' (the stashed filename including extension), and '{ext}' (e.g., '.docx').",displayOptions:{show:{resource:["document"],operation:["hydrateToolOutput"]}}}];async function Mn(e){let t=this.getNodeParameter("staticDataKey",e),r=this.getNodeParameter("outputBinaryPropertyName",e),n=this.getNodeParameter("onMissing",e),o=this.getNodeParameter("clearAfterRead",e),i=this.getWorkflowStaticData("global"),a=i[t];if(!Qo(a)){if(n==="throw")throw new n8nWorkflow.NodeOperationError(this.getNode(),`No stashed binary found under static data key "${t}".`,{description:"The Apply Edits operation writes a stash entry into workflow static data only when it runs as an AI Agent tool and produces a binary. Verify that Apply Edits was actually called by the agent this turn, that it ran successfully, and that the key matches the one used on the writing side.",itemIndex:e});return [{json:{hydrated:false},pairedItem:{item:e}}]}let{id:s,fileName:l,mimeType:u}=a,f;try{let m=await this.helpers.getBinaryStream(s);f=await this.helpers.binaryToBuffer(m);}catch(m){throw new n8nWorkflow.NodeOperationError(this.getNode(),`Failed to load stashed binary (id=${s}) from external storage.`,{description:`The stash entry under "${t}" points at binary id "${s}", but the underlying data could not be loaded. This usually means the binary has been garbage-collected (n8n's execution data retention may be too short) or external storage is unavailable. Underlying error: ${m.message}`,itemIndex:e})}let c=u||et,d=await this.helpers.prepareBinaryData(f,l,c);o&&delete i[t];let p=this.getNodeParameter("outputPathTemplate",e,""),g;if(p.trim()!==""){let m=l.replace(/\.docx$/i,""),b=l.match(/\.docx$/i)?.[0]??".docx",y=new Date().toISOString().replace(/[:.]/g,"-").replace(/Z$/,"");g=p.replaceAll("{baseName}",m).replaceAll("{timestamp}",y).replaceAll("{fileName}",l).replaceAll("{ext}",b);}return [{json:{hydrated:true,fileName:l,sourceBinaryId:s,mimeType:c,...g!==void 0?{outputPath:g}:{}},binary:{[r]:d},pairedItem:{item:e}}]}h(Mn,"executeHydrateToolOutput");var zn=Lr(Bn());var Jo=(0, zn.createRequire)("/"),ft,Zo,Ko;try{ft=Jo("worker_threads"),Zo=ft.Worker,Ko=ft.isMarkedAsUntransferable;}catch{}var te=Uint8Array,we=Uint16Array,Qr=Int32Array,ur=new te([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),lr=new te([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wr=new te([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jn=h(function(e,t){for(var r=new we(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var o=new Qr(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return {b:r,r:o}},"freb"),ft=jn(ur,2),Wn=ft.b,Hr=ft.r;Wn[28]=258,Hr[258]=28;var Hn=jn(lr,0),ea=Hn.b,Fn=Hn.r,Vr=new we(32768);for(V=0;V<32768;++V)Fe=(V&43690)>>1|(V&21845)<<1,Fe=(Fe&52428)>>2|(Fe&13107)<<2,Fe=(Fe&61680)>>4|(Fe&3855)<<4,Vr[V]=((Fe&65280)>>8|(Fe&255)<<8)>>1;var Fe,V,Oe=h((function(e,t,r){for(var n=e.length,o=0,i=new we(t);o<n;++o)e[o]&&++i[e[o]-1];var a=new we(t);for(o=1;o<t;++o)a[o]=a[o-1]+i[o-1]<<1;var s;if(r){s=new we(1<<t);var l=15-t;for(o=0;o<n;++o)if(e[o])for(var u=o<<4|e[o],f=t-e[o],c=a[e[o]-1]++<<f,d=c|(1<<f)-1;c<=d;++c)s[Vr[c]>>l]=u;}else for(s=new we(n),o=0;o<n;++o)e[o]&&(s[o]=Vr[a[e[o]-1]++]>>15-e[o]);return s}),"hMap"),je=new te(288);for(V=0;V<144;++V)je[V]=8;var V;for(V=144;V<256;++V)je[V]=9;var V;for(V=256;V<280;++V)je[V]=7;var V;for(V=280;V<288;++V)je[V]=8;var V,Bt=new te(32);for(V=0;V<32;++V)Bt[V]=5;var V,ta=Oe(je,9,0),ra=Oe(je,9,1),na=Oe(Bt,5,0),ia=Oe(Bt,5,1),Ur=h(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),Te=h(function(e,t,r){var n=t/8|0;return (e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),qr=h(function(e,t){var r=t/8|0;return (e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),Jr=h(function(e){return (e+7)/8|0},"shft"),Ft=h(function(e,t,r){return (t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new te(e.subarray(t,r))},"slc");var oa=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],he=h(function(e,t,r){var n=new Error(t||oa[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,he),!r)throw n;return n},"err"),aa=h(function(e,t,r,n){var o=e.length,i=n?n.length:0;if(!o||t.f&&!t.l)return r||new te(0);var a=!r,s=a||t.i!=2,l=t.i;a&&(r=new te(o*3));var u=h(function(kt){var Pt=r.length;if(kt>Pt){var ct=new te(Math.max(Pt*2,kt));ct.set(r),r=ct;}},"cbuf"),f=t.f||0,c=t.p||0,d=t.b||0,p=t.l,g=t.d,m=t.m,b=t.n,y=o*8;do{if(!p){f=Te(e,c,1);var w=Te(e,c+1,3);if(c+=3,w)if(w==1)p=ra,g=ia,m=9,b=5;else if(w==2){var E=Te(e,c,31)+257,A=Te(e,c+10,15)+4,N=E+Te(e,c+5,31)+1;c+=14;for(var C=new te(N),F=new te(19),k=0;k<A;++k)F[Wr[k]]=Te(e,c+k*3,7);c+=A*3;for(var R=Ur(F),j=(1<<R)-1,O=Oe(F,R,1),k=0;k<N;){var G=O[Te(e,c,j)];c+=G&15;var v=G>>4;if(v<16)C[k++]=v;else {var z=0,L=0;for(v==16?(L=3+Te(e,c,3),c+=2,z=C[k-1]):v==17?(L=3+Te(e,c,7),c+=3):v==18&&(L=11+Te(e,c,127),c+=7);L--;)C[k++]=z;}}var Y=C.subarray(0,E),I=C.subarray(E);m=Ur(Y),b=Ur(I),p=Oe(Y,m,1),g=Oe(I,b,1);}else he(1);else {var v=Jr(c)+4,_=e[v-4]|e[v-3]<<8,D=v+_;if(D>o){l&&he(0);break}s&&u(d+_),r.set(e.subarray(v,D),d),t.b=d+=_,t.p=c=D*8,t.f=f;continue}if(c>y){l&&he(0);break}}s&&u(d+131072);for(var Z=(1<<m)-1,ie=(1<<b)-1,oe=c;;oe=c){var z=p[qr(e,c)&Z],_e=z>>4;if(c+=z&15,c>y){l&&he(0);break}if(z||he(2),_e<256)r[d++]=_e;else if(_e==256){oe=c,p=null;break}else {var ve=_e-254;if(_e>264){var k=_e-257,ee=ur[k];ve=Te(e,c,(1<<ee)-1)+Wn[k],c+=ee;}var xe=g[qr(e,c)&ie],ut=xe>>4;xe||he(3),c+=xe&15;var I=ea[ut];if(ut>3){var ee=lr[ut];I+=qr(e,c)&(1<<ee)-1,c+=ee;}if(c>y){l&&he(0);break}s&&u(d+131072);var lt=d+ve;if(d<I){var ir=i-I,or=Math.min(I,lt);for(ir+d<0&&he(3);d<or;++d)r[d]=n[ir+d];}for(;d<lt;++d)r[d]=r[d-I];}}t.l=p,t.p=oe,t.b=d,t.f=f,p&&(f=1,t.m=m,t.d=g,t.n=b);}while(!f);return d!=r.length&&a?Ft(r,0,d):r.subarray(0,d)},"inflt"),Le=h(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8;},"wbits"),Mt=h(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16;},"wbits16"),zr=h(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,i=r.slice();if(!o)return {t:Gn,l:0};if(o==1){var a=new te(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(D,E){return D.f-E.f}),r.push({s:-1,f:25001});var s=r[0],l=r[1],u=0,f=1,c=2;for(r[0]={s:-1,f:s.f+l.f,l:s,r:l};f!=o-1;)s=r[r[u].f<r[c].f?u++:c++],l=r[u!=f&&r[u].f<r[c].f?u++:c++],r[f++]={s:-1,f:s.f+l.f,l:s,r:l};for(var d=i[0].s,n=1;n<o;++n)i[n].s>d&&(d=i[n].s);var p=new we(d+1),g=Gr(r[f-1],p,0);if(g>t){var n=0,m=0,b=g-t,y=1<<b;for(i.sort(function(E,A){return p[A.s]-p[E.s]||E.f-A.f});n<o;++n){var w=i[n].s;if(p[w]>t)m+=y-(1<<g-p[w]),p[w]=t;else break}for(m>>=b;m>0;){var v=i[n].s;p[v]<t?m-=1<<t-p[v]++-1:++n;}for(;n>=0&&m;--n){var _=i[n].s;p[_]==t&&(--p[_],++m);}g=t;}return {t:new te(p),l:g}},"hTree"),Gr=h(function(e,t,r){return e.s==-1?Math.max(Gr(e.l,t,r+1),Gr(e.r,t,r+1)):t[e.s]=r},"ln"),Ln=h(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new we(++t),n=0,o=e[0],i=1,a=h(function(l){r[n++]=l;},"w"),s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else {if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0);}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0);}for(;i--;)a(o);i=1,o=e[s];}return {c:r.subarray(0,n),n:t}},"lc"),Rt=h(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),Vn=h(function(e,t,r){var n=r.length,o=Jr(t+2);e[o]=n&255,e[o+1]=n>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var i=0;i<n;++i)e[o+i+4]=r[i];return (o+4+n)*8},"wfblk"),$n=h(function(e,t,r,n,o,i,a,s,l,u,f){Le(t,f++,r),++o[256];for(var c=zr(o,15),d=c.t,p=c.l,g=zr(i,15),m=g.t,b=g.l,y=Ln(d),w=y.c,v=y.n,_=Ln(m),D=_.c,E=_.n,A=new we(19),N=0;N<w.length;++N)++A[w[N]&31];for(var N=0;N<D.length;++N)++A[D[N]&31];for(var C=zr(A,7),F=C.t,k=C.l,R=19;R>4&&!F[Wr[R-1]];--R);var j=u+5<<3,O=Rt(o,je)+Rt(i,Bt)+a,G=Rt(o,d)+Rt(i,m)+a+14+3*R+Rt(A,F)+2*A[16]+3*A[17]+7*A[18];if(l>=0&&j<=O&&j<=G)return Vn(t,f,e.subarray(l,l+u));var z,L,Y,I;if(Le(t,f,1+(G<O)),f+=2,G<O){z=Oe(d,p,0),L=d,Y=Oe(m,b,0),I=m;var Z=Oe(F,k,0);Le(t,f,v-257),Le(t,f+5,E-1),Le(t,f+10,R-4),f+=14;for(var N=0;N<R;++N)Le(t,f+3*N,F[Wr[N]]);f+=3*R;for(var ie=[w,D],oe=0;oe<2;++oe)for(var _e=ie[oe],N=0;N<_e.length;++N){var ve=_e[N]&31;Le(t,f,Z[ve]),f+=F[ve],ve>15&&(Le(t,f,_e[N]>>5&127),f+=_e[N]>>12);}}else z=ta,L=je,Y=na,I=Bt;for(var N=0;N<s;++N){var ee=n[N];if(ee>255){var ve=ee>>18&31;Mt(t,f,z[ve+257]),f+=L[ve+257],ve>7&&(Le(t,f,ee>>23&31),f+=ur[ve]);var xe=ee&31;Mt(t,f,Y[xe]),f+=I[xe],xe>3&&(Mt(t,f,ee>>5&8191),f+=lr[xe]);}else Mt(t,f,z[ee]),f+=L[ee];}return Mt(t,f,z[256]),f+L[256]},"wblk"),sa=new Qr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gn=new te(0),ua=h(function(e,t,r,n,o,i){var a=i.z||e.length,s=new te(n+a+5*(1+Math.ceil(a/7e3))+o),l=s.subarray(n,s.length-o),u=i.l,f=(i.r||0)&7;if(t){f&&(l[0]=i.r>>3);for(var c=sa[t-1],d=c>>13,p=c&8191,g=(1<<r)-1,m=i.p||new we(32768),b=i.h||new we(g+1),y=Math.ceil(r/3),w=2*y,v=h(function(Br){return (e[Br]^e[Br+1]<<y^e[Br+2]<<w)&g},"hsh"),_=new Qr(25e3),D=new we(288),E=new we(32),A=0,N=0,C=i.i||0,F=0,k=i.w||0,R=0;C+2<a;++C){var j=v(C),O=C&32767,G=b[j];if(m[O]=G,b[j]=O,k<=C){var z=a-C;if((A>7e3||F>24576)&&(z>423||!u)){f=$n(e,l,0,_,D,E,N,F,R,C-R,f),F=A=N=0,R=C;for(var L=0;L<286;++L)D[L]=0;for(var L=0;L<30;++L)E[L]=0;}var Y=2,I=0,Z=p,ie=O-G&32767;if(z>2&&j==v(C-ie))for(var oe=Math.min(d,z)-1,_e=Math.min(32767,C),ve=Math.min(258,z);ie<=_e&&--Z&&O!=G;){if(e[C+Y]==e[C+Y-ie]){for(var ee=0;ee<ve&&e[C+ee]==e[C+ee-ie];++ee);if(ee>Y){if(Y=ee,I=ie,ee>oe)break;for(var xe=Math.min(ie,ee-2),ut=0,L=0;L<xe;++L){var lt=C-ie+L&32767,ir=m[lt],or=lt-ir&32767;or>ut&&(ut=or,G=lt);}}}O=G,G=m[O],ie+=O-G&32767;}if(I){_[F++]=268435456|Hr[Y]<<18|Fn[I];var kt=Hr[Y]&31,Pt=Fn[I]&31;N+=ur[kt]+lr[Pt],++D[257+kt],++E[Pt],k=C+Y,++A;}else _[F++]=e[C],++D[e[C]];}}for(C=Math.max(C,k);C<a;++C)_[F++]=e[C],++D[e[C]];f=$n(e,l,u,_,D,E,N,F,R,C-R,f),u||(i.r=f&7|l[f/8|0]<<3,f-=7,i.h=b,i.p=m,i.i=C,i.w=k);}else {for(var C=i.w||0;C<a+u;C+=65535){var ct=C+65535;ct>=a&&(l[f/8|0]=u,ct=a),f=Vn(l,f+1,e.subarray(C,ct));}i.i=a;}return Ft(s,0,n+Jr(f)+o)},"dflt"),la=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r;}return e})(),ca=h(function(){var e=-1;return {p:h(function(t){for(var r=e,n=0;n<t.length;++n)r=la[r&255^t[n]]^r>>>8;e=r;},"p"),d:h(function(){return ~e},"d")}},"crc");var fa=h(function(e,t,r,n,o){if(!o&&(o={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),a=new te(i.length+e.length);a.set(i),a.set(e,i.length),e=a,o.w=i.length;}return ua(e,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,o)},"dopt"),Xn=h(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg");var Ie=h(function(e,t){return e[t]|e[t+1]<<8},"b2"),Ee=h(function(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),jr=h(function(e,t){return Ee(e,t)+Ee(e,t+4)*4294967296},"b8"),ue=h(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8;},"wbytes");function ha(e,t){return fa(e,t||{},0,0)}h(ha,"deflateSync");function da(e,t){return aa(e,{i:2},t&&t.out,t&&t.dictionary)}h(da,"inflateSync");var Yn=h(function(e,t,r,n){for(var o in e){var i=e[o],a=t+o,s=n;Array.isArray(i)&&(s=Xn(n,i[1]),i=i[0]),ArrayBuffer.isView(i)?r[a]=[i,s]:(r[a+="/"]=[new te(0),s],Yn(i,a,r,n));}},"fltn"),Un=typeof TextEncoder<"u"&&new TextEncoder,Xr=typeof TextDecoder<"u"&&new TextDecoder,pa=0;try{Xr.decode(Gn,{stream:!0}),pa=1;}catch{}var ma=h(function(e){for(var t="",r=0;;){var n=e[r++],o=(n>127)+(n>223)+(n>239);if(r+o>e.length)return {s:t,r:Ft(e,r-1)};o?o==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):o&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n);}},"dutf8");function sr(e,t){if(t){for(var r=new te(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(Un)return Un.encode(e);for(var o=e.length,i=new te(e.length+(e.length>>1)),a=0,s=h(function(f){i[a++]=f;},"w"),n=0;n<o;++n){if(a+5>i.length){var l=new te(a+8+(o-n<<1));l.set(i),i=l;}var u=e.charCodeAt(n);u<128||t?s(u):u<2048?(s(192|u>>6),s(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++n)&1023,s(240|u>>18),s(128|u>>12&63),s(128|u>>6&63),s(128|u&63)):(s(224|u>>12),s(128|u>>6&63),s(128|u&63));}return Ft(i,0,a)}h(sr,"strToU8");function cr(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else {if(Xr)return Xr.decode(e);var o=ma(e),i=o.s,r=o.r;return r.length&&he(8),i}}h(cr,"strFromU8");var ga=h(function(e,t){return t+30+Ie(e,t+26)+Ie(e,t+28)},"slzh"),_a=h(function(e,t,r){var n=Ie(e,t+28),o=Ie(e,t+30),i=cr(e.subarray(t+46,t+46+n),!(Ie(e,t+8)&2048)),a=t+46+n,s=va(e,a,o,r,Ee(e,t+20),Ee(e,t+24),Ee(e,t+42)),l=s[0],u=s[1],f=s[2];return [Ie(e,t+10),l,u,i,a+o+Ie(e,t+32),f]},"zh"),va=h(function(e,t,r,n,o,i,a){var s=o==4294967295,l=i==4294967295,u=a==4294967295,f=t+r,c=s+l+u;if(n&&c){for(;t+4<f;t+=4+Ie(e,t+2))if(Ie(e,t)==1)return [s?jr(e,t+4+8*l):o,l?jr(e,t+4):i,u?jr(e,t+4+8*(l+s)):a,1];n<2&&he(13);}return [o,i,a,0]},"z64hs"),Yr=h(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&he(9),t+=n+4;}return t},"exfl"),qn=h(function(e,t,r,n,o,i,a,s){var l=n.length,u=r.extra,f=s&&s.length,c=Yr(u);ue(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(i<0&&8),e[t++]=o&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var d=new Date(r.mtime==null?Date.now():r.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&he(10),ue(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,i!=-1&&(ue(e,t,r.crc),ue(e,t+4,i<0?-i-2:i),ue(e,t+8,r.size)),ue(e,t+12,l),ue(e,t+14,c),t+=16,a!=null&&(ue(e,t,f),ue(e,t+6,r.attrs),ue(e,t+10,a),t+=14),e.set(n,t),t+=l,c)for(var g in u){var m=u[g],b=m.length;ue(e,t,+g),ue(e,t+2,b),e.set(m,t+4),t+=4+b;}return f&&(e.set(s,t),t+=f),t},"wzh"),wa=h(function(e,t,r,n,o){ue(e,t,101010256),ue(e,t+8,r),ue(e,t+10,r),ue(e,t+12,n),ue(e,t+16,o);},"wzf");function Qn(e,t){t||(t={});var r={},n=[];Yn(e,"",r,t);var o=0,i=0;for(var a in r){var s=r[a],l=s[0],u=s[1],f=u.level==0?0:8,c=sr(a),d=c.length,p=u.comment,g=p&&sr(p),m=g&&g.length,b=Yr(u.extra);d>65535&&he(11);var y=f?ha(l,u):l,w=y.length,v=ca();v.p(l),n.push(Xn(u,{size:l.length,crc:v.d(),c:y,f:c,m:g,u:d!=a.length||g&&p.length!=m,o,compression:f})),o+=30+d+b+w,i+=76+2*(d+b)+(m||0)+w;}for(var _=new te(i+22),D=o,E=i-o,A=0;A<n.length;++A){var c=n[A];qn(_,c.o,c,c.f,c.u,c.c.length);var N=30+c.f.length+Yr(c.extra);_.set(c.c,c.o+N),qn(_,o,c,c.f,c.u,c.c.length,c.o,c.m),o+=16+N+(c.m?c.m.length:0);}return wa(_,o,n.length,E,D),_}h(Qn,"zipSync");function Jn(e,t){for(var r={},n=e.length-22;Ee(e,n)!=101010256;--n)(!n||e.length-n>65558)&&he(13);var o=Ie(e,n+8);if(!o)return {};var i=Ee(e,n+16),a=Ee(e,n-20)==117853008;if(a){var s=Ee(e,n-12);a=Ee(e,s)==101075792,a&&(o=Ee(e,s+32),i=Ee(e,s+48));}for(var l=t&&t.filter,u=0;u<o;++u){var f=_a(e,i,a),c=f[0],d=f[1],p=f[2],g=f[3],m=f[4],b=f[5],y=ga(e,b);i=m,(!l||l({name:g,size:d,originalSize:p,compression:c}))&&(c?c==8?r[g]=da(e.subarray(y,y+d),{out:new te(p)}):he(14,"unknown compression type "+c):r[g]=Ft(e,y,y+d));}return r}h(Jn,"unzipSync");var kr=Lr(ao()),xo=Lr(so());function P(e,t){for(let r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];if(n.nodeType===1&&n.tagName===t)return n}return null}h(P,"findChild");function cu(e,t){let r=[];for(let n=0;n<e.childNodes.length;n++){let o=e.childNodes[n];o.nodeType===1&&o.tagName===t&&r.push(o);}return r}h(cu,"findChildren");function x(e,t){return Array.from(e.getElementsByTagName(t))}h(x,"findAllDescendants");function En(e){return e.startsWith("\uFEFF")&&(e=e.slice(1)),new kr.DOMParser().parseFromString(e,"text/xml")}h(En,"parseXml");function fu(e){let t=new kr.XMLSerializer().serializeToString(e),n=/<([a-zA-Z0-9_:]+)(\s+[^>]+?)(>|\/>)/.exec(t);if(n&&!n[1].startsWith("?")){let o=n.index,i=t.substring(0,o);if(!i.includes("<")||i.trim().startsWith("<?xml")&&(i.match(/</g)||[]).length===1){let s=n[0],l=`<${n[1]}`,u=n[2],f=n[3],c=/([a-zA-Z0-9_:]+)\s*=\s*(["'])(.*?)\2/g,d=[],p;for(;(p=c.exec(u))!==null;)d.push(p[0].trim());d.sort((m,b)=>{let y=m.split("=")[0].trim(),w=b.split("=")[0].trim(),v=y.startsWith("xmlns"),_=w.startsWith("xmlns");return v&&!_?-1:!v&&_?1:y<w?-1:y>w?1:0});let g=d.length>0?`${l} ${d.join(" ")}${f}`:`${l}${f}`;t=t.substring(0,o)+g+t.substring(o+s.length);}}return t}h(fu,"serializeXml");var Ir=class{static{h(this,"Relationship");}constructor(e,t,r,n){this.id=e,this.type=t,this.target=r,this.isExternal=n;}id;type;target;isExternal},po=class{static{h(this,"Part");}constructor(e,t,r,n){this.partname=e,this.blob=t,this.contentType=n,this._element=r;}partname;blob;contentType;rels=new Map;_element;package;addRelationship(e,t,r,n=false){if(this.rels.set(e,new Ir(e,t,r,n)),this.partname.endsWith(".rels")){let o=this._element.ownerDocument;if(o){let i=o.createElementNS("http://schemas.openxmlformats.org/package/2006/relationships","Relationship");i.setAttribute("Id",e),i.setAttribute("Type",t),i.setAttribute("Target",r),n&&i.setAttribute("TargetMode","External"),this._element.appendChild(i);}}}},hu=class{static{h(this,"DocxPackage");}constructor(e){this.unzipped=e;}unzipped;parts=[];mainDocumentPart;getPartByPath(e){let t=e.startsWith("/")?e.substring(1):e;return this.parts.find(r=>r.partname===t||r.partname==="/"+t)}nextPartname(e){let t=1;for(;;){let r=e.replace("%d",t===1?"":t.toString());if(!this.getPartByPath(r))return r;t++;}}addPart(e,t,r){let n=En(r),o=new po(e,r,n.documentElement,t);o.package=this,this.parts.push(o);let i=this.getPartByPath("[Content_Types].xml");if(i){let a=i._element.ownerDocument;if(a){let s=a.createElement("Override");s.setAttribute("PartName",e),s.setAttribute("ContentType",t),i._element.appendChild(s);}}return o}getOrCreateRelsPart(e){let t=e.split("/"),r=t.pop(),n=t.join("/")+"/_rels/"+r+".rels",o=this.getPartByPath(n);return o||(o=this.addPart(n,"application/vnd.openxmlformats-package.relationships+xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
14
14
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`)),o}},nr=class mo{static{h(this,"_DocumentObject");}constructor(t,r){this.pkg=t,this.part=r;}pkg;part;settings={oddAndEvenPagesHeaderFooter:false};sections=[];get element(){return P(this.part._element,"w:body")||this.part._element}static async load(t){let r=t instanceof Uint8Array?t:new Uint8Array(t),n=Jn(r),o=new hu(n),i=n["[Content_Types].xml"],a={};if(i){let u=En(cr(i)),f=x(u.documentElement,"Override");for(let c of f)a[c.getAttribute("PartName")||""]=c.getAttribute("ContentType")||"";}for(let[u,f]of Object.entries(n))if(u.endsWith(".xml")||u.endsWith(".rels")){let c=cr(f),d=En(c),p=a["/"+u]||"application/xml",g=new po("/"+u,c,d.documentElement,p);g.package=o,o.parts.push(g);}let s=o.getPartByPath("word/document.xml");if(!s)throw new Error("Invalid DOCX: Missing word/document.xml");o.mainDocumentPart=s;let l=o.getPartByPath("word/_rels/document.xml.rels");if(l){let u=x(l._element,"Relationship");for(let f of u){let c=f.getAttribute("Id"),d=f.getAttribute("Target"),p=f.getAttribute("Type"),g=f.getAttribute("TargetMode");c&&d&&p&&s.rels.set(c,new Ir(c,p,d,g==="External"));}}return new mo(o,s)}relateTo(t,r){let n=1;for(;this.part.rels.has(`rId${n}`);)n++;let o=`rId${n}`,i=t.partname.split("/").pop();this.part.rels.set(o,new Ir(o,r,i,false)),this.pkg.getOrCreateRelsPart(this.part.partname).addRelationship(o,r,i,false);}relateToExternal(t,r){let n=1;for(;this.part.rels.has(`rId${n}`);)n++;let o=`rId${n}`;return this.part.rels.set(o,new Ir(o,r,t,true)),this.pkg.getOrCreateRelsPart(this.part.partname).addRelationship(o,r,t,true),o}async save(){for(let t of this.pkg.parts){let r=fu(t._element.ownerDocument||t._element);r.startsWith("<?xml")||(r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
15
15
  `+r),this.pkg.unzipped[t.partname.substring(1)]=sr(r);}return Buffer.from(Qn(this.pkg.unzipped))}},Ze=class{static{h(this,"Paragraph");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent;get text(){let e="",t=this._element.getElementsByTagName("w:t");for(let r=0;r<t.length;r++)e+=t[r].textContent||"";return e}},Ke=class{static{h(this,"Run");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent},du=class{static{h(this,"Cell");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent},pu=class{static{h(this,"Row");}constructor(e,t){this._element=e,this._parent=t;let r=this._element.getElementsByTagName("w:tc");for(let n=0;n<r.length;n++)this.cells.push(new du(r[n],this));}_element;_parent;cells=[]},Dn=class{static{h(this,"Table");}constructor(e,t){this._element=e,this._parent=t;let r=this._element.getElementsByTagName("w:tr");for(let n=0;n<r.length;n++)this.rows.push(new pu(r[n],this));}_element;_parent;rows=[]},uo=class{static{h(this,"NotesPart");}constructor(e,t){this.part=e,this.note_type=t,this._element=e._element;}part;note_type;_element},mu=class{static{h(this,"FootnoteItem");}constructor(e,t,r){this._element=e,this._parent=t,this.note_type=r,this.id=e.getAttribute("w:id")||"",this.part=t.part;}_element;_parent;note_type;id;part},ze={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",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006"},ye={COMMENTS:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",EXTENDED:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",IDS:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",EXTENSIBLE:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml"},Ye={COMMENTS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",EXTENDED:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",IDS:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",EXTENSIBLE:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"},Pr=class{static{h(this,"CommentsManager");}constructor(e){this.doc=e;}doc;_commentsPart=null;_extendedPart=null;_idsPart=null;_extensiblePart=null;_nextId=null;get commentsPart(){return this._commentsPart||(this._commentsPart=this._getOrCreateCommentsPart(),this._ensureNamespaces()),this._commentsPart}get extendedPart(){return this._extendedPart||(this._extendedPart=this._getOrCreateExtendedPart()),this._extendedPart}get idsPart(){return this._idsPart||(this._idsPart=this._getOrCreateIdsPart()),this._idsPart}get extensiblePart(){return this._extensiblePart||(this._extensiblePart=this._getOrCreateExtensiblePart()),this._extensiblePart}get nextId(){return this._nextId===null&&(this._nextId=this._getNextCommentId()),this._nextId}set nextId(e){this._nextId=e;}_getExistingPartByType(e){return this.doc.pkg.parts.find(t=>t.contentType===e)||null}_linkPart(e,t){for(let r of this.doc.part.rels.values())if(!r.isExternal&&r.target===e.partname.split("/").pop())return e;return this.doc.relateTo(e,t),e}_getOrCreateCommentsPart(){let e=this._getExistingPartByType(ye.COMMENTS);if(e)return this._linkPart(e,Ye.COMMENTS);let t=this.doc.pkg.nextPartname("/word/comments%d.xml"),r=`<w:comments xmlns:w="${ze.w}" xmlns:w14="${ze.w14}" xmlns:w15="${ze.w15}" xmlns:w16cid="${ze.w16cid}" xmlns:w16cex="${ze.w16cex}" xmlns:mc="${ze.mc}" mc:Ignorable="w14 w15 w16cid w16cex"></w:comments>`;return e=this.doc.pkg.addPart(t,ye.COMMENTS,r),this.doc.relateTo(e,Ye.COMMENTS),e}_getOrCreateExtendedPart(){let e=this._getExistingPartByType(ye.EXTENDED);if(e)return this._linkPart(e,Ye.EXTENDED);let t=this.doc.pkg.nextPartname("/word/commentsExtended%d.xml"),r=`<w15:commentsEx xmlns:w15="${ze.w15}"></w15:commentsEx>`;return e=this.doc.pkg.addPart(t,ye.EXTENDED,r),this.doc.relateTo(e,Ye.EXTENDED),e}_getOrCreateIdsPart(){let e=this._getExistingPartByType(ye.IDS);if(e)return this._linkPart(e,Ye.IDS);let t=this.doc.pkg.nextPartname("/word/commentsIds%d.xml"),r=`<w16cid:commentsIds xmlns:w16cid="${ze.w16cid}"></w16cid:commentsIds>`;return e=this.doc.pkg.addPart(t,ye.IDS,r),this.doc.relateTo(e,Ye.IDS),e}_getOrCreateExtensiblePart(){let e=this._getExistingPartByType(ye.EXTENSIBLE);if(e)return this._linkPart(e,Ye.EXTENSIBLE);let t=this.doc.pkg.nextPartname("/word/commentsExtensible%d.xml"),r=`<w16cex:commentsExtensible xmlns:w16cex="${ze.w16cex}"></w16cex:commentsExtensible>`;return e=this.doc.pkg.addPart(t,ye.EXTENSIBLE,r),this.doc.relateTo(e,Ye.EXTENSIBLE),e}_ensureNamespaces(){}_getNextCommentId(){let e=[0],t=this._getExistingPartByType(ye.COMMENTS);if(t){let r=x(t._element,"w:comment");for(let n of r){let o=n.getAttribute("w:id");o&&e.push(parseInt(o,10)||0);}}return Math.max(...e)+1}_generateHexId(){return Math.floor(Math.random()*4294967295).toString(16).toUpperCase().padStart(8,"0")}_getInitials(e){return e?e.split(" ").filter(Boolean).map(t=>t[0]).join("").toUpperCase():""}_findParaIdForComment(e){if(!this._commentsPart)return null;for(let t of x(this._commentsPart._element,"w:comment"))if(t.getAttribute("w:id")===e)for(let r of x(t,"w:p")){let n=r.getAttribute("w14:paraId");if(n)return n}return null}_findThreadRootParaId(e){let t=this._findParaIdForComment(e),r=this._getExistingPartByType(ye.EXTENDED);if(!t||!r)return t;for(let n=0;n<r._element.childNodes.length;n++){let o=r._element.childNodes[n];if(o.nodeType===1&&o.getAttribute("w15:paraId")===t){let i=o.getAttribute("w15:paraIdParent");if(i)return i}}return t}addComment(e,t,r=null){let n=this.nextId.toString();this.nextId++;let o=new Date().toISOString().replace(/\.\d{3}Z$/,"Z"),i=this.commentsPart._element.ownerDocument,a=i.createElement("w:comment");a.setAttribute("w:id",n),a.setAttribute("w:author",e),a.setAttribute("w:date",o);let s=this._getInitials(e);s&&a.setAttribute("w:initials",s);let l=this._getExistingPartByType(ye.EXTENDED);r&&!l&&a.setAttribute("w15:p",r);let u=this._generateHexId(),f=this._generateHexId(),c=i.createElement("w:p");c.setAttribute("w14:paraId",u),c.setAttribute("w14:textId","77777777"),c.setAttribute("w:rsidR",f),c.setAttribute("w:rsidRDefault",f),c.setAttribute("w:rsidP",f);let d=i.createElement("w:pPr"),p=i.createElement("w:pStyle");p.setAttribute("w:val","CommentText"),d.appendChild(p),c.appendChild(d);let g=i.createElement("w:r"),m=i.createElement("w:rPr"),b=i.createElement("w:rStyle");b.setAttribute("w:val","CommentReference"),m.appendChild(b),g.appendChild(m),g.appendChild(i.createElement("w:annotationRef")),c.appendChild(g);let y=i.createElement("w:r"),w=i.createElement("w:t");if(w.textContent=t,y.appendChild(w),c.appendChild(y),a.appendChild(c),this.commentsPart._element.appendChild(a),this.extendedPart){let v=r?this._findThreadRootParaId(r):null,D=this.extendedPart._element.ownerDocument.createElement("w15:commentEx");D.setAttribute("w15:paraId",u),v&&D.setAttribute("w15:paraIdParent",v),D.setAttribute("w15:done","0"),this.extendedPart._element.appendChild(D);}if(this.idsPart){let _=this.idsPart._element.ownerDocument.createElement("w16cid:commentId");_.setAttribute("w16cid:paraId",u),_.setAttribute("w16cid:durableId",this._generateHexId()),this.idsPart._element.appendChild(_);}if(this.extensiblePart){let v=null;for(let _=0;_<this.idsPart._element.childNodes.length;_++){let D=this.idsPart._element.childNodes[_];if(D.nodeType===1&&D.getAttribute("w16cid:paraId")===u){v=D.getAttribute("w16cid:durableId");break}}if(v){let D=this.extensiblePart._element.ownerDocument.createElement("w16cex:commentExtensible");D.setAttribute("w16cex:durableId",v),D.setAttribute("w16cex:dateUtc",o),this.extensiblePart._element.appendChild(D);}}return n}deleteComment(e){if(!this._commentsPart)return;let t=null;for(let n of x(this._commentsPart._element,"w:comment"))if(n.getAttribute("w:id")===e){t=n;break}if(!t)return;let r=null;for(let n of x(t,"w:p")){let o=n.getAttribute("w14:paraId");if(o){r=o;break}}if(r){let n=[];if(this.extendedPart)for(let i=0;i<this.extendedPart._element.childNodes.length;i++){let a=this.extendedPart._element.childNodes[i];if(a.nodeType===1&&a.getAttribute("w15:paraIdParent")===r){let s=a.getAttribute("w15:paraId");if(s){for(let l of x(this._commentsPart._element,"w:comment"))for(let u of x(l,"w:p"))if(u.getAttribute("w14:paraId")===s){let f=l.getAttribute("w:id");f&&n.push(f);break}}}}for(let i of n)this.deleteComment(i);let o=null;if(this.idsPart){let i=[];for(let a=0;a<this.idsPart._element.childNodes.length;a++){let s=this.idsPart._element.childNodes[a];s.nodeType===1&&s.getAttribute("w16cid:paraId")===r&&(o=s.getAttribute("w16cid:durableId"),i.push(s));}i.forEach(a=>this.idsPart._element.removeChild(a));}if(this.extendedPart){let i=[];for(let a=0;a<this.extendedPart._element.childNodes.length;a++){let s=this.extendedPart._element.childNodes[a];s.nodeType===1&&s.getAttribute("w15:paraId")===r&&i.push(s);}i.forEach(a=>this.extendedPart._element.removeChild(a));}if(o&&this.extensiblePart){let i=[];for(let a=0;a<this.extensiblePart._element.childNodes.length;a++){let s=this.extensiblePart._element.childNodes[a];s.nodeType===1&&s.getAttribute("w16cex:durableId")===o&&i.push(s);}i.forEach(a=>this.extensiblePart._element.removeChild(a));}}t.parentNode&&t.parentNode.removeChild(t);}};function Mr(e){({part:e.mainDocumentPart,relateTo:h(()=>{},"relateTo")});let n={},o=e.parts.find(l=>l.contentType===ye.COMMENTS);if(!o)return n;let i={},a=x(o._element,"w:comment");for(let l of a){let u=l.getAttribute("w:id");if(!u)continue;let f=l.getAttribute("w:author")||"Unknown",c=l.getAttribute("w:date")||"",d=false,p=l.getAttribute("w15:done");(p==="1"||p==="true"||p==="on")&&(d=true);let g=l.getAttribute("w15:p")||null,m=x(l,"w:p");for(let w of m){let v=w.getAttribute("w14:paraId");v&&(i[v]=u);}let b=[];for(let w of m){let v=x(w,"w:t");for(let _ of v)_.textContent&&b.push(_.textContent);b.push(`
16
16
  `);}let y=b.join("").trim();n[u]={author:f,text:y,date:c,resolved:d,parent_id:g};}let s=e.parts.find(l=>l.contentType===ye.EXTENDED);if(s){let l=s._element.childNodes;for(let u=0;u<l.length;u++){let f=l[u];if(f.nodeType!==1)continue;let c=f.getAttribute("w15:paraId"),d=f.getAttribute("w15:paraIdParent"),p=f.getAttribute("w15:done");if(c){let g=i[c];if(g&&n[g]){if(d){let m=i[d];m&&(n[g].parent_id=m);}(p==="1"||p==="true"||p==="on")&&(n[g].resolved=true);}}}}return n}h(Mr,"extract_comments_data");var gu="w:p",go="w:r",_o="w:t",_u="w:delText",vu="w:tab",wu="w:br",yu="w:cr",An="w:rPr",Eu="w:rPrChange",Du="w:commentReference",Au="w:footnoteReference",bu="w:endnoteReference",Nu="w:fldChar",Cu="w:fldCharType",Tu="w:instrText",xu="w:ins",Su="w:del",Qe="w:id",vn="w:author",wn="w:date",Iu="w:commentRangeStart",Ou="w:commentRangeEnd",ku="w:hyperlink",Pu="r:id",Mu="w:fldSimple",Ru="w:instr",Bu="w:bookmarkStart",Fu="w:name",Lu="w:sdt",$u="w:smartTag",Uu="w:sdtContent",vo="w:b",qu="w:i",Ce="w:val",wo="w:pPr",yo="w:pStyle",Eo="w:outlineLvl",zu="w:numPr",ju="w:numId",Wu="w:ilvl",Hu=/Heading[ ]?([1-6])(?![0-9])/;function Rr(e){let t=e.package||e.pkg||(e.part?e.part.pkg:null);if(t&&t._adeu_style_cache)return t._adeu_style_cache;let r={},n=null,o={},i=t?.getPartByPath("word/styles.xml");if(!i){let u=[r,null];return t&&(t._adeu_style_cache=u),u}let a=x(i._element,"w:style");for(let u of a){let f=u.getAttribute("w:styleId");if(!f)continue;let c=u.getAttribute("w:type"),d=u.getAttribute("w:default")==="1"||u.getAttribute("w:default")==="true";c==="paragraph"&&d&&(n=f);let p=P(u,"w:name"),g=p?p.getAttribute("w:val"):f;g&&typeof g=="string"&&(g.toLowerCase().startsWith("heading")?g=g.replace(/^heading/i,"Heading"):g.toLowerCase()==="title"&&(g="Title"));let m=P(u,"w:basedOn"),b=m?m.getAttribute("w:val"):null,y=null,w=P(u,"w:pPr");if(w){let D=P(w,"w:outlineLvl");if(D){let E=D.getAttribute("w:val");E&&/^\d+$/.test(E)&&(y=parseInt(E,10));}}let v=null,_=P(u,"w:rPr");if(_){let D=P(_,"w:b");if(D){let E=D.getAttribute("w:val");v=E!=="0"&&E!=="false"&&E!=="off";}}o[f]={name:g,based_on:b,outline_level:y,bold:v};}let s=h((u,f)=>{if(r[u])return r[u];if(f.has(u)||!o[u])return {name:u,outline_level:null,bold:false};f.add(u);let c=o[u],d=c.based_on,p=c.outline_level,g=c.bold!==null?c.bold:false;if(d){let b=s(d,f);p===null&&(p=b.outline_level),c.bold===null&&(g=b.bold);}let m={name:c.name,outline_level:p,bold:g};return r[u]=m,m},"resolve_style");for(let u in o)s(u,new Set);let l=[r,n];return t&&(t._adeu_style_cache=l),l}h(Rr,"_get_style_cache");function Do(e){if(!e)return null;let t=e.match(Hu);return t?parseInt(t[1],10):null}h(Do,"_detect_heading_level_from_name");function bn(e,t,r){t||([t,r]=Rr(e._parent.part||e._parent));let n=P(e._element,wo);if(n){let s=P(n,Eo);if(s){let l=s.getAttribute(Ce);if(l&&/^\d+$/.test(l)){let u=parseInt(l,10);if(u>=0&&u<=8)return true}}}let o=r;if(n){let s=P(n,yo);s&&(o=s.getAttribute(Ce)||r);}let i=o&&t?t[o]:null;if(i&&i.outline_level!==null&&i.outline_level>=0&&i.outline_level<=8)return true;let a=i?i.name:o;return a&&typeof a=="string"&&a.toLowerCase().startsWith("heading")&&(a=a.replace(/^heading/i,"Heading")),!!(a?.startsWith("Heading")||a==="Title"||a&&a!=="Normal"&&Do(a)!==null)}h(bn,"is_native_heading");function Nn(e,t,r){t||([t,r]=Rr(e._parent.part||e._parent));let n=P(e._element,wo);if(n){let s=P(n,Eo);if(s){let l=s.getAttribute(Ce);if(l&&/^\d+$/.test(l)){let u=parseInt(l,10);if(u>=0&&u<=8)return "#".repeat(u+1)+" "}}}let o=r;if(n){let s=P(n,yo);s&&(o=s.getAttribute(Ce)||r);}let i=o&&t?t[o]:null;if(i&&i.outline_level!==null&&i.outline_level>=0&&i.outline_level<=8)return "#".repeat(i.outline_level+1)+" ";let a=i?i.name:o;if(a&&typeof a=="string"&&a.toLowerCase().startsWith("heading")&&(a=a.replace(/^heading/i,"Heading")),a?.startsWith("Heading")){let s=a.replace("Heading","").trim();if(/^\d+$/.test(s))return "#".repeat(parseInt(s,10))+" "}if(a==="Title")return "# ";if(n){let s=P(n,zu);if(s){let l=P(s,ju);if(l&&l.getAttribute(Ce)!=="0"){let u=0,f=P(s,Wu);if(f){let c=f.getAttribute(Ce);c&&(u=parseInt(c,10)||0);}return " ".repeat(u)+"* "}}}if(a&&a!=="Normal"){let s=Do(a);if(s!==null)return "#".repeat(s)+" "}if(!a||a==="Normal"){let s=e.text.trim();if(s&&s.length<100&&s===s.toUpperCase()){let l=false;if(i?.bold)l=true;else {let u=x(e._element,go);for(let f of u)if(x(f,_o).map(p=>p.textContent||"").join("").trim()){let p=P(f,An);if(p){let g=P(p,vo);g&&g.getAttribute(Ce)!=="0"&&g.getAttribute(Ce)!=="false"&&(l=true);}break}}if(l)return "## "}}return ""}h(Nn,"get_paragraph_prefix");function Ao(e,t,r){let n=Nn(e,t,r);if(!n)return false;let o=n.trimEnd();return o.length>0&&o==="#".repeat(o.length)}h(Ao,"is_heading_paragraph");function bo(e,t=null){let r="",n="",o=P(e._element,An),i=false,a=false;if(o){let s=P(o,vo);s&&s.getAttribute(Ce)!=="0"&&s.getAttribute(Ce)!=="false"&&(i=true);let l=P(o,qu);l&&l.getAttribute(Ce)!=="0"&&l.getAttribute(Ce)!=="false"&&(a=true);}if(t===null){let s=e._parent;t=s instanceof Ze?bn(s):false;}return i&&!t&&(r+="**",n="**"+n),a&&(r+="_",n="_"+n),[r,n]}h(bo,"get_run_style_markers");function Vu(e,t,r){return !t&&!r?e:e?e.includes(`
@@ -1 +1 @@
1
- {"inputs":{"nodes/Adeu/GenericFunctions.ts":{"bytes":14305,"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts":{"bytes":8420,"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"shims/module.js":{"bytes":224,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/fflate/esm/index.mjs":{"bytes":91765,"imports":[{"path":"shims/module.js","kind":"import-statement","original":"module"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/@xmldom/xmldom/lib/conventions.js":{"bytes":13399,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/errors.js":{"bytes":6675,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/grammar.js":{"bytes":22988,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/dom.js":{"bytes":124722,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"../../node_modules/@xmldom/xmldom/lib/grammar.js","kind":"require-call","original":"./grammar"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/entities.js":{"bytes":44533,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/sax.js":{"bytes":29094,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/grammar.js","kind":"require-call","original":"./grammar"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/dom-parser.js":{"bytes":19949,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/dom.js","kind":"require-call","original":"./dom"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"../../node_modules/@xmldom/xmldom/lib/entities.js","kind":"require-call","original":"./entities"},{"path":"../../node_modules/@xmldom/xmldom/lib/sax.js","kind":"require-call","original":"./sax"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/index.js":{"bytes":1595,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"../../node_modules/@xmldom/xmldom/lib/dom.js","kind":"require-call","original":"./dom"},{"path":"../../node_modules/@xmldom/xmldom/lib/dom-parser.js","kind":"require-call","original":"./dom-parser"}],"format":"cjs"},"../../node_modules/diff-match-patch/index.js":{"bytes":78052,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../core/dist/index.js":{"bytes":211152,"imports":[{"path":"../../node_modules/fflate/esm/index.mjs","kind":"import-statement","original":"fflate"},{"path":"../../node_modules/@xmldom/xmldom/lib/index.js","kind":"import-statement","original":"@xmldom/xmldom"},{"path":"../../node_modules/diff-match-patch/index.js","kind":"import-statement","original":"diff-match-patch"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/extractMarkdown.operation.ts":{"bytes":2793,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/applyEdits.operation.ts":{"bytes":10970,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/generateDiff.operation.ts":{"bytes":6988,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/finalizeDocument.operation.ts":{"bytes":7710,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/index.ts":{"bytes":5832,"imports":[{"path":"nodes/Adeu/descriptions/extractMarkdown.operation.ts","kind":"import-statement","original":"./extractMarkdown.operation"},{"path":"nodes/Adeu/descriptions/applyEdits.operation.ts","kind":"import-statement","original":"./applyEdits.operation"},{"path":"nodes/Adeu/descriptions/generateDiff.operation.ts","kind":"import-statement","original":"./generateDiff.operation"},{"path":"nodes/Adeu/descriptions/finalizeDocument.operation.ts","kind":"import-statement","original":"./finalizeDocument.operation"},{"path":"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts","kind":"import-statement","original":"./hydrateToolOutput.operation"}],"format":"esm"},"nodes/Adeu/Adeu.node.ts":{"bytes":5722,"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts","kind":"import-statement","original":"./descriptions/hydrateToolOutput.operation"},{"path":"nodes/Adeu/descriptions/index.ts","kind":"import-statement","original":"./descriptions"},{"path":"nodes/Adeu/descriptions/extractMarkdown.operation.ts","kind":"import-statement","original":"./descriptions/extractMarkdown.operation"},{"path":"nodes/Adeu/descriptions/applyEdits.operation.ts","kind":"import-statement","original":"./descriptions/applyEdits.operation"},{"path":"nodes/Adeu/descriptions/generateDiff.operation.ts","kind":"import-statement","original":"./descriptions/generateDiff.operation"},{"path":"nodes/Adeu/descriptions/finalizeDocument.operation.ts","kind":"import-statement","original":"./descriptions/finalizeDocument.operation"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"./GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/nodes/Adeu/Adeu.node.js":{"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"n8n-workflow","kind":"import-statement","external":true}],"exports":["Adeu"],"entryPoint":"nodes/Adeu/Adeu.node.ts","inputs":{"shims/module.js":{"bytesInOutput":121},"../../node_modules/@xmldom/xmldom/lib/conventions.js":{"bytesInOutput":2426},"../../node_modules/@xmldom/xmldom/lib/errors.js":{"bytesInOutput":2862},"../../node_modules/@xmldom/xmldom/lib/grammar.js":{"bytesInOutput":4456},"../../node_modules/@xmldom/xmldom/lib/dom.js":{"bytesInOutput":31528},"../../node_modules/@xmldom/xmldom/lib/entities.js":{"bytesInOutput":35900},"../../node_modules/@xmldom/xmldom/lib/sax.js":{"bytesInOutput":12554},"../../node_modules/@xmldom/xmldom/lib/dom-parser.js":{"bytesInOutput":5025},"../../node_modules/@xmldom/xmldom/lib/index.js":{"bytesInOutput":1094},"../../node_modules/diff-match-patch/index.js":{"bytesInOutput":19270},"nodes/Adeu/Adeu.node.ts":{"bytesInOutput":3535},"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts":{"bytesInOutput":5292},"nodes/Adeu/GenericFunctions.ts":{"bytesInOutput":6014},"../../node_modules/fflate/esm/index.mjs":{"bytesInOutput":13390},"../core/dist/index.js":{"bytesInOutput":88906},"nodes/Adeu/descriptions/extractMarkdown.operation.ts":{"bytesInOutput":1587},"nodes/Adeu/descriptions/applyEdits.operation.ts":{"bytesInOutput":6728},"nodes/Adeu/descriptions/generateDiff.operation.ts":{"bytesInOutput":4279},"nodes/Adeu/descriptions/finalizeDocument.operation.ts":{"bytesInOutput":4878},"nodes/Adeu/descriptions/index.ts":{"bytesInOutput":4364}},"bytes":254819}}}
1
+ {"inputs":{"nodes/Adeu/GenericFunctions.ts":{"bytes":14305,"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts":{"bytes":8420,"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"shims/module.js":{"bytes":224,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/fflate/esm/index.mjs":{"bytes":91765,"imports":[{"path":"shims/module.js","kind":"import-statement","original":"module"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"../../node_modules/@xmldom/xmldom/lib/conventions.js":{"bytes":13399,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/errors.js":{"bytes":6675,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/grammar.js":{"bytes":22988,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/dom.js":{"bytes":124722,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"../../node_modules/@xmldom/xmldom/lib/grammar.js","kind":"require-call","original":"./grammar"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/entities.js":{"bytes":44533,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/sax.js":{"bytes":29094,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/grammar.js","kind":"require-call","original":"./grammar"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/dom-parser.js":{"bytes":19949,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/dom.js","kind":"require-call","original":"./dom"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"../../node_modules/@xmldom/xmldom/lib/entities.js","kind":"require-call","original":"./entities"},{"path":"../../node_modules/@xmldom/xmldom/lib/sax.js","kind":"require-call","original":"./sax"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../../node_modules/@xmldom/xmldom/lib/index.js":{"bytes":1595,"imports":[{"path":"../../node_modules/@xmldom/xmldom/lib/conventions.js","kind":"require-call","original":"./conventions"},{"path":"../../node_modules/@xmldom/xmldom/lib/errors.js","kind":"require-call","original":"./errors"},{"path":"../../node_modules/@xmldom/xmldom/lib/dom.js","kind":"require-call","original":"./dom"},{"path":"../../node_modules/@xmldom/xmldom/lib/dom-parser.js","kind":"require-call","original":"./dom-parser"}],"format":"cjs"},"../../node_modules/diff-match-patch/index.js":{"bytes":78052,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"cjs"},"../core/dist/index.js":{"bytes":211232,"imports":[{"path":"../../node_modules/fflate/esm/index.mjs","kind":"import-statement","original":"fflate"},{"path":"../../node_modules/@xmldom/xmldom/lib/index.js","kind":"import-statement","original":"@xmldom/xmldom"},{"path":"../../node_modules/diff-match-patch/index.js","kind":"import-statement","original":"diff-match-patch"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/extractMarkdown.operation.ts":{"bytes":2793,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/applyEdits.operation.ts":{"bytes":10970,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/generateDiff.operation.ts":{"bytes":6988,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/finalizeDocument.operation.ts":{"bytes":7710,"imports":[{"path":"../core/dist/index.js","kind":"import-statement","original":"@adeu/core"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"../GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"nodes/Adeu/descriptions/index.ts":{"bytes":5832,"imports":[{"path":"nodes/Adeu/descriptions/extractMarkdown.operation.ts","kind":"import-statement","original":"./extractMarkdown.operation"},{"path":"nodes/Adeu/descriptions/applyEdits.operation.ts","kind":"import-statement","original":"./applyEdits.operation"},{"path":"nodes/Adeu/descriptions/generateDiff.operation.ts","kind":"import-statement","original":"./generateDiff.operation"},{"path":"nodes/Adeu/descriptions/finalizeDocument.operation.ts","kind":"import-statement","original":"./finalizeDocument.operation"},{"path":"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts","kind":"import-statement","original":"./hydrateToolOutput.operation"}],"format":"esm"},"nodes/Adeu/Adeu.node.ts":{"bytes":5722,"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts","kind":"import-statement","original":"./descriptions/hydrateToolOutput.operation"},{"path":"nodes/Adeu/descriptions/index.ts","kind":"import-statement","original":"./descriptions"},{"path":"nodes/Adeu/descriptions/extractMarkdown.operation.ts","kind":"import-statement","original":"./descriptions/extractMarkdown.operation"},{"path":"nodes/Adeu/descriptions/applyEdits.operation.ts","kind":"import-statement","original":"./descriptions/applyEdits.operation"},{"path":"nodes/Adeu/descriptions/generateDiff.operation.ts","kind":"import-statement","original":"./descriptions/generateDiff.operation"},{"path":"nodes/Adeu/descriptions/finalizeDocument.operation.ts","kind":"import-statement","original":"./descriptions/finalizeDocument.operation"},{"path":"nodes/Adeu/GenericFunctions.ts","kind":"import-statement","original":"./GenericFunctions"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/nodes/Adeu/Adeu.node.js":{"imports":[{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"n8n-workflow","kind":"import-statement","external":true},{"path":"n8n-workflow","kind":"import-statement","external":true}],"exports":["Adeu"],"entryPoint":"nodes/Adeu/Adeu.node.ts","inputs":{"shims/module.js":{"bytesInOutput":121},"../../node_modules/@xmldom/xmldom/lib/conventions.js":{"bytesInOutput":2426},"../../node_modules/@xmldom/xmldom/lib/errors.js":{"bytesInOutput":2862},"../../node_modules/@xmldom/xmldom/lib/grammar.js":{"bytesInOutput":4456},"../../node_modules/@xmldom/xmldom/lib/dom.js":{"bytesInOutput":31528},"../../node_modules/@xmldom/xmldom/lib/entities.js":{"bytesInOutput":35900},"../../node_modules/@xmldom/xmldom/lib/sax.js":{"bytesInOutput":12554},"../../node_modules/@xmldom/xmldom/lib/dom-parser.js":{"bytesInOutput":5025},"../../node_modules/@xmldom/xmldom/lib/index.js":{"bytesInOutput":1094},"../../node_modules/diff-match-patch/index.js":{"bytesInOutput":19270},"nodes/Adeu/Adeu.node.ts":{"bytesInOutput":3535},"nodes/Adeu/descriptions/hydrateToolOutput.operation.ts":{"bytesInOutput":5292},"nodes/Adeu/GenericFunctions.ts":{"bytesInOutput":6014},"../../node_modules/fflate/esm/index.mjs":{"bytesInOutput":13390},"../core/dist/index.js":{"bytesInOutput":88945},"nodes/Adeu/descriptions/extractMarkdown.operation.ts":{"bytesInOutput":1587},"nodes/Adeu/descriptions/applyEdits.operation.ts":{"bytesInOutput":6728},"nodes/Adeu/descriptions/generateDiff.operation.ts":{"bytesInOutput":4279},"nodes/Adeu/descriptions/finalizeDocument.operation.ts":{"bytesInOutput":4878},"nodes/Adeu/descriptions/index.ts":{"bytesInOutput":4364}},"bytes":254858}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-adeu",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "n8n community node for Adeu — apply AI-driven tracked changes, generate diffs, and sanitize Microsoft Word (.docx) documents.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",