@docx-editor.dev/core 2.31.0 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +25 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -0
  3. package/dist/automation.cjs +1 -1
  4. package/dist/automation.d.ts +16 -54
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.ts +17 -15
  8. package/dist/binding.js +1 -1
  9. package/dist/{chrome-print-BWvaVEhD.d.ts → chrome-print-CrPI9ZQc.d.ts} +128 -38
  10. package/dist/chunk-23MKR33J.js +4 -0
  11. package/dist/chunk-2CWQY27B.cjs +1 -0
  12. package/dist/chunk-2DEY5NUC.cjs +32 -0
  13. package/dist/chunk-2DR4TH6B.js +1 -0
  14. package/dist/chunk-2F2UEAE2.js +2 -0
  15. package/dist/chunk-2GPGAFOJ.cjs +5 -0
  16. package/dist/chunk-ALD626VU.cjs +2 -0
  17. package/dist/chunk-AU33YWEJ.js +236 -0
  18. package/dist/chunk-AXU63LYW.cjs +1 -0
  19. package/dist/chunk-CM5VZRBV.js +32 -0
  20. package/dist/chunk-D7FAFFTN.js +1 -0
  21. package/dist/chunk-DYUVJNDD.cjs +1 -0
  22. package/dist/chunk-ESYUKD5D.js +2 -0
  23. package/dist/chunk-F7TGQMVR.js +5 -0
  24. package/dist/chunk-FLW7KIQX.js +30 -0
  25. package/dist/chunk-JG4A6W6I.js +7 -0
  26. package/dist/chunk-JNGLSBPH.js +2 -0
  27. package/dist/chunk-KE6ZWRIY.cjs +236 -0
  28. package/dist/chunk-L3YXJDPX.js +1 -0
  29. package/dist/chunk-LI42N7OW.cjs +4 -0
  30. package/dist/chunk-PLKDS4JT.js +1 -0
  31. package/dist/chunk-PXMTQ73F.cjs +2 -0
  32. package/dist/chunk-R4R3AAE4.js +1 -0
  33. package/dist/chunk-RFUNFTGV.cjs +1 -0
  34. package/dist/chunk-SVM6PGMS.js +3 -0
  35. package/dist/chunk-SZURLHR3.cjs +3 -0
  36. package/dist/chunk-UYCGCVZ2.cjs +1 -0
  37. package/dist/chunk-WN7ICTA5.js +1 -0
  38. package/dist/chunk-X34QRAUU.cjs +1 -0
  39. package/dist/chunk-XNBYG4XJ.cjs +30 -0
  40. package/dist/chunk-ZDFJW5XS.cjs +2 -0
  41. package/dist/chunk-ZWO4JHNN.cjs +7 -0
  42. package/dist/collaboration/replication.cjs +1 -1
  43. package/dist/collaboration/replication.d.ts +29 -4
  44. package/dist/collaboration/replication.js +1 -1
  45. package/dist/collaboration.cjs +1 -1
  46. package/dist/collaboration.d.ts +5 -5
  47. package/dist/collaboration.js +1 -1
  48. package/dist/contracts/document.d.ts +3 -3
  49. package/dist/contracts/editor.d.ts +13 -9
  50. package/dist/contracts/interaction.d.ts +2 -2
  51. package/dist/contracts/modules.d.ts +15 -12
  52. package/dist/contracts/types.d.ts +135 -2
  53. package/dist/{custom-node-writes-TeUvMP13.d.ts → custom-node-writes-AqY5KpVx.d.ts} +7 -2
  54. package/dist/diagnostic-context-CuzhOX0g.d.ts +98 -0
  55. package/dist/{diagnostic-hints-C9JlLz1L.d.ts → diagnostic-hints-BtCaCqQC.d.ts} +4 -4
  56. package/dist/{document-protection-C8x3P2J6.d.ts → document-protection-BvbpSXbQ.d.ts} +1 -1
  57. package/dist/drawing-graphic-kind-CXYGYbB3.d.ts +324 -0
  58. package/dist/drawing-preview-package-B9lSLRg4.d.ts +115 -0
  59. package/dist/{editor-B2ShlO23.d.ts → editor-B7OOAAie.d.ts} +181 -244
  60. package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
  61. package/dist/{editor-scope-C7ke1KJG.d.ts → editor-scope-CA6egMaK.d.ts} +6 -2
  62. package/dist/editor.cjs +1 -1
  63. package/dist/editor.css +4 -4
  64. package/dist/editor.d.ts +259 -31
  65. package/dist/editor.js +1 -1
  66. package/dist/export.cjs +2 -2
  67. package/dist/export.d.ts +48 -19
  68. package/dist/export.js +2 -2
  69. package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
  70. package/dist/{font-resolver-CWh40DYp.d.ts → font-resolver-Bm9XqTNO.d.ts} +15 -1
  71. package/dist/index.cjs +1 -1
  72. package/dist/index.d.ts +43 -26
  73. package/dist/index.js +1 -1
  74. package/dist/{layout-shaping-CWS3j0Xr.d.ts → layout-shaping-Ci_BTnSU.d.ts} +1 -1
  75. package/dist/layout.cjs +1 -1
  76. package/dist/layout.d.ts +181 -99
  77. package/dist/layout.js +1 -1
  78. package/dist/metafile-drawing-DtMFyMKq.d.ts +107 -0
  79. package/dist/{note-properties-QsKh24sM.d.ts → note-properties-DCIJUKIy.d.ts} +1 -1
  80. package/dist/output.cjs +1 -1
  81. package/dist/output.d.ts +11 -7
  82. package/dist/output.js +1 -1
  83. package/dist/{protocol-COZJUKUY.d.ts → protocol-Cp_QzVxS.d.ts} +75 -5
  84. package/dist/{review-paragraph-order-C_QbCKcH.d.ts → review-paragraph-order-BJQ43_r0.d.ts} +1 -1
  85. package/dist/revision-projection-OVusTS77.d.ts +258 -0
  86. package/dist/{semantic-cell-selection-Cub9FDa8.d.ts → semantic-cell-selection-CoI5hHBm.d.ts} +2 -2
  87. package/dist/{semantic-interaction-dApRIYpt.d.ts → semantic-interaction-BbA4dgEo.d.ts} +1 -1
  88. package/dist/{semantic-paint-DLzA8sjP.d.ts → semantic-paint-B5JcIv9c.d.ts} +19 -9
  89. package/dist/{semantic-record-queries-3yp9o11g.d.ts → semantic-record-queries-DnO8J5_j.d.ts} +1 -1
  90. package/dist/{semantic-records-B-akgRch.d.ts → semantic-records-DoK0lNjS.d.ts} +439 -418
  91. package/dist/store.cjs +1 -1
  92. package/dist/store.d.ts +511 -20
  93. package/dist/store.js +1 -1
  94. package/dist/{types-barrel-CkF2JbU4.d.ts → tree-op-types-Df4oY2u4.d.ts} +1081 -524
  95. package/dist/{tree-package-store-B8l8DX3Z.d.ts → tree-package-store-DXhX1PE-.d.ts} +8 -3
  96. package/dist/{tree-session-contract-DeLRqohz.d.ts → tree-session-contract-CF2625mv.d.ts} +5 -5
  97. package/dist/unsupported-elements-CUojsaCr.d.ts +23 -0
  98. package/docs/accept-reject-without-scrolling.md +95 -0
  99. package/docs/comment-on-found-text.md +72 -0
  100. package/docs/custom-review-cards.md +178 -0
  101. package/docs/highlight-ranges.md +48 -0
  102. package/docs/index.md +36 -0
  103. package/docs/propose-rewrite.md +247 -0
  104. package/docs/tracked-replacement.md +68 -0
  105. package/licenses/ECMA-376.md +29 -0
  106. package/package.json +3 -2
  107. package/dist/bookmark-names-DDuAra_V.d.ts +0 -37
  108. package/dist/chunk-243W4WW2.cjs +0 -2
  109. package/dist/chunk-2E2RPEKX.js +0 -1
  110. package/dist/chunk-4S24UOPG.js +0 -30
  111. package/dist/chunk-5JPIEN54.cjs +0 -3
  112. package/dist/chunk-5SO5QDMV.cjs +0 -2
  113. package/dist/chunk-6IDOVU6L.cjs +0 -1
  114. package/dist/chunk-6JIJOZDW.js +0 -1
  115. package/dist/chunk-BTQKU64Q.cjs +0 -1
  116. package/dist/chunk-DBOOTED4.cjs +0 -30
  117. package/dist/chunk-EOTAXOJY.cjs +0 -5
  118. package/dist/chunk-FDAKJ2SJ.cjs +0 -30
  119. package/dist/chunk-FNNOJNGY.js +0 -3
  120. package/dist/chunk-FT33HRZP.js +0 -5
  121. package/dist/chunk-HC6YNKUI.cjs +0 -1
  122. package/dist/chunk-HZ66UCIS.js +0 -2
  123. package/dist/chunk-IBRBNT37.cjs +0 -1
  124. package/dist/chunk-IVIN7X43.js +0 -30
  125. package/dist/chunk-LZY6B6IV.js +0 -4
  126. package/dist/chunk-MOYYRVFV.cjs +0 -2
  127. package/dist/chunk-N6B3BXCL.js +0 -1
  128. package/dist/chunk-Q5K2GGNG.js +0 -2
  129. package/dist/chunk-R2XINWVE.js +0 -7
  130. package/dist/chunk-SUEXVBPR.js +0 -1
  131. package/dist/chunk-T2QQHG5C.js +0 -18
  132. package/dist/chunk-VWIJKH4A.js +0 -1
  133. package/dist/chunk-WO4V6PNS.cjs +0 -18
  134. package/dist/chunk-XMJKFURD.cjs +0 -4
  135. package/dist/chunk-XSTGE3NI.cjs +0 -1
  136. package/dist/chunk-YQWMI6J5.cjs +0 -7
  137. package/dist/chunk-ZCJS7D7S.js +0 -2
  138. package/dist/diagnostic-context-DJ0P1uZE.d.ts +0 -31
  139. package/dist/headless-document-view-qOpaCF82.d.ts +0 -143
  140. package/dist/omml-equation-BsLAa2lX.d.ts +0 -115
