@docx-editor.dev/core 2.23.0 → 2.25.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 (100) hide show
  1. package/README.md +7 -6
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +30 -11
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +8 -8
  7. package/dist/binding.js +1 -1
  8. package/dist/{chunk-QTFAXWVI.cjs → chunk-3RMHRNDA.cjs} +1 -1
  9. package/dist/{chunk-PCPBDYEL.cjs → chunk-42N7OV3G.cjs} +1 -1
  10. package/dist/chunk-47ZJEEBT.js +2 -0
  11. package/dist/chunk-4B3SXBV6.js +4 -0
  12. package/dist/chunk-5MWFZ7F4.cjs +11 -0
  13. package/dist/chunk-AS2OC6J4.cjs +26 -0
  14. package/dist/{chunk-FWX535CS.cjs → chunk-B7SYEMZ7.cjs} +1 -1
  15. package/dist/{chunk-EHT4LKKZ.cjs → chunk-BME2KUNL.cjs} +1 -1
  16. package/dist/chunk-CDGVVEUK.js +26 -0
  17. package/dist/chunk-E4RAPI5J.cjs +2 -0
  18. package/dist/chunk-FZJTQPH4.js +2 -0
  19. package/dist/chunk-H7XMRUAO.cjs +5 -0
  20. package/dist/{chunk-GRVRQBKU.js → chunk-ILUE2SI5.js} +1 -1
  21. package/dist/{chunk-UMBHUW6R.js → chunk-IZT3C23R.js} +1 -1
  22. package/dist/chunk-KJLPVGSX.cjs +4 -0
  23. package/dist/chunk-LF5LPZOP.cjs +18 -0
  24. package/dist/{chunk-QK23BSRK.cjs → chunk-MEF2AK5L.cjs} +1 -1
  25. package/dist/{chunk-DZOGUV7O.js → chunk-N5WE5O5Q.js} +1 -1
  26. package/dist/chunk-OVDW4XQD.cjs +2 -0
  27. package/dist/{chunk-6QS5WL63.js → chunk-SNN53UPD.js} +1 -1
  28. package/dist/chunk-V7LBEUVW.js +5 -0
  29. package/dist/chunk-VE7YBFQD.js +5 -0
  30. package/dist/chunk-VOVDX7GW.js +18 -0
  31. package/dist/chunk-VQ33XGNP.cjs +5 -0
  32. package/dist/{chunk-KRBBWATQ.js → chunk-WVJRO4WY.js} +1 -1
  33. package/dist/chunk-XUJINXW6.js +1 -0
  34. package/dist/{chunk-RLO64PHP.cjs → chunk-Y3TPAITU.cjs} +1 -1
  35. package/dist/chunk-Z65JJLLF.js +11 -0
  36. package/dist/collaboration/replication.cjs +1 -1
  37. package/dist/collaboration/replication.d.ts +4 -4
  38. package/dist/collaboration/replication.js +1 -1
  39. package/dist/collaboration.d.ts +3 -3
  40. package/dist/contracts/document.d.ts +2 -2
  41. package/dist/contracts/editor.d.ts +8 -8
  42. package/dist/contracts/modules.d.ts +6 -6
  43. package/dist/contracts/types.d.ts +1 -1
  44. package/dist/{custom-node-writes-77rvPW2-.d.ts → custom-node-writes-Cy9imOjA.d.ts} +2 -2
  45. package/dist/{document-protection-CYIjO-li.d.ts → document-protection-Bp19Ad4I.d.ts} +1 -1
  46. package/dist/{editor-DhUQsWWH.d.ts → editor-DkfCCTxA.d.ts} +147 -9
  47. package/dist/editor.cjs +1 -1
  48. package/dist/editor.css +3 -1
  49. package/dist/editor.d.ts +179 -34
  50. package/dist/editor.js +1 -1
  51. package/dist/export.cjs +2 -2
  52. package/dist/export.d.ts +12 -12
  53. package/dist/export.js +1 -1
  54. package/dist/{font-resolver-BwoHFBlr.d.ts → font-resolver-C295obND.d.ts} +1 -1
  55. package/dist/{headless-document-view-Cc3fFWhv.d.ts → headless-document-view-R9bzzepb.d.ts} +2 -2
  56. package/dist/{image-resources-DkuzBnTM.d.ts → image-resources-DfagDguq.d.ts} +1 -1
  57. package/dist/{index-BYaCkGKO.d.ts → index-3KAxeSic.d.ts} +345 -316
  58. package/dist/index.cjs +1 -1
  59. package/dist/index.d.ts +17 -17
  60. package/dist/index.js +1 -1
  61. package/dist/{layout-shaping-DpWQG26a.d.ts → layout-shaping-C889tgmj.d.ts} +2 -2
  62. package/dist/layout.cjs +1 -1
  63. package/dist/layout.d.ts +67 -52
  64. package/dist/layout.js +1 -1
  65. package/dist/{note-properties-DMfKK3QU.d.ts → note-properties-CmfvOJsi.d.ts} +1 -1
  66. package/dist/{omml-equation-BY7OdfGY.d.ts → omml-equation-CZ6IG2ja.d.ts} +1 -1
  67. package/dist/output.cjs +1 -1
  68. package/dist/output.d.ts +7 -7
  69. package/dist/output.js +1 -1
  70. package/dist/{protocol-CPAakntQ.d.ts → protocol-BhmenALD.d.ts} +43 -22
  71. package/dist/{review-paragraph-order-B0BP_wJP.d.ts → review-paragraph-order-BwhRT264.d.ts} +1 -1
  72. package/dist/{revision-projection-CVJeA2jp.d.ts → revision-projection-DfWxdBqA.d.ts} +1 -1
  73. package/dist/{semantic-cell-selection-B8GF_H2e.d.ts → semantic-cell-selection-CC3NwCtx.d.ts} +4 -4
  74. package/dist/{semantic-interaction-DQjtIruQ.d.ts → semantic-interaction-BHlV61hK.d.ts} +1 -1
  75. package/dist/{semantic-paint-DoPl85nR.d.ts → semantic-paint-DfWIWUs6.d.ts} +2 -2
  76. package/dist/{semantic-records-DB0VgWsr.d.ts → semantic-records-DrExlBy-.d.ts} +9 -9
  77. package/dist/store.cjs +1 -1
  78. package/dist/store.d.ts +37 -41
  79. package/dist/store.js +1 -1
  80. package/dist/{tree-package-fragment-BIyGh6L8.d.ts → tree-package-fragment-YPyYC1aD.d.ts} +9 -4
  81. package/dist/{tree-session-contract-CHcCnz3W.d.ts → tree-session-contract-AeY2v0x9.d.ts} +8 -6
  82. package/dist/{types-barrel-DN_-gaRX.d.ts → types-barrel-BO73JqHG.d.ts} +44 -30
  83. package/package.json +3 -3
  84. package/dist/chunk-4OAXZNBU.js +0 -5
  85. package/dist/chunk-6745I4XF.cjs +0 -20
  86. package/dist/chunk-6KA3L3FR.cjs +0 -11
  87. package/dist/chunk-BUDXZ7T2.cjs +0 -5
  88. package/dist/chunk-DYRXA5UJ.cjs +0 -2
  89. package/dist/chunk-F5LAOPAD.js +0 -20
  90. package/dist/chunk-JN62FLHE.cjs +0 -4
  91. package/dist/chunk-KV5HFE23.cjs +0 -2
  92. package/dist/chunk-Q4RDWB3U.cjs +0 -18
  93. package/dist/chunk-T7RGKBCE.cjs +0 -5
  94. package/dist/chunk-VE6H5EJA.js +0 -5
  95. package/dist/chunk-WHG23WNI.js +0 -1
  96. package/dist/chunk-XBYZTDF7.js +0 -4
  97. package/dist/chunk-XRBPZCNK.js +0 -11
  98. package/dist/chunk-Y5JCIWTF.js +0 -2
  99. package/dist/chunk-ZA6HEWUM.js +0 -2
  100. package/dist/chunk-ZCRSPN4Q.js +0 -18
