@docx-editor.dev/core 2.9.1 → 2.9.2

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 (87) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.js +1 -1
  3. package/dist/binding.cjs +1 -1
  4. package/dist/binding.d.cts +7 -7
  5. package/dist/binding.d.ts +7 -7
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-6JWP2H7K.js +2 -0
  8. package/dist/chunk-6KNLLEUW.cjs +18 -0
  9. package/dist/chunk-7ADTI533.cjs +10 -0
  10. package/dist/chunk-7ETDCPF6.cjs +2 -0
  11. package/dist/chunk-7I3BSGGS.js +1 -0
  12. package/dist/{chunk-XMHWBL3K.cjs → chunk-7UU5YFCD.cjs} +1 -1
  13. package/dist/chunk-CKDAK3MV.js +10 -0
  14. package/dist/chunk-DIMEYVNS.js +2 -0
  15. package/dist/{chunk-IEXDXWTA.cjs → chunk-H2656QDI.cjs} +1 -1
  16. package/dist/chunk-KQGENNL5.cjs +15 -0
  17. package/dist/chunk-LIXPSV4T.js +18 -0
  18. package/dist/{chunk-DKMKH77K.cjs → chunk-O4UULRAQ.cjs} +5 -5
  19. package/dist/chunk-SIIFNE6U.js +15 -0
  20. package/dist/chunk-VXYECPKA.js +5 -0
  21. package/dist/contracts/editor.d.cts +6 -6
  22. package/dist/contracts/editor.d.ts +6 -6
  23. package/dist/contracts/interaction.d.cts +6 -6
  24. package/dist/contracts/interaction.d.ts +6 -6
  25. package/dist/contracts/modules.d.cts +3 -3
  26. package/dist/contracts/modules.d.ts +3 -3
  27. package/dist/{custom-node-writes-QyVZdTUA.d.ts → custom-node-writes-D6SGwebL.d.ts} +20 -4
  28. package/dist/{custom-node-writes-7ERv0f_X.d.cts → custom-node-writes-Dy3b20PS.d.cts} +20 -4
  29. package/dist/{editor-PUlv5Pp7.d.ts → editor-Cvd7Geoc.d.ts} +4 -4
  30. package/dist/{editor-CojjwMmF.d.cts → editor-cAEf1uXW.d.cts} +4 -4
  31. package/dist/editor.cjs +1 -1
  32. package/dist/editor.css +9 -5
  33. package/dist/editor.d.cts +18 -18
  34. package/dist/editor.d.ts +18 -18
  35. package/dist/editor.js +1 -1
  36. package/dist/{image-resources-eZqD_-vC.d.ts → image-resources-BgA9EQxY.d.ts} +1 -1
  37. package/dist/{image-resources-DQOiwOuE.d.cts → image-resources-BiA-IXgo.d.cts} +1 -1
  38. package/dist/{index-oN-v8DQ5.d.ts → index-DRqY5JVF.d.ts} +58 -12
  39. package/dist/{index-DGPSeLI0.d.cts → index-wb-iOxfh.d.cts} +58 -12
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.cts +12 -12
  42. package/dist/index.d.ts +12 -12
  43. package/dist/index.js +1 -1
  44. package/dist/layout.cjs +1 -1
  45. package/dist/layout.d.cts +334 -306
  46. package/dist/layout.d.ts +334 -306
  47. package/dist/layout.js +1 -1
  48. package/dist/output.cjs +1 -1
  49. package/dist/output.d.cts +5 -5
  50. package/dist/output.d.ts +5 -5
  51. package/dist/output.js +1 -1
  52. package/dist/{review-items-DpsqTHio.d.cts → review-items-B8tffIXj.d.cts} +1 -1
  53. package/dist/{review-items-D5SPFtsO.d.ts → review-items-bdGxFWNA.d.ts} +1 -1
  54. package/dist/{review-reads-CP106AHp.d.cts → review-reads-Bxz03tHG.d.cts} +1 -1
  55. package/dist/{review-reads-B2Ji3fVU.d.ts → review-reads-CHODU0LI.d.ts} +1 -1
  56. package/dist/{semantic-cell-selection-DJPjBWzf.d.cts → semantic-cell-selection-BPzx6DdT.d.cts} +2 -2
  57. package/dist/{semantic-cell-selection-BWhVAk5B.d.ts → semantic-cell-selection-CsHcr-yk.d.ts} +2 -2
  58. package/dist/{semantic-interaction-BjOcDB06.d.cts → semantic-interaction-BfWDD_0V.d.cts} +1 -1
  59. package/dist/{semantic-interaction-Cca1-X_a.d.ts → semantic-interaction-D-RZ9Ust.d.ts} +1 -1
  60. package/dist/{semantic-paint-Ur7pAINj.d.cts → semantic-paint-Bd7EqzXV.d.cts} +2 -2
  61. package/dist/{semantic-paint-CufpIQFw.d.ts → semantic-paint-WhVtSDJK.d.ts} +2 -2
  62. package/dist/{semantic-records-Cc1MJrhM.d.ts → semantic-records-DCt-ZwKU.d.ts} +22 -4
  63. package/dist/{semantic-records-C3Z76KeN.d.cts → semantic-records-DadVT_E1.d.cts} +22 -4
  64. package/dist/{shaped-measurer-CwlTPDJO.d.ts → shaped-measurer-B9f4A7QA.d.ts} +1 -1
  65. package/dist/{shaped-measurer-CYSK20E2.d.cts → shaped-measurer-CninrHr_.d.cts} +1 -1
  66. package/dist/store.cjs +1 -1
  67. package/dist/store.d.cts +131 -131
  68. package/dist/store.d.ts +131 -131
  69. package/dist/store.js +1 -1
  70. package/dist/{tree-op-types-XMVsJSpe.d.ts → tree-op-types-CnRb7AYo.d.ts} +22 -1
  71. package/dist/{tree-op-types-B0-sCtw-.d.cts → tree-op-types-D1vNJ7XC.d.cts} +22 -1
  72. package/dist/{tree-session-D945D43B.d.cts → tree-session-Df02ajqc.d.cts} +5 -5
  73. package/dist/{tree-session-DBJgmdmc.d.ts → tree-session-ZuBFOhIh.d.ts} +5 -5
  74. package/dist/{tree-store-C6vc8E_2.d.cts → tree-store-B_sJBMIS.d.cts} +1 -1
  75. package/dist/{tree-store-ClA-qng4.d.ts → tree-store-DgETo6Mf.d.ts} +1 -1
  76. package/package.json +2 -2
  77. package/dist/chunk-5VC5HGJA.js +0 -2
  78. package/dist/chunk-A2JIBG75.js +0 -1
  79. package/dist/chunk-FWUI7EXG.cjs +0 -15
  80. package/dist/chunk-GZWMLQJO.js +0 -18
  81. package/dist/chunk-IMMAG4QP.cjs +0 -10
  82. package/dist/chunk-JTSNJQFO.js +0 -15
  83. package/dist/chunk-KBCC66CI.js +0 -5
  84. package/dist/chunk-LJ6BY6IU.cjs +0 -18
  85. package/dist/chunk-QDBAXFIK.js +0 -2
  86. package/dist/chunk-RD266XSK.cjs +0 -2
  87. package/dist/chunk-VUJGPCPU.js +0 -10
