@eigenpal/docx-js-editor 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/README.md +83 -0
  2. package/dist/{ClipboardManager-EZ0C6Onq.d.cts → ClipboardManager-B1jZrC6h.d.cts} +1 -1
  3. package/dist/{ClipboardManager-D6dkOFg6.d.ts → ClipboardManager-jqJVxB6g.d.ts} +1 -1
  4. package/dist/{DocumentAgent-BcCDg7i2.d.ts → DocumentAgent-CnJ9AEl_.d.cts} +31 -3
  5. package/dist/{DocumentAgent-B0EC8lPC.d.cts → DocumentAgent-CrbsDniO.d.ts} +31 -3
  6. package/dist/{FindReplaceDialog-AWQXKEUQ.js → FindReplaceDialog-AQFR4OCT.js} +1 -2
  7. package/dist/FindReplaceDialog-J3DI3U5I.cjs +1 -0
  8. package/dist/{FootnotePropertiesDialog-73VT2ZVZ.cjs → FootnotePropertiesDialog-DO5DCAW6.cjs} +1 -2
  9. package/dist/{FootnotePropertiesDialog-ZM3EF3EF.js → FootnotePropertiesDialog-YYIZU5U6.js} +1 -2
  10. package/dist/{HyperlinkDialog-BA25XUT5.js → HyperlinkDialog-HGZ2S37Z.js} +1 -2
  11. package/dist/HyperlinkDialog-PEPS3C2G.cjs +1 -0
  12. package/dist/{ImagePositionDialog-AIAMKPFK.js → ImagePositionDialog-DQ4JWS4F.js} +1 -2
  13. package/dist/{ImagePositionDialog-KMK7ROV2.cjs → ImagePositionDialog-UYXYHSP4.cjs} +1 -2
  14. package/dist/{ImagePropertiesDialog-ERFCUVCW.js → ImagePropertiesDialog-GJMGLM6G.js} +1 -2
  15. package/dist/{ImagePropertiesDialog-USMMRK6X.cjs → ImagePropertiesDialog-V6SVKINO.cjs} +1 -2
  16. package/dist/{TablePropertiesDialog-72CIUAZT.cjs → TablePropertiesDialog-A36OXG3A.cjs} +1 -2
  17. package/dist/{TablePropertiesDialog-EMUEVYB3.js → TablePropertiesDialog-STZOGHJB.js} +1 -2
  18. package/dist/{agentApi-BFVyKagE.d.cts → agentApi-DfsWRyrP.d.cts} +1 -1
  19. package/dist/{agentApi-BFVyKagE.d.ts → agentApi-DfsWRyrP.d.ts} +1 -1
  20. package/dist/{chunk-FDANI5P4.cjs → chunk-2VHQ7YOQ.cjs} +1 -2
  21. package/dist/chunk-2Y6FLZ5Q.js +3 -0
  22. package/dist/chunk-32HMU2UV.js +111 -0
  23. package/dist/chunk-4CUGBNL2.cjs +1 -0
  24. package/dist/chunk-5GFXHUMP.js +1 -0
  25. package/dist/chunk-6NDMKJIE.js +9 -0
  26. package/dist/chunk-6NYA53QC.cjs +258 -0
  27. package/dist/chunk-7KJ3YVDQ.js +10 -0
  28. package/dist/{chunk-JOYPFQW2.js → chunk-AARNCPWR.js} +1 -2
  29. package/dist/{chunk-4QT5LPBA.cjs → chunk-B7TICMXD.cjs} +16 -17
  30. package/dist/{chunk-2QOEHCBX.js → chunk-BUEMG4NW.js} +1 -2
  31. package/dist/{chunk-CV5WFE7K.js → chunk-CLDB6TL7.js} +2 -3
  32. package/dist/{chunk-M2T6XKT5.js → chunk-CTYOM6BE.js} +1 -2
  33. package/dist/chunk-EH3NY2DQ.cjs +26 -0
  34. package/dist/{chunk-FGVGZLBL.js → chunk-FVUGBRDD.js} +1 -2
  35. package/dist/chunk-FXJAIFPR.js +59 -0
  36. package/dist/chunk-GICVJSFJ.cjs +9 -0
  37. package/dist/{chunk-Y6VCTLCJ.js → chunk-H5NTJZO4.js} +1 -2
  38. package/dist/chunk-HT2Z33YM.cjs +111 -0
  39. package/dist/chunk-JRRTZZ72.cjs +1 -0
  40. package/dist/{chunk-T2HQYRA7.cjs → chunk-NVAQQYBJ.cjs} +1 -2
  41. package/dist/chunk-P3AEZKQO.cjs +3 -0
  42. package/dist/{chunk-GWBTKVFD.cjs → chunk-P7ZF45KZ.cjs} +1 -2
  43. package/dist/{chunk-QEBO3EQP.cjs → chunk-PCJ5ACUV.cjs} +1 -2
  44. package/dist/{chunk-Q6HUGWO6.js → chunk-PJVI53AH.js} +1 -2
  45. package/dist/chunk-Q7YYC75E.js +258 -0
  46. package/dist/{chunk-7JSPKVOW.js → chunk-QVPR2W5S.js} +1 -2
  47. package/dist/{chunk-XZNOV52K.cjs → chunk-TAF6KYDM.cjs} +4 -5
  48. package/dist/chunk-USRMBYI6.js +3 -0
  49. package/dist/chunk-UTWPV2I4.js +26 -0
  50. package/dist/{chunk-DJAEBZ33.cjs → chunk-VTAS7VZ6.cjs} +1 -2
  51. package/dist/chunk-XQNCLN4T.cjs +3 -0
  52. package/dist/{chunk-S26DZVRQ.cjs → chunk-XS2AQFMF.cjs} +1 -2
  53. package/dist/chunk-Y6QBJGMO.cjs +59 -0
  54. package/dist/{chunk-WD2HTKRR.cjs → chunk-YS7FDEZ4.cjs} +1 -2
  55. package/dist/chunk-ZTVQA46Q.js +1 -0
  56. package/dist/{clipboard-beGtyabO.d.ts → clipboard-BE8E-szx.d.ts} +1 -1
  57. package/dist/{clipboard-CqE-UZ2d.d.cts → clipboard-DkfAv07F.d.cts} +1 -1
  58. package/dist/{colorResolver-B5YbO_a4.d.ts → colorResolver-CYttioMe.d.ts} +46 -3
  59. package/dist/{colorResolver-Cu46bSKr.d.cts → colorResolver-Dr8kQZAQ.d.cts} +46 -3
  60. package/dist/core-plugins-reexport.cjs +1 -2
  61. package/dist/core-plugins-reexport.d.cts +4 -4
  62. package/dist/core-plugins-reexport.d.ts +4 -4
  63. package/dist/core-plugins-reexport.js +1 -2
  64. package/dist/core-reexport.cjs +1 -2
  65. package/dist/core-reexport.d.cts +10 -10
  66. package/dist/core-reexport.d.ts +10 -10
  67. package/dist/core-reexport.js +1 -2
  68. package/dist/executor-JGWZ7S6Z.cjs +1 -0
  69. package/dist/executor-L2MVKMXO.js +1 -0
  70. package/dist/{fontLoader-CFKpg0Ri.d.ts → fontLoader-BsqQnB4v.d.ts} +1 -1
  71. package/dist/{fontLoader-HZYfILUm.d.cts → fontLoader-DECXIoMr.d.cts} +1 -1
  72. package/dist/headless-reexport.cjs +4 -5
  73. package/dist/headless-reexport.d.cts +7 -7
  74. package/dist/headless-reexport.d.ts +7 -7
  75. package/dist/headless-reexport.js +4 -5
  76. package/dist/index.cjs +6 -7
  77. package/dist/index.css +0 -1
  78. package/dist/index.d.cts +12 -12
  79. package/dist/index.d.ts +12 -12
  80. package/dist/index.js +6 -7
  81. package/dist/lib-GD2QD2JK.js +1 -0
  82. package/dist/lib-HOLGQI5K.cjs +1 -0
  83. package/dist/mcp-reexport.cjs +9 -10
  84. package/dist/mcp-reexport.d.cts +2 -2
  85. package/dist/mcp-reexport.d.ts +2 -2
  86. package/dist/mcp-reexport.js +4 -5
  87. package/dist/{processTemplate-G37IM66O.js → processTemplate-3HN7Q3KT.js} +1 -2
  88. package/dist/processTemplate-BXZKWRQD.cjs +1 -0
  89. package/dist/{react-BjOCdeTs.d.ts → react-C6bgHDFl.d.ts} +8 -6
  90. package/dist/{react-UzAn4o7l.d.cts → react-CAlVCYa4.d.cts} +8 -6
  91. package/dist/react.cjs +1 -2
  92. package/dist/react.css +0 -1
  93. package/dist/react.d.cts +5 -5
  94. package/dist/react.d.ts +5 -5
  95. package/dist/react.js +1 -2
  96. package/dist/{registry-DjacfR6Q.d.cts → registry-BU-FbHh-.d.cts} +1 -1
  97. package/dist/{registry-CV6nYWqP.d.ts → registry-gRbkCooh.d.ts} +1 -1
  98. package/dist/selectionRects-7QU337P5.cjs +1 -0
  99. package/dist/selectionRects-V5RC2BYX.js +1 -0
  100. package/dist/styles.css +1 -1
  101. package/dist/{types-DwZ3xysp.d.ts → types-7wjInVMW.d.ts} +1 -1
  102. package/dist/{types-Bnp8rvJn.d.cts → types-DEEpBL9H.d.cts} +1 -1
  103. package/dist/ui.cjs +1 -2
  104. package/dist/ui.d.cts +32 -85
  105. package/dist/ui.d.ts +32 -85
  106. package/dist/ui.js +1 -2
  107. package/dist/{variableDetector-CMhJtM96.d.cts → variableDetector-B4oQJa2e.d.cts} +33 -2
  108. package/dist/{variableDetector-BaDeXz7D.d.ts → variableDetector-BXJaTkiB.d.ts} +33 -2
  109. package/package.json +2 -1
  110. package/dist/FindReplaceDialog-AWQXKEUQ.js.map +0 -1
  111. package/dist/FindReplaceDialog-I4SZDSVP.cjs +0 -2
  112. package/dist/FindReplaceDialog-I4SZDSVP.cjs.map +0 -1
  113. package/dist/FootnotePropertiesDialog-73VT2ZVZ.cjs.map +0 -1
  114. package/dist/FootnotePropertiesDialog-ZM3EF3EF.js.map +0 -1
  115. package/dist/HyperlinkDialog-BA25XUT5.js.map +0 -1
  116. package/dist/HyperlinkDialog-V63LPOT2.cjs +0 -2
  117. package/dist/HyperlinkDialog-V63LPOT2.cjs.map +0 -1
  118. package/dist/ImagePositionDialog-AIAMKPFK.js.map +0 -1
  119. package/dist/ImagePositionDialog-KMK7ROV2.cjs.map +0 -1
  120. package/dist/ImagePropertiesDialog-ERFCUVCW.js.map +0 -1
  121. package/dist/ImagePropertiesDialog-USMMRK6X.cjs.map +0 -1
  122. package/dist/TablePropertiesDialog-72CIUAZT.cjs.map +0 -1
  123. package/dist/TablePropertiesDialog-EMUEVYB3.js.map +0 -1
  124. package/dist/chunk-2CHPKB5A.cjs +0 -112
  125. package/dist/chunk-2CHPKB5A.cjs.map +0 -1
  126. package/dist/chunk-2QOEHCBX.js.map +0 -1
  127. package/dist/chunk-4QT5LPBA.cjs.map +0 -1
  128. package/dist/chunk-5DYSI4O4.cjs +0 -60
  129. package/dist/chunk-5DYSI4O4.cjs.map +0 -1
  130. package/dist/chunk-5FJXHXFV.cjs +0 -2
  131. package/dist/chunk-5FJXHXFV.cjs.map +0 -1
  132. package/dist/chunk-6FEWNF6B.js +0 -4
  133. package/dist/chunk-6FEWNF6B.js.map +0 -1
  134. package/dist/chunk-6LF5HZCV.js +0 -10
  135. package/dist/chunk-6LF5HZCV.js.map +0 -1
  136. package/dist/chunk-7JSPKVOW.js.map +0 -1
  137. package/dist/chunk-C33XDRDJ.cjs +0 -28
  138. package/dist/chunk-C33XDRDJ.cjs.map +0 -1
  139. package/dist/chunk-CV5WFE7K.js.map +0 -1
  140. package/dist/chunk-CXJRNISO.js +0 -2
  141. package/dist/chunk-CXJRNISO.js.map +0 -1
  142. package/dist/chunk-DJAEBZ33.cjs.map +0 -1
  143. package/dist/chunk-DP6Q75ZD.js +0 -28
  144. package/dist/chunk-DP6Q75ZD.js.map +0 -1
  145. package/dist/chunk-FDANI5P4.cjs.map +0 -1
  146. package/dist/chunk-FGVGZLBL.js.map +0 -1
  147. package/dist/chunk-GJ4GKSDU.cjs +0 -2
  148. package/dist/chunk-GJ4GKSDU.cjs.map +0 -1
  149. package/dist/chunk-GWBTKVFD.cjs.map +0 -1
  150. package/dist/chunk-JOYPFQW2.js.map +0 -1
  151. package/dist/chunk-L54YNLSE.js +0 -2
  152. package/dist/chunk-L54YNLSE.js.map +0 -1
  153. package/dist/chunk-LPGMLJMO.js +0 -259
  154. package/dist/chunk-LPGMLJMO.js.map +0 -1
  155. package/dist/chunk-M2T6XKT5.js.map +0 -1
  156. package/dist/chunk-OHG7ROFC.js +0 -11
  157. package/dist/chunk-OHG7ROFC.js.map +0 -1
  158. package/dist/chunk-PANKMCFX.cjs +0 -4
  159. package/dist/chunk-PANKMCFX.cjs.map +0 -1
  160. package/dist/chunk-Q6HUGWO6.js.map +0 -1
  161. package/dist/chunk-QDV75OJ4.js +0 -112
  162. package/dist/chunk-QDV75OJ4.js.map +0 -1
  163. package/dist/chunk-QEBO3EQP.cjs.map +0 -1
  164. package/dist/chunk-QVIZ775M.cjs +0 -259
  165. package/dist/chunk-QVIZ775M.cjs.map +0 -1
  166. package/dist/chunk-RMUMR42R.cjs +0 -10
  167. package/dist/chunk-RMUMR42R.cjs.map +0 -1
  168. package/dist/chunk-S26DZVRQ.cjs.map +0 -1
  169. package/dist/chunk-T2HQYRA7.cjs.map +0 -1
  170. package/dist/chunk-ULXNEG66.js +0 -60
  171. package/dist/chunk-ULXNEG66.js.map +0 -1
  172. package/dist/chunk-WD2HTKRR.cjs.map +0 -1
  173. package/dist/chunk-XZNOV52K.cjs.map +0 -1
  174. package/dist/chunk-Y6VCTLCJ.js.map +0 -1
  175. package/dist/core-plugins-reexport.cjs.map +0 -1
  176. package/dist/core-plugins-reexport.js.map +0 -1
  177. package/dist/core-reexport.cjs.map +0 -1
  178. package/dist/core-reexport.js.map +0 -1
  179. package/dist/executor-K5RXUTTR.js +0 -2
  180. package/dist/executor-K5RXUTTR.js.map +0 -1
  181. package/dist/executor-XIPIU3H4.cjs +0 -2
  182. package/dist/executor-XIPIU3H4.cjs.map +0 -1
  183. package/dist/headless-reexport.cjs.map +0 -1
  184. package/dist/headless-reexport.js.map +0 -1
  185. package/dist/index.cjs.map +0 -1
  186. package/dist/index.css.map +0 -1
  187. package/dist/index.js.map +0 -1
  188. package/dist/mcp-reexport.cjs.map +0 -1
  189. package/dist/mcp-reexport.js.map +0 -1
  190. package/dist/processTemplate-G37IM66O.js.map +0 -1
  191. package/dist/processTemplate-RFBGVH7T.cjs +0 -2
  192. package/dist/processTemplate-RFBGVH7T.cjs.map +0 -1
  193. package/dist/react.cjs.map +0 -1
  194. package/dist/react.css.map +0 -1
  195. package/dist/react.js.map +0 -1
  196. package/dist/selectionRects-6DU7HN7E.js +0 -2
  197. package/dist/selectionRects-6DU7HN7E.js.map +0 -1
  198. package/dist/selectionRects-YZSC24ZP.cjs +0 -2
  199. package/dist/selectionRects-YZSC24ZP.cjs.map +0 -1
  200. package/dist/ui.cjs.map +0 -1
  201. package/dist/ui.js.map +0 -1
