@guodun/antdv 1.5.3 → 1.6.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 (375) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +1 -1
  2. package/dist/es/components/contract-signing-location/src/template-source.mjs +16 -16
  3. package/dist/es/components/dept-selector/index.mjs +1 -1
  4. package/dist/es/components/dept-selector/src/DeptSelector.mjs +5 -0
  5. package/dist/es/components/dept-selector/src/DeptSelector.vue.mjs +90 -0
  6. package/dist/es/components/dept-selector/src/style/index.mjs +1 -0
  7. package/dist/es/components/dept-selector/src/types.mjs +4 -0
  8. package/dist/es/components/index.mjs +5 -3
  9. package/dist/es/components/plus-upload/apis/plus-upload.api.mjs +19 -9
  10. package/dist/es/components/plus-upload/hook/usePlusUpload.mjs +9 -9
  11. package/dist/es/components/plus-upload/src/plus-upload.vue.mjs +1 -1
  12. package/dist/es/components/plus-upload/src/types.mjs +4 -0
  13. package/dist/es/components/pro-contract-template-designer/index.mjs +2 -2
  14. package/dist/es/components/pro-contract-template-designer/src/{ContractTemplatePreviewSigningLayer.mjs → ContractTemplateAuthoringBar.mjs} +2 -2
  15. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.mjs +168 -0
  16. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.mjs +5 -0
  17. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.mjs +120 -0
  18. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +382 -459
  19. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +278 -122
  20. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +415 -288
  21. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +76 -75
  22. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFindReplace.mjs +5 -0
  23. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.mjs +164 -0
  24. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.mjs +380 -393
  25. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.mjs +5 -0
  26. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.mjs +108 -0
  27. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.mjs +5 -0
  28. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.mjs +73 -0
  29. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.mjs +109 -53
  30. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.mjs +5 -0
  31. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.mjs +52 -0
  32. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +10 -14
  33. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +49 -58
  34. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.mjs +119 -196
  35. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.mjs +5 -0
  36. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.mjs +115 -0
  37. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +241 -290
  38. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1169 -1324
  39. package/dist/es/components/pro-contract-template-designer/src/{SigningPlacementInspector.mjs → SigningLayoutCustomModal.mjs} +2 -2
  40. package/dist/es/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.mjs +110 -0
  41. package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.mjs +5 -0
  42. package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.mjs +98 -0
  43. package/dist/es/components/pro-contract-template-designer/src/{SigningPlacementLayer.mjs → SigningLayoutPreview.mjs} +2 -2
  44. package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPreview.vue.mjs +51 -0
  45. package/dist/es/components/pro-contract-template-designer/src/composables/use-designer-files.mjs +1 -2
  46. package/dist/es/components/pro-contract-template-designer/src/composables/use-draft-cache-session.mjs +2 -3
  47. package/dist/es/components/pro-contract-template-designer/src/composables/use-page-authoring.mjs +43 -0
  48. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-authoring.mjs +99 -0
  49. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +128 -168
  50. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs +1 -1
  51. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +7 -11
  52. package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +1 -1
  53. package/dist/es/components/pro-contract-template-designer/src/constants.mjs +36 -25
  54. package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.mjs +7 -0
  55. package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.mjs +192 -0
  56. package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue_vue_type_style_index_0_scoped_a2a8e01a_lang.css +1 -0
  57. package/dist/es/components/pro-contract-template-designer/src/extensions/authoring-search.mjs +43 -0
  58. package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +137 -93
  59. package/dist/es/components/pro-contract-template-designer/src/extensions/signing-mark.mjs +92 -0
  60. package/dist/es/components/pro-contract-template-designer/src/utils/authoring-search.mjs +59 -0
  61. package/dist/es/components/pro-contract-template-designer/src/utils/authoring-shortcuts.mjs +14 -0
  62. package/dist/es/components/pro-contract-template-designer/src/utils/clause-snippets.mjs +56 -0
  63. package/dist/es/components/pro-contract-template-designer/src/utils/document-outline.mjs +45 -0
  64. package/dist/es/components/pro-contract-template-designer/src/utils/panel-search.mjs +7 -0
  65. package/dist/es/components/pro-contract-template-designer/src/utils/signing-layout-presets.mjs +235 -0
  66. package/dist/es/components/pro-contract-template-designer/src/utils/signing-mark.mjs +152 -0
  67. package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +22 -20
  68. package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +1 -0
  69. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  70. package/dist/es/components/pro-dynamic-tags/src/index.vue.mjs +74 -48
  71. package/dist/es/components/pro-selector/index.mjs +6 -5
  72. package/dist/es/components/pro-selector/src/ProUserSelector.mjs +5 -0
  73. package/dist/es/components/pro-selector/src/ProUserSelector.vue.mjs +95 -0
  74. package/dist/es/components/pro-selector/src/ProUserSelectorDrilldown.mjs +5 -0
  75. package/dist/es/components/pro-selector/src/ProUserSelectorDrilldown.vue.mjs +20 -0
  76. package/dist/es/components/pro-selector/src/components/user.mjs +38 -52
  77. package/dist/es/components/pro-selector/src/types.mjs +9 -0
  78. package/dist/es/components/pro-selector/style/index.mjs +1 -0
  79. package/dist/es/components/pro-selector-group/index.mjs +1 -1
  80. package/dist/es/components/pro-selector-group/src/index.vue.mjs +71 -142
  81. package/dist/es/components/pro-selector-group/src/style/index.mjs +1 -0
  82. package/dist/es/components/pro-selector-group/src/utils/index.mjs +16 -28
  83. package/dist/es/components/role-selector/index.mjs +2 -2
  84. package/dist/es/components/role-selector/src/RoleSelector.mjs +5 -0
  85. package/dist/es/components/role-selector/src/RoleSelector.vue.mjs +90 -0
  86. package/dist/es/components/role-selector/src/style/index.mjs +1 -0
  87. package/dist/es/components/role-selector/src/types.mjs +4 -0
  88. package/dist/es/components/selector-core/components/DepartmentTree.mjs +5 -0
  89. package/dist/es/components/selector-core/components/DepartmentTree.vue.mjs +141 -0
  90. package/dist/es/components/selector-core/components/EntityRow.mjs +5 -0
  91. package/dist/es/components/selector-core/components/EntityRow.vue.mjs +84 -0
  92. package/dist/es/components/selector-core/components/HighlightText.mjs +5 -0
  93. package/dist/es/components/selector-core/components/HighlightText.vue.mjs +19 -0
  94. package/dist/es/components/selector-core/components/PanelFeedback.mjs +5 -0
  95. package/dist/es/components/selector-core/components/PanelFeedback.vue.mjs +61 -0
  96. package/dist/es/components/selector-core/components/PeoplePane.mjs +5 -0
  97. package/dist/es/components/selector-core/components/PeoplePane.vue.mjs +237 -0
  98. package/dist/es/components/selector-core/components/RolePane.mjs +5 -0
  99. package/dist/es/components/selector-core/components/RolePane.vue.mjs +87 -0
  100. package/dist/es/components/selector-core/components/SelectionSummary.mjs +5 -0
  101. package/dist/es/components/selector-core/components/SelectionSummary.vue.mjs +73 -0
  102. package/dist/es/components/selector-core/components/SelectorDialog.mjs +5 -0
  103. package/dist/es/components/selector-core/components/SelectorDialog.vue.mjs +351 -0
  104. package/dist/es/components/selector-core/model.mjs +114 -0
  105. package/dist/es/components/selector-core/useSelectorData.mjs +87 -0
  106. package/dist/es/index.mjs +82 -80
  107. package/dist/es/node_modules/@tiptap/pm/dist/history/index.mjs +1 -0
  108. package/dist/es/node_modules/orderedmap/dist/index.mjs +67 -0
  109. package/dist/es/node_modules/prosemirror-history/dist/index.mjs +226 -0
  110. package/dist/es/node_modules/prosemirror-model/dist/index.mjs +1128 -0
  111. package/dist/es/node_modules/prosemirror-state/dist/index.mjs +325 -0
  112. package/dist/es/node_modules/prosemirror-transform/dist/index.mjs +1055 -0
  113. package/dist/es/node_modules/rope-sequence/dist/index.mjs +83 -0
  114. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
  115. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
  116. package/dist/lib/components/dept-selector/index.cjs +1 -1
  117. package/dist/lib/components/dept-selector/src/DeptSelector.cjs +1 -0
  118. package/dist/lib/components/dept-selector/src/DeptSelector.vue.cjs +1 -0
  119. package/dist/lib/components/dept-selector/src/style/index.cjs +1 -1
  120. package/dist/lib/components/dept-selector/src/types.cjs +1 -1
  121. package/dist/lib/components/index.cjs +1 -1
  122. package/dist/lib/components/plus-upload/apis/plus-upload.api.cjs +1 -1
  123. package/dist/lib/components/plus-upload/hook/usePlusUpload.cjs +1 -1
  124. package/dist/lib/components/plus-upload/src/plus-upload.vue.cjs +1 -1
  125. package/dist/lib/components/plus-upload/src/types.cjs +1 -1
  126. package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
  127. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.cjs +1 -0
  128. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.cjs +1 -0
  129. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.cjs +1 -0
  130. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.cjs +1 -0
  131. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +2 -2
  132. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -1
  133. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -1
  134. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
  135. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFindReplace.cjs +1 -0
  136. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.cjs +1 -0
  137. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.cjs +1 -1
  138. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.cjs +1 -0
  139. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.cjs +1 -0
  140. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.cjs +1 -0
  141. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.cjs +1 -0
  142. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.cjs +1 -1
  143. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.cjs +1 -0
  144. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.cjs +1 -0
  145. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -1
  146. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
  147. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.cjs +1 -1
  148. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.cjs +1 -0
  149. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.cjs +1 -0
  150. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  151. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  152. package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.cjs +1 -0
  153. package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.cjs +1 -0
  154. package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.cjs +1 -0
  155. package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.cjs +1 -0
  156. package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPreview.cjs +1 -0
  157. package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPreview.vue.cjs +1 -0
  158. package/dist/lib/components/pro-contract-template-designer/src/composables/use-designer-files.cjs +1 -1
  159. package/dist/lib/components/pro-contract-template-designer/src/composables/use-draft-cache-session.cjs +1 -1
  160. package/dist/lib/components/pro-contract-template-designer/src/composables/use-page-authoring.cjs +1 -0
  161. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-authoring.cjs +1 -0
  162. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
  163. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-draft-cache.cjs +1 -1
  164. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +1 -1
  165. package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -1
  166. package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
  167. package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.cjs +1 -0
  168. package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.cjs +1 -0
  169. package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue_vue_type_style_index_0_scoped_a2a8e01a_lang.css +1 -0
  170. package/dist/lib/components/pro-contract-template-designer/src/extensions/authoring-search.cjs +1 -0
  171. package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
  172. package/dist/lib/components/pro-contract-template-designer/src/extensions/signing-mark.cjs +1 -0
  173. package/dist/lib/components/pro-contract-template-designer/src/utils/authoring-search.cjs +1 -0
  174. package/dist/lib/components/pro-contract-template-designer/src/utils/authoring-shortcuts.cjs +1 -0
  175. package/dist/lib/components/pro-contract-template-designer/src/utils/clause-snippets.cjs +1 -0
  176. package/dist/lib/components/pro-contract-template-designer/src/utils/document-outline.cjs +1 -0
  177. package/dist/lib/components/pro-contract-template-designer/src/utils/panel-search.cjs +1 -0
  178. package/dist/lib/components/pro-contract-template-designer/src/utils/signing-layout-presets.cjs +1 -0
  179. package/dist/lib/components/pro-contract-template-designer/src/utils/signing-mark.cjs +1 -0
  180. package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -1
  181. package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -1
  182. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  183. package/dist/lib/components/pro-dynamic-tags/src/index.vue.cjs +1 -1
  184. package/dist/lib/components/pro-selector/index.cjs +1 -1
  185. package/dist/lib/components/pro-selector/src/ProUserSelector.cjs +1 -0
  186. package/dist/lib/components/pro-selector/src/ProUserSelector.vue.cjs +1 -0
  187. package/dist/lib/components/pro-selector/src/ProUserSelectorDrilldown.cjs +1 -0
  188. package/dist/lib/components/pro-selector/src/ProUserSelectorDrilldown.vue.cjs +1 -0
  189. package/dist/lib/components/pro-selector/src/components/user.cjs +1 -1
  190. package/dist/lib/components/pro-selector/src/types.cjs +1 -1
  191. package/dist/lib/components/pro-selector/style/index.cjs +1 -1
  192. package/dist/lib/components/pro-selector-group/index.cjs +1 -1
  193. package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
  194. package/dist/lib/components/pro-selector-group/src/style/index.cjs +1 -1
  195. package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -1
  196. package/dist/lib/components/role-selector/index.cjs +1 -1
  197. package/dist/lib/components/role-selector/src/RoleSelector.cjs +1 -0
  198. package/dist/lib/components/role-selector/src/RoleSelector.vue.cjs +1 -0
  199. package/dist/lib/components/role-selector/src/style/index.cjs +1 -1
  200. package/dist/lib/components/role-selector/src/types.cjs +1 -1
  201. package/dist/lib/components/selector-core/components/DepartmentTree.cjs +1 -0
  202. package/dist/lib/components/selector-core/components/DepartmentTree.vue.cjs +1 -0
  203. package/dist/lib/components/selector-core/components/EntityRow.cjs +1 -0
  204. package/dist/lib/components/selector-core/components/EntityRow.vue.cjs +1 -0
  205. package/dist/lib/components/selector-core/components/HighlightText.cjs +1 -0
  206. package/dist/lib/components/selector-core/components/HighlightText.vue.cjs +1 -0
  207. package/dist/lib/components/selector-core/components/PanelFeedback.cjs +1 -0
  208. package/dist/lib/components/selector-core/components/PanelFeedback.vue.cjs +1 -0
  209. package/dist/lib/components/selector-core/components/PeoplePane.cjs +1 -0
  210. package/dist/lib/components/selector-core/components/PeoplePane.vue.cjs +1 -0
  211. package/dist/lib/components/selector-core/components/RolePane.cjs +1 -0
  212. package/dist/lib/components/selector-core/components/RolePane.vue.cjs +1 -0
  213. package/dist/lib/components/selector-core/components/SelectionSummary.cjs +1 -0
  214. package/dist/lib/components/selector-core/components/SelectionSummary.vue.cjs +1 -0
  215. package/dist/lib/components/selector-core/components/SelectorDialog.cjs +1 -0
  216. package/dist/lib/components/selector-core/components/SelectorDialog.vue.cjs +1 -0
  217. package/dist/lib/components/selector-core/model.cjs +1 -0
  218. package/dist/lib/components/selector-core/useSelectorData.cjs +1 -0
  219. package/dist/lib/index.cjs +1 -1
  220. package/dist/lib/node_modules/@tiptap/pm/dist/history/index.cjs +1 -0
  221. package/dist/lib/node_modules/orderedmap/dist/index.cjs +1 -0
  222. package/dist/lib/node_modules/prosemirror-history/dist/index.cjs +1 -0
  223. package/dist/lib/node_modules/prosemirror-model/dist/index.cjs +2 -0
  224. package/dist/lib/node_modules/prosemirror-state/dist/index.cjs +1 -0
  225. package/dist/lib/node_modules/prosemirror-transform/dist/index.cjs +2 -0
  226. package/dist/lib/node_modules/rope-sequence/dist/index.cjs +1 -0
  227. package/dist/theme/dept-selector.css +1 -1
  228. package/dist/theme/icon.css +1 -1
  229. package/dist/theme/index.css +1 -1
  230. package/dist/theme/pro-dynamic-tags.css +1 -1
  231. package/dist/theme/pro-modal.css +1 -1
  232. package/dist/theme/pro-selector-group.css +1 -1
  233. package/dist/theme/pro-selector.css +1 -1
  234. package/dist/theme/role-selector.css +1 -1
  235. package/dist/theme/selector-core.css +1 -0
  236. package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -3
  237. package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +2 -2
  238. package/dist/types/components/dept-selector/index.d.ts +156 -45
  239. package/dist/types/components/dept-selector/src/{dept.d.ts → DeptSelector.vue.d.ts} +38 -15
  240. package/dist/types/components/dept-selector/src/types.d.ts +10 -2
  241. package/dist/types/components/plus-upload/apis/plus-upload.api.d.ts +15 -0
  242. package/dist/types/components/plus-upload/hook/usePlusUpload.d.ts +1 -1
  243. package/dist/types/components/plus-upload/index.d.ts +21 -3
  244. package/dist/types/components/plus-upload/src/plus-upload.vue.d.ts +11 -1
  245. package/dist/types/components/plus-upload/src/types.d.ts +4 -0
  246. package/dist/types/components/pro-contract-template-designer/index.d.ts +2 -1
  247. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.d.ts +106 -0
  248. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.d.ts +18 -0
  249. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +5 -42
  250. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +9 -11
  251. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +42 -4
  252. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +18 -1
  253. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.d.ts +37 -0
  254. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.d.ts +29 -0
  255. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.d.ts +16 -0
  256. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.d.ts +15 -0
  257. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +1 -4
  258. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +1 -2
  259. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.d.ts +1 -29
  260. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.d.ts +14 -0
  261. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +13 -29
  262. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +260 -121
  263. package/dist/types/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.d.ts +15 -0
  264. package/dist/types/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.d.ts +19 -0
  265. package/dist/types/components/pro-contract-template-designer/src/{ContractTemplatePreviewSigningLayer.vue.d.ts → SigningLayoutPreview.vue.d.ts} +2 -3
  266. package/dist/types/components/pro-contract-template-designer/src/composables/use-designer-files.d.ts +1 -4
  267. package/dist/types/components/pro-contract-template-designer/src/composables/use-draft-cache-session.d.ts +1 -5
  268. package/dist/types/components/pro-contract-template-designer/src/composables/use-page-authoring.d.ts +13 -0
  269. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-authoring.d.ts +44 -0
  270. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +4 -20
  271. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +1 -1
  272. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +1 -2
  273. package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +1 -1
  274. package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +20 -1
  275. package/dist/types/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.d.ts +5 -0
  276. package/dist/types/components/pro-contract-template-designer/src/extensions/authoring-search.d.ts +12 -0
  277. package/dist/types/components/pro-contract-template-designer/src/extensions/signing-mark.d.ts +16 -0
  278. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +64 -77
  279. package/dist/types/components/pro-contract-template-designer/src/utils/authoring-search.d.ts +23 -0
  280. package/dist/types/components/pro-contract-template-designer/src/utils/authoring-shortcuts.d.ts +3 -0
  281. package/dist/types/components/pro-contract-template-designer/src/utils/clause-snippets.d.ts +10 -0
  282. package/dist/types/components/pro-contract-template-designer/src/utils/document-outline.d.ts +20 -0
  283. package/dist/types/components/pro-contract-template-designer/src/utils/panel-search.d.ts +2 -0
  284. package/dist/types/components/pro-contract-template-designer/src/utils/signing-layout-presets.d.ts +49 -0
  285. package/dist/types/components/pro-contract-template-designer/src/utils/signing-mark.d.ts +57 -0
  286. package/dist/types/components/pro-contract-template-designer/src/utils/template-tool-icons.d.ts +4 -4
  287. package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +2 -2
  288. package/dist/types/components/pro-dynamic-tags/src/index.vue.d.ts +1 -0
  289. package/dist/types/components/pro-dynamic-tags/src/types.d.ts +9 -0
  290. package/dist/types/components/pro-menu-tree/index.d.ts +2 -2
  291. package/dist/types/components/pro-menu-tree/src/pro-menu-tree.d.ts +2 -2
  292. package/dist/types/components/pro-selector/index.d.ts +851 -13
  293. package/dist/types/components/pro-selector/src/{pro-user.d.ts → ProUserSelector.vue.d.ts} +50 -12
  294. package/dist/types/components/pro-selector/src/ProUserSelectorDrilldown.vue.d.ts +447 -0
  295. package/dist/types/components/pro-selector/src/components/user.d.ts +2 -2
  296. package/dist/types/components/pro-selector/src/types.d.ts +16 -0
  297. package/dist/types/components/pro-selector-group/index.d.ts +63 -13
  298. package/dist/types/components/pro-selector-group/src/index.vue.d.ts +21 -4
  299. package/dist/types/components/pro-selector-group/src/types.d.ts +6 -0
  300. package/dist/types/components/pro-selector-group/src/utils/index.d.ts +4 -2
  301. package/dist/types/components/role-selector/index.d.ts +276 -86
  302. package/dist/types/components/role-selector/src/{role.d.ts → RoleSelector.vue.d.ts} +37 -13
  303. package/dist/types/components/role-selector/src/types.d.ts +10 -2
  304. package/dist/types/components/selector-core/components/DepartmentTree.vue.d.ts +22 -0
  305. package/dist/types/components/selector-core/components/EntityRow.vue.d.ts +21 -0
  306. package/dist/types/components/selector-core/components/HighlightText.vue.d.ts +6 -0
  307. package/dist/types/components/selector-core/components/PanelFeedback.vue.d.ts +28 -0
  308. package/dist/types/components/selector-core/components/PeoplePane.vue.d.ts +31 -0
  309. package/dist/types/components/selector-core/components/RolePane.vue.d.ts +19 -0
  310. package/dist/types/components/selector-core/components/SelectionSummary.vue.d.ts +14 -0
  311. package/dist/types/components/selector-core/components/SelectorDialog.vue.d.ts +48 -0
  312. package/dist/types/components/selector-core/model.d.ts +75 -0
  313. package/dist/types/components/selector-core/useSelectorData.d.ts +104 -0
  314. package/global.d.ts +4 -0
  315. package/package.json +5 -3
  316. package/dist/es/components/dept-selector/src/dept.mjs +0 -294
  317. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.mjs +0 -42
  318. package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.mjs +0 -141
  319. package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +0 -151
  320. package/dist/es/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.mjs +0 -79
  321. package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +0 -293
  322. package/dist/es/components/pro-selector/src/components/org-tree.mjs +0 -223
  323. package/dist/es/components/pro-selector/src/pro-user.mjs +0 -167
  324. package/dist/es/components/pro-selector/src/utils/orgTree.mjs +0 -50
  325. package/dist/es/components/pro-selector-group/src/compoents/dept-tree.mjs +0 -5
  326. package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +0 -127
  327. package/dist/es/components/pro-selector-group/src/compoents/dept.mjs +0 -5
  328. package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +0 -52
  329. package/dist/es/components/pro-selector-group/src/compoents/index.mjs +0 -3
  330. package/dist/es/components/pro-selector-group/src/compoents/role.mjs +0 -5
  331. package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +0 -120
  332. package/dist/es/components/pro-selector-group/src/compoents/select-box.mjs +0 -5
  333. package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +0 -59
  334. package/dist/es/components/pro-selector-group/src/compoents/user.mjs +0 -5
  335. package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +0 -154
  336. package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +0 -76
  337. package/dist/es/components/role-selector/src/role.mjs +0 -217
  338. package/dist/lib/components/dept-selector/src/dept.cjs +0 -1
  339. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.cjs +0 -1
  340. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.cjs +0 -1
  341. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.cjs +0 -1
  342. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.cjs +0 -1
  343. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.cjs +0 -1
  344. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +0 -1
  345. package/dist/lib/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.cjs +0 -1
  346. package/dist/lib/components/pro-contract-template-designer/src/utils/signing-placement.cjs +0 -1
  347. package/dist/lib/components/pro-selector/src/components/org-tree.cjs +0 -1
  348. package/dist/lib/components/pro-selector/src/pro-user.cjs +0 -1
  349. package/dist/lib/components/pro-selector/src/utils/orgTree.cjs +0 -1
  350. package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.cjs +0 -1
  351. package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.cjs +0 -1
  352. package/dist/lib/components/pro-selector-group/src/compoents/dept.cjs +0 -1
  353. package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.cjs +0 -1
  354. package/dist/lib/components/pro-selector-group/src/compoents/index.cjs +0 -1
  355. package/dist/lib/components/pro-selector-group/src/compoents/role.cjs +0 -1
  356. package/dist/lib/components/pro-selector-group/src/compoents/role.vue.cjs +0 -1
  357. package/dist/lib/components/pro-selector-group/src/compoents/select-box.cjs +0 -1
  358. package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.cjs +0 -1
  359. package/dist/lib/components/pro-selector-group/src/compoents/user.cjs +0 -1
  360. package/dist/lib/components/pro-selector-group/src/compoents/user.vue.cjs +0 -1
  361. package/dist/lib/components/pro-selector-group/src/hooks/useApi.cjs +0 -1
  362. package/dist/lib/components/role-selector/src/role.cjs +0 -1
  363. package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +0 -17
  364. package/dist/types/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.d.ts +0 -19
  365. package/dist/types/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.d.ts +0 -49
  366. package/dist/types/components/pro-contract-template-designer/src/utils/signing-placement.d.ts +0 -105
  367. package/dist/types/components/pro-selector/src/components/org-tree.d.ts +0 -45
  368. package/dist/types/components/pro-selector/src/util.d.ts +0 -26
  369. package/dist/types/components/pro-selector-group/src/compoents/dept-tree.vue.d.ts +0 -12
  370. package/dist/types/components/pro-selector-group/src/compoents/dept.vue.d.ts +0 -11
  371. package/dist/types/components/pro-selector-group/src/compoents/index.d.ts +0 -3
  372. package/dist/types/components/pro-selector-group/src/compoents/role.vue.d.ts +0 -11
  373. package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +0 -15
  374. package/dist/types/components/pro-selector-group/src/compoents/user.vue.d.ts +0 -12
  375. package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +0 -112
