@zeke-02/docx-editor 0.0.35 → 0.5.1

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 (168) hide show
  1. package/README.md +34 -29
  2. package/dist/{ClipboardManager-C1l58nzE.d.ts → ClipboardManager-CVKX0v9q.d.ts} +1 -1
  3. package/dist/{ClipboardManager-Cjb_v74d.d.mts → ClipboardManager-V3aaMnWE.d.mts} +1 -1
  4. package/dist/{DocumentAgent-E8OX_8j0.d.mts → DocumentAgent-BWflKHpH.d.mts} +1 -1
  5. package/dist/{DocumentAgent-iedmc_8s.d.ts → DocumentAgent-DsdXtetF.d.ts} +1 -1
  6. package/dist/{FindReplaceDialog-YW3R4FHM.mjs → FindReplaceDialog-L3YF5HIS.mjs} +1 -1
  7. package/dist/FindReplaceDialog-SEBWC5P7.js +1 -0
  8. package/dist/{FootnotePropertiesDialog-LNFJXQUG.mjs → FootnotePropertiesDialog-TNVJJCY6.mjs} +1 -1
  9. package/dist/{FootnotePropertiesDialog-7QX54WQT.js → FootnotePropertiesDialog-XQ7NIFIU.js} +1 -1
  10. package/dist/{HyperlinkDialog-HNYTXDCB.mjs → HyperlinkDialog-FR4IZZ7E.mjs} +1 -1
  11. package/dist/HyperlinkDialog-WEK6JSAC.js +1 -0
  12. package/dist/{ImagePositionDialog-M65BYQQE.js → ImagePositionDialog-2YXRAGZS.js} +1 -1
  13. package/dist/{ImagePositionDialog-B4RLP2W5.mjs → ImagePositionDialog-JSZSIKF5.mjs} +1 -1
  14. package/dist/ImagePropertiesDialog-527MFLQO.mjs +1 -0
  15. package/dist/{ImagePropertiesDialog-O4WQSF5M.js → ImagePropertiesDialog-HG4K3IE7.js} +1 -1
  16. package/dist/PageSetupDialog-GALVJMUB.js +1 -0
  17. package/dist/PageSetupDialog-TGQIAMI7.mjs +1 -0
  18. package/dist/SplitCellDialog-JIAC3RYV.js +1 -0
  19. package/dist/SplitCellDialog-NP3JJYHD.mjs +1 -0
  20. package/dist/{TablePropertiesDialog-WOZ4ES3H.js → TablePropertiesDialog-T7D4HSVP.js} +1 -1
  21. package/dist/TablePropertiesDialog-TIK4AA5M.mjs +1 -0
  22. package/dist/{clipboard-BWhM0CRj.d.mts → TableToolbar-DUgmob2I.d.ts} +227 -135
  23. package/dist/{clipboard-BvkuNZub.d.ts → TableToolbar-YL74HNS1.d.mts} +227 -135
  24. package/dist/{agentApi-mv532p8I.d.mts → agentApi-DLt94vXk.d.mts} +83 -5
  25. package/dist/{agentApi-mv532p8I.d.ts → agentApi-DLt94vXk.d.ts} +83 -5
  26. package/dist/chunk-23SXXIZS.js +111 -0
  27. package/dist/chunk-3F52AP2Q.js +1 -0
  28. package/dist/chunk-42O5GXM5.mjs +82 -0
  29. package/dist/chunk-54ULJEHM.mjs +1 -0
  30. package/dist/chunk-5XK326FI.mjs +1 -0
  31. package/dist/chunk-76IYR7C7.mjs +1 -0
  32. package/dist/chunk-7BG7QY7I.js +182 -0
  33. package/dist/chunk-AGRIVA4G.js +1 -0
  34. package/dist/chunk-BTCQ2QI3.mjs +3 -0
  35. package/dist/chunk-BXRC4U3X.mjs +2 -0
  36. package/dist/chunk-CPAYKE6X.mjs +1 -0
  37. package/dist/chunk-DACWLFKI.mjs +1 -0
  38. package/dist/{chunk-377ZVTSE.js → chunk-EHFEG3TX.js} +1 -1
  39. package/dist/chunk-EPBFWE36.js +2 -0
  40. package/dist/chunk-FXES3YDB.js +82 -0
  41. package/dist/chunk-HI66BSGS.mjs +9 -0
  42. package/dist/chunk-INTPVEO6.mjs +9 -0
  43. package/dist/chunk-IOAGVW6Q.mjs +2 -0
  44. package/dist/chunk-JCEWC5QL.mjs +4 -0
  45. package/dist/chunk-JTIUFACT.js +1 -0
  46. package/dist/chunk-KUTCCI4X.mjs +182 -0
  47. package/dist/{chunk-KCOGY3V2.js → chunk-LUF7PWIC.js} +4 -4
  48. package/dist/chunk-LVGJKS7Y.mjs +24 -0
  49. package/dist/chunk-MGEN6GOE.mjs +2 -0
  50. package/dist/chunk-MOE2ZGUE.js +18 -0
  51. package/dist/chunk-MWLHJWB6.js +9 -0
  52. package/dist/chunk-OFYVDN3U.mjs +2 -0
  53. package/dist/chunk-P4VSHBGZ.js +2 -0
  54. package/dist/chunk-P5FQHIES.mjs +1 -0
  55. package/dist/chunk-PBC7XAYZ.js +3 -0
  56. package/dist/chunk-PEMB6SZT.js +2 -0
  57. package/dist/chunk-PKEOQIQO.mjs +2 -0
  58. package/dist/chunk-PQMSZTBB.js +9 -0
  59. package/dist/chunk-Q7UDQXAF.js +1 -0
  60. package/dist/chunk-QGTAIC5E.js +1 -0
  61. package/dist/chunk-R3QMYPL5.mjs +59 -0
  62. package/dist/chunk-RBUTXXQJ.mjs +18 -0
  63. package/dist/chunk-RRWYZ2TS.mjs +111 -0
  64. package/dist/{chunk-AU5NVRHP.js → chunk-SFUM35DH.js} +2 -2
  65. package/dist/chunk-SNLC6EK2.js +1 -0
  66. package/dist/chunk-TMTLIGLZ.js +59 -0
  67. package/dist/{chunk-RTFUE3KK.mjs → chunk-TSE2PWFX.mjs} +3 -3
  68. package/dist/chunk-UWYD42WV.js +4 -0
  69. package/dist/chunk-UXVACQCY.mjs +1 -0
  70. package/dist/{chunk-Z26WOH6R.mjs → chunk-W4EIKDM6.mjs} +2 -2
  71. package/dist/chunk-WNS2RBQD.js +2 -0
  72. package/dist/chunk-YC5KZSYD.js +24 -0
  73. package/dist/chunk-Z3KMSHUP.js +1 -0
  74. package/dist/core-plugins-reexport.d.mts +4 -4
  75. package/dist/core-plugins-reexport.d.ts +4 -4
  76. package/dist/core-plugins-reexport.js +1 -1
  77. package/dist/core-plugins-reexport.mjs +1 -1
  78. package/dist/core-reexport.d.mts +47 -16
  79. package/dist/core-reexport.d.ts +47 -16
  80. package/dist/core-reexport.js +1 -1
  81. package/dist/core-reexport.mjs +1 -1
  82. package/dist/{colorResolver-C5fQ4fxP.d.mts → documentSerializer-DtS_-oGA.d.mts} +378 -376
  83. package/dist/{colorResolver-Bp9flT3l.d.ts → documentSerializer-Wj1p2ASa.d.ts} +378 -376
  84. package/dist/executor-C3VXF7QA.mjs +1 -0
  85. package/dist/executor-GDBV3AGV.js +1 -0
  86. package/dist/headless-reexport.d.mts +14 -12
  87. package/dist/headless-reexport.d.ts +14 -12
  88. package/dist/headless-reexport.js +1 -4
  89. package/dist/headless-reexport.mjs +1 -4
  90. package/dist/index.css +1 -1
  91. package/dist/index.d.mts +284 -172
  92. package/dist/index.d.ts +284 -172
  93. package/dist/index.js +17 -9
  94. package/dist/index.mjs +17 -9
  95. package/dist/{fontLoader-0G00frKD.d.mts → insertOperations-BTH1Asas.d.mts} +86 -86
  96. package/dist/{fontLoader-DPdt4JvW.d.ts → insertOperations-CbUnXAXH.d.ts} +86 -86
  97. package/dist/layout-bridge-EA4DJ227.js +1 -0
  98. package/dist/layout-bridge-XDPSO6GO.mjs +1 -0
  99. package/dist/mcp-reexport.d.mts +2 -2
  100. package/dist/mcp-reexport.d.ts +2 -2
  101. package/dist/mcp-reexport.js +8 -8
  102. package/dist/mcp-reexport.mjs +7 -7
  103. package/dist/processTemplate-MJ2PCSO5.js +1 -0
  104. package/dist/{processTemplate-LRHXOWMZ.mjs → processTemplate-W2C5PXZB.mjs} +1 -1
  105. package/dist/{react-1OO-DXvx.d.ts → react-B0W16SV6.d.ts} +384 -166
  106. package/dist/{react-B1dSZ_w1.d.mts → react-D0Pn1nww.d.mts} +384 -166
  107. package/dist/react.css +1 -1
  108. package/dist/react.d.mts +5 -5
  109. package/dist/react.d.ts +5 -5
  110. package/dist/react.js +1 -1
  111. package/dist/react.mjs +1 -1
  112. package/dist/{registry-BWGKcKc1.d.ts → registry-CH9V-IX0.d.ts} +1 -1
  113. package/dist/{registry-8XOdjHGC.d.mts → registry-CWBKYlNW.d.mts} +1 -1
  114. package/dist/styles.css +1 -1
  115. package/dist/{types-DIBvJ7AJ.d.mts → types-UDsUq8D3.d.mts} +1 -1
  116. package/dist/{types-CfAiObQo.d.ts → types-jbivc9Lj.d.ts} +1 -1
  117. package/dist/ui.d.mts +33 -83
  118. package/dist/ui.d.ts +33 -83
  119. package/dist/ui.js +1 -1
  120. package/dist/ui.mjs +1 -1
  121. package/dist/{variableDetector-DNO18eZ1.d.mts → variableDetector-CdQ7ZTzA.d.mts} +1 -1
  122. package/dist/{variableDetector-BIJFVpkl.d.ts → variableDetector-DsRV3A9z.d.ts} +1 -1
  123. package/i18n/de.json +49 -2
  124. package/i18n/en.json +55 -8
  125. package/i18n/he.json +792 -0
  126. package/i18n/pl.json +49 -2
  127. package/i18n/pt-BR.json +792 -0
  128. package/i18n/tr.json +792 -0
  129. package/i18n/zh-CN.json +792 -0
  130. package/package.json +17 -5
  131. package/dist/FindReplaceDialog-KNJETYJX.js +0 -1
  132. package/dist/HyperlinkDialog-GBAYMTUE.js +0 -1
  133. package/dist/ImagePropertiesDialog-JOGW3WDU.mjs +0 -1
  134. package/dist/PageSetupDialog-2GIBTKMJ.js +0 -1
  135. package/dist/PageSetupDialog-Q7SHEZIJ.mjs +0 -1
  136. package/dist/TablePropertiesDialog-LMXWX3FI.mjs +0 -1
  137. package/dist/chunk-2HDYCD2Q.mjs +0 -1
  138. package/dist/chunk-37SLIJPH.mjs +0 -58
  139. package/dist/chunk-3OKYQQQ5.js +0 -111
  140. package/dist/chunk-4VUZBV2S.js +0 -1
  141. package/dist/chunk-6YRWZ32V.js +0 -261
  142. package/dist/chunk-7MGFEP2R.mjs +0 -26
  143. package/dist/chunk-7QTNB64A.mjs +0 -9
  144. package/dist/chunk-AARNCPWR.js +0 -1
  145. package/dist/chunk-DC65PJYE.js +0 -4
  146. package/dist/chunk-DLVLK5FT.mjs +0 -24
  147. package/dist/chunk-EV3CM6TU.js +0 -1
  148. package/dist/chunk-FVUGBRDD.js +0 -1
  149. package/dist/chunk-FW5LYOOZ.mjs +0 -111
  150. package/dist/chunk-GZOCOWWB.mjs +0 -2
  151. package/dist/chunk-KUL2SDYC.js +0 -26
  152. package/dist/chunk-LYBG4YI7.mjs +0 -1
  153. package/dist/chunk-M5F4SK3W.mjs +0 -1
  154. package/dist/chunk-P7WEP4JU.js +0 -9
  155. package/dist/chunk-PB7VMDDP.js +0 -24
  156. package/dist/chunk-QAZ4233N.mjs +0 -1
  157. package/dist/chunk-QSUPYUOP.js +0 -2
  158. package/dist/chunk-QTSXJRP6.mjs +0 -1
  159. package/dist/chunk-S67UBZDL.mjs +0 -261
  160. package/dist/chunk-SE5EN2QL.js +0 -1
  161. package/dist/chunk-X5A54T6S.mjs +0 -4
  162. package/dist/chunk-YKBSKEBS.mjs +0 -2
  163. package/dist/chunk-ZJNGMDRE.js +0 -58
  164. package/dist/executor-L2MVKMXO.js +0 -1
  165. package/dist/executor-XKBCCVNY.mjs +0 -1
  166. package/dist/processTemplate-5ZST2Q5L.js +0 -1
  167. package/dist/selectionRects-DEX5THEG.js +0 -1
  168. package/dist/selectionRects-SQTAHMCH.mjs +0 -1
