@nikoyo-spa/app-viewer 0.0.0-patch.1 → 0.0.1-patch.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/assets/{CollapseItemsForm-VDLL2LQ1.js → CollapseItemsForm-DpAlDOa3.js} +1 -1
  2. package/dist/assets/CollapseItemsForm-DpAlDOa3.js.br +0 -0
  3. package/dist/assets/CollapseItemsForm-DpAlDOa3.js.gz +0 -0
  4. package/dist/assets/CustomUploadDialog-BZA4LTeu.js +1 -0
  5. package/dist/assets/CustomUploadDialog-BZA4LTeu.js.br +0 -0
  6. package/dist/assets/CustomUploadDialog-BZA4LTeu.js.gz +0 -0
  7. package/dist/assets/{CustomUploadDialog.vue_vue_type_script_setup_true_lang-t5kHD9r0.js → CustomUploadDialog.vue_vue_type_script_setup_true_lang-Dq9ct5bM.js} +1 -1
  8. package/dist/assets/CustomUploadDialog.vue_vue_type_script_setup_true_lang-Dq9ct5bM.js.br +0 -0
  9. package/dist/assets/CustomUploadDialog.vue_vue_type_script_setup_true_lang-Dq9ct5bM.js.gz +0 -0
  10. package/dist/assets/{DynamicElFormItem.vue_vue_type_style_index_0_lang-vV5itYwG.js → DynamicElFormItem.vue_vue_type_style_index_0_lang-DDImMTjw.js} +1 -1
  11. package/dist/assets/DynamicElFormItem.vue_vue_type_style_index_0_lang-DDImMTjw.js.br +0 -0
  12. package/dist/assets/DynamicElFormItem.vue_vue_type_style_index_0_lang-DDImMTjw.js.gz +0 -0
  13. package/dist/assets/{EasyTable.vue_vue_type_script_setup_true_lang-CoFB-oEN.js → EasyTable.vue_vue_type_script_setup_true_lang-BHSCa6uy.js} +1 -1
  14. package/dist/assets/EasyTable.vue_vue_type_script_setup_true_lang-BHSCa6uy.js.br +0 -0
  15. package/dist/assets/EasyTable.vue_vue_type_script_setup_true_lang-BHSCa6uy.js.gz +0 -0
  16. package/dist/assets/{History-CHzsdkoU.js → History-BmtCHNHj.js} +1 -1
  17. package/dist/assets/History-BmtCHNHj.js.br +5 -0
  18. package/dist/assets/History-BmtCHNHj.js.gz +0 -0
  19. package/dist/assets/{History-Dir0mXUC.js → History-Ci3xlSx6.js} +1 -1
  20. package/dist/assets/History-Ci3xlSx6.js.br +5 -0
  21. package/dist/assets/History-Ci3xlSx6.js.gz +0 -0
  22. package/dist/assets/HistoryItem-Bc_d-iXx.js +1 -0
  23. package/dist/assets/HistoryItem-Bc_d-iXx.js.br +0 -0
  24. package/dist/assets/HistoryItem-Bc_d-iXx.js.gz +0 -0
  25. package/dist/assets/{HistoryItem-BqbjIW7u.js → HistoryItem-CwCKofKf.js} +1 -1
  26. package/dist/assets/HistoryItem-CwCKofKf.js.br +0 -0
  27. package/dist/assets/HistoryItem-CwCKofKf.js.gz +0 -0
  28. package/dist/assets/{HistoryItem.vue_vue_type_script_setup_true_lang-vpdsaEuH.js → HistoryItem.vue_vue_type_script_setup_true_lang-zFykhrPm.js} +1 -1
  29. package/dist/assets/HistoryItem.vue_vue_type_script_setup_true_lang-zFykhrPm.js.br +0 -0
  30. package/dist/assets/HistoryItem.vue_vue_type_script_setup_true_lang-zFykhrPm.js.gz +0 -0
  31. package/dist/assets/{documents-ClTOfMnZ.js → documents-Bxj1fRdH.js} +1 -1
  32. package/dist/assets/documents-Bxj1fRdH.js.br +0 -0
  33. package/dist/assets/documents-Bxj1fRdH.js.gz +0 -0
  34. package/dist/assets/{feedback-CC33ITwT.js → feedback-k8nq-oPJ.js} +1 -1
  35. package/dist/assets/feedback-k8nq-oPJ.js.br +0 -0
  36. package/dist/assets/feedback-k8nq-oPJ.js.gz +0 -0
  37. package/dist/assets/{fileViewer-Cax4f8OZ.js → fileViewer-C-Nr_sJB.js} +1 -1
  38. package/dist/assets/fileViewer-C-Nr_sJB.js.br +0 -0
  39. package/dist/assets/fileViewer-C-Nr_sJB.js.gz +0 -0
  40. package/dist/assets/{fileViewer-Bd6Qt7PP.js → fileViewer-CMmnnIp_.js} +1 -1
  41. package/dist/assets/fileViewer-CMmnnIp_.js.br +0 -0
  42. package/dist/assets/fileViewer-CMmnnIp_.js.gz +0 -0
  43. package/dist/assets/{finance-BuAH3cbB.js → finance-V5IMBQms.js} +1 -1
  44. package/dist/assets/finance-V5IMBQms.js.br +0 -0
  45. package/dist/assets/finance-V5IMBQms.js.gz +0 -0
  46. package/dist/assets/{index-CQuIPoUT.js → index-B4kC2uaS.js} +1 -1
  47. package/dist/assets/index-B4kC2uaS.js.br +0 -0
  48. package/dist/assets/index-B4kC2uaS.js.gz +0 -0
  49. package/dist/assets/{index-BKC7qnTH.js → index-BZc-qmNW.js} +1 -1
  50. package/dist/assets/index-BZc-qmNW.js.br +0 -0
  51. package/dist/assets/index-BZc-qmNW.js.gz +0 -0
  52. package/dist/assets/{index-CkF9ripp.js → index-BcI8vagf.js} +1 -1
  53. package/dist/assets/index-BcI8vagf.js.br +0 -0
  54. package/dist/assets/index-BcI8vagf.js.gz +0 -0
  55. package/dist/assets/{index-Bt4Nu_p2.js → index-Ce7__e8m.js} +1 -1
  56. package/dist/assets/index-Ce7__e8m.js.br +0 -0
  57. package/dist/assets/index-Ce7__e8m.js.gz +0 -0
  58. package/dist/assets/{index-DNfytKww.js → index-D-Uicrp-.js} +1 -1
  59. package/dist/assets/index-D-Uicrp-.js.br +0 -0
  60. package/dist/assets/index-D-Uicrp-.js.gz +0 -0
  61. package/dist/assets/{index-2OTSceCO.js → index-DN_a6THB.js} +1 -1
  62. package/dist/assets/index-DN_a6THB.js.br +0 -0
  63. package/dist/assets/index-DN_a6THB.js.gz +0 -0
  64. package/dist/assets/index-De6buWty.js +1 -0
  65. package/dist/assets/index-De6buWty.js.br +0 -0
  66. package/dist/assets/index-De6buWty.js.gz +0 -0
  67. package/dist/assets/{index-CIr1r4rH.js → index-Ds_w4k8F.js} +1 -1
  68. package/dist/assets/index-Ds_w4k8F.js.br +0 -0
  69. package/dist/assets/index-Ds_w4k8F.js.gz +0 -0
  70. package/dist/assets/{index-b9D1QdGt.js → index-TWrvqTLd.js} +1 -1
  71. package/dist/assets/index-TWrvqTLd.js.br +0 -0
  72. package/dist/assets/index-TWrvqTLd.js.gz +0 -0
  73. package/dist/assets/index-_yBsQiGF.js +1 -0
  74. package/dist/assets/index-_yBsQiGF.js.br +0 -0
  75. package/dist/assets/index-_yBsQiGF.js.gz +0 -0
  76. package/dist/assets/index-d7DIfkMx.js +1 -0
  77. package/dist/assets/index-d7DIfkMx.js.br +0 -0
  78. package/dist/assets/index-d7DIfkMx.js.gz +0 -0
  79. package/dist/assets/{index-pkKt5JsM.js → index-dqH0Mzv0.js} +1 -1
  80. package/dist/assets/index-dqH0Mzv0.js.br +0 -0
  81. package/dist/assets/index-dqH0Mzv0.js.gz +0 -0
  82. package/dist/assets/index.vue_vue_type_script_setup_true_lang-CtmbwIcs.js +1 -0
  83. package/dist/assets/index.vue_vue_type_script_setup_true_lang-CtmbwIcs.js.br +0 -0
  84. package/dist/assets/index.vue_vue_type_script_setup_true_lang-CtmbwIcs.js.gz +0 -0
  85. package/dist/assets/{index.vue_vue_type_script_setup_true_lang-CtfyWtlI.js → index.vue_vue_type_script_setup_true_lang-R6xjEaT0.js} +1 -1
  86. package/dist/assets/index.vue_vue_type_script_setup_true_lang-R6xjEaT0.js.br +0 -0
  87. package/dist/assets/index.vue_vue_type_script_setup_true_lang-R6xjEaT0.js.gz +0 -0
  88. package/dist/assets/main-DINM6Pr5.js +7 -0
  89. package/dist/assets/main-DINM6Pr5.js.br +0 -0
  90. package/dist/assets/main-DINM6Pr5.js.gz +0 -0
  91. package/dist/assets/{print-DZRc2VH8.js → print-DNpcuaui.js} +1 -1
  92. package/dist/assets/print-DNpcuaui.js.br +0 -0
  93. package/dist/assets/print-DNpcuaui.js.gz +0 -0
  94. package/dist/assets/{profile-DmVZXaLc.js → profile-BmqeDJ0-.js} +1 -1
  95. package/dist/assets/profile-BmqeDJ0-.js.br +0 -0
  96. package/dist/assets/profile-BmqeDJ0-.js.gz +0 -0
  97. package/dist/assets/profile-CmIan3d1.js +1 -0
  98. package/dist/assets/profile-CmIan3d1.js.br +0 -0
  99. package/dist/assets/{search-CAeHBdaV.js → search-Yx4VSWUq.js} +1 -1
  100. package/dist/assets/search-Yx4VSWUq.js.br +0 -0
  101. package/dist/assets/search-Yx4VSWUq.js.gz +0 -0
  102. package/dist/assets/{select-C5rnQwT8.js → select-BSg9yQbV.js} +1 -1
  103. package/dist/assets/select-BSg9yQbV.js.br +0 -0
  104. package/dist/assets/select-BSg9yQbV.js.gz +0 -0
  105. package/dist/assets/{streams-D4lxz1Q0.js → streams-D8W8Xx1E.js} +1 -1
  106. package/dist/assets/streams-D8W8Xx1E.js.br +2 -0
  107. package/dist/assets/streams-D8W8Xx1E.js.gz +0 -0
  108. package/dist/assets/{types-CQ4Q5CJj.js → types-BlfcZu02.js} +1 -1
  109. package/dist/assets/types-BlfcZu02.js.br +0 -0
  110. package/dist/assets/types-BlfcZu02.js.gz +0 -0
  111. package/dist/assets/{updateDocumentData-CeAbA-Qr.js → updateDocumentData-DN7q-AiK.js} +1 -1
  112. package/dist/assets/updateDocumentData-DN7q-AiK.js.br +0 -0
  113. package/dist/assets/updateDocumentData-DN7q-AiK.js.gz +0 -0
  114. package/dist/assets/{uploadDialog.vue_vue_type_script_setup_true_lang-BnhkZqcI.js → uploadDialog.vue_vue_type_script_setup_true_lang-BJ6TQX1-.js} +1 -1
  115. package/dist/assets/uploadDialog.vue_vue_type_script_setup_true_lang-BJ6TQX1-.js.br +0 -0
  116. package/dist/assets/uploadDialog.vue_vue_type_script_setup_true_lang-BJ6TQX1-.js.gz +0 -0
  117. package/dist/assets/{useWatermark-BzF0y1A9.js → useWatermark-DjIy9ff3.js} +1 -1
  118. package/dist/assets/useWatermark-DjIy9ff3.js.br +0 -0
  119. package/dist/assets/useWatermark-DjIy9ff3.js.gz +0 -0
  120. package/dist/assets/{valid-263xpzJj.js → valid-ogoxLtGq.js} +1 -1
  121. package/dist/assets/valid-ogoxLtGq.js.br +0 -0
  122. package/dist/assets/valid-ogoxLtGq.js.gz +0 -0
  123. package/dist/assets/{viewer-CWuXsy7c.js → viewer-BPijlLdi.js} +1 -1
  124. package/dist/assets/viewer-BPijlLdi.js.br +0 -0
  125. package/dist/assets/viewer-BPijlLdi.js.gz +0 -0
  126. package/dist/main.js +1 -1
  127. package/dist/main.js.br +0 -0
  128. package/dist/main.js.gz +0 -0
  129. package/package.json +16 -17
  130. package/dist/assets/CollapseItemsForm-VDLL2LQ1.js.br +0 -0
  131. package/dist/assets/CollapseItemsForm-VDLL2LQ1.js.gz +0 -0
  132. package/dist/assets/CustomUploadDialog-Cfo4u27r.js +0 -1
  133. package/dist/assets/CustomUploadDialog-Cfo4u27r.js.br +0 -0
  134. package/dist/assets/CustomUploadDialog-Cfo4u27r.js.gz +0 -0
  135. package/dist/assets/CustomUploadDialog.vue_vue_type_script_setup_true_lang-t5kHD9r0.js.br +0 -0
  136. package/dist/assets/CustomUploadDialog.vue_vue_type_script_setup_true_lang-t5kHD9r0.js.gz +0 -0
  137. package/dist/assets/DynamicElFormItem.vue_vue_type_style_index_0_lang-vV5itYwG.js.br +0 -0
  138. package/dist/assets/DynamicElFormItem.vue_vue_type_style_index_0_lang-vV5itYwG.js.gz +0 -0
  139. package/dist/assets/EasyTable.vue_vue_type_script_setup_true_lang-CoFB-oEN.js.br +0 -0
  140. package/dist/assets/EasyTable.vue_vue_type_script_setup_true_lang-CoFB-oEN.js.gz +0 -0
  141. package/dist/assets/History-CHzsdkoU.js.br +0 -2
  142. package/dist/assets/History-CHzsdkoU.js.gz +0 -0
  143. package/dist/assets/History-Dir0mXUC.js.br +0 -2
  144. package/dist/assets/History-Dir0mXUC.js.gz +0 -0
  145. package/dist/assets/HistoryItem-BqbjIW7u.js.br +0 -0
  146. package/dist/assets/HistoryItem-BqbjIW7u.js.gz +0 -0
  147. package/dist/assets/HistoryItem-BtBpM0gu.js +0 -1
  148. package/dist/assets/HistoryItem-BtBpM0gu.js.br +0 -0
  149. package/dist/assets/HistoryItem-BtBpM0gu.js.gz +0 -0
  150. package/dist/assets/HistoryItem.vue_vue_type_script_setup_true_lang-vpdsaEuH.js.br +0 -0
  151. package/dist/assets/HistoryItem.vue_vue_type_script_setup_true_lang-vpdsaEuH.js.gz +0 -0
  152. package/dist/assets/common-BKVAcTOe.js +0 -1
  153. package/dist/assets/common-BKVAcTOe.js.br +0 -0
  154. package/dist/assets/common-BKVAcTOe.js.gz +0 -0
  155. package/dist/assets/common-Cpd53P9r.js +0 -1
  156. package/dist/assets/common-Cpd53P9r.js.br +0 -0
  157. package/dist/assets/common-Cpd53P9r.js.gz +0 -0
  158. package/dist/assets/common-DBxmkCLD.js +0 -1
  159. package/dist/assets/common-DBxmkCLD.js.br +0 -0
  160. package/dist/assets/common-DBxmkCLD.js.gz +0 -0
  161. package/dist/assets/documents-ClTOfMnZ.js.br +0 -0
  162. package/dist/assets/documents-ClTOfMnZ.js.gz +0 -0
  163. package/dist/assets/feedback-CC33ITwT.js.br +0 -0
  164. package/dist/assets/feedback-CC33ITwT.js.gz +0 -0
  165. package/dist/assets/fileViewer-Bd6Qt7PP.js.br +0 -0
  166. package/dist/assets/fileViewer-Bd6Qt7PP.js.gz +0 -0
  167. package/dist/assets/fileViewer-Cax4f8OZ.js.br +0 -0
  168. package/dist/assets/fileViewer-Cax4f8OZ.js.gz +0 -0
  169. package/dist/assets/finance-BuAH3cbB.js.br +0 -0
  170. package/dist/assets/finance-BuAH3cbB.js.gz +0 -0
  171. package/dist/assets/index-2OTSceCO.js.br +0 -0
  172. package/dist/assets/index-2OTSceCO.js.gz +0 -0
  173. package/dist/assets/index-BKC7qnTH.js.br +0 -0
  174. package/dist/assets/index-BKC7qnTH.js.gz +0 -0
  175. package/dist/assets/index-Bt4Nu_p2.js.br +0 -0
  176. package/dist/assets/index-Bt4Nu_p2.js.gz +0 -0
  177. package/dist/assets/index-CIr1r4rH.js.br +0 -0
  178. package/dist/assets/index-CIr1r4rH.js.gz +0 -0
  179. package/dist/assets/index-CQuIPoUT.js.br +0 -0
  180. package/dist/assets/index-CQuIPoUT.js.gz +0 -0
  181. package/dist/assets/index-CkF9ripp.js.br +0 -0
  182. package/dist/assets/index-CkF9ripp.js.gz +0 -0
  183. package/dist/assets/index-ClQW2Brt.js +0 -1
  184. package/dist/assets/index-ClQW2Brt.js.br +0 -0
  185. package/dist/assets/index-ClQW2Brt.js.gz +0 -0
  186. package/dist/assets/index-DNfytKww.js.br +0 -0
  187. package/dist/assets/index-DNfytKww.js.gz +0 -0
  188. package/dist/assets/index-DuQFwd_F.js +0 -1
  189. package/dist/assets/index-DuQFwd_F.js.br +0 -0
  190. package/dist/assets/index-DuQFwd_F.js.gz +0 -0
  191. package/dist/assets/index-b9D1QdGt.js.br +0 -0
  192. package/dist/assets/index-b9D1QdGt.js.gz +0 -0
  193. package/dist/assets/index-pZeuezqz.js +0 -1
  194. package/dist/assets/index-pZeuezqz.js.br +0 -0
  195. package/dist/assets/index-pZeuezqz.js.gz +0 -0
  196. package/dist/assets/index-pkKt5JsM.js.br +0 -0
  197. package/dist/assets/index-pkKt5JsM.js.gz +0 -0
  198. package/dist/assets/index.vue_vue_type_script_setup_true_lang-CtfyWtlI.js.br +0 -0
  199. package/dist/assets/index.vue_vue_type_script_setup_true_lang-CtfyWtlI.js.gz +0 -0
  200. package/dist/assets/index.vue_vue_type_script_setup_true_lang-DQOtyPZG.js +0 -1
  201. package/dist/assets/index.vue_vue_type_script_setup_true_lang-DQOtyPZG.js.br +0 -0
  202. package/dist/assets/index.vue_vue_type_script_setup_true_lang-DQOtyPZG.js.gz +0 -0
  203. package/dist/assets/main-DrqZSaj0.js +0 -7
  204. package/dist/assets/main-DrqZSaj0.js.br +0 -0
  205. package/dist/assets/main-DrqZSaj0.js.gz +0 -0
  206. package/dist/assets/print-DZRc2VH8.js.br +0 -0
  207. package/dist/assets/print-DZRc2VH8.js.gz +0 -0
  208. package/dist/assets/profile-CmvWOQ43.js +0 -1
  209. package/dist/assets/profile-CmvWOQ43.js.br +0 -0
  210. package/dist/assets/profile-DmVZXaLc.js.br +0 -0
  211. package/dist/assets/profile-DmVZXaLc.js.gz +0 -0
  212. package/dist/assets/search-CAeHBdaV.js.br +0 -0
  213. package/dist/assets/search-CAeHBdaV.js.gz +0 -0
  214. package/dist/assets/select-C5rnQwT8.js.br +0 -0
  215. package/dist/assets/select-C5rnQwT8.js.gz +0 -0
  216. package/dist/assets/streams-D4lxz1Q0.js.br +0 -0
  217. package/dist/assets/streams-D4lxz1Q0.js.gz +0 -0
  218. package/dist/assets/types-CQ4Q5CJj.js.br +0 -0
  219. package/dist/assets/types-CQ4Q5CJj.js.gz +0 -0
  220. package/dist/assets/updateDocumentData-CeAbA-Qr.js.br +0 -0
  221. package/dist/assets/updateDocumentData-CeAbA-Qr.js.gz +0 -0
  222. package/dist/assets/uploadDialog.vue_vue_type_script_setup_true_lang-BnhkZqcI.js.br +0 -0
  223. package/dist/assets/uploadDialog.vue_vue_type_script_setup_true_lang-BnhkZqcI.js.gz +0 -0
  224. package/dist/assets/useWatermark-BzF0y1A9.js.br +0 -0
  225. package/dist/assets/useWatermark-BzF0y1A9.js.gz +0 -0
  226. package/dist/assets/valid-263xpzJj.js.br +0 -0
  227. package/dist/assets/valid-263xpzJj.js.gz +0 -0
  228. package/dist/assets/viewer-CWuXsy7c.js.br +0 -0
  229. package/dist/assets/viewer-CWuXsy7c.js.gz +0 -0