@@ -1,52 +1,54 @@
1
1
  import { CONTRACT_BLOCK_STYLES as e, DEFAULT_CONTRACT_FONT_FAMILY as t, DEFAULT_FONT_SIZE_PRESETS as n, DEFAULT_TEXT_ALIGN_OPTIONS as r, resolveFontFamilyOptions as i } from "./constants.mjs";
2
2
  import { collectPageDecorationVariableKeys as a, normalizePageDecorations as o, resolvePageDecorationPreset as ee, resolvePageDecorationValidationPath as te, rewritePageDecorationVariableTokens as ne } from "./utils/page-decorations.mjs";
3
3
  import { isContractTemplateFieldType as re } from "./types.mjs";
4
- import { ContractTemplateLocationRuleBuildError as ie, SIGNING_PLACEMENT_TYPE_LABELS as ae, buildContractLocationRules as oe, buildSigningPlacementLocationRules as se, createSigningPlacement as ce, resolveSigningPlacementToolItems as le, scaleSigningPlacementToPage as ue } from "./utils/signing-placement.mjs";
5
- import { DEFAULT_ADVANCED_CHOICE_FIELD_TYPES as de, DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES as fe, DEFAULT_CUSTOM_FIELD_TYPES as pe, DEFAULT_FIELD_STYLE as me, DEFAULT_FIELD_TYPES as s, DEFAULT_PAGE_SIZE as he, buildTemplatePreviewPages as ge, cloneTemplateValue as c, collectTemplateLocationRuleExportErrors as _e, collectTemplateValueVariableKeys as ve, constrainTemplatePageSizes as ye, createBlankPage as be, createBlankTemplate as xe, createDefaultPage as Se, createTemplateVariable as Ce, exportTemplateValue as we, getFieldOption as Te, getPageSizeKey as Ee, normalizeContractTemplateMaxPages as De, normalizePageSizeOptions as Oe, normalizeTemplateValue as ke, resolvePageSize as Ae, syncTemplateVariablesWithPages as je, validateContractTemplateVariableKey as Me, validateTemplateValue as Ne } from "./composables/use-template-designer.mjs";
6
- import { isSafeContractImageUrl as Pe } from "./utils/image-url.mjs";
7
- import { buildTemplateVariableData as Fe } from "./utils/template-renderer.mjs";
8
- import { useFitWidthZoom as Ie } from "./composables/use-fit-width-zoom.mjs";
9
- import { normalizeContractImageDimension as Le, processContractImageFile as Re } from "./utils/content-image.mjs";
10
- import { inferContextVariableLabel as ze, resolveContextVariableWidth as Be } from "./utils/context-variable.mjs";
11
- import Ve from "./DesignerPage.mjs";
12
- import He from "./TableContextMenu.mjs";
13
- import Ue from "./ContractTemplateDesignerWorkspaceHeader.mjs";
14
- import We from "./ContractTemplateDesignerToolbar.mjs";
15
- import Ge from "./ContractTemplateTextContextMenu.mjs";
16
- import Ke from "./ContractTemplateTextBubbleMenu.mjs";
17
- import qe from "./ContractTemplateImageContextMenu.mjs";
18
- import Je from "./ContractTemplatePreviewModal.mjs";
19
- import Ye from "./ContractTemplateSubmitDataModal.mjs";
20
- import Xe from "./ContractTemplateVariableDataModal.mjs";
21
- import { DEFAULT_DRAFT_CACHE_INTERVAL as Ze, DEFAULT_DRAFT_CACHE_KEY as Qe, DEFAULT_DRAFT_CACHE_MAX_BYTES as l, createDraftCacheStatus as $e, formatDraftCacheSavedAt as et } from "./composables/use-template-draft-cache.mjs";
22
- import { useAutoPagination as tt } from "./composables/use-auto-pagination.mjs";
23
- import { resolveSetActiveFileIdOptions as nt } from "./composables/use-designer-files.mjs";
24
- import { cloneContractTemplateFiles as u, constrainContractTemplateFiles as rt, createContractTemplateFile as it, exportContractTemplateFiles as at, moveContractTemplateFile as ot, normalizeContractTemplateFiles as st, removeContractTemplateFile as ct, renameContractTemplateFile as lt, replaceContractTemplateFile as ut, resolveContractTemplateActiveFileId as dt } from "./composables/use-template-files.mjs";
25
- import { useDraftCacheSession as ft } from "./composables/use-draft-cache-session.mjs";
26
- import { cloneSigningPlacement as pt, useSigningPlacementEditor as mt } from "./composables/use-signing-placement-editor.mjs";
27
- import { resolveFieldTypeIcon as ht, resolveSigningPlacementTypeIcon as gt } from "./utils/template-tool-icons.mjs";
28
- import _t from "./ContractTemplateFileBar.mjs";
29
- import vt from "./ContractTemplateDesignerSidebar.mjs";
30
- import yt from "./ContractTemplateDesignerInspector.mjs";
31
- import bt from "./ContractTemplatePageDecorationsStudio.mjs";
4
+ import { DEFAULT_ADVANCED_CHOICE_FIELD_TYPES as ie, DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES as ae, DEFAULT_CUSTOM_FIELD_TYPES as oe, DEFAULT_FIELD_STYLE as se, DEFAULT_FIELD_TYPES as s, DEFAULT_PAGE_SIZE as ce, buildTemplatePreviewPages as le, cloneTemplateValue as c, collectTemplateValueVariableKeys as ue, constrainTemplatePageSizes as de, createBlankPage as fe, createBlankTemplate as pe, createDefaultPage as me, createTemplateVariable as he, exportTemplateValue as ge, getFieldOption as _e, getPageSizeKey as ve, normalizeContractTemplateMaxPages as ye, normalizePageSizeOptions as be, normalizeTemplateValue as xe, resolvePageSize as Se, syncTemplateVariablesWithPages as Ce, validateContractTemplateVariableKey as we, validateTemplateValue as Te } from "./composables/use-template-designer.mjs";
5
+ import { isSafeContractImageUrl as Ee } from "./utils/image-url.mjs";
6
+ import { buildTemplateVariableData as De } from "./utils/template-renderer.mjs";
7
+ import { useFitWidthZoom as Oe } from "./composables/use-fit-width-zoom.mjs";
8
+ import { normalizeContractImageDimension as ke, processContractImageFile as Ae } from "./utils/content-image.mjs";
9
+ import { SIGNING_LAYOUT_PRESETS as je, SIGNING_LAYOUT_PRESET_KEYS as Me, isSigningLayoutPresetKey as Ne } from "./utils/signing-layout-presets.mjs";
10
+ import { inferContextVariableLabel as Pe, resolveContextVariableWidth as Fe } from "./utils/context-variable.mjs";
11
+ import Ie from "./DesignerPage.mjs";
12
+ import Le from "./TableContextMenu.mjs";
13
+ import Re from "./ContractTemplateDesignerWorkspaceHeader.mjs";
14
+ import { resolveFieldTypeIcon as ze } from "./utils/template-tool-icons.mjs";
15
+ import Be from "./ContractTemplateDesignerToolbar.mjs";
16
+ import Ve from "./ContractTemplateAuthoringBar.mjs";
17
+ import { useTemplateAuthoring as He } from "./composables/use-template-authoring.mjs";
18
+ import Ue from "./ContractTemplateTextContextMenu.mjs";
19
+ import We from "./ContractTemplateTextBubbleMenu.mjs";
20
+ import Ge from "./ContractTemplateImageContextMenu.mjs";
21
+ import Ke from "./ContractTemplatePreviewModal.mjs";
22
+ import qe from "./ContractTemplateSubmitDataModal.mjs";
23
+ import Je from "./ContractTemplateVariableDataModal.mjs";
24
+ import Ye from "./SigningLayoutCustomModal.mjs";
25
+ import { DEFAULT_DRAFT_CACHE_INTERVAL as Xe, DEFAULT_DRAFT_CACHE_KEY as Ze, DEFAULT_DRAFT_CACHE_MAX_BYTES as l, createDraftCacheStatus as Qe, formatDraftCacheSavedAt as $e } from "./composables/use-template-draft-cache.mjs";
26
+ import { useAutoPagination as et } from "./composables/use-auto-pagination.mjs";
27
+ import { resolveSetActiveFileIdOptions as tt } from "./composables/use-designer-files.mjs";
28
+ import { cloneContractTemplateFiles as u, constrainContractTemplateFiles as nt, createContractTemplateFile as rt, exportContractTemplateFiles as it, moveContractTemplateFile as at, normalizeContractTemplateFiles as ot, removeContractTemplateFile as st, renameContractTemplateFile as ct, replaceContractTemplateFile as lt, resolveContractTemplateActiveFileId as ut } from "./composables/use-template-files.mjs";
29
+ import { useDraftCacheSession as dt } from "./composables/use-draft-cache-session.mjs";
30
+ import ft from "./ContractTemplateFileBar.mjs";
31
+ import pt from "./ContractTemplateDesignerSidebar.mjs";
32
+ import mt from "./ContractTemplateDesignerInspector.mjs";
33
+ import ht from "./ContractTemplatePageDecorationsStudio.mjs";
32
34
  import { serializeFingerprint as d } from "./utils/serialize-fingerprint.mjs";
33
- import { isSameEditorState as xt } from "./utils/editor-state.mjs";
34
- import { clampContextMenuPosition as St, clampContextMenuToElement as Ct } from "./utils/context-menu-viewport.mjs";
35
- import { Fragment as wt, Teleport as Tt, computed as f, createBlock as Et, createCommentVNode as Dt, createElementBlock as Ot, createElementVNode as p, createVNode as m, defineComponent as h, nextTick as g, normalizeClass as kt, normalizeStyle as At, onBeforeUnmount as jt, onMounted as Mt, openBlock as _, ref as v, renderList as Nt, toDisplayString as Pt, unref as y, useId as Ft, vShow as It, watch as b, withCtx as Lt, withDirectives as Rt } from "vue";
36
- import { Alert as zt, Modal as Bt, Tooltip as Vt, message as Ht } from "ant-design-vue";
37
- import { useElementSize as Ut } from "@vueuse/core";
38
- import { CompressOutlined as Wt, DownOutlined as Gt } from "@ant-design/icons-vue";
35
+ import { isSameEditorState as gt } from "./utils/editor-state.mjs";
36
+ import { clampContextMenuPosition as _t, clampContextMenuToElement as vt } from "./utils/context-menu-viewport.mjs";
37
+ import { Fragment as yt, Teleport as bt, computed as f, createBlock as xt, createCommentVNode as p, createElementBlock as St, createElementVNode as m, createVNode as h, defineComponent as g, isRef as Ct, nextTick as _, normalizeClass as wt, normalizeStyle as Tt, onBeforeUnmount as Et, onMounted as Dt, openBlock as v, ref as y, renderList as Ot, toDisplayString as kt, unref as b, useId as At, vShow as jt, watch as x, withCtx as Mt, withDirectives as Nt } from "vue";
38
+ import { Alert as Pt, Modal as Ft, Tooltip as It, message as Lt } from "ant-design-vue";
39
+ import { useElementSize as Rt } from "@vueuse/core";
40
+ import { CompressOutlined as zt, DownOutlined as Bt } from "@ant-design/icons-vue";
39
41
  //#region src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue?vue&type=script&setup=true&lang.ts