@@ -1 +1 @@
1
- 'use strict';var chunk6KA3L3FR_cjs=require('./chunk-6KA3L3FR.cjs');var X=new Set(["document","hdr","ftr","footnotes","endnotes"]),W=24,U=512,E=chunk6KA3L3FR_cjs.Yg(W);function z(o){let t=o.root;return t.namespaceUri===chunk6KA3L3FR_cjs.da&&X.has(t.localName)}function $(o){let t=[],e=r=>{if(r.kind!=="textValue"){r.namespaceUri===chunk6KA3L3FR_cjs.da&&r.localName==="p"&&t.push(r);for(let i of r.children)e(i);}};return e(o.root),t}function V(o){let t=chunk6KA3L3FR_cjs.eb(o);let e=[],r=new Set;for(let i of $(t)){let n=chunk6KA3L3FR_cjs._a(i);if(!n||!chunk6KA3L3FR_cjs.Za(n))continue;let a=n.toUpperCase();if(r.has(a))continue;r.add(a);let s=chunk6KA3L3FR_cjs.rj(t,i.id);s!==null&&e.push(Object.freeze({paragraphId:a,nodeId:i.id,text:s}));}return Object.freeze(e)}function Y(o){let t=E.get(o.root);if(t)return t;let e=chunk6KA3L3FR_cjs.eb(o);let r=new Map,i=new Set,n=a=>{if(a.kind!=="textValue"){if(a.namespaceUri===chunk6KA3L3FR_cjs.da&&a.localName==="p"){let s=chunk6KA3L3FR_cjs._a(a);if(s&&chunk6KA3L3FR_cjs.Za(s)){let p=s.toUpperCase();i.has(p)||(i.add(p),a.kind==="paragraph"&&r.set(p,a.id));}}for(let s of a.children)n(s);}};return n(e.root),E.set(o.root,r),r}function w(o,t){if(o.length!==t.length)return false;for(let e=0;e<o.length;e+=1)if(o[e].root!==t[e])return false;return true}function B(o){let t=new Map,e=null,r=(n,a,s)=>{for(t.delete(n),t.set(n,{partName:a.name,root:a.root,nodeId:s});t.size>U;){let p=t.keys().next();if(p.done)break;t.delete(p.value);}},i=(n,a)=>{let s=t.get(n);if(!s)return null;let p=a.find(c=>c.name===s.partName);if(!p)return null;if(p.root===s.root)return {part:p,nodeId:s.nodeId};let l=chunk6KA3L3FR_cjs.Ha(p,s.nodeId);if(!l||l.kind!=="paragraph")return null;let d=chunk6KA3L3FR_cjs._a(l);return !d||d.toUpperCase()!==n?null:(r(n,p,s.nodeId),{part:p,nodeId:s.nodeId})};return n=>{let a=o(),s=i(n,a);if(s)return s;if(e&&e.ids.has(n)&&w(a,e.roots))return null;for(let p of a){let l=Y(p).get(n);if(l!==void 0)return r(n,p,l),{part:p,nodeId:l}}return (!e||!w(a,e.roots))&&(e={roots:a.map(p=>p.root),ids:new Set}),e.ids.size<U&&e.ids.add(n),null}}function H(o,t){return chunk6KA3L3FR_cjs.Ba(o,t)}var q=Object.freeze({kind:"body"}),F=1e6;function b(o,t){if(t<=0||t>=o.length)return false;let e=o.charCodeAt(t-1),r=o.charCodeAt(t);return e>=55296&&e<=56319&&r>=56320&&r<=57343}function Q(o,t,e){if(t===e)return [];let r=0,i=Math.min(t.length,e.length);for(;r<i&&t.charCodeAt(r)===e.charCodeAt(r);)r+=1;for(;r>0&&(b(t,r)||b(e,r));)r-=1;let n=0;for(;n<t.length-r&&n<e.length-r&&t.charCodeAt(t.length-n-1)===e.charCodeAt(e.length-n-1);)n+=1;for(;n>0&&(b(t,t.length-n)||b(e,e.length-n));)n-=1;let a=t.length-r-n,s=e.slice(r,e.length-n),p=[];return a>0&&p.push({op:"deleteText",paragraphId:o,start:r,end:r+a}),s.length>0&&p.push({op:"insertText",paragraphId:o,offset:r,text:s}),Object.freeze(p)}function K(o){let t=r=>!!r&&r.kind!=="textValue"&&r.namespaceUri===chunk6KA3L3FR_cjs.da&&r.localName==="t"&&r.attributes.every(i=>i.namespaceUri===chunk6KA3L3FR_cjs.ea&&i.localName==="space")&&r.children.every(i=>i.kind==="textValue"),e=[];for(let r of o){let i=e.at(-1);if(!t(i)||!t(r)){e.push(r);continue}let n=i.children.map(a=>a.kind==="textValue"?a.value:"").join("")+r.children.map(a=>a.kind==="textValue"?a.value:"").join("");e[e.length-1]={...i,attributes:/^\s|\s$/.test(n)?[{kind:"xmlSpace",namespaceUri:chunk6KA3L3FR_cjs.ea,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:i.children[0]?.id??`${i.id}/text`,kind:"textValue",value:n}]};}return e}function G(o){if(o.kind==="textValue")return o;let t=false,e=o.children.map(r=>{let i=G(r);return i!==r&&(t=true),i});if(o.namespaceUri===chunk6KA3L3FR_cjs.da&&o.localName==="r"){let r=K(e);(r.length!==e.length||r.some((i,n)=>i!==e[n]))&&(e=[...r],t=true);}return t?{...o,children:e}:o}function rr(o,t,e){let r=o.parts.get(t);if(!r)return o;let i=false,n=new Set;for(let a of e)(a.op==="insertText"||a.op==="deleteText")&&!a.revision&&n.add(a.paragraphId);for(let a of n){let s=chunk6KA3L3FR_cjs.Ha(r,a);if(!s||s.kind==="textValue")continue;let p=G(s);if(p===s)continue;let l=chunk6KA3L3FR_cjs.Ma(r,a,p,{deferValidation:true});l.ok&&(r=l.part,i=true);}return i?chunk6KA3L3FR_cjs.Kd(o,r):o}function er(o,t){let e=t.documentId.trim();if(e.length===0||e.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let r=()=>V(o.bodyStore().part),i,a=B(()=>{let l=o.bodyStore().part,d=o.currentPackage();if(i?.pkg===d&&i.body===l)return i.parts;let c=[l];for(let g of d.parts.values())g===l||!z(g)||c.push(g);return i={pkg:d,body:l,parts:Object.freeze(c)},i.parts}),s=(l,d)=>{if(l.length===0)return {ok:true,changed:false};let c=r(),g=new Set,h=[];for(let u of l){if(typeof u.text!="string"||u.text.length>F)return {ok:false,reason:"collaboration-text-limit"};if(typeof u.paragraphId!="string"||u.paragraphId.length===0||u.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let m=u.paragraphId.toUpperCase();if(g.has(m))return {ok:false,reason:"duplicate-paragraph-id"};g.add(m);let N=c.filter(L=>L.paragraphId===m);if(N.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let T=N[0];h.push(...Q(T.nodeId,T.text,u.text));}if(h.length===0)return {ok:true,changed:false};let y=o.transact(q,u=>{for(let m of h)u.apply(m);u.applyPackage(m=>rr(m,m.mainDocumentPart,h));},{origin:d.origin,actorId:d.actorId,operationId:d.operationId,recordsHistory:false});return y.ok?{ok:true,changed:y.change!==null}:{ok:false,reason:y.detail??y.reason}};return Object.freeze({documentId:e,paragraphs:r,paragraphByNodeId(l){return r().find(d=>d.nodeId===l)??null},paragraphByStableId(l){let d=l.toUpperCase(),c=a(d);if(!c)return null;let g=chunk6KA3L3FR_cjs.rj(c.part,c.nodeId);return g===null?null:Object.freeze({paragraphId:d,nodeId:c.nodeId,text:g})},applyParagraphText(l,d,c){return s([{paragraphId:l,text:d}],c)},applyParagraphTexts:s,applyRemotePackage(l,d){let c=o.publishRemotePackage(l,d);return c.ok?{ok:true,changed:c.change!==null}:{ok:false,reason:c.detail??c.reason}},revision:()=>o.packageRevision,subscribe:l=>o.subscribe(l),observePrimitiveJournal:l=>H(o,l),hasPendingJournals:()=>chunk6KA3L3FR_cjs.za(o),flushPendingJournals:()=>{chunk6KA3L3FR_cjs.Aa(o);},save:()=>chunk6KA3L3FR_cjs.Jd(o.currentPackage()),binaryPart(l){let d=o.currentPackage();return d.partBytes.get(l)??d.partBytes.get(l.startsWith("/")?l.slice(1):`/${l}`)??null}})}exports.a=rr;exports.b=er;
1
+ 'use strict';var chunk5MWFZ7F4_cjs=require('./chunk-5MWFZ7F4.cjs');var X=new Set(["document","hdr","ftr","footnotes","endnotes"]),W=24,U=512,E=chunk5MWFZ7F4_cjs.gh(W);function z(o){let t=o.root;return t.namespaceUri===chunk5MWFZ7F4_cjs.fa&&X.has(t.localName)}function $(o){let t=[],e=r=>{if(r.kind!=="textValue"){r.namespaceUri===chunk5MWFZ7F4_cjs.fa&&r.localName==="p"&&t.push(r);for(let i of r.children)e(i);}};return e(o.root),t}function V(o){let t=chunk5MWFZ7F4_cjs.eb(o);let e=[],r=new Set;for(let i of $(t)){let n=chunk5MWFZ7F4_cjs.Ya(i);if(!n||!chunk5MWFZ7F4_cjs.Xa(n))continue;let a=n.toUpperCase();if(r.has(a))continue;r.add(a);let s=chunk5MWFZ7F4_cjs.Cj(t,i.id);s!==null&&e.push(Object.freeze({paragraphId:a,nodeId:i.id,text:s}));}return Object.freeze(e)}function Y(o){let t=E.get(o.root);if(t)return t;let e=chunk5MWFZ7F4_cjs.eb(o);let r=new Map,i=new Set,n=a=>{if(a.kind!=="textValue"){if(a.namespaceUri===chunk5MWFZ7F4_cjs.fa&&a.localName==="p"){let s=chunk5MWFZ7F4_cjs.Ya(a);if(s&&chunk5MWFZ7F4_cjs.Xa(s)){let p=s.toUpperCase();i.has(p)||(i.add(p),a.kind==="paragraph"&&r.set(p,a.id));}}for(let s of a.children)n(s);}};return n(e.root),E.set(o.root,r),r}function w(o,t){if(o.length!==t.length)return false;for(let e=0;e<o.length;e+=1)if(o[e].root!==t[e])return false;return true}function B(o){let t=new Map,e=null,r=(n,a,s)=>{for(t.delete(n),t.set(n,{partName:a.name,root:a.root,nodeId:s});t.size>U;){let p=t.keys().next();if(p.done)break;t.delete(p.value);}},i=(n,a)=>{let s=t.get(n);if(!s)return null;let p=a.find(c=>c.name===s.partName);if(!p)return null;if(p.root===s.root)return {part:p,nodeId:s.nodeId};let l=chunk5MWFZ7F4_cjs.Ja(p,s.nodeId);if(!l||l.kind!=="paragraph")return null;let d=chunk5MWFZ7F4_cjs.Ya(l);return !d||d.toUpperCase()!==n?null:(r(n,p,s.nodeId),{part:p,nodeId:s.nodeId})};return n=>{let a=o(),s=i(n,a);if(s)return s;if(e&&e.ids.has(n)&&w(a,e.roots))return null;for(let p of a){let l=Y(p).get(n);if(l!==void 0)return r(n,p,l),{part:p,nodeId:l}}return (!e||!w(a,e.roots))&&(e={roots:a.map(p=>p.root),ids:new Set}),e.ids.size<U&&e.ids.add(n),null}}function H(o,t){return chunk5MWFZ7F4_cjs.Da(o,t)}var q=Object.freeze({kind:"body"}),F=1e6;function b(o,t){if(t<=0||t>=o.length)return false;let e=o.charCodeAt(t-1),r=o.charCodeAt(t);return e>=55296&&e<=56319&&r>=56320&&r<=57343}function Q(o,t,e){if(t===e)return [];let r=0,i=Math.min(t.length,e.length);for(;r<i&&t.charCodeAt(r)===e.charCodeAt(r);)r+=1;for(;r>0&&(b(t,r)||b(e,r));)r-=1;let n=0;for(;n<t.length-r&&n<e.length-r&&t.charCodeAt(t.length-n-1)===e.charCodeAt(e.length-n-1);)n+=1;for(;n>0&&(b(t,t.length-n)||b(e,e.length-n));)n-=1;let a=t.length-r-n,s=e.slice(r,e.length-n),p=[];return a>0&&p.push({op:"deleteText",paragraphId:o,start:r,end:r+a}),s.length>0&&p.push({op:"insertText",paragraphId:o,offset:r,text:s}),Object.freeze(p)}function K(o){let t=r=>!!r&&r.kind!=="textValue"&&r.namespaceUri===chunk5MWFZ7F4_cjs.fa&&r.localName==="t"&&r.attributes.every(i=>i.namespaceUri===chunk5MWFZ7F4_cjs.ga&&i.localName==="space")&&r.children.every(i=>i.kind==="textValue"),e=[];for(let r of o){let i=e.at(-1);if(!t(i)||!t(r)){e.push(r);continue}let n=i.children.map(a=>a.kind==="textValue"?a.value:"").join("")+r.children.map(a=>a.kind==="textValue"?a.value:"").join("");e[e.length-1]={...i,attributes:/^\s|\s$/.test(n)?[{kind:"xmlSpace",namespaceUri:chunk5MWFZ7F4_cjs.ga,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:i.children[0]?.id??`${i.id}/text`,kind:"textValue",value:n}]};}return e}function G(o){if(o.kind==="textValue")return o;let t=false,e=o.children.map(r=>{let i=G(r);return i!==r&&(t=true),i});if(o.namespaceUri===chunk5MWFZ7F4_cjs.fa&&o.localName==="r"){let r=K(e);(r.length!==e.length||r.some((i,n)=>i!==e[n]))&&(e=[...r],t=true);}return t?{...o,children:e}:o}function rr(o,t,e){let r=o.parts.get(t);if(!r)return o;let i=false,n=new Set;for(let a of e)(a.op==="insertText"||a.op==="deleteText")&&!a.revision&&n.add(a.paragraphId);for(let a of n){let s=chunk5MWFZ7F4_cjs.Ja(r,a);if(!s||s.kind==="textValue")continue;let p=G(s);if(p===s)continue;let l=chunk5MWFZ7F4_cjs.Oa(r,a,p,{deferValidation:true});l.ok&&(r=l.part,i=true);}return i?chunk5MWFZ7F4_cjs.Xd(o,r):o}function er(o,t){let e=t.documentId.trim();if(e.length===0||e.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let r=()=>V(o.bodyStore().part),i,a=B(()=>{let l=o.bodyStore().part,d=o.currentPackage();if(i?.pkg===d&&i.body===l)return i.parts;let c=[l];for(let g of d.parts.values())g===l||!z(g)||c.push(g);return i={pkg:d,body:l,parts:Object.freeze(c)},i.parts}),s=(l,d)=>{if(l.length===0)return {ok:true,changed:false};let c=r(),g=new Set,h=[];for(let u of l){if(typeof u.text!="string"||u.text.length>F)return {ok:false,reason:"collaboration-text-limit"};if(typeof u.paragraphId!="string"||u.paragraphId.length===0||u.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let m=u.paragraphId.toUpperCase();if(g.has(m))return {ok:false,reason:"duplicate-paragraph-id"};g.add(m);let N=c.filter(L=>L.paragraphId===m);if(N.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let T=N[0];h.push(...Q(T.nodeId,T.text,u.text));}if(h.length===0)return {ok:true,changed:false};let y=o.transact(q,u=>{for(let m of h)u.apply(m);u.applyPackage(m=>rr(m,m.mainDocumentPart,h));},{origin:d.origin,actorId:d.actorId,operationId:d.operationId,recordsHistory:false});return y.ok?{ok:true,changed:y.change!==null}:{ok:false,reason:y.detail??y.reason}};return Object.freeze({documentId:e,paragraphs:r,paragraphByNodeId(l){return r().find(d=>d.nodeId===l)??null},paragraphByStableId(l){let d=l.toUpperCase(),c=a(d);if(!c)return null;let g=chunk5MWFZ7F4_cjs.Cj(c.part,c.nodeId);return g===null?null:Object.freeze({paragraphId:d,nodeId:c.nodeId,text:g})},applyParagraphText(l,d,c){return s([{paragraphId:l,text:d}],c)},applyParagraphTexts:s,applyRemotePackage(l,d){let c=o.publishRemotePackage(l,d);return c.ok?{ok:true,changed:c.change!==null}:{ok:false,reason:c.detail??c.reason}},revision:()=>o.packageRevision,subscribe:l=>o.subscribe(l),observePrimitiveJournal:l=>H(o,l),hasPendingJournals:()=>chunk5MWFZ7F4_cjs.Ba(o),flushPendingJournals:()=>{chunk5MWFZ7F4_cjs.Ca(o);},save:()=>chunk5MWFZ7F4_cjs.Wd(o.currentPackage()),binaryPart(l){let d=o.currentPackage();return d.partBytes.get(l)??d.partBytes.get(l.startsWith("/")?l.slice(1):`/${l}`)??null}})}exports.a=rr;exports.b=er;
@@ -1 +1 @@
1
- import {c}from'./chunk-6QS5WL63.js';import {Ga,Ea,Fa}from'./chunk-VE6H5EJA.js';import {he,Ce,bf}from'./chunk-XRBPZCNK.js';function F(t){let r=[],s=0;for(let e of t){let o=s+e.text.length;e.resultRuns?r.push({text:e.text,rawStart:e.rawStart,rawEnd:e.rawEnd,resultRuns:e.resultRuns,projectedStart:s,projectedEnd:o,expansion:e.text.length!==e.rawEnd-e.rawStart}):r.push({text:e.text,rawStart:e.rawStart,rawEnd:e.rawEnd,projectedStart:s,projectedEnd:o,expansion:e.text.length!==e.rawEnd-e.rawStart}),s=o;}return r}function T(t,r){return r<=t.rawStart?t.projectedStart:r>=t.rawEnd?t.projectedEnd:t.expansion?t.projectedStart:t.projectedStart+r-t.rawStart}function M(t,r){return t.expansion?t.rawStart:t.rawStart+r-t.projectedStart}function V(t,r){return t.expansion?t.rawEnd:t.rawStart+r-t.projectedStart}function g(t){let r=F(t),s="";for(let e of t)s+=e.text;return {text:s,projectedOffset(e){let o=0;for(let a of r){if(e<=a.rawEnd)return T(a,e);o=a.projectedEnd;}return o},rawRange(e,o){if(e<0||e>=o||o>s.length)return null;let a=r.find(d=>e>=d.projectedStart&&e<d.projectedEnd),n=r.find(d=>o>d.projectedStart&&o<=d.projectedEnd);return !a||!n?null:{start:M(a,e),end:V(n,o)}},sliceRaw(e,o){if(e>=o)return "";let a="";for(let n of r){if(n.expansion){e<=n.rawStart&&o>=n.rawEnd&&(a+=n.text);continue}let d=Math.max(e,n.rawStart),u=Math.min(o,n.rawEnd);d<u&&(a+=n.text.slice(d-n.rawStart,u-n.rawStart));}return a},resultRunAddressAt(e){let o=r.find(n=>n.resultRuns!==void 0&&e>=n.projectedStart&&e<n.projectedEnd);if(!o?.resultRuns)return null;let a=e-o.projectedStart;for(let n of o.resultRuns)if(a>=n.start&&a<n.end)return {runId:n.runId,offset:a-n.start};return null},findOccurrences(e,o,a={}){let n=[];if(o<=0||!Ga(e)||s.length===0)return {matches:n,truncated:false};let d=a.matchCase===true,u=a.wholeWord===true,i=d?e:Ea(e),l=d?s:Ea(s),f=Math.min(s.length,a.to??s.length),j=new Set,c=l.indexOf(i,Math.max(0,a.from??0));for(;c>=0;){let p=c+i.length;if(p>f)return {matches:n,truncated:false};if(!u||Fa(s,c,p)){let m=r.find(x=>c>=x.projectedStart&&c<x.projectedEnd),P=r.find(x=>p>x.projectedStart&&p<=x.projectedEnd);if(!m||!P)return {matches:n,truncated:false};let h=m===P&&m.expansion?m:null;if(!h||!j.has(h)){if(n.length>=o)return {matches:n,truncated:true};n.push({start:c,length:i.length,rawStart:M(m,c),rawEnd:V(P,p)}),h&&j.add(h);}}c=l.indexOf(i,p);}return {matches:n,truncated:false}}}}function A(t){return t.length===0?g([]):g([{text:t,rawStart:0,rawEnd:t.length}])}function B(t,r,s="allMarkup"){if(!r.includes(he))return r.length===0?[]:[{text:r,rawStart:0,rawEnd:r.length}];let e=Ce(t),o=bf(t,e),a=c(t,e,s),n=new Map;for(let i of e)n.set(i.node.id,i);let d=[],u=0;for(let i of o){let l=n.get(i.node.id);if(!l)continue;u<i.start&&d.push({text:r.slice(u,i.start),rawStart:u,rawEnd:i.start});let f=a.get(l.node.id);l.kind==="simple"&&f?d.push({text:f.text,rawStart:i.start,rawEnd:i.end,resultRuns:f.runs}):d.push({text:f?.text??he,rawStart:i.start,rawEnd:i.end}),u=i.end;}return u<r.length&&d.push({text:r.slice(u),rawStart:u,rawEnd:r.length}),d}function N(t,r,s="allMarkup"){return r.includes(he)?g(B(t,r,s)):A(r)}export{g as a,A as b,B as c,N as d};
1
+ import {c}from'./chunk-SNN53UPD.js';import {Ga,Ea,Fa}from'./chunk-VE7YBFQD.js';import {ve,Qe,pf}from'./chunk-Z65JJLLF.js';function F(t){let r=[],s=0;for(let e of t){let o=s+e.text.length;e.resultRuns?r.push({text:e.text,rawStart:e.rawStart,rawEnd:e.rawEnd,resultRuns:e.resultRuns,projectedStart:s,projectedEnd:o,expansion:e.text.length!==e.rawEnd-e.rawStart}):r.push({text:e.text,rawStart:e.rawStart,rawEnd:e.rawEnd,projectedStart:s,projectedEnd:o,expansion:e.text.length!==e.rawEnd-e.rawStart}),s=o;}return r}function T(t,r){return r<=t.rawStart?t.projectedStart:r>=t.rawEnd?t.projectedEnd:t.expansion?t.projectedStart:t.projectedStart+r-t.rawStart}function M(t,r){return t.expansion?t.rawStart:t.rawStart+r-t.projectedStart}function V(t,r){return t.expansion?t.rawEnd:t.rawStart+r-t.projectedStart}function g(t){let r=F(t),s="";for(let e of t)s+=e.text;return {text:s,projectedOffset(e){let o=0;for(let a of r){if(e<=a.rawEnd)return T(a,e);o=a.projectedEnd;}return o},rawRange(e,o){if(e<0||e>=o||o>s.length)return null;let a=r.find(d=>e>=d.projectedStart&&e<d.projectedEnd),n=r.find(d=>o>d.projectedStart&&o<=d.projectedEnd);return !a||!n?null:{start:M(a,e),end:V(n,o)}},sliceRaw(e,o){if(e>=o)return "";let a="";for(let n of r){if(n.expansion){e<=n.rawStart&&o>=n.rawEnd&&(a+=n.text);continue}let d=Math.max(e,n.rawStart),u=Math.min(o,n.rawEnd);d<u&&(a+=n.text.slice(d-n.rawStart,u-n.rawStart));}return a},resultRunAddressAt(e){let o=r.find(n=>n.resultRuns!==void 0&&e>=n.projectedStart&&e<n.projectedEnd);if(!o?.resultRuns)return null;let a=e-o.projectedStart;for(let n of o.resultRuns)if(a>=n.start&&a<n.end)return {runId:n.runId,offset:a-n.start};return null},findOccurrences(e,o,a={}){let n=[];if(o<=0||!Ga(e)||s.length===0)return {matches:n,truncated:false};let d=a.matchCase===true,u=a.wholeWord===true,i=d?e:Ea(e),l=d?s:Ea(s),f=Math.min(s.length,a.to??s.length),j=new Set,c=l.indexOf(i,Math.max(0,a.from??0));for(;c>=0;){let p=c+i.length;if(p>f)return {matches:n,truncated:false};if(!u||Fa(s,c,p)){let m=r.find(x=>c>=x.projectedStart&&c<x.projectedEnd),P=r.find(x=>p>x.projectedStart&&p<=x.projectedEnd);if(!m||!P)return {matches:n,truncated:false};let h=m===P&&m.expansion?m:null;if(!h||!j.has(h)){if(n.length>=o)return {matches:n,truncated:true};n.push({start:c,length:i.length,rawStart:M(m,c),rawEnd:V(P,p)}),h&&j.add(h);}}c=l.indexOf(i,p);}return {matches:n,truncated:false}}}}function A(t){return t.length===0?g([]):g([{text:t,rawStart:0,rawEnd:t.length}])}function B(t,r,s="allMarkup"){if(!r.includes(ve))return r.length===0?[]:[{text:r,rawStart:0,rawEnd:r.length}];let e=Qe(t),o=pf(t,e),a=c(t,e,s),n=new Map;for(let i of e)n.set(i.node.id,i);let d=[],u=0;for(let i of o){let l=n.get(i.node.id);if(!l)continue;u<i.start&&d.push({text:r.slice(u,i.start),rawStart:u,rawEnd:i.start});let f=a.get(l.node.id);l.kind==="simple"&&f?d.push({text:f.text,rawStart:i.start,rawEnd:i.end,resultRuns:f.runs}):d.push({text:f?.text??ve,rawStart:i.start,rawEnd:i.end}),u=i.end;}return u<r.length&&d.push({text:r.slice(u),rawStart:u,rawEnd:r.length}),d}function N(t,r,s="allMarkup"){return r.includes(ve)?g(B(t,r,s)):A(r)}export{g as a,A as b,B as c,N as d};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkKJLPVGSX_cjs=require('./chunk-KJLPVGSX.cjs'),chunkLF5LPZOP_cjs=require('./chunk-LF5LPZOP.cjs');function Ue(t,e,o){let n=e.marker?.picture,i=o.urlRegistry;if(!n||n.resource.kind!=="ready"||!i)return null;let r=o.scale,a=i.urlForReady(n.resource.validatedHandle,n.resource.mime);if(a===null)return null;let s=n.box,l=t.createElement("span");l.className="docx-list-marker",l.dataset.docxMarker="",l.setAttribute("contenteditable","false"),l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.left=`${(s.x-e.box.x)*r}px`,l.style.top=`${(s.y-e.box.y)*r}px`,l.style.width=`${s.width*r}px`,l.style.height=`${s.height*r}px`,l.style.display="block",l.style.overflow="hidden";let d=t.createElement("img");return d.className="docx-list-marker-image",d.setAttribute("src",a),d.setAttribute("alt",""),d.setAttribute("draggable","false"),d.style.display="block",d.style.width=`${s.width*r}px`,d.style.height=`${s.height*r}px`,d.style.maxWidth="none",d.style.maxHeight="none",l.append(d),l}function je(t,e,o,n){let i=t.createElement("span");i.dataset.docxNoteRule="single",i.setAttribute("contenteditable","false"),i.setAttribute("aria-hidden","true"),i.style.display="inline-block",i.style.position="relative",i.style.verticalAlign="top",i.style.width=`${e.box.width*n}px`,i.style.height=`${Math.min(e.box.height+(o.leading??0),o.box.height)*n}px`;let r=chunkLF5LPZOP_cjs.me(e,o),a=t.createElement("span");return a.style.position="absolute",a.style.left="0",a.style.top=`${(r.y-o.box.y)*n}px`,a.style.width=`${r.width*n}px`,a.style.height=`${r.height*n}px`,a.style.backgroundColor=e.style.color?`#${e.style.color}`:"#000000",i.append(a),i}function Y(t){return t==="double"||t==="triple"||t==="doubleWave"||t.startsWith("thinThick")||t.startsWith("thickThin")}function I(t,e,o,n,i,r){switch(e){case "dashed":case "dashSmallGap":case "dotDash":case "dotDotDash":case "dashDotStroked":{let a=Math.max(4,4*r);t.style.backgroundColor="transparent",t.style.backgroundImage=`linear-gradient(to ${n?"bottom":"right"}, #${o} 60%, transparent 60%)`,t.style.backgroundSize=n?`100% ${a}px`:`${a}px 100%`;return}case "dotted":{let a=Math.max(3,3*r);t.style.backgroundColor="transparent",t.style.backgroundImage=`linear-gradient(to ${n?"bottom":"right"}, #${o} 35%, transparent 35%)`,t.style.backgroundSize=n?`100% ${a}px`:`${a}px 100%`;return}case "double":case "doubleWave":case "triple":case "thinThickSmallGap":case "thickThinSmallGap":case "thinThickThinSmallGap":case "thinThickMediumGap":case "thickThinMediumGap":case "thinThickThinMediumGap":case "thinThickLargeGap":case "thickThinLargeGap":case "thinThickThinLargeGap":{let a=i/3;t.style.backgroundColor="transparent",t.style.backgroundImage=`linear-gradient(to ${n?"right":"bottom"}, #${o} 0px, #${o} ${a}px, transparent ${a}px, transparent ${a*2}px, #${o} ${a*2}px)`;return}case "threeDEmboss":case "ridge":{t.style.backgroundColor="transparent";let a=n?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px ridge #${o}`,n?t.style.width="0px":t.style.height="0px";return}case "threeDEngrave":case "groove":{t.style.backgroundColor="transparent";let a=n?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px groove #${o}`,n?t.style.width="0px":t.style.height="0px";return}case "inset":{t.style.backgroundColor="transparent";let a=n?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px inset #${o}`,n?t.style.width="0px":t.style.height="0px";return}case "outset":{t.style.backgroundColor="transparent";let a=n?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px outset #${o}`,n?t.style.width="0px":t.style.height="0px";return}default:return}}var io=/^[0-9A-Fa-f]{6}$/;function Ge(t,e,o,n){for(let{box:i,edge:r,side:a}of chunkLF5LPZOP_cjs.Ub(o)){let s=r.color&&io.test(r.color)?r.color:"000000",l=t.createElement("span");l.className=`docx-run-border docx-run-border-${a}`,l.dataset.docxMarker="",l.setAttribute("aria-hidden","true"),l.setAttribute("contenteditable","false"),Object.assign(l.style,{position:"absolute",pointerEvents:"none",left:`${(i.x-o.contentX)*n}px`,top:`${(i.y-o.box.y)*n}px`,width:`${i.width*n}px`,height:`${i.height*n}px`,backgroundColor:`#${s}`});let d=a==="left"||a==="right";I(l,r.val,s,d,(d?i.width:i.height)*n,n),e.append(l);}}function We(t,e){let o=e.fieldAtom?.formControl;if(o?.kind!=="dropdown"||o.entries.length===0)return;let n=t.ownerDocument.createElement("select");n.dataset.docxFormDropdown="",n.dataset.docxMarker="",n.setAttribute("aria-label",o.accessibleName??e.text);for(let[i,r]of o.entries.entries()){let a=t.ownerDocument.createElement("option");a.value=String(i),a.textContent=r,n.append(a);}n.selectedIndex=o.selectedIndex,Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",opacity:"0",cursor:"pointer",font:"inherit",padding:"0",border:"0"}),t.style.position="relative",t.append(n);}function Ve(t,e,o){let n=e.fieldAtom?.formControl;if(n?.kind!=="checkbox")return;t.dataset.docxFormCheckbox="",t.dataset.checked=String(n.checked),t.setAttribute("role","checkbox"),t.tabIndex=0,t.setAttribute("aria-checked",String(n.checked)),n.accessibleName&&t.setAttribute("aria-label",n.accessibleName),t.style.width=`${e.box.width*o}px`;let i=t.ownerDocument.createElement("span");i.className="docx-form-checkbox-hit",i.dataset.docxMarker="",i.setAttribute("aria-hidden","true"),t.append(i);}var $=8,Ye={color:"painted",background:"painted",activeBackground:"painted",spanClassName:"painted",avatarUrl:"card-only"},Ze=Object.keys(Ye),ao=Ze.filter(t=>Ye[t]==="painted"),so=new Set(["http","https","data","blob"]),lo=/^([a-zA-Z][a-zA-Z0-9+.-]*):/;function co(t){let e=t.replace(/[\u0000-\u0020\u007f]/g,"");if(e.length===0)return;let o=lo.exec(e);if(o)return !so.has(o[1].toLowerCase())||/^data:/i.test(e)&&!/^data:image\/(?!svg)/i.test(e)?void 0:e;let n=i=>e[i]==="/"||e[i]==="\\";return n(0)&&n(1)?void 0:e}function uo(t){if(typeof t=="string")return t.length>0?{color:t}:null;if(t===null||typeof t!="object")return null;let e={},o=Object.prototype.hasOwnProperty;for(let n of Ze){if(!o.call(t,n))continue;let i=t[n];if(!(typeof i!="string"||i.length===0)){if(n==="avatarUrl"){let r=co(i);r!==void 0&&(e.avatarUrl=r);continue}e[n]=i;}}return Object.keys(e).length>0?e:null}function J(t){return `var(--doc-review-author-${t%$})`}function Je(t){let e=new Map;if(t===void 0||t==="kind"||t==="author")return e;for(let[o,n]of Object.entries(t.authors)){let i=uo(n);i&&e.set(o,i);}return e}function jn(t,e){let o=Je(e);return [...t].map(([n,i])=>{let r=o.get(n);return {author:n,slot:i,color:r?.color??J(i),...r?{style:r}:{}}})}var yo=128;function Z(t,e,o=yo){let n=e.length<o?e.length:o,i=t;for(let r=0;r<n;r+=1)i=Math.imul(i^e.charCodeAt(r),16777619);return Math.imul(i^e.length,16777619)}function po(t,e,o){let n=Z(2166136261,o);for(let i of t.keys())n=Z(n,i);for(let[i,r]of e){n=Z(n,i);for(let a of ao)n=Z(n,r[a]??"",1/0);}return `${t.size}.${e.size}.${(n>>>0).toString(36)}`}function Qe(t){return t===null?"kind":t.key}var le=new WeakMap;function et(t,e,o){if(t==="kind")return null;let n=le.get(e);if(n&&n.option===t&&n.authorSlots===o)return n.context;let i=Je(t),r=t===void 0||t==="author"?"author":t.others??"author";if(i.size===0&&r==="kind")return le.set(e,{option:t,authorSlots:o,context:null}),null;let a=o??fo(e),s=new Map;for(let[d,c]of i){if(!c.spanClassName)continue;let u=c.spanClassName.split(/\s+/).filter(h=>h.length>0);u.length>0&&s.set(d,u);}let l={authorSlots:a,styles:i,classTokens:s,others:r,key:po(a,i,r)};return le.set(e,{option:t,authorSlots:o,context:l}),l}var Xe=new WeakMap;function ho(t){let e=Xe.get(t);if(e)return e;let o=[],n=new Set,i=r=>{r===""||n.has(r)||(n.add(r),o.push(r));};for(let r of chunkLF5LPZOP_cjs.va(t)){for(let s of r.lines)for(let l of s.spans){let d=l.revisions;if(d!==void 0)for(let c=0;c<d.length;c+=1)i(d[c].author);for(let c of l.props){if(c.localName!=="rPrChange"&&c.localName!=="pPrChange")continue;let u=c.attributes?.author;i(u??"");break}}for(let s of r.lines){let l=s.drawings;if(l!==void 0)for(let d=0;d<l.length;d+=1){let c=l[d].revisions;if(c!==void 0)for(let u=0;u<c.length;u+=1)i(c[u].author);}}let a=r.markRevisions;if(a)for(let s=0;s<a.length;s+=1)i(a[s].author);}return Xe.set(t,o),o}var qe=new WeakMap;function fo(t){let e=qe.get(t);if(e)return e;let o=new Map,n=i=>{for(let r of ho(i))o.has(r)||o.set(r,o.size);};for(let i of t.pages){n(i.fragments),i.header&&n(i.header.fragments),i.footer&&n(i.footer.fragments);for(let r of [i.footnotes,i.endnotes])if(r){r.separator&&n(r.separator.fragments),r.continuationNotice&&n(r.continuationNotice.fragments);for(let a of r.notes)n(a.fragments);}for(let r of [i.anchoredDrawings,i.header?.anchoredDrawings,i.footer?.anchoredDrawings])if(r)for(let a of r){if(a.accessibility.hidden)continue;let s=a.revisions;if(s!==void 0)for(let l=0;l<s.length;l+=1){let d=s[l].author;d!==""&&!o.has(d)&&o.set(d,o.size);}a.textboxStory&&n(a.textboxStory.fragments);}}return qe.set(t,o),o}function go(t,e){let o=null;for(let n of e)n===""||t.has(n)||(o===null&&(o=new Map(t)),o.has(n)||o.set(n,o.size));return o??t}function Gn(){let t=new Map,e=0;return {resolve(o,n){let i=go(o,n);for(let r of i.keys())t.has(r)||(t.set(r,e),e+=1);return new Map([...i.keys()].map(r=>[r,t.get(r)]).sort((r,a)=>r[1]-a[1]))}}}function F(t,e,o){if(t===void 0||t.length===0)return null;let n=t[t.length-1],i=t.some(s=>s.kind==="delete"||s.kind==="moveFrom"),r=n.kind,a=r==="delete"||r==="moveFrom"?"line-through":r==="insert"||r==="moveTo"?"underline":null;return {attribution:n,line:i&&a==="underline"?"line-through":a,decorationStyle:r==="moveFrom"||r==="moveTo"?"double":"solid",color:i?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",authorColor:o?.get(n.author)?.color??J(e?.get(n.author)??0),deleted:i}}function de(t,e=false){let o=t.spans.find(i=>i.style.shaping)?.style.shaping?.baseLevel,n=o===void 0?e:o===1;return t.spans.length?{x:n?t.spans.reduce((i,r)=>Math.min(i,r.box.x),1/0):t.spans.reduce((i,r)=>Math.max(i,r.box.x+r.box.width),-1/0),rtl:n}:{x:t.contentX,rtl:n}}function ce(t,e,o,n){t.style.left=`${(e.x-o)*n}px`,t.style.marginLeft=`${(e.rtl?-2:2)*n}px`,e.rtl&&(t.style.transform="translateX(-100%)");}function tt(t,e,o,n,i=false){let r=t.createElement("span"),a=e.spans[e.spans.length-1];r.className="docx-line-break-mark",r.dataset.docxMarker="",r.setAttribute("aria-hidden","true"),r.contentEditable="false",r.textContent="\u21B5",r.style.position="absolute",r.style.pointerEvents="none",r.style.userSelect="none",ce(r,de(e,i),e.contentX,o),r.style.top=`${e.leading*o}px`,r.style.fontSize=`${(a?.style.fontSizePt??e.box.height)*o}px`,r.style.lineHeight=`${Math.max(0,e.box.height-e.leading-(e.trailingSpacing??0))*o}px`,r.style.color="var(--doc-revision-format)";let s=F(a?.revisions,n?.authorSlots,n?.styles);if(s){let{attribution:l}=s,d=n?.styles.get(l.author),c=n&&(d?.color!==void 0||n.others==="author");if(r.style.color=c?s.authorColor:s.color,r.dataset.revisionKind=l.kind,r.dataset.revisionId=l.id,r.dataset.reviewAuthor=l.author,n){r.dataset.reviewAuthorSlot=String((n.authorSlots.get(l.author)??0)%$);for(let u of n.classTokens.get(l.author)??[])r.classList.add(u);}s.line&&(r.style.textDecorationLine=s.line,r.style.textDecorationStyle=s.decorationStyle,r.style.textDecorationColor=r.style.color);}return r}function ot(t,e,o,n){let i=chunkLF5LPZOP_cjs.Ya(e);if(!i){let d=t.createElement("span");return d.className="docx-paragraph-mark",d.setAttribute("aria-hidden","true"),d.contentEditable="false",d.textContent="\xB6",d.style.position="absolute",d.style.pointerEvents="none",d.style.marginLeft=`${2*o}px`,d.style.color="var(--doc-revision-format)",d}let r=t.createElement("span");r.className=`docx-paragraph-mark docx-revision-pmark docx-revision-pmark-${i.kind}`,r.setAttribute("aria-hidden","true"),r.contentEditable="false",r.dataset.revisionKind=i.kind,r.dataset.revisionId=i.id,i.author!==""&&(r.dataset.reviewAuthor=i.author),r.dataset.revisionIds=e.map(d=>d.id).join(" "),r.dataset.revisionKinds=e.map(d=>d.kind).join(" "),r.textContent="\xB6",r.style.position="absolute",r.style.pointerEvents="none",r.style.marginLeft=`${2*o}px`;let a=chunkLF5LPZOP_cjs.Za(i),s=n?.styles.get(i.author),l=n?(n.authorSlots.get(i.author)??0)%$:0;if(n){r.dataset.reviewAuthorSlot=String(l);let d=n.classTokens.get(i.author);if(d)for(let c=0;c<d.length;c+=1)r.classList.add(d[c]);}return r.style.color=s?.color??(n?.others==="author"?J(l):a?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)"),a&&(r.style.textDecorationLine="line-through"),r}function ue(t,e,o=false){let n=o?null:chunkLF5LPZOP_cjs.$a(e.props.filter(r=>r.localName==="pPrChange")),i=n??e.markFormatRevision;i&&(mo(t,i,n?"pPrChange":"rPrChange"),t.dataset.paragraphId=e.paragraphId,t.dataset.reviewStart=String(e.range.start),t.dataset.reviewEnd=String(e.range.end));}function mo(t,e,o){t.dataset.revisionKind="format",t.dataset.revisionId=e.id,t.dataset.formattingKind=o,e.author&&(t.dataset.reviewAuthor=e.author),e.date!==void 0&&(t.dataset.revisionDate=e.date);}function nt(t,e,o,n,i,r){for(let a of [o.footnotes,o.endnotes])a&&e.append(xo(t,o,a,n,i,r));}function xo(t,e,o,n,i,r){let a=t.createElement("div");a.className="docx-notes",a.dataset.docxNotes=o.kind,a.dataset.docxNotesPlacement=o.placement,a.style.position="absolute",a.style.left=`${(o.box.x-e.box.x)*n.scale}px`,a.style.top=`${(o.box.y-e.box.y)*n.scale}px`,a.style.width=`${o.box.width*n.scale}px`,a.style.height=`${o.box.height*n.scale}px`;for(let s of [o.separator,o.continuationNotice]){if(!s)continue;let l=t.createElement("div");l.className="docx-note-separator",l.dataset.docxNoteSeparator=s.kind,l.setAttribute("contenteditable","false"),l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.left=`${(s.box.x-o.box.x)*n.scale}px`,l.style.top=`${(s.box.y-o.box.y)*n.scale}px`,l.style.width=`${s.box.width*n.scale}px`,l.style.height=`${s.box.height*n.scale}px`;let d=s.ruleStyle;if(d||s.synthetic)bo(l,t,d??"single",n.scale,s.box.height,s.ruleColor);else {let c={...n,tabLeaderOriginXPt:s.box.x-e.box.x};for(let u of s.fragments)l.append(u.kind==="table"?r(t,u,c):i(t,u,c));}a.append(l);}for(let s of o.notes){let l={...n,tabLeaderOriginXPt:s.box.x-e.box.x},d=t.createElement("div");d.className="docx-note",d.dataset.docxNote=s.noteKind,d.dataset.docxNoteId=String(s.noteId),d.dataset.docxNoteScope=s.scopeId,s.mark!==null&&(d.dataset.docxNoteMark=s.mark),s.continuation&&(d.dataset.docxNoteContinuation=""),d.setAttribute("role","doc-footnote"),d.style.position="absolute",d.style.left=`${(s.box.x-o.box.x)*n.scale}px`,d.style.top=`${(s.box.y-o.box.y)*n.scale}px`,d.style.width=`${s.box.width*n.scale}px`,d.style.height=`${s.box.height*n.scale}px`;for(let c of s.fragments)d.append(c.kind==="table"?r(t,c,l):i(t,c,l));a.append(d);}return a}function bo(t,e,o,n,i,r){t.dataset.docxNoteRule=o;let a=r&&/^[a-f\d]{6}$/i.test(r)?`#${r}`:"#000000";t.style.color=a;let s=Math.max(1,n*.75);if(o==="single"){t.style.backgroundColor=a,t.style.height=`${i*n}px`;return}t.style.opacity="0.85";let l=Math.max(1,n*1.25);for(let d of [0,s+l]){let c=e.createElement("div");c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.left="0",c.style.right="0",c.style.top=`${d}px`,c.style.height="0",c.style.borderTop=`${s}px solid currentColor`,t.append(c);}}var vo=new Set(["dropdown","comboBox","date","checkbox","picture","buildingBlockGallery"]);function rt(t,e,o,n){let i=n.contentControlChrome,r=i?.suppressedIds,a=(o.contentControls??[]).filter(h=>r?.has(h.id)!==true),s=[...a,...(i?.additionalBoundaries??[]).filter(h=>r?.has(h.id)!==true&&!a.some(p=>p.id===h.id))];if(s.length===0)return;let l=i?.showAll===true,d=i?.activeIds,c=i?.hoverIds,u=i?.tocControlIds;for(let h of s){let p=u?.has(h.id)===true,y=!p&&d?.has(h.id)===true,x=c?.has(h.id)===true;e.append(Ro(t,o,h,n.scale,y,x,l||y||p&&x,i?.checkedIds?.has(h.id),p,i?.readOnly===true));}}function So(t,e,o,n){let i=t.contentBox.x-t.box.x,r=t.contentBox.y-t.box.y;if(o==="checkbox"){let h=Math.max(1,Math.min(e.height,16))*n,p=e.width>0?(i+e.x+e.width/2)*n-h/2:(i+e.x)*n,y=(r+e.y)*n+Math.max(0,(e.height*n-h)/2);return {left:p,top:y,size:h}}let a=16*n,s=(i+e.x+e.width)*n,l=t.box.width*n,d=s+2*n,c=d+a<=l?d:Math.max(0,s-a),u=(r+e.y)*n+Math.max(0,(e.height*n-a)/2);return {left:c,top:u,size:a}}function Ro(t,e,o,n,i,r,a,s,l,d){let c=t.createElement("div");c.className="docx-content-control-chrome",c.dataset.docxContentControl=o.id,c.dataset.docxMarker="",c.dataset.controlType=o.controlType,c.dataset.lock=o.effectiveLock,o.bound&&(c.dataset.bound=""),o.placeholder&&(c.dataset.placeholder=""),l&&(c.dataset.docxToc=""),d&&(c.dataset.readOnly=""),i&&(c.dataset.active=""),r&&(c.dataset.hover=""),a&&(c.dataset.boundaryVisible=""),c.setAttribute("contenteditable","false"),c.setAttribute("role","group"),o.alias&&(c.dataset.alias=o.alias),o.tag&&(c.dataset.tag=o.tag),o.alias&&c.setAttribute("aria-label",o.alias),c.style.position="absolute",c.style.inset="0",c.style.pointerEvents="none",c.style.zIndex="2";let u=e.contentBox.x-e.box.x,h=e.contentBox.y-e.box.y;for(let y of o.fragments){if(y.pageIndex!==e.index)continue;let x=t.createElement("div");x.className="docx-content-control-boundary",x.dataset.docxMarker="",x.setAttribute("contenteditable","false"),x.setAttribute("aria-hidden","true"),x.style.position="absolute",x.style.left=`${(u+y.box.x)*n}px`,x.style.top=`${(h+y.box.y)*n}px`,x.style.width=`${Math.max(y.box.width,1)*n}px`,x.style.height=`${Math.max(y.box.height,1)*n}px`,x.style.pointerEvents="none",c.append(x);}let p=o.fragments.find(y=>y.pageIndex===e.index);if(p&&o.alias){let y=t.createElement("div");y.className="docx-content-control-label",y.dataset.docxMarker="",y.setAttribute("contenteditable","false"),y.setAttribute("aria-hidden","true"),y.textContent=o.alias,y.style.position="absolute",y.style.left=`${(u+p.box.x)*n}px`,y.style.top=`${Math.max(0,(h+p.box.y)*n-16)}px`,y.style.pointerEvents="none",c.append(y);}if(p&&vo.has(o.controlType)){let y=t.createElement("button");y.type="button",y.className="docx-content-control-widget",y.dataset.docxMarker="",y.dataset.docxCcWidget=o.controlType,y.dataset.docxCcId=o.id,y.setAttribute("contenteditable","false"),y.setAttribute("tabindex","-1"),o.controlType==="checkbox"?y.setAttribute("role","checkbox"):o.controlType==="dropdown"||o.controlType==="comboBox"||o.controlType==="buildingBlockGallery"?y.setAttribute("role","listbox"):(o.controlType==="date"||o.controlType==="picture")&&y.setAttribute("role","button"),o.alias&&(y.dataset.name=o.alias),o.alias&&y.setAttribute("aria-label",o.alias),o.controlType==="checkbox"&&(y.setAttribute("data-checked",s?"true":"false"),y.setAttribute("aria-checked",s?"true":"false"));let x=o.effectiveLock==="contentLocked"||o.effectiveLock==="sdtContentLocked";(d||x||o.bound)&&(y.disabled=true,y.dataset.disabledReason=d?"readOnly":o.bound?"bound":"locked",y.setAttribute("aria-disabled","true"));let m=So(e,p.box,o.controlType,n);y.style.position="absolute",y.style.left=`${m.left}px`,y.style.top=`${m.top}px`,y.style.width=`${m.size}px`,y.style.height=`${m.size}px`,y.style.fontSize=`${m.size}px`,y.style.pointerEvents="auto",y.style.padding="0",y.style.margin="0",y.style.cursor=y.disabled?"not-allowed":"pointer",c.append(y);}return c}var at="docx-change-bars",Q="docx-change-bar",wo=.5;function st(t,e){for(let o of e)switch(o.kind){case "insert":case "moveTo":t.insertion=true;break;case "delete":case "moveFrom":t.deletion=true;break;case "format":t.format=true;break}}function lt(t,e,o){let n=t.lines,i=n.length-1,r=[];for(let a=0;a<=i;a+=1){let s=n[a];if(r.length=0,e.mode==="simple-markup"){s.changeSites&&r.push(...s.changeSites),a===i&&t.markChangeSites&&r.push(...t.markChangeSites),r.length>0&&it(t,n,a,e,r,o);continue}for(let l of s.spans){l.revisions&&r.push(...l.revisions);let d=chunkLF5LPZOP_cjs.$a(l.props);d&&r.push(d);}for(let l of s.drawings??[])l.revisions&&r.push(...l.revisions);if(s.anchorRevisions&&r.push(...s.anchorRevisions),a===i){t.markRevisions&&r.push(...t.markRevisions),t.markFormatRevision&&r.push(t.markFormatRevision);let l=chunkLF5LPZOP_cjs.$a(t.props);l&&r.push(l);}r.length!==0&&it(t,n,a,e,r,o);}}function it(t,e,o,n,i,r){let a=e[o],s=e.length-1,l=(o===0?t.box.y:a.box.y)+n.dy,d=Math.min((o===s?t.box.y+t.box.height:e[o+1].box.y)+n.dy,n.limit);if(d<=l)return;let c={top:l,bottom:d,story:n.story,insertion:false,deletion:false,format:false};st(c,i),r.push(c);}function ko(t,e,o){for(let n of t.rows){let i=e.mode==="simple-markup"?n.changeSites:void 0;if(e.mode==="all-markup"&&n.revisionKind||i&&i.length>0){let r=chunkLF5LPZOP_cjs.Ud(n)?Math.max(n.box.y,...n.cells.map(s=>s.box.y+s.box.height)):n.box.y+n.box.height,a={top:n.box.y+e.dy,bottom:Math.min(r+e.dy,e.limit),story:e.story,insertion:n.revisionKind==="insert",deletion:n.revisionKind==="delete",format:false};i&&st(a,i),o.push(a);}for(let r of n.cells){if(r.textDirection==="btLr"){let a=[];if(ye(r.blocks,e,a),a.length===0)continue;let s={top:r.box.y+e.dy,bottom:Math.min(r.box.y+r.box.height+e.dy,e.limit),story:e.story,insertion:false,deletion:false,format:false};for(let l of a)s.insertion||=l.insertion,s.deletion||=l.deletion,s.format||=l.format;s.bottom>s.top&&o.push(s);continue}ye(r.blocks,e,o);}}}function ye(t,e,o){for(let n of t)n.kind==="table"?ko(n,e,o):lt(n,e,o);}function Po(t){t.sort((o,n)=>o.top-n.top||o.bottom-n.bottom);let e=[];for(let o of t){let n=e[e.length-1];if(n&&n.story===o.story&&o.top<=n.bottom+wo){n.bottom=Math.max(n.bottom,o.bottom),n.insertion||=o.insertion,n.deletion||=o.deletion,n.format||=o.format;continue}e.push({...o});}return e}function dt(t,e,o,n=false){let i=[];if(o==="none")return {mode:o,toggle:n,left:0,runs:i,signature:"none"};let r=t.box.height,a=t.contentBox.y-t.box.y+t.contentBox.height,s={x:t.box.x,y:t.box.y};chunkLF5LPZOP_cjs.ya(t,u=>{if(u.story==="note-separator")return;let h={mode:o,story:u.story,dy:u.origin.y-t.box.y,limit:u.story==="body"?a:r};ye(u.host.fragments,h,i);let p=u.story==="header"||u.story==="footer"?y=>chunkLF5LPZOP_cjs.ta(y,u.origin,s):void 0;chunkLF5LPZOP_cjs.Ca(u.host,(y,x)=>{x.textboxDepth!==0&&lt(y,{mode:o,story:u.story,dy:x.storyOrigin.y-t.box.y,limit:r},i);},u.origin,p);});let l=Math.round(Math.max(0,(t.contentBox.x-t.box.x)/2)*e),d=Po(i),c=`${o}|${n?"t":""}|${l}`;for(let u of d)c+=`|${u.story}:${u.top.toFixed(3)}-${u.bottom.toFixed(3)}${u.insertion?"i":""}${u.deletion?"d":""}${u.format?"f":""}`;return {mode:o,toggle:n,left:l,runs:d,signature:c}}function ct(t,e,o){if(e.runs.length===0)return null;let n=e.mode==="simple-markup",i=t.createElement("div");i.className=at,i.dataset.docxChangeBars=e.signature,i.dataset.docxChangeBarsMode=e.mode,i.setAttribute("aria-hidden","true"),i.setAttribute("contenteditable","false"),i.style.position="absolute",i.style.inset="0",i.style.pointerEvents="none";for(let r of e.runs){let a=t.createElement("div");a.className=Q,r.insertion&&a.classList.add(`${Q}-insertion`),r.deletion&&a.classList.add(`${Q}-deletion`),r.format&&a.classList.add(`${Q}-format`),a.dataset.docxStory=r.story,a.style.position="absolute",a.style.left=`${e.left}px`,a.style.top=`${r.top*o}px`,a.style.height=`${(r.bottom-r.top)*o}px`,a.style.width=n?"var(--doc-review-change-bar-simple-width)":"var(--doc-review-change-bar-width)",a.style.backgroundColor=n?"var(--doc-review-change-bar-simple)":"var(--doc-review-change-bar)",e.toggle?(a.dataset.docxChangeBarToggle="",a.style.pointerEvents="auto",a.style.cursor="pointer"):a.style.pointerEvents="none",i.append(a);}return i}function ut(t,e,o,n,i=false){return ct(t,dt(e,o,n,i),o)}function yt(t,e,o,n,i,r=false){let a=e.querySelector(`:scope > .${at}`),s=dt(o,n,i,r);if(a&&a.dataset.docxChangeBars===s.signature)return;a?.remove();let l=ct(t,s,n);l&&e.append(l);}function ee(t,e,o){return !!o.activeHeaderFooterRId&&!!t.rId&&o.activeHeaderFooterRId===t.rId&&(o.activeHeaderFooterPageIndex===void 0||o.activeHeaderFooterPageIndex===e)}function pe(t,e,o){return o?t.kind==="footer"?Math.max(t.box.height,e.box.y+e.box.height-t.box.y):Math.max(t.box.height,e.contentBox.y-t.box.y):t.box.height}function Ao(t,e){let{box:o}=e,n=t.contentBox,i=e.kind==="header"?o.y:Math.max(o.y,n.y+n.height),r=e.kind==="header"?Math.min(o.y+o.height,n.y):o.y+o.height;return r>i?{x:o.x,y:i,width:o.width,height:r-i}:null}function Eo(t,e){let o=e.box,n=t.contentBox;return o.x<n.x+n.width&&n.x<o.x+o.width&&o.y<n.y+n.height&&n.y<o.y+o.height}function pt(t,e,o,n,i,r){let a=i.box;if(Eo(n,i)){o.dataset.docxHfOverBody="";let l=Ao(n,i);if(!l)return;let d=t.createElement("div");d.className="docx-hf-hover",d.dataset.docxHfHover=i.kind,d.setAttribute("contenteditable","false"),d.style.position="absolute",d.style.left=`${(l.x-n.box.x)*r}px`,d.style.top=`${(l.y-n.box.y)*r}px`,d.style.width=`${l.width*r}px`,d.style.height=`${l.height*r}px`,o.before(d),a=l;}let s=t.createElement("div");s.className="docx-hf-edit-hint",s.dataset.docxHfHint=i.kind,s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.left=`${(a.x-n.box.x)*r}px`,s.style.width=`${a.width*r}px`,s.style.top=i.kind==="header"?`${(a.y+a.height-n.box.y)*r}px`:`${(a.y-n.box.y)*r}px`,i.kind==="footer"&&(s.style.transform="translateY(-100%)"),e.append(s);}function ht(t,e){for(let{record:o,element:n,materialized:i}of t){if(!i)continue;let r=n.querySelector(":scope > .docx-page-content");r&&(e.activeHeaderFooterRId?r.setAttribute("contenteditable","false"):r.removeAttribute("contenteditable")),delete n.dataset.docxHfActiveKind;for(let a of n.querySelectorAll(":scope > .docx-hf:not(.docx-hf--placeholder)")){let s=Lo(o,a);if(!s)continue;let l=ee(s,o.index,e);l&&(n.dataset.docxHfActiveKind=s.kind),$o(a,o,s,l,e.scale);}for(let a of n.querySelectorAll(":scope > [data-docx-hf-front]")){let s=ft(o,a.dataset.docxHfFront);gt(a,!!s&&ee(s,o.index,e));}}}function Lo(t,e){return ft(t,e.dataset.docxHf)}function ft(t,e){if(e==="header")return t.header;if(e==="footer")return t.footer}function $o(t,e,o,n,i){n?(t.dataset.docxHfActive="",t.setAttribute("contenteditable","true")):(delete t.dataset.docxHfActive,t.setAttribute("contenteditable","false")),t.style.height=`${pe(o,e,n)*i}px`,gt(t,n);}function gt(t,e){let o=t.querySelectorAll(t instanceof Element&&t.classList.contains("docx-drawing-layer")?":scope > *":":scope > .docx-drawing-layer > *");for(let n of o){n.style.pointerEvents=e?"auto":"none";for(let i of n.querySelectorAll(".docx-drawing"))i.style.pointerEvents=e?"auto":"none";}}var Mo=0;function mt(t,e,o,n){if(n===void 0||!Number.isFinite(n)||n<0||n>1)return;let i="http://www.w3.org/2000/svg",r=(u,h)=>{let p=t.createElementNS(i,u);for(let[y,x]of Object.entries(h))p.setAttribute(y,x);return p},a=`docx-bilevel-${++Mo}`,s=r("svg",{width:"0",height:"0","aria-hidden":"true"});s.style.position="absolute",s.style.pointerEvents="none";let l=r("filter",{id:a,"color-interpolation-filters":"sRGB"});l.append(r("feColorMatrix",{type:"saturate",values:"0"}));let d=r("feComponentTransfer",{}),c=Array.from({length:256},(u,h)=>h/255>=n?1:0).join(" ");for(let u of ["R","G","B"])d.append(r(`feFunc${u}`,{type:"discrete",tableValues:c}));l.append(d),s.append(l),e.append(s),o.style.filter=`${o.style.filter} url(#${a})`.trim();}function xt(t){return Math.max(-1,Math.min(1,t))}function To(t,e){if(!Number.isFinite(t)||!Number.isFinite(e))return null;let o=xt(t/100),n=xt(e/100);if(o===0&&n===0)return null;let i=n>=0?Math.min(1e3,1/(1-n)):Math.max(0,1+n),r=.5-o/2,a=r+o-i*r;return Object.freeze({slope:i,intercept:a})}function te(t){if(!Number.isFinite(t))return "0";let e=Math.round(t*1e6)/1e6;return String(Object.is(e,-0)?0:e)}function Co(t){let{slope:e,intercept:o}=t;if(o>=0){let i=e+2*o;return i<=0?"brightness(0)":`contrast(${te(e/i)}) brightness(${te(i)})`}let n=1-2*o;return `brightness(${te(e/n)}) contrast(${te(n)})`}function he(t){let e=[];t.grayscale&&e.push("grayscale(1)");let o=To(t.brightness,t.contrast);o&&e.push(Co(o));let{opacity:n}=t;return n!==void 0&&Number.isFinite(n)&&n>=0&&n<1&&e.push(`opacity(${Math.round(n*1e3)/1e3})`),e.length>0?e.join(" "):void 0}var bt="http://www.w3.org/2000/svg",Do=0;function vt(t,e){let{cx:o,cy:n}=t.extentEmu;if(o>0&&n>0)return {viewBox:[0,0,o,n],frame:e};let i=1;for(let a of t.components)i=Math.max(i,a.strokeWidthEmu);if(o<=0){let a=n>0?e.height/n:0;return {viewBox:[-i,0,2*i,Math.max(1,n)],frame:{...e,x:e.x-i*a,width:2*i*a}}}let r=e.width/o;return {viewBox:[0,-i,o,2*i],frame:{...e,y:e.y-i*r,height:2*i*r}}}function St(t,e,o,n,i){let r=`docx-inset-${++Do}`,a=t.createElementNS(bt,"clipPath");a.setAttribute("id",r);let s=t.createElementNS(bt,"path");s.setAttribute("d",n),s.setAttribute("clip-rule","evenodd"),a.append(s),e.append(a),o.setAttribute("stroke-width",String(2*Math.max(1,i))),o.setAttribute("clip-path",`url(#${r})`);}var fe="http://www.w3.org/2000/svg";function T(t){return Number.isFinite(t)?String(t):"0"}function ge(t,e,o,n,i){if(n===o)return;let r=a=>`${T(-a*i)}px`;t.style.overflow="visible",t.style.clipPath=`inset(${r(o.y-n.y)} ${r(n.x+n.width-(o.x+o.width))} ${r(n.y+n.height-(o.y+o.height))} ${r(o.x-n.x)})`,e.style.pointerEvents="none";}function me(t,e,o){let n=e.vectorShape,i=e.geometry.contentBounds,r=e.paintBounds,a=t.createElement("div");a.className="docx-drawing-image-frame",a.style.position="absolute";let s=vt(n,i);a.style.left=`${(s.frame.x-r.x)*o}px`,a.style.top=`${(s.frame.y-r.y)*o}px`,a.style.width=`${s.frame.width*o}px`,a.style.height=`${s.frame.height*o}px`;let l=t.createElementNS(fe,"svg");l.setAttribute("viewBox",s.viewBox.map(T).join(" ")),l.setAttribute("preserveAspectRatio","none"),l.setAttribute("width","100%"),l.setAttribute("height","100%"),l.style.display="block",l.style.overflow="visible";for(let d of n.components){let c=t.createElementNS(fe,"path"),u=d.subpathsEmu.map((h,p)=>`M${h.map(y=>`${T(y.x)} ${T(y.y)}`).join("L")}${d.subpathsClosed?.[p]===false?"":"Z"}`).join("");if(c.setAttribute("d",u),c.setAttribute("fill",d.fillHex!==null?`#${d.fillHex}`:"none"),c.setAttribute("fill-rule","evenodd"),d.fillAlpha<1&&c.setAttribute("fill-opacity",T(Math.max(0,d.fillAlpha))),d.strokeHex!==null&&(c.setAttribute("stroke",`#${d.strokeHex}`),c.setAttribute("stroke-width",T(Math.max(1,d.strokeWidthEmu))),d.strokeInset&&St(t,l,c,u,chunkLF5LPZOP_cjs.cb(d.strokeWidthEmu)),d.strokeAlpha<1&&c.setAttribute("stroke-opacity",T(Math.max(0,d.strokeAlpha)))),l.append(c),d.strokeHex!==null)for(let h of d.arrowheadsEmu??[]){let p=t.createElementNS(fe,"path");p.setAttribute("d",`M${h.map(y=>`${T(y.x)} ${T(y.y)}`).join("L")}Z`),p.setAttribute("fill",`#${d.strokeHex}`),p.setAttribute("fill-opacity",T(Math.max(0,Math.min(1,d.strokeAlpha)))),p.setAttribute("data-docx-line-end","triangle"),l.append(p);}}return a.append(l),a}var Ho=new Map([["image/svg+xml","SVG"],["image/tiff","TIFF"],["image/x-emf","EMF"],["image/x-wmf","WMF"]]),Bo="Unknown",ne=new WeakMap,oe=new WeakMap,Io=256;function kt(t,e){let o=ne.get(t);if(o)return o;let n=new Map,i=new Map;return o=Object.freeze({urlForReady(r,a){let s=n.get(r.resourceKey);if(s)return s;let l;try{l=e.create(r,a);}catch(d){if(d instanceof Error&&d.message.startsWith("PaintImageUrlSource:"))return null;throw d}return n.set(r.resourceKey,l),l},imageFor(r,a,s){let l=i.get(r);if(l&&l.resourceKey===a)return l.element;let d=s.createElement("img");return i.size<Io&&i.set(r,{element:d,resourceKey:a,...l?.readyElement?{readyElement:l.readyElement}:{}}),d},imageForPending(r){return i.get(r)?.element??null},readyElementFor(r){return i.get(r)?.readyElement??null},rememberReadyElement(r,a){let s=i.get(r);s&&i.set(r,{...s,readyElement:a});},reconcile(r,a){for(let[s,l]of n)r.has(s)||(e.revoke(l),n.delete(s));for(let[s,l]of i)a.has(s)||(l.element.removeAttribute("src"),i.delete(s));},revokeAll(){for(let r of n.values())e.revoke(r);n.clear();for(let r of i.values())r.element.removeAttribute("src");i.clear();}}),ne.set(t,o),o}function xe(t,e){return `${e.paintInstance??""}|${t.drawingNodeId}`}function vr(t){ne.get(t)?.revokeAll(),ne.delete(t);}function N(t){return Number.isFinite(t)?String(t):"0"}function Pt(t,e){if(t.length<3||e.width<=0||e.height<=0)return null;let o=[];for(let n of t){if(!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;let i=(n.x-e.x)/e.width*100,r=(n.y-e.y)/e.height*100;o.push(`${N(i)}% ${N(r)}%`);}return `polygon(${o.join(", ")})`}function At(t){let e=t.geometry.contentBounds;return chunkLF5LPZOP_cjs.eb({transform:t.transform,contentWidth:e.width,contentHeight:e.height})}function Et(t,e){let{crop:o}=t,n=Math.max(0,Math.min(1,o.left)),i=Math.max(0,Math.min(1,o.top)),r=Math.max(0,Math.min(1,o.right)),a=Math.max(0,Math.min(1,o.bottom)),s=Math.max(1e-4,1-n-r),l=Math.max(1e-4,1-i-a);return Object.freeze({width:`${N(1/s*100)}%`,height:`${N(1/l*100)}%`,left:`${N(-n/s*100)}%`,top:`${N(-i/l*100)}%`})}function Fo(t,e){let{resource:o}=t;switch(o.kind){case "external":return e.externalResource;case "missing":return e.missingResource;case "pending":return e.pendingResource;case "unrenderable":switch(o.reason){case "unsupported-format":return e.unsupportedFormat(Ho.get(o.mime)??Bo);case "non-picture-graphic":return e.nonPictureGraphic(t.placeholderGraphicKind??"graphic");case "signature-mismatch":return e.contentMismatch;case "decode-failed":return e.decodeFailed;case "resource-limit":return e.resourceLimit;default:return e.invalidResource}default:return e.invalidResource}}function B(t,e,o){let{accessibility:n}=e;n.hidden||(t.setAttribute("role",o?"link":"img"),n.label?t.setAttribute("aria-label",n.label):o||t.setAttribute("aria-hidden","true"));}function G(t,e,o,n){let i=n?.x??0,r=n?.y??0;t.style.position="absolute",t.style.left=`${(e.x-i)*o}px`,t.style.top=`${(e.y-r)*o}px`,t.style.width=`${e.width*o}px`,t.style.height=`${e.height*o}px`,t.style.boxSizing="border-box",t.style.overflow="hidden",t.style.pointerEvents="auto";}function Lt(t){let e=t.groupPicture?t.geometry.imageTransformCorners:void 0;if(!e||e.length===0)return t.geometry.contentBounds;let o=1/0,n=1/0,i=-1/0,r=-1/0;for(let a of e)o=Math.min(o,a.x),n=Math.min(n,a.y),i=Math.max(i,a.x),r=Math.max(r,a.y);return {x:o,y:n,width:i-o,height:r-n}}function No(t,e,o,n,i){let r=t.paintBounds,a=Lt(t),s=Et(t);return [n,o.scale,i?.x??0,i?.y??0,r.x,r.y,r.width,r.height,a.x,a.y,a.width,a.height,Pt(t.geometry.clipPolygon??[],r)??"",he(t.effects)??"",t.effects.bilevel??"",At(t)??"",s.width,s.height,s.left,s.top,o.inertLinks?"":t.hyperlinkHref??"",t.accessibility.label??""].join("|")}function j(t,e,o,n){let i=t.createElement("div");i.className="docx-drawing docx-drawing-placeholder",i.dataset.drawingNodeId=e.drawingNodeId,G(i,e.paintBounds,o.scale,n);let r=t.createElement("div");r.className="docx-drawing-placeholder-card";let a=t.createElement("span");return a.className="docx-drawing-placeholder-label",a.textContent=Fo(e,o.strings),r.append(a),i.append(r),e.hyperlinkHref&&!o.inertLinks?(i.dataset.docxDrawingLink=e.drawingNodeId,i.dataset.docxDrawingLinkKind="external",i.dataset.docxDrawingLinkHref=e.hyperlinkHref,i.setAttribute("tabindex","-1"),B(i,e,true)):B(i,e,false),i}function Oo(t,e,o,n,i,r){let a=e.resource;if(a.kind!=="ready")return j(t,e,o,r);let s=xe(e,o),l=i?.readyElementFor?.(s)??t.createElement("div"),d=No(e,a,o,n,r),c=!e.vectorShape;if(c&&oe.get(l)===d)return l;l.className="docx-drawing docx-drawing-ready",l.style.cssText="",l.dataset.drawingNodeId=e.drawingNodeId,delete l.dataset.docxDrawingLink,delete l.dataset.docxDrawingLinkKind,delete l.dataset.docxDrawingLinkHref,l.removeAttribute("aria-hidden"),l.removeAttribute("aria-label"),l.removeAttribute("role"),l.removeAttribute("tabindex"),G(l,e.paintBounds,o.scale,r);let u=t.createElement("div");u.className="docx-drawing-image-frame",u.style.position="absolute";let h=Lt(e),p=e.paintBounds,y=Pt(e.geometry.clipPolygon??[],e.groupPicture?h:p);y&&((e.groupPicture?u:l).style.clipPath=y),u.style.left=`${(h.x-p.x)*o.scale}px`,u.style.top=`${(h.y-p.y)*o.scale}px`,u.style.width=`${h.width*o.scale}px`,u.style.height=`${h.height*o.scale}px`;let x=he(e.effects);x&&(u.style.filter=x);let m=t.createElement("div");m.className="docx-drawing-transform-stage",m.style.position="relative",m.style.width="100%",m.style.height="100%";let A=At(e);A&&(m.style.transform=A,m.style.transformOrigin="0 0");let w=t.createElement("div");w.className="docx-drawing-crop-viewport",w.style.position="relative",w.style.width="100%",w.style.height="100%",w.style.overflow="hidden";let b=i?.imageFor?.(s,a.resourceKey,t)??t.createElement("img");b.className="docx-drawing-image",b.setAttribute("draggable","false"),b.getAttribute("src")!==n&&b.setAttribute("src",n),b.setAttribute("alt","");let k=Et(e);if(b.style.position="absolute",b.style.width=k.width,b.style.height=k.height,b.style.left=k.left,b.style.top=k.top,b.style.maxWidth="none",b.style.maxHeight="none",w.append(b),m.append(w),u.append(m),l.replaceChildren(u),e.vectorShape){let L=me(t,e,o.scale),E=e.paintBounds;ge(l,L,E,chunkKJLPVGSX_cjs.M(e,E),o.scale),l.append(L);}return mt(t,l,u,e.effects.bilevel),e.hyperlinkHref&&!o.inertLinks?(l.dataset.docxDrawingLink=e.drawingNodeId,l.dataset.docxDrawingLinkKind="external",l.dataset.docxDrawingLinkHref=e.hyperlinkHref,l.setAttribute("tabindex","-1"),B(l,e,true)):B(l,e,false),i?.rememberReadyElement?.(s,l),c?oe.set(l,d):oe.delete(l),l}function Ko(t,e,o,n,i){let r=t.createElement("div");r.className="docx-drawing docx-drawing-shape",r.dataset.drawingNodeId=e.drawingNodeId;let a=e.paintBounds;G(r,a,o.scale,i);let s=me(t,e,o.scale);return ge(r,s,a,n,o.scale),r.append(s),e.hyperlinkHref&&!o.inertLinks?(r.dataset.docxDrawingLink=e.drawingNodeId,r.dataset.docxDrawingLinkKind="external",r.dataset.docxDrawingLinkHref=e.hyperlinkHref,r.setAttribute("tabindex","-1"),B(r,e,true)):B(r,e,false),r}function zo(t,e,o,n,i){let r=n.scale,a=t.createElement("div");a.className="docx-drawing docx-drawing-textbox",a.dataset.drawingNodeId=e.drawingNodeId,a.setAttribute("contenteditable","false"),G(a,e.paintBounds,n.scale,i),a.style.overflow="hidden";let s=(e.x-e.paintBounds.x)*r,l=(e.y-e.paintBounds.y)*r;if(o.fillHex!==null||o.strokeHex!==null){let c=t.createElement("div");c.className="docx-drawing-textbox-box",c.style.position="absolute",c.style.left=`${s}px`,c.style.top=`${l}px`,c.style.width=`${e.width*r}px`,c.style.height=`${e.height*r}px`,c.style.boxSizing="border-box",o.fillHex!==null&&(c.style.backgroundColor=`#${o.fillHex}`),o.strokeHex!==null&&(c.style.border=`${Math.max(o.strokeWidthPt*r,.5)}px solid #${o.strokeHex}`),a.append(c);}let d=t.createElement("div");d.className="docx-drawing-textbox-content",d.style.position="absolute",d.style.left=`${s+o.contentOffset.x*r}px`,d.style.top=`${l+o.contentOffset.y*r}px`,d.style.width=`${o.contentWidth*r}px`,d.style.height=`${Math.max(0,o.contentHeight)*r}px`,d.style.overflow="hidden";for(let c of o.fragments)d.append(n.paintStoryFragment(t,c));for(let c of d.querySelectorAll("[data-paragraph-id]"))c.dataset.textboxParagraphId=c.dataset.paragraphId,delete c.dataset.paragraphId;return a.append(d),B(a,e,false),a}function _o(t,e,o){let n=o.revisionStyles,i=F(e.revisions,n?.authorSlots,n?.styles);if(!i){if(t.dataset.revisionKind===void 0)return;t.classList.remove("docx-drawing--revision","docx-drawing--revision-insertion","docx-drawing--revision-deletion"),delete t.dataset.revisionKind,delete t.dataset.revisionId,delete t.dataset.reviewAuthor,delete t.dataset.revisionDate,delete t.dataset.reviewAuthorSlot;return}let{attribution:r}=i;t.classList.add("docx-drawing--revision",i.deleted?"docx-drawing--revision-deletion":"docx-drawing--revision-insertion"),t.classList.remove(i.deleted?"docx-drawing--revision-insertion":"docx-drawing--revision-deletion"),t.dataset.revisionKind=r.kind,t.dataset.revisionId=r.id,r.author!==""?t.dataset.reviewAuthor=r.author:delete t.dataset.reviewAuthor,r.date!==void 0?t.dataset.revisionDate=r.date:delete t.dataset.revisionDate,n?t.dataset.reviewAuthorSlot=String((n.authorSlots.get(r.author)??0)%$):delete t.dataset.reviewAuthorSlot;}function $t(t,e,o,n,i){let r=Uo(t,e,o,n,i);return r&&_o(r,e,o),r}function Uo(t,e,o,n,i){if(e.accessibility.hidden)return null;let r=e.vectorShape?chunkKJLPVGSX_cjs.M(e,e.paintBounds):e.paintBounds;if(r.width<=0||r.height<=0)return null;if(e.kind==="anchoredDrawing"&&e.textboxStory!==void 0&&o.paintStoryFragment!==void 0)return zo(t,e,e.textboxStory,o,i);let{resource:a}=e,s=a.kind==="ready"&&o.imageUrlPort&&n?n.urlForReady(a.validatedHandle,a.mime):null;if(e.groupPicture&&a.kind!=="pending"&&!s)return j(t,e,o,i);let l=e.groupPicture!==void 0&&s!==null;if(e.vectorShape&&e.vectorShape.subpathsEmu.length>0&&!l)return Ko(t,e,o,r,i);if(a.kind==="ready")return !s||!n?j(t,e,o,i):Oo(t,e,o,s,n,i);if(a.kind==="pending"){let d=n?.readyElementFor?.(xe(e,o))??n?.imageForPending?.(xe(e,o))?.closest(".docx-drawing-ready");return d?(oe.delete(d),d.dataset.drawingNodeId=e.drawingNodeId,G(d,e.paintBounds,o.scale,i),d):j(t,e,o,i)}return j(t,e,o,i)}function Mt(t,e,o,n,i){let r=[];for(let a of e.drawings??[]){let s=$t(t,a,o,n,i);s&&r.push(s);}return Object.freeze(r)}function Tt(t,e,o,n,i,r){let a=[];for(let s of e){if(chunkLF5LPZOP_cjs.Tb(s)!==o)continue;let l=$t(t,s,n,i,r);l&&(l.dataset.drawingLayer=o,a.push(l));}return Object.freeze(a)}function jo(t,e){chunkLF5LPZOP_cjs.ya(t,({host:o})=>chunkLF5LPZOP_cjs.Aa(o,e));}var Rt=new WeakMap;function Go(t){let e=Rt.get(t);if(e)return e;let o=[],n=[];jo(t,r=>{r.resource.kind==="ready"&&o.push(r.resource.resourceKey),n.push(`p${t.index}|${r.drawingNodeId}`);}),chunkLF5LPZOP_cjs.ya(t,({host:r})=>chunkLF5LPZOP_cjs.Ca(r,a=>{let s=a.marker?.picture;s?.resource.kind==="ready"&&o.push(s.resource.resourceKey);}));let i=Object.freeze({resourceKeys:Object.freeze(o),elementKeys:Object.freeze(n)});return Rt.set(t,i),i}var wt=new WeakMap;function Ct(t){let e=wt.get(t);if(e)return e;let o=new Set,n=new Set;for(let r of t.pages){let a=Go(r);for(let s of a.resourceKeys)o.add(s);for(let s of a.elementKeys)n.add(s);}let i=Object.freeze({resourceKeys:o,elementKeys:n});return wt.set(t,i),i}function Dt(t){return Ct(t).resourceKeys}function Ht(t){return Ct(t).elementKeys}function Bt(t){return [t.missingResource,t.externalResource,t.invalidResource,t.contentMismatch,t.decodeFailed,t.resourceLimit,t.pendingResource,t.unsupportedFormat("probe"),t.nonPictureGraphic("probe")].join("\0")}var be=Object.freeze({unsupportedFormat:t=>`Unsupported image format (${t})`,nonPictureGraphic:t=>`Unsupported graphic (${t})`,missingResource:"Image missing",externalResource:"External image not loaded",invalidResource:"Invalid image",contentMismatch:"Image content does not match its type",decodeFailed:"Image could not be decoded",resourceLimit:"Image exceeds size limits",pendingResource:"Loading image"});function Sr(t){return Object.freeze({unsupportedFormat:e=>t("image.unsupportedFormat",{format:e}),nonPictureGraphic:e=>t("image.nonPictureGraphic",{kind:e}),missingResource:t("image.missingResource"),externalResource:t("image.externalResource"),invalidResource:t("image.invalidResource"),contentMismatch:t("image.contentMismatch"),decodeFailed:t("image.decodeFailed"),resourceLimit:t("image.resourceLimit"),pendingResource:t("image.pendingResource")})}function Wo(t,e,o){t.style.position="absolute",t.style.left=`${e.x*o}px`,t.style.top=`${e.y*o}px`,t.style.width=`${e.width*o}px`,t.style.height=`${e.height*o}px`;}function It(t,e,o,n){let i=t.createElement("span");return i.className=e,i.setAttribute("aria-hidden","true"),i.style.position="absolute",i.style.display="block",i.style.left=`${o.x*n}px`,i.style.top=`${o.y*n}px`,i.style.width=`${o.width*n}px`,i.style.height=`${o.height*n}px`,i.style.backgroundColor="currentColor",i.style.pointerEvents="none",i}function P(t,e,o,n,i=0,r=0,a=[]){let s=i+o.box.x,l=r+o.box.y,d=[...a,o.kind];switch(o.kind){case "text":case "fallback":{let c=t.createElement("span");c.className=["docx-equation-node",...d.map(u=>`docx-equation-${u}`)].join(" "),Wo(c,{x:s,y:l,width:o.box.width,height:o.box.height},n),c.textContent=o.text,c.style.display="block",c.style.fontSize=`${o.fontSizePt*n}px`,c.style.lineHeight=`${o.box.height*n}px`,c.style.whiteSpace="pre",e.append(c);break}case "row":for(let c of o.items)P(t,e,c,n,s,l,d);break;case "fraction":P(t,e,o.numerator,n,s,l,d),e.append(It(t,"docx-equation-fraction-bar",{...o.bar,x:s+o.bar.x,y:l+o.bar.y},n)),P(t,e,o.denominator,n,s,l,d);break;case "radical":P(t,e,o.sign,n,s,l,d),o.degree&&P(t,e,o.degree,n,s,l,d),e.append(It(t,"docx-equation-radical-bar",{...o.bar,x:s+o.bar.x,y:l+o.bar.y},n)),P(t,e,o.radicand,n,s,l,d);break;case "script":P(t,e,o.base,n,s,l,d),o.subscript&&P(t,e,o.subscript,n,s,l,d),o.superscript&&P(t,e,o.superscript,n,s,l,d);break;case "nary":P(t,e,o.operator,n,s,l,d),o.lowerLimit&&P(t,e,o.lowerLimit,n,s,l,d),o.upperLimit&&P(t,e,o.upperLimit,n,s,l,d),P(t,e,o.body,n,s,l,d);break}}function Ft(t,e,o,n){let i=o.geometry;e.className="layout-run docx-equation",e.dataset.docxEquation=o.sourceNodeId,e.setAttribute("contenteditable","false"),e.setAttribute("role","math"),o.fallbackText&&e.setAttribute("aria-label",o.fallbackText),e.style.position="relative",e.style.display="inline-block",e.style.width=`${i.box.width*n}px`,e.style.height=`${i.box.height*n}px`,e.style.lineHeight="0",e.style.pointerEvents="auto",e.style.userSelect="none",e.style.verticalAlign=`${-(i.box.height-i.baseline)*n}px`;let r=t.createDocumentFragment();P(t,r,i,n),e.append(r);}function Nt(t,e,o,n){if(o.glyphOffsetPt!==void 0){let s=o.style.horizontalScalePercent/100,l=o.box.width*n;e.style.width=`${l/s}px`,s!==1&&(e.style.marginRight=`${l-l/s}px`);let d=t.createElement("span");if(d.dataset.docxGlyphOffset="",s!==1&&(d.style.letterSpacing=`${o.style.characterSpacingPt*n/s}px`),o.glyphOffsetPt){d.dataset.docxShiftedInk="",d.style.setProperty("forced-color-adjust","preserve-parent-color"),d.style.setProperty("-webkit-text-fill-color","transparent");let c=`${o.glyphOffsetPt*n/s}px`;d.style.setProperty("--docx-glyph-ink-offset",c),e.style.color&&e.style.color!=="inherit"&&d.style.setProperty("--docx-glyph-ink-color",e.style.color),d.style.textShadow=`${c} 0 currentColor`;}return e.append(d),d}let i=o.lineEndWhitespace===true;(o.style.horizontalScalePercent!==100||o.text===" "||i)&&(e.style.width=`${o.box.width*n}px`);let r=o.style.shaping!==void 0&&o.style.horizontalScalePercent!==100;if(!i&&!r||(i&&(e.style.clipPath="inset(-1em 0)"),o.style.horizontalScalePercent===100))return e;let a=t.createElement("span");if(a.dataset.docxClippedFill="",a.style.display="inline-block",a.style.transform=e.style.transform,a.style.transformOrigin=e.style.transformOrigin,r){let s=o.style.horizontalScalePercent/100;a.style.width=`${o.box.width*n/s}px`,a.style.letterSpacing=`${o.style.characterSpacingPt*n/s}px`,o.style.shaping?.wordSpacingPt&&(a.style.wordSpacing=`${o.style.shaping.wordSpacingPt*n/s}px`),a.style.direction=o.style.shaping?.direction??"ltr",a.style.transformOrigin=a.style.direction==="rtl"?"right":"left";}return a.style.textDecorationLine=e.style.textDecorationLine,a.style.textDecorationStyle=e.style.textDecorationStyle,a.style.textDecorationColor=e.style.textDecorationColor,a.style.textDecorationThickness=e.style.textDecorationThickness,e.style.removeProperty("transform"),e.style.removeProperty("transform-origin"),e.style.removeProperty("text-decoration-line"),e.style.removeProperty("text-decoration-style"),e.style.removeProperty("text-decoration-color"),e.style.removeProperty("text-decoration-thickness"),e.append(a),a}function Ot(t,e,o){let n=e.textOutline;if(!n||!Number.isFinite(o)||o<=0||!Number.isFinite(n.widthPt)||n.widthPt<=0||n.widthPt>1584||!/^[0-9a-f]{6}$/i.test(n.color))return;let i=n.widthPt*o;Number.isFinite(i)&&(t.setProperty("-webkit-text-stroke-width",`${i}px`),t.setProperty("-webkit-text-stroke-color",`#${n.color}`));}var Vo=/^[0-9A-Fa-f]{6}$/;function Xo(t,e,o){let n=t.createElement("div");n.className=`docx-page-border docx-page-border-${e.side}`,n.setAttribute("aria-hidden","true"),n.style.position="absolute";let i=e.side==="left"||e.side==="right",r=(i?e.box.width:e.box.height)*o,a=Y(e.edge.val)?r:Math.max(1,r),s=a-r;n.style.left=`${e.box.x*o-(e.side==="right"?s:0)}px`,n.style.top=`${e.box.y*o-(e.side==="bottom"?s:0)}px`,n.style.width=i?`${a}px`:`${e.box.width*o}px`,n.style.height=i?`${e.box.height*o}px`:`${a}px`;let l=e.edge.color&&Vo.test(e.edge.color)?e.edge.color:"000000";return n.style.backgroundColor=`#${l}`,I(n,e.edge.val,l,i,a,o),n}function Kt(t,e,o){let n=t.createElement("div");n.className="docx-page-borders",n.setAttribute("aria-hidden","true"),n.setAttribute("contenteditable","false"),n.style.position="absolute",n.style.inset="0",n.style.pointerEvents="none";for(let i of e.strokes)n.append(Xo(t,i,o));return n}var qo=/^[0-9A-Fa-f]{6}$/;function Yo(t){switch(t){case "dashed":return "dashed";case "dotted":return "dotted";case "double":case "triple":return "solid";default:return "solid"}}function Re(t){return t&&qo.test(t)?t:"000000"}function ve(t,e){let o=t.createElement("div");return o.className=e,o.setAttribute("aria-hidden","true"),o.setAttribute("contenteditable","false"),o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.overflow="visible",o.style.pointerEvents="none",o.style.boxSizing="border-box",o}function Zo(t,e,o,n){if(!o)return;let i=`#${Re(o.color)}`,r=`${Math.max(0,o.widthPt*n)}px`;if(t.style[`border${e}Width`]=r,t.style[`border${e}Color`]=i,o.style==="double"||o.style==="triple"){t.style[`border${e}Style`]="none";return}t.style[`border${e}Style`]=Yo(o.style);}function Se(t,e,o,n,i){let r=t.createElement("div");if(r.className=i,r.dataset.edge=o.side,r.dataset.stroke=o.role,r.style.position="absolute",r.style.left=`${o.x*n}px`,r.style.top=`${o.y*n}px`,r.style.width=`${o.width*n}px`,r.style.height=`${o.height*n}px`,r.style.pointerEvents="none",o.cssStyle==="solid")r.style.backgroundColor=`#${Re(o.color)}`;else {let a=o.side==="top"||o.side==="bottom";r.style.boxSizing="border-box",r.style[a?"borderTop":"borderLeft"]=`${(a?o.height:o.width)*n}px ${o.cssStyle} #${Re(o.color)}`;}e.append(r);}function Jo(t){let e=new Set;for(let o of t)e.add(`${o.side}\0${o.role}`);return e}function Qo(t,e,o,n){let i=Jo(o),r=h=>i.has(`${h}\0middle`),a=ve(t,"docx-table-border-double"),s=ve(t,"docx-table-border-triple"),l=ve(t,"docx-table-border-edge");for(let h of [a,s,l])h.style.zIndex="1";let d=false,c=false,u=false;for(let h of o){if(h.role==="edge"){u=true,Se(t,l,h,n,"docx-table-border-edge-stroke");continue}if(r(h.side)){c=true,Se(t,s,h,n,"docx-table-border-triple-stroke");continue}(h.role==="outer"||h.role==="inner")&&(d=true,Se(t,a,h,n,"docx-table-border-double-stroke"));}d&&e.append(a),c&&e.append(s),u&&e.append(l);}function zt(t,e,o,n){let i=new Set((o?.strokes??[]).map(r=>r.side));for(let r of ["top","right","bottom","left"]){let a=`${r[0].toUpperCase()}${r.slice(1)}`;Zo(e,a,o?.[r],n),i.has(r)&&(e.style[`border${a}Style`]="none");}o?.strokes&&o.strokes.length>0&&Qo(t,e,o.strokes,n);}function _t(t,e,o,n){if(e.textDirection!=="btLr")return n;let i=t.createElement("div");return i.className="docx-table-cell-content-btlr",i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width=`${e.box.height*o}px`,i.style.height=`${e.box.width*o}px`,i.style.transformOrigin="0 0",i.style.transform=`translateY(${e.box.height*o}px) rotate(-90deg)`,n.append(i),i}var we="when-selected",Ut=new WeakMap,jt=0;function en(t){let e=Ut.get(t);return e||(jt+=1,e=`alias${jt}`,Ut.set(t,e)),e}function Pe(t){return {...t,drawingStrings:t.drawingStrings??be,urlRegistry:t.urlRegistry??null,changeBars:t.changeBars??"none",changeBarsToggle:t.changeBarsToggle??false}}function tn(t){let e={...t,inertLinks:true,tabLeaderOriginXPt:0};return Object.freeze({scale:t.scale,strings:t.drawingStrings,...t.imageUrlPort?{imageUrlPort:t.imageUrlPort}:{},...t.inertLinks?{inertLinks:true}:{},...t.paintInstance?{paintInstance:t.paintInstance}:{},...t.revisionStyles?{revisionStyles:t.revisionStyles}:{},paintStoryFragment:(o,n)=>n.kind==="table"?K(o,n,e):O(o,n,e)})}function Qt(t){return Object.freeze({ctx:tn(t),urlRegistry:t.urlRegistry})}function Gt(t,e,o,n,i,r){ie(t,e,chunkLF5LPZOP_cjs.xa(o),n,i,r);}function ie(t,e,o,n,i,r,a=true,s){if(o.length===0)return;let l=Qt(n),d=t.createElement("div");d.className=r==="behind"?"docx-drawing-layer docx-drawing-layer-behind":"docx-drawing-layer docx-drawing-layer-front",d.style.position="absolute",d.style.inset="0",d.style.pointerEvents="none",s&&(d.dataset.docxHfFront=s);for(let c of Tt(t,o,r,l.ctx,l.urlRegistry,i)){if(c.style.pointerEvents=a?"auto":"none",!a)for(let u of c.querySelectorAll(".docx-drawing"))u.style.pointerEvents="none";d.append(c);}d.childElementCount>0&&e.append(d);}function eo(t){return t.horizontalFrame==="page"||t.verticalFrame==="page"}function to(t,e,o){let n=e.paintBounds,i=chunkLF5LPZOP_cjs.ta(e,t.box,o),r=i.x-e.x,a=i.y-e.y,s=l=>Object.freeze({x:l.x+r,y:l.y+a,width:l.width,height:l.height});return Object.freeze({...e,x:e.x+r,y:e.y+a,paintBounds:s(n),hitBounds:s(e.hitBounds),geometry:Object.freeze({...e.geometry,contentBounds:s(e.geometry.contentBounds),paintBounds:s(e.geometry.paintBounds),...e.geometry.clipPolygon?{clipPolygon:Object.freeze(e.geometry.clipPolygon.map(l=>Object.freeze({x:l.x+r,y:l.y+a})))}:{}})})}function on(t,e,o,n,i,r){let a=n.map(l=>to(o,l,r)),s=t.createElement("div");s.className="docx-hf-behind-layer",s.dataset.docxHfBehind=o.kind,s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",ie(t,s,a,i,r,"behind",false),s.childElementCount>0&&e.append(s);}function nn(t,e,o,n,i,r,a,s=false){let l=n.filter(eo).map(d=>to(o,d,r));ie(t,e,l,i,r,a,s,o.kind);}var z=/^[0-9A-Fa-f]{6}$/,Wt=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,rn=new Map(Object.entries({single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"})),an=new Map(Object.entries({black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"}));function sn(t){return t.doubleStrike?"double":t.strike?"single":"none"}function ln(t){return t==="thick"||t.endsWith("Heavy")}function oo(t){if(!t.underline)return null;let e=t.underline.color&&z.test(t.underline.color)?t.underline.color:null;return {cssStyle:rn.get(t.underline.variant)??"solid",color:e,heavy:ln(t.underline.variant)}}function no(t,e,o,n){t.textDecorationLine=e,t.textDecorationStyle=o,n.color&&(t.textDecorationColor=`#${n.color}`),n.heavy&&(t.textDecorationThickness=`max(${2*n.scale}px, 0.12em)`);}function Vt(t,e,o){e!=="none"&&no(t,"line-through",e==="double"?"double":"solid",{scale:o});}function Xt(t,e,o){no(t,"underline",e.cssStyle,{color:e.color,heavy:e.heavy,scale:o});}function dn(t,e,o){let n=e.color?`#${e.color}`:"currentColor";t.borderBottomWidth=`${(e.heavy?2:1)*o}px`,t.borderBottomStyle=e.cssStyle==="wavy"?"solid":e.cssStyle,t.borderBottomColor=n;}function re(t,e,o){let n=t.style,i=o.scale;Ot(n,e,i);let r=chunkLF5LPZOP_cjs.da(e);n.fontSize=`${e.fontSizePt*r*i}px`,e.bold&&(n.fontWeight="bold"),e.italic&&(n.fontStyle="italic");let a=e.fontFamily&&Wt.test(e.fontFamily)?e.fontFamily:o.defaultFontFamily&&Wt.test(o.defaultFontFamily)?o.defaultFontFamily:null;if(a){let d=o.fontAlias?.(a);n.fontFamily=d?`"${d}", "${a}", ${chunkKJLPVGSX_cjs.O}`:`"${a}", ${chunkKJLPVGSX_cjs.O}`;}e.color&&z.test(e.color)&&(n.color=`#${e.color}`);let s=e.highlight?an.get(e.highlight):void 0;s?(n.backgroundColor=s,t.dataset.highlight=e.highlight??""):e.shading&&z.test(e.shading)&&(n.backgroundColor=`#${e.shading}`),e.caps&&(n.textTransform="uppercase"),n.fontKerning=chunkKJLPVGSX_cjs.N(e)?"normal":"none",e.smallCaps&&(n.fontVariant="small-caps");let l=chunkLF5LPZOP_cjs.ca(e);l!==0&&(n.position="relative",n.top=`${-l*i}px`),e.characterSpacingPt!==0&&(n.letterSpacing=`${e.characterSpacingPt*i}px`),e.horizontalScalePercent!==100&&(n.transformOrigin="left",n.transform=`scaleX(${e.horizontalScalePercent/100})`);}function ro(t,e,o,n,i){let r=o===" "?null:oo(n),a=sn(n),s=e;if(r&&a!=="none"){let l=t.createElement("span");l.dataset.docxDeco="underline",Xt(l.style,r,i);let d=t.createElement("span");d.dataset.docxDeco="strike",Vt(d.style,a,i),l.append(d),e.append(l),s=d;}else r?Xt(e.style,r,i):a!=="none"&&Vt(e.style,a,i);s.textContent=o;}function D(t,e,o,n){let i=t.createElement(e);return i.style.position="absolute",i.style.left=`${o.x*n}px`,i.style.top=`${o.y*n}px`,i.style.width=`${o.width*n}px`,i.style.height=`${o.height*n}px`,i}function cn(t,e,o){let n=e.fieldAtom;!n||(t.dataset.fieldAtom=n.formField?"form":"field",!(n.formField?o.shadeFormFields!==false:(o.fieldShading??we)!=="never"))||(t.classList.add("docx-field-atom"),(n.formField||(o.fieldShading??we)==="always")&&t.classList.add("docx-field-atom--shaded"));}function qt(t,e,o){let n=chunkLF5LPZOP_cjs.$a(e.props),i=o.revisionStyles,r=F(e.revisions,i?.authorSlots,i?.styles);if(!(!r&&!n)){if(r){let{attribution:a}=r;t.classList.add("docx-revision",`docx-revision-${a.kind}`),t.dataset.revisionKind=a.kind,t.dataset.revisionId=a.id,a.author!==""&&(t.dataset.reviewAuthor=a.author),a.date!==void 0&&(t.dataset.revisionDate=a.date);let s=i?.styles.get(a.author);if(i){t.dataset.reviewAuthorSlot=String((i.authorSlots.get(a.author)??0)%$);let c=i.classTokens.get(a.author);if(c)for(let u=0;u<c.length;u+=1)t.classList.add(c[u]);}let d=i!==void 0&&(s?.color!==void 0||i.others==="author")?r.authorColor:r.color;t.style.color=d,t.style.backgroundColor=s?.background??(r.deleted?"var(--doc-revision-deletion-wash)":"var(--doc-revision-insertion-wash)"),r.line&&(t.style.textDecorationLine=r.line,a.kind==="insert"&&r.line==="underline"?(t.style.textDecorationStyle="var(--doc-revision-insertion-decoration-style)",t.style.textDecorationThickness="var(--doc-revision-insertion-decoration-thickness)",t.style.textUnderlineOffset="var(--doc-revision-insertion-underline-offset)"):t.style.textDecorationStyle=r.decorationStyle,t.style.textDecorationColor=d);return}if(t.classList.add("docx-revision","docx-revision-format"),t.dataset.revisionKind="format",t.dataset.formattingKind="rPrChange",t.dataset.revisionId=n.id,n.author!==""&&(t.dataset.reviewAuthor=n.author),n.date!==void 0&&(t.dataset.revisionDate=n.date),i){let a=i.styles.get(n.author);t.dataset.reviewAuthorSlot=String((i.authorSlots.get(n.author)??0)%$);let s=i.classTokens.get(n.author);if(s)for(let l=0;l<s.length;l+=1)t.classList.add(s[l]);a?.color!==void 0&&(t.style.color=a.color),a?.background!==void 0&&(t.style.backgroundColor=a.background);}}}function un(t,e,o,n,i){let r=t.createElement("span"),a=chunkLF5LPZOP_cjs.sa(e.style,e.fontSlot);if(e.equation)return r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end),re(r,a,o),Ft(t,r,e.equation,o.scale),qt(r,e,o),r;r.className="layout-run layout-run-text",r.style.display="inline-block",r.style.verticalAlign="baseline",r.style.boxSizing="border-box",r.style.height=`${n*o.scale}px`,r.style.paddingTop=`${i*o.scale}px`,r.style.lineHeight=`${(n-i)*o.scale}px`,e.range.end>e.range.start?(r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end)):(r.setAttribute("aria-hidden","true"),r.contentEditable="false"),re(r,a,o),cn(r,e,o),qt(r,e,o);let s=Nt(t,r,e,o.scale);if(e.text===" "){r.style.overflow="hidden",r.style.verticalAlign="top";let l=oo(e.style);l&&e.tabLeader!=="underscore"&&(r.dataset.docxTabUnderline="",dn(r.style,l,o.scale));}return ro(t,s,e.text,e.style,o.scale),Ve(r,e,o.scale),We(r,e),e.projected&&(r.dataset.docxField="",r.setAttribute("contenteditable","false"),e.noteNav?(r.style.userSelect="none",e.noteNav.direction==="to-note"?(r.dataset.docxNoteRef="",r.dataset.docxNoteScope=e.noteNav.scopeId,e.text.length>0&&r.setAttribute("aria-description",e.text)):(r.dataset.docxNoteMarkBack="",r.dataset.docxNoteScope=e.noteNav.scopeId)):e.fieldAtom?.formControl?(r.style.userSelect="none",r.style.cursor="pointer"):(r.style.pointerEvents="none",r.style.userSelect="none")),r}function Yt(t,e,o){let n=t.createElement("a");return n.className="docx-hyperlink",n.style.cursor=!o.inertLinks&&e.href?"pointer":"default",n.dataset.docxLink=e.id,n.dataset.docxLinkKind=e.kind,n.setAttribute("tabindex","-1"),!o.inertLinks&&e.href&&(n.setAttribute("href",e.href),e.kind==="external"&&n.setAttribute("rel","noopener noreferrer")),e.tooltip&&n.setAttribute("title",e.tooltip),n.style.display="inline-block",n.style.verticalAlign="baseline",n.style.textDecoration="none",n.style.color="inherit",n}function yn(t,e,o,n=false){let i=o.scale,r=t.createElement("div");r.className="docx-line layout-line",r.dataset.lineId=e.id,r.dataset.paragraphId=e.range.paragraphId,r.style.position="absolute",r.style.top=`${e.box.y*i}px`,r.style.left=`${e.contentX*i}px`,r.style.height=`${e.box.height*i}px`,r.style.fontSize="0",r.style.whiteSpace="pre",r.style.overflow="visible";let a=e.leading??0,s=Math.min(Math.max(a,...e.spans.map(f=>f.box.height+a),e.spans.length===0?e.box.height-(e.trailingSpacing??0):0),e.box.height),l=Math.max(0,e.box.height-s);r.style.boxSizing="border-box",r.style.paddingBottom=`${l*i}px`,r.style.lineHeight=`${(e.box.height-l)*i}px`;let d=null,c=null,u=null,h=new Map;for(let[f,g]of chunkLF5LPZOP_cjs.Ja(e).entries())h.set(g.paragraphId,f);let p=f=>h.get(f)??0,y=[...e.drawings??[]].sort((f,g)=>p(f.paragraphId)-p(g.paragraphId)||f.start-g.start),x=0,m=(f,g)=>{for(;x<y.length&&(p(y[x].paragraphId)<p(f)||p(y[x].paragraphId)===p(f)&&y[x].start<g);){let v=y[x],S=Math.max(0,v.advanceEnd-v.advanceStart),R=t.createElement("span");R.className="docx-inline-drawing-advance",R.dataset.docxMarker="",R.setAttribute("contenteditable","false"),R.setAttribute("aria-hidden","true"),R.style.display="inline-block",R.style.width=`${S*i}px`,R.style.height=`${v.baselineOffset*i}px`,R.style.lineHeight="0",R.style.pointerEvents="none",R.style.verticalAlign="baseline",r.append(R),x+=1,d=null,c=null;}},A=f=>{let g=f.wrapAdvanceBefore??0;if(g<=.001)return;let v=t.createElement("span");v.className="docx-wrap-advance",v.dataset.docxMarker="",v.setAttribute("contenteditable","false"),v.setAttribute("aria-hidden","true"),v.style.display="inline-block",v.style.width=`${g*i}px`,v.style.height="0",v.style.lineHeight="0",v.style.pointerEvents="none",v.style.verticalAlign="baseline",r.append(v),d=null,c=null;},w=e.spans.some(f=>f.style.shaping!==void 0),b=0,k=0,L=false;for(let[f,g]of e.spans.entries()){m(g.range.paragraphId,g.range.start),w||A(g);let v=Math.min(g.box.height+a,e.box.height),S=g.noteSeparator?je(t,g,e,i):un(t,g,o,v,a);w&&(S.style.position="relative",S.style.left=`${(g.box.x-e.contentX-b)*i}px`,S.style.width||(S.style.width=`${g.box.width*i}px`),S.style.direction=g.style.shaping?.direction??"ltr",S.style.unicodeBidi="isolate",g.style.shaping?.wordSpacingPt&&(S.style.wordSpacing=`${g.style.shaping.wordSpacingPt*i}px`),b+=g.box.width),k>0&&!L&&(S.style.marginLeft=`${k*i}px`);let R=e.spans[f+1],_=w?0:pn(e,f+1,p);L=_>0&&R!==void 0&&fn(g,R),L&&(S.style.wordSpacing=`${_*i}px`),k=_;let M=g.link;if(!M){d=null,c=null,u=null,r.append(S);continue}if(g.fieldAtom){d!==null&&c===M.id&&u===g.range.start||(d=Yt(t,M,o),c=M.id,u=g.range.start,r.append(d)),d.append(S);continue}(!d||c!==M.id||u!==null)&&(d=Yt(t,M,o),c=M.id,u=null,r.append(d)),d.append(S);}if(m(chunkLF5LPZOP_cjs.Ja(e)[chunkLF5LPZOP_cjs.Ja(e).length-1]?.paragraphId??e.range.paragraphId,Number.POSITIVE_INFINITY),e.spans.length===0){let f=t.createElement("br");f.style.lineHeight=`${e.box.height*i}px`,r.append(f);}let E=Object.freeze({x:e.contentX,y:e.box.y,width:e.box.width,height:e.box.height});Ge(t,r,e,i),o.showParagraphMarks&&e.manualBreakAfter&&r.append(tt(t,e,i,o.revisionStyles,n));let C=Qt(Pe(o));if(e.drawings&&e.drawings.length>0)for(let f of Mt(t,e,C.ctx,C.urlRegistry,E))r.append(f);return r}function pn(t,e,o){if(e<=0||e>=t.spans.length)return 0;let n=t.spans[e-1],i=t.spans[e],r=o(n.range.paragraphId),a=o(i.range.paragraphId);if(t.drawings?.some(d=>{let c=o(d.paragraphId),u=c>r||c===r&&d.start>=n.range.start,h=c<a||c===a&&d.start<i.range.start;return u&&h}))return 0;let l=i.box.x-(n.box.x+n.box.width)-(i.wrapAdvanceBefore??0);return l>.001?l:0}var hn=/[\t\n\r \u00A0\u1361\u{10100}-\u{10102}\u{1039F}\u{1091F}]/u;function fn(t,e){return !t.text.endsWith(" ")||t.style.horizontalScalePercent!==100||!gn(t,e)||(e.wrapAdvanceBefore??0)>.001?false:!hn.test(t.text.slice(0,-1))}function gn(t,e){return !t.link&&!e.link?true:!t.link||!e.link||t.link.id!==e.link.id||!!t.fieldAtom!=!!e.fieldAtom?false:!t.fieldAtom||t.range.start===e.range.start}function O(t,e,o){let n=o.scale,i=D(t,"div",e.box,n);i.className="docx-paragraph-fragment layout-paragraph",e.clipToBox&&(i.style.overflow="hidden"),i.dataset.paragraphId=e.paragraphId,i.dataset.fragmentIndex=String(e.fragmentIndex),ue(i,e),o.readOnlyParagraphIds?.has(e.paragraphId)&&(i.classList.add("docx-generated-region"),i.dataset.docxReadOnly="",i.setAttribute("contenteditable","false")),o.emptyTocPlaceholderIds?.has(e.paragraphId)&&(i.classList.add("docx-toc-empty-placeholder"),i.dataset.docxTocEmpty=""),e.shading&&z.test(e.shading)&&e.shadingBox&&i.append(bn(t,e,n)),e.marker&&i.append(mn(t,e,o));for(let r of e.lines)for(let a of r.spans){if(!a.tabLeader)continue;let s=xn(t,e,r,a,o);s&&i.append(s);}if(o.showParagraphMarks&&e.paragraphEnd||e.markRevisions&&e.markRevisions.length>0){let r=ot(t,e.markRevisions??[],n,o.revisionStyles),a=e.lines[e.lines.length-1];a&&(r.style.top=`${(a.box.y-e.box.y)*n}px`,ce(r,de(a,chunkLF5LPZOP_cjs.Xb(e.props)),e.box.x,n),i.append(r));}for(let r of e.lines){let a=yn(t,r,o,chunkLF5LPZOP_cjs.Xb(e.props));e.markFormatRevision&&r===e.lines[e.lines.length-1]&&ue(a,e,true),a.style.top=`${(r.box.y-e.box.y)*n}px`,a.style.left=`${(r.contentX-e.box.x)*n}px`,i.append(a);}if(e.borders)for(let r of e.borders)i.append(Zt(t,e,r,n));else e.bottomBorder&&i.append(Zt(t,e,{side:"bottom",edge:e.bottomBorder.edge,box:e.bottomBorder.box},n));return i}function mn(t,e,o){let n=e.marker,i=o.scale,r=Ue(t,e,Pe(o));if(r)return r;let a=e.lines[0]?.leading??0,s=D(t,"span",n.box,i);s.className="docx-list-marker",s.dataset.docxMarker="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.left=`${(n.box.x-e.box.x)*i}px`,s.style.top=`${(n.box.y-e.box.y)*i}px`,s.style.display="block",s.style.overflow="visible",s.style.whiteSpace="pre";let l=e.lines[0],d=l?Math.max(a,...l.spans.map(p=>p.box.height+a),l.spans.length===0?l.box.height-(l.trailingSpacing??0):0):n.box.height,c=Math.min(d,n.box.height),u=Math.max(0,n.box.height-c);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${u*i}px`,s.style.lineHeight=`${c*i}px`;let h=t.createElement("span");return h.style.display="inline-block",h.style.verticalAlign="baseline",h.style.boxSizing="border-box",h.style.height=`${c*i}px`,h.style.paddingTop=`${a*i}px`,h.style.lineHeight=`${(c-a)*i}px`,re(h,n.style,o),n.pieces&&(h.dir="rtl"),ro(t,h,n.text,n.style,i),s.append(h),s}function xn(t,e,o,n,i){let r=n.tabLeader?chunkLF5LPZOP_cjs.Kb.get(n.tabLeader):void 0;if(!r||n.box.width<=0)return null;let a=i.scale,s=t.createElement("div");s.className="docx-tab-leader",s.dataset.docxTabLeader="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",n.tabLeader==="underscore"&&(s.style.zIndex="1"),s.style.left=`${(n.box.x-e.box.x)*a}px`,s.style.top=`${(o.box.y-e.box.y)*a}px`,s.style.width=`${n.box.width*a}px`,s.style.height=`${o.box.height*a}px`,s.style.overflow="hidden",s.style.whiteSpace="pre",s.style.pointerEvents="none",s.style.userSelect="none";let l=o.leading??0,d=Math.min(n.box.height+l,o.box.height),c=Math.max(0,o.box.height-d);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${c*a}px`,s.style.lineHeight=`${(o.box.height-c)*a}px`;let u=t.createElement("span");u.style.display="inline-block",u.style.verticalAlign="baseline",re(u,n.style,i),u.style.boxSizing="border-box",u.style.height=`${d*a}px`,u.style.paddingTop=`${l*a}px`,u.style.lineHeight=`${(d-l)*a}px`,n.tabLeader==="heavy"&&(u.style.fontWeight="bold");let h=n.tabLeaderAdvancePt&&n.tabLeaderAdvancePt>0?n.tabLeaderAdvancePt:Math.max(.5,n.style.fontSizePt*.2),p=chunkKJLPVGSX_cjs.na((i.tabLeaderOriginXPt??0)+n.box.x,n.box.width,h);return u.style.marginLeft=`${p.offsetPt*a}px`,u.textContent=r.repeat(p.count),u.style.letterSpacing="0",s.append(u),s}function bn(t,e,o){let n=e.shadingBox,i=D(t,"div",n,o);return i.className="docx-paragraph-shading",i.setAttribute("aria-hidden","true"),i.style.left=`${(n.x-e.box.x)*o}px`,i.style.top=`${(n.y-e.box.y)*o}px`,i.style.backgroundColor=`#${e.shading}`,i}function Zt(t,e,o,n){let i=D(t,"div",o.box,n);i.className=`docx-paragraph-border docx-paragraph-border-${o.side}`,i.setAttribute("aria-hidden","true");let r=(o.box.x-e.box.x)*n,a=(o.box.y-e.box.y)*n,s=o.side==="left"||o.side==="right"||o.side==="bar",l=(s?o.box.width:o.box.height)*n,c=Y(o.edge.val)?l:Math.max(1,l);i.style.left=`${o.side==="right"?r-(c-l):r}px`,i.style.top=`${o.side==="bottom"?a-(c-l):a}px`,s?i.style.width=`${c}px`:i.style.height=`${c}px`;let u=o.edge.color&&z.test(o.edge.color)?o.edge.color:"000000";return i.style.backgroundColor=`#${u}`,I(i,o.edge.val,u,s,c,n),i}function vn(t,e,o,n){let i=n.scale,r=D(t,"div",e.box,i);if(r.className="docx-table-cell",r.style.left=`${(e.box.x-o.x)*i}px`,r.style.top=`${(e.box.y-o.y)*i}px`,r.style.boxSizing="border-box",r.style.overflow="visible",r.dataset.cellId=e.id,r.dataset.gridColumn=String(e.gridColumn),r.dataset.gridSpan=String(e.gridSpan),e.rowSpan&&e.rowSpan>1&&(r.dataset.rowSpan=String(e.rowSpan)),e.paintInert||e.vMergeContinue)return r.dataset.vMergeContinue="true",r.style.border="none",r.style.backgroundColor="transparent",r;r.style.border="none",zt(t,r,e.borders,i),e.shading&&z.test(e.shading)&&(r.style.backgroundColor=`#${e.shading}`);let a=_t(t,e,i,r);for(let s of e.blocks){let l=s.kind==="table"?K(t,s,n):O(t,s,n);l.style.left=`${(s.box.x-e.box.x)*i}px`,l.style.top=`${(s.box.y-e.box.y)*i}px`,a.append(l);}return r}function K(t,e,o){let n=o.scale,i=D(t,"div",e.box,n);i.className="docx-table-fragment layout-table",i.dataset.tableId=e.tableId,i.dataset.fragmentIndex=String(e.fragmentIndex),i.style.overflow="visible";for(let r of e.rows){let a=D(t,"div",r.box,n);a.className="docx-table-row",r.revisionKind&&(a.classList.add("docx-table-row--revision",r.revisionKind==="insert"?"layout-revision-ins":"layout-revision-del"),a.dataset.revisionKind=r.revisionKind,r.revisionId!==void 0&&(a.dataset.revisionId=r.revisionId),r.revisionAuthor!==void 0&&(a.dataset.reviewAuthor=r.revisionAuthor),r.revisionDate!==void 0&&(a.dataset.revisionDate=r.revisionDate)),a.dataset.rowId=r.id,r.isHeaderRepeat&&(a.dataset.headerRepeat="true"),a.style.left=`${(r.box.x-e.box.x)*n}px`,a.style.top=`${(r.box.y-e.box.y)*n}px`,a.style.overflow="visible";for(let s of r.cells)a.append(vn(t,s,r.box,o));i.append(a);}return i}function Sn(t,e,o,n,i){let r={...o,paintInstance:`p${e.index}`,tabLeaderOriginXPt:e.contentBox.x-e.box.x},a=D(t,"div",e.box,r.scale);if(a.className="docx-page",a.style.fontFamily=chunkKJLPVGSX_cjs.O,a.dataset.pageIndex=String(e.index),r.ariaHidden&&(a.setAttribute("aria-hidden","true"),a.setAttribute("role","presentation")),a.dataset.materialized=String(n),!n)return a;let s=Object.freeze({x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height}),l=Object.freeze({x:-(e.contentBox.x-e.box.x),y:-(e.contentBox.y-e.box.y),width:e.box.width,height:e.box.height});Gt(t,a,e,r,l,"behind");for(let p of [e.header,e.footer])p?.anchoredDrawings?.length&&on(t,a,p,p.anchoredDrawings,r,{x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height});let d=e.pageBorders?Kt(t,e.pageBorders,r.scale):null;d&&e.pageBorders?.zOrder==="back"&&a.append(d);let c=t.createElement("div");c.className="docx-page-content",c.style.position="absolute",c.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,c.style.top=`${(e.contentBox.y-e.box.y)*r.scale}px`,c.style.width=`${e.contentBox.width*r.scale}px`,c.style.height=`${e.contentBox.height*r.scale}px`,r.activeHeaderFooterRId&&c.setAttribute("contenteditable","false");for(let p of e.columnSeparators??[]){let y=t.createElement("div");y.className="docx-column-separator",y.setAttribute("contenteditable","false"),y.style.position="absolute",y.style.left=`${p.x*r.scale}px`,y.style.top=`${p.y*r.scale}px`,y.style.width=`${p.width*r.scale}px`,y.style.height=`${p.height*r.scale}px`,y.style.backgroundColor="currentColor",y.style.pointerEvents="none",c.append(y);}let u=i?new Map:null;for(let p of e.fragments){let y=p.kind==="table"?K(t,p,r):O(t,p,r);u?.set(p,y),c.append(y);}i&&u&&(i.content=c,i.blocks=u),a.append(c),d&&e.pageBorders?.zOrder==="front"&&a.append(d),Gt(t,a,e,r,l,"inFront"),nt(t,a,e,r,O,K);for(let p of ["header","footer"]){if(e[p]||e.parityBlank)continue;let y=t.createElement("div");y.className="docx-hf docx-hf--placeholder",y.dataset.docxHf=p,y.setAttribute("contenteditable","false");let x=p==="header"?e.contentBox.y-e.box.y:e.box.y+e.box.height-(e.contentBox.y+e.contentBox.height),m=Math.min(x,Rn);if(m<=0)continue;let A=Math.max(0,Math.min(wn,x-m)),w=p==="header"?A:e.box.height-A-m;y.style.position="absolute",y.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,y.style.top=`${w*r.scale}px`,y.style.width=`${e.contentBox.width*r.scale}px`,y.style.height=`${m*r.scale}px`,a.append(y);}for(let p of [e.header,e.footer]){if(!p)continue;let y=p.anchoredDrawings??[],x=ee(p,e.index,r),m=t.createElement("div");m.className="docx-hf",m.dataset.docxHf=p.kind,p.rId&&(m.dataset.docxRId=p.rId),x?(m.dataset.docxHfActive="",m.setAttribute("contenteditable","true")):m.setAttribute("contenteditable","false"),m.style.position="absolute",m.style.left=`${(p.box.x-e.box.x)*r.scale}px`,m.style.top=`${(p.box.y-e.box.y)*r.scale}px`,m.style.width=`${p.box.width*r.scale}px`;let A=pe(p,e,x);m.style.height=`${A*r.scale}px`,m.style.overflow="visible";let w=(e.box.x-p.box.x)*r.scale,b=(e.box.y-p.box.y)*r.scale,k=w+e.box.width*r.scale,L=b+e.box.height*r.scale;m.style.clipPath=`polygon(${w}px ${b}px, ${k}px ${b}px, ${k}px ${L}px, ${w}px ${L}px)`;let E=Object.freeze({x:0,y:0,width:p.box.width,height:p.box.height}),C=y.filter(g=>!eo(g)),f={...r,inertLinks:true,tabLeaderOriginXPt:p.box.x-e.box.x};for(let g of p.fragments)m.append(g.kind==="table"?K(t,g,f):O(t,g,f));ie(t,m,C,Pe(r),E,"inFront",x),a.append(m),pt(t,a,m,e,p,r.scale),nn(t,a,p,y,r,s,"inFront",x);}rt(t,a,e,r);let h=ut(t,e,r.scale,r.changeBars,r.changeBarsToggle);return h&&a.append(h),a}var Rn=30,wn=36,ke=new WeakMap;function ii(t){ke.delete(t);}function kn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Pn(t,e){let o=Object.keys(t);if(o.length!==Object.keys(e).length)return false;for(let n of o){let i=t[n],r=e[n];if(i!==r)return false}return true}function An(t,e){if(t.length!==e.length)return false;for(let o=0;o<t.length;o+=1)if(t[o]!==e[o])return false;return true}function En(t,e){if(t===e)return false;let o=new Set([...Object.keys(t),...Object.keys(e)]);for(let n of o){if(n==="fragments")continue;let i=t[n],r=e[n];if(i!==r&&!(Array.isArray(i)&&Array.isArray(r)&&An(i,r))&&!(typeof i=="object"&&typeof r=="object"&&i!==null&&r!==null&&!Array.isArray(i)&&!Array.isArray(r)&&Pn(i,r)))return false}return true}var Jt="docx-column-separator";function Ln(t,e,o,n){let i=e.content,r=e.blocks;if(!i||!r||i.parentElement!==e.element)return null;let a={...n,paintInstance:`p${o.index}`,tabLeaderOriginXPt:o.contentBox.x-o.box.x},s=new Map,l=[];for(let h of o.fragments){let p=r.get(h)??(h.kind==="table"?K(t,h,a):O(t,h,a));s.set(h,p),l.push(p);}let d=new Set(l),c=i.firstChild;for(;c;){let h=c.nextSibling,p=c;!d.has(p)&&p.classList?.contains(Jt)!==true&&c.remove(),c=h;}let u=i.firstChild;for(;u&&u.classList?.contains(Jt);)u=u.nextSibling;for(let h of l){if(h===u){u=u.nextSibling;continue}i.insertBefore(h,u);}return yt(t,e.element,o,n.scale,n.changeBars,n.changeBarsToggle),{record:o,materialized:true,element:e.element,content:i,blocks:s}}function $n(t,e,o,n){let i=t.element;return !t.materialized&&kn(t.record.box,e.box)&&i.style.left===`${e.box.x*o}px`&&i.style.top===`${e.box.y*o}px`&&i.style.width===`${e.box.width*o}px`&&i.style.height===`${e.box.height*o}px`&&i.getAttribute("aria-hidden")===(n?"true":null)}function Mn(t,e,o={}){Tn(t,e,o);}function Tn(t,e,o,n){t.classList.toggle("docx-show-paragraph-marks",o.showParagraphMarks??false);let i=o.contentControlChrome,r=i?`${i.showAll===true?"1":"0"}:${i.activeIds?[...i.activeIds].sort().join(","):""}:${i.checkedIds?[...i.checkedIds].sort().join(","):""}:${i.tocControlIds?[...i.tocControlIds].sort().join(","):""}:${i.suppressedIds?[...i.suppressedIds].sort().join(","):""}:${i.readOnly===true?"ro":""}`:"",a=o.drawingStrings??be,s=o.imageUrlPort!==void 0?kt(t,o.imageUrlPort):null,l=i?.additionalBoundaries?i.additionalBoundaries.flatMap(f=>f.fragments.map(g=>`${f.id}:${g.pageIndex}:${g.box.x}:${g.box.y}:${g.box.width}:${g.box.height}`)).sort().join(","):"",d=o.readOnlyParagraphIds?[...o.readOnlyParagraphIds].sort().join(","):"",c=o.emptyTocPlaceholderIds?[...o.emptyTocPlaceholderIds].sort().join(","):"",u=i?.tocControlIds?[...i.tocControlIds].sort().join(","):"",h=et(o.revisionStyles,e,n),p={scale:o.scale??96/72,ariaHidden:o.ariaHidden??true,drawingStrings:a,urlRegistry:s,...o.fontAlias?{fontAlias:o.fontAlias}:{},...o.readOnlyParagraphIds?{readOnlyParagraphIds:o.readOnlyParagraphIds}:{},...o.emptyTocPlaceholderIds?{emptyTocPlaceholderIds:o.emptyTocPlaceholderIds}:{},...o.defaultFontFamily?{defaultFontFamily:o.defaultFontFamily}:{},...o.fieldShading?{fieldShading:o.fieldShading}:{},showParagraphMarks:o.showParagraphMarks??false,changeBars:o.changeBars??"all-markup",changeBarsToggle:o.changeBarsToggle??false,...o.shadeFormFields!==void 0?{shadeFormFields:o.shadeFormFields}:{},...h?{revisionStyles:h}:{},...o.imageUrlPort?{imageUrlPort:o.imageUrlPort}:{},...o.activeHeaderFooterRId?{activeHeaderFooterRId:o.activeHeaderFooterRId}:{},...o.activeHeaderFooterPageIndex!==void 0?{activeHeaderFooterPageIndex:o.activeHeaderFooterPageIndex}:{},...i?{contentControlChrome:i}:{}},y=t.ownerDocument,x=`${p.scale}|${p.ariaHidden}|${p.fontAlias?en(p.fontAlias):""}|${p.defaultFontFamily??""}|cc:${r}:${l}|toc:${u}|ro:${d}|tocEmpty:${c}|${o.imageUrlPort?"url":""}|${Bt(a)}|rev:${Qe(h)}|marks:${o.showParagraphMarks??false}|bars:${p.changeBars}:${p.changeBarsToggle}`,m=ke.get(t),A=m?.parameters===x,w=A?new Map(m.pages.map(f=>[f.record,f])):null,b=m?new Map(m.pages.map(f=>[f.record.index,f])):null,k=e.pages.map(f=>{let g=o.materialize?.has(f.index)??true,v=w?.get(f);if(v&&v.materialized===g)return v;let S=b?.get(f.index);if(!g&&S&&$n(S,f,p.scale,p.ariaHidden))return {record:f,materialized:false,element:S.element};if(A&&g&&S?.materialized&&En(S.record,f)){let M=Ln(y,S,f,p);if(M)return M}let R={},_=Sn(y,f,p,g,R);return {record:f,materialized:g,element:_,...R.content?{content:R.content}:{},...R.blocks?{blocks:R.blocks}:{}}});ke.set(t,{parameters:x,pages:k}),t.dataset.revision=String(e.revision),s&&s.reconcile(Dt(e),Ht(e));let L=new Set(k.map(f=>f.element)),E=t.firstChild;for(;E;){let f=E.nextSibling;L.has(E)||E.remove(),E=f;}let C=t.firstChild;for(let f of k){if(f.element===C){C=C.nextSibling;continue}t.insertBefore(f.element,C);}ht(k,p);}function Cn(t,e,o,n){let i=t.ownerDocument,r=n.scale,a=[];for(let s of o){let l=e.pages[s.pageIndex];if(!l)continue;let d=i.createElement("div");d.className=s.className??n.className??"docx-cell-selection-rect",d.style.position="absolute";let c=n.pageOffsetX?.get(s.pageIndex)??0;d.style.left=`${(l.contentBox.x+s.x+c)*r}px`,d.style.top=`${(l.contentBox.y+s.y)*r}px`,d.style.width=`${s.width*r}px`,d.style.height=`${s.height*r}px`,s.reviewAuthor&&(d.dataset.reviewAuthor=s.reviewAuthor.author,d.dataset.reviewAuthorSlot=String(s.reviewAuthor.slot%$),d.style.setProperty("--doc-review-author-current",s.reviewAuthor.color)),s.activeBackground!==void 0&&(d.style.backgroundColor=s.activeBackground,d.style.boxShadow="none"),a.push(d);}t.replaceChildren(...a);}
2
+ exports.a=J;exports.b=Je;exports.c=jn;exports.d=fo;exports.e=Gn;exports.f=vr;exports.g=Bt;exports.h=be;exports.i=Sr;exports.j=we;exports.k=an;exports.l=ii;exports.m=Mn;exports.n=Tn;exports.o=Cn;
@@ -1 +1 @@
1
- import {ye,me,he,ze,ne,pe,xe,Ae}from'./chunk-XRBPZCNK.js';function V(e){return e.kind!=="textValue"}function O(e,t){for(let r of e.children)if(V(r)&&r.localName===t)return r}function A(e,t){return e.attributes.find(r=>r.localName===t)?.value}function z(e){let t=O(e,"pPr"),r=t?O(t,"outlineLvl"):void 0;if(r){let o=A(r,"val");return o!==void 0&&/^[0-8]$/.test(o)?Number(o):null}let n=O(e,"name"),l=n?/^heading\s+([1-9])$/i.exec(A(n,"val")?.trim()??""):null;return l?Number(l[1])-1:null}function M(e,t=0,r=e.length,n){let l=new Set,o=new Map,s=new Map,a=n?[n]:[];n&&l.add(n);for(let d=t;d<r;d+=1){let i=e[d].node;if(me(i,"begin")){a.push(i.id);continue}if(me(i,"separate")){let u=a[a.length-1];u&&(l.add(u),o.set(i.id,u));continue}if(me(i,"end")){let u=a.pop();u&&(l.add(u),s.set(i.id,u));}}return {activeBegins:l,separateBegin:o,endBegin:s}}function b(e,t,r){if(me(r,"begin"))return t.activeBegins.has(r.id)&&e.push({beginId:r.id,separated:false}),true;if(me(r,"separate")){let n=t.separateBegin.get(r.id),l=e[e.length-1];return n&&l?.beginId===n&&(l.separated=true),true}if(me(r,"end")){let n=t.endBegin.get(r.id),l=e[e.length-1];return n&&l?.beginId===n&&e.pop(),true}return false}function F(e){for(let t of e)if(!t.separated)return false;return true}function q(e,t){let r=[];ye(e,r,t);let n=M(r),l=[];return {consume:o=>b(l,n,o),visible:()=>F(l)}}var _=4096,j=ze*16;function C(){return {out:[],runs:[],length:0}}function L(e,t,r,n){if(t.length===0||r===n)return;let l=e.runs[e.runs.length-1];if(l?.runId===t&&l.end===r){e.runs[e.runs.length-1]={runId:t,start:l.start,end:n};return}e.runs.push({runId:t,start:r,end:n});}function N(e,t,r,n){if(t.length>n.left)return false;if(n.left-=t.length,t.length>0){let l=e.length;e.out.push(t),e.length+=t.length,L(e,r,l,e.length);}return true}function D(e,t){let r=e.length;t.text.length>0&&e.out.push(t.text),e.length+=t.text.length;for(let n of t.runs)L(e,n.runId,r+n.start,r+n.end);}function w(e){return {text:e.out.join(""),runs:e.runs}}var U=Object.freeze({text:"",runs:[]});function I(){return {text:he,runs:[]}}function X(e,t,r,n){let l=[];if(!ye(e,l,r))return null;let o=l.reverse(),s=C();for(;o.length>0;){let a=o.pop();if(t==="original"&&a.hiddenInOriginal)continue;if(pe(a.node)){let i=[];if(!ye(a.node,i,r))return null;for(let u=i.length-1;u>=0;u-=1)o.push(i[u]);continue}if(ne(a.node))continue;let d=xe(a.node);if(!N(s,d,a.runId,n))return null}return w(s)}function H(e,t,r,n,l){let o=C(),s=[],a=M(e);for(let d of e){let i=d.node;if(b(s,a,i)||ne(i)||!F(s)||t==="original"&&d.hiddenInOriginal)continue;if(pe(i)){let p=l>=Ae?X(i,t,r,n):v(i,t,r,n,l+1);if(p===null)return null;D(o,p);continue}let u=xe(i);if(!N(o,u,d.runId,n))return null}return w(o)}function v(e,t,r,n,l){let o=[];return ye(e,o,r)?H(o,t,r,n,l):null}function $(e,t,r){let n=t.node;if(e.owned.has(n.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),n.id===e.endId)return true;if(n.id===e.span.node.id||b(e.states,e.markers,n)||e.overflow||ne(n)||pe(n)||!e.owned.has(n.id)||!F(e.states)||r==="original"&&t.hiddenInOriginal)return false;let l=xe(n);return N(e.result,l,t.runId,e.chars)||(e.overflow=true),false}function W(e,t,r="allMarkup"){let n=new Map,l=new Map,o=new Map;for(let i of t)i.kind==="complex"?l.set(i.node.id,i):o.set(i.node.id,i);let s=[];ye(e,s);let a=new Map;for(let i=0;i<s.length;i+=1)a.set(s[i].node.id,i);let d=null;for(let i=0;i<s.length;i+=1){let u=s[i],p=o.get(u.node.id);if(p)if(d!==null&&!F(d.states))n.set(p.node.id,U);else {let f={left:_},S={left:j},g=v(p.node,r,f,S,0);n.set(p.node.id,g??I());}if(d===null){let f=l.get(u.node.id);if(!f)continue;let S=new Set(f.removeNodeIds),g=-1;for(let k=f.removeNodeIds.length-1;k>=0;k-=1){let R=a.get(f.removeNodeIds[k]);if(!(R===void 0||R<=i)&&me(s[R].node,"end")){g=R;break}}let P=s[g];if(!P){n.set(f.node.id,I());continue}d={span:f,owned:S,states:[{beginId:f.node.id,separated:false}],markers:M(s,i+1,g,f.node.id),endId:P.node.id,result:C(),chars:{left:j},nodesLeft:_,overflow:false};}$(d,u,r)&&(n.set(d.span.node.id,d.overflow?I():w(d.result)),d=null);}return d!==null&&n.set(d.span.node.id,I()),n}export{q as a,_ as b,W as c,z as d};
1
+ import {Me,Ae,ve,Ne,Be,De,Le,Oe}from'./chunk-Z65JJLLF.js';function V(e){return e.kind!=="textValue"}function O(e,t){for(let r of e.children)if(V(r)&&r.localName===t)return r}function A(e,t){return e.attributes.find(r=>r.localName===t)?.value}function z(e){let t=O(e,"pPr"),r=t?O(t,"outlineLvl"):void 0;if(r){let o=A(r,"val");return o!==void 0&&/^[0-8]$/.test(o)?Number(o):null}let n=O(e,"name"),l=n?/^heading\s+([1-9])$/i.exec(A(n,"val")?.trim()??""):null;return l?Number(l[1])-1:null}function M(e,t=0,r=e.length,n){let l=new Set,o=new Map,s=new Map,a=n?[n]:[];n&&l.add(n);for(let d=t;d<r;d+=1){let i=e[d].node;if(Ae(i,"begin")){a.push(i.id);continue}if(Ae(i,"separate")){let u=a[a.length-1];u&&(l.add(u),o.set(i.id,u));continue}if(Ae(i,"end")){let u=a.pop();u&&(l.add(u),s.set(i.id,u));}}return {activeBegins:l,separateBegin:o,endBegin:s}}function b(e,t,r){if(Ae(r,"begin"))return t.activeBegins.has(r.id)&&e.push({beginId:r.id,separated:false}),true;if(Ae(r,"separate")){let n=t.separateBegin.get(r.id),l=e[e.length-1];return n&&l?.beginId===n&&(l.separated=true),true}if(Ae(r,"end")){let n=t.endBegin.get(r.id),l=e[e.length-1];return n&&l?.beginId===n&&e.pop(),true}return false}function F(e){for(let t of e)if(!t.separated)return false;return true}function q(e,t){let r=[];Me(e,r,t);let n=M(r),l=[];return {consume:o=>b(l,n,o),visible:()=>F(l)}}var _=4096,j=Ne*16;function C(){return {out:[],runs:[],length:0}}function L(e,t,r,n){if(t.length===0||r===n)return;let l=e.runs[e.runs.length-1];if(l?.runId===t&&l.end===r){e.runs[e.runs.length-1]={runId:t,start:l.start,end:n};return}e.runs.push({runId:t,start:r,end:n});}function N(e,t,r,n){if(t.length>n.left)return false;if(n.left-=t.length,t.length>0){let l=e.length;e.out.push(t),e.length+=t.length,L(e,r,l,e.length);}return true}function D(e,t){let r=e.length;t.text.length>0&&e.out.push(t.text),e.length+=t.text.length;for(let n of t.runs)L(e,n.runId,r+n.start,r+n.end);}function w(e){return {text:e.out.join(""),runs:e.runs}}var U=Object.freeze({text:"",runs:[]});function I(){return {text:ve,runs:[]}}function X(e,t,r,n){let l=[];if(!Me(e,l,r))return null;let o=l.reverse(),s=C();for(;o.length>0;){let a=o.pop();if(t==="original"&&a.hiddenInOriginal)continue;if(De(a.node)){let i=[];if(!Me(a.node,i,r))return null;for(let u=i.length-1;u>=0;u-=1)o.push(i[u]);continue}if(Be(a.node))continue;let d=Le(a.node);if(!N(s,d,a.runId,n))return null}return w(s)}function H(e,t,r,n,l){let o=C(),s=[],a=M(e);for(let d of e){let i=d.node;if(b(s,a,i)||Be(i)||!F(s)||t==="original"&&d.hiddenInOriginal)continue;if(De(i)){let p=l>=Oe?X(i,t,r,n):v(i,t,r,n,l+1);if(p===null)return null;D(o,p);continue}let u=Le(i);if(!N(o,u,d.runId,n))return null}return w(o)}function v(e,t,r,n,l){let o=[];return Me(e,o,r)?H(o,t,r,n,l):null}function $(e,t,r){let n=t.node;if(e.owned.has(n.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),n.id===e.endId)return true;if(n.id===e.span.node.id||b(e.states,e.markers,n)||e.overflow||Be(n)||De(n)||!e.owned.has(n.id)||!F(e.states)||r==="original"&&t.hiddenInOriginal)return false;let l=Le(n);return N(e.result,l,t.runId,e.chars)||(e.overflow=true),false}function W(e,t,r="allMarkup"){let n=new Map,l=new Map,o=new Map;for(let i of t)i.kind==="complex"?l.set(i.node.id,i):o.set(i.node.id,i);let s=[];Me(e,s);let a=new Map;for(let i=0;i<s.length;i+=1)a.set(s[i].node.id,i);let d=null;for(let i=0;i<s.length;i+=1){let u=s[i],p=o.get(u.node.id);if(p)if(d!==null&&!F(d.states))n.set(p.node.id,U);else {let f={left:_},S={left:j},g=v(p.node,r,f,S,0);n.set(p.node.id,g??I());}if(d===null){let f=l.get(u.node.id);if(!f)continue;let S=new Set(f.removeNodeIds),g=-1;for(let k=f.removeNodeIds.length-1;k>=0;k-=1){let R=a.get(f.removeNodeIds[k]);if(!(R===void 0||R<=i)&&Ae(s[R].node,"end")){g=R;break}}let P=s[g];if(!P){n.set(f.node.id,I());continue}d={span:f,owned:S,states:[{beginId:f.node.id,separated:false}],markers:M(s,i+1,g,f.node.id),endId:P.node.id,result:C(),chars:{left:j},nodesLeft:_,overflow:false};}$(d,u,r)&&(n.set(d.span.node.id,d.overflow?I():w(d.result)),d=null);}return d!==null&&n.set(d.span.node.id,I()),n}export{q as a,_ as b,W as c,z as d};
@@ -0,0 +1,5 @@
1
+ import {c,e,b as b$2}from'./chunk-IZT3C23R.js';import {d}from'./chunk-N5WE5O5Q.js';import {d as d$1}from'./chunk-SNN53UPD.js';import {Q as Q$1,Ia,ga,ka,ja,ba,aa,$,Z,_ as _$1,ha,a,ma,pa,Ba,Ga,b as b$3}from'./chunk-VE7YBFQD.js';import {b as b$1,a as a$1}from'./chunk-WVJRO4WY.js';import {gh,b,Dc,Ja,Vd,eb,Ea,Of,Nf,Sc,Fi,Si,Uf,wf,Vf,sh,se,Cj,qe as qe$1,pe,E as E$1,vh,wh,ue,pg,Hc,qb,ve as ve$1,qg,dd,fa,Zf,bh,xb,Wd,Ka,na,pa as pa$1,ma as ma$1,oa,wg,Jc,Lc,Ya,Xa,Gc,xh,qf,De,Qc,sb,kd,kb,Fc,ne,zc,nc,pc,dc}from'./chunk-Z65JJLLF.js';import {Schema}from'prosemirror-model';import {EditorState,TextSelection}from'prosemirror-state';import {EditorView}from'prosemirror-view';import {keymap}from'prosemirror-keymap';import {joinBackward,deleteSelection,joinForward,splitBlock,selectTextblockEnd,selectTextblockStart,baseKeymap}from'prosemirror-commands';function Y(t){return t.attributes?.val}function U(t){let e=Y(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var Po=/^[0-9A-Fa-f]{6}$/,ve=/^\d{1,6}$/,So=/^-?\d{1,6}$/;function We(t){return t===void 0||t==="auto"?null:Po.test(t)?`#${t}`:null}var bo={single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"},Ro={black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"};function vo(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function K(t,e=false){return t===void 0||!(e?So:ve).test(t)?null:`${Number(t)/20}pt`}function bn(t){let e=[],n=[],o=null,s=null;for(let a of t)switch(a.localName){case "b":e.push(`font-weight:${U(a)?"bold":"normal"}`);break;case "i":e.push(`font-style:${U(a)?"italic":"normal"}`);break;case "u":{let r=Y(a)??"single";if(r==="none"||!U(a))break;n.push("underline"),o=bo[r]??"solid",s=We(a.attributes?.color);break}case "strike":U(a)&&n.push("line-through");break;case "dstrike":U(a)&&n.push("line-through");break;case "caps":U(a)&&e.push("text-transform:uppercase");break;case "smallCaps":U(a)&&e.push("font-variant:small-caps");break;case "vertAlign":{let r=Y(a);r==="superscript"?e.push("vertical-align:super","font-size:0.75em"):r==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let r=We(Y(a));r&&e.push(`color:${r}`);break}case "highlight":{let r=Ro[Y(a)??""];r&&e.push(`background-color:${r}`);break}case "sz":{let r=Y(a);r!==void 0&&ve.test(r)&&e.push(`font-size:${Number(r)/2}pt`);break}case "rFonts":{let r=vo(a.attributes?.ascii??a.attributes?.hAnsi);r&&e.push(`font-family:${r}`);break}case "spacing":{let r=K(Y(a),true);r&&e.push(`letter-spacing:${r}`);break}}return n.length>0&&(e.push(`text-decoration-line:${[...new Set(n)].join(" ")}`),o&&e.push(`text-decoration-style:${o}`),s&&e.push(`text-decoration-color:${s}`)),e.join(";")}var To={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function Rn(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let o=To[Y(n)??""];o&&e.push(`text-align:${o}`);break}case "ind":{let o=K(n.attributes?.left??n.attributes?.start,true),s=K(n.attributes?.right??n.attributes?.end,true),a=K(n.attributes?.firstLine),r=K(n.attributes?.hanging);o&&e.push(`margin-left:${o}`),s&&e.push(`margin-right:${s}`),a?e.push(`text-indent:${a}`):r&&e.push(`text-indent:-${r}`);break}case "spacing":{let o=K(n.attributes?.before),s=K(n.attributes?.after);o&&e.push(`margin-top:${o}`),s&&e.push(`margin-bottom:${s}`);let a=n.attributes?.line,r=n.attributes?.lineRule;a!==void 0&&ve.test(a)&&r!=="exact"&&r!=="atLeast"?e.push(`line-height:${(Number(a)/240).toFixed(3)}`):a!==void 0&&ve.test(a)&&e.push(`line-height:${Number(a)/20}pt`);break}case "shd":{let o=We(n.attributes?.fill);o&&e.push(`background-color:${o}`);break}case "pageBreakBefore":U(n)&&e.push("break-before:page");break;}return e.join(";")}var E=new Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=Rn(t.attrs.props??[]);return ["p",{"data-node-id":String(t.attrs.nodeId??""),...e?{style:e}:{}},0]},parseDOM:[{tag:"p",getAttrs:t=>typeof t=="string"?null:{nodeId:t.getAttribute("data-node-id")||null,props:[]}}]},text:{group:"inline"},tab:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"tab",class:"docx-tab"},"\u2192"],parseDOM:[{tag:'span[data-token="tab"]'}]},hardBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["br"],parseDOM:[{tag:"br"}]},pageBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"page-break",class:"docx-page-break"}],parseDOM:[{tag:'span[data-token="page-break"]'}]},unknownInline:{inline:true,group:"inline",atom:true,selectable:false,draggable:false,attrs:{nodeId:{default:null},label:{default:""}},toDOM:t=>["span",{"data-token":"unknown","data-node-id":String(t.attrs.nodeId??""),contenteditable:"false",class:"docx-unknown-inline",title:String(t.attrs.label||"Content this editor cannot edit yet. It is preserved.")}],parseDOM:[{tag:'span[data-token="unknown"]',getAttrs:t=>typeof t=="string"?false:{nodeId:t.getAttribute("data-node-id")||null,label:""}}]}},marks:{runProps:{attrs:{props:{default:[]}},excludes:"runProps",toDOM:t=>{let e=t.attrs.props??[],n=bn(e);return ["span",{"data-run-props":Io(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=Eo(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function Io(t){return JSON.stringify(Array.isArray(t)?t:[])}function Eo(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let n=[];for(let o of e){if(typeof o!="object"||o===null)return null;let s=o;if(typeof s.localName!="string"||s.attributes!==void 0&&(typeof s.attributes!="object"||s.attributes===null))return null;n.push(s.attributes===void 0?{localName:s.localName}:{localName:s.localName,attributes:s.attributes});}return n}catch{return null}}function Ue(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function Te(t,e){return JSON.stringify(Ne(t))===JSON.stringify(Ne(e))}function Ne(t){return [...t].map(e=>({localName:e.localName,attributes:Object.fromEntries(Object.entries(e.attributes??{}).sort(([n],[o])=>n<o?-1:1))})).sort((e,n)=>e.localName<n.localName?-1:1)}function Ye(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue"||n.localName==="rPrChange"||n.localName==="pPrChange")continue;let o={};for(let s of n.attributes)o[s.localName]=s.value;e.push(Object.keys(o).length>0?{localName:n.localName,attributes:o}:{localName:n.localName});}return e}function vn(t){return t.kind==="textValue"?"":`${{drawing:"Picture",pict:"Picture",object:"Embedded object",fldSimple:"Field",hyperlink:"Hyperlink",sdt:"Content control",tbl:"Table"}[t.localName]??t.localName} \u2014 preserved, not editable yet`}function L(t){if(t.kind==="textValue")return [];let e=[],n=a=>{if(a.kind!=="run")return;let r=a.children.find(d=>d.kind==="runProperties"),c=Ye(r);for(let d of a.children)if(d.kind!=="runProperties"){if(d.kind==="tab"){e.push({kind:"tab"});continue}if(d.kind==="hardBreak"){e.push(sb(d)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(d.kind==="text"){let g="";for(let p of d.children)p.kind==="textValue"&&(g+=p.value);g.length>0&&e.push({kind:"text",text:g,props:c});continue}e.push({kind:"unknown",nodeId:d.id,label:vn(d),modelLength:d.kind==="drawing"||kd(d)||kb(d)?1:0});}},o=a=>{if(a.kind==="run"){n(a);return}e.push({kind:"unknown",nodeId:a.id,label:vn(a),modelLength:0});},s=(a,r)=>{for(let c of a)if(!(c.kind==="textValue"||c.kind==="paragraphProperties")&&!(r>=na)){if(pa$1(c)&&!ma$1(c.kind)&&r<na){s(c.children.filter(d=>!wg(c,d)),oa(c,r));continue}if(Jc(c)){let d=Lc(c);d&&s(d,oa(c,r));continue}o(c);}};return s(t.children,0),e}function oe(t){let e=[],n=o=>{if(o.kind!=="textValue"){if(o.kind==="body"){for(let s of o.children)s.kind==="paragraph"&&e.push(s);return}for(let s of o.children)n(s);}};return n(t.root),e}var Tn=gh(16),Nn=new WeakMap;function Mo(t,e){let n=Nn.get(t);if(!n){let o=[];Hc([t],o,0),n=Object.freeze(o),Nn.set(t,n);}for(let o of n)e.push(o);}function _(t){let e=Tn.get(t);if(e)return e;let n=[];for(let o of Dc(t))if(o.root.kind!=="textValue")for(let s of o.root.children)Mo(s,n);return Tn.set(t,n),n}function X(t){let e=oe(t).map(n=>{let o=n.kind==="textValue"?void 0:n.children.find(a=>a.kind==="paragraphProperties"),s=L(n).map(a=>{switch(a.kind){case "text":return E.text(a.text,a.props.length>0?[E.marks.runProps.create({props:a.props})]:[]);case "tab":return E.node("tab");case "hardBreak":return E.node("hardBreak");case "pageBreak":return E.node("pageBreak");default:return E.node("unknownInline",{nodeId:a.nodeId,label:a.label})}});return E.node("paragraph",{nodeId:n.id,props:Ye(o)},s)});return E.node("doc",null,e.length>0?e:[E.node("paragraph")])}function Do(t,e){let n=[];return t.forEach(o=>{if(o.isText&&o.text){n.push({kind:"text",text:o.text,props:Ue(o)});return}o.type.name==="tab"?n.push({kind:"tab"}):o.type.name==="hardBreak"?n.push({kind:"hardBreak"}):o.type.name==="pageBreak"?n.push({kind:"pageBreak"}):o.type.name==="unknownInline"&&n.push({kind:"unknown",nodeId:String(o.attrs.nodeId??""),label:String(o.attrs.label??""),modelLength:e.has(String(o.attrs.nodeId??""))?1:0});}),n}function A(t){let e="";for(let n of t)n.kind==="text"?e+=n.text:n.kind==="tab"?e+=" ":n.kind==="hardBreak"?e+=`
2
+ `:n.kind==="pageBreak"?e+=qb:n.modelLength===1&&(e+=ve$1);return e}function j(t){let e=[],n=0;for(let o of t)o.kind==="text"?n+=o.text.length:o.kind==="tab"||o.kind==="hardBreak"||o.kind==="pageBreak"?n+=1:(e.push(`${o.nodeId}@${n}`),n+=o.modelLength);return e}function Co(t,e){if(t===e)return null;let n=0,o=Math.min(t.length,e.length);for(;n<o&&t[n]===e[n];)n+=1;let s=t.length,a=e.length;for(;s>n&&a>n&&t[s-1]===e[a-1];)s-=1,a-=1;return {start:n,endBefore:s,endAfter:a}}function In(t){let e=[];for(let n of t)if(n.kind==="text")for(let o=0;o<n.text.length;o+=1)e.push(n.props);else n.kind==="tab"||n.kind==="hardBreak"||n.kind==="pageBreak"?e.push(e[e.length-1]??[]):n.kind==="unknown"&&n.modelLength===1&&e.push([]);return e}function wo(t,e,n,o,s){let a=[],r=A(e),c=A(n),d=Co(r,c),g=[],p=0,x=false;for(let m of e){if(m.kind!=="unknown"){p+=m.kind==="text"?m.text.length:1;continue}let u=p;m.modelLength===1&&d&&(d.start<p+1&&d.endBefore>p&&(x=true),d.endBefore<=p&&(u+=d.endAfter-d.endBefore)),g.push(`${m.nodeId}@${u}`),p+=m.modelLength;}if(x||JSON.stringify(g)!==JSON.stringify(j(n)))return {ok:false,reason:"unknown-content-moved",detail:t};if(Te(o,s)||a.push({op:"setParagraphProperties",paragraphId:t,properties:Ne(s)}),d&&(d.endBefore>d.start&&a.push({op:"deleteText",paragraphId:t,start:d.start,end:d.endBefore}),d.endAfter>d.start)){let m=c.slice(d.start,d.endAfter),u=d.start,h="",O=()=>{h.length!==0&&(a.push({op:"insertText",paragraphId:t,offset:u,text:h}),u+=h.length,h="");};for(let P of m)P===" "?(O(),a.push({op:"insertTab",paragraphId:t,offset:u}),u+=1):P===`
3
+ `?(O(),a.push({op:"insertHardBreak",paragraphId:t,offset:u}),u+=1):P===qb?(O(),a.push({op:"insertPageBreak",paragraphId:t,offset:u}),u+=1):h+=P;O();}if(!d){let m=In(e),u=In(n),h=0;for(;h<u.length;){if(Te(m[h]??[],u[h])){h+=1;continue}let O=h,P=u[h];for(;h<u.length&&Te(u[h],P)&&!Te(m[h]??[],u[h]);)h+=1;a.push({op:"setRunProperties",paragraphId:t,start:O,end:h,properties:Ne(P)});}}return {ok:true,ops:a}}function Je(t,e){let n=oe(t),o=new Set;for(let c of n)for(let d of L(c))d.kind==="unknown"&&d.modelLength===1&&o.add(d.nodeId);let s=c=>Do(c,o),a=[];if(e.forEach(c=>{c.type.name==="paragraph"&&a.push(c);}),a.length!==e.childCount)return {ok:false,reason:"unsupported-node"};let r=a.length-n.length;if(r===0){let c=[];for(let[d,g]of a.entries()){let p=n[d];if(g.attrs.nodeId!==p.id)return {ok:false,reason:"paragraph-reordered",detail:String(g.attrs.nodeId)};let x=wo(p.id,L(p),s(g),Ye(p.kind==="textValue"?void 0:p.children.find(m=>m.kind==="paragraphProperties")),g.attrs.props??[]);if(!x.ok)return x;c.push(...x.ops);}return {ok:true,ops:c}}return r===1?Ao(n,a,s):r===-1?Fo(n,a,s):{ok:false,reason:"paragraph-count-unexplained",detail:String(r)}}function Ao(t,e,n){for(let o=0;o<t.length;o+=1){let s=t[o],a=e[o],r=e[o+1];if(!a||!r||a.attrs.nodeId!==s.id)continue;let c=r.attrs.nodeId;if(c!==null&&c!==s.id)continue;let d=n(a),g=n(r),p=L(s),x=A(d);if(x+A(g)===A(p)&&JSON.stringify(j([...d,...g]))===JSON.stringify(j(p))&&En(t,e,o,n)&&Mn(t,e,o+1,o+2,n))return {ok:true,ops:[{op:"splitParagraph",paragraphId:s.id,offset:x.length}]}}return {ok:false,reason:"split-not-clean"}}function Fo(t,e,n){for(let o=0;o+1<t.length;o+=1){let s=t[o],a=t[o+1],r=e[o];if(!r||r.attrs.nodeId!==s.id)continue;let c=[...L(s),...L(a)],d=n(r);if(A(d)===A(c)&&JSON.stringify(j(d))===JSON.stringify(j(c))&&En(t,e,o,n)&&Mn(t,e,o+2,o+1,n))return {ok:true,ops:[{op:"joinParagraphs",firstId:s.id,secondId:a.id}]}}return {ok:false,reason:"join-not-clean"}}function En(t,e,n,o){for(let s=0;s<n;s+=1){let a=e[s],r=t[s];if(!a||a.attrs.nodeId!==r.id||A(o(a))!==A(L(r))||JSON.stringify(j(o(a)))!==JSON.stringify(j(L(r))))return false}return true}function Mn(t,e,n,o,s){for(let a=0;n+a<t.length;a+=1){let r=t[n+a],c=e[o+a];if(!c||c.attrs.nodeId!==r.id||A(s(c))!==A(L(r))||JSON.stringify(j(s(c)))!==JSON.stringify(j(L(r))))return false}return true}function Bo(t,e){return Ja(t,e)!==null}function Ge(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return X(e);let o=new Map;t.forEach(d=>{let g=d.attrs.nodeId;typeof g=="string"&&o.set(g,d);});let s=new Set(n.dirty),a=oe(e);if(a.length!==t.childCount)return X(e);let r=X(e),c=[];for(let[d,g]of a.entries()){let p=o.get(g.id);c.push(p&&!s.has(g.id)?p:r.child(d));}return E.node("doc",null,c)}var Lo=8*1024*1024;function Dn(){let t=new WeakMap;return e=>{let n=t.get(e);if(n)return n.slice();let o=Wd(e);return t=new WeakMap,o.byteLength<=Lo&&t.set(e,o.slice()),o}}function wn(t){return _(t).map(e=>Cj(t,e.id)??"").join(`
4
+ `)}var _o=64,Cn=new WeakMap;function Ke(t,e=0){if(e>_o)return false;let n=Cn.get(t);if(n!==void 0)return n;let o=false;for(let s of t.children)if(s.kind!=="textValue"&&(s.kind==="commentRangeStart"||s.kind==="commentReference"||Ke(s,e+1))){o=true;break}return Cn.set(t,o),o}function jo(t,e){let n=t.kind==="revision"?t.ranges[0]??null:t.range;if(!n)return null;let o=e.get(n.start.paragraphId);return o===void 0?null:o}function An(t,e,n){for(let s of e)if(s.ranges.length===0)return false;let o=new Set;for(let s of t)s.kind!=="revision"||s.ranges.length>0||Bn(s,n)||o.add(ma(s));for(let s of e)if(o.has(ma(s)))return false;return true}function Fn(t,e,n,o){let s=e.get(n);if(s===void 0)return [...t];let a=[],r=null;for(let c of t){if(c.kind==="revision"&&Bn(c,n)){r===null&&(r=a.length);continue}if(r===null){let d=jo(c,e);d!==null&&d>s&&(r=a.length);}a.push(c);}if(r===null&&(r=a.length),o.length>0){let c=o.length<2?[...o]:[...o].sort((d,g)=>pa(d,e)-pa(g,e));a.splice(r,0,...c);}return Ba(a)}function Bn(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function Ho(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function $o(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function zo(t,e){return t.ranges.length===0||!t.ranges.some(o=>o.start.paragraphId===e||o.end.paragraphId===e)?false:!t.ranges.every(o=>o.start.paragraphId===e&&o.end.paragraphId===e)}function Ln(t,e,n,o,s,a,r){if(t.fromRevision!==e.bodyRevision||r!==e.packageRevision+1||t.story!==void 0&&t.story.kind!=="body"||t.impact!=="text-local"||t.dirty.length!==1||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0||e.commentsPart!==s||e.commentsExtendedPart!==a)return null;let c=t.dirty[0],d=Ja(o,c);if(!d||d.kind!=="paragraph")return null;let g=Ka(o,c);if(g){let p=g.children.findIndex(m=>m.id===c),x=g.children[p-1];if(x?.kind==="paragraph"&&Fi({...o,root:x}).some(m=>m.paragraphMark))return null}for(let p of n){if(p.kind==="comment"){if(Ho(p,c))return null;continue}if(p.kind==="custom"){if(p.range?.start.paragraphId===c)return null;continue}if($o(p,c)||zo(p,c))return null}return c}var Hn=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,Wo=["ascii","hAnsi","cs","eastAsia"],Uo=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],Yo=128,Jo=/[\u0000-\u001F\u007F-\u009F]/;function F(t){return t.kind!=="textValue"}function Q(t,e){return t.attributes.find(n=>n.localName===e)?.value}function $n(t,e){let n=new Map;for(let s of t)for(let a of s.children)if(F(a))for(let[r,c]of Un(a,e))n.has(r)||n.set(r,c);let o=[...n.values()];return o.sort((s,a)=>s<a?-1:s>a?1:0),o}var Xe=new WeakMap,zn=16,Wn=32;function Un(t,e,n=0){let o=e?.major??null,s=e?.minor??null,a=e?.majorEastAsia??null,r=e?.minorEastAsia??null,c=e?.majorBidi??null,d=e?.minorBidi??null,g=Xe.get(t);if(g&&g.major===o&&g.minor===s&&g.majorEastAsia===a&&g.minorEastAsia===r&&g.majorBidi===c&&g.minorBidi===d)return g.byFold;if(t.children.length>=zn&&n<Wn&&t.localName!=="rFonts"){let u=new Map;for(let h of t.children)if(F(h))for(let[O,P]of Un(h,e,n+1))u.has(O)||u.set(O,P);return Xe.set(t,{major:o,minor:s,majorEastAsia:a,minorEastAsia:r,majorBidi:c,minorBidi:d,byFold:u}),u}let p=new Map,x=u=>{if(!u||!Hn.test(u))return;let h=u.toLowerCase();p.has(h)||p.set(h,u);},m=[t];for(;m.length>0;){let u=m.pop();if(F(u)){if(u.localName==="rFonts"){for(let h of Wo)x(Q(u,h));if(e)for(let h of Uo)x(b$3(Q(u,h),e));}for(let h=u.children.length-1;h>=0;h-=1)m.push(u.children[h]);}}return Xe.set(t,{major:o,minor:s,majorEastAsia:a,minorEastAsia:r,majorBidi:c,minorBidi:d,byFold:p}),p}function Yn(t){let e=new Map;for(let o of t)for(let s of o.children)if(F(s))for(let[a,r]of Jn(s))e.has(a)||e.set(a,r);let n=[...e.values()];return n.sort((o,s)=>o<s?-1:o>s?1:0),n}var _n=new WeakMap,Go=new Map;function Jn(t,e=0){let n=_n.get(t);if(n)return n;let o=r=>{let c=r.size===0?Go:r;return _n.set(t,c),c},s=new Map;if(t.children.length>=zn&&e<Wn&&t.localName!=="sym"){for(let r of t.children)if(F(r))for(let[c,d]of Jn(r,e+1))s.has(c)||s.set(c,d);return o(s)}let a=[t];for(;a.length>0;){let r=a.pop();if(F(r)){if(r.localName==="sym"&&r.namespaceUri===fa){let c=r.attributes.find(g=>g.localName==="font"&&(g.namespaceUri===fa||g.namespaceUri===""))?.value,d=b$2(c);d!==null&&!s.has(d.toLowerCase())&&s.set(d.toLowerCase(),d);}for(let c=r.children.length-1;c>=0;c-=1)a.push(r.children[c]);}}return o(s)}function Gn(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(F(n)){if(n.localName==="t"&&n.namespaceUri===fa){for(let o of n.children)if(!F(o)&&o.value.length>0)return true;continue}for(let o of n.children)e.push(o);}}return false}var Ko=new Set(["paragraph","character","table","numbering"]),Xo=/^[0-9A-Fa-f]{6}$/,Qo=16,jn=new Map([["normal",0],["title",1],["subtitle",2],["heading 1",11],["heading 2",12],["heading 3",13],["heading 4",14],["heading 5",15],["heading 6",16],["heading 7",17],["heading 8",18],["heading 9",19]]);function Kn(t){return t.children}function Qe(t,e){for(let n of Kn(t))if(F(n)&&n.localName===e)return n}function Vo(t){return jn.get(t.name.toLowerCase())??jn.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function Ve(t){return t===void 0||t.length===0||t.length>Yo||Jo.test(t)?null:t}function Xn(t,e){if(!t)return [];let n=new Map;for(let a of t.children){if(!F(a)||a.localName!=="style")continue;let r=Ve(Q(a,"styleId"));r!==null&&!n.has(r)&&n.set(r,a);}let o=a=>{let r=false,c=false,d=null,g=false,p=false,x=new Set,m=a;for(let O=0;O<Qo&&m!==null&&!x.has(m);O+=1){x.add(m);let P=n.get(m);if(!P)break;let R=Qe(P,"rPr");for(let v of R?Kn(R):[]){if(!F(v))continue;let N=Q(v,"val"),C=N!=="0"&&N!=="false"&&N!=="off";v.localName==="b"&&!g?(r=C,g=true):v.localName==="i"&&!p?(c=C,p=true):v.localName==="color"&&d===null&&N&&Xo.test(N)&&(d=N);}let b=Qe(P,"basedOn");m=b?Ve(Q(b,"val")):null;}let u=e?.(a),h=u?.fontFamily??null;return {fontFamily:h!==null&&Hn.test(h)?h:null,fontSizePt:u?.fontSizeHalfPoints!=null&&u.fontSizeHalfPoints>0?u.fontSizeHalfPoints/2:null,bold:r,italic:c,color:d}},s=[];for(let[a,r]of n){let c=Q(r,"type");if(c===void 0||!Ko.has(c))continue;let d=Qe(r,"name"),g=Ve(d?Q(d,"val"):void 0);s.push({styleId:a,name:g??a,type:c,preview:o(a)});}return s.map((a,r)=>({entry:a,index:r,rank:Vo(a)})).sort((a,r)=>a.rank-r.rank||a.index-r.index).map(a=>a.entry)}var qo=128,Zo=/[\u0000-\u001F\u007F-\u009F]/,er=/[\u0000-\u001F\u007F-\u009F]/g,tr=200;function Ze(t){return t.kind!=="textValue"}function Qn(t,e){for(let n of t.children)if(Ze(n)&&n.localName===e)return n}function qe(t,e){return t.attributes.find(n=>n.localName===e)?.value}function nr(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!Ze(n)||n.localName!=="style"||qe(n,"type")!=="paragraph")continue;let o=qe(n,"styleId");if(o===void 0||o.length===0||o.length>qo||Zo.test(o))continue;let s=d$1(n);s!==null&&e.set(o,s);}return e}function et(t){let e=Qn(t,"pPr"),n=e?Qn(e,"pStyle"):void 0;return n?qe(n,"val"):void 0}function Vn(t,e){let n=nr(e);if(n.size===0)return [];let o=[];for(let s of oe(t)){if(!Ze(s))continue;let a=et(s);if(a===void 0)continue;let r=n.get(a);if(r===void 0)continue;let d=(Cj(t,s.id)??"").replace(er," ").trim().slice(0,tr);d.length!==0&&o.push({text:d,level:r,blockId:s.id});}return o}function or(t,e,n){let o=new Map,s=n(t);for(let a of s){let r=o.get(a.hostParagraphId);r?r.push(a):o.set(a.hostParagraphId,[a]);}return o}function rr(t,e,n){let o=[];for(let s of Gc(t.root)){let a=e.get(s.id);if(a)for(let r of a)o.push(r);}return o}function qn(t,e,n=xh){let o=[],s=new Map;for(let a of t){if(o.push(a),a.scope?.kind==="note")continue;let r=s.get(a.part);r||(r=or(a.part,e,n),s.set(a.part,r));for(let c of rr(a,r)){let d=a.scope;o.push({part:a.part,root:c.root,scope:{kind:"frame",id:c.root.id,drawingNodeId:c.drawingNodeId,hostParagraphId:c.hostParagraphId,...d?.kind==="headerFooter"?{owner:d}:{}}});}}return o}var Ie=48,ar=/[\u0000-\u001F\u007F-\u009F]/g;function sr(t){let e=[],n=qf(t),o=new Map;for(let s of n.segments)De(s.node)&&o.set(s.node.id,s.formatRunIds??[]);return Qc(t.children,0,s=>{if(s.kind==="run"){e.push({id:s.id,start:n.spanOf(s)?.start??0});return}if(De(s))for(let a of o.get(s.id)??[]){let r=n.spanOf(a);r&&e.push({id:a,start:r.start});}},{descendRevisions:true}),e}function ir(t){let e=Fc(t);return e?[{part:t,root:e}]:[]}function lr(t,e){let n=[];for(let o of ["header","footer"])for(let s of t){let a=o==="header"?s.headers:s.footers;for(let[r,c]of a){if(!ne(s,r)||e.has(c.part))continue;e.add(c.part);let d=Dc(c.part).find(g=>g.kind===o);d&&n.push({part:c.part,root:d.root,scope:{kind:"headerFooter",rId:c.rId}});}}return n}function Zn(t,e,n){if(!t)return [];let o=[];for(let s of zc(t.root)){let a=nc(s);!pc(s)||a===null||!n.has(a)||o.push({part:t,root:s,scope:{kind:"note",id:dc(e,a)}});}return o}function cr(t,e){let n=ir(t);if(e){let o=new Set;for(let s of lr(e.headerFooterBySection,o))n.push(s);for(let s of Zn(e.footnotes,"footnote",e.referencedNoteIds.footnote))n.push(s);for(let s of Zn(e.endnotes,"endnote",e.referencedNoteIds.endnote))n.push(s);}return qn(n)}function eo(t,e){if(t.length===0)return {index:0,offset:e};for(let n=t.length-1;n>=0;n-=1){let o=t[n].start;if(e>=o)return {index:n,offset:e-o}}return {index:0,offset:e}}function dr(t,e,n){let o=t.findIndex(s=>s.id===e);return o<0?null:{index:o,offset:n}}function tt(t,e){return t.replace(ar," ").slice(0,e)}var ur=1e3;function to(t,e,n={},o){let s=n.limit!==void 0&&Number.isInteger(n.limit)&&n.limit>0?Math.min(n.limit,2e3):2e3,a={...n.matchCase===void 0?{}:{matchCase:n.matchCase},...n.wholeWord===void 0?{}:{wholeWord:n.wholeWord}},r=e.slice(0,ur),c=r.map(()=>({matches:[],truncated:false})),d$1=r.map((p,x)=>Ga(p)?x:-1);if(d$1=d$1.filter(p=>p>=0),d$1.length===0)return c;let g=n.stories==="body"?void 0:o;for(let p of cr(t,g)){let x=0;for(let m of Gc(p.root)){if(m.kind!=="paragraph")continue;let u=x;x+=1;let h=Cj(p.part,m.id)??"",O=d(m,h);if(O.text.length===0)continue;let P=null,R=false;for(let b of d$1){let v=c[b],N=s-v.matches.length,C=O.findOccurrences(r[b],Math.max(N,1),a);if(N===0&&C.matches.length>0){v.truncated=true,R=true;continue}for(let T of C.matches){let w=T.start+T.length;P??=sr(m);let M=O.resultRunAddressAt(T.start),V=M?dr(P,M.runId,M.offset)??eo(P,T.rawStart):eo(P,T.rawStart);v.matches.push({blockId:m.id,start:T.rawStart,length:T.rawEnd-T.rawStart,paragraphIndex:u,runIndex:V.index,runOffset:V.offset,...p.scope?{scope:p.scope}:{},text:tt(O.text.slice(T.start,w),256),contextBefore:tt(O.text.slice(Math.max(0,T.start-Ie),T.start),Ie),contextAfter:tt(O.text.slice(w,w+Ie),Ie)});}C.truncated&&(v.truncated=true,R=true);}if(R&&(d$1=d$1.filter(b=>!c[b].truncated)),d$1.length===0)return c}}return c}var pr=32;function no(t){let e=null;return((n,o)=>{let s=t.revision(),a=typeof n!="string",r=`${o?.matchCase===true?"c":""}${o?.wholeWord===true?"w":""}`,c=`${o?.limit??""}:${o?.stories??"all"}`,d=JSON.stringify([r,c,n]);e?.revision!==s&&(e={revision:s,results:new Map});let g=e.results.get(d);if(g)return g;let p=t.bodyPart(),x=t.currentPackage(),m={footnote:new Set,endnote:new Set};for(let O of qg(p))m[O.noteKind].add(O.noteId);let u=to(p,a?n:[n],o,{headerFooterBySection:t.headerFooterBySection(),footnotes:pg(x,"footnote")??null,endnotes:pg(x,"endnote")??null,referencedNoteIds:m}),h=a?u:u[0];return e.results.size>=pr&&e.results.delete(e.results.keys().next().value),e.results.set(d,h),h})}var fr=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];function re(t,e=null){return a(t,e)}function oo(t){let e=dd(t),n=[];for(let o of fr){let s=e.get(o);if(!s)return [];n.push({slot:o,hex:s});}return n}var ro=new WeakMap;function ot(t){let e=ro.get(t);if(e!==void 0)return e;let n=Ya(t),o=n===null||!Xa(n)?null:n;return ro.set(t,o),o}var nt=class{#e;#t;constructor(e,n){this.#e=e,this.#t=n;}get size(){return this.#e.size}get(e){if(this.#e.has(e))return this.#t.find(n=>e.startsWith(`${n.name}#`))}has(e){return this.get(e)!==void 0}*entries(){for(let e of this.#e.keys()){let n=this.get(e);n&&(yield [e,n]);}}keys(){return this.#e.keys()}*values(){for(let[,e]of this.entries())yield e;}[Symbol.iterator](){return this.entries()}forEach(e,n){for(let[o,s]of this.entries())e.call(n,s,o,this);}};function ao(t,e){return Object.freeze({...t,partByNode:new nt(t.ordinalByNode,e)})}function so(t){let e=new Map,n=new Map,o=new Map,s=new Set,a=new Map,r=new Map,c=0;for(let d of t)for(let g of _(d)){o.set(g.id,c),a.set(g.id,d),c+=1;let p=ot(g);if(p===null)continue;e.set(g.id,p);let x=p.toUpperCase(),m=r.get(x);m?(m.push(g.id),s.add(x)):(r.set(x,[g.id]),n.set(x,g.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:o,ambiguousParaIds:s,partByNode:a,claimantsByParaId:r})}function io(t,e){let n=t.indexOf("#");if(n<=0)return null;let o=t.slice(0,n),s=e.body.name===o?e.body:void 0;s??=e.openStories.find(c=>c.name===o);let a=s?void 0:e.otherStories.find(c=>c.name===o);if(s??=a?e.normalize(a):void 0,!s)return null;let r=Ja(s,t);return r?.kind==="paragraph"?ot(r):null}var lo={committed:false,rejected:false,opCount:0};function H(t,e){return e===void 0?{committed:false,rejected:true,opCount:t}:{committed:false,rejected:true,opCount:t,reason:e}}function co(t,e,n={}){let o=e.filter(p=>p.ops.length>0),s=n.partOps??[],a=[...o,...s].reduce((p,x)=>p+x.ops.length,0);if(a===0)return n.packageEdits?.length?H(0,"invalidArgs"):lo;if([...o,...s].some(p=>p.ops.some(Zf))||[...o,...s].some(p=>p.ops.some(bh)))return H(a,"invalidArgs");let[r,...c]=o,d=[];for(let p of c){let x=t.partFor(p.scope);if(!x)return H(a,"unknown-part");d.push({partName:x.name,ops:p.ops});}let g=t.transact(r?.scope??{kind:"body"},p=>{for(let x of n.packageEdits??[])p.applyPackage(x);for(let x of r?.ops??[])p.apply(x);for(let x of d)for(let m of x.ops)p.applyTo(x.partName,m);for(let x of s)for(let m of x.ops)p.applyTo(x.partName,m);},n);return g.ok?{committed:true,rejected:false,opCount:a}:H(a,g.reason)}function uo(t,e,n,o,s,a){let r=a.partOps??[],c=e.length+r.reduce((x,m)=>x+m.ops.length,0);if(c===0&&!a.packageEdits?.length)return lo;if(r.some(x=>x.ops.some(m=>Zf(m)||bh(m))))return H(c,"invalidArgs");let d=e.filter(x=>Zf(x)||bh(x)).length;if(d>0){if(r.length||a.packageEdits?.length||d!==e.length||e.length!==1)return H(e.length,"invalidArgs");let x=xb(a.actorId,()=>t.applyLifecycleOp(e[0]));return x.ok?{committed:true,rejected:false,opCount:1}:H(1,x.detail??x.reason)}let g=a.recordsHistory===false&&a.actorId&&a.operationId?t.partFor(s)?.name:void 0,p=t.transact(s,x=>{n!==void 0&&x.selectionBefore(n),o!==void 0&&x.selectionAfter(o);for(let m of a.packageEdits??[])x.applyPackage(m);for(let m of e)x.apply(m);for(let m of r)for(let u of m.ops)x.applyTo(m.partName,u);g&&x.applyPackage(m=>a$1(m,g,e));},a);return p.ok?{committed:true,rejected:false,opCount:c}:H(c,p.reason)}var mr=Object.freeze([]);function gr(t,e$1={}){let n=Vd(t);if(!n.ok)return {ok:false,reason:n.reason,...n.detail?{detail:n.detail}:{}};let o=n.package,s=o.parts.get(o.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-tree",detail:o.mainDocumentPart};let a=eb(s),r=new Q$1(o,Ia(o,a)),c$1=null,d=null,g=null,p=null,x=null;r.subscribe(i=>{p=i,x=r.currentPackage();});let m=()=>r.bodyStore(),u=()=>r.currentPackage(),h=Dn(),O=Object.freeze({kind:"body"}),P=(i,l)=>{let f=l?.find(k=>k.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");if(!f)return;let y=E$1(f);return y.mode==="Internal"&&y.target.ok?i.parts.get(y.target.partName):void 0},R=(i,l,f)=>{if(i.mainRelationships!==f||i.settingsPart!==P(l,f))return false;for(let y of i.resolution)for(let k of [y.headers,y.footers])for(let S of k.values())if(l.parts.get(S.partName)!==S.part)return false;return true},b=()=>{let i=u(),l=i.relationships.get(i.mainDocumentPart);if(c$1&&p&&x===i&&R(c$1,i,l)&&c$1.packageRevision===p.fromRevision&&r.packageRevision===p.toRevision&&p.story?.kind==="body"&&p.impact==="text-local"&&p.created.length===0&&p.deleted.length===0&&p.splitJoin.length===0&&(c$1={...c$1,packageRevision:r.packageRevision,pkg:i,mainRelationships:l,settingsPart:P(i,l)}),!c$1||c$1.packageRevision!==r.packageRevision||c$1.pkg!==i){let f=qe$1(i);c$1={packageRevision:r.packageRevision,pkg:i,mainRelationships:l,settingsPart:P(i,l),resolution:f,parts:pe(f)};}return c$1},v="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",N="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",C=null,T=()=>{let i=u(),l=(i.relationships.get(i.mainDocumentPart)??[]).find(k=>k.type===v),f;if(l){let k=E$1(l);k.mode==="Internal"&&k.target.ok&&(f=i.parts.get(k.target.partName));}f??=i.parts.get("/word/styles.xml");let y=f?.root??null;return y!==C&&(C=y,le=null,G=null),C},w=null,M=null,V=()=>{let i=u();if(w===i)return M;w=i;let l=(i.relationships.get(i.mainDocumentPart)??[]).find(y=>y.type===N),f;if(l){let y=E$1(l);y.mode==="Internal"&&y.target.ok&&(f=i.parts.get(y.target.partName));}return f??=i.parts.get("/word/numbering.xml"),M=f?.root??null,M},fo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",rt=null,pe$1=null,J=()=>{let i=u();if(rt===i)return pe$1;rt=i;let l=(i.relationships.get(i.mainDocumentPart)??[]).find(k=>k.type===fo),f;if(l){let k=E$1(l);k.mode==="Internal"&&k.target.ok&&(f=i.parts.get(k.target.partName));}f??=i.parts.get("/word/settings.xml");let y=f?.root??null;return y!==pe$1&&(pe$1=y,ge=null,le=null,G=null),pe$1},mo="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",at=(i,l)=>{let f=u(),y=(f.relationships.get("/")??[]).find(S=>S.type===i),k;if(y){let S=E$1(y);S.mode==="Internal"&&S.target.ok&&(k=f.parts.get(S.target.partName));}return k??f.parts.get(l)},st=null,Ee=vh,yo=()=>{let i=u();if(st===i)return Ee;st=i;let l=at(mo,"/docProps/core.xml"),f=at(go,"/docProps/app.xml");return Ee=wh(l?.root??null,f?.root??null),Ee},ho="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",it=null,fe=null,q=()=>{let i=u();if(it===i)return fe;it=i;let l=(i.relationships.get(i.mainDocumentPart)??[]).find(k=>k.type===ho),f;if(l){let k=E$1(l);k.mode==="Internal"&&k.target.ok&&(f=i.parts.get(k.target.partName));}f??=i.parts.get("/word/theme/theme1.xml");let y=f?.root??null;return y!==fe&&(fe=y,ge=null,Me=null,le=null,G=null),fe},xo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",me=null,ko=()=>{if(me)return me;let i=u(),l=(i.relationships.get(i.mainDocumentPart)??[]).find(y=>y.type===xo),f;if(l){let y=E$1(l);y.mode==="Internal"&&y.target.ok&&(f=i.parts.get(y.target.partName));}return f??=i.parts.get("/word/fontTable.xml"),me=Object.freeze(ue(i,f)),me},ae=null,Z$1=null,se$1=null,ie=null,le=null,Me=null,ge=null,lt=()=>{let i=[m().part.root],l=new Set;for(let f of $$1())l.has(f)||(l.add(f),i.push(f.root));return i},De=()=>{let i=lt(),l=T();return l&&i.splice(1,0,l),i},G=null,ye=null,ce=null,ee=null,ct=new WeakMap,he=null,dt=i=>{let l=ct.get(i);if(l)return l;let f=eb(i);return ct.set(i,f),f},ut=()=>{let i=r.packageRevision,l=r.openStoryToken();if(!ee||ee.revision!==i||ee.openStories!==l){let f=r.openStoryParts(),y=new Set(f.map(B=>B.name)),k=$$1().filter(B=>!y.has(B.name)).map(dt),S=[m().part,...f,...k],I=ee,D=I!==null&&p!==null&&I.openStories===l&&I.revision===p.fromRevision&&i===p.toRevision&&p.impact==="text-local"&&p.created.length===0&&p.deleted.length===0&&p.splitJoin.length===0&&I.parts.length===S.length&&I.parts.every((B,te)=>B.name===S[te]?.name);ee={revision:i,openStories:l,parts:S,index:D&&I?ao(I.index,S):so(S)};}return ee.index},pt=()=>{let i=m().part.name,l=new Map;for(let f of [m().part,...$$1()])for(let[y,k]of ha(u(),f.name,i))l.set(y,k);return l},Oo=()=>[m().part,...$$1()],$$1=()=>{let i=[],l=new Set;for(let y of b().parts)for(let k of [y.headers,y.footers])for(let S of k.values())l.has(S)||(l.add(S),i.push(S));let f=u();for(let y of ["footnote","endnote"]){let k=pg(f,y);!k||l.has(k)||(l.add(k),i.push(k));}return i};return {ok:true,session:{editable:_(m().part).length>0,paragraphIds:()=>_(m().part).map(i=>i.id),paragraphIdsIn(i=O){let l=r.partFor(i);return l?_(l).map(f=>f.id):[]},part:()=>m().part,partFor:i=>r.partFor(i),currentPackage:u,collaborationPort:i=>b$1(r,{documentId:i}),applyTreeOps(i,l,f,y=O,k={}){return uo(r,i,l,f,y,k)},applyTreeOpsAtomic(i,l={}){return co(r,i,l)},projectDoc:()=>X(m().part),reconcile:i=>Ge(i,m().part,p),lastCommitWasStructural:()=>p!==null&&(p.created.length>0||p.deleted.length>0||p.splitJoin.length>0||p.impact==="global"),applyPmDoc(i){let l=m(),f=Je(l.part,i);if(!f.ok)return {committed:false,rejected:true,opCount:0,reason:f.reason};if(f.ops.length===0)return {committed:false,rejected:false,opCount:0};let y=r.transact(O,k=>{for(let S of f.ops)k.apply(S);});return y.ok?{committed:true,rejected:false,opCount:f.ops.length}:{committed:false,rejected:true,opCount:f.ops.length,reason:y.reason}},storyParts:Oo,bodyText:()=>wn(m().part),storyText(i){let l=r.partFor(i);return l?_(l).map(f=>Cj(l,f.id)??"").join(`
5
+ `):null},revision:()=>m().revision,revisionFor:i=>r.revisionFor(i),packageRevision:()=>r.packageRevision,canUndo:()=>r.canUndo,canRedo:()=>r.canRedo,undo:()=>{let i=r.selectionForUndo();return r.undo()===null?null:i},redo:()=>{let i=r.selectionForRedo();return r.redo()===null?null:i},beginComposition:(i=O)=>{r.beginComposition(i);},endComposition:()=>r.endComposition(),subscribe(i){return r.subscribe(i)},save(){return h(u())},headerFooterParts:()=>{let i=b().parts;return i[i.length-1]??se(u())},headerFooterPartsBySection:()=>b().parts,headerFooterResolutionBySection:()=>b().resolution,documentFonts(){return ae&&ae.revision===r.packageRevision||(ae={revision:r.packageRevision,fonts:$n(De(),re(q(),J()))}),ae.fonts},symbolFontFamilies(){return se$1&&se$1.revision===r.packageRevision||(se$1={revision:r.packageRevision,fonts:Yn(De())}),se$1.fonts},renderedFontFamilies(){let i=T();return Z$1&&Z$1.revision===r.packageRevision&&Z$1.styles===i||(Z$1={revision:r.packageRevision,styles:i,families:e(lt(),i,re(q(),J()))}),Z$1.families},rendersText(){return ie&&ie.revision===r.packageRevision||(ie={revision:r.packageRevision,rendersText:Gn(De())}),ie.rendersText},documentStyles(){let i=T(),l=q(),f=J();G??=c(i,re(l,f));let y=G;return le??=Xn(i,k=>y(k)),le},stylesRoot:()=>T(),documentThemeFonts(){let i=q(),l=J();return ge??=re(i,l),ge},numberingRoot:()=>V(),settingsRoot:()=>J(),documentProperties:()=>yo(),trackingSettings:()=>sh(J()),documentThemeColors(){let i=q();return Me??=oo(i),Me},effectiveRunDefaults(i,l){let f=T(),y=q(),k=J();G??=c(f,re(y,k));let S=m();if(!ye||ye.revision!==S.revision){let I=new Map;for(let D of _(S.part))D.kind!=="textValue"&&I.set(D.id,et(D)??null);ye={revision:S.revision,byId:I};}return G(ye.byId.get(i)??null,l)},documentOutline(){let i=m();return ce&&ce.revision===i.revision||(ce={revision:i.revision,outline:Vn(i.part,T())}),ce.outline},findText:no({revision:()=>r.packageRevision,bodyPart:()=>m().part,currentPackage:u,headerFooterBySection:()=>b().resolution}),embeddedFonts:ko,paragraphAnchors:ut,paraIdOf:i=>io(i,{body:m().part,openStories:r.openStoryParts(),otherStories:$$1(),normalize:dt}),nodeIdOf:i=>ut().nodeByParaId.get(i.toUpperCase())??null,relationshipTarget:(i,l=O)=>{let f=u(),y=r.partFor(l);return y?Vf(f,y.name,i):null},bookmarks:()=>{let i=r.packageRevision;if(!he||he.revision!==i){let l=new Map(wf(m().part));for(let f of $$1())for(let[y,k]of wf(f))l.has(y)||l.set(y,k);he={revision:i,index:l};}return he.index},ensureHyperlinkRelationship(i,l=O){let f=r.partFor(l);return f?Ea(r,()=>{let y=u(),k=Uf(y,i,f.name);return k?(k.pkg!==y&&r.replacePackageShell(k.pkg),k.relationshipId):null},y=>y!==null):null},reviewItems(){let i=e$1.reviewModel;if(!i)return mr;let l=m(),f=`${r.packageRevision}:${l.revision}`;if(d&&d.revisionKey===f)return d.items;let y=u(),k=y.parts.get(Z(y,l.part.name)),S=y.parts.get(_$1(y,l.part.name)),I=$$1(),D=d&&p?Ln(p,d,d.items,l.part,k,S,r.packageRevision):null,B,te;if(D&&d){let ft=i.revisionItemsOfParagraph(l.part,D);An(d.items,ft,D)?(B=Fn(d.items,d.paragraphOrder,D,ft),te=d.paragraphOrder):(te=Si(l.part),B=i.collectReviewItems({storyPart:l.part,furnitureParts:I,stylesPart:Sc(y),commentsPart:k,commentsExtendedPart:S,customNodePayloads:pt()}));}else te=Si(l.part),B=i.collectReviewItems({storyPart:l.part,furnitureParts:I,stylesPart:Sc(y),commentsPart:k,commentsExtendedPart:S,customNodePayloads:pt()});return d={revisionKey:f,bodyRevision:l.revision,packageRevision:r.packageRevision,items:B,paragraphOrder:te,commentsPart:k,commentsExtendedPart:S},d.items},hasReviewContent(){let i=r.packageRevision;if(!g||g.revision!==i){let l=Sc(u()),f=[m().part,...$$1(),...l?[l]:[]];g={revision:i,present:f.some(y=>Fi(y).length>0||Ke(y.root))};}return g.present},replyToComment(i,l,f,y,k,S=O,I){let D=$(r,{anchor:{paragraphId:l.paragraphId,start:l.start,end:l.end,...l.endParagraphId===void 0?{}:{endParagraphId:l.endParagraphId}},author:y,text:f,...k===void 0?{}:{date:k},...i===null?{}:{replyToCommentId:i},...I===void 0?{}:{actorId:I}},S);return D.ok?D.commentId:null},setCommentResolved(i,l){return aa(r,i,l).ok},deleteComment(i,l=O,f){return this.deleteComments([{commentId:i}],l,f)},deleteComments(i,l=O,f){return ba(r,i,l,f)},insertCustomNode(i,l=O){return ja(r,i,l)},removeCustomNode(i,l=O){return ka(r,i,l)},sweepCustomNodePayloads(i){return Ea(r,()=>{let l=m(),f=ga(r.currentPackage(),l.part.name,i);return f.ok?f.removed.length===0?{ok:true,removed:[]}:(r.replacePackageShell(f.pkg),{ok:true,removed:f.removed}):{ok:false,reason:f.reason}},l=>l.ok&&l.removed.length>0)},ensureListDefinition(i){return Ea(r,()=>{let l=Nf(u(),i);return l?(r.replacePackageShell(l.pkg),w=null,M=null,l.numId):null},l=>l!==null)},ensureNumberingLevel(i,l,f){return Ea(r,()=>{let y=u(),k=Of(y,i,l,f);return k?k!==y?(r.replacePackageShell(k),w=null,M=null,{ok:true,changed:true}):{ok:true,changed:false}:{ok:false,changed:false}},y=>y.changed).ok},insertImage(i,l){return r.insertImage(i,l)},replaceImage(i,l,f,y,k,S){return r.replaceImage(i,l,f,y,k,S)},deleteImage(i,l){return r.deleteImage(i,l)},deleteImageTracked(i,l,f){return r.deleteImageTracked(i,l,f)},applyImageProperties(i,l){return r.applyImageProperties(i,l)},applyFragmentPaste(i,l){return r.applyFragmentPaste(i,l)}}}}var yr=b.projection;function Nr(t,e,n){let o=t.filter(s=>s.localName!==e);return o.length!==t.length?o:[...o,n?{localName:e,attributes:n}:{localName:e}]}function Ir(t,e,n={}){let o=null,s=false,a=()=>n.onChange?.(r()),r=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:o}),c=u=>{s=true;let h=g.state.tr.replaceWith(0,g.state.doc.content.size,u.content);h.setMeta("addToHistory",false),g.dispatch(h),s=false;},d=u=>()=>(u()&&(c(e.projectDoc()),a()),true),g=new EditorView(t,{state:EditorState.create({doc:e.projectDoc(),plugins:[keymap({...baseKeymap,Home:selectTextblockStart,End:selectTextblockEnd,"Mod-z":d(()=>e.undo()!==null),"Mod-y":d(()=>e.redo()!==null),"Shift-Mod-z":d(()=>e.redo()!==null),"Mod-b":(u,h)=>m(u,h,"b"),"Mod-i":(u,h)=>m(u,h,"i"),"Mod-u":(u,h)=>m(u,h,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:u=>(p(u),false),beforeinput:(u,h)=>{let O=h;if(u.composing)return false;p(u);let P=O.inputType;if(P==="insertText"&&O.data!=null){O.preventDefault();let{from:R,to:b}=u.state.selection;return u.dispatch(u.state.tr.insertText(O.data,R,b)),true}if(P==="deleteContentBackward"){O.preventDefault();let{from:R,empty:b}=u.state.selection;return b?R>0?u.dispatch(u.state.tr.delete(R-1,R)):joinBackward(u.state,u.dispatch):deleteSelection(u.state,u.dispatch),true}if(P==="deleteContentForward"){O.preventDefault();let{from:R,to:b,empty:v}=u.state.selection;return v?b<u.state.doc.content.size?u.dispatch(u.state.tr.delete(R,R+1)):joinForward(u.state,u.dispatch):deleteSelection(u.state,u.dispatch),true}return P==="insertParagraph"?(O.preventDefault(),splitBlock(u.state,u.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),a(),false)},dispatchTransaction(u){let h=g.state.apply(u);if(s||!u.docChanged){g.updateState(h);return}let O=e.applyPmDoc(h.doc);if(O.rejected){o=String(O.reason??"rejected"),g.updateState(h),c(e.projectDoc()),a();return}o=null,g.updateState(O.committed&&e.lastCommitWasStructural()?x(h):h),a();}});function p(u){if(u.composing||s)return;let h=u.dom.ownerDocument.getSelection(),O=h?.anchorNode,P=h?.focusNode;if(!(!h||!O||!P)&&!(!u.dom.contains(O)||!u.dom.contains(P)))try{let R=u.posAtDOM(O,h.anchorOffset),b=u.posAtDOM(P,h.focusOffset),v=u.state.selection;if(v.anchor===R&&v.head===b)return;let N=TextSelection.create(u.state.doc,R,b);u.dispatch(u.state.tr.setSelection(N).setMeta("addToHistory",!1));}catch{}}function x(u){let h=e.paragraphIds(),O=u.tr,P=false,R=0;return u.doc.forEach((b,v)=>{let N=h[R];R+=1,!(b.type.name!=="paragraph"||N===void 0)&&b.attrs.nodeId!==N&&(O=O.setNodeMarkup(v,void 0,{...b.attrs,nodeId:N}),P=true);}),P?u.apply(O.setMeta("addToHistory",false)):u}function m(u,h,O,P){let R=E.marks.runProps;if(!h)return true;let{from:b,to:v,empty:N}=u.selection;if(N)return true;let T=u.doc.resolve(b).marks().find(V=>V.type===R)?.attrs.props??[],w=Nr(T,O,P),M=u.tr;return M.removeMark(b,v,R),w.length>0&&M.addMark(b,v,R.create({props:w})),h(M),true}return {view:g,state:r,undo:()=>d(()=>e.undo()!==null)(),redo:()=>d(()=>e.redo()!==null)(),toggleRunProperty(u,h){m(g.state,g.dispatch.bind(g),u,h);},destroy:()=>g.destroy()}}export{E as a,Ue as b,oe as c,_ as d,X as e,Je as f,Bo as g,Ge as h,et as i,gr as j,yr as k,Ir as l};