@eigenpal/docx-js-editor 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FindReplaceDialog-K4GRE4JB.cjs +2 -0
- package/dist/FindReplaceDialog-K4GRE4JB.cjs.map +1 -0
- package/dist/{FindReplaceDialog-UMXCBBST.js → FindReplaceDialog-MMDEJORP.js} +2 -1
- package/dist/FindReplaceDialog-MMDEJORP.js.map +1 -0
- package/dist/{FootnotePropertiesDialog-TYQGPWPX.js → FootnotePropertiesDialog-HG4267LR.js} +2 -1
- package/dist/FootnotePropertiesDialog-HG4267LR.js.map +1 -0
- package/dist/{FootnotePropertiesDialog-OBQXOBJE.cjs → FootnotePropertiesDialog-V3YOIJCV.cjs} +2 -1
- package/dist/FootnotePropertiesDialog-V3YOIJCV.cjs.map +1 -0
- package/dist/{HyperlinkDialog-UOERZIBM.js → HyperlinkDialog-SCSX4RP7.js} +2 -1
- package/dist/HyperlinkDialog-SCSX4RP7.js.map +1 -0
- package/dist/HyperlinkDialog-YPKURBZK.cjs +2 -0
- package/dist/HyperlinkDialog-YPKURBZK.cjs.map +1 -0
- package/dist/{ImagePositionDialog-52FDANUK.js → ImagePositionDialog-CJYJ35PI.js} +2 -1
- package/dist/ImagePositionDialog-CJYJ35PI.js.map +1 -0
- package/dist/{ImagePositionDialog-ZK5WFBRC.cjs → ImagePositionDialog-IMVI7EXA.cjs} +2 -1
- package/dist/ImagePositionDialog-IMVI7EXA.cjs.map +1 -0
- package/dist/{ImagePropertiesDialog-YPSLPSF6.js → ImagePropertiesDialog-P7WN2ALR.js} +2 -1
- package/dist/ImagePropertiesDialog-P7WN2ALR.js.map +1 -0
- package/dist/{ImagePropertiesDialog-LU44RDIY.cjs → ImagePropertiesDialog-YS4KJRN7.cjs} +2 -1
- package/dist/ImagePropertiesDialog-YS4KJRN7.cjs.map +1 -0
- package/dist/{TablePropertiesDialog-KMOYHPGF.cjs → TablePropertiesDialog-CUQXUBQN.cjs} +2 -1
- package/dist/TablePropertiesDialog-CUQXUBQN.cjs.map +1 -0
- package/dist/{TablePropertiesDialog-OUUJAA7D.js → TablePropertiesDialog-ZHAYVHPZ.js} +2 -1
- package/dist/TablePropertiesDialog-ZHAYVHPZ.js.map +1 -0
- package/dist/{clipboard-BOocwmAM.d.ts → TableToolbar-RHX9L4h9.d.cts} +2 -125
- package/dist/{clipboard-Cx7cb3kX.d.cts → TableToolbar-RHX9L4h9.d.ts} +2 -125
- package/dist/chunk-7FEY3YWC.cjs +3 -0
- package/dist/chunk-7FEY3YWC.cjs.map +1 -0
- package/dist/chunk-AL62KQYJ.js +2 -0
- package/dist/chunk-AL62KQYJ.js.map +1 -0
- package/dist/{chunk-VTAS7VZ6.cjs → chunk-DJAEBZ33.cjs} +2 -1
- package/dist/chunk-DJAEBZ33.cjs.map +1 -0
- package/dist/{chunk-CTYOM6BE.js → chunk-M2T6XKT5.js} +2 -1
- package/dist/chunk-M2T6XKT5.js.map +1 -0
- package/dist/chunk-MXGYESPA.cjs +178 -0
- package/dist/chunk-MXGYESPA.cjs.map +1 -0
- package/dist/chunk-NMYD4OJZ.js +3 -0
- package/dist/chunk-NMYD4OJZ.js.map +1 -0
- package/dist/chunk-OD33FUTO.js +178 -0
- package/dist/chunk-OD33FUTO.js.map +1 -0
- package/dist/{chunk-PJVI53AH.js → chunk-Q6HUGWO6.js} +2 -1
- package/dist/chunk-Q6HUGWO6.js.map +1 -0
- package/dist/{chunk-XS2AQFMF.cjs → chunk-S26DZVRQ.cjs} +2 -1
- package/dist/chunk-S26DZVRQ.cjs.map +1 -0
- package/dist/chunk-V3MCDVZE.cjs +2 -0
- package/dist/chunk-V3MCDVZE.cjs.map +1 -0
- package/dist/{chunk-MLSHZVL7.js → chunk-VIEW4NAF.js} +6 -5
- package/dist/chunk-VIEW4NAF.js.map +1 -0
- package/dist/{chunk-OEOUMSWH.cjs → chunk-ZX4CSEL3.cjs} +6 -5
- package/dist/chunk-ZX4CSEL3.cjs.map +1 -0
- package/dist/core-plugins-reexport.cjs +2 -0
- package/dist/core-plugins-reexport.cjs.map +1 -0
- package/dist/core-plugins-reexport.d.cts +1 -0
- package/dist/core-plugins-reexport.d.ts +1 -0
- package/dist/core-plugins-reexport.js +2 -0
- package/dist/core-plugins-reexport.js.map +1 -0
- package/dist/core-reexport.cjs +2 -0
- package/dist/core-reexport.cjs.map +1 -0
- package/dist/core-reexport.d.cts +4 -0
- package/dist/core-reexport.d.ts +4 -0
- package/dist/core-reexport.js +2 -0
- package/dist/core-reexport.js.map +1 -0
- package/dist/headless-reexport.cjs +2 -0
- package/dist/headless-reexport.cjs.map +1 -0
- package/dist/headless-reexport.d.cts +1 -0
- package/dist/headless-reexport.d.ts +1 -0
- package/dist/headless-reexport.js +2 -0
- package/dist/headless-reexport.js.map +1 -0
- package/dist/index.cjs +10 -9
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +28 -257
- package/dist/index.d.ts +28 -257
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -0
- package/dist/mcp-reexport.cjs +2 -0
- package/dist/mcp-reexport.cjs.map +1 -0
- package/dist/mcp-reexport.d.cts +1 -0
- package/dist/mcp-reexport.d.ts +1 -0
- package/dist/mcp-reexport.js +2 -0
- package/dist/mcp-reexport.js.map +1 -0
- package/dist/react.cjs +2 -1
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +860 -9
- package/dist/react.d.ts +860 -9
- package/dist/react.js +2 -1
- package/dist/react.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/ui.cjs +2 -1
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.cts +5 -3
- package/dist/ui.d.ts +5 -3
- package/dist/ui.js +2 -1
- package/dist/ui.js.map +1 -0
- package/package.json +27 -87
- package/LICENSE +0 -21
- package/README.md +0 -171
- package/dist/DocumentAgent-Ci6_T-XM.d.ts +0 -412
- package/dist/DocumentAgent-DEGFgYEN.d.cts +0 -412
- package/dist/FindReplaceDialog-46BE7Q2G.cjs +0 -1
- package/dist/HyperlinkDialog-22NH7ZLP.cjs +0 -1
- package/dist/agentApi-CbVUCZRu.d.cts +0 -2086
- package/dist/agentApi-CbVUCZRu.d.ts +0 -2086
- package/dist/chunk-24N3L4IL.cjs +0 -258
- package/dist/chunk-2ASOEN3V.js +0 -1
- package/dist/chunk-46OFHSPJ.cjs +0 -2
- package/dist/chunk-65OFYOHF.cjs +0 -58
- package/dist/chunk-6YFGCUHU.js +0 -4
- package/dist/chunk-DYQUXFE5.cjs +0 -1
- package/dist/chunk-EMKABJPH.js +0 -1
- package/dist/chunk-ESI4BSBF.js +0 -1
- package/dist/chunk-FYAWM7MP.cjs +0 -1
- package/dist/chunk-GLFFXY2X.js +0 -258
- package/dist/chunk-ITWEFKGQ.cjs +0 -1
- package/dist/chunk-JKN7TNPA.js +0 -12
- package/dist/chunk-KESNGXGO.js +0 -1
- package/dist/chunk-L34XFLQZ.cjs +0 -1
- package/dist/chunk-NO7WUK5E.cjs +0 -12
- package/dist/chunk-NT2REEAA.cjs +0 -1
- package/dist/chunk-O7QVCJN6.cjs +0 -4
- package/dist/chunk-OW5H5DNE.cjs +0 -1
- package/dist/chunk-OWMXCVKB.js +0 -1
- package/dist/chunk-PXC7ARQB.cjs +0 -1
- package/dist/chunk-R5SKERM2.js +0 -1
- package/dist/chunk-RM3ITJ2H.cjs +0 -10
- package/dist/chunk-SF53KLDZ.cjs +0 -1
- package/dist/chunk-TOI5W3HK.js +0 -8
- package/dist/chunk-UAVOWAIF.cjs +0 -8
- package/dist/chunk-ULNHBTYA.js +0 -2
- package/dist/chunk-UXXV4GT6.js +0 -10
- package/dist/chunk-VOWKSURW.cjs +0 -1
- package/dist/chunk-WFWLPKQA.js +0 -1
- package/dist/chunk-WFYRA2TH.js +0 -1
- package/dist/chunk-YMXKVLTU.js +0 -58
- package/dist/chunk-ZDYHAYN6.js +0 -1
- package/dist/colorResolver-CIDiSPWd.d.cts +0 -618
- package/dist/colorResolver-KXbUgzWC.d.ts +0 -618
- package/dist/core-plugins.cjs +0 -1
- package/dist/core-plugins.d.cts +0 -31
- package/dist/core-plugins.d.ts +0 -31
- package/dist/core-plugins.js +0 -1
- package/dist/core.cjs +0 -1
- package/dist/core.d.cts +0 -23
- package/dist/core.d.ts +0 -23
- package/dist/core.js +0 -1
- package/dist/executor-ITYZTNSH.cjs +0 -1
- package/dist/executor-TC7CLATE.js +0 -1
- package/dist/headless.cjs +0 -4
- package/dist/headless.d.cts +0 -195
- package/dist/headless.d.ts +0 -195
- package/dist/headless.js +0 -4
- package/dist/index.css +0 -1
- package/dist/insertOperations-CzB5b-Of.d.ts +0 -176
- package/dist/insertOperations-DKVmCV32.d.cts +0 -176
- package/dist/mcp-cli.js +0 -136
- package/dist/mcp.cjs +0 -16
- package/dist/mcp.d.cts +0 -156
- package/dist/mcp.d.ts +0 -156
- package/dist/mcp.js +0 -16
- package/dist/processTemplate-525HZL4S.cjs +0 -1
- package/dist/processTemplate-RJN6452W.js +0 -1
- package/dist/react-BZxD04XV.d.ts +0 -1350
- package/dist/react-D8eAYckC.d.cts +0 -1350
- package/dist/react.css +0 -1
- package/dist/registry-D4tvj9f3.d.ts +0 -165
- package/dist/registry-ngv6Bumt.d.cts +0 -165
- package/dist/selectionRects-PQEUEW35.cjs +0 -1
- package/dist/selectionRects-QAG5RSHD.js +0 -1
- package/dist/types-D96elyJF.d.cts +0 -310
- package/dist/types-xMzSPT4i.d.ts +0 -310
- package/dist/variableDetector-CPxKo9jP.d.cts +0 -173
- package/dist/variableDetector-DeM1N-_L.d.ts +0 -173
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use strict';var X=require('react'),H=require('@radix-ui/react-select'),clsx=require('clsx'),jsxRuntime=require('react/jsx-runtime'),colorResolver=require('@eigenpal/docx-core/utils/colorResolver'),units=require('@eigenpal/docx-core/utils/units');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 X__namespace=/*#__PURE__*/_interopNamespace(X);var H__namespace=/*#__PURE__*/_interopNamespace(H);function T(...e){return clsx.clsx(e)}var ge=H__namespace.Root,qe=H__namespace.Group,rt=H__namespace.Value;function be({className:e,children:t,onMouseDown:o,...r}){return jsxRuntime.jsxs(H__namespace.Trigger,{className:T("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:l=>{l.preventDefault(),o?.(l);},...r,children:[t,jsxRuntime.jsx(H__namespace.Icon,{asChild:true,children:jsxRuntime.jsx(cn,{className:"h-4 w-4 text-slate-400 shrink-0"})})]})}function xe({className:e,children:t,position:o="popper",onCloseAutoFocus:r,...l}){return jsxRuntime.jsx(H__namespace.Portal,{children:jsxRuntime.jsx("div",{className:"ep-root",children:jsxRuntime.jsx(H__namespace.Content,{className:T("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:s=>{s.preventDefault(),r?.(s);},...l,children:jsxRuntime.jsx(H__namespace.Viewport,{className:T("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),onMouseDown:s=>s.preventDefault(),children:t})})})})}function Ne({className:e,...t}){return jsxRuntime.jsx(H__namespace.Label,{className:T("px-2 py-1.5 text-xs font-medium text-slate-500",e),...t})}function le({className:e,children:t,onMouseDown:o,...r}){return jsxRuntime.jsxs(H__namespace.Item,{className:T("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:l=>{l.preventDefault(),o?.(l);},...r,children:[jsxRuntime.jsx(H__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(H__namespace.ItemIndicator,{children:jsxRuntime.jsx(pn,{className:"h-4 w-4"})})})]})}function je({className:e,...t}){return jsxRuntime.jsx(H__namespace.Separator,{className:T("-mx-1 my-1 h-px bg-slate-100",e),...t})}function cn({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 pn({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 un=[{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 Ut({value:e,onChange:t,fonts:o=un,disabled:r=false,className:l,placeholder:s="Arial",width:n=120,showPreview:c=true}){let d=X__namespace.useMemo(()=>e?o.find(h=>h.fontFamily===e||h.name.toLowerCase()===e.toLowerCase())?.name||e:s,[e,o,s]),p=X__namespace.useCallback(a=>{let h=o.find(u=>u.name===a);h&&t?.(h.fontFamily);},[t,o]),m=X__namespace.useMemo(()=>{let a={"sans-serif":[],serif:[],monospace:[],other:[]};return o.forEach(h=>{let u=h.category||"other";a[u].push(h);}),a},[o]);return jsxRuntime.jsxs(ge,{value:d,onValueChange:p,disabled:r,children:[jsxRuntime.jsx(be,{className:T("h-8 text-sm",l),style:{minWidth:typeof n=="number"?`${n}px`:n},"aria-label":"Select font family",children:jsxRuntime.jsx(rt,{placeholder:s,children:d})}),jsxRuntime.jsxs(xe,{className:"max-h-[300px]",children:[m["sans-serif"].length>0&&jsxRuntime.jsxs(qe,{children:[jsxRuntime.jsx(Ne,{children:"Sans Serif"}),m["sans-serif"].map(a=>jsxRuntime.jsx(le,{value:a.name,style:c?{fontFamily:a.fontFamily}:void 0,children:a.name},a.name))]}),m.serif.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(je,{}),jsxRuntime.jsxs(qe,{children:[jsxRuntime.jsx(Ne,{children:"Serif"}),m.serif.map(a=>jsxRuntime.jsx(le,{value:a.name,style:c?{fontFamily:a.fontFamily}:void 0,children:a.name},a.name))]})]}),m.monospace.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(je,{}),jsxRuntime.jsxs(qe,{children:[jsxRuntime.jsx(Ne,{children:"Monospace"}),m.monospace.map(a=>jsxRuntime.jsx(le,{value:a.name,style:c?{fontFamily:a.fontFamily}:void 0,children:a.name},a.name))]})]})]})]})}var Yt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kt=clsx.clsx,jt=(e,t)=>o=>{var r;if(t?.variants==null)return Kt(e,o?.class,o?.className);let{variants:l,defaultVariants:s}=t,n=Object.keys(l).map(p=>{let m=o?.[p],a=s?.[p];if(m===null)return null;let h=Yt(m)||Yt(a);return l[p][h]}),c=o&&Object.entries(o).reduce((p,m)=>{let[a,h]=m;return h===void 0||(p[a]=h),p},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,m)=>{let{class:a,className:h,...u}=m;return Object.entries(u).every(f=>{let[b,x]=f;return Array.isArray(x)?x.includes({...s,...c}[b]):{...s,...c}[b]===x})?[...p,a,h]:p},[]);return Kt(e,n,d,o?.class,o?.className)};var mn=jt("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-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),F=X__namespace.forwardRef(({className:e,variant:t,size:o,...r},l)=>jsxRuntime.jsx("button",{className:T(mn({variant:t,size:o,className:e})),ref:l,...r}));F.displayName="Button";function v({size:e=20,className:t="",style:o,children:r}){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:r})}function hn(e){return jsxRuntime.jsx(v,{...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 vn(e){return jsxRuntime.jsx(v,{...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 gn(e){return jsxRuntime.jsx(v,{...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 bn(e){return jsxRuntime.jsx(v,{...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 xn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"})})}function Sn(e){return jsxRuntime.jsx(v,{...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 yn(e){return jsxRuntime.jsx(v,{...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 Cn(e){return jsxRuntime.jsx(v,{...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 Tn(e){return jsxRuntime.jsx(v,{...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 wn(e){return jsxRuntime.jsx(v,{...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 In(e){return jsxRuntime.jsx(v,{...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 Pn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Z"})})}function Mn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm160-160v-80h400v80H280ZM120-440v-80h720v80H120Zm160-160v-80h400v80H280ZM120-760v-80h720v80H120Z"})})}function kn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-760v-80h720v80H120Zm240 160v-80h480v80H360ZM120-440v-80h720v80H120Zm240 160v-80h480v80H360ZM120-120v-80h720v80H120Z"})})}function Ln(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Z"})})}function It(e){return jsxRuntime.jsx(v,{...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 Rn(e){return jsxRuntime.jsx(v,{...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 Zn(e){return jsxRuntime.jsx(v,{...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 Hn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm0 440v-320l160 160-160 160Z"})})}function _n(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm160 440L120-480l160-160v320Z"})})}function En(e){return jsxRuntime.jsx(v,{...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 Dn(e){return jsxRuntime.jsx(v,{...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 qn(e){return jsxRuntime.jsx(v,{...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 Nn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M480-360 280-560h400L480-360Z"})})}function Fn(e){return jsxRuntime.jsx(v,{...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 An(e){return jsxRuntime.jsx(v,{...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 Bn(e){return jsxRuntime.jsx(v,{...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 On(e){return jsxRuntime.jsx(v,{...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 zn(e){return jsxRuntime.jsx(v,{...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 Vn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-720h720v720H120Zm640-80v-240H520v240h240Zm0-560H520v240h240v-240Zm-560 0v240h240v-240H200Zm0 560h240v-240H200v240Z"})})}function $n(e){return jsxRuntime.jsx(v,{...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 Gn(e){return jsxRuntime.jsx(v,{...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 Wn(e){return jsxRuntime.jsx(v,{...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 Un(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})})}function Yn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M200-440v-80h560v80H200Z"})})}function Kn(e){return jsxRuntime.jsx(v,{...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 jn(e){return jsxRuntime.jsx(v,{...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 Xn(e){return jsxRuntime.jsx(v,{...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 Qn(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M440-160v-304L240-664v104h-80v-240h240v80H296l224 224v336h-80Zm154-376-58-58 128-126H560v-80h240v240h-80v-104L594-536Z"})})}function Jn(e){return jsxRuntime.jsx(v,{...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 er(e){return jsxRuntime.jsx(v,{...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 tr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-280v-400h400v400H120Zm80-80h240v-240H200v240Zm-80-400v-80h720v80H120Zm480 160v-80h240v80H600Zm0 160v-80h240v80H600Zm0 160v-80h240v80H600ZM120-120v-80h720v80H120Z"})})}function or(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M440-280v-400h400v400H440Zm80-80h240v-240H520v240ZM120-120v-80h720v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h720v80H120Z"})})}function nr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M160-440v-80h640v80H160Z"})})}function rr(e){return jsxRuntime.jsx(v,{...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 ir(e){return jsxRuntime.jsx(v,{...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 ar(e){return jsxRuntime.jsx(v,{...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 lr(e){return jsxRuntime.jsx(v,{...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 sr(e){return jsxRuntime.jsx(v,{...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 cr(e){return jsxRuntime.jsx(v,{...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 pr(e){return jsxRuntime.jsx(v,{...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 ur(e){return jsxRuntime.jsx(v,{...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 dr(e){return jsxRuntime.jsx(v,{...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 mr(e){return jsxRuntime.jsx(v,{...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 fr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})})}function hr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})})}function vr(e){return jsxRuntime.jsx(v,{...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 gr(e){return jsxRuntime.jsx(v,{...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 br(e){return jsxRuntime.jsx(v,{...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 xr(e){return jsxRuntime.jsx(v,{...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 Sr(e){return jsxRuntime.jsx(v,{...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 yr(e){return jsxRuntime.jsx(v,{...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 Cr(e){return jsxRuntime.jsx(v,{...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 Tr(e){return jsxRuntime.jsx(v,{...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 wr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-120v-720h80v720h-80Zm640 0v-720h80v720h-80ZM280-440v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function Ir(e){return jsxRuntime.jsx(v,{...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 Pr(e){return jsxRuntime.jsx(v,{...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 Mr(e){return jsxRuntime.jsx(v,{...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 kr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M160-760v-80h640v80H160Zm280 640v-408L336-424l-56-56 200-200 200 200-56 56-104-104v408h-80Z"})})}function Lr(e){return jsxRuntime.jsx(v,{...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 Rr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M160-120v-80h640v80H160Zm320-160L280-480l56-56 104 104v-408h80v408l104-104 56 56-200 200Z"})})}function Zr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"})})}function Hr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})})}function _r(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})})}function Er(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})}function Dr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})}function qr(e){return jsxRuntime.jsx(v,{...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 Nr(e){return jsxRuntime.jsx(v,{...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 Fr(e){return jsxRuntime.jsx(v,{...e,children:jsxRuntime.jsx("path",{d:"M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})})}var Ar={undo:hn,redo:vn,print:gn,format_bold:bn,format_italic:xn,format_underlined:Sn,strikethrough_s:yn,superscript:Cn,subscript:Tn,link:wn,format_clear:In,format_align_left:Pn,format_align_center:Mn,format_align_right:kn,format_align_justify:Ln,format_line_spacing:It,format_list_bulleted:Rn,format_list_numbered:Zn,format_indent_increase:Hn,format_indent_decrease:_n,format_color_text:En,ink_highlighter:Dn,format_color_reset:qn,arrow_drop_down:Nn,table:Fn,table_chart:An,grid_on:Bn,table_rows:On,view_column:zn,border_all:Vn,border_outer:$n,border_inner:Gn,border_clear:Wn,add:Un,remove:Yn,delete:Kn,delete_sweep:jn,call_merge:Xn,call_split:Qn,drag_indicator:Jn,image:er,format_image_left:tr,format_image_right:or,horizontal_rule:nr,flip_to_back:rr,flip_to_front:ir,open_with:ar,tune:lr,rotate_right:sr,rotate_left:cr,swap_horiz:pr,swap_vert:ur,shapes:dr,format_paint:mr,expand_more:fr,expand_less:hr,border_top:vr,border_bottom:gr,border_left:br,border_right:xr,padding:Sr,text_rotation_none:yr,wrap_text:Cr,height:Tr,fit_width:wr,settings:Ir,border_color:Pr,format_color_fill:Mr,vertical_align_top:kr,vertical_align_center:Lr,vertical_align_bottom:Rr,line_weight:Zr,keyboard_arrow_up:Hr,keyboard_arrow_down:_r,keyboard_arrow_left:Er,keyboard_arrow_right:Dr,more_vert:qr,page_break:Nr,arrow_back:Fr};function g({name:e,size:t=20,className:o="",style:r}){let l=Ar[e];return l?jsxRuntime.jsx(l,{size:t,className:o,style:r}):(console.warn(`Icon not found: ${e}`),jsxRuntime.jsx("span",{className:o,style:{fontSize:t,width:t,height:t,...r},children:e}))}function z({isOpen:e,onClose:t,align:o="left"}){let r=X.useRef(null),l=X.useRef(null),[s,n]=X.useState({top:0,left:0});X.useEffect(()=>{if(!e||!r.current)return;let p=r.current.getBoundingClientRect();o==="right"?requestAnimationFrame(()=>{if(l.current){let m=l.current.getBoundingClientRect();n({top:p.bottom+4,left:p.right-m.width});}else n({top:p.bottom+4,left:p.left});}):n({top:p.bottom+4,left:p.left});},[e,o]),X.useEffect(()=>{if(!e)return;let p=h=>{let u=h.target;r.current&&!r.current.contains(u)&&l.current&&!l.current.contains(u)&&t();},m=h=>{h.key==="Escape"&&t();},a=()=>t();return document.addEventListener("mousedown",p),document.addEventListener("keydown",m),window.addEventListener("scroll",a,true),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",m),window.removeEventListener("scroll",a,true);}},[e,t]);let c=X.useCallback(p=>{p.preventDefault(),p.stopPropagation();},[]),d={position:"fixed",top:s.top,left:s.left,zIndex:1e4};return {containerRef:r,dropdownRef:l,dropdownStyle:d,handleMouseDown:c}}var Vr=[8,9,10,11,12,14,16,18,20,24,28,36,48,72],$r=1,Gr=400;function oo(e){return e/2}function Ll(e){return e*2}function eo(e,t,o){for(let r of t)if(r>e)return r;return Math.min(e+1,o)}function to(e,t,o){for(let r=t.length-1;r>=0;r--)if(t[r]<e)return t[r];return Math.max(e-1,o)}function no({value:e,onChange:t,sizes:o=Vr,disabled:r=false,className:l,placeholder:s="11",minSize:n=$r,maxSize:c=Gr}){let[d,p]=X.useState(false),[m,a]=X.useState(""),[h,u]=X.useState(false),f=X.useRef(null),b=X.useCallback(()=>{u(false),p(false);},[]),{containerRef:x,dropdownRef:I,dropdownStyle:S}=z({isOpen:h,onClose:b}),w=e??(parseInt(s,10)||11),E=e!==void 0?e.toString():s,_=X.useCallback(C=>{if(C.preventDefault(),r)return;let D=to(w,o,n);t?.(D);},[w,o,n,r,t]),W=X.useCallback(C=>{if(C.preventDefault(),r)return;let D=eo(w,o,c);t?.(D);},[w,o,c,r,t]),k=X.useCallback(C=>{C.preventDefault(),!r&&(p(true),a(E),u(true),requestAnimationFrame(()=>{f.current?.focus(),f.current?.select();}));},[r,E]),A=X.useCallback(C=>{a(C.target.value);},[]),U=X.useCallback(()=>{p(false);let C=parseInt(m,10);!isNaN(C)&&C>=n&&C<=c&&t?.(C);},[m,n,c,t]),ee=X.useCallback(C=>{if(C.key==="Enter")C.preventDefault(),U(),u(false);else if(C.key==="Escape")p(false),u(false);else if(C.key==="ArrowUp"){C.preventDefault();let D=eo(w,o,c);a(D.toString()),t?.(D);}else if(C.key==="ArrowDown"){C.preventDefault();let D=to(w,o,n);a(D.toString()),t?.(D);}},[U,w,o,c,n,t]),M=X.useCallback(C=>{t?.(C),u(false),p(false);},[t]),O=X.useCallback(C=>{C.target.tagName!=="INPUT"&&C.preventDefault();},[]);return jsxRuntime.jsxs("div",{ref:x,className:T("flex items-center",l),onMouseDown:O,children:[jsxRuntime.jsx(F,{variant:"ghost",size:"icon-sm",className:T("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-r-none",r&&"opacity-30 cursor-not-allowed"),onMouseDown:_,disabled:r||w<=n,"aria-label":"Decrease font size","data-testid":"font-size-decrease",children:jsxRuntime.jsx(g,{name:"remove",size:18})}),jsxRuntime.jsx("div",{className:"relative",children:d?jsxRuntime.jsx("input",{ref:f,type:"text",value:m,onChange:A,onBlur:U,onKeyDown:ee,className:T("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":"Font size","data-testid":"font-size-input"}):jsxRuntime.jsx("button",{type:"button",onClick:k,className:T("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",r&&"opacity-50 cursor-not-allowed"),disabled:r,"aria-label":"Font size","aria-haspopup":"listbox","aria-expanded":h,"data-testid":"font-size-display",children:E})}),h&&jsxRuntime.jsx("div",{ref:I,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":"Font sizes",children:o.map(C=>jsxRuntime.jsx("button",{type:"button",onClick:()=>M(C),className:T("w-full px-3 py-1.5 text-sm text-left","hover:bg-slate-100",C===w&&"bg-slate-100 font-medium"),role:"option","aria-selected":C===w,children:C},C))}),jsxRuntime.jsx(F,{variant:"ghost",size:"icon-sm",className:T("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-l-none",r&&"opacity-30 cursor-not-allowed"),onMouseDown:W,disabled:r||w>=c,"aria-label":"Increase font size","data-testid":"font-size-increase",children:jsxRuntime.jsx(g,{name:"add",size:18})})]})}var Yr=[{name:"Black",hex:"000000"},{name:"Dark Red",hex:"7F0000"},{name:"Dark Orange",hex:"FF6600"},{name:"Dark Yellow",hex:"808000"},{name:"Dark Green",hex:"006400"},{name:"Dark Teal",hex:"008080"},{name:"Dark Blue",hex:"000080"},{name:"Dark Purple",hex:"4B0082"},{name:"Dark Gray",hex:"404040"},{name:"Gray",hex:"808080"},{name:"Red",hex:"FF0000"},{name:"Orange",hex:"FF9900"},{name:"Yellow",hex:"FFFF00"},{name:"Light Green",hex:"00FF00"},{name:"Cyan",hex:"00FFFF"},{name:"Light Blue",hex:"0066FF"},{name:"Blue",hex:"0000FF"},{name:"Purple",hex:"9900FF"},{name:"Magenta",hex:"FF00FF"},{name:"Pink",hex:"FF66FF"},{name:"Light Red",hex:"FFCCCC"},{name:"Light Orange",hex:"FFE5CC"},{name:"Light Yellow",hex:"FFFFCC"},{name:"Pale Green",hex:"CCFFCC"},{name:"Light Cyan",hex:"CCFFFF"},{name:"Sky Blue",hex:"CCE5FF"},{name:"Light Blue 2",hex:"CCCCFF"},{name:"Lavender",hex:"E5CCFF"},{name:"Light Magenta",hex:"FFCCFF"},{name:"White",hex:"FFFFFF"}],Kr=[{name:"No Color",hex:""},{name:"Yellow",hex:"FFFF00"},{name:"Bright Green",hex:"00FF00"},{name:"Cyan",hex:"00FFFF"},{name:"Magenta",hex:"FF00FF"},{name:"Blue",hex:"0000FF"},{name:"Red",hex:"FF0000"},{name:"Dark Blue",hex:"00008B"},{name:"Teal",hex:"008080"},{name:"Green",hex:"008000"},{name:"Violet",hex:"800080"},{name:"Dark Red",hex:"8B0000"},{name:"Dark Yellow",hex:"808000"},{name:"Gray 50%",hex:"808080"},{name:"Gray 25%",hex:"C0C0C0"},{name:"Black",hex:"000000"}],jr={position:"relative",display:"inline-block"},lt={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)"},Xr={...lt,backgroundColor:"var(--doc-bg-hover)"},Qr={...lt,backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"},Jr={...lt,cursor:"default",opacity:.38},ei={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0"},ti={width:"14px",height:"3px",borderRadius:"0",marginTop:"-2px"},oi={display:"grid",gap:"2px"},st={width:"20px",height:"20px",border:"1px solid #ccc",borderRadius:"2px",cursor:"pointer",transition:"transform 0.1s, border-color 0.1s",padding:0},ni={...st,transform:"scale(1.1)",borderColor:"#333",zIndex:1},ri={...st,borderWidth:"2px",borderColor:"#0066cc",boxShadow:"0 0 0 1px #0066cc"},ii={...st,position:"relative",backgroundColor:"#fff"},ai={position:"absolute",top:"50%",left:"-2px",right:"-2px",height:"2px",backgroundColor:"#ff0000",transform:"rotate(-45deg)"},io={fontSize:"11px",color:"#666",marginBottom:"4px",marginTop:"8px"},li={marginTop:"8px",paddingTop:"8px",borderTop:"1px solid #eee"},si={display:"flex",alignItems:"center",gap:"8px"},ci={width:"70px",height:"24px",padding:"2px 6px",border:"1px solid #ccc",borderRadius:"3px",fontSize:"12px"},pi={height:"24px",padding:"0 8px",border:"1px solid #ccc",borderRadius:"3px",backgroundColor:"#f5f5f5",fontSize:"12px",cursor:"pointer"},ui=()=>jsxRuntime.jsx(g,{name:"format_color_text",size:18}),di=()=>jsxRuntime.jsx(g,{name:"ink_highlighter",size:18}),mi=()=>jsxRuntime.jsx(g,{name:"arrow_drop_down",size:14});function fi({colors:e,selectedColor:t,onSelect:o,columns:r=10,cellSize:l=20}){let[s,n]=X.useState(null),c={...oi,gridTemplateColumns:`repeat(${r}, ${l}px)`};return jsxRuntime.jsx("div",{style:c,className:"docx-color-grid",role:"grid",children:e.map((d,p)=>{let m=t?.toUpperCase()===d.hex.toUpperCase(),a=s===p,h=d.hex==="",u={...m?ri:a?ni:st,width:`${l}px`,height:`${l}px`};return h||(u.backgroundColor=`#${d.hex}`),jsxRuntime.jsx("button",{type:"button",style:h?{...ii,...u}:u,onClick:()=>o(d),onMouseDown:f=>f.preventDefault(),onMouseEnter:()=>n(p),onMouseLeave:()=>n(null),title:d.name,role:"gridcell","aria-label":d.name,"aria-selected":m,children:h&&jsxRuntime.jsx("span",{style:ai})},`${d.hex}-${p}`)})})}function ao({value:e,onChange:t,type:o="text",theme:r,colors:l,disabled:s=false,className:n,style:c,title:d,children:p,dropdownWidth:m=230,showNoColor:a=true,showMoreColors:h=true}){let[u,f]=X.useState(false),[b,x]=X.useState(false),[I,S]=X.useState(""),w=X.useCallback(()=>f(false),[]),{containerRef:E,dropdownRef:_,dropdownStyle:W}=z({isOpen:u,onClose:w}),k=X.useMemo(()=>{if(o==="highlight")return Kr;let P=[...Yr];return a&&P.unshift({name:"Automatic",hex:"000000"}),P},[o,a]),A=l||k,U=X.useMemo(()=>e?e.startsWith("#")?e:o==="highlight"?colorResolver.resolveHighlightColor(e)||"transparent":`#${e}`:o==="text"?"#000000":"transparent",[e,o]),ee=X.useCallback(P=>{t?.(P.hex),f(false);},[t]),M=X.useCallback(()=>{let P=I.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/i.test(P)&&(t?.(P),f(false),S(""));},[I,t]),O=X.useCallback(()=>{s||f(P=>!P);},[s]),C=s?Jr:u?Qr:b?Xr:lt,D=o==="text"?"Font Color":"Text Highlight Color";return jsxRuntime.jsxs("div",{ref:E,className:`docx-color-picker docx-color-picker-${o} ${n||""}`,style:{...jr,...c},children:[jsxRuntime.jsxs("button",{type:"button",className:"docx-color-picker-button",style:C,onClick:O,onMouseDown:P=>P.preventDefault(),onMouseEnter:()=>x(true),onMouseLeave:()=>x(false),disabled:s,title:d||D,"aria-label":d||D,"aria-haspopup":"true","aria-expanded":u,children:[p||jsxRuntime.jsxs("div",{style:ei,children:[o==="text"?jsxRuntime.jsx(ui,{}):jsxRuntime.jsx(di,{}),jsxRuntime.jsx("div",{style:{...ti,backgroundColor:U==="transparent"?"#fff":U,border:U==="transparent"?"1px solid #ccc":"none"}})]}),jsxRuntime.jsx(mi,{})]}),u&&jsxRuntime.jsxs("div",{ref:_,className:"docx-color-picker-dropdown",style:{...W,padding:"8px",backgroundColor:"#fff",border:"1px solid #ccc",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",width:m},role:"dialog","aria-label":`${o==="text"?"Font":"Highlight"} color picker`,onMouseDown:P=>P.preventDefault(),children:[o==="highlight"&&jsxRuntime.jsx("div",{style:io,children:"Highlight Colors"}),jsxRuntime.jsx(fi,{colors:A,selectedColor:e,onSelect:ee,columns:o==="highlight"?8:10}),h&&o==="text"&&jsxRuntime.jsxs("div",{style:li,children:[jsxRuntime.jsx("div",{style:io,children:"Custom Color"}),jsxRuntime.jsxs("div",{style:si,children:[jsxRuntime.jsx("span",{style:{fontSize:"12px",color:"#666"},children:"#"}),jsxRuntime.jsx("input",{type:"text",style:ci,value:I,onChange:P=>S(P.target.value.replace(/[^0-9A-Fa-f]/g,"").slice(0,6)),onKeyDown:P=>{P.key==="Enter"&&M();},placeholder:"FF0000",maxLength:6,"aria-label":"Custom hex color"}),jsxRuntime.jsx("button",{type:"button",style:pi,onClick:M,disabled:!/^[0-9A-Fa-f]{6}$/.test(I),children:"Apply"})]})]})]})]})}function lo(e){return jsxRuntime.jsx(ao,{...e,type:"text"})}function so(e){return jsxRuntime.jsx(ao,{...e,type:"highlight",showMoreColors:false})}function K({content:e,children:t,side:o="bottom",delayMs:r=400}){let[l,s]=X__namespace.useState(false),[n,c]=X__namespace.useState({x:0,y:0}),d=X__namespace.useRef(null),p=X__namespace.useRef(null),m=X__namespace.useCallback(()=>{p.current=setTimeout(()=>{if(d.current){let f=d.current.getBoundingClientRect(),b=f.left+f.width/2,x=o==="top"?f.top-8:f.bottom+8;c({x:b,y:x});}s(true);},r);},[r,o]),a=X__namespace.useCallback(()=>{p.current&&(clearTimeout(p.current),p.current=null),s(false);},[]);X__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]);let h=t.props,u=X__namespace.cloneElement(t,{ref:d,onMouseEnter:f=>{m(),h.onMouseEnter?.(f);},onMouseLeave:f=>{a(),h.onMouseLeave?.(f);}});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[u,l&&jsxRuntime.jsx("div",{className:T("fixed z-50 px-2 py-1 text-xs font-medium text-white bg-slate-900 rounded-md shadow-lg","animate-in fade-in-0 zoom-in-95 duration-150",o==="top"&&"-translate-x-1/2 -translate-y-full",o==="bottom"&&"-translate-x-1/2"),style:{left:n.x,top:n.y,transform:o==="top"?"translate(-50%, -100%)":o==="bottom"?"translate(-50%, 0)":void 0},children:e})]})}var Qe=20,Mt=[{value:"left",label:"Align Left",icon:jsxRuntime.jsx(g,{name:"format_align_left",size:Qe}),iconName:"format_align_left",shortcut:"Ctrl+L"},{value:"center",label:"Center",icon:jsxRuntime.jsx(g,{name:"format_align_center",size:Qe}),iconName:"format_align_center",shortcut:"Ctrl+E"},{value:"right",label:"Align Right",icon:jsxRuntime.jsx(g,{name:"format_align_right",size:Qe}),iconName:"format_align_right",shortcut:"Ctrl+R"},{value:"both",label:"Justify",icon:jsxRuntime.jsx(g,{name:"format_align_justify",size:Qe}),iconName:"format_align_justify",shortcut:"Ctrl+J"}];function uo({value:e="left",onChange:t,disabled:o=false}){let[r,l]=X.useState(false),s=X.useCallback(()=>l(false),[]),{containerRef:n,dropdownRef:c,dropdownStyle:d,handleMouseDown:p}=z({isOpen:r,onClose:s}),m=X.useCallback(u=>{o||t?.(u),l(false);},[o,t]),a=Mt.find(u=>u.value===e)||Mt[0],h=jsxRuntime.jsxs(F,{variant:"ghost",size:"icon-sm",className:T("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",r&&"bg-slate-100",o&&"opacity-30 cursor-not-allowed"),onMouseDown:p,onClick:()=>!o&&l(u=>!u),disabled:o,"aria-label":`${a.label}${a.shortcut?` (${a.shortcut})`:""}`,"aria-expanded":r,"aria-haspopup":"true","data-testid":"toolbar-alignment",children:[jsxRuntime.jsx(g,{name:a.iconName,size:Qe}),jsxRuntime.jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:n,style:{position:"relative",display:"inline-block"},children:[r?h:jsxRuntime.jsx(K,{content:`${a.label}${a.shortcut?` (${a.shortcut})`:""}`,children:h}),r&&!o&&jsxRuntime.jsx("div",{ref:c,style:{...d,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:u=>u.stopPropagation(),children:jsxRuntime.jsx("div",{style:{display:"flex",gap:2},children:Mt.map(u=>{let f=e===u.value;return jsxRuntime.jsx("button",{type:"button",title:`${u.label}${u.shortcut?` (${u.shortcut})`:""}`,"data-testid":`alignment-${u.value}`,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:f?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:f?"var(--doc-primary)":"var(--doc-text)"},onMouseDown:b=>b.preventDefault(),onMouseEnter:b=>{f||(b.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:b=>{b.currentTarget.style.backgroundColor=f?"var(--doc-primary-light)":"transparent";},onClick:()=>m(u.value),children:jsxRuntime.jsx(g,{name:u.iconName,size:18})},u.value)})})})]})}var yi={display:"inline-flex",alignItems:"center",gap:"4px"},mo={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)"},Ci={...dt,backgroundColor:"var(--doc-bg-hover)"},Ti={...dt,backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"},wi={...dt,cursor:"default",opacity:.38},Ii={width:"28px",height:"28px",padding:"2px"},Pi={width:"1px",height:"20px",backgroundColor:"var(--doc-border)",margin:"0 6px"},ct=20;function pt({active:e=false,disabled:t=false,title:o,onClick:r,children:l,className:s,style:n}){let[c,d]=X.useState(false),p={...t?wi:e?Ti:c?Ci:dt,...n},m=a=>{a.preventDefault();};return jsxRuntime.jsx("button",{type:"button",className:`docx-list-button ${e?"docx-list-button-active":""} ${t?"docx-list-button-disabled":""} ${s||""}`,style:p,onMouseDown:m,onClick:t?void 0:r,onMouseEnter:()=>d(true),onMouseLeave:()=>d(false),disabled:t,title:o,"aria-label":o,"aria-pressed":e,role:"button",children:l})}function fo({listState:e,onBulletList:t,onNumberedList:o,onIndent:r,onOutdent:l,disabled:s=false,className:n,style:c,showIndentButtons:d=true,compact:p=false,hasIndent:m=false}){let a=X.useCallback(()=>p?{...Ii}:{},[p]),h=e?.type==="bullet",u=e?.type==="numbered",b=(e?.isInList||h||u)&&(e?.level??0)>0||m;return jsxRuntime.jsxs("div",{className:`docx-list-buttons ${n||""}`,style:{...yi,...c},role:"group","aria-label":"List formatting",children:[jsxRuntime.jsxs("div",{style:mo,role:"group","aria-label":"List type",children:[jsxRuntime.jsx(pt,{active:h,disabled:s,title:"Bullet List",onClick:t,style:a(),children:jsxRuntime.jsx(g,{name:"format_list_bulleted",size:ct})}),jsxRuntime.jsx(pt,{active:u,disabled:s,title:"Numbered List",onClick:o,style:a(),children:jsxRuntime.jsx(g,{name:"format_list_numbered",size:ct})})]}),d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:Pi,role:"separator"}),jsxRuntime.jsxs("div",{style:mo,role:"group","aria-label":"List indentation",children:[jsxRuntime.jsx(pt,{active:false,disabled:s||!b,title:"Decrease Indent",onClick:l,style:a(),children:jsxRuntime.jsx(g,{name:"format_indent_decrease",size:ct})}),jsxRuntime.jsx(pt,{active:false,disabled:s,title:"Increase Indent",onClick:r,style:a(),children:jsxRuntime.jsx(g,{name:"format_indent_increase",size:ct})})]})]})]})}function ho(){return {type:"none",level:0,isInList:false}}var ki=[{label:"Single",value:1,twipsValue:240},{label:"1.15",value:1.15,twipsValue:276},{label:"1.5",value:1.5,twipsValue:360},{label:"Double",value:2,twipsValue:480}];function go({value:e,onChange:t,options:o=ki,disabled:r=false,className:l}){let s=X__namespace.useMemo(()=>e===void 0?o[0]:o.find(c=>c.twipsValue===e)||o[0],[e,o]),n=X__namespace.useCallback(c=>{let d=parseInt(c,10);isNaN(d)||t?.(d);},[t]);return jsxRuntime.jsxs(ge,{value:s.twipsValue.toString(),onValueChange:n,disabled:r,children:[jsxRuntime.jsx(be,{className:T("h-8 text-sm gap-0.5 px-2",l),style:{width:"auto"},title:`Line spacing: ${s.label}`,children:jsxRuntime.jsx(It,{className:"h-5 w-5 shrink-0"})}),jsxRuntime.jsxs(xe,{children:[o.map(c=>jsxRuntime.jsx(le,{value:c.twipsValue.toString(),children:c.label},c.twipsValue)),jsxRuntime.jsx(je,{}),jsxRuntime.jsx(qe,{children:jsxRuntime.jsx(Ne,{children:"Paragraph spacing"})})]})]})}var bo=[{styleId:"Normal",name:"Normal text",type:"paragraph",isDefault:true,priority:0,qFormat:true,fontSize:22},{styleId:"Title",name:"Title",type:"paragraph",priority:1,qFormat:true,fontSize:52,bold:true},{styleId:"Subtitle",name:"Subtitle",type:"paragraph",priority:2,qFormat:true,fontSize:30,color:"666666"},{styleId:"Heading1",name:"Heading 1",type:"paragraph",priority:3,qFormat:true,fontSize:40,bold:true},{styleId:"Heading2",name:"Heading 2",type:"paragraph",priority:4,qFormat:true,fontSize:32,bold:true},{styleId:"Heading3",name:"Heading 3",type:"paragraph",priority:5,qFormat:true,fontSize:28,bold:true}],Li="#4a6c8c",Ri={Title:26,Subtitle:18,Heading1:24,Heading2:18,Heading3:16,Heading4:14,Heading5:13,Heading6:13,Normal:14};function Zi(e){let t={},o=Ri[e.styleId];if(o)t.fontSize=`${o}px`;else {let r=e.fontSize?e.fontSize/2:11,l=Math.min(Math.max(r,11),20);t.fontSize=`${l}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=Li),t}function xo({value:e,onChange:t,styles:o,disabled:r=false,className:l,width:s=120}){let n=X__namespace.useMemo(()=>!o||o.length===0?bo:o.filter(a=>a.type==="paragraph").filter(a=>a.qFormat?true:!(a.hidden||a.semiHidden)).map(a=>{let h=bo.find(u=>u.styleId===a.styleId);return {styleId:a.styleId,name:a.name||a.styleId,type:a.type,isDefault:a.default,qFormat:a.qFormat,priority:a.uiPriority??99,fontSize:a.rPr?.fontSize??h?.fontSize,bold:a.rPr?.bold??h?.bold,italic:a.rPr?.italic??h?.italic,color:a.rPr?.color?.rgb??h?.color}}).sort((a,h)=>(a.priority??99)-(h.priority??99)),[o]),c=X__namespace.useCallback(m=>{t?.(m);},[t]),d=e||"Normal",p=n.find(m=>m.styleId===d)?.name||d;return jsxRuntime.jsxs(ge,{value:d,onValueChange:c,disabled:r,children:[jsxRuntime.jsx(be,{className:T("h-8 text-sm",l),style:{width:typeof s=="number"?`${s}px`:s},"aria-label":"Select paragraph style",children:jsxRuntime.jsx("span",{className:"truncate",children:p})}),jsxRuntime.jsx(xe,{className:"min-w-[260px] max-h-[400px]",children:n.map(m=>jsxRuntime.jsx(le,{value:m.styleId,className:"py-2.5 px-3",children:jsxRuntime.jsx("span",{style:Zi(m),children:m.name})},m.styleId))})]})}var _i=[{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 So({value:e=1,onChange:t,levels:o=_i,disabled:r=false,className:l,compact:s=false}){let n=X__namespace.useMemo(()=>{let d=o.find(p=>Math.abs(p.value-e)<.001);return d?d.label:`${Math.round(e*100)}%`},[o,e]),c=X__namespace.useCallback(d=>{let p=parseFloat(d);isNaN(p)||t?.(p);},[t]);return jsxRuntime.jsxs(ge,{value:e.toString(),onValueChange:c,disabled:r,children:[jsxRuntime.jsx(be,{className:T(s?"h-7 min-w-[55px] text-xs":"h-8 min-w-[70px] text-sm",l),"aria-label":`Zoom: ${n}`,children:jsxRuntime.jsx(rt,{placeholder:"100%",children:n})}),jsxRuntime.jsx(xe,{children:o.map(d=>jsxRuntime.jsx(le,{value:d.value.toString(),children:d.label},d.value))})]})}var qi=[{action:"borderAll",icon:"border_all",label:"All borders"},{action:"borderOutside",icon:"border_outer",label:"Outside borders"},{action:"borderInside",icon:"border_inner",label:"Inside borders"},{action:"borderTop",icon:"border_top",label:"Top border"},{action:"borderBottom",icon:"border_bottom",label:"Bottom border"},{action:"borderLeft",icon:"border_left",label:"Left border"},{action:"borderRight",icon:"border_right",label:"Right border"},{action:"borderNone",icon:"border_clear",label:"No borders"}];function To({onAction:e,disabled:t=false}){let[o,r]=X.useState(false),l=X.useCallback(()=>r(false),[]),{containerRef:s,dropdownRef:n,dropdownStyle:c,handleMouseDown:d}=z({isOpen:o,onClose:l}),p=X.useCallback(a=>{e(a),r(false);},[e]),m=jsxRuntime.jsxs(F,{variant:"ghost",size:"icon-sm",className:T("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:d,onClick:()=>!t&&r(a=>!a),disabled:t,"aria-label":"Border style","aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-borders",children:[jsxRuntime.jsx(g,{name:"border_all",size:20}),jsxRuntime.jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:s,style:{position:"relative",display:"inline-block"},children:[o?m:jsxRuntime.jsx(K,{content:"Borders",children:m}),o&&!t&&jsxRuntime.jsx("div",{ref:n,style:{...c,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:a=>a.stopPropagation(),children:jsxRuntime.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:2},children:qi.map(({action:a,icon:h,label:u})=>jsxRuntime.jsx("button",{type:"button",title:u,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:()=>p(a),children:jsxRuntime.jsx(g,{name:h,size:18})},typeof a=="string"?a:a.type))})})]})}var Ni=["#000000","#434343","#666666","#999999","#b7b7b7","#cccccc","#d9d9d9","#efefef","#f3f3f3","#ffffff","#980000","#ff0000","#ff9900","#ffff00","#00ff00","#00ffff","#4a86e8","#0000ff","#9900ff","#ff00ff"],Fi={width:18,height:18,borderRadius:2,border:"1px solid var(--doc-border)",cursor:"pointer",padding:0,backgroundColor:"transparent"};function Mo({onAction:e,disabled:t=false}){let[o,r]=X.useState(false),[l,s]=X.useState("#000000"),n=X.useCallback(()=>r(false),[]),{containerRef:c,dropdownRef:d,dropdownStyle:p,handleMouseDown:m}=z({isOpen:o,onClose:n}),a=X.useCallback(u=>{s(u),e({type:"borderColor",color:u.replace(/^#/,"")}),r(false);},[e]),h=jsxRuntime.jsxs(F,{variant:"ghost",size:"icon-sm",className:T("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 flex-col gap-0 !p-0.5",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:m,onClick:()=>!t&&r(u=>!u),disabled:t,"aria-label":"Border color","aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-border-color",children:[jsxRuntime.jsx(g,{name:"border_color",size:18}),jsxRuntime.jsx("div",{style:{width:16,height:3,backgroundColor:l,borderRadius:0,marginTop:-2}})]});return jsxRuntime.jsxs("div",{ref:c,style:{position:"relative",display:"inline-block"},children:[o?h:jsxRuntime.jsx(K,{content:"Border color",children:h}),o&&!t&&jsxRuntime.jsx("div",{ref:d,style:{...p,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:8},onMouseDown:u=>u.stopPropagation(),children:jsxRuntime.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(10, 1fr)",gap:2},children:Ni.map(u=>jsxRuntime.jsx("button",{type:"button",style:{...Fi,backgroundColor:u,outline:l===u?"2px solid var(--doc-primary)":"none",outlineOffset:1},title:u,onMouseDown:f=>f.preventDefault(),onClick:()=>a(u)},u))})})]})}var Bi=[{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 Lo({onAction:e,disabled:t=false}){let[o,r]=X.useState(false),l=X.useCallback(()=>r(false),[]),{containerRef:s,dropdownRef:n,dropdownStyle:c,handleMouseDown:d}=z({isOpen:o,onClose:l}),p=X.useCallback(a=>{e({type:"borderWidth",size:a}),r(false);},[e]),m=jsxRuntime.jsxs(F,{variant:"ghost",size:"icon-sm",className:T("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:d,onClick:()=>!t&&r(a=>!a),disabled:t,"aria-label":"Border width","aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-border-width",children:[jsxRuntime.jsx(g,{name:"line_weight",size:20}),jsxRuntime.jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:s,style:{position:"relative",display:"inline-block"},children:[o?m:jsxRuntime.jsx(K,{content:"Border width",children:m}),o&&!t&&jsxRuntime.jsx("div",{ref:n,style:{...c,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:a=>a.stopPropagation(),children:Bi.map(({size:a,label:h,thickness:u})=>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:()=>p(a),children:[jsxRuntime.jsx("div",{style:{width:50,height:Math.max(u,1),backgroundColor:"#000",borderRadius:u>2?1:0}}),jsxRuntime.jsx("span",{children:h})]},a))})]})}var Oi=["#000000","#434343","#666666","#999999","#b7b7b7","#cccccc","#d9d9d9","#efefef","#f3f3f3","#ffffff","#980000","#ff0000","#ff9900","#ffff00","#00ff00","#00ffff","#4a86e8","#0000ff","#9900ff","#ff00ff"],zi={width:18,height:18,borderRadius:2,border:"1px solid var(--doc-border)",cursor:"pointer",padding:0,backgroundColor:"transparent"};function Zo({onAction:e,disabled:t=false}){let[o,r]=X.useState(false),[l,s]=X.useState(null),n=X.useCallback(()=>r(false),[]),{containerRef:c,dropdownRef:d,dropdownStyle:p,handleMouseDown:m}=z({isOpen:o,onClose:n}),a=X.useCallback(f=>{s(f),e({type:"cellFillColor",color:f}),r(false);},[e]),h=X.useCallback(()=>{s(null),e({type:"cellFillColor",color:null}),r(false);},[e]),u=jsxRuntime.jsxs(F,{variant:"ghost",size:"icon-sm",className:T("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 flex-col gap-0 !p-0.5",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:m,onClick:()=>!t&&r(f=>!f),disabled:t,"aria-label":"Cell fill color","aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-cell-fill",children:[jsxRuntime.jsx(g,{name:"format_color_fill",size:18}),jsxRuntime.jsx("div",{style:{width:16,height:3,backgroundColor:l||"transparent",borderRadius:0,marginTop:-2,border:l?"none":"1px solid var(--doc-border)"}})]});return jsxRuntime.jsxs("div",{ref:c,style:{position:"relative",display:"inline-block"},children:[o?u:jsxRuntime.jsx(K,{content:"Cell fill color",children:u}),o&&!t&&jsxRuntime.jsxs("div",{ref:d,style:{...p,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:8},onMouseDown:f=>f.stopPropagation(),children:[jsxRuntime.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(10, 1fr)",gap:2},children:Oi.map(f=>jsxRuntime.jsx("button",{type:"button",style:{...zi,backgroundColor:f,outline:l===f?"2px solid var(--doc-primary)":"none",outlineOffset:1},title:f,onMouseDown:b=>b.preventDefault(),onClick:()=>a(f)},f))}),jsxRuntime.jsxs("button",{type:"button",style:{display:"flex",alignItems:"center",gap:6,marginTop:6,padding:"4px 8px",width:"100%",border:"none",backgroundColor:"transparent",cursor:"pointer",fontSize:12,color:"var(--doc-text-muted)",borderRadius:4},onMouseDown:f=>f.preventDefault(),onMouseEnter:f=>{f.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:f=>{f.currentTarget.style.backgroundColor="transparent";},onClick:h,children:[jsxRuntime.jsx(g,{name:"format_color_reset",size:14}),jsxRuntime.jsx("span",{children:"No fill"})]})]})]})}var Vi={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"},ze={height:1,backgroundColor:"var(--doc-border)",margin:"4px 0"},Eo={padding:"6px 14px 2px",fontSize:11,color:"var(--doc-text-muted)",fontWeight:500};function Do({onAction:e,disabled:t=false,tableContext:o}){let[r,l]=X.useState(false),[s,n]=X.useState(null),c=X.useCallback(()=>l(false),[]),{containerRef:d,dropdownRef:p,dropdownStyle:m,handleMouseDown:a}=z({isOpen:r,onClose:c,align:"right"}),h=o?.table?.attrs?.justification??"left",u=X.useCallback(x=>{e(x),l(false);},[e]),f=(x,I,S,w,E)=>{let _=t||E?.itemDisabled;return jsxRuntime.jsxs("button",{type:"button",role:"menuitem",style:{...Vi,backgroundColor:s===x&&!_?"var(--doc-bg-hover)":"transparent",color:_?"var(--doc-text-muted)":E?.danger?"var(--doc-error)":"var(--doc-text)",cursor:_?"not-allowed":"pointer"},onClick:()=>!_&&u(w),onMouseEnter:()=>n(x),onMouseLeave:()=>n(null),disabled:_,children:[jsxRuntime.jsx(g,{name:I,size:16,className:E?.danger&&!_?"text-red-600":""}),jsxRuntime.jsx("span",{style:{flex:1},children:S})]},x)},b=jsxRuntime.jsx(F,{variant:"ghost",size:"icon-sm",className:T("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",r&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:a,onClick:()=>!t&&l(x=>!x),disabled:t,"aria-label":"More table options","aria-expanded":r,"aria-haspopup":"menu","data-testid":"toolbar-table-more",children:jsxRuntime.jsx(g,{name:"more_vert",size:20})});return jsxRuntime.jsxs("div",{ref:d,style:{position:"relative",display:"inline-block"},children:[r?b:jsxRuntime.jsx(K,{content:"More table options",children:b}),r&&!t&&jsxRuntime.jsxs("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:200,maxHeight:"70vh",overflowY:"auto"},role:"menu",onMouseDown:x=>x.stopPropagation(),children:[f("addRowAbove","add","Insert row above","addRowAbove"),f("addRowBelow","add","Insert row below","addRowBelow"),f("addColumnLeft","add","Insert column left","addColumnLeft"),f("addColumnRight","add","Insert column right","addColumnRight"),jsxRuntime.jsx("div",{style:ze,role:"separator"}),f("mergeCells","call_merge","Merge cells","mergeCells",{itemDisabled:!o?.hasMultiCellSelection}),f("splitCell","call_split","Split cell","splitCell",{itemDisabled:!o?.canSplitCell}),jsxRuntime.jsx("div",{style:ze,role:"separator"}),f("deleteRow","delete","Delete row","deleteRow",{danger:true,itemDisabled:(o?.rowCount??0)<=1}),f("deleteColumn","delete","Delete column","deleteColumn",{danger:true,itemDisabled:(o?.columnCount??0)<=1}),f("deleteTable","delete","Delete table","deleteTable",{danger:true}),jsxRuntime.jsx("div",{style:ze,role:"separator"}),jsxRuntime.jsx("div",{style:Eo,children:"Vertical alignment"}),jsxRuntime.jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["top","center","bottom"].map(x=>{let I={top:"vertical_align_top",center:"vertical_align_center",bottom:"vertical_align_bottom"};return jsxRuntime.jsx("button",{type:"button",title:{top:"Top",center:"Middle",bottom:"Bottom"}[x],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:()=>u({type:"cellVerticalAlign",align:x}),children:jsxRuntime.jsx(g,{name:I[x],size:16})},x)})}),jsxRuntime.jsx("div",{style:ze,role:"separator"}),jsxRuntime.jsx("div",{style:Eo,children:"Table alignment"}),jsxRuntime.jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["left","center","right"].map(x=>{let I={left:"format_align_left",center:"format_align_center",right:"format_align_right"},S=h===x;return jsxRuntime.jsx("button",{type:"button",title:`Align table ${x}`,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:()=>u({type:"tableProperties",props:{justification:x}}),children:jsxRuntime.jsx(g,{name:I[x],size:16})},x)})}),jsxRuntime.jsx("div",{style:ze,role:"separator"}),f("headerRow","table_rows","Toggle header row",{type:"toggleHeaderRow"}),f("distribute","view_column","Distribute columns evenly",{type:"distributeColumns"}),f("autoFit","fit_width","Auto-fit to contents",{type:"autoFitContents"}),f("noWrap","wrap_text","Toggle no-wrap",{type:"toggleNoWrap"}),jsxRuntime.jsx("div",{style:ze,role:"separator"}),f("properties","settings","Table properties...",{type:"openTableProperties"})]})]})}var Ht=18,Gi=2,No={width:Ht,height:Ht,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:2,transition:"background-color 0.1s, border-color 0.1s",cursor:"pointer"},Wi={...No,backgroundColor:"var(--doc-primary, #3b82f6)",border:"1px solid var(--doc-primary, #3b82f6)"},Ui={marginTop:6,fontSize:11,fontWeight:500,color:"var(--doc-text, #374151)",textAlign:"center"};function Fo({onInsert:e,gridRows:t=6,gridColumns:o=6}){let[r,l]=X.useState(0),[s,n]=X.useState(0),c=X.useCallback(()=>{r>0&&s>0&&e(r,s);},[r,s,e]),d=[];for(let m=1;m<=t;m++)for(let a=1;a<=o;a++){let h=m<=r&&a<=s;d.push(jsxRuntime.jsx("div",{style:h?Wi:No,onMouseEnter:()=>{l(m),n(a);},onClick:c,role:"gridcell","aria-selected":h},`${m}-${a}`));}let p=r>0&&s>0?`${s} \xD7 ${r}`:"Select size";return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{display:"grid",gap:Gi,gridTemplateColumns:`repeat(${o}, ${Ht}px)`},onMouseLeave:()=>{l(0),n(0);},role:"grid","aria-label":"Table size selector",children:d}),jsxRuntime.jsx("div",{style:Ui,children:p})]})}function ji(e){return "type"in e&&e.type==="separator"}var Oo={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"},Xi={...Oo,background:"var(--doc-hover, #f3f4f6)"},zo={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"},Qi={...zo,opacity:.4,cursor:"default"},Ji={height:1,backgroundColor:"var(--doc-border, #e5e7eb)",margin:"4px 0"},ea={marginLeft:"auto",fontSize:12,color:"var(--doc-text-muted, #9ca3af)"},ta={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 Et({label:e,items:t,disabled:o}){let[r,l]=X.useState(false),[s,n]=X.useState(null),c=X.useRef(null),d=X.useRef(null),[p,m]=X.useState({top:0,left:0}),a=X.useCallback(()=>{l(false),n(null);},[]);X.useEffect(()=>{if(!r||!c.current)return;let u=c.current.getBoundingClientRect();m({top:u.bottom+2,left:u.left});},[r]),X.useEffect(()=>{if(!r)return;function u(x){let I=x.target;c.current&&!c.current.contains(I)&&d.current&&!d.current.contains(I)&&a();}function f(x){x.key==="Escape"&&a();}function b(){a();}return document.addEventListener("mousedown",u),document.addEventListener("keydown",f),window.addEventListener("scroll",b,true),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",f),window.removeEventListener("scroll",b,true);}},[r,a]);let h=u=>{u.disabled||u.submenuContent||u.onClick&&(u.onClick(),a());};return jsxRuntime.jsxs("div",{style:{position:"relative"},children:[jsxRuntime.jsxs("button",{ref:c,type:"button",onClick:()=>!o&&l(!r),onMouseDown:u=>u.preventDefault(),disabled:o,style:r?Xi:Oo,children:[e,jsxRuntime.jsx(g,{name:"arrow_drop_down",size:16})]}),r&&jsxRuntime.jsx("div",{ref:d,style:{position:"fixed",top:p.top,left:p.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:u=>u.preventDefault(),children:t.map((u,f)=>{if(ji(u))return jsxRuntime.jsx("div",{style:Ji},`sep-${f}`);let b=u;if(b.customContent)return jsxRuntime.jsx("div",{onMouseDown:S=>S.preventDefault(),children:b.customContent},b.label);let x=!!b.submenuContent,I=s===b.label;return jsxRuntime.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>x&&n(b.label),onMouseLeave:()=>x&&n(null),children:[jsxRuntime.jsxs("button",{type:"button",style:b.disabled?Qi:zo,onClick:()=>h(b),onMouseDown:S=>S.preventDefault(),onMouseOver:S=>{b.disabled||(S.currentTarget.style.backgroundColor="var(--doc-hover, #f3f4f6)");},onMouseOut:S=>{S.currentTarget.style.backgroundColor="transparent";},disabled:b.disabled,children:[b.icon&&jsxRuntime.jsx(g,{name:b.icon,size:18}),jsxRuntime.jsx("span",{children:b.label}),b.shortcut&&jsxRuntime.jsx("span",{style:ea,children:b.shortcut}),x&&jsxRuntime.jsx("span",{style:{marginLeft:"auto"},children:jsxRuntime.jsx(g,{name:"keyboard_arrow_right",size:16})})]}),x&&I&&jsxRuntime.jsx("div",{style:ta,onMouseDown:S=>S.preventDefault(),children:b.submenuContent(a)})]},b.label)})})]})}var na=20;function xt({options:e,activeValue:t,triggerIcon:o,tooltipContent:r,onSelect:l,disabled:s=false,ariaLabel:n,testId:c}){let[d,p]=X.useState(false),m=X.useCallback(()=>p(false),[]),{containerRef:a,dropdownRef:h,dropdownStyle:u,handleMouseDown:f}=z({isOpen:d,onClose:m}),b=X.useCallback(I=>{s||l(I),p(false);},[s,l]),x=jsxRuntime.jsxs(F,{variant:"ghost",size:"icon-sm",className:T("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",d&&"bg-slate-100",s&&"opacity-30 cursor-not-allowed"),onMouseDown:f,onClick:()=>!s&&p(I=>!I),disabled:s,"aria-label":n??r,"aria-expanded":d,"aria-haspopup":"true","data-testid":c,children:[jsxRuntime.jsx(g,{name:o,size:na}),jsxRuntime.jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxRuntime.jsxs("div",{ref:a,style:{position:"relative",display:"inline-block"},children:[d?x:jsxRuntime.jsx(K,{content:r,children:x}),d&&!s&&jsxRuntime.jsx("div",{ref:h,style:{...u,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:I=>I.stopPropagation(),children:jsxRuntime.jsx("div",{style:{display:"flex",gap:2},children:e.map(I=>{let S=t===I.value;return jsxRuntime.jsx("button",{type:"button",title:I.label,"data-testid":c?`${c}-${I.value}`:void 0,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:S?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:S?"var(--doc-primary)":"var(--doc-text)"},onMouseDown:w=>w.preventDefault(),onMouseEnter:w=>{S||(w.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:w=>{w.currentTarget.style.backgroundColor=S?"var(--doc-primary-light)":"transparent";},onClick:()=>b(I.value),children:jsxRuntime.jsx(g,{name:I.iconName,size:18})},I.value)})})})]})}var Dt=[{value:"inline",label:"Inline with text",iconName:"format_image_left"},{value:"wrapRight",label:"Float left (wrap right)",iconName:"format_image_right"},{value:"wrapLeft",label:"Float right (wrap left)",iconName:"format_image_left"},{value:"topAndBottom",label:"Top and bottom",iconName:"horizontal_rule"},{value:"behind",label:"Behind text",iconName:"flip_to_back"},{value:"inFront",label:"In front of text",iconName:"flip_to_front"}];function ra(e){return e.displayMode==="float"&&e.cssFloat==="left"?"wrapRight":e.displayMode==="float"&&e.cssFloat==="right"?"wrapLeft":e.wrapType}function Go({imageContext:e,onChange:t,disabled:o=false}){let r=ra(e),l=Dt.find(s=>s.value===r)||Dt[0];return jsxRuntime.jsx(xt,{options:Dt,activeValue:r,triggerIcon:l.iconName,tooltipContent:`Wrap: ${l.label}`,onSelect:t,disabled:o,testId:"toolbar-image-wrap"})}var aa=[{value:"rotateCW",label:"Rotate clockwise",iconName:"rotate_right"},{value:"rotateCCW",label:"Rotate counter-clockwise",iconName:"rotate_left"},{value:"flipH",label:"Flip horizontal",iconName:"swap_horiz"},{value:"flipV",label:"Flip vertical",iconName:"swap_vert"}];function Wo({onTransform:e,disabled:t=false}){return jsxRuntime.jsx(xt,{options:aa,triggerIcon:"rotate_right",tooltipContent:"Transform",onSelect:e,disabled:t,testId:"toolbar-image-transform"})}var sa={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 ys(e){let t=e.replace(/^#/,"").toUpperCase();return sa[t]||null}function ne({active:e=false,disabled:t=false,title:o,onClick:r,children:l,className:s,ariaLabel:n}){let c=n?.toLowerCase().replace(/\s+/g,"-")||o?.toLowerCase().replace(/\s+/g,"-").replace(/\([^)]*\)/g,"").trim(),d=m=>{m.preventDefault();},p=jsxRuntime.jsx(F,{variant:"ghost",size:"icon-sm",className:T("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",s),onMouseDown:d,onClick:t?void 0:r,disabled:t,"aria-pressed":e,"aria-label":n||o,"data-testid":c?`toolbar-${c}`:void 0,children:l});return o?jsxRuntime.jsx(K,{content:o,children:p}):p}function me({label:e,children:t,className:o}){return jsxRuntime.jsx("div",{className:T("flex items-center gap-0.5 px-1 border-r border-slate-200/50 last:border-r-0",o),role:"group","aria-label":e,children:t})}function Ws(){return jsxRuntime.jsx("div",{className:"w-px h-6 bg-slate-200 mx-1.5",role:"separator"})}var re=20;function Us({currentFormatting:e={},onFormat:t,onUndo:o,onRedo:r,canUndo:l=false,canRedo:s=false,disabled:n=false,className:c,style:d,enableShortcuts:p=true,editorRef:m,children:a,showFontPicker:h=true,showFontSizePicker:u=true,showTextColorPicker:f=true,showHighlightColorPicker:b=true,showAlignmentButtons:x=true,showListButtons:I=true,showLineSpacingPicker:S=true,showStylePicker:w=true,documentStyles:E,theme:_,onPrint:W,showPrintButton:k=true,showZoomControl:A=true,zoom:U,onZoomChange:ee,onRefocusEditor:M,onInsertTable:O,showTableInsert:C=true,onInsertImage:D,onInsertPageBreak:P,onInsertTOC:Ee,imageContext:Ge,onImageWrapType:We,onImageTransform:et,onOpenImageProperties:tt,tableContext:ot,onTableAction:De}){let nt=X.useRef(null),G=X.useCallback(R=>{!n&&t&&t(R);},[n,t]),Te=X.useCallback(()=>{!n&&l&&o&&o();},[n,l,o]),Ue=X.useCallback(()=>{!n&&s&&r&&r();},[n,s,r]),Ye=X.useCallback(R=>{!n&&t&&(t({type:"fontFamily",value:R}),requestAnimationFrame(()=>M?.()));},[n,t,M]),wt=X.useCallback(R=>{!n&&t&&(t({type:"fontSize",value:R}),requestAnimationFrame(()=>M?.()));},[n,t,M]),q=X.useCallback(R=>{!n&&t&&(t({type:"textColor",value:R}),requestAnimationFrame(()=>M?.()));},[n,t,M]),we=X.useCallback(R=>{!n&&t&&(t({type:"highlightColor",value:R}),requestAnimationFrame(()=>M?.()));},[n,t,M]),ve=X.useCallback(R=>{!n&&t&&t({type:"alignment",value:R});},[n,t]),Ie=X.useCallback(()=>{!n&&t&&t("bulletList");},[n,t]),ae=X.useCallback(()=>{!n&&t&&t("numberedList");},[n,t]),Q=X.useCallback(()=>{!n&&t&&t("indent");},[n,t]),te=X.useCallback(()=>{!n&&t&&t("outdent");},[n,t]),Pe=X.useCallback(R=>{!n&&t&&(t({type:"lineSpacing",value:R}),requestAnimationFrame(()=>M?.()));},[n,t,M]),en=X.useCallback(R=>{!n&&t&&(t({type:"applyStyle",value:R}),requestAnimationFrame(()=>M?.()));},[n,t,M]),tn=X.useCallback((R,Z)=>{!n&&O&&(O(R,Z),requestAnimationFrame(()=>M?.()));},[n,O,M]),Ke=X.useCallback(R=>{!n&&De&&(De(R),requestAnimationFrame(()=>M?.()));},[n,De,M]);X.useEffect(()=>{if(!p)return;let R=Z=>{let Me=Z.target,$t=m?.current,rn=nt.current,an=$t?.contains(Me),ln=rn?.contains(Me);if(!an&&!ln)return;if((Z.ctrlKey||Z.metaKey)&&!Z.altKey)switch(Z.key.toLowerCase()){case "b":Z.preventDefault(),G("bold");break;case "i":Z.preventDefault(),G("italic");break;case "u":Z.preventDefault(),G("underline");break;case "=":Z.shiftKey?(Z.preventDefault(),G("superscript")):(Z.preventDefault(),G("subscript"));break;case "l":Z.preventDefault(),ve("left");break;case "e":Z.preventDefault(),ve("center");break;case "r":Z.preventDefault(),ve("right");break;case "j":Z.preventDefault(),ve("both");break;case "k":Z.preventDefault(),G("insertLink");break}};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R);}},[p,G,m]);let on=X.useCallback(R=>{let Z=R.target;Z.tagName==="INPUT"||Z.tagName==="TEXTAREA"||Z.tagName==="SELECT"||Z.tagName==="OPTION"||R.preventDefault();},[]),nn=X.useCallback(R=>{let Z=R.target,Me=document.activeElement;Z.tagName==="SELECT"||Z.tagName==="OPTION"||Me?.tagName==="SELECT"||requestAnimationFrame(()=>{M?.();});},[M]);return jsxRuntime.jsxs("div",{ref:nt,className:T("flex items-center gap-0 px-2 py-2 bg-white border-b border-slate-100 min-h-[44px] overflow-x-auto",c),style:d,role:"toolbar","aria-label":"Formatting toolbar","data-testid":"toolbar",onMouseDown:on,onMouseUp:nn,children:[k&&W&&jsxRuntime.jsx(Et,{label:"File",disabled:n,items:[{icon:"print",label:"Print",shortcut:"Ctrl+P",onClick:W}]}),jsxRuntime.jsx(Et,{label:"Insert",disabled:n,items:[...D?[{icon:"image",label:"Image",onClick:D}]:[],...C&&O?[{icon:"grid_on",label:"Table",submenuContent:R=>jsxRuntime.jsx(Fo,{onInsert:(Z,Me)=>{tn(Z,Me),R();}})}]:[],...D||C&&O?[{type:"separator"}]:[],{icon:"page_break",label:"Page break",onClick:P,disabled:!P},{icon:"format_list_numbered",label:"Table of contents",onClick:Ee,disabled:!Ee}]}),jsxRuntime.jsxs(me,{label:"History",children:[jsxRuntime.jsx(ne,{onClick:Te,disabled:n||!l,title:"Undo (Ctrl+Z)",ariaLabel:"Undo",children:jsxRuntime.jsx(g,{name:"undo",size:re})}),jsxRuntime.jsx(ne,{onClick:Ue,disabled:n||!s,title:"Redo (Ctrl+Y)",ariaLabel:"Redo",children:jsxRuntime.jsx(g,{name:"redo",size:re})})]}),A&&jsxRuntime.jsx(me,{label:"Zoom",children:jsxRuntime.jsx(So,{value:U,onChange:ee,minZoom:.5,maxZoom:2,disabled:n,compact:true,showButtons:false})}),w&&jsxRuntime.jsx(me,{label:"Styles",children:jsxRuntime.jsx(xo,{value:e.styleId||"Normal",onChange:en,styles:E,theme:_,disabled:n,width:150})}),(h||u)&&jsxRuntime.jsxs(me,{label:"Font",children:[h&&jsxRuntime.jsx(Ut,{value:e.fontFamily||"Arial",onChange:Ye,disabled:n,width:70,placeholder:"Arial"}),u&&jsxRuntime.jsx(no,{value:e.fontSize!==void 0?oo(e.fontSize):11,onChange:wt,disabled:n,width:50,placeholder:"11"})]}),jsxRuntime.jsxs(me,{label:"Text formatting",children:[jsxRuntime.jsx(ne,{onClick:()=>G("bold"),active:e.bold,disabled:n,title:"Bold (Ctrl+B)",ariaLabel:"Bold",children:jsxRuntime.jsx(g,{name:"format_bold",size:re})}),jsxRuntime.jsx(ne,{onClick:()=>G("italic"),active:e.italic,disabled:n,title:"Italic (Ctrl+I)",ariaLabel:"Italic",children:jsxRuntime.jsx(g,{name:"format_italic",size:re})}),jsxRuntime.jsx(ne,{onClick:()=>G("underline"),active:e.underline,disabled:n,title:"Underline (Ctrl+U)",ariaLabel:"Underline",children:jsxRuntime.jsx(g,{name:"format_underlined",size:re})}),jsxRuntime.jsx(ne,{onClick:()=>G("strikethrough"),active:e.strike,disabled:n,title:"Strikethrough",ariaLabel:"Strikethrough",children:jsxRuntime.jsx(g,{name:"strikethrough_s",size:re})}),f&&jsxRuntime.jsx(lo,{value:e.color?.replace(/^#/,""),onChange:q,disabled:n,title:"Font Color"}),b&&jsxRuntime.jsx(so,{value:e.highlight,onChange:we,disabled:n,title:"Text Highlight Color"}),jsxRuntime.jsx(ne,{onClick:()=>G("insertLink"),disabled:n,title:"Insert link (Ctrl+K)",ariaLabel:"Insert link",children:jsxRuntime.jsx(g,{name:"link",size:re})})]}),jsxRuntime.jsxs(me,{label:"Script",children:[jsxRuntime.jsx(ne,{onClick:()=>G("superscript"),active:e.superscript,disabled:n,title:"Superscript (Ctrl+Shift+=)",ariaLabel:"Superscript",children:jsxRuntime.jsx(g,{name:"superscript",size:re})}),jsxRuntime.jsx(ne,{onClick:()=>G("subscript"),active:e.subscript,disabled:n,title:"Subscript (Ctrl+=)",ariaLabel:"Subscript",children:jsxRuntime.jsx(g,{name:"subscript",size:re})})]}),x&&jsxRuntime.jsx(uo,{value:e.alignment||"left",onChange:ve,disabled:n}),(I||S)&&jsxRuntime.jsxs(me,{label:"List formatting",children:[I&&jsxRuntime.jsx(fo,{listState:e.listState||ho(),onBulletList:Ie,onNumberedList:ae,onIndent:Q,onOutdent:te,disabled:n,showIndentButtons:true,compact:true,hasIndent:(e.indentLeft??0)>0}),S&&jsxRuntime.jsx(go,{value:e.lineSpacing,onChange:Pe,disabled:n})]}),Ge&&We&&jsxRuntime.jsxs(me,{label:"Image",children:[jsxRuntime.jsx(Go,{imageContext:Ge,onChange:We,disabled:n}),et&&jsxRuntime.jsx(Wo,{onTransform:et,disabled:n}),tt&&jsxRuntime.jsx(ne,{onClick:tt,disabled:n,title:"Image properties (alt text, border)...",ariaLabel:"Image properties",children:jsxRuntime.jsx(g,{name:"tune",size:re})})]}),ot?.isInTable&&De&&jsxRuntime.jsxs(me,{label:"Table",children:[jsxRuntime.jsx(To,{onAction:Ke,disabled:n}),jsxRuntime.jsx(Mo,{onAction:Ke,disabled:n}),jsxRuntime.jsx(Lo,{onAction:Ke,disabled:n}),jsxRuntime.jsx(Zo,{onAction:Ke,disabled:n}),jsxRuntime.jsx(Do,{onAction:Ke,disabled:n,tableContext:ot})]}),jsxRuntime.jsx(ne,{onClick:()=>G("clearFormatting"),disabled:n,title:"Clear formatting",ariaLabel:"Clear formatting",children:jsxRuntime.jsx(g,{name:"format_clear",size:re})}),a]})}var da={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"13px",userSelect:"none",transition:"opacity 0.2s, transform 0.2s"},ma={position:"absolute",zIndex:100,pointerEvents:"auto"},fa={default:{backgroundColor:"rgba(255, 255, 255, 0.95)",color:"var(--doc-text)",padding:"6px 12px",borderRadius:"4px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",border:"1px solid rgba(0, 0, 0, 0.1)"},minimal:{backgroundColor:"transparent",color:"var(--doc-text-muted)",padding:"4px 8px"},badge:{backgroundColor:"var(--doc-primary)",color:"white",padding:"4px 10px",borderRadius:"4px",fontWeight:500,fontSize:"12px"},pill:{backgroundColor:"rgba(0, 0, 0, 0.7)",color:"white",padding:"6px 14px",borderRadius:"16px",fontSize:"12px",fontWeight:500}},ha={"bottom-left":{bottom:"16px",left:"16px"},"bottom-center":{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},"top-center":{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"}};function Qs({currentPage:e,totalPages:t,position:o="bottom-center",variant:r="default",floating:l=true,showPrefix:s=true,formatText:n,onClick:c,disabled:d=false,className:p="",style:m,children:a}){let h=X.useMemo(()=>n?n(e,t):s?`Page ${e} of ${t}`:`${e} / ${t}`,[e,t,n,s]),u={...da,...fa[r],...l?ma:{},...l?ha[o]:{},...c&&!d?{cursor:"pointer"}:{},...d?{opacity:.5,pointerEvents:"none"}:{},...m},f=()=>{!d&&c&&c();};return jsxRuntime.jsx("div",{className:`docx-page-indicator docx-page-indicator-${r} ${p}`,style:u,onClick:f,role:c?"button":"status","aria-label":`Page ${e} of ${t}`,"aria-live":"polite",tabIndex:c&&!d?0:void 0,onKeyDown:b=>{c&&!d&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),c());},children:a||h})}function va(e){let t=["th","st","nd","rd"],o=e%100;return e+(t[(o-20)%10]||t[o]||t[0])}function Js(e){return (t,o)=>e.replace("{current}",String(t)).replace("{total}",String(o)).replace("{ordinal}",va(t))}function ec(e,t){return t<=1?100:Math.round((e-1)/(t-1)*100)}function tc(e){return e===1}function oc(e,t){return e===t}function nc(e,t,o=20){let r=0;for(let l=0;l<t.length;l++){let s=r,n=r+t[l],c=(s+n)/2;if(e<c)return l+1;r=n+o;}return t.length}function rc(e,t,o,r=20){if(e<1||e>t.length)return 0;let l=0;for(let c=0;c<e-1;c++)l+=t[c]+r;let s=t[e-1],n=Math.max(0,(o-s)/2);return Math.max(0,l-n)}function ba(){return jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"15 18 9 12 15 6"})})}function xa(){return jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"9 18 15 12 9 6"})})}function Sa(){return jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"18 15 12 9 6 15"})})}function ya(){return jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"6 9 12 15 18 9"})})}var Ca={display:"inline-flex",alignItems:"center",gap:"4px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"13px",userSelect:"none",transition:"opacity 0.2s"},Ta={position:"absolute",zIndex:100,pointerEvents:"auto"},wa={default:{backgroundColor:"rgba(255, 255, 255, 0.95)",color:"var(--doc-text)",padding:"4px 8px",borderRadius:"6px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",border:"1px solid rgba(0, 0, 0, 0.1)"},compact:{backgroundColor:"rgba(255, 255, 255, 0.95)",color:"var(--doc-text)",padding:"2px 4px",borderRadius:"4px",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.1)",border:"1px solid rgba(0, 0, 0, 0.08)",fontSize:"12px"},minimal:{backgroundColor:"transparent",color:"var(--doc-text-muted)",padding:"4px"}},Ia={"bottom-left":{bottom:"16px",left:"16px"},"bottom-center":{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},"top-center":{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"}},Uo={display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",padding:0,border:"none",borderRadius:"4px",backgroundColor:"transparent",color:"var(--doc-text-muted)",cursor:"pointer",transition:"background-color 0.15s, color 0.15s"},Yo={backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text)"},Ko={opacity:.4,cursor:"not-allowed"},Pa={display:"flex",alignItems:"center",gap:"6px",padding:"4px 8px",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.15s",minWidth:"80px",justifyContent:"center"},Ma={backgroundColor:"rgba(0, 0, 0, 0.04)"};function ka({currentPage:e,totalPages:t,onNavigate:o,onClose:r,anchorRef:l}){let[s,n]=X.useState(String(e)),[c,d]=X.useState(null),p=X.useRef(null),m=X.useRef(null);X.useEffect(()=>{p.current?.focus(),p.current?.select();},[]),X.useEffect(()=>{let k=A=>{m.current&&!m.current.contains(A.target)&&l.current&&!l.current.contains(A.target)&&r();};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[r,l]),X.useEffect(()=>{let k=A=>{A.key==="Escape"&&r();};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[r]);let a=X.useCallback(()=>{let k=parseInt(s,10);if(isNaN(k)){d("Please enter a number");return}if(k<1||k>t){d(`Page must be 1-${t}`);return}o(k),r();},[s,t,o,r]),h=k=>{n(k.target.value),d(null);},u=k=>{if(k.key==="Enter")k.preventDefault(),a();else if(k.key==="ArrowUp"){k.preventDefault();let A=Math.min(parseInt(s,10)+1||1,t);n(String(A)),d(null);}else if(k.key==="ArrowDown"){k.preventDefault();let A=Math.max(parseInt(s,10)-1||1,1);n(String(A)),d(null);}},f=()=>{o(1),r();},b=()=>{o(t),r();},x={position:"absolute",bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)",backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.2)",border:"1px solid rgba(0, 0, 0, 0.1)",padding:"12px",minWidth:"200px",zIndex:1e3},I={display:"flex",alignItems:"center",gap:"8px",marginBottom:c?"4px":"12px"},S={flex:1,padding:"8px 12px",fontSize:"14px",border:c?"1px solid var(--doc-error)":"1px solid var(--doc-border)",borderRadius:"4px",outline:"none",textAlign:"center",fontFamily:"inherit"},w={padding:"8px 16px",fontSize:"14px",fontWeight:500,backgroundColor:"var(--doc-primary)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer"},E={color:"var(--doc-error)",fontSize:"12px",marginBottom:"8px"},_={display:"flex",justifyContent:"space-between",gap:"8px"},W={flex:1,padding:"6px 12px",fontSize:"12px",backgroundColor:"var(--doc-bg-muted)",color:"var(--doc-text)",border:"1px solid var(--doc-border-light)",borderRadius:"4px",cursor:"pointer"};return jsxRuntime.jsxs("div",{ref:m,style:x,role:"dialog","aria-label":"Go to page",children:[jsxRuntime.jsxs("div",{style:{fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px",textAlign:"center"},children:["Go to page (1-",t,")"]}),jsxRuntime.jsxs("div",{style:I,children:[jsxRuntime.jsx("input",{ref:p,type:"text",value:s,onChange:h,onKeyDown:u,style:S,"aria-label":"Page number","aria-invalid":!!c}),jsxRuntime.jsx("button",{onClick:a,style:w,type:"button",children:"Go"})]}),c&&jsxRuntime.jsx("div",{style:E,children:c}),jsxRuntime.jsxs("div",{style:_,children:[jsxRuntime.jsx("button",{onClick:f,style:W,disabled:e===1,type:"button",children:"First"}),jsxRuntime.jsx("button",{onClick:b,style:W,disabled:e===t,type:"button",children:"Last"})]})]})}function cc({currentPage:e,totalPages:t,onNavigate:o,position:r="bottom-center",variant:l="default",floating:s=true,showButtons:n=true,disabled:c=false,className:d="",style:p}){let[m,a]=X.useState(false),[h,u]=X.useState(false),[f,b]=X.useState(false),[x,I]=X.useState(false),S=X.useRef(null),w=e>1,E=e<t,_=X.useCallback(()=>{w&&!c&&o(e-1);},[w,c,e,o]),W=X.useCallback(()=>{E&&!c&&o(e+1);},[E,c,e,o]),k=X.useCallback(P=>{c||(P.key==="ArrowLeft"||P.key==="PageUp"?(P.preventDefault(),_()):P.key==="ArrowRight"||P.key==="PageDown"?(P.preventDefault(),W()):P.key==="Home"?(P.preventDefault(),o(1)):P.key==="End"&&(P.preventDefault(),o(t)));},[c,_,W,o,t]),A=X.useCallback(()=>{c||a(P=>!P);},[c]),U=X.useCallback(()=>{a(false);},[]),ee=X.useCallback(P=>{o(P),U();},[o,U]),M={...Ca,...wa[l],...s?Ta:{},...s?Ia[r]:{},...c?{opacity:.5,pointerEvents:"none"}:{},...p},O={...Uo,...l==="compact"?{width:"24px",height:"24px"}:{},...h&&w?Yo:{},...w?{}:Ko},C={...Uo,...l==="compact"?{width:"24px",height:"24px"}:{},...f&&E?Yo:{},...E?{}:Ko},D={...Pa,...l==="compact"?{padding:"2px 6px",minWidth:"60px"}:{},...x&&!c?Ma:{},...c?{cursor:"not-allowed"}:{}};return jsxRuntime.jsxs("div",{className:`docx-page-navigator docx-page-navigator-${l} ${d}`,style:M,role:"navigation","aria-label":"Page navigation",onKeyDown:k,tabIndex:0,children:[n&&jsxRuntime.jsx("button",{onClick:_,disabled:!w||c,style:O,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),"aria-label":"Previous page",title:"Previous page (\u2190)",type:"button",children:jsxRuntime.jsx(ba,{})}),jsxRuntime.jsxs("div",{style:{position:"relative"},children:[jsxRuntime.jsxs("button",{ref:S,onClick:A,style:D,onMouseEnter:()=>I(true),onMouseLeave:()=>I(false),"aria-haspopup":"dialog","aria-expanded":m,"aria-label":`Page ${e} of ${t}. Click to go to a specific page.`,title:"Click to go to a specific page",disabled:c,type:"button",children:[jsxRuntime.jsxs("span",{children:["Page ",jsxRuntime.jsx("strong",{children:e})," of ",t]}),m?jsxRuntime.jsx(Sa,{}):jsxRuntime.jsx(ya,{})]}),m&&jsxRuntime.jsx(ka,{currentPage:e,totalPages:t,onNavigate:ee,onClose:U,anchorRef:S})]}),n&&jsxRuntime.jsx("button",{onClick:W,disabled:!E||c,style:C,onMouseEnter:()=>b(true),onMouseLeave:()=>b(false),"aria-label":"Next page",title:"Next page (\u2192)",type:"button",children:jsxRuntime.jsx(xa,{})})]})}function pc(e){let t=e.trim(),o=parseInt(t,10);return isNaN(o)?null:o}function uc(e,t){return Number.isInteger(e)&&e>=1&&e<=t}function dc(e,t){return Math.min(Math.max(1,Math.round(e)),t)}function mc(){return [{key:"\u2190 or PageUp",description:"Previous page"},{key:"\u2192 or PageDown",description:"Next page"},{key:"Home",description:"First page"},{key:"End",description:"Last page"},{key:"Enter (in input)",description:"Go to page"}]}function fc(e,t,o){return e===t?`Page ${e} of ${o}`:`Pages ${e}-${t} of ${o}`}function hc(e,t){return t<=1?100:Math.round((e-1)/(t-1)*100)}var Xo=12240,yt=1440,Ct=1440,Tt=567,At=22,Za="var(--doc-text-muted)",Ha="var(--doc-text-subtle)",jo="rgba(0, 0, 0, 0.06)",_a="#4285f4",Ea="#3367d6",Da="#2a56c6",_e=5;function qa(e,t){return t==="inch"?(e/Ct).toFixed(2)+'"':(e/Tt).toFixed(1)+" cm"}function yc({sectionProps:e,zoom:t=1,editable:o=false,onLeftMarginChange:r,onRightMarginChange:l,onFirstLineIndentChange:s,showFirstLineIndent:n=false,firstLineIndent:c=0,hangingIndent:d=false,indentLeft:p=0,indentRight:m=0,onIndentLeftChange:a,onIndentRightChange:h,unit:u="inch",className:f="",style:b,tabStops:x,onTabStopRemove:I}){let[S,w]=X.useState(null),[E,_]=X.useState(null),[W,k]=X.useState(null),[A,U]=X.useState(null),ee=X.useRef(null),M=e?.pageWidth??Xo,O=e?.marginLeft??yt,C=e?.marginRight??yt,D=M-O-C,P=units.twipsToPixels(M)*t,Ee=units.twipsToPixels(O)*t,Ge=units.twipsToPixels(C)*t,We=units.twipsToPixels(p)*t,et=units.twipsToPixels(m)*t,tt=d?-c:c,ot=units.twipsToPixels(tt)*t,De=Ee+We,nt=P-Ge-et,G=Ee+We+ot,Te=X.useCallback((q,we)=>{o&&(q.preventDefault(),q.stopPropagation(),w(we));},[o]),Ue=X.useCallback(q=>{if(!S||!ee.current)return;let we=ee.current.getBoundingClientRect(),ve=q.clientX-we.left;U(ve);let Ie=units.pixelsToTwips(ve/t);if(S==="leftMargin"){let ae=M-C-720,Q=Math.round(Math.max(0,Math.min(Ie,ae)));k(Q),r?.(Q);}else if(S==="rightMargin"){let ae=M-Ie,Q=M-O-720,te=Math.round(Math.max(0,Math.min(ae,Q)));k(te),l?.(te);}else if(S==="firstLineIndent"){let ae=O+p,Q=Ie-ae,te=D-p-m-720,Pe=Math.round(Math.max(-p,Math.min(Q,te)));k(Pe),s?.(Pe);}else if(S==="leftIndent"){let ae=Ie-O,Q=D-m-720,te=Math.round(Math.max(0,Math.min(ae,Q)));k(te),a?.(te);}else if(S==="rightIndent"){let Q=M-C-Ie,te=D-p-720,Pe=Math.round(Math.max(0,Math.min(Q,te)));k(Pe),h?.(Pe);}},[S,t,M,O,C,D,p,m,r,l,s,a,h]),Ye=X.useCallback(()=>{w(null),k(null),U(null);},[]);X.useEffect(()=>{if(S)return document.addEventListener("mousemove",Ue),document.addEventListener("mouseup",Ye),()=>{document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",Ye);}},[S,Ue,Ye]);let wt=Oa(M,t,u);return jsxRuntime.jsxs("div",{ref:ee,className:`docx-horizontal-ruler ${f}`,style:{position:"relative",width:units.formatPx(P),height:At,backgroundColor:"transparent",overflow:"visible",userSelect:"none",cursor:S?"ew-resize":"default",...b},role:"slider","aria-label":"Horizontal ruler","aria-valuemin":0,"aria-valuemax":M,children:[jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:units.formatPx(Ee),height:At,backgroundColor:jo,borderRight:"1px solid rgba(0,0,0,0.12)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&r?q=>Te(q,"leftMargin"):void 0}),jsxRuntime.jsx("div",{style:{position:"absolute",top:0,right:0,width:units.formatPx(Ge),height:At,backgroundColor:jo,borderLeft:"1px solid rgba(0,0,0,0.12)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&l?q=>Te(q,"rightMargin"):void 0}),jsxRuntime.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:wt.map((q,we)=>jsxRuntime.jsx(Na,{tick:q},we))}),n&&jsxRuntime.jsx(Bt,{direction:"down",positionPx:G,editable:o,isDragging:S==="firstLineIndent",isHovered:E==="firstLineIndent",onMouseEnter:()=>_("firstLineIndent"),onMouseLeave:()=>_(null),onMouseDown:q=>Te(q,"firstLineIndent"),label:"First line indent"}),o&&a&&jsxRuntime.jsx(Bt,{direction:"up",positionPx:De,editable:o,isDragging:S==="leftIndent",isHovered:E==="leftIndent",onMouseEnter:()=>_("leftIndent"),onMouseLeave:()=>_(null),onMouseDown:q=>Te(q,"leftIndent"),label:"Left indent"}),o&&h&&jsxRuntime.jsx(Bt,{direction:"down",positionPx:nt,editable:o,isDragging:S==="rightIndent",isHovered:E==="rightIndent",onMouseEnter:()=>_("rightIndent"),onMouseLeave:()=>_(null),onMouseDown:q=>Te(q,"rightIndent"),label:"Right indent"}),x?.map(q=>jsxRuntime.jsx(Ba,{tabStop:q,positionPx:units.twipsToPixels(q.position)*t,onDoubleClick:()=>I?.(q.position)},q.position)),S&&W!==null&&A!==null&&jsxRuntime.jsx(Fa,{value:qa(W,u),positionPx:A})]})}function Na({tick:e}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:{position:"absolute",left:units.formatPx(e.position),bottom:0,width:1,height:e.height,backgroundColor:Ha}}),e.label&&jsxRuntime.jsx("div",{style:{position:"absolute",left:units.formatPx(e.position),top:3,transform:"translateX(-50%)",fontSize:"9px",color:Za,fontFamily:"sans-serif",whiteSpace:"nowrap"},children:e.label})]})}function Bt({direction:e,positionPx:t,editable:o,isDragging:r,isHovered:l,onMouseEnter:s,onMouseLeave:n,onMouseDown:c,label:d}){let p=r?Da:l?Ea:_a,m=Math.round(_e*1.6),a={position:"absolute",left:units.formatPx(t-_e),width:_e*2,height:m+2,cursor:o?"ew-resize":"default",zIndex:r?10:4,...e==="down"?{top:0}:{bottom:0}},h=e==="down"?{position:"absolute",top:1,left:0,width:0,height:0,borderLeft:`${_e}px solid transparent`,borderRight:`${_e}px solid transparent`,borderTop:`${m}px solid ${p}`,transition:"border-top-color 0.1s"}:{position:"absolute",bottom:1,left:0,width:0,height:0,borderLeft:`${_e}px solid transparent`,borderRight:`${_e}px solid transparent`,borderBottom:`${m}px solid ${p}`,transition:"border-bottom-color 0.1s"};return jsxRuntime.jsx("div",{className:"docx-ruler-indent",style:a,onMouseEnter:s,onMouseLeave:n,onMouseDown:c,role:"slider","aria-label":d,"aria-orientation":"horizontal",tabIndex:o?0:-1,children:jsxRuntime.jsx("div",{style:h})})}function Fa({value:e,positionPx:t}){return jsxRuntime.jsx("div",{style:{position:"absolute",left:units.formatPx(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 Aa={left:"L",center:"C",right:"R",decimal:"D",bar:"|"};function Ba({tabStop:e,positionPx:t,onDoubleClick:o}){return jsxRuntime.jsx("div",{style:{position:"absolute",left:units.formatPx(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:r=>{r.stopPropagation(),o();},title:`${e.alignment} tab at ${(e.position/1440).toFixed(2)}"`,children:Aa[e.alignment]||"L"})}function Oa(e,t,o){let r=[];if(o==="inch"){let l=Ct/8,s=Math.ceil(e/l);for(let n=0;n<=s;n++){let c=n*l;if(c>e)break;let d=units.twipsToPixels(c)*t;n%8===0?r.push({position:d,height:10,label:n/8>0?String(n/8):void 0}):n%4===0?r.push({position:d,height:6}):n%2===0?r.push({position:d,height:4}):r.push({position:d,height:2});}}else {let l=Tt/10,s=Math.ceil(e/l);for(let n=0;n<=s;n++){let c=n*l;if(c>e)break;let d=units.twipsToPixels(c)*t;n%10===0?r.push({position:d,height:10,label:n/10>0?String(n/10):void 0}):n%5===0?r.push({position:d,height:6}):r.push({position:d,height:3});}}return r}function Cc(e,t,o,r){let l=units.pixelsToTwips(e/r);return t==="left"?Math.max(0,l):Math.max(0,units.pixelsToTwips(o/r)-l)}function Tc(e,t=1){let o=e?.pageWidth??Xo,r=e?.marginLeft??yt,l=e?.marginRight??yt,s=units.twipsToPixels(o)*t,n=units.twipsToPixels(r)*t,c=units.twipsToPixels(l)*t;return {width:s,leftMargin:n,rightMargin:c,contentWidth:s-n-c}}function wc(e,t){return t==="inch"?(e/Ct).toFixed(2)+'"':(e/Tt).toFixed(1)+" cm"}function Ic(e,t){let o=parseFloat(e.replace(/[^\d.]/g,""));return isNaN(o)?null:Math.round(o*(t==="inch"?Ct:Tt))}var he=16;function $a(){return jsxRuntime.jsx(g,{name:"table_rows",size:he,style:{transform:"scaleY(-1)"}})}function Ga(){return jsxRuntime.jsx(g,{name:"table_rows",size:he})}function Wa(){return jsxRuntime.jsx(g,{name:"view_column",size:he,style:{transform:"scaleX(-1)"}})}function Ua(){return jsxRuntime.jsx(g,{name:"view_column",size:he})}function Ya(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:he})}function Ka(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:he,style:{transform:"rotate(90deg)"}})}function ja(){return jsxRuntime.jsx(g,{name:"call_merge",size:he})}function Xa(){return jsxRuntime.jsx(g,{name:"call_split",size:he})}function Qa(){return jsxRuntime.jsx(g,{name:"delete",size:he,className:"text-red-600"})}var ie={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 fe({action:e,label:t,icon:o,disabled:r=false,onClick:l,showLabel:s=false,compact:n=false,shortcut:c}){let[d,p]=X__namespace.default.useState(false),m=typeof e=="string"&&e.startsWith("delete"),a={...ie.button,...n?ie.buttonCompact:{},...d&&!r?ie.buttonHover:{},...r?ie.buttonDisabled:{},...m&&!r?ie.buttonDelete:{}},h=c?`${t} (${c})`:t;return jsxRuntime.jsxs("button",{type:"button",className:`docx-table-toolbar-button docx-table-toolbar-${typeof e=="string"?e:e.type}`,style:a,disabled:r,onClick:l,onMouseEnter:()=>p(true),onMouseLeave:()=>p(false),title:h,"aria-label":t,children:[o,s&&jsxRuntime.jsx("span",{children:t})]})}function zt({children:e,showSeparator:t=true}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:ie.group,children:e}),t&&jsxRuntime.jsx("div",{style:ie.separator})]})}function Rc({context:e,onAction:t,disabled:o=false,className:r,style:l,showLabels:s=false,compact:n=false,position:c="top",children:d}){if(!e)return null;let p=x=>{!o&&t&&e&&t(x,e);},m=e.rowCount>1,a=e.columnCount>1,h=e.hasMultiCellSelection,u=e.canSplitCell,f={...ie.container,...n?ie.containerCompact:{},...c==="floating"?ie.containerFloating:{},...l},b=["docx-table-toolbar"];return r&&b.push(r),n&&b.push("docx-table-toolbar-compact"),c==="floating"&&b.push("docx-table-toolbar-floating"),jsxRuntime.jsxs("div",{className:b.join(" "),style:f,role:"toolbar","aria-label":"Table editing tools",children:[jsxRuntime.jsx("span",{style:ie.label,children:"Table:"}),jsxRuntime.jsxs(zt,{children:[jsxRuntime.jsx(fe,{action:"addRowAbove",label:"Insert Row Above",icon:jsxRuntime.jsx($a,{}),disabled:o,onClick:()=>p("addRowAbove"),showLabel:s,compact:n}),jsxRuntime.jsx(fe,{action:"addRowBelow",label:"Insert Row Below",icon:jsxRuntime.jsx(Ga,{}),disabled:o,onClick:()=>p("addRowBelow"),showLabel:s,compact:n}),jsxRuntime.jsx(fe,{action:"deleteRow",label:"Delete Row",icon:jsxRuntime.jsx(Ya,{}),disabled:o||!m,onClick:()=>p("deleteRow"),showLabel:s,compact:n})]}),jsxRuntime.jsxs(zt,{children:[jsxRuntime.jsx(fe,{action:"addColumnLeft",label:"Insert Column Left",icon:jsxRuntime.jsx(Wa,{}),disabled:o,onClick:()=>p("addColumnLeft"),showLabel:s,compact:n}),jsxRuntime.jsx(fe,{action:"addColumnRight",label:"Insert Column Right",icon:jsxRuntime.jsx(Ua,{}),disabled:o,onClick:()=>p("addColumnRight"),showLabel:s,compact:n}),jsxRuntime.jsx(fe,{action:"deleteColumn",label:"Delete Column",icon:jsxRuntime.jsx(Ka,{}),disabled:o||!a,onClick:()=>p("deleteColumn"),showLabel:s,compact:n})]}),jsxRuntime.jsxs(zt,{showSeparator:false,children:[jsxRuntime.jsx(fe,{action:"mergeCells",label:"Merge Cells",icon:jsxRuntime.jsx(ja,{}),disabled:o||!h,onClick:()=>p("mergeCells"),showLabel:s,compact:n}),jsxRuntime.jsx(fe,{action:"splitCell",label:"Split Cell",icon:jsxRuntime.jsx(Xa,{}),disabled:o||!u,onClick:()=>p("splitCell"),showLabel:s,compact:n}),jsxRuntime.jsx(fe,{action:"deleteTable",label:"Delete Table",icon:jsxRuntime.jsx(Qa,{}),disabled:o,onClick:()=>p("deleteTable"),showLabel:s,compact:n})]}),d]})}function Zc(e,t){let o=e.rows.length,r=Vt(e),l=!!(t.selectedCells&&(t.selectedCells.startRow!==t.selectedCells.endRow||t.selectedCells.startCol!==t.selectedCells.endCol)),s=Jo(e,t.rowIndex,t.columnIndex),n=!!(s&&((s.formatting?.gridSpan??1)>1||s.formatting?.vMerge==="restart"));return {table:e,selection:t,hasMultiCellSelection:l,canSplitCell:n,rowCount:o,columnCount:r}}function Vt(e){if(!e.rows.length)return 0;let t=0;for(let o of e.rows){let r=0;for(let l of o.cells)r+=l.formatting?.gridSpan??1;t=Math.max(t,r);}return t}function Jo(e,t,o){let r=e.rows[t];if(!r)return null;let l=0;for(let s of r.cells){let n=s.formatting?.gridSpan??1;if(o>=l&&o<l+n)return s;l+=n;}return null}function Ja(e,t){let o=[],r=0;for(let l of e.cells){let s=l.formatting?.gridSpan??1;o.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...l.formatting,vMerge:void 0}}),r+=s;}for(;r<t;)o.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}),r++;return {type:"tableRow",cells:o,formatting:{...e.formatting,header:false}}}function el(){return {type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}}function Hc(e,t,o="after"){let r=[...e.rows],l=o==="before"?t:t+1,s=e.rows[t]||e.rows[0],n=Vt(e),c=Ja(s,n);return r.splice(l,0,c),{...e,rows:r}}function _c(e,t){if(e.rows.length<=1)return e;let o=e.rows.filter((r,l)=>l!==t);return {...e,rows:o}}function Ec(e,t,o="after"){let r=o==="before"?t:t+1,l=e.rows.map(n=>{let c=[...n.cells],d=0,p=0;for(let m=0;m<n.cells.length;m++){let h=n.cells[m].formatting?.gridSpan??1;if(r<=d+h){p=o==="before"?m:m+1;break}d+=h,p=m+1;}return c.splice(p,0,el()),{...n,cells:c}}),s=e.columnWidths;if(e.columnWidths&&e.columnWidths.length>0){s=[...e.columnWidths];let n=e.columnWidths[t]||e.columnWidths[0]||1440;s.splice(r,0,n);}return {...e,rows:l,columnWidths:s}}function Dc(e,t){if(Vt(e)<=1)return e;let r=e.rows.map(s=>{let n=0,c=[];for(let d of s.cells){let p=d.formatting?.gridSpan??1;t>=n&&t<n+p?p>1&&c.push({...d,formatting:{...d.formatting,gridSpan:p-1}}):c.push(d),n+=p;}return {...s,cells:c}}),l=e.columnWidths;return e.columnWidths&&e.columnWidths.length>t&&(l=e.columnWidths.filter((s,n)=>n!==t)),{...e,rows:r,columnWidths:l}}function qc(e,t){if(!t.selectedCells)return e;let{startRow:o,startCol:r,endRow:l,endCol:s}=t.selectedCells,n=l-o+1,c=s-r+1,d=e.rows.map((p,m)=>{if(m<o||m>l)return p;let a=[],h=0;for(let u of p.cells){let f=u.formatting?.gridSpan??1,b=h+f-1;h<=s&&b>=r?m===o&&h===r?a.push({...u,formatting:{...u.formatting,gridSpan:c,vMerge:n>1?"restart":void 0}}):m>o&&h===r&&a.push({...u,formatting:{...u.formatting,gridSpan:c,vMerge:"continue"}}):a.push(u),h+=f;}return {...p,cells:a}});return {...e,rows:d}}function Nc(e,t,o){let r=Jo(e,t,o);if(!r)return e;let l=r.formatting?.gridSpan??1,s=r.formatting?.vMerge==="restart";if(l<=1&&!s)return e;let n=e.rows.map((c,d)=>{if(d!==t&&!s)return c;let p=[],m=0;for(let a of c.cells){let h=a.formatting?.gridSpan??1;if(m===o||m<=o&&o<m+h)if(l>1)for(let u=0;u<l;u++)p.push({type:"tableCell",content:u===0?a.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...a.formatting,gridSpan:void 0,vMerge:void 0}});else s&&d===t?p.push({...a,formatting:{...a.formatting,vMerge:void 0}}):a.formatting?.vMerge==="continue"?p.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...a.formatting,vMerge:void 0}}):p.push(a);else p.push(a);m+=h;}return {...c,cells:p}});return {...e,rows:n}}
|
|
2
|
+
exports.$=Nc;exports.A=Js;exports.B=ec;exports.C=tc;exports.D=oc;exports.E=nc;exports.F=rc;exports.G=cc;exports.H=pc;exports.I=uc;exports.J=dc;exports.K=mc;exports.L=fc;exports.M=hc;exports.N=yc;exports.O=Cc;exports.P=Tc;exports.Q=wc;exports.R=Ic;exports.S=Rc;exports.T=Zc;exports.U=Vt;exports.V=Jo;exports.W=Hc;exports.X=_c;exports.Y=Ec;exports.Z=Dc;exports._=qc;exports.a=T;exports.b=Ut;exports.c=F;exports.d=g;exports.e=Ll;exports.f=no;exports.g=ao;exports.h=K;exports.i=uo;exports.j=fo;exports.k=ho;exports.l=go;exports.m=xo;exports.n=So;exports.o=To;exports.p=Mo;exports.q=Lo;exports.r=Zo;exports.s=Do;exports.t=ys;exports.u=ne;exports.v=me;exports.w=Ws;exports.x=Us;exports.y=Qs;exports.z=va;//# sourceMappingURL=chunk-7FEY3YWC.cjs.map
|
|
3
|
+
//# sourceMappingURL=chunk-7FEY3YWC.cjs.map
|