40
- var Kt = {
42
+ var Vt = {
41
43
  key: 2,
42
44
  class: "gd-contract-template-designer__validation"
43
- }, qt = {
45
+ }, Ht = {
44
46
  key: 0,
45
47
  class: "gd-contract-template-designer__validation-list"
46
- }, Jt = ["onClick"], Yt = {
48
+ }, Ut = ["onClick"], Wt = {
47
49
  class: "gd-contract-template-designer__sr-status",
48
50
  "aria-live": "polite"
49
- }, Xt = .5, Zt = 1.5, Qt = .1, $t = 120, en = 128, tn = 108, nn = 48, rn = 24, an = 10, on = 48, sn = 8, cn = /* @__PURE__ */ h({
51
+ }, Gt = .5, Kt = 1.5, qt = .1, Jt = 120, Yt = 128, Xt = 108, Zt = 48, Qt = 24, $t = 10, en = 48, tn = 8, nn = /* @__PURE__ */ g({
50
52
  name: "ProContractTemplateDesigner",
51
53
  __name: "ProContractTemplateDesigner",
52
54
  props: {
@@ -62,12 +64,13 @@ var Kt = {
62
64
  default: !1
63
65
  },
64
66
  height: { default: 760 },
65
- pageSize: { default: () => he },
67
+ pageSize: { default: () => ce },
66
68
  pageSizeOptions: {},
67
69
  maxPages: { default: 20 },
68
70
  imageCompression: { type: [Object, Boolean] },
69
71
  imageUpload: {},
70
72
  variableTypes: { default: () => s },
73
+ signingLayoutPresets: {},
71
74
  showAdvancedChoiceControls: {
72
75
  type: Boolean,
73
76
  default: !1
@@ -80,7 +83,7 @@ var Kt = {
80
83
  type: Boolean,
81
84
  default: !1
82
85
  },
83
- defaultVariableStyle: { default: () => me },
86
+ defaultVariableStyle: { default: () => se },
84
87
  fontFamilies: { default: void 0 },
85
88
  fontFamilyMode: { default: "append" },
86
89
  contractFontBaseUrl: { default: void 0 },
@@ -96,16 +99,12 @@ var Kt = {
96
99
  type: Boolean,
97
100
  default: !0
98
101
  },
99
- showSigningPlacementTools: {
100
- type: Boolean,
101
- default: !1
102
- },
103
102
  enableDraftCache: {
104
103
  type: Boolean,
105
104
  default: !0
106
105
  },
107
- draftCacheKey: { default: Qe },
108
- draftCacheInterval: { default: Ze },
106
+ draftCacheKey: { default: Ze },
107
+ draftCacheInterval: { default: Xe },
109
108
  draftCacheMaxBytes: { default: l },
110
109
  showDraftCacheStatus: {
111
110
  type: Boolean,
@@ -126,71 +125,58 @@ var Kt = {
126
125
  "validate",
127
126
  "draft-cache-change",
128
127
  "page-limit",
129
- "image-error",
130
- "signing-placement-add",
131
- "signing-placement-change",
132
- "signing-placement-remove",
133
- "signing-placement-select"
128
+ "image-error"
134
129
  ],
135
- setup(s, { expose: Ze, emit: Qe }) {
136
- let l = s, h = Qe, cn = f(() => ({ height: typeof l.height == "number" ? `${l.height}px` : l.height })), ln = v(), un = v(), dn = v(), fn = v(), pn = v(), mn = `gd-contract-template-page-decorations-studio-${Ft()}`, hn = `gd-contract-template-workspace-chrome-${Ft()}`, gn = v(), _n = v();
137
- function vn(e) {
138
- if (!e || !Array.isArray(e.pages) || !Array.isArray(e.signingPlacements)) return [];
139
- try {
140
- return Ne(e).filter((e) => e.type === "signing-placement");
141
- } catch {
142
- return [];
143
- }
144
- }
145
- function yn(e, t) {
146
- return Object.fromEntries(e.map((e, n) => [e.id, vn(t?.[n]?.template ?? e.template)]));
147
- }
148
- let bn = "", xn = "", Sn = v(!1), x = f(() => Sn.value || Array.isArray(l.files)), Cn = st(l.files, l.modelValue, l.pageSize), wn = rt(Cn, l.pageSizeOptions), Tn = x.value ? wn.files : Cn, En = dt(Tn, l.activeFileId), S = v(Tn), C = v(En), Dn = Tn.find((e) => e.id === En) ?? Tn[0], w = v(yn(Tn, Array.isArray(l.files) ? l.files : l.modelValue ? [{ template: l.modelValue }] : void 0)), T = v(w.value[En] ?? vn(Dn?.template)), On = ke(Dn?.template ?? l.modelValue, l.pageSize), kn = ye(On, l.pageSizeOptions), E = v(kn.value);
149
- if (x.value) {
150
- if (S.value = ut(S.value, C.value, kn.value), d(S.value) !== d(Cn)) {
151
- let e = u(S.value);
152
- bn = d(e), h("update:files", e), h("files-change", u(e));
130
+ setup(s, { expose: Xe, emit: Ze }) {
131
+ let l = s, g = Ze, nn = f(() => ({ height: typeof l.height == "number" ? `${l.height}px` : l.height })), rn = y(), an = y(), on = y(), sn = y(), cn = y(), ln = `gd-contract-template-page-decorations-studio-${At()}`, un = `gd-contract-template-workspace-chrome-${At()}`, dn = y(), fn = y(), pn = y(), mn = "", hn = "", gn = y(!1), S = f(() => gn.value || Array.isArray(l.files)), _n = ot(l.files, l.modelValue, l.pageSize), vn = nt(_n, l.pageSizeOptions), yn = S.value ? vn.files : _n, bn = ut(yn, l.activeFileId), C = y(yn), w = y(bn), xn = xe((yn.find((e) => e.id === bn) ?? yn[0])?.template ?? l.modelValue, l.pageSize), T = y(de(xn, l.pageSizeOptions));
132
+ if (S.value) {
133
+ if (C.value = lt(C.value, w.value, T.value), d(C.value) !== d(_n)) {
134
+ let e = u(C.value);
135
+ mn = d(e), g("update:files", e), g("files-change", u(e));
153
136
  }
154
- } else l.modelValue && d(kn.value) !== d(On) && (xn = d(kn.value), h("update:modelValue", c(kn.value)), h("change", c(kn.value)), Zi(kn.resizedSigningPlacementIds, kn.value));
155
- let D = v(""), O = v(""), k = v(E.value.pages[0]?.id ?? ""), A = v(!1), j = v([]), M = /* @__PURE__ */ new Map(), An = v(!1), jn = v(""), Mn = v(!1), Nn = v(), Pn = v(), Fn = v(""), In = v(!1), Ln = v(""), Rn = v(!1), zn = v({
137
+ } else l.modelValue && d(T.value) !== d(xn) && (hn = d(T.value), g("update:modelValue", c(T.value)), g("change", c(T.value)));
138
+ let E = y(""), D = y(T.value.pages[0]?.id ?? ""), O = y(!1), k = y([]), A = /* @__PURE__ */ new Map(), Sn = y(!1), Cn = y(""), wn = y(!1), Tn = y(), En = y(), Dn = y(""), On = y(!1), kn = y(""), An = y(!1), jn = y({
156
139
  values: {},
157
140
  variables: []
158
- }), N = v(1), P = v(!1), Bn = v(!1), Vn = v(!1), Hn = v(!1), Un = v(!1), Wn = v(), F = v(!1), Gn = v("header"), Kn = v(!1), qn = v({}), Jn = v(""), I = v(!1), L = v(!1), Yn = v(!1), Xn = v(!1), Zn = v(""), Qn = v(), $n = v(), er = v(""), tr = v(!1), R = v(), nr = v(), z = v(), rr = v(), ir = v(!1), ar, or = v(!1), sr, cr = v(!1), lr = v(""), B = v(), ur = v(), V = v(), dr = v(), fr = v(), pr = v(), H = v(""), U = v($e("idle", "暂无本地草稿")), mr = v({
141
+ }), j = y(1), M = y(!1), Mn = y(!1), Nn = y(!1), N = y(!1), Pn = y(!1), Fn = y(), P = y(!1), In = y("header"), Ln = y(!1), Rn = y({}), zn = y(""), F = y(!1), I = y(!1), Bn = y(!1), Vn = y(!1), Hn = y(!1), Un = y(!1), Wn = y(!1), Gn = y(""), Kn = y(), qn = y(), Jn = y(""), Yn = y(!1), L = y(), Xn = y(), R = y(), Zn = y(), Qn = y(!1), $n, er = y(!1), tr, nr = y(!1), rr = y(""), z = y(), ir = y(), B = y(), ar = y(), or = y(), sr = y(), V = y(""), H = y(Qe("idle", "暂无本地草稿")), cr = y({
159
142
  rows: 3,
160
143
  cols: 3,
161
144
  withHeaderRow: !0
162
- }), hr = /* @__PURE__ */ new WeakSet(), gr = [".gd-contract-template-designer__page-decorations-select-popup", ".gd-contract-template-designer__page-decorations-dropdown-popup"].join(","), _r, vr, yr = !1, br = !1, xr, W = f(() => l.readonly || l.disabled), Sr = f(() => !!(R.value || B.value || V.value || I.value || L.value || Kn.value || Yn.value || Xn.value)), Cr = f(() => !!l.enableDraftCache && !W.value), wr = f(() => S.value.find((e) => e.id === C.value) ?? S.value[0]), Tr = f(() => l.draftCacheKey), G = f(() => E.value.variables.find((e) => e.key === D.value)), K = f(() => E.value.signingPlacements ?? []), Er = f(() => Nn.value ? ge(Nn.value) : []), Dr = f(() => (Pn.value ?? []).map((e) => ({
145
+ }), lr = /* @__PURE__ */ new WeakSet(), ur = [".gd-contract-template-designer__page-decorations-select-popup", ".gd-contract-template-designer__page-decorations-dropdown-popup"].join(","), dr, fr, pr = !1, mr = !1, hr, U = f(() => l.readonly || l.disabled), { panel: gr, query: _r, replacement: vr, matchCase: yr, matches: br, currentIndex: xr, currentMatch: Sr, feedback: Cr, highlightQuery: wr, open: Tr, close: Er, navigate: Dr, replaceCurrent: Or, replaceAll: kr, insertSnippet: Ar, handleKeydown: jr } = He({
146
+ pages: () => T.value.pages,
147
+ fileId: () => w.value,
148
+ readonly: () => U.value,
149
+ root: () => rn.value,
150
+ pageRefs: A,
151
+ activatePage: xo,
152
+ beforeOpen: () => {
153
+ $(), ls(), N.value = !1;
154
+ },
155
+ focusPanel: () => pn.value?.focusPanel(),
156
+ focusTrigger: (e) => pn.value?.focusTrigger(e),
157
+ command: Z
158
+ }), Mr = f(() => !!(L.value || gr.value || z.value || B.value || F.value || I.value || Ln.value || Bn.value || Vn.value || Hn.value || Un.value || Wn.value)), Nr = f(() => !!l.enableDraftCache && !U.value), Pr = f(() => C.value.find((e) => e.id === w.value) ?? C.value[0]), Fr = f(() => Tn.value ? le(Tn.value) : []), Ir = f(() => (En.value ?? []).map((e) => ({
163
159
  file: e,
164
- pages: ge(e.template)
165
- }))), Or = f(() => Dr.value.find((e) => e.file.id === Fn.value) ?? Dr.value[0]), kr = f(() => K.value.find((e) => e.id === O.value)), Ar = f(() => K.value.map((e) => {
166
- let t = E.value.pages.findIndex((t) => t.id === e.pageId);
167
- return {
168
- placement: e,
169
- label: ae[e.type],
170
- detail: `${ae[e.type]} · 第 ${Math.max(0, t) + 1} 页`
171
- };
172
- })), jr = f(() => {
173
- let e = kr.value?.pageId;
174
- return Yi(E.value.pages.find((t) => t.id === e));
175
- }), q = f(() => E.value.pages.find((e) => e.id === k.value) ?? E.value.pages[0]), Mr = f(() => Ae(q.value?.pageSize, E.value.pageSize)), Nr = f(() => A.value && j.value.length === 0), Pr = f(() => A.value ? Nr.value ? "校验通过,正文变量与变量配置一致" : `发现 ${j.value.length} 个校验问题` : ""), Fr = f(() => {
176
- let e = q.value?.title || "合同正文";
177
- return `${x.value && wr.value ? `${wr.value.name} · ` : ""}${e} · ${Mr.value.label} · 共 ${E.value.pages.length} 页`;
178
- }), Ir = f(() => ({
160
+ pages: le(e.template)
161
+ }))), Lr = f(() => Ir.value.find((e) => e.file.id === Dn.value) ?? Ir.value[0]), W = f(() => T.value.pages.find((e) => e.id === D.value) ?? T.value.pages[0]), Rr = f(() => Se(W.value?.pageSize, T.value.pageSize)), zr = f(() => O.value && k.value.length === 0), Br = f(() => O.value ? zr.value ? "校验通过,正文变量与变量配置一致" : `发现 ${k.value.length} 个校验问题` : ""), Vr = f(() => {
162
+ let e = W.value?.title || "合同正文";
163
+ return `${S.value && Pr.value ? `${Pr.value.name} · ` : ""}${e} · ${Rr.value.label} · 共 ${T.value.pages.length} 页`;
164
+ }), Hr = f(() => ({
179
165
  none: "无装饰",
180
166
  "page-number": "标准页码",
181
167
  "internal-review": "内部审阅",
182
168
  draft: "草稿",
183
169
  custom: "自定义"
184
- })[ee(E.value.pageDecorations)]), Lr = f(() => {
185
- let e = o(E.value.pageDecorations);
170
+ })[ee(T.value.pageDecorations)]), Ur = f(() => {
171
+ let e = o(T.value.pageDecorations);
186
172
  return {
187
173
  header: e.header.enabled,
188
174
  footer: e.footer.enabled,
189
175
  watermark: e.watermark.enabled
190
176
  };
191
- }), Rr = f(() => Object.values(Lr.value).filter(Boolean).length), zr = f(() => {
192
- switch (U.value.type) {
193
- case "saved": return `草稿已缓存 ${et(U.value.savedAt)}`;
177
+ }), Wr = f(() => Object.values(Ur.value).filter(Boolean).length), Gr = f(() => {
178
+ switch (H.value.type) {
179
+ case "saved": return `草稿已缓存 ${$e(H.value.savedAt)}`;
194
180
  case "restored": return "已恢复本地草稿";
195
181
  case "too-large": return "草稿过大,未缓存";
196
182
  case "unavailable":
@@ -199,23 +185,23 @@ var Kt = {
199
185
  case "cleared": return "草稿缓存已清理";
200
186
  default: return "";
201
187
  }
202
- }), Br = f(() => ({
203
- "is-success": U.value.type === "saved" || U.value.type === "restored",
204
- "is-warning": U.value.type === "too-large",
205
- "is-error": U.value.type === "unavailable" || U.value.type === "read-failed" || U.value.type === "write-failed"
206
- })), Vr = f(() => `${Math.round(N.value * 100)}%`), Hr = f(() => i(l.fontFamilies, l.fontFamilyMode)), Ur = f(() => Hr.value.map((e) => ({
188
+ }), Kr = f(() => ({
189
+ "is-success": H.value.type === "saved" || H.value.type === "restored",
190
+ "is-warning": H.value.type === "too-large",
191
+ "is-error": H.value.type === "unavailable" || H.value.type === "read-failed" || H.value.type === "write-failed"
192
+ })), qr = f(() => `${Math.round(j.value * 100)}%`), Jr = f(() => i(l.fontFamilies, l.fontFamilyMode)), Yr = f(() => Jr.value.map((e) => ({
207
193
  label: e.label,
208
194
  value: e.value
209
- }))), Wr = r, Gr = [...e.map((e) => ({
195
+ }))), Xr = r, Zr = [...e.map((e) => ({
210
196
  label: e.label,
211
197
  value: e.format
212
- }))], Kr = [{
198
+ }))], Qr = [{
213
199
  label: "实线",
214
200
  value: "solid"
215
201
  }, {
216
202
  label: "虚线",
217
203
  value: "dashed"
218
- }], qr = [
204
+ }], $r = [
219
205
  {
220
206
  label: "完整显示",
221
207
  value: "contain"
@@ -228,85 +214,67 @@ var Kt = {
228
214
  label: "拉伸填充",
229
215
  value: "fill"
230
216
  }
231
- ], Jr = f(() => Oe(l.pageSizeOptions)), Yr = f(() => Jr.value.map((e) => ({
217
+ ], ei = f(() => be(l.pageSizeOptions)), ti = f(() => ei.value.map((e) => ({
232
218
  label: `${e.label} · ${e.width} × ${e.height}`,
233
- value: Ee(e)
234
- }))), Xr = f(() => Ee(Mr.value)), Zr = f(() => le({ showSigningPlacementTools: l.showSigningPlacementTools })), Qr = f(() => {
219
+ value: ve(e)
220
+ }))), ni = f(() => ve(Rr.value)), ri = f(() => l.draftCacheKey), G = f(() => T.value.variables.find((e) => e.key === E.value)), ii = f(() => {
235
221
  let e = [
236
222
  ...l.variableTypes,
237
- ...l.showAdvancedChoiceControls ? de : [],
238
- ...l.showBuiltinSelectorControls ? fe : [],
239
- ...l.showCustomControls ? pe : []
223
+ ...l.showAdvancedChoiceControls ? ie : [],
224
+ ...l.showBuiltinSelectorControls ? ae : [],
225
+ ...l.showCustomControls ? oe : []
240
226
  ].filter((e) => re(e?.type));
241
227
  return Array.from(new Map(e.map((e) => [e.type, e])).values());
242
- }), $r = f(() => Qr.value.map((e) => ({
228
+ }), ai = f(() => {
229
+ let e = [...Me.map((e) => je[e]), ...(l.signingLayoutPresets ?? []).filter((e) => !!e?.key)];
230
+ return Array.from(new Map(e.map((e) => [e.key, e])).values());
231
+ }), oi = f(() => ii.value.map((e) => ({
243
232
  ...e,
244
- icon: ht(e.type),
233
+ icon: ze(e.type),
245
234
  group: e.type === "select" || e.type === "radio" ? "advanced-choice" : e.type.endsWith("-selector") ? "builtin-selector" : e.type === "custom" ? "custom" : "basic"
246
- }))), ei = f(() => De(l.maxPages)), ti = f(() => E.value.pages.length >= ei.value), ni = f(() => {
247
- let e = ve(E.value);
248
- return Array.from(a(E.value.pageDecorations)).filter((t) => !e.has(t));
249
- }), { scheduleAutoPaginate: J } = tt({
250
- templateValue: E,
251
- readonlyState: W,
252
- isAutoPaginating: An,
253
- pendingPaginationPageId: jn,
254
- activePageId: k,
255
- normalizedMaxPages: ei,
256
- pageRefs: M,
257
- syncPageEditors: Pi,
258
- commitBodyChange: qi,
259
- getPageSize: Yi,
260
- notifyPageLimit: ra
261
- }), { insertSigningPlacement: ri, handleSigningPlacementDrop: ii, insertSigningPlacementTool: ai, handleSigningPlacementDragStart: oi, updateSigningPlacement: si, patchSelectedSigningPlacement: ci, duplicateSigningPlacement: li, removeSigningPlacement: ui } = mt({
262
- templateValue: E,
263
- signingPlacements: K,
264
- selectedSigningPlacement: kr,
265
- selectedSigningPlacementId: O,
266
- selectedPage: q,
267
- activePageId: k,
268
- readonly: () => l.readonly,
269
- disabled: () => l.disabled,
270
- showSigningPlacementTools: () => !!l.showSigningPlacementTools,
271
- getPageSize: Yi,
272
- getVisiblePosition: (e, t) => M.get(e)?.getVisibleSigningPlacementPosition(t),
273
- commitSigningPlacements: ta,
274
- selectSigningPlacement: Q,
275
- emitAdd: (e) => h("signing-placement-add", e),
276
- emitChange: (e) => h("signing-placement-change", e),
277
- emitRemove: (e) => h("signing-placement-remove", e)
278
- }), { saveDraftCache: di, loadDraftCache: fi, clearDraftCache: pi, restoreDraftCacheIfNeeded: mi, stopDraftCacheTimer: hi, restartDraftCacheTimer: gi, resetDraftFingerprint: _i } = ft({
279
- draftCacheWritable: Cr,
280
- multipleFilesMode: x,
281
- filesValue: S,
282
- activeFileIdValue: C,
283
- templateValue: E,
284
- draftCacheKey: Tr,
235
+ }))), si = f(() => ye(l.maxPages)), ci = f(() => T.value.pages.length >= si.value), li = f(() => {
236
+ let e = ue(T.value);
237
+ return Array.from(a(T.value.pageDecorations)).filter((t) => !e.has(t));
238
+ }), { scheduleAutoPaginate: K } = et({
239
+ templateValue: T,
240
+ readonlyState: U,
241
+ isAutoPaginating: Sn,
242
+ pendingPaginationPageId: Cn,
243
+ activePageId: D,
244
+ normalizedMaxPages: si,
245
+ pageRefs: A,
246
+ syncPageEditors: Mi,
247
+ commitBodyChange: Ji,
248
+ getPageSize: Xi,
249
+ notifyPageLimit: Qi
250
+ }), { saveDraftCache: ui, loadDraftCache: di, clearDraftCache: fi, restoreDraftCacheIfNeeded: pi, stopDraftCacheTimer: mi, restartDraftCacheTimer: hi, resetDraftFingerprint: gi } = dt({
251
+ draftCacheWritable: Nr,
252
+ multipleFilesMode: S,
253
+ filesValue: C,
254
+ activeFileIdValue: w,
255
+ templateValue: T,
256
+ draftCacheKey: ri,
285
257
  draftCacheInterval: () => l.draftCacheInterval,
286
258
  draftCacheMaxBytes: () => l.draftCacheMaxBytes,
287
259
  pageSize: () => l.pageSize,
288
260
  pageSizeOptions: () => l.pageSizeOptions,
289
- syncActiveFileSnapshot: Y,
290
- syncPageEditors: Pi,
291
- setActiveFileId: Vi,
292
- emitFilesChange: Bi,
261
+ syncActiveFileSnapshot: J,
262
+ syncPageEditors: Mi,
263
+ setActiveFileId: Ri,
264
+ emitFilesChange: Y,
293
265
  commit: X,
294
- setSigningPlacementInputErrorsByFile: (e) => {
295
- w.value = e;
296
- },
297
- buildSigningPlacementInputErrorsByFile: yn,
298
- updateDraftCacheStatus: Hi,
299
- scheduleAutoPaginate: J,
300
- activePageId: k,
301
- selectedVariableKey: D
302
- }), vi = f(() => {
303
- let e = lr.value.trim().toLowerCase(), t = E.value.variables;
266
+ updateDraftCacheStatus: zi,
267
+ scheduleAutoPaginate: K,
268
+ activePageId: D,
269
+ selectedVariableKey: E
270
+ }), _i = f(() => {
271
+ let e = rr.value.trim().toLowerCase(), t = T.value.variables;
304
272
  return e ? t.filter((t) => t.label.toLowerCase().includes(e) || t.key.toLowerCase().includes(e)) : t;
305
- }), yi = f(() => Math.max(nn, Mr.value.width - en)), bi = f(() => Math.max(rn, Mr.value.height - tn)), xi = f(() => qn.value[k.value] ?? ki()), Si = f(() => xi.value.hasMixedBlockFormats ? void 0 : xi.value.currentHeadingLevel ?? "paragraph"), Ci = f(() => xi.value.fontFamily || t), wi = f(() => xi.value.fontSize ?? me.fontSize ?? 14), Ti = f(() => xi.value.textColor || me.color || "#1f2937"), Ei = f(() => G.value?.style?.fontFamily || me.fontFamily || t), Di = f(() => {
273
+ }), vi = f(() => Math.max(Zt, Rr.value.width - Yt)), yi = f(() => Math.max(Qt, Rr.value.height - Xt)), q = f(() => Rn.value[D.value] ?? Di()), bi = f(() => q.value.hasMixedBlockFormats ? void 0 : q.value.currentHeadingLevel ?? "paragraph"), xi = f(() => q.value.fontFamily || t), Si = f(() => q.value.fontSize ?? se.fontSize ?? 14), Ci = f(() => q.value.textColor || se.color || "#1f2937"), wi = f(() => G.value?.style?.fontFamily || se.fontFamily || t), Ti = f(() => {
306
274
  let e = n.map((e) => ({
307
275
  label: `${e}px`,
308
276
  value: e
309
- })), t = Ni(wi.value), r = Ni(Jn.value), i = /* @__PURE__ */ new Map();
277
+ })), t = ji(Si.value), r = ji(zn.value), i = /* @__PURE__ */ new Map();
310
278
  return r && !n.includes(r) && i.set(r, {
311
279
  label: `使用 ${r}px`,
312
280
  value: r
@@ -315,86 +283,78 @@ var Kt = {
315
283
  value: t
316
284
  }), [...Array.from(i.values()), ...e];
317
285
  });
318
- b(() => l.modelValue, (e) => {
319
- if (!e || x.value) return;
320
- let t = ke(e, l.pageSize), n = ye(t, l.pageSizeOptions), r = n.value, i = d(r) !== d(E.value), a = d(r), o = a === xn;
321
- o && (xn = ""), (i || !o) && (T.value = vn(e), w.value = {
322
- ...w.value,
323
- [C.value]: T.value
324
- }, E.value = r, S.value = ut(S.value, C.value, r), k.value = r.pages[0]?.id ?? "", D.value = "", O.value = "", J(k.value)), d(r) !== d(t) && (xn = a, h("update:modelValue", c(r)), h("change", c(r)), Zi(n.resizedSigningPlacementIds, r));
325
- }, { deep: !0 }), b(() => l.files, (e) => {
286
+ x(() => l.modelValue, (e) => {
287
+ if (!e || S.value) return;
288
+ let t = xe(e, l.pageSize), n = de(t, l.pageSizeOptions), r = d(n) !== d(T.value), i = d(n), a = i === hn;
289
+ a && (hn = ""), (r || !a) && (T.value = n, C.value = lt(C.value, w.value, n), D.value = n.pages[0]?.id ?? "", E.value = "", K(D.value)), d(n) !== d(t) && (hn = i, g("update:modelValue", c(n)), g("change", c(n)));
290
+ }, { deep: !0 }), x(() => l.files, (e) => {
326
291
  if (!Array.isArray(e)) return;
327
- let t = st(e, void 0, l.pageSize), n = rt(t, l.pageSizeOptions).files, r = d(n), i = d(S.value), a = r === bn;
328
- a || (w.value = yn(n, e)), a && (bn = "");
329
- let o = dt(n, l.activeFileId || C.value);
330
- if (r === i ? o !== C.value && Vi(o, {
292
+ let t = ot(e, void 0, l.pageSize), n = nt(t, l.pageSizeOptions).files, r = d(n), i = d(C.value);
293
+ r === mn && (mn = "");
294
+ let a = ut(n, l.activeFileId || w.value);
295
+ if (r === i ? a !== w.value && Ri(a, {
331
296
  syncCurrent: !1,
332
297
  shouldEmit: !1
333
- }) : (S.value = n, Vi(o, {
298
+ }) : (C.value = n, Ri(a, {
334
299
  syncCurrent: !1,
335
300
  shouldEmit: !1,
336
- forceRefresh: !0,
337
- persistCurrentErrors: !1
301
+ forceRefresh: !0
338
302
  })), r !== d(t)) {
339
303
  let e = u(n);
340
- bn = d(e), h("update:files", e), h("files-change", u(e));
304
+ mn = d(e), g("update:files", e), g("files-change", u(e));
341
305
  }
342
- }, { deep: !0 }), b(() => l.activeFileId, (e) => {
343
- !x.value || !e || e === C.value || Vi(e, {
306
+ }, { deep: !0 }), x(() => l.activeFileId, (e) => {
307
+ !S.value || !e || e === w.value || Ri(e, {
344
308
  syncCurrent: !0,
345
309
  shouldEmit: !1
346
310
  });
347
311
  });
348
- function Oi(e, t) {
349
- let n = d(S.value);
350
- Y(!1);
351
- let { files: r, resizedSigningPlacementIds: i } = rt(st(S.value, void 0, e), t), a = d(r) !== n, o = r.find((e) => e.id === C.value);
352
- o && d(o.template) !== d(E.value) && (E.value = c(o.template), T.value = [...w.value[C.value] ?? []]), a && (A.value = !1, j.value = [], Bi(r, ""));
353
- let ee = i.get(C.value);
354
- return ee?.length && o && Zi(ee, o.template), a;
355
- }
356
- b([() => l.pageSize, () => l.pageSizeOptions], ([e, t]) => {
357
- if (x.value) {
358
- Oi(e, t), J(k.value);
312
+ function Ei(e, t) {
313
+ let n = d(C.value);
314
+ J(!1);
315
+ let { files: r } = nt(ot(C.value, void 0, e), t), i = d(r) !== n, a = r.find((e) => e.id === w.value);
316
+ return a && d(a.template) !== d(T.value) && (T.value = c(a.template)), i && (O.value = !1, k.value = [], Y(r, "")), i;
317
+ }
318
+ x([() => l.pageSize, () => l.pageSizeOptions], ([e, t]) => {
319
+ if (S.value) {
320
+ Ei(e, t), K(D.value);
359
321
  return;
360
322
  }
361
- let n = ye(ke(E.value, e), t);
362
- d(n.value) !== d(E.value) && X(n.value), J(k.value);
363
- }, { deep: !0 }), b(ei, () => {
364
- J(E.value.pages[0]?.id);
365
- }), b(W, (e) => {
366
- e && ($(), I.value = !1, L.value = !1);
367
- }), b(k, () => {
368
- z.value = void 0;
369
- }), b([
370
- Sr,
371
- F,
372
- Mn
323
+ let n = de(xe(T.value, e), t);
324
+ d(n) !== d(T.value) && X(n), K(D.value);
325
+ }, { deep: !0 }), x(si, () => {
326
+ K(T.value.pages[0]?.id);
327
+ }), x(U, (e) => {
328
+ e && ($(), F.value = !1, I.value = !1);
329
+ }), x(D, () => {
330
+ R.value = void 0;
331
+ }), x([
332
+ Mr,
333
+ P,
334
+ wn
373
335
  ], () => {
374
- xs();
375
- }), b(K, (e) => {
376
- O.value && !e.some((e) => e.id === O.value) && (O.value = "", h("signing-placement-select", void 0));
377
- }, { deep: !0 }), b(() => [
336
+ fs();
337
+ }), x(() => [
378
338
  l.enableDraftCache,
379
- Tr.value,
339
+ ri.value,
380
340
  l.draftCacheInterval,
381
- W.value
341
+ U.value
382
342
  ], () => {
383
- _i(), gi();
384
- }), b(P, (e) => {
343
+ gi(), hi();
344
+ }), x(M, (e) => {
385
345
  if (!(typeof document > "u")) {
386
346
  if (e) {
387
- _r = document.body.style.overflow, document.body.style.overflow = "hidden";
347
+ dr = document.body.style.overflow, document.body.style.overflow = "hidden";
388
348
  return;
389
349
  }
390
- document.body.style.overflow = _r ?? "", _r = void 0;
350
+ document.body.style.overflow = dr ?? "", dr = void 0;
391
351
  }
392
- }), Mt(() => {
393
- mi(), gi(), J(k.value), window.addEventListener("pointerdown", ks, !0), window.addEventListener("pointerup", Es), window.addEventListener("keydown", Ms, !0), window.addEventListener("keydown", Ns), window.addEventListener("resize", Ds), window.addEventListener("scroll", As, !0);
394
- }), jt(() => {
395
- Ii(), yr = !0, P.value && typeof document < "u" && (document.body.style.overflow = _r ?? ""), window.removeEventListener("pointerdown", ks, !0), window.removeEventListener("pointerup", Es), window.removeEventListener("keydown", Ms, !0), window.removeEventListener("keydown", Ns), window.removeEventListener("resize", Ds), window.removeEventListener("scroll", As, !0), sr !== void 0 && cancelAnimationFrame(sr), hi();
352
+ }), Dt(() => {
353
+ pi(), hi(), K(D.value), window.addEventListener("pointerdown", bs, !0), window.addEventListener("pointerup", _s), window.addEventListener("keydown", Cs, !0), window.addEventListener("keydown", ws), window.addEventListener("resize", vs), window.addEventListener("scroll", xs, !0);
354
+ }), Et(() => {
355
+ Pi(), pr = !0, M.value && typeof document < "u" && (document.body.style.overflow = dr ?? ""), window.removeEventListener("pointerdown", bs, !0), window.removeEventListener("pointerup", _s), window.removeEventListener("keydown", Cs, !0), window.removeEventListener("keydown", ws), window.removeEventListener("resize", vs), window.removeEventListener("scroll", xs, !0), tr !== void 0 && cancelAnimationFrame(tr), mi();
396
356
  });
397
- function ki() {
357
+ function Di() {
398
358
  return {
399
359
  isFocused: !1,
400
360
  canUndo: !1,
@@ -407,33 +367,33 @@ var Kt = {
407
367
  isTableActive: !1,
408
368
  textAlign: "left",
409
369
  fontFamily: t,
410
- fontSize: me.fontSize ?? 14,
411
- textColor: me.color ?? "#1f2937",
370
+ fontSize: se.fontSize ?? 14,
371
+ textColor: se.color ?? "#1f2937",
412
372
  selectionText: "",
413
373
  hasMixedBlockFormats: !1
414
374
  };
415
375
  }
416
- function Ai(e) {
376
+ function Oi(e) {
417
377
  return e === "left" || e === "center" || e === "right";
418
378
  }
419
- function ji(e) {
379
+ function ki(e) {
420
380
  return typeof e == "number" && Number.isInteger(e) && e >= 1 && e <= 6;
421
381
  }
422
- function Mi(e, t = wi.value) {
382
+ function Ai(e, t = Si.value) {
423
383
  let n = Number(e);
424
- return Number.isFinite(n) ? Math.min(on, Math.max(an, Math.round(n))) : t;
384
+ return Number.isFinite(n) ? Math.min(en, Math.max($t, Math.round(n))) : t;
425
385
  }
426
- function Ni(e) {
386
+ function ji(e) {
427
387
  let t = String(e || "").trim().match(/(\d+(\.\d+)?)/);
428
388
  if (!t) return;
429
389
  let n = Number(t[1]);
430
- if (Number.isFinite(n)) return Math.min(on, Math.max(an, Math.round(n)));
390
+ if (Number.isFinite(n)) return Math.min(en, Math.max($t, Math.round(n)));
431
391
  }
432
- function Pi(e = E.value) {
392
+ function Mi(e = T.value) {
433
393
  return {
434
394
  ...e,
435
395
  pages: e.pages.map((e) => {
436
- let t = M.get(e.id);
396
+ let t = A.get(e.id);
437
397
  return {
438
398
  ...e,
439
399
  contentHtml: t?.getHTML() ?? e.contentHtml,
@@ -442,345 +402,310 @@ var Kt = {
442
402
  })
443
403
  };
444
404
  }
445
- function Fi() {
446
- br = !1, xr &&= (clearTimeout(xr), void 0);
405
+ function Ni() {
406
+ mr = !1, hr &&= (clearTimeout(hr), void 0);
447
407
  }
448
- function Ii() {
449
- let e = br;
450
- Fi(), e && zi();
408
+ function Pi() {
409
+ let e = mr;
410
+ Ni(), e && Li();
451
411
  }
452
- function Li() {
453
- br = !0, xr && clearTimeout(xr), xr = setTimeout(() => {
454
- xr = void 0, !(!br || yr) && (br = !1, zi());
455
- }, $t);
412
+ function Fi() {
413
+ mr = !0, hr && clearTimeout(hr), hr = setTimeout(() => {
414
+ hr = void 0, !(!mr || pr) && (mr = !1, Li());
415
+ }, Jt);
456
416
  }
457
- function Ri(e) {
458
- let t = E.value.pages, n = t.findIndex((t) => t.id === e.id);
417
+ function Ii(e) {
418
+ let t = T.value.pages, n = t.findIndex((t) => t.id === e.id);
459
419
  if (n < 0) return;
460
420
  let r = t[n];
461
421
  if (r.contentHtml === e.contentHtml && r.contentJson === e.contentJson && r.title === e.title && r.pageSize === e.pageSize) return;
462
422
  let i = t.slice();
463
- i[n] = e, E.value = {
464
- ...E.value,
423
+ i[n] = e, T.value = {
424
+ ...T.value,
465
425
  pages: i
466
426
  };
467
427
  }
468
- function zi() {
469
- let e = je(Pi());
470
- D.value && !e.variables.some((e) => e.key === D.value) && (D.value = ""), X(e);
471
- }
472
- function Y(e = !1) {
473
- Ii();
474
- let t = c(Pi());
475
- if (!x.value) return t;
476
- let n = S.value.find((e) => e.id === C.value)?.template, r = d(n) !== d(t), i = ut(S.value, C.value, t);
477
- return S.value = i, r && e && Bi(i), t;
478
- }
479
- function Bi(e, t = C.value) {
480
- if (!x.value) return;
428
+ function Li() {
429
+ let e = Ce(Mi());
430
+ E.value && !e.variables.some((e) => e.key === E.value) && (E.value = ""), X(e);
431
+ }
432
+ function J(e = !1) {
433
+ Pi();
434
+ let t = c(Mi());
435
+ if (!S.value) return t;
436
+ let n = C.value.find((e) => e.id === w.value)?.template, r = d(n) !== d(t), i = lt(C.value, w.value, t);
437
+ return C.value = i, r && e && Y(i), t;
438
+ }
439
+ function Y(e, t = w.value) {
440
+ if (!S.value) return;
481
441
  let n = u(e);
482
- S.value = n, bn = d(n), h("update:files", u(n)), h("files-change", u(n));
442
+ C.value = n, mn = d(n), g("update:files", u(n)), g("files-change", u(n));
483
443
  let r = n.find((e) => e.id === t);
484
- r && h("file-change", u([r])[0]);
485
- }
486
- function Vi(e, t = {}) {
487
- let { syncCurrent: n, shouldEmit: r, forceRefresh: i, persistCurrentErrors: a } = nt(t), o = dt(S.value, e), ee = o !== C.value;
488
- if (a && x.value && C.value && (w.value = {
489
- ...w.value,
490
- [C.value]: [...T.value]
491
- }), n ? Y(!0) : Fi(), !ee && !i) return;
492
- let te = S.value.find((e) => e.id === o);
493
- te && (C.value = o, E.value = c(te.template), T.value = [...w.value[o] ?? []], D.value = "", O.value = "", k.value = E.value.pages[0]?.id ?? "", qn.value = {}, M.clear(), jn.value = "", A.value = !1, j.value = [], Mn.value = !1, Nn.value = void 0, Pn.value = void 0, _i(), r && ee && h("update:activeFileId", o), n && ee && Cr.value && di(), g(() => {
494
- J(k.value);
444
+ r && g("file-change", u([r])[0]);
445
+ }
446
+ function Ri(e, t = {}) {
447
+ let { syncCurrent: n, shouldEmit: r, forceRefresh: i } = tt(t), a = ut(C.value, e), o = a !== w.value;
448
+ if (n ? J(!0) : Ni(), !o && !i) return;
449
+ let ee = C.value.find((e) => e.id === a);
450
+ ee && (w.value = a, T.value = c(ee.template), E.value = "", D.value = T.value.pages[0]?.id ?? "", Rn.value = {}, A.clear(), Cn.value = "", O.value = !1, k.value = [], wn.value = !1, Tn.value = void 0, En.value = void 0, gi(), r && o && g("update:activeFileId", a), n && o && Nr.value && ui(), _(() => {
451
+ K(D.value);
495
452
  }));
496
453
  }
497
454
  function X(e) {
498
- Fi();
499
- let t = ye(ke(e, l.pageSize), l.pageSizeOptions), n = t.value;
500
- return E.value = n, A.value = !1, j.value = [], x.value ? Bi(ut(S.value, C.value, n)) : (S.value = ut(S.value, C.value, n), xn = d(n), h("update:modelValue", c(n)), h("change", c(n))), Zi(t.resizedSigningPlacementIds, n), n;
455
+ Ni();
456
+ let t = de(xe(e, l.pageSize), l.pageSizeOptions);
457
+ return T.value = t, O.value = !1, k.value = [], S.value ? Y(lt(C.value, w.value, t)) : (C.value = lt(C.value, w.value, t), hn = d(t), g("update:modelValue", c(t)), g("change", c(t))), t;
458
+ }
459
+ function zi(e, t = e.type !== "unchanged") {
460
+ H.value = e, t && g("draft-cache-change", { ...e });
501
461
  }
502
- function Hi(e, t = e.type !== "unchanged") {
503
- U.value = e, t && h("draft-cache-change", { ...e });
462
+ function Bi() {
463
+ return { ...H.value };
504
464
  }
505
- function Ui() {
506
- return { ...U.value };
465
+ function Vi(e, t) {
466
+ t ? A.set(e, t) : A.delete(e);
507
467
  }
508
- function Wi(e, t) {
509
- t ? M.set(e, t) : M.delete(e);
468
+ function Hi(e) {
469
+ $(), Hn.value = !1, Z({
470
+ type: "insert-signing-layout",
471
+ preset: Ne(e.key) ? e.key : void 0,
472
+ options: e.options
473
+ });
474
+ }
475
+ function Ui(e) {
476
+ $(), Z({
477
+ type: "insert-signing-layout",
478
+ options: e
479
+ });
510
480
  }
511
- function Z(e, t = q.value?.id ?? k.value) {
512
- W.value || M.get(t)?.runCommand(e);
481
+ function Wi() {
482
+ Hn.value = !1, Wn.value = !0;
513
483
  }
514
484
  function Gi(e) {
515
- Z(e), $();
485
+ $(), Un.value = !1, Z({
486
+ type: "insert-signing-mark",
487
+ mark: { markType: e }
488
+ });
489
+ }
490
+ function Z(e, t = W.value?.id ?? D.value) {
491
+ U.value || A.get(t)?.runCommand(e);
516
492
  }
517
493
  function Ki(e) {
518
- let t = R.value?.pageId;
519
- t && (M.get(t)?.focus(), H.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
494
+ Z(e), $();
520
495
  }
521
496
  function qi(e) {
522
- let t = X(je(e));
523
- return D.value && !t.variables.some((e) => e.key === D.value) && (D.value = ""), t;
497
+ let t = L.value?.pageId;
498
+ t && (A.get(t)?.focus(), V.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
524
499
  }
525
500
  function Ji(e) {
526
- Ri(e), Li(), J(e.id);
501
+ let t = X(Ce(e));
502
+ return E.value && !t.variables.some((e) => e.key === E.value) && (E.value = ""), t;
527
503
  }
528
504
  function Yi(e) {
529
- return Ae(e?.pageSize, E.value.pageSize);
505
+ Ii(e), Fi(), K(e.id);
530
506
  }
531
507
  function Xi(e) {
532
- return K.value.filter((t) => t.pageId === e);
508
+ return Se(e?.pageSize, T.value.pageSize);
533
509
  }
534
- function Zi(e, t = E.value) {
535
- let n = new Set(e);
536
- n.size && ($i(n), (t.signingPlacements ?? []).filter((e) => n.has(e.id)).forEach((e) => h("signing-placement-change", pt(e))));
537
- }
538
- function Q(e) {
539
- let t = e ? K.value.find((t) => t.id === e) : void 0;
540
- O.value = t?.id ?? "", t && (D.value = "", k.value = t.pageId), h("signing-placement-select", t ? pt(t) : void 0);
541
- }
542
- function Qi(e) {
543
- Q(e.id);
544
- }
545
- function $i(e) {
546
- let t = new Set(e);
547
- if (!t.size) return;
548
- let n = T.value.filter((e) => e.type !== "signing-placement" || !t.has(e.id));
549
- T.value = n, w.value = {
550
- ...w.value,
551
- [C.value]: n
552
- };
553
- }
554
- function ea(e) {
555
- let t = T.value.filter((t) => t.type !== "signing-placement" || t.pageId !== e);
556
- T.value = t, w.value = {
557
- ...w.value,
558
- [C.value]: t
559
- };
560
- }
561
- function ta(e, t = []) {
562
- return $i(t), X({
563
- ...E.value,
564
- signingPlacements: e
565
- });
566
- }
567
- function na(e) {
568
- if (W.value || !q.value) return;
569
- let t = Jr.value.find((t) => Ee(t) === e);
510
+ function Zi(e) {
511
+ if (U.value || !W.value) return;
512
+ let t = ei.value.find((t) => ve(t) === e);
570
513
  if (!t) return;
571
- let n = q.value.id, r = Yi(q.value), i = Ae(t, E.value.pageSize), a = K.value.map((e) => e.pageId === n ? ue(e, r, i) : e);
572
- $i(a.filter((e) => e.pageId === n).map((e) => e.id)), X({
573
- ...E.value,
574
- pages: E.value.pages.map((e) => e.id === n ? {
514
+ let n = W.value.id, r = Se(t, T.value.pageSize);
515
+ X({
516
+ ...T.value,
517
+ pages: T.value.pages.map((e) => e.id === n ? {
575
518
  ...e,
576
- pageSize: i
577
- } : e),
578
- signingPlacements: a
579
- }), a.filter((e) => e.pageId === n).forEach((e) => h("signing-placement-change", pt(e))), J(n);
519
+ pageSize: r
520
+ } : e)
521
+ }), K(n);
580
522
  }
581
- function ra(e) {
582
- let t = ei.value;
583
- H.value = `合同最多支持 ${t} 页`, h("page-limit", t, e);
523
+ function Qi(e) {
524
+ let t = si.value;
525
+ V.value = `合同最多支持 ${t} 页`, g("page-limit", t, e);
584
526
  }
585
- function ia() {
586
- if (W.value) return;
587
- if (ti.value) {
588
- ra("add");
527
+ function $i() {
528
+ if (U.value) return;
529
+ if (ci.value) {
530
+ Qi("add");
589
531
  return;
590
532
  }
591
- let e = Se(E.value.pages.length + 1, Mr.value);
533
+ let e = me(T.value.pages.length + 1, Rr.value);
592
534
  X({
593
- ...E.value,
594
- pages: [...E.value.pages, e]
595
- }), k.value = e.id;
596
- }
597
- function aa(e) {
598
- if (W.value) return;
599
- if (ti.value) {
600
- ra("duplicate");
535
+ ...T.value,
536
+ pages: [...T.value.pages, e]
537
+ }), D.value = e.id;
538
+ }
539
+ function ea(e) {
540
+ if (U.value) return;
541
+ if (ci.value) {
542
+ Qi("duplicate");
601
543
  return;
602
544
  }
603
- let t = E.value.pages.findIndex((t) => t.id === e.id);
545
+ let t = T.value.pages.findIndex((t) => t.id === e.id);
604
546
  if (t < 0) return;
605
547
  let n = c({
606
548
  pages: [e],
607
549
  variables: [],
608
- pageSize: E.value.pageSize,
609
- signingPlacements: []
610
- }).pages[0], r = be(t + 2, Yi(e), n.contentHtml, n.contentJson);
550
+ pageSize: T.value.pageSize
551
+ }).pages[0], r = fe(t + 2, Xi(e), n.contentHtml, n.contentJson);
611
552
  r.title = `${e.title || `第 ${t + 1} 页`}副本`;
612
- let i = [...E.value.pages];
613
- i.splice(t + 1, 0, r);
614
- let a = Xi(e.id).map((e) => ce(e.type, r.id, Yi(r), {
615
- ...pt(e),
616
- id: void 0,
617
- pageId: r.id
618
- }));
619
- X({
620
- ...E.value,
621
- pages: i,
622
- signingPlacements: [...K.value, ...a]
623
- }), k.value = r.id, a.forEach((e) => h("signing-placement-add", pt(e))), a[0] && Q(a[0].id);
553
+ let i = [...T.value.pages];
554
+ i.splice(t + 1, 0, r), X({
555
+ ...T.value,
556
+ pages: i
557
+ }), D.value = r.id;
624
558
  }
625
- function oa(e) {
626
- if (W.value || E.value.pages.length <= 1) return;
627
- let t = E.value.pages.findIndex((t) => t.id === e.id);
559
+ function ta(e) {
560
+ if (U.value || T.value.pages.length <= 1) return;
561
+ let t = T.value.pages.findIndex((t) => t.id === e.id);
628
562
  if (t < 0) return;
629
- let n = Xi(e.id);
630
- ea(e.id);
631
- let r = E.value.pages.filter((t) => t.id !== e.id), i = qi({
632
- ...E.value,
633
- pages: r,
634
- signingPlacements: K.value.filter((t) => t.pageId !== e.id)
563
+ let n = T.value.pages.filter((t) => t.id !== e.id), r = Ji({
564
+ ...T.value,
565
+ pages: n
635
566
  });
636
- k.value = i.pages[Math.min(t, i.pages.length - 1)]?.id ?? "", n.some((e) => e.id === O.value) && Q(), n.forEach((e) => h("signing-placement-remove", pt(e)));
567
+ D.value = r.pages[Math.min(t, r.pages.length - 1)]?.id ?? "";
637
568
  }
638
- function sa(e) {
639
- if (W.value || E.value.pages.length <= 1) return;
640
- let t = Xi(e.id).length;
641
- if (!t) {
642
- oa(e);
643
- return;
644
- }
645
- Bt.confirm({
569
+ function na(e) {
570
+ U.value || T.value.pages.length <= 1 || Ft.confirm({
646
571
  title: "删除合同页面",
647
- content: `此页包含 ${t} 个签署位置,删除页面会同时移除这些位置,是否继续?`,
572
+ content: "删除页面会同时移除页面正文,是否继续?",
648
573
  okText: "确认删除",
649
574
  okType: "danger",
650
575
  cancelText: "取消",
651
576
  onOk: () => {
652
- oa(e);
577
+ ta(e);
653
578
  }
654
579
  });
655
580
  }
656
- function ca(e) {
657
- let t = new Set(E.value.variables.map((e) => e.key)), n = 1;
581
+ function ra(e) {
582
+ let t = new Set(T.value.variables.map((e) => e.key)), n = 1;
658
583
  for (; t.has(`${e}_${n}`);) n += 1;
659
584
  return `${e}_${n}`;
660
585
  }
661
- function la(e) {
586
+ function ia(e) {
662
587
  let t = e.type ?? "text";
663
- return Ce({
588
+ return he({
664
589
  ...e,
665
590
  type: t,
666
- key: e.key || ca(t),
667
- label: e.label || Te(t, Qr.value).label
668
- }, Qr.value, l.defaultVariableStyle);
591
+ key: e.key || ra(t),
592
+ label: e.label || _e(t, ii.value).label
593
+ }, ii.value, l.defaultVariableStyle);
669
594
  }
670
- function ua(e, t = q.value?.id ?? E.value.pages[0].id, n) {
671
- if (W.value) return e;
672
- let r = M.get(t)?.insertVariable(e, n), i = !E.value.variables.some((t) => t.key === e.key);
595
+ function aa(e, t = W.value?.id ?? T.value.pages[0].id, n) {
596
+ if (U.value) return e;
597
+ let r = A.get(t)?.insertVariable(e, n), i = !T.value.variables.some((t) => t.key === e.key);
673
598
  return X({
674
- ...E.value,
675
- pages: r ? E.value.pages.map((e) => e.id === r.id ? r : e) : E.value.pages,
676
- variables: i ? [...E.value.variables, e] : E.value.variables
677
- }), D.value = e.key, Q(), k.value = t, i && h("variable-add", e), J(t), e;
599
+ ...T.value,
600
+ pages: r ? T.value.pages.map((e) => e.id === r.id ? r : e) : T.value.pages,
601
+ variables: i ? [...T.value.variables, e] : T.value.variables
602
+ }), E.value = e.key, D.value = t, i && g("variable-add", e), K(t), e;
678
603
  }
679
- function da(e) {
680
- let { width: t, height: n, ...r } = e, i = Le(t), a = Le(n);
604
+ function oa(e) {
605
+ let { width: t, height: n, ...r } = e, i = ke(t), a = ke(n);
681
606
  return {
682
607
  ...r,
683
608
  ...i === void 0 ? {} : { width: i },
684
609
  ...a === void 0 ? {} : { height: a }
685
610
  };
686
611
  }
687
- function fa(e = {}) {
688
- let t = Le(Qn.value), n = Le($n.value);
612
+ function sa(e = {}) {
613
+ let t = ke(Kn.value), n = ke(qn.value);
689
614
  return {
690
615
  ...e,
691
616
  ...t === void 0 ? {} : { width: t },
692
617
  ...n === void 0 ? {} : { height: n }
693
618
  };
694
619
  }
695
- function pa() {
696
- Zn.value = "", Qn.value = void 0, $n.value = void 0, er.value = "";
620
+ function ca() {
621
+ Gn.value = "", Kn.value = void 0, qn.value = void 0, Jn.value = "";
697
622
  }
698
- function ma(e, t = q.value?.id ?? E.value.pages[0]?.id, n) {
699
- let r = da({
623
+ function la(e, t = W.value?.id ?? T.value.pages[0]?.id, n) {
624
+ let r = oa({
700
625
  ...e,
701
626
  src: e.src.trim()
702
627
  });
703
- if (!(W.value || !t || !Pe(r.src) || !r.src || !M.get(t)?.insertContentImage(r, n))) return k.value = t, D.value = "", Q(), r.src;
628
+ if (!(U.value || !t || !Ee(r.src) || !r.src || !A.get(t)?.insertContentImage(r, n))) return D.value = t, E.value = "", r.src;
704
629
  }
705
- function ha(e) {
630
+ function ua(e) {
706
631
  return e instanceof Error ? e : /* @__PURE__ */ Error("图片处理失败");
707
632
  }
708
- async function ga(e, t) {
709
- t === "toolbar" && (tr.value = !0, er.value = "");
633
+ async function da(e, t) {
634
+ t === "toolbar" && (Yn.value = !0, Jn.value = "");
710
635
  try {
711
- let n = await Re(e, {
636
+ let n = await Ae(e, {
712
637
  source: t,
713
638
  compression: l.imageCompression,
714
639
  upload: l.imageUpload
715
640
  });
716
- return yr ? void 0 : n.src;
641
+ return pr ? void 0 : n.src;
717
642
  } catch (e) {
718
- let n = ha(e);
719
- t === "toolbar" && (er.value = n.message), H.value = n.message, h("image-error", n, t);
643
+ let n = ua(e);
644
+ t === "toolbar" && (Jn.value = n.message), V.value = n.message, g("image-error", n, t);
720
645
  return;
721
646
  } finally {
722
- t === "toolbar" && (tr.value = !1);
647
+ t === "toolbar" && (Yn.value = !1);
723
648
  }
724
649
  }
725
- let _a = 0;
726
- function va(e) {
650
+ let fa = 0;
651
+ function pa(e) {
727
652
  let t = e.replacedFontFamilies.filter(Boolean);
728
653
  if (!t.length) return;
729
654
  let n = Date.now();
730
- n - _a < 800 || (_a = n, Ht.info(`已将 ${t.length} 种外部字体(${t.join("、")})统一为合同标准字体,以保证 Mac 与 Windows 排版一致`));
655
+ n - fa < 800 || (fa = n, Lt.info(`已将 ${t.length} 种外部字体(${t.join("、")})统一为合同标准字体,以保证 Mac 与 Windows 排版一致`));
731
656
  }
732
- async function ya(e) {
733
- return await ga(e, "paste") ?? null;
657
+ async function ma(e) {
658
+ return await da(e, "paste") ?? null;
734
659
  }
735
- async function ba(e, t = {}) {
736
- if (W.value) return;
737
- let n = q.value?.id ?? E.value.pages[0]?.id, r = n ? M.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await ga(e, "toolbar");
738
- if (yr) return;
739
- if (!i || !Pe(i)) {
740
- typeof e == "string" && (er.value = "请输入安全的图片 URL");
660
+ async function ha(e, t = {}) {
661
+ if (U.value) return;
662
+ let n = W.value?.id ?? T.value.pages[0]?.id, r = n ? A.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await da(e, "toolbar");
663
+ if (pr) return;
664
+ if (!i || !Ee(i)) {
665
+ typeof e == "string" && (Jn.value = "请输入安全的图片 URL");
741
666
  return;
742
667
  }
743
- if (n && !M.has(n)) return;
744
- let a = ma({
668
+ if (n && !A.has(n)) return;
669
+ let a = la({
745
670
  ...t,
746
671
  src: i
747
672
  }, n, r);
748
- return a && (Xn.value = !1, pa(), H.value = "已插入图片"), a;
673
+ return a && (Vn.value = !1, ca(), V.value = "已插入图片"), a;
749
674
  }
750
- function xa() {
751
- W.value || tr.value || ($(), er.value = "", _n.value && (_n.value.value = ""), _n.value?.click());
675
+ function ga() {
676
+ U.value || Yn.value || ($(), Jn.value = "", fn.value && (fn.value.value = ""), fn.value?.click());
752
677
  }
753
- async function Sa(e) {
678
+ async function _a(e) {
754
679
  let t = e.target.files?.[0];
755
- t && await ba(t, fa({ alt: t.name }));
680
+ t && await ha(t, sa({ alt: t.name }));
756
681
  }
757
- async function Ca() {
758
- let e = Zn.value;
759
- await ba(e, fa());
682
+ async function va() {
683
+ let e = Gn.value;
684
+ await ha(e, sa());
760
685
  }
761
- function wa(e) {
762
- Wa(e), Yn.value = !1;
686
+ function ya(e) {
687
+ Ra(e), Bn.value = !1;
763
688
  }
764
- function Ta() {
765
- $(), ia();
689
+ function ba() {
690
+ $(), $i();
766
691
  }
767
- function Ea(e, t, n, r) {
768
- $(), ua(la({ type: t }), e, {
692
+ function xa(e, t, n, r) {
693
+ $(), aa(ia({ type: t }), e, {
769
694
  left: n,
770
695
  top: r
771
696
  });
772
697
  }
773
- function Da(e) {
774
- $(), D.value = e, Q();
698
+ function Sa(e) {
699
+ $(), E.value = e;
775
700
  }
776
- function Oa(e) {
777
- let t = E.value.variables.find((t) => t.id === e.id);
701
+ function Ca(e) {
702
+ let t = T.value.variables.find((t) => t.id === e.id);
778
703
  if (!t) return;
779
704
  let n = e.key.trim();
780
705
  if (n !== t.key) {
781
- let t = Me(n, E.value.variables, e.id);
706
+ let t = we(n, T.value.variables, e.id);
782
707
  if (t) {
783
- H.value = t;
708
+ V.value = t;
784
709
  return;
785
710
  }
786
711
  }
@@ -788,8 +713,8 @@ var Kt = {
788
713
  ...e,
789
714
  key: n
790
715
  };
791
- let r = [...E.value.pages], i = t.key, a = "";
792
- M.forEach((t, n) => {
716
+ let r = [...T.value.pages], i = t.key, a = "";
717
+ A.forEach((t, n) => {
793
718
  let o = t.updateVariable(e, i);
794
719
  if (o) {
795
720
  a ||= n;
@@ -797,14 +722,14 @@ var Kt = {
797
722
  e >= 0 && (r[e] = o);
798
723
  }
799
724
  }), X({
800
- ...E.value,
725
+ ...T.value,
801
726
  pages: r,
802
- variables: E.value.variables.map((t) => t.id === e.id ? e : t),
803
- ...i !== e.key && E.value.pageDecorations ? { pageDecorations: ne(E.value.pageDecorations, i, e.key) } : {}
804
- }), D.value = e.key, J(a || k.value);
727
+ variables: T.value.variables.map((t) => t.id === e.id ? e : t),
728
+ ...i !== e.key && T.value.pageDecorations ? { pageDecorations: ne(T.value.pageDecorations, i, e.key) } : {}
729
+ }), E.value = e.key, K(a || D.value);
805
730
  }
806
- function ka(e) {
807
- G.value && Oa({
731
+ function Q(e) {
732
+ G.value && Ca({
808
733
  ...G.value,
809
734
  ...e,
810
735
  style: {
@@ -813,368 +738,338 @@ var Kt = {
813
738
  }
814
739
  });
815
740
  }
816
- function Aa(e) {
817
- W.value || !G.value || ka({ key: e });
741
+ function wa(e) {
742
+ U.value || !G.value || Q({ key: e });
818
743
  }
819
- function ja(e) {
820
- W.value || (X({
821
- ...E.value,
744
+ function Ta(e) {
745
+ U.value || (X({
746
+ ...T.value,
822
747
  pageDecorations: o(e)
823
- }), J(E.value.pages[0]?.id));
748
+ }), K(T.value.pages[0]?.id));
824
749
  }
825
- function Ma(e) {
826
- (e === "left" || e === "center" || e === "right") && ka({ style: { textAlign: e } });
750
+ function Ea(e) {
751
+ (e === "left" || e === "center" || e === "right") && Q({ style: { textAlign: e } });
827
752
  }
828
- function Na(e) {
829
- (e === "solid" || e === "dashed") && ka({ style: { borderStyle: e } });
753
+ function Da(e) {
754
+ (e === "solid" || e === "dashed") && Q({ style: { borderStyle: e } });
830
755
  }
831
- function Pa(e) {
832
- (e === "contain" || e === "cover" || e === "fill") && ka({ style: { objectFit: e } });
756
+ function Oa(e) {
757
+ (e === "contain" || e === "cover" || e === "fill") && Q({ style: { objectFit: e } });
833
758
  }
834
- function Fa(e) {
835
- ka({ style: e });
759
+ function ka(e) {
760
+ Q({ style: e });
836
761
  }
837
- function Ia(e) {
838
- Fa({ fontFamily: String(e || "").trim() || t });
762
+ function Aa(e) {
763
+ ka({ fontFamily: String(e || "").trim() || t });
839
764
  }
840
- function La(e) {
841
- Fa({ fontSize: Mi(e, G.value?.style?.fontSize ?? 14) });
765
+ function ja(e) {
766
+ ka({ fontSize: Ai(e, G.value?.style?.fontSize ?? 14) });
842
767
  }
843
- function Ra(e) {
844
- G.value && ka({
768
+ function Ma(e) {
769
+ G.value && Q({
845
770
  multiline: e,
846
771
  rows: G.value.rows || 3,
847
772
  lineHeight: G.value.lineHeight || 28,
848
773
  style: e ? { underline: !0 } : void 0
849
774
  });
850
775
  }
851
- function za(e) {
852
- G.value && ka({
776
+ function Na(e) {
777
+ G.value && Q({
853
778
  rows: Number(e || 3),
854
779
  lineHeight: G.value.lineHeight || 28
855
780
  });
856
781
  }
857
- function Ba(e) {
858
- if (W.value) return;
859
- let t = [...E.value.pages];
860
- M.forEach((n, r) => {
782
+ function Pa(e) {
783
+ if (U.value) return;
784
+ let t = [...T.value.pages];
785
+ A.forEach((n, r) => {
861
786
  let i = n.removeVariable(e.key);
862
787
  if (i) {
863
788
  let e = t.findIndex((e) => e.id === r);
864
789
  e >= 0 && (t[e] = i);
865
790
  }
866
791
  }), X({
867
- ...E.value,
792
+ ...T.value,
868
793
  pages: t,
869
- variables: E.value.variables.filter((t) => t.id !== e.id),
870
- ...E.value.pageDecorations ? { pageDecorations: ne(E.value.pageDecorations, e.key) } : {}
871
- }), D.value = "", O.value = "";
794
+ variables: T.value.variables.filter((t) => t.id !== e.id),
795
+ ...T.value.pageDecorations ? { pageDecorations: ne(T.value.pageDecorations, e.key) } : {}
796
+ }), E.value = "";
872
797
  }
873
- function Va(e) {
874
- let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(E.value.variables.map((e) => e.key));
798
+ function Fa(e) {
799
+ let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(T.value.variables.map((e) => e.key));
875
800
  if (!n.has(t)) return t;
876
801
  let r = 2;
877
802
  for (; n.has(`${t}_${r}`);) r += 1;
878
803
  return `${t}_${r}`;
879
804
  }
880
- function Ha(e) {
881
- W.value || ua(Ce({
805
+ function Ia(e) {
806
+ U.value || aa(he({
882
807
  ...e,
883
808
  id: void 0,
884
- key: Va(`${e.key || e.type}_copy`),
809
+ key: Fa(`${e.key || e.type}_copy`),
885
810
  label: `${e.label}副本`,
886
811
  style: { ...e.style }
887
- }, Qr.value, l.defaultVariableStyle));
812
+ }, ii.value, l.defaultVariableStyle));
888
813
  }
889
- function Ua(e) {
890
- return W.value ? void 0 : ua(E.value.variables.find((t) => t.key === e.key) ?? Ce(e, Qr.value, l.defaultVariableStyle));
814
+ function La(e) {
815
+ return U.value ? void 0 : aa(T.value.variables.find((t) => t.key === e.key) ?? he(e, ii.value, l.defaultVariableStyle));
891
816
  }
892
- function Wa(e) {
893
- if (!W.value) return ua(la({ type: e }));
817
+ function Ra(e) {
818
+ if (!U.value) return aa(ia({ type: e }));
894
819
  }
895
- function Ga(e) {
896
- if (W.value || !re(e)) return;
897
- let t = R.value, n = Qr.value.find((t) => t.type === e);
820
+ function za(e) {
821
+ if (U.value || !re(e)) return;
822
+ let t = L.value, n = ii.value.find((t) => t.type === e);
898
823
  if (!t || !n) return;
899
- let r = ze(t.leadingText) || n.label, i = Be(t.selectionWidth, nn, yi.value), a = Ka();
900
- ua(la({
824
+ let r = Pe(t.leadingText) || n.label, i = Fe(t.selectionWidth, Zt, vi.value), a = Ba();
825
+ aa(ia({
901
826
  type: e,
902
827
  label: r,
903
828
  ...i ? { width: i } : {},
904
829
  ...a ? { style: a } : {}
905
- }), t.pageId), H.value = t.hasSelection ? `已将选中内容替换为${n.label}控件` : `已插入${n.label}控件`, $();
830
+ }), t.pageId), V.value = t.hasSelection ? `已将选中内容替换为${n.label}控件` : `已插入${n.label}控件`, $();
906
831
  }
907
- function Ka() {
908
- let e = xi.value, t = {};
832
+ function Ba() {
833
+ let e = q.value, t = {};
909
834
  return e.isUnderline && (t.underline = !0), typeof e.fontSize == "number" && Number.isFinite(e.fontSize) && (t.fontSize = e.fontSize), e.fontFamily && (t.fontFamily = e.fontFamily), e.textColor && (t.color = e.textColor), Object.keys(t).length ? t : void 0;
910
835
  }
911
- function qa(e) {
912
- if (W.value) return;
913
- let t = R.value;
914
- t && (ua(e, t.pageId), H.value = `已绑定到${e.label},沿用原控件尺寸`, $());
836
+ function Va(e) {
837
+ if (U.value) return;
838
+ let t = L.value;
839
+ t && (aa(e, t.pageId), V.value = `已绑定到${e.label},沿用原控件尺寸`, $());
915
840
  }
916
- function Ja(e) {
917
- return Te(e.type && re(e.type) ? e.type : "text", Qr.value).label;
841
+ function Ha(e) {
842
+ return _e(e.type && re(e.type) ? e.type : "text", ii.value).label;
918
843
  }
919
- function Ya() {
920
- E.value.variables.length && (cr.value = !0, g(() => {
921
- ds(), nr.value?.focusBindSearch();
844
+ function Ua() {
845
+ T.value.variables.length && (nr.value = !0, _(() => {
846
+ ns(), Xn.value?.focusBindSearch();
922
847
  }));
923
848
  }
924
- function Xa(e, t) {
849
+ function Wa(e, t) {
925
850
  e.dataTransfer?.setData("application/x-gd-contract-variable", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
926
851
  }
927
- function Za(e) {
928
- return N.value = Math.round(Math.min(Zt, Math.max(Xt, Number.isFinite(e) ? e : 1)) * 100) / 100, N.value;
852
+ function Ga(e) {
853
+ return j.value = Math.round(Math.min(Kt, Math.max(Gt, Number.isFinite(e) ? e : 1)) * 100) / 100, j.value;
929
854
  }
930
- let { width: Qa } = Ut(un), { fitWidth: $a, applyAutoFit: eo, markUserAdjusted: to, userAdjusted: no } = Ie({
931
- viewportWidth: Qa,
932
- widestPageWidth: f(() => Math.max(...E.value.pages.map((e) => Yi(e).width), he.width) + 10),
855
+ let { width: Ka } = Rt(an), { fitWidth: qa, applyAutoFit: Ja, markUserAdjusted: Ya, userAdjusted: Xa } = Oe({
856
+ viewportWidth: Ka,
857
+ widestPageWidth: f(() => Math.max(...T.value.pages.map((e) => Xi(e).width), ce.width) + 10),
933
858
  padding: 48,
934
- minZoom: Xt,
935
- maxZoom: Zt,
936
- getZoom: () => N.value,
937
- applyZoom: Za
859
+ minZoom: Gt,
860
+ maxZoom: Kt,
861
+ getZoom: () => j.value,
862
+ applyZoom: Ga
863
+ });
864
+ function Za(e) {
865
+ return Ya(), Ga(e);
866
+ }
867
+ function Qa() {
868
+ return Ja();
869
+ }
870
+ function $a() {
871
+ return j.value;
872
+ }
873
+ function eo() {
874
+ Za(j.value + qt);
875
+ }
876
+ function to() {
877
+ Za(j.value - qt);
878
+ }
879
+ function no() {
880
+ $(), ls(), M.value = !M.value;
881
+ }
882
+ x(Ka, (e) => {
883
+ Pn.value && !Xa.value && e > 0 && qa();
938
884
  });
939
885
  function ro(e) {
940
- return to(), Za(e);
886
+ N.value ? dn.value?.focus() : e();
941
887
  }
942
888
  function io() {
943
- return eo();
889
+ $(), ls(), P.value = !1, fr = {
890
+ fullscreen: M.value,
891
+ sidebar: Mn.value,
892
+ inspector: Nn.value,
893
+ chrome: N.value,
894
+ zoom: j.value,
895
+ userAdjusted: Xa.value
896
+ }, M.value = !0, Mn.value = !0, Nn.value = !0, N.value = !0, Pn.value = !0, _(() => {
897
+ U.value ? Fn.value?.focus() : A.get(D.value)?.focus();
898
+ });
944
899
  }
945
900
  function ao() {
946
- return N.value;
901
+ let e = fr;
902
+ Pn.value = !1, fr = void 0, e && (M.value = e.fullscreen, Mn.value = e.sidebar, Nn.value = e.inspector, N.value = e.chrome, e.userAdjusted ? Za(e.zoom) : Ja(), _(() => ro(() => sn.value?.focusImmersive())));
947
903
  }
948
904
  function oo() {
949
- ro(N.value + Qt);
905
+ Pn.value ? ao() : io();
950
906
  }
951
907
  function so() {
952
- ro(N.value - Qt);
908
+ $(), R.value = void 0;
909
+ let e = J(!1);
910
+ S.value ? (En.value = u(C.value), Tn.value = void 0, Dn.value = w.value || C.value[0]?.id || "") : (Tn.value = c(e), En.value = void 0, Dn.value = ""), wn.value = !0;
953
911
  }
954
912
  function co() {
955
- $(), I.value = !1, L.value = !1, Kn.value = !1, P.value = !P.value;
913
+ wn.value = !1, Tn.value = void 0, En.value = void 0, Dn.value = "";
956
914
  }
957
- b(Qa, (e) => {
958
- Un.value && !no.value && e > 0 && $a();
959
- });
960
- function lo(e) {
961
- Hn.value ? gn.value?.focus() : e();
915
+ function lo() {
916
+ return zo();
962
917
  }
963
918
  function uo() {
964
- $(), vs(), F.value = !1, vr = {
965
- fullscreen: P.value,
966
- sidebar: Bn.value,
967
- inspector: Vn.value,
968
- chrome: Hn.value,
969
- zoom: N.value,
970
- userAdjusted: no.value
971
- }, P.value = !0, Bn.value = !0, Vn.value = !0, Hn.value = !0, Un.value = !0, g(() => {
972
- W.value ? Wn.value?.focus() : M.get(k.value)?.focus();
973
- });
919
+ $();
920
+ let e = lo();
921
+ return kn.value = JSON.stringify(e, null, 2), On.value = !0, e;
974
922
  }
975
923
  function fo() {
976
- let e = vr;
977
- Un.value = !1, vr = void 0, e && (P.value = e.fullscreen, Bn.value = e.sidebar, Vn.value = e.inspector, Hn.value = e.chrome, e.userAdjusted ? ro(e.zoom) : eo(), g(() => lo(() => fn.value?.focusImmersive())));
924
+ On.value = !1;
978
925
  }
979
926
  function po() {
980
- Un.value ? fo() : uo();
927
+ return De(J(!1));
981
928
  }
982
929
  function mo() {
983
- $(), z.value = void 0;
984
- let e = Y(!1);
985
- x.value ? (Pn.value = u(S.value), Nn.value = void 0, Fn.value = C.value || S.value[0]?.id || "") : (Nn.value = c(e), Pn.value = void 0, Fn.value = ""), Mn.value = !0;
930
+ $();
931
+ let e = po();
932
+ return jn.value = e, An.value = !0, e;
986
933
  }
987
934
  function ho() {
988
- Mn.value = !1, Nn.value = void 0, Pn.value = void 0, Fn.value = "";
935
+ An.value = !1;
989
936
  }
990
937
  function go() {
991
- return Go();
992
- }
993
- function _o() {
994
- $();
995
- let e = go();
996
- return Ln.value = JSON.stringify(e, null, 2), In.value = !0, e;
997
- }
998
- function vo() {
999
- In.value = !1;
1000
- }
1001
- function yo() {
1002
- return Fe(Y(!1));
1003
- }
1004
- function bo() {
1005
- $();
1006
- let e = yo();
1007
- return zn.value = e, Rn.value = !0, e;
1008
- }
1009
- function xo() {
1010
- Rn.value = !1;
1011
- }
1012
- function So() {
1013
- $(), z.value = void 0, I.value = !1, L.value = !1;
1014
- let e = K.value.map(pt);
1015
- T.value = [], w.value = {
1016
- ...w.value,
1017
- [C.value]: []
1018
- };
1019
- let t = !!O.value;
1020
- D.value = "", O.value = "", k.value = "", Mn.value = !1, Nn.value = void 0, Pn.value = void 0, In.value = !1, Ln.value = "", Rn.value = !1, zn.value = {
938
+ $(), R.value = void 0, F.value = !1, I.value = !1, E.value = "", D.value = "", wn.value = !1, Tn.value = void 0, En.value = void 0, On.value = !1, kn.value = "", An.value = !1, jn.value = {
1021
939
  values: {},
1022
940
  variables: []
1023
- }, qn.value = {}, jn.value = "";
1024
- let n = X(xe(he));
1025
- return t && h("signing-placement-select", void 0), e.forEach((e) => h("signing-placement-remove", e)), k.value = n.pages[0]?.id ?? "", c(n);
941
+ }, Rn.value = {}, Cn.value = "";
942
+ let e = X(pe(ce));
943
+ return D.value = e.pages[0]?.id ?? "", c(e);
1026
944
  }
1027
- function Co() {
1028
- W.value || ($(), Bt.confirm({
945
+ function _o() {
946
+ U.value || ($(), Ft.confirm({
1029
947
  title: "清空合同内容",
1030
- content: "将清空全部合同正文、页面、模板变量和签署位置,仅保留一个空白 A4 合同页。此操作不可撤销。",
948
+ content: "将清空全部合同正文、页面和模板变量,仅保留一个空白 A4 合同页。此操作不可撤销。",
1031
949
  okText: "确认清空",
1032
950
  okType: "danger",
1033
951
  cancelText: "取消",
1034
952
  onOk: () => {
1035
- So();
953
+ go();
1036
954
  }
1037
955
  }));
1038
956
  }
1039
- function wo(e) {
1040
- let t = Pi().pages, n = t.find((e) => e.id === k.value);
957
+ function vo(e) {
958
+ let t = Mi().pages, n = t.find((e) => e.id === D.value);
1041
959
  return (n ? [n, ...t.filter((e) => e.id !== n.id)] : t).find((t) => t.contentHtml.includes(`data-key="${e.key}"`) || t.contentHtml.includes(`data-key='${e.key}'`));
1042
960
  }
1043
- function To(e) {
1044
- $(), D.value = e.key, Q();
1045
- let t = wo(e);
1046
- t && (k.value = t.id, g(() => {
1047
- M.get(t.id)?.scrollIntoVariable(e.key);
961
+ function yo(e) {
962
+ $(), E.value = e.key;
963
+ let t = vo(e);
964
+ t && (D.value = t.id, _(() => {
965
+ A.get(t.id)?.scrollIntoVariable(e.key);
1048
966
  }));
1049
967
  }
1050
- function Eo(e) {
1051
- let t = E.value.variables.find((t) => t.key === e || t.id === e);
1052
- t && To(t);
968
+ function bo(e) {
969
+ let t = T.value.variables.find((t) => t.key === e || t.id === e);
970
+ t && yo(t);
1053
971
  }
1054
- function Do(e) {
1055
- let t = K.value.find((t) => t.id === e);
1056
- t && ($(), D.value = "", k.value = t.pageId, Q(t.id), g(() => {
1057
- M.get(t.pageId)?.scrollIntoSigningPlacement(t.id);
1058
- }));
1059
- }
1060
- function Oo(e, t = !0) {
1061
- $(), k.value = e, t && g(() => {
1062
- M.get(e)?.scrollIntoPage();
972
+ function xo(e, t = !0) {
973
+ $(), D.value = e, t && _(() => {
974
+ A.get(e)?.scrollIntoPage();
1063
975
  });
1064
976
  }
1065
- function ko(e) {
1066
- E.value.pages.some((t) => t.id === e) && Oo(e);
977
+ function So(e) {
978
+ xo(e.pageId, !1), A.get(e.pageId)?.focusHeading(e.headingIndex);
979
+ }
980
+ function Co(e) {
981
+ T.value.pages.some((t) => t.id === e) && xo(e);
1067
982
  }
1068
- function Ao() {
1069
- if (F.value) {
1070
- jo();
983
+ function wo() {
984
+ if (P.value) {
985
+ To();
1071
986
  return;
1072
987
  }
1073
- F.value = !0;
988
+ P.value = !0;
1074
989
  }
1075
- function jo() {
1076
- F.value = !1, g(() => lo(() => fn.value?.focusPageDecorations()));
990
+ function To() {
991
+ P.value = !1, _(() => ro(() => sn.value?.focusPageDecorations()));
1077
992
  }
1078
- function Mo() {
1079
- return Ii(), c(Pi());
993
+ function Eo() {
994
+ return Pi(), c(Mi());
1080
995
  }
1081
- function No(e) {
1082
- T.value = vn(e), w.value = {
1083
- ...w.value,
1084
- [C.value]: T.value
1085
- };
1086
- let t = X(ke(e, l.pageSize));
1087
- t.signingPlacements?.some((e) => e.id === O.value) || Q(), J(t.pages[0]?.id);
996
+ function Do(e) {
997
+ K(X(xe(e, l.pageSize)).pages[0]?.id);
1088
998
  }
1089
- function Po() {
1090
- let e = Y(!1);
1091
- return x.value ? u(S.value) : u(ut(S.value, C.value, e));
999
+ function Oo() {
1000
+ let e = J(!1);
1001
+ return S.value ? u(C.value) : u(lt(C.value, w.value, e));
1092
1002
  }
1093
- function Fo(e, t) {
1094
- let n = rt(st(e, void 0, l.pageSize), l.pageSizeOptions), r = S.value;
1095
- Sn.value = !0, Y(!1), S.value = n.files, w.value = yn(n.files, e), Vi(dt(S.value, t ?? C.value), {
1003
+ function ko(e, t) {
1004
+ let n = nt(ot(e, void 0, l.pageSize), l.pageSizeOptions), r = C.value;
1005
+ gn.value = !0, J(!1), C.value = n.files, Ri(ut(C.value, t ?? w.value), {
1096
1006
  syncCurrent: !1,
1097
1007
  shouldEmit: !0,
1098
- forceRefresh: !0,
1099
- persistCurrentErrors: !1
1100
- }), d(r) !== d(S.value) && Bi(S.value, "");
1101
- }
1102
- function Io(e) {
1103
- if (W.value) return;
1104
- Sn.value = !0, Y(!0);
1105
- let t = it(e || `合同文件 ${S.value.length + 1}`, l.pageSize);
1106
- return S.value = [...S.value, t], w.value = {
1107
- ...w.value,
1108
- [t.id]: []
1109
- }, Bi(S.value, ""), h("file-add", u([t])[0]), Vi(t.id, {
1008
+ forceRefresh: !0
1009
+ }), d(r) !== d(C.value) && Y(C.value, "");
1010
+ }
1011
+ function Ao(e) {
1012
+ if (U.value) return;
1013
+ gn.value = !0, J(!0);
1014
+ let t = rt(e || `合同文件 ${C.value.length + 1}`, l.pageSize);
1015
+ return C.value = [...C.value, t], Y(C.value, ""), g("file-add", u([t])[0]), Ri(t.id, {
1110
1016
  syncCurrent: !1,
1111
1017
  shouldEmit: !0,
1112
1018
  forceRefresh: !0
1113
1019
  }), u([t])[0];
1114
1020
  }
1115
- function Lo(e) {
1116
- !x.value && !S.value.some((t) => t.id === e) || (Sn.value = !0, Vi(e));
1117
- }
1118
- function Ro(e, t) {
1119
- if (W.value) return;
1120
- Sn.value = !0, Y(!1);
1121
- let n = lt(S.value, e, t), r = n.find((t) => t.id === e);
1122
- if (r) return S.value = n, Bi(n, e), u([r])[0];
1123
- }
1124
- function zo(e) {
1125
- if (W.value || S.value.length <= 1) return;
1126
- Sn.value = !0, Y(!1);
1127
- let t = S.value.find((t) => t.id === e);
1021
+ function jo(e) {
1022
+ !S.value && !C.value.some((t) => t.id === e) || (gn.value = !0, Ri(e));
1023
+ }
1024
+ function Mo(e, t) {
1025
+ if (U.value) return;
1026
+ gn.value = !0, J(!1);
1027
+ let n = ct(C.value, e, t), r = n.find((t) => t.id === e);
1028
+ if (r) return C.value = n, Y(n, e), u([r])[0];
1029
+ }
1030
+ function No(e) {
1031
+ if (U.value || C.value.length <= 1) return;
1032
+ gn.value = !0, J(!1);
1033
+ let t = C.value.find((t) => t.id === e);
1128
1034
  if (!t) return;
1129
- let n = ct(S.value, e);
1130
- if (n.length === S.value.length) return;
1131
- S.value = n;
1132
- let { [e]: r, ...i } = w.value;
1133
- w.value = i, Bi(n, ""), h("file-remove", u([t])[0]);
1134
- let a = t.template.signingPlacements ?? [];
1135
- return a.forEach((e) => h("signing-placement-remove", pt(e))), a.some((e) => e.id === O.value) && h("signing-placement-select", void 0), C.value === e && Vi(dt(n, n[0]?.id), {
1035
+ let n = st(C.value, e);
1036
+ if (n.length !== C.value.length) return C.value = n, Y(n, ""), g("file-remove", u([t])[0]), w.value === e && Ri(ut(n, n[0]?.id), {
1136
1037
  syncCurrent: !1,
1137
1038
  shouldEmit: !0,
1138
- forceRefresh: !0,
1139
- persistCurrentErrors: !1
1039
+ forceRefresh: !0
1140
1040
  }), u([t])[0];
1141
1041
  }
1142
- function Bo(e) {
1143
- if (W.value || S.value.length <= 1) return;
1144
- let t = S.value.find((t) => t.id === e);
1145
- if (!t) return;
1146
- let n = t.template.signingPlacements?.length ?? 0;
1147
- Bt.confirm({
1042
+ function Po(e) {
1043
+ if (U.value || C.value.length <= 1) return;
1044
+ let t = C.value.find((t) => t.id === e);
1045
+ t && Ft.confirm({
1148
1046
  title: "删除合同文件",
1149
- content: n ? `“${t.name}”包含 ${n} 个签署位置,删除后文件内正文、变量和签署位置都会移除,是否继续?` : `删除“${t.name}”后,其正文和变量将无法恢复,是否继续?`,
1047
+ content: `删除“${t.name}”后,其正文和变量将无法恢复,是否继续?`,
1150
1048
  okText: "确认删除",
1151
1049
  okType: "danger",
1152
1050
  cancelText: "取消",
1153
1051
  onOk: () => {
1154
- zo(e);
1052
+ No(e);
1155
1053
  }
1156
1054
  });
1157
1055
  }
1158
- function Vo(e, t) {
1159
- if (W.value) return;
1160
- Sn.value = !0, Y(!1);
1161
- let n = S.value.findIndex((t) => t.id === e), r = ot(S.value, e, t), i = r.findIndex((t) => t.id === e), a = r[i];
1162
- if (!(!a || n === i)) return S.value = r, Bi(r, ""), h("file-move", u([a])[0], n, i), u([a])[0];
1163
- }
1164
- function Ho() {
1165
- Y(!1);
1166
- let e = Xo(x.value ? S.value.flatMap((e) => {
1167
- let t = Ne(e.template, { maxPages: ei.value });
1168
- return [...w.value[e.id] ?? [], ...t].map((t) => ({
1169
- ...t,
1170
- fileId: e.id
1171
- }));
1172
- }) : [...T.value, ...Ne(Pi(), { maxPages: ei.value })]);
1173
- return j.value = e, A.value = !0, h("validate", e), e;
1056
+ function Fo(e, t) {
1057
+ if (U.value) return;
1058
+ gn.value = !0, J(!1);
1059
+ let n = C.value.findIndex((t) => t.id === e), r = at(C.value, e, t), i = r.findIndex((t) => t.id === e), a = r[i];
1060
+ if (!(!a || n === i)) return C.value = r, Y(r, ""), g("file-move", u([a])[0], n, i), u([a])[0];
1061
+ }
1062
+ function Io() {
1063
+ J(!1);
1064
+ let e = Vo(S.value ? C.value.flatMap((e) => Te(e.template, { maxPages: si.value }).map((t) => ({
1065
+ ...t,
1066
+ fileId: e.id
1067
+ }))) : Te(Mi(), { maxPages: si.value }));
1068
+ return k.value = e, O.value = !0, g("validate", e), e;
1174
1069
  }
1175
- function Uo(e) {
1176
- if (e.fileId && e.fileId !== C.value) {
1177
- Lo(e.fileId), g(() => Uo({
1070
+ function Lo(e) {
1071
+ if (e.fileId && e.fileId !== w.value) {
1072
+ jo(e.fileId), _(() => Lo({
1178
1073
  ...e,
1179
1074
  fileId: void 0
1180
1075
  }));
@@ -1182,93 +1077,70 @@ var Kt = {
1182
1077
  }
1183
1078
  let t = te(e);
1184
1079
  if (t) {
1185
- F.value = !0, g(() => pn.value?.focusField(t));
1080
+ P.value = !0, _(() => cn.value?.focusField(t));
1186
1081
  return;
1187
1082
  }
1188
- if (e.type === "signing-placement") {
1189
- let t = K.value.find((t) => t.id === e.id);
1190
- if (t) {
1191
- Oo(t.pageId), Q(t.id);
1192
- return;
1193
- }
1194
- }
1195
1083
  if (e.variableKey) {
1196
- Eo(e.variableKey);
1084
+ bo(e.variableKey);
1197
1085
  return;
1198
1086
  }
1199
1087
  if (e.pageId) {
1200
- ko(e.pageId);
1088
+ Co(e.pageId);
1201
1089
  return;
1202
1090
  }
1203
- let n = E.value.variables.find((t) => t.id === e.id || t.key === e.id);
1091
+ let n = T.value.variables.find((t) => t.id === e.id || t.key === e.id);
1204
1092
  if (n) {
1205
- To(n);
1093
+ yo(n);
1206
1094
  return;
1207
1095
  }
1208
- E.value.pages.some((t) => t.id === e.id) && Oo(e.id);
1209
- }
1210
- function Wo(e) {
1211
- return te(e) ? "页面装饰" : e.type === "signing-placement" ? "签署位置" : e.type === "variable" ? "变量" : "字段";
1096
+ T.value.pages.some((t) => t.id === e.id) && xo(e.id);
1212
1097
  }
1213
- function Go() {
1214
- return Ii(), we(Pi());
1098
+ function Ro(e) {
1099
+ return te(e) ? "页面装饰" : e.type === "variable" ? "变量" : "字段";
1215
1100
  }
1216
- function Ko() {
1217
- let e = Y(!1);
1218
- return at(x.value ? S.value : ut(S.value, C.value, e));
1101
+ function zo() {
1102
+ return Pi(), ge(Mi());
1219
1103
  }
1220
- function qo(e) {
1221
- let t = Pi();
1222
- try {
1223
- let n = _e(t, T.value);
1224
- if (n.length) throw new ie(n);
1225
- return e(t);
1226
- } catch (e) {
1227
- throw e instanceof ie && (j.value = [...e.errors], A.value = !0, h("validate", [...e.errors])), e;
1228
- }
1229
- }
1230
- function Jo(e) {
1231
- return qo((t) => se(t, e));
1232
- }
1233
- function Yo(e) {
1234
- return qo((t) => oe(t, e));
1104
+ function Bo() {
1105
+ let e = J(!1);
1106
+ return it(S.value ? C.value : lt(C.value, w.value, e));
1235
1107
  }
1236
- function Xo(e) {
1108
+ function Vo(e) {
1237
1109
  let t = /* @__PURE__ */ new Set();
1238
1110
  return e.filter((e) => {
1239
1111
  let n = `${e.fileId ?? ""}|${e.code ?? ""}|${e.id}|${e.pageId ?? ""}|${e.message}`;
1240
1112
  return t.has(n) ? !1 : (t.add(n), !0);
1241
1113
  });
1242
1114
  }
1243
- function Zo(e) {
1244
- j.value = [...e], A.value = !0;
1115
+ function Ho(e) {
1116
+ k.value = [...e], O.value = !0;
1245
1117
  }
1246
- function Qo() {
1247
- j.value = [], A.value = !1;
1118
+ function Uo() {
1119
+ k.value = [], O.value = !1;
1248
1120
  }
1249
- function $o() {
1250
- M.get(q.value?.id ?? k.value)?.focus();
1121
+ function Wo() {
1122
+ A.get(W.value?.id ?? D.value)?.focus();
1251
1123
  }
1252
- function es(e) {
1253
- Ai(e) && Z({
1124
+ function Go(e) {
1125
+ Oi(e) && Z({
1254
1126
  type: "set-text-align",
1255
1127
  value: e
1256
1128
  });
1257
1129
  }
1258
- function ts(e) {
1259
- (e === "paragraph" || ji(e)) && Z({
1130
+ function Ko(e) {
1131
+ (e === "paragraph" || ki(e)) && Z({
1260
1132
  type: "apply-block-style",
1261
1133
  format: e
1262
1134
  });
1263
1135
  }
1264
- function ns(e) {
1265
- let t = Ni(e);
1136
+ function qo(e) {
1137
+ let t = ji(e);
1266
1138
  t && (Z({
1267
1139
  type: "set-font-size",
1268
1140
  value: t
1269
- }), Jn.value = "");
1141
+ }), zn.value = "");
1270
1142
  }
1271
- function rs(e) {
1143
+ function Jo(e) {
1272
1144
  let t = String(e || "").trim();
1273
1145
  if (!t) {
1274
1146
  Z({ type: "unset-font-family" });
@@ -1279,241 +1151,241 @@ var Kt = {
1279
1151
  value: t
1280
1152
  });
1281
1153
  }
1282
- function is(e) {
1283
- as(e.target?.value ?? "");
1154
+ function Yo(e) {
1155
+ Xo(e.target?.value ?? "");
1284
1156
  }
1285
- function as(e) {
1157
+ function Xo(e) {
1286
1158
  let t = e.trim();
1287
1159
  t && Z({
1288
1160
  type: "set-color",
1289
1161
  value: t
1290
1162
  });
1291
1163
  }
1292
- function os(e) {
1293
- Jn.value = e;
1164
+ function Zo(e) {
1165
+ zn.value = e;
1294
1166
  }
1295
- function ss() {
1296
- Jn.value.trim() && ns(Jn.value);
1167
+ function Qo() {
1168
+ zn.value.trim() && qo(zn.value);
1297
1169
  }
1298
- function cs(e) {
1299
- e.key === "Enter" && (e.preventDefault(), ss());
1170
+ function $o(e) {
1171
+ e.key === "Enter" && (e.preventDefault(), Qo());
1300
1172
  }
1301
- function ls(e) {
1302
- e || (ss(), Jn.value = "");
1173
+ function es(e) {
1174
+ e || (Qo(), zn.value = "");
1303
1175
  }
1304
- function us(e) {
1305
- if (W.value) return;
1306
- k.value = e.pageId, I.value = !1, L.value = !1, B.value = void 0, V.value = void 0, cr.value = !1, lr.value = "";
1307
- let t = St(e.clientX, e.clientY, 304, 300);
1308
- R.value = {
1176
+ function ts(e) {
1177
+ if (U.value) return;
1178
+ D.value = e.pageId, F.value = !1, I.value = !1, z.value = void 0, B.value = void 0, nr.value = !1, rr.value = "";
1179
+ let t = _t(e.clientX, e.clientY, 304, 300);
1180
+ L.value = {
1309
1181
  pageId: e.pageId,
1310
1182
  x: t.x,
1311
1183
  y: t.y,
1312
1184
  hasSelection: e.hasSelection,
1313
1185
  selectionWidth: e.selectionWidth,
1314
1186
  leadingText: e.leadingText
1315
- }, g(() => {
1316
- ds(), nr.value?.focusFirstButton();
1187
+ }, _(() => {
1188
+ ns(), Xn.value?.focusFirstButton();
1317
1189
  });
1318
1190
  }
1319
- function ds() {
1320
- let e = nr.value?.getMenuElement(), t = R.value;
1191
+ function ns() {
1192
+ let e = Xn.value?.getMenuElement(), t = L.value;
1321
1193
  if (!e || !t) return;
1322
- let n = Ct(t.x, t.y, e);
1323
- R.value = {
1194
+ let n = vt(t.x, t.y, e);
1195
+ L.value = {
1324
1196
  ...t,
1325
1197
  x: n.x,
1326
1198
  y: n.y
1327
1199
  };
1328
1200
  }
1329
- function fs(e) {
1330
- if (W.value) return;
1331
- k.value = e.pageId, I.value = !1, L.value = !1, R.value = void 0, V.value = void 0;
1332
- let t = St(e.clientX, e.clientY, 248, 400);
1333
- B.value = {
1201
+ function rs(e) {
1202
+ if (U.value) return;
1203
+ D.value = e.pageId, F.value = !1, I.value = !1, L.value = void 0, B.value = void 0;
1204
+ let t = _t(e.clientX, e.clientY, 248, 400);
1205
+ z.value = {
1334
1206
  ...e,
1335
1207
  x: t.x,
1336
1208
  y: t.y
1337
- }, g(() => {
1338
- let e = ur.value?.getMenuElement(), t = B.value;
1209
+ }, _(() => {
1210
+ let e = ir.value?.getMenuElement(), t = z.value;
1339
1211
  if (e && t) {
1340
- let n = Ct(t.x, t.y, e);
1341
- B.value = {
1212
+ let n = vt(t.x, t.y, e);
1213
+ z.value = {
1342
1214
  ...t,
1343
1215
  x: n.x,
1344
1216
  y: n.y
1345
1217
  };
1346
1218
  }
1347
- ur.value?.focusFirstItem();
1219
+ ir.value?.focusFirstItem();
1348
1220
  });
1349
1221
  }
1350
- function ps(e) {
1351
- if (W.value) return;
1352
- k.value = e.pageId, I.value = !1, L.value = !1, R.value = void 0, B.value = void 0, fr.value = e.image.width, pr.value = e.image.height, D.value = "", O.value && Q();
1353
- let t = St(e.clientX, e.clientY, 288, 196);
1354
- V.value = {
1222
+ function is(e) {
1223
+ if (U.value) return;
1224
+ D.value = e.pageId, F.value = !1, I.value = !1, L.value = void 0, z.value = void 0, or.value = e.image.width, sr.value = e.image.height, E.value = "";
1225
+ let t = _t(e.clientX, e.clientY, 288, 196);
1226
+ B.value = {
1355
1227
  pageId: e.pageId,
1356
1228
  image: e.image,
1357
1229
  x: t.x,
1358
1230
  y: t.y
1359
- }, g(() => {
1360
- ms(), dr.value?.getMenuElement()?.querySelector("input, button:not(:disabled)")?.focus();
1231
+ }, _(() => {
1232
+ as(), ar.value?.getMenuElement()?.querySelector("input, button:not(:disabled)")?.focus();
1361
1233
  });
1362
1234
  }
1363
- function ms() {
1364
- let e = dr.value?.getMenuElement(), t = V.value;
1235
+ function as() {
1236
+ let e = ar.value?.getMenuElement(), t = B.value;
1365
1237
  if (!e || !t) return;
1366
- let n = Ct(t.x, t.y, e);
1367
- V.value = {
1238
+ let n = vt(t.x, t.y, e);
1239
+ B.value = {
1368
1240
  ...t,
1369
1241
  x: n.x,
1370
1242
  y: n.y
1371
1243
  };
1372
1244
  }
1373
- function hs() {
1374
- let e = V.value;
1375
- !e || W.value || (M.get(e.pageId)?.updateSelectedContentImage({
1376
- width: Le(fr.value),
1377
- height: Le(pr.value)
1378
- }) && (H.value = "已更新图片尺寸"), $());
1245
+ function os() {
1246
+ let e = B.value;
1247
+ !e || U.value || (A.get(e.pageId)?.updateSelectedContentImage({
1248
+ width: ke(or.value),
1249
+ height: ke(sr.value)
1250
+ }) && (V.value = "已更新图片尺寸"), $());
1379
1251
  }
1380
- function gs() {
1381
- let e = V.value;
1382
- !e || W.value || (M.get(e.pageId)?.updateSelectedContentImage({
1252
+ function ss() {
1253
+ let e = B.value;
1254
+ !e || U.value || (A.get(e.pageId)?.updateSelectedContentImage({
1383
1255
  width: void 0,
1384
1256
  height: void 0
1385
- }) && (H.value = "已恢复图片自然尺寸"), $());
1257
+ }) && (V.value = "已恢复图片自然尺寸"), $());
1386
1258
  }
1387
- function _s(e) {
1388
- e.type === "table" ? fs(e) : e.type === "image" ? ps(e) : us(e);
1259
+ function cs(e) {
1260
+ e.type === "table" ? rs(e) : e.type === "image" ? is(e) : ts(e);
1389
1261
  }
1390
1262
  function $() {
1391
- R.value = void 0, B.value = void 0, V.value = void 0, cr.value = !1, lr.value = "";
1263
+ L.value = void 0, z.value = void 0, B.value = void 0, nr.value = !1, rr.value = "";
1392
1264
  }
1393
- function vs() {
1394
- I.value = !1, L.value = !1, Kn.value = !1, Yn.value = !1, Xn.value = !1;
1265
+ function ls() {
1266
+ Er(!1), F.value = !1, I.value = !1, Ln.value = !1, Bn.value = !1, Vn.value = !1, Hn.value = !1, Un.value = !1;
1395
1267
  }
1396
- function ys() {
1397
- vs(), Hn.value = !Hn.value, g(() => lo(() => fn.value?.focusChromeToggle()));
1268
+ function us() {
1269
+ ls(), N.value = !N.value, _(() => ro(() => sn.value?.focusChromeToggle()));
1398
1270
  }
1399
- let bs = [
1271
+ let ds = [
1400
1272
  ".gd-contract-template-designer__context-menu",
1401
1273
  ".gd-contract-template-designer__bubble-menu",
1402
1274
  ".gd-contract-template-designer__bubble-menu-popup"
1403
1275
  ].join(",");
1404
- function xs() {
1405
- let e = W.value || or.value || ir.value || Sr.value || F.value || Mn.value, t = k.value, n = e ? void 0 : M.get(t)?.getSelectionViewportRect();
1276
+ function fs() {
1277
+ let e = U.value || er.value || Qn.value || Mr.value || P.value || wn.value, t = D.value, n = e ? void 0 : A.get(t)?.getSelectionViewportRect();
1406
1278
  if (!n) {
1407
- z.value = void 0;
1279
+ R.value = void 0;
1408
1280
  return;
1409
1281
  }
1410
- let r = n.top - 40 - sn, i = r >= 12 ? r : n.bottom + sn, a = St((n.left + n.right) / 2 - 380 / 2, i, 380, 40);
1411
- z.value = {
1282
+ let r = n.top - 40 - tn, i = r >= 12 ? r : n.bottom + tn, a = _t((n.left + n.right) / 2 - 380 / 2, i, 380, 40);
1283
+ R.value = {
1412
1284
  pageId: t,
1413
1285
  x: a.x,
1414
1286
  y: a.y
1415
- }, g(() => Ss(n));
1287
+ }, _(() => ps(n));
1416
1288
  }
1417
- function Ss(e) {
1418
- let t = rr.value?.getMenuElement(), n = z.value;
1289
+ function ps(e) {
1290
+ let t = Zn.value?.getMenuElement(), n = R.value;
1419
1291
  if (!t || !n) return;
1420
- let r = t.getBoundingClientRect(), i = e.top - r.height - sn, a = i >= 12 ? i : e.bottom + sn, o = Ct((e.left + e.right) / 2 - r.width / 2, a, t);
1421
- z.value = {
1292
+ let r = t.getBoundingClientRect(), i = e.top - r.height - tn, a = i >= 12 ? i : e.bottom + tn, o = vt((e.left + e.right) / 2 - r.width / 2, a, t);
1293
+ R.value = {
1422
1294
  ...n,
1423
1295
  x: o.x,
1424
1296
  y: o.y
1425
1297
  };
1426
1298
  }
1427
- function Cs() {
1428
- let e = z.value?.pageId ?? k.value, t = M.get(e)?.getSelectionRange();
1429
- ar = t ? {
1299
+ function ms() {
1300
+ let e = R.value?.pageId ?? D.value, t = A.get(e)?.getSelectionRange();
1301
+ $n = t ? {
1430
1302
  pageId: e,
1431
1303
  ...t
1432
- } : void 0, ir.value = !0, z.value = void 0;
1304
+ } : void 0, Qn.value = !0, R.value = void 0;
1433
1305
  }
1434
- function ws(e) {
1435
- if (!ir.value) return;
1436
- let t = ar, n = M.get(e)?.getSelectionRange();
1437
- t && n && t.pageId === e && t.from === n.from && t.to === n.to || (ir.value = !1, ar = void 0);
1306
+ function hs(e) {
1307
+ if (!Qn.value) return;
1308
+ let t = $n, n = A.get(e)?.getSelectionRange();
1309
+ t && n && t.pageId === e && t.from === n.from && t.to === n.to || (Qn.value = !1, $n = void 0);
1438
1310
  }
1439
- function Ts() {
1440
- !z.value || sr !== void 0 || (sr = requestAnimationFrame(() => {
1441
- sr = void 0, xs();
1311
+ function gs() {
1312
+ !R.value || tr !== void 0 || (tr = requestAnimationFrame(() => {
1313
+ tr = void 0, fs();
1442
1314
  }));
1443
1315
  }
1444
- function Es() {
1445
- or.value && (or.value = !1, xs());
1316
+ function _s() {
1317
+ er.value && (er.value = !1, fs());
1446
1318
  }
1447
- function Ds() {
1448
- $(), Ts();
1319
+ function vs() {
1320
+ $(), gs();
1449
1321
  }
1450
- function Os(e, t) {
1451
- M.get(z.value?.pageId ?? k.value)?.requestTextContextMenu(e, t);
1322
+ function ys(e, t) {
1323
+ A.get(R.value?.pageId ?? D.value)?.requestTextContextMenu(e, t);
1452
1324
  }
1453
- function ks(e) {
1454
- let t = e.target instanceof HTMLElement ? e.target : null;
1455
- t?.closest(".ProseMirror") && (or.value = !0, z.value = void 0), !(!R.value && !B.value && !V.value && !z.value) && (t?.closest(bs) || ($(), z.value && Cs()));
1325
+ function bs(e) {
1326
+ let t = e.target instanceof Element ? e.target : null;
1327
+ t?.closest(".ProseMirror") && (er.value = !0, R.value = void 0), !(!L.value && !z.value && !B.value && !R.value) && (t?.closest(ds) || ($(), R.value && ms()));
1456
1328
  }
1457
- function As(e) {
1458
- (e.target instanceof Element ? e.target : null)?.closest(bs) || ($(), Ts());
1329
+ function xs(e) {
1330
+ (e.target instanceof Element ? e.target : null)?.closest(ds) || ($(), gs());
1459
1331
  }
1460
- function js(e) {
1461
- let t = ln.value;
1332
+ function Ss(e) {
1333
+ let t = rn.value;
1462
1334
  if (!t || typeof document > "u") return !1;
1463
1335
  let n = e.target instanceof Node ? e.target : void 0, r = document.activeElement;
1464
1336
  return !!(n && t.contains(n) || r && t.contains(r) || n instanceof Element && n.closest(".gd-contract-template-designer__context-menu"));
1465
1337
  }
1466
- function Ms(e) {
1467
- if (e.key !== "Escape" || !F.value || typeof document > "u") return;
1468
- let t = ln.value?.querySelector(".gd-contract-template-designer__page-decorations-studio");
1338
+ function Cs(e) {
1339
+ if (e.key !== "Escape" || !P.value || typeof document > "u") return;
1340
+ let t = rn.value?.querySelector(".gd-contract-template-designer__page-decorations-studio");
1469
1341
  if (!t) return;
1470
- let n = e.target instanceof Element ? e.target : null, r = document.activeElement instanceof Element ? document.activeElement : null, i = !!(n?.closest(gr) || r?.closest(gr)), a = !!(n && t.contains(n) || r && t.contains(r)), o = !!t.querySelector(".ant-select-open, .ant-dropdown-open");
1342
+ let n = e.target instanceof Element ? e.target : null, r = document.activeElement instanceof Element ? document.activeElement : null, i = !!(n?.closest(ur) || r?.closest(ur)), a = !!(n && t.contains(n) || r && t.contains(r)), o = !!t.querySelector(".ant-select-open, .ant-dropdown-open");
1471
1343
  if (i || a && o) {
1472
- hr.add(e);
1344
+ lr.add(e);
1473
1345
  return;
1474
1346
  }
1475
- !Sr.value && (a || e.target === document) && (e.preventDefault(), e.stopPropagation(), jo());
1347
+ !Mr.value && (a || e.target === document) && (e.preventDefault(), e.stopPropagation(), To());
1476
1348
  }
1477
- function Ns(e) {
1349
+ function ws(e) {
1478
1350
  if ((e.ctrlKey || e.metaKey) && !e.altKey && e.key.toLowerCase() === "s") {
1479
- if (!Cr.value || !js(e)) return;
1480
- e.preventDefault(), di();
1351
+ if (!Nr.value || !Ss(e)) return;
1352
+ e.preventDefault(), ui();
1481
1353
  return;
1482
1354
  }
1483
1355
  if (e.key === "Escape") {
1484
- if (hr.has(e)) {
1485
- hr.delete(e);
1356
+ if (lr.has(e)) {
1357
+ lr.delete(e);
1486
1358
  return;
1487
1359
  }
1488
- let t = Sr.value, n = t || F.value;
1489
- if (!t && F.value && jo(), $(), vs(), n && e.stopPropagation(), !n) {
1490
- if (z.value) {
1491
- Cs(), e.stopPropagation();
1360
+ let t = Mr.value, n = t || P.value;
1361
+ if (!t && P.value && To(), $(), ls(), n && e.stopPropagation(), !n) {
1362
+ if (R.value) {
1363
+ ms(), e.stopPropagation();
1492
1364
  return;
1493
1365
  }
1494
- Un.value ? fo() : P.value = !1;
1366
+ Pn.value ? ao() : M.value = !1;
1495
1367
  }
1496
1368
  }
1497
1369
  }
1498
- function Ps(e, t) {
1499
- e === k.value && t.selectedContentImage && (D.value = "", O.value && Q()), e === k.value && (ws(e), xs());
1500
- let n = qn.value[e];
1501
- n && xt(n, t) || (qn.value = {
1502
- ...qn.value,
1370
+ function Ts(e, t) {
1371
+ e === D.value && t.selectedContentImage && (E.value = ""), e === D.value && (hs(e), fs());
1372
+ let n = Rn.value[e];
1373
+ n && gt(n, t) || (Rn.value = {
1374
+ ...Rn.value,
1503
1375
  [e]: t
1504
1376
  });
1505
1377
  }
1506
- function Fs(e = mr.value.rows, t = mr.value.cols) {
1378
+ function Es(e = cr.value.rows, t = cr.value.cols) {
1507
1379
  Z({
1508
1380
  type: "insert-table",
1509
1381
  options: {
1510
1382
  rows: Math.min(10, Math.max(1, Math.round(Number(e) || 3))),
1511
1383
  cols: Math.min(10, Math.max(1, Math.round(Number(t) || 3))),
1512
- withHeaderRow: !!mr.value.withHeaderRow
1384
+ withHeaderRow: !!cr.value.withHeaderRow
1513
1385
  }
1514
- }), I.value = !1, $();
1386
+ }), F.value = !1, $();
1515
1387
  }
1516
- let Is = {
1388
+ let Ds = {
1517
1389
  "delete-table-row": {
1518
1390
  label: "删除当前行",
1519
1391
  countKey: "deleteRow"
@@ -1527,34 +1399,34 @@ var Kt = {
1527
1399
  countKey: "deleteTable"
1528
1400
  }
1529
1401
  };
1530
- function Ls(e) {
1531
- let t = B.value;
1402
+ function Os(e) {
1403
+ let t = z.value;
1532
1404
  if (!t) return;
1533
1405
  let n = () => {
1534
1406
  Z(e, t.pageId), $();
1535
- }, r = Is[e.type];
1407
+ }, r = Ds[e.type];
1536
1408
  if (!r) {
1537
1409
  n();
1538
1410
  return;
1539
1411
  }
1540
1412
  let i = t.affectedVariableCounts[r.countKey];
1541
- $(), Bt.confirm({
1413
+ $(), Ft.confirm({
1542
1414
  title: r.label,
1543
1415
  content: i ? `此操作将移除 ${i} 个正文变量节点,是否继续?` : "此操作将修改表格结构,是否继续?",
1544
1416
  okText: "确认",
1545
1417
  okType: "danger",
1546
1418
  cancelText: "取消",
1547
1419
  onOk: n,
1548
- onCancel: () => M.get(t.pageId)?.focus()
1420
+ onCancel: () => A.get(t.pageId)?.focus()
1549
1421
  });
1550
1422
  }
1551
- function Rs(e) {
1552
- let t = ur.value?.getMenuElement();
1423
+ function ks(e) {
1424
+ let t = ir.value?.getMenuElement();
1553
1425
  if (!t) return;
1554
1426
  if (e.key === "Escape") {
1555
1427
  e.preventDefault(), e.stopPropagation();
1556
- let t = B.value?.pageId;
1557
- $(), M.get(t ?? "")?.focus();
1428
+ let t = z.value?.pageId;
1429
+ $(), A.get(t ?? "")?.focus();
1558
1430
  return;
1559
1431
  }
1560
1432
  let n = Array.from(t.querySelectorAll("button:not(:disabled)"));
@@ -1572,130 +1444,120 @@ var Kt = {
1572
1444
  let r = (Math.max(0, n.indexOf(document.activeElement)) + (e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 1) + n.length) % n.length;
1573
1445
  e.preventDefault(), n[r]?.focus();
1574
1446
  }
1575
- function zs(e) {
1447
+ function As(e) {
1576
1448
  if (e.key !== "Escape") return;
1577
1449
  e.preventDefault(), e.stopPropagation();
1578
- let t = R.value?.pageId;
1579
- $(), M.get(t ?? "")?.focus();
1450
+ let t = L.value?.pageId;
1451
+ $(), A.get(t ?? "")?.focus();
1580
1452
  }
1581
- function Bs(e) {
1453
+ function js(e) {
1582
1454
  if (e.key !== "Escape") return;
1583
1455
  e.preventDefault(), e.stopPropagation();
1584
- let t = V.value?.pageId;
1585
- $(), M.get(t ?? "")?.focus();
1586
- }
1587
- function Vs(e) {
1588
- Z({ type: e }), L.value = !1, $();
1589
- }
1590
- return Ze({
1591
- getValue: Mo,
1592
- setValue: No,
1593
- getFiles: Po,
1594
- setFiles: Fo,
1595
- addFile: Io,
1596
- selectFile: Lo,
1597
- renameFile: Ro,
1598
- removeFile: zo,
1599
- moveFile: Vo,
1600
- validate: Ho,
1601
- exportTemplate: Go,
1602
- exportFiles: Ko,
1603
- getSubmitData: go,
1604
- clearTemplate: So,
1605
- saveDraftCache: di,
1606
- loadDraftCache: fi,
1607
- clearDraftCache: pi,
1608
- getDraftCacheStatus: Ui,
1609
- insertVariable: Ua,
1610
- insertImage: ba,
1611
- focus: $o,
1612
- openPreview: mo,
1613
- closePreview: ho,
1614
- openSubmitDataViewer: _o,
1615
- closeSubmitDataViewer: vo,
1616
- getVariableData: yo,
1617
- openVariableDataViewer: bo,
1618
- closeVariableDataViewer: xo,
1619
- setServerValidationErrors: Zo,
1620
- clearValidationErrors: Qo,
1621
- scrollToVariable: Eo,
1622
- scrollToSigningPlacement: Do,
1623
- scrollToPage: ko,
1624
- setZoom: ro,
1625
- resetZoom: io,
1626
- getZoom: ao,
1627
- fitWidth: $a,
1628
- insertSigningPlacement: ri,
1629
- selectSigningPlacement: Q,
1630
- buildLocationRules: Jo,
1631
- buildContractLocationRules: Yo
1632
- }), (e, t) => (_(), Ot("div", {
1456
+ let t = B.value?.pageId;
1457
+ $(), A.get(t ?? "")?.focus();
1458
+ }
1459
+ function Ms(e) {
1460
+ Z({ type: e }), I.value = !1, $();
1461
+ }
1462
+ return Xe({
1463
+ getValue: Eo,
1464
+ setValue: Do,
1465
+ getFiles: Oo,
1466
+ setFiles: ko,
1467
+ addFile: Ao,
1468
+ selectFile: jo,
1469
+ renameFile: Mo,
1470
+ removeFile: No,
1471
+ moveFile: Fo,
1472
+ validate: Io,
1473
+ exportTemplate: zo,
1474
+ exportFiles: Bo,
1475
+ getSubmitData: lo,
1476
+ clearTemplate: go,
1477
+ saveDraftCache: ui,
1478
+ loadDraftCache: di,
1479
+ clearDraftCache: fi,
1480
+ getDraftCacheStatus: Bi,
1481
+ insertVariable: La,
1482
+ insertImage: ha,
1483
+ focus: Wo,
1484
+ openPreview: so,
1485
+ closePreview: co,
1486
+ openSubmitDataViewer: uo,
1487
+ closeSubmitDataViewer: fo,
1488
+ getVariableData: po,
1489
+ openVariableDataViewer: mo,
1490
+ closeVariableDataViewer: ho,
1491
+ setServerValidationErrors: Ho,
1492
+ clearValidationErrors: Uo,
1493
+ scrollToVariable: bo,
1494
+ scrollToPage: Co,
1495
+ setZoom: Za,
1496
+ resetZoom: Qa,
1497
+ getZoom: $a,
1498
+ fitWidth: qa
1499
+ }), (e, t) => (v(), St("div", {
1633
1500
  ref_key: "designerElement",
1634
- ref: ln,
1635
- class: kt(["gd-contract-template-designer", {
1501
+ ref: rn,
1502
+ class: wt(["gd-contract-template-designer", {
1636
1503
  "is-disabled": s.disabled,
1637
- "is-readonly": W.value,
1638
- "is-fullscreen": P.value,
1639
- "is-immersive": Un.value
1504
+ "is-readonly": U.value,
1505
+ "is-fullscreen": M.value,
1506
+ "is-immersive": Pn.value
1640
1507
  }]),
1641
- style: At(cn.value)
1508
+ style: Tt(nn.value),
1509
+ onKeydownCapture: t[31] ||= (...e) => b(jr) && b(jr)(...e)
1642
1510
  }, [
1643
- x.value ? (_(), Et(_t, {
1511
+ S.value ? (v(), xt(ft, {
1644
1512
  key: 0,
1645
- files: S.value,
1646
- "active-file-id": C.value,
1647
- readonly: W.value,
1648
- onSelect: Lo,
1649
- onAdd: t[0] ||= (e) => Io(),
1650
- onRename: Ro,
1651
- onRemove: Bo,
1652
- onMove: Vo
1513
+ files: C.value,
1514
+ "active-file-id": w.value,
1515
+ readonly: U.value,
1516
+ onSelect: jo,
1517
+ onAdd: t[0] ||= (e) => Ao(),
1518
+ onRename: Mo,
1519
+ onRemove: Po,
1520
+ onMove: Fo
1653
1521
  }, null, 8, [
1654
1522
  "files",
1655
1523
  "active-file-id",
1656
1524
  "readonly"
1657
- ])) : Dt("", !0),
1658
- p("div", { class: kt(["gd-contract-template-designer__layout", {
1659
- "is-sidebar-collapsed": Bn.value,
1660
- "is-inspector-collapsed": Vn.value
1525
+ ])) : p("", !0),
1526
+ m("div", { class: wt(["gd-contract-template-designer__layout", {
1527
+ "is-sidebar-collapsed": Mn.value,
1528
+ "is-inspector-collapsed": Nn.value
1661
1529
  }]) }, [
1662
- m(vt, {
1663
- collapsed: Bn.value,
1664
- pages: E.value.pages,
1665
- variables: E.value.variables,
1666
- "decoration-variable-keys": ni.value,
1667
- "signing-placement-navigation-items": Ar.value,
1668
- "active-page-id": k.value,
1669
- "selected-variable-key": D.value,
1670
- "selected-signing-placement-id": O.value,
1671
- "normalized-max-pages": ei.value,
1672
- "page-limit-reached": ti.value,
1673
- "selected-page": q.value,
1674
- "selected-page-size": Mr.value,
1675
- "normalized-page-size-options": Jr.value,
1676
- "page-size-options": Yr.value,
1677
- "selected-page-size-option-value": Xr.value,
1678
- "show-signing-placement-tools": l.showSigningPlacementTools,
1679
- readonly: W.value,
1680
- "get-page-size": Yi,
1681
- "get-page-signing-placements": Xi,
1682
- onToggle: t[1] ||= (e) => Bn.value = !Bn.value,
1683
- onAddPage: ia,
1684
- onActivatePage: Oo,
1685
- onDuplicatePage: aa,
1686
- onRemovePage: sa,
1687
- onPatchPageFormat: na,
1688
- onScrollToVariable: To,
1689
- onScrollToSigningPlacement: Do
1530
+ h(pt, {
1531
+ collapsed: Mn.value,
1532
+ pages: T.value.pages,
1533
+ variables: T.value.variables,
1534
+ "decoration-variable-keys": li.value,
1535
+ "active-page-id": D.value,
1536
+ "selected-variable-key": E.value,
1537
+ "normalized-max-pages": si.value,
1538
+ "page-limit-reached": ci.value,
1539
+ "selected-page": W.value,
1540
+ "selected-page-size": Rr.value,
1541
+ "normalized-page-size-options": ei.value,
1542
+ "page-size-options": ti.value,
1543
+ "selected-page-size-option-value": ni.value,
1544
+ readonly: U.value,
1545
+ "get-page-size": Xi,
1546
+ onToggle: t[1] ||= (e) => Mn.value = !Mn.value,
1547
+ onAddPage: $i,
1548
+ onActivatePage: xo,
1549
+ onNavigateOutline: So,
1550
+ onDuplicatePage: ea,
1551
+ onRemovePage: na,
1552
+ onPatchPageFormat: Zi,
1553
+ onScrollToVariable: yo
1690
1554
  }, null, 8, [
1691
1555
  "collapsed",
1692
1556
  "pages",
1693
1557
  "variables",
1694
1558
  "decoration-variable-keys",
1695
- "signing-placement-navigation-items",
1696
1559
  "active-page-id",
1697
1560
  "selected-variable-key",
1698
- "selected-signing-placement-id",
1699
1561
  "normalized-max-pages",
1700
1562
  "page-limit-reached",
1701
1563
  "selected-page",
@@ -1703,53 +1565,92 @@ var Kt = {
1703
1565
  "normalized-page-size-options",
1704
1566
  "page-size-options",
1705
1567
  "selected-page-size-option-value",
1706
- "show-signing-placement-tools",
1707
1568
  "readonly"
1708
1569
  ]),
1709
- p("main", {
1570
+ m("main", {
1710
1571
  ref_key: "workspaceElement",
1711
- ref: dn,
1572
+ ref: on,
1712
1573
  class: "gd-contract-template-designer__workspace"
1713
1574
  }, [
1714
- Rt(p("div", {
1715
- id: hn,
1575
+ Nt(m("div", {
1576
+ id: un,
1716
1577
  class: "gd-contract-template-designer__workspace-chrome"
1717
- }, [m(Ue, {
1578
+ }, [h(Re, {
1718
1579
  ref_key: "workspaceHeaderElement",
1719
- ref: fn,
1720
- summary: Fr.value,
1721
- "draft-cache-status-text": zr.value,
1722
- "draft-cache-status-class": Br.value,
1580
+ ref: sn,
1581
+ summary: Vr.value,
1582
+ "draft-cache-status-text": Gr.value,
1583
+ "draft-cache-status-class": Kr.value,
1723
1584
  "show-draft-cache-status": s.showDraftCacheStatus,
1724
1585
  "show-clear-button": s.showClearButton,
1725
1586
  "show-submit-data-viewer": s.showSubmitDataViewer,
1726
1587
  "show-variable-data-viewer": s.showVariableDataViewer,
1727
- readonly: W.value,
1728
- "zoom-percent": Vr.value,
1729
- "zoom-out-disabled": N.value <= Xt,
1730
- "zoom-in-disabled": N.value >= Zt,
1731
- "is-fullscreen": P.value,
1732
- immersive: Un.value,
1733
- "page-decorations-open": F.value,
1734
- "page-decorations-studio-id": mn,
1735
- "page-decorations-preset-label": Ir.value,
1736
- "page-decorations-enabled-count": Rr.value,
1737
- "page-decorations-enabled-states": Lr.value,
1738
- "chrome-controls-id": hn,
1739
- onZoomOut: so,
1740
- onZoomIn: oo,
1741
- onFitWidth: y($a),
1742
- onResetZoom: io,
1743
- onToggleFullscreen: co,
1744
- onToggleImmersive: po,
1745
- onClear: Co,
1746
- onValidate: Ho,
1747
- onPreview: mo,
1748
- onSubmitData: _o,
1749
- onVariableData: bo,
1750
- onTogglePageDecorations: Ao,
1751
- onToggleChrome: ys
1752
- }, null, 8, [
1588
+ readonly: U.value,
1589
+ "zoom-percent": qr.value,
1590
+ "zoom-out-disabled": j.value <= Gt,
1591
+ "zoom-in-disabled": j.value >= Kt,
1592
+ "is-fullscreen": M.value,
1593
+ immersive: Pn.value,
1594
+ "page-decorations-open": P.value,
1595
+ "page-decorations-studio-id": ln,
1596
+ "page-decorations-preset-label": Hr.value,
1597
+ "page-decorations-enabled-count": Wr.value,
1598
+ "page-decorations-enabled-states": Ur.value,
1599
+ "chrome-controls-id": un,
1600
+ onZoomOut: to,
1601
+ onZoomIn: eo,
1602
+ onFitWidth: b(qa),
1603
+ onResetZoom: Qa,
1604
+ onToggleFullscreen: no,
1605
+ onToggleImmersive: oo,
1606
+ onClear: _o,
1607
+ onValidate: Io,
1608
+ onPreview: so,
1609
+ onSubmitData: uo,
1610
+ onVariableData: mo,
1611
+ onTogglePageDecorations: wo,
1612
+ onToggleChrome: us
1613
+ }, {
1614
+ authoring: Mt(() => [h(Ve, {
1615
+ ref_key: "authoringBarElement",
1616
+ ref: pn,
1617
+ compact: "",
1618
+ query: b(_r),
1619
+ "onUpdate:query": t[2] ||= (e) => Ct(_r) ? _r.value = e : null,
1620
+ replacement: b(vr),
1621
+ "onUpdate:replacement": t[3] ||= (e) => Ct(vr) ? vr.value = e : null,
1622
+ "match-case": b(yr),
1623
+ "onUpdate:matchCase": t[4] ||= (e) => Ct(yr) ? yr.value = e : null,
1624
+ panel: b(gr),
1625
+ readonly: U.value,
1626
+ total: b(br).length,
1627
+ "current-index": b(xr),
1628
+ "current-page": b(Sr) ? b(Sr).pageIndex + 1 : void 0,
1629
+ feedback: b(Cr),
1630
+ onOpen: b(Tr),
1631
+ onClose: t[5] ||= (e) => b(Er)(),
1632
+ onNavigate: b(Dr),
1633
+ onReplaceCurrent: b(Or),
1634
+ onReplaceAll: b(kr),
1635
+ onInsertSnippet: b(Ar)
1636
+ }, null, 8, [
1637
+ "query",
1638
+ "replacement",
1639
+ "match-case",
1640
+ "panel",
1641
+ "readonly",
1642
+ "total",
1643
+ "current-index",
1644
+ "current-page",
1645
+ "feedback",
1646
+ "onOpen",
1647
+ "onNavigate",
1648
+ "onReplaceCurrent",
1649
+ "onReplaceAll",
1650
+ "onInsertSnippet"
1651
+ ])]),
1652
+ _: 1
1653
+ }, 8, [
1753
1654
  "summary",
1754
1655
  "draft-cache-status-text",
1755
1656
  "draft-cache-status-class",
@@ -1768,154 +1669,135 @@ var Kt = {
1768
1669
  "page-decorations-enabled-count",
1769
1670
  "page-decorations-enabled-states",
1770
1671
  "onFitWidth"
1771
- ]), m(We, {
1772
- "variable-insert-popover-open": Yn.value,
1773
- "onUpdate:variableInsertPopoverOpen": t[2] ||= (e) => Yn.value = e,
1774
- "image-insert-popover-open": Xn.value,
1775
- "onUpdate:imageInsertPopoverOpen": t[3] ||= (e) => Xn.value = e,
1776
- "image-insert-url": Zn.value,
1777
- "onUpdate:imageInsertUrl": t[4] ||= (e) => Zn.value = e,
1778
- "image-insert-width": Qn.value,
1779
- "onUpdate:imageInsertWidth": t[5] ||= (e) => Qn.value = e,
1780
- "image-insert-height": $n.value,
1781
- "onUpdate:imageInsertHeight": t[6] ||= (e) => $n.value = e,
1782
- "table-insert-popover-open": I.value,
1783
- "onUpdate:tableInsertPopoverOpen": t[7] ||= (e) => I.value = e,
1784
- "table-actions-popover-open": L.value,
1785
- "onUpdate:tableActionsPopoverOpen": t[8] ||= (e) => L.value = e,
1786
- "table-insert-draft": mr.value,
1787
- "onUpdate:tableInsertDraft": t[9] ||= (e) => mr.value = e,
1788
- "toolbar-more-open": Kn.value,
1789
- "onUpdate:toolbarMoreOpen": t[10] ||= (e) => Kn.value = e,
1790
- readonly: W.value,
1791
- "editor-state": xi.value,
1792
- "current-block-format": Si.value,
1793
- "block-format-options": Gr,
1794
- "font-family-select-options": Ur.value,
1795
- "current-editor-font-family": Ci.value,
1796
- "font-size-preset-options": Di.value,
1797
- "current-editor-font-size": wi.value,
1798
- "editor-font-size-search-value": Jn.value,
1799
- "current-editor-text-color": Ti.value,
1800
- "body-control-tool-items": $r.value,
1801
- "page-limit-reached": ti.value,
1802
- "normalized-max-pages": ei.value,
1803
- "image-processing": tr.value,
1804
- "image-insert-error": er.value,
1805
- onCommand: t[11] ||= (e) => Z(e),
1806
- onPatchBlockFormat: ts,
1807
- onPatchFontFamily: rs,
1808
- onPatchFontSize: ns,
1809
- onPatchColor: is,
1810
- onPatchTextAlign: es,
1811
- onInsertVariable: wa,
1812
- onOpenImageFile: xa,
1813
- onInsertImageUrl: Ca,
1814
- onAddPage: ia,
1815
- onInsertTable: Fs,
1816
- onTableAction: Vs,
1817
- onFontSizeSearch: os,
1818
- onFontSizeCommit: ss,
1819
- onFontSizeDropdownChange: ls,
1820
- onFontSizeKeydown: cs
1821
- }, null, 8, [
1822
- "variable-insert-popover-open",
1823
- "image-insert-popover-open",
1824
- "image-insert-url",
1825
- "image-insert-width",
1826
- "image-insert-height",
1827
- "table-insert-popover-open",
1828
- "table-actions-popover-open",
1829
- "table-insert-draft",
1830
- "toolbar-more-open",
1831
- "readonly",
1832
- "editor-state",
1833
- "current-block-format",
1834
- "font-family-select-options",
1835
- "current-editor-font-family",
1836
- "font-size-preset-options",
1837
- "current-editor-font-size",
1838
- "editor-font-size-search-value",
1839
- "current-editor-text-color",
1840
- "body-control-tool-items",
1841
- "page-limit-reached",
1842
- "normalized-max-pages",
1843
- "image-processing",
1844
- "image-insert-error"
1845
- ])], 512), [[It, !Hn.value]]),
1846
- Hn.value ? (_(), Et(y(Vt), {
1672
+ ]), h(Be, {
1673
+ "variable-insert-popover-open": Bn.value,
1674
+ "onUpdate:variableInsertPopoverOpen": t[6] ||= (e) => Bn.value = e,
1675
+ "signing-layout-popover-open": Hn.value,
1676
+ "onUpdate:signingLayoutPopoverOpen": t[7] ||= (e) => Hn.value = e,
1677
+ "signing-mark-popover-open": Un.value,
1678
+ "onUpdate:signingMarkPopoverOpen": t[8] ||= (e) => Un.value = e,
1679
+ "image-insert-popover-open": Vn.value,
1680
+ "onUpdate:imageInsertPopoverOpen": t[9] ||= (e) => Vn.value = e,
1681
+ "image-insert-url": Gn.value,
1682
+ "onUpdate:imageInsertUrl": t[10] ||= (e) => Gn.value = e,
1683
+ "image-insert-width": Kn.value,
1684
+ "onUpdate:imageInsertWidth": t[11] ||= (e) => Kn.value = e,
1685
+ "image-insert-height": qn.value,
1686
+ "onUpdate:imageInsertHeight": t[12] ||= (e) => qn.value = e,
1687
+ "table-insert-popover-open": F.value,
1688
+ "onUpdate:tableInsertPopoverOpen": t[13] ||= (e) => F.value = e,
1689
+ "table-actions-popover-open": I.value,
1690
+ "onUpdate:tableActionsPopoverOpen": t[14] ||= (e) => I.value = e,
1691
+ "table-insert-draft": cr.value,
1692
+ "onUpdate:tableInsertDraft": t[15] ||= (e) => cr.value = e,
1693
+ "toolbar-more-open": Ln.value,
1694
+ "onUpdate:toolbarMoreOpen": t[16] ||= (e) => Ln.value = e,
1695
+ readonly: U.value,
1696
+ "editor-state": q.value,
1697
+ "current-block-format": bi.value,
1698
+ "block-format-options": Zr,
1699
+ "font-family-select-options": Yr.value,
1700
+ "current-editor-font-family": xi.value,
1701
+ "font-size-preset-options": Ti.value,
1702
+ "current-editor-font-size": Si.value,
1703
+ "editor-font-size-search-value": zn.value,
1704
+ "current-editor-text-color": Ci.value,
1705
+ "body-control-tool-items": oi.value,
1706
+ "signing-layout-presets": ai.value,
1707
+ "page-limit-reached": ci.value,
1708
+ "normalized-max-pages": si.value,
1709
+ "image-processing": Yn.value,
1710
+ "image-insert-error": Jn.value,
1711
+ onCommand: t[17] ||= (e) => Z(e),
1712
+ onPatchBlockFormat: Ko,
1713
+ onPatchFontFamily: Jo,
1714
+ onPatchFontSize: qo,
1715
+ onPatchColor: Yo,
1716
+ onPatchTextAlign: Go,
1717
+ onInsertVariable: ya,
1718
+ onInsertSigningLayout: Hi,
1719
+ onInsertSigningMark: Gi,
1720
+ onOpenSigningLayoutCustom: Wi,
1721
+ onOpenImageFile: ga,
1722
+ onInsertImageUrl: va,
1723
+ onAddPage: $i,
1724
+ onInsertTable: Es,
1725
+ onTableAction: Ms,
1726
+ onFontSizeSearch: Zo,
1727
+ onFontSizeCommit: Qo,
1728
+ onFontSizeDropdownChange: es,
1729
+ onFontSizeKeydown: $o
1730
+ }, null, 8, /* @__PURE__ */ "variable-insert-popover-open.signing-layout-popover-open.signing-mark-popover-open.image-insert-popover-open.image-insert-url.image-insert-width.image-insert-height.table-insert-popover-open.table-actions-popover-open.table-insert-draft.toolbar-more-open.readonly.editor-state.current-block-format.font-family-select-options.current-editor-font-family.font-size-preset-options.current-editor-font-size.editor-font-size-search-value.current-editor-text-color.body-control-tool-items.signing-layout-presets.page-limit-reached.normalized-max-pages.image-processing.image-insert-error".split("."))], 512), [[jt, !N.value]]),
1731
+ N.value ? (v(), xt(b(It), {
1847
1732
  key: 0,
1848
1733
  title: "展开工具区"
1849
1734
  }, {
1850
- default: Lt(() => [p("button", {
1735
+ default: Mt(() => [m("button", {
1851
1736
  ref_key: "workspaceChromeHandleElement",
1852
- ref: gn,
1737
+ ref: dn,
1853
1738
  type: "button",
1854
1739
  class: "gd-contract-template-designer__workspace-chrome-handle",
1855
1740
  "aria-label": "展开工具区",
1856
1741
  "aria-expanded": !1,
1857
- "aria-controls": hn,
1858
- onClick: ys
1859
- }, [m(y(Gt), { "aria-hidden": "true" })], 512)]),
1742
+ "aria-controls": un,
1743
+ onClick: us
1744
+ }, [h(b(Bt), { "aria-hidden": "true" })], 512)]),
1860
1745
  _: 1
1861
- })) : Dt("", !0),
1862
- Un.value && !F.value ? (_(), Ot("button", {
1746
+ })) : p("", !0),
1747
+ Pn.value && !P.value ? (v(), St("button", {
1863
1748
  key: 1,
1864
1749
  ref_key: "immersiveExitElement",
1865
- ref: Wn,
1750
+ ref: Fn,
1866
1751
  type: "button",
1867
1752
  class: "gd-contract-template-designer__immersive-exit",
1868
1753
  "aria-label": "退出沉浸写作",
1869
- onClick: fo
1754
+ onClick: ao
1870
1755
  }, [
1871
- m(y(Wt), { "aria-hidden": "true" }),
1872
- t[26] ||= p("span", { class: "gd-contract-template-designer__immersive-exit-label" }, "退出沉浸", -1),
1873
- t[27] ||= p("kbd", null, "Esc", -1)
1874
- ], 512)) : Dt("", !0),
1875
- A.value ? (_(), Ot("section", Kt, [m(y(zt), {
1876
- type: Nr.value ? "success" : "error",
1877
- message: Pr.value,
1756
+ h(b(zt), { "aria-hidden": "true" }),
1757
+ t[32] ||= m("span", { class: "gd-contract-template-designer__immersive-exit-label" }, "退出沉浸", -1),
1758
+ t[33] ||= m("kbd", null, "Esc", -1)
1759
+ ], 512)) : p("", !0),
1760
+ O.value ? (v(), St("section", Vt, [h(b(Pt), {
1761
+ type: zr.value ? "success" : "error",
1762
+ message: Br.value,
1878
1763
  "show-icon": ""
1879
- }, null, 8, ["type", "message"]), j.value.length ? (_(), Ot("div", qt, [(_(!0), Ot(wt, null, Nt(j.value, (e) => (_(), Ot("button", {
1764
+ }, null, 8, ["type", "message"]), k.value.length ? (v(), St("div", Ht, [(v(!0), St(yt, null, Ot(k.value, (e) => (v(), St("button", {
1880
1765
  key: `${e.id}-${e.message}`,
1881
1766
  type: "button",
1882
1767
  class: "gd-contract-template-designer__validation-item",
1883
- onClick: (t) => Uo(e)
1884
- }, [p("span", null, Pt(e.message), 1), p("small", null, Pt(Wo(e)), 1)], 8, Jt))), 128))])) : Dt("", !0)])) : Dt("", !0),
1885
- p("div", {
1768
+ onClick: (t) => Lo(e)
1769
+ }, [m("span", null, kt(e.message), 1), m("small", null, kt(Ro(e)), 1)], 8, Ut))), 128))])) : p("", !0)])) : p("", !0),
1770
+ m("div", {
1886
1771
  ref_key: "canvasElement",
1887
- ref: un,
1772
+ ref: an,
1888
1773
  class: "gd-contract-template-designer__canvas"
1889
- }, [(_(!0), Ot(wt, null, Nt(E.value.pages, (e, n) => (_(), Et(Ve, {
1890
- key: `${C.value}:${e.id}`,
1774
+ }, [(v(!0), St(yt, null, Ot(T.value.pages, (e, n) => (v(), xt(Ie, {
1775
+ key: `${w.value}:${e.id}`,
1891
1776
  ref_for: !0,
1892
- ref: (t) => Wi(e.id, t),
1777
+ ref: (t) => Vi(e.id, t),
1893
1778
  page: e,
1894
1779
  "page-index": n,
1895
- "page-size": Yi(e),
1896
- "page-decorations": E.value.pageDecorations,
1897
- "total-pages": E.value.pages.length,
1898
- variables: E.value.variables,
1899
- "selected-variable-key": D.value,
1900
- "signing-placements": l.showSigningPlacementTools ? Xi(e.id) : [],
1901
- "selected-signing-placement-id": O.value,
1902
- active: k.value === e.id,
1780
+ "page-size": Xi(e),
1781
+ "page-decorations": T.value.pageDecorations,
1782
+ "total-pages": T.value.pages.length,
1783
+ variables: T.value.variables,
1784
+ "selected-variable-key": E.value,
1785
+ active: D.value === e.id,
1903
1786
  readonly: s.readonly,
1904
1787
  disabled: s.disabled,
1905
- zoom: N.value,
1906
- "process-image-file": ya,
1907
- onPageUpdate: Ji,
1908
- onVariableDrop: Ea,
1909
- onVariableSelect: Da,
1910
- onSigningPlacementDrop: y(ii),
1911
- onSigningPlacementSelect: Qi,
1912
- onSigningPlacementMove: y(si),
1913
- onSigningPlacementRemove: y(ui),
1914
- onEditorFocus: t[12] ||= (e) => Oo(e, !1),
1915
- onEditorStateChange: Ps,
1916
- onEditorContextMenu: _s,
1917
- onWordPaste: va,
1918
- onVariableMoveBlocked: t[13] ||= (e) => H.value = "变量只能在当前页内移动,跨页移动尚未支持。"
1788
+ zoom: j.value,
1789
+ "process-image-file": ma,
1790
+ "search-query": b(wr),
1791
+ "search-match-case": b(yr),
1792
+ "active-search-match": b(Sr)?.pageId === e.id ? b(Sr) : void 0,
1793
+ onPageUpdate: Yi,
1794
+ onVariableDrop: xa,
1795
+ onVariableSelect: Sa,
1796
+ onEditorFocus: t[18] ||= (e) => xo(e, !1),
1797
+ onEditorStateChange: Ts,
1798
+ onEditorContextMenu: cs,
1799
+ onWordPaste: pa,
1800
+ onVariableMoveBlocked: t[19] ||= (e) => V.value = "变量只能在当前页内移动,跨页移动尚未支持。"
1919
1801
  }, null, 8, [
1920
1802
  "page",
1921
1803
  "page-index",
@@ -1924,94 +1806,52 @@ var Kt = {
1924
1806
  "total-pages",
1925
1807
  "variables",
1926
1808
  "selected-variable-key",
1927
- "signing-placements",
1928
- "selected-signing-placement-id",
1929
1809
  "active",
1930
1810
  "readonly",
1931
1811
  "disabled",
1932
1812
  "zoom",
1933
- "onSigningPlacementDrop",
1934
- "onSigningPlacementMove",
1935
- "onSigningPlacementRemove"
1936
- ]))), 128))], 512),
1937
- Rt(m(bt, {
1938
- ref_key: "pageDecorationsStudioElement",
1939
- ref: pn,
1940
- id: mn,
1941
- open: F.value,
1942
- decorations: E.value.pageDecorations,
1943
- variables: E.value.variables,
1944
- "font-family-options": Ur.value,
1945
- readonly: s.readonly,
1946
- disabled: s.disabled,
1947
- "active-tab": Gn.value,
1948
- "onUpdate:activeTab": t[14] ||= (e) => Gn.value = e,
1949
- onChange: ja,
1950
- onClose: jo
1951
- }, null, 8, [
1952
- "open",
1953
- "decorations",
1954
- "variables",
1955
- "font-family-options",
1956
- "readonly",
1957
- "disabled",
1958
- "active-tab"
1959
- ]), [[It, F.value]])
1813
+ "search-query",
1814
+ "search-match-case",
1815
+ "active-search-match"
1816
+ ]))), 128))], 512)
1960
1817
  ], 512),
1961
- m(yt, {
1962
- collapsed: Vn.value,
1818
+ h(mt, {
1819
+ collapsed: Nn.value,
1963
1820
  readonly: s.readonly,
1964
1821
  disabled: s.disabled,
1965
- "show-signing-placement-tools": l.showSigningPlacementTools,
1966
- "body-control-tool-items": $r.value,
1967
- "signing-placement-tools": Zr.value,
1968
- "signing-placements": K.value,
1969
- "selected-signing-placement": kr.value,
1970
- "selected-signing-placement-page-size": jr.value,
1822
+ "body-control-tool-items": oi.value,
1971
1823
  "selected-variable": G.value,
1972
- variables: E.value.variables,
1973
- "current-variable-font-family": Ei.value,
1974
- "font-family-select-options": Ur.value,
1975
- "text-align-options": y(Wr),
1976
- "border-style-options": Kr,
1977
- "object-fit-options": qr,
1978
- "selected-variable-width-max": yi.value,
1979
- "selected-variable-height-max": bi.value,
1980
- "min-font-size": an,
1981
- "max-font-size": on,
1982
- "default-multiline-rows": y(3),
1983
- "resolve-signing-placement-type-icon": y(gt),
1984
- "signing-placement-type-labels": y(ae),
1985
- onToggle: t[15] ||= (e) => Vn.value = !Vn.value,
1986
- onVariableDragStart: Xa,
1987
- onInsertVariable: Wa,
1988
- onSigningPlacementDragStart: y(oi),
1989
- onInsertSigningPlacement: y(ai),
1990
- onPatchSigningPlacement: y(ci),
1991
- onDuplicateSigningPlacement: t[16] ||= (e) => y(li)(),
1992
- onRemoveSigningPlacement: t[17] ||= (e) => y(ui)(),
1993
- onDuplicateVariable: Ha,
1994
- onRemoveVariable: Ba,
1995
- onPatchVariable: ka,
1996
- onRenameVariable: Aa,
1997
- onPatchStyle: Fa,
1998
- onPatchMultiline: Ra,
1999
- onPatchRows: za,
2000
- onPatchFontFamily: Ia,
2001
- onPatchFontSize: La,
2002
- onPatchTextAlign: Ma,
2003
- onPatchBorderStyle: Na,
2004
- onPatchObjectFit: Pa
1824
+ variables: T.value.variables,
1825
+ "current-variable-font-family": wi.value,
1826
+ "font-family-select-options": Yr.value,
1827
+ "text-align-options": b(Xr),
1828
+ "border-style-options": Qr,
1829
+ "object-fit-options": $r,
1830
+ "selected-variable-width-max": vi.value,
1831
+ "selected-variable-height-max": yi.value,
1832
+ "min-font-size": $t,
1833
+ "max-font-size": en,
1834
+ "default-multiline-rows": b(3),
1835
+ onToggle: t[20] ||= (e) => Nn.value = !Nn.value,
1836
+ onVariableDragStart: Wa,
1837
+ onInsertVariable: Ra,
1838
+ onDuplicateVariable: Ia,
1839
+ onRemoveVariable: Pa,
1840
+ onPatchVariable: Q,
1841
+ onRenameVariable: wa,
1842
+ onPatchStyle: ka,
1843
+ onPatchMultiline: Ma,
1844
+ onPatchRows: Na,
1845
+ onPatchFontFamily: Aa,
1846
+ onPatchFontSize: ja,
1847
+ onPatchTextAlign: Ea,
1848
+ onPatchBorderStyle: Da,
1849
+ onPatchObjectFit: Oa
2005
1850
  }, null, 8, [
2006
1851
  "collapsed",
2007
1852
  "readonly",
2008
1853
  "disabled",
2009
- "show-signing-placement-tools",
2010
1854
  "body-control-tool-items",
2011
- "signing-placement-tools",
2012
- "signing-placements",
2013
- "selected-signing-placement",
2014
- "selected-signing-placement-page-size",
2015
1855
  "selected-variable",
2016
1856
  "variables",
2017
1857
  "current-variable-font-family",
@@ -2019,91 +1859,96 @@ var Kt = {
2019
1859
  "text-align-options",
2020
1860
  "selected-variable-width-max",
2021
1861
  "selected-variable-height-max",
2022
- "default-multiline-rows",
2023
- "resolve-signing-placement-type-icon",
2024
- "signing-placement-type-labels",
2025
- "onSigningPlacementDragStart",
2026
- "onInsertSigningPlacement",
2027
- "onPatchSigningPlacement"
1862
+ "default-multiline-rows"
2028
1863
  ])
2029
1864
  ], 2),
2030
- (_(), Et(Tt, { to: "body" }, [
2031
- B.value ? (_(), Et(He, {
1865
+ Nt(h(ht, {
1866
+ ref_key: "pageDecorationsStudioElement",
1867
+ ref: cn,
1868
+ id: ln,
1869
+ open: P.value,
1870
+ decorations: T.value.pageDecorations,
1871
+ variables: T.value.variables,
1872
+ "font-family-options": Yr.value,
1873
+ readonly: s.readonly,
1874
+ disabled: s.disabled,
1875
+ "active-tab": In.value,
1876
+ "onUpdate:activeTab": t[21] ||= (e) => In.value = e,
1877
+ onChange: Ta,
1878
+ onClose: To
1879
+ }, null, 8, [
1880
+ "open",
1881
+ "decorations",
1882
+ "variables",
1883
+ "font-family-options",
1884
+ "readonly",
1885
+ "disabled",
1886
+ "active-tab"
1887
+ ]), [[jt, P.value]]),
1888
+ (v(), xt(bt, { to: "body" }, [
1889
+ z.value ? (v(), xt(Le, {
2032
1890
  key: 0,
2033
1891
  ref_key: "tableContextMenuElement",
2034
- ref: ur,
2035
- capabilities: B.value.capabilities,
2036
- "active-alignment": B.value.activeAlignment,
2037
- style: At({
2038
- left: `${B.value.x}px`,
2039
- top: `${B.value.y}px`
1892
+ ref: ir,
1893
+ capabilities: z.value.capabilities,
1894
+ "active-alignment": z.value.activeAlignment,
1895
+ style: Tt({
1896
+ left: `${z.value.x}px`,
1897
+ top: `${z.value.y}px`
2040
1898
  }),
2041
- onExecute: Ls,
2042
- onKeydown: Rs
1899
+ onExecute: Os,
1900
+ onKeydown: ks
2043
1901
  }, null, 8, [
2044
1902
  "capabilities",
2045
1903
  "active-alignment",
2046
1904
  "style"
2047
- ])) : Dt("", !0),
2048
- V.value ? (_(), Et(qe, {
1905
+ ])) : p("", !0),
1906
+ B.value ? (v(), xt(Ge, {
2049
1907
  key: 1,
2050
1908
  ref_key: "imageContextMenuElement",
2051
- ref: dr,
2052
- width: fr.value,
2053
- "onUpdate:width": t[18] ||= (e) => fr.value = e,
2054
- height: pr.value,
2055
- "onUpdate:height": t[19] ||= (e) => pr.value = e,
2056
- x: V.value.x,
2057
- y: V.value.y,
2058
- readonly: W.value,
2059
- onRestore: gs,
2060
- onApply: hs,
2061
- onKeydown: Bs
1909
+ ref: ar,
1910
+ width: or.value,
1911
+ "onUpdate:width": t[22] ||= (e) => or.value = e,
1912
+ height: sr.value,
1913
+ "onUpdate:height": t[23] ||= (e) => sr.value = e,
1914
+ x: B.value.x,
1915
+ y: B.value.y,
1916
+ readonly: U.value,
1917
+ onRestore: ss,
1918
+ onApply: os,
1919
+ onKeydown: js
2062
1920
  }, null, 8, [
2063
1921
  "width",
2064
1922
  "height",
2065
1923
  "x",
2066
1924
  "y",
2067
1925
  "readonly"
2068
- ])) : Dt("", !0),
2069
- R.value ? (_(), Et(Ge, {
1926
+ ])) : p("", !0),
1927
+ L.value ? (v(), xt(Ue, {
2070
1928
  key: 2,
2071
1929
  ref_key: "textContextMenuElement",
2072
- ref: nr,
2073
- "bind-open": cr.value,
2074
- "onUpdate:bindOpen": t[20] ||= (e) => cr.value = e,
2075
- "bind-keyword": lr.value,
2076
- "onUpdate:bindKeyword": t[21] ||= (e) => lr.value = e,
2077
- x: R.value.x,
2078
- y: R.value.y,
2079
- "has-selection": R.value.hasSelection,
2080
- "editor-state": xi.value,
2081
- "font-size-preset-options": Di.value,
2082
- "current-editor-font-size": wi.value,
2083
- "editor-font-size-search-value": Jn.value,
2084
- "text-align-options": y(Wr),
2085
- "current-editor-text-color": Ti.value,
2086
- "body-control-tool-items": $r.value,
2087
- "text-menu-bindable-variables": vi.value,
2088
- "page-limit-reached": ti.value,
2089
- "table-insert-draft": mr.value,
2090
- "variables-count": E.value.variables.length,
2091
- "resolve-bind-variable-type-label": Ja,
2092
- onCommand: Gi,
2093
- onClipboard: Ki,
2094
- onOpenImage: xa,
2095
- onAddPage: Ta,
2096
- onInsertVariable: Ga,
2097
- onBindVariable: qa,
2098
- onOpenBindPanel: Ya,
2099
- onKeydown: zs,
2100
- onPatchFontSize: ns,
2101
- onPatchTextAlign: es,
2102
- onPatchColor: as,
2103
- onFontSizeSearch: os,
2104
- onFontSizeCommit: ss,
2105
- onFontSizeDropdownChange: ls,
2106
- onFontSizeKeydown: cs
1930
+ ref: Xn,
1931
+ "bind-open": nr.value,
1932
+ "onUpdate:bindOpen": t[24] ||= (e) => nr.value = e,
1933
+ "bind-keyword": rr.value,
1934
+ "onUpdate:bindKeyword": t[25] ||= (e) => rr.value = e,
1935
+ x: L.value.x,
1936
+ y: L.value.y,
1937
+ "has-selection": L.value.hasSelection,
1938
+ "editor-state": q.value,
1939
+ "current-editor-text-color": Ci.value,
1940
+ "body-control-tool-items": oi.value,
1941
+ "text-menu-bindable-variables": _i.value,
1942
+ "variables-count": T.value.variables.length,
1943
+ "resolve-bind-variable-type-label": Ha,
1944
+ onCommand: Ki,
1945
+ onClipboard: qi,
1946
+ onAddPage: ba,
1947
+ onInsertVariable: za,
1948
+ onBindVariable: Va,
1949
+ onOpenBindPanel: Ua,
1950
+ onKeydown: As,
1951
+ onPatchColor: Xo
2107
1952
  }, null, 8, [
2108
1953
  "bind-open",
2109
1954
  "bind-keyword",
@@ -2111,38 +1956,32 @@ var Kt = {
2111
1956
  "y",
2112
1957
  "has-selection",
2113
1958
  "editor-state",
2114
- "font-size-preset-options",
2115
- "current-editor-font-size",
2116
- "editor-font-size-search-value",
2117
- "text-align-options",
2118
1959
  "current-editor-text-color",
2119
1960
  "body-control-tool-items",
2120
1961
  "text-menu-bindable-variables",
2121
- "page-limit-reached",
2122
- "table-insert-draft",
2123
1962
  "variables-count"
2124
- ])) : Dt("", !0),
2125
- z.value ? (_(), Et(Ke, {
1963
+ ])) : p("", !0),
1964
+ R.value ? (v(), xt(We, {
2126
1965
  key: 3,
2127
1966
  ref_key: "textBubbleElement",
2128
- ref: rr,
2129
- x: z.value.x,
2130
- y: z.value.y,
2131
- "editor-state": xi.value,
2132
- "font-size-preset-options": Di.value,
2133
- "current-editor-font-size": wi.value,
2134
- "editor-font-size-search-value": Jn.value,
2135
- "current-editor-text-color": Ti.value,
2136
- "text-align-options": y(Wr),
1967
+ ref: Zn,
1968
+ x: R.value.x,
1969
+ y: R.value.y,
1970
+ "editor-state": q.value,
1971
+ "font-size-preset-options": Ti.value,
1972
+ "current-editor-font-size": Si.value,
1973
+ "editor-font-size-search-value": zn.value,
1974
+ "current-editor-text-color": Ci.value,
1975
+ "text-align-options": b(Xr),
2137
1976
  onCommand: Z,
2138
- onPatchFontSize: ns,
2139
- onPatchTextAlign: es,
2140
- onPatchColor: as,
2141
- onFontSizeSearch: os,
2142
- onFontSizeCommit: ss,
2143
- onFontSizeDropdownChange: ls,
2144
- onFontSizeKeydown: cs,
2145
- onMore: Os
1977
+ onPatchFontSize: qo,
1978
+ onPatchTextAlign: Go,
1979
+ onPatchColor: Xo,
1980
+ onFontSizeSearch: Zo,
1981
+ onFontSizeCommit: Qo,
1982
+ onFontSizeDropdownChange: es,
1983
+ onFontSizeKeydown: $o,
1984
+ onMore: ys
2146
1985
  }, null, 8, [
2147
1986
  "x",
2148
1987
  "y",
@@ -2152,29 +1991,29 @@ var Kt = {
2152
1991
  "editor-font-size-search-value",
2153
1992
  "current-editor-text-color",
2154
1993
  "text-align-options"
2155
- ])) : Dt("", !0)
1994
+ ])) : p("", !0)
2156
1995
  ])),
2157
- p("input", {
1996
+ m("input", {
2158
1997
  ref_key: "imageFileInputElement",
2159
- ref: _n,
1998
+ ref: fn,
2160
1999
  class: "gd-contract-template-designer__hidden-file-input",
2161
2000
  type: "file",
2162
2001
  accept: "image/png,image/jpeg,image/webp,image/gif,image/bmp",
2163
2002
  tabindex: "-1",
2164
2003
  "aria-hidden": "true",
2165
- onChange: Sa
2004
+ onChange: _a
2166
2005
  }, null, 544),
2167
- p("span", Yt, Pt(H.value), 1),
2168
- m(Je, {
2169
- open: Mn.value,
2170
- "onUpdate:open": t[22] ||= (e) => Mn.value = e,
2171
- "preview-pages": Er.value,
2172
- "preview-file-groups": Dr.value,
2173
- "preview-active-group": Or.value,
2174
- "preview-snapshot": Nn.value,
2006
+ m("span", Wt, kt(V.value), 1),
2007
+ h(Ke, {
2008
+ open: wn.value,
2009
+ "onUpdate:open": t[26] ||= (e) => wn.value = e,
2010
+ "preview-pages": Fr.value,
2011
+ "preview-file-groups": Ir.value,
2012
+ "preview-active-group": Lr.value,
2013
+ "preview-snapshot": Tn.value,
2175
2014
  "font-base-url": s.contractFontBaseUrl,
2176
- onCancel: ho,
2177
- onSelectFile: t[23] ||= (e) => Fn.value = e
2015
+ onCancel: co,
2016
+ onSelectFile: t[27] ||= (e) => Dn.value = e
2178
2017
  }, null, 8, [
2179
2018
  "open",
2180
2019
  "preview-pages",
@@ -2183,25 +2022,31 @@ var Kt = {
2183
2022
  "preview-snapshot",
2184
2023
  "font-base-url"
2185
2024
  ]),
2186
- m(Ye, {
2187
- open: In.value,
2188
- "onUpdate:open": t[24] ||= (e) => In.value = e,
2189
- json: Ln.value,
2190
- onCancel: vo
2025
+ h(qe, {
2026
+ open: On.value,
2027
+ "onUpdate:open": t[28] ||= (e) => On.value = e,
2028
+ json: kn.value,
2029
+ onCancel: fo
2191
2030
  }, null, 8, ["open", "json"]),
2192
- m(Xe, {
2193
- open: Rn.value,
2194
- "onUpdate:open": t[25] ||= (e) => Rn.value = e,
2195
- data: zn.value,
2196
- "file-name": wr.value?.name,
2197
- onCancel: xo
2031
+ h(Je, {
2032
+ open: An.value,
2033
+ "onUpdate:open": t[29] ||= (e) => An.value = e,
2034
+ data: jn.value,
2035
+ "file-name": Pr.value?.name,
2036
+ onCancel: ho
2198
2037
  }, null, 8, [
2199
2038
  "open",
2200
2039
  "data",
2201
2040
  "file-name"
2202
- ])
2203
- ], 6));
2041
+ ]),
2042
+ h(Ye, {
2043
+ open: Wn.value,
2044
+ "onUpdate:open": t[30] ||= (e) => Wn.value = e,
2045
+ disabled: U.value,
2046
+ onInsert: Ui
2047
+ }, null, 8, ["open", "disabled"])
2048
+ ], 38));
2204
2049
  }
2205
2050
  });
2206
2051
  //#endregion
2207
- export { cn as default };
2052
+ export { nn as default };