@zeke-02/docx-editor-react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +122 -0
  3. package/dist/FindReplaceDialog-25PDOTC7.js +1 -0
  4. package/dist/FindReplaceDialog-6PLDD22H.mjs +1 -0
  5. package/dist/FootnotePropertiesDialog-JIWAFAKL.js +1 -0
  6. package/dist/FootnotePropertiesDialog-SZYOYLR3.mjs +1 -0
  7. package/dist/HyperlinkDialog-G5FFKLWY.js +1 -0
  8. package/dist/HyperlinkDialog-PSJ6P3E3.mjs +1 -0
  9. package/dist/ImagePositionDialog-DTGYFFAR.js +1 -0
  10. package/dist/ImagePositionDialog-FKBG2MSL.mjs +1 -0
  11. package/dist/ImagePropertiesDialog-SO6RAOT6.js +1 -0
  12. package/dist/ImagePropertiesDialog-T77XMKJF.mjs +1 -0
  13. package/dist/KeyboardShortcutsDialog-04AoVwn3.d.mts +415 -0
  14. package/dist/KeyboardShortcutsDialog-04AoVwn3.d.ts +415 -0
  15. package/dist/PageSetupDialog-Q7UGLILM.mjs +1 -0
  16. package/dist/PageSetupDialog-XMG64O3T.js +1 -0
  17. package/dist/PrintPreview-DEhwRBC_.d.mts +93 -0
  18. package/dist/PrintPreview-DEhwRBC_.d.ts +93 -0
  19. package/dist/SplitCellDialog-NPGW4JGQ.mjs +1 -0
  20. package/dist/SplitCellDialog-RNP37SKZ.js +1 -0
  21. package/dist/TablePropertiesDialog-3QNCWNEG.mjs +1 -0
  22. package/dist/TablePropertiesDialog-AQVM7FGA.js +1 -0
  23. package/dist/chunk-2DBLZSGF.js +1 -0
  24. package/dist/chunk-3QCOIABL.js +2 -0
  25. package/dist/chunk-45GFZZ45.mjs +1 -0
  26. package/dist/chunk-4RTT4L2S.js +1 -0
  27. package/dist/chunk-7DAI755K.mjs +1 -0
  28. package/dist/chunk-BJ5RZW6Y.js +1 -0
  29. package/dist/chunk-BMBP5UFA.mjs +1 -0
  30. package/dist/chunk-DZHU5RSL.mjs +2 -0
  31. package/dist/chunk-FZ357PVD.mjs +2 -0
  32. package/dist/chunk-GM2S2WMT.mjs +1 -0
  33. package/dist/chunk-GNIO6SOS.js +1 -0
  34. package/dist/chunk-HAFRR4IT.js +1 -0
  35. package/dist/chunk-ICVBXT6V.mjs +2 -0
  36. package/dist/chunk-JGPOALUP.js +1 -0
  37. package/dist/chunk-JTUSMG6J.js +1 -0
  38. package/dist/chunk-K5DD2LSK.mjs +1 -0
  39. package/dist/chunk-NIBCC7WQ.js +1 -0
  40. package/dist/chunk-PBA4ERQP.js +2 -0
  41. package/dist/chunk-RK5GPBQ5.mjs +1 -0
  42. package/dist/chunk-UMM2BQ4N.mjs +1 -0
  43. package/dist/chunk-UT6DJWGC.js +2 -0
  44. package/dist/chunk-UZLKRJJK.js +2 -0
  45. package/dist/chunk-W3QFF3SQ.mjs +2 -0
  46. package/dist/chunk-XA53EBKC.js +1 -0
  47. package/dist/chunk-XRZKQOQJ.mjs +1 -0
  48. package/dist/chunk-ZFZJRL2R.mjs +1 -0
  49. package/dist/dialogs.d.mts +40 -0
  50. package/dist/dialogs.d.ts +40 -0
  51. package/dist/dialogs.js +1 -0
  52. package/dist/dialogs.mjs +1 -0
  53. package/dist/hooks.d.mts +513 -0
  54. package/dist/hooks.d.ts +513 -0
  55. package/dist/hooks.js +1 -0
  56. package/dist/hooks.mjs +1 -0
  57. package/dist/index.d.mts +567 -0
  58. package/dist/index.d.ts +567 -0
  59. package/dist/index.js +33 -0
  60. package/dist/index.mjs +33 -0
  61. package/dist/plugin-api.d.mts +90 -0
  62. package/dist/plugin-api.d.ts +90 -0
  63. package/dist/plugin-api.js +246 -0
  64. package/dist/plugin-api.mjs +246 -0
  65. package/dist/styles.css +1 -0
  66. package/dist/styles.d.mts +13 -0
  67. package/dist/styles.d.ts +13 -0
  68. package/dist/styles.js +1 -0
  69. package/dist/styles.mjs +1 -0
  70. package/dist/types-DaQbko33.d.mts +106 -0
  71. package/dist/types-DaQbko33.d.ts +106 -0
  72. package/dist/ui.d.mts +1565 -0
  73. package/dist/ui.d.ts +1565 -0
  74. package/dist/ui.js +111 -0
  75. package/dist/ui.mjs +111 -0
  76. package/dist/useFindReplace-C5gZIvkA.d.mts +219 -0
  77. package/dist/useFindReplace-C5gZIvkA.d.ts +219 -0
  78. package/package.json +137 -0