@@ -1 +1 @@
1
- import{defineComponent as F,renderSlot as V,ref as S,inject as H,provide as te,onMounted as Ke,unref as k,onBeforeUnmount as Mt,computed as P,toRef as ye,readonly as Ft,watch as Y,nextTick as Ce,resolveComponent as B,createBlock as K,openBlock as v,withCtx as C,createVNode as D,normalizeProps as Rt,guardReactiveProps as Lt,createElementBlock as T,normalizeClass as G,createCommentVNode as J,createSlots as at,mergeProps as de,getCurrentInstance as Oe,Fragment as ne,createElementVNode as x,withModifiers as Z,resolveDynamicComponent as ke,normalizeStyle as je,onUpdated as it,useAttrs as Pt,reactive as Ue,h as We,withDirectives as Ne,renderList as ae,vShow as Re,toDisplayString as W,markRaw as _e,resolveDirective as lt,createTextVNode as be,mergeModels as $e,useModel as dt,watchEffect as xt}from"vue";import{_ as Q,e as Ee,f as U,I as we,J as ee,K as ct,L as ut,M as Ie,N as zt,O as Be,P as z,Q as Ht,v as ce,R as jt,S as Ut,k as ft,t as pe,D as se,T as ht,U as Gt,V as pt,W as Vt,X as vt,Y as Qe,w as Ge,Z as gt,$ as qt,g as ie,a0 as Le,z as Pe,i as Te,a1 as xe,F as Se,a2 as mt,a3 as Yt,a4 as Jt,a5 as Xe,a6 as Me,a7 as Wt,a8 as Qt,a9 as Xt,p as Zt,aa as en,ab as tn,ac as nn,ad as on,ae as sn,s as rn,A as an}from"./main-DrqZSaj0.js";import{d as yt,e as ln}from"./index-CQuIPoUT.js";import{b as dn,o as cn}from"./index-BKC7qnTH.js";import{T as re,b as Ze,u as un}from"./viewer-CWuXsy7c.js";import{I as fn,w as hn,_ as pn,x as vn,u as et}from"./DynamicElFormItem.vue_vue_type_style_index_0_lang-vV5itYwG.js";import{_ as gn}from"./view-CUJgawjS.js";import{I as mn}from"./download-BZ4lW7oQ.js";import{_ as yn}from"./edit-C1MwNQ0C.js";import{A as Fe}from"./action-DIX3nF4W.js";import{useI18n as Ve}from"vue-i18n";import{_ as Ct}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Cn=F({inheritAttrs:!1});function kn(e,t,n,s,o,r){return V(e.$slots,"default")}var Nn=Q(Cn,[["render",kn],["__file","collection.vue"]]);const bn=F({name:"ElCollectionItem",inheritAttrs:!1});function _n(e,t,n,s,o,r){return V(e.$slots,"default")}var En=Q(bn,[["render",_n],["__file","collection-item.vue"]]);const kt="data-el-collection-item",wn=e=>{const t=`El${e}Collection`,n=`${t}Item`,s=Symbol(t),o=Symbol(n),r={...Nn,name:t,setup(){const i=S(),c=new Map;te(s,{itemMap:c,getItems:()=>{const l=k(i);if(!l)return[];const d=Array.from(l.querySelectorAll(`[${kt}]`));return[...c.values()].sort((h,m)=>d.indexOf(h.ref)-d.indexOf(m.ref))},collectionRef:i})}},a={...En,name:n,setup(i,{attrs:c}){const u=S(),l=H(s,void 0);te(o,{collectionItemRef:u}),Ke(()=>{const d=k(u);d&&l.itemMap.set(d,{ref:d,...c})}),Mt(()=>{const d=k(u);l.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:s,COLLECTION_ITEM_INJECTION_KEY:o,ElCollection:r,ElCollectionItem:a}},In=Ee({style:{type:U([String,Array,Object])},currentTabId:{type:U(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:U(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Tn,ElCollectionItem:Dn,COLLECTION_INJECTION_KEY:Nt,COLLECTION_ITEM_INJECTION_KEY:$n}=wn("RovingFocusGroup"),qe=Symbol("elRovingFocusGroup"),bt=Symbol("elRovingFocusGroupItem"),Sn={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Kn=(e,t)=>e,On=(e,t,n)=>{const s=we(e),o=Kn(s);return Sn[o]},An=(e,t)=>e.map((n,s)=>e[(s+t)%e.length]),tt=e=>{const{activeElement:t}=document;for(const n of e)if(n===t||(n.focus(),t!==document.activeElement))return},nt="currentTabIdChange",ot="rovingFocusGroup.entryFocus",Bn={bubbles:!1,cancelable:!0},Mn=F({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:In,emits:[nt,"entryFocus"],setup(e,{emit:t}){var n;const s=S((n=e.currentTabId||e.defaultCurrentTabId)!=null?n:null),o=S(!1),r=S(!1),a=S(),{getItems:i}=H(Nt,void 0),c=P(()=>[{outline:"none"},e.style]),u=g=>{t(nt,g)},l=()=>{o.value=!0},d=ee(g=>{var N;(N=e.onMousedown)==null||N.call(e,g)},()=>{r.value=!0}),f=ee(g=>{var N;(N=e.onFocus)==null||N.call(e,g)},g=>{const N=!k(r),{target:E,currentTarget:w}=g;if(E===w&&N&&!k(o)){const I=new Event(ot,Bn);if(w?.dispatchEvent(I),!I.defaultPrevented){const R=i().filter(b=>b.focusable),q=R.find(b=>b.active),A=R.find(b=>b.id===k(s)),y=[q,A,...R].filter(Boolean).map(b=>b.ref);tt(y)}}r.value=!1}),h=ee(g=>{var N;(N=e.onBlur)==null||N.call(e,g)},()=>{o.value=!1}),m=(...g)=>{t("entryFocus",...g)},_=g=>{const N=On(g);if(N){g.preventDefault();let w=i().filter(I=>I.focusable).map(I=>I.ref);switch(N){case"last":{w.reverse();break}case"prev":case"next":{N==="prev"&&w.reverse();const I=w.indexOf(g.currentTarget);w=e.loop?An(w,I+1):w.slice(I+1);break}}Ce(()=>{tt(w)})}};te(qe,{currentTabbedId:Ft(s),loop:ye(e,"loop"),tabIndex:P(()=>k(o)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:c,orientation:ye(e,"orientation"),dir:ye(e,"dir"),onItemFocus:u,onItemShiftTab:l,onBlur:h,onFocus:f,onMousedown:d,onKeydown:_}),Y(()=>e.currentTabId,g=>{s.value=g??null}),ct(a,ot,m)}});function Fn(e,t,n,s,o,r){return V(e.$slots,"default")}var Rn=Q(Mn,[["render",Fn],["__file","roving-focus-group-impl.vue"]]);const Ln=F({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Tn,ElRovingFocusGroupImpl:Rn}});function Pn(e,t,n,s,o,r){const a=B("el-roving-focus-group-impl"),i=B("el-focus-group-collection");return v(),K(i,null,{default:C(()=>[D(a,Rt(Lt(e.$attrs)),{default:C(()=>[V(e.$slots,"default")]),_:3},16)]),_:3})}var xn=Q(Ln,[["render",Pn],["__file","roving-focus-group.vue"]]);const zn=Ee({trigger:{...Be.trigger,type:U([String,Array])},triggerKeys:{type:U(Array),default:()=>[z.enter,z.numpadEnter,z.space,z.down]},virtualTriggering:Be.virtualTriggering,virtualRef:Be.virtualRef,effect:{...Ie.effect,default:"light"},type:{type:U(String)},placement:{type:U(String),default:"bottom"},popperOptions:{type:U(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:U([Number,String]),default:0},maxHeight:{type:U([Number,String]),default:""},popperClass:Ie.popperClass,popperStyle:Ie.popperStyle,disabled:Boolean,role:{type:String,values:zt,default:"menu"},buttonProps:{type:U(Object)},teleported:Ie.teleported,persistent:{type:Boolean,default:!0}}),_t=Ee({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ut}}),Hn=Ee({onKeydown:{type:U(Function)}}),Ae=Symbol("elDropdown"),Et="elDropdown",{ButtonGroup:jn}=pe,Un=F({name:"ElDropdown",components:{ElButton:pe,ElButtonGroup:jn,ElScrollbar:ft,ElTooltip:Ut,ElRovingFocusGroup:xn,ElOnlyChild:jt,ElIcon:ce,ArrowDown:Ht},props:zn,emits:["visible-change","click","command"],setup(e,{emit:t}){const n=Oe(),s=se("dropdown"),{t:o}=ht(),r=S(),a=S(),i=S(),c=S(),u=S(null),l=S(null),d=S(!1),f=P(()=>({maxHeight:Gt(e.maxHeight)})),h=P(()=>[s.m(I.value)]),m=P(()=>Vt(e.trigger)),_=vt().value,g=P(()=>e.id||_);function N(){var O;(O=i.value)==null||O.onClose(void 0,0)}function E(){var O;(O=i.value)==null||O.onClose()}function w(){var O;(O=i.value)==null||O.onOpen()}const I=pt();function R(...O){t("command",...O)}function q(){}function A(){const O=k(c);m.value.includes("hover")&&O?.focus({preventScroll:!0}),l.value=null}function oe(O){l.value=O}function y(){t("visible-change",!0)}function b(O){var ue;d.value=O?.type==="keydown",(ue=c.value)==null||ue.focus()}function M(){t("visible-change",!1)}return te(Ae,{contentRef:c,role:P(()=>e.role),triggerId:g,isUsingKeyboard:d,onItemEnter:q,onItemLeave:A,handleClose:E}),te(Et,{instance:n,dropdownSize:I,handleClick:N,commandHandler:R,trigger:ye(e,"trigger"),hideOnClick:ye(e,"hideOnClick")}),{t:o,ns:s,scrollbar:u,wrapStyle:f,dropdownTriggerKls:h,dropdownSize:I,triggerId:g,currentTabId:l,handleCurrentTabIdChange:oe,handlerMainButtonClick:O=>{t("click",O)},handleClose:E,handleOpen:w,handleBeforeShowTooltip:y,handleShowTooltip:b,handleBeforeHideTooltip:M,popperRef:i,contentRef:c,triggeringElementRef:r,referenceElementRef:a}}});function Gn(e,t,n,s,o,r){var a;const i=B("el-roving-focus-group"),c=B("el-scrollbar"),u=B("el-only-child"),l=B("el-tooltip"),d=B("el-button"),f=B("arrow-down"),h=B("el-icon"),m=B("el-button-group");return v(),T("div",{class:G([e.ns.b(),e.ns.is("disabled",e.disabled)])},[D(l,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"popper-style":e.popperStyle,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-arrow":e.showArrow,"show-after":e.trigger==="hover"?e.showTimeout:0,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"virtual-ref":(a=e.virtualRef)!=null?a:e.triggeringElementRef,"virtual-triggering":e.virtualTriggering||e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"","focus-on-target":"",persistent:e.persistent,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},at({content:C(()=>[D(c,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:C(()=>[D(i,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange},{default:C(()=>[V(e.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:C(()=>[D(u,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:C(()=>[V(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","persistent","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(v(),K(m,{key:0},{default:C(()=>[D(d,de({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:C(()=>[V(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),D(d,de({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:C(()=>[D(h,{class:G(e.ns.e("icon"))},{default:C(()=>[D(f)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):J("v-if",!0)],2)}var Vn=Q(Un,[["render",Gn],["__file","dropdown.vue"]]);const qn=F({components:{ElRovingFocusCollectionItem:Dn},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:n,onItemFocus:s,onItemShiftTab:o,onKeydown:r}=H(qe,void 0),a=vt(),i=S(),c=ee(f=>{t("mousedown",f)},f=>{e.focusable?s(k(a)):f.preventDefault()}),u=ee(f=>{t("focus",f)},()=>{s(k(a))}),l=ee(f=>{t("keydown",f)},f=>{const{shiftKey:h,target:m,currentTarget:_}=f;if(we(f)===z.tab&&h){o();return}m===_&&r(f)}),d=P(()=>n.value===k(a));return te(bt,{rovingFocusGroupItemRef:i,tabIndex:P(()=>k(d)?0:-1),handleMousedown:c,handleFocus:u,handleKeydown:l}),{id:a,handleKeydown:l,handleFocus:u,handleMousedown:c}}});function Yn(e,t,n,s,o,r){const a=B("el-roving-focus-collection-item");return v(),K(a,{id:e.id,focusable:e.focusable,active:e.active},{default:C(()=>[V(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var Jn=Q(qn,[["render",Yn],["__file","roving-focus-item.vue"]]);const Wn=F({name:"DropdownItemImpl",components:{ElIcon:ce},props:_t,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const n=se("dropdown"),{role:s}=H(Ae,void 0),{collectionItemRef:o}=H($n,void 0),{rovingFocusGroupItemRef:r,tabIndex:a,handleFocus:i,handleKeydown:c,handleMousedown:u}=H(bt,void 0),l=yt(o,r),d=P(()=>s.value==="menu"?"menuitem":s.value==="navigation"?"link":"button"),f=ee(h=>{const m=we(h);if([z.enter,z.numpadEnter,z.space].includes(m))return h.preventDefault(),h.stopImmediatePropagation(),t("clickimpl",h),!0},c);return{ns:n,itemRef:l,dataset:{[kt]:""},role:d,tabIndex:a,handleFocus:i,handleKeydown:f,handleMousedown:u}}});function Qn(e,t,n,s,o,r){const a=B("el-icon");return v(),T(ne,null,[e.divided?(v(),T("li",{key:0,role:"separator",class:G(e.ns.bem("menu","item","divided"))},null,2)):J("v-if",!0),x("li",de({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:i=>e.$emit("clickimpl",i),onFocus:e.handleFocus,onKeydown:Z(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:i=>e.$emit("pointermove",i),onPointerleave:i=>e.$emit("pointerleave",i)}),[e.icon?(v(),K(a,{key:0},{default:C(()=>[(v(),K(ke(e.icon)))]),_:1})):J("v-if",!0),V(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var Xn=Q(Wn,[["render",Qn],["__file","dropdown-item-impl.vue"]]);const wt=()=>{const e=H(Et,{}),t=P(()=>e?.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},Zn=F({name:"ElDropdownItem",components:{ElRovingFocusItem:Jn,ElDropdownItemImpl:Xn},inheritAttrs:!1,props:_t,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:n}){const{elDropdown:s}=wt(),o=Oe(),{onItemEnter:r,onItemLeave:a}=H(Ae,void 0),i=ee(d=>(t("pointermove",d),d.defaultPrevented),Qe(d=>{if(e.disabled){a(d);return}const f=d.currentTarget;f===document.activeElement||f.contains(document.activeElement)||(r(d),d.defaultPrevented||f?.focus({preventScroll:!0}))})),c=ee(d=>(t("pointerleave",d),d.defaultPrevented),Qe(a)),u=ee(d=>{if(!e.disabled)return t("click",d),d.type!=="keydown"&&d.defaultPrevented},d=>{var f,h,m;if(e.disabled){d.stopImmediatePropagation();return}(f=s?.hideOnClick)!=null&&f.value&&((h=s.handleClick)==null||h.call(s)),(m=s.commandHandler)==null||m.call(s,e.command,o,d)}),l=P(()=>({...e,...n}));return{handleClick:u,handlePointerMove:i,handlePointerLeave:c,propsAndAttrs:l}}});function eo(e,t,n,s,o,r){const a=B("el-dropdown-item-impl"),i=B("el-roving-focus-item");return v(),K(i,{focusable:!e.disabled},{default:C(()=>[D(a,de(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:C(()=>[V(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var It=Q(Zn,[["render",eo],["__file","dropdown-item.vue"]]);const to=F({name:"ElDropdownMenu",props:Hn,setup(e){const t=se("dropdown"),{_elDropdownSize:n}=wt(),s=n.value,{contentRef:o,role:r,triggerId:a,isUsingKeyboard:i,handleClose:c}=H(Ae,void 0),{rovingFocusGroupRef:u,rovingFocusGroupRootStyle:l,onBlur:d,onFocus:f,onKeydown:h,onMousedown:m}=H(qe,void 0),{collectionRef:_}=H(Nt,void 0),g=P(()=>[t.b("menu"),t.bm("menu",s?.value)]),N=yt(o,u,_),E=ee(I=>{var R;(R=e.onKeydown)==null||R.call(e,I)},I=>{const{currentTarget:R,target:q}=I,A=we(I);if(R.contains(q),z.tab===A)return c();h(I)});function w(I){i.value&&f(I)}return{size:s,rovingFocusGroupRootStyle:l,dropdownKls:g,role:r,triggerId:a,dropdownListWrapperRef:N,handleKeydown:E,onBlur:d,handleFocus:w,onMousedown:m}}});function no(e,t,n,s,o,r){return v(),T("ul",{ref:e.dropdownListWrapperRef,class:G(e.dropdownKls),style:je(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onFocusin:e.handleFocus,onFocusout:e.onBlur,onKeydown:Z(e.handleKeydown,["self"]),onMousedown:Z(e.onMousedown,["self"])},[V(e.$slots,"default")],46,["role","aria-labelledby","onFocusin","onFocusout","onKeydown","onMousedown"])}var Tt=Q(to,[["render",no],["__file","dropdown-menu.vue"]]);const oo=Ge(Vn,{DropdownItem:It,DropdownMenu:Tt}),so=gt(It),ro=gt(Tt),ao=Ee({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:qt,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),io=F({name:"ElText"}),lo=F({...io,props:ao,setup(e){const t=e,n=S(),s=pt(),o=se("text"),r=P(()=>[o.b(),o.m(t.type),o.m(s.value),o.is("truncated",t.truncated),o.is("line-clamp",!ie(t.lineClamp))]),a=()=>{var i,c,u,l,d,f,h;if(Pt().title)return;let _=!1;const g=((i=n.value)==null?void 0:i.textContent)||"";if(t.truncated){const N=(c=n.value)==null?void 0:c.offsetWidth,E=(u=n.value)==null?void 0:u.scrollWidth;N&&E&&E>N&&(_=!0)}else if(!ie(t.lineClamp)){const N=(l=n.value)==null?void 0:l.offsetHeight,E=(d=n.value)==null?void 0:d.scrollHeight;N&&E&&E>N&&(_=!0)}_?(f=n.value)==null||f.setAttribute("title",g):(h=n.value)==null||h.removeAttribute("title")};return Ke(a),it(a),(i,c)=>(v(),K(ke(i.tag),{ref_key:"textRef",ref:n,class:G(k(r)),style:je({"-webkit-line-clamp":i.lineClamp})},{default:C(()=>[V(i.$slots,"default")]),_:3},8,["class","style"]))}});var co=Q(lo,[["__file","text.vue"]]);const uo=Ge(co),he="$treeNodeId",st=function(e,t){!t||t[he]||Object.defineProperty(t,he,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},Ye=(e,t)=>t?.[e||he],ze=(e,t,n)=>{const s=e.value.currentNode;n();const o=e.value.currentNode;s!==o&&t("current-change",o?o.data:null,o)},Dt=e=>{let t=!0,n=!0,s=!0,o=!0;for(let r=0,a=e.length;r<a;r++){const i=e[r];(i.checked!==!0||i.indeterminate)&&(t=!1,i.disabled||(s=!1)),(i.checked!==!1||i.indeterminate)&&(n=!1),i.isEffectivelyChecked||(o=!1)}return{all:t,none:n,allWithoutDisable:s,half:!t&&!n,isEffectivelyChecked:o}},me=function(e){if(e.childNodes.length===0||e.loading){e.isEffectivelyChecked=e.disabled||e.checked;return}const{all:t,none:n,half:s,isEffectivelyChecked:o}=Dt(e.childNodes);e.isEffectivelyChecked=o,t?(e.checked=!0,e.indeterminate=!1):s?(e.checked=!1,e.indeterminate=!0):n&&(e.checked=!1,e.indeterminate=!1);const r=e.parent;!r||r.level===0||e.store.checkStrictly||me(r)},De=function(e,t){const n=e.store.props,s=e.data||{},o=n[t];if(Se(o))return o(s,e);if(mt(o))return s[o];if(ie(o)){const r=s[t];return ie(r)?"":r}},He=function(e,t){e.forEach(n=>{n.canFocus=t,He(n.childNodes,t)})};let fo=0;class le{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=fo++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)Le(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var t;const n=this.store;if(!n)throw new Error("[Node]store is required!");n.registerNode(this);const s=n.props;if(s&&typeof s.isLeaf<"u"){const a=De(this,"isLeaf");Pe(a)&&(this.isLeafByUser=a)}if(n.lazy!==!0&&this.data?(this.setData(this.data),n.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&n.lazy&&n.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Te(this.data)||st(this,this.data),!this.data)return;const o=n.defaultExpandedKeys,r=n.key;r&&!xe(this.key)&&o&&o.includes(this.key)&&this.expand(null,n.autoExpandParent),r&&n.currentNodeKey!==void 0&&this.key===n.currentNodeKey&&(n.currentNode&&(n.currentNode.isCurrent=!1),n.currentNode=this,n.currentNode.isCurrent=!0),n.lazy&&n._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((t=this.parent)==null?void 0:t.expanded)===!0)&&(this.canFocus=!0)}setData(t){Te(t)||st(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&Te(this.data)?n=this.data:n=De(this,"children")||[];for(let s=0,o=n.length;s<o;s++)this.insertChild({data:n[s]})}get label(){return De(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return De(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(s=>s===t||n&&s.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,s){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof le)){if(!s){const o=this.getChildren(!0);o?.includes(t.data)||(ie(n)||n<0?o?.push(t.data):o?.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Ue(new le(t)),t instanceof le&&t.initialize()}t.level=this.level+1,ie(n)||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let s;n&&(s=this.childNodes.indexOf(n)),this.insertChild(t,s)}insertAfter(t,n){let s;n&&(s=this.childNodes.indexOf(n),s!==-1&&(s+=1)),this.insertChild(t,s)}removeChild(t){const n=this.getChildren()||[],s=n.indexOf(t.data);s>-1&&n.splice(s,1);const o=this.childNodes.indexOf(t);o>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(o,1)),this.updateLeafState()}removeChildByData(t){const n=this.childNodes.find(s=>s.data===t);n&&this.removeChild(n)}expand(t,n){const s=()=>{if(n){let o=this.parent;for(;o&&o.level>0;)o.expanded=!0,o=o.parent}this.expanded=!0,t&&t(),He(this.childNodes,!0)};this.shouldLoadData()?this.loadData(o=>{Te(o)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||me(this),s())}):s()}doCreateChildren(t,n={}){t.forEach(s=>{this.insertChild(Object.assign({data:s},n),void 0,!0)})}collapse(){this.expanded=!1,He(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(t,n,s,o){if(this.indeterminate=t==="half",this.checked=t===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const a=()=>{if(n){const i=this.childNodes;for(let d=0,f=i.length;d<f;d++){const h=i[d];o=o||t!==!1;const m=h.disabled&&h.isLeaf?h.checked:o;h.setChecked(m,n,!0,o)}const{half:c,all:u,isEffectivelyChecked:l}=Dt(i);u||(this.checked=u,this.indeterminate=c),this.isEffectivelyChecked=this.childNodes.length?l:this.disabled||this.checked}};if(this.shouldLoadData()){this.loadData(()=>{a(),me(this)},{checked:t!==!1});return}else a()}const r=this.parent;!r||r.level===0||s||me(r)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const s=this.store.props;let o="children";return s&&(o=s.children||"children"),ie(n[o])&&(n[o]=null),t&&!n[o]&&(n[o]=[]),n[o]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(r=>r.data),s={},o=[];t.forEach((r,a)=>{const i=r[he];!!i&&n.some(u=>u?.[he]===i)?s[i]={index:a,data:r}:o.push({index:a,data:r})}),this.store.lazy||n.forEach(r=>{s[r?.[he]]||this.removeChildByData(r)}),o.forEach(({index:r,data:a})=>{this.insertChild({data:a},r)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const s=r=>{this.childNodes=[],this.doCreateChildren(r,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,r)},o=()=>{this.loading=!1};this.store.load(this,s,o)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const s=n.shift();n.unshift(...s.childNodes),t(s)}}reInitChecked(){this.store.checkStrictly||me(this)}}class ho{constructor(t){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const n in t)Le(t,n)&&(this[n]=t[n]);this.nodesMap={}}initialize(){if(this.root=new le({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()},Yt)}else this._initDefaultCheckedNodes()}filter(t){const n=this.filterNodeMethod,s=this.lazy,o=async function(r){const a=r.root?r.root.childNodes:r.childNodes;for(const[i,c]of a.entries())c.visible=!!n?.call(c,t,c.data,c),i%80===0&&i>0&&await Ce(),await o(c);if(!r.visible&&a.length){let i=!0;i=!a.some(c=>c.visible),r.root?r.root.visible=i===!1:r.visible=i===!1}t&&r.visible&&!r.isLeaf&&(!s||r.loaded)&&r.expand()};o(this)}setData(t){t!==this.root.data?(this.nodesMap={},this.root.setData(t),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(t){if(t instanceof le)return t;const n=Jt(t)?Ye(this.key,t):t;return this.nodesMap[n]||null}insertBefore(t,n){var s;const o=this.getNode(n);(s=o.parent)==null||s.insertBefore({data:t},o)}insertAfter(t,n){var s;const o=this.getNode(n);(s=o.parent)==null||s.insertAfter({data:t},o)}remove(t){const n=this.getNode(t);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(t,n){const s=Xe(n)?this.root:this.getNode(n);s&&s.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(s=>{const o=n[s];o&&o.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){const n=this.defaultCheckedKeys||[];!xe(t.key)&&n.includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const n=this.key;if(!(!t||!t.data))if(!n)this.nodesMap[t.id]=t;else{const s=t.key;xe(s)||(this.nodesMap[s]=t)}}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(s=>{this.deregisterNode(s)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,n=!1){const s=[],o=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(i=>{(i.checked||n&&i.indeterminate)&&(!t||t&&i.isLeaf)&&s.push(i.data),o(i)})};return o(this),s}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const t=[],n=function(s){(s.root?s.root.childNodes:s.childNodes).forEach(r=>{r.indeterminate&&t.push(r.data),n(r)})};return n(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],n=this.nodesMap;for(const s in n)Le(n,s)&&t.push(n[s]);return t}updateChildren(t,n){const s=this.nodesMap[t];if(!s)return;const o=s.childNodes;for(let r=o.length-1;r>=0;r--){const a=o[r];this.remove(a.data)}for(let r=0,a=n.length;r<a;r++){const i=n[r];this.append(i,s.data)}}_setCheckedKeys(t,n=!1,s){const o=this._getAllNodes().sort((c,u)=>c.level-u.level),r=Object.create(null),a=Object.keys(s);o.forEach(c=>c.setChecked(!1,!1));const i=c=>{c.childNodes.forEach(u=>{var l;r[u.data[t]]=!0,(l=u.childNodes)!=null&&l.length&&i(u)})};for(let c=0,u=o.length;c<u;c++){const l=o[c],d=l.data[t].toString();if(!a.includes(d)){l.checked&&!r[d]&&l.setChecked(!1,!1);continue}if(l.childNodes.length&&i(l),l.isLeaf||this.checkStrictly){l.setChecked(!0,!1);continue}if(l.setChecked(!0,!0),n){l.setChecked(!1,!1);const h=function(m){m.childNodes.forEach(g=>{g.isLeaf||g.setChecked(!1,!1),h(g)})};h(l)}}}setCheckedNodes(t,n=!1){const s=this.key,o={};t.forEach(r=>{o[(r||{})[s]]=!0}),this._setCheckedKeys(s,n,o)}setCheckedKeys(t,n=!1){this.defaultCheckedKeys=t;const s=this.key,o={};t.forEach(r=>{o[r]=!0}),this._setCheckedKeys(s,n,o)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(n=>{const s=this.getNode(n);s&&s.expand(null,this.autoExpandParent)})}setChecked(t,n,s){const o=this.getNode(t);o&&o.setChecked(!!n,s)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,n=!0){var s;const o=t[this.key],r=this.nodesMap[o];this.setCurrentNode(r),n&&this.currentNode&&this.currentNode.level>1&&((s=this.currentNode.parent)==null||s.expand(null,!0))}setCurrentNodeKey(t,n=!0){var s;if(this.currentNodeKey=t,Xe(t)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const o=this.getNode(t);o&&(this.setCurrentNode(o),n&&this.currentNode&&this.currentNode.level>1&&((s=this.currentNode.parent)==null||s.expand(null,!0)))}}const Je="RootTree",$t="NodeInstance",rt="TreeNodeMap",po=F({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=se("tree"),n=H($t),s=H(Je);return()=>{const o=e.node,{data:r,store:a}=o;return e.renderContent?e.renderContent(We,{_self:n,node:o,data:r,store:a}):V(s.ctx.slots,"default",{node:o,data:r},()=>[We(uo,{tag:"span",truncated:!0,class:t.be("node","label")},()=>[o.label])])}}});var vo=Q(po,[["__file","tree-node-content.vue"]]);function St(e){const t=H(rt,null),n={treeNodeExpand:s=>{var o;e.node!==s&&((o=e.node)==null||o.collapse())},children:[]};return t&&t.children.push(n),te(rt,n),{broadcastExpanded:s=>{if(e.accordion)for(const o of n.children)o.treeNodeExpand(s)}}}const Kt=Symbol("dragEvents");function go({props:e,ctx:t,el$:n,dropIndicator$:s,store:o}){const r=se("tree"),a=S({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return te(Kt,{treeNodeDragStart:({event:l,treeNode:d})=>{if(l.dataTransfer){if(Se(e.allowDrag)&&!e.allowDrag(d.node))return l.preventDefault(),!1;l.dataTransfer.effectAllowed="move";try{l.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=d,t.emit("node-drag-start",d.node,l)}},treeNodeDragOver:({event:l,treeNode:d})=>{if(!l.dataTransfer)return;const f=d,h=a.value.dropNode;h&&h.node.id!==f.node.id&&Me(h.$el,r.is("drop-inner"));const m=a.value.draggingNode;if(!m||!f)return;let _=!0,g=!0,N=!0,E=!0;Se(e.allowDrop)&&(_=e.allowDrop(m.node,f.node,"prev"),E=g=e.allowDrop(m.node,f.node,"inner"),N=e.allowDrop(m.node,f.node,"next")),l.dataTransfer.dropEffect=g||_||N?"move":"none",(_||g||N)&&h?.node.id!==f.node.id&&(h&&t.emit("node-drag-leave",m.node,h.node,l),t.emit("node-drag-enter",m.node,f.node,l)),_||g||N?a.value.dropNode=f:a.value.dropNode=null,f.node.nextSibling===m.node&&(N=!1),f.node.previousSibling===m.node&&(_=!1),f.node.contains(m.node,!1)&&(g=!1),(m.node===f.node||m.node.contains(f.node))&&(_=!1,g=!1,N=!1);const w=f.$el,I=w.querySelector(`.${r.be("node","content")}`).getBoundingClientRect(),R=n.value.getBoundingClientRect(),q=n.value.scrollTop;let A;const oe=_?g?.25:N?.45:1:Number.NEGATIVE_INFINITY,y=N?g?.75:_?.55:0:Number.POSITIVE_INFINITY;let b=-9999;const M=l.clientY-I.top;M<I.height*oe?A="before":M>I.height*y?A="after":g?A="inner":A="none";const L=w.querySelector(`.${r.be("node","expand-icon")}`).getBoundingClientRect(),O=s.value;A==="before"?b=L.top-R.top+q:A==="after"&&(b=L.bottom-R.top+q),O.style.top=`${b}px`,O.style.left=`${L.right-R.left}px`,A==="inner"?Wt(w,r.is("drop-inner")):Me(w,r.is("drop-inner")),a.value.showDropIndicator=A==="before"||A==="after",a.value.allowDrop=a.value.showDropIndicator||E,a.value.dropType=A,t.emit("node-drag-over",m.node,f.node,l)},treeNodeDragEnd:l=>{var d,f;const{draggingNode:h,dropType:m,dropNode:_}=a.value;if(l.preventDefault(),l.dataTransfer&&(l.dataTransfer.dropEffect="move"),h?.node.data&&_){const g={data:h.node.data};m!=="none"&&h.node.remove(),m==="before"?(d=_.node.parent)==null||d.insertBefore(g,_.node):m==="after"?(f=_.node.parent)==null||f.insertAfter(g,_.node):m==="inner"&&_.node.insertChild(g),m!=="none"&&(o.value.registerNode(g),o.value.key&&h.node.eachNode(N=>{var E;(E=o.value.nodesMap[N.data[o.value.key]])==null||E.setChecked(N.checked,!o.value.checkStrictly)})),Me(_.$el,r.is("drop-inner")),t.emit("node-drag-end",h.node,_.node,m,l),m!=="none"&&t.emit("node-drop",h.node,_.node,m,l)}h&&!_&&t.emit("node-drag-end",h.node,null,m,l),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const mo=F({name:"ElTreeNode",components:{ElCollapseTransition:ln,ElCheckbox:dn,NodeContent:vo,ElIcon:ce,Loading:Qt},props:{node:{type:le,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(e,t){const n=se("tree"),{broadcastExpanded:s}=St(e),o=H(Je),r=S(!1),a=S(!1),i=S(),c=S(),u=S(),l=H(Kt),d=Oe();te($t,d),e.node.expanded&&(r.value=!0,a.value=!0);const f=o.props.props.children||"children";Y(()=>{var y;const b=(y=e.node.data)==null?void 0:y[f];return b&&[...b]},()=>{e.node.updateChildren()}),Y(()=>e.node.indeterminate,y=>{_(e.node.checked,y)}),Y(()=>e.node.checked,y=>{_(y,e.node.indeterminate)}),Y(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),Y(()=>e.node.expanded,y=>{Ce(()=>r.value=y),y&&(a.value=!0)});const h=y=>Ye(o.props.nodeKey,y.data),m=y=>{const b=e.props.class;if(!b)return{};let M;if(Se(b)){const{data:L}=y;M=b(L,y)}else M=b;return mt(M)?{[M]:!0}:M},_=(y,b)=>{(i.value!==y||c.value!==b)&&o.ctx.emit("check-change",e.node.data,y,b),i.value=y,c.value=b},g=y=>{ze(o.store,o.ctx.emit,()=>{var b;if((b=o?.props)==null?void 0:b.nodeKey){const L=h(e.node);o.store.value.setCurrentNodeKey(L)}else o.store.value.setCurrentNode(e.node)}),o.currentNode.value=e.node,o.props.expandOnClickNode&&E(),(o.props.checkOnClickNode||e.node.isLeaf&&o.props.checkOnClickLeaf&&e.showCheckbox)&&!e.node.disabled&&w(!e.node.checked),o.ctx.emit("node-click",e.node.data,e.node,d,y)},N=y=>{var b;(b=o.instance.vnode.props)!=null&&b.onNodeContextmenu&&(y.stopPropagation(),y.preventDefault()),o.ctx.emit("node-contextmenu",y,e.node.data,e.node,d)},E=()=>{e.node.isLeaf||(r.value?(o.ctx.emit("node-collapse",e.node.data,e.node,d),e.node.collapse()):e.node.expand(()=>{t.emit("node-expand",e.node.data,e.node,d)}))},w=y=>{const b=o?.props.checkStrictly,M=e.node.childNodes;!b&&M.length&&(y=M.some(L=>!L.isEffectivelyChecked)),e.node.setChecked(y,!b),Ce(()=>{const L=o.store.value;o.ctx.emit("check",e.node.data,{checkedNodes:L.getCheckedNodes(),checkedKeys:L.getCheckedKeys(),halfCheckedNodes:L.getHalfCheckedNodes(),halfCheckedKeys:L.getHalfCheckedKeys()})})};return{ns:n,node$:u,tree:o,expanded:r,childNodeRendered:a,oldChecked:i,oldIndeterminate:c,getNodeKey:h,getNodeClass:m,handleSelectChange:_,handleClick:g,handleContextMenu:N,handleExpandIconClick:E,handleCheckChange:w,handleChildNodeExpand:(y,b,M)=>{s(b),o.ctx.emit("node-expand",y,b,M)},handleDragStart:y=>{o.props.draggable&&l.treeNodeDragStart({event:y,treeNode:e})},handleDragOver:y=>{y.preventDefault(),o.props.draggable&&l.treeNodeDragOver({event:y,treeNode:{$el:u.value,node:e.node}})},handleDrop:y=>{y.preventDefault()},handleDragEnd:y=>{o.props.draggable&&l.treeNodeDragEnd(y)},CaretRight:Xt}}});function yo(e,t,n,s,o,r){const a=B("el-icon"),i=B("el-checkbox"),c=B("loading"),u=B("node-content"),l=B("el-tree-node"),d=B("el-collapse-transition");return Ne((v(),T("div",{ref:"node$",class:G([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:Z(e.handleClick,["stop"]),onContextmenu:e.handleContextMenu,onDragstart:Z(e.handleDragStart,["stop"]),onDragover:Z(e.handleDragOver,["stop"]),onDragend:Z(e.handleDragEnd,["stop"]),onDrop:Z(e.handleDrop,["stop"])},[x("div",{class:G(e.ns.be("node","content")),style:je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(v(),K(a,{key:0,class:G([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Z(e.handleExpandIconClick,["stop"])},{default:C(()=>[(v(),K(ke(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):J("v-if",!0),e.showCheckbox?(v(),K(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:Z(()=>{},["stop"]),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):J("v-if",!0),e.node.loading?(v(),K(a,{key:2,class:G([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:C(()=>[D(c)]),_:1},8,["class"])):J("v-if",!0),D(u,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),D(d,null,{default:C(()=>[!e.renderAfterExpand||e.childNodeRendered?Ne((v(),T("div",{key:0,class:G(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:Z(()=>{},["stop"])},[(v(!0),T(ne,null,ae(e.node.childNodes,f=>(v(),K(l,{key:e.getNodeKey(f),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:f,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded","onClick"])),[[Re,e.expanded]]):J("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[Re,e.node.visible]])}var Co=Q(mo,[["render",yo],["__file","tree-node.vue"]]);function ko({el$:e},t){const n=se("tree");Ke(()=>{r()}),it(()=>{Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(i=>{i.setAttribute("tabindex","-1")})});function s(a,i){var c,u;const l=t.value.getNode(a[i].dataset.key);return l.canFocus&&l.visible&&(((c=l.parent)==null?void 0:c.expanded)||((u=l.parent)==null?void 0:u.level)===0)}ct(e,"keydown",a=>{const i=a.target;if(!i.className.includes(n.b("node")))return;const c=we(a),u=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),l=u.indexOf(i);let d;if([z.up,z.down].includes(c)){if(a.preventDefault(),c===z.up){d=l===-1?0:l!==0?l-1:u.length-1;const h=d;for(;!s(u,d);){if(d--,d===h){d=-1;break}d<0&&(d=u.length-1)}}else{d=l===-1?0:l<u.length-1?l+1:0;const h=d;for(;!s(u,d);){if(d++,d===h){d=-1;break}d>=u.length&&(d=0)}}d!==-1&&u[d].focus()}[z.left,z.right].includes(c)&&(a.preventDefault(),i.click());const f=i.querySelector('[type="checkbox"]');[z.enter,z.numpadEnter,z.space].includes(c)&&f&&(a.preventDefault(),f.click())});const r=()=>{var a;if(!e.value)return;const i=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(l=>{l.setAttribute("tabindex","-1")});const u=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(a=i[0])==null||a.setAttribute("tabindex","0")}}const No={"check-change":(e,t,n)=>e&&Pe(t)&&Pe(n),"current-change":(e,t)=>!0,"node-click":(e,t,n,s)=>e&&t&&s instanceof Event,"node-contextmenu":(e,t,n,s)=>e instanceof Event&&t&&n,"node-collapse":(e,t,n)=>e&&t,"node-expand":(e,t,n)=>e&&t,check:(e,t)=>e&&t,"node-drag-start":(e,t)=>e&&t,"node-drag-end":(e,t,n,s)=>e&&s,"node-drop":(e,t,n,s)=>e&&t&&s,"node-drag-leave":(e,t,n)=>e&&t&&n,"node-drag-enter":(e,t,n)=>e&&t&&n,"node-drag-over":(e,t,n)=>e&&t&&n},bo=F({name:"ElTree",components:{ElTreeNode:Co},props:{data:{type:U(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:{type:U(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:U(Function)},allowDrop:{type:U(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:ut}},emits:No,setup(e,t){const{t:n}=ht(),s=se("tree"),o=S(new ho({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));o.value.initialize();const r=S(o.value.root),a=S(null),i=S(null),c=S(null),{broadcastExpanded:u}=St(e),{dragState:l}=go({props:e,ctx:t,el$:i,dropIndicator$:c,store:o});ko({el$:i},o);const d=Oe(),f=P(()=>{let p=d?.parent;for(;p;){if(p.type.name==="ElTreeSelect")return!0;p=p.parent}return!1}),h=P(()=>{const{childNodes:p}=r.value;return(!p||p.length===0||p.every(({visible:$})=>!$))&&!f.value});Y(()=>e.currentNodeKey,p=>{o.value.setCurrentNodeKey(p??null)}),Y(()=>e.defaultCheckedKeys,(p,$)=>{Zt(p,$)||o.value.setDefaultCheckedKey(p??[])}),Y(()=>e.defaultExpandedKeys,p=>{o.value.setDefaultExpandedKeys(p??[])}),Y(()=>e.data,p=>{o.value.setData(p)},{deep:!0}),Y(()=>e.checkStrictly,p=>{o.value.checkStrictly=p});const m=p=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");o.value.filter(p)},_=p=>Ye(e.nodeKey,p.data),g=p=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${p}`)},N=p=>{g("getNodePath");const $=o.value.getNode(p);if(!$)return[];const fe=[$.data];let ge=$.parent;for(;ge&&ge!==r.value;)fe.push(ge.data),ge=ge.parent;return fe.reverse()},E=(p,$)=>o.value.getCheckedNodes(p,$),w=p=>o.value.getCheckedKeys(p),I=()=>{const p=o.value.getCurrentNode();return p?p.data:null},R=()=>{g("getCurrentKey");const p=I();return p?p[e.nodeKey]:null},q=(p,$)=>{g("setCheckedNodes"),o.value.setCheckedNodes(p,$)},A=(p,$)=>{g("setCheckedKeys"),o.value.setCheckedKeys(p,$)},oe=(p,$,fe)=>{o.value.setChecked(p,$,fe)},y=()=>o.value.getHalfCheckedNodes(),b=()=>o.value.getHalfCheckedKeys(),M=(p,$=!0)=>{g("setCurrentNode"),ze(o,t.emit,()=>{u(p),o.value.setUserCurrentNode(p,$)})},L=(p=null,$=!0)=>{g("setCurrentKey"),ze(o,t.emit,()=>{u(),o.value.setCurrentNodeKey(p,$)})},O=p=>o.value.getNode(p),ue=p=>{o.value.remove(p)},j=(p,$)=>{o.value.append(p,$)},X=(p,$)=>{o.value.insertBefore(p,$)},ve=(p,$)=>{o.value.insertAfter(p,$)},At=(p,$,fe)=>{u($),t.emit("node-expand",p,$,fe)},Bt=(p,$)=>{g("updateKeyChild"),o.value.updateChildren(p,$)};return te(Je,{ctx:t,props:e,store:o,root:r,currentNode:a,instance:d}),te(en,void 0),{ns:s,store:o,root:r,currentNode:a,dragState:l,el$:i,dropIndicator$:c,isEmpty:h,filter:m,getNodeKey:_,getNodePath:N,getCheckedNodes:E,getCheckedKeys:w,getCurrentNode:I,getCurrentKey:R,setCheckedNodes:q,setCheckedKeys:A,setChecked:oe,getHalfCheckedNodes:y,getHalfCheckedKeys:b,setCurrentNode:M,setCurrentKey:L,t:n,getNode:O,remove:ue,append:j,insertBefore:X,insertAfter:ve,handleNodeExpand:At,updateKeyChildren:Bt}}});function _o(e,t,n,s,o,r){const a=B("el-tree-node");return v(),T("div",{ref:"el$",class:G([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(v(!0),T(ne,null,ae(e.root.childNodes,i=>(v(),K(a,{key:e.getNodeKey(i),node:i,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(v(),T("div",{key:0,class:G(e.ns.e("empty-block"))},[V(e.$slots,"empty",{},()=>{var i;return[x("span",{class:G(e.ns.e("empty-text"))},W((i=e.emptyText)!=null?i:e.t("el.tree.emptyText")),3)]})],2)):J("v-if",!0),Ne(x("div",{ref:"dropIndicator$",class:G(e.ns.e("drop-indicator"))},null,2),[[Re,e.dragState.showDropIndicator]])],2)}var Eo=Q(bo,[["render",_o],["__file","tree.vue"]]);const vs=Ge(Eo),gs=F({__name:"EasyPagination",props:{layout:{default:"total, sizes, prev, pager, next, jumper,slot"},watchTabsClose:{type:Boolean}},emits:["refresh"],setup(e,{emit:t}){const n=e,s=t;function o(){s("refresh")}return Ke(()=>{n.watchTabsClose&&window.addEventListener("storage",r=>{r.key==="tabClosed"&&o()})}),(r,a)=>{const i=ce,c=pe,u=tn;return v(),K(u,{layout:n.layout},{default:C(()=>[D(c,{type:"info",link:"",onClick:a[0]||(a[0]=l=>o())},{default:C(()=>[D(i,null,{default:C(()=>[D(k(nn))]),_:1})]),_:1})]),_:1},8,["layout"])}}}),Ot={__name:"SplitSpan",props:{text:{type:String,default:""},keyword:{type:String,default:""},highlightClass:{type:String,default:"highlight"}},setup(e){return(t,n)=>(v(!0),T(ne,null,ae(e.text.split(new RegExp(`(${e.keyword})`,"i")).filter(Boolean),(s,o)=>(v(),T("span",{key:`list${s}${o}`,class:G({"bg-yellow-100 text-black italic":s.toLowerCase()===e.keyword.toLowerCase()})},W(s),3))),128))}},wo={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function Io(e,t){return v(),T("svg",wo,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800L147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"},null,-1),x("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4a51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4a51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4a51.2 51.2 0 0 1 0 102.4"},null,-1)])])}const To=_e({name:"ep-chat-dot-square",render:Io}),Do={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function $o(e,t){return v(),T("svg",Do,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"},null,-1)])])}const So=_e({name:"ep-folder",render:$o}),Ko={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function Oo(e,t){return v(),T("svg",Ko,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"},null,-1)])])}const Ao=_e({name:"ep-document",render:Oo}),Bo={class:"flex items-center flex-1 overflow-hidden flex-nowrap gap-0.5 justify-center"},Mo={key:0,class:"text-error"},Fo={key:1},Ro={class:"flex items-center shrink-0 tree-node-button-group"},ms=F({__name:"CustomTreeNode",props:{search:{},node:{},data:{}},setup(e){const t=e;return(n,s)=>{const o=Ao,r=So,a=ce,i=on,c=To,u=Ot,l=lt("tooltip");return v(),T("div",Bo,[e.data.isRequired?(v(),T("span",Mo,"*")):J("",!0),D(i,{hidden:e.data.status!=="4","is-dot":"",offset:[-2,4],"badge-class":"size-[9px]!",color:"var(--el-color-success)"},{default:C(()=>[D(a,{class:"shrink-0",color:k(re).isValidFailed(e.data)?"var(--el-color-warning)":"currentColor"},{default:C(()=>[k(re).isDocNode(e.data)?(v(),K(o,{key:0})):(v(),K(r,{key:1}))]),_:1},8,["color"])]),_:1},8,["hidden"]),k(re).isHasAnnotation(e.data)?(v(),K(a,{key:1,class:"shrink-0"},{default:C(()=>[D(c)]),_:1})):J("",!0),Ne((v(),T("div",{class:G(["flex-1 truncate",{"bg-highlight":k(re).isAssociation(e.data),"text-error":k(re).isStatusError(e.data),"text-warning":k(re).isStatusWarning(e.data),"italic opacity-70":k(re).isAccessed(e.data),"underline underline-offset-4 decoration-[var(--el-color-primary)]":k(re).isHighlight(e.data)}])},[t.search?(v(),K(u,{key:0,text:e.node[k(Ze)],keyword:t.search},null,8,["text","keyword"])):(v(),T("span",Fo,W(e.node[k(Ze)]),1))],2)),[[l]]),x("div",Ro,[V(n.$slots,"tree-node-button-group",{data:e.data,node:e.node})])])}}}),Lo={class:"flex items-center justify-center"},Po={class:"text-gray-500 flex-shrink-0"},xo={class:"font-semibold text-[var(--el-color-primary)] truncate"},ys=F({__name:"CustomText",props:{preText:{default:""},separator:{default:""},text:{}},setup(e){const t=e;return(n,s)=>{const o=lt("tooltip");return v(),T("div",Lo,[x("div",Po,W(t.preText)+W(t.separator),1),Ne((v(),T("div",xo,[be(W(t.text),1)])),[[o]])])}}}),zo={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function Ho(e,t){return v(),T("svg",zo,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224a112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224a112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224a112 112 0 0 1 0-224"},null,-1)])])}const jo=_e({name:"ep-more-filled",render:Ho}),Uo={class:"flex gap-2"},Go={key:1},Vo={class:"el-dropdown-link"},Cs=F({__name:"FileList",props:$e({fileList:{},fileKey:{},defaultCheckedKeys:{},showCheckbox:{type:Boolean,default:!1},filterNodeMethod:{},checkNodeMethod:{},treePropsDisabled:{},search:{},draggable:{type:Boolean,default:!1},enableRename:{type:Boolean,default:!1},allowDrop:{},allowDrag:{}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:$e(["view","delete","download","rename","end"],["update:fileList"]),setup(e,{expose:t,emit:n}){const s=e,o=n,{t:r}=Ve(),a=dt(e,"fileList"),i=S([]),c=S([]),u=P(()=>c.value.map(E=>E[s.fileKey])),l=H(sn,S([])),d={rename:{icon:yn,permission:Fe.UPDATE},download:{icon:mn,permission:Fe.DOWNLOAD},delete:{icon:fn,permission:Fe.DELETE}},f=P(()=>s.enableRename?d:cn(d,"rename")),h=Ue({filter:g}),m=P(()=>{const E=Object.values(f.value).map(I=>I.permission);return l.value.some(I=>E.includes(I))});function _(E){const w=c.value.indexOf(E);if(s.checkNodeMethod){s.checkNodeMethod(E[s.fileKey],w===-1);return}w>-1?c.value.splice(w,1):c.value.push(E)}function g(E){i.value=a.value.filter(w=>s.filterNodeMethod?.(E,w)??w.label.includes(E))}Y(a,()=>{g("")}),Y(()=>s.defaultCheckedKeys,E=>{E&&Ce(()=>{c.value=s.fileList.filter(w=>E.includes(w[s.fileKey]))})},{immediate:!0,deep:!0}),t(h);const N=["","","warning","error"];return(E,w)=>{const I=vn,R=gn,q=ce,A=pe,oe=Ot,y=jo,b=so,M=ro,L=oo,O=pn,ue=ft;return v(),K(ue,null,{default:C(()=>[D(k(hn),{modelValue:a.value,"onUpdate:modelValue":w[0]||(w[0]=j=>a.value=j),disabled:!s.draggable,class:"md:grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 md:gap-1 lg:gap-2 xl:gap-3",handle:".handle",onEnd:w[1]||(w[1]=j=>o("end",j))},{default:C(()=>[(v(!0),T(ne,null,ae(k(i),j=>(v(),K(O,de({key:j[s.fileKey]},{ref_for:!0},j,{"show-checkbox":s.showCheckbox,active:k(u).includes(j[s.fileKey]),disabled:s.treePropsDisabled?s.treePropsDisabled(j):!1,class:"relative",onActiveChange:X=>_(j)}),at({"content-label":C(({label:X})=>[s.search?(v(),K(oe,{key:0,text:X,keyword:s.search},null,8,["text","keyword"])):(v(),T("span",Go,W(X),1))]),"content-extra":C(()=>[k(m)?(v(),K(L,{key:0,placement:"bottom-end",onCommand:X=>o(X,j)},{dropdown:C(()=>[D(M,null,{default:C(()=>[(v(!0),T(ne,null,ae(k(f),(X,ve)=>(v(),T(ne,{key:ve},[k(l).includes(X.permission)?(v(),K(b,{key:0,icon:X.icon,command:ve},{default:C(()=>[be(W(k(r)(`button.${ve}`)),1)]),_:2},1032,["icon","command"])):J("",!0)],64))),128))]),_:1})]),default:C(()=>[x("span",Vo,[D(A,{circle:"",text:""},{default:C(()=>[D(q,null,{default:C(()=>[D(y)]),_:1})]),_:1})])]),_:1},8,["onCommand"])):J("",!0)]),default:C(()=>[x("div",Uo,[D(A,{onClick:X=>o("view",j)},{default:C(()=>[D(q,{class:"mr-1"},{default:C(()=>[D(R)]),_:1}),be(" "+W(k(r)("button.view")),1)]),_:1},8,["onClick"])])]),_:2},[j.checkStatus>1?{name:"before",fn:C(()=>[D(I,de({ref_for:!0},{[N[j.checkStatus]]:!0},{title:E.$t(`label.${N[j.checkStatus]}`)}),null,16,["title"])]),key:"0"}:void 0]),1040,["show-checkbox","active","disabled","onActiveChange"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})}}}),qo={class:"flex"},Yo={class:"text-xs leading-none"},Jo={class:"font-bold leading-none text-mini"},Wo=F({__name:"Stat",props:$e({data:{},modelValue:{}},{modelValue:{},modelModifiers:{}}),emits:$e(["change"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const s=e,o=n,{t:r}=Ve(),a=dt(e,"modelValue"),i=Ue({active:null});function c(u){const l=s.data[u]||null;i.active=l,o("change",l)}return xt(()=>{c(a.value||"")}),t(i),(u,l)=>{const d=pe;return v(),T("div",{class:"flex items-center justify-center",onChange:l[0]||(l[0]=()=>{})},[(v(!0),T(ne,null,ae(s.data,(f,h)=>(v(),K(d,de({key:h},{ref_for:!0},f,{class:{"opacity-70":a.value!==h},onClick:m=>a.value=a.value===h?"":h}),{default:C(()=>[x("div",qo,[x("div",Yo,W(f.label||k(r)(`label.${h}`)),1),x("div",Jo,W(f.value),1)])]),_:2},1040,["class","onClick"]))),128))],32)}}}),ks=Ct(Wo,[["__scopeId","data-v-50d981da"]]),Qo={class:"flex items-center justify-between",style:{"--el-fill-color-light":"var(--el-text-color-disabled)"}},Xo={class:"flex-1 Toolbar-btn"},Zo={key:0,class:"flex-shrink-0 flex Toolbar-btn pr-2"},es=F({__name:"Toolbar",props:{data:{},extraData:{}},setup(e){const{t}=Ve(),{currentNode:n,currentNodeData:s}=rn(un());return(o,r)=>{const a=ce,i=pe,c=an;return v(),T("div",Qo,[x("div",Xo,[(v(!0),T(ne,null,ae(e.data,(u,l)=>(v(),K(c,{key:l,permission:u.permission},{default:C(()=>[D(i,{text:"",class:"shadow-[unset]!",disabled:("unMaybeRefOrFunction"in o?o.unMaybeRefOrFunction:k(et))(u.disabled||!1,k(s),k(n)),onClick:d=>u.handler(k(s),k(n))},{default:C(()=>[D(a,{size:"18px"},{default:C(()=>[(v(),K(ke(u.icon)))]),_:2},1024),be(" "+W(k(t)(`button.${l}`)),1)]),_:2},1032,["disabled","onClick"])]),_:2},1032,["permission"]))),128))]),e.extraData?(v(),T("div",Zo,[(v(!0),T(ne,null,ae(e.extraData,(u,l)=>(v(),K(c,{key:l,permission:u.permission},{default:C(()=>[D(i,{type:u.type,disabled:("unMaybeRefOrFunction"in o?o.unMaybeRefOrFunction:k(et))(u.disabled||!1,k(s),k(n)),onClick:d=>u.handler(k(s),k(n))},{default:C(()=>[D(a,{class:"mr-1",size:"16px"},{default:C(()=>[(v(),K(ke(u.icon)))]),_:2},1024),be(" "+W(k(t)(`button.${l}`)),1)]),_:2},1032,["type","disabled","onClick"])]),_:2},1032,["permission"]))),128))])):J("",!0)])}}}),Ns=Ct(es,[["__scopeId","data-v-69de1f7d"]]),ts={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function ns(e,t){return v(),T("svg",ts,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"m795.904 750.72l124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704a352 352 0 0 0 0 704"},null,-1)])])}const bs=_e({name:"ep-search",render:ns});export{vs as E,bs as I,ks as S,Ns as T,Cs as _,ys as a,ms as b,gs as c};
1
+ import{defineComponent as F,renderSlot as V,ref as S,inject as H,provide as te,onMounted as Ke,unref as k,onBeforeUnmount as Mt,computed as P,toRef as ye,readonly as Ft,watch as Y,nextTick as Ce,resolveComponent as B,createBlock as K,openBlock as v,withCtx as C,createVNode as D,normalizeProps as Rt,guardReactiveProps as Lt,createElementBlock as T,normalizeClass as G,createCommentVNode as J,createSlots as at,mergeProps as de,getCurrentInstance as Oe,Fragment as ne,createElementVNode as x,withModifiers as Z,resolveDynamicComponent as ke,normalizeStyle as je,onUpdated as it,useAttrs as Pt,reactive as Ue,h as We,withDirectives as Ne,renderList as ae,vShow as Re,toDisplayString as W,markRaw as _e,resolveDirective as lt,createTextVNode as be,mergeModels as $e,useModel as dt,watchEffect as xt}from"vue";import{_ as Q,e as Ee,f as U,I as we,J as ee,K as ct,L as ut,M as Ie,N as zt,O as Be,P as z,Q as Ht,v as ce,R as jt,S as Ut,k as ft,t as pe,D as se,T as ht,U as Gt,V as pt,W as Vt,X as vt,Y as Qe,w as Ge,Z as gt,$ as qt,g as ie,a0 as Le,z as Pe,i as Te,a1 as xe,F as Se,a2 as mt,a3 as Yt,a4 as Jt,a5 as Xe,a6 as Me,a7 as Wt,a8 as Qt,a9 as Xt,p as Zt,aa as en,ab as tn,ac as nn,ad as on,ae as sn,s as rn,A as an}from"./main-DINM6Pr5.js";import{d as yt,e as ln}from"./index-B4kC2uaS.js";import{b as dn,o as cn}from"./index-BZc-qmNW.js";import{T as re,b as Ze,u as un}from"./viewer-BPijlLdi.js";import{I as fn,w as hn,_ as pn,x as vn,u as et}from"./DynamicElFormItem.vue_vue_type_style_index_0_lang-DDImMTjw.js";import{_ as gn}from"./view-CUJgawjS.js";import{I as mn}from"./download-BZ4lW7oQ.js";import{_ as yn}from"./edit-C1MwNQ0C.js";import{A as Fe}from"./action-DIX3nF4W.js";import{useI18n as Ve}from"vue-i18n";import{_ as Ct}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Cn=F({inheritAttrs:!1});function kn(e,t,n,s,o,r){return V(e.$slots,"default")}var Nn=Q(Cn,[["render",kn],["__file","collection.vue"]]);const bn=F({name:"ElCollectionItem",inheritAttrs:!1});function _n(e,t,n,s,o,r){return V(e.$slots,"default")}var En=Q(bn,[["render",_n],["__file","collection-item.vue"]]);const kt="data-el-collection-item",wn=e=>{const t=`El${e}Collection`,n=`${t}Item`,s=Symbol(t),o=Symbol(n),r={...Nn,name:t,setup(){const i=S(),c=new Map;te(s,{itemMap:c,getItems:()=>{const l=k(i);if(!l)return[];const d=Array.from(l.querySelectorAll(`[${kt}]`));return[...c.values()].sort((h,m)=>d.indexOf(h.ref)-d.indexOf(m.ref))},collectionRef:i})}},a={...En,name:n,setup(i,{attrs:c}){const u=S(),l=H(s,void 0);te(o,{collectionItemRef:u}),Ke(()=>{const d=k(u);d&&l.itemMap.set(d,{ref:d,...c})}),Mt(()=>{const d=k(u);l.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:s,COLLECTION_ITEM_INJECTION_KEY:o,ElCollection:r,ElCollectionItem:a}},In=Ee({style:{type:U([String,Array,Object])},currentTabId:{type:U(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:U(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Tn,ElCollectionItem:Dn,COLLECTION_INJECTION_KEY:Nt,COLLECTION_ITEM_INJECTION_KEY:$n}=wn("RovingFocusGroup"),qe=Symbol("elRovingFocusGroup"),bt=Symbol("elRovingFocusGroupItem"),Sn={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Kn=(e,t)=>e,On=(e,t,n)=>{const s=we(e),o=Kn(s);return Sn[o]},An=(e,t)=>e.map((n,s)=>e[(s+t)%e.length]),tt=e=>{const{activeElement:t}=document;for(const n of e)if(n===t||(n.focus(),t!==document.activeElement))return},nt="currentTabIdChange",ot="rovingFocusGroup.entryFocus",Bn={bubbles:!1,cancelable:!0},Mn=F({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:In,emits:[nt,"entryFocus"],setup(e,{emit:t}){var n;const s=S((n=e.currentTabId||e.defaultCurrentTabId)!=null?n:null),o=S(!1),r=S(!1),a=S(),{getItems:i}=H(Nt,void 0),c=P(()=>[{outline:"none"},e.style]),u=g=>{t(nt,g)},l=()=>{o.value=!0},d=ee(g=>{var N;(N=e.onMousedown)==null||N.call(e,g)},()=>{r.value=!0}),f=ee(g=>{var N;(N=e.onFocus)==null||N.call(e,g)},g=>{const N=!k(r),{target:E,currentTarget:w}=g;if(E===w&&N&&!k(o)){const I=new Event(ot,Bn);if(w?.dispatchEvent(I),!I.defaultPrevented){const R=i().filter(b=>b.focusable),q=R.find(b=>b.active),A=R.find(b=>b.id===k(s)),y=[q,A,...R].filter(Boolean).map(b=>b.ref);tt(y)}}r.value=!1}),h=ee(g=>{var N;(N=e.onBlur)==null||N.call(e,g)},()=>{o.value=!1}),m=(...g)=>{t("entryFocus",...g)},_=g=>{const N=On(g);if(N){g.preventDefault();let w=i().filter(I=>I.focusable).map(I=>I.ref);switch(N){case"last":{w.reverse();break}case"prev":case"next":{N==="prev"&&w.reverse();const I=w.indexOf(g.currentTarget);w=e.loop?An(w,I+1):w.slice(I+1);break}}Ce(()=>{tt(w)})}};te(qe,{currentTabbedId:Ft(s),loop:ye(e,"loop"),tabIndex:P(()=>k(o)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:c,orientation:ye(e,"orientation"),dir:ye(e,"dir"),onItemFocus:u,onItemShiftTab:l,onBlur:h,onFocus:f,onMousedown:d,onKeydown:_}),Y(()=>e.currentTabId,g=>{s.value=g??null}),ct(a,ot,m)}});function Fn(e,t,n,s,o,r){return V(e.$slots,"default")}var Rn=Q(Mn,[["render",Fn],["__file","roving-focus-group-impl.vue"]]);const Ln=F({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Tn,ElRovingFocusGroupImpl:Rn}});function Pn(e,t,n,s,o,r){const a=B("el-roving-focus-group-impl"),i=B("el-focus-group-collection");return v(),K(i,null,{default:C(()=>[D(a,Rt(Lt(e.$attrs)),{default:C(()=>[V(e.$slots,"default")]),_:3},16)]),_:3})}var xn=Q(Ln,[["render",Pn],["__file","roving-focus-group.vue"]]);const zn=Ee({trigger:{...Be.trigger,type:U([String,Array])},triggerKeys:{type:U(Array),default:()=>[z.enter,z.numpadEnter,z.space,z.down]},virtualTriggering:Be.virtualTriggering,virtualRef:Be.virtualRef,effect:{...Ie.effect,default:"light"},type:{type:U(String)},placement:{type:U(String),default:"bottom"},popperOptions:{type:U(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:U([Number,String]),default:0},maxHeight:{type:U([Number,String]),default:""},popperClass:Ie.popperClass,popperStyle:Ie.popperStyle,disabled:Boolean,role:{type:String,values:zt,default:"menu"},buttonProps:{type:U(Object)},teleported:Ie.teleported,persistent:{type:Boolean,default:!0}}),_t=Ee({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ut}}),Hn=Ee({onKeydown:{type:U(Function)}}),Ae=Symbol("elDropdown"),Et="elDropdown",{ButtonGroup:jn}=pe,Un=F({name:"ElDropdown",components:{ElButton:pe,ElButtonGroup:jn,ElScrollbar:ft,ElTooltip:Ut,ElRovingFocusGroup:xn,ElOnlyChild:jt,ElIcon:ce,ArrowDown:Ht},props:zn,emits:["visible-change","click","command"],setup(e,{emit:t}){const n=Oe(),s=se("dropdown"),{t:o}=ht(),r=S(),a=S(),i=S(),c=S(),u=S(null),l=S(null),d=S(!1),f=P(()=>({maxHeight:Gt(e.maxHeight)})),h=P(()=>[s.m(I.value)]),m=P(()=>Vt(e.trigger)),_=vt().value,g=P(()=>e.id||_);function N(){var O;(O=i.value)==null||O.onClose(void 0,0)}function E(){var O;(O=i.value)==null||O.onClose()}function w(){var O;(O=i.value)==null||O.onOpen()}const I=pt();function R(...O){t("command",...O)}function q(){}function A(){const O=k(c);m.value.includes("hover")&&O?.focus({preventScroll:!0}),l.value=null}function oe(O){l.value=O}function y(){t("visible-change",!0)}function b(O){var ue;d.value=O?.type==="keydown",(ue=c.value)==null||ue.focus()}function M(){t("visible-change",!1)}return te(Ae,{contentRef:c,role:P(()=>e.role),triggerId:g,isUsingKeyboard:d,onItemEnter:q,onItemLeave:A,handleClose:E}),te(Et,{instance:n,dropdownSize:I,handleClick:N,commandHandler:R,trigger:ye(e,"trigger"),hideOnClick:ye(e,"hideOnClick")}),{t:o,ns:s,scrollbar:u,wrapStyle:f,dropdownTriggerKls:h,dropdownSize:I,triggerId:g,currentTabId:l,handleCurrentTabIdChange:oe,handlerMainButtonClick:O=>{t("click",O)},handleClose:E,handleOpen:w,handleBeforeShowTooltip:y,handleShowTooltip:b,handleBeforeHideTooltip:M,popperRef:i,contentRef:c,triggeringElementRef:r,referenceElementRef:a}}});function Gn(e,t,n,s,o,r){var a;const i=B("el-roving-focus-group"),c=B("el-scrollbar"),u=B("el-only-child"),l=B("el-tooltip"),d=B("el-button"),f=B("arrow-down"),h=B("el-icon"),m=B("el-button-group");return v(),T("div",{class:G([e.ns.b(),e.ns.is("disabled",e.disabled)])},[D(l,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"popper-style":e.popperStyle,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-arrow":e.showArrow,"show-after":e.trigger==="hover"?e.showTimeout:0,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"virtual-ref":(a=e.virtualRef)!=null?a:e.triggeringElementRef,"virtual-triggering":e.virtualTriggering||e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"","focus-on-target":"",persistent:e.persistent,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},at({content:C(()=>[D(c,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:C(()=>[D(i,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange},{default:C(()=>[V(e.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:C(()=>[D(u,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:C(()=>[V(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","persistent","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(v(),K(m,{key:0},{default:C(()=>[D(d,de({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:C(()=>[V(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),D(d,de({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:C(()=>[D(h,{class:G(e.ns.e("icon"))},{default:C(()=>[D(f)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):J("v-if",!0)],2)}var Vn=Q(Un,[["render",Gn],["__file","dropdown.vue"]]);const qn=F({components:{ElRovingFocusCollectionItem:Dn},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:n,onItemFocus:s,onItemShiftTab:o,onKeydown:r}=H(qe,void 0),a=vt(),i=S(),c=ee(f=>{t("mousedown",f)},f=>{e.focusable?s(k(a)):f.preventDefault()}),u=ee(f=>{t("focus",f)},()=>{s(k(a))}),l=ee(f=>{t("keydown",f)},f=>{const{shiftKey:h,target:m,currentTarget:_}=f;if(we(f)===z.tab&&h){o();return}m===_&&r(f)}),d=P(()=>n.value===k(a));return te(bt,{rovingFocusGroupItemRef:i,tabIndex:P(()=>k(d)?0:-1),handleMousedown:c,handleFocus:u,handleKeydown:l}),{id:a,handleKeydown:l,handleFocus:u,handleMousedown:c}}});function Yn(e,t,n,s,o,r){const a=B("el-roving-focus-collection-item");return v(),K(a,{id:e.id,focusable:e.focusable,active:e.active},{default:C(()=>[V(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var Jn=Q(qn,[["render",Yn],["__file","roving-focus-item.vue"]]);const Wn=F({name:"DropdownItemImpl",components:{ElIcon:ce},props:_t,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const n=se("dropdown"),{role:s}=H(Ae,void 0),{collectionItemRef:o}=H($n,void 0),{rovingFocusGroupItemRef:r,tabIndex:a,handleFocus:i,handleKeydown:c,handleMousedown:u}=H(bt,void 0),l=yt(o,r),d=P(()=>s.value==="menu"?"menuitem":s.value==="navigation"?"link":"button"),f=ee(h=>{const m=we(h);if([z.enter,z.numpadEnter,z.space].includes(m))return h.preventDefault(),h.stopImmediatePropagation(),t("clickimpl",h),!0},c);return{ns:n,itemRef:l,dataset:{[kt]:""},role:d,tabIndex:a,handleFocus:i,handleKeydown:f,handleMousedown:u}}});function Qn(e,t,n,s,o,r){const a=B("el-icon");return v(),T(ne,null,[e.divided?(v(),T("li",{key:0,role:"separator",class:G(e.ns.bem("menu","item","divided"))},null,2)):J("v-if",!0),x("li",de({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:i=>e.$emit("clickimpl",i),onFocus:e.handleFocus,onKeydown:Z(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:i=>e.$emit("pointermove",i),onPointerleave:i=>e.$emit("pointerleave",i)}),[e.icon?(v(),K(a,{key:0},{default:C(()=>[(v(),K(ke(e.icon)))]),_:1})):J("v-if",!0),V(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var Xn=Q(Wn,[["render",Qn],["__file","dropdown-item-impl.vue"]]);const wt=()=>{const e=H(Et,{}),t=P(()=>e?.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},Zn=F({name:"ElDropdownItem",components:{ElRovingFocusItem:Jn,ElDropdownItemImpl:Xn},inheritAttrs:!1,props:_t,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:n}){const{elDropdown:s}=wt(),o=Oe(),{onItemEnter:r,onItemLeave:a}=H(Ae,void 0),i=ee(d=>(t("pointermove",d),d.defaultPrevented),Qe(d=>{if(e.disabled){a(d);return}const f=d.currentTarget;f===document.activeElement||f.contains(document.activeElement)||(r(d),d.defaultPrevented||f?.focus({preventScroll:!0}))})),c=ee(d=>(t("pointerleave",d),d.defaultPrevented),Qe(a)),u=ee(d=>{if(!e.disabled)return t("click",d),d.type!=="keydown"&&d.defaultPrevented},d=>{var f,h,m;if(e.disabled){d.stopImmediatePropagation();return}(f=s?.hideOnClick)!=null&&f.value&&((h=s.handleClick)==null||h.call(s)),(m=s.commandHandler)==null||m.call(s,e.command,o,d)}),l=P(()=>({...e,...n}));return{handleClick:u,handlePointerMove:i,handlePointerLeave:c,propsAndAttrs:l}}});function eo(e,t,n,s,o,r){const a=B("el-dropdown-item-impl"),i=B("el-roving-focus-item");return v(),K(i,{focusable:!e.disabled},{default:C(()=>[D(a,de(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:C(()=>[V(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var It=Q(Zn,[["render",eo],["__file","dropdown-item.vue"]]);const to=F({name:"ElDropdownMenu",props:Hn,setup(e){const t=se("dropdown"),{_elDropdownSize:n}=wt(),s=n.value,{contentRef:o,role:r,triggerId:a,isUsingKeyboard:i,handleClose:c}=H(Ae,void 0),{rovingFocusGroupRef:u,rovingFocusGroupRootStyle:l,onBlur:d,onFocus:f,onKeydown:h,onMousedown:m}=H(qe,void 0),{collectionRef:_}=H(Nt,void 0),g=P(()=>[t.b("menu"),t.bm("menu",s?.value)]),N=yt(o,u,_),E=ee(I=>{var R;(R=e.onKeydown)==null||R.call(e,I)},I=>{const{currentTarget:R,target:q}=I,A=we(I);if(R.contains(q),z.tab===A)return c();h(I)});function w(I){i.value&&f(I)}return{size:s,rovingFocusGroupRootStyle:l,dropdownKls:g,role:r,triggerId:a,dropdownListWrapperRef:N,handleKeydown:E,onBlur:d,handleFocus:w,onMousedown:m}}});function no(e,t,n,s,o,r){return v(),T("ul",{ref:e.dropdownListWrapperRef,class:G(e.dropdownKls),style:je(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onFocusin:e.handleFocus,onFocusout:e.onBlur,onKeydown:Z(e.handleKeydown,["self"]),onMousedown:Z(e.onMousedown,["self"])},[V(e.$slots,"default")],46,["role","aria-labelledby","onFocusin","onFocusout","onKeydown","onMousedown"])}var Tt=Q(to,[["render",no],["__file","dropdown-menu.vue"]]);const oo=Ge(Vn,{DropdownItem:It,DropdownMenu:Tt}),so=gt(It),ro=gt(Tt),ao=Ee({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:qt,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),io=F({name:"ElText"}),lo=F({...io,props:ao,setup(e){const t=e,n=S(),s=pt(),o=se("text"),r=P(()=>[o.b(),o.m(t.type),o.m(s.value),o.is("truncated",t.truncated),o.is("line-clamp",!ie(t.lineClamp))]),a=()=>{var i,c,u,l,d,f,h;if(Pt().title)return;let _=!1;const g=((i=n.value)==null?void 0:i.textContent)||"";if(t.truncated){const N=(c=n.value)==null?void 0:c.offsetWidth,E=(u=n.value)==null?void 0:u.scrollWidth;N&&E&&E>N&&(_=!0)}else if(!ie(t.lineClamp)){const N=(l=n.value)==null?void 0:l.offsetHeight,E=(d=n.value)==null?void 0:d.scrollHeight;N&&E&&E>N&&(_=!0)}_?(f=n.value)==null||f.setAttribute("title",g):(h=n.value)==null||h.removeAttribute("title")};return Ke(a),it(a),(i,c)=>(v(),K(ke(i.tag),{ref_key:"textRef",ref:n,class:G(k(r)),style:je({"-webkit-line-clamp":i.lineClamp})},{default:C(()=>[V(i.$slots,"default")]),_:3},8,["class","style"]))}});var co=Q(lo,[["__file","text.vue"]]);const uo=Ge(co),he="$treeNodeId",st=function(e,t){!t||t[he]||Object.defineProperty(t,he,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},Ye=(e,t)=>t?.[e||he],ze=(e,t,n)=>{const s=e.value.currentNode;n();const o=e.value.currentNode;s!==o&&t("current-change",o?o.data:null,o)},Dt=e=>{let t=!0,n=!0,s=!0,o=!0;for(let r=0,a=e.length;r<a;r++){const i=e[r];(i.checked!==!0||i.indeterminate)&&(t=!1,i.disabled||(s=!1)),(i.checked!==!1||i.indeterminate)&&(n=!1),i.isEffectivelyChecked||(o=!1)}return{all:t,none:n,allWithoutDisable:s,half:!t&&!n,isEffectivelyChecked:o}},me=function(e){if(e.childNodes.length===0||e.loading){e.isEffectivelyChecked=e.disabled||e.checked;return}const{all:t,none:n,half:s,isEffectivelyChecked:o}=Dt(e.childNodes);e.isEffectivelyChecked=o,t?(e.checked=!0,e.indeterminate=!1):s?(e.checked=!1,e.indeterminate=!0):n&&(e.checked=!1,e.indeterminate=!1);const r=e.parent;!r||r.level===0||e.store.checkStrictly||me(r)},De=function(e,t){const n=e.store.props,s=e.data||{},o=n[t];if(Se(o))return o(s,e);if(mt(o))return s[o];if(ie(o)){const r=s[t];return ie(r)?"":r}},He=function(e,t){e.forEach(n=>{n.canFocus=t,He(n.childNodes,t)})};let fo=0;class le{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=fo++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)Le(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var t;const n=this.store;if(!n)throw new Error("[Node]store is required!");n.registerNode(this);const s=n.props;if(s&&typeof s.isLeaf<"u"){const a=De(this,"isLeaf");Pe(a)&&(this.isLeafByUser=a)}if(n.lazy!==!0&&this.data?(this.setData(this.data),n.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&n.lazy&&n.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Te(this.data)||st(this,this.data),!this.data)return;const o=n.defaultExpandedKeys,r=n.key;r&&!xe(this.key)&&o&&o.includes(this.key)&&this.expand(null,n.autoExpandParent),r&&n.currentNodeKey!==void 0&&this.key===n.currentNodeKey&&(n.currentNode&&(n.currentNode.isCurrent=!1),n.currentNode=this,n.currentNode.isCurrent=!0),n.lazy&&n._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((t=this.parent)==null?void 0:t.expanded)===!0)&&(this.canFocus=!0)}setData(t){Te(t)||st(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&Te(this.data)?n=this.data:n=De(this,"children")||[];for(let s=0,o=n.length;s<o;s++)this.insertChild({data:n[s]})}get label(){return De(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return De(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(s=>s===t||n&&s.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,s){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof le)){if(!s){const o=this.getChildren(!0);o?.includes(t.data)||(ie(n)||n<0?o?.push(t.data):o?.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Ue(new le(t)),t instanceof le&&t.initialize()}t.level=this.level+1,ie(n)||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let s;n&&(s=this.childNodes.indexOf(n)),this.insertChild(t,s)}insertAfter(t,n){let s;n&&(s=this.childNodes.indexOf(n),s!==-1&&(s+=1)),this.insertChild(t,s)}removeChild(t){const n=this.getChildren()||[],s=n.indexOf(t.data);s>-1&&n.splice(s,1);const o=this.childNodes.indexOf(t);o>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(o,1)),this.updateLeafState()}removeChildByData(t){const n=this.childNodes.find(s=>s.data===t);n&&this.removeChild(n)}expand(t,n){const s=()=>{if(n){let o=this.parent;for(;o&&o.level>0;)o.expanded=!0,o=o.parent}this.expanded=!0,t&&t(),He(this.childNodes,!0)};this.shouldLoadData()?this.loadData(o=>{Te(o)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||me(this),s())}):s()}doCreateChildren(t,n={}){t.forEach(s=>{this.insertChild(Object.assign({data:s},n),void 0,!0)})}collapse(){this.expanded=!1,He(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(t,n,s,o){if(this.indeterminate=t==="half",this.checked=t===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const a=()=>{if(n){const i=this.childNodes;for(let d=0,f=i.length;d<f;d++){const h=i[d];o=o||t!==!1;const m=h.disabled&&h.isLeaf?h.checked:o;h.setChecked(m,n,!0,o)}const{half:c,all:u,isEffectivelyChecked:l}=Dt(i);u||(this.checked=u,this.indeterminate=c),this.isEffectivelyChecked=this.childNodes.length?l:this.disabled||this.checked}};if(this.shouldLoadData()){this.loadData(()=>{a(),me(this)},{checked:t!==!1});return}else a()}const r=this.parent;!r||r.level===0||s||me(r)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const s=this.store.props;let o="children";return s&&(o=s.children||"children"),ie(n[o])&&(n[o]=null),t&&!n[o]&&(n[o]=[]),n[o]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(r=>r.data),s={},o=[];t.forEach((r,a)=>{const i=r[he];!!i&&n.some(u=>u?.[he]===i)?s[i]={index:a,data:r}:o.push({index:a,data:r})}),this.store.lazy||n.forEach(r=>{s[r?.[he]]||this.removeChildByData(r)}),o.forEach(({index:r,data:a})=>{this.insertChild({data:a},r)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const s=r=>{this.childNodes=[],this.doCreateChildren(r,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,r)},o=()=>{this.loading=!1};this.store.load(this,s,o)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const s=n.shift();n.unshift(...s.childNodes),t(s)}}reInitChecked(){this.store.checkStrictly||me(this)}}class ho{constructor(t){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const n in t)Le(t,n)&&(this[n]=t[n]);this.nodesMap={}}initialize(){if(this.root=new le({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()},Yt)}else this._initDefaultCheckedNodes()}filter(t){const n=this.filterNodeMethod,s=this.lazy,o=async function(r){const a=r.root?r.root.childNodes:r.childNodes;for(const[i,c]of a.entries())c.visible=!!n?.call(c,t,c.data,c),i%80===0&&i>0&&await Ce(),await o(c);if(!r.visible&&a.length){let i=!0;i=!a.some(c=>c.visible),r.root?r.root.visible=i===!1:r.visible=i===!1}t&&r.visible&&!r.isLeaf&&(!s||r.loaded)&&r.expand()};o(this)}setData(t){t!==this.root.data?(this.nodesMap={},this.root.setData(t),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(t){if(t instanceof le)return t;const n=Jt(t)?Ye(this.key,t):t;return this.nodesMap[n]||null}insertBefore(t,n){var s;const o=this.getNode(n);(s=o.parent)==null||s.insertBefore({data:t},o)}insertAfter(t,n){var s;const o=this.getNode(n);(s=o.parent)==null||s.insertAfter({data:t},o)}remove(t){const n=this.getNode(t);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(t,n){const s=Xe(n)?this.root:this.getNode(n);s&&s.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(s=>{const o=n[s];o&&o.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){const n=this.defaultCheckedKeys||[];!xe(t.key)&&n.includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const n=this.key;if(!(!t||!t.data))if(!n)this.nodesMap[t.id]=t;else{const s=t.key;xe(s)||(this.nodesMap[s]=t)}}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(s=>{this.deregisterNode(s)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,n=!1){const s=[],o=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(i=>{(i.checked||n&&i.indeterminate)&&(!t||t&&i.isLeaf)&&s.push(i.data),o(i)})};return o(this),s}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const t=[],n=function(s){(s.root?s.root.childNodes:s.childNodes).forEach(r=>{r.indeterminate&&t.push(r.data),n(r)})};return n(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],n=this.nodesMap;for(const s in n)Le(n,s)&&t.push(n[s]);return t}updateChildren(t,n){const s=this.nodesMap[t];if(!s)return;const o=s.childNodes;for(let r=o.length-1;r>=0;r--){const a=o[r];this.remove(a.data)}for(let r=0,a=n.length;r<a;r++){const i=n[r];this.append(i,s.data)}}_setCheckedKeys(t,n=!1,s){const o=this._getAllNodes().sort((c,u)=>c.level-u.level),r=Object.create(null),a=Object.keys(s);o.forEach(c=>c.setChecked(!1,!1));const i=c=>{c.childNodes.forEach(u=>{var l;r[u.data[t]]=!0,(l=u.childNodes)!=null&&l.length&&i(u)})};for(let c=0,u=o.length;c<u;c++){const l=o[c],d=l.data[t].toString();if(!a.includes(d)){l.checked&&!r[d]&&l.setChecked(!1,!1);continue}if(l.childNodes.length&&i(l),l.isLeaf||this.checkStrictly){l.setChecked(!0,!1);continue}if(l.setChecked(!0,!0),n){l.setChecked(!1,!1);const h=function(m){m.childNodes.forEach(g=>{g.isLeaf||g.setChecked(!1,!1),h(g)})};h(l)}}}setCheckedNodes(t,n=!1){const s=this.key,o={};t.forEach(r=>{o[(r||{})[s]]=!0}),this._setCheckedKeys(s,n,o)}setCheckedKeys(t,n=!1){this.defaultCheckedKeys=t;const s=this.key,o={};t.forEach(r=>{o[r]=!0}),this._setCheckedKeys(s,n,o)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(n=>{const s=this.getNode(n);s&&s.expand(null,this.autoExpandParent)})}setChecked(t,n,s){const o=this.getNode(t);o&&o.setChecked(!!n,s)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,n=!0){var s;const o=t[this.key],r=this.nodesMap[o];this.setCurrentNode(r),n&&this.currentNode&&this.currentNode.level>1&&((s=this.currentNode.parent)==null||s.expand(null,!0))}setCurrentNodeKey(t,n=!0){var s;if(this.currentNodeKey=t,Xe(t)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const o=this.getNode(t);o&&(this.setCurrentNode(o),n&&this.currentNode&&this.currentNode.level>1&&((s=this.currentNode.parent)==null||s.expand(null,!0)))}}const Je="RootTree",$t="NodeInstance",rt="TreeNodeMap",po=F({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=se("tree"),n=H($t),s=H(Je);return()=>{const o=e.node,{data:r,store:a}=o;return e.renderContent?e.renderContent(We,{_self:n,node:o,data:r,store:a}):V(s.ctx.slots,"default",{node:o,data:r},()=>[We(uo,{tag:"span",truncated:!0,class:t.be("node","label")},()=>[o.label])])}}});var vo=Q(po,[["__file","tree-node-content.vue"]]);function St(e){const t=H(rt,null),n={treeNodeExpand:s=>{var o;e.node!==s&&((o=e.node)==null||o.collapse())},children:[]};return t&&t.children.push(n),te(rt,n),{broadcastExpanded:s=>{if(e.accordion)for(const o of n.children)o.treeNodeExpand(s)}}}const Kt=Symbol("dragEvents");function go({props:e,ctx:t,el$:n,dropIndicator$:s,store:o}){const r=se("tree"),a=S({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return te(Kt,{treeNodeDragStart:({event:l,treeNode:d})=>{if(l.dataTransfer){if(Se(e.allowDrag)&&!e.allowDrag(d.node))return l.preventDefault(),!1;l.dataTransfer.effectAllowed="move";try{l.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=d,t.emit("node-drag-start",d.node,l)}},treeNodeDragOver:({event:l,treeNode:d})=>{if(!l.dataTransfer)return;const f=d,h=a.value.dropNode;h&&h.node.id!==f.node.id&&Me(h.$el,r.is("drop-inner"));const m=a.value.draggingNode;if(!m||!f)return;let _=!0,g=!0,N=!0,E=!0;Se(e.allowDrop)&&(_=e.allowDrop(m.node,f.node,"prev"),E=g=e.allowDrop(m.node,f.node,"inner"),N=e.allowDrop(m.node,f.node,"next")),l.dataTransfer.dropEffect=g||_||N?"move":"none",(_||g||N)&&h?.node.id!==f.node.id&&(h&&t.emit("node-drag-leave",m.node,h.node,l),t.emit("node-drag-enter",m.node,f.node,l)),_||g||N?a.value.dropNode=f:a.value.dropNode=null,f.node.nextSibling===m.node&&(N=!1),f.node.previousSibling===m.node&&(_=!1),f.node.contains(m.node,!1)&&(g=!1),(m.node===f.node||m.node.contains(f.node))&&(_=!1,g=!1,N=!1);const w=f.$el,I=w.querySelector(`.${r.be("node","content")}`).getBoundingClientRect(),R=n.value.getBoundingClientRect(),q=n.value.scrollTop;let A;const oe=_?g?.25:N?.45:1:Number.NEGATIVE_INFINITY,y=N?g?.75:_?.55:0:Number.POSITIVE_INFINITY;let b=-9999;const M=l.clientY-I.top;M<I.height*oe?A="before":M>I.height*y?A="after":g?A="inner":A="none";const L=w.querySelector(`.${r.be("node","expand-icon")}`).getBoundingClientRect(),O=s.value;A==="before"?b=L.top-R.top+q:A==="after"&&(b=L.bottom-R.top+q),O.style.top=`${b}px`,O.style.left=`${L.right-R.left}px`,A==="inner"?Wt(w,r.is("drop-inner")):Me(w,r.is("drop-inner")),a.value.showDropIndicator=A==="before"||A==="after",a.value.allowDrop=a.value.showDropIndicator||E,a.value.dropType=A,t.emit("node-drag-over",m.node,f.node,l)},treeNodeDragEnd:l=>{var d,f;const{draggingNode:h,dropType:m,dropNode:_}=a.value;if(l.preventDefault(),l.dataTransfer&&(l.dataTransfer.dropEffect="move"),h?.node.data&&_){const g={data:h.node.data};m!=="none"&&h.node.remove(),m==="before"?(d=_.node.parent)==null||d.insertBefore(g,_.node):m==="after"?(f=_.node.parent)==null||f.insertAfter(g,_.node):m==="inner"&&_.node.insertChild(g),m!=="none"&&(o.value.registerNode(g),o.value.key&&h.node.eachNode(N=>{var E;(E=o.value.nodesMap[N.data[o.value.key]])==null||E.setChecked(N.checked,!o.value.checkStrictly)})),Me(_.$el,r.is("drop-inner")),t.emit("node-drag-end",h.node,_.node,m,l),m!=="none"&&t.emit("node-drop",h.node,_.node,m,l)}h&&!_&&t.emit("node-drag-end",h.node,null,m,l),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const mo=F({name:"ElTreeNode",components:{ElCollapseTransition:ln,ElCheckbox:dn,NodeContent:vo,ElIcon:ce,Loading:Qt},props:{node:{type:le,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(e,t){const n=se("tree"),{broadcastExpanded:s}=St(e),o=H(Je),r=S(!1),a=S(!1),i=S(),c=S(),u=S(),l=H(Kt),d=Oe();te($t,d),e.node.expanded&&(r.value=!0,a.value=!0);const f=o.props.props.children||"children";Y(()=>{var y;const b=(y=e.node.data)==null?void 0:y[f];return b&&[...b]},()=>{e.node.updateChildren()}),Y(()=>e.node.indeterminate,y=>{_(e.node.checked,y)}),Y(()=>e.node.checked,y=>{_(y,e.node.indeterminate)}),Y(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),Y(()=>e.node.expanded,y=>{Ce(()=>r.value=y),y&&(a.value=!0)});const h=y=>Ye(o.props.nodeKey,y.data),m=y=>{const b=e.props.class;if(!b)return{};let M;if(Se(b)){const{data:L}=y;M=b(L,y)}else M=b;return mt(M)?{[M]:!0}:M},_=(y,b)=>{(i.value!==y||c.value!==b)&&o.ctx.emit("check-change",e.node.data,y,b),i.value=y,c.value=b},g=y=>{ze(o.store,o.ctx.emit,()=>{var b;if((b=o?.props)==null?void 0:b.nodeKey){const L=h(e.node);o.store.value.setCurrentNodeKey(L)}else o.store.value.setCurrentNode(e.node)}),o.currentNode.value=e.node,o.props.expandOnClickNode&&E(),(o.props.checkOnClickNode||e.node.isLeaf&&o.props.checkOnClickLeaf&&e.showCheckbox)&&!e.node.disabled&&w(!e.node.checked),o.ctx.emit("node-click",e.node.data,e.node,d,y)},N=y=>{var b;(b=o.instance.vnode.props)!=null&&b.onNodeContextmenu&&(y.stopPropagation(),y.preventDefault()),o.ctx.emit("node-contextmenu",y,e.node.data,e.node,d)},E=()=>{e.node.isLeaf||(r.value?(o.ctx.emit("node-collapse",e.node.data,e.node,d),e.node.collapse()):e.node.expand(()=>{t.emit("node-expand",e.node.data,e.node,d)}))},w=y=>{const b=o?.props.checkStrictly,M=e.node.childNodes;!b&&M.length&&(y=M.some(L=>!L.isEffectivelyChecked)),e.node.setChecked(y,!b),Ce(()=>{const L=o.store.value;o.ctx.emit("check",e.node.data,{checkedNodes:L.getCheckedNodes(),checkedKeys:L.getCheckedKeys(),halfCheckedNodes:L.getHalfCheckedNodes(),halfCheckedKeys:L.getHalfCheckedKeys()})})};return{ns:n,node$:u,tree:o,expanded:r,childNodeRendered:a,oldChecked:i,oldIndeterminate:c,getNodeKey:h,getNodeClass:m,handleSelectChange:_,handleClick:g,handleContextMenu:N,handleExpandIconClick:E,handleCheckChange:w,handleChildNodeExpand:(y,b,M)=>{s(b),o.ctx.emit("node-expand",y,b,M)},handleDragStart:y=>{o.props.draggable&&l.treeNodeDragStart({event:y,treeNode:e})},handleDragOver:y=>{y.preventDefault(),o.props.draggable&&l.treeNodeDragOver({event:y,treeNode:{$el:u.value,node:e.node}})},handleDrop:y=>{y.preventDefault()},handleDragEnd:y=>{o.props.draggable&&l.treeNodeDragEnd(y)},CaretRight:Xt}}});function yo(e,t,n,s,o,r){const a=B("el-icon"),i=B("el-checkbox"),c=B("loading"),u=B("node-content"),l=B("el-tree-node"),d=B("el-collapse-transition");return Ne((v(),T("div",{ref:"node$",class:G([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:Z(e.handleClick,["stop"]),onContextmenu:e.handleContextMenu,onDragstart:Z(e.handleDragStart,["stop"]),onDragover:Z(e.handleDragOver,["stop"]),onDragend:Z(e.handleDragEnd,["stop"]),onDrop:Z(e.handleDrop,["stop"])},[x("div",{class:G(e.ns.be("node","content")),style:je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(v(),K(a,{key:0,class:G([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Z(e.handleExpandIconClick,["stop"])},{default:C(()=>[(v(),K(ke(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):J("v-if",!0),e.showCheckbox?(v(),K(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:Z(()=>{},["stop"]),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):J("v-if",!0),e.node.loading?(v(),K(a,{key:2,class:G([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:C(()=>[D(c)]),_:1},8,["class"])):J("v-if",!0),D(u,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),D(d,null,{default:C(()=>[!e.renderAfterExpand||e.childNodeRendered?Ne((v(),T("div",{key:0,class:G(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:Z(()=>{},["stop"])},[(v(!0),T(ne,null,ae(e.node.childNodes,f=>(v(),K(l,{key:e.getNodeKey(f),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:f,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded","onClick"])),[[Re,e.expanded]]):J("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[Re,e.node.visible]])}var Co=Q(mo,[["render",yo],["__file","tree-node.vue"]]);function ko({el$:e},t){const n=se("tree");Ke(()=>{r()}),it(()=>{Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(i=>{i.setAttribute("tabindex","-1")})});function s(a,i){var c,u;const l=t.value.getNode(a[i].dataset.key);return l.canFocus&&l.visible&&(((c=l.parent)==null?void 0:c.expanded)||((u=l.parent)==null?void 0:u.level)===0)}ct(e,"keydown",a=>{const i=a.target;if(!i.className.includes(n.b("node")))return;const c=we(a),u=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),l=u.indexOf(i);let d;if([z.up,z.down].includes(c)){if(a.preventDefault(),c===z.up){d=l===-1?0:l!==0?l-1:u.length-1;const h=d;for(;!s(u,d);){if(d--,d===h){d=-1;break}d<0&&(d=u.length-1)}}else{d=l===-1?0:l<u.length-1?l+1:0;const h=d;for(;!s(u,d);){if(d++,d===h){d=-1;break}d>=u.length&&(d=0)}}d!==-1&&u[d].focus()}[z.left,z.right].includes(c)&&(a.preventDefault(),i.click());const f=i.querySelector('[type="checkbox"]');[z.enter,z.numpadEnter,z.space].includes(c)&&f&&(a.preventDefault(),f.click())});const r=()=>{var a;if(!e.value)return;const i=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(l=>{l.setAttribute("tabindex","-1")});const u=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(a=i[0])==null||a.setAttribute("tabindex","0")}}const No={"check-change":(e,t,n)=>e&&Pe(t)&&Pe(n),"current-change":(e,t)=>!0,"node-click":(e,t,n,s)=>e&&t&&s instanceof Event,"node-contextmenu":(e,t,n,s)=>e instanceof Event&&t&&n,"node-collapse":(e,t,n)=>e&&t,"node-expand":(e,t,n)=>e&&t,check:(e,t)=>e&&t,"node-drag-start":(e,t)=>e&&t,"node-drag-end":(e,t,n,s)=>e&&s,"node-drop":(e,t,n,s)=>e&&t&&s,"node-drag-leave":(e,t,n)=>e&&t&&n,"node-drag-enter":(e,t,n)=>e&&t&&n,"node-drag-over":(e,t,n)=>e&&t&&n},bo=F({name:"ElTree",components:{ElTreeNode:Co},props:{data:{type:U(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:{type:U(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:U(Function)},allowDrop:{type:U(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:ut}},emits:No,setup(e,t){const{t:n}=ht(),s=se("tree"),o=S(new ho({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));o.value.initialize();const r=S(o.value.root),a=S(null),i=S(null),c=S(null),{broadcastExpanded:u}=St(e),{dragState:l}=go({props:e,ctx:t,el$:i,dropIndicator$:c,store:o});ko({el$:i},o);const d=Oe(),f=P(()=>{let p=d?.parent;for(;p;){if(p.type.name==="ElTreeSelect")return!0;p=p.parent}return!1}),h=P(()=>{const{childNodes:p}=r.value;return(!p||p.length===0||p.every(({visible:$})=>!$))&&!f.value});Y(()=>e.currentNodeKey,p=>{o.value.setCurrentNodeKey(p??null)}),Y(()=>e.defaultCheckedKeys,(p,$)=>{Zt(p,$)||o.value.setDefaultCheckedKey(p??[])}),Y(()=>e.defaultExpandedKeys,p=>{o.value.setDefaultExpandedKeys(p??[])}),Y(()=>e.data,p=>{o.value.setData(p)},{deep:!0}),Y(()=>e.checkStrictly,p=>{o.value.checkStrictly=p});const m=p=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");o.value.filter(p)},_=p=>Ye(e.nodeKey,p.data),g=p=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${p}`)},N=p=>{g("getNodePath");const $=o.value.getNode(p);if(!$)return[];const fe=[$.data];let ge=$.parent;for(;ge&&ge!==r.value;)fe.push(ge.data),ge=ge.parent;return fe.reverse()},E=(p,$)=>o.value.getCheckedNodes(p,$),w=p=>o.value.getCheckedKeys(p),I=()=>{const p=o.value.getCurrentNode();return p?p.data:null},R=()=>{g("getCurrentKey");const p=I();return p?p[e.nodeKey]:null},q=(p,$)=>{g("setCheckedNodes"),o.value.setCheckedNodes(p,$)},A=(p,$)=>{g("setCheckedKeys"),o.value.setCheckedKeys(p,$)},oe=(p,$,fe)=>{o.value.setChecked(p,$,fe)},y=()=>o.value.getHalfCheckedNodes(),b=()=>o.value.getHalfCheckedKeys(),M=(p,$=!0)=>{g("setCurrentNode"),ze(o,t.emit,()=>{u(p),o.value.setUserCurrentNode(p,$)})},L=(p=null,$=!0)=>{g("setCurrentKey"),ze(o,t.emit,()=>{u(),o.value.setCurrentNodeKey(p,$)})},O=p=>o.value.getNode(p),ue=p=>{o.value.remove(p)},j=(p,$)=>{o.value.append(p,$)},X=(p,$)=>{o.value.insertBefore(p,$)},ve=(p,$)=>{o.value.insertAfter(p,$)},At=(p,$,fe)=>{u($),t.emit("node-expand",p,$,fe)},Bt=(p,$)=>{g("updateKeyChild"),o.value.updateChildren(p,$)};return te(Je,{ctx:t,props:e,store:o,root:r,currentNode:a,instance:d}),te(en,void 0),{ns:s,store:o,root:r,currentNode:a,dragState:l,el$:i,dropIndicator$:c,isEmpty:h,filter:m,getNodeKey:_,getNodePath:N,getCheckedNodes:E,getCheckedKeys:w,getCurrentNode:I,getCurrentKey:R,setCheckedNodes:q,setCheckedKeys:A,setChecked:oe,getHalfCheckedNodes:y,getHalfCheckedKeys:b,setCurrentNode:M,setCurrentKey:L,t:n,getNode:O,remove:ue,append:j,insertBefore:X,insertAfter:ve,handleNodeExpand:At,updateKeyChildren:Bt}}});function _o(e,t,n,s,o,r){const a=B("el-tree-node");return v(),T("div",{ref:"el$",class:G([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(v(!0),T(ne,null,ae(e.root.childNodes,i=>(v(),K(a,{key:e.getNodeKey(i),node:i,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(v(),T("div",{key:0,class:G(e.ns.e("empty-block"))},[V(e.$slots,"empty",{},()=>{var i;return[x("span",{class:G(e.ns.e("empty-text"))},W((i=e.emptyText)!=null?i:e.t("el.tree.emptyText")),3)]})],2)):J("v-if",!0),Ne(x("div",{ref:"dropIndicator$",class:G(e.ns.e("drop-indicator"))},null,2),[[Re,e.dragState.showDropIndicator]])],2)}var Eo=Q(bo,[["render",_o],["__file","tree.vue"]]);const vs=Ge(Eo),gs=F({__name:"EasyPagination",props:{layout:{default:"total, sizes, prev, pager, next, jumper,slot"},watchTabsClose:{type:Boolean}},emits:["refresh"],setup(e,{emit:t}){const n=e,s=t;function o(){s("refresh")}return Ke(()=>{n.watchTabsClose&&window.addEventListener("storage",r=>{r.key==="tabClosed"&&o()})}),(r,a)=>{const i=ce,c=pe,u=tn;return v(),K(u,{layout:n.layout},{default:C(()=>[D(c,{type:"info",link:"",onClick:a[0]||(a[0]=l=>o())},{default:C(()=>[D(i,null,{default:C(()=>[D(k(nn))]),_:1})]),_:1})]),_:1},8,["layout"])}}}),Ot={__name:"SplitSpan",props:{text:{type:String,default:""},keyword:{type:String,default:""},highlightClass:{type:String,default:"highlight"}},setup(e){return(t,n)=>(v(!0),T(ne,null,ae(e.text.split(new RegExp(`(${e.keyword})`,"i")).filter(Boolean),(s,o)=>(v(),T("span",{key:`list${s}${o}`,class:G({"bg-yellow-100 text-black italic":s.toLowerCase()===e.keyword.toLowerCase()})},W(s),3))),128))}},wo={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function Io(e,t){return v(),T("svg",wo,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800L147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"},null,-1),x("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4a51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4a51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4a51.2 51.2 0 0 1 0 102.4"},null,-1)])])}const To=_e({name:"ep-chat-dot-square",render:Io}),Do={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function $o(e,t){return v(),T("svg",Do,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"},null,-1)])])}const So=_e({name:"ep-folder",render:$o}),Ko={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function Oo(e,t){return v(),T("svg",Ko,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"},null,-1)])])}const Ao=_e({name:"ep-document",render:Oo}),Bo={class:"flex items-center flex-1 overflow-hidden flex-nowrap gap-0.5 justify-center"},Mo={key:0,class:"text-error"},Fo={key:1},Ro={class:"flex items-center shrink-0 tree-node-button-group"},ms=F({__name:"CustomTreeNode",props:{search:{},node:{},data:{}},setup(e){const t=e;return(n,s)=>{const o=Ao,r=So,a=ce,i=on,c=To,u=Ot,l=lt("tooltip");return v(),T("div",Bo,[e.data.isRequired?(v(),T("span",Mo,"*")):J("",!0),D(i,{hidden:e.data.status!=="4","is-dot":"",offset:[-2,4],"badge-class":"size-[9px]!",color:"var(--el-color-success)"},{default:C(()=>[D(a,{class:"shrink-0",color:k(re).isValidFailed(e.data)?"var(--el-color-warning)":"currentColor"},{default:C(()=>[k(re).isDocNode(e.data)?(v(),K(o,{key:0})):(v(),K(r,{key:1}))]),_:1},8,["color"])]),_:1},8,["hidden"]),k(re).isHasAnnotation(e.data)?(v(),K(a,{key:1,class:"shrink-0"},{default:C(()=>[D(c)]),_:1})):J("",!0),Ne((v(),T("div",{class:G(["flex-1 truncate",{"bg-highlight":k(re).isAssociation(e.data),"text-error":k(re).isStatusError(e.data),"text-warning":k(re).isStatusWarning(e.data),"italic opacity-70":k(re).isAccessed(e.data),"underline underline-offset-4 decoration-[var(--el-color-primary)]":k(re).isHighlight(e.data)}])},[t.search?(v(),K(u,{key:0,text:e.node[k(Ze)],keyword:t.search},null,8,["text","keyword"])):(v(),T("span",Fo,W(e.node[k(Ze)]),1))],2)),[[l]]),x("div",Ro,[V(n.$slots,"tree-node-button-group",{data:e.data,node:e.node})])])}}}),Lo={class:"flex items-center justify-center"},Po={class:"text-gray-500 flex-shrink-0"},xo={class:"font-semibold text-[var(--el-color-primary)] truncate"},ys=F({__name:"CustomText",props:{preText:{default:""},separator:{default:""},text:{}},setup(e){const t=e;return(n,s)=>{const o=lt("tooltip");return v(),T("div",Lo,[x("div",Po,W(t.preText)+W(t.separator),1),Ne((v(),T("div",xo,[be(W(t.text),1)])),[[o]])])}}}),zo={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function Ho(e,t){return v(),T("svg",zo,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224a112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224a112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224a112 112 0 0 1 0-224"},null,-1)])])}const jo=_e({name:"ep-more-filled",render:Ho}),Uo={class:"flex gap-2"},Go={key:1},Vo={class:"el-dropdown-link"},Cs=F({__name:"FileList",props:$e({fileList:{},fileKey:{},defaultCheckedKeys:{},showCheckbox:{type:Boolean,default:!1},filterNodeMethod:{},checkNodeMethod:{},treePropsDisabled:{},search:{},draggable:{type:Boolean,default:!1},enableRename:{type:Boolean,default:!1},allowDrop:{},allowDrag:{}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:$e(["view","delete","download","rename","end"],["update:fileList"]),setup(e,{expose:t,emit:n}){const s=e,o=n,{t:r}=Ve(),a=dt(e,"fileList"),i=S([]),c=S([]),u=P(()=>c.value.map(E=>E[s.fileKey])),l=H(sn,S([])),d={rename:{icon:yn,permission:Fe.UPDATE},download:{icon:mn,permission:Fe.DOWNLOAD},delete:{icon:fn,permission:Fe.DELETE}},f=P(()=>s.enableRename?d:cn(d,"rename")),h=Ue({filter:g}),m=P(()=>{const E=Object.values(f.value).map(I=>I.permission);return l.value.some(I=>E.includes(I))});function _(E){const w=c.value.indexOf(E);if(s.checkNodeMethod){s.checkNodeMethod(E[s.fileKey],w===-1);return}w>-1?c.value.splice(w,1):c.value.push(E)}function g(E){i.value=a.value.filter(w=>s.filterNodeMethod?.(E,w)??w.label.includes(E))}Y(a,()=>{g("")}),Y(()=>s.defaultCheckedKeys,E=>{E&&Ce(()=>{c.value=s.fileList.filter(w=>E.includes(w[s.fileKey]))})},{immediate:!0,deep:!0}),t(h);const N=["","","warning","error"];return(E,w)=>{const I=vn,R=gn,q=ce,A=pe,oe=Ot,y=jo,b=so,M=ro,L=oo,O=pn,ue=ft;return v(),K(ue,null,{default:C(()=>[D(k(hn),{modelValue:a.value,"onUpdate:modelValue":w[0]||(w[0]=j=>a.value=j),disabled:!s.draggable,class:"md:grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 md:gap-1 lg:gap-2 xl:gap-3",handle:".handle",onEnd:w[1]||(w[1]=j=>o("end",j))},{default:C(()=>[(v(!0),T(ne,null,ae(k(i),j=>(v(),K(O,de({key:j[s.fileKey]},{ref_for:!0},j,{"show-checkbox":s.showCheckbox,active:k(u).includes(j[s.fileKey]),disabled:s.treePropsDisabled?s.treePropsDisabled(j):!1,class:"relative",onActiveChange:X=>_(j)}),at({"content-label":C(({label:X})=>[s.search?(v(),K(oe,{key:0,text:X,keyword:s.search},null,8,["text","keyword"])):(v(),T("span",Go,W(X),1))]),"content-extra":C(()=>[k(m)?(v(),K(L,{key:0,placement:"bottom-end",onCommand:X=>o(X,j)},{dropdown:C(()=>[D(M,null,{default:C(()=>[(v(!0),T(ne,null,ae(k(f),(X,ve)=>(v(),T(ne,{key:ve},[k(l).includes(X.permission)?(v(),K(b,{key:0,icon:X.icon,command:ve},{default:C(()=>[be(W(k(r)(`button.${ve}`)),1)]),_:2},1032,["icon","command"])):J("",!0)],64))),128))]),_:1})]),default:C(()=>[x("span",Vo,[D(A,{circle:"",text:""},{default:C(()=>[D(q,null,{default:C(()=>[D(y)]),_:1})]),_:1})])]),_:1},8,["onCommand"])):J("",!0)]),default:C(()=>[x("div",Uo,[D(A,{onClick:X=>o("view",j)},{default:C(()=>[D(q,{class:"mr-1"},{default:C(()=>[D(R)]),_:1}),be(" "+W(k(r)("button.view")),1)]),_:1},8,["onClick"])])]),_:2},[j.checkStatus>1?{name:"before",fn:C(()=>[D(I,de({ref_for:!0},{[N[j.checkStatus]]:!0},{title:E.$t(`label.${N[j.checkStatus]}`)}),null,16,["title"])]),key:"0"}:void 0]),1040,["show-checkbox","active","disabled","onActiveChange"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})}}}),qo={class:"flex"},Yo={class:"text-xs leading-none"},Jo={class:"font-bold leading-none text-mini"},Wo=F({__name:"Stat",props:$e({data:{},modelValue:{}},{modelValue:{},modelModifiers:{}}),emits:$e(["change"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const s=e,o=n,{t:r}=Ve(),a=dt(e,"modelValue"),i=Ue({active:null});function c(u){const l=s.data[u]||null;i.active=l,o("change",l)}return xt(()=>{c(a.value||"")}),t(i),(u,l)=>{const d=pe;return v(),T("div",{class:"flex items-center justify-center",onChange:l[0]||(l[0]=()=>{})},[(v(!0),T(ne,null,ae(s.data,(f,h)=>(v(),K(d,de({key:h},{ref_for:!0},f,{class:{"opacity-70":a.value!==h},onClick:m=>a.value=a.value===h?"":h}),{default:C(()=>[x("div",qo,[x("div",Yo,W(f.label||k(r)(`label.${h}`)),1),x("div",Jo,W(f.value),1)])]),_:2},1040,["class","onClick"]))),128))],32)}}}),ks=Ct(Wo,[["__scopeId","data-v-50d981da"]]),Qo={class:"flex items-center justify-between",style:{"--el-fill-color-light":"var(--el-text-color-disabled)"}},Xo={class:"flex-1 Toolbar-btn"},Zo={key:0,class:"flex-shrink-0 flex Toolbar-btn pr-2"},es=F({__name:"Toolbar",props:{data:{},extraData:{}},setup(e){const{t}=Ve(),{currentNode:n,currentNodeData:s}=rn(un());return(o,r)=>{const a=ce,i=pe,c=an;return v(),T("div",Qo,[x("div",Xo,[(v(!0),T(ne,null,ae(e.data,(u,l)=>(v(),K(c,{key:l,permission:u.permission},{default:C(()=>[D(i,{text:"",class:"shadow-[unset]!",disabled:("unMaybeRefOrFunction"in o?o.unMaybeRefOrFunction:k(et))(u.disabled||!1,k(s),k(n)),onClick:d=>u.handler(k(s),k(n))},{default:C(()=>[D(a,{size:"18px"},{default:C(()=>[(v(),K(ke(u.icon)))]),_:2},1024),be(" "+W(k(t)(`button.${l}`)),1)]),_:2},1032,["disabled","onClick"])]),_:2},1032,["permission"]))),128))]),e.extraData?(v(),T("div",Zo,[(v(!0),T(ne,null,ae(e.extraData,(u,l)=>(v(),K(c,{key:l,permission:u.permission},{default:C(()=>[D(i,{type:u.type,disabled:("unMaybeRefOrFunction"in o?o.unMaybeRefOrFunction:k(et))(u.disabled||!1,k(s),k(n)),onClick:d=>u.handler(k(s),k(n))},{default:C(()=>[D(a,{class:"mr-1",size:"16px"},{default:C(()=>[(v(),K(ke(u.icon)))]),_:2},1024),be(" "+W(k(t)(`button.${l}`)),1)]),_:2},1032,["type","disabled","onClick"])]),_:2},1032,["permission"]))),128))])):J("",!0)])}}}),Ns=Ct(es,[["__scopeId","data-v-69de1f7d"]]),ts={viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function ns(e,t){return v(),T("svg",ts,[...t[0]||(t[0]=[x("path",{fill:"currentColor",d:"m795.904 750.72l124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704a352 352 0 0 0 0 704"},null,-1)])])}const bs=_e({name:"ep-search",render:ns});export{vs as E,bs as I,ks as S,Ns as T,Cs as _,ys as a,ms as b,gs as c};
@@ -1 +1 @@
1
- import{computed as d}from"vue";import{bU as b,bV as I,n as o,bW as m,aB as x,bX as c}from"./main-DrqZSaj0.js";var u=1/0,g=17976931348623157e292;function h(n){if(!n)return n===0?n:0;if(n=b(n),n===u||n===-u){var r=n<0?-1:1;return r*g}return n===n?n:0}function p(n){var r=h(n),t=r%1;return r===r?t?r-t:r:0}function A(n){return function(r,t,e){var i=Object(r);if(!I(r)){var a=o(t);r=m(r),t=function(s){return a(i[s],s,i)}}var f=n(r,t,e);return f>-1?i[a?r[f]:f]:void 0}}var F=Math.max;function N(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var i=t==null?0:p(t);return i<0&&(i=F(e+i,0)),x(n,o(r),i)}var $=A(N);const M=c.global.t,v="select";function E(n,r,t=0,e=!1){return Array.from({length:r-t},(i,a)=>{const f=t+a;return{label:d(()=>M(`${v}.${n}.${f}`)),value:e?`${f}`:f}})}function O(n,r,t="label"){const e=$(n,r);return e?e[t]:""}export{E as c,O as f,M as t};
1
+ import{computed as d}from"vue";import{bU as b,bV as I,n as o,bW as m,aB as x,bX as c}from"./main-DINM6Pr5.js";var u=1/0,g=17976931348623157e292;function h(n){if(!n)return n===0?n:0;if(n=b(n),n===u||n===-u){var r=n<0?-1:1;return r*g}return n===n?n:0}function p(n){var r=h(n),t=r%1;return r===r?t?r-t:r:0}function A(n){return function(r,t,e){var i=Object(r);if(!I(r)){var a=o(t);r=m(r),t=function(s){return a(i[s],s,i)}}var f=n(r,t,e);return f>-1?i[a?r[f]:f]:void 0}}var F=Math.max;function N(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var i=t==null?0:p(t);return i<0&&(i=F(e+i,0)),x(n,o(r),i)}var $=A(N);const M=c.global.t,v="select";function E(n,r,t=0,e=!1){return Array.from({length:r-t},(i,a)=>{const f=t+a;return{label:d(()=>M(`${v}.${n}.${f}`)),value:e?`${f}`:f}})}function O(n,r,t="label"){const e=$(n,r);return e?e[t]:""}export{E as c,O as f,M as t};
@@ -1 +1 @@
1
- import{j as n}from"./main-DrqZSaj0.js";function $(){return n.get("/svc/streams/pdf-view-file-types")}function i({type:t,id:e,streamId:s,thumbnailId:r}){return`${window.__API_URL__??"/"}svc/streams/${t}/${e}/${s}/thumbnail/${r}/_download`}function m({type:t,id:e,streamId:s,isDownload:r=!1,isPDF:a=!1}){return`${window.__API_URL__??"/"}svc/streams/${t}/${e}/${s}${a?"/_view":""}${r?"/_download?watermark=true":""}`}function u(t,e,s){return n.post(`/svc/streams/${t}/${e}/_order`,s)}function c(t,e,s){return n.post(`/svc/streams/${t}/${e}/_delete`,s)}function _(t,e,s,r){return n.post(`/svc/streams/${t}/${e}/${s}/_rename`,{streamName:r})}function f(t,e,s){return n.get(`/svc/streams/${t}/${e}/${s}/annotations`)}function p(t,e,s,r){return n.post(`/svc/streams/${t}/${e}/${s}/annotations`,r)}export{m as a,$ as b,_ as c,c as d,f as e,p as f,i as g,u as p};
1
+ import{j as n}from"./main-DINM6Pr5.js";function $(){return n.get("/svc/streams/pdf-view-file-types")}function i({type:t,id:e,streamId:s,thumbnailId:r}){return`${window.__API_URL__??"/"}svc/streams/${t}/${e}/${s}/thumbnail/${r}/_download`}function m({type:t,id:e,streamId:s,isDownload:r=!1,isPDF:a=!1}){return`${window.__API_URL__??"/"}svc/streams/${t}/${e}/${s}${a?"/_view":""}${r?"/_download?watermark=true":""}`}function u(t,e,s){return n.post(`/svc/streams/${t}/${e}/_order`,s)}function c(t,e,s){return n.post(`/svc/streams/${t}/${e}/_delete`,s)}function _(t,e,s,r){return n.post(`/svc/streams/${t}/${e}/${s}/_rename`,{streamName:r})}function f(t,e,s){return n.get(`/svc/streams/${t}/${e}/${s}/annotations`)}function p(t,e,s,r){return n.post(`/svc/streams/${t}/${e}/${s}/annotations`,r)}export{m as a,$ as b,_ as c,c as d,f as e,p as f,i as g,u as p};
@@ -0,0 +1,2 @@
1
+ V d�����4�X�"��t�e���/�C~�j��o�ES�D�S�m6��AA%z�������ٰٸk[,��l�ƣ����� �\g�ޭ�� ���F���xn��_�,�b�BH8�������V�m�1J`��_zUB�զ=Z͇D�
2
+ Ўc�r��!,�Q�S�d,�nƉ�N��;v$�f;o��10۫l%��C@���S*4��)�v��C�� :�C.?��A)|*D��D�ܠ��>b#�`|�%}RƓ�t��M�<M쇻k�s`���[�3�ዲv��wb`7�F���`���v��=���1~���
@@ -1 +1 @@
1
- import{j as e}from"./main-DrqZSaj0.js";function r(){return e.get("/svc/types?filter=user&permission=create&getAll=true")}function i(t){return e.get(`/svc/types/${t}`)}export{r as a,i as g};
1
+ import{j as e}from"./main-DINM6Pr5.js";function r(){return e.get("/svc/types?filter=user&permission=create&getAll=true")}function i(t){return e.get(`/svc/types/${t}`)}export{r as a,i as g};
Binary file
Binary file
@@ -1 +1 @@
1
- import{n as i}from"./profile-DmVZXaLc.js";import{u,c as n}from"./viewer-CWuXsy7c.js";async function p(t,a){const{success:r,data:e}=await i(t,a);if(!r)return;const s=u();s.documentTypes=e._documentTypes,s.treeData=n in e?[e]:s.parameters?.dataCategory==="1"?[...e.vouchers,...e.bills]:[...e.bills,...e.vouchers],s.addTicketPaths=Array.from(new Set(s.treeData.map(o=>(o.addTicketPaths||"").split(",")).flat())).filter(Boolean),s.businessKey=e.businessKey||e.voucherKey,s.bisCategory=e.businessTypeCode||e.voucherTypeCode,s.id=e.id}export{p as u};
1
+ import{n as i}from"./profile-BmqeDJ0-.js";import{u,c as n}from"./viewer-BPijlLdi.js";async function p(t,a){const{success:r,data:e}=await i(t,a);if(!r)return;const s=u();s.documentTypes=e._documentTypes,s.treeData=n in e?[e]:s.parameters?.dataCategory==="1"?[...e.vouchers,...e.bills]:[...e.bills,...e.vouchers],s.addTicketPaths=Array.from(new Set(s.treeData.map(o=>(o.addTicketPaths||"").split(",")).flat())).filter(Boolean),s.businessKey=e.businessKey||e.voucherKey,s.bisCategory=e.businessTypeCode||e.voucherTypeCode,s.id=e.id}export{p as u};
@@ -1 +1 @@
1
- import{ref as C,unref as D,isRef as Q,h as R,defineComponent as A,mergeModels as N,useModel as L,computed as z,reactive as k,watch as J,createBlock as K,openBlock as O,withCtx as v,renderSlot as X,createElementVNode as S,createElementBlock as M,Fragment as q,renderList as P,createVNode as j,mergeProps as F,toHandlers as U,createTextVNode as B,toDisplayString as G}from"vue";import{a as T,E as Y,aA as Z,ag as ee,ah as te,t as ne}from"./main-DrqZSaj0.js";import{t as V}from"./select-C5rnQwT8.js";import{E as ie}from"./DynamicElFormItem.vue_vue_type_style_index_0_lang-vV5itYwG.js";import{useI18n as se}from"vue-i18n";import{c as re,b as oe}from"./index-CQuIPoUT.js";var I=function(n,e){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var i in s)s.hasOwnProperty(i)&&(t[i]=s[i])},I(n,e)};function H(n,e){I(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function ae(n){var e=typeof Symbol=="function"&&n[Symbol.iterator],t=0;return e?e.call(n):{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}function ce(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var s=t.call(n),i,r=[],o;try{for(;(e===void 0||e-- >0)&&!(i=s.next()).done;)r.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return r}function ue(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(ce(arguments[e]));return n}var W=(function(){function n(e,t){this.target=t,this.type=e}return n})(),le=(function(n){H(e,n);function e(t,s){var i=n.call(this,"error",s)||this;return i.message=t.message,i.error=t,i}return e})(W),fe=(function(n){H(e,n);function e(t,s,i){t===void 0&&(t=1e3),s===void 0&&(s="");var r=n.call(this,"close",i)||this;return r.wasClean=!0,r.code=t,r.reason=s,r}return e})(W);var de=function(){if(typeof WebSocket<"u")return WebSocket},he=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},h={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},pe=(function(){function n(e,t,s){var i=this;s===void 0&&(s={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(r){i._debug("open event");var o=i._options.minUptime,c=o===void 0?h.minUptime:o;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},c),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(a){return i._ws.send(a)}),i._messageQueue=[],i.onopen&&i.onopen(r),i._listeners.open.forEach(function(a){return i._callEventListener(r,a)})},this._handleMessage=function(r){i._debug("message event"),i.onmessage&&i.onmessage(r),i._listeners.message.forEach(function(o){return i._callEventListener(r,o)})},this._handleError=function(r){i._debug("error event",r.message),i._disconnect(void 0,r.message==="TIMEOUT"?"timeout":void 0),i.onerror&&i.onerror(r),i._debug("exec error listeners"),i._listeners.error.forEach(function(o){return i._callEventListener(r,o)}),i._connect()},this._handleClose=function(r){i._debug("close event"),i._clearTimeouts(),i._shouldReconnect&&i._connect(),i.onclose&&i.onclose(r),i._listeners.close.forEach(function(o){return i._callEventListener(r,o)})},this._url=e,this._protocols=t,this._options=s,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,s){return typeof s=="string"?t+=s.length:s instanceof Blob?t+=s.size:t+=s.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,s=t===void 0?h.maxEnqueuedMessages:t;this._messageQueue.length<s&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,s,i=this._listeners[e.type];if(i)try{for(var r=ae(i),o=r.next();!o.done;o=r.next()){var c=o.value;this._callEventListener(e,c)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(s){return s!==t}))},n.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,ue(["RWS>"],e))},n.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,s=t===void 0?h.reconnectionDelayGrowFactor:t,i=e.minReconnectionDelay,r=i===void 0?h.minReconnectionDelay:i,o=e.maxReconnectionDelay,c=o===void 0?h.maxReconnectionDelay:o,a=0;return this._retryCount>0&&(a=r*Math.pow(s,this._retryCount-1),a>c&&(a=c)),this._debug("next delay",a),a},n.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},n.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},n.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,s=t.maxRetries,i=s===void 0?h.maxRetries:s,r=t.connectionTimeout,o=r===void 0?h.connectionTimeout:r,c=t.WebSocket,a=c===void 0?de():c;if(this._retryCount>=i){this._debug("max retries reached",this._retryCount,">=",i);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!he(a))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(l){e._closeCalled||(e._debug("connect",{url:l,protocols:e._protocols}),e._ws=e._protocols?new a(l,e._protocols):new a(l),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},o))})}},n.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new le(Error("TIMEOUT"),this))},n.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new fe(e,t,this))}catch{}}},n.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},n.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},n.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},n.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},n.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},n})();class p extends pe{loadingInstance=null;requests={};fileList=[];fileData={};isOpen=C(!1);currentDeviceId="";static instance;static uuid(){const e=[],t="0123456789abcdef";for(let s=0;s<36;s++)e[s]=t.substr(Math.floor(Math.random()*16),1);return e[14]="4",e[19]=t.substr(Number(e[19])&3|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}getFileList(){return D(this.fileList)}getFileData(){return D(this.fileData)}constructor(e,t={}){if(super(e),this.updateConfig(t),p.instance)return p.instance;p.instance=this,this.init()}init(){this.loadingInstance=null,this.requests={},this.onopen=this.openHandler,this.onclose=this.closeHandler,this.onmessage=this.messageHandler,this.onerror=this.errorHandler}updateConfig(e){this.fileList=e.fileList||[],this.fileData=e.fileData||{},this.isOpen=Q(e.isOpen)?e.isOpen:C(e.isOpen||!1),this.currentDeviceId=""}showDeviceListDialog(e){ie({title:V("button.selectScanSource"),message:()=>R(ee,{style:{width:"calc(var(--el-messagebox-width) - var(--el-messagebox-padding-primary) * 2)"},modelValue:this.currentDeviceId,"onUpdate:modelValue":t=>{this.currentDeviceId=t}},e.map(t=>R(te,{label:t.deviceId,value:t.deviceId})))}).then(()=>{this.currentDeviceId&&this.switchScanDevice(this.currentDeviceId)}).catch(()=>{})}switchScanDevice(e){const t=this.buildRequest("001002",{scannerId:e}),s=()=>{this.loadingInstance?.close()};this.requests[t.traceId]={request:t,completed:s},this.sendMsg(t)}selectScanSource(){const e=this.buildRequest("001001"),t=({data:s})=>{if(this.loadingInstance?.close(),!s||!s.length){T.error(V("message.notScanDevice"));return}this.showDeviceListDialog(s)};this.requests[e.traceId]={request:e,completed:t},this.sendMsg(e)}showScanConfig(){const e=()=>{this.loadingInstance?.close()},t=this.buildRequest("001015");this.requests[t.traceId]={request:t,completed:e},this.sendMsg(t)}scan(){const e={xferCount:-1,fileFormat:".jpg",fileSavePath:"",fileType:"Base64",fileNamePrefix:"Scan",fileNameFormat:"datetime",fileMd5Enabled:!1},t=this.buildRequest("001008",e),s=i=>{const{function:r,data:o}=i;if(r==="001008")return;if(r==="001011"){this.loadingInstance?.close();return}const{fileName:c,fileResult:a}=o;if(!a)return;const l="image/jpeg",g=`data:${l};base64, ${a}`,_=Z(g),w=URL.createObjectURL(_),f=new File([_],c,{type:l}),y=c;f.uid=y,this.getFileList().push({...this.getFileData(),name:c,uid:y,url:w,dataSource:"1",type:l,size:f.size,deg:0,raw:f})};this.requests[t.traceId]={request:t,completed:s},this.sendMsg(t)}clear(){if(this.requests={},!this.getFileList().length)return;this.getFileList().splice(0,this.getFileList().length);const e=()=>{this.loadingInstance?.close(),this.requests={}},t=this.buildRequest("001013");this.requests[t.traceId]={request:t,completed:e},this.sendMsg(t)}openHandler(){this.isOpen.value=!0}closeHandler(){this.isOpen.value=!1}messageHandler(e){const t=this.getMsg(e),s=this.requests[t.traceId];switch(t.code){case 0:s?s.completed&&s.completed(t):this.loadingInstance?.close();break;case 130115:this.selectScanSource();break;default:this.loadingInstance?.close(),T.error(t.msg||t.code)}}errorHandler(){console.error("nkoScanClient连接出错")}sendMsg(e){this.loadingInstance=Y.service({fullscreen:!0}),this.send(JSON.stringify(e))}getMsg(e){return JSON.parse(e.data)}buildRequest(e,t=null){return{traceId:p.uuid(),function:e,params:t}}}const _e={class:"flex justify-between items-center gap-2 dialog-footer overflow-y-auto"},me={class:"flex gap-2"},ge={class:"flex gap-2 ml-auto"},Oe=A({__name:"uploadDialog",props:N({fileData:{},isCreate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{},fileList:{default:()=>[]},fileListModifiers:{},ticketFolderList:{default:()=>[]},ticketFolderListModifiers:{}}),emits:N(["reset","submit"],["update:modelValue","update:fileList","update:ticketFolderList"]),setup(n,{expose:e,emit:t}){const s=n,i=t,r=L(n,"modelValue"),o=L(n,"fileList"),c=L(n,"ticketFolderList"),a=z(()=>re(s.fileData)||{}),l=C(!1),{t:g}=se(),_=k(new p("ws://127.0.0.1:51818",{fileList:o,fileData:a,isOpen:l})),w={selectScanSource:{on:{click:()=>{E(u=>u.selectScanSource())}}},showScanConfig:{on:{click:()=>{E(u=>u.showScanConfig())}}},scan:{on:{click:()=>{E(u=>u.scan())}}}},f={reset:{on:{click:()=>{c.value=[];const u=o.value.find(b=>b.dataSource==="1");l.value&&u?_.clear():o.value=[],i("reset")}}},submit:{props:{type:"primary"},on:{click:()=>{i("submit")}}}},y=k({reset:()=>{f.reset.on.click()}});function E(u){if(!l.value)return T.info(g("message.missing",[g("label.scanDevice")]));u(_)}return J(r,u=>{u||f.reset.on.click()}),e(y),(u,b)=>{const x=ne,$=oe;return O(),K($,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=d=>r.value=d)},{footer:v(()=>[S("div",_e,[S("div",me,[(O(),M(q,null,P(w,(d,m)=>j(x,F({key:m},{ref_for:!0},d.props||{},{disabled:!D(l)},U(d.on)),{default:v(()=>[B(G(u.$t(`button.${m}`)),1)]),_:2},1040,["disabled"])),64))]),S("div",ge,[(O(),M(q,null,P(f,(d,m)=>j(x,F({key:m},{ref_for:!0},d.props||{},{disabled:s.disabled},U(d.on)),{default:v(()=>[B(G(u.$t(`button.${m}`)),1)]),_:2},1040,["disabled"])),64))])])]),default:v(()=>[X(u.$slots,"default")]),_:3},8,["modelValue"])}}});export{Oe as _};
1
+ import{ref as C,unref as D,isRef as Q,h as R,defineComponent as A,mergeModels as N,useModel as L,computed as z,reactive as k,watch as J,createBlock as K,openBlock as O,withCtx as v,renderSlot as X,createElementVNode as S,createElementBlock as M,Fragment as q,renderList as P,createVNode as j,mergeProps as F,toHandlers as U,createTextVNode as B,toDisplayString as G}from"vue";import{a as T,E as Y,aA as Z,ag as ee,ah as te,t as ne}from"./main-DINM6Pr5.js";import{t as V}from"./select-BSg9yQbV.js";import{E as ie}from"./DynamicElFormItem.vue_vue_type_style_index_0_lang-DDImMTjw.js";import{useI18n as se}from"vue-i18n";import{c as re,b as oe}from"./index-B4kC2uaS.js";var I=function(n,e){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var i in s)s.hasOwnProperty(i)&&(t[i]=s[i])},I(n,e)};function H(n,e){I(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function ae(n){var e=typeof Symbol=="function"&&n[Symbol.iterator],t=0;return e?e.call(n):{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}function ce(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var s=t.call(n),i,r=[],o;try{for(;(e===void 0||e-- >0)&&!(i=s.next()).done;)r.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return r}function ue(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(ce(arguments[e]));return n}var W=(function(){function n(e,t){this.target=t,this.type=e}return n})(),le=(function(n){H(e,n);function e(t,s){var i=n.call(this,"error",s)||this;return i.message=t.message,i.error=t,i}return e})(W),fe=(function(n){H(e,n);function e(t,s,i){t===void 0&&(t=1e3),s===void 0&&(s="");var r=n.call(this,"close",i)||this;return r.wasClean=!0,r.code=t,r.reason=s,r}return e})(W);var de=function(){if(typeof WebSocket<"u")return WebSocket},he=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},h={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},pe=(function(){function n(e,t,s){var i=this;s===void 0&&(s={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(r){i._debug("open event");var o=i._options.minUptime,c=o===void 0?h.minUptime:o;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},c),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(a){return i._ws.send(a)}),i._messageQueue=[],i.onopen&&i.onopen(r),i._listeners.open.forEach(function(a){return i._callEventListener(r,a)})},this._handleMessage=function(r){i._debug("message event"),i.onmessage&&i.onmessage(r),i._listeners.message.forEach(function(o){return i._callEventListener(r,o)})},this._handleError=function(r){i._debug("error event",r.message),i._disconnect(void 0,r.message==="TIMEOUT"?"timeout":void 0),i.onerror&&i.onerror(r),i._debug("exec error listeners"),i._listeners.error.forEach(function(o){return i._callEventListener(r,o)}),i._connect()},this._handleClose=function(r){i._debug("close event"),i._clearTimeouts(),i._shouldReconnect&&i._connect(),i.onclose&&i.onclose(r),i._listeners.close.forEach(function(o){return i._callEventListener(r,o)})},this._url=e,this._protocols=t,this._options=s,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,s){return typeof s=="string"?t+=s.length:s instanceof Blob?t+=s.size:t+=s.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,s=t===void 0?h.maxEnqueuedMessages:t;this._messageQueue.length<s&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,s,i=this._listeners[e.type];if(i)try{for(var r=ae(i),o=r.next();!o.done;o=r.next()){var c=o.value;this._callEventListener(e,c)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(s){return s!==t}))},n.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,ue(["RWS>"],e))},n.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,s=t===void 0?h.reconnectionDelayGrowFactor:t,i=e.minReconnectionDelay,r=i===void 0?h.minReconnectionDelay:i,o=e.maxReconnectionDelay,c=o===void 0?h.maxReconnectionDelay:o,a=0;return this._retryCount>0&&(a=r*Math.pow(s,this._retryCount-1),a>c&&(a=c)),this._debug("next delay",a),a},n.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},n.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},n.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,s=t.maxRetries,i=s===void 0?h.maxRetries:s,r=t.connectionTimeout,o=r===void 0?h.connectionTimeout:r,c=t.WebSocket,a=c===void 0?de():c;if(this._retryCount>=i){this._debug("max retries reached",this._retryCount,">=",i);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!he(a))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(l){e._closeCalled||(e._debug("connect",{url:l,protocols:e._protocols}),e._ws=e._protocols?new a(l,e._protocols):new a(l),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},o))})}},n.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new le(Error("TIMEOUT"),this))},n.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new fe(e,t,this))}catch{}}},n.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},n.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},n.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},n.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},n.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},n})();class p extends pe{loadingInstance=null;requests={};fileList=[];fileData={};isOpen=C(!1);currentDeviceId="";static instance;static uuid(){const e=[],t="0123456789abcdef";for(let s=0;s<36;s++)e[s]=t.substr(Math.floor(Math.random()*16),1);return e[14]="4",e[19]=t.substr(Number(e[19])&3|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}getFileList(){return D(this.fileList)}getFileData(){return D(this.fileData)}constructor(e,t={}){if(super(e),this.updateConfig(t),p.instance)return p.instance;p.instance=this,this.init()}init(){this.loadingInstance=null,this.requests={},this.onopen=this.openHandler,this.onclose=this.closeHandler,this.onmessage=this.messageHandler,this.onerror=this.errorHandler}updateConfig(e){this.fileList=e.fileList||[],this.fileData=e.fileData||{},this.isOpen=Q(e.isOpen)?e.isOpen:C(e.isOpen||!1),this.currentDeviceId=""}showDeviceListDialog(e){ie({title:V("button.selectScanSource"),message:()=>R(ee,{style:{width:"calc(var(--el-messagebox-width) - var(--el-messagebox-padding-primary) * 2)"},modelValue:this.currentDeviceId,"onUpdate:modelValue":t=>{this.currentDeviceId=t}},e.map(t=>R(te,{label:t.deviceId,value:t.deviceId})))}).then(()=>{this.currentDeviceId&&this.switchScanDevice(this.currentDeviceId)}).catch(()=>{})}switchScanDevice(e){const t=this.buildRequest("001002",{scannerId:e}),s=()=>{this.loadingInstance?.close()};this.requests[t.traceId]={request:t,completed:s},this.sendMsg(t)}selectScanSource(){const e=this.buildRequest("001001"),t=({data:s})=>{if(this.loadingInstance?.close(),!s||!s.length){T.error(V("message.notScanDevice"));return}this.showDeviceListDialog(s)};this.requests[e.traceId]={request:e,completed:t},this.sendMsg(e)}showScanConfig(){const e=()=>{this.loadingInstance?.close()},t=this.buildRequest("001015");this.requests[t.traceId]={request:t,completed:e},this.sendMsg(t)}scan(){const e={xferCount:-1,fileFormat:".jpg",fileSavePath:"",fileType:"Base64",fileNamePrefix:"Scan",fileNameFormat:"datetime",fileMd5Enabled:!1},t=this.buildRequest("001008",e),s=i=>{const{function:r,data:o}=i;if(r==="001008")return;if(r==="001011"){this.loadingInstance?.close();return}const{fileName:c,fileResult:a}=o;if(!a)return;const l="image/jpeg",g=`data:${l};base64, ${a}`,_=Z(g),w=URL.createObjectURL(_),f=new File([_],c,{type:l}),y=c;f.uid=y,this.getFileList().push({...this.getFileData(),name:c,uid:y,url:w,dataSource:"1",type:l,size:f.size,deg:0,raw:f})};this.requests[t.traceId]={request:t,completed:s},this.sendMsg(t)}clear(){if(this.requests={},!this.getFileList().length)return;this.getFileList().splice(0,this.getFileList().length);const e=()=>{this.loadingInstance?.close(),this.requests={}},t=this.buildRequest("001013");this.requests[t.traceId]={request:t,completed:e},this.sendMsg(t)}openHandler(){this.isOpen.value=!0}closeHandler(){this.isOpen.value=!1}messageHandler(e){const t=this.getMsg(e),s=this.requests[t.traceId];switch(t.code){case 0:s?s.completed&&s.completed(t):this.loadingInstance?.close();break;case 130115:this.selectScanSource();break;default:this.loadingInstance?.close(),T.error(t.msg||t.code)}}errorHandler(){console.error("nkoScanClient连接出错")}sendMsg(e){this.loadingInstance=Y.service({fullscreen:!0}),this.send(JSON.stringify(e))}getMsg(e){return JSON.parse(e.data)}buildRequest(e,t=null){return{traceId:p.uuid(),function:e,params:t}}}const _e={class:"flex justify-between items-center gap-2 dialog-footer overflow-y-auto"},me={class:"flex gap-2"},ge={class:"flex gap-2 ml-auto"},Oe=A({__name:"uploadDialog",props:N({fileData:{},isCreate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{},fileList:{default:()=>[]},fileListModifiers:{},ticketFolderList:{default:()=>[]},ticketFolderListModifiers:{}}),emits:N(["reset","submit"],["update:modelValue","update:fileList","update:ticketFolderList"]),setup(n,{expose:e,emit:t}){const s=n,i=t,r=L(n,"modelValue"),o=L(n,"fileList"),c=L(n,"ticketFolderList"),a=z(()=>re(s.fileData)||{}),l=C(!1),{t:g}=se(),_=k(new p("ws://127.0.0.1:51818",{fileList:o,fileData:a,isOpen:l})),w={selectScanSource:{on:{click:()=>{E(u=>u.selectScanSource())}}},showScanConfig:{on:{click:()=>{E(u=>u.showScanConfig())}}},scan:{on:{click:()=>{E(u=>u.scan())}}}},f={reset:{on:{click:()=>{c.value=[];const u=o.value.find(b=>b.dataSource==="1");l.value&&u?_.clear():o.value=[],i("reset")}}},submit:{props:{type:"primary"},on:{click:()=>{i("submit")}}}},y=k({reset:()=>{f.reset.on.click()}});function E(u){if(!l.value)return T.info(g("message.missing",[g("label.scanDevice")]));u(_)}return J(r,u=>{u||f.reset.on.click()}),e(y),(u,b)=>{const x=ne,$=oe;return O(),K($,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=d=>r.value=d)},{footer:v(()=>[S("div",_e,[S("div",me,[(O(),M(q,null,P(w,(d,m)=>j(x,F({key:m},{ref_for:!0},d.props||{},{disabled:!D(l)},U(d.on)),{default:v(()=>[B(G(u.$t(`button.${m}`)),1)]),_:2},1040,["disabled"])),64))]),S("div",ge,[(O(),M(q,null,P(f,(d,m)=>j(x,F({key:m},{ref_for:!0},d.props||{},{disabled:s.disabled},U(d.on)),{default:v(()=>[B(G(u.$t(`button.${m}`)),1)]),_:2},1040,["disabled"])),64))])])]),default:v(()=>[X(u.$slots,"default")]),_:3},8,["modelValue"])}}});export{Oe as _};
@@ -1 +1 @@
1
- import{defineComponent as rt,computed as i,shallowRef as q,ref as tt,onMounted as ct,watch as ft,onBeforeUnmount as gt,createElementBlock as pt,openBlock as st,normalizeStyle as dt,renderSlot as et,useAttrs as mt,createBlock as vt,unref as nt,mergeProps as ht,withCtx as xt,watchEffect as _t}from"vue";import{h as bt,e as yt,f as K,i as lt,_ as kt,u as wt,g as Wt,w as At,j as Mt}from"./main-DrqZSaj0.js";import{u as St}from"./viewer-CWuXsy7c.js";import{W as at}from"./watermark-DMx8Eoaf.js";var $t=Object.prototype,Bt=$t.hasOwnProperty;function Ct(a,e){return a!=null&&Bt.call(a,e)}function ot(a,e){return a!=null&&bt(a,e,Ct)}const Pt=yt({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:K([String,Array]),default:"Element Plus"},font:{type:K(Object)},gap:{type:K(Array),default:()=>[100,100]},offset:{type:K(Array)}});function Rt(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()}function It(a){return Object.keys(a).map(e=>`${Rt(e)}: ${a[e]};`).join(" ")}function Et(){return window.devicePixelRatio||1}const Tt=(a,e)=>{let r=!1;return a.removedNodes.length&&e&&(r=Array.from(a.removedNodes).includes(e)),a.type==="attributes"&&a.target===e&&(r=!0),r},zt={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function Q(a,e,r=1){const o=document.createElement("canvas"),g=o.getContext("2d"),l=a*r,m=e*r;return o.setAttribute("width",`${l}px`),o.setAttribute("height",`${m}px`),g.save(),[g,o,l,m]}function Nt(){function a(e,r,o,g,l,m,M,P,R){const[u,j,w,S]=Q(g,l,o);let z=0;if(e instanceof HTMLImageElement)u.drawImage(e,0,0,w,S);else{const{color:d,fontSize:v,fontStyle:y,fontWeight:k,fontFamily:V,textAlign:D,textBaseline:Z}=m,G=Number(v)*o;u.font=`${y} normal ${k} ${G}px/${l}px ${V}`,u.fillStyle=d,u.textAlign=D,u.textBaseline=Z;const X=lt(e)?e:[e];if(Z!=="top"&&X[0]){const U=u.measureText(X[0]);u.textBaseline="top";const J=u.measureText(X[0]);z=U.actualBoundingBoxAscent-J.actualBoundingBoxAscent}X?.forEach((U,J)=>{const[it,ut]=zt[D];u.fillText(U??"",w*it+R*ut,J*(G+m.fontGap*o))})}const $=Math.PI/180*Number(r),Y=Math.max(g,l),[N,I,c]=Q(Y,Y,o);N.translate(c/2,c/2),N.rotate($),w>0&&S>0&&N.drawImage(j,-w/2,-S/2);function O(d,v){const y=d*Math.cos($)-v*Math.sin($),k=d*Math.sin($)+v*Math.cos($);return[y,k]}let B=0,H=0,E=0,L=0;const W=w/2,F=S/2;[[0-W,0-F],[0+W,0-F],[0+W,0+F],[0-W,0+F]].forEach(([d,v])=>{const[y,k]=O(d,v);B=Math.min(B,y),H=Math.max(H,y),E=Math.min(E,k),L=Math.max(L,k)});const t=B+c/2,s=E+c/2,p=H-B,h=L-E,x=M*o,A=P*o,C=(p+x)*2,T=h+A,[_,f]=Q(C,T);function b(d=0,v=0){_.drawImage(I,t,s,p,h,d,v+z,p,h)}return b(),b(p+x,-h/2-A/2),b(p+x,+h/2+A/2),[f.toDataURL(),C/o,T/o]}return a}const Ot=rt({name:"ElWatermark"}),Ht=rt({...Ot,props:Pt,setup(a){const e=a,r={position:"relative"},o=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontGap)!=null?t:3}),g=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.color)!=null?t:"rgba(0,0,0,.15)"}),l=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontSize)!=null?t:16}),m=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontWeight)!=null?t:"normal"}),M=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontStyle)!=null?t:"normal"}),P=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontFamily)!=null?t:"sans-serif"}),R=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.textAlign)!=null?t:"center"}),u=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.textBaseline)!=null?t:"hanging"}),j=i(()=>e.gap[0]),w=i(()=>e.gap[1]),S=i(()=>j.value/2),z=i(()=>w.value/2),$=i(()=>{var n,t;return(t=(n=e.offset)==null?void 0:n[0])!=null?t:S.value}),Y=i(()=>{var n,t;return(t=(n=e.offset)==null?void 0:n[1])!=null?t:z.value}),N=()=>{const n={zIndex:e.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let t=$.value-S.value,s=Y.value-z.value;return t>0&&(n.left=`${t}px`,n.width=`calc(100% - ${t}px)`,t=0),s>0&&(n.top=`${s}px`,n.height=`calc(100% - ${s}px)`,s=0),n.backgroundPosition=`${t}px ${s}px`,n},I=q(null),c=q(),O=tt(!1),B=()=>{c.value&&(c.value.remove(),c.value=void 0)},H=(n,t)=>{var s;I.value&&c.value&&(O.value=!0,c.value.setAttribute("style",It({...N(),backgroundImage:`url('${n}')`,backgroundSize:`${Math.floor(t)}px`})),(s=I.value)==null||s.append(c.value),setTimeout(()=>{O.value=!1}))},E=n=>{let t=120,s=64,p=0;const{image:h,content:x,width:A,height:C,rotate:T}=e;if(!h&&n.measureText){n.font=`${Number(l.value)}px ${P.value}`;const _=lt(x)?x:[x];let f=0,b=0;_.forEach(v=>{const{width:y,fontBoundingBoxAscent:k,fontBoundingBoxDescent:V,actualBoundingBoxAscent:D,actualBoundingBoxDescent:Z}=n.measureText(v),G=Wt(k)?D+Z:k+V;y>f&&(f=Math.ceil(y)),G>b&&(b=Math.ceil(G))}),t=f,s=b*_.length+(_.length-1)*o.value;const d=Math.PI/180*Number(T);p=Math.ceil(Math.abs(Math.sin(d)*s)/2),t+=p}return[A??t,C??s,p]},L=Nt(),W=()=>{const t=document.createElement("canvas").getContext("2d"),s=e.image,p=e.content,h=e.rotate;if(t){c.value||(c.value=document.createElement("div"));const x=Et(),[A,C,T]=E(t),_=f=>{const[b,d]=L(f||"",h,x,A,C,{color:g.value,fontSize:l.value,fontStyle:M.value,fontWeight:m.value,fontFamily:P.value,fontGap:o.value,textAlign:R.value,textBaseline:u.value},j.value,w.value,T);H(b,d)};if(s){const f=new Image;f.onload=()=>{_(f)},f.onerror=()=>{_(p)},f.crossOrigin="anonymous",f.referrerPolicy="no-referrer",f.src=s}else _(p)}};return ct(()=>{W()}),ft(()=>e,()=>{W()},{deep:!0,flush:"post"}),gt(()=>{B()}),wt(I,n=>{O.value||n.forEach(t=>{Tt(t,c.value)&&(B(),W())})},{attributes:!0,subtree:!0,childList:!0}),(n,t)=>(st(),pt("div",{ref_key:"containerRef",ref:I,style:dt([r])},[et(n.$slots,"default")],4))}});var Lt=kt(Ht,[["__file","watermark.vue"]]);const Ft=At(Lt),qt=Object.assign({inheritAttrs:!1},{__name:"Watermark",setup(a){const e=mt(),r=i(()=>!!e&&(ot(e,"content")||ot(e,"image")));return(o,g)=>{const l=Ft;return nt(r)?(st(),vt(l,ht({key:0,class:"size-full"},nt(e)),{default:xt(()=>[et(o.$slots,"default")]),_:3},16)):et(o.$slots,"default",{key:1})}}});function Gt(a="SystemWatermark"){return Mt.get(`/svc/watermarks/${a}/content`,{loading:!1})}const Xt={text(a){return{...at,content:a}},image(a){const{font:e,...r}=at,o=a.startsWith("data:")?"":"data:image/png;base64,";return{...r,image:o+a}}};function jt(a,e){return Xt[a](e)}function Yt(a){return!a||a.length%4!==0?!1:/^(?:[A-Z0-9+/]{4})*(?:[A-Z0-9+/]{2}==|[A-Z0-9+/]{3}=)?$/i.test(a)}function Vt(a=Gt,e=!0){const r=tt(e),o=q(null),g=q(null),l=tt(!1),m=()=>{o.value=null,g.value=null,l.value=!1,a().then(M=>{const{success:P,data:R}=M;P||(g.value=new Error("获取水印失败"));const u=jt(Yt(R)?"image":"text",R);o.value=u,St().watermarkConfig=u}).catch(M=>{g.value=M}).finally(()=>{l.value=!0})};return _t(()=>{nt(r)&&m()}),{data:o,error:g,isFinished:l,isImmediate:r,updateWatermark:m}}export{qt as _,Gt as g,Vt as u};
1
+ import{defineComponent as rt,computed as i,shallowRef as q,ref as tt,onMounted as ct,watch as ft,onBeforeUnmount as gt,createElementBlock as pt,openBlock as st,normalizeStyle as dt,renderSlot as et,useAttrs as mt,createBlock as vt,unref as nt,mergeProps as ht,withCtx as xt,watchEffect as _t}from"vue";import{h as bt,e as yt,f as K,i as lt,_ as kt,u as wt,g as Wt,w as At,j as Mt}from"./main-DINM6Pr5.js";import{u as St}from"./viewer-BPijlLdi.js";import{W as at}from"./watermark-DMx8Eoaf.js";var $t=Object.prototype,Bt=$t.hasOwnProperty;function Ct(a,e){return a!=null&&Bt.call(a,e)}function ot(a,e){return a!=null&&bt(a,e,Ct)}const Pt=yt({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:K([String,Array]),default:"Element Plus"},font:{type:K(Object)},gap:{type:K(Array),default:()=>[100,100]},offset:{type:K(Array)}});function Rt(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()}function It(a){return Object.keys(a).map(e=>`${Rt(e)}: ${a[e]};`).join(" ")}function Et(){return window.devicePixelRatio||1}const Tt=(a,e)=>{let r=!1;return a.removedNodes.length&&e&&(r=Array.from(a.removedNodes).includes(e)),a.type==="attributes"&&a.target===e&&(r=!0),r},zt={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function Q(a,e,r=1){const o=document.createElement("canvas"),g=o.getContext("2d"),l=a*r,m=e*r;return o.setAttribute("width",`${l}px`),o.setAttribute("height",`${m}px`),g.save(),[g,o,l,m]}function Nt(){function a(e,r,o,g,l,m,M,P,R){const[u,j,w,S]=Q(g,l,o);let z=0;if(e instanceof HTMLImageElement)u.drawImage(e,0,0,w,S);else{const{color:d,fontSize:v,fontStyle:y,fontWeight:k,fontFamily:V,textAlign:D,textBaseline:Z}=m,G=Number(v)*o;u.font=`${y} normal ${k} ${G}px/${l}px ${V}`,u.fillStyle=d,u.textAlign=D,u.textBaseline=Z;const X=lt(e)?e:[e];if(Z!=="top"&&X[0]){const U=u.measureText(X[0]);u.textBaseline="top";const J=u.measureText(X[0]);z=U.actualBoundingBoxAscent-J.actualBoundingBoxAscent}X?.forEach((U,J)=>{const[it,ut]=zt[D];u.fillText(U??"",w*it+R*ut,J*(G+m.fontGap*o))})}const $=Math.PI/180*Number(r),Y=Math.max(g,l),[N,I,c]=Q(Y,Y,o);N.translate(c/2,c/2),N.rotate($),w>0&&S>0&&N.drawImage(j,-w/2,-S/2);function O(d,v){const y=d*Math.cos($)-v*Math.sin($),k=d*Math.sin($)+v*Math.cos($);return[y,k]}let B=0,H=0,E=0,L=0;const W=w/2,F=S/2;[[0-W,0-F],[0+W,0-F],[0+W,0+F],[0-W,0+F]].forEach(([d,v])=>{const[y,k]=O(d,v);B=Math.min(B,y),H=Math.max(H,y),E=Math.min(E,k),L=Math.max(L,k)});const t=B+c/2,s=E+c/2,p=H-B,h=L-E,x=M*o,A=P*o,C=(p+x)*2,T=h+A,[_,f]=Q(C,T);function b(d=0,v=0){_.drawImage(I,t,s,p,h,d,v+z,p,h)}return b(),b(p+x,-h/2-A/2),b(p+x,+h/2+A/2),[f.toDataURL(),C/o,T/o]}return a}const Ot=rt({name:"ElWatermark"}),Ht=rt({...Ot,props:Pt,setup(a){const e=a,r={position:"relative"},o=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontGap)!=null?t:3}),g=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.color)!=null?t:"rgba(0,0,0,.15)"}),l=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontSize)!=null?t:16}),m=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontWeight)!=null?t:"normal"}),M=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontStyle)!=null?t:"normal"}),P=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.fontFamily)!=null?t:"sans-serif"}),R=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.textAlign)!=null?t:"center"}),u=i(()=>{var n,t;return(t=(n=e.font)==null?void 0:n.textBaseline)!=null?t:"hanging"}),j=i(()=>e.gap[0]),w=i(()=>e.gap[1]),S=i(()=>j.value/2),z=i(()=>w.value/2),$=i(()=>{var n,t;return(t=(n=e.offset)==null?void 0:n[0])!=null?t:S.value}),Y=i(()=>{var n,t;return(t=(n=e.offset)==null?void 0:n[1])!=null?t:z.value}),N=()=>{const n={zIndex:e.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let t=$.value-S.value,s=Y.value-z.value;return t>0&&(n.left=`${t}px`,n.width=`calc(100% - ${t}px)`,t=0),s>0&&(n.top=`${s}px`,n.height=`calc(100% - ${s}px)`,s=0),n.backgroundPosition=`${t}px ${s}px`,n},I=q(null),c=q(),O=tt(!1),B=()=>{c.value&&(c.value.remove(),c.value=void 0)},H=(n,t)=>{var s;I.value&&c.value&&(O.value=!0,c.value.setAttribute("style",It({...N(),backgroundImage:`url('${n}')`,backgroundSize:`${Math.floor(t)}px`})),(s=I.value)==null||s.append(c.value),setTimeout(()=>{O.value=!1}))},E=n=>{let t=120,s=64,p=0;const{image:h,content:x,width:A,height:C,rotate:T}=e;if(!h&&n.measureText){n.font=`${Number(l.value)}px ${P.value}`;const _=lt(x)?x:[x];let f=0,b=0;_.forEach(v=>{const{width:y,fontBoundingBoxAscent:k,fontBoundingBoxDescent:V,actualBoundingBoxAscent:D,actualBoundingBoxDescent:Z}=n.measureText(v),G=Wt(k)?D+Z:k+V;y>f&&(f=Math.ceil(y)),G>b&&(b=Math.ceil(G))}),t=f,s=b*_.length+(_.length-1)*o.value;const d=Math.PI/180*Number(T);p=Math.ceil(Math.abs(Math.sin(d)*s)/2),t+=p}return[A??t,C??s,p]},L=Nt(),W=()=>{const t=document.createElement("canvas").getContext("2d"),s=e.image,p=e.content,h=e.rotate;if(t){c.value||(c.value=document.createElement("div"));const x=Et(),[A,C,T]=E(t),_=f=>{const[b,d]=L(f||"",h,x,A,C,{color:g.value,fontSize:l.value,fontStyle:M.value,fontWeight:m.value,fontFamily:P.value,fontGap:o.value,textAlign:R.value,textBaseline:u.value},j.value,w.value,T);H(b,d)};if(s){const f=new Image;f.onload=()=>{_(f)},f.onerror=()=>{_(p)},f.crossOrigin="anonymous",f.referrerPolicy="no-referrer",f.src=s}else _(p)}};return ct(()=>{W()}),ft(()=>e,()=>{W()},{deep:!0,flush:"post"}),gt(()=>{B()}),wt(I,n=>{O.value||n.forEach(t=>{Tt(t,c.value)&&(B(),W())})},{attributes:!0,subtree:!0,childList:!0}),(n,t)=>(st(),pt("div",{ref_key:"containerRef",ref:I,style:dt([r])},[et(n.$slots,"default")],4))}});var Lt=kt(Ht,[["__file","watermark.vue"]]);const Ft=At(Lt),qt=Object.assign({inheritAttrs:!1},{__name:"Watermark",setup(a){const e=mt(),r=i(()=>!!e&&(ot(e,"content")||ot(e,"image")));return(o,g)=>{const l=Ft;return nt(r)?(st(),vt(l,ht({key:0,class:"size-full"},nt(e)),{default:xt(()=>[et(o.$slots,"default")]),_:3},16)):et(o.$slots,"default",{key:1})}}});function Gt(a="SystemWatermark"){return Mt.get(`/svc/watermarks/${a}/content`,{loading:!1})}const Xt={text(a){return{...at,content:a}},image(a){const{font:e,...r}=at,o=a.startsWith("data:")?"":"data:image/png;base64,";return{...r,image:o+a}}};function jt(a,e){return Xt[a](e)}function Yt(a){return!a||a.length%4!==0?!1:/^(?:[A-Z0-9+/]{4})*(?:[A-Z0-9+/]{2}==|[A-Z0-9+/]{3}=)?$/i.test(a)}function Vt(a=Gt,e=!0){const r=tt(e),o=q(null),g=q(null),l=tt(!1),m=()=>{o.value=null,g.value=null,l.value=!1,a().then(M=>{const{success:P,data:R}=M;P||(g.value=new Error("获取水印失败"));const u=jt(Yt(R)?"image":"text",R);o.value=u,St().watermarkConfig=u}).catch(M=>{g.value=M}).finally(()=>{l.value=!0})};return _t(()=>{nt(r)&&m()}),{data:o,error:g,isFinished:l,isImmediate:r,updateWatermark:m}}export{qt as _,Gt as g,Vt as u};
@@ -1 +1 @@
1
- import{u as n}from"./viewer-CWuXsy7c.js";import{m as u}from"./profile-DmVZXaLc.js";import{t as i}from"./select-C5rnQwT8.js";import{a as c,H as m}from"./main-DrqZSaj0.js";async function f(s){const{bisCategory:e,businessKey:t}=n(),{success:a,data:r}=await u(e,t);if(!a)return!1;const{status:o}=r;return o===s}async function C(){return await f("6")?(c.error({message:i("message.approvalIsLock"),onClose:()=>{m(!0)}}),!0):!1}export{C as v};
1
+ import{u as n}from"./viewer-BPijlLdi.js";import{m as u}from"./profile-BmqeDJ0-.js";import{t as i}from"./select-BSg9yQbV.js";import{a as c,H as m}from"./main-DINM6Pr5.js";async function f(s){const{bisCategory:e,businessKey:t}=n(),{success:a,data:r}=await u(e,t);if(!a)return!1;const{status:o}=r;return o===s}async function C(){return await f("6")?(c.error({message:i("message.approvalIsLock"),onClose:()=>{m(!0)}}),!0):!1}export{C as v};
Binary file
Binary file