@@ -0,0 +1,59 @@
1
+ import {a as a$2}from'./chunk-UTWPV2I4.js';import {a as a$1}from'./chunk-USRMBYI6.js';import {c}from'./chunk-H5NTJZO4.js';function a(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function le(e){if(!e)return "";let t=[];return e.auto?t.push('w:val="auto"'):e.rgb&&t.push(`w:val="${e.rgb}"`),e.themeColor&&t.push(`w:themeColor="${e.themeColor}"`),e.themeTint&&t.push(`w:themeTint="${e.themeTint}"`),e.themeShade&&t.push(`w:themeShade="${e.themeShade}"`),t.length===0?"":`<w:color ${t.join(" ")}/>`}function ce(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function b(e){if(!e)return "";let t=[];if(e.styleId&&t.push(`<w:rStyle w:val="${a(e.styleId)}"/>`),e.fontFamily){let i=[];e.fontFamily.ascii&&i.push(`w:ascii="${a(e.fontFamily.ascii)}"`),e.fontFamily.hAnsi&&i.push(`w:hAnsi="${a(e.fontFamily.hAnsi)}"`),e.fontFamily.eastAsia&&i.push(`w:eastAsia="${a(e.fontFamily.eastAsia)}"`),e.fontFamily.cs&&i.push(`w:cs="${a(e.fontFamily.cs)}"`),e.fontFamily.asciiTheme&&i.push(`w:asciiTheme="${e.fontFamily.asciiTheme}"`),e.fontFamily.hAnsiTheme&&i.push(`w:hAnsiTheme="${e.fontFamily.hAnsiTheme}"`),e.fontFamily.eastAsiaTheme&&i.push(`w:eastAsiaTheme="${e.fontFamily.eastAsiaTheme}"`),e.fontFamily.csTheme&&i.push(`w:csTheme="${e.fontFamily.csTheme}"`),i.length>0&&t.push(`<w:rFonts ${i.join(" ")}/>`);}e.bold===true?t.push("<w:b/>"):e.bold===false&&t.push('<w:b w:val="0"/>'),e.boldCs===true?t.push("<w:bCs/>"):e.boldCs===false&&t.push('<w:bCs w:val="0"/>'),e.italic===true?t.push("<w:i/>"):e.italic===false&&t.push('<w:i w:val="0"/>'),e.italicCs===true?t.push("<w:iCs/>"):e.italicCs===false&&t.push('<w:iCs w:val="0"/>'),e.allCaps&&t.push("<w:caps/>"),e.smallCaps&&t.push("<w:smallCaps/>"),e.strike&&t.push("<w:strike/>"),e.doubleStrike&&t.push("<w:dstrike/>"),e.outline&&t.push("<w:outline/>"),e.shadow&&t.push("<w:shadow/>"),e.emboss&&t.push("<w:emboss/>"),e.imprint&&t.push("<w:imprint/>"),e.hidden&&t.push("<w:vanish/>");let n=le(e.color);if(n&&t.push(n),e.spacing!==void 0&&t.push(`<w:spacing w:val="${e.spacing}"/>`),e.scale!==void 0&&t.push(`<w:w w:val="${e.scale}"/>`),e.kerning!==void 0&&t.push(`<w:kern w:val="${e.kerning}"/>`),e.position!==void 0&&t.push(`<w:position w:val="${e.position}"/>`),e.fontSize!==void 0&&t.push(`<w:sz w:val="${e.fontSize}"/>`),e.fontSizeCs!==void 0&&t.push(`<w:szCs w:val="${e.fontSizeCs}"/>`),e.highlight&&e.highlight!=="none"&&new Set(["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","red","white","yellow"]).has(e.highlight)&&t.push(`<w:highlight w:val="${e.highlight}"/>`),e.underline){let i=[`w:val="${e.underline.style}"`];e.underline.color&&(e.underline.color.rgb&&i.push(`w:color="${e.underline.color.rgb}"`),e.underline.color.themeColor&&i.push(`w:themeColor="${e.underline.color.themeColor}"`),e.underline.color.themeTint&&i.push(`w:themeTint="${e.underline.color.themeTint}"`),e.underline.color.themeShade&&i.push(`w:themeShade="${e.underline.color.themeShade}"`)),t.push(`<w:u ${i.join(" ")}/>`);}e.effect&&e.effect!=="none"&&t.push(`<w:effect w:val="${e.effect}"/>`),e.emphasisMark&&e.emphasisMark!=="none"&&t.push(`<w:em w:val="${e.emphasisMark}"/>`);let r=ce(e.shading);return r&&t.push(r),e.vertAlign&&e.vertAlign!=="baseline"&&t.push(`<w:vertAlign w:val="${e.vertAlign}"/>`),e.rtl&&t.push("<w:rtl/>"),e.cs&&t.push("<w:cs/>"),t.length===0?"":`<w:rPr>${t.join("")}</w:rPr>`}function pe(e){return !e.startsWith("<w:rPr>")||!e.endsWith("</w:rPr>")?"":e.slice(7,-8)}function fe(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.info.date=="string"?e.info.date.trim():void 0,o=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,l=[`w:id="${t}"`,`w:author="${a(r)}"`];i&&l.push(`w:date="${a(i)}"`),o&&l.push(`w:rsid="${a(o)}"`);let s=b(e.previousFormatting)||"<w:rPr/>";return `<w:rPrChange ${l.join(" ")}>${s}</w:rPrChange>`}function ue(e,t){let n=b(e),r=n?pe(n):"",i=(t??[]).map(fe).join(""),o=`${r}${i}`;return o?`<w:rPr>${o}</w:rPr>`:""}function me(e){return `<w:t${e.preserveSpace||e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${a(e.text)}</w:t>`}function he(e){return "<w:tab/>"}function de(e){let t=[];return e.breakType==="page"?t.push('w:type="page"'):e.breakType==="column"?t.push('w:type="column"'):e.breakType==="textWrapping"&&(t.push('w:type="textWrapping"'),e.clear&&e.clear!=="none"&&t.push(`w:clear="${e.clear}"`)),t.length===0?"<w:br/>":`<w:br ${t.join(" ")}/>`}function we(e){return `<w:sym w:font="${a(e.font)}" w:char="${a(e.char)}"/>`}function ge(e){return e.type==="footnoteRef"?`<w:footnoteReference w:id="${e.id}"/>`:`<w:endnoteReference w:id="${e.id}"/>`}function ye(e){let t=[`w:fldCharType="${e.charType}"`];return e.fldLock&&t.push('w:fldLock="true"'),e.dirty&&t.push('w:dirty="true"'),`<w:fldChar ${t.join(" ")}/>`}function xe(e){return `<w:instrText${e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${a(e.text)}</w:instrText>`}function $e(e){return "<w:softHyphen/>"}function Te(e){return "<w:noBreakHyphen/>"}function k(e){if(!e)return "";if(e.rgb)return `<a:srgbClr val="${e.rgb.replace("#","")}"/>`;if(e.themeColor){let t=`<a:schemeClr val="${e.themeColor}"`;return e.themeTint?t+=`><a:tint val="${e.themeTint}"/></a:schemeClr>`:e.themeShade?t+=`><a:shade val="${e.themeShade}"/></a:schemeClr>`:t+="/>",t}return ""}function Pe(e){if(!e||e.type==="none")return "<a:noFill/>";if(e.type==="solid"&&e.color)return `<a:solidFill>${k(e.color)}</a:solidFill>`;if(e.type==="gradient"&&e.gradient){let t=e.gradient,n=t.stops.map(i=>`<a:gs pos="${i.position}">${k(i.color)}</a:gs>`).join(""),r=t.type==="linear"?`<a:lin ang="${(t.angle||0)*6e4}" scaled="1"/>`:"";return `<a:gradFill><a:gsLst>${n}</a:gsLst>${r}</a:gradFill>`}return ""}function X(e){if(!e)return "";let t=[];e.width!=null&&t.push(`w="${e.width}"`),e.cap&&t.push(`cap="${e.cap}"`);let n=[];return e.color&&n.push(`<a:solidFill>${k(e.color)}</a:solidFill>`),e.style&&e.style!=="solid"&&n.push(`<a:prstDash val="${e.style}"/>`),e.headEnd&&n.push(`<a:headEnd type="${e.headEnd.type}"${e.headEnd.width?` w="${e.headEnd.width}"`:""}${e.headEnd.length?` len="${e.headEnd.length}"`:""}/>`),e.tailEnd&&n.push(`<a:tailEnd type="${e.tailEnd.type}"${e.tailEnd.width?` w="${e.tailEnd.width}"`:""}${e.tailEnd.length?` len="${e.tailEnd.length}"`:""}/>`),n.length===0&&t.length===0?"":`<a:ln${t.length?" "+t.join(" "):""}>${n.join("")}</a:ln>`}function L(e){let t=[],n=e.horizontal;t.push(`<wp:positionH relativeFrom="${n.relativeTo}">`),n.alignment?t.push(`<wp:align>${n.alignment}</wp:align>`):t.push(`<wp:posOffset>${n.posOffset||0}</wp:posOffset>`),t.push("</wp:positionH>");let r=e.vertical;return t.push(`<wp:positionV relativeFrom="${r.relativeTo}">`),r.alignment?t.push(`<wp:align>${r.alignment}</wp:align>`):t.push(`<wp:posOffset>${r.posOffset||0}</wp:posOffset>`),t.push("</wp:positionV>"),t.join("")}function O(e){let t=e.wrapText?` wrapText="${e.wrapText}"`:' wrapText="bothSides"';switch(e.type){case "square":return `<wp:wrapSquare${t}/>`;case "tight":return `<wp:wrapTight${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;case "through":return `<wp:wrapThrough${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`;case "topAndBottom":return "<wp:wrapTopAndBottom/>";case "behind":case "inFront":return "<wp:wrapNone/>";default:return "<wp:wrapNone/>"}}function be(e){let t=e.size.width,n=e.size.height,r=e.rId||"rId1",i=e.id||"0",o=e.filename||`image${i}`,l="";return e.transform?.rotation&&(l+=` rot="${Math.round(e.transform.rotation*6e4)}"`),e.transform?.flipH&&(l+=' flipH="1"'),e.transform?.flipV&&(l+=' flipV="1"'),['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">','<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">',"<pic:nvPicPr>",`<pic:cNvPr id="${i}" name="${a(o)}"${e.alt?` descr="${a(e.alt)}"`:""}/>`,"<pic:cNvPicPr/>","</pic:nvPicPr>","<pic:blipFill>",`<a:blip r:embed="${r}"/>`,"<a:stretch><a:fillRect/></a:stretch>","</pic:blipFill>","<pic:spPr>",`<a:xfrm${l}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${t}" cy="${n}"/>`,"</a:xfrm>",'<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>',e.outline?X(e.outline):"","</pic:spPr>","</pic:pic>","</a:graphicData>","</a:graphic>"].join("")}function ve(e){let t=e.image,n=t.wrap.type!=="inline",r=t.size.width,i=t.size.height,o=t.padding?.top??t.wrap.distT??0,l=t.padding?.bottom??t.wrap.distB??0,s=t.padding?.left??t.wrap.distL??0,p=t.padding?.right??t.wrap.distR??0,c=t.id||"1",f=t.title||t.filename||`Picture ${c}`,m=be(t);if(!n)return ["<w:drawing>",`<wp:inline distT="${o}" distB="${l}" distL="${s}" distR="${p}">`,`<wp:extent cx="${r}" cy="${i}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',`<wp:docPr id="${c}" name="${a(f)}"${t.alt?` descr="${a(t.alt)}"`:""}${t.decorative?' hidden="1"':""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',m,"</wp:inline>","</w:drawing>"].join("");let u=t.wrap.type==="behind"?"1":"0",h=t.position?L(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',g=O(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${o}" distB="${l}" distL="${s}" distR="${p}" simplePos="0" relativeHeight="251658240" behindDoc="${u}" locked="0" layoutInCell="1" allowOverlap="1">`,'<wp:simplePos x="0" y="0"/>',h,`<wp:extent cx="${r}" cy="${i}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',g,`<wp:docPr id="${c}" name="${a(f)}"${t.alt?` descr="${a(t.alt)}"`:""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',m,"</wp:anchor>","</w:drawing>"].join("")}function Ce(e){return e.map(t=>$(t)).join("")}function Fe(e){let t=e.shape,n=t.size.width,r=t.size.height,i=t.shapeType==="textBox",o=t.wrap&&t.wrap.type!=="inline",l=t.wrap?.distT??0,s=t.wrap?.distB??0,p=t.wrap?.distL??0,c=t.wrap?.distR??0,f=t.id||"1",m=t.name||(i?`TextBox ${f}`:`Shape ${f}`),u="";t.transform?.rotation&&(u+=` rot="${Math.round(t.transform.rotation*6e4)}"`),t.transform?.flipH&&(u+=' flipH="1"'),t.transform?.flipV&&(u+=' flipV="1"');let h=["<wps:spPr>",`<a:xfrm${u}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${n}" cy="${r}"/>`,"</a:xfrm>",`<a:prstGeom prst="${t.shapeType==="textBox"?"rect":t.shapeType}"><a:avLst/></a:prstGeom>`,Pe(t.fill),X(t.outline),"</wps:spPr>"].join(""),g="";if(t.textBody){let d=t.textBody,x=['rot="0"','vert="horz"'];d.anchor&&x.push(`anchor="${d.anchor==="middle"?"ctr":d.anchor}"`),d.anchorCenter&&x.push('anchorCtr="1"'),d.margins&&(d.margins.left!=null&&x.push(`lIns="${d.margins.left}"`),d.margins.top!=null&&x.push(`tIns="${d.margins.top}"`),d.margins.right!=null&&x.push(`rIns="${d.margins.right}"`),d.margins.bottom!=null&&x.push(`bIns="${d.margins.bottom}"`)),i?g=["<wps:txbx><w:txbxContent>",Ce(d.content),"</w:txbxContent></wps:txbx>",`<wps:bodyPr ${x.join(" ")}/>`].join(""):g=[`<wps:bodyPr ${x.join(" ")}/>`].join("");}let j=['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">',["<wps:wsp>",`<wps:cNvSpPr${i?' txBox="1"':""}/>`,h,g,"</wps:wsp>"].join(""),"</a:graphicData>","</a:graphic>"].join("");if(!o)return ["<w:drawing>",`<wp:inline distT="${l}" distB="${s}" distL="${p}" distR="${c}">`,`<wp:extent cx="${n}" cy="${r}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',`<wp:docPr id="${f}" name="${a(m)}"/>`,"<wp:cNvGraphicFramePr/>",j,"</wp:inline>","</w:drawing>"].join("");let re=t.wrap?.type==="behind"?"1":"0",ie=t.position?L(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',oe=O(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${l}" distB="${s}" distL="${p}" distR="${c}" simplePos="0" relativeHeight="251658240" behindDoc="${re}" locked="0" layoutInCell="1" allowOverlap="1">`,'<wp:simplePos x="0" y="0"/>',ie,`<wp:extent cx="${n}" cy="${r}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',oe,`<wp:docPr id="${f}" name="${a(m)}"/>`,"<wp:cNvGraphicFramePr/>",j,"</wp:anchor>","</w:drawing>"].join("")}function Se(e){switch(e.type){case "text":return me(e);case "tab":return he();case "break":return de(e);case "symbol":return we(e);case "footnoteRef":case "endnoteRef":return ge(e);case "fieldChar":return ye(e);case "instrText":return xe(e);case "softHyphen":return $e();case "noBreakHyphen":return Te();case "drawing":return ve(e);case "shape":return Fe(e);default:return ""}}function y(e){let t=[],n=ue(e.formatting,e.propertyChanges);n&&t.push(n);for(let r of e.content){let i=Se(r);i&&t.push(i);}return `<w:r>${t.join("")}</w:r>`}function v(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${e.size}"`),e.space!==void 0&&n.push(`w:space="${e.space}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function Re(e){if(!e)return "";let t=[];if(e.top){let n=v(e.top,"top");n&&t.push(n);}if(e.left){let n=v(e.left,"left");n&&t.push(n);}if(e.bottom){let n=v(e.bottom,"bottom");n&&t.push(n);}if(e.right){let n=v(e.right,"right");n&&t.push(n);}if(e.between){let n=v(e.between,"between");n&&t.push(n);}if(e.bar){let n=v(e.bar,"bar");n&&t.push(n);}return t.length===0?"":`<w:pBdr>${t.join("")}</w:pBdr>`}function ze(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function Ae(e){return !e||e.length===0?"":`<w:tabs>${e.map(n=>{let r=[`w:val="${n.alignment}"`,`w:pos="${n.position}"`];return n.leader&&n.leader!=="none"&&r.push(`w:leader="${n.leader}"`),`<w:tab ${r.join(" ")}/>`}).join("")}</w:tabs>`}function De(e){let t=[];return e.spaceBefore!==void 0&&t.push(`w:before="${e.spaceBefore}"`),e.spaceAfter!==void 0&&t.push(`w:after="${e.spaceAfter}"`),e.lineSpacing!==void 0&&t.push(`w:line="${e.lineSpacing}"`),e.lineSpacingRule&&t.push(`w:lineRule="${e.lineSpacingRule}"`),e.beforeAutospacing&&t.push('w:beforeAutospacing="1"'),e.afterAutospacing&&t.push('w:afterAutospacing="1"'),t.length===0?"":`<w:spacing ${t.join(" ")}/>`}function ke(e){let t=[];return e.indentLeft!==void 0&&t.push(`w:left="${e.indentLeft}"`),e.indentRight!==void 0&&t.push(`w:right="${e.indentRight}"`),e.indentFirstLine!==void 0&&(e.hangingIndent?t.push(`w:hanging="${Math.abs(e.indentFirstLine)}"`):e.indentFirstLine!==0&&t.push(`w:firstLine="${e.indentFirstLine}"`)),t.length===0?"":`<w:ind ${t.join(" ")}/>`}function Ie(e){if(!e)return "";let t=[];return e.ilvl!==void 0&&t.push(`<w:ilvl w:val="${e.ilvl}"/>`),e.numId!==void 0&&t.push(`<w:numId w:val="${e.numId}"/>`),t.length===0?"":`<w:numPr>${t.join("")}</w:numPr>`}function Be(e){if(!e)return "";let t=[];return e.width!==void 0&&t.push(`w:w="${e.width}"`),e.height!==void 0&&t.push(`w:h="${e.height}"`),e.hAnchor&&t.push(`w:hAnchor="${e.hAnchor}"`),e.vAnchor&&t.push(`w:vAnchor="${e.vAnchor}"`),e.x!==void 0&&t.push(`w:x="${e.x}"`),e.y!==void 0&&t.push(`w:y="${e.y}"`),e.xAlign&&t.push(`w:xAlign="${e.xAlign}"`),e.yAlign&&t.push(`w:yAlign="${e.yAlign}"`),e.wrap&&t.push(`w:wrap="${e.wrap}"`),t.length===0?"":`<w:framePr ${t.join(" ")}/>`}function H(e,t){let n=[];if(e){e.styleId&&n.push(`<w:pStyle w:val="${a(e.styleId)}"/>`),e.keepNext&&n.push("<w:keepNext/>"),e.keepLines&&n.push("<w:keepLines/>"),e.contextualSpacing&&n.push("<w:contextualSpacing/>"),e.pageBreakBefore&&n.push("<w:pageBreakBefore/>");let r=Be(e.frame);r&&n.push(r),e.widowControl===false?n.push('<w:widowControl w:val="0"/>'):e.widowControl===true&&n.push("<w:widowControl/>");let i=Ie(e.numPr);i&&n.push(i);let o=Re(e.borders);o&&n.push(o);let l=ze(e.shading);l&&n.push(l);let s=Ae(e.tabs);s&&n.push(s),e.suppressLineNumbers&&n.push("<w:suppressLineNumbers/>"),e.suppressAutoHyphens&&n.push("<w:suppressAutoHyphens/>");let p=De(e);p&&n.push(p);let c=ke(e);if(c&&n.push(c),e.bidi&&n.push("<w:bidi/>"),e.alignment&&n.push(`<w:jc w:val="${e.alignment}"/>`),e.outlineLevel!==void 0&&n.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`),e.runProperties){let f=b(e.runProperties);f&&n.push(f);}}return t&&t.length>0&&n.push(...t.map(r=>je(r))),n.length===0?"":`<w:pPr>${n.join("")}</w:pPr>`}function Ee(e){return !e.startsWith("<w:pPr>")||!e.endsWith("</w:pPr>")?"":e.slice(7,-8)}function je(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.info.date=="string"?e.info.date.trim():void 0,o=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,l=[`w:id="${t}"`,`w:author="${a(r)}"`];i&&l.push(`w:date="${a(i)}"`),o&&l.push(`w:rsid="${a(o)}"`);let s=H(e.previousFormatting)||"<w:pPr/>",p=Ee(s),c=p.length>0?`<w:pPr>${p}</w:pPr>`:"<w:pPr/>";return `<w:pPrChange ${l.join(" ")}>${c}</w:pPrChange>`}function I(e){let t=[];e.rId&&t.push(`r:id="${e.rId}"`),e.anchor&&t.push(`w:anchor="${a(e.anchor)}"`),e.tooltip&&t.push(`w:tooltip="${a(e.tooltip)}"`),e.target&&t.push(`w:tgtFrame="${a(e.target)}"`),e.history===false&&t.push('w:history="0"'),e.docLocation&&t.push(`w:docLocation="${a(e.docLocation)}"`);let n=e.children.map(i=>i.type==="run"?y(i):i.type==="bookmarkStart"?N(i):i.type==="bookmarkEnd"?W(i):"").join("");return `<w:hyperlink${t.length>0?" "+t.join(" "):""}>${n}</w:hyperlink>`}function N(e){let t=[`w:id="${e.id}"`,`w:name="${a(e.name)}"`];return e.colFirst!==void 0&&t.push(`w:colFirst="${e.colFirst}"`),e.colLast!==void 0&&t.push(`w:colLast="${e.colLast}"`),`<w:bookmarkStart ${t.join(" ")}/>`}function W(e){return `<w:bookmarkEnd w:id="${e.id}"/>`}function Xe(e){let t=[],n=e.content.find(s=>s.type==="run"),r=n?.formatting?b(n.formatting):"",i=['w:fldCharType="begin"'];e.fldLock&&i.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`);let l=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${l}>${a(e.instruction)}</w:instrText></w:r>`),t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`);for(let s of e.content)s.type==="run"&&t.push(y(s));return t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function Le(e){let t=[],n=e.fieldResult?.[0]?.formatting,r=n?b(n):"",i=['w:fldCharType="begin"'];if(e.fldLock&&i.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`),e.fieldCode.length>0)t.push(...e.fieldCode.map(o=>y(o)));else {let l=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${l}>${a(e.instruction)}</w:instrText></w:r>`);}return t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`),t.push(...e.fieldResult.map(o=>y(o))),t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function Oe(e){let t=e.properties,n=[];switch(t.alias&&n.push(`<w:alias w:val="${a(t.alias)}"/>`),t.tag&&n.push(`<w:tag w:val="${a(t.tag)}"/>`),t.lock&&t.lock!=="unlocked"&&n.push(`<w:lock w:val="${t.lock}"/>`),t.showingPlaceholder&&n.push("<w:showingPlcHdr/>"),t.sdtType){case "plainText":n.push("<w:text/>");break;case "date":t.dateFormat?n.push(`<w:date w:fullDate="${a(t.dateFormat)}"/>`):n.push("<w:date/>");break;case "dropdown":{let i=(t.listItems??[]).map(o=>`<w:listItem w:displayText="${a(o.displayText)}" w:value="${a(o.value)}"/>`).join("");n.push(`<w:dropDownList>${i}</w:dropDownList>`);break}case "comboBox":{let i=(t.listItems??[]).map(o=>`<w:listItem w:displayText="${a(o.displayText)}" w:value="${a(o.value)}"/>`).join("");n.push(`<w:comboBox>${i}</w:comboBox>`);break}case "checkbox":n.push(`<w14:checkbox><w14:checked w14:val="${t.checked?"1":"0"}"/></w14:checkbox>`);break;case "picture":n.push("<w:picture/>");break}let r=e.content.map(i=>i.type==="run"?y(i):i.type==="hyperlink"?I(i):"").join("");return `<w:sdt><w:sdtPr>${n.join("")}</w:sdtPr><w:sdtContent>${r}</w:sdtContent></w:sdt>`}function M(e,t){let n=[`w:id="${t.id}"`,`w:name="${a(t.name)}"`];return `<w:${e} ${n.join(" ")}/>`}function A(e,t){let n=t.info,r=Number.isInteger(n.id)&&n.id>=0?n.id:0,i=typeof n.author=="string"?n.author.trim():"",o=i.length>0?i:"Unknown",l=typeof n.date=="string"?n.date.trim():void 0,s=[`w:id="${r}"`,`w:author="${a(o)}"`];l&&s.push(`w:date="${a(l)}"`);let p=t.content.map(c=>c.type==="run"?e==="del"||e==="moveFrom"?y(c).replace(/<w:t\b/g,"<w:delText").replace(/<\/w:t>/g,"</w:delText>").replace(/<w:instrText\b/g,"<w:delInstrText").replace(/<\/w:instrText>/g,"</w:delInstrText>"):y(c):c.type==="hyperlink"?I(c):"").join("");return `<w:${e} ${s.join(" ")}>${p}</w:${e}>`}function Me(e){switch(e.type){case "run":return y(e);case "hyperlink":return I(e);case "bookmarkStart":return N(e);case "bookmarkEnd":return W(e);case "simpleField":return Xe(e);case "complexField":return Le(e);case "inlineSdt":return Oe(e);case "commentRangeStart":return `<w:commentRangeStart w:id="${e.id}"/>`;case "commentRangeEnd":return `<w:commentRangeEnd w:id="${e.id}"/><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="${e.id}"/></w:r>`;case "insertion":return A("ins",e);case "deletion":return A("del",e);case "moveFrom":return A("moveFrom",e);case "moveTo":return A("moveTo",e);case "moveFromRangeStart":return M("moveFromRangeStart",e);case "moveFromRangeEnd":return `<w:moveFromRangeEnd w:id="${e.id}"/>`;case "moveToRangeStart":return M("moveToRangeStart",e);case "moveToRangeEnd":return `<w:moveToRangeEnd w:id="${e.id}"/>`;case "mathEquation":return e.ommlXml||"";default:return ""}}function $(e){let t=[],n=[];e.paraId&&n.push(`w14:paraId="${e.paraId}"`),e.textId&&n.push(`w14:textId="${e.textId}"`);let r=n.length>0?" "+n.join(" "):"",i=H(e.formatting,e.propertyChanges);i&&t.push(i);for(let o of e.content){let l=Me(o);l&&t.push(l);}return `<w:p${r}>${t.join("")}</w:p>`}function He(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"?e.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.date=="string"?e.date.trim():void 0;return {id:t,author:r,date:i}}function P(e,t){let n=He(e),r=[`w:id="${n.id}"`,`w:author="${a(n.author)}"`];return n.date&&r.push(`w:date="${a(n.date)}"`),t&&t.trim().length>0&&r.push(`w:rsid="${a(t.trim())}"`),r.join(" ")}function T(e,t){if(!e)return "";let n=[`w:w="${e.value}"`,`w:type="${e.type}"`];return `<w:${t} ${n.join(" ")}/>`}function C(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${e.size}"`),e.space!==void 0&&n.push(`w:space="${e.space}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function _(e,t){if(!e)return "";let n=[];if(e.top){let r=C(e.top,"top");r&&n.push(r);}if(e.left){let r=C(e.left,"left");r&&n.push(r);}if(e.bottom){let r=C(e.bottom,"bottom");r&&n.push(r);}if(e.right){let r=C(e.right,"right");r&&n.push(r);}if(e.insideH){let r=C(e.insideH,"insideH");r&&n.push(r);}if(e.insideV){let r=C(e.insideV,"insideV");r&&n.push(r);}return n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function G(e,t){if(!e)return "";let n=[];return e.top&&n.push(T(e.top,"top")),e.left&&n.push(T(e.left,"left")),e.bottom&&n.push(T(e.bottom,"bottom")),e.right&&n.push(T(e.right,"right")),n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function V(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function Ne(e){if(!e)return "";let t=[];return e.firstRow&&t.push('w:firstRow="1"'),e.lastRow&&t.push('w:lastRow="1"'),e.firstColumn&&t.push('w:firstColumn="1"'),e.lastColumn&&t.push('w:lastColumn="1"'),e.noHBand&&t.push('w:noHBand="1"'),e.noVBand&&t.push('w:noVBand="1"'),t.length===0?"":`<w:tblLook ${t.join(" ")}/>`}function We(e){if(!e)return "";let t=[];return e.horzAnchor&&t.push(`w:horzAnchor="${e.horzAnchor}"`),e.vertAnchor&&t.push(`w:vertAnchor="${e.vertAnchor}"`),e.tblpX!==void 0&&t.push(`w:tblpX="${e.tblpX}"`),e.tblpXSpec&&t.push(`w:tblpXSpec="${e.tblpXSpec}"`),e.tblpY!==void 0&&t.push(`w:tblpY="${e.tblpY}"`),e.tblpYSpec&&t.push(`w:tblpYSpec="${e.tblpYSpec}"`),e.topFromText!==void 0&&t.push(`w:topFromText="${e.topFromText}"`),e.bottomFromText!==void 0&&t.push(`w:bottomFromText="${e.bottomFromText}"`),e.leftFromText!==void 0&&t.push(`w:leftFromText="${e.leftFromText}"`),e.rightFromText!==void 0&&t.push(`w:rightFromText="${e.rightFromText}"`),t.length===0?"":`<w:tblpPr ${t.join(" ")}/>`}function U(e,t){let n=[];if(e){e.styleId&&n.push(`<w:tblStyle w:val="${a(e.styleId)}"/>`);let r=We(e.floating);r&&n.push(r),e.bidi&&n.push("<w:bidiVisual/>");let i=T(e.width,"tblW");i&&n.push(i),e.justification&&n.push(`<w:jc w:val="${e.justification}"/>`);let o=T(e.cellSpacing,"tblCellSpacing");o&&n.push(o);let l=T(e.indent,"tblInd");l&&n.push(l);let s=_(e.borders,"tblBorders");s&&n.push(s);let p=G(e.cellMargins,"tblCellMar");p&&n.push(p),e.layout&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);let c=V(e.shading);c&&n.push(c);let f=Ne(e.look);f&&n.push(f),e.overlap&&n.push(`<w:tblOverlap w:val="${e.overlap}"/>`);}return t&&t.length>0&&n.push(...t.map(r=>Ge(r))),n.length===0?"":`<w:tblPr>${n.join("")}</w:tblPr>`}function _e(e){return !e.startsWith("<w:tblPr>")||!e.endsWith("</w:tblPr>")?"":e.slice(9,-10)}function Ge(e){let t=P(e.info,e.info.rsid),n=U(e.previousFormatting)||"<w:tblPr/>",r=_e(n),i=r.length>0?`<w:tblPr>${r}</w:tblPr>`:"<w:tblPr/>";return `<w:tblPrChange ${t}>${i}</w:tblPrChange>`}function Z(e,t,n){let r=[];if(e){if(e.cantSplit&&r.push("<w:cantSplit/>"),e.header&&r.push("<w:tblHeader/>"),e.height){let i=[`w:val="${e.height.value}"`];e.heightRule&&i.push(`w:hRule="${e.heightRule}"`),r.push(`<w:trHeight ${i.join(" ")}/>`);}e.justification&&r.push(`<w:jc w:val="${e.justification}"/>`),e.hidden&&r.push("<w:hidden/>");}return n&&(n.type==="tableRowInsertion"?r.push(`<w:ins ${P(n.info)}/>`):n.type==="tableRowDeletion"&&r.push(`<w:del ${P(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(i=>Ue(i))),r.length===0?"":`<w:trPr>${r.join("")}</w:trPr>`}function Ve(e){return !e.startsWith("<w:trPr>")||!e.endsWith("</w:trPr>")?"":e.slice(8,-9)}function Ue(e){let t=P(e.info,e.info.rsid),n=Z(e.previousFormatting)||"<w:trPr/>",r=Ve(n),i=r.length>0?`<w:trPr>${r}</w:trPr>`:"<w:trPr/>";return `<w:trPrChange ${t}>${i}</w:trPrChange>`}function Ze(e){if(!e)return "";let n=[e.firstRow?"1":"0",e.lastRow?"1":"0",e.firstColumn?"1":"0",e.lastColumn?"1":"0",e.oddVBand?"1":"0",e.evenVBand?"1":"0",e.oddHBand?"1":"0",e.evenHBand?"1":"0",e.nwCell?"1":"0",e.neCell?"1":"0",e.swCell?"1":"0",e.seCell?"1":"0"].join("");return n==="000000000000"?"":`<w:cnfStyle w:val="${n}"/>`}function Y(e,t,n){let r=[];if(e){let i=Ze(e.conditionalFormat);i&&r.push(i);let o=T(e.width,"tcW");o&&r.push(o),e.gridSpan&&e.gridSpan>1&&r.push(`<w:gridSpan w:val="${e.gridSpan}"/>`),e.vMerge&&(e.vMerge==="restart"?r.push('<w:vMerge w:val="restart"/>'):r.push("<w:vMerge/>"));let l=_(e.borders,"tcBorders");l&&r.push(l);let s=V(e.shading);s&&r.push(s),e.noWrap&&r.push("<w:noWrap/>");let p=G(e.margins,"tcMar");p&&r.push(p),e.textDirection&&r.push(`<w:textDirection w:val="${e.textDirection}"/>`),e.fitText&&r.push("<w:tcFitText/>"),e.verticalAlign&&r.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.hideMark&&r.push("<w:hideMark/>");}return n&&(n.type==="tableCellInsertion"?r.push(`<w:cellIns ${P(n.info)}/>`):n.type==="tableCellDeletion"?r.push(`<w:cellDel ${P(n.info)}/>`):n.type==="tableCellMerge"&&r.push(`<w:cellMerge ${P(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(i=>qe(i))),r.length===0?"":`<w:tcPr>${r.join("")}</w:tcPr>`}function Ye(e){return !e.startsWith("<w:tcPr>")||!e.endsWith("</w:tcPr>")?"":e.slice(8,-9)}function qe(e){let t=P(e.info,e.info.rsid),n=Y(e.previousFormatting)||"<w:tcPr/>",r=Ye(n),i=r.length>0?`<w:tcPr>${r}</w:tcPr>`:"<w:tcPr/>";return `<w:tcPrChange ${t}>${i}</w:tcPrChange>`}function Je(e){return !e||e.length===0?"":`<w:tblGrid>${e.map(n=>`<w:gridCol w:w="${n}"/>`).join("")}</w:tblGrid>`}function Ke(e){let t=[];for(let n of e)n.type==="paragraph"?t.push($(n)):n.type==="table"&&t.push(S(n));return t.length===0&&t.push("<w:p/>"),t.join("")}function Qe(e){let t=[],n=Y(e.formatting,e.propertyChanges,e.structuralChange);return n&&t.push(n),t.push(Ke(e.content)),`<w:tc>${t.join("")}</w:tc>`}function et(e){let t=[],n=Z(e.formatting,e.propertyChanges,e.structuralChange);n&&t.push(n);for(let r of e.cells)t.push(Qe(r));return `<w:tr>${t.join("")}</w:tr>`}function S(e){let t=[],n=U(e.formatting,e.propertyChanges);n&&t.push(n);let r=Je(e.columnWidths);r&&t.push(r);for(let i of e.rows)t.push(et(i));return `<w:tbl>${t.join("")}</w:tbl>`}var w={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function tt(){let e={wpc:w.wpc,mc:w.mc,o:w.o,r:w.r,m:w.m,v:w.v,wp14:w.wp14,wp:w.wp,w10:w.w10,w:w.w,w14:w.w14,w15:w.w15,wpg:w.wpg,wps:w.wps};return Object.entries(e).map(([t,n])=>`xmlns:${t}="${n}"`).join(" ")}function D(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${e.size}"`),e.space!==void 0&&n.push(`w:space="${e.space}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function nt(e){return `<w:headerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function rt(e){return `<w:footerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function it(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:footnotePr>${t.join("")}</w:footnotePr>`}function ot(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:endnotePr>${t.join("")}</w:endnotePr>`}function st(e){let t=[];return e.pageWidth!==void 0&&t.push(`w:w="${e.pageWidth}"`),e.pageHeight!==void 0&&t.push(`w:h="${e.pageHeight}"`),e.orientation==="landscape"&&t.push('w:orient="landscape"'),t.length===0?"":`<w:pgSz ${t.join(" ")}/>`}function at(e){let t=[];return e.marginTop!==void 0&&t.push(`w:top="${e.marginTop}"`),e.marginRight!==void 0&&t.push(`w:right="${e.marginRight}"`),e.marginBottom!==void 0&&t.push(`w:bottom="${e.marginBottom}"`),e.marginLeft!==void 0&&t.push(`w:left="${e.marginLeft}"`),e.headerDistance!==void 0&&t.push(`w:header="${e.headerDistance}"`),e.footerDistance!==void 0&&t.push(`w:footer="${e.footerDistance}"`),e.gutter!==void 0&&t.push(`w:gutter="${e.gutter}"`),t.length===0?"":`<w:pgMar ${t.join(" ")}/>`}function lt(e){if(!e.columnCount&&!e.columns?.length)return "";let t=[];e.columnCount!==void 0&&e.columnCount>1&&t.push(`w:num="${e.columnCount}"`),e.columnSpace!==void 0&&t.push(`w:space="${e.columnSpace}"`),e.equalWidth!==void 0&&t.push(`w:equalWidth="${e.equalWidth?"1":"0"}"`),e.separator&&t.push('w:sep="1"');let n="";return e.columns&&e.columns.length>0&&(n=e.columns.map(i=>{let o=[];return i.width!==void 0&&o.push(`w:w="${i.width}"`),i.space!==void 0&&o.push(`w:space="${i.space}"`),`<w:col ${o.join(" ")}/>`}).join("")),t.length===0&&!n?"":`<w:cols${t.length>0?" "+t.join(" "):""}>${n}</w:cols>`}function ct(e){if(!e.lineNumbers)return "";let t=e.lineNumbers,n=[];return t.countBy!==void 0&&n.push(`w:countBy="${t.countBy}"`),t.start!==void 0&&n.push(`w:start="${t.start}"`),t.distance!==void 0&&n.push(`w:distance="${t.distance}"`),t.restart&&n.push(`w:restart="${t.restart}"`),n.length===0?"":`<w:lnNumType ${n.join(" ")}/>`}function pt(e){if(!e.pageBorders)return "";let t=e.pageBorders,n=[],r=[];if(t.display&&n.push(`w:display="${t.display}"`),t.offsetFrom&&n.push(`w:offsetFrom="${t.offsetFrom}"`),t.zOrder&&n.push(`w:zOrder="${t.zOrder}"`),t.top){let o=D(t.top,"top");o&&r.push(o);}if(t.left){let o=D(t.left,"left");o&&r.push(o);}if(t.bottom){let o=D(t.bottom,"bottom");o&&r.push(o);}if(t.right){let o=D(t.right,"right");o&&r.push(o);}return r.length===0?"":`<w:pgBorders${n.length>0?" "+n.join(" "):""}>${r.join("")}</w:pgBorders>`}function ft(e){if(!e.docGrid)return "";let t=e.docGrid,n=[];return t.type&&n.push(`w:type="${t.type}"`),t.linePitch!==void 0&&n.push(`w:linePitch="${t.linePitch}"`),t.charSpace!==void 0&&n.push(`w:charSpace="${t.charSpace}"`),n.length===0?"":`<w:docGrid ${n.join(" ")}/>`}function ut(e){if(!e)return "";let t=[];if(e.headerReferences)for(let f of e.headerReferences)t.push(nt(f));if(e.footerReferences)for(let f of e.footerReferences)t.push(rt(f));let n=it(e.footnotePr);n&&t.push(n);let r=ot(e.endnotePr);r&&t.push(r),e.sectionStart&&t.push(`<w:type w:val="${e.sectionStart}"/>`);let i=st(e);i&&t.push(i);let o=at(e);if(o&&t.push(o),e.paperSrcFirst!==void 0||e.paperSrcOther!==void 0){let f=[];e.paperSrcFirst!==void 0&&f.push(`w:first="${e.paperSrcFirst}"`),e.paperSrcOther!==void 0&&f.push(`w:other="${e.paperSrcOther}"`),t.push(`<w:paperSrc ${f.join(" ")}/>`);}let l=pt(e);l&&t.push(l);let s=ct(e);s&&t.push(s);let p=lt(e);p&&t.push(p);let c=ft(e);return c&&t.push(c),e.verticalAlign&&t.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.bidi&&t.push("<w:bidi/>"),e.titlePg&&t.push("<w:titlePg/>"),e.evenAndOddHeaders&&t.push("<w:evenAndOddHeaders/>"),t.length===0?"":`<w:sectPr>${t.join("")}</w:sectPr>`}function q(e){if(e.type==="paragraph")return $(e);if(e.type==="table")return S(e);if(e.type==="blockSdt"){let t=e.content.map(i=>q(i)).join(""),n=e.properties,r=[];return n.alias&&r.push(`<w:alias w:val="${n.alias}"/>`),n.tag&&r.push(`<w:tag w:val="${n.tag}"/>`),`<w:sdt><w:sdtPr>${r.join("")}</w:sdtPr><w:sdtContent>${t}</w:sdtContent></w:sdt>`}return ""}function mt(e){return e.map(t=>q(t)).join("")}function ht(e){let t=[];return t.push(mt(e.content)),e.finalSectionProperties&&t.push(ut(e.finalSectionProperties)),t.join("")}function J(e){let t=[];t.push('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>');let n=tt();return t.push(`<w:document ${n} mc:Ignorable="w14 w15 wp14">`),t.push("<w:body>"),t.push(ht(e.package.document)),t.push("</w:body>"),t.push("</w:document>"),t.join("")}var R=c(a$1(),1);var dt={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function wt(){return Object.entries(dt).map(([e,t])=>`xmlns:${e}="${t}"`).join(" ")}function gt(e){return e.type==="paragraph"?$(e):e.type==="table"?S(e):""}function B(e){let t=e.type==="header"?"w:hdr":"w:ftr",n=wt(),r=e.content.map(i=>gt(i)).join("");return r||(r="<w:p><w:pPr/></w:p>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <${t} ${n}>${r}</${t}>`}function Q(e){let t="<w:r>",n=[];e.formatting?.bold&&n.push("<w:b/>"),e.formatting?.italic&&n.push("<w:i/>"),n.length>0&&(t+=`<w:rPr>${n.join("")}</w:rPr>`);for(let r of e.content)if(r.type==="text"){let i=r.text!==r.text.trim()||r.text.includes(" ");t+=i?`<w:t xml:space="preserve">${a(r.text)}</w:t>`:`<w:t>${a(r.text)}</w:t>`;}else r.type==="break"&&(t+="<w:br/>");return t+="</w:r>",t}function yt(e){let t="<w:p>";for(let n of e.content)n.type==="run"&&(t+=Q(n));return t+="</w:p>",t}function xt(e){let t="<w:p>";t+='<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r>';for(let n of e.content)n.type==="run"&&(t+=Q(n));return t+="</w:p>",t}function K(e){let t=[`w:id="${e.id}"`];e.author&&t.push(`w:author="${a(e.author)}"`),e.initials&&t.push(`w:initials="${a(e.initials)}"`),e.date&&t.push(`w:date="${a(e.date)}"`);let n=`<w:comment ${t.join(" ")}>`;if(e.content&&e.content.length>0){n+=xt(e.content[0]);for(let r=1;r<e.content.length;r++)n+=yt(e.content[r]);}else n+='<w:p><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>';return n+="</w:comment>",n}function ee(e){if(!e||e.length===0)return "";let t=[],n=[];for(let i of e)(i.parentId==null?t:n).push(i);let r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
+ <w:comments xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 wp14">`;for(let i of t)r+=K(i);for(let i of n)r+=K(i);return r+="</w:comments>",r}function E(e){let t=0;for(let n of e.matchAll(/Id="rId(\d+)"/g)){let r=parseInt(n[1],10);r>t&&(t=r);}return t}async function $t(e,t,n){let r=e.package.document.comments;if(!r||r.length===0)return;let i=ee(r);t.file("word/comments.xml",i,{compression:"DEFLATE",compressionOptions:{level:n}}),await Promise.all([Rt(t,n),zt(t,n)]);}function te(e){let t=[];for(let n of e)if(n.type==="paragraph"){for(let r of n.content)if(r.type==="run")for(let i of r.content)i.type==="drawing"&&i.image.src?.startsWith("data:")&&t.push(i.image);}else if(n.type==="table")for(let r of n.rows)for(let i of r.cells)t.push(...te(i.content));return t}var Tt={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function Pt(e){let t=e.match(/^data:([^;]+);base64,(.+)$/);if(!t)throw new Error("Invalid data URL");let n=atob(t[2]),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return {data:r.buffer,extension:Tt[t[1]]||"png"}}async function bt(e,t,n){if(e.length===0)return;let r="word/_rels/document.xml.rels",i=t.file(r);if(!i)return;let o=await i.async("text"),l=E(o),s=0;t.forEach(f=>{let m=f.match(/^word\/media\/image(\d+)\./);if(m){let u=parseInt(m[1],10);u>s&&(s=u);}});let p=[],c=new Set;for(let f of e){let{data:m,extension:u}=Pt(f.src);s++,l++;let h=`image${s}.${u}`,g=`word/media/${h}`,F=`rId${l}`;t.file(g,m,{compression:"DEFLATE",compressionOptions:{level:n}}),p.push(`<Relationship Id="${F}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/${h}"/>`),c.add(u),f.rId=F;}if(p.length>0&&(o=o.replace("</Relationships>",p.join("")+"</Relationships>"),t.file(r,o,{compression:"DEFLATE",compressionOptions:{level:n}})),c.size>0){let f=t.file("[Content_Types].xml");if(f){let m=await f.async("text");for(let u of c)if(!m.includes(`Extension="${u}"`)){let h=kt(u);m=m.replace("</Types>",`<Default Extension="${u}" ContentType="${h}"/></Types>`);}t.file("[Content_Types].xml",m,{compression:"DEFLATE",compressionOptions:{level:n}});}}}function ne(e){let t=[];for(let n of e)if(n.type==="paragraph")for(let r of n.content)r.type==="hyperlink"&&r.href&&!r.rId&&!r.anchor&&t.push(r);else if(n.type==="table")for(let r of n.rows)for(let i of r.cells)t.push(...ne(i.content));return t}async function vt(e,t,n){if(e.length===0)return;let r="word/_rels/document.xml.rels",i=t.file(r);if(!i)return;let o=await i.async("text"),l=E(o),s=[];for(let p of e){l++;let c=`rId${l}`;s.push(`<Relationship Id="${c}" Type="${a$2.hyperlink}" Target="${a(p.href)}" TargetMode="External"/>`),p.rId=c;}s.length>0&&(o=o.replace("</Relationships>",s.join("")+"</Relationships>"),t.file(r,o,{compression:"DEFLATE",compressionOptions:{level:n}}));}async function Ct(e,t={}){if(!e.originalBuffer)throw new Error("Cannot repack document: no original buffer for round-trip. Use createDocx() for new documents.");let{compressionLevel:n=6,updateModifiedDate:r=true,modifiedBy:i}=t,o=e,l=await R.default.loadAsync(e.originalBuffer),s=new R.default;for(let[u,h]of Object.entries(l.files)){if(h.dir){s.folder(u.replace(/\/$/,""));continue}let g=await h.async("arraybuffer");s.file(u,g,{compression:"DEFLATE",compressionOptions:{level:n}});}let p=te(o.package.document.content);await bt(p,s,n);let c=ne(o.package.document.content);await vt(c,s,n);let f=J(o);if(s.file("word/document.xml",f,{compression:"DEFLATE",compressionOptions:{level:n}}),At(o,s,n),await $t(o,s,n),r){let u="docProps/core.xml",h=l.file(u);if(h){let g=await h.async("text"),F=Dt(g,{updateModifiedDate:r,modifiedBy:i});s.file(u,F,{compression:"DEFLATE",compressionOptions:{level:n}});}}return await s.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:n}})}var Ft="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",St="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";async function Rt(e,t){let n=e.file("[Content_Types].xml");if(!n)return;let r=await n.async("text");r.includes("/word/comments.xml")||(r=r.replace("</Types>",`<Override PartName="/word/comments.xml" ContentType="${Ft}"/></Types>`),e.file("[Content_Types].xml",r,{compression:"DEFLATE",compressionOptions:{level:t}}));}async function zt(e,t){let n="word/_rels/document.xml.rels",r=e.file(n);if(!r)return;let i=await r.async("text");if(i.includes("comments.xml"))return;let o=`rId${E(i)+1}`;i=i.replace("</Relationships>",`<Relationship Id="${o}" Type="${St}" Target="comments.xml"/></Relationships>`),e.file(n,i,{compression:"DEFLATE",compressionOptions:{level:t}});}async function rn(e,t,n={}){let{compressionLevel:r=6}=n,i=await R.default.loadAsync(e);for(let[o,l]of t)i.file(o,l,{compression:"DEFLATE",compressionOptions:{level:r}});return i.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:r}})}function At(e,t,n){let r=e.package.relationships;if(!r)return;let i={level:n};if(e.package.headers)for(let[o,l]of e.package.headers.entries()){let s=r.get(o);if(s&&s.type===a$2.header&&s.target){let p=s.target.startsWith("/")?s.target.slice(1):`word/${s.target}`,c=B(l);t.file(p,c,{compression:"DEFLATE",compressionOptions:i});}}if(e.package.footers)for(let[o,l]of e.package.footers.entries()){let s=r.get(o);if(s&&s.type===a$2.footer&&s.target){let p=s.target.startsWith("/")?s.target.slice(1):`word/${s.target}`,c=B(l);t.file(p,c,{compression:"DEFLATE",compressionOptions:i});}}}function Dt(e,t){let n=e;if(t.updateModifiedDate){let r=new Date().toISOString();n.includes("<dcterms:modified")?n=n.replace(/<dcterms:modified[^>]*>[^<]*<\/dcterms:modified>/,`<dcterms:modified xsi:type="dcterms:W3CDTF">${r}</dcterms:modified>`):n=n.replace("</cp:coreProperties>",`<dcterms:modified xsi:type="dcterms:W3CDTF">${r}</dcterms:modified></cp:coreProperties>`);}return t.modifiedBy&&(n.includes("<cp:lastModifiedBy")?n=n.replace(/<cp:lastModifiedBy>[^<]*<\/cp:lastModifiedBy>/,`<cp:lastModifiedBy>${a(t.modifiedBy)}</cp:lastModifiedBy>`):n=n.replace("</cp:coreProperties>",`<cp:lastModifiedBy>${a(t.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)),n}function kt(e,t){return {png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp",wmf:"image/x-wmf",emf:"image/x-emf"}[e]||"application/octet-stream"}async function It(){let e=new R.default;e.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
4
+ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
5
+ <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
6
+ <Default Extension="xml" ContentType="application/xml"/>
7
+ <Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
8
+ <Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
9
+ <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
10
+ <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
11
+ </Types>`),e.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
12
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
13
+ <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
14
+ <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
15
+ <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
16
+ </Relationships>`),e.file("word/_rels/document.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
17
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
18
+ <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
19
+ </Relationships>`),e.file("word/document.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
20
+ <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
21
+ <w:body>
22
+ <w:p>
23
+ <w:r>
24
+ <w:t></w:t>
25
+ </w:r>
26
+ </w:p>
27
+ <w:sectPr>
28
+ <w:pgSz w:w="12240" w:h="15840"/>
29
+ <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
30
+ </w:sectPr>
31
+ </w:body>
32
+ </w:document>`),e.file("word/styles.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
33
+ <w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
34
+ <w:docDefaults>
35
+ <w:rPrDefault>
36
+ <w:rPr>
37
+ <w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
38
+ <w:sz w:val="22"/>
39
+ </w:rPr>
40
+ </w:rPrDefault>
41
+ <w:pPrDefault>
42
+ <w:pPr>
43
+ <w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
44
+ </w:pPr>
45
+ </w:pPrDefault>
46
+ </w:docDefaults>
47
+ <w:style w:type="paragraph" w:default="1" w:styleId="Normal">
48
+ <w:name w:val="Normal"/>
49
+ </w:style>
50
+ </w:styles>`);let t=new Date().toISOString();return e.file("docProps/core.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
51
+ <cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
52
+ <dc:creator>EigenPal DOCX Editor</dc:creator>
53
+ <dcterms:created xsi:type="dcterms:W3CDTF">${t}</dcterms:created>
54
+ <dcterms:modified xsi:type="dcterms:W3CDTF">${t}</dcterms:modified>
55
+ </cp:coreProperties>`),e.file("docProps/app.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
56
+ <Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
57
+ <Application>EigenPal DOCX Editor</Application>
58
+ <AppVersion>1.0.0</AppVersion>
59
+ </Properties>`),e.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}})}async function on(e){let t=await It(),n={...e,originalBuffer:t};return Ct(n)}export{ut as a,ht as b,J as c,Ct as d,rn as e,on as f};
@@ -0,0 +1,9 @@
1
+ 'use strict';var chunkTAF6KYDM_cjs=require('./chunk-TAF6KYDM.cjs'),chunkY6QBJGMO_cjs=require('./chunk-Y6QBJGMO.cjs'),chunkP7ZF45KZ_cjs=require('./chunk-P7ZF45KZ.cjs'),chunkEH3NY2DQ_cjs=require('./chunk-EH3NY2DQ.cjs'),chunkPCJ5ACUV_cjs=require('./chunk-PCJ5ACUV.cjs');function $(r,t){let e=J(t),n=new RegExp(`<w:p[\\s][^>]*w14:paraId="${e}"`,"g"),a=[],o;for(;(o=n.exec(r))!==null;)a.push(o.index);if(a.length===0||a.length>1)return null;let i=a[0],s=i,c=0;for(;s<r.length;){let u=r.indexOf("<",s);if(u===-1)break;if(r.startsWith("<w:p",u)){let p=r[u+4];if(p===">"||p===" "||p==="/"){let l=r.indexOf(">",u);if(l===-1)break;if(r[l-1]==="/"){if(c===0)return {start:i,end:l+1};s=l+1;}else c++,s=l+1;}else s=u+1;}else if(r.startsWith("</w:p>",u)){if(c--,c===0)return {start:i,end:u+6};s=u+6;}else s=u+1;}return null}function G(r,t){let e=$(r,t);return e?r.substring(e.start,e.end):null}function L(r){let t=0,e=/<w:p[\s>]/g,n;for(;(n=e.exec(r))!==null;){let a=n.index,o=r[a+4];(o===">"||o===" ")&&t++;}return t}function W(r){let t=new Map,e=/w14:paraId="([^"]+)"/g,n;for(;(n=e.exec(r))!==null;){let a=n[1];t.set(a,(t.get(a)||0)+1);}return t}function X(r,t,e){if(e.size===0)return {safe:true};let n=W(r),a=W(t);for(let s of e){let c=n.get(s)||0;if(c===0)return {safe:false,reason:`paraId-not-found-in-original: ${s}`};if(c>1)return {safe:false,reason:`duplicate-paraId-in-original: ${s}`}}for(let s of e){let c=a.get(s)||0;if(c===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${s}`};if(c>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${s}`}}let o=L(r),i=L(t);return o!==i?{safe:false,reason:`paragraph-count-mismatch: original=${o}, serialized=${i}`}:{safe:true}}function M(r,t,e){if(e.size===0)return r;if(!X(r,t,e).safe)return null;let a=[];for(let i of e){let s=$(r,i);if(!s)return null;let c=G(t,i);if(!c)return null;a.push({start:s.start,end:s.end,newXml:c});}a.sort((i,s)=>s.start-i.start);let o=r;for(let{start:i,end:s,newXml:c}of a)o=o.substring(0,i)+c+o.substring(s);return o}function J(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function N(r){for(let t of r)if(t.type==="paragraph"){for(let e of t.content)if(e.type==="run"){for(let n of e.content)if(n.type==="drawing"&&n.image?.src?.startsWith("data:")&&!n.image?.rId)return true}else if(e.type==="hyperlink"&&e.href&&!e.rId&&!e.anchor)return true}else if(t.type==="table"){for(let e of t.rows)for(let n of e.cells)if(N(n.content))return true}return false}async function q(r,t,e){let{changedParaIds:n,structuralChange:a,hasUntrackedChanges:o}=e;if(a||o||!t)return null;let i=r.package.document.content;if(N(i))return null;if(n.size===0)return t;try{let u=(await(await import('./lib-HOLGQI5K.cjs')).default.loadAsync(t)).file("word/document.xml");if(!u)return null;let p=await u.async("text"),l=chunkY6QBJGMO_cjs.c(r),f=M(p,l,n);if(!f)return null;let d=new Map;return d.set("word/document.xml",f),await chunkY6QBJGMO_cjs.e(t,d)}catch{return null}}function Z(){return [{styleId:"Normal",type:"paragraph",name:"Normal",default:true,qFormat:true,uiPriority:0,rPr:{fontSize:22,fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{lineSpacing:276}},{styleId:"Title",type:"paragraph",name:"Title",basedOn:"Normal",next:"Normal",qFormat:true,uiPriority:10,rPr:{fontSize:52,bold:true,fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{lineSpacing:240}},{styleId:"Subtitle",type:"paragraph",name:"Subtitle",basedOn:"Normal",next:"Normal",qFormat:true,uiPriority:11,rPr:{fontSize:30,color:{rgb:"666666"},fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{lineSpacing:240}},{styleId:"Heading1",type:"paragraph",name:"Heading 1",basedOn:"Normal",next:"Normal",qFormat:true,uiPriority:9,rPr:{fontSize:40,bold:true,fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{spaceBefore:400,spaceAfter:120,lineSpacing:240}},{styleId:"Heading2",type:"paragraph",name:"Heading 2",basedOn:"Normal",next:"Normal",qFormat:true,uiPriority:9,rPr:{fontSize:32,bold:true,fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{spaceBefore:360,spaceAfter:80,lineSpacing:240}},{styleId:"Heading3",type:"paragraph",name:"Heading 3",basedOn:"Normal",next:"Normal",qFormat:true,uiPriority:9,rPr:{fontSize:28,bold:true,fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{spaceBefore:320,spaceAfter:80,lineSpacing:240}},{styleId:"Heading4",type:"paragraph",name:"Heading 4",basedOn:"Normal",next:"Normal",qFormat:true,uiPriority:9,rPr:{fontSize:24,bold:true,fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{spaceBefore:280,spaceAfter:80,lineSpacing:240}}]}function K(){return {pageWidth:12240,pageHeight:15840,orientation:"portrait",marginTop:1440,marginBottom:1440,marginLeft:1440,marginRight:1440,headerDistance:720,footerDistance:720,gutter:0,columnCount:1,columnSpace:720,equalWidth:true,sectionStart:"nextPage",verticalAlign:"top"}}function Q(r={}){let t=K();r.pageWidth!==void 0&&(t.pageWidth=r.pageWidth),r.pageHeight!==void 0&&(t.pageHeight=r.pageHeight),r.orientation!==void 0&&(t.orientation=r.orientation),r.marginTop!==void 0&&(t.marginTop=r.marginTop),r.marginBottom!==void 0&&(t.marginBottom=r.marginBottom),r.marginLeft!==void 0&&(t.marginLeft=r.marginLeft),r.marginRight!==void 0&&(t.marginRight=r.marginRight);let e={type:"text",text:r.initialText||""};return {package:{document:{content:[{type:"paragraph",content:[{type:"run",content:r.initialText?[e]:[],formatting:{fontSize:22,fontFamily:{ascii:"Arial",hAnsi:"Arial"}}}],formatting:{lineSpacing:276}}],finalSectionProperties:t},styles:{docDefaults:{rPr:{fontSize:22,fontFamily:{ascii:"Arial",hAnsi:"Arial"}},pPr:{lineSpacing:276}},styles:Z()}},templateVariables:[],warnings:[]}}function Ht(r,t={}){return Q({...t,initialText:r})}var S=class r{constructor(t){chunkPCJ5ACUV_cjs.d(this,"_document");chunkPCJ5ACUV_cjs.d(this,"_pendingVariables");t instanceof ArrayBuffer||ArrayBuffer.isView(t)?this._document={package:{document:{content:[]}},originalBuffer:t instanceof ArrayBuffer?t:t.buffer}:this._document=t,this._pendingVariables={};}static async fromBuffer(t){let e=await chunkEH3NY2DQ_cjs.p(t);return new r(e)}static fromDocument(t){return new r(t)}getDocument(){return this._document}getText(){let t=this._document.package.document;return this._getBodyText(t)}getFormattedText(){let t=[],e=this._document.package.document;for(let n of e.content)n.type==="paragraph"&&this._extractParagraphSegments(n,t);return t}getVariables(){return chunkTAF6KYDM_cjs.a(this._document)}getStyles(){let t=this._document.package.styles;if(!t?.styles)return [];let e=[];for(let[n,a]of Object.entries(t.styles))if(typeof a=="object"&&a!==null){let o=a;e.push({id:n,name:o.name||n,type:o.type==="numbering"?"paragraph":o.type||"paragraph",builtIn:o.default});}return e}getPageCount(){let t=this.getWordCount();return Math.max(1,Math.ceil(t/500))}getWordCount(){return this.getText().split(/\s+/).filter(n=>n.length>0).length}getCharacterCount(t=true){let e=this.getText();return t?e.length:e.replace(/\s/g,"").length}getParagraphCount(){return this._document.package.document.content.filter(t=>t.type==="paragraph").length}getTableCount(){return this._document.package.document.content.filter(t=>t.type==="table").length}getAgentContext(t=100){let e=this._document.package.document,n=e.content.filter(i=>i.type==="paragraph"),a=n.map((i,s)=>{let c=this._getParagraphText(i),u=i.formatting?.styleId;return {index:s,preview:c.slice(0,t),style:u,isHeading:u?.toLowerCase().includes("heading")||false,headingLevel:this._parseHeadingLevel(u),isListItem:!!i.listRendering,isEmpty:c.trim().length===0}}),o=(e.sections||[]).map((i,s)=>({index:s,paragraphCount:i.content?.length||0,pageSize:i.properties?.pageWidth&&i.properties?.pageHeight?{width:i.properties.pageWidth,height:i.properties.pageHeight}:void 0,isLandscape:i.properties?.orientation==="landscape",hasHeader:!!i.properties?.headerReferences?.length,hasFooter:!!i.properties?.footerReferences?.length}));return {paragraphCount:n.length,wordCount:this.getWordCount(),characterCount:this.getCharacterCount(),variables:this.getVariables(),variableCount:this.getVariables().length,availableStyles:this.getStyles(),outline:a,sections:o,hasTables:this.getTableCount()>0,hasImages:this._hasImages(),hasHyperlinks:this._hasHyperlinks()}}insertText(t,e,n={}){let a={type:"insertText",position:t,text:e,formatting:n.formatting};return this._executeCommand(a)}replaceRange(t,e,n={}){let a={type:"replaceText",range:t,text:e,formatting:n.formatting};return this._executeCommand(a)}deleteRange(t){let e={type:"deleteText",range:t};return this._executeCommand(e)}applyFormatting(t,e){let n={type:"formatText",range:t,formatting:e};return this._executeCommand(n)}applyStyle(t,e){let n={type:"applyStyle",paragraphIndex:t,styleId:e};return this._executeCommand(n)}applyParagraphFormatting(t,e){let n={type:"formatParagraph",paragraphIndex:t,formatting:e};return this._executeCommand(n)}insertTable(t,e,n,a={}){let o={type:"insertTable",position:t,rows:e,columns:n,data:a.data,hasHeader:a.hasHeader};return this._executeCommand(o)}insertImage(t,e,n={}){let a={type:"insertImage",position:t,src:e,width:n.width,height:n.height,alt:n.alt};return this._executeCommand(a)}insertHyperlink(t,e,n={}){let a={type:"insertHyperlink",range:t,url:e,displayText:n.displayText,tooltip:n.tooltip};return this._executeCommand(a)}removeHyperlink(t){let e={type:"removeHyperlink",range:t};return this._executeCommand(e)}insertParagraphBreak(t){let e={type:"insertParagraphBreak",position:t};return this._executeCommand(e)}mergeParagraphs(t,e){let n={type:"mergeParagraphs",paragraphIndex:t,count:e};return this._executeCommand(n)}setVariable(t,e){return this._pendingVariables[t]=e,this}setVariables(t){for(let[e,n]of Object.entries(t))this._pendingVariables[e]=n;return this}getPendingVariables(){return {...this._pendingVariables}}clearPendingVariables(){return this._pendingVariables={},this}async applyVariables(t){let e={...this._pendingVariables,...t};if(Object.keys(e).length===0)return this;let n=this._document.originalBuffer;if(!n)throw new Error("Cannot apply variables: no original buffer for processing");let{processTemplate:a}=await import('./processTemplate-BXZKWRQD.cjs'),o=a(n,e),i=await chunkEH3NY2DQ_cjs.p(o),s=new r(i);return s._pendingVariables={},s}async toBuffer(t){if(this._document.originalBuffer){if(t?.selective){let n=await q(this._document,this._document.originalBuffer,t.selective);if(n)return this._document.originalBuffer=n,n}let e=await chunkY6QBJGMO_cjs.d(this._document);return this._document.originalBuffer=e,e}return chunkY6QBJGMO_cjs.f(this._document)}async toBlob(t="application/vnd.openxmlformats-officedocument.wordprocessingml.document"){let e=await this.toBuffer();return new Blob([e],{type:t})}executeCommands(t){return new r(chunkP7ZF45KZ_cjs.b(this._document,t))}_executeCommand(t){let e=new r(chunkP7ZF45KZ_cjs.a(this._document,t));return e._pendingVariables={...this._pendingVariables},e}_getBodyText(t){let e=[];for(let n of t.content)n.type==="paragraph"?e.push(this._getParagraphText(n)):n.type==="table"&&e.push(this._getTableText(n));return e.join(`
2
+ `)}_getParagraphText(t){let e=[];for(let n of t.content)n.type==="run"?e.push(this._getRunText(n)):n.type==="hyperlink"&&e.push(this._getHyperlinkText(n));return e.join("")}_getRunText(t){return t.content.filter(e=>e.type==="text").map(e=>e.text).join("")}_getHyperlinkText(t){let e=[];for(let n of t.children)n.type==="run"&&e.push(this._getRunText(n));return e.join("")}_getTableText(t){let e=[];for(let n of t.rows)for(let a of n.cells)for(let o of a.content)o.type==="paragraph"&&e.push(this._getParagraphText(o));return e.join(" ")}_extractParagraphSegments(t,e){for(let n of t.content)if(n.type==="run"){let a=this._getRunText(n);a&&e.push({text:a,formatting:n.formatting});}else if(n.type==="hyperlink"){let a=n.href||"";for(let o of n.children)if(o.type==="run"){let i=this._getRunText(o);i&&e.push({text:i,formatting:o.formatting,isHyperlink:true,hyperlinkUrl:a});}}}_parseHeadingLevel(t){if(!t)return;let e=t.match(/heading\s*(\d)/i);if(e)return parseInt(e[1],10)}_hasImages(){let t=this._document.package.document;for(let e of t.content)if(e.type==="paragraph"){for(let n of e.content)if(n.type==="run"){for(let a of n.content)if(a.type==="drawing")return true}}return false}_hasHyperlinks(){let t=this._document.package.document;for(let e of t.content)if(e.type==="paragraph"){for(let n of e.content)if(n.type==="hyperlink")return true}return false}};async function Lt(r){return S.fromBuffer(r)}function Wt(r){return S.fromDocument(r)}function Y(r,t={}){let{outlineMaxChars:e=100,maxOutlineParagraphs:n=50}=t,a=r.package.document,o=a.content.filter(x=>x.type==="paragraph"),i=tt(o,e,n),s=chunkTAF6KYDM_cjs.a(r),c=et(r),u=nt(a),p=rt(a),l=at(a),f=a.content.some(x=>x.type==="table"),d=st(a),g=ct(a);return {paragraphCount:o.length,wordCount:p,characterCount:l,variables:s,variableCount:s.length,availableStyles:c,outline:i,sections:u,hasTables:f,hasImages:d,hasHyperlinks:g}}function qt(r,t,e={}){let{contextChars:n=200,includeSuggestions:a=true}=e,i=r.package.document.content.filter(h=>h.type==="paragraph"),s=i[t.start.paragraphIndex];if(!s)throw new Error(`Paragraph not found at index ${t.start.paragraphIndex}`);let c=m(s),u="";if(t.start.paragraphIndex===t.end.paragraphIndex)u=c.slice(t.start.offset,t.end.offset);else {let h=[];for(let b=t.start.paragraphIndex;b<=t.end.paragraphIndex;b++){let H=i[b];if(!H)continue;let w=m(H);b===t.start.paragraphIndex?h.push(w.slice(t.start.offset)):b===t.end.paragraphIndex?h.push(w.slice(0,t.end.offset)):h.push(w);}u=h.join(`
3
+ `);}let p=lt(i,t.start.paragraphIndex,t.start.offset,n),l=gt(i,t.end.paragraphIndex,t.end.offset,n),f=ft(s,t.start.offset),d=s.formatting||{},g={index:t.start.paragraphIndex,fullText:c,style:s.formatting?.styleId,wordCount:F(c)},x=false,T=mt(s,t.start.offset),I=a?dt(u):[];return {selectedText:u,range:t,formatting:f,paragraphFormatting:d,textBefore:p,textAfter:l,paragraph:g,inTable:x,inHyperlink:T,suggestedActions:I}}function U(r){let t=Y(r,{outlineMaxChars:50,maxOutlineParagraphs:10}),e=[`Document with ${t.paragraphCount} paragraphs, ${t.wordCount} words.`];t.hasTables&&e.push("Contains tables."),t.hasImages&&e.push("Contains images."),t.hasHyperlinks&&e.push("Contains hyperlinks."),t.variableCount>0&&e.push(`Has ${t.variableCount} template variables: ${t.variables.join(", ")}`);let n=t.outline.filter(a=>a.isHeading);if(n.length>0){e.push(`
4
+ Headings:`);for(let a of n.slice(0,5)){let o=a.headingLevel||1;e.push(`${" ".repeat(o-1)}- ${a.preview}`);}n.length>5&&e.push(` ... and ${n.length-5} more headings`);}return e.join(" ")}function tt(r,t,e){let n=[];for(let a=0;a<Math.min(r.length,e);a++){let o=r[a],i=m(o),s=o.formatting?.styleId;n.push({index:a,preview:i.slice(0,t),style:s,isHeading:ut(s),headingLevel:pt(s),isListItem:!!o.listRendering,isEmpty:i.trim().length===0});}return n}function et(r){let t=r.package.styles;if(!t?.styles)return [];let e=[];for(let[n,a]of Object.entries(t.styles))if(typeof a=="object"&&a!==null){let o=a;e.push({id:n,name:o.name||n,type:o.type==="numbering"?"paragraph":o.type||"paragraph",builtIn:o.default});}return e}function nt(r){return r.sections?r.sections.map((t,e)=>({index:e,paragraphCount:t.content?.length||0,pageSize:t.properties?.pageWidth&&t.properties?.pageHeight?{width:t.properties.pageWidth,height:t.properties.pageHeight}:void 0,isLandscape:t.properties?.orientation==="landscape",hasHeader:!!t.properties?.headerReferences?.length,hasFooter:!!t.properties?.footerReferences?.length})):[]}function rt(r){let t=0;for(let e of r.content)if(e.type==="paragraph"){let n=m(e);t+=F(n);}else e.type==="table"&&(t+=ot(e));return t}function F(r){return r.split(/\s+/).filter(e=>e.length>0).length}function at(r){let t=0;for(let e of r.content)if(e.type==="paragraph"){let n=m(e);t+=n.length;}else e.type==="table"&&(t+=it(e));return t}function ot(r){let t=0;for(let e of r.rows)for(let n of e.cells)for(let a of n.content)if(a.type==="paragraph"){let o=m(a);t+=F(o);}return t}function it(r){let t=0;for(let e of r.rows)for(let n of e.cells)for(let a of n.content)if(a.type==="paragraph"){let o=m(a);t+=o.length;}return t}function m(r){let t=[];for(let e of r.content)e.type==="run"?t.push(A(e)):e.type==="hyperlink"&&t.push(v(e));return t.join("")}function A(r){return r.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function v(r){let t=[];for(let e of r.children)e.type==="run"&&t.push(A(e));return t.join("")}function st(r){for(let t of r.content)if(t.type==="paragraph"){for(let e of t.content)if(e.type==="run"){for(let n of e.content)if(n.type==="drawing")return true}}return false}function ct(r){for(let t of r.content)if(t.type==="paragraph"){for(let e of t.content)if(e.type==="hyperlink")return true}return false}function ut(r){return r?r.toLowerCase().includes("heading"):false}function pt(r){if(!r)return;let t=r.match(/heading\s*(\d)/i);if(t)return parseInt(t[1],10)}function lt(r,t,e,n){let a=[],o=0,i=r[t];if(i){let u=m(i).slice(0,e);a.unshift(u),o+=u.length;}for(let c=t-1;c>=0&&o<n;c--){let u=r[c];if(!u)continue;let p=m(u);a.unshift(p),o+=p.length;}let s=a.join(`
5
+ `);return s.length>n?"..."+s.slice(-n):s}function gt(r,t,e,n){let a=[],o=0,i=r[t];if(i){let u=m(i).slice(e);a.push(u),o+=u.length;}for(let c=t+1;c<r.length&&o<n;c++){let u=r[c];if(!u)continue;let p=m(u);a.push(p),o+=p.length;}let s=a.join(`
6
+ `);return s.length>n?s.slice(0,n)+"...":s}function ft(r,t){let e=0;for(let n of r.content)if(n.type==="run"){let a=A(n),o=e,i=e+a.length;if(t>=o&&t<i)return n.formatting||{};e=i;}else if(n.type==="hyperlink"){let a=v(n),o=e,i=e+a.length;if(t>=o&&t<i){for(let s of n.children)if(s.type==="run")return s.formatting||{}}e=i;}return {}}function mt(r,t){let e=0;for(let n of r.content)if(n.type==="run"){let a=A(n);e+=a.length;}else if(n.type==="hyperlink"){let a=v(n),o=e,i=e+a.length;if(t>=o&&t<i)return true;e=i;}return false}function dt(r,t,e){let n=[];return r.length>0&&(n.push({id:"rewrite",label:"Rewrite",description:"Rewrite this text",priority:10},{id:"summarize",label:"Summarize",description:"Summarize this text",priority:9}),r.length>200&&n.push({id:"summarize",label:"Summarize",description:"Create a shorter version",priority:8}),r.length<50&&r.split(/\s+/).length<10&&n.push({id:"expand",label:"Expand",description:"Add more details",priority:8}),n.push({id:"fixGrammar",label:"Fix Grammar",description:"Fix grammar and spelling",priority:7}),n.push({id:"translate",label:"Translate",description:"Translate to another language",priority:6}),n.push({id:"makeFormal",label:"Make Formal",description:"Use formal tone",priority:5},{id:"makeCasual",label:"Make Casual",description:"Use casual tone",priority:4})),n.sort((a,o)=>(o.priority||0)-(a.priority||0)),n}function ht(r,t,e={}){let{contextCharsBefore:n=200,contextCharsAfter:a=200,includeSuggestions:o=true}=e,i=r.package.document,s=i.content.filter(h=>h.type==="paragraph");if(t.start.paragraphIndex>=s.length)throw new Error(`Invalid start paragraph index: ${t.start.paragraphIndex}`);let c=s[t.start.paragraphIndex],u=yt(s,t),p=xt(s,t.start,n),l=bt(s,t.end,a),f=Pt(c,t.start.offset),d=c.formatting||{},g={index:t.start.paragraphIndex,fullText:y(c),style:c.formatting?.styleId,wordCount:R(y(c))},x=St(i,t.start),T=At(c,t.start.offset),I=o?kt(u):[];return {selectedText:u,range:t,formatting:f,paragraphFormatting:d,textBefore:p,textAfter:l,paragraph:g,inTable:x,inHyperlink:T,suggestedActions:I}}function Xt(r,t,e={}){let n=ht(r,t,e),{includeDocumentSummary:a=true}=e,i=r.package.document.content.filter(g=>g.type==="paragraph"),s=R(n.selectedText),c=n.selectedText.length,u=t.start.paragraphIndex!==t.end.paragraphIndex,p=[];for(let g=t.start.paragraphIndex;g<=t.end.paragraphIndex;g++)p.push(g);let l=Tt(i,t),f=a?U(r):void 0,d=It(n.selectedText);return {...n,documentSummary:f,wordCount:s,characterCount:c,isMultiParagraph:u,paragraphIndices:p,detectedLanguage:d,contentType:l}}function Jt(r,t){let n=r.package.document.content.filter(s=>s.type==="paragraph"),a=[];for(let s=t.start.paragraphIndex;s<=t.end.paragraphIndex;s++){let c=n[s];if(!c)continue;let u=s===t.start.paragraphIndex?t.start.offset:0,p=s===t.end.paragraphIndex?t.end.offset:1/0;Ct(c,u,p,a);}let o=a.length<=1||a.every(s=>wt(s,a[0]));return {predominant:a.length>0?a[0]:{},isConsistent:o,allFormatting:a}}function yt(r,t){if(t.start.paragraphIndex===t.end.paragraphIndex){let n=r[t.start.paragraphIndex];return n?y(n).slice(t.start.offset,t.end.offset):""}let e=[];for(let n=t.start.paragraphIndex;n<=t.end.paragraphIndex;n++){let a=r[n];if(!a)continue;let o=y(a);n===t.start.paragraphIndex?e.push(o.slice(t.start.offset)):n===t.end.paragraphIndex?e.push(o.slice(0,t.end.offset)):e.push(o);}return e.join(`
7
+ `)}function xt(r,t,e){let n=[],a=0,o=r[t.paragraphIndex];if(o){let c=y(o).slice(0,t.offset);n.unshift(c),a+=c.length;}for(let s=t.paragraphIndex-1;s>=0&&a<e;s--){let c=r[s];if(!c)continue;let u=y(c);n.unshift(u),a+=u.length;}let i=n.join(`
8
+ `);return i.length>e?"..."+i.slice(-e):i}function bt(r,t,e){let n=[],a=0,o=r[t.paragraphIndex];if(o){let c=y(o).slice(t.offset);n.push(c),a+=c.length;}for(let s=t.paragraphIndex+1;s<r.length&&a<e;s++){let c=r[s];if(!c)continue;let u=y(c);n.push(u),a+=u.length;}let i=n.join(`
9
+ `);return i.length>e?i.slice(0,e)+"...":i}function Pt(r,t){let e=0;for(let n of r.content)if(n.type==="run"){let a=P(n),o=e+a.length;if(t>=e&&t<o)return n.formatting||{};e=o;}else if(n.type==="hyperlink"){let a=k(n),o=e+a.length;if(t>=e&&t<o){for(let i of n.children)if(i.type==="run")return i.formatting||{}}e=o;}return {}}function Ct(r,t,e,n){let a=0;for(let o of r.content)if(o.type==="run"){let i=P(o),s=a,c=a+i.length;c>t&&s<e&&o.formatting&&n.push({...o.formatting}),a=c;}else if(o.type==="hyperlink"){let i=k(o),s=a,c=a+i.length;if(c>t&&s<e)for(let u of o.children)u.type==="run"&&u.formatting&&n.push({...u.formatting});a=c;}}function St(r,t){return false}function At(r,t){let e=0;for(let n of r.content)if(n.type==="run"){let a=P(n);e+=a.length;}else if(n.type==="hyperlink"){let a=k(n),o=e,i=e+a.length;if(t>=o&&t<i)return true;e=i;}return false}function kt(r,t,e){let n=[];if(!r||r.trim().length===0)return n;n.push({id:"askAI",label:"Ask AI",description:"Ask AI about this text",priority:11},{id:"rewrite",label:"Rewrite",description:"Rewrite this text differently",priority:10});let a=R(r);return a>50&&n.push({id:"summarize",label:"Summarize",description:"Create a shorter version",priority:9}),a<20&&n.push({id:"expand",label:"Expand",description:"Add more details",priority:9}),n.push({id:"fixGrammar",label:"Fix Grammar",description:"Fix grammar and spelling",priority:7},{id:"translate",label:"Translate",description:"Translate to another language",priority:6},{id:"explain",label:"Explain",description:"Explain what this means",priority:5}),n.push({id:"makeFormal",label:"Make Formal",description:"Use formal tone",priority:4},{id:"makeCasual",label:"Make Casual",description:"Use casual tone",priority:3}),n.sort((o,i)=>(i.priority||0)-(o.priority||0)),n}function Tt(r,t){let e=new Set;for(let n=t.start.paragraphIndex;n<=t.end.paragraphIndex;n++){let a=r[n];a&&(a.listRendering?e.add("list"):a.formatting?.styleId?.toLowerCase().includes("heading")?e.add("heading"):e.add("prose"));}return e.size>1?"mixed":e.has("list")?"list":e.has("heading")?"heading":"prose"}function It(r){return /[а-яА-ЯёЁ]/.test(r)?"ru":/[一-龯]/.test(r)?"zh":/[ひらがなカタカナ]/.test(r)||/[\u3040-\u309F\u30A0-\u30FF]/.test(r)?"ja":/[가-힣]/.test(r)?"ko":/[àâäéèêëïîôùûüç]/i.test(r)?"fr":/[äöüß]/i.test(r)?"de":/[áéíóúñ]/i.test(r)?"es":"en"}function y(r){let t=[];for(let e of r.content)e.type==="run"?t.push(P(e)):e.type==="hyperlink"&&t.push(k(e));return t.join("")}function P(r){return r.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function k(r){let t=[];for(let e of r.children)e.type==="run"&&t.push(P(e));return t.join("")}function R(r){return r.split(/\s+/).filter(t=>t.length>0).length}function wt(r,t){let e=Object.keys(r),n=Object.keys(t);return e.length!==n.length?false:e.every(a=>{let o=r[a],i=t[a];return o===i})}exports.a=X;exports.b=M;exports.c=q;exports.d=Q;exports.e=Ht;exports.f=S;exports.g=Lt;exports.h=Wt;exports.i=Y;exports.j=qt;exports.k=U;exports.l=ht;exports.m=Xt;exports.n=Jt;
@@ -1,2 +1 @@
1
- var i=Object.create;var f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var h=a=>{throw TypeError(a)};var n=(a,b,c)=>b in a?f(a,b,{enumerable:true,configurable:true,writable:true,value:c}):a[b]=c;var r=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var s=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var o=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of k(b))!m.call(a,e)&&e!==c&&f(a,e,{get:()=>b[e],enumerable:!(d=j(b,e))||d.enumerable});return a};var t=(a,b,c)=>(c=a!=null?i(l(a)):{},o(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:true}):c,a));var u=(a,b,c)=>n(a,typeof b!="symbol"?b+"":b,c),g=(a,b,c)=>b.has(a)||h("Cannot "+c);var p=(a,b,c)=>(g(a,b,"read from private field"),c?c.call(a):b.get(a)),v=(a,b,c)=>b.has(a)?h("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),q=(a,b,c,d)=>(g(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c),w=(a,b,c)=>(g(a,b,"access private method"),c);var x=(a,b,c,d)=>({set _(e){q(a,b,e,c);},get _(){return p(a,b,d)}});export{r as a,s as b,t as c,u as d,p as e,v as f,q as g,w as h,x as i};//# sourceMappingURL=chunk-Y6VCTLCJ.js.map
2
- //# sourceMappingURL=chunk-Y6VCTLCJ.js.map
1
+ var i=Object.create;var f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var h=a=>{throw TypeError(a)};var n=(a,b,c)=>b in a?f(a,b,{enumerable:true,configurable:true,writable:true,value:c}):a[b]=c;var r=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var s=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var o=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of k(b))!m.call(a,e)&&e!==c&&f(a,e,{get:()=>b[e],enumerable:!(d=j(b,e))||d.enumerable});return a};var t=(a,b,c)=>(c=a!=null?i(l(a)):{},o(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:true}):c,a));var u=(a,b,c)=>n(a,typeof b!="symbol"?b+"":b,c),g=(a,b,c)=>b.has(a)||h("Cannot "+c);var p=(a,b,c)=>(g(a,b,"read from private field"),c?c.call(a):b.get(a)),v=(a,b,c)=>b.has(a)?h("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),q=(a,b,c,d)=>(g(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c),w=(a,b,c)=>(g(a,b,"access private method"),c);var x=(a,b,c,d)=>({set _(e){q(a,b,e,c);},get _(){return p(a,b,d)}});export{r as a,s as b,t as c,u as d,p as e,v as f,q as g,w as h,x as i};