@eigenpal/docx-editor-core 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.mts +5 -4
- package/dist/agent/index.d.ts +5 -4
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/anchoredObjectPosition-CS-8BfhO.d.ts +48 -0
- package/dist/anchoredObjectPosition-KJEyF-wr.d.mts +48 -0
- package/dist/{chunk-U4WUDHDK.js → chunk-2SGJZYQF.js} +1 -1
- package/dist/chunk-3ANZ3252.mjs +2 -0
- package/dist/chunk-3G44SFHX.mjs +4 -0
- package/dist/{chunk-4QEETB7U.js → chunk-3QPKTG2Y.js} +2 -2
- package/dist/chunk-3R7QHNI5.js +2 -0
- package/dist/chunk-4GFTMGSV.mjs +1 -0
- package/dist/chunk-4RTVLMRZ.js +2 -0
- package/dist/{chunk-THLJYXFB.js → chunk-6V3SFHEM.js} +1 -1
- package/dist/chunk-72KLR6TJ.mjs +1 -0
- package/dist/{chunk-6ZXL3EIP.mjs → chunk-7CZEZ3UL.mjs} +1 -1
- package/dist/chunk-7JQVKJRN.mjs +1 -0
- package/dist/{chunk-Z5MJYQSD.mjs → chunk-7UZJ5YDF.mjs} +1 -1
- package/dist/chunk-7WGN2OBZ.js +1 -0
- package/dist/{chunk-BXWOLARZ.js → chunk-APNMO5JT.js} +1 -1
- package/dist/{chunk-KZXZWGFX.mjs → chunk-B46V5G46.mjs} +1 -1
- package/dist/chunk-BH3ACQ3M.js +59 -0
- package/dist/chunk-BUCOTKYY.js +1 -0
- package/dist/{chunk-5BLQHXWK.mjs → chunk-CDXCFHOY.mjs} +1 -1
- package/dist/chunk-CHN26LLL.mjs +59 -0
- package/dist/chunk-CZSAC65M.js +2 -0
- package/dist/chunk-D3PRIF3Y.mjs +1 -0
- package/dist/{chunk-7BVHKWEW.mjs → chunk-DFUWJHKF.mjs} +1 -1
- package/dist/chunk-DKKTY56Q.js +1 -0
- package/dist/chunk-FIGLFSNR.js +1 -0
- package/dist/{chunk-AMB6Y77B.js → chunk-FQS436KN.js} +1 -1
- package/dist/chunk-FYRJTDC4.mjs +2 -0
- package/dist/chunk-GYWTUUXX.mjs +2 -0
- package/dist/chunk-INDYZOOS.js +1 -0
- package/dist/chunk-IUVQJ6PX.mjs +1 -0
- package/dist/chunk-JUMHC5Z6.mjs +1 -0
- package/dist/chunk-L6YTCHOQ.mjs +1 -0
- package/dist/{chunk-D62KS7QG.mjs → chunk-LAJPGQEE.mjs} +1 -1
- package/dist/chunk-LERLET2D.js +4 -0
- package/dist/chunk-MEVZCB56.mjs +1 -0
- package/dist/{chunk-BOOHU5EW.mjs → chunk-MOCGHQ4A.mjs} +1 -1
- package/dist/chunk-NAFMAKLK.js +2 -0
- package/dist/chunk-OTHV7YV2.js +2 -0
- package/dist/chunk-Q5B5GKXD.mjs +1 -0
- package/dist/{chunk-U4XMGWF7.js → chunk-RAWVGULQ.js} +1 -1
- package/dist/chunk-RQVHKDXK.js +2 -0
- package/dist/{chunk-E4JMCA5X.js → chunk-SCK6ZM5V.js} +2 -2
- package/dist/chunk-SWBLJF6R.mjs +2 -0
- package/dist/chunk-T4RYVPAB.js +1 -0
- package/dist/{chunk-UGV4KRQB.js → chunk-TJRROR6U.js} +1 -1
- package/dist/chunk-TURYWKNS.js +1 -0
- package/dist/chunk-UE2ZKRYB.mjs +2 -0
- package/dist/chunk-VOCHZNOF.mjs +1 -0
- package/dist/{chunk-OEXVWIHW.mjs → chunk-W77JXDEV.mjs} +1 -1
- package/dist/chunk-WDBZ3QVB.js +1 -0
- package/dist/chunk-WWBNJ7KF.js +1 -0
- package/dist/chunk-WWNOXNEX.mjs +2 -0
- package/dist/chunk-XWC67YLW.js +1 -0
- package/dist/{chunk-QKLY4F2J.mjs → chunk-YNUPP7UG.mjs} +1 -1
- package/dist/{chunk-HQPWFUP5.js → chunk-Z3LGMBJC.js} +1 -1
- package/dist/{colorResolver-BZ_yScf4.d.ts → colorResolver-8A-qj-LP.d.ts} +1 -1
- package/dist/{colorResolver-C6DtsoFI.d.mts → colorResolver-BCvxTlLF.d.mts} +1 -1
- package/dist/{content-CE-ZdMwG.d.mts → content-3xF4WDE8.d.mts} +51 -7
- package/dist/{content-CYXJ2tfQ.d.ts → content-C8fc_tL6.d.ts} +51 -7
- package/dist/{contentControlValues-gyVPsi6m.d.ts → contentControlValues-DGDKD589.d.ts} +1 -1
- package/dist/{contentControlValues-DAwTWfgR.d.mts → contentControlValues-DjWvoJQ-.d.mts} +1 -1
- package/dist/core-plugins.d.mts +6 -5
- package/dist/core-plugins.d.ts +6 -5
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +12 -11
- package/dist/core.d.ts +12 -11
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{documentStyles-DToJv9co.d.ts → documentStyles-C7k_8Sye.d.ts} +1 -1
- package/dist/{documentStyles-D87dxl18.d.mts → documentStyles-qR0VR2s0.d.mts} +1 -1
- package/dist/docx/index.d.mts +3 -2
- package/dist/docx/index.d.ts +3 -2
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +3 -2
- package/dist/docx/parser.d.ts +3 -2
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +3 -2
- package/dist/docx/rezip.d.ts +3 -2
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +42 -4
- package/dist/docx/serializer/index.d.ts +42 -4
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/{fontLoader-Z7pqeNvZ.d.mts → fontLoader-CUS1BPv7.d.mts} +1 -1
- package/dist/{fontLoader-Cm02v7PO.d.ts → fontLoader-Dl9SEKex.d.ts} +1 -1
- package/dist/{footnotes-lCH_P3N3.d.mts → footnotes-BtVc6VFl.d.mts} +14 -1
- package/dist/{footnotes-skVvEHvZ.d.ts → footnotes-DcUMWXul.d.ts} +14 -1
- package/dist/{headerFooterLayout-Bd58Tum3.d.ts → headerFooterLayout-4E-S4Aay.d.ts} +5 -5
- package/dist/{headerFooterLayout-CuIJiIzi.d.mts → headerFooterLayout-DlJLWmpR.d.mts} +5 -5
- package/dist/headless.d.mts +47 -11
- package/dist/headless.d.ts +47 -11
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/clickToPositionDom.d.mts +26 -1
- package/dist/layout-bridge/clickToPositionDom.d.ts +26 -1
- package/dist/layout-bridge/clickToPositionDom.js +1 -1
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +29 -7
- package/dist/layout-bridge/index.d.ts +29 -7
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +25 -3
- package/dist/layout-bridge/measuring/index.d.ts +25 -3
- package/dist/layout-bridge/measuring/index.js +1 -1
- package/dist/layout-bridge/measuring/index.mjs +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.mts +3 -2
- package/dist/layout-bridge/toFlowBlocks.d.ts +3 -2
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +16 -3
- package/dist/layout-engine/index.d.ts +16 -3
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +22 -1
- package/dist/layout-engine/types.d.ts +22 -1
- package/dist/layout-painter/index.d.mts +6 -4
- package/dist/layout-painter/index.d.ts +6 -4
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +9 -5
- package/dist/layout-painter/renderPage.d.ts +9 -5
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +3 -2
- package/dist/managers/AutoSaveManager.d.ts +3 -2
- package/dist/managers/TableSelectionManager.d.mts +3 -2
- package/dist/managers/TableSelectionManager.d.ts +3 -2
- package/dist/managers/types.d.mts +3 -2
- package/dist/managers/types.d.ts +3 -2
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +4 -3
- package/dist/mcp.d.ts +4 -3
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +2 -2
- package/dist/{nodes-BNkRKBBX.d.ts → nodes-75Q9GBxV.d.ts} +1 -1
- package/dist/{nodes-Bz-UHhLE.d.mts → nodes-cEI7hVY2.d.mts} +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +20 -1
- package/dist/prosemirror/commands/index.d.ts +20 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +3 -2
- package/dist/prosemirror/conversion/index.d.ts +3 -2
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +12 -2
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +6 -5
- package/dist/prosemirror/index.d.ts +6 -5
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +1 -1
- package/dist/prosemirror/plugins/index.d.mts +4 -3
- package/dist/prosemirror/plugins/index.d.ts +4 -3
- package/dist/prosemirror/schema/index.d.mts +3 -2
- package/dist/prosemirror/schema/index.d.ts +3 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +1 -1
- package/dist/prosemirror/styles/index.d.ts +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -1
- package/dist/{registry-Cpyybgij.d.mts → registry-NLnxX7pq.d.mts} +1 -1
- package/dist/{registry-E5pahPKL.d.ts → registry-egK81C_z.d.ts} +1 -1
- package/dist/sectionPropertiesSerializer-D86QlzlT.d.mts +59 -0
- package/dist/sectionPropertiesSerializer-uXyGONxu.d.ts +59 -0
- package/dist/{styles-EI2lxeEN.d.mts → styles-BOJ93SAm.d.mts} +1 -1
- package/dist/{styles-BBv7doYK.d.ts → styles-BWqX2AS-.d.ts} +1 -1
- package/dist/types/content.d.mts +2 -1
- package/dist/types/content.d.ts +2 -1
- package/dist/types/content.js +1 -1
- package/dist/types/content.mjs +1 -0
- package/dist/types/document.d.mts +17 -6
- package/dist/types/document.d.ts +17 -6
- package/dist/types/document.js +1 -1
- package/dist/types/document.mjs +1 -0
- package/dist/{types-DXG7vqe9.d.ts → types-DDQWU7-j.d.ts} +1 -1
- package/dist/{types-dYdjUZMo.d.mts → types-DTF0N7UE.d.mts} +1 -1
- package/dist/utils/comments.d.mts +2 -1
- package/dist/utils/comments.d.ts +2 -1
- package/dist/utils/index.d.mts +5 -4
- package/dist/utils/index.d.ts +5 -4
- package/dist/{variableDetector-HPZbJ_gw.d.ts → variableDetector-1mxzPfs2.d.ts} +1 -1
- package/dist/{variableDetector-C7BLz9sJ.d.mts → variableDetector-CaY-sDau.d.mts} +1 -1
- package/dist/watermark-DAcnAs_J.d.mts +77 -0
- package/dist/watermark-DAcnAs_J.d.ts +77 -0
- package/package.json +1 -1
- package/dist/chunk-2EQGBVPV.js +0 -2
- package/dist/chunk-44FHVKSI.js +0 -1
- package/dist/chunk-44JKHPGF.mjs +0 -2
- package/dist/chunk-5M7TI6TV.js +0 -1
- package/dist/chunk-6Y6LON6Y.mjs +0 -1
- package/dist/chunk-7RDCZLTU.js +0 -1
- package/dist/chunk-7ZN4WI5N.mjs +0 -4
- package/dist/chunk-CCPBNE2F.mjs +0 -2
- package/dist/chunk-DV6GWBUJ.js +0 -2
- package/dist/chunk-EQAORQC3.mjs +0 -1
- package/dist/chunk-FYKRDDKG.js +0 -1
- package/dist/chunk-GUQFNJHE.mjs +0 -1
- package/dist/chunk-ICE6NC3S.mjs +0 -1
- package/dist/chunk-IFUED5ZS.mjs +0 -1
- package/dist/chunk-KGTEBLB6.js +0 -1
- package/dist/chunk-KRN6YSR2.mjs +0 -1
- package/dist/chunk-L72YAV5N.js +0 -3
- package/dist/chunk-LTHT4A4S.js +0 -1
- package/dist/chunk-MERJFGEP.mjs +0 -59
- package/dist/chunk-MP4QSEO2.mjs +0 -1
- package/dist/chunk-PVAVS3IU.js +0 -1
- package/dist/chunk-QYF7BRG3.js +0 -2
- package/dist/chunk-RKDVY7I3.mjs +0 -1
- package/dist/chunk-ROG4MNOR.js +0 -4
- package/dist/chunk-SORYYVJ7.js +0 -1
- package/dist/chunk-SZIOF5SG.js +0 -59
- package/dist/chunk-VMRUBLPI.js +0 -1
- package/dist/chunk-WKUHYMDO.mjs +0 -1
- package/dist/chunk-WLDI6N3B.mjs +0 -3
- package/dist/chunk-WLHNIXWC.mjs +0 -2
- package/dist/chunk-YMZ3F2FZ.mjs +0 -1
- package/dist/chunk-ZBFNOJGY.js +0 -1
- package/dist/documentSerializer-Bghq9rFI.d.mts +0 -36
- package/dist/documentSerializer-C4lFC60P.d.ts +0 -36
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkC2BAPYGJ_js=require('./chunk-C2BAPYGJ.js');function a(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(e){return e==null||!Number.isFinite(e)?"0":String(Math.round(e))}var x='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"',y='mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"';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 ze(e){return `<w:headerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function ke(e){return `<w:footerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function Re(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 Ie(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 je(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 Be(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 Ae(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(i=>{let o=[];return i.width!==void 0&&o.push(`w:w="${s(i.width)}"`),i.space!==void 0&&o.push(`w:space="${s(i.space)}"`),`<w:col ${o.join(" ")}/>`}).join("")),t.length===0&&!n?"":`<w:cols${t.length>0?" "+t.join(" "):""}>${n}</w:cols>`}function Ee(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 De(e){if(!e.pageBorders)return "";let t=e.pageBorders,n=[],r=[];if(t.display&&n.push(`w:display="${t.display}"`),t.offsetFrom&&n.push(`w:offsetFrom="${t.offsetFrom}"`),t.zOrder&&n.push(`w:zOrder="${t.zOrder}"`),t.top){let o=R(t.top,"top");o&&r.push(o);}if(t.left){let o=R(t.left,"left");o&&r.push(o);}if(t.bottom){let o=R(t.bottom,"bottom");o&&r.push(o);}if(t.right){let o=R(t.right,"right");o&&r.push(o);}return r.length===0?"":`<w:pgBorders${n.length>0?" "+n.join(" "):""}>${r.join("")}</w:pgBorders>`}function Xe(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 I(e){if(!e)return "";let t=[];if(e.headerReferences)for(let p of e.headerReferences)t.push(ze(p));if(e.footerReferences)for(let p of e.footerReferences)t.push(ke(p));let n=Re(e.footnotePr);n&&t.push(n);let r=Ie(e.endnotePr);r&&t.push(r),e.sectionStart&&t.push(`<w:type w:val="${e.sectionStart}"/>`);let i=je(e);i&&t.push(i);let o=Be(e);if(o&&t.push(o),e.paperSrcFirst!==void 0||e.paperSrcOther!==void 0){let p=[];e.paperSrcFirst!==void 0&&p.push(`w:first="${e.paperSrcFirst}"`),e.paperSrcOther!==void 0&&p.push(`w:other="${e.paperSrcOther}"`),t.push(`<w:paperSrc ${p.join(" ")}/>`);}let c=De(e);c&&t.push(c);let l=Ee(e);l&&t.push(l);let u=Ae(e);u&&t.push(u),e.verticalAlign&&t.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.titlePg&&t.push("<w:titlePg/>"),e.bidi&&t.push("<w:bidi/>");let f=Xe(e);return f&&t.push(f),e.evenAndOddHeaders&&t.push("<w:evenAndOddHeaders/>"),t.length===0?"":`<w:sectPr>${t.join("")}</w:sectPr>`}function Me(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(" ")}/>`}var Le=["top","left","bottom","right","between","bar"];function q(e){if(!e)return "";let t=[];for(let n of Le){let r=Me(e[n],n);r&&t.push(r);}return t.length===0?"":`<w:pBdr>${t.join("")}</w:pBdr>`}function G(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 _(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 V(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 U(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 Y(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 Z(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 K(e){let t=[`w:id="${e.id}"`,`w:name="${a(e.name)}"`];return e.colFirst!==void 0&&t.push(`w:colFirst="${e.colFirst}"`),e.colLast!==void 0&&t.push(`w:colLast="${e.colLast}"`),`<w:bookmarkStart ${t.join(" ")}/>`}function Q(e){return `<w:bookmarkEnd w:id="${e.id}"/>`}function W(e){let t=[];e.rId&&t.push(`r:id="${e.rId}"`),e.anchor&&t.push(`w:anchor="${a(e.anchor)}"`),e.tooltip&&t.push(`w:tooltip="${a(e.tooltip)}"`),e.target&&t.push(`w:tgtFrame="${a(e.target)}"`),e.history===false&&t.push('w:history="0"'),e.docLocation&&t.push(`w:docLocation="${a(e.docLocation)}"`);let n=e.children.map(i=>i.type==="run"?P(i):i.type==="bookmarkStart"?K(i):i.type==="bookmarkEnd"?Q(i):"").join("");return `<w:hyperlink${t.length>0?" "+t.join(" "):""}>${n}</w:hyperlink>`}function ee(e){let t=[],n=e.content.find(l=>l.type==="run"),r=n?.formatting?T(n.formatting):"",i=['w:fldCharType="begin"'];e.fldLock&&i.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`);let c=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${c}>${a(e.instruction)}</w:instrText></w:r>`),t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`);for(let l of e.content)l.type==="run"&&t.push(P(l));return t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function te(e){let t=[],n=e.fieldResult?.[0]?.formatting,r=n?T(n):"",i=['w:fldCharType="begin"'];if(e.fldLock&&i.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`),e.fieldCode.length>0)t.push(...e.fieldCode.map(o=>P(o)));else {let c=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${c}>${a(e.instruction)}</w:instrText></w:r>`);}return t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`),t.push(...e.fieldResult.map(o=>P(o))),t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function ne(e){let t=e.properties,n=[];switch(t.alias&&n.push(`<w:alias w:val="${a(t.alias)}"/>`),t.tag&&n.push(`<w:tag w:val="${a(t.tag)}"/>`),t.lock&&t.lock!=="unlocked"&&n.push(`<w:lock w:val="${t.lock}"/>`),t.showingPlaceholder&&n.push("<w:showingPlcHdr/>"),t.sdtType){case "plainText":n.push("<w:text/>");break;case "date":t.dateFormat?n.push(`<w:date w:fullDate="${a(t.dateFormat)}"/>`):n.push("<w:date/>");break;case "dropDownList":{let i=(t.listItems??[]).map(o=>`<w:listItem w:displayText="${a(o.displayText)}" w:value="${a(o.value)}"/>`).join("");n.push(`<w:dropDownList>${i}</w:dropDownList>`);break}case "comboBox":{let i=(t.listItems??[]).map(o=>`<w:listItem w:displayText="${a(o.displayText)}" w:value="${a(o.value)}"/>`).join("");n.push(`<w:comboBox>${i}</w:comboBox>`);break}case "checkbox":n.push(`<w14:checkbox><w14:checked w14:val="${t.checked?"1":"0"}"/></w14:checkbox>`);break;case "picture":n.push("<w:picture/>");break}let r=e.content.map(i=>{switch(i.type){case "run":return P(i);case "hyperlink":return W(i);case "simpleField":return ee(i);case "complexField":return te(i);case "inlineSdt":return ne(i);case "mathEquation":return i.ommlXml||"";default:return i}}).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="${a(t.name)}"`];return `<w:${e} ${n.join(" ")}/>`}function j(e,t){let n=t.info,r=Number.isInteger(n.id)&&n.id>=0?n.id:0,i=typeof n.author=="string"?n.author.trim():"",o=i.length>0?i:"Unknown",c=typeof n.date=="string"?n.date.trim():void 0,l=[`w:id="${r}"`,`w:author="${a(o)}"`];c&&l.push(`w:date="${a(c)}"`);let u=t.content.map(f=>{if(f.type==="run"){let p=P(f),w=f.content.some(m=>m.type==="drawing");return (e==="del"||e==="moveFrom")&&!w?p.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>"):p}return f.type==="hyperlink"?W(f):""}).join("");return `<w:${e} ${l.join(" ")}>${u}</w:${e}>`}function re(e){switch(e.type){case "run":return P(e);case "hyperlink":return W(e);case "bookmarkStart":return K(e);case "bookmarkEnd":return Q(e);case "simpleField":return ee(e);case "complexField":return te(e);case "inlineSdt":return ne(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 j("ins",e);case "deletion":return j("del",e);case "moveFrom":return j("moveFrom",e);case "moveTo":return j("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 ie(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"&&e.author.length>0?e.author:"Unknown",r=[`w:id="${t}"`,`w:author="${a(n)}"`],i=typeof e.date=="string"&&e.date.length>0?e.date:void 0;return i&&r.push(`w:date="${a(i)}"`),r.join(" ")}function We(e,t,n){let r=[];if(t&&r.push(`<w:ins ${ie(t)}/>`),n&&r.push(`<w:del ${ie(n)}/>`),e?.runProperties){let i=T(e.runProperties);if(i)if(i.startsWith("<w:rPr>")&&i.endsWith("</w:rPr>")){let o=i.slice(7,-8);o.length>0&&r.push(o);}else i.startsWith("<w:rPr/>")||r.push(i);}return r.length===0?"":`<w:rPr>${r.join("")}</w:rPr>`}function oe(e,t,n,r,i){let o=[];if(e){e.styleId&&o.push(`<w:pStyle w:val="${a(e.styleId)}"/>`),e.keepNext===true?o.push("<w:keepNext/>"):e.keepNext===false&&o.push('<w:keepNext w:val="0"/>'),e.keepLines===true?o.push("<w:keepLines/>"):e.keepLines===false&&o.push('<w:keepLines w:val="0"/>'),e.contextualSpacing===true?o.push("<w:contextualSpacing/>"):e.contextualSpacing===false&&o.push('<w:contextualSpacing w:val="0"/>'),e.pageBreakBefore===true?o.push("<w:pageBreakBefore/>"):e.pageBreakBefore===false&&o.push('<w:pageBreakBefore w:val="0"/>');let c=Z(e.frame);c&&o.push(c),e.widowControl===false?o.push('<w:widowControl w:val="0"/>'):e.widowControl===true&&o.push("<w:widowControl/>");let l=Y(e.numPr);l&&o.push(l);let u=q(e.borders);u&&o.push(u);let f=G(e.shading);f&&o.push(f);let p=_(e.tabs);p&&o.push(p),e.suppressLineNumbers===true?o.push("<w:suppressLineNumbers/>"):e.suppressLineNumbers===false&&o.push('<w:suppressLineNumbers w:val="0"/>'),e.suppressAutoHyphens===true?o.push("<w:suppressAutoHyphens/>"):e.suppressAutoHyphens===false&&o.push('<w:suppressAutoHyphens w:val="0"/>');let w=V(e);w&&o.push(w);let m=U(e);m&&o.push(m),e.bidi===true?o.push("<w:bidi/>"):e.bidi===false&&o.push('<w:bidi w:val="0"/>'),e.alignment&&o.push(`<w:jc w:val="${e.alignment}"/>`),e.outlineLevel!==void 0&&o.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`);}if(!i?.baseOnly){let c=We(e,n??void 0,r??void 0);if(c&&o.push(c),i?.sectionProperties){let l=I(i.sectionProperties);l&&o.push(l);}t&&t.length>0&&o.push(Oe(t[0]));}return o.length===0?"":`<w:pPr>${o.join("")}</w:pPr>`}function He(e){return !e.startsWith("<w:pPr>")||!e.endsWith("</w:pPr>")?"":e.slice(7,-8)}function Oe(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.info.date=="string"?e.info.date.trim():void 0,o=[`w:id="${t}"`,`w:author="${a(r)}"`];i&&o.push(`w:date="${a(i)}"`);let c=oe(e.previousFormatting,void 0,void 0,void 0,{baseOnly:true})||"<w:pPr/>",l=He(c),u=l.length>0?`<w:pPr>${l}</w:pPr>`:"<w:pPr/>";return `<w:pPrChange ${o.join(" ")}>${u}</w:pPrChange>`}function v(e){let t=[],n=[];e.paraId&&n.push(`w14:paraId="${e.paraId}"`),e.textId&&n.push(`w14:textId="${e.textId}"`);let r=n.length>0?" "+n.join(" "):"",i=oe(e.formatting,e.propertyChanges,e.pPrIns,e.pPrDel,e.sectionProperties?{sectionProperties:e.sectionProperties}:void 0);i&&t.push(i);let o=!!e.renderedPageBreakBefore;for(let c of e.content){let l=re(c);if(l){if(o){let u=Ne(l);u&&(l=u,o=false);}t.push(l);}}return `<w:p${r}>${t.join("")}</w:p>`}function Ne(e){let t=/<w:r(?=[\s>/])[^>]*>/;return t.test(e)?e.replace(t,n=>`${n}<w:lastRenderedPageBreak/>`):null}var se=1e5;function O(){se=1e5;}function ae(e){return e!=null&&e!==""&&e!==0?String(e):String(se++)}function H(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 qe(e){if(!e||e.type==="none")return "<a:noFill/>";if(e.type==="solid"&&e.color)return `<a:solidFill>${H(e.color)}</a:solidFill>`;if(e.type==="gradient"&&e.gradient){let t=e.gradient,n=t.stops.map(i=>`<a:gs pos="${i.position}">${H(i.color)}</a:gs>`).join(""),r=t.type==="linear"?`<a:lin ang="${(t.angle||0)*6e4}" scaled="1"/>`:"";return `<a:gradFill><a:gsLst>${n}</a:gsLst>${r}</a:gradFill>`}return ""}function le(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>${H(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 ce(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 pe(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 Ge(e,t){let n=e.size.width,r=e.size.height,i=e.rId||"rId1",o=t,c=e.filename||`image${o}`,l="";e.transform?.rotation&&(l+=` rot="${Math.round(e.transform.rotation*6e4)}"`),e.transform?.flipH&&(l+=' flipH="1"'),e.transform?.flipV&&(l+=' flipV="1"');let u=e.opacity!==void 0&&e.opacity<1?`<a:alphaModFix amt="${Math.round(Math.max(0,Math.min(1,e.opacity))*1e5)}"/>`:"",f=u?`<a:blip r:embed="${i}">${u}</a:blip>`:`<a:blip r:embed="${i}"/>`,p=[];e.crop?.left&&p.push(`l="${Math.round(e.crop.left*1e5)}"`),e.crop?.top&&p.push(`t="${Math.round(e.crop.top*1e5)}"`),e.crop?.right&&p.push(`r="${Math.round(e.crop.right*1e5)}"`),e.crop?.bottom&&p.push(`b="${Math.round(e.crop.bottom*1e5)}"`);let w=p.length>0?`<a:srcRect ${p.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="${o}" name="${a(c)}"${e.alt?` descr="${a(e.alt)}"`:""}/>`,"<pic:cNvPicPr/>","</pic:nvPicPr>","<pic:blipFill>",f,w,"<a:stretch><a:fillRect/></a:stretch>","</pic:blipFill>","<pic:spPr>",`<a:xfrm${l}>`,'<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?le(e.outline):"","</pic:spPr>","</pic:pic>","</a:graphicData>","</a:graphic>"].join("")}function ue(e){let t=e.image,n=t.wrap.type!=="inline",r=t.size.width,i=t.size.height,o=t.wrap.distT??0,c=t.wrap.distB??0,l=t.wrap.distL??0,u=t.wrap.distR??0,f=t.padding?.left??0,p=t.padding?.top??0,w=t.padding?.right??0,m=t.padding?.bottom??0,k=`<wp:effectExtent l="${s(f)}" t="${s(p)}" r="${s(w)}" b="${s(m)}"/>`,g=ae(t.id),E=t.title||t.filename||`Picture ${g}`,F=Ge(t,g);if(!n)return ["<w:drawing>",`<wp:inline distT="${s(o)}" distB="${s(c)}" distL="${s(l)}" distR="${s(u)}">`,`<wp:extent cx="${s(r)}" cy="${s(i)}"/>`,k,`<wp:docPr id="${g}" name="${a(E)}"${t.alt?` descr="${a(t.alt)}"`:""}${t.decorative?' hidden="1"':""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',F,"</wp:inline>","</w:drawing>"].join("");let D=t.wrap.type==="behind"?"1":"0",X=t.position?ce(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',M=pe(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${s(o)}" distB="${s(c)}" distL="${s(l)}" distR="${s(u)}" simplePos="0" relativeHeight="251658240" behindDoc="${D}" locked="0" layoutInCell="${t.layoutInCell===false?"0":"1"}" allowOverlap="${t.allowOverlap===false?"0":"1"}">`,'<wp:simplePos x="0" y="0"/>',X,`<wp:extent cx="${s(r)}" cy="${s(i)}"/>`,k,M,`<wp:docPr id="${g}" name="${a(E)}"${t.alt?` descr="${a(t.alt)}"`:""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',F,"</wp:anchor>","</w:drawing>"].join("")}function _e(e){return e.map(t=>v(t)).join("")}function fe(e){let t=e.shape,n=t.size.width,r=t.size.height,i=t.shapeType==="textBox",o=t.wrap&&t.wrap.type!=="inline",c=t.wrap?.distT??0,l=t.wrap?.distB??0,u=t.wrap?.distL??0,f=t.wrap?.distR??0,p=ae(t.id),w=t.name||(i?`TextBox ${p}`:`Shape ${p}`),m="";t.transform?.rotation&&(m+=` rot="${Math.round(t.transform.rotation*6e4)}"`),t.transform?.flipH&&(m+=' flipH="1"'),t.transform?.flipV&&(m+=' flipV="1"');let k=["<wps:spPr>",`<a:xfrm${m}>`,'<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>`,qe(t.fill),le(t.outline),"</wps:spPr>"].join(""),g="";if(t.textBody){let d=t.textBody,$=['rot="0"','vert="horz"'];d.anchor&&$.push(`anchor="${d.anchor==="middle"?"ctr":d.anchor}"`),d.anchorCenter&&$.push('anchorCtr="1"'),d.margins&&(d.margins.left!=null&&$.push(`lIns="${s(d.margins.left)}"`),d.margins.top!=null&&$.push(`tIns="${s(d.margins.top)}"`),d.margins.right!=null&&$.push(`rIns="${s(d.margins.right)}"`),d.margins.bottom!=null&&$.push(`bIns="${s(d.margins.bottom)}"`)),i?g=["<wps:txbx><w:txbxContent>",_e(d.content),"</w:txbxContent></wps:txbx>",`<wps:bodyPr ${$.join(" ")}/>`].join(""):g=[`<wps:bodyPr ${$.join(" ")}/>`].join("");}let F=['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">',["<wps:wsp>",`<wps:cNvSpPr${i?' txBox="1"':""}/>`,k,g,"</wps:wsp>"].join(""),"</a:graphicData>","</a:graphic>"].join("");if(!o)return ["<w:drawing>",`<wp:inline distT="${s(c)}" distB="${s(l)}" distL="${s(u)}" distR="${s(f)}">`,`<wp:extent cx="${s(n)}" cy="${s(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',`<wp:docPr id="${p}" name="${a(w)}"/>`,"<wp:cNvGraphicFramePr/>",F,"</wp:inline>","</w:drawing>"].join("");let D=t.wrap?.type==="behind"?"1":"0",X=t.position?ce(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',M=pe(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${s(c)}" distB="${s(l)}" distL="${s(u)}" distR="${s(f)}" simplePos="0" relativeHeight="251658240" behindDoc="${D}" locked="0" layoutInCell="1" allowOverlap="1">`,'<wp:simplePos x="0" y="0"/>',X,`<wp:extent cx="${s(n)}" cy="${s(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',M,`<wp:docPr id="${p}" name="${a(w)}"/>`,"<wp:cNvGraphicFramePr/>",F,"</wp:anchor>","</w:drawing>"].join("")}var Ve=new Set(["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","red","white","yellow"]);function Ue(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 Ye(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 T(e){if(!e)return "";let t=[];if(e.styleId&&t.push(`<w:rStyle w:val="${a(e.styleId)}"/>`),e.fontFamily){let i=[];e.fontFamily.ascii&&i.push(`w:ascii="${a(e.fontFamily.ascii)}"`),e.fontFamily.hAnsi&&i.push(`w:hAnsi="${a(e.fontFamily.hAnsi)}"`),e.fontFamily.eastAsia&&i.push(`w:eastAsia="${a(e.fontFamily.eastAsia)}"`),e.fontFamily.cs&&i.push(`w:cs="${a(e.fontFamily.cs)}"`),e.fontFamily.asciiTheme&&i.push(`w:asciiTheme="${e.fontFamily.asciiTheme}"`),e.fontFamily.hAnsiTheme&&i.push(`w:hAnsiTheme="${e.fontFamily.hAnsiTheme}"`),e.fontFamily.eastAsiaTheme&&i.push(`w:eastAsiaTheme="${e.fontFamily.eastAsiaTheme}"`),e.fontFamily.csTheme&&i.push(`w:csTheme="${e.fontFamily.csTheme}"`),i.length>0&&t.push(`<w:rFonts ${i.join(" ")}/>`);}e.bold===true?t.push("<w:b/>"):e.bold===false&&t.push('<w:b w:val="0"/>'),e.boldCs===true?t.push("<w:bCs/>"):e.boldCs===false&&t.push('<w:bCs w:val="0"/>'),e.italic===true?t.push("<w:i/>"):e.italic===false&&t.push('<w:i w:val="0"/>'),e.italicCs===true?t.push("<w:iCs/>"):e.italicCs===false&&t.push('<w:iCs w:val="0"/>'),e.allCaps===true?t.push("<w:caps/>"):e.allCaps===false&&t.push('<w:caps w:val="0"/>'),e.smallCaps===true?t.push("<w:smallCaps/>"):e.smallCaps===false&&t.push('<w:smallCaps w:val="0"/>'),e.strike===true?t.push("<w:strike/>"):e.strike===false&&t.push('<w:strike w:val="0"/>'),e.doubleStrike===true?t.push("<w:dstrike/>"):e.doubleStrike===false&&t.push('<w:dstrike w:val="0"/>'),e.outline===true?t.push("<w:outline/>"):e.outline===false&&t.push('<w:outline w:val="0"/>'),e.shadow===true?t.push("<w:shadow/>"):e.shadow===false&&t.push('<w:shadow w:val="0"/>'),e.emboss===true?t.push("<w:emboss/>"):e.emboss===false&&t.push('<w:emboss w:val="0"/>'),e.imprint===true?t.push("<w:imprint/>"):e.imprint===false&&t.push('<w:imprint w:val="0"/>'),e.hidden===true?t.push("<w:vanish/>"):e.hidden===false&&t.push('<w:vanish w:val="0"/>');let n=Ue(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(Ve.has(e.highlight))t.push(`<w:highlight w:val="${e.highlight}"/>`);else if(!e.shading){let i=e.highlight.replace(/^#/,"");/^[0-9a-fA-F]{6}$/.test(i)&&t.push(`<w:shd w:val="clear" w:color="auto" w:fill="${i}"/>`);}}if(e.underline){let i=[`w:val="${e.underline.style}"`];e.underline.color&&(e.underline.color.rgb&&i.push(`w:color="${e.underline.color.rgb}"`),e.underline.color.themeColor&&i.push(`w:themeColor="${e.underline.color.themeColor}"`),e.underline.color.themeTint&&i.push(`w:themeTint="${e.underline.color.themeTint}"`),e.underline.color.themeShade&&i.push(`w:themeShade="${e.underline.color.themeShade}"`)),t.push(`<w:u ${i.join(" ")}/>`);}e.effect&&e.effect!=="none"&&t.push(`<w:effect w:val="${e.effect}"/>`),e.emphasisMark&&e.emphasisMark!=="none"&&t.push(`<w:em w:val="${e.emphasisMark}"/>`);let r=Ye(e.shading);return r&&t.push(r),e.vertAlign&&e.vertAlign!=="baseline"&&t.push(`<w:vertAlign w:val="${e.vertAlign}"/>`),e.rtl===true?t.push("<w:rtl/>"):e.rtl===false&&t.push('<w:rtl w:val="0"/>'),e.cs===true?t.push("<w:cs/>"):e.cs===false&&t.push('<w:cs w:val="0"/>'),t.length===0?"":`<w:rPr>${t.join("")}</w:rPr>`}function Ze(e){return !e.startsWith("<w:rPr>")||!e.endsWith("</w:rPr>")?"":e.slice(7,-8)}function Je(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.info.date=="string"?e.info.date.trim():void 0,o=[`w:id="${t}"`,`w:author="${a(r)}"`];i&&o.push(`w:date="${a(i)}"`);let c=T(e.previousFormatting)||"<w:rPr/>";return `<w:rPrChange ${o.join(" ")}>${c}</w:rPrChange>`}function Ke(e,t){let n=T(e),r=n?Ze(n):"",i=(t??[]).map(Je).join(""),o=`${r}${i}`;return o?`<w:rPr>${o}</w:rPr>`:""}function Qe(e){return `<w:t${e.preserveSpace||e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${a(e.text)}</w:t>`}function et(e){return "<w:tab/>"}function tt(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 nt(e){return `<w:sym w:font="${a(e.font)}" w:char="${a(e.char)}"/>`}function rt(e){return e.type==="footnoteRef"?`<w:footnoteReference w:id="${e.id}"/>`:`<w:endnoteReference w:id="${e.id}"/>`}function it(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 ot(e){return `<w:instrText${e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${a(e.text)}</w:instrText>`}function st(e){return "<w:softHyphen/>"}function at(e){return "<w:noBreakHyphen/>"}function lt(e){switch(e.type){case "text":return Qe(e);case "tab":return et();case "break":return tt(e);case "symbol":return nt(e);case "footnoteRef":case "endnoteRef":return rt(e);case "footnoteRefMark":return "<w:footnoteRef/>";case "endnoteRefMark":return "<w:endnoteRef/>";case "separator":return "<w:separator/>";case "continuationSeparator":return "<w:continuationSeparator/>";case "fieldChar":return it(e);case "instrText":return ot(e);case "softHyphen":return st();case "noBreakHyphen":return at();case "drawing":return ue(e);case "shape":return fe(e);default:return ""}}function P(e){let t=[],n=Ke(e.formatting,e.propertyChanges);n&&t.push(n);for(let r of e.content){let i=lt(r);i&&t.push(i);}return `<w:r>${t.join("")}</w:r>`}function N(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 ct(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"?e.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.date=="string"?e.date.trim():void 0;return {id:t,author:r,date:i}}function C(e){let t=ct(e),n=[`w:id="${t.id}"`,`w:author="${a(t.author)}"`];return t.date&&n.push(`w:date="${a(t.date)}"`),n.join(" ")}function b(e,t){if(!e)return "";let n=[`w:w="${s(e.value)}"`,`w:type="${e.type}"`];return `<w:${t} ${n.join(" ")}/>`}function S(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 he(e,t){if(!e)return "";let n=[];if(e.top){let r=S(e.top,"top");r&&n.push(r);}if(e.left){let r=S(e.left,"left");r&&n.push(r);}if(e.bottom){let r=S(e.bottom,"bottom");r&&n.push(r);}if(e.right){let r=S(e.right,"right");r&&n.push(r);}if(e.insideH){let r=S(e.insideH,"insideH");r&&n.push(r);}if(e.insideV){let r=S(e.insideV,"insideV");r&&n.push(r);}return n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function de(e,t){if(!e)return "";let n=[];return e.top&&n.push(b(e.top,"top")),e.left&&n.push(b(e.left,"left")),e.bottom&&n.push(b(e.bottom,"bottom")),e.right&&n.push(b(e.right,"right")),n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}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 pt(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 ut(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 me(e,t){let n=[];if(e){e.styleId&&n.push(`<w:tblStyle w:val="${a(e.styleId)}"/>`);let r=ut(e.floating);r&&n.push(r),e.bidi&&n.push("<w:bidiVisual/>");let i=b(e.width,"tblW");i&&n.push(i),e.justification&&n.push(`<w:jc w:val="${e.justification}"/>`);let o=b(e.cellSpacing,"tblCellSpacing");o&&n.push(o);let c=b(e.indent,"tblInd");c&&n.push(c);let l=he(e.borders,"tblBorders");l&&n.push(l);let u=de(e.cellMargins,"tblCellMar");u&&n.push(u),e.layout&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);let f=we(e.shading);f&&n.push(f);let p=pt(e.look);p&&n.push(p),e.overlap&&n.push(`<w:tblOverlap w:val="${e.overlap}"/>`);}return t&&t.length>0&&n.push(ht(t[0])),n.length===0?"":`<w:tblPr>${n.join("")}</w:tblPr>`}function ft(e){return !e.startsWith("<w:tblPr>")||!e.endsWith("</w:tblPr>")?"":e.slice(9,-10)}function ht(e){let t=C(e.info),n=me(e.previousFormatting)||"<w:tblPr/>",r=ft(n),i=r.length>0?`<w:tblPr>${r}</w:tblPr>`:"<w:tblPr/>";return `<w:tblPrChange ${t}>${i}</w:tblPrChange>`}function ge(e,t,n){let r=[];if(e){let i=N(e.conditionalFormat);if(i&&r.push(i),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 ${C(n.info)}/>`):n.type==="tableRowDeletion"&&r.push(`<w:del ${C(n.info)}/>`)),t&&t.length>0&&r.push(wt(t[0])),r.length===0?"":`<w:trPr>${r.join("")}</w:trPr>`}function dt(e){return !e.startsWith("<w:trPr>")||!e.endsWith("</w:trPr>")?"":e.slice(8,-9)}function wt(e){let t=C(e.info),n=ge(e.previousFormatting)||"<w:trPr/>",r=dt(n),i=r.length>0?`<w:trPr>${r}</w:trPr>`:"<w:trPr/>";return `<w:trPrChange ${t}>${i}</w:trPrChange>`}function $e(e,t,n){let r=[];if(e){let i=N(e.conditionalFormat);i&&r.push(i);let o=b(e.width,"tcW");o&&r.push(o),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=he(e.borders,"tcBorders");c&&r.push(c);let l=we(e.shading);l&&r.push(l),e.noWrap&&r.push("<w:noWrap/>");let u=de(e.margins,"tcMar");u&&r.push(u),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/>");}if(n){if(n.type==="tableCellInsertion")r.push(`<w:cellIns ${C(n.info)}/>`);else if(n.type==="tableCellDeletion")r.push(`<w:cellDel ${C(n.info)}/>`);else if(n.type==="tableCellMerge"){let i=n.vMerge?` w:vMerge="${n.vMerge}"`:"",o=n.vMergeOrig?` w:vMergeOrig="${n.vMergeOrig}"`:"";r.push(`<w:cellMerge ${C(n.info)}${i}${o}/>`);}}return t&&t.length>0&&r.push(gt(t[0])),r.length===0?"":`<w:tcPr>${r.join("")}</w:tcPr>`}function mt(e){return !e.startsWith("<w:tcPr>")||!e.endsWith("</w:tcPr>")?"":e.slice(8,-9)}function gt(e){let t=C(e.info),n=$e(e.previousFormatting)||"<w:tcPr/>",r=mt(n),i=r.length>0?`<w:tcPr>${r}</w:tcPr>`:"<w:tcPr/>";return `<w:tcPrChange ${t}>${i}</w:tcPrChange>`}function $t(e){return !e||e.length===0?"":`<w:tblGrid>${e.map(n=>`<w:gridCol w:w="${s(n)}"/>`).join("")}</w:tblGrid>`}function xt(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(v(n)):n.type==="table"&&t.push(z(n));return t.length===0&&t.push("<w:p/>"),t.join("")}function yt(e){let t=[],n=$e(e.formatting,e.propertyChanges,e.structuralChange);return n&&t.push(n),t.push(xt(e.content)),`<w:tc>${t.join("")}</w:tc>`}function Pt(e){let t=[],n=ge(e.formatting,e.propertyChanges,e.structuralChange);n&&t.push(n);for(let r of e.cells)t.push(yt(r));return `<w:tr>${t.join("")}</w:tr>`}function z(e){let t=[],n=me(e.formatting,e.propertyChanges);n&&t.push(n);let r=$t(e.columnWidths);r&&t.push(r);for(let i of e.rows)t.push(Pt(i));return `<w:tbl>${t.join("")}</w:tbl>`}function B(e,t){let n=e.content.map(t).join(""),r=e.properties.rawPropertiesXml??"",i=e.properties.rawEndPropertiesXml??"";return `<w:sdt>${r}${i}<w:sdtContent>${n}</w:sdtContent></w:sdt>`}var h={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",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function vt(){let e={wpc:h.wpc,mc:h.mc,o:h.o,r:h.r,m:h.m,v:h.v,wp14:h.wp14,wp:h.wp,w10:h.w10,w:h.w,w14:h.w14,w15:h.w15,w16se:h.w16se,w16cid:h.w16cid,w16:h.w16,w16cex:h.w16cex,w16sdtdh:h.w16sdtdh,wne:h.wne,wpg:h.wpg,wps:h.wps};return Object.entries(e).map(([t,n])=>`xmlns:${t}="${n}"`).join(" ")}function A(e){return e.type==="paragraph"?v(e):e.type==="table"?z(e):e.type==="blockSdt"?B(e,A):""}function bt(e){return e.map(t=>A(t)).join("")}function Ct(e){let t=[];return t.push(bt(e.content)),e.finalSectionProperties&&t.push(I(e.finalSectionProperties)),t.join("")}function hn(e){O();let t=[];t.push('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>');let n=vt();return t.push(`<w:document ${n} mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14">`),t.push("<w:body>"),t.push(Ct(e.package.document)),t.push("</w:body>"),t.push("</w:document>"),t.join("")}var Tt='<v:shapetype id="_x0000_t136" coordsize="21600,21600" o:spt="136" adj="10800" path="m@7,l@8,m@5,21600l@6,21600e"><v:formulas><v:f eqn="sum #0 0 10800"/><v:f eqn="prod #0 2 1"/><v:f eqn="sum 21600 0 @1"/><v:f eqn="sum 0 0 @2"/><v:f eqn="sum 21600 0 @3"/><v:f eqn="if @0 @3 0"/><v:f eqn="if @0 21600 @1"/><v:f eqn="if @0 0 @2"/><v:f eqn="if @0 @4 21600"/><v:f eqn="mid @5 @6"/><v:f eqn="mid @8 @5"/><v:f eqn="mid @7 @8"/><v:f eqn="mid @6 @7"/><v:f eqn="sum @6 0 @5"/></v:formulas><v:path textpathok="t" o:connecttype="custom" o:connectlocs="@9,0;@10,10800;@9,21600;@11,10800" o:connectangles="270,180,90,0"/><v:textpath on="t" fitshape="t"/><v:handles><v:h position="#0,bottomRight" xrange="6629,14971"/></v:handles><o:lock v:ext="edit" text="t" shapetype="t"/></v:shapetype>',St='<v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><v:stroke joinstyle="miter"/><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"/><v:f eqn="sum @0 1 0"/><v:f eqn="sum 0 0 @1"/><v:f eqn="prod @2 1 2"/><v:f eqn="prod @3 21600 pixelWidth"/><v:f eqn="prod @3 21600 pixelHeight"/><v:f eqn="sum @0 0 1"/><v:f eqn="prod @6 1 2"/><v:f eqn="prod @7 21600 pixelWidth"/><v:f eqn="sum @8 21600 0"/><v:f eqn="prod @7 21600 pixelHeight"/><v:f eqn="sum @10 21600 0"/></v:formulas><v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/><o:lock v:ext="edit" aspectratio="t"/></v:shapetype>';function Ft(e){let t=Math.max(e.text.trim().length,1),n=Math.min(Math.max(t*26,120),468);return {width:n,height:n/2}}var xe=12700;function zt(e){let t=e.widthEmu!==void 0?e.widthEmu/xe:311.4,n=e.heightEmu!==void 0?e.heightEmu/xe:t;return {width:t*(e.scale||1),height:n*(e.scale||1)}}function kt(e){let{width:t,height:n}=Ft(e),r=e.layout==="diagonal"?";rotation:315":"",i=`position:absolute;margin-left:0;margin-top:0;width:${t}pt;height:${n}pt${r};z-index:-251658240;mso-position-horizontal:center;mso-position-horizontal-relative:margin;mso-position-vertical:center;mso-position-vertical-relative:margin`,o=e.semitransparent?'<v:fill opacity=".5"/>':"",c=e.fontSize!==void 0?e.fontSize:1,l=`font-family:"${a(e.font)}";font-size:${c}pt`;return "<w:p><w:r><w:rPr><w:noProof/></w:rPr><w:pict>"+Tt+`<v:shape id="PowerPlusWaterMarkObject1" o:spid="_x0000_s2049" type="#_x0000_t136" style="${i}" o:allowincell="f" fillcolor="${a(e.color)}" stroked="f">`+o+`<v:textpath style="${l}" string="${a(e.text)}"/></v:shape></w:pict></w:r></w:p>`}function Rt(e){if(!e.relId)return "";let{width:t,height:n}=zt(e),r=`position:absolute;margin-left:0;margin-top:0;width:${t}pt;height:${n}pt;z-index:-251657216;mso-position-horizontal:center;mso-position-horizontal-relative:margin;mso-position-vertical:center;mso-position-vertical-relative:margin`,i=e.washout?' gain="19661f" blacklevel="22938f"':"";return "<w:p><w:r><w:rPr><w:noProof/></w:rPr><w:pict>"+St+`<v:shape id="WordPictureWatermark1" o:spid="_x0000_s2050" type="#_x0000_t75" style="${r}" o:allowincell="f"><v:imagedata r:id="${a(e.relId)}" o:title="watermark"${i}/></v:shape></w:pict></w:r></w:p>`}function ye(e){return e.kind==="text"?kt(e):Rt(e)}var It={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",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function jt(){return Object.entries(It).map(([e,t])=>`xmlns:${e}="${t}"`).join(" ")}function Pe(e){return e.type==="paragraph"?v(e):e.type==="table"?z(e):e.type==="blockSdt"?B(e,Pe):""}function Pn(e){let t=e.type==="header"?"w:hdr":"w:ftr",n=jt(),r=e.content.map(i=>Pe(i)).join("");return e.watermark&&(r=ye(e.watermark)+r),r||(r="<w:p><w:pPr/></w:p>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<${t} ${n}>${r}</${t}>`}function Te(e){let t="<w:r>",n=[];e.formatting?.bold&&n.push("<w:b/>"),e.formatting?.italic&&n.push("<w:i/>"),n.length>0&&(t+=`<w:rPr>${n.join("")}</w:rPr>`);for(let r of e.content)if(r.type==="text"){let i=r.text!==r.text.trim()||r.text.includes(" ");t+=i?`<w:t xml:space="preserve">${a(r.text)}</w:t>`:`<w:t>${a(r.text)}</w:t>`;}else r.type==="break"&&(t+="<w:br/>");return t+="</w:r>",t}function ve(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";for(let r of e.content)r.type==="run"&&(n+=Te(r));return n+="</w:p>",n}function be(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+=Te(r));return n+="</w:p>",n}function Ce(e,t){let n=chunkC2BAPYGJ_js.a(),r=[`w:id="${e.id}"`];if(e.author&&r.push(`w:author="${a(e.author)}"`),e.initials?r.push(`w:initials="${a(e.initials)}"`):r.push('w:initials=""'),e.date){let o=e.date.replace(/\.\d{3}Z$/,"Z");r.push(`w:date="${a(o)}"`);}let i=`<w:comment ${r.join(" ")}>`;if(e.content&&e.content.length>0)if(e.content.length===1)i+=be(e.content[0],n);else {i+=be(e.content[0]);for(let o=1;o<e.content.length-1;o++)i+=ve(e.content[o]);i+=ve(e.content[e.content.length-1],n);}else i+=`<w:p w14:paraId="${n}"><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>`;return i+="</w:comment>",t.push({commentId:e.id,lastParaId:n,durableId:chunkC2BAPYGJ_js.a(),parentId:e.parentId,done:e.done}),i}function Bt(e){if(!e||e.length===0)return {xml:"",paraInfos:[]};let t=[],n=[];for(let o of e)(o.parentId==null?t:n).push(o);let r=[],i=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${x} ${y}>`;for(let o of t)i+=Ce(o,r);for(let o of n)i+=Ce(o,r);return i+="</w:comments>",{xml:i,paraInfos:r}}function Tn(e){return Bt(e).xml}function Sn(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 ${x} ${y}>`;for(let r of e){let i=`w15:paraId="${r.lastParaId}" w15:done="${r.done?"1":"0"}"`;if(r.parentId!=null){let o=t.get(r.parentId);o&&(i+=` w15:paraIdParent="${o}"`);}n+=`<w15:commentEx ${i} />`;}return n+="</w15:commentsEx>",n}function Fn(e){if(e.length===0)return "";let t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cid:commentsIds ${x} ${y}>`;for(let n of e)t+=`<w16cid:commentId w16cid:paraId="${n.lastParaId}" w16cid:durableId="${n.durableId}" />`;return t+="</w16cid:commentsIds>",t}function zn(e,t){if(e.length===0)return "";let n=new Map;for(let i of t)n.set(i.id,i);let r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cex:commentsExtensible ${x} ${y}>`;for(let i of e){let o=n.get(i.commentId);if(!o?.date)continue;let c=i.durableId,l=(o.date.endsWith("Z")?o.date:o.date+"Z").replace(/\.\d{3}Z$/,"Z");r+=`<w16cex:commentExtensible w16cex:durableId="${c}" w16cex:dateUtc="${l}"/>`;}return r+="</w16cex:commentsExtensible>",r}var Se='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';function Fe(e,t){if(t.verbatimXml)return t.verbatimXml;let n=[];t.noteType&&t.noteType!=="normal"&&n.push(`w:type="${t.noteType}"`),n.push(`w:id="${t.id}"`);let r=t.content.map(i=>A(i)).join("");return `<w:${e} ${n.join(" ")}>${r}</w:${e}>`}function jn(e){let t=e.map(n=>Fe("footnote",n)).join("");return `${Se}<w:footnotes ${x} ${y}>${t}</w:footnotes>`}function Bn(e){let t=e.map(n=>Fe("endnote",n)).join("");return `${Se}<w:endnotes ${x} ${y}>${t}</w:endnotes>`}exports.a=a;exports.b=P;exports.c=I;exports.d=v;exports.e=z;exports.f=A;exports.g=Ct;exports.h=hn;exports.i=Pn;exports.j=Bt;exports.k=Tn;exports.l=Sn;exports.m=Fn;exports.n=zn;exports.o=jn;exports.p=Bn;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkLERLET2D_js=require('./chunk-LERLET2D.js'),chunkFIGLFSNR_js=require('./chunk-FIGLFSNR.js'),chunkMNOHUTKE_js=require('./chunk-MNOHUTKE.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js'),chunkGSKMHXHG_js=require('./chunk-GSKMHXHG.js'),Ue=require('jszip');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ue__default=/*#__PURE__*/_interopDefault(Ue);async function Y(e){let n=await Ue__default.default.loadAsync(e),t={documentXml:null,stylesXml:null,themeXml:null,numberingXml:null,fontTableXml:null,settingsXml:null,webSettingsXml:null,headers:new Map,footers:new Map,footnotesXml:null,endnotesXml:null,commentsXml:null,commentsExtensibleXml:null,commentsExtendedXml:null,documentRels:null,packageRels:null,contentTypesXml:null,corePropsXml:null,appPropsXml:null,customPropsXml:null,media:new Map,fonts:new Map,allXml:new Map,originalZip:n,originalBuffer:e};for(let[o,s]of Object.entries(n.files)){if(s.dir)continue;let r=o.toLowerCase();if(r.endsWith(".xml")||r.endsWith(".rels")){let a=await s.async("text");if(t.allXml.set(o,a),r==="word/document.xml")t.documentXml=a;else if(r==="word/styles.xml")t.stylesXml=a;else if(r==="word/theme/theme1.xml")t.themeXml=a;else if(r==="word/numbering.xml")t.numberingXml=a;else if(r==="word/fonttable.xml")t.fontTableXml=a;else if(r==="word/settings.xml")t.settingsXml=a;else if(r==="word/websettings.xml")t.webSettingsXml=a;else if(r==="word/footnotes.xml")t.footnotesXml=a;else if(r==="word/endnotes.xml")t.endnotesXml=a;else if(r==="word/comments.xml")t.commentsXml=a;else if(r==="word/commentsextensible.xml")t.commentsExtensibleXml=a;else if(r==="word/commentsextended.xml")t.commentsExtendedXml=a;else if(r==="word/_rels/document.xml.rels")t.documentRels=a;else if(r==="_rels/.rels")t.packageRels=a;else if(r==="[content_types].xml")t.contentTypesXml=a;else if(r==="docprops/core.xml")t.corePropsXml=a;else if(r==="docprops/app.xml")t.appPropsXml=a;else if(r==="docprops/custom.xml")t.customPropsXml=a;else if(r.match(/^word\/header\d+\.xml$/)){let c=o.split("/").pop()||o;t.headers.set(c,a);}else if(r.match(/^word\/footer\d+\.xml$/)){let c=o.split("/").pop()||o;t.footers.set(c,a);}}else if(r.startsWith("word/media/")){let a=await s.async("arraybuffer");t.media.set(o,a);}else if(r.startsWith("word/fonts/")){let a=await s.async("arraybuffer");t.fonts.set(o,a);}}return t}function Me(e){switch(e.toLowerCase().split(".").pop()){case "png":return "image/png";case "jpg":case "jpeg":return "image/jpeg";case "gif":return "image/gif";case "bmp":return "image/bmp";case "tif":case "tiff":return "image/tiff";case "wmf":return "image/x-wmf";case "emf":return "image/x-emf";case "svg":return "image/svg+xml";case "webp":return "image/webp";default:return "application/octet-stream"}}function K(e,n,t,o){let s={};return e&&e!=="auto"?s.rgb=e:e==="auto"&&(s.auto=true),n&&(s.themeColor=n),t&&(s.themeTint=t),o&&(s.themeShade=o),s}function $(e){if(!e)return;let n={},t=chunk3R7QHNI5_js.j(e,"w","color");t&&t!=="auto"&&(n.color={rgb:t});let o=chunk3R7QHNI5_js.j(e,"w","fill");o&&o!=="auto"&&(n.fill={rgb:o});let s=chunk3R7QHNI5_js.j(e,"w","themeFill");s&&(n.fill=n.fill||{},n.fill.themeColor=s);let r=chunk3R7QHNI5_js.j(e,"w","themeFillTint");r&&n.fill&&(n.fill.themeTint=r);let a=chunk3R7QHNI5_js.j(e,"w","themeFillShade");a&&n.fill&&(n.fill.themeShade=a);let c=chunk3R7QHNI5_js.j(e,"w","val");return c&&(n.pattern=c),Object.keys(n).length>0?n:void 0}function Z(e,n){if(!e)return;let t={},o=chunk3R7QHNI5_js.e(e,"w","b");o&&(t.bold=chunk3R7QHNI5_js.m(o));let s=chunk3R7QHNI5_js.e(e,"w","bCs");s&&(t.boldCs=chunk3R7QHNI5_js.m(s));let r=chunk3R7QHNI5_js.e(e,"w","i");r&&(t.italic=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(e,"w","iCs");a&&(t.italicCs=chunk3R7QHNI5_js.m(a));let c=chunk3R7QHNI5_js.e(e,"w","u");if(c){let h=chunk3R7QHNI5_js.j(c,"w","val");if(h){t.underline={style:h};let T=chunk3R7QHNI5_js.j(c,"w","color"),L=chunk3R7QHNI5_js.j(c,"w","themeColor");(T||L)&&(t.underline.color=K(T,L,chunk3R7QHNI5_js.j(c,"w","themeTint"),chunk3R7QHNI5_js.j(c,"w","themeShade")));}}let d=chunk3R7QHNI5_js.e(e,"w","strike");d&&(t.strike=chunk3R7QHNI5_js.m(d));let u=chunk3R7QHNI5_js.e(e,"w","dstrike");u&&(t.doubleStrike=chunk3R7QHNI5_js.m(u));let m=chunk3R7QHNI5_js.e(e,"w","vertAlign");if(m){let h=chunk3R7QHNI5_js.j(m,"w","val");(h==="superscript"||h==="subscript"||h==="baseline")&&(t.vertAlign=h);}let g=chunk3R7QHNI5_js.e(e,"w","smallCaps");g&&(t.smallCaps=chunk3R7QHNI5_js.m(g));let p=chunk3R7QHNI5_js.e(e,"w","caps");p&&(t.allCaps=chunk3R7QHNI5_js.m(p));let S=chunk3R7QHNI5_js.e(e,"w","vanish");S&&(t.hidden=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(e,"w","color");f&&(t.color=K(chunk3R7QHNI5_js.j(f,"w","val"),chunk3R7QHNI5_js.j(f,"w","themeColor"),chunk3R7QHNI5_js.j(f,"w","themeTint"),chunk3R7QHNI5_js.j(f,"w","themeShade")));let b=chunk3R7QHNI5_js.e(e,"w","highlight");if(b){let h=chunk3R7QHNI5_js.j(b,"w","val");h&&(t.highlight=h);}let C=chunk3R7QHNI5_js.e(e,"w","shd");C&&(t.shading=$(C));let D=chunk3R7QHNI5_js.e(e,"w","sz");if(D){let h=chunk3R7QHNI5_js.l(D,"w","val");h!==void 0&&(t.fontSize=h);}let I=chunk3R7QHNI5_js.e(e,"w","szCs");if(I){let h=chunk3R7QHNI5_js.l(I,"w","val");h!==void 0&&(t.fontSizeCs=h);}let P=chunk3R7QHNI5_js.e(e,"w","rFonts");if(P){t.fontFamily={ascii:chunk3R7QHNI5_js.j(P,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(P,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(P,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(P,"w","cs")??void 0};let h=chunk3R7QHNI5_js.j(P,"w","asciiTheme");h&&(t.fontFamily.asciiTheme=h,n&&!t.fontFamily.ascii&&(t.fontFamily.ascii=chunkLERLET2D_js.b(n,h)));let T=chunk3R7QHNI5_js.j(P,"w","hAnsiTheme");T&&(t.fontFamily.hAnsiTheme=T,n&&!t.fontFamily.hAnsi&&(t.fontFamily.hAnsi=chunkLERLET2D_js.b(n,T)));let L=chunk3R7QHNI5_js.j(P,"w","eastAsiaTheme");L&&(t.fontFamily.eastAsiaTheme=L,n&&!t.fontFamily.eastAsia&&(t.fontFamily.eastAsia=chunkLERLET2D_js.b(n,L)));let U=chunk3R7QHNI5_js.j(P,"w","cstheme");U&&(t.fontFamily.csTheme=U,n&&!t.fontFamily.cs&&(t.fontFamily.cs=chunkLERLET2D_js.b(n,U)));}let N=chunk3R7QHNI5_js.e(e,"w","spacing");if(N){let h=chunk3R7QHNI5_js.l(N,"w","val");h!==void 0&&(t.spacing=h);}let y=chunk3R7QHNI5_js.e(e,"w","position");if(y){let h=chunk3R7QHNI5_js.l(y,"w","val");h!==void 0&&(t.position=h);}let x=chunk3R7QHNI5_js.e(e,"w","w");if(x){let h=chunk3R7QHNI5_js.l(x,"w","val");h!==void 0&&(t.scale=h);}let F=chunk3R7QHNI5_js.e(e,"w","kern");if(F){let h=chunk3R7QHNI5_js.l(F,"w","val");h!==void 0&&(t.kerning=h);}let X=chunk3R7QHNI5_js.e(e,"w","effect");if(X){let h=chunk3R7QHNI5_js.j(X,"w","val");h&&(t.effect=h);}let A=chunk3R7QHNI5_js.e(e,"w","em");if(A){let h=chunk3R7QHNI5_js.j(A,"w","val");h&&(t.emphasisMark=h);}let M=chunk3R7QHNI5_js.e(e,"w","emboss");M&&(t.emboss=chunk3R7QHNI5_js.m(M));let E=chunk3R7QHNI5_js.e(e,"w","imprint");E&&(t.imprint=chunk3R7QHNI5_js.m(E));let V=chunk3R7QHNI5_js.e(e,"w","outline");V&&(t.outline=chunk3R7QHNI5_js.m(V));let H=chunk3R7QHNI5_js.e(e,"w","shadow");H&&(t.shadow=chunk3R7QHNI5_js.m(H));let B=chunk3R7QHNI5_js.e(e,"w","rtl");B&&(t.rtl=chunk3R7QHNI5_js.m(B));let j=chunk3R7QHNI5_js.e(e,"w","cs");j&&(t.cs=chunk3R7QHNI5_js.m(j));let _=chunk3R7QHNI5_js.e(e,"w","rStyle");if(_){let h=chunk3R7QHNI5_js.j(_,"w","val");h&&(t.styleId=h);}return Object.keys(t).length>0?t:void 0}function k(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,"w","val");if(!n)return;let t={style:n},o=chunk3R7QHNI5_js.j(e,"w","color"),s=chunk3R7QHNI5_js.j(e,"w","themeColor");(o||s)&&(t.color=K(o,s,chunk3R7QHNI5_js.j(e,"w","themeTint"),chunk3R7QHNI5_js.j(e,"w","themeShade")));let r=chunk3R7QHNI5_js.l(e,"w","sz");r!==void 0&&(t.size=r);let a=chunk3R7QHNI5_js.l(e,"w","space");a!==void 0&&(t.space=a);let c=chunk3R7QHNI5_js.j(e,"w","shadow");c&&(t.shadow=c==="1"||c==="true");let d=chunk3R7QHNI5_js.j(e,"w","frame");return d&&(t.frame=d==="1"||d==="true"),t}function We(e){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","tab");if(n.length===0)return;let t=[];for(let o of n){let s=chunk3R7QHNI5_js.l(o,"w","pos"),r=chunk3R7QHNI5_js.j(o,"w","val");if(s!==void 0&&r){let a={position:s,alignment:r},c=chunk3R7QHNI5_js.j(o,"w","leader");c&&(a.leader=c),t.push(a);}}return t.length>0?t:void 0}function ee(e,n){if(!e)return;let t={},o=chunk3R7QHNI5_js.e(e,"w","jc");if(o){let y=chunk3R7QHNI5_js.j(o,"w","val");y&&(t.alignment=y);}let s=chunk3R7QHNI5_js.e(e,"w","bidi");s&&(t.bidi=chunk3R7QHNI5_js.m(s));let r=chunk3R7QHNI5_js.e(e,"w","spacing");if(r){let y=chunk3R7QHNI5_js.l(r,"w","before");y!==void 0&&(t.spaceBefore=y);let x=chunk3R7QHNI5_js.l(r,"w","after");x!==void 0&&(t.spaceAfter=x);let F=chunk3R7QHNI5_js.l(r,"w","line");F!==void 0&&(t.lineSpacing=F);let X=chunk3R7QHNI5_js.j(r,"w","lineRule");X&&(t.lineSpacingRule=X);let A=chunk3R7QHNI5_js.j(r,"w","beforeAutospacing");A&&(t.beforeAutospacing=A==="1"||A==="true");let M=chunk3R7QHNI5_js.j(r,"w","afterAutospacing");M&&(t.afterAutospacing=M==="1"||M==="true");}let a=chunk3R7QHNI5_js.e(e,"w","ind");if(a){let y=chunk3R7QHNI5_js.l(a,"w","left");y!==void 0&&(t.indentLeft=y);let x=chunk3R7QHNI5_js.l(a,"w","right");x!==void 0&&(t.indentRight=x);let F=chunk3R7QHNI5_js.l(a,"w","firstLine");F!==void 0&&(t.indentFirstLine=F);let X=chunk3R7QHNI5_js.l(a,"w","hanging");X!==void 0&&(t.indentFirstLine=-X,t.hangingIndent=true);}let c=chunk3R7QHNI5_js.e(e,"w","pBdr");if(c){let y={},x=k(chunk3R7QHNI5_js.e(c,"w","top"));x&&(y.top=x);let F=k(chunk3R7QHNI5_js.e(c,"w","bottom"));F&&(y.bottom=F);let X=k(chunk3R7QHNI5_js.e(c,"w","left"));X&&(y.left=X);let A=k(chunk3R7QHNI5_js.e(c,"w","right"));A&&(y.right=A);let M=k(chunk3R7QHNI5_js.e(c,"w","between"));M&&(y.between=M);let E=k(chunk3R7QHNI5_js.e(c,"w","bar"));E&&(y.bar=E),Object.keys(y).length>0&&(t.borders=y);}let d=chunk3R7QHNI5_js.e(e,"w","shd");d&&(t.shading=$(d));let u=chunk3R7QHNI5_js.e(e,"w","tabs");u&&(t.tabs=We(u));let m=chunk3R7QHNI5_js.e(e,"w","keepNext");m&&(t.keepNext=chunk3R7QHNI5_js.m(m));let g=chunk3R7QHNI5_js.e(e,"w","keepLines");g&&(t.keepLines=chunk3R7QHNI5_js.m(g));let p=chunk3R7QHNI5_js.e(e,"w","widowControl");p&&(t.widowControl=chunk3R7QHNI5_js.m(p));let S=chunk3R7QHNI5_js.e(e,"w","pageBreakBefore");S&&(t.pageBreakBefore=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(e,"w","contextualSpacing");f&&(t.contextualSpacing=chunk3R7QHNI5_js.m(f));let b=chunk3R7QHNI5_js.e(e,"w","numPr");if(b){let y=chunk3R7QHNI5_js.e(b,"w","numId"),x=chunk3R7QHNI5_js.e(b,"w","ilvl");if(y||x){if(t.numPr={},y){let F=chunk3R7QHNI5_js.l(y,"w","val");F!==void 0&&(t.numPr.numId=F);}if(x){let F=chunk3R7QHNI5_js.l(x,"w","val");F!==void 0&&(t.numPr.ilvl=F);}}}let C=chunk3R7QHNI5_js.e(e,"w","outlineLvl");if(C){let y=chunk3R7QHNI5_js.l(C,"w","val");y!==void 0&&(t.outlineLevel=y);}let D=chunk3R7QHNI5_js.e(e,"w","pStyle");if(D){let y=chunk3R7QHNI5_js.j(D,"w","val");y&&(t.styleId=y);}let I=chunk3R7QHNI5_js.e(e,"w","suppressLineNumbers");I&&(t.suppressLineNumbers=chunk3R7QHNI5_js.m(I));let P=chunk3R7QHNI5_js.e(e,"w","suppressAutoHyphens");P&&(t.suppressAutoHyphens=chunk3R7QHNI5_js.m(P));let N=chunk3R7QHNI5_js.e(e,"w","rPr");return N&&(t.runProperties=Z(N,n)),Object.keys(t).length>0?t:void 0}function O(e){if(!e)return;let n=chunk3R7QHNI5_js.l(e,"w","w"),t=chunk3R7QHNI5_js.j(e,"w","type");if(n!==void 0&&t)return {value:n,type:t}}function De(e){if(!e)return;let n={},t=k(chunk3R7QHNI5_js.e(e,"w","top"));t&&(n.top=t);let o=k(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(n.bottom=o);let s=k(chunk3R7QHNI5_js.e(e,"w","left"));s&&(n.left=s);let r=k(chunk3R7QHNI5_js.e(e,"w","right"));r&&(n.right=r);let a=k(chunk3R7QHNI5_js.e(e,"w","insideH"));a&&(n.insideH=a);let c=k(chunk3R7QHNI5_js.e(e,"w","insideV"));return c&&(n.insideV=c),Object.keys(n).length>0?n:void 0}function Xe(e){if(!e)return;let n={},t=O(chunk3R7QHNI5_js.e(e,"w","top"));t&&(n.top=t);let o=O(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(n.bottom=o);let s=O(chunk3R7QHNI5_js.e(e,"w","left"));s&&(n.left=s);let r=O(chunk3R7QHNI5_js.e(e,"w","right"));return r&&(n.right=r),Object.keys(n).length>0?n:void 0}function ze(e){if(!e)return;let n={},t=chunk3R7QHNI5_js.j(e,"w","val");if(t){let u=parseInt(t,16);isNaN(u)||(n.firstRow=(u&32)!==0,n.lastRow=(u&64)!==0,n.firstColumn=(u&128)!==0,n.lastColumn=(u&256)!==0,n.noHBand=(u&512)!==0,n.noVBand=(u&1024)!==0);}let o=chunk3R7QHNI5_js.j(e,"w","firstColumn");o&&(n.firstColumn=o==="1");let s=chunk3R7QHNI5_js.j(e,"w","firstRow");s&&(n.firstRow=s==="1");let r=chunk3R7QHNI5_js.j(e,"w","lastColumn");r&&(n.lastColumn=r==="1");let a=chunk3R7QHNI5_js.j(e,"w","lastRow");a&&(n.lastRow=a==="1");let c=chunk3R7QHNI5_js.j(e,"w","noHBand");c&&(n.noHBand=c==="1");let d=chunk3R7QHNI5_js.j(e,"w","noVBand");return d&&(n.noVBand=d==="1"),Object.keys(n).length>0?n:void 0}function le(e,n){if(!e)return;let t={},o=chunk3R7QHNI5_js.e(e,"w","tblW");o&&(t.width=O(o));let s=chunk3R7QHNI5_js.e(e,"w","jc");if(s){let f=chunk3R7QHNI5_js.j(s,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}let r=chunk3R7QHNI5_js.e(e,"w","tblCellSpacing");r&&(t.cellSpacing=O(r));let a=chunk3R7QHNI5_js.e(e,"w","tblInd");a&&(t.indent=O(a));let c=chunk3R7QHNI5_js.e(e,"w","tblBorders");c&&(t.borders=De(c));let d=chunk3R7QHNI5_js.e(e,"w","tblCellMar");d&&(t.cellMargins=Xe(d));let u=chunk3R7QHNI5_js.e(e,"w","tblLayout");if(u){let f=chunk3R7QHNI5_js.j(u,"w","type");(f==="fixed"||f==="autofit")&&(t.layout=f);}let m=chunk3R7QHNI5_js.e(e,"w","tblStyle");if(m){let f=chunk3R7QHNI5_js.j(m,"w","val");f&&(t.styleId=f);}let g=chunk3R7QHNI5_js.e(e,"w","tblLook");g&&(t.look=ze(g));let p=chunk3R7QHNI5_js.e(e,"w","shd");p&&(t.shading=$(p));let S=chunk3R7QHNI5_js.e(e,"w","bidiVisual");return S&&(t.bidi=chunk3R7QHNI5_js.m(S)),Object.keys(t).length>0?t:void 0}function ce(e){if(!e)return;let n={},t=chunk3R7QHNI5_js.e(e,"w","trHeight");if(t){n.height=O(t);let c=chunk3R7QHNI5_js.j(t,"w","hRule");c&&(n.heightRule=c);}let o=chunk3R7QHNI5_js.e(e,"w","tblHeader");o&&(n.header=chunk3R7QHNI5_js.m(o));let s=chunk3R7QHNI5_js.e(e,"w","cantSplit");s&&(n.cantSplit=chunk3R7QHNI5_js.m(s));let r=chunk3R7QHNI5_js.e(e,"w","jc");if(r){let c=chunk3R7QHNI5_js.j(r,"w","val");(c==="left"||c==="center"||c==="right")&&(n.justification=c);}let a=chunk3R7QHNI5_js.e(e,"w","hidden");return a&&(n.hidden=chunk3R7QHNI5_js.m(a)),Object.keys(n).length>0?n:void 0}function fe(e,n){if(!e)return;let t={},o=chunk3R7QHNI5_js.e(e,"w","tcW");o&&(t.width=O(o));let s=chunk3R7QHNI5_js.e(e,"w","tcBorders");s&&(t.borders=De(s));let r=chunk3R7QHNI5_js.e(e,"w","tcMar");r&&(t.margins=Xe(r));let a=chunk3R7QHNI5_js.e(e,"w","shd");a&&(t.shading=$(a));let c=chunk3R7QHNI5_js.e(e,"w","vAlign");if(c){let f=chunk3R7QHNI5_js.j(c,"w","val");(f==="top"||f==="center"||f==="bottom")&&(t.verticalAlign=f);}let d=chunk3R7QHNI5_js.e(e,"w","textDirection");if(d){let f=chunk3R7QHNI5_js.j(d,"w","val");f&&(t.textDirection=f);}let u=chunk3R7QHNI5_js.e(e,"w","gridSpan");if(u){let f=chunk3R7QHNI5_js.l(u,"w","val");f!==void 0&&(t.gridSpan=f);}let m=chunk3R7QHNI5_js.e(e,"w","vMerge");if(m){let f=chunk3R7QHNI5_js.j(m,"w","val");t.vMerge=f==="restart"?"restart":"continue";}let g=chunk3R7QHNI5_js.e(e,"w","tcFitText");g&&(t.fitText=chunk3R7QHNI5_js.m(g));let p=chunk3R7QHNI5_js.e(e,"w","noWrap");p&&(t.noWrap=chunk3R7QHNI5_js.m(p));let S=chunk3R7QHNI5_js.e(e,"w","hideMark");return S&&(t.hideMark=chunk3R7QHNI5_js.m(S)),Object.keys(t).length>0?t:void 0}function $e(e,n){let t={styleId:chunk3R7QHNI5_js.j(e,"w","styleId")??"",type:chunk3R7QHNI5_js.j(e,"w","type")??"paragraph"},o=chunk3R7QHNI5_js.j(e,"w","default");o&&(t.default=o==="1"||o==="true");let s=chunk3R7QHNI5_js.e(e,"w","name");s&&(t.name=chunk3R7QHNI5_js.j(s,"w","val")??void 0);let r=chunk3R7QHNI5_js.e(e,"w","basedOn");r&&(t.basedOn=chunk3R7QHNI5_js.j(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","next");a&&(t.next=chunk3R7QHNI5_js.j(a,"w","val")??void 0);let c=chunk3R7QHNI5_js.e(e,"w","link");c&&(t.link=chunk3R7QHNI5_js.j(c,"w","val")??void 0);let d=chunk3R7QHNI5_js.e(e,"w","uiPriority");if(d){let N=chunk3R7QHNI5_js.l(d,"w","val");N!==void 0&&(t.uiPriority=N);}let u=chunk3R7QHNI5_js.e(e,"w","hidden");u&&(t.hidden=chunk3R7QHNI5_js.m(u));let m=chunk3R7QHNI5_js.e(e,"w","semiHidden");m&&(t.semiHidden=chunk3R7QHNI5_js.m(m));let g=chunk3R7QHNI5_js.e(e,"w","unhideWhenUsed");g&&(t.unhideWhenUsed=chunk3R7QHNI5_js.m(g));let p=chunk3R7QHNI5_js.e(e,"w","qFormat");p&&(t.qFormat=chunk3R7QHNI5_js.m(p));let S=chunk3R7QHNI5_js.e(e,"w","personal");S&&(t.personal=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(e,"w","pPr");f&&(t.pPr=ee(f,n));let b=chunk3R7QHNI5_js.e(e,"w","rPr");b&&(t.rPr=Z(b,n));let C=chunk3R7QHNI5_js.e(e,"w","tblPr");C&&(t.tblPr=le(C));let D=chunk3R7QHNI5_js.e(e,"w","trPr");D&&(t.trPr=ce(D));let I=chunk3R7QHNI5_js.e(e,"w","tcPr");I&&(t.tcPr=fe(I));let P=chunk3R7QHNI5_js.f(e,"w","tblStylePr");if(P.length>0){t.tblStylePr=[];for(let N of P){let y=chunk3R7QHNI5_js.j(N,"w","type");if(y){let x={type:y},F=chunk3R7QHNI5_js.e(N,"w","pPr");F&&(x.pPr=ee(F,n));let X=chunk3R7QHNI5_js.e(N,"w","rPr");X&&(x.rPr=Z(X,n));let A=chunk3R7QHNI5_js.e(N,"w","tblPr");A&&(x.tblPr=le(A));let M=chunk3R7QHNI5_js.e(N,"w","trPr");M&&(x.trPr=ce(M));let E=chunk3R7QHNI5_js.e(N,"w","tcPr");E&&(x.tcPr=fe(E)),t.tblStylePr.push(x);}}}return t}function Ze(e,n){if(!e)return;let t={},o=chunk3R7QHNI5_js.e(e,"w","rPrDefault");if(o){let r=chunk3R7QHNI5_js.e(o,"w","rPr");r&&(t.rPr=Z(r,n));}let s=chunk3R7QHNI5_js.e(e,"w","pPrDefault");if(s){let r=chunk3R7QHNI5_js.e(s,"w","pPr");r&&(t.pPr=ee(r,n));}return t.rPr||t.pPr?t:void 0}function _e(e,n){if(!n)return e;if(!e)return n?{...n}:void 0;let t={...e};for(let o of Object.keys(n)){let s=n[o];if(s!==void 0)if(o==="runProperties")t.runProperties=chunkGSKMHXHG_js.b(t.runProperties,n.runProperties);else if(o==="borders"||o==="numPr"||o==="frame"){let r=t[o],a=s;t[o]={...r||{},...a||{}};}else o==="tabs"&&Array.isArray(s)?t.tabs=[...s]:t[o]=s;}return t}function Ie(e,n,t,o=new Set){if(o.has(e.styleId)||(o.add(e.styleId),!e.basedOn))return e;let s=n.get(e.basedOn);if(!s)return e;let r=Ie(s,n,t,o),a={...e,pPr:_e(r.pPr,e.pPr),rPr:chunkGSKMHXHG_js.b(r.rPr,e.rPr)};return e.type==="table"&&((r.tblPr||e.tblPr)&&(a.tblPr={...r.tblPr||{},...e.tblPr||{}}),(r.trPr||e.trPr)&&(a.trPr={...r.trPr||{},...e.trPr||{}}),(r.tcPr||e.tcPr)&&(a.tcPr={...r.tcPr||{},...e.tcPr||{}})),a}function ue(e,n){let t=new Map;try{let o=chunk3R7QHNI5_js.c(e);if(!o)return t;let s=chunk3R7QHNI5_js.f(o,"w","style");for(let r of s){let a=$e(r,n);a.styleId&&t.set(a.styleId,a);}for(let[r,a]of t){let c=Ie(a,t,n);t.set(r,c);}}catch(o){console.warn("Failed to parse styles:",o);}return t}function Ae(e,n){let t={styles:[]};try{let o=chunk3R7QHNI5_js.c(e);if(!o)return t;let s=chunk3R7QHNI5_js.e(o,"w","docDefaults");t.docDefaults=Ze(s,n);let r=chunk3R7QHNI5_js.e(o,"w","latentStyles");r&&(t.latentStyles={defLockedState:chunk3R7QHNI5_js.j(r,"w","defLockedState")==="1",defUIPriority:chunk3R7QHNI5_js.l(r,"w","defUIPriority"),defSemiHidden:chunk3R7QHNI5_js.j(r,"w","defSemiHidden")==="1",defUnhideWhenUsed:chunk3R7QHNI5_js.j(r,"w","defUnhideWhenUsed")==="1",defQFormat:chunk3R7QHNI5_js.j(r,"w","defQFormat")==="1",count:chunk3R7QHNI5_js.l(r,"w","count")});let a=ue(e,n);t.styles=Array.from(a.values());}catch(o){console.warn("Failed to parse style definitions:",o);}return t}function ke(e){let n={abstractNums:[],nums:[]};if(!e)return de(n);let t=chunk3R7QHNI5_js.c(e);if(!t)return de(n);let o=chunk3R7QHNI5_js.f(t,"w","abstractNum");for(let r of o){let a=Je(r);a&&n.abstractNums.push(a);}let s=chunk3R7QHNI5_js.f(t,"w","num");for(let r of s){let a=qe(r);a&&n.nums.push(a);}return de(n)}function Je(e){let n=chunk3R7QHNI5_js.j(e,"w","abstractNumId");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t))return null;let o={abstractNumId:t,levels:[]},s=chunk3R7QHNI5_js.e(e,"w","multiLevelType");if(s){let u=chunk3R7QHNI5_js.j(s,"w","val");(u==="hybridMultilevel"||u==="multilevel"||u==="singleLevel")&&(o.multiLevelType=u);}let r=chunk3R7QHNI5_js.e(e,"w","name");r&&(o.name=chunk3R7QHNI5_js.j(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","numStyleLink");a&&(o.numStyleLink=chunk3R7QHNI5_js.j(a,"w","val")??void 0);let c=chunk3R7QHNI5_js.e(e,"w","styleLink");c&&(o.styleLink=chunk3R7QHNI5_js.j(c,"w","val")??void 0);let d=chunk3R7QHNI5_js.f(e,"w","lvl");for(let u of d){let m=Re(u);m&&o.levels.push(m);}return o.levels.sort((u,m)=>u.ilvl-m.ilvl),o}function qe(e){let n=chunk3R7QHNI5_js.j(e,"w","numId");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t))return null;let o=chunk3R7QHNI5_js.e(e,"w","abstractNumId");if(!o)return null;let s=chunk3R7QHNI5_js.j(o,"w","val");if(s===null)return null;let r=parseInt(s,10);if(isNaN(r))return null;let a={numId:t,abstractNumId:r},c=chunk3R7QHNI5_js.f(e,"w","lvlOverride");if(c.length>0){a.levelOverrides=[];for(let d of c){let u=chunk3R7QHNI5_js.j(d,"w","ilvl");if(u===null)continue;let m=parseInt(u,10);if(isNaN(m))continue;let g={ilvl:m},p=chunk3R7QHNI5_js.e(d,"w","startOverride");if(p){let f=chunk3R7QHNI5_js.j(p,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(g.startOverride=b);}}let S=chunk3R7QHNI5_js.e(d,"w","lvl");S&&(g.lvl=Re(S)??void 0),a.levelOverrides.push(g);}}return a}function Re(e){let n=chunk3R7QHNI5_js.j(e,"w","ilvl");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t)||t<0||t>8)return null;let o={ilvl:t,numFmt:"decimal",lvlText:""},s=chunk3R7QHNI5_js.e(e,"w","start");if(s){let f=chunk3R7QHNI5_js.j(s,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(o.start=b);}}let r=chunk3R7QHNI5_js.e(e,"w","numFmt");if(r){let f=chunk3R7QHNI5_js.j(r,"w","val");f&&(o.numFmt=Qe(f));}let a=chunk3R7QHNI5_js.e(e,"w","lvlText");a&&(o.lvlText=chunk3R7QHNI5_js.j(a,"w","val")??"");let c=chunk3R7QHNI5_js.e(e,"w","lvlJc");if(c){let f=chunk3R7QHNI5_js.j(c,"w","val");(f==="left"||f==="center"||f==="right")&&(o.lvlJc=f);}let d=chunk3R7QHNI5_js.e(e,"w","suff");if(d){let f=chunk3R7QHNI5_js.j(d,"w","val");(f==="tab"||f==="space"||f==="nothing")&&(o.suffix=f);}let u=chunk3R7QHNI5_js.e(e,"w","isLgl");u&&(o.isLgl=chunk3R7QHNI5_js.m(u));let m=chunk3R7QHNI5_js.e(e,"w","lvlRestart");if(m){let f=chunk3R7QHNI5_js.j(m,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(o.lvlRestart=b);}}let g=chunk3R7QHNI5_js.e(e,"w","legacy");g&&(o.legacy={legacy:chunk3R7QHNI5_js.m(g),legacySpace:chunk3R7QHNI5_js.l(g,"w","legacySpace"),legacyIndent:chunk3R7QHNI5_js.l(g,"w","legacyIndent")});let p=chunk3R7QHNI5_js.e(e,"w","pPr");p&&(o.pPr=Ge(p));let S=chunk3R7QHNI5_js.e(e,"w","rPr");return S&&(o.rPr=et(S)),o}function Qe(e){return {decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",hex:"hex",chicago:"chicago",bullet:"bullet",none:"none",decimalZero:"decimalZero",ganada:"ganada",chosung:"chosung",ideographDigital:"ideographDigital",japaneseCounting:"japaneseCounting",aiueo:"aiueo",iroha:"iroha",decimalFullWidth:"decimalFullWidth",decimalHalfWidth:"decimalHalfWidth",japaneseLegal:"japaneseLegal",japaneseDigitalTenThousand:"japaneseDigitalTenThousand",decimalEnclosedCircle:"decimalEnclosedCircle",decimalFullWidth2:"decimalFullWidth2",aiueoFullWidth:"aiueoFullWidth",irohaFullWidth:"irohaFullWidth",decimalEnclosedFullstop:"decimalEnclosedFullstop",decimalEnclosedParen:"decimalEnclosedParen",decimalEnclosedCircleChinese:"decimalEnclosedCircleChinese",ideographEnclosedCircle:"ideographEnclosedCircle",ideographTraditional:"ideographTraditional",ideographZodiac:"ideographZodiac",ideographZodiacTraditional:"ideographZodiacTraditional",taiwaneseCounting:"taiwaneseCounting",ideographLegalTraditional:"ideographLegalTraditional",taiwaneseCountingThousand:"taiwaneseCountingThousand",taiwaneseDigital:"taiwaneseDigital",chineseCounting:"chineseCounting",chineseLegalSimplified:"chineseLegalSimplified",chineseCountingThousand:"chineseCountingThousand",koreanDigital:"koreanDigital",koreanCounting:"koreanCounting",koreanLegal:"koreanLegal",koreanDigital2:"koreanDigital2",vietnameseCounting:"vietnameseCounting",russianLower:"russianLower",russianUpper:"russianUpper",numberInDash:"numberInDash",hebrew1:"hebrew1",hebrew2:"hebrew2",arabicAlpha:"arabicAlpha",arabicAbjad:"arabicAbjad",hindiVowels:"hindiVowels",hindiConsonants:"hindiConsonants",hindiNumbers:"hindiNumbers",hindiCounting:"hindiCounting",thaiLetters:"thaiLetters",thaiNumbers:"thaiNumbers",thaiCounting:"thaiCounting"}[e]??"decimal"}function Ge(e){let n={},t=chunk3R7QHNI5_js.e(e,"w","ind");if(t){let s=chunk3R7QHNI5_js.l(t,"w","left"),r=chunk3R7QHNI5_js.l(t,"w","right"),a=chunk3R7QHNI5_js.l(t,"w","start"),c=chunk3R7QHNI5_js.l(t,"w","end"),d=chunk3R7QHNI5_js.l(t,"w","firstLine"),u=chunk3R7QHNI5_js.l(t,"w","hanging"),m=s??a,g=r??c;m!==void 0&&(n.indentLeft=m),g!==void 0&&(n.indentRight=g),u!==void 0?(n.indentFirstLine=-u,n.hangingIndent=true):d!==void 0&&(n.indentFirstLine=d);}let o=chunk3R7QHNI5_js.e(e,"w","tabs");if(o){n.tabs=[];let s=chunk3R7QHNI5_js.f(o,"w","tab");for(let r of s){let a=chunk3R7QHNI5_js.l(r,"w","pos"),c=chunk3R7QHNI5_js.j(r,"w","val"),d=chunk3R7QHNI5_js.j(r,"w","leader");a!==void 0&&c&&n.tabs.push({position:a,alignment:Ye(c),leader:Ke(d)});}}return n}function Ye(e){switch(e){case "left":return "left";case "center":return "center";case "right":return "right";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "num";default:return "left"}}function Ke(e){if(e)switch(e){case "none":return "none";case "dot":return "dot";case "hyphen":return "hyphen";case "underscore":return "underscore";case "heavy":return "heavy";case "middleDot":return "middleDot";default:return}}function et(e){let n={},t=chunk3R7QHNI5_js.e(e,"w","rFonts");t&&(n.fontFamily={ascii:chunk3R7QHNI5_js.j(t,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(t,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(t,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(t,"w","cs")??void 0});let o=chunk3R7QHNI5_js.e(e,"w","sz");if(o){let d=chunk3R7QHNI5_js.l(o,"w","val");d!==void 0&&(n.fontSize=d);}let s=chunk3R7QHNI5_js.e(e,"w","color");if(s){let d=chunk3R7QHNI5_js.j(s,"w","val"),u=chunk3R7QHNI5_js.j(s,"w","themeColor");d==="auto"?n.color={auto:true}:u?n.color={themeColor:u,themeTint:chunk3R7QHNI5_js.j(s,"w","themeTint")??void 0,themeShade:chunk3R7QHNI5_js.j(s,"w","themeShade")??void 0}:d&&(n.color={rgb:d});}let r=chunk3R7QHNI5_js.e(e,"w","b");r&&(n.bold=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(e,"w","i");a&&(n.italic=chunk3R7QHNI5_js.m(a));let c=chunk3R7QHNI5_js.e(e,"w","vanish");return c&&(n.hidden=chunk3R7QHNI5_js.m(c)),n}function de(e){let n=new Map;for(let o of e.abstractNums)n.set(o.abstractNumId,o);let t=new Map;for(let o of e.nums)t.set(o.numId,o);return {definitions:e,getLevel(o,s){let r=t.get(o);if(!r)return null;if(r.levelOverrides){let c=r.levelOverrides.find(d=>d.ilvl===s);if(c){if(c.lvl)return c.lvl;let d=n.get(r.abstractNumId);if(d){let u=d.levels.find(m=>m.ilvl===s);if(u&&c.startOverride!==void 0)return {...u,start:c.startOverride}}}}let a=n.get(r.abstractNumId);if(!a)return null;if(a.numStyleLink&&a.levels.length===0){for(let c of n.values())if(c.styleLink===a.numStyleLink&&c.levels.length>0){a=c;break}}return a.levels.find(c=>c.ilvl===s)??null},getAbstract(o){return n.get(o)??null},getInstance(o){return t.get(o)??null},hasNumbering(o){return t.has(o)}}}function tt(e,n){switch(n){case "decimal":case "decimalZero":return e.toString();case "upperRoman":return Le(e).toUpperCase();case "lowerRoman":return Le(e).toLowerCase();case "upperLetter":return Ee(e).toUpperCase();case "lowerLetter":return Ee(e).toLowerCase();case "ordinal":return nt(e);case "bullet":return "\u2022";case "none":return "";case "decimalEnclosedParen":return `(${e})`;case "numberInDash":return `-${e}-`;default:return e.toString()}}function Le(e){if(e<=0||e>3999)return e.toString();let n=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],t="",o=e;for(let[s,r]of n)for(;o>=s;)t+=r,o-=s;return t}function Ee(e){if(e<=0)return "";let n="",t=e;for(;t>0;)t--,n=String.fromCharCode(97+t%26)+n,t=Math.floor(t/26);return n}function nt(e){let n=["th","st","nd","rd"],t=e%100;return e+(n[(t-20)%10]||n[t]||n[0])}function Dt(e,n,t){let o=e;for(let s=1;s<=9;s++){let r=`%${s}`;if(o.includes(r)){let a=s-1,c=n[a]??1,d=t[a]??"decimal",u=tt(c,d);o=o.replace(r,u);}}return o}function Xt(e){if(e.lvlText)return e.lvlText;let n=e.rPr?.fontFamily?.ascii||e.rPr?.fontFamily?.hAnsi;if(n){let t=n.toLowerCase();if(t==="symbol")return "\u2022";if(t.includes("wingding"))return "\u2751"}return "\u2022"}function It(e){return e.numFmt==="bullet"||e.numFmt==="none"}var Be=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function Ve(e){let n=[],t;for(Be.lastIndex=0;(t=Be.exec(e))!==null;){let o=t[1].trim();o&&!n.includes(o)&&n.push(o);}return n}function te(e){let n=[];for(let t of e)if(t.type==="paragraph"){let o=chunkLERLET2D_js.N(t),s=Ve(o);for(let r of s)n.includes(r)||n.push(r);}else if(t.type==="table"){let o=je(t);for(let s of o)n.includes(s)||n.push(s);}return n}function je(e){let n=[];for(let t of e.rows)for(let o of t.cells)for(let s of o.content)if(s.type==="paragraph"){let r=chunkLERLET2D_js.N(s),a=Ve(r);for(let c of a)n.includes(c)||n.push(c);}else if(s.type==="table"){let r=je(s);for(let a of r)n.includes(a)||n.push(a);}return n}function ot(e,n){let t=[],o=[];for(let s of e)o.push(s),s.type==="paragraph"&&s.sectionProperties&&(t.push({properties:s.sectionProperties,content:o}),o=[]);return (o.length>0||t.length===0)&&t.push({properties:n??chunkLERLET2D_js.C(),content:o}),t}function ne(e,n=null,t=null,o=null,s=null,r=null){let a={content:[]};if(!e)return a;let c=chunk3R7QHNI5_js.a(e);if(!c)return a;let d=(c.elements??[]).find(p=>p.type==="element"&&(p.name==="w:document"||p.name?.endsWith(":document")));if(!d)return a;let u=chunk3R7QHNI5_js.e(d,"w","body");if(!u)return a;a.content=chunkLERLET2D_js.q(u,n,t,o,s,r);let m=chunk3R7QHNI5_js.e(u,"w","sectPr");m&&(a.finalSectionProperties=chunkLERLET2D_js.B(m,s));let g=ot(a.content,a.finalSectionProperties);return a.sections=chunkLERLET2D_js.D(g),a.finalSectionProperties&&a.sections.length>0&&(a.finalSectionProperties=a.sections[a.sections.length-1].properties),a}function rt(e){let n=new Map,t=chunk3R7QHNI5_js.a(e);if(!t)return n;let o=chunk3R7QHNI5_js.e(t,"w16cex","commentsExtensible")??t;for(let s of chunk3R7QHNI5_js.i(o)){if((s.name?.replace(/^.*:/,"")??"")!=="comment")continue;let a=chunk3R7QHNI5_js.j(s,"w16cex","paraId")??chunk3R7QHNI5_js.j(s,"w15","paraId")??s.attributes?.["w16cex:paraId"]??s.attributes?.["w15:paraId"],c=chunk3R7QHNI5_js.j(s,"w16cex","dateUtc")??chunk3R7QHNI5_js.j(s,"w15","dateUtc")??s.attributes?.["w16cex:dateUtc"]??s.attributes?.["w15:dateUtc"];a&&c&&n.set(String(a).toUpperCase(),String(c));}return n}function it(e){let n=new Map,t=new Map,o=chunk3R7QHNI5_js.a(e);if(!o)return {parentByParaId:n,doneByParaId:t};let s=chunk3R7QHNI5_js.e(o,"w15","commentsEx")??o;for(let r of chunk3R7QHNI5_js.i(s)){if((r.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let c=chunk3R7QHNI5_js.j(r,"w15","paraId")??r.attributes?.["w15:paraId"],d=chunk3R7QHNI5_js.j(r,"w15","paraIdParent")??r.attributes?.["w15:paraIdParent"],u=chunk3R7QHNI5_js.j(r,"w15","done")??r.attributes?.["w15:done"];if(c){let m=String(c).toUpperCase();d&&n.set(m,String(d).toUpperCase()),u==="1"&&t.set(m,true);}}return {parentByParaId:n,doneByParaId:t}}function Oe(e,n,t,o,s,r,a){if(!e)return [];let c=chunk3R7QHNI5_js.a(e);if(!c)return [];let d=r?rt(r):new Map,u=a?it(a):null,m=chunk3R7QHNI5_js.e(c,"w","comments")??c,g=chunk3R7QHNI5_js.i(m),p=[],S=[];for(let f of g){if((f.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(chunk3R7QHNI5_js.j(f,"w","id")??"0",10),D=chunk3R7QHNI5_js.j(f,"w","author")??"Unknown",I=chunk3R7QHNI5_js.j(f,"w","initials"),P=I!=null?String(I):void 0,N=chunk3R7QHNI5_js.j(f,"w","date"),y=N!=null?String(N):void 0,x=chunk3R7QHNI5_js.j(f,"w14","paraId")??f.attributes?.["w14:paraId"]??chunk3R7QHNI5_js.j(f,"w","paraId"),X=(x?d.get(String(x).toUpperCase()):void 0)??y,A=chunk3R7QHNI5_js.j(f,"w","done")??f.attributes?.["w:done"],M=A==="1"||A==="true"?true:void 0,E=chunk3R7QHNI5_js.j(f,"w16cid","parentId")??chunk3R7QHNI5_js.j(f,"w","parentId")??f.attributes?.["w16cid:parentId"]??f.attributes?.["w:parentId"],V=E!=null?parseInt(String(E),10):void 0,H=[],B="";for(let j of chunk3R7QHNI5_js.i(f))if((j.name?.replace(/^.*:/,"")??"")==="p"){let h=chunkLERLET2D_js.O(j,n,t,null,o,s);H.push(h);let T=chunk3R7QHNI5_js.j(j,"w14","paraId")??j.attributes?.["w14:paraId"];T&&(B=String(T).toUpperCase());}M==null&&u&&B&&u.doneByParaId.get(B)&&(M=true),S.push(B),p.push({id:C,author:D,initials:P,date:X,content:H,...M!=null?{done:M}:{},...V!=null&&!isNaN(V)?{parentId:V}:{}});}if(u&&u.parentByParaId.size>0){let f=new Map;for(let b=0;b<p.length;b++){let C=S[b];C&&f.set(C,p[b].id);}for(let b=0;b<p.length;b++){if(p[b].parentId!=null)continue;let C=S[b];if(!C)continue;let D=u.parentByParaId.get(C);if(!D)continue;let I=f.get(D);I!=null&&(p[b]={...p[b],parentId:I});}}return p}async function He(e,n={}){let t=e instanceof ArrayBuffer?e:await chunkMNOHUTKE_js.s(e),{onProgress:o=()=>{},preloadFonts:s=true,parseHeadersFooters:r=true,parseNotes:a=true,detectVariables:c=true}=n,d=[];try{let p=function(T,L){let U=performance.now(),re=L(),W=performance.now()-U;return g.push({stage:T,ms:W}),W>1e3&&console.warn(`[parseDocx] ${T} took ${Math.round(W)}ms`),re};var u=p;let m=performance.now(),g=[];async function S(T,L){let U=performance.now(),re=await L(),W=performance.now()-U;return g.push({stage:T,ms:W}),W>1e3&&console.warn(`[parseDocx] ${T} took ${Math.round(W)}ms`),re}o("Extracting DOCX...",0);let f=await S("unzip",()=>Y(t));o("Extracted DOCX",10),o("Parsing relationships...",10);let b=p("relationships",()=>f.documentRels?chunkZ3LGMBJC_js.b(f.documentRels):new Map);o("Parsed relationships",15),o("Parsing theme...",15);let C=p("theme",()=>chunkLERLET2D_js.a(f.themeXml));o("Parsed theme",20),o("Parsing styles...",20);let D=null,I;p("styles",()=>{f.stylesXml&&(D=ue(f.stylesXml,C),I=Ae(f.stylesXml,C));}),o("Parsed styles",30),o("Parsing numbering...",30);let P=p("numbering",()=>ke(f.numberingXml)),N=p("settings",()=>chunkFIGLFSNR_js.b(f.settingsXml));o("Parsed numbering",35),o("Processing media files...",35);let y=p("media",()=>st(f,b));o("Processed media",40),o("Parsing document body...",40);let x={content:[]};p("documentBody",()=>{f.documentXml?x=ne(f.documentXml,D,C,P,b,y):d.push("No document.xml found in DOCX");}),o("Parsed document body",55);let F,X;if(r){o("Parsing headers/footers...",55);let T=p("headersFooters",()=>at(f,D,C,P,b,y));F=T.headers,X=T.footers,o("Parsed headers/footers",65);}else o("Skipping headers/footers",65);let A,M,E,V;if(a){o("Parsing footnotes/endnotes...",65);let T=p("footnotesEndnotes",()=>lt(f,D,C,P,b,y));A=T.footnotes,M=T.endnotes,E=T.footnoteSeparators,V=T.endnoteSeparators,o("Parsed footnotes/endnotes",75);}else o("Skipping footnotes/endnotes",75);o("Parsing comments...",75);let H=p("comments",()=>Oe(f.commentsXml,D,C,b,y,f.commentsExtensibleXml,f.commentsExtendedXml));H.length>0&&(x.comments=H);let B;c?(o("Detecting template variables...",75),B=p("variables",()=>te(x.content)),o("Detected variables",80)):o("Skipping variable detection",80),s?(o("Loading fonts...",80),await S("fonts",()=>ct(C,I,x)),o("Loaded fonts",95)):o("Skipping font loading",95),o("Assembling document...",95);let _={package:{document:x,styles:I,theme:C,numbering:P.definitions,settings:N,headers:F,footers:X,footnotes:A,endnotes:M,footnoteSeparators:E,endnoteSeparators:V,relationships:b,media:y},originalBuffer:t,templateVariables:B,warnings:d.length>0?d:void 0},h=performance.now()-m;if(h>2e3){let T=g.filter(L=>L.ms>100).map(L=>`${L.stage}: ${Math.round(L.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(h)}ms`+(T?` (${T})`:""));}return o("Complete",100),_}catch(m){let g=m instanceof Error?m.message:String(m);throw console.error("[parseDocx] Failed to parse DOCX:",g,m),new Error(`Failed to parse DOCX: ${g}`)}}function st(e,n){let t=new Map;for(let[o,s]of e.media.entries()){let r=o.split("/").pop()||o,a=Me(o),c=new Uint8Array(s),d="";for(let S=0;S<c.length;S++)d+=String.fromCharCode(c[S]);let u=btoa(d),m=`data:${a};base64,${u}`,g={path:o,filename:r,mimeType:a,data:s,dataUrl:m};t.set(o,g);let p=o.replace(/^word\//,"");p!==o&&t.set(p,g);}return t}function oe(e,n){let t=n.toLowerCase();for(let[o,s]of e.entries())if(o.toLowerCase()===t)return s}function at(e,n,t,o,s,r){let a=new Map,c=new Map;for(let[d,u]of s.entries())if(u.type===chunkZ3LGMBJC_js.a.header&&u.target){let m=u.target.split("/").pop()||u.target,g=oe(e.headers,m);if(g){let p=`word/_rels/${m}.rels`,S=oe(e.allXml,p),f=S?chunkZ3LGMBJC_js.b(S):s,b=chunkLERLET2D_js.r(g,"default",n,t,o,f,r);a.set(d,b);}}else if(u.type===chunkZ3LGMBJC_js.a.footer&&u.target){let m=u.target.split("/").pop()||u.target,g=oe(e.footers,m);if(g){let p=`word/_rels/${m}.rels`,S=oe(e.allXml,p),f=S?chunkZ3LGMBJC_js.b(S):s,b=chunkLERLET2D_js.s(g,"default",n,t,o,f,r);c.set(d,b);}}return {headers:a,footers:c}}function lt(e,n,t,o,s,r){let a=chunkLERLET2D_js.t(e.footnotesXml,n,t,o,s,r),c=chunkLERLET2D_js.u(e.endnotesXml,n,t,o,s,r);return {footnotes:a.getNormalFootnotes(),endnotes:c.getNormalEndnotes(),footnoteSeparators:a.footnotes.filter(chunkLERLET2D_js.z),endnoteSeparators:c.endnotes.filter(chunkLERLET2D_js.A)}}async function ct(e,n,t){let o=new Set;if(e?.fontScheme){let{majorFont:s,minorFont:r}=e.fontScheme;s?.latin&&o.add(s.latin),r?.latin&&o.add(r.latin);}if(n?.docDefaults?.rPr?.fontFamily?.ascii&&o.add(n.docDefaults.rPr.fontFamily.ascii),n?.styles)for(let s of n.styles)s.rPr?.fontFamily?.ascii&&o.add(s.rPr.fontFamily.ascii),s.rPr?.fontFamily?.hAnsi&&o.add(s.rPr.fontFamily.hAnsi);if(t.content){for(let s of t.content)if(s.type==="paragraph")for(let r of s.content)r.type==="run"&&r.formatting?.fontFamily&&(r.formatting.fontFamily.ascii&&o.add(r.formatting.fontFamily.ascii),r.formatting.fontFamily.hAnsi&&o.add(r.formatting.fontFamily.hAnsi));}if(o.size>0)try{await chunkMNOHUTKE_js.o(Array.from(o));}catch(s){console.warn("Failed to load some fonts:",s);}}async function Kt(e){return He(e,{preloadFonts:false,parseHeadersFooters:false,parseNotes:false,detectVariables:true})}async function en(e,n){return He(e,{onProgress:n,preloadFonts:true,parseHeadersFooters:true,parseNotes:true,detectVariables:true})}async function tn(e){let n=await Y(e);if(!n.documentXml)return [];let t=ne(n.documentXml);return te(t.content)}async function nn(e){let n=await Y(e),t=n.documentXml?te(ne(n.documentXml).content):[];return {hasDocument:n.documentXml!==null,hasStyles:n.stylesXml!==null,hasTheme:n.themeXml!==null,hasNumbering:n.numberingXml!==null,headerCount:n.headers.size,footerCount:n.footers.size,mediaCount:n.media.size,variableCount:t.length}}
|
|
2
|
+
exports.a=ke;exports.b=tt;exports.c=Dt;exports.d=Xt;exports.e=It;exports.f=He;exports.g=Kt;exports.h=en;exports.i=tn;exports.j=nn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1,c as c$1,d,b as b$1,y,I}from'./chunk-72KLR6TJ.mjs';import {b,a,c}from'./chunk-QPFJJPIC.mjs';import {e}from'./chunk-VW22RZ6C.mjs';function De(e){return !b(e.wrapType)&&e.wrapType!=="topAndBottom"}function Xe(e){return e.wrapType==="behind"}function Ne(e){return a(e.wrapType)?true:e.displayMode==="float"}function j(e){return b(e.wrapType)||e.wrapType==="topAndBottom"?false:c(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}function je(e){return e==="left"?"right":e==="right"?"left":"bothSides"}function Ke(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function qe(e,i,n,t){let{x:o,side:r}=Te(e,n,t),l=U(e,i,t);return {x:o,y:l,side:r}}function V(e,i,n){return U(e,i,n)}function Te(e$1,i,n){let t=e$1.position?.horizontal;if(!t)return e$1.cssFloat==="right"?{x:i-e$1.width,side:"right"}:{x:0,side:"left"};let o=ye(t.relativeTo,i,n);if(t.align==="right")return {x:o.size?o.base+o.size-e$1.width:0,side:"right"};if(t.align==="left")return {x:o.base,side:"left"};if(t.align==="center")return {x:o.size?o.base+(o.size-e$1.width)/2:0,side:"left"};if(t.posOffset!==void 0){let r=o.base+e(t.posOffset);return {x:r,side:r>i/2?"right":"left"}}return {x:o.base,side:"left"}}function ye(e,i,n){let t=n?.pageWidth??0,o=n?.marginLeft??0;switch(e){case "page":return {base:-o,size:t};case "leftMargin":return {base:-o,size:o};case "rightMargin":return {base:i,size:o};case "character":return {base:0,size:0};default:return {base:0,size:i}}}function U(e$1,i,n){let t=e$1.position?.vertical;if(!t)return i;let o=Fe(t.relativeTo,i,n);return t.align==="top"?o.base:t.align==="center"?o.size?o.base+(o.size-e$1.height)/2:i:t.align==="bottom"?o.size?o.base+o.size-e$1.height:i:t.posOffset!==void 0?o.base+e(t.posOffset):t.relativeTo==="paragraph"||t.relativeTo==="line"?i:o.base}function Fe(e,i,n){let t=n?.pageHeight??0,o=n?.marginTop??0,r=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:i,size:0};case "page":return {base:-o,size:t};case "topMargin":return {base:-o,size:o};case "bottomMargin":return {base:r,size:o};default:return {base:0,size:r}}}var K=7,q=0;function Me(e,i){if(e.kind!=="paragraph"||i.kind!=="paragraph")return "totalHeight"in i?i.totalHeight:"height"in i?i.height:0;let n=e.runs.filter(u=>u.kind!=="text"||u.text.length>0);if(!(i.lines.length===1&&n.length>0&&n.every(u=>u.kind==="image")))return i.totalHeight;let o=n.reduce((u,g)=>g.kind==="image"?Math.max(u,g.height):u,0),r=e.attrs?.spacing?.before??0,l=e.attrs?.spacing?.after??0;return r+o+l}function J(e){let i=e?.borders?.top?.width??0,n=e?.borders?.bottom?.width??0;return i+n}function Q(e,i,n){let t=e.columnWidths??[],o=a$1(e.width,e.widthType,i),r=c$1(e),l=o??i;if(e.rows.length>0&&(t=d(t,r,l)),t.length>0&&o){let a=t.reduce((c,s)=>c+s,0);if(a>0&&Math.abs(a-o)>1){let c=o/a;t=t.map(s=>s*c);}}let u=new Map;for(let a of b$1(e))u.set(`${a.rowIndex}-${a.cellIndex}`,a.columnIndex);let g=e.rows.map((a,c)=>({cells:a.cells.map((s,h)=>{let d=s.colSpan??1,y=u.get(`${c}-${h}`)??0,p=0;for(let b=0;b<d&&y+b<t.length;b++)p+=t[y+b]??0;p===0&&(p=(s.width&&s.width>0?s.width:a$1(s.widthValue,s.widthType,l))??100);let M=s.padding?.left??K,P=s.padding?.right??K,T=Math.max(1,p-M-P);return {blocks:s.blocks.map(b=>n(b,T)),width:p,height:0,colSpan:s.colSpan,rowSpan:s.rowSpan}}),height:0})),m=[];for(let a=0;a<g.length;a++){let c=g[a],s=e.rows[a]?.cells,h=0,d=0;for(let P=0;P<c.cells.length;P++){let T=c.cells[P],b=s?.[P],R=0,S=0;for(let z=0;z<T.blocks.length;z++){let k=b?.blocks[z],Z=T.blocks[z];if(!k||!Z)continue;let xe=Me(k,Z),E=k.kind==="paragraph"?k.attrs?.spacing:void 0,O=E?.before??0,Y=E?.after??0;R+=Math.max(S,O)+(xe-O-Y),S=Y;}R+=S,T.height=R;let me=b?.padding?.top??q,be=b?.padding?.bottom??q;T.height+=me+be,(T.rowSpan??1)<=1&&(h=Math.max(h,T.height)),d=Math.max(d,J(b));}let y=e.rows[a],p=y?.height,M=y?.heightRule;m[a]=M==="exact"&&!!p,p&&M==="exact"?c.height=p:p?c.height=Math.max(h+d,p):c.height=h+d;}let x=g.map(a=>a.height);for(let a=0;a<g.length;a++){let c=e.rows[a]?.cells,s=g[a]?.cells;if(!(!c||!s))for(let h=0;h<c.length;h++){let d=c[h]?.rowSpan??1;if(d<=1)continue;let y=Math.min(a+d-1,g.length-1),p=(s[h]?.height??0)+J(c[h]),M=0;for(let b=a;b<=y;b++)M+=x[b]??0;let P=p-M;if(P<=0)continue;let T=y;for(;T>a&&m[T];)T--;m[T]||(g[T].height+=P);}}let f=g.reduce((a,c)=>a+c.height,0),F=t.reduce((a,c)=>a+c,0)||o||i;return {kind:"table",rows:g,columnWidths:t,totalWidth:F,totalHeight:f}}var Pe=4;function we(e,i,n,t){let o=Array.isArray(i)?i[0]??0:i,r=Ce(e,o,n,t),l=r.filter(s=>s.isMarginRelative),u=r.filter(s=>!s.isMarginRelative),g=new Map;for(let s of l){let h=g.get(s.topY)??[];h.push(s),g.set(s.topY,h);}let m=ze(u,Pe),x=[];ee(m,x),ee(Array.from(g.values()),x);let f=new Map;for(let s of x){let h=s.fullWidthBlock&&s.isMarginRelative?0:s.anchorBlockIndex,d=f.get(h)??[],{anchorBlockIndex:y,isMarginRelative:p,...M}=s;d.push(M),f.set(h,d);}let F=new Set(f.keys()),a=0,c=[];return e.map((s,h)=>{F.has(h)&&(a=0,c=f.get(h)??[]);let d=c.length>0?c:void 0,y=Array.isArray(i)?i[h]??o:i,p=n(s,y,d,a);return "totalHeight"in p&&(s.kind==="table"&&s.floating||(a+=p.totalHeight)),p})}function Ce(e,i,n,t){let o=[];for(let r=0;r<e.length;r++){let l=e[r];switch(l.kind){case "paragraph":ve(l,r,i,o);break;case "table":Ae(l,r,i,n,o);break;case "textBox":Ie(l,r,i,o,t);break}}return o}function te(e$1,i,n,t,o,r){let l=0,u=0,g=e$1?.horizontal;if(g?.align==="left")l=n+o;else if(g?.align==="right")u=n+t;else if(g?.posOffset!==void 0){let m=e(g.posOffset);m<r/2?l=m+n+o:u=r-m+t;}else i==="left"?l=n+o:i==="right"&&(u=n+t);return y(l,u,r)}function $(e){let i=e?.vertical?.relativeTo;return i==="margin"||i==="page"}function ve(e$1,i,n,t){for(let o of e$1.runs){if(o.kind!=="image")continue;let r=o;if(!j(r))continue;let l=r.distTop??0,u=r.distBottom??0,g=r.distLeft??12,m=r.distRight??12,x=0,f=r.position?.vertical;f?.align==="top"&&f.relativeTo==="margin"?x=0:f?.posOffset!==void 0&&(x=e(f.posOffset));let F=x+r.height,{leftMargin:a,rightMargin:c}=te(r.position,r.cssFloat,r.width,g,m,n);(a>0||c>0)&&t.push({leftMargin:a,rightMargin:c,topY:x-l,bottomY:F+u,anchorBlockIndex:i,isMarginRelative:$(r.position)});}}function Ae(e,i,n,t,o){let r=e.floating;if(!r)return;let l=Q(e,n,t),u=l.totalWidth,g=l.totalHeight,m=r.leftFromText??12,x=r.rightFromText??12,f=r.topFromText??0,F=r.bottomFromText??0,a=0;r.tblpX!==void 0?a=r.tblpX:r.tblpXSpec?r.tblpXSpec==="left"||r.tblpXSpec==="inside"?a=0:r.tblpXSpec==="right"||r.tblpXSpec==="outside"?a=n-u:r.tblpXSpec==="center"&&(a=(n-u)/2):e.justification==="center"?a=(n-u)/2:e.justification==="right"&&(a=n-u);let c=0,s=0;a<n/2?c=a+u+x:s=n-a+m,{leftMargin:c,rightMargin:s}=y(c,s,n);let h=r.tblpY??0,d=h+g;o.push({leftMargin:c,rightMargin:s,topY:h-f,bottomY:d+F,anchorBlockIndex:i});}function Ie(e$1,i,n,t,o){if(!I(e$1)||b(e$1.wrapType))return;let r=e$1.width??0,l=e$1.height??0;if(r<=0||l<=0)return;let u=e$1.distTop??0,g=e$1.distBottom??0,m=e$1.distLeft??12,x=e$1.distRight??12;if(e$1.wrapType==="topAndBottom"){let s=V({height:l,position:e$1.position},0,o),h=s+l+g;if(h<=0)return;t.push({leftMargin:0,rightMargin:0,topY:Math.max(0,s-u),bottomY:h,anchorBlockIndex:i,isMarginRelative:$(e$1.position),fullWidthBlock:true});return}let f=0;e$1.position?.vertical?.posOffset!==void 0&&(f=e(e$1.position.vertical.posOffset));let F=f+l,{leftMargin:a,rightMargin:c}=te(e$1.position,e$1.cssFloat,r,m,x,n);a<=0&&c<=0||t.push({leftMargin:a,rightMargin:c,topY:f-u,bottomY:F+g,anchorBlockIndex:i,isMarginRelative:$(e$1.position)});}function ze(e,i){let n=[];for(let t of e){let o=n.find(r=>r.some(l=>Math.abs(l.anchorBlockIndex-t.anchorBlockIndex)<=i&&t.topY<l.bottomY&&t.bottomY>l.topY));o?o.push(t):n.push([t]);}return n}function ee(e,i){for(let n of e){let t=Math.min(...n.map(o=>o.anchorBlockIndex));for(let o of n)i.push({...o,anchorBlockIndex:t});}}var ne=2e4,w=new Map;function ie(e,i,n){return `${e}|${i}|${n||0}`}function oe(){for(;w.size>ne;){let e=w.keys().next().value;if(e===void 0)break;w.delete(e);}}function ke(e,i,n=0){let t=ie(e,i,n),o=w.get(t);if(o!==void 0)return w.delete(t),w.set(t,o),o.width}function Be(e,i,n,t){let o=ie(e,i,n);w.set(o,{width:t}),oe();}function re(){w.clear();}function Re(e){!Number.isFinite(e)||e<=0||(ne=e,oe());}function ae(){return w.size}var Se=1e3,se=Se,C=new Map;function ce(e,i,n=false,t=false){return `${e}|${i}|${n}|${t}`}function le(){for(;C.size>se;){let e=C.keys().next().value;if(e===void 0)break;C.delete(e);}}function We(e,i,n=false,t=false){let o=ce(e,i,n,t),r=C.get(o);if(r!==void 0)return C.delete(o),C.set(o,r),r}function $e(e,i,n,t,o){let r=ce(e,i,n,t);C.set(r,o),le();}function ue(){C.clear();}function He(e){!Number.isFinite(e)||e<=0||(se=e,le());}function ge(){return C.size}var Ze=5e3,he=Ze,v=new Map;function H(e){let i=[];for(let t of e.runs)t.kind==="text"?i.push(`t:${t.text}|${t.fontFamily}|${t.fontSize}|${t.bold}|${t.italic}`):t.kind==="tab"?i.push(`tab:${t.width}`):t.kind==="image"?i.push(`img:${t.width}x${t.height}`):t.kind==="lineBreak"&&i.push("br");let n=e.attrs;if(n){n.alignment&&i.push(`align:${n.alignment}`),n.indent&&i.push(`indent:${n.indent.left}|${n.indent.right}|${n.indent.firstLine}|${n.indent.hanging}`),n.spacing&&i.push(`spacing:${n.spacing.before}|${n.spacing.after}|${n.spacing.line}|${n.spacing.lineRule}`),n.defaultFontSize!=null&&i.push(`dfs:${n.defaultFontSize}`),n.defaultFontFamily!=null&&i.push(`dff:${n.defaultFontFamily}`);let t=n.borders;if(t){let o=r=>r?`${r.width??""},${r.style??""},${r.color??""}`:"";i.push(`bdr:${o(t.top)}|${o(t.bottom)}|${o(t.left)}|${o(t.right)}`);}n.suppressEmptyParagraphHeight&&i.push("sup"),n.pPrIns&&i.push(`pins:${n.pPrIns.revisionId}`),n.pPrDel&&i.push(`pdel:${n.pPrDel.revisionId}`);}return i.join("||")}function pe(){for(;v.size>he;){let e=v.keys().next().value;if(e===void 0)break;v.delete(e);}}function Ee(e,i){let n=H(e),t=v.get(n);if(t!==void 0&&t.maxWidth===i)return v.delete(n),v.set(n,t),t.measure}function Oe(e,i,n){let t=H(e);v.set(t,{measure:n,maxWidth:i}),pe();}function fe(){v.clear();}function Ye(e){!Number.isFinite(e)||e<=0||(he=e,pe());}function de(){return v.size}function Le(){re(),ue(),fe();}function Ge(){return ae()+ge()+de()}export{de as A,Le as B,Ge as C,De as a,Xe as b,Ne as c,j as d,je as e,Ke as f,qe as g,V as h,Me as i,Q as j,we as k,ke as l,Be as m,re as n,Re as o,ae as p,We as q,$e as r,ue as s,He as t,ge as u,H as v,Ee as w,Oe as x,fe as y,Ye as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunk2KHWHVTA_js=require('./chunk-2KHWHVTA.js'),chunkVMRUBLPI_js=require('./chunk-VMRUBLPI.js'),chunk7HANRHHL_js=require('./chunk-7HANRHHL.js'),prosemirrorState=require('prosemirror-state');function O(e){let{$from:t}=e.selection,n=null,r=null,s=null,o=-1,a=-1;for(let i=t.depth;i>0;i--){let d=t.node(i);if(d.type.name==="tableCell"||d.type.name==="tableHeader"){s=d;let l=t.node(i-1);if(l?.type.name==="tableRow"){let b=0;l.forEach((h,y,S)=>{if(a===-1){if(S===t.index(i-1)){a=b;return}b+=h.attrs.colspan||1;}});}}else if(d.type.name==="tableRow")t.node(i-1)?.type.name==="table"&&(o=t.index(i-1));else if(d.type.name==="table"){n=d,r=t.before(i);break}}return !n||r==null||!s||o<0||a<0?null:{table:n,tablePos:r,cell:s,row:o,col:a,rowspan:s.attrs.rowspan||1,colspan:s.attrs.colspan||1}}function H(e){let t=[],n=[],r=0;for(let s=0;s<e.childCount;s++){let o=e.child(s),a=0;o.forEach(i=>{for(;t[s]?.[a];)a++;let d=i.attrs.rowspan||1,l=i.attrs.colspan||1;n.push({data:i,row:s,col:a,rowspan:d,colspan:l});for(let b=s;b<s+d;b++){let h=t[b]??[];t[b]=h;for(let y=a;y<a+l;y++)h[y]=true;}a+=l,r=Math.max(r,a);});}return {anchors:n,totalCols:r}}function j(e,t,n,r,s){let o={...e.attrs},a=s.reduce((l,b)=>l+b,0),i=chunk2KHWHVTA_js.a(s,t,n),d=n!==(e.attrs.colspan||1)||r!==(e.attrs.rowspan||1);return o.colspan=n,o.rowspan=r,o.colwidth=null,a>0&&(o.width=Math.round(i/a*5e3),o.widthType="pct"),d&&(o._originalFormatting=null),o}function K(e,t,n,r){let s=t+1;for(let o=0;o<e.childCount;o++){let a=e.child(o),i=s+1,d=0;for(let l=0;l<a.childCount;l++){let b=a.child(l);if(o===n&&d===r)return i;d+=b.attrs.colspan||1,i+=b.nodeSize;}s+=a.nodeSize;}return null}function Y(e,t){let n=e.attrs.width??9360;return Array.isArray(e.attrs.columnWidths)&&e.attrs.columnWidths.length>0?[...e.attrs.columnWidths]:Array.from({length:t},()=>Math.floor(n/Math.max(t,1)))}function q(e){let t=O(e);return t?{...chunk2KHWHVTA_js.e(t.rowspan,t.colspan),capturedCellRow:t.row,capturedCellCol:t.col}:null}function Q(e,t,n,r,s,o){if(n<1||r<1)return false;let a=O(e);if(!a||!t)return false;let i=a;if(s!=null&&o!=null&&(s!==a.row||o!==a.col)){let{anchors:p}=H(a.table),g=p.find(T=>T.row===s&&T.col===o);if(!g)return false;i={...a,cell:g.data,row:g.row,col:g.col,rowspan:g.rowspan,colspan:g.colspan};}if(n<i.rowspan||r<i.colspan||n===1&&r===1)return false;let{anchors:d,totalCols:l}=H(i.table),b=Y(i.table,l),h=chunk2KHWHVTA_js.b(b,i.col,i.colspan,r),y=d.find(p=>p.row===i.row&&p.col===i.col);if(!y)return false;let S=chunk2KHWHVTA_js.c(d,y,n,r,i.table.childCount,p=>{if(p)return y.data;let g=y.data.type.schema.nodes.paragraph.create(),T=j(y.data,0,1,1,h);return y.data.type.create(T,g)}),x=i.row+i.rowspan,P=Array.from({length:S.newRowCount},(p,g)=>g<x?{...i.table.child(g)?.attrs??{}}:g<i.row+n?{...i.table.child(x-1)?.attrs??{}}:{...i.table.child(g-S.deltaRows)?.attrs??{}}),v=Array.from({length:S.newRowCount},()=>[]);S.anchors.sort((p,g)=>p.row===g.row?p.col-g.col:p.row-g.row).forEach(p=>{let g=j(p.data,p.col,p.colspan,p.rowspan,h);v[p.row].push(p.data.type.create(g,p.data.content));});let u=v.map((p,g)=>i.table.type.schema.nodes.tableRow.create(P[g],p)),c=i.table.type.create({...i.table.attrs,columnWidths:h},u),f=e.tr.replaceWith(i.tablePos,i.tablePos+i.table.nodeSize,c),C=f.doc.nodeAt(i.tablePos);if(C){let p=K(C,i.tablePos,i.row,i.col);p!=null&&(f=f.setSelection(prosemirrorState.TextSelection.near(f.doc.resolve(p+1))));}return t(f.scrollIntoView()),true}var m=chunkVMRUBLPI_js.a.getCommands();function ee(e,t){return m.insertTable(e,t)}function te(e,t){return m.addRowAbove()(e,t)}function re(e,t){return m.addRowBelow()(e,t)}function ne(e,t){return m.deleteRow()(e,t)}function oe(e,t){return m.addColumnLeft()(e,t)}function ae(e,t){return m.addColumnRight()(e,t)}function ie(e,t){return m.deleteColumn()(e,t)}function se(e,t){return m.deleteTable()(e,t)}function le(e,t){return m.selectTable()(e,t)}function ce(e,t){return m.selectRow()(e,t)}function de(e,t){return m.selectColumn()(e,t)}function ue(e,t){return m.mergeCells()(e,t)}function pe(e,t){return m.splitCell()(e,t)}function me(e,t,n){return m.setCellBorder(e,t,n)}function fe(e,t){return m.setTableBorders(e,t)}function ge(e,t){return m.removeTableBorders()(e,t)}function be(e,t,n){return m.setAllTableBorders(n)(e,t)}function he(e,t,n){return m.setOutsideTableBorders(n)(e,t)}function ye(e,t,n){return m.setInsideTableBorders(n)(e,t)}function Ce(e){return m.setCellVerticalAlign(e)}function Te(e){return m.setCellMargins(e)}function Se(e){return m.setCellTextDirection(e)}function ve(){return m.toggleNoWrap()}function ke(e,t){return m.setRowHeight(e,t)}function xe(){return m.toggleHeaderRow()}function Pe(){return m.distributeColumns()}function we(){return m.autoFitContents()}function Ie(e){return m.setTableProperties(e)}function Ae(e){return m.applyTableStyle(e)}function Ee(e){return m.setCellFillColor(e)}function Me(e){return m.setTableBorderColor(e)}function Re(e){return m.setTableBorderWidth(e)}var Ne=chunkVMRUBLPI_js.a.getCommands();function Be(e,t,n,r){if(!t)return true;let s=e.tr.insert(r,n),o=chunk7HANRHHL_js.i(e),a=e.schema.marks.insertion;return o&&a&&s.addMark(r,r+n.nodeSize,a.create({revisionId:o.revisionId,author:o.author,date:o.date})),t(s.scrollIntoView()),true}function De(e,t,n){return Ne.setImageWrapType(e,t,n)}function Fe(e){return (t,n)=>{let{from:r,to:s,empty:o}=t.selection;if(o)return false;let a=t.schema.marks.comment;if(!a)return false;if(n){let i=t.tr.addMark(r,s,a.create({commentId:e}));n(i);}return true}}function We(e){return (t,n)=>{let r=t.schema.marks.comment;if(!r)return false;if(n){let s=t.tr;t.doc.descendants((o,a)=>{if(o.isText)for(let i of o.marks)i.type===r&&i.attrs.commentId===e&&s.removeMark(a,a+o.nodeSize,i);}),s.steps.length>0&&n(s);}return true}}function V(e,t,n){return (r,s)=>{let o=r.schema.marks.insertion,a=r.schema.marks.deletion;if(!o&&!a)return false;let i=n==="accept"?o:a,d=n==="accept"?a:o;if(s){let l=r.tr,b=[];r.doc.nodesBetween(e,t,(h,y)=>{if(!h.isInline)return;let S=y+h.nodeSize,x=Math.max(e,y),P=Math.min(t,S);d&&h.marks.some(v=>v.type===d)&&b.push({from:x,to:P}),i&&h.marks.some(v=>v.type===i)&&l.removeMark(x,P,i);});for(let h of b.reverse())l.delete(h.from,h.to);l.steps.length>0&&s(l);}return true}}function Le(e,t){return V(e,t,"accept")}function ze(e,t){return V(e,t,"reject")}function _(e){let t=new Set,n=[],r=a=>{typeof a=="number"&&!t.has(a)&&(t.add(a),n.push(a));},s=e.schema.marks.insertion,o=e.schema.marks.deletion;return e.doc.descendants(a=>{if(a.type.name==="paragraph"){r(a.attrs.pPrIns?.revisionId),r(a.attrs.pPrDel?.revisionId);let i=a.attrs.pPrChange;if(Array.isArray(i))for(let d of i)r(d.info.id);}if(a.type.name==="tableRow"){r(a.attrs.trIns?.revisionId),r(a.attrs.trDel?.revisionId);let i=a.attrs.trPrChange;if(Array.isArray(i))for(let d of i)r(d.info.id);}if(a.type.name==="tableCell"||a.type.name==="tableHeader"){let i=a.attrs.cellMarker;r(i?.info?.revisionId);let d=a.attrs.tcPrChange;if(Array.isArray(d))for(let l of d)r(l.info.id);}if(a.type.name==="table"){let i=a.attrs.tblPrChange;if(Array.isArray(i))for(let d of i)r(d.info.id);}if(a.isInline)for(let i of a.marks)(s&&i.type===s||o&&i.type===o)&&r(i.attrs.revisionId);}),n}function He(){return (e,t)=>{let n=_(e);if(n.length===0)return false;if(!t)return true;let r=e,s=o=>{t(o),r=r.apply(o);};for(let o of n)M(o,"accept")(r,s);return true}}function je(){return (e,t)=>{let n=_(e);if(n.length===0)return false;if(!t)return true;let r=e,s=o=>{t(o),r=r.apply(o);};for(let o of n)M(o,"reject")(r,s);return true}}function $(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((o,a)=>{if(s)return false;if(o.isInline&&!(a+o.nodeSize<=t)){for(let i of o.marks)if(i.type===n||i.type===r)return s={from:Math.max(a,t),to:a+o.nodeSize,type:i.type===n?"insertion":"deletion"},false}}),!s&&t>0?$(e,0):s}function Oe(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let o=r.attrs.pPrIns,a=r.attrs.pPrDel;o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"pPrIns"}),a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"pPrDel"});}),n}function Ve(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let o=r.attrs.pPrChange;Array.isArray(o)&&o.forEach((a,i)=>{!a?.info||typeof a.info.id!="number"||a.info.id===t&&n.push({pos:s,node:r,entryIndex:i,prior:a.previousFormatting,current:a.currentFormatting});});}),n}function _e(e,t){let n=[],r=e.schema.marks.insertion,s=e.schema.marks.deletion;return e.doc.descendants((o,a)=>{if(o.isInline){for(let i of o.marks)if((r&&i.type===r||s&&i.type===s)&&i.attrs.revisionId===t){let d=i.type===r?"insertion":"deletion",l=n[n.length-1];l&&l.markName===d&&l.to===a?l.to=a+o.nodeSize:n.push({from:a,to:a+o.nodeSize,markName:d});}}}),n}function $e(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=t+r.nodeSize,o=e.doc.nodeAt(s);!o||o.type.name!=="paragraph"||(e.setNodeMarkup(t,void 0,{...o.attrs,pPrIns:null,pPrDel:null}),e.join(s));}function N(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s={...r.attrs};s[n]=null,e.setNodeMarkup(t,void 0,s);}function Je(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=r.attrs.pPrChange;if(!Array.isArray(s)||n<0||n>=s.length)return;let o=s.slice();o.splice(n,1),e.setNodeMarkup(t,void 0,{...r.attrs,pPrChange:o.length>0?o:null});}function Ue(e,t,n){let r={...e},s=["alignment","spaceBefore","spaceAfter","lineSpacing","lineSpacingRule","beforeAutospacing","afterAutospacing","spacingExplicit","indentLeft","indentRight","indentFirstLine","hangingIndent","styleId","borders","shading","tabs","pageBreakBefore","keepNext","keepLines","contextualSpacing","bidi","outlineLevel","numPr"];for(let o of s)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]??null);return n?.numPr&&!Object.prototype.hasOwnProperty.call(t,"numPr")&&(r.numPr=null),r.numPr==null&&(r.listIsBullet=null,r.listNumFmt=null,r.listMarker=null),r}function Ge(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableRow")return;let o=r.attrs.trIns,a=r.attrs.trDel;o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"trIns"}),a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"trDel"});}),n}function Ke(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableCell"&&r.type.name!=="tableHeader")return;let o=r.attrs.cellMarker;o?.info?.revisionId===t&&n.push({pos:s,node:r,cellKind:o.kind});}),n}function M(e,t){return (n,r)=>{let s=Oe(n,e),o=_e(n,e),a=Ve(n,e),i=Ge(n,e),d=Ke(n,e);if(s.length===0&&o.length===0&&a.length===0&&i.length===0&&d.length===0)return false;if(!r)return true;let l=n.tr;l.setMeta(chunk7HANRHHL_js.g,true);let b=n.schema.marks.insertion,h=n.schema.marks.deletion,y=[...o].sort((u,c)=>c.from-u.from);for(let u of y){let c=u.markName==="insertion";if(t==="accept"&&!c||t==="reject"&&c)l.delete(u.from,u.to);else {let C=c?b:h;C&&l.removeMark(u.from,u.to,C);}}let S=[...s].sort((u,c)=>c.pos-u.pos);for(let u of S){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="paragraph")continue;let C=u.kind==="pPrIns"&&f.attrs.pPrIns?.revisionId===e,p=u.kind==="pPrDel"&&f.attrs.pPrDel?.revisionId===e;if(!C&&!p)continue;if(t==="reject"&&u.kind==="pPrIns"||t==="accept"&&u.kind==="pPrDel"){let T=c+f.nodeSize,R=l.doc.nodeAt(T);!R||R.type.name!=="paragraph"?N(l,c,u.kind):(N(l,c,u.kind),$e(l,c));}else N(l,c,u.kind);}let x=[...a].sort((u,c)=>c.pos-u.pos);for(let u of x){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="paragraph")continue;let C=f.attrs.pPrChange;if(!Array.isArray(C))continue;let p=C.findIndex(g=>g.info.id===e);if(!(p<0))if(t==="reject"&&u.prior){let g=Ue(f.attrs,u.prior,u.current),T=C.slice();T.splice(p,1),l.setNodeMarkup(c,void 0,{...g,pPrChange:T.length>0?T:null});}else Je(l,c,p);}let P=[...d].sort((u,c)=>c.pos-u.pos);for(let u of P){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="tableCell"&&f.type.name!=="tableHeader")continue;let C=f.attrs.cellMarker;!C||C.info.revisionId!==e||l.setNodeMarkup(c,void 0,{...f.attrs,cellMarker:null});}let v=[...i].sort((u,c)=>c.pos-u.pos);for(let u of v){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="tableRow")continue;let C=f.attrs.trIns,p=f.attrs.trDel,g=C?.revisionId===e,T=p?.revisionId===e;if(!g&&!T)continue;if(t==="reject"&&g||t==="accept"&&T){let k=l.doc.resolve(c+1),w=k.node(k.depth-1),I=k.before(k.depth-1);if(w?.type.name==="table"&&w.childCount>1)l.delete(c,c+f.nodeSize);else if(w?.type.name==="table")if(l.doc.resolve(I).parent.childCount===1){let U=l.doc.type.schema.nodes.paragraph;l.replaceWith(I,I+w.nodeSize,U.create());}else l.delete(I,I+w.nodeSize);else {let A={...f.attrs};g&&(A.trIns=null),T&&(A.trDel=null),l.setNodeMarkup(c,void 0,A);}}else {let k={...f.attrs};g&&(k.trIns=null),T&&(k.trDel=null),l.setNodeMarkup(c,void 0,k);}}return l.steps.length===0?false:(r(l),true)}}function Ye(e){return M(e,"accept")}function qe(e){return M(e,"reject")}function J(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((o,a)=>{if(o.isInline){if(a>=t)return false;for(let i of o.marks)(i.type===n||i.type===r)&&(s={from:a,to:a+o.nodeSize,type:i.type===n?"insertion":"deletion"});}}),!s&&t<e.doc.content.size?J(e,e.doc.content.size):s}exports.A=xe;exports.B=Pe;exports.C=we;exports.D=Ie;exports.E=Ae;exports.F=Ee;exports.G=Me;exports.H=Re;exports.I=Be;exports.J=De;exports.K=Fe;exports.L=We;exports.M=Le;exports.N=ze;exports.O=He;exports.P=je;exports.Q=$;exports.R=Ye;exports.S=qe;exports.T=J;exports.a=q;exports.b=Q;exports.c=ee;exports.d=te;exports.e=re;exports.f=ne;exports.g=oe;exports.h=ae;exports.i=ie;exports.j=se;exports.k=le;exports.l=ce;exports.m=de;exports.n=ue;exports.o=pe;exports.p=me;exports.q=fe;exports.r=ge;exports.s=be;exports.t=he;exports.u=ye;exports.v=Ce;exports.w=Te;exports.x=Se;exports.y=ve;exports.z=ke;
|
|
1
|
+
'use strict';var chunk2KHWHVTA_js=require('./chunk-2KHWHVTA.js'),chunkWWBNJ7KF_js=require('./chunk-WWBNJ7KF.js'),chunk7HANRHHL_js=require('./chunk-7HANRHHL.js'),prosemirrorState=require('prosemirror-state');function O(e){let{$from:t}=e.selection,n=null,r=null,s=null,o=-1,a=-1;for(let i=t.depth;i>0;i--){let d=t.node(i);if(d.type.name==="tableCell"||d.type.name==="tableHeader"){s=d;let l=t.node(i-1);if(l?.type.name==="tableRow"){let b=0;l.forEach((h,y,S)=>{if(a===-1){if(S===t.index(i-1)){a=b;return}b+=h.attrs.colspan||1;}});}}else if(d.type.name==="tableRow")t.node(i-1)?.type.name==="table"&&(o=t.index(i-1));else if(d.type.name==="table"){n=d,r=t.before(i);break}}return !n||r==null||!s||o<0||a<0?null:{table:n,tablePos:r,cell:s,row:o,col:a,rowspan:s.attrs.rowspan||1,colspan:s.attrs.colspan||1}}function H(e){let t=[],n=[],r=0;for(let s=0;s<e.childCount;s++){let o=e.child(s),a=0;o.forEach(i=>{for(;t[s]?.[a];)a++;let d=i.attrs.rowspan||1,l=i.attrs.colspan||1;n.push({data:i,row:s,col:a,rowspan:d,colspan:l});for(let b=s;b<s+d;b++){let h=t[b]??[];t[b]=h;for(let y=a;y<a+l;y++)h[y]=true;}a+=l,r=Math.max(r,a);});}return {anchors:n,totalCols:r}}function j(e,t,n,r,s){let o={...e.attrs},a=s.reduce((l,b)=>l+b,0),i=chunk2KHWHVTA_js.a(s,t,n),d=n!==(e.attrs.colspan||1)||r!==(e.attrs.rowspan||1);return o.colspan=n,o.rowspan=r,o.colwidth=null,a>0&&(o.width=Math.round(i/a*5e3),o.widthType="pct"),d&&(o._originalFormatting=null),o}function K(e,t,n,r){let s=t+1;for(let o=0;o<e.childCount;o++){let a=e.child(o),i=s+1,d=0;for(let l=0;l<a.childCount;l++){let b=a.child(l);if(o===n&&d===r)return i;d+=b.attrs.colspan||1,i+=b.nodeSize;}s+=a.nodeSize;}return null}function Y(e,t){let n=e.attrs.width??9360;return Array.isArray(e.attrs.columnWidths)&&e.attrs.columnWidths.length>0?[...e.attrs.columnWidths]:Array.from({length:t},()=>Math.floor(n/Math.max(t,1)))}function q(e){let t=O(e);return t?{...chunk2KHWHVTA_js.e(t.rowspan,t.colspan),capturedCellRow:t.row,capturedCellCol:t.col}:null}function Q(e,t,n,r,s,o){if(n<1||r<1)return false;let a=O(e);if(!a||!t)return false;let i=a;if(s!=null&&o!=null&&(s!==a.row||o!==a.col)){let{anchors:p}=H(a.table),g=p.find(T=>T.row===s&&T.col===o);if(!g)return false;i={...a,cell:g.data,row:g.row,col:g.col,rowspan:g.rowspan,colspan:g.colspan};}if(n<i.rowspan||r<i.colspan||n===1&&r===1)return false;let{anchors:d,totalCols:l}=H(i.table),b=Y(i.table,l),h=chunk2KHWHVTA_js.b(b,i.col,i.colspan,r),y=d.find(p=>p.row===i.row&&p.col===i.col);if(!y)return false;let S=chunk2KHWHVTA_js.c(d,y,n,r,i.table.childCount,p=>{if(p)return y.data;let g=y.data.type.schema.nodes.paragraph.create(),T=j(y.data,0,1,1,h);return y.data.type.create(T,g)}),x=i.row+i.rowspan,w=Array.from({length:S.newRowCount},(p,g)=>g<x?{...i.table.child(g)?.attrs??{}}:g<i.row+n?{...i.table.child(x-1)?.attrs??{}}:{...i.table.child(g-S.deltaRows)?.attrs??{}}),k=Array.from({length:S.newRowCount},()=>[]);S.anchors.sort((p,g)=>p.row===g.row?p.col-g.col:p.row-g.row).forEach(p=>{let g=j(p.data,p.col,p.colspan,p.rowspan,h);k[p.row].push(p.data.type.create(g,p.data.content));});let u=k.map((p,g)=>i.table.type.schema.nodes.tableRow.create(w[g],p)),c=i.table.type.create({...i.table.attrs,columnWidths:h},u),f=e.tr.replaceWith(i.tablePos,i.tablePos+i.table.nodeSize,c),C=f.doc.nodeAt(i.tablePos);if(C){let p=K(C,i.tablePos,i.row,i.col);p!=null&&(f=f.setSelection(prosemirrorState.TextSelection.near(f.doc.resolve(p+1))));}return t(f.scrollIntoView()),true}var m=chunkWWBNJ7KF_js.a.getCommands();function ee(e,t){return m.insertTable(e,t)}function te(e,t){return m.addRowAbove()(e,t)}function re(e,t){return m.addRowBelow()(e,t)}function ne(e,t){return m.deleteRow()(e,t)}function oe(e,t){return m.addColumnLeft()(e,t)}function ae(e,t){return m.addColumnRight()(e,t)}function ie(e,t){return m.deleteColumn()(e,t)}function se(e,t){return m.deleteTable()(e,t)}function le(e,t){return m.selectTable()(e,t)}function ce(e,t){return m.selectRow()(e,t)}function de(e,t){return m.selectColumn()(e,t)}function ue(e,t){return m.mergeCells()(e,t)}function pe(e,t){return m.splitCell()(e,t)}function me(e,t,n){return m.setCellBorder(e,t,n)}function fe(e,t){return m.setTableBorders(e,t)}function ge(e,t){return m.removeTableBorders()(e,t)}function be(e,t,n){return m.setAllTableBorders(n)(e,t)}function he(e,t,n){return m.setOutsideTableBorders(n)(e,t)}function ye(e,t,n){return m.setInsideTableBorders(n)(e,t)}function Ce(e){return m.setCellVerticalAlign(e)}function Te(e){return m.setCellMargins(e)}function Se(e){return m.setCellTextDirection(e)}function ke(){return m.toggleNoWrap()}function ve(e,t){return m.setRowHeight(e,t)}function xe(){return m.toggleHeaderRow()}function we(){return m.distributeColumns()}function Pe(){return m.autoFitContents()}function Ie(e){return m.setTableProperties(e)}function Ae(e){return m.applyTableStyle(e)}function Ee(e){return m.setCellFillColor(e)}function Me(e){return m.setTableBorderColor(e)}function Re(e){return m.setTableBorderWidth(e)}var Ne=chunkWWBNJ7KF_js.a.getCommands();function Be(e,t,n,r){if(!t)return true;let s=e.tr.insert(r,n),o=chunk7HANRHHL_js.i(e),a=e.schema.marks.insertion;return o&&a&&s.addMark(r,r+n.nodeSize,a.create({revisionId:o.revisionId,author:o.author,date:o.date})),t(s.scrollIntoView()),true}function We(e,t,n){return Ne.setImageWrapType(e,t,n)}function Fe(e){return (t,n)=>{let{from:r,to:s,empty:o}=t.selection;if(o)return false;let a=t.schema.marks.comment;if(!a)return false;if(n){let i=t.tr.addMark(r,s,a.create({commentId:e}));n(i);}return true}}function De(e){return (t,n)=>{let r=t.schema.marks.comment;if(!r)return false;if(n){let s=t.tr;t.doc.descendants((o,a)=>{if(o.isText)for(let i of o.marks)i.type===r&&i.attrs.commentId===e&&s.removeMark(a,a+o.nodeSize,i);}),s.steps.length>0&&n(s);}return true}}function V(e,t,n){return (r,s)=>{let o=r.schema.marks.insertion,a=r.schema.marks.deletion;if(!o&&!a)return false;let i=n==="accept"?o:a,d=n==="accept"?a:o;if(s){let l=r.tr,b=[];r.doc.nodesBetween(e,t,(h,y)=>{if(!h.isInline)return;let S=y+h.nodeSize,x=Math.max(e,y),w=Math.min(t,S);d&&h.marks.some(k=>k.type===d)&&b.push({from:x,to:w}),i&&h.marks.some(k=>k.type===i)&&l.removeMark(x,w,i);});for(let h of b.reverse())l.delete(h.from,h.to);l.steps.length>0&&s(l);}return true}}function Le(e,t){return V(e,t,"accept")}function ze(e,t){return V(e,t,"reject")}function _(e){let t=new Set,n=[],r=a=>{typeof a=="number"&&!t.has(a)&&(t.add(a),n.push(a));},s=e.schema.marks.insertion,o=e.schema.marks.deletion;return e.doc.descendants(a=>{if(a.type.name==="paragraph"){r(a.attrs.pPrIns?.revisionId),r(a.attrs.pPrDel?.revisionId);let i=a.attrs.pPrChange;if(Array.isArray(i))for(let d of i)r(d.info.id);}if(a.type.name==="tableRow"){r(a.attrs.trIns?.revisionId),r(a.attrs.trDel?.revisionId);let i=a.attrs.trPrChange;if(Array.isArray(i))for(let d of i)r(d.info.id);}if(a.type.name==="tableCell"||a.type.name==="tableHeader"){let i=a.attrs.cellMarker;r(i?.info?.revisionId);let d=a.attrs.tcPrChange;if(Array.isArray(d))for(let l of d)r(l.info.id);}if(a.type.name==="table"){let i=a.attrs.tblPrChange;if(Array.isArray(i))for(let d of i)r(d.info.id);}if(a.isInline)for(let i of a.marks)(s&&i.type===s||o&&i.type===o)&&r(i.attrs.revisionId);}),n}function He(){return (e,t)=>{let n=_(e);if(n.length===0)return false;if(!t)return true;let r=e,s=o=>{t(o),r=r.apply(o);};for(let o of n)M(o,"accept")(r,s);return true}}function je(){return (e,t)=>{let n=_(e);if(n.length===0)return false;if(!t)return true;let r=e,s=o=>{t(o),r=r.apply(o);};for(let o of n)M(o,"reject")(r,s);return true}}function $(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((o,a)=>{if(s)return false;if(o.isInline&&!(a+o.nodeSize<=t)){for(let i of o.marks)if(i.type===n||i.type===r)return s={from:Math.max(a,t),to:a+o.nodeSize,type:i.type===n?"insertion":"deletion"},false}}),!s&&t>0?$(e,0):s}function Oe(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let o=r.attrs.pPrIns,a=r.attrs.pPrDel;o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"pPrIns"}),a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"pPrDel"});}),n}function Ve(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let o=r.attrs.pPrChange;Array.isArray(o)&&o.forEach((a,i)=>{!a?.info||typeof a.info.id!="number"||a.info.id===t&&n.push({pos:s,node:r,entryIndex:i,prior:a.previousFormatting,current:a.currentFormatting});});}),n}function _e(e,t){let n=[],r=e.schema.marks.insertion,s=e.schema.marks.deletion;return e.doc.descendants((o,a)=>{if(o.isInline){for(let i of o.marks)if((r&&i.type===r||s&&i.type===s)&&i.attrs.revisionId===t){let d=i.type===r?"insertion":"deletion",l=n[n.length-1];l&&l.markName===d&&l.to===a?l.to=a+o.nodeSize:n.push({from:a,to:a+o.nodeSize,markName:d});}}}),n}function $e(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=t+r.nodeSize,o=e.doc.nodeAt(s);!o||o.type.name!=="paragraph"||(e.setNodeMarkup(t,void 0,{...o.attrs,pPrIns:null,pPrDel:null}),e.join(s));}function N(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s={...r.attrs};s[n]=null,e.setNodeMarkup(t,void 0,s);}function Je(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=r.attrs.pPrChange;if(!Array.isArray(s)||n<0||n>=s.length)return;let o=s.slice();o.splice(n,1),e.setNodeMarkup(t,void 0,{...r.attrs,pPrChange:o.length>0?o:null});}function Ue(e,t,n){let r={...e},s=["alignment","spaceBefore","spaceAfter","lineSpacing","lineSpacingRule","beforeAutospacing","afterAutospacing","spacingExplicit","indentLeft","indentRight","indentFirstLine","hangingIndent","styleId","borders","shading","tabs","pageBreakBefore","keepNext","keepLines","contextualSpacing","bidi","outlineLevel","numPr"];for(let o of s)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]??null);return n?.numPr&&!Object.prototype.hasOwnProperty.call(t,"numPr")&&(r.numPr=null),r.numPr==null&&(r.listIsBullet=null,r.listNumFmt=null,r.listMarker=null),r}function Ge(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableRow")return;let o=r.attrs.trIns,a=r.attrs.trDel;o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"trIns"}),a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"trDel"});}),n}function Ke(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableCell"&&r.type.name!=="tableHeader")return;let o=r.attrs.cellMarker;o?.info?.revisionId===t&&n.push({pos:s,node:r,cellKind:o.kind});}),n}function M(e,t){return (n,r)=>{let s=Oe(n,e),o=_e(n,e),a=Ve(n,e),i=Ge(n,e),d=Ke(n,e);if(s.length===0&&o.length===0&&a.length===0&&i.length===0&&d.length===0)return false;if(!r)return true;let l=n.tr;l.setMeta(chunk7HANRHHL_js.g,true);let b=n.schema.marks.insertion,h=n.schema.marks.deletion,y=[...o].sort((u,c)=>c.from-u.from);for(let u of y){let c=u.markName==="insertion";if(t==="accept"&&!c||t==="reject"&&c)l.delete(u.from,u.to);else {let C=c?b:h;C&&l.removeMark(u.from,u.to,C);}}let S=[...s].sort((u,c)=>c.pos-u.pos);for(let u of S){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="paragraph")continue;let C=u.kind==="pPrIns"&&f.attrs.pPrIns?.revisionId===e,p=u.kind==="pPrDel"&&f.attrs.pPrDel?.revisionId===e;if(!C&&!p)continue;if(t==="reject"&&u.kind==="pPrIns"||t==="accept"&&u.kind==="pPrDel"){let T=c+f.nodeSize,R=l.doc.nodeAt(T);!R||R.type.name!=="paragraph"?N(l,c,u.kind):(N(l,c,u.kind),$e(l,c));}else N(l,c,u.kind);}let x=[...a].sort((u,c)=>c.pos-u.pos);for(let u of x){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="paragraph")continue;let C=f.attrs.pPrChange;if(!Array.isArray(C))continue;let p=C.findIndex(g=>g.info.id===e);if(!(p<0))if(t==="reject"&&u.prior){let g=Ue(f.attrs,u.prior,u.current),T=C.slice();T.splice(p,1),l.setNodeMarkup(c,void 0,{...g,pPrChange:T.length>0?T:null});}else Je(l,c,p);}let w=[...d].sort((u,c)=>c.pos-u.pos);for(let u of w){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="tableCell"&&f.type.name!=="tableHeader")continue;let C=f.attrs.cellMarker;!C||C.info.revisionId!==e||l.setNodeMarkup(c,void 0,{...f.attrs,cellMarker:null});}let k=[...i].sort((u,c)=>c.pos-u.pos);for(let u of k){let c=l.mapping.map(u.pos),f=l.doc.nodeAt(c);if(!f||f.type.name!=="tableRow")continue;let C=f.attrs.trIns,p=f.attrs.trDel,g=C?.revisionId===e,T=p?.revisionId===e;if(!g&&!T)continue;if(t==="reject"&&g||t==="accept"&&T){let v=l.doc.resolve(c+1),P=v.node(v.depth-1),I=v.before(v.depth-1);if(P?.type.name==="table"&&P.childCount>1)l.delete(c,c+f.nodeSize);else if(P?.type.name==="table")if(l.doc.resolve(I).parent.childCount===1){let U=l.doc.type.schema.nodes.paragraph;l.replaceWith(I,I+P.nodeSize,U.create());}else l.delete(I,I+P.nodeSize);else {let A={...f.attrs};g&&(A.trIns=null),T&&(A.trDel=null),l.setNodeMarkup(c,void 0,A);}}else {let v={...f.attrs};g&&(v.trIns=null),T&&(v.trDel=null),l.setNodeMarkup(c,void 0,v);}}return l.steps.length===0?false:(r(l),true)}}function Ye(e){return M(e,"accept")}function qe(e){return M(e,"reject")}function J(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((o,a)=>{if(o.isInline){if(a>=t)return false;for(let i of o.marks)(i.type===n||i.type===r)&&(s={from:a,to:a+o.nodeSize,type:i.type===n?"insertion":"deletion"});}}),!s&&t<e.doc.content.size?J(e,e.doc.content.size):s}function Qe(e){return e.doc.attrs.watermark??null}function Xe(e){return (t,n)=>(n&&n(t.tr.setDocAttribute("watermark",e)),true)}exports.A=xe;exports.B=we;exports.C=Pe;exports.D=Ie;exports.E=Ae;exports.F=Ee;exports.G=Me;exports.H=Re;exports.I=Be;exports.J=We;exports.K=Fe;exports.L=De;exports.M=Le;exports.N=ze;exports.O=He;exports.P=je;exports.Q=$;exports.R=Ye;exports.S=qe;exports.T=J;exports.U=Qe;exports.V=Xe;exports.a=q;exports.b=Q;exports.c=ee;exports.d=te;exports.e=re;exports.f=ne;exports.g=oe;exports.h=ae;exports.i=ie;exports.j=se;exports.k=le;exports.l=ce;exports.m=de;exports.n=ue;exports.o=pe;exports.p=me;exports.q=fe;exports.r=ge;exports.s=be;exports.t=he;exports.u=ye;exports.v=Ce;exports.w=Te;exports.x=Se;exports.y=ke;exports.z=ve;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js');function C(t){let o=t?.package.headers;if(o){for(let n of o.values())if(n.watermark)return n.watermark}}function R(t){let o=t.package.headers;if(!o||o.size===0)return t;let n=false,s=new Map;for(let[a,i]of o)if(i.watermark){let{watermark:d,...u}=i;s.set(a,u),n=true;}else s.set(a,i);return n?{...t,package:{...t.package,headers:s}}:t}function y(t,o){let n=t.package.headers;if(!n||n.size===0)return t;let s=new Map;for(let[a,i]of n)s.set(a,{...i,watermark:{...o}});return {...t,package:{...t.package,headers:s}}}function $(t){let o=t.package.document,n=[];if(o.sections)for(let s of o.sections)s.properties&&n.push(s.properties);return o.finalSectionProperties&&n.push(o.finalSectionProperties),n}function M(t,o){let n=t.package,s=n.document,a=n.headers,i=$(t),d=new Set;if(a)for(let e of a.values())d.add(e.hdrFtrType);let u=!a||a.size===0,F=i.some(e=>e.titlePg),D=i.some(e=>e.evenAndOddHeaders),h=u,g=F&&!d.has("first"),k=D&&!d.has("even");if(!h&&!g&&!k)return t;let f=n.relationships?new Map(n.relationships):new Map,H=new Map(a??[]),p=new Set;for(let e of f.values())e.target&&p.add(e.target.replace(/^\/?word\//,"").toLowerCase());function T(){let e=1;for(;p.has(`header${e}.xml`);)e++;let r=`header${e}.xml`;return p.add(r.toLowerCase()),r}function v(e){let r=`rIdWmHdr${e[0].toUpperCase()}${e.slice(1)}`,c=1;for(;f.has(r);)r=`rIdWmHdr${e[0].toUpperCase()}${e.slice(1)}${c++}`;return f.set(r,{id:r,type:chunkZ3LGMBJC_js.a.header,target:T()}),H.set(r,{type:"header",hdrFtrType:e,content:[],watermark:{...o}}),r}let l={};function x(e){return l[e]??(l[e]=v(e))}function m(e,r){let c=e?.headerReferences?[...e.headerReferences]:[];return c.some(I=>I.type===r)?e??{}:(c.push({type:r,rId:x(r)}),{...e??{},headerReferences:c})}function P(e){let r=e;return h&&(r=m(r,"default")),g&&r?.titlePg&&(r=m(r,"first")),k&&r?.evenAndOddHeaders&&(r=m(r,"even")),r}let W=P(s.finalSectionProperties),w=s.sections?.map(e=>({...e,properties:P(e.properties)??e.properties}));return {...t,package:{...n,relationships:f,headers:H,document:{...s,finalSectionProperties:W,...w?{sections:w}:{}}}}}function O(t,o){if(!o)return R(t);let n=y(t,o);return M(n,o)}
|
|
2
|
+
exports.a=C;exports.b=O;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
`)}function He(e){if(!(!e.fill||e.fill.type!=="solid"))return H(e.fill.color)}function Ve(e){if(e.outline?.color)return H(e.outline.color)}function _e(e){return e.outline?.width?chunk4Q2IP5FW_js.e(e.outline.width):0}function me(e){if(!e)return;let n=parseInt(e,10);if(!isNaN(n))return n/6e4}function ge(e,n){let t=
|
|
1
|
+
'use strict';var chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');var pe={accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",dk1:"dk1",lt1:"lt1",dk2:"dk2",lt2:"lt2",tx1:"text1",tx2:"text2",bg1:"background1",bg2:"background2",hlink:"hlink",folHlink:"folHlink"},G={black:"000000",white:"FFFFFF",red:"FF0000",green:"00FF00",blue:"0000FF",yellow:"FFFF00",cyan:"00FFFF",magenta:"FF00FF"};function J(e,n){let t=chunk3R7QHNI5_js.i(n),i=t.find(r=>r.name==="a:shade");if(i){let r=chunk3R7QHNI5_js.j(i,null,"val");r&&(e.themeShade=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}let o=t.find(r=>r.name==="a:tint");if(o){let r=chunk3R7QHNI5_js.j(o,null,"val");r&&(e.themeTint=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}return e}function K(e){if(!e)return;let n=chunk3R7QHNI5_js.i(e),t=n.find(l=>l.name==="a:srgbClr");if(t){let l=chunk3R7QHNI5_js.j(t,null,"val");if(l)return J({rgb:l},t)}let i=n.find(l=>l.name==="a:schemeClr");if(i){let l=chunk3R7QHNI5_js.j(i,null,"val");if(l){let u={themeColor:pe[l]??"dk1"};return J(u,i)}}let o=n.find(l=>l.name==="a:sysClr");if(o)return {rgb:chunk3R7QHNI5_js.j(o,null,"lastClr")??"000000"};let r=n.find(l=>l.name==="a:prstClr");if(r){let l=chunk3R7QHNI5_js.j(r,null,"val");if(l&&G[l])return {rgb:G[l]}}}function N(e){if(!e)return;let n=chunk3R7QHNI5_js.i(e);if(n.find(i=>i.name==="a:noFill"))return {type:"none"};let t=n.find(i=>i.name==="a:solidFill");if(t)return {type:"solid",color:K(t)};if(n.find(i=>i.name==="a:gradFill"))return {type:"gradient"}}function S(e){let n=e?chunk3R7QHNI5_js.h(e,"a:ln"):null;if(!n)return;let t=chunk3R7QHNI5_js.i(n);if(t.find(u=>u.name==="a:noFill"))return;let i={},o=chunk3R7QHNI5_js.j(n,null,"w");o&&(i.width=parseInt(o,10));let r=t.find(u=>u.name==="a:solidFill");r&&(i.color=K(r));let l=t.find(u=>u.name==="a:prstDash");if(l){let u=chunk3R7QHNI5_js.j(l,null,"val");u&&(i.style=u);}return i}function L(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"relativeFrom")??"column",t=chunk3R7QHNI5_js.h(e,"wp:align");if(t){let o=chunk3R7QHNI5_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk3R7QHNI5_js.h(e,"wp:posOffset");if(i){let o=chunk3R7QHNI5_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function z(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"relativeFrom")??"paragraph",t=chunk3R7QHNI5_js.h(e,"wp:align");if(t){let o=chunk3R7QHNI5_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk3R7QHNI5_js.h(e,"wp:posOffset");if(i){let o=chunk3R7QHNI5_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function Q(e){let n=chunk3R7QHNI5_js.h(e,"wp:positionH"),t=chunk3R7QHNI5_js.h(e,"wp:positionV");if(!(!n&&!t))return {horizontal:L(n)??{relativeTo:"column"},vertical:z(t)??{relativeTo:"paragraph"}}}var W=["wp:wrapNone","wp:wrapSquare","wp:wrapTight","wp:wrapThrough","wp:wrapTopAndBottom"];function D(e,n,t){if(!e){let p={type:n?"behind":"inFront"};return t?.distT!==void 0&&(p.distT=t.distT),t?.distB!==void 0&&(p.distB=t.distB),t?.distL!==void 0&&(p.distL=t.distL),t?.distR!==void 0&&(p.distR=t.distR),p}let o=(e.name||"").replace("wp:",""),r;switch(o){case "wrapNone":r=n?"behind":"inFront";break;case "wrapSquare":r="square";break;case "wrapTight":r="tight";break;case "wrapThrough":r="through";break;case "wrapTopAndBottom":r="topAndBottom";break;default:r="square";}let l={type:r},u=chunk3R7QHNI5_js.j(e,null,"wrapText");u&&(l.wrapText=u);let s=chunk3R7QHNI5_js.l(e,null,"distT")??t?.distT,c=chunk3R7QHNI5_js.l(e,null,"distB")??t?.distB,m=chunk3R7QHNI5_js.l(e,null,"distL")??t?.distL,g=chunk3R7QHNI5_js.l(e,null,"distR")??t?.distR;return s!==void 0&&(l.distT=s),c!==void 0&&(l.distB=c),m!==void 0&&(l.distL=m),g!==void 0&&(l.distR=g),l}function Y(e){let n=chunk3R7QHNI5_js.i(e),t=chunk3R7QHNI5_js.j(e,null,"behindDoc")==="1",i=n.find(r=>W.includes(r.name??"")),o={distT:chunk3R7QHNI5_js.l(e,null,"distT")??void 0,distB:chunk3R7QHNI5_js.l(e,null,"distB")??void 0,distL:chunk3R7QHNI5_js.l(e,null,"distL")??void 0,distR:chunk3R7QHNI5_js.l(e,null,"distR")??void 0};return D(i??null,t,o)}var ce={accent1:"5B9BD5",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"4472C4",accent6:"70AD47",dk1:"000000",lt1:"FFFFFF",dk2:"1F497D",lt2:"EEECE1",text1:"000000",text2:"1F497D",background1:"FFFFFF",background2:"EEECE1",hlink:"0563C1",folHlink:"954F72"};function H(e){if(e){if(e.rgb)return `#${e.rgb}`;if(e.themeColor)return `#${ce[e.themeColor]??"000000"}`}}var k=91440;function Z(e){if(!e)return {};let n={},t=chunk3R7QHNI5_js.l(e,null,"lIns"),i=chunk3R7QHNI5_js.l(e,null,"rIns"),o=chunk3R7QHNI5_js.l(e,null,"tIns"),r=chunk3R7QHNI5_js.l(e,null,"bIns");return (t!==void 0||i!==void 0||o!==void 0||r!==void 0)&&(n.margins={left:t,right:i,top:o,bottom:r}),n}function ve(e){if(!e)return {paragraphElements:[],tableElements:[]};let n=chunk3R7QHNI5_js.g(e,"p"),t=chunk3R7QHNI5_js.g(e,"tbl");return {paragraphElements:n,tableElements:t}}function Be(e,n,t,i,o,r,l,u){if(!e)return [];let s=[],c=chunk3R7QHNI5_js.i(e);for(let m of c){let g=m.name||"",p=g.indexOf(":"),T=p>=0?g.substring(p+1):g;if(T==="p"){let b=n(m,i,o,r,l);s.push(b);}}return s}function ee(e){let t=chunk3R7QHNI5_js.i(e).find(u=>u.name==="wp:inline"||u.name==="wp:anchor");if(!t)return false;let i=chunk3R7QHNI5_js.h(t,"a:graphic");if(!i)return false;let o=chunk3R7QHNI5_js.h(i,"a:graphicData");if(!o)return false;let r=chunk3R7QHNI5_js.h(o,"wps:wsp");return r?chunk3R7QHNI5_js.h(r,"wps:txbx")!==null:false}function Ce(e){return chunk3R7QHNI5_js.h(e,"wps:txbx")!==null}function Me(e){let t=chunk3R7QHNI5_js.i(e).find(x=>x.name==="wp:inline"||x.name==="wp:anchor");if(!t)return null;let i=t.name==="wp:anchor",o=chunk3R7QHNI5_js.h(t,"a:graphic");if(!o)return null;let r=chunk3R7QHNI5_js.h(o,"a:graphicData");if(!r)return null;let l=chunk3R7QHNI5_js.h(r,"wps:wsp");if(!l||!chunk3R7QHNI5_js.h(l,"wps:txbx"))return null;let s=chunk3R7QHNI5_js.i(l),c=s.find(x=>x.name==="wps:spPr"),m=s.find(x=>x.name==="wps:bodyPr"),g=chunk3R7QHNI5_js.h(t,"wp:extent"),p=chunk3R7QHNI5_js.l(g,null,"cx")??0,T=chunk3R7QHNI5_js.l(g,null,"cy")??0,b={width:p,height:T},C=chunk3R7QHNI5_js.h(t,"wp:docPr"),P=C?chunk3R7QHNI5_js.j(C,null,"id")??void 0:void 0,v=N(c??null),B=S(c??null),E=Z(m??null),y={type:"textBox",size:b,content:[]};if(P&&(y.id=P),v&&(y.fill=v),B&&(y.outline=B),E.margins&&(y.margins=E.margins),i){let x=Q(t);x&&(y.position=x);let h=Y(t);h&&(y.wrap=h);}return y}function Re(e){let n=chunk3R7QHNI5_js.h(e,"wps:txbx");return n?chunk3R7QHNI5_js.h(n,"w:txbxContent"):null}function Xe(e,n,t,i){if(!chunk3R7QHNI5_js.h(e,"wps:txbx"))return null;let r=chunk3R7QHNI5_js.i(e),l=r.find(b=>b.name==="wps:spPr"),u=r.find(b=>b.name==="wps:bodyPr"),s=r.find(b=>b.name==="wps:cNvPr"),c=s?chunk3R7QHNI5_js.j(s,null,"id")??void 0:void 0,m=N(l??null),g=S(l??null),p=Z(u??null),T={type:"textBox",size:n,content:[]};return c&&(T.id=c),m&&(T.fill=m),g&&(T.outline=g),p.margins&&(T.margins=p.margins),t&&(T.position=t),i&&(T.wrap=i),T}function ke(e){return chunk4Q2IP5FW_js.e(e.size.width)}function Ae(e){return chunk4Q2IP5FW_js.e(e.size.height)}function Oe(e){return {width:chunk4Q2IP5FW_js.e(e.size.width),height:chunk4Q2IP5FW_js.e(e.size.height)}}function Ne(e){let n=e.margins;return {top:chunk4Q2IP5FW_js.e(n?.top??k),bottom:chunk4Q2IP5FW_js.e(n?.bottom??k),left:chunk4Q2IP5FW_js.e(n?.left??k),right:chunk4Q2IP5FW_js.e(n?.right??k)}}function Se(e){return e.position!==void 0||e.wrap!==void 0}function Le(e){return e.fill!==void 0&&e.fill.type!=="none"}function ze(e){return e.outline!==void 0}function We(e){return e.content.length>0}function De(e){let n=[];for(let t of e.content){let i=[];for(let o of t.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&i.push(r.text);n.push(i.join(""));}return n.join(`
|
|
2
|
+
`)}function He(e){if(!(!e.fill||e.fill.type!=="solid"))return H(e.fill.color)}function Ve(e){if(e.outline?.color)return H(e.outline.color)}function _e(e){return e.outline?.width?chunk4Q2IP5FW_js.e(e.outline.width):0}function me(e){if(!e)return;let n=parseInt(e,10);if(!isNaN(n))return n/6e4}function ge(e,n){let t=chunk3R7QHNI5_js.i(e);for(let i of t)if(n.includes(i.name||""))return i;return null}function ne(e){if(!e)return {width:0,height:0};let n=chunk3R7QHNI5_js.l(e,null,"cx")??0,t=chunk3R7QHNI5_js.l(e,null,"cy")??0;return {width:n,height:t}}function te(e){if(!e)return;let n=chunk3R7QHNI5_js.l(e,null,"l")??0,t=chunk3R7QHNI5_js.l(e,null,"t")??0,i=chunk3R7QHNI5_js.l(e,null,"r")??0,o=chunk3R7QHNI5_js.l(e,null,"b")??0;if(!(n===0&&t===0&&i===0&&o===0))return {left:n,top:t,right:i,bottom:o}}function ie(e){if(!e)return {};let n=chunk3R7QHNI5_js.j(e,null,"id")??void 0,t=chunk3R7QHNI5_js.j(e,null,"name")??void 0,i=chunk3R7QHNI5_js.j(e,null,"descr")??void 0,o=chunk3R7QHNI5_js.j(e,null,"title")??void 0,r=chunk3R7QHNI5_js.j(e,null,"decorative")==="1",l=chunk3R7QHNI5_js.e(e,"a","hlinkClick"),u=l?chunk3R7QHNI5_js.j(l,"r","id")??void 0:void 0;return {id:n,name:t,alt:i,title:o,decorative:r||void 0,hlinkRId:u}}function re(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"rot"),t=chunk3R7QHNI5_js.j(e,null,"flipH")==="1",i=chunk3R7QHNI5_js.j(e,null,"flipV")==="1",o=me(n);if(o===void 0&&!t&&!i)return;let r={};return o!==void 0&&(r.rotation=o),t&&(r.flipH=true),i&&(r.flipV=true),r}function oe(e){let n=chunk3R7QHNI5_js.h(e,"a:graphic");if(!n)return {blipFill:null,blip:null};let t=chunk3R7QHNI5_js.h(n,"a:graphicData");if(!t)return {blipFill:null,blip:null};let i=chunk3R7QHNI5_js.h(t,"pic:pic");if(!i)return {blipFill:null,blip:null};let o=chunk3R7QHNI5_js.h(i,"pic:blipFill");return o?{blipFill:o,blip:chunk3R7QHNI5_js.h(o,"a:blip")}:{blipFill:null,blip:null}}function le(e){if(!e)return;let n=chunk3R7QHNI5_js.h(e,"a:srcRect");if(!n)return;let t=s=>{let c=chunk3R7QHNI5_js.l(n,null,s);if(!(c===void 0||c===0))return c/1e5},i=t("l"),o=t("t"),r=t("r"),l=t("b");if(i===void 0&&o===void 0&&r===void 0&&l===void 0)return;let u={};return i!==void 0&&(u.left=i),o!==void 0&&(u.top=o),r!==void 0&&(u.right=r),l!==void 0&&(u.bottom=l),u}function ae(e){if(!e)return;let n=chunk3R7QHNI5_js.h(e,"a:alphaModFix");if(!n)return;let t=chunk3R7QHNI5_js.l(n,null,"amt");if(!(t===void 0||t>=1e5))return Math.max(0,Math.min(1,t/1e5))}function se(e){if(!e)return "";let n=chunk3R7QHNI5_js.j(e,"r","embed");if(n)return n;let t=chunk3R7QHNI5_js.j(e,null,"embed");if(t)return t;let i=chunk3R7QHNI5_js.j(e,"r","link");return i||""}function ue(e){let n=chunk3R7QHNI5_js.h(e,"a:graphic");if(!n)return null;let t=chunk3R7QHNI5_js.h(n,"a:graphicData");if(!t)return null;let i=chunk3R7QHNI5_js.h(t,"pic:pic");if(!i)return null;let o=chunk3R7QHNI5_js.h(i,"pic:spPr");return o?chunk3R7QHNI5_js.h(o,"a:xfrm"):null}function xe(e){if(!e)return e;let n=e.replace(/^\/+/,"");return n.startsWith("media/")?n=`word/${n}`:n.startsWith("word/")||(n=`word/${n}`),n}function he(e){let n=e.split(".").pop()?.toLowerCase()??"";return {png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",tif:"image/tiff",webp:"image/webp",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf"}[n]??"application/octet-stream"}function de(e,n,t){if(!e||!n)return {};let i=n.get(e);if(!i)return {};let o=i.target;if(!o)return {};let r=xe(o),l=o.split("/").pop(),u=(s,c)=>{let m=c.toLowerCase();for(let[g,p]of s.entries())if(g.toLowerCase()===m)return p};if(t){let s=u(t,r);if(s)return {src:s.dataUrl||s.base64,mimeType:s.mimeType,filename:l};let c=o.replace(/^\/+/,""),m=u(t,c);if(m)return {src:m.dataUrl||m.base64,mimeType:m.mimeType,filename:l};let g=`word/${c}`,p=u(t,g);if(p)return {src:p.dataUrl||p.base64,mimeType:p.mimeType,filename:l}}return {mimeType:he(o),filename:l}}function Te(e,n,t){let i=chunk3R7QHNI5_js.h(e,"wp:extent"),o=ne(i),r=chunk3R7QHNI5_js.h(e,"wp:effectExtent"),l=te(r),u=chunk3R7QHNI5_js.h(e,"wp:docPr"),s=ie(u),{blip:c,blipFill:m}=oe(e),g=se(c),p=le(m),T=ae(c),b=de(g,n,t),C=ue(e),P=re(C),v=chunk3R7QHNI5_js.l(e,null,"distT")??void 0,B=chunk3R7QHNI5_js.l(e,null,"distB")??void 0,E=chunk3R7QHNI5_js.l(e,null,"distL")??void 0,y=chunk3R7QHNI5_js.l(e,null,"distR")??void 0,x={type:"inline"};v!==void 0&&(x.distT=v),B!==void 0&&(x.distB=B),E!==void 0&&(x.distL=E),y!==void 0&&(x.distR=y);let h={type:"image",rId:g,size:o,wrap:x};if(s.id&&(h.id=s.id),s.alt&&(h.alt=s.alt),s.title&&(h.title=s.title),s.decorative&&(h.decorative=true),b.src&&(h.src=b.src),b.mimeType&&(h.mimeType=b.mimeType),b.filename&&(h.filename=b.filename),l&&(h.padding=l),P&&(h.transform=P),p&&(h.crop=p),T!==void 0&&(h.opacity=T),s.hlinkRId&&n){let X=chunkZ3LGMBJC_js.d(n,s.hlinkRId);X&&(h.hlinkHref=X);}return h}function be(e,n,t){let i=chunk3R7QHNI5_js.h(e,"wp:extent"),o=ne(i),r=chunk3R7QHNI5_js.h(e,"wp:effectExtent"),l=te(r),u=chunk3R7QHNI5_js.h(e,"wp:docPr"),s=ie(u),c=chunk3R7QHNI5_js.j(e,null,"behindDoc")==="1",m=chunk3R7QHNI5_js.j(e,null,"layoutInCell"),g=m===null?void 0:m==="1",p=chunk3R7QHNI5_js.j(e,null,"allowOverlap"),T=p===null?void 0:p==="1",b={distT:chunk3R7QHNI5_js.l(e,null,"distT")??void 0,distB:chunk3R7QHNI5_js.l(e,null,"distB")??void 0,distL:chunk3R7QHNI5_js.l(e,null,"distL")??void 0,distR:chunk3R7QHNI5_js.l(e,null,"distR")??void 0},C=ge(e,W),P=D(C,c,b),v=chunk3R7QHNI5_js.h(e,"wp:positionH"),B=chunk3R7QHNI5_js.h(e,"wp:positionV"),E=L(v),y=z(B),x;(E||y)&&(x={horizontal:E??{relativeTo:"column"},vertical:y??{relativeTo:"paragraph"}});let{blip:h,blipFill:X}=oe(e),V=se(h),_=le(X),U=ae(h),M=de(V,n,t),fe=ue(e),j=re(fe),I={type:"image",rId:V,size:o,wrap:P};if(s.id&&(I.id=s.id),s.alt&&(I.alt=s.alt),s.title&&(I.title=s.title),s.decorative&&(I.decorative=true),M.src&&(I.src=M.src),M.mimeType&&(I.mimeType=M.mimeType),M.filename&&(I.filename=M.filename),x&&(I.position=x),l&&(I.padding=l),j&&(I.transform=j),_&&(I.crop=_),U!==void 0&&(I.opacity=U),g!==void 0&&(I.layoutInCell=g),T!==void 0&&(I.allowOverlap=T),s.hlinkRId&&n){let q=chunkZ3LGMBJC_js.d(n,s.hlinkRId);q&&(I.hlinkHref=q);}return I}function we(e,n,t){if(ee(e))return null;let i=chunk3R7QHNI5_js.i(e);for(let o of i){let r=o.name||"";if(r==="wp:inline"||r==="wp:anchor")return r==="wp:inline"?Te(o,n,t):be(o,n,t)}return null}function Qe(e,n,t){return we(e,n,t)}function Ye(e){return e.wrap.type==="inline"}function Ze(e){return e.wrap.type!=="inline"}function en(e){return e.wrap.type==="behind"}function nn(e){return e.wrap.type==="inFront"}function tn(e){return chunk4Q2IP5FW_js.e(e.size.width)}function rn(e){return chunk4Q2IP5FW_js.e(e.size.height)}function on(e){return e.decorative===true}function ln(e){return {top:chunk4Q2IP5FW_js.e(e.wrap.distT),bottom:chunk4Q2IP5FW_js.e(e.wrap.distB),left:chunk4Q2IP5FW_js.e(e.wrap.distL),right:chunk4Q2IP5FW_js.e(e.wrap.distR)}}exports.A=Ye;exports.B=Ze;exports.C=en;exports.D=nn;exports.E=tn;exports.F=rn;exports.G=on;exports.H=ln;exports.a=K;exports.b=N;exports.c=Q;exports.d=Y;exports.e=H;exports.f=ve;exports.g=Be;exports.h=ee;exports.i=Ce;exports.j=Me;exports.k=Re;exports.l=Xe;exports.m=ke;exports.n=Ae;exports.o=Oe;exports.p=Ne;exports.q=Se;exports.r=Le;exports.s=ze;exports.t=We;exports.u=De;exports.v=He;exports.w=Ve;exports.x=_e;exports.y=we;exports.z=Qe;
|