@docx-editor.dev/core 2.5.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/THIRD_PARTY_NOTICES.md +39 -1
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.cts +6 -6
  4. package/dist/automation.d.ts +6 -6
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.cts +12 -12
  8. package/dist/binding.d.ts +12 -12
  9. package/dist/binding.js +1 -1
  10. package/dist/chunk-4GQXAXTZ.js +5 -0
  11. package/dist/chunk-DGUHCJPF.cjs +18 -0
  12. package/dist/{chunk-2GSRLGUI.cjs → chunk-DY3QVCWC.cjs} +6 -6
  13. package/dist/{chunk-45FL7KH4.js → chunk-E7BXJ4BF.js} +1 -1
  14. package/dist/chunk-F7Z6PWAZ.cjs +2 -0
  15. package/dist/chunk-JEMP5YI5.cjs +15 -0
  16. package/dist/{chunk-3FRSOOND.cjs → chunk-JZXK4DKV.cjs} +1 -1
  17. package/dist/chunk-NIGGABAA.js +15 -0
  18. package/dist/chunk-OPKOTVQQ.js +18 -0
  19. package/dist/{chunk-GOEBQ26R.js → chunk-PSZH2VXP.js} +1 -1
  20. package/dist/{chunk-LJIX4ZDF.js → chunk-R75OLPL6.js} +6 -6
  21. package/dist/{chunk-JDHTCMFA.cjs → chunk-SFMAIFEN.cjs} +1 -1
  22. package/dist/chunk-SKWYEZCO.cjs +5 -0
  23. package/dist/{chunk-YTZIGUXT.js → chunk-SMRD66T5.js} +1 -1
  24. package/dist/chunk-WAVN7MAT.js +2 -0
  25. package/dist/chunk-WU7PUTVA.js +2 -0
  26. package/dist/{chunk-OHJQ7GPZ.cjs → chunk-YMYCPY5Y.cjs} +1 -1
  27. package/dist/{content-control-walk-BeAFh6Xi.d.cts → content-control-walk-CbTqHq6O.d.cts} +1 -1
  28. package/dist/{content-control-walk-CQp8l6eS.d.ts → content-control-walk-D06GijR0.d.ts} +1 -1
  29. package/dist/contracts/editor.cjs +1 -1
  30. package/dist/contracts/editor.d.cts +10 -10
  31. package/dist/contracts/editor.d.ts +10 -10
  32. package/dist/contracts/editor.js +1 -1
  33. package/dist/contracts/interaction.d.cts +9 -9
  34. package/dist/contracts/interaction.d.ts +9 -9
  35. package/dist/contracts/modules.d.cts +5 -5
  36. package/dist/contracts/modules.d.ts +5 -5
  37. package/dist/contracts/types.d.cts +3 -1
  38. package/dist/contracts/types.d.ts +3 -1
  39. package/dist/{custom-node-writes-CIC_-wad.d.cts → custom-node-writes-D9G3GKQ7.d.cts} +7 -7
  40. package/dist/{custom-node-writes-2clI36T9.d.ts → custom-node-writes-tJw8U9MO.d.ts} +7 -7
  41. package/dist/dist-YFULGVS3.js +2 -0
  42. package/dist/{editor-CUul9IuY.d.cts → editor-BZEJL3vv.d.cts} +33 -19
  43. package/dist/{editor-DIwctMcU.d.ts → editor-D2zOJztO.d.ts} +33 -19
  44. package/dist/editor.cjs +1 -1
  45. package/dist/editor.css +375 -38
  46. package/dist/editor.d.cts +42 -26
  47. package/dist/editor.d.ts +42 -26
  48. package/dist/editor.js +1 -1
  49. package/dist/harfbuzz.wasm +0 -0
  50. package/dist/{hf-references-CAp1xTv6.d.ts → hf-references-BdjsQNE_.d.ts} +2 -2
  51. package/dist/{hf-references-BPET4tlK.d.cts → hf-references-CgEOSw3i.d.cts} +2 -2
  52. package/dist/{image-resources-CSlQmPIm.d.cts → image-resources-BaHz4QAd.d.cts} +10 -10
  53. package/dist/{image-resources-e13t-pgy.d.ts → image-resources-Cl5_cNi9.d.ts} +10 -10
  54. package/dist/{index-BUsYjxF5.d.ts → index-D8L8WrNF.d.ts} +111 -21
  55. package/dist/{index-8t44iXTY.d.cts → index-_xF7n_z0.d.cts} +111 -21
  56. package/dist/index.cjs +1 -1
  57. package/dist/index.d.cts +20 -20
  58. package/dist/index.d.ts +20 -20
  59. package/dist/index.js +1 -1
  60. package/dist/layout.cjs +1 -1
  61. package/dist/layout.d.cts +71 -23
  62. package/dist/layout.d.ts +71 -23
  63. package/dist/layout.js +1 -1
  64. package/dist/node-module-shim-TTKTT66I.js +1 -0
  65. package/dist/{note-nodes-CZQXU6Fg.d.ts → note-nodes-BPSTVDMr.d.ts} +1 -1
  66. package/dist/{note-nodes-B2wWES2L.d.cts → note-nodes-C6DLxlvj.d.cts} +1 -1
  67. package/dist/{ooxml-package-Cmbe_M04.d.cts → ooxml-package-CR5us6ad.d.cts} +115 -115
  68. package/dist/{ooxml-package-BrxTmTsZ.d.ts → ooxml-package-D_CtywTW.d.ts} +115 -115
  69. package/dist/{ooxml-tree-CG0odFyi.d.cts → ooxml-tree-BU0e3DVi.d.cts} +1 -1
  70. package/dist/{ooxml-tree-CG0odFyi.d.ts → ooxml-tree-BU0e3DVi.d.ts} +1 -1
  71. package/dist/output.cjs +1 -1
  72. package/dist/output.d.cts +22 -8
  73. package/dist/output.d.ts +22 -8
  74. package/dist/output.js +1 -1
  75. package/dist/{protocol-B5oSt08P.d.cts → protocol-CD7slqvl.d.cts} +2 -2
  76. package/dist/{protocol-ooK7PAXz.d.ts → protocol-DsbfgBwA.d.ts} +2 -2
  77. package/dist/{note-properties-Dhqkro--.d.cts → review-reads-Dr0CpW6u.d.cts} +67 -67
  78. package/dist/{note-properties-BS66XmcC.d.ts → review-reads-HDvoQXK2.d.ts} +67 -67
  79. package/dist/{review-support-Bl9sN8cv.d.ts → review-support-D4ZBdUXa.d.ts} +2 -2
  80. package/dist/{review-support-CHuJxHmz.d.cts → review-support-T-riLz4Y.d.cts} +2 -2
  81. package/dist/{revision-projection-u4nT52xT.d.ts → revision-projection-UKqvPa4-.d.ts} +1 -1
  82. package/dist/{revision-projection-DRZMzoLD.d.cts → revision-projection-WzlQGBJx.d.cts} +1 -1
  83. package/dist/{semantic-cell-selection-Dc-_enhm.d.ts → semantic-cell-selection-B5vfPz4Q.d.ts} +4 -4
  84. package/dist/{semantic-cell-selection-CdNQ-a9-.d.cts → semantic-cell-selection-BTQFpN0S.d.cts} +4 -4
  85. package/dist/{semantic-interaction-DgaWs-5w.d.cts → semantic-interaction-CDNEU_Tx.d.cts} +1 -1
  86. package/dist/{semantic-interaction-CCVwyw2A.d.ts → semantic-interaction-lvpzZRpA.d.ts} +1 -1
  87. package/dist/{semantic-paint-6iIB4fhx.d.cts → semantic-paint-BBPL3u5w.d.ts} +111 -3
  88. package/dist/{semantic-paint-CKIbFkQ7.d.ts → semantic-paint-IjbL-4CT.d.cts} +111 -3
  89. package/dist/{semantic-records-B-qbrnp2.d.ts → semantic-records-CdQvpUj1.d.ts} +4 -4
  90. package/dist/{semantic-records-Dq8SlCY8.d.cts → semantic-records-DEOs3_tE.d.cts} +4 -4
  91. package/dist/{shaped-measurer-Dx4llNhK.d.cts → shaped-measurer-C2SJAjV0.d.cts} +1 -1
  92. package/dist/{shaped-measurer-BT4FqYe9.d.ts → shaped-measurer-l4o5ITJ0.d.ts} +1 -1
  93. package/dist/store.cjs +1 -1
  94. package/dist/store.d.cts +238 -238
  95. package/dist/store.d.ts +238 -238
  96. package/dist/store.js +1 -1
  97. package/dist/{tree-op-types-DOYNkKqD.d.cts → tree-op-types-CUCwPWjT.d.cts} +219 -219
  98. package/dist/{tree-op-types-CZw9QhWX.d.ts → tree-op-types-D0fTNBVW.d.ts} +219 -219
  99. package/dist/{tree-session-CF_EOhTW.d.ts → tree-session-CH1oA75f.d.ts} +61 -45
  100. package/dist/{tree-session-CtK3KgFU.d.cts → tree-session-b7bggR-S.d.cts} +61 -45
  101. package/dist/{tree-store-Jg-q7fyf.d.cts → tree-store-BqgeCa1Q.d.cts} +3 -3
  102. package/dist/{tree-store-9TaX-L0V.d.ts → tree-store-CIKASRHk.d.ts} +3 -3
  103. package/licenses/HarfBuzz-COPYING.txt +42 -0
  104. package/package.json +5 -3
  105. package/dist/chunk-2QIA75K3.js +0 -2
  106. package/dist/chunk-32NXPFYL.js +0 -5
  107. package/dist/chunk-3C533HSQ.cjs +0 -18
  108. package/dist/chunk-7GYF33B5.cjs +0 -2
  109. package/dist/chunk-H3DZP4LE.cjs +0 -5
  110. package/dist/chunk-L2GMLEHX.cjs +0 -14
  111. package/dist/chunk-QUZM6LWQ.js +0 -14
  112. package/dist/chunk-T252F4US.js +0 -18