package/dist/ui.js ADDED
@@ -0,0 +1,111 @@
1
+ 'use strict';var chunkPBA4ERQP_js=require('./chunk-PBA4ERQP.js'),chunk3QCOIABL_js=require('./chunk-3QCOIABL.js'),chunkJGPOALUP_js=require('./chunk-JGPOALUP.js'),chunkNIBCC7WQ_js=require('./chunk-NIBCC7WQ.js'),chunkUZLKRJJK_js=require('./chunk-UZLKRJJK.js'),chunk4RTT4L2S_js=require('./chunk-4RTT4L2S.js'),chunkXA53EBKC_js=require('./chunk-XA53EBKC.js'),chunkUT6DJWGC_js=require('./chunk-UT6DJWGC.js'),chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js');require('./chunk-BJ5RZW6Y.js');var Kr=require('react'),agentApi=require('@zeke-02/docx-editor-core/types/agentApi'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Kr__default=/*#__PURE__*/_interopDefault(Kr);var Io={askAI:"contextMenu.aiActions.askAi",rewrite:"contextMenu.aiActions.rewrite",expand:"contextMenu.aiActions.expand",summarize:"contextMenu.aiActions.summarize",translate:"contextMenu.aiActions.translate",explain:"contextMenu.aiActions.explain",fixGrammar:"contextMenu.aiActions.fixGrammar",makeFormal:"contextMenu.aiActions.makeFormal",makeCasual:"contextMenu.aiActions.makeCasual",custom:"contextMenu.aiActions.custom"},Po=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M8 4v4M8 10v1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Lo=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M13 3L3 13M3 3h4v4M13 13h-4v-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ro=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Eo=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Do=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M2 3h6M5 3v6M3 5c0 2 1 4 2 4s2-2 2-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M9 7l3 6M15 7l-3 6M10 11h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Ao=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 6c0-1.1.9-2 2-2s2 .9 2 2c0 1.5-2 1.5-2 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"8",cy:"12",r:"0.5",fill:"currentColor"})]}),Mo=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M4 12l3-8 3 8M5 10h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M12 6l2 2-2 2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Oo=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 7h4M6 9h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),_o=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 9c.5.5 1 1 2 1s1.5-.5 2-1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"6",cy:"7",r:"0.5",fill:"currentColor"}),jsxRuntime.jsx("circle",{cx:"10",cy:"7",r:"0.5",fill:"currentColor"})]}),Bo=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})});function No(e){switch(e){case "askAI":return jsxRuntime.jsx(Po,{});case "rewrite":return jsxRuntime.jsx(Lo,{});case "expand":return jsxRuntime.jsx(Ro,{});case "summarize":return jsxRuntime.jsx(Eo,{});case "translate":return jsxRuntime.jsx(Do,{});case "explain":return jsxRuntime.jsx(Ao,{});case "fixGrammar":return jsxRuntime.jsx(Mo,{});case "makeFormal":return jsxRuntime.jsx(Oo,{});case "makeCasual":return jsxRuntime.jsx(_o,{});case "custom":return jsxRuntime.jsx(Bo,{});default:return null}}var zo=({action:e,onClick:t,isHighlighted:o,onMouseEnter:i})=>{let{t:r}=chunkGNIO6SOS_js.b(),n=r(Io[e]),s=agentApi.getActionDescription(e),a=No(e);return jsxRuntime.jsxs("button",{type:"button",className:`docx-context-menu-item ${o?"docx-context-menu-item-highlighted":""}`,onClick:t,onMouseEnter:i,title:s,role:"menuitem",style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",background:o?"var(--doc-primary-light)":"transparent",cursor:"pointer",fontSize:"13px",color:"var(--doc-text)",textAlign:"left"},children:[jsxRuntime.jsx("span",{style:{display:"flex",color:"var(--doc-text-muted)"},children:a}),jsxRuntime.jsx("span",{children:n})]})},Wo=({isOpen:e,onSubmit:t,onClose:o,selectedText:i})=>{let[r,n]=Kr.useState(""),s=Kr.useRef(null),{t:a}=chunkGNIO6SOS_js.b();Kr.useEffect(()=>{e&&s.current&&s.current.focus();},[e]);let l=p=>{p.preventDefault(),r.trim()&&(t(r.trim()),n(""));},c=p=>{p.key==="Escape"&&o();};return e?jsxRuntime.jsx("div",{className:"docx-custom-prompt-dialog",style:{position:"absolute",top:"100%",left:0,right:0,padding:"8px",background:"white",borderTop:"1px solid var(--doc-border)"},children:jsxRuntime.jsxs("form",{onSubmit:l,children:[jsxRuntime.jsxs("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:['Selected: "',i.slice(0,50),i.length>50?"...":"",'"']}),jsxRuntime.jsx("input",{ref:s,type:"text",value:r,onChange:p=>n(p.target.value),onKeyDown:c,placeholder:a("contextMenu.customPromptPlaceholder"),style:{width:"100%",padding:"8px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",fontSize:"13px"}}),jsxRuntime.jsxs("div",{style:{marginTop:"8px",display:"flex",gap:"8px",justifyContent:"flex-end"},children:[jsxRuntime.jsx("button",{type:"button",onClick:o,style:{padding:"6px 12px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"12px"},children:a("common.cancel")}),jsxRuntime.jsx("button",{type:"submit",disabled:!r.trim(),style:{padding:"6px 12px",border:"none",borderRadius:"4px",background:r.trim()?"var(--doc-primary)":"var(--doc-border)",color:r.trim()?"white":"var(--doc-text-placeholder)",cursor:r.trim()?"pointer":"not-allowed",fontSize:"12px"},children:a("common.send")})]})]})}):null},Yo=({isOpen:e,position:t,selectedText:o,selectionContext:i,onAction:r,onClose:n,actions:s=agentApi.DEFAULT_AI_ACTIONS,showCustomPrompt:a=true,className:l=""})=>{let c=Kr.useRef(null),[p,g]=Kr.useState(0),[d,m]=Kr.useState(false),{t:x}=chunkGNIO6SOS_js.b(),b=a?[...s,"custom"]:s;Kr.useEffect(()=>{if(!e)return;let u=h=>{c.current&&!c.current.contains(h.target)&&n();};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[e,n]),Kr.useEffect(()=>{if(!e)return;let u=h=>{switch(h.key){case "Escape":d?m(false):n();break;case "ArrowDown":h.preventDefault(),g(P=>(P+1)%b.length);break;case "ArrowUp":h.preventDefault(),g(P=>(P-1+b.length)%b.length);break;case "Enter":h.preventDefault();let I=b[p];I==="custom"?m(true):(r(I),n());break}};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,p,b,r,n,d]),Kr.useEffect(()=>{e&&(g(0),m(false));},[e]);let f=Kr.useCallback(()=>{let h=b.length*36+16,I=t.x,P=t.y;return typeof window<"u"&&(I+200>window.innerWidth&&(I=window.innerWidth-200-10),P+h>window.innerHeight&&(P=window.innerHeight-h-10),I<10&&(I=10),P<10&&(P=10)),{position:"fixed",top:P,left:I,minWidth:200,background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",zIndex:chunkPBA4ERQP_js.h.contextMenu,padding:"4px 0",overflow:"hidden"}},[t,b.length]),k=u=>{u==="custom"?m(true):(r(u),n());},T=u=>{r("custom",u),n();};return !e||!o?null:jsxRuntime.jsxs("div",{ref:c,className:`docx-context-menu ${l}`,style:f(),role:"menu","aria-label":x("contextMenu.ariaLabel"),children:[jsxRuntime.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:"11px",color:"var(--doc-text-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:['"',o.slice(0,30),o.length>30?"...":"",'"']}),jsxRuntime.jsx("div",{role:"group",children:b.map((u,h)=>jsxRuntime.jsx(zo,{action:u,onClick:()=>k(u),isHighlighted:h===p,onMouseEnter:()=>g(h)},u))}),a&&jsxRuntime.jsx(Wo,{isOpen:d,onSubmit:T,onClose:()=>m(false),selectedText:o})]})};function Uo(){let[e,t]=Kr.useState(false),[o,i]=Kr.useState({x:0,y:0}),[r,n]=Kr.useState(""),[s,a]=Kr.useState(),l=Kr.useCallback((p,g,d)=>{p.preventDefault(),i({x:p.clientX,y:p.clientY}),n(g),a(d),t(true);},[]),c=Kr.useCallback(()=>{t(false);},[]);return {isOpen:e,position:o,selectedText:r,selectionContext:s,openMenu:l,closeMenu:c}}function Fo(e){return {rewrite:"Ctrl+Shift+R",summarize:"Ctrl+Shift+S",translate:"Ctrl+Shift+T",fixGrammar:"Ctrl+Shift+G"}[e]}function Vo(e,t,o){return !(!t||t.trim().length===0)}function $o(){return [...agentApi.DEFAULT_AI_ACTIONS]}function Go(){return ["askAI","rewrite","expand","summarize","translate","explain","fixGrammar","makeFormal","makeCasual","custom"]}var Ho=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M3 8l4 4 6-8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Ve=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),Ko=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M2 8a6 6 0 0111.318-2.828M14 8a6 6 0 01-11.318 2.828",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M13 2v4h-4M3 14v-4h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),jo=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M11 2l3 3-9 9H2v-3l9-9z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Zo=()=>jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{animation:"spin 1s linear infinite"},children:[jsxRuntime.jsx("circle",{cx:"10",cy:"10",r:"8",stroke:"var(--doc-border)",strokeWidth:"2",fill:"none"}),jsxRuntime.jsx("path",{d:"M10 2a8 8 0 018 8",stroke:"var(--doc-primary)",strokeWidth:"2",strokeLinecap:"round",fill:"none"}),jsxRuntime.jsx("style",{children:`
2
+ @keyframes spin {
3
+ from { transform: rotate(0deg); }
4
+ to { transform: rotate(360deg); }
5
+ }
6
+ `})]});function Xo(e,t){let o=[],i=e.split(/(\s+)/),r=t.split(/(\s+)/),n=0,s=0;for(;n<i.length||s<r.length;){if(n>=i.length){o.push({type:"added",text:r.slice(s).join("")});break}if(s>=r.length){o.push({type:"removed",text:i.slice(n).join("")});break}if(i[n]===r[s])o.push({type:"same",text:i[n]}),n++,s++;else {let l=r.indexOf(i[n],s),c=i.indexOf(r[s],n);l===-1&&c===-1?(o.push({type:"removed",text:i[n]}),o.push({type:"added",text:r[s]}),n++,s++):c!==-1&&(l===-1||c-n<=l-s)?(o.push({type:"added",text:r[s]}),s++):(o.push({type:"removed",text:i[n]}),n++);}}let a=[];for(let l of o)a.length>0&&a[a.length-1].type===l.type?a[a.length-1].text+=l.text:a.push(l);return a}var Qo=({original:e,modified:t})=>{let o=Xo(e,t);return jsxRuntime.jsx("div",{className:"docx-response-diff",style:{lineHeight:1.6,fontSize:"14px"},children:o.map((i,r)=>{let n={};switch(i.type){case "removed":n={textDecoration:"line-through",color:"#d32f2f",backgroundColor:"#ffebee"};break;case "added":n={color:"#2e7d32",backgroundColor:"#e8f5e9"};break;}return jsxRuntime.jsx("span",{style:n,children:i.text},r)})})},Jo=({originalText:e,response:t,action:o,isLoading:i,error:r,onAccept:n,onReject:s,onRetry:a,allowEdit:l=true,showDiff:c=true,className:p="",position:g})=>{let{t:d}=chunkGNIO6SOS_js.b(),[m,x]=Kr.useState(false),[b,f]=Kr.useState(""),k=Kr.useRef(null),T=Kr.useRef(null),u=t?.newText||"";Kr.useEffect(()=>{u&&f(u);},[u]),Kr.useEffect(()=>{m&&k.current&&(k.current.focus(),k.current.select());},[m]),Kr.useEffect(()=>{let R=E=>{E.key==="Escape"?m?(x(false),f(u)):s():E.key==="Enter"&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),h());};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[m,u,s]);let h=Kr.useCallback(()=>{n(m?b:u);},[m,b,u,n]),I=Kr.useCallback(()=>{x(true);},[]),P=Kr.useCallback(()=>{x(false),f(u);},[u]),_={position:g?"fixed":"relative",...g&&{left:g.x,top:g.y},width:"400px",maxWidth:"90vw",maxHeight:"80vh",background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",zIndex:1e4,overflow:"hidden",display:"flex",flexDirection:"column"};return i?jsxRuntime.jsx("div",{ref:T,className:`docx-response-preview docx-response-preview-loading ${p}`,style:_,children:jsxRuntime.jsxs("div",{style:{padding:"24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[jsxRuntime.jsx(Zo,{}),jsxRuntime.jsx("div",{style:{color:"var(--doc-text-muted)",fontSize:"14px"},children:d("responsePreview.loading",{action:agentApi.getActionLabel(o)})})]})}):r?jsxRuntime.jsx("div",{ref:T,className:`docx-response-preview docx-response-preview-error ${p}`,style:_,children:jsxRuntime.jsxs("div",{style:{padding:"16px"},children:[jsxRuntime.jsx("div",{style:{padding:"12px",background:"var(--doc-error-bg)",borderRadius:"4px",color:"var(--doc-error)",fontSize:"13px",marginBottom:"16px"},children:r}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[a&&jsxRuntime.jsxs("button",{type:"button",onClick:a,style:{display:"flex",alignItems:"center",gap:"4px",padding:"8px 16px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"13px"},children:[jsxRuntime.jsx(Ko,{}),d("common.retry")]}),jsxRuntime.jsx("button",{type:"button",onClick:s,style:{padding:"8px 16px",border:"none",borderRadius:"4px",background:"var(--doc-border)",cursor:"pointer",fontSize:"13px"},children:d("common.close")})]})]})}):!t||!u?null:jsxRuntime.jsxs("div",{ref:T,className:`docx-response-preview ${p}`,style:_,children:[jsxRuntime.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntime.jsx("div",{style:{fontWeight:500,fontSize:"14px",color:"var(--doc-text)"},children:d("responsePreview.result",{action:agentApi.getActionLabel(o)})}),jsxRuntime.jsx("button",{type:"button",onClick:s,style:{display:"flex",padding:"4px",border:"none",background:"transparent",cursor:"pointer",color:"var(--doc-text-muted)"},title:d("responsePreview.closeEsc"),children:jsxRuntime.jsx(Ve,{})})]}),jsxRuntime.jsxs("div",{style:{padding:"16px",overflowY:"auto",flex:1},children:[m?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:d("responsePreview.editPrompt")}),jsxRuntime.jsx("textarea",{ref:k,value:b,onChange:R=>f(R.target.value),style:{width:"100%",minHeight:"120px",padding:"12px",border:"1px solid var(--doc-primary)",borderRadius:"4px",fontSize:"14px",lineHeight:1.6,resize:"vertical",fontFamily:"inherit"}})]}):c?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:d("responsePreview.changes")}),jsxRuntime.jsx(Qo,{original:e,modified:u})]}):jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:d("responsePreview.original")}),jsxRuntime.jsx("div",{style:{padding:"8px 12px",background:"var(--doc-bg-subtle)",borderRadius:"4px",marginBottom:"16px",textDecoration:"line-through",color:"var(--doc-text-placeholder)",fontSize:"13px"},children:e}),jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:d("responsePreview.new")}),jsxRuntime.jsx("div",{style:{padding:"8px 12px",background:"#e8f5e9",borderRadius:"4px",color:"#2e7d32",fontSize:"13px"},children:u})]}),t.warnings&&t.warnings.length>0&&jsxRuntime.jsx("div",{style:{marginTop:"16px",padding:"8px 12px",background:"var(--doc-warning-bg)",borderRadius:"4px",fontSize:"12px",color:"var(--doc-warning)"},children:t.warnings.map((R,E)=>jsxRuntime.jsx("div",{children:R},E))})]}),jsxRuntime.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[l&&!m&&jsxRuntime.jsxs("button",{type:"button",onClick:I,style:{display:"flex",alignItems:"center",gap:"4px",padding:"6px 12px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"12px",color:"var(--doc-text-muted)"},children:[jsxRuntime.jsx(jo,{}),d("common.edit")]}),m&&jsxRuntime.jsx("button",{type:"button",onClick:P,style:{padding:"6px 12px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"12px",color:"var(--doc-text-muted)"},children:d("responsePreview.cancelEdit")})]}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:"8px"},children:[jsxRuntime.jsxs("button",{type:"button",onClick:s,style:{display:"flex",alignItems:"center",gap:"4px",padding:"8px 16px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"13px",color:"var(--doc-text-muted)"},children:[jsxRuntime.jsx(Ve,{}),d("common.reject")]}),jsxRuntime.jsxs("button",{type:"button",onClick:h,style:{display:"flex",alignItems:"center",gap:"4px",padding:"8px 16px",border:"none",borderRadius:"4px",background:"var(--doc-primary)",cursor:"pointer",fontSize:"13px",color:"white"},children:[jsxRuntime.jsx(Ho,{}),d("common.accept")]})]})]})]})};function qo(){let[e,t]=Kr.useState({isVisible:false,originalText:"",response:null,action:"rewrite",isLoading:false}),o=Kr.useCallback((s,a,l)=>{t({isVisible:true,originalText:s,response:null,action:a,isLoading:true,position:l});},[]),i=Kr.useCallback(s=>{t(a=>({...a,response:s,isLoading:false}));},[]),r=Kr.useCallback(s=>{t(a=>({...a,error:s,isLoading:false}));},[]),n=Kr.useCallback(()=>{t(s=>({...s,isVisible:false}));},[]);return {state:e,showPreview:o,setResponse:i,setError:r,hidePreview:n}}function er(e,t){return {success:true,newText:e,warnings:t}}function tr(e){return {success:false,error:e}}var or={includeHeaders:true,includeFooters:true,includePageNumbers:true,pageRange:null,scale:1,printBackground:true,margins:"default"};function rr({onPrint:e,disabled:t=false,label:o,className:i="",style:r,showIcon:n=true,compact:s=false}){let{t:a}=chunkGNIO6SOS_js.b(),l=o??a("print.label"),c={display:"flex",alignItems:"center",gap:s?"4px":"6px",padding:s?"4px 8px":"6px 12px",fontSize:s?"13px":"14px",backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:"4px",cursor:t?"not-allowed":"pointer",color:t?"var(--doc-text-muted)":"var(--doc-text)",opacity:t?.6:1,transition:"background-color 0.15s, border-color 0.15s",...r};return jsxRuntime.jsxs("button",{className:`docx-print-button ${i}`.trim(),style:c,onClick:e,disabled:t,"aria-label":l,title:l,children:[n&&jsxRuntime.jsx(ir,{size:s?14:16}),!s&&jsxRuntime.jsx("span",{children:l})]})}function nr(){return jsxRuntime.jsx("style",{children:`
7
+ @media print {
8
+ /* Hide everything except print content */
9
+ body * {
10
+ visibility: hidden;
11
+ }
12
+
13
+ .docx-print-pages,
14
+ .docx-print-pages * {
15
+ visibility: visible;
16
+ }
17
+
18
+ .docx-print-pages {
19
+ position: absolute;
20
+ left: 0;
21
+ top: 0;
22
+ }
23
+
24
+ /* Remove shadows and margins in print */
25
+ .docx-print-page {
26
+ box-shadow: none !important;
27
+ margin: 0 !important;
28
+ page-break-after: always;
29
+ page-break-inside: avoid;
30
+ }
31
+
32
+ /* Ensure images print */
33
+ img {
34
+ max-width: 100%;
35
+ page-break-inside: avoid;
36
+ }
37
+
38
+ /* Ensure tables don't break badly */
39
+ table {
40
+ page-break-inside: avoid;
41
+ }
42
+
43
+ tr {
44
+ page-break-inside: avoid;
45
+ }
46
+
47
+ /* Keep headings with content */
48
+ h1, h2, h3, h4, h5, h6 {
49
+ page-break-after: avoid;
50
+ }
51
+
52
+ /* Avoid orphan lines */
53
+ p {
54
+ orphans: 3;
55
+ widows: 3;
56
+ }
57
+ }
58
+
59
+ @page {
60
+ margin: 0;
61
+ size: auto;
62
+ }
63
+ `})}function ir({size:e=18}){return jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("polyline",{points:"6 9 6 2 18 2 18 9"}),jsxRuntime.jsx("path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"}),jsxRuntime.jsx("rect",{x:"6",y:"14",width:"12",height:"8"})]})}function sr(){window.print();}function ar(e="Document",t){let o=window.open("","_blank");return o?(o.document.write(`
64
+ <!DOCTYPE html>
65
+ <html>
66
+ <head>
67
+ <title>${e}</title>
68
+ <style>
69
+ @media print {
70
+ body {
71
+ margin: 0;
72
+ padding: 0;
73
+ }
74
+ @page {
75
+ margin: 0;
76
+ }
77
+ }
78
+ </style>
79
+ </head>
80
+ <body>
81
+ ${t}
82
+ </body>
83
+ </html>
84
+ `),o.document.close(),o):null}function lr(){return {...or}}function cr(e,t){if(!e||!e.trim())return null;let o=e.trim();if(/^\d+$/.test(o)){let r=parseInt(o,10);return r>=1&&r<=t?{start:r,end:r}:null}let i=o.match(/^(\d+)-(\d+)$/);if(i){let r=parseInt(i[1],10),n=parseInt(i[2],10);return r>=1&&n<=t&&r<=n?{start:r,end:n}:null}return null}function dr(e,t){return e?e.start===e.end?`Page ${e.start}`:`Pages ${e.start}-${e.end}`:`All (${t} pages)`}function pr(){return typeof window<"u"&&typeof window.print=="function"}function ur({onAction:e,disabled:t=false,canMerge:o=false,canSplit:i=false}){let{t:r}=chunkGNIO6SOS_js.b(),n=Kr.useCallback(p=>{p.preventDefault(),p.stopPropagation();},[]),s=Kr.useCallback(()=>{o&&e("mergeCells");},[e,o]),a=Kr.useCallback(()=>{i&&e("splitCell");},[e,i]),l=jsxRuntime.jsx(chunkPBA4ERQP_js.o,{content:r("table.mergeCells"),children:jsxRuntime.jsx(chunkPBA4ERQP_js.b,{variant:"ghost",size:"icon-sm",className:chunkPBA4ERQP_js.a("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",(t||!o)&&"opacity-30 cursor-not-allowed"),onMouseDown:n,onClick:s,disabled:t||!o,"aria-label":r("table.mergeCells"),"data-testid":"toolbar-table-merge",children:jsxRuntime.jsx(chunkUZLKRJJK_js.b,{name:"call_merge",size:20})})}),c=jsxRuntime.jsx(chunkPBA4ERQP_js.o,{content:r("table.splitCell"),children:jsxRuntime.jsx(chunkPBA4ERQP_js.b,{variant:"ghost",size:"icon-sm",className:chunkPBA4ERQP_js.a("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",(t||!i)&&"opacity-30 cursor-not-allowed"),onMouseDown:n,onClick:a,disabled:t||!i,"aria-label":r("table.splitCell"),"data-testid":"toolbar-table-split",children:jsxRuntime.jsx(chunkUZLKRJJK_js.b,{name:"call_split",size:20})})});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l,c]})}var xr=[{action:"addRowAbove",icon:"keyboard_arrow_up",labelKey:"table.insertRowAbove",testId:"toolbar-table-add-row-above"},{action:"addRowBelow",icon:"keyboard_arrow_down",labelKey:"table.insertRowBelow",testId:"toolbar-table-add-row-below"},{action:"addColumnLeft",icon:"keyboard_arrow_left",labelKey:"table.insertColumnLeft",testId:"toolbar-table-add-col-left"},{action:"addColumnRight",icon:"keyboard_arrow_right",labelKey:"table.insertColumnRight",testId:"toolbar-table-add-col-right"}];function fr({onAction:e,disabled:t=false}){let{t:o}=chunkGNIO6SOS_js.b(),i=Kr.useCallback(r=>{r.preventDefault(),r.stopPropagation();},[]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:xr.map(({action:r,icon:n,labelKey:s,testId:a})=>{let l=o(s);return jsxRuntime.jsx(chunkPBA4ERQP_js.o,{content:l,children:jsxRuntime.jsx(chunkPBA4ERQP_js.b,{variant:"ghost",size:"icon-sm",className:chunkPBA4ERQP_js.a("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",t&&"opacity-30 cursor-not-allowed"),onMouseDown:i,onClick:()=>!t&&e(r),disabled:t,"aria-label":l,"data-testid":a,children:jsxRuntime.jsx(chunkUZLKRJJK_js.b,{name:n,size:20})})},typeof r=="string"?r:r.type)})})}var yr="var(--doc-error)",hr="var(--doc-success)",Sr=({size:e=16})=>jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M3 2h8l2 2v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3a1 1 0 011-1z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M5 2v4h5V2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M5 14v-4h6v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),wr=({size:e=16})=>jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M8 5v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"8",cy:"11",r:"0.5",fill:"currentColor"})]}),Cr=`
85
+ @keyframes docx-unsaved-pulse {
86
+ 0%, 100% { opacity: 1; }
87
+ 50% { opacity: 0.6; }
88
+ }
89
+ `,Tr=(e,t,o,i,r,n,s)=>{let a={display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",animation:o&&i?"docx-unsaved-pulse 2s ease-in-out infinite":"none"};switch(t==="absolute-top-right"?(a.position="absolute",a.top="4px",a.right="4px"):t==="absolute-top-left"&&(a.position="absolute",a.top="4px",a.left="4px"),e){case "dot":return {...a,width:`${s}px`,height:`${s}px`,borderRadius:"50%",backgroundColor:o?r:n};case "badge":return {...a,padding:"2px 8px",borderRadius:"10px",fontSize:"11px",fontWeight:500,backgroundColor:o?r:n,color:"white"};case "text":return {...a,fontSize:"12px",color:o?r:n,fontWeight:500};case "icon":return {...a,color:o?r:n};default:return a}},kr=({hasUnsavedChanges:e,variant:t="dot",position:o="inline",showPulse:i=true,label:r,savedLabel:n,showWhenSaved:s=false,unsavedColor:a=yr,savedColor:l=hr,size:c=8,className:p="",style:g,onClick:d,title:m})=>{let{t:x}=chunkGNIO6SOS_js.b(),b=r??x("unsaved.unsaved"),f=n??x("unsaved.saved");if(Kr.useEffect(()=>{if(!i||!e)return;let I="docx-unsaved-pulse-keyframes";if(!document.getElementById(I)){let P=document.createElement("style");P.id=I,P.textContent=Cr,document.head.appendChild(P);}},[i,e]),!e&&!s)return null;let T={...Tr(t,o,e,i,a,l,c),...g,cursor:d?"pointer":void 0},u=x(e?"unsaved.unsavedTitle":"unsaved.savedTitle"),h=()=>{switch(t){case "dot":return null;case "badge":return e?b:f;case "text":return e?b:f;case "icon":return e?jsxRuntime.jsx(wr,{size:c}):jsxRuntime.jsx(Sr,{size:c});default:return null}};return jsxRuntime.jsx("span",{className:`docx-unsaved-indicator docx-unsaved-indicator-${t} ${e?"docx-unsaved":"docx-saved"} ${p}`,style:T,onClick:d,title:m??u,role:d?"button":"status","aria-label":x(e?"unsaved.unsavedAriaLabel":"unsaved.savedAriaLabel"),children:h()})};function Ir(e={}){let{t}=chunkGNIO6SOS_js.b(),{document:o,warnBeforeLeave:i=true,warningMessage:r=t("errors.unsavedChanges"),enabled:n=true,onChangeStatusChange:s}=e,[a,l]=Kr.useState(false),[c,p]=Kr.useState(0),[g,d]=Kr.useState(null),m=Kr.useRef(null),x=Kr.useRef(false),b=Kr.useCallback(u=>{if(!u)return null;try{return JSON.stringify(u.package)}catch{return null}},[]),f=Kr.useCallback(()=>{n&&(l(false),p(0),d(o??null),m.current=b(o));},[n,o,b]),k=Kr.useCallback(()=>{n&&(a||(l(true),s?.(true)),p(u=>u+1));},[n,a,s]),T=Kr.useCallback(u=>{let h=u!==void 0?u:o;l(false),p(0),d(h??null),m.current=b(h),x.current=true;},[o,b]);return Kr.useEffect(()=>{!n||!o||x.current||T(o);},[n,o,T]),Kr.useEffect(()=>{if(!n||!o||!x.current)return;let u=b(o),h=m.current;if(u!==h){let I=b(g);u!==I?(a||(l(true),s?.(true)),p(P=>P+1)):a&&(l(false),s?.(false)),m.current=u;}},[n,o,g,a,b,s]),Kr.useEffect(()=>{if(!n||!i||!a)return;let u=h=>(h.preventDefault(),h.returnValue=r,r);return window.addEventListener("beforeunload",u),()=>window.removeEventListener("beforeunload",u)},[n,i,a,r]),{hasUnsavedChanges:a,markAsSaved:f,markAsChanged:k,resetTracking:T,lastSavedDocument:g,changeCount:c}}function Pr(e){return {dot:"Dot",badge:"Badge",text:"Text",icon:"Icon"}[e]}function Lr(){return ["dot","badge","text","icon"]}function Rr(){return ["inline","absolute-top-right","absolute-top-left"]}function Er(){let e=0,t=null,o=false;return {markChanged:()=>{e++,o=true;},markSaved:()=>{o=false,t=new Date;},getState:()=>({changeCount:e,lastSaveTime:t,hasUnsavedChanges:o}),reset:()=>{e=0,t=null,o=false;}}}var Dr={small:{size:16,strokeWidth:2,fontSize:11},medium:{size:32,strokeWidth:3,fontSize:13},large:{size:48,strokeWidth:4,fontSize:14}},Ar="var(--doc-primary)",Mr=300,Or=`
90
+ @keyframes docx-loading-spin {
91
+ 0% { transform: rotate(0deg); }
92
+ 100% { transform: rotate(360deg); }
93
+ }
94
+
95
+ @keyframes docx-loading-pulse {
96
+ 0%, 100% { opacity: 1; transform: scale(1); }
97
+ 50% { opacity: 0.5; transform: scale(0.95); }
98
+ }
99
+
100
+ @keyframes docx-loading-dots {
101
+ 0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
102
+ 40% { transform: scale(1); opacity: 1; }
103
+ }
104
+
105
+ @keyframes docx-loading-bar {
106
+ 0% { left: -35%; right: 100%; }
107
+ 60% { left: 100%; right: -90%; }
108
+ 100% { left: 100%; right: -90%; }
109
+ }
110
+ `,_r=({size:e,strokeWidth:t,color:o})=>{let i=(e-t)/2,r=i*2*Math.PI;return jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,style:{animation:"docx-loading-spin 1s linear infinite"},children:[jsxRuntime.jsx("circle",{cx:e/2,cy:e/2,r:i,fill:"none",stroke:o,strokeWidth:t,strokeLinecap:"round",strokeDasharray:`${r*.75} ${r}`,opacity:.25}),jsxRuntime.jsx("circle",{cx:e/2,cy:e/2,r:i,fill:"none",stroke:o,strokeWidth:t,strokeLinecap:"round",strokeDasharray:`${r*.25} ${r}`,transform:`rotate(-90 ${e/2} ${e/2})`})]})},Br=({size:e,color:t})=>{let o=e/4,i=o/2;return jsxRuntime.jsx("div",{style:{display:"flex",gap:`${i}px`},children:[0,1,2].map(r=>jsxRuntime.jsx("div",{style:{width:o,height:o,borderRadius:"50%",backgroundColor:t,animation:`docx-loading-dots 1.4s ease-in-out ${r*.16}s infinite both`}},r))})},Nr=({size:e,color:t})=>jsxRuntime.jsx("div",{style:{width:e*3,height:e/4,backgroundColor:`${t}20`,borderRadius:e/8,overflow:"hidden",position:"relative"},children:jsxRuntime.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:t,borderRadius:e/8,animation:"docx-loading-bar 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"}})}),zr=({size:e,color:t})=>jsxRuntime.jsx("div",{style:{width:e,height:e,borderRadius:"50%",backgroundColor:t,animation:"docx-loading-pulse 1.5s ease-in-out infinite"}}),Wr=({size:e,color:t,progress:o,showText:i,fontSize:r})=>{let n=Math.max(0,Math.min(100,o));return jsxRuntime.jsxs("div",{style:{width:e*3,height:e/4,backgroundColor:`${t}20`,borderRadius:e/8,overflow:"hidden",position:"relative"},children:[jsxRuntime.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,width:`${n}%`,backgroundColor:t,borderRadius:e/8,transition:"width 0.3s ease"}}),i&&jsxRuntime.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r,fontWeight:500,color:n>50?"#fff":t},children:[Math.round(n),"%"]})]})},Yr=({isLoading:e,variant:t="spinner",size:o="medium",message:i,overlay:r=false,overlayOpacity:n=.5,progress:s=0,showProgressText:a=true,color:l=Ar,className:c="",style:p})=>{let{t:g}=chunkGNIO6SOS_js.b(),d=Dr[o];if(Kr.useEffect(()=>{let b="docx-loading-keyframes";if(!document.getElementById(b)){let f=document.createElement("style");f.id=b,f.textContent=Or,document.head.appendChild(f);}},[]),!e)return null;let m=()=>{switch(t){case "spinner":return jsxRuntime.jsx(_r,{size:d.size,strokeWidth:d.strokeWidth,color:l});case "dots":return jsxRuntime.jsx(Br,{size:d.size,color:l});case "bar":return jsxRuntime.jsx(Nr,{size:d.size,color:l});case "pulse":return jsxRuntime.jsx(zr,{size:d.size,color:l});case "progress":return jsxRuntime.jsx(Wr,{size:d.size,color:l,progress:s,showText:a,fontSize:d.fontSize});default:return null}},x=jsxRuntime.jsxs("div",{className:`docx-loading-content ${c}`,style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12px",...p},children:[m(),i&&jsxRuntime.jsx("div",{style:{fontSize:d.fontSize,color:r?"white":"var(--doc-text-muted)",textAlign:"center"},children:i})]});return r?jsxRuntime.jsx("div",{className:`docx-loading-overlay ${c}`,style:{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`rgba(0, 0, 0, ${n})`,zIndex:1e4,...p},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t==="progress"?s:void 0,"aria-busy":"true","aria-label":i||g("loading.label"),children:x}):jsxRuntime.jsx("div",{className:`docx-loading-inline ${c}`,style:{display:"inline-flex",alignItems:"center",...p},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t==="progress"?s:void 0,"aria-busy":"true","aria-label":i||"Loading",children:x})};function Ur(e={}){let{initialLoading:t=false,minDuration:o=Mr,onStart:i,onEnd:r}=e,[n,s]=Kr.useState(t),[a,l]=Kr.useState(null),[c,p]=Kr.useState(0),g=Kr.useRef(null),d=Kr.useRef(null),m=Kr.useCallback(f=>{g.current=Date.now(),s(true),l(f||null),p(0),i?.();},[i]),x=Kr.useCallback(()=>{let f=g.current,k=Date.now(),T=f?k-f:0,u=Math.max(0,o-T);u>0?d.current=setTimeout(()=>{s(false),l(null),p(0),g.current=null,r?.();},u):(s(false),l(null),p(0),g.current=null,r?.());},[o,r]),b=Kr.useCallback(async(f,k)=>{m(k);try{let T=await f();return x(),T}catch(T){throw x(),T}},[m,x]);return Kr.useEffect(()=>()=>{d.current&&clearTimeout(d.current);},[]),{isLoading:n,message:a,progress:c,startLoading:m,stopLoading:x,setProgress:p,setMessage:l,withLoading:b}}function Fr(){let[e,t]=Kr.useState(new Map),o=Kr.useCallback((a,l)=>{t(c=>{let p=new Map(c);return p.set(a,{id:a,message:l,startTime:Date.now()}),p});},[]),i=Kr.useCallback((a,l)=>{t(c=>{let p=c.get(a);if(!p)return c;let g=new Map(c);return g.set(a,{...p,...l}),g});},[]),r=Kr.useCallback(a=>{t(l=>{let c=new Map(l);return c.delete(a),c});},[]),n=e.size>0;return {operations:Array.from(e.values()),isAnyLoading:n,startOperation:o,updateOperation:i,endOperation:r,getOperation:a=>e.get(a)}}function Vr(e){return {spinner:"Spinner",dots:"Dots",bar:"Bar",pulse:"Pulse",progress:"Progress"}[e]}function $r(){return ["spinner","dots","bar","pulse","progress"]}function Gr(){return ["small","medium","large"]}function Hr(e){return new Promise(t=>setTimeout(t,e))}var Xe=4,Qe=36,Xr=32,Qr=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"3",cy:"8",r:"1.5",fill:"currentColor"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),jsxRuntime.jsx("circle",{cx:"13",cy:"8",r:"1.5",fill:"currentColor"})]});function Je(e){let{containerRef:t,items:o,itemGap:i=Xe,overflowButtonWidth:r=Qe}=e,[n,s]=Kr.useState(o.length),a=Kr.useRef(new Map),l=Kr.useCallback(()=>{let g=t.current;if(!g){s(o.length);return}let d=g.offsetWidth;if(d===0)return;let m=[...o].sort((f,k)=>f.alwaysVisible&&!k.alwaysVisible?-1:!f.alwaysVisible&&k.alwaysVisible?1:(f.priority||3)-(k.priority||3)),x=0,b=0;for(let f of m){let T=(f.minWidth||a.current.get(f.id)||Xr)+(b>0?i:0),u=b<o.length-1?r+i:0;if(x+T+u<=d)x+=T,b++;else if(f.alwaysVisible)x+=T,b++;else break}s(Math.max(0,b));},[t,o,i,r]);Kr.useLayoutEffect(()=>{let g=t.current;if(!g)return;l();let d=new ResizeObserver(()=>{l();});return d.observe(g),()=>{d.disconnect();}},[t,l]),Kr.useEffect(()=>{l();},[o,l]);let{visibleItems:c,overflowItems:p}=Kr.useMemo(()=>{let g=[...o].sort((d,m)=>d.alwaysVisible&&!m.alwaysVisible?-1:!d.alwaysVisible&&m.alwaysVisible?1:(d.priority||3)-(m.priority||3));return {visibleItems:g.slice(0,n),overflowItems:g.slice(n)}},[o,n]);return {visibleItems:c,overflowItems:p,hasOverflow:p.length>0,recalculate:l}}var Jr=({items:e,isOpen:t,onClose:o,anchorRef:i})=>{let r=Kr.useRef(null);return Kr.useEffect(()=>{if(!t)return;let n=s=>{r.current&&!r.current.contains(s.target)&&i.current&&!i.current.contains(s.target)&&o();};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[t,o,i]),Kr.useEffect(()=>{if(!t)return;let n=s=>{s.key==="Escape"&&o();};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t,o]),!t||e.length===0?null:jsxRuntime.jsx("div",{ref:r,className:"docx-responsive-toolbar-overflow-menu",style:{position:"absolute",top:"100%",right:0,marginTop:"4px",backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",padding:"8px",zIndex:1e3,display:"flex",flexWrap:"wrap",gap:"4px",maxWidth:"300px"},role:"menu",children:e.map(n=>jsxRuntime.jsx("div",{className:"docx-responsive-toolbar-overflow-item",role:"menuitem",children:n.content},n.id))})},qr=({items:e,overflowItems:t=[],alwaysShowOverflow:o=false,renderOverflowButton:i,renderOverflowMenu:r,itemGap:n=Xe,padding:s="8px 12px",overflowButtonWidth:a=Qe,className:l="",style:c,height:p=44,backgroundColor:g="var(--doc-toolbar-bg)",borderBottom:d="1px solid var(--doc-border)"})=>{let m=Kr.useRef(null),x=Kr.useRef(null),[b,f]=Kr.useState(false),{visibleItems:k,overflowItems:T,hasOverflow:u}=Je({containerRef:m,items:e,itemGap:n,overflowButtonWidth:a}),h=[...T,...t],I=u||o||t.length>0,P=Kr.useCallback(()=>{f(E=>!E);},[]),_=Kr.useCallback(()=>{f(false);},[]),R=jsxRuntime.jsx("button",{ref:x,type:"button",className:"docx-responsive-toolbar-overflow-button",onClick:P,"aria-label":`Show ${h.length} more options`,"aria-expanded":b,"aria-haspopup":"menu",style:{display:"flex",alignItems:"center",justifyContent:"center",width:`${a}px`,height:"32px",border:"none",borderRadius:"4px",backgroundColor:b?"var(--doc-primary-light)":"transparent",color:"var(--doc-text-muted)",cursor:"pointer",transition:"background-color 0.15s ease"},children:jsxRuntime.jsx(Qr,{})});return jsxRuntime.jsxs("div",{ref:m,className:`docx-responsive-toolbar ${l}`,style:{display:"flex",alignItems:"center",gap:`${n}px`,height:typeof p=="number"?`${p}px`:p,padding:s,backgroundColor:g,borderBottom:d,position:"relative",...c},children:[k.map(E=>jsxRuntime.jsxs(Kr__default.default.Fragment,{children:[jsxRuntime.jsx("div",{className:"docx-responsive-toolbar-item","data-item-id":E.id,style:{flexShrink:0},children:E.content}),E.separatorAfter&&jsxRuntime.jsx("div",{className:"docx-responsive-toolbar-separator",style:{width:"1px",height:"24px",backgroundColor:"var(--doc-border)",margin:"0 4px"}})]},E.id)),I&&jsxRuntime.jsx("div",{style:{flex:1,minWidth:0}}),I&&jsxRuntime.jsxs("div",{style:{position:"relative",flexShrink:0},children:[i?i(h.length,b,P):R,r?b&&r(h,_):jsxRuntime.jsx(Jr,{items:h,isOpen:b,onClose:_,anchorRef:x})]})]})},en=({children:e,gap:t=2,separatorAfter:o=false,className:i="",style:r})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:`docx-toolbar-group ${i}`,style:{display:"flex",alignItems:"center",gap:`${t}px`,...r},children:e}),o&&jsxRuntime.jsx("div",{className:"docx-toolbar-group-separator",style:{width:"1px",height:"24px",backgroundColor:"var(--doc-border)",margin:"0 4px"}})]});function tn(e,t,o){return {id:e,content:t,priority:3,...o}}function on(e){return e.map(t=>({...t,priority:t.priority||3}))}function rn(e){return {undo:1,redo:1,bold:1,italic:1,underline:2,fontFamily:2,fontSize:2,textColor:3,highlightColor:3,alignment:3,lists:4,indent:4,lineSpacing:5,styles:5}[e]||3}var an={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},ln={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"320px",maxWidth:"400px",width:"100%",margin:"20px"},cn={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},dn={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},pn={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},un={padding:"20px"},gn={display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"16px"},mn={display:"grid",gap:"2px",padding:"4px",backgroundColor:"var(--doc-bg-hover)",borderRadius:"4px",cursor:"pointer"},nt={width:"24px",height:"24px",backgroundColor:"white",border:"1px solid var(--doc-border-dark)",borderRadius:"2px",transition:"background-color 0.1s, border-color 0.1s"},bn={...nt,backgroundColor:"var(--doc-primary)",borderColor:"var(--doc-primary)"},xn={marginTop:"8px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},fn={display:"flex",alignItems:"center",gap:"12px",margin:"16px 0",color:"var(--doc-text-muted)",fontSize:"12px"},et={flex:1,height:"1px",backgroundColor:"var(--doc-border)"},tt={display:"flex",alignItems:"center",gap:"12px",marginBottom:"12px"},ot={fontSize:"14px",fontWeight:500,color:"var(--doc-text)",minWidth:"80px"},rt={width:"80px",padding:"8px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",textAlign:"center"},vn={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},Ee={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},yn={...Ee,backgroundColor:"var(--doc-primary)",color:"white"},hn={...Ee,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},Sn={...Ee,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function wn(){return jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"16",height:"16",stroke:"currentColor",strokeWidth:"1.5",fill:"none",rx:"1"}),jsxRuntime.jsx("line",{x1:"2",y1:"7",x2:"18",y2:"7",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("line",{x1:"2",y1:"12",x2:"18",y2:"12",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"18",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("line",{x1:"13",y1:"2",x2:"13",y2:"18",stroke:"currentColor",strokeWidth:"1.5"})]})}function Cn({isOpen:e,onClose:t,onInsert:o,maxGridRows:i=8,maxGridColumns:r=10,maxRows:n=100,maxColumns:s=20,className:a,style:l}){let{t:c}=chunkGNIO6SOS_js.b(),[p,g]=Kr.useState(0),[d,m]=Kr.useState(0),[x,b]=Kr.useState(3),[f,k]=Kr.useState(3),T=Kr.useRef(null);Kr.useEffect(()=>{e&&(g(0),m(0),b(3),k(3));},[e]),Kr.useEffect(()=>{e&&T.current?.focus();},[e]);let u=Kr.useCallback((C,D)=>{g(C),m(D);},[]),h=Kr.useCallback(()=>{p>0&&d>0&&o({rows:p,columns:d});},[p,d,o]),I=Kr.useCallback(()=>{let C=Math.min(Math.max(1,x),n),D=Math.min(Math.max(1,f),s);o({rows:C,columns:D});},[x,f,n,s,o]),P=Kr.useCallback(C=>{C.key==="Escape"?t():C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),I());},[t,I]),_=Kr.useCallback(C=>{C.target===C.currentTarget&&t();},[t]),R=Kr.useCallback(C=>{let D=parseInt(C.target.value,10);isNaN(D)?C.target.value===""&&b(1):b(Math.min(Math.max(1,D),n));},[n]),E=Kr.useCallback(C=>{let D=parseInt(C.target.value,10);isNaN(D)?C.target.value===""&&k(1):k(Math.min(Math.max(1,D),s));},[s]);if(!e)return null;let G=[];for(let C=1;C<=i;C++)for(let D=1;D<=r;D++){let H=C<=p&&D<=d;G.push(jsxRuntime.jsx("div",{style:H?bn:nt,onMouseEnter:()=>u(C,D),onClick:h,role:"gridcell","aria-selected":H},`${C}-${D}`));}let q=x>=1&&f>=1,v=p>0&&d>0?c("dialogs.insertTable.tableSize",{cols:d,rows:p}):c("dialogs.insertTable.hoverToSelect");return jsxRuntime.jsx("div",{className:`docx-insert-table-dialog-overlay ${a||""}`,style:{...an,...l},onClick:_,onKeyDown:P,role:"dialog","aria-modal":"true","aria-labelledby":"insert-table-dialog-title",children:jsxRuntime.jsxs("div",{ref:T,className:"docx-insert-table-dialog",style:ln,tabIndex:-1,children:[jsxRuntime.jsxs("div",{className:"docx-insert-table-dialog-header",style:cn,children:[jsxRuntime.jsx("h2",{id:"insert-table-dialog-title",style:dn,children:jsxRuntime.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[jsxRuntime.jsx(wn,{}),c("dialogs.insertTable.title")]})}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-table-dialog-close",style:pn,onClick:t,"aria-label":c("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-dialog-body",style:un,children:[jsxRuntime.jsxs("div",{className:"docx-insert-table-grid-container",style:gn,children:[jsxRuntime.jsx("div",{className:"docx-insert-table-grid",style:{...mn,gridTemplateColumns:`repeat(${r}, 1fr)`},onMouseLeave:()=>{g(0),m(0);},role:"grid","aria-label":"Table size selector",children:G}),jsxRuntime.jsx("div",{className:"docx-insert-table-grid-label",style:xn,children:v})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-separator",style:fn,children:[jsxRuntime.jsx("div",{style:et}),jsxRuntime.jsx("span",{children:c("dialogs.insertTable.orSpecifySize")}),jsxRuntime.jsx("div",{style:et})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-inputs",children:[jsxRuntime.jsxs("div",{style:tt,children:[jsxRuntime.jsx("label",{htmlFor:"insert-table-rows",style:ot,children:c("dialogs.insertTable.rowsLabel")}),jsxRuntime.jsx("input",{id:"insert-table-rows",type:"number",min:1,max:n,value:x,onChange:R,style:rt})]}),jsxRuntime.jsxs("div",{style:tt,children:[jsxRuntime.jsx("label",{htmlFor:"insert-table-cols",style:ot,children:c("dialogs.insertTable.columnsLabel")}),jsxRuntime.jsx("input",{id:"insert-table-cols",type:"number",min:1,max:s,value:f,onChange:E,style:rt})]})]})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-dialog-footer",style:vn,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-insert-table-dialog-cancel",style:hn,onClick:t,children:c("common.cancel")}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-table-dialog-insert",style:q?yn:Sn,onClick:I,disabled:!q,children:c("dialogs.insertTable.insertButton")})]})]})})}function Tn(){let[e,t]=Kr.useState(false),o=Kr.useCallback(()=>t(true),[]),i=Kr.useCallback(()=>t(false),[]),r=Kr.useCallback(()=>t(n=>!n),[]);return {isOpen:e,open:o,close:i,toggle:r}}function kn(e=3,t=3){return {rows:e,columns:t}}function In(e,t=100,o=20){return e.rows>=1&&e.rows<=t&&e.columns>=1&&e.columns<=o}function Pn(e,t=100,o=20){return {rows:Math.min(Math.max(1,e.rows),t),columns:Math.min(Math.max(1,e.columns),o)}}function Ln(e){return `${e.columns} x ${e.rows}`}function Rn(){return [{label:"2 x 2",config:{rows:2,columns:2}},{label:"3 x 3",config:{rows:3,columns:3}},{label:"4 x 4",config:{rows:4,columns:4}},{label:"2 x 4",config:{rows:2,columns:4}},{label:"4 x 2",config:{rows:4,columns:2}},{label:"5 x 5",config:{rows:5,columns:5}}]}var Dn={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},An={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"450px",maxWidth:"600px",width:"100%",margin:"20px",maxHeight:"90vh",overflow:"auto"},Mn={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},On={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},_n={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},Bn={padding:"20px"},De={border:"2px dashed var(--doc-border-input)",borderRadius:"8px",padding:"40px 20px",textAlign:"center",cursor:"pointer",transition:"border-color 0.2s, background-color 0.2s",marginBottom:"16px"},Nn={...De,borderColor:"var(--doc-primary)",backgroundColor:"var(--doc-primary-light)"},zn={...De,padding:"20px",borderStyle:"solid",borderColor:"var(--doc-primary)"},Wn={display:"flex",justifyContent:"center",alignItems:"center",maxHeight:"250px",overflow:"hidden"},Yn={maxWidth:"100%",maxHeight:"250px",objectFit:"contain",borderRadius:"4px"},Un={fontSize:"48px",color:"var(--doc-text-placeholder)",marginBottom:"12px"},Fn={fontSize:"14px",color:"var(--doc-text-muted)",marginBottom:"8px"},Vn={fontSize:"12px",color:"var(--doc-text-placeholder)"},$n={marginBottom:"16px"},Gn={display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},Hn={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",boxSizing:"border-box"},Kn={display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px"},st={width:"100px",padding:"6px 8px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px"},at={display:"inline-flex",alignItems:"center",gap:"6px",fontSize:"14px",color:"var(--doc-text)",fontWeight:500},jn={display:"inline-flex",alignItems:"center",gap:"6px",fontSize:"13px",color:"var(--doc-text-muted)",cursor:"pointer",whiteSpace:"nowrap"},Zn={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},Ae={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},Xn={...Ae,backgroundColor:"var(--doc-primary)",color:"white"},Qn={...Ae,backgroundColor:"var(--doc-bg-subtle)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},Jn={...Ae,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function qn(){return jsxRuntime.jsx("span",{style:{color:"var(--doc-text-placeholder)"},children:jsxRuntime.jsx(chunkUZLKRJJK_js.b,{name:"image",size:48})})}function ei({isOpen:e,onClose:t,onInsert:o,maxWidth:i=800,maxHeight:r=600,accept:n="image/*",className:s,style:a}){let{t:l}=chunkGNIO6SOS_js.b(),[c,p]=Kr.useState(null),[g,d]=Kr.useState(false),{width:m,height:x,lockAspect:b,setLockAspect:f,handleWidthChange:k,handleHeightChange:T,seed:u}=chunkNIBCC7WQ_js.a(),[h,I]=Kr.useState(""),[P,_]=Kr.useState(null),R=Kr.useRef(null),E=Kr.useRef(null);Kr.useEffect(()=>{e&&(p(null),d(false),u(null,null),I(""),_(null));},[e]);let G=Kr.useCallback(w=>{if(!w.type.startsWith("image/")){_(l("dialogs.insertImage.invalidFile"));return}if(w.size>10*1024*1024){_(l("dialogs.insertImage.fileTooLarge"));return}_(null);let K=new FileReader;K.onload=bt=>{let _e=bt.target?.result,me=new Image;me.onload=()=>{let ee=me.width,te=me.height;if(ee>i||te>r){let xt=i/ee,ft=r/te,Be=Math.min(xt,ft);ee=Math.round(ee*Be),te=Math.round(te*Be);}u(ee,te),p({src:_e,width:ee,height:te,fileName:w.name,mimeType:w.type});},me.src=_e;},K.onerror=()=>{_("Failed to read image file");},K.readAsDataURL(w);},[i,r]),q=Kr.useCallback(w=>{let K=w.target.files?.[0];K&&G(K);},[G]),v=Kr.useCallback(()=>{R.current?.click();},[]),C=Kr.useCallback(w=>{w.preventDefault(),d(true);},[]),D=Kr.useCallback(w=>{w.preventDefault(),d(false);},[]),H=Kr.useCallback(w=>{w.preventDefault(),d(false);let K=w.dataTransfer.files?.[0];K&&G(K);},[G]),we=Kr.useCallback(()=>{c&&typeof m=="number"&&typeof x=="number"&&o({...c,width:m,height:x,alt:h||void 0});},[c,m,x,h,o]),pt=Kr.useCallback(w=>{w.key==="Escape"?t():w.key==="Enter"&&c&&!w.shiftKey&&(w.preventDefault(),we());},[t,c,we]),ut=Kr.useCallback(w=>{w.target===w.currentTarget&&t();},[t]),gt=Kr.useCallback(()=>{p(null),u(null,null),I(""),_(null),R.current&&(R.current.value="");},[u]);if(!e)return null;let Oe=c!==null&&typeof m=="number"&&m>0&&typeof x=="number"&&x>0,mt=()=>c?zn:g?Nn:De;return jsxRuntime.jsx("div",{className:`docx-insert-image-dialog-overlay ${s||""}`,style:{...Dn,...a},onClick:ut,onKeyDown:pt,role:"dialog","aria-modal":"true","aria-labelledby":"insert-image-dialog-title",children:jsxRuntime.jsxs("div",{ref:E,className:"docx-insert-image-dialog",style:An,tabIndex:-1,children:[jsxRuntime.jsxs("div",{className:"docx-insert-image-dialog-header",style:Mn,children:[jsxRuntime.jsx("h2",{id:"insert-image-dialog-title",style:On,children:l("dialogs.insertImage.title")}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-image-dialog-close",style:_n,onClick:t,"aria-label":l("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-insert-image-dialog-body",style:Bn,children:[jsxRuntime.jsx("input",{ref:R,type:"file",accept:n,onChange:q,style:{display:"none"}}),jsxRuntime.jsx("div",{className:"docx-insert-image-dropzone",style:mt(),onClick:v,onDragOver:C,onDragLeave:D,onDrop:H,role:"button",tabIndex:0,"aria-label":l("dialogs.insertImage.uploadAriaLabel"),children:c?jsxRuntime.jsx("div",{style:Wn,children:jsxRuntime.jsx("img",{src:c.src,alt:h||"Preview",style:Yn})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:Un,children:jsxRuntime.jsx(qn,{})}),jsxRuntime.jsx("div",{style:Fn,children:l("dialogs.insertImage.uploadText")}),jsxRuntime.jsx("div",{style:Vn,children:l("dialogs.insertImage.uploadSubtext")})]})}),P&&jsxRuntime.jsx("div",{style:{color:"var(--doc-error)",fontSize:"14px",marginBottom:"16px",textAlign:"center"},children:P}),c&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{style:Kn,children:[jsxRuntime.jsxs("label",{style:at,children:[l("dialogs.insertImage.widthLabel"),jsxRuntime.jsx("input",{type:"number",value:m,onChange:w=>k(w.target.value),min:1,max:i,style:st})]}),jsxRuntime.jsxs("label",{style:at,children:[l("dialogs.insertImage.heightLabel"),jsxRuntime.jsx("input",{type:"number",value:x,onChange:w=>T(w.target.value),min:1,max:r,style:st})]}),jsxRuntime.jsxs("label",{style:jn,children:[jsxRuntime.jsx("input",{type:"checkbox",checked:b,onChange:w=>f(w.target.checked)}),l(b?"dialogs.insertImage.aspectRatioLocked":"dialogs.insertImage.aspectRatioUnlocked")]})]}),jsxRuntime.jsxs("div",{style:$n,children:[jsxRuntime.jsx("label",{htmlFor:"insert-image-alt",style:Gn,children:l("dialogs.insertImage.altTextLabel")}),jsxRuntime.jsx("input",{id:"insert-image-alt",type:"text",value:h,onChange:w=>I(w.target.value),placeholder:l("dialogs.insertImage.altTextPlaceholder"),style:Hn})]})]})]}),jsxRuntime.jsxs("div",{className:"docx-insert-image-dialog-footer",style:Zn,children:[(()=>{let w=c!==null;return jsxRuntime.jsx("button",{type:"button",className:"docx-insert-image-dialog-clear",style:Qn,onClick:w?gt:t,children:l(w?"common.clear":"common.cancel")})})(),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-image-dialog-insert",style:Oe?Xn:Jn,onClick:we,disabled:!Oe,children:l("dialogs.insertImage.insertButton")})]})]})})}function ti(){let[e,t]=Kr.useState(false),o=Kr.useCallback(()=>t(true),[]),i=Kr.useCallback(()=>t(false),[]),r=Kr.useCallback(()=>t(n=>!n),[]);return {isOpen:e,open:o,close:i,toggle:r}}function oi(e){return e.type.startsWith("image/")}function ri(){return [".png",".jpg",".jpeg",".gif",".webp",".bmp",".svg"]}function ni(){return "image/png,image/jpeg,image/gif,image/webp,image/bmp,image/svg+xml"}function ii(e,t,o,i){if(e<=o&&t<=i)return {width:e,height:t};let r=o/e,n=i/t,s=Math.min(r,n);return {width:Math.round(e*s),height:Math.round(t*s)}}function si(e){let t=e.split(","),o=t[0].match(/:(.*?);/)?.[1]||"image/png",i=atob(t[1]),r=new Uint8Array(i.length);for(let n=0;n<i.length;n++)r[n]=i.charCodeAt(n);return new Blob([r],{type:o})}function ai(e){return new Promise((t,o)=>{let i=new Image;i.onload=()=>t({width:i.width,height:i.height}),i.onerror=()=>o(new Error("Failed to load image")),i.src=e;})}function li(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var ui={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},gi={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"450px",maxWidth:"550px",width:"100%",margin:"20px",maxHeight:"80vh",display:"flex",flexDirection:"column"},mi={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},bi={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},xi={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},fi={padding:"20px",flex:1,overflow:"auto"},vi={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",marginBottom:"16px",boxSizing:"border-box"},yi={display:"flex",flexWrap:"wrap",gap:"4px",marginBottom:"16px"},ct={padding:"6px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",backgroundColor:"white",cursor:"pointer",fontSize:"12px",transition:"all 0.15s"},hi={...ct,backgroundColor:"var(--doc-primary)",borderColor:"var(--doc-primary)",color:"white"},Si={display:"grid",gridTemplateColumns:"repeat(10, 1fr)",gap:"4px",maxHeight:"250px",overflow:"auto"},wi={width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--doc-border)",borderRadius:"4px",backgroundColor:"white",cursor:"pointer",fontSize:"18px",transition:"all 0.15s"},Ci={marginTop:"16px",padding:"12px",backgroundColor:"var(--doc-bg-subtle)",borderRadius:"4px",display:"flex",alignItems:"center",gap:"16px"},Ti={fontSize:"36px",width:"60px",height:"60px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white",borderRadius:"4px",border:"1px solid var(--doc-border)"},ki={flex:1},Ii={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},Me={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},Pi={...Me,backgroundColor:"var(--doc-primary)",color:"white"},Li={...Me,backgroundColor:"var(--doc-bg-subtle)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},Ri={...Me,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"},ae=[{name:"common",label:"Common",symbols:["\xA9","\xAE","\u2122","\u2022","\u2026","\u2014","\u2013","\xB0","\xB1","\xD7","\xF7","\u2260","\u2264","\u2265","\u221E","\u221A","\u2211","\u220F","\u222B","\u03C0","\u20AC","\xA3","\xA5","\xA2","\xA7","\xB6","\u2020","\u2021","\u2030","\u2116"]},{name:"arrows",label:"Arrows",symbols:["\u2190","\u2191","\u2192","\u2193","\u2194","\u2195","\u2196","\u2197","\u2198","\u2199","\u21D0","\u21D1","\u21D2","\u21D3","\u21D4","\u21D5","\u27F5","\u27F6","\u27F7","\u2794","\u279C","\u279E","\u27A1","\u27A2","\u27A3","\u27A4","\u27A5","\u27A6","\u27A7","\u27A8"]},{name:"math",label:"Math",symbols:["+","\u2212","\xD7","\xF7","=","\u2260","<",">","\u2264","\u2265","\xB1","\u2213","\u221E","\u221A","\u221B","\u221C","\u2211","\u220F","\u222B","\u2202","\u2206","\u2207","\u2208","\u2209","\u220B","\u2205","\u2200","\u2203","\u2204","\u2282","\u2283","\u2286","\u2287","\u222A","\u2229","\u2295","\u2297","\u22A5","\u2220","\u221F"]},{name:"greek",label:"Greek",symbols:["\u03B1","\u03B2","\u03B3","\u03B4","\u03B5","\u03B6","\u03B7","\u03B8","\u03B9","\u03BA","\u03BB","\u03BC","\u03BD","\u03BE","\u03BF","\u03C0","\u03C1","\u03C3","\u03C4","\u03C5","\u03C6","\u03C7","\u03C8","\u03C9","\u0391","\u0392","\u0393","\u0394","\u0395","\u0396","\u0397","\u0398","\u0399","\u039A","\u039B","\u039C","\u039D","\u039E","\u039F","\u03A0"]},{name:"shapes",label:"Shapes",symbols:["\u25A0","\u25A1","\u25AA","\u25AB","\u25AC","\u25AD","\u25AE","\u25AF","\u25B0","\u25B1","\u25B2","\u25B3","\u25B4","\u25B5","\u25B6","\u25B7","\u25B8","\u25B9","\u25BA","\u25BB","\u25BC","\u25BD","\u25BE","\u25BF","\u25C0","\u25C1","\u25C2","\u25C3","\u25C4","\u25C5","\u25CF","\u25CB","\u25CE","\u25C9","\u25CC","\u25CD","\u25D0","\u25D1","\u25D2","\u25D3"]},{name:"punctuation",label:"Punctuation",symbols:["\u2013","\u2014","\u2018","\u2019","\u201C","\u201D","\xAB","\xBB","\u2039","\u203A","\u2026","\xB7","\u2022","\u2023","\u2043","\u2010","\u2011","\u2012","\u2015","\u2016","\u2032","\u2033","\u2034","\u2057","\u2035","\u2036","\u2037","\u203B","\u203D","\u2042"]},{name:"currency",label:"Currency",symbols:["$","\xA2","\xA3","\xA4","\xA5","\u20A0","\u20A1","\u20A2","\u20A3","\u20A4","\u20A5","\u20A6","\u20A7","\u20A8","\u20A9","\u20AA","\u20AB","\u20AC","\u20AD","\u20AE","\u20AF","\u20B0","\u20B1","\u20B2","\u20B3","\u20B4","\u20B5","\u20B6","\u20B7","\u20B8"]},{name:"music",label:"Music",symbols:["\u2669","\u266A","\u266B","\u266C","\u266D","\u266E","\u266F","\u{1D11E}","\u{1D122}","\u{1D12A}","\u{1D12B}","\u{1D157}\u{1D165}","\u{1D158}\u{1D165}","\u{1D158}\u{1D165}\u{1D16E}","\u{1D158}\u{1D165}\u{1D16F}","\u{1D158}\u{1D165}\u{1D170}","\u{1D192}","\u{1D193}","\u{1D110}","\u{1D111}"]},{name:"emoji",label:"Emoji",symbols:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A","\u{1F61A}","\u2764","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F494}","\u2763","\u{1F44D}","\u{1F44E}","\u{1F44C}","\u270C","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F44B}","\u{1F64F}","\u2705"]}];function dt(){return ae.flatMap(e=>e.symbols)}function Ei({isOpen:e,onClose:t,onInsert:o,recentSymbols:i=[],className:r,style:n}){let{t:s}=chunkGNIO6SOS_js.b(),[a,l]=Kr.useState("common"),[c,p]=Kr.useState(null),[g,d]=Kr.useState(""),[m,x]=Kr.useState(null),b=Kr.useRef(null);Kr.useEffect(()=>{e&&(p(null),d(""),x(null),setTimeout(()=>b.current?.focus(),100));},[e]);let f=Kr.useMemo(()=>{if(!g.trim())return a==="recent"?i:ae.find(H=>H.name===a)?.symbols||[];let v=g.toLowerCase();return dt().filter(D=>{let H=D.codePointAt(0)?.toString(16).toUpperCase()||"";return D.includes(v)||H.includes(v.toUpperCase())||`U+${H}`.toLowerCase().includes(v)})},[g,a,i]),k=Kr.useCallback(v=>{p(v);},[]),T=Kr.useCallback(v=>{o(v);},[o]),u=Kr.useCallback(()=>{c&&o(c);},[c,o]),h=Kr.useCallback(v=>{v.key==="Escape"?t():v.key==="Enter"&&c&&(v.preventDefault(),u());},[t,c,u]),I=Kr.useCallback(v=>{v.target===v.currentTarget&&t();},[t]),P=v=>{if(!v)return null;let C=v.codePointAt(0);return {character:v,codePoint:C?`U+${C.toString(16).toUpperCase().padStart(4,"0")}`:"",decimal:C||0}};if(!e)return null;let R=P(m||c),E=c!==null,G={common:s("dialogs.insertSymbol.categories.common"),arrows:s("dialogs.insertSymbol.categories.arrows"),math:s("dialogs.insertSymbol.categories.math"),greek:s("dialogs.insertSymbol.categories.greek"),shapes:s("dialogs.insertSymbol.categories.shapes"),punctuation:s("dialogs.insertSymbol.categories.punctuation"),currency:s("dialogs.insertSymbol.categories.currency"),music:s("dialogs.insertSymbol.categories.music"),emoji:s("dialogs.insertSymbol.categories.emoji")},q=[...i.length>0?[{name:"recent",label:"Recent"}]:[],...ae.map(v=>({name:v.name,label:G[v.name]||v.label}))];return jsxRuntime.jsx("div",{className:`docx-insert-symbol-dialog-overlay ${r||""}`,style:{...ui,...n},onClick:I,onKeyDown:h,role:"dialog","aria-modal":"true","aria-labelledby":"insert-symbol-dialog-title",children:jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog",style:gi,children:[jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog-header",style:mi,children:[jsxRuntime.jsx("h2",{id:"insert-symbol-dialog-title",style:bi,children:s("dialogs.insertSymbol.title")}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-symbol-dialog-close",style:xi,onClick:t,"aria-label":s("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog-body",style:fi,children:[jsxRuntime.jsx("input",{ref:b,type:"text",placeholder:s("dialogs.insertSymbol.searchPlaceholder"),value:g,onChange:v=>d(v.target.value),style:vi}),!g&&jsxRuntime.jsx("div",{className:"docx-insert-symbol-categories",style:yi,children:q.map(v=>jsxRuntime.jsx("button",{type:"button",onClick:()=>l(v.name),style:a===v.name?hi:ct,children:v.label},v.name))}),jsxRuntime.jsx("div",{className:"docx-insert-symbol-grid",style:Si,children:f.map((v,C)=>jsxRuntime.jsx("button",{type:"button",onClick:()=>k(v),onDoubleClick:()=>T(v),onMouseEnter:()=>x(v),onMouseLeave:()=>x(null),style:{...wi,...c===v?{backgroundColor:"var(--doc-primary-light)",borderColor:"var(--doc-primary)"}:{}},title:`${v} - U+${v.codePointAt(0)?.toString(16).toUpperCase()}`,children:v},`${v}-${C}`))}),f.length===0&&jsxRuntime.jsx("div",{style:{textAlign:"center",padding:"20px",color:"var(--doc-text-muted)"},children:s("dialogs.insertSymbol.noResults",{query:g})}),R&&jsxRuntime.jsxs("div",{className:"docx-insert-symbol-preview",style:Ci,children:[jsxRuntime.jsx("div",{style:Ti,children:R.character}),jsxRuntime.jsxs("div",{style:ki,children:[jsxRuntime.jsx("div",{style:{fontSize:"14px",fontWeight:500,marginBottom:"4px"},children:R.codePoint}),jsxRuntime.jsx("div",{style:{fontSize:"12px",color:"var(--doc-text-muted)"},children:s("dialogs.insertSymbol.decimal",{value:R.decimal})})]})]})]}),jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog-footer",style:Ii,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-insert-symbol-dialog-cancel",style:Li,onClick:t,children:s("common.cancel")}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-symbol-dialog-insert",style:E?Pi:Ri,onClick:u,disabled:!E,children:s("common.insert")})]})]})})}function Di(e=20){let[t,o]=Kr.useState(false),[i,r]=Kr.useState([]),n=Kr.useCallback(()=>o(true),[]),s=Kr.useCallback(()=>o(false),[]),a=Kr.useCallback(()=>o(c=>!c),[]),l=Kr.useCallback(c=>{r(p=>{let g=p.filter(d=>d!==c);return [c,...g].slice(0,e)});},[e]);return {isOpen:t,recentSymbols:i,open:n,close:s,toggle:a,addRecent:l}}function Ai(){return ae}function Mi(e){return ae.find(o=>o.name===e)?.symbols||[]}function Oi(e){let t=e.codePointAt(0)||0;return {character:e,codePoint:`U+${t.toString(16).toUpperCase().padStart(4,"0")}`,decimal:t,hex:t.toString(16).toUpperCase()}}function _i(e){if(!e.trim())return [];let t=e.toLowerCase();return dt().filter(o=>{let i=o.codePointAt(0)?.toString(16).toUpperCase()||"";return o.includes(e)||i.includes(t.toUpperCase())||`U+${i}`.toLowerCase().includes(t)})}function Bi(e){let t=e.replace(/^U\+/i,"").replace(/^0x/i,""),o=parseInt(t,16);return isNaN(o)||o<0||o>1114111?null:String.fromCodePoint(o)}var export_createDefaultFindOptions=chunkXA53EBKC_js.a.createDefaultFindOptions;var export_createSearchPattern=chunkXA53EBKC_js.a.createSearchPattern;var export_escapeRegexString=chunkXA53EBKC_js.a.escapeRegexString;var export_findAllMatches=chunkXA53EBKC_js.a.findAllMatches;var export_findInDocument=chunkXA53EBKC_js.a.findInDocument;var export_findInParagraph=chunkXA53EBKC_js.a.findInParagraph;var export_getDefaultHighlightOptions=chunkXA53EBKC_js.a.getDefaultHighlightOptions;var export_getMatchCountText=chunkXA53EBKC_js.a.getMatchCountText;var export_isEmptySearch=chunkXA53EBKC_js.a.isEmptySearch;var export_replaceAllInContent=chunkXA53EBKC_js.a.replaceAllInContent;var export_replaceFirstInContent=chunkXA53EBKC_js.a.replaceFirstInContent;var export_scrollToMatch=chunkXA53EBKC_js.a.scrollToMatch;
111
+ Object.defineProperty(exports,"AlignmentButtons",{enumerable:true,get:function(){return chunkPBA4ERQP_js.r}});Object.defineProperty(exports,"ColorPicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.q}});Object.defineProperty(exports,"EditorToolbar",{enumerable:true,get:function(){return chunkPBA4ERQP_js.E}});Object.defineProperty(exports,"FontPicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.p}});Object.defineProperty(exports,"FontSizePicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.c}});Object.defineProperty(exports,"HorizontalRuler",{enumerable:true,get:function(){return chunkPBA4ERQP_js.F}});Object.defineProperty(exports,"LineSpacingPicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.s}});Object.defineProperty(exports,"ListButtons",{enumerable:true,get:function(){return chunkPBA4ERQP_js.e}});Object.defineProperty(exports,"StylePicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.t}});Object.defineProperty(exports,"TableBorderColorPicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.w}});Object.defineProperty(exports,"TableBorderPicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.v}});Object.defineProperty(exports,"TableBorderWidthPicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.x}});Object.defineProperty(exports,"TableCellFillPicker",{enumerable:true,get:function(){return chunkPBA4ERQP_js.y}});Object.defineProperty(exports,"TableMoreDropdown",{enumerable:true,get:function(){return chunkPBA4ERQP_js.z}});Object.defineProperty(exports,"TextContextMenu",{enumerable:true,get:function(){return chunkPBA4ERQP_js.i}});Object.defineProperty(exports,"Toolbar",{enumerable:true,get:function(){return chunkPBA4ERQP_js.D}});Object.defineProperty(exports,"ToolbarButton",{enumerable:true,get:function(){return chunkPBA4ERQP_js.A}});Object.defineProperty(exports,"ToolbarGroup",{enumerable:true,get:function(){return chunkPBA4ERQP_js.B}});Object.defineProperty(exports,"ToolbarSeparator",{enumerable:true,get:function(){return chunkPBA4ERQP_js.C}});Object.defineProperty(exports,"ZoomControl",{enumerable:true,get:function(){return chunkPBA4ERQP_js.u}});Object.defineProperty(exports,"createDefaultListState",{enumerable:true,get:function(){return chunkPBA4ERQP_js.f}});Object.defineProperty(exports,"getDefaultTextContextMenuItems",{enumerable:true,get:function(){return chunkPBA4ERQP_js.m}});Object.defineProperty(exports,"getMarginInUnits",{enumerable:true,get:function(){return chunkPBA4ERQP_js.I}});Object.defineProperty(exports,"getRulerDimensions",{enumerable:true,get:function(){return chunkPBA4ERQP_js.H}});Object.defineProperty(exports,"getTextActionLabel",{enumerable:true,get:function(){return chunkPBA4ERQP_js.k}});Object.defineProperty(exports,"getTextActionShortcut",{enumerable:true,get:function(){return chunkPBA4ERQP_js.l}});Object.defineProperty(exports,"isTextActionAvailable",{enumerable:true,get:function(){return chunkPBA4ERQP_js.n}});Object.defineProperty(exports,"parseMarginFromUnits",{enumerable:true,get:function(){return chunkPBA4ERQP_js.J}});Object.defineProperty(exports,"positionToMargin",{enumerable:true,get:function(){return chunkPBA4ERQP_js.G}});Object.defineProperty(exports,"useTextContextMenu",{enumerable:true,get:function(){return chunkPBA4ERQP_js.j}});Object.defineProperty(exports,"KeyboardShortcutsDialog",{enumerable:true,get:function(){return chunk3QCOIABL_js.l}});Object.defineProperty(exports,"PasteSpecialDialog",{enumerable:true,get:function(){return chunk3QCOIABL_js.a}});Object.defineProperty(exports,"getAllCategories",{enumerable:true,get:function(){return chunk3QCOIABL_js.k}});Object.defineProperty(exports,"getAllPasteOptions",{enumerable:true,get:function(){return chunk3QCOIABL_js.d}});Object.defineProperty(exports,"getCategoryLabel",{enumerable:true,get:function(){return chunk3QCOIABL_js.j}});Object.defineProperty(exports,"getCommonShortcuts",{enumerable:true,get:function(){return chunk3QCOIABL_js.i}});Object.defineProperty(exports,"getDefaultPasteOption",{enumerable:true,get:function(){return chunk3QCOIABL_js.e}});Object.defineProperty(exports,"getDefaultShortcuts",{enumerable:true,get:function(){return chunk3QCOIABL_js.g}});Object.defineProperty(exports,"getPasteOption",{enumerable:true,get:function(){return chunk3QCOIABL_js.c}});Object.defineProperty(exports,"getShortcutsByCategory",{enumerable:true,get:function(){return chunk3QCOIABL_js.h}});Object.defineProperty(exports,"isPasteSpecialShortcut",{enumerable:true,get:function(){return chunk3QCOIABL_js.f}});Object.defineProperty(exports,"useKeyboardShortcutsDialog",{enumerable:true,get:function(){return chunk3QCOIABL_js.m}});Object.defineProperty(exports,"usePasteSpecial",{enumerable:true,get:function(){return chunk3QCOIABL_js.b}});Object.defineProperty(exports,"formatShortcutKeys",{enumerable:true,get:function(){return chunkJGPOALUP_js.a}});Object.defineProperty(exports,"TableToolbar",{enumerable:true,get:function(){return chunkUZLKRJJK_js.o}});Object.defineProperty(exports,"addColumn",{enumerable:true,get:function(){return chunkUZLKRJJK_js.k}});Object.defineProperty(exports,"addRow",{enumerable:true,get:function(){return chunkUZLKRJJK_js.i}});Object.defineProperty(exports,"createTableContext",{enumerable:true,get:function(){return chunkUZLKRJJK_js.d}});Object.defineProperty(exports,"deleteColumn",{enumerable:true,get:function(){return chunkUZLKRJJK_js.l}});Object.defineProperty(exports,"deleteRow",{enumerable:true,get:function(){return chunkUZLKRJJK_js.j}});Object.defineProperty(exports,"getCellAt",{enumerable:true,get:function(){return chunkUZLKRJJK_js.f}});Object.defineProperty(exports,"getColumnCount",{enumerable:true,get:function(){return chunkUZLKRJJK_js.e}});Object.defineProperty(exports,"getTableSplitCellDialogConfig",{enumerable:true,get:function(){return chunkUZLKRJJK_js.g}});Object.defineProperty(exports,"mergeCells",{enumerable:true,get:function(){return chunkUZLKRJJK_js.m}});Object.defineProperty(exports,"splitCell",{enumerable:true,get:function(){return chunkUZLKRJJK_js.n}});Object.defineProperty(exports,"splitTableCell",{enumerable:true,get:function(){return chunkUZLKRJJK_js.h}});Object.defineProperty(exports,"FindReplaceDialog",{enumerable:true,get:function(){return chunk4RTT4L2S_js.a}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkXA53EBKC_js.b}});Object.defineProperty(exports,"HyperlinkDialog",{enumerable:true,get:function(){return chunkUT6DJWGC_js.d}});Object.defineProperty(exports,"useHyperlinkDialog",{enumerable:true,get:function(){return chunkUT6DJWGC_js.m}});exports.ContextMenu=Yo;exports.InsertImageDialog=ei;exports.InsertSymbolDialog=Ei;exports.InsertTableDialog=Cn;exports.LoadingIndicator=Yr;exports.PrintButton=rr;exports.PrintStyles=nr;exports.ResponsePreview=Jo;exports.ResponsiveToolbar=qr;exports.ResponsiveToolbarGroup=en;exports.SYMBOL_CATEGORIES=ae;exports.TableInsertButtons=fr;exports.TableMergeButton=ur;exports.UnsavedIndicator=kr;exports.calculateFitDimensions=ii;exports.clampTableConfig=Pn;exports.createChangeTracker=Er;exports.createDefaultFindOptions=export_createDefaultFindOptions;exports.createDefaultTableConfig=kn;exports.createErrorResponse=tr;exports.createMockResponse=er;exports.createSearchPattern=export_createSearchPattern;exports.createToolbarItem=tn;exports.createToolbarItems=on;exports.dataUrlToBlob=si;exports.delay=Hr;exports.escapeRegexString=export_escapeRegexString;exports.findAllMatches=export_findAllMatches;exports.findInDocument=export_findInDocument;exports.findInParagraph=export_findInParagraph;exports.formatFileSize=li;exports.formatPrintPageRange=dr;exports.formatTableDimensions=Ln;exports.getActionShortcut=Fo;exports.getAllActions=Go;exports.getAllIndicatorPositions=Rr;exports.getAllIndicatorVariants=Lr;exports.getAllLoadingSizes=Gr;exports.getAllLoadingVariants=$r;exports.getDefaultActions=$o;exports.getDefaultHighlightOptions=export_getDefaultHighlightOptions;exports.getDefaultPrintOptions=lr;exports.getImageAcceptString=ni;exports.getImageDimensions=ai;exports.getLoadingVariantLabel=Vr;exports.getMatchCountText=export_getMatchCountText;exports.getRecommendedPriority=rn;exports.getSupportedImageExtensions=ri;exports.getSymbolCategories=Ai;exports.getSymbolUnicodeInfo=Oi;exports.getSymbolsByCategory=Mi;exports.getTablePresets=Rn;exports.getVariantLabel=Pr;exports.isActionAvailable=Vo;exports.isEmptySearch=export_isEmptySearch;exports.isPrintSupported=pr;exports.isValidImageFile=oi;exports.isValidTableConfig=In;exports.openPrintWindow=ar;exports.parsePageRange=cr;exports.replaceAllInContent=export_replaceAllInContent;exports.replaceFirstInContent=export_replaceFirstInContent;exports.scrollToMatch=export_scrollToMatch;exports.searchSymbols=_i;exports.symbolFromCodePoint=Bi;exports.triggerPrint=sr;exports.useContextMenu=Uo;exports.useInsertImageDialog=ti;exports.useInsertSymbolDialog=Di;exports.useInsertTableDialog=Tn;exports.useLoading=Ur;exports.useLoadingOperations=Fr;exports.useResponsePreview=qo;exports.useResponsiveToolbar=Je;exports.useUnsavedChanges=Ir;