@@ -0,0 +1,5 @@
1
+ import {M,L,O,R,S,G as G$1}from'./chunk-DIMEYVNS.js';import {Pe as Pe$1,b,Ke as Ke$1,va,ob,Wc,Rf,dg,We as We$1,Xe as Xe$1,Xf,Wf,sf,Zf,_f,Jg,Yc,zc,Zc,Tb,pb,Of,_c,je as je$1,Rb,Qb,E,eg,_d,cg,bg,Oe as Oe$1,Ob,Ub,Pg,Qg,ca,wg,zg,Ig,Wb,Qc,Pc,Hb,Jb}from'./chunk-CKDAK3MV.js';import {Schema}from'prosemirror-model';import {EditorState,TextSelection}from'prosemirror-state';import {EditorView}from'prosemirror-view';import {keymap}from'prosemirror-keymap';import {joinBackward,deleteSelection,joinForward,splitBlock,selectTextblockEnd,selectTextblockStart,baseKeymap}from'prosemirror-commands';function B(t){return t.attributes?.val}function j(t){let e=B(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var Un=/^[0-9A-Fa-f]{6}$/,ye=/^\d{1,6}$/,Yn=/^-?\d{1,6}$/;function _e(t){return t===void 0||t==="auto"?null:Un.test(t)?`#${t}`:null}var Gn={single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"},Xn={black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"};function Kn(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function W(t,e=false){return t===void 0||!(e?Yn:ye).test(t)?null:`${Number(t)/20}pt`}function Vt(t){let e=[],n=[],o=null,s=null;for(let l of t)switch(l.localName){case "b":e.push(`font-weight:${j(l)?"bold":"normal"}`);break;case "i":e.push(`font-style:${j(l)?"italic":"normal"}`);break;case "u":{let r=B(l)??"single";if(r==="none"||!j(l))break;n.push("underline"),o=Gn[r]??"solid",s=_e(l.attributes?.color);break}case "strike":j(l)&&n.push("line-through");break;case "dstrike":j(l)&&n.push("line-through");break;case "caps":j(l)&&e.push("text-transform:uppercase");break;case "smallCaps":j(l)&&e.push("font-variant:small-caps");break;case "vertAlign":{let r=B(l);r==="superscript"?e.push("vertical-align:super","font-size:0.75em"):r==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let r=_e(B(l));r&&e.push(`color:${r}`);break}case "highlight":{let r=Xn[B(l)??""];r&&e.push(`background-color:${r}`);break}case "sz":{let r=B(l);r!==void 0&&ye.test(r)&&e.push(`font-size:${Number(r)/2}pt`);break}case "rFonts":{let r=Kn(l.attributes?.ascii??l.attributes?.hAnsi);r&&e.push(`font-family:${r}`);break}case "spacing":{let r=W(B(l),true);r&&e.push(`letter-spacing:${r}`);break}}return n.length>0&&(e.push(`text-decoration-line:${[...new Set(n)].join(" ")}`),o&&e.push(`text-decoration-style:${o}`),s&&e.push(`text-decoration-color:${s}`)),e.join(";")}var Jn={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function Qt(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let o=Jn[B(n)??""];o&&e.push(`text-align:${o}`);break}case "ind":{let o=W(n.attributes?.left??n.attributes?.start,true),s=W(n.attributes?.right??n.attributes?.end,true),l=W(n.attributes?.firstLine),r=W(n.attributes?.hanging);o&&e.push(`margin-left:${o}`),s&&e.push(`margin-right:${s}`),l?e.push(`text-indent:${l}`):r&&e.push(`text-indent:-${r}`);break}case "spacing":{let o=W(n.attributes?.before),s=W(n.attributes?.after);o&&e.push(`margin-top:${o}`),s&&e.push(`margin-bottom:${s}`);let l=n.attributes?.line,r=n.attributes?.lineRule;l!==void 0&&ye.test(l)&&r!=="exact"&&r!=="atLeast"?e.push(`line-height:${(Number(l)/240).toFixed(3)}`):l!==void 0&&ye.test(l)&&e.push(`line-height:${Number(l)/20}pt`);break}case "shd":{let o=_e(n.attributes?.fill);o&&e.push(`background-color:${o}`);break}case "pageBreakBefore":j(n)&&e.push("break-before:page");break;}return e.join(";")}var C=new Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=Qt(t.attrs.props??[]);return ["p",{"data-node-id":String(t.attrs.nodeId??""),...e?{style:e}:{}},0]},parseDOM:[{tag:"p",getAttrs:t=>typeof t=="string"?null:{nodeId:t.getAttribute("data-node-id")||null,props:[]}}]},text:{group:"inline"},tab:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"tab",class:"docx-tab"},"\u2192"],parseDOM:[{tag:'span[data-token="tab"]'}]},hardBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["br"],parseDOM:[{tag:"br"}]},pageBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"page-break",class:"docx-page-break"}],parseDOM:[{tag:'span[data-token="page-break"]'}]},unknownInline:{inline:true,group:"inline",atom:true,selectable:false,draggable:false,attrs:{nodeId:{default:null},label:{default:""}},toDOM:t=>["span",{"data-token":"unknown","data-node-id":String(t.attrs.nodeId??""),contenteditable:"false",class:"docx-unknown-inline",title:String(t.attrs.label||"Content this editor cannot edit yet. It is preserved.")}],parseDOM:[{tag:'span[data-token="unknown"]',getAttrs:t=>typeof t=="string"?false:{nodeId:t.getAttribute("data-node-id")||null,label:""}}]}},marks:{runProps:{attrs:{props:{default:[]}},excludes:"runProps",toDOM:t=>{let e=t.attrs.props??[],n=Vt(e);return ["span",{"data-run-props":Vn(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=Qn(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function Vn(t){return JSON.stringify(Array.isArray(t)?t:[])}function Qn(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let n=[];for(let o of e){if(typeof o!="object"||o===null)return null;let s=o;if(typeof s.localName!="string"||s.attributes!==void 0&&(typeof s.attributes!="object"||s.attributes===null))return null;n.push(s.attributes===void 0?{localName:s.localName}:{localName:s.localName,attributes:s.attributes});}return n}catch{return null}}function Le(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function he(t,e){return JSON.stringify(xe(t))===JSON.stringify(xe(e))}function xe(t){return [...t].map(e=>({localName:e.localName,attributes:Object.fromEntries(Object.entries(e.attributes??{}).sort(([n],[o])=>n<o?-1:1))})).sort((e,n)=>e.localName<n.localName?-1:1)}function je(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue")continue;let o={};for(let s of n.attributes)o[s.localName]=s.value;e.push(Object.keys(o).length>0?{localName:n.localName,attributes:o}:{localName:n.localName});}return e}function qt(t){return t.kind==="textValue"?"":`${{drawing:"Picture",pict:"Picture",object:"Embedded object",fldSimple:"Field",hyperlink:"Hyperlink",sdt:"Content control",tbl:"Table"}[t.localName]??t.localName} \u2014 preserved, not editable yet`}function Y(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let s=o.children.find(r=>r.kind==="runProperties"),l=je(s);for(let r of o.children)if(r.kind!=="runProperties"){if(r.kind==="tab"){e.push({kind:"tab"});continue}if(r.kind==="hardBreak"){e.push(Wb(r)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(r.kind==="text"){let g="";for(let m of r.children)m.kind==="textValue"&&(g+=m.value);g.length>0&&e.push({kind:"text",text:g,props:l});continue}e.push({kind:"unknown",nodeId:r.id,label:qt(r)});}};return Ob(t.children,0,o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:qt(o)});}),e}function H(t){let e=[],n=o=>{if(o.kind!=="textValue"){if(o.kind==="body"){for(let s of o.children)s.kind==="paragraph"&&e.push(s);return}for(let s of o.children)n(s);}};return n(t.root),e}var en=Pe$1(16),tn=new WeakMap;function qn(t,e){let n=tn.get(t);if(!n){let o=[];Oe$1([t],o,0),n=Object.freeze(o),tn.set(t,n);}for(let o of n)e.push(o);}function w(t){let e=en.get(t);if(e)return e;let n=[];for(let o of Ke$1(t))if(o.root.kind!=="textValue")for(let s of o.root.children)qn(s,n);return en.set(t,n),n}function U(t){let e=H(t).map(n=>{let o=n.kind==="textValue"?void 0:n.children.find(l=>l.kind==="paragraphProperties"),s=Y(n).map(l=>{switch(l.kind){case "text":return C.text(l.text,l.props.length>0?[C.marks.runProps.create({props:l.props})]:[]);case "tab":return C.node("tab");case "hardBreak":return C.node("hardBreak");case "pageBreak":return C.node("pageBreak");default:return C.node("unknownInline",{nodeId:l.nodeId,label:l.label})}});return C.node("paragraph",{nodeId:n.id,props:je(o)},s)});return C.node("doc",null,e.length>0?e:[C.node("paragraph")])}function Q(t){let e=[];return t.forEach(n=>{if(n.isText&&n.text){e.push({kind:"text",text:n.text,props:Le(n)});return}n.type.name==="tab"?e.push({kind:"tab"}):n.type.name==="hardBreak"?e.push({kind:"hardBreak"}):n.type.name==="pageBreak"?e.push({kind:"pageBreak"}):n.type.name==="unknownInline"&&e.push({kind:"unknown",nodeId:String(n.attrs.nodeId??""),label:String(n.attrs.label??"")});}),e}function D(t){let e="";for(let n of t)n.kind==="text"?e+=n.text:n.kind==="tab"?e+=" ":n.kind==="hardBreak"?e+=`
2
+ `:n.kind==="pageBreak"&&(e+=Ub);return e}function nn(t){let e=[],n=0;for(let o of t)o.kind==="text"?n+=o.text.length:o.kind==="tab"||o.kind==="hardBreak"||o.kind==="pageBreak"?n+=1:e.push(`${o.nodeId}@${n}`);return e}function eo(t,e){if(t===e)return null;let n=0,o=Math.min(t.length,e.length);for(;n<o&&t[n]===e[n];)n+=1;let s=t.length,l=e.length;for(;s>n&&l>n&&t[s-1]===e[l-1];)s-=1,l-=1;return {start:n,endBefore:s,endAfter:l}}function on(t){let e=[];for(let n of t)if(n.kind==="text")for(let o=0;o<n.text.length;o+=1)e.push(n.props);else (n.kind==="tab"||n.kind==="hardBreak"||n.kind==="pageBreak")&&e.push(e[e.length-1]??[]);return e}function to(t,e,n,o,s){let l=[],r=nn(e),g=nn(n);if(JSON.stringify(r)!==JSON.stringify(g))return {ok:false,reason:"unknown-content-moved",detail:t};he(o,s)||l.push({op:"setParagraphProperties",paragraphId:t,properties:xe(s)});let m=D(e),p=D(n),f=eo(m,p);if(f&&(f.endBefore>f.start&&l.push({op:"deleteText",paragraphId:t,start:f.start,end:f.endBefore}),f.endAfter>f.start)){let h=p.slice(f.start,f.endAfter),x=f.start,d="",k=()=>{d.length!==0&&(l.push({op:"insertText",paragraphId:t,offset:x,text:d}),x+=d.length,d="");};for(let P of h)P===" "?(k(),l.push({op:"insertTab",paragraphId:t,offset:x}),x+=1):P===`
3
+ `?(k(),l.push({op:"insertHardBreak",paragraphId:t,offset:x}),x+=1):P===Ub?(k(),l.push({op:"insertPageBreak",paragraphId:t,offset:x}),x+=1):d+=P;k();}if(!f){let h=on(e),x=on(n),d=0;for(;d<x.length;){if(he(h[d]??[],x[d])){d+=1;continue}let k=d,P=x[d];for(;d<x.length&&he(x[d],P)&&!he(h[d]??[],x[d]);)d+=1;l.push({op:"setRunProperties",paragraphId:t,start:k,end:d,properties:xe(P)});}}return {ok:true,ops:l}}function Be(t,e){let n=H(t),o=[];if(e.forEach(l=>{l.type.name==="paragraph"&&o.push(l);}),o.length!==e.childCount)return {ok:false,reason:"unsupported-node"};let s=o.length-n.length;if(s===0){let l=[];for(let[r,g]of o.entries()){let m=n[r];if(g.attrs.nodeId!==m.id)return {ok:false,reason:"paragraph-reordered",detail:String(g.attrs.nodeId)};let p=to(m.id,Y(m),Q(g),je(m.kind==="textValue"?void 0:m.children.find(f=>f.kind==="paragraphProperties")),g.attrs.props??[]);if(!p.ok)return p;l.push(...p.ops);}return {ok:true,ops:l}}return s===1?no(n,o):s===-1?oo(n,o):{ok:false,reason:"paragraph-count-unexplained",detail:String(s)}}function no(t,e){for(let n=0;n<t.length;n+=1){let o=t[n],s=e[n],l=e[n+1];if(!s||!l||s.attrs.nodeId!==o.id)continue;let r=l.attrs.nodeId;if(r!==null&&r!==o.id)continue;let g=D(Q(s));if(g+D(Q(l))===D(Y(o))&&rn(t,e,n)&&an(t,e,n+1,n+2))return {ok:true,ops:[{op:"splitParagraph",paragraphId:o.id,offset:g.length}]}}return {ok:false,reason:"split-not-clean"}}function oo(t,e){for(let n=0;n+1<t.length;n+=1){let o=t[n],s=t[n+1],l=e[n];if(!l||l.attrs.nodeId!==o.id)continue;let r=D(Y(o))+D(Y(s));if(D(Q(l))===r&&rn(t,e,n)&&an(t,e,n+2,n+1))return {ok:true,ops:[{op:"joinParagraphs",firstId:o.id,secondId:s.id}]}}return {ok:false,reason:"join-not-clean"}}function rn(t,e,n){for(let o=0;o<n;o+=1){let s=e[o],l=t[o];if(!s||s.attrs.nodeId!==l.id||D(Q(s))!==D(Y(l)))return false}return true}function an(t,e,n,o){for(let s=0;n+s<t.length;s+=1){let l=t[n+s],r=e[o+s];if(!r||r.attrs.nodeId!==l.id||D(Q(r))!==D(Y(l)))return false}return true}function ro(t,e){return va(t,e)!==null}function He(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return U(e);let o=new Map;t.forEach(m=>{let p=m.attrs.nodeId;typeof p=="string"&&o.set(p,m);});let s=new Set(n.dirty),l=H(e);if(l.length!==t.childCount)return U(e);let r=U(e),g=[];for(let[m,p]of l.entries()){let f=o.get(p.id);g.push(f&&!s.has(p.id)?f:r.child(m));}return C.node("doc",null,g)}function sn(t){return w(t).map(e=>Of(t,e.id)??"").join(`
4
+ `)}var ao=64,ln=new WeakMap;function $e(t,e=0){if(e>ao)return false;let n=ln.get(t);if(n!==void 0)return n;let o=false;for(let s of t.children)if(s.kind!=="textValue"&&(s.kind==="commentRangeStart"||s.kind==="commentReference"||$e(s,e+1))){o=true;break}return ln.set(t,o),o}function lo(t,e){let n=t.kind==="revision"?t.ranges[0]??null:t.range;if(!n)return null;let o=e.get(n.start.paragraphId);return o===void 0?null:o}function dn(t,e,n){for(let s of e)if(s.ranges.length===0)return false;let o=new Set;for(let s of t)s.kind!=="revision"||s.ranges.length>0||un(s,n)||o.add(wg(s));for(let s of e)if(o.has(wg(s)))return false;return true}function cn(t,e,n,o){let s=e.get(n);if(s===void 0)return [...t];let l=[],r=null;for(let g of t){if(g.kind==="revision"&&un(g,n)){r===null&&(r=l.length);continue}if(r===null){let m=lo(g,e);m!==null&&m>s&&(r=l.length);}l.push(g);}if(r===null&&(r=l.length),o.length>0){let g=o.length<2?[...o]:[...o].sort((m,p)=>zg(m,e)-zg(p,e));l.splice(r,0,...g);}return Ig(l)}function un(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function so(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function io(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function co(t,e){return t.ranges.length===0||!t.ranges.some(o=>o.start.paragraphId===e||o.end.paragraphId===e)?false:!t.ranges.every(o=>o.start.paragraphId===e&&o.end.paragraphId===e)}function pn(t,e,n,o,s,l,r){if(t.fromRevision!==e.bodyRevision||r!==e.packageRevision+1||t.story!==void 0&&t.story.kind!=="body"||t.impact!=="text-local"||t.dirty.length!==1||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0||e.commentsPart!==s||e.commentsExtendedPart!==l)return null;let g=t.dirty[0],m=va(o,g);if(!m||m.kind!=="paragraph")return null;for(let p of n){if(p.kind==="comment"){if(so(p,g))return null;continue}if(p.kind==="custom"){if(p.range?.start.paragraphId===g)return null;continue}if(io(p,g)||co(p,g))return null}return g}var fn=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,uo=["ascii","hAnsi","cs","eastAsia"],po=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],mo=128,fo=/[\u0000-\u001F\u007F-\u009F]/;function $(t){return t.kind!=="textValue"}function G(t,e){return t.attributes.find(n=>n.localName===e)?.value}function gn(t,e){let n=new Map;for(let s of t)for(let l of s.children)if($(l))for(let[r,g]of yn(l,e))n.has(r)||n.set(r,g);let o=[...n.values()];return o.sort((s,l)=>s<l?-1:s>l?1:0),o}var ze=new WeakMap,go=16,yo=32;function yn(t,e,n=0){let o=e?.major??null,s=e?.minor??null,l=ze.get(t);if(l&&l.major===o&&l.minor===s)return l.byFold;if(t.children.length>=go&&n<yo&&t.localName!=="rFonts"){let p=new Map;for(let f of t.children)if($(f))for(let[h,x]of yn(f,e,n+1))p.has(h)||p.set(h,x);return ze.set(t,{major:o,minor:s,byFold:p}),p}let r=new Map,g=p=>{if(!p||!fn.test(p))return;let f=p.toLowerCase();r.has(f)||r.set(f,p);},m=[t];for(;m.length>0;){let p=m.pop();if($(p)){if(p.localName==="rFonts"){for(let f of uo)g(G(p,f));if(e)for(let f of po){let h=G(p,f);h!==void 0&&(h.startsWith("major")?g(e.major):h.startsWith("minor")&&g(e.minor));}}for(let f=p.children.length-1;f>=0;f-=1)m.push(p.children[f]);}}return ze.set(t,{major:o,minor:s,byFold:r}),r}function hn(t){let e=[...t];for(;e.length>0;){let n=e.pop();if($(n)){if(n.localName==="t"&&n.namespaceUri===ca){for(let o of n.children)if(!$(o)&&o.value.length>0)return true;continue}for(let o of n.children)e.push(o);}}return false}var ho=new Set(["paragraph","character","table","numbering"]),xo=/^[0-9A-Fa-f]{6}$/,ko=16,mn=new Map([["normal",0],["title",1],["subtitle",2],["heading 1",11],["heading 2",12],["heading 3",13],["heading 4",14],["heading 5",15],["heading 6",16],["heading 7",17],["heading 8",18],["heading 9",19]]);function xn(t){return t.children}function We(t,e){for(let n of xn(t))if($(n)&&n.localName===e)return n}function Po(t){return mn.get(t.name.toLowerCase())??mn.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function Ue(t){return t===void 0||t.length===0||t.length>mo||fo.test(t)?null:t}function kn(t,e){if(!t)return [];let n=new Map;for(let l of t.children){if(!$(l)||l.localName!=="style")continue;let r=Ue(G(l,"styleId"));r!==null&&!n.has(r)&&n.set(r,l);}let o=l=>{let r=false,g=false,m=null,p=false,f=false,h=new Set,x=l;for(let P=0;P<ko&&x!==null&&!h.has(x);P+=1){h.add(x);let I=n.get(x);if(!I)break;let S=We(I,"rPr");for(let R of S?xn(S):[]){if(!$(R))continue;let T=G(R,"val"),A=T!=="0"&&T!=="false"&&T!=="off";R.localName==="b"&&!p?(r=A,p=true):R.localName==="i"&&!f?(g=A,f=true):R.localName==="color"&&m===null&&T&&xo.test(T)&&(m=T);}let v=We(I,"basedOn");x=v?Ue(G(v,"val")):null;}let d=e?.(l),k=d?.fontFamily??null;return {fontFamily:k!==null&&fn.test(k)?k:null,fontSizePt:d?.fontSizeHalfPoints!=null&&d.fontSizeHalfPoints>0?d.fontSizeHalfPoints/2:null,bold:r,italic:g,color:m}},s=[];for(let[l,r]of n){let g=G(r,"type");if(g===void 0||!ho.has(g))continue;let m=We(r,"name"),p=Ue(m?G(m,"val"):void 0);s.push({styleId:l,name:p??l,type:g,preview:o(l)});}return s.map((l,r)=>({entry:l,index:r,rank:Po(l)})).sort((l,r)=>l.rank-r.rank||l.index-r.index).map(l=>l.entry)}var bo=128,Oo=/[\u0000-\u001F\u007F-\u009F]/,So=/[\u0000-\u001F\u007F-\u009F]/g,vo=200,Ro=/^heading ([1-9])$/i;function Ye(t){return t.kind!=="textValue"}function ie(t,e){for(let n of t.children)if(Ye(n)&&n.localName===e)return n}function se(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Io(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!Ye(n)||n.localName!=="style"||se(n,"type")!=="paragraph")continue;let o=se(n,"styleId");if(o===void 0||o.length===0||o.length>bo||Oo.test(o))continue;let s=ie(n,"name"),l=s?se(s,"val"):void 0,r=l!==void 0?Ro.exec(l):null;if(r){e.set(o,Number(r[1])-1);continue}let g=ie(n,"pPr"),m=g?ie(g,"outlineLvl"):void 0,p=m?se(m,"val"):void 0;p!==void 0&&/^[0-8]$/.test(p)&&e.set(o,Number(p));}return e}function Ge(t){let e=ie(t,"pPr"),n=e?ie(e,"pStyle"):void 0;return n?se(n,"val"):void 0}function Pn(t,e){let n=Io(e);if(n.size===0)return [];let o=[];for(let s of H(t)){if(!Ye(s))continue;let l=Ge(s);if(l===void 0)continue;let r=n.get(l);if(r===void 0)continue;let m=(Of(t,s.id)??"").replace(So," ").trim().slice(0,vo);m.length!==0&&o.push({text:m,level:r,blockId:s.id});}return o}var ke=48,To=/[\u0000-\u001F\u007F-\u009F]/g;function bn(t){return t.kind!=="textValue"}function Pe(t){if(t.kind==="textValue")return t.value.length;if(t.kind==="tab"||t.kind==="hardBreak")return 1;if(t.kind==="runProperties"||t.kind==="generic")return 0;if(t.kind==="hyperlink"||Hb(t)){let n=0,o=t.kind==="hyperlink"?t.children:Jb(t)??[];for(let s of o)n+=Pe(s);return n}let e=0;for(let n of t.children)e+=Pe(n);return e}function No(t){let e=[],n=0;return bn(t)&&Ob(t.children,0,o=>{if(o.kind==="run"){e.push(n),n+=Pe(o);return}n+=Pe(o);}),e}function Eo(t,e){if(t.length===0)return {index:0,offset:e};for(let n=t.length-1;n>=0;n-=1){let o=t[n];if(e>=o)return {index:n,offset:e-o}}return {index:0,offset:e}}function Xe(t,e){return t.replace(To," ").slice(0,e)}function On(t,e,n={}){let o={matches:[],truncated:false};if(!Pg(e))return o;let s=n.limit!==void 0&&Number.isInteger(n.limit)&&n.limit>0?Math.min(n.limit,2e3):2e3,l={...n.matchCase===void 0?{}:{matchCase:n.matchCase},...n.wholeWord===void 0?{}:{wholeWord:n.wholeWord}},r=[],g=0;for(let m of H(t)){if(!bn(m))continue;let p=g;g+=1;let f=Of(t,m.id)??"";if(f.length===0)continue;let h=Qg(f,e,s-r.length,l),x=null;for(let d of h.matches){let k=d.start+d.length;x??=No(m);let P=Eo(x,d.start);r.push({blockId:m.id,start:d.start,length:d.length,paragraphIndex:p,runIndex:P.index,runOffset:P.offset,text:Xe(f.slice(d.start,k),256),contextBefore:Xe(f.slice(Math.max(0,d.start-ke),d.start),ke),contextAfter:Xe(f.slice(k,k+ke),ke)});}if(h.truncated)return {matches:r,truncated:true}}return {matches:r,truncated:false}}var Co=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"],Do=/^[0-9A-Fa-f]{6}$/,Sn={windowText:"000000",window:"FFFFFF"};function Rn(t){return t.kind!=="textValue"}function be(t,e){return t.attributes.find(n=>n.localName===e)?.value}function In(t,e){let n=[t];for(;n.length>0;){let o=n.pop();if(Rn(o)){if(o.localName===e)return o;for(let s=o.children.length-1;s>=0;s-=1)n.push(o.children[s]);}}return null}function Oe(t,e){for(let n of t.children)if(Rn(n)&&(e===void 0||n.localName===e))return n;return null}function Mo(t){let e=Oe(t);if(!e)return null;let n;if(e.localName==="srgbClr")n=be(e,"val");else if(e.localName==="sysClr"){let o=be(e,"val")??"";n=be(e,"lastClr")??(Object.prototype.hasOwnProperty.call(Sn,o)?Sn[o]:void 0);}return n===void 0||!Do.test(n)?null:n.toUpperCase()}var wo=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function vn(t,e){let n=Oe(t,e),o=n?Oe(n,"latin"):null,s=o?be(o,"typeface"):void 0;return s!==void 0&&wo.test(s)?s:null}function de(t){if(!t)return {major:null,minor:null};let e=In(t,"fontScheme");return e?{major:vn(e,"majorFont"),minor:vn(e,"minorFont")}:{major:null,minor:null}}function Tn(t){if(!t)return [];let e=In(t,"clrScheme");if(!e)return [];let n=[];for(let o of Co){let s=Oe(e,o),l=s?Mo(s):null;if(l===null)return [];n.push({slot:o,hex:l});}return n}var Ao=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;var Fo=/[\u0000-\u001F\u007F-\u009F]/;function Cn(t){return t.kind!=="textValue"}function X(t,e){for(let n of t.children)if(Cn(n)&&n.localName===e)return n}function K(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Nn(t){return t===void 0||t.length===0||t.length>128||Fo.test(t)?null:t}function Se(t,e){return t==="minorAscii"||t==="minorHAnsi"?e.minor:t==="majorAscii"||t==="majorHAnsi"?e.major:null}function _o(t,e){let n=Se(K(t,"asciiTheme"),e)??Se(K(t,"hAnsiTheme"),e);if(n!==null)return n;let o=K(t,"ascii")??K(t,"hAnsi");return o===void 0?null:Ao.test(o)?o:null}function En(t,e){if(!t)return {fontFamily:null,fontSizeHalfPoints:null};let n=X(t,"rFonts"),o=X(t,"sz"),s=o?K(o,"val"):void 0,l=s!==void 0&&/^\d{1,4}$/.test(s)?Number(s):null;return {fontFamily:n?_o(n,e):null,fontSizeHalfPoints:l!==null&&l>=2&&l<=3276?l:null}}function Ke(t,e){let n=new Map,o={fontFamily:null,fontSizeHalfPoints:null};if(t){let r=X(t,"docDefaults"),g=r?X(r,"rPrDefault"):void 0;o=En(g?X(g,"rPr"):void 0,e);for(let m of t.children){if(!Cn(m)||m.localName!=="style")continue;let p=Nn(K(m,"styleId"));if(p===null||n.has(p))continue;let f=X(m,"basedOn");n.set(p,{basedOn:Nn(f?K(f,"val"):void 0),own:En(X(m,"rPr"),e)});}}let s=new Map,l=r=>{let g=r??"",m=s.get(g);if(m)return m;let p=null,f=null,h=new Set,x=r;for(let k=0;x!==null&&k<16&&!h.has(x);k+=1){h.add(x);let P=n.get(x);if(!P)break;p??=P.own.fontFamily,f??=P.own.fontSizeHalfPoints,x=P.basedOn;}let d={fontFamily:p??o.fontFamily,fontSizeHalfPoints:f??o.fontSizeHalfPoints};return s.set(g,d),d};return (r,g)=>{let m=l(r),p=g?.find(h=>h.localName==="rFonts"),f=p?Se(p.attributes?.asciiTheme,e)??Se(p.attributes?.hAnsiTheme,e):null;return f===null?m:{...m,fontFamily:f}}}var Dn=new WeakMap;function Ze(t){let e=Dn.get(t);if(e!==void 0)return e;let n=Qc(t),o=n===null||!Pc(n)?null:n;return Dn.set(t,o),o}var Je=class{#e;#t;constructor(e,n){this.#e=e,this.#t=n;}get size(){return this.#e.size}get(e){if(this.#e.has(e))return this.#t.find(n=>e.startsWith(`${n.name}#`))}has(e){return this.get(e)!==void 0}*entries(){for(let e of this.#e.keys()){let n=this.get(e);n&&(yield [e,n]);}}keys(){return this.#e.keys()}*values(){for(let[,e]of this.entries())yield e;}[Symbol.iterator](){return this.entries()}forEach(e,n){for(let[o,s]of this.entries())e.call(n,s,o,this);}};function Mn(t,e){return Object.freeze({...t,partByNode:new Je(t.ordinalByNode,e)})}function wn(t){let e=new Map,n=new Map,o=new Map,s=new Set,l=new Map,r=new Map,g=0;for(let m of t)for(let p of w(m)){o.set(p.id,g),l.set(p.id,m),g+=1;let f=Ze(p);if(f===null)continue;e.set(p.id,f);let h=f.toUpperCase(),x=r.get(h);x?(x.push(p.id),s.add(h)):(r.set(h,[p.id]),n.set(h,p.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:o,ambiguousParaIds:s,partByNode:l,claimantsByParaId:r})}function An(t,e){let n=t.indexOf("#");if(n<=0)return null;let o=t.slice(0,n),s=e.body.name===o?e.body:void 0;s??=e.openStories.find(g=>g.name===o);let l=s?void 0:e.otherStories.find(g=>g.name===o);if(s??=l?e.normalize(l):void 0,!s)return null;let r=va(s,t);return r?.kind==="paragraph"?Ze(r):null}var Lo=Object.freeze([]);function jo(t,e={}){let n=ob(t);if(!n.ok)return {ok:false,reason:n.reason,...n.detail?{detail:n.detail}:{}};let o=n.package,s=o.parts.get(o.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-tree",detail:o.mainDocumentPart};let l=Wc(s),r=new Rf(o,l),g=null,m=null,p=null,f=null;r.subscribe(a=>{f=a;});let h=()=>r.bodyStore(),x=()=>r.currentPackage(),d=Object.freeze({kind:"body"}),k=(a,i)=>{let c=r.currentPackage(),u=a.checkpoint();a.graftPackage(()=>r.currentPackage());let y=i();return y.ok&&(a.restoreHistoryStacks(u),r.replacePackageShell(a.package),r.adoptPackageUnit(c),r.publishStoryWrite(y.change)),y},P=()=>{if(g&&f&&g.packageRevision===f.fromRevision&&r.packageRevision===f.toRevision&&f.story?.kind==="body"&&f.impact==="text-local"&&f.created.length===0&&f.deleted.length===0&&f.splitJoin.length===0&&(g={...g,packageRevision:r.packageRevision}),!g||g.packageRevision!==r.packageRevision){let a=Rb(x());g={packageRevision:r.packageRevision,resolution:a,parts:Qb(a)};}return g},I="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",S$1="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",v=null,R$1=()=>{let a=x(),i=(a.relationships.get(a.mainDocumentPart)??[]).find(y=>y.type===I),c;if(i){let y=E(i);y.mode==="Internal"&&y.target.ok&&(c=a.parts.get(y.target.partName));}c??=a.parts.get("/word/styles.xml");let u=c?.root??null;return u!==v&&(v=u,Te=null,oe=null),v},T=false,A=null,ve=()=>{if(T)return A;T=true;let a=x(),i=(a.relationships.get(a.mainDocumentPart)??[]).find(u=>u.type===S$1),c;if(i){let u=E(i);u.mode==="Internal"&&u.target.ok&&(c=a.parts.get(u.target.partName));}return c??=a.parts.get("/word/numbering.xml"),A=c?.root??null,A},ce="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",J=-1,q=null,Ve=()=>{if(J===r.packageRevision)return q;J=r.packageRevision;let a=x(),i=(a.relationships.get(a.mainDocumentPart)??[]).find(u=>u.type===ce),c;if(i){let u=E(i);u.mode==="Internal"&&u.target.ok&&(c=a.parts.get(u.target.partName));}return c??=a.parts.get("/word/settings.xml"),q=c?.root??null,q},_n="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Ln="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Qe=(a,i)=>{let c=x(),u=(c.relationships.get("/")??[]).find(b=>b.type===a),y;if(u){let b=E(u);b.mode==="Internal"&&b.target.ok&&(y=c.parts.get(b.target.partName));}return y??c.parts.get(i)},qe=-1,Re=R,jn=()=>{if(qe===r.packageRevision)return Re;qe=r.packageRevision;let a=Qe(_n,"/docProps/core.xml"),i=Qe(Ln,"/docProps/app.xml");return Re=S(a?.root??null,i?.root??null),Re},Bn="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",et=false,Ie=null,ee=()=>{if(et)return Ie;et=true;let a=x(),i=(a.relationships.get(a.mainDocumentPart)??[]).find(u=>u.type===Bn),c;if(i){let u=E(i);u.mode==="Internal"&&u.target.ok&&(c=a.parts.get(u.target.partName));}return c??=a.parts.get("/word/theme/theme1.xml"),Ie=c?.root??null,Ie},Hn="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",ue=null,$n=()=>{if(ue)return ue;let a=x(),i=(a.relationships.get(a.mainDocumentPart)??[]).find(u=>u.type===Hn),c;if(i){let u=E(i);u.mode==="Internal"&&u.target.ok&&(c=a.parts.get(u.target.partName));}return c??=a.parts.get("/word/fontTable.xml"),ue=Object.freeze(G$1(a,c)),ue},te=null,ne=null,Te=null,tt=null,nt=null,ot=()=>{let a=[h().part.root],i=R$1();i&&a.push(i);let c=new Set;for(let u of _())c.has(u)||(c.add(u),a.push(u.root));return a},oe=null,pe=null,re=null,ae=null,Z=null,rt=new WeakMap,me=null,at=a=>{let i=rt.get(a);if(i)return i;let c=Wc(a);return rt.set(a,c),c},lt=()=>{let a=r.packageRevision,i=r.openStoryToken();if(!Z||Z.revision!==a||Z.openStories!==i){let c=r.openStoryParts(),u=new Set(c.map(E=>E.name)),y=_().filter(E=>!u.has(E.name)).map(at),b=[h().part,...c,...y],O=Z,N=O!==null&&f!==null&&O.openStories===i&&O.revision===f.fromRevision&&a===f.toRevision&&f.impact==="text-local"&&f.created.length===0&&f.deleted.length===0&&f.splitJoin.length===0&&O.parts.length===b.length&&O.parts.every((E,M)=>E.name===b[M]?.name);Z={revision:a,openStories:i,parts:b,index:N&&O?Mn(O.index,b):wn(b)};}return Z.index},st=()=>{let a=h().part.name,i=new Map;for(let c of [h().part,..._()])for(let[u,y]of eg(x(),c.name,a))i.set(u,y);return i},zn=()=>[h().part,..._()],_=()=>{let a=[],i=new Set;for(let u of P().parts)for(let y of [u.headers,u.footers])for(let b of y.values())i.has(b)||(i.add(b),a.push(b));let c=x();for(let u of ["footnote","endnote"]){let y=_d(c,u);!y||i.has(y)||(i.add(y),a.push(y));}return a};return {ok:true,session:{editable:w(h().part).length>0,paragraphIds:()=>w(h().part).map(a=>a.id),paragraphIdsIn(a=d){let i=r.partFor(a);return i?w(i).map(c=>c.id):[]},part:()=>h().part,partFor:a=>r.partFor(a),currentPackage:x,applyTreeOps(a,i,c,u=d){if(a.length===0)return {committed:false,rejected:false,opCount:0};let y=a.filter(O=>_c(O)||je$1(O)).length;if(y>0){if(y!==a.length||a.length!==1)return {committed:false,rejected:true,opCount:a.length,reason:"invalidArgs"};let O=r.applyLifecycleOp(a[0]);return O.ok?{committed:true,rejected:false,opCount:1}:{committed:false,rejected:true,opCount:1,reason:O.detail??O.reason}}let b=r.transact(u,O=>{i!==void 0&&O.selectionBefore(i),c!==void 0&&O.selectionAfter(c);for(let N of a)O.apply(N);});return b.ok?{committed:true,rejected:false,opCount:a.length}:{committed:false,rejected:true,opCount:a.length,reason:b.reason}},projectDoc:()=>U(h().part),reconcile:a=>He(a,h().part,f),lastCommitWasStructural:()=>f!==null&&(f.created.length>0||f.deleted.length>0||f.splitJoin.length>0||f.impact==="global"),applyPmDoc(a){let i=h(),c=Be(i.part,a);if(!c.ok)return {committed:false,rejected:true,opCount:0,reason:c.reason};if(c.ops.length===0)return {committed:false,rejected:false,opCount:0};let u=r.transact(d,y=>{for(let b of c.ops)y.apply(b);});return u.ok?{committed:true,rejected:false,opCount:c.ops.length}:{committed:false,rejected:true,opCount:c.ops.length,reason:u.reason}},storyParts:zn,bodyText:()=>sn(h().part),storyText(a){let i=r.partFor(a);return i?w(i).map(c=>Of(i,c.id)??"").join(`
5
+ `):null},revision:()=>h().revision,revisionFor:a=>r.revisionFor(a),packageRevision:()=>r.packageRevision,canUndo:()=>r.canUndo,canRedo:()=>r.canRedo,undo:()=>{let a=r.selectionForUndo();return r.undo()===null?null:a},redo:()=>{let a=r.selectionForRedo();return r.redo()===null?null:a},beginComposition:(a=d)=>{r.beginComposition(a);},endComposition:()=>r.endComposition(),subscribe(a){return r.subscribe(a)},save(){return pb(x())},headerFooterParts:()=>{let a=P().parts;return a[a.length-1]??Tb(x())},headerFooterPartsBySection:()=>P().parts,headerFooterResolutionBySection:()=>P().resolution,documentFonts(){return te&&te.revision===r.packageRevision||(te={revision:r.packageRevision,fonts:gn(ot(),de(ee()))}),te.fonts},rendersText(){return ne&&ne.revision===r.packageRevision||(ne={revision:r.packageRevision,rendersText:hn(ot())}),ne.rendersText},documentStyles(){oe??=Ke(R$1(),de(ee()));let a=oe;return Te??=kn(R$1(),i=>a(i)),Te},stylesRoot:()=>R$1(),documentThemeFonts(){return nt??=de(ee()),nt},numberingRoot:()=>ve(),settingsRoot:()=>Ve(),documentProperties:()=>jn(),trackingSettings:()=>O(Ve()),documentThemeColors(){return tt??=Tn(ee()),tt},effectiveRunDefaults(a,i){oe??=Ke(R$1(),de(ee()));let c=h();if(!pe||pe.revision!==c.revision){let u=new Map;for(let y of w(c.part))y.kind!=="textValue"&&u.set(y.id,Ge(y)??null);pe={revision:c.revision,byId:u};}return oe(pe.byId.get(a)??null,i)},documentOutline(){let a=h();return re&&re.revision===a.revision||(re={revision:a.revision,outline:Pn(a.part,R$1())}),re.outline},findText(a,i){let c=h(),u=`${i?.matchCase===true?"c":""}${i?.wholeWord===true?"w":""}${i?.limit??""}\0${a}`;if(ae&&ae.revision===c.revision&&ae.key===u)return ae.result;let y=On(c.part,a,i??{});return ae={revision:c.revision,key:u,result:y},y},embeddedFonts:$n,paragraphAnchors:lt,paraIdOf:a=>An(a,{body:h().part,openStories:r.openStoryParts(),otherStories:_(),normalize:at}),nodeIdOf:a=>lt().nodeByParaId.get(a.toUpperCase())??null,relationshipTarget:(a,i=d)=>{let c=x(),u=r.partFor(i);return u?Zc(c,u.name,a):null},bookmarks:()=>{let a=r.packageRevision;if(!me||me.revision!==a){let i=new Map(zc(h().part));for(let c of _())for(let[u,y]of zc(c))i.has(u)||i.set(u,y);me={revision:a,index:i};}return me.index},ensureHyperlinkRelationship(a,i=d){let c=r.partFor(i);if(!c)return null;let u=x(),y=Yc(u,a,c.name);return y?(y.pkg!==u&&r.replacePackageShell(y.pkg),y.relationshipId):null},reviewItems(){let a=e.reviewModel;if(!a)return Lo;let i=h(),c=`${r.packageRevision}:${i.revision}`;if(m&&m.revisionKey===c)return m.items;let u=x(),y=u.parts.get(Zf(u,i.part.name)),b=u.parts.get(_f(u,i.part.name)),O=_(),N=m&&f?pn(f,m,m.items,i.part,y,b,r.packageRevision):null,E,M;if(N&&m){let F=a.revisionItemsOfParagraph(i.part,N);dn(m.items,F,N)?(E=cn(m.items,m.paragraphOrder,N,F),M=m.paragraphOrder):(M=Jg(i.part),E=a.collectReviewItems({storyPart:i.part,furnitureParts:O,commentsPart:y,commentsExtendedPart:b,customNodePayloads:st()}));}else M=Jg(i.part),E=a.collectReviewItems({storyPart:i.part,furnitureParts:O,commentsPart:y,commentsExtendedPart:b,customNodePayloads:st()});return m={revisionKey:c,bodyRevision:i.revision,packageRevision:r.packageRevision,items:E,paragraphOrder:M,commentsPart:y,commentsExtendedPart:b},m.items},hasReviewContent(){let a=r.packageRevision;if(!p||p.revision!==a){let i=[h().part,..._()];p={revision:a,present:i.some(c=>sf(c).length>0||$e(c.root))};}return p.present},replyToComment(a,i,c,u,y,b=d){let O=b.kind==="body"?null:r.resolveStory(b),N=O?.ok?O.store:h(),E=r.currentPackage(),M=N.checkpoint();N.graftPackage(()=>r.currentPackage());let F=Wf(N,{anchor:{paragraphId:i.paragraphId,start:i.start,end:i.end,...i.endParagraphId===void 0?{}:{endParagraphId:i.endParagraphId}},author:u,text:c,...y===void 0?{}:{date:y},...a===null?{}:{replyToCommentId:a}});return F.ok?(N.restoreHistoryStacks(M),r.replacePackageShell(N.package),r.adoptPackageUnit(E),r.publishStoryWrite(F.change),F.commentId):null},setCommentResolved(a,i){let c=h(),u=r.currentPackage(),y=c.checkpoint();c.graftPackage(()=>r.currentPackage());let b=Xf(c,a,i);return b.ok?(b.changed&&(c.restoreHistoryStacks(y),r.replacePackageShell(c.package),r.adoptPackageUnit(u),r.publishStoryWrite(b.change)),true):false},deleteComment(a,i=d,c){return this.deleteComments([{commentId:a}],i,c)},deleteComments(a,i=d,c){if(a.length===0)return false;let u=i.kind==="body"?h().part:r.partFor(i);if(!u)return false;let y={storyPartName:u.name,...c===void 0?{}:{noteId:c}},b=h(),O=r.currentPackage(),N=b.checkpoint();b.graftPackage(()=>r.currentPackage());let E=false,M=false,F=b.transact(Wn=>{Wn.applyPackage(it=>{let le=it;for(let fe of a){let Ne=fe.parentCommentId===void 0?We$1(le,fe.commentId,y):Xe$1(le,fe.commentId,fe.parentCommentId,y);if(Ne===null)return E=true,it;M||=Ne!==le,le=Ne;}return le});});return E||!F.ok||!M?false:(b.restoreHistoryStacks(N),r.installPackageSnapshot(b.package),r.adoptPackageUnit(O),r.publishStoryWrite(F.change),true)},insertCustomNode(a,i=d){let c=i.kind==="body"?null:r.resolveStory(i),u=c?.ok?c.store:h();return k(u,()=>bg(u,a,h().part.name))},removeCustomNode(a,i=d){let c=i.kind==="body"?null:r.resolveStory(i),u=c?.ok?c.store:h();return k(u,()=>cg(u,a))},sweepCustomNodePayloads(a){let i=h(),c=dg(r.currentPackage(),i.part.name,a);return c.ok?c.removed.length===0?{ok:true,removed:[]}:(r.replacePackageShell(c.pkg),{ok:true,removed:c.removed}):{ok:false,reason:c.reason}},ensureListDefinition(a){let i=L(x(),a);return i?(r.replacePackageShell(i.pkg),T=false,A=null,i.numId):null},ensureNumberingLevel(a,i,c){let u=x(),y=M(u,a,i,c);return y?(y!==u&&(r.replacePackageShell(y),T=false,A=null),true):false},insertImage(a,i){return r.insertImage(a,i)},replaceImage(a,i,c,u,y,b){return r.replaceImage(a,i,c,u,y,b)},deleteImage(a,i){return r.deleteImage(a,i)},applyImageProperties(a,i){return r.applyImageProperties(a,i)}}}}var Bo=b.projection;function Zo(t,e,n){let o=t.filter(s=>s.localName!==e);return o.length!==t.length?o:[...o,n?{localName:e,attributes:n}:{localName:e}]}function Vo(t,e,n={}){let o=null,s=false,l=()=>n.onChange?.(r()),r=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:o}),g=d=>{s=true;let k=p.state.tr.replaceWith(0,p.state.doc.content.size,d.content);k.setMeta("addToHistory",false),p.dispatch(k),s=false;},m=d=>()=>(d()&&(g(e.projectDoc()),l()),true),p=new EditorView(t,{state:EditorState.create({doc:e.projectDoc(),plugins:[keymap({...baseKeymap,Home:selectTextblockStart,End:selectTextblockEnd,"Mod-z":m(()=>e.undo()!==null),"Mod-y":m(()=>e.redo()!==null),"Shift-Mod-z":m(()=>e.redo()!==null),"Mod-b":(d,k)=>x(d,k,"b"),"Mod-i":(d,k)=>x(d,k,"i"),"Mod-u":(d,k)=>x(d,k,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:d=>(f(d),false),beforeinput:(d,k)=>{let P=k;if(d.composing)return false;f(d);let I=P.inputType;if(I==="insertText"&&P.data!=null){P.preventDefault();let{from:S,to:v}=d.state.selection;return d.dispatch(d.state.tr.insertText(P.data,S,v)),true}if(I==="deleteContentBackward"){P.preventDefault();let{from:S,empty:v}=d.state.selection;return v?S>0?d.dispatch(d.state.tr.delete(S-1,S)):joinBackward(d.state,d.dispatch):deleteSelection(d.state,d.dispatch),true}if(I==="deleteContentForward"){P.preventDefault();let{from:S,to:v,empty:R}=d.state.selection;return R?v<d.state.doc.content.size?d.dispatch(d.state.tr.delete(S,S+1)):joinForward(d.state,d.dispatch):deleteSelection(d.state,d.dispatch),true}return I==="insertParagraph"?(P.preventDefault(),splitBlock(d.state,d.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),l(),false)},dispatchTransaction(d){let k=p.state.apply(d);if(s||!d.docChanged){p.updateState(k);return}let P=e.applyPmDoc(k.doc);if(P.rejected){o=String(P.reason??"rejected"),p.updateState(k),g(e.projectDoc()),l();return}o=null,p.updateState(P.committed&&e.lastCommitWasStructural()?h(k):k),l();}});function f(d){if(d.composing||s)return;let k=d.dom.ownerDocument.getSelection(),P=k?.anchorNode,I=k?.focusNode;if(!(!k||!P||!I)&&!(!d.dom.contains(P)||!d.dom.contains(I)))try{let S=d.posAtDOM(P,k.anchorOffset),v=d.posAtDOM(I,k.focusOffset),R=d.state.selection;if(R.anchor===S&&R.head===v)return;let T=TextSelection.create(d.state.doc,S,v);d.dispatch(d.state.tr.setSelection(T).setMeta("addToHistory",!1));}catch{}}function h(d){let k=e.paragraphIds(),P=d.tr,I=false,S=0;return d.doc.forEach((v,R)=>{let T=k[S];S+=1,!(v.type.name!=="paragraph"||T===void 0)&&v.attrs.nodeId!==T&&(P=P.setNodeMarkup(R,void 0,{...v.attrs,nodeId:T}),I=true);}),I?d.apply(P.setMeta("addToHistory",false)):d}function x(d,k,P,I){let S=C.marks.runProps;if(!k)return true;let{from:v,to:R,empty:T}=d.selection;if(T)return true;let ve=d.doc.resolve(v).marks().find(q=>q.type===S)?.attrs.props??[],ce=Zo(ve,P,I),J=d.tr;return J.removeMark(v,R,S),ce.length>0&&J.addMark(v,R,S.create({props:ce})),k(J),true}return {view:p,state:r,undo:()=>m(()=>e.undo()!==null)(),redo:()=>m(()=>e.redo()!==null)(),toggleRunProperty(d,k){x(p.state,p.dispatch.bind(p),d,k);},destroy:()=>p.destroy()}}export{C as a,Le as b,H as c,w as d,U as e,Be as f,ro as g,He as h,Ge as i,jo as j,Bo as k,Vo as l};
@@ -1,11 +1,11 @@
1
1
  export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.cjs';
2
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-items-DpsqTHio.cjs';
3
- export { A as AuthoredNoteNumbering, C as CanResult, q as DocumentChange, r as DocumentEditingMode, t as DocumentHandle, D as DocumentSource, l as Editor, b as EditorCommand, u as EditorCommandShape, w as EditorCommands, x as EditorError, y as EditorEvents, E as EditorFontError, z as EditorFontErrorCode, B as EditorHeaderFooterCommands, G as EditorNoteCommands, H as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorScope, N as EditorSelection, a as EditorSnapshot, F as FontConfiguration, m as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, p as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-CojjwMmF.cjs';
4
- export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-BjOcDB06.cjs';
2
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-items-B8tffIXj.cjs';
3
+ export { A as AuthoredNoteNumbering, C as CanResult, q as DocumentChange, r as DocumentEditingMode, t as DocumentHandle, D as DocumentSource, l as Editor, b as EditorCommand, u as EditorCommandShape, w as EditorCommands, x as EditorError, y as EditorEvents, E as EditorFontError, z as EditorFontErrorCode, B as EditorHeaderFooterCommands, G as EditorNoteCommands, H as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorScope, N as EditorSelection, a as EditorSnapshot, F as FontConfiguration, m as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, p as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-cAEf1uXW.cjs';
4
+ export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-BfWDD_0V.cjs';
5
5
  export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, InsertableContentControlType, NumberingRef, PageMargins, Paragraph, ParagraphDisagreements, ParagraphFlags, ParagraphFormatCommand, ParagraphTabStop, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.cjs';
6
- export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-B0-sCtw-.cjs';
7
- export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-DQOiwOuE.cjs';
6
+ export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-D1vNJ7XC.cjs';
7
+ export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-BiA-IXgo.cjs';
8
8
  import '../ooxml-package-CdEy9ufK.cjs';
9
- import '../semantic-records-C3Z76KeN.cjs';
9
+ import '../semantic-records-DadVT_E1.cjs';
10
10
  import '../revision-projection-Cc4wz30g.cjs';
11
11
  import '../omml-equation-BD-LsmWE.cjs';
@@ -1,11 +1,11 @@
1
1
  export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.js';
2
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-items-D5SPFtsO.js';
3
- export { A as AuthoredNoteNumbering, C as CanResult, q as DocumentChange, r as DocumentEditingMode, t as DocumentHandle, D as DocumentSource, l as Editor, b as EditorCommand, u as EditorCommandShape, w as EditorCommands, x as EditorError, y as EditorEvents, E as EditorFontError, z as EditorFontErrorCode, B as EditorHeaderFooterCommands, G as EditorNoteCommands, H as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorScope, N as EditorSelection, a as EditorSnapshot, F as FontConfiguration, m as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, p as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-PUlv5Pp7.js';
4
- export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-Cca1-X_a.js';
2
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-items-bdGxFWNA.js';
3
+ export { A as AuthoredNoteNumbering, C as CanResult, q as DocumentChange, r as DocumentEditingMode, t as DocumentHandle, D as DocumentSource, l as Editor, b as EditorCommand, u as EditorCommandShape, w as EditorCommands, x as EditorError, y as EditorEvents, E as EditorFontError, z as EditorFontErrorCode, B as EditorHeaderFooterCommands, G as EditorNoteCommands, H as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorScope, N as EditorSelection, a as EditorSnapshot, F as FontConfiguration, m as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, p as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-Cvd7Geoc.js';
4
+ export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-D-RZ9Ust.js';
5
5
  export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, InsertableContentControlType, NumberingRef, PageMargins, Paragraph, ParagraphDisagreements, ParagraphFlags, ParagraphFormatCommand, ParagraphTabStop, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.js';
6
- export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-XMVsJSpe.js';
7
- export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-eZqD_-vC.js';
6
+ export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-CnRb7AYo.js';
7
+ export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-BgA9EQxY.js';
8
8
  import '../ooxml-package-CdEy9ufK.js';
9
- import '../semantic-records-Cc1MJrhM.js';
9
+ import '../semantic-records-DCt-ZwKU.js';
10
10
  import '../revision-projection-CILpvv4M.js';
11
11
  import '../omml-equation-Dd3mBep-.js';
@@ -1,11 +1,11 @@
1
- export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-CojjwMmF.cjs';
1
+ export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-cAEf1uXW.cjs';
2
2
  import './document.cjs';
3
3
  import './types.cjs';
4
- import '../review-items-DpsqTHio.cjs';
4
+ import '../review-items-B8tffIXj.cjs';
5
5
  import '../ooxml-package-CdEy9ufK.cjs';
6
- import '../tree-op-types-B0-sCtw-.cjs';
7
- import '../semantic-interaction-BjOcDB06.cjs';
8
- import '../semantic-records-C3Z76KeN.cjs';
9
- import '../image-resources-DQOiwOuE.cjs';
6
+ import '../tree-op-types-D1vNJ7XC.cjs';
7
+ import '../semantic-interaction-BfWDD_0V.cjs';
8
+ import '../semantic-records-DadVT_E1.cjs';
9
+ import '../image-resources-BiA-IXgo.cjs';
10
10
  import '../revision-projection-Cc4wz30g.cjs';
11
11
  import '../omml-equation-BD-LsmWE.cjs';
@@ -1,11 +1,11 @@
1
- export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-PUlv5Pp7.js';
1
+ export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-Cvd7Geoc.js';
2
2
  import './document.js';
3
3
  import './types.js';
4
- import '../review-items-D5SPFtsO.js';
4
+ import '../review-items-bdGxFWNA.js';
5
5
  import '../ooxml-package-CdEy9ufK.js';
6
- import '../tree-op-types-XMVsJSpe.js';
7
- import '../semantic-interaction-Cca1-X_a.js';
8
- import '../semantic-records-Cc1MJrhM.js';
9
- import '../image-resources-eZqD_-vC.js';
6
+ import '../tree-op-types-CnRb7AYo.js';
7
+ import '../semantic-interaction-D-RZ9Ust.js';
8
+ import '../semantic-records-DCt-ZwKU.js';
9
+ import '../image-resources-BgA9EQxY.js';
10
10
  import '../revision-projection-CILpvv4M.js';
11
11
  import '../omml-equation-Dd3mBep-.js';
@@ -1,7 +1,7 @@
1
1
  import { O as OoxmlPart } from '../ooxml-package-CdEy9ufK.cjs';
2
- import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-items-DpsqTHio.cjs';
3
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-items-DpsqTHio.cjs';
4
- export { R as RevisionAddress } from '../tree-op-types-B0-sCtw-.cjs';
2
+ export { R as RevisionAddress } from '../tree-op-types-D1vNJ7XC.cjs';
3
+ import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-items-B8tffIXj.cjs';
4
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-items-B8tffIXj.cjs';
5
5
  import { R as RevisionDisplayMode } from '../revision-projection-Cc4wz30g.cjs';
6
6
  import './types.cjs';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { O as OoxmlPart } from '../ooxml-package-CdEy9ufK.js';
2
- import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-items-D5SPFtsO.js';
3
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-items-D5SPFtsO.js';
4
- export { R as RevisionAddress } from '../tree-op-types-XMVsJSpe.js';
2
+ export { R as RevisionAddress } from '../tree-op-types-CnRb7AYo.js';
3
+ import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-items-bdGxFWNA.js';
4
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-items-bdGxFWNA.js';
5
5
  import { R as RevisionDisplayMode } from '../revision-projection-CILpvv4M.js';
6
6
  import './types.js';
7
7
 
@@ -1,9 +1,9 @@
1
1
  import { c as OoxmlPackage, O as OoxmlPart, a as OoxmlNode } from './ooxml-package-CdEy9ufK.js';
2
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-eZqD_-vC.js';
3
- import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-XMVsJSpe.js';
2
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-BgA9EQxY.js';
3
+ import { h as RevisionAttributionInput, i as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-CnRb7AYo.js';
4
4
  import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-z5Y4N1ab.js';
5
5
  import { N as NoteKind } from './note-nodes-BNCANoGN.js';
6
- import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-ClA-qng4.js';
6
+ import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-DgETo6Mf.js';
7
7
 
8
8
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
9
9
  type DrawingPropertyIdResult = {
@@ -283,6 +283,15 @@ declare function createNoteReferenceScanBudget(maxVisited?: number, maxParts?: n
283
283
  * later usable Internal notes part (same continue-past-bad pattern as settingsPartOf).
284
284
  */
285
285
  declare function resolveNotesPart(pkg: OoxmlPackage, noteKind: NoteKind): OoxmlPart | null;
286
+ /**
287
+ * Walk a part for addressable typed note references. Budgeted scans are bounded by
288
+ * visited nodes and fail closed on deep hostile nesting (the shared budget is marked
289
+ * truncated and the walk stops, so mutation callers refuse); budget-free scans are
290
+ * bounded by the 64-level depth cap and `maxHits` alone and fail open (a too-deep
291
+ * subtree is pruned and siblings still scan, so layout keeps every reachable citation).
292
+ * When `budget` is supplied it is shared and mutated in place. Hits are segment-aligned
293
+ * (`segmentsOf`); demoted wrappers never invent atomOffsets.
294
+ */
286
295
  declare function collectNoteReferences(part: OoxmlPart, options?: {
287
296
  readonly maxHits?: number;
288
297
  readonly budget?: NoteReferenceScanBudget;
@@ -320,6 +329,13 @@ type NoteLifecycleOp = {
320
329
  readonly noteKind: NoteKind;
321
330
  readonly paragraphId: string;
322
331
  readonly offset: number;
332
+ /**
333
+ * Write the citing reference as a TRACKED insertion: the reference run goes inside a
334
+ * `w:ins` carrying this attribution. The note body stays plain — rejecting the
335
+ * reference removes it, and the orphaned body is swept by the same cascade an
336
+ * untracked reference deletion triggers.
337
+ */
338
+ readonly revision?: RevisionAttributionInput;
323
339
  } | {
324
340
  readonly op: 'deleteNote';
325
341
  readonly noteKind: NoteKind;
@@ -353,7 +369,7 @@ type NoteLifecycleOp = {
353
369
  };
354
370
  };
355
371
  /** Why a note lifecycle op was refused. */
356
- type NoteLifecycleRejection = 'invalidArgs' | 'tree-invariant';
372
+ type NoteLifecycleRejection = 'invalidArgs' | 'invalid-property-value' | 'tree-invariant';
357
373
  /**
358
374
  * A new package, or a typed rejection.
359
375
  *
@@ -1,9 +1,9 @@
1
1
  import { c as OoxmlPackage, O as OoxmlPart, a as OoxmlNode } from './ooxml-package-CdEy9ufK.cjs';
2
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-DQOiwOuE.cjs';
3
- import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-B0-sCtw-.cjs';
2
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-BiA-IXgo.cjs';
3
+ import { h as RevisionAttributionInput, i as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-D1vNJ7XC.cjs';
4
4
  import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-Dvk6De4Q.cjs';
5
5
  import { N as NoteKind } from './note-nodes-DL-Au22P.cjs';
6
- import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-C6vc8E_2.cjs';
6
+ import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-B_sJBMIS.cjs';
7
7
 
8
8
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
9
9
  type DrawingPropertyIdResult = {
@@ -283,6 +283,15 @@ declare function createNoteReferenceScanBudget(maxVisited?: number, maxParts?: n
283
283
  * later usable Internal notes part (same continue-past-bad pattern as settingsPartOf).
284
284
  */
285
285
  declare function resolveNotesPart(pkg: OoxmlPackage, noteKind: NoteKind): OoxmlPart | null;
286
+ /**
287
+ * Walk a part for addressable typed note references. Budgeted scans are bounded by
288
+ * visited nodes and fail closed on deep hostile nesting (the shared budget is marked
289
+ * truncated and the walk stops, so mutation callers refuse); budget-free scans are
290
+ * bounded by the 64-level depth cap and `maxHits` alone and fail open (a too-deep
291
+ * subtree is pruned and siblings still scan, so layout keeps every reachable citation).
292
+ * When `budget` is supplied it is shared and mutated in place. Hits are segment-aligned
293
+ * (`segmentsOf`); demoted wrappers never invent atomOffsets.
294
+ */
286
295
  declare function collectNoteReferences(part: OoxmlPart, options?: {
287
296
  readonly maxHits?: number;
288
297
  readonly budget?: NoteReferenceScanBudget;
@@ -320,6 +329,13 @@ type NoteLifecycleOp = {
320
329
  readonly noteKind: NoteKind;
321
330
  readonly paragraphId: string;
322
331
  readonly offset: number;
332
+ /**
333
+ * Write the citing reference as a TRACKED insertion: the reference run goes inside a
334
+ * `w:ins` carrying this attribution. The note body stays plain — rejecting the
335
+ * reference removes it, and the orphaned body is swept by the same cascade an
336
+ * untracked reference deletion triggers.
337
+ */
338
+ readonly revision?: RevisionAttributionInput;
323
339
  } | {
324
340
  readonly op: 'deleteNote';
325
341
  readonly noteKind: NoteKind;
@@ -353,7 +369,7 @@ type NoteLifecycleOp = {
353
369
  };
354
370
  };
355
371
  /** Why a note lifecycle op was refused. */
356
- type NoteLifecycleRejection = 'invalidArgs' | 'tree-invariant';
372
+ type NoteLifecycleRejection = 'invalidArgs' | 'invalid-property-value' | 'tree-invariant';
357
373
  /**
358
374
  * A new package, or a typed rejection.
359
375
  *
@@ -1,9 +1,9 @@
1
1
  import { DocEdits, DocQueries, DocQueryResults, ContentControlSummary } from './contracts/document.js';
2
- import { g as ReviewRevisionKind, c as ReviewCommentItem, b as ReviewRevisionItem, d as ReviewCustomItem } from './review-items-D5SPFtsO.js';
3
- import { a as SemanticSelection, S as SemanticPosition } from './semantic-interaction-Cca1-X_a.js';
2
+ import { g as ReviewRevisionKind, c as ReviewCommentItem, b as ReviewRevisionItem, d as ReviewCustomItem } from './review-items-bdGxFWNA.js';
3
+ import { a as SemanticSelection, S as SemanticPosition } from './semantic-interaction-D-RZ9Ust.js';
4
4
  import { ColorValue, ExecErrorCode, ParagraphFormatCommand, Watermark, DocAnchor, ExecResult, ContentControlFilter, DocRange, RunFormatting, Revision, Rect, SelectionPin, Unsubscribe } from './contracts/types.js';
5
- import { S as SourceCrop, b as ImageWrapTarget, c as DrawingKind, d as DrawingPositionInput, e as DrawingLocks } from './tree-op-types-XMVsJSpe.js';
6
- import { S as SupportedImageMime, I as ImageResourceState } from './image-resources-eZqD_-vC.js';
5
+ import { S as SourceCrop, b as ImageWrapTarget, c as DrawingKind, d as DrawingPositionInput, e as DrawingLocks } from './tree-op-types-CnRb7AYo.js';
6
+ import { S as SupportedImageMime, I as ImageResourceState } from './image-resources-BgA9EQxY.js';
7
7
 
8
8
  /**
9
9
  * `@docx-editor.dev/core/contracts/interaction` — semantic addressing and interaction outcomes.
@@ -1,9 +1,9 @@
1
1
  import { DocEdits, DocQueries, DocQueryResults, ContentControlSummary } from './contracts/document.cjs';
2
- import { g as ReviewRevisionKind, c as ReviewCommentItem, b as ReviewRevisionItem, d as ReviewCustomItem } from './review-items-DpsqTHio.cjs';
3
- import { a as SemanticSelection, S as SemanticPosition } from './semantic-interaction-BjOcDB06.cjs';
2
+ import { g as ReviewRevisionKind, c as ReviewCommentItem, b as ReviewRevisionItem, d as ReviewCustomItem } from './review-items-B8tffIXj.cjs';
3
+ import { a as SemanticSelection, S as SemanticPosition } from './semantic-interaction-BfWDD_0V.cjs';
4
4
  import { ColorValue, ExecErrorCode, ParagraphFormatCommand, Watermark, DocAnchor, ExecResult, ContentControlFilter, DocRange, RunFormatting, Revision, Rect, SelectionPin, Unsubscribe } from './contracts/types.cjs';
5
- import { S as SourceCrop, b as ImageWrapTarget, c as DrawingKind, d as DrawingPositionInput, e as DrawingLocks } from './tree-op-types-B0-sCtw-.cjs';
6
- import { S as SupportedImageMime, I as ImageResourceState } from './image-resources-DQOiwOuE.cjs';
5
+ import { S as SourceCrop, b as ImageWrapTarget, c as DrawingKind, d as DrawingPositionInput, e as DrawingLocks } from './tree-op-types-D1vNJ7XC.cjs';
6
+ import { S as SupportedImageMime, I as ImageResourceState } from './image-resources-BiA-IXgo.cjs';
7
7
 
8
8
  /**
9
9
  * `@docx-editor.dev/core/contracts/interaction` — semantic addressing and interaction outcomes.
package/dist/editor.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkFWUI7EXG_cjs=require('./chunk-FWUI7EXG.cjs');require('./chunk-RD266XSK.cjs'),require('./chunk-LJ6BY6IU.cjs'),require('./chunk-IEXDXWTA.cjs'),require('./chunk-DKMKH77K.cjs'),require('./chunk-XMHWBL3K.cjs');var chunkIMMAG4QP_cjs=require('./chunk-IMMAG4QP.cjs');require('./chunk-YMYCPY5Y.cjs');var chunk7VQ7YLW3_cjs=require('./chunk-7VQ7YLW3.cjs');Object.defineProperty(exports,"AUTO_ZOOM_MODE",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ia}});Object.defineProperty(exports,"BROWSER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Na}});Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.va}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.za}});Object.defineProperty(exports,"CHROME_UNAVAILABLE_KEY",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ca}});Object.defineProperty(exports,"DEFAULT_TABLE_CHROME_DRAFT",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Y}});Object.defineProperty(exports,"EMU_PER_POINT",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Q}});Object.defineProperty(exports,"FIT_WIDTH_ZOOM_MODE",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ja}});Object.defineProperty(exports,"IMAGE_OVERLAY_NUDGE_PT",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.O}});Object.defineProperty(exports,"IMAGE_OVERLAY_NUDGE_SHIFT_PT",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.P}});Object.defineProperty(exports,"LOADING_SNAPSHOT",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.d}});Object.defineProperty(exports,"MAX_RESOLVER_FAMILIES",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.e}});Object.defineProperty(exports,"PX_PER_CM",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.m}});Object.defineProperty(exports,"PX_PER_INCH",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.l}});Object.defineProperty(exports,"SNAP_TWIPS_CM",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.s}});Object.defineProperty(exports,"SNAP_TWIPS_INCH",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.r}});Object.defineProperty(exports,"TABLE_BORDER_STYLE_OPTIONS",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ca}});Object.defineProperty(exports,"TABLE_BORDER_TARGET_OPTIONS",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ba}});Object.defineProperty(exports,"TABLE_BORDER_WIDTH_OPTIONS",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.da}});Object.defineProperty(exports,"TABLE_CHROME_SLOT_IDS",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Z}});Object.defineProperty(exports,"TWIPS_PER_CM",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.q}});Object.defineProperty(exports,"TWIPS_PER_INCH",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.p}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.f}});Object.defineProperty(exports,"ZOOM_MAX",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ha}});Object.defineProperty(exports,"ZOOM_MIN",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ga}});Object.defineProperty(exports,"applyTableChromePick",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ea}});Object.defineProperty(exports,"applyThemeShade",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.y}});Object.defineProperty(exports,"applyThemeTint",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.x}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.h}});Object.defineProperty(exports,"canExecuteImageCommand",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.M}});Object.defineProperty(exports,"captureImageMutationPreconditions",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.L}});Object.defineProperty(exports,"chromeControlCount",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ba}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Aa}});Object.defineProperty(exports,"chromeProbeForSlot",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ia}});Object.defineProperty(exports,"chromeSlotId",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.wa}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ja}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.la}});Object.defineProperty(exports,"commandForTableChromeSlotValue",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ka}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.g}});Object.defineProperty(exports,"computeImageResizeResult",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ua}});Object.defineProperty(exports,"computeMovedImagePosition",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.V}});Object.defineProperty(exports,"computeResizedImageExtentEmu",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.U}});Object.defineProperty(exports,"createBrowserAutomationHost",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Oa}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ma}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.k}});Object.defineProperty(exports,"createImageOverlayScrollPort",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Va}});Object.defineProperty(exports,"createLayoutShaping",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.b}});Object.defineProperty(exports,"cropPercentFromCropPermille",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.I}});Object.defineProperty(exports,"cropPercentFromPermille",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.G}});Object.defineProperty(exports,"cropPercentFromSourceCrop",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.D}});Object.defineProperty(exports,"cropPermilleFromCropPercent",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.H}});Object.defineProperty(exports,"cropPermilleFromPercent",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.F}});Object.defineProperty(exports,"cssPixelsToLayoutPoints",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ra}});Object.defineProperty(exports,"defaultChromeGroups",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.xa}});Object.defineProperty(exports,"defaultTableLabel",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs._}});Object.defineProperty(exports,"disposeLayoutShaping",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.c}});Object.defineProperty(exports,"dragIndent",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.v}});Object.defineProperty(exports,"editorCommandKey",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ua}});Object.defineProperty(exports,"emuToOverlayPoints",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.T}});Object.defineProperty(exports,"equationAtPosition",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ea}});Object.defineProperty(exports,"executeImageCommand",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.N}});Object.defineProperty(exports,"finalizeImageOverlayInteraction",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Wa}});Object.defineProperty(exports,"formattingBarChromeGroups",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ya}});Object.defineProperty(exports,"generateRulerTicks",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.n}});Object.defineProperty(exports,"handlePosition",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.t}});Object.defineProperty(exports,"isStaleImageInteractionCommit",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.W}});Object.defineProperty(exports,"isTableChromeSlot",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.$}});Object.defineProperty(exports,"layoutPointsToCssPixels",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Qa}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.j}});Object.defineProperty(exports,"lowerColorValueForBorder",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.A}});Object.defineProperty(exports,"lowerColorValueForFill",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.B}});Object.defineProperty(exports,"mountPaginatedSurface",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Fa}});Object.defineProperty(exports,"overlayFrameToSheetCssPixels",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Sa}});Object.defineProperty(exports,"partOfNodeId",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.i}});Object.defineProperty(exports,"pointsToEmu",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.S}});Object.defineProperty(exports,"probeTableChromeCommand",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.fa}});Object.defineProperty(exports,"resizePreservesAspect",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ta}});Object.defineProperty(exports,"resolveColorValueToCss",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.C}});Object.defineProperty(exports,"resolveThemeColorHex",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.z}});Object.defineProperty(exports,"resolveZoomMode",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Ka}});Object.defineProperty(exports,"rulerPageBox",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.o}});Object.defineProperty(exports,"runSave",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ra}});Object.defineProperty(exports,"runTableChromeCommand",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.pa}});Object.defineProperty(exports,"runTableCommand",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ta}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.qa}});Object.defineProperty(exports,"sameZoomMode",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.La}});Object.defineProperty(exports,"selectedDrawingOverlayTargetOf",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.R}});Object.defineProperty(exports,"selectedImageStateOf",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.K}});Object.defineProperty(exports,"snapTwips",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.u}});Object.defineProperty(exports,"sourceCropFromCropPercent",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.E}});Object.defineProperty(exports,"surfaceExtent",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Da}});Object.defineProperty(exports,"surfacePaintScale",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.Pa}});Object.defineProperty(exports,"tableChromeIconPaths",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ha}});Object.defineProperty(exports,"tableChromeLabelKeyForTarget",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ga}});Object.defineProperty(exports,"tableChromeToolbarState",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.ma}});Object.defineProperty(exports,"tableChromeVisible",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.aa}});Object.defineProperty(exports,"tableCommandState",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.X}});Object.defineProperty(exports,"tableCommandToolbarState",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.sa}});Object.defineProperty(exports,"toEditorFontError",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.a}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.na}});Object.defineProperty(exports,"toolbarCommandStates",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.oa}});Object.defineProperty(exports,"validateImageCropPercent",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.J}});Object.defineProperty(exports,"validateThemeModifier",{enumerable:true,get:function(){return chunkFWUI7EXG_cjs.w}});Object.defineProperty(exports,"DEFAULT_IMAGE_RESOURCE_LIMITS",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.m}});Object.defineProperty(exports,"DRAWING_REL_FROM_H",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.xf}});Object.defineProperty(exports,"DRAWING_REL_FROM_V",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.yf}});Object.defineProperty(exports,"IMAGE_WRAP_TARGETS",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.Na}});Object.defineProperty(exports,"positionInputFromPropertiesCommand",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.Af}});Object.defineProperty(exports,"propertiesCommandHasPositionFields",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.zf}});Object.defineProperty(exports,"resolveImageResourceLimits",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.n}});Object.defineProperty(exports,"resolveSvgIntrinsicSize",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.eb}});Object.defineProperty(exports,"sniffImageMime",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.ab}});Object.defineProperty(exports,"validateDrawingPositionInput",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.wf}});Object.defineProperty(exports,"validateRasterHeader",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.fb}});Object.defineProperty(exports,"validateSetImagePositionCommand",{enumerable:true,get:function(){return chunkIMMAG4QP_cjs.Bf}});Object.defineProperty(exports,"resolveEditorModules",{enumerable:true,get:function(){return chunk7VQ7YLW3_cjs.a}});
1
+ 'use strict';var chunkKQGENNL5_cjs=require('./chunk-KQGENNL5.cjs');require('./chunk-7ETDCPF6.cjs'),require('./chunk-6KNLLEUW.cjs'),require('./chunk-H2656QDI.cjs'),require('./chunk-O4UULRAQ.cjs'),require('./chunk-7UU5YFCD.cjs');var chunk7ADTI533_cjs=require('./chunk-7ADTI533.cjs');require('./chunk-YMYCPY5Y.cjs');var chunk7VQ7YLW3_cjs=require('./chunk-7VQ7YLW3.cjs');Object.defineProperty(exports,"AUTO_ZOOM_MODE",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ia}});Object.defineProperty(exports,"BROWSER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Na}});Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.va}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.za}});Object.defineProperty(exports,"CHROME_UNAVAILABLE_KEY",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ca}});Object.defineProperty(exports,"DEFAULT_TABLE_CHROME_DRAFT",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Y}});Object.defineProperty(exports,"EMU_PER_POINT",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Q}});Object.defineProperty(exports,"FIT_WIDTH_ZOOM_MODE",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ja}});Object.defineProperty(exports,"IMAGE_OVERLAY_NUDGE_PT",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.O}});Object.defineProperty(exports,"IMAGE_OVERLAY_NUDGE_SHIFT_PT",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.P}});Object.defineProperty(exports,"LOADING_SNAPSHOT",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.d}});Object.defineProperty(exports,"MAX_RESOLVER_FAMILIES",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.e}});Object.defineProperty(exports,"PX_PER_CM",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.m}});Object.defineProperty(exports,"PX_PER_INCH",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.l}});Object.defineProperty(exports,"SNAP_TWIPS_CM",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.s}});Object.defineProperty(exports,"SNAP_TWIPS_INCH",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.r}});Object.defineProperty(exports,"TABLE_BORDER_STYLE_OPTIONS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ca}});Object.defineProperty(exports,"TABLE_BORDER_TARGET_OPTIONS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ba}});Object.defineProperty(exports,"TABLE_BORDER_WIDTH_OPTIONS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.da}});Object.defineProperty(exports,"TABLE_CHROME_SLOT_IDS",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Z}});Object.defineProperty(exports,"TWIPS_PER_CM",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.q}});Object.defineProperty(exports,"TWIPS_PER_INCH",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.p}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.f}});Object.defineProperty(exports,"ZOOM_MAX",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ha}});Object.defineProperty(exports,"ZOOM_MIN",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ga}});Object.defineProperty(exports,"applyTableChromePick",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ea}});Object.defineProperty(exports,"applyThemeShade",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.y}});Object.defineProperty(exports,"applyThemeTint",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.x}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.h}});Object.defineProperty(exports,"canExecuteImageCommand",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.M}});Object.defineProperty(exports,"captureImageMutationPreconditions",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.L}});Object.defineProperty(exports,"chromeControlCount",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ba}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Aa}});Object.defineProperty(exports,"chromeProbeForSlot",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ia}});Object.defineProperty(exports,"chromeSlotId",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.wa}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ja}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.la}});Object.defineProperty(exports,"commandForTableChromeSlotValue",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ka}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.g}});Object.defineProperty(exports,"computeImageResizeResult",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Va}});Object.defineProperty(exports,"computeMovedImagePosition",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.V}});Object.defineProperty(exports,"computeResizedImageExtentEmu",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.U}});Object.defineProperty(exports,"createBrowserAutomationHost",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Oa}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ma}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.k}});Object.defineProperty(exports,"createImageOverlayScrollPort",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Wa}});Object.defineProperty(exports,"createLayoutShaping",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.b}});Object.defineProperty(exports,"cropPercentFromCropPermille",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.I}});Object.defineProperty(exports,"cropPercentFromPermille",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.G}});Object.defineProperty(exports,"cropPercentFromSourceCrop",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.D}});Object.defineProperty(exports,"cropPermilleFromCropPercent",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.H}});Object.defineProperty(exports,"cropPermilleFromPercent",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.F}});Object.defineProperty(exports,"cssPixelsToLayoutPoints",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ra}});Object.defineProperty(exports,"defaultChromeGroups",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.xa}});Object.defineProperty(exports,"defaultTableLabel",{enumerable:true,get:function(){return chunkKQGENNL5_cjs._}});Object.defineProperty(exports,"disposeLayoutShaping",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.c}});Object.defineProperty(exports,"dragIndent",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.v}});Object.defineProperty(exports,"editorCommandKey",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ua}});Object.defineProperty(exports,"emuToOverlayPoints",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.T}});Object.defineProperty(exports,"equationAtPosition",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ea}});Object.defineProperty(exports,"executeImageCommand",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.N}});Object.defineProperty(exports,"finalizeImageOverlayInteraction",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Xa}});Object.defineProperty(exports,"formattingBarChromeGroups",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ya}});Object.defineProperty(exports,"generateRulerTicks",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.n}});Object.defineProperty(exports,"handlePosition",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.t}});Object.defineProperty(exports,"isStaleImageInteractionCommit",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.W}});Object.defineProperty(exports,"isTableChromeSlot",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.$}});Object.defineProperty(exports,"layoutPointsToCssPixels",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Qa}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.j}});Object.defineProperty(exports,"lowerColorValueForBorder",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.A}});Object.defineProperty(exports,"lowerColorValueForFill",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.B}});Object.defineProperty(exports,"mountPaginatedSurface",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Fa}});Object.defineProperty(exports,"overlayFrameToSheetCssPixels",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Sa}});Object.defineProperty(exports,"overlayHostOrigin",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ta}});Object.defineProperty(exports,"partOfNodeId",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.i}});Object.defineProperty(exports,"pointsToEmu",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.S}});Object.defineProperty(exports,"probeTableChromeCommand",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.fa}});Object.defineProperty(exports,"resizePreservesAspect",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ua}});Object.defineProperty(exports,"resolveColorValueToCss",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.C}});Object.defineProperty(exports,"resolveThemeColorHex",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.z}});Object.defineProperty(exports,"resolveZoomMode",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Ka}});Object.defineProperty(exports,"rulerPageBox",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.o}});Object.defineProperty(exports,"runSave",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ra}});Object.defineProperty(exports,"runTableChromeCommand",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.pa}});Object.defineProperty(exports,"runTableCommand",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ta}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.qa}});Object.defineProperty(exports,"sameZoomMode",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.La}});Object.defineProperty(exports,"selectedDrawingOverlayTargetOf",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.R}});Object.defineProperty(exports,"selectedImageStateOf",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.K}});Object.defineProperty(exports,"snapTwips",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.u}});Object.defineProperty(exports,"sourceCropFromCropPercent",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.E}});Object.defineProperty(exports,"surfaceExtent",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Da}});Object.defineProperty(exports,"surfacePaintScale",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.Pa}});Object.defineProperty(exports,"tableChromeIconPaths",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ha}});Object.defineProperty(exports,"tableChromeLabelKeyForTarget",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ga}});Object.defineProperty(exports,"tableChromeToolbarState",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.ma}});Object.defineProperty(exports,"tableChromeVisible",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.aa}});Object.defineProperty(exports,"tableCommandState",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.X}});Object.defineProperty(exports,"tableCommandToolbarState",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.sa}});Object.defineProperty(exports,"toEditorFontError",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.a}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.na}});Object.defineProperty(exports,"toolbarCommandStates",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.oa}});Object.defineProperty(exports,"validateImageCropPercent",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.J}});Object.defineProperty(exports,"validateThemeModifier",{enumerable:true,get:function(){return chunkKQGENNL5_cjs.w}});Object.defineProperty(exports,"DEFAULT_IMAGE_RESOURCE_LIMITS",{enumerable:true,get:function(){return chunk7ADTI533_cjs.m}});Object.defineProperty(exports,"DRAWING_REL_FROM_H",{enumerable:true,get:function(){return chunk7ADTI533_cjs.Cf}});Object.defineProperty(exports,"DRAWING_REL_FROM_V",{enumerable:true,get:function(){return chunk7ADTI533_cjs.Df}});Object.defineProperty(exports,"IMAGE_WRAP_TARGETS",{enumerable:true,get:function(){return chunk7ADTI533_cjs.Na}});Object.defineProperty(exports,"positionInputFromPropertiesCommand",{enumerable:true,get:function(){return chunk7ADTI533_cjs.Ff}});Object.defineProperty(exports,"propertiesCommandHasPositionFields",{enumerable:true,get:function(){return chunk7ADTI533_cjs.Ef}});Object.defineProperty(exports,"resolveImageResourceLimits",{enumerable:true,get:function(){return chunk7ADTI533_cjs.n}});Object.defineProperty(exports,"resolveSvgIntrinsicSize",{enumerable:true,get:function(){return chunk7ADTI533_cjs.eb}});Object.defineProperty(exports,"sniffImageMime",{enumerable:true,get:function(){return chunk7ADTI533_cjs.ab}});Object.defineProperty(exports,"validateDrawingPositionInput",{enumerable:true,get:function(){return chunk7ADTI533_cjs.Bf}});Object.defineProperty(exports,"validateRasterHeader",{enumerable:true,get:function(){return chunk7ADTI533_cjs.fb}});Object.defineProperty(exports,"validateSetImagePositionCommand",{enumerable:true,get:function(){return chunk7ADTI533_cjs.Gf}});Object.defineProperty(exports,"resolveEditorModules",{enumerable:true,get:function(){return chunk7VQ7YLW3_cjs.a}});
package/dist/editor.css CHANGED
@@ -3141,10 +3141,11 @@ a.docx-hyperlink:focus-visible {
3141
3141
 
3142
3142
  .docx-editor-one-surface__caret {
3143
3143
  position: absolute;
3144
- /* 2px, not 1: a hairline caret disappears against body text at 100% zoom on a
3144
+ /* 1.5px, not 1: a hairline caret disappears against body text at 100% zoom on a
3145
3145
  * high-DPI screen, and reads as a rendering artefact rather than a cursor.
3146
- * Every desktop word processor draws a two-pixel insertion point. */
3147
- width: 2px;
3146
+ * Not 2 either: with the contrast ring below, a 2px core read as a 4px slab that
3147
+ * overlapped the neighbouring glyphs — Word's insertion bar is thinner. */
3148
+ width: 1.5px;
3148
3149
  background: var(--doc-caret);
3149
3150
  /* A CONTRASTING 1px ring, because a caret position is not always beside text: the offset
3150
3151
  * before an inline image puts the insertion point exactly on the picture's leading edge,
@@ -3153,7 +3154,10 @@ a.docx-hyperlink:focus-visible {
3153
3154
  *
3154
3155
  * The ring and the core are a complementary pair, so whichever one the backdrop hides,
3155
3156
  * the other reads. On an ordinary white page the ring is white on white and the caret
3156
- * looks exactly as it did before.
3157
+ * looks exactly as it did before. The ring is TRANSLUCENT: at full strength it drew a
3158
+ * hard outline on mid-tone backdrops (highlights, table shading) where both colours are
3159
+ * visible at once, and the caret read as a boxed slab instead of a bar. Half strength
3160
+ * still lifts the bar off a dark photo without outlining it on a pink highlight.
3157
3161
  *
3158
3162
  * NOT `mix-blend-mode: difference`, which is the textbook XOR caret and is wrong here:
3159
3163
  * blending resolves against the nearest ISOLATED GROUP, and this stylesheet puts two of
@@ -3162,7 +3166,7 @@ a.docx-hyperlink:focus-visible {
3162
3166
  * editing. Inside either, the backdrop is transparent rather than the sheet's paper, so
3163
3167
  * the caret would blend to white and the dark page's inversion would then paint it black
3164
3168
  * on black: the very bug this ring exists to fix. The pair needs no backdrop at all. */
3165
- box-shadow: 0 0 0 1px var(--doc-caret-contrast);
3169
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--doc-caret-contrast) 50%, transparent);
3166
3170
  animation: docx-editor-caret-blink 1.06s steps(1) infinite;
3167
3171
  }
3168
3172
 
package/dist/editor.d.cts CHANGED
@@ -1,28 +1,28 @@
1
- export { D as DEFAULT_IMAGE_RESOURCE_LIMITS, b as ImageDecodePort, c as ImageResourceLimits, R as RenderableImageMime, S as SupportedImageMime, a as VectorImageMime, r as resolveImageResourceLimits, d as resolveSvgIntrinsicSize, s as sniffImageMime, v as validateRasterHeader } from './image-resources-DQOiwOuE.cjs';
2
- import { i as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-B0-sCtw-.cjs';
3
- export { j as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-B0-sCtw-.cjs';
1
+ export { D as DEFAULT_IMAGE_RESOURCE_LIMITS, b as ImageDecodePort, c as ImageResourceLimits, R as RenderableImageMime, S as SupportedImageMime, a as VectorImageMime, r as resolveImageResourceLimits, d as resolveSvgIntrinsicSize, s as sniffImageMime, v as validateRasterHeader } from './image-resources-BiA-IXgo.cjs';
2
+ import { j as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-D1vNJ7XC.cjs';
3
+ export { k as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-D1vNJ7XC.cjs';
4
4
  import { ColorValue } from './contracts/types.cjs';
5
5
  export { ParagraphFlags, ParagraphTabStop } from './contracts/types.cjs';
6
- export { R as ReviewModelInput } from './review-items-DpsqTHio.cjs';
7
- import { c as TreeDocxSessionView, g as DocumentThemeColorEntry } from './tree-session-D945D43B.cjs';
8
- export { a as TreeApplyResult } from './tree-session-D945D43B.cjs';
9
- import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-CojjwMmF.cjs';
10
- export { I as ImageContext, c as ImageCropPercent, d as ImageCropPermille, S as SelectedImageState, e as cropPercentFromCropPermille, f as cropPercentFromPermille, g as cropPercentFromSourceCrop, h as cropPermilleFromCropPercent, i as cropPermilleFromPercent, s as sourceCropFromCropPercent, v as validateImageCropPercent } from './editor-CojjwMmF.cjs';
11
- import { L as LayoutShapingOptions } from './shaped-measurer-CYSK20E2.cjs';
12
- import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-DGPSeLI0.cjs';
13
- export { A as AnchorFrameOrigin, C as CHROME_GROUPS, b as CHROME_MENUS, c as CHROME_UNAVAILABLE_KEY, d as ChromeControl, e as ChromeControlId, f as ChromeControlState, g as ChromeGroup, h as ChromeGroupId, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromeSlotId, p as DEFAULT_TABLE_CHROME_DRAFT, q as DocxEditorConfig, E as EMU_PER_POINT, r as EquationActivation, s as EquationChromeHandlers, t as EquationOps, F as FinalizedImageOverlayInteraction, u as FontConfigurationBase, v as FontConfigurationFragment, w as FontLoadFailure, x as FontLoadFailureReason, y as FontMeasurementState, z as FontResolutionRequest, B as FontResolver, G as FontUrlSource, H as HyperlinkActivation, I as HyperlinkChromeHandlers, J as HyperlinkOps, K as IMAGE_OVERLAY_NUDGE_PT, L as IMAGE_OVERLAY_NUDGE_SHIFT_PT, M as ImageInteractionSession, N as ImageOverlayScrollPort, Q as ImageResizeHandle, R as ImageResizeResult, S as LoadFontsRequest, U as LoadFontsResult, V as MAX_RESOLVER_FAMILIES, W as OverlayFrameRect, X as PaginatedSurfaceState, Y as ParagraphPropertyEdit, Z as RunTableChromeCommandResult, _ as SectionAnchor, $ as SelectedDrawingOverlayTarget, a0 as SurfaceEquation, a1 as SurfaceFormatting, a2 as SurfaceHyperlink, a3 as SurfaceNavigation, a4 as SurfaceOverlayCoordinates, a5 as SurfaceParagraphFormat, a6 as TABLE_BORDER_STYLE_OPTIONS, a7 as TABLE_BORDER_TARGET_OPTIONS, a8 as TABLE_BORDER_WIDTH_OPTIONS, a9 as TABLE_CHROME_SLOT_IDS, aa as TableBorderStyleOption, ab as TableBorderTargetOption, ac as TableBorderTargetValue, ad as TableBorderWidthOption, ae as TableChromeDraft, af as TableChromePick, ag as TableChromeSlotId, ah as TableInteractionLabelKey, ai as ToolbarCommandState, aj as WORD_DEFAULT_FONT, ak as applyTableChromePick, al as blankDocumentBytes, am as canExecuteImageCommand, an as captureImageMutationPreconditions, ao as chromeControlCount, ap as chromeMenuSlots, aq as chromeProbeForSlot, ar as chromeSlotId, as as commandForSlot, at as commandForSlotValue, au as commandForTableChromeSlotValue, av as composeFontConfiguration, aw as computeImageResizeResult, ax as computeMovedImagePosition, ay as computeResizedImageExtentEmu, az as createDocxEditor, aA as createFontSource, aB as createImageOverlayScrollPort, aC as cssPixelsToLayoutPoints, aD as defaultChromeGroups, aE as defaultTableLabel, aF as emuToOverlayPoints, aG as equationAtPosition, aH as executeImageCommand, aI as finalizeImageOverlayInteraction, aJ as formattingBarChromeGroups, aK as isStaleImageInteractionCommit, aL as isTableChromeSlot, aM as layoutPointsToCssPixels, aN as loadFonts, aO as overlayFrameToSheetCssPixels, aP as pointsToEmu, aQ as probeTableChromeCommand, aR as resizePreservesAspect, aS as runSave, aT as runTableChromeCommand, aU as runTableCommand, aV as runToolbarCommand, aW as selectedDrawingOverlayTargetOf, aX as selectedImageStateOf, aY as surfacePaintScale, aZ as tableChromeIconPaths, a_ as tableChromeLabelKeyForTarget, a$ as tableChromeToolbarState, b0 as tableChromeVisible, b1 as tableCommandToolbarState, b2 as toolbarCommandState, b3 as toolbarCommandStates } from './index-DGPSeLI0.cjs';
6
+ export { R as ReviewModelInput } from './review-items-B8tffIXj.cjs';
7
+ import { c as TreeDocxSessionView, g as DocumentThemeColorEntry } from './tree-session-Df02ajqc.cjs';
8
+ export { a as TreeApplyResult } from './tree-session-Df02ajqc.cjs';
9
+ import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-cAEf1uXW.cjs';
10
+ export { I as ImageContext, c as ImageCropPercent, d as ImageCropPermille, S as SelectedImageState, e as cropPercentFromCropPermille, f as cropPercentFromPermille, g as cropPercentFromSourceCrop, h as cropPermilleFromCropPercent, i as cropPermilleFromPercent, s as sourceCropFromCropPercent, v as validateImageCropPercent } from './editor-cAEf1uXW.cjs';
11
+ import { L as LayoutShapingOptions } from './shaped-measurer-CninrHr_.cjs';
12
+ import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-wb-iOxfh.cjs';
13
+ export { A as AnchorFrameOrigin, C as CHROME_GROUPS, b as CHROME_MENUS, c as CHROME_UNAVAILABLE_KEY, d as ChromeControl, e as ChromeControlId, f as ChromeControlState, g as ChromeGroup, h as ChromeGroupId, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromeSlotId, p as DEFAULT_TABLE_CHROME_DRAFT, q as DocxEditorConfig, r as DrawingSelectionIntent, E as EMU_PER_POINT, s as EquationActivation, t as EquationChromeHandlers, u as EquationOps, F as FinalizedImageOverlayInteraction, v as FontConfigurationBase, w as FontConfigurationFragment, x as FontLoadFailure, y as FontLoadFailureReason, z as FontMeasurementState, B as FontResolutionRequest, G as FontResolver, H as FontUrlSource, I as HyperlinkActivation, J as HyperlinkChromeHandlers, K as HyperlinkOps, L as IMAGE_OVERLAY_NUDGE_PT, M as IMAGE_OVERLAY_NUDGE_SHIFT_PT, N as ImageInteractionSession, Q as ImageOverlayScrollPort, R as ImageResizeHandle, S as ImageResizeResult, U as LoadFontsRequest, V as LoadFontsResult, W as MAX_RESOLVER_FAMILIES, X as OverlayFrameRect, Y as PaginatedSurfaceState, Z as ParagraphPropertyEdit, _ as RunTableChromeCommandResult, $ as SectionAnchor, a0 as SelectedDrawingOverlayTarget, a1 as SurfaceEquation, a2 as SurfaceFormatting, a3 as SurfaceHyperlink, a4 as SurfaceNavigation, a5 as SurfaceOverlayCoordinates, a6 as SurfaceParagraphFormat, a7 as TABLE_BORDER_STYLE_OPTIONS, a8 as TABLE_BORDER_TARGET_OPTIONS, a9 as TABLE_BORDER_WIDTH_OPTIONS, aa as TABLE_CHROME_SLOT_IDS, ab as TableBorderStyleOption, ac as TableBorderTargetOption, ad as TableBorderTargetValue, ae as TableBorderWidthOption, af as TableChromeDraft, ag as TableChromePick, ah as TableChromeSlotId, ai as TableInteractionLabelKey, aj as ToolbarCommandState, ak as WORD_DEFAULT_FONT, al as applyTableChromePick, am as blankDocumentBytes, an as canExecuteImageCommand, ao as captureImageMutationPreconditions, ap as chromeControlCount, aq as chromeMenuSlots, ar as chromeProbeForSlot, as as chromeSlotId, at as commandForSlot, au as commandForSlotValue, av as commandForTableChromeSlotValue, aw as composeFontConfiguration, ax as computeImageResizeResult, ay as computeMovedImagePosition, az as computeResizedImageExtentEmu, aA as createDocxEditor, aB as createFontSource, aC as createImageOverlayScrollPort, aD as cssPixelsToLayoutPoints, aE as defaultChromeGroups, aF as defaultTableLabel, aG as emuToOverlayPoints, aH as equationAtPosition, aI as executeImageCommand, aJ as finalizeImageOverlayInteraction, aK as formattingBarChromeGroups, aL as isStaleImageInteractionCommit, aM as isTableChromeSlot, aN as layoutPointsToCssPixels, aO as loadFonts, aP as overlayFrameToSheetCssPixels, aQ as overlayHostOrigin, aR as pointsToEmu, aS as probeTableChromeCommand, aT as resizePreservesAspect, aU as runSave, aV as runTableChromeCommand, aW as runTableCommand, aX as runToolbarCommand, aY as selectedDrawingOverlayTargetOf, aZ as selectedImageStateOf, a_ as surfacePaintScale, a$ as tableChromeIconPaths, b0 as tableChromeLabelKeyForTarget, b1 as tableChromeToolbarState, b2 as tableChromeVisible, b3 as tableCommandToolbarState, b4 as toolbarCommandState, b5 as toolbarCommandStates } from './index-wb-iOxfh.cjs';
14
14
  import { O as OoxmlPart } from './ooxml-package-CdEy9ufK.cjs';
15
15
  import { A as AutomationCapabilities, a as AutomationHost } from './protocol-UuZOcOp7.cjs';
16
16
  export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.cjs';
17
- import { S as SemanticLayout } from './semantic-records-C3Z76KeN.cjs';
18
- export { T as TextMeasurer } from './semantic-records-C3Z76KeN.cjs';
19
- export { S as SectionProperties } from './semantic-cell-selection-DJPjBWzf.cjs';
20
- export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-BjOcDB06.cjs';
21
- export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-Ur7pAINj.cjs';
22
- import './custom-node-writes-7ERv0f_X.cjs';
17
+ import { S as SemanticLayout } from './semantic-records-DadVT_E1.cjs';
18
+ export { T as TextMeasurer } from './semantic-records-DadVT_E1.cjs';
19
+ export { S as SectionProperties } from './semantic-cell-selection-BPzx6DdT.cjs';
20
+ export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-BfWDD_0V.cjs';
21
+ export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-Bd7EqzXV.cjs';
22
+ import './custom-node-writes-Dy3b20PS.cjs';
23
23
  import './hf-references-Dvk6De4Q.cjs';
24
24
  import './note-nodes-DL-Au22P.cjs';
25
- import './tree-store-C6vc8E_2.cjs';
25
+ import './tree-store-B_sJBMIS.cjs';
26
26
  import 'prosemirror-model';
27
27
  import './contracts/document.cjs';
28
28
  import './revision-projection-Cc4wz30g.cjs';