@@ -0,0 +1 @@
1
+ 'use strict';var chunk2DEY5NUC_cjs=require('./chunk-2DEY5NUC.cjs'),chunkRFUNFTGV_cjs=require('./chunk-RFUNFTGV.cjs'),chunkZDFJW5XS_cjs=require('./chunk-ZDFJW5XS.cjs'),chunkKE6ZWRIY_cjs=require('./chunk-KE6ZWRIY.cjs'),fflate=require('fflate');var zr=Object.freeze({}),Hr=Object.freeze([]);function Wr(e){let r=Object.keys(e);if(r.length===0)return zr;let n={};for(let t of r){let o=e[t];o!==void 0&&(n[t]=o);}return Object.freeze(n)}function $r(e){let r=new Map(chunkKE6ZWRIY_cjs.zh(e.part())),n=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!n.has(i)){n.add(i);for(let[s,c]of chunkKE6ZWRIY_cjs.zh(i))r.has(s)||r.set(s,c);}let t=e.currentPackage();for(let o of ["footnote","endnote"]){let a=chunkKE6ZWRIY_cjs.ti(t,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of chunkKE6ZWRIY_cjs.zh(a))r.has(i)||r.set(i,s);}}return r}function Gr(e,r){let n=chunk2DEY5NUC_cjs.te(e,r);if(!n)return null;let t=e.pages[n.pageIndex];if(!t)return null;let o=chunk2DEY5NUC_cjs.Fe(t),a=chunk2DEY5NUC_cjs.He(e,r.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...r}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function Yr(e,r){let n=[];for(let t of r.values()){let o=Gr(e,t);o&&n.push(o);}return n.length===0?Hr:Object.freeze(n)}function Jt(e,r){return {documentMetadata:Wr(e.documentProperties()),destinations:Yr(r,$r(e))}}function Jn(e,r){let n=e.destinations;if(n){for(let t of n)if(t.anchor.name===r)return t}}function Zt(e,r){let n=e[r];if(!Array.isArray(n)||n.length===0)return null;let t=Number(n[0]);return Number.isSafeInteger(t)&&t>0?t:null}var Xr={1:1,2:1,3:2,4:4,5:8,6:1,7:1,8:2,9:4,10:8,11:4,12:8,13:4},qr=new Set([330,34665,34853,37500,50740,61440]);function Qr(e){if(e.length<8)return false;let r=new DataView(e.buffer,e.byteOffset,e.byteLength),n=String.fromCharCode(e[0],e[1]);if(n!=="II"&&n!=="MM")return false;let t=n==="II";if(r.getUint16(2,t)!==42)return false;let o=r.getUint32(4,t);if(o<8||o+2>e.length)return false;let a=r.getUint16(o,t),i=o+2+a*12;if(i+4>e.length)return false;r.setUint32(i,0,t);for(let s=0;s<a;s+=1){let c=o+2+s*12;qr.has(r.getUint16(c,t))&&r.setUint16(c,0,t);let d=Xr[r.getUint16(c+2,t)];if(d===void 0)continue;let p=r.getUint32(c+4,t)*d;p>4&&r.getUint32(c+8,t)+p>e.length&&r.setUint32(c+4,0,t);}return true}async function er(e,r){let n=e.slice();if(!Qr(n))return null;let t=n.buffer,o=await import('utif2'),a=o.default??o,i=a.decode(t)[0];if(!i)return null;let s=Zt(i,"t256"),c=Zt(i,"t257");if(s===null||c===null||s>r.maxDimension||c>r.maxDimension||s>r.maxPixels/c)return null;let d=s*c;if(d*4>r.maxDecodedBytes||(a.decodeImage(t,i),i.width!==s||i.height!==c))return null;let p=a.toRGBA8(i);return p.length!==d*4?null:Object.freeze({rgba:p,pixelWidth:s,pixelHeight:c})}var me=null;function Zr(e){if(!me){me=new Uint32Array(256);for(let n=0;n<256;n+=1){let t=n;for(let o=0;o<8;o+=1)t=t&1?3988292384^t>>>1:t>>>1;me[n]=t>>>0;}}let r=4294967295;for(let n of e)r=me[(r^n)&255]^r>>>8;return (r^4294967295)>>>0}function Ie(e,r){let n=new Uint8Array(12+r.length),t=new DataView(n.buffer);t.setUint32(0,r.length);for(let o=0;o<4;o+=1)n[4+o]=e.charCodeAt(o);return n.set(r,8),t.setUint32(8+r.length,Zr(n.subarray(4,8+r.length))),n}function en(e){let r=true;for(let n=0;n<e.length;n+=4){let t=e[n];if(e[n+3]!==255||e[n+1]!==t||e[n+2]!==t)return "rgba";t!==0&&t!==255&&(r=false);}return r?"bilevel":"grey"}function tn(e,r,n,t){let o=t==="bilevel"?Math.ceil(r/8):t==="grey"?r:r*4,a=new Uint8Array((o+1)*n);for(let i=0;i<n;i+=1){let s=i*(o+1)+1,c=i*r*4;if(t==="rgba")a.set(e.subarray(c,c+r*4),s);else if(t==="grey")for(let d=0;d<r;d+=1)a[s+d]=e[c+d*4];else for(let d=0;d<r;d+=1)e[c+d*4]===255&&(a[s+(d>>3)]|=128>>(d&7));}return t==="rgba"?{raw:a,depth:8,colour:6}:{raw:a,depth:t==="bilevel"?1:8,colour:0}}function tr(e,r,n){let{raw:t,depth:o,colour:a}=tn(e,r,n,en(e)),i=new Uint8Array(13),s=new DataView(i.buffer);s.setUint32(0,r),s.setUint32(4,n),i[8]=o,i[9]=a;let c=[new Uint8Array([137,80,78,71,13,10,26,10]),Ie("IHDR",i),Ie("IDAT",fflate.zlibSync(t,{level:6})),Ie("IEND",new Uint8Array(0))],d=new Uint8Array(c.reduce((l,g)=>l+g.length,0)),p=0;for(let l of c)d.set(l,p),p+=l.length;return d}async function rn(e,r,n){if(r!=="image/tiff")return null;let t=await er(e,n);if(!t)return null;let o=tr(t.rgba,t.pixelWidth,t.pixelHeight);return Object.freeze({bytes:o,mime:"image/png"})}function rr(e={}){return Object.freeze({async decode(r,n,t){let o=chunkKE6ZWRIY_cjs.pf(r,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>t.maxDimension||o.pixelHeight>t.maxDimension||o.pixelWidth>t.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},convertPreserved:e.convertPreserved??rn})}var nr=new WeakMap;function or(e,r){let n=nr.get(e);n||(n=chunk2DEY5NUC_cjs.ef(e),nr.set(e,n));let t=n.styleCascade(),o=new Set;if(r===e.part())for(let c of chunk2DEY5NUC_cjs._e(r,void 0,void 0,t,n.numberingIndex()))for(let d of chunk2DEY5NUC_cjs.Pe(c)?.slice(0,-1)??[])o.add(d.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let d=c.children.find(l=>l.kind!=="textValue"&&l.namespaceUri===chunkKE6ZWRIY_cjs.pa&&l.localName==="pPr"),p=d?.kind!=="textValue"?d?.children.find(l=>l.kind!=="textValue"&&l.namespaceUri===chunkKE6ZWRIY_cjs.pa&&l.localName==="rPr"):void 0;return p!==void 0&&chunkKE6ZWRIY_cjs.Ea(p,"vanish")},i=0,s=(c,d)=>{if(++i>chunkKE6ZWRIY_cjs.He||d>chunkKE6ZWRIY_cjs.da||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(chunk2DEY5NUC_cjs.Ye(c,t,false)||a(c))&&chunkKE6ZWRIY_cjs.uh(c).length>0)return true;for(let p of c.children){if(i>=chunkKE6ZWRIY_cjs.He)break;if(s(p,d+1))return true}return false};return s(r.root,0)}var ar=new WeakMap,nn=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function on(e,r){let n=ar.get(e.root);if(n&&n.stylesPart===r)return n.codes;let t=new Set,o=[{node:e.root,scope:chunkKE6ZWRIY_cjs.Ld(),depth:0,mcSelected:false}],a=0;for(;o.length;){let{node:s,scope:c,depth:d,mcSelected:p}=o.pop();if(++a>chunkKE6ZWRIY_cjs.He||d>chunkKE6ZWRIY_cjs.da){t.add("scan-limit");break}if(s.kind==="textValue")continue;if(a+o.length+s.children.length>chunkKE6ZWRIY_cjs.He){t.add("scan-limit");break}let l=chunkKE6ZWRIY_cjs.Kd(c,s),g=chunkKE6ZWRIY_cjs.Jd(s)?s:void 0;if(g){if(chunkKE6ZWRIY_cjs.Le(g,l).drawing)continue;let f=chunkKE6ZWRIY_cjs.Ne(g,{ownerPartName:e.name,namespaceScope:l,supportedMcRequires:chunkKE6ZWRIY_cjs.Ge,limits:chunkKE6ZWRIY_cjs.Fe});if(f){let y=f.textboxStory?.content;y&&o.push({node:y,scope:l,depth:d+1,mcSelected:false});continue}let h=chunkKE6ZWRIY_cjs.Ke(g,l);h.refused&&t.add("scan-limit"),h.branch&&o.push({node:h.branch,scope:l,depth:d+1,mcSelected:true});continue}if(!p&&chunkKE6ZWRIY_cjs.Xd(s)){let f=chunkKE6ZWRIY_cjs.Zd(s,e.name)?.textboxStory?.content;f&&o.push({node:f,scope:l,depth:d+1,mcSelected:p});continue}if(s.namespaceUri==="urn:schemas-microsoft-com:vml"&&s.localName==="textbox"){t.add("legacy-textbox");continue}s.namespaceUri==="urn:schemas-microsoft-com:vml"&&nn.has(s.localName)&&!s.children.some(f=>f.kind!=="textValue"&&f.namespaceUri==="urn:schemas-microsoft-com:vml"&&f.localName==="textbox")&&t.add("legacy-drawing");for(let f of s.children)o.push({node:f,scope:l,depth:d+1,mcSelected:p});}let i=Object.freeze([...t]);return ar.set(e.root,{stylesPart:r,codes:i}),i}function ir(e){let r=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let t of [n.headers,n.footers])for(let o of t.values())r.add(o);for(let n of ["footnote","endnote"]){let t=chunkKE6ZWRIY_cjs.ti(e.currentPackage(),n);t&&r.add(t);}return Object.freeze([...r].flatMap(n=>[...on(n,chunkKE6ZWRIY_cjs.ld(e.currentPackage())),...or(e,n)?["unsupported-style-separator"]:[]].map(t=>Object.freeze({code:t,partName:n.name}))))}function sr(e){return chunkKE6ZWRIY_cjs.sg(e.fieldResults,()=>chunk2DEY5NUC_cjs.Bf(an(e)))}function an(e){return chunk2DEY5NUC_cjs.Cf(e.fieldResults,sn(e))}function*sn(e){let r=e.defaultTabStopPt?.(),n=e.view.part().name,t={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:r,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=chunk2DEY5NUC_cjs.tf(t),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:r,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,fieldResults:e.fieldResults,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,bodyBlockLimit:e.bodyBlockLimit},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,fieldResults:a.fieldResults,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(n,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(n,s),projectionEpoch:a.linkProjectors.epochForPart(n),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter,bodyBlockLimit:a.bodyBlockLimit};return yield*chunk2DEY5NUC_cjs.jg(a.view.part(),a.revision,i)}var cn=65536;function lr(e,r){return {x:r.x-e.contentBox.x,y:r.y-e.contentBox.y}}function dn(e,r){return e.length===r.length&&e.every((n,t)=>n===r[t])}function ln(e,r,n){return e.rootStory!==r?false:r==="footnote"||r==="endnote"?e.noteScopeId===n:true}function un(e,r){if(r.story!=="textbox"||r.textboxPath.length===0)return null;let n=null;return chunk2DEY5NUC_cjs.Ga(e,t=>{if(n||!ln(r,t.story,t.noteScopeId))return;let o=t.story==="header"||t.story==="footer"?a=>chunk2DEY5NUC_cjs.Ba(a,t.origin,{x:e.box.x,y:e.box.y}):void 0;chunk2DEY5NUC_cjs.Ka(t.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);dn(s,r.textboxPath)&&(n=lr(e,i.storyOrigin));},t.origin,o);}),n}function pn(e,r){if(r.story==="textbox")return un(e,r)??{x:0,y:0};switch(r.rootStory){case "body":return {x:0,y:0};case "header":return e.header?chunk2DEY5NUC_cjs.Ge(e,e.header.box):{x:0,y:0};case "footer":return e.footer?chunk2DEY5NUC_cjs.Ge(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let t=(r.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===r.noteScopeId);return t?chunk2DEY5NUC_cjs.Ge(e,t.box):{x:0,y:0}}case "note-separator":{let n=r.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,t=n?.separator?.box;return n?.continuationNotice&&chunk2DEY5NUC_cjs.Ka(n.continuationNotice,o=>{o.paragraphId===r.source.start.paragraphId&&(t=n.continuationNotice.box);}),t?chunk2DEY5NUC_cjs.Ge(e,t):{x:0,y:0}}default:return {x:0,y:0}}}function ur(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function pr(e,r){let n=chunk2DEY5NUC_cjs.Fe(e);return Object.freeze({x:n.x+r.x,y:n.y+r.y,width:r.width,height:r.height})}function mn(e,r){let n=chunk2DEY5NUC_cjs.te(e,{paragraphId:r.source.start.paragraphId,offset:r.source.start.offset},{preferredPageIndex:r.pageIndex});if(!n||n.pageIndex!==r.pageIndex)return;let t=e.pages[n.pageIndex];if(!t)return;let o=pn(t,r),a=Object.freeze([ur({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>pr(t,i)))})}function fn(e,r,n){let t=n.filter(i=>i.pageIndex===r.pageIndex);if(t.length===0)return mr(r)?mn(e,r):void 0;let o=e.pages[r.pageIndex];if(!o)return;let a=Object.freeze(t.map(i=>ur(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>pr(o,i)))})}function mr(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function dr(e,r){return `${e}\0${r}`}function yn(e,r,n){let t=Math.max(e.start,r.offset),o=Math.min(e.end,n.offset);return o>t?{start:t,end:o}:null}function gn(e,r){let n=new Map,t=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=cn)return false;a+=1;let d=dr(s.pageIndex,c),p=t.get(d);return p?p.push(s):t.set(d,[s]),true};for(let[s,c]of r.entries())for(let[d,p]of c.occurrences.entries()){if(mr(p)||p.source.start.paragraphId!==p.source.end.paragraphId)continue;o.add(p.pageIndex);let l=`${s}\0${d}`,g={paragraphId:p.source.start.paragraphId,offset:p.source.start.offset},f={paragraphId:p.source.end.paragraphId,offset:p.source.end.offset},h=g.offset<=f.offset?{from:g,to:f}:{from:f,to:g};i({key:l,from:h.from,to:h.to,pageIndex:p.pageIndex},h.from.paragraphId);}if(t.size===0)return n;for(let s of e.pages)o.has(s.index)&&chunk2DEY5NUC_cjs.Ga(s,c=>{let d=c.story==="header"||c.story==="footer"?p=>chunk2DEY5NUC_cjs.Ba(p,c.origin,{x:s.box.x,y:s.box.y}):void 0;chunk2DEY5NUC_cjs.Ka(c.host,(p,l)=>{let g=lr(s,l.storyOrigin);for(let f of p.lines)for(let h of chunk2DEY5NUC_cjs.Qa(f)){let y=t.get(dr(s.index,h.paragraphId));if(y)for(let b of y){let P=yn(h,b.from,b.to);if(!P)continue;let x=chunk2DEY5NUC_cjs.me(f,P.start,void 0,h),S=chunk2DEY5NUC_cjs.me(f,P.end,void 0,h,P.end>P.start),O=n.get(b.key)??[];O.push({pageIndex:s.index,x:Math.min(x,S)+g.x,y:f.box.y+g.y,width:Math.abs(S-x),height:f.box.height}),n.set(b.key,O);}}},c.origin,d);});return n}function fr(e,r){let n=false;for(let o of r)if(o.occurrences.length!==0){n=true;break}if(!n)return r;let t=gn(e,r);return r.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let d=`${a}\0${c}`,p=fn(e,s,t.get(d)??[]);return p?{...s,geometry:p}:s});return {...o,occurrences:Object.freeze(i)}})}function hn(e){let r=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:t,depth:o}=n.pop();if(!(t.kind==="textValue"||o>64)){t.kind==="paragraph"&&!r.has(t.id)&&r.set(t.id,r.size);for(let a=t.children.length-1;a>=0;a-=1)n.push({node:t.children[a],depth:o+1});}}return r}function yr(){let e=new Map,r=t=>{let o=e.get(t.root);if(o)return o;let a=hn(t);return e.set(t.root,a),a},n={retainRevisionItems:false,revisionSites:chunkKE6ZWRIY_cjs.ul,locations:chunkKE6ZWRIY_cjs.Il,commentAnchors:chunkKE6ZWRIY_cjs.zj,deepOrder:r};return Object.freeze({collectReviewItems:t=>chunkKE6ZWRIY_cjs.Ml(t,n),deepParagraphOrderOfPart:r})}var gr=new WeakMap,fe={};function De(e,r){let n=gr.get(e??fe)??new WeakMap;gr.set(e??fe,n);let t=n.get(r??fe);if(!t){let o=chunk2DEY5NUC_cjs.Re(e);t={table:o,numbering:chunk2DEY5NUC_cjs.sd(chunk2DEY5NUC_cjs.ad(r),o)},n.set(r??fe,t);}return t}var ke=new Set(["pPrChange","rPr","sectPr"]),Oe=new Set(["rPrChange","ins","del","moveFrom","moveTo"]),xn=new Set(["ind","spacing","rFonts","lang"]),wn={ind:[["firstLine","hanging"]],rFonts:[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","cstheme"]]},bn={ind:{start:"left",end:"right"}},Pn={ind:new Set(["startChars","endChars","leftChars","rightChars","firstLineChars","hangingChars"])},Ee=new Set(["dstrike","noProof","webHidden","specVanish","rtl","cs","oMath","keepNext","keepLines","pageBreakBefore","suppressLineNumbers","suppressAutoHyphens","contextualSpacing","mirrorIndents","suppressOverlap","bidi"]);for(let e of chunk2DEY5NUC_cjs.F)Ee.add(e);var xr=new Set(["0","false","off"]);function vn(e,r,n,t){if(Ee.has(e))return r==="val"&&xr.has(n);switch(e){case "jc":return n==="start"||!t&&n==="left";case "ind":return n==="0";case "u":case "highlight":return n==="none";case "vertAlign":return n==="baseline";case "color":return n==="auto";case "position":return n==="0";case "w":return n==="100";default:return false}}function Sn(e){let r=bn[e.localName],n=Pn[e.localName],t={};for(let[o,a]of Object.entries(e.attributes??{})){if(n?.has(o))return null;let i=r?.[o]??o;i!==o&&e.attributes?.[i]!==void 0||(t[i]=a);}return Ee.has(e.localName)&&t.val===void 0&&(t.val="true"),t}function Rn(e,r,n){let t={...r};for(let o of wn[e]??[])if(o.some(a=>n[a]!==void 0))for(let a of o)delete t[a];return Object.assign(t,n)}function wr(e,r){let n=new Map;for(let i of e){if(r.has(i.localName))continue;let s=Sn(i);if(!s)return null;let c=n.get(i.localName);n.set(i.localName,c&&xn.has(i.localName)?Rn(i.localName,c,s):s);}let t=n.get("bidi"),o=t!==void 0&&!xr.has(t.val??"true"),a=[];for(let[i,s]of n){let c=Object.entries(s).filter(([d,p])=>!vn(i,d,p,o)).sort(([d],[p])=>d.localeCompare(p));c.length===0&&Object.keys(s).length>0||a.push(`${i}(${c.map(([d,p])=>`${d}=${p}`).join(",")})`);}return a.sort().join(" ")}function ye(e,r){let n=[];for(let t of e?.children??[]){if(t.kind==="textValue")continue;let o=t.namespaceUri===chunkKE6ZWRIY_cjs.pa;o&&r.has(t.localName)||o&&!t.children.some(a=>a.kind!=="textValue")||n.push(chunkKE6ZWRIY_cjs.Ja(t));}return n.join("\0")}function ge(e,r){let n="";for(let t of e)t.localName===r&&(n=t.attributes?.val??"");return n}function br(e,r){let n=chunk2DEY5NUC_cjs.Te(e.table,r).paragraphPropertyNodes,t=chunk2DEY5NUC_cjs.rd(n);if(!t||t.numId==="0")return null;let o=chunk2DEY5NUC_cjs.bd(e.numbering,t.numId,t.ilvl);return (o&&chunk2DEY5NUC_cjs.Rc(o.level))??void 0}function hr(e,r){let n=br(e,r);if(n===void 0)return null;let t=chunk2DEY5NUC_cjs.Te(e.table,r,void 0,n??void 0);return wr(t.paragraphProperties,ke)}function Pr(e,r,n){let t=chunk2DEY5NUC_cjs.gd(r);if(ge(chunk2DEY5NUC_cjs.qb(n),"pStyle")!==ge(chunk2DEY5NUC_cjs.qb(t),"pStyle")||ye(n,ke)!==ye(t,ke))return false;let o=hr(e,n);return o!==null&&o===hr(e,t)}function vr(e,r,n,t){let o=chunk2DEY5NUC_cjs.fd(r),a=chunk2DEY5NUC_cjs.qb(n),i=chunk2DEY5NUC_cjs.qb(o);if(ge(a,"rStyle")!==ge(i,"rStyle")||ye(n,Oe)!==ye(o,Oe))return false;let s=br(e,t);if(s===void 0)return false;let c=chunk2DEY5NUC_cjs.Te(e.table,t,void 0,s??void 0).runProperties,d=l=>wr(chunk2DEY5NUC_cjs.Ve(c,l,e.table),Oe),p=d(a);return p!==null&&p===d(i)}function Rr(e){return {pkg:e,stylesRoot:chunkKE6ZWRIY_cjs.ld(e)?.root??null,numberingRoot:chunkKE6ZWRIY_cjs.md(e)}}var In=64,Sr=new WeakMap;function Me(e){return e.kind==="revision"&&e.revisionKind==="format"&&(e.formattingKind==="pPrChange"||e.formattingKind==="rPrChange")&&!e.readOnly&&e.ranges.length>0}function On(e,r){let n=null,t=chunkKE6ZWRIY_cjs.db(e,r);for(let o=0;t&&o<In;o+=1){if(t.kind==="tableCell"||t.localName==="tc")return null;t.kind==="paragraph"&&(n??=t),t=chunkKE6ZWRIY_cjs.db(e,t.id);}return t?null:n}function kn(e,r,n,t){let o=chunkKE6ZWRIY_cjs.cb(e,r);if(!o||o.kind==="textValue")return false;let a=chunkKE6ZWRIY_cjs.db(e,r);if(!a)return false;let i=On(e,a.id);if(!i||!t.has(i.id))return false;let s=chunk2DEY5NUC_cjs.gd(i),c=Sr.get(o);if(c&&c.context===n&&c.current===a&&c.paragraph===s)return c.inert;let d=o.localName==="pPrChange"?a===s&&Pr(n,o,a):o.localName==="rPrChange"&&vr(n,o,a,s);return Sr.set(o,{context:n,current:a,paragraph:s,inert:d}),d}function Ir(e,r,n){if(!Me(e))return false;let t=r.pkg.parts.get(e.ranges[0].partName),o=chunkKE6ZWRIY_cjs.Pk(e),a=new Set(e.ranges.map(i=>i.start.paragraphId));return !!t&&o.length>0&&o.every(i=>kn(t,i,n,a))}function Or(e,r){if(!e.some(Me))return e;let n=De(r.stylesRoot,r.numberingRoot),t=e.filter(o=>!Ir(o,r,n));return t.length===e.length?e:chunkKE6ZWRIY_cjs.Nl(t)}function aa(e,r){if(!e.some(Me))return [];let n=De(r.stylesRoot,r.numberingRoot);return e.filter(t=>Ir(t,r,n))}function Dn(e,r){if(r)return true;let n=e.map(t=>t.root);for(;n.length>0;){let t=n.pop();if(chunkKE6ZWRIY_cjs.sl(t))return true;if(t.kind!=="textValue")for(let o of t.children)n.push(o);}return false}function Ar(e,r){let n=[],t=new Set([r.name]),o=a=>{!a||t.has(a.name)||(t.add(a.name),n.push(a));};for(let a of chunkKE6ZWRIY_cjs.ng(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(chunkKE6ZWRIY_cjs.ti(e,"footnote")),o(chunkKE6ZWRIY_cjs.ti(e,"endnote")),n}function En(e,r){switch(r.story){case "body":return e.mainDocumentPart;case "header":case "footer":return r.host.partName;case "footnote":return chunkKE6ZWRIY_cjs.ti(e,"footnote")?.name??null;case "endnote":return chunkKE6ZWRIY_cjs.ti(e,"endnote")?.name??null;case "note-separator":return chunkKE6ZWRIY_cjs.ti(e,r.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return r}}function Mn(e,r){let n=new Map;for(let t of e){let o=r.get(t.partName),a=o?.get(t.start.paragraphId),i=o?.get(t.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),d=n.get(t.partName);n.set(t.partName,{lower:Math.min(d?.lower??s,s),upper:Math.max(d?.upper??c,c)});}return n}function An(e,r,n,t,o){let a=new Map(n.map(l=>[l.name,o(l)])),i=Mn(t,a),s=new Map,c=new Map,d=(l,g,f,h,y,b,P)=>{let x=a.get(l)?.get(y),S=i.get(l);if(x===void 0||!S||x<S.lower||x>S.upper)return;let O=s.get(l)??new Map;s.set(l,O);let U=c.get(l)??new Map;c.set(l,U);let W=JSON.stringify([g.story,g.noteScopeId,g.noteAreaKind]),V=f==="textbox"?JSON.stringify([W,"textbox",h]):W,$=O.get(y)??[],_=`${y}\0${g.page.index}\0${V}`,T=U.get(_);T||(T={pageIndex:g.page.index,story:f,rootStory:g.story,textboxPath:h,noteScopeId:g.noteScopeId,noteAreaKind:g.noteAreaKind,laneKey:V,intervals:[],intervalKeys:new Set},U.set(_,T),$.push(T),O.set(y,$));let G=`${b}\0${P}`;T.intervalKeys?.has(G)||(T.intervalKeys?.add(G),T.intervals.push({start:b,end:P}));};chunk2DEY5NUC_cjs.Ha(e,l=>{let g=En(r,l);!g||!i.has(g)||chunk2DEY5NUC_cjs.Ka(l.host,(f,h)=>{let y=h.textboxDepth>0?"textbox":l.story,b=h.textboxPath.map(x=>x.drawingNodeId),P=[];for(let x of f.lines){for(let S of x.spans)P.push(S.range);for(let S of x.drawings??[])P.push({paragraphId:S.paragraphId,start:S.start,end:S.start+1});}P.length===0&&P.push({paragraphId:f.range.paragraphId,start:f.range.start,end:f.range.end});for(let{paragraphId:x,start:S,end:O}of P)d(g,l,y,b,x,S,O);});}),chunk2DEY5NUC_cjs.Ja(e,l=>{let g=l.drawing.ownerPartName;l.drawing.accessibility.hidden||!i.has(g)||d(g,l.root,l.story,l.textboxPath.map(f=>f.drawingNodeId),l.drawing.paragraphId,l.drawing.start,l.drawing.start+1);});for(let l of s.values())for(let g of l.values())for(let f of g){f.intervals.sort((y,b)=>y.start-b.start||y.end-b.end);let h=[];for(let y of f.intervals){let b=h.at(-1);b&&y.start<=b.end?b.end=Math.max(b.end,y.end):h.push({...y});}f.intervals.splice(0,f.intervals.length,...h),f.intervalKeys=void 0;}let p=new Map;for(let[l,g]of s){let f=a.get(l);if(!f)continue;let h=[];for(let[y,b]of g){let P=f.get(y);P!==void 0&&h.push({paragraphId:y,position:P,laneKeys:new Set(b.map(({laneKey:x})=>x))});}h.sort((y,b)=>y.position-b.position),p.set(l,h);}return {byPart:s,orderByPart:a,visibleByPart:p}}function kr(e,r){let n=0,t=e.length;for(;n<t;){let o=n+t>>>1;e[o].position<r?n=o+1:t=o;}return n}function Ln(e,r){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=r.orderByPart.get(e.partName),t=r.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!t||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(r.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:l})=>l)??[]),d=new Set(r.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:l})=>l)??[]),p=new Set([...c].filter(l=>d.has(l)));return p.size===0?[e.start.paragraphId,e.end.paragraphId]:t.slice(kr(t,i),kr(t,s+1)).filter(l=>[...l.laneKeys].some(g=>p.has(g))).map(l=>l.paragraphId)}function Cn(e,r,n,t){return t?e.intervals.filter(a=>a.start<=r&&r<a.end).length>0?[{start:r,end:r}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,r),end:Math.min(o.end,n)};return a.end>a.start?[a]:[]})}function Tn(e,r){let n=Number.NEGATIVE_INFINITY;for(let t of e)for(let o of t.intervals)n=Math.max(n,o.end);return r!==n?new Set:new Set(e.filter(t=>t.intervals.some(o=>o.end===n)))}function Dr(e,r,n){let t=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let c of Ln(i,r)){let d=r.byPart.get(i.partName)?.get(c)??[],l=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,g=c===i.start.paragraphId?i.start.offset:0,f=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,h=l?Tn(d,g):new Set;for(let y of d){let b=Cn(y,g,f,l);l&&b.length===0&&h.has(y)&&(b=[{start:g,end:g}]);for(let P of b){let x=`${y.pageIndex}\0${y.story}\0${y.noteScopeId??""}\0${y.noteAreaKind??""}\0${y.textboxPath.join("\0")}\0${i.partName}\0${c}\0${P.start}\0${P.end}\0${s??""}`;o.has(x)||(o.add(x),t.push({pageIndex:y.pageIndex,physicalPageNumber:y.pageIndex+1,story:y.story,rootStory:y.rootStory,textboxPath:y.textboxPath,noteScopeId:y.noteScopeId,noteAreaKind:y.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:P.start},end:{paragraphId:c,offset:P.end}}}));}}}}return t}function Lr(e,r){let n=2166136261,t=2654435769;for(let o=0;o<r.length;o+=1){let a=r.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,t=Math.imul(t^a+o,2246822507)>>>0,t^=t>>>13;}return `${e}_${r.length.toString(36)}_${n.toString(36)}_${t.toString(36)}`}function Er(e,r,n=Lr){let t=new Map;for(let a of r){let i=n(e,a),s=t.get(i)??new Set;s.add(a),t.set(i,s);}let o=new Map;for(let[a,i]of t){let s=[...i].sort();for(let[c,d]of s.entries())o.set(d,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function Fn(e){let r=new Set,n=new Set;for(let t of e){if(t.kind==="comment"){r.add(t.id),t.parentId!==void 0&&r.add(t.parentId),t.parentRevisionId!==void 0&&n.add(t.parentRevisionId);for(let o of t.replyIds)r.add(o);}if(t.kind==="revision"){n.add(t.id),t.pairedWith!==void 0&&n.add(t.pairedWith);for(let o of t.replyIds)r.add(o);}}return {comment:Er("comment",r),revision:Er("change",n)}}function B(e,r,n){return e.get(n)??Lr(r,n)}function Nn(e,r,n){return e.kind==="revision"?{kind:"tracked-change",id:B(n.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:chunkKE6ZWRIY_cjs.tb(e.text),replacedText:chunkKE6ZWRIY_cjs.tb(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:B(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(t=>B(n.comment,"comment",t)),occurrences:r?Dr(e.ranges,r,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:B(n.comment,"comment",e.id),author:e.comment.author,initials:chunkKE6ZWRIY_cjs.Gl(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:chunkKE6ZWRIY_cjs.El(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:B(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:B(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(t=>B(n.comment,"comment",t)),orphaned:e.orphaned,occurrences:r&&e.range?Dr([e.range],r):[]}}function Cr(e){let r=e.parts.get(e.mainDocumentPart);if(!r)return null;let n=Ar(e,r),t=[r,...n],o=e.parts.get(chunkZDFJW5XS_cjs.$(e,r.name));if(!Dn(t,o))return null;let a=yr(),i=a.collectReviewItems({storyPart:r,furnitureParts:n,commentsPart:o,commentsExtendedPart:e.parts.get(chunkZDFJW5XS_cjs.aa(e,r.name))}),s=Or(i,Rr(e)),c=new Set(s.map(l=>l.id)),d=chunkRFUNFTGV_cjs.a(i.filter(l=>!c.has(l.id))),p={sites:new Set(d.sites),paragraphs:d.paragraphs,key:chunkRFUNFTGV_cjs.c(chunkKE6ZWRIY_cjs.ld(e)?.root??null,chunkKE6ZWRIY_cjs.md(e))};return {parts:t,derivation:a,items:s,unlistedSites:p}}var Mr=new WeakMap,jn={sites:new Set,paragraphs:new Map,key:""};function Tr(e){let r=Mr.get(e);if(!r){let n=e.parts.get(e.mainDocumentPart);r=n!==void 0&&[n,...Ar(e,n)].some(o=>chunkKE6ZWRIY_cjs.tl(o).some(a=>a.propertyChange))&&Cr(e)?.unlistedSites||jn,Mr.set(e,r);}return r}function Fr(e,r){let n=Cr(r);if(!n)return [];let{parts:t,derivation:o,items:a}=n;if(a.length===0)return [];let i=a.flatMap(d=>chunkKE6ZWRIY_cjs.Vk(d)),s=i.length>0?An(e,r,t,i,o.deepParagraphOrderOfPart):null,c=Fn(a);return a.map(d=>Nn(d,s,c)).filter(d=>d!==null)}var _n=new Set(["part","validatedHandle"]);function Nr(e){let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}function Z(e,r,n,t,o){if(!(t!==void 0&&_n.has(t))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!r.has(e)){r.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)Z(a,r,n,void 0,o);Object.freeze(e);return}if(!Nr(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");Z(i.value,r,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function jr(e){if(!Nr(e))throw new TypeError("Semantic layout publication encountered a non-record value");let r=new Set;for(let t of e.pages)if(!(t===null||typeof t!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(t,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||r.has(i))continue;let s=new Set;s.add(e),Z(i,new Set,s,o),r.add(i);}let n=(t,o)=>{let a=new Set;for(let i of t){let s=new Set;s.add(e),Z(i,a,s,void 0,o);}Object.freeze(t);};for(let t of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,t);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(t==="pages"&&Array.isArray(o.value)){n(o.value,r);continue}if(t==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),Z(o.value,new Set,a,t);}return Object.freeze(e),e}var Bn=Object.freeze([]),M=class extends Error{constructor(n,t,o){super(t,o);this.code=n;this.name="ExportResourceError";}code};function Un(e){try{return e instanceof M}catch{return false}}function Vn(e){try{return e instanceof chunk2DEY5NUC_cjs.of}catch{return false}}function Kn(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function zn(e){if(Un(e))return e;let r=Vn(e),n=Kn(e),t=n?`: ${n}`:"",o=new M(r?"layoutInvariant":"layoutFailed",r?`Authored geometry could not be represented within the bounded page model${t}`:`Export layout failed${t}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function Hn(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function _r(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var Wn=50,Ae=64;function $n(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Gn(e){let r=false;return chunk2DEY5NUC_cjs.Ja(e,({drawing:n})=>{$n(n.resource)&&(r=true);}),r}function Br(e){return !ArrayBuffer.isView(e)}function za(e,r={}){if(r.signal?.aborted)return {ok:false,reason:"aborted"};if(r.revisionAuthorSlots!==void 0&&(!r.revisionAuthorSlots||typeof r.revisionAuthorSlots!="object"||Array.isArray(r.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let n=r.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(r.revisionAuthorSlots).map(([m,w])=>{if(!Number.isSafeInteger(w)||w<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [m,w]}))),t=r.revisionMarkup?chunk2DEY5NUC_cjs.$a(r.revisionMarkup):void 0,o=t?{revisionMarkup:t,hiddenAuthors:new Set,cacheKey:JSON.stringify(t)}:void 0,a=_r(r.displayMode??chunk2DEY5NUC_cjs.db),i=Br(e),s=Br(e)?{ok:true,view:e}:chunkZDFJW5XS_cjs.va(e);if(!s.ok)return s;let c=s.view,d=r.reuseAcrossRevisions??i,p=Hn(r.resourceTimeoutMs),l=r.measurer??chunk2DEY5NUC_cjs.ma(),g=r.producer??(r.measurer?"host-export-measurer":"export-fixed-measurer"),f=chunk2DEY5NUC_cjs.Oe({retainAcrossPasses:d}),h=0,y=new Set,b=()=>{h+=1;for(let m of y)m();y.clear();},P=chunk2DEY5NUC_cjs.gf({session:c,decodePort:r.imageDecodePort??rr(r.convertPreservedImage?{convertPreserved:r.convertPreservedImage}:void 0),onResourcesChanged:b}),x={view:c,measurer:l,paragraphCache:f,sessions:new Map,completed:new Map,inFlight:new Map,styles:chunk2DEY5NUC_cjs.ef(c),fieldLinks:new Map,links:chunk2DEY5NUC_cjs.vf(c),drawingBundle:P,furniture:new Map},S=new AbortController,O=r.signal,U=false,W=()=>U?new M("aborted","Export resource settlement was aborted"):new M("disposed","Export session has been disposed"),V=()=>{U=true,$();};function $(){let m=x;if(m){x=null,O?.removeEventListener("abort",V),S.abort(O?.reason),m.drawingBundle.dispose(),m.paragraphCache.clear();for(let w of m.completed.values())chunk2DEY5NUC_cjs.Yc(w.internal),chunk2DEY5NUC_cjs.Df(w.internal);for(let w of m.fieldLinks.values())w.registry.clear();m.fieldLinks.clear(),m.completed.clear(),m.inFlight.clear(),m.furniture.clear(),m.sessions.clear(),b();}}O?.addEventListener("abort",V,{once:true}),O?.aborted&&V();let _=()=>{if(!x)throw W();if(S.signal.aborted)throw new M("aborted","Export resource settlement was aborted")},T=(m,w,v,u)=>h!==m||x?.view.packageRevision()!==w||x?.view.currentPackage()!==v?Promise.resolve():(_(),new Promise((I,D)=>{let E=false,F,A=N=>{E||(E=true,F!==void 0&&clearTimeout(F),y.delete(Y),S.signal.removeEventListener("abort",X),N?D(N):I());},Y=()=>A(),X=()=>A(new M("aborted","Export resource settlement was aborted")),L=()=>{if(x?.view.packageRevision()!==w||x?.view.currentPackage()!==v){A();return}let N=u-Date.now();if(N<=0){A(new M("timedOut",`Image resources did not settle within ${p}ms`));return}F=setTimeout(L,Math.min(Wn,N));};if(y.add(Y),S.signal.addEventListener("abort",X,{once:true}),h!==m||x?.view.packageRevision()!==w||x?.view.currentPackage()!==v){A();return}F=setTimeout(L,0);})),G=async(m,w=0,v=Date.now()+p)=>{if(_(),Date.now()>=v)throw new M("timedOut",`Export layout did not stabilize within ${p}ms`);let u=x,I=v,D=u.view.packageRevision(),E=u.view.currentPackage(),F=u.completed.get(m);if(F&&F.revision===D&&F.pkg===E)return F.published;let A=()=>{if(u.view.packageRevision()===D&&u.view.currentPackage()===E)return null;if(w>=Ae-1)throw new M("nonConvergent","Document revision did not stabilize during export layout");return G(m,w+1,I)},Y=m==="simple-markup"?chunk2DEY5NUC_cjs.eb(o):o,X=m==="all-markup"||m==="simple-markup"?chunk2DEY5NUC_cjs.Wd(Y,Tr(E),m==="simple-markup"):Y,L=u.fieldLinks.get(m);if(!L||L.revision!==D||L.pkg!==E){let k=L?.registry??chunk2DEY5NUC_cjs.wf();k.clear(),L={revision:D,pkg:E,registry:k},u.fieldLinks.set(m,L),u.furniture.delete(m);}let N=L.registry,Ce=u.sessions.get(m)??chunk2DEY5NUC_cjs.hg();u.sessions.set(m,Ce);let ee=u.furniture.get(m);ee||(ee=chunk2DEY5NUC_cjs.sf({view:u.view,measurer:u.measurer,producer:g,cache:u.paragraphCache,styleCascade:u.styles.styleCascade,numberingIndex:u.styles.numberingIndex,defaultTabStopPt:u.styles.defaultTabStopPt,compatibilityMode:u.styles.compatibilityMode,displayMode:chunk2DEY5NUC_cjs.cb(m),revisionAuthorFilter:X,showFieldCodes:false,inlineDrawingLayoutForPart:k=>u.drawingBundle.contextForPart(k),drawingLayoutTokenForPart:k=>u.drawingBundle.cacheTokenForPart(k),drawingTokenForParagraphForPart:(k,he)=>u.drawingBundle.drawingTokenForParagraph(he,k),linkProjectors:u.links,projectFieldLink:k=>N.project(k)}),u.furniture.set(m,ee));for(let k=0;k<Ae;k+=1){let he=h;u.drawingBundle.sync(u.view);let Te=A();if(Te)return Te;let j=sr({view:u.view,revision:u.view.packageRevision(),measurer:u.measurer,cache:u.paragraphCache,session:Ce,producer:g,styleCascade:u.styles.styleCascade,defaultTabStopPt:u.styles.defaultTabStopPt,numberingIndex:u.styles.numberingIndex,furniture:ee,compatibilityMode:u.styles.compatibilityMode,linkProjectors:u.links,projectFieldLink:R=>N.project(R),inlineDrawingLayout:u.drawingBundle.bodyContext,inlineDrawingLayoutForPart:R=>u.drawingBundle.contextForPart(R),drawingTokenForParagraph:R=>u.drawingBundle.drawingTokenForParagraph(R,u.view.part().name),drawingTokenForParagraphForPart:(R,te)=>u.drawingBundle.drawingTokenForParagraph(te,R),drawingLayoutEpoch:u.drawingBundle.cacheTokenForPart(u.view.part().name),drawingLayoutEpochForPart:R=>u.drawingBundle.cacheTokenForPart(R),displayMode:chunk2DEY5NUC_cjs.cb(m),revisionAuthorFilter:X,showFieldCodes:false,bodyBlockLimit:void 0,fieldResults:"atomic"});if(!Gn(j)){let R=A();if(R)return R;d||(chunk2DEY5NUC_cjs.Yc(j),chunk2DEY5NUC_cjs.Df(j),u.paragraphCache.clear(),u.sessions.delete(m),u.furniture.delete(m));let te=Fr(j,E),Ur=te.length===0?Bn:Object.freeze(fr(j,te)),Vr=Jt(u.view,j),Kr={...j,...Vr,reviewDisplayMode:m,...t?{revisionMarkup:t}:{},...n?{revisionAuthorSlots:n}:{},facingPages:[...E.parts.values()].some(_e=>_e.root.localName==="settings"&&_e.root.children.some(re=>re.kind!=="textValue"&&(re.localName==="mirrorMargins"||re.localName==="evenAndOddHeaders")&&!re.attributes.some(Be=>Be.localName==="val"&&["0","false","off"].includes(Be.value)))),contentWarnings:ir(u.view),reviewArtifacts:Ur},je=jr(Kr);return u.completed.set(m,{revision:D,pkg:E,internal:j,published:je}),je}let Fe=he;for(;u.drawingBundle.pendingResourceCount()>0;){await T(Fe,D,E,I),Fe=h,_();let R=A();if(R)return R}_();let Ne=A();if(Ne)return Ne}throw new M("nonConvergent",`Image resources did not reach quiescence after ${Ae} layout passes`)},Le=m=>{let w;try{w=_r(m);}catch(D){return Promise.reject(D)}if(!x)return Promise.reject(W());let v=x,u=v.inFlight.get(w);if(u)return u;let I=G(w).catch(D=>{throw zn(D)}).finally(()=>v.inFlight.delete(w));return v.inFlight.set(w,I),I};return {ok:true,session:{layout:()=>Le(a),layoutFor:Le,validatedImageBytes(m){let w=x;return !w||m.resource.kind!=="ready"?null:w.drawingBundle.mintValidatedBytes(m.resource.validatedHandle,m.resource.contentId)?.slice()??null},async chartFallbackResource(m){let w=x;if(!w||!m.chart||!m.chartFallbackResource)return;if(m.chartFallbackResource.kind!=="pending")return m.chartFallbackResource;let v,u=new Promise(I=>{v=setTimeout(()=>I(Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),p);});try{return await Promise.race([w.drawingBundle.resolveChartFallback(m.ownerPartName,m.drawingNodeId),u])}finally{clearTimeout(v);}},metafileBytes(m){let w=x,v=m.resource;if(!w||v.kind!=="unrenderable"||v.partName===null||v.reason!=="unsupported-format"&&v.reason!=="decode-failed")return null;let u=v.mime;if(u!=="image/x-emf"&&u!=="image/x-wmf")return null;let I=w.view.currentPackage().partBytes.get(v.partName);return !I||I.byteLength>chunkKE6ZWRIY_cjs.q.maxEncodedBytes||chunkKE6ZWRIY_cjs.kf(I)!==u?null:{mime:u,bytes:I.slice()}},dispose:$}}}exports.a=er;exports.b=an;exports.c=Jn;exports.d=rr;exports.e=Rr;exports.f=Or;exports.g=aa;exports.h=M;exports.i=za;