@eigenpal/docx-js-editor 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/FindReplaceDialog-KNJETYJX.js +1 -0
- package/dist/{FindReplaceDialog-N4J5OB7O.mjs → FindReplaceDialog-YW3R4FHM.mjs} +1 -1
- package/dist/FootnotePropertiesDialog-7QX54WQT.js +1 -0
- package/dist/FootnotePropertiesDialog-LNFJXQUG.mjs +1 -0
- package/dist/HyperlinkDialog-GBAYMTUE.js +1 -0
- package/dist/{HyperlinkDialog-YQSQFHOP.mjs → HyperlinkDialog-HNYTXDCB.mjs} +1 -1
- package/dist/ImagePositionDialog-B4RLP2W5.mjs +1 -0
- package/dist/ImagePositionDialog-M65BYQQE.js +1 -0
- package/dist/ImagePropertiesDialog-JOGW3WDU.mjs +1 -0
- package/dist/ImagePropertiesDialog-O4WQSF5M.js +1 -0
- package/dist/PageSetupDialog-2GIBTKMJ.js +1 -0
- package/dist/PageSetupDialog-Q7SHEZIJ.mjs +1 -0
- package/dist/TablePropertiesDialog-LMXWX3FI.mjs +1 -0
- package/dist/TablePropertiesDialog-WOZ4ES3H.js +1 -0
- package/dist/chunk-377ZVTSE.js +2 -0
- package/dist/chunk-3OKYQQQ5.js +111 -0
- package/dist/chunk-AU5NVRHP.js +2 -0
- package/dist/chunk-DC65PJYE.js +4 -0
- package/dist/chunk-FW5LYOOZ.mjs +111 -0
- package/dist/chunk-GZOCOWWB.mjs +2 -0
- package/dist/chunk-N6RUBUT2.js +261 -0
- package/dist/chunk-QSUPYUOP.js +2 -0
- package/dist/chunk-SZHPMPSO.mjs +261 -0
- package/dist/chunk-X5A54T6S.mjs +4 -0
- package/dist/chunk-YKBSKEBS.mjs +2 -0
- package/dist/chunk-Z26WOH6R.mjs +2 -0
- package/dist/clipboard-Cu80iVDh.d.ts +1181 -0
- package/dist/clipboard-dFROLI95.d.mts +1181 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +9 -9
- package/dist/index.mjs +9 -9
- package/dist/{react-CAc4htNH.d.ts → react-1nBq3zH9.d.ts} +3 -1
- package/dist/{react-B2h6vE3D.d.mts → react-Dr8Nm-0u.d.mts} +3 -1
- package/dist/react.css +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/ui.d.mts +22 -20
- package/dist/ui.d.ts +22 -20
- package/dist/ui.js +1 -1
- package/dist/ui.mjs +1 -1
- package/i18n/de.json +745 -0
- package/i18n/en.json +745 -0
- package/i18n/pl.json +745 -0
- package/package.json +5 -3
- package/dist/FindReplaceDialog-AQFR4OCT.js +0 -1
- package/dist/FootnotePropertiesDialog-UFUIHLDW.mjs +0 -1
- package/dist/FootnotePropertiesDialog-YYIZU5U6.js +0 -1
- package/dist/HyperlinkDialog-HGZ2S37Z.js +0 -1
- package/dist/ImagePositionDialog-DQ4JWS4F.js +0 -1
- package/dist/ImagePositionDialog-HT6J2SHV.mjs +0 -1
- package/dist/ImagePropertiesDialog-3VK2S2AF.mjs +0 -1
- package/dist/ImagePropertiesDialog-GJMGLM6G.js +0 -1
- package/dist/PageSetupDialog-2SKHDRTF.js +0 -1
- package/dist/PageSetupDialog-SMQJXEBL.mjs +0 -1
- package/dist/TablePropertiesDialog-FI5E3RCB.mjs +0 -1
- package/dist/TablePropertiesDialog-STZOGHJB.js +0 -1
- package/dist/chunk-6AJI5NPH.mjs +0 -111
- package/dist/chunk-AZRYS2WF.mjs +0 -2
- package/dist/chunk-CTYOM6BE.js +0 -2
- package/dist/chunk-EEV6TUOX.mjs +0 -261
- package/dist/chunk-EF3LLEN7.js +0 -4
- package/dist/chunk-HWWZOJMR.mjs +0 -4
- package/dist/chunk-PJVI53AH.js +0 -2
- package/dist/chunk-UMDJQ3Q4.js +0 -111
- package/dist/chunk-WH2EK2HU.js +0 -261
- package/dist/chunk-XWBCP563.mjs +0 -2
- package/dist/clipboard-B7N7Kx2X.d.ts +0 -386
- package/dist/clipboard-BkM7Zvgs.d.mts +0 -386
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use strict';var chunkQSUPYUOP_js=require('./chunk-QSUPYUOP.js'),chunk4VUZBV2S_js=require('./chunk-4VUZBV2S.js'),chunkSE5EN2QL_js=require('./chunk-SE5EN2QL.js'),ee=require('react'),q=require('@radix-ui/react-select'),clsx=require('clsx'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var ee__namespace=/*#__PURE__*/_interopNamespace(ee);var q__namespace=/*#__PURE__*/_interopNamespace(q);function L(...e){return clsx.clsx(e)}var Ie=q__namespace.Root,Fe=q__namespace.Group,at=q__namespace.Value;function Me({className:e,children:t,onMouseDown:o,...n}){return jsxRuntime.jsxs(q__namespace.Trigger,{className:L("flex h-8 items-center justify-between gap-1 rounded px-2 py-1","text-sm text-slate-700 bg-transparent","hover:bg-slate-100/80 focus:outline-none focus:bg-slate-100/80","disabled:cursor-not-allowed disabled:opacity-50","transition-colors duration-150","[&>span]:truncate",e),onMouseDown:r=>{r.preventDefault(),o?.(r);},...n,children:[t,jsxRuntime.jsx(q__namespace.Icon,{asChild:true,children:jsxRuntime.jsx(vn,{className:"h-4 w-4 text-slate-400 shrink-0"})})]})}function Pe({className:e,children:t,position:o="popper",onCloseAutoFocus:n,...r}){return jsxRuntime.jsx(q__namespace.Portal,{children:jsxRuntime.jsx("div",{className:"ep-root",children:jsxRuntime.jsx(q__namespace.Content,{className:L("relative z-50 max-h-72 min-w-[8rem] overflow-hidden","rounded-lg border border-slate-200 bg-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",e),position:o,onCloseAutoFocus:l=>{l.preventDefault(),n?.(l);},...r,children:jsxRuntime.jsx(q__namespace.Viewport,{className:L("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),onMouseDown:l=>l.preventDefault(),children:t})})})})}function Be({className:e,...t}){return jsxRuntime.jsx(q__namespace.Label,{className:L("px-2 py-1.5 text-xs font-medium text-slate-500",e),...t})}function me({className:e,children:t,onMouseDown:o,...n}){return jsxRuntime.jsxs(q__namespace.Item,{className:L("relative flex w-full cursor-pointer select-none items-center","rounded px-2 py-1.5 text-sm text-slate-700 outline-none","hover:bg-slate-100 focus:bg-slate-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onMouseDown:r=>{r.preventDefault(),o?.(r);},...n,children:[jsxRuntime.jsx(q__namespace.ItemText,{children:t}),jsxRuntime.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(q__namespace.ItemIndicator,{children:jsxRuntime.jsx(xn,{className:"h-4 w-4"})})})]})}function Xe({className:e,...t}){return jsxRuntime.jsx(q__namespace.Separator,{className:L("-mx-1 my-1 h-px bg-slate-100",e),...t})}function vn({className:e}){return jsxRuntime.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})}function xn({className:e}){return jsxRuntime.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})}var yn=[{name:"Arial",fontFamily:"Arial, Helvetica, sans-serif",category:"sans-serif"},{name:"Calibri",fontFamily:'"Calibri", Arial, sans-serif',category:"sans-serif"},{name:"Helvetica",fontFamily:"Helvetica, Arial, sans-serif",category:"sans-serif"},{name:"Verdana",fontFamily:"Verdana, Geneva, sans-serif",category:"sans-serif"},{name:"Open Sans",fontFamily:'"Open Sans", sans-serif',category:"sans-serif"},{name:"Roboto",fontFamily:"Roboto, sans-serif",category:"sans-serif"},{name:"Times New Roman",fontFamily:'"Times New Roman", Times, serif',category:"serif"},{name:"Georgia",fontFamily:"Georgia, serif",category:"serif"},{name:"Cambria",fontFamily:"Cambria, Georgia, serif",category:"serif"},{name:"Garamond",fontFamily:"Garamond, serif",category:"serif"},{name:"Courier New",fontFamily:'"Courier New", Courier, monospace',category:"monospace"},{name:"Consolas",fontFamily:"Consolas, monospace",category:"monospace"}];function ro({value:e,onChange:t,fonts:o=yn,disabled:n=false,className:r,placeholder:l="Arial",width:s=120,showPreview:p=true}){let{t:m}=chunkQSUPYUOP_js.b(),a=ee__namespace.useMemo(()=>e?o.find(h=>h.fontFamily===e||h.name.toLowerCase()===e.toLowerCase())?.name||e:l,[e,o,l]),c=ee__namespace.useCallback(d=>{let h=o.find(b=>b.name===d);h&&t?.(h.fontFamily);},[t,o]),u=ee__namespace.useMemo(()=>{let d={"sans-serif":[],serif:[],monospace:[],other:[]};return o.forEach(h=>{let b=h.category||"other";d[b].push(h);}),d},[o]);return jsxRuntime.jsxs(Ie,{value:a,onValueChange:c,disabled:n,children:[jsxRuntime.jsx(Me,{className:L("h-8 text-sm",r),style:{minWidth:typeof s=="number"?`${s}px`:s},"aria-label":m("font.selectAriaLabel"),children:jsxRuntime.jsx(at,{placeholder:l,children:a})}),jsxRuntime.jsxs(Pe,{className:"max-h-[300px]",children:[u["sans-serif"].length>0&&jsxRuntime.jsxs(Fe,{children:[jsxRuntime.jsx(Be,{children:m("font.sansSerif")}),u["sans-serif"].map(d=>jsxRuntime.jsx(me,{value:d.name,style:p?{fontFamily:d.fontFamily}:void 0,children:d.name},d.name))]}),u.serif.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Xe,{}),jsxRuntime.jsxs(Fe,{children:[jsxRuntime.jsx(Be,{children:m("font.serif")}),u.serif.map(d=>jsxRuntime.jsx(me,{value:d.name,style:p?{fontFamily:d.fontFamily}:void 0,children:d.name},d.name))]})]}),u.monospace.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Xe,{}),jsxRuntime.jsxs(Fe,{children:[jsxRuntime.jsx(Be,{children:m("font.monospace")}),u.monospace.map(d=>jsxRuntime.jsx(me,{value:d.name,style:p?{fontFamily:d.fontFamily}:void 0,children:d.name},d.name))]})]})]})]})}var ao=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,io=clsx.clsx,lo=(e,t)=>o=>{var n;if(t?.variants==null)return io(e,o?.class,o?.className);let{variants:r,defaultVariants:l}=t,s=Object.keys(r).map(a=>{let c=o?.[a],u=l?.[a];if(c===null)return null;let d=ao(c)||ao(u);return r[a][d]}),p=o&&Object.entries(o).reduce((a,c)=>{let[u,d]=c;return d===void 0||(a[u]=d),a},{}),m=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((a,c)=>{let{class:u,className:d,...h}=c;return Object.entries(h).every(b=>{let[f,x]=b;return Array.isArray(x)?x.includes({...l,...p}[f]):{...l,...p}[f]===x})?[...a,u,d]:a},[]);return io(e,s,m,o?.class,o?.className)};var Cn=lo("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-9 w-9","icon-sm":"h-7 w-7"}},defaultVariants:{variant:"default",size:"default"}}),G=ee__namespace.forwardRef(({className:e,variant:t,size:o,...n},r)=>jsxRuntime.jsx("button",{className:L(Cn({variant:t,size:o,className:e})),ref:r,...n}));G.displayName="Button";function g({size:e=20,className:t="",style:o,children:n}){return jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 -960 960 960",fill:"currentColor",className:t,style:{display:"inline-flex",flexShrink:0,...o},"aria-hidden":"true",children:n})}function wn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 In(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Mn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Pn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 kn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"})})}function Rn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Zn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Ln(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Hn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 An(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 En(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"m528-546-93-93-121-121h486v120H568l-40 94ZM792-56 460-388l-80 188H249l119-280L56-792l56-56 736 736-56 56Z"})})}function qn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Z"})})}function _n(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm160-160v-80h400v80H280ZM120-440v-80h720v80H120Zm160-160v-80h400v80H280ZM120-760v-80h720v80H120Z"})})}function Dn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-760v-80h720v80H120Zm240 160v-80h480v80H360ZM120-440v-80h720v80H120Zm240 160v-80h480v80H360ZM120-120v-80h720v80H120Z"})})}function Nn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Z"})})}function Ht(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Fn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Bn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 On(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm0 440v-320l160 160-160 160Z"})})}function zn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm160 440L120-480l160-160v320Z"})})}function Kn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M80 0v-160h800V0H80Zm140-280 210-560h100l210 560h-96l-50-144H368l-52 144h-96Zm176-224h168l-82-232h-4l-82 232Z"})})}function Wn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Vn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 $n(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M480-360 280-560h400L480-360Z"})})}function Gn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Un(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Yn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 jn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Xn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Jn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-720h720v720H120Zm640-80v-240H520v240h240Zm0-560H520v240h240v-240Zm-560 0v240h240v-240H200Zm0 560h240v-240H200v240Z"})})}function Qn(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 er(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 tr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 or(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})})}function nr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M200-440v-80h560v80H200Z"})})}function rr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 ar(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 ir(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 lr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M440-160v-304L240-664v104h-80v-240h240v80H296l224 224v336h-80Zm154-376-58-58 128-126H560v-80h240v240h-80v-104L594-536Z"})})}function sr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 cr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 ur(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-280v-400h400v400H120Zm80-80h240v-240H200v240Zm-80-400v-80h720v80H120Zm480 160v-80h240v80H600Zm0 160v-80h240v80H600Zm0 160v-80h240v80H600ZM120-120v-80h720v80H120Z"})})}function dr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M440-280v-400h400v400H440Zm80-80h240v-240H520v240ZM120-120v-80h720v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h720v80H120Z"})})}function pr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M160-440v-80h640v80H160Z"})})}function mr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 hr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 fr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 gr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z"})})}function br(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 vr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 xr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 yr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Tr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Cr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Sr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})})}function wr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})})}function Ir(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Mr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Pr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 kr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Rr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Zr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Lr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Hr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Ar(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-720h80v720h-80Zm640 0v-720h80v720h-80ZM280-440v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function Er(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 qr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 _r(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Dr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M160-760v-80h640v80H160Zm280 640v-408L336-424l-56-56 200-200 200 200-56 56-104-104v408h-80Z"})})}function Nr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Fr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M160-120v-80h640v80H160Zm320-160L280-480l56-56 104 104v-408h80v408l104-104 56 56-200 200Z"})})}function Br(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"})})}function Or(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})})}function zr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})})}function Kr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})}function Wr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})}function Vr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 $r(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Gr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})})}function Ur(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Yr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 jr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 Xr(e){return jsxRuntime.jsxs(g,{...e,children:[jsxRuntime.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"}),jsxRuntime.jsx("path",{fill:"#188038",d:"m421-380 227-227-45-45-182 182-92-91-45 45 137 136Z"})]})}function Jr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})})}function Qr(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 ea(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 ta(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 oa(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 na(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 ra(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 aa(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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 ia(e){return jsxRuntime.jsx(g,{...e,children:jsxRuntime.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"})})}var la={undo:wn,redo:In,print:Mn,format_bold:Pn,format_italic:kn,format_underlined:Rn,strikethrough_s:Zn,superscript:Ln,subscript:Hn,link:An,format_clear:En,format_align_left:qn,format_align_center:_n,format_align_right:Dn,format_align_justify:Nn,format_line_spacing:Ht,format_list_bulleted:Fn,format_list_numbered:Bn,format_indent_increase:On,format_indent_decrease:zn,format_color_text:Kn,ink_highlighter:Wn,format_color_reset:Vn,arrow_drop_down:$n,table:Gn,table_chart:Un,grid_on:Yn,table_rows:jn,view_column:Xn,border_all:Jn,border_outer:Qn,border_inner:er,border_clear:tr,add:or,remove:nr,delete:rr,delete_sweep:ar,call_merge:ir,call_split:lr,drag_indicator:sr,image:cr,format_image_left:ur,format_image_right:dr,horizontal_rule:pr,flip_to_back:mr,flip_to_front:hr,open_with:fr,tune:gr,rotate_right:br,rotate_left:vr,swap_horiz:xr,swap_vert:yr,shapes:Tr,format_paint:Cr,expand_more:Sr,expand_less:wr,border_top:Ir,border_bottom:Mr,border_left:Pr,border_right:kr,padding:Rr,text_rotation_none:Zr,wrap_text:Lr,height:Hr,fit_width:Ar,settings:Er,border_color:qr,format_color_fill:_r,vertical_align_top:Dr,vertical_align_center:Nr,vertical_align_bottom:Fr,line_weight:Br,keyboard_arrow_up:Or,keyboard_arrow_down:zr,keyboard_arrow_left:Kr,keyboard_arrow_right:Wr,more_vert:Vr,page_break:$r,arrow_back:Gr,done_all:Ur,check_circle:Yr,chat_bubble_outline:jr,chat_bubble_check:Xr,check:Jr,close:Qr,add_comment:ea,comment:ta,edit_note:oa,rate_review:na,visibility:ra,format_textdirection_l_to_r:aa,format_textdirection_r_to_l:ia};function T({name:e,size:t=20,className:o="",style:n}){let r=la[e];return r?jsxRuntime.jsx(r,{size:t,className:o,style:n}):(console.warn(`Icon not found: ${e}`),jsxRuntime.jsx("span",{className:o,style:{fontSize:t,width:t,height:t,...n},children:e}))}function Y({isOpen:e,onClose:t,align:o="left"}){let n=ee.useRef(null),r=ee.useRef(null),[l,s]=ee.useState({top:0,left:0});ee.useEffect(()=>{if(!e||!n.current)return;let a=n.current.getBoundingClientRect();o==="right"?requestAnimationFrame(()=>{if(r.current){let c=r.current.getBoundingClientRect();s({top:a.bottom+4,left:a.right-c.width});}else s({top:a.bottom+4,left:a.left});}):s({top:a.bottom+4,left:a.left});},[e,o]),ee.useEffect(()=>{if(!e)return;let a=d=>{let h=d.target;n.current&&!n.current.contains(h)&&r.current&&!r.current.contains(h)&&t();},c=d=>{d.key==="Escape"&&t();},u=()=>t();return document.addEventListener("mousedown",a),document.addEventListener("keydown",c),window.addEventListener("scroll",u,true),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",c),window.removeEventListener("scroll",u,true);}},[e,t]);let p=ee.useCallback(a=>{a.preventDefault(),a.stopPropagation();},[]),m={position:"fixed",top:l.top,left:l.left,zIndex:1e4};return {containerRef:n,dropdownRef:r,dropdownStyle:m,handleMouseDown:p}}var pa=[8,9,10,11,12,14,16,18,20,24,28,36,48,72],ma=1,ha=400;function ho(e){return e/2}function ds(e){return e*2}function po(e,t,o){for(let n of t)if(n>e)return n;return Math.min(e+1,o)}function mo(e,t,o){for(let n=t.length-1;n>=0;n--)if(t[n]<e)return t[n];return Math.max(e-1,o)}function fo({value:e,onChange:t,sizes:o=pa,disabled:n=false,className:r,placeholder:l="11",minSize:s=ma,maxSize:p=ha}){let{t:m}=chunkQSUPYUOP_js.b(),[a,c]=ee.useState(false),[u,d]=ee.useState(""),[h,b]=ee.useState(false),f=ee.useRef(null),x=ee.useCallback(()=>{b(false),c(false);},[]),{containerRef:v,dropdownRef:y,dropdownStyle:S}=Y({isOpen:h,onClose:x}),w=e??(parseInt(l,10)||11),I=e!==void 0?e.toString():l,P=ee.useCallback(M=>{if(M.preventDefault(),n)return;let F=mo(w,o,s);t?.(F);},[w,o,s,n,t]),W=ee.useCallback(M=>{if(M.preventDefault(),n)return;let F=po(w,o,p);t?.(F);},[w,o,p,n,t]),O=ee.useCallback(M=>{M.preventDefault(),!n&&(c(true),d(I),b(true),requestAnimationFrame(()=>{f.current?.focus(),f.current?.select();}));},[n,I]),we=ee.useCallback(M=>{d(M.target.value);},[]),ce=ee.useCallback(()=>{c(false);let M=parseFloat(u);if(!isNaN(M)&&M>=s&&M<=p){let F=Math.round(M*2)/2;t?.(F);}},[u,s,p,t]),be=ee.useCallback(M=>{if(M.key==="Enter")M.preventDefault(),ce(),b(false);else if(M.key==="Escape")c(false),b(false);else if(M.key==="ArrowUp"){M.preventDefault();let F=po(w,o,p);d(F.toString()),t?.(F);}else if(M.key==="ArrowDown"){M.preventDefault();let F=mo(w,o,s);d(F.toString()),t?.(F);}},[ce,w,o,p,s,t]),H=ee.useCallback(M=>{t?.(M),b(false),c(false);},[t]),X=ee.useCallback(M=>{M.target.tagName!=="INPUT"&&M.preventDefault();},[]);return jsxRuntime.jsxs("div",{ref:v,className:L("flex items-center",r),onMouseDown:X,children:[jsxRuntime.jsx(G,{variant:"ghost",size:"icon-sm",className:L("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-r-none",n&&"opacity-30 cursor-not-allowed"),onMouseDown:P,disabled:n||w<=s,"aria-label":m("fontSize.decrease"),"data-testid":"font-size-decrease",children:jsxRuntime.jsx(T,{name:"remove",size:18})}),jsxRuntime.jsx("div",{className:"relative",children:a?jsxRuntime.jsx("input",{ref:f,type:"text",value:u,onChange:we,onBlur:ce,onKeyDown:be,className:L("h-7 w-10 text-center text-sm border border-slate-300 bg-white","focus:outline-none focus:ring-1 focus:ring-slate-400","rounded-none"),"aria-label":m("fontSize.label"),"data-testid":"font-size-input"}):jsxRuntime.jsx("button",{type:"button",onClick:O,className:L("h-7 w-10 text-center text-sm border border-slate-200 bg-white","hover:border-slate-300 hover:bg-slate-50","focus:outline-none focus:ring-1 focus:ring-slate-400","rounded-none",n&&"opacity-50 cursor-not-allowed"),disabled:n,"aria-label":m("fontSize.label"),"aria-haspopup":"listbox","aria-expanded":h,"data-testid":"font-size-display",children:I})}),h&&jsxRuntime.jsx("div",{ref:y,style:{...S,backgroundColor:"white",border:"1px solid #e2e8f0",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",maxHeight:240,overflowY:"auto",minWidth:60},role:"listbox","aria-label":m("fontSize.listLabel"),children:o.map(M=>jsxRuntime.jsx("button",{type:"button",onClick:()=>H(M),className:L("w-full px-3 py-1.5 text-sm text-left","hover:bg-slate-100",M===w&&"bg-slate-100 font-medium"),role:"option","aria-selected":M===w,children:M},M))}),jsxRuntime.jsx(G,{variant:"ghost",size:"icon-sm",className:L("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-l-none",n&&"opacity-30 cursor-not-allowed"),onMouseDown:W,disabled:n||w>=p,"aria-label":m("fontSize.increase"),"data-testid":"font-size-increase",children:jsxRuntime.jsx(T,{name:"add",size:18})})]})}var ba=[{name:"Dark Red",nameKey:"colorPicker.colors.darkRed",hex:"C00000"},{name:"Red",nameKey:"colorPicker.colors.red",hex:"FF0000"},{name:"Orange",nameKey:"colorPicker.colors.orange",hex:"FFC000"},{name:"Yellow",nameKey:"colorPicker.colors.yellow",hex:"FFFF00"},{name:"Light Green",nameKey:"colorPicker.colors.lightGreen",hex:"92D050"},{name:"Green",nameKey:"colorPicker.colors.green",hex:"00B050"},{name:"Light Blue",nameKey:"colorPicker.colors.lightBlue",hex:"00B0F0"},{name:"Blue",nameKey:"colorPicker.colors.blue",hex:"0070C0"},{name:"Dark Blue",nameKey:"colorPicker.colors.darkBlue",hex:"002060"},{name:"Purple",nameKey:"colorPicker.colors.purple",hex:"7030A0"}],it=18,va=2,xa={position:"relative",display:"inline-block"},ya={display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"32px",padding:"2px 6px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"},Ta={padding:"10px",backgroundColor:"#fff",border:"1px solid #d0d0d0",borderRadius:"6px",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.15)",width:"auto"},Et={fontSize:"11px",color:"#666",marginBottom:"4px",fontWeight:500},qt={height:"1px",backgroundColor:"#e0e0e0",margin:"8px 0"},vo={display:"grid",gap:`${va}px`},lt={width:`${it}px`,height:`${it}px`,border:"1px solid #c0c0c0",borderRadius:"2px",cursor:"pointer",padding:0,transition:"transform 0.1s, border-color 0.1s"},xo={...lt,transform:"scale(1.15)",borderColor:"#333",zIndex:1},yo={...lt,borderWidth:"2px",borderColor:"#0066cc",boxShadow:"0 0 0 1px #0066cc"},Ca={display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"5px 8px",border:"1px solid #d0d0d0",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",fontSize:"12px",color:"#333"},Sa={display:"flex",alignItems:"center",gap:"6px"},wa={width:"70px",height:"24px",padding:"2px 6px",border:"1px solid #ccc",borderRadius:"3px",fontSize:"12px"},Ia={height:"24px",padding:"0 10px",border:"1px solid #ccc",borderRadius:"3px",backgroundColor:"#f5f5f5",fontSize:"12px",cursor:"pointer"},Ma={width:"16px",height:"4px",borderRadius:"1px",marginTop:"-2px"};function bo(e,t,o){if(!e)return t==="text"||t==="border"?"#000000":"transparent";if(typeof e=="string"){if(t==="highlight"){let n=chunk4VUZBV2S_js.b(e);return n||(e==="none"?"transparent":e.startsWith("#")?e:`#${e}`)}return e.startsWith("#")?e:`#${e}`}return chunk4VUZBV2S_js.a(e,o)}function Pa(e){let t=e.replace(/^#/,"");if(t.length!==6)return false;let o=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16);return (o*299+n*587+r*114)/1e3>230}function To(e,t,o){return e?(typeof e=="string"?e.replace(/^#/,"").toUpperCase():chunk4VUZBV2S_js.a(e,o).replace(/^#/,"").toUpperCase())===t.toUpperCase():false}function ka({matrix:e,selectedColor:t,theme:o,onSelect:n}){let[r,l]=ee.useState(null);return jsxRuntime.jsx("div",{style:{...vo,gridTemplateColumns:`repeat(10, ${it}px)`},children:e.flatMap((s,p)=>s.map((m,a)=>{let c=`${p}-${a}`,u=r===c,d=To(t,m.hex,o);return jsxRuntime.jsx("button",{type:"button",style:{...d?yo:u?xo:lt,backgroundColor:`#${m.hex}`},title:m.label,"aria-label":m.label,"aria-selected":d,onClick:()=>n(m),onMouseDown:h=>h.preventDefault(),onMouseEnter:()=>l(c),onMouseLeave:()=>l(null)},c)}))})}function Ra({selectedColor:e,theme:t,onSelect:o}){let[n,r]=ee.useState(null),{t:l}=chunkQSUPYUOP_js.b();return jsxRuntime.jsx("div",{style:{...vo,gridTemplateColumns:`repeat(10, ${it}px)`},children:ba.map((s,p)=>{let m=n===p,a=To(e,s.hex,t),c=l(s.nameKey);return jsxRuntime.jsx("button",{type:"button",style:{...a?yo:m?xo:lt,backgroundColor:`#${s.hex}`},title:c,"aria-label":c,"aria-selected":a,onClick:()=>o(s.hex),onMouseDown:u=>u.preventDefault(),onMouseEnter:()=>r(p),onMouseLeave:()=>r(null)},s.hex)})})}function qe({mode:e,value:t,onChange:o,theme:n,disabled:r=false,className:l,style:s,title:p,icon:m,autoLabel:a}){let[c,u]=ee.useState(false),[d,h]=ee.useState(false),[b,f]=ee.useState(""),{t:x}=chunkQSUPYUOP_js.b();ee.useEffect(()=>{let Z=bo(t,e,n).replace(/^#/,"");/^[0-9A-Fa-f]{6}$/.test(Z)&&f(Z.toUpperCase());},[t,e,n]);let v=ee.useCallback(()=>u(false),[]),{containerRef:y,dropdownRef:S,dropdownStyle:w}=Y({isOpen:c,onClose:v}),I=n?.colorScheme??null,P=ee.useMemo(()=>chunk4VUZBV2S_js.p(I),[I]),W=ee.useMemo(()=>bo(t,e,n),[t,e,n]),O=ee.useCallback(()=>{r||u(Z=>!Z);},[r]),we=ee.useCallback(Z=>{if(e==="highlight")o?.(Z.hex);else {let J={themeColor:Z.themeSlot,rgb:Z.hex};Z.tint&&(J.themeTint=Z.tint),Z.shade&&(J.themeShade=Z.shade),o?.(J);}u(false);},[e,o]),ce=ee.useCallback(Z=>{o?.(e==="highlight"?Z:{rgb:Z}),u(false);},[e,o]),be=ee.useCallback(()=>{o?.(e==="highlight"?"none":{auto:true}),u(false);},[e,o]),H=ee.useCallback(()=>{let Z=b.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/i.test(Z)&&(o?.(e==="highlight"?Z:{rgb:Z}),u(false),f(""));},[e,b,o]),X={...ya,...r?{cursor:"default",opacity:.38}:c?{backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"}:d?{backgroundColor:"var(--doc-bg-hover)"}:{}},M=x(e==="text"?"formattingBar.fontColor":e==="highlight"?"formattingBar.highlightColor":"table.borderColor"),F=m??(e==="text"?"format_color_text":e==="highlight"?"ink_highlighter":"border_color");return jsxRuntime.jsxs("div",{ref:y,className:`docx-advanced-color-picker ${l||""}`,style:{...xa,...s},children:[jsxRuntime.jsxs("button",{type:"button",className:"docx-advanced-color-picker-button",style:X,onClick:O,onMouseDown:Z=>Z.preventDefault(),onMouseEnter:()=>h(true),onMouseLeave:()=>h(false),disabled:r,title:p||M,"aria-label":p||M,"aria-haspopup":"true","aria-expanded":c,children:[jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:0},children:[jsxRuntime.jsx(T,{name:F,size:18}),jsxRuntime.jsx("div",{style:{...Ma,backgroundColor:W==="transparent"?"#fff":W,outline:W==="transparent"||Pa(W)?"1px solid #bbb":"none"}})]}),jsxRuntime.jsx(T,{name:"arrow_drop_down",size:14})]}),c&&jsxRuntime.jsx("div",{ref:S,className:"docx-advanced-color-picker-dropdown",style:{...w,...Ta},role:"dialog","aria-label":`${M} picker`,onMouseDown:Z=>{Z.target.tagName!=="INPUT"&&Z.preventDefault();},children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{type:"button",style:Ca,onClick:be,onMouseDown:Z=>Z.preventDefault(),children:[e==="highlight"?jsxRuntime.jsx("span",{style:{display:"inline-block",width:"16px",height:"16px",border:"1px solid #ccc",borderRadius:"2px",position:"relative",backgroundColor:"#fff"},children:jsxRuntime.jsx("span",{style:{position:"absolute",top:"50%",left:"-1px",right:"-1px",height:"2px",backgroundColor:"#ff0000",transform:"rotate(-45deg)"}})}):jsxRuntime.jsx("span",{style:{display:"inline-block",width:"16px",height:"16px",backgroundColor:"#000",borderRadius:"2px"}}),a??x(e==="highlight"?"colorPicker.noColor":"colorPicker.automatic")]}),jsxRuntime.jsx("div",{style:qt}),jsxRuntime.jsx("div",{style:Et,children:x("colorPicker.themeColors")}),jsxRuntime.jsx(ka,{matrix:P,selectedColor:t,theme:n,onSelect:we}),jsxRuntime.jsx("div",{style:qt}),jsxRuntime.jsx("div",{style:Et,children:x("colorPicker.standardColors")}),jsxRuntime.jsx(Ra,{selectedColor:t,theme:n,onSelect:ce}),jsxRuntime.jsx("div",{style:qt}),jsxRuntime.jsx("div",{style:Et,children:x("colorPicker.customColor")}),jsxRuntime.jsxs("div",{style:Sa,children:[jsxRuntime.jsx("span",{style:{fontSize:"12px",color:"#666"},children:"#"}),jsxRuntime.jsx("input",{type:"text",style:wa,value:b,onChange:Z=>f(Z.target.value.replace(/[^0-9A-Fa-f]/g,"").slice(0,6)),onKeyDown:Z=>{Z.key==="Enter"&&H();},onMouseDown:Z=>{Z.stopPropagation();},placeholder:"FF0000",maxLength:6,"aria-label":"Custom hex color"}),jsxRuntime.jsx("button",{type:"button",style:{...Ia,opacity:/^[0-9A-Fa-f]{6}$/.test(b)?1:.4,cursor:/^[0-9A-Fa-f]{6}$/.test(b)?"pointer":"default"},onClick:H,onMouseDown:Z=>Z.preventDefault(),disabled:!/^[0-9A-Fa-f]{6}$/.test(b),children:x("common.apply")})]})]})})]})}function oe({content:e,children:t,side:o="bottom",delayMs:n=400}){let[r,l]=ee__namespace.useState(false),[s,p]=ee__namespace.useState({x:0,y:0}),m=ee__namespace.useRef(null),a=ee__namespace.useRef(null),c=ee__namespace.useCallback(()=>{a.current=setTimeout(()=>{if(m.current){let b=m.current.getBoundingClientRect(),f=b.left+b.width/2,x=o==="top"?b.top-8:b.bottom+8;p({x:f,y:x});}l(true);},n);},[n,o]),u=ee__namespace.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l(false);},[]);ee__namespace.useEffect(()=>()=>{a.current&&clearTimeout(a.current);},[]);let d=t.props,h=ee__namespace.cloneElement(t,{ref:m,onMouseEnter:b=>{c(),d.onMouseEnter?.(b);},onMouseLeave:b=>{u(),d.onMouseLeave?.(b);}});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h,r&&jsxRuntime.jsx("div",{className:"fixed z-50 px-2 py-1 text-xs font-medium text-white bg-slate-900 rounded-md shadow-lg",style:{left:s.x,top:s.y,transform:o==="top"?"translate(-50%, -100%)":o==="bottom"?"translate(-50%, 0)":void 0},children:e})]})}var et=20,_t=[{value:"left",label:"Align Left",labelKey:"alignment.alignLeft",shortcutKey:"alignment.alignLeftShortcut",icon:jsxRuntime.jsx(T,{name:"format_align_left",size:et}),iconName:"format_align_left",shortcut:"Ctrl+L"},{value:"center",label:"Center",labelKey:"alignment.center",shortcutKey:"alignment.centerShortcut",icon:jsxRuntime.jsx(T,{name:"format_align_center",size:et}),iconName:"format_align_center",shortcut:"Ctrl+E"},{value:"right",label:"Align Right",labelKey:"alignment.alignRight",shortcutKey:"alignment.alignRightShortcut",icon:jsxRuntime.jsx(T,{name:"format_align_right",size:et}),iconName:"format_align_right",shortcut:"Ctrl+R"},{value:"both",label:"Justify",labelKey:"alignment.justify",shortcutKey:"alignment.justifyShortcut",icon:jsxRuntime.jsx(T,{name:"format_align_justify",size:et}),iconName:"format_align_justify",shortcut:"Ctrl+J"}];function wo({value:e="left",onChange:t,disabled:o=false}){let{t:n}=chunkQSUPYUOP_js.b(),[r,l]=ee.useState(false),s=ee.useCallback(()=>l(false),[]),{containerRef:p,dropdownRef:m,dropdownStyle:a,handleMouseDown:c}=Y({isOpen:r,onClose:s}),u=ee.useCallback(v=>{o||t?.(v),l(false);},[o,t]),d=_t.find(v=>v.value===e)||_t[0],h=n(d.labelKey),b=d.shortcutKey?n(d.shortcutKey):void 0,f=`${h}${b?` (${b})`:""}`,x=jsxRuntime.jsxs(G,{variant:"ghost",size:"icon-sm",className:L("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",r&&"bg-slate-100",o&&"opacity-30 cursor-not-allowed"),onMouseDown:c,onClick:()=>!o&&l(v=>!v),disabled:o,"aria-label":f,"aria-expanded":r,"aria-haspopup":"true","data-testid":"toolbar-alignment",children:[jsxRuntime.jsx(T,{name:d.iconName,size:et}),jsxRuntime.jsx(T,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:p,style:{position:"relative",display:"inline-block"},children:[r?x:jsxRuntime.jsx(oe,{content:f,children:x}),r&&!o&&jsxRuntime.jsx("div",{ref:m,style:{...a,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:v=>v.stopPropagation(),children:jsxRuntime.jsx("div",{style:{display:"flex",gap:2},children:_t.map(v=>{let y=e===v.value,S=n(v.labelKey),w=v.shortcutKey?n(v.shortcutKey):void 0;return jsxRuntime.jsx("button",{type:"button",title:`${S}${w?` (${w})`:""}`,"data-testid":`alignment-${v.value}`,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:y?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:y?"var(--doc-primary)":"var(--doc-text)"},onMouseDown:I=>I.preventDefault(),onMouseEnter:I=>{y||(I.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:I=>{I.currentTarget.style.backgroundColor=y?"var(--doc-primary-light)":"transparent";},onClick:()=>u(v.value),children:jsxRuntime.jsx(T,{name:v.iconName,size:18})},v.value)})})})]})}var Da={display:"inline-flex",alignItems:"center",gap:"4px"},Io={display:"inline-flex",alignItems:"center",gap:"4px"},dt={display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",padding:"4px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"},Na={...dt,backgroundColor:"var(--doc-bg-hover)"},Fa={...dt,backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"},Ba={...dt,cursor:"default",opacity:.38},Oa={width:"28px",height:"28px",padding:"2px"},za={width:"1px",height:"20px",backgroundColor:"var(--doc-border)",margin:"0 6px"},st=20;function ct({active:e=false,disabled:t=false,title:o,onClick:n,children:r,className:l,style:s}){let[p,m]=ee.useState(false),a={...t?Ba:e?Fa:p?Na:dt,...s},c=u=>{u.preventDefault();};return jsxRuntime.jsx("button",{type:"button",className:`docx-list-button ${e?"docx-list-button-active":""} ${t?"docx-list-button-disabled":""} ${l||""}`,style:a,onMouseDown:c,onClick:t?void 0:n,onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),disabled:t,title:o,"aria-label":o,"aria-pressed":e,role:"button",children:r})}function Mo({listState:e,onBulletList:t,onNumberedList:o,onIndent:n,onOutdent:r,disabled:l=false,className:s,style:p,showIndentButtons:m=true,compact:a=false,hasIndent:c=false}){let{t:u}=chunkQSUPYUOP_js.b(),d=ee.useCallback(()=>a?{...Oa}:{},[a]),h=e?.type==="bullet",b=e?.type==="numbered",x=(e?.isInList||h||b)&&(e?.level??0)>0||c;return jsxRuntime.jsxs("div",{className:`docx-list-buttons ${s||""}`,style:{...Da,...p},role:"group","aria-label":u("lists.ariaLabel"),children:[jsxRuntime.jsxs("div",{style:Io,role:"group","aria-label":u("lists.typeAriaLabel"),children:[jsxRuntime.jsx(ct,{active:h,disabled:l,title:u("lists.bulletList"),onClick:t,style:d(),children:jsxRuntime.jsx(T,{name:"format_list_bulleted",size:st})}),jsxRuntime.jsx(ct,{active:b,disabled:l,title:u("lists.numberedList"),onClick:o,style:d(),children:jsxRuntime.jsx(T,{name:"format_list_numbered",size:st})})]}),m&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:za,role:"separator"}),jsxRuntime.jsxs("div",{style:Io,role:"group","aria-label":u("lists.indentationAriaLabel"),children:[jsxRuntime.jsx(ct,{active:false,disabled:l||!x,title:u("lists.decreaseIndent"),onClick:r,style:d(),children:jsxRuntime.jsx(T,{name:"format_indent_decrease",size:st})}),jsxRuntime.jsx(ct,{active:false,disabled:l,title:u("lists.increaseIndent"),onClick:n,style:d(),children:jsxRuntime.jsx(T,{name:"format_indent_increase",size:st})})]})]})]})}function Po(){return {type:"none",level:0,isInList:false}}var Wa=[{label:"Single",labelKey:"lineSpacing.single",value:1,twipsValue:240},{label:"1.15",value:1.15,twipsValue:276},{label:"1.5",value:1.5,twipsValue:360},{label:"Double",labelKey:"lineSpacing.double",value:2,twipsValue:480}];function Ro({value:e,onChange:t,options:o=Wa,disabled:n=false,className:r}){let{t:l}=chunkQSUPYUOP_js.b(),s=ee__namespace.useMemo(()=>e===void 0?o[0]:o.find(a=>a.twipsValue===e)||o[0],[e,o]),p=ee__namespace.useCallback(a=>{let c=parseInt(a,10);isNaN(c)||t?.(c);},[t]),m=a=>a.labelKey?l(a.labelKey):a.label;return jsxRuntime.jsxs(Ie,{value:s.twipsValue.toString(),onValueChange:p,disabled:n,children:[jsxRuntime.jsx(Me,{className:L("h-8 text-sm gap-0.5 px-2",r),style:{width:"auto"},title:l("lineSpacing.lineSpacingTitle",{label:m(s)}),children:jsxRuntime.jsx(Ht,{className:"h-5 w-5 shrink-0"})}),jsxRuntime.jsxs(Pe,{children:[o.map(a=>jsxRuntime.jsx(me,{value:a.twipsValue.toString(),children:m(a)},a.twipsValue)),jsxRuntime.jsx(Xe,{}),jsxRuntime.jsx(Fe,{children:jsxRuntime.jsx(Be,{children:l("lineSpacing.paragraphSpacing")})})]})]})}var Zo=[{styleId:"Normal",name:"Normal text",nameKey:"styles.normalText",type:"paragraph",isDefault:true,priority:0,qFormat:true,fontSize:22},{styleId:"Title",name:"Title",nameKey:"styles.title",type:"paragraph",priority:1,qFormat:true,fontSize:52,bold:true},{styleId:"Subtitle",name:"Subtitle",nameKey:"styles.subtitle",type:"paragraph",priority:2,qFormat:true,fontSize:30,color:"666666"},{styleId:"Heading1",name:"Heading 1",nameKey:"styles.heading1",type:"paragraph",priority:3,qFormat:true,fontSize:40,bold:true},{styleId:"Heading2",name:"Heading 2",nameKey:"styles.heading2",type:"paragraph",priority:4,qFormat:true,fontSize:32,bold:true},{styleId:"Heading3",name:"Heading 3",nameKey:"styles.heading3",type:"paragraph",priority:5,qFormat:true,fontSize:28,bold:true}],Va="#4a6c8c",$a={Title:26,Subtitle:18,Heading1:24,Heading2:18,Heading3:16,Heading4:14,Heading5:13,Heading6:13,Normal:14};function Ga(e){let t={},o=$a[e.styleId];if(o)t.fontSize=`${o}px`;else {let n=e.fontSize?e.fontSize/2:11,r=Math.min(Math.max(n,11),20);t.fontSize=`${r}px`;}return t.lineHeight="1.3",e.bold&&(t.fontWeight="bold"),e.italic&&(t.fontStyle="italic"),e.color?t.color=`#${e.color}`:e.styleId.startsWith("Heading")&&(t.color=Va),t}function Lo({value:e,onChange:t,styles:o,disabled:n=false,className:r,width:l=120}){let{t:s}=chunkQSUPYUOP_js.b(),p=ee__namespace.useMemo(()=>!o||o.length===0?Zo:o.filter(b=>b.type==="paragraph").filter(b=>b.qFormat?true:!(b.hidden||b.semiHidden)).map(b=>{let f=Zo.find(x=>x.styleId===b.styleId);return {styleId:b.styleId,name:b.name||b.styleId,nameKey:f?.nameKey,type:b.type,isDefault:b.default,qFormat:b.qFormat,priority:b.uiPriority??99,fontSize:b.rPr?.fontSize??f?.fontSize,bold:b.rPr?.bold??f?.bold,italic:b.rPr?.italic??f?.italic,color:b.rPr?.color?.rgb??f?.color}}).sort((b,f)=>(b.priority??99)-(f.priority??99)),[o]),m=ee__namespace.useCallback(h=>{t?.(h);},[t]),a=h=>h.nameKey?s(h.nameKey):h.name,c=e||"Normal",u=p.find(h=>h.styleId===c),d=u?a(u):c;return jsxRuntime.jsxs(Ie,{value:c,onValueChange:m,disabled:n,children:[jsxRuntime.jsx(Me,{className:L("h-8 text-sm",r),style:{width:typeof l=="number"?`${l}px`:l},"aria-label":s("styles.selectAriaLabel"),children:jsxRuntime.jsx("span",{className:"truncate",children:d})}),jsxRuntime.jsx(Pe,{className:"min-w-[260px] max-h-[400px]",children:p.map(h=>jsxRuntime.jsx(me,{value:h.styleId,className:"py-2.5 px-3",children:jsxRuntime.jsx("span",{style:Ga(h),children:a(h)})},h.styleId))})]})}var Ya=[{value:.5,label:"50%"},{value:.75,label:"75%"},{value:1,label:"100%"},{value:1.25,label:"125%"},{value:1.5,label:"150%"},{value:2,label:"200%"}];function Ho({value:e=1,onChange:t,levels:o=Ya,disabled:n=false,className:r,compact:l=false}){let{t:s}=chunkQSUPYUOP_js.b(),p=ee__namespace.useMemo(()=>{let a=o.find(c=>Math.abs(c.value-e)<.001);return a?a.label:`${Math.round(e*100)}%`},[o,e]),m=ee__namespace.useCallback(a=>{let c=parseFloat(a);isNaN(c)||t?.(c);},[t]);return jsxRuntime.jsxs(Ie,{value:e.toString(),onValueChange:m,disabled:n,children:[jsxRuntime.jsx(Me,{className:L(l?"h-7 min-w-[55px] text-xs":"h-8 min-w-[70px] text-sm",r),"aria-label":s("zoom.ariaLabel",{label:p}),children:jsxRuntime.jsx(at,{placeholder:"100%",children:p})}),jsxRuntime.jsx(Pe,{children:o.map(a=>jsxRuntime.jsx(me,{value:a.value.toString(),children:a.label},a.value))})]})}var Ja=[{action:"borderAll",icon:"border_all",labelKey:"table.borders.all"},{action:"borderOutside",icon:"border_outer",labelKey:"table.borders.outside"},{action:"borderInside",icon:"border_inner",labelKey:"table.borders.inside"},{action:"borderTop",icon:"border_top",labelKey:"table.borders.top"},{action:"borderBottom",icon:"border_bottom",labelKey:"table.borders.bottom"},{action:"borderLeft",icon:"border_left",labelKey:"table.borders.left"},{action:"borderRight",icon:"border_right",labelKey:"table.borders.right"},{action:"borderNone",icon:"border_clear",labelKey:"table.borders.none"}];function qo({onAction:e,disabled:t=false}){let{t:o}=chunkQSUPYUOP_js.b(),[n,r]=ee.useState(false),l=ee.useCallback(()=>r(false),[]),{containerRef:s,dropdownRef:p,dropdownStyle:m,handleMouseDown:a}=Y({isOpen:n,onClose:l}),c=ee.useCallback(d=>{e(d),r(false);},[e]),u=jsxRuntime.jsxs(G,{variant:"ghost",size:"icon-sm",className:L("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",n&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:a,onClick:()=>!t&&r(d=>!d),disabled:t,"aria-label":o("table.borders.styleAriaLabel"),"aria-expanded":n,"aria-haspopup":"true","data-testid":"toolbar-table-borders",children:[jsxRuntime.jsx(T,{name:"border_all",size:20}),jsxRuntime.jsx(T,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:s,style:{position:"relative",display:"inline-block"},children:[n?u:jsxRuntime.jsx(oe,{content:o("table.borders.tooltip"),children:u}),n&&!t&&jsxRuntime.jsx("div",{ref:p,style:{...m,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:d=>d.stopPropagation(),children:jsxRuntime.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:2},children:Ja.map(({action:d,icon:h,labelKey:b})=>jsxRuntime.jsx("button",{type:"button",title:o(b),style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:"transparent",cursor:"pointer",color:"var(--doc-text)"},onMouseDown:f=>f.preventDefault(),onMouseEnter:f=>{f.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:f=>{f.currentTarget.style.backgroundColor="transparent";},onClick:()=>c(d),children:jsxRuntime.jsx(T,{name:h,size:18})},typeof d=="string"?d:d.type))})})]})}function _o({onAction:e,disabled:t=false,theme:o,value:n}){let{t:r}=chunkQSUPYUOP_js.b(),l=ee.useCallback(s=>{typeof s=="string"?e({type:"borderColor",color:s.replace(/^#/,"")}):s.rgb?e({type:"borderColor",color:s.rgb.replace(/^#/,"")}):s.auto&&e({type:"borderColor",color:"000000"});},[e]);return jsxRuntime.jsx(qe,{mode:"border",value:n,onChange:l,theme:o,disabled:t,title:r("table.borderColor")})}var oi=[{size:4,label:"0.5 pt",thickness:.5},{size:8,label:"1 pt",thickness:1},{size:12,label:"1.5 pt",thickness:1.5},{size:16,label:"2 pt",thickness:2},{size:24,label:"3 pt",thickness:3}];function No({onAction:e,disabled:t=false}){let[o,n]=ee.useState(false),{t:r}=chunkQSUPYUOP_js.b(),l=ee.useCallback(()=>n(false),[]),{containerRef:s,dropdownRef:p,dropdownStyle:m,handleMouseDown:a}=Y({isOpen:o,onClose:l}),c=ee.useCallback(d=>{e({type:"borderWidth",size:d}),n(false);},[e]),u=jsxRuntime.jsxs(G,{variant:"ghost",size:"icon-sm",className:L("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:a,onClick:()=>!t&&n(d=>!d),disabled:t,"aria-label":r("table.borderWidth"),"aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-border-width",children:[jsxRuntime.jsx(T,{name:"line_weight",size:20}),jsxRuntime.jsx(T,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:s,style:{position:"relative",display:"inline-block"},children:[o?u:jsxRuntime.jsx(oe,{content:r("table.borderWidth"),children:u}),o&&!t&&jsxRuntime.jsx("div",{ref:p,style:{...m,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:"4px 0",minWidth:120},onMouseDown:d=>d.stopPropagation(),children:oi.map(({size:d,label:h,thickness:b})=>jsxRuntime.jsxs("button",{type:"button",style:{display:"flex",alignItems:"center",gap:10,padding:"6px 12px",width:"100%",border:"none",backgroundColor:"transparent",cursor:"pointer",fontSize:12,color:"var(--doc-text)"},onMouseDown:f=>f.preventDefault(),onMouseEnter:f=>{f.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:f=>{f.currentTarget.style.backgroundColor="transparent";},onClick:()=>c(d),children:[jsxRuntime.jsx("div",{style:{width:50,height:Math.max(b,1),backgroundColor:"#000",borderRadius:b>2?1:0}}),jsxRuntime.jsx("span",{children:h})]},d))})]})}function Fo({onAction:e,disabled:t=false,theme:o,value:n}){let{t:r}=chunkQSUPYUOP_js.b(),l=ee.useCallback(s=>{typeof s=="string"&&e(s==="none"?{type:"cellFillColor",color:null}:{type:"cellFillColor",color:s.replace(/^#/,"")});},[e]);return jsxRuntime.jsx(qe,{mode:"highlight",value:n,onChange:l,theme:o,disabled:t,title:r("table.cellFillColor"),icon:"format_color_fill",autoLabel:r("colorPicker.noColor")})}var ai={display:"flex",alignItems:"center",gap:10,padding:"7px 14px",fontSize:13,color:"var(--doc-text)",cursor:"pointer",border:"none",backgroundColor:"transparent",width:"100%",textAlign:"left"},Ve={height:1,backgroundColor:"var(--doc-border)",margin:"4px 0"},zo={padding:"6px 14px 2px",fontSize:11,color:"var(--doc-text-muted)",fontWeight:500};function Ko({onAction:e,disabled:t=false,tableContext:o}){let{t:n}=chunkQSUPYUOP_js.b(),[r,l]=ee.useState(false),[s,p]=ee.useState(null),m=ee.useCallback(()=>l(false),[]),{containerRef:a,dropdownRef:c,dropdownStyle:u,handleMouseDown:d}=Y({isOpen:r,onClose:m,align:"right"}),h=o?.table?.attrs?.justification??"left",b=ee.useCallback(v=>{e(v),l(false);},[e]),f=(v,y,S,w,I)=>{let P=t||I?.itemDisabled;return jsxRuntime.jsxs("button",{type:"button",role:"menuitem",style:{...ai,backgroundColor:s===v&&!P?"var(--doc-bg-hover)":"transparent",color:P?"var(--doc-text-muted)":I?.danger?"var(--doc-error)":"var(--doc-text)",cursor:P?"not-allowed":"pointer"},onClick:()=>!P&&b(w),onMouseEnter:()=>p(v),onMouseLeave:()=>p(null),disabled:P,children:[jsxRuntime.jsx(T,{name:y,size:16,className:I?.danger&&!P?"text-red-600":""}),jsxRuntime.jsx("span",{style:{flex:1},children:S})]},v)},x=jsxRuntime.jsx(G,{variant:"ghost",size:"icon-sm",className:L("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",r&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:d,onClick:()=>!t&&l(v=>!v),disabled:t,"aria-label":n("table.moreOptions"),"aria-expanded":r,"aria-haspopup":"menu","data-testid":"toolbar-table-more",children:jsxRuntime.jsx(T,{name:"more_vert",size:20})});return jsxRuntime.jsxs("div",{ref:a,style:{position:"relative",display:"inline-block"},children:[r?x:jsxRuntime.jsx(oe,{content:n("table.moreOptions"),children:x}),r&&!t&&jsxRuntime.jsxs("div",{ref:c,style:{...u,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:"4px 0",minWidth:200,maxHeight:"70vh",overflowY:"auto"},role:"menu",onMouseDown:v=>v.stopPropagation(),children:[f("addRowAbove","add",n("table.insertRowAbove"),"addRowAbove"),f("addRowBelow","add",n("table.insertRowBelow"),"addRowBelow"),f("addColumnLeft","add",n("table.insertColumnLeft"),"addColumnLeft"),f("addColumnRight","add",n("table.insertColumnRight"),"addColumnRight"),jsxRuntime.jsx("div",{style:Ve,role:"separator"}),f("mergeCells","call_merge",n("table.mergeCells"),"mergeCells",{itemDisabled:!o?.hasMultiCellSelection}),f("splitCell","call_split",n("table.splitCell"),"splitCell",{itemDisabled:!o?.canSplitCell}),jsxRuntime.jsx("div",{style:Ve,role:"separator"}),f("deleteRow","delete",n("table.deleteRow"),"deleteRow",{danger:true,itemDisabled:(o?.rowCount??0)<=1}),f("deleteColumn","delete",n("table.deleteColumn"),"deleteColumn",{danger:true,itemDisabled:(o?.columnCount??0)<=1}),f("deleteTable","delete",n("table.deleteTable"),"deleteTable",{danger:true}),jsxRuntime.jsx("div",{style:Ve,role:"separator"}),jsxRuntime.jsx("div",{style:zo,children:n("tableAdvanced.verticalAlignment")}),jsxRuntime.jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["top","center","bottom"].map(v=>{let y={top:"vertical_align_top",center:"vertical_align_center",bottom:"vertical_align_bottom"};return jsxRuntime.jsx("button",{type:"button",title:n({top:"tableAdvanced.top",center:"tableAdvanced.middle",bottom:"tableAdvanced.bottom"}[v]),style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:28,border:"1px solid var(--doc-border)",borderRadius:4,backgroundColor:"transparent",cursor:"pointer"},onMouseDown:w=>w.preventDefault(),onMouseEnter:w=>{w.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="transparent";},onClick:()=>b({type:"cellVerticalAlign",align:v}),children:jsxRuntime.jsx(T,{name:y[v],size:16})},v)})}),jsxRuntime.jsx("div",{style:Ve,role:"separator"}),jsxRuntime.jsx("div",{style:zo,children:n("tableAdvanced.tableAlignment")}),jsxRuntime.jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["left","center","right"].map(v=>{let y={left:"format_align_left",center:"format_align_center",right:"format_align_right"},S=h===v;return jsxRuntime.jsx("button",{type:"button",title:n({left:"tableAdvanced.alignTableLeft",center:"tableAdvanced.alignTableCenter",right:"tableAdvanced.alignTableRight"}[v]),style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:28,border:"1px solid var(--doc-border)",borderRadius:4,backgroundColor:S?"var(--doc-primary-light)":"transparent",borderColor:S?"var(--doc-primary)":"var(--doc-border)",color:S?"var(--doc-primary)":"var(--doc-text)",cursor:"pointer"},onMouseDown:w=>w.preventDefault(),onClick:()=>b({type:"tableProperties",props:{justification:v}}),children:jsxRuntime.jsx(T,{name:y[v],size:16})},v)})}),jsxRuntime.jsx("div",{style:Ve,role:"separator"}),f("headerRow","table_rows",n("tableAdvanced.toggleHeaderRow"),{type:"toggleHeaderRow"}),f("distribute","view_column",n("tableAdvanced.distributeColumns"),{type:"distributeColumns"}),f("autoFit","fit_width",n("tableAdvanced.autoFit"),{type:"autoFitContents"}),f("noWrap","wrap_text",n("tableAdvanced.toggleNoWrap"),{type:"toggleNoWrap"}),jsxRuntime.jsx("div",{style:Ve,role:"separator"}),f("properties","settings",n("tableAdvanced.tableProperties"),{type:"openTableProperties"})]})]})}var li=20;function gt({options:e,activeValue:t,triggerIcon:o,tooltipContent:n,onSelect:r,disabled:l=false,ariaLabel:s,testId:p}){let[m,a]=ee.useState(false),c=ee.useCallback(()=>a(false),[]),{containerRef:u,dropdownRef:d,dropdownStyle:h,handleMouseDown:b}=Y({isOpen:m,onClose:c}),f=ee.useCallback(v=>{l||r(v),a(false);},[l,r]),x=jsxRuntime.jsxs(G,{variant:"ghost",size:"icon-sm",className:L("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",m&&"bg-slate-100",l&&"opacity-30 cursor-not-allowed"),onMouseDown:b,onClick:()=>!l&&a(v=>!v),disabled:l,"aria-label":s??n,"aria-expanded":m,"aria-haspopup":"true","data-testid":p,children:[jsxRuntime.jsx(T,{name:o,size:li}),jsxRuntime.jsx(T,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:u,style:{position:"relative",display:"inline-block"},children:[m?x:jsxRuntime.jsx(oe,{content:n,children:x}),m&&!l&&jsxRuntime.jsx("div",{ref:d,style:{...h,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:v=>v.stopPropagation(),children:jsxRuntime.jsx("div",{style:{display:"flex",gap:2},children:e.map(v=>{let y=t===v.value;return jsxRuntime.jsx("button",{type:"button",title:v.label,"data-testid":p?`${p}-${v.value}`:void 0,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:y?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:y?"var(--doc-primary)":"var(--doc-text)"},onMouseDown:S=>S.preventDefault(),onMouseEnter:S=>{y||(S.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:S=>{S.currentTarget.style.backgroundColor=y?"var(--doc-primary-light)":"transparent";},onClick:()=>f(v.value),children:jsxRuntime.jsx(T,{name:v.iconName,size:18})},v.value)})})})]})}var si=[{value:"inline",labelKey:"imageWrap.inline",iconName:"format_image_left"},{value:"wrapRight",labelKey:"imageWrap.floatLeft",iconName:"format_image_right"},{value:"wrapLeft",labelKey:"imageWrap.floatRight",iconName:"format_image_left"},{value:"topAndBottom",labelKey:"imageWrap.topAndBottom",iconName:"horizontal_rule"},{value:"behind",labelKey:"imageWrap.behindText",iconName:"flip_to_back"},{value:"inFront",labelKey:"imageWrap.inFrontOfText",iconName:"flip_to_front"}];function ci(e){return e.displayMode==="float"&&e.cssFloat==="left"?"wrapRight":e.displayMode==="float"&&e.cssFloat==="right"?"wrapLeft":e.wrapType}function $o({imageContext:e,onChange:t,disabled:o=false}){let{t:n}=chunkQSUPYUOP_js.b(),r=si.map(p=>({...p,label:n(p.labelKey)})),l=ci(e),s=r.find(p=>p.value===l)||r[0];return jsxRuntime.jsx(gt,{options:r,activeValue:l,triggerIcon:s.iconName,tooltipContent:`Wrap: ${s.label}`,onSelect:t,disabled:o,testId:"toolbar-image-wrap"})}var di=[{value:"rotateCW",labelKey:"imageTransform.rotateClockwise",iconName:"rotate_right"},{value:"rotateCCW",labelKey:"imageTransform.rotateCounterClockwise",iconName:"rotate_left"},{value:"flipH",labelKey:"imageTransform.flipHorizontal",iconName:"swap_horiz"},{value:"flipV",labelKey:"imageTransform.flipVertical",iconName:"swap_vert"}];function Go({onTransform:e,disabled:t=false}){let{t:o}=chunkQSUPYUOP_js.b(),n=di.map(r=>({...r,label:o(r.labelKey)}));return jsxRuntime.jsx(gt,{options:n,triggerIcon:"rotate_right",tooltipContent:o("imageTransform.tooltip"),onSelect:e,disabled:t,testId:"toolbar-image-transform"})}function hi(e){return "type"in e&&e.type==="separator"}var jo={display:"flex",alignItems:"center",gap:2,padding:"2px 8px",border:"none",background:"transparent",borderRadius:4,cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--doc-text, #374151)",whiteSpace:"nowrap",height:28,lineHeight:"28px"},fi={...jo,background:"var(--doc-hover, #f3f4f6)"},Xo={display:"flex",alignItems:"center",gap:8,padding:"6px 12px",border:"none",background:"transparent",cursor:"pointer",fontSize:13,color:"var(--doc-text, #374151)",width:"100%",textAlign:"left",whiteSpace:"nowrap"},gi={...Xo,opacity:.4,cursor:"default"},bi={height:1,backgroundColor:"var(--doc-border, #e5e7eb)",margin:"4px 0"},vi={marginLeft:"auto",fontSize:12,color:"var(--doc-text-muted, #9ca3af)"},xi={position:"absolute",left:"100%",top:-4,marginLeft:2,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",padding:8,zIndex:1001};function vt({label:e,items:t,disabled:o}){let[n,r]=ee.useState(false),[l,s]=ee.useState(null),p=ee.useRef(null),m=ee.useRef(null),[a,c]=ee.useState({top:0,left:0}),u=ee.useCallback(()=>{r(false),s(null);},[]);ee.useEffect(()=>{if(!n||!p.current)return;let h=p.current.getBoundingClientRect();c({top:h.bottom+2,left:h.left});},[n]),ee.useEffect(()=>{if(!n)return;function h(x){let v=x.target;p.current&&!p.current.contains(v)&&m.current&&!m.current.contains(v)&&u();}function b(x){x.key==="Escape"&&u();}function f(){u();}return document.addEventListener("mousedown",h),document.addEventListener("keydown",b),window.addEventListener("scroll",f,true),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",b),window.removeEventListener("scroll",f,true);}},[n,u]);let d=h=>{h.disabled||h.submenuContent||h.onClick&&(h.onClick(),u());};return jsxRuntime.jsxs("div",{style:{position:"relative"},children:[jsxRuntime.jsxs("button",{ref:p,type:"button",onClick:()=>!o&&r(!n),onMouseDown:h=>h.preventDefault(),disabled:o,style:n?fi:jo,children:[e,jsxRuntime.jsx(T,{name:"arrow_drop_down",size:16})]}),n&&jsxRuntime.jsx("div",{ref:m,style:{position:"fixed",top:a.top,left:a.left,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",padding:"4px 0",zIndex:1e4,minWidth:200},onMouseDown:h=>h.preventDefault(),children:t.map((h,b)=>{if(hi(h))return jsxRuntime.jsx("div",{style:bi},`sep-${b}`);let f=h;if(f.customContent)return jsxRuntime.jsx("div",{onMouseDown:y=>y.preventDefault(),children:f.customContent},f.label);let x=!!f.submenuContent,v=l===f.label;return jsxRuntime.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>x&&s(f.label),onMouseLeave:()=>x&&s(null),children:[jsxRuntime.jsxs("button",{type:"button",style:f.disabled?gi:Xo,onClick:()=>d(f),onMouseDown:y=>y.preventDefault(),onMouseOver:y=>{f.disabled||(y.currentTarget.style.backgroundColor="var(--doc-hover, #f3f4f6)");},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent";},disabled:f.disabled,children:[f.icon&&jsxRuntime.jsx(T,{name:f.icon,size:18}),jsxRuntime.jsx("span",{children:f.label}),f.shortcut&&jsxRuntime.jsx("span",{style:vi,children:f.shortcut}),x&&jsxRuntime.jsx("span",{style:{marginLeft:"auto"},children:jsxRuntime.jsx(T,{name:"keyboard_arrow_right",size:16})})]}),x&&v&&jsxRuntime.jsx("div",{style:xi,onMouseDown:y=>y.preventDefault(),children:f.submenuContent(u)})]},f.label)})})]})}var Ot=18,Ti=2,Qo={width:Ot,height:Ot,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:2,transition:"background-color 0.1s, border-color 0.1s",cursor:"pointer"},Ci={...Qo,backgroundColor:"var(--doc-primary, #3b82f6)",border:"1px solid var(--doc-primary, #3b82f6)"},Si={marginTop:6,fontSize:11,fontWeight:500,color:"var(--doc-text, #374151)",textAlign:"center"};function en({onInsert:e,gridRows:t=6,gridColumns:o=6}){let[n,r]=ee.useState(0),[l,s]=ee.useState(0),p=ee.useCallback(()=>{n>0&&l>0&&e(n,l);},[n,l,e]),m=[];for(let c=1;c<=t;c++)for(let u=1;u<=o;u++){let d=c<=n&&u<=l;m.push(jsxRuntime.jsx("div",{style:d?Ci:Qo,onMouseEnter:()=>{r(c),s(u);},onClick:p,role:"gridcell","aria-selected":d},`${c}-${u}`));}let a=n>0&&l>0?`${l} \xD7 ${n}`:"Select size";return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{display:"grid",gap:Ti,gridTemplateColumns:`repeat(${o}, ${Ot}px)`},onMouseLeave:()=>{r(0),s(0);},role:"grid","aria-label":"Table size selector",children:m}),jsxRuntime.jsx("div",{style:Si,children:a})]})}var Ii={FFFF00:"yellow","00FF00":"green","00FFFF":"cyan",FF00FF:"magenta","0000FF":"blue",FF0000:"red","00008B":"darkBlue","008080":"darkCyan","008000":"darkGreen",800080:"darkMagenta","8B0000":"darkRed",808e3:"darkYellow",808080:"darkGray",C0C0C0:"lightGray","000000":"black",FFFFFF:"white"};function lc(e){let t=e.replace(/^#/,"").toUpperCase();return Ii[t]||null}function ne({active:e=false,disabled:t=false,title:o,onClick:n,children:r,className:l,ariaLabel:s}){let p=s?.toLowerCase().replace(/\s+/g,"-")||o?.toLowerCase().replace(/\s+/g,"-").replace(/\([^)]*\)/g,"").trim(),m=c=>{c.preventDefault();},a=jsxRuntime.jsx(G,{variant:"ghost",size:"icon-sm",className:L("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",e&&"bg-slate-900 text-white hover:bg-slate-800 hover:text-white",t&&"opacity-30 cursor-not-allowed",l),onMouseDown:m,onClick:t?void 0:n,disabled:t,"aria-pressed":e,"aria-label":s||o,"data-testid":p?`toolbar-${p}`:void 0,children:r});return o?jsxRuntime.jsx(oe,{content:o,children:a}):a}function ie({label:e,children:t,className:o}){return jsxRuntime.jsx("div",{className:L("flex items-center gap-px px-1.5 border-r border-slate-200/50 last:border-r-0 first:pl-0",o),role:"group","aria-label":e,children:t})}function vc(){return jsxRuntime.jsx("div",{className:"w-px h-6 bg-slate-200 mx-1.5",role:"separator"})}function xc({children:e,className:t,style:o,disabled:n=false,onFormat:r,onPrint:l,showPrintButton:s=true,onPageSetup:p,onInsertImage:m,onInsertTable:a,showTableInsert:c=true,onInsertPageBreak:u,onInsertTOC:d,onRefocusEditor:h,...b}){let{t:f}=chunkQSUPYUOP_js.b(),x=ee.useRef(null),v=ee.useCallback(I=>{!n&&r&&r(I);},[n,r]),y=ee.useCallback((I,P)=>{!n&&a&&(a(I,P),requestAnimationFrame(()=>h?.()));},[n,a,h]),S=ee.useCallback(I=>{let P=I.target;P.tagName==="INPUT"||P.tagName==="TEXTAREA"||P.tagName==="SELECT"||P.tagName==="OPTION"||I.preventDefault();},[]),w=ee.useCallback(I=>{let P=I.target,W=document.activeElement;P.tagName==="SELECT"||P.tagName==="OPTION"||W?.tagName==="SELECT"||requestAnimationFrame(()=>{h?.();});},[h]);return jsxRuntime.jsxs("div",{ref:x,className:L("flex items-center px-1 py-1 bg-white border-b border-slate-100 min-h-[36px] overflow-x-auto",t),style:o,role:"toolbar","aria-label":f("toolbar.ariaLabel"),"data-testid":"toolbar",onMouseDown:S,onMouseUp:w,children:[s&&l||p?jsxRuntime.jsx(vt,{label:f("toolbar.file"),disabled:n,items:[...s&&l?[{icon:"print",label:f("toolbar.print"),shortcut:f("toolbar.printShortcut"),onClick:l}]:[],...p?[{icon:"settings",label:f("toolbar.pageSetup"),onClick:p}]:[]]}):null,jsxRuntime.jsx(vt,{label:f("toolbar.format"),disabled:n,items:[{icon:"format_textdirection_l_to_r",label:f("toolbar.leftToRight"),onClick:()=>v("setLtr")},{icon:"format_textdirection_r_to_l",label:f("toolbar.rightToLeft"),onClick:()=>v("setRtl")}]}),jsxRuntime.jsx(vt,{label:f("toolbar.insert"),disabled:n,items:[...m?[{icon:"image",label:f("toolbar.image"),onClick:m}]:[],...c&&a?[{icon:"grid_on",label:f("toolbar.table"),submenuContent:I=>jsxRuntime.jsx(en,{onInsert:(P,W)=>{y(P,W),I();}})}]:[],...m||c&&a?[{type:"separator"}]:[],{icon:"page_break",label:f("toolbar.pageBreak"),onClick:u,disabled:!u},{icon:"format_list_numbered",label:f("toolbar.tableOfContents"),onClick:d,disabled:!d}]}),jsxRuntime.jsx(tn,{...b,disabled:n,onFormat:r,onRefocusEditor:h,onInsertTable:a,showTableInsert:c,onInsertImage:m,onInsertPageBreak:u,onInsertTOC:d,onPrint:l,showPrintButton:s,onPageSetup:p,inline:true,children:e})]})}var zt=ee.createContext(null);function Sc(){let e=ee.useContext(zt);if(!e)throw new Error("useEditorToolbar must be used within an <EditorToolbar> component");return e}var le=18;function Ai(e){let t=ee__namespace.default.useContext(zt);return t?{...t,...Ei(e)}:e}function Ei(e){let t={};for(let o of Object.keys(e))e[o]!==void 0&&(t[o]=e[o]);return t}function tn(e){let{t}=chunkQSUPYUOP_js.b(),o=Ai(e),{currentFormatting:n={},onFormat:r,onUndo:l,onRedo:s,canUndo:p=false,canRedo:m=false,disabled:a=false,className:c,style:u,enableShortcuts:d=true,editorRef:h,children:b,showFontPicker:f=true,showFontSizePicker:x=true,showTextColorPicker:v=true,showHighlightColorPicker:y=true,showAlignmentButtons:S=true,showListButtons:w=true,showLineSpacingPicker:I=true,showStylePicker:P=true,documentStyles:W,theme:O,showZoomControl:we=true,zoom:ce,onZoomChange:be,onRefocusEditor:H,imageContext:X,onImageWrapType:M,onImageTransform:F,onOpenImageProperties:Z,tableContext:J,onTableAction:Re,inline:ue=false}=o,ot=ee.useRef(null),z=ee.useCallback(E=>{!a&&r&&r(E);},[a,r]),Pt=ee.useCallback(()=>{!a&&p&&l&&l();},[a,p,l]),kt=ee.useCallback(()=>{!a&&m&&s&&s();},[a,m,s]),Rt=ee.useCallback(E=>{!a&&r&&(r({type:"fontFamily",value:E}),requestAnimationFrame(()=>H?.()));},[a,r,H]),Zt=ee.useCallback(E=>{!a&&r&&(r({type:"fontSize",value:E}),requestAnimationFrame(()=>H?.()));},[a,r,H]),Ze=ee.useCallback(E=>{!a&&r&&(r({type:"textColor",value:E}),requestAnimationFrame(()=>H?.()));},[a,r,H]),Ue=ee.useCallback(E=>{!a&&r&&(r({type:"highlightColor",value:typeof E=="string"?E:""}),requestAnimationFrame(()=>H?.()));},[a,r,H]),de=ee.useCallback(E=>{!a&&r&&r({type:"alignment",value:E});},[a,r]),Lt=ee.useCallback(()=>{!a&&r&&r("bulletList");},[a,r]),D=ee.useCallback(()=>{!a&&r&&r("numberedList");},[a,r]),Le=ee.useCallback(()=>{!a&&r&&r("indent");},[a,r]),nt=ee.useCallback(()=>{!a&&r&&r("outdent");},[a,r]),He=ee.useCallback(E=>{!a&&r&&(r({type:"lineSpacing",value:E}),requestAnimationFrame(()=>H?.()));},[a,r,H]),pe=ee.useCallback(E=>{!a&&r&&(r({type:"applyStyle",value:E}),requestAnimationFrame(()=>H?.()));},[a,r,H]),V=ee.useCallback(E=>{!a&&Re&&(Re(E),requestAnimationFrame(()=>H?.()));},[a,Re,H]);ee.useEffect(()=>{if(!d)return;let E=_=>{let Ye=_.target,Qt=h?.current,hn=ot.current,fn=Qt?.contains(Ye),gn=hn?.contains(Ye);if(!fn&&!gn)return;if((_.ctrlKey||_.metaKey)&&!_.altKey)switch(_.key.toLowerCase()){case "b":_.preventDefault(),z("bold");break;case "i":_.preventDefault(),z("italic");break;case "u":_.preventDefault(),z("underline");break;case "=":_.shiftKey?(_.preventDefault(),z("superscript")):(_.preventDefault(),z("subscript"));break;case "l":_.preventDefault(),de("left");break;case "e":_.preventDefault(),de("center");break;case "r":_.preventDefault(),de("right");break;case "j":_.preventDefault(),de("both");break;case "k":_.preventDefault(),z("insertLink");break}};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E);}},[d,z,de,h]);let re=ee.useCallback(E=>{let _=E.target;_.tagName==="INPUT"||_.tagName==="TEXTAREA"||_.tagName==="SELECT"||_.tagName==="OPTION"||E.preventDefault();},[]),Ae=ee.useCallback(E=>{let _=E.target,Ye=document.activeElement;_.tagName==="SELECT"||_.tagName==="OPTION"||Ye?.tagName==="SELECT"||requestAnimationFrame(()=>{H?.();});},[H]);return jsxRuntime.jsxs("div",{ref:ot,className:L(!ue&&"flex items-center px-2 py-1 bg-[#f1f5f9] rounded-full min-h-[36px] overflow-x-auto mx-2 mb-1",c),style:ue?{display:"contents",...u}:u,role:ue?void 0:"toolbar","aria-label":ue?void 0:t("toolbar.ariaLabel"),"data-testid":ue?void 0:"formatting-bar",onMouseDown:ue?void 0:re,onMouseUp:ue?void 0:Ae,children:[jsxRuntime.jsxs(ie,{label:t("formattingBar.groups.history"),children:[jsxRuntime.jsx(ne,{onClick:Pt,disabled:a||!p,title:t("formattingBar.undoShortcut"),ariaLabel:t("formattingBar.undo"),children:jsxRuntime.jsx(T,{name:"undo",size:le})}),jsxRuntime.jsx(ne,{onClick:kt,disabled:a||!m,title:t("formattingBar.redoShortcut"),ariaLabel:t("formattingBar.redo"),children:jsxRuntime.jsx(T,{name:"redo",size:le})})]}),we&&jsxRuntime.jsx(ie,{label:t("formattingBar.groups.zoom"),children:jsxRuntime.jsx(Ho,{value:ce,onChange:be,minZoom:.5,maxZoom:2,disabled:a,compact:true,showButtons:false})}),P&&jsxRuntime.jsx(ie,{label:t("formattingBar.groups.styles"),children:jsxRuntime.jsx(Lo,{value:n.styleId||"Normal",onChange:pe,styles:W,theme:O,disabled:a,width:120})}),(f||x)&&jsxRuntime.jsxs(ie,{label:t("formattingBar.groups.font"),children:[f&&jsxRuntime.jsx(ro,{value:n.fontFamily||"Arial",onChange:Rt,disabled:a,width:60,placeholder:"Arial"}),x&&jsxRuntime.jsx(fo,{value:n.fontSize!==void 0?ho(n.fontSize):11,onChange:Zt,disabled:a,width:42,placeholder:"11"})]}),jsxRuntime.jsxs(ie,{label:t("formattingBar.groups.textFormatting"),children:[jsxRuntime.jsx(ne,{onClick:()=>z("bold"),active:n.bold,disabled:a,title:t("formattingBar.boldShortcut"),ariaLabel:t("formattingBar.bold"),children:jsxRuntime.jsx(T,{name:"format_bold",size:le})}),jsxRuntime.jsx(ne,{onClick:()=>z("italic"),active:n.italic,disabled:a,title:t("formattingBar.italicShortcut"),ariaLabel:t("formattingBar.italic"),children:jsxRuntime.jsx(T,{name:"format_italic",size:le})}),jsxRuntime.jsx(ne,{onClick:()=>z("underline"),active:n.underline,disabled:a,title:t("formattingBar.underlineShortcut"),ariaLabel:t("formattingBar.underline"),children:jsxRuntime.jsx(T,{name:"format_underlined",size:le})}),jsxRuntime.jsx(ne,{onClick:()=>z("strikethrough"),active:n.strike,disabled:a,title:t("formattingBar.strikethrough"),ariaLabel:t("formattingBar.strikethrough"),children:jsxRuntime.jsx(T,{name:"strikethrough_s",size:le})}),v&&jsxRuntime.jsx(qe,{mode:"text",value:n.color?.replace(/^#/,""),onChange:Ze,theme:O,disabled:a,title:t("formattingBar.fontColor")}),y&&jsxRuntime.jsx(qe,{mode:"highlight",value:n.highlight,onChange:Ue,theme:O,disabled:a,title:t("formattingBar.highlightColor")}),jsxRuntime.jsx(ne,{onClick:()=>z("insertLink"),disabled:a,title:t("formattingBar.insertLinkShortcut"),ariaLabel:t("formattingBar.insertLink"),children:jsxRuntime.jsx(T,{name:"link",size:le})})]}),jsxRuntime.jsxs(ie,{label:t("formattingBar.groups.script"),children:[jsxRuntime.jsx(ne,{onClick:()=>z("superscript"),active:n.superscript,disabled:a,title:t("formattingBar.superscriptShortcut"),ariaLabel:t("formattingBar.superscript"),children:jsxRuntime.jsx(T,{name:"superscript",size:le})}),jsxRuntime.jsx(ne,{onClick:()=>z("subscript"),active:n.subscript,disabled:a,title:t("formattingBar.subscriptShortcut"),ariaLabel:t("formattingBar.subscript"),children:jsxRuntime.jsx(T,{name:"subscript",size:le})})]}),S&&jsxRuntime.jsx(ie,{label:t("formattingBar.groups.alignment"),children:jsxRuntime.jsx(wo,{value:n.alignment||"left",onChange:de,disabled:a})}),(w||I)&&jsxRuntime.jsxs(ie,{label:t("formattingBar.groups.listFormatting"),children:[w&&jsxRuntime.jsx(Mo,{listState:n.listState||Po(),onBulletList:Lt,onNumberedList:D,onIndent:Le,onOutdent:nt,disabled:a,showIndentButtons:true,compact:true,hasIndent:(n.indentLeft??0)>0}),I&&jsxRuntime.jsx(Ro,{value:n.lineSpacing,onChange:He,disabled:a})]}),X&&M&&jsxRuntime.jsxs(ie,{label:t("formattingBar.groups.image"),children:[jsxRuntime.jsx($o,{imageContext:X,onChange:M,disabled:a}),F&&jsxRuntime.jsx(Go,{onTransform:F,disabled:a}),Z&&jsxRuntime.jsx(ne,{onClick:Z,disabled:a,title:t("formattingBar.imagePropertiesShortcut"),ariaLabel:t("formattingBar.imageProperties"),children:jsxRuntime.jsx(T,{name:"tune",size:le})})]}),J?.isInTable&&Re&&jsxRuntime.jsxs(ie,{label:t("formattingBar.groups.table"),children:[jsxRuntime.jsx(qo,{onAction:V,disabled:a}),jsxRuntime.jsx(_o,{onAction:V,disabled:a,theme:O,value:J?.cellBorderColor?chunk4VUZBV2S_js.a(J.cellBorderColor,O).replace(/^#/,""):void 0}),jsxRuntime.jsx(No,{onAction:V,disabled:a}),jsxRuntime.jsx(Fo,{onAction:V,disabled:a,theme:O,value:J?.cellBackgroundColor}),jsxRuntime.jsx(Ko,{onAction:V,disabled:a,tableContext:J})]}),jsxRuntime.jsx(ne,{onClick:()=>z("clearFormatting"),disabled:a,title:t("formattingBar.clearFormatting"),ariaLabel:t("formattingBar.clearFormatting"),children:jsxRuntime.jsx(T,{name:"format_clear",size:le})}),b]})}var nn=12240,Tt=1440,Ct=1440,St=567,Wt=22,Di="var(--doc-text-muted)",Ni="var(--doc-text-subtle)",on="rgba(0, 0, 0, 0.02)",Fi="#4285f4",Bi="#3367d6",Oi="#2a56c6",Ne=5;function zi(e,t){return t==="inch"?(e/Ct).toFixed(2)+'"':(e/St).toFixed(1)+" cm"}function Qc({sectionProps:e,zoom:t=1,editable:o=false,onLeftMarginChange:n,onRightMarginChange:r,onFirstLineIndentChange:l,showFirstLineIndent:s=false,firstLineIndent:p=0,hangingIndent:m=false,indentLeft:a=0,indentRight:c=0,onIndentLeftChange:u,onIndentRightChange:d,unit:h="inch",className:b="",style:f,tabStops:x,onTabStopRemove:v}){let{t:y}=chunkQSUPYUOP_js.b(),[S,w]=ee.useState(null),[I,P]=ee.useState(null),[W,O]=ee.useState(null),[we,ce]=ee.useState(null),be=ee.useRef(null),H=e?.pageWidth??nn,X=e?.marginLeft??Tt,M=e?.marginRight??Tt,F=H-X-M,Z=chunkSE5EN2QL_js.a(H)*t,J=chunkSE5EN2QL_js.a(X)*t,Re=chunkSE5EN2QL_js.a(M)*t,ue=chunkSE5EN2QL_js.a(a)*t,ot=chunkSE5EN2QL_js.a(c)*t,z=m?-p:p,Pt=chunkSE5EN2QL_js.a(z)*t,kt=J+ue,Rt=Z-Re-ot,Zt=J+ue+Pt,Ze=ee.useCallback((D,Le)=>{o&&(D.preventDefault(),D.stopPropagation(),w(Le));},[o]),Ue=ee.useCallback(D=>{if(!S||!be.current)return;let Le=be.current.getBoundingClientRect(),nt=D.clientX-Le.left;ce(nt);let He=chunkSE5EN2QL_js.b(nt/t);if(S==="leftMargin"){let pe=H-M-720,V=Math.round(Math.max(0,Math.min(He,pe)));O(V),n?.(V);}else if(S==="rightMargin"){let pe=H-He,V=H-X-720,re=Math.round(Math.max(0,Math.min(pe,V)));O(re),r?.(re);}else if(S==="firstLineIndent"){let pe=X+a,V=He-pe,re=F-a-c-720,Ae=Math.round(Math.max(-a,Math.min(V,re)));O(Ae),l?.(Ae);}else if(S==="leftIndent"){let pe=He-X,V=F-c-720,re=Math.round(Math.max(0,Math.min(pe,V)));O(re),u?.(re);}else if(S==="rightIndent"){let V=H-M-He,re=F-a-720,Ae=Math.round(Math.max(0,Math.min(V,re)));O(Ae),d?.(Ae);}},[S,t,H,X,M,F,a,c,n,r,l,u,d]),de=ee.useCallback(()=>{w(null),O(null),ce(null);},[]);ee.useEffect(()=>{if(S)return document.addEventListener("mousemove",Ue),document.addEventListener("mouseup",de),()=>{document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",de);}},[S,Ue,de]);let Lt=Gi(H,t,h);return jsxRuntime.jsxs("div",{ref:be,className:`docx-horizontal-ruler ${b}`,style:{position:"relative",width:chunkSE5EN2QL_js.k(Z),height:Wt,backgroundColor:"transparent",overflow:"visible",userSelect:"none",cursor:S?"ew-resize":"default",...f},role:"slider","aria-label":y("ruler.horizontal"),"aria-valuemin":0,"aria-valuemax":H,children:[jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:chunkSE5EN2QL_js.k(J),height:Wt,backgroundColor:on,borderRight:"1px solid rgba(0,0,0,0.06)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&n?D=>Ze(D,"leftMargin"):void 0}),jsxRuntime.jsx("div",{style:{position:"absolute",top:0,right:0,width:chunkSE5EN2QL_js.k(Re),height:Wt,backgroundColor:on,borderLeft:"1px solid rgba(0,0,0,0.06)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&r?D=>Ze(D,"rightMargin"):void 0}),jsxRuntime.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:Lt.map((D,Le)=>jsxRuntime.jsx(Ki,{tick:D},Le))}),s&&jsxRuntime.jsx(Vt,{direction:"down",positionPx:Zt,editable:o,isDragging:S==="firstLineIndent",isHovered:I==="firstLineIndent",onMouseEnter:()=>P("firstLineIndent"),onMouseLeave:()=>P(null),onMouseDown:D=>Ze(D,"firstLineIndent"),label:y("ruler.firstLineIndent")}),o&&u&&jsxRuntime.jsx(Vt,{direction:"up",positionPx:kt,editable:o,isDragging:S==="leftIndent",isHovered:I==="leftIndent",onMouseEnter:()=>P("leftIndent"),onMouseLeave:()=>P(null),onMouseDown:D=>Ze(D,"leftIndent"),label:y("ruler.leftIndent")}),o&&d&&jsxRuntime.jsx(Vt,{direction:"down",positionPx:Rt,editable:o,isDragging:S==="rightIndent",isHovered:I==="rightIndent",onMouseEnter:()=>P("rightIndent"),onMouseLeave:()=>P(null),onMouseDown:D=>Ze(D,"rightIndent"),label:y("ruler.rightIndent")}),x?.map(D=>jsxRuntime.jsx($i,{tabStop:D,positionPx:chunkSE5EN2QL_js.a(D.position)*t,onDoubleClick:()=>v?.(D.position)},D.position)),S&&W!==null&&we!==null&&jsxRuntime.jsx(Wi,{value:zi(W,h),positionPx:we})]})}function Ki({tick:e}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:{position:"absolute",left:chunkSE5EN2QL_js.k(e.position),bottom:0,width:1,height:e.height,backgroundColor:Ni}}),e.label&&jsxRuntime.jsx("div",{style:{position:"absolute",left:chunkSE5EN2QL_js.k(e.position),top:3,transform:"translateX(-50%)",fontSize:"9px",color:Di,fontFamily:"sans-serif",whiteSpace:"nowrap"},children:e.label})]})}function Vt({direction:e,positionPx:t,editable:o,isDragging:n,isHovered:r,onMouseEnter:l,onMouseLeave:s,onMouseDown:p,label:m}){let a=n?Oi:r?Bi:Fi,c=Math.round(Ne*1.6),u={position:"absolute",left:chunkSE5EN2QL_js.k(t-Ne),width:Ne*2,height:c+2,cursor:o?"ew-resize":"default",zIndex:n?10:4,...e==="down"?{top:0}:{bottom:0}},d=e==="down"?{position:"absolute",top:1,left:0,width:0,height:0,borderLeft:`${Ne}px solid transparent`,borderRight:`${Ne}px solid transparent`,borderTop:`${c}px solid ${a}`,transition:"border-top-color 0.1s"}:{position:"absolute",bottom:1,left:0,width:0,height:0,borderLeft:`${Ne}px solid transparent`,borderRight:`${Ne}px solid transparent`,borderBottom:`${c}px solid ${a}`,transition:"border-bottom-color 0.1s"};return jsxRuntime.jsx("div",{className:"docx-ruler-indent",style:u,onMouseEnter:l,onMouseLeave:s,onMouseDown:p,role:"slider","aria-label":m,"aria-orientation":"horizontal",tabIndex:o?0:-1,children:jsxRuntime.jsx("div",{style:d})})}function Wi({value:e,positionPx:t}){return jsxRuntime.jsx("div",{style:{position:"absolute",left:chunkSE5EN2QL_js.k(t),top:-22,transform:"translateX(-50%)",backgroundColor:"#333",color:"#fff",fontSize:"10px",fontFamily:"sans-serif",padding:"2px 6px",borderRadius:3,whiteSpace:"nowrap",pointerEvents:"none",zIndex:20},children:e})}var Vi={left:"L",center:"C",right:"R",decimal:"D",bar:"|"};function $i({tabStop:e,positionPx:t,onDoubleClick:o}){return jsxRuntime.jsx("div",{style:{position:"absolute",left:chunkSE5EN2QL_js.k(t-5),bottom:0,width:10,height:12,display:"flex",alignItems:"center",justifyContent:"center",fontSize:8,fontWeight:700,color:"#555",cursor:"pointer",userSelect:"none"},onDoubleClick:n=>{n.stopPropagation(),o();},title:`${e.alignment} tab at ${(e.position/1440).toFixed(2)}"`,children:Vi[e.alignment]||"L"})}function Gi(e,t,o){let n=[];if(o==="inch"){let r=Ct/8,l=Math.ceil(e/r);for(let s=0;s<=l;s++){let p=s*r;if(p>e)break;let m=chunkSE5EN2QL_js.a(p)*t;s%8===0?n.push({position:m,height:10,label:s/8>0?String(s/8):void 0}):s%4===0?n.push({position:m,height:6}):s%2===0?n.push({position:m,height:4}):n.push({position:m,height:2});}}else {let r=St/10,l=Math.ceil(e/r);for(let s=0;s<=l;s++){let p=s*r;if(p>e)break;let m=chunkSE5EN2QL_js.a(p)*t;s%10===0?n.push({position:m,height:10,label:s/10>0?String(s/10):void 0}):s%5===0?n.push({position:m,height:6}):n.push({position:m,height:3});}}return n}function eu(e,t,o,n){let r=chunkSE5EN2QL_js.b(e/n);return t==="left"?Math.max(0,r):Math.max(0,chunkSE5EN2QL_js.b(o/n)-r)}function tu(e,t=1){let o=e?.pageWidth??nn,n=e?.marginLeft??Tt,r=e?.marginRight??Tt,l=chunkSE5EN2QL_js.a(o)*t,s=chunkSE5EN2QL_js.a(n)*t,p=chunkSE5EN2QL_js.a(r)*t;return {width:l,leftMargin:s,rightMargin:p,contentWidth:l-s-p}}function ou(e,t){return t==="inch"?(e/Ct).toFixed(2)+'"':(e/St).toFixed(1)+" cm"}function nu(e,t){let o=parseFloat(e.replace(/[^\d.]/g,""));return isNaN(o)?null:Math.round(o*(t==="inch"?Ct:St))}var iu="application/x-docx-editor",j={HTML:"text/html",PLAIN:"text/plain"};function lu(e){if(!e)return [];let t=()=>{if(!e.items||e.items.length===0)return [];let a=[];for(let c of Array.from(e.items)){if(c.kind!=="file"||!c.type.startsWith("image/"))continue;let u=c.getAsFile();u&&a.push(u);}return a},o=()=>!e.files||e.files.length===0?[]:Array.from(e.files).filter(a=>a.type.startsWith("image/")),n=t(),r=n.length?n:o();if(r.length<=1)return r;let l=["image/png","image/jpeg","image/webp","image/gif","image/svg+xml","image/bmp","image/tiff"],s=a=>{let c=a[0],u=l.indexOf(c.type);u<0&&(u=Number.MAX_SAFE_INTEGER);for(let d of a.slice(1)){let h=l.indexOf(d.type);if(h<0&&(h=Number.MAX_SAFE_INTEGER),h<u){c=d,u=h;continue}h===u&&d.size>c.size&&(c=d);}return c},p=new Map;for(let a of r){let c=a.name?.trim()??"",d=(c?c.replace(/\.[^/.]+$/,"").toLowerCase():"")||`size:${a.size}`,h=p.get(d);h?h.push(a):p.set(d,[a]);}let m=[];for(let a of p.values())m.push(s(a));return m}async function an(e,t={}){let{includeFormatting:o=true,onError:n}=t;try{let r=$t(e,o);return await wt(r)}catch(r){return n?.(r),false}}async function su(e,t={}){let{includeFormatting:o=true,onError:n}=t;try{let r=Yi(e,o);return await wt(r)}catch(r){return n?.(r),false}}function $t(e,t=true){let o=e.map(Yt).join(""),n=t?dn(e):jt(o),r=JSON.stringify(e);return {plainText:o,html:n,internal:r}}function Yi(e,t=true){let o=e.map(nl).join(`
|
|
2
|
+
`),n=t?rl(e):jt(o),r=JSON.stringify(e);return {plainText:o,html:n,internal:r}}async function wt(e){try{if(navigator.clipboard&&navigator.clipboard.write){let t=[new ClipboardItem({[j.PLAIN]:new Blob([e.plainText],{type:j.PLAIN}),[j.HTML]:new Blob([e.html],{type:j.HTML})})];return await navigator.clipboard.write(t),!0}return ln(e)}catch{return ln(e)}}function ln(e){let t=document.createElement("div");t.innerHTML=e.html,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t);try{let o=window.getSelection();if(!o)return !1;let n=document.createRange();n.selectNodeContents(t),o.removeAllRanges(),o.addRange(n);let r=document.execCommand("copy");return o.removeAllRanges(),r}finally{document.body.removeChild(t);}}async function cu(e={}){let{cleanWordFormatting:t=true,onError:o}=e;try{if(navigator.clipboard&&navigator.clipboard.read){let n=await navigator.clipboard.read();return await ji(n,t)}return null}catch(n){return o?.(n),null}}async function ji(e,t){let o="",n="";for(let r of e)r.types.includes(j.HTML)&&(o=await(await r.getType(j.HTML)).text()),r.types.includes(j.PLAIN)&&(n=await(await r.getType(j.PLAIN)).text());return un(o,n,t)}function Xi(e,t={}){let{cleanWordFormatting:o=true}=t,n=e.clipboardData;if(!n)return null;let r=n.getData(j.HTML),l=n.getData(j.PLAIN);return un(r,l,o)}function un(e,t,o=true){let n=Ji(e),r=Qi(e);if(r){let p=e.match(/data-docx-editor-content="([^"]+)"/);if(p)try{return {runs:JSON.parse(decodeURIComponent(p[1])),fromWord:!1,fromEditor:!0,plainText:t}}catch{}}let l=e;return n&&o&&(l=el(e)),{runs:tl(l,t),fromWord:n,fromEditor:r,plainText:t}}function Ji(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 Qi(e){return e.includes("data-docx-editor")||e.includes("docx-run")||e.includes("docx-paragraph")}function el(e){let t=e;return t=t.replace(/<!--\[if[\s\S]*?<!\[endif\]-->/gi,""),t=t.replace(/<!--[\s\S]*?-->/g,""),t=t.replace(/<\?xml[^>]*>/gi,""),t=t.replace(/<o:[^>]*>[\s\S]*?<\/o:[^>]*>/gi,""),t=t.replace(/<o:[^>]*\/>/gi,""),t=t.replace(/<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi,""),t=t.replace(/<w:[^>]*\/>/gi,""),t=t.replace(/\s*mso-[^:;]+:[^;]+;?/gi,""),t=t.replace(/\s*style="\s*"/gi,""),t=t.replace(/\s*class="[^"]*Mso[^"]*"/gi,""),t=t.replace(/<span[^>]*>\s*<\/span>/gi,""),t=t.replace(/<\/?font[^>]*>/gi,""),t=t.replace(/\s+/g," ").trim(),t}function tl(e,t){if(!e||e.trim()==="")return t?[Ut(t)]:[];let o=document.createElement("div");o.innerHTML=e;let n=[];return Gt(o,n,{}),n.length===0&&t?[Ut(t)]:n}function Gt(e,t,o){if(e.nodeType===Node.TEXT_NODE){let s=e.textContent||"";(s.trim()||s.includes(" "))&&t.push(Ut(s,o));return}if(e.nodeType!==Node.ELEMENT_NODE)return;let n=e,r=n.tagName.toLowerCase(),l={...o,...ol(n)};switch(r){case "br":t.push(cn(l));return;case "p":case "div":for(let s of n.childNodes)Gt(s,t,l);n.nextSibling&&t.push(cn(l));return;case "b":case "strong":l.bold=true;break;case "i":case "em":l.italic=true;break;case "u":l.underline={style:"single"};break;case "s":case "strike":case "del":l.strike=true;break;case "sup":l.vertAlign="superscript";break;case "sub":l.vertAlign="subscript";break;case "code":case "pre":l.fontFamily={ascii:"Courier New"};break}for(let s of n.childNodes)Gt(s,t,l);}function ol(e){let t={},o=e.style;(o.fontWeight==="bold"||parseInt(o.fontWeight)>=700)&&(t.bold=true),o.fontStyle==="italic"&&(t.italic=true);let n=o.textDecoration||o.textDecorationLine;if(n&&(n.includes("underline")&&(t.underline={style:"single"}),n.includes("line-through")&&(t.strike=true)),o.fontSize){let r=parseFloat(o.fontSize);isNaN(r)||(t.fontSize=Math.round(r/1.333*2));}if(o.fontFamily){let r=o.fontFamily.replace(/["']/g,"").split(",")[0].trim();r&&(t.fontFamily={ascii:r});}if(o.color){let r=sn(o.color);r&&(t.color={rgb:r});}if(o.backgroundColor&&o.backgroundColor!=="transparent"){let r=sn(o.backgroundColor);r&&(t.shading={fill:{rgb:r}});}return t}function sn(e){if(!e||e==="transparent"||e==="inherit")return null;if(e.startsWith("#"))return e.slice(1).toUpperCase();let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(t){let o=parseInt(t[1]).toString(16).padStart(2,"0"),n=parseInt(t[2]).toString(16).padStart(2,"0"),r=parseInt(t[3]).toString(16).padStart(2,"0");return (o+n+r).toUpperCase()}return null}function Yt(e){return e.content.map(t=>t.type==="text"?t.text:t.type==="tab"?" ":t.type==="break"&&t.breakType==="textWrapping"?`
|
|
3
|
+
`:"").join("")}function nl(e){return (e.content||[]).map(t=>t.type==="run"?Yt(t):"").join("")}function dn(e){return e.map(al).join("")}function rl(e){return e.map(t=>`<p>${dn(t.content?.filter(o=>o.type==="run")||[])}</p>`).join("")}function al(e){let t=Yt(e);if(!t)return "";let o=jt(t),n=e.formatting;if(!n)return o;n.bold&&(o=`<strong>${o}</strong>`),n.italic&&(o=`<em>${o}</em>`),n.underline&&(o=`<u>${o}</u>`),n.strike&&(o=`<s>${o}</s>`),n.vertAlign==="superscript"&&(o=`<sup>${o}</sup>`),n.vertAlign==="subscript"&&(o=`<sub>${o}</sub>`);let r=[];if(n.fontSize){let l=n.fontSize/2;r.push(`font-size: ${l}pt`);}return n.fontFamily?.ascii&&r.push(`font-family: "${n.fontFamily.ascii}"`),n.color?.rgb&&r.push(`color: #${n.color.rgb}`),n.shading?.fill?.rgb&&r.push(`background-color: #${n.shading.fill.rgb}`),r.length>0&&(o=`<span style="${r.join("; ")}">${o}</span>`),o}function jt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ut(e,t){return {type:"run",formatting:t,content:[{type:"text",text:e}]}}function cn(e){return {type:"run",formatting:e,content:[{type:"break",breakType:"textWrapping"}]}}function uu(e){let{onCopy:t,onCut:o,onPaste:n,clipboardOptions:r={}}=e;return {handleCopy:async a=>{if(!t)return;let c=t();if(!c)return;a.preventDefault();let u=$t(c.runs);a.clipboardData?(a.clipboardData.setData(j.PLAIN,u.plainText),a.clipboardData.setData(j.HTML,u.html)):await wt(u);},handleCut:async a=>{if(!o)return;let c=o();if(!c)return;a.preventDefault();let u=$t(c.runs);a.clipboardData?(a.clipboardData.setData(j.PLAIN,u.plainText),a.clipboardData.setData(j.HTML,u.html)):await wt(u);},handlePaste:a=>{if(!n)return;a.preventDefault();let c=Xi(a,r);c&&n(c);},handleKeyDown:async a=>{let c=a.ctrlKey||a.metaKey;if(c&&a.key==="c"&&!a.shiftKey&&t){let u=t();u&&await an(u.runs,r);}if(c&&a.key==="x"&&!a.shiftKey&&o){let u=o();u&&await an(u.runs,r);}}}}var pn=[{action:"cut",labelKey:"contextMenu.cut",shortcutKey:"contextMenu.cutShortcut"},{action:"copy",labelKey:"contextMenu.copy",shortcutKey:"contextMenu.copyShortcut"},{action:"paste",labelKey:"contextMenu.paste",shortcutKey:"contextMenu.pasteShortcut"},{action:"pasteAsPlainText",labelKey:"contextMenu.pastePlainText",shortcutKey:"contextMenu.pastePlainTextShortcut",dividerAfter:true},{action:"delete",labelKey:"contextMenu.delete",shortcutKey:"contextMenu.deleteShortcut",dividerAfter:true},{action:"selectAll",labelKey:"contextMenu.selectAll",shortcutKey:"contextMenu.selectAllShortcut"}],sl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"4",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M5.5 10.5L10.5 3M10.5 10.5L5.5 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),cl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"5",y:"5",width:"8",height:"9",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M11 5V3a1 1 0 00-1-1H4a1 1 0 00-1 1v8a1 1 0 001 1h2",stroke:"currentColor",strokeWidth:"1.5"})]}),ul=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"10",height:"11",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 3V2a1 1 0 011-1h2a1 1 0 011 1v1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 8h4M6 11h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),dl=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),pl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"2 2"}),jsxRuntime.jsx("rect",{x:"4",y:"4",width:"8",height:"8",fill:"currentColor",opacity:"0.3"})]}),ml=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"6",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("rect",{x:"2",y:"10",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("path",{d:"M8 1v3M6.5 2.5h3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),hl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("rect",{x:"2",y:"6",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("path",{d:"M8 12v3M6.5 13.5h3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),fl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("rect",{x:"2",y:"6",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.3"}),jsxRuntime.jsx("rect",{x:"2",y:"10",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("path",{d:"M5 8h6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),gl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"6",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("rect",{x:"10",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("path",{d:"M3 8H0.5M1.75 6.5v3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),bl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("rect",{x:"6",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("path",{d:"M13 8h2.5M14.25 6.5v3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),vl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("rect",{x:"6",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.3"}),jsxRuntime.jsx("rect",{x:"10",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsxRuntime.jsx("path",{d:"M8 5v6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),xl=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M3 3h10a1 1 0 011 1v6a1 1 0 01-1 1H6l-3 2.5V11H3a1 1 0 01-1-1V4a1 1 0 011-1z",stroke:"currentColor",strokeWidth:"1.3"}),jsxRuntime.jsx("path",{d:"M5 6h6M5 8.5h4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]});function yl(e){switch(e){case "cut":return jsxRuntime.jsx(sl,{});case "copy":return jsxRuntime.jsx(cl,{});case "paste":case "pasteAsPlainText":return jsxRuntime.jsx(ul,{});case "delete":return jsxRuntime.jsx(dl,{});case "selectAll":return jsxRuntime.jsx(pl,{});case "addRowAbove":return jsxRuntime.jsx(ml,{});case "addRowBelow":return jsxRuntime.jsx(hl,{});case "deleteRow":return jsxRuntime.jsx(fl,{});case "addColumnLeft":return jsxRuntime.jsx(gl,{});case "addColumnRight":return jsxRuntime.jsx(bl,{});case "deleteColumn":return jsxRuntime.jsx(vl,{});case "addComment":return jsxRuntime.jsx(xl,{});default:return null}}var Tl=({item:e,onClick:t,isHighlighted:o,onMouseEnter:n})=>e.action==="separator"?jsxRuntime.jsx("div",{className:"docx-text-context-menu-separator",style:{height:"1px",backgroundColor:"var(--doc-border)",margin:"4px 12px"}}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{type:"button",className:`docx-text-context-menu-item ${o?"docx-text-context-menu-item-highlighted":""} ${e.disabled?"docx-text-context-menu-item-disabled":""}`,onClick:t,onMouseEnter:n,disabled:e.disabled,role:"menuitem","aria-disabled":e.disabled,style:{display:"flex",alignItems:"center",gap:"10px",width:"100%",padding:"8px 12px",border:"none",background:o&&!e.disabled?"var(--doc-primary-light)":"transparent",cursor:e.disabled?"not-allowed":"pointer",fontSize:"13px",color:e.disabled?"var(--doc-text-subtle)":"var(--doc-text)",textAlign:"left",opacity:e.disabled?.6:1},children:[jsxRuntime.jsx("span",{style:{display:"flex",color:e.disabled?"var(--doc-border)":"var(--doc-text-muted)"},children:yl(e.action)}),jsxRuntime.jsx("span",{style:{flex:1},children:e.label}),e.shortcut&&jsxRuntime.jsx("span",{style:{fontSize:"11px",color:"var(--doc-text-subtle)",fontFamily:"monospace"},children:e.shortcut})]}),e.dividerAfter&&jsxRuntime.jsx("div",{className:"docx-text-context-menu-separator",style:{height:"1px",backgroundColor:"var(--doc-border)",margin:"4px 12px"}})]}),fu=({isOpen:e,position:t,hasSelection:o,isEditable:n,hasClipboardContent:r=true,onAction:l,onClose:s,items:p,className:m=""})=>{let a=ee.useRef(null),[c,u]=ee.useState(0),{t:d}=chunkQSUPYUOP_js.b(),h=ee.useMemo(()=>pn.map(y=>({action:y.action,label:d(y.labelKey),shortcut:y.shortcutKey?d(y.shortcutKey):void 0,dividerAfter:y.dividerAfter})),[d]),b=(p||h).map(y=>{let S=(()=>{if(y.disabled!==void 0)return y.disabled;switch(y.action){case "cut":case "copy":case "delete":return !o;case "paste":case "pasteAsPlainText":return !n||!r;default:return false}})();return {...y,disabled:S}}),f=b.filter(y=>y.action!=="separator");ee.useEffect(()=>{if(!e)return;let y=w=>{a.current&&!a.current.contains(w.target)&&s();},S=setTimeout(()=>{document.addEventListener("mousedown",y);},0);return ()=>{clearTimeout(S),document.removeEventListener("mousedown",y);}},[e,s]),ee.useEffect(()=>{if(!e)return;let y=S=>{switch(S.key){case "Escape":S.preventDefault(),s();break;case "ArrowDown":S.preventDefault(),u(I=>{let P=(I+1)%f.length;for(;f[P]?.disabled&&P!==I;)P=(P+1)%f.length;return P});break;case "ArrowUp":S.preventDefault(),u(I=>{let P=(I-1+f.length)%f.length;for(;f[P]?.disabled&&P!==I;)P=(P-1+f.length)%f.length;return P});break;case "Enter":S.preventDefault();let w=f[c];w&&!w.disabled&&(l(w.action),s());break}};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,c,f,l,s]),ee.useEffect(()=>{e&&u(0);},[e]);let x=ee.useCallback(()=>{let S=b.length*36+16,w=t.x,I=t.y;return typeof window<"u"&&(w+220>window.innerWidth&&(w=window.innerWidth-220-10),I+S>window.innerHeight&&(I=window.innerHeight-S-10),w<10&&(w=10),I<10&&(I=10)),{position:"fixed",top:I,left:w,minWidth:220,background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",zIndex:1e4,padding:"4px 0",overflow:"hidden"}},[t,b.length]),v=y=>{y.disabled||(l(y.action),s());};return e?jsxRuntime.jsx("div",{ref:a,className:`docx-text-context-menu ${m}`,style:x(),role:"menu","aria-label":d("contextMenu.textMenuAriaLabel"),children:b.map((y,S)=>{let w=f.findIndex(I=>I===y);return jsxRuntime.jsx(Tl,{item:y,onClick:()=>v(y),isHighlighted:w===c,onMouseEnter:()=>{w>=0&&!y.disabled&&u(w);}},`${y.action}-${S}`)})}):null};function gu(e={}){let{enabled:t=true,isEditable:o=true,containerRef:n,onAction:r}=e,[l,s]=ee.useState(false),[p,m]=ee.useState({x:0,y:0}),[a,c]=ee.useState(false),u=ee.useCallback(()=>{let x=window.getSelection(),v=x&&!x.isCollapsed&&x.toString().length>0;return c(!!v),!!v},[]),d=ee.useCallback(x=>{t&&(x.preventDefault(),x.stopPropagation(),u(),m({x:x.clientX,y:x.clientY}),s(true));},[t,u]),h=ee.useCallback(()=>{s(false);},[]),b=ee.useCallback(x=>{switch(h(),x){case "cut":document.execCommand("cut");break;case "copy":document.execCommand("copy");break;case "paste":document.execCommand("paste");break;case "pasteAsPlainText":navigator.clipboard.readText?.().then(v=>{document.execCommand("insertText",false,v);}).catch(()=>{document.execCommand("paste");});break;case "delete":document.execCommand("delete");break;case "selectAll":document.execCommand("selectAll");break}r?.(x);},[h,r]),f=ee.useCallback(x=>{d(x);},[d]);return ee.useEffect(()=>{if(!l)return;let x=v=>{v.key==="Escape"&&h();};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[l,h]),{isOpen:l,position:p,hasSelection:a,openMenu:d,closeMenu:h,handleAction:b,onContextMenu:f}}function bu(e){return {cut:"Cut",copy:"Copy",paste:"Paste",pasteAsPlainText:"Paste as Plain Text",selectAll:"Select All",delete:"Delete",separator:"",addRowAbove:"Insert row above",addRowBelow:"Insert row below",deleteRow:"Delete row",addColumnLeft:"Insert column left",addColumnRight:"Insert column right",deleteColumn:"Delete column",addComment:"Comment"}[e]}function vu(e){return {cut:"Ctrl+X",copy:"Ctrl+C",paste:"Ctrl+V",pasteAsPlainText:"Ctrl+Shift+V",selectAll:"Ctrl+A",delete:"Del",separator:"",addRowAbove:"",addRowBelow:"",deleteRow:"",addColumnLeft:"",addColumnRight:"",deleteColumn:"",addComment:""}[e]}function xu(){return pn.map(e=>({action:e.action,label:e.labelKey,shortcut:e.shortcutKey,dividerAfter:e.dividerAfter}))}function yu(e,t,o){switch(e){case "cut":case "copy":case "delete":return t;case "paste":case "pasteAsPlainText":return o;case "addComment":return t;case "selectAll":return true;default:return true}}var Se=16;function wl(){return jsxRuntime.jsx(T,{name:"table_rows",size:Se,style:{transform:"scaleY(-1)"}})}function Il(){return jsxRuntime.jsx(T,{name:"table_rows",size:Se})}function Ml(){return jsxRuntime.jsx(T,{name:"view_column",size:Se,style:{transform:"scaleX(-1)"}})}function Pl(){return jsxRuntime.jsx(T,{name:"view_column",size:Se})}function kl(){return jsxRuntime.jsx(T,{name:"delete_sweep",size:Se})}function Rl(){return jsxRuntime.jsx(T,{name:"delete_sweep",size:Se,style:{transform:"rotate(90deg)"}})}function Zl(){return jsxRuntime.jsx(T,{name:"call_merge",size:Se})}function Ll(){return jsxRuntime.jsx(T,{name:"call_split",size:Se})}function Hl(){return jsxRuntime.jsx(T,{name:"delete",size:Se,className:"text-red-600"})}var se={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 Ce({action:e,label:t,icon:o,disabled:n=false,onClick:r,showLabel:l=false,compact:s=false,shortcut:p}){let[m,a]=ee__namespace.default.useState(false),c=typeof e=="string"&&e.startsWith("delete"),u={...se.button,...s?se.buttonCompact:{},...m&&!n?se.buttonHover:{},...n?se.buttonDisabled:{},...c&&!n?se.buttonDelete:{}},d=p?`${t} (${p})`:t;return jsxRuntime.jsxs("button",{type:"button",className:`docx-table-toolbar-button docx-table-toolbar-${typeof e=="string"?e:e.type}`,style:u,disabled:n,onClick:r,onMouseEnter:()=>a(true),onMouseLeave:()=>a(false),title:d,"aria-label":t,children:[o,l&&jsxRuntime.jsx("span",{children:t})]})}function Xt({children:e,showSeparator:t=true}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:se.group,children:e}),t&&jsxRuntime.jsx("div",{style:se.separator})]})}function Mu({context:e,onAction:t,disabled:o=false,className:n,style:r,showLabels:l=false,compact:s=false,position:p="top",children:m}){let{t:a}=chunkQSUPYUOP_js.b();if(!e)return null;let c=v=>{!o&&t&&e&&t(v,e);},u=e.rowCount>1,d=e.columnCount>1,h=e.hasMultiCellSelection,b=e.canSplitCell,f={...se.container,...s?se.containerCompact:{},...p==="floating"?se.containerFloating:{},...r},x=["docx-table-toolbar"];return n&&x.push(n),s&&x.push("docx-table-toolbar-compact"),p==="floating"&&x.push("docx-table-toolbar-floating"),jsxRuntime.jsxs("div",{className:x.join(" "),style:f,role:"toolbar","aria-label":a("table.editingTools"),children:[jsxRuntime.jsx("span",{style:se.label,children:a("table.label")}),jsxRuntime.jsxs(Xt,{children:[jsxRuntime.jsx(Ce,{action:"addRowAbove",label:a("table.insertRowAbove"),icon:jsxRuntime.jsx(wl,{}),disabled:o,onClick:()=>c("addRowAbove"),showLabel:l,compact:s}),jsxRuntime.jsx(Ce,{action:"addRowBelow",label:a("table.insertRowBelow"),icon:jsxRuntime.jsx(Il,{}),disabled:o,onClick:()=>c("addRowBelow"),showLabel:l,compact:s}),jsxRuntime.jsx(Ce,{action:"deleteRow",label:a("table.deleteRow"),icon:jsxRuntime.jsx(kl,{}),disabled:o||!u,onClick:()=>c("deleteRow"),showLabel:l,compact:s})]}),jsxRuntime.jsxs(Xt,{children:[jsxRuntime.jsx(Ce,{action:"addColumnLeft",label:a("table.insertColumnLeft"),icon:jsxRuntime.jsx(Ml,{}),disabled:o,onClick:()=>c("addColumnLeft"),showLabel:l,compact:s}),jsxRuntime.jsx(Ce,{action:"addColumnRight",label:a("table.insertColumnRight"),icon:jsxRuntime.jsx(Pl,{}),disabled:o,onClick:()=>c("addColumnRight"),showLabel:l,compact:s}),jsxRuntime.jsx(Ce,{action:"deleteColumn",label:a("table.deleteColumn"),icon:jsxRuntime.jsx(Rl,{}),disabled:o||!d,onClick:()=>c("deleteColumn"),showLabel:l,compact:s})]}),jsxRuntime.jsxs(Xt,{showSeparator:false,children:[jsxRuntime.jsx(Ce,{action:"mergeCells",label:a("table.mergeCells"),icon:jsxRuntime.jsx(Zl,{}),disabled:o||!h,onClick:()=>c("mergeCells"),showLabel:l,compact:s}),jsxRuntime.jsx(Ce,{action:"splitCell",label:a("table.splitCell"),icon:jsxRuntime.jsx(Ll,{}),disabled:o||!b,onClick:()=>c("splitCell"),showLabel:l,compact:s}),jsxRuntime.jsx(Ce,{action:"deleteTable",label:a("table.deleteTable"),icon:jsxRuntime.jsx(Hl,{}),disabled:o,onClick:()=>c("deleteTable"),showLabel:l,compact:s})]}),m]})}function Pu(e,t){let o=e.rows.length,n=Jt(e),r=!!(t.selectedCells&&(t.selectedCells.startRow!==t.selectedCells.endRow||t.selectedCells.startCol!==t.selectedCells.endCol)),l=mn(e,t.rowIndex,t.columnIndex),s=!!(l&&((l.formatting?.gridSpan??1)>1||l.formatting?.vMerge==="restart"));return {table:e,selection:t,hasMultiCellSelection:r,canSplitCell:s,rowCount:o,columnCount:n}}function Jt(e){if(!e.rows.length)return 0;let t=0;for(let o of e.rows){let n=0;for(let r of o.cells)n+=r.formatting?.gridSpan??1;t=Math.max(t,n);}return t}function mn(e,t,o){let n=e.rows[t];if(!n)return null;let r=0;for(let l of n.cells){let s=l.formatting?.gridSpan??1;if(o>=r&&o<r+s)return l;r+=s;}return null}function Al(e,t){let o=[],n=0;for(let r of e.cells){let l=r.formatting?.gridSpan??1;o.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...r.formatting,vMerge:void 0}}),n+=l;}for(;n<t;)o.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}),n++;return {type:"tableRow",cells:o,formatting:{...e.formatting,header:false}}}function El(){return {type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}}function ku(e,t,o="after"){let n=[...e.rows],r=o==="before"?t:t+1,l=e.rows[t]||e.rows[0],s=Jt(e),p=Al(l,s);return n.splice(r,0,p),{...e,rows:n}}function Ru(e,t){if(e.rows.length<=1)return e;let o=e.rows.filter((n,r)=>r!==t);return {...e,rows:o}}function Zu(e,t,o="after"){let n=o==="before"?t:t+1,r=e.rows.map(s=>{let p=[...s.cells],m=0,a=0;for(let c=0;c<s.cells.length;c++){let d=s.cells[c].formatting?.gridSpan??1;if(n<=m+d){a=o==="before"?c:c+1;break}m+=d,a=c+1;}return p.splice(a,0,El()),{...s,cells:p}}),l=e.columnWidths;if(e.columnWidths&&e.columnWidths.length>0){l=[...e.columnWidths];let s=e.columnWidths[t]||e.columnWidths[0]||1440;l.splice(n,0,s);}return {...e,rows:r,columnWidths:l}}function Lu(e,t){if(Jt(e)<=1)return e;let n=e.rows.map(l=>{let s=0,p=[];for(let m of l.cells){let a=m.formatting?.gridSpan??1;t>=s&&t<s+a?a>1&&p.push({...m,formatting:{...m.formatting,gridSpan:a-1}}):p.push(m),s+=a;}return {...l,cells:p}}),r=e.columnWidths;return e.columnWidths&&e.columnWidths.length>t&&(r=e.columnWidths.filter((l,s)=>s!==t)),{...e,rows:n,columnWidths:r}}function Hu(e,t){if(!t.selectedCells)return e;let{startRow:o,startCol:n,endRow:r,endCol:l}=t.selectedCells,s=r-o+1,p=l-n+1,m=e.rows.map((a,c)=>{if(c<o||c>r)return a;let u=[],d=0;for(let h of a.cells){let b=h.formatting?.gridSpan??1,f=d+b-1;d<=l&&f>=n?c===o&&d===n?u.push({...h,formatting:{...h.formatting,gridSpan:p,vMerge:s>1?"restart":void 0}}):c>o&&d===n&&u.push({...h,formatting:{...h.formatting,gridSpan:p,vMerge:"continue"}}):u.push(h),d+=b;}return {...a,cells:u}});return {...e,rows:m}}function Au(e,t,o){let n=mn(e,t,o);if(!n)return e;let r=n.formatting?.gridSpan??1,l=n.formatting?.vMerge==="restart";if(r<=1&&!l)return e;let s=e.rows.map((p,m)=>{if(m!==t&&!l)return p;let a=[],c=0;for(let u of p.cells){let d=u.formatting?.gridSpan??1;if(c===o||c<=o&&o<c+d)if(r>1)for(let h=0;h<r;h++)a.push({type:"tableCell",content:h===0?u.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...u.formatting,gridSpan:void 0,vMerge:void 0}});else l&&m===t?a.push({...u,formatting:{...u.formatting,vMerge:void 0}}):u.formatting?.vMerge==="continue"?a.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...u.formatting,vMerge:void 0}}):a.push(u);else a.push(u);c+=d;}return {...p,cells:a}});return {...e,rows:s}}
|
|
4
|
+
exports.$=bu;exports.A=ne;exports.B=ie;exports.C=vc;exports.D=xc;exports.E=Qc;exports.F=eu;exports.G=tu;exports.H=ou;exports.I=nu;exports.J=iu;exports.K=j;exports.L=lu;exports.M=an;exports.N=su;exports.O=$t;exports.P=Yi;exports.Q=wt;exports.R=cu;exports.S=Xi;exports.T=un;exports.U=Ji;exports.V=Qi;exports.W=el;exports.X=tl;exports.Y=uu;exports.Z=fu;exports._=gu;exports.a=L;exports.aa=vu;exports.b=G;exports.ba=xu;exports.c=oe;exports.ca=yu;exports.d=T;exports.da=Mu;exports.e=vt;exports.ea=Pu;exports.f=en;exports.fa=Jt;exports.g=ro;exports.ga=mn;exports.h=Y;exports.ha=ku;exports.i=ds;exports.ia=Ru;exports.j=fo;exports.ja=Zu;exports.k=qe;exports.ka=Lu;exports.l=wo;exports.la=Hu;exports.m=Mo;exports.ma=Au;exports.n=Po;exports.o=Ro;exports.p=Lo;exports.q=Ho;exports.r=qo;exports.s=_o;exports.t=No;exports.u=Fo;exports.v=Ko;exports.w=zt;exports.x=Sc;exports.y=tn;exports.z=lc;
|