@zeke-02/docx-editor 0.5.2 → 0.5.3
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/LICENSE +204 -0
- package/dist/FindReplaceDialog-7SQOVQWH.js +1 -0
- package/dist/FindReplaceDialog-RK3A7MSK.mjs +1 -0
- package/dist/{FootnotePropertiesDialog-XQ7NIFIU.js → FootnotePropertiesDialog-2Q2SHVMR.js} +1 -1
- package/dist/{FootnotePropertiesDialog-TNVJJCY6.mjs → FootnotePropertiesDialog-ZKQXW3YO.mjs} +1 -1
- package/dist/{HyperlinkDialog-FR4IZZ7E.mjs → HyperlinkDialog-QV3CVFQU.mjs} +1 -1
- package/dist/HyperlinkDialog-XVAF7FVN.js +1 -0
- package/dist/{ImagePositionDialog-JSZSIKF5.mjs → ImagePositionDialog-EGRH3HPP.mjs} +1 -1
- package/dist/{ImagePositionDialog-2YXRAGZS.js → ImagePositionDialog-HIVHUTBT.js} +1 -1
- package/dist/ImagePropertiesDialog-67WLFIIZ.mjs +1 -0
- package/dist/ImagePropertiesDialog-HSM3JJ22.js +1 -0
- package/dist/KeyboardShortcutsDialog-5D_FoAp6.d.ts +395 -0
- package/dist/KeyboardShortcutsDialog-D7ihAj18.d.mts +395 -0
- package/dist/PageSetupDialog-642IAVG2.js +1 -0
- package/dist/PageSetupDialog-ERUQDHAY.mjs +1 -0
- package/dist/{SplitCellDialog-NP3JJYHD.mjs → SplitCellDialog-GFWCFCTD.mjs} +1 -1
- package/dist/{SplitCellDialog-JIAC3RYV.js → SplitCellDialog-M7WF7ANE.js} +1 -1
- package/dist/{TablePropertiesDialog-TIK4AA5M.mjs → TablePropertiesDialog-TZ7VCL6V.mjs} +1 -1
- package/dist/{TablePropertiesDialog-T7D4HSVP.js → TablePropertiesDialog-ZKU2FTUX.js} +1 -1
- package/dist/agentApi-C41hiW-n.d.mts +486 -0
- package/dist/agentApi-D4AZmNfB.d.ts +486 -0
- package/dist/chunk-2XXILKEQ.js +1 -0
- package/dist/chunk-35DG3R42.js +2 -0
- package/dist/chunk-47VJOBJD.mjs +60 -0
- package/dist/chunk-5UX5CD4C.js +1 -0
- package/dist/chunk-7QQSDIWK.mjs +2 -0
- package/dist/chunk-AW5TISUL.js +3 -0
- package/dist/chunk-AYMGSTNG.js +1 -0
- package/dist/chunk-B45ECEGY.js +18 -0
- package/dist/chunk-B7CCL7SL.mjs +2 -0
- package/dist/chunk-BRMTZRLJ.js +2 -0
- package/dist/chunk-D47GTKGU.js +2 -0
- package/dist/chunk-E6MQXELR.js +1 -0
- package/dist/chunk-F5SERL7X.mjs +2 -0
- package/dist/chunk-FWPVBFKQ.mjs +1 -0
- package/dist/chunk-GGQK26JO.js +2 -0
- package/dist/chunk-GM2S2WMT.mjs +1 -0
- package/dist/chunk-ILYKDR3C.js +1 -0
- package/dist/chunk-IP5NAYHL.js +60 -0
- package/dist/chunk-JPF5R2ZM.mjs +1 -0
- package/dist/chunk-KOXCF3CL.mjs +1 -0
- package/dist/chunk-KRLNX56Y.mjs +2 -0
- package/dist/chunk-LUJ6HCMH.mjs +1 -0
- package/dist/chunk-MKNSJOCN.js +70 -0
- package/dist/chunk-NIBCC7WQ.js +1 -0
- package/dist/chunk-NLFXR2VH.js +2 -0
- package/dist/chunk-ONIYA2FU.mjs +2 -0
- package/dist/chunk-ONNHQWAX.mjs +1 -0
- package/dist/chunk-RCIZ7OM3.mjs +70 -0
- package/dist/{chunk-EHFEG3TX.js → chunk-SNZ57XBI.js} +1 -1
- package/dist/chunk-SOTWG3KJ.mjs +1 -0
- package/dist/chunk-TYPGB4KF.js +1 -0
- package/dist/chunk-U7ZW2DOO.mjs +2 -0
- package/dist/{chunk-PKEOQIQO.mjs → chunk-WPI3YRFO.mjs} +1 -1
- package/dist/chunk-XQZTWWRF.mjs +18 -0
- package/dist/chunk-ZVAFVHWR.mjs +3 -0
- package/dist/chunk-ZXPCJWVY.js +2 -0
- package/dist/{agentApi-DLt94vXk.d.mts → content-B2MzIMwA.d.mts} +8 -755
- package/dist/{agentApi-DLt94vXk.d.ts → content-B2MzIMwA.d.ts} +8 -755
- package/dist/dialogs.d.mts +25 -0
- package/dist/dialogs.d.ts +25 -0
- package/dist/dialogs.js +1 -0
- package/dist/dialogs.mjs +1 -0
- package/dist/document-DZ_ZeZEH.d.ts +294 -0
- package/dist/document-Di1qGqLS.d.mts +294 -0
- package/dist/executor-EPEB53SJ.js +1 -0
- package/dist/executor-TVJ6K6MW.mjs +1 -0
- package/dist/findReplace-CpIoILbP.d.mts +138 -0
- package/dist/findReplace-pkMskVJU.d.ts +138 -0
- package/dist/hooks.d.mts +598 -0
- package/dist/hooks.d.ts +598 -0
- package/dist/hooks.js +1 -0
- package/dist/hooks.mjs +1 -0
- package/dist/index.d.mts +1013 -483
- package/dist/index.d.ts +1013 -483
- package/dist/index.js +40 -120
- package/dist/index.mjs +40 -120
- package/dist/layout-bridge-5GYGYKM5.mjs +1 -0
- package/dist/layout-bridge-QQDA7ELH.js +1 -0
- package/dist/plugin-api.d.mts +176 -0
- package/dist/plugin-api.d.ts +176 -0
- package/dist/plugin-api.js +260 -0
- package/dist/plugin-api.mjs +260 -0
- package/dist/processTemplate-BTBTR7AM.js +1 -0
- package/dist/{processTemplate-W2C5PXZB.mjs → processTemplate-MBX2KDLE.mjs} +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.d.mts +18 -0
- package/dist/styles.d.ts +18 -0
- package/dist/styles.js +1 -0
- package/dist/styles.mjs +1 -0
- package/dist/types-Bd_YzkhG.d.mts +281 -0
- package/dist/types-Bd_YzkhG.d.ts +281 -0
- package/dist/types-CkfDgB0O.d.mts +39 -0
- package/dist/types-DZUhB7Ao.d.mts +18 -0
- package/dist/types-DZUhB7Ao.d.ts +18 -0
- package/dist/types-DcxHFUSc.d.ts +39 -0
- package/dist/ui.d.mts +111 -552
- package/dist/ui.d.ts +111 -552
- package/dist/ui.js +111 -1
- package/dist/ui.mjs +111 -1
- package/dist/useFindReplace-DDs533b-.d.mts +261 -0
- package/dist/useFindReplace-eyhMSZZf.d.ts +261 -0
- package/package.json +41 -43
- package/dist/ClipboardManager-CVKX0v9q.d.ts +0 -464
- package/dist/ClipboardManager-V3aaMnWE.d.mts +0 -464
- package/dist/DocumentAgent-BWflKHpH.d.mts +0 -442
- package/dist/DocumentAgent-DsdXtetF.d.ts +0 -442
- package/dist/FindReplaceDialog-L3YF5HIS.mjs +0 -1
- package/dist/FindReplaceDialog-SEBWC5P7.js +0 -1
- package/dist/HyperlinkDialog-WEK6JSAC.js +0 -1
- package/dist/ImagePropertiesDialog-527MFLQO.mjs +0 -1
- package/dist/ImagePropertiesDialog-HG4K3IE7.js +0 -1
- package/dist/PageSetupDialog-GALVJMUB.js +0 -1
- package/dist/PageSetupDialog-TGQIAMI7.mjs +0 -1
- package/dist/TableToolbar-DUgmob2I.d.ts +0 -1273
- package/dist/TableToolbar-YL74HNS1.d.mts +0 -1273
- package/dist/chunk-23SXXIZS.js +0 -111
- package/dist/chunk-3F52AP2Q.js +0 -1
- package/dist/chunk-42O5GXM5.mjs +0 -82
- package/dist/chunk-54ULJEHM.mjs +0 -1
- package/dist/chunk-5XK326FI.mjs +0 -1
- package/dist/chunk-6WPRCJ5A.mjs +0 -1
- package/dist/chunk-76IYR7C7.mjs +0 -1
- package/dist/chunk-AGRIVA4G.js +0 -1
- package/dist/chunk-BTCQ2QI3.mjs +0 -3
- package/dist/chunk-BUEMG4NW.js +0 -1
- package/dist/chunk-BXRC4U3X.mjs +0 -2
- package/dist/chunk-CPAYKE6X.mjs +0 -1
- package/dist/chunk-DACWLFKI.mjs +0 -1
- package/dist/chunk-EPBFWE36.js +0 -2
- package/dist/chunk-FXES3YDB.js +0 -82
- package/dist/chunk-HI66BSGS.mjs +0 -9
- package/dist/chunk-INTPVEO6.mjs +0 -9
- package/dist/chunk-IOAGVW6Q.mjs +0 -2
- package/dist/chunk-JCEWC5QL.mjs +0 -4
- package/dist/chunk-JTIUFACT.js +0 -1
- package/dist/chunk-LUF7PWIC.js +0 -10
- package/dist/chunk-MGEN6GOE.mjs +0 -2
- package/dist/chunk-MOE2ZGUE.js +0 -18
- package/dist/chunk-MWLHJWB6.js +0 -9
- package/dist/chunk-OFYVDN3U.mjs +0 -2
- package/dist/chunk-P4VSHBGZ.js +0 -2
- package/dist/chunk-P5FQHIES.mjs +0 -1
- package/dist/chunk-PBC7XAYZ.js +0 -3
- package/dist/chunk-PEMB6SZT.js +0 -2
- package/dist/chunk-PQMSZTBB.js +0 -9
- package/dist/chunk-Q7UDQXAF.js +0 -1
- package/dist/chunk-QGTAIC5E.js +0 -1
- package/dist/chunk-QVPR2W5S.js +0 -1
- package/dist/chunk-R3QMYPL5.mjs +0 -59
- package/dist/chunk-RBUTXXQJ.mjs +0 -18
- package/dist/chunk-RRWYZ2TS.mjs +0 -111
- package/dist/chunk-S3STEPVO.js +0 -182
- package/dist/chunk-SFUM35DH.js +0 -2
- package/dist/chunk-SNLC6EK2.js +0 -1
- package/dist/chunk-TMTLIGLZ.js +0 -59
- package/dist/chunk-TSE2PWFX.mjs +0 -10
- package/dist/chunk-UKESXQS5.mjs +0 -182
- package/dist/chunk-UWYD42WV.js +0 -4
- package/dist/chunk-UXVACQCY.mjs +0 -1
- package/dist/chunk-W4EIKDM6.mjs +0 -2
- package/dist/chunk-W53SI3XW.mjs +0 -1
- package/dist/chunk-WNS2RBQD.js +0 -2
- package/dist/chunk-Z3KMSHUP.js +0 -1
- package/dist/core-plugins-reexport.d.mts +0 -31
- package/dist/core-plugins-reexport.d.ts +0 -31
- package/dist/core-plugins-reexport.js +0 -1
- package/dist/core-plugins-reexport.mjs +0 -1
- package/dist/core-reexport.d.mts +0 -340
- package/dist/core-reexport.d.ts +0 -340
- package/dist/core-reexport.js +0 -1
- package/dist/core-reexport.mjs +0 -1
- package/dist/documentSerializer-DtS_-oGA.d.mts +0 -664
- package/dist/documentSerializer-Wj1p2ASa.d.ts +0 -664
- package/dist/executor-C3VXF7QA.mjs +0 -1
- package/dist/executor-GDBV3AGV.js +0 -1
- package/dist/headless-reexport.d.mts +0 -197
- package/dist/headless-reexport.d.ts +0 -197
- package/dist/headless-reexport.js +0 -1
- package/dist/headless-reexport.mjs +0 -1
- package/dist/insertOperations-BTH1Asas.d.mts +0 -176
- package/dist/insertOperations-CbUnXAXH.d.ts +0 -176
- package/dist/layout-bridge-EA4DJ227.js +0 -1
- package/dist/layout-bridge-XDPSO6GO.mjs +0 -1
- package/dist/mcp-reexport.d.mts +0 -156
- package/dist/mcp-reexport.d.ts +0 -156
- package/dist/mcp-reexport.js +0 -16
- package/dist/mcp-reexport.mjs +0 -16
- package/dist/processTemplate-MJ2PCSO5.js +0 -1
- package/dist/react-B0W16SV6.d.ts +0 -1330
- package/dist/react-D0Pn1nww.d.mts +0 -1330
- package/dist/react.css +0 -1
- package/dist/react.d.mts +0 -10
- package/dist/react.d.ts +0 -10
- package/dist/react.js +0 -1
- package/dist/react.mjs +0 -1
- package/dist/registry-CH9V-IX0.d.ts +0 -165
- package/dist/registry-CWBKYlNW.d.mts +0 -165
- package/dist/types-UDsUq8D3.d.mts +0 -310
- package/dist/types-jbivc9Lj.d.ts +0 -310
- package/dist/variableDetector-CdQ7ZTzA.d.mts +0 -204
- package/dist/variableDetector-DsRV3A9z.d.ts +0 -204
- package/i18n/de.json +0 -792
- package/i18n/en.json +0 -792
- package/i18n/he.json +0 -792
- package/i18n/pl.json +0 -792
- package/i18n/pt-BR.json +0 -792
- package/i18n/tr.json +0 -792
- package/i18n/zh-CN.json +0 -792
- /package/dist/{chunk-YC5KZSYD.js → chunk-ESZ6JRTW.js} +0 -0
- /package/dist/{chunk-LVGJKS7Y.mjs → chunk-TZMMD6RR.mjs} +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';var S={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"};function T(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let r=t.getRangeAt(0);if(e&&!e.contains(r.commonAncestorContainer))return [];let n=r.getClientRects(),o=[],c=0,l=0;if(e){let a=e.getBoundingClientRect();c=a.left+e.scrollLeft,l=a.top+e.scrollTop;}for(let a=0;a<n.length;a++){let s=n[a];s.width===0&&s.height===0||o.push({left:s.left-c,top:s.top-l,width:s.width,height:s.height});}return o}function R(e,t=2){if(e.length<=1)return e;let r=[...e].sort((c,l)=>Math.abs(c.top-l.top)<t?c.left-l.left:c.top-l.top),n=[],o={...r[0]};for(let c=1;c<r.length;c++){let l=r[c],a=Math.abs(l.top-o.top)<t,s=l.left<=o.left+o.width+t;if(a&&s){let g=Math.max(o.left+o.width,l.left+l.width);o.width=g-o.left,o.height=Math.max(o.height,l.height);}else n.push(o),o={...l};}return n.push(o),n}function y(e){let t=T(e);return R(t)}function A(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function k(){let e=window.getSelection();return e?e.toString():""}function N(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let r=t.getRangeAt(0);return e.contains(r.commonAncestorContainer)}var d=null;function I(e=S){w();let t=`
|
|
2
|
+
/* DOCX Editor Selection Highlighting */
|
|
3
|
+
|
|
4
|
+
/* Base selection style for all editable content */
|
|
5
|
+
.docx-editor [contenteditable="true"]::selection,
|
|
6
|
+
.docx-editor [contenteditable="true"] *::selection,
|
|
7
|
+
.docx-run-editable::selection,
|
|
8
|
+
.docx-run-editable *::selection {
|
|
9
|
+
background-color: ${e.backgroundColor} !important;
|
|
10
|
+
color: inherit !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Firefox selection */
|
|
14
|
+
.docx-editor [contenteditable="true"]::-moz-selection,
|
|
15
|
+
.docx-editor [contenteditable="true"] *::-moz-selection,
|
|
16
|
+
.docx-run-editable::-moz-selection,
|
|
17
|
+
.docx-run-editable *::-moz-selection {
|
|
18
|
+
background-color: ${e.backgroundColor} !important;
|
|
19
|
+
color: inherit !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Ensure selection is visible against all backgrounds */
|
|
23
|
+
.docx-run-highlighted::selection,
|
|
24
|
+
.docx-run-highlighted *::selection {
|
|
25
|
+
/* For highlighted (yellow background) text, use darker selection */
|
|
26
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.docx-run-highlighted::-moz-selection,
|
|
30
|
+
.docx-run-highlighted *::-moz-selection {
|
|
31
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Selection in dark text */
|
|
35
|
+
.docx-run-dark-bg::selection,
|
|
36
|
+
.docx-run-dark-bg *::selection {
|
|
37
|
+
/* Use lighter selection for dark backgrounds */
|
|
38
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.docx-run-dark-bg::-moz-selection,
|
|
42
|
+
.docx-run-dark-bg *::-moz-selection {
|
|
43
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Programmatic highlight class */
|
|
47
|
+
.docx-selection-highlight {
|
|
48
|
+
background-color: ${e.backgroundColor};
|
|
49
|
+
${e.borderRadius?`border-radius: ${e.borderRadius}px;`:""}
|
|
50
|
+
${e.mixBlendMode?`mix-blend-mode: ${e.mixBlendMode};`:""}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Find/replace highlight */
|
|
54
|
+
.docx-find-highlight {
|
|
55
|
+
background-color: rgba(255, 235, 59, 0.5);
|
|
56
|
+
border-radius: 2px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.docx-find-highlight-current {
|
|
60
|
+
background-color: rgba(255, 152, 0, 0.6);
|
|
61
|
+
border-radius: 2px;
|
|
62
|
+
outline: 2px solid rgba(255, 152, 0, 0.8);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* AI action selection preview */
|
|
66
|
+
.docx-ai-selection-preview {
|
|
67
|
+
background-color: rgba(156, 39, 176, 0.2);
|
|
68
|
+
border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
|
|
69
|
+
}
|
|
70
|
+
`;d=document.createElement("style"),d.id="docx-selection-styles",d.textContent=t,document.head.appendChild(d);}function w(){d&&(d.remove(),d=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function P(){return d!==null||document.getElementById("docx-selection-styles")!==null}function E(e,t,r){let n=0;for(let o=t;o<t+r&&o<e.length;o++)n+=e[o];return n}function v(e,t,r,n){let o=E(e,t,r),c=Math.floor(o/Math.max(n,1)),l=o-c*n,a=Array.from({length:n},(s,g)=>c+(g<l?1:0));return [...e.slice(0,t),...a,...e.slice(t+r)]}function H(e,t,r,n,o,c){let l=r-t.rowspan,a=n-t.colspan,s=o+l,g=t.row+t.rowspan,x=t.col+t.colspan,p=[];for(let i of e){if(i===t)continue;let u=i.row+i.rowspan,f=i.col+i.colspan,b=i.row<g&&u>t.row,C=i.col<x&&f>t.col;p.push({data:i.data,row:i.row>=g?i.row+l:i.row,col:i.col>=x?i.col+a:i.col,rowspan:i.rowspan+(l>0&&b&&!C?l:0),colspan:i.colspan+(a>0&&C&&!b?a:0)});}for(let i=0;i<r;i++)for(let u=0;u<n;u++){let f=i===0&&u===0;p.push({data:c(f,i,u),row:t.row+i,col:t.col+u,rowspan:1,colspan:1});}return {anchors:p,deltaRows:l,deltaCols:a,newRowCount:s}}function M(e){let t=new Map,r=new Map;for(let n of e){t.set(`${n.row}-${n.col}`,n);for(let o=n.row;o<n.row+n.rowspan;o++)for(let c=n.col;c<n.col+n.colspan;c++)r.set(`${o}-${c}`,n);}return {byStart:t,byCoveredSlot:r}}function O(e,t){let r=e>1||t>1;return {minRows:e,minCols:t,initialRows:e,initialCols:r?t:t+1}}var B=/[\p{L}\p{N}\p{M}_''\-]/u,W=/\s/;function m(e){return !e||e.length===0?false:B.test(e)}function h(e){return !e||e.length===0?false:W.test(e)}function D(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let r=e[t];if(h(r)){let n=t,o=t;for(;n>0&&h(e[n-1]);)n--;for(;o<e.length&&h(e[o]);)o++;return [n,o]}if(m(r)){let n=t,o=t;for(;n>0&&m(e[n-1]);)n--;for(;o<e.length&&m(e[o]);)o++;return [n,o]}return [t,t+1]}async function _(e){let t=e.target;if(!t||!t.files)return null;let r=t.files[0];return t.value="",r?{buffer:await r.arrayBuffer(),name:r.name.replace(/\.docx$/i,"")}:null}exports.a=S;exports.b=y;exports.c=A;exports.d=k;exports.e=N;exports.f=I;exports.g=P;exports.h=E;exports.i=v;exports.j=H;exports.k=M;exports.l=O;exports.m=D;exports.n=_;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var react=require('react');function p(){let[l,r]=react.useState(""),[a,u]=react.useState(""),[t,d]=react.useState(true),s=react.useRef(null),h=react.useCallback((n,e)=>{r(n??""),u(e??""),s.current=n&&e?n/e:null,d(true);},[]),m=react.useCallback(n=>{let e=n===""?"":Math.max(1,Number(n)||0);r(e);let o=s.current;t&&o&&typeof e=="number"&&u(Math.round(e/o));},[t]),b=react.useCallback(n=>{let e=n===""?"":Math.max(1,Number(n)||0);u(e);let o=s.current;t&&o&&typeof e=="number"&&r(Math.round(e*o));},[t]);return {width:l,height:a,lockAspect:t,setLockAspect:d,handleWidthChange:m,handleHeightChange:b,seed:h}}exports.a=p;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var g={_lang:"en",common:{cancel:"Cancel",insert:"Insert",apply:"Apply",close:"Close",delete:"Delete",update:"Update",save:"Save",retry:"Retry",send:"Send",edit:"Edit",comment:"Comment",reply:"Reply",accept:"Accept",reject:"Reject",dismiss:"Dismiss",change:"Change",clear:"Clear",px:"px",closeDialog:"Close dialog"},toolbar:{ariaLabel:"Formatting toolbar",file:"File",format:"Format",insert:"Insert",open:"Open",openShortcut:"Ctrl+O",save:"Save",saveShortcut:"Ctrl+S",print:"Print",printShortcut:"Ctrl+P",pageSetup:"Page setup",leftToRight:"Left-to-right text",rightToLeft:"Right-to-left text",image:"Image",table:"Table",pageBreak:"Page break",tableOfContents:"Table of contents",symbol:"Symbol",help:"Help",reportIssue:"Report issue"},formattingBar:{groups:{history:"History",zoom:"Zoom",styles:"Styles",font:"Font",textFormatting:"Text formatting",script:"Script",alignment:"Alignment",listFormatting:"List formatting",image:"Image",table:"Table"},undo:"Undo",undoShortcut:"Undo (Ctrl+Z)",redo:"Redo",redoShortcut:"Redo (Ctrl+Y)",bold:"Bold",boldShortcut:"Bold (Ctrl+B)",italic:"Italic",italicShortcut:"Italic (Ctrl+I)",underline:"Underline",underlineShortcut:"Underline (Ctrl+U)",strikethrough:"Strikethrough",fontColor:"Font Color",highlightColor:"Text Highlight Color",insertLink:"Insert link",insertLinkShortcut:"Insert link (Ctrl+K)",superscript:"Superscript",superscriptShortcut:"Superscript (Ctrl+Shift+=)",subscript:"Subscript",subscriptShortcut:"Subscript (Ctrl+=)",imageProperties:"Image properties",imagePropertiesShortcut:"Image properties (alt text, border)...",clearFormatting:"Clear formatting"},alignment:{alignLeft:"Align Left",alignLeftShortcut:"Ctrl+L",center:"Center",centerShortcut:"Ctrl+E",alignRight:"Align Right",alignRightShortcut:"Ctrl+R",justify:"Justify",justifyShortcut:"Ctrl+J"},lists:{ariaLabel:"List formatting",typeAriaLabel:"List type",indentationAriaLabel:"List indentation",bulletList:"Bullet List",numberedList:"Numbered List",decreaseIndent:"Decrease Indent",increaseIndent:"Increase Indent"},lineSpacing:{single:"Single",double:"Double",lineSpacingTitle:"Line spacing: {label}",paragraphSpacing:"Paragraph spacing"},styles:{selectAriaLabel:"Select paragraph style",normalText:"Normal text",title:"Title",subtitle:"Subtitle",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3"},font:{selectAriaLabel:"Select font family",sansSerif:"Sans Serif",serif:"Serif",monospace:"Monospace"},fontSize:{decrease:"Decrease font size",increase:"Increase font size",label:"Font size",listLabel:"Font sizes"},zoom:{ariaLabel:"Zoom: {label}"},colorPicker:{ariaLabel:"{type} color picker",highlightColors:"Highlight Colors",customColor:"Custom Color",noColor:"No Color",automatic:"Automatic",themeColors:"Theme Colors",standardColors:"Standard Colors",colors:{black:"Black",darkRed:"Dark Red",red:"Red",orange:"Orange",yellow:"Yellow",darkYellow:"Dark Yellow",green:"Green",darkGreen:"Dark Green",teal:"Teal",darkTeal:"Dark Teal",blue:"Blue",darkBlue:"Dark Blue",purple:"Purple",darkPurple:"Dark Purple",brown:"Brown",grey50:"Grey 50%",grey25:"Grey 25%",grey10:"Grey 10%",white:"White",lightRed:"Light Red",lightOrange:"Light Orange",lightYellow:"Light Yellow",lightGreen:"Light Green",lightBlue:"Light Blue",lightPurple:"Light Purple",pink:"Pink",rose:"Rose",gold:"Gold",aqua:"Aqua",lavender:"Lavender",silver:"Silver",darkOrange:"Dark Orange",darkGray:"Dark Gray",gray:"Gray",cyan:"Cyan",magenta:"Magenta",paleGreen:"Pale Green",lightCyan:"Light Cyan",skyBlue:"Sky Blue",lightBlue2:"Light Blue 2",lightMagenta:"Light Magenta",brightGreen:"Bright Green",violet:"Violet"}},dialogs:{findReplace:{titleFind:"Find",titleFindReplace:"Find and Replace",findLabel:"Find:",findPlaceholder:"Enter text to find...",findAriaLabel:"Find text",findPrevious:"Find previous",findPreviousTitle:"Find Previous (Shift+Enter)",findNext:"Find next",findNextTitle:"Find Next (Enter)",matchCount:"{current} of {total} matches",noResults:"No results found",replaceLabel:"Replace:",replacePlaceholder:"Enter replacement text...",replaceAriaLabel:"Replace text",replaceButton:"Replace",replaceCurrentTitle:"Replace current match",replaceAllButton:"Replace All",replaceAllTitle:"Replace all matches",matchCase:"Match case",wholeWords:"Whole words",matchesFound:"{total} matches",toggleReplace:"+ Replace"},hyperlink:{titleEdit:"Edit Hyperlink",titleInsert:"Insert Hyperlink",tabWebAddress:"Web Address",tabBookmark:"Bookmark",urlLabel:"URL",urlPlaceholder:"https://example.com",urlHint:"Enter a web address, email (mailto:), or phone (tel:)",bookmarkLabel:"Bookmark",bookmarkPlaceholder:"Select a bookmark...",displayTextLabel:"Display Text",displayTextPlaceholder:"Text to display (optional)",displayTextHint:"Leave empty to use the selected text",tooltipLabel:"Tooltip (optional)",tooltipPlaceholder:"Text shown on hover",removeLink:"Remove Link",invalidUrl:"Please enter a valid URL",urlRequired:"URL is required"},insertTable:{title:"Insert Table",hoverToSelect:"Hover to select size",tableSize:"{cols} x {rows} Table",orSpecifySize:"or specify size",rowsLabel:"Rows:",columnsLabel:"Columns:",insertButton:"Insert Table",sizeSelector:"Table size selector",columnWidthLabel:"Column width",fixedWidth:"Fixed",autofit:"Auto-fit to contents",tableStyleLabel:"Table style",validationHint:"Rows: {minRows}-{maxRows}, Columns: {minCols}-{maxCols}"},splitCell:{title:"Split Cell",description:"Set how many rows and columns to split the selected cell into.",rowsLabel:"Rows:",columnsLabel:"Columns:",currentMinimum:"Minimum from current span: {rows} row(s) x {cols} column(s)",minValue:"Use at least {rows} row(s) and {cols} column(s).",notOneByOne:"Choose at least two resulting cells."},insertImage:{title:"Insert Image",uploadAriaLabel:"Click or drag to upload image",uploadText:"Click to select or drag and drop an image",uploadSubtext:"PNG, JPG, GIF up to 10MB",dimensions:"Dimensions",widthLabel:"Width:",heightLabel:"Height:",aspectRatioLocked:"Aspect ratio locked",aspectRatioUnlocked:"Aspect ratio unlocked",altTextLabel:"Alt Text (optional)",altTextPlaceholder:"Describe the image for accessibility",insertButton:"Insert Image",invalidFile:"Please select a valid image file",fileTooLarge:"Image file is too large (max 10MB)",readFailed:"Failed to read image file",loadFailed:"Failed to load image",preview:"Preview"},insertSymbol:{title:"Insert Symbol",searchPlaceholder:"Search symbols (character or Unicode)...",noResultsEmpty:"No symbols found",noResults:'No symbols found for "{query}"',decimal:"Decimal: {value}",recent:"Recent:",categories:{common:"Common",arrows:"Arrows",math:"Math",greek:"Greek",shapes:"Shapes",punctuation:"Punctuation",currency:"Currency",music:"Music",emoji:"Emoji"}},imageProperties:{title:"Image Properties",altText:"Alt Text",altTextPlaceholder:"Describe this image for accessibility...",border:"Border",width:"Width",style:"Style",color:"Color",preview:"Preview",textWrapping:"Text wrapping",dimensions:"Dimensions",widthLabel:"Width:",heightLabel:"Height:",lockAspectRatio:"Lock aspect ratio",wrapOptions:{inline:"Inline with text",wrapRight:"Wrap text, float left",wrapLeft:"Wrap text, float right",topAndBottom:"Top and bottom",behind:"Behind text",inFront:"In front of text"},borderStyles:{solid:"Solid",dashed:"Dashed",dotted:"Dotted",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"}},imagePosition:{title:"Image Position",horizontal:"Horizontal",vertical:"Vertical",position:"Position",alignment:"Alignment",offset:"Offset",offsetPx:"Offset (px)",align:"Align",relativeTo:"Relative to",alignOptions:{left:"Left",center:"Center",right:"Right",top:"Top",bottom:"Bottom"},relativeOptions:{page:"Page",column:"Column",margin:"Margin",character:"Character",paragraph:"Paragraph",line:"Line"}},pageSetup:{title:"Page Setup",pageSize:"PAGE SIZE",sizeLabel:"Size",custom:"Custom",orientation:"Orientation",portrait:"Portrait",landscape:"Landscape",margins:"MARGINS",top:"Top",bottom:"Bottom",left:"Left",right:"Right",pageSizes:{letter:'Letter (8.5" \xD7 11")',a4:'A4 (8.27" \xD7 11.69")',legal:'Legal (8.5" \xD7 14")',a3:'A3 (11.69" \xD7 16.54")',a5:'A5 (5.83" \xD7 8.27")',b5:'B5 (6.93" \xD7 9.84")',executive:'Executive (7.25" \xD7 10.5")'}},tableProperties:{title:"Table Properties",widthType:"Width type",widthLabel:"Width",alignmentLabel:"Alignment",widthTypes:{auto:"Auto",fixed:"Fixed (twips)",percentage:"Percentage"},units:{fiftiethsPercent:"(50ths of %)",twips:"tw"},alignOptions:{left:"Left",center:"Center",right:"Right"}},pasteSpecial:{title:"Paste Special",keepFormatting:"Keep Source Formatting",keepFormattingDescription:"Paste with original formatting",keepFormattingShortcut:"Ctrl+V",plainText:"Paste as Plain Text",plainTextDescription:"Paste without any formatting",plainTextShortcut:"Ctrl+Shift+V",readingClipboard:"Reading clipboard...",preview:"Preview:",noContent:"No content available to paste",clipboardError:"Unable to read clipboard. Please use Ctrl+V to paste."},footnoteProperties:{title:"Footnote & Endnote Properties",footnotes:"Footnotes",endnotes:"Endnotes",position:"Position",numberFormat:"Number format",startAt:"Start at",numbering:"Numbering",footnotePositions:{bottomOfPage:"Bottom of page",belowText:"Below text"},endnotePositions:{endOfDocument:"End of document",endOfSection:"End of section"},numberingOptions:{continuous:"Continuous",restartSection:"Restart each section",restartPage:"Restart each page"},formats:{decimal:"1, 2, 3, ...",lowerRoman:"i, ii, iii, ...",upperRoman:"I, II, III, ...",lowerAlpha:"a, b, c, ...",upperAlpha:"A, B, C, ...",symbols:"*, \u2020, \u2021, ..."}},keyboardShortcuts:{ariaLabel:"Keyboard Shortcuts",searchPlaceholder:"Search shortcuts...",categories:{editing:"Editing",formatting:"Formatting",navigation:"Navigation",clipboard:"Clipboard",selection:"Selection",view:"View",file:"File",other:"Other"},shortcuts:{save:"Save",saveDescription:"Save document",print:"Print",printDescription:"Print document",undo:"Undo",undoDescription:"Undo last action",redo:"Redo",redoDescription:"Redo last action",delete:"Delete",deleteDescription:"Delete selected text",find:"Find",findDescription:"Find text in document",findReplace:"Find & Replace",findReplaceDescription:"Find and replace text",cut:"Cut",cutDescription:"Cut selected text",copy:"Copy",copyDescription:"Copy selected text",paste:"Paste",pasteDescription:"Paste from clipboard",pastePlainText:"Paste as Plain Text",pastePlainTextDescription:"Paste without formatting",bold:"Bold",boldDescription:"Toggle bold formatting",italic:"Italic",italicDescription:"Toggle italic formatting",underline:"Underline",underlineDescription:"Toggle underline formatting",strikethrough:"Strikethrough",strikethroughDescription:"Toggle strikethrough",subscript:"Subscript",subscriptDescription:"Toggle subscript",superscript:"Superscript",superscriptDescription:"Toggle superscript",alignLeft:"Align Left",alignLeftDescription:"Left align paragraph",alignCenter:"Align Center",alignCenterDescription:"Center align paragraph",alignRight:"Align Right",alignRightDescription:"Right align paragraph",justify:"Justify",justifyDescription:"Justify paragraph",increaseIndent:"Increase Indent",increaseIndentDescription:"Increase paragraph indent",decreaseIndent:"Decrease Indent",decreaseIndentDescription:"Decrease paragraph indent",selectAll:"Select All",selectAllDescription:"Select all content",selectWord:"Select Word",selectWordDescription:"Select current word",selectParagraph:"Select Paragraph",selectParagraphDescription:"Select current paragraph",extendSelectionByWord:"Extend Selection by Word",extendSelectionByWordDescription:"Extend selection to next/previous word",extendSelectionToLineEdge:"Extend Selection to Line Edge",extendSelectionToLineEdgeDescription:"Extend selection to line start/end",moveByWord:"Move by Word",moveByWordDescription:"Move cursor to next/previous word",moveToLineStart:"Move to Line Start",moveToLineStartDescription:"Move cursor to start of line",moveToLineEnd:"Move to Line End",moveToLineEndDescription:"Move cursor to end of line",moveToDocumentStart:"Move to Document Start",moveToDocumentStartDescription:"Move cursor to start of document",moveToDocumentEnd:"Move to Document End",moveToDocumentEndDescription:"Move cursor to end of document",pageUp:"Page Up",pageUpDescription:"Scroll up one page",pageDown:"Page Down",pageDownDescription:"Scroll down one page",zoomIn:"Zoom In",zoomInDescription:"Increase zoom level",zoomOut:"Zoom Out",zoomOutDescription:"Decrease zoom level",resetZoom:"Reset Zoom",resetZoomDescription:"Reset zoom to 100%",keyboardShortcuts:"Keyboard Shortcuts",keyboardShortcutsDescription:"Show this help dialog",insertLink:"Insert Link",insertLinkDescription:"Insert or edit hyperlink"},noResults:'No shortcuts found matching "{query}"',pressEscToClose:"Press {key} to close",or:"or"}},comments:{resolved:"Resolved",resolve:"Resolve",reopen:"Reopen",moreOptions:"More options",unknown:"Unknown",addComment:"Add a comment...",replyPlaceholder:"Reply or add others with @",replyCount:"{count, plural, one {# reply} other {# replies}}"},trackedChanges:{unknown:"Unknown",replaced:"Replaced",with:"with",added:"Added",deleted:"Deleted"},contextMenu:{ariaLabel:"AI actions menu",textMenuAriaLabel:"Text editing menu",customPromptPlaceholder:"Enter custom prompt...",cut:"Cut",cutShortcut:"Ctrl+X",copy:"Copy",copyShortcut:"Ctrl+C",paste:"Paste",pasteShortcut:"Ctrl+V",pastePlainText:"Paste as Plain Text",pastePlainTextShortcut:"Ctrl+Shift+V",delete:"Delete",deleteShortcut:"Del",selectAll:"Select All",selectAllShortcut:"Ctrl+A",selected:"Selected:",aiActions:{askAi:"Ask AI",rewrite:"Rewrite",expand:"Expand",summarize:"Summarize",translate:"Translate",explain:"Explain",fixGrammar:"Fix Grammar",makeFormal:"Make Formal",makeCasual:"Make Casual",custom:"Custom"}},documentOutline:{ariaLabel:"Document outline",closeAriaLabel:"Close outline",closeTitle:"Close outline",title:"Outline",noHeadings:"No headings found. Add headings to your document to see them here."},sidebar:{ariaLabel:"Annotations sidebar"},viewer:{pageIndicator:"{current} of {total}"},titleBar:{untitled:"Untitled",documentNameAriaLabel:"Document name",menuBarAriaLabel:"Menu bar"},errors:{loadingDocument:"Loading document...",noDocumentLoaded:"No document loaded",failedToLoad:"Failed to Load Document",unableToParse:"Unable to Parse Document",somethingWentWrong:"Something went wrong",errorDescription:"An error occurred while rendering this component. Please try again or contact support if the problem persists.",errorLabel:"Error:",componentStack:"Component Stack:",tryAgain:"Try Again",showDetails:"Show details",hideDetails:"Hide details",unsavedChanges:"You have unsaved changes. Are you sure you want to leave?"},table:{insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table",mergeCells:"Merge cells",splitCell:"Split cell",editingTools:"Table editing tools",label:"Table:",cellFillColor:"Cell Fill Color",borderColor:"Border Color",borderWidth:"Border width",unknownAction:"Unknown Action",borders:{all:"All borders",outside:"Outside borders",inside:"Inside borders",none:"No borders",remove:"Remove borders",top:"Top border",bottom:"Bottom border",left:"Left border",right:"Right border",styleAriaLabel:"Border style",tooltip:"Borders"},moreOptions:"More table options",styles:{title:"Table Styles",label:"Styles",normalTable:"Normal Table",tableGrid:"Table Grid",gridTableLight:"Grid Table Light",plainTable1:"Plain Table 1",plainTable2:"Plain Table 2",plainTable3:"Plain Table 3",plainTable4:"Plain Table 4",gridTable1Light:"Grid Table 1 Light",gridTable4Accent1:"Grid Table 4 Accent 1",gridTable5Dark:"Grid Table 5 Dark",listTable3Accent2:"List Table 3 Accent 2",listTable4Accent3:"List Table 4 Accent 3",gridTable4Accent5:"Grid Table 4 Accent 5",gridTable4Accent6:"Grid Table 4 Accent 6"}},tableAdvanced:{verticalAlignment:"Vertical alignment",top:"Top",middle:"Middle",bottom:"Bottom",cellMargins:"Cell margins",textDirection:"Text direction",textDirections:{horizontal:"Horizontal (LR)",verticalRL:"Vertical (top-bottom, RL)",verticalLR:"Vertical (bottom-top, LR)"},toggleNoWrap:"Toggle no-wrap",rowHeight:"Row height",heightRules:{auto:"Auto",atLeast:"At least",exact:"Exact"},rule:"Rule",height:"Height",toggleHeaderRow:"Toggle header row",distributeColumns:"Distribute columns evenly",autoFit:"Auto-fit to contents",tableProperties:"Table properties...",tableAlignment:"Table alignment",alignTableLeft:"Align table left",alignTableCenter:"Align table center",alignTableRight:"Align table right",tableOptionsMenu:"Table options menu",tableOptions:"Table options"},imageTransform:{tooltip:"Transform",rotateClockwise:"Rotate clockwise",rotateCounterClockwise:"Rotate counter-clockwise",flipHorizontal:"Flip horizontal",flipVertical:"Flip vertical"},imageWrap:{inline:"In Line with Text",floatLeft:"Square Left",floatRight:"Square Right",topAndBottom:"Top and Bottom",behindText:"Behind Text",inFrontOfText:"In Front of Text",tooltipPrefix:"Wrap: {label}",menu:{inLineWithText:"In Line with Text",squareLeft:"Square Left",squareRight:"Square Right",behindText:"Behind Text",inFrontOfText:"In Front of Text",ariaLabel:"Image layout options",imageProperties:"Image properties\u2026"},menuDesc:{inLineWithText:"Image flows in the line as a glyph",squareLeft:"Image floats left, text wraps on the right",squareRight:"Image floats right, text wraps on the left",behindText:"Image paints behind body text",inFrontOfText:"Image paints over body text"}},responsePreview:{loading:"{action}...",result:"{action} Result",closeEsc:"Close (Esc)",editPrompt:"Edit the result before accepting:",changes:"Changes:",original:"Original:",new:"New:",cancelEdit:"Cancel Edit"},commentMarkers:{resolvedComment:"Resolved comment",comment:"Comment"},editor:{toggleCommentsSidebar:"Toggle comments sidebar",showDocumentOutline:"Show document outline",editing:"Editing",editingDescription:"Edit document directly",suggesting:"Suggesting",suggestingDescription:"Edits become suggestions",viewing:"Viewing",viewingDescription:"Read-only, no edits",failedToParse:"Failed to parse document",linkRemoved:"Link removed",linkCopied:"Link copied to clipboard",failedToSave:"Failed to save document"},hyperlinkPopup:{displayTextPlaceholder:"Display text",urlPlaceholder:"https://example.com",copyLink:"Copy link",editLink:"Edit link",removeLink:"Remove link"},headerFooter:{header:"Header",footer:"Footer",options:"Options",insertPageNumber:"Insert current page number",insertTotalPages:"Insert total page count",remove:"Remove {label}",closeEditing:"Close {label} editing"},image:{placeholder:"Image placeholder",placeholderText:"[Image]",editableAriaLabel:"Editable image"},imageOverlay:{rotate:"Rotate",imageProperties:"Image properties",deleteImage:"Delete image"},ruler:{horizontal:"Horizontal ruler",vertical:"Vertical ruler",firstLineIndent:"First line indent",leftIndent:"Left indent",rightIndent:"Right indent",topMargin:"Top margin",bottomMargin:"Bottom margin"},print:{label:"Print",allPages:"All ({totalPages} pages)",singlePage:"Page {start}",pageRange:"Pages {start}-{end}"},unsaved:{unsaved:"Unsaved",saved:"Saved",unsavedTitle:"Document has unsaved changes",savedTitle:"All changes saved",unsavedAriaLabel:"Unsaved changes",savedAriaLabel:"All changes saved"},loading:{label:"Loading"},agentPanel:{defaultTitle:"Assistant",toggle:"Open assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var b=g,f=react.createContext(b),T=react.createContext("en");function d(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function L(e,o){if(!o)return e;let t={...e};for(let i of Object.keys(o)){let r=o[i];r!==null&&(d(e[i])&&d(r)?t[i]=L(e[i],r):r!==void 0&&(t[i]=r));}return t}function C(e,o){let t=e;for(let i of o.split(".")){if(!d(t))return;t=t[i];}return typeof t=="string"?t:void 0}function v(e){let o={},t=/(=\d+|\w+)\s*\{([^}]*)\}/g,i;for(;(i=t.exec(e))!==null;)o[i[1]]=i[2];return o}function P(e,o,t){return o?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(r,n,l)=>{let a=Number(o[n]);if(isNaN(a))return r;let s=v(l),p=s[`=${a}`];if(p!==void 0)return p.replace(/#/g,String(a));let c;try{c=new Intl.PluralRules(t||"en").select(a);}catch{c=a===1?"one":"other";}return (s[c]??s.other??"").replace(/#/g,String(a))}).replace(/\{(\w+)\}/g,(r,n)=>{let l=o[n];return l!==void 0?String(l):`{${n}}`}):e}function R({i18n:e,children:o}){let t=e,i=typeof t?._lang=="string"?t._lang:"en",r=react.useMemo(()=>L(b,t),[t]);return jsxRuntime.jsx(T.Provider,{value:i,children:jsxRuntime.jsx(f.Provider,{value:r,children:o})})}function w(){let e=react.useContext(f),o=react.useContext(T);return {t:react.useCallback((i,r)=>{let n=C(e,i);return P(n??i,r,o)},[e,o])}}
|
|
2
|
+
exports.a=g;exports.b=R;exports.c=w;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {g,f,j as j$1,a,i}from'./chunk-FWPVBFKQ.mjs';var y={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},W={black:"000000",blue:"0000FF",cyan:"00FFFF",darkBlue:"00008B",darkCyan:"008B8B",darkGray:"A9A9A9",darkGreen:"006400",darkMagenta:"8B008B",darkRed:"8B0000",darkYellow:"808000",green:"00FF00",lightGray:"D3D3D3",magenta:"FF00FF",red:"FF0000",white:"FFFFFF",yellow:"FFFF00",none:""},x={dk1:"dk1",lt1:"lt1",dk2:"dk2",lt2:"lt2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink",dark1:"dk1",light1:"lt1",dark2:"dk2",light2:"lt2",hyperlink:"hlink",followedHyperlink:"folHlink",background1:"lt1",text1:"dk1",background2:"lt2",text2:"dk2",tx1:"dk1",tx2:"dk2",bg1:"lt1",bg2:"lt2"};function A(e){if(!e)return 1;let n=parseInt(e,16);return isNaN(n)?1:n/255}function E(e){let n=e.padStart(6,"0").slice(0,6),t=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),i=parseInt(n.slice(4,6),16);return {r:isNaN(t)?0:t,g:isNaN(r)?0:r,b:isNaN(i)?0:i}}function N(e,n,t){let r=i=>Math.max(0,Math.min(255,Math.round(i))).toString(16).padStart(2,"0");return `${r(e)}${r(n)}${r(t)}`.toUpperCase()}function M(e,n){if(n>=1)return e;if(n<=0)return "FFFFFF";let t=E(e);return N(Math.min(255,Math.max(0,Math.round(t.r*n+255*(1-n)))),Math.min(255,Math.max(0,Math.round(t.g*n+255*(1-n)))),Math.min(255,Math.max(0,Math.round(t.b*n+255*(1-n)))))}function w(e,n){if(n>=1)return e;if(n<=0)return "000000";let t=E(e);return N(Math.min(255,Math.max(0,Math.round(t.r*n))),Math.min(255,Math.max(0,Math.round(t.g*n))),Math.min(255,Math.max(0,Math.round(t.b*n))))}function j(e,n){let t=x[n]??n,r=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],i=o=>r.includes(o);return e?.colorScheme?i(t)?e.colorScheme[t]??y[t]??"000000":"000000":i(t)?y[t]??"000000":"000000"}function U(e){if(!e)return null;let n=e.toLowerCase();return x[e]??x[n]??null}function b(e,n,t="000000"){if(!e)return `#${t}`;if(e.auto)return `#${t}`;let r;if(e.themeColor){let i=U(e.themeColor);if(i?r=j(n,i):r=e.rgb??t,e.themeTint){let o=A(e.themeTint);r=M(r,o);}else if(e.themeShade){let o=A(e.themeShade);r=w(r,o);}}else e.rgb?r=e.rgb==="auto"?t:e.rgb:r=t;return `#${r.toUpperCase().replace(/^#/,"")}`}function T(e,n){if(!(!e||e.auto)){if(e.themeColor&&n)return b(e,n).slice(1);if(e.rgb&&e.rgb!=="auto")return e.rgb.toUpperCase().replace(/^#/,"")}}function K(e){if(!e||e==="none")return "";let n=W[e];return n?`#${n}`:""}function S(e,n){return e?e.auto?"transparent":b(e,n):""}function q(e){return e.startsWith("#")?e:`#${e}`}function H(e){return K(e)||q(e)}var J=[{slot:"lt1",name:"Background 1"},{slot:"dk1",name:"Text 1"},{slot:"lt2",name:"Background 2"},{slot:"dk2",name:"Text 2"},{slot:"accent1",name:"Accent 1"},{slot:"accent2",name:"Accent 2"},{slot:"accent3",name:"Accent 3"},{slot:"accent4",name:"Accent 4"},{slot:"accent5",name:"Accent 5"},{slot:"accent6",name:"Accent 6"}],X=[{type:"base",value:0,hexValue:"",labelSuffix:""},{type:"tint",value:.8,hexValue:"CC",labelSuffix:", Lighter 80%"},{type:"tint",value:.6,hexValue:"99",labelSuffix:", Lighter 60%"},{type:"tint",value:.4,hexValue:"66",labelSuffix:", Lighter 40%"},{type:"shade",value:.75,hexValue:"BF",labelSuffix:", Darker 25%"},{type:"shade",value:.5,hexValue:"80",labelSuffix:", Darker 50%"}];function pe(e){let n=e??y;return X.map(t=>J.map(r=>{let i=n[r.slot]??y[r.slot]??"000000",o;t.type==="base"?o=i.toUpperCase():t.type==="tint"?o=M(i,1-t.value):o=w(i,t.value);let a={hex:o,themeSlot:r.slot,label:`${r.name}${t.labelSuffix}`};return t.type==="tint"&&t.hexValue?a.tint=t.hexValue:t.type==="shade"&&t.hexValue&&(a.shade=t.hexValue),a}))}var p={HTML:"text/html",PLAIN:"text/plain"};function he(e){if(!e)return [];let n=()=>{if(!e.items||e.items.length===0)return [];let l=[];for(let u of Array.from(e.items)){if(u.kind!=="file"||!u.type.startsWith("image/"))continue;let g=u.getAsFile();g&&l.push(g);}return l},t=()=>!e.files||e.files.length===0?[]:Array.from(e.files).filter(l=>l.type.startsWith("image/")),r=n(),i=r.length?r:t();if(i.length<=1)return i;let o=["image/png","image/jpeg","image/webp","image/gif","image/svg+xml","image/bmp","image/tiff"],a=l=>{let u=l[0],g=o.indexOf(u.type);g<0&&(g=Number.MAX_SAFE_INTEGER);for(let h of l.slice(1)){let m=o.indexOf(h.type);if(m<0&&(m=Number.MAX_SAFE_INTEGER),m<g){u=h,g=m;continue}m===g&&h.size>u.size&&(u=h);}return u},s=new Map;for(let l of i){let u=l.name?.trim()??"",h=(u?u.replace(/\.[^/.]+$/,"").toLowerCase():"")||`size:${l.size}`,m=s.get(h);m?m.push(l):s.set(h,[l]);}let d=[];for(let l of s.values())d.push(a(l));return d}async function be(e,n={}){let{includeFormatting:t=true,onError:r,theme:i}=n;try{let o=Y(e,t,i);return await Q(o)}catch(o){return r?.(o),false}}function Y(e,n=true,t){let r=e.map(O).join(""),i=n?oe(e,t):G(r),o=JSON.stringify(e);return {plainText:r,html:i,internal:o}}async function Q(e){try{if(navigator.clipboard&&navigator.clipboard.write){let n=[new ClipboardItem({[p.PLAIN]:new Blob([e.plainText],{type:p.PLAIN}),[p.HTML]:new Blob([e.html],{type:p.HTML})})];return await navigator.clipboard.write(n),!0}return P(e)}catch{return P(e)}}function P(e){let n=document.createElement("div");n.innerHTML=e.html,n.style.position="fixed",n.style.left="-9999px",document.body.appendChild(n);try{let t=window.getSelection();if(!t)return !1;let r=document.createRange();r.selectNodeContents(n),t.removeAllRanges(),t.addRange(r);let i=document.execCommand("copy");return t.removeAllRanges(),i}finally{document.body.removeChild(n);}}async function ye(e={}){let{cleanWordFormatting:n=true,onError:t}=e;try{if(navigator.clipboard&&navigator.clipboard.read){let r=await navigator.clipboard.read();return await Z(r,n)}return null}catch(r){return t?.(r),null}}async function Z(e,n){let t="",r="";for(let i of e)i.types.includes(p.HTML)&&(t=await(await i.getType(p.HTML)).text()),i.types.includes(p.PLAIN)&&(r=await(await i.getType(p.PLAIN)).text());return B(t,r,n)}function Se(e,n={}){let{cleanWordFormatting:t=true}=n,r=e.clipboardData;if(!r)return null;let i=r.getData(p.HTML),o=r.getData(p.PLAIN);return B(i,o,t)}function B(e,n,t=true){let r=ee(e),i=ne(e);if(i){let s=e.match(/data-docx-editor-content="([^"]+)"/);if(s)try{return {runs:JSON.parse(decodeURIComponent(s[1])),fromWord:!1,fromEditor:!0,plainText:n}}catch{}}let o=e;return r&&t&&(o=te(e)),{runs:re(o,n),fromWord:r,fromEditor:i,plainText:n}}function ee(e){return e.includes("urn:schemas-microsoft-com:office")||e.includes("mso-")||e.includes("MsoNormal")||e.includes('class="Mso')||e.includes("<!--[if gte mso")}function ne(e){return e.includes("data-docx-editor")||e.includes("docx-run")||e.includes("docx-paragraph")}function te(e){let n=e;return n=n.replace(/<!--\[if[\s\S]*?<!\[endif\]-->/gi,""),n=n.replace(/<!--[\s\S]*?-->/g,""),n=n.replace(/<\?xml[^>]*>/gi,""),n=n.replace(/<o:[^>]*>[\s\S]*?<\/o:[^>]*>/gi,""),n=n.replace(/<o:[^>]*\/>/gi,""),n=n.replace(/<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi,""),n=n.replace(/<w:[^>]*\/>/gi,""),n=n.replace(/\s*mso-[^:;]+:[^;]+;?/gi,""),n=n.replace(/\s*style="\s*"/gi,""),n=n.replace(/\s*class="[^"]*Mso[^"]*"/gi,""),n=n.replace(/<span[^>]*>\s*<\/span>/gi,""),n=n.replace(/<\/?font[^>]*>/gi,""),n=n.replace(/\s+/g," ").trim(),n}function re(e,n){if(!e||e.trim()==="")return n?[k(n)]:[];let t=document.createElement("div");t.innerHTML=e;let r=[];return F(t,r,{}),r.length===0&&n?[k(n)]:r}function F(e,n,t){if(e.nodeType===Node.TEXT_NODE){let a=e.textContent||"";(a.trim()||a.includes(" "))&&n.push(k(a,t));return}if(e.nodeType!==Node.ELEMENT_NODE)return;let r=e,i=r.tagName.toLowerCase(),o={...t,...ie(r)};switch(i){case "br":n.push(D(o));return;case "p":case "div":for(let a of r.childNodes)F(a,n,o);r.nextSibling&&n.push(D(o));return;case "b":case "strong":o.bold=true;break;case "i":case "em":o.italic=true;break;case "u":o.underline={style:"single"};break;case "s":case "strike":case "del":o.strike=true;break;case "sup":o.vertAlign="superscript";break;case "sub":o.vertAlign="subscript";break;case "code":case "pre":o.fontFamily={ascii:"Courier New"};break}for(let a of r.childNodes)F(a,n,o);}function ie(e){let n={},t=e.style;(t.fontWeight==="bold"||parseInt(t.fontWeight)>=700)&&(n.bold=true),t.fontStyle==="italic"&&(n.italic=true);let r=t.textDecoration||t.textDecorationLine;if(r&&(r.includes("underline")&&(n.underline={style:"single"}),r.includes("line-through")&&(n.strike=true)),t.fontSize){let i=parseFloat(t.fontSize);isNaN(i)||(n.fontSize=Math.round(i/1.333*2));}if(t.fontFamily){let i=t.fontFamily.replace(/["']/g,"").split(",")[0].trim();i&&(n.fontFamily={ascii:i});}if(t.color){let i=I(t.color);i&&(n.color={rgb:i});}if(t.backgroundColor&&t.backgroundColor!=="transparent"){let i=I(t.backgroundColor);i&&(n.shading={fill:{rgb:i}});}return n}function I(e){if(!e||e==="transparent"||e==="inherit")return null;if(e.startsWith("#"))return e.slice(1).toUpperCase();let n=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(n){let t=parseInt(n[1]).toString(16).padStart(2,"0"),r=parseInt(n[2]).toString(16).padStart(2,"0"),i=parseInt(n[3]).toString(16).padStart(2,"0");return (t+r+i).toUpperCase()}return null}function O(e){return e.content.map(n=>n.type==="text"?n.text:n.type==="tab"?" ":n.type==="break"&&n.breakType==="textWrapping"?`
|
|
2
|
+
`:"").join("")}function oe(e,n){return e.map(t=>ae(t,n)).join("")}function ae(e,n){let t=O(e);if(!t)return "";let r=G(t),i=e.formatting;if(!i)return r;i.bold&&(r=`<strong>${r}</strong>`),i.italic&&(r=`<em>${r}</em>`),i.underline&&(r=`<u>${r}</u>`),i.strike&&(r=`<s>${r}</s>`),i.vertAlign==="superscript"&&(r=`<sup>${r}</sup>`),i.vertAlign==="subscript"&&(r=`<sub>${r}</sub>`);let o=[];if(i.fontSize){let d=i.fontSize/2;o.push(`font-size: ${d}pt`);}i.fontFamily?.ascii&&o.push(`font-family: "${i.fontFamily.ascii}"`);let a=T(i.color,n);a&&o.push(`color: #${a}`);let s=T(i.shading?.fill,n);return s&&o.push(`background-color: #${s}`),o.length>0&&(r=`<span style="${o.join("; ")}">${r}</span>`),r}function G(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function k(e,n){return {type:"run",formatting:n,content:[{type:"text",text:e}]}}function D(e){return {type:"run",formatting:e,content:[{type:"break",breakType:"textWrapping"}]}}var se={calibri:{googleFont:"Carlito",category:"sans-serif",fallbackStack:["Calibri","Carlito","Arial","Helvetica","sans-serif"],singleLineRatio:1.2207},cambria:{googleFont:"Caladea",category:"serif",fallbackStack:["Cambria","Caladea","Georgia","serif"],singleLineRatio:1.2676},arial:{googleFont:"Arimo",category:"sans-serif",fallbackStack:["Arial","Arimo","Helvetica","sans-serif"],singleLineRatio:1.1172},"times new roman":{googleFont:"Tinos",category:"serif",fallbackStack:["Times New Roman","Tinos","Times","serif"],singleLineRatio:1.1074},"courier new":{googleFont:"Cousine",category:"monospace",fallbackStack:["Courier New","Cousine","Courier","monospace"],singleLineRatio:1.1328},georgia:{googleFont:"Tinos",category:"serif",fallbackStack:["Georgia","Tinos","Times New Roman","serif"],singleLineRatio:1.1362},verdana:{googleFont:"Open Sans",category:"sans-serif",fallbackStack:["Verdana","Open Sans","Arial","sans-serif"],singleLineRatio:1.2153},tahoma:{googleFont:"Open Sans",category:"sans-serif",fallbackStack:["Tahoma","Open Sans","Arial","sans-serif"],singleLineRatio:1.2075},"trebuchet ms":{googleFont:"Fira Sans",category:"sans-serif",fallbackStack:["Trebuchet MS","Fira Sans","Arial","sans-serif"],singleLineRatio:1.1431},"comic sans ms":{googleFont:"Comic Neue",category:"cursive",fallbackStack:["Comic Sans MS","Comic Neue","cursive"],singleLineRatio:1.3936},impact:{googleFont:"Anton",category:"sans-serif",fallbackStack:["Impact","Anton","Arial Black","sans-serif"],singleLineRatio:1.2197},"palatino linotype":{googleFont:"EB Garamond",category:"serif",fallbackStack:["Palatino Linotype","EB Garamond","Palatino","Georgia","serif"],singleLineRatio:1.0259},"book antiqua":{googleFont:"EB Garamond",category:"serif",fallbackStack:["Book Antiqua","EB Garamond","Palatino","Georgia","serif"],singleLineRatio:1.0259},garamond:{googleFont:"EB Garamond",category:"serif",fallbackStack:["Garamond","EB Garamond","Georgia","serif"],singleLineRatio:1.068},"century gothic":{googleFont:"Questrial",category:"sans-serif",fallbackStack:["Century Gothic","Questrial","Arial","sans-serif"],singleLineRatio:1.1611},"lucida sans":{googleFont:"Open Sans",category:"sans-serif",fallbackStack:["Lucida Sans","Open Sans","Arial","sans-serif"],singleLineRatio:1.1655},"lucida console":{googleFont:"Cousine",category:"monospace",fallbackStack:["Lucida Console","Cousine","Courier New","monospace"],singleLineRatio:1.1387},consolas:{googleFont:"Inconsolata",category:"monospace",fallbackStack:["Consolas","Inconsolata","Cousine","Courier New","monospace"],singleLineRatio:1.1626},"ms mincho":{googleFont:"Noto Serif JP",category:"serif",fallbackStack:["MS Mincho","Noto Serif JP","serif"],singleLineRatio:1.15},"ms gothic":{googleFont:"Noto Sans JP",category:"sans-serif",fallbackStack:["MS Gothic","Noto Sans JP","sans-serif"],singleLineRatio:1.15},simhei:{googleFont:"Noto Sans SC",category:"sans-serif",fallbackStack:["SimHei","Noto Sans SC","sans-serif"],singleLineRatio:1.15},simsun:{googleFont:"Noto Serif SC",category:"serif",fallbackStack:["SimSun","Noto Serif SC","serif"],singleLineRatio:1.15},"malgun gothic":{googleFont:"Noto Sans KR",category:"sans-serif",fallbackStack:["Malgun Gothic","Noto Sans KR","sans-serif"],singleLineRatio:1.15}},le={"sans-serif":"Arial, Helvetica, sans-serif",serif:"Times New Roman, Times, serif",monospace:"Courier New, Courier, monospace",cursive:"cursive",fantasy:"fantasy","system-ui":"system-ui, sans-serif"};function ce(e){let n=e.toLowerCase();return n.includes("mono")||n.includes("courier")||n.includes("consolas")||n.includes("console")||n.includes("code")||n.includes("terminal")?"monospace":n.includes("times")||n.includes("georgia")||n.includes("garamond")||n.includes("palatino")||n.includes("baskerville")||n.includes("bodoni")||n.includes("cambria")||n.includes("mincho")||n.includes("ming")||n.includes("song")||n.includes("serif")?"serif":n.includes("script")||n.includes("cursive")||n.includes("comic")||n.includes("brush")||n.includes("hand")?"cursive":"sans-serif"}function $(e){let n=e.trim().toLowerCase(),t=se[n];if(t)return {googleFont:t.googleFont,cssFallback:t.fallbackStack.map(_).join(", "),originalFont:e,hasGoogleEquivalent:true,singleLineRatio:t.singleLineRatio};let r=ce(e),i=le[r];return {googleFont:null,cssFallback:`${_(e)}, ${i}`,originalFont:e,hasGoogleEquivalent:false,singleLineRatio:1.15}}function _(e){return ["serif","sans-serif","monospace","cursive","fantasy","system-ui"].includes(e.toLowerCase())?e:/[\s,'"()]/.test(e)?`"${e.replace(/"/g,'\\"')}"`:e}function V(e,n){if(!n)return null;let r=e.toLowerCase().startsWith("major")?n.majorFont:n.minorFont;if(!r)return null;let i=e.toLowerCase();return i.includes("eastasia")||i.includes("ea")?r.ea??r.latin??null:i.includes("cs")||i.includes("bidi")?r.cs??r.latin??null:r.latin??null}function Le(e,n){if(!e)return {};let t={};if(e.fontFamily){let a=null;if(e.fontFamily.asciiTheme&&n?.fontScheme&&(a=V(e.fontFamily.asciiTheme,n.fontScheme)),a||(a=e.fontFamily.ascii||e.fontFamily.hAnsi||e.fontFamily.eastAsia||e.fontFamily.cs||null),a){let s=$(a);t.fontFamily=s.cssFallback;}}if(e.fontSize!==void 0&&(t.fontSize=`${g(e.fontSize)}pt`),e.bold&&(t.fontWeight="bold"),e.italic&&(t.fontStyle="italic"),e.color&&(t.color=b(e.color,n)),e.highlight&&e.highlight!=="none"&&(t.backgroundColor=H(e.highlight)),e.shading){let a=z(e.shading,n);a&&!t.backgroundColor&&(t.backgroundColor=a);}let r=[],i=[],o=[];if(e.underline&&e.underline.style!=="none"){r.push("underline");let a=ue(e.underline.style);a!=="solid"&&i.push(a),e.underline.color&&o.push(b(e.underline.color,n));}if(e.strike&&r.push("line-through"),e.doubleStrike&&r.push("line-through"),r.length>0&&(t.textDecoration=r.join(" "),i.length>0&&(t.textDecorationStyle=i[0]),o.length>0&&(t.textDecorationColor=o[0])),e.vertAlign)switch(e.vertAlign){case "superscript":t.verticalAlign="super",t.fontSize||(t.fontSize="0.83em");break;case "subscript":t.verticalAlign="sub",t.fontSize||(t.fontSize="0.83em");break}if(e.position&&e.position!==0){let a=f(e.position);t.position="relative",t.top=j$1(-a);}return e.allCaps?t.textTransform="uppercase":e.smallCaps&&(t.fontVariant="small-caps"),e.spacing!==void 0&&e.spacing!==0&&(t.letterSpacing=j$1(a(e.spacing))),e.scale!==void 0&&e.scale!==100&&(t.transform=`scaleX(${e.scale/100})`,t.display="inline-block"),e.hidden&&(t.display="none"),e.emboss&&(t.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),e.imprint&&(t.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),e.outline&&(t.WebkitTextStroke="1px currentColor",t.WebkitTextFillColor="transparent"),e.shadow&&!e.emboss&&!e.imprint&&(t.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),e.rtl&&(t.direction="rtl"),t}function ve(e,n){if(!e)return {};let t={};if(e.alignment&&(t.textAlign=de(e.alignment)),e.spaceBefore!==void 0&&(t.marginTop=j$1(a(e.spaceBefore))),e.spaceAfter!==void 0&&(t.marginBottom=j$1(a(e.spaceAfter))),e.lineSpacing!==void 0&&e.lineSpacing>0)switch(e.lineSpacingRule){case "exact":{let r=a(e.lineSpacing);r>0&&(t.lineHeight=j$1(r));break}case "atLeast":{let r=a(e.lineSpacing);r>0&&(t.minHeight=j$1(r),t.lineHeight=j$1(r));break}default:{let r=e.lineSpacing/240;r>0&&(t.lineHeight=r.toString());break}}if(e.indentLeft!==void 0&&(t.marginLeft=j$1(a(e.indentLeft))),e.indentRight!==void 0&&(t.marginRight=j$1(a(e.indentRight))),e.indentFirstLine!==void 0&&(e.hangingIndent?t.textIndent=j$1(a(e.indentFirstLine)):t.textIndent=j$1(a(e.indentFirstLine))),e.borders&&(e.borders.top&&Object.assign(t,C(e.borders.top,"Top",n)),e.borders.bottom&&Object.assign(t,C(e.borders.bottom,"Bottom",n)),e.borders.left&&Object.assign(t,C(e.borders.left,"Left",n)),e.borders.right&&Object.assign(t,C(e.borders.right,"Right",n))),e.shading){let r=z(e.shading,n);r&&(t.backgroundColor=r);}return e.bidi&&(t.direction="rtl"),e.pageBreakBefore&&(t.pageBreakBefore="always"),e.keepNext&&(t.pageBreakAfter="avoid"),e.keepLines&&(t.pageBreakInside="avoid"),t}function C(e,n="",t){if(!e||e.style==="none"||e.style==="nil")return {};let r={},i$1=e.size?i(e.size):1,o=e.color?b(e.color,t):"#000000",a=fe(e.style),s=`border${n}Width`,d=`border${n}Style`,l=`border${n}Color`;return r[s]=j$1(Math.max(1,i$1)),r[d]=a,r[l]=o,r}function z(e,n){return !e||e.pattern==="clear"||e.pattern==="nil"?"":e.fill?e.fill.auto||e.fill.rgb==="auto"||e.fill.rgb==="FFFFFF"?"":S(e.fill,n):e.pattern==="solid"&&e.color?S(e.color,n):e.pattern&&e.pattern.startsWith("pct")&&e.color?S(e.color,n):""}function ue(e){switch(e){case "double":return "double";case "dotted":case "dottedHeavy":return "dotted";case "dash":case "dashedHeavy":case "dashLong":case "dashLongHeavy":case "dotDash":case "dashDotHeavy":case "dotDotDash":case "dashDotDotHeavy":return "dashed";case "wave":case "wavyHeavy":case "wavyDouble":return "wavy";default:return "solid"}}function de(e){switch(e){case "center":return "center";case "right":return "right";case "both":case "distribute":return "justify";default:return "left"}}function fe(e){switch(e){case "none":case "nil":return "none";case "double":case "triple":return "double";case "dotted":return "dotted";case "dashed":case "dashSmallGap":return "dashed";case "threeDEmboss":return "ridge";case "threeDEngrave":return "groove";case "outset":return "outset";case "inset":return "inset";default:return "solid"}}function Ae(e){let n=[];return e.descendants((t,r)=>{if(t.type.name==="paragraph"){let i=t.attrs.outlineLevel,o=t.attrs.styleId,a=i;if(a==null&&o){let s=o.match(/^[Hh]eading(\d)$/);s&&(a=parseInt(s[1],10)-1);}if(a!=null&&a>=0&&a<=8){let s="";t.forEach(d=>{d.isText&&(s+=d.text||"");}),s.trim()&&n.push({text:s.trim(),level:a,pmPos:r});}}}),n}export{b as a,T as b,K as c,H as d,pe as e,he as f,be as g,Y as h,ye as i,Se as j,B as k,$ as l,Le as m,ve as n,C as o,Ae as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d as d$1}from'./chunk-FWPVBFKQ.mjs';import {d}from'./chunk-TAUMSKRE.mjs';var k=class{constructor(){d(this,"plugins",new Map);d(this,"commandHandlers",new Map);d(this,"eventListeners",new Set);d(this,"initialized",new Set);}register(e,r){let n=[];if(!e.id)return {success:false,error:"Plugin must have an id"};if(this.plugins.has(e.id))return {success:false,error:`Plugin '${e.id}' is already registered`};if(e.dependencies){for(let t of e.dependencies)if(!this.plugins.has(t))return {success:false,error:`Plugin '${e.id}' requires '${t}' which is not registered`}}if(e.commandHandlers)for(let[t,o]of Object.entries(e.commandHandlers)){if(this.commandHandlers.has(t)){let s=this.commandHandlers.get(t);n.push(`Command '${t}' from '${e.id}' overrides handler from '${s.pluginId}'`);}this.commandHandlers.set(t,{pluginId:e.id,handler:o});}if(this.plugins.set(e.id,e),e.initialize&&!this.initialized.has(e.id))try{let t=e.initialize();t instanceof Promise?t.then(()=>{this.initialized.add(e.id);}).catch(o=>{this.emit({type:"error",pluginId:e.id,error:o});}):this.initialized.add(e.id);}catch(t){this.emit({type:"error",pluginId:e.id,error:t});}return r?.debug&&console.log(`[PluginRegistry] Registered plugin: ${e.id}`),this.emit({type:"registered",plugin:e}),{success:true,plugin:e,warnings:n.length>0?n:void 0}}unregister(e){let r=this.plugins.get(e);if(!r)return false;for(let[n,t]of this.plugins)if(t.dependencies?.includes(e))return console.warn(`Cannot unregister '${e}': '${n}' depends on it`),false;for(let[n,{pluginId:t}]of this.commandHandlers)t===e&&this.commandHandlers.delete(n);if(r.destroy)try{let n=r.destroy();n instanceof Promise&&n.catch(t=>{this.emit({type:"error",pluginId:e,error:t});});}catch(n){this.emit({type:"error",pluginId:e,error:n});}return this.plugins.delete(e),this.initialized.delete(e),this.emit({type:"unregistered",pluginId:e}),true}get(e){return this.plugins.get(e)}getAll(){return Array.from(this.plugins.values())}has(e){return this.plugins.has(e)}get size(){return this.plugins.size}getCommandHandler(e){return this.commandHandlers.get(e)?.handler}getCommandTypes(){return Array.from(this.commandHandlers.keys())}hasCommandHandler(e){return this.commandHandlers.has(e)}getMcpTools(){let e=[];for(let r of this.plugins.values())r.mcpTools&&e.push(...r.mcpTools);return e}getMcpToolsForPlugin(e){return this.plugins.get(e)?.mcpTools||[]}getMcpTool(e){for(let r of this.plugins.values())if(r.mcpTools){let n=r.mcpTools.find(t=>t.name===e);if(n)return n}}addEventListener(e){this.eventListeners.add(e);}removeEventListener(e){this.eventListeners.delete(e);}emit(e){for(let r of this.eventListeners)try{r(e);}catch(n){console.error("[PluginRegistry] Event listener error:",n);}}clear(){for(let e of this.plugins.values())if(e.destroy)try{e.destroy();}catch{}this.plugins.clear(),this.commandHandlers.clear(),this.initialized.clear();}getDebugInfo(){return {plugins:Array.from(this.plugins.keys()),commandTypes:Array.from(this.commandHandlers.keys()),mcpTools:this.getMcpTools().map(e=>e.name),initialized:Array.from(this.initialized)}}},v=new k;function H(i,e){let r=v.getCommandHandler(e.type);if(r)return r(i,e);switch(e.type){case "insertText":return $(i,e);case "replaceText":return S(i,e);case "deleteText":return A(i,e);case "formatText":return M(i,e);case "formatParagraph":return B(i,e);case "applyStyle":return V(i,e);case "insertTable":return z(i,e);case "insertImage":return F(i,e);case "insertHyperlink":return L(i,e);case "removeHyperlink":return O(i,e);case "insertParagraphBreak":return R(i,e);case "mergeParagraphs":return j(i,e);case "splitParagraph":return N(i,e);case "setVariable":return _(i,e);case "applyVariables":return J(i,e);default:let n=e;throw new Error(`Unknown command type: ${n.type}`)}}function Q(i,e){return e.reduce((r,n)=>H(r,n),i)}function h(i){return JSON.parse(JSON.stringify(i))}function f(i,e){let r=0;for(let n=0;n<i.content.length;n++)if(i.content[n].type==="paragraph"){if(r===e)return n;r++;}return -1}function I(i){let e="";for(let r of i.content)if(r.type==="run")for(let n of r.content)n.type==="text"&&(e+=n.text);else if(r.type==="hyperlink"){for(let n of r.children)if(n.type==="run")for(let t of n.content)t.type==="text"&&(e+=t.text);}return e}function C(i,e){return {type:"run",formatting:e,content:[{type:"text",text:i}]}}function T(i,e,r,n){let t=[],o=0,s=false;for(let a of i.content)if(a.type==="run"){let c=a.content.filter(u=>u.type==="text").map(u=>u.text).join(""),p=o,l=o+c.length;if(!s&&e>=p&&e<=l){let u=e-p;u>0&&t.push({...a,content:[{type:"text",text:c.slice(0,u)}]}),t.push(C(r,n||a.formatting)),u<c.length&&t.push({...a,content:[{type:"text",text:c.slice(u)}]}),s=true;}else t.push(a);o=l;}else t.push(a);return s||t.push(C(r,n)),t}function y(i,e,r){let n=[],t=0;for(let o of i.content)if(o.type==="run"){let s=o.content.filter(p=>p.type==="text").map(p=>p.text).join(""),a=t,c=t+s.length;if(c<=e||a>=r)n.push(o);else {let p="";a<e&&(p+=s.slice(0,e-a)),c>r&&(p+=s.slice(r-a)),p.length>0&&n.push({...o,content:[{type:"text",text:p}]});}t=c;}else n.push(o);return n}function E(i,e,r,n){let t=[],o=0;for(let s of i.content)if(s.type==="run"){let a=s.content.filter(l=>l.type==="text").map(l=>l.text).join(""),c=o,p=o+a.length;if(p<=e||c>=r)t.push(s);else if(c>=e&&p<=r)t.push({...s,formatting:{...s.formatting,...n}});else {let l=Math.max(e,c),u=Math.min(r,p);c<l&&t.push({...s,content:[{type:"text",text:a.slice(0,l-c)}]}),t.push({...s,formatting:{...s.formatting,...n},content:[{type:"text",text:a.slice(l-c,u-c)}]}),p>u&&t.push({...s,content:[{type:"text",text:a.slice(u-c)}]});}o=p;}else t.push(s);return t}function $(i,e){let r=h(i),n=r.package.document,t=f(n,e.position.paragraphIndex);if(t===-1)throw new Error(`Paragraph index ${e.position.paragraphIndex} not found`);let o=n.content[t];return o.content=T(o,e.position.offset,e.text,e.formatting),r}function S(i,e){let r=h(i),n=r.package.document,{start:t,end:o}=e.range;if(t.paragraphIndex===o.paragraphIndex){let s=f(n,t.paragraphIndex);if(s===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let a=n.content[s];a.content=y(a,t.offset,o.offset),a.content=T(a,t.offset,e.text,e.formatting);}else {let s=f(n,t.paragraphIndex),a=n.content[s],c=I(a);a.content=y(a,t.offset,c.length),a.content=T(a,t.offset,e.text,e.formatting);let p=[];for(let l=t.paragraphIndex+1;l<=o.paragraphIndex;l++)p.push(f(n,l));for(let l=p.length-1;l>=0;l--)p[l]!==-1&&n.content.splice(p[l],1);}return r}function A(i,e){let r=h(i),n=r.package.document,{start:t,end:o}=e.range;if(t.paragraphIndex===o.paragraphIndex){let s=f(n,t.paragraphIndex);if(s===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let a=n.content[s];a.content=y(a,t.offset,o.offset);}else {let s=f(n,t.paragraphIndex),a=n.content[s],c=I(a);a.content=y(a,t.offset,c.length);let p=f(n,o.paragraphIndex),l=n.content[p];l.content=y(l,0,o.offset),a.content.push(...l.content);let u=[];for(let g=t.paragraphIndex+1;g<=o.paragraphIndex;g++)u.push(f(n,g));for(let g=u.length-1;g>=0;g--)u[g]!==-1&&n.content.splice(u[g],1);}return r}function M(i,e){let r=h(i),n=r.package.document,{start:t,end:o}=e.range;if(t.paragraphIndex===o.paragraphIndex){let s=f(n,t.paragraphIndex);if(s===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let a=n.content[s];a.content=E(a,t.offset,o.offset,e.formatting);}else for(let s=t.paragraphIndex;s<=o.paragraphIndex;s++){let a=f(n,s);if(a===-1)continue;let c=n.content[a],p=I(c),l=0,u=p.length;s===t.paragraphIndex&&(l=t.offset),s===o.paragraphIndex&&(u=o.offset),c.content=E(c,l,u,e.formatting);}return r}function B(i,e){let r=h(i),n=r.package.document,t=f(n,e.paragraphIndex);if(t===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let o=n.content[t];if(o.formatting={...o.formatting,...e.formatting},"numPr"in e.formatting){let s=e.formatting.numPr;if(s&&s.numId!==void 0&&s.numId!==0){let a=s.ilvl??0,c=s.numId===1,p=c?"\u2022":"1.";if(r.package.numbering){let l=r.package.numbering.nums.find(u=>u.numId===s.numId);if(l){let u=r.package.numbering.abstractNums.find(g=>g.abstractNumId===l.abstractNumId);if(u){let g=u.levels.find(d=>d.ilvl===a);g&&(p=g.lvlText||p);}}}o.listRendering={level:a,numId:s.numId,marker:p,isBullet:c};}else delete o.listRendering;}return r}function V(i,e){let r=h(i),n=r.package.document,t=f(n,e.paragraphIndex);if(t===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let o=n.content[t];return o.formatting={...o.formatting,styleId:e.styleId},r}function z(i,e){let r=h(i),n=r.package.document,t=[];for(let a=0;a<e.rows;a++){let c=[];for(let p=0;p<e.columns;p++){let l=e.data?.[a]?.[p]||"";c.push({type:"tableCell",content:[{type:"paragraph",content:l?[C(l)]:[]}]});}t.push({type:"tableRow",formatting:a===0&&e.hasHeader?{header:true}:void 0,cells:c});}let o={type:"table",rows:t},s=f(n,e.position.paragraphIndex);return s===-1?n.content.push(o):n.content.splice(s+1,0,o),r}function F(i,e){let r=h(i),n=r.package.document,t=f(n,e.position.paragraphIndex);if(t===-1)throw new Error(`Paragraph index ${e.position.paragraphIndex} not found`);let o=n.content[t],a={type:"run",content:[{type:"drawing",image:{type:"image",rId:`rId_img_${Date.now()}`,src:e.src,alt:e.alt,size:{width:d$1(e.width||100),height:d$1(e.height||100)},wrap:{type:"inline"}}}]},c=T(o,e.position.offset,"",void 0),p=false,l=0;for(let u=0;u<c.length;u++){let g=c[u];if(g.type==="run"){let d=g.content.filter(m=>m.type==="text").map(m=>m.text).join("");if(l+=d.length,!p&&l>=e.position.offset){c.splice(u+1,0,a),p=true;break}}}return p||c.push(a),o.content=c,r}function L(i,e){let r=h(i),n=r.package.document,{start:t,end:o}=e.range;if(t.paragraphIndex!==o.paragraphIndex)throw new Error("Hyperlinks cannot span multiple paragraphs");let s=f(n,t.paragraphIndex);if(s===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let a=n.content[s],c=I(a),p=e.displayText||c.slice(t.offset,o.offset);a.content=y(a,t.offset,o.offset);let l={type:"hyperlink",href:e.url,tooltip:e.tooltip,children:[C(p)]},u=false,g=0,d=[];for(let m of a.content)if(m.type==="run"){let b=m.content.filter(x=>x.type==="text").map(x=>x.text).join(""),D=g+b.length;if(!u&&g<=t.offset&&t.offset<=D){let x=t.offset-g;x>0&&d.push({...m,content:[{type:"text",text:b.slice(0,x)}]}),d.push(l),x<b.length&&d.push({...m,content:[{type:"text",text:b.slice(x)}]}),u=true;}else d.push(m);g=D;}else d.push(m);return u||d.push(l),a.content=d,r}function O(i,e){let r=h(i),n=r.package.document,{start:t}=e.range,o=f(n,t.paragraphIndex);if(o===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let s=n.content[o],a=[];for(let c of s.content)if(c.type==="hyperlink")for(let p of c.children)p.type==="run"&&a.push(p);else a.push(c);return s.content=a,r}function R(i,e){let r=h(i),n=r.package.document,t=f(n,e.position.paragraphIndex);if(t===-1)throw new Error(`Paragraph index ${e.position.paragraphIndex} not found`);let o=n.content[t],s=I(o),a=y({...o,content:[...o.content]},e.position.offset,s.length),c=y({...o,content:[...o.content]},0,e.position.offset);o.content=a;let p={type:"paragraph",formatting:o.formatting,content:c};return n.content.splice(t+1,0,p),r}function j(i,e){let r=h(i),n=r.package.document,t=f(n,e.paragraphIndex);if(t===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let o=n.content[t],s=[];for(let a=1;a<=e.count;a++){let c=f(n,e.paragraphIndex+a);if(c!==-1){let p=n.content[c];o.content.push(...p.content),s.push(c);}}for(let a=s.length-1;a>=0;a--)n.content.splice(s[a],1);return r}function N(i,e){return R(i,{position:e.position})}function _(i,e){let r=h(i);return r.templateVariables||(r.templateVariables=[]),r.templateVariables.includes(e.name)||r.templateVariables.push(e.name),r}function J(i,e){let r=h(i),n=r.package.document;function t(a){for(let c of a.content)if(c.type==="text")for(let[p,l]of Object.entries(e.values)){let u=new RegExp(`\\{${p}\\}`,"g");c.text=c.text.replace(u,l);}}function o(a){for(let c of a.content)if(c.type==="run")t(c);else if(c.type==="hyperlink")for(let p of c.children)p.type==="run"&&t(p);}function s(a){if(a.type==="paragraph")o(a);else if(a.type==="table")for(let c of a.rows)for(let p of c.cells)for(let l of p.content)s(l);}for(let a of n.content)s(a);return r}export{H as a,Q as b};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var S={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"};function T(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let r=t.getRangeAt(0);if(e&&!e.contains(r.commonAncestorContainer))return [];let n=r.getClientRects(),o=[],c=0,l=0;if(e){let a=e.getBoundingClientRect();c=a.left+e.scrollLeft,l=a.top+e.scrollTop;}for(let a=0;a<n.length;a++){let s=n[a];s.width===0&&s.height===0||o.push({left:s.left-c,top:s.top-l,width:s.width,height:s.height});}return o}function R(e,t=2){if(e.length<=1)return e;let r=[...e].sort((c,l)=>Math.abs(c.top-l.top)<t?c.left-l.left:c.top-l.top),n=[],o={...r[0]};for(let c=1;c<r.length;c++){let l=r[c],a=Math.abs(l.top-o.top)<t,s=l.left<=o.left+o.width+t;if(a&&s){let g=Math.max(o.left+o.width,l.left+l.width);o.width=g-o.left,o.height=Math.max(o.height,l.height);}else n.push(o),o={...l};}return n.push(o),n}function y(e){let t=T(e);return R(t)}function A(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function k(){let e=window.getSelection();return e?e.toString():""}function N(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let r=t.getRangeAt(0);return e.contains(r.commonAncestorContainer)}var d=null;function I(e=S){w();let t=`
|
|
2
|
+
/* DOCX Editor Selection Highlighting */
|
|
3
|
+
|
|
4
|
+
/* Base selection style for all editable content */
|
|
5
|
+
.docx-editor [contenteditable="true"]::selection,
|
|
6
|
+
.docx-editor [contenteditable="true"] *::selection,
|
|
7
|
+
.docx-run-editable::selection,
|
|
8
|
+
.docx-run-editable *::selection {
|
|
9
|
+
background-color: ${e.backgroundColor} !important;
|
|
10
|
+
color: inherit !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Firefox selection */
|
|
14
|
+
.docx-editor [contenteditable="true"]::-moz-selection,
|
|
15
|
+
.docx-editor [contenteditable="true"] *::-moz-selection,
|
|
16
|
+
.docx-run-editable::-moz-selection,
|
|
17
|
+
.docx-run-editable *::-moz-selection {
|
|
18
|
+
background-color: ${e.backgroundColor} !important;
|
|
19
|
+
color: inherit !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Ensure selection is visible against all backgrounds */
|
|
23
|
+
.docx-run-highlighted::selection,
|
|
24
|
+
.docx-run-highlighted *::selection {
|
|
25
|
+
/* For highlighted (yellow background) text, use darker selection */
|
|
26
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.docx-run-highlighted::-moz-selection,
|
|
30
|
+
.docx-run-highlighted *::-moz-selection {
|
|
31
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Selection in dark text */
|
|
35
|
+
.docx-run-dark-bg::selection,
|
|
36
|
+
.docx-run-dark-bg *::selection {
|
|
37
|
+
/* Use lighter selection for dark backgrounds */
|
|
38
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.docx-run-dark-bg::-moz-selection,
|
|
42
|
+
.docx-run-dark-bg *::-moz-selection {
|
|
43
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Programmatic highlight class */
|
|
47
|
+
.docx-selection-highlight {
|
|
48
|
+
background-color: ${e.backgroundColor};
|
|
49
|
+
${e.borderRadius?`border-radius: ${e.borderRadius}px;`:""}
|
|
50
|
+
${e.mixBlendMode?`mix-blend-mode: ${e.mixBlendMode};`:""}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Find/replace highlight */
|
|
54
|
+
.docx-find-highlight {
|
|
55
|
+
background-color: rgba(255, 235, 59, 0.5);
|
|
56
|
+
border-radius: 2px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.docx-find-highlight-current {
|
|
60
|
+
background-color: rgba(255, 152, 0, 0.6);
|
|
61
|
+
border-radius: 2px;
|
|
62
|
+
outline: 2px solid rgba(255, 152, 0, 0.8);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* AI action selection preview */
|
|
66
|
+
.docx-ai-selection-preview {
|
|
67
|
+
background-color: rgba(156, 39, 176, 0.2);
|
|
68
|
+
border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
|
|
69
|
+
}
|
|
70
|
+
`;d=document.createElement("style"),d.id="docx-selection-styles",d.textContent=t,document.head.appendChild(d);}function w(){d&&(d.remove(),d=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function P(){return d!==null||document.getElementById("docx-selection-styles")!==null}function E(e,t,r){let n=0;for(let o=t;o<t+r&&o<e.length;o++)n+=e[o];return n}function v(e,t,r,n){let o=E(e,t,r),c=Math.floor(o/Math.max(n,1)),l=o-c*n,a=Array.from({length:n},(s,g)=>c+(g<l?1:0));return [...e.slice(0,t),...a,...e.slice(t+r)]}function H(e,t,r,n,o,c){let l=r-t.rowspan,a=n-t.colspan,s=o+l,g=t.row+t.rowspan,x=t.col+t.colspan,p=[];for(let i of e){if(i===t)continue;let u=i.row+i.rowspan,f=i.col+i.colspan,b=i.row<g&&u>t.row,C=i.col<x&&f>t.col;p.push({data:i.data,row:i.row>=g?i.row+l:i.row,col:i.col>=x?i.col+a:i.col,rowspan:i.rowspan+(l>0&&b&&!C?l:0),colspan:i.colspan+(a>0&&C&&!b?a:0)});}for(let i=0;i<r;i++)for(let u=0;u<n;u++){let f=i===0&&u===0;p.push({data:c(f,i,u),row:t.row+i,col:t.col+u,rowspan:1,colspan:1});}return {anchors:p,deltaRows:l,deltaCols:a,newRowCount:s}}function M(e){let t=new Map,r=new Map;for(let n of e){t.set(`${n.row}-${n.col}`,n);for(let o=n.row;o<n.row+n.rowspan;o++)for(let c=n.col;c<n.col+n.colspan;c++)r.set(`${o}-${c}`,n);}return {byStart:t,byCoveredSlot:r}}function O(e,t){let r=e>1||t>1;return {minRows:e,minCols:t,initialRows:e,initialCols:r?t:t+1}}var B=/[\p{L}\p{N}\p{M}_''\-]/u,W=/\s/;function m(e){return !e||e.length===0?false:B.test(e)}function h(e){return !e||e.length===0?false:W.test(e)}function D(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let r=e[t];if(h(r)){let n=t,o=t;for(;n>0&&h(e[n-1]);)n--;for(;o<e.length&&h(e[o]);)o++;return [n,o]}if(m(r)){let n=t,o=t;for(;n>0&&m(e[n-1]);)n--;for(;o<e.length&&m(e[o]);)o++;return [n,o]}return [t,t+1]}async function _(e){let t=e.target;if(!t||!t.files)return null;let r=t.files[0];return t.value="",r?{buffer:await r.arrayBuffer(),name:r.name.replace(/\.docx$/i,"")}:null}export{S as a,y as b,A as c,k as d,N as e,I as f,P as g,E as h,v as i,H as j,M as k,O as l,D as m,_ as n};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkNLFXR2VH_js=require('./chunk-NLFXR2VH.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var J={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Q={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"400px",maxWidth:"500px",width:"100%",margin:"20px"},Z={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},ee={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},te={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},re={padding:"20px"},v={marginBottom:"16px"},E={display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},x={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",boxSizing:"border-box",outline:"none"},oe={...x,borderColor:"var(--doc-error)"},ie={...x,cursor:"pointer"},le={color:"var(--doc-error)",fontSize:"12px",marginTop:"4px"},z={color:"var(--doc-text-muted)",fontSize:"12px",marginTop:"4px"},ne={display:"flex",borderBottom:"1px solid var(--doc-border)",marginBottom:"16px"},H={padding:"10px 16px",border:"none",background:"none",cursor:"pointer",fontSize:"14px",color:"var(--doc-text-muted)",borderBottom:"2px solid transparent",marginBottom:"-1px"},F={...H,color:"var(--doc-link)",borderBottomColor:"var(--doc-link)",fontWeight:500},ae={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},C={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},se={...C,backgroundColor:"var(--doc-link)",color:"white"},pe={...C,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},de={...C,backgroundColor:"var(--doc-error)",color:"white"},ce={...C,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function G(t){if(!t||t.trim()==="")return false;let e=t.trim();if(e.startsWith("mailto:")||e.startsWith("tel:"))return e.length>7;if(e.startsWith("ftp://"))return e.length>6;try{let d=e.match(/^https?:\/\//)?e:`https://${e}`,k=new URL(d);return k.protocol==="http:"||k.protocol==="https:"}catch{return false}}function M(t){if(!t)return "";let e=t.trim();return e.startsWith("mailto:")||e.startsWith("tel:")||e.startsWith("ftp://")||e.match(/^https?:\/\//)?e:`https://${e}`}function ge(t){if(!t)return "unknown";let e=t.trim().toLowerCase();return e.startsWith("mailto:")?"email":e.startsWith("tel:")?"phone":e.startsWith("ftp://")?"ftp":e.startsWith("http://")||e.startsWith("https://")?"web":e.includes("@")&&!e.includes(" ")?"email":"web"}function ue({isOpen:t,onClose:e,onSubmit:d,onRemove:k,initialData:s,selectedText:h="",isEditing:n=false,bookmarks:R=[],className:$,style:K}){let{t:r}=chunkNLFXR2VH_js.c(),[l,g]=react.useState("url"),[p,L]=react.useState(""),[D,_]=react.useState(""),[b,N]=react.useState(""),[O,P]=react.useState(""),[y,m]=react.useState(""),[B,f]=react.useState(false),Y=react.useRef(null),U=react.useRef(null);react.useEffect(()=>{t&&(s?(s.bookmark?(g("bookmark"),N(s.bookmark)):(g("url"),L(s.url||"")),_(s.displayText||""),P(s.tooltip||"")):(g("url"),L(""),_(h),N(""),P("")),m(""),f(false));},[t,s,h]),react.useEffect(()=>{t&&setTimeout(()=>{l==="url"?Y.current?.focus():U.current?.focus();},100);},[t,l]);let V=react.useCallback(()=>{l==="url"&&p.trim()?G(p)?m(""):m(r("dialogs.hyperlink.invalidUrl")):m("");},[l,p,r]),S=react.useCallback(o=>{if(o?.preventDefault(),l==="url"){if(!p.trim()){m(r("dialogs.hyperlink.urlRequired")),f(true);return}if(!G(p)){m(r("dialogs.hyperlink.invalidUrl")),f(true);return}}else if(l==="bookmark"&&!b)return;let T={displayText:D.trim()||void 0,tooltip:O.trim()||void 0};l==="url"?T.url=M(p):T.bookmark=b,d(T);},[l,p,b,D,O,d]),X=react.useCallback(o=>{o.key==="Escape"?e():o.key==="Enter"&&!o.shiftKey&&o.target.tagName!=="TEXTAREA"&&(o.preventDefault(),S());},[e,S]),j=react.useCallback(o=>{o.target===o.currentTarget&&e();},[e]);if(!t)return null;let q=R.length>0,A=l==="url"&&p.trim()&&!y||l==="bookmark"&&b;return jsxRuntime.jsx("div",{className:`docx-hyperlink-dialog-overlay ${$||""}`,style:{...J,...K},onClick:j,onKeyDown:X,role:"dialog","aria-modal":"true","aria-labelledby":"hyperlink-dialog-title",children:jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog",style:Q,children:[jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-header",style:Z,children:[jsxRuntime.jsx("h2",{id:"hyperlink-dialog-title",style:ee,children:r(n?"dialogs.hyperlink.titleEdit":"dialogs.hyperlink.titleInsert")}),jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-close",style:te,onClick:e,"aria-label":r("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("form",{className:"docx-hyperlink-dialog-body",style:re,onSubmit:S,children:[q&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-tabs",style:ne,children:[jsxRuntime.jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="url"?"active":""}`,style:l==="url"?F:H,onClick:()=>g("url"),"aria-selected":l==="url",children:r("dialogs.hyperlink.tabWebAddress")}),jsxRuntime.jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="bookmark"?"active":""}`,style:l==="bookmark"?F:H,onClick:()=>g("bookmark"),"aria-selected":l==="bookmark",children:r("dialogs.hyperlink.tabBookmark")})]}),l==="url"&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-url",style:E,children:r("dialogs.hyperlink.urlLabel")}),jsxRuntime.jsx("input",{ref:Y,id:"hyperlink-url",type:"text",className:"docx-hyperlink-dialog-input",style:y&&B?oe:x,value:p,onChange:o=>{L(o.target.value),B&&m("");},onBlur:()=>{f(true),V();},placeholder:r("dialogs.hyperlink.urlPlaceholder"),"aria-invalid":!!y,"aria-describedby":y?"url-error":"url-hint"}),y&&B&&jsxRuntime.jsx("div",{id:"url-error",style:le,children:y}),!y&&jsxRuntime.jsx("div",{id:"url-hint",style:z,children:r("dialogs.hyperlink.urlHint")})]}),l==="bookmark"&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-bookmark",style:E,children:r("dialogs.hyperlink.bookmarkLabel")}),jsxRuntime.jsxs("select",{ref:U,id:"hyperlink-bookmark",className:"docx-hyperlink-dialog-select",style:ie,value:b,onChange:o=>N(o.target.value),children:[jsxRuntime.jsx("option",{value:"",children:r("dialogs.hyperlink.bookmarkPlaceholder")}),R.map(o=>jsxRuntime.jsx("option",{value:o.name,children:o.label||o.name},o.name))]})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-display-text",style:E,children:r("dialogs.hyperlink.displayTextLabel")}),jsxRuntime.jsx("input",{id:"hyperlink-display-text",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:D,onChange:o=>_(o.target.value),placeholder:r("dialogs.hyperlink.displayTextPlaceholder")}),jsxRuntime.jsx("div",{style:z,children:r("dialogs.hyperlink.displayTextHint")})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-tooltip",style:E,children:r("dialogs.hyperlink.tooltipLabel")}),jsxRuntime.jsx("input",{id:"hyperlink-tooltip",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:O,onChange:o=>P(o.target.value),placeholder:r("dialogs.hyperlink.tooltipPlaceholder")})]})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-footer",style:ae,children:[n&&k&&jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-remove",style:de,onClick:k,children:r("dialogs.hyperlink.removeLink")}),jsxRuntime.jsx("div",{style:{flex:1}}),jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-cancel",style:pe,onClick:e,children:r("common.cancel")}),jsxRuntime.jsx("button",{type:"submit",className:"docx-hyperlink-dialog-submit",style:A?se:ce,onClick:S,disabled:!A,children:r(n?"common.update":"common.insert")})]})]})})}function be(t,e){return {url:M(t),displayText:e}}function xe(t,e){return {bookmark:t,displayText:e}}function he(t){return !!t.url&&!t.bookmark}function fe(t){return !!t.bookmark}function Se(t){return t.displayText?t.displayText:t.url?t.url.replace(/^https?:\/\//,""):t.bookmark?t.bookmark:""}function Te(t){return t.startsWith("mailto:")?t:`mailto:${t}`}function ve(t){return t.startsWith("tel:")?t:`tel:${t.replace(/[\s\-\(\)\.]/g,"")}`}function Ee(t){return t.filter(e=>!e.name.startsWith("_")).map(e=>({name:e.name,label:e.name})).sort((e,d)=>e.name.localeCompare(d.name))}function Ce(){let[t,e]=react.useState({isOpen:false,isEditing:false}),d=react.useCallback(n=>{e({isOpen:true,selectedText:n,initialData:void 0,isEditing:false});},[]),k=react.useCallback(n=>{e({isOpen:true,initialData:n,selectedText:n.displayText,isEditing:true});},[]),s=react.useCallback(()=>{e(n=>({...n,isOpen:false}));},[]),h=react.useCallback(()=>{e(n=>({...n,isOpen:!n.isOpen}));},[]);return {state:t,openInsert:d,openEdit:k,close:s,toggle:h}}var Le=ue;
|
|
2
2
|
exports.a=G;exports.b=M;exports.c=ge;exports.d=ue;exports.e=be;exports.f=xe;exports.g=he;exports.h=fe;exports.i=Se;exports.j=Te;exports.k=ve;exports.l=Ee;exports.m=Ce;exports.n=Le;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c as c$1}from'./chunk-7QQSDIWK.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var E=[{labelKey:"dialogs.pageSetup.pageSizes.letter",width:12240,height:15840},{labelKey:"dialogs.pageSetup.pageSizes.a4",width:11906,height:16838},{labelKey:"dialogs.pageSetup.pageSizes.legal",width:12240,height:20160},{labelKey:"dialogs.pageSetup.pageSizes.a3",width:16838,height:23811},{labelKey:"dialogs.pageSetup.pageSizes.a5",width:8391,height:11906},{labelKey:"dialogs.pageSetup.pageSizes.b5",width:9979,height:14175},{labelKey:"dialogs.pageSetup.pageSizes.executive",width:10440,height:15120}];function f(i){return Math.round(i/1440*100)/100}function x(i){return Math.round(i*1440)}function J(i,l){let b=Math.min(i,l),n=Math.max(i,l);return E.findIndex(a=>Math.abs(a.width-b)<20&&Math.abs(a.height-n)<20)}var O={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},V={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},H={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},g={display:"flex",alignItems:"center",gap:12},c={width:80,fontSize:13,color:"var(--doc-text-muted)"},y={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},N={...y},C={fontSize:11,color:"var(--doc-text-muted)",width:16},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},A={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},_=12240,B=15840,p=1440;function ae({isOpen:i,onClose:l,onApply:b,currentProps:n}){let{t:a}=c$1(),[u,h]=useState(_),[S,m]=useState(B),[r,K]=useState("portrait"),[P,M]=useState(p),[w,R]=useState(p),[z,k]=useState(p),[T,D]=useState(p);useEffect(()=>{if(!i)return;let e=n?.pageWidth||_,s=n?.pageHeight||B,j=n?.orientation||(e>s?"landscape":"portrait");h(e),m(s),K(j),M(n?.marginTop??p),R(n?.marginBottom??p),k(n?.marginLeft??p),D(n?.marginRight??p);},[i,n]);let F=useCallback(e=>{if(e<0)return;let s=E[e];r==="landscape"?(h(s.height),m(s.width)):(h(s.width),m(s.height));},[r]),G=useCallback(e=>{e!==r&&(K(e),h(S),m(u));},[r,u,S]),I=useCallback(()=>{b({pageWidth:u,pageHeight:S,orientation:r,marginTop:P,marginBottom:w,marginLeft:z,marginRight:T}),l();},[u,S,r,P,w,z,T,b,l]),U=useCallback(e=>{e.key==="Escape"&&l(),e.key==="Enter"&&I();},[l,I]);if(!i)return null;let W=J(u,S);return jsx("div",{style:O,onClick:l,onKeyDown:U,children:jsxs("div",{style:Q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":a("dialogs.pageSetup.title"),children:[jsx("div",{style:V,children:a("dialogs.pageSetup.title")}),jsxs("div",{style:X,children:[jsx("div",{style:H,children:a("dialogs.pageSetup.pageSize")}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.sizeLabel")}),jsxs("select",{style:N,value:W,onChange:e=>F(Number(e.target.value)),children:[E.map((e,s)=>jsx("option",{value:s,children:a(e.labelKey)},e.labelKey)),W<0&&jsx("option",{value:-1,children:a("dialogs.pageSetup.custom")})]})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.orientation")}),jsxs("select",{style:N,value:r,onChange:e=>G(e.target.value),children:[jsx("option",{value:"portrait",children:a("dialogs.pageSetup.portrait")}),jsx("option",{value:"landscape",children:a("dialogs.pageSetup.landscape")})]})]}),jsx("div",{style:{...H,marginTop:4},children:a("dialogs.pageSetup.margins")}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.top")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(P),onChange:e=>M(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.bottom")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(w),onChange:e=>R(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.left")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(z),onChange:e=>k(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.right")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(T),onChange:e=>D(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]})]}),jsxs("div",{style:Y,children:[jsx("button",{type:"button",style:A,onClick:l,children:a("common.cancel")}),jsx("button",{type:"button",style:{...A,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:I,children:a("common.apply")})]})]})})}export{ae as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkNLFXR2VH_js=require('./chunk-NLFXR2VH.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var ue={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"transparent",display:"flex",alignItems:"flex-start",justifyContent:"flex-end",zIndex:1e4,pointerEvents:"none"},fe={backgroundColor:"white",borderRadius:"4px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.2)",minWidth:"360px",maxWidth:"440px",width:"100%",margin:"60px 20px 20px 20px",pointerEvents:"auto"},xe={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg-subtle)",borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},ge={margin:0,fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},Se={background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"2px 6px",lineHeight:1},be={padding:"16px"},V={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},j={width:"60px",fontSize:"13px",color:"var(--doc-text)",flexShrink:0},k={flex:1,padding:"8px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"3px",fontSize:"13px",boxSizing:"border-box",outline:"none"},X={...k,borderColor:"var(--doc-link)",boxShadow:"0 0 0 2px rgba(5, 99, 193, 0.1)"},me={display:"flex",flexDirection:"column",gap:"6px",marginLeft:"8px"},I={padding:"6px 12px",borderRadius:"3px",fontSize:"12px",fontWeight:500,cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)",minWidth:"80px",textAlign:"center"},$={...I,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text-placeholder)",cursor:"not-allowed"},N={padding:"6px 10px",borderRadius:"3px",fontSize:"14px",cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)"},q={...N,color:"var(--doc-border-input)",cursor:"not-allowed"},he={display:"flex",gap:"16px",marginTop:"4px",marginLeft:"68px"},L={display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"var(--doc-text-muted)",cursor:"pointer"},J={width:"14px",height:"14px",cursor:"pointer"},Q={marginLeft:"68px",fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px"},ve={...Q,color:"var(--doc-error)"},ye=({style:x})=>jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:x,children:jsxRuntime.jsx("polyline",{points:"18 15 12 9 6 15"})}),Re=({style:x})=>jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:x,children:jsxRuntime.jsx("polyline",{points:"6 9 12 15 18 9"})});function Te({isOpen:x,onClose:b,onFind:m,onFindNext:F,onFindPrevious:P,onReplace:_,onReplaceAll:O,onHighlightMatches:g,onClearHighlights:r,initialSearchText:v="",replaceMode:y=false,currentResult:R,className:Z,style:H}){let{t:n}=chunkNLFXR2VH_js.c(),[a,D]=react.useState(""),[h,w]=react.useState(""),[T,A]=react.useState(y),[d,ee]=react.useState(false),[p,te]=react.useState(false),[t,u]=react.useState(null),[oe,B]=react.useState(false),[ne,Y]=react.useState(false),C=react.useRef(null),U=react.useRef(null);react.useEffect(()=>{R!==void 0&&u(R);},[R]),react.useEffect(()=>{if(x){if(D(v),w(""),A(y),u(null),setTimeout(()=>{C.current?.focus(),C.current?.select();},100),v){let e=m(v,{matchCase:d,matchWholeWord:p});u(e),e?.matches&&g&&g(e.matches);}}else r&&r();},[x,v,y]);let i=react.useCallback(()=>{if(!a.trim()){u(null),r&&r();return}let e=m(a,{matchCase:d,matchWholeWord:p});u(e),e?.matches&&g?g(e.matches):r&&r();},[a,d,p,m,g,r]);react.useEffect(()=>{x&&a.trim()&&i();},[d,p]);let ae=react.useCallback(e=>{D(e.target.value);},[]),le=react.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),e.shiftKey?M():t?K():i()):e.key==="Escape"&&b();},[t,i,b]),re=react.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),W()):e.key==="Escape"&&b();},[b]),K=react.useCallback(()=>{if(!a.trim()){i();return}if(!t){i();return}if(F()&&t){let c=(t.currentIndex+1)%t.totalCount;u({...t,currentIndex:c});}},[a,t,i,F]),M=react.useCallback(()=>{if(!a.trim()){i();return}if(!t){i();return}if(P()&&t){let c=t.currentIndex===0?t.totalCount-1:t.currentIndex-1;u({...t,currentIndex:c});}},[a,t,i,P]),W=react.useCallback(()=>{if(!t||t.totalCount===0)return;if(_(h)){let c=m(a,{matchCase:d,matchWholeWord:p});u(c),c?.matches&&g&&g(c.matches);}},[t,h,a,d,p,_,m,g]),ie=react.useCallback(()=>{if(!a.trim())return;O(a,h,{matchCase:d,matchWholeWord:p})>0&&(u({matches:[],totalCount:0,currentIndex:-1}),r&&r());},[a,h,d,p,O,r]),ce=react.useCallback(()=>{A(e=>{let c=!e;return c&&setTimeout(()=>U.current?.focus(),100),c});},[]),se=react.useCallback(e=>{e.target,e.currentTarget;},[]),de=react.useCallback(e=>{e.key==="Escape"&&b();},[b]);if(!x)return null;let f=t&&t.totalCount>0,pe=t&&t.totalCount===0&&a.trim();return jsxRuntime.jsx("div",{className:`docx-find-replace-dialog-overlay ${Z||""}`,style:{...ue,...H},onClick:se,onKeyDown:de,children:jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog","data-testid":"find-replace-dialog",style:fe,role:"dialog","aria-modal":"false","aria-labelledby":"find-replace-dialog-title",children:[jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-header",style:xe,children:[jsxRuntime.jsx("h2",{id:"find-replace-dialog-title",style:ge,children:n(T?"dialogs.findReplace.titleFindReplace":"dialogs.findReplace.titleFind")}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-close",style:Se,onClick:b,"aria-label":n("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-body",style:be,children:[jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-row",style:V,children:[jsxRuntime.jsx("label",{htmlFor:"find-text",style:j,children:n("dialogs.findReplace.findLabel")}),jsxRuntime.jsx("input",{ref:C,id:"find-text",type:"text",className:"docx-find-replace-dialog-input",style:oe?X:k,value:a,onChange:ae,onKeyDown:le,onFocus:()=>B(true),onBlur:()=>{B(false),a.trim()&&!t&&i();},placeholder:n("dialogs.findReplace.findPlaceholder"),"aria-label":n("dialogs.findReplace.findAriaLabel")}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:"4px"},children:[jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:f?N:q,onClick:M,disabled:!f,"aria-label":n("dialogs.findReplace.findPrevious"),title:n("dialogs.findReplace.findPreviousTitle"),children:jsxRuntime.jsx(ye,{})}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:f?N:q,onClick:K,disabled:!f,"aria-label":n("dialogs.findReplace.findNext"),title:n("dialogs.findReplace.findNextTitle"),children:jsxRuntime.jsx(Re,{})})]})]}),f&&jsxRuntime.jsx("div",{className:"docx-find-replace-dialog-status",style:Q,children:n("dialogs.findReplace.matchCount",{current:t.currentIndex+1,total:t.totalCount})}),pe&&jsxRuntime.jsx("div",{className:"docx-find-replace-dialog-status",style:ve,children:n("dialogs.findReplace.noResults")}),T&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-row",style:V,children:[jsxRuntime.jsx("label",{htmlFor:"replace-text",style:j,children:n("dialogs.findReplace.replaceLabel")}),jsxRuntime.jsx("input",{ref:U,id:"replace-text",type:"text",className:"docx-find-replace-dialog-input",style:ne?X:k,value:h,onChange:e=>w(e.target.value),onKeyDown:re,onFocus:()=>Y(true),onBlur:()=>Y(false),placeholder:n("dialogs.findReplace.replacePlaceholder"),"aria-label":n("dialogs.findReplace.replaceAriaLabel")}),jsxRuntime.jsxs("div",{style:me,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:f?I:$,onClick:W,disabled:!f,title:n("dialogs.findReplace.replaceCurrentTitle"),children:n("dialogs.findReplace.replaceButton")}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:f?I:$,onClick:ie,disabled:!f,title:n("dialogs.findReplace.replaceAllTitle"),children:n("dialogs.findReplace.replaceAllButton")})]})]})}),jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-options",style:he,children:[jsxRuntime.jsxs("label",{className:"docx-find-replace-dialog-option",style:L,children:[jsxRuntime.jsx("input",{type:"checkbox",style:J,checked:d,onChange:e=>ee(e.target.checked)}),n("dialogs.findReplace.matchCase")]}),jsxRuntime.jsxs("label",{className:"docx-find-replace-dialog-option",style:L,children:[jsxRuntime.jsx("input",{type:"checkbox",style:J,checked:p,onChange:e=>te(e.target.checked)}),n("dialogs.findReplace.wholeWords")]}),!T&&jsxRuntime.jsx("button",{type:"button",style:{...L,background:"none",border:"none",cursor:"pointer",color:"var(--doc-link)",padding:0},onClick:ce,children:n("dialogs.findReplace.toggleReplace")})]})]})]})})}var Me=Te;exports.a=Te;exports.b=Me;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {l,i,j as j$1,k}from'./chunk-RCIZ7OM3.mjs';import {c}from'./chunk-7QQSDIWK.mjs';import kt,{useRef,useState,useEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Yt({isOpen:t,onClose:n,align:l="left"}){let r=useRef(null),v=useRef(null),[h,a]=useState({top:0,left:0});useEffect(()=>{if(!t||!r.current)return;let c=r.current.getBoundingClientRect();l==="right"?requestAnimationFrame(()=>{if(v.current){let i=v.current.getBoundingClientRect();a({top:c.bottom+4,left:c.right-i.width});}else a({top:c.bottom+4,left:c.left});}):a({top:c.bottom+4,left:c.left});},[t,l]),useEffect(()=>{if(!t)return;let c=Z=>{let f=Z.target;r.current&&!r.current.contains(f)&&v.current&&!v.current.contains(f)&&n();},i=Z=>{Z.key==="Escape"&&n();},m=()=>n();return document.addEventListener("mousedown",c),document.addEventListener("keydown",i),window.addEventListener("scroll",m,true),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",i),window.removeEventListener("scroll",m,true);}},[t,n]);let p=useCallback(c=>{c.preventDefault(),c.stopPropagation();},[]),u={position:"fixed",top:h.top,left:h.left,zIndex:1e4};return {containerRef:r,dropdownRef:v,dropdownStyle:u,handleMouseDown:p}}function e({size:t=20,className:n="",style:l,children:r}){return jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 -960 960 960",fill:"currentColor",className:n,style:{display:"inline-flex",flexShrink:0,...l},"aria-hidden":"true",children:r})}function V(t){return jsx(e,{...t,children:jsx("path",{d:"M280-200v-80h284q63 0 109.5-40T720-420q0-60-46.5-100T564-560H312l104 104-56 56-200-200 200-200 56 56-104 104h252q97 0 166.5 63T800-420q0 94-69.5 157T564-200H280Z"})})}function U(t){return jsx(e,{...t,children:jsx("path",{d:"M396-200q-97 0-166.5-63T160-420q0-94 69.5-157T396-640h252L544-744l56-56 200 200-200 200-56-56 104-104H396q-63 0-109.5 40T240-420q0 60 46.5 100T396-280h284v80H396Z"})})}function $(t){return jsx(e,{...t,children:jsx("path",{d:"M640-640v-120H320v120h-80v-200h480v200h-80Zm-480 80h640-640Zm560 100q17 0 28.5-11.5T760-500q0-17-11.5-28.5T720-540q-17 0-28.5 11.5T680-500q0 17 11.5 28.5T720-460Zm-80 260v-160H320v160h320Zm80 80H240v-160H80v-240q0-51 35-85.5t85-34.5h560q51 0 85.5 34.5T880-520v240H720v160Zm80-240v-160q0-17-11.5-28.5T760-560H200q-17 0-28.5 11.5T160-520v160h80v-80h480v80h80Z"})})}function j(t){return jsx(e,{...t,children:jsx("path",{d:"M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"})})}function K(t){return jsx(e,{...t,children:jsx("path",{d:"M440-320v-326L336-542l-56-58 200-200 200 200-56 58-104-104v326h-80ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"})})}function G(t){return jsx(e,{...t,children:jsx("path",{d:"M272-200v-560h221q65 0 120 40t55 111q0 51-23 78.5T602-491q25 11 55.5 41t30.5 90q0 89-65 124.5T501-200H272Zm121-112h104q48 0 58.5-24.5T566-372q0-11-10.5-35.5T494-432H393v120Zm0-228h93q33 0 48-17t15-38q0-24-17-39t-44-15h-95v109Z"})})}function Q(t){return jsx(e,{...t,children:jsx("path",{d:"M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"})})}function Y(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120v-80h560v80H200Zm123-223q-56-63-56-167v-330h103v336q0 56 28 91t82 35q54 0 82-35t28-91v-336h103v330q0 104-56 167t-157 63q-101 0-157-63Z"})})}function J(t){return jsx(e,{...t,children:jsx("path",{d:"M486-160q-76 0-135-45t-85-123l88-38q14 48 48.5 79t85.5 31q42 0 76-20t34-64q0-18-7-33t-19-27h112q5 14 7.5 28.5T694-340q0 86-61.5 133T486-160ZM80-480v-80h800v80H80Zm402-326q66 0 115.5 32.5T674-674l-88 39q-9-29-33.5-52T484-710q-41 0-68 18.5T386-640h-96q2-69 54.5-117.5T482-806Z"})})}function X(t){return jsx(e,{...t,children:jsx("path",{d:"M760-600v-80q0-17 11.5-28.5T800-720h80v-40H760v-40h120q17 0 28.5 11.5T920-760v40q0 17-11.5 28.5T880-680h-80v40h120v40H760ZM235-160l185-291-172-269h106l124 200h4l123-200h107L539-451l186 291H618L482-377h-4L342-160H235Z"})})}function t0(t){return jsx(e,{...t,children:jsx("path",{d:"M760-160v-80q0-17 11.5-28.5T800-280h80v-40H760v-40h120q17 0 28.5 11.5T920-320v40q0 17-11.5 28.5T880-240h-80v40h120v40H760Zm-525-80 185-291-172-269h106l124 200h4l123-200h107L539-531l186 291H618L482-457h-4L342-240H235Z"})})}function o0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"})})}function e0(t){return jsx(e,{...t,children:jsx("path",{d:"m528-546-93-93-121-121h486v120H568l-40 94ZM792-56 460-388l-80 188H249l119-280L56-792l56-56 736 736-56 56Z"})})}function n0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Z"})})}function r0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm160-160v-80h400v80H280ZM120-440v-80h720v80H120Zm160-160v-80h400v80H280ZM120-760v-80h720v80H120Z"})})}function l0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-760v-80h720v80H120Zm240 160v-80h480v80H360ZM120-440v-80h720v80H120Zm240 160v-80h480v80H360ZM120-120v-80h720v80H120Z"})})}function v0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Z"})})}function c0(t){return jsx(e,{...t,children:jsx("path",{d:"M240-160 80-320l56-56 64 62v-332l-64 62-56-56 160-160 160 160-56 56-64-62v332l64-62 56 56-160 160Zm240-40v-80h400v80H480Zm0-240v-80h400v80H480Zm0-240v-80h400v80H480Z"})})}function h0(t){return jsx(e,{...t,children:jsx("path",{d:"M360-200v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360ZM200-160q-33 0-56.5-23.5T120-240q0-33 23.5-56.5T200-320q33 0 56.5 23.5T280-240q0 33-23.5 56.5T200-160Zm0-240q-33 0-56.5-23.5T120-480q0-33 23.5-56.5T200-560q33 0 56.5 23.5T280-480q0 33-23.5 56.5T200-400Zm-56.5-263.5Q120-687 120-720t23.5-56.5Q167-800 200-800t56.5 23.5Q280-753 280-720t-23.5 56.5Q233-640 200-640t-56.5-23.5Z"})})}function a0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-80v-60h100v-30h-60v-60h60v-30H120v-60h120q17 0 28.5 11.5T280-280v40q0 17-11.5 28.5T240-200q17 0 28.5 11.5T280-160v40q0 17-11.5 28.5T240-80H120Zm0-280v-110q0-17 11.5-28.5T160-510h60v-30H120v-60h120q17 0 28.5 11.5T280-560v70q0 17-11.5 28.5T240-450h-60v30h100v60H120Zm60-280v-180h-60v-60h120v240h-60Zm180 440v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360Z"})})}function i0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm0 440v-320l160 160-160 160Z"})})}function p0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm160 440L120-480l160-160v320Z"})})}function s0(t){return jsx(e,{...t,children:jsx("path",{d:"M80 0v-160h800V0H80Zm140-280 210-560h100l210 560h-96l-50-144H368l-52 144h-96Zm176-224h168l-82-232h-4l-82 232Z"})})}function m0(t){return jsx(e,{...t,children:jsx("path",{d:"M544-400 440-504 240-304l104 104 200-200Zm-47-161 104 104 199-199-104-104-199 199Zm-84-28 216 216-229 229q-24 24-56 24t-56-24l-2-2-26 26H60l126-126-2-2q-24-24-24-56t24-56l229-229Zm0 0 227-227q24-24 56-24t56 24l104 104q24 24 24 56t-24 56L629-373 413-589Z"})})}function u0(t){return jsx(e,{...t,children:jsx("path",{d:"M800-436q0 36-8 69t-22 63l-62-60q6-17 9-34.5t3-37.5q0-47-17.5-89T650-600L480-768l-88 86-56-56 144-142 226 222q44 42 69 99.5T800-436Zm-8 380L668-180q-41 29-88 44.5T480-120q-133 0-226.5-92.5T160-436q0-51 16-98t48-90L56-792l56-56 736 736-56 56ZM480-200q36 0 68.5-10t61.5-28L280-566q-21 32-30.5 64t-9.5 66q0 98 70 167t170 69Zm-37-204Zm110-116Z"})})}function d0(t){return jsx(e,{...t,children:jsx("path",{d:"M480-360 280-560h400L480-360Z"})})}function Z0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm240-240H200v160h240v-160Zm80 0v160h240v-160H520Zm-80-80v-160H200v160h240Zm80 0h240v-160H520v160ZM200-680h560v-80H200v80Z"})})}function f0(t){return jsx(e,{...t,children:jsx("path",{d:"M760-120H200q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120ZM200-640h560v-120H200v120Zm100 80H200v360h100v-360Zm360 0v360h100v-360H660Zm-80 0H380v360h200v-360Z"})})}function g0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133ZM200-413h133v-134H200v134Zm213 0h134v-134H413v134Zm214 0h133v-134H627v134ZM200-627h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133Z"})})}function T0(t){return jsx(e,{...t,children:jsx("path",{d:"M760-200v-120H200v120h560Zm0-200v-160H200v160h560Zm0-240v-120H200v120h560ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})})}function I0(t){return jsx(e,{...t,children:jsx("path",{d:"M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z"})})}function q0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-720h720v720H120Zm640-80v-240H520v240h240Zm0-560H520v240h240v-240Zm-560 0v240h240v-240H200Zm0 560h240v-240H200v240Z"})})}function b0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-200h560v-560H200v560Zm-80 80v-720h720v720H120Zm160-320v-80h80v80h-80Zm160 160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 160v-80h80v80h-80Z"})})}function H0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-640v-80h80v80h-80Zm320 640v-80h80v80h-80Zm160 0v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm-160 0v-80h80v80h-80ZM440-120v-320H120v-80h320v-320h80v320h320v80H520v320h-80Z"})})}function C0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function S0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})})}function w0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-440v-80h560v80H200Z"})})}function x0(t){return jsx(e,{...t,children:jsx("path",{d:"M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"})})}function M0(t){return jsx(e,{...t,children:jsx("path",{d:"M600-240v-80h160v80H600Zm0-320v-80h280v80H600Zm0 160v-80h240v80H600ZM120-640H80v-80h160v-60h160v60h160v80h-40v360q0 33-23.5 56.5T440-200H200q-33 0-56.5-23.5T120-280v-360Zm80 0v360h240v-360H200Zm0 0v360-360Z"})})}function R0(t){return jsx(e,{...t,children:jsx("path",{d:"m296-160-56-56 200-200v-269L337-582l-57-57 200-200 201 201-57 57-104-104v301L296-160Zm368 1L536-286l57-57 127 128-56 56Z"})})}function P0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-160v-304L240-664v104h-80v-240h240v80H296l224 224v336h-80Zm154-376-58-58 128-126H560v-80h240v240h-80v-104L594-536Z"})})}function _0(t){return jsx(e,{...t,children:jsx("path",{d:"M360-160q-33 0-56.5-23.5T280-240q0-33 23.5-56.5T360-320q33 0 56.5 23.5T440-240q0 33-23.5 56.5T360-160Zm240 0q-33 0-56.5-23.5T520-240q0-33 23.5-56.5T600-320q33 0 56.5 23.5T680-240q0 33-23.5 56.5T600-160ZM360-400q-33 0-56.5-23.5T280-480q0-33 23.5-56.5T360-560q33 0 56.5 23.5T440-480q0 33-23.5 56.5T360-400Zm240 0q-33 0-56.5-23.5T520-480q0-33 23.5-56.5T600-560q33 0 56.5 23.5T680-480q0 33-23.5 56.5T600-400ZM360-640q-33 0-56.5-23.5T280-720q0-33 23.5-56.5T360-800q33 0 56.5 23.5T440-720q0 33-23.5 56.5T360-640Zm240 0q-33 0-56.5-23.5T520-720q0-33 23.5-56.5T600-800q33 0 56.5 23.5T680-720q0 33-23.5 56.5T600-640Z"})})}function y0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"})})}function L0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-280v-400h400v400H120Zm80-80h240v-240H200v240Zm-80-400v-80h720v80H120Zm480 160v-80h240v80H600Zm0 160v-80h240v80H600Zm0 160v-80h240v80H600ZM120-120v-80h720v80H120Z"})})}function A0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-280v-400h400v400H440Zm80-80h240v-240H520v240ZM120-120v-80h720v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h720v80H120Z"})})}function k0(t){return jsx(e,{...t,children:jsx("path",{d:"M160-440v-80h640v80H160Z"})})}function B0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-480h80v480h480v80H200Zm160-240v80q-33 0-56.5-23.5T280-360h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm80-160h-80q0-33 23.5-56.5T360-840v80Zm80 480v-80h80v80h-80Zm0-480v-80h80v80h-80Zm160 0v-80h80v80h-80Zm0 480v-80h80v80h-80Zm160-480v-80q33 0 56.5 23.5T840-760h-80Zm0 400h80q0 33-23.5 56.5T760-280v-80Zm0-80v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function D0(t){return jsx(e,{...t,children:jsx("path",{d:"M360-280q-33 0-56.5-23.5T280-360v-400q0-33 23.5-56.5T360-840h400q33 0 56.5 23.5T840-760v400q0 33-23.5 56.5T760-280H360Zm0-80h400v-400H360v400ZM200-200v80q-33 0-56.5-23.5T120-200h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 480v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function E0(t){return jsx(e,{...t,children:jsx("path",{d:"M480-80 310-250l57-57 73 73v-166h80v165l72-73 58 58L480-80ZM250-310 80-480l169-169 57 57-72 72h166v80H235l73 72-58 58Zm460 0-57-57 73-73H560v-80h165l-73-72 58-58 170 170-170 170ZM440-560v-166l-73 73-57-57 170-170 170 170-57 57-73-73v166h-80Z"})})}function W0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z"})})}function F0(t){return jsx(e,{...t,children:jsx("path",{d:"M522-80v-82q34-5 66.5-18t61.5-34l56 58q-42 32-88 51.5T522-80Zm-80 0Q304-98 213-199.5T122-438q0-75 28.5-140.5t77-114q48.5-48.5 114-77T482-798h6l-62-62 56-58 160 160-160 160-56-56 64-64h-8q-117 0-198.5 81.5T202-438q0 104 68 182.5T442-162v82Zm322-134-58-56q21-29 34-61.5t18-66.5h82q-5 50-24.5 96T764-214Zm76-264h-82q-5-34-18-66.5T706-606l58-56q32 39 51 86t25 98Z"})})}function z0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-80q-50-5-96-24.5T256-156l56-58q29 21 61.5 34t66.5 18v82Zm80 0v-82q104-15 172-93.5T760-438q0-117-81.5-198.5T480-718h-8l64 64-56 56-160-160 160-160 56 58-62 62h6q75 0 140.5 28.5t114 77q48.5 48.5 77 114T840-438q0 137-91 238.5T520-80ZM198-214q-32-42-51.5-88T122-398h82q5 34 18 66.5t34 61.5l-58 56Zm-76-264q6-51 25-98t51-86l58 56q-21 29-34 61.5T204-478h-82Z"})})}function N0(t){return jsx(e,{...t,children:jsx("path",{d:"M280-160 80-360l200-200 56 57-103 103h287v80H233l103 103-56 57Zm400-240-56-57 103-103H440v-80h287L624-743l56-57 200 200-200 200Z"})})}function O0(t){return jsx(e,{...t,children:jsx("path",{d:"M320-440v-287L217-624l-57-56 200-200 200 200-57 56-103-103v287h-80ZM600-80 400-280l57-56 103 103v-287h80v287l103-103 57 56L600-80Z"})})}function V0(t){return jsx(e,{...t,children:jsx("path",{d:"M600-360ZM320-242q10 1 19.5 1.5t20.5.5q11 0 20.5-.5T400-242v82h400v-400h-82q1-10 1.5-19.5t.5-20.5q0-11-.5-20.5T718-640h82q33 0 56.5 23.5T880-560v400q0 33-23.5 56.5T800-80H400q-33 0-56.5-23.5T320-160v-82Zm40-78q-117 0-198.5-81.5T80-600q0-117 81.5-198.5T360-880q117 0 198.5 81.5T640-600q0 117-81.5 198.5T360-320Zm0-80q83 0 141.5-58.5T560-600q0-83-58.5-141.5T360-800q-83 0-141.5 58.5T160-600q0 83 58.5 141.5T360-400Zm0-200Z"})})}function U0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-80q-33 0-56.5-23.5T360-160v-160H240q-33 0-56.5-23.5T160-400v-280q0-66 47-113t113-47h480v440q0 33-23.5 56.5T720-320H600v160q0 33-23.5 56.5T520-80h-80ZM240-560h480v-200h-40v160h-80v-160h-40v80h-80v-80H320q-33 0-56.5 23.5T240-680v120Zm0 160h480v-80H240v80Zm0 0v-80 80Z"})})}function $0(t){return jsx(e,{...t,children:jsx("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})})}function j0(t){return jsx(e,{...t,children:jsx("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})})}function K0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h720v80H120Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function G0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function Q0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-720h80v720h-80Zm160 0v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function Y0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-720h80v720h-80Z"})})}function J0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h720v60H120Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-660v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-165v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-660v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-165v-60h60v60h-60Z"})})}function X0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-330v-60h60v60h-60Zm165 660v-720h60v720h-60Zm165 0v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-330v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Z"})})}function tt(t){return jsx(e,{...t,children:jsx("path",{d:"M320-600q17 0 28.5-11.5T360-640q0-17-11.5-28.5T320-680q-17 0-28.5 11.5T280-640q0 17 11.5 28.5T320-600Zm160 0q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm160 0q17 0 28.5-11.5T680-640q0-17-11.5-28.5T640-680q-17 0-28.5 11.5T600-640q0 17 11.5 28.5T640-600ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"})})}function ot(t){return jsx(e,{...t,children:jsx("path",{d:"M160-200v-80h528l-42-42 56-56 138 138-138 138-56-56 42-42H160Zm116-200 164-440h80l164 440h-76l-38-112H392l-40 112h-76Zm138-176h132l-64-182h-4l-64 182Z"})})}function et(t){return jsx(e,{...t,children:jsx("path",{d:"M588-132 440-280l148-148 56 58-50 50h96q29 0 49.5-20.5T760-390q0-29-20.5-49.5T690-460H160v-80h530q63 0 106.5 43.5T840-390q0 63-43.5 106.5T690-240h-96l50 50-56 58ZM160-240v-80h200v80H160Zm0-440v-80h640v80H160Z"})})}function nt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-120 320-280l56-56 64 63v-414l-64 63-56-56 160-160 160 160-56 57-64-64v414l64-63 56 56-160 160Z"})})}function rt(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-720h80v720h-80Zm640 0v-720h80v720h-80ZM280-440v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function lt(t){return jsx(e,{...t,children:jsx("path",{d:"m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"})})}function vt(t){return jsx(e,{...t,children:jsx("path",{d:"M80 0v-160h800V0H80Zm160-320h56l312-311-29-29-28-28-311 312v56Zm-80 80v-170l448-447q11-11 25.5-17t30.5-6q16 0 31 6t27 18l55 56q12 11 17.5 26t5.5 31q0 15-5.5 29.5T777-687L330-240H160Zm560-504-56-56 56 56ZM608-631l-29-29-28-28 57 57Z"})})}function ct(t){return jsx(e,{...t,children:jsx("path",{d:"m247-904 57-56 343 343q23 23 23 57t-23 57L457-313q-23 23-57 23t-57-23L153-503q-23-23-23-57t23-57l190-191-96-96Zm153 153L209-560h382L400-751Zm360 471q-33 0-56.5-23.5T680-360q0-21 12.5-45t27.5-45q9-12 19-25t21-25q11 12 21 25t19 25q15 21 27.5 45t12.5 45q0 33-23.5 56.5T760-280ZM80 0v-160h800V0H80Z"})})}function ht(t){return jsx(e,{...t,children:jsx("path",{d:"M160-760v-80h640v80H160Zm280 640v-408L336-424l-56-56 200-200 200 200-56 56-104-104v408h-80Z"})})}function at(t){return jsx(e,{...t,children:jsx("path",{d:"M440-80v-168l-64 64-56-56 160-160 160 160-56 56-64-64v168h-80ZM160-440v-80h640v80H160Zm320-120L320-720l56-56 64 64v-168h80v168l64-64 56 56-160 160Z"})})}function it(t){return jsx(e,{...t,children:jsx("path",{d:"M160-120v-80h640v80H160Zm320-160L280-480l56-56 104 104v-408h80v408l104-104 56 56-200 200Z"})})}function pt(t){return jsx(e,{...t,children:jsx("path",{d:"M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"})})}function st(t){return jsx(e,{...t,children:jsx("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})})}function mt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})})}function ut(t){return jsx(e,{...t,children:jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})}function dt(t){return jsx(e,{...t,children:jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})}function Zt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"})})}function ft(t){return jsx(e,{...t,children:jsx("path",{d:"M120-440v-80h160v80H120Zm200 0v-80h160v80H320Zm200 0v-80h160v80H520Zm200 0v-80h120v80H720ZM240-120q-33 0-56.5-23.5T160-200v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-120H240Zm-80-520v-120q0-33 23.5-56.5T240-840h480q33 0 56.5 23.5T800-760v120h-80v-120H240v120h-80Z"})})}function gt(t){return jsx(e,{...t,children:jsx("path",{d:"M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})})}function Tt(t){return jsx(e,{...t,children:jsx("path",{d:"M268-240 42-466l57-56 170 170 56 56-57 56Zm226 0L268-466l56-57 170 170 368-368 57 57-425 424Zm0-226-57-56 198-198 57 56-198 198Z"})})}function It(t){return jsx(e,{...t,children:jsx("path",{d:"m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"})})}function qt(t){return jsx(e,{...t,children:jsx("path",{d:"M80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function bt(t){return jsxs(e,{...t,children:[jsx("path",{d:"M80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"}),jsx("path",{fill:"#188038",d:"m421-380 227-227-45-45-182 182-92-91-45 45 137 136Z"})]})}function Ht(t){return jsx(e,{...t,children:jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})})}function Ct(t){return jsx(e,{...t,children:jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}function St(t){return jsx(e,{...t,children:jsx("path",{d:"M440-400h80v-120h120v-80H520v-120h-80v120H320v80h120v120ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function wt(t){return jsx(e,{...t,children:jsx("path",{d:"M240-400h480v-80H240v80Zm0-120h480v-80H240v80Zm0-120h480v-80H240v80ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function xt(t){return jsx(e,{...t,children:jsx("path",{d:"M160-400h280v-80H160v80Zm0-160h440v-80H160v80Zm0-160h440v-80H160v80Zm360 360v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q8 9 12.5 20t4.5 22q0 11-4 22.5T863-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z"})})}function Mt(t){return jsx(e,{...t,children:jsx("path",{d:"M240-400h122l200-200q9-9 13.5-20.5T580-643q0-11-5-21.5T562-684l-36-38q-9-9-20-13.5t-23-4.5q-11 0-22.5 4.5T440-722L240-522v122Zm280-243-37-37 37 37ZM300-460v-38l101-101 20 18 18 20-101 101h-38Zm121-121 18 20-38-38 20 18Zm26 181h273v-80H527l-80 80ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function Rt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"})})}function Pt(t){return jsx(e,{...t,children:jsx("path",{d:"M360-360v-200q-66 0-113-47t-47-113q0-66 47-113t113-47h320v80h-80v440h-80v-440h-80v440h-80Zm0-280v-160q-33 0-56.5 23.5T280-720q0 33 23.5 56.5T360-640Zm0-80ZM680-80l-56-56 64-64H120v-80h568l-64-64 56-56 160 160L680-80Z"})})}function _t(t){return jsx(e,{...t,children:jsx("path",{d:"M360-360v-200q-66 0-113-47t-47-113q0-66 47-113t113-47h320v80h-80v440h-80v-440h-80v440h-80Zm-88 160 64 64-56 56-160-160 160-160 56 56-64 64h568v80H272Zm88-440v-160q-33 0-56.5 23.5T280-720q0 33 23.5 56.5T360-640Zm0-80Z"})})}function yt(t){return jsx(e,{...t,children:jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}var Lt={undo:V,redo:U,print:$,file_download:j,file_upload:K,format_bold:G,format_italic:Q,format_underlined:Y,strikethrough_s:J,superscript:X,subscript:t0,link:o0,format_clear:e0,format_align_left:n0,format_align_center:r0,format_align_right:l0,format_align_justify:v0,format_line_spacing:c0,format_list_bulleted:h0,format_list_numbered:a0,format_indent_increase:i0,format_indent_decrease:p0,format_color_text:s0,ink_highlighter:m0,format_color_reset:u0,arrow_drop_down:d0,table:Z0,table_chart:f0,grid_on:g0,table_rows:T0,view_column:I0,border_all:q0,border_outer:b0,border_inner:H0,border_clear:C0,add:S0,remove:w0,delete:x0,delete_sweep:M0,call_merge:R0,call_split:P0,drag_indicator:_0,image:y0,format_image_left:L0,format_image_right:A0,horizontal_rule:k0,flip_to_back:B0,flip_to_front:D0,open_with:E0,tune:W0,rotate_right:F0,rotate_left:z0,swap_horiz:N0,swap_vert:O0,shapes:V0,format_paint:U0,expand_more:$0,expand_less:j0,border_top:K0,border_bottom:G0,border_left:Q0,border_right:Y0,border_horizontal:J0,border_vertical:X0,padding:tt,text_rotation_none:ot,wrap_text:et,height:nt,fit_width:rt,settings:lt,border_color:vt,format_color_fill:ct,vertical_align_top:ht,vertical_align_center:at,vertical_align_bottom:it,line_weight:pt,keyboard_arrow_up:st,keyboard_arrow_down:mt,keyboard_arrow_left:ut,keyboard_arrow_right:dt,more_vert:Zt,page_break:ft,arrow_back:gt,done_all:Tt,check_circle:It,chat_bubble_outline:qt,chat_bubble_check:bt,check:Ht,close:Ct,add_comment:St,comment:wt,edit_note:xt,rate_review:Mt,visibility:Rt,format_textdirection_l_to_r:Pt,format_textdirection_r_to_l:_t,"agent-sparkle":yt};function g({name:t,size:n=20,className:l="",style:r}){let v=Lt[t];return v?jsx(v,{size:n,className:l,style:r}):(console.warn(`Icon not found: ${t}`),jsx("span",{className:l,style:{fontSize:n,width:n,height:n,...r},children:t}))}var q=16;function Bt(){return jsx(g,{name:"table_rows",size:q,style:{transform:"scaleY(-1)"}})}function Dt(){return jsx(g,{name:"table_rows",size:q})}function Et(){return jsx(g,{name:"view_column",size:q,style:{transform:"scaleX(-1)"}})}function Wt(){return jsx(g,{name:"view_column",size:q})}function Ft(){return jsx(g,{name:"delete_sweep",size:q})}function zt(){return jsx(g,{name:"delete_sweep",size:q,style:{transform:"rotate(90deg)"}})}function Nt(){return jsx(g,{name:"call_merge",size:q})}function Ot(){return jsx(g,{name:"call_split",size:q})}function Vt(){return jsx(g,{name:"delete",size:q,className:"text-red-600"})}var T={container:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 8px",backgroundColor:"var(--doc-bg-subtle)",borderRadius:"4px",border:"1px solid var(--doc-border)",fontSize:"12px"},containerCompact:{padding:"2px 4px",gap:"2px"},containerFloating:{position:"absolute",zIndex:1e3,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},group:{display:"flex",alignItems:"center",gap:"2px"},separator:{width:"1px",height:"20px",backgroundColor:"var(--doc-border-dark)",margin:"0 4px"},button:{display:"flex",alignItems:"center",justifyContent:"center",gap:"4px",padding:"4px 8px",border:"none",borderRadius:"3px",backgroundColor:"transparent",color:"var(--doc-text)",cursor:"pointer",fontSize:"12px",lineHeight:"1",transition:"background-color 0.15s, color 0.15s"},buttonCompact:{padding:"3px 5px"},buttonHover:{backgroundColor:"var(--doc-border)"},buttonDisabled:{color:"var(--doc-text-subtle)",cursor:"not-allowed"},buttonDelete:{color:"var(--doc-error)"},label:{fontSize:"11px",fontWeight:500,color:"var(--doc-text-muted)",marginRight:"8px",whiteSpace:"nowrap"}};function I({action:t,label:n,icon:l,disabled:r=false,onClick:v,showLabel:h=false,compact:a=false,shortcut:p}){let[u,c]=kt.useState(false),i=typeof t=="string"&&t.startsWith("delete"),m={...T.button,...a?T.buttonCompact:{},...u&&!r?T.buttonHover:{},...r?T.buttonDisabled:{},...i&&!r?T.buttonDelete:{}},Z=p?`${n} (${p})`:n;return jsxs("button",{type:"button",className:`docx-table-toolbar-button docx-table-toolbar-${typeof t=="string"?t:t.type}`,style:m,disabled:r,onClick:v,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),title:Z,"aria-label":n,children:[l,h&&jsx("span",{children:n})]})}function P({children:t,showSeparator:n=true}){return jsxs(Fragment,{children:[jsx("div",{style:T.group,children:t}),n&&jsx("div",{style:T.separator})]})}function co({context:t,onAction:n,disabled:l=false,className:r,style:v,showLabels:h=false,compact:a=false,position:p="top",children:u}){let{t:c$1}=c();if(!t)return null;let i=M=>{!l&&n&&t&&n(M,t);},m=t.rowCount>1,Z=t.columnCount>1,f=t.hasMultiCellSelection,b=t.canSplitCell,H={...T.container,...a?T.containerCompact:{},...p==="floating"?T.containerFloating:{},...v},d=["docx-table-toolbar"];return r&&d.push(r),a&&d.push("docx-table-toolbar-compact"),p==="floating"&&d.push("docx-table-toolbar-floating"),jsxs("div",{className:d.join(" "),style:H,role:"toolbar","aria-label":c$1("table.editingTools"),children:[jsx("span",{style:T.label,children:c$1("table.label")}),jsxs(P,{children:[jsx(I,{action:"addRowAbove",label:c$1("table.insertRowAbove"),icon:jsx(Bt,{}),disabled:l,onClick:()=>i("addRowAbove"),showLabel:h,compact:a}),jsx(I,{action:"addRowBelow",label:c$1("table.insertRowBelow"),icon:jsx(Dt,{}),disabled:l,onClick:()=>i("addRowBelow"),showLabel:h,compact:a}),jsx(I,{action:"deleteRow",label:c$1("table.deleteRow"),icon:jsx(Ft,{}),disabled:l||!m,onClick:()=>i("deleteRow"),showLabel:h,compact:a})]}),jsxs(P,{children:[jsx(I,{action:"addColumnLeft",label:c$1("table.insertColumnLeft"),icon:jsx(Et,{}),disabled:l,onClick:()=>i("addColumnLeft"),showLabel:h,compact:a}),jsx(I,{action:"addColumnRight",label:c$1("table.insertColumnRight"),icon:jsx(Wt,{}),disabled:l,onClick:()=>i("addColumnRight"),showLabel:h,compact:a}),jsx(I,{action:"deleteColumn",label:c$1("table.deleteColumn"),icon:jsx(zt,{}),disabled:l||!Z,onClick:()=>i("deleteColumn"),showLabel:h,compact:a})]}),jsxs(P,{showSeparator:false,children:[jsx(I,{action:"mergeCells",label:c$1("table.mergeCells"),icon:jsx(Nt,{}),disabled:l||!f,onClick:()=>i("mergeCells"),showLabel:h,compact:a}),jsx(I,{action:"splitCell",label:c$1("table.splitCell"),icon:jsx(Ot,{}),disabled:l||!b,onClick:()=>i("splitCell"),showLabel:h,compact:a}),jsx(I,{action:"deleteTable",label:c$1("table.deleteTable"),icon:jsx(Vt,{}),disabled:l,onClick:()=>i("deleteTable"),showLabel:h,compact:a})]}),u]})}function ho(t,n){let l=t.rows.length,r=y(t),v=!!(n.selectedCells&&(n.selectedCells.startRow!==n.selectedCells.endRow||n.selectedCells.startCol!==n.selectedCells.endCol)),a=!!F(t,n.rowIndex,n.columnIndex)&&!v;return {table:t,selection:n,hasMultiCellSelection:v,canSplitCell:a,rowCount:l,columnCount:r}}function y(t){if(!t.rows.length)return 0;let n=0;for(let l of t.rows){let r=0;for(let v of l.cells)r+=v.formatting?.gridSpan??1;n=Math.max(n,r);}return n}function F(t,n,l){let r=t.rows[n];if(!r)return null;let v=0;for(let h of r.cells){let a=h.formatting?.gridSpan??1;if(l>=v&&l<v+a)return h;v+=a;}return null}function Ut(t,n){let l=[],r=0;for(let v of t.cells){let h=v.formatting?.gridSpan??1;l.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...v.formatting,vMerge:void 0}}),r+=h;}for(;r<n;)l.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}),r++;return {type:"tableRow",cells:l,formatting:{...t.formatting,header:false}}}function $t(){return {type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}}function jt(t,n){let l=0;for(let r of t.cells){let v=r.formatting?.gridSpan??1;if(l===n)return r;l+=v;}return null}function z(t){let n=[],l=0;for(let r=0;r<t.rows.length;r++){let v=t.rows[r],h=0;for(let a of v.cells){let p=a.formatting?.gridSpan??1;if(a.formatting?.vMerge!=="continue"){let u=1;if(a.formatting?.vMerge==="restart")for(let c=r+1;c<t.rows.length;c++){let i=jt(t.rows[c],h);if(!i||i.formatting?.vMerge!=="continue")break;u+=1;}n.push({data:a,row:r,col:h,rowspan:u,colspan:p});}h+=p,l=Math.max(l,h);}}return {anchors:n,totalCols:l}}function _(t,n,l){let r={...t.formatting??{}};return n>1?r.gridSpan=n:delete r.gridSpan,l>1?r.vMerge="restart":delete r.vMerge,Object.keys(r).length?r:void 0}function Kt(t,n){let l={...t.formatting??{}};return n>1?l.gridSpan=n:delete l.gridSpan,l.vMerge="continue",l}function ao(t,n,l$1){let{anchors:r}=z(t),v=r.find(h=>n>=h.row&&n<h.row+h.rowspan&&l$1>=h.col&&l$1<h.col+h.colspan);return v?l(v.rowspan,v.colspan):null}function io(t,n,l,r,v){if(r<1||v<1)return t;let{anchors:h,totalCols:a}=z(t),p=h.find(d=>n>=d.row&&n<d.row+d.rowspan&&l>=d.col&&l<d.col+d.colspan);if(!p||r<p.rowspan||v<p.colspan||r===1&&v===1)return t;let u=t.columnWidths&&t.columnWidths.length>0?[...t.columnWidths]:Array.from({length:a},()=>1440),c=i(u,p.col,p.colspan,v),i$1=j$1(h,p,r,v,t.rows.length,d=>d?{...p.data,formatting:_(p.data,1,1)}:{type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:_(p.data,1,1)}),{byStart:m,byCoveredSlot:Z}=k(i$1.anchors),f=p.row+p.rowspan,b=a+i$1.deltaCols,H=[];for(let d=0;d<i$1.newRowCount;d++){let M=d<f?t.rows[d]:d<p.row+r?t.rows[f-1]:t.rows[d-i$1.deltaRows],R=[];for(let C=0;C<b;){let S=m.get(`${d}-${C}`);if(S){R.push({...S.data,formatting:_(S.data,S.colspan,S.rowspan)}),C+=S.colspan;continue}let x=Z.get(`${d}-${C}`);if(!x){C+=1;continue}R.push({...x.data,content:[],formatting:Kt(x.data,x.colspan)}),C+=x.colspan;}H.push({type:"tableRow",formatting:M?.formatting?{...M.formatting}:void 0,cells:R});}return {...t,rows:H,columnWidths:c}}function po(t,n,l="after"){let r=[...t.rows],v=l==="before"?n:n+1,h=t.rows[n]||t.rows[0],a=y(t),p=Ut(h,a);return r.splice(v,0,p),{...t,rows:r}}function so(t,n){if(t.rows.length<=1)return t;let l=t.rows.filter((r,v)=>v!==n);return {...t,rows:l}}function mo(t,n,l="after"){let r=l==="before"?n:n+1,v=t.rows.map(a=>{let p=[...a.cells],u=0,c=0;for(let i=0;i<a.cells.length;i++){let Z=a.cells[i].formatting?.gridSpan??1;if(r<=u+Z){c=l==="before"?i:i+1;break}u+=Z,c=i+1;}return p.splice(c,0,$t()),{...a,cells:p}}),h=t.columnWidths;if(t.columnWidths&&t.columnWidths.length>0){h=[...t.columnWidths];let a=t.columnWidths[n]||t.columnWidths[0]||1440;h.splice(r,0,a);}return {...t,rows:v,columnWidths:h}}function uo(t,n){if(y(t)<=1)return t;let r=t.rows.map(h=>{let a=0,p=[];for(let u of h.cells){let c=u.formatting?.gridSpan??1;n>=a&&n<a+c?c>1&&p.push({...u,formatting:{...u.formatting,gridSpan:c-1}}):p.push(u),a+=c;}return {...h,cells:p}}),v=t.columnWidths;return t.columnWidths&&t.columnWidths.length>n&&(v=t.columnWidths.filter((h,a)=>a!==n)),{...t,rows:r,columnWidths:v}}function Zo(t,n){if(!n.selectedCells)return t;let{startRow:l,startCol:r,endRow:v,endCol:h}=n.selectedCells,a=v-l+1,p=h-r+1,u=t.rows.map((c,i)=>{if(i<l||i>v)return c;let m=[],Z=0;for(let f of c.cells){let b=f.formatting?.gridSpan??1,H=Z+b-1;Z<=h&&H>=r?i===l&&Z===r?m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:a>1?"restart":void 0}}):i>l&&Z===r&&m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:"continue"}}):m.push(f),Z+=b;}return {...c,cells:m}});return {...t,rows:u}}function fo(t,n,l){let r=F(t,n,l);if(!r)return t;let v=r.formatting?.gridSpan??1,h=r.formatting?.vMerge==="restart";if(v<=1&&!h)return t;let a=t.rows.map((p,u)=>{if(u!==n&&!h)return p;let c=[],i=0;for(let m of p.cells){let Z=m.formatting?.gridSpan??1;if(i===l||i<=l&&l<i+Z)if(v>1)for(let f=0;f<v;f++)c.push({type:"tableCell",content:f===0?m.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,gridSpan:void 0,vMerge:void 0}});else h&&u===n?c.push({...m,formatting:{...m.formatting,vMerge:void 0}}):m.formatting?.vMerge==="continue"?c.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,vMerge:void 0}}):c.push(m);else c.push(m);i+=Z;}return {...p,cells:c}});return {...t,rows:a}}
|
|
2
|
+
export{c0 as a,g as b,Yt as c,co as d,ho as e,y as f,F as g,ao as h,io as i,po as j,so as k,mo as l,uo as m,Zo as n,fo as o};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-7QQSDIWK.mjs';import {useState,useRef,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var J={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Q={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"400px",maxWidth:"500px",width:"100%",margin:"20px"},Z={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},ee={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},te={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},re={padding:"20px"},v={marginBottom:"16px"},E={display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},x={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",boxSizing:"border-box",outline:"none"},oe={...x,borderColor:"var(--doc-error)"},ie={...x,cursor:"pointer"},le={color:"var(--doc-error)",fontSize:"12px",marginTop:"4px"},z={color:"var(--doc-text-muted)",fontSize:"12px",marginTop:"4px"},ne={display:"flex",borderBottom:"1px solid var(--doc-border)",marginBottom:"16px"},H={padding:"10px 16px",border:"none",background:"none",cursor:"pointer",fontSize:"14px",color:"var(--doc-text-muted)",borderBottom:"2px solid transparent",marginBottom:"-1px"},F={...H,color:"var(--doc-link)",borderBottomColor:"var(--doc-link)",fontWeight:500},ae={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},C={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},se={...C,backgroundColor:"var(--doc-link)",color:"white"},pe={...C,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},de={...C,backgroundColor:"var(--doc-error)",color:"white"},ce={...C,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function G(t){if(!t||t.trim()==="")return false;let e=t.trim();if(e.startsWith("mailto:")||e.startsWith("tel:"))return e.length>7;if(e.startsWith("ftp://"))return e.length>6;try{let d=e.match(/^https?:\/\//)?e:`https://${e}`,k=new URL(d);return k.protocol==="http:"||k.protocol==="https:"}catch{return false}}function M(t){if(!t)return "";let e=t.trim();return e.startsWith("mailto:")||e.startsWith("tel:")||e.startsWith("ftp://")||e.match(/^https?:\/\//)?e:`https://${e}`}function ge(t){if(!t)return "unknown";let e=t.trim().toLowerCase();return e.startsWith("mailto:")?"email":e.startsWith("tel:")?"phone":e.startsWith("ftp://")?"ftp":e.startsWith("http://")||e.startsWith("https://")?"web":e.includes("@")&&!e.includes(" ")?"email":"web"}function ue({isOpen:t,onClose:e,onSubmit:d,onRemove:k,initialData:s,selectedText:h="",isEditing:n=false,bookmarks:R=[],className:$,style:K}){let{t:r}=c(),[l,g]=useState("url"),[p,L]=useState(""),[D,_]=useState(""),[b,N]=useState(""),[O,P]=useState(""),[y,m]=useState(""),[B,f]=useState(false),Y=useRef(null),U=useRef(null);useEffect(()=>{t&&(s?(s.bookmark?(g("bookmark"),N(s.bookmark)):(g("url"),L(s.url||"")),_(s.displayText||""),P(s.tooltip||"")):(g("url"),L(""),_(h),N(""),P("")),m(""),f(false));},[t,s,h]),useEffect(()=>{t&&setTimeout(()=>{l==="url"?Y.current?.focus():U.current?.focus();},100);},[t,l]);let V=useCallback(()=>{l==="url"&&p.trim()?G(p)?m(""):m(r("dialogs.hyperlink.invalidUrl")):m("");},[l,p,r]),S=useCallback(o=>{if(o?.preventDefault(),l==="url"){if(!p.trim()){m(r("dialogs.hyperlink.urlRequired")),f(true);return}if(!G(p)){m(r("dialogs.hyperlink.invalidUrl")),f(true);return}}else if(l==="bookmark"&&!b)return;let T={displayText:D.trim()||void 0,tooltip:O.trim()||void 0};l==="url"?T.url=M(p):T.bookmark=b,d(T);},[l,p,b,D,O,d]),X=useCallback(o=>{o.key==="Escape"?e():o.key==="Enter"&&!o.shiftKey&&o.target.tagName!=="TEXTAREA"&&(o.preventDefault(),S());},[e,S]),j=useCallback(o=>{o.target===o.currentTarget&&e();},[e]);if(!t)return null;let q=R.length>0,A=l==="url"&&p.trim()&&!y||l==="bookmark"&&b;return jsx("div",{className:`docx-hyperlink-dialog-overlay ${$||""}`,style:{...J,...K},onClick:j,onKeyDown:X,role:"dialog","aria-modal":"true","aria-labelledby":"hyperlink-dialog-title",children:jsxs("div",{className:"docx-hyperlink-dialog",style:Q,children:[jsxs("div",{className:"docx-hyperlink-dialog-header",style:Z,children:[jsx("h2",{id:"hyperlink-dialog-title",style:ee,children:r(n?"dialogs.hyperlink.titleEdit":"dialogs.hyperlink.titleInsert")}),jsx("button",{type:"button",className:"docx-hyperlink-dialog-close",style:te,onClick:e,"aria-label":r("common.closeDialog"),children:"\xD7"})]}),jsxs("form",{className:"docx-hyperlink-dialog-body",style:re,onSubmit:S,children:[q&&jsxs("div",{className:"docx-hyperlink-dialog-tabs",style:ne,children:[jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="url"?"active":""}`,style:l==="url"?F:H,onClick:()=>g("url"),"aria-selected":l==="url",children:r("dialogs.hyperlink.tabWebAddress")}),jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="bookmark"?"active":""}`,style:l==="bookmark"?F:H,onClick:()=>g("bookmark"),"aria-selected":l==="bookmark",children:r("dialogs.hyperlink.tabBookmark")})]}),l==="url"&&jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsx("label",{htmlFor:"hyperlink-url",style:E,children:r("dialogs.hyperlink.urlLabel")}),jsx("input",{ref:Y,id:"hyperlink-url",type:"text",className:"docx-hyperlink-dialog-input",style:y&&B?oe:x,value:p,onChange:o=>{L(o.target.value),B&&m("");},onBlur:()=>{f(true),V();},placeholder:r("dialogs.hyperlink.urlPlaceholder"),"aria-invalid":!!y,"aria-describedby":y?"url-error":"url-hint"}),y&&B&&jsx("div",{id:"url-error",style:le,children:y}),!y&&jsx("div",{id:"url-hint",style:z,children:r("dialogs.hyperlink.urlHint")})]}),l==="bookmark"&&jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsx("label",{htmlFor:"hyperlink-bookmark",style:E,children:r("dialogs.hyperlink.bookmarkLabel")}),jsxs("select",{ref:U,id:"hyperlink-bookmark",className:"docx-hyperlink-dialog-select",style:ie,value:b,onChange:o=>N(o.target.value),children:[jsx("option",{value:"",children:r("dialogs.hyperlink.bookmarkPlaceholder")}),R.map(o=>jsx("option",{value:o.name,children:o.label||o.name},o.name))]})]}),jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsx("label",{htmlFor:"hyperlink-display-text",style:E,children:r("dialogs.hyperlink.displayTextLabel")}),jsx("input",{id:"hyperlink-display-text",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:D,onChange:o=>_(o.target.value),placeholder:r("dialogs.hyperlink.displayTextPlaceholder")}),jsx("div",{style:z,children:r("dialogs.hyperlink.displayTextHint")})]}),jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsx("label",{htmlFor:"hyperlink-tooltip",style:E,children:r("dialogs.hyperlink.tooltipLabel")}),jsx("input",{id:"hyperlink-tooltip",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:O,onChange:o=>P(o.target.value),placeholder:r("dialogs.hyperlink.tooltipPlaceholder")})]})]}),jsxs("div",{className:"docx-hyperlink-dialog-footer",style:ae,children:[n&&k&&jsx("button",{type:"button",className:"docx-hyperlink-dialog-remove",style:de,onClick:k,children:r("dialogs.hyperlink.removeLink")}),jsx("div",{style:{flex:1}}),jsx("button",{type:"button",className:"docx-hyperlink-dialog-cancel",style:pe,onClick:e,children:r("common.cancel")}),jsx("button",{type:"submit",className:"docx-hyperlink-dialog-submit",style:A?se:ce,onClick:S,disabled:!A,children:r(n?"common.update":"common.insert")})]})]})})}function be(t,e){return {url:M(t),displayText:e}}function xe(t,e){return {bookmark:t,displayText:e}}function he(t){return !!t.url&&!t.bookmark}function fe(t){return !!t.bookmark}function Se(t){return t.displayText?t.displayText:t.url?t.url.replace(/^https?:\/\//,""):t.bookmark?t.bookmark:""}function Te(t){return t.startsWith("mailto:")?t:`mailto:${t}`}function ve(t){return t.startsWith("tel:")?t:`tel:${t.replace(/[\s\-\(\)\.]/g,"")}`}function Ee(t){return t.filter(e=>!e.name.startsWith("_")).map(e=>({name:e.name,label:e.name})).sort((e,d)=>e.name.localeCompare(d.name))}function Ce(){let[t,e]=useState({isOpen:false,isEditing:false}),d=useCallback(n=>{e({isOpen:true,selectedText:n,initialData:void 0,isEditing:false});},[]),k=useCallback(n=>{e({isOpen:true,initialData:n,selectedText:n.displayText,isEditing:true});},[]),s=useCallback(()=>{e(n=>({...n,isOpen:false}));},[]),h=useCallback(()=>{e(n=>({...n,isOpen:!n.isOpen}));},[]);return {state:t,openInsert:d,openEdit:k,close:s,toggle:h}}var Le=ue;
|
|
2
2
|
export{G as a,M as b,ge as c,ue as d,be as e,xe as f,he as g,fe as h,Se as i,Te as j,ve as k,Ee as l,Ce as m,Le as n};
|