@eigenpal/docx-js-editor 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{ClipboardManager-B1jZrC6h.d.cts → ClipboardManager-Bbo5MM_U.d.cts} +1 -1
- package/dist/{ClipboardManager-jqJVxB6g.d.ts → ClipboardManager-CR843H7H.d.ts} +1 -1
- package/dist/{DocumentAgent-CrbsDniO.d.ts → DocumentAgent-cHf96hwL.d.cts} +4 -2
- package/dist/{DocumentAgent-CnJ9AEl_.d.cts → DocumentAgent-lHtXgMFN.d.ts} +4 -2
- package/dist/PageSetupDialog-RLMYJ3BA.cjs +1 -0
- package/dist/PageSetupDialog-ZZTFPZKJ.js +1 -0
- package/dist/{agentApi-DfsWRyrP.d.cts → agentApi-DmDuQm0e.d.cts} +2 -0
- package/dist/{agentApi-DfsWRyrP.d.ts → agentApi-DmDuQm0e.d.ts} +2 -0
- package/dist/chunk-2JOQ7WKO.js +258 -0
- package/dist/{chunk-HT2Z33YM.cjs → chunk-3C2VHZX6.cjs} +4 -4
- package/dist/chunk-3X3LTNK4.js +26 -0
- package/dist/chunk-4VUZBV2S.js +1 -0
- package/dist/{chunk-TAF6KYDM.cjs → chunk-5ILXHRJS.cjs} +2 -2
- package/dist/{chunk-7KJ3YVDQ.js → chunk-6TUCNECX.js} +2 -2
- package/dist/chunk-C6ELWJWO.js +3 -0
- package/dist/chunk-I5YZ4MRV.cjs +3 -0
- package/dist/chunk-IA4LPH2A.cjs +1 -0
- package/dist/chunk-JIKVCUR6.js +9 -0
- package/dist/chunk-KL2RYY6G.cjs +9 -0
- package/dist/chunk-KR32M3S4.cjs +1 -0
- package/dist/chunk-PGEORVCG.js +59 -0
- package/dist/chunk-PIVLDW7B.cjs +26 -0
- package/dist/chunk-PUVSVHHB.cjs +59 -0
- package/dist/{chunk-32HMU2UV.js → chunk-R56SLH64.js} +1 -1
- package/dist/chunk-RHLMVYVZ.cjs +258 -0
- package/dist/chunk-SE5EN2QL.js +1 -0
- package/dist/{clipboard-DkfAv07F.d.cts → clipboard-Bj2X5pLO.d.cts} +1 -1
- package/dist/{clipboard-BE8E-szx.d.ts → clipboard-DriRE6eS.d.ts} +1 -1
- package/dist/{colorResolver-CYttioMe.d.ts → colorResolver-BTTqW66Q.d.ts} +4 -3
- package/dist/{colorResolver-Dr8kQZAQ.d.cts → colorResolver-yl7Xh_Qg.d.cts} +4 -3
- package/dist/core-plugins-reexport.cjs +1 -1
- package/dist/core-plugins-reexport.d.cts +4 -4
- package/dist/core-plugins-reexport.d.ts +4 -4
- package/dist/core-plugins-reexport.js +1 -1
- package/dist/core-reexport.cjs +1 -1
- package/dist/core-reexport.d.cts +10 -10
- package/dist/core-reexport.d.ts +10 -10
- package/dist/core-reexport.js +1 -1
- package/dist/{fontLoader-BsqQnB4v.d.ts → fontLoader-DQJOS1sb.d.ts} +1 -1
- package/dist/{fontLoader-DECXIoMr.d.cts → fontLoader-Daq8y8C2.d.cts} +1 -1
- package/dist/headless-reexport.cjs +2 -2
- package/dist/headless-reexport.d.cts +7 -7
- package/dist/headless-reexport.d.ts +7 -7
- package/dist/headless-reexport.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +1 -1
- package/dist/mcp-reexport.cjs +3 -3
- package/dist/mcp-reexport.d.cts +2 -2
- package/dist/mcp-reexport.d.ts +2 -2
- package/dist/mcp-reexport.js +3 -3
- package/dist/{react-CAlVCYa4.d.cts → react-BYRZYSPG.d.cts} +20 -7
- package/dist/{react-C6bgHDFl.d.ts → react-Bj9uDtjg.d.ts} +20 -7
- package/dist/react.cjs +1 -1
- package/dist/react.d.cts +5 -5
- package/dist/react.d.ts +5 -5
- package/dist/react.js +1 -1
- package/dist/{registry-gRbkCooh.d.ts → registry-C2DPl-QW.d.ts} +1 -1
- package/dist/{registry-BU-FbHh-.d.cts → registry-CXGC344v.d.cts} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-7wjInVMW.d.ts → types-BpokDLqL.d.ts} +1 -1
- package/dist/{types-DEEpBL9H.d.cts → types-COQvtZji.d.cts} +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.cts +9 -5
- package/dist/ui.d.ts +9 -5
- package/dist/ui.js +1 -1
- package/dist/{variableDetector-BXJaTkiB.d.ts → variableDetector-BYzE_RXw.d.ts} +1 -1
- package/dist/{variableDetector-B4oQJa2e.d.cts → variableDetector-C8ST_dnq.d.cts} +1 -1
- package/package.json +3 -2
- package/dist/chunk-2Y6FLZ5Q.js +0 -3
- package/dist/chunk-6NDMKJIE.js +0 -9
- package/dist/chunk-6NYA53QC.cjs +0 -258
- package/dist/chunk-EH3NY2DQ.cjs +0 -26
- package/dist/chunk-FXJAIFPR.js +0 -59
- package/dist/chunk-GICVJSFJ.cjs +0 -9
- package/dist/chunk-JRRTZZ72.cjs +0 -1
- package/dist/chunk-P3AEZKQO.cjs +0 -3
- package/dist/chunk-Q7YYC75E.js +0 -258
- package/dist/chunk-UTWPV2I4.js +0 -26
- package/dist/chunk-Y6QBJGMO.cjs +0 -59
- package/dist/chunk-ZTVQA46Q.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var chunk6NYA53QC_cjs=require('./chunk-6NYA53QC.cjs');require('./chunk-4CUGBNL2.cjs');var chunkHT2Z33YM_cjs=require('./chunk-HT2Z33YM.cjs'),chunkP3AEZKQO_cjs=require('./chunk-P3AEZKQO.cjs'),chunkVTAS7VZ6_cjs=require('./chunk-VTAS7VZ6.cjs'),chunkXS2AQFMF_cjs=require('./chunk-XS2AQFMF.cjs'),chunk2VHQ7YOQ_cjs=require('./chunk-2VHQ7YOQ.cjs');require('./chunk-NVAQQYBJ.cjs');var chunkGICVJSFJ_cjs=require('./chunk-GICVJSFJ.cjs'),chunkJRRTZZ72_cjs=require('./chunk-JRRTZZ72.cjs'),chunkTAF6KYDM_cjs=require('./chunk-TAF6KYDM.cjs'),chunkB7TICMXD_cjs=require('./chunk-B7TICMXD.cjs'),chunkY6QBJGMO_cjs=require('./chunk-Y6QBJGMO.cjs'),chunkP7ZF45KZ_cjs=require('./chunk-P7ZF45KZ.cjs'),chunkEH3NY2DQ_cjs=require('./chunk-EH3NY2DQ.cjs'),chunkYS7FDEZ4_cjs=require('./chunk-YS7FDEZ4.cjs');require('./chunk-XQNCLN4T.cjs'),require('./chunk-PCJ5ACUV.cjs');var ye=require('react'),prosemirrorState=require('prosemirror-state'),prosemirrorView=require('prosemirror-view'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ye__default=/*#__PURE__*/_interopDefault(ye);var Ba=/[\p{L}\p{N}''\-]/u,Wa=/\s/;function M(e){return !e||e.length===0?false:Ba.test(e)}function K(e){return !e||e.length===0?false:Wa.test(e)}function R(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let o=e[t];if(K(o)){let n=t,r=t;for(;n>0&&K(e[n-1]);)n--;for(;r<e.length&&K(e[r]);)r++;return [n,r]}if(M(o)){let n=t,r=t;for(;n>0&&M(e[n-1]);)n--;for(;r<e.length&&M(e[r]);)r++;return [n,r]}return [t,t+1]}function Fa(e,t){let[o,n]=R(e,t);return e.slice(o,n)}function Ua(e,t){let[o,n]=R(e,t);return {word:e.slice(o,n),startIndex:o,endIndex:n}}function $(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0),o=t.startContainer;if(o.nodeType===Node.TEXT_NODE){let n=o.textContent||"",r=t.startOffset,[a,i]=R(n,r);if(i>a)return t.setStart(o,a),t.setEnd(o,i),e.removeAllRanges(),e.addRange(t),true}if(o.nodeType===Node.ELEMENT_NODE){let n=o,r=q(n);if(r.length>0){let a=t.startOffset,i=null,l=a;if(a<n.childNodes.length){let p=n.childNodes[a];if(p.nodeType===Node.TEXT_NODE)i=p,l=0;else if(p instanceof Element){let d=q(p);d.length>0&&(i=d[0],l=0);}}if(!i&&r.length>0&&(i=r[0],l=0),i){let p=i.textContent||"",[d,c]=R(p,l);if(c>d){let u=document.createRange();return u.setStart(i,d),u.setEnd(i,c),e.removeAllRanges(),e.addRange(u),true}}}}return false}function za(e,t){let o=window.getSelection();if(!o)return false;let n=e.textContent||"",[r,a]=R(n,t);if(a>r){let i=document.createRange();return i.setStart(e,r),i.setEnd(e,a),o.removeAllRanges(),o.addRange(i),true}return false}function Va(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0);if(t.collapsed)return $();let o=t.startContainer,n=t.endContainer,r=t.startOffset,a=t.endOffset;if(o.nodeType===Node.TEXT_NODE){let i=o.textContent||"",[l]=R(i,t.startOffset);r=l;}if(n.nodeType===Node.TEXT_NODE){let i=n.textContent||"",l=Math.max(0,t.endOffset-1),[,p]=R(i,l);a=p;}try{return t.setStart(o,r),t.setEnd(n,a),e.removeAllRanges(),e.addRange(t),!0}catch(i){return console.warn("Could not expand selection to word boundaries:",i),false}}function J(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let o=e.getRangeAt(0).commonAncestorContainer,n=Ga(o);if(n){let r=document.createRange();return r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),true}return false}function Ga(e){if(!e)return null;let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute("data-paragraph-index"))return t;t=t.parentNode;}return null}function q(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;for(;n=o.nextNode();)n.nodeType===Node.TEXT_NODE&&t.push(n);return t}var V=0,O=null,G=null,$a=500;function j(){V=0,G=null,O&&(clearTimeout(O),O=null);}function Q(e){return e.target!==G&&j(),V++,G=e.target,O&&clearTimeout(O),O=setTimeout(j,$a),Math.min(V,3)}function Ya(){return e=>{e.ctrlKey||e.metaKey||e.altKey||$();}}function Za(){return e=>{if(Q(e)===3){if(e.ctrlKey||e.metaKey||e.altKey)return;J();}}}function P(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function Y(e){return e?/\s/.test(e):false}function Xa(e){return e?/[\p{P}]/u.test(e):false}function qa(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&Y(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&P(e[o-1]);)o--;return o}function ja(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&Y(e[o]);)o++;return o}function ee(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&!P(e[o]);)o++;return o}function te(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!P(e[o-1]);)o--;for(;o>0&&P(e[o-1]);)o--;return o}function oe(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let a=n.getBoundingClientRect().top,i=0,l=t;for(;i<l;){let p=Math.floor((i+l)/2);n.setStart(e,p),n.collapse(true);let d=n.getBoundingClientRect();Math.abs(d.top-a)<2?l=p:i=p+1;}return {node:e,offset:i}}return null}function ne(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,l=t,p=n;for(;l<p;){let d=Math.ceil((l+p)/2);r.setStart(e,d),r.collapse(true);let c=r.getBoundingClientRect();Math.abs(c.top-i)<2?l=d:p=d-1;}return {node:e,offset:l}}return null}function Ja(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function H(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function _(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function re(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",a=o.focusOffset,i;return e==="left"?i=te(r,a):i=ee(r,a),t?_(n,i):H(n,i),true}function ae(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?oe(n,o.focusOffset):ne(n,o.focusOffset);if(i)return t?_(i.node,i.offset):H(i.node,i.offset),true}let r=n.textContent||"",a=e==="start"?0:r.length;return t?_(n,a):H(n,a),true}function ie(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:a}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Qa(e,t){let o=ie(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&re(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(ae(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function ei(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function ti(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;if(r===a)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,a),e.removeAllRanges(),e.addRange(i),true}function oi(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;return r===a?null:o.slice(r,a)}function ni(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var T={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function S(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function ri(){return [{action:"Move by word (left)",shortcut:S(T.wordLeft)},{action:"Move by word (right)",shortcut:S(T.wordRight)},{action:"Select word (left)",shortcut:S(T.selectWordLeft)},{action:"Select word (right)",shortcut:S(T.selectWordRight)},{action:"Go to line start",shortcut:S(T.lineStart)},{action:"Go to line end",shortcut:S(T.lineEnd)},{action:"Select to line start",shortcut:S(T.selectToLineStart)},{action:"Select to line end",shortcut:S(T.selectToLineEnd)},{action:"Go to document start",shortcut:S(T.documentStart)},{action:"Go to document end",shortcut:S(T.documentEnd)},{action:"Select to document start",shortcut:S(T.selectToDocumentStart)},{action:"Select to document end",shortcut:S(T.selectToDocumentEnd)}]}var se=/\{([#/^@]?)([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}/g,m=new prosemirrorState.PluginKey("template");function li(e,t,o){return `${e}:${t}:${o}`}function le(e){let t=[];e.descendants((p,d)=>(p.isText&&p.text&&t.push({text:p.text,pos:d}),true));let o="",n=[];for(let p of t){for(let d=0;d<p.text.length;d++)n.push(p.pos+d);o+=p.text;}let r=[],a=[],i=new Map,l;for(se.lastIndex=0;(l=se.exec(o))!==null;){let[p,d,c]=l,u=n[l.index],x=n[l.index+p.length-1]+1,g;d==="#"?g="sectionStart":d==="/"?g="sectionEnd":d==="^"?g="invertedStart":d==="@"?g="raw":g="variable";let b=`${g}:${c}`,k=i.get(b)??0;i.set(b,k+1);let N={id:li(g,c,k),type:g,name:c,rawTag:p,from:u,to:x};if(g==="sectionStart"||g==="invertedStart")N.nestedVars=[],a.push(N);else if(g==="sectionEnd"){for(let s=a.length-1;s>=0;s--)if(a[s].name===c){a.splice(s,1);break}}else g==="variable"&&a.length>0&&(a[a.length-1].nestedVars?.push(c),N.insideSection=true);r.push(N);}return r}function ci(e){switch(e){case "sectionStart":case "sectionEnd":return "#3b82f6";case "invertedStart":return "#8b5cf6";case "raw":return "#ef4444";default:return "#f59e0b"}}function Z(e,t,o,n){let r=[];for(let a of t){let i=a.id===o,l=a.id===n,p=ci(a.type),d=["docx-template-tag"];i&&d.push("hovered"),l&&d.push("selected"),r.push(prosemirrorView.Decoration.inline(a.from,a.to,{class:d.join(" "),"data-tag-id":a.id,style:`background-color: ${p}22; border-radius: 2px;`}));}return prosemirrorView.DecorationSet.create(e,r)}function pi(e,t){if(e.length!==t.length)return false;for(let o=0;o<e.length;o++)if(e[o].id!==t[o].id)return false;return true}function B(){return new prosemirrorState.Plugin({key:m,state:{init(e,t){let o=le(t.doc);return {tags:o,decorations:Z(t.doc,o)}},apply(e,t,o,n){if(e.docChanged){let a=le(n.doc),i=pi(t.tags,a);return {tags:a,decorations:i?t.decorations.map(e.mapping,e.doc):Z(n.doc,a,t.hoveredId,t.selectedId),hoveredId:t.hoveredId,selectedId:t.selectedId}}let r=e.getMeta(m);if(r){let a=r.hoveredId??t.hoveredId,i=r.selectedId??t.selectedId;return {...t,hoveredId:a,selectedId:i,decorations:Z(n.doc,t.tags,a,i)}}return {...t,decorations:t.decorations.map(e.mapping,e.doc)}}},props:{decorations(e){return m.getState(e)?.decorations??prosemirrorView.DecorationSet.empty},handleClick(e,t){let n=(m.getState(e.state)?.tags??[]).find(a=>t>=a.from&&t<=a.to);return n?(e.dispatch(e.state.tr.setMeta(m,{selectedId:n.id})),true):(m.getState(e.state)?.selectedId&&e.dispatch(e.state.tr.setMeta(m,{selectedId:void 0})),false)},handleDOMEvents:{mouseover(e,t){let n=t.target.closest?.("[data-tag-id]")?.getAttribute("data-tag-id")||void 0,r=m.getState(e.state)?.hoveredId;return n!==r&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:n})),false},mouseout(e,t){return t.relatedTarget?.closest?.("[data-tag-id]")||m.getState(e.state)?.hoveredId&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:void 0})),false}}}})}function pe(e){return m.getState(e)?.tags??[]}function D(e,t){e.dispatch(e.state.tr.setMeta(m,{hoveredId:t}));}function L(e,t){e.dispatch(e.state.tr.setMeta(m,{selectedId:t}));}var W=`
|
|
1
|
+
'use strict';var chunkRHLMVYVZ_cjs=require('./chunk-RHLMVYVZ.cjs');require('./chunk-4CUGBNL2.cjs');var chunk3C2VHZX6_cjs=require('./chunk-3C2VHZX6.cjs'),chunkI5YZ4MRV_cjs=require('./chunk-I5YZ4MRV.cjs'),chunkVTAS7VZ6_cjs=require('./chunk-VTAS7VZ6.cjs'),chunkXS2AQFMF_cjs=require('./chunk-XS2AQFMF.cjs'),chunk2VHQ7YOQ_cjs=require('./chunk-2VHQ7YOQ.cjs');require('./chunk-NVAQQYBJ.cjs');var chunkKL2RYY6G_cjs=require('./chunk-KL2RYY6G.cjs'),chunkIA4LPH2A_cjs=require('./chunk-IA4LPH2A.cjs'),chunk5ILXHRJS_cjs=require('./chunk-5ILXHRJS.cjs'),chunkB7TICMXD_cjs=require('./chunk-B7TICMXD.cjs'),chunkPUVSVHHB_cjs=require('./chunk-PUVSVHHB.cjs'),chunkP7ZF45KZ_cjs=require('./chunk-P7ZF45KZ.cjs'),chunkPIVLDW7B_cjs=require('./chunk-PIVLDW7B.cjs'),chunkYS7FDEZ4_cjs=require('./chunk-YS7FDEZ4.cjs'),chunkKR32M3S4_cjs=require('./chunk-KR32M3S4.cjs');require('./chunk-XQNCLN4T.cjs'),require('./chunk-PCJ5ACUV.cjs');var ye=require('react'),prosemirrorState=require('prosemirror-state'),prosemirrorView=require('prosemirror-view'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ye__default=/*#__PURE__*/_interopDefault(ye);var Ba=/[\p{L}\p{N}''\-]/u,Wa=/\s/;function M(e){return !e||e.length===0?false:Ba.test(e)}function K(e){return !e||e.length===0?false:Wa.test(e)}function R(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let o=e[t];if(K(o)){let n=t,r=t;for(;n>0&&K(e[n-1]);)n--;for(;r<e.length&&K(e[r]);)r++;return [n,r]}if(M(o)){let n=t,r=t;for(;n>0&&M(e[n-1]);)n--;for(;r<e.length&&M(e[r]);)r++;return [n,r]}return [t,t+1]}function Fa(e,t){let[o,n]=R(e,t);return e.slice(o,n)}function Ua(e,t){let[o,n]=R(e,t);return {word:e.slice(o,n),startIndex:o,endIndex:n}}function $(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0),o=t.startContainer;if(o.nodeType===Node.TEXT_NODE){let n=o.textContent||"",r=t.startOffset,[a,i]=R(n,r);if(i>a)return t.setStart(o,a),t.setEnd(o,i),e.removeAllRanges(),e.addRange(t),true}if(o.nodeType===Node.ELEMENT_NODE){let n=o,r=q(n);if(r.length>0){let a=t.startOffset,i=null,l=a;if(a<n.childNodes.length){let p=n.childNodes[a];if(p.nodeType===Node.TEXT_NODE)i=p,l=0;else if(p instanceof Element){let d=q(p);d.length>0&&(i=d[0],l=0);}}if(!i&&r.length>0&&(i=r[0],l=0),i){let p=i.textContent||"",[d,c]=R(p,l);if(c>d){let u=document.createRange();return u.setStart(i,d),u.setEnd(i,c),e.removeAllRanges(),e.addRange(u),true}}}}return false}function za(e,t){let o=window.getSelection();if(!o)return false;let n=e.textContent||"",[r,a]=R(n,t);if(a>r){let i=document.createRange();return i.setStart(e,r),i.setEnd(e,a),o.removeAllRanges(),o.addRange(i),true}return false}function Va(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0);if(t.collapsed)return $();let o=t.startContainer,n=t.endContainer,r=t.startOffset,a=t.endOffset;if(o.nodeType===Node.TEXT_NODE){let i=o.textContent||"",[l]=R(i,t.startOffset);r=l;}if(n.nodeType===Node.TEXT_NODE){let i=n.textContent||"",l=Math.max(0,t.endOffset-1),[,p]=R(i,l);a=p;}try{return t.setStart(o,r),t.setEnd(n,a),e.removeAllRanges(),e.addRange(t),!0}catch(i){return console.warn("Could not expand selection to word boundaries:",i),false}}function J(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let o=e.getRangeAt(0).commonAncestorContainer,n=Ga(o);if(n){let r=document.createRange();return r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),true}return false}function Ga(e){if(!e)return null;let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute("data-paragraph-index"))return t;t=t.parentNode;}return null}function q(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;for(;n=o.nextNode();)n.nodeType===Node.TEXT_NODE&&t.push(n);return t}var V=0,O=null,G=null,$a=500;function j(){V=0,G=null,O&&(clearTimeout(O),O=null);}function Q(e){return e.target!==G&&j(),V++,G=e.target,O&&clearTimeout(O),O=setTimeout(j,$a),Math.min(V,3)}function Ya(){return e=>{e.ctrlKey||e.metaKey||e.altKey||$();}}function Za(){return e=>{if(Q(e)===3){if(e.ctrlKey||e.metaKey||e.altKey)return;J();}}}function P(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function Y(e){return e?/\s/.test(e):false}function Xa(e){return e?/[\p{P}]/u.test(e):false}function qa(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&Y(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&P(e[o-1]);)o--;return o}function ja(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&Y(e[o]);)o++;return o}function ee(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&!P(e[o]);)o++;return o}function te(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!P(e[o-1]);)o--;for(;o>0&&P(e[o-1]);)o--;return o}function oe(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let a=n.getBoundingClientRect().top,i=0,l=t;for(;i<l;){let p=Math.floor((i+l)/2);n.setStart(e,p),n.collapse(true);let d=n.getBoundingClientRect();Math.abs(d.top-a)<2?l=p:i=p+1;}return {node:e,offset:i}}return null}function ne(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,l=t,p=n;for(;l<p;){let d=Math.ceil((l+p)/2);r.setStart(e,d),r.collapse(true);let c=r.getBoundingClientRect();Math.abs(c.top-i)<2?l=d:p=d-1;}return {node:e,offset:l}}return null}function Ja(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function H(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function _(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function re(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",a=o.focusOffset,i;return e==="left"?i=te(r,a):i=ee(r,a),t?_(n,i):H(n,i),true}function ae(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?oe(n,o.focusOffset):ne(n,o.focusOffset);if(i)return t?_(i.node,i.offset):H(i.node,i.offset),true}let r=n.textContent||"",a=e==="start"?0:r.length;return t?_(n,a):H(n,a),true}function ie(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:a}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Qa(e,t){let o=ie(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&re(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(ae(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function ei(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function ti(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;if(r===a)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,a),e.removeAllRanges(),e.addRange(i),true}function oi(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;return r===a?null:o.slice(r,a)}function ni(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var T={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function S(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function ri(){return [{action:"Move by word (left)",shortcut:S(T.wordLeft)},{action:"Move by word (right)",shortcut:S(T.wordRight)},{action:"Select word (left)",shortcut:S(T.selectWordLeft)},{action:"Select word (right)",shortcut:S(T.selectWordRight)},{action:"Go to line start",shortcut:S(T.lineStart)},{action:"Go to line end",shortcut:S(T.lineEnd)},{action:"Select to line start",shortcut:S(T.selectToLineStart)},{action:"Select to line end",shortcut:S(T.selectToLineEnd)},{action:"Go to document start",shortcut:S(T.documentStart)},{action:"Go to document end",shortcut:S(T.documentEnd)},{action:"Select to document start",shortcut:S(T.selectToDocumentStart)},{action:"Select to document end",shortcut:S(T.selectToDocumentEnd)}]}var se=/\{([#/^@]?)([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}/g,m=new prosemirrorState.PluginKey("template");function li(e,t,o){return `${e}:${t}:${o}`}function le(e){let t=[];e.descendants((p,d)=>(p.isText&&p.text&&t.push({text:p.text,pos:d}),true));let o="",n=[];for(let p of t){for(let d=0;d<p.text.length;d++)n.push(p.pos+d);o+=p.text;}let r=[],a=[],i=new Map,l;for(se.lastIndex=0;(l=se.exec(o))!==null;){let[p,d,c]=l,u=n[l.index],x=n[l.index+p.length-1]+1,g;d==="#"?g="sectionStart":d==="/"?g="sectionEnd":d==="^"?g="invertedStart":d==="@"?g="raw":g="variable";let b=`${g}:${c}`,k=i.get(b)??0;i.set(b,k+1);let N={id:li(g,c,k),type:g,name:c,rawTag:p,from:u,to:x};if(g==="sectionStart"||g==="invertedStart")N.nestedVars=[],a.push(N);else if(g==="sectionEnd"){for(let s=a.length-1;s>=0;s--)if(a[s].name===c){a.splice(s,1);break}}else g==="variable"&&a.length>0&&(a[a.length-1].nestedVars?.push(c),N.insideSection=true);r.push(N);}return r}function ci(e){switch(e){case "sectionStart":case "sectionEnd":return "#3b82f6";case "invertedStart":return "#8b5cf6";case "raw":return "#ef4444";default:return "#f59e0b"}}function Z(e,t,o,n){let r=[];for(let a of t){let i=a.id===o,l=a.id===n,p=ci(a.type),d=["docx-template-tag"];i&&d.push("hovered"),l&&d.push("selected"),r.push(prosemirrorView.Decoration.inline(a.from,a.to,{class:d.join(" "),"data-tag-id":a.id,style:`background-color: ${p}22; border-radius: 2px;`}));}return prosemirrorView.DecorationSet.create(e,r)}function pi(e,t){if(e.length!==t.length)return false;for(let o=0;o<e.length;o++)if(e[o].id!==t[o].id)return false;return true}function B(){return new prosemirrorState.Plugin({key:m,state:{init(e,t){let o=le(t.doc);return {tags:o,decorations:Z(t.doc,o)}},apply(e,t,o,n){if(e.docChanged){let a=le(n.doc),i=pi(t.tags,a);return {tags:a,decorations:i?t.decorations.map(e.mapping,e.doc):Z(n.doc,a,t.hoveredId,t.selectedId),hoveredId:t.hoveredId,selectedId:t.selectedId}}let r=e.getMeta(m);if(r){let a=r.hoveredId??t.hoveredId,i=r.selectedId??t.selectedId;return {...t,hoveredId:a,selectedId:i,decorations:Z(n.doc,t.tags,a,i)}}return {...t,decorations:t.decorations.map(e.mapping,e.doc)}}},props:{decorations(e){return m.getState(e)?.decorations??prosemirrorView.DecorationSet.empty},handleClick(e,t){let n=(m.getState(e.state)?.tags??[]).find(a=>t>=a.from&&t<=a.to);return n?(e.dispatch(e.state.tr.setMeta(m,{selectedId:n.id})),true):(m.getState(e.state)?.selectedId&&e.dispatch(e.state.tr.setMeta(m,{selectedId:void 0})),false)},handleDOMEvents:{mouseover(e,t){let n=t.target.closest?.("[data-tag-id]")?.getAttribute("data-tag-id")||void 0,r=m.getState(e.state)?.hoveredId;return n!==r&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:n})),false},mouseout(e,t){return t.relatedTarget?.closest?.("[data-tag-id]")||m.getState(e.state)?.hoveredId&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:void 0})),false}}}})}function pe(e){return m.getState(e)?.tags??[]}function D(e,t){e.dispatch(e.state.tr.setMeta(m,{hoveredId:t}));}function L(e,t){e.dispatch(e.state.tr.setMeta(m,{selectedId:t}));}var W=`
|
|
2
2
|
.docx-template-tag {
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
transition: background-color 0.1s;
|
|
@@ -152,4 +152,4 @@ Iterates over ${s.name}[]. Access nested properties via ${s.name}.property`:s.ra
|
|
|
152
152
|
${W}
|
|
153
153
|
${z}
|
|
154
154
|
${he}
|
|
155
|
-
`}}var Ci=Te();var Gi="0.0.2";Object.defineProperty(exports,"DEFAULT_SELECTION_STYLE",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.v}});Object.defineProperty(exports,"DocxEditor",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.i}});Object.defineProperty(exports,"ErrorBoundary",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.c}});Object.defineProperty(exports,"ErrorProvider",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.b}});Object.defineProperty(exports,"HIGH_CONTRAST_SELECTION_STYLE",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.w}});Object.defineProperty(exports,"PLUGIN_HOST_STYLES",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.T}});Object.defineProperty(exports,"ParseErrorDisplay",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.d}});Object.defineProperty(exports,"PluginHost",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.U}});Object.defineProperty(exports,"SELECTION_CSS_VARS",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.x}});Object.defineProperty(exports,"UnsupportedFeatureWarning",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.e}});Object.defineProperty(exports,"ZOOM_PRESETS",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.l}});Object.defineProperty(exports,"areSelectionStylesInjected",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.O}});Object.defineProperty(exports,"clampZoom",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.u}});Object.defineProperty(exports,"clearSelection",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.J}});Object.defineProperty(exports,"createSelectionChangeHandler",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.P}});Object.defineProperty(exports,"findNearestZoomPreset",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.o}});Object.defineProperty(exports,"formatZoom",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.r}});Object.defineProperty(exports,"generateOverlayElements",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.R}});Object.defineProperty(exports,"generateSelectionCSS",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.C}});Object.defineProperty(exports,"getHighlightRectStyle",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.B}});Object.defineProperty(exports,"getMergedSelectionRects",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.A}});Object.defineProperty(exports,"getNextZoomPreset",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.p}});Object.defineProperty(exports,"getPreviousZoomPreset",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.q}});Object.defineProperty(exports,"getSelectedText",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.E}});Object.defineProperty(exports,"getSelectionBoundingRect",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.G}});Object.defineProperty(exports,"getSelectionRects",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.y}});Object.defineProperty(exports,"getUserFriendlyMessage",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.g}});Object.defineProperty(exports,"getZoomPresets",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.n}});Object.defineProperty(exports,"hasActiveSelection",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.D}});Object.defineProperty(exports,"highlightTextRange",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.H}});Object.defineProperty(exports,"injectSelectionStyles",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.M}});Object.defineProperty(exports,"isParseError",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.f}});Object.defineProperty(exports,"isSelectionBackwards",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.K}});Object.defineProperty(exports,"isSelectionWithin",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.F}});Object.defineProperty(exports,"isZoomPreset",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.t}});Object.defineProperty(exports,"mergeAdjacentRects",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.z}});Object.defineProperty(exports,"normalizeSelectionDirection",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.L}});Object.defineProperty(exports,"parseZoom",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.s}});Object.defineProperty(exports,"removeSelectionStyles",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.N}});Object.defineProperty(exports,"renderAsync",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.j}});Object.defineProperty(exports,"selectRange",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.I}});Object.defineProperty(exports,"useAutoSave",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.k}});Object.defineProperty(exports,"useClipboard",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.S}});Object.defineProperty(exports,"useErrorNotifications",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.a}});Object.defineProperty(exports,"useSelectionHighlight",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.Q}});Object.defineProperty(exports,"useTableSelection",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.h}});Object.defineProperty(exports,"useWheelZoom",{enumerable:true,get:function(){return chunk6NYA53QC_cjs.m}});Object.defineProperty(exports,"ColorPicker",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.q}});Object.defineProperty(exports,"ContextMenu",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.a}});Object.defineProperty(exports,"InsertImageDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.$}});Object.defineProperty(exports,"InsertSymbolDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ja}});Object.defineProperty(exports,"InsertTableDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.U}});Object.defineProperty(exports,"KeyboardShortcutsDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.wa}});Object.defineProperty(exports,"LoadingIndicator",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.H}});Object.defineProperty(exports,"PasteSpecialDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.qa}});Object.defineProperty(exports,"PrintButton",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.r}});Object.defineProperty(exports,"PrintStyles",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.s}});Object.defineProperty(exports,"ResponsePreview",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.g}});Object.defineProperty(exports,"ResponsiveToolbar",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.P}});Object.defineProperty(exports,"ResponsiveToolbarGroup",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.Q}});Object.defineProperty(exports,"SYMBOL_CATEGORIES",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ia}});Object.defineProperty(exports,"TableInsertButtons",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.A}});Object.defineProperty(exports,"TableMergeButton",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.z}});Object.defineProperty(exports,"TextContextMenu",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.k}});Object.defineProperty(exports,"UnsavedIndicator",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.B}});Object.defineProperty(exports,"calculateFitDimensions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ea}});Object.defineProperty(exports,"clampTableConfig",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.Y}});Object.defineProperty(exports,"createChangeTracker",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.G}});Object.defineProperty(exports,"createDefaultTableConfig",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.W}});Object.defineProperty(exports,"createErrorResponse",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.j}});Object.defineProperty(exports,"createMockResponse",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.i}});Object.defineProperty(exports,"createToolbarItem",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.R}});Object.defineProperty(exports,"createToolbarItems",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.S}});Object.defineProperty(exports,"dataUrlToBlob",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.fa}});Object.defineProperty(exports,"delay",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.N}});Object.defineProperty(exports,"formatFileSize",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ha}});Object.defineProperty(exports,"formatPrintPageRange",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.x}});Object.defineProperty(exports,"formatShortcutKeys",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.Da}});Object.defineProperty(exports,"formatTableDimensions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.Z}});Object.defineProperty(exports,"getActionShortcut",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.c}});Object.defineProperty(exports,"getAllActions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.f}});Object.defineProperty(exports,"getAllCategories",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.Ca}});Object.defineProperty(exports,"getAllIndicatorPositions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.F}});Object.defineProperty(exports,"getAllIndicatorVariants",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.E}});Object.defineProperty(exports,"getAllLoadingSizes",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.M}});Object.defineProperty(exports,"getAllLoadingVariants",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.L}});Object.defineProperty(exports,"getAllPasteOptions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ta}});Object.defineProperty(exports,"getCategoryLabel",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.Ba}});Object.defineProperty(exports,"getCommonShortcuts",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.Aa}});Object.defineProperty(exports,"getDefaultActions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.e}});Object.defineProperty(exports,"getDefaultPasteOption",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ua}});Object.defineProperty(exports,"getDefaultPrintOptions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.v}});Object.defineProperty(exports,"getDefaultShortcuts",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ya}});Object.defineProperty(exports,"getDefaultTextContextMenuItems",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.o}});Object.defineProperty(exports,"getImageAcceptString",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.da}});Object.defineProperty(exports,"getImageDimensions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ga}});Object.defineProperty(exports,"getLoadingVariantLabel",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.K}});Object.defineProperty(exports,"getPasteOption",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.sa}});Object.defineProperty(exports,"getRecommendedPriority",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.T}});Object.defineProperty(exports,"getShortcutsByCategory",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.za}});Object.defineProperty(exports,"getSupportedImageExtensions",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ca}});Object.defineProperty(exports,"getSymbolCategories",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.la}});Object.defineProperty(exports,"getSymbolUnicodeInfo",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.na}});Object.defineProperty(exports,"getSymbolsByCategory",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ma}});Object.defineProperty(exports,"getTablePresets",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs._}});Object.defineProperty(exports,"getTextActionLabel",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.m}});Object.defineProperty(exports,"getTextActionShortcut",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.n}});Object.defineProperty(exports,"getVariantLabel",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.D}});Object.defineProperty(exports,"isActionAvailable",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.d}});Object.defineProperty(exports,"isPasteSpecialShortcut",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.va}});Object.defineProperty(exports,"isPrintSupported",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.y}});Object.defineProperty(exports,"isTextActionAvailable",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.p}});Object.defineProperty(exports,"isValidImageFile",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ba}});Object.defineProperty(exports,"isValidTableConfig",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.X}});Object.defineProperty(exports,"openPrintWindow",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.u}});Object.defineProperty(exports,"parsePageRange",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.w}});Object.defineProperty(exports,"searchSymbols",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.oa}});Object.defineProperty(exports,"symbolFromCodePoint",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.pa}});Object.defineProperty(exports,"triggerPrint",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.t}});Object.defineProperty(exports,"useContextMenu",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.b}});Object.defineProperty(exports,"useInsertImageDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.aa}});Object.defineProperty(exports,"useInsertSymbolDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ka}});Object.defineProperty(exports,"useInsertTableDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.V}});Object.defineProperty(exports,"useKeyboardShortcutsDialog",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.xa}});Object.defineProperty(exports,"useLoading",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.I}});Object.defineProperty(exports,"useLoadingOperations",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.J}});Object.defineProperty(exports,"usePasteSpecial",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.ra}});Object.defineProperty(exports,"useResponsePreview",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.h}});Object.defineProperty(exports,"useResponsiveToolbar",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.O}});Object.defineProperty(exports,"useTextContextMenu",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.l}});Object.defineProperty(exports,"useUnsavedChanges",{enumerable:true,get:function(){return chunkHT2Z33YM_cjs.C}});Object.defineProperty(exports,"AdvancedColorPicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.h}});Object.defineProperty(exports,"AlignmentButtons",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.j}});Object.defineProperty(exports,"CLIPBOARD_TYPES",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ca}});Object.defineProperty(exports,"FontPicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.b}});Object.defineProperty(exports,"FontSizePicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.g}});Object.defineProperty(exports,"HorizontalRuler",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.O}});Object.defineProperty(exports,"INTERNAL_CLIPBOARD_TYPE",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ba}});Object.defineProperty(exports,"LineSpacingPicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.m}});Object.defineProperty(exports,"ListButtons",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.k}});Object.defineProperty(exports,"PageNavigator",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.H}});Object.defineProperty(exports,"PageNumberIndicator",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.z}});Object.defineProperty(exports,"StylePicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.n}});Object.defineProperty(exports,"TableBorderColorPicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.q}});Object.defineProperty(exports,"TableBorderPicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.p}});Object.defineProperty(exports,"TableBorderWidthPicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.r}});Object.defineProperty(exports,"TableCellFillPicker",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.s}});Object.defineProperty(exports,"TableMoreDropdown",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.t}});Object.defineProperty(exports,"TableToolbar",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.T}});Object.defineProperty(exports,"Toolbar",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.y}});Object.defineProperty(exports,"ToolbarButton",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.v}});Object.defineProperty(exports,"ToolbarGroup",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.w}});Object.defineProperty(exports,"ToolbarSeparator",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.x}});Object.defineProperty(exports,"ZoomControl",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.o}});Object.defineProperty(exports,"addColumn",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.Z}});Object.defineProperty(exports,"addRow",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.X}});Object.defineProperty(exports,"calculateProgress",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.N}});Object.defineProperty(exports,"calculateScrollToPage",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.G}});Object.defineProperty(exports,"calculateVisiblePage",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.F}});Object.defineProperty(exports,"clampPageNumber",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.K}});Object.defineProperty(exports,"cleanWordHtml",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.na}});Object.defineProperty(exports,"copyParagraphs",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ea}});Object.defineProperty(exports,"copyRuns",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.da}});Object.defineProperty(exports,"createClipboardHandlers",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.pa}});Object.defineProperty(exports,"createDefaultListState",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.l}});Object.defineProperty(exports,"createPageFormat",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.B}});Object.defineProperty(exports,"createTableContext",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.U}});Object.defineProperty(exports,"deleteColumn",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs._}});Object.defineProperty(exports,"deleteRow",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.Y}});Object.defineProperty(exports,"formatPageOrdinal",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.A}});Object.defineProperty(exports,"formatPageRange",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.M}});Object.defineProperty(exports,"getCellAt",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.W}});Object.defineProperty(exports,"getColumnCount",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.V}});Object.defineProperty(exports,"getMarginInUnits",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.R}});Object.defineProperty(exports,"getNavigationShortcuts",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.L}});Object.defineProperty(exports,"getPageProgress",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.C}});Object.defineProperty(exports,"getRulerDimensions",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.Q}});Object.defineProperty(exports,"handlePasteEvent",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ja}});Object.defineProperty(exports,"htmlToRuns",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.oa}});Object.defineProperty(exports,"isEditorHtml",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ma}});Object.defineProperty(exports,"isFirstPage",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.D}});Object.defineProperty(exports,"isLastPage",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.E}});Object.defineProperty(exports,"isValidPageNumber",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.J}});Object.defineProperty(exports,"isWordHtml",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.la}});Object.defineProperty(exports,"mergeCells",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.$}});Object.defineProperty(exports,"paragraphsToClipboardContent",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ga}});Object.defineProperty(exports,"parseClipboardHtml",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ka}});Object.defineProperty(exports,"parseMarginFromUnits",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.S}});Object.defineProperty(exports,"parsePageInput",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.I}});Object.defineProperty(exports,"positionToMargin",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.P}});Object.defineProperty(exports,"readFromClipboard",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ia}});Object.defineProperty(exports,"runsToClipboardContent",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.fa}});Object.defineProperty(exports,"splitCell",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.aa}});Object.defineProperty(exports,"writeToClipboard",{enumerable:true,get:function(){return chunkP3AEZKQO_cjs.ha}});Object.defineProperty(exports,"FindReplaceDialog",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.n}});Object.defineProperty(exports,"createDefaultFindOptions",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.a}});Object.defineProperty(exports,"createSearchPattern",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.c}});Object.defineProperty(exports,"escapeRegexString",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.b}});Object.defineProperty(exports,"findAllMatches",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.d}});Object.defineProperty(exports,"findInDocument",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.j}});Object.defineProperty(exports,"findInParagraph",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.k}});Object.defineProperty(exports,"getDefaultHighlightOptions",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.i}});Object.defineProperty(exports,"getMatchCountText",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.g}});Object.defineProperty(exports,"isEmptySearch",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.h}});Object.defineProperty(exports,"replaceAllInContent",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.e}});Object.defineProperty(exports,"replaceFirstInContent",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.f}});Object.defineProperty(exports,"scrollToMatch",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.l}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.m}});Object.defineProperty(exports,"HyperlinkDialog",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.d}});Object.defineProperty(exports,"useHyperlinkDialog",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.m}});Object.defineProperty(exports,"TABLE_DATA_ATTRIBUTES",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.x}});Object.defineProperty(exports,"countPageBreaks",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.n}});Object.defineProperty(exports,"createColumnBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.b}});Object.defineProperty(exports,"createHorizontalRule",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.g}});Object.defineProperty(exports,"createLineBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.c}});Object.defineProperty(exports,"createPageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.a}});Object.defineProperty(exports,"createPageBreakParagraph",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.e}});Object.defineProperty(exports,"createPageBreakRun",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.d}});Object.defineProperty(exports,"createSelectionFromDOM",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.F}});Object.defineProperty(exports,"findPageBreaks",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.o}});Object.defineProperty(exports,"formatLastSaveTime",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.s}});Object.defineProperty(exports,"formatStorageSize",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.v}});Object.defineProperty(exports,"getAutoSaveStatusLabel",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.t}});Object.defineProperty(exports,"getAutoSaveStorageSize",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.u}});Object.defineProperty(exports,"getSelectionRuns",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.E}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.m}});Object.defineProperty(exports,"insertHorizontalRule",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.h}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.f}});Object.defineProperty(exports,"isAutoSaveSupported",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.w}});Object.defineProperty(exports,"isBreakContent",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.l}});Object.defineProperty(exports,"isColumnBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.j}});Object.defineProperty(exports,"isLineBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.k}});Object.defineProperty(exports,"isPageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.i}});Object.defineProperty(exports,"removePageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.p}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkGICVJSFJ_cjs.f}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkGICVJSFJ_cjs.m}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkGICVJSFJ_cjs.l}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkGICVJSFJ_cjs.e}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkGICVJSFJ_cjs.d}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkGICVJSFJ_cjs.i}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkGICVJSFJ_cjs.k}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.l}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.q}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.i}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.h}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.j}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.t}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.v}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.B}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.f}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.y}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.d}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.e}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.k}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.g}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.u}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.s}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.x}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.b}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.c}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.w}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkJRRTZZ72_cjs.r}});Object.defineProperty(exports,"docxtemplaterPlugin",{enumerable:true,get:function(){return chunkTAF6KYDM_cjs.o}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.e}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.a}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.f}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkY6QBJGMO_cjs.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkY6QBJGMO_cjs.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkY6QBJGMO_cjs.a}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkP7ZF45KZ_cjs.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkP7ZF45KZ_cjs.b}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.k}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.i}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.g}});Object.defineProperty(exports,"isFontsLoading",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.h}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.e}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.l}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.f}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.j}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.p}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.m}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkEH3NY2DQ_cjs.o}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkYS7FDEZ4_cjs.a}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkYS7FDEZ4_cjs.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkYS7FDEZ4_cjs.c}});exports.ANNOTATION_PANEL_STYLES=z;exports.AnnotationPanel=U;exports.NAVIGATION_SHORTCUTS=T;exports.TEMPLATE_DECORATION_STYLES=W;exports.VERSION=Gi;exports.createDoubleClickWordSelector=Ya;exports.createTemplatePlugin=Te;exports.createTemplateProseMirrorPlugin=B;exports.createTripleClickParagraphSelector=Za;exports.describeShortcut=S;exports.expandSelectionToWord=ti;exports.expandSelectionToWordBoundaries=Va;exports.extendSelectionTo=_;exports.findNextWordStart=ee;exports.findPreviousWordStart=te;exports.findVisualLineEnd=ne;exports.findVisualLineStart=oe;exports.findWordAt=Ua;exports.findWordBoundaries=R;exports.findWordEnd=ja;exports.findWordStart=qa;exports.getNavigationShortcutDescriptions=ri;exports.getSelectionInfo=Ja;exports.getTemplatePluginTags=pe;exports.getWordAt=Fa;exports.getWordAtCursor=oi;exports.handleClickForMultiClick=Q;exports.handleNavigationKey=Qa;exports.isNavigationKey=ei;exports.isPunctuation=Xa;exports.isWhitespace=K;exports.isWhitespaceChar=Y;exports.isWordChar=P;exports.isWordCharacter=M;exports.matchesShortcut=ni;exports.moveByWord=re;exports.moveToLineEdge=ae;exports.parseNavigationAction=ie;exports.selectParagraphAtCursor=J;exports.selectWordAtCursor=$;exports.selectWordInTextNode=za;exports.setHoveredElement=D;exports.setSelectedElement=L;exports.setSelectionPosition=H;exports.templatePlugin=Ci;exports.templatePluginKey=m;
|
|
155
|
+
`}}var Ci=Te();var Gi="0.0.2";Object.defineProperty(exports,"DEFAULT_SELECTION_STYLE",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.v}});Object.defineProperty(exports,"DocxEditor",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.i}});Object.defineProperty(exports,"ErrorBoundary",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.c}});Object.defineProperty(exports,"ErrorProvider",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.b}});Object.defineProperty(exports,"HIGH_CONTRAST_SELECTION_STYLE",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.w}});Object.defineProperty(exports,"PLUGIN_HOST_STYLES",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.T}});Object.defineProperty(exports,"ParseErrorDisplay",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.d}});Object.defineProperty(exports,"PluginHost",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.U}});Object.defineProperty(exports,"SELECTION_CSS_VARS",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.x}});Object.defineProperty(exports,"UnsupportedFeatureWarning",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.e}});Object.defineProperty(exports,"ZOOM_PRESETS",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.l}});Object.defineProperty(exports,"areSelectionStylesInjected",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.O}});Object.defineProperty(exports,"clampZoom",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.u}});Object.defineProperty(exports,"clearSelection",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.J}});Object.defineProperty(exports,"createSelectionChangeHandler",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.P}});Object.defineProperty(exports,"findNearestZoomPreset",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.o}});Object.defineProperty(exports,"formatZoom",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.r}});Object.defineProperty(exports,"generateOverlayElements",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.R}});Object.defineProperty(exports,"generateSelectionCSS",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.C}});Object.defineProperty(exports,"getHighlightRectStyle",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.B}});Object.defineProperty(exports,"getMergedSelectionRects",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.A}});Object.defineProperty(exports,"getNextZoomPreset",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.p}});Object.defineProperty(exports,"getPreviousZoomPreset",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.q}});Object.defineProperty(exports,"getSelectedText",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.E}});Object.defineProperty(exports,"getSelectionBoundingRect",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.G}});Object.defineProperty(exports,"getSelectionRects",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.y}});Object.defineProperty(exports,"getUserFriendlyMessage",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.g}});Object.defineProperty(exports,"getZoomPresets",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.n}});Object.defineProperty(exports,"hasActiveSelection",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.D}});Object.defineProperty(exports,"highlightTextRange",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.H}});Object.defineProperty(exports,"injectSelectionStyles",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.M}});Object.defineProperty(exports,"isParseError",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.f}});Object.defineProperty(exports,"isSelectionBackwards",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.K}});Object.defineProperty(exports,"isSelectionWithin",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.F}});Object.defineProperty(exports,"isZoomPreset",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.t}});Object.defineProperty(exports,"mergeAdjacentRects",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.z}});Object.defineProperty(exports,"normalizeSelectionDirection",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.L}});Object.defineProperty(exports,"parseZoom",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.s}});Object.defineProperty(exports,"removeSelectionStyles",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.N}});Object.defineProperty(exports,"renderAsync",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.j}});Object.defineProperty(exports,"selectRange",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.I}});Object.defineProperty(exports,"useAutoSave",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.k}});Object.defineProperty(exports,"useClipboard",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.S}});Object.defineProperty(exports,"useErrorNotifications",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.a}});Object.defineProperty(exports,"useSelectionHighlight",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.Q}});Object.defineProperty(exports,"useTableSelection",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.h}});Object.defineProperty(exports,"useWheelZoom",{enumerable:true,get:function(){return chunkRHLMVYVZ_cjs.m}});Object.defineProperty(exports,"ColorPicker",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.q}});Object.defineProperty(exports,"ContextMenu",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.a}});Object.defineProperty(exports,"InsertImageDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.$}});Object.defineProperty(exports,"InsertSymbolDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ja}});Object.defineProperty(exports,"InsertTableDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.U}});Object.defineProperty(exports,"KeyboardShortcutsDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.wa}});Object.defineProperty(exports,"LoadingIndicator",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.H}});Object.defineProperty(exports,"PasteSpecialDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.qa}});Object.defineProperty(exports,"PrintButton",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.r}});Object.defineProperty(exports,"PrintStyles",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.s}});Object.defineProperty(exports,"ResponsePreview",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.g}});Object.defineProperty(exports,"ResponsiveToolbar",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.P}});Object.defineProperty(exports,"ResponsiveToolbarGroup",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.Q}});Object.defineProperty(exports,"SYMBOL_CATEGORIES",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ia}});Object.defineProperty(exports,"TableInsertButtons",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.A}});Object.defineProperty(exports,"TableMergeButton",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.z}});Object.defineProperty(exports,"TextContextMenu",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.k}});Object.defineProperty(exports,"UnsavedIndicator",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.B}});Object.defineProperty(exports,"calculateFitDimensions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ea}});Object.defineProperty(exports,"clampTableConfig",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.Y}});Object.defineProperty(exports,"createChangeTracker",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.G}});Object.defineProperty(exports,"createDefaultTableConfig",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.W}});Object.defineProperty(exports,"createErrorResponse",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.j}});Object.defineProperty(exports,"createMockResponse",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.i}});Object.defineProperty(exports,"createToolbarItem",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.R}});Object.defineProperty(exports,"createToolbarItems",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.S}});Object.defineProperty(exports,"dataUrlToBlob",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.fa}});Object.defineProperty(exports,"delay",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.N}});Object.defineProperty(exports,"formatFileSize",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ha}});Object.defineProperty(exports,"formatPrintPageRange",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.x}});Object.defineProperty(exports,"formatShortcutKeys",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.Da}});Object.defineProperty(exports,"formatTableDimensions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.Z}});Object.defineProperty(exports,"getActionShortcut",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.c}});Object.defineProperty(exports,"getAllActions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.f}});Object.defineProperty(exports,"getAllCategories",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.Ca}});Object.defineProperty(exports,"getAllIndicatorPositions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.F}});Object.defineProperty(exports,"getAllIndicatorVariants",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.E}});Object.defineProperty(exports,"getAllLoadingSizes",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.M}});Object.defineProperty(exports,"getAllLoadingVariants",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.L}});Object.defineProperty(exports,"getAllPasteOptions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ta}});Object.defineProperty(exports,"getCategoryLabel",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.Ba}});Object.defineProperty(exports,"getCommonShortcuts",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.Aa}});Object.defineProperty(exports,"getDefaultActions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.e}});Object.defineProperty(exports,"getDefaultPasteOption",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ua}});Object.defineProperty(exports,"getDefaultPrintOptions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.v}});Object.defineProperty(exports,"getDefaultShortcuts",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ya}});Object.defineProperty(exports,"getDefaultTextContextMenuItems",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.o}});Object.defineProperty(exports,"getImageAcceptString",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.da}});Object.defineProperty(exports,"getImageDimensions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ga}});Object.defineProperty(exports,"getLoadingVariantLabel",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.K}});Object.defineProperty(exports,"getPasteOption",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.sa}});Object.defineProperty(exports,"getRecommendedPriority",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.T}});Object.defineProperty(exports,"getShortcutsByCategory",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.za}});Object.defineProperty(exports,"getSupportedImageExtensions",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ca}});Object.defineProperty(exports,"getSymbolCategories",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.la}});Object.defineProperty(exports,"getSymbolUnicodeInfo",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.na}});Object.defineProperty(exports,"getSymbolsByCategory",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ma}});Object.defineProperty(exports,"getTablePresets",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs._}});Object.defineProperty(exports,"getTextActionLabel",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.m}});Object.defineProperty(exports,"getTextActionShortcut",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.n}});Object.defineProperty(exports,"getVariantLabel",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.D}});Object.defineProperty(exports,"isActionAvailable",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.d}});Object.defineProperty(exports,"isPasteSpecialShortcut",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.va}});Object.defineProperty(exports,"isPrintSupported",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.y}});Object.defineProperty(exports,"isTextActionAvailable",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.p}});Object.defineProperty(exports,"isValidImageFile",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ba}});Object.defineProperty(exports,"isValidTableConfig",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.X}});Object.defineProperty(exports,"openPrintWindow",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.u}});Object.defineProperty(exports,"parsePageRange",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.w}});Object.defineProperty(exports,"searchSymbols",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.oa}});Object.defineProperty(exports,"symbolFromCodePoint",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.pa}});Object.defineProperty(exports,"triggerPrint",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.t}});Object.defineProperty(exports,"useContextMenu",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.b}});Object.defineProperty(exports,"useInsertImageDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.aa}});Object.defineProperty(exports,"useInsertSymbolDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ka}});Object.defineProperty(exports,"useInsertTableDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.V}});Object.defineProperty(exports,"useKeyboardShortcutsDialog",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.xa}});Object.defineProperty(exports,"useLoading",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.I}});Object.defineProperty(exports,"useLoadingOperations",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.J}});Object.defineProperty(exports,"usePasteSpecial",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.ra}});Object.defineProperty(exports,"useResponsePreview",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.h}});Object.defineProperty(exports,"useResponsiveToolbar",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.O}});Object.defineProperty(exports,"useTextContextMenu",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.l}});Object.defineProperty(exports,"useUnsavedChanges",{enumerable:true,get:function(){return chunk3C2VHZX6_cjs.C}});Object.defineProperty(exports,"AdvancedColorPicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.h}});Object.defineProperty(exports,"AlignmentButtons",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.j}});Object.defineProperty(exports,"CLIPBOARD_TYPES",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ca}});Object.defineProperty(exports,"FontPicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.b}});Object.defineProperty(exports,"FontSizePicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.g}});Object.defineProperty(exports,"HorizontalRuler",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.O}});Object.defineProperty(exports,"INTERNAL_CLIPBOARD_TYPE",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ba}});Object.defineProperty(exports,"LineSpacingPicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.m}});Object.defineProperty(exports,"ListButtons",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.k}});Object.defineProperty(exports,"PageNavigator",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.H}});Object.defineProperty(exports,"PageNumberIndicator",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.z}});Object.defineProperty(exports,"StylePicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.n}});Object.defineProperty(exports,"TableBorderColorPicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.q}});Object.defineProperty(exports,"TableBorderPicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.p}});Object.defineProperty(exports,"TableBorderWidthPicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.r}});Object.defineProperty(exports,"TableCellFillPicker",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.s}});Object.defineProperty(exports,"TableMoreDropdown",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.t}});Object.defineProperty(exports,"TableToolbar",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.T}});Object.defineProperty(exports,"Toolbar",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.y}});Object.defineProperty(exports,"ToolbarButton",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.v}});Object.defineProperty(exports,"ToolbarGroup",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.w}});Object.defineProperty(exports,"ToolbarSeparator",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.x}});Object.defineProperty(exports,"ZoomControl",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.o}});Object.defineProperty(exports,"addColumn",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.Z}});Object.defineProperty(exports,"addRow",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.X}});Object.defineProperty(exports,"calculateProgress",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.N}});Object.defineProperty(exports,"calculateScrollToPage",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.G}});Object.defineProperty(exports,"calculateVisiblePage",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.F}});Object.defineProperty(exports,"clampPageNumber",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.K}});Object.defineProperty(exports,"cleanWordHtml",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.na}});Object.defineProperty(exports,"copyParagraphs",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ea}});Object.defineProperty(exports,"copyRuns",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.da}});Object.defineProperty(exports,"createClipboardHandlers",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.pa}});Object.defineProperty(exports,"createDefaultListState",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.l}});Object.defineProperty(exports,"createPageFormat",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.B}});Object.defineProperty(exports,"createTableContext",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.U}});Object.defineProperty(exports,"deleteColumn",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs._}});Object.defineProperty(exports,"deleteRow",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.Y}});Object.defineProperty(exports,"formatPageOrdinal",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.A}});Object.defineProperty(exports,"formatPageRange",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.M}});Object.defineProperty(exports,"getCellAt",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.W}});Object.defineProperty(exports,"getColumnCount",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.V}});Object.defineProperty(exports,"getMarginInUnits",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.R}});Object.defineProperty(exports,"getNavigationShortcuts",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.L}});Object.defineProperty(exports,"getPageProgress",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.C}});Object.defineProperty(exports,"getRulerDimensions",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.Q}});Object.defineProperty(exports,"handlePasteEvent",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ja}});Object.defineProperty(exports,"htmlToRuns",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.oa}});Object.defineProperty(exports,"isEditorHtml",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ma}});Object.defineProperty(exports,"isFirstPage",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.D}});Object.defineProperty(exports,"isLastPage",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.E}});Object.defineProperty(exports,"isValidPageNumber",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.J}});Object.defineProperty(exports,"isWordHtml",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.la}});Object.defineProperty(exports,"mergeCells",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.$}});Object.defineProperty(exports,"paragraphsToClipboardContent",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ga}});Object.defineProperty(exports,"parseClipboardHtml",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ka}});Object.defineProperty(exports,"parseMarginFromUnits",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.S}});Object.defineProperty(exports,"parsePageInput",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.I}});Object.defineProperty(exports,"positionToMargin",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.P}});Object.defineProperty(exports,"readFromClipboard",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ia}});Object.defineProperty(exports,"runsToClipboardContent",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.fa}});Object.defineProperty(exports,"splitCell",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.aa}});Object.defineProperty(exports,"writeToClipboard",{enumerable:true,get:function(){return chunkI5YZ4MRV_cjs.ha}});Object.defineProperty(exports,"FindReplaceDialog",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.n}});Object.defineProperty(exports,"createDefaultFindOptions",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.a}});Object.defineProperty(exports,"createSearchPattern",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.c}});Object.defineProperty(exports,"escapeRegexString",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.b}});Object.defineProperty(exports,"findAllMatches",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.d}});Object.defineProperty(exports,"findInDocument",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.j}});Object.defineProperty(exports,"findInParagraph",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.k}});Object.defineProperty(exports,"getDefaultHighlightOptions",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.i}});Object.defineProperty(exports,"getMatchCountText",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.g}});Object.defineProperty(exports,"isEmptySearch",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.h}});Object.defineProperty(exports,"replaceAllInContent",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.e}});Object.defineProperty(exports,"replaceFirstInContent",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.f}});Object.defineProperty(exports,"scrollToMatch",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.l}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkVTAS7VZ6_cjs.m}});Object.defineProperty(exports,"HyperlinkDialog",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.d}});Object.defineProperty(exports,"useHyperlinkDialog",{enumerable:true,get:function(){return chunkXS2AQFMF_cjs.m}});Object.defineProperty(exports,"TABLE_DATA_ATTRIBUTES",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.x}});Object.defineProperty(exports,"countPageBreaks",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.n}});Object.defineProperty(exports,"createColumnBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.b}});Object.defineProperty(exports,"createHorizontalRule",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.g}});Object.defineProperty(exports,"createLineBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.c}});Object.defineProperty(exports,"createPageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.a}});Object.defineProperty(exports,"createPageBreakParagraph",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.e}});Object.defineProperty(exports,"createPageBreakRun",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.d}});Object.defineProperty(exports,"createSelectionFromDOM",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.F}});Object.defineProperty(exports,"findPageBreaks",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.o}});Object.defineProperty(exports,"formatLastSaveTime",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.s}});Object.defineProperty(exports,"formatStorageSize",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.v}});Object.defineProperty(exports,"getAutoSaveStatusLabel",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.t}});Object.defineProperty(exports,"getAutoSaveStorageSize",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.u}});Object.defineProperty(exports,"getSelectionRuns",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.E}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.m}});Object.defineProperty(exports,"insertHorizontalRule",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.h}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.f}});Object.defineProperty(exports,"isAutoSaveSupported",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.w}});Object.defineProperty(exports,"isBreakContent",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.l}});Object.defineProperty(exports,"isColumnBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.j}});Object.defineProperty(exports,"isLineBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.k}});Object.defineProperty(exports,"isPageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.i}});Object.defineProperty(exports,"removePageBreak",{enumerable:true,get:function(){return chunk2VHQ7YOQ_cjs.p}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkKL2RYY6G_cjs.f}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkKL2RYY6G_cjs.m}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkKL2RYY6G_cjs.l}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkKL2RYY6G_cjs.e}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkKL2RYY6G_cjs.d}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkKL2RYY6G_cjs.i}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkKL2RYY6G_cjs.k}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.l}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.q}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.i}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.h}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.j}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.f}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.d}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.e}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.k}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.g}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.b}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkIA4LPH2A_cjs.c}});Object.defineProperty(exports,"docxtemplaterPlugin",{enumerable:true,get:function(){return chunk5ILXHRJS_cjs.o}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.e}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.a}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkB7TICMXD_cjs.f}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkPUVSVHHB_cjs.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkPUVSVHHB_cjs.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkPUVSVHHB_cjs.a}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkP7ZF45KZ_cjs.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkP7ZF45KZ_cjs.b}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.i}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.g}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.e}});Object.defineProperty(exports,"isFontsLoading",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.f}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.c}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.j}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.d}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.h}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.n}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.k}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkPIVLDW7B_cjs.m}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkYS7FDEZ4_cjs.a}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkYS7FDEZ4_cjs.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkYS7FDEZ4_cjs.c}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.c}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.e}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.k}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.h}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.d}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.b}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.g}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.f}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkKR32M3S4_cjs.a}});exports.ANNOTATION_PANEL_STYLES=z;exports.AnnotationPanel=U;exports.NAVIGATION_SHORTCUTS=T;exports.TEMPLATE_DECORATION_STYLES=W;exports.VERSION=Gi;exports.createDoubleClickWordSelector=Ya;exports.createTemplatePlugin=Te;exports.createTemplateProseMirrorPlugin=B;exports.createTripleClickParagraphSelector=Za;exports.describeShortcut=S;exports.expandSelectionToWord=ti;exports.expandSelectionToWordBoundaries=Va;exports.extendSelectionTo=_;exports.findNextWordStart=ee;exports.findPreviousWordStart=te;exports.findVisualLineEnd=ne;exports.findVisualLineStart=oe;exports.findWordAt=Ua;exports.findWordBoundaries=R;exports.findWordEnd=ja;exports.findWordStart=qa;exports.getNavigationShortcutDescriptions=ri;exports.getSelectionInfo=Ja;exports.getTemplatePluginTags=pe;exports.getWordAt=Fa;exports.getWordAtCursor=oi;exports.handleClickForMultiClick=Q;exports.handleNavigationKey=Qa;exports.isNavigationKey=ei;exports.isPunctuation=Xa;exports.isWhitespace=K;exports.isWhitespaceChar=Y;exports.isWordChar=P;exports.isWordCharacter=M;exports.matchesShortcut=ni;exports.moveByWord=re;exports.moveToLineEdge=ae;exports.parseNavigationAction=ie;exports.selectParagraphAtCursor=J;exports.selectWordAtCursor=$;exports.selectWordInTextNode=za;exports.setHoveredElement=D;exports.setSelectedElement=L;exports.setSelectionPosition=H;exports.templatePlugin=Ci;exports.templatePluginKey=m;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { R as ReactEditorPlugin } from './react-
|
|
2
|
-
export { D as DEFAULT_SELECTION_STYLE, a as DocxEditor, b as DocxEditorHandle, c as DocxEditorProps, d as DocxEditorRef, E as
|
|
3
|
-
export { D as DocumentAgent, g as DocxInput, t as toArrayBuffer } from './DocumentAgent-
|
|
4
|
-
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, a as ProcessTemplateResult, b as SelectionContextOptions, c as blendColors, d as buildExtendedSelectionContext, e as buildSelectionContext, g as colorsEqual, h as createDocumentWithText, i as createEmptyDocument, j as createRgbColor, l as createThemeColor, m as darkenColor, n as emuToPixels, o as emuToTwips, p as executeCommand, q as executeCommands, r as formatPx, s as getAgentContext, t as getContrastingColor, u as getDocumentSummary, x as getTemplateTags, y as halfPointsToPixels, z as isBlack, B as isWhite, D as lightenColor, G as parseColorString, H as parseDocx, I as pixelsToEmu, J as pixelsToTwips, K as pointsToPixels, M as processTemplate, O as processTemplateAsBlob, Q as processTemplateDetailed, R as resolveColor, U as resolveHighlightColor, V as resolveShadingColor, W as serializeDocumentBody, X as serializeDocx, Y as serializeSectionProperties, Z as twipsToEmu, _ as twipsToPixels, $ as validateTemplate } from './colorResolver-
|
|
5
|
-
export { I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, i as findPageBreaks, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, q as isFontsLoading, r as isLineBreak, s as isPageBreak, t as loadFont, u as loadFontFromBuffer, v as loadFonts, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from './fontLoader-
|
|
1
|
+
import { R as ReactEditorPlugin } from './react-BYRZYSPG.cjs';
|
|
2
|
+
export { D as DEFAULT_SELECTION_STYLE, a as DocxEditor, b as DocxEditorHandle, c as DocxEditorProps, d as DocxEditorRef, E as EditorMode, e as EditorPlugin, f as ErrorBoundary, g as ErrorBoundaryProps, h as ErrorContextValue, i as ErrorProvider, H as HIGH_CONTRAST_SELECTION_STYLE, j as HighlightRect, P as PLUGIN_HOST_STYLES, k as ParseErrorDisplay, l as ParseErrorDisplayProps, m as PluginContext, n as PluginHost, o as PluginHostProps, p as PluginHostRef, q as RenderAsyncOptions, S as SELECTION_CSS_VARS, r as SelectionHighlightConfig, s as SelectionOverlayProps, t as SelectionRange, T as TableSelectionState, U as UnsupportedFeatureWarning, u as UnsupportedFeatureWarningProps, v as UseAutoSaveOptions, w as UseAutoSaveReturn, x as UseClipboardOptions, y as UseClipboardReturn, z as UseSelectionHighlightOptions, A as UseSelectionHighlightReturn, B as UseTableSelectionOptions, C as UseTableSelectionReturn, F as UseWheelZoomOptions, G as UseWheelZoomReturn, Z as ZOOM_PRESETS, I as areSelectionStylesInjected, J as clampZoom, K as clearSelection, L as createSelectionChangeHandler, M as findNearestZoomPreset, N as formatZoom, O as generateOverlayElements, Q as generateSelectionCSS, V as getHighlightRectStyle, W as getMergedSelectionRects, X as getNextZoomPreset, Y as getPreviousZoomPreset, _ as getSelectedText, $ as getSelectionBoundingRect, a0 as getSelectionRects, a1 as getUserFriendlyMessage, a2 as getZoomPresets, a3 as hasActiveSelection, a4 as highlightTextRange, a5 as injectSelectionStyles, a6 as isParseError, a7 as isSelectionBackwards, a8 as isSelectionWithin, a9 as isZoomPreset, aa as mergeAdjacentRects, ab as normalizeSelectionDirection, ac as parseZoom, ad as removeSelectionStyles, ae as renderAsync, af as selectRange, ag as useAutoSave, ah as useClipboard, ai as useErrorNotifications, aj as useSelectionHighlight, ak as useTableSelection, al as useWheelZoom } from './react-BYRZYSPG.cjs';
|
|
3
|
+
export { D as DocumentAgent, g as DocxInput, t as toArrayBuffer } from './DocumentAgent-cHf96hwL.cjs';
|
|
4
|
+
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, a as ProcessTemplateResult, b as SelectionContextOptions, c as blendColors, d as buildExtendedSelectionContext, e as buildSelectionContext, g as colorsEqual, h as createDocumentWithText, i as createEmptyDocument, j as createRgbColor, l as createThemeColor, m as darkenColor, n as emuToPixels, o as emuToTwips, p as executeCommand, q as executeCommands, r as formatPx, s as getAgentContext, t as getContrastingColor, u as getDocumentSummary, x as getTemplateTags, y as halfPointsToPixels, z as isBlack, B as isWhite, D as lightenColor, G as parseColorString, H as parseDocx, I as pixelsToEmu, J as pixelsToTwips, K as pointsToPixels, M as processTemplate, O as processTemplateAsBlob, Q as processTemplateDetailed, R as resolveColor, U as resolveHighlightColor, V as resolveShadingColor, W as serializeDocumentBody, X as serializeDocx, Y as serializeSectionProperties, Z as twipsToEmu, _ as twipsToPixels, $ as validateTemplate } from './colorResolver-yl7Xh_Qg.cjs';
|
|
5
|
+
export { I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, i as findPageBreaks, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, q as isFontsLoading, r as isLineBreak, s as isPageBreak, t as loadFont, u as loadFontFromBuffer, v as loadFonts, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from './fontLoader-Daq8y8C2.cjs';
|
|
6
6
|
export { AdvancedColorPicker, AlignmentButtons, AlignmentButtonsProps, ColorOption, ColorPicker, ColorPickerProps, ContextMenu, ContextMenuProps, DialogKeyboardShortcut, FindMatch, FindOptions, FindReplaceDialog, FindReplaceDialogProps, FindReplaceOptions, FindReplaceState, FindResult, FontOption, FontPicker, FontPickerProps, FontSizePicker, FontSizePickerProps, HighlightOptions, HorizontalRuler, HorizontalRulerProps, HyperlinkData, HyperlinkDialog, HyperlinkDialogProps, ImageData, IndicatorPosition, IndicatorVariant, InsertImageDialog, InsertImageDialogProps, InsertSymbolDialog, InsertSymbolDialogProps, InsertTableDialog, InsertTableDialogProps, KeyboardShortcutsDialog, KeyboardShortcutsDialogProps, LineSpacingOption, LineSpacingPicker, LineSpacingPickerProps, ListButtons, ListButtonsProps, ListState, LoadingIndicator, LoadingIndicatorProps, LoadingOperation, LoadingSize, LoadingVariant, PasteOption, PasteSpecialDialog, PasteSpecialDialogProps, ResponsePreview, ResponsePreviewProps, ResponsePreviewState, ResponsiveToolbar, ResponsiveToolbarGroup, ResponsiveToolbarGroupProps, ResponsiveToolbarProps, SYMBOL_CATEGORIES, ShortcutCategory, StyleOption, StylePicker, StylePickerProps, SymbolCategory, TableBorderColorPicker, TableBorderColorPickerProps, TableBorderPicker, TableBorderPickerProps, TableBorderWidthPicker, TableBorderWidthPickerProps, TableCellFillPicker, TableCellFillPickerProps, TableConfig, TableInsertButtons, TableInsertButtonsProps, TableMergeButton, TableMergeButtonProps, TableMoreDropdown, TableMoreDropdownProps, TextContextAction, TextContextMenu, TextContextMenuItem, TextContextMenuProps, Toolbar, ToolbarButton, ToolbarGroup, ToolbarItem, ToolbarItemPriority, ToolbarProps, ToolbarSeparator, UnsavedIndicator, UnsavedIndicatorProps, UseFindReplaceReturn, UseKeyboardShortcutsDialogOptions, UseKeyboardShortcutsDialogReturn, UseLoadingOptions, UseLoadingReturn, UsePasteSpecialOptions, UsePasteSpecialReturn, UseResponsiveToolbarOptions, UseResponsiveToolbarReturn, UseTextContextMenuOptions, UseTextContextMenuReturn, UseUnsavedChangesOptions, UseUnsavedChangesReturn, ZoomControl, ZoomControlProps, calculateFitDimensions, clampTableConfig, createChangeTracker, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createErrorResponse, createMockResponse, createSearchPattern, createToolbarItem, createToolbarItems, dataUrlToBlob, delay, escapeRegexString, findAllMatches, findInDocument, findInParagraph, formatFileSize, formatShortcutKeys, formatTableDimensions, getActionShortcut, getAllActions, getAllCategories, getAllIndicatorPositions, getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getAllPasteOptions, getCategoryLabel, getCommonShortcuts, getDefaultActions, getDefaultHighlightOptions, getDefaultPasteOption, getDefaultShortcuts, getDefaultTextContextMenuItems, getImageAcceptString, getImageDimensions, getLoadingVariantLabel, getMarginInUnits, getMatchCountText, getPasteOption, getRecommendedPriority, getRulerDimensions, getShortcutsByCategory, getSupportedImageExtensions, getSymbolCategories, getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTextActionLabel, getTextActionShortcut, getVariantLabel, isActionAvailable, isEmptySearch, isPasteSpecialShortcut, isTextActionAvailable, isValidImageFile, isValidTableConfig, parseMarginFromUnits, positionToMargin, replaceAllInContent, replaceFirstInContent, scrollToMatch, searchSymbols, symbolFromCodePoint, useContextMenu, useFindReplace, useHyperlinkDialog, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useKeyboardShortcutsDialog, useLoading, useLoadingOperations, usePasteSpecial, useResponsePreview, useResponsiveToolbar, useTextContextMenu, useUnsavedChanges } from './ui.cjs';
|
|
7
|
-
export { C as CLIPBOARD_TYPES, a as ClipboardContent, b as ClipboardOptions, I as INTERNAL_CLIPBOARD_TYPE, P as PageIndicatorPosition, c as PageIndicatorVariant, d as PageNavigator, e as PageNavigatorPosition, f as PageNavigatorProps, g as PageNavigatorVariant, h as PageNumberIndicator, i as PageNumberIndicatorProps, j as ParsedClipboardContent, k as PrintButton, l as PrintButtonProps, m as PrintOptions, n as PrintStyles, T as TableAction, o as TableContext, p as TableSelection, q as TableToolbar, r as TableToolbarProps, s as addColumn, t as addRow, u as calculateProgress, v as calculateScrollToPage, w as calculateVisiblePage, x as clampPageNumber, y as cleanWordHtml, z as copyParagraphs, A as copyRuns, B as createClipboardHandlers, D as createPageFormat, E as createTableContext, F as deleteColumn, G as deleteRow, H as formatPageOrdinal, J as formatPageRange, K as formatPrintPageRange, L as getCellAt, M as getColumnCount, N as getDefaultPrintOptions, O as getNavigationShortcuts, Q as getPageProgress, R as handlePasteEvent, S as htmlToRuns, U as isEditorHtml, V as isFirstPage, W as isLastPage, X as isPrintSupported, Y as isValidPageNumber, Z as isWordHtml, _ as mergeCells, $ as openPrintWindow, a0 as paragraphsToClipboardContent, a1 as parseClipboardHtml, a2 as parsePageInput, a3 as parsePageRange, a4 as readFromClipboard, a5 as runsToClipboardContent, a6 as splitCell, a7 as triggerPrint, a8 as writeToClipboard } from './clipboard-
|
|
8
|
-
export { f as AIAction, g as AIActionRequest, A as AgentCommand, h as AgentContext, i as AgentResponse, j as ApplyStyleCommand, l as BlockContent, a3 as BookmarkEnd, a4 as BookmarkStart, n as DeleteTextCommand, D as Document, d as DocumentBody, o as DocxPackage, E as Endnote, a5 as Field, a6 as FooterReference, F as Footnote, q as FormatTextCommand, a7 as HeaderFooter, a8 as HeaderReference, H as Hyperlink, I as Image, r as InsertHyperlinkCommand, s as InsertImageCommand, t as InsertTableCommand, u as InsertTextCommand, L as ListLevel, N as NumberingDefinitions, a as Paragraph, v as ParagraphContext, w as ParagraphFormatting, P as Position, R as Range, y as Relationship, z as ReplaceTextCommand, b as Run, c as RunContent, C as SectionProperties, G as SelectionContext, J as SetVariableCommand, a9 as Shape, K as Style, M as StyleDefinitions, Q as SuggestedAction, e as Table, U as TableCell, V as TableRow, aa as TextBox, W as TextContent, T as TextFormatting, X as Theme, ab as ThemeColorScheme, ac as ThemeFont, ad as ThemeFontScheme } from './agentApi-
|
|
7
|
+
export { C as CLIPBOARD_TYPES, a as ClipboardContent, b as ClipboardOptions, I as INTERNAL_CLIPBOARD_TYPE, P as PageIndicatorPosition, c as PageIndicatorVariant, d as PageNavigator, e as PageNavigatorPosition, f as PageNavigatorProps, g as PageNavigatorVariant, h as PageNumberIndicator, i as PageNumberIndicatorProps, j as ParsedClipboardContent, k as PrintButton, l as PrintButtonProps, m as PrintOptions, n as PrintStyles, T as TableAction, o as TableContext, p as TableSelection, q as TableToolbar, r as TableToolbarProps, s as addColumn, t as addRow, u as calculateProgress, v as calculateScrollToPage, w as calculateVisiblePage, x as clampPageNumber, y as cleanWordHtml, z as copyParagraphs, A as copyRuns, B as createClipboardHandlers, D as createPageFormat, E as createTableContext, F as deleteColumn, G as deleteRow, H as formatPageOrdinal, J as formatPageRange, K as formatPrintPageRange, L as getCellAt, M as getColumnCount, N as getDefaultPrintOptions, O as getNavigationShortcuts, Q as getPageProgress, R as handlePasteEvent, S as htmlToRuns, U as isEditorHtml, V as isFirstPage, W as isLastPage, X as isPrintSupported, Y as isValidPageNumber, Z as isWordHtml, _ as mergeCells, $ as openPrintWindow, a0 as paragraphsToClipboardContent, a1 as parseClipboardHtml, a2 as parsePageInput, a3 as parsePageRange, a4 as readFromClipboard, a5 as runsToClipboardContent, a6 as splitCell, a7 as triggerPrint, a8 as writeToClipboard } from './clipboard-Bj2X5pLO.cjs';
|
|
8
|
+
export { f as AIAction, g as AIActionRequest, A as AgentCommand, h as AgentContext, i as AgentResponse, j as ApplyStyleCommand, l as BlockContent, a3 as BookmarkEnd, a4 as BookmarkStart, n as DeleteTextCommand, D as Document, d as DocumentBody, o as DocxPackage, E as Endnote, a5 as Field, a6 as FooterReference, F as Footnote, q as FormatTextCommand, a7 as HeaderFooter, a8 as HeaderReference, H as Hyperlink, I as Image, r as InsertHyperlinkCommand, s as InsertImageCommand, t as InsertTableCommand, u as InsertTextCommand, L as ListLevel, N as NumberingDefinitions, a as Paragraph, v as ParagraphContext, w as ParagraphFormatting, P as Position, R as Range, y as Relationship, z as ReplaceTextCommand, b as Run, c as RunContent, C as SectionProperties, G as SelectionContext, J as SetVariableCommand, a9 as Shape, K as Style, M as StyleDefinitions, Q as SuggestedAction, e as Table, U as TableCell, V as TableRow, aa as TextBox, W as TextContent, T as TextFormatting, X as Theme, ab as ThemeColorScheme, ac as ThemeFont, ad as ThemeFontScheme } from './agentApi-DmDuQm0e.cjs';
|
|
9
9
|
import * as prosemirror_state from 'prosemirror-state';
|
|
10
10
|
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
11
11
|
import { DecorationSet, EditorView } from 'prosemirror-view';
|
|
12
|
-
export { C as CorePlugin, e as McpSession, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult } from './types-
|
|
13
|
-
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-
|
|
12
|
+
export { C as CorePlugin, e as McpSession, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult } from './types-COQvtZji.cjs';
|
|
13
|
+
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-CXGC344v.cjs';
|
|
14
14
|
export { docxtemplaterPlugin } from './core-plugins-reexport.cjs';
|
|
15
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
|
-
import { k as PluginPanelProps } from './ClipboardManager-
|
|
17
|
-
export { d as AutoSaveStatus, e as ClipboardSelection, h as ErrorNotification, i as ErrorSeverity, j as PanelConfig, l as PositionCoordinates, R as RenderedDomContext, m as SavedDocumentData, T as TABLE_DATA_ATTRIBUTES, p as createSelectionFromDOM, t as formatLastSaveTime, u as formatStorageSize, v as getAutoSaveStatusLabel, w as getAutoSaveStorageSize, x as getSelectionRuns, z as isAutoSaveSupported } from './ClipboardManager-
|
|
16
|
+
import { k as PluginPanelProps } from './ClipboardManager-Bbo5MM_U.cjs';
|
|
17
|
+
export { d as AutoSaveStatus, e as ClipboardSelection, h as ErrorNotification, i as ErrorSeverity, j as PanelConfig, l as PositionCoordinates, R as RenderedDomContext, m as SavedDocumentData, T as TABLE_DATA_ATTRIBUTES, p as createSelectionFromDOM, t as formatLastSaveTime, u as formatStorageSize, v as getAutoSaveStatusLabel, w as getAutoSaveStorageSize, x as getSelectionRuns, z as isAutoSaveSupported } from './ClipboardManager-Bbo5MM_U.cjs';
|
|
18
18
|
import 'react';
|
|
19
19
|
import 'prosemirror-model';
|
|
20
20
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { R as ReactEditorPlugin } from './react-
|
|
2
|
-
export { D as DEFAULT_SELECTION_STYLE, a as DocxEditor, b as DocxEditorHandle, c as DocxEditorProps, d as DocxEditorRef, E as
|
|
3
|
-
export { D as DocumentAgent, g as DocxInput, t as toArrayBuffer } from './DocumentAgent-
|
|
4
|
-
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, a as ProcessTemplateResult, b as SelectionContextOptions, c as blendColors, d as buildExtendedSelectionContext, e as buildSelectionContext, g as colorsEqual, h as createDocumentWithText, i as createEmptyDocument, j as createRgbColor, l as createThemeColor, m as darkenColor, n as emuToPixels, o as emuToTwips, p as executeCommand, q as executeCommands, r as formatPx, s as getAgentContext, t as getContrastingColor, u as getDocumentSummary, x as getTemplateTags, y as halfPointsToPixels, z as isBlack, B as isWhite, D as lightenColor, G as parseColorString, H as parseDocx, I as pixelsToEmu, J as pixelsToTwips, K as pointsToPixels, M as processTemplate, O as processTemplateAsBlob, Q as processTemplateDetailed, R as resolveColor, U as resolveHighlightColor, V as resolveShadingColor, W as serializeDocumentBody, X as serializeDocx, Y as serializeSectionProperties, Z as twipsToEmu, _ as twipsToPixels, $ as validateTemplate } from './colorResolver-
|
|
5
|
-
export { I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, i as findPageBreaks, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, q as isFontsLoading, r as isLineBreak, s as isPageBreak, t as loadFont, u as loadFontFromBuffer, v as loadFonts, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from './fontLoader-
|
|
1
|
+
import { R as ReactEditorPlugin } from './react-Bj9uDtjg.js';
|
|
2
|
+
export { D as DEFAULT_SELECTION_STYLE, a as DocxEditor, b as DocxEditorHandle, c as DocxEditorProps, d as DocxEditorRef, E as EditorMode, e as EditorPlugin, f as ErrorBoundary, g as ErrorBoundaryProps, h as ErrorContextValue, i as ErrorProvider, H as HIGH_CONTRAST_SELECTION_STYLE, j as HighlightRect, P as PLUGIN_HOST_STYLES, k as ParseErrorDisplay, l as ParseErrorDisplayProps, m as PluginContext, n as PluginHost, o as PluginHostProps, p as PluginHostRef, q as RenderAsyncOptions, S as SELECTION_CSS_VARS, r as SelectionHighlightConfig, s as SelectionOverlayProps, t as SelectionRange, T as TableSelectionState, U as UnsupportedFeatureWarning, u as UnsupportedFeatureWarningProps, v as UseAutoSaveOptions, w as UseAutoSaveReturn, x as UseClipboardOptions, y as UseClipboardReturn, z as UseSelectionHighlightOptions, A as UseSelectionHighlightReturn, B as UseTableSelectionOptions, C as UseTableSelectionReturn, F as UseWheelZoomOptions, G as UseWheelZoomReturn, Z as ZOOM_PRESETS, I as areSelectionStylesInjected, J as clampZoom, K as clearSelection, L as createSelectionChangeHandler, M as findNearestZoomPreset, N as formatZoom, O as generateOverlayElements, Q as generateSelectionCSS, V as getHighlightRectStyle, W as getMergedSelectionRects, X as getNextZoomPreset, Y as getPreviousZoomPreset, _ as getSelectedText, $ as getSelectionBoundingRect, a0 as getSelectionRects, a1 as getUserFriendlyMessage, a2 as getZoomPresets, a3 as hasActiveSelection, a4 as highlightTextRange, a5 as injectSelectionStyles, a6 as isParseError, a7 as isSelectionBackwards, a8 as isSelectionWithin, a9 as isZoomPreset, aa as mergeAdjacentRects, ab as normalizeSelectionDirection, ac as parseZoom, ad as removeSelectionStyles, ae as renderAsync, af as selectRange, ag as useAutoSave, ah as useClipboard, ai as useErrorNotifications, aj as useSelectionHighlight, ak as useTableSelection, al as useWheelZoom } from './react-Bj9uDtjg.js';
|
|
3
|
+
export { D as DocumentAgent, g as DocxInput, t as toArrayBuffer } from './DocumentAgent-lHtXgMFN.js';
|
|
4
|
+
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, a as ProcessTemplateResult, b as SelectionContextOptions, c as blendColors, d as buildExtendedSelectionContext, e as buildSelectionContext, g as colorsEqual, h as createDocumentWithText, i as createEmptyDocument, j as createRgbColor, l as createThemeColor, m as darkenColor, n as emuToPixels, o as emuToTwips, p as executeCommand, q as executeCommands, r as formatPx, s as getAgentContext, t as getContrastingColor, u as getDocumentSummary, x as getTemplateTags, y as halfPointsToPixels, z as isBlack, B as isWhite, D as lightenColor, G as parseColorString, H as parseDocx, I as pixelsToEmu, J as pixelsToTwips, K as pointsToPixels, M as processTemplate, O as processTemplateAsBlob, Q as processTemplateDetailed, R as resolveColor, U as resolveHighlightColor, V as resolveShadingColor, W as serializeDocumentBody, X as serializeDocx, Y as serializeSectionProperties, Z as twipsToEmu, _ as twipsToPixels, $ as validateTemplate } from './colorResolver-BTTqW66Q.js';
|
|
5
|
+
export { I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, i as findPageBreaks, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, q as isFontsLoading, r as isLineBreak, s as isPageBreak, t as loadFont, u as loadFontFromBuffer, v as loadFonts, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from './fontLoader-DQJOS1sb.js';
|
|
6
6
|
export { AdvancedColorPicker, AlignmentButtons, AlignmentButtonsProps, ColorOption, ColorPicker, ColorPickerProps, ContextMenu, ContextMenuProps, DialogKeyboardShortcut, FindMatch, FindOptions, FindReplaceDialog, FindReplaceDialogProps, FindReplaceOptions, FindReplaceState, FindResult, FontOption, FontPicker, FontPickerProps, FontSizePicker, FontSizePickerProps, HighlightOptions, HorizontalRuler, HorizontalRulerProps, HyperlinkData, HyperlinkDialog, HyperlinkDialogProps, ImageData, IndicatorPosition, IndicatorVariant, InsertImageDialog, InsertImageDialogProps, InsertSymbolDialog, InsertSymbolDialogProps, InsertTableDialog, InsertTableDialogProps, KeyboardShortcutsDialog, KeyboardShortcutsDialogProps, LineSpacingOption, LineSpacingPicker, LineSpacingPickerProps, ListButtons, ListButtonsProps, ListState, LoadingIndicator, LoadingIndicatorProps, LoadingOperation, LoadingSize, LoadingVariant, PasteOption, PasteSpecialDialog, PasteSpecialDialogProps, ResponsePreview, ResponsePreviewProps, ResponsePreviewState, ResponsiveToolbar, ResponsiveToolbarGroup, ResponsiveToolbarGroupProps, ResponsiveToolbarProps, SYMBOL_CATEGORIES, ShortcutCategory, StyleOption, StylePicker, StylePickerProps, SymbolCategory, TableBorderColorPicker, TableBorderColorPickerProps, TableBorderPicker, TableBorderPickerProps, TableBorderWidthPicker, TableBorderWidthPickerProps, TableCellFillPicker, TableCellFillPickerProps, TableConfig, TableInsertButtons, TableInsertButtonsProps, TableMergeButton, TableMergeButtonProps, TableMoreDropdown, TableMoreDropdownProps, TextContextAction, TextContextMenu, TextContextMenuItem, TextContextMenuProps, Toolbar, ToolbarButton, ToolbarGroup, ToolbarItem, ToolbarItemPriority, ToolbarProps, ToolbarSeparator, UnsavedIndicator, UnsavedIndicatorProps, UseFindReplaceReturn, UseKeyboardShortcutsDialogOptions, UseKeyboardShortcutsDialogReturn, UseLoadingOptions, UseLoadingReturn, UsePasteSpecialOptions, UsePasteSpecialReturn, UseResponsiveToolbarOptions, UseResponsiveToolbarReturn, UseTextContextMenuOptions, UseTextContextMenuReturn, UseUnsavedChangesOptions, UseUnsavedChangesReturn, ZoomControl, ZoomControlProps, calculateFitDimensions, clampTableConfig, createChangeTracker, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createErrorResponse, createMockResponse, createSearchPattern, createToolbarItem, createToolbarItems, dataUrlToBlob, delay, escapeRegexString, findAllMatches, findInDocument, findInParagraph, formatFileSize, formatShortcutKeys, formatTableDimensions, getActionShortcut, getAllActions, getAllCategories, getAllIndicatorPositions, getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getAllPasteOptions, getCategoryLabel, getCommonShortcuts, getDefaultActions, getDefaultHighlightOptions, getDefaultPasteOption, getDefaultShortcuts, getDefaultTextContextMenuItems, getImageAcceptString, getImageDimensions, getLoadingVariantLabel, getMarginInUnits, getMatchCountText, getPasteOption, getRecommendedPriority, getRulerDimensions, getShortcutsByCategory, getSupportedImageExtensions, getSymbolCategories, getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTextActionLabel, getTextActionShortcut, getVariantLabel, isActionAvailable, isEmptySearch, isPasteSpecialShortcut, isTextActionAvailable, isValidImageFile, isValidTableConfig, parseMarginFromUnits, positionToMargin, replaceAllInContent, replaceFirstInContent, scrollToMatch, searchSymbols, symbolFromCodePoint, useContextMenu, useFindReplace, useHyperlinkDialog, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useKeyboardShortcutsDialog, useLoading, useLoadingOperations, usePasteSpecial, useResponsePreview, useResponsiveToolbar, useTextContextMenu, useUnsavedChanges } from './ui.js';
|
|
7
|
-
export { C as CLIPBOARD_TYPES, a as ClipboardContent, b as ClipboardOptions, I as INTERNAL_CLIPBOARD_TYPE, P as PageIndicatorPosition, c as PageIndicatorVariant, d as PageNavigator, e as PageNavigatorPosition, f as PageNavigatorProps, g as PageNavigatorVariant, h as PageNumberIndicator, i as PageNumberIndicatorProps, j as ParsedClipboardContent, k as PrintButton, l as PrintButtonProps, m as PrintOptions, n as PrintStyles, T as TableAction, o as TableContext, p as TableSelection, q as TableToolbar, r as TableToolbarProps, s as addColumn, t as addRow, u as calculateProgress, v as calculateScrollToPage, w as calculateVisiblePage, x as clampPageNumber, y as cleanWordHtml, z as copyParagraphs, A as copyRuns, B as createClipboardHandlers, D as createPageFormat, E as createTableContext, F as deleteColumn, G as deleteRow, H as formatPageOrdinal, J as formatPageRange, K as formatPrintPageRange, L as getCellAt, M as getColumnCount, N as getDefaultPrintOptions, O as getNavigationShortcuts, Q as getPageProgress, R as handlePasteEvent, S as htmlToRuns, U as isEditorHtml, V as isFirstPage, W as isLastPage, X as isPrintSupported, Y as isValidPageNumber, Z as isWordHtml, _ as mergeCells, $ as openPrintWindow, a0 as paragraphsToClipboardContent, a1 as parseClipboardHtml, a2 as parsePageInput, a3 as parsePageRange, a4 as readFromClipboard, a5 as runsToClipboardContent, a6 as splitCell, a7 as triggerPrint, a8 as writeToClipboard } from './clipboard-
|
|
8
|
-
export { f as AIAction, g as AIActionRequest, A as AgentCommand, h as AgentContext, i as AgentResponse, j as ApplyStyleCommand, l as BlockContent, a3 as BookmarkEnd, a4 as BookmarkStart, n as DeleteTextCommand, D as Document, d as DocumentBody, o as DocxPackage, E as Endnote, a5 as Field, a6 as FooterReference, F as Footnote, q as FormatTextCommand, a7 as HeaderFooter, a8 as HeaderReference, H as Hyperlink, I as Image, r as InsertHyperlinkCommand, s as InsertImageCommand, t as InsertTableCommand, u as InsertTextCommand, L as ListLevel, N as NumberingDefinitions, a as Paragraph, v as ParagraphContext, w as ParagraphFormatting, P as Position, R as Range, y as Relationship, z as ReplaceTextCommand, b as Run, c as RunContent, C as SectionProperties, G as SelectionContext, J as SetVariableCommand, a9 as Shape, K as Style, M as StyleDefinitions, Q as SuggestedAction, e as Table, U as TableCell, V as TableRow, aa as TextBox, W as TextContent, T as TextFormatting, X as Theme, ab as ThemeColorScheme, ac as ThemeFont, ad as ThemeFontScheme } from './agentApi-
|
|
7
|
+
export { C as CLIPBOARD_TYPES, a as ClipboardContent, b as ClipboardOptions, I as INTERNAL_CLIPBOARD_TYPE, P as PageIndicatorPosition, c as PageIndicatorVariant, d as PageNavigator, e as PageNavigatorPosition, f as PageNavigatorProps, g as PageNavigatorVariant, h as PageNumberIndicator, i as PageNumberIndicatorProps, j as ParsedClipboardContent, k as PrintButton, l as PrintButtonProps, m as PrintOptions, n as PrintStyles, T as TableAction, o as TableContext, p as TableSelection, q as TableToolbar, r as TableToolbarProps, s as addColumn, t as addRow, u as calculateProgress, v as calculateScrollToPage, w as calculateVisiblePage, x as clampPageNumber, y as cleanWordHtml, z as copyParagraphs, A as copyRuns, B as createClipboardHandlers, D as createPageFormat, E as createTableContext, F as deleteColumn, G as deleteRow, H as formatPageOrdinal, J as formatPageRange, K as formatPrintPageRange, L as getCellAt, M as getColumnCount, N as getDefaultPrintOptions, O as getNavigationShortcuts, Q as getPageProgress, R as handlePasteEvent, S as htmlToRuns, U as isEditorHtml, V as isFirstPage, W as isLastPage, X as isPrintSupported, Y as isValidPageNumber, Z as isWordHtml, _ as mergeCells, $ as openPrintWindow, a0 as paragraphsToClipboardContent, a1 as parseClipboardHtml, a2 as parsePageInput, a3 as parsePageRange, a4 as readFromClipboard, a5 as runsToClipboardContent, a6 as splitCell, a7 as triggerPrint, a8 as writeToClipboard } from './clipboard-DriRE6eS.js';
|
|
8
|
+
export { f as AIAction, g as AIActionRequest, A as AgentCommand, h as AgentContext, i as AgentResponse, j as ApplyStyleCommand, l as BlockContent, a3 as BookmarkEnd, a4 as BookmarkStart, n as DeleteTextCommand, D as Document, d as DocumentBody, o as DocxPackage, E as Endnote, a5 as Field, a6 as FooterReference, F as Footnote, q as FormatTextCommand, a7 as HeaderFooter, a8 as HeaderReference, H as Hyperlink, I as Image, r as InsertHyperlinkCommand, s as InsertImageCommand, t as InsertTableCommand, u as InsertTextCommand, L as ListLevel, N as NumberingDefinitions, a as Paragraph, v as ParagraphContext, w as ParagraphFormatting, P as Position, R as Range, y as Relationship, z as ReplaceTextCommand, b as Run, c as RunContent, C as SectionProperties, G as SelectionContext, J as SetVariableCommand, a9 as Shape, K as Style, M as StyleDefinitions, Q as SuggestedAction, e as Table, U as TableCell, V as TableRow, aa as TextBox, W as TextContent, T as TextFormatting, X as Theme, ab as ThemeColorScheme, ac as ThemeFont, ad as ThemeFontScheme } from './agentApi-DmDuQm0e.js';
|
|
9
9
|
import * as prosemirror_state from 'prosemirror-state';
|
|
10
10
|
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
11
11
|
import { DecorationSet, EditorView } from 'prosemirror-view';
|
|
12
|
-
export { C as CorePlugin, e as McpSession, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult } from './types-
|
|
13
|
-
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-
|
|
12
|
+
export { C as CorePlugin, e as McpSession, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult } from './types-BpokDLqL.js';
|
|
13
|
+
export { P as PluginRegistry, p as pluginRegistry, r as registerPlugins } from './registry-C2DPl-QW.js';
|
|
14
14
|
export { docxtemplaterPlugin } from './core-plugins-reexport.js';
|
|
15
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
|
-
import { k as PluginPanelProps } from './ClipboardManager-
|
|
17
|
-
export { d as AutoSaveStatus, e as ClipboardSelection, h as ErrorNotification, i as ErrorSeverity, j as PanelConfig, l as PositionCoordinates, R as RenderedDomContext, m as SavedDocumentData, T as TABLE_DATA_ATTRIBUTES, p as createSelectionFromDOM, t as formatLastSaveTime, u as formatStorageSize, v as getAutoSaveStatusLabel, w as getAutoSaveStorageSize, x as getSelectionRuns, z as isAutoSaveSupported } from './ClipboardManager-
|
|
16
|
+
import { k as PluginPanelProps } from './ClipboardManager-CR843H7H.js';
|
|
17
|
+
export { d as AutoSaveStatus, e as ClipboardSelection, h as ErrorNotification, i as ErrorSeverity, j as PanelConfig, l as PositionCoordinates, R as RenderedDomContext, m as SavedDocumentData, T as TABLE_DATA_ATTRIBUTES, p as createSelectionFromDOM, t as formatLastSaveTime, u as formatStorageSize, v as getAutoSaveStatusLabel, w as getAutoSaveStorageSize, x as getSelectionRuns, z as isAutoSaveSupported } from './ClipboardManager-CR843H7H.js';
|
|
18
18
|
import 'react';
|
|
19
19
|
import 'prosemirror-model';
|
|
20
20
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{v as DEFAULT_SELECTION_STYLE,i as DocxEditor,c as ErrorBoundary,b as ErrorProvider,w as HIGH_CONTRAST_SELECTION_STYLE,T as PLUGIN_HOST_STYLES,d as ParseErrorDisplay,U as PluginHost,x as SELECTION_CSS_VARS,e as UnsupportedFeatureWarning,l as ZOOM_PRESETS,O as areSelectionStylesInjected,u as clampZoom,J as clearSelection,P as createSelectionChangeHandler,o as findNearestZoomPreset,r as formatZoom,R as generateOverlayElements,C as generateSelectionCSS,B as getHighlightRectStyle,A as getMergedSelectionRects,p as getNextZoomPreset,q as getPreviousZoomPreset,E as getSelectedText,G as getSelectionBoundingRect,y as getSelectionRects,g as getUserFriendlyMessage,n as getZoomPresets,D as hasActiveSelection,H as highlightTextRange,M as injectSelectionStyles,f as isParseError,K as isSelectionBackwards,F as isSelectionWithin,t as isZoomPreset,z as mergeAdjacentRects,L as normalizeSelectionDirection,s as parseZoom,N as removeSelectionStyles,j as renderAsync,I as selectRange,k as useAutoSave,S as useClipboard,a as useErrorNotifications,Q as useSelectionHighlight,h as useTableSelection,m as useWheelZoom}from'./chunk-Q7YYC75E.js';import'./chunk-5GFXHUMP.js';export{q as ColorPicker,a as ContextMenu,$ as InsertImageDialog,ja as InsertSymbolDialog,U as InsertTableDialog,wa as KeyboardShortcutsDialog,H as LoadingIndicator,qa as PasteSpecialDialog,r as PrintButton,s as PrintStyles,g as ResponsePreview,P as ResponsiveToolbar,Q as ResponsiveToolbarGroup,ia as SYMBOL_CATEGORIES,A as TableInsertButtons,z as TableMergeButton,k as TextContextMenu,B as UnsavedIndicator,ea as calculateFitDimensions,Y as clampTableConfig,G as createChangeTracker,W as createDefaultTableConfig,j as createErrorResponse,i as createMockResponse,R as createToolbarItem,S as createToolbarItems,fa as dataUrlToBlob,N as delay,ha as formatFileSize,x as formatPrintPageRange,Da as formatShortcutKeys,Z as formatTableDimensions,c as getActionShortcut,f as getAllActions,Ca as getAllCategories,F as getAllIndicatorPositions,E as getAllIndicatorVariants,M as getAllLoadingSizes,L as getAllLoadingVariants,ta as getAllPasteOptions,Ba as getCategoryLabel,Aa as getCommonShortcuts,e as getDefaultActions,ua as getDefaultPasteOption,v as getDefaultPrintOptions,ya as getDefaultShortcuts,o as getDefaultTextContextMenuItems,da as getImageAcceptString,ga as getImageDimensions,K as getLoadingVariantLabel,sa as getPasteOption,T as getRecommendedPriority,za as getShortcutsByCategory,ca as getSupportedImageExtensions,la as getSymbolCategories,na as getSymbolUnicodeInfo,ma as getSymbolsByCategory,_ as getTablePresets,m as getTextActionLabel,n as getTextActionShortcut,D as getVariantLabel,d as isActionAvailable,va as isPasteSpecialShortcut,y as isPrintSupported,p as isTextActionAvailable,ba as isValidImageFile,X as isValidTableConfig,u as openPrintWindow,w as parsePageRange,oa as searchSymbols,pa as symbolFromCodePoint,t as triggerPrint,b as useContextMenu,aa as useInsertImageDialog,ka as useInsertSymbolDialog,V as useInsertTableDialog,xa as useKeyboardShortcutsDialog,I as useLoading,J as useLoadingOperations,ra as usePasteSpecial,h as useResponsePreview,O as useResponsiveToolbar,l as useTextContextMenu,C as useUnsavedChanges}from'./chunk-32HMU2UV.js';export{h as AdvancedColorPicker,j as AlignmentButtons,ca as CLIPBOARD_TYPES,b as FontPicker,g as FontSizePicker,O as HorizontalRuler,ba as INTERNAL_CLIPBOARD_TYPE,m as LineSpacingPicker,k as ListButtons,H as PageNavigator,z as PageNumberIndicator,n as StylePicker,q as TableBorderColorPicker,p as TableBorderPicker,r as TableBorderWidthPicker,s as TableCellFillPicker,t as TableMoreDropdown,T as TableToolbar,y as Toolbar,v as ToolbarButton,w as ToolbarGroup,x as ToolbarSeparator,o as ZoomControl,Z as addColumn,X as addRow,N as calculateProgress,G as calculateScrollToPage,F as calculateVisiblePage,K as clampPageNumber,na as cleanWordHtml,ea as copyParagraphs,da as copyRuns,pa as createClipboardHandlers,l as createDefaultListState,B as createPageFormat,U as createTableContext,_ as deleteColumn,Y as deleteRow,A as formatPageOrdinal,M as formatPageRange,W as getCellAt,V as getColumnCount,R as getMarginInUnits,L as getNavigationShortcuts,C as getPageProgress,Q as getRulerDimensions,ja as handlePasteEvent,oa as htmlToRuns,ma as isEditorHtml,D as isFirstPage,E as isLastPage,J as isValidPageNumber,la as isWordHtml,$ as mergeCells,ga as paragraphsToClipboardContent,ka as parseClipboardHtml,S as parseMarginFromUnits,I as parsePageInput,P as positionToMargin,ia as readFromClipboard,fa as runsToClipboardContent,aa as splitCell,ha as writeToClipboard}from'./chunk-2Y6FLZ5Q.js';export{n as FindReplaceDialog,a as createDefaultFindOptions,c as createSearchPattern,b as escapeRegexString,d as findAllMatches,j as findInDocument,k as findInParagraph,i as getDefaultHighlightOptions,g as getMatchCountText,h as isEmptySearch,e as replaceAllInContent,f as replaceFirstInContent,l as scrollToMatch,m as useFindReplace}from'./chunk-CTYOM6BE.js';export{d as HyperlinkDialog,m as useHyperlinkDialog}from'./chunk-PJVI53AH.js';export{x as TABLE_DATA_ATTRIBUTES,n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,F as createSelectionFromDOM,o as findPageBreaks,s as formatLastSaveTime,v as formatStorageSize,t as getAutoSaveStatusLabel,u as getAutoSaveStorageSize,E as getSelectionRuns,m as hasPageBreakBefore,h as insertHorizontalRule,f as insertPageBreak,w as isAutoSaveSupported,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak}from'./chunk-FVUGBRDD.js';import'./chunk-QVPR2W5S.js';export{f as DocumentAgent,m as buildExtendedSelectionContext,l as buildSelectionContext,e as createDocumentWithText,d as createEmptyDocument,i as getAgentContext,k as getDocumentSummary}from'./chunk-6NDMKJIE.js';export{l as blendColors,q as colorsEqual,i as createRgbColor,h as createThemeColor,j as darkenColor,t as emuToPixels,v as emuToTwips,B as formatPx,f as getContrastingColor,y as halfPointsToPixels,d as isBlack,e as isWhite,k as lightenColor,g as parseColorString,u as pixelsToEmu,s as pixelsToTwips,x as pointsToPixels,a as resolveColor,b as resolveHighlightColor,c as resolveShadingColor,w as twipsToEmu,r as twipsToPixels}from'./chunk-ZTVQA46Q.js';export{o as docxtemplaterPlugin}from'./chunk-7KJ3YVDQ.js';export{e as getTemplateTags,a as processTemplate,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-CLDB6TL7.js';export{b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties}from'./chunk-FXJAIFPR.js';export{a as executeCommand,b as executeCommands}from'./chunk-AARNCPWR.js';export{k as canRenderFont,i as getLoadedFonts,g as isFontLoaded,h as isFontsLoading,e as loadFont,l as loadFontFromBuffer,f as loadFonts,j as onFontsLoaded,p as parseDocx,m as preloadCommonFonts,o as toArrayBuffer}from'./chunk-UTWPV2I4.js';export{a as PluginRegistry,b as pluginRegistry,c as registerPlugins}from'./chunk-BUEMG4NW.js';import'./chunk-USRMBYI6.js';import'./chunk-H5NTJZO4.js';import ye,{useState,useRef,useMemo,useCallback,useEffect}from'react';import {PluginKey,TextSelection,Plugin}from'prosemirror-state';import {DecorationSet,Decoration}from'prosemirror-view';import {jsx,jsxs}from'react/jsx-runtime';var Ba=/[\p{L}\p{N}''\-]/u,Wa=/\s/;function M(e){return !e||e.length===0?false:Ba.test(e)}function K(e){return !e||e.length===0?false:Wa.test(e)}function R(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let o=e[t];if(K(o)){let n=t,r=t;for(;n>0&&K(e[n-1]);)n--;for(;r<e.length&&K(e[r]);)r++;return [n,r]}if(M(o)){let n=t,r=t;for(;n>0&&M(e[n-1]);)n--;for(;r<e.length&&M(e[r]);)r++;return [n,r]}return [t,t+1]}function Fa(e,t){let[o,n]=R(e,t);return e.slice(o,n)}function Ua(e,t){let[o,n]=R(e,t);return {word:e.slice(o,n),startIndex:o,endIndex:n}}function $(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0),o=t.startContainer;if(o.nodeType===Node.TEXT_NODE){let n=o.textContent||"",r=t.startOffset,[a,i]=R(n,r);if(i>a)return t.setStart(o,a),t.setEnd(o,i),e.removeAllRanges(),e.addRange(t),true}if(o.nodeType===Node.ELEMENT_NODE){let n=o,r=q(n);if(r.length>0){let a=t.startOffset,i=null,l=a;if(a<n.childNodes.length){let p=n.childNodes[a];if(p.nodeType===Node.TEXT_NODE)i=p,l=0;else if(p instanceof Element){let d=q(p);d.length>0&&(i=d[0],l=0);}}if(!i&&r.length>0&&(i=r[0],l=0),i){let p=i.textContent||"",[d,c]=R(p,l);if(c>d){let u=document.createRange();return u.setStart(i,d),u.setEnd(i,c),e.removeAllRanges(),e.addRange(u),true}}}}return false}function za(e,t){let o=window.getSelection();if(!o)return false;let n=e.textContent||"",[r,a]=R(n,t);if(a>r){let i=document.createRange();return i.setStart(e,r),i.setEnd(e,a),o.removeAllRanges(),o.addRange(i),true}return false}function Va(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0);if(t.collapsed)return $();let o=t.startContainer,n=t.endContainer,r=t.startOffset,a=t.endOffset;if(o.nodeType===Node.TEXT_NODE){let i=o.textContent||"",[l]=R(i,t.startOffset);r=l;}if(n.nodeType===Node.TEXT_NODE){let i=n.textContent||"",l=Math.max(0,t.endOffset-1),[,p]=R(i,l);a=p;}try{return t.setStart(o,r),t.setEnd(n,a),e.removeAllRanges(),e.addRange(t),!0}catch(i){return console.warn("Could not expand selection to word boundaries:",i),false}}function J(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let o=e.getRangeAt(0).commonAncestorContainer,n=Ga(o);if(n){let r=document.createRange();return r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),true}return false}function Ga(e){if(!e)return null;let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute("data-paragraph-index"))return t;t=t.parentNode;}return null}function q(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;for(;n=o.nextNode();)n.nodeType===Node.TEXT_NODE&&t.push(n);return t}var V=0,O=null,G=null,$a=500;function j(){V=0,G=null,O&&(clearTimeout(O),O=null);}function Q(e){return e.target!==G&&j(),V++,G=e.target,O&&clearTimeout(O),O=setTimeout(j,$a),Math.min(V,3)}function Ya(){return e=>{e.ctrlKey||e.metaKey||e.altKey||$();}}function Za(){return e=>{if(Q(e)===3){if(e.ctrlKey||e.metaKey||e.altKey)return;J();}}}function P(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function Y(e){return e?/\s/.test(e):false}function Xa(e){return e?/[\p{P}]/u.test(e):false}function qa(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&Y(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&P(e[o-1]);)o--;return o}function ja(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&Y(e[o]);)o++;return o}function ee(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&!P(e[o]);)o++;return o}function te(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!P(e[o-1]);)o--;for(;o>0&&P(e[o-1]);)o--;return o}function oe(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let a=n.getBoundingClientRect().top,i=0,l=t;for(;i<l;){let p=Math.floor((i+l)/2);n.setStart(e,p),n.collapse(true);let d=n.getBoundingClientRect();Math.abs(d.top-a)<2?l=p:i=p+1;}return {node:e,offset:i}}return null}function ne(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,l=t,p=n;for(;l<p;){let d=Math.ceil((l+p)/2);r.setStart(e,d),r.collapse(true);let c=r.getBoundingClientRect();Math.abs(c.top-i)<2?l=d:p=d-1;}return {node:e,offset:l}}return null}function Ja(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function H(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function _(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function re(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",a=o.focusOffset,i;return e==="left"?i=te(r,a):i=ee(r,a),t?_(n,i):H(n,i),true}function ae(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?oe(n,o.focusOffset):ne(n,o.focusOffset);if(i)return t?_(i.node,i.offset):H(i.node,i.offset),true}let r=n.textContent||"",a=e==="start"?0:r.length;return t?_(n,a):H(n,a),true}function ie(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:a}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Qa(e,t){let o=ie(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&re(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(ae(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function ei(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function ti(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;if(r===a)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,a),e.removeAllRanges(),e.addRange(i),true}function oi(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;return r===a?null:o.slice(r,a)}function ni(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var T={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function S(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function ri(){return [{action:"Move by word (left)",shortcut:S(T.wordLeft)},{action:"Move by word (right)",shortcut:S(T.wordRight)},{action:"Select word (left)",shortcut:S(T.selectWordLeft)},{action:"Select word (right)",shortcut:S(T.selectWordRight)},{action:"Go to line start",shortcut:S(T.lineStart)},{action:"Go to line end",shortcut:S(T.lineEnd)},{action:"Select to line start",shortcut:S(T.selectToLineStart)},{action:"Select to line end",shortcut:S(T.selectToLineEnd)},{action:"Go to document start",shortcut:S(T.documentStart)},{action:"Go to document end",shortcut:S(T.documentEnd)},{action:"Select to document start",shortcut:S(T.selectToDocumentStart)},{action:"Select to document end",shortcut:S(T.selectToDocumentEnd)}]}var se=/\{([#/^@]?)([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}/g,m=new PluginKey("template");function li(e,t,o){return `${e}:${t}:${o}`}function le(e){let t=[];e.descendants((p,d)=>(p.isText&&p.text&&t.push({text:p.text,pos:d}),true));let o="",n=[];for(let p of t){for(let d=0;d<p.text.length;d++)n.push(p.pos+d);o+=p.text;}let r=[],a=[],i=new Map,l;for(se.lastIndex=0;(l=se.exec(o))!==null;){let[p,d,c]=l,u=n[l.index],x=n[l.index+p.length-1]+1,g;d==="#"?g="sectionStart":d==="/"?g="sectionEnd":d==="^"?g="invertedStart":d==="@"?g="raw":g="variable";let b=`${g}:${c}`,k=i.get(b)??0;i.set(b,k+1);let N={id:li(g,c,k),type:g,name:c,rawTag:p,from:u,to:x};if(g==="sectionStart"||g==="invertedStart")N.nestedVars=[],a.push(N);else if(g==="sectionEnd"){for(let s=a.length-1;s>=0;s--)if(a[s].name===c){a.splice(s,1);break}}else g==="variable"&&a.length>0&&(a[a.length-1].nestedVars?.push(c),N.insideSection=true);r.push(N);}return r}function ci(e){switch(e){case "sectionStart":case "sectionEnd":return "#3b82f6";case "invertedStart":return "#8b5cf6";case "raw":return "#ef4444";default:return "#f59e0b"}}function Z(e,t,o,n){let r=[];for(let a of t){let i=a.id===o,l=a.id===n,p=ci(a.type),d=["docx-template-tag"];i&&d.push("hovered"),l&&d.push("selected"),r.push(Decoration.inline(a.from,a.to,{class:d.join(" "),"data-tag-id":a.id,style:`background-color: ${p}22; border-radius: 2px;`}));}return DecorationSet.create(e,r)}function pi(e,t){if(e.length!==t.length)return false;for(let o=0;o<e.length;o++)if(e[o].id!==t[o].id)return false;return true}function B(){return new Plugin({key:m,state:{init(e,t){let o=le(t.doc);return {tags:o,decorations:Z(t.doc,o)}},apply(e,t,o,n){if(e.docChanged){let a=le(n.doc),i=pi(t.tags,a);return {tags:a,decorations:i?t.decorations.map(e.mapping,e.doc):Z(n.doc,a,t.hoveredId,t.selectedId),hoveredId:t.hoveredId,selectedId:t.selectedId}}let r=e.getMeta(m);if(r){let a=r.hoveredId??t.hoveredId,i=r.selectedId??t.selectedId;return {...t,hoveredId:a,selectedId:i,decorations:Z(n.doc,t.tags,a,i)}}return {...t,decorations:t.decorations.map(e.mapping,e.doc)}}},props:{decorations(e){return m.getState(e)?.decorations??DecorationSet.empty},handleClick(e,t){let n=(m.getState(e.state)?.tags??[]).find(a=>t>=a.from&&t<=a.to);return n?(e.dispatch(e.state.tr.setMeta(m,{selectedId:n.id})),true):(m.getState(e.state)?.selectedId&&e.dispatch(e.state.tr.setMeta(m,{selectedId:void 0})),false)},handleDOMEvents:{mouseover(e,t){let n=t.target.closest?.("[data-tag-id]")?.getAttribute("data-tag-id")||void 0,r=m.getState(e.state)?.hoveredId;return n!==r&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:n})),false},mouseout(e,t){return t.relatedTarget?.closest?.("[data-tag-id]")||m.getState(e.state)?.hoveredId&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:void 0})),false}}}})}function pe(e){return m.getState(e)?.tags??[]}function D(e,t){e.dispatch(e.state.tr.setMeta(m,{hoveredId:t}));}function L(e,t){e.dispatch(e.state.tr.setMeta(m,{selectedId:t}));}var W=`
|
|
1
|
+
export{v as DEFAULT_SELECTION_STYLE,i as DocxEditor,c as ErrorBoundary,b as ErrorProvider,w as HIGH_CONTRAST_SELECTION_STYLE,T as PLUGIN_HOST_STYLES,d as ParseErrorDisplay,U as PluginHost,x as SELECTION_CSS_VARS,e as UnsupportedFeatureWarning,l as ZOOM_PRESETS,O as areSelectionStylesInjected,u as clampZoom,J as clearSelection,P as createSelectionChangeHandler,o as findNearestZoomPreset,r as formatZoom,R as generateOverlayElements,C as generateSelectionCSS,B as getHighlightRectStyle,A as getMergedSelectionRects,p as getNextZoomPreset,q as getPreviousZoomPreset,E as getSelectedText,G as getSelectionBoundingRect,y as getSelectionRects,g as getUserFriendlyMessage,n as getZoomPresets,D as hasActiveSelection,H as highlightTextRange,M as injectSelectionStyles,f as isParseError,K as isSelectionBackwards,F as isSelectionWithin,t as isZoomPreset,z as mergeAdjacentRects,L as normalizeSelectionDirection,s as parseZoom,N as removeSelectionStyles,j as renderAsync,I as selectRange,k as useAutoSave,S as useClipboard,a as useErrorNotifications,Q as useSelectionHighlight,h as useTableSelection,m as useWheelZoom}from'./chunk-2JOQ7WKO.js';import'./chunk-5GFXHUMP.js';export{q as ColorPicker,a as ContextMenu,$ as InsertImageDialog,ja as InsertSymbolDialog,U as InsertTableDialog,wa as KeyboardShortcutsDialog,H as LoadingIndicator,qa as PasteSpecialDialog,r as PrintButton,s as PrintStyles,g as ResponsePreview,P as ResponsiveToolbar,Q as ResponsiveToolbarGroup,ia as SYMBOL_CATEGORIES,A as TableInsertButtons,z as TableMergeButton,k as TextContextMenu,B as UnsavedIndicator,ea as calculateFitDimensions,Y as clampTableConfig,G as createChangeTracker,W as createDefaultTableConfig,j as createErrorResponse,i as createMockResponse,R as createToolbarItem,S as createToolbarItems,fa as dataUrlToBlob,N as delay,ha as formatFileSize,x as formatPrintPageRange,Da as formatShortcutKeys,Z as formatTableDimensions,c as getActionShortcut,f as getAllActions,Ca as getAllCategories,F as getAllIndicatorPositions,E as getAllIndicatorVariants,M as getAllLoadingSizes,L as getAllLoadingVariants,ta as getAllPasteOptions,Ba as getCategoryLabel,Aa as getCommonShortcuts,e as getDefaultActions,ua as getDefaultPasteOption,v as getDefaultPrintOptions,ya as getDefaultShortcuts,o as getDefaultTextContextMenuItems,da as getImageAcceptString,ga as getImageDimensions,K as getLoadingVariantLabel,sa as getPasteOption,T as getRecommendedPriority,za as getShortcutsByCategory,ca as getSupportedImageExtensions,la as getSymbolCategories,na as getSymbolUnicodeInfo,ma as getSymbolsByCategory,_ as getTablePresets,m as getTextActionLabel,n as getTextActionShortcut,D as getVariantLabel,d as isActionAvailable,va as isPasteSpecialShortcut,y as isPrintSupported,p as isTextActionAvailable,ba as isValidImageFile,X as isValidTableConfig,u as openPrintWindow,w as parsePageRange,oa as searchSymbols,pa as symbolFromCodePoint,t as triggerPrint,b as useContextMenu,aa as useInsertImageDialog,ka as useInsertSymbolDialog,V as useInsertTableDialog,xa as useKeyboardShortcutsDialog,I as useLoading,J as useLoadingOperations,ra as usePasteSpecial,h as useResponsePreview,O as useResponsiveToolbar,l as useTextContextMenu,C as useUnsavedChanges}from'./chunk-R56SLH64.js';export{h as AdvancedColorPicker,j as AlignmentButtons,ca as CLIPBOARD_TYPES,b as FontPicker,g as FontSizePicker,O as HorizontalRuler,ba as INTERNAL_CLIPBOARD_TYPE,m as LineSpacingPicker,k as ListButtons,H as PageNavigator,z as PageNumberIndicator,n as StylePicker,q as TableBorderColorPicker,p as TableBorderPicker,r as TableBorderWidthPicker,s as TableCellFillPicker,t as TableMoreDropdown,T as TableToolbar,y as Toolbar,v as ToolbarButton,w as ToolbarGroup,x as ToolbarSeparator,o as ZoomControl,Z as addColumn,X as addRow,N as calculateProgress,G as calculateScrollToPage,F as calculateVisiblePage,K as clampPageNumber,na as cleanWordHtml,ea as copyParagraphs,da as copyRuns,pa as createClipboardHandlers,l as createDefaultListState,B as createPageFormat,U as createTableContext,_ as deleteColumn,Y as deleteRow,A as formatPageOrdinal,M as formatPageRange,W as getCellAt,V as getColumnCount,R as getMarginInUnits,L as getNavigationShortcuts,C as getPageProgress,Q as getRulerDimensions,ja as handlePasteEvent,oa as htmlToRuns,ma as isEditorHtml,D as isFirstPage,E as isLastPage,J as isValidPageNumber,la as isWordHtml,$ as mergeCells,ga as paragraphsToClipboardContent,ka as parseClipboardHtml,S as parseMarginFromUnits,I as parsePageInput,P as positionToMargin,ia as readFromClipboard,fa as runsToClipboardContent,aa as splitCell,ha as writeToClipboard}from'./chunk-C6ELWJWO.js';export{n as FindReplaceDialog,a as createDefaultFindOptions,c as createSearchPattern,b as escapeRegexString,d as findAllMatches,j as findInDocument,k as findInParagraph,i as getDefaultHighlightOptions,g as getMatchCountText,h as isEmptySearch,e as replaceAllInContent,f as replaceFirstInContent,l as scrollToMatch,m as useFindReplace}from'./chunk-CTYOM6BE.js';export{d as HyperlinkDialog,m as useHyperlinkDialog}from'./chunk-PJVI53AH.js';export{x as TABLE_DATA_ATTRIBUTES,n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,F as createSelectionFromDOM,o as findPageBreaks,s as formatLastSaveTime,v as formatStorageSize,t as getAutoSaveStatusLabel,u as getAutoSaveStorageSize,E as getSelectionRuns,m as hasPageBreakBefore,h as insertHorizontalRule,f as insertPageBreak,w as isAutoSaveSupported,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak}from'./chunk-FVUGBRDD.js';import'./chunk-QVPR2W5S.js';export{f as DocumentAgent,m as buildExtendedSelectionContext,l as buildSelectionContext,e as createDocumentWithText,d as createEmptyDocument,i as getAgentContext,k as getDocumentSummary}from'./chunk-JIKVCUR6.js';export{l as blendColors,q as colorsEqual,i as createRgbColor,h as createThemeColor,j as darkenColor,f as getContrastingColor,d as isBlack,e as isWhite,k as lightenColor,g as parseColorString,a as resolveColor,b as resolveHighlightColor,c as resolveShadingColor}from'./chunk-4VUZBV2S.js';export{o as docxtemplaterPlugin}from'./chunk-6TUCNECX.js';export{e as getTemplateTags,a as processTemplate,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-CLDB6TL7.js';export{b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties}from'./chunk-PGEORVCG.js';export{a as executeCommand,b as executeCommands}from'./chunk-AARNCPWR.js';export{i as canRenderFont,g as getLoadedFonts,e as isFontLoaded,f as isFontsLoading,c as loadFont,j as loadFontFromBuffer,d as loadFonts,h as onFontsLoaded,n as parseDocx,k as preloadCommonFonts,m as toArrayBuffer}from'./chunk-3X3LTNK4.js';export{a as PluginRegistry,b as pluginRegistry,c as registerPlugins}from'./chunk-BUEMG4NW.js';export{c as emuToPixels,e as emuToTwips,k as formatPx,h as halfPointsToPixels,d as pixelsToEmu,b as pixelsToTwips,g as pointsToPixels,f as twipsToEmu,a as twipsToPixels}from'./chunk-SE5EN2QL.js';import'./chunk-USRMBYI6.js';import'./chunk-H5NTJZO4.js';import ye,{useState,useRef,useMemo,useCallback,useEffect}from'react';import {PluginKey,TextSelection,Plugin}from'prosemirror-state';import {DecorationSet,Decoration}from'prosemirror-view';import {jsx,jsxs}from'react/jsx-runtime';var Ba=/[\p{L}\p{N}''\-]/u,Wa=/\s/;function M(e){return !e||e.length===0?false:Ba.test(e)}function K(e){return !e||e.length===0?false:Wa.test(e)}function R(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let o=e[t];if(K(o)){let n=t,r=t;for(;n>0&&K(e[n-1]);)n--;for(;r<e.length&&K(e[r]);)r++;return [n,r]}if(M(o)){let n=t,r=t;for(;n>0&&M(e[n-1]);)n--;for(;r<e.length&&M(e[r]);)r++;return [n,r]}return [t,t+1]}function Fa(e,t){let[o,n]=R(e,t);return e.slice(o,n)}function Ua(e,t){let[o,n]=R(e,t);return {word:e.slice(o,n),startIndex:o,endIndex:n}}function $(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0),o=t.startContainer;if(o.nodeType===Node.TEXT_NODE){let n=o.textContent||"",r=t.startOffset,[a,i]=R(n,r);if(i>a)return t.setStart(o,a),t.setEnd(o,i),e.removeAllRanges(),e.addRange(t),true}if(o.nodeType===Node.ELEMENT_NODE){let n=o,r=q(n);if(r.length>0){let a=t.startOffset,i=null,l=a;if(a<n.childNodes.length){let p=n.childNodes[a];if(p.nodeType===Node.TEXT_NODE)i=p,l=0;else if(p instanceof Element){let d=q(p);d.length>0&&(i=d[0],l=0);}}if(!i&&r.length>0&&(i=r[0],l=0),i){let p=i.textContent||"",[d,c]=R(p,l);if(c>d){let u=document.createRange();return u.setStart(i,d),u.setEnd(i,c),e.removeAllRanges(),e.addRange(u),true}}}}return false}function za(e,t){let o=window.getSelection();if(!o)return false;let n=e.textContent||"",[r,a]=R(n,t);if(a>r){let i=document.createRange();return i.setStart(e,r),i.setEnd(e,a),o.removeAllRanges(),o.addRange(i),true}return false}function Va(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0);if(t.collapsed)return $();let o=t.startContainer,n=t.endContainer,r=t.startOffset,a=t.endOffset;if(o.nodeType===Node.TEXT_NODE){let i=o.textContent||"",[l]=R(i,t.startOffset);r=l;}if(n.nodeType===Node.TEXT_NODE){let i=n.textContent||"",l=Math.max(0,t.endOffset-1),[,p]=R(i,l);a=p;}try{return t.setStart(o,r),t.setEnd(n,a),e.removeAllRanges(),e.addRange(t),!0}catch(i){return console.warn("Could not expand selection to word boundaries:",i),false}}function J(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let o=e.getRangeAt(0).commonAncestorContainer,n=Ga(o);if(n){let r=document.createRange();return r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),true}return false}function Ga(e){if(!e)return null;let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute("data-paragraph-index"))return t;t=t.parentNode;}return null}function q(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;for(;n=o.nextNode();)n.nodeType===Node.TEXT_NODE&&t.push(n);return t}var V=0,O=null,G=null,$a=500;function j(){V=0,G=null,O&&(clearTimeout(O),O=null);}function Q(e){return e.target!==G&&j(),V++,G=e.target,O&&clearTimeout(O),O=setTimeout(j,$a),Math.min(V,3)}function Ya(){return e=>{e.ctrlKey||e.metaKey||e.altKey||$();}}function Za(){return e=>{if(Q(e)===3){if(e.ctrlKey||e.metaKey||e.altKey)return;J();}}}function P(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function Y(e){return e?/\s/.test(e):false}function Xa(e){return e?/[\p{P}]/u.test(e):false}function qa(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&Y(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&P(e[o-1]);)o--;return o}function ja(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&Y(e[o]);)o++;return o}function ee(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&P(e[o]);)o++;for(;o<e.length&&!P(e[o]);)o++;return o}function te(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!P(e[o-1]);)o--;for(;o>0&&P(e[o-1]);)o--;return o}function oe(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let a=n.getBoundingClientRect().top,i=0,l=t;for(;i<l;){let p=Math.floor((i+l)/2);n.setStart(e,p),n.collapse(true);let d=n.getBoundingClientRect();Math.abs(d.top-a)<2?l=p:i=p+1;}return {node:e,offset:i}}return null}function ne(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,l=t,p=n;for(;l<p;){let d=Math.ceil((l+p)/2);r.setStart(e,d),r.collapse(true);let c=r.getBoundingClientRect();Math.abs(c.top-i)<2?l=d:p=d-1;}return {node:e,offset:l}}return null}function Ja(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function H(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function _(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function re(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",a=o.focusOffset,i;return e==="left"?i=te(r,a):i=ee(r,a),t?_(n,i):H(n,i),true}function ae(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?oe(n,o.focusOffset):ne(n,o.focusOffset);if(i)return t?_(i.node,i.offset):H(i.node,i.offset),true}let r=n.textContent||"",a=e==="start"?0:r.length;return t?_(n,a):H(n,a),true}function ie(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:a}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Qa(e,t){let o=ie(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&re(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(ae(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function ei(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function ti(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;if(r===a)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,a),e.removeAllRanges(),e.addRange(i),true}function oi(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,a=n;for(;r>0&&P(o[r-1]);)r--;for(;a<o.length&&P(o[a]);)a++;return r===a?null:o.slice(r,a)}function ni(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var T={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function S(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function ri(){return [{action:"Move by word (left)",shortcut:S(T.wordLeft)},{action:"Move by word (right)",shortcut:S(T.wordRight)},{action:"Select word (left)",shortcut:S(T.selectWordLeft)},{action:"Select word (right)",shortcut:S(T.selectWordRight)},{action:"Go to line start",shortcut:S(T.lineStart)},{action:"Go to line end",shortcut:S(T.lineEnd)},{action:"Select to line start",shortcut:S(T.selectToLineStart)},{action:"Select to line end",shortcut:S(T.selectToLineEnd)},{action:"Go to document start",shortcut:S(T.documentStart)},{action:"Go to document end",shortcut:S(T.documentEnd)},{action:"Select to document start",shortcut:S(T.selectToDocumentStart)},{action:"Select to document end",shortcut:S(T.selectToDocumentEnd)}]}var se=/\{([#/^@]?)([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}/g,m=new PluginKey("template");function li(e,t,o){return `${e}:${t}:${o}`}function le(e){let t=[];e.descendants((p,d)=>(p.isText&&p.text&&t.push({text:p.text,pos:d}),true));let o="",n=[];for(let p of t){for(let d=0;d<p.text.length;d++)n.push(p.pos+d);o+=p.text;}let r=[],a=[],i=new Map,l;for(se.lastIndex=0;(l=se.exec(o))!==null;){let[p,d,c]=l,u=n[l.index],x=n[l.index+p.length-1]+1,g;d==="#"?g="sectionStart":d==="/"?g="sectionEnd":d==="^"?g="invertedStart":d==="@"?g="raw":g="variable";let b=`${g}:${c}`,k=i.get(b)??0;i.set(b,k+1);let N={id:li(g,c,k),type:g,name:c,rawTag:p,from:u,to:x};if(g==="sectionStart"||g==="invertedStart")N.nestedVars=[],a.push(N);else if(g==="sectionEnd"){for(let s=a.length-1;s>=0;s--)if(a[s].name===c){a.splice(s,1);break}}else g==="variable"&&a.length>0&&(a[a.length-1].nestedVars?.push(c),N.insideSection=true);r.push(N);}return r}function ci(e){switch(e){case "sectionStart":case "sectionEnd":return "#3b82f6";case "invertedStart":return "#8b5cf6";case "raw":return "#ef4444";default:return "#f59e0b"}}function Z(e,t,o,n){let r=[];for(let a of t){let i=a.id===o,l=a.id===n,p=ci(a.type),d=["docx-template-tag"];i&&d.push("hovered"),l&&d.push("selected"),r.push(Decoration.inline(a.from,a.to,{class:d.join(" "),"data-tag-id":a.id,style:`background-color: ${p}22; border-radius: 2px;`}));}return DecorationSet.create(e,r)}function pi(e,t){if(e.length!==t.length)return false;for(let o=0;o<e.length;o++)if(e[o].id!==t[o].id)return false;return true}function B(){return new Plugin({key:m,state:{init(e,t){let o=le(t.doc);return {tags:o,decorations:Z(t.doc,o)}},apply(e,t,o,n){if(e.docChanged){let a=le(n.doc),i=pi(t.tags,a);return {tags:a,decorations:i?t.decorations.map(e.mapping,e.doc):Z(n.doc,a,t.hoveredId,t.selectedId),hoveredId:t.hoveredId,selectedId:t.selectedId}}let r=e.getMeta(m);if(r){let a=r.hoveredId??t.hoveredId,i=r.selectedId??t.selectedId;return {...t,hoveredId:a,selectedId:i,decorations:Z(n.doc,t.tags,a,i)}}return {...t,decorations:t.decorations.map(e.mapping,e.doc)}}},props:{decorations(e){return m.getState(e)?.decorations??DecorationSet.empty},handleClick(e,t){let n=(m.getState(e.state)?.tags??[]).find(a=>t>=a.from&&t<=a.to);return n?(e.dispatch(e.state.tr.setMeta(m,{selectedId:n.id})),true):(m.getState(e.state)?.selectedId&&e.dispatch(e.state.tr.setMeta(m,{selectedId:void 0})),false)},handleDOMEvents:{mouseover(e,t){let n=t.target.closest?.("[data-tag-id]")?.getAttribute("data-tag-id")||void 0,r=m.getState(e.state)?.hoveredId;return n!==r&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:n})),false},mouseout(e,t){return t.relatedTarget?.closest?.("[data-tag-id]")||m.getState(e.state)?.hoveredId&&e.dispatch(e.state.tr.setMeta(m,{hoveredId:void 0})),false}}}})}function pe(e){return m.getState(e)?.tags??[]}function D(e,t){e.dispatch(e.state.tr.setMeta(m,{hoveredId:t}));}function L(e,t){e.dispatch(e.state.tr.setMeta(m,{selectedId:t}));}var W=`
|
|
2
2
|
.docx-template-tag {
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
transition: background-color 0.1s;
|
package/dist/mcp-reexport.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkPUVSVHHB_cjs=require('./chunk-PUVSVHHB.cjs'),chunkP7ZF45KZ_cjs=require('./chunk-P7ZF45KZ.cjs'),chunkPIVLDW7B_cjs=require('./chunk-PIVLDW7B.cjs'),chunkYS7FDEZ4_cjs=require('./chunk-YS7FDEZ4.cjs');require('./chunk-KR32M3S4.cjs'),require('./chunk-XQNCLN4T.cjs'),require('./chunk-PCJ5ACUV.cjs');var u={type:"string",description:"Document ID returned from docx_load"},h={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},offset:{type:"number",description:"Character offset within the paragraph",minimum:0}},required:["paragraphIndex","offset"]},T={type:"object",properties:{start:h,end:h},required:["start","end"]},D={name:"docx_load",description:`Load a DOCX document from base64-encoded content.
|
|
2
2
|
Returns a document ID that can be used with other tools.
|
|
3
|
-
The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n[l]=t.charCodeAt(l);let o=n.buffer,a=await
|
|
4
|
-
Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let t;c.buffer?t=await
|
|
3
|
+
The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n[l]=t.charCodeAt(l);let o=n.buffer,a=await chunkPIVLDW7B_cjs.n(o),d=`doc_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;s.session.documents.set(d,{id:d,document:a,buffer:o,source:c,lastModified:Date.now()});let p=a.package.document.content.filter(l=>l.type==="paragraph").length;return {content:[{type:"text",text:JSON.stringify({documentId:d,source:c,paragraphCount:p,message:"Document loaded successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to load document: ${t.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},C={name:"docx_save",description:`Export the document to base64-encoded DOCX format.
|
|
4
|
+
Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let t;c.buffer?t=await chunkPUVSVHHB_cjs.f(c.document):t=await chunkPUVSVHHB_cjs.l(c.document);let n=new Uint8Array(t),o="";for(let d=0;d<n.length;d++)o+=String.fromCharCode(n[d]);let a=btoa(o);return {content:[{type:"text",text:JSON.stringify({documentId:e,base64:a,size:t.byteLength,message:"Document exported successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to save document: ${t.message}`}]}}},annotations:{category:"core",readOnly:true,complexity:"low"}},R={name:"docx_close",description:`Close a document and free its memory.
|
|
5
5
|
Use this when done working with a document.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r;return s.session.documents.has(e)?(s.session.documents.delete(e),{content:[{type:"text",text:JSON.stringify({documentId:e,message:"Document closed"})}]}):{isError:true,content:[{type:"text",text:`Document not found: ${e}`}]}},annotations:{category:"core",readOnly:false,complexity:"low"}},k={name:"docx_get_info",description:`Get metadata and statistics about a document.
|
|
6
6
|
Returns paragraph count, word count, table count, and other useful info.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let t=c.document,n=t.package.document,o=n.content.filter(p=>p.type==="paragraph"),a=n.content.filter(p=>p.type==="table"),d=0;for(let p of o)if(p.type==="paragraph"){let l=P(p);d+=l.split(/\s+/).filter(x=>x.length>0).length;}return {content:[{type:"text",text:JSON.stringify({documentId:e,paragraphCount:o.length,tableCount:a.length,wordCount:d,hasStyles:!!t.package.styles,hasTheme:!!t.package.theme,source:c.source,lastModified:c.lastModified})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},$={name:"docx_get_text",description:`Get the plain text content of the document.
|
|
7
7
|
Returns all text concatenated with paragraph breaks.
|
package/dist/mcp-reexport.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as McpToolDefinition, e as McpSession, J as JsonSchema } from './types-
|
|
2
|
-
import './agentApi-
|
|
1
|
+
import { M as McpToolDefinition, e as McpSession, J as JsonSchema } from './types-COQvtZji.cjs';
|
|
2
|
+
import './agentApi-DmDuQm0e.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Core MCP Tools
|
package/dist/mcp-reexport.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as McpToolDefinition, e as McpSession, J as JsonSchema } from './types-
|
|
2
|
-
import './agentApi-
|
|
1
|
+
import { M as McpToolDefinition, e as McpSession, J as JsonSchema } from './types-BpokDLqL.js';
|
|
2
|
+
import './agentApi-DmDuQm0e.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Core MCP Tools
|
package/dist/mcp-reexport.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {f,l}from'./chunk-PGEORVCG.js';import {a}from'./chunk-AARNCPWR.js';import {n}from'./chunk-3X3LTNK4.js';import {b}from'./chunk-BUEMG4NW.js';import'./chunk-SE5EN2QL.js';import'./chunk-USRMBYI6.js';import'./chunk-H5NTJZO4.js';var u={type:"string",description:"Document ID returned from docx_load"},h={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},offset:{type:"number",description:"Character offset within the paragraph",minimum:0}},required:["paragraphIndex","offset"]},T={type:"object",properties:{start:h,end:h},required:["start","end"]},D={name:"docx_load",description:`Load a DOCX document from base64-encoded content.
|
|
2
2
|
Returns a document ID that can be used with other tools.
|
|
3
|
-
The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n[l]=t.charCodeAt(l);let o=n.buffer,a=await
|
|
4
|
-
Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let t;c.buffer?t=await
|
|
3
|
+
The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n$1=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n$1[l]=t.charCodeAt(l);let o=n$1.buffer,a=await n(o),d=`doc_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;s.session.documents.set(d,{id:d,document:a,buffer:o,source:c,lastModified:Date.now()});let p=a.package.document.content.filter(l=>l.type==="paragraph").length;return {content:[{type:"text",text:JSON.stringify({documentId:d,source:c,paragraphCount:p,message:"Document loaded successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to load document: ${t.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},C={name:"docx_save",description:`Export the document to base64-encoded DOCX format.
|
|
4
|
+
Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let t;c.buffer?t=await f(c.document):t=await l(c.document);let n=new Uint8Array(t),o="";for(let d=0;d<n.length;d++)o+=String.fromCharCode(n[d]);let a=btoa(o);return {content:[{type:"text",text:JSON.stringify({documentId:e,base64:a,size:t.byteLength,message:"Document exported successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to save document: ${t.message}`}]}}},annotations:{category:"core",readOnly:true,complexity:"low"}},R={name:"docx_close",description:`Close a document and free its memory.
|
|
5
5
|
Use this when done working with a document.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r;return s.session.documents.has(e)?(s.session.documents.delete(e),{content:[{type:"text",text:JSON.stringify({documentId:e,message:"Document closed"})}]}):{isError:true,content:[{type:"text",text:`Document not found: ${e}`}]}},annotations:{category:"core",readOnly:false,complexity:"low"}},k={name:"docx_get_info",description:`Get metadata and statistics about a document.
|
|
6
6
|
Returns paragraph count, word count, table count, and other useful info.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let t=c.document,n=t.package.document,o=n.content.filter(p=>p.type==="paragraph"),a=n.content.filter(p=>p.type==="table"),d=0;for(let p of o)if(p.type==="paragraph"){let l=P(p);d+=l.split(/\s+/).filter(x=>x.length>0).length;}return {content:[{type:"text",text:JSON.stringify({documentId:e,paragraphCount:o.length,tableCount:a.length,wordCount:d,hasStyles:!!t.package.styles,hasTheme:!!t.package.theme,source:c.source,lastModified:c.lastModified})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},$={name:"docx_get_text",description:`Get the plain text content of the document.
|
|
7
7
|
Returns all text concatenated with paragraph breaks.
|