@@ -15,4 +15,42 @@ the consumer and are not repeated here.
15
15
  Generated by `bun run notices:generate` from the build's esbuild metafile.
16
16
  Do not edit by hand.
17
17
 
18
- No third-party code is bundled into this package.
18
+ This package also ships prebuilt third-party assets that are not esbuild inputs,
19
+ so they cannot appear below. Their licenses travel with the package in
20
+ `licenses/`:
21
+
22
+ - `licenses/HarfBuzz-COPYING.txt`
23
+
24
+ ## Bundled packages
25
+
26
+ - harfbuzzjs 1.6.0 — MIT (https://harfbuzz.github.io/harfbuzzjs)
27
+
28
+ ---
29
+
30
+ ## harfbuzzjs 1.6.0
31
+
32
+ License: MIT
33
+
34
+ ### LICENSE
35
+
36
+ ```
37
+ Copyright (c) 2019-2026 The harfbuzzjs project authors
38
+
39
+ Permission is hereby granted, free of charge, to any person obtaining a copy
40
+ of this software and associated documentation files (the "Software"), to deal
41
+ in the Software without restriction, including without limitation the rights
42
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
43
+ copies of the Software, and to permit persons to whom the Software is
44
+ furnished to do so, subject to the following conditions:
45
+
46
+ The above copyright notice and this permission notice shall be included in all
47
+ copies or substantial portions of the Software.
48
+
49
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
51
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55
+ SOFTWARE.
56
+ ```
@@ -1 +1 @@
1
- 'use strict';var chunk3FRSOOND_cjs=require('./chunk-3FRSOOND.cjs'),chunk2GSRLGUI_cjs=require('./chunk-2GSRLGUI.cjs');var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function L(a,r={}){let o=chunk2GSRLGUI_cjs.yb(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new chunk2GSRLGUI_cjs.Kf(o.package,chunk2GSRLGUI_cjs.Uc(n));return {ok:true,host:chunk3FRSOOND_cjs.g({port:M(e),capabilities:I})}}function j(a,r,o){let n=a.partFor(o);if(!n)return null;let e=chunk2GSRLGUI_cjs.Wc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=D){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>j(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?chunk2GSRLGUI_cjs.Oe(m,s.commentId,A):chunk2GSRLGUI_cjs.Pe(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?chunk2GSRLGUI_cjs.Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?chunk2GSRLGUI_cjs.Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?chunk2GSRLGUI_cjs.Qf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=chunk2GSRLGUI_cjs.Wf(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?chunk2GSRLGUI_cjs.zb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunk3FRSOOND_cjs.c}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunk3FRSOOND_cjs.b}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunk3FRSOOND_cjs.d}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunk3FRSOOND_cjs.a}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunk3FRSOOND_cjs.f}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunk3FRSOOND_cjs.e}});exports.SERVER_AUTOMATION_CAPABILITIES=I;exports.createServerAutomationHost=L;
1
+ 'use strict';var chunkJZXK4DKV_cjs=require('./chunk-JZXK4DKV.cjs'),chunkDY3QVCWC_cjs=require('./chunk-DY3QVCWC.cjs');var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function L(a,r={}){let o=chunkDY3QVCWC_cjs.yb(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new chunkDY3QVCWC_cjs.Kf(o.package,chunkDY3QVCWC_cjs.Uc(n));return {ok:true,host:chunkJZXK4DKV_cjs.g({port:M(e),capabilities:I})}}function j(a,r,o){let n=a.partFor(o);if(!n)return null;let e=chunkDY3QVCWC_cjs.Wc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=D){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>j(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?chunkDY3QVCWC_cjs.Oe(m,s.commentId,A):chunkDY3QVCWC_cjs.Pe(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?chunkDY3QVCWC_cjs.Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?chunkDY3QVCWC_cjs.Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?chunkDY3QVCWC_cjs.Qf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=chunkDY3QVCWC_cjs.Wf(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?chunkDY3QVCWC_cjs.zb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkJZXK4DKV_cjs.c}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkJZXK4DKV_cjs.b}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkJZXK4DKV_cjs.d}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkJZXK4DKV_cjs.a}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkJZXK4DKV_cjs.f}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkJZXK4DKV_cjs.e}});exports.SERVER_AUTOMATION_CAPABILITIES=I;exports.createServerAutomationHost=L;
@@ -1,9 +1,9 @@
1
- import { A as AutomationCapabilities, a as AutomationHost } from './protocol-B5oSt08P.cjs';
2
- export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationUnsubscribe, L as AutomationValue, M as isAutomationCommand, N as isSolitaryAutomationCommand } from './protocol-B5oSt08P.cjs';
3
- import { H as HeaderFooterVariant } from './hf-references-BPET4tlK.cjs';
4
- import { N as NoteKind } from './note-nodes-B2wWES2L.cjs';
5
- import { a as OoxmlPackageLimits, b as OoxmlPackageRejection } from './ooxml-package-Cmbe_M04.cjs';
6
- import './ooxml-tree-CG0odFyi.cjs';
1
+ import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CD7slqvl.cjs';
2
+ export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationUnsubscribe, L as AutomationValue, M as isAutomationCommand, N as isSolitaryAutomationCommand } from './protocol-CD7slqvl.cjs';
3
+ import { H as HeaderFooterVariant } from './hf-references-CgEOSw3i.cjs';
4
+ import { N as NoteKind } from './note-nodes-C6DLxlvj.cjs';
5
+ import { a as OoxmlPackageLimits, b as OoxmlPackageRejection } from './ooxml-package-CR5us6ad.cjs';
6
+ import './ooxml-tree-BU0e3DVi.cjs';
7
7
 
8
8
  /** The variants a section can declare furniture for. */
9
9
  declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
@@ -1,9 +1,9 @@
1
- import { A as AutomationCapabilities, a as AutomationHost } from './protocol-ooK7PAXz.js';
2
- export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationUnsubscribe, L as AutomationValue, M as isAutomationCommand, N as isSolitaryAutomationCommand } from './protocol-ooK7PAXz.js';
3
- import { H as HeaderFooterVariant } from './hf-references-CAp1xTv6.js';
4
- import { N as NoteKind } from './note-nodes-CZQXU6Fg.js';
5
- import { a as OoxmlPackageLimits, b as OoxmlPackageRejection } from './ooxml-package-BrxTmTsZ.js';
6
- import './ooxml-tree-CG0odFyi.js';
1
+ import { A as AutomationCapabilities, a as AutomationHost } from './protocol-DsbfgBwA.js';
2
+ export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationUnsubscribe, L as AutomationValue, M as isAutomationCommand, N as isSolitaryAutomationCommand } from './protocol-DsbfgBwA.js';
3
+ import { H as HeaderFooterVariant } from './hf-references-BdjsQNE_.js';
4
+ import { N as NoteKind } from './note-nodes-BPSTVDMr.js';
5
+ import { a as OoxmlPackageLimits, b as OoxmlPackageRejection } from './ooxml-package-D_CtywTW.js';
6
+ import './ooxml-tree-BU0e3DVi.js';
7
7
 
8
8
  /** The variants a section can declare furniture for. */
9
9
  declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