@@ -0,0 +1,59 @@
1
+ 'use strict';var chunkZ3KMSHUP_js=require('./chunk-Z3KMSHUP.js'),chunkIFPN3NT3_js=require('./chunk-IFPN3NT3.js'),chunkMOE2ZGUE_js=require('./chunk-MOE2ZGUE.js'),chunkH5NTJZO4_js=require('./chunk-H5NTJZO4.js');function p(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function s(e){return e==null||!Number.isFinite(e)?"0":String(Math.round(e))}var W=1e5;function G(){W=1e5;}function U(e){return e!=null&&e!==""&&e!==0?String(e):String(W++)}var Pe=new Set(["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","red","white","yellow"]);function be(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 S(e){if(!e)return "";let t=[];if(e.styleId&&t.push(`<w:rStyle w:val="${p(e.styleId)}"/>`),e.fontFamily){let o=[];e.fontFamily.ascii&&o.push(`w:ascii="${p(e.fontFamily.ascii)}"`),e.fontFamily.hAnsi&&o.push(`w:hAnsi="${p(e.fontFamily.hAnsi)}"`),e.fontFamily.eastAsia&&o.push(`w:eastAsia="${p(e.fontFamily.eastAsia)}"`),e.fontFamily.cs&&o.push(`w:cs="${p(e.fontFamily.cs)}"`),e.fontFamily.asciiTheme&&o.push(`w:asciiTheme="${e.fontFamily.asciiTheme}"`),e.fontFamily.hAnsiTheme&&o.push(`w:hAnsiTheme="${e.fontFamily.hAnsiTheme}"`),e.fontFamily.eastAsiaTheme&&o.push(`w:eastAsiaTheme="${e.fontFamily.eastAsiaTheme}"`),e.fontFamily.csTheme&&o.push(`w:csTheme="${e.fontFamily.csTheme}"`),o.length>0&&t.push(`<w:rFonts ${o.join(" ")}/>`);}e.bold===true?t.push("<w:b/>"):e.bold===false&&t.push('<w:b w:val="0"/>'),e.boldCs===true?t.push("<w:bCs/>"):e.boldCs===false&&t.push('<w:bCs w:val="0"/>'),e.italic===true?t.push("<w:i/>"):e.italic===false&&t.push('<w:i w:val="0"/>'),e.italicCs===true?t.push("<w:iCs/>"):e.italicCs===false&&t.push('<w:iCs w:val="0"/>'),e.allCaps&&t.push("<w:caps/>"),e.smallCaps&&t.push("<w:smallCaps/>"),e.strike&&t.push("<w:strike/>"),e.doubleStrike&&t.push("<w:dstrike/>"),e.outline&&t.push("<w:outline/>"),e.shadow&&t.push("<w:shadow/>"),e.emboss&&t.push("<w:emboss/>"),e.imprint&&t.push("<w:imprint/>"),e.hidden&&t.push("<w:vanish/>");let n=be(e.color);if(n&&t.push(n),e.spacing!==void 0&&t.push(`<w:spacing w:val="${s(e.spacing)}"/>`),e.scale!==void 0&&t.push(`<w:w w:val="${s(e.scale)}"/>`),e.kerning!==void 0&&t.push(`<w:kern w:val="${s(e.kerning)}"/>`),e.position!==void 0&&t.push(`<w:position w:val="${s(e.position)}"/>`),e.fontSize!==void 0&&t.push(`<w:sz w:val="${s(e.fontSize)}"/>`),e.fontSizeCs!==void 0&&t.push(`<w:szCs w:val="${s(e.fontSizeCs)}"/>`),e.highlight&&e.highlight!=="none"){if(Pe.has(e.highlight))t.push(`<w:highlight w:val="${e.highlight}"/>`);else if(!e.shading){let o=e.highlight.replace(/^#/,"");/^[0-9a-fA-F]{6}$/.test(o)&&t.push(`<w:shd w:val="clear" w:color="auto" w:fill="${o}"/>`);}}if(e.underline){let o=[`w:val="${e.underline.style}"`];e.underline.color&&(e.underline.color.rgb&&o.push(`w:color="${e.underline.color.rgb}"`),e.underline.color.themeColor&&o.push(`w:themeColor="${e.underline.color.themeColor}"`),e.underline.color.themeTint&&o.push(`w:themeTint="${e.underline.color.themeTint}"`),e.underline.color.themeShade&&o.push(`w:themeShade="${e.underline.color.themeShade}"`)),t.push(`<w:u ${o.join(" ")}/>`);}e.effect&&e.effect!=="none"&&t.push(`<w:effect w:val="${e.effect}"/>`),e.emphasisMark&&e.emphasisMark!=="none"&&t.push(`<w:em w:val="${e.emphasisMark}"/>`);let r=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 ve(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",o=typeof e.info.date=="string"?e.info.date.trim():void 0,i=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,c=[`w:id="${t}"`,`w:author="${p(r)}"`];o&&c.push(`w:date="${p(o)}"`),i&&c.push(`w:rsid="${p(i)}"`);let a=S(e.previousFormatting)||"<w:rPr/>";return `<w:rPrChange ${c.join(" ")}>${a}</w:rPrChange>`}function Se(e,t){let n=S(e),r=n?ve(n):"",o=(t??[]).map(Fe).join(""),i=`${r}${o}`;return i?`<w:rPr>${i}</w:rPr>`:""}function Ie(e){return `<w:t${e.preserveSpace||e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${p(e.text)}</w:t>`}function Re(e){return "<w:tab/>"}function Ee(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 Ae(e){return `<w:sym w:font="${p(e.font)}" w:char="${p(e.char)}"/>`}function De(e){return e.type==="footnoteRef"?`<w:footnoteReference w:id="${e.id}"/>`:`<w:endnoteReference w:id="${e.id}"/>`}function ke(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 ze(e){return `<w:instrText${e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${p(e.text)}</w:instrText>`}function Be(e){return "<w:softHyphen/>"}function je(e){return "<w:noBreakHyphen/>"}function L(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 Oe(e){if(!e||e.type==="none")return "<a:noFill/>";if(e.type==="solid"&&e.color)return `<a:solidFill>${L(e.color)}</a:solidFill>`;if(e.type==="gradient"&&e.gradient){let t=e.gradient,n=t.stops.map(o=>`<a:gs pos="${o.position}">${L(o.color)}</a:gs>`).join(""),r=t.type==="linear"?`<a:lin ang="${(t.angle||0)*6e4}" scaled="1"/>`:"";return `<a:gradFill><a:gsLst>${n}</a:gsLst>${r}</a:gradFill>`}return ""}function Z(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>${L(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 V(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>${s(n.posOffset)}</wp:posOffset>`),t.push("</wp:positionH>");let r=e.vertical;return t.push(`<wp:positionV relativeFrom="${r.relativeTo}">`),r.alignment?t.push(`<wp:align>${r.alignment}</wp:align>`):t.push(`<wp:posOffset>${s(r.posOffset)}</wp:posOffset>`),t.push("</wp:positionV>"),t.join("")}function Y(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 Xe(e,t){let n=e.size.width,r=e.size.height,o=e.rId||"rId1",i=t,c=e.filename||`image${i}`,a="";e.transform?.rotation&&(a+=` rot="${Math.round(e.transform.rotation*6e4)}"`),e.transform?.flipH&&(a+=' flipH="1"'),e.transform?.flipV&&(a+=' flipV="1"');let l=e.opacity!==void 0&&e.opacity<1?`<a:alphaModFix amt="${Math.round(Math.max(0,Math.min(1,e.opacity))*1e5)}"/>`:"",u=l?`<a:blip r:embed="${o}">${l}</a:blip>`:`<a:blip r:embed="${o}"/>`,f=[];e.crop?.left&&f.push(`l="${Math.round(e.crop.left*1e5)}"`),e.crop?.top&&f.push(`t="${Math.round(e.crop.top*1e5)}"`),e.crop?.right&&f.push(`r="${Math.round(e.crop.right*1e5)}"`),e.crop?.bottom&&f.push(`b="${Math.round(e.crop.bottom*1e5)}"`);let m=f.length>0?`<a:srcRect ${f.join(" ")}/>`:"";return ['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">','<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">',"<pic:nvPicPr>",`<pic:cNvPr id="${i}" name="${p(c)}"${e.alt?` descr="${p(e.alt)}"`:""}/>`,"<pic:cNvPicPr/>","</pic:nvPicPr>","<pic:blipFill>",u,m,"<a:stretch><a:fillRect/></a:stretch>","</pic:blipFill>","<pic:spPr>",`<a:xfrm${a}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${s(n)}" cy="${s(r)}"/>`,"</a:xfrm>",'<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>',e.outline?Z(e.outline):"","</pic:spPr>","</pic:pic>","</a:graphicData>","</a:graphic>"].join("")}function Me(e){let t=e.image,n=t.wrap.type!=="inline",r=t.size.width,o=t.size.height,i=t.wrap.distT??0,c=t.wrap.distB??0,a=t.wrap.distL??0,l=t.wrap.distR??0,u=t.padding?.left??0,f=t.padding?.top??0,m=t.padding?.right??0,d=t.padding?.bottom??0,g=`<wp:effectExtent l="${s(u)}" t="${s(f)}" r="${s(m)}" b="${s(d)}"/>`,x=U(t.id),F=t.title||t.filename||`Picture ${x}`,T=Xe(t,x);if(!n)return ["<w:drawing>",`<wp:inline distT="${s(i)}" distB="${s(c)}" distL="${s(a)}" distR="${s(l)}">`,`<wp:extent cx="${s(r)}" cy="${s(o)}"/>`,g,`<wp:docPr id="${x}" name="${p(F)}"${t.alt?` descr="${p(t.alt)}"`:""}${t.decorative?' hidden="1"':""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',T,"</wp:inline>","</w:drawing>"].join("");let j=t.wrap.type==="behind"?"1":"0",O=t.position?V(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',X=Y(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${s(i)}" distB="${s(c)}" distL="${s(a)}" distR="${s(l)}" simplePos="0" relativeHeight="251658240" behindDoc="${j}" locked="0" layoutInCell="${t.layoutInCell===false?"0":"1"}" allowOverlap="${t.allowOverlap===false?"0":"1"}">`,'<wp:simplePos x="0" y="0"/>',O,`<wp:extent cx="${s(r)}" cy="${s(o)}"/>`,g,X,`<wp:docPr id="${x}" name="${p(F)}"${t.alt?` descr="${p(t.alt)}"`:""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',T,"</wp:anchor>","</w:drawing>"].join("")}function Le(e){return e.map(t=>b(t)).join("")}function Ne(e){let t=e.shape,n=t.size.width,r=t.size.height,o=t.shapeType==="textBox",i=t.wrap&&t.wrap.type!=="inline",c=t.wrap?.distT??0,a=t.wrap?.distB??0,l=t.wrap?.distL??0,u=t.wrap?.distR??0,f=U(t.id),m=t.name||(o?`TextBox ${f}`:`Shape ${f}`),d="";t.transform?.rotation&&(d+=` rot="${Math.round(t.transform.rotation*6e4)}"`),t.transform?.flipH&&(d+=' flipH="1"'),t.transform?.flipV&&(d+=' flipV="1"');let g=["<wps:spPr>",`<a:xfrm${d}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${s(n)}" cy="${s(r)}"/>`,"</a:xfrm>",`<a:prstGeom prst="${t.shapeType==="textBox"?"rect":t.shapeType}"><a:avLst/></a:prstGeom>`,Oe(t.fill),Z(t.outline),"</wps:spPr>"].join(""),x="";if(t.textBody){let h=t.textBody,P=['rot="0"','vert="horz"'];h.anchor&&P.push(`anchor="${h.anchor==="middle"?"ctr":h.anchor}"`),h.anchorCenter&&P.push('anchorCtr="1"'),h.margins&&(h.margins.left!=null&&P.push(`lIns="${s(h.margins.left)}"`),h.margins.top!=null&&P.push(`tIns="${s(h.margins.top)}"`),h.margins.right!=null&&P.push(`rIns="${s(h.margins.right)}"`),h.margins.bottom!=null&&P.push(`bIns="${s(h.margins.bottom)}"`)),o?x=["<wps:txbx><w:txbxContent>",Le(h.content),"</w:txbxContent></wps:txbx>",`<wps:bodyPr ${P.join(" ")}/>`].join(""):x=[`<wps:bodyPr ${P.join(" ")}/>`].join("");}let T=['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">',["<wps:wsp>",`<wps:cNvSpPr${o?' txBox="1"':""}/>`,g,x,"</wps:wsp>"].join(""),"</a:graphicData>","</a:graphic>"].join("");if(!i)return ["<w:drawing>",`<wp:inline distT="${s(c)}" distB="${s(a)}" distL="${s(l)}" distR="${s(u)}">`,`<wp:extent cx="${s(n)}" cy="${s(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',`<wp:docPr id="${f}" name="${p(m)}"/>`,"<wp:cNvGraphicFramePr/>",T,"</wp:inline>","</w:drawing>"].join("");let j=t.wrap?.type==="behind"?"1":"0",O=t.position?V(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',X=Y(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${s(c)}" distB="${s(a)}" distL="${s(l)}" distR="${s(u)}" simplePos="0" relativeHeight="251658240" behindDoc="${j}" locked="0" layoutInCell="1" allowOverlap="1">`,'<wp:simplePos x="0" y="0"/>',O,`<wp:extent cx="${s(n)}" cy="${s(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',X,`<wp:docPr id="${f}" name="${p(m)}"/>`,"<wp:cNvGraphicFramePr/>",T,"</wp:anchor>","</w:drawing>"].join("")}function He(e){switch(e.type){case "text":return Ie(e);case "tab":return Re();case "break":return Ee(e);case "symbol":return Ae(e);case "footnoteRef":case "endnoteRef":return De(e);case "fieldChar":return ke(e);case "instrText":return ze(e);case "softHyphen":return Be();case "noBreakHyphen":return je();case "drawing":return Me(e);case "shape":return Ne(e);default:return ""}}function $(e){let t=[],n=Se(e.formatting,e.propertyChanges);n&&t.push(n);for(let r of e.content){let o=He(r);o&&t.push(o);}return `<w:r>${t.join("")}</w:r>`}function I(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="${s(e.size)}"`),e.space!==void 0&&n.push(`w:space="${s(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(e){if(!e)return "";let t=[];if(e.top){let n=I(e.top,"top");n&&t.push(n);}if(e.left){let n=I(e.left,"left");n&&t.push(n);}if(e.bottom){let n=I(e.bottom,"bottom");n&&t.push(n);}if(e.right){let n=I(e.right,"right");n&&t.push(n);}if(e.between){let n=I(e.between,"between");n&&t.push(n);}if(e.bar){let n=I(e.bar,"bar");n&&t.push(n);}return t.length===0?"":`<w:pBdr>${t.join("")}</w:pBdr>`}function We(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 Ge(e){return !e||e.length===0?"":`<w:tabs>${e.map(n=>{let r=[`w:val="${n.alignment}"`,`w:pos="${s(n.position)}"`];return n.leader&&n.leader!=="none"&&r.push(`w:leader="${n.leader}"`),`<w:tab ${r.join(" ")}/>`}).join("")}</w:tabs>`}function Ue(e){let t=[];return e.spaceBefore!==void 0&&t.push(`w:before="${s(e.spaceBefore)}"`),e.spaceAfter!==void 0&&t.push(`w:after="${s(e.spaceAfter)}"`),e.lineSpacing!==void 0&&t.push(`w:line="${s(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 Ze(e){let t=[];return e.indentLeft!==void 0&&t.push(`w:left="${s(e.indentLeft)}"`),e.indentRight!==void 0&&t.push(`w:right="${s(e.indentRight)}"`),e.indentFirstLine!==void 0&&(e.hangingIndent?t.push(`w:hanging="${s(Math.abs(e.indentFirstLine))}"`):e.indentFirstLine!==0&&t.push(`w:firstLine="${s(e.indentFirstLine)}"`)),t.length===0?"":`<w:ind ${t.join(" ")}/>`}function Ve(e){if(!e)return "";let t=[];return e.ilvl!==void 0&&t.push(`<w:ilvl w:val="${s(e.ilvl)}"/>`),e.numId!==void 0&&t.push(`<w:numId w:val="${s(e.numId)}"/>`),t.length===0?"":`<w:numPr>${t.join("")}</w:numPr>`}function Ye(e){if(!e)return "";let t=[];return e.width!==void 0&&t.push(`w:w="${s(e.width)}"`),e.height!==void 0&&t.push(`w:h="${s(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="${s(e.x)}"`),e.y!==void 0&&t.push(`w:y="${s(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 q(e,t){let n=[];if(e){e.styleId&&n.push(`<w:pStyle w:val="${p(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=Ye(e.frame);r&&n.push(r),e.widowControl===false?n.push('<w:widowControl w:val="0"/>'):e.widowControl===true&&n.push("<w:widowControl/>");let o=Ve(e.numPr);o&&n.push(o);let i=_e(e.borders);i&&n.push(i);let c=We(e.shading);c&&n.push(c);let a=Ge(e.tabs);a&&n.push(a),e.suppressLineNumbers&&n.push("<w:suppressLineNumbers/>"),e.suppressAutoHyphens&&n.push("<w:suppressAutoHyphens/>");let l=Ue(e);l&&n.push(l);let u=Ze(e);if(u&&n.push(u),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=S(e.runProperties);f&&n.push(f);}}return t&&t.length>0&&n.push(...t.map(r=>qe(r))),n.length===0?"":`<w:pPr>${n.join("")}</w:pPr>`}function Je(e){return !e.startsWith("<w:pPr>")||!e.endsWith("</w:pPr>")?"":e.slice(7,-8)}function qe(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.info.date=="string"?e.info.date.trim():void 0,i=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,c=[`w:id="${t}"`,`w:author="${p(r)}"`];o&&c.push(`w:date="${p(o)}"`),i&&c.push(`w:rsid="${p(i)}"`);let a=q(e.previousFormatting)||"<w:pPr/>",l=Je(a),u=l.length>0?`<w:pPr>${l}</w:pPr>`:"<w:pPr/>";return `<w:pPrChange ${c.join(" ")}>${u}</w:pPrChange>`}function N(e){let t=[];e.rId&&t.push(`r:id="${e.rId}"`),e.anchor&&t.push(`w:anchor="${p(e.anchor)}"`),e.tooltip&&t.push(`w:tooltip="${p(e.tooltip)}"`),e.target&&t.push(`w:tgtFrame="${p(e.target)}"`),e.history===false&&t.push('w:history="0"'),e.docLocation&&t.push(`w:docLocation="${p(e.docLocation)}"`);let n=e.children.map(o=>o.type==="run"?$(o):o.type==="bookmarkStart"?K(o):o.type==="bookmarkEnd"?Q(o):"").join("");return `<w:hyperlink${t.length>0?" "+t.join(" "):""}>${n}</w:hyperlink>`}function K(e){let t=[`w:id="${e.id}"`,`w:name="${p(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 Q(e){return `<w:bookmarkEnd w:id="${e.id}"/>`}function Ke(e){let t=[],n=e.content.find(a=>a.type==="run"),r=n?.formatting?S(n.formatting):"",o=['w:fldCharType="begin"'];e.fldLock&&o.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${o.join(" ")}/></w:r>`);let c=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${c}>${p(e.instruction)}</w:instrText></w:r>`),t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`);for(let a of e.content)a.type==="run"&&t.push($(a));return t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function Qe(e){let t=[],n=e.fieldResult?.[0]?.formatting,r=n?S(n):"",o=['w:fldCharType="begin"'];if(e.fldLock&&o.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${o.join(" ")}/></w:r>`),e.fieldCode.length>0)t.push(...e.fieldCode.map(i=>$(i)));else {let c=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${c}>${p(e.instruction)}</w:instrText></w:r>`);}return t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`),t.push(...e.fieldResult.map(i=>$(i))),t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function et(e){let t=e.properties,n=[];switch(t.alias&&n.push(`<w:alias w:val="${p(t.alias)}"/>`),t.tag&&n.push(`<w:tag w:val="${p(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="${p(t.dateFormat)}"/>`):n.push("<w:date/>");break;case "dropdown":{let o=(t.listItems??[]).map(i=>`<w:listItem w:displayText="${p(i.displayText)}" w:value="${p(i.value)}"/>`).join("");n.push(`<w:dropDownList>${o}</w:dropDownList>`);break}case "comboBox":{let o=(t.listItems??[]).map(i=>`<w:listItem w:displayText="${p(i.displayText)}" w:value="${p(i.value)}"/>`).join("");n.push(`<w:comboBox>${o}</w:comboBox>`);break}case "checkbox":n.push(`<w14:checkbox><w14:checked w14:val="${t.checked?"1":"0"}"/></w14:checkbox>`);break;case "picture":n.push("<w:picture/>");break}let r=e.content.map(o=>o.type==="run"?$(o):o.type==="hyperlink"?N(o):"").join("");return `<w:sdt><w:sdtPr>${n.join("")}</w:sdtPr><w:sdtContent>${r}</w:sdtContent></w:sdt>`}function J(e,t){let n=[`w:id="${t.id}"`,`w:name="${p(t.name)}"`];return `<w:${e} ${n.join(" ")}/>`}function D(e,t){let n=t.info,r=Number.isInteger(n.id)&&n.id>=0?n.id:0,o=typeof n.author=="string"?n.author.trim():"",i=o.length>0?o:"Unknown",c=typeof n.date=="string"?n.date.trim():void 0,a=[`w:id="${r}"`,`w:author="${p(i)}"`];c&&a.push(`w:date="${p(c)}"`);let l=t.content.map(u=>u.type==="run"?e==="del"||e==="moveFrom"?$(u).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>"):$(u):u.type==="hyperlink"?N(u):"").join("");return `<w:${e} ${a.join(" ")}>${l}</w:${e}>`}function tt(e){switch(e.type){case "run":return $(e);case "hyperlink":return N(e);case "bookmarkStart":return K(e);case "bookmarkEnd":return Q(e);case "simpleField":return Ke(e);case "complexField":return Qe(e);case "inlineSdt":return et(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 D("ins",e);case "deletion":return D("del",e);case "moveFrom":return D("moveFrom",e);case "moveTo":return D("moveTo",e);case "moveFromRangeStart":return J("moveFromRangeStart",e);case "moveFromRangeEnd":return `<w:moveFromRangeEnd w:id="${e.id}"/>`;case "moveToRangeStart":return J("moveToRangeStart",e);case "moveToRangeEnd":return `<w:moveToRangeEnd w:id="${e.id}"/>`;case "mathEquation":return e.ommlXml||"";default:return ""}}function b(e){let t=[],n=[];e.paraId&&n.push(`w14:paraId="${e.paraId}"`),e.textId&&n.push(`w14:textId="${e.textId}"`);let r=n.length>0?" "+n.join(" "):"",o=q(e.formatting,e.propertyChanges);o&&t.push(o);let i=!!e.renderedPageBreakBefore;for(let c of e.content){let a=tt(c);if(a){if(i){let l=nt(a);l&&(a=l,i=false);}t.push(a);}}return `<w:p${r}>${t.join("")}</w:p>`}function nt(e){let t=/<w:r(?=[\s>/])[^>]*>/;return t.test(e)?e.replace(t,n=>`${n}<w:lastRenderedPageBreak/>`):null}function rt(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"?e.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.date=="string"?e.date.trim():void 0;return {id:t,author:r,date:o}}function v(e,t){let n=rt(e),r=[`w:id="${n.id}"`,`w:author="${p(n.author)}"`];return n.date&&r.push(`w:date="${p(n.date)}"`),t&&t.trim().length>0&&r.push(`w:rsid="${p(t.trim())}"`),r.join(" ")}function C(e,t){if(!e)return "";let n=[`w:w="${s(e.value)}"`,`w:type="${e.type}"`];return `<w:${t} ${n.join(" ")}/>`}function R(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="${s(e.size)}"`),e.space!==void 0&&n.push(`w:space="${s(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 ee(e,t){if(!e)return "";let n=[];if(e.top){let r=R(e.top,"top");r&&n.push(r);}if(e.left){let r=R(e.left,"left");r&&n.push(r);}if(e.bottom){let r=R(e.bottom,"bottom");r&&n.push(r);}if(e.right){let r=R(e.right,"right");r&&n.push(r);}if(e.insideH){let r=R(e.insideH,"insideH");r&&n.push(r);}if(e.insideV){let r=R(e.insideV,"insideV");r&&n.push(r);}return n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function te(e,t){if(!e)return "";let n=[];return e.top&&n.push(C(e.top,"top")),e.left&&n.push(C(e.left,"left")),e.bottom&&n.push(C(e.bottom,"bottom")),e.right&&n.push(C(e.right,"right")),n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function ne(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 ot(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 it(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="${s(e.tblpX)}"`),e.tblpXSpec&&t.push(`w:tblpXSpec="${e.tblpXSpec}"`),e.tblpY!==void 0&&t.push(`w:tblpY="${s(e.tblpY)}"`),e.tblpYSpec&&t.push(`w:tblpYSpec="${e.tblpYSpec}"`),e.topFromText!==void 0&&t.push(`w:topFromText="${s(e.topFromText)}"`),e.bottomFromText!==void 0&&t.push(`w:bottomFromText="${s(e.bottomFromText)}"`),e.leftFromText!==void 0&&t.push(`w:leftFromText="${s(e.leftFromText)}"`),e.rightFromText!==void 0&&t.push(`w:rightFromText="${s(e.rightFromText)}"`),t.length===0?"":`<w:tblpPr ${t.join(" ")}/>`}function re(e,t){let n=[];if(e){e.styleId&&n.push(`<w:tblStyle w:val="${p(e.styleId)}"/>`);let r=it(e.floating);r&&n.push(r),e.bidi&&n.push("<w:bidiVisual/>");let o=C(e.width,"tblW");o&&n.push(o),e.justification&&n.push(`<w:jc w:val="${e.justification}"/>`);let i=C(e.cellSpacing,"tblCellSpacing");i&&n.push(i);let c=C(e.indent,"tblInd");c&&n.push(c);let a=ee(e.borders,"tblBorders");a&&n.push(a);let l=te(e.cellMargins,"tblCellMar");l&&n.push(l),e.layout&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);let u=ne(e.shading);u&&n.push(u);let f=ot(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=>at(r))),n.length===0?"":`<w:tblPr>${n.join("")}</w:tblPr>`}function st(e){return !e.startsWith("<w:tblPr>")||!e.endsWith("</w:tblPr>")?"":e.slice(9,-10)}function at(e){let t=v(e.info,e.info.rsid),n=re(e.previousFormatting)||"<w:tblPr/>",r=st(n),o=r.length>0?`<w:tblPr>${r}</w:tblPr>`:"<w:tblPr/>";return `<w:tblPrChange ${t}>${o}</w:tblPrChange>`}function oe(e,t,n){let r=[];if(e){if(e.cantSplit&&r.push("<w:cantSplit/>"),e.header&&r.push("<w:tblHeader/>"),e.height){let o=[`w:val="${s(e.height.value)}"`];e.heightRule&&o.push(`w:hRule="${e.heightRule}"`),r.push(`<w:trHeight ${o.join(" ")}/>`);}e.justification&&r.push(`<w:jc w:val="${e.justification}"/>`),e.hidden&&r.push("<w:hidden/>");}return n&&(n.type==="tableRowInsertion"?r.push(`<w:ins ${v(n.info)}/>`):n.type==="tableRowDeletion"&&r.push(`<w:del ${v(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(o=>lt(o))),r.length===0?"":`<w:trPr>${r.join("")}</w:trPr>`}function ct(e){return !e.startsWith("<w:trPr>")||!e.endsWith("</w:trPr>")?"":e.slice(8,-9)}function lt(e){let t=v(e.info,e.info.rsid),n=oe(e.previousFormatting)||"<w:trPr/>",r=ct(n),o=r.length>0?`<w:trPr>${r}</w:trPr>`:"<w:trPr/>";return `<w:trPrChange ${t}>${o}</w:trPrChange>`}function pt(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 ie(e,t,n){let r=[];if(e){let o=pt(e.conditionalFormat);o&&r.push(o);let i=C(e.width,"tcW");i&&r.push(i),e.gridSpan&&e.gridSpan>1&&r.push(`<w:gridSpan w:val="${s(e.gridSpan)}"/>`),e.vMerge&&(e.vMerge==="restart"?r.push('<w:vMerge w:val="restart"/>'):r.push("<w:vMerge/>"));let c=ee(e.borders,"tcBorders");c&&r.push(c);let a=ne(e.shading);a&&r.push(a),e.noWrap&&r.push("<w:noWrap/>");let l=te(e.margins,"tcMar");l&&r.push(l),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 ${v(n.info)}/>`):n.type==="tableCellDeletion"?r.push(`<w:cellDel ${v(n.info)}/>`):n.type==="tableCellMerge"&&r.push(`<w:cellMerge ${v(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(o=>ut(o))),r.length===0?"":`<w:tcPr>${r.join("")}</w:tcPr>`}function ft(e){return !e.startsWith("<w:tcPr>")||!e.endsWith("</w:tcPr>")?"":e.slice(8,-9)}function ut(e){let t=v(e.info,e.info.rsid),n=ie(e.previousFormatting)||"<w:tcPr/>",r=ft(n),o=r.length>0?`<w:tcPr>${r}</w:tcPr>`:"<w:tcPr/>";return `<w:tcPrChange ${t}>${o}</w:tcPrChange>`}function mt(e){return !e||e.length===0?"":`<w:tblGrid>${e.map(n=>`<w:gridCol w:w="${s(n)}"/>`).join("")}</w:tblGrid>`}function dt(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(b(n)):n.type==="table"&&t.push(E(n));return t.length===0&&t.push("<w:p/>"),t.join("")}function ht(e){let t=[],n=ie(e.formatting,e.propertyChanges,e.structuralChange);return n&&t.push(n),t.push(dt(e.content)),`<w:tc>${t.join("")}</w:tc>`}function wt(e){let t=[],n=oe(e.formatting,e.propertyChanges,e.structuralChange);n&&t.push(n);for(let r of e.cells)t.push(ht(r));return `<w:tr>${t.join("")}</w:tr>`}function E(e){let t=[],n=re(e.formatting,e.propertyChanges);n&&t.push(n);let r=mt(e.columnWidths);r&&t.push(r);for(let o of e.rows)t.push(wt(o));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 gt(){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 k(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="${s(e.size)}"`),e.space!==void 0&&n.push(`w:space="${s(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 xt(e){return `<w:headerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function yt(e){return `<w:footerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function $t(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 Tt(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 Pt(e){let t=[];return e.pageWidth!==void 0&&t.push(`w:w="${s(e.pageWidth)}"`),e.pageHeight!==void 0&&t.push(`w:h="${s(e.pageHeight)}"`),e.orientation==="landscape"&&t.push('w:orient="landscape"'),t.length===0?"":`<w:pgSz ${t.join(" ")}/>`}function bt(e){let t=[];return e.marginTop!==void 0&&t.push(`w:top="${s(e.marginTop)}"`),e.marginRight!==void 0&&t.push(`w:right="${s(e.marginRight)}"`),e.marginBottom!==void 0&&t.push(`w:bottom="${s(e.marginBottom)}"`),e.marginLeft!==void 0&&t.push(`w:left="${s(e.marginLeft)}"`),e.headerDistance!==void 0&&t.push(`w:header="${s(e.headerDistance)}"`),e.footerDistance!==void 0&&t.push(`w:footer="${s(e.footerDistance)}"`),e.gutter!==void 0&&t.push(`w:gutter="${s(e.gutter)}"`),t.length===0?"":`<w:pgMar ${t.join(" ")}/>`}function Ct(e){if(!e.columnCount&&!e.columns?.length)return "";let t=[];e.columnCount!==void 0&&e.columnCount>1&&t.push(`w:num="${s(e.columnCount)}"`),e.columnSpace!==void 0&&t.push(`w:space="${s(e.columnSpace)}"`),e.equalWidth!==void 0&&t.push(`w:equalWidth="${e.equalWidth?"1":"0"}"`),e.separator&&t.push('w:sep="1"');let n="";return e.columns&&e.columns.length>0&&(n=e.columns.map(o=>{let i=[];return o.width!==void 0&&i.push(`w:w="${s(o.width)}"`),o.space!==void 0&&i.push(`w:space="${s(o.space)}"`),`<w:col ${i.join(" ")}/>`}).join("")),t.length===0&&!n?"":`<w:cols${t.length>0?" "+t.join(" "):""}>${n}</w:cols>`}function vt(e){if(!e.lineNumbers)return "";let t=e.lineNumbers,n=[];return t.countBy!==void 0&&n.push(`w:countBy="${s(t.countBy)}"`),t.start!==void 0&&n.push(`w:start="${s(t.start)}"`),t.distance!==void 0&&n.push(`w:distance="${s(t.distance)}"`),t.restart&&n.push(`w:restart="${t.restart}"`),n.length===0?"":`<w:lnNumType ${n.join(" ")}/>`}function Ft(e){if(!e.pageBorders)return "";let t=e.pageBorders,n=[],r=[];if(t.display&&n.push(`w:display="${t.display}"`),t.offsetFrom&&n.push(`w:offsetFrom="${t.offsetFrom}"`),t.zOrder&&n.push(`w:zOrder="${t.zOrder}"`),t.top){let i=k(t.top,"top");i&&r.push(i);}if(t.left){let i=k(t.left,"left");i&&r.push(i);}if(t.bottom){let i=k(t.bottom,"bottom");i&&r.push(i);}if(t.right){let i=k(t.right,"right");i&&r.push(i);}return r.length===0?"":`<w:pgBorders${n.length>0?" "+n.join(" "):""}>${r.join("")}</w:pgBorders>`}function St(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 It(e){if(!e)return "";let t=[];if(e.headerReferences)for(let f of e.headerReferences)t.push(xt(f));if(e.footerReferences)for(let f of e.footerReferences)t.push(yt(f));let n=$t(e.footnotePr);n&&t.push(n);let r=Tt(e.endnotePr);r&&t.push(r),e.sectionStart&&t.push(`<w:type w:val="${e.sectionStart}"/>`);let o=Pt(e);o&&t.push(o);let i=bt(e);if(i&&t.push(i),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 c=Ft(e);c&&t.push(c);let a=vt(e);a&&t.push(a);let l=Ct(e);l&&t.push(l);let u=St(e);return u&&t.push(u),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 se(e){if(e.type==="paragraph")return b(e);if(e.type==="table")return E(e);if(e.type==="blockSdt"){let t=e.content.map(o=>se(o)).join(""),n=e.properties,r=[];return n.alias&&r.push(`<w:alias w:val="${n.alias}"/>`),n.tag&&r.push(`<w:tag w:val="${n.tag}"/>`),`<w:sdt><w:sdtPr>${r.join("")}</w:sdtPr><w:sdtContent>${t}</w:sdtContent></w:sdt>`}return ""}function Rt(e){return e.map(t=>se(t)).join("")}function Et(e){let t=[];return t.push(Rt(e.content)),e.finalSectionProperties&&t.push(It(e.finalSectionProperties)),t.join("")}function ae(e){G();let t=[];t.push('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>');let n=gt();return t.push(`<w:document ${n} mc:Ignorable="w14 w15 wp14">`),t.push("<w:body>"),t.push(Et(e.package.document)),t.push("</w:body>"),t.push("</w:document>"),t.join("")}var A=chunkH5NTJZO4_js.c(chunkIFPN3NT3_js.a());var At={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 Dt(){return Object.entries(At).map(([e,t])=>`xmlns:${e}="${t}"`).join(" ")}function kt(e){return e.type==="paragraph"?b(e):e.type==="table"?E(e):""}function ce(e){let t=e.type==="header"?"w:hdr":"w:ftr",n=Dt(),r=e.content.map(o=>kt(o)).join("");return r||(r="<w:p><w:pPr/></w:p>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <${t} ${n}>${r}</${t}>`}var z='xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"',B='mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"';function ue(e){let t="<w:r>",n=[];e.formatting?.bold&&n.push("<w:b/>"),e.formatting?.italic&&n.push("<w:i/>"),n.length>0&&(t+=`<w:rPr>${n.join("")}</w:rPr>`);for(let r of e.content)if(r.type==="text"){let o=r.text!==r.text.trim()||r.text.includes(" ");t+=o?`<w:t xml:space="preserve">${p(r.text)}</w:t>`:`<w:t>${p(r.text)}</w:t>`;}else r.type==="break"&&(t+="<w:br/>");return t+="</w:r>",t}function le(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";for(let r of e.content)r.type==="run"&&(n+=ue(r));return n+="</w:p>",n}function pe(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";n+='<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r>';for(let r of e.content)r.type==="run"&&(n+=ue(r));return n+="</w:p>",n}function fe(e,t){let n=chunkZ3KMSHUP_js.a(),r=[`w:id="${e.id}"`];if(e.author&&r.push(`w:author="${p(e.author)}"`),e.initials?r.push(`w:initials="${p(e.initials)}"`):r.push('w:initials=""'),e.date){let i=e.date.replace(/\.\d{3}Z$/,"Z");r.push(`w:date="${p(i)}"`);}let o=`<w:comment ${r.join(" ")}>`;if(e.content&&e.content.length>0)if(e.content.length===1)o+=pe(e.content[0],n);else {o+=pe(e.content[0]);for(let i=1;i<e.content.length-1;i++)o+=le(e.content[i]);o+=le(e.content[e.content.length-1],n);}else o+=`<w:p w14:paraId="${n}"><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>`;return o+="</w:comment>",t.push({commentId:e.id,lastParaId:n,durableId:chunkZ3KMSHUP_js.a(),parentId:e.parentId,done:e.done}),o}function me(e){if(!e||e.length===0)return {xml:"",paraInfos:[]};let t=[],n=[];for(let i of e)(i.parentId==null?t:n).push(i);let r=[],o=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${z} ${B}>`;for(let i of t)o+=fe(i,r);for(let i of n)o+=fe(i,r);return o+="</w:comments>",{xml:o,paraInfos:r}}function de(e){if(e.length===0)return "";let t=new Map;for(let r of e)t.set(r.commentId,r.lastParaId);let n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${z} ${B}>`;for(let r of e){let o=`w15:paraId="${r.lastParaId}" w15:done="${r.done?"1":"0"}"`;if(r.parentId!=null){let i=t.get(r.parentId);i&&(o+=` w15:paraIdParent="${i}"`);}n+=`<w15:commentEx ${o} />`;}return n+="</w15:commentsEx>",n}function he(e){if(e.length===0)return "";let t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cid:commentsIds ${z} ${B}>`;for(let n of e)t+=`<w16cid:commentId w16cid:paraId="${n.lastParaId}" w16cid:durableId="${n.durableId}" />`;return t+="</w16cid:commentsIds>",t}function we(e,t){if(e.length===0)return "";let n=new Map;for(let o of t)n.set(o.id,o);let r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cex:commentsExtensible ${z} ${B}>`;for(let o of e){let i=n.get(o.commentId);if(!i?.date)continue;let c=o.durableId,a=(i.date.endsWith("Z")?i.date:i.date+"Z").replace(/\.\d{3}Z$/,"Z");r+=`<w16cex:commentExtensible w16cex:durableId="${c}" w16cex:dateUtc="${a}"/>`;}return r+="</w16cex:commentsExtensible>",r}function H(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 zt(e,t,n){let r=e.package.document.comments;if(!r||r.length===0)return;let{xml:o,paraInfos:i}=me(r);t.file("word/comments.xml",o,{compression:"DEFLATE",compressionOptions:{level:n}});let c=de(i);c&&t.file("word/commentsExtended.xml",c,{compression:"DEFLATE",compressionOptions:{level:n}});let a=he(i);a&&t.file("word/commentsIds.xml",a,{compression:"DEFLATE",compressionOptions:{level:n}});let l=we(i,r);l&&t.file("word/commentsExtensible.xml",l,{compression:"DEFLATE",compressionOptions:{level:n}}),await qt(t,n);}function ge(e){let t=[];for(let n of e)if(n.type==="paragraph"){for(let r of n.content)if(r.type==="run")for(let o of r.content)o.type==="drawing"&&o.image.src?.startsWith("data:")&&t.push(o.image);}else if(n.type==="table")for(let r of n.rows)for(let o of r.cells)t.push(...ge(o.content));return t}var Bt={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function jt(e){let t=e.match(/^data:([^;]+);base64,(.+)$/);if(!t)throw new Error("Invalid data URL");let n=atob(t[2]),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return {data:r.buffer,extension:Bt[t[1]]||"png"}}var Ot=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;function xe(e){return e.startsWith("/")?e.slice(1):`word/${e}`}function Xt(e){let t=[{relsPath:"word/_rels/document.xml.rels",blocks:e.package.document.content}],n=e.package.relationships;if(!n)return t;let r=(o,i)=>{if(o)for(let[c,a]of o.entries()){let l=n.get(c);if(!l||l.type!==i||!l.target)continue;let f=xe(l.target).replace(/^word\//,"");t.push({relsPath:`word/_rels/${f}.rels`,blocks:a.content});}};return r(e.package.headers,chunkMOE2ZGUE_js.i.header),r(e.package.footers,chunkMOE2ZGUE_js.i.footer),t}async function _(e,t){let n=e.file(t);return (n?await n.async("text"):Ot).replace(/<Relationships([^>]*)\/>/,"<Relationships$1></Relationships>")}async function Mt(e,t,n){if(t.size===0)return;let r=e.file("[Content_Types].xml");if(!r)return;let o=await r.async("text"),i=false;for(let c of t)if(!o.includes(`Extension="${c}"`)){let a=nn(c);o=o.replace("</Types>",`<Default Extension="${c}" ContentType="${a}"/></Types>`),i=true;}i&&e.file("[Content_Types].xml",o,{compression:"DEFLATE",compressionOptions:{level:n}});}function Lt(e){let t=0;return e.forEach(n=>{let r=n.match(/^word\/media\/image(\d+)\./);if(r){let o=parseInt(r[1],10);o>t&&(t=o);}}),t}async function Nt(e,t,n){let r=Lt(t),o=new Set;for(let{relsPath:i,blocks:c}of e){let a=ge(c);if(a.length===0)continue;let l=await _(t,i),u=H(l),f=[];for(let d of a){let{data:g,extension:x}=jt(d.src);r++,u++;let F=`image${r}.${x}`,T=`rId${u}`;t.file(`word/media/${F}`,g,{compression:"DEFLATE",compressionOptions:{level:n}}),f.push(`<Relationship Id="${T}" Type="${chunkMOE2ZGUE_js.i.image}" Target="media/${F}"/>`),o.add(x),d.rId=T;}let m=l.replace("</Relationships>",f.join("")+"</Relationships>");t.file(i,m,{compression:"DEFLATE",compressionOptions:{level:n}});}await Mt(t,o,n);}function ye(e){let t=[];for(let n of e)if(n.type==="paragraph")for(let r of n.content)r.type==="hyperlink"&&r.href&&!r.rId&&!r.anchor&&t.push(r);else if(n.type==="table")for(let r of n.rows)for(let o of r.cells)t.push(...ye(o.content));return t}async function Ht(e,t,n){for(let{relsPath:r,blocks:o}of e){let i=ye(o);if(i.length===0)continue;let c=await _(t,r),a=H(c),l=[];for(let f of i){a++;let m=`rId${a}`;l.push(`<Relationship Id="${m}" Type="${chunkMOE2ZGUE_js.i.hyperlink}" Target="${p(f.href)}" TargetMode="External"/>`),f.rId=m;}let u=c.replace("</Relationships>",l.join("")+"</Relationships>");t.file(r,u,{compression:"DEFLATE",compressionOptions:{level:n}});}}async function _t(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:o}=t,i=e,c=await A.default.loadAsync(e.originalBuffer),a=new A.default;for(let[m,d]of Object.entries(c.files)){if(d.dir){a.folder(m.replace(/\/$/,""));continue}let g=await d.async("arraybuffer");a.file(m,g,{compression:"DEFLATE",compressionOptions:{level:n}});}let l=Xt(i);await Nt(l,a,n),await Ht(l,a,n);let u=ae(i);if(a.file("word/document.xml",u,{compression:"DEFLATE",compressionOptions:{level:n}}),en(i,a,n),await Jt(i,a,n),await zt(i,a,n),r){let m="docProps/core.xml",d=c.file(m);if(d){let g=await d.async("text"),x=tn(g,{updateModifiedDate:r,modifiedBy:o});a.file(m,x,{compression:"DEFLATE",compressionOptions:{level:n}});}}return await a.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:n}})}var Wt="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",Gt="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",Ut="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",Zt="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",Vt="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",Yt="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function Jt(e,t,n){let r=e.package.relationships;if(!r)return;let o=[];for(let[u,f]of r){if(!f.target)continue;let m=f.type===chunkMOE2ZGUE_js.i.header?Wt:f.type===chunkMOE2ZGUE_js.i.footer?Gt:null;m&&o.push({rId:u,target:f.target.replace(/^(\/?word\/)/,""),contentType:m,relType:f.type});}if(o.length===0)return;let i=t.file("[Content_Types].xml");if(i){let u=await i.async("text"),f=false;for(let{target:m,contentType:d}of o){let g=`/word/${m}`;u.includes(`PartName="${g}"`)||(u=u.replace("</Types>",`<Override PartName="${g}" ContentType="${d}"/></Types>`),f=true);}f&&t.file("[Content_Types].xml",u,{compression:"DEFLATE",compressionOptions:{level:n}});}let c="word/_rels/document.xml.rels",a=await _(t,c),l=false;for(let{rId:u,relType:f,target:m}of o)a.includes(`Id="${u}"`)||(a=a.replace("</Relationships>",`<Relationship Id="${u}" Type="${f}" Target="${m}"/></Relationships>`),l=true);l&&t.file(c,a,{compression:"DEFLATE",compressionOptions:{level:n}});}async function qt(e,t){let n=[{partName:"/word/comments.xml",contentType:Ut,target:"comments.xml",relType:chunkMOE2ZGUE_js.i.comments},{partName:"/word/commentsExtended.xml",contentType:Zt,target:"commentsExtended.xml",relType:chunkMOE2ZGUE_js.i.commentsExtended},{partName:"/word/commentsIds.xml",contentType:Vt,target:"commentsIds.xml",relType:chunkMOE2ZGUE_js.i.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:Yt,target:"commentsExtensible.xml",relType:chunkMOE2ZGUE_js.i.commentsExtensible}],r=e.file("[Content_Types].xml");if(r){let c=await r.async("text"),a=false;for(let{partName:l,contentType:u}of n)c.includes(l)||(c=c.replace("</Types>",`<Override PartName="${l}" ContentType="${u}"/></Types>`),a=true);a&&e.file("[Content_Types].xml",c,{compression:"DEFLATE",compressionOptions:{level:t}});}let o="word/_rels/document.xml.rels",i=e.file(o);if(i){let c=await i.async("text"),a=false;for(let{target:l,relType:u}of n)if(!c.includes(l)){let f=`rId${H(c)+1}`;c=c.replace("</Relationships>",`<Relationship Id="${f}" Type="${u}" Target="${l}"/></Relationships>`),a=true;}a&&e.file(o,c,{compression:"DEFLATE",compressionOptions:{level:t}});}}async function An(e,t,n={}){let r=await A.default.loadAsync(e);return Kt(r,t,n)}async function Kt(e,t,n={}){let{compressionLevel:r=6}=n;for(let[o,i]of t)e.file(o,i,{compression:"DEFLATE",compressionOptions:{level:r}});return e.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:r}})}function Qt(e){let t=new Map,n=e.package.relationships;if(!n)return t;let r=[{map:e.package.headers,type:chunkMOE2ZGUE_js.i.header},{map:e.package.footers,type:chunkMOE2ZGUE_js.i.footer}];for(let{map:o,type:i}of r)if(o)for(let[c,a]of o.entries()){let l=n.get(c);l&&l.type===i&&l.target&&t.set(xe(l.target),ce(a));}return t}function en(e,t,n){let r={level:n};for(let[o,i]of Qt(e))t.file(o,i,{compression:"DEFLATE",compressionOptions:r});}function tn(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>${p(t.modifiedBy)}</cp:lastModifiedBy>`):n=n.replace("</cp:coreProperties>",`<cp:lastModifiedBy>${p(t.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)),n}function nn(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 rn(){let e=new A.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 Dn(e){let t=await rn(),n={...e,originalBuffer:t};return _t(n)}exports.a=It;exports.b=Et;exports.c=ae;exports.d=me;exports.e=de;exports.f=he;exports.g=we;exports.h=H;exports.i=_t;exports.j=Ut;exports.k=Zt;exports.l=Vt;exports.m=Yt;exports.n=An;exports.o=Kt;exports.p=Qt;exports.q=tn;exports.r=Dn;
@@ -1,10 +1,10 @@
1
- import {b as b$1,f as f$1}from'./chunk-DLVLK5FT.mjs';import {n}from'./chunk-7MGFEP2R.mjs';function _(e){return g(e).variables}function g(e){let t=[],n={body:[],headers:[],footers:[],footnotes:[],endnotes:[],textBoxes:[]};if(e.package?.document){let r=A(e.package.document);r.forEach(o=>{t.push({name:o,location:"body"});}),n.body=Array.from(new Set(r)).sort();}if(e.package?.document?.sections&&e.package.document.sections.forEach((r,o)=>{r.properties.headerReferences&&r.properties.headerReferences.forEach(i=>{});}),e.package?.footnotes){let r=C(e.package.footnotes);r.forEach(o=>{t.push({name:o,location:"footnote"});}),n.footnotes=Array.from(new Set(r)).sort();}if(e.package?.endnotes){let r=C(e.package.endnotes);r.forEach(o=>{t.push({name:o,location:"endnote"});}),n.endnotes=Array.from(new Set(r)).sort();}e.templateVariables&&e.templateVariables.forEach(r=>{t.some(o=>o.name===r)||t.push({name:r,location:"body"});});let a=new Set;return t.forEach(r=>a.add(r.name)),{variables:Array.from(a).sort(),totalOccurrences:t.length,byLocation:n,occurrences:t}}function A(e){let t=[];if(e.content&&t.push(...w(e.content)),e.sections)for(let n of e.sections)n.content&&t.push(...w(n.content));return t}function w(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(...b(n)):n.type==="table"&&t.push(...I(n));return t}function b(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="run"?t.push(...d(n)):n.type==="hyperlink"?t.push(...O(n)):n.type==="simpleField"?t.push(...N(n)):n.type==="complexField"&&t.push(...H(n));return t}function d(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="text"&&n.text&&t.push(...P(n.text));return t}function O(e){let t=[];if(!e.children)return t;for(let n of e.children)n.type==="run"&&t.push(...d(n));return t}function N(e){let t=[];if(e.instruction&&t.push(...P(e.instruction)),e.content)for(let n of e.content)n.type==="run"&&t.push(...d(n));return t}function H(e){let t=[];if(e.fieldCode)for(let n of e.fieldCode)n.type==="run"&&t.push(...d(n));if(e.fieldResult)for(let n of e.fieldResult)n.type==="run"&&t.push(...d(n));return t}function I(e){let t=[];if(!e.rows)return t;for(let n of e.rows)if(n.cells)for(let a of n.cells)t.push(...$(a));return t}function $(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="paragraph"?t.push(...b(n)):n.type==="table"&&t.push(...I(n));return t}function C(e){let t=[];for(let n of e)if(n.content)for(let a of n.content)t.push(...b(a));return t}var R=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g,D=/\{(.+?)\}/g;function P(e){if(!e)return [];let t=[],n=new RegExp(R),a;for(;(a=n.exec(e))!==null;)t.push(a[1]);return t}function q(e){return R.test(e)}function U(e){return !(!e||typeof e!="string"||e.length===0||e.length>100||!/^[a-zA-Z_]/.test(e)||!/^[a-zA-Z_][a-zA-Z0-9_\-\.]*$/.test(e))}function X(e){if(!e)return "";let t=e.replace(/\s+/g,"_");return t=t.replace(/[^a-zA-Z0-9_\-\.]/g,""),t&&!/^[a-zA-Z_]/.test(t)&&(t="_"+t),t.substring(0,100)}function G(e){return `{${e}}`}function K(e){let t=e.match(/^\{(.+?)\}$/);return t?t[1]:null}function Q(e,t){return e&&e.replace(D,(n,a)=>{let r=a.trim();return r in t?t[r]:n})}function Y(e,t=""){return e&&e.replace(D,t)}function ee(e){return _(e).length>0}function J(e){return typeof e=="object"&&e!==null&&("_def"in e||"parse"in e||"safeParse"in e)}function k(e,t){let n=t,{position:a,variableName:r}=n,o=JSON.parse(JSON.stringify(e)),s=o.package.document.content.filter(u=>u.type==="paragraph");if(a.paragraphIndex>=s.length)throw new Error(`Paragraph index ${a.paragraphIndex} out of bounds`);let c=s[a.paragraphIndex],l=`{${r}}`;return E(c,a.offset,l),o.templateVariables||(o.templateVariables=[]),o.templateVariables.includes(r)||o.templateVariables.push(r),o}function M(e,t){let n=t,{range:a,variableName:r}=n,o=JSON.parse(JSON.stringify(e)),s=o.package.document.content.filter(u=>u.type==="paragraph");if(a.start.paragraphIndex!==a.end.paragraphIndex)throw new Error("Template variable replacement cannot span multiple paragraphs");if(a.start.paragraphIndex>=s.length)throw new Error(`Paragraph index ${a.start.paragraphIndex} out of bounds`);let c=s[a.start.paragraphIndex];L(c,a.start.offset,a.end.offset);let l=`{${r}}`;return E(c,a.start.offset,l),o.templateVariables||(o.templateVariables=[]),o.templateVariables.includes(r)||o.templateVariables.push(r),o}function E(e,t,n){let a=0,r=false;for(let o=0;o<e.content.length;o++){let i=e.content[o];if(i.type==="run"){let s=x(i),c=a,l=a+s.length;if(!r&&t>=c&&t<=l){let u=t-c,h=s.slice(0,u),y=s.slice(u),m=[];for(let p=0;p<o;p++)m.push(e.content[p]);h&&m.push({type:"run",formatting:i.formatting,content:[{type:"text",text:h}]}),m.push({type:"run",formatting:i.formatting,content:[{type:"text",text:n}]}),y&&m.push({type:"run",formatting:i.formatting,content:[{type:"text",text:y}]});for(let p=o+1;p<e.content.length;p++)m.push(e.content[p]);e.content=m,r=true;break}a=l;}else if(i.type==="hyperlink")for(let s of i.children)s.type==="run"&&(a+=x(s).length);}r||e.content.push({type:"run",content:[{type:"text",text:n}]});}function L(e,t,n){let a=[],r=0;for(let o of e.content)if(o.type==="run"){let i=x(o),s=r,c=r+i.length;if(c<=t||s>=n)a.push(o);else {let l="";s<t&&(l+=i.slice(0,t-s)),c>n&&(l+=i.slice(n-s)),l.length>0&&a.push({type:"run",formatting:o.formatting,content:[{type:"text",text:l}]});}r=c;}else a.push(o);e.content=a;}function x(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}var f={type:"string",description:"Document ID from a previous docx_load call"},F={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)"},offset:{type:"number",description:"Character offset within the paragraph"}},required:["paragraphIndex","offset"]},B={name:"docx_get_variables",description:`List all template variables ({name} format) found in the document.
1
+ import {a}from'./chunk-IOAGVW6Q.mjs';import {b as b$1,f as f$1}from'./chunk-LVGJKS7Y.mjs';function _(e){return g(e).variables}function g(e){let t=[],n={body:[],headers:[],footers:[],footnotes:[],endnotes:[],textBoxes:[]};if(e.package?.document){let r=A(e.package.document);r.forEach(o=>{t.push({name:o,location:"body"});}),n.body=Array.from(new Set(r)).sort();}if(e.package?.document?.sections&&e.package.document.sections.forEach((r,o)=>{r.properties.headerReferences&&r.properties.headerReferences.forEach(i=>{});}),e.package?.footnotes){let r=C(e.package.footnotes);r.forEach(o=>{t.push({name:o,location:"footnote"});}),n.footnotes=Array.from(new Set(r)).sort();}if(e.package?.endnotes){let r=C(e.package.endnotes);r.forEach(o=>{t.push({name:o,location:"endnote"});}),n.endnotes=Array.from(new Set(r)).sort();}e.templateVariables&&e.templateVariables.forEach(r=>{t.some(o=>o.name===r)||t.push({name:r,location:"body"});});let a=new Set;return t.forEach(r=>a.add(r.name)),{variables:Array.from(a).sort(),totalOccurrences:t.length,byLocation:n,occurrences:t}}function A(e){let t=[];if(e.content&&t.push(...w(e.content)),e.sections)for(let n of e.sections)n.content&&t.push(...w(n.content));return t}function w(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(...b(n)):n.type==="table"&&t.push(...I(n));return t}function b(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="run"?t.push(...d(n)):n.type==="hyperlink"?t.push(...O(n)):n.type==="simpleField"?t.push(...N(n)):n.type==="complexField"&&t.push(...H(n));return t}function d(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="text"&&n.text&&t.push(...P(n.text));return t}function O(e){let t=[];if(!e.children)return t;for(let n of e.children)n.type==="run"&&t.push(...d(n));return t}function N(e){let t=[];if(e.instruction&&t.push(...P(e.instruction)),e.content)for(let n of e.content)n.type==="run"&&t.push(...d(n));return t}function H(e){let t=[];if(e.fieldCode)for(let n of e.fieldCode)n.type==="run"&&t.push(...d(n));if(e.fieldResult)for(let n of e.fieldResult)n.type==="run"&&t.push(...d(n));return t}function I(e){let t=[];if(!e.rows)return t;for(let n of e.rows)if(n.cells)for(let a of n.cells)t.push(...$(a));return t}function $(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="paragraph"?t.push(...b(n)):n.type==="table"&&t.push(...I(n));return t}function C(e){let t=[];for(let n of e)if(n.content)for(let a of n.content)a.type==="paragraph"&&t.push(...b(a));return t}var R=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g,D=/\{(.+?)\}/g;function P(e){if(!e)return [];let t=[],n=new RegExp(R),a;for(;(a=n.exec(e))!==null;)t.push(a[1]);return t}function q(e){return R.test(e)}function U(e){return !(!e||typeof e!="string"||e.length===0||e.length>100||!/^[a-zA-Z_]/.test(e)||!/^[a-zA-Z_][a-zA-Z0-9_\-\.]*$/.test(e))}function X(e){if(!e)return "";let t=e.replace(/\s+/g,"_");return t=t.replace(/[^a-zA-Z0-9_\-\.]/g,""),t&&!/^[a-zA-Z_]/.test(t)&&(t="_"+t),t.substring(0,100)}function G(e){return `{${e}}`}function K(e){let t=e.match(/^\{(.+?)\}$/);return t?t[1]:null}function Q(e,t){return e&&e.replace(D,(n,a)=>{let r=a.trim();return r in t?t[r]:n})}function Y(e,t=""){return e&&e.replace(D,t)}function ee(e){return _(e).length>0}function J(e){return typeof e=="object"&&e!==null&&("_def"in e||"parse"in e||"safeParse"in e)}function k(e,t){let n=t,{position:a,variableName:r}=n,o=JSON.parse(JSON.stringify(e)),s=o.package.document.content.filter(u=>u.type==="paragraph");if(a.paragraphIndex>=s.length)throw new Error(`Paragraph index ${a.paragraphIndex} out of bounds`);let c=s[a.paragraphIndex],l=`{${r}}`;return E(c,a.offset,l),o.templateVariables||(o.templateVariables=[]),o.templateVariables.includes(r)||o.templateVariables.push(r),o}function M(e,t){let n=t,{range:a,variableName:r}=n,o=JSON.parse(JSON.stringify(e)),s=o.package.document.content.filter(u=>u.type==="paragraph");if(a.start.paragraphIndex!==a.end.paragraphIndex)throw new Error("Template variable replacement cannot span multiple paragraphs");if(a.start.paragraphIndex>=s.length)throw new Error(`Paragraph index ${a.start.paragraphIndex} out of bounds`);let c=s[a.start.paragraphIndex];L(c,a.start.offset,a.end.offset);let l=`{${r}}`;return E(c,a.start.offset,l),o.templateVariables||(o.templateVariables=[]),o.templateVariables.includes(r)||o.templateVariables.push(r),o}function E(e,t,n){let a=0,r=false;for(let o=0;o<e.content.length;o++){let i=e.content[o];if(i.type==="run"){let s=x(i),c=a,l=a+s.length;if(!r&&t>=c&&t<=l){let u=t-c,h=s.slice(0,u),y=s.slice(u),m=[];for(let p=0;p<o;p++)m.push(e.content[p]);h&&m.push({type:"run",formatting:i.formatting,content:[{type:"text",text:h}]}),m.push({type:"run",formatting:i.formatting,content:[{type:"text",text:n}]}),y&&m.push({type:"run",formatting:i.formatting,content:[{type:"text",text:y}]});for(let p=o+1;p<e.content.length;p++)m.push(e.content[p]);e.content=m,r=true;break}a=l;}else if(i.type==="hyperlink")for(let s of i.children)s.type==="run"&&(a+=x(s).length);}r||e.content.push({type:"run",content:[{type:"text",text:n}]});}function L(e,t,n){let a=[],r=0;for(let o of e.content)if(o.type==="run"){let i=x(o),s=r,c=r+i.length;if(c<=t||s>=n)a.push(o);else {let l="";s<t&&(l+=i.slice(0,t-s)),c>n&&(l+=i.slice(n-s)),l.length>0&&a.push({type:"run",formatting:o.formatting,content:[{type:"text",text:l}]});}r=c;}else a.push(o);e.content=a;}function x(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}var f={type:"string",description:"Document ID from a previous docx_load call"},F={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)"},offset:{type:"number",description:"Character offset within the paragraph"}},required:["paragraphIndex","offset"]},B={name:"docx_get_variables",description:`List all template variables ({name} format) found in the document.
2
2
  Returns variable names without braces, along with their locations (body, headers, footers, etc.).
3
3
  Use this to discover what data fields a template document expects.`,inputSchema:{type:"object",properties:{documentId:f},required:["documentId"]},handler:async(e,t)=>{let{documentId:n}=e,a=t.session.documents.get(n);if(!a)return {isError:true,content:[{type:"text",text:`Document not found: ${n}`}]};try{let r=g(a.document);return {content:[{type:"text",text:JSON.stringify({variables:r.variables,count:r.variables.length,totalOccurrences:r.totalOccurrences,byLocation:r.byLocation},null,2)}]}}catch(r){return {isError:true,content:[{type:"text",text:`Failed to detect variables: ${r.message}`}]}}},annotations:{category:"template",readOnly:true,complexity:"low",examples:[{description:"Get all variables from a loaded document",input:{documentId:"doc_123"},output:'{"variables": ["customer_name", "invoice_date"], "count": 2}'}]}},Z={name:"docx_insert_variable",description:`Insert a template variable placeholder ({name}) at a specific position in the document.
4
4
  The variable can later be substituted with actual values using docx_apply_template.
5
- Variable names should follow the pattern: letters, numbers, underscores, starting with a letter.`,inputSchema:{type:"object",properties:{documentId:f,position:F,variableName:{type:"string",description:'Variable name without braces (e.g., "customer_name"). Will be inserted as {customer_name}',pattern:"^[a-zA-Z_][a-zA-Z0-9_]*$"}},required:["documentId","position","variableName"]},handler:async(e,t)=>{let{documentId:n,position:a,variableName:r}=e,o=t.session.documents.get(n);if(!o)return {isError:true,content:[{type:"text",text:`Document not found: ${n}`}]};if(!/^[a-zA-Z_][a-zA-Z0-9_\-.]*$/.test(r))return {isError:true,content:[{type:"text",text:`Invalid variable name: ${r}. Must start with letter/underscore and contain only alphanumeric, underscore, hyphen, or dot.`}]};try{let{executeCommand:i}=await import('./executor-XKBCCVNY.mjs'),s=i(o.document,{type:"insertText",position:a,text:`{${r}}`});return o.document=s,o.lastModified=Date.now(),s.templateVariables||(s.templateVariables=[]),s.templateVariables.includes(r)||s.templateVariables.push(r),{content:[{type:"text",text:JSON.stringify({success:!0,variable:r,insertedAs:`{${r}}`,position:a})}]}}catch(i){return {isError:true,content:[{type:"text",text:`Failed to insert variable: ${i.message}`}]}}},annotations:{category:"template",readOnly:false,complexity:"low",examples:[{description:"Insert customer name variable at start of first paragraph",input:{documentId:"doc_123",position:{paragraphIndex:0,offset:0},variableName:"customer_name"}}]}},z={name:"docx_apply_template",description:`Substitute template variables with actual values in the document.
5
+ Variable names should follow the pattern: letters, numbers, underscores, starting with a letter.`,inputSchema:{type:"object",properties:{documentId:f,position:F,variableName:{type:"string",description:'Variable name without braces (e.g., "customer_name"). Will be inserted as {customer_name}',pattern:"^[a-zA-Z_][a-zA-Z0-9_]*$"}},required:["documentId","position","variableName"]},handler:async(e,t)=>{let{documentId:n,position:a,variableName:r}=e,o=t.session.documents.get(n);if(!o)return {isError:true,content:[{type:"text",text:`Document not found: ${n}`}]};if(!/^[a-zA-Z_][a-zA-Z0-9_\-.]*$/.test(r))return {isError:true,content:[{type:"text",text:`Invalid variable name: ${r}. Must start with letter/underscore and contain only alphanumeric, underscore, hyphen, or dot.`}]};try{let{executeCommand:i}=await import('./executor-C3VXF7QA.mjs'),s=i(o.document,{type:"insertText",position:a,text:`{${r}}`});return o.document=s,o.lastModified=Date.now(),s.templateVariables||(s.templateVariables=[]),s.templateVariables.includes(r)||s.templateVariables.push(r),{content:[{type:"text",text:JSON.stringify({success:!0,variable:r,insertedAs:`{${r}}`,position:a})}]}}catch(i){return {isError:true,content:[{type:"text",text:`Failed to insert variable: ${i.message}`}]}}},annotations:{category:"template",readOnly:false,complexity:"low",examples:[{description:"Insert customer name variable at start of first paragraph",input:{documentId:"doc_123",position:{paragraphIndex:0,offset:0},variableName:"customer_name"}}]}},z={name:"docx_apply_template",description:`Substitute template variables with actual values in the document.
6
6
  Replaces all {variable} placeholders with the corresponding values provided.
7
7
  Preserves all formatting (fonts, styles, colors, tables).
8
- Use docx_get_variables first to discover what variables exist in the document.`,inputSchema:{type:"object",properties:{documentId:f,variables:{type:"object",description:'Map of variable names to values (e.g., {"customer_name": "John Doe", "date": "2024-01-15"})',additionalProperties:{type:"string"}},keepUnmatchedVariables:{type:"boolean",description:"If true, keep {variable} placeholders for variables not in the map. If false, replace with empty string. Default: true",default:true}},required:["documentId","variables"]},handler:async(e,t)=>{let{documentId:n$1,variables:a,keepUnmatchedVariables:r=true}=e,o=t.session.documents.get(n$1);if(!o)return {isError:true,content:[{type:"text",text:`Document not found: ${n$1}`}]};if(!o.buffer)return {isError:true,content:[{type:"text",text:"Cannot apply template: document was not loaded from a DOCX buffer"}]};try{let i=b$1(o.buffer,a,{nullGetter:r?"keep":"empty"}),s=await n(i.buffer);return o.document=s,o.buffer=i.buffer,o.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,replacedVariables:i.replacedVariables,unreplacedVariables:i.unreplacedVariables,warnings:i.warnings})}]}}catch(i){return {isError:true,content:[{type:"text",text:`Failed to apply template: ${i.message}`}]}}},annotations:{category:"template",readOnly:false,complexity:"medium",examples:[{description:"Fill in customer and date values",input:{documentId:"doc_123",variables:{customer_name:"Jane Smith",invoice_date:"2024-02-15",amount:"$1,234.56"}}}]}},j={name:"docx_validate_template",description:`Validate that a document is a valid docxtemplater template.
8
+ Use docx_get_variables first to discover what variables exist in the document.`,inputSchema:{type:"object",properties:{documentId:f,variables:{type:"object",description:'Map of variable names to values (e.g., {"customer_name": "John Doe", "date": "2024-01-15"})',additionalProperties:{type:"string"}},keepUnmatchedVariables:{type:"boolean",description:"If true, keep {variable} placeholders for variables not in the map. If false, replace with empty string. Default: true",default:true}},required:["documentId","variables"]},handler:async(e,t)=>{let{documentId:n,variables:a$1,keepUnmatchedVariables:r=true}=e,o=t.session.documents.get(n);if(!o)return {isError:true,content:[{type:"text",text:`Document not found: ${n}`}]};if(!o.buffer)return {isError:true,content:[{type:"text",text:"Cannot apply template: document was not loaded from a DOCX buffer"}]};try{let i=b$1(o.buffer,a$1,{nullGetter:r?"keep":"empty"}),s=await a(i.buffer);return o.document=s,o.buffer=i.buffer,o.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,replacedVariables:i.replacedVariables,unreplacedVariables:i.unreplacedVariables,warnings:i.warnings})}]}}catch(i){return {isError:true,content:[{type:"text",text:`Failed to apply template: ${i.message}`}]}}},annotations:{category:"template",readOnly:false,complexity:"medium",examples:[{description:"Fill in customer and date values",input:{documentId:"doc_123",variables:{customer_name:"Jane Smith",invoice_date:"2024-02-15",amount:"$1,234.56"}}}]}},j={name:"docx_validate_template",description:`Validate that a document is a valid docxtemplater template.
9
9
  Checks for syntax errors like unclosed braces, invalid tag names, etc.
10
10
  Returns validation result with any errors found and list of valid tags.`,inputSchema:{type:"object",properties:{documentId:f},required:["documentId"]},handler:async(e,t)=>{let{documentId:n}=e,a=t.session.documents.get(n);if(!a)return {isError:true,content:[{type:"text",text:`Document not found: ${n}`}]};if(!a.buffer)return {isError:true,content:[{type:"text",text:"Cannot validate template: document was not loaded from a DOCX buffer"}]};try{let r=f$1(a.buffer);return {content:[{type:"text",text:JSON.stringify({valid:r.valid,tags:r.tags,errors:r.errors.map(o=>({message:o.message,variable:o.variable,type:o.type}))},null,2)}]}}catch(r){return {isError:true,content:[{type:"text",text:`Failed to validate template: ${r.message}`}]}}},annotations:{category:"template",readOnly:true,complexity:"low"}},S=[B,Z,z,j];var W={id:"docxtemplater",name:"Docxtemplater",version:"1.0.0",description:"Template variable support using standard docxtemplater syntax ({variable})",commandHandlers:{insertTemplateVariable:k,replaceWithTemplateVariable:M},mcpTools:S};export{_ as a,g as b,A as c,b as d,P as e,q as f,U as g,X as h,G as i,K as j,Q as k,Y as l,ee as m,J as n,W as o};
@@ -0,0 +1,4 @@
1
+ 'use strict';function u(e){let t=[];for(let n of e.content)n.type==="run"?t.push(p(n)):n.type==="hyperlink"&&t.push(l(n));return t.join("")}function p(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function l(e){let t=[];for(let n of e.children)n.type==="run"&&t.push(p(n));return t.join("")}function h(e){let t=[];for(let n of e.rows)for(let r of n.cells)for(let o of r.content)o.type==="paragraph"&&t.push(u(o));return t.join(" ")}function m(e){let t=[];for(let n of e.content)n.type==="paragraph"?t.push(u(n)):n.type==="table"&&t.push(h(n));return t.join(`
2
+ `)}function g(e){return e.split(/\s+/).filter(n=>n.length>0).length}function b(e,t=true){return t?e.length:e.replace(/\s/g,"").length}function k(e){let t=0;for(let n of e.content)n.type==="paragraph"?t+=g(u(n)):n.type==="table"&&(t+=x(n));return t}function x(e){let t=0;for(let n of e.rows)for(let r of n.cells)for(let o of r.content)o.type==="paragraph"&&(t+=g(u(o)));return t}function P(e){let t=0;for(let n of e.content)n.type==="paragraph"?t+=u(n).length:n.type==="table"&&(t+=y(n));return t}function y(e){let t=0;for(let n of e.rows)for(let r of n.cells)for(let o of r.content)o.type==="paragraph"&&(t+=u(o).length);return t}function T(e,t,n){let r=[],o=0,c=e[t.paragraphIndex];if(c){let a=u(c).slice(0,t.offset);r.unshift(a),o+=a.length;}for(let f=t.paragraphIndex-1;f>=0&&o<n;f--){let a=e[f];if(!a)continue;let s=u(a);r.unshift(s),o+=s.length;}let i=r.join(`
3
+ `);return i.length>n?"..."+i.slice(-n):i}function B(e,t,n){let r=[],o=0,c=e[t.paragraphIndex];if(c){let a=u(c).slice(t.offset);r.push(a),o+=a.length;}for(let f=t.paragraphIndex+1;f<e.length&&o<n;f++){let a=e[f];if(!a)continue;let s=u(a);r.push(s),o+=s.length;}let i=r.join(`
4
+ `);return i.length>n?i.slice(0,n)+"...":i}function w(e,t){let n=0;for(let r of e.content)if(r.type==="run"){let o=p(r),c=n+o.length;if(t>=n&&t<c)return r.formatting||{};n=c;}else if(r.type==="hyperlink"){let o=l(r),c=n+o.length;if(t>=n&&t<c){for(let i of r.children)if(i.type==="run")return i.formatting||{}}n=c;}return {}}function D(e,t){let n=0;for(let r of e.content)if(r.type==="run"){let o=p(r);n+=o.length;}else if(r.type==="hyperlink"){let o=l(r),c=n,i=n+o.length;if(t>=c&&t<i)return true;n=i;}return false}function H(e,t){let n=0;for(let r of e.content)if(r.type==="run"){let o=p(r);n+=o.length;}else if(r.type==="hyperlink"){let o=l(r),c=n,i=n+o.length;if(t>=c&&t<i)return r;n=i;}}function I(e){return e?e.toLowerCase().includes("heading"):false}function j(e){if(!e)return;let t=e.match(/heading\s*(\d)/i);if(t)return parseInt(t[1],10)}function C(e){for(let t of e.content)if(t.type==="paragraph"){for(let n of t.content)if(n.type==="run"){for(let r of n.content)if(r.type==="drawing")return true}}return false}function A(e){for(let t of e.content)if(t.type==="paragraph"){for(let n of t.content)if(n.type==="hyperlink")return true}return false}function E(e){return e.content.some(t=>t.type==="table")}function d(e){return e.content.filter(t=>t.type==="paragraph")}function F(e,t){return d(e)[t]}function O(e,t){let n=0;for(let r=0;r<e.content.length;r++)if(e.content[r].type==="paragraph"){if(n===t)return r;n++;}return -1}exports.a=u;exports.b=p;exports.c=l;exports.d=h;exports.e=m;exports.f=g;exports.g=b;exports.h=k;exports.i=P;exports.j=T;exports.k=B;exports.l=w;exports.m=D;exports.n=H;exports.o=I;exports.p=j;exports.q=C;exports.r=A;exports.s=E;exports.t=d;exports.u=F;exports.v=O;
@@ -0,0 +1 @@
1
+ function i(){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 r(){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 n(e={}){let t=r();e.pageWidth!==void 0&&(t.pageWidth=Math.round(e.pageWidth)),e.pageHeight!==void 0&&(t.pageHeight=Math.round(e.pageHeight)),e.orientation!==void 0&&(t.orientation=e.orientation),e.marginTop!==void 0&&(t.marginTop=Math.round(e.marginTop)),e.marginBottom!==void 0&&(t.marginBottom=Math.round(e.marginBottom)),e.marginLeft!==void 0&&(t.marginLeft=Math.round(e.marginLeft)),e.marginRight!==void 0&&(t.marginRight=Math.round(e.marginRight));let a={type:"text",text:e.initialText||""};return {package:{document:{content:[{type:"paragraph",content:[{type:"run",content:e.initialText?[a]:[],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:i()}},templateVariables:[],warnings:[]}}function p(e,t={}){return n({...t,initialText:e})}export{n as a,p as b};
@@ -1,2 +1,2 @@
1
- import {b}from'./chunk-GZOCOWWB.mjs';import {useState,useCallback,useRef,useEffect}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function _(){return {matchCase:false,matchWholeWord:false,useRegex:false}}function q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function J(e,n){if(!e)return null;try{let t;n.useRegex?t=e:t=q(e),n.matchWholeWord&&(t=`\\b${t}\\b`);let i=n.matchCase?"g":"gi";return new RegExp(t,i)}catch{return null}}function D(e,n,t){if(!e||!n)return [];let i=[],c=n;t.matchCase||(c=n.toLowerCase());let x=E=>E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d;t.matchWholeWord?d=`\\b${x(c)}\\b`:d=x(c);let l=t.matchCase?"g":"gi",u=new RegExp(d,l),g;for(;(g=u.exec(e))!==null;)i.push({start:g.index,end:g.index+g[0].length}),g[0].length===0&&u.lastIndex++;return i}function Se(e,n,t,i){let c=J(n,i);return c?e.replace(c,t):e}function ye(e,n,t,i,c=0){let x=D(e,n,i),d=x.find(u=>u.start>=c)||x[0];return d?{content:e.substring(0,d.start)+t+e.substring(d.end),replaced:true,matchStart:d.start,matchEnd:d.start+t.length}:{content:e,replaced:false,matchStart:-1,matchEnd:-1}}function Ce(e){return e?e.totalCount===0?"No results":e.totalCount===1?"1 match":`${e.currentIndex+1} of ${e.totalCount} matches`:""}function Re(e){return !e||e.trim()===""}function Te(){return {currentMatchColor:"#FFFF00",otherMatchColor:"#FFFFAA"}}function k(e){if(!e||!e.content)return "";let n="";for(let t of e.content)t.type==="text"?n+=t.text||"":t.type==="tab"?n+=" ":t.type==="break"&&t.breakType==="textWrapping"&&(n+=`
2
- `);return n}function Fe(e){if(!e||!e.content)return "";let n="";for(let t of e.content)if(t.type==="run")n+=k(t);else if(t.type==="hyperlink")for(let i of t.children||[])i.type==="run"&&(n+=k(i));return n}function Ie(e,n,t){if(!e||!n)return [];let i=[],c=e.package?.document||e.package?.document;if(!c||!c.content)return i;let x=0;for(let d of c.content)if(d.type==="paragraph"){let l=Q(d,n,t,x);i.push(...l),x++;}else if(d.type==="table")for(let l of d.rows||[])for(let u of l.cells||[])for(let g of u.content||[])g.type;return i}function Q(e,n,t,i){let c=[],x=Fe(e);if(!x)return c;let d=D(x,n,t);for(let l of d){let u=ve(e,l.start);c.push({paragraphIndex:i,contentIndex:u.contentIndex,startOffset:u.offsetInContent,endOffset:u.offsetInContent+(l.end-l.start),text:x.substring(l.start,l.end)});}return c}function ve(e,n){if(!e||!e.content)return {contentIndex:0,runIndex:0,offsetInContent:n};let t=0,i=0;for(let c of e.content){let x="";if(c.type==="run")x=k(c);else if(c.type==="hyperlink")for(let l of c.children||[])l.type==="run"&&(x+=k(l));let d=x.length;if(t+d>n)return {contentIndex:i,runIndex:i,offsetInContent:n-t};t+=d,i++;}return {contentIndex:Math.max(0,e.content.length-1),runIndex:Math.max(0,e.content.length-1),offsetInContent:0}}function Ee(e,n){if(!e||!n)return;let t=e.querySelector(`[data-paragraph-index="${n.paragraphIndex}"]`);t&&t.scrollIntoView({behavior:"smooth",block:"center"});}function Oe(e){let[n,t]=useState({isOpen:false,searchText:"",replaceText:"",options:_(),matches:[],currentIndex:0,replaceMode:e?.initialReplaceMode??false}),i=useCallback(r=>{t(o=>({...o,isOpen:true,replaceMode:false,searchText:r||o.searchText,matches:[],currentIndex:0}));},[]),c=useCallback(r=>{t(o=>({...o,isOpen:true,replaceMode:true,searchText:r||o.searchText,matches:[],currentIndex:0}));},[]),x=useCallback(()=>{t(r=>({...r,isOpen:false}));},[]),d=useCallback(()=>{t(r=>({...r,isOpen:!r.isOpen}));},[]),l=useCallback(r=>{t(o=>({...o,searchText:r}));},[]),u=useCallback(r=>{t(o=>({...o,replaceText:r}));},[]),g=useCallback(r=>{t(o=>({...o,options:{...o.options,...r}}));},[]),E=useCallback((r,o=0)=>{let M=Math.max(0,Math.min(o,r.length-1));t(L=>({...L,matches:r,currentIndex:r.length>0?M:0})),e?.onMatchesChange?.(r),r.length>0?e?.onCurrentMatchChange?.(r[M],M):e?.onCurrentMatchChange?.(null,-1);},[e]),O=useCallback(()=>{let r=0;return t(o=>o.matches.length===0?o:(r=(o.currentIndex+1)%o.matches.length,{...o,currentIndex:r})),r},[]),P=useCallback(()=>{let r=0;return t(o=>o.matches.length===0?o:(r=o.currentIndex===0?o.matches.length-1:o.currentIndex-1,{...o,currentIndex:r})),r},[]),N=useCallback(r=>{t(o=>o.matches.length===0||r<0||r>=o.matches.length?o:{...o,currentIndex:r});},[]),p=useCallback(()=>n.matches.length===0?null:n.matches[n.currentIndex]||null,[n.matches,n.currentIndex]),h=useCallback(()=>n.matches.length>0,[n.matches.length]);return {state:n,openFind:i,openReplace:c,close:x,toggle:d,setSearchText:l,setReplaceText:u,setOptions:g,setMatches:E,goToNextMatch:O,goToPreviousMatch:P,goToMatch:N,getCurrentMatch:p,hasMatches:h}}var Le={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"transparent",display:"flex",alignItems:"flex-start",justifyContent:"flex-end",zIndex:1e4,pointerEvents:"none"},ke={backgroundColor:"white",borderRadius:"4px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.2)",minWidth:"360px",maxWidth:"440px",width:"100%",margin:"60px 20px 20px 20px",pointerEvents:"auto"},Pe={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg-subtle)",borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},Ne={margin:0,fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},we={background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"2px 6px",lineHeight:1},_e={padding:"16px"},ee={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},te={width:"60px",fontSize:"13px",color:"var(--doc-text)",flexShrink:0},W={flex:1,padding:"8px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"3px",fontSize:"13px",boxSizing:"border-box",outline:"none"},ne={...W,borderColor:"var(--doc-link)",boxShadow:"0 0 0 2px rgba(5, 99, 193, 0.1)"},De={display:"flex",flexDirection:"column",gap:"6px",marginLeft:"8px"},Y={padding:"6px 12px",borderRadius:"3px",fontSize:"12px",fontWeight:500,cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)",minWidth:"80px",textAlign:"center"},oe={...Y,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text-placeholder)",cursor:"not-allowed"},U={padding:"6px 10px",borderRadius:"3px",fontSize:"14px",cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)"},re={...U,color:"var(--doc-border-input)",cursor:"not-allowed"},Ae={display:"flex",gap:"16px",marginTop:"4px",marginLeft:"68px"},B={display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"var(--doc-text-muted)",cursor:"pointer"},ae={width:"14px",height:"14px",cursor:"pointer"},ie={marginLeft:"68px",fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px"},Be={...ie,color:"var(--doc-error)"},We=({style:e})=>jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:e,children:jsx("polyline",{points:"18 15 12 9 6 15"})}),Ye=({style:e})=>jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:e,children:jsx("polyline",{points:"6 9 12 15 18 9"})});function Ue({isOpen:e,onClose:n,onFind:t,onFindNext:i,onFindPrevious:c,onReplace:x,onReplaceAll:d,onHighlightMatches:l,onClearHighlights:u,initialSearchText:g="",replaceMode:E=false,currentResult:O,className:P,style:N}){let{t:p}=b(),[h,r]=useState(""),[o,M]=useState(""),[L,K]=useState(E),[R,ce]=useState(false),[T,le]=useState(false),[s,F]=useState(null),[se,z]=useState(false),[de,$]=useState(false),w=useRef(null),G=useRef(null);useEffect(()=>{O!==void 0&&F(O);},[O]),useEffect(()=>{if(e){if(r(g),M(""),K(E),F(null),setTimeout(()=>{w.current?.focus(),w.current?.select();},100),g){let a=t(g,{matchCase:R,matchWholeWord:T});F(a),a?.matches&&l&&l(a.matches);}}else u&&u();},[e,g,E]);let S=useCallback(()=>{if(!h.trim()){F(null),u&&u();return}let a=t(h,{matchCase:R,matchWholeWord:T});F(a),a?.matches&&l?l(a.matches):u&&u();},[h,R,T,t,l,u]);useEffect(()=>{e&&h.trim()&&S();},[R,T]);let pe=useCallback(a=>{r(a.target.value);},[]),ue=useCallback(a=>{a.key==="Enter"?(a.preventDefault(),a.shiftKey?j():s?V():S()):a.key==="Escape"&&n();},[s,S,n]),fe=useCallback(a=>{a.key==="Enter"?(a.preventDefault(),H()):a.key==="Escape"&&n();},[n]),V=useCallback(()=>{if(!h.trim()){S();return}if(!s){S();return}if(i()&&s){let y=(s.currentIndex+1)%s.totalCount;F({...s,currentIndex:y});}},[h,s,S,i]),j=useCallback(()=>{if(!h.trim()){S();return}if(!s){S();return}if(c()&&s){let y=s.currentIndex===0?s.totalCount-1:s.currentIndex-1;F({...s,currentIndex:y});}},[h,s,S,c]),H=useCallback(()=>{if(!s||s.totalCount===0)return;if(x(o)){let y=t(h,{matchCase:R,matchWholeWord:T});F(y),y?.matches&&l&&l(y.matches);}},[s,o,h,R,T,x,t,l]),xe=useCallback(()=>{if(!h.trim())return;d(h,o,{matchCase:R,matchWholeWord:T})>0&&(F({matches:[],totalCount:0,currentIndex:-1}),u&&u());},[h,o,R,T,d,u]),he=useCallback(()=>{K(a=>{let y=!a;return y&&setTimeout(()=>G.current?.focus(),100),y});},[]),ge=useCallback(a=>{a.target,a.currentTarget;},[]),me=useCallback(a=>{a.key==="Escape"&&n();},[n]);if(!e)return null;let I=s&&s.totalCount>0,be=s&&s.totalCount===0&&h.trim();return jsx("div",{className:`docx-find-replace-dialog-overlay ${P||""}`,style:{...Le,...N},onClick:ge,onKeyDown:me,children:jsxs("div",{className:"docx-find-replace-dialog","data-testid":"find-replace-dialog",style:ke,role:"dialog","aria-modal":"false","aria-labelledby":"find-replace-dialog-title",children:[jsxs("div",{className:"docx-find-replace-dialog-header",style:Pe,children:[jsx("h2",{id:"find-replace-dialog-title",style:Ne,children:p(L?"dialogs.findReplace.titleFindReplace":"dialogs.findReplace.titleFind")}),jsx("button",{type:"button",className:"docx-find-replace-dialog-close",style:we,onClick:n,"aria-label":p("common.closeDialog"),children:"\xD7"})]}),jsxs("div",{className:"docx-find-replace-dialog-body",style:_e,children:[jsxs("div",{className:"docx-find-replace-dialog-row",style:ee,children:[jsx("label",{htmlFor:"find-text",style:te,children:p("dialogs.findReplace.findLabel")}),jsx("input",{ref:w,id:"find-text",type:"text",className:"docx-find-replace-dialog-input",style:se?ne:W,value:h,onChange:pe,onKeyDown:ue,onFocus:()=>z(true),onBlur:()=>{z(false),h.trim()&&!s&&S();},placeholder:p("dialogs.findReplace.findPlaceholder"),"aria-label":p("dialogs.findReplace.findAriaLabel")}),jsxs("div",{style:{display:"flex",gap:"4px"},children:[jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:I?U:re,onClick:j,disabled:!I,"aria-label":p("dialogs.findReplace.findPrevious"),title:p("dialogs.findReplace.findPreviousTitle"),children:jsx(We,{})}),jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:I?U:re,onClick:V,disabled:!I,"aria-label":p("dialogs.findReplace.findNext"),title:p("dialogs.findReplace.findNextTitle"),children:jsx(Ye,{})})]})]}),I&&jsx("div",{className:"docx-find-replace-dialog-status",style:ie,children:p("dialogs.findReplace.matchCount",{current:s.currentIndex+1,total:s.totalCount})}),be&&jsx("div",{className:"docx-find-replace-dialog-status",style:Be,children:p("dialogs.findReplace.noResults")}),L&&jsx(Fragment,{children:jsxs("div",{className:"docx-find-replace-dialog-row",style:ee,children:[jsx("label",{htmlFor:"replace-text",style:te,children:p("dialogs.findReplace.replaceLabel")}),jsx("input",{ref:G,id:"replace-text",type:"text",className:"docx-find-replace-dialog-input",style:de?ne:W,value:o,onChange:a=>M(a.target.value),onKeyDown:fe,onFocus:()=>$(true),onBlur:()=>$(false),placeholder:p("dialogs.findReplace.replacePlaceholder"),"aria-label":p("dialogs.findReplace.replaceAriaLabel")}),jsxs("div",{style:De,children:[jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:I?Y:oe,onClick:H,disabled:!I,title:p("dialogs.findReplace.replaceCurrentTitle"),children:p("dialogs.findReplace.replaceButton")}),jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:I?Y:oe,onClick:xe,disabled:!I,title:p("dialogs.findReplace.replaceAllTitle"),children:p("dialogs.findReplace.replaceAllButton")})]})]})}),jsxs("div",{className:"docx-find-replace-dialog-options",style:Ae,children:[jsxs("label",{className:"docx-find-replace-dialog-option",style:B,children:[jsx("input",{type:"checkbox",style:ae,checked:R,onChange:a=>ce(a.target.checked)}),p("dialogs.findReplace.matchCase")]}),jsxs("label",{className:"docx-find-replace-dialog-option",style:B,children:[jsx("input",{type:"checkbox",style:ae,checked:T,onChange:a=>le(a.target.checked)}),p("dialogs.findReplace.wholeWords")]}),!L&&jsx("button",{type:"button",style:{...B,background:"none",border:"none",cursor:"pointer",color:"var(--doc-link)",padding:0},onClick:he,children:p("dialogs.findReplace.toggleReplace")})]})]})]})})}var qe=Ue;export{_ as a,q as b,J as c,D as d,Se as e,ye as f,Ce as g,Re as h,Te as i,Ie as j,Q as k,Ee as l,Oe as m,Ue as n,qe as o};
1
+ import {c}from'./chunk-MGEN6GOE.mjs';import {useState,useCallback,useRef,useEffect}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function _(){return {matchCase:false,matchWholeWord:false,useRegex:false}}function q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function J(e,n){if(!e)return null;try{let t;n.useRegex?t=e:t=q(e),n.matchWholeWord&&(t=`\\b${t}\\b`);let i=n.matchCase?"g":"gi";return new RegExp(t,i)}catch{return null}}function D(e,n,t){if(!e||!n)return [];let i=[],c=n;t.matchCase||(c=n.toLowerCase());let x=E=>E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d;t.matchWholeWord?d=`\\b${x(c)}\\b`:d=x(c);let l=t.matchCase?"g":"gi",u=new RegExp(d,l),g;for(;(g=u.exec(e))!==null;)i.push({start:g.index,end:g.index+g[0].length}),g[0].length===0&&u.lastIndex++;return i}function Se(e,n,t,i){let c=J(n,i);return c?e.replace(c,t):e}function ye(e,n,t,i,c=0){let x=D(e,n,i),d=x.find(u=>u.start>=c)||x[0];return d?{content:e.substring(0,d.start)+t+e.substring(d.end),replaced:true,matchStart:d.start,matchEnd:d.start+t.length}:{content:e,replaced:false,matchStart:-1,matchEnd:-1}}function Ce(e){return e?e.totalCount===0?"No results":e.totalCount===1?"1 match":`${e.currentIndex+1} of ${e.totalCount} matches`:""}function Re(e){return !e||e.trim()===""}function Te(){return {currentMatchColor:"#FFFF00",otherMatchColor:"#FFFFAA"}}function k(e){if(!e||!e.content)return "";let n="";for(let t of e.content)t.type==="text"?n+=t.text||"":t.type==="tab"?n+=" ":t.type==="break"&&t.breakType==="textWrapping"&&(n+=`
2
+ `);return n}function Fe(e){if(!e||!e.content)return "";let n="";for(let t of e.content)if(t.type==="run")n+=k(t);else if(t.type==="hyperlink")for(let i of t.children||[])i.type==="run"&&(n+=k(i));return n}function Ie(e,n,t){if(!e||!n)return [];let i=[],c=e.package?.document||e.package?.document;if(!c||!c.content)return i;let x=0;for(let d of c.content)if(d.type==="paragraph"){let l=Q(d,n,t,x);i.push(...l),x++;}else if(d.type==="table")for(let l of d.rows||[])for(let u of l.cells||[])for(let g of u.content||[])g.type;return i}function Q(e,n,t,i){let c=[],x=Fe(e);if(!x)return c;let d=D(x,n,t);for(let l of d){let u=ve(e,l.start);c.push({paragraphIndex:i,contentIndex:u.contentIndex,startOffset:u.offsetInContent,endOffset:u.offsetInContent+(l.end-l.start),text:x.substring(l.start,l.end)});}return c}function ve(e,n){if(!e||!e.content)return {contentIndex:0,runIndex:0,offsetInContent:n};let t=0,i=0;for(let c of e.content){let x="";if(c.type==="run")x=k(c);else if(c.type==="hyperlink")for(let l of c.children||[])l.type==="run"&&(x+=k(l));let d=x.length;if(t+d>n)return {contentIndex:i,runIndex:i,offsetInContent:n-t};t+=d,i++;}return {contentIndex:Math.max(0,e.content.length-1),runIndex:Math.max(0,e.content.length-1),offsetInContent:0}}function Ee(e,n){if(!e||!n)return;let t=e.querySelector(`[data-paragraph-index="${n.paragraphIndex}"]`);t&&t.scrollIntoView({behavior:"smooth",block:"center"});}function Oe(e){let[n,t]=useState({isOpen:false,searchText:"",replaceText:"",options:_(),matches:[],currentIndex:0,replaceMode:e?.initialReplaceMode??false}),i=useCallback(r=>{t(o=>({...o,isOpen:true,replaceMode:false,searchText:r||o.searchText,matches:[],currentIndex:0}));},[]),c=useCallback(r=>{t(o=>({...o,isOpen:true,replaceMode:true,searchText:r||o.searchText,matches:[],currentIndex:0}));},[]),x=useCallback(()=>{t(r=>({...r,isOpen:false}));},[]),d=useCallback(()=>{t(r=>({...r,isOpen:!r.isOpen}));},[]),l=useCallback(r=>{t(o=>({...o,searchText:r}));},[]),u=useCallback(r=>{t(o=>({...o,replaceText:r}));},[]),g=useCallback(r=>{t(o=>({...o,options:{...o.options,...r}}));},[]),E=useCallback((r,o=0)=>{let M=Math.max(0,Math.min(o,r.length-1));t(L=>({...L,matches:r,currentIndex:r.length>0?M:0})),e?.onMatchesChange?.(r),r.length>0?e?.onCurrentMatchChange?.(r[M],M):e?.onCurrentMatchChange?.(null,-1);},[e]),O=useCallback(()=>{let r=0;return t(o=>o.matches.length===0?o:(r=(o.currentIndex+1)%o.matches.length,{...o,currentIndex:r})),r},[]),P=useCallback(()=>{let r=0;return t(o=>o.matches.length===0?o:(r=o.currentIndex===0?o.matches.length-1:o.currentIndex-1,{...o,currentIndex:r})),r},[]),N=useCallback(r=>{t(o=>o.matches.length===0||r<0||r>=o.matches.length?o:{...o,currentIndex:r});},[]),p=useCallback(()=>n.matches.length===0?null:n.matches[n.currentIndex]||null,[n.matches,n.currentIndex]),h=useCallback(()=>n.matches.length>0,[n.matches.length]);return {state:n,openFind:i,openReplace:c,close:x,toggle:d,setSearchText:l,setReplaceText:u,setOptions:g,setMatches:E,goToNextMatch:O,goToPreviousMatch:P,goToMatch:N,getCurrentMatch:p,hasMatches:h}}var Le={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"transparent",display:"flex",alignItems:"flex-start",justifyContent:"flex-end",zIndex:1e4,pointerEvents:"none"},ke={backgroundColor:"white",borderRadius:"4px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.2)",minWidth:"360px",maxWidth:"440px",width:"100%",margin:"60px 20px 20px 20px",pointerEvents:"auto"},Pe={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg-subtle)",borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},Ne={margin:0,fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},we={background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"2px 6px",lineHeight:1},_e={padding:"16px"},ee={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},te={width:"60px",fontSize:"13px",color:"var(--doc-text)",flexShrink:0},W={flex:1,padding:"8px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"3px",fontSize:"13px",boxSizing:"border-box",outline:"none"},ne={...W,borderColor:"var(--doc-link)",boxShadow:"0 0 0 2px rgba(5, 99, 193, 0.1)"},De={display:"flex",flexDirection:"column",gap:"6px",marginLeft:"8px"},Y={padding:"6px 12px",borderRadius:"3px",fontSize:"12px",fontWeight:500,cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)",minWidth:"80px",textAlign:"center"},oe={...Y,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text-placeholder)",cursor:"not-allowed"},U={padding:"6px 10px",borderRadius:"3px",fontSize:"14px",cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)"},re={...U,color:"var(--doc-border-input)",cursor:"not-allowed"},Ae={display:"flex",gap:"16px",marginTop:"4px",marginLeft:"68px"},B={display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"var(--doc-text-muted)",cursor:"pointer"},ae={width:"14px",height:"14px",cursor:"pointer"},ie={marginLeft:"68px",fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px"},Be={...ie,color:"var(--doc-error)"},We=({style:e})=>jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:e,children:jsx("polyline",{points:"18 15 12 9 6 15"})}),Ye=({style:e})=>jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:e,children:jsx("polyline",{points:"6 9 12 15 18 9"})});function Ue({isOpen:e,onClose:n,onFind:t,onFindNext:i,onFindPrevious:c$1,onReplace:x,onReplaceAll:d,onHighlightMatches:l,onClearHighlights:u,initialSearchText:g="",replaceMode:E=false,currentResult:O,className:P,style:N}){let{t:p}=c(),[h,r]=useState(""),[o,M]=useState(""),[L,K]=useState(E),[R,ce]=useState(false),[T,le]=useState(false),[s,F]=useState(null),[se,z]=useState(false),[de,$]=useState(false),w=useRef(null),G=useRef(null);useEffect(()=>{O!==void 0&&F(O);},[O]),useEffect(()=>{if(e){if(r(g),M(""),K(E),F(null),setTimeout(()=>{w.current?.focus(),w.current?.select();},100),g){let a=t(g,{matchCase:R,matchWholeWord:T});F(a),a?.matches&&l&&l(a.matches);}}else u&&u();},[e,g,E]);let S=useCallback(()=>{if(!h.trim()){F(null),u&&u();return}let a=t(h,{matchCase:R,matchWholeWord:T});F(a),a?.matches&&l?l(a.matches):u&&u();},[h,R,T,t,l,u]);useEffect(()=>{e&&h.trim()&&S();},[R,T]);let pe=useCallback(a=>{r(a.target.value);},[]),ue=useCallback(a=>{a.key==="Enter"?(a.preventDefault(),a.shiftKey?j():s?V():S()):a.key==="Escape"&&n();},[s,S,n]),fe=useCallback(a=>{a.key==="Enter"?(a.preventDefault(),H()):a.key==="Escape"&&n();},[n]),V=useCallback(()=>{if(!h.trim()){S();return}if(!s){S();return}if(i()&&s){let y=(s.currentIndex+1)%s.totalCount;F({...s,currentIndex:y});}},[h,s,S,i]),j=useCallback(()=>{if(!h.trim()){S();return}if(!s){S();return}if(c$1()&&s){let y=s.currentIndex===0?s.totalCount-1:s.currentIndex-1;F({...s,currentIndex:y});}},[h,s,S,c$1]),H=useCallback(()=>{if(!s||s.totalCount===0)return;if(x(o)){let y=t(h,{matchCase:R,matchWholeWord:T});F(y),y?.matches&&l&&l(y.matches);}},[s,o,h,R,T,x,t,l]),xe=useCallback(()=>{if(!h.trim())return;d(h,o,{matchCase:R,matchWholeWord:T})>0&&(F({matches:[],totalCount:0,currentIndex:-1}),u&&u());},[h,o,R,T,d,u]),he=useCallback(()=>{K(a=>{let y=!a;return y&&setTimeout(()=>G.current?.focus(),100),y});},[]),ge=useCallback(a=>{a.target,a.currentTarget;},[]),me=useCallback(a=>{a.key==="Escape"&&n();},[n]);if(!e)return null;let I=s&&s.totalCount>0,be=s&&s.totalCount===0&&h.trim();return jsx("div",{className:`docx-find-replace-dialog-overlay ${P||""}`,style:{...Le,...N},onClick:ge,onKeyDown:me,children:jsxs("div",{className:"docx-find-replace-dialog","data-testid":"find-replace-dialog",style:ke,role:"dialog","aria-modal":"false","aria-labelledby":"find-replace-dialog-title",children:[jsxs("div",{className:"docx-find-replace-dialog-header",style:Pe,children:[jsx("h2",{id:"find-replace-dialog-title",style:Ne,children:p(L?"dialogs.findReplace.titleFindReplace":"dialogs.findReplace.titleFind")}),jsx("button",{type:"button",className:"docx-find-replace-dialog-close",style:we,onClick:n,"aria-label":p("common.closeDialog"),children:"\xD7"})]}),jsxs("div",{className:"docx-find-replace-dialog-body",style:_e,children:[jsxs("div",{className:"docx-find-replace-dialog-row",style:ee,children:[jsx("label",{htmlFor:"find-text",style:te,children:p("dialogs.findReplace.findLabel")}),jsx("input",{ref:w,id:"find-text",type:"text",className:"docx-find-replace-dialog-input",style:se?ne:W,value:h,onChange:pe,onKeyDown:ue,onFocus:()=>z(true),onBlur:()=>{z(false),h.trim()&&!s&&S();},placeholder:p("dialogs.findReplace.findPlaceholder"),"aria-label":p("dialogs.findReplace.findAriaLabel")}),jsxs("div",{style:{display:"flex",gap:"4px"},children:[jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:I?U:re,onClick:j,disabled:!I,"aria-label":p("dialogs.findReplace.findPrevious"),title:p("dialogs.findReplace.findPreviousTitle"),children:jsx(We,{})}),jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:I?U:re,onClick:V,disabled:!I,"aria-label":p("dialogs.findReplace.findNext"),title:p("dialogs.findReplace.findNextTitle"),children:jsx(Ye,{})})]})]}),I&&jsx("div",{className:"docx-find-replace-dialog-status",style:ie,children:p("dialogs.findReplace.matchCount",{current:s.currentIndex+1,total:s.totalCount})}),be&&jsx("div",{className:"docx-find-replace-dialog-status",style:Be,children:p("dialogs.findReplace.noResults")}),L&&jsx(Fragment,{children:jsxs("div",{className:"docx-find-replace-dialog-row",style:ee,children:[jsx("label",{htmlFor:"replace-text",style:te,children:p("dialogs.findReplace.replaceLabel")}),jsx("input",{ref:G,id:"replace-text",type:"text",className:"docx-find-replace-dialog-input",style:de?ne:W,value:o,onChange:a=>M(a.target.value),onKeyDown:fe,onFocus:()=>$(true),onBlur:()=>$(false),placeholder:p("dialogs.findReplace.replacePlaceholder"),"aria-label":p("dialogs.findReplace.replaceAriaLabel")}),jsxs("div",{style:De,children:[jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:I?Y:oe,onClick:H,disabled:!I,title:p("dialogs.findReplace.replaceCurrentTitle"),children:p("dialogs.findReplace.replaceButton")}),jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:I?Y:oe,onClick:xe,disabled:!I,title:p("dialogs.findReplace.replaceAllTitle"),children:p("dialogs.findReplace.replaceAllButton")})]})]})}),jsxs("div",{className:"docx-find-replace-dialog-options",style:Ae,children:[jsxs("label",{className:"docx-find-replace-dialog-option",style:B,children:[jsx("input",{type:"checkbox",style:ae,checked:R,onChange:a=>ce(a.target.checked)}),p("dialogs.findReplace.matchCase")]}),jsxs("label",{className:"docx-find-replace-dialog-option",style:B,children:[jsx("input",{type:"checkbox",style:ae,checked:T,onChange:a=>le(a.target.checked)}),p("dialogs.findReplace.wholeWords")]}),!L&&jsx("button",{type:"button",style:{...B,background:"none",border:"none",cursor:"pointer",color:"var(--doc-link)",padding:0},onClick:he,children:p("dialogs.findReplace.toggleReplace")})]})]})]})})}var qe=Ue;export{_ as a,q as b,J as c,D as d,Se as e,ye as f,Ce as g,Re as h,Te as i,Ie as j,Q as k,Ee as l,Oe as m,Ue as n,qe as o};
@@ -0,0 +1,2 @@
1
+ 'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var g={_lang:"en",common:{cancel:"Cancel",insert:"Insert",apply:"Apply",close:"Close",delete:"Delete",update:"Update",save:"Save",retry:"Retry",send:"Send",edit:"Edit",comment:"Comment",reply:"Reply",accept:"Accept",reject:"Reject",dismiss:"Dismiss",change:"Change",px:"px",closeDialog:"Close dialog"},toolbar:{ariaLabel:"Formatting toolbar",file:"File",format:"Format",insert:"Insert",open:"Open",openShortcut:"Ctrl+O",save:"Save",saveShortcut:"Ctrl+S",print:"Print",printShortcut:"Ctrl+P",pageSetup:"Page setup",leftToRight:"Left-to-right text",rightToLeft:"Right-to-left text",image:"Image",table:"Table",pageBreak:"Page break",tableOfContents:"Table of contents",symbol:"Symbol",help:"Help",reportIssue:"Report issue"},formattingBar:{groups:{history:"History",zoom:"Zoom",styles:"Styles",font:"Font",textFormatting:"Text formatting",script:"Script",alignment:"Alignment",listFormatting:"List formatting",image:"Image",table:"Table"},undo:"Undo",undoShortcut:"Undo (Ctrl+Z)",redo:"Redo",redoShortcut:"Redo (Ctrl+Y)",bold:"Bold",boldShortcut:"Bold (Ctrl+B)",italic:"Italic",italicShortcut:"Italic (Ctrl+I)",underline:"Underline",underlineShortcut:"Underline (Ctrl+U)",strikethrough:"Strikethrough",fontColor:"Font Color",highlightColor:"Text Highlight Color",insertLink:"Insert link",insertLinkShortcut:"Insert link (Ctrl+K)",superscript:"Superscript",superscriptShortcut:"Superscript (Ctrl+Shift+=)",subscript:"Subscript",subscriptShortcut:"Subscript (Ctrl+=)",imageProperties:"Image properties",imagePropertiesShortcut:"Image properties (alt text, border)...",clearFormatting:"Clear formatting"},alignment:{alignLeft:"Align Left",alignLeftShortcut:"Ctrl+L",center:"Center",centerShortcut:"Ctrl+E",alignRight:"Align Right",alignRightShortcut:"Ctrl+R",justify:"Justify",justifyShortcut:"Ctrl+J"},lists:{ariaLabel:"List formatting",typeAriaLabel:"List type",indentationAriaLabel:"List indentation",bulletList:"Bullet List",numberedList:"Numbered List",decreaseIndent:"Decrease Indent",increaseIndent:"Increase Indent"},lineSpacing:{single:"Single",double:"Double",lineSpacingTitle:"Line spacing: {label}",paragraphSpacing:"Paragraph spacing"},styles:{selectAriaLabel:"Select paragraph style",normalText:"Normal text",title:"Title",subtitle:"Subtitle",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3"},font:{selectAriaLabel:"Select font family",sansSerif:"Sans Serif",serif:"Serif",monospace:"Monospace"},fontSize:{decrease:"Decrease font size",increase:"Increase font size",label:"Font size",listLabel:"Font sizes"},zoom:{ariaLabel:"Zoom: {label}"},colorPicker:{ariaLabel:"{type} color picker",highlightColors:"Highlight Colors",customColor:"Custom Color",noColor:"No Color",automatic:"Automatic",themeColors:"Theme Colors",standardColors:"Standard Colors",colors:{black:"Black",darkRed:"Dark Red",red:"Red",orange:"Orange",yellow:"Yellow",darkYellow:"Dark Yellow",green:"Green",darkGreen:"Dark Green",teal:"Teal",darkTeal:"Dark Teal",blue:"Blue",darkBlue:"Dark Blue",purple:"Purple",darkPurple:"Dark Purple",brown:"Brown",grey50:"Grey 50%",grey25:"Grey 25%",grey10:"Grey 10%",white:"White",lightRed:"Light Red",lightOrange:"Light Orange",lightYellow:"Light Yellow",lightGreen:"Light Green",lightBlue:"Light Blue",lightPurple:"Light Purple",pink:"Pink",rose:"Rose",gold:"Gold",aqua:"Aqua",lavender:"Lavender",silver:"Silver",darkOrange:"Dark Orange",darkGray:"Dark Gray",gray:"Gray",cyan:"Cyan",magenta:"Magenta",paleGreen:"Pale Green",lightCyan:"Light Cyan",skyBlue:"Sky Blue",lightBlue2:"Light Blue 2",lightMagenta:"Light Magenta",brightGreen:"Bright Green",violet:"Violet"}},dialogs:{findReplace:{titleFind:"Find",titleFindReplace:"Find and Replace",findLabel:"Find:",findPlaceholder:"Enter text to find...",findAriaLabel:"Find text",findPrevious:"Find previous",findPreviousTitle:"Find Previous (Shift+Enter)",findNext:"Find next",findNextTitle:"Find Next (Enter)",matchCount:"{current} of {total} matches",noResults:"No results found",replaceLabel:"Replace:",replacePlaceholder:"Enter replacement text...",replaceAriaLabel:"Replace text",replaceButton:"Replace",replaceCurrentTitle:"Replace current match",replaceAllButton:"Replace All",replaceAllTitle:"Replace all matches",matchCase:"Match case",wholeWords:"Whole words",toggleReplace:"+ Replace"},hyperlink:{titleEdit:"Edit Hyperlink",titleInsert:"Insert Hyperlink",tabWebAddress:"Web Address",tabBookmark:"Bookmark",urlLabel:"URL",urlPlaceholder:"https://example.com",urlHint:"Enter a web address, email (mailto:), or phone (tel:)",bookmarkLabel:"Bookmark",bookmarkPlaceholder:"Select a bookmark...",displayTextLabel:"Display Text",displayTextPlaceholder:"Text to display (optional)",displayTextHint:"Leave empty to use the selected text",tooltipLabel:"Tooltip (optional)",tooltipPlaceholder:"Text shown on hover",removeLink:"Remove Link",invalidUrl:"Please enter a valid URL",urlRequired:"URL is required"},insertTable:{title:"Insert Table",hoverToSelect:"Hover to select size",tableSize:"{cols} x {rows} Table",orSpecifySize:"or specify size",rowsLabel:"Rows:",columnsLabel:"Columns:",insertButton:"Insert Table",sizeSelector:"Table size selector"},splitCell:{title:"Split Cell",description:"Set how many rows and columns to split the selected cell into.",rowsLabel:"Rows:",columnsLabel:"Columns:",currentMinimum:"Minimum from current span: {rows} row(s) x {cols} column(s)",minValue:"Use at least {rows} row(s) and {cols} column(s).",notOneByOne:"Choose at least two resulting cells."},insertImage:{title:"Insert Image",uploadAriaLabel:"Click or drag to upload image",uploadText:"Click to select or drag and drop an image",uploadSubtext:"PNG, JPG, GIF up to 10MB",dimensions:"Dimensions",widthLabel:"Width:",heightLabel:"Height:",aspectRatioLocked:"Aspect ratio locked",aspectRatioUnlocked:"Aspect ratio unlocked",altTextLabel:"Alt Text (optional)",altTextPlaceholder:"Describe the image for accessibility",insertButton:"Insert Image",invalidFile:"Please select a valid image file",fileTooLarge:"Image file is too large (max 10MB)",readFailed:"Failed to read image file",loadFailed:"Failed to load image",preview:"Preview"},insertSymbol:{title:"Insert Symbol",searchPlaceholder:"Search symbols (character or Unicode)...",noResults:'No symbols found for "{query}"',decimal:"Decimal: {value}",categories:{common:"Common",arrows:"Arrows",math:"Math",greek:"Greek",shapes:"Shapes",punctuation:"Punctuation",currency:"Currency",music:"Music",emoji:"Emoji"}},imageProperties:{title:"Image Properties",altText:"Alt Text",altTextPlaceholder:"Describe this image for accessibility...",border:"Border",width:"Width",style:"Style",color:"Color",preview:"Preview",borderStyles:{solid:"Solid",dashed:"Dashed",dotted:"Dotted",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"}},imagePosition:{title:"Image Position",horizontal:"Horizontal",vertical:"Vertical",position:"Position",alignment:"Alignment",offset:"Offset",offsetPx:"Offset (px)",align:"Align",relativeTo:"Relative to",alignOptions:{left:"Left",center:"Center",right:"Right",top:"Top",bottom:"Bottom"},relativeOptions:{page:"Page",column:"Column",margin:"Margin",character:"Character",paragraph:"Paragraph",line:"Line"}},pageSetup:{title:"Page Setup",pageSize:"PAGE SIZE",sizeLabel:"Size",custom:"Custom",orientation:"Orientation",portrait:"Portrait",landscape:"Landscape",margins:"MARGINS",top:"Top",bottom:"Bottom",left:"Left",right:"Right",pageSizes:{letter:'Letter (8.5" \xD7 11")',a4:'A4 (8.27" \xD7 11.69")',legal:'Legal (8.5" \xD7 14")',a3:'A3 (11.69" \xD7 16.54")',a5:'A5 (5.83" \xD7 8.27")',b5:'B5 (6.93" \xD7 9.84")',executive:'Executive (7.25" \xD7 10.5")'}},tableProperties:{title:"Table Properties",widthType:"Width type",widthLabel:"Width",alignmentLabel:"Alignment",widthTypes:{auto:"Auto",fixed:"Fixed (twips)",percentage:"Percentage"},units:{fiftiethsPercent:"(50ths of %)",twips:"tw"},alignOptions:{left:"Left",center:"Center",right:"Right"}},pasteSpecial:{title:"Paste Special",keepFormatting:"Keep Source Formatting",keepFormattingDescription:"Paste with original formatting",keepFormattingShortcut:"Ctrl+V",plainText:"Paste as Plain Text",plainTextDescription:"Paste without any formatting",plainTextShortcut:"Ctrl+Shift+V",readingClipboard:"Reading clipboard...",preview:"Preview:",noContent:"No content available to paste",clipboardError:"Unable to read clipboard. Please use Ctrl+V to paste."},footnoteProperties:{title:"Footnote & Endnote Properties",footnotes:"Footnotes",endnotes:"Endnotes",position:"Position",numberFormat:"Number format",startAt:"Start at",numbering:"Numbering",footnotePositions:{bottomOfPage:"Bottom of page",belowText:"Below text"},endnotePositions:{endOfDocument:"End of document",endOfSection:"End of section"},numberingOptions:{continuous:"Continuous",restartSection:"Restart each section",restartPage:"Restart each page"},formats:{decimal:"1, 2, 3, ...",lowerRoman:"i, ii, iii, ...",upperRoman:"I, II, III, ...",lowerAlpha:"a, b, c, ...",upperAlpha:"A, B, C, ...",symbols:"*, \u2020, \u2021, ..."}},keyboardShortcuts:{ariaLabel:"Keyboard Shortcuts",searchPlaceholder:"Search shortcuts...",categories:{editing:"Editing",formatting:"Formatting",navigation:"Navigation",clipboard:"Clipboard",selection:"Selection",view:"View",file:"File",other:"Other"},shortcuts:{save:"Save",saveDescription:"Save document",print:"Print",printDescription:"Print document",undo:"Undo",undoDescription:"Undo last action",redo:"Redo",redoDescription:"Redo last action",delete:"Delete",deleteDescription:"Delete selected text",find:"Find",findDescription:"Find text in document",findReplace:"Find & Replace",findReplaceDescription:"Find and replace text",cut:"Cut",cutDescription:"Cut selected text",copy:"Copy",copyDescription:"Copy selected text",paste:"Paste",pasteDescription:"Paste from clipboard",pastePlainText:"Paste as Plain Text",pastePlainTextDescription:"Paste without formatting",bold:"Bold",boldDescription:"Toggle bold formatting",italic:"Italic",italicDescription:"Toggle italic formatting",underline:"Underline",underlineDescription:"Toggle underline formatting",strikethrough:"Strikethrough",strikethroughDescription:"Toggle strikethrough",subscript:"Subscript",subscriptDescription:"Toggle subscript",superscript:"Superscript",superscriptDescription:"Toggle superscript",alignLeft:"Align Left",alignLeftDescription:"Left align paragraph",alignCenter:"Align Center",alignCenterDescription:"Center align paragraph",alignRight:"Align Right",alignRightDescription:"Right align paragraph",justify:"Justify",justifyDescription:"Justify paragraph",increaseIndent:"Increase Indent",increaseIndentDescription:"Increase paragraph indent",decreaseIndent:"Decrease Indent",decreaseIndentDescription:"Decrease paragraph indent",selectAll:"Select All",selectAllDescription:"Select all content",selectWord:"Select Word",selectWordDescription:"Select current word",selectParagraph:"Select Paragraph",selectParagraphDescription:"Select current paragraph",extendSelectionByWord:"Extend Selection by Word",extendSelectionByWordDescription:"Extend selection to next/previous word",extendSelectionToLineEdge:"Extend Selection to Line Edge",extendSelectionToLineEdgeDescription:"Extend selection to line start/end",moveByWord:"Move by Word",moveByWordDescription:"Move cursor to next/previous word",moveToLineStart:"Move to Line Start",moveToLineStartDescription:"Move cursor to start of line",moveToLineEnd:"Move to Line End",moveToLineEndDescription:"Move cursor to end of line",moveToDocumentStart:"Move to Document Start",moveToDocumentStartDescription:"Move cursor to start of document",moveToDocumentEnd:"Move to Document End",moveToDocumentEndDescription:"Move cursor to end of document",pageUp:"Page Up",pageUpDescription:"Scroll up one page",pageDown:"Page Down",pageDownDescription:"Scroll down one page",zoomIn:"Zoom In",zoomInDescription:"Increase zoom level",zoomOut:"Zoom Out",zoomOutDescription:"Decrease zoom level",resetZoom:"Reset Zoom",resetZoomDescription:"Reset zoom to 100%",keyboardShortcuts:"Keyboard Shortcuts",keyboardShortcutsDescription:"Show this help dialog"},noResults:'No shortcuts found matching "{query}"',pressEscToClose:"Press {key} to close",or:"or"}},comments:{resolved:"Resolved",resolve:"Resolve",reopen:"Reopen",moreOptions:"More options",unknown:"Unknown",addComment:"Add a comment...",replyPlaceholder:"Reply or add others with @",replyCount:"{count, plural, one {# reply} other {# replies}}"},trackedChanges:{unknown:"Unknown",replaced:"Replaced",with:"with",added:"Added",deleted:"Deleted"},contextMenu:{ariaLabel:"AI actions menu",textMenuAriaLabel:"Text editing menu",customPromptPlaceholder:"Enter custom prompt...",cut:"Cut",cutShortcut:"Ctrl+X",copy:"Copy",copyShortcut:"Ctrl+C",paste:"Paste",pasteShortcut:"Ctrl+V",pastePlainText:"Paste as Plain Text",pastePlainTextShortcut:"Ctrl+Shift+V",delete:"Delete",deleteShortcut:"Del",selectAll:"Select All",selectAllShortcut:"Ctrl+A",selected:"Selected:",aiActions:{askAi:"Ask AI",rewrite:"Rewrite",expand:"Expand",summarize:"Summarize",translate:"Translate",explain:"Explain",fixGrammar:"Fix Grammar",makeFormal:"Make Formal",makeCasual:"Make Casual",custom:"Custom"}},documentOutline:{ariaLabel:"Document outline",closeAriaLabel:"Close outline",closeTitle:"Close outline",title:"Outline",noHeadings:"No headings found. Add headings to your document to see them here."},sidebar:{ariaLabel:"Annotations sidebar"},viewer:{pageIndicator:"{current} of {total}"},titleBar:{untitled:"Untitled",documentNameAriaLabel:"Document name",menuBarAriaLabel:"Menu bar"},errors:{loadingDocument:"Loading document...",noDocumentLoaded:"No document loaded",failedToLoad:"Failed to Load Document",unableToParse:"Unable to Parse Document",somethingWentWrong:"Something went wrong",errorDescription:"An error occurred while rendering this component. Please try again or contact support if the problem persists.",errorLabel:"Error:",componentStack:"Component Stack:",tryAgain:"Try Again",showDetails:"Show details",hideDetails:"Hide details",unsavedChanges:"You have unsaved changes. Are you sure you want to leave?"},table:{insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table",mergeCells:"Merge cells",splitCell:"Split cell",editingTools:"Table editing tools",label:"Table:",cellFillColor:"Cell Fill Color",borderColor:"Border Color",borderWidth:"Border width",unknownAction:"Unknown Action",borders:{all:"All borders",outside:"Outside borders",inside:"Inside borders",none:"No borders",remove:"Remove borders",top:"Top border",bottom:"Bottom border",left:"Left border",right:"Right border",styleAriaLabel:"Border style",tooltip:"Borders"},moreOptions:"More table options",styles:{title:"Table Styles",label:"Styles",normalTable:"Normal Table",tableGrid:"Table Grid",gridTableLight:"Grid Table Light",plainTable1:"Plain Table 1",plainTable2:"Plain Table 2",plainTable3:"Plain Table 3",plainTable4:"Plain Table 4",gridTable1Light:"Grid Table 1 Light",gridTable4Accent1:"Grid Table 4 Accent 1",gridTable5Dark:"Grid Table 5 Dark",listTable3Accent2:"List Table 3 Accent 2",listTable4Accent3:"List Table 4 Accent 3",gridTable4Accent5:"Grid Table 4 Accent 5",gridTable4Accent6:"Grid Table 4 Accent 6"}},tableAdvanced:{verticalAlignment:"Vertical alignment",top:"Top",middle:"Middle",bottom:"Bottom",cellMargins:"Cell margins",textDirection:"Text direction",textDirections:{horizontal:"Horizontal (LR)",verticalRL:"Vertical (top-bottom, RL)",verticalLR:"Vertical (bottom-top, LR)"},toggleNoWrap:"Toggle no-wrap",rowHeight:"Row height",heightRules:{auto:"Auto",atLeast:"At least",exact:"Exact"},rule:"Rule",height:"Height",toggleHeaderRow:"Toggle header row",distributeColumns:"Distribute columns evenly",autoFit:"Auto-fit to contents",tableProperties:"Table properties...",tableAlignment:"Table alignment",alignTableLeft:"Align table left",alignTableCenter:"Align table center",alignTableRight:"Align table right",tableOptionsMenu:"Table options menu",tableOptions:"Table options"},imageTransform:{tooltip:"Transform",rotateClockwise:"Rotate clockwise",rotateCounterClockwise:"Rotate counter-clockwise",flipHorizontal:"Flip horizontal",flipVertical:"Flip vertical"},imageWrap:{inline:"In Line with Text",floatLeft:"Square Left",floatRight:"Square Right",topAndBottom:"Top and Bottom",behindText:"Behind Text",inFrontOfText:"In Front of Text",tooltipPrefix:"Wrap: {label}",menu:{inLineWithText:"In Line with Text",squareLeft:"Square Left",squareRight:"Square Right",behindText:"Behind Text",inFrontOfText:"In Front of Text",ariaLabel:"Image layout options"},menuDesc:{inLineWithText:"Image flows in the line as a glyph",squareLeft:"Image floats left, text wraps on the right",squareRight:"Image floats right, text wraps on the left",behindText:"Image paints behind body text",inFrontOfText:"Image paints over body text"}},responsePreview:{loading:"{action}...",result:"{action} Result",closeEsc:"Close (Esc)",editPrompt:"Edit the result before accepting:",changes:"Changes:",original:"Original:",new:"New:",cancelEdit:"Cancel Edit"},commentMarkers:{resolvedComment:"Resolved comment",comment:"Comment"},editor:{toggleCommentsSidebar:"Toggle comments sidebar",showDocumentOutline:"Show document outline",editing:"Editing",editingDescription:"Edit document directly",suggesting:"Suggesting",suggestingDescription:"Edits become suggestions",viewing:"Viewing",viewingDescription:"Read-only, no edits",failedToParse:"Failed to parse document",linkRemoved:"Link removed",linkCopied:"Link copied to clipboard",failedToSave:"Failed to save document"},hyperlinkPopup:{displayTextPlaceholder:"Display text",urlPlaceholder:"https://example.com",copyLink:"Copy link",editLink:"Edit link",removeLink:"Remove link"},headerFooter:{header:"Header",footer:"Footer",options:"Options",insertPageNumber:"Insert current page number",insertTotalPages:"Insert total page count",remove:"Remove {label}",closeEditing:"Close {label} editing"},image:{placeholder:"Image placeholder",placeholderText:"[Image]",editableAriaLabel:"Editable image"},ruler:{horizontal:"Horizontal ruler",vertical:"Vertical ruler",firstLineIndent:"First line indent",leftIndent:"Left indent",rightIndent:"Right indent",topMargin:"Top margin",bottomMargin:"Bottom margin"},print:{label:"Print",allPages:"All ({totalPages} pages)",singlePage:"Page {start}",pageRange:"Pages {start}-{end}"},unsaved:{unsaved:"Unsaved",saved:"Saved",unsavedTitle:"Document has unsaved changes",savedTitle:"All changes saved",unsavedAriaLabel:"Unsaved changes",savedAriaLabel:"All changes saved"},loading:{label:"Loading"},agentPanel:{defaultTitle:"Assistant",toggle:"Open assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var b=g,f=react.createContext(b),T=react.createContext("en");function d(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function L(e,o){if(!o)return e;let t={...e};for(let r of Object.keys(o)){let i=o[r];i!==null&&(d(e[r])&&d(i)?t[r]=L(e[r],i):i!==void 0&&(t[r]=i));}return t}function v(e,o){let t=e;for(let r of o.split(".")){if(!d(t))return;t=t[r];}return typeof t=="string"?t:void 0}function P(e){let o={},t=/(=\d+|\w+)\s*\{([^}]*)\}/g,r;for(;(r=t.exec(e))!==null;)o[r[1]]=r[2];return o}function x(e,o,t){return o?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(i,n,l)=>{let a=Number(o[n]);if(isNaN(a))return i;let s=P(l),p=s[`=${a}`];if(p!==void 0)return p.replace(/#/g,String(a));let c;try{c=new Intl.PluralRules(t||"en").select(a);}catch{c=a===1?"one":"other";}return (s[c]??s.other??"").replace(/#/g,String(a))}).replace(/\{(\w+)\}/g,(i,n)=>{let l=o[n];return l!==void 0?String(l):`{${n}}`}):e}function R({i18n:e,children:o}){let t=e,r=typeof t?._lang=="string"?t._lang:"en",i=react.useMemo(()=>L(b,t),[t]);return jsxRuntime.jsx(T.Provider,{value:r,children:jsxRuntime.jsx(f.Provider,{value:i,children:o})})}function w(){let e=react.useContext(f),o=react.useContext(T);return {t:react.useCallback((r,i)=>{let n=v(e,r);return x(n??r,i,o)},[e,o])}}
2
+ exports.a=g;exports.b=R;exports.c=w;