@betteroffice/docx 0.1.0 → 0.2.1

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 (63) hide show
  1. package/README.md +2 -6
  2. package/dist/chunk-47Q2FMFF.mjs +1 -0
  3. package/dist/chunk-6LQJAKOC.mjs +1 -0
  4. package/dist/chunk-ACGKK7IB.mjs +1 -0
  5. package/dist/{chunk-PI2I3TO5.mjs → chunk-AFMVSI4Z.mjs} +2 -2
  6. package/dist/chunk-GD4VNJ64.mjs +1 -0
  7. package/dist/{chunk-BUZ2X5CT.mjs → chunk-JHJLG4I6.mjs} +1 -1
  8. package/dist/chunk-PGMXWI5X.mjs +1 -0
  9. package/dist/{chunk-VRGUAKOC.mjs → chunk-WTFRNX5K.mjs} +1 -1
  10. package/dist/collaboration/index.d.mts +6 -6
  11. package/dist/{content-DrqzbIr7.d.mts → content-CvEtPl0c.d.mts} +59 -6
  12. package/dist/core.d.mts +7 -7
  13. package/dist/core.mjs +1 -1
  14. package/dist/{displayListQueries-DGDR-OWc.d.mts → displayListQueries-DF8F6fMl.d.mts} +2 -2
  15. package/dist/docx/index.d.mts +3 -3
  16. package/dist/docx/index.mjs +1 -1
  17. package/dist/editor/index.d.mts +20 -11
  18. package/dist/editor/index.mjs +1 -1
  19. package/dist/{fontLoader-DnixuYST.d.mts → fontLoader-b8eicJKV.d.mts} +1 -1
  20. package/dist/{formatting-BqrFPeev.d.mts → formatting-7zKCTu5a.d.mts} +3 -2
  21. package/dist/{frameDelta-DMgR8n13.d.mts → frameDelta-pA4jrQ1G.d.mts} +3 -2
  22. package/dist/generated/edit/docx_edit_bg.wasm +0 -0
  23. package/dist/generated/layout/docx_layout_bg.wasm +0 -0
  24. package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
  25. package/dist/generated/parse/docx_parse_bg.wasm +0 -0
  26. package/dist/{index-ImoMd0Ju.d.mts → index-CHl2zLJ7.d.mts} +117 -15
  27. package/dist/layout/index.d.mts +4 -4
  28. package/dist/layout/index.mjs +1 -1
  29. package/dist/layout/pagination/index.d.mts +4 -4
  30. package/dist/layout/pagination/index.mjs +1 -1
  31. package/dist/layout/render/index.d.mts +10 -10
  32. package/dist/layout/render/index.mjs +1 -1
  33. package/dist/plugin-api/RenderedDomContext.d.mts +7 -7
  34. package/dist/plugin-api/index.d.mts +3 -3
  35. package/dist/plugin-api/resolveItemPositions.d.mts +3 -3
  36. package/dist/{rustDisplayList-B9dQoLHI.d.mts → rustDisplayList-BJqaN9tt.d.mts} +2 -2
  37. package/dist/styles/index.d.mts +5 -9
  38. package/dist/styles/index.mjs +1 -1
  39. package/dist/{styles-CMybYYHS.d.mts → styles-7e-mq3c-.d.mts} +1 -1
  40. package/dist/types/content.d.mts +2 -2
  41. package/dist/types/document.d.mts +7 -6
  42. package/dist/{types-CXLxVF1t.d.mts → types-C4A8mWjU.d.mts} +19 -3
  43. package/dist/utils/comments.d.mts +2 -2
  44. package/dist/utils/index.d.mts +4 -4
  45. package/dist/utils/index.mjs +1 -1
  46. package/dist/utils/stylePreview.d.mts +2 -2
  47. package/dist/wasm-7SOSHNGP.mjs +1 -0
  48. package/dist/{wasm-T2CRCO7S.mjs → wasm-ZQAVP7P2.mjs} +1 -1
  49. package/dist/wasm-edit.d.mts +35 -27
  50. package/dist/wasm-edit.mjs +1 -1
  51. package/dist/wasm-layout.mjs +1 -1
  52. package/dist/wasm-parse.d.mts +2 -1
  53. package/dist/wasm-parse.mjs +1 -1
  54. package/dist/yrs/index.d.mts +5 -5
  55. package/dist/yrs/index.mjs +1 -1
  56. package/dist/yrs/residentEngineWorker.mjs +1 -1
  57. package/package.json +2 -2
  58. package/dist/chunk-24DL53QL.mjs +0 -1
  59. package/dist/chunk-GHEHBYQK.mjs +0 -1
  60. package/dist/chunk-HTDNSQ44.mjs +0 -1
  61. package/dist/chunk-TMHG7OAZ.mjs +0 -1
  62. package/dist/chunk-WBH3SXI6.mjs +0 -1
  63. package/dist/wasm-CJHQHBDE.mjs +0 -1
@@ -1 +1 @@
1
- import {d,c,e,s,t,v,f}from'../../chunk-24DL53QL.mjs';export{p as FRAME_DELTA_HEADER_BYTES,q as FRAME_DELTA_PAGE_OP_BYTES,o as FRAME_DELTA_VERSION,r as FrameDeltaError,a as GlyphCache,t as applyFrameDelta,u as applyFrameDeltaOwned,s as decodeFrameDelta,m as drawDisplayPage,n as drawPrimitive,b as fontSizePxFromShorthand,d as glyphRunRect,e as lineRect,h as presentDisplayPageBackBuffer,i as presentOffscreenPageBackBuffer,l as rasterizeDisplayListPages,g as rasterizeDisplayPageToBackBuffer,k as sizeCanvasForPage,c as textRunRect}from'../../chunk-24DL53QL.mjs';export{b as resolveCanvasPoint,a as resolveDisplayPageClientRect}from'../../chunk-WRWRCBLK.mjs';import {c as c$1}from'../../chunk-CTBUQRYQ.mjs';import {b}from'../../chunk-TTRUPDAB.mjs';var Ze={pages:[{pageIndex:0,width:816,height:1056,primitives:[{kind:"rect",x:96,y:96,w:624,h:20,fill:"#fff9c4",blockId:0,docStart:1,docEnd:12},{kind:"text",text:"Hello Word",x:96,baselineY:110,width:84.5,font:"700 16px Calibri, sans-serif",color:"#000000",docStart:1,docEnd:11,blockId:0},{kind:"decoration",deco:"underline",x:96,y:113,w:84.5,h:1,color:"#000000",docStart:1,docEnd:11,blockId:0},{kind:"text",text:" \u2014 second run",x:180.5,baselineY:110,width:96.25,font:"400 16px Calibri, sans-serif",color:"#c0392b",docStart:11,docEnd:24,blockId:0},{kind:"line",x1:96,y1:140,x2:720,y2:140,strokeWidth:.75,color:"#666666",role:"table-border"},{kind:"image",relId:"rId7",x:96,y:160,w:200,h:120,docStart:30,docEnd:31,blockId:2}]}]};function jt(){return import('../../wasm-T2CRCO7S.mjs').then(async e=>(await e.preloadLayoutWasm(),e.outlineGlyphJson))}var D={page:"layout-page layout-page-mirror",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer",block:"layout-paragraph",table:"layout-table",tableRow:"layout-table-row",tableCell:"layout-table-cell",text:"layout-run layout-run-text",rect:"layout-mirror-rect",image:"layout-run layout-run-image",shape:"layout-run layout-run-shape",chart:"layout-run layout-run-chart",decoration:"layout-decoration",line:"layout-mirror-line",pageBorder:"layout-page-border",tableCut:"layout-table-cut-border",blockSdt:"layout-block-sdt",inlineSdtWidget:"layout-inline-sdt-widget",revisionPmark:"layout-revision-pmark",revisionPmarkGlyph:"layout-revision-pmark-glyph",revisionPmarkIns:"layout-revision-ins",revisionPmarkDel:"layout-revision-del",listMarker:"layout-list-marker",revisionTable:"oox-revision-table",revisionRow:"oox-revision-row",revisionCell:"oox-revision-cell",revisionIns:"oox-revision-ins",revisionDel:"oox-revision-del",revisionMerge:"oox-revision-merge",notes:"layout-page-notes",note:"layout-note",noteBacklink:"layout-note-backlink"};function Ut(e,t={}){let r=t.document??document,i=t.labels,n={labels:i,noteRefIds:new Set},s=r.createElement("div");s.className=D.page,s.setAttribute("role","document"),i?.page&&s.setAttribute("aria-label",i.page),s.dataset.pageIndex=String(e.pageIndex),e.sectionId!==void 0&&(s.dataset.sectionId=e.sectionId),e.sectionIndex!==void 0&&(s.dataset.sectionIndex=String(e.sectionIndex)),e.sectionPageIndex!==void 0&&(s.dataset.sectionPageIndex=String(e.sectionPageIndex)),e.sectionPageNumber!==void 0&&(s.dataset.sectionPageNumber=String(e.sectionPageNumber)),e.pageLabel!==void 0&&(s.dataset.pageLabel=e.pageLabel),s.style.position="relative",s.style.width=`${e.width}px`,s.style.height=`${e.height}px`,s.style.opacity="0",s.style.pointerEvents="none";let o=r.createElement("div");o.className=D.content,o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.width=`${e.width}px`,o.style.height=`${e.height}px`,s.appendChild(o);for(let a of (e.pageBorders??[]).filter(l=>l.zOrder==="back"))o.appendChild(nt(a,r,0));re(o,e.primitives,r,0,n);for(let a of e.noteAreas??[])o.appendChild(cn(a,e,r,n));for(let a of [e.header,e.footer])a&&s.appendChild(qt(a,e,r,n));for(let a of (e.pageBorders??[]).filter(l=>l.zOrder!=="back"))s.appendChild(nt(a,r,0));return s}function qt(e,t,r,i){let n=r.createElement("div");n.className=e.kind==="header"?D.header:D.footer,n.dataset.hfRid=e.rId;let s=e.kind==="header"?i.labels?.header:i.labels?.footer;return s&&(n.setAttribute("role","region"),n.setAttribute("aria-label",s)),n.style.position="absolute",n.style.left="0",n.style.top=`${e.y}px`,n.style.width=`${t.width}px`,n.style.height=`${e.height}px`,re(n,e.primitives,r,-e.y,i),n}function re(e,t,r,i,n){let s=new Map;for(let o of t){let a=o.kind==="line"?void 0:o.blockKey??o.blockId;if(a===void 0){e.appendChild(he(o,r,i,n));continue}let l=o.table,c=l?.tableId!==void 0?`table:${l.tableId}#${l.rowStart??0}`:a,m=s.get(c);if(!m){let y=r.createElement("div");y.dataset.blockId=String(l?.tableId??a),y.style.position="absolute",y.style.left="0",y.style.top="0",e.appendChild(y),m={el:y,prims:[]},s.set(c,m);}m.prims.push(o);}for(let o of s.values())Zt(o,r,i,n);nn(s);}function Zt(e,t,r,i){let{el:n,prims:s}=e;if(!s.some(g=>g.cell!==void 0||g.structuralRevision?.scope==="table"||g.structuralRevision?.scope==="row"||g.structuralRevision?.scope==="cell")){et(n,s,t,r,i);return}n.className=D.table,n.setAttribute("role","table");let a=s.find(g=>g.table!==void 0)?.table;e.table=a,e.cells=[],a?.tableId!==void 0&&(n.dataset.tableId=a.tableId),a?.rowStart!==void 0&&(n.dataset.rowStart=String(a.rowStart)),a?.rowEnd!==void 0&&(n.dataset.rowEnd=String(a.rowEnd)),a?.headerRowCount!==void 0&&(n.dataset.headerRowCount=String(a.headerRowCount)),a?.parentTableId!==void 0&&(n.dataset.parentTableId=a.parentTableId),a?.caption&&n.setAttribute("aria-label",a.caption),a?.description&&n.setAttribute("aria-description",a.description);let l=ye(s,"table");l&&ge(n,l),He(n,s.find(g=>g.sdt!==void 0)?.sdt);for(let g of s)g.cell===void 0&&n.appendChild(he(g,t,r,i));let c=new Map,m=0,y=0;for(let g of s){if(g.cell===void 0)continue;let{row:f,col:h}=g.cell;m=Math.max(m,f+(g.cell.rowSpan??1)),y=Math.max(y,h+(g.cell.colSpan??1));let R=c.get(f);R||(R=new Map,c.set(f,R));let S=R.get(h);S||(S={ref:g.cell,prims:[]},R.set(h,S)),S.prims.push(g);}n.setAttribute("aria-rowcount",String(a?.rowCount??m)),n.setAttribute("aria-colcount",String(a?.columnCount??y));for(let g of [...c.keys()].sort((f,h)=>f-h)){let f=t.createElement("div");f.className=D.tableRow,f.setAttribute("role","row"),f.setAttribute("aria-rowindex",String(g+1));let h=ye(s,"row",g);h&&ge(f,h),f.style.position="absolute",f.style.left="0",f.style.top="0",n.appendChild(f);let R=c.get(g);for(let S of [...R.keys()].sort((v,L)=>v-L)){let v=R.get(S),L=t.createElement("div");L.className=D.tableCell,L.setAttribute("role",v.ref.isHeader?"columnheader":"cell"),L.setAttribute("aria-colindex",String(S+1)),v.ref.cellId&&(L.id=v.ref.cellId),v.ref.headerIds?.length&&L.setAttribute("aria-labelledby",v.ref.headerIds.join(" ")),v.ref.repeatedHeader&&(L.dataset.repeatedHeader="true"),v.ref.noWrap&&(L.dataset.noWrap="true");let E=v.ref.rowSpan??1,C=v.ref.colSpan??1;E>1&&L.setAttribute("aria-rowspan",String(E)),C>1&&L.setAttribute("aria-colspan",String(C));let P=ye(v.prims,"cell",g,S);P&&ge(L,P),v.ref.continuation&&(L.dataset.vmergeContinuation="true"),L.style.position="absolute",L.style.left="0",L.style.top="0";let Y=new Map,V=[];for(let M of v.prims){let F=M.blockKey??M.blockId;if(F===void 0){V.push(M);continue}let G=Y.get(F);G?G.push(M):Y.set(F,[M]);}for(let M of Ce(V))L.appendChild(he(M,t,r,i));for(let[M,F]of Y){let G=t.createElement("div");G.dataset.blockId=String(M),G.style.position="absolute",G.style.left="0",G.style.top="0",et(G,F,t,r,i),L.appendChild(G);}tn(L,v.prims),at(L,v.prims),e.cells.push({el:L,bounds:st(v.prims)}),f.appendChild(L);}}Be(n,s);}function et(e,t,r,i,n){let s=t.find(c=>c.chart!==void 0)?.chart;e.className=s?`${D.block} ${D.chart}`:D.block,e.setAttribute("role",s?"img":"paragraph"),s?.label&&e.setAttribute("aria-label",s.label);for(let c of Ce(t))e.appendChild(he(c,r,i,n));let o=ye(t,"pmark");o&&ge(e,o),en(e,t,r,i),He(e,t.find(c=>c.sdt!==void 0)?.sdt);let a=t.find(c=>c.paraId!==void 0)?.paraId;a!==void 0&&(e.dataset.paraId=a);let l=t.find(c=>c.fromLine!==void 0);l?.fromLine!==void 0&&(e.dataset.fromLine=String(l.fromLine),l.toLine!==void 0&&(e.dataset.toLine=String(l.toLine))),at(e,t),on(e,t);}function en(e,t,r,i){Be(e,t);let n=Number(e.dataset.docStart),s=Number(e.dataset.docEnd),o=t.map(y=>y.fragmentDocStart).filter(y=>Number.isFinite(y)),a=t.map(y=>y.fragmentDocEnd).filter(y=>Number.isFinite(y)),l=o.length>0?Math.min(...o):void 0,c=a.length>0?Math.max(...a):void 0,m=l??(Number.isFinite(n)&&n===s&&n>0?n-1:void 0);if(m!==void 0&&(e.dataset.docStart=String(m)),c!==void 0&&(e.dataset.docEnd=String(c)),m!==void 0&&!t.some(y=>y.docStart===m)){let y=Ce(t).find(f=>Te(f)!==void 0),g=y?Te(y):void 0;if(g){let f=r.createElement("span");f.className="layout-mirror-structural-anchor",f.dataset.docStart=String(m),f.dataset.docEnd=String(m),U(f,g,i),e.insertBefore(f,e.firstChild);}}}function tn(e,t){let r=e.querySelectorAll(".layout-paragraph[data-doc-start]"),i=1/0,n=-1/0;for(let s of r){let o=Number(s.dataset.docStart),a=Number(s.dataset.docEnd);Number.isFinite(o)&&(i=Math.min(i,o)),Number.isFinite(a)&&(n=Math.max(n,a));}i!==1/0&&(e.dataset.docStart=String(i)),n!==-1/0&&(e.dataset.docEnd=String(n)),i===1/0&&n===-1/0&&Be(e,t);}function nn(e){let t=new Map;for(let r of e.values())r.table?.tableId&&t.set(r.table.tableId,r);for(let r of e.values()){let i=r.table?.parentTableId;if(!i)continue;let n=t.get(i),s=st(r.prims);if(!n?.cells?.length||!s)continue;let o=s.x+s.w/2,a=s.y+s.h/2,l=n.cells.filter(c=>c.bounds&&rn(o,a,c.bounds));l.sort((c,m)=>tt(c.bounds)-tt(m.bounds)),l[0]?.el.appendChild(r.el);}}function rn(e,t,r){return e>=r.x&&e<=r.x+r.w&&t>=r.y&&t<=r.y+r.h}function tt(e){return e.w*e.h}function st(e){let t;for(let r of e){let i=r.clipGroup?.clip,n=i?.x!==void 0&&i.y!==void 0&&i.w!==void 0&&i.h!==void 0?{x:i.x,y:i.y,w:i.w,h:i.h}:Te(r);if(!n)continue;if(!t){t={...n};continue}let s=Math.max(t.x+t.w,n.x+n.w),o=Math.max(t.y+t.h,n.y+n.h);t.x=Math.min(t.x,n.x),t.y=Math.min(t.y,n.y),t.w=s-t.x,t.h=o-t.y;}return t}function Te(e){switch(e.kind){case "text":return c(e);case "glyphRun":return d(e);case "rect":return {x:e.x,y:e.y,w:e.w,h:e.h};case "image":case "shape":return {x:e.x,y:e.y,w:e.w,h:e.h};case "decoration":return {x:e.x,y:e.y,w:e.w,h:e.h}}}function Ce(e){let t=e.filter(i=>i.logicalOrder!==void 0).sort((i,n)=>(i.logicalOrder??0)-(n.logicalOrder??0)||(i.docStart??0)-(n.docStart??0));if(t.length<2)return e;let r=0;return e.map(i=>i.logicalOrder===void 0?i:t[r++])}function at(e,t){let r=t.find(s=>s.lang)?.lang;r&&(e.lang=r);let i=t.find(s=>s.bidiLevel!==void 0||"rtl"in s);if(!i)return;let n=i.bidiLevel!==void 0?i.bidiLevel%2===1:"rtl"in i?i.rtl:false;e.dir=n?"rtl":"ltr";}function on(e,t){let r=t.find(i=>i.ariaLabel||i.ariaDescription||i.decorative||i.hiddenObject||i.groupId);r&&ct(e,r);}function Be(e,t){let r,i;for(let n of t)n.docStart!==void 0&&(r=r===void 0?n.docStart:Math.min(r,n.docStart)),n.docEnd!==void 0&&(i=i===void 0?n.docEnd:Math.max(i,n.docEnd));r!==void 0&&(e.dataset.docStart=String(r)),i!==void 0&&(e.dataset.docEnd=String(i));}function ye(e,t,r,i){return e.find(n=>{let s=n.structuralRevision;return !(!s||s.scope!==t||r!==void 0&&s.rowIndex!==r||i!==void 0&&s.colIndex!==i)})?.structuralRevision}function he(e$1,t,r,i){switch(e$1.kind){case "text":{let n=it(t,e$1,i);return n.className=D.text,n.textContent=e$1.text,U(n,c(e$1),r),n.style.font=e$1.font,rt(n,e$1),ot(n,e$1),Ee(n,e$1.hidden&&e$1.opacity===void 0?.4:e$1.opacity,e$1.rotationDeg,e$1.horizontalScale),e$1.structuralRevision?.scope==="pmark"&&(n.classList.add(D.revisionPmarkGlyph),e$1.structuralRevision.kind==="ins"&&n.classList.add(D.revisionPmarkIns),e$1.structuralRevision.kind==="del"&&n.classList.add(D.revisionPmarkDel),n.setAttribute("aria-hidden","true")),e$1.listMarker&&(n.classList.add(D.listMarker),n.setAttribute("aria-hidden","true"),e$1.listMarkerRevision&&(n.style.color=e$1.listMarkerRevision==="ins"?"rgb(46, 125, 50)":"rgb(198, 40, 40)")),ne(n,e$1),n}case "glyphRun":{let n=it(t,e$1,i);return n.className=D.text,n.textContent=e$1.text,U(n,d(e$1),r),n.style.fontSize=`${e$1.size}px`,sn(n,e$1.fallbackFont),rt(n,e$1),ot(n,e$1),Ee(n,e$1.hidden&&e$1.opacity===void 0?.4:e$1.opacity,e$1.rotationDeg,e$1.horizontalScale),ne(n,e$1),n}case "rect":{let n=t.createElement("div");return n.className=D.rect,U(n,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),ne(n,e$1),n}case "line":{let n=t.createElement("div");return n.className=e$1.role==="table-cut"?D.tableCut:D.line,e$1.role&&e$1.role!=="table-cut"&&(n.dataset.role=e$1.role),U(n,e(e$1),r),n.setAttribute("aria-hidden","true"),n}case "image":{let n=e$1.href?t.createElement("a"):t.createElement("div");return n.className=D.image,e$1.decorative?n.setAttribute("aria-hidden","true"):(n.setAttribute("role","img"),e$1.altText&&n.setAttribute("aria-label",e$1.altText)),lt(n,e$1),n.dataset.relId=e$1.relId,U(n,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),Ee(n,e$1.opacity,e$1.rotationDeg),e$1.filter&&(n.style.filter=e$1.filter),ne(n,e$1),e$1.revision&&(n.style.outline=`2px solid ${e$1.revision.kind==="ins"?"rgb(46, 125, 50)":"rgb(198, 40, 40)"}`),e$1.href||(n.style.pointerEvents="auto"),n}case "shape":{let n=t.createElement("div");return n.className=D.shape,e$1.decorative?n.setAttribute("aria-hidden","true"):n.setAttribute("role","img"),U(n,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),an(n,e$1.transform),ne(n,e$1),n}case "decoration":{let n=t.createElement("span");return n.className=D.decoration,n.dataset.deco=e$1.deco,U(n,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),ne(n,e$1),n}}}function nt(e,t,r){let i=t.createElement("div");return i.className=D.pageBorder,U(i,{x:e.x,y:e.y,w:e.w,h:e.h},r),i.style.boxSizing="border-box",i.style.pointerEvents="none",i.style.zIndex=e.zOrder==="back"?"0":"20",fe(i,"Top",e.top),fe(i,"Right",e.right),fe(i,"Bottom",e.bottom),fe(i,"Left",e.left),i}function U(e,t,r=0){e.style.position="absolute",e.style.left=`${t.x}px`,e.style.top=`${t.y+r}px`,e.style.width=`${t.w}px`,e.style.height=`${t.h}px`;}function it(e,t,r){let i=t.noteRef?.id!==void 0?t.noteRef:void 0,n=t.href||i?e.createElement("a"):e.createElement("span");if(lt(n,t),i&&!t.href){let s=i.kind??"footnote",o=`oox-${s}-${i.id}`;n.setAttribute("href",`#${o}`),n.setAttribute("role","doc-noteref");let a=`oox-noteref-${s}-${i.id}`;r.noteRefIds.has(a)||(r.noteRefIds.add(a),n.id=a);}return n}function lt(e,t){let{href:r}=t;if(!r)return;e.setAttribute("href",r),e.dataset.href=r;let i=t.linkTitle??t.tooltip;i&&(e.title=i),t.linkTarget?e.setAttribute("target",t.linkTarget):r.startsWith("#")||e.setAttribute("target","_blank"),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer"),t.linkHistory!==void 0&&(e.dataset.linkHistory=String(t.linkHistory)),t.linkDocLocation!==void 0&&(e.dataset.linkDocLocation=t.linkDocLocation);}function sn(e,t){if(t)for(let r of t.split(" ")){if(r.endsWith("px"))break;r==="italic"?e.style.fontStyle="italic":/^[1-9]00$/.test(r)&&r!=="400"&&(e.style.fontWeight=r);}}function rt(e,t){t.lang&&(e.lang=t.lang),t.bidiLevel!==void 0?e.dir=t.bidiLevel%2===1?"rtl":"ltr":t.rtl&&(e.dir="rtl");}function fe(e,t,r){if(!r)return;let i=e.style;i[`border${t}Width`]=`${r.width}px`,i[`border${t}Style`]=r.style,i[`border${t}Color`]=r.color;}function Ee(e,t,r,i){t!==void 0&&(e.style.opacity=String(t));let n=[];r&&n.push(`rotate(${r}deg)`),i!==void 0&&i!==100&&n.push(`scaleX(${i/100})`),n.length>0&&(e.style.transform=n.join(" "),e.style.transformOrigin=i!==void 0&&i!==100?"left center":"center center");}function an(e,t){if(!t)return;let r=[];t.rotation&&r.push(`rotate(${t.rotation}deg)`),t.flipH&&r.push("scaleX(-1)"),t.flipV&&r.push("scaleY(-1)"),r.length!==0&&(e.style.transform=r.join(" "),e.style.transformOrigin="center center");}function ot(e,t){if(t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.hidden&&(e.classList.add("docx-hidden"),e.style.textDecoration="underline dotted"),t.textShadow==="emboss"?e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)":t.textShadow==="imprint"?e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)":t.textShadow==="shadow"&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",i=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=r,e.style.textEmphasisPosition=i,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=i;}t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function ne(e,t){if(t.docStart!==void 0&&(e.dataset.docStart=String(t.docStart)),t.docEnd!==void 0&&(e.dataset.docEnd=String(t.docEnd)),t.commentIds&&t.commentIds.length>0&&(e.dataset.commentId=t.commentIds.join(" ")),t.field){let r=t.field.type??t.field.category;r&&(e.dataset.fieldType=r),t.field.category&&(e.dataset.fieldCategory=t.field.category),t.field.instruction&&(e.dataset.fieldInstruction=t.field.instruction);let i=t.field.instruction?.trim()||r;i&&e.setAttribute("aria-description",i);}if(t.noteRef?.id!==void 0&&(e.dataset.noteRefKind=t.noteRef.kind??"footnote",e.dataset.noteRefId=String(t.noteRef.id)),t.comment){t.comment.status&&(e.dataset.commentStatus=t.comment.status),t.comment.authorId&&(e.dataset.commentAuthorId=t.comment.authorId),t.comment.paletteIndex!==void 0&&(e.dataset.commentPaletteIndex=String(t.comment.paletteIndex)),t.comment.color&&(e.dataset.commentColor=t.comment.color),t.comment.selected!==void 0&&(e.dataset.commentSelected=String(t.comment.selected)),t.comment.authorName&&(e.dataset.commentAuthorName=t.comment.authorName),t.comment.date&&(e.dataset.commentDate=t.comment.date),t.comment.replyCount!==void 0&&(e.dataset.commentReplyCount=String(t.comment.replyCount));let r=[t.comment.status,t.comment.authorName??t.comment.authorId,t.comment.date,t.comment.text,...(t.comment.replies??[]).map(i=>[i.authorName,i.text].filter(Boolean).join(": "))].filter(Boolean).join(", ");r&&e.setAttribute("aria-description",r);}if(t.revision){e.dataset.changeAuthor=t.revision.author,e.dataset.changeDate=t.revision.date,e.dataset.revisionId=t.revision.revisionId,e.classList.add(t.revision.kind==="ins"?"docx-insertion":"docx-deletion"),e.hasAttribute("role")||e.setAttribute("role",t.revision.kind==="ins"?"insertion":"deletion");let r=[t.revision.author,t.revision.date].filter(Boolean).join(", ");r&&e.setAttribute("aria-description",r);}t.href&&(e.dataset.href=t.href),ln(e,t.inlineSdtWidget),He(e,t.sdt),t.sdtPath?.length&&(e.dataset.sdtPath=t.sdtPath.map(r=>r.groupId).join(" ")),t.logicalOrder!==void 0&&(e.dataset.logicalOrder=String(t.logicalOrder)),t.bidiLevel!==void 0&&(e.dataset.bidiLevel=String(t.bidiLevel)),ct(e,t);}function ct(e,t){if(t.groupId&&(e.dataset.groupId=t.groupId),t.decorative||t.hiddenObject){e.setAttribute("aria-hidden","true"),e.removeAttribute("role"),e.removeAttribute("aria-label"),e.removeAttribute("aria-description");return}t.ariaLabel&&e.setAttribute("aria-label",t.ariaLabel),t.ariaDescription&&e.setAttribute("aria-description",t.ariaDescription);}function He(e,t){t&&(e.classList.add(D.blockSdt),e.dataset.sdtGroupId=t.groupId,e.dataset.sdtType=t.sdtType,t.depth!==void 0&&(e.dataset.sdtDepth=String(t.depth)),t.tag!==void 0&&(e.dataset.sdtTag=t.tag),t.alias!==void 0&&(e.dataset.sdtAlias=t.alias),t.lock!==void 0&&(e.dataset.sdtLock=t.lock),t.checked!==void 0&&(e.dataset.sdtChecked=String(t.checked)),t.bound!==void 0&&(e.dataset.sdtBound=String(t.bound)),t.repeatingItem!==void 0&&(e.dataset.sdtRepeatingItem=String(t.repeatingItem)),!e.hasAttribute("aria-label")&&(t.alias||t.tag)&&e.setAttribute("aria-label",t.alias||t.tag||""),t.lock&&e.setAttribute("aria-readonly","true"));}function ln(e,t){if(!t)return;e.classList.add(D.inlineSdtWidget);let r=t.controlKind??t.kind;e.dataset.sdtWidget=r,e.dataset.sdtGroupId=t.groupId,e.dataset.sdtPos=String(t.pos),t.tag!==void 0&&(e.dataset.sdtTag=t.tag),t.alias!==void 0&&(e.dataset.sdtAlias=t.alias),t.checked!==void 0&&(e.dataset.sdtChecked=String(t.checked),e.setAttribute("aria-checked",String(t.checked))),t.controlId!==void 0&&(e.dataset.sdtControlId=String(t.controlId)),t.value!==void 0&&(e.dataset.sdtValue=t.value),t.selectedIndex!==void 0&&(e.dataset.sdtSelectedIndex=String(t.selectedIndex)),t.dateFormat!==void 0&&(e.dataset.sdtDateFormat=t.dateFormat),t.dateLanguage!==void 0&&(e.dataset.sdtDateLanguage=t.dateLanguage),t.locked!==void 0&&(e.dataset.sdtLocked=String(t.locked)),r==="checkbox"?e.setAttribute("role","checkbox"):r==="dropDownList"||r==="comboBox"?(e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-expanded","false")):r==="date"?(e.setAttribute("role","button"),e.setAttribute("aria-haspopup","dialog")):e.setAttribute("role","group"),e.removeAttribute("tabindex"),(t.alias||t.tag)&&e.setAttribute("aria-label",t.alias||t.tag||""),t.locked&&e.setAttribute("aria-disabled","true");}function ge(e,t){switch(t.scope){case "pmark":e.classList.add(D.revisionPmark),t.kind==="ins"&&e.classList.add(D.revisionPmarkIns),t.kind==="del"&&e.classList.add(D.revisionPmarkDel);break;case "table":e.classList.add(D.revisionTable,Ae(t.kind));break;case "row":e.classList.add(D.revisionRow,Ae(t.kind));break;case "cell":e.classList.add(D.revisionCell,Ae(t.kind));break}e.dataset.revisionId=t.revisionId,e.dataset.revisionAuthor=t.author,t.date&&(e.dataset.revisionDate=t.date);let r=[t.author,t.date].filter(Boolean).join(", ");r&&e.setAttribute("aria-description",r);}function Ae(e){return e==="ins"?D.revisionIns:e==="del"?D.revisionDel:D.revisionMerge}function cn(e,t,r,i){let n=r.createElement("section");n.className=D.notes,n.dataset.noteKind=e.kind??"footnote",e.sectionId&&(n.dataset.sectionId=e.sectionId),e.columns!==void 0&&(n.dataset.columns=String(e.columns)),n.style.position="absolute",n.style.left="0",n.style.top=`${e.y??0}px`,n.style.width=`${t.width}px`,n.style.height=`${e.height??0}px`;let s=new Map;for(let a of e.notes??[])a.id!==void 0&&s.set(a.id,a);re(n,e.separatorPrimitives??[],r,-(e.y??0),i);let o=[...e.primitives??[]];for(let a of e.noteIds??[]){let c=`${e.kind??"footnote"}-${a}`,m=o.filter(f=>f.groupId===c);if(m.length===0)continue;for(let f of m){let h=o.indexOf(f);h>=0&&o.splice(h,1);}let y=r.createElement("aside");y.className=D.note,y.id=`oox-${c}`,y.dataset.noteId=String(a),y.setAttribute("role",e.kind==="endnote"?"doc-endnote":"doc-footnote");let g=s.get(a);if(g&&(g.label!==void 0&&(y.dataset.noteLabel=g.label),g.anchorDocStart!==void 0&&(y.dataset.anchorDocStart=String(g.anchorDocStart)),g.anchorDocEnd!==void 0&&(y.dataset.anchorDocEnd=String(g.anchorDocEnd))),re(y,m,r,-(e.y??0),i),g){let f=r.createElement("a");f.className=D.noteBacklink,f.setAttribute("role","doc-backlink"),f.setAttribute("href",`#oox-noteref-${c}`);let h=i.labels?.noteBacklink??g.label??String(a);f.setAttribute("aria-label",h),y.appendChild(f);}n.appendChild(y);}return o.length>0&&re(n,o,r,-(e.y??0),i),n}function dn(e,t){for(let r of Array.from(e.querySelectorAll(".layout-canvas-sdt-box[data-sdt-group-id]")))r.classList.toggle("layout-sdt-focused",t.has(r.dataset.sdtGroupId??""));}var un=".layout-sdt-widget, .layout-inline-sdt-widget, .layout-sdt-repeat-btn";function pn(e,t={}){let r=t.document??document,i=r.createElement("div");i.className="layout-interactive-overlay",i.dataset.pageIndex=String(e.pageIndex),i.style.position="absolute",i.style.inset="0",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.pointerEvents="none",i.addEventListener("mousedown",a=>{a.target?.closest?.(un)&&(a.preventDefault(),a.stopPropagation());});let n=mn(e),s=fn(n);for(let a of [...s.values()].sort(gn))i.appendChild(hn(a,r,t.labels));let o=yn(n);for(let a of o.values())i.appendChild(bn(a,r,t.labels));return i}function mn(e){return [...e.primitives,...e.header?.primitives??[],...e.footer?.primitives??[],...(e.noteAreas??[]).flatMap(t=>[...t.separatorPrimitives??[],...t.primitives??[]])]}function fn(e){let t=new Map;for(let r of e){let i=ut(r);if(!i)continue;let n=r.sdtPath?.length?r.sdtPath:r.sdt?[r.sdt]:[];for(let s of n){let o=t.get(s.groupId);o?o.rect=pt(o.rect,i):t.set(s.groupId,{attrs:s,rect:{...i}});}}return t}function yn(e){let t=new Map;for(let r of e){let i=r.inlineSdtWidget,n=ut(r);if(!i||!n)continue;let s=`${i.groupId}:${i.pos}:${i.controlKind??i.kind}`,o=t.get(s);o?o.rect=pt(o.rect,n):t.set(s,{attrs:i,rect:{...n}});}return t}function gn(e,t){return (e.attrs.depth??0)-(t.attrs.depth??0)||e.rect.y-t.rect.y||e.rect.x-t.rect.x}function hn(e,t,r){let{attrs:i,rect:n}=e,s=t.createElement("div");s.className="layout-block-sdt-box layout-canvas-sdt-box",Dn(s,i),mt(s,n),s.style.pointerEvents="none";let o=i.alias||i.tag;if(o){let c=t.createElement("span");c.className="layout-block-sdt-label",c.textContent=o,s.appendChild(c);}let a=Ln(i.sdtType),l=!i.bound&&!Rn(i.lock);if(a&&l){let c=t.createElement("button");c.type="button",c.className="layout-sdt-widget",c.dataset.sdtWidget=a,c.dataset.sdtGroupId=i.groupId,i.tag&&(c.dataset.sdtTag=i.tag),i.alias&&(c.dataset.sdtAlias=i.alias),(o||r?.control)&&c.setAttribute("aria-label",o||r?.control||""),a==="dropdown"&&c.setAttribute("aria-haspopup","listbox"),a==="date"&&c.setAttribute("aria-haspopup","dialog"),a==="checkbox"&&(c.setAttribute("role","checkbox"),c.setAttribute("aria-checked",String(i.checked??false))),c.textContent=a==="dropdown"?"\u25BE":a==="date"?"\u25A3":i.checked?"\u2612":"\u2610",c.style.pointerEvents="auto",s.appendChild(c);}if(i.repeatingItem&&l){let c=t.createElement("div");c.className="layout-sdt-repeat-controls",c.style.pointerEvents="auto",c.appendChild(dt(t,i,"add","\uFF0B",r?.addRepeatingItem,o)),c.appendChild(dt(t,i,"remove","\u2715",r?.removeRepeatingItem,o)),s.appendChild(c);}return s}function dt(e,t,r,i,n,s){let o=e.createElement("button");return o.type="button",o.className="layout-sdt-repeat-btn",o.dataset.sdtRepeat=r,o.dataset.sdtGroupId=t.groupId,t.tag&&(o.dataset.sdtTag=t.tag),(n||s)&&o.setAttribute("aria-label",n||s||""),o.textContent=i,o}function bn(e,t,r){let{attrs:i,rect:n}=e,s=i.controlKind??i.kind,o=t.createElement("button");return o.type="button",o.className="layout-sdt-widget layout-inline-sdt-widget layout-canvas-inline-sdt-widget",o.dataset.sdtWidget=xn(s),o.dataset.sdtGroupId=i.groupId,o.dataset.sdtPos=String(i.pos),i.tag&&(o.dataset.sdtTag=i.tag),i.alias&&(o.dataset.sdtAlias=i.alias),i.controlId!==void 0&&(o.dataset.sdtControlId=String(i.controlId)),i.value!==void 0&&(o.dataset.sdtValue=i.value),i.selectedIndex!==void 0&&(o.dataset.sdtSelectedIndex=String(i.selectedIndex)),i.dateFormat&&(o.dataset.sdtDateFormat=i.dateFormat),i.dateLanguage&&(o.dataset.sdtDateLanguage=i.dateLanguage),i.listItems?.length&&(o.dataset.sdtListItems=JSON.stringify(i.listItems)),(i.alias||i.tag||r?.control)&&o.setAttribute("aria-label",i.alias||i.tag||r?.control||""),s==="checkbox"?(o.setAttribute("role","checkbox"),o.setAttribute("aria-checked",String(i.checked??false))):s==="dropDownList"||s==="comboBox"?(o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false")):s==="date"&&o.setAttribute("aria-haspopup","dialog"),o.disabled=i.locked===true,o.textContent=s==="checkbox"?i.checked?"\u2612":"\u2610":s==="date"?"\u25A3":s==="picture"?"\u25A7":"\u25BE",mt(o,n),o.style.pointerEvents="auto",o}function xn(e){return e==="dropDownList"||e==="comboBox"?"dropdown":e}function Ln(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function Rn(e){return e==="contentLocked"||e==="sdtContentLocked"||e==="sdtLocked"}function Dn(e,t){e.dataset.sdtGroupId=t.groupId,e.dataset.sdtType=t.sdtType,t.depth!==void 0&&(e.dataset.sdtDepth=String(t.depth)),t.tag&&(e.dataset.sdtTag=t.tag),t.alias&&(e.dataset.sdtAlias=t.alias),t.lock&&(e.dataset.sdtLock=t.lock),t.checked!==void 0&&(e.dataset.sdtChecked=String(t.checked)),t.bound!==void 0&&(e.dataset.sdtBound=String(t.bound)),t.repeatingItem!==void 0&&(e.dataset.sdtRepeatingItem=String(t.repeatingItem));}function ut(e$1){let t=e$1.clipGroup?.clip;if(t?.x!==void 0&&t.y!==void 0&&t.w!==void 0&&t.h!==void 0)return {x:t.x,y:t.y,w:t.w,h:t.h};switch(e$1.kind){case "text":return c(e$1);case "glyphRun":return d(e$1);case "rect":return {x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h};case "line":return e(e$1);case "image":case "shape":return {x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h};case "decoration":return {x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h}}}function pt(e,t){let r=Math.min(e.x,t.x),i=Math.min(e.y,t.y),n=Math.max(e.x+e.w,t.x+t.w),s=Math.max(e.y+e.h,t.y+t.h);return {x:r,y:i,w:n-r,h:s-i}}function mt(e,t){e.style.position="absolute",e.style.left=`${t.x}px`,e.style.top=`${t.y}px`,e.style.width=`${Math.max(1,t.w)}px`,e.style.height=`${Math.max(1,t.h)}px`;}var K=class extends Error{constructor(r,i){let n=i instanceof Error?i.message:String(i);super(`Rust display-list ${r} failed: ${n}`);b(this,"stage");this.name="RustDisplayListSourceError",this.stage=r;}},ft=null;function Ge(){return ft??(ft=import('../../wasm-T2CRCO7S.mjs').then(async e=>(await e.preloadLayoutWasm(),{buildDisplayListJson:e.buildDisplayListJson,hitTestRegionsJson:e.hitTestRegionsJson,verticalMoveJson:e.verticalMoveJson,rangeRectsJson:e.rangeRectsJson,rangeRectsRegionJson:e.rangeRectsRegionJson,hasRangeRectsRegion:e.hasRangeRectsRegion,hasDisplayListSession:e.hasDisplayListSession,openDisplayList:e.openDisplayList,closeDisplayList:e.closeDisplayList,updateDisplayList:e.updateDisplayList,hasDisplayListUpdate:e.hasDisplayListUpdate,hitTestRegionsByHandle:e.hitTestRegionsByHandle,verticalMoveByHandle:e.verticalMoveByHandle,rangeRectsByHandle:e.rangeRectsByHandle,rangeRectsRegionByHandle:e.rangeRectsRegionByHandle}))),ft}function Fe(){return Ge()}function vn(e,t){let r=e.measured,i="[";for(let s=0;s<r.length;s++){s>0&&(i+=",");let o=r[s],a=o.measure,l;if(t&&a!==null&&typeof a=="object"){let c=a;l=t.get(c),l===void 0&&(l=JSON.stringify(o.measure),t.set(c,l));}else l=JSON.stringify(o.measure);i+='{"block":'+JSON.stringify(o.block)+',"measure":'+l+"}";}i+="]";let n='{"measured":'+i+',"options":'+JSON.stringify(e.options)+',"layout":'+JSON.stringify(e.layout);return e.contractVersion!==void 0&&(n+=',"contractVersion":'+JSON.stringify(e.contractVersion)),e.headersFooters!==void 0&&(n+=',"headersFooters":'+JSON.stringify(e.headersFooters)),e.fontChains!==void 0&&(n+=',"fontChains":'+JSON.stringify(e.fontChains)),e.noteAreas!==void 0&&(n+=',"noteAreas":'+JSON.stringify(e.noteAreas)),e.resolvedCommentIds!==void 0&&(n+=',"resolvedCommentIds":'+JSON.stringify(e.resolvedCommentIds)),e.commentAuthors!==void 0&&(n+=',"commentAuthors":'+JSON.stringify(e.commentAuthors)),e.commentThreads!==void 0&&(n+=',"commentThreads":'+JSON.stringify(e.commentThreads)),n+="}",n}function yt(e){let t={};return e.contractVersion!==void 0&&(t.contractVersion=e.contractVersion),e.headersFooters!==void 0&&(t.headersFooters=e.headersFooters),e.fontChains!==void 0&&(t.fontChains=e.fontChains),e.noteAreas!==void 0&&(t.noteAreas=e.noteAreas),e.resolvedCommentIds!==void 0&&(t.resolvedCommentIds=e.resolvedCommentIds),e.commentAuthors!==void 0&&(t.commentAuthors=e.commentAuthors),e.commentThreads!==void 0&&(t.commentThreads=e.commentThreads),JSON.stringify(t)}var In=new WeakMap;async function gt(e,t){let r;try{r=t??await Ge();}catch(s){throw new K("load",s)}let i,n;try{i=vn(e,In),n=r.buildDisplayListJson(i);}catch(s){throw new K("build",s)}try{return JSON.parse(n)}catch(s){throw new K("parse",s)}}async function Sn(e,t$1,r=null){let i;try{i=t$1??await Ge();}catch(l){throw new K("load",l)}if(!i.buildDisplayListFrame)return {displayList:await gt(e,i),frame:null,transport:"json"};let n=yt(e),s$1;try{s$1=i.buildDisplayListFrame(n,r?.frameEpoch??0);}catch(l){throw new K("build",l)}let o;try{o=s(s$1);}catch(l){throw new K("decode",l)}let a;try{a=t(r,o);}catch(l){throw new K("apply",l)}return {displayList:a.displayList,frame:a,transport:"frame-delta-v1"}}function ht(e,t,r){if(t==="body")return e.primitives.filter(n=>n.kind==="image");let i=t==="header"?e.header:e.footer;return !i||r!==void 0&&i.rId!==r?[]:i.primitives.filter(n=>n.kind==="image")}function Ne(e,t,r="body",i){for(let n of e.pages)for(let s of ht(n,r,i))if(s.docStart===t)return {primitive:s,pageIndex:n.pageIndex,...r!=="body"?{region:r,rId:i}:{}};return null}function Ye(e,t,r,i,n="body",s){let o=e.pages[t];if(!o)return null;let a=ht(o,n,s);for(let l=a.length-1;l>=0;l--){let c=a[l];if(!(r<c.x||r>c.x+c.w)&&!(i<c.y||i>c.y+c.h))return {primitive:c,pageIndex:o.pageIndex,...n!=="body"?{region:n,rId:s}:{}}}return null}function kn(e,t){let r=e.imageByPos(t);if(!r)return;let i=e.contentBounds(r.pageIndex),n=e.paragraphRects(t).find(s=>s.pageIndex===r.pageIndex);if(!(!i||!n))return {horizontalEmu:Math.round(c$1(r.primitive.x-i.x)),verticalEmu:Math.round(c$1(r.primitive.y-n.y))}}var be=(()=>{let e=globalThis.FinalizationRegistry;return e?new e(t=>t()):null})(),Oe=new WeakMap,Le=new WeakSet,_e=new Set;function wn(e){return e!=null&&Le.has(e)}function Mn(e){return _e.add(e),()=>{_e.delete(e);}}function xe(e){return e instanceof Error?typeof WebAssembly<"u"&&e instanceof WebAssembly.RuntimeError?true:e.name==="RuntimeError":false}function Pn(e,t){let r=new Map;e.list.pages.forEach((s,o)=>r.set(s,o));let i=[],n=[];return t.pages.forEach((s,o)=>{let a=r.get(s);a!==void 0&&v(s)===e.pageRevisions[a]?(i.push([o,a]),r.delete(s)):n.push([o,s]);}),i.length===0?null:JSON.stringify({total:t.pages.length,...t.contractVersion!==void 0?{contractVersion:t.contractVersion}:{},reuse:i,replace:n})}function En(e,t,r){let i=null,n=()=>i??(i=JSON.stringify(e)),s=An(t)?t:null,o=s?null:t??null,a=null,l,c,m=new Promise((d,u)=>{l=d,c=u;});m.catch(()=>{});let y=null,g=false,f$1=false,h=false,R={},S=null;if(r){let d=Oe.get(r);d&&(S=d.hasHandle()?r:d.donor(),d.supersede());}let v$1=()=>s??o,L=()=>{let d=v$1();return d!==null&&Le.has(d)},E=(d,u)=>{let p=u instanceof Error?u:new Error(String(u));a=p,y=null,be?.unregister(R);let b=v$1();if(!(!b||Le.has(b))){Le.add(b),console.error(`[CanvasRenderer] ${d} trapped in wasm; the session is unusable and must be rebuilt`,p);for(let x of _e)try{x(p);}catch(I){console.error("[CanvasRenderer] display-list source failure listener threw",I);}}},C=()=>{if(y!==null&&L()){y=null;return}if(y!==null){try{o?.closeDisplayList?.(y);}catch{}y=null;}},P=()=>{let d=S;if(S=null,!d||!o?.updateDisplayList||!o.hasDisplayListUpdate?.())return false;let u=Oe.get(d);if(!u||u.engine()!==o)return false;let p=Pn(u,e);if(!p)return false;let b=u.takeHandle();if(b===null)return false;try{return o.updateDisplayList(b,p),y=b,!0}catch(x){try{o.closeDisplayList?.(b);}catch{}return console.warn("[CanvasRenderer] display-list delta update failed; reopening",x),false}},Y=()=>{if(!(h||f$1||g||y!==null||!o||L())&&!(!o.hasDisplayListSession?.()||!o.openDisplayList)&&(g=true,!P()))try{y=o.openDisplayList(n());}catch(d){if(y=null,xe(d)){E("display-list session open",d);return}console.warn("[CanvasRenderer] display-list session open failed; using JSON-arg queries",d);}};s||o?l():Fe().then(d=>{o=d,l();},d=>{a=d instanceof Error?d:new Error(String(d)),c(a),console.warn("[CanvasRenderer] display-list query engine failed to load",a);});let V=(d,u,p)=>{if(!o||L())return null;if(y===null&&Y(),y!==null&&d)try{return d(y)}catch(b){if(xe(b))return E(p,b),null;console.warn(`[CanvasRenderer] ${p} session query failed; falling back`,b),C();}try{return u()}catch(b){return xe(b)?(E(p,b),null):(a=b instanceof Error?b:new Error(String(b)),console.warn(`[CanvasRenderer] ${p} query failed`,b),null)}},M=(d,u,p)=>{if(d===null)return u;try{return JSON.parse(d)}catch(b){return a=b instanceof Error?b:new Error(String(b)),console.warn(`[CanvasRenderer] ${p} returned invalid JSON`,b),u}},F=(d,u)=>{if(L())return null;try{return d()}catch(p){return xe(p)?(E(`resident ${u}`,p),null):(a=p instanceof Error?p:new Error(String(p)),console.warn(`[CanvasRenderer] resident ${u} query failed`,p),null)}},G=(d,u,p)=>{if(s)return M(F(()=>s.displayHitTestRegionsJson(d,u,p),"hit_test_regions"),null,"hit_test_regions");let b=V(o?.hitTestRegionsByHandle&&(x=>o.hitTestRegionsByHandle(x,d,u,p)),()=>o.hitTestRegionsJson(n(),d,u,p),"hit_test_regions");return M(b,null,"hit_test_regions")},ee=(d,u)=>{if(s)return M(F(()=>s.displayRangeRectsJson(d,u),"range_rects"),[],"range_rects");let p=V(o?.rangeRectsByHandle&&(b=>o.rangeRectsByHandle(b,d,u)),()=>o.rangeRectsJson(n(),d,u),"range_rects");return M(p,[],"range_rects")},le=(d,u,p)=>{let b=p??Number.NaN;if(s)return M(F(()=>s.displayVerticalMoveJson(d,u,b),"vertical_move"),null,"vertical_move");if(!o?.verticalMoveJson)return null;let x=V(o.verticalMoveByHandle&&(I=>o.verticalMoveByHandle(I,d,u,b)),()=>o.verticalMoveJson(n(),d,u,b),"vertical_move");return M(x,null,"vertical_move")},N=(d,u,p,b)=>{if(s)return M(F(()=>s.displayRangeRectsRegionJson(d,u,p,b),"range_rects_region"),[],"range_rects_region");if(!o||!o.hasRangeRectsRegion?.())return [];let x=V(o.rangeRectsRegionByHandle&&(I=>o.rangeRectsRegionByHandle(I,d,u,p,b)),()=>o.rangeRectsRegionJson(n(),d,u,p,b),"range_rects_region");return M(x,[],"range_rects_region")},q=(d,u,p,b)=>N(d,u,p,b),T=(d,u,p,b)=>N(d,String(u),p,b),$=(d,u)=>{let p=(x,I)=>{let k=new Map;for(let w of x)I&&k.has(w.pageIndex)||k.set(w.pageIndex,{pageIndex:w.pageIndex,x:I?w.x:w.x+w.width,y:w.y,width:0,height:w.height});return [...k.values()]},b=d(u,u+1);if(b.length>0)return p(b,true);if(u>0){let x=d(u-1,u);if(x.length>0)return p(x,false)}return []},O=(d,u,p)=>$((b,x)=>q(d,u,b,x),p),z=(d,u,p)=>$((b,x)=>T(d,u,b,x),p),_=d=>{let u=ee(d,d+1);if(u.length>0){let p=u[0];return {pageIndex:p.pageIndex,x:p.x,y:p.y,width:0,height:p.height}}if(d>0){let p=ee(d-1,d);if(p.length>0){let b=p[p.length-1];return {pageIndex:b.pageIndex,x:b.x+b.width,y:b.y,width:0,height:b.height}}}return null},J=d=>{let u=ee(d,d+2);return u.length>0?u[0]:_(d)},te=(d,u,p)=>{let b=q(d,u,p,p+2);if(b.length===0)return O(d,u,p);let x=new Map;for(let I of b)x.has(I.pageIndex)||x.set(I.pageIndex,I);return [...x.values()]},j=(d,u)=>({pageIndex:d,x:u.x,y:u.y,width:u.w,height:u.h}),De=d=>{let u=e.pages[d];return u?{pageIndex:u.pageIndex,x:0,y:0,width:u.width,height:u.height}:null},It=d=>{let u=e.pages[d],p=u?.contentBounds;return u&&p?{pageIndex:u.pageIndex,x:p.x,y:p.y,width:p.width,height:p.height}:null},St=d=>{let u=e.pages[d];return u?(u.columnBounds??[]).map(p=>({pageIndex:u.pageIndex,x:p.x,y:p.y,width:p.width,height:p.height})):[]},ve=d=>d.paraId?`para:${d.paraId}`:d.blockKey!==void 0?`block-key:${d.blockKey}`:d.blockId!==void 0?`block-id:${d.blockId}`:null,ze=d=>d.blockKey??d.blockId,ce=null,kt=()=>{if(ce)return ce;let d=new Map;for(let u of e.pages)for(let p of u.primitives){let b=ve(p);if(!b||p.docStart===void 0||p.docEnd===void 0)continue;let x=f(p),I=d.get(b);I||(I=new Map,d.set(b,I));let k=I.get(u.pageIndex);if(!k){I.set(u.pageIndex,{...j(u.pageIndex,x),from:p.docStart,to:p.docEnd,blockId:ze(p),paraId:p.paraId});continue}let w=Math.min(k.x,x.x),A=Math.min(k.y,x.y),ue=Math.max(k.x+k.width,x.x+x.w),pe=Math.max(k.y+k.height,x.y+x.h);k.x=w,k.y=A,k.width=ue-w,k.height=pe-A,k.from=Math.min(k.from,p.docStart),k.to=Math.max(k.to,p.docEnd);}return ce=new Map([...d].map(([u,p])=>[u,[...p.values()]])),ce},wt=d=>{let u=null;for(let p of e.pages)for(let b of p.primitives){let x=ve(b),I=b.docStart,k=b.docEnd;if(!x||I===void 0||k===void 0||d<I||d>k)continue;let w={identity:x,span:Math.max(0,k-I),startsAtPos:I===d};(!u||w.startsAtPos&&!u.startsAtPos||w.startsAtPos===u.startsAtPos&&w.span<u.span)&&(u=w);}return u?kt().get(u.identity)??[]:[]},Mt=1.5,de=null,je=()=>{if(de)return de;let d=[];for(let u of e.pages){let p=[],b=0;for(let x of u.primitives){if(x.kind!=="text"&&x.kind!=="glyphRun"||x.docStart===void 0||x.docEnd===void 0||x.kind==="glyphRun"&&x.glyphs.length===0)continue;let I=x.kind==="text"?x.baselineY:x.glyphs.reduce((me,Tt)=>Math.max(me,Tt.y),-1/0);if(!Number.isFinite(I))continue;let k=ve(x)??`anonymous:${b++}`,w=f(x),A=p.find(me=>me.identity===k&&Math.abs(me.baseline-I)<=Mt);if(!A){p.push({identity:k,...j(u.pageIndex,w),baseline:I,from:x.docStart,to:x.docEnd,blockId:ze(x),paraId:x.paraId});continue}let ue=Math.min(A.x,w.x),pe=Math.min(A.y,w.y),Et=Math.max(A.x+A.width,w.x+w.w),At=Math.max(A.y+A.height,w.y+w.h);A.x=ue,A.y=pe,A.width=Et-ue,A.height=At-pe,A.from=Math.min(A.from,x.docStart),A.to=Math.max(A.to,x.docEnd);}d.push(...p.map(({identity:x,...I})=>I));}return de=d,de},Pt=d=>{let u=null;for(let p of je())d<p.from||d>p.to||(!u||p.to-p.from<u.to-u.from)&&(u=p);return u},Ue=d=>{if(!d)return null;let u=d.primitive.docStart;if(u===void 0)return null;let{primitive:p}=d;return {...d,pos:u,rect:{pageIndex:d.pageIndex,x:p.x,y:p.y,width:p.w,height:p.h}}},Ie={displayList:e,isReady:()=>(s!==null||o!==null)&&a===null,sourceState:()=>a?{status:"error",error:a}:s||o?{status:"ready"}:{status:"loading"},whenReady:()=>m,pageCount:()=>e.pages.length,pageSize:d=>{let u=e.pages[d];return u?{width:u.width,height:u.height}:null},pageBounds:De,contentBounds:It,columnBounds:St,paragraphRects:wt,visualLines:je,visualLineAtPosition:Pt,imageAtPoint:(d,u,p,b="body",x)=>Ue(Ye(e,d,u,p,b,x)),imageByPos:(d,u="body",p)=>Ue(Ne(e,d,u,p)),hitTestRegions:G,verticalMove:le,rangeRects:ee,hfRangeRects:q,noteRangeRects:T,hfCaretRects:O,noteCaretRects:z,hfAnchorRects:te,caretRect:_,anchorRect:J,sidebarAnchorRect:J,prime:Y,dispose:()=>{h||(h=true,C(),be?.unregister(R));}};return be?.register(Ie,C,R),Oe.set(Ie,{list:e,pageRevisions:e.pages.map(v),engine:()=>o,hasHandle:()=>y!==null,donor:()=>S,supersede:()=>{f$1=true;},takeHandle:()=>{let d=y;return d!==null&&(y=null,be?.unregister(R)),d}}),Ie}function An(e){return typeof e?.displayHitTestRegionsJson=="function"&&typeof e?.displayVerticalMoveJson=="function"&&typeof e?.displayRangeRectsJson=="function"&&typeof e?.displayRangeRectsRegionJson=="function"}var Tn=16,Cn=24;function oe(e){let t=[],r=24;for(let i=0;i<e.pageCount();i++)t.push(r),r+=(e.pageSize(i)?.height??0)+16;return t}function Bn(){let e=new Map;return t=>{if(!t.startsWith("blob:")&&!t.startsWith("data:"))return null;let r=e.get(t);return r||(r=new Promise(i=>{let n=new Image;n.onload=()=>i(n),n.onerror=()=>i(null),n.src=t;}),e.set(t,r)),r}}function Hn(e,t){let r=e.activeCommentIds.length>0?t?.(e.activeCommentIds):void 0;return {hasSelection:e.hasSelection,inInsertion:e.inInsertion,inDeletion:e.inDeletion,hasComment:e.activeCommentIds.length>0,inList:e.inList,listLevel:e.listLevel??0,...r?.authorName!==void 0?{commentAuthor:r.authorName}:{},...r?.replyCount!==void 0?{commentReplyCount:r.replyCount}:{}}}function Gn(e,t){if(!e)return [];let r=[];return !e.hasSelection&&t.hasSelection&&r.push({key:"selected"}),e.hasSelection&&!t.hasSelection&&r.push({key:"selectionCleared"}),!e.hasComment&&t.hasComment&&r.push({key:"commentedText",...t.commentAuthor!==void 0||t.commentReplyCount!==void 0?{vars:{...t.commentAuthor!==void 0?{author:t.commentAuthor}:{},...t.commentReplyCount!==void 0?{replies:t.commentReplyCount}:{}}}:{}}),!e.inInsertion&&t.inInsertion&&r.push({key:"trackedInsertion"}),!e.inDeletion&&t.inDeletion&&r.push({key:"trackedDeletion"}),(!e.inList&&t.inList||t.inList&&e.listLevel!==t.listLevel)&&r.push({key:"listItem",vars:{level:t.listLevel+1}}),r}function se(e){let t=Number(e);if(Number.isFinite(t))return t;let r=0xcbf29ce484222325n;for(let i of new TextEncoder().encode(e))r=(r^BigInt(i))*0x100000001b3n,r&=0xffffffffffffffffn;return Number(r&(1n<<53n)-1n)}function Re(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Fn(e){let t=typeof e.story=="string"?[e.story]:[],r=Array.isArray(e.rows)?e.rows:[];for(let i of r){let n=Re(i),s=n&&Array.isArray(n.cells)?n.cells:[];for(let o of s){let a=Re(o)?.story;typeof a=="string"&&t.push(a);}}return t}function Nn(e){let t=e.storyIds(),r=new Map,i=new Set;for(let o of t){let a=[];try{for(let l of e.storySegments(o))if(l.kind==="embed")for(let c of Fn(l.payload))a.push(c),i.add(c);}catch{}r.set(o,a);}let n=new Map,s=(o,a,l)=>{if(!(l.has(o)||n.has(o))){l.add(o),n.set(o,a);for(let c of r.get(o)??[])s(c,a,l);l.delete(o);}};t.includes("body")&&s("body",{story:"body"},new Set);for(let o of t)!o.startsWith("hf:")||i.has(o)||s(o,{story:o,hfRid:o.slice(3)},new Set);return n}function Yn(e,t,r,i,n){let s=Array.isArray(t.rows)?t.rows:[],o=r+1;for(let a of s){let l=Re(a),c=l&&Array.isArray(l.cells)?l.cells:[],m=o+1;for(let y of c){let g=Re(y),f=typeof g?.story=="string"?g.story:null,h=f?Xe(e,f,m+1,i,n):0;m+=h+2;}o=m+1;}return o+1-r}function Xe(e,t,r,i,n){if(n.has(t))throw new Error(`recursive yrs story: ${t}`);n.add(t);try{let s=r,o=r,a=0,l=!0;for(let c of e.storySegments(t)){if(c.kind==="text"){a+=c.text.length,l=!1;continue}if(c.kind==="pilcrow"){let m=o+a+2;i.set(c.paraId,{pmStart:o,pmEnd:m}),s=m,o=s,a=0,l=!0;continue}if(c.embedKind==="table"&&l){s+=Yn(e,c.payload,s,i,n),o=s;continue}if(c.embedKind==="blockSdt"&&l){let m=typeof c.payload.story=="string"?c.payload.story:null,y=m?Xe(e,m,s+1,i,n):0;s+=y+2,o=s;continue}if(l&&(c.embedKind==="pageBreak"||c.embedKind==="columnBreak")){s+=1,o=s;continue}a+=1,l=!1;}return s-r}finally{n.delete(t);}}function On(e){let t=new Map,r=Nn(e),i=o=>{let a=r.get(o)?.story;if(!a)return null;if(t.has(a))return t.get(a)??null;try{let l=new Map;return Xe(e,a,0,l,new Set),t.set(a,l),l}catch{return t.set(a,null),null}},n=o=>{let a=r.get(o.story);if(!a)return null;let l=i(o.story)?.get(o.paraId);if(!l)return null;let c=Math.max(0,l.pmEnd-l.pmStart-2),m=Math.min(Math.max(0,Math.trunc(o.offset)),c);return {story:o.story,position:l.pmStart+1+m,...a.hfRid?{hfRid:a.hfRid}:{}}};return {locToDisplayPoint:n,storyOffsetToDisplayPoint:(o,a)=>{if(!r.has(o))return null;let l=Math.max(0,Math.trunc(a));try{for(let c of e.paragraphs(o)){let m=e.locateParagraph(o,c.paraId);if(!(l<m.start||l>m.end))return n({story:o,paraId:c.paraId,offset:Math.min(l-m.start,m.end-m.start)})}}catch{return null}return null}}}function $e(e,t){let{doc:r,schema:i}=e.state,n=i.marks.comment,s=i.marks.insertion,o=i.marks.deletion;!n&&!s&&!o||r.descendants((a,l)=>{let c=a.attrs;if(c){let m=[c.trIns,c.trDel,c.pPrIns,c.pPrDel];for(let h of m){let R=h?.revisionId;typeof R=="number"&&t(`revision-${R}`,l);}let g=c.cellMarker?.info?.revisionId;typeof g=="number"&&t(`revision-${g}`,l);let f=[c.pPrChange,c.trPrChange,c.tcPrChange,c.tblPrChange];for(let h of f)if(Array.isArray(h))for(let R of h){let S=R?.info?.id;typeof S=="number"&&t(`revision-${S}`,l);}}if(a.isInline)for(let m of a.marks){let y=null;n&&m.type===n?y=`comment-${m.attrs.commentId}`:(s&&m.type===s||o&&m.type===o)&&(y=`revision-${m.attrs.revisionId}`),y&&t(y,l);}});}function _n(e,t,r){let i=new Map;if(!e?.state)return i;let n=oe(t),s=new Set;return $e(e,(o,a)=>{if(s.has(o))return;s.add(o);let l=t.anchorRect(a);if(!l)return;let c=r?r(l):(n[l.pageIndex]??0)+l.y;c!=null&&i.set(o,c);}),i}function Xn(e,t,r){if(!e.hfRid)return t.anchorRect(e.position);let i=r?.get(e.hfRid);return i?t.hfAnchorRects(i,e.hfRid,e.position)[0]??null:null}function $n(e,t,r,i,n,s,o){let a=new Map,l=oe(n),c=(m,y)=>{if(!y||a.has(m))return a.has(m);let g=Xn(y,n,s);if(!g)return false;let f=o?o(g):(l[g.pageIndex]??0)+g.y;return f==null?false:(a.set(m,f),true)};for(let m of t){let y=`comment-${m}`;try{for(let g of e.resolveComment(String(m)))if(c(y,i.storyOffsetToDisplayPoint(g.story,g.start)))break}catch{}}for(let m of r)c(`revision-${se(m.revisionId)}`,i.locToDisplayPoint({story:m.story,...m.range.start}));return a}function Jn(e,t,r,i){let n=oe(t);for(let{region:s,rId:o,view:a}of e)$e(a,(l,c)=>{if(r.has(l))return;let m=t.hfAnchorRects(s,o,c)[0];if(!m)return;let y=i?i(m):(n[m.pageIndex]??0)+m.y;y!=null&&r.set(l,y);});return r}function Qn(e,t){let r=e.map(o=>{let a=t.locToDisplayPoint({story:o.range.story,...o.range.start}),l=t.locToDisplayPoint({story:o.range.story,...o.range.end}),c=a?.position??0,m=Math.max(c,l?.position??c);return {type:o.kind==="pPrIns"?"paragraphMarkInsertion":o.kind==="pPrDel"?"paragraphMarkDeletion":o.kind==="pPrChange"?"paragraphPropertiesChanged":o.kind==="trIns"?"rowInserted":o.kind==="trDel"?"rowDeleted":o.kind==="tableIns"?"tableInserted":o.kind==="tableDel"?"tableDeleted":o.kind,text:o.preview,author:o.author,date:o.date||void 0,from:c,to:m,revisionId:se(o.revisionId),...a?.hfRid?{hfRid:a.hfRid}:{}}}),i=new Map;for(let o of r){let a=i.get(o.revisionId)??[];a.push(o),i.set(o.revisionId,a);}let n=[...i.values()].map(o=>{let a=Math.min(...o.map(f=>f.from)),l=Math.max(...o.map(f=>f.to)),c=o.filter(f=>f.type==="insertion"),m=o.filter(f=>f.type==="deletion");if(c.length>0&&m.length>0)return {...c[0],type:"replacement",text:c.map(h=>h.text).join(""),deletedText:m.map(h=>h.text).join(""),from:a,to:l};let y=o.find(f=>f.type==="insertion"||f.type==="deletion")??o[0],g=o.filter(f=>f.type===y.type).map(f=>f.text).join("");return {...y,text:g,from:a,to:l}}),s=[];for(let o=0;o<n.length;o+=1){let a=n[o],l=n[o+1];a.type==="deletion"&&l?.type==="insertion"&&a.author===l.author&&a.date===l.date&&a.to===l.from&&a.hfRid===l.hfRid?(s.push({type:"replacement",text:l.text,deletedText:a.text,author:a.author,date:a.date,from:a.from,to:l.to,revisionId:a.revisionId,insertionRevisionId:l.revisionId,...a.hfRid?{hfRid:a.hfRid}:{}}),o+=1):s.push(a);}return {entries:s,commentToRevision:new Map}}function Wn(e,t){let r=t.kind??"body";if(r==="body")return {kind:r,primitives:e.primitives};let i=r==="header"?e.header:e.footer;return !i||i.kind!==r||t.rId&&i.rId!==t.rId?null:{kind:r,rId:i.rId,primitives:i.primitives}}function Kn(e){switch(e.kind){case "text":return c(e);case "glyphRun":return d(e);case "rect":case "image":case "shape":case "decoration":return {x:e.x,y:e.y,w:e.w,h:e.h};case "line":return {x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),w:Math.abs(e.x2-e.x1),h:Math.abs(e.y2-e.y1)}}}function Vn(e){let t=Kn(e),r=e.clipGroup?.clip;if(!r)return t;let i=r.x??0,n=r.y??0,s=i+Math.max(0,r.w??0),o=n+Math.max(0,r.h??0),a=Math.max(t.x,i),l=Math.max(t.y,n),c=Math.min(t.x+t.w,s),m=Math.min(t.y+t.h,o);return c<a||m<l?null:{x:a,y:l,w:c-a,h:m-l}}function zn(e){return e.kind==="text"||e.kind==="glyphRun"?e.text:e.kind==="image"?e.altText??"":""}function jn(e,t,r){return t>=e.x&&t<=e.x+e.w&&r>=e.y&&r<=e.y+e.h}function Un(e,t,r,i,n={kind:"body"}){let s=e.pages[t];if(!s)return null;let o=Wn(s,n);if(!o)return null;for(let a=o.primitives.length-1;a>=0;a--){let l=o.primitives[a];if(l.kind==="line"||!l.href||l.hiddenObject)continue;let c=Vn(l);if(c&&jn(c,r,i))return {pageIndex:t,region:o.kind,rId:o.rId,href:l.href,tooltip:l.linkTitle??l.tooltip,displayText:zn(l)||l.href,rect:c}}return null}var X=7.5,Z=16,bt=320,qn=30,Zn=200,ei=24,ti=10,ni=10,ii=24;function xt(e){let t;switch(e.kind){case "text":t=c(e);break;case "glyphRun":t=d(e);break;case "rect":case "image":case "shape":case "decoration":t={x:e.x,y:e.y,w:e.w,h:e.h};break;case "line":t={x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),w:Math.abs(e.x2-e.x1),h:Math.abs(e.y2-e.y1)};break}let r=Qe(e);return r?ri(t,r)??{x:r.x,y:r.y,w:0,h:0}:t}function Qe(e){let t=e.clipGroup?.clip;return t?{x:t.x??0,y:t.y??0,w:Math.max(0,t.w??0),h:Math.max(0,t.h??0)}:null}function ri(e,t){let r=Math.max(e.x,t.x),i=Math.max(e.y,t.y),n=Math.min(e.x+e.w,t.x+t.w),s=Math.min(e.y+e.h,t.y+t.h);return n<r||s<i?null:{x:r,y:i,w:n-r,h:s-i}}function Lt(e,t,r){if(e.docStart!=null){let i=t(e.docStart);if(i!=null){let n={tableKey:i,docStartSample:e.docStart};return e.table?.tableId&&!r.has(e.table.tableId)&&r.set(e.table.tableId,n),n}}return e.table?.tableId?r.get(e.table.tableId)??null:null}function Rt(e,t,r){let i=e.table?.tableId;if(!i)return null;let n=t.get(i);return n?r.get(n.tableKey)??null:null}function oi(e,t,r,i){let n=new Map;for(let o of t){if(o.kind==="line")continue;let a=o.cell;if(!a)continue;let l=Lt(o,r,i);if(!l)continue;let{tableKey:c,docStartSample:m}=l,y=xt(o),g=Qe(o),f=g??y,h=n.get(c);if(h||(h={tableKey:c,docStartSample:m,contentMinX:f.x,contentMinY:f.y,contentMaxX:f.x+f.w,contentMaxY:f.y+f.h,exactLeftX:[],exactBottomY:[],exactClipLeftX:[],exactClipBottomY:[],rows:new Map},n.set(c,h)),m<h.docStartSample&&(h.docStartSample=m),h.contentMinX=Math.min(h.contentMinX,f.x),h.contentMinY=Math.min(h.contentMinY,f.y),h.contentMaxX=Math.max(h.contentMaxX,f.x+f.w),h.contentMaxY=Math.max(h.contentMaxY,f.y+f.h),g&&(h.exactClipLeftX.push(g.x),h.exactClipBottomY.push(g.y+g.h)),!a.continuation){let R=h.rows.get(a.row);R?(R.top=Math.min(R.top,f.y),R.bottom=Math.max(R.bottom,f.y+f.h)):h.rows.set(a.row,{top:f.y,bottom:f.y+f.h});}}if(n.size===0)return [];for(let o of t){if(o.kind!=="line"||o.role!=="table-border"&&o.role!=="table-cut")continue;let a=Rt(o,i,n);if(!a){let m=(o.x1+o.x2)/2,y=(o.y1+o.y2)/2,g=1/0;for(let f of n.values()){let h=m>=f.contentMinX-Z&&m<=f.contentMaxX+Z,R=y>=f.contentMinY-Z&&y<=f.contentMaxY+Z;if(!h||!R)continue;let S=Math.max(0,f.contentMinX-m,m-f.contentMaxX),v=Math.max(0,f.contentMinY-y,y-f.contentMaxY),L=S+v;L<g&&(g=L,a=f);}}if(!a)continue;let l=Math.abs(o.x1-o.x2)<.5,c=Math.abs(o.y1-o.y2)<.5;l&&a.exactLeftX.push(Math.min(o.x1,o.x2)),c&&a.exactBottomY.push(Math.max(o.y1,o.y2));}let s=[];for(let o of n.values()){if(o.rows.size===0)continue;let a=o.exactLeftX.length>0||o.exactClipLeftX.length>0,l=a?Math.min(...o.exactLeftX,...o.exactClipLeftX):o.contentMinX-X,c=o.exactBottomY.length>0||o.exactClipBottomY.length>0?Math.max(...o.exactBottomY,...o.exactClipBottomY):o.contentMaxY,m=[...o.rows.entries()].map(([y,g])=>({rowIndex:y,top:g.top,bottom:g.bottom})).sort((y,g)=>y.rowIndex-g.rowIndex);s.push({pageIndex:e,tableKey:o.tableKey,docStartSample:o.docStartSample,originX:l,originY:o.contentMinY,bottomY:c,originExact:a,rowBands:m});}return s}function si(e,t){let r=[],i=Ke(e,t,{kind:"body"});for(let n of e.pages)r.push(...oi(n.pageIndex,n.primitives,t,i));return r}function We(e,t){let r=t.kind??"body";if(r==="body")return {kind:r,primitives:e.primitives};let i=r==="header"?e.header:e.footer;return !i||i.kind!==r||t.rId&&i.rId!==t.rId?null:{kind:r,rId:i.rId,primitives:i.primitives}}function Ke(e,t,r){let i=new Map;for(let n of e.pages){let s=We(n,r);if(s)for(let o of s.primitives){if(!o.cell||!o.table?.tableId||o.docStart==null)continue;let a=t(o.docStart);if(a==null)continue;let l=i.get(o.table.tableId);(!l||o.docStart<l.docStartSample)&&i.set(o.table.tableId,{tableKey:a,docStartSample:o.docStart});}}return i}function Ve(e,t){return `${e}:${t}`}function ai(e,t,r,i){let n=Ve(t.row,t.col),s=e.cells.get(n);s?(s.minX=Math.min(s.minX,r.x),s.minY=Math.min(s.minY,r.y),s.maxX=Math.max(s.maxX,r.x+r.w),s.maxY=Math.max(s.maxY,r.y+r.h),s.rowSpan=Math.max(s.rowSpan,t.rowSpan),s.colSpan=Math.max(s.colSpan,t.colSpan),i&&(s.exactClip=i)):e.cells.set(n,{row:t.row,col:t.col,rowSpan:t.rowSpan,colSpan:t.colSpan,minX:r.x,minY:r.y,maxX:r.x+r.w,maxY:r.y+r.h,exactClip:i??void 0});}function Dt(e,t,r){let i=new Map;for(let n of e){if(n.kind==="line")continue;let s=n.cell;if(!s)continue;let o=Lt(n,t,r);if(!o)continue;let a=o.tableKey,l=xt(n),c=i.get(a);c||(c={tableKey:a,contentMinX:l.x,contentMinY:l.y,contentMaxX:l.x+l.w,contentMaxY:l.y+l.h,cells:new Map,verticalLines:[],horizontalLines:[]},i.set(a,c)),c.contentMinX=Math.min(c.contentMinX,l.x),c.contentMinY=Math.min(c.contentMinY,l.y),c.contentMaxX=Math.max(c.contentMaxX,l.x+l.w),c.contentMaxY=Math.max(c.contentMaxY,l.y+l.h),ai(c,s,l,Qe(n));}if(i.size===0)return [];for(let n of e){if(n.kind!=="line"||n.role!=="table-border"&&n.role!=="table-cut")continue;let s=Math.abs(n.x1-n.x2)<.5,o=Math.abs(n.y1-n.y2)<.5;if(!s&&!o)continue;let a=Math.min(n.x1,n.x2),l=Math.max(n.x1,n.x2),c=Math.min(n.y1,n.y2),m=Math.max(n.y1,n.y2),y=Rt(n,r,i);if(y){s?y.verticalLines.push(a):y.horizontalLines.push(c);continue}for(let g of i.values())if(s){if(!(m>=g.contentMinY-Z&&c<=g.contentMaxY+Z))continue;let h=a;Math.max(0,g.contentMinX-h,h-g.contentMaxX)<=bt&&g.verticalLines.push(h);}else if(o){if(!(l>=g.contentMinX-Z&&a<=g.contentMaxX+Z))continue;let h=c;Math.max(0,g.contentMinY-h,h-g.contentMaxY)<=bt&&g.horizontalLines.push(h);}}return [...i.values()]}function ae(e){let t=[];for(let r of [...e].sort((i,n)=>i-n))(t.length===0||Math.abs(t[t.length-1]-r)>.5)&&t.push(r);return t}function vt(e){let t=ae([...e.cells.values()].map(n=>n.row)),r=ae(e.horizontalLines),i=new Map;if(t.length>0&&r.length>=t.length+1)for(let n=0;n<t.length;n++)i.set(t[n],r[n]),i.set(t[n]+1,r[n+1]);return i}function Je(e){if(!e)return null;if(e.exactClip)return e.exactClip;let t=e.minX-X,r=e.minY-X;return {x:t,y:r,w:Math.max(1,e.maxX-e.minX+X*2),h:Math.max(1,e.maxY-e.minY+X*2)}}function li(e,t){let r=1/0,i=-1/0;for(let n of e.cells.values())n.row===t&&(r=Math.min(r,n.exactClip?.y??n.minY-X),i=Math.max(i,n.exactClip?n.exactClip.y+n.exactClip.h:n.maxY+X));return !Number.isFinite(r)||!Number.isFinite(i)||i<=r?null:{top:r,bottom:i}}function ci(e,t,r){let i=Je(e.cells.get(Ve(t,r)));return i?{left:i.x,right:i.x+i.w,top:i.y,bottom:i.y+i.h}:null}function di(e,t,r,i={kind:"body"}){if(t.length===0)return [];let n=new Map;for(let a of t){let l=n.get(a.tableKey);l?l.push(a):n.set(a.tableKey,[a]);}let s=[],o=Ke(e,r,i);for(let a of e.pages){let l=We(a,i);if(!l)continue;let c=Dt(l.primitives,r,o);for(let m of c){let y=n.get(m.tableKey);if(!y)continue;let g=ae(m.verticalLines),f=vt(m);for(let h of y){let R=m.cells.get(Ve(h.row,h.col)),S=g[h.col],v=g[h.col+h.colSpan],L=f.get(h.row),E=f.get(h.row+h.rowSpan),C=true;if(S==null||v==null||v<=S){let P=R?.exactClip??Je(R);if(!P)continue;S=P.x,v=P.x+P.w,C=R?.exactClip!=null;}if(L==null||E==null||E<=L){let P=R?.exactClip??Je(R);if(!P)continue;L=P.y,E=P.y+P.h,C&&(C=R?.exactClip!=null);}s.push({pageIndex:a.pageIndex,tableKey:m.tableKey,row:h.row,col:h.col,rowSpan:h.rowSpan,colSpan:h.colSpan,x:S,y:L,w:Math.max(1,v-S),h:Math.max(1,E-L),exact:C,region:l.kind,rId:l.rId});}}}return s}function ui(e){let{list:t,pageIndex:r,x:i,y:n,canvasRect:s,pageSize:o,tableKeyOf:a,cellPmPosOf:l,region:c={kind:"body"},edgeProximity:m=qn}=e,y=t.pages[r];if(!y)return null;let g=We(y,c);if(!g)return null;let f=o.width>0?s.width/o.width:1,h=o.height>0?s.height/o.height:1,R=(L,E)=>({clientX:s.left+L*f,clientY:s.top+E*h}),S=Ke(t,a,c),v=Dt(g.primitives,a,S);for(let L of v){let E=ae(L.verticalLines),C=vt(L),P=ae([...L.cells.values()].map(N=>N.row));if(P.length===0)continue;let Y=E[0]??L.contentMinX-X,V=E[E.length-1]??L.contentMaxX+X,M=C.get(P[0])??L.contentMinY-X,F=P[P.length-1],G=C.get(F+1)??L.contentMaxY+X,ee=i<Y+m&&i>=Y-m,le=n<M+m&&n>=M-m;if(!(!ee&&!le)){if(ee&&n>=M-m&&n<=G)for(let N of P){let q=C.get(N),T=C.get(N+1),$=q==null||T==null?li(L,N):null,O=q??$?.top,z=T??$?.bottom;if(O==null||z==null||z<=O||n<O||n>z)continue;let _=[...L.cells.values()].filter(j=>j.row===N).sort((j,De)=>j.col-De.col)[0];if(!_)continue;let J=l(L.tableKey,N,_.col);if(!J)continue;let te=R(Y,O+(z-O)/2);return {type:"row",clientX:te.clientX-ei,clientY:te.clientY-ti,cellPmPos:J}}if(le&&i>=Y-m&&i<=V){let N=P[0],q=[...L.cells.values()].filter(T=>T.row===N).sort((T,$)=>T.col-$.col);for(let T of q){let $=E[T.col],O=E[T.col+T.colSpan],z=$==null||O==null?ci(L,T.row,T.col):null,_=$??z?.left,J=O??z?.right;if(_==null||J==null||J<=_||i<_||i>J)continue;let te=l(L.tableKey,T.row,T.col);if(!te)continue;let j=R(_+(J-_)/2,M);return {type:"column",clientX:j.clientX-ni,clientY:j.clientY-ii,cellPmPos:te}}}}}return null}var or=Ze;export{Cn as CANVAS_PAGES_PADDING_PX,Tn as CANVAS_PAGE_GAP_PX,Zn as DISPLAY_LIST_TABLE_INSERT_HIDE_DELAY_MS,D as MIRROR_CLASS_NAMES,K as RustDisplayListSourceError,dn as applyInteractiveSdtFocus,pn as buildInteractiveOverlayPage,Ut as buildMirrorPage,Sn as buildRustDisplayFrame,gt as buildRustDisplayList,oe as canvasPageTops,kn as captureInlinePositionEmuFromDisplayList,Gn as computeA11yAnnouncements,_n as computeAnchorPositionsFromDisplayList,$n as computeAnchorPositionsFromYrs,Bn as createCanvasImageResolver,En as createDisplayListQueries,On as createYrsSidebarProjection,or as demoDisplayList,di as deriveDisplayListSelectedCellRects,si as deriveDisplayListTableFragments,ui as detectDisplayListTableInsertHover,yt as encodeDisplayListFrameExtras,Qn as extractTrackedChangesFromYrs,Un as findDisplayListHyperlinkAtPoint,Ye as findImagePrimitiveAtPoint,Ne as findImagePrimitiveByDocPos,wn as isDisplayListQuerySourceDead,jt as loadGlyphOutlineProvider,Fe as loadRustDisplayListQueryEngine,Jn as mergeHfAnchorPositionsFromDisplayList,Mn as onDisplayListQuerySourceFailure,Hn as snapshotFromSelectionContext,$e as visitAnchorKeys,se as yrsIdToNumericId};
1
+ import {d,c,e,s,t,f,v,w}from'../../chunk-PGMXWI5X.mjs';export{p as FRAME_DELTA_HEADER_BYTES,q as FRAME_DELTA_PAGE_OP_BYTES,o as FRAME_DELTA_VERSION,r as FrameDeltaError,a as GlyphCache,t as applyFrameDelta,u as applyFrameDeltaOwned,s as decodeFrameDelta,m as drawDisplayPage,n as drawPrimitive,b as fontSizePxFromShorthand,d as glyphRunRect,e as lineRect,h as presentDisplayPageBackBuffer,i as presentOffscreenPageBackBuffer,l as rasterizeDisplayListPages,g as rasterizeDisplayPageToBackBuffer,k as sizeCanvasForPage,c as textRunRect}from'../../chunk-PGMXWI5X.mjs';export{b as resolveCanvasPoint,a as resolveDisplayPageClientRect}from'../../chunk-WRWRCBLK.mjs';import {c as c$1}from'../../chunk-CTBUQRYQ.mjs';import {b}from'../../chunk-TTRUPDAB.mjs';var tt={pages:[{pageIndex:0,width:816,height:1056,primitives:[{kind:"rect",x:96,y:96,w:624,h:20,fill:"#fff9c4",blockId:0,docStart:1,docEnd:12},{kind:"text",text:"Hello Word",x:96,baselineY:110,width:84.5,font:"700 16px Calibri, sans-serif",color:"#000000",docStart:1,docEnd:11,blockId:0},{kind:"decoration",deco:"underline",x:96,y:113,w:84.5,h:1,color:"#000000",docStart:1,docEnd:11,blockId:0},{kind:"text",text:" \u2014 second run",x:180.5,baselineY:110,width:96.25,font:"400 16px Calibri, sans-serif",color:"#c0392b",docStart:11,docEnd:24,blockId:0},{kind:"line",x1:96,y1:140,x2:720,y2:140,strokeWidth:.75,color:"#666666",role:"table-border"},{kind:"image",relId:"rId7",x:96,y:160,w:200,h:120,docStart:30,docEnd:31,blockId:2}]}]};function Zt(){return import('../../wasm-ZQAVP7P2.mjs').then(async e=>(await e.preloadLayoutWasm(),e.outlineGlyphJson))}var R={page:"layout-page layout-page-mirror",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer",block:"layout-paragraph",table:"layout-table",tableRow:"layout-table-row",tableCell:"layout-table-cell",text:"layout-run layout-run-text",rect:"layout-mirror-rect",image:"layout-run layout-run-image",shape:"layout-run layout-run-shape",chart:"layout-run layout-run-chart",decoration:"layout-decoration",line:"layout-mirror-line",pageBorder:"layout-page-border",tableCut:"layout-table-cut-border",blockSdt:"layout-block-sdt",inlineSdtWidget:"layout-inline-sdt-widget",revisionPmark:"layout-revision-pmark",revisionPmarkGlyph:"layout-revision-pmark-glyph",revisionPmarkIns:"layout-revision-ins",revisionPmarkDel:"layout-revision-del",listMarker:"layout-list-marker",revisionTable:"oox-revision-table",revisionRow:"oox-revision-row",revisionCell:"oox-revision-cell",revisionIns:"oox-revision-ins",revisionDel:"oox-revision-del",revisionMerge:"oox-revision-merge",notes:"layout-page-notes",note:"layout-note",noteBacklink:"layout-note-backlink"};function en(e,t={}){let r=t.document??document,n=t.labels,i={labels:n,noteRefIds:new Set},s=r.createElement("div");s.className=R.page,s.setAttribute("role","document"),n?.page&&s.setAttribute("aria-label",n.page),s.dataset.pageIndex=String(e.pageIndex),e.sectionId!==void 0&&(s.dataset.sectionId=e.sectionId),e.sectionIndex!==void 0&&(s.dataset.sectionIndex=String(e.sectionIndex)),e.sectionPageIndex!==void 0&&(s.dataset.sectionPageIndex=String(e.sectionPageIndex)),e.sectionPageNumber!==void 0&&(s.dataset.sectionPageNumber=String(e.sectionPageNumber)),e.pageLabel!==void 0&&(s.dataset.pageLabel=e.pageLabel),s.style.position="relative",s.style.width=`${e.width}px`,s.style.height=`${e.height}px`,s.style.opacity="0",s.style.pointerEvents="none";let o=r.createElement("div");o.className=R.content,o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.width=`${e.width}px`,o.style.height=`${e.height}px`,s.appendChild(o);for(let a of (e.pageBorders??[]).filter(l=>l.zOrder==="back"))o.appendChild(rt(a,r,0));re(o,e.primitives,r,0,i);for(let a of e.noteAreas??[])o.appendChild(mn(a,e,r,i));for(let a of [e.header,e.footer])a&&s.appendChild(tn(a,e,r,i));for(let a of (e.pageBorders??[]).filter(l=>l.zOrder!=="back"))s.appendChild(rt(a,r,0));return s}function tn(e,t,r,n){let i=r.createElement("div");i.className=e.kind==="header"?R.header:R.footer,i.dataset.hfRid=e.rId;let s=e.kind==="header"?n.labels?.header:n.labels?.footer;return s&&(i.setAttribute("role","region"),i.setAttribute("aria-label",s)),i.style.position="absolute",i.style.left="0",i.style.top=`${e.y}px`,i.style.width=`${t.width}px`,i.style.height=`${e.height}px`,re(i,e.primitives,r,-e.y,n),i}function re(e,t,r,n,i){let s=new Map;for(let o of t){let a=o.kind==="line"?void 0:o.blockKey??o.blockId;if(a===void 0){e.appendChild(be(o,r,n,i));continue}let l=o.table,c=l?.tableId!==void 0?`table:${l.tableId}#${l.rowStart??0}`:a,p=s.get(c);if(!p){let g=r.createElement("div");g.dataset.blockId=String(l?.tableId??a),g.style.position="absolute",g.style.left="0",g.style.top="0",e.appendChild(g),p={el:g,prims:[]},s.set(c,p);}p.prims.push(o);}for(let o of s.values())nn(o,r,n,i);sn(s);}function nn(e,t,r,n){let{el:i,prims:s}=e;if(!s.some(y=>y.cell!==void 0||y.structuralRevision?.scope==="table"||y.structuralRevision?.scope==="row"||y.structuralRevision?.scope==="cell")){nt(i,s,t,r,n);return}i.className=R.table,i.setAttribute("role","table");let a=s.find(y=>y.table!==void 0)?.table;e.table=a,e.cells=[],a?.tableId!==void 0&&(i.dataset.tableId=a.tableId),a?.rowStart!==void 0&&(i.dataset.rowStart=String(a.rowStart)),a?.rowEnd!==void 0&&(i.dataset.rowEnd=String(a.rowEnd)),a?.headerRowCount!==void 0&&(i.dataset.headerRowCount=String(a.headerRowCount)),a?.parentTableId!==void 0&&(i.dataset.parentTableId=a.parentTableId),a?.caption&&i.setAttribute("aria-label",a.caption),a?.description&&i.setAttribute("aria-description",a.description);let l=ge(s,"table");l&&he(i,l),He(i,s.find(y=>y.sdt!==void 0)?.sdt);for(let y of s)y.cell===void 0&&i.appendChild(be(y,t,r,n));let c=new Map,p=0,g=0;for(let y of s){if(y.cell===void 0)continue;let{row:u,col:h}=y.cell;p=Math.max(p,u+(y.cell.rowSpan??1)),g=Math.max(g,h+(y.cell.colSpan??1));let D=c.get(u);D||(D=new Map,c.set(u,D));let k=D.get(h);k||(k={ref:y.cell,prims:[]},D.set(h,k)),k.prims.push(y);}i.setAttribute("aria-rowcount",String(a?.rowCount??p)),i.setAttribute("aria-colcount",String(a?.columnCount??g));for(let y of [...c.keys()].sort((u,h)=>u-h)){let u=t.createElement("div");u.className=R.tableRow,u.setAttribute("role","row"),u.setAttribute("aria-rowindex",String(y+1));let h=ge(s,"row",y);h&&he(u,h),u.style.position="absolute",u.style.left="0",u.style.top="0",i.appendChild(u);let D=c.get(y);for(let k of [...D.keys()].sort((v,L)=>v-L)){let v=D.get(k),L=t.createElement("div");L.className=R.tableCell,L.setAttribute("role",v.ref.isHeader?"columnheader":"cell"),L.setAttribute("aria-colindex",String(k+1)),v.ref.cellId&&(L.id=v.ref.cellId),v.ref.headerIds?.length&&L.setAttribute("aria-labelledby",v.ref.headerIds.join(" ")),v.ref.repeatedHeader&&(L.dataset.repeatedHeader="true"),v.ref.noWrap&&(L.dataset.noWrap="true");let E=v.ref.rowSpan??1,B=v.ref.colSpan??1;E>1&&L.setAttribute("aria-rowspan",String(E)),B>1&&L.setAttribute("aria-colspan",String(B));let w=ge(v.prims,"cell",y,k);w&&he(L,w),v.ref.continuation&&(L.dataset.vmergeContinuation="true"),L.style.position="absolute",L.style.left="0",L.style.top="0";let N=new Map,ee=[];for(let T of v.prims){let Y=T.blockKey??T.blockId;if(Y===void 0){ee.push(T);continue}let P=N.get(Y);P?P.push(T):N.set(Y,[T]);}for(let T of Ce(ee))L.appendChild(be(T,t,r,n));for(let[T,Y]of N){let P=t.createElement("div");P.dataset.blockId=String(T),P.style.position="absolute",P.style.left="0",P.style.top="0",nt(P,Y,t,r,n),L.appendChild(P);}on(L,v.prims),ct(L,v.prims),e.cells.push({el:L,bounds:lt(v.prims)}),u.appendChild(L);}}Be(i,s);}function nt(e,t,r,n,i){let s=t.find(c=>c.chart!==void 0)?.chart;e.className=s?`${R.block} ${R.chart}`:R.block,e.setAttribute("role",s?"img":"paragraph"),s?.label&&e.setAttribute("aria-label",s.label);for(let c of Ce(t))e.appendChild(be(c,r,n,i));let o=ge(t,"pmark");o&&he(e,o),rn(e,t,r,n),He(e,t.find(c=>c.sdt!==void 0)?.sdt);let a=t.find(c=>c.paraId!==void 0)?.paraId;a!==void 0&&(e.dataset.paraId=a);let l=t.find(c=>c.fromLine!==void 0);l?.fromLine!==void 0&&(e.dataset.fromLine=String(l.fromLine),l.toLine!==void 0&&(e.dataset.toLine=String(l.toLine))),ct(e,t),ln(e,t);}function rn(e,t,r,n){Be(e,t);let i=Number(e.dataset.docStart),s=Number(e.dataset.docEnd),o=t.map(g=>g.fragmentDocStart).filter(g=>Number.isFinite(g)),a=t.map(g=>g.fragmentDocEnd).filter(g=>Number.isFinite(g)),l=o.length>0?Math.min(...o):void 0,c=a.length>0?Math.max(...a):void 0,p=l??(Number.isFinite(i)&&i===s&&i>0?i-1:void 0);if(p!==void 0&&(e.dataset.docStart=String(p)),c!==void 0&&(e.dataset.docEnd=String(c)),p!==void 0&&!t.some(g=>g.docStart===p)){let g=Ce(t).find(u=>Te(u)!==void 0),y=g?Te(g):void 0;if(y){let u=r.createElement("span");u.className="layout-mirror-structural-anchor",u.dataset.docStart=String(p),u.dataset.docEnd=String(p),j(u,y,n),e.insertBefore(u,e.firstChild);}}}function on(e,t){let r=e.querySelectorAll(".layout-paragraph[data-doc-start]"),n=1/0,i=-1/0;for(let s of r){let o=Number(s.dataset.docStart),a=Number(s.dataset.docEnd);Number.isFinite(o)&&(n=Math.min(n,o)),Number.isFinite(a)&&(i=Math.max(i,a));}n!==1/0&&(e.dataset.docStart=String(n)),i!==-1/0&&(e.dataset.docEnd=String(i)),n===1/0&&i===-1/0&&Be(e,t);}function sn(e){let t=new Map;for(let r of e.values())r.table?.tableId&&t.set(r.table.tableId,r);for(let r of e.values()){let n=r.table?.parentTableId;if(!n)continue;let i=t.get(n),s=lt(r.prims);if(!i?.cells?.length||!s)continue;let o=s.x+s.w/2,a=s.y+s.h/2,l=i.cells.filter(c=>c.bounds&&an(o,a,c.bounds));l.sort((c,p)=>it(c.bounds)-it(p.bounds)),l[0]?.el.appendChild(r.el);}}function an(e,t,r){return e>=r.x&&e<=r.x+r.w&&t>=r.y&&t<=r.y+r.h}function it(e){return e.w*e.h}function lt(e){let t;for(let r of e){let n=r.clipGroup?.clip,i=n?.x!==void 0&&n.y!==void 0&&n.w!==void 0&&n.h!==void 0?{x:n.x,y:n.y,w:n.w,h:n.h}:Te(r);if(!i)continue;if(!t){t={...i};continue}let s=Math.max(t.x+t.w,i.x+i.w),o=Math.max(t.y+t.h,i.y+i.h);t.x=Math.min(t.x,i.x),t.y=Math.min(t.y,i.y),t.w=s-t.x,t.h=o-t.y;}return t}function Te(e){switch(e.kind){case "text":return c(e);case "glyphRun":return d(e);case "rect":return {x:e.x,y:e.y,w:e.w,h:e.h};case "image":case "shape":return {x:e.x,y:e.y,w:e.w,h:e.h};case "decoration":return {x:e.x,y:e.y,w:e.w,h:e.h}}}function Ce(e){let t=e.filter(n=>n.logicalOrder!==void 0).sort((n,i)=>(n.logicalOrder??0)-(i.logicalOrder??0)||(n.docStart??0)-(i.docStart??0));if(t.length<2)return e;let r=0;return e.map(n=>n.logicalOrder===void 0?n:t[r++])}function ct(e,t){let r=t.find(s=>s.lang)?.lang;r&&(e.lang=r);let n=t.find(s=>s.bidiLevel!==void 0||"rtl"in s);if(!n)return;let i=n.bidiLevel!==void 0?n.bidiLevel%2===1:"rtl"in n?n.rtl:false;e.dir=i?"rtl":"ltr";}function ln(e,t){let r=t.find(n=>n.ariaLabel||n.ariaDescription||n.decorative||n.hiddenObject||n.groupId);r&&ut(e,r);}function Be(e,t){let r,n;for(let i of t)i.docStart!==void 0&&(r=r===void 0?i.docStart:Math.min(r,i.docStart)),i.docEnd!==void 0&&(n=n===void 0?i.docEnd:Math.max(n,i.docEnd));r!==void 0&&(e.dataset.docStart=String(r)),n!==void 0&&(e.dataset.docEnd=String(n));}function ge(e,t,r,n){return e.find(i=>{let s=i.structuralRevision;return !(!s||s.scope!==t||r!==void 0&&s.rowIndex!==r||n!==void 0&&s.colIndex!==n)})?.structuralRevision}function be(e$1,t,r,n){switch(e$1.kind){case "text":{let i=ot(t,e$1,n);return i.className=R.text,i.textContent=e$1.text,j(i,c(e$1),r),i.style.font=e$1.font,st(i,e$1),at(i,e$1),Ee(i,e$1.hidden&&e$1.opacity===void 0?.4:e$1.opacity,e$1.rotationDeg,e$1.horizontalScale),e$1.structuralRevision?.scope==="pmark"&&(i.classList.add(R.revisionPmarkGlyph),e$1.structuralRevision.kind==="ins"&&i.classList.add(R.revisionPmarkIns),e$1.structuralRevision.kind==="del"&&i.classList.add(R.revisionPmarkDel),i.setAttribute("aria-hidden","true")),e$1.listMarker&&(i.classList.add(R.listMarker),i.setAttribute("aria-hidden","true"),e$1.listMarkerRevision&&(i.style.color=e$1.listMarkerRevision==="ins"?"rgb(46, 125, 50)":"rgb(198, 40, 40)")),ne(i,e$1),i}case "glyphRun":{let i=ot(t,e$1,n);return i.className=R.text,i.textContent=e$1.text,j(i,d(e$1),r),i.style.fontSize=`${e$1.size}px`,cn(i,e$1.fallbackFont),st(i,e$1),at(i,e$1),Ee(i,e$1.hidden&&e$1.opacity===void 0?.4:e$1.opacity,e$1.rotationDeg,e$1.horizontalScale),ne(i,e$1),i}case "rect":{let i=t.createElement("div");return i.className=R.rect,j(i,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),ne(i,e$1),i}case "line":{let i=t.createElement("div");return i.className=e$1.role==="table-cut"?R.tableCut:R.line,e$1.role&&e$1.role!=="table-cut"&&(i.dataset.role=e$1.role),j(i,e(e$1),r),i.setAttribute("aria-hidden","true"),i}case "image":{let i=e$1.href?t.createElement("a"):t.createElement("div");return i.className=R.image,e$1.decorative?i.setAttribute("aria-hidden","true"):(i.setAttribute("role","img"),e$1.altText&&i.setAttribute("aria-label",e$1.altText)),dt(i,e$1),i.dataset.relId=e$1.relId,j(i,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),Ee(i,e$1.opacity,e$1.rotationDeg),e$1.filter&&(i.style.filter=e$1.filter),ne(i,e$1),e$1.revision&&(i.style.outline=`2px solid ${e$1.revision.kind==="ins"?"rgb(46, 125, 50)":"rgb(198, 40, 40)"}`),e$1.href||(i.style.pointerEvents="auto"),i}case "shape":{let i=t.createElement("div");return i.className=R.shape,e$1.decorative?i.setAttribute("aria-hidden","true"):i.setAttribute("role","img"),j(i,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),dn(i,e$1.transform),ne(i,e$1),i}case "decoration":{let i=t.createElement("span");return i.className=R.decoration,i.dataset.deco=e$1.deco,j(i,{x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h},r),ne(i,e$1),i}}}function rt(e,t,r){let n=t.createElement("div");return n.className=R.pageBorder,j(n,{x:e.x,y:e.y,w:e.w,h:e.h},r),n.style.boxSizing="border-box",n.style.pointerEvents="none",n.style.zIndex=e.zOrder==="back"?"0":"20",ye(n,"Top",e.top),ye(n,"Right",e.right),ye(n,"Bottom",e.bottom),ye(n,"Left",e.left),n}function j(e,t,r=0){e.style.position="absolute",e.style.left=`${t.x}px`,e.style.top=`${t.y+r}px`,e.style.width=`${t.w}px`,e.style.height=`${t.h}px`;}function ot(e,t,r){let n=t.noteRef?.id!==void 0?t.noteRef:void 0,i=t.href||n?e.createElement("a"):e.createElement("span");if(dt(i,t),n&&!t.href){let s=n.kind??"footnote",o=`oox-${s}-${n.id}`;i.setAttribute("href",`#${o}`),i.setAttribute("role","doc-noteref");let a=`oox-noteref-${s}-${n.id}`;r.noteRefIds.has(a)||(r.noteRefIds.add(a),i.id=a);}return i}function dt(e,t){let{href:r}=t;if(!r)return;e.setAttribute("href",r),e.dataset.href=r;let n=t.linkTitle??t.tooltip;n&&(e.title=n),t.linkTarget?e.setAttribute("target",t.linkTarget):r.startsWith("#")||e.setAttribute("target","_blank"),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer"),t.linkHistory!==void 0&&(e.dataset.linkHistory=String(t.linkHistory)),t.linkDocLocation!==void 0&&(e.dataset.linkDocLocation=t.linkDocLocation);}function cn(e,t){if(t)for(let r of t.split(" ")){if(r.endsWith("px"))break;r==="italic"?e.style.fontStyle="italic":/^[1-9]00$/.test(r)&&r!=="400"&&(e.style.fontWeight=r);}}function st(e,t){t.lang&&(e.lang=t.lang),t.bidiLevel!==void 0?e.dir=t.bidiLevel%2===1?"rtl":"ltr":t.rtl&&(e.dir="rtl");}function ye(e,t,r){if(!r)return;let n=e.style;n[`border${t}Width`]=`${r.width}px`,n[`border${t}Style`]=r.style,n[`border${t}Color`]=r.color;}function Ee(e,t,r,n){t!==void 0&&(e.style.opacity=String(t));let i=[];r&&i.push(`rotate(${r}deg)`),n!==void 0&&n!==100&&i.push(`scaleX(${n/100})`),i.length>0&&(e.style.transform=i.join(" "),e.style.transformOrigin=n!==void 0&&n!==100?"left center":"center center");}function dn(e,t){if(!t)return;let r=[];t.rotation&&r.push(`rotate(${t.rotation}deg)`),t.flipH&&r.push("scaleX(-1)"),t.flipV&&r.push("scaleY(-1)"),r.length!==0&&(e.style.transform=r.join(" "),e.style.transformOrigin="center center");}function at(e,t){if(t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.hidden&&(e.classList.add("docx-hidden"),e.style.textDecoration="underline dotted"),t.textShadow==="emboss"?e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)":t.textShadow==="imprint"?e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)":t.textShadow==="shadow"&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",n=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=r,e.style.textEmphasisPosition=n,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=n;}t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function ne(e,t){if(t.docStart!==void 0&&(e.dataset.docStart=String(t.docStart)),t.docEnd!==void 0&&(e.dataset.docEnd=String(t.docEnd)),t.commentIds&&t.commentIds.length>0&&(e.dataset.commentId=t.commentIds.join(" ")),t.field){let r=t.field.type??t.field.category;r&&(e.dataset.fieldType=r),t.field.category&&(e.dataset.fieldCategory=t.field.category),t.field.instruction&&(e.dataset.fieldInstruction=t.field.instruction);let n=t.field.instruction?.trim()||r;n&&e.setAttribute("aria-description",n);}if(t.noteRef?.id!==void 0&&(e.dataset.noteRefKind=t.noteRef.kind??"footnote",e.dataset.noteRefId=String(t.noteRef.id)),t.comment){t.comment.status&&(e.dataset.commentStatus=t.comment.status),t.comment.authorId&&(e.dataset.commentAuthorId=t.comment.authorId),t.comment.paletteIndex!==void 0&&(e.dataset.commentPaletteIndex=String(t.comment.paletteIndex)),t.comment.color&&(e.dataset.commentColor=t.comment.color),t.comment.selected!==void 0&&(e.dataset.commentSelected=String(t.comment.selected)),t.comment.authorName&&(e.dataset.commentAuthorName=t.comment.authorName),t.comment.date&&(e.dataset.commentDate=t.comment.date),t.comment.replyCount!==void 0&&(e.dataset.commentReplyCount=String(t.comment.replyCount));let r=[t.comment.status,t.comment.authorName??t.comment.authorId,t.comment.date,t.comment.text,...(t.comment.replies??[]).map(n=>[n.authorName,n.text].filter(Boolean).join(": "))].filter(Boolean).join(", ");r&&e.setAttribute("aria-description",r);}if(t.revision){e.dataset.changeAuthor=t.revision.author,e.dataset.changeDate=t.revision.date,e.dataset.revisionId=t.revision.revisionId,e.classList.add(t.revision.kind==="ins"?"docx-insertion":"docx-deletion"),e.hasAttribute("role")||e.setAttribute("role",t.revision.kind==="ins"?"insertion":"deletion");let r=[t.revision.author,t.revision.date].filter(Boolean).join(", ");r&&e.setAttribute("aria-description",r);}t.href&&(e.dataset.href=t.href),un(e,t.inlineSdtWidget),He(e,t.sdt),t.sdtPath?.length&&(e.dataset.sdtPath=t.sdtPath.map(r=>r.groupId).join(" ")),t.logicalOrder!==void 0&&(e.dataset.logicalOrder=String(t.logicalOrder)),t.bidiLevel!==void 0&&(e.dataset.bidiLevel=String(t.bidiLevel)),ut(e,t);}function ut(e,t){if(t.groupId&&(e.dataset.groupId=t.groupId),t.decorative||t.hiddenObject){e.setAttribute("aria-hidden","true"),e.removeAttribute("role"),e.removeAttribute("aria-label"),e.removeAttribute("aria-description");return}t.ariaLabel&&e.setAttribute("aria-label",t.ariaLabel),t.ariaDescription&&e.setAttribute("aria-description",t.ariaDescription);}function He(e,t){t&&(e.classList.add(R.blockSdt),e.dataset.sdtGroupId=t.groupId,e.dataset.sdtType=t.sdtType,t.depth!==void 0&&(e.dataset.sdtDepth=String(t.depth)),t.tag!==void 0&&(e.dataset.sdtTag=t.tag),t.alias!==void 0&&(e.dataset.sdtAlias=t.alias),t.lock!==void 0&&(e.dataset.sdtLock=t.lock),t.checked!==void 0&&(e.dataset.sdtChecked=String(t.checked)),t.bound!==void 0&&(e.dataset.sdtBound=String(t.bound)),t.repeatingItem!==void 0&&(e.dataset.sdtRepeatingItem=String(t.repeatingItem)),!e.hasAttribute("aria-label")&&(t.alias||t.tag)&&e.setAttribute("aria-label",t.alias||t.tag||""),t.lock&&e.setAttribute("aria-readonly","true"));}function un(e,t){if(!t)return;e.classList.add(R.inlineSdtWidget);let r=t.controlKind??t.kind;e.dataset.sdtWidget=r,e.dataset.sdtGroupId=t.groupId,e.dataset.sdtPos=String(t.pos),t.tag!==void 0&&(e.dataset.sdtTag=t.tag),t.alias!==void 0&&(e.dataset.sdtAlias=t.alias),t.checked!==void 0&&(e.dataset.sdtChecked=String(t.checked),e.setAttribute("aria-checked",String(t.checked))),t.controlId!==void 0&&(e.dataset.sdtControlId=String(t.controlId)),t.value!==void 0&&(e.dataset.sdtValue=t.value),t.selectedIndex!==void 0&&(e.dataset.sdtSelectedIndex=String(t.selectedIndex)),t.dateFormat!==void 0&&(e.dataset.sdtDateFormat=t.dateFormat),t.dateLanguage!==void 0&&(e.dataset.sdtDateLanguage=t.dateLanguage),t.locked!==void 0&&(e.dataset.sdtLocked=String(t.locked)),r==="checkbox"?e.setAttribute("role","checkbox"):r==="dropDownList"||r==="comboBox"?(e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-expanded","false")):r==="date"?(e.setAttribute("role","button"),e.setAttribute("aria-haspopup","dialog")):e.setAttribute("role","group"),e.removeAttribute("tabindex"),(t.alias||t.tag)&&e.setAttribute("aria-label",t.alias||t.tag||""),t.locked&&e.setAttribute("aria-disabled","true");}function he(e,t){switch(t.scope){case "pmark":e.classList.add(R.revisionPmark),t.kind==="ins"&&e.classList.add(R.revisionPmarkIns),t.kind==="del"&&e.classList.add(R.revisionPmarkDel);break;case "table":e.classList.add(R.revisionTable,Ae(t.kind));break;case "row":e.classList.add(R.revisionRow,Ae(t.kind));break;case "cell":e.classList.add(R.revisionCell,Ae(t.kind));break}e.dataset.revisionId=t.revisionId,e.dataset.revisionAuthor=t.author,t.date&&(e.dataset.revisionDate=t.date);let r=[t.author,t.date].filter(Boolean).join(", ");r&&e.setAttribute("aria-description",r);}function Ae(e){return e==="ins"?R.revisionIns:e==="del"?R.revisionDel:R.revisionMerge}function mn(e,t,r,n){let i=r.createElement("section");i.className=R.notes,i.dataset.noteKind=e.kind??"footnote",e.sectionId&&(i.dataset.sectionId=e.sectionId),e.columns!==void 0&&(i.dataset.columns=String(e.columns)),i.style.position="absolute",i.style.left="0",i.style.top=`${e.y??0}px`,i.style.width=`${t.width}px`,i.style.height=`${e.height??0}px`;let s=new Map;for(let a of e.notes??[])a.id!==void 0&&s.set(a.id,a);re(i,e.separatorPrimitives??[],r,-(e.y??0),n);let o=[...e.primitives??[]];for(let a of e.noteIds??[]){let c=`${e.kind??"footnote"}-${a}`,p=o.filter(u=>u.groupId===c);if(p.length===0)continue;for(let u of p){let h=o.indexOf(u);h>=0&&o.splice(h,1);}let g=r.createElement("aside");g.className=R.note,g.id=`oox-${c}`,g.dataset.noteId=String(a),g.setAttribute("role",e.kind==="endnote"?"doc-endnote":"doc-footnote");let y=s.get(a);if(y&&(y.label!==void 0&&(g.dataset.noteLabel=y.label),y.anchorDocStart!==void 0&&(g.dataset.anchorDocStart=String(y.anchorDocStart)),y.anchorDocEnd!==void 0&&(g.dataset.anchorDocEnd=String(y.anchorDocEnd))),re(g,p,r,-(e.y??0),n),y){let u=r.createElement("a");u.className=R.noteBacklink,u.setAttribute("role","doc-backlink"),u.setAttribute("href",`#oox-noteref-${c}`);let h=n.labels?.noteBacklink??y.label??String(a);u.setAttribute("aria-label",h),g.appendChild(u);}i.appendChild(g);}return o.length>0&&re(i,o,r,-(e.y??0),n),i}function pn(e,t){for(let r of Array.from(e.querySelectorAll(".layout-canvas-sdt-box[data-sdt-group-id]")))r.classList.toggle("layout-sdt-focused",t.has(r.dataset.sdtGroupId??""));}var fn=".layout-sdt-widget, .layout-inline-sdt-widget, .layout-sdt-repeat-btn";function yn(e,t={}){let r=t.document??document,n=r.createElement("div");n.className="layout-interactive-overlay",n.dataset.pageIndex=String(e.pageIndex),n.style.position="absolute",n.style.inset="0",n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.pointerEvents="none",n.addEventListener("mousedown",a=>{a.target?.closest?.(fn)&&(a.preventDefault(),a.stopPropagation());});let i=gn(e),s=hn(i);for(let a of [...s.values()].sort(xn))n.appendChild(Ln(a,r,t.labels));let o=bn(i);for(let a of o.values())n.appendChild(Rn(a,r,t.labels));return n}function gn(e){return [...e.primitives,...e.header?.primitives??[],...e.footer?.primitives??[],...(e.noteAreas??[]).flatMap(t=>[...t.separatorPrimitives??[],...t.primitives??[]])]}function hn(e){let t=new Map;for(let r of e){let n=pt(r);if(!n)continue;let i=r.sdtPath?.length?r.sdtPath:r.sdt?[r.sdt]:[];for(let s of i){let o=t.get(s.groupId);o?o.rect=ft(o.rect,n):t.set(s.groupId,{attrs:s,rect:{...n}});}}return t}function bn(e){let t=new Map;for(let r of e){let n=r.inlineSdtWidget,i=pt(r);if(!n||!i)continue;let s=`${n.groupId}:${n.pos}:${n.controlKind??n.kind}`,o=t.get(s);o?o.rect=ft(o.rect,i):t.set(s,{attrs:n,rect:{...i}});}return t}function xn(e,t){return (e.attrs.depth??0)-(t.attrs.depth??0)||e.rect.y-t.rect.y||e.rect.x-t.rect.x}function Ln(e,t,r){let{attrs:n,rect:i}=e,s=t.createElement("div");s.className="layout-block-sdt-box layout-canvas-sdt-box",Sn(s,n),yt(s,i),s.style.pointerEvents="none";let o=n.alias||n.tag;if(o){let c=t.createElement("span");c.className="layout-block-sdt-label",c.textContent=o,s.appendChild(c);}let a=vn(n.sdtType),l=!n.bound&&!In(n.lock);if(a&&l){let c=t.createElement("button");c.type="button",c.className="layout-sdt-widget",c.dataset.sdtWidget=a,c.dataset.sdtGroupId=n.groupId,n.tag&&(c.dataset.sdtTag=n.tag),n.alias&&(c.dataset.sdtAlias=n.alias),(o||r?.control)&&c.setAttribute("aria-label",o||r?.control||""),a==="dropdown"&&c.setAttribute("aria-haspopup","listbox"),a==="date"&&c.setAttribute("aria-haspopup","dialog"),a==="checkbox"&&(c.setAttribute("role","checkbox"),c.setAttribute("aria-checked",String(n.checked??false))),c.textContent=a==="dropdown"?"\u25BE":a==="date"?"\u25A3":n.checked?"\u2612":"\u2610",c.style.pointerEvents="auto",s.appendChild(c);}if(n.repeatingItem&&l){let c=t.createElement("div");c.className="layout-sdt-repeat-controls",c.style.pointerEvents="auto",c.appendChild(mt(t,n,"add","\uFF0B",r?.addRepeatingItem,o)),c.appendChild(mt(t,n,"remove","\u2715",r?.removeRepeatingItem,o)),s.appendChild(c);}return s}function mt(e,t,r,n,i,s){let o=e.createElement("button");return o.type="button",o.className="layout-sdt-repeat-btn",o.dataset.sdtRepeat=r,o.dataset.sdtGroupId=t.groupId,t.tag&&(o.dataset.sdtTag=t.tag),(i||s)&&o.setAttribute("aria-label",i||s||""),o.textContent=n,o}function Rn(e,t,r){let{attrs:n,rect:i}=e,s=n.controlKind??n.kind,o=t.createElement("button");return o.type="button",o.className="layout-sdt-widget layout-inline-sdt-widget layout-canvas-inline-sdt-widget",o.dataset.sdtWidget=Dn(s),o.dataset.sdtGroupId=n.groupId,o.dataset.sdtPos=String(n.pos),n.tag&&(o.dataset.sdtTag=n.tag),n.alias&&(o.dataset.sdtAlias=n.alias),n.controlId!==void 0&&(o.dataset.sdtControlId=String(n.controlId)),n.value!==void 0&&(o.dataset.sdtValue=n.value),n.selectedIndex!==void 0&&(o.dataset.sdtSelectedIndex=String(n.selectedIndex)),n.dateFormat&&(o.dataset.sdtDateFormat=n.dateFormat),n.dateLanguage&&(o.dataset.sdtDateLanguage=n.dateLanguage),n.listItems?.length&&(o.dataset.sdtListItems=JSON.stringify(n.listItems)),(n.alias||n.tag||r?.control)&&o.setAttribute("aria-label",n.alias||n.tag||r?.control||""),s==="checkbox"?(o.setAttribute("role","checkbox"),o.setAttribute("aria-checked",String(n.checked??false))):s==="dropDownList"||s==="comboBox"?(o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false")):s==="date"&&o.setAttribute("aria-haspopup","dialog"),o.disabled=n.locked===true,o.textContent=s==="checkbox"?n.checked?"\u2612":"\u2610":s==="date"?"\u25A3":s==="picture"?"\u25A7":"\u25BE",yt(o,i),o.style.pointerEvents="auto",o}function Dn(e){return e==="dropDownList"||e==="comboBox"?"dropdown":e}function vn(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function In(e){return e==="contentLocked"||e==="sdtContentLocked"||e==="sdtLocked"}function Sn(e,t){e.dataset.sdtGroupId=t.groupId,e.dataset.sdtType=t.sdtType,t.depth!==void 0&&(e.dataset.sdtDepth=String(t.depth)),t.tag&&(e.dataset.sdtTag=t.tag),t.alias&&(e.dataset.sdtAlias=t.alias),t.lock&&(e.dataset.sdtLock=t.lock),t.checked!==void 0&&(e.dataset.sdtChecked=String(t.checked)),t.bound!==void 0&&(e.dataset.sdtBound=String(t.bound)),t.repeatingItem!==void 0&&(e.dataset.sdtRepeatingItem=String(t.repeatingItem));}function pt(e$1){let t=e$1.clipGroup?.clip;if(t?.x!==void 0&&t.y!==void 0&&t.w!==void 0&&t.h!==void 0)return {x:t.x,y:t.y,w:t.w,h:t.h};switch(e$1.kind){case "text":return c(e$1);case "glyphRun":return d(e$1);case "rect":return {x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h};case "line":return e(e$1);case "image":case "shape":return {x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h};case "decoration":return {x:e$1.x,y:e$1.y,w:e$1.w,h:e$1.h}}}function ft(e,t){let r=Math.min(e.x,t.x),n=Math.min(e.y,t.y),i=Math.max(e.x+e.w,t.x+t.w),s=Math.max(e.y+e.h,t.y+t.h);return {x:r,y:n,w:i-r,h:s-n}}function yt(e,t){e.style.position="absolute",e.style.left=`${t.x}px`,e.style.top=`${t.y}px`,e.style.width=`${Math.max(1,t.w)}px`,e.style.height=`${Math.max(1,t.h)}px`;}var K=class extends Error{constructor(r,n){let i=n instanceof Error?n.message:String(n);super(`Rust display-list ${r} failed: ${i}`);b(this,"stage");this.name="RustDisplayListSourceError",this.stage=r;}},gt=null;function Fe(){return gt??(gt=import('../../wasm-ZQAVP7P2.mjs').then(async e=>(await e.preloadLayoutWasm(),{buildDisplayListJson:e.buildDisplayListJson,hitTestRegionsJson:e.hitTestRegionsJson,verticalMoveJson:e.verticalMoveJson,rangeRectsJson:e.rangeRectsJson,rangeRectsRegionJson:e.rangeRectsRegionJson,hasRangeRectsRegion:e.hasRangeRectsRegion,hasDisplayListSession:e.hasDisplayListSession,openDisplayList:e.openDisplayList,closeDisplayList:e.closeDisplayList,updateDisplayList:e.updateDisplayList,hasDisplayListUpdate:e.hasDisplayListUpdate,hitTestRegionsByHandle:e.hitTestRegionsByHandle,verticalMoveByHandle:e.verticalMoveByHandle,rangeRectsByHandle:e.rangeRectsByHandle,rangeRectsRegionByHandle:e.rangeRectsRegionByHandle}))),gt}function Ge(){return Fe()}function kn(e,t){let r=e.measured,n="[";for(let s=0;s<r.length;s++){s>0&&(n+=",");let o=r[s],a=o.measure,l;if(t&&a!==null&&typeof a=="object"){let c=a;l=t.get(c),l===void 0&&(l=JSON.stringify(o.measure),t.set(c,l));}else l=JSON.stringify(o.measure);n+='{"block":'+JSON.stringify(o.block)+',"measure":'+l+"}";}n+="]";let i='{"measured":'+n+',"options":'+JSON.stringify(e.options)+',"layout":'+JSON.stringify(e.layout);return e.contractVersion!==void 0&&(i+=',"contractVersion":'+JSON.stringify(e.contractVersion)),e.headersFooters!==void 0&&(i+=',"headersFooters":'+JSON.stringify(e.headersFooters)),e.fontChains!==void 0&&(i+=',"fontChains":'+JSON.stringify(e.fontChains)),e.noteAreas!==void 0&&(i+=',"noteAreas":'+JSON.stringify(e.noteAreas)),e.resolvedCommentIds!==void 0&&(i+=',"resolvedCommentIds":'+JSON.stringify(e.resolvedCommentIds)),e.commentAuthors!==void 0&&(i+=',"commentAuthors":'+JSON.stringify(e.commentAuthors)),e.commentThreads!==void 0&&(i+=',"commentThreads":'+JSON.stringify(e.commentThreads)),i+="}",i}function ht(e){let t={};return e.contractVersion!==void 0&&(t.contractVersion=e.contractVersion),e.headersFooters!==void 0&&(t.headersFooters=e.headersFooters),e.fontChains!==void 0&&(t.fontChains=e.fontChains),e.noteAreas!==void 0&&(t.noteAreas=e.noteAreas),e.resolvedCommentIds!==void 0&&(t.resolvedCommentIds=e.resolvedCommentIds),e.commentAuthors!==void 0&&(t.commentAuthors=e.commentAuthors),e.commentThreads!==void 0&&(t.commentThreads=e.commentThreads),JSON.stringify(t)}var wn=new WeakMap;async function bt(e,t){let r;try{r=t??await Fe();}catch(s){throw new K("load",s)}let n,i;try{n=kn(e,wn),i=r.buildDisplayListJson(n);}catch(s){throw new K("build",s)}try{return JSON.parse(i)}catch(s){throw new K("parse",s)}}async function Mn(e,t$1,r=null){let n;try{n=t$1??await Fe();}catch(l){throw new K("load",l)}if(!n.buildDisplayListFrame)return {displayList:await bt(e,n),frame:null,transport:"json"};let i=ht(e),s$1;try{s$1=n.buildDisplayListFrame(i,r?.frameEpoch??0);}catch(l){throw new K("build",l)}let o;try{o=s(s$1);}catch(l){throw new K("decode",l)}let a;try{a=t(r,o);}catch(l){throw new K("apply",l)}return {displayList:a.displayList,frame:a,transport:"frame-delta-v1"}}function xt(e,t,r){if(t==="body")return e.primitives.filter(i=>i.kind==="image");let n=t==="header"?e.header:e.footer;return !n||r!==void 0&&n.rId!==r?[]:n.primitives.filter(i=>i.kind==="image")}function Ne(e,t,r="body",n){for(let i of e.pages)for(let s of xt(i,r,n))if(s.docStart===t)return {primitive:s,pageIndex:i.pageIndex,...r!=="body"?{region:r,rId:n}:{}};return null}function Ye(e,t,r,n,i="body",s){let o=e.pages[t];if(!o)return null;let a=xt(o,i,s);for(let l=a.length-1;l>=0;l--){let c=a[l];if(!(r<c.x||r>c.x+c.w)&&!(n<c.y||n>c.y+c.h))return {primitive:c,pageIndex:o.pageIndex,...i!=="body"?{region:i,rId:s}:{}}}return null}function Pn(e,t){let r=e.imageByPos(t);if(!r)return;let n=e.contentBounds(r.pageIndex),i=e.paragraphRects(t).find(s=>s.pageIndex===r.pageIndex);if(!(!n||!i))return {horizontalEmu:Math.round(c$1(r.primitive.x-n.x)),verticalEmu:Math.round(c$1(r.primitive.y-i.y))}}var xe=(()=>{let e=globalThis.FinalizationRegistry;return e?new e(t=>t()):null})(),Oe=new WeakMap,Re=new WeakSet,_e=new Set;function En(e){return e!=null&&Re.has(e)}function An(e){return _e.add(e),()=>{_e.delete(e);}}function Le(e){return e instanceof Error?typeof WebAssembly<"u"&&e instanceof WebAssembly.RuntimeError?true:e.name==="RuntimeError":false}function Tn(e,t){let r=e.storeRevisions();if(!r)return null;let n=new Map;e.list.pages.forEach((a,l)=>n.set(a,l));let i=[],s=[],o=[];return t.pages.forEach((a,l)=>{let c=n.get(a);if(c===void 0){s.push([l,a]);return}n.delete(a);let p=r[c];if(p===void 0){s.push([l,a]);return}let g=v(a)===p?[]:w(a,p);g===null?s.push([l,a]):g.length===0?i.push([l,c]):o.push([l,c,g.map(y=>y.map(u=>[u.start,u.count,u.changedMask,u.delta]))]);}),i.length===0&&o.length===0?null:JSON.stringify({total:t.pages.length,...t.contractVersion!==void 0?{contractVersion:t.contractVersion}:{},reuse:i,replace:s,...o.length>0?{shift:o}:{}})}function Cn(e,t,r){let n=null,i=null,s=()=>(n===null&&(i=e.pages.map(v),n=JSON.stringify(e)),n),o=null,a=Bn(t)?t:null,l=a?null:t??null,c=null,p,g,y=new Promise((d,m)=>{p=d,g=m;});y.catch(()=>{});let u=null,h=false,D=false,k=false,v$1={},L=null;if(r){let d=Oe.get(r);d&&(L=d.hasHandle()?r:d.donor(),d.supersede());}let E=()=>a??l,B=()=>{let d=E();return d!==null&&Re.has(d)},w=(d,m)=>{let f=m instanceof Error?m:new Error(String(m));c=f,u=null,xe?.unregister(v$1);let b=E();if(!(!b||Re.has(b))){Re.add(b),console.error(`[CanvasRenderer] ${d} trapped in wasm; the session is unusable and must be rebuilt`,f);for(let x of _e)try{x(f);}catch(I){console.error("[CanvasRenderer] display-list source failure listener threw",I);}}},N=()=>{if(u!==null&&B()){u=null;return}if(u!==null){try{l?.closeDisplayList?.(u);}catch{}u=null;}},ee=()=>{let d=L;if(L=null,!d||!l?.updateDisplayList||!l.hasDisplayListUpdate?.())return false;let m=Oe.get(d);if(!m||m.engine()!==l)return false;let f=e.pages.map(v),b=Tn(m,e);if(!b)return false;let x=m.takeHandle();if(x===null)return false;try{return l.updateDisplayList(x,b),u=x,o=f,!0}catch(I){try{l.closeDisplayList?.(x);}catch{}return console.warn("[CanvasRenderer] display-list delta update failed; reopening",I),false}},T=()=>{if(!(k||D||h||u!==null||!l||B())&&!(!l.hasDisplayListSession?.()||!l.openDisplayList)&&(h=true,!ee()))try{u=l.openDisplayList(s()),o=i;}catch(d){if(u=null,Le(d)){w("display-list session open",d);return}console.warn("[CanvasRenderer] display-list session open failed; using JSON-arg queries",d);}};a||l?p():Ge().then(d=>{l=d,p();},d=>{c=d instanceof Error?d:new Error(String(d)),g(c),console.warn("[CanvasRenderer] display-list query engine failed to load",c);});let Y=(d,m,f)=>{if(!l||B())return null;if(u===null&&T(),u!==null&&d)try{return d(u)}catch(b){if(Le(b))return w(f,b),null;console.warn(`[CanvasRenderer] ${f} session query failed; falling back`,b),N();}try{return m()}catch(b){return Le(b)?(w(f,b),null):(c=b instanceof Error?b:new Error(String(b)),console.warn(`[CanvasRenderer] ${f} query failed`,b),null)}},P=(d,m,f)=>{if(d===null)return m;try{return JSON.parse(d)}catch(b){return c=b instanceof Error?b:new Error(String(b)),console.warn(`[CanvasRenderer] ${f} returned invalid JSON`,b),m}},Z=(d,m)=>{if(B())return null;try{return d()}catch(f){return Le(f)?(w(`resident ${m}`,f),null):(c=f instanceof Error?f:new Error(String(f)),console.warn(`[CanvasRenderer] resident ${m} query failed`,f),null)}},le=(d,m,f)=>{if(a)return P(Z(()=>a.displayHitTestRegionsJson(d,m,f),"hit_test_regions"),null,"hit_test_regions");let b=Y(l?.hitTestRegionsByHandle&&(x=>l.hitTestRegionsByHandle(x,d,m,f)),()=>l.hitTestRegionsJson(s(),d,m,f),"hit_test_regions");return P(b,null,"hit_test_regions")},H=(d,m)=>{if(a)return P(Z(()=>a.displayRangeRectsJson(d,m),"range_rects"),[],"range_rects");let f=Y(l?.rangeRectsByHandle&&(b=>l.rangeRectsByHandle(b,d,m)),()=>l.rangeRectsJson(s(),d,m),"range_rects");return P(f,[],"range_rects")},te=(d,m,f)=>{let b=f??Number.NaN;if(a)return P(Z(()=>a.displayVerticalMoveJson(d,m,b),"vertical_move"),null,"vertical_move");if(!l?.verticalMoveJson)return null;let x=Y(l.verticalMoveByHandle&&(I=>l.verticalMoveByHandle(I,d,m,b)),()=>l.verticalMoveJson(s(),d,m,b),"vertical_move");return P(x,null,"vertical_move")},C=(d,m,f,b)=>{if(a)return P(Z(()=>a.displayRangeRectsRegionJson(d,m,f,b),"range_rects_region"),[],"range_rects_region");if(!l||!l.hasRangeRectsRegion?.())return [];let x=Y(l.rangeRectsRegionByHandle&&(I=>l.rangeRectsRegionByHandle(I,d,m,f,b)),()=>l.rangeRectsRegionJson(s(),d,m,f,b),"range_rects_region");return P(x,[],"range_rects_region")},O=(d,m,f,b)=>C(d,m,f,b),_=(d,m,f,b)=>C(d,String(m),f,b),J=(d,m)=>{let f=(x,I)=>{let S=new Map;for(let M of x)I&&S.has(M.pageIndex)||S.set(M.pageIndex,{pageIndex:M.pageIndex,x:I?M.x:M.x+M.width,y:M.y,width:0,height:M.height});return [...S.values()]},b=d(m,m+1);if(b.length>0)return f(b,true);if(m>0){let x=d(m-1,m);if(x.length>0)return f(x,false)}return []},X=(d,m,f)=>J((b,x)=>O(d,m,b,x),f),V=(d,m,f)=>J((b,x)=>_(d,m,b,x),f),U=d=>{let m=H(d,d+1);if(m.length>0){let f=m[0];return {pageIndex:f.pageIndex,x:f.x,y:f.y,width:0,height:f.height}}if(d>0){let f=H(d-1,d);if(f.length>0){let b=f[f.length-1];return {pageIndex:b.pageIndex,x:b.x+b.width,y:b.y,width:0,height:b.height}}}return null},z=d=>{let m=H(d,d+2);return m.length>0?m[0]:U(d)},ve=(d,m,f)=>{let b=O(d,m,f,f+2);if(b.length===0)return X(d,m,f);let x=new Map;for(let I of b)x.has(I.pageIndex)||x.set(I.pageIndex,I);return [...x.values()]},ze=(d,m)=>({pageIndex:d,x:m.x,y:m.y,width:m.w,height:m.h}),kt=d=>{let m=e.pages[d];return m?{pageIndex:m.pageIndex,x:0,y:0,width:m.width,height:m.height}:null},wt=d=>{let m=e.pages[d],f=m?.contentBounds;return m&&f?{pageIndex:m.pageIndex,x:f.x,y:f.y,width:f.width,height:f.height}:null},Mt=d=>{let m=e.pages[d];return m?(m.columnBounds??[]).map(f=>({pageIndex:m.pageIndex,x:f.x,y:f.y,width:f.width,height:f.height})):[]},Ie=d=>d.paraId?`para:${d.paraId}`:d.blockKey!==void 0?`block-key:${d.blockKey}`:d.blockId!==void 0?`block-id:${d.blockId}`:null,je=d=>d.blockKey??d.blockId,ce=null,Pt=()=>{if(ce)return ce;let d=new Map;for(let m of e.pages)for(let f$1 of m.primitives){let b=Ie(f$1);if(!b||f$1.docStart===void 0||f$1.docEnd===void 0)continue;let x=f(f$1),I=d.get(b);I||(I=new Map,d.set(b,I));let S=I.get(m.pageIndex);if(!S){I.set(m.pageIndex,{...ze(m.pageIndex,x),from:f$1.docStart,to:f$1.docEnd,blockId:je(f$1),paraId:f$1.paraId});continue}let M=Math.min(S.x,x.x),A=Math.min(S.y,x.y),ue=Math.max(S.x+S.width,x.x+x.w),me=Math.max(S.y+S.height,x.y+x.h);S.x=M,S.y=A,S.width=ue-M,S.height=me-A,S.from=Math.min(S.from,f$1.docStart),S.to=Math.max(S.to,f$1.docEnd);}return ce=new Map([...d].map(([m,f])=>[m,[...f.values()]])),ce},Et=d=>{let m=null;for(let f of e.pages)for(let b of f.primitives){let x=Ie(b),I=b.docStart,S=b.docEnd;if(!x||I===void 0||S===void 0||d<I||d>S)continue;let M={identity:x,span:Math.max(0,S-I),startsAtPos:I===d};(!m||M.startsAtPos&&!m.startsAtPos||M.startsAtPos===m.startsAtPos&&M.span<m.span)&&(m=M);}return m?Pt().get(m.identity)??[]:[]},At=1.5,de=null,Ue=()=>{if(de)return de;let d=[];for(let m of e.pages){let f$1=[],b=0;for(let x of m.primitives){if(x.kind!=="text"&&x.kind!=="glyphRun"||x.docStart===void 0||x.docEnd===void 0||x.kind==="glyphRun"&&x.glyphs.length===0)continue;let I=x.kind==="text"?x.baselineY:x.glyphs.reduce((pe,Ht)=>Math.max(pe,Ht.y),-1/0);if(!Number.isFinite(I))continue;let S=Ie(x)??`anonymous:${b++}`,M=f(x),A=f$1.find(pe=>pe.identity===S&&Math.abs(pe.baseline-I)<=At);if(!A){f$1.push({identity:S,...ze(m.pageIndex,M),baseline:I,from:x.docStart,to:x.docEnd,blockId:je(x),paraId:x.paraId});continue}let ue=Math.min(A.x,M.x),me=Math.min(A.y,M.y),Ct=Math.max(A.x+A.width,M.x+M.w),Bt=Math.max(A.y+A.height,M.y+M.h);A.x=ue,A.y=me,A.width=Ct-ue,A.height=Bt-me,A.from=Math.min(A.from,x.docStart),A.to=Math.max(A.to,x.docEnd);}d.push(...f$1.map(({identity:x,...I})=>I));}return de=d,de},Tt=d=>{let m=null;for(let f of Ue())d<f.from||d>f.to||(!m||f.to-f.from<m.to-m.from)&&(m=f);return m},qe=d=>{if(!d)return null;let m=d.primitive.docStart;if(m===void 0)return null;let{primitive:f}=d;return {...d,pos:m,rect:{pageIndex:d.pageIndex,x:f.x,y:f.y,width:f.w,height:f.h}}},Se={displayList:e,isReady:()=>(a!==null||l!==null)&&c===null,sourceState:()=>c?{status:"error",error:c}:a||l?{status:"ready"}:{status:"loading"},whenReady:()=>y,pageCount:()=>e.pages.length,pageSize:d=>{let m=e.pages[d];return m?{width:m.width,height:m.height}:null},pageBounds:kt,contentBounds:wt,columnBounds:Mt,paragraphRects:Et,visualLines:Ue,visualLineAtPosition:Tt,imageAtPoint:(d,m,f,b="body",x)=>qe(Ye(e,d,m,f,b,x)),imageByPos:(d,m="body",f)=>qe(Ne(e,d,m,f)),hitTestRegions:le,verticalMove:te,rangeRects:H,hfRangeRects:O,noteRangeRects:_,hfCaretRects:X,noteCaretRects:V,hfAnchorRects:ve,caretRect:U,anchorRect:z,sidebarAnchorRect:z,prime:T,dispose:()=>{k||(k=true,N(),xe?.unregister(v$1));}};return xe?.register(Se,N,v$1),Oe.set(Se,{list:e,storeRevisions:()=>o,engine:()=>l,hasHandle:()=>u!==null,donor:()=>L,supersede:()=>{D=true;},takeHandle:()=>{let d=u;return d!==null&&(u=null,xe?.unregister(v$1)),d}}),Se}function Bn(e){return typeof e?.displayHitTestRegionsJson=="function"&&typeof e?.displayVerticalMoveJson=="function"&&typeof e?.displayRangeRectsJson=="function"&&typeof e?.displayRangeRectsRegionJson=="function"}var Hn=16,Fn=24;function oe(e){let t=[],r=24;for(let n=0;n<e.pageCount();n++)t.push(r),r+=(e.pageSize(n)?.height??0)+16;return t}function Gn(){let e=new Map;return t=>{if(!t.startsWith("blob:")&&!t.startsWith("data:"))return null;let r=e.get(t);return r||(r=new Promise(n=>{let i=new Image;i.onload=()=>n(i),i.onerror=()=>n(null),i.src=t;}),e.set(t,r)),r}}function Nn(e,t){let r=e.activeCommentIds.length>0?t?.(e.activeCommentIds):void 0;return {hasSelection:e.hasSelection,inInsertion:e.inInsertion,inDeletion:e.inDeletion,hasComment:e.activeCommentIds.length>0,inList:e.inList,listLevel:e.listLevel??0,...r?.authorName!==void 0?{commentAuthor:r.authorName}:{},...r?.replyCount!==void 0?{commentReplyCount:r.replyCount}:{}}}function Yn(e,t){if(!e)return [];let r=[];return !e.hasSelection&&t.hasSelection&&r.push({key:"selected"}),e.hasSelection&&!t.hasSelection&&r.push({key:"selectionCleared"}),!e.hasComment&&t.hasComment&&r.push({key:"commentedText",...t.commentAuthor!==void 0||t.commentReplyCount!==void 0?{vars:{...t.commentAuthor!==void 0?{author:t.commentAuthor}:{},...t.commentReplyCount!==void 0?{replies:t.commentReplyCount}:{}}}:{}}),!e.inInsertion&&t.inInsertion&&r.push({key:"trackedInsertion"}),!e.inDeletion&&t.inDeletion&&r.push({key:"trackedDeletion"}),(!e.inList&&t.inList||t.inList&&e.listLevel!==t.listLevel)&&r.push({key:"listItem",vars:{level:t.listLevel+1}}),r}function se(e){let t=Number(e);if(Number.isFinite(t))return t;let r=0xcbf29ce484222325n;for(let n of new TextEncoder().encode(e))r=(r^BigInt(n))*0x100000001b3n,r&=0xffffffffffffffffn;return Number(r&(1n<<53n)-1n)}function De(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function On(e){let t=typeof e.story=="string"?[e.story]:[],r=Array.isArray(e.rows)?e.rows:[];for(let n of r){let i=De(n),s=i&&Array.isArray(i.cells)?i.cells:[];for(let o of s){let a=De(o)?.story;typeof a=="string"&&t.push(a);}}return t}function _n(e){let t=e.storyIds(),r=new Map,n=new Set;for(let o of t){let a=[];try{for(let l of e.storySegments(o))if(l.kind==="embed")for(let c of On(l.payload))a.push(c),n.add(c);}catch{}r.set(o,a);}let i=new Map,s=(o,a,l)=>{if(!(l.has(o)||i.has(o))){l.add(o),i.set(o,a);for(let c of r.get(o)??[])s(c,a,l);l.delete(o);}};t.includes("body")&&s("body",{story:"body"},new Set);for(let o of t)!o.startsWith("hf:")||n.has(o)||s(o,{story:o,hfRid:o.slice(3)},new Set);return i}function Xn(e,t,r,n,i){let s=Array.isArray(t.rows)?t.rows:[],o=r+1;for(let a of s){let l=De(a),c=l&&Array.isArray(l.cells)?l.cells:[],p=o+1;for(let g of c){let y=De(g),u=typeof y?.story=="string"?y.story:null,h=u?Xe(e,u,p+1,n,i):0;p+=h+2;}o=p+1;}return o+1-r}function Xe(e,t,r,n,i){if(i.has(t))throw new Error(`recursive yrs story: ${t}`);i.add(t);try{let s=r,o=r,a=0,l=!0;for(let c of e.storySegments(t)){if(c.kind==="text"){a+=c.text.length,l=!1;continue}if(c.kind==="pilcrow"){let p=o+a+2;n.set(c.paraId,{pmStart:o,pmEnd:p}),s=p,o=s,a=0,l=!0;continue}if(c.embedKind==="table"&&l){s+=Xn(e,c.payload,s,n,i),o=s;continue}if(c.embedKind==="blockSdt"&&l){let p=typeof c.payload.story=="string"?c.payload.story:null,g=p?Xe(e,p,s+1,n,i):0;s+=g+2,o=s;continue}if(l&&(c.embedKind==="pageBreak"||c.embedKind==="columnBreak")){s+=1,o=s;continue}a+=1,l=!1;}return s-r}finally{i.delete(t);}}function $n(e){let t=new Map,r=_n(e),n=o=>{let a=r.get(o)?.story;if(!a)return null;if(t.has(a))return t.get(a)??null;try{let l=new Map;return Xe(e,a,0,l,new Set),t.set(a,l),l}catch{return t.set(a,null),null}},i=o=>{let a=r.get(o.story);if(!a)return null;let l=n(o.story)?.get(o.paraId);if(!l)return null;let c=Math.max(0,l.pmEnd-l.pmStart-2),p=Math.min(Math.max(0,Math.trunc(o.offset)),c);return {story:o.story,position:l.pmStart+1+p,...a.hfRid?{hfRid:a.hfRid}:{}}};return {locToDisplayPoint:i,storyOffsetToDisplayPoint:(o,a)=>{if(!r.has(o))return null;let l=Math.max(0,Math.trunc(a));try{for(let c of e.paragraphs(o)){let p=e.locateParagraph(o,c.paraId);if(!(l<p.start||l>p.end))return i({story:o,paraId:c.paraId,offset:Math.min(l-p.start,p.end-p.start)})}}catch{return null}return null}}}function $e(e,t){let{doc:r,schema:n}=e.state,i=n.marks.comment,s=n.marks.insertion,o=n.marks.deletion;!i&&!s&&!o||r.descendants((a,l)=>{let c=a.attrs;if(c){let p=[c.trIns,c.trDel,c.pPrIns,c.pPrDel];for(let h of p){let D=h?.revisionId;typeof D=="number"&&t(`revision-${D}`,l);}let y=c.cellMarker?.info?.revisionId;typeof y=="number"&&t(`revision-${y}`,l);let u=[c.pPrChange,c.trPrChange,c.tcPrChange,c.tblPrChange];for(let h of u)if(Array.isArray(h))for(let D of h){let k=D?.info?.id;typeof k=="number"&&t(`revision-${k}`,l);}}if(a.isInline)for(let p of a.marks){let g=null;i&&p.type===i?g=`comment-${p.attrs.commentId}`:(s&&p.type===s||o&&p.type===o)&&(g=`revision-${p.attrs.revisionId}`),g&&t(g,l);}});}function Jn(e,t,r){let n=new Map;if(!e?.state)return n;let i=oe(t),s=new Set;return $e(e,(o,a)=>{if(s.has(o))return;s.add(o);let l=t.anchorRect(a);if(!l)return;let c=r?r(l):(i[l.pageIndex]??0)+l.y;c!=null&&n.set(o,c);}),n}function Qn(e,t,r){if(!e.hfRid)return t.anchorRect(e.position);let n=r?.get(e.hfRid);return n?t.hfAnchorRects(n,e.hfRid,e.position)[0]??null:null}function Wn(e,t,r,n,i,s,o){let a=new Map,l=oe(i),c=(p,g)=>{if(!g||a.has(p))return a.has(p);let y=Qn(g,i,s);if(!y)return false;let u=o?o(y):(l[y.pageIndex]??0)+y.y;return u==null?false:(a.set(p,u),true)};for(let p of t){let g=`comment-${p}`;try{for(let y of e.resolveComment(String(p)))if(c(g,n.storyOffsetToDisplayPoint(y.story,y.start)))break}catch{}}for(let p of r)c(`revision-${se(p.revisionId)}`,n.locToDisplayPoint({story:p.story,...p.range.start}));return a}function Kn(e,t,r,n){let i=oe(t);for(let{region:s,rId:o,view:a}of e)$e(a,(l,c)=>{if(r.has(l))return;let p=t.hfAnchorRects(s,o,c)[0];if(!p)return;let g=n?n(p):(i[p.pageIndex]??0)+p.y;g!=null&&r.set(l,g);});return r}function Vn(e,t){let r=e.map(o=>{let a=t.locToDisplayPoint({story:o.range.story,...o.range.start}),l=t.locToDisplayPoint({story:o.range.story,...o.range.end}),c=a?.position??0,p=Math.max(c,l?.position??c);return {type:o.kind==="pPrIns"?"paragraphMarkInsertion":o.kind==="pPrDel"?"paragraphMarkDeletion":o.kind==="pPrChange"?"paragraphPropertiesChanged":o.kind==="trIns"?"rowInserted":o.kind==="trDel"?"rowDeleted":o.kind==="tableIns"?"tableInserted":o.kind==="tableDel"?"tableDeleted":o.kind,text:o.preview,author:o.author,date:o.date||void 0,from:c,to:p,revisionId:se(o.revisionId),...a?.hfRid?{hfRid:a.hfRid}:{}}}),n=new Map;for(let o of r){let a=n.get(o.revisionId)??[];a.push(o),n.set(o.revisionId,a);}let i=[...n.values()].map(o=>{let a=Math.min(...o.map(u=>u.from)),l=Math.max(...o.map(u=>u.to)),c=o.filter(u=>u.type==="insertion"),p=o.filter(u=>u.type==="deletion");if(c.length>0&&p.length>0)return {...c[0],type:"replacement",text:c.map(h=>h.text).join(""),deletedText:p.map(h=>h.text).join(""),from:a,to:l};let g=o.find(u=>u.type==="insertion"||u.type==="deletion")??o[0],y=o.filter(u=>u.type===g.type).map(u=>u.text).join("");return {...g,text:y,from:a,to:l}}),s=[];for(let o=0;o<i.length;o+=1){let a=i[o],l=i[o+1];a.type==="deletion"&&l?.type==="insertion"&&a.author===l.author&&a.date===l.date&&a.to===l.from&&a.hfRid===l.hfRid?(s.push({type:"replacement",text:l.text,deletedText:a.text,author:a.author,date:a.date,from:a.from,to:l.to,revisionId:a.revisionId,insertionRevisionId:l.revisionId,...a.hfRid?{hfRid:a.hfRid}:{}}),o+=1):s.push(a);}return {entries:s,commentToRevision:new Map}}function zn(e,t){let r=t.kind??"body";if(r==="body")return {kind:r,primitives:e.primitives};let n=r==="header"?e.header:e.footer;return !n||n.kind!==r||t.rId&&n.rId!==t.rId?null:{kind:r,rId:n.rId,primitives:n.primitives}}function jn(e){switch(e.kind){case "text":return c(e);case "glyphRun":return d(e);case "rect":case "image":case "shape":case "decoration":return {x:e.x,y:e.y,w:e.w,h:e.h};case "line":return {x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),w:Math.abs(e.x2-e.x1),h:Math.abs(e.y2-e.y1)}}}function Un(e){let t=jn(e),r=e.clipGroup?.clip;if(!r)return t;let n=r.x??0,i=r.y??0,s=n+Math.max(0,r.w??0),o=i+Math.max(0,r.h??0),a=Math.max(t.x,n),l=Math.max(t.y,i),c=Math.min(t.x+t.w,s),p=Math.min(t.y+t.h,o);return c<a||p<l?null:{x:a,y:l,w:c-a,h:p-l}}function qn(e){return e.kind==="text"||e.kind==="glyphRun"?e.text:e.kind==="image"?e.altText??"":""}function Zn(e,t,r){return t>=e.x&&t<=e.x+e.w&&r>=e.y&&r<=e.y+e.h}function ei(e,t,r,n,i={kind:"body"}){let s=e.pages[t];if(!s)return null;let o=zn(s,i);if(!o)return null;for(let a=o.primitives.length-1;a>=0;a--){let l=o.primitives[a];if(l.kind==="line"||!l.href||l.hiddenObject)continue;let c=Un(l);if(c&&Zn(c,r,n))return {pageIndex:t,region:o.kind,rId:o.rId,href:l.href,tooltip:l.linkTitle??l.tooltip,displayText:qn(l)||l.href,rect:c}}return null}var $=7.5,q=16,Lt=320,ti=30,ni=200,ii=24,ri=10,oi=10,si=24;function Rt(e){let t;switch(e.kind){case "text":t=c(e);break;case "glyphRun":t=d(e);break;case "rect":case "image":case "shape":case "decoration":t={x:e.x,y:e.y,w:e.w,h:e.h};break;case "line":t={x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),w:Math.abs(e.x2-e.x1),h:Math.abs(e.y2-e.y1)};break}let r=Qe(e);return r?ai(t,r)??{x:r.x,y:r.y,w:0,h:0}:t}function Qe(e){let t=e.clipGroup?.clip;return t?{x:t.x??0,y:t.y??0,w:Math.max(0,t.w??0),h:Math.max(0,t.h??0)}:null}function ai(e,t){let r=Math.max(e.x,t.x),n=Math.max(e.y,t.y),i=Math.min(e.x+e.w,t.x+t.w),s=Math.min(e.y+e.h,t.y+t.h);return i<r||s<n?null:{x:r,y:n,w:i-r,h:s-n}}function Dt(e,t,r){if(e.docStart!=null){let n=t(e.docStart);if(n!=null){let i={tableKey:n,docStartSample:e.docStart};return e.table?.tableId&&!r.has(e.table.tableId)&&r.set(e.table.tableId,i),i}}return e.table?.tableId?r.get(e.table.tableId)??null:null}function vt(e,t,r){let n=e.table?.tableId;if(!n)return null;let i=t.get(n);return i?r.get(i.tableKey)??null:null}function li(e,t,r,n){let i=new Map;for(let o of t){if(o.kind==="line")continue;let a=o.cell;if(!a)continue;let l=Dt(o,r,n);if(!l)continue;let{tableKey:c,docStartSample:p}=l,g=Rt(o),y=Qe(o),u=y??g,h=i.get(c);if(h||(h={tableKey:c,docStartSample:p,contentMinX:u.x,contentMinY:u.y,contentMaxX:u.x+u.w,contentMaxY:u.y+u.h,exactLeftX:[],exactBottomY:[],exactClipLeftX:[],exactClipBottomY:[],rows:new Map},i.set(c,h)),p<h.docStartSample&&(h.docStartSample=p),h.contentMinX=Math.min(h.contentMinX,u.x),h.contentMinY=Math.min(h.contentMinY,u.y),h.contentMaxX=Math.max(h.contentMaxX,u.x+u.w),h.contentMaxY=Math.max(h.contentMaxY,u.y+u.h),y&&(h.exactClipLeftX.push(y.x),h.exactClipBottomY.push(y.y+y.h)),!a.continuation){let D=h.rows.get(a.row);D?(D.top=Math.min(D.top,u.y),D.bottom=Math.max(D.bottom,u.y+u.h)):h.rows.set(a.row,{top:u.y,bottom:u.y+u.h});}}if(i.size===0)return [];for(let o of t){if(o.kind!=="line"||o.role!=="table-border"&&o.role!=="table-cut")continue;let a=vt(o,n,i);if(!a){let p=(o.x1+o.x2)/2,g=(o.y1+o.y2)/2,y=1/0;for(let u of i.values()){let h=p>=u.contentMinX-q&&p<=u.contentMaxX+q,D=g>=u.contentMinY-q&&g<=u.contentMaxY+q;if(!h||!D)continue;let k=Math.max(0,u.contentMinX-p,p-u.contentMaxX),v=Math.max(0,u.contentMinY-g,g-u.contentMaxY),L=k+v;L<y&&(y=L,a=u);}}if(!a)continue;let l=Math.abs(o.x1-o.x2)<.5,c=Math.abs(o.y1-o.y2)<.5;l&&a.exactLeftX.push(Math.min(o.x1,o.x2)),c&&a.exactBottomY.push(Math.max(o.y1,o.y2));}let s=[];for(let o of i.values()){if(o.rows.size===0)continue;let a=o.exactLeftX.length>0||o.exactClipLeftX.length>0,l=a?Math.min(...o.exactLeftX,...o.exactClipLeftX):o.contentMinX-$,c=o.exactBottomY.length>0||o.exactClipBottomY.length>0?Math.max(...o.exactBottomY,...o.exactClipBottomY):o.contentMaxY,p=[...o.rows.entries()].map(([g,y])=>({rowIndex:g,top:y.top,bottom:y.bottom})).sort((g,y)=>g.rowIndex-y.rowIndex);s.push({pageIndex:e,tableKey:o.tableKey,docStartSample:o.docStartSample,originX:l,originY:o.contentMinY,bottomY:c,originExact:a,rowBands:p});}return s}function ci(e,t){let r=[],n=Ke(e,t,{kind:"body"});for(let i of e.pages)r.push(...li(i.pageIndex,i.primitives,t,n));return r}function We(e,t){let r=t.kind??"body";if(r==="body")return {kind:r,primitives:e.primitives};let n=r==="header"?e.header:e.footer;return !n||n.kind!==r||t.rId&&n.rId!==t.rId?null:{kind:r,rId:n.rId,primitives:n.primitives}}function Ke(e,t,r){let n=new Map;for(let i of e.pages){let s=We(i,r);if(s)for(let o of s.primitives){if(!o.cell||!o.table?.tableId||o.docStart==null)continue;let a=t(o.docStart);if(a==null)continue;let l=n.get(o.table.tableId);(!l||o.docStart<l.docStartSample)&&n.set(o.table.tableId,{tableKey:a,docStartSample:o.docStart});}}return n}function Ve(e,t){return `${e}:${t}`}function di(e,t,r,n){let i=Ve(t.row,t.col),s=e.cells.get(i);s?(s.minX=Math.min(s.minX,r.x),s.minY=Math.min(s.minY,r.y),s.maxX=Math.max(s.maxX,r.x+r.w),s.maxY=Math.max(s.maxY,r.y+r.h),s.rowSpan=Math.max(s.rowSpan,t.rowSpan),s.colSpan=Math.max(s.colSpan,t.colSpan),n&&(s.exactClip=n)):e.cells.set(i,{row:t.row,col:t.col,rowSpan:t.rowSpan,colSpan:t.colSpan,minX:r.x,minY:r.y,maxX:r.x+r.w,maxY:r.y+r.h,exactClip:n??void 0});}function It(e,t,r){let n=new Map;for(let i of e){if(i.kind==="line")continue;let s=i.cell;if(!s)continue;let o=Dt(i,t,r);if(!o)continue;let a=o.tableKey,l=Rt(i),c=n.get(a);c||(c={tableKey:a,contentMinX:l.x,contentMinY:l.y,contentMaxX:l.x+l.w,contentMaxY:l.y+l.h,cells:new Map,verticalLines:[],horizontalLines:[]},n.set(a,c)),c.contentMinX=Math.min(c.contentMinX,l.x),c.contentMinY=Math.min(c.contentMinY,l.y),c.contentMaxX=Math.max(c.contentMaxX,l.x+l.w),c.contentMaxY=Math.max(c.contentMaxY,l.y+l.h),di(c,s,l,Qe(i));}if(n.size===0)return [];for(let i of e){if(i.kind!=="line"||i.role!=="table-border"&&i.role!=="table-cut")continue;let s=Math.abs(i.x1-i.x2)<.5,o=Math.abs(i.y1-i.y2)<.5;if(!s&&!o)continue;let a=Math.min(i.x1,i.x2),l=Math.max(i.x1,i.x2),c=Math.min(i.y1,i.y2),p=Math.max(i.y1,i.y2),g=vt(i,r,n);if(g){s?g.verticalLines.push(a):g.horizontalLines.push(c);continue}for(let y of n.values())if(s){if(!(p>=y.contentMinY-q&&c<=y.contentMaxY+q))continue;let h=a;Math.max(0,y.contentMinX-h,h-y.contentMaxX)<=Lt&&y.verticalLines.push(h);}else if(o){if(!(l>=y.contentMinX-q&&a<=y.contentMaxX+q))continue;let h=c;Math.max(0,y.contentMinY-h,h-y.contentMaxY)<=Lt&&y.horizontalLines.push(h);}}return [...n.values()]}function ae(e){let t=[];for(let r of [...e].sort((n,i)=>n-i))(t.length===0||Math.abs(t[t.length-1]-r)>.5)&&t.push(r);return t}function St(e){let t=ae([...e.cells.values()].map(i=>i.row)),r=ae(e.horizontalLines),n=new Map;if(t.length>0&&r.length>=t.length+1)for(let i=0;i<t.length;i++)n.set(t[i],r[i]),n.set(t[i]+1,r[i+1]);return n}function Je(e){if(!e)return null;if(e.exactClip)return e.exactClip;let t=e.minX-$,r=e.minY-$;return {x:t,y:r,w:Math.max(1,e.maxX-e.minX+$*2),h:Math.max(1,e.maxY-e.minY+$*2)}}function ui(e,t){let r=1/0,n=-1/0;for(let i of e.cells.values())i.row===t&&(r=Math.min(r,i.exactClip?.y??i.minY-$),n=Math.max(n,i.exactClip?i.exactClip.y+i.exactClip.h:i.maxY+$));return !Number.isFinite(r)||!Number.isFinite(n)||n<=r?null:{top:r,bottom:n}}function mi(e,t,r){let n=Je(e.cells.get(Ve(t,r)));return n?{left:n.x,right:n.x+n.w,top:n.y,bottom:n.y+n.h}:null}function pi(e,t,r,n={kind:"body"}){if(t.length===0)return [];let i=new Map;for(let a of t){let l=i.get(a.tableKey);l?l.push(a):i.set(a.tableKey,[a]);}let s=[],o=Ke(e,r,n);for(let a of e.pages){let l=We(a,n);if(!l)continue;let c=It(l.primitives,r,o);for(let p of c){let g=i.get(p.tableKey);if(!g)continue;let y=ae(p.verticalLines),u=St(p);for(let h of g){let D=p.cells.get(Ve(h.row,h.col)),k=y[h.col],v=y[h.col+h.colSpan],L=u.get(h.row),E=u.get(h.row+h.rowSpan),B=true;if(k==null||v==null||v<=k){let w=D?.exactClip??Je(D);if(!w)continue;k=w.x,v=w.x+w.w,B=D?.exactClip!=null;}if(L==null||E==null||E<=L){let w=D?.exactClip??Je(D);if(!w)continue;L=w.y,E=w.y+w.h,B&&(B=D?.exactClip!=null);}s.push({pageIndex:a.pageIndex,tableKey:p.tableKey,row:h.row,col:h.col,rowSpan:h.rowSpan,colSpan:h.colSpan,x:k,y:L,w:Math.max(1,v-k),h:Math.max(1,E-L),exact:B,region:l.kind,rId:l.rId});}}}return s}function fi(e){let{list:t,pageIndex:r,x:n,y:i,canvasRect:s,pageSize:o,tableKeyOf:a,cellPmPosOf:l,region:c={kind:"body"},edgeProximity:p=ti}=e,g=t.pages[r];if(!g)return null;let y=We(g,c);if(!y)return null;let u=o.width>0?s.width/o.width:1,h=o.height>0?s.height/o.height:1,D=(L,E)=>({clientX:s.left+L*u,clientY:s.top+E*h}),k=Ke(t,a,c),v=It(y.primitives,a,k);for(let L of v){let E=ae(L.verticalLines),B=St(L),w=ae([...L.cells.values()].map(H=>H.row));if(w.length===0)continue;let N=E[0]??L.contentMinX-$,ee=E[E.length-1]??L.contentMaxX+$,T=B.get(w[0])??L.contentMinY-$,Y=w[w.length-1],P=B.get(Y+1)??L.contentMaxY+$,Z=n<N+p&&n>=N-p,le=i<T+p&&i>=T-p;if(!(!Z&&!le)){if(Z&&i>=T-p&&i<=P)for(let H of w){let te=B.get(H),C=B.get(H+1),O=te==null||C==null?ui(L,H):null,_=te??O?.top,J=C??O?.bottom;if(_==null||J==null||J<=_||i<_||i>J)continue;let X=[...L.cells.values()].filter(z=>z.row===H).sort((z,ve)=>z.col-ve.col)[0];if(!X)continue;let V=l(L.tableKey,H,X.col);if(!V)continue;let U=D(N,_+(J-_)/2);return {type:"row",clientX:U.clientX-ii,clientY:U.clientY-ri,cellPmPos:V}}if(le&&n>=N-p&&n<=ee){let H=w[0],te=[...L.cells.values()].filter(C=>C.row===H).sort((C,O)=>C.col-O.col);for(let C of te){let O=E[C.col],_=E[C.col+C.colSpan],J=O==null||_==null?mi(L,C.row,C.col):null,X=O??J?.left,V=_??J?.right;if(X==null||V==null||V<=X||n<X||n>V)continue;let U=l(L.tableKey,C.row,C.col);if(!U)continue;let z=D(X+(V-X)/2,T);return {type:"column",clientX:z.clientX-oi,clientY:z.clientY-si,cellPmPos:U}}}}}return null}var lr=tt;export{Fn as CANVAS_PAGES_PADDING_PX,Hn as CANVAS_PAGE_GAP_PX,ni as DISPLAY_LIST_TABLE_INSERT_HIDE_DELAY_MS,R as MIRROR_CLASS_NAMES,K as RustDisplayListSourceError,pn as applyInteractiveSdtFocus,yn as buildInteractiveOverlayPage,en as buildMirrorPage,Mn as buildRustDisplayFrame,bt as buildRustDisplayList,oe as canvasPageTops,Pn as captureInlinePositionEmuFromDisplayList,Yn as computeA11yAnnouncements,Jn as computeAnchorPositionsFromDisplayList,Wn as computeAnchorPositionsFromYrs,Gn as createCanvasImageResolver,Cn as createDisplayListQueries,$n as createYrsSidebarProjection,lr as demoDisplayList,pi as deriveDisplayListSelectedCellRects,ci as deriveDisplayListTableFragments,fi as detectDisplayListTableInsertHover,ht as encodeDisplayListFrameExtras,Vn as extractTrackedChangesFromYrs,ei as findDisplayListHyperlinkAtPoint,Ye as findImagePrimitiveAtPoint,Ne as findImagePrimitiveByDocPos,En as isDisplayListQuerySourceDead,Zt as loadGlyphOutlineProvider,Ge as loadRustDisplayListQueryEngine,Kn as mergeHfAnchorPositionsFromDisplayList,An as onDisplayListQuerySourceFailure,Nn as snapshotFromSelectionContext,$e as visitAnchorKeys,se as yrsIdToNumericId};
@@ -1,13 +1,13 @@
1
1
  import { RenderedDomContext, PositionCoordinates } from './index.mjs';
2
- import { D as DisplayListRect, a as DisplayListQueries } from '../displayListQueries-DGDR-OWc.mjs';
2
+ import { D as DisplayListRect, a as DisplayListQueries } from '../displayListQueries-DF8F6fMl.mjs';
3
3
  import '../types/document.mjs';
4
- import '../content-DrqzbIr7.mjs';
5
- import '../formatting-BqrFPeev.mjs';
4
+ import '../content-CvEtPl0c.mjs';
5
+ import '../formatting-7zKCTu5a.mjs';
6
6
  import '../docx/wrapTypes.mjs';
7
- import '../styles-CMybYYHS.mjs';
8
- import '../frameDelta-DMgR8n13.mjs';
9
- import '../rustDisplayList-B9dQoLHI.mjs';
10
- import '../types-CXLxVF1t.mjs';
7
+ import '../styles-7e-mq3c-.mjs';
8
+ import '../frameDelta-pA4jrQ1G.mjs';
9
+ import '../rustDisplayList-BJqaN9tt.mjs';
10
+ import '../types-C4A8mWjU.mjs';
11
11
  import '../layout/pagination/index.mjs';
12
12
 
13
13
  /**
@@ -1,8 +1,8 @@
1
1
  import { Document } from '../types/document.mjs';
2
- import '../content-DrqzbIr7.mjs';
3
- import '../formatting-BqrFPeev.mjs';
2
+ import '../content-CvEtPl0c.mjs';
3
+ import '../formatting-7zKCTu5a.mjs';
4
4
  import '../docx/wrapTypes.mjs';
5
- import '../styles-CMybYYHS.mjs';
5
+ import '../styles-7e-mq3c-.mjs';
6
6
 
7
7
  /**
8
8
  * Framework-Agnostic Plugin Interface for the DOCX Editor
@@ -1,9 +1,9 @@
1
1
  import { SidebarItem, RenderedDomContext } from './index.mjs';
2
2
  import '../types/document.mjs';
3
- import '../content-DrqzbIr7.mjs';
4
- import '../formatting-BqrFPeev.mjs';
3
+ import '../content-CvEtPl0c.mjs';
4
+ import '../formatting-7zKCTu5a.mjs';
5
5
  import '../docx/wrapTypes.mjs';
6
- import '../styles-CMybYYHS.mjs';
6
+ import '../styles-7e-mq3c-.mjs';
7
7
 
8
8
  /**
9
9
  * Pure layout algorithm: given a list of sidebar items + their
@@ -1,6 +1,6 @@
1
- import { a as Layout } from './types-CXLxVF1t.mjs';
1
+ import { L as Layout } from './types-C4A8mWjU.mjs';
2
2
  import { MeasuredBlock } from './layout/pagination/index.mjs';
3
- import { D as DisplayList, R as RetainedFrame } from './frameDelta-DMgR8n13.mjs';
3
+ import { D as DisplayList, R as RetainedFrame } from './frameDelta-pA4jrQ1G.mjs';
4
4
 
5
5
  /**
6
6
  * JS seam to the Rust display-list builder.
@@ -1,5 +1,5 @@
1
- import { a as ParagraphFormatting, b as TextFormatting } from '../formatting-BqrFPeev.mjs';
2
- import { S as StyleDefinitions, a as Style, D as DocDefaults } from '../styles-CMybYYHS.mjs';
1
+ import { a as ParagraphFormatting, b as TextFormatting } from '../formatting-7zKCTu5a.mjs';
2
+ import { S as StyleDefinitions, a as Style, D as DocDefaults } from '../styles-7e-mq3c-.mjs';
3
3
 
4
4
  /**
5
5
  * Style Resolver
@@ -7,8 +7,8 @@ import { S as StyleDefinitions, a as Style, D as DocDefaults } from '../styles-C
7
7
  * Resolves OOXML style definitions to final paragraph and run properties.
8
8
  * Handles the cascade:
9
9
  * 1. Document defaults (docDefaults)
10
- * 2. Normal style (if no explicit styleId)
11
- * 3. Style chain (basedOn inheritance resolved during parsing)
10
+ * 2. Table paragraph context
11
+ * 3. Normal style or style chain (basedOn inheritance resolved during parsing)
12
12
  * 4. Inline properties
13
13
  *
14
14
  * Based on ECMA-376 style cascade rules.
@@ -54,7 +54,7 @@ declare class StyleResolver {
54
54
  * @param styleId - The style ID to resolve (e.g., 'Heading1', 'Normal')
55
55
  * @returns Resolved paragraph and run formatting
56
56
  */
57
- resolveParagraphStyle(styleId: string | undefined | null): ResolvedParagraphStyle;
57
+ resolveParagraphStyle(styleId: string | undefined | null, tableParagraphFormatting?: ParagraphFormatting): ResolvedParagraphStyle;
58
58
  /**
59
59
  * Resolve the style applied to the paragraph that follows one styled with
60
60
  * `styleId` when the user presses Enter (OOXML `w:next`, §17.7.4.10).
@@ -113,10 +113,6 @@ declare class StyleResolver {
113
113
  hasStyle(styleId: string): boolean;
114
114
  private findDefaultStyle;
115
115
  private mergeStyleIntoResult;
116
- /**
117
- * Merge paragraph formatting (source overrides target)
118
- */
119
- private mergeParagraphFormatting;
120
116
  private mergeTextFormatting;
121
117
  }
122
118
  /**
@@ -1 +1 @@
1
- export{b as StyleResolver,c as createStyleResolver}from'../chunk-WBH3SXI6.mjs';import'../chunk-TTRUPDAB.mjs';
1
+ export{c as StyleResolver,d as createStyleResolver}from'../chunk-47Q2FMFF.mjs';import'../chunk-TTRUPDAB.mjs';
@@ -1,4 +1,4 @@
1
- import { b as TextFormatting, a as ParagraphFormatting, c as TableFormatting, d as TableRowFormatting, e as TableCellFormatting } from './formatting-BqrFPeev.mjs';
1
+ import { b as TextFormatting, a as ParagraphFormatting, c as TableFormatting, d as TableRowFormatting, e as TableCellFormatting } from './formatting-7zKCTu5a.mjs';
2
2
 
3
3
  /**
4
4
  * Styles, Theme, Font Table, Relationships & Media Types
@@ -1,3 +1,3 @@
1
- export { B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, e as Chart, p as ChartAxis, q as ChartContent, t as ChartLegend, x as ChartSeries, y as ChartType, z as Column, f as Comment, J as CommentRangeEnd, K as CommentRangeStart, M as ComplexField, Q as DEFAULT_WATERMARK_PRESETS, T as Deletion, g as DocumentBody, U as DrawingContent, j as Endnote, X as EndnotePosition, E as EndnoteProperties, Y as Field, Z as FieldCharContent, a0 as FieldType, a1 as FooterReference, i as Footnote, a2 as FootnotePosition, F as FootnoteProperties, H as HeaderFooter, a3 as HeaderFooterType, a4 as HeaderReference, a5 as Hyperlink, a7 as Image, a8 as ImageCrop, ab as ImagePadding, ac as ImagePosition, ae as ImageSize, af as ImageTransform, ag as ImageWrap, ai as InlineSdt, aj as Insertion, ak as InstrTextContent, am as LineNumberRestart, ap as MathEquation, aq as MoveFrom, ar as MoveFromRangeEnd, as as MoveFromRangeStart, at as MoveTo, au as MoveToRangeEnd, av as MoveToRangeStart, aw as NoBreakHyphenContent, ax as NoteNumberRestart, ay as NoteRefMarkContent, az as NoteReferenceContent, aE as PageOrientation, P as Paragraph, aF as ParagraphContent, aG as ParagraphPropertyChange, aH as PictureWatermark, aI as PropertyChangeInfo, aJ as Run, aK as RunContent, aL as RunPropertyChange, aN as SdtDataBinding, b as SdtProperties, aQ as SdtType, aR as Section, S as SectionProperties, aS as SectionStart, aT as SeparatorContent, aU as Shape, aV as ShapeContent, aY as ShapeTextBody, aZ as SimpleField, a_ as SoftHyphenContent, b1 as SymbolContent, b2 as TabContent, b3 as Table, b4 as TableCell, b5 as TableCellPropertyChange, b6 as TablePropertyChange, b7 as TableRow, b8 as TableRowPropertyChange, b9 as TableStructuralChangeInfo, ba as TextBox, bb as TextContent, bc as TextWatermark, bd as TrackedChangeInfo, be as TrackedRunChange, bf as VerticalAlign, W as Watermark, bg as pictureWatermarkDisplayEmu } from '../content-DrqzbIr7.mjs';
2
- export { k as ShapeFill, l as ShapeOutline, m as ShapeType } from '../formatting-BqrFPeev.mjs';
1
+ export { B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, d as Chart, p as ChartAxis, q as ChartContent, t as ChartLegend, x as ChartSeries, y as ChartType, z as Column, e as Comment, J as CommentRangeEnd, K as CommentRangeStart, M as ComplexField, Q as DEFAULT_WATERMARK_PRESETS, T as Deletion, g as DocumentBody, U as DrawingContent, j as Endnote, X as EndnotePosition, E as EndnoteProperties, Y as Field, Z as FieldCharContent, a0 as FieldType, a1 as FooterReference, i as Footnote, a2 as FootnotePosition, F as FootnoteProperties, H as HeaderFooter, a3 as HeaderFooterType, a4 as HeaderReference, a6 as Hyperlink, a8 as Image, a9 as ImageCrop, ac as ImagePadding, ad as ImagePosition, af as ImageSize, ag as ImageTransform, ah as ImageWrap, aj as InlineSdt, ak as Insertion, al as InstrTextContent, an as LineNumberRestart, aq as MathEquation, ar as MoveFrom, as as MoveFromRangeEnd, at as MoveFromRangeStart, au as MoveTo, av as MoveToRangeEnd, aw as MoveToRangeStart, ax as NoBreakHyphenContent, ay as NoteNumberRestart, az as NoteRefMarkContent, aA as NoteReferenceContent, aF as PageOrientation, P as Paragraph, aG as ParagraphContent, aH as ParagraphPropertyChange, aI as PictureWatermark, aJ as PropertyChangeInfo, bi as RawXml, aK as Run, aL as RunContent, aM as RunPropertyChange, aO as SdtDataBinding, a as SdtProperties, aR as SdtType, aS as Section, f as SectionProperties, aT as SectionStart, aU as SeparatorContent, aV as Shape, aW as ShapeContent, aZ as ShapeTextBody, a_ as SimpleField, a$ as SoftHyphenContent, b2 as SymbolContent, b3 as TabContent, b4 as Table, b5 as TableCell, b6 as TableCellPropertyChange, b7 as TablePropertyChange, b8 as TableRow, b9 as TableRowPropertyChange, ba as TableStructuralChangeInfo, bb as TextBox, bc as TextContent, bd as TextWatermark, be as TrackedChangeInfo, bf as TrackedRunChange, bg as VerticalAlign, W as Watermark, bh as pictureWatermarkDisplayEmu } from '../content-CvEtPl0c.mjs';
2
+ export { k as ShapeFill, l as ShapeOutline, m as ShapeType } from '../formatting-7zKCTu5a.mjs';
3
3
  import '../docx/wrapTypes.mjs';
@@ -1,9 +1,9 @@
1
- import { F as FootnoteProperties, E as EndnoteProperties, g as DocumentBody, h as NumberingDefinitions, i as Footnote, j as Endnote, H as HeaderFooter, e as Chart, k as BookmarkRange } from '../content-DrqzbIr7.mjs';
2
- export { A as AbstractNumbering, B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, p as ChartAxis, q as ChartContent, r as ChartDataLabels, s as ChartGrouping, t as ChartLegend, u as ChartPlotGroup, v as ChartPoint, w as ChartPointLabel, x as ChartSeries, y as ChartType, z as Column, f as Comment, G as CommentAnchorRange, I as CommentAuthor, J as CommentRangeEnd, K as CommentRangeStart, L as CommentReferenceContent, M as ComplexField, O as ContentPosition, Q as DEFAULT_WATERMARK_PRESETS, T as Deletion, U as DrawingContent, D as DrawingScene, V as DrawingSceneNode, X as EndnotePosition, Y as Field, Z as FieldCharContent, _ as FieldFormData, $ as FieldInlineContent, a0 as FieldType, a1 as FooterReference, a2 as FootnotePosition, a3 as HeaderFooterType, a4 as HeaderReference, a5 as Hyperlink, a6 as HyperlinkContent, a7 as Image, a8 as ImageCrop, a9 as ImageEffect, aa as ImageHyperlink, ab as ImagePadding, ac as ImagePosition, ad as ImageRotationBounds, ae as ImageSize, af as ImageTransform, ag as ImageWrap, ah as ImageWrapPoint, ai as InlineSdt, aj as Insertion, ak as InstrTextContent, al as LevelSuffix, am as LineNumberRestart, an as ListLevel, ao as ListRendering, ap as MathEquation, aq as MoveFrom, ar as MoveFromRangeEnd, as as MoveFromRangeStart, at as MoveTo, au as MoveToRangeEnd, av as MoveToRangeStart, aw as NoBreakHyphenContent, N as NoteKind, ax as NoteNumberRestart, ay as NoteRefMarkContent, az as NoteReferenceContent, aA as NoteSeparatorReference, aB as NumberFormat, aC as NumberingInstance, aD as PageNumberingProperties, aE as PageOrientation, P as Paragraph, aF as ParagraphContent, aG as ParagraphPropertyChange, aH as PictureWatermark, aI as PropertyChangeInfo, aJ as Run, aK as RunContent, aL as RunPropertyChange, aM as SdtCheckboxGlyph, a as SdtControlState, aN as SdtDataBinding, aO as SdtDateState, aP as SdtGalleryState, b as SdtProperties, aQ as SdtType, aR as Section, S as SectionProperties, aS as SectionStart, aT as SeparatorContent, aU as Shape, aV as ShapeContent, c as ShapeEffect, aW as ShapeFillPaint, aX as ShapeStrokePaint, aY as ShapeTextBody, d as ShapeTextBodyProperties, aZ as SimpleField, a_ as SoftHyphenContent, a$ as StructuredFieldContent, b0 as StructuredFieldTree, b1 as SymbolContent, b2 as TabContent, b3 as Table, b4 as TableCell, b5 as TableCellPropertyChange, b6 as TablePropertyChange, b7 as TableRow, b8 as TableRowPropertyChange, b9 as TableStructuralChangeInfo, ba as TextBox, bb as TextContent, bc as TextWatermark, bd as TrackedChangeInfo, be as TrackedRunChange, bf as VerticalAlign, W as Watermark, bg as pictureWatermarkDisplayEmu } from '../content-DrqzbIr7.mjs';
3
- import { f as Theme, C as ColorValue } from '../formatting-BqrFPeev.mjs';
4
- export { B as BorderSpec, g as CellMargins, h as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, i as ParagraphAlignment, a as ParagraphFormatting, R as RunFontHint, j as RunLanguage, S as ShadingProperties, k as ShapeFill, l as ShapeOutline, m as ShapeType, n as TabLeader, o as TabStop, p as TabStopAlignment, q as TableBorders, e as TableCellFormatting, c as TableFormatting, r as TableLook, s as TableMeasurement, d as TableRowFormatting, t as TableStyleCascade, u as TableStyleRegion, v as TableWidthType, w as TextEffect, b as TextFormatting, T as TextModernEffects, x as ThemeColorScheme, y as ThemeColorSlot, z as ThemeFont, A as ThemeFontScheme, U as UnderlineStyle } from '../formatting-BqrFPeev.mjs';
5
- import { S as StyleDefinitions, F as FontTable, R as RelationshipMap, M as MediaFile } from '../styles-CMybYYHS.mjs';
6
- export { D as DocDefaults, b as FontEmbed, c as FontInfo, d as Relationship, e as RelationshipType, a as Style, f as StyleType } from '../styles-CMybYYHS.mjs';
1
+ import { F as FootnoteProperties, E as EndnoteProperties, g as DocumentBody, h as NumberingDefinitions, i as Footnote, j as Endnote, H as HeaderFooter, d as Chart, k as BookmarkRange } from '../content-CvEtPl0c.mjs';
2
+ export { A as AbstractNumbering, B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, p as ChartAxis, q as ChartContent, r as ChartDataLabels, s as ChartGrouping, t as ChartLegend, u as ChartPlotGroup, v as ChartPoint, w as ChartPointLabel, x as ChartSeries, y as ChartType, z as Column, e as Comment, G as CommentAnchorRange, I as CommentAuthor, J as CommentRangeEnd, K as CommentRangeStart, L as CommentReferenceContent, M as ComplexField, O as ContentPosition, Q as DEFAULT_WATERMARK_PRESETS, T as Deletion, U as DrawingContent, D as DrawingScene, V as DrawingSceneNode, X as EndnotePosition, Y as Field, Z as FieldCharContent, _ as FieldFormData, $ as FieldInlineContent, a0 as FieldType, a1 as FooterReference, a2 as FootnotePosition, a3 as HeaderFooterType, a4 as HeaderReference, a5 as HorizontalRuleContent, a6 as Hyperlink, a7 as HyperlinkContent, a8 as Image, a9 as ImageCrop, aa as ImageEffect, ab as ImageHyperlink, ac as ImagePadding, ad as ImagePosition, ae as ImageRotationBounds, af as ImageSize, ag as ImageTransform, ah as ImageWrap, ai as ImageWrapPoint, aj as InlineSdt, ak as Insertion, al as InstrTextContent, am as LevelSuffix, an as LineNumberRestart, ao as ListLevel, ap as ListRendering, aq as MathEquation, ar as MoveFrom, as as MoveFromRangeEnd, at as MoveFromRangeStart, au as MoveTo, av as MoveToRangeEnd, aw as MoveToRangeStart, ax as NoBreakHyphenContent, N as NoteKind, ay as NoteNumberRestart, az as NoteRefMarkContent, aA as NoteReferenceContent, aB as NoteSeparatorReference, aC as NumberFormat, aD as NumberingInstance, aE as PageNumberingProperties, aF as PageOrientation, P as Paragraph, aG as ParagraphContent, aH as ParagraphPropertyChange, aI as PictureWatermark, aJ as PropertyChangeInfo, aK as Run, aL as RunContent, aM as RunPropertyChange, aN as SdtCheckboxGlyph, S as SdtControlState, aO as SdtDataBinding, aP as SdtDateState, aQ as SdtGalleryState, a as SdtProperties, aR as SdtType, aS as Section, f as SectionProperties, aT as SectionStart, aU as SeparatorContent, aV as Shape, aW as ShapeContent, b as ShapeEffect, aX as ShapeFillPaint, aY as ShapeStrokePaint, aZ as ShapeTextBody, c as ShapeTextBodyProperties, a_ as SimpleField, a$ as SoftHyphenContent, b0 as StructuredFieldContent, b1 as StructuredFieldTree, b2 as SymbolContent, b3 as TabContent, b4 as Table, b5 as TableCell, b6 as TableCellPropertyChange, b7 as TablePropertyChange, b8 as TableRow, b9 as TableRowPropertyChange, ba as TableStructuralChangeInfo, bb as TextBox, bc as TextContent, bd as TextWatermark, be as TrackedChangeInfo, bf as TrackedRunChange, bg as VerticalAlign, W as Watermark, bh as pictureWatermarkDisplayEmu } from '../content-CvEtPl0c.mjs';
3
+ import { f as Theme, C as ColorValue } from '../formatting-7zKCTu5a.mjs';
4
+ export { B as BorderSpec, g as CellMargins, h as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, i as ParagraphAlignment, a as ParagraphFormatting, R as RunFontHint, j as RunLanguage, S as ShadingProperties, k as ShapeFill, l as ShapeOutline, m as ShapeType, n as TabLeader, o as TabStop, p as TabStopAlignment, q as TableBorders, e as TableCellFormatting, c as TableFormatting, r as TableLook, s as TableMeasurement, d as TableRowFormatting, t as TableStyleCascade, u as TableStyleRegion, v as TableWidthType, w as TextEffect, b as TextFormatting, T as TextModernEffects, x as ThemeColorScheme, y as ThemeColorSlot, z as ThemeFont, A as ThemeFontScheme, U as UnderlineStyle } from '../formatting-7zKCTu5a.mjs';
5
+ import { S as StyleDefinitions, F as FontTable, R as RelationshipMap, M as MediaFile } from '../styles-7e-mq3c-.mjs';
6
+ export { D as DocDefaults, b as FontEmbed, c as FontInfo, d as Relationship, e as RelationshipType, a as Style, f as StyleType } from '../styles-7e-mq3c-.mjs';
7
7
  import '../docx/wrapTypes.mjs';
8
8
 
9
9
  interface CompatibilityFlags {
@@ -23,6 +23,7 @@ interface DocumentSettings {
23
23
  };
24
24
  compatibilityFlags: CompatibilityFlags;
25
25
  updateFields?: boolean;
26
+ evenAndOddHeaders?: boolean;
26
27
  trackRevisions?: boolean;
27
28
  doNotTrackMoves?: boolean;
28
29
  doNotTrackFormatting?: boolean;
@@ -1,5 +1,5 @@
1
- import { a as SdtControlState, b as SdtProperties, R as RevisionInfo, C as CellMarker, D as DrawingScene, c as ShapeEffect, d as ShapeTextBodyProperties, e as Chart, W as Watermark, F as FootnoteProperties, E as EndnoteProperties } from './content-DrqzbIr7.mjs';
2
- import { T as TextModernEffects, P as PresetGeometryPathCommand, B as BorderSpec } from './formatting-BqrFPeev.mjs';
1
+ import { S as SdtControlState, a as SdtProperties, R as RevisionInfo, C as CellMarker, D as DrawingScene, b as ShapeEffect, c as ShapeTextBodyProperties, d as Chart, W as Watermark, F as FootnoteProperties, E as EndnoteProperties } from './content-CvEtPl0c.mjs';
2
+ import { T as TextModernEffects, P as PresetGeometryPathCommand, B as BorderSpec } from './formatting-7zKCTu5a.mjs';
3
3
 
4
4
  /**
5
5
  * Inline SDT widget metadata carried by a painted text run.
@@ -252,6 +252,7 @@ type ImageRun = {
252
252
  width: number;
253
253
  height: number;
254
254
  alt?: string;
255
+ shapeType?: string;
255
256
  /** CSS transform string (rotation, flip) */
256
257
  transform?: string;
257
258
  /** Position for floating/anchored images */
@@ -364,6 +365,8 @@ type FieldRun = RunFormatting & {
364
365
  type Run = TextRun | TabRun | ImageRun | LineBreakRun | FieldRun;
365
366
  /** Paragraph spacing (w:spacing): above/below plus the w:lineRule line rule. */
366
367
  type ParagraphSpacing = {
368
+ beforeLines?: number;
369
+ afterLines?: number;
367
370
  before?: number;
368
371
  after?: number;
369
372
  line?: number;
@@ -436,6 +439,7 @@ type ParagraphAttrs = {
436
439
  widowControl?: boolean;
437
440
  pageBreakBefore?: boolean;
438
441
  styleId?: string;
442
+ effectiveStyleId?: string;
439
443
  contextualSpacing?: boolean;
440
444
  /** Right-to-left paragraph direction */
441
445
  bidi?: boolean;
@@ -448,6 +452,9 @@ type ParagraphAttrs = {
448
452
  listMarkerHidden?: boolean;
449
453
  listMarkerFontFamily?: string;
450
454
  listMarkerFontSize?: number;
455
+ listMarkerBold?: boolean;
456
+ listMarkerItalic?: boolean;
457
+ listMarkerColor?: string;
451
458
  listMarkerSuffix?: 'tab' | 'space' | 'nothing';
452
459
  /**
453
460
  * Tracked-change state of the list numbering itself. When a list is applied
@@ -663,6 +670,7 @@ type ImageBlock = {
663
670
  width: number;
664
671
  height: number;
665
672
  alt?: string;
673
+ shapeType?: string;
666
674
  /** CSS transform string (rotation, flip) */
667
675
  transform?: string;
668
676
  opacity?: number;
@@ -820,6 +828,12 @@ type ShapeBlock = {
820
828
  effects?: ShapeEffect[];
821
829
  /** Full text-body/autofit settings. */
822
830
  textBodyProperties?: ShapeTextBodyProperties;
831
+ wrapDistances?: {
832
+ top: number;
833
+ right: number;
834
+ bottom: number;
835
+ left: number;
836
+ };
823
837
  /** Anchor/wrap metadata. Undefined = in-flow. */
824
838
  position?: ImageRunPosition;
825
839
  wrapType?: string;
@@ -1438,6 +1452,8 @@ type Page = {
1438
1452
  noteAreas?: NoteAreaContract[];
1439
1453
  /** Column layout for this page (if multi-column). */
1440
1454
  columns?: ColumnLayout;
1455
+ /** Automatic parity filler: suppress header/footer, keep physical page. */
1456
+ parityFiller?: boolean;
1441
1457
  };
1442
1458
  /**
1443
1459
  * Multi-column setup for a section (w:cols).
@@ -1687,4 +1703,4 @@ interface FootnoteRenderItem {
1687
1703
  content?: FootnoteContent;
1688
1704
  }
1689
1705
 
1690
- export { type ParagraphExtent as $, type AnchoredObjectPositionInput as A, type BlockExtent as B, type CellBorderSpec as C, DEFAULT_TEXTBOX_MARGINS as D, type ImageRunPosition as E, type FootnoteContent as F, type InlineSdtWidget as G, type HeaderFooterContent as H, type ImageBlock as I, type LineBreakRun as J, type ListNumPr as K, type LayoutBlock as L, type NoteLayoutItem as M, type NoteAreaContract as N, type NoteSettingsContract as O, type Page as P, type PageBorderContract as Q, type ResolvedLine as R, type PageBreakBlock as S, type PageBreakExtent as T, type PageGeometry as U, type PageHeaderFooterRefs as V, type PageMargins as W, type PageNumberingContract as X, type ParagraphAttrs as Y, type ParagraphBlock as Z, type ParagraphBorders as _, type Layout as a, type ParagraphFragment as a0, type ParagraphIndent as a1, type ParagraphSpacing as a2, type Run as a3, type RunFontSlots as a4, type RunFormatting as a5, type RunLanguageSlots as a6, type SdtGroup as a7, type SectionBreakBlock as a8, type SectionBreakExtent as a9, assertExhaustiveLayoutBlock as aA, isTextWrappingFloatingImageRun as aB, pageGeometryFromPage as aC, resolveAnchoredObjectVerticalTop as aD, type ShapeBlock as aa, type ShapeBlockFill as ab, type ShapeBlockStroke as ac, type ShapeBlockTransform as ad, type ShapeExtent as ae, type ShapeFragment as af, type TabAlignment as ag, type TabRun as ah, type TabStop as ai, type TableBlock as aj, type TableCell as ak, type TableCellExtent as al, type TableExtent as am, type TableFragment as an, type TableRow as ao, type TableRowExtent as ap, type TextBoxBlock as aq, type TextBoxExtent as ar, type TextBoxFragment as as, type TextRun as at, type TypesetBidiSlice as au, type TypesetClusterAdvance as av, type TypesetRow as aw, type TypesetRowSegment as ax, type TypesetRunAdvance as ay, type WrapTextDirection as az, type LayoutOptions as b, type ResolvedSegment as c, type BlockId as d, type BorderStyle as e, type CellBorders as f, type ChartBlock as g, type ChartExtent as h, type ChartFragment as i, type ColumnBreakBlock as j, type ColumnBreakExtent as k, type ColumnLayout as l, DEFAULT_TEXTBOX_WIDTH as m, type DocumentPosition as n, type FieldRun as o, type FloatingTablePosition as p, type FootnoteRenderItem as q, type Fragment as r, type FragmentBase as s, type HeaderFooterContentHeights as t, type HeaderFooterLayout as u, type HitTestResult as v, type HyperlinkInfo as w, type ImageExtent as x, type ImageFragment as y, type ImageRun as z };
1706
+ export { type ParagraphExtent as $, type AnchoredObjectPositionInput as A, type BlockExtent as B, type CellBorderSpec as C, DEFAULT_TEXTBOX_MARGINS as D, type ImageRunPosition as E, type FootnoteContent as F, type InlineSdtWidget as G, type HeaderFooterContent as H, type ImageBlock as I, type LineBreakRun as J, type ListNumPr as K, type Layout as L, type NoteLayoutItem as M, type NoteAreaContract as N, type NoteSettingsContract as O, type Page as P, type PageBorderContract as Q, type ResolvedLine as R, type PageBreakBlock as S, type PageBreakExtent as T, type PageGeometry as U, type PageHeaderFooterRefs as V, type PageMargins as W, type PageNumberingContract as X, type ParagraphAttrs as Y, type ParagraphBlock as Z, type ParagraphBorders as _, type LayoutOptions as a, type ParagraphFragment as a0, type ParagraphIndent as a1, type ParagraphSpacing as a2, type Run as a3, type RunFontSlots as a4, type RunFormatting as a5, type RunLanguageSlots as a6, type SdtGroup as a7, type SectionBreakBlock as a8, type SectionBreakExtent as a9, assertExhaustiveLayoutBlock as aA, isTextWrappingFloatingImageRun as aB, pageGeometryFromPage as aC, resolveAnchoredObjectVerticalTop as aD, type ShapeBlock as aa, type ShapeBlockFill as ab, type ShapeBlockStroke as ac, type ShapeBlockTransform as ad, type ShapeExtent as ae, type ShapeFragment as af, type TabAlignment as ag, type TabRun as ah, type TabStop as ai, type TableBlock as aj, type TableCell as ak, type TableCellExtent as al, type TableExtent as am, type TableFragment as an, type TableRow as ao, type TableRowExtent as ap, type TextBoxBlock as aq, type TextBoxExtent as ar, type TextBoxFragment as as, type TextRun as at, type TypesetBidiSlice as au, type TypesetClusterAdvance as av, type TypesetRow as aw, type TypesetRowSegment as ax, type TypesetRunAdvance as ay, type WrapTextDirection as az, type LayoutBlock as b, type ResolvedSegment as c, type BlockId as d, type BorderStyle as e, type CellBorders as f, type ChartBlock as g, type ChartExtent as h, type ChartFragment as i, type ColumnBreakBlock as j, type ColumnBreakExtent as k, type ColumnLayout as l, DEFAULT_TEXTBOX_WIDTH as m, type DocumentPosition as n, type FieldRun as o, type FloatingTablePosition as p, type FootnoteRenderItem as q, type Fragment as r, type FragmentBase as s, type HeaderFooterContentHeights as t, type HeaderFooterLayout as u, type HitTestResult as v, type HyperlinkInfo as w, type ImageExtent as x, type ImageFragment as y, type ImageRun as z };
@@ -1,5 +1,5 @@
1
- import { P as Paragraph, B as BlockContent, f as Comment } from '../content-DrqzbIr7.mjs';
2
- import '../formatting-BqrFPeev.mjs';
1
+ import { P as Paragraph, B as BlockContent, e as Comment } from '../content-CvEtPl0c.mjs';
2
+ import '../formatting-7zKCTu5a.mjs';
3
3
  import '../docx/wrapTypes.mjs';
4
4
 
5
5
  /**