@@ -1 +1 @@
1
- import {g}from'./chunk-45FL7KH4.js';export{c as AUTOMATION_COMMAND_OPERATIONS,b as AUTOMATION_QUERY_OPERATIONS,d as AUTOMATION_SOLITARY_OPERATIONS,a as HEADER_FOOTER_VARIANTS,f as isAutomationCommand,e as isSolitaryAutomationCommand}from'./chunk-45FL7KH4.js';import {yb,Kf,Uc,zb,Wf,Oe,Pe,Pf,Qf,Wc}from'./chunk-LJIX4ZDF.js';var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function L(a,r={}){let o=yb(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new Kf(o.package,Uc(n));return {ok:true,host:g({port:M(e),capabilities:I})}}function j(a,r,o){let n=a.partFor(o);if(!n)return null;let e=Wc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=D){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>j(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?Oe(m,s.commentId,A):Pe(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?Qf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=Wf(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?zb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}export{I as SERVER_AUTOMATION_CAPABILITIES,L as createServerAutomationHost};
1
+ import {g}from'./chunk-E7BXJ4BF.js';export{c as AUTOMATION_COMMAND_OPERATIONS,b as AUTOMATION_QUERY_OPERATIONS,d as AUTOMATION_SOLITARY_OPERATIONS,a as HEADER_FOOTER_VARIANTS,f as isAutomationCommand,e as isSolitaryAutomationCommand}from'./chunk-E7BXJ4BF.js';import {yb,Kf,Uc,zb,Wf,Oe,Pe,Pf,Qf,Wc}from'./chunk-R75OLPL6.js';var I=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function L(a,r={}){let o=yb(a,r.limits??{});if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let n=o.package.parts.get(o.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-part",detail:o.package.mainDocumentPart};let e=new Kf(o.package,Uc(n));return {ok:true,host:g({port:M(e),capabilities:I})}}function j(a,r,o){let n=a.partFor(o);if(!n)return null;let e=Wc(a.currentPackage(),r,n.name);return e?(a.replacePackageShell(e.pkg),e.relationshipId):null}function M(a){let r=true;return {revision:()=>a.packageRevision,currentPackage:()=>r?a.currentPackage():null,apply(o,n=D){if(!r)return {ok:false,reason:"disposed"};let e=o(i=>j(a,i,n));if(e===null)return {ok:false,reason:"unsupported-target"};let t=a.transact(n,i=>{for(let u of e)i.apply(u);});return t.ok?{ok:true,changed:t.change!==null}:{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},applyLifecycle(o){if(!r)return {ok:false,reason:"disposed"};let n=a.applyLifecycleOp(o);return n.ok?{ok:true,changed:n.change!==null}:{ok:false,reason:n.detail?`${n.reason}: ${n.detail}`:n.reason}},applyCommentWrites(o,n){if(!r)return {ok:false,reason:"disposed"};if(o.length===0)return {ok:true,changed:false};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};if(e.store.graftPackage(()=>a.currentPackage()),o.every(u=>u.kind==="delete")){let u=false,l=false,x=e.store.transact(T=>{T.applyPackage(d=>{let m=d;for(let s of o){if(s.kind!=="delete")continue;let A={storyPartName:e.store.part.name,...s.noteId===void 0?{}:{noteId:s.noteId}},p=s.parentCommentId===void 0?Oe(m,s.commentId,A):Pe(m,s.commentId,s.parentCommentId,A);if(p===null)return u=true,d;l||=p!==m,m=p;}return m});});return u||!x.ok?{ok:false,reason:"comment-delete-refused"}:(l&&a.installPackageSnapshot(e.store.package),{ok:true,changed:l})}if(o.length!==1)return {ok:false,reason:"mixed-comment-writes"};let t=o[0],i=t.kind==="create"?Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date}}):t.kind==="reply"?Pf(e.store,{anchor:t.anchor,author:t.author,text:t.text,...t.date===void 0?{}:{date:t.date},replyToCommentId:t.parentCommentId}):t.kind==="resolve"?Qf(e.store,t.commentId,t.resolved):null;return i===null?{ok:false,reason:"unsupported-comment-write"}:i.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}},applyCustomNodeWrite(o,n){if(!r)return {ok:false,reason:"disposed"};let e=a.resolveStory(n);if(!e.ok)return {ok:false,reason:e.reason};e.store.graftPackage(()=>a.currentPackage());let t=Wf(e.store,o);return t.ok?(a.replacePackageShell(e.store.package),{ok:true,changed:t.change!==null}):{ok:false,reason:t.detail?`${t.reason}: ${t.detail}`:t.reason}},save:()=>r?zb(a.currentPackage()):null,subscribe:o=>a.subscribe(()=>o()),dispose(){r=false;}}}export{I as SERVER_AUTOMATION_CAPABILITIES,L as createServerAutomationHost};
package/dist/binding.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkH3DZP4LE_cjs=require('./chunk-H3DZP4LE.cjs');require('./chunk-IJ4V3LGV.cjs'),require('./chunk-JDHTCMFA.cjs'),require('./chunk-2GSRLGUI.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkH3DZP4LE_cjs.e}});
1
+ 'use strict';var chunkSKWYEZCO_cjs=require('./chunk-SKWYEZCO.cjs');require('./chunk-IJ4V3LGV.cjs'),require('./chunk-SFMAIFEN.cjs'),require('./chunk-DY3QVCWC.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkSKWYEZCO_cjs.e}});
@@ -1,18 +1,18 @@
1
1
  import { Node, Schema } from 'prosemirror-model';
2
- import { O as OoxmlProperty } from './tree-op-types-DOYNkKqD.cjs';
3
- import { T as TreeDocxSession } from './tree-session-CtK3KgFU.cjs';
4
- export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeSessionRejection, d as bodyParagraphs, e as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-CtK3KgFU.cjs';
5
- export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-CIC_-wad.cjs';
2
+ import { O as OoxmlProperty } from './tree-op-types-CUCwPWjT.cjs';
3
+ import { T as TreeDocxSession } from './tree-session-b7bggR-S.cjs';
4
+ export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeDocxSessionView, d as TreeSessionRejection, e as bodyParagraphs, f as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-b7bggR-S.cjs';
5
+ export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-D9G3GKQ7.cjs';
6
6
  import { EditorView } from 'prosemirror-view';
7
- import './ooxml-tree-CG0odFyi.cjs';
8
- import './image-resources-CSlQmPIm.cjs';
9
- import './ooxml-package-Cmbe_M04.cjs';
10
- import './review-support-CHuJxHmz.cjs';
7
+ import './ooxml-tree-BU0e3DVi.cjs';
8
+ import './image-resources-BaHz4QAd.cjs';
9
+ import './ooxml-package-CR5us6ad.cjs';
10
+ import './review-support-T-riLz4Y.cjs';
11
11
  import './contracts/modules.cjs';
12
- import './revision-projection-DRZMzoLD.cjs';
13
- import './hf-references-BPET4tlK.cjs';
14
- import './tree-store-Jg-q7fyf.cjs';
15
- import './note-nodes-B2wWES2L.cjs';
12
+ import './revision-projection-WzlQGBJx.cjs';
13
+ import './hf-references-CgEOSw3i.cjs';
14
+ import './tree-store-BqgeCa1Q.cjs';
15
+ import './note-nodes-C6DLxlvj.cjs';
16
16
 
17
17
  /** Attributes carried by a projected paragraph. */
18
18
  interface ParagraphAttrs {
package/dist/binding.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import { Node, Schema } from 'prosemirror-model';
2
- import { O as OoxmlProperty } from './tree-op-types-CZw9QhWX.js';
3
- import { T as TreeDocxSession } from './tree-session-CF_EOhTW.js';
4
- export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeSessionRejection, d as bodyParagraphs, e as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-CF_EOhTW.js';
5
- export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-2clI36T9.js';
2
+ import { O as OoxmlProperty } from './tree-op-types-D0fTNBVW.js';
3
+ import { T as TreeDocxSession } from './tree-session-CH1oA75f.js';
4
+ export { D as DocumentStyleEntry, M as MapResult, O as OpenTreeSessionResult, P as PROJECTION_ORIGIN, a as TreeApplyResult, b as TreeBindingRejection, c as TreeDocxSessionView, d as TreeSessionRejection, e as bodyParagraphs, f as docToTreeOps, o as openTreeSession, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-CH1oA75f.js';
5
+ export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-tJw8U9MO.js';
6
6
  import { EditorView } from 'prosemirror-view';
7
- import './ooxml-tree-CG0odFyi.js';
8
- import './image-resources-e13t-pgy.js';
9
- import './ooxml-package-BrxTmTsZ.js';
10
- import './review-support-Bl9sN8cv.js';
7
+ import './ooxml-tree-BU0e3DVi.js';
8
+ import './image-resources-Cl5_cNi9.js';
9
+ import './ooxml-package-D_CtywTW.js';
10
+ import './review-support-D4ZBdUXa.js';
11
11
  import './contracts/modules.js';
12
- import './revision-projection-u4nT52xT.js';
13
- import './hf-references-CAp1xTv6.js';
14
- import './tree-store-9TaX-L0V.js';
15
- import './note-nodes-CZQXU6Fg.js';
12
+ import './revision-projection-UKqvPa4-.js';
13
+ import './hf-references-BdjsQNE_.js';
14
+ import './tree-store-CIKASRHk.js';
15
+ import './note-nodes-BPSTVDMr.js';
16
16
 
17
17
  /** Attributes carried by a projected paragraph. */
18
18
  interface ParagraphAttrs {
package/dist/binding.js CHANGED
@@ -1 +1 @@
1
- export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-32NXPFYL.js';import'./chunk-UVIUNAQ6.js';import'./chunk-YTZIGUXT.js';import'./chunk-LJIX4ZDF.js';
1
+ export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-4GQXAXTZ.js';import'./chunk-UVIUNAQ6.js';import'./chunk-SMRD66T5.js';import'./chunk-R75OLPL6.js';
@@ -0,0 +1,5 @@
1
+ import {b,g}from'./chunk-UVIUNAQ6.js';import {M as M$1,L,O,R,S,G as G$1}from'./chunk-SMRD66T5.js';import {t,De,Ge as Ge$1,Fa,yb,Uc,Kf,Yf,Oe as Oe$1,Pe as Pe$1,Qf,Pf,kf,Sf,Tf,Yd,tg,Zf,Wc,Cc,Xc,Wb,zb,Ff,Yc,ce,Ub,Vb,O as O$1,Xf,Wf,Sb,Xb,Bg,Cg,ma,Oc,Nc,sg,Zb,Lb,Nb}from'./chunk-R75OLPL6.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 j(t){return t.attributes?.val}function H(t){let e=j(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var En=/^[0-9A-Fa-f]{6}$/,ke=/^\d{1,6}$/,Dn=/^-?\d{1,6}$/;function _e(t){return t===void 0||t==="auto"?null:En.test(t)?`#${t}`:null}var Cn={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"},Mn={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 wn(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function Y(t,e=false){return t===void 0||!(e?Dn:ke).test(t)?null:`${Number(t)/20}pt`}function Wt(t){let e=[],n=[],o=null,s=null;for(let l of t)switch(l.localName){case "b":e.push(`font-weight:${H(l)?"bold":"normal"}`);break;case "i":e.push(`font-style:${H(l)?"italic":"normal"}`);break;case "u":{let r=j(l)??"single";if(r==="none"||!H(l))break;n.push("underline"),o=Cn[r]??"solid",s=_e(l.attributes?.color);break}case "strike":H(l)&&n.push("line-through");break;case "dstrike":H(l)&&n.push("line-through");break;case "caps":H(l)&&e.push("text-transform:uppercase");break;case "smallCaps":H(l)&&e.push("font-variant:small-caps");break;case "vertAlign":{let r=j(l);r==="superscript"?e.push("vertical-align:super","font-size:0.75em"):r==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let r=_e(j(l));r&&e.push(`color:${r}`);break}case "highlight":{let r=Mn[j(l)??""];r&&e.push(`background-color:${r}`);break}case "sz":{let r=j(l);r!==void 0&&ke.test(r)&&e.push(`font-size:${Number(r)/2}pt`);break}case "rFonts":{let r=wn(l.attributes?.ascii??l.attributes?.hAnsi);r&&e.push(`font-family:${r}`);break}case "spacing":{let r=Y(j(l),true);r&&e.push(`letter-spacing:${r}`);break}}return n.length>0&&(e.push(`text-decoration-line:${[...new Set(n)].join(" ")}`),o&&e.push(`text-decoration-style:${o}`),s&&e.push(`text-decoration-color:${s}`)),e.join(";")}var Fn={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function Yt(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let o=Fn[j(n)??""];o&&e.push(`text-align:${o}`);break}case "ind":{let o=Y(n.attributes?.left??n.attributes?.start,true),s=Y(n.attributes?.right??n.attributes?.end,true),l=Y(n.attributes?.firstLine),r=Y(n.attributes?.hanging);o&&e.push(`margin-left:${o}`),s&&e.push(`margin-right:${s}`),l?e.push(`text-indent:${l}`):r&&e.push(`text-indent:-${r}`);break}case "spacing":{let o=Y(n.attributes?.before),s=Y(n.attributes?.after);o&&e.push(`margin-top:${o}`),s&&e.push(`margin-bottom:${s}`);let l=n.attributes?.line,r=n.attributes?.lineRule;l!==void 0&&ke.test(l)&&r!=="exact"&&r!=="atLeast"?e.push(`line-height:${(Number(l)/240).toFixed(3)}`):l!==void 0&&ke.test(l)&&e.push(`line-height:${Number(l)/20}pt`);break}case "shd":{let o=_e(n.attributes?.fill);o&&e.push(`background-color:${o}`);break}case "pageBreakBefore":H(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=Yt(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=Wt(e);return ["span",{"data-run-props":Ln(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=_n(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function Ln(t){return JSON.stringify(Array.isArray(t)?t:[])}function _n(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 Be(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function xe(t,e){return JSON.stringify(be(t))===JSON.stringify(be(e))}function be(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 He(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue")continue;let o={};for(let s of n.attributes)o[s.localName]=s.value;e.push(Object.keys(o).length>0?{localName:n.localName,attributes:o}:{localName:n.localName});}return e}function Gt(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 K(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let s=o.children.find(r=>r.kind==="runProperties"),l=He(s);for(let r of o.children)if(r.kind!=="runProperties"){if(r.kind==="tab"){e.push({kind:"tab"});continue}if(r.kind==="hardBreak"){e.push(Zb(r)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(r.kind==="text"){let p="";for(let m of r.children)m.kind==="textValue"&&(p+=m.value);p.length>0&&e.push({kind:"text",text:p,props:l});continue}e.push({kind:"unknown",nodeId:r.id,label:Gt(r)});}};return Sb(t.children,0,o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:Gt(o)});}),e}function M(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}function $(t){let e=[];for(let n of De(t))n.root.kind!=="textValue"&&Ge$1(n.root.children,e,0);return e}function G(t){let e=M(t).map(n=>{let o=n.kind==="textValue"?void 0:n.children.find(l=>l.kind==="paragraphProperties"),s=K(n).map(l=>{switch(l.kind){case "text":return E.text(l.text,l.props.length>0?[E.marks.runProps.create({props:l.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:l.nodeId,label:l.label})}});return E.node("paragraph",{nodeId:n.id,props:He(o)},s)});return E.node("doc",null,e.length>0?e:[E.node("paragraph")])}function V(t){let e=[];return t.forEach(n=>{if(n.isText&&n.text){e.push({kind:"text",text:n.text,props:Be(n)});return}n.type.name==="tab"?e.push({kind:"tab"}):n.type.name==="hardBreak"?e.push({kind:"hardBreak"}):n.type.name==="pageBreak"?e.push({kind:"pageBreak"}):n.type.name==="unknownInline"&&e.push({kind:"unknown",nodeId:String(n.attrs.nodeId??""),label:String(n.attrs.label??"")});}),e}function D(t){let e="";for(let n of t)n.kind==="text"?e+=n.text:n.kind==="tab"?e+=" ":n.kind==="hardBreak"?e+=`
2
+ `:n.kind==="pageBreak"&&(e+=Xb);return e}function Kt(t){let e=[],n=0;for(let o of t)o.kind==="text"?n+=o.text.length:o.kind==="tab"||o.kind==="hardBreak"||o.kind==="pageBreak"?n+=1:e.push(`${o.nodeId}@${n}`);return e}function Bn(t,e){if(t===e)return null;let n=0,o=Math.min(t.length,e.length);for(;n<o&&t[n]===e[n];)n+=1;let s=t.length,l=e.length;for(;s>n&&l>n&&t[s-1]===e[l-1];)s-=1,l-=1;return {start:n,endBefore:s,endAfter:l}}function Xt(t){let e=[];for(let n of t)if(n.kind==="text")for(let o=0;o<n.text.length;o+=1)e.push(n.props);else (n.kind==="tab"||n.kind==="hardBreak"||n.kind==="pageBreak")&&e.push(e[e.length-1]??[]);return e}function Hn(t,e,n,o,s){let l=[],r=Kt(e),p=Kt(n);if(JSON.stringify(r)!==JSON.stringify(p))return {ok:false,reason:"unknown-content-moved",detail:t};xe(o,s)||l.push({op:"setParagraphProperties",paragraphId:t,properties:be(s)});let m=D(e),f=D(n),h=Bn(m,f);if(h&&(h.endBefore>h.start&&l.push({op:"deleteText",paragraphId:t,start:h.start,end:h.endBefore}),h.endAfter>h.start)){let b=f.slice(h.start,h.endAfter),g=h.start,i="",y=()=>{i.length!==0&&(l.push({op:"insertText",paragraphId:t,offset:g,text:i}),g+=i.length,i="");};for(let x of b)x===" "?(y(),l.push({op:"insertTab",paragraphId:t,offset:g}),g+=1):x===`
3
+ `?(y(),l.push({op:"insertHardBreak",paragraphId:t,offset:g}),g+=1):x===Xb?(y(),l.push({op:"insertPageBreak",paragraphId:t,offset:g}),g+=1):i+=x;y();}if(!h){let b=Xt(e),g=Xt(n),i=0;for(;i<g.length;){if(xe(b[i]??[],g[i])){i+=1;continue}let y=i,x=g[i];for(;i<g.length&&xe(g[i],x)&&!xe(b[i]??[],g[i]);)i+=1;l.push({op:"setRunProperties",paragraphId:t,start:y,end:i,properties:be(x)});}}return {ok:true,ops:l}}function je(t,e){let n=M(t),o=[];if(e.forEach(l=>{l.type.name==="paragraph"&&o.push(l);}),o.length!==e.childCount)return {ok:false,reason:"unsupported-node"};let s=o.length-n.length;if(s===0){let l=[];for(let[r,p]of o.entries()){let m=n[r];if(p.attrs.nodeId!==m.id)return {ok:false,reason:"paragraph-reordered",detail:String(p.attrs.nodeId)};let f=Hn(m.id,K(m),V(p),He(m.kind==="textValue"?void 0:m.children.find(h=>h.kind==="paragraphProperties")),p.attrs.props??[]);if(!f.ok)return f;l.push(...f.ops);}return {ok:true,ops:l}}return s===1?jn(n,o):s===-1?$n(n,o):{ok:false,reason:"paragraph-count-unexplained",detail:String(s)}}function jn(t,e){for(let n=0;n<t.length;n+=1){let o=t[n],s=e[n],l=e[n+1];if(!s||!l||s.attrs.nodeId!==o.id)continue;let r=l.attrs.nodeId;if(r!==null&&r!==o.id)continue;let p=D(V(s));if(p+D(V(l))===D(K(o))&&Jt(t,e,n)&&Zt(t,e,n+1,n+2))return {ok:true,ops:[{op:"splitParagraph",paragraphId:o.id,offset:p.length}]}}return {ok:false,reason:"split-not-clean"}}function $n(t,e){for(let n=0;n+1<t.length;n+=1){let o=t[n],s=t[n+1],l=e[n];if(!l||l.attrs.nodeId!==o.id)continue;let r=D(K(o))+D(K(s));if(D(V(l))===r&&Jt(t,e,n)&&Zt(t,e,n+2,n+1))return {ok:true,ops:[{op:"joinParagraphs",firstId:o.id,secondId:s.id}]}}return {ok:false,reason:"join-not-clean"}}function Jt(t,e,n){for(let o=0;o<n;o+=1){let s=e[o],l=t[o];if(!s||s.attrs.nodeId!==l.id||D(V(s))!==D(K(l)))return false}return true}function Zt(t,e,n,o){for(let s=0;n+s<t.length;s+=1){let l=t[n+s],r=e[o+s];if(!r||r.attrs.nodeId!==l.id||D(V(r))!==D(K(l)))return false}return true}function zn(t,e){return Fa(t,e)!==null}function $e(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return G(e);let o=new Map;t.forEach(m=>{let f=m.attrs.nodeId;typeof f=="string"&&o.set(f,m);});let s=new Set(n.dirty),l=M(e);if(l.length!==t.childCount)return G(e);let r=G(e),p=[];for(let[m,f]of l.entries()){let h=o.get(f.id);p.push(h&&!s.has(f.id)?h:r.child(m));}return E.node("doc",null,p)}function Un(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 Vt(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||qt(s,n)||o.add(b(s));for(let s of e)if(o.has(b(s)))return false;return true}function Qt(t,e,n,o){let s=e.get(n);if(s===void 0)return [...t];let l=[],r=null;for(let p of t){if(p.kind==="revision"&&qt(p,n)){r===null&&(r=l.length);continue}if(r===null){let m=Un(p,e);m!==null&&m>s&&(r=l.length);}l.push(p);}if(r===null&&(r=l.length),o.length>0){let p=o.length<2?[...o]:[...o].sort((m,f)=>g(m,e)-g(f,e));l.splice(r,0,...p);}return sg(l)}function qt(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function Wn(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function Yn(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function Gn(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 en(t,e,n,o,s,l,r){if(t.fromRevision!==e.bodyRevision||r!==e.packageRevision+1||t.story!==void 0&&t.story.kind!=="body"||t.impact!=="text-local"||t.dirty.length!==1||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0||e.commentsPart!==s||e.commentsExtendedPart!==l)return null;let p=t.dirty[0],m=Fa(o,p);if(!m||m.kind!=="paragraph")return null;for(let f of n){if(f.kind==="comment"){if(Wn(f,p))return null;continue}if(f.kind==="custom"){if(f.range?.start.paragraphId===p)return null;continue}if(Yn(f,p)||Gn(f,p))return null}return p}var nn=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,Kn=["ascii","hAnsi","cs","eastAsia"],Xn=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],Jn=128,Zn=/[\u0000-\u001F\u007F-\u009F]/;function Q(t){return t.kind!=="textValue"}function X(t,e){return t.attributes.find(n=>n.localName===e)?.value}function rn(t,e){let n=new Map,o=r=>{if(!r||!nn.test(r))return;let p=r.toLowerCase();n.has(p)||n.set(p,r);},s=[...t].reverse();for(;s.length>0;){let r=s.pop();if(Q(r)){if(r.localName==="rFonts"){for(let p of Kn)o(X(r,p));if(e)for(let p of Xn){let m=X(r,p);m!==void 0&&(m.startsWith("major")?o(e.major):m.startsWith("minor")&&o(e.minor));}}for(let p=r.children.length-1;p>=0;p-=1)s.push(r.children[p]);}}let l=[...n.values()];return l.sort((r,p)=>r<p?-1:r>p?1:0),l}function on(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(Q(n)){if(n.localName==="t"&&n.namespaceUri===ma){for(let o of n.children)if(!Q(o)&&o.value.length>0)return true;continue}for(let o of n.children)e.push(o);}}return false}var Vn=new Set(["paragraph","character","table","numbering"]),Qn=/^[0-9A-Fa-f]{6}$/,qn=16,tn=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 an(t){return t.children}function ze(t,e){for(let n of an(t))if(Q(n)&&n.localName===e)return n}function er(t){return tn.get(t.name.toLowerCase())??tn.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function Ue(t){return t===void 0||t.length===0||t.length>Jn||Zn.test(t)?null:t}function ln(t,e){if(!t)return [];let n=new Map;for(let l of t.children){if(!Q(l)||l.localName!=="style")continue;let r=Ue(X(l,"styleId"));r!==null&&!n.has(r)&&n.set(r,l);}let o=l=>{let r=false,p=false,m=null,f=false,h=false,b=new Set,g=l;for(let x=0;x<qn&&g!==null&&!b.has(g);x+=1){b.add(g);let T=n.get(g);if(!T)break;let O=ze(T,"rPr");for(let I of O?an(O):[]){if(!Q(I))continue;let v=X(I,"val"),B=v!=="0"&&v!=="false"&&v!=="off";I.localName==="b"&&!f?(r=B,f=true):I.localName==="i"&&!h?(p=B,h=true):I.localName==="color"&&m===null&&v&&Qn.test(v)&&(m=v);}let S=ze(T,"basedOn");g=S?Ue(X(S,"val")):null;}let i=e?.(l),y=i?.fontFamily??null;return {fontFamily:y!==null&&nn.test(y)?y:null,fontSizePt:i?.fontSizeHalfPoints!=null&&i.fontSizeHalfPoints>0?i.fontSizeHalfPoints/2:null,bold:r,italic:p,color:m}},s=[];for(let[l,r]of n){let p=X(r,"type");if(p===void 0||!Vn.has(p))continue;let m=ze(r,"name"),f=Ue(m?X(m,"val"):void 0);s.push({styleId:l,name:f??l,type:p,preview:o(l)});}return s.map((l,r)=>({entry:l,index:r,rank:er(l)})).sort((l,r)=>l.rank-r.rank||l.index-r.index).map(l=>l.entry)}var tr=128,nr=/[\u0000-\u001F\u007F-\u009F]/,rr=/[\u0000-\u001F\u007F-\u009F]/g,or=200,ar=/^heading ([1-9])$/i;function We(t){return t.kind!=="textValue"}function le(t,e){for(let n of t.children)if(We(n)&&n.localName===e)return n}function ae(t,e){return t.attributes.find(n=>n.localName===e)?.value}function lr(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!We(n)||n.localName!=="style"||ae(n,"type")!=="paragraph")continue;let o=ae(n,"styleId");if(o===void 0||o.length===0||o.length>tr||nr.test(o))continue;let s=le(n,"name"),l=s?ae(s,"val"):void 0,r=l!==void 0?ar.exec(l):null;if(r){e.set(o,Number(r[1])-1);continue}let p=le(n,"pPr"),m=p?le(p,"outlineLvl"):void 0,f=m?ae(m,"val"):void 0;f!==void 0&&/^[0-8]$/.test(f)&&e.set(o,Number(f));}return e}function Ye(t){let e=le(t,"pPr"),n=e?le(e,"pStyle"):void 0;return n?ae(n,"val"):void 0}function sn(t,e){let n=lr(e);if(n.size===0)return [];let o=[];for(let s of M(t)){if(!We(s))continue;let l=Ye(s);if(l===void 0)continue;let r=n.get(l);if(r===void 0)continue;let m=(Ff(t,s.id)??"").replace(rr," ").trim().slice(0,or);m.length!==0&&o.push({text:m,level:r,blockId:s.id});}return o}var Pe=48,sr=/[\u0000-\u001F\u007F-\u009F]/g;function un(t){return t.kind!=="textValue"}function Oe(t){if(t.kind==="textValue")return t.value.length;if(t.kind==="tab"||t.kind==="hardBreak")return 1;if(t.kind==="runProperties"||t.kind==="generic")return 0;if(t.kind==="hyperlink"||Lb(t)){let n=0,o=t.kind==="hyperlink"?t.children:Nb(t)??[];for(let s of o)n+=Oe(s);return n}let e=0;for(let n of t.children)e+=Oe(n);return e}function ir(t){let e=[],n=0;return un(t)&&Sb(t.children,0,o=>{if(o.kind==="run"){e.push(n),n+=Oe(o);return}n+=Oe(o);}),e}function ur(t,e){if(t.length===0)return {index:0,offset:e};for(let n=t.length-1;n>=0;n-=1){let o=t[n];if(e>=o)return {index:n,offset:e-o}}return {index:0,offset:e}}function Ge(t,e){return t.replace(sr," ").slice(0,e)}function cn(t,e,n={}){let o={matches:[],truncated:false};if(!Bg(e))return o;let s=n.limit!==void 0&&Number.isInteger(n.limit)&&n.limit>0?Math.min(n.limit,2e3):2e3,l={...n.matchCase===void 0?{}:{matchCase:n.matchCase},...n.wholeWord===void 0?{}:{wholeWord:n.wholeWord}},r=[],p=0;for(let m of M(t)){if(!un(m))continue;let f=p;p+=1;let h=Ff(t,m.id)??"";if(h.length===0)continue;let b=Cg(h,e,s-r.length,l),g=null;for(let i of b.matches){let y=i.start+i.length;g??=ir(m);let x=ur(g,i.start);r.push({blockId:m.id,start:i.start,length:i.length,paragraphIndex:f,runIndex:x.index,runOffset:x.offset,text:Ge(h.slice(i.start,y),256),contextBefore:Ge(h.slice(Math.max(0,i.start-Pe),i.start),Pe),contextAfter:Ge(h.slice(y,y+Pe),Pe)});}if(b.truncated)return {matches:r,truncated:true}}return {matches:r,truncated:false}}var cr=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"],dr=/^[0-9A-Fa-f]{6}$/,dn={windowText:"000000",window:"FFFFFF"};function mn(t){return t.kind!=="textValue"}function Se(t,e){return t.attributes.find(n=>n.localName===e)?.value}function fn(t,e){let n=[t];for(;n.length>0;){let o=n.pop();if(mn(o)){if(o.localName===e)return o;for(let s=o.children.length-1;s>=0;s-=1)n.push(o.children[s]);}}return null}function ve(t,e){for(let n of t.children)if(mn(n)&&(e===void 0||n.localName===e))return n;return null}function pr(t){let e=ve(t);if(!e)return null;let n;if(e.localName==="srgbClr")n=Se(e,"val");else if(e.localName==="sysClr"){let o=Se(e,"val")??"";n=Se(e,"lastClr")??(Object.prototype.hasOwnProperty.call(dn,o)?dn[o]:void 0);}return n===void 0||!dr.test(n)?null:n.toUpperCase()}var mr=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function pn(t,e){let n=ve(t,e),o=n?ve(n,"latin"):null,s=o?Se(o,"typeface"):void 0;return s!==void 0&&mr.test(s)?s:null}function se(t){if(!t)return {major:null,minor:null};let e=fn(t,"fontScheme");return e?{major:pn(e,"majorFont"),minor:pn(e,"minorFont")}:{major:null,minor:null}}function gn(t){if(!t)return [];let e=fn(t,"clrScheme");if(!e)return [];let n=[];for(let o of cr){let s=ve(e,o),l=s?pr(s):null;if(l===null)return [];n.push({slot:o,hex:l});}return n}var fr=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;var gr=/[\u0000-\u001F\u007F-\u009F]/;function kn(t){return t.kind!=="textValue"}function J(t,e){for(let n of t.children)if(kn(n)&&n.localName===e)return n}function Z(t,e){return t.attributes.find(n=>n.localName===e)?.value}function yn(t){return t===void 0||t.length===0||t.length>128||gr.test(t)?null:t}function Re(t,e){return t==="minorAscii"||t==="minorHAnsi"?e.minor:t==="majorAscii"||t==="majorHAnsi"?e.major:null}function yr(t,e){let n=Re(Z(t,"asciiTheme"),e)??Re(Z(t,"hAnsiTheme"),e);if(n!==null)return n;let o=Z(t,"ascii")??Z(t,"hAnsi");return o===void 0?null:fr.test(o)?o:null}function hn(t,e){if(!t)return {fontFamily:null,fontSizeHalfPoints:null};let n=J(t,"rFonts"),o=J(t,"sz"),s=o?Z(o,"val"):void 0,l=s!==void 0&&/^\d{1,4}$/.test(s)?Number(s):null;return {fontFamily:n?yr(n,e):null,fontSizeHalfPoints:l!==null&&l>=2&&l<=3276?l:null}}function Ke(t,e){let n=new Map,o={fontFamily:null,fontSizeHalfPoints:null};if(t){let r=J(t,"docDefaults"),p=r?J(r,"rPrDefault"):void 0;o=hn(p?J(p,"rPr"):void 0,e);for(let m of t.children){if(!kn(m)||m.localName!=="style")continue;let f=yn(Z(m,"styleId"));if(f===null||n.has(f))continue;let h=J(m,"basedOn");n.set(f,{basedOn:yn(h?Z(h,"val"):void 0),own:hn(J(m,"rPr"),e)});}}let s=new Map,l=r=>{let p=r??"",m=s.get(p);if(m)return m;let f=null,h=null,b=new Set,g=r;for(let y=0;g!==null&&y<16&&!b.has(g);y+=1){b.add(g);let x=n.get(g);if(!x)break;f??=x.own.fontFamily,h??=x.own.fontSizeHalfPoints,g=x.basedOn;}let i={fontFamily:f??o.fontFamily,fontSizeHalfPoints:h??o.fontSizeHalfPoints};return s.set(p,i),i};return (r,p)=>{let m=l(r),f=p?.find(b=>b.localName==="rFonts"),h=f?Re(f.attributes?.asciiTheme,e)??Re(f.attributes?.hAnsiTheme,e):null;return h===null?m:{...m,fontFamily:h}}}function xn(t){let e=new Map,n=new Map,o=new Map;return $(t).forEach((s,l)=>{o.set(s.id,l);let r=Oc(s);if(r===null||!Nc(r))return;e.set(s.id,r);let p=r.toUpperCase();n.has(p)||n.set(p,s.id);}),Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:o})}var hr=Object.freeze([]);function kr(t,e={}){let n=yb(t);if(!n.ok)return {ok:false,reason:n.reason,...n.detail?{detail:n.detail}:{}};let o=n.package,s=o.parts.get(o.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-tree",detail:o.mainDocumentPart};let l=Uc(s),r=new Kf(o,l),p=null,m=null,f=null,h=null;r.subscribe(a=>{h=a;});let b=()=>r.bodyStore(),g=()=>r.currentPackage(),i=Object.freeze({kind:"body"}),y=(a,u)=>{let c=r.currentPackage(),d=a.checkpoint();a.graftPackage(()=>r.currentPackage());let k=u();return k.ok&&(a.restoreHistoryStacks(d),r.replacePackageShell(a.package),r.adoptPackageUnit(c),r.publishStoryWrite(k.change)),k},x=()=>{if(!p||p.packageRevision!==r.packageRevision){let a=Ub(g());p={packageRevision:r.packageRevision,resolution:a,parts:Vb(g())};}return p},T="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",O$2="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",S$1=false,I=null,v=()=>{if(S$1)return I;S$1=true;let a=g(),u=(a.relationships.get(a.mainDocumentPart)??[]).find(d=>d.type===T),c;if(u){let d=O$1(u);d.mode==="Internal"&&d.target.ok&&(c=a.parts.get(d.target.partName));}return c??=a.parts.get("/word/styles.xml"),I=c?.root??null,I},B=false,z=null,ie=()=>{if(B)return z;B=true;let a=g(),u=(a.relationships.get(a.mainDocumentPart)??[]).find(d=>d.type===O$2),c;if(u){let d=O$1(u);d.mode==="Internal"&&d.target.ok&&(c=a.parts.get(d.target.partName));}return c??=a.parts.get("/word/numbering.xml"),z=c?.root??null,z},q="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",ue=-1,Te=null,Xe=()=>{if(ue===r.packageRevision)return Te;ue=r.packageRevision;let a=g(),u=(a.relationships.get(a.mainDocumentPart)??[]).find(d=>d.type===q),c;if(u){let d=O$1(u);d.mode==="Internal"&&d.target.ok&&(c=a.parts.get(d.target.partName));}return c??=a.parts.get("/word/settings.xml"),Te=c?.root??null,Te},Sn="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",vn="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Je=(a,u)=>{let c=g(),d=(c.relationships.get("/")??[]).find(P=>P.type===a),k;if(d){let P=O$1(d);P.mode==="Internal"&&P.target.ok&&(k=c.parts.get(P.target.partName));}return k??c.parts.get(u)},Ze=-1,Ie=R,Rn=()=>{if(Ze===r.packageRevision)return Ie;Ze=r.packageRevision;let a=Je(Sn,"/docProps/core.xml"),u=Je(vn,"/docProps/app.xml");return Ie=S(a?.root??null,u?.root??null),Ie},Tn="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Ve=false,Ne=null,ee=()=>{if(Ve)return Ne;Ve=true;let a=g(),u=(a.relationships.get(a.mainDocumentPart)??[]).find(d=>d.type===Tn),c;if(u){let d=O$1(u);d.mode==="Internal"&&d.target.ok&&(c=a.parts.get(d.target.partName));}return c??=a.parts.get("/word/theme/theme1.xml"),Ne=c?.root??null,Ne},In="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",ce$1=null,Nn=()=>{if(ce$1)return ce$1;let a=g(),u=(a.relationships.get(a.mainDocumentPart)??[]).find(d=>d.type===In),c;if(u){let d=O$1(u);d.mode==="Internal"&&d.target.ok&&(c=a.parts.get(d.target.partName));}return c??=a.parts.get("/word/fontTable.xml"),ce$1=Object.freeze(G$1(a,c)),ce$1},te=null,ne=null,Qe=null,qe=null,et=null,tt=()=>{let a=[b().part.root],u=v();u&&a.push(u);let c=new Set;for(let d of x().parts)for(let k of [...d.headers.values(),...d.footers.values()])c.has(k)||(c.add(k),a.push(k.root));return a},de=null,pe=null,re=null,oe=null,me=null,fe=null,Ee=()=>{let a=b();return (!me||me.revision!==a.revision)&&(me={revision:a.revision,index:xn(a.part)}),me.index};return {ok:true,session:{editable:$(b().part).length>0,paragraphIds:()=>$(b().part).map(a=>a.id),paragraphIdsIn(a=i){let u=r.partFor(a);return u?$(u).map(c=>c.id):[]},part:()=>b().part,partFor:a=>r.partFor(a),currentPackage:g,applyTreeOps(a,u,c,d=i){if(a.length===0)return {committed:false,rejected:false,opCount:0};let k=a.filter(R=>Yc(R)||ce(R)).length;if(k>0){if(k!==a.length||a.length!==1)return {committed:false,rejected:true,opCount:a.length,reason:"invalidArgs"};let R=r.applyLifecycleOp(a[0]);return R.ok?{committed:true,rejected:false,opCount:1}:{committed:false,rejected:true,opCount:1,reason:R.detail??R.reason}}let P=r.transact(d,R=>{u!==void 0&&R.selectionBefore(u),c!==void 0&&R.selectionAfter(c);for(let N of a)R.apply(N);});return P.ok?{committed:true,rejected:false,opCount:a.length}:{committed:false,rejected:true,opCount:a.length,reason:P.reason}},projectDoc:()=>G(b().part),reconcile:a=>$e(a,b().part,h),lastCommitWasStructural:()=>h!==null&&(h.created.length>0||h.deleted.length>0||h.splitJoin.length>0||h.impact==="global"),applyPmDoc(a){let u=b(),c=je(u.part,a);if(!c.ok)return {committed:false,rejected:true,opCount:0,reason:c.reason};if(c.ops.length===0)return {committed:false,rejected:false,opCount:0};let d=r.transact(i,k=>{for(let P of c.ops)k.apply(P);});return d.ok?{committed:true,rejected:false,opCount:c.ops.length}:{committed:false,rejected:true,opCount:c.ops.length,reason:d.reason}},bodyText:()=>xr(b().part),storyText(a){let u=r.partFor(a);return u?$(u).map(c=>Ff(u,c.id)??"").join(`
4
+ `):null},revision:()=>b().revision,revisionFor:a=>r.revisionFor(a),packageRevision:()=>r.packageRevision,canUndo:()=>r.canUndo,canRedo:()=>r.canRedo,undo:()=>{let a=r.selectionForUndo();return r.undo()===null?null:a},redo:()=>{let a=r.selectionForRedo();return r.redo()===null?null:a},beginComposition:(a=i)=>{r.beginComposition(a);},endComposition:()=>r.endComposition(),subscribe(a){return r.subscribe(a)},save(){return zb(g())},headerFooterParts:()=>{let a=x().parts;return a[a.length-1]??Wb(g())},headerFooterPartsBySection:()=>x().parts,headerFooterResolutionBySection:()=>x().resolution,documentFonts(){return te&&te.revision===r.packageRevision||(te={revision:r.packageRevision,fonts:rn(tt(),se(ee()))}),te.fonts},rendersText(){return ne&&ne.revision===r.packageRevision||(ne={revision:r.packageRevision,rendersText:on(tt())}),ne.rendersText},documentStyles(){de??=Ke(v(),se(ee()));let a=de;return Qe??=ln(v(),u=>a(u)),Qe},stylesRoot:()=>v(),documentThemeFonts(){return et??=se(ee()),et},numberingRoot:()=>ie(),settingsRoot:()=>Xe(),documentProperties:()=>Rn(),trackingSettings:()=>O(Xe()),documentThemeColors(){return qe??=gn(ee()),qe},effectiveRunDefaults(a,u){de??=Ke(v(),se(ee()));let c=b();if(!pe||pe.revision!==c.revision){let d=new Map;for(let k of $(c.part))k.kind!=="textValue"&&d.set(k.id,Ye(k)??null);pe={revision:c.revision,byId:d};}return de(pe.byId.get(a)??null,u)},documentOutline(){let a=b();return re&&re.revision===a.revision||(re={revision:a.revision,outline:sn(a.part,v())}),re.outline},findText(a,u){let c=b(),d=`${u?.matchCase===true?"c":""}${u?.wholeWord===true?"w":""}${u?.limit??""}\0${a}`;if(oe&&oe.revision===c.revision&&oe.key===d)return oe.result;let k=cn(c.part,a,u??{});return oe={revision:c.revision,key:d,result:k},k},embeddedFonts:Nn,paragraphAnchors:Ee,paraIdOf:a=>Ee().paraIdByNode.get(a)??null,nodeIdOf:a=>Ee().nodeByParaId.get(a.toUpperCase())??null,relationshipTarget:(a,u=i)=>{let c=g(),d=r.partFor(u);return d?Xc(c,d.name,a):null},bookmarks:()=>{let a=b();return (!fe||fe.revision!==a.revision)&&(fe={revision:a.revision,index:Cc(a.part)}),fe.index},ensureHyperlinkRelationship(a,u=i){let c=r.partFor(u);if(!c)return null;let d=g(),k=Wc(d,a,c.name);return k?(k.pkg!==d&&r.replacePackageShell(k.pkg),k.relationshipId):null},reviewItems(){let a=e.reviewModel;if(!a)return hr;let u=b(),c=`${r.packageRevision}:${u.revision}`;if(m&&m.revisionKey===c)return m.items;let d=g(),k=d.parts.get(Sf(d,u.part.name)),P=d.parts.get(Tf(d,u.part.name)),R=[],N=new Set;for(let A of x().parts)for(let L of [A.headers,A.footers])for(let _ of L.values())N.has(_)||(N.add(_),R.push(_));for(let A of ["footnote","endnote"]){let L=Yd(d,A);!L||N.has(L)||(N.add(L),R.push(L));}let w=m&&h?en(h,m,m.items,u.part,k,P,r.packageRevision):null,F,C;if(w&&m){let A=a.revisionItemsOfParagraph(u.part,w);Vt(m.items,A,w)?(F=Qt(m.items,m.paragraphOrder,w,A),C=m.paragraphOrder):(C=tg(u.part),F=a.collectReviewItems({storyPart:u.part,furnitureParts:R,commentsPart:k,commentsExtendedPart:P,customNodePayloads:Zf(g(),u.part.name)}));}else C=tg(u.part),F=a.collectReviewItems({storyPart:u.part,furnitureParts:R,commentsPart:k,commentsExtendedPart:P,customNodePayloads:Zf(g(),u.part.name)});return m={revisionKey:c,bodyRevision:u.revision,packageRevision:r.packageRevision,items:F,paragraphOrder:C,commentsPart:k,commentsExtendedPart:P},m.items},hasReviewContent(){let a=b();return (!f||f.revision!==a.revision)&&(f={revision:a.revision,present:kf(a.part).length>0||Pn(a.part.root)}),f.present},replyToComment(a,u,c,d,k,P=i){let R=P.kind==="body"?null:r.resolveStory(P),N=R?.ok?R.store:b(),w=r.currentPackage(),F=N.checkpoint();N.graftPackage(()=>r.currentPackage());let C=Pf(N,{anchor:{paragraphId:u.paragraphId,start:u.start,end:u.end,...u.endParagraphId===void 0?{}:{endParagraphId:u.endParagraphId}},author:d,text:c,...k===void 0?{}:{date:k},...a===null?{}:{replyToCommentId:a}});return C.ok?(N.restoreHistoryStacks(F),r.replacePackageShell(N.package),r.adoptPackageUnit(w),r.publishStoryWrite(C.change),C.commentId):null},setCommentResolved(a,u){let c=b(),d=r.currentPackage(),k=c.checkpoint();c.graftPackage(()=>r.currentPackage());let P=Qf(c,a,u);return P.ok?(P.changed&&(c.restoreHistoryStacks(k),r.replacePackageShell(c.package),r.adoptPackageUnit(d),r.publishStoryWrite(P.change)),true):false},deleteComment(a,u=i,c){return this.deleteComments([{commentId:a}],u,c)},deleteComments(a,u=i,c){if(a.length===0)return false;let d=u.kind==="body"?b().part:r.partFor(u);if(!d)return false;let k={storyPartName:d.name,...c===void 0?{}:{noteId:c}},P=b(),R=r.currentPackage(),N=P.checkpoint();P.graftPackage(()=>r.currentPackage());let w=false,F=false,C=P.transact(A=>{A.applyPackage(L=>{let _=L;for(let ge of a){let De=ge.parentCommentId===void 0?Oe$1(_,ge.commentId,k):Pe$1(_,ge.commentId,ge.parentCommentId,k);if(De===null)return w=true,L;F||=De!==_,_=De;}return _});});return w||!C.ok||!F?false:(P.restoreHistoryStacks(N),r.installPackageSnapshot(P.package),r.adoptPackageUnit(R),r.publishStoryWrite(C.change),true)},insertCustomNode(a,u=i){let c=u.kind==="body"?null:r.resolveStory(u),d=c?.ok?c.store:b();return y(d,()=>Wf(d,a,b().part.name))},removeCustomNode(a,u=i){let c=u.kind==="body"?null:r.resolveStory(u),d=c?.ok?c.store:b();return y(d,()=>Xf(d,a))},sweepCustomNodePayloads(a){let u=b(),c=Yf(r.currentPackage(),u.part.name,a);return c.ok?c.removed.length===0?{ok:true,removed:[]}:(r.replacePackageShell(c.pkg),{ok:true,removed:c.removed}):{ok:false,reason:c.reason}},ensureListDefinition(a){let u=L(g(),a);return u?(r.replacePackageShell(u.pkg),B=false,z=null,u.numId):null},ensureNumberingLevel(a,u,c){let d=g(),k=M$1(d,a,u,c);return k?(k!==d&&(r.replacePackageShell(k),B=false,z=null),true):false},insertImage(a,u){return r.insertImage(a,u)},replaceImage(a,u,c,d,k,P){return r.replaceImage(a,u,c,d,k,P)},deleteImage(a,u){return r.deleteImage(a,u)},applyImageProperties(a,u){return r.applyImageProperties(a,u)}}}}function xr(t){return M(t).map(e=>Ff(t,e.id)??"").join(`
5
+ `)}var bn=new WeakMap;function Pn(t,e=0){if(e>64)return false;let n=bn.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"||Pn(s,e+1))){o=true;break}return bn.set(t,o),o}var br=t.projection;function Cr(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 Mr(t,e,n={}){let o=null,s=false,l=()=>n.onChange?.(r()),r=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:o}),p=i=>{s=true;let y=f.state.tr.replaceWith(0,f.state.doc.content.size,i.content);y.setMeta("addToHistory",false),f.dispatch(y),s=false;},m=i=>()=>(i()&&(p(e.projectDoc()),l()),true),f=new EditorView(t,{state:EditorState.create({doc:e.projectDoc(),plugins:[keymap({...baseKeymap,Home:selectTextblockStart,End:selectTextblockEnd,"Mod-z":m(()=>e.undo()!==null),"Mod-y":m(()=>e.redo()!==null),"Shift-Mod-z":m(()=>e.redo()!==null),"Mod-b":(i,y)=>g(i,y,"b"),"Mod-i":(i,y)=>g(i,y,"i"),"Mod-u":(i,y)=>g(i,y,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:i=>(h(i),false),beforeinput:(i,y)=>{let x=y;if(i.composing)return false;h(i);let T=x.inputType;if(T==="insertText"&&x.data!=null){x.preventDefault();let{from:O,to:S}=i.state.selection;return i.dispatch(i.state.tr.insertText(x.data,O,S)),true}if(T==="deleteContentBackward"){x.preventDefault();let{from:O,empty:S}=i.state.selection;return S?O>0?i.dispatch(i.state.tr.delete(O-1,O)):joinBackward(i.state,i.dispatch):deleteSelection(i.state,i.dispatch),true}if(T==="deleteContentForward"){x.preventDefault();let{from:O,to:S,empty:I}=i.state.selection;return I?S<i.state.doc.content.size?i.dispatch(i.state.tr.delete(O,O+1)):joinForward(i.state,i.dispatch):deleteSelection(i.state,i.dispatch),true}return T==="insertParagraph"?(x.preventDefault(),splitBlock(i.state,i.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),l(),false)},dispatchTransaction(i){let y=f.state.apply(i);if(s||!i.docChanged){f.updateState(y);return}let x=e.applyPmDoc(y.doc);if(x.rejected){o=String(x.reason??"rejected"),f.updateState(y),p(e.projectDoc()),l();return}o=null,f.updateState(x.committed&&e.lastCommitWasStructural()?b(y):y),l();}});function h(i){if(i.composing||s)return;let y=i.dom.ownerDocument.getSelection(),x=y?.anchorNode,T=y?.focusNode;if(!(!y||!x||!T)&&!(!i.dom.contains(x)||!i.dom.contains(T)))try{let O=i.posAtDOM(x,y.anchorOffset),S=i.posAtDOM(T,y.focusOffset),I=i.state.selection;if(I.anchor===O&&I.head===S)return;let v=TextSelection.create(i.state.doc,O,S);i.dispatch(i.state.tr.setSelection(v).setMeta("addToHistory",!1));}catch{}}function b(i){let y=e.paragraphIds(),x=i.tr,T=false,O=0;return i.doc.forEach((S,I)=>{let v=y[O];O+=1,!(S.type.name!=="paragraph"||v===void 0)&&S.attrs.nodeId!==v&&(x=x.setNodeMarkup(I,void 0,{...S.attrs,nodeId:v}),T=true);}),T?i.apply(x.setMeta("addToHistory",false)):i}function g(i,y,x,T){let O=E.marks.runProps;if(!y)return true;let{from:S,to:I,empty:v}=i.selection;if(v)return true;let z=i.doc.resolve(S).marks().find(ue=>ue.type===O)?.attrs.props??[],ie=Cr(z,x,T),q=i.tr;return q.removeMark(S,I,O),ie.length>0&&q.addMark(S,I,O.create({props:ie})),y(q),true}return {view:f,state:r,undo:()=>m(()=>e.undo()!==null)(),redo:()=>m(()=>e.redo()!==null)(),toggleRunProperty(i,y){g(f.state,f.dispatch.bind(f),i,y);},destroy:()=>f.destroy()}}export{E as a,Be as b,M as c,$ as d,G as e,je as f,zn as g,$e as h,Ye as i,kr as j,br as k,Mr as l};