hs-admin-ui 15.1.6 → 15.1.8

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 (486) hide show
  1. package/dist/crypto-js-CDv3g9Fu.js +14 -0
  2. package/dist/crypto-js-YAPiafFo.js +5020 -0
  3. package/dist/element-plus-BDPBrlGs.js +47 -0
  4. package/dist/element-plus-DsYvsms7.js +33347 -0
  5. package/dist/element-plus.css +1 -0
  6. package/dist/index.css +1 -0
  7. package/dist/index.js +21 -1
  8. package/dist/index.mjs +21262 -169
  9. package/dist/lodash-Bz9d-A6a.js +27 -0
  10. package/dist/lodash-D8UdwBmx.js +3677 -0
  11. package/dist/mathjs-DUElwFnu.js +53 -0
  12. package/dist/mathjs-DriWWyuQ.js +28075 -0
  13. package/dist/trtc-sdk-v5-CQx2bVFN.js +131 -0
  14. package/dist/trtc-sdk-v5-D3p_Spei.js +13452 -0
  15. package/dist/types/index.d.ts +1 -1
  16. package/dist/vender-CW460RJ7.js +102 -0
  17. package/dist/vender-DsdbGbik.js +26205 -0
  18. package/dist/vxe-pc-ui-D9AWriGd.js +25535 -0
  19. package/dist/vxe-pc-ui-yKZybkNt.js +4 -0
  20. package/dist/vxe-pc-ui.css +1 -0
  21. package/dist/vxe-table-AZLI7TZY.js +3 -0
  22. package/dist/vxe-table-CDtN4_hB.js +14273 -0
  23. package/dist/vxe-table.css +1 -0
  24. package/package.json +11 -42
  25. package/LICENSE +0 -21
  26. package/dist/401-BePx5kSv.mjs +0 -56
  27. package/dist/401-BruOzyt3.js +0 -1
  28. package/dist/404-CVkD6ebs.js +0 -1
  29. package/dist/404-CVkD6ebs.js.gz +0 -0
  30. package/dist/404-jQN6KU5y.mjs +0 -61
  31. package/dist/404-jQN6KU5y.mjs.gz +0 -0
  32. package/dist/account-Bw7GuU2Y.js +0 -1
  33. package/dist/account-RbilIl5p.mjs +0 -215
  34. package/dist/aside-CO_TFnBP.js +0 -1
  35. package/dist/aside-DGbD7WXx.mjs +0 -164
  36. package/dist/baseBtnConfig-C6KLedE5.mjs +0 -273
  37. package/dist/baseBtnConfig-DRxjBT8Z.js +0 -1
  38. package/dist/baseFormConfig-B0LkZBRJ.mjs +0 -504
  39. package/dist/baseFormConfig-B0LkZBRJ.mjs.gz +0 -0
  40. package/dist/baseFormConfig-BaFbaMWd.mjs +0 -722
  41. package/dist/baseFormConfig-BaFbaMWd.mjs.gz +0 -0
  42. package/dist/baseFormConfig-D5Q35Bo3.js +0 -1
  43. package/dist/baseFormConfig-XAt1gry0.js +0 -1
  44. package/dist/baseTableConfig-BxkqNzZ1.js +0 -1
  45. package/dist/baseTableConfig-BxkqNzZ1.js.gz +0 -0
  46. package/dist/baseTableConfig-Dkvzwm5z.mjs +0 -2624
  47. package/dist/baseTableConfig-Dkvzwm5z.mjs.gz +0 -0
  48. package/dist/bcFormConfig-Bn-_XbCl.mjs +0 -234
  49. package/dist/bcFormConfig-DJPNhuTH.js +0 -1
  50. package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-BEzNBOmo.js +0 -1
  51. package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-DG93G9jP.mjs +0 -131
  52. package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-BkfUkxPL.js +0 -1
  53. package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-lFAXGB7Y.mjs +0 -101
  54. package/dist/btnIndex-BsZSZGd4.js +0 -1
  55. package/dist/btnIndex-CqbzIQXE.mjs +0 -287
  56. package/dist/btnIndex-CqbzIQXE.mjs.gz +0 -0
  57. package/dist/classic-Bt3HfZzY.js +0 -1
  58. package/dist/classic-Dec3i2x2.mjs +0 -81
  59. package/dist/cloneConfigDialog-CQusM1M9.mjs +0 -817
  60. package/dist/cloneConfigDialog-CQusM1M9.mjs.gz +0 -0
  61. package/dist/cloneConfigDialog-Cl6qXd5e.js +0 -1
  62. package/dist/cloneConfigDialog-Cl6qXd5e.js.gz +0 -0
  63. package/dist/columns-C-o5zY9j.mjs +0 -87
  64. package/dist/columns-CXvoLhJP.js +0 -1
  65. package/dist/columnsAside-DJy-pEoD.js +0 -1
  66. package/dist/columnsAside-DnSlEG-x.mjs +0 -220
  67. package/dist/contextmenu-9jqMr4VX.mjs +0 -125
  68. package/dist/contextmenu-BfPQqiXK.mjs +0 -125
  69. package/dist/contextmenu-BliNwJm0.js +0 -1
  70. package/dist/contextmenu-DhGzlYnv.js +0 -1
  71. package/dist/copyMenuConfig-Cy4a281w.mjs +0 -4
  72. package/dist/copyMenuConfig-wbduEbAX.js +0 -1
  73. package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-DEoJr7E5.mjs +0 -85
  74. package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-DhXeuYsn.js +0 -1
  75. package/dist/copySystem-BVvrKj55.mjs +0 -4
  76. package/dist/copySystem-CU8MODKF.js +0 -1
  77. package/dist/copySystem.vue_vue_type_script_setup_true_lang-CM18bPv-.mjs +0 -78
  78. package/dist/copySystem.vue_vue_type_script_setup_true_lang-DJsMAvqs.js +0 -1
  79. package/dist/defaults-CDLdvMzg.js +0 -1
  80. package/dist/defaults-SEDq-Yru.mjs +0 -86
  81. package/dist/dialog-B3OvnqAp.js +0 -1
  82. package/dist/dialog-BpY5TPcI.mjs +0 -365
  83. package/dist/dialog-BpY5TPcI.mjs.gz +0 -0
  84. package/dist/dialog-Cf7iMybE.mjs +0 -10
  85. package/dist/dialog-D-InTgwh.js +0 -1
  86. package/dist/dialog-DQP53khI.mjs +0 -359
  87. package/dist/dialog-DQP53khI.mjs.gz +0 -0
  88. package/dist/dialog-DmOMzR5s.mjs +0 -4
  89. package/dist/dialog-DxBOYlwo.js +0 -1
  90. package/dist/dialog-HstJ1U1U.mjs +0 -4
  91. package/dist/dialog-MbRBbo7-.js +0 -1
  92. package/dist/dialog-TFJ52Qpk.js +0 -1
  93. package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-BgZXqNWa.mjs +0 -220
  94. package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-mdGXAfNy.js +0 -1
  95. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-B11N-m1T.mjs +0 -694
  96. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-B11N-m1T.mjs.gz +0 -0
  97. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-Bfimmfr9.js +0 -1
  98. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-Bfimmfr9.js.gz +0 -0
  99. package/dist/dictDialog-9WB_PEq3.mjs +0 -4
  100. package/dist/dictDialog-ChYWOYnC.js +0 -1
  101. package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-BqUqa2MM.js +0 -1
  102. package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-Dwk-_Zrd.mjs +0 -154
  103. package/dist/dictItemDialog-BvpodlZn.mjs +0 -4
  104. package/dist/dictItemDialog-Cu3CA1Fy.js +0 -1
  105. package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-BAa91Osq.js +0 -1
  106. package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-PaRWBrbP.mjs +0 -231
  107. package/dist/favicon.ico +0 -0
  108. package/dist/formConfig-BL3rYhB2.js +0 -1
  109. package/dist/formConfig-BL3rYhB2.js.gz +0 -0
  110. package/dist/formConfig-DRBUT-We.mjs +0 -592
  111. package/dist/formConfig-DRBUT-We.mjs.gz +0 -0
  112. package/dist/header-BcV4n4bO.mjs +0 -28
  113. package/dist/header-DnpDVR9P.js +0 -1
  114. package/dist/horizontal-CEPNInY6.mjs +0 -151
  115. package/dist/horizontal-RTM7XxDH.js +0 -1
  116. package/dist/hsAttrBtn-CE3CMNek.js +0 -1
  117. package/dist/hsAttrBtn-CiL5ezh7.mjs +0 -4
  118. package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-B7YMfMWs.js +0 -1
  119. package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-BZPaXw7E.mjs +0 -128
  120. package/dist/hsAttrForm-BCH4VRLC.mjs +0 -4
  121. package/dist/hsAttrForm-BZhKSm2W.js +0 -1
  122. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-C1447QGx.js +0 -1
  123. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-YUO0lTkn.mjs +0 -439
  124. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-YUO0lTkn.mjs.gz +0 -0
  125. package/dist/hsBtnConfigList-BMaD3HLT.js +0 -1
  126. package/dist/hsBtnConfigList-DqBJmwk8.mjs +0 -117
  127. package/dist/hsBtnItemConfig-C9BAyIc1.js +0 -1
  128. package/dist/hsBtnItemConfig-DL6-SFjB.mjs +0 -4
  129. package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-D3iLEZwe.js +0 -1
  130. package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-DT6EDcI6.mjs +0 -147
  131. package/dist/hsBtnPanel-BJFipPMX.js +0 -1
  132. package/dist/hsBtnPanel-lgdpbYZA.mjs +0 -4
  133. package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-BIyoHv9a.js +0 -1
  134. package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-BW7roS0J.mjs +0 -67
  135. package/dist/hsCheckbox-BKa_El3s.js +0 -1
  136. package/dist/hsCheckbox-CalDndlZ.mjs +0 -4
  137. package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-Dh-lqGjq.js +0 -1
  138. package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-XCUyHi8X.mjs +0 -28
  139. package/dist/hsExpand-Bhhk7Jdi.mjs +0 -4
  140. package/dist/hsExpand-CQ3vWcYy.js +0 -1
  141. package/dist/hsExpand.vue_vue_type_script_setup_true_lang-B-IyqJIq.js +0 -1
  142. package/dist/hsExpand.vue_vue_type_script_setup_true_lang-D49jBgyP.mjs +0 -285
  143. package/dist/hsFormConfig-BR2oHpJJ.mjs +0 -207
  144. package/dist/hsFormConfig-DGphH9M7.js +0 -1
  145. package/dist/hsFormConfigList-CDZM6LN4.mjs +0 -414
  146. package/dist/hsFormConfigList-CDZM6LN4.mjs.gz +0 -0
  147. package/dist/hsFormConfigList-DEFRUzgO.js +0 -1
  148. package/dist/hsFormPanel-9xVlKXrH.js +0 -1
  149. package/dist/hsFormPanel-B9bY0wM7.mjs +0 -238
  150. package/dist/hsFormPanel-B9bY0wM7.mjs.gz +0 -0
  151. package/dist/hsFormParse-B8x5v5jx.js +0 -1
  152. package/dist/hsFormParse-BOT-NNYG.mjs +0 -4
  153. package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-6aqTlfjv.js +0 -1
  154. package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-CmxWqdX1.mjs +0 -242
  155. package/dist/hsPanelItem-C-7xaCLg.js +0 -1
  156. package/dist/hsPanelItem-CPASHLbr.mjs +0 -4
  157. package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-DJASpFoF.js +0 -1
  158. package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-rqLDQa4b.mjs +0 -86
  159. package/dist/iframes-CWdXFiYU.mjs +0 -122
  160. package/dist/iframes-DnAW1ZV2.js +0 -1
  161. package/dist/index copy-B3S_Bhdn.js +0 -1
  162. package/dist/index copy-BJ6LFdF1.mjs +0 -69
  163. package/dist/index copy-CsOZzjt9.js +0 -1
  164. package/dist/index copy-K1YcPYr9.mjs +0 -134
  165. package/dist/index-3UJSM3kd.js +0 -1
  166. package/dist/index-4ncpQ4eO.js +0 -1
  167. package/dist/index-6iu8JZuY.mjs +0 -1009
  168. package/dist/index-6iu8JZuY.mjs.gz +0 -0
  169. package/dist/index-79ZRlR7H.js +0 -1
  170. package/dist/index-7dwtQ4S9.js +0 -1
  171. package/dist/index-82-8Z3I8.js +0 -1
  172. package/dist/index-B03eGOGy.mjs +0 -133
  173. package/dist/index-B4QJL1DA.mjs +0 -10
  174. package/dist/index-B7FeSk1m.mjs +0 -4
  175. package/dist/index-B7Ggcbmc.js +0 -1
  176. package/dist/index-B7Ggcbmc.js.gz +0 -0
  177. package/dist/index-B8nrdqc9.mjs +0 -47
  178. package/dist/index-BDozMyrz.mjs +0 -95
  179. package/dist/index-BFZ9P1dy.js +0 -1
  180. package/dist/index-BHEgh4cW.mjs +0 -4
  181. package/dist/index-BHHI4_CY.js +0 -1
  182. package/dist/index-BIgnSPCb.js +0 -1
  183. package/dist/index-BIyVJNgI.js +0 -1
  184. package/dist/index-BKOItnzJ.js +0 -111
  185. package/dist/index-BKOItnzJ.js.gz +0 -0
  186. package/dist/index-BLycUQgN.mjs +0 -119
  187. package/dist/index-BMpjRLM7.js +0 -1
  188. package/dist/index-BOkwyZP7.mjs +0 -213
  189. package/dist/index-BSBQtzjR.js +0 -1
  190. package/dist/index-BT1BhIbi.js +0 -1
  191. package/dist/index-BZr64ugI.js +0 -1
  192. package/dist/index-BaeZfYEj.mjs +0 -4
  193. package/dist/index-BbXbVv7K.mjs +0 -4
  194. package/dist/index-Bgwg31Qt.js +0 -1
  195. package/dist/index-BhMp70XH.mjs +0 -94
  196. package/dist/index-BkyRUnkO.js +0 -1
  197. package/dist/index-BrTAFhhs.mjs +0 -2208
  198. package/dist/index-BrTAFhhs.mjs.gz +0 -0
  199. package/dist/index-BwKrUIVd.mjs +0 -14
  200. package/dist/index-ByjtaERc.js +0 -1
  201. package/dist/index-BzaNS4eH.mjs +0 -67
  202. package/dist/index-C0D9zAa6.mjs +0 -5403
  203. package/dist/index-C0D9zAa6.mjs.gz +0 -0
  204. package/dist/index-C1uuTYqn.js +0 -1
  205. package/dist/index-C9nUkjy2.js +0 -1
  206. package/dist/index-CGROx9d2.mjs +0 -23
  207. package/dist/index-CGVLSa-Z.mjs +0 -89
  208. package/dist/index-CI88VXHh.js +0 -1
  209. package/dist/index-CIUdc0tl.js +0 -1
  210. package/dist/index-CLpyyily.mjs +0 -285
  211. package/dist/index-CM2QwHXA.js +0 -1
  212. package/dist/index-COp-mviH.js +0 -1
  213. package/dist/index-CUE6cOFE.mjs +0 -76
  214. package/dist/index-CXHit-vm.js +0 -1
  215. package/dist/index-CXHit-vm.js.gz +0 -0
  216. package/dist/index-CbCppT2z.js +0 -1
  217. package/dist/index-CbgKih92.js +0 -1
  218. package/dist/index-Cji7t1Jc.mjs +0 -173
  219. package/dist/index-CqIZ1k-x.mjs +0 -65
  220. package/dist/index-CrrapXlE.js +0 -1
  221. package/dist/index-CzWSMFPz.js +0 -1
  222. package/dist/index-CzWSMFPz.js.gz +0 -0
  223. package/dist/index-D6PuZeGA.mjs +0 -254
  224. package/dist/index-DBvCcs0m.js +0 -1
  225. package/dist/index-DEykAVeO.js +0 -1
  226. package/dist/index-DHHcO6BG.js +0 -1
  227. package/dist/index-DHsKIehs.js +0 -1
  228. package/dist/index-DNpYXPbH.mjs +0 -30
  229. package/dist/index-DOi1__i9.js +0 -1
  230. package/dist/index-DS3B-tKV.mjs +0 -254951
  231. package/dist/index-DS3B-tKV.mjs.gz +0 -0
  232. package/dist/index-DSWpyZ7C.mjs +0 -65
  233. package/dist/index-DSjqqbn0.js +0 -1
  234. package/dist/index-DT3c6iM1.mjs +0 -49
  235. package/dist/index-DYiTqLqC.mjs +0 -51
  236. package/dist/index-DYk60nb9.mjs +0 -50
  237. package/dist/index-DZ_UFJE2.mjs +0 -43
  238. package/dist/index-DfEspIWc.mjs +0 -262
  239. package/dist/index-Dfp17Bwa.mjs +0 -4
  240. package/dist/index-DgEXQL9C.mjs +0 -403
  241. package/dist/index-DgEXQL9C.mjs.gz +0 -0
  242. package/dist/index-DnUx8Zdo.mjs +0 -73
  243. package/dist/index-Dur4EUIu.mjs +0 -73
  244. package/dist/index-DzRR1RxG.js +0 -1
  245. package/dist/index-IAOLoA9b.js +0 -1
  246. package/dist/index-MScX3_tk.mjs +0 -10
  247. package/dist/index-NBXUgAw3.mjs +0 -331
  248. package/dist/index-NBXUgAw3.mjs.gz +0 -0
  249. package/dist/index-OcKc5oUD.js +0 -1
  250. package/dist/index-PCI3lWru.mjs +0 -38
  251. package/dist/index-P_kHpPhU.js +0 -1
  252. package/dist/index-QNrlL5fl.js +0 -1
  253. package/dist/index-W_IJV_8K.mjs +0 -22
  254. package/dist/index-Z83-84L3.js +0 -1
  255. package/dist/index-_-xa-98Q.mjs +0 -172
  256. package/dist/index-feq0FF6W.mjs +0 -23
  257. package/dist/index-g2ermQHl.mjs +0 -131
  258. package/dist/index-g_BDa62N.mjs +0 -19
  259. package/dist/index-hgZg0VtS.js +0 -1
  260. package/dist/index-k2-oxT3d.mjs +0 -200
  261. package/dist/index-sdudei9U.mjs +0 -152
  262. package/dist/index-tZQPmXty.js +0 -1
  263. package/dist/index-v7jFnqoB.js +0 -1
  264. package/dist/index-zhWfbpLN.js +0 -1
  265. package/dist/index.vue_vue_type_script_setup_true_lang-9yt_AqOo.mjs +0 -194
  266. package/dist/index.vue_vue_type_script_setup_true_lang-BBB1sJxx.mjs +0 -267
  267. package/dist/index.vue_vue_type_script_setup_true_lang-BBB1sJxx.mjs.gz +0 -0
  268. package/dist/index.vue_vue_type_script_setup_true_lang-CfrDnaDb.js +0 -1
  269. package/dist/index.vue_vue_type_script_setup_true_lang-Cmc_75Q9.mjs +0 -97
  270. package/dist/index.vue_vue_type_script_setup_true_lang-DC2YOBp8.mjs +0 -103
  271. package/dist/index.vue_vue_type_script_setup_true_lang-DkqCU_07.js +0 -1
  272. package/dist/index.vue_vue_type_script_setup_true_lang-DueNaQN9.js +0 -1
  273. package/dist/index.vue_vue_type_script_setup_true_lang-lub2RD3v.js +0 -1
  274. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-DZPUQb3w.mjs +0 -288
  275. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-DZPUQb3w.mjs.gz +0 -0
  276. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-kCj43-0A.js +0 -1
  277. package/dist/lib-generate-test-usersig.min.js +0 -2
  278. package/dist/lib-generate-test-usersig.min.js.gz +0 -0
  279. package/dist/link-BgAziH_3.mjs +0 -63
  280. package/dist/link-Sqx3Q52p.js +0 -1
  281. package/dist/list-8FpcTs_2.js +0 -1
  282. package/dist/list-B67E-uei.mjs +0 -85
  283. package/dist/logo-mini-BQ9BrQ1U.mjs +0 -4
  284. package/dist/logo-mini-DwRdfcE7.js +0 -1
  285. package/dist/main-CmcbR12f.mjs +0 -72
  286. package/dist/main-DDPKI7Ni.js +0 -1
  287. package/dist/mobile-CBTICbJa.js +0 -1
  288. package/dist/mobile-Dcn_uE49.mjs +0 -115
  289. package/dist/parent-BP8X2kB8.js +0 -1
  290. package/dist/parent-BrVaTYeC.mjs +0 -131
  291. package/dist/popup-BEiDsECK.mjs +0 -4
  292. package/dist/popup-B_5FHg24.js +0 -1
  293. package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-23ItHebo.mjs +0 -89
  294. package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-GJCKGOLm.js +0 -1
  295. package/dist/roleItem-BQW8elI1.mjs +0 -103
  296. package/dist/roleItem-FUZgV9xL.js +0 -1
  297. package/dist/saveForm-BDrXtiIE.mjs +0 -160
  298. package/dist/saveForm-BxQmbdKc.js +0 -1
  299. package/dist/scan-BRU9Wew1.mjs +0 -945
  300. package/dist/scan-BRU9Wew1.mjs.gz +0 -0
  301. package/dist/scan-j7LW3Xdv.js +0 -1
  302. package/dist/scan-j7LW3Xdv.js.gz +0 -0
  303. package/dist/search-BdOGXXxf.js +0 -1
  304. package/dist/search-kPkciC8X.mjs +0 -114
  305. package/dist/selectConfig-Dj-vR1zX.mjs +0 -546
  306. package/dist/selectConfig-Dj-vR1zX.mjs.gz +0 -0
  307. package/dist/selectConfig-x1qMbzEi.js +0 -1
  308. package/dist/shortcutList-BXBGQdNn.mjs +0 -76
  309. package/dist/shortcutList-WSi4lUlm.js +0 -1
  310. package/dist/style.css +0 -1
  311. package/dist/style.css.gz +0 -0
  312. package/dist/subItem-DK1aBmBX.js +0 -1
  313. package/dist/subItem-LshS1tdW.mjs +0 -77
  314. package/dist/tagsView-BdC9SbGU.js +0 -8
  315. package/dist/tagsView-BdC9SbGU.js.gz +0 -0
  316. package/dist/tagsView-ByNvn7m7.mjs +0 -2695
  317. package/dist/tagsView-ByNvn7m7.mjs.gz +0 -0
  318. package/dist/transverse-Au31vuAN.mjs +0 -65
  319. package/dist/transverse-D2dpAzsD.js +0 -1
  320. package/dist/types/components/business/bcBox/bcBox.vue.d.ts +0 -66
  321. package/dist/types/components/business/bcBox/utils.d.ts +0 -68
  322. package/dist/types/components/business/bcBreadcrumb/bcBreadcrumb.vue.d.ts +0 -23
  323. package/dist/types/components/business/bcBreadcrumb/index.d.ts +0 -12
  324. package/dist/types/components/business/bcForm/baseForm.vue.d.ts +0 -273
  325. package/dist/types/components/business/bcForm/bcForm.vue.d.ts +0 -42
  326. package/dist/types/components/business/bcForm/type.d.ts +0 -138
  327. package/dist/types/components/business/bcForm/useGuide.d.ts +0 -564
  328. package/dist/types/components/business/bcSystemAuth/components/data.vue.d.ts +0 -3
  329. package/dist/types/components/business/bcSystemAuth/components/dict.vue.d.ts +0 -3
  330. package/dist/types/components/business/bcSystemAuth/components/fastSet/index.d.ts +0 -1
  331. package/dist/types/components/business/bcSystemAuth/components/fastSet/popup.vue.d.ts +0 -17
  332. package/dist/types/components/business/bcSystemAuth/components/field.vue.d.ts +0 -3
  333. package/dist/types/components/business/bcSystemAuth/components/form.vue.d.ts +0 -13
  334. package/dist/types/components/business/bcSystemAuth/components/index.d.ts +0 -5
  335. package/dist/types/components/business/bcSystemAuth/components/selectAll/index.d.ts +0 -24
  336. package/dist/types/components/business/bcSystemAuth/components/selectAll/index.vue.d.ts +0 -5
  337. package/dist/types/components/business/bcSystemAuth/components/table.vue.d.ts +0 -13
  338. package/dist/types/components/business/bcSystemAuth/components/widget/btns.vue.d.ts +0 -15
  339. package/dist/types/components/business/bcSystemAuth/components/widget/form.vue.d.ts +0 -15
  340. package/dist/types/components/business/bcSystemAuth/components/widget/index.d.ts +0 -3
  341. package/dist/types/components/business/bcSystemAuth/components/widget/tab.vue.d.ts +0 -45
  342. package/dist/types/components/business/bcSystemAuth/components/widget/tables.vue.d.ts +0 -15
  343. package/dist/types/components/business/bcSystemAuth/components/widget/tablesWraper.vue.d.ts +0 -15
  344. package/dist/types/components/business/bcSystemAuth/fastStore.d.ts +0 -512
  345. package/dist/types/components/business/bcSystemAuth/fastUtils.d.ts +0 -346
  346. package/dist/types/components/business/bcSystemAuth/index.d.ts +0 -3
  347. package/dist/types/components/business/bcSystemAuth/index.vue.d.ts +0 -26
  348. package/dist/types/components/business/bcSystemAuth/store.d.ts +0 -512
  349. package/dist/types/components/business/bcSystemAuth/type.d.ts +0 -42
  350. package/dist/types/components/business/bcSystemAuth/useAuth.d.ts +0 -28
  351. package/dist/types/components/business/bcSystemAuth/utils.d.ts +0 -346
  352. package/dist/types/components/business/bcSystemField/components/field.vue.d.ts +0 -3
  353. package/dist/types/components/business/bcSystemField/components/form.vue.d.ts +0 -13
  354. package/dist/types/components/business/bcSystemField/components/index.d.ts +0 -3
  355. package/dist/types/components/business/bcSystemField/components/selectAll/index.d.ts +0 -22
  356. package/dist/types/components/business/bcSystemField/components/selectAll/index.vue.d.ts +0 -5
  357. package/dist/types/components/business/bcSystemField/components/table.vue.d.ts +0 -13
  358. package/dist/types/components/business/bcSystemField/components/widget/form.vue.d.ts +0 -15
  359. package/dist/types/components/business/bcSystemField/components/widget/index.d.ts +0 -2
  360. package/dist/types/components/business/bcSystemField/components/widget/tab.vue.d.ts +0 -45
  361. package/dist/types/components/business/bcSystemField/components/widget/tables.vue.d.ts +0 -15
  362. package/dist/types/components/business/bcSystemField/components/widget/tablesWraper.vue.d.ts +0 -15
  363. package/dist/types/components/business/bcSystemField/index.d.ts +0 -3
  364. package/dist/types/components/business/bcSystemField/index.vue.d.ts +0 -16
  365. package/dist/types/components/business/bcSystemField/store.d.ts +0 -343
  366. package/dist/types/components/business/bcSystemField/useAuth.d.ts +0 -16
  367. package/dist/types/components/business/bcSystemField/utils.d.ts +0 -187
  368. package/dist/types/components/business/bcTable/bcFormTable.vue.d.ts +0 -142
  369. package/dist/types/components/business/bcTable/bcTable.vue.d.ts +0 -51
  370. package/dist/types/components/business/bcTable/components/btn/btn.vue.d.ts +0 -77
  371. package/dist/types/components/business/bcTable/components/index.d.ts +0 -4
  372. package/dist/types/components/business/bcTable/components/popup/index.d.ts +0 -3
  373. package/dist/types/components/business/bcTable/components/query/components/sortForm/index.d.ts +0 -2
  374. package/dist/types/components/business/bcTable/components/query/components/sortForm/sortForm.vue.d.ts +0 -23
  375. package/dist/types/components/business/bcTable/components/query/drag.vue.d.ts +0 -244
  376. package/dist/types/components/business/bcTable/components/query/query.vue.d.ts +0 -249
  377. package/dist/types/components/business/bcTable/components/query/useQuickSearch.d.ts +0 -8
  378. package/dist/types/components/business/bcTable/components/table/colgroup.vue.d.ts +0 -28
  379. package/dist/types/components/business/bcTable/components/table/column.vue.d.ts +0 -35
  380. package/dist/types/components/business/bcTable/components/table/components/sortColumn/index.d.ts +0 -2
  381. package/dist/types/components/business/bcTable/components/table/components/sortColumn/sortColumn.vue.d.ts +0 -25
  382. package/dist/types/components/business/bcTable/components/table/components/sortColumn/types.d.ts +0 -20
  383. package/dist/types/components/business/bcTable/components/table/table.vue.d.ts +0 -67
  384. package/dist/types/components/business/bcTable/components/table/useTable.d.ts +0 -36
  385. package/dist/types/components/business/bcTable/components/table/useTableHeight.d.ts +0 -25
  386. package/dist/types/components/business/bcTable/methods/cellDetailMethod.d.ts +0 -3
  387. package/dist/types/components/business/bcTable/methods/filterAgeMethod.d.ts +0 -3
  388. package/dist/types/components/business/bcTable/methods/footerMethod.d.ts +0 -4
  389. package/dist/types/components/business/bcTable/methods/formBtnMethod.d.ts +0 -8
  390. package/dist/types/components/business/bcTable/methods/index.d.ts +0 -4
  391. package/dist/types/components/business/bcTable/utils/authField.d.ts +0 -6
  392. package/dist/types/components/business/bcTable/utils/onFormKey.d.ts +0 -16
  393. package/dist/types/components/business/bcTable/utils/onTableKey.d.ts +0 -16
  394. package/dist/types/components/business/bcTable/utils/parseTable.d.ts +0 -117
  395. package/dist/types/components/business/bcTable/utils/type.d.ts +0 -463
  396. package/dist/types/components/business/bcTable/utils/useBcTable.d.ts +0 -12918
  397. package/dist/types/components/business/bcTable/utils/useButon.d.ts +0 -12
  398. package/dist/types/components/business/bcTable/utils/useFormTableHeight.d.ts +0 -20
  399. package/dist/types/components/business/bcTable/utils/useKeydownEvent.d.ts +0 -45
  400. package/dist/types/components/business/bcVisual/bcVisual.vue.d.ts +0 -57
  401. package/dist/types/components/business/bcVisual/components/setting/dragItem.vue.d.ts +0 -46
  402. package/dist/types/components/business/bcVisual/components/setting/extendItem.vue.d.ts +0 -13
  403. package/dist/types/components/business/bcVisual/components/setting/setting.vue.d.ts +0 -3
  404. package/dist/types/components/business/bcVisual/components/setting/useDrag.d.ts +0 -10
  405. package/dist/types/components/business/bcVisual/components/table/table.vue.d.ts +0 -6
  406. package/dist/types/components/business/bcVisual/components/updateName/index.d.ts +0 -1
  407. package/dist/types/components/business/bcVisual/components/updateName/popup.vue.d.ts +0 -17
  408. package/dist/types/components/business/bcVisual/components/updateSql/addCondition.vue.d.ts +0 -23
  409. package/dist/types/components/business/bcVisual/components/updateSql/index.d.ts +0 -4
  410. package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/index.d.ts +0 -19
  411. package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/index.vue.d.ts +0 -21
  412. package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/nodeTree.vue.d.ts +0 -19
  413. package/dist/types/components/business/bcVisual/components/updateSql/popup.vue.d.ts +0 -17
  414. package/dist/types/components/business/bcVisual/type.d.ts +0 -186
  415. package/dist/types/components/business/bcVisual/useTableFormat.d.ts +0 -271
  416. package/dist/types/components/business/bcVisual/utils.d.ts +0 -134
  417. package/dist/types/plugins/index.d.ts +0 -33
  418. package/dist/types/types/auth.d.ts +0 -81
  419. package/dist/types/types/components.d.ts +0 -29
  420. package/dist/types/types/customData.d.ts +0 -309
  421. package/dist/types/types/form.d.ts +0 -100
  422. package/dist/types/types/formItem/autocomplete.d.ts +0 -45
  423. package/dist/types/types/formItem/button.d.ts +0 -39
  424. package/dist/types/types/formItem/checkbox.d.ts +0 -80
  425. package/dist/types/types/formItem/index.d.ts +0 -9
  426. package/dist/types/types/formItem/input.d.ts +0 -65
  427. package/dist/types/types/formItem/inputGroup.d.ts +0 -14
  428. package/dist/types/types/formItem/inputNumber.d.ts +0 -41
  429. package/dist/types/types/formItem/radio.d.ts +0 -58
  430. package/dist/types/types/formItem/selelct.d.ts +0 -56
  431. package/dist/types/types/formItem/treeSelect.d.ts +0 -41
  432. package/dist/types/types/index.d.ts +0 -6
  433. package/dist/types/types/system.d.ts +0 -14
  434. package/dist/types/utils/arrayOperation.d.ts +0 -21
  435. package/dist/types/utils/authFunction.d.ts +0 -18
  436. package/dist/types/utils/build.d.ts +0 -11
  437. package/dist/types/utils/cfprint.d.ts +0 -70
  438. package/dist/types/utils/common.d.ts +0 -15
  439. package/dist/types/utils/commonFunction.d.ts +0 -29
  440. package/dist/types/utils/crypto.d.ts +0 -5
  441. package/dist/types/utils/device_info.d.ts +0 -14
  442. package/dist/types/utils/download.d.ts +0 -73
  443. package/dist/types/utils/file.d.ts +0 -6
  444. package/dist/types/utils/formatTime.d.ts +0 -37
  445. package/dist/types/utils/getDataType.d.ts +0 -9
  446. package/dist/types/utils/getStyleSheets.d.ts +0 -11
  447. package/dist/types/utils/index.d.ts +0 -29
  448. package/dist/types/utils/loading.d.ts +0 -10
  449. package/dist/types/utils/lodash.d.ts +0 -3
  450. package/dist/types/utils/mitt.d.ts +0 -11
  451. package/dist/types/utils/number.d.ts +0 -82
  452. package/dist/types/utils/other.d.ts +0 -75
  453. package/dist/types/utils/request/index.d.ts +0 -6
  454. package/dist/types/utils/request/interceptors/request/authorization.interceptor.d.ts +0 -4
  455. package/dist/types/utils/request/interceptors/request/index.d.ts +0 -2
  456. package/dist/types/utils/request/interceptors/request/result.type.interceptor.d.ts +0 -4
  457. package/dist/types/utils/request/interceptors/request/undefined-params-handler.interceptor.d.ts +0 -13
  458. package/dist/types/utils/request/interceptors/response/error-handler.interceptor.d.ts +0 -4
  459. package/dist/types/utils/request/interceptors/response/index.d.ts +0 -2
  460. package/dist/types/utils/request/repeatRequest.d.ts +0 -4
  461. package/dist/types/utils/request/request.d.ts +0 -7
  462. package/dist/types/utils/setIconfont.d.ts +0 -11
  463. package/dist/types/utils/shortcutList.d.ts +0 -4
  464. package/dist/types/utils/showMessage.d.ts +0 -6
  465. package/dist/types/utils/showMessageBox.d.ts +0 -6
  466. package/dist/types/utils/showNotification.d.ts +0 -6
  467. package/dist/types/utils/showPopup/index.d.ts +0 -35
  468. package/dist/types/utils/storage.d.ts +0 -177
  469. package/dist/types/utils/theme.d.ts +0 -13
  470. package/dist/types/utils/toolsValidate.d.ts +0 -149
  471. package/dist/types/utils/tree.d.ts +0 -26
  472. package/dist/types/utils/update.d.ts +0 -1
  473. package/dist/types/utils/url.d.ts +0 -23
  474. package/dist/types/utils/watermark.d.ts +0 -9
  475. package/dist/useConfigInfo-2zEYLSSs.js +0 -1
  476. package/dist/useConfigInfo-PTkkdx-l.mjs +0 -19
  477. package/dist/user-DRbPksY1.js +0 -1
  478. package/dist/user-Ov9wSafP.mjs +0 -246
  479. package/dist/userNews-Cqxll0Ds.mjs +0 -72
  480. package/dist/userNews-DoDA3w2k.js +0 -1
  481. package/dist/userSelect-DSYUFA--.mjs +0 -4
  482. package/dist/userSelect-XDlpJz1X.js +0 -1
  483. package/dist/userSelect.vue_vue_type_script_setup_true_lang-CI2_r4Ah.mjs +0 -100
  484. package/dist/userSelect.vue_vue_type_script_setup_true_lang-Dyt80LKy.js +0 -1
  485. package/dist/vertical-CnMFrhxt.mjs +0 -133
  486. package/dist/vertical-ST7_xt19.js +0 -1
package/dist/index.js CHANGED
@@ -1 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BKOItnzJ.js");exports.Colgroup=e.Colgroup,exports.Column=e.Column,exports.ElAffix=e.ElAffix,exports.ElAlert=e.ElAlert,exports.ElAnchor=e.ElAnchor,exports.ElAnchorLink=e.ElAnchorLink,exports.ElAside=e.ElAside,exports.ElAutoResizer=e.ElAutoResizer,exports.ElAutocomplete=e.ElAutocomplete,exports.ElAvatar=e.ElAvatar,exports.ElBacktop=e.ElBacktop,exports.ElBadge=e.ElBadge,exports.ElBreadcrumb=e.ElBreadcrumb,exports.ElBreadcrumbItem=e.ElBreadcrumbItem,exports.ElButton=e.ElButton,exports.ElButtonGroup=e.ElButtonGroup,exports.ElCalendar=e.ElCalendar,exports.ElCard=e.ElCard,exports.ElCarousel=e.ElCarousel,exports.ElCarouselItem=e.ElCarouselItem,exports.ElCascader=e.ElCascader,exports.ElCascaderPanel=e.ElCascaderPanel,exports.ElCheckTag=e.ElCheckTag,exports.ElCheckbox=e.ElCheckbox,exports.ElCheckboxButton=e.ElCheckboxButton,exports.ElCheckboxGroup=e.ElCheckboxGroup,exports.ElCol=e.ElCol,exports.ElCollapse=e.ElCollapse,exports.ElCollapseItem=e.ElCollapseItem,exports.ElCollapseTransition=e.ElCollapseTransition,exports.ElColorPicker=e.ElColorPicker,exports.ElConfigProvider=e.ElConfigProvider,exports.ElContainer=e.ElContainer,exports.ElCountdown=e.ElCountdown,exports.ElDatePicker=e.ElDatePicker,exports.ElDescriptions=e.ElDescriptions,exports.ElDescriptionsItem=e.ElDescriptionsItem,exports.ElDialog=e.ElDialog,exports.ElDivider=e.ElDivider,exports.ElDrawer=e.ElDrawer,exports.ElDropdown=e.ElDropdown,exports.ElDropdownItem=e.ElDropdownItem,exports.ElDropdownMenu=e.ElDropdownMenu,exports.ElEmpty=e.ElEmpty,exports.ElFooter=e.ElFooter,exports.ElForm=e.ElForm,exports.ElFormItem=e.ElFormItem,exports.ElHeader=e.ElHeader,exports.ElIcon=e.ElIcon,exports.ElImage=e.ElImage,exports.ElImageViewer=e.ElImageViewer,exports.ElInput=e.ElInput,exports.ElInputNumber=e.ElInputNumber,exports.ElLink=e.ElLink,exports.ElMain=e.ElMain,exports.ElMention=e.ElMention,exports.ElMenu=e.ElMenu,exports.ElMenuItem=e.ElMenuItem,exports.ElMenuItemGroup=e.ElMenuItemGroup,exports.ElOption=e.ElOption,exports.ElOptionGroup=e.ElOptionGroup,exports.ElPageHeader=e.ElPageHeader,exports.ElPagination=e.ElPagination,exports.ElPopconfirm=e.ElPopconfirm,exports.ElPopover=e.ElPopover,exports.ElPopper=e.ElPopper,exports.ElProgress=e.ElProgress,exports.ElRadio=e.ElRadio,exports.ElRadioButton=e.ElRadioButton,exports.ElRadioGroup=e.ElRadioGroup,exports.ElRate=e.ElRate,exports.ElResult=e.ElResult,exports.ElRow=e.ElRow,exports.ElScrollbar=e.ElScrollbar,exports.ElSegmented=e.ElSegmented,exports.ElSelect=e.ElSelect,exports.ElSelectV2=e.ElSelectV2,exports.ElSkeleton=e.ElSkeleton,exports.ElSkeletonItem=e.ElSkeletonItem,exports.ElSlider=e.ElSlider,exports.ElSpace=e.ElSpace,exports.ElStatistic=e.ElStatistic,exports.ElStep=e.ElStep,exports.ElSteps=e.ElSteps,exports.ElSubMenu=e.ElSubMenu,exports.ElSwitch=e.ElSwitch,exports.ElTabPane=e.ElTabPane,exports.ElTable=e.ElTable,exports.ElTableColumn=e.ElTableColumn,exports.ElTableV2=e.ElTableV2,exports.ElTabs=e.ElTabs,exports.ElTag=e.ElTag,exports.ElText=e.ElText,exports.ElTimePicker=e.ElTimePicker,exports.ElTimeSelect=e.ElTimeSelect,exports.ElTimeline=e.ElTimeline,exports.ElTimelineItem=e.ElTimelineItem,exports.ElTooltip=e.ElTooltip,exports.ElTour=e.ElTour,exports.ElTourStep=e.ElTourStep,exports.ElTransfer=e.ElTransfer,exports.ElTree=e.ElTree,exports.ElTreeSelect=e.ElTreeSelect,exports.ElTreeV2=e.ElTreeV2,exports.ElUpload=e.ElUpload,exports.ElWatermark=e.ElWatermark,exports.Grid=e.Grid,exports.Hooxs=e.index,exports.HsConfigProvider=e.ElConfigProvider,exports.HsLoading=e.ElLoading,exports.HsMessage=e.HsMessage,exports.HsMessageBox=e.HsMessageBox,exports.HsNotification=e.HsNotification,exports.HsTree=e.ElTree,exports.Table=e.Table,exports.Toolbar=e.Toolbar,exports.Utils=e.index$1,exports.VXETable=e.VXETable,exports.VxeColgroup=e.VxeColgroup,exports.VxeColumn=e.VxeColumn,exports.VxeGrid=e.VxeGrid,exports.VxeTable=e.VxeTable,exports.VxeToolbar=e.VxeToolbar,exports.VxeUI=e.VxeUI,exports._t=e._t,exports.clipboard=e.clipboard,exports.commands=e.commands,exports.component=e.component,exports.config=e.config,exports.configUnidId=e.configUnidId,exports.directive=e.directive,exports.formats=e.formats,exports.getBatchConfig=e.getBatchConfig,exports.getConfig=e.getConfig,exports.getConfigData=e.getItemConfig,exports.getFormData=e.getFormData,exports.getI18n=e.getI18n,exports.getIcon=e.getIcon,exports.getLoadData=e.getLoadData,exports.getTheme=e.getTheme,exports.globalEvents=e.globalEvents,exports.globalResize=e.globalResize,exports.hooks=e.hooks,exports.install=e.install,exports.interceptor=e.interceptor,exports.isShowItem=e.isShowItem,exports.log=e.log,exports.mathTool=e.mathTool,exports.menus=e.menus,exports.modal=e.modal,exports.print=e.print,exports.readFile=e.readFile,exports.renderer=e.renderer,exports.resetColumn=e.getTableSpecialType,exports.saveFile=e.saveFile,exports.setConfig=e.setConfig,exports.setI18n=e.setI18n,exports.setIcon=e.setIcon,exports.setLanguage=e.setLanguage,exports.setTheme=e.setTheme,exports.setup=e.setup,exports.showPopupCount=e.showPopupCount,exports.t=e.t,exports.use=e.use,exports.useHsAdminUi=e.useHsAdminUi,exports.validators=e.validators,exports.version=e.version,exports.zhCn=e.zhCn;
1
+ "use strict";var Lc=Object.defineProperty;var Mc=(e,n,o)=>n in e?Lc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Ea=(e,n,o)=>Mc(e,typeof n!="symbol"?n+"":n,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./element-plus-BDPBrlGs.js"),Vl=require("./vxe-pc-ui-yKZybkNt.js"),ge=require("./vxe-table-AZLI7TZY.js"),t=require("vue"),y=require("./lodash-Bz9d-A6a.js"),P=require("./vender-CW460RJ7.js"),ot=require("./crypto-js-CDv3g9Fu.js"),Qn=require("./mathjs-DUElwFnu.js"),se=require("./trtc-sdk-v5-CQx2bVFN.js");typeof String.prototype.removeHTMLTag>"u"&&(String.prototype.removeHTMLTag=function(){return this.replace(/<.+?>([^<>]+?)<.+?>/g,"$1")});(function(e,n){n(e),typeof define=="function"&&define.amd?define([],n):typeof module<"u"&&module.exports?module.exports=n():e.ws=n()})(window,function(e,n){if(!("WebSocket"in window))return;var o,a=document.createElement("div"),r={automaticOpen:!0,reconnectDecay:1.5,host:"127.0.0.1",port:54321,protocol:"ws"},i=function(c){switch(c.type){case"connecting":console.log("Connecting to cfprint.",c);break;case"open":console.log("Connected to cfprint.",c);break;case"close":console.log("Disconnected from cfprint.",c);break;case"message":console.log("Got a message from cfprint: "+c.data,c);break;case"error":console.log("A error occured: "+c.data,c);break;default:console.log("EVENT: ",c)}},l={CONNECTING:WebSocket.CONNECTING,OPEN:WebSocket.OPEN,CLOSING:WebSocket.CLOSING,CLOSED:WebSocket.CLOSED};function u(c,d,f){var m=this;this.ver="1.3.8.1",f||(f={});for(var h in r)typeof f[h]<"u"?this[h]=f[h]:this[h]=r[h];this.host=c||this.host,this.port=d||this.port,this.url=this.getURL(),this.readyState=WebSocket.CONNECTING;for(var _ in l)this[_]=l[_];return a.addEventListener("connecting",function(g){m!==window&&m.onconnecting(g)}),a.addEventListener("open",function(g){m!==window&&m.onopen(g)}),a.addEventListener("message",function(g){m!==window&&m.onmessage(g)}),a.addEventListener("close",function(g){m!==window&&m.onclose(g)}),a.addEventListener("error",function(g){m!==window&&m.onerror(g)}),this.addEventListener=a.addEventListener.bind(a),this.removeEventListener=a.removeEventListener.bind(a),this.dispatchEvent=a.dispatchEvent.bind(a),this.automaticOpen===!0&&this!==window&&this.open(),this}function s(c,d){var f=document.createEvent("CustomEvent");return f.initCustomEvent(c,!1,!1,d),f}return u.prototype.onconnecting=i,u.prototype.onopen=i,u.prototype.onmessage=i,u.prototype.onclose=i,u.prototype.onerror=i,u.prototype.setProtocol=function(c){this.wsocket&&(this.protocol=c)},u.prototype.setPort=function(c){this.wsocket&&(this.port=c)},u.prototype.setHost=function(c){this.wsocket&&(this.host=c)},u.prototype.getURL=function(c){return this.wsocket&&this.wsocket.readyState===this.OPEN?this.wsocket.url:(this.protocol||"ws")+"://"+(this.host||"127.0.0.1")+":"+(this.port||54321)},u.prototype.send=function(c){if(this.wsocket&&this.wsocket.readyState===1){var d="";if(typeof c=="string")d=c;else if(typeof c=="object")d=JSON.stringify(c,null,2);else{var f=s("error",{message:"Invalid data format, only json string or json object is allowed."});a.dispatchEvent(f);return}try{d=btoa(unescape(encodeURIComponent(d))),d="base64:"+d,this.wsocket.send(d)}catch(m){var f=s("error",{message:m.message});m.dispatchEvent(f)}}else{var d=s("error",{message:"Not connected to cfprint server or disconnected."});a.dispatchEvent(d)}},u.prototype.close=function(c,d){typeof c>"u"&&(c=1e3),this.wsocket&&this.wsocket.close(c,d)},u.prototype.open=function(){var c=this;return this.url=this.getURL(),o=new WebSocket(this.url,this.protocol||[]),a.dispatchEvent(s("connecting")),o.onopen=function(d){c.protocol=u.protocol,c.readyState=WebSocket.OPEN;var f=s("open");a.dispatchEvent(f)},o.onclose=function(d){c.readyState=WebSocket.CLOSED;var f=s("connecting");f.code=d.code,f.reason=d.reason,f.wasClean=d.wasClean,a.dispatchEvent(f),a.dispatchEvent(s("close"))},o.onmessage=function(d){var f=s("message");f.data=d.data,a.dispatchEvent(f)},o.onerror=function(d){var f=s("error");a.dispatchEvent(f)},this.wsocket=o,this},u.prototype.state=function(){return this.wsocket?this.wsocket.readyState:WebSocket.CLOSED},u.prototype.log=function(c,d){var f=this.output||"output",m=document.getElementById(f);if(m&&m.appendChild){var h=document.createElement("p");h.style.wordWrap="break-word",h.style.padding="8px",h.style.background="#eee",h.innerHTML="LOG: "+c,m.childNodes.length>0?m.insertBefore(h,m.childNodes[0]):m.appendChild(h)}d?console.log(c,d):console.log(c)},u});const Oc=t.defineComponent({__name:"Affix",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElAffix),{...a.$attrs,ref:o},a.$slots))))}}),qc=t.defineComponent({__name:"Alert",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElAlert),{...a.$attrs,ref:o},a.$slots))))}}),zc=t.defineComponent({__name:"Aside",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElAside),{...a.$attrs,ref:o},a.$slots))))}}),Pc=t.defineComponent({__name:"Autocomplete",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElAutocomplete),{...a.$attrs,ref:o},a.$slots))))}}),Fc=t.defineComponent({__name:"Badge",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElBadge),{...a.$attrs,ref:o},a.$slots))))}}),jc=t.defineComponent({__name:"Button",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElButton),{...a.$attrs,ref:o},a.$slots))))}}),Uc=t.defineComponent({__name:"ButtonGroup",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElButtonGroup),{...a.$attrs,ref:o},a.$slots))))}}),Hc=t.defineComponent({__name:"Calendar",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCalendar),{...a.$attrs,ref:o},a.$slots))))}}),Wc=t.defineComponent({__name:"Card",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCard),{...a.$attrs,ref:o},a.$slots))))}}),Kc=t.defineComponent({__name:"Carousel",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCarousel),{...a.$attrs,ref:o},a.$slots))))}}),Zc=t.defineComponent({__name:"CarouselItem",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCarouselItem),{...a.$attrs,ref:o},a.$slots))))}}),Jc=t.defineComponent({__name:"Cascader",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCascader),{...a.$attrs,ref:o},a.$slots))))}}),Gc=t.defineComponent({__name:"CascaderPanel",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCascaderPanel),{...a.$attrs,ref:o},a.$slots))))}}),Qc=t.defineComponent({__name:"Checkbox",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCheckbox),{...a.$attrs,ref:o},a.$slots))))}}),Yc=t.defineComponent({__name:"CheckboxButton",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCheckboxButton),{...a.$attrs,ref:o},a.$slots))))}}),Xc=t.defineComponent({__name:"CheckboxGroup",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCheckboxGroup),{...a.$attrs,ref:o},a.$slots))))}}),eu=t.defineComponent({__name:"CheckTag",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCheckTag),{...a.$attrs,ref:o},a.$slots))))}}),tu=t.defineComponent({__name:"Col",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCol),{...a.$attrs,ref:o},a.$slots))))}}),nu=t.defineComponent({__name:"Collapse",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCollapse),{...a.$attrs,ref:o},a.$slots))))}}),ou=t.defineComponent({__name:"CollapseItem",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElCollapseItem),{...a.$attrs,ref:o},a.$slots))))}}),au=t.defineComponent({__name:"ColorPicker",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElColorPicker),{...a.$attrs,ref:o},a.$slots))))}}),ru=t.defineComponent({__name:"Container",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElContainer),{...a.$attrs,ref:o},a.$slots))))}}),iu=t.defineComponent({__name:"DatePicker",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElDatePicker),{...a.$attrs,unlinkPanels:!0,ref:o},a.$slots))))}}),lu=t.defineComponent({__name:"Dialog",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElDialog),{...a.$attrs,ref:o},a.$slots))))}}),su=t.defineComponent({__name:"Drawer",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElDrawer),{...a.$attrs,ref:o},a.$slots))))}}),cu=t.defineComponent({__name:"Dropdown",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElDropdown),{...a.$attrs,ref:o},a.$slots))))}}),uu=t.defineComponent({__name:"DropdownItem",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElDropdownItem),{...a.$attrs,ref:o},a.$slots))))}}),du=t.defineComponent({__name:"DropdownMenu",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElDropdownMenu),{...a.$attrs,ref:o},a.$slots))))}}),fu=t.defineComponent({__name:"Empty",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElEmpty),{...a.$attrs,ref:o},a.$slots))))}}),mu=t.defineComponent({__name:"Footer",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElFooter),{...a.$attrs,ref:o},a.$slots))))}}),hu=t.defineComponent({__name:"Form",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElForm),{...a.$attrs,ref:o},a.$slots))))}}),pu=t.defineComponent({__name:"FormItem",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElFormItem),{...a.$attrs,ref:o},a.$slots))))}}),_u=t.defineComponent({__name:"Header",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElHeader),{...a.$attrs,ref:o},a.$slots))))}}),gu=t.defineComponent({__name:"Image",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElImage),{...a.$attrs,ref:o},a.$slots))))}}),vu=t.defineComponent({__name:"ImageViewer",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElImageViewer),{...a.$attrs,ref:o},a.$slots))))}}),yu=t.defineComponent({__name:"Input",props:{type:{type:String,default:""},disabledNumber:{type:Boolean,default:!1}},emits:["focus"],setup(e,{emit:n}){const o=n,a=t.getCurrentInstance(),r=t.inject("setItemInstance",()=>{});function i(s){const c=()=>s==null?void 0:s.ref;y._.set(a,"exposed",Object.assign({},s||{},{activeElement:c,focus})),t.nextTick(()=>{var m,h,_;const d=(m=c())==null?void 0:m.closest(".el-form-item"),f=(_=(h=d==null?void 0:d.className)==null?void 0:h.match(/query_[a-zA-Z0-9_]+/))==null?void 0:_[0];f&&r({...a==null?void 0:a.exposed,activeElement:c,focus},f.replace("query_",""))})}function l(){var s;(s=a==null?void 0:a.proxy)==null||s.select(),o("focus")}function u(s){let c=s.replace(/[^0-9.-]/g,"");const d=c.split(".");d.length>2&&(c=d[0]+"."+d.slice(1).join(""));const f=c.split("-");return f.length>2&&(c=f[0]+"-"+f.slice(1).join("")),c.startsWith("00")&&c.length>1&&(c="0"),s===""?"":c}return(s,c)=>e.type=="number"&&!e.disabledNumber?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElInput),{...s.$attrs,type:"text",formatter:u,parser:u,onFocus:l,ref:i},s.$slots)),{key:0})):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElInput),{...s.$attrs,ref:i},s.$slots)),{key:1}))}}),bu=t.defineComponent({__name:"InputNumber",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElInputNumber),{...a.$attrs,ref:o},a.$slots))))}}),wu=t.defineComponent({__name:"Main",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElMain),{...a.$attrs,ref:o},a.$slots))))}}),ku=t.defineComponent({__name:"Menu",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElMenu),{...a.$attrs,ref:o},a.$slots))))}}),Cu=t.defineComponent({__name:"MenuItem",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElMenuItem),{...a.$attrs,ref:o},a.$slots))))}}),Eu=t.defineComponent({__name:"SubMenu",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElSubMenu),{...a.$attrs,ref:o},a.$slots))))}}),Su=t.defineComponent({__name:"Option",setup(e){return(n,o)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElOption),n.$attrs,n.$slots))))}}),xu=t.defineComponent({__name:"OptionGroup",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElOptionGroup),{...a.$attrs,ref:o},a.$slots))))}}),Du=t.defineComponent({__name:"Popconfirm",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElPopconfirm),{...a.$attrs,ref:o},a.$slots))))}}),Iu=t.defineComponent({__name:"Popover",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElPopover),{...a.$attrs,ref:o},a.$slots))))}}),Bu=t.defineComponent({__name:"Progress",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElProgress),{...a.$attrs,ref:o},a.$slots))))}}),Nu=t.defineComponent({__name:"Qr",setup(e){return(n,o)=>(t.openBlock(),t.createBlock(P.vueQr))}}),$u=t.defineComponent({__name:"Radio",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElRadio),{...a.$attrs,ref:o},a.$slots))))}}),Vu=t.defineComponent({__name:"RadioButton",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElRadioButton),{...a.$attrs,ref:o},a.$slots))))}}),Tu=t.defineComponent({__name:"RadioGroup",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElRadioGroup),{...a.$attrs,ref:o},a.$slots))))}}),Ru=t.defineComponent({__name:"Rate",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElRate),{...a.$attrs,ref:o},a.$slots))))}}),Au=t.defineComponent({__name:"Result",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElResult),{...a.$attrs,ref:o},a.$slots))))}}),Lu=t.defineComponent({__name:"Row",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElRow),{...a.$attrs,ref:o},a.$slots))))}}),Mu=t.defineComponent({__name:"Scrollbar",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElScrollbar),{...a.$attrs,ref:o},a.$slots))))}}),Ou=t.defineComponent({__name:"Select",props:{modelValue:{type:[String,Number,Array]},placeholder:{type:String,default:" "}},emits:["update:modelValue","change"],setup(e,{expose:n,emit:o}){const a=t.useAttrs(),r=t.ref(),i=o,l=e,u=t.computed({get(){return Array.isArray(l.modelValue)?l.modelValue:(a.multiple===""||a.multiple===!0)&&typeof l.modelValue=="string"&&l.modelValue===""?(i("update:modelValue",[]),[]):(a.multiple===""||a.multiple===!0)&&typeof l.modelValue=="string"&&l.modelValue!==""?(i("update:modelValue",l.modelValue.split(",")),l.modelValue.split(",")):String(l.modelValue??"")},set(d){i("update:modelValue",d)}});function s(){return r.value}function c(d){i("change",d)}return n({selectRef:r,getInstance:s}),(d,f)=>(t.openBlock(),t.createBlock(t.unref(A.ElSelect),{ref_key:"selectRef",ref:r,modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=m=>u.value=m),placeholder:e.placeholder,filterable:"",onChange:c},t.createSlots({_:2},[t.renderList(Object.keys(d.$slots),m=>({name:m,fn:t.withCtx(h=>[t.renderSlot(d.$slots,m,t.normalizeProps(t.guardReactiveProps(h||{})))])}))]),1032,["modelValue","placeholder"]))}}),qu=t.defineComponent({__name:"SelectV2",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElSelectV2),{...a.$attrs,ref:o},a.$slots))))}}),zu=t.defineComponent({__name:"Slider",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElSlider),{...a.$attrs,ref:o},a.$slots))))}}),Pu=t.defineComponent({__name:"Step",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElStep),{...a.$attrs,ref:o},a.$slots))))}}),Fu=t.defineComponent({__name:"Steps",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElSteps),{...a.$attrs,ref:o},a.$slots))))}}),ju=t.defineComponent({__name:"Switch",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElSwitch),{...a.$attrs,ref:o},a.$slots))))}}),Uu=t.defineComponent({__name:"Table",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTable),{...a.$attrs,ref:o},a.$slots))))}}),Hu=t.defineComponent({__name:"TableColumn",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTableColumn),{...a.$attrs,ref:o},a.$slots))))}}),Wu=t.defineComponent({__name:"TabPane",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTabPane),{...a.$attrs,ref:o},a.$slots))))}}),Ku=t.defineComponent({__name:"Tabs",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTabs),{...a.$attrs,ref:o},a.$slots))))}}),Zu=t.defineComponent({__name:"Tag",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTag),{...a.$attrs,ref:o},a.$slots))))}}),Ju=t.defineComponent({__name:"Tooltip",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTooltip),{...a.$attrs,ref:o},a.$slots))))}}),Gu=t.defineComponent({__name:"Tour",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTour),{...a.$attrs,ref:o},a.$slots))))}}),Qu=t.defineComponent({__name:"TourStep",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTourStep),{...a.$attrs,ref:o},a.$slots))))}}),Yu=t.defineComponent({__name:"Transfer",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTransfer),{...a.$attrs,ref:o},a.$slots))))}}),Xu=t.defineComponent({__name:"Tree",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTree),{...a.$attrs,ref:o},a.$slots))))}}),ed=t.defineComponent({__name:"TreeSelect",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTreeSelect),{...a.$attrs,ref:o},a.$slots))))}}),td=t.defineComponent({__name:"TreeV2",setup(e){const n=t.getCurrentInstance();function o(a){const r=()=>a;y._.set(n,"exposed",Object.assign(a||{},{getInstance:r}))}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElTreeV2),{...a.$attrs,ref:o},a.$slots))))}}),nd=t.defineComponent({__name:"Upload",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElUpload),{...a.$attrs,ref:o},a.$slots))))}}),od=t.defineComponent({__name:"Watermark",setup(e){const n=t.getCurrentInstance();function o(a){y._.set(n,"exposed",a||{})}return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.h(t.unref(A.ElWatermark),{...a.$attrs,ref:o},a.$slots))))}}),ad={Affix:Oc,Alert:qc,Aside:zc,Autocomplete:Pc,Badge:Fc,Button:jc,ButtonGroup:Uc,Calendar:Hc,Card:Wc,Carousel:Kc,CarouselItem:Zc,Cascader:Jc,CascaderPanel:Gc,Checkbox:Qc,CheckboxButton:Yc,CheckboxGroup:Xc,CheckTag:eu,Col:tu,Collapse:nu,CollapseItem:ou,ColorPicker:au,Container:ru,DatePicker:iu,Dialog:lu,Drawer:su,Dropdown:cu,DropdownItem:uu,DropdownMenu:du,Empty:fu,Footer:mu,Form:hu,FormItem:pu,Header:_u,Image:gu,ImageViewer:vu,Input:yu,InputNumber:bu,Main:wu,Menu:ku,MenuItem:Cu,SubMenu:Eu,Option:Su,OptionGroup:xu,Popconfirm:Du,Popover:Iu,Progress:Bu,Qr:Nu,Radio:$u,RadioButton:Vu,RadioGroup:Tu,Rate:Ru,Result:Au,Row:Lu,Scrollbar:Mu,Select:Ou,SelectV2:qu,Slider:zu,Step:Pu,Steps:Fu,Switch:ju,Table:Uu,TableColumn:Hu,TabPane:Wu,Tabs:Ku,Tag:Zu,Tooltip:Ju,Tour:Gu,TourStep:Qu,Transfer:Yu,Tree:Xu,TreeSelect:ed,TreeV2:td,Upload:nd,Watermark:od};function rd(e){for(const[n,o]of Object.entries(ad))e.component(`El${n}`,o),e.component(`Hs${n}`,o)}const id=["src"],ld=t.defineComponent({__name:"bcIcon",props:{name:{type:String},size:{type:[Number,String],default:()=>14},color:{type:String}},setup(e){const n=e,o=["https","http","/src","/assets","data:image",void 0],a=t.computed(()=>n==null?void 0:n.name),r=t.computed(()=>{var c;return(c=n==null?void 0:n.name)==null?void 0:c.startsWith("ele-")}),i=t.computed(()=>o.find(c=>{var d;return(d=n.name)==null?void 0:d.startsWith(c)})),l=t.computed(()=>`font-size: ${n.size}px;color: ${n.color};`),u=t.computed(()=>`width: ${n.size}px;height: ${n.size}px;display: inline-block;overflow: hidden;`),s=t.computed(()=>{const c=[];return["-webkit","-ms","-o","-moz"].forEach(f=>c.push(`${f}-filter: drop-shadow(${n.color} 30px 0);`)),`width: ${n.size}px;height: ${n.size}px;position: relative;left: -${n.size}px;${c.join("")}`});return(c,d)=>r.value?(t.openBlock(),t.createElementBlock("i",{key:0,class:"el-icon",style:t.normalizeStyle(l.value)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value)))],4)):i.value?(t.openBlock(),t.createElementBlock("div",{key:1,style:t.normalizeStyle(u.value)},[t.createElementVNode("img",{src:a.value,style:t.normalizeStyle(s.value)},null,12,id)],4)):(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(a.value),style:t.normalizeStyle(l.value)},null,6))}}),sd=t.defineComponent({inheritAttrs:!1,__name:"bcButton",props:{type:{},size:{},disabled:{type:Boolean},plain:{type:Boolean},autofocus:{type:Boolean},round:{type:Boolean},circle:{type:Boolean},loadingIcon:{},shortcut:{}},setup(e){const n=e,o=t.useAttrs(),a=t.ref(o.loading);let r=!1;t.watch(()=>o.loading,l=>{setTimeout(()=>{a.value=l})});async function i(){var l;if(!r){r=!0,(n.loadingIcon=="ele-Loading"||!n.loadingIcon)&&(a.value=!0);try{typeof(o==null?void 0:o.onClick)=="function"&&await((l=o==null?void 0:o.onClick)==null?void 0:l.call(o))}finally{r=!1,a.value=!1}}}return(l,u)=>{const s=t.resolveComponent("bc-icon"),c=t.resolveComponent("el-button");return t.openBlock(),t.createBlock(c,t.mergeProps({loading:a.value,class:["bc-button",[t.unref(o).iconPosition==="right"?"icon-right":""]]},n,{onClick:i,style:{"--text-color":t.unref(o).textColor}}),{default:t.withCtx(()=>[t.unref(o).iconPosition==="right"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",null,t.toDisplayString(t.unref(o).name),1),t.unref(o).btnIcon?(t.openBlock(),t.createBlock(s,{key:0,class:"ml-3",name:t.unref(o).btnIcon},null,8,["name"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(o).btnIcon?(t.openBlock(),t.createBlock(s,{key:0,name:t.unref(o).btnIcon},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(t.unref(o).name),1)],64)),t.renderSlot(l.$slots,"default")]),_:3},16,["loading","class","style"])}}}),an=P.mitt();function An(){const e=t.getCurrentScope(),n=new Map;let o={};function a(s,c){n.set(s,c),an.on(s,c),o[s]&&(o[s].forEach(d=>c(d)),delete o[s])}function r(s,c){const d=(...f)=>{l(s,d),c(...f)};a(s,d)}function i(s,c){o[s]||(o[s]=[]),o[s].push(c),an.emit(s,c)}function l(s,c){n.delete(s),an.off(s,c)}function u(){for(const[s,c]of n.entries())l(s,c);o={}}return e&&t.onScopeDispose(u),{on:a,once:r,emit:i,off:l,clear:u}}async function cd(e,n){const o=new FormData;return y._.isArray(e)?await Promise.all(e.map(a=>(o.append(n,a),!0))):await o.append(n,e),o}const ud=[async function(e){let n={...e};if(e.headers["Content-Type"]==="application/x-www-form-urlencoded"&&(n.data=P.qs.stringify(n.data)),e.headers["Content-Type"]==="multipart/form-data"){const[o,...a]=Object.keys(n.data),r=n.data[o],i=await cd(r,o);a==null||a.forEach(l=>{i.append(l,typeof n.data[l]=="object"?JSON.stringify(n.data[l]):n.data[l])}),n.data=i}return n},function(e){throw e}];function dd(){const e=P.Rn();return{ip:"",ipv6:"",loc_ip:"",mac:"",browser:e.browser,device:e.device,os:e.system+" "+e.systemVersion,version:e.browserVersion}}const ha=t.ref(2);function pa(e,n){const o=n.map(r=>vr(r)?r:["add","sub"].includes(e)?0:1);let a=Qn.bignumber(o[0]);for(let r=1;r<o.length;r++){const i=o[r];a=a[e](i)}return Number.parseFloat(String(a)).toFixed(ha.value??0)}function $o(e,n){const o=n.map(r=>vr(r)?r:["add","sub"].includes(e)?0:1);let a=Qn.bignumber(o[0]);for(let r=1;r<o.length;r++){const i=o[r];a=a[e](i)}return a.toNumber()}function cn(e,n=-1,o=14){const a=n==-1?ha.value:n;let r=e||0;typeof r!="number"&&(r=Qn.evaluate(r)),r=Qn.format(r,{precision:o});let i=r?Number(r):0,l=JSON.stringify(i);const u=l.indexOf(".");if(u>=0){l=l.substring(u+1);const s=l.length;if(s>8){const c=+("0."+new Array(s-1).join("0")+"1");i+=c}if(s>n&&l.slice(n,n+1)==="5"){const d=+("0."+new Array(n+1).join("0")+"1");i+=d}}return Number.parseFloat(String(r)).toFixed(a)}function fd(...e){return pa("add",e)}function md(...e){return pa("sub",e)}function hd(...e){return pa("times",e)}function pd(...e){return pa("div",e)}function _d(e){if(!e.length)return 0;if(e.length===1)return e[0];if(!Yn(e).length)return 0;const o=Qn.sum(...Yn(e));return cn(o)}function gd(e){const n=Yn(e);if(!n.length)return 0;const o=Qn.mean(...n);return cn(o)}function vd(e){const n=Yn(e);return n.length?Math.max(...n):0}function yd(e){const n=Yn(e);return n.length?Math.min(...n):0}function Yn(e){return e.filter(n=>Tl(n))}function Tl(e){return typeof e!="number"?!1:![NaN,1/0,-1/0].includes(e)}function vr(e){return!isNaN(e)&&!isNaN(parseFloat(e))}const Rl={add:function(...e){return $o("add",e)},sub:function(...e){return $o("sub",e)},times:function(...e){return $o("times",e)},div:function(...e){return $o("div",e)}};function Al(e){let n=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),o=new Array("","拾","佰","仟"),a=new Array("","万","亿","兆"),r=new Array("角","分","毫","厘"),i="整",l="元",u=1e15,s,c,d="",f;if(e===""||e===null||(typeof e=="string"&&(e=parseFloat(e)),e>=u))return"";if(e==0)return d=n[0]+l+i,d;if(e=e.toString(),e.indexOf(".")==-1?(s=e,c=""):(f=e.split("."),s=f[0],c=f[1].substr(0,4)),parseInt(s,10)>0){let m=0,h=s.length;for(let _=0;_<h;_++){let g=s.substr(_,1),p=h-_-1,v=p/4,w=p%4;g=="0"?m++:(m>0&&(d+=n[0]),m=0,d+=n[parseInt(g)]+o[w]),w==0&&m<4&&(d+=a[v])}d+=l}if(c!=""){let m=c.length;for(let h=0;h<m;h++){let _=c.substr(h,1);_!="0"&&(d+=n[Number(_)]+r[h])}}return d==""?d+=n[0]+l+i:c==""&&(d+=i),d}function bd(e){let n=new Array("零","一","二","三","四","五","六","七","八","九","十"),o=new Array("","十","百","仟","萬","億","点",""),a=(""+e).replace(/(^0*)/g,"").split("."),r=0,i="";for(let l=a[0].length-1;l>=0;l--){switch(r){case 0:i=o[7]+i;break;case 4:new RegExp("0{4}//d{"+(a[0].length-l-1)+"}$").test(a[0])||(i=o[4]+i);break;case 8:i=o[5]+i,o[7]=o[5],r=0;break}r%4==2&&a[0].charAt(l+2)!=0&&a[0].charAt(l+1)==0&&(i=n[0]+i),a[0].charAt(l)!=0&&(i=n[a[0].charAt(l)]+o[r%4]+i),r++}if(a.length>1){i+=o[6];for(let l=0;l<a[1].length;l++)i+=n[a[1].charAt(l)]}return i=="一十"&&(i="十"),i.match(/^一/)&&i.length==3&&(i=i.replace("一","")),i}function ke(e){const n=new URLSearchParams(e||location.search.substring(1));return[...n.keys()].reduce((o,a)=>{if(a=="")return o;let r=n.get(a);return/^\d+$/.test(r)&&r.length<17&&(r=Number(r)),(r=="true"||r=="false")&&(r=r=="true"),o[a]=r,o},{})}function Ll(e,n={}){if(y._.isEmpty(n))return e;const[o,a=""]=e.split("?"),r=new URLSearchParams(a);return Object.keys(n).forEach(i=>{r.set(i,n[i])}),`${o}?${r.toString()}`}function wd(e,n){var o,a;if(((o=ke())==null?void 0:o.isIframe)==!0)(a=window.top)==null||a.postMessage({type:"iframe",url:e},"*");else{const r=n||ga.value;r==null||r.push(e)}}function kd(e,n){const o=n||ga.value;e.data.type==="iframe"&&(o==null||o.push(e.data.url))}let Xe=t.ref(),On=t.ref(),_a=t.ref(),ga=t.ref();const Ml="configkey",va=e=>{if(!e)return e;if(On.value==!0)return y._.cloneDeep(e);try{return ot.cryptoJsExports.AES.encrypt(JSON.stringify(e),Ml).toString()}catch{return e}},Ln=e=>{if(!e||On.value==!0)return e;try{const n=ot.cryptoJsExports.AES.decrypt(e,Ml);return JSON.parse(n.toString(ot.cryptoJsExports.enc.Utf8))}catch{return e}},Cd={encrypt:va,decrypt:Ln},$n={setKey(e){return`${Xe.value}:${e}`},set(e,n){window.localStorage.setItem($n.setKey(e),JSON.stringify(n))},get(e){let n=window.localStorage.getItem($n.setKey(e));return n?JSON.parse(n):null},remove(e){window.localStorage.removeItem($n.setKey(e))},clear(){window.localStorage.clear()}},ut={set(e,n){if(e==="token")return P.api.set(e,n);window.sessionStorage.setItem($n.setKey(e),JSON.stringify(n))},get(e){if(e==="token")return P.api.get(e);let n=window.sessionStorage.getItem($n.setKey(e));return n?JSON.parse(n):null},remove(e){if(e==="token")return P.api.remove(e);window.sessionStorage.removeItem($n.setKey(e))},clear(){P.api.remove("token"),window.sessionStorage.clear()}};class Ed{constructor(){Ea(this,"store");this.store=P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:"systemConfig_00000_001",storeName:"systemConfig",version:1,description:"系统信息"})}setKey(n){return`${Xe.value}:${n}`}set(n,o){return this.store.setItem(this.setKey(n),va(o))}get(n){return this.store.getItem(this.setKey(n)).then(o=>Ln(o))}async getToken(){return this.getUserByProject().then(n=>n==null?void 0:n.access_token)}getUserByProject(n){var r;const o=n||((r=ke())==null?void 0:r.project),a=o?`hs-${o}-web`:Xe.value;return this.store.getItem(`${a}:userInfo`).then(i=>Ln(i))}remove(n){return this.store.removeItem(this.setKey(n))}clear(){return this.store.clear()}drop(n){return this.store.dropInstance({name:n})}}const ce=new Ed;class Sd{constructor(n){Ea(this,"store");this.store=P.localforage.createInstance(Object.assign({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:"customeConfig_00000_001",storeName:"customeConfig",version:1,description:"自定义配置系统信息"},n||{}))}setKey(n){return`${Xe.value}:${n}`}set(n,o){return this.store.setItem(this.setKey(n),o)}get(n){return this.store.getItem(this.setKey(n))}remove(n){return this.store.removeItem(this.setKey(n))}clear(){return this.store.clear()}}function Te({mid:e,id:n,uid:o},a=""){return ce.get("userInfo").then(async r=>{const i=P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:`${o||r.id}_${e}`,version:1,description:"配置系统"}),l=a?`${Xe.value}:${a}`:`${Xe.value}:${n}`,u=await i.getItem(l);return u?Ln(u):null})}function Ae({mid:e,id:n,uid:o},a,r=""){return ce.get("userInfo").then(i=>{const l=`${o||i.id}_${e}`,u=P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:l,version:1,description:"配置系统"}),s=r?`${Xe.value}:${r}`:`${Xe.value}:${n}`;return u.setItem(s,va(a))})}function Ol(e,n){return ce.get("userInfo").then(o=>P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:`${n||o.id}_${e}`,version:1,description:"配置系统"}).clear())}function yr({table_id:e,uid:n}){return ce.get("userInfo").then(async o=>{const a=P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:`${n||o.id}`,version:1,description:"配置系统列宽属性"}),r=`${Xe.value}:${e}`,i=await a.getItem(r);return i?Ln(i):null})}function br({table_id:e,uid:n},o){return ce.get("userInfo").then(a=>{const r=`${n||a.id}`,i=P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:r,version:1,description:"配置系统列宽属性"}),l=`${Xe.value}:${e}`;return i.setItem(l,va(o))})}function xd(e=["systemConfig_00000_001","emscripten_filesystem"]){return indexedDB.databases().then(function(n){return Promise.all(n.filter(o=>!e.includes(o.name)).map(o=>ce.drop(o.name))).then(()=>{A.ElMessage.success("清除缓存成功!")})})}async function Dd(e){const n=await ce.get("userInfo"),{project_code:o,...a}=e||{},r=o||n.project_code,i=await le({url:`/${r}-web/pri/params/get_param_list`,method:"get",params:a});return await ql(i.data),i.data}async function Id(e){const n=await ce.get("userInfo"),{project_code:o,...a}=e||{},r=o||n.project_code,i=await le({url:`/${r}-web/pri/params_self/get_param_list`,method:"get",params:a});return i.code!==1?{}:i.data.reduce((l,u)=>(l[u.param_code]=u,l),{})}async function ql(e){const n=await ce.get("system_params")||{},o=e.find(r=>r.param_code==="sys_input_8");o&&(ha.value=Number(o.param_value),n.decimal_digits=Number(o.param_value));const a=e.find(r=>r.param_code==="sys_input_10");a&&(n._sys_pageSize=Number(a.param_value),n._sys_pageSize_s=JSON.parse(a.json_data||"[]").map(r=>Number(r.value))),await ce.set("system_params",n)}function oo(e,n){const o=e||ke().mid;return o?ce.get("userInfo").then(async a=>{const i=await P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:`${n||a.id}_${o}`,version:1,description:"配置系统"}).getItem(`${Xe.value}:auth`);return i?Ln(i).dict_functions.map(u=>{const s=JSON.parse(u.json_data||"[]").filter(c=>["true",!0].includes(c.show)).map(c=>({...c,name:c.dict_child_name,code:c.dict_child_code})).sort((c,d)=>c.sort-d.sort);return{code:u.code,json_data:s}}).reduce((u,s)=>(u[s.code]=s.json_data,u),{}):{}}):(console.error("未获取到mid,请检查url中是否存在mid参数"),Promise.resolve({}))}function Bd(e,n){const{mid:o,project:a}=ke(),r=e||o;return r?ce.get("userInfo").then(async i=>{const{id:l,project_code:u}=i,s=`${n||l}`;return le({url:`/${a||u||"qwp"}-web/pri/v2/perminssion/get_menu_prminssion`,method:"get",params:{menu_id:r,user_id:s}})}).then(i=>{if(i.code!==1)return{};const{dict_functions:l}=i.data;return l?JSON.parse(l).map(u=>{const s=JSON.parse(u.json_data||"[]").filter(c=>["true",!0].includes(c.show)).map(c=>({...c,name:c.dict_child_name,code:c.dict_child_code})).sort((c,d)=>c.sort-d.sort);return{code:u.code,json_data:s}}).reduce((u,s)=>(u[s.code]=s.json_data,u),{}):{}}):(console.error("未获取到mid,请检查url中是否存在mid参数"),Promise.resolve({}))}function zl(e,n){const o=e||ke().mid;return o?ce.get("userInfo").then(async a=>{const i=await P.localforage.createInstance({driver:[P.localforage.INDEXEDDB,P.localforage.WEBSQL,P.localforage.LOCALSTORAGE],name:`${n||a.id}_${o}`,version:1,description:"配置系统"}).getItem(`${Xe.value}:auth`);return i?Ln(i).field_functions:{}}):(console.error("未获取到mid,请检查url中是否存在mid参数"),Promise.resolve({}))}const Nd=dd(),$d=[async e=>{var o,a,r,i;const n=await ce.getToken();return n&&!((o=e==null?void 0:e.headers)!=null&&o.Authorization)&&y._.set(e,"headers.Authorization",`Bearer ${n}`),e.method!=="get"&&y._.set(e,"data.other_log_info",{page_name:(a=_a.value)==null?void 0:a.value.meta.title,action_name:(i=(r=e==null?void 0:e.data)==null?void 0:r.other_log_info)==null?void 0:i.title,...Nd}),e},e=>{throw e}],Zr=e=>{if(e&&Object.prototype.toString.call(e)==="[object Object]"){const n=Object.assign({},e);for(let o in n)n[o]==="undefined"||n[o]==="null"||n[o]===null||n[o]===void 0?delete n[o]:typeof n[o]=="string"&&(n[o]=n[o].trim());return n}return e},Vd=[function(e){var n,o;return e&&e.params&&(e.params=Zr(e.params),y._.get(e,"params.menu_id")||y._.set(e,"params.menu_id",(n=ke())==null?void 0:n.mid)),e&&e.data&&(e.data=Zr(e.data),y._.get(e,"data.menu_id")||y._.set(e,"data.menu_id",(o=ke())==null?void 0:o.mid)),e},function(e){throw e}],Td=[Vd,ud,$d];let Mt=!1;const Rd=[async function(e){const{data:n}=e;if(n instanceof Blob||typeof n=="object"&&!Reflect.has(n,"code"))return n;switch(n.code){case 1:return n;case 401:case 4001:A.ElMessage.error("你已被登出,请重新登录"),Mt||(Mt=!0,await ce.remove("userInfo"),window.location.href="/",setTimeout(()=>{Mt=!1},1e3));break;case 2e3:Mt||(Mt=!0,On.value?A.ElMessageBox.alert(n.msg,"提示",{confirmButtonText:"确定",callback:async()=>{Mt=!1,await ce.remove("userInfo"),window.location.href="/"}}):(A.ElMessage.error(n.msg),await ce.remove("userInfo"),window.location.href="/"));break;default:return n.msg&&!Mt&&(Mt=!0,A.ElMessage.error(n.msg),setTimeout(()=>{Mt=!1},1e3)),Promise.reject(n)}},function(e){return e.message.indexOf("timeout")!=-1?A.ElMessage.warning("网络超时"):e.message=="Network Error"?A.ElMessage.warning("网络连接错误"):e.message=="操作太频繁,请稍后再试"?A.ElMessage.warning("操作太频繁,请稍后再试"):e.response.data?A.ElMessage.warning(e.response.statusText):A.ElMessage.warning("接口路径找不到"),Promise.reject(e)}],Ad=[Rd],So=P.axios.create({timeout:6e4,paramsSerializer:{serialize(e){return P.qs.stringify(e,{allowDots:!0})}}});Td.forEach(e=>{So.interceptors.request.use(...e)});Ad.forEach(e=>{So.interceptors.response.use(...e)});const Ld=So.interceptors,le=So.request,Md=(e,n={},o="get",a={})=>ce.get("userInfo").then(r=>{const i={url:`/${r.project_code}-web${e}`,method:o,...a},{title:l="",...u}=n;return o=="get"?i.params=Object.assign({other_log_info:{title:l}},u):i.data=Object.assign({other_log_info:{title:l}},u),So.request(i)}),Jr={success(e){return A.ElMessage({message:e,type:"success"})},warning(e){return A.ElMessage({message:e,type:"warning"})},info(e){return A.ElMessage({message:e,type:"info"})},error(e){return A.ElMessage({message:e,type:"error"})}},Me=new Proxy(A.ElMessage,{get(e,n){return n in Jr?Jr[n]:e[n]}}),Od={install(e){e.config.globalProperties.$message=Me}},Gr={alert(e,n,o){const a=Se.value;return Se.value="",A.ElMessageBox.alert(e,n,{...o,callback:r=>{typeof(o==null?void 0:o.callback)=="function"&&(Se.value=a,o.callback(r,r))}})},confirm(e,n,o){const a=Se.value;return Se.value="",A.ElMessageBox.confirm(e,n,o).finally(()=>{Se.value=a})},prompt(e,n,o){const a=Se.value;return Se.value="",A.ElMessageBox.prompt(e,n,o).finally(()=>{Se.value=a})}},ya=new Proxy(A.ElMessageBox,{get(e,n){return n in Gr?Gr[n]:e[n]}}),qd={install(e){e.config.globalProperties.$MessageBox=ya}},Qr={success(e){return A.ElNotification({...e,type:"success"})},warning(e){return A.ElNotification({...e,type:"warning"})},info(e){return A.ElNotification({...e,type:"info"})},error(e){return A.ElNotification({...e,type:"error"})}},wr=new Proxy(A.ElNotification,{get(e,n){return n in Qr?Qr[n]:e[n]}}),zd={install(e){e.config.globalProperties.$notification=wr}},Pd={class:"popup-wrapper"},Fd={class:"content"},jd={key:0},Ud=t.defineComponent({__name:"showPopup",props:{closeLoading:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!0},confirmButtonText:{type:String,default:"确定"},cancelButtonText:{type:String,default:"取消"}},emits:["success"],setup(e){const n=t.ref(0),o=t.computed({get:()=>n.value>0,set:r=>{n.value+=r,n.value=Math.max(0,n.value)}});function a(r){o.value=r?1:-1}return t.provide("popupApi",{setLoading:a}),(r,i)=>{const l=t.resolveComponent("el-config-provider"),u=t.resolveComponent("hs-button"),s=t.resolveDirective("loading");return t.withDirectives((t.openBlock(),t.createElementBlock("div",Pd,[t.createElementVNode("div",Fd,[t.createVNode(l,{locale:t.unref(A.zhCn)},{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default",{},void 0,!0)]),_:3},8,["locale"])]),e.showFooter?(t.openBlock(),t.createElementBlock("footer",jd,[t.createVNode(u,{size:"default",onClick:i[0]||(i[0]=c=>r.$emit("success","cancel"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.cancelButtonText),1)]),_:1}),t.createVNode(u,{type:"primary",size:"default",onClick:i[1]||(i[1]=c=>r.$emit("success","confirm"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.confirmButtonText),1)]),_:1})])):t.createCommentVNode("",!0)])),[[s,!e.closeLoading&&o.value]])}}}),Hd=P._export_sfc(Ud,[["__scopeId","data-v-05f87efd"]]),Xn=t.ref(1);function Pl(e="code",n=!0){const o=t.ref();let a=[],r={};const i=P.useDocumentVisibility$1(),l=t.watch(Xn,(f,m)=>{f>m?c(m):s(f)}),u=t.watch(i,f=>{f==="hidden"&&(a=[])});function s(f){c();const m=P.onKeyStroke(_=>{a.push(_[e]),d(_)},{dedupe:!0,eventName:"keydown"}),h=P.onKeyStroke(_=>{a=a.filter(g=>g!==_[e])},{dedupe:!0,eventName:"keyup"});y._.set(r,f??Xn.value,{onKeydown:m,onKeyup:h})}function c(f=-1){var _;if(a=[],f===-1){(_=Object.values(r))==null||_.forEach(g=>{var p,v;typeof g.onKeydown=="function"&&((p=g==null?void 0:g.onKeydown)==null||p.call(g)),typeof g.onKeyup=="function"&&((v=g==null?void 0:g.onKeyup)==null||v.call(g))}),r={};return}const{onKeydown:m,onKeyup:h}=y._.get(r,f,{});typeof m=="function"&&(m==null||m()),typeof h=="function"&&(h==null||h()),delete r[f],l(),u()}function d(f){var _,g,p,v,w,b;const m=(_=o.value)==null?void 0:_.querySelectorAll("[shortcut]");if(!m)return;let h;for(let C in m)if((((g=m[C])==null?void 0:g.getAttribute)&&((p=m[C])==null?void 0:p.getAttribute("shortcut"))||"")===String(a)){h=m[C];break}if(!(!h||h!=null&&h.disabled||h!=null&&h.readOnly||(v=h==null?void 0:h.className)!=null&&v.includes("disabled"))){if(f.preventDefault(),(w=h==null?void 0:h.className)!=null&&w.includes("el-select")){if(h.querySelector(".is-disabled"))return;(b=h.querySelector("input"))==null||b.click();return}if((h==null?void 0:h.tagName)==="TEXTAREA"){typeof(h==null?void 0:h.focus)=="function"&&(h==null||h.focus()),typeof(h==null?void 0:h.click)=="function"&&(h==null||h.click());return}typeof(h==null?void 0:h.click)=="function"&&(h==null||h.click())}}return t.onMounted(()=>{n&&s()}),t.onBeforeUnmount(()=>{c()}),t.onDeactivated(()=>{a=[]}),{bcBoxRef:o,start:s,end:c}}let or,Fl;function fn(e,n,o){var h;const a=Se.value;Se.value="";let r,i=()=>{};const l={...o.slots,title:((h=o.slots)==null?void 0:h.title)||(()=>o.title),default:()=>t.h(Hd,{onSuccess:f,showFooter:o.showFooter,closeLoading:o.closeLoading,confirmButtonText:o.confirmButtonText,cancelButtonText:o.cancelButtonText},{default:()=>t.h(e,{...n,onVnodeMounted:d,onReady:m,close:c})})},u=t.h(Vl.VxeModal,Object.assign({},Fl,{...y._.omit(o,["success"]),className:"custom-popup ".concat((o==null?void 0:o.className)||""),modelValue:!0,onHide(_){r(),typeof(o==null?void 0:o.onHide)=="function"&&o.onHide(_)},slots:l}));or&&(u.appContext=or);function s(){Xn.value++;const _=document.createDocumentFragment();return t.render(u,_),document.body.appendChild(_),setTimeout(()=>{if(!y._.isEmpty(o==null?void 0:o.position)){const g=o.position;if(/%/.test(g==null?void 0:g.top)||/%/.test(g==null?void 0:g.left)){/%/.test(g==null?void 0:g.top)&&(u.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${g.top}`),/%/.test(g==null?void 0:g.left)&&(u.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${g.left}`);return}(g==null?void 0:g.top)>-1&&(u.el.nextSibling.querySelector(".vxe-modal--box").style.top=`${g.top}px`),(g==null?void 0:g.left)>-1&&(u.el.nextSibling.querySelector(".vxe-modal--box").style.left=`${g.left}px`)}},100),()=>{Xn.value--,Se.value=a,t.render(null,_)}}r=s(),t.watch(()=>{var _;return(_=_a.value)==null?void 0:_.value.path},()=>{r()});async function c(_){r(),typeof o.success=="function"&&o.success({type:_,data:_})}function d(_){var g;i=(g=_.component.exposed)==null?void 0:g.getData}async function f(_){const g=await i();typeof o.success=="function"&&o.success({type:_,data:g,close:r})}function m(_){typeof o.onReady=="function"&&o.onReady(_)}return r}const Wd={install(e,n){or=e._context,Fl=n}};function jl({uniqueId:e,projectCode:n,templateName:o,tableConfig:a,tableData:r}){const i=[];if(a.filter(c=>mt({...c.data,uniqueId:e})).map(c=>c.data).filter(c=>c.fieldExport==!0).forEach(c=>{$t.includes(c.type)||i.push(c)}),y._.isEmpty(i))return A.ElMessage.warning("未配置导出字段"),Promise.reject();const l=s({templateArr:i,tableData:r});return u({template_name:o,...l},n);async function u(c,d){return le({url:`/${d}-web/pub/excel/export_model_assign`,responseType:"blob",method:"post",data:c,timeout:1e3*60*20}).then(f=>{const m=new Blob([f],{type:"application/vnd.ms-excel"}),h=c.template_name?c.template_name:new Date().getTime().toString();let _=document.createElement("a");return _.href=URL.createObjectURL(m),_.download=h+".xlsx",document.body.appendChild(_),_.click(),document.body.removeChild(_),f})}function s({templateArr:c,tableData:d}){const f={序号:"A"},m=[],h=[],_=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","AA","AB","AC","AD","AE","AF","AG","AH","AI","AJ","AK","AL","AM","AN","AO","AP","AQ","AR","AS","AT","AU","AV","AW","AX","AY","AZ","BA","BB","BC","BD","BE","BF","BG","BH","BI","BJ","BK","BL","BM","BN","BO","BP","BQ","BR","BS","BT","BU","BV","BW","BX","BY","BZ"];let g="";c.forEach((v,w)=>{f[v.title]=_[w+1],h.push(v.field)}),d.forEach((v,w)=>{let b={A:w+1};h.forEach((C,I)=>{b[_[I+1]]=p(v[C])}),m.push(b)});function p(v){return v=="1"?"开启":v=="0"?"关闭":v}return{titles_json_data:JSON.stringify(f),infoData_json_data:JSON.stringify(m),isNumerical:g}}}function Ul(e){return new Promise((n,o)=>{const a={},r=e.columnConfig.filter(l=>mt({...l.data,uniqueId:e.uniqueId})).map(l=>l.data).filter(l=>l.fieldExport==!0).map(l=>(Object.keys(l).forEach(u=>{const s=u;typeof l[s]=="function"&&(a[l.field]||(a[l.field]=[]),a[l.field].push(l[s]))}),{fieldName:l.field,title:l.title}));if(y._.isEmpty(r))return A.ElMessage.warning("未配置导出字段"),o();const i=e.data.map(l=>(Object.keys(a).forEach(u=>{var s;(s=a[u])==null||s.forEach(c=>{l[`_old_${u}`]=l[`_old_${u}`]||l[u],l[u]=l[`_old_${u}`],l[u]=c({row:l,column:{field:u}})||""})}),l));return le({url:`/${e.projectCode}-web/pri/easyexcel/export_model_assign`,responseType:"blob",method:"post",data:{titles_json_data:r,data_json_data:i,template_name:e.template_name},timeout:1e3*60*20}).then(l=>{n();const u=new Blob([l],{type:"application/vnd.ms-excel"});kr(u,e.template_name+".xlsx")})})}function Hl(e,n="/pri/easyexcel/export_model_all"){return new Promise((o,a)=>{const r=e.columnConfig.filter(f=>mt({...f.data,uniqueId:e.uniqueId})).map(f=>f.data).filter(f=>f.fieldExport==!0).map(f=>{var h;let m=f.field;if(typeof f.formatter=="function"){const _=(h=f.formatter_2)==null?void 0:h.match(new RegExp("(?<=row\\.)(\\w+)","g"));m=_?String(_):f.field}return{fieldName:m,title:f.title}});if(y._.isEmpty(r))return A.ElMessage.warning("未配置导出字段"),a();let u=(Is(e.uniqueId)||{})[`${eo}${e.tableId}`]||{};for(let f in e.search_json_data)(e.search_json_data[f]||e.search_json_data[f]===0)&&(u[f]=e.search_json_data[f]);const s={titles_json_data:r,search_json_data:u,template_name:e.template_name,export_biz_type:e.export_biz_type},c=Object.keys(u).filter(f=>f.startsWith("_")).map(f=>{const[m,h,_]=f.split("|");return{type:m.slice(1),key:h,code:_,value:u[f]}});c.length>0&&(s.qry_json_data=JSON.stringify(c));const d=e.projectCode.replace("-web","");return le({url:`/${d}-web${n}`,responseType:"blob",method:"post",data:s,timeout:1e3*60*20}).then(f=>{o();const m=new Blob([f],{type:"application/vnd.ms-excel"});kr(m,e.template_name+".xlsx")})})}function Wl(e){const n=document.createElement("a");n.href=e.url,n.download=e.name,n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}function kr(e,n){let o=document.createElement("a");o.href=window.URL.createObjectURL(e),o.download=/\./.test(n)?n:n+".xlsx",document.body.appendChild(o),o.click(),document.body.removeChild(o)}function Kl(e){const[n="",o=""]=e.split(","),a=n.match(/:(.*?);/)[1],r=atob(o);let i=r.length,l=new Uint8Array(i);for(;i--;)l[i]=r.charCodeAt(i);return new Blob([l],{type:a})}let Zl;const Kd=60*1e3;let Yr=!1,ar=!1,Wo;const Zd=/<script.*?src=["'](.*?)["'].*?><\/script>/g,Xr=/index-(.*?)\.js/g,Jl=async()=>fetch("/index.html?timestep="+Date.now()).then(e=>e.text()).then(e=>{var o,a;const n=(o=e.match(Zd))==null?void 0:o.filter(r=>Xr.test(r));return n&&n.length>0?y._.get(((a=n[0])==null?void 0:a.match(Xr))||[],"0",""):""}),Gl=()=>Jl().then(e=>{e&&e!=Zl&&!Yr&&(Yr=!0,Ql(),A.ElMessageBox.confirm("系统版本更新了,是否立即刷新页面?","提示",{confirmButtonText:"立即刷新",cancelButtonText:"稍后刷新",type:"warning",closeOnClickModal:!1}).then(()=>{location.reload()}))}),rr=async()=>{Wo=window.setTimeout(async()=>{ar||Gl(),rr()},Kd)};function Ql(){Wo&&(clearTimeout(Wo),Wo=0)}async function Jd(){return Jl().then(e=>{Zl=e,rr(),document.addEventListener("visibilitychange",()=>{ar=document.hidden,ar?Ql():(Gl(),rr())})})}function Gd(e,n=!0){const o=[];function a(r,i=[]){return r.reduce((l,u)=>(l.push(u),u!=null&&u.children&&u.children.length&&l.push(...a(u.children)),l),i)}return a(n?y._.cloneDeep(e):e,o),o}function Qd(e){return e.reduce((n,o)=>{n[Vt]||(n[Vt]=[]);const a=n[Vt].concat(o[Vt]||[]);return Object.assign({},n,o,{[Vt]:[...new Set(a)]})},{})}function Ko(e){const n={},o=a=>Object.values(a).reduce((r,i)=>(delete i[Vt],r=Object.assign(r,i),r),{});return e.forEach(a=>{const r=a.getData();Object.assign(n,o(r))}),y._.cloneDeep({...n,[Vt]:Object.keys(n)})}function Yd(e){if(Array.isArray(e)){if(e.length===0||e.every(n=>typeof n=="string"||typeof n=="number"))return String(e);if(e.every(n=>typeof n=="object"&&n!==null))return JSON.stringify(e)}return typeof e=="object"&&e!==null?JSON.stringify(e):e}const Xd=(e,n,o)=>{if(!n)return e;const a=n.toLowerCase();return e.filter(r=>o(r).some(l=>l&&l.toLowerCase().includes(a)))};let Yl="127.0.0.1",Xl=54321,Ge;function ef(e,n,o="ws"){return Ge||(Ge=new ws(e,n,{automaticOpen:!1,reconnectDecay:1.5,output:"output",protocol:o}),Ge.onconnecting=function(a){Ge.log("正与服务器建立连接...",a)},Ge.onopen=function(a){Ge.log("与服务器连接成功。",a)},Ge.onclose=function(a){Ge.log("与打印服务器的连接已关闭",a)},Ge.onmessage=function(a){Ge.log('收到消息!"'+a.data+'"',a);let r=JSON&&JSON.parse(a.data);r.result===1||A.ElMessage.error("Print failed: "+r.message)},Ge.onerror=function(a){typeof a.detail=="object"?(typeof a.detail.message=="string"&&Ge.log("遇到一个错误: "+a.detail.message,a),typeof a.detail.data=="string"&&Ge.log("遇到一个错误: "+a.detail.message,a)):typeof a.data=="string"?Ge.log("遇到一个错误: "+a.data,a):Ge.log("遇到一个错误",a)},Ge)}const Cr=()=>ef(Yl,Xl);function es(){const e=Cr();return e.open(),new Promise((n,o)=>{e.addEventListener("open",n),e.addEventListener("close",o)})}function ts(e){return es().then(()=>{const n=Cr(),o=function(r,i){n.protocol==="ws"&&(n.setHost(Yl),n.setPort(Xl)),n.protocol,n.open()},a=function(r){n.log("SENT: <br/>"+r),n.log("正在发送消息..."),n.send(r)};n.state()!==n.OPEN?(n.log("连接已断开,正在重新连接。"),n.onopen=function(r){n.log("与服务器连接成功。",r),a(e)},o()):a(e)}).catch(()=>{A.ElMessage.warning("请先启动康虎云打印服务器!")})}async function ns(e,n){var h,_,g,p;if(!e.config_info)return A.ElMessage.warning("请先添加模板!"),Promise.reject();const o=JSON.parse(e.config_info)||{};let a=[],r={},i=[],l=[],u=[],s=[];(h=o.formData)==null||h.map(v=>{a.push({type:"str",size:255,name:v.name,required:!1}),v.name==="销售日期"||v.name==="移库日期"||v.name==="申请单单据日期"||v.name==="交易日期"?r[v.name]=n[v.value]?P.hooks$1(n[v.value]).format("YYYY-MM-DD HH:mm"):"":y._.endsWith(v.name,"日期")||v.name==="有效期"?r[v.name]=n[v.value]?P.hooks$1(n[v.value]).format("YYYY-MM-DD"):"":y._.endsWith(v.name,"金额")?r[v.name]=cn(n[v.value]||""):r[v.name]=n[v.value]||""});const c=await ce.get("userInfo");r.所属公司=c.company_name;const d=((_=n==null?void 0:n.detail)==null?void 0:_.reduce((v,w)=>v+=w.commodity_num||0,0))||0;r.本单合计数量=d,["repayment_sum","arrears_sum","receipt_sum","refunds_sum","payment_sum","amount_sum","apply_sum","payment_app_sum","return_sum_total","return_sum","discount_after_sum","delivery_sum","commodity_sum","contract_sum","sum_of_reject","move_sum","real_amount"].forEach(v=>{if(!n[v])return;let w=Al(n[v]);r.本单合计金额大写=w,r.本单合计金额=n.commodity_sum||n.delivery_sum}),i=((g=o.tableData)==null?void 0:g.map(v=>({type:v.type,size:v.type==="Str"?255:0,name:v.name,required:!1})))||[],l=((p=n==null?void 0:n.detail)==null?void 0:p.map(v=>{var b;let w={};return(b=o.tableData)==null||b.forEach(C=>{y._.endsWith(C.name,"日期")||y._.endsWith(C.name,"时间")||C.name==="有效期至"?w[C.name]=v[C.value]?P.hooks$1(v[C.value]).format("YYYY-MM-DD"):"":y._.endsWith(C.name,"金额")?w[C.name]=cn(v[C.value]||""):w[C.name]=v[C.value]||""}),w}))||[],n.other_information&&(u=o.otherData.map(v=>({type:v.type,size:v.type==="Str"?255:0,name:v.name,required:!1})),s=n.other_information.map(v=>{let w={};return o.otherData.forEach(b=>{w[b.name]=v[b.value]||""}),w}));const m={template:`base64:${e.template_base64}`,ver:4,Copies:e.copies,Duplex:e.duplex||0,Printer:e.printer?JSON.parse(e.printer).default:"",Design:e.design||0,PageTop:e.page_top||10,PageLeft:e.page_left||10,Preview:e.preview,Tables:[{Name:"表单信息",Cols:a,Data:[r]},{Name:"销售配车单",Cols:i,Data:l.length?l:[{}]}]};return u.length&&m.Tables.push({Name:"其他信息",Cols:u,Data:s.length?s:[{}]}),m}function tf(e){return new Promise((n,o)=>{try{let a=document.createElement("canvas"),r=a.getContext("2d"),i=new Image;i.setAttribute("crossOrigin","anonymous"),i.src=e,i.onload=function(){a.height=i.height,a.width=i.width,r.drawImage(i,0,0);let l=a.toDataURL("image/jpeg",1);a=null,n("base64/jpeg:"+l.split(",")[1])}}catch{o("")}})}async function nf(e,n){const o=await ce.get("userInfo"),a=await le({url:`/${o.project_code}-web/pri/print_template/get_template_by_code`,method:"get",params:{template_code:e}}).then(i=>y._.get(i,"data",{}));n||(n={detail:[]});const r=await ns(a,n);return ts(JSON.stringify(r))}const of=(e,n,o)=>{n=n||"hskj20180614java",o=o||"hskj20180614java";let a=ot.CryptoJS.enc.Utf8.parse(n),r=ot.CryptoJS.enc.Utf8.parse(o),i=ot.CryptoJS.enc.Utf8.parse(e),l=ot.CryptoJS.AES.encrypt(i,a,{iv:r,mode:ot.CryptoJS.mode.CBC,padding:ot.CryptoJS.pad.ZeroPadding});return ot.CryptoJS.enc.Base64.stringify(l.ciphertext)},af=(e,n,o)=>{n=n||"hskj20180614java",o=o||"hskj20180614java";var a=ot.CryptoJS.enc.Utf8.parse(n);let r=ot.CryptoJS.enc.Utf8.parse(o);var i=ot.CryptoJS.AES.decrypt(e,a,{iv:r,mode:ot.CryptoJS.mode.CBC,padding:ot.CryptoJS.pad.ZeroPadding});return ot.CryptoJS.enc.Base64.stringify(i.ciphertext)};function rf(e){const n=r=>r!==null&&typeof r=="object"&&Array.isArray(r)===!1,o=r=>{if(Array.isArray(r)){const i=[...new Set(r.map(u=>typeof u=="object"?u:typeof u))];if(i.some(u=>n(u))){const[u]=i.filter(c=>n(c));let s="Array<{";return Object.entries(o(u)).forEach(([c,d])=>{s+=`${c}:${JSON.stringify(d)};`}),s+="}>",s}else return`Array<${i.join("|")}>`}else if(n(r)){const i={};for(const l in r)r.hasOwnProperty(l)&&(i[l]=o(r[l]));return i}else return typeof r};return"export interface DATA_TYPE"+JSON.stringify(o(e)).replaceAll(",",";").replaceAll('"',"").replaceAll("\\","")}function os(e){var u;if(!e.config_unique_id)return;const n=y._.cloneDeep(e),o={};(u=n.form)==null||u.forEach(s=>i(s,s.fieldID)),l(n.data);const a=Object.keys(o).map(s=>s.split(".")[1]).join("|"),r=JSON.stringify(n.data).replace(new RegExp(a,"gi"),function(s){const[c]=Object.keys(n.data).map(d=>o[`${d}.${s}`]).filter(Boolean);return`
2
+ ${c==null?void 0:c.label}
3
+ ${s}`}).replaceAll(",",";").replaceAll('"',"").replaceAll("\\","");function i(s,c){var d;for(let f in s){if((d=s[f])!=null&&d.baseData){const{baseData:m}=s[f];o[`${c}.${m.prop}`]={type:m.complexType?`${m.complexType}<${m.baseType}>`:m.baseType,label:`/** ${m.label} */`,fieldID:c}}y._.isObject(s[f])&&!y._.isEmpty(s[f])&&i(s[f],c)}}function l(s,c=""){for(let d in s)c&&o.hasOwnProperty(`${c}.${d}`)&&(s[d]=o[`${c}.${d}`].type),y._.isObject(s[d])&&!y._.isEmpty(s[d])&&l(s[d],c?`${c}.${d}`:d)}return`export interface ${n.config_name} ${r}`}function as(e){const n=y._.cloneDeep(e);let o="";n.forEach(a=>{const r={},i={};a.tableConfig.forEach(s=>{s.data.type||(i[s.data.field]=s.data.returnValueType,r[s.data.field]=`/** ${s.data.title} */`)});const l=new RegExp(Object.keys(i).join("|"),"gi"),u=JSON.stringify(i).replace(l,function(s){return`
4
+ ${r[s]}
5
+ ${s}`}).replaceAll(",",";").replaceAll('"',"").replaceAll("\\","");o+=`
6
+ export interface ${a.baseData.tableName} ${u}
7
+ `}),console.debug(o)}const rs=e=>new Promise((n,o)=>{try{P.useClipboard().toClipboard(e),A.ElMessage.success("复制成功!"),n(e)}catch(a){A.ElMessage.error("复制失败!"),o(a)}});function Er(e,n,o=["id"]){for(let a in n)Object.keys(e).includes(a)?typeof n[a]=="object"&&!Array.isArray(n[a])?Er(e[a],n[a]):e[a]=n[a]:o.includes(a)&&(e[a]=n[a]);return e}function lf(e){const n=t.ref(!1),o=()=>{n.value=P.screenfull.isFullscreen};P.screenfull.on("change",o);function a(){if(!P.screenfull.isEnabled)return A.ElMessage.warning("暂不不支持全屏"),!1;P.screenfull.toggle(e)}return t.onBeforeUnmount(()=>{P.screenfull.off("change",o)}),{isFullPage:n,toggle:a}}function xo(e,n){if(!e)return"";let o=e.getDay(),a=is(e),r=Math.floor((e.getMonth()+3)/3).toString();const i={"Y+":e.getFullYear().toString(),"m+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"M+":e.getMinutes().toString(),"S+":e.getSeconds().toString(),"q+":r},l={0:"日",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六"},u={1:"一",2:"二",3:"三",4:"四"};/(W+)/.test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length>1?RegExp.$1.length>2?"星期"+l[o]:"周"+l[o]:l[o])),/(Q+)/.test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length==4?"第"+u[r]+"季度":u[r])),/(Z+)/.test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length==3?"第"+a+"周":a+""));for(let s in i){let c=new RegExp("("+s+")").exec(n);c&&(n=n.replace(c[1],RegExp.$1.length==1?i[s]:i[s].padStart(RegExp.$1.length,"0")))}return n}function is(e){let n=new Date(e.getTime()),o=n.getDay()||7;n.setDate(n.getDate()-o+1+5);let a=new Date(n.getFullYear(),0,1),r=a.getDay(),i=1;r!=0&&(i=7-r+1),a=new Date(n.getFullYear(),0,1+i);let l=Math.ceil((n.valueOf()-a.valueOf())/864e5);return Math.ceil(l/7)}function sf(e,n="YYYY-mm-dd"){let o,a,r=new Date().getTime();if(typeof e=="string"||typeof e=="object"?o=new Date(e).getTime():o=e,r=Number.parseInt(`${r-o}`),r<1e4)return"刚刚";if(r<6e4&&r>=1e4)return a=Math.floor(r/1e3),`${a}秒前`;if(r<36e5&&r>=6e4)return a=Math.floor(r/6e4),`${a}分钟前`;if(r<864e5&&r>=36e5)return a=Math.floor(r/36e5),`${a}小时前`;if(r<2592e5&&r>=864e5)return a=Math.floor(r/864e5),`${a}天前`;{let i=e;return(typeof e=="string"||typeof e=="object")&&(i=new Date(e)),xo(i,n)}}function cf(e){let n=new Date(e).getHours();return n<6?"凌晨好":n<9?"早上好":n<12?"上午好":n<14?"中午好":n<17?"下午好":n<19?"傍晚好":n<22?"晚上好":"夜里好"}const uf=(e,n,o)=>o?`${o}%`:"-",df=(e,n,o)=>o?xo(new Date(o),"YYYY-mm-dd"):"-",ff=(e,n,o)=>o?xo(new Date(o),"YYYY-mm-dd HH:MM:SS"):"-",mf=(e,n,o)=>{if(!o)return"-";let a=0;return typeof e=="number"&&(a=e),typeof o=="number"&&(a=o),xo(new Date(a*1e3),"HH:MM:SS")},hf=(e="0",n=4)=>Number.parseFloat(e).toFixed(n),pf=(e="0")=>Number.parseFloat(e).toFixed(2),_f=e=>{let n=e&&e.toUpperCase();const o={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江 ",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北 ",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏 ",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外 "};let a="",r=!0;if(!n||!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(n))a="身份证号格式错误",r=!1;else if(!o[n.substr(0,2)])a="身份证地址编码错误",r=!1;else if(n.length==18){n=n.split("");for(var i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],l=[1,0,"X",9,8,7,6,5,4,3,2],u=0,s=0,c=0,d=0;d<17;d++)s=n[d],c=i[d],u+=s*c;l[u%11],l[u%11]!=n[17]&&(a="身份证校验位错误",r=!1)}return{tip:a,pass:r}};function Sr(e){let n=e.replace(/(^\s*)|(\s*$)/g,"");return n=n.replace(/[^\d.]/g,""),n=n.replace(/^0{2}$/g,"0"),n=n.replace(/^\./g,""),n=n.replace(".","$#$").replace(/\./g,"").replace("$#$","."),n=n.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),n}function gf(e){let n=e.replace(/(^\s*)|(\s*$)/g,"");return n=n.replace(/[^\d]/g,""),n=n.replace(/^0/g,""),n=n.replace(/^[1-9]\d\d{1,3}$/,"100"),n}function vf(e){let n=Sr(e);return n=n.replace(/^[1-9]\d\d{1,3}$/,"100"),n=n.replace(/^100\.$/,"100"),n}function yf(e){let n=e.replace(/(^\s*)|(\s*$)/g,"");return n=n.replace(/[\.]*/g,""),n=n.replace(/(^0[\d]*)$/g,"0"),n=n.replace(/^0\d$/g,"0"),n=n.replace(/[^\d]/g,""),n}function bf(e){let n=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return n=n.replace(/(^\s*)|(\s*$)/g,""),n}function wf(e){let n=e.replace(/[a-zA-Z]+/g,"");return n=n.replace(/(^\s*)|(\s*$)/g,""),n}function kf(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function Cf(e){let n=Sr(e);return n=n.toString().split("."),n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),n=n.join("."),n}function Ef(e,n="",o="red"){return n.replace(new RegExp(e,"gi"),`<span style='color: ${o}'>${e}</span>`)}function Sf(e,n="仟佰拾亿仟佰拾万仟佰拾元角分",o=""){e+="00";let a=e.indexOf(".");a>=0&&(e=e.substring(0,a)+e.substr(a+1,2)),n=n.substr(n.length-e.length);for(let r=0;r<e.length;r++)o+="零壹贰叁肆伍陆柒捌玖".substr(e.substr(r,1),1)+n.substr(r,1);return o=o.replace(/零角零分$/,"整").replace(/零[仟佰拾]/g,"零").replace(/零{2,}/g,"零").replace(/零([亿|万])/g,"$1").replace(/零+元/,"元").replace(/亿零{0,3}万/,"亿").replace(/^元/,"零元"),o}function xf(e){return!!/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/.test(e)}function Df(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function If(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function Bf(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function Nf(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function $f(e){let n="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(n="弱"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(n="中"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(n="强"),n}function Vf(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function Tf(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function Rf(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function Af(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function Lf(e){return!!/^[1-9][0-9]{5}$/.test(e)}function ls(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function Mf(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}function Of(e){}function ss(e){document.title=e}function cs(e){let n="";const{query:o,params:a,meta:r}=e;return o!=null&&o.tagsViewName||a!=null&&a.tagsViewName?n=(o==null?void 0:o.tagsViewName)||(a==null?void 0:a.tagsViewName):n=r.title,n}const us=(e,n)=>{const o=new IntersectionObserver(a=>{a.forEach(r=>{if(r.isIntersecting){const{img:i,key:l}=r.target.dataset;r.target.src=i,r.target.onload=()=>{o.unobserve(r.target),n[l].loading=!1}}})});t.nextTick(()=>{document.querySelectorAll(e).forEach(a=>o.observe(a))})},ds=()=>"",fs=y._.cloneDeep;function ms(){return!!navigator.userAgent.match(/('phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone')/i)}function hs(e){const n=[];for(const o in e){const a=[];for(const i in e[o])a.push(e[o][i]);a.filter(i=>i==="").length!==a.length&&n.push(e[o])}return n}function ps(e){var a;const{origin:n,pathname:o}=window.location;if(e.link&&!((a=e==null?void 0:e.meta)!=null&&a.isIframe))return ce.get("userInfo").then(r=>{var l;const i=Ll(`${location.origin}${e.link}`,{isIframe:(l=e.meta)==null?void 0:l.isIframe,jti:r.jti});window.open(i,r.jti)});ls(e.link)?window.open(e.link):window.open(`${n}${o}`)}const qf={elSvg:e=>{},useTitle:e=>{ss(e)},setTagsViewNameI18n(e){return cs(e)},lazyImg:(e,n)=>{us(e,n)},globalComponentSize:()=>ds(),deepClone:e=>fs(e),isMobile:()=>ms(),handleEmpty:e=>hs(e),handleOpenLink:e=>{ps(e)}};function co(){return{hexToRgb:r=>{let i="";if(!/^\#?[0-9A-Fa-f]{6}$/.test(r))return A.ElMessage.warning("输入错误的hex"),"";r=r.replace("#",""),i=r.match(/../g);for(let u=0;u<3;u++)i[u]=parseInt(i[u],16);return i},rgbToHex:(r,i,l)=>{let u=/^\d{1,3}$/;if(!u.test(String(r))||!u.test(String(i))||!u.test(String(l)))return A.ElMessage.warning("输入错误的rgb颜色值"),"";let s=[r.toString(16),i.toString(16),l.toString(16)];for(let c=0;c<3;c++)s[c].length==1&&(s[c]=`0${s[c]}`);return`#${s.join("")}`},getDarkColor:(r,i)=>{if(!/^\#?[0-9A-Fa-f]{6}$/.test(r))return A.ElMessage.warning("输入错误的hex颜色值"),"";let u=co().hexToRgb(r);for(let s=0;s<3;s++)u[s]=Math.floor(u[s]*(1-i));return co().rgbToHex(u[0],u[1],u[2])},getLightColor:(r,i)=>{if(!/^\#?[0-9A-Fa-f]{6}$/.test(r))return A.ElMessage.warning("输入错误的hex颜色值"),"";let u=co().hexToRgb(r);for(let s=0;s<3;s++)u[s]=Math.floor((255-u[s])*i+u[s]);return co().rgbToHex(u[0],u[1],u[2])}}}const ei=e=>{const n="1.23452384164.123412416";document.getElementById(n)!==null&&document.body.removeChild(document.getElementById(n));const o=document.createElement("canvas");o.width=200,o.height=130;const a=o.getContext("2d");a.rotate(-20*Math.PI/180),a.font="12px Vedana",a.fillStyle="rgba(200, 200, 200, 0.30)",a.textBaseline="middle",a.fillText(e,o.width/10,o.height/2);const r=document.createElement("div");return r.id=n,r.style.pointerEvents="none",r.style.top="0px",r.style.left="0px",r.style.position="fixed",r.style.zIndex="10000000",r.style.width=`${document.documentElement.clientWidth}px`,r.style.height=`${document.documentElement.clientHeight}px`,r.style.background=`url(${o.toDataURL("image/png")}) left top repeat`,document.body.appendChild(r),n},zf={set:e=>{let n=ei(e);document.getElementById(n)===null&&(n=ei(e))},del:()=>{let e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e))}},Pf=[{label:"F1",value:"F1"},{label:"F2",value:"F2"},{label:"F3",value:"F3"},{label:"F4",value:"F4"},{label:"F5",value:"F5"},{label:"F6",value:"F6"},{label:"F7",value:"F7"},{label:"F8",value:"F8"},{label:"F9",value:"F9"},{label:"F10",value:"F10"},{label:"F11",value:"F11"},{label:"F12",value:"F12"},{label:"Q",value:"KeyQ"},{label:"W",value:"KeyW"},{label:"E",value:"KeyE"},{label:"R",value:"KeyR"},{label:"T",value:"KeyT"},{label:"Y",value:"KeyY"},{label:"U",value:"KeyU"},{label:"I",value:"KeyI"},{label:"O",value:"KeyO"},{label:"P",value:"KeyP"},{label:"A",value:"KeyA"},{label:"S",value:"KeyS"},{label:"D",value:"KeyD"},{label:"F",value:"KeyF"},{label:"G",value:"KeyG"},{label:"H",value:"KeyH"},{label:"J",value:"KeyJ"},{label:"K",value:"KeyK"},{label:"L",value:"KeyL"},{label:"Z",value:"KeyZ"},{label:"X",value:"KeyX"},{label:"C",value:"KeyC"},{label:"V",value:"KeyV"},{label:"B",value:"KeyB"},{label:"N",value:"KeyN"},{label:"M",value:"KeyM"},{label:"Tab",value:"Tab"},{label:"Backspace",value:"Backspace"},{label:"Enter",value:"Enter"},{label:"NumpadEnter",value:"NumpadEnter"},{label:"Delete",value:"Delete"},{label:"左侧Shift",value:"ShiftLeft"},{label:"左侧Alt",value:"AltLeft"},{label:"左侧Ctrl",value:"ControlLeft"},{label:"左侧Win",value:"MetaLeft"},{label:"空格键",value:"Space"},{label:"右侧Alt",value:"AltRight"},{label:"右侧Win",value:"MetaRight"},{label:"右侧Ctrl",value:"ControlRight"},{label:"大键盘数字1",value:"Digit1"},{label:"大键盘数字2",value:"Digit2"},{label:"大键盘数字3",value:"Digit3"},{label:"大键盘数字4",value:"Digit4"},{label:"大键盘数字5",value:"Digit5"},{label:"大键盘数字6",value:"Digit6"},{label:"大键盘数字7",value:"Digit7"},{label:"大键盘数字8",value:"Digit8"},{label:"大键盘数字9",value:"Digit9"},{label:"大键盘数字0",value:"Digit0"},{label:"小键盘数字1",value:"Numpad1"},{label:"小键盘数字2",value:"Numpad2"},{label:"小键盘数字3",value:"Numpad3"},{label:"小键盘数字4",value:"Numpad4"},{label:"小键盘数字5",value:"Numpad5"},{label:"小键盘数字6",value:"Numpad6"},{label:"小键盘数字7",value:"Numpad7"},{label:"小键盘数字8",value:"Numpad8"},{label:"小键盘数字9",value:"Numpad9"},{label:"小键盘数字0",value:"Numpad0"}];function Ff(e,n){const o=ir(e),a=ir(n);let r=0;const i=o.length;for(let l in a)for(let u in o)a[l]===o[u]&&r++;return r===i}function _s(e,n){if(!e||!n)return!1;let o=Object.getOwnPropertyNames(e),a=Object.getOwnPropertyNames(n);if(o.length!=a.length)return!1;for(let r=0;r<o.length;r++){let i=o[r],l=e[i],u=n[i];if(!n.hasOwnProperty(i))return!1;if(l instanceof Object){if(!_s(l,u))return!1}else if(l!==u)return!1}return!0}function ir(e,n){if(Object.keys(e).length)if(n){const o={};return e.reduce((a,r)=>(o[r[n]]||(o[r[n]]=r[n]&&a.push(r)),a),[])}else return[...new Set(e)];else return e}const jf=Object.freeze(Object.defineProperty({__proto__:null,CurrentRoute:_a,CurrentRouter:ga,CustomeStore:Sd,Download:Wl,HsMessage:Me,HsMessageBox:ya,HsNotification:wr,IS_DEV:On,IsIdNumber:_f,Local:$n,NEXT_NAME:Xe,Session:ut,add:fd,addUrlParams:Ll,avg:gd,axiosInterceptors:Ld,cfprint:Cr,checkPlugin:es,clearAllIndexDB:xd,convertCurrency:Al,copyText:rs,dataURLtoBlob:Kl,dateFormatHMS:mf,dateFormatYMD:df,dateFormatYMDHMS:ff,decimalDigits:ha,decrypt:af,deepClone:fs,div:pd,downloadFile:kr,elSvg:Of,encrypt:of,encryptionTool:Cd,exportAllData:Hl,exportSelectedData:Ul,exportSelectedDownloadFile:jl,fixedNumAccuracy:cn,formatAxis:cf,formatDate:xo,formatPast:sf,fuzzySearch:Xd,getAuthFieldsByMid:zl,getColumnWidthConfig:yr,getConfig:Te,getDataDictListByMid:Bd,getDataType:rf,getDictListByMid:oo,getFormDataType:os,getFormInstanceData:Ko,getMergeData:Qd,getNumbers:Yn,getStoreSystemParams:Id,getSystemParams:Dd,getTableDataType:as,getUrlBase64:tf,getUrlParams:ke,getWeek:is,globalComponentSize:ds,handleEmpty:hs,handleOpenLink:ps,iframeMessage:kd,isLegalNumber:Tl,isMobile:ms,isObjectValueEqual:_s,isToNumber:vr,isUpdate:Jd,judementSameArr:Ff,lazyImg:us,lodash:y._,mathTool:Rl,max:vd,message:Od,messageBox:qd,min:yd,mittBus:an,notification:zd,numberToChinese:bd,other:qf,percentFormat:uf,popupPlugin:Wd,print:nf,processData:Er,push:wd,removeConfig:Ol,removeDuplicate:ir,request:le,scale2Format:pf,scaleFormat:hf,sendMsg:ts,setColumnWidthConfig:br,setConfig:Ae,setLocalSystemParams:ql,setTagsViewNameI18n:cs,shortcutList:Pf,showPopup:fn,sub:md,sum:_d,systemStore:ce,times:hd,transferString:Yd,treeToList:Gd,trimPrintData:ns,useChangeColor:co,useMittBus:An,useRequest:Md,useTitle:ss,useToggleFullPage:lf,verifiyNumberInteger:yf,verifyAccount:If,verifyAndSpace:kf,verifyCarNum:Mf,verifyCnAndSpace:bf,verifyEmail:Tf,verifyEnAndSpace:wf,verifyFullName:Af,verifyIPAddress:Vf,verifyIdCard:Rf,verifyNumberCnUppercase:Sf,verifyNumberComma:Cf,verifyNumberIntegerAndFloat:Sr,verifyNumberPercentage:gf,verifyNumberPercentageFloat:vf,verifyPassword:Bf,verifyPasswordPowerful:Nf,verifyPasswordStrength:$f,verifyPhone:xf,verifyPostalCode:Lf,verifyTelPhone:Df,verifyTextColor:Ef,verifyUrl:ls,watermark:zf},Symbol.toStringTag,{value:"Module"}));function Uf({option:e,row:n}){return n.field1===Number(e.data)}const Hf=(e,n)=>{const o=(n==null?void 0:n.reduce((a,r)=>(a[r.data.field]=!!r.data.formatAmount,a),{}))||{};return[e.columns.map((a,r)=>{if(r===0)return"合计";if(!y._.isEmpty(e.data,"0.customTotal")){const i=y._.get(e.data,`0.customTotal.${a.field}`,"");return o[a.field]&&i!==""?cn(i):i}return""})]};function Wf(e){console.debug("params.$table.getData()",e.$table.getData())}function Kf(e,n){console.debug("form =>> 表单单击",e,n)}const lr={filterAgeMethod:Uf,footerMethod:Hf,cellDetailMethod:Wf,formBtnMethod:Kf};function Zf(e){var o,a,r,i;if(y._.isEmpty(e))return{};const n={config_type:e.config_type,config_name:e.config_name,config_unique_id:e.config_unique_id,btns:[],tables:[],form:[]};return(o=e.btns)==null||o.forEach(l=>{n.btns.push({fieldName:l.data.name,showName:l.data.name,fieldProp:l.data.key,fieldShow:l.data.isShow,userFieldShow:l.data.userFieldShow,fieldRequired:!0})}),(r=(a=e.form)==null?void 0:a.formConfig)==null||r.forEach(l=>{n.form.push({fieldName:l.data.baseData.label,showName:l.data.baseData.label,fieldProp:l.data.baseData.prop,fieldShow:l.data.baseData.isShow,userFieldShow:l.data.baseData.userFieldShow,fieldRequired:!0})}),n.tables=((i=e.tables)==null?void 0:i.map(l=>({id:l.id,tableName:l.baseData.tableName,data:l.tableConfig.filter(u=>!u.data.type).map(u=>({fieldName:u.data.title,showName:u.data.title,fieldProp:u.data.field,fieldShow:u.data.isShow,userFieldShow:u.data.userFieldShow,fieldRequired:!0,option:u.btnData.map(s=>({fieldName:s.data.name,showName:s.data.name,fieldProp:s.data.key,fieldShow:s.data.isShow,userFieldShow:s.data.userFieldShow,fieldRequired:!0}))}))})))||[],n}function Jf(e){var o,a;if(y._.isEmpty(e))return{};const n={config_type:e.config_type,config_name:e.config_name,config_unique_id:e.config_unique_id,btns:[],tables:[],form:[]};return(o=e.btns)==null||o.forEach(r=>{n.btns.push({fieldName:r.data.name,showName:r.data.name,fieldProp:r.data.key,fieldShow:r.data.isShow,userFieldShow:r.data.userFieldShow,fieldRequired:!0})}),(a=e.form)==null||a.forEach(r=>{if(r.formItemType==="form"){const i=r.config;i==null||i.forEach(l=>{var u;(u=l.config)==null||u.forEach(s=>{n.form.push({fieldName:s.baseData.label,showName:s.baseData.label,fieldProp:s.baseData.prop,fieldShow:s.baseData.isShow,userFieldShow:s.baseData.userFieldShow,fieldRequired:!0})})})}}),n}const Se=t.ref(""),sr=t.ref({}),rt=t.ref({}),un=t.ref(!1),Oe=t.ref({}),ea=t.ref({}),xr=t.ref({}),Fn=t.ref(!0),dn=t.ref({}),$t=["checkbox","radio","expand","seq","html"],ta="system_params",Kt="custome_field_",eo="query_field_",gs="_REGEXP_",Vt="force_update_list",vs={},na=["hs-select","bc-tree-search","hs-tree-select","hs-radio","hs-checkbox","hs-upload","hs-date-picker"],Gf="Home,PrevJump,PrevPage,JumpNumber,NextPage,NextJump,End,Sizes,FullJump,Total".split(","),uo=(e,n)=>e.isSimulate&&!e.requestUrl||e.isGetCanche?Ds(e,n):le(n);function mt(e){return dn.value[e.uniqueId]?!e.isShow||!e.fieldShow?!1:e.userFieldShow:(console.log("不接受权限控制"),!0)}function ys(e){return JSON.stringify(e,function(n,o){return o instanceof RegExp?`${gs}${o.toString()}`:o})}function Vn(e){const n=/method=/,o=/functionBody=/,a=/string=/;function r(i){for(let l in i){if(i[`${l}_1`])i[l]=lr[i[`${l}_1`]];else if(n.test(i[l])&&i[l].split("=")[1]){const u=i[l].replace(n,"");i[`${l}_1`]=u,i[l]=lr[u]}if(i[`${l}_2`])i[l]=new Function("return "+i[`${l}_2`])();else if(o.test(i[l])&&i[l].split("=")[1]){const u=i[l].replace(o,"");i[`${l}_2`]=u,i[l]=new Function("return "+u)()}if(a.test(i[l]))if(i[l].split("=")[1]){const u=i[l].replace(a,"");i[l]=new Function("return "+u)()}else i[l]=[];if(typeof i[l]=="string"&&i[l].startsWith(gs)){const u=i[l].slice(9).replace(/\/$/,"");i[l]=new RegExp(u)}l==="formatAmount"&&i[l]&&y._.set(i,"formatter",function(u){var s,c;return cn((c=u==null?void 0:u.row)==null?void 0:c[(s=u==null?void 0:u.column)==null?void 0:s.field])}),y._.isObject(i[l])&&!y._.isEmpty(i[l])&&r(i[l]),y._.isEmpty(y._.get(i,`${l}.children`))||r(y._.get(i,`${l}.children`))}}return r(e),e}function bs(e){return e.groupMark?(e.el2=e.el,e.groupField=Kt+e.groupMark,"bc-group"):ks(e.el)}function ks(e){return{"hs-select":"bc-select","hs-tree-select":"bc-tree-select","hs-radio":"bc-radio","hs-checkbox":"bc-checkbox","hs-upload":"bc-upload"}[e]||e}async function Cs(e){if(!e.form)return Promise.resolve({});const n=e.form,o=n==null?void 0:n.formConfig.map(i=>{const l=Vn(i.data.elData);return i.data.elData={...l==null?void 0:l.attrs,...y._.omit(l,"attrs")},i.data.baseData.el=bs(i.data.baseData),i}),a=y._.omit(Vn(e.form.baseData),["inline","gutter","justify","align"]),r=y._.cloneDeep(y._.get(Oe.value,`${e==null?void 0:e.config_unique_id}`));return un.value&&r&&(e!=null&&e.form)&&(e.form.formData=y._.cloneDeep(r)),{id:e.form.id,baseData:a,formConfig:o,formData:e.form.formData}}function Qf(e){return Promise.all(e.tables.map(n=>Yf(n,e)))}async function Yf(e,n){var s,c,d,f,m,h,_,g;const o=y._.cloneDeep(e);if(o.baseData=Vn(y._.omit(o.baseData,"data")),o.baseData.config_unique_id=n.config_unique_id,o.baseData.is_apply_page){const p=await ce.get(ta),v=y._.get(p,`_user_pageSize.${o.baseData.id}`,p==null?void 0:p._sys_pageSize);o.baseData.table_page_data.pageSize=Number(v??((s=o.baseData.table_page_data)==null?void 0:s.pageSize)??20),y._.isEmpty((c=o.baseData.table_page_data)==null?void 0:c.layouts)&&(o.baseData.table_page_data.layouts=Gf),y._.isEmpty(p==null?void 0:p._sys_pageSize_s)||(o.baseData.table_page_data.pageSizes=p._sys_pageSize_s)}o.tableConfig=o.tableConfig.map(p=>(y._.isEmpty(p==null?void 0:p.children)?p.data=Vn(p.data):p.children=Vn(p.children),p));let a={};const r=y._.get(ea.value,`query.${o.id}`)||[],i=y._.get(Oe.value,`${(d=o==null?void 0:o.baseData)==null?void 0:d.config_unique_id}`);un.value&&((m=(f=n==null?void 0:n.form)==null?void 0:f.baseData)!=null&&m.isShowQuerySearch)&&i?r.forEach(p=>{a[p]=i[p]}):a=y._.cloneDeep((h=n==null?void 0:n.form)==null?void 0:h.formData);const l=await Dr(o.baseData,a,(g=(_=n==null?void 0:n.form)==null?void 0:_.baseData)==null?void 0:g.isShowQuerySearch),u=p=>{var v;return(v=p.treeConfig)!=null&&v.transform?delete p.stripe:delete p.treeConfig,p};return{id:o.id,baseData:u(o.baseData),tableConfig:o.tableConfig,tableData:l}}async function Dr(e,n,o=!1){let a=n&&y._.cloneDeep(n);if(typeof sr.value[e.id]=="function"){const i=await sr.value[e.id](a,e);y._.isEmpty(i)?o||(a=Oe.value[e.config_unique_id]):a=i}const r=await Es(e,a,o);if(!e.isSimulate&&!e.requestUrl){console.log("未配置接口,不请求数据");const i=y._.get(vs,e.id,[]);return e.is_apply_page&&(e.table_page_data.total=i.length),i}return e.isCloseInitData&&un.value&&(e.isCloseInitData=!1),e.isCloseInitData&&!un.value?(e.isCloseInitData=!1,[]):(e.loading=!0,e.isSplitInterface?uo(e,{...r,params:{...r.params,url_type:"data"}}).then(i=>{var l,u;if(e.is_apply_page){const s=((l=i.data)==null?void 0:l.pageList)??((u=i.data)==null?void 0:u.customPageList)??[];return typeof rt.value[e.id]=="function"?rt.value[e.id](s):s}else{const s=i.data||[];return typeof rt.value[e.id]=="function"?rt.value[e.id](s):s}}).finally(()=>{e.loading=!1}):e.isRemoteTotal?Promise.all([uo(e,{...r,params:{...r.params,url_type:"total"}}),uo(e,{...r,params:{...r.params,url_type:"data"}})]).then(([i,l])=>{var s,c,d;let u=((s=i==null?void 0:i.data)==null?void 0:s.customTotal)||{};if(e.is_apply_page){const m=(((c=l.data)==null?void 0:c.pageList)??((d=l.data)==null?void 0:d.customPageList)??[]).map(h=>Object.assign(h,{customTotal:u}));return typeof rt.value[e.id]=="function"?rt.value[e.id](m):m}else{const m=((l==null?void 0:l.data)||[]).map(h=>Object.assign(h,{customTotal:u}));return typeof rt.value[e.id]=="function"?rt.value[e.id](m):m}}).finally(()=>{e.loading=!1}):uo(e,r).then(i=>{var u,s,c;const l=((u=i==null?void 0:i.data)==null?void 0:u.customTotal)||{};if(e.is_apply_page){e.table_page_data.currentPage=i.data.page.currentPage||1,e.table_page_data.pageSize=i.data.page.pageSize,e.table_page_data.total=i.data.page.totalItem;const f=(((s=i.data)==null?void 0:s.pageList)??((c=i.data)==null?void 0:c.customPageList)??[]).map(m=>Object.assign(m,{customTotal:l}));return typeof rt.value[e.id]=="function"?rt.value[e.id](f):f}else{const f=(i.data||[]).map(m=>Object.assign(m,{customTotal:l}));return typeof rt.value[e.id]=="function"?rt.value[e.id](f):f}}).finally(()=>{e.loading=!1}))}function Xf(e,n,o){const a=o&&y._.cloneDeep(o),r=async(i,l)=>{if(i.baseData.isRemoteTotal||i.baseData.isSplitInterface){const u=await Es(i.baseData,a);return Promise.all([i.baseData.is_apply_page?uo(i.baseData,{...u,params:{...u.params,url_type:"count"}}):Promise.resolve(null)]).then(async s=>{var c,d,f,m,h,_,g,p,v;if(i.baseData.is_apply_page){const[w]=s;i.baseData.table_page_data.currentPage!==((d=(c=w==null?void 0:w.data)==null?void 0:c.page)==null?void 0:d.currentPage)&&(i.baseData.table_page_data.currentPage=((m=(f=w==null?void 0:w.data)==null?void 0:f.page)==null?void 0:m.currentPage)||1,i.tableData=await Dr(i.baseData,a,(g=(_=(h=l.value)==null?void 0:h.form)==null?void 0:_.baseData)==null?void 0:g.isShowQuerySearch)),i.baseData.table_page_data.currentPage=((v=(p=w==null?void 0:w.data)==null?void 0:p.page)==null?void 0:v.currentPage)||1,i.baseData.table_page_data.pageSize=w.data.page.pageSize,i.baseData.table_page_data.total=w.data.page.totalItem}return s})}};return n?Promise.all(e.value.tables.filter(i=>i.id===n).map(i=>r(i,e))):Promise.all(e.value.tables.map(i=>r(i,e)))}async function Es(e,n,o=!1){var h,_;const a=(e==null?void 0:e.proxy)||"scmp-web",r=e.method||"get",i={url:"/"+a+e.requestUrl,method:r},l={currentPage:((h=e.table_page_data)==null?void 0:h.currentPage)||1,pageSize:((_=e.table_page_data)==null?void 0:_.pageSize)||10};y._.set(e,"scrollX.enabled",l.pageSize>=50),y._.set(e,"scrollX.gt",0),y._.set(e,"scrollY.enabled",l.pageSize>=50),y._.set(e,"scrollY.gt",0);const u=Ss(e,n,!0,!0,o),s=e.requestParams?new Function("return "+e.requestParams)():{},c=y._.cloneDeep(Object.assign({},u,e.is_apply_page?l:{},s)),d=Object.keys(c).filter(g=>g.startsWith("_")).map(g=>{const[p,v,w]=g.split("|");return{type:p.slice(1),key:v,code:w,value:c[g]}}),f=Object.keys(c).filter(g=>!g.startsWith("_")).reduce((g,p)=>(y._.set(g,p,c[p]),g),{}),m=d.length>0?Object.assign({qry_json_data:JSON.stringify(d)},f):f;return r==="get"?i.params=m:i.data=m,i}function Ss(e,n,o=!0,a=!0,r=!1){const i=Is(e.config_unique_id);r&&n&&Object.keys(n).forEach(d=>{Oe.value[e.config_unique_id]||(Oe.value[e.config_unique_id]={}),Oe.value[e.config_unique_id][d]=n[d]});const l=r?n||{}:Oe.value[e.config_unique_id]||{},u=y._.cloneDeep(un.value?Object.assign(i,n||{},l):Object.assign(l,i,n||{}));if(y._.isEmpty(u))return{};const s=new RegExp(Kt),c=new RegExp(eo);for(let d in u){Array.isArray(u[d])&&(u[d]=String(u[d]));const f=s.test(d),m=c.test(d),h=u[`${eo}${e.id}`];if(m&&h&&a){const g=Object.keys(h).reduce((p,v)=>(h[v]&&(typeof h[v]=="string"?p[v]=h[v].trim():p[v]=h[v]),p),{});Object.assign(u,g)}(f||m)&&delete u[d],(typeof u[d]=="string"&&u[d]===""||u[d]===void 0)&&o&&delete u[d]}return u}async function oa(e){const n=y._.cloneDeep(e);if(n.preParsing)return n;const o=await Cs(n),a=(await Qf(n)).filter(Boolean);return On.value==!0&&as(a),{...n,form:o,tables:a}}function aa(e){var i;const n=y._.cloneDeep(e);if(n.preParsing)return n;const o=Vn(n.data),a=xs(n);for(let l in o)y._.isEmpty(o[l])||y._.set(o,`${l}.${Vt}`,a);const r=((i=n.form)==null?void 0:i.map(l=>(l.config=Vn(l.config),l)))||[];return On.value==!0&&console.debug(os(n)),{...n,data:o,form:r}}function xs(e){var n,o,a,r;return((r=(a=(o=(n=e==null?void 0:e.form)==null?void 0:n.filter(i=>i.formItemType==="form"))==null?void 0:o.map(i=>i.config.map(u=>u.config.filter(s=>mt({...s.baseData,uniqueId:e.config_unique_id})).map(s=>s.baseData.prop).toString())))==null?void 0:a.flat(2))==null?void 0:r.filter(Boolean))||[]}function em({mid:e,id:n,uid:o,tableId:a,uuid:r,data:i,pageSize:l,is_apply_page:u}){return Ae({mid:e,id:n,uid:o},y._.cloneDeep(i),r?`cache_${a}_${r}`:`cache_${a}`).then(()=>{const s=Math.ceil(i.length/l);return{currentPage:s,totalPage:i.length,data:u?i.slice((s-1)*l,s*l):i,currentData:u?i.slice(0,l):i}})}async function Ds(e,n){const o=e.uuid;return Te({mid:ke().mid,id:e.config_unique_id},o?`cache_${e.id}_${o}`:`cache_${e.id}`).then(a=>{if(!n)return a||[];let r=a||[];const i=r.length,l=n.method.toLocaleLowerCase()==="get"?"params":"data";let u=n[l].currentPage||1,s=n[l].pageSize;const c=(f,m,h)=>{const _=(g,p)=>g[m]<p[m]?h==="asc"?-1:1:g[m]>p[m]?h==="asc"?1:-1:0;return f.sort(_)};if(y._.get(n,`${l}.query_order_by`)){const[f,m]=y._.get(n,`${l}.query_order_by`).split(" ");r=c(r,f,m)}return e.is_apply_page?{code:1,data:{customPageList:r.slice((u-1)*s,u*s),page:{currentPage:u,pageSize:s,totalItem:i}}}:{code:1,data:r}})}function tm(e,n){var l,u,s;const o=y._.omit((l=e==null?void 0:e.form)==null?void 0:l.formData,["currentPage","pageSize"]),a=((s=(u=e==null?void 0:e.form)==null?void 0:u.formConfig)==null?void 0:s.reduce((c,d)=>(mt({...d.data.baseData,uniqueId:e==null?void 0:e.config_unique_id})&&Object.assign(c,{[d.data.baseData.prop]:""}),c),{}))||{};if(y._.isEmpty(a))return{};const r=new RegExp(Kt),i=new Set(Object.keys(a));return Object.keys(o).forEach(c=>{r.test(c)?o[c].some(d=>i.has(d))&&o[c].map(d=>{Object.assign(a,{[d]:o[d]})}):Reflect.has(a,c)&&(a[c]=o[c])}),a}function Is(e){const n=new RegExp(eo),o=y._.get(Oe.value,e,{});return Object.keys(o).reduce((a,r)=>(n.test(r)&&Object.assign(a,{[r]:y._.get(o,r,{})}),a),{})}async function nm(e){var r;dn.value[e.id]=e.isAuth;const n=await ce.get("userInfo"),o=e.projectCode||n.project_code,a=e.mid||((r=ke())==null?void 0:r.mid);return rm({...e,mid:a,projectCode:o}).then(i=>i?ba({...e,mid:a,projectCode:o}):Bs({...e,mid:a,projectCode:o}))}async function Bs(e){const n=await Te({mid:e.mid,id:e.id,uid:e.uid});return e.unique&&(n.table.uuid=P.v4(),n.table.tables.forEach(o=>{o.baseData.uuid=P.v4()})),n?Te({mid:e.mid,id:e.id,uid:e.uid},"auth").then(o=>o?{data:n,auth:o}:{data:n,auth:{dict_functions:[],data_functions:[],field_functions:{table:{},form:{}}}}):ba(e)}async function ba(e){const n=e.mid,o=e.projectCode||"qwp",a=e.proxy||"scmp-web";return le({url:`/${a}/api/get_biz_field_config`,method:"get",params:{menu_id:n,config_type:e.type,config_unique_id:e.id,project_code:o}}).then(async r=>{if(dn.value[e.id]){const i=await Ir(e),l=await Ns(r.data,e,i);return await Ae({mid:n,id:e.id,uid:e.uid},l),{data:l,auth:i}}else{const i=await im(r.data,e);return await Ae({mid:n,id:e.id,uid:e.uid},i),{data:i,auth:{dict_functions:[],data_functions:[],field_functions:{table:{},form:{}}}}}})}async function om(e,n){var d;const o=(n==null?void 0:n.mid)||((d=ke())==null?void 0:d.mid),a=await ce.get("userInfo"),r=(n==null?void 0:n.projectCode)||a.project_code,i=(n==null?void 0:n.proxy)||"scmp-web",l=JSON.stringify(e.map(f=>({config_unique_id:f.id,config_type:f.type}))),u=P.Md5.hashStr(e.map(f=>f.id).toString()),s=await Te({mid:o,id:u,uid:n==null?void 0:n.uid},`batch_${u}`);return await am({proxy:i,mid:o,uid:n==null?void 0:n.uid,projectCode:r,config_json_data:l,varsion:(s==null?void 0:s.version)||{}})?(Object.keys(s.version).forEach(f=>{dn.value[f]=(n==null?void 0:n.isAuth)??!0}),n!=null&&n.preParsing&&(y._.isEmpty(s.form)||Object.keys(s.form).forEach(f=>{s.form[f]=aa(s.form[f]),s.form[f].preParsing=!0,s.form[f].batch_id=u}),y._.isEmpty(s.table)||await Promise.all(Object.keys(s.table).map(async f=>{s.table[f]=await oa(s.table[f]),s.table[f].preParsing=!0,s.table[f].batch_id=u}))),s):le({url:`/${i}/api/get_biz_field_config_list`,method:"get",params:{menu_id:o,project_code:r,config_json_data:l}}).then(async f=>{const m=y._.get(f,"data",{});if(y._.isEmpty(m)){A.ElMessage.warning("未查询到配置数据!");return}const h={...y._.omit(n,"config_json_data"),mid:o,projectCode:r,uid:n==null?void 0:n.uid},_=await Ir(h),p=(await Promise.all(Object.keys(m).map(v=>{dn.value[v]=(n==null?void 0:n.isAuth)??!0;const w=y._.get(m,v);return Ns(w,{...h,type:w[0].config_type},_)}))).reduce((v,w)=>{var b,C;return y._.get(w,"form.config_unique_id")&&(y._.set(v,`form.${y._.get(w,"form.config_unique_id")}`,w.form),y._.set(v,`version.${y._.get(w,"form.config_unique_id")}`,(b=w.form)==null?void 0:b.config_version)),y._.get(w,"table.config_unique_id")&&(y._.set(v,`table.${y._.get(w,"table.config_unique_id")}`,w.table),y._.set(v,`version.${y._.get(w,"table.config_unique_id")}`,(C=w.table)==null?void 0:C.config_version)),v},{form:{},table:{},version:{}});return Ae({mid:o,id:u,uid:n==null?void 0:n.uid},y._.cloneDeep(p),`batch_${u}`),n!=null&&n.preParsing&&(y._.isEmpty(p.form)||Object.keys(p.form).forEach(v=>{p.form[v]=aa(p.form[v]),p.form[v].preParsing=!0,p.form[v].batch_id=u}),y._.isEmpty(p.table)||await Promise.all(Object.keys(p.table).map(async v=>{p.table[v]=await oa(p.table[v]),p.table[v].preParsing=!0,p.table[v].batch_id=u}))),p})}async function am(e){return le({url:`/${e.proxy}/api/get_biz_config_version_list`,method:"get",params:{menu_id:e.mid,project_code:e.projectCode,config_json_data:e.config_json_data}}).then(n=>{const o=y._.get(n,"data",{});if(y._.isEmpty(o)||y._.isEmpty(e.varsion))return!1;if(y._.isEqual(e.varsion,o))return le({url:`/${e.projectCode}-web/pri/v2/perminssion/get_menu_perm_version`,method:"get",params:{menu_id:e.mid}}).then(a=>Te({mid:e.mid,id:""},"auth").then(r=>a.data==(r==null?void 0:r.menu_version)))})}function rm(e){const n=e.mid,o=e.projectCode||"qwp",a=e.proxy||"scmp-web",r=[e.isAuth?le({url:`/${o}-web/pri/v2/perminssion/get_menu_perm_version`,method:"get",params:{menu_id:n}}):{data:""},Te({mid:n,id:e.id,uid:e.uid},"auth"),le({url:`/${a}/api/get_biz_config_version`,method:"get",params:{menu_id:n,config_type:e.type,config_unique_id:e.id,project_code:o}}),Te({mid:n,id:e.id,uid:e.uid})];return Promise.all(r).then(async([i,l,u,s])=>{if(!l||!s)return!0;const c=e.type==="1"?s.table:s.form;return i.data!==(l==null?void 0:l.menu_version)||u.data!==(c==null?void 0:c.config_version)?(console.log("版本已过期,删除旧数据"),await Ol(n,e.uid),!0):!1})}async function Ir(e){const n=await ce.get("userInfo"),o=e.mid,a=e.uid||(n==null?void 0:n.id);if(!o||!a)return{dict_functions:[],data_functions:[],field_functions:{table:{},form:{}}};const r=e.projectCode||"qwp";return Te({mid:o,id:e.id,uid:e.uid},"auth").then(async i=>{const l=await le({url:`/${r}-web/pri/v2/perminssion/get_menu_perm_version`,method:"get",params:{menu_id:o}});return l.data===(i==null?void 0:i.menu_version)?i:le({url:`/${r}-web/pri/v2/perminssion/get_menu_prminssion`,method:"get",params:{menu_id:o,user_id:a}}).then(async u=>{const s=_m(u.data);return s.menu_version=l.data,Ae({mid:o,id:e.id,uid:e.uid},s,"auth").then(()=>s)})})}async function Ns(e,n,o){y._.isEmpty(e)&&Me.warning("未查询到配置数据信息!");const[a,r,i,l,u,s]=(e==null?void 0:e.map(f=>[JSON.parse(f.business_json),f.config_version,f.project_code,f.is_auth,f.menu_id,f.config_unique_id]).flat())||[];n.unique&&(a.uuid=P.v4()),a.mid=u,a.uid=n.uid,a.config_date=P.hooks$1().format("YYYY-MM-DD"),a.config_version=r,a.project_code=i,a.is_auth=a.is_auth||l,a.config_unique_id=s;let c,d=yo();return n.type=="1"&&(a.is_auth=="1"?y._.isEmpty(o.field_functions.table)?(Fn.value&&(A.ElMessage.warning("暂无权限查看,请联系管理员配置权限!"),Fn.value=!1,setTimeout(()=>{Fn.value=!0},1e3)),c={config_name:"",config_unique_id:a.config_unique_id,btns:[],tables:[]}):c=lm(a,o):c=sm(a),c=await $s(n,c)),n.type=="2"&&(a.is_auth=="1"?y._.isEmpty(o.field_functions.form)?(Fn.value&&(A.ElMessage.warning("暂无权限查看,请联系管理员配置权限!"),Fn.value=!1,setTimeout(()=>{Fn.value=!0},1e3)),d=yo(a.config_unique_id)):d=fm(a,o):d=mm(a)),{table:c,form:d}}async function im(e,n){var d;const[o,a,r,i,l,u]=(e==null?void 0:e.map(f=>[JSON.parse(f.business_json),f.config_version,f.project_code,f.is_auth,f.menu_id,f.config_unique_id]).flat())||[];o.mid=l,o.uid=n.uid,o.config_version=a,o.project_code=r,o.is_auth=o.is_auth||i,o.config_unique_id=u;let s,c=yo();if(n.type=="1"&&(s=o,s!=null&&s.form)){const f={},m=((d=s.form)==null?void 0:d.formConfig)||[];m==null||m.forEach(_=>{if(_.data.baseData.groupMark){const g=Kt+_.data.baseData.groupMark;f[g]||(f[g]=[]),f[g].push(_.data.baseData.prop+"="+_.data.baseData.positionInGroup),f[g].sort(p=>p.indexOf("start")>-1?-1:1)}});for(let _ in f)f[_]=f[_].map(g=>g.split("=").shift());const h={};m==null||m.forEach(_=>{if(_.data.baseData.groupMark){const g=Kt+_.data.baseData.groupMark;h[g]||(h[g]=_)}else h[_.data.baseData.prop]=_}),s.form.formConfig=Object.values(h),Object.assign(s.form.formData,f,{menu_id:l})}return n.type=="2"&&(c=o),{table:s,form:c}}async function $s(e,n){var a;const o=e.mid;if(n!=null&&n.form){const r=e.projectCode||"qwp",i=await ti({projectCode:r,menu_id:o,id:e.id,uid:e.uid,table_id:`form_${n.form.id}`}),l={},u=((a=n.form)==null?void 0:a.formConfig)||[];u==null||u.forEach(c=>{if(c.data.baseData.groupMark){const d=Kt+c.data.baseData.groupMark;l[d]||(l[d]=[]),l[d].push(c.data.baseData.prop+"="+c.data.baseData.positionInGroup),l[d].sort((f,m)=>{const h=f.includes("begin"),_=m.includes("begin");return h===_?0:h?-1:1})}});for(let c in l)l[c]=l[c].map(d=>d.split("=").shift());const s={};u==null||u.forEach(c=>{if(c.data.baseData.groupMark){const d=Kt+c.data.baseData.groupMark;s[d]||(s[d]=c)}else s[c.data.baseData.prop]=c}),n.form.formConfig=Object.values(s).map(c=>{var d,f,m;return c.data.baseData.label=((d=i==null?void 0:i[c.data.baseData.prop])==null?void 0:d.showName)||c.data.baseData.label,c.data.baseData.userFieldShow=((f=i==null?void 0:i[c.data.baseData.prop])==null?void 0:f.userFieldShow)||c.data.baseData.isShow,c.sort=((m=i==null?void 0:i[c.data.baseData.prop])==null?void 0:m.sort)||0,c}).sort((c,d)=>c.sort-d.sort),Object.assign(n.form.formData,l,{menu_id:o})}if(!y._.isEmpty(n==null?void 0:n.tables)){const r=e.projectCode||"qwp",i=await Promise.all(n.tables.map(l=>ti({projectCode:r,menu_id:o,id:e.id,uid:e.uid,table_id:l.id})));n.tables.forEach((l,u)=>{l.baseData.border=y._.get(i,`${u}._baseconfig._border.${l.id}`,l.baseData.border),l.baseData.stripe=y._.get(i,`${u}._baseconfig._stripe.${l.id}`,l.baseData.stripe),l.tableConfig=l.tableConfig.map(s=>(s.data.title=y._.get(i,`${u}.${s.data.field}.showName`,s.data.title),s.data.userFieldShow=y._.get(i,`${u}.${s.data.field}.userFieldShow`,s.data.isShow),s.data.width=y._.get(i,`${u}.${s.data.field}.columnWidth`,s.data.width),s.sort=y._.get(i,`${u}.${s.data.field}.sort`,s.sort??0),s)).sort((s,c)=>s.sort-c.sort)})}return Promise.resolve(n)}async function ti({projectCode:e,menu_id:n,id:o,uid:a,table_id:r}){const i=await yr({table_id:r,uid:a}),l=await Te({mid:n,id:o,uid:a},r);if(!y._.isEmpty(l)){for(let u in l)l[u].fieldShow=["1","true",1,!0].includes(l[u].fieldShow),l[u].userFieldShow=["1","true",1,!0].includes(l[u].userFieldShow);return l}return le({url:`/${e}-web/pri/v2/field_user/get_curr_user_field`,method:"get",params:{menu_id:n,table_id:r}}).then(async u=>{var d,f,m;const c=(((d=u.data)==null?void 0:d.json_data)||[]).reduce((h,_)=>(h[_.fieldProp]={fieldShow:_.fieldShow==1,userFieldShow:[0,1,"0","1"].includes(_==null?void 0:_.userFieldShow)?_.userFieldShow==1:!0,fieldProp:_.fieldProp,fieldName:_.fieldName,columnWidth:y._.get(i,_.fieldProp,_.columnWidth),showName:_.showName,sort:_.sort},h),{});return c._baseconfig=y._.isEmpty((f=u.data)==null?void 0:f.base_config)?{_color:{},_stripe:{},_border:{}}:JSON.parse((m=u.data)==null?void 0:m.base_config),await Ae({mid:n,id:o,uid:a},c,r),c})}function lm(e,n){var a;const o={...e,btns:cm(e,n),tables:((a=e.tables)==null?void 0:a.map(r=>(r.baseData.uuid=e.uuid,{...r,tableConfig:dm(e,r,n)})))||[]};return e.form&&(o.form={...e.form,formConfig:um(e,n)}),o}function sm(e){var o,a,r;const n={...e,btns:((o=e.btns)==null?void 0:o.map(i=>(i.data.fieldShow=!0,i.data.userFieldShow=!0,i)))||[],tables:((a=e.tables)==null?void 0:a.map(i=>{var u;i.baseData.uuid=e.uuid;const l=((u=i.tableConfig)==null?void 0:u.map(s=>{var c;return s.data.fieldShow=!0,s.data.userFieldShow=!0,s.btnData=((c=s.btnData)==null?void 0:c.map(d=>(d.data.fieldShow=!0,d.data.userFieldShow=!0,d)))||[],s}))||[];return{...i,tableConfig:Br(l)}}))||[]};return e.form&&(n.form={...e.form,formConfig:((r=e.form.formConfig)==null?void 0:r.map(i=>(i.data.baseData.fieldShow=!0,i.data.baseData.userFieldShow=!0,i)))||[]}),n}function cm(e,n){var a,r;const o=((a=n.field_functions.table[e.config_unique_id])==null?void 0:a.btns)||{};return((r=e.btns)==null?void 0:r.map(i=>{const l=o[i.data.key];return i.data.fieldShow=(l==null?void 0:l.fieldShow)??!1,i.data.userFieldShow=(l==null?void 0:l.userFieldShow)??i.data.isShow,l&&l.fieldChange&&(i.data.name=l.showName),i}))||[]}function um(e,n){var a,r,i;const o=((a=n.field_functions.table[e.config_unique_id])==null?void 0:a.form)||{};return((i=(r=e==null?void 0:e.form)==null?void 0:r.formConfig)==null?void 0:i.map(l=>{var c,d,f;const u=o[l.data.baseData.prop];l.data.baseData.fieldShow=(u==null?void 0:u.fieldShow)??!1,l.data.baseData.userFieldShow=(u==null?void 0:u.userFieldShow)??l.data.baseData.isShow;const s=y._.get(l,"data.elData.groupAttrs.permissionsDict")||y._.get(l,"data.elData.attrs.permissionsDict");if(s&&((d=(c=e.form)==null?void 0:c.baseData)!=null&&d.isShowDictValue)){const m=JSON.parse(((f=n.dict_functions.find(b=>b.code===s))==null?void 0:f.json_data)||"[]"),h=y._.find(m,{is_default:"1",show:!0}),_=y._.get(l,"data.elData.groupAttrs.value")??y._.get(l,"data.elData.optionAttrs.value");let g=y._.get(h,_,"");const p=y._.get(e,`form.formData.${l.data.baseData.prop}`,""),v=y._.get(l,"data.elData.attrs.multiple"),w=!g.split(",").filter(Boolean).join(",");v&&!w&&(g=g.split(",")),y._.set(e,`form.formData.${l.data.baseData.prop}`,!l.data.baseData.isHideDictDefaultValue&&g||p)}if(u&&u.fieldChange&&(l.data.baseData.label=u.showName,y._.set(l,"data.elData.rules.required",u.fieldRequired??y._.get(l,"data.elData.rules.required",!1))),y._.get(l,"data.elData.rules.required")){const m=na.includes(l.data.baseData.el)?"请选择":"请输入",h=na.includes(l.data.baseData.el)?"change":"blur";if(y._.isEmpty(y._.get(l,"data.elData.rules.rules")))y._.set(l,"data.elData.rules.rules",[{required:!0,message:`${m}${u.showName}`,trigger:h}]);else{const _=y._.get(l,"data.elData.rules.rules"),g=_.split("=")[1];if(/string=/.test(_)&&g){const p=new Function("return "+g)(),[v]=p.filter(b=>(b==null?void 0:b.required)==!0||(b==null?void 0:b.required)==!1),w=v!=null&&v.required?p:[...p,{required:!0,message:`${m}${u.showName}`,trigger:h}];y._.set(l,"data.elData.rules.rules","string="+ys(w))}}}return l.data.baseData.el==="hs-select"&&y._.get(l,"data.elData.attrs.multiple")&&(y._.set(l,"data.elData.attrs.max-collapse-tags",1),y._.set(l,"data.elData.attrs.collapse-tags",!0),y._.set(l,"data.elData.attrs.collapse-tags-tooltip",!0)),l}))||[]}function dm(e,n,o){var i,l;const a=((i=o.field_functions.table[e.config_unique_id])==null?void 0:i.tables[n.id])||{};n.baseData.config_unique_id=e.config_unique_id;let r=((l=n.tableConfig)==null?void 0:l.map(u=>{var c;const s=a[u.data.field];return $t.includes(u.data.type)?(u.data.fieldShow=!0,u.data.userFieldShow=!0):(u.data.fieldShow=(s==null?void 0:s.fieldShow)??!1,u.data.userFieldShow=(s==null?void 0:s.userFieldShow)??u.data.isShow,u.data.field!=="btns"&&(s!=null&&s.fieldExport)&&(u.data.fieldExport=s.fieldExport)),s&&s.fieldChange&&(u.data.title=s.showName),u.btnData=((c=u.btnData)==null?void 0:c.map(d=>{var h;const m=(((h=a[u.data.field])==null?void 0:h.option)||[]).find(_=>_.fieldProp===d.data.key);return d.data.fieldShow=(m==null?void 0:m.fieldShow)??!1,d.data.userFieldShow=(m==null?void 0:m.userFieldShow)??d.data.isShow,d}))||[],u}))||[];return Br(r)}function Br(e){const n=e.reduce((a,r)=>(r.data.type&&y._.set(a,r.data.type,r),a),{}),o=$t.map(a=>{const r=y._.get(n,a);return r&&((r==null?void 0:r.data.type)==="checkbox"&&(r.data.align="center",r.data.headerAlign="center",r.data.title=""),r.data.fixed="left",r.data.width=50,r.data.minWidth=50),r}).filter(Boolean);return e=e.filter(a=>{var i,l,u;const r=!$t.includes(((i=a.data)==null?void 0:i.type)||"");return r&&((l=a.data)!=null&&l.title)&&((u=a.data)!=null&&u.field)&&(a.data.showHeaderOverflow="ellipsis"),r}),o.concat(vm(e)).map((a,r)=>({...a,sort:r}))}function fm(e,n){var o;return{...e,btns:hm(e.btns,e,n),form:((o=e.form)==null?void 0:o.map(a=>{if(a.formItemType==="form"){const r=a;return{...r,config:pm(r,e,n)}}else return a}))||[]}}function mm(e){var n,o;return{...e,btns:((n=e.btns)==null?void 0:n.map(a=>(a.data.fieldShow=!0,a.data.userFieldShow=!0,a)))||[],form:((o=e.form)==null?void 0:o.map(a=>{var r;if(a.formItemType==="form"){const i=a;return{...i,config:((r=i.config)==null?void 0:r.map(l=>(l.config=l.config.map(u=>(u.baseData.fieldShow=!0,u.baseData.userFieldShow=!0,u)),l)))||[]}}else return a}))||[]}}function hm(e,n,o){var r;const a=((r=o.field_functions.form[n.config_unique_id])==null?void 0:r.btns)||{};return(e==null?void 0:e.map(i=>{const l=a[i.data.key];return i.data.fieldShow=(l==null?void 0:l.fieldShow)??!1,i.data.userFieldShow=(l==null?void 0:l.userFieldShow)??i.data.isShow,l&&l.fieldChange&&(i.data.name=l.showName),i}))||[]}function pm(e,n,o){var r,i;const a=((r=o.field_functions.form[n.config_unique_id])==null?void 0:r.form)||{};return((i=e.config)==null?void 0:i.map(l=>{const[u]=l.config,s=a[u.baseData.prop];if(l.label=(s==null?void 0:s.showName)??l.label,s!=null&&s.fieldChange&&y._.set(u,"elData.rules.required",s.fieldRequired??y._.get(u,"elData.rules.required",!1)),y._.get(u,"elData.rules.required")){const c=na.includes(u.baseData.el)?"请选择":"请输入";if(y._.isEmpty(y._.get(u,"elData.rules.rules")))y._.set(u,"elData.rules.rules",[{required:!0,message:`${c}${l.label}`,trigger:["change","blur"]}]);else{const d=y._.get(u,"elData.rules.rules"),f=d.split("=")[1];if(/string=/.test(d)&&f){const m=new Function("return "+f)(),[h]=m.filter(g=>g.required),_=h!=null&&h.required?m:[...m,{required:!0,message:`${c}${l.label}`,trigger:["change","blur"]}];u.elData.rules="string="+ys(_)}}}return l.config=l.config.map(c=>{var m;const d=a[c.baseData.prop];c.baseData.fieldShow=(d==null?void 0:d.fieldShow)??!1,c.baseData.userFieldShow=(d==null?void 0:d.userFieldShow)??c.baseData.isShow;const f=y._.get(c,"elData.groupAttrs.permissionsDict")||y._.get(c,"elData.attrs.permissionsDict");if(f){const _=JSON.parse(((m=o.dict_functions.find(C=>C.code===f))==null?void 0:m.json_data)||"[]").find(C=>["true",!0].includes(C.show)&&C.is_default=="1"),g=y._.get(c,"elData.groupAttrs.value")??y._.get(c,"elData.optionAttrs.value"),p=y._.get(n,`data.${e.fieldID}.${c.baseData.prop}`,""),v=y._.get(c,"elData.attrs.multiple");let w=y._.get(_,g,"");const b=!w.split(",").filter(Boolean).join(",");v&&!b&&(w=w.split(",")),y._.set(n,`data.${e.fieldID}.${c.baseData.prop}`,w||p)}return c}),l}))||[]}function _m(e){const n=e!=null&&e.config_functions?JSON.parse(e.config_functions):[],o=e!=null&&e.dict_functions?JSON.parse(e.dict_functions):[],a=e!=null&&e.data_functions?JSON.parse(e.data_functions):[],r={},i={};return n.forEach(l=>{l.config_type==="1"&&(r[l.config_unique_id]=ni(l)),l.config_type==="2"&&(i[l.config_unique_id]=ni(l))}),{dict_functions:o,data_functions:a,field_functions:{table:r,form:i}}}function ni(e){const n={btns:Sa(e.btns),form:Sa(e.form),tables:{}};return e.tables.forEach(o=>{n.tables[o.id]=Sa(o.data)}),n}function Sa(e){const n={auth_data_func_01_000:e.filter(o=>o.fieldShow).map(o=>o.fieldProp)};return e.forEach(o=>{n[o.fieldProp]=o}),n}async function gm(e){var r;const n=await ce.get("userInfo"),o=e.mid||((r=ke())==null?void 0:r.mid),a=e.projectCode||n.project_code;return ba({...e,mid:o,projectCode:a,isAuth:e.isAuth??!0}).then(i=>e.type=="1"?i.data.table:i.data.form)}function yo(e=""){return{data:{},config_type:"2",config_name:"",config_unique_id:e,attrs:{},btns:[],form:[]}}function vm(e){const n=[],o={},a=r=>{for(let i of r)o[i.data.field]&&(i.children=o[i.data.field],a(i.children))};return y._.cloneDeep(e).forEach(r=>{r.data.parent_field?(o[r.data.parent_field]||(o[r.data.parent_field]=[]),o[r.data.parent_field].push(r)):(r.children=[],n.push(r))}),a(n),n}const ym=t.defineComponent({__name:"bcBox",props:{type:{},id:{},mid:{},uid:{},proxy:{},projectCode:{},isAuth:{type:Boolean,default:!0},closeLoading:{type:Boolean,default:!1},preParsing:{type:Boolean},unique:{type:Boolean}},emits:["ready","reset-attr","reset-ready"],setup(e,{emit:n}){const o=t.inject("popupApi",{}),a=n,r=e;let i=t.ref(!1);const l=t.ref(!1),u=t.ref(yo()),s=t.ref(),{bcBoxRef:c,start:d}=Pl("code",!1),f=()=>{typeof(o==null?void 0:o.setLoading)=="function"?o==null||o.setLoading(!0):l.value=!0},m=()=>{typeof(o==null?void 0:o.setLoading)=="function"?o==null||o.setLoading(!1):l.value=!1},h=t.ref({}),_=(k,N)=>h.value[k]=N,g=k=>k==="-1"?h.value:h.value[k];let p={dict_functions:[],data_functions:[],field_functions:{table:{},form:{}}};t.onBeforeMount(()=>{f(),nm(r).then(k=>{p=k.auth,k!=null&&k.data&&(u.value=k.data.form,s.value=k.data.table)})});async function v(k=!1){var x;r.type==="1"?s.value=void 0:u.value=yo(),un.value=!0,f();const N=await ce.get("userInfo"),$=r.projectCode||N.project_code,S=r.mid||((x=ke())==null?void 0:x.mid);return k?Bs({...r,mid:S,projectCode:$}).then(D=>{p=D.auth,D!=null&&D.data&&(u.value=D.data.form,s.value=D.data.table)}):ba({...r,mid:S,projectCode:$}).then(D=>{p=D.auth,D!=null&&D.data&&(u.value=D.data.form,s.value=D.data.table)})}function w(k){a("ready",k),t.nextTick(()=>{m(),d()})}function b(){return p}function C(k){i.value=k}function I(){m(),a("reset-attr")}function E(k){a("reset-ready",k)}return t.provide("bcBoxApi",{refreshData:v,getAuthData:b,setOptions:_,getOptions:g,isInitLoad:i,setInitLoad:C,showLoading:f,hideLoading:m,emitAttr:I,resetReady:E}),(k,N)=>{const $=t.resolveComponent("bc-table"),S=t.resolveComponent("bc-form"),x=t.resolveDirective("loading");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"bcBoxRef",ref:c,class:"box-wrapper"},[e.type==="1"?(t.openBlock(),t.createBlock($,t.mergeProps({key:0,data:s.value},k.$attrs,{isStatic:!1,onReady:w}),t.createSlots({_:2},[t.renderList(k.$slots,(D,B)=>({name:B,fn:t.withCtx(V=>[t.renderSlot(k.$slots,B,t.normalizeProps(t.guardReactiveProps(V||{})),void 0,!0)])}))]),1040,["data"])):t.createCommentVNode("",!0),e.type==="2"?(t.openBlock(),t.createBlock(S,t.mergeProps({key:1,data:u.value},k.$attrs,{onReady:w}),t.createSlots({_:2},[t.renderList(k.$slots,(D,B)=>({name:B,fn:t.withCtx(V=>[t.renderSlot(k.$slots,B,t.normalizeProps(t.guardReactiveProps(V||{})),void 0,!0)])}))]),1040,["data"])):t.createCommentVNode("",!0)])),[[x,!e.closeLoading&&l.value]])}}}),bm=P._export_sfc(ym,[["__scopeId","data-v-b4d55cca"]]),wm=t.defineComponent({__name:"bcRadio",props:{groupAttrs:{},field:{},uniqueId:{},mid:{},uid:{}},setup(e,{expose:n}){var d;const o=t.inject("bcBoxApi",{}),a=t.inject("bcFormApi",{}),r=e,i=t.ref(((d=r==null?void 0:r.groupAttrs)==null?void 0:d.options)||[]),l=t.computed({get(){var f;return i.value||((f=r==null?void 0:r.groupAttrs)==null?void 0:f.options)||[]},set(f){i.value=f}});u();async function u(f={}){var h,_,g,p,v;if((h=r==null?void 0:r.groupAttrs)!=null&&h.permissionsDict){const b=(await oo(r.mid,r.uid))[r.groupAttrs.permissionsDict]||[];y._.isEmpty(b)||(l.value=b,typeof(a==null?void 0:a.setOptionMap)=="function"&&(a==null||a.setOptionMap(r.field,b)),typeof(o==null?void 0:o.setOptions)=="function"&&(o==null||o.setOptions(r.field,b)));return}if(!((_=r==null?void 0:r.groupAttrs)!=null&&_.url))return;const m=(g=r==null?void 0:r.groupAttrs)!=null&&g.params?new Function("return "+((p=r==null?void 0:r.groupAttrs)==null?void 0:p.params))():{};return Object.assign(m,f),s((v=r==null?void 0:r.groupAttrs)==null?void 0:v.url,m)}function s(f,m={},h){var g,p;const _=Object.assign({menu_id:r.mid},m);return le({url:"/"+((g=r==null?void 0:r.groupAttrs)==null?void 0:g.proxy)+f,method:((p=r==null?void 0:r.groupAttrs)==null?void 0:p.method)||"get",params:_}).then(v=>{v&&(l.value=typeof h=="function"?h(y._.get(v,"data",[])):y._.get(v,"data",[]),typeof(a==null?void 0:a.setOptionMap)=="function"&&(a==null||a.setOptionMap(r.field,v.data)),typeof(o==null?void 0:o.setOptions)=="function"&&(o==null||o.setOptions(r.field,v.data)))})}function c(f){l.value=f}return n({setOption:c,fetchData:u,getOptionList:s}),(f,m)=>{const h=t.resolveComponent("el-radio"),_=t.resolveComponent("el-radio-group");return e.groupAttrs.isGroupEnabled?(t.openBlock(),t.createBlock(_,t.normalizeProps(t.mergeProps({key:1},e.groupAttrs)),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(g,p)=>{var v,w;return t.openBlock(),t.createBlock(h,{key:p,border:f.$attrs.isButtonEnabled,size:f.$attrs.size,disabled:g==null?void 0:g.disabled,label:g[(v=e.groupAttrs)==null?void 0:v.label],value:g[(w=e.groupAttrs)==null?void 0:w.value]},null,8,["border","size","disabled","label","value"])}),128))]),_:1},16)):(t.openBlock(),t.createBlock(h,{key:0}))}}}),km=t.defineComponent({__name:"bcCheckbox",props:{modelValue:{},groupAttrs:{},field:{},uniqueId:{},mid:{},uid:{}},emits:["update:modelValue"],setup(e,{expose:n,emit:o}){var h;const a=o,r=t.inject("bcBoxApi",{}),i=t.inject("bcFormApi",{}),l=e,u=t.computed({get(){return(l==null?void 0:l.modelValue)||[]},set(_){a("update:modelValue",_)}}),s=t.ref(((h=l==null?void 0:l.groupAttrs)==null?void 0:h.options)||[]),c=t.computed({get(){var _;return s.value||((_=l==null?void 0:l.groupAttrs)==null?void 0:_.options)||[]},set(_){s.value=_}});d();async function d(_={}){var p,v,w,b,C;if((p=l==null?void 0:l.groupAttrs)!=null&&p.permissionsDict){const E=(await oo(l.mid,l.uid))[l.groupAttrs.permissionsDict]||[];y._.isEmpty(E)||(c.value=E,typeof(i==null?void 0:i.setOptionMap)=="function"&&(i==null||i.setOptionMap(l.field,E)),typeof(r==null?void 0:r.setOptions)=="function"&&(r==null||r.setOptions(l.field,E)));return}if(!((v=l==null?void 0:l.groupAttrs)!=null&&v.url))return;const g=(w=l==null?void 0:l.groupAttrs)!=null&&w.params?new Function("return "+((b=l==null?void 0:l.groupAttrs)==null?void 0:b.params))():{};return Object.assign(g,_),f((C=l==null?void 0:l.groupAttrs)==null?void 0:C.url,g)}function f(_,g={},p){var w,b;const v=Object.assign({menu_id:l.mid},g);return le({url:"/"+((w=l==null?void 0:l.groupAttrs)==null?void 0:w.proxy)+_,method:((b=l==null?void 0:l.groupAttrs)==null?void 0:b.method)||"get",params:v}).then(C=>{C&&(c.value=typeof p=="function"?p(y._.get(C,"data",[])):y._.get(C,"data",[]),typeof(i==null?void 0:i.setOptionMap)=="function"&&(i==null||i.setOptionMap(l.field,C.data)),typeof(r==null?void 0:r.setOptions)=="function"&&(r==null||r.setOptions(l.field,C.data)))})}function m(_){c.value=_}return n({setOption:m,fetchData:d,getOptionList:f}),(_,g)=>{const p=t.resolveComponent("el-checkbox"),v=t.resolveComponent("el-checkbox-group");return e.groupAttrs.isGroupEnabled?(t.openBlock(),t.createBlock(v,{key:1,modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=w=>u.value=w)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(w,b)=>{var C,I;return t.openBlock(),t.createBlock(p,{key:b,border:_.$attrs.isButtonEnabled,size:_.$attrs.size,disabled:w==null?void 0:w.disabled,label:w[(C=e.groupAttrs)==null?void 0:C.label],value:w[(I=e.groupAttrs)==null?void 0:I.value]},null,8,["border","size","disabled","label","value"])}),128))]),_:1},8,["modelValue"])):(t.openBlock(),t.createBlock(p,{key:0}))}}}),Cm=(e,n)=>{var a,r;const o=Object.entries((r=(a=e.value)==null?void 0:a.$)==null?void 0:r.exposed);for(const[i,l]of o)n.exposed[i]=l},Em=(e,n,o)=>t.computed({get(){return new Proxy(e[n],{set(a,r,i){return Array.isArray(a)?(a[r]=i,o("update:"+n,[...a])):typeof a=="object"&&(a[r]=i,o("update:"+n,{...a})),!0}})},set(a){o("update:"+n,a)}});function Sm(){const e=t.ref();function n(){var o;return(o=e.value)==null?void 0:o.querySelector("input")}return{focusRef:e,activeElement:n}}function Vs(e,n={isIinit:!0}){const o=t.ref([]),a={};let r=!1;const i=()=>{if(r)return;r=!0;const u=(d,f,m)=>{d.forEach(h=>{h===f.key&&(a[h]=m)})},s=[],c=e.filter(d=>{const[f,m]=d;if(f.includes("+")){const h=f.split("+");return s.push([h,_=>{_.preventDefault(),u(h,_,0)},{dedupe:!0,eventName:"keyup"}]),s.push([h,_=>{u(h,_,1),h.every(g=>a[g]===1)&&m(_)},{dedupe:!0,eventName:"keydown"}]),!1}return!0});o.value=[...s,...c].map(d=>{const[f,m,h={}]=d;return P.onKeyStroke(f,m,Object.assign({dedupe:!0,eventName:"keydown"},h))})},l=()=>{r=!1,o.value.forEach(u=>u()),o.value=[]};return t.onMounted(()=>{n.isIinit&&i()}),t.onBeforeUnmount(()=>{l()}),{start:i,end:l}}const xm=Object.freeze(Object.defineProperty({__proto__:null,onKeyStroke:Pl,showPopupCount:Xn,useExposeProperties:Cm,useFocusElement:Sm,useKeyStroke:Vs,useVModel:Em},Symbol.toStringTag,{value:"Module"}));function Dm(e){const n=P.useActiveElement$1(),o=t.inject("bcFormApi"),a=t.shallowRef(),r=t.shallowRef(),i=t.shallowRef(),l=[];let u="";const s={root:-1};let c={};const d=Vs([["ArrowRight",m],["Tab",m],["ArrowLeft",h],["ArrowUp",_],["ArrowDown",g]],{isIinit:!1}),f=t.watch(n,S=>{var V,L,U,M,q,R;const x=S==null?void 0:S.closest(".el-form-item"),D=l.findIndex(Z=>Z===x);if(D>-1&&(s.root=D),!((V=n.value)!=null&&V.closest(".hs-form-wraper")))return;const B=(L=a.value)==null?void 0:L.closest(".el-tab-pane");if(B){B.style.display!=="none"&&(U=e.data)!=null&&U.config_name&&(Se.value=(M=y._.cloneDeep(e.data))==null?void 0:M.config_unique_id);return}(q=e.data)!=null&&q.config_name&&(Se.value=(R=y._.cloneDeep(e.data))==null?void 0:R.config_unique_id)});P.watchOnce(()=>{var S;return(S=e.data)==null?void 0:S.config_unique_id},()=>{var S;u=Se.value,e.data&&!((S=e.data)!=null&&S.isClosedKeyStroke)&&d.start(),setTimeout(()=>{if(i.value){o==null||o.getDataInstance().form.forEach(x=>{x.formItemType==="form"&&(c[x.fieldID]=x.grid)});for(let x in i.value){const B=i.value[x].querySelectorAll(".el-form-item");l.push(...B)}}},500)}),t.onActivated(()=>{var S;e.data&&!((S=e.data)!=null&&S.isClosedKeyStroke)&&d.start()}),t.onDeactivated(d.end),t.onBeforeUnmount(()=>{Se.value=u,f()});function m(S){var L,U,M;const{isSeelcted:x,selectionEnd:D}=w(n.value),B=n.value,V=((L=B.value)==null?void 0:L.length)||0;if(B.value&&x){B.setSelectionRange(V,V);return}D===V&&(S.preventDefault(),Se.value===((U=e.data)==null?void 0:U.config_unique_id)&&(M=n.value)!=null&&M.closest(".hs-form-wraper")&&(s.root++,s.root>l.length-1&&(s.root=0),C()))}function h(S){var V,L,U;const{isSeelcted:x,selectionStart:D}=w(n.value),B=n.value;if(B.value&&x){const M=((V=B.value)==null?void 0:V.length)||0;B.setSelectionRange(M,M);return}D===0&&(S.preventDefault(),Se.value===((L=e.data)==null?void 0:L.config_unique_id)&&(U=n.value)!=null&&U.closest(".hs-form-wraper")&&(s.root--,s.root<0&&(s.root=l.length-1),C()))}function _(S){var V,L,U,M;if(((V=n.value)==null?void 0:V.getAttribute("type"))==="number"||(S.preventDefault(),Se.value!==((L=e.data)==null?void 0:L.config_unique_id))||!((U=n.value)!=null&&U.closest(".hs-form-wraper")))return;const{fieldID:x,colSpan:D}=v((M=n.value)==null?void 0:M.closest(".el-form-item"));if(!x)return;const B=Number(c[x]);p(B-D,"up")?D>1&&D<B?s.root=s.root-B+D:s.root=s.root-Number(c[x]):s.root--,s.root<0&&(s.root=l.length-1),C()}function g(S){var V,L,U,M;if(((V=n.value)==null?void 0:V.getAttribute("type"))==="number"||(S.preventDefault(),Se.value!==((L=e.data)==null?void 0:L.config_unique_id))||!((U=n.value)!=null&&U.closest(".hs-form-wraper")))return;const{fieldID:x,colSpan:D}=v((M=n.value)==null?void 0:M.closest(".el-form-item"));if(!x)return;const B=Number(c[x]);D>1&&D<B?s.root=s.root+B-D:p(B,"down")?s.root=s.root+B:s.root++,s.root>l.length-1&&(s.root=0),C()}function p(S,x){const D=Array.from({length:S+1},(B,V)=>x==="down"?s.root+V:s.root-V).map(B=>v(l[B])).map(B=>B.colSpan);return D.every(B=>B===D[0])}function v(S){var U;const[x,D]=((U=[...(S==null?void 0:S.classList)||[]].find(M=>M.includes("__")))==null?void 0:U.split("__"))||[],B=l.findIndex(M=>M===S),{layoutData:V}=x?b(x,D):{},L=Number((V==null?void 0:V.colSpan)||1);return{fieldID:x,field:D,Index:B,colSpan:L}}function w(S){const x=(S.selectionEnd||0)>0&&S.selectionStart!==S.selectionEnd;return{selectionStart:S.selectionStart,selectionEnd:S.selectionEnd,isSeelcted:x}}function b(S,x){var V;let D={};if(!S)return D;const B=(V=o==null?void 0:o.getDataInstance().form)==null?void 0:V.find(L=>L.formItemType==="form"&&L.fieldID===S);if(B){for(let L in B.config)if(B.config[L].config[0].baseData.prop===x){D=B.config[L];break}}return D}function C(){var B,V;const S=(B=l[s.root])==null?void 0:B.querySelector("textarea"),x=(V=l[s.root])==null?void 0:V.querySelector("input"),D=S||x;D==null||D.focus()}function I(){return r.value}function E(S,x){setTimeout(()=>{const D=document.querySelector(`.${S}__${x} textarea`),B=document.querySelector(`.${S}__${x} input`),V=D||B;V==null||V.focus()},600)}const k=t.shallowRef({});function N(S,x,D){y._.set(k.value,`${x}_${D}`,S)}function $(S,x){return y._.get(k.value,`${S}_${x}`)}return{formRef:a,hsFormRef:r,formWrapRef:i,getInstance:I,setItemInstance:N,getItemInstance:$,setQueryFocus:E}}const Im={key:0,class:"btn-wraper"},Bm={key:0,class:"title"},Nm={key:0,class:"form-item-label__text"},$m={style:{"max-width":"450px"}},Vm={key:1,class:"form-item-label__text"},Tm={key:1,class:"slot-wraper"},Rm={class:"section_title"},Am={key:0,class:"title"},Lm={key:2,class:"component-wraper"},Mm={class:"section_title"},Om={key:0,class:"title"},qm=t.defineComponent({__name:"baseForm",props:{data:{}},emits:["field-change"],setup(e,{expose:n,emit:o}){const a=t.inject("bcFormApi"),r=e,i=o,{formRef:l,hsFormRef:u,formWrapRef:s,getInstance:c,setItemInstance:d,getItemInstance:f,setQueryFocus:m}=Dm(r);function h($){var S;return mt({...$.config[0].baseData,uniqueId:(S=r.data)==null?void 0:S.config_unique_id})}function _($){const S=$==null?void 0:$.config;return(S==null?void 0:S.filter(x=>h(x)))||[]}function g($){return $==null?void 0:$.config}function p($){return{...$,data:r.data}}function v($){return w($)}function w($){return{...$.baseData,...$.elData.attrs,...y._.omit($.elData,["attrs","rules"])}}function b($,S){$.fnName&&typeof $.fnName=="function"&&$.fnName(S)}function C($){const S=y._.get($,"config.0.elData.rules.rules");if(Array.isArray(S))return S;const x=y._.get($,"config.0.elData.rules");return Array.isArray(x)?x:[]}function I($,S,x="."){const D=y._.get($,"config.0.baseData.prop","");return`${S}${x}${D}`}function E($){return y._.get($,"config.0.baseData.tooltip","")}function k($){var S;return new Proxy((S=r.data)==null?void 0:S.data[$],{get:function(x,D,B){return Reflect.get(x,D,B)},set:function(x,D,B,V){const L=Reflect.get(x,D,V);return i("field-change",{target:x,key:D,value:B,oldValue:L,fieldID:$}),Reflect.set(x,D,B,V)}})}function N($,S){var D;function x(B){a==null||a.setData(S,B,$.baseData.prop)}return{row:new Proxy((D=r.data)==null?void 0:D.data[S],{get:function(B,V,L){return Reflect.get(B,V,L)},set:function(B,V,L,U){const M=Reflect.get(B,V,U);return i("field-change",{target:B,key:V,value:L,oldValue:M,fieldID:S}),Reflect.set(B,V,L,U)}}),data:r.data,fieldID:S,config:$,update:x}}return n({getInstance:c,getItemInstance:f,setQueryFocus:m}),($,S)=>{var U,M,q;const x=t.resolveComponent("bc-button"),D=t.resolveComponent("bc-icon"),B=t.resolveComponent("el-tooltip"),V=t.resolveComponent("el-form-item"),L=t.resolveComponent("el-form");return(U=e.data)!=null&&U.config_unique_id?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"formRef",ref:l,class:"base-form-wraper"},[((q=(M=e.data)==null?void 0:M.btns)==null?void 0:q.length)>0?(t.openBlock(),t.createElementBlock("div",Im,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data.btns,R=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:R.id},[t.unref(mt)({...R.data,uniqueId:e.data.config_unique_id})?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["btn_"+R.data.key,"btn-group"])},[R.data.isSlot?t.renderSlot($.$slots,"btn_"+R.data.key,t.mergeProps({key:0,ref_for:!0},R.data),void 0,!0):(t.openBlock(),t.createBlock(x,t.mergeProps({key:1,ref_for:!0},R.data,{onClick:Z=>b(R.data,e.data)}),null,16,["onClick"]))],2)):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0),t.createVNode(L,t.mergeProps({ref_key:"hsFormRef",ref:u,class:"el-form-wraper",model:e.data.data},e.data.attrs,{onSubmit:S[0]||(S[0]=t.withModifiers(()=>{},["prevent"]))}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data.form,(R,Z)=>{var O;return t.openBlock(),t.createElementBlock("div",{ref_for:!0,ref_key:"formWrapRef",ref:s,class:t.normalizeClass(["form-wrap",[R.fieldID]]),key:Z,style:t.normalizeStyle({"--bg-color":(O=R==null?void 0:R.attrs)==null?void 0:O.bg})},[R.formItemType==="form"&&!t.unref(y._).isEmpty(_(R))?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([`wrap_${R.fieldID}`])},[t.createElementVNode("div",{class:t.normalizeClass(["section_title",`title_${R.fieldID}`])},[R.isShowLabel?(t.openBlock(),t.createElementBlock("div",Bm,t.toDisplayString((R==null?void 0:R.label)||""),1)):t.createCommentVNode("",!0),t.renderSlot($.$slots,`title_${R.fieldID}`,{},void 0,!0)],2),t.createElementVNode("div",{class:"grid",style:t.normalizeStyle({"grid-template-columns":`repeat(${R.grid}, minmax(0, 1fr))`,"column-gap":R.attrs.columnGap+"px","row-gap":R.attrs.rowGap+"px"})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g(R),(z,j)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:j},[h(z)?(t.openBlock(),t.createBlock(V,{key:0,label:z.label,rules:C(z),prop:I(z,R.fieldID),class:t.normalizeClass([I(z,R.fieldID,"__")]),style:t.normalizeStyle({"--form-item-lable-bg":z.layoutData.labelBg,"--form-item-lable-text":z.layoutData.labelColor,"grid-row":`span ${z.layoutData.rowSpan}/span ${z.layoutData.rowSpan}`,"grid-column":`span ${z.layoutData.colSpan}/span ${z.layoutData.colSpan}`})},{label:t.withCtx(()=>{var T,Q;return[$.$slots[`${I(z,R.fieldID,"_")}`]?(t.openBlock(),t.createElementBlock("div",Vm,[t.renderSlot($.$slots,I(z,R.fieldID,"_"),t.mergeProps({ref_for:!0},N(z==null?void 0:z.config[0],R.fieldID)),void 0,!0)])):(t.openBlock(),t.createElementBlock("div",Nm,[t.createElementVNode("span",null,t.toDisplayString(z.label),1),E(z)?(t.openBlock(),t.createBlock(B,{key:0,effect:"dark",placement:"top"},{content:t.withCtx(()=>[t.createElementVNode("div",$m,t.toDisplayString(E(z)),1)]),default:t.withCtx(()=>[t.createVNode(D,{class:"ml-1",name:"ele-QuestionFilled"})]),_:2},1024)):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(((Q=(T=e.data)==null?void 0:T.attrs)==null?void 0:Q.labelSuffix)||""),1)]))]}),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z==null?void 0:z.config,(T,Q)=>{var te;return t.openBlock(),t.createElementBlock("div",{class:"bc-form-item",key:Q},[T.baseData.isSlot?t.renderSlot($.$slots,T.baseData.prop,t.mergeProps({key:0,ref_for:!0},N(T,R.fieldID)),void 0,!0):T.baseData.el==="el-button"?(t.openBlock(),t.createBlock(x,t.mergeProps({key:1,ref_for:!0},w(T)),null,16)):(te=R==null?void 0:R.attrs)!=null&&te.readonly?(t.openBlock(),t.createBlock(B,{key:2,content:k(R.fieldID)[T.baseData.prop],placement:"top",effect:"light"},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(["cell_"+T.baseData.prop,"readonly-cell"])},t.toDisplayString(k(R.fieldID)[T.baseData.prop]),3)]),_:2},1032,["content"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(bs)(T.baseData)),t.mergeProps({key:3,ref_for:!0,ref:W=>t.unref(d)(W,R.fieldID,T.baseData.prop),modelValue:k(R.fieldID)[T.baseData.prop],"onUpdate:modelValue":W=>k(R.fieldID)[T.baseData.prop]=W},{ref_for:!0},v(T),{field:T.baseData.prop,"unique-id":e.data.config_unique_id,mid:e.data.mid,uid:e.data.uid}),null,16,["modelValue","onUpdate:modelValue","field","unique-id","mid","uid"]))])}),128))]),_:2},1032,["label","rules","prop","class","style"])):t.createCommentVNode("",!0)],64))),128))],4)],2)):t.createCommentVNode("",!0),R.formItemType==="slot"?(t.openBlock(),t.createElementBlock("div",Tm,[t.createElementVNode("div",Rm,[R.isShowLabel?(t.openBlock(),t.createElementBlock("div",Am,t.toDisplayString((R==null?void 0:R.label)||""),1)):t.createCommentVNode("",!0),t.renderSlot($.$slots,`title_${R.fieldID}`,{},void 0,!0)]),t.renderSlot($.$slots,R.config.name,t.mergeProps({ref_for:!0},p(R)),void 0,!0)])):t.createCommentVNode("",!0),R.formItemType==="component"?(t.openBlock(),t.createElementBlock("div",Lm,[t.createElementVNode("div",Mm,[R.isShowLabel?(t.openBlock(),t.createElementBlock("div",Om,t.toDisplayString((R==null?void 0:R.label)||""),1)):t.createCommentVNode("",!0),t.renderSlot($.$slots,`title_${R.fieldID}`,{},void 0,!0)]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(R.config.name),t.mergeProps({ref_for:!0},p(R)),null,16))])):t.createCommentVNode("",!0)],6)}),128))]),_:3},16,["model"])],512)):t.createCommentVNode("",!0)}}}),zm=P._export_sfc(qm,[["__scopeId","data-v-4d64822a"]]),Pm=t.defineComponent({__name:"bcForm",props:{data:{},closeLoading:{type:Boolean}},emits:["ready","destroy"],setup(e,{emit:n}){const o=e,a=n,r=t.inject("bcBoxApi",{}),i=t.inject("popupApi",{});let l={},u={},s={};const c=t.ref(!1),d=t.ref(),f=t.shallowRef(),m=t.ref({}),h=(T,Q)=>m.value[T]=Q,_=T=>T==="-1"?m.value:m.value[T],g=()=>o.data.config_unique_id,p=()=>{var T;return(T=f.value)==null?void 0:T.getInstance()},v=(T,Q)=>{var te;return(te=f.value)==null?void 0:te.getItemInstance(T,Q)},w=(T,Q)=>{var te;return(te=f.value)==null?void 0:te.setQueryFocus(T,Q)},b=T=>{var te,W,K;const Q=xs(d.value);for(let Y in(te=d.value)==null?void 0:te.data)d.value.data[Y][Vt]=Q;return T?(W=d.value)==null?void 0:W.data[T]:(K=d.value)==null?void 0:K.data},C=()=>Ko([{getData:b}]),I=(T,Q,te)=>{const W=T.split(".");return W.length>1&&y._.has(d.value.data,T)?y._.set(d.value.data,W,Q):te?d.value.data[T][te]=Q:y._.set(d.value.data,T,Q),t.nextTick()},E=(T,Q,te=["id"])=>(Er(d.value.data[T],Q,te),t.nextTick()),k=(T,Q=["id"])=>{const te=Object.assign(y._.cloneDeep(s),T),W=y._.keys(d.value.data);return W.forEach(K=>{y._.keys(d.value.data[K]).forEach(Y=>{Object.assign(d.value.data[K],{[Y]:te[Y]})})}),Q.forEach(K=>{Object.assign(d.value.data[W[0]],{[K]:te[K]})}),t.nextTick()},N=T=>d.value.btns.find(Q=>Q.data.key===T),$=(T,Q=!0)=>{const te=Array.isArray(T)?T:[T],W=d.value.btns.reduce((K,Y)=>(y._.set(K,Y.data.key,Y),K),{});te.forEach(K=>{const Y=y._.get(W,K);Y&&(Y.data.isShow=!Q)})},S=(T,Q=!0)=>{const te=Array.isArray(T)?T:[T],W=d.value.btns.reduce((K,Y)=>(y._.set(K,Y.data.key,Y),K),{});te.forEach(K=>{const Y=y._.get(W,K);Y&&(Y.data.disabled=Q)})},x=(T,Q)=>{var W;const te=d.value.form.find(K=>K.formItemType==="form"&&K.fieldID===T);if(te){let K=y._.cloneDeep(y._.get(te.config,"0.config.0"));for(let Y in te.config){const ae=(W=te.config[Y].config)==null?void 0:W.find(re=>re.baseData.prop===Q);if(ae){K=ae;break}}return K}},D=(T,Q)=>{var W;const te=d.value.form.find(K=>K.formItemType==="form"&&K.fieldID===T);if(te){let K=y._.cloneDeep(y._.get(te.config,"0.layoutData"));for(let Y in te.config)if((W=te.config[Y].config)==null?void 0:W.find(re=>re.baseData.prop===Q)){K=te.config[Y].layoutData;break}return K}},B=(T,Q,te=!0)=>{const W=Array.isArray(Q)?Q:[Q],K=d.value.form.find(ae=>ae.formItemType==="form"&&ae.fieldID===T);if(!K)return;const Y=K.config.reduce((ae,re)=>{const[fe]=re.config;return y._.set(ae,fe.baseData.prop,fe),ae},{});W.forEach(ae=>{const re=y._.get(Y,ae);re&&(re.baseData.isShow=!te)})},V=(T,Q,te=!0)=>{const W=Array.isArray(Q)?Q:[Q],K=d.value.form.find(ae=>ae.formItemType==="form"&&ae.fieldID===T);if(!K)return;const Y=K.config.reduce((ae,re)=>{const[fe]=re.config;return y._.set(ae,fe.baseData.prop,fe),ae},{});W.forEach(ae=>{const re=y._.get(Y,ae);re&&(re.elData.attrs.disabled=te)})},L=(T,Q,te=!0)=>{const W=Array.isArray(Q)?Q:[Q],K=d.value.form.find(ae=>ae.formItemType==="form"&&ae.fieldID===T);if(!K)return;const Y=K.config.reduce((ae,re)=>{const[fe]=re.config;return y._.set(ae,fe.baseData.prop,fe),ae},{});W.forEach(ae=>{const re=y._.get(Y,ae);if(re){const fe=na.includes(re.baseData.el)?"请选择":"请输入"+re.baseData.label;y._.set(re,"elData.rules",te?[{required:!0,message:fe,trigger:["change","blur"]}]:[])}})},U=(T=0)=>T===-1?Object.keys(d.value.data):Object.keys(d.value.data)[T],M=()=>d.value,q=T=>r==null?void 0:r.getOptions(T),R=()=>{typeof(r==null?void 0:r.showLoading)=="function"?r==null||r.showLoading():typeof(i==null?void 0:i.setLoading)=="function"?i==null||i.setLoading(!0):c.value=!0},Z=()=>{typeof(r==null?void 0:r.hideLoading)=="function"?r==null||r.hideLoading():typeof(i==null?void 0:i.setLoading)=="function"?i==null||i.setLoading(!1):c.value=!1};function O(T){var Q,te,W;return(W=(te=(Q=f.value)==null?void 0:Q.getInstance())==null?void 0:te.validate())==null?void 0:W.then(()=>{const K=d.value.attrs,Y=d.value.attrs.action_name||d.value.config_name,ae=y._.isEmpty(T)?{...Ko([{getData:b}]),other_log_info:{title:Y}}:{...T,other_log_info:{title:Y}},re={url:"/"+K.proxy+K.submitUrl,method:K.method};return K.method==="get"?re.params=ae:re.data=ae,R(),le(re).finally(()=>{Z()})})}P.watchOnce(()=>{var T;return(T=d.value)==null?void 0:T.config_unique_id},()=>{t.nextTick(()=>{const T=Jf(y._.cloneDeep(d.value)),Q=t.computed(()=>d.value.data),te=Ko([{getData:b}]);s=y._.omit(te,Vt),Z(),a("ready",{data:Q,configData:T,getData:b,getFullData:C,getConfigId:g,setData:I,mergeData:E,merageAllData:k,getInstance:p,getBtnConfig:N,getItemInstance:v,getItemLayout:D,setQueryFocus:w,hideBtn:$,hideItem:B,setBtnDisabled:S,setItemDisabled:V,setItemRequired:L,formData:d,dataInstance:d,getDataInstance:M,getItemConfig:x,getFieldID:U,submit:O,getOptions:q,showLoading:R,hideLoading:Z,setOptionMap:h,getOptionMap:_})})}),P.watchOnce(()=>{var T;return(T=d.value)==null?void 0:T.data},T=>{t.nextTick(()=>{l=y._.cloneDeep(T)})});const z=t.watch(()=>{var T;return(T=o.data)==null?void 0:T.config_unique_id},T=>{T&&(d.value=aa(o.data))},{immediate:!0});function j(T){var Q,te;(T.includes(((Q=o==null?void 0:o.data)==null?void 0:Q.mid)||"")||T.length==0)&&(u=y._.cloneDeep(d.value.data),(te=p())==null||te.clearValidate(),d.value.data=y._.cloneDeep(l))}return an.on("closeTabs",j),t.onUnmounted(()=>{z(),an.off("closeTabs",j)}),t.onBeforeMount(()=>{o.closeLoading||R()}),t.onBeforeUnmount(()=>{var T;a("destroy",y._.isEmpty(u)?y._.cloneDeep((T=d.value)==null?void 0:T.data):y._.cloneDeep(u))}),t.provide("bcFormApi",{getData:b,setData:I,getInstance:p,getConfigId:g,getDataInstance:M,getItemConfig:x,getOptions:q,setOptionMap:h,getOptionMap:_}),(T,Q)=>{const te=t.resolveDirective("loading");return t.withDirectives((t.openBlock(),t.createBlock(zm,t.mergeProps({ref_key:"baseFormRef",ref:f},T.$attrs,{data:d.value}),t.createSlots({_:2},[t.renderList(T.$slots,(W,K)=>({name:K,fn:t.withCtx(Y=>[t.renderSlot(T.$slots,K,t.normalizeProps(t.guardReactiveProps(Y||{})),void 0,!0)])}))]),1040,["data"])),[[te,c.value]])}}}),Fm=P._export_sfc(Pm,[["__scopeId","data-v-a91e3d20"]]),jm={class:"search-btn"},Um={class:"item-wrap"},Hm=t.defineComponent({__name:"btn",props:{btns:{default:()=>[]},uniqueId:{},mid:{},uid:{}},setup(e){const n=t.inject("bcTableApi");function o(a){if(a.fnName&&typeof a.fnName=="function")return a["loading-icon"]!=="Loading"&&(n==null||n.setBtnKey(a.key)),a.fnName()}return(a,r)=>{const i=t.resolveComponent("bc-button");return t.openBlock(),t.createElementBlock("div",jm,[t.createElementVNode("div",Um,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.btns,l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l.id},[t.unref(mt)({...l.data,uniqueId:e.uniqueId})?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["btn_"+l.data.key,"btn-group"])},[l.data.isSlot?t.renderSlot(a.$slots,"btn_"+l.data.key,t.mergeProps({key:0,ref_for:!0},l.data),void 0,!0):(t.openBlock(),t.createBlock(i,t.mergeProps({key:1,ref_for:!0},l.data,{onClick:u=>o(l.data)}),null,16,["onClick"]))],2)):t.createCommentVNode("",!0)],64))),128)),t.renderSlot(a.$slots,"extend-btn",{},void 0,!0)])])}}}),Wm=P._export_sfc(Hm,[["__scopeId","data-v-bf3a6384"]]);function Km(e,n){const o=[];let a=r();function r(){return t.watch(P.useActiveElement$1(),u=>{var m,h,_,g,p,v;const s=y._.find((m=u==null?void 0:u.closest(".el-form-item"))==null?void 0:m.classList,w=>w.includes("query_"));if(!s)return;const c=s.replace("query_",""),d=(h=e.value)==null?void 0:h.find(w=>w.data.baseData.prop===c);!d||y._.find(o,w=>u===w)||(_=u==null?void 0:u.classList)!=null&&_.contains("el-select__input")||(g=u==null?void 0:u.classList)!=null&&g.contains("el-select__wrapper")||((v=(p=d.data)==null?void 0:p.baseData)==null?void 0:v.el2)!="hs-date-picker"&&(d.data.baseData.isCloseQuickSearch||(o.push(u),u==null||u.addEventListener("keydown",w=>{w.key==="Enter"&&n()})))})}function i(){l(),a=r()}function l(){a(),y._.forEach(o,u=>{u==null||u.removeEventListener("keydown",n)}),o.length=0}return t.onBeforeUnmount(()=>{l()}),{unwatch:l,resetwatch:i}}const Zm={class:"bc-form__wrapper"},Jm={class:"bc-form__btn"},oi=1280,ai=1024,ri=768,Gm=640,Qm=t.defineComponent({__name:"query",props:{baseData:{},formConfig:{},formData:{},uniqueId:{},mid:{},uid:{},columnNum:{default:4},hideCollapseBtn:{type:Boolean,default:!1}},setup(e,{expose:n}){const o=e,a=t.inject("bcTableApi",{}),r=t.shallowRef(),i=t.shallowRef(),l=t.shallowRef({}),u=t.computed({get:()=>k(),set:()=>{}}),s=t.ref(o.hideCollapseBtn),{width:c}=P.useWindowSize$1(),d=t.ref(o.columnNum),f=t.computed(()=>{var B;return((B=o.formConfig)==null?void 0:B.filter(V=>mt({...V.data.baseData,uniqueId:o.uniqueId})))||[]}),m=t.ref([]);let h="";const _=y._.throttle(v,300),g=t.watch([c,()=>f.value],()=>{_(c.value)},{immediate:!0}),{resetwatch:p}=Km(f,$);t.onBeforeUnmount(()=>{g()});function v(B){t.nextTick(()=>{var L,U;const V=((U=(L=r.value)==null?void 0:L.closest(".vxe-modal--body"))==null?void 0:U.offsetWidth)||B;if(s.value){m.value=w(-1);return}if(V>oi){d.value=o.columnNum,m.value=w(d.value);return}if(V>ai&&V<=oi){d.value=o.columnNum>3?o.columnNum-1:o.columnNum,m.value=w(d.value);return}if(V>ri&&V<=ai){d.value=o.columnNum>3?o.columnNum-2:o.columnNum,m.value=w(d.value);return}if(V>Gm&&V<=ri){d.value=o.columnNum>3?o.columnNum-3:o.columnNum,m.value=w(d.value);return}d.value=1,m.value=w(d.value)})}function w(B){return B===-1?f.value:f.value.slice(0,B)}function b(B){return{...y._.omit(B.baseData,["el","el2","groupField","isSlot","isAuth","isApply","isShow","complexType","baseType","groupMark","positionInGroup","rules","shortcut","isSetDictDefaultValue","isSupportShortcutKey","isVerifySearch","isQuickSearch","isClosedKeyStroke","isReverseBtn","isHidecollapseBtn"]),...B.elData.rules}}function C(B){return y._.omit({...B.data.elData,shortcut:y._.get(B,"data.baseData.shortcut","")},"rules")}function I(){t.nextTick(()=>{s.value=!s.value,v(c.value),setTimeout(()=>{p()})})}function E(){s.value=!1}function k(){return m.value.map(B=>y._.get(l.value,B.data.baseData.prop))}function N(){return i.value}function $(){setTimeout(()=>{a==null||a.search()})}function S(B,V){if(B){h=o.formData[V.baseData.prop];return}o.baseData.isQuickSearch&&(V.baseData.isCloseQuickSearch||h!==o.formData[V.baseData.prop]&&(a==null||a.search()))}function x(B,V){y._.get(l.value,V)||y._.set(l.value,V,B)}function D(B){return y._.get(l.value,B)}return t.provide("setItemInstance",x),n({componentRef:u,getComponents:k,getInstance:N,hideShowAll:E,getItemInstance:D}),(B,V)=>{const L=t.resolveComponent("el-form-item"),U=t.resolveComponent("el-form"),M=t.resolveComponent("el-button");return t.openBlock(),t.createElementBlock("div",{class:"bc-form-search",ref_key:"wrapRef",ref:r},[t.createElementVNode("div",Zm,[t.createVNode(U,t.mergeProps({ref_key:"hsFormRef",ref:i},e.baseData,{model:e.formData,class:"bc-form",style:{"grid-template-columns":`repeat(${d.value}, minmax(0, 1fr))`},onSubmit:V[0]||(V[0]=t.withModifiers(()=>{},["prevent"]))}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,q=>(t.openBlock(),t.createBlock(L,t.mergeProps({key:q.id},{ref_for:!0},b(q.data),{class:`query_${q.data.baseData.prop}`,prop:q.data.baseData.prop}),{default:t.withCtx(()=>[q.data.baseData.isSlot?t.renderSlot(B.$slots,`query_${q.data.baseData.prop}`,t.mergeProps({key:0,ref_for:!0},{row:e.formData}),void 0,!0):q.data.baseData.el==="bc-group"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(q.data.baseData.el),t.mergeProps({key:1,"el-component":q.data.baseData.el2,"field-component":q.data.baseData.groupField,value:e.formData,field:q.data.baseData.prop,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid},{ref_for:!0},C(q),{onVisibleChange:R=>S(R,q.data)}),null,16,["el-component","field-component","value","field","uniqueId","mid","uid","onVisibleChange"])):q.data.baseData.prop&&q.data.baseData.el?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(q.data.baseData.el),t.mergeProps({key:2,modelValue:e.formData[q.data.baseData.prop],"onUpdate:modelValue":R=>e.formData[q.data.baseData.prop]=R,field:q.data.baseData.prop,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid},{ref_for:!0},C(q),{onVisibleChange:R=>S(R,q.data)}),null,16,["modelValue","onUpdate:modelValue","field","uniqueId","mid","uid","onVisibleChange"])):t.createCommentVNode("",!0)]),_:2},1040,["class","prop"]))),128))]),_:3},16,["model","style"]),t.createElementVNode("div",Jm,[f.value.length>d.value&&!o.hideCollapseBtn?(t.openBlock(),t.createBlock(M,{key:0,size:"small",type:"primary",icon:m.value.length===f.value.length&&s.value?t.unref(P.arrow_up_bold_default):t.unref(P.arrow_down_bold_default),circle:"",onClick:I},null,8,["icon"])):t.createCommentVNode("",!0),t.renderSlot(B.$slots,"query-setting",{},void 0,!0)])]),V[1]||(V[1]=t.createElementVNode("div",{class:"h-4 divide"},null,-1))],512)}}}),Ym=P._export_sfc(Qm,[["__scopeId","data-v-9b7f44bc"]]),Xm={class:"bc-form__wrapper"},eh={class:"bc-form__btn"},th=t.defineComponent({__name:"drag",props:{baseData:{},formData:{},formConfig:{},uniqueId:{},mid:{},uid:{},columnNum:{default:4}},emits:["update:formConfig"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.shallowRef(),l=t.shallowRef(),u=t.shallowRef(null),s=t.computed(()=>a.columnNum<=4?4:a.columnNum),c=t.computed({get(){return a.formConfig.filter(_=>mt({..._.data.baseData,uniqueId:a.uniqueId}))},set(_){const g=a.formConfig.filter(p=>!mt({...p.data.baseData,uniqueId:a.uniqueId}));r("update:formConfig",[..._,...g])}});function d(_){return y._.omit({..._.data.elData,shortcut:y._.get(_,"data.baseData.shortcut","")},"rules")}function f(_){return{...y._.omit(_.baseData,["el","isSlot","isAuth","isApply","isShow"]),..._.elData.rules}}function m(){return u.value||[]}function h(){return l.value}return n({componentRef:u,getComponents:m,getInstance:h}),(_,g)=>{const p=t.resolveComponent("el-form-item"),v=t.resolveComponent("el-form");return t.openBlock(),t.createBlock(v,t.mergeProps({ref_key:"hsFormRef",ref:l},e.baseData,{model:e.formData}),{default:t.withCtx(()=>[t.createElementVNode("div",Xm,[t.createVNode(t.unref(P.to),{class:"bc-form bc-form-drag",style:t.normalizeStyle({"grid-template-columns":`repeat(${s.value}, minmax(0, 1fr))`}),ref_key:"dragRef",ref:i,handle:".el-form-item__label",ghostClass:"ghost",modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=w=>c.value=w),animation:150},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,w=>(t.openBlock(),t.createBlock(p,t.mergeProps({key:w.id},{ref_for:!0},f(w.data),{class:`query_${w.data.baseData.prop}`}),{default:t.withCtx(()=>[w.data.baseData.isSlot?t.renderSlot(_.$slots,`query_${w.data.baseData.prop}`,t.mergeProps({key:0,ref_for:!0},{row:e.formData}),void 0,!0):w.data.baseData.el==="bc-group"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(w.data.baseData.el),t.mergeProps({key:1,ref_for:!0,ref_key:"componentRef",ref:u,"el-component":w.data.baseData.el2,"field-component":w.data.baseData.groupField,value:e.formData,field:w.data.baseData.prop,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid},{ref_for:!0},d(w)),null,16,["el-component","field-component","value","field","uniqueId","mid","uid"])):w.data.baseData.prop&&w.data.baseData.el?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(w.data.baseData.el),t.mergeProps({key:2,ref_for:!0,ref_key:"componentRef",ref:u,modelValue:e.formData[w.data.baseData.prop],"onUpdate:modelValue":b=>e.formData[w.data.baseData.prop]=b,field:w.data.baseData.prop,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid},{ref_for:!0},d(w)),null,16,["modelValue","onUpdate:modelValue","field","uniqueId","mid","uid"])):t.createCommentVNode("",!0)]),_:2},1040,["class"]))),128))]),_:3},8,["style","modelValue"]),t.createElementVNode("div",eh,[t.renderSlot(_.$slots,"query-setting",{},void 0,!0)])]),g[1]||(g[1]=t.createElementVNode("div",{class:"h-4 divide"},null,-1))]),_:3},16,["model"])}}}),nh=P._export_sfc(th,[["__scopeId","data-v-e91b7aba"]]),oh={class:"sort-form-wraper"},ah={class:"sort-form-wraper__content"},rh={class:"content__wrap"},ih={class:"sort-target drag li"},lh={class:"li name"},sh={class:"li status"},ch={class:"li index"},uh={class:"custome-footer"},dh={class:"custome-footer-item"},fh={class:"color-picker"},mh={class:"custome-footer-item"},hh={class:"custome-footer-item"},ph={class:"footer"},_h={class:"footer-confirm"},gh=t.defineComponent({__name:"sortColumn",props:{uniqueId:{},mid:{},id:{},uid:{},close:{type:Function},refreshData:{type:Function},getReportBaseConfig:{type:Function},proxy:{},batchId:{},resetReady:{type:Function}},setup(e){let n="",o=[];const a=t.shallowRef();let r=!1;const{elementY:i,isOutside:l}=P.useMouseInElement(a),u=t.ref(!1),s=e,c=t.ref([]),d=t.ref(!1),f=t.reactive({_color:{},_stripe:{},_border:{}}),m=t.computed(()=>c.value.filter(E=>!$t.includes(E.data.type)).filter(E=>E.data.isShow).filter(E=>E.data.fieldShow).filter(E=>!E.data.fixed).map(E=>E.data.field)),h=t.computed({get(){return d.value?c.value.filter(E=>!$t.includes(E.data.type)).filter(E=>E.data.isShow).filter(E=>!E.data.fixed):c.value.filter(E=>!$t.includes(E.data.type)).filter(E=>E.data.isShow).filter(E=>E.data.fieldShow).filter(E=>!E.data.fixed)},set(E){const k=JSON.parse(JSON.stringify(E)),N=JSON.parse(JSON.stringify(c.value));let $=[];d.value?$=N.filter(S=>!!S.data.fixed||!S.data.isShow||$t.includes(S.data.type)):$=N.filter(S=>!!S.data.fixed||!S.data.isShow||!S.data.fieldShow||$t.includes(S.data.type)),$.map(S=>N.findIndex(x=>x.id===S.id)).forEach((S,x)=>{k.splice(S,0,$[x])}),k.map((S,x)=>(S.sort=x+1,S)).sort((S,x)=>S.sort-x.sort),c.value=k,o=k}});t.watch(i,()=>{if(l.value&&r){const E=document.querySelector(".drag-component");i.value<0?E.scrollTop=0:E.scrollTop=E.scrollHeight}}),g();function _(E){r=E,p()}function g(){return Te({mid:s.mid,id:s.uniqueId,uid:s.uid},s.batchId?`batch_${s.batchId}`:"").then(async E=>{var S;if(!E)return A.ElMessageBox.alert("数据权限已更新是否刷新?","提示",{}).then(()=>{s==null||s.refreshData(),s.close()}),Promise.reject();const k=s.batchId?`table.${s.uniqueId}`:"table";n=(S=y._.get(E,k))==null?void 0:S.project_code;const{tableConfig:N}=y._.get(E,k).tables.find(x=>x.id===s.id),$=await Te({mid:s.mid,id:s.uniqueId,uid:s.uid},s.id);return f._color[s.id]=y._.get($,`_baseconfig._color.${s.id}`,"#000"),y._.get(E,k).tables.forEach(x=>{f._stripe[x.id]=x.baseData.stripe??!1,f._border[x.id]=x.baseData.border??"full"}),c.value=N.filter(x=>!x.data.type),setTimeout(()=>{typeof(s==null?void 0:s.resetReady)=="function"&&(s==null||s.resetReady()),p()}),Promise.resolve()})}function p(){setTimeout(()=>{Array.from(document.querySelectorAll(".sort-target__wraper")).filter(E=>!E.classList.contains("hide")).forEach((E,k)=>{y._.set(E.lastChild,"innerText",k+1)})})}async function v(){var $,S,x,D;if(typeof s.getReportBaseConfig=="function")return w();u.value=!0,await br({table_id:s.id,uid:s.uid},{});const E=await le({url:"/scmp-web/api/get_biz_field_config",method:"get",params:{menu_id:s.mid,config_type:"1",config_unique_id:s.uniqueId,project_code:n}}),k=await zl(s.mid,s.uid),[N]=(($=E.data)==null?void 0:$.map(B=>JSON.parse(B.business_json)))||[];if(N){const B=y._.get(k,`table.${s.uniqueId}.tables.${s.id}`);N.tables.forEach(L=>{f._color[L.id]="#000",f._stripe[L.id]=L.baseData.stripe??!0,f._border[L.id]=L.baseData.border??"full"});const V=(D=(x=(S=N.tables)==null?void 0:S.find(L=>L.id===s.id))==null?void 0:x.tableConfig)==null?void 0:D.reduce((L,U)=>{var M,q,R;return L[U.id]={sort:U.sort,title:y._.get(B,`${U.data.field}.showName`,(M=U.data)==null?void 0:M.title),columnWidth:(q=U.data)==null?void 0:q.width,minWidth:(R=U.data)==null?void 0:R.minWidth},L},{});c.value=c.value.map(L=>{var U,M,q,R;return L.sort=((U=V==null?void 0:V[L.id])==null?void 0:U.sort)??0,L.data.title=((M=V==null?void 0:V[L.id])==null?void 0:M.title)??L.data.title,L.data.width=(q=V==null?void 0:V[L.id])==null?void 0:q.columnWidth,L.data.minWidth=(R=V==null?void 0:V[L.id])==null?void 0:R.minWidth,L.data.showHeaderOverflow="ellipsis",L.data.userFieldShow=!0,L}).sort((L,U)=>L.sort-U.sort)}d.value=!0,u.value=!1}function w(){typeof s.getReportBaseConfig=="function"&&(u.value=!0,s.getReportBaseConfig().then(E=>{var N,$,S;if(!E)return;E.tables.forEach(x=>{f._color[x.id]="#000",f._stripe[x.id]=x.baseData.stripe??!0,f._border[x.id]=x.baseData.border??"full"});const k=(S=($=(N=E.tables)==null?void 0:N.find(x=>x.id===s.id))==null?void 0:$.tableConfig)==null?void 0:S.reduce((x,D)=>{var B,V,L;return x[D.data.field]={sort:D.sort,title:(B=D.data)==null?void 0:B.title,columnWidth:(V=D.data)==null?void 0:V.width,minWidth:(L=D.data)==null?void 0:L.minWidth},x},{});c.value=c.value.map(x=>{var D,B,V,L;return x.sort=((D=k==null?void 0:k[x.data.field])==null?void 0:D.sort)??0,x.data.title=((B=k==null?void 0:k[x.data.field])==null?void 0:B.title)??x.data.title,x.data.width=(V=k==null?void 0:k[x.data.field])==null?void 0:V.columnWidth,x.data.minWidth=(L=k==null?void 0:k[x.data.field])==null?void 0:L.minWidth,x.data.showHeaderOverflow="ellipsis",x.data.userFieldShow=!0,x}).sort((x,D)=>x.sort-D.sort)}).finally(()=>{u.value=!1}))}function b(){return le({url:`/${n}-web/pri/v2/field_user/clear_user_field`,method:"post",data:{config_unique_id:s.uniqueId,menu_id:s.mid,table_id:s.id}}).then(async()=>Ae({mid:s.mid,id:s.uniqueId,uid:s.uid},{},s.id))}async function C(){return Te({mid:s.mid,id:s.uniqueId,uid:s.uid},s.batchId?`batch_${s.batchId}`:"").then(E=>{const k=s.batchId?`table.${s.uniqueId}`:"table";y._.get(E,k).tables=y._.get(E,k).tables.map(S=>(S.baseData.stripe=f._stripe[S.id],S.baseData.border=f._border[S.id],S));const N=y._.get(E,k).tables.find(S=>S.id===s.id),$=N.tableConfig.filter(S=>S.data.type);N.tableConfig=y._.cloneDeep([...$,...c.value]),o=y._.cloneDeep([...$,...c.value]),Ae({mid:s.mid,id:s.uniqueId,uid:s.uid},E,s.batchId?`batch_${s.batchId}`:"").then(()=>{I().then(()=>{s.close(),typeof(s==null?void 0:s.refreshData)=="function"&&(s==null||s.refreshData(s.batchId?{...y._.get(E,k),batch_id:s.batchId}:!0)),A.ElMessage.success("保存成功")})})})}async function I(){const E=await yr({table_id:s.id,uid:s.uid}),k=o.filter($=>!$.data.type).reduce(($,S)=>{const x={fieldName:S.data.title,showName:S.data.title,fieldProp:S.data.field,fieldShow:S.data.fieldShow?1:0,columnWidth:S.data.width,userFieldShow:S.data.userFieldShow?1:0,sort:S.sort};return y._.isEmpty(E)||(x.columnWidth=E[S.data.field]),$[S.data.field]=x,$},{});if(d.value)return b();const N=JSON.parse(JSON.stringify(f));return await Ae({mid:s.mid,id:s.uniqueId,uid:s.uid},{...k,_baseconfig:N},s.id),le({url:`/${n}-web/pri/v2/field_user/batch_save_user_field`,method:"post",data:{config_unique_id:s.uniqueId,menu_id:s.mid,table_id:s.id,base_config:JSON.stringify(N),json_data:JSON.stringify([...Object.values(k)])}})}return(E,k)=>{const N=t.resolveComponent("el-icon"),$=t.resolveComponent("el-input"),S=t.resolveComponent("el-switch"),x=t.resolveComponent("el-color-picker"),D=t.resolveComponent("el-option"),B=t.resolveComponent("el-select"),V=t.resolveComponent("el-button");return t.openBlock(),t.createElementBlock("div",oh,[t.createElementVNode("div",ah,[t.createElementVNode("div",rh,[k[7]||(k[7]=t.createStaticVNode('<div class="head" data-v-fe70704e><span class="drag" data-v-fe70704e>拖动</span><span class="name" data-v-fe70704e>列名称</span><span class="status" data-v-fe70704e>显示状态</span><span class="index" data-v-fe70704e>排序值</span></div>',1)),t.createVNode(t.unref(P.to),{ref_key:"dragRef",ref:a,modelValue:h.value,"onUpdate:modelValue":k[0]||(k[0]=L=>h.value=L),ghostClass:"ghost",handle:".sort-target",animation:"150",class:"drag-component show-stripe",style:{height:"calc(100% - 34px)"},onStart:k[1]||(k[1]=L=>_(!0)),onEnd:k[2]||(k[2]=L=>_(!1))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(L,U)=>(t.openBlock(),t.createElementBlock("div",{key:L.id,class:t.normalizeClass(["sort-target__wraper",`sort_${L.data.field}`])},[t.createElementVNode("span",ih,[t.createVNode(N,{class:"rotate-90",size:"14",color:"#000"},{default:t.withCtx(()=>[t.createVNode(t.unref(P.more_filled_default))]),_:1})]),t.createElementVNode("span",lh,[t.createVNode($,{disabled:!m.value.includes(L.data.field),modelValue:L.data.title,"onUpdate:modelValue":M=>L.data.title=M},null,8,["disabled","modelValue","onUpdate:modelValue"])]),t.createElementVNode("span",sh,[t.createVNode(S,{disabled:!m.value.includes(L.data.field),modelValue:L.data.userFieldShow,"onUpdate:modelValue":M=>L.data.userFieldShow=M},null,8,["disabled","modelValue","onUpdate:modelValue"])]),t.createElementVNode("span",ch,t.toDisplayString(U+1),1)],2))),128))]),_:1},8,["modelValue"])])]),t.createElementVNode("div",uh,[t.createElementVNode("div",dh,[k[8]||(k[8]=t.createElementVNode("span",{class:"item"},"文字颜色:",-1)),t.createElementVNode("div",fh,[t.createVNode(x,{modelValue:f._color[e.id],"onUpdate:modelValue":k[3]||(k[3]=L=>f._color[e.id]=L),size:"default"},null,8,["modelValue"])]),k[9]||(k[9]=t.createElementVNode("p",{class:"tip"},"*表格文字颜色,不包含表头字体颜色",-1))]),t.createElementVNode("div",mh,[k[10]||(k[10]=t.createElementVNode("span",{class:"item"},"斑马纹:",-1)),t.createVNode(S,{modelValue:f._stripe[e.id],"onUpdate:modelValue":k[4]||(k[4]=L=>f._stripe[e.id]=L),size:"default"},null,8,["modelValue"]),k[11]||(k[11]=t.createElementVNode("p",{class:"tip"},"*表示逐行换色",-1))]),t.createElementVNode("div",hh,[k[12]||(k[12]=t.createElementVNode("span",{class:"item"},"边框模式:",-1)),t.createVNode(B,{modelValue:f._border[e.id],"onUpdate:modelValue":k[5]||(k[5]=L=>f._border[e.id]=L),size:"default"},{default:t.withCtx(()=>[t.createVNode(D,{label:"默认",value:"default"}),t.createVNode(D,{label:"完整边框",value:"full"}),t.createVNode(D,{label:"外边框",value:"outer"}),t.createVNode(D,{label:"内边框",value:"inner"}),t.createVNode(D,{label:"无边框",value:"none"})]),_:1},8,["modelValue"]),k[13]||(k[13]=t.createElementVNode("p",{class:"tip"},"*设置边框样式",-1))])]),t.createElementVNode("div",ph,[t.createVNode(V,{type:"primary",size:"small",onClick:v,loading:u.value},{default:t.withCtx(()=>[...k[14]||(k[14]=[t.createTextVNode("重置设置",-1)])]),_:1},8,["loading"]),t.createElementVNode("div",_h,[t.createVNode(V,{size:"small",onClick:k[6]||(k[6]=L=>e.close("cancel"))},{default:t.withCtx(()=>[...k[15]||(k[15]=[t.createTextVNode("取消",-1)])]),_:1}),t.createVNode(V,{type:"primary",size:"small",onClick:C},{default:t.withCtx(()=>[...k[16]||(k[16]=[t.createTextVNode("保存",-1)])]),_:1})])])])}}}),vh=P._export_sfc(gh,[["__scopeId","data-v-fe70704e"]]);function yh(e,n,o,a,r,i,l,u){return new Promise(s=>{fn(vh,{id:n,uniqueId:e,mid:o,uid:r,refreshData:a,getReportBaseConfig:i,batchId:l,resetReady:u},{id:n,title:"表格配置",showFooter:!1,lockView:!0,success:({type:c})=>{s(c)}})})}const pe=t.reactive({rowIndex:{},columnIndex:{}});function bh(e,n){const o=t.inject("bcTableApi"),a=t.watch(e,i);t.onBeforeUnmount(()=>{a()});async function r(d){var g,p;const f=n.data.tables.find(v=>v.id===e.value);f.baseData.table_page_data.currentPage=d.currentPage,f.baseData.table_page_data.pageSize=d.pageSize;const m=await ce.get(ta)||{};m._user_pageSize={...m._user_pageSize,[f.id]:d.pageSize},await ce.set(ta,m);const h=y._.cloneDeep(((p=(g=n.data)==null?void 0:g.form)==null?void 0:p.formData)||{}),_=y._.cloneDeep(Oe.value[n.data.config_unique_id]);return y._.isEmpty(_)||y._.merge(h,_),o==null?void 0:o.setQueryData(Object.assign(h,{currentPage:d.currentPage,pageSize:d.pageSize})).then(()=>o.search(o.getActiveTab(),o.getQueryData(!1)))}function i(){t.nextTick(()=>{var f;const d=(f=n.data)==null?void 0:f.btns.find(m=>["exportSelect","exportSelectedData"].includes(m.data.key));if(d){const{data:m}=o.getCheckboxRow();d.data.disabled=y._.isEmpty(m)}})}function l(d){const f=o==null?void 0:o.getApi(),m=f==null?void 0:f.getCheckboxRecords();if(!y._.isEmpty(m))o==null||o.setCheckboxRow(m,d.checked);else{const h=n.data.tables.find(_=>_.id===e.value).tableData;o==null||o.setCheckboxRow(h,d.checked)}i()}function u(d){o==null||o.setCheckboxRow([d.row],d.checked),i()}function s(d,f){return Te({mid:n.data.mid,id:n.data.config_unique_id,uid:n.data.uid},n.data.batch_id?`batch_${n.data.batch_id}`:"").then(async m=>{const h=n.data.batch_id?`table.${n.data.config_unique_id}`:"table",{tableConfig:_}=y._.get(m,h).tables.find(v=>v.id===f),g=_.find(v=>v.data.field===d.column.field);g&&(g.data.width=d.column.resizeWidth.toString()),await Ae({mid:n.data.mid,id:n.data.config_unique_id,uid:n.data.uid},m,n.data.batch_id?`batch_${n.data.batch_id}`:"");const p=_.reduce((v,w)=>(v[w.data.field]=w.data.width,v),{});await br({table_id:f,uid:n.data.uid},p)})}function c(){setTimeout(()=>{o==null||o.search(o.getActiveTab(),o==null?void 0:o.getQueryData(!1))},10)}return{onPageChange:r,onTabClick:c,onCheckboxAll:l,onCheckboxChange:u,onResizableChange:s,onCheckboxSelect:i}}function wh(e,n,o,a){const r=t.useAttrs(),i=t.inject("bcBoxApi",{}),l=t.inject("bcTableApi"),u=t.ref(50),s=t.ref(!1),c=t.ref(!1);let d={rowIndex:-1,columnField:""};t.onMounted(()=>{t.nextTick(()=>{var B;a("ready",n.value);const D=(B=o.value)==null?void 0:B.querySelector(".vxe-pager--goto input");D&&(D.style.width="4.2em",D.onfocus=()=>{D.select()}),setTimeout(()=>{m(),C()})})});const f=t.watch(()=>e.tableData.length,()=>{m()});t.onUnmounted(()=>{f()});function m(){setTimeout(()=>{var M,q,R,Z,O,z,j,T,Q;const D=(R=(q=(M=n.value)==null?void 0:M.$el)==null?void 0:q.querySelector(".vxe-table--fixed-left-wrapper .vxe-body--column"))==null?void 0:R.querySelector(".cell-append"),B=(z=(O=(Z=n.value)==null?void 0:Z.$el)==null?void 0:O.querySelector(".vxe-table--body .vxe-body--column"))==null?void 0:z.querySelector(".cell-append"),V=D||B,L=(j=V==null?void 0:V.parentNode)==null?void 0:j.querySelector(".vxe-body--column.col--seq"),U=L==null?void 0:L.querySelector(".vxe-cell");U&&([...Array.from(((Q=(T=n.value)==null?void 0:T.$el)==null?void 0:Q.querySelectorAll(".col--seq .vxe-cell"))||[])].forEach(te=>{te.style.display=""}),U.style.display="none")})}function h(D){var V;Se.value=e.uniqueId;const B=l.getActiveTab();y._.set(pe,`rowIndex.${B}`,D.rowIndex),y._.set(pe,`columnIndex.${B}`,D.columnIndex),(V=e.baseData)!=null&&V.isClosedEditRow||_(D),a("cell-click",D)}function _(D){var O,z,j,T,Q;let B=0,V=0;const L=D.rowIndex,U=te=>{var K;const W=te[V];!((K=W==null?void 0:W.editRender)!=null&&K.enabled)&&B<1&&(V++,V>te.length-1&&(B++,V=0),U(te))};if((z=(O=D.column)==null?void 0:O.editRender)!=null&&z.enabled)return;const{visibleColumn:M}=D.$table.getTableColumn();U(M);const q=(j=M[V])==null?void 0:j.field;if(!q||y._.isEqual(d,{rowIndex:L,columnField:q}))return;const{scrollLeft:R=0,scrollTop:Z=0}=((T=D.$table)==null?void 0:T.getScroll())||{};(Q=D.$table)==null||Q.setEditCell(D.row,q).then(()=>{var Y,ae,re;const{rowIndex:te,column:W,cell:K}=((Y=D.$table)==null?void 0:Y.getEditRecord())||{};d={rowIndex:te,columnField:W==null?void 0:W.field},(ae=K==null?void 0:K.querySelector("input"))==null||ae.blur(),(re=D.$table)==null||re.scrollTo(R,Z)})}function g(D){a("cell-dblclick",D)}function p(D){var B;D.column.type==="seq"&&!((B=e==null?void 0:e.baseData)!=null&&B.enablePopup)&&(!r.isStatic||e.batchId)&&yh(e.uniqueId,e.id,e.mid,e.batchId?l.refreshData:i.refreshData,e.uid,i==null?void 0:i.getReportBaseConfig,e==null?void 0:e.batchId,v),a("header-cell-click",D)}function v(){if(typeof(i==null?void 0:i.resetReady)=="function")return i==null?void 0:i.resetReady("table");typeof(l==null?void 0:l.resetReady)=="function"&&(l==null||l.resetReady("table"))}function w(D){C(),a("checkbox-all",D)}function b(D){C(),a("checkbox-change",D)}function C(){e.tableData.length&&t.nextTick(()=>{var B,V;const D=((V=(B=l==null?void 0:l.getCheckboxRow())==null?void 0:B.data)==null?void 0:V.length)||0;s.value=D===e.tableData.length,c.value=D>0&&D!==e.tableData.length})}function I(D){a("resizable-change",D)}function E(D){a("page-change",D)}const k=y._.debounce(D=>{const B=String(D).length*9+20;u.value=B<50?50:B},10);function N(D,B){if(!(B!=null&&B.is_apply_page))return k(D.seq),D.seq;const V=B.table_page_data,L=(V.currentPage-1)*Math.abs(V.pageSize)+D.rowIndex+1;return k(L),L}async function $(D,B){var V;if((V=B.sortConfig)!=null&&V.remote){const L=D.field&&D.order?`${D.field} ${D.order}`:"",U=(l==null?void 0:l.getQueryData(!1))||{};U[`${eo}${B.id}`]={query_order_by:L},Oe.value[B.config_unique_id]=U,l==null||l.setQueryData(Oe.value[B.config_unique_id]).then(()=>{l.search(l.getActiveTab(),l.getQueryData(!1))})}}function S(D,B){return y._.omit({...D,...B},["footerMethod","formatter_2","footerMethod_2","sortMethod_2","tableName","tabs","method","config_unique_id","is_apply_page","table_page_data","isCloseInitData","isSplitInterface","isRemoteTotal","isClosedKeyStroke","isSimulate","isGetCanche","enablePopup","dynamicColumn","proxy","requestUrl","pagerAllText","minHeight","min-height","keydown","keydown-start","keydown-end"])}function x(D){D?Ds(e.baseData).then(B=>{l==null||l.resetCheckboxRow(B)}):l==null||l.clearCheckboxRow()}return{seqColumnWidth:u,showPagerAll:s,isIndeterminate:c,handleCellClick:h,handleCellDblclick:g,headerCellClick:p,handleCheckboxAll:w,handleCheckboxChange:b,handleResizableChange:I,pageChange:E,customeSeqMethod:N,sortChangeEvent:$,getBaseData:S,getShowPagerAll:x}}function kh(e){const n="table_"+Math.random().toString(36).slice(2),o=t.shallowRef(),a=t.shallowRef(),r=t.shallowRef(),{height:i}=P.useElementSize(a,{height:0,width:0}),l=t.ref("#000");Te({mid:e.mid,id:e.uniqueId,uid:e.uid},e.id).then(s=>{l.value=y._.get(s,`_baseconfig._color.${e.id}`,"#000")});const u=t.computed(()=>({height:`${e.height-i.value}px`,"--font-color":l.value}));return{tableId:n,wrapRef:o,pagerRef:a,tableRef:r,style:u}}const Ch={key:2},ii=t.defineComponent({__name:"column",props:{uniqueId:{},mid:{},uid:{},columnItem:{},baseData:{}},emits:["field-change"],setup(e,{emit:n}){const o=n,a=e,r=An(),i=t.ref(a.columnItem.data.width),l=t.ref(a.columnItem.data.minWidth),u=t.inject("bcTableApi"),s=t.inject("getShowFooter",()=>!1);function c(v){return v||{}}function d(v,w){return Object.assign(v||{},{btnData:w})}let f={};function m(v,w){let b="";for(let I in v)typeof v[I]=="function"&&(b=v[I](w));const C=y._.get(w,`row.customTotal.${w.column.field}`);if(C>=0&&!f[w.column.field]&&l.value!=="0"){f[w.column.field]=1;const I=w.column.title.length*14+50;l.value=Math.max(I,Math.ceil(cn(C).length*11)),i.value=l.value,setTimeout(()=>{f={}},600)}return b||w.row[w.column.field]}function h(v){var w;return{...(w=v.slotTemplateConfig)==null?void 0:w.attrs,...y._.omit(v.slotTemplateConfig,"attrs"),uniqueId:a.uniqueId,mid:a.mid,uid:a.uid}}let _=0;const g=y._.debounce((v,w,b)=>{var I,E;const C=(I=u==null?void 0:u.getDataInstance())==null?void 0:I.uuid;(a.baseData.isSimulate||a.baseData.isGetCanche)&&(_++,Te({mid:a.mid,id:a.uniqueId},C?`cache_${a.baseData.id}_${C}`:`cache_${a.baseData.id}`).then(k=>{y._.set(y._.find(k,{id:v.id}),`${w}`,b),Ae({mid:a.mid,id:a.uniqueId},y._.cloneDeep(k),C?`cache_${a.baseData.id}_${C}`:`cache_${a.baseData.id}`).finally(()=>{_--,r.emit("cell-value-changed",_)})})),s()&&((E=u==null?void 0:u.getApi())==null||E.updateFooter())},100);function p(v){return v.row=new Proxy(v.row,{get:function(w,b,C){return Reflect.get(w,b,C)},set:function(w,b,C,I){r.emit("cell-value-changed",1),g(w,b,C);const E=Reflect.get(w,b,I);return u==null||u.updateCheckboxRow(w,b),o("field-change",{type:"table",row:w,key:b,value:C,oldValue:E,$api:v}),Reflect.set(w,b,C,I)}}),v}return(v,w)=>{const b=t.resolveComponent("bc-button"),C=t.resolveComponent("vxe-column");return t.openBlock(),t.createBlock(C,t.mergeProps(e.columnItem.data,{width:i.value,minWidth:l.value,className:e.columnItem.data.field,resizable:!t.unref($t).includes(e.columnItem.data.type)&&e.columnItem.data.resizable}),t.createSlots({default:t.withCtx(I=>[e.columnItem.data.isSlot?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.columnItem.data.el?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ks)(e.columnItem.data.el)),t.mergeProps({key:0},h(e.columnItem.data),{modelValue:p(I).row[I.column.field],"onUpdate:modelValue":E=>p(I).row[I.column.field]=E}),null,16,["modelValue","onUpdate:modelValue"])):t.renderSlot(v.$slots,e.columnItem.data.field,t.normalizeProps(t.mergeProps({key:1},p(I||{}))))],64)):e.columnItem.btnData&&e.columnItem.btnData.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.columnItem.btnData,E=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:E.id},[t.unref(mt)({...E.data,uniqueId:e.uniqueId})?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[E.data.isSlot?t.renderSlot(v.$slots,`table_btn_${E.data.key}`,t.mergeProps({key:0,ref_for:!0},d(I,E.data))):(t.openBlock(),t.createBlock(b,t.mergeProps({key:1,ref_for:!0},E.data),null,16))],64)):t.createCommentVNode("",!0)],64))),128)):(t.openBlock(),t.createElementBlock("span",Ch,t.toDisplayString(m(e.columnItem.data,I)),1))]),_:2},[v.$slots[`header_${e.columnItem.data.field}`]?{name:"header",fn:t.withCtx(I=>[t.renderSlot(v.$slots,"header_"+e.columnItem.data.field,t.normalizeProps(t.guardReactiveProps(I||{})))]),key:"0"}:void 0,t.renderList(c(v.$slots),(I,E)=>({name:E,fn:t.withCtx(k=>[t.renderSlot(v.$slots,E,t.normalizeProps(t.guardReactiveProps(p(c(k)))))])}))]),1040,["width","minWidth","className","resizable"])}}}),Ts=t.defineComponent({__name:"colgroup",props:{uniqueId:{},mid:{},uid:{},columnItem:{},baseData:{}},setup(e){function n(o){return o}return(o,a)=>{var i;const r=t.resolveComponent("vxe-colgroup");return t.unref(y._).isEmpty((i=e.columnItem)==null?void 0:i.children)?(t.openBlock(),t.createBlock(ii,t.mergeProps({key:1},o.$attrs,{baseData:e.baseData,columnItem:e.columnItem,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid}),t.createSlots({_:2},[t.renderList(o.$slots,(l,u)=>({name:u,fn:t.withCtx(s=>[t.renderSlot(o.$slots,u,t.normalizeProps(t.guardReactiveProps(s||{})))])}))]),1040,["baseData","columnItem","uniqueId","mid","uid"])):(t.openBlock(),t.createBlock(r,t.mergeProps({key:0},o.$attrs,{title:e.columnItem.data.title,"header-align":"center"}),{default:t.withCtx(()=>{var l;return[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((l=e.columnItem)==null?void 0:l.children,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.id},[t.unref(y._).isEmpty(u==null?void 0:u.children)?(t.openBlock(),t.createBlock(ii,t.mergeProps({key:1,ref_for:!0},o.$attrs,{baseData:e.baseData,columnItem:u,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid}),t.createSlots({_:2},[t.renderList(o.$slots,(s,c)=>({name:c,fn:t.withCtx(d=>[t.renderSlot(o.$slots,c,t.mergeProps({ref_for:!0},d||{}))])}))]),1040,["baseData","columnItem","uniqueId","mid","uid"])):(t.openBlock(),t.createBlock(Ts,t.mergeProps({key:0,ref_for:!0},o.$attrs,{baseData:e.baseData,columnItem:u,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid}),t.createSlots({_:2},[t.renderList(o.$slots,(s,c)=>({name:c,fn:t.withCtx(d=>[t.renderSlot(o.$slots,c,t.mergeProps({ref_for:!0},d||{}))])}))]),1040,["baseData","columnItem","uniqueId","mid","uid"]))],64))),128))]}),_:3},16,["title"]))}}}),Eh={key:0,class:"page_all"},Sh=t.defineComponent({__name:"table",props:{id:{},uniqueId:{},mid:{},uid:{},batchId:{},height:{},baseData:{},tableData:{},tableConfig:{}},emits:["ready","cell-click","cell-dblclick","header-cell-click","page-change","checkbox-all","checkbox-change","resizable-change"],setup(e,{emit:n}){const o=e,a=n,r=t.useAttrs(),{wrapRef:i,pagerRef:l,tableRef:u,style:s}=kh(o),{seqColumnWidth:c,isIndeterminate:d,showPagerAll:f,handleCellClick:m,handleCellDblclick:h,handleCheckboxAll:_,handleCheckboxChange:g,handleResizableChange:p,headerCellClick:v,pageChange:w,customeSeqMethod:b,sortChangeEvent:C,getBaseData:I,getShowPagerAll:E}=wh(o,u,l,a);function k(){return r.footerMethod||o.baseData.footerMethod}function N(S){const x=r.showFooter||o.baseData.showFooter,D=k();if(x)return typeof D=="function"?D(S):lr.footerMethod(S,o.tableConfig)}function $(S){return S||{}}return t.provide("getShowFooter",k),(S,x)=>{var M;const D=t.resolveComponent("bc-icon"),B=t.resolveComponent("vxe-column"),V=t.resolveComponent("vxe-table"),L=t.resolveComponent("el-checkbox"),U=t.resolveComponent("vxe-pager");return t.openBlock(),t.createElementBlock("div",{ref_key:"wrapRef",ref:i,class:"bc-table__wrapper"},[t.createElementVNode("div",{class:"bc-table__content",style:t.normalizeStyle(t.unref(s))},[t.createVNode(V,t.mergeProps({ref_key:"tableRef",ref:u},t.unref(I)(e.baseData,S.$attrs),{style:{"--vxe-ui-font-size-mini":"14px","--vxe-ui-font-size-small":"14px","--vxe-ui-table-border-color":"var(--el-border-color)","--vxe-ui-table-row-current-background-color":"#0d7fff66","--vxe-ui-table-row-hover-current-background-color":"#0d7fff66","--vxe-ui-table-row-hover-background-color":"#0d7fff66","--vxe-ui-table-row-hover-striped-background-color":"#0d7fff66"},height:e.height>0?t.unref(s).height:"auto",data:e.tableData,seqConfig:{seqMethod:q=>t.unref(b)(q,e.baseData)},footerMethod:N,onSortChange:x[0]||(x[0]=q=>t.unref(C)(q,e.baseData)),onCellClick:t.unref(m),onCellDblclick:t.unref(h),onHeaderCellClick:t.unref(v),onCheckboxAll:t.unref(_),onCheckboxChange:t.unref(g),onResizableChange:t.unref(p)}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tableConfig,q=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:q.id},[q.data.type==="seq"?(t.openBlock(),t.createBlock(B,t.mergeProps({key:0,"show-overflow":""},{ref_for:!0},q.data,{resizable:!1,width:t.unref(c),minWidth:t.unref(c)}),t.createSlots({header:t.withCtx(()=>[t.createVNode(D,{name:"ele-Operation"})]),_:2},[t.renderList($(S.$slots),(R,Z)=>({name:Z,fn:t.withCtx(O=>[t.renderSlot(S.$slots,Z,t.mergeProps({ref_for:!0},$(O)),void 0,!0)])}))]),1040,["width","minWidth"])):t.createCommentVNode("",!0),t.unref(mt)({...q.data,uniqueId:e.uniqueId})&&q.data.type!=="seq"?(t.openBlock(),t.createBlock(Ts,t.mergeProps({key:1,ref_for:!0},S.$attrs,{baseData:e.baseData,uniqueId:e.uniqueId,mid:e.mid,uid:e.uid,columnItem:q}),t.createSlots({_:2},[t.renderList(S.$slots,(R,Z)=>({name:Z,fn:t.withCtx(O=>[t.renderSlot(S.$slots,Z,t.mergeProps({ref_for:!0},O||{}),void 0,!0)])}))]),1040,["baseData","uniqueId","mid","uid","columnItem"])):t.createCommentVNode("",!0)],64))),128))]),_:3},16,["height","data","seqConfig","onCellClick","onCellDblclick","onHeaderCellClick","onCheckboxAll","onCheckboxChange","onResizableChange"])],4),t.createElementVNode("div",{class:"bc-table__footer-pager",ref_key:"pagerRef",ref:l},[e.baseData.showPagerAll?(t.openBlock(),t.createElementBlock("div",Eh,[t.createVNode(L,{disabled:!e.tableData.length,indeterminate:t.unref(d),label:((M=S.$attrs)==null?void 0:M.pagerAllText)||"全选",modelValue:t.unref(f),"onUpdate:modelValue":x[1]||(x[1]=q=>t.isRef(f)?f.value=q:null),size:"default",onChange:t.unref(E)},null,8,["disabled","indeterminate","label","modelValue","onChange"])])):t.createCommentVNode("",!0),e.baseData.is_apply_page?(t.openBlock(),t.createBlock(U,t.mergeProps({key:1},e.baseData.table_page_data,{pagerCount:7,onPageChange:t.unref(w)}),t.createSlots({_:2},[t.renderList($(S.$slots),(q,R)=>({name:R,fn:t.withCtx(Z=>[t.renderSlot(S.$slots,"pager_"+R,t.normalizeProps(t.guardReactiveProps($(Z))),void 0,!0)])}))]),1040,["onPageChange"])):t.createCommentVNode("",!0)],512)],512)}}}),xh=P._export_sfc(Sh,[["__scopeId","data-v-7b60742e"]]);function Dh(e){const n=t.shallowRef(),o=t.shallowRef(),a=t.shallowRef(),r=t.shallowRef(),i=t.shallowRef(),l=t.shallowRef({}),u=t.ref(""),s=t.computed({get(){return u.value===""?y._.get(e,"data.tables.0.id",""):u.value},set(v){u.value=v}});function c(v){return v?l.value[v]:l.value[s.value]}function d(){return s.value}function f(v){s.value=v}const{height:m}=P.useElementSize(o),{height:h}=P.useElementSize(n,{height:0,width:0}),{height:_}=P.useElementSize(i,{height:0,width:0}),g=t.computed(()=>({height:m.value>0?`${m.value-h.value-_.value}px`:"0px"}));function p(v,w){l.value[w]=v}return{wrapRef:o,btnRef:a,formRef:r,btnQueryRef:n,centerSlotRef:i,tableApi:l,style:g,activeTabs:s,onReady:p,getApi:c,getActiveTab:d,setActiveTab:f}}function Ih(e,n,o){const a=t.inject("bcTableApi"),r={search:m,reset:f,exportSelect:g,exportSelectedData:p,exportAllData:w,exportVoucher:v};let i=!1,l={};P.watchOnce(()=>{var b;return(b=n.data)==null?void 0:b.config_unique_id},()=>{var b,C;l=y._.cloneDeep(((C=(b=n.data)==null?void 0:b.form)==null?void 0:C.formData)||{})});const u=t.computed(()=>{var C;const b=["exportSelect","exportSelectedData","exportAllData","exportVoucher"];return((C=n.data)==null?void 0:C.btns.map(I=>(a!=null&&a.btnKey.value&&I.data.key===(a==null?void 0:a.btnKey.value)&&(I.data.loading=!0),I.data.setLoading=E=>{I.data.loading=E},b.includes(I.data.key)&&(I.data["loading-icon"]="ele-Loading"),I.data.fnName=r[I.data.key]||"",I)))||[]});function s(){var b,C;return(C=(b=t.toValue(e))==null?void 0:b.getInstance())==null?void 0:C.validate()}function c(){var b,C,I;return y._.isEmpty((C=(b=n.data)==null?void 0:b.form)==null?void 0:C.formData)?{}:(I=t.toValue(e))==null?void 0:I.getInstance()}function d(b){var C,I,E;return y._.isEmpty((I=(C=n.data)==null?void 0:C.form)==null?void 0:I.formData)?{}:(E=t.toValue(e))==null?void 0:E.getItemInstance(b)}async function f(b=!1){var C,I,E,k,N,$,S,x,D,B,V,L;if(!y._.isEmpty((I=(C=n.data)==null?void 0:C.form)==null?void 0:I.formData)){if((k=(E=t.toValue(e))==null?void 0:E.getInstance())==null||k.clearValidate(),($=(N=t.toValue(e))==null?void 0:N.getComponents())==null||$.forEach(M=>{var q;typeof((q=t.toValue(M))==null?void 0:q.clearData)=="function"&&t.toValue(M).clearData()}),y._.isEmpty(l)){const M=new RegExp(Kt);Object.keys(n.data.form.formData).filter(q=>M.test(q)).map(q=>n.data.form.formData[q]).flat().forEach(q=>{n.data.form.formData[q]=""})}else if((D=(x=(S=n.data)==null?void 0:S.form)==null?void 0:x.baseData)!=null&&D.isShowQuerySearch){const M=(a==null?void 0:a.getShowQueryData())||{},q=y._.cloneDeep(l);Object.keys(M).forEach(R=>{n.data.form.formData[R]=q[R]})}else n.data.form.formData=y._.cloneDeep(l);const U=y._.cloneDeep(xr.value[n.data.config_unique_id]);y._.isEmpty(U)||Object.keys(U).forEach(M=>{n.data.form.formData[M]=U[M]}),Oe.value[n.data.config_unique_id]=y._.cloneDeep(n.data.form.formData),n.data.form.formData=a==null?void 0:a.proxyFormData(y._.cloneDeep(n.data.form.formData))}return a==null||a.getTab(-1).forEach(U=>{a==null||a.getApi(U).clearSort()}),a==null||a.clearCheckboxRow(),b?typeof b=="function"?b():t.nextTick():(L=(V=(B=n.data)==null?void 0:B.form)==null?void 0:V.baseData)!=null&&L.isShowQuerySearch?h(a==null?void 0:a.getActiveTab(),a==null?void 0:a.getShowQueryData()):h(a==null?void 0:a.getActiveTab())}function m(b=a==null?void 0:a.getActiveTab(),C={}){var I,E,k;return(k=(E=(I=n.data)==null?void 0:I.form)==null?void 0:E.baseData)!=null&&k.isShowQuerySearch?h(b,a==null?void 0:a.getShowQueryData()):h(b,y._.isEmpty(C)?a==null?void 0:a.getQueryData(!1):C)}async function h(b,C){var k,N;if(i)return;i=!0;const{scrollLeft:I=0,scrollTop:E=0}=((k=a==null?void 0:a.getApi())==null?void 0:k.getScroll())||{};return(N=a==null?void 0:a.searchValidate())==null?void 0:N.then(()=>{let $=[];b==="-1"?$=n.data.tables:$=b?n.data.tables.filter(x=>x.id===b):n.data.tables;const S=y._.isEmpty(C)?a==null?void 0:a.getQueryData(!1):C;return Promise.allSettled($.map(x=>(y._.isEmpty(C)&&(x.baseData.table_page_data.currentPage=1),a==null||a.reloadCountTableData(x.id,S),_(x,S)))).then(()=>new Promise(x=>{setTimeout(()=>{var U,M,q,R;const D=(U=n.data)==null?void 0:U.btns.find(Z=>Z.data.key===(a==null?void 0:a.btnKey.value));D&&(D.data.loading=!1,a==null||a.setBtnKey(""));const{data:B,uniqId:V}=a.getCheckboxRow(),L=((M=a==null?void 0:a.getApi())==null?void 0:M.getData())||[];if(!y._.isEmpty(B)){const Z=(B==null?void 0:B.map(z=>z[V]))||[],O=L.filter(z=>Z.includes(z[V]));(q=a==null?void 0:a.getApi())==null||q.setCheckboxRow(O,!0)}(R=a==null?void 0:a.getApi())==null||R.scrollTo(I,E),o(),x(!0)},0)})).finally(()=>{i=!1})})}function _(b,C){var I,E,k;return Dr(b.baseData,C,(k=(E=(I=n.data)==null?void 0:I.form)==null?void 0:E.baseData)==null?void 0:k.isShowQuerySearch).then(N=>(b.tableData=N,N))}async function g(){var I;if(i)return;i=!0;const b=(I=n.data)==null?void 0:I.btns.find(E=>E.data.key===(a==null?void 0:a.btnKey.value));b&&(b.data.loading=!1,a==null||a.setBtnKey(""));const{data:C}=a.getCheckboxRow();if(y._.isEmpty(C)){Me.warning("请选择导出数据");return}jl({uniqueId:n.data.config_unique_id,projectCode:n.data.project_code,templateName:n.data.config_name,tableConfig:a.getColumnConfigs(),tableData:JSON.parse(JSON.stringify(C))}).finally(()=>{i=!1})}function p(){var k;if(i)return;i=!0;const{data:b}=a.getCheckboxRow();if(y._.isEmpty(b)){Me.warning("请选择导出数据");const N=(k=n.data)==null?void 0:k.btns.find($=>$.data.key===(a==null?void 0:a.btnKey.value));N&&(N.data.loading=!1,a==null||a.setBtnKey(""));return}const C=a.getTableConfig();let I=n.data.config_name;C.baseData.tableName!=="表格配置名称"&&(I+=`-${C.baseData.tableName}`);const E=a.getColumnConfigs().map(N=>(n.data.is_auth!="1"&&(N.data.fieldExport=!0),N));return Ul({uniqueId:n.data.config_unique_id,projectCode:n.data.project_code,columnConfig:E,data:b,template_name:I}).finally(()=>{var $;i=!1;const N=($=n.data)==null?void 0:$.btns.find(S=>S.data.key===(a==null?void 0:a.btnKey.value));N&&(N.data.loading=!1,a==null||a.setBtnKey(""))})}function v(){return w("/pri/easyexcel/export_model_4_template")}function w(b="/pri/easyexcel/export_model_all"){if(i)return;i=!0;const C=a.getTableConfig();let I=n.data.config_name;C.baseData.tableName!=="表格配置名称"&&(I+=`-${C.baseData.tableName}`);const E=a.getColumnConfigs().map(N=>(n.data.is_auth!="1"&&(N.data.fieldExport=!0),N)),k=C.baseData.requestParams?new Function("return "+C.baseData.requestParams)():{};return Hl({uniqueId:C.baseData.config_unique_id,tableId:C.baseData.id,projectCode:n.data.project_code,columnConfig:E,search_json_data:Object.assign(k,a==null?void 0:a.getQueryData(!0)),template_name:I,export_biz_type:C.baseData.requestUrl},b).finally(()=>{var $;i=!1;const N=($=n.data)==null?void 0:$.btns.find(S=>S.data.key===(a==null?void 0:a.btnKey.value));N&&(N.data.loading=!1,a==null||a.setBtnKey(""))})}return t.onUnmounted(()=>{Oe.value[n.data.config_unique_id]={}}),{btns:u,validate:s,getQueryInstance:c,getQueryItemInstance:d,search:m,searchTo:h,reset:f}}const Bh={class:"sort-form-wraper"},Nh={class:"sort-form-wraper__content"},$h={class:"content__wrap"},Vh={class:"sort-target drag li"},Th={class:"li name"},Rh={class:"li status"},Ah={class:"li index"},Lh={class:"footer"},Mh={class:"footer-confirm"},Oh=t.defineComponent({__name:"sortForm",props:{id:{},mid:{},uid:{},form_id:{},project_code:{},close:{type:Function},refreshData:{type:Function},getReportBaseConfig:{type:Function},resetReady:{type:Function}},setup(e){const n=e,o=t.ref([]),a=t.ref(!1),r=t.ref(!1),i=t.shallowRef();let l=!1;const{elementY:u,isOutside:s}=P.useMouseInElement(i),c=t.computed(()=>o.value.filter(b=>b.data.baseData.isShow).filter(b=>b.data.baseData.fieldShow).map(b=>b.data.baseData.prop)),d=t.computed({get(){return a.value?o.value.filter(b=>b.data.baseData.isShow):o.value.filter(b=>b.data.baseData.isShow).filter(b=>b.data.baseData.fieldShow)},set(b){const C=JSON.parse(JSON.stringify(b)),I=JSON.parse(JSON.stringify(o.value));let E=[];a.value?E=I.filter(k=>!k.data.baseData.isShow):E=I.filter(k=>!k.data.baseData.isShow||!k.data.baseData.fieldShow),E.map(k=>I.findIndex(N=>N.id===k.id)).forEach((k,N)=>{C.splice(k,0,E[N])}),C.map((k,N)=>(k.sort=N+1,k)).sort((k,N)=>k.sort-N.sort),o.value=C}});t.watch(u,()=>{if(s.value&&l){const b=document.querySelector(".drag-component");u.value<0?b.scrollTop=0:b.scrollTop=b.scrollHeight}}),m();function f(b){l=b,h()}async function m(){return Te({mid:n.mid,id:n.id,uid:n.uid}).then(b=>{var C;if(!b){A.ElMessageBox.alert("数据权限已更新是否刷新?","提示",{}).then(()=>{n==null||n.refreshData(),n.close()});return}o.value=((C=b.table.form)==null?void 0:C.formConfig)||[],setTimeout(()=>{typeof(n==null?void 0:n.resetReady)=="function"&&(n==null||n.resetReady()),h()})})}function h(){setTimeout(()=>{Array.from(document.querySelectorAll(".sort-target__wraper")).filter(b=>!b.classList.contains("hide")).forEach((b,C)=>{y._.set(b.lastChild,"innerText",C+1)})})}function _(){return le({url:`/${n.project_code}-web/pri/v2/field_user/clear_user_field`,method:"post",data:{config_unique_id:n.id,menu_id:n==null?void 0:n.mid,table_id:`form_${n.form_id}`}}).then(async()=>Ae({mid:n.mid,id:n.id,uid:n==null?void 0:n.uid},{},`form_${n.form_id}`))}async function g(){var E,k,N;if(typeof n.getReportBaseConfig=="function")return p();r.value=!0;const b=await le({url:"/scmp-web/api/get_biz_field_config",method:"get",params:{menu_id:n.mid,config_type:"1",config_unique_id:n.id,project_code:n.project_code}}),C=await Ir({mid:n.mid,id:n.id,projectCode:n.project_code}),[I]=((E=b.data)==null?void 0:E.map($=>JSON.parse($.business_json)))||[];if(I){const $=y._.get(C,`field_functions.table.${n.id}.form`),S=(N=(k=I.form)==null?void 0:k.formConfig)==null?void 0:N.reduce((x,D)=>{var B;return x[D.data.baseData.prop]={el:D.data.baseData.el,sort:D.sort,title:((B=$==null?void 0:$[D.data.baseData.prop])==null?void 0:B.showName)||D.data.baseData.label},x},{});o.value=o.value.map(x=>{var D,B,V;return x.sort=((D=S==null?void 0:S[x.data.baseData.prop])==null?void 0:D.sort)??0,x.data.baseData.el=((B=S==null?void 0:S[x.data.baseData.prop])==null?void 0:B.el)??x.data.baseData.el,x.data.baseData.label=((V=S==null?void 0:S[x.data.baseData.prop])==null?void 0:V.title)??x.data.baseData.label,x.data.baseData.userFieldShow=x.data.baseData.isShow,y._.unset(x,"data.baseData.el2"),x}).sort((x,D)=>x.sort-D.sort)}a.value=!0,r.value=!1}function p(){typeof n.getReportBaseConfig=="function"&&n.getReportBaseConfig().then(b=>{var I,E;if(!b)return;const C=(E=(I=b.form)==null?void 0:I.formConfig)==null?void 0:E.reduce((k,N)=>(k[N.data.baseData.prop]={el:N.data.baseData.el,sort:N.sort,title:N.data.baseData.label},k),{});o.value=o.value.map(k=>{var N,$,S;return k.sort=((N=C==null?void 0:C[k.data.baseData.prop])==null?void 0:N.sort)??0,k.data.baseData.el=(($=C==null?void 0:C[k.data.baseData.prop])==null?void 0:$.el)??k.data.baseData.el,k.data.baseData.label=((S=C==null?void 0:C[k.data.baseData.prop])==null?void 0:S.title)??k.data.baseData.label,k.data.baseData.userFieldShow=k.data.baseData.isShow??!0,y._.unset(k,"data.baseData.el2"),k}).sort((k,N)=>k.sort-N.sort)})}async function v(){Te({mid:n.mid,id:n.id,uid:n.uid}).then(b=>{const C=JSON.parse(JSON.stringify([...o.value]));b.table.form.formConfig=C,Ae({mid:n.mid,id:n.id,uid:n.uid},b).then(async()=>{const{formConfig:I}=await Cs(b.table);a.value?await _():await w(I),n==null||n.refreshData(),n.close(I)})})}async function w(b){b.forEach((I,E)=>{I.sort=E});const C=b.reduce((I,E)=>(I[E.data.baseData.prop]={fieldName:E.data.baseData.label,showName:E.data.baseData.label,fieldProp:E.data.baseData.prop,fieldShow:E.data.baseData.fieldShow?1:0,userFieldShow:E.data.baseData.userFieldShow?1:0,sort:E.sort+1},I),{});return await Ae({mid:n.mid,id:n.id,uid:n==null?void 0:n.uid},C,`form_${n.form_id}`),le({url:`/${n==null?void 0:n.project_code}-web/pri/v2/field_user/batch_save_user_field`,method:"post",data:{config_unique_id:n.id,menu_id:n==null?void 0:n.mid,table_id:`form_${n.form_id}`,base_config:JSON.stringify({}),json_data:JSON.stringify(Object.values(C))}})}return(b,C)=>{const I=t.resolveComponent("el-icon"),E=t.resolveComponent("el-input"),k=t.resolveComponent("el-switch"),N=t.resolveComponent("el-button");return t.openBlock(),t.createElementBlock("div",Bh,[t.createElementVNode("div",Nh,[t.createElementVNode("div",$h,[C[4]||(C[4]=t.createStaticVNode('<div class="head" data-v-ec3547f3><span class="drag" data-v-ec3547f3>拖动</span><span class="name" data-v-ec3547f3>列名称</span><span class="status" data-v-ec3547f3>显示状态</span><span class="index" data-v-ec3547f3>排序值</span></div>',1)),t.createVNode(t.unref(P.to),{ref_key:"dragRef",ref:i,modelValue:d.value,"onUpdate:modelValue":C[0]||(C[0]=$=>d.value=$),ghostClass:"ghost",handle:".sort-target",animation:"150",class:"drag-component show-stripe",style:{height:"calc(100% - 34px)"},onStart:C[1]||(C[1]=$=>f(!0)),onEnd:C[2]||(C[2]=$=>f(!1))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,($,S)=>(t.openBlock(),t.createElementBlock("div",{key:$.id,class:t.normalizeClass(["sort-target__wraper",`sort_${$.data.baseData.prop}`])},[t.createElementVNode("span",Vh,[t.createVNode(I,{class:"rotate-90",size:"14"},{default:t.withCtx(()=>[t.createVNode(t.unref(P.more_filled_default))]),_:1})]),t.createElementVNode("span",Th,[t.createVNode(E,{disabled:!c.value.includes($.data.baseData.prop),modelValue:$.data.baseData.label,"onUpdate:modelValue":x=>$.data.baseData.label=x},null,8,["disabled","modelValue","onUpdate:modelValue"])]),t.createElementVNode("span",Rh,[t.createVNode(k,{disabled:!c.value.includes($.data.baseData.prop),modelValue:$.data.baseData.userFieldShow,"onUpdate:modelValue":x=>$.data.baseData.userFieldShow=x},null,8,["disabled","modelValue","onUpdate:modelValue"])]),t.createElementVNode("span",Ah,t.toDisplayString(S+1),1)],2))),128))]),_:1},8,["modelValue"])])]),t.createElementVNode("div",Lh,[t.createVNode(N,{type:"primary",size:"small",onClick:g,loading:r.value},{default:t.withCtx(()=>[...C[5]||(C[5]=[t.createTextVNode("重置设置",-1)])]),_:1},8,["loading"]),t.createElementVNode("div",Mh,[t.createVNode(N,{size:"small",onClick:C[3]||(C[3]=$=>e.close("cancel"))},{default:t.withCtx(()=>[...C[6]||(C[6]=[t.createTextVNode("取消",-1)])]),_:1}),t.createVNode(N,{type:"primary",size:"small",onClick:v},{default:t.withCtx(()=>[...C[7]||(C[7]=[t.createTextVNode("保存",-1)])]),_:1})])])])}}}),qh=P._export_sfc(Oh,[["__scopeId","data-v-ec3547f3"]]);function zh(e,n,o,a,r,i,l,u){return new Promise(s=>{fn(qh,{id:e,mid:n,uid:a,refreshData:o,form_id:r,project_code:i,getReportBaseConfig:l,resetReady:u},{title:"高级设置",showFooter:!1,success({type:c}){s(c)}})})}function Ph(e,n){const o=t.inject("bcBoxApi",{}),a=t.inject("bcTableApi",{}),r=t.ref(!1),i=async()=>{var m;r.value&&await Te({id:n.data.config_unique_id,mid:n.data.mid,uid:(m=n.data)==null?void 0:m.uid}).then(async h=>{var g;const _=JSON.parse(JSON.stringify(n.data.form.formConfig));_.forEach(p=>{if(p.data.baseData.el2){const v=p.data.baseData.el;p.data.baseData.el=p.data.baseData.el2,p.data.baseData.el2=v}}),h.table.form.formConfig=_,await Ae({id:n.data.config_unique_id,mid:n.data.mid,uid:(g=n.data)==null?void 0:g.uid},h),await d(_)}),r.value=!r.value},l=()=>{var m,h,_,g;zh(n.data.config_unique_id,n.data.mid,o.refreshData,(m=n.data)==null?void 0:m.uid,(_=(h=n.data)==null?void 0:h.form)==null?void 0:_.id,(g=n.data)==null?void 0:g.project_code,o==null?void 0:o.getReportBaseConfig,u).then(async p=>{var v;p==="cancel"||y._.isEmpty((v=n.data)==null?void 0:v.form)||(n.data.form.formConfig=p)})};function u(){if(typeof(o==null?void 0:o.resetReady)=="function")return o==null?void 0:o.resetReady("query");typeof(a==null?void 0:a.resetReady)=="function"&&(a==null||a.resetReady("query"))}const s=async()=>{const m=y._.cloneDeep(n.data);le({url:`/${m==null?void 0:m.project_code}-web/pri/v2/field_user/clear_user_field`,method:"post",data:{config_unique_id:m==null?void 0:m.config_unique_id,menu_id:m==null?void 0:m.mid,table_id:`form_${m.form.id}`}}).then(async()=>{o==null||o.refreshData(),await Ae({mid:m.mid,id:m.config_unique_id,uid:m==null?void 0:m.uid},{},`form_${m.form.id}`),A.ElMessage.success("重置设置成功")})},c=[{label:"高级设置",value:"222",click:l},{label:t.computed(()=>r.value?"完成排序":"排序设置"),value:"111",click:i},{label:"重置设置",value:"333",click:s}];async function d(m){var _,g,p,v,w,b;m.forEach((C,I)=>{C.sort=I});const h=m.reduce((C,I)=>(C[I.data.baseData.prop]={fieldName:I.data.baseData.label,showName:I.data.baseData.label,fieldProp:I.data.baseData.prop,fieldShow:I.data.baseData.fieldShow?1:0,userFieldShow:I.data.baseData.userFieldShow?1:0,sort:I.sort+1},C),{});return await Ae({mid:n.data.mid,id:n.data.config_unique_id,uid:(_=n.data)==null?void 0:_.uid},h,`form_${n.data.form.id}`),le({url:`/${(g=n.data)==null?void 0:g.project_code}-web/pri/v2/field_user/batch_save_user_field`,method:"post",data:{config_unique_id:(p=n.data)==null?void 0:p.config_unique_id,menu_id:(v=n.data)==null?void 0:v.mid,table_id:`form_${(b=(w=n.data)==null?void 0:w.form)==null?void 0:b.id}`,base_config:JSON.stringify({}),json_data:JSON.stringify(Object.values(h))}})}function f(m,h=600){setTimeout(()=>{var _;(_=y._.get(t.toValue(e),`componentRef.${m}`))==null||_.focus()},h)}return{isShowDrag:r,menuForm:c,setQueryFocus:f}}function Fh({props:e,formRef:n,onPageChange:o,emit:a}){const r=An(),i=P.useActiveElement$1(),l="wrap-"+P.v4(),u="query-"+P.v4(),s="table-"+P.v4();let c="",d=0,f;const m=t.inject("bcTableApi"),h=[{label:"复制",value:"copy",click:U}];P.watchOnce(()=>{var M;return(M=e.data)==null?void 0:M.config_unique_id},()=>{c=Se.value});const _=t.watch(i,M=>{var q;(M!=null&&M.closest(`#${u}`)||M!=null&&M.closest(".bc-tree-search-input"))&&(Se.value=(q=y._.cloneDeep(e.data))==null?void 0:q.config_unique_id)});t.onMounted(()=>{f||(f=P.onKeyStroke(!0,v,{dedupe:!0,eventName:"keydown"}))}),t.onActivated(()=>{var M,q;(M=e.data)!=null&&M.config_name&&(Se.value=(q=y._.cloneDeep(e.data))==null?void 0:q.config_unique_id),f||(f=P.onKeyStroke(!0,v,{dedupe:!0,eventName:"keydown"}))}),t.onDeactivated(()=>{f&&f(),f=null}),t.onBeforeUnmount(()=>{_(),Se.value=c,f&&f(),f=null});const g={Tab:N,ArrowRight:S,ArrowLeft:$,ArrowDown:D},p={Tab:w,ArrowRight:b,ArrowDown:E,ArrowLeft:C,ArrowUp:I};function v(M){var z,j,T,Q,te,W;const q=document.activeElement;if(Se.value!==((z=e.data)==null?void 0:z.config_unique_id))return;const R=m.getApi(),Z=m;let O=q.closest(`#${u}`)?"query":"table";if(q.closest(".bc-tree-search-input")&&(M.code==="ArrowRight"||M.code==="ArrowLeft")&&(O="query",r.emit("close","bc-tree-search")),q.closest(`#${u}`)||q.closest(".bc-tree-search-input")){if((j=e.data)!=null&&j.form&&!((te=(Q=(T=e.data)==null?void 0:T.form)==null?void 0:Q.baseData)!=null&&te.isClosedKeyStroke)){const K=M.code;g[K]&&g[K]({$event:M,$table:R,$api:Z,type:O})}}else{const K=M.code,Y=m==null?void 0:m.getTableConfig();p[K]&&Y&&!((W=Y==null?void 0:Y.baseData)!=null&&W.isClosedKeyStroke)&&p[K]({$event:M,$table:R,$api:Z,type:O})}if(M.code==="ArrowRight"&&a("keydown-right",{$event:M,$table:R,$api:Z,type:O}),M.code==="ArrowDown"&&a("keydown-down",{$event:M,$table:R,$api:Z,type:O}),M.code==="ArrowLeft"&&a("keydown-left",{$event:M,$table:R,$api:Z,type:O}),M.code==="ArrowUp"&&a("keydown-up",{$event:M,$table:R,$api:Z,type:O}),M.key==="Enter"&&a("keydown-enter",{$event:M,$table:R,$api:Z,type:O}),O==="table"&&R){const K=R.getRowIndex(R.getCurrentRecord());a("current-row",{row:y._.get(Z.getData(),K),rowIndex:K,code:M.code,key:M.key,e:M})}a("keydown",{$event:M,$table:R,$api:Z,type:O})}function w(M){if(M.type!=="table")return;M.$event.preventDefault();const{visibleColumn:q}=m.getApi().getTableColumn(),R=m.getActiveTab();pe.columnIndex[R]||y._.set(pe,`columnIndex.${R}`,0),pe.columnIndex[R]++,pe.columnIndex[R]>q.length-1&&y._.set(pe,`columnIndex.${R}`,0);const Z=pe.rowIndex[R];return d=0,B(q),Z!==pe.rowIndex[R]?(pe.rowIndex[R]||y._.set(pe,`rowIndex.${R}`,0),pe.rowIndex[R]--,E(M)):V()}function b({$event:M,$api:q,type:R}){if(R!=="table")return;M.preventDefault();const O=e.data.tables.find(z=>z.id===(q==null?void 0:q.getActiveTab())).baseData.table_page_data;return O.currentPage<O.pagerCount?(O.currentPage++,o({currentPage:O.currentPage,pageSize:O.pageSize}).then(()=>{const z=m.getActiveTab();return y._.set(pe,`rowIndex.${z}`,0),V()})):t.nextTick()}function C({$event:M,$api:q,type:R}){if(R!=="table")return;M.preventDefault();const O=e.data.tables.find(z=>z.id===(q==null?void 0:q.getActiveTab())).baseData.table_page_data;return O.currentPage>1?(O.currentPage--,o({currentPage:O.currentPage,pageSize:O.pageSize}).then(()=>{const z=m.getActiveTab();return y._.set(pe,`rowIndex.${z}`,0),V()})):t.nextTick()}function I(M){var R,Z,O,z;if(M.type!=="table")return;M.$event.preventDefault();const q=m.getActiveTab();if(pe.rowIndex[q]||y._.set(pe,`rowIndex.${q}`,0),pe.rowIndex[q]--,pe.rowIndex[q]<0){y._.set(pe,`rowIndex.${q}`,0);const j=(Z=(R=e.data)==null?void 0:R.tables)==null?void 0:Z.find(T=>{var Q;return T.id===((Q=M.$api)==null?void 0:Q.getActiveTab())});j&&!((O=j==null?void 0:j.baseData)!=null&&O.isClosedKeyStroke)&&((z=y._.get(t.toValue(n),"componentRef.0"))==null||z.focus(),M.$table.clearCurrentRow()),a("loop-up",M);return}return V()}function E({$event:M,$table:q,type:R}){if(R!=="table")return;M.preventDefault();const Z=m.getActiveTab(),O=q.getData();return pe.rowIndex[Z]||y._.set(pe,`rowIndex.${Z}`,0),pe.rowIndex[Z]++,pe.rowIndex[Z]>O.length-1&&y._.set(pe,`rowIndex.${Z}`,0),V()}function k(M,q){if(M.type!=="table")return;let{data:R,uniqId:Z}=m.getCheckboxRow();const O=M.$table.getCurrentRecord(),z=R.some(T=>T[Z]===O[Z]);if(z){M.$api.setCheckboxRow([O],!1,Z);return}let j=!0;typeof q=="function"&&(j=q()),j&&M.$api.setCheckboxRow([O],!z,Z)}function N(M){var j,T;if(M.type!=="query")return;M.$event.preventDefault();const q=document.activeElement,R=(j=t.toValue(n))==null?void 0:j.getComponents(),Z=R.length-1;let O=R.findIndex(Q=>(Q!=null&&Q.activeElement&&(Q=Q.activeElement()),Q==q)),z=O<0?-1:O;z++,z>Z&&(z=0),(T=M.$api)==null||T.setQueryFocus(z,0)}function $(M){var T,Q,te;if(M.type!=="query")return;const q=document.activeElement,{isSeelcted:R,selectionStart:Z}=x(q);if(q.value&&R){const W=((T=q.value)==null?void 0:T.length)||0;q.setSelectionRange(W,W);return}if(Z!==0)return;M.$event.preventDefault();const O=(Q=t.toValue(n))==null?void 0:Q.getComponents();let z=O.findIndex(W=>(W!=null&&W.activeElement&&(W=W.activeElement()),W==q)),j=z<0?O.length-1:z;j--,j<0&&(j=O.length-1),(te=M.$api)==null||te.setQueryFocus(j,0)}function S(M){var te,W,K;if(M.type!=="query")return;const q=document.activeElement,{isSeelcted:R,selectionEnd:Z}=x(q),O=((te=q.value)==null?void 0:te.length)||0;if(q.value&&R){q.setSelectionRange(O,O);return}if(Z!==O)return;M.$event.preventDefault();const z=(W=t.toValue(n))==null?void 0:W.getComponents(),j=z.length-1;let T=z.findIndex(Y=>(Y!=null&&Y.activeElement&&(Y=Y.activeElement()),Y==q)),Q=T<0?-1:T;Q++,Q>j&&(Q=0),(K=M.$api)==null||K.setQueryFocus(Q,0)}function x(M){const q=(M.selectionEnd||0)>0&&M.selectionStart!==M.selectionEnd;return{selectionStart:M.selectionStart,selectionEnd:M.selectionEnd,isSeelcted:q}}function D(M){if(M.type!=="query")return;M.$event.preventDefault();const q=m.getActiveTab();y._.set(pe,`rowIndex.${q}`,0),y._.set(pe,`columnIndex.${q}`,0);const R=document.activeElement;R==null||R.blur();const{visibleColumn:Z}=M.$table.getTableColumn();return d=0,B(Z,!1),V()}function B(M,q=!0){var O;const R=m.getActiveTab(),Z=M[pe.columnIndex[R]];!((O=Z==null?void 0:Z.editRender)!=null&&O.enabled)&&d<2&&(pe.columnIndex[R]||y._.set(pe,`columnIndex.${R}`,0),pe.columnIndex[R]++,pe.columnIndex[R]>M.length-1&&(d++,y._.set(pe,`columnIndex.${R}`,0),q&&(pe.rowIndex[R]||y._.set(pe,`rowIndex.${R}`,0),pe.rowIndex[R]++)),B(M,q))}function V(){const M=m.getActiveTab();return L(pe.rowIndex[M])}function L(M,q){var O;Se.value=(O=y._.cloneDeep(e.data))==null?void 0:O.config_unique_id;const R=m.getActiveTab(),Z=m==null?void 0:m.getApi();if(M==-1){Z==null||Z.clearCurrentRow(),y._.set(pe,`rowIndex.${R}`,0),y._.set(pe,`columnIndex.${R}`,0);return}setTimeout(()=>{var W;const z=document.activeElement;z==null||z.blur();const j=Z==null?void 0:Z.getData(M);Z==null||Z.setCurrentRow(j),Z==null||Z.scrollToRow(j);const{visibleColumn:T}=Z.getTableColumn();let Q="";typeof q=="string"&&(Q=q),typeof q=="number"&&y._.set(pe,`columnIndex.${R}`,q);const te=Q||((W=T[pe.columnIndex[R]])==null?void 0:W.field);if(te)return Z==null?void 0:Z.setEditRow(j,te).then(()=>{setTimeout(()=>{var Ze,me,Je;const re=document.querySelector(`#${s} .vxe-table`),fe=(Ze=document.activeElement)==null?void 0:Ze.closest(".vxe-table--body-wrapper"),De=(me=document.activeElement)==null?void 0:me.closest(".vxe-body--column");if(re&&fe&&De){const at=((Je=document.querySelector(`#${s} .fixed-left--wrapper .vxe-table--body`))==null?void 0:Je.offsetWidth)||0;fe.scrollLeft=De.offsetLeft-at-re.offsetWidth/2+130}},100);const K=Z==null?void 0:Z.getCurrentRecord(),{rowIndex:Y,columnIndex:ae}=(Z==null?void 0:Z.getEditRecord())||{};y._.set(pe,`rowIndex.${R}`,Y??(Z==null?void 0:Z.getRowIndex(K))??0),y._.set(pe,`columnIndex.${R}`,ae??0)})},100)}function U(M){var R;const q=((R=M.target)==null?void 0:R.value)||M.target.innerText;rs(q)}return{uid:l,query_uid:u,table_uid:s,menuTable:h,onKeydown:v,setTableCellFocus:L,tableTab:w,tableArrowRight:b,tableArrowLeft:C,tableArrowDown:E,tableArrowUp:I,tableCheckbox:k,queryTabFocus:N,queryRightFocus:S,queryLeftFocus:$,queryDownFocus:D}}const jh=["id"],Uh=t.defineComponent({__name:"bcFormTable",props:{data:{}},emits:["ready","keydown","keydown-right","keydown-down","keydown-left","keydown-up","keydown-enter","loop-up","field-change","current-row"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.ref(!1),{wrapRef:l,btnRef:u,formRef:s,btnQueryRef:c,centerSlotRef:d,tableApi:f,style:m,activeTabs:h,onReady:_,getApi:g,getActiveTab:p,setActiveTab:v}=Dh(a),{menuForm:w,isShowDrag:b,setQueryFocus:C}=Ph(s,a),{onPageChange:I,onTabClick:E,onCheckboxAll:k,onCheckboxChange:N,onResizableChange:$,onCheckboxSelect:S}=bh(h,a),{btns:x,validate:D,search:B,searchTo:V,reset:L,getQueryInstance:U,getQueryItemInstance:M}=Ih(s,a,S),{uid:q,query_uid:R,table_uid:Z,menuTable:O,setTableCellFocus:z,tableTab:j,tableArrowRight:T,tableArrowLeft:Q,tableArrowDown:te,tableArrowUp:W,tableCheckbox:K,queryTabFocus:Y,queryRightFocus:ae,queryLeftFocus:re,queryDownFocus:fe}=Fh({props:a,formRef:s,onPageChange:I,emit:r});function De(me){r("field-change",me)}function Ze(){var me;return(me=s.value)==null?void 0:me.hideShowAll()}return P.watchOnce(()=>{var me;return(me=a.data)==null?void 0:me.config_unique_id},()=>{t.nextTick(()=>{i.value=!0,r("ready",{tableApi:f,activeTabs:h,api:t.computed(()=>f.value[h.value])})})}),n({search:B,searchTo:V,reset:L,validate:D,getApi:g,getQueryInstance:U,getQueryItemInstance:M,getActiveTab:p,setActiveTab:v,setQueryFocus:C,setTableCellFocus:z,onCheckboxSelect:S,hideMultilineQuery:Ze,tableTab:j,tableArrowRight:T,tableArrowLeft:Q,tableArrowDown:te,tableArrowUp:W,tableCheckbox:K,queryTabFocus:Y,queryRightFocus:ae,queryLeftFocus:re,queryDownFocus:fe}),(me,Je)=>{var qe,vt,lt,st,St,ht;const at=t.resolveComponent("el-button"),et=t.resolveComponent("bc-context-box"),gt=t.resolveComponent("bc-tabs");return t.openBlock(),t.createElementBlock("div",{ref_key:"wrapRef",ref:l,id:t.unref(q),class:t.normalizeClass(["bc-form-table__wrapper",{"reverse-btn":(lt=(vt=(qe=e.data)==null?void 0:qe.form)==null?void 0:vt.baseData)==null?void 0:lt.isReverseBtn}])},[t.createElementVNode("div",{class:"btn-query-wapper",ref_key:"btnQueryRef",ref:c},[t.unref(x).length?(t.openBlock(),t.createBlock(t.unref(Wm),{key:0,class:"btn-box-wraper",ref_key:"btnRef",ref:u,btns:t.unref(x),"unique-id":e.data.config_unique_id,mid:e.data.mid,uid:e.data.uid},t.createSlots({_:2},[t.renderList(me.$slots,(Pe,Fe)=>({name:Fe,fn:t.withCtx(je=>[t.renderSlot(me.$slots,Fe,t.normalizeProps(t.guardReactiveProps(je||{})),void 0,!0)])}))]),1032,["btns","unique-id","mid","uid"])):t.createCommentVNode("",!0),t.unref(y._).isEmpty((St=(st=e.data)==null?void 0:st.form)==null?void 0:St.formConfig)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(et,{key:1,class:"query-box-wapper",id:t.unref(R),target:".el-form-item__label",menu:t.unref(w)},{default:t.withCtx(()=>{var Pe,Fe,je;return[t.unref(b)?(t.openBlock(),t.createBlock(t.unref(nh),t.mergeProps({key:1,ref_key:"formRef",ref:s,formConfig:e.data.form.formConfig,"onUpdate:formConfig":Je[0]||(Je[0]=pt=>e.data.form.formConfig=pt),"column-num":(je=e.data.form.baseData)==null?void 0:je.columnNum},t.unref(y._).omit(e.data.form,"formConfig"),{"unique-id":e.data.config_unique_id,mid:e.data.mid,uid:e.data.uid}),t.createSlots({"query-setting":t.withCtx(()=>[t.createVNode(et,{menu:t.unref(w),trigger:"click"},{default:t.withCtx(()=>[t.createVNode(at,{class:"query-setting",size:"small",type:"primary",icon:t.unref(P.operation_default),circle:""},null,8,["icon"])]),_:1},8,["menu"])]),_:2},[t.renderList(me.$slots,(pt,Le)=>({name:Le,fn:t.withCtx(_t=>[t.renderSlot(me.$slots,Le,t.normalizeProps(t.guardReactiveProps(_t||{})),void 0,!0)])}))]),1040,["formConfig","column-num","unique-id","mid","uid"])):(t.openBlock(),t.createBlock(t.unref(Ym),t.mergeProps({key:0,ref_key:"formRef",ref:s},e.data.form,{"column-num":(Pe=e.data.form.baseData)==null?void 0:Pe.columnNum,"hide-collapse-btn":(Fe=e.data.form.baseData)==null?void 0:Fe.isHideCollapseBtn,formConfig:e.data.form.formConfig,"unique-id":e.data.config_unique_id,mid:e.data.mid,uid:e.data.uid}),t.createSlots({"query-setting":t.withCtx(()=>[t.createVNode(et,{menu:t.unref(w),trigger:"click",style:{"margin-left":"8px"}},{default:t.withCtx(()=>[t.createVNode(at,{class:"query-setting",size:"small",type:"primary",icon:t.unref(P.operation_default),circle:""},null,8,["icon"])]),_:1},8,["menu"])]),_:2},[t.renderList(me.$slots,(pt,Le)=>({name:Le,fn:t.withCtx(_t=>[t.renderSlot(me.$slots,Le,t.normalizeProps(t.guardReactiveProps(_t||{})),void 0,!0)])}))]),1040,["column-num","hide-collapse-btn","formConfig","unique-id","mid","uid"]))]}),_:3},8,["id","menu"]))],512),me.$slots.centerSlot?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"centerSlotRef",ref:d,class:"center-slot"},[t.renderSlot(me.$slots,"centerSlot",t.normalizeProps(t.guardReactiveProps(e.data||{})),void 0,!0)],512)):t.createCommentVNode("",!0),t.unref(y._).isEmpty((ht=e.data)==null?void 0:ht.tables)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(et,{key:1,id:t.unref(Z),class:"table-box-wapper",target:".vxe-cell",menu:t.unref(O)},{default:t.withCtx(()=>[t.createVNode(gt,{multiple:"",style:t.normalizeStyle(t.unref(m)),modelValue:t.unref(h),"onUpdate:modelValue":Je[1]||(Je[1]=Pe=>t.isRef(h)?h.value=Pe:null),tabs:e.data.tables,onTabClick:t.unref(E)},t.createSlots({default:t.withCtx(({height:Pe,item:Fe})=>[t.createVNode(t.unref(xh),t.mergeProps(Object.assign(Fe,me.$attrs),{height:Pe,"unique-id":e.data.config_unique_id,mid:e.data.mid,uid:e.data.uid,"batch-id":e.data.batch_id,onReady:je=>t.unref(_)(je,Fe.id),onFieldChange:De,onPageChange:t.unref(I),onCheckboxAll:t.unref(k),onCheckboxChange:t.unref(N),onResizableChange:je=>t.unref($)(je,Fe.id)}),t.createSlots({_:2},[t.renderList(me.$slots,(je,pt)=>({name:pt,fn:t.withCtx(Le=>[t.renderSlot(me.$slots,pt,t.normalizeProps(t.guardReactiveProps(Le||{})),void 0,!0)])}))]),1040,["height","unique-id","mid","uid","batch-id","onReady","onPageChange","onCheckboxAll","onCheckboxChange","onResizableChange"])]),_:2},[t.renderList(me.$slots,(Pe,Fe)=>({name:Fe,fn:t.withCtx(je=>[t.renderSlot(me.$slots,Fe,t.normalizeProps(t.guardReactiveProps(je||{})),void 0,!0)])}))]),1032,["style","modelValue","tabs","onTabClick"])]),_:3},8,["id","menu"])),me.$slots.customeContent&&i.value?(t.openBlock(),t.createElementBlock("div",{key:2,style:t.normalizeStyle(t.unref(m))},[t.renderSlot(me.$slots,"customeContent",t.normalizeProps(t.guardReactiveProps(e.data||{})),void 0,!0)],4)):t.createCommentVNode("",!0)],10,jh)}}}),Hh=P._export_sfc(Uh,[["__scopeId","data-v-8bc2dfb0"]]);function Wh(e,n){const o=An(),a=An(),r=t.ref(""),i=t.ref({data:{},isSelected:!0,uniqId:"id"}),l=t.inject("bcBoxApi",{}),u=t.shallowRef(),s=t.ref(qe()),c=()=>s.value.config_unique_id,d=(F=0)=>F==-1?s.value.tables.map(H=>H.id):s.value.tables.map(H=>H.id)[F],f=()=>{var F;return(F=u.value)==null?void 0:F.getActiveTab()},m=(F,H)=>{(H?[H]:d(-1)).map(ee=>{rt.value[ee]=F})},h=(F,H)=>{(H?[H]:d(-1)).map(ee=>{sr.value[ee]=F})},_=()=>{const F=f();return s.value.tables.findIndex(H=>H.id===F)},g=(F=0)=>{var X;const H=d(F);(X=u.value)==null||X.setActiveTab(H)},p=F=>s.value.btns.find(H=>H.data.key===F),v=(F,H=!0)=>{const X=Array.isArray(F)?F:[F],ee=s.value.btns.reduce((oe,ne)=>(y._.set(oe,ne.data.key,ne),oe),{});X.forEach(oe=>{const ne=y._.get(ee,oe);ne&&(ne.data.isShow=!H)})},w=(F,H=!0)=>{const X=Array.isArray(F)?F:[F],ee=s.value.btns.reduce((oe,ne)=>(y._.set(oe,ne.data.key,ne),oe),{});X.forEach(oe=>{const ne=y._.get(ee,oe);ne&&(ne.data.disabled=H)})},b=F=>r.value=F,C=()=>s.value,I=F=>s.value.form.formConfig.find(H=>H.data.baseData.prop===F).data,E=(F,H=!0)=>{const X=Array.isArray(F)?F:[F];if(y._.isEmpty(s.value.form))return;const ee=s.value.form.formConfig.reduce((ne,he)=>(y._.set(ne,he.data.baseData.prop,he),ne),{}),oe=y._.get(ea.value,`query.${f()}`,[]);y._.set(ea.value,`query.${f()}`,[...new Set([...oe,...X])]),X.forEach(ne=>{const he=y._.get(ee,ne);he&&(he.data.baseData.isShow=!H)})},k=(F,H=!0)=>{const X=Array.isArray(F)?F:[F],ee=s.value.form.formConfig.reduce((oe,ne)=>(y._.set(oe,ne.data.baseData.prop,ne),oe),{});X.forEach(oe=>{const ne=y._.get(ee,oe);ne&&(Reflect.has(ne.data.elData,"disabled")?ne.data.elData.disabled=H:Reflect.has(ne.data.elData.attrs,"disabled")&&(ne.data.elData.attrs.disabled=H))})},N=()=>{var F;return(F=u.value)==null?void 0:F.getQueryInstance()},$=F=>{var H;return(H=u.value)==null?void 0:H.getQueryItemInstance(F)},S=(F=0,H=600)=>{var X;return(X=u.value)==null?void 0:X.setQueryFocus(F,H)},x=(F,H)=>{var X;return(X=u.value)==null?void 0:X.setTableCellFocus(F,H)},D=F=>l==null?void 0:l.getOptions(F),B=()=>pe,V=F=>{var H;return(H=u.value)==null?void 0:H.TableTab(F)},L=F=>{var H;return(H=u.value)==null?void 0:H.tableArrowRight(F)},U=F=>{var H;return(H=u.value)==null?void 0:H.tableArrowLeft(F)},M=F=>{var H;return(H=u.value)==null?void 0:H.tableArrowDown(F)},q=F=>{var H;return(H=u.value)==null?void 0:H.tableArrowUp(F)},R=(F,H)=>{var X;return(X=u.value)==null?void 0:X.tableCheckbox(F,H)},Z=F=>{var H;return(H=u.value)==null?void 0:H.queryTabFocus(F)},O=F=>{var H;return(H=u.value)==null?void 0:H.queryRightFocus(F)},z=F=>{var H;return(H=u.value)==null?void 0:H.queryLeftFocus(F)},j=F=>{var H;return(H=u.value)==null?void 0:H.queryDownFocus(F)},T=F=>{var H;return(H=s.value.tables)==null?void 0:H.find(X=>X.id===(F||f()))},Q=(F,H=!0)=>{var oe;const X=Array.isArray(F)?F:[F],ee=(((oe=T())==null?void 0:oe.tableConfig)||[]).reduce((ne,he)=>(y._.set(ne,he.data.field,he),ne),{});X.forEach(ne=>{const he=y._.get(ee,ne);he&&(he.data.isShow=!H)})},te=F=>{var X;const H=((X=T(F))==null?void 0:X.tableConfig)||[];return y._.cloneDeep(H)},W=(F="1")=>{const H=tm(s.value);return Object.keys(H).reduce((X,ee)=>(F==="-1"&&y._.isEmpty(H[ee])||(X[ee]=H[ee]),X),{})},K=F=>{var H,X,ee,oe;if(F===void 0&&(F=!0),(F==!0||typeof F=="string")&&(F==!0||typeof F=="string")){const ne=(H=T())==null?void 0:H.baseData;if(ne)return Ss(ne,s.value.form.formData,F==="-1",!1);const he=((X=s.value.form)==null?void 0:X.formData)||{},Ie=new RegExp(Kt);return Object.keys(he).reduce((ue,ye)=>(Ie.test(ye)||F==="-1"&&y._.isEmpty(he[ye])||(ue[ye]=he[ye]),ue),{})}return(oe=(ee=s.value)==null?void 0:ee.form)==null?void 0:oe.formData},Y=(F,H)=>(y._.set(s.value,`form.formData.${F}`,H),Oe.value[e.data.config_unique_id]||(Oe.value[e.data.config_unique_id]={}),Oe.value[e.data.config_unique_id][F]=H,t.nextTick()),ae=(F,H=!1)=>{const X={...K(!1),...F};return s.value.form.formData=re(X),Oe.value[e.data.config_unique_id]=X,H&&(xr.value[e.data.config_unique_id]=F),t.nextTick()};function re(F){return new Proxy(y._.cloneDeep(F),{get:function(H,X,ee){return Reflect.get(H,X,ee)},set:function(H,X,ee,oe){const ne=X,he=Reflect.get(H,ne,oe);return n("field-change",{type:"query",row:H,key:ne,value:ee,oldValue:he}),Oe.value[e.data.config_unique_id]||(Oe.value[e.data.config_unique_id]={}),Oe.value[e.data.config_unique_id][ne]=ee,Reflect.set(H,ne,ee,oe)}})}const fe=(F,H)=>{var X;return(X=u.value)==null?void 0:X.search(F,H)},De=(F,H)=>{var X;return(X=u.value)==null?void 0:X.searchTo(F,H)},Ze=(F=!1)=>{var H;return(H=u.value)==null?void 0:H.reset(F)},me=F=>{var H;return(H=u.value)==null?void 0:H.getApi(F)};function Je(F){if(!y._.isEmpty(F))for(let H in F)s.value.form.formData[H]=F[H]}async function at(){var H,X;const F=await ce.get(ta);(H=s.value.tables)==null||H.forEach(ee=>{var oe;if(ee.tableData=[],ee.baseData.is_apply_page){const ne=y._.get(F,`_user_pageSize.${ee.baseData.id}`,F==null?void 0:F._sys_pageSize);ee.baseData.table_page_data.currentPage=1,ee.baseData.table_page_data.total=0,ee.baseData.table_page_data.pageSize=Number(ne)}(oe=me(ee.id))==null||oe.clearAll(),y._.isEmpty(s.value.form)||delete s.value.form.formData[`${eo}${ee.id}`]}),y._.isEmpty(s.value.form)||(X=N())==null||X.clearValidate(),lt()}function et(F,H){const X=s.value.tables.find(ee=>ee.id===F);return X&&(X.tableData=H),t.nextTick()}function gt(){var F,H,X,ee,oe;return!y._.isEmpty((F=e.data)==null?void 0:F.form)&&((ee=(X=(H=e.data)==null?void 0:H.form)==null?void 0:X.baseData)!=null&&ee.isVerifySearch)?(oe=u.value)==null?void 0:oe.validate():t.nextTick()}function qe(){return{btns:[],config_unique_id:"",config_name:"",tables:[]}}function vt(F){var H;return y._.set(i.value,`data.${f()}`,F||[]),(H=me())==null?void 0:H.clearCheckboxRow().then(()=>{var ee;const X=y._.isEmpty(y._.get(i.value,`data.${f()}`,[]));if((ee=s.value)==null||ee.btns.filter(oe=>["exportSelect","exportSelectedData"].includes(oe.data.key)).forEach(oe=>{oe.data.disabled=X}),!X)return new Promise(oe=>{setTimeout(()=>{var ue,ye;const{data:ne,uniqId:he}=St(),Ie=((ue=me())==null?void 0:ue.getData())||[];if(!y._.isEmpty(ne)){const ze=(ne==null?void 0:ne.map(tt=>tt[he]))||[],Ue=Ie.filter(tt=>ze.includes(tt[he]));(ye=me())==null||ye.setCheckboxRow(Ue,!0),oe()}},10)})})}function lt(){var F;return Object.keys(i.value.data).forEach(H=>{y._.set(i.value,`data.${H}`,[])}),(F=s.value)==null||F.btns.filter(H=>["exportSelect","exportSelectedData"].includes(H.data.key)).forEach(H=>{H.data.disabled=!0}),d(-1).forEach(H=>{var X;(X=me(H))==null||X.clearCheckboxRow()}),t.nextTick()}function st(F,H=!0,X){if(i.value.uniqId=X||i.value.uniqId,!i.value.uniqId)return console.error("未设置uniqId唯一匹配值"),t.nextTick();let ee=y._.get(i.value,`data.${f()}`,[]);if(i.value.isSelected=H,H)ee=y._.uniqBy([...ee,...F],i.value.uniqId);else{const oe=F.map(ne=>ne[i.value.uniqId]);ee=ee.filter(ne=>!oe.includes(ne[i.value.uniqId]))}return y._.set(i.value,`data.${f()}`,ee),t.nextTick().then(()=>{var ne,he,Ie;X&&((he=(ne=me())==null?void 0:ne.clearCheckboxRow())==null||he.then(()=>{var Ue,tt;const{data:ue,uniqId:ye}=St(),ze=((Ue=me())==null?void 0:Ue.getData())||[];if(!y._.isEmpty(ue)){const It=(ue==null?void 0:ue.map(Lt=>Lt[ye]))||[],yt=ze.filter(Lt=>It.includes(Lt[ye]));(tt=me())==null||tt.setCheckboxRow(yt,!0)}}));const oe=y._.isEmpty(y._.get(i.value,`data.${f()}`,[]));return(Ie=s.value)==null||Ie.btns.filter(ue=>["exportSelect","exportSelectedData"].includes(ue.data.key)).forEach(ue=>{ue.data.disabled=oe}),t.nextTick()})}function St(F=f()){const H=F=="-1"?y._.uniqBy(Object.values(y._.get(i.value,"data",{})).flat(1),i.value.uniqId):y._.get(i.value,`data.${F}`,[]);return{...i.value,data:H.map(X=>y._.omit(X,["customTotal","_X_ROW_KEY"]))}}function ht(F){if(!F)return A.ElMessage.error("请选择要删除的数据!");const H=y._.isString(F)?F:y._.get(F,i.value.uniqId);Object.entries(i.value.data).forEach(([X,ee])=>{const oe=ee.findIndex(ne=>y._.get(ne,i.value.uniqId)==H);if(oe>-1){const[ne]=ee.splice(oe,1);me(X).setCheckboxRow(ne,!1)}})}function Pe(F,H){const X=i.value.uniqId,ee=y._.get(i.value,`data.${f()}`,[]).find(oe=>oe[X]===F[X]);ee&&(ee[H]=F[H])}async function Fe(F,H){const{tableId:X,...ee}=F,oe=X||f();return rt.value[oe]=typeof H=="function"?H:void 0,fe(oe,ee)}function je(){const F=s.value.tables.find(H=>H.id===f());F.baseData.loading=!0}function pt(){const F=s.value.tables.find(H=>H.id===f());F.baseData.loading=!1}let Le=0;o.on("cell-value-changed",F=>{Le=F,Le||a.emit("updated-cell-value")});const _t=(F,H=["customTotal","_X_ROW_KEY","_X_ROW_CHILD"])=>{var oe;const X=F==="-1"?f():F||f(),ee=(oe=s.value.tables)==null?void 0:oe.find(ne=>ne.id===X);return F=="-1"&&(ee!=null&&ee.baseData.isSimulate||ee!=null&&ee.baseData.isGetCanche)?t.nextTick().then(()=>Le?new Promise(ne=>{a.on("updated-cell-value",async()=>{if(Le)return;const he=await Te({mid:s.value.mid,id:s.value.config_unique_id},s.value.uuid?`cache_${X}_${s.value.uuid}`:`cache_${X}`);ne(he||[]),a.clear()})}):Te({mid:s.value.mid,id:s.value.config_unique_id},s.value.uuid?`cache_${X}_${s.value.uuid}`:`cache_${X}`).then(ne=>ne||[])):((ee==null?void 0:ee.tableData)||[]).map(ne=>y._.omit(ne,H))},ro=(F,H)=>{var oe,ne,he,Ie,ue;const X=H||f(),ee=T(X);if((oe=ee==null?void 0:ee.baseData)!=null&&oe.isSimulate||(ne=ee==null?void 0:ee.baseData)!=null&&ne.isGetCanche){const ye=((he=ee.baseData.table_page_data)==null?void 0:he.pageSize)||10;return em({mid:e.data.mid,id:e.data.config_unique_id,uid:(Ie=e.data)==null?void 0:Ie.uid,uuid:(ue=e.data)==null?void 0:ue.uuid,tableId:ee.id,data:F,pageSize:ye,is_apply_page:ee.baseData.is_apply_page}).then(ze=>(ee.baseData.is_apply_page&&(ee.baseData.table_page_data.currentPage=1,ee.baseData.table_page_data.pageSize=ye,ee.baseData.table_page_data.total=ze.totalPage),et(X,ze.currentData)))}return ee!=null&&ee.baseData.is_apply_page&&(ee.baseData.table_page_data.total=F.length),y._.set(vs,X,F),et(X,F)};function qn(F,H="id"){var ne;const X=f(),ee=((ne=s.value.tables.find(he=>he.id===X))==null?void 0:ne.tableData)||[];return(Array.isArray(F)?F:[F]).forEach(he=>{const Ie=ee.find(ue=>ue[H]===he[H]);Ie&&Object.assign(Ie,y._.omit(he,["customTotal","_X_ROW_KEY","_X_ROW_CHILD"]))}),t.nextTick()}function zn(F,H,X="id"){var he;const ee=f(),oe=((he=s.value.tables.find(Ie=>Ie.id===ee))==null?void 0:he.tableData)||[],ne=oe.findIndex(Ie=>Ie[X]===H[X]);if(ne>-1){const Ie=Array.isArray(F)?F:[F];oe.splice(ne-1<0?0:ne-1,0,...Ie)}return t.nextTick()}function Pn(F,H,X="id"){var he;const ee=f(),oe=((he=s.value.tables.find(Ie=>Ie.id===ee))==null?void 0:he.tableData)||[],ne=oe.findIndex(Ie=>Ie[X]===H[X]);if(ne>-1){const Ie=Array.isArray(F)?F:[F];oe.splice(ne+1,0,...Ie)}return t.nextTick()}return{btnKey:r,formTableRef:u,formTableData:s,search:fe,searchTo:De,reset:Ze,getData:_t,setData:ro,insertBefore:zn,insertAfter:Pn,setRow:qn,getApi:me,getConfigId:c,getTab:d,setTab:g,hideBtn:v,hideQuery:E,hideColumn:Q,setBtnDisabled:w,setQueryDisabled:k,fetchTableData:Fe,setTableAsyncFun:m,setTableBeforeAsyncFun:h,showLoading:je,hideLoading:pt,getActiveTab:f,getTabIndex:_,clearTableData:at,getDataInstance:C,getBtnConfig:p,getQueryItemInstance:$,getQueryConfig:I,getQueryData:K,getShowQueryData:W,getTableConfig:T,getColumnConfigs:te,getCellIndex:B,setQueryData:ae,updateQueryData:Y,setQueryFocus:S,setTableCellFocus:x,updateSearchForm:Je,updateTableData:et,searchValidate:gt,getInitTableData:qe,setCheckboxRow:st,getCheckboxRow:St,removeCheckboxRow:ht,resetCheckboxRow:vt,updateCheckboxRow:Pe,clearCheckboxRow:lt,getOptions:D,setBtnKey:b,tableTab:V,tableArrowRight:L,tableArrowLeft:U,tableArrowDown:M,tableArrowUp:q,tableCheckbox:R,queryTabFocus:Z,queryRightFocus:O,queryLeftFocus:z,queryDownFocus:j,proxyFormData:re}}const Kh=t.defineComponent({__name:"bcTable",props:{data:{},isStatic:{type:Boolean,default:!0}},emits:["ready","destroy","field-change","reset-attr","reset-ready"],setup(e,{emit:n}){const o=e,a=n,r=An();let i=!1,l=[];const u=t.inject("bcBoxApi",{}),{btnKey:s,formTableRef:c,formTableData:d,search:f,searchTo:m,reset:h,getData:_,setData:g,hideBtn:p,hideQuery:v,hideColumn:w,setBtnDisabled:b,setQueryDisabled:C,insertBefore:I,insertAfter:E,setRow:k,getApi:N,getTab:$,getConfigId:S,setTab:x,fetchTableData:D,setTableAsyncFun:B,setTableBeforeAsyncFun:V,showLoading:L,hideLoading:U,getActiveTab:M,getTabIndex:q,clearTableData:R,getDataInstance:Z,getBtnConfig:O,getQueryItemInstance:z,getQueryConfig:j,getQueryData:T,getShowQueryData:Q,getTableConfig:te,getColumnConfigs:W,getCellIndex:K,setQueryData:Y,updateQueryData:ae,setQueryFocus:re,setTableCellFocus:fe,updateSearchForm:De,updateTableData:Ze,searchValidate:me,getInitTableData:Je,setCheckboxRow:at,getCheckboxRow:et,removeCheckboxRow:gt,resetCheckboxRow:qe,clearCheckboxRow:vt,updateCheckboxRow:lt,getOptions:st,setBtnKey:St,tableTab:ht,tableArrowRight:Pe,tableArrowLeft:Fe,tableArrowDown:je,tableArrowUp:pt,tableCheckbox:Le,queryTabFocus:_t,queryRightFocus:ro,queryLeftFocus:qn,queryDownFocus:zn,proxyFormData:Pn}=Wh(o,a);t.onBeforeMount(()=>{var ue;o.isStatic&&((ue=ke())!=null&&ue.mid)&&(dn.value[ke().mid]=!0)}),t.onActivated(()=>{var ue;i&&((ue=ke())!=null&&ue.isSearch)&&f()}),r.on("is-ready",ue=>{var ye;i=ue,(ye=ke())!=null&&ye.isSearch&&f()});async function F(ue){t.nextTick(()=>{r.emit("is-ready",!0);const ye=Zf(y._.cloneDeep(d.value)),ze=t.computed(()=>{var Ue;return(Ue=d.value.form)==null?void 0:Ue.formData});Se.value=d.value.config_unique_id,a("ready",{...ue,configData:ye,search:f,searchTo:m,reset:h,getApi:N,getTab:$,getConfigId:S,setTab:x,hideBtn:p,hideQuery:v,hideColumn:w,setBtnDisabled:b,setQueryDisabled:C,getActiveTab:M,getTabIndex:q,data:d,dataInstance:d,getData:_,setData:g,insertBefore:I,insertAfter:E,setRow:k,getDataInstance:Z,fetchTableData:D,setTableAsyncFun:B,setTableBeforeAsyncFun:V,formData:ze,setQueryData:Y,updateQueryData:ae,tableIndex:pe,getCellIndex:K,getQueryData:T,getShowQueryData:Q,getQueryItemInstance:z,getTableConfig:te,getColumnConfigs:W,getBtnConfig:O,getQueryConfig:j,setQueryFocus:re,setTableCellFocus:fe,showLoading:L,hideLoading:U,setCheckboxRow:at,getCheckboxRow:et,removeCheckboxRow:gt,resetCheckboxRow:qe,clearCheckboxRow:vt,updateCheckboxRow:lt,getOptions:st,tableTab:ht,tableArrowRight:Pe,tableArrowLeft:Fe,tableArrowDown:je,tableArrowUp:pt,tableCheckbox:Le,queryTabFocus:_t,queryRightFocus:ro,queryLeftFocus:qn,queryDownFocus:zn})})}function H(ue){a("field-change",ue)}const X=t.watch(()=>{var ue;return(ue=o.data)==null?void 0:ue.config_unique_id},async()=>{await ne(o.data)},{immediate:!0});async function ee(ue){d.value=Je(),await ne(ue),setTimeout(()=>{a("reset-attr")})}function oe(ue){a("reset-ready",ue)}async function ne(ue){var ye,ze,Ue,tt,It;if(ue){if(d.value=await oa(ue),y._.isEmpty((ze=(ye=d.value)==null?void 0:ye.form)==null?void 0:ze.formData)||(d.value.form.formData=Pn(d.value.form.formData)),un.value&&typeof(u==null?void 0:u.emitAttr)=="function"&&setTimeout(()=>{u==null||u.emitAttr()}),un.value=!1,(Ue=u==null?void 0:u.isInitLoad)!=null&&Ue.value){const yt=y._.cloneDeep(xr.value[d.value.config_unique_id]);y._.isEmpty(yt)||(y._.isEmpty((tt=d.value.form)==null?void 0:tt.formData)?d.value.form.formData=yt:y._.merge(d.value.form.formData,yt)),he()}Oe.value[o.data.config_unique_id]=y._.cloneDeep((It=d.value.form)==null?void 0:It.formData),typeof(u==null?void 0:u.setInitLoad)=="function"&&(u==null||u.setInitLoad(!0))}else d.value=Je();ue&&setTimeout(()=>{var io,Wr,Kr;(io=c.value)==null||io.onCheckboxSelect();const{data:yt,uniqId:Lt}=et(),mn=((Wr=N())==null?void 0:Wr.getData())||[];if(!y._.isEmpty(yt)){const Rc=(yt==null?void 0:yt.map(Ca=>Ca[Lt]))||[],Ac=mn.filter(Ca=>Rc.includes(Ca[Lt]));(Kr=N())==null||Kr.setCheckboxRow(Ac,!0)}})}function he(ue,ye){var Ue,tt,It;const ze=y._.isEmpty(ye)?(It=(tt=(Ue=o.data)==null?void 0:Ue.form)==null?void 0:tt.baseData)!=null&&It.isShowQuerySearch?Q():T(!1):ye;Xf(d,ue,ze)}function Ie(ue){var ye,ze;(ue.includes(((ye=o==null?void 0:o.data)==null?void 0:ye.mid)||"")||ue.length==0)&&(l=y._.cloneDeep(_()||[]),h(!0),R(),(ze=c.value)==null||ze.hideMultilineQuery())}return an.on("closeTabs",Ie),t.onBeforeUnmount(()=>{var ue;a("destroy",y._.isEmpty(l)?y._.cloneDeep(_()):y._.cloneDeep(l)),X(),an.off("closeTabs",Ie),(ue=$(-1))==null||ue.forEach(ye=>{y._.set(ea.value,`query.${ye}`,[])})}),t.provide("bcTableApi",{search:f,reset:h,getApi:N,getData:_,getTab:$,getConfigId:S,setTab:x,hideBtn:p,hideQuery:v,hideColumn:w,setBtnDisabled:b,setQueryDisabled:C,getActiveTab:M,getTabIndex:q,clearTableData:R,getDataInstance:Z,updateSearchForm:De,updateTableData:Ze,searchValidate:me,reloadCountTableData:he,getQueryData:T,getShowQueryData:Q,setQueryData:Y,getQueryConfig:j,setTableCellFocus:fe,setQueryFocus:re,resetCheckboxRow:qe,clearCheckboxRow:vt,updateCheckboxRow:lt,setCheckboxRow:at,getCheckboxRow:et,removeCheckboxRow:gt,getTableConfig:te,getColumnConfigs:W,getOptions:st,proxyFormData:Pn,btnKey:s,setBtnKey:St,refreshData:ee,resetReady:oe}),(ue,ye)=>(t.openBlock(),t.createBlock(Hh,{ref_key:"formTableRef",ref:c,data:t.unref(d),isStatic:e.isStatic,onReady:F,onFieldChange:H},t.createSlots({_:2},[t.renderList(ue.$slots,(ze,Ue)=>({name:Ue,fn:t.withCtx(tt=>[t.renderSlot(ue.$slots,Ue,t.normalizeProps(t.guardReactiveProps(tt||{})))])}))]),1032,["data","isStatic"]))}}),Zh=t.defineComponent({__name:"index",props:{options:{type:Object,default:()=>({scrollX:!0,scrollY:!1})}},setup(e,{expose:n}){const o=e,a=t.shallowRef(),r=t.shallowRef(),i=t.shallowRef();function l(){a.value&&(r.value=new P.BScroll(a.value,o.options))}const{width:u,height:s}=P.useElementSize(i);return t.watch([()=>u.value,()=>s.value],()=>{var c;(c=r.value)==null||c.refresh()}),t.onMounted(()=>{l()}),t.onBeforeUnmount(()=>{var c;(c=r.value)==null||c.destroy()}),n(new Proxy({},{get(c,d){var f;return(f=r.value)==null?void 0:f[d]},has(c,d){return r.value?d in r.value:!1}})),(c,d)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"bsWrap",ref:a,class:"bs-wrap"},[t.createElementVNode("div",{ref_key:"bsContent",ref:i,class:"bs-content"},[t.renderSlot(c.$slots,"default",{},void 0,!0)],512)],512))}}),Jh=P._export_sfc(Zh,[["__scopeId","data-v-6176e811"]]),Gh={class:"item-wrap"},Qh=["id","onClick"],Yh=t.defineComponent({__name:"bcTabs",props:t.mergeModels({tabs:{},type:{default:"card"},label:{default:"tableName"},value:{default:"id"},multiple:{type:Boolean,default:!1},showContent:{type:Boolean,default:!0},showALLTabs:{type:Boolean,default:!1},searchKey:{}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:t.mergeModels(["tab-click"],["update:modelValue"]),setup(e,{emit:n}){const o=n,a=e,r=t.useModel(e,"modelValue"),i=t.ref(),l=t.ref(""),u=t.shallowRef(),s=t.shallowRef(),c=t.shallowRef(),{height:d}=P.useElementSize(s),{height:f}=P.useElementSize(c),m=t.computed(()=>d.value-f.value),h=t.ref(!1),_=t.reactive({width:"0px",transform:"translateX(0px)"}),g=t.computed(()=>a.tabs.length?a.showALLTabs?!0:a.tabs.length>1:!1);t.watch(r,E=>{i.value=a.tabs.find(k=>y._.get(k,a.value)===E),t.nextTick(()=>{var N,$;const k=(N=c.value)==null?void 0:N.querySelector(".item.active");k&&(_.width=k.offsetWidth+"px",_.transform=`translateX(${k.offsetLeft}px)`,($=u.value)==null||$.scrollToElement(k,300,!0,!0))})},{immediate:!0}),t.watch(()=>a.tabs.length,E=>{!E||!a.searchKey||setTimeout(()=>{var $,S,x,D,B;const k=(S=($=u.value)==null?void 0:$.$el)==null?void 0:S.offsetWidth,N=(B=(D=(x=u.value)==null?void 0:x.$el)==null?void 0:D.querySelector(".bs-content"))==null?void 0:B.offsetWidth;h.value=N>k})});function p(E){r.value=E[a.value];const k=a.tabs.findIndex(N=>y._.get(N,a.value)===E[a.value]);o("tab-click",{index:k,value:E[a.value]}),t.nextTick(()=>{var N;(N=document.activeElement)==null||N.blur()})}function v(E){return E||a.type}function w(E){var k,N;return((N=(k=E.find($=>y._.get($,a.value)===r.value))==null?void 0:k.baseData)==null?void 0:N.tabs)||a.type}function b(E,k){const N=E?a.tabs.filter(C(E)):a.tabs;k(N)}function C(E){return k=>t.toValue(k)[a.searchKey].toLowerCase().indexOf(E.toLowerCase())===0}function I(E){var k;(k=E.target)==null||k.select()}return(E,k)=>{const N=t.resolveComponent("bc-icon"),$=t.resolveComponent("el-autocomplete");return t.openBlock(),t.createElementBlock("div",{ref_key:"wrapRef",ref:s,class:"tabs-wrapper bc-tabs"},[t.createElementVNode("div",{ref_key:"headRef",ref:c,class:t.normalizeClass(["tabs-head",g.value?"min-h-16":"min-h-2"])},[t.renderSlot(E.$slots,"left",{},void 0,!0),h.value?(t.openBlock(),t.createBlock($,{key:0,style:{width:"120px","margin-right":"10px"},clearable:"",placeholder:"关键字搜索",modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=S=>l.value=S),"value-key":e.searchKey,"fetch-suggestions":b,onSelect:p,onFocus:I},{prepend:t.withCtx(()=>[t.createVNode(N,{name:"ele-Search"})]),_:1},8,["modelValue","value-key"])):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createBlock(t.unref(Jh),{key:1,ref_key:"betterScrollRef",ref:u,class:"flex-1"},{default:t.withCtx(()=>[t.createElementVNode("div",Gh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabs,(S,x)=>{var D;return t.openBlock(),t.createElementBlock("div",{key:t.unref(y._).get(S,e.value),class:t.normalizeClass(["item",{active:r.value===t.unref(y._).get(S,e.value)},v((D=S==null?void 0:S.baseData)==null?void 0:D.tabs)]),id:`tab_${t.unref(y._).get(S,e.value)}`,onClick:B=>p(S)},[E.$slots[`tab_${x}`]?t.renderSlot(E.$slots,`tab_${x}`,t.mergeProps({key:0,ref_for:!0},S||{}),void 0,!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(t.unref(y._).get(S,e.label)||t.unref(y._).get(S,`baseData.${e.label}`)),1)],64))],10,Qh)}),128)),w(e.tabs)==="line"?(t.openBlock(),t.createElementBlock("span",{key:0,class:"item-line",style:t.normalizeStyle(_)},null,4)):t.createCommentVNode("",!0)])]),_:3},512)):t.createCommentVNode("",!0)],2),!e.multiple&&e.showContent?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tabs-content",style:t.normalizeStyle({height:m.value+"px"})},[t.renderSlot(E.$slots,"default",{height:m.value,item:i.value},void 0,!0)],4)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.multiple&&e.showContent?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.tabs,S=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:t.unref(y._).get(S,e.value),class:"tabs-content",style:t.normalizeStyle({height:m.value+"px"})},[t.renderSlot(E.$slots,"default",{height:m.value,item:S},void 0,!0)],4)),[[t.vShow,r.value===t.unref(y._).get(S,e.value)]])),128)):t.createCommentVNode("",!0)],512)}}}),Xh=P._export_sfc(Yh,[["__scopeId","data-v-54ffaa96"]]);function ep(e){const n=t.shallowRef(),o="p_"+Math.random().toString(36).substring(2,15),a=t.ref(0),r=t.ref(0),i=t.ref(),l=t.ref(!1),u=t.ref(e.menu||[]),s=t.ref({});function c(h,_){return h.split(",").every(p=>!(_!=null&&_.closest(p)))}function d(h){e.disabled||e.target&&c(e.target,h.target)||(h.preventDefault(),h.stopPropagation(),typeof e.getMenu=="function"?u.value=e.getMenu():u.value=e.menu,i.value=h,l.value=u.value.length>0,a.value=h.clientX,r.value=h.clientY,t.nextTick(()=>{const _=document.querySelector(`#${o}`);s.value=_.getBoundingClientRect(),h.clientX+s.value.width>window.innerWidth&&(a.value=window.innerWidth-s.value.width-20,r.value=h.clientY+20)}))}function f(h){h.target.closest(".context-wrap__content")||m()}function m(){l.value=!1,s.value={}}return t.onMounted(()=>{var h;(h=n.value)==null||h.addEventListener(e.trigger,d),document.addEventListener("click",f,!0),document.addEventListener("contextmenu",f,!0)}),t.onBeforeUnmount(()=>{var h;(h=n.value)==null||h.removeEventListener(e.trigger,d),document.removeEventListener("click",f,!0),document.removeEventListener("contextmenu",f,!0)}),{x:a,y:r,wrapId:o,isShow:l,menuList:u,mouseEvent:i,popupSize:s,contextRef:n,close:m}}const tp=["id"],np=["onClick"],op=t.defineComponent({__name:"bcContextBox",props:{menu:{},target:{},disabled:{type:Boolean,default:!1},getMenu:{},trigger:{default:"contextmenu"}},emits:["select"],setup(e,{emit:n}){const o=e,a=n,{x:r,y:i,isShow:l,menuList:u,mouseEvent:s,popupSize:c,wrapId:d,close:f,contextRef:m}=ep(o);async function h(v){typeof v.click=="function"?await v.click(s.value):a("select",{event:s.value,item:v}),f()}function _(v){const w=v;w.style.height="0"}function g(v){const w=v;w.style.height="auto";const b=w.clientHeight;w.style.height="0",requestAnimationFrame(()=>{w.style.height=b+"px",w.style.transition="all .5s"})}function p(v){const w=v;w.style.transition="none"}return(v,w)=>(t.openBlock(),t.createElementBlock("div",{class:"context-wrap",ref_key:"contextRef",ref:m},[t.renderSlot(v.$slots,"default",{},void 0,!0),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{onBeforeEnter:_,onEnter:g,onAfterEnter:p},{default:t.withCtx(()=>[t.unref(l)?(t.openBlock(),t.createElementBlock("div",{key:0,id:t.unref(d),class:"context-wrap__content context-box",style:t.normalizeStyle({left:`${t.unref(r)}px`,top:`${t.unref(i)}px`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(u),(b,C)=>(t.openBlock(),t.createElementBlock("div",{class:"content-item",key:C},[t.renderSlot(v.$slots,"content",{data:b,size:t.unref(c),close:t.unref(f)},void 0,!0),v.$slots.content?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:"content-item-text",onClick:t.withModifiers(I=>h(b),["stop"])},t.toDisplayString(t.toValue(b.label)),9,np))]))),128))],12,tp)):t.createCommentVNode("",!0)]),_:3})]))],512))}}),ap=P._export_sfc(op,[["__scopeId","data-v-48e7b2ff"]]),rp=t.defineComponent({__name:"bcSelect",props:{url:{},proxy:{},params:{},method:{},options:{},groupAttrs:{},optionAttrs:{},permissionsDict:{},field:{},uniqueId:{},mid:{},uid:{}},setup(e,{expose:n}){const o=t.inject("setItemInstance",()=>{}),a=t.inject("bcBoxApi",{}),r=t.inject("bcFormApi",{}),i=e,l=t.ref(),u=t.ref((i==null?void 0:i.options)||[]),s=t.computed({get(){return u.value||(i==null?void 0:i.options)||[]},set(g){u.value=g}});c();async function c(g={}){if(i.permissionsDict){const w=(await oo(i.mid,i.uid))[i.permissionsDict]||[];y._.isEmpty(w)||f(w);return}if(!i.url)return;const p=i.params?new Function("return "+i.params)():{};return Object.assign(p,g),d(i.url,p)}function d(g,p={},v){const w=Object.assign({menu_id:i.mid},p);return le({url:"/"+i.proxy+g,method:i.method||"get",params:w}).then(b=>{if(b){const C=typeof v=="function"?v(y._.get(b,"data")||[]):y._.get(b,"data")||[];f(C)}})}function f(g){s.value=g,typeof(r==null?void 0:r.setOptionMap)=="function"&&(r==null||r.setOptionMap(i.field,g)),typeof(a==null?void 0:a.setOptions)=="function"&&(a==null||a.setOptions(i.field,g))}function m(){l.value.getInstance().focus()}function h(){l.value.getInstance().blur()}function _(){return l.value.getInstance().inputRef}return t.onMounted(()=>{var v,w,b;const g=(v=_())==null?void 0:v.closest(".el-form-item"),p=(b=(w=g==null?void 0:g.className)==null?void 0:w.match(/query_[a-zA-Z0-9_]+/))==null?void 0:b[0];p&&o({focus:m,blur:h,activeElement:_,setOption:f,fetchData:c,getOptionList:d},p.replace("query_",""))}),n({focus:m,blur:h,activeElement:_,setOption:f,fetchData:c,getOptionList:d}),(g,p)=>{const v=t.resolveComponent("el-option"),w=t.resolveComponent("el-option-group"),b=t.resolveComponent("el-select");return t.openBlock(),t.createBlock(b,t.mergeProps({ref_key:"selectRef",ref:l},g.$attrs),{default:t.withCtx(()=>{var C;return[(C=e.groupAttrs)!=null&&C.isGroupEnabled?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(s.value,I=>(t.openBlock(),t.createBlock(w,{key:I.label,label:I.label},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.options,E=>(t.openBlock(),t.createBlock(v,{key:E[e.optionAttrs.value],value:E[e.optionAttrs.value],label:E[e.optionAttrs.label]},null,8,["value","label"]))),128))]),_:2},1032,["label"]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(s.value,I=>(t.openBlock(),t.createBlock(v,{disabled:e.optionAttrs.disabled,key:I.value,value:I[e.optionAttrs.value],label:I[e.optionAttrs.label]},null,8,["disabled","value","label"]))),128))]}),_:1},16)}}}),ip={class:"el-data-select__popover-footer"},lp=t.defineComponent({__name:"bcTreeSearch",props:{data:{},modelValue:{},url:{},proxy:{},params:{},method:{},permissionsDict:{},field:{},uniqueId:{},mid:{},uid:{},filterMethod:{},multiple:{type:Boolean,default:!1},showCheckbox:{type:Boolean},isString:{type:Boolean,default:!0},fullPth:{type:Boolean}},emits:["blur","change","focus","update:modelValue","visible-change"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.inject("setItemInstance",()=>{}),l=An(),u=t.useAttrs(),s="bcTreeInput_"+Math.random().toString(36).slice(2),c=t.shallowRef(),d=t.shallowRef(),f=t.shallowRef(),m=t.shallowRef(),h=t.ref(a.showCheckbox||!1),_=t.ref([]),g=t.ref([]),p=t.shallowRef(),v=t.shallowRef(D(a.modelValue));let w="";const b=t.shallowReactive({isFocus:!1,isVisible:!1,isClearing:!1,width:400,keyword:"",currentNodeKey:""});P.onClickOutside$1(d,W=>{const K=W.target;K!=null&&K.closest(`#${s}`)||setTimeout(()=>{!b.isClearing&&b.isVisible&&z()})}),l.on("close",W=>{W==="bc-tree-search"&&z()});const C=t.inject("bcBoxApi",{}),I=t.inject("bcFormApi",{}),E=t.shallowRef(a.data||[]),k=t.computed({get(){return E.value||[]},set(W){E.value=W}}),N=t.computed(()=>x(k.value));t.watch(()=>a.modelValue,W=>{v.value=D(W)},{deep:!0});const $=t.computed(()=>{const{label:W,value:K}=u.props;if(a.isString){const{path:Y,isFull:ae}=S(v.value);return ae?N.value.filter(De=>Y.includes(De.id)).map(De=>De[W]).join(" / "):N.value.filter(fe=>v.value.includes(fe[K])).map(fe=>fe[W]).join(" / ")}return v.value.map(Y=>Y[W]).join(" / ")});M();function S(W){const Y=(Array.isArray(W)?W:[W]).map(re=>re==null?void 0:re.split("/")).flat().filter(Boolean),ae=Y.length!==W.length&&a.fullPth;return{path:Y,isFull:ae}}function x(W){const K=[],{children:Y}=u.props;function ae(re,fe=[]){return re.reduce((De,Ze)=>{var me;return De.push(Ze),(me=y._.get(Ze,Y,[]))!=null&&me.length&&De.push(...ae(y._.get(Ze,Y,[]))),De},fe)}return ae(y._.cloneDeep(W),K),K}function D(W){if(a.isString){const Y=W?Array.isArray(W)?W:W.split(","):[];return T(Y),Y}const K=Array.isArray(W)?W:[];if(K.length>0){const{value:Y}=u.props,ae=K.map(re=>re[Y]);T(ae)}return K}async function B(W,K){if(!a.showCheckbox)return;const{value:Y,children:ae}=u.props;if(b.currentNodeKey=W[Y],a.multiple)v.value=K.checkedNodes.map(re=>y._.omit(re,ae));else{if(!y._.isEmpty(W[ae])&&a.fullPth){v.value=[],p.value.setCheckedKeys([]);return}v.value=K.checkedKeys.length?[y._.omit(W,ae)]:[]}a.isString&&(v.value=v.value.map(re=>re[Y]).toString()),r("change",v.value),r("update:modelValue",v.value)}async function V(W){var ae;if(a.showCheckbox)return;const{value:K,children:Y}=u.props;b.currentNodeKey=W[K],v.value=[y._.omit(W,Y)],a.isString&&(v.value=((ae=v.value)==null?void 0:ae.map(re=>re[K]).toString())||""),r("change",v.value),r("update:modelValue",v.value),z()}function L(W){p.value.filter(W)}function U(W,K){if(typeof a.filterMethod=="function")return a.filterMethod(W,K);const Y=u.props.label;return K[Y].includes(W)}async function M(W={}){var Y;if(a.permissionsDict){const ae=((Y=ke())==null?void 0:Y.mid)||a.mid,fe=(await oo(ae))[a.permissionsDict]||[];y._.isEmpty(fe)?console.error("字典数据为空"):(k.value=fe,typeof(I==null?void 0:I.setOptionMap)=="function"&&(I==null||I.setOptionMap(a.field,fe)),a.field&&typeof(C==null?void 0:C.setOptions)=="function"&&(C==null||C.setOptions(a.field,k.value)));return}if(!a.url){console.error("未配置url");return}const K=a.params?new Function("return "+a.params)():{};return Object.assign(K,W),q(a.url,K)}function q(W,K={},Y){const ae=Object.assign({menu_id:a.mid},K);return le({url:"/"+a.proxy+W,method:a.method||"get",params:ae}).then(re=>{re&&(k.value=typeof Y=="function"?Y(y._.get(re,"data",[])):y._.get(re,"data",[]),typeof(I==null?void 0:I.setOptionMap)=="function"&&(I==null||I.setOptionMap(a.field,re.data)),a.field&&typeof(C==null?void 0:C.setOptions)=="function"&&(C==null||C.setOptions(a.field,k.value)))})}function R(){var K;b.isClearing=!0,v.value=[],g.value=[],_.value=[],(K=p.value)==null||K.setCheckedKeys([]);const{value:W}=u.props;a.isString&&(v.value=v.value.map(Y=>Y[W]).toString()),r("change",v.value),r("update:modelValue",v.value),b.isClearing=!1}function Z(){R(),l.emit("close","bc-tree-search")}function O(){if(b.isFocus)return;const W=f.value.ref.offsetWidth||400;b.width=W<150?180:W+30,b.isFocus=!0,b.isVisible=!0,r("focus"),r("visible-change",!0,v.value),setTimeout(()=>{var K;(K=m.value)==null||K.focus(),w=Se.value,Se.value=""})}function z(){b.isFocus=!1,b.isVisible=!1,r("blur"),r("visible-change",!1,v.value),setTimeout(()=>{var W;(W=f.value)==null||W.blur(),w&&(Se.value=w)})}function j(W){k.value=W}function T(W){var K;g.value=W,(K=p.value)==null||K.setCheckedKeys(W)}function Q(W){var K;_.value=W,(K=p.value)==null||K.setExpandedKeys(W)}function te(){return c.value}return t.onMounted(()=>{var Y,ae,re;const W=(Y=te())==null?void 0:Y.closest(".el-form-item"),K=(re=(ae=W==null?void 0:W.className)==null?void 0:ae.match(/query_[a-zA-Z0-9_]+/))==null?void 0:re[0];K&&i({focus:()=>O(),blur:()=>z(),activeElement:te,clearData:Z,setOption:j,fetchData:M,getOptionList:q,setCheckedKeys:T,setExpandedKeys:Q},K.replace("query_",""))}),n({focus:()=>O(),blur:()=>z(),activeElement:te,clearData:Z,setOption:j,fetchData:M,getOptionList:q,setCheckedKeys:T,setExpandedKeys:Q}),(W,K)=>{const Y=t.resolveComponent("el-input"),ae=t.resolveComponent("el-button"),re=t.resolveComponent("el-popover");return t.openBlock(),t.createElementBlock("div",{class:"el-data-select",id:s,ref_key:"dataSelectRef",ref:c},[t.createVNode(re,{placement:"bottom-start",transition:"el-zoom-in-top",disabled:W.$attrs.disabled,visible:t.unref(b).isVisible,width:t.unref(b).width},{reference:t.withCtx(()=>[t.createVNode(Y,{ref_key:"inputRef",ref:f,class:t.normalizeClass([{input__focus:t.unref(b).isFocus},"bc-tree-search-input"]),modelValue:$.value,"onUpdate:modelValue":K[0]||(K[0]=fe=>$.value=fe),disabled:W.$attrs.disabled,placeholder:W.$attrs.placeholder,clearable:"",onClick:t.withModifiers(O,["stop"]),onClear:R},null,8,["class","modelValue","disabled","placeholder"])]),default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"popoverRef",ref:d,class:"el-data-select__popover"},[t.createVNode(Y,{ref_key:"searchRef",ref:m,size:"default",class:"bc-tree-search-input",modelValue:t.unref(b).keyword,"onUpdate:modelValue":K[1]||(K[1]=fe=>t.unref(b).keyword=fe),placeholder:"请输入",onInput:L},null,8,["modelValue"]),t.createVNode(t.unref(A.ElTreeV2),t.mergeProps({class:"el-data-select__popover-content",ref_key:"treeRef",ref:p},t.unref(u),{style:{width:"100%"},data:k.value,"current-node-key":t.unref(b).currentNodeKey,"filter-method":U,"default-expanded-keys":_.value,"default-checked-keys":g.value,"show-checkbox":h.value,onCheck:B,onNodeClick:V}),null,16,["data","current-node-key","default-expanded-keys","default-checked-keys","show-checkbox"]),t.createElementVNode("div",ip,[t.createVNode(ae,{size:"default",onClick:R},{default:t.withCtx(()=>[...K[2]||(K[2]=[t.createTextVNode("取消选择",-1)])]),_:1}),t.createVNode(ae,{size:"default",type:"primary",onClick:t.withModifiers(z,["stop"])},{default:t.withCtx(()=>[...K[3]||(K[3]=[t.createTextVNode("关闭",-1)])]),_:1})])],512)]),_:1},8,["disabled","visible","width"])],512)}}}),sp=P._export_sfc(lp,[["__scopeId","data-v-92db0f9f"]]),cp=t.defineComponent({__name:"bcTreeSelect",props:{url:{},proxy:{},params:{},method:{},data:{},permissionsDict:{},field:{},uniqueId:{},mid:{},uid:{}},setup(e,{expose:n}){const o=t.inject("setItemInstance",()=>{}),a=e,r=t.ref(),i=t.inject("bcBoxApi",{}),l=t.inject("bcFormApi",{}),u=t.ref((a==null?void 0:a.data)||[]),s=t.computed({get(){return u.value||(a==null?void 0:a.data)||[]},set(_){u.value=_}});c();async function c(_={}){if(a.permissionsDict){const v=(await oo(a.mid,a.uid))[a.permissionsDict]||[];y._.isEmpty(v)||(s.value=v,typeof(l==null?void 0:l.setOptionMap)=="function"&&(l==null||l.setOptionMap(a.field,v)),typeof(i==null?void 0:i.setOptions)=="function"&&(i==null||i.setOptions(a.field,s.value)));return}if(!a.url)return;const g=a.params?new Function("return "+a.params)():{};return Object.assign(g,_),d(a.url,g)}function d(_,g={},p){const v=Object.assign({menu_id:a.mid},g);return le({url:"/"+a.proxy+_,method:a.method||"get",params:v}).then(w=>{w&&(s.value=typeof p=="function"?p(y._.get(w,"data")||[]):y._.get(w,"data")||[],typeof(l==null?void 0:l.setOptionMap)=="function"&&(l==null||l.setOptionMap(a.field,w.data)),a.field&&typeof(i==null?void 0:i.setOptions)=="function"&&(i==null||i.setOptions(a.field,s.value)))})}function f(){r.value.focus()}function m(){r.value.blur()}function h(){return r.value.activeElement()}return t.onMounted(()=>{var p,v,w;const _=(p=h())==null?void 0:p.closest(".el-form-item"),g=(w=(v=_==null?void 0:_.className)==null?void 0:v.match(/query_[a-zA-Z0-9_]+/))==null?void 0:w[0];g&&o({focus:f,blur:m,activeElement:h,fetchData:c,getOptionList:d},g.replace("query_",""))}),n({focus:f,blur:m,activeElement:h,fetchData:c,getOptionList:d}),(_,g)=>{const p=t.resolveComponent("el-tree-select");return t.openBlock(),t.createBlock(p,t.mergeProps({ref_key:"treeRef",ref:r,class:"bc-tree-select"},_.$attrs,{data:s.value}),null,16,["data"])}}});function up(e,n){let o;const a=l=>new Promise(u=>{if(!l||!e.url||!e.qry_key){clearTimeout(o),u([]);return}let s=y._.assign(e.params,{[e.qry_key||""]:l});le({url:e.url,method:"get",params:s}).then(c=>{if(c.code!=1){clearTimeout(o),u([]);return}clearTimeout(o),console.log("res",e.url,s),c.data?Array.isArray(c.data)?u(c.data):y._.get(c,"data.customPageList")&&y._.isArray(y._.get(c,"data.customPageList"))?u(y._.get(c,"data.customPageList",[])):u([]):u([])}).catch(()=>{clearTimeout(o),u([])})});return{handleSelect:l=>{n("change",l)},querySearchAsync:async(l,u)=>{const s=await a(l);u(s)}}}const dp=t.defineComponent({__name:"bcAutoComplete",props:{qry_key:{type:String,default:""},url:{type:String,default:""},params:{type:Object,default:()=>{}},type:{type:String,default:"btn"},value_key:{type:String,default:"field_name"}},emits:["change"],setup(e,{emit:n}){const o=e,a=t.ref(""),r=n,{handleSelect:i,querySearchAsync:l}=up(o,r);return(u,s)=>{const c=t.resolveComponent("el-autocomplete");return t.openBlock(),t.createBlock(c,{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=d=>a.value=d),clearable:"",class:"inline-input w-full",placeholder:"请输入",ref:"hsAutocompleteRef","fetch-suggestions":t.unref(l),onSelect:t.unref(i),"value-key":o.value_key||"name"},null,8,["modelValue","fetch-suggestions","onSelect","value-key"])}}}),fp=t.defineComponent({name:"bcGroup",props:{value:{type:Object,required:!0},elComponent:{type:String,required:!0},fieldComponent:{type:String,required:!0}},emits:["change"],setup(e,{emit:n,expose:o}){const a=t.useAttrs(),r=t.inject("bcTableApi"),i=t.inject("setItemInstance",()=>{}),l=t.ref(),[u,s]=y._.get(e,`value.${e.fieldComponent}`,[]),c=t.ref({[u]:"",[s]:""}),d=t.ref([e.value[u],e.value[s]]);t.watch(()=>e.value,()=>{d.value=[e.value[u],e.value[s]]});function f(p){var C,I,E;const v=e.elComponent==="hs-date-picker",w=a.format==="YYYY-MM-DD",b=a["value-format"]==="YYYY-MM-DD HH:mm:ss";if(Array.isArray(p)){let[k,N]=p;v&&w&&b&&(N=N?P.hooks$1(N).format("YYYY-MM-DD")+" 23:59:59":""),c.value[u]=k,c.value[s]=N}else if(p!=null&&p.target&&((I=(C=p==null?void 0:p.target)==null?void 0:C.value)==null?void 0:I.length)===8&&e.elComponent==="hs-date-picker"){const k=((E=p==null?void 0:p.target)==null?void 0:E.value)||"";Array.from(p.target.parentNode.querySelectorAll("input")).findIndex($=>$===p.target)===0?c.value[u]=k?P.hooks$1(k).format("YYYY-MM-DD")+" 00:00:00":"":w&&b?c.value[s]=k?P.hooks$1(k).format("YYYY-MM-DD")+" 23:59:59":"":c.value[s]=k?P.hooks$1(k).format("YYYY-MM-DD"):"",d.value=[c.value[u],c.value[s]]}else c.value[u]="",c.value[s]="";r==null||r.updateSearchForm(c.value),n("change",p)}function m(){f(["",""]),d.value=["",""]}function h(){var p;return(p=l.value)==null?void 0:p.activeElement()}function _(){var p;(p=l.value)==null||p.focus()}function g(){return e.fieldComponent}return t.onMounted(()=>{var w,b,C;const p=(w=h())==null?void 0:w.closest(".el-form-item"),v=(C=(b=p==null?void 0:p.className)==null?void 0:b.match(/query_[a-zA-Z0-9_]+/))==null?void 0:C[0];v&&i({clearData:m,getField:g,focus:_,activeElement:h},v.replace("query_",""))}),o({clearData:m,getField:g,focus:_,activeElement:h}),{elRef:l,groupData:d,focus:_,onChange:f}}});function mp(e,n,o,a,r,i){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.elComponent),{ref:"elRef",modelValue:e.groupData,"onUpdate:modelValue":n[0]||(n[0]=l=>e.groupData=l),onChange:e.onChange},null,40,["modelValue","onChange"])}const hp=P._export_sfc(fp,[["render",mp],["__scopeId","data-v-91f4a951"]]),pp={class:"input-group"},_p=t.defineComponent({__name:"bcInputGroup",props:{modelValue:{required:!0,default:["",""]},modelModifiers:{}},emits:t.mergeModels(["change"],["update:modelValue"]),setup(e,{expose:n,emit:o}){const a=t.inject("setItemInstance",()=>{}),r=o,i=t.useModel(e,"modelValue"),l=t.ref(),u=t.ref();function s(){r("change",i.value)}function c(){var f,m;return((f=l.value)==null?void 0:f.activeElement())||((m=u.value)==null?void 0:m.activeElement())}function d(){var f;(f=l.value)==null||f.focus()}return t.onMounted(()=>{var h,_,g;const f=(h=c())==null?void 0:h.closest(".el-form-item"),m=(g=(_=f==null?void 0:f.className)==null?void 0:_.match(/query_[a-zA-Z0-9_]+/))==null?void 0:g[0];m&&a({focus:d,activeElement:c},m.replace("query_",""))}),n({focus:d,activeElement:c}),(f,m)=>{const h=t.resolveComponent("el-input");return t.openBlock(),t.createElementBlock("div",pp,[t.createVNode(h,t.mergeProps({ref_key:"input1",ref:l},f.$attrs,{placeholder:f.$attrs["start-placeholder"],modelValue:i.value[0],"onUpdate:modelValue":m[0]||(m[0]=_=>i.value[0]=_),onChange:s,class:"input-group-item"}),null,16,["placeholder","modelValue"]),m[2]||(m[2]=t.createElementVNode("span",{class:"input-group-tip"},"-",-1)),t.createVNode(h,t.mergeProps({ref_key:"input2",ref:u},f.$attrs,{placeholder:f.$attrs["end-placeholder"],modelValue:i.value[1],"onUpdate:modelValue":m[1]||(m[1]=_=>i.value[1]=_),onChange:s,class:"input-group-item"}),null,16,["placeholder","modelValue"])])}}}),gp=P._export_sfc(_p,[["__scopeId","data-v-cb4add98"]]);let xt={signal:1,propertyUpdate:2,init:3,idle:4,debug:5,invokeMethod:6,connectToSignal:7,disconnectFromSignal:8,setProperty:9,response:10},vp=function(e,n){if(typeof e!="object"||typeof e.send!="function"){console.error("The QWebChannel expects a transport object with a send function and onmessage callback property. Given is: transport: "+typeof e+", transport.send: "+typeof e.send);return}let o=this;this.transport=e,this.send=function(a){typeof a!="string"&&(a=JSON.stringify(a)),o.transport.send(a)},this.transport.onmessage=function(a){let r=a.data;switch(typeof r=="string"&&(r=JSON.parse(r)),r.type){case xt.signal:o.handleSignal(r);break;case xt.response:o.handleResponse(r);break;case xt.propertyUpdate:o.handlePropertyUpdate(r);break;default:console.error("invalid message received:",a.data);break}},this.execCallbacks={},this.execId=0,this.exec=function(a,r){if(!r){o.send(a);return}if(o.execId===Number.MAX_VALUE&&(o.execId=Number.MIN_VALUE),a.hasOwnProperty("id")){console.error("Cannot exec message with property id: "+JSON.stringify(a));return}a.id=o.execId++,o.execCallbacks[a.id]=r,o.send(a)},this.objects={},this.handleSignal=function(a){let r=o.objects[a.object];r?r.signalEmitted(a.signal,a.args):console.warn("Unhandled signal: "+a.object+"::"+a.signal)},this.handleResponse=function(a){if(!a.hasOwnProperty("id")){console.error("Invalid response message received: ",JSON.stringify(a));return}o.execCallbacks[a.id](a.data),delete o.execCallbacks[a.id]},this.handlePropertyUpdate=function(a){for(let r in a.data){let i=a.data[r],l=o.objects[i.object];l?l.propertyUpdate(i.signals,i.properties):console.warn("Unhandled property update: "+i.object+"::"+i.signal)}o.exec({type:xt.idle})},this.debug=function(a){o.send({type:xt.debug,data:a})},o.exec({type:xt.init},function(a){for(let r in a)new Rs(r,a[r],o);for(let r in o.objects)o.objects[r].unwrapProperties();n&&n(o),o.exec({type:xt.idle})})};function Rs(e,n,o){this.__id__=e,o.objects[e]=this,this.__objectSignals__={},this.__propertyCache__={};let a=this;this.unwrapQObject=function(s){if(s instanceof Array){let f=new Array(s.length);for(let m=0;m<s.length;++m)f[m]=a.unwrapQObject(s[m]);return f}if(!s||!s["__QObject*__"]||s.id===void 0)return s;let c=s.id;if(o.objects[c])return o.objects[c];if(!s.data){console.error("Cannot unwrap unknown QObject "+c+" without data.");return}let d=new Rs(c,s.data,o);return d.destroyed.connect(function(){if(o.objects[c]===d){delete o.objects[c];let f=[];for(let m in d)f.push(m);for(let m in f)delete d[f[m]]}}),d.unwrapProperties(),d},this.unwrapProperties=function(){for(let s in a.__propertyCache__)a.__propertyCache__[s]=a.unwrapQObject(a.__propertyCache__[s])};function r(s,c){let d=s[0],f=s[1];a[d]={connect:function(m){if(typeof m!="function"){console.error("Bad callback given to connect to signal "+d);return}a.__objectSignals__[f]=a.__objectSignals__[f]||[],a.__objectSignals__[f].push(m),!c&&d!=="destroyed"&&o.exec({type:xt.connectToSignal,object:a.__id__,signal:f})},disconnect:function(m){if(typeof m!="function"){console.error("Bad callback given to disconnect from signal "+d);return}a.__objectSignals__[f]=a.__objectSignals__[f]||[];let h=a.__objectSignals__[f].indexOf(m);if(h===-1){console.error("Cannot find connection of signal "+d+" to "+m.name);return}a.__objectSignals__[f].splice(h,1),!c&&a.__objectSignals__[f].length===0&&o.exec({type:xt.disconnectFromSignal,object:a.__id__,signal:f})}}}function i(s,c){let d=a.__objectSignals__[s];d&&d.forEach(function(f){f.apply(f,c)})}this.propertyUpdate=function(s,c){for(let d in c){let f=c[d];a.__propertyCache__[d]=f}for(let d in s)i(d,s[d])},this.signalEmitted=function(s,c){i(s,c)};function l(s){let c=s[0],d=s[1];a[c]=function(){let f=[],m;for(let h=0;h<arguments.length;++h)typeof arguments[h]=="function"?m=arguments[h]:f.push(arguments[h]);o.exec({type:xt.invokeMethod,object:a.__id__,method:d,args:f},function(h){if(h!==void 0){let _=a.unwrapQObject(h);m&&m(_)}})}}function u(s){let c=s[0],d=s[1],f=s[2];a.__propertyCache__[c]=s[3],f&&(f[0]===1&&(f[0]=d+"Changed"),r(f,!0)),Object.defineProperty(a,d,{get:function(){let m=a.__propertyCache__[c];return m===void 0&&console.warn('Undefined value in property cache for property "'+d+'" in object '+a.__id__),m},set:function(m){if(m===void 0){console.warn("Property setter for "+d+" called with undefined value!");return}a.__propertyCache__[c]=m,o.exec({type:xt.setProperty,object:a.__id__,property:c,value:m})}})}n.methods.forEach(l),n.properties.forEach(u),n.signals.forEach(function(s){r(s,!1)});for(let s in n.enums)a[s]=n.enums[s]}const yp={class:"w-[800px] flex flex-col"},bp={class:"flex justify-center items-center mt-2"},wp=t.defineComponent({__name:"highSpeedCamera",props:{proxy:String,action:String,close:Function,data:Object},emits:["onSuccess"],setup(e,{emit:n}){const o=e;t.onMounted(()=>{s()});let a="ws://127.0.0.1:12345",r,i;const l=t.ref(!1),u=t.ref(!1),s=()=>{r=new WebSocket(a),r.onclose=()=>{console.log("ws close")},r.onerror=()=>{console.log("ws error")},r.onopen=()=>{console.log("ws open"),new vp(r,f=>{console.log("channel",f),i=f.objects.dialog,console.log("dialog",i),document.getElementById("devList").onchange=()=>{let m=document.getElementById("resolutionList");m.options.length=0;let h=document.getElementById("modelList");h.options.length=0;let _=document.getElementById("devList");console.log("select.value====设备列表点击",_.value),i.devChanged("primaryDev_:"+_.value)},document.getElementById("modelList").onchange=()=>{let m=document.getElementById("resolutionList");m.options.length=0;let h=document.getElementById("modelList");console.log("select.value====模式列表点击",h.value),i.devChanged("primaryDev_:"+h.value)},document.getElementById("resolutionList").onchange=()=>{let m=document.getElementById("resolutionList");console.log("select.value====分辨率列表点击",m.value),i.devChanged("primaryDev_:"+m.value)},document.getElementById("openPriVideo").onclick=c,document.getElementById("closePriVideo").onclick=function(){i.get_actionType("closePriVideo")},document.getElementById("photographPri").onclick=()=>{u.value=!0,i.photoBtnClicked("primaryDev_"),i.get_actionType("savePhotoPriDev")},i.sendPrintInfo.connect(function(m){if(console.log("message=======>>>>>",m),m.indexOf("priDevName:")>=0){m=m.substr(11);let h=document.getElementById("devList");m.indexOf("USB")>=0?h.add(new Option(m)):h.add(new Option(m),0),h.selectedIndex=0}if(m.indexOf("priModel:")>=0){m=m.substr(9);let h=document.getElementById("modelList");m.indexOf("MJPG")>=0?h.add(new Option(m),0):h.add(new Option(m)),h.selectedIndex=0}if(m.indexOf("priResolution:")>=0){m=m.substr(14);let h=document.getElementById("resolutionList");h.add(new Option(m)),h.options.length>1&&(h.selectedIndex=1)}else m.indexOf("savePhoto_success:")>=0}),i.send_priPhotoData.connect(m=>{let h="data:image/jpg;base64,"+m;i.get_actionType("closePriVideo");let _=new Date,g=_.getFullYear().toString(),p=(_.getMonth()+1).toString(),v=_.getDate().toString(),w=_.getHours().toString(),b=_.getMinutes().toString(),C=_.getSeconds().toString(),I=_.getMilliseconds().toString(),E=g+p+v+w+b+C+I+".jpg";for(var k=h.split(","),N=k[0].match(/:(.*?);/)[1],$=atob(k[1]),S=$.length,x=new Uint8Array(S);S--;)x[S]=$.charCodeAt(S);let D=new File([x],E,{type:N});l.value||(l.value=!0,le({url:o.proxy+(o.action||"/pri/file/singlefile"),method:"post",data:{file:D,...o.data},headers:{"Content-Type":"multipart/form-data"}}).then(B=>{u.value=!1,o.close({type:"success",data:B,image:h})}).catch(B=>{u.value=!1,l.value=!1}))}),i.send_priImgData.connect(m=>{let h=document.getElementById("bigPriDev");h&&(h.src="data:image/jpg;base64,"+m)}),i.html_loaded("one")})}};function c(){console.log("clickHandler");let f=document.getElementById("resolutionList");f.options.length=0;let m=document.getElementById("modelList");m.options.length=0;let h=document.getElementById("devList");i.devChanged("primaryDev_:"+h.value),i.html_loaded("one")}function d(){try{i.get_actionType("closePriVideo"),i.get_actionType("closeSignal")}catch(f){console.log("e",f)}}return t.onUnmounted(()=>{d()}),window.onbeforeunload=()=>{d()},(f,m)=>{const h=t.resolveComponent("el-button"),_=t.resolveDirective("loading");return t.withDirectives((t.openBlock(),t.createElementBlock("div",yp,[m[2]||(m[2]=t.createStaticVNode('<div class=""><img id="bigPriDev" width="800" height="580"></div><div class="flex items-center py-1"><span>设备列表:</span><select id="devList" style="width:120px;"></select><select id="modelList" style="width:120px;"></select><select id="resolutionList" style="width:120px;"></select><input id="openPriVideo" type="button" value="打开视频"><input id="closePriVideo" type="button" value="关闭视频"></div>',2)),t.createElementVNode("div",bp,[t.createVNode(h,{size:"default",id:"photographPri"},{default:t.withCtx(()=>[...m[0]||(m[0]=[t.createTextVNode("拍照",-1)])]),_:1}),t.createVNode(h,{size:"default",type:"primary",onClick:e.close},{default:t.withCtx(()=>[...m[1]||(m[1]=[t.createTextVNode("关闭",-1)])]),_:1},8,["onClick"])])])),[[_,u.value]])}}});async function kp(e,n,o){const a=t.inject("bcBoxApi",{}),r=t.ref(!1),i=t.ref();let l=t.ref({});l.value=await ce.get("userInfo");const u=t.computed(()=>{var V;const D=(Array.isArray(o.value)?o.value:((V=o.value)==null?void 0:V.split(","))||[]).filter(L=>L).map(L=>({path:L,name:"",id:""}));let B=D.length&&e.isModelValue?D:e.fileList||[];return e.annex?B.map(L=>({name:L.name,id:L.id,path:L.path,url:"https://"+l.value.filePath+`${L.path}?x-oss-process=style/tpys_20`,isNotDelOssFile:(L==null?void 0:L.isNotDelOssFile)||void 0})):B.map(L=>({name:L.path,path:L.path,url:"https://"+l.value.filePath+`${L.path}?x-oss-process=style/tpys_20`,isNotDelOssFile:(L==null?void 0:L.isNotDelOssFile)||void 0}))}),s=t.computed(()=>u.value.length>=e.limit);async function c(D){var V;const B=D.size/1024/1024<e.size;if(B||Me.error(`上传文件大小不能超过 ${e.size}MB!`),e.isPubToken){const L=await le({url:e.proxy+"/sys/get_pub_token",params:{},method:"get"});L&&(e.headers.Authorization=`Bearer ${L.data}`)}n("beforeUpload",D),r.value=!0,i.value=A.ElLoading.service({lock:!0,text:"Loading"}),B?Promise.resolve(B):((V=i.value)==null||V.close(),Promise.reject(B))}const d=[".jpg",".jpeg",".png",".gif"];function f(){return e.accept.split(",").map(V=>V.trim()).some(V=>{const L=V.toLowerCase();return d.includes(L)})}function m(D,B,V){var L,U;if(n("onResult",D),console.log(D,B,V,e.accept,f()),e.accept==="image/*"||f()){let M=e.isPubToken?B.response.data:V;e.annex?E(D,B,M):k(D,B,M),r.value=!1,(L=i.value)==null||L.close();return}(e.accept.includes("xls")||e.accept.includes("xlsx")||e.accept.includes("docx")||e.accept.includes("pdf"))&&(n("onSuccess",D),D!=null&&D.code&&D.code!==1&&Me.error((D==null?void 0:D.msg)||"上传失败")),r.value=!1,(U=i.value)==null||U.close()}function h(D){var B;n("onError",D),r.value=!1,(B=i.value)==null||B.close()}function _(D,B="id"){i.value=A.ElLoading.service({lock:!0,text:"Loading"}),e.annex?N(D,B):$(D,"path")}let g=t.ref(!1),p=t.ref(0);function v(D){D&&(p.value=u.value.findIndex(B=>B.path===D.path)),g.value=!0}function w(){g.value=!1}const b=t.computed(()=>u.value.map(D=>D.url));function C(){Me.warning(`只能上传${e.limit}个文件`)}function I(D){Wl(D)}function E(D,B,V){const L=[];D.code===1?(V.forEach(U=>{if(U.response){const{id:M,path:q,name:R}=U.response.data;L.push({id:M,name:R,path:q})}else{const{id:M,path:q,name:R}=U;L.push({id:M,name:R,path:q})}}),console.log("有附件-上传信息=>>",L),e.isModelValue&&(o.value=L.map(U=>U.path).join(","),typeof(a==null?void 0:a.setOptions)=="function"&&typeof D.data=="object"&&a.setOptions(D.data.path,[D.data])),n("update:fileList",L),n("onSuccess",D.data)):(S(B,"uid"),Me.error(D.msg))}function k(D,B,V){const L=[];D.code===1?(V.forEach(U=>{if(U.response){const M=U.response.data;L.push({path:M})}else{const{path:M}=U;L.push({path:M})}}),console.log("无附件上传信息=>>",L),e.isModelValue&&(o.value=L.map(U=>typeof U.path=="object"?U.path.path:U.path).join(","),console.log("modelValue.value=>>",o.value),typeof(a==null?void 0:a.setOptions)=="function"&&typeof D.data=="object"&&a.setOptions(D.data.path,[D.data])),n("update:fileList",L),n("onSuccess",D.data)):(S(B,"uid"),Me.error(D.msg))}function N(D,B="id"){var V;if(D.isNotDelOssFile&&D.isNotDelOssFile==1)S(D,B),(V=i.value)==null||V.close();else{let L=D[B]||D.response.data[B];le({url:e.proxy+(e.deleteUrl?e.deleteUrl:"/pri/file/deleteFile"),method:"post",data:{attachId:L}}).then(U=>{var M,q;U.code===1?(S(D,B),e.showTips&&Me.success(U.data),n("onRemove"),(M=i.value)==null||M.close()):(q=i.value)==null||q.close()})}}function $(D,B="path"){var V;if(D.isNotDelOssFile&&D.isNotDelOssFile==1)S(D,B),(V=i.value)==null||V.close();else{let L=D[B]||D.response.data[B];le({url:e.proxy+(e.deleteUrl?e.deleteUrl:"/pri/file/del_file_no_attch"),method:"post",data:{filePath:L}}).then(U=>{var M,q;U.code===1?(S(D,B),e.showTips&&Me.success(U.data),n("onRemove"),(M=i.value)==null||M.close()):(q=i.value)==null||q.close()})}}function S(D,B="uid"){let V=e.fileList.filter(L=>L[B]!==D[B]);o.value=V.map(L=>L.path).join(","),n("update:fileList",V)}function x(){console.log("打开高拍仪"),fn(wp,{proxy:e.proxy,action:e.action,data:e.data},{title:"高拍仪",width:"auto",height:"auto",showFooter:!1,success:D=>{if(D.type.type=="success"){let{id:B,name:V,path:L}=D.type.data.data;e.fileList.push({id:B,name:V,path:L}),n("update:fileList",e.fileList),n("onSuccess",D.type.data.data)}}})}return{loading:r,userInfos:l,imgList:u,beforeUpload:c,onSuccess:m,onRemove:_,onPreview:v,onExceed:C,handleDownload:I,showViewer:g,onClose:w,urlList:b,viewerIndex:p,openPat:x,isOverLimit:s,onError:h}}const Cp={key:0,class:"flex flex-col items-center justify-center gap-3"},Ep={key:3},Sp={class:"w-full"},xp={class:"el-upload-list__item-actions"},Dp=["onClick"],Ip=["onClick"],Bp=t.defineComponent({inheritAttrs:!1,__name:"upload",props:t.mergeModels({action:{type:String,default:""},proxy:{type:String,default:"/qwp-web"},headers:{type:Object,default:()=>({})},method:{type:String,default:"post"},multiple:{type:Boolean,default:!1},data:{type:Object,default:()=>({})},name:{type:String,default:"file"},withCredentials:{type:Boolean,default:!1},showFileList:{type:Boolean,default:!0},drag:{type:Boolean,default:!1},accept:{type:String,default:"image/*"},crossorigin:{type:String,default:""},listType:{type:String,default:"picture-card"},disabled:{type:Boolean,default:!1},limit:{type:Number},size:{type:Number,default:20},fileList:{type:Array,default:()=>[]},annex:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!1},isModelValue:{type:Boolean,default:!0},deleteUrl:{type:String,default:""},showPat:{type:Boolean,default:!0},showTips:{type:Boolean,default:!0},isPubToken:{type:Boolean,default:!1},isShowSingleUpload:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:t.mergeModels(["update:fileList","onSuccess","beforeUpload","onRemove","onError","onResult"],["update:modelValue"]),async setup(e,{emit:n}){let o,a;const r="img_"+P.v4(),i=e,l=()=>window.location.origin+`${i.proxy}${i.action}`,u=t.useModel(e,"modelValue"),s=n,{loading:c,imgList:d,userInfos:f,beforeUpload:m,onSuccess:h,onRemove:_,onPreview:g,onExceed:p,handleDownload:v,showViewer:w,onClose:b,urlList:C,viewerIndex:I,openPat:E,isOverLimit:k,onError:N}=([o,a]=t.withAsyncContext(()=>kp(i,s,u)),o=await o,a(),o),$=t.computed(()=>{var x;return(x=f.value)!=null&&x.access_token?Object.assign({Authorization:`Bearer ${f.value.access_token}`},i.headers):i.headers}),S=t.watch(d,x=>{t.nextTick(()=>{setTimeout(()=>{const D=document.querySelector(`#${r} .el-upload--picture-card`);D&&(D.style.display=x.length==i.limit&&x.length>0?"none":"inline-flex")},100)})},{deep:!0,immediate:!0});return t.onUnmounted(()=>{S()}),(x,D)=>{const B=t.resolveComponent("bc-icon"),V=t.resolveComponent("hs-image"),L=t.resolveComponent("el-upload"),U=t.resolveComponent("el-image-viewer");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:"flex gap-2",id:r,style:{display:"flex",gap:"8px"}},[t.createVNode(L,{action:l(),headers:$.value,method:e.method,multiple:e.multiple,data:e.data,name:e.name,"with-credentials":e.withCredentials,"show-file-list":e.showFileList,drag:e.drag,accept:e.accept,crossorigin:e.crossorigin,"list-type":e.listType,disabled:e.disabled,limit:e.limit,"file-list":t.unref(d),"before-upload":t.unref(m),"on-success":t.unref(h),"on-exceed":t.unref(p),"on-error":t.unref(N),class:"flex-1"},t.createSlots({file:t.withCtx(({file:M})=>[t.createElementVNode("div",Sp,[t.createVNode(V,{src:M.url,class:"el-upload-list__item-thumbnail"},null,8,["src"]),t.createElementVNode("span",xp,[t.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:q=>t.unref(g)(M)},[t.createVNode(B,{name:"ele-ZoomIn"})],8,Dp),e.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:"el-upload-list__item-delete",onClick:q=>t.unref(_)(M)},[t.createVNode(B,{name:"ele-Delete"})],8,Ip))])])]),default:t.withCtx(()=>[x.$slots.default?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Cp,[x.$slots.upolad_icon?t.renderSlot(x.$slots,"upolad_icon",{key:0}):(t.openBlock(),t.createBlock(B,{key:1,name:"ele-Plus"})),x.$slots.upolad_text?t.renderSlot(x.$slots,"upolad_text",{key:2}):(t.openBlock(),t.createElementBlock("div",Ep,"上传"))]))]),_:2},[x.$slots.default?{name:"default",fn:t.withCtx(()=>[t.renderSlot(x.$slots,"default",{loading:t.unref(c)})]),key:"0"}:void 0]),1032,["action","headers","method","multiple","data","name","with-credentials","show-file-list","drag","accept","crossorigin","list-type","disabled","limit","file-list","before-upload","on-success","on-exceed","on-error"]),t.unref(k)?t.createCommentVNode("",!0):t.renderSlot(x.$slots,"prepend",{key:0}),!x.$slots.default&&!e.disabled&&e.annex&&e.showPat&&!t.unref(k)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"flex flex-col items-center justify-center gap-3 el-upload--picture-card",onClick:D[0]||(D[0]=(...M)=>t.unref(E)&&t.unref(E)(...M))},[x.$slots.pat_icon?t.renderSlot(x.$slots,"pat_icon",{key:0}):(t.openBlock(),t.createBlock(B,{key:1,name:"ele-Camera"})),D[1]||(D[1]=t.createTextVNode(" 高拍仪 ",-1))])):t.createCommentVNode("",!0),t.unref(k)?t.createCommentVNode("",!0):t.renderSlot(x.$slots,"append",{key:2})]),t.unref(w)?(t.openBlock(),t.createBlock(U,{key:0,"url-list":t.unref(C),"initial-index":t.unref(I),onClose:t.unref(b)},null,8,["url-list","initial-index","onClose"])):t.createCommentVNode("",!0)],64)}}}),Np=t.defineComponent({__name:"bcUpload",setup(e){return(n,o)=>(t.openBlock(),t.createBlock(t.Suspense,null,{default:t.withCtx(()=>[t.createVNode(Bp,t.normalizeProps(t.guardReactiveProps(n.$attrs)),t.createSlots({_:2},[t.renderList(n.$slots,(a,r)=>({name:r,fn:t.withCtx(i=>[t.renderSlot(n.$slots,r,t.normalizeProps(t.guardReactiveProps(i||{})))])}))]),1040)]),_:3}))}}),$p={class:"system-menu-container layout-padding"},Vp={class:"breadcrumb"},Tp={key:0,class:"breadcrumb-title"},Rp=["onClick"],Ap=t.defineComponent({__name:"bcBreadcrumb",props:{id:{},components:{},exclude:{}},setup(e){var h,_;const n=e,o=t.ref(ut.get(`active:${n.id}`)||((_=(h=n.components[0])==null?void 0:h.component)==null?void 0:_.name)),a=t.ref(ut.get(`query:${n.id}`)||{}),r=t.shallowRef(l()),i=t.computed(()=>{var g;return(g=r.value.find(p=>{var v;return((v=p.component)==null?void 0:v.name)===o.value}))==null?void 0:g.component});function l(){const g=(ut.get(`breadcrumb:${n.id}`)||[n.components[0]]).map(p=>p.component.name);return n.components.filter(p=>g.includes(p.component.name))}function u(g){const p=n.components.find(w=>{var b;return((b=w.component)==null?void 0:b.name)===g.name}),v=r.value.find(w=>{var b;return((b=w.component)==null?void 0:b.name)===g.name});p&&!v&&r.value.push(p),o.value=g.name,a.value[o.value]=g.query,ut.set(`active:${n.id}`,o.value),ut.set(`query:${n.id}`,a.value),ut.set(`breadcrumb:${n.id}`,r.value)}function s(g,p){var v,w;g.component&&p!==r.value.length-1&&(r.value=(v=r.value)==null?void 0:v.slice(0,p+1),o.value=(w=r.value[r.value.length-1].component)==null?void 0:w.name,ut.set(`active:${n.id}`,o.value),ut.set(`breadcrumb:${n.id}`,r.value))}function c(){var p,v;const g=r.value.findIndex(w=>{var b;return((b=w.component)==null?void 0:b.name)===o.value});(p=r.value)==null||p.splice(g,1),o.value=(v=r.value[r.value.length-1].component)==null?void 0:v.name,ut.set(`active:${n.id}`,o.value),ut.set(`breadcrumb:${n.id}`,r.value)}function d(g){r.value.find(p=>{var v;return((v=p.component)==null?void 0:v.name)===o.value}).name=g,t.triggerRef(r)}function f(){ut.remove(`active:${n.id}`),ut.remove(`query:${n.id}`),ut.remove(`breadcrumb:${n.id}`)}function m(g){var I,E;const p=`${Xe.value}:active:${n.id}`,v=`${Xe.value}:query:${n.id}`,w=`${Xe.value}:breadcrumb:${n.id}`,{key:b,value:C}=g.detail;b===p&&!C&&(o.value=(E=(I=n.components[0])==null?void 0:I.component)==null?void 0:E.name),b===v&&!C&&(a.value={}),b===w&&!C&&(r.value=l())}return t.onMounted(()=>{window.addEventListener("sessionStorageChange",m)}),t.onUnmounted(()=>{window.removeEventListener("sessionStorageChange",m),f()}),t.provide("breadcrumbApi",{active:t.computed(()=>o.value),push:u,back:c,title:d}),(g,p)=>{const v=t.resolveComponent("bc-icon");return t.openBlock(),t.createElementBlock("div",$p,[t.createElementVNode("div",Vp,[r.value.length>1?(t.openBlock(),t.createElementBlock("div",Tp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,(w,b)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b},[t.createElementVNode("span",{class:t.normalizeClass([b===r.value.length-2?"cursor-pointer":"text-gray","hover-cursor-pointer"]),onClick:C=>s(w,b)},t.toDisplayString(w.name),11,Rp),b!==r.value.length-1?(t.openBlock(),t.createBlock(v,{key:0,class:"mx-2",name:"ele-ArrowRight"})):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.KeepAlive,{exclude:e.exclude},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.value),t.normalizeProps(t.guardReactiveProps(a.value[o.value])),null,16))],1032,["exclude"]))])])}}}),Lp=P._export_sfc(Ap,[["__scopeId","data-v-d77eb620"]]),G=t.reactive({id:"",tab:"config",active:"table",activeId:"",typeId:"btns",tableId:"",menu:[],menuFlat:[],company:[],company_id:"",role:[],role_id:"",menu_id:"",table:[],form:[],dictAuthName:{},dictAuth:{},dataAuthName:{},dataAuth:{}}),Vo=t.reactive({table:[],form:[]});function Mp(){const e={btns:[...G.form.map(n=>n.btns).flat(),...G.table.map(n=>n.btns).flat()],form:[...G.form.map(n=>n.form).flat(),...G.table.map(n=>n.form).flat()],table:G.table.map(n=>n.tables.map(o=>o.data).flat().map(o=>{const a=Array.isArray(o.option)?o.option:[];return[o,...a]}).flat()).flat()};return{btns:xa(e.btns),form:xa(e.form),table:xa(e.table)}}function xa(e){const n={};return e.forEach(o=>{var a;if(n[o.fieldProp])(a=n[o.fieldProp].children)==null||a.push(o);else{const r={...o,children:[o],isShow:t.computed(()=>r.children.some(i=>!!i.fieldShow)),indeterminate:t.computed(()=>Op(r.children))};n[o.fieldProp]=r}}),Object.values(n)}function Op(e){return e.some(n=>!!n.fieldShow)&&!e.every(n=>!!n.fieldShow)}function Da(e){return e.some(n=>!!t.toValue(n.isShow))&&!e.every(n=>!!t.toValue(n.isShow))}const qp={class:"h-full flex flex-col"},zp={key:1,class:"item"},Pp={class:"flex flex-wrap"},Fp={key:2,class:"item"},jp={class:"flex flex-wrap"},Up={key:3,class:"item"},Hp={class:"flex flex-wrap"},Wp=t.defineComponent({__name:"index",setup(e,{expose:n}){const o=t.reactive(Mp()),a=t.computed(()=>!o.btns.length&&!o.form.length&&!o.table.length),r=t.computed(()=>o.btns.some(m=>t.toValue(m.isShow))),i=t.computed(()=>o.form.some(m=>t.toValue(m.isShow))),l=t.computed(()=>o.table.some(m=>t.toValue(m.isShow))),u=t.computed(()=>Da(o.btns)),s=t.computed(()=>Da(o.form)),c=t.computed(()=>Da(o.table));function d(m,h){h.forEach(_=>{var g;(g=_.children)==null||g.forEach(p=>{p.fieldShow=m})})}function f(m,h){var _;(_=h.children)==null||_.forEach(g=>{g.fieldShow=m})}return n({getData(){}}),(m,h)=>{const _=t.resolveComponent("el-empty"),g=t.resolveComponent("el-checkbox"),p=t.resolveComponent("el-scrollbar");return t.openBlock(),t.createElementBlock("div",qp,[t.createVNode(p,{class:"flex-1"},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createBlock(_,{key:0,description:"暂无数据"})):t.createCommentVNode("",!0),o.btns.length?(t.openBlock(),t.createElementBlock("div",zp,[t.createVNode(g,{"model-value":t.toValue(r.value),indeterminate:t.toValue(u.value),onChange:h[0]||(h[0]=v=>d(v,o.btns))},{default:t.withCtx(()=>[...h[3]||(h[3]=[t.createElementVNode("b",null,"按钮字段",-1)])]),_:1},8,["model-value","indeterminate"]),t.createElementVNode("div",Pp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.btns,v=>(t.openBlock(),t.createBlock(g,{key:v.fieldProp,"model-value":t.toValue(v.isShow),indeterminate:t.toValue(v.indeterminate),onChange:w=>f(w,v)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.showName),1)]),_:2},1032,["model-value","indeterminate","onChange"]))),128))])])):t.createCommentVNode("",!0),o.form.length?(t.openBlock(),t.createElementBlock("div",Fp,[t.createVNode(g,{"model-value":t.toValue(i.value),indeterminate:t.toValue(s.value),onChange:h[1]||(h[1]=v=>d(v,o.form))},{default:t.withCtx(()=>[...h[4]||(h[4]=[t.createElementVNode("b",null,"查询条件及表单字段",-1)])]),_:1},8,["model-value","indeterminate"]),t.createElementVNode("div",jp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.form,v=>(t.openBlock(),t.createBlock(g,{key:v.fieldProp,"model-value":t.toValue(v.isShow),indeterminate:t.toValue(v.indeterminate),onChange:w=>f(w,v)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.showName),1)]),_:2},1032,["model-value","indeterminate","onChange"]))),128))])])):t.createCommentVNode("",!0),o.table.length?(t.openBlock(),t.createElementBlock("div",Up,[t.createVNode(g,{"model-value":t.toValue(l.value),indeterminate:t.toValue(c.value),onChange:h[2]||(h[2]=v=>d(v,o.table))},{default:t.withCtx(()=>[...h[5]||(h[5]=[t.createElementVNode("b",null,"表格字段",-1)])]),_:1},8,["model-value","indeterminate"]),t.createElementVNode("div",Hp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.table,v=>(t.openBlock(),t.createBlock(g,{key:v.fieldProp,"model-value":t.toValue(v.isShow),indeterminate:t.toValue(v.indeterminate),onChange:w=>f(w,v)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.showName),1)]),_:2},1032,["model-value","indeterminate","onChange"]))),128))])])):t.createCommentVNode("",!0)]),_:1})])}}}),As=t.defineComponent({__name:"btns",props:{modelValue:{required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue");return(o,a)=>{const r=t.resolveComponent("vxe-column"),i=t.resolveComponent("el-input"),l=t.resolveComponent("el-switch"),u=t.resolveComponent("vxe-table");return t.openBlock(),t.createBlock(u,{height:"auto","show-overflow":"",data:n.value,size:"mini","row-config":{height:30}},{default:t.withCtx(()=>[t.createVNode(r,{type:"seq",width:"100"}),t.createVNode(r,{field:"fieldName",title:"列字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"showName",title:"显示字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"fieldShow",title:"是否显示"},{default:t.withCtx(({row:s,column:c})=>[t.createVNode(l,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])}}}),Ls=t.defineComponent({__name:"form",props:{modelValue:{required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue");return(o,a)=>{const r=t.resolveComponent("vxe-column"),i=t.resolveComponent("el-input"),l=t.resolveComponent("el-switch"),u=t.resolveComponent("vxe-table");return t.openBlock(),t.createBlock(u,{height:"auto","show-overflow":"",data:n.value,size:"mini","row-config":{height:30}},{default:t.withCtx(()=>[t.createVNode(r,{type:"seq",width:"60"}),t.createVNode(r,{field:"fieldName",title:"列字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"showName",title:"显示字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"fieldShow",title:"是否显示"},{default:t.withCtx(({row:s,column:c})=>[t.createVNode(l,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])}}}),Kp=t.defineComponent({__name:"tables",props:{modelValue:{required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue");return(o,a)=>{const r=t.resolveComponent("vxe-column"),i=t.resolveComponent("el-input"),l=t.resolveComponent("el-switch"),u=t.resolveComponent("el-checkbox"),s=t.resolveComponent("vxe-table");return t.openBlock(),t.createBlock(s,{height:"auto","show-overflow":"",data:n.value,size:"mini","row-config":{height:30}},{default:t.withCtx(()=>[t.createVNode(r,{type:"seq",width:"60"}),t.createVNode(r,{field:"fieldName",width:"200",title:"列字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:c,column:d})=>[t.createVNode(i,{size:"small",modelValue:c[d.field],"onUpdate:modelValue":f=>c[d.field]=f},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"showName",width:"200",title:"显示字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:c,column:d})=>[t.createVNode(i,{size:"small",modelValue:c[d.field],"onUpdate:modelValue":f=>c[d.field]=f},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"fieldShow",width:"200",title:"是否显示"},{default:t.withCtx(({row:c,column:d})=>[t.createVNode(l,{size:"small",modelValue:c[d.field],"onUpdate:modelValue":f=>c[d.field]=f},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"option",title:"列表按钮","show-overflow":!1},{default:t.withCtx(({row:c,column:d})=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c[d.field],f=>(t.openBlock(),t.createBlock(u,{key:f.fieldProp,modelValue:f.fieldShow,"onUpdate:modelValue":m=>f.fieldShow=m,size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f.showName),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))]),_:1})]),_:1},8,["data"])}}}),Zp={class:"flex items-center"},Jp={class:"relative flex items-center",style:{height:"40px"}},Gp=["Key","id","onClick"],Qp=t.defineComponent({__name:"tab",props:{list:{},lineHeight:{default:"2px"},lineColor:{},activeColor:{default:"#398ee5"},defaultColor:{default:"#666"},showLine:{type:Boolean,default:!0}},setup(e){const n=e,o=t.ref(),a=t.reactive({width:"0px",left:"0px",height:n.lineHeight,backgroundColor:n.lineColor}),r=(i,l)=>{G.tableId=l.id,a.width=i.target.offsetWidth+"px",a.left=i.target.offsetLeft+"px"};return t.onMounted(()=>{t.nextTick(()=>{const i=n.list.findIndex(u=>u.id===G.tableId),l=o.value[i];l&&(a.width=l.offsetWidth+"px",a.left=l.offsetLeft+"px")})}),(i,l)=>(t.openBlock(),t.createElementBlock("div",Zp,[t.createElementVNode("div",Jp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.list,u=>(t.openBlock(),t.createElementBlock("span",{ref_for:!0,ref_key:"tabItems",ref:o,Key:u.id,class:"tab-item",id:`tab_${u.id}`,style:t.normalizeStyle({color:u.id===t.unref(G).tableId?e.activeColor:e.defaultColor}),onClick:s=>r(s,u)},t.toDisplayString(u.tableName),13,Gp))),256)),e.showLine?(t.openBlock(),t.createElementBlock("span",{key:0,class:"tab-line",style:t.normalizeStyle([a])},null,4)):t.createCommentVNode("",!0)])]))}}),Yp=P._export_sfc(Qp,[["__scopeId","data-v-a4d2b96f"]]),Xp={class:"flex-1",style:{overflow:"hidden"}},e_=t.defineComponent({__name:"tablesWraper",props:{modelValue:{required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),o=t.ref([]);return t.watch(()=>G.tableId,a=>{var r;o.value=((r=n.value.find(i=>i.id===a))==null?void 0:r.data)||[]},{immediate:!0}),(a,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["h-full flex flex-col",n.value.length>1?"table-btn":""])},[n.value.length>1?(t.openBlock(),t.createBlock(Yp,{key:0,list:n.value},null,8,["list"])):t.createCommentVNode("",!0),t.createElementVNode("div",Xp,[t.createVNode(Kp,{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=i=>o.value=i)},null,8,["modelValue"])])],2))}}),t_=P._export_sfc(e_,[["__scopeId","data-v-30a4185e"]]),n_={class:"h-full flex flex-col auth-table"},o_={class:"flex items-center py-2"},a_={class:"flex-1"},r_=t.defineComponent({__name:"table",props:{modelValue:{type:Array,required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),o={btnsWidget:As,formWidget:Ls,tablesWidget:t_};function a(r){G.tableId=y._.get(n.value,`${t.toValue(r.index)}.tables.0.id`)}return(r,i)=>{const l=t.resolveComponent("el-empty"),u=t.resolveComponent("el-button"),s=t.resolveComponent("bc-tabs");return t.openBlock(),t.createElementBlock("div",n_,[n.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(l,{key:0,description:"暂无数据"})),t.createVNode(s,{class:"flex-1",type:"line",label:"config_name","search-key":"config_name",value:"config_unique_id",modelValue:t.unref(G).activeId,"onUpdate:modelValue":i[3]||(i[3]=c=>t.unref(G).activeId=c),tabs:n.value,onTabClick:a},{default:t.withCtx(({height:c,item:d})=>[t.createElementVNode("div",{style:t.normalizeStyle({height:c+"px"}),class:"flex flex-col"},[t.createElementVNode("div",o_,[t.createVNode(u,{type:t.unref(G).typeId==="btns"?"primary":"",size:"small",onClick:i[0]||(i[0]=f=>t.unref(G).typeId="btns")},{default:t.withCtx(()=>[...i[4]||(i[4]=[t.createTextVNode("按钮",-1)])]),_:1},8,["type"]),t.createVNode(u,{type:t.unref(G).typeId==="form"?"primary":"",size:"small",onClick:i[1]||(i[1]=f=>t.unref(G).typeId="form")},{default:t.withCtx(()=>[...i[5]||(i[5]=[t.createTextVNode("查询条件",-1)])]),_:1},8,["type"]),t.createVNode(u,{type:t.unref(G).typeId==="tables"?"primary":"",size:"small",onClick:i[2]||(i[2]=f=>t.unref(G).typeId="tables")},{default:t.withCtx(()=>[...i[6]||(i[6]=[t.createTextVNode("表格集合",-1)])]),_:1},8,["type"])]),t.createElementVNode("div",a_,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o[`${t.unref(G).typeId}Widget`]),{modelValue:d[t.unref(G).typeId],"onUpdate:modelValue":f=>d[t.unref(G).typeId]=f},null,8,["modelValue","onUpdate:modelValue"]))])],4)]),_:1},8,["modelValue","tabs"])])}}}),i_=P._export_sfc(r_,[["__scopeId","data-v-e66fae2a"]]),l_={class:"h-full flex flex-col auth-form"},s_={class:"flex items-center pt-2"},c_={class:"flex-1 pt-2"},u_=t.defineComponent({__name:"form",props:{modelValue:{type:Array,required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),o={btnsWidget:As,formWidget:Ls};return(a,r)=>{const i=t.resolveComponent("el-empty"),l=t.resolveComponent("el-button"),u=t.resolveComponent("bc-tabs");return t.openBlock(),t.createElementBlock("div",l_,[n.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{key:0,description:"暂无数据"})),t.createVNode(u,{class:"flex-1",type:"line",label:"config_name","search-key":"config_name",value:"config_unique_id",modelValue:t.unref(G).activeId,"onUpdate:modelValue":r[2]||(r[2]=s=>t.unref(G).activeId=s),tabs:n.value},{default:t.withCtx(({height:s,item:c})=>[t.createElementVNode("div",{style:t.normalizeStyle({height:s+"px"}),class:"flex flex-col"},[t.createElementVNode("div",s_,[t.createVNode(l,{type:t.unref(G).typeId==="btns"?"primary":"",size:"small",onClick:r[0]||(r[0]=d=>t.unref(G).typeId="btns")},{default:t.withCtx(()=>[...r[3]||(r[3]=[t.createTextVNode("按钮",-1)])]),_:1},8,["type"]),t.createVNode(l,{type:t.unref(G).typeId==="form"?"primary":"",size:"small",onClick:r[1]||(r[1]=d=>t.unref(G).typeId="form")},{default:t.withCtx(()=>[...r[4]||(r[4]=[t.createTextVNode("表单字段",-1)])]),_:1},8,["type"])]),t.createElementVNode("div",c_,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o[`${t.unref(G).typeId}Widget`]),{modelValue:c[t.unref(G).typeId],"onUpdate:modelValue":d=>c[t.unref(G).typeId]=d},null,8,["modelValue","onUpdate:modelValue"]))])],4)]),_:1},8,["modelValue","tabs"])])}}}),d_=P._export_sfc(u_,[["__scopeId","data-v-9aa35d57"]]),f_=t.defineComponent({__name:"field",setup(e){function n(){t.nextTick(()=>{G.activeId=y._.get(G[G.active],"0.config_unique_id"),G.typeId="btns",G.tableId=y._.get(G[G.active],"0.tables.0.id")})}return(o,a)=>{const r=t.resolveComponent("el-tab-pane"),i=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(i,{class:"flex-1 el-tabs",modelValue:t.unref(G).active,"onUpdate:modelValue":a[2]||(a[2]=l=>t.unref(G).active=l),onTabClick:n},{default:t.withCtx(()=>[t.createVNode(r,{label:"表格",name:"table",class:"flex-1"},{default:t.withCtx(()=>[t.createVNode(t.unref(i_),{modelValue:t.unref(G)[t.unref(G).active],"onUpdate:modelValue":a[0]||(a[0]=l=>t.unref(G)[t.unref(G).active]=l)},null,8,["modelValue"])]),_:1}),t.createVNode(r,{label:"表单",name:"form",class:"flex-1"},{default:t.withCtx(()=>[t.createVNode(t.unref(d_),{modelValue:t.unref(G)[t.unref(G).active],"onUpdate:modelValue":a[1]||(a[1]=l=>t.unref(G)[t.unref(G).active]=l)},null,8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])}}}),m_={class:"flex flex-col flex-1"},h_={class:"flex flex-wrap flex-1 border-top-1"},p_=t.defineComponent({__name:"dict",setup(e){function n(r){return r.some(i=>i.show)}function o(r){return r.some(i=>i.show)&&!r.every(i=>i.show)}function a(r,i){i.forEach(l=>{l.show=r})}return(r,i)=>{const l=t.resolveComponent("el-empty"),u=t.resolveComponent("el-checkbox"),s=t.resolveComponent("el-tab-pane"),c=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(c,{"tab-position":"left",type:"border-card",class:"flex-1 dict"},{default:t.withCtx(()=>[t.unref(y._).isEmpty(t.unref(G).dictAuth)?(t.openBlock(),t.createBlock(l,{key:0,description:"暂无数据"})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(G).dictAuth,(d,f)=>(t.openBlock(),t.createBlock(s,{key:f,label:t.unref(G).dictAuthName[f]},{default:t.withCtx(()=>[t.createElementVNode("div",m_,[t.createVNode(u,{"model-value":n(d),indeterminate:o(d),onChange:m=>a(m,d)},{default:t.withCtx(()=>[...i[0]||(i[0]=[t.createElementVNode("b",null,"全选",-1)])]),_:1},8,["model-value","indeterminate","onChange"]),t.createElementVNode("div",h_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d,m=>(t.openBlock(),t.createElementBlock("div",{class:"mr-4",key:m.id},[t.createVNode(u,{modelValue:m.show,"onUpdate:modelValue":h=>m.show=h},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.show_name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])]))),128))])])]),_:2},1032,["label"]))),128))]),_:1})}}}),__=P._export_sfc(p_,[["__scopeId","data-v-7b227583"]]),g_={class:"flex flex-col flex-1"},v_={class:"mb-2"},y_={class:"flex flex-wrap flex-1 border-top-1"},b_=t.defineComponent({__name:"data",setup(e){const n=t.ref("");function o(a){return a.filter(r=>r.show_name.indexOf(n.value)>-1)}return(a,r)=>{const i=t.resolveComponent("el-empty"),l=t.resolveComponent("el-input"),u=t.resolveComponent("el-checkbox"),s=t.resolveComponent("el-tab-pane"),c=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(c,{"tab-position":"left",type:"border-card",class:"flex-1 data"},{default:t.withCtx(()=>[t.unref(y._).isEmpty(t.unref(G).dataAuth)?(t.openBlock(),t.createBlock(i,{key:0,description:"暂无数据"})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(G).dataAuth,(d,f)=>(t.openBlock(),t.createBlock(s,{key:f,label:t.unref(G).dataAuthName[f]},{default:t.withCtx(()=>[t.createElementVNode("div",g_,[t.createElementVNode("div",v_,[t.createVNode(l,{style:{width:"300px"},size:"default",placeholder:"请输入关键字",modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=m=>n.value=m),clearable:""},null,8,["modelValue"])]),t.createElementVNode("div",y_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o(d),m=>(t.openBlock(),t.createElementBlock("div",{class:"mr-4",key:m.dict_child_code},[t.createVNode(u,{modelValue:m.show,"onUpdate:modelValue":h=>m.show=h},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.show_name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])]))),128))])])]),_:2},1032,["label"]))),128))]),_:1})}}}),w_=P._export_sfc(b_,[["__scopeId","data-v-d19eaa8e"]]);async function k_({role_id:e,menu_id:n,dict_json:o,data_json:a}){var f,m,h,_;G.id="";const r=await ce.get("userInfo"),i=it.value||r.project_code,l=await le({url:`/${i}-web/pri/v2/perminssion/get_menu_prminssion_info`,method:"get",params:{role_id:e,menu_id:n,other_log_info:{title:"获取权限,(权限设置时,使用)"}}}),u={};G.id=((f=l==null?void 0:l.data)==null?void 0:f.id)||"";const s=(m=l.data)!=null&&m.config_functions?JSON.parse(l.data.config_functions):[],c=li((h=l==null?void 0:l.data)==null?void 0:h.dict_functions),d=li((_=l==null?void 0:l.data)==null?void 0:_.data_functions);return N_({dict_json:o,data_json:a,dict_functions:c,data_functions:d}),s.forEach(g=>{u[g.config_unique_id]=C_(g)}),le({url:`/${i}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:n,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(g=>{var w;const p=[],v=[];return(w=g.data)==null||w.forEach(b=>{b.config_type==="1"&&p.push(b),b.config_type==="2"&&v.push(b)}),G.tab="config",G.active="table",G.activeId=y._.get(p,"0.config_unique_id"),G.typeId="btns",G.tableId=y._.get(p,"0.tables.0.id"),G.table=si(p,u),G.form=si(v,u),G})}function li(e){return e?e?JSON.parse(e).reduce((n,o)=>(n[o.code]=o.json_data,n),{}):{}:{}}function si(e,n){return y._.isEmpty(n)?e:e.map(o=>(o.btns.map(a=>(n[o.config_unique_id]&&(a.fieldShow=y._.get(n,`${o.config_unique_id}.btns.${a.fieldProp}.fieldShow`,!1)),a)),o.form.map(a=>(n[o.config_unique_id]&&(a.fieldShow=y._.get(n,`${o.config_unique_id}.form.${a.fieldProp}.fieldShow`,!1)),a)),o.tables.map(a=>{var i;if(!n[o.config_unique_id])return o;const r=y._.get(n,`${o.config_unique_id}.tables.${a.id}`,{});return a.data=((i=a.data)==null?void 0:i.map(l=>{var s;const u=r[l.fieldProp];return u&&(l.fieldShow=u.fieldShow,l.option=((s=l.option)==null?void 0:s.map(c=>{var f;const d=u.option||[];return c.fieldShow=((f=d==null?void 0:d.find(m=>m.fieldProp===c.fieldProp))==null?void 0:f.fieldShow)??!1,c}))||[]),l}))||[],a}),o))}function C_(e){const n={btns:Ia(e.btns),form:Ia(e.form),tables:{}};return e.tables.forEach(o=>{n.tables[o.id]=Ia(o.data)}),n}function Ia(e){const n={auth_data_func_01_000:[]};return e.forEach(o=>{n[o.fieldProp]=o}),n}async function ci(e,n){const{table:o,form:a,menu_id:r,company_id:i,role_id:l,id:u}=G,s=[...o,...a];let c={dict_functions:E_(),config_functions:JSON.stringify(s),data_functions:S_(),is_effect:e,menu_id:r,role_id:l};u&&(c.id=u),i&&(c.company_id=i),n&&(c={...c,...n});const d=await ce.get("userInfo"),f=it.value||d.project_code;return le({url:`/${f}-web/pri/v2/perminssion/save_prminssion`,method:"post",data:{...c,other_log_info:{title:"保存权限"}}})}function E_(){const e=[];for(let n in G.dictAuth){const o=n;e.push({name:G.dictAuthName[o],code:o,json_data:G.dictAuth[o]})}return JSON.stringify(e)}function S_(){const e=[];for(let n in G.dataAuth){const o=n;e.push({name:G.dataAuthName[o],code:o,json_data:G.dataAuth[o]})}return JSON.stringify(e)}async function x_(){const e=await ce.get("userInfo"),n=it.value||e.project_code;return le({url:`/${n}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(o=>{const a=o;G.menu=a.data,G.menuFlat=D_(a.data)})}function D_(e){const n=[];function o(a,r=[]){return a.reduce((i,l)=>(i.push(l),l.children&&l.children.length&&i.push(...o(l.children)),i),r)}return o(y._.cloneDeep(e),n),n}async function I_(){const e=await ce.get("userInfo"),n=it.value||e.project_code;return le({url:`/${n}-web/pri/company/get_company_dict`,method:"get",params:{other_log_info:{title:"查询所有门店"}}}).then(o=>{var r;const a=o;return G.company=y._.get(a,"data",[]),G.company_id=((r=ke())==null?void 0:r.companyId)||(e==null?void 0:e.company_id)||y._.get(a,"data.0.company_id"),y._.get(a,"data",[])})}async function Ba(e){var r;const n=await ce.get("userInfo"),o=it.value||n.project_code,a=((r=n.roleList[0])==null?void 0:r.id)||Nr.value;return le({url:`/${o}-web/pri/role/${e?"list_role_by_company_id":"list_all_role"}`,method:"get",params:Object.assign({other_log_info:{title:"查询所有角色"}},e?{company_id:G.company_id}:{})}).then(i=>{var l;return G.role=y._.get(i,"data",[]),e||(G.role_id=((l=ke())==null?void 0:l.roleId)||a||y._.get(i,"data.0.id")),y._.get(i,"data",[])})}async function B_(){G.table=[],G.form=[];const e=await ce.get("userInfo"),n=it.value||e.project_code;return le({url:`/${n}-web/pri/v2/perminssion/get_menu_list_by_pervalue`,method:"get",params:{role_id:G.role_id,other_log_info:{title:"根据角色id,获取菜单"}}}).then(o=>o.data)}async function N_({dict_json:e,data_json:n,dict_functions:o,data_functions:a}){const r={},i={};for(let d in e){const{name:f,code:m}=e[d];r[m]=f}for(let d in n){const{label:f,value:m}=n[d];i[m]=f}G.dictAuthName=r,G.dataAuthName=i;const l=e.map(d=>d.code).join(",");G.dictAuth={};const u=await ce.get("userInfo"),s=it.value||u.project_code;l&&le({url:`/${s}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:l,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(d=>{const f=d;G.dictAuth=$_(f.data,o)});const c=n.map(d=>d.value).join(",");G.dataAuth={},c&&le({url:`/${s}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:c,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(d=>{const f=d;G.dataAuth=V_(f.data,a)})}function $_(e,n){const o={};for(let r in n){const i=r,l={};n[i].forEach(u=>{l[u.id]=u}),o[i]=l}const a={};for(let r in e){const i=r;e[i].forEach(l=>{l.show=y._.get(o,`${i}.${l.id}.show`,!1)}),a[i]=e[i]}return a}function V_(e,n){const o={};for(let r in n){const i=r,l={};n[i].forEach(u=>{l[u.dict_child_code]=u}),o[i]=l}const a={};for(let r in e){const i=r;e[i].forEach(l=>{l.show=y._.get(o,`${i}.${l.dict_child_code}.show`,!1)}),a[i]=e[i]}return a}const _e=t.reactive({id:"",tab:"config",active:"table",activeId:"",typeId:"btns",tableId:"",menu:[],menuFlat:[],company:[],company_id:"",role:[],role_id:"",menu_id:"",table:[],form:[],dictAuthName:{},dictAuth:{},dataAuthName:{},dataAuth:{}});t.reactive({table:[],form:[]});async function T_({role_id:e,menu_id:n,dict_json:o,data_json:a}){var f,m,h,_;_e.id="";const r=await ce.get("userInfo"),i=it.value||r.project_code,l=await le({url:`/${i}-web/pri/v2/perminssion/get_menu_prminssion_info`,method:"get",params:{role_id:e,menu_id:n,other_log_info:{title:"获取权限,(权限设置时,使用)"}}}),u={};_e.id=((f=l==null?void 0:l.data)==null?void 0:f.id)||"";const s=(m=l.data)!=null&&m.config_functions?JSON.parse(l.data.config_functions):[],c=ui((h=l==null?void 0:l.data)==null?void 0:h.dict_functions),d=ui((_=l==null?void 0:l.data)==null?void 0:_.data_functions);return q_({dict_json:o,data_json:a,dict_functions:c,data_functions:d}),s.forEach(g=>{u[g.config_unique_id]=R_(g)}),le({url:`/${i}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:n,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(g=>{var w;const p=[],v=[];return(w=g.data)==null||w.forEach(b=>{b.config_type==="1"&&p.push(b),b.config_type==="2"&&v.push(b)}),_e.tab="config",_e.active="table",_e.activeId=y._.get(p,"0.config_unique_id"),_e.typeId="btns",_e.tableId=y._.get(p,"0.tables.0.id"),_e.table=di(p,u),_e.form=di(v,u),_e})}function ui(e){return e?e?JSON.parse(e).reduce((n,o)=>(n[o.code]=o.json_data,n),{}):{}:{}}function di(e,n){return y._.isEmpty(n)?e:e.map(o=>(o.btns.map(a=>(n[o.config_unique_id]&&(a.fieldShow=y._.get(n,`${o.config_unique_id}.btns.${a.fieldProp}.fieldShow`,!1)),a)),o.form.map(a=>(n[o.config_unique_id]&&(a.fieldShow=y._.get(n,`${o.config_unique_id}.form.${a.fieldProp}.fieldShow`,!1)),a)),o.tables.map(a=>{var i;if(!n[o.config_unique_id])return o;const r=y._.get(n,`${o.config_unique_id}.tables.${a.id}`,{});return a.data=((i=a.data)==null?void 0:i.map(l=>{var s;const u=r[l.fieldProp];return u&&(l.fieldShow=u.fieldShow,l.option=((s=l.option)==null?void 0:s.map(c=>{var f;const d=u.option||[];return c.fieldShow=((f=d==null?void 0:d.find(m=>m.fieldProp===c.fieldProp))==null?void 0:f.fieldShow)??!1,c}))||[]),l}))||[],a}),o))}function R_(e){const n={btns:Na(e.btns),form:Na(e.form),tables:{}};return e.tables.forEach(o=>{n.tables[o.id]=Na(o.data)}),n}function Na(e){const n={auth_data_func_01_000:[]};return e.forEach(o=>{n[o.fieldProp]=o}),n}async function A_(){const e=await ce.get("userInfo"),n=it.value||e.project_code;return le({url:`/${n}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(o=>{const a=o;_e.menu=a.data,_e.menuFlat=L_(a.data)})}function L_(e){const n=[];function o(a,r=[]){return a.reduce((i,l)=>(i.push(l),l.children&&l.children.length&&i.push(...o(l.children)),i),r)}return o(y._.cloneDeep(e),n),n}async function M_(){const e=await ce.get("userInfo"),n=it.value||e.project_code;return le({url:`/${n}-web/pri/company/get_company_dict`,method:"get",params:{other_log_info:{title:"查询所有门店"}}}).then(o=>{var r;const a=o;return _e.company=y._.get(a,"data",[]),_e.company_id=((r=ke())==null?void 0:r.companyId)||(e==null?void 0:e.company_id)||y._.get(a,"data.0.company_id"),y._.get(a,"data",[])})}async function $a(e){var r;const n=await ce.get("userInfo"),o=it.value||n.project_code,a=((r=n.roleList[0])==null?void 0:r.id)||Nr.value;return le({url:`/${o}-web/pri/role/${e?"list_role_by_company_id":"list_all_role"}`,method:"get",params:Object.assign({other_log_info:{title:"查询所有角色"}},e?{company_id:_e.company_id}:{})}).then(i=>{var l;return _e.role=y._.get(i,"data",[]),e||(_e.role_id=((l=ke())==null?void 0:l.roleId)||a||y._.get(i,"data.0.id")),y._.get(i,"data",[])})}async function O_(){_e.table=[],_e.form=[];const e=await ce.get("userInfo"),n=it.value||e.project_code;return le({url:`/${n}-web/pri/v2/perminssion/get_menu_list_by_pervalue`,method:"get",params:{role_id:_e.role_id,other_log_info:{title:"根据角色id,获取菜单"}}}).then(o=>o.data)}async function q_({dict_json:e,data_json:n,dict_functions:o,data_functions:a}){const r={},i={};for(let d in e){const{name:f,code:m}=e[d];r[m]=f}for(let d in n){const{label:f,value:m}=n[d];i[m]=f}_e.dictAuthName=r,_e.dataAuthName=i;const l=e.map(d=>d.code).join(",");_e.dictAuth={};const u=await ce.get("userInfo"),s=it.value||u.project_code;l&&le({url:`/${s}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:l,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(d=>{const f=d;_e.dictAuth=z_(f.data,o)});const c=n.map(d=>d.value).join(",");_e.dataAuth={},c&&le({url:`/${s}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:c,other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(d=>{const f=d;_e.dataAuth=P_(f.data,a)})}function z_(e,n){const o={};for(let r in n){const i=r,l={};n[i].forEach(u=>{l[u.id]=u}),o[i]=l}const a={};for(let r in e){const i=r;e[i].forEach(l=>{l.show=y._.get(o,`${i}.${l.id}.show`,!1)}),a[i]=e[i]}return a}function P_(e,n){const o={};for(let r in n){const i=r,l={};n[i].forEach(u=>{l[u.dict_child_code]=u}),o[i]=l}const a={};for(let r in e){const i=r;e[i].forEach(l=>{l.show=y._.get(o,`${i}.${l.dict_child_code}.show`,!1)}),a[i]=e[i]}return a}const F_={class:"flex flex-col h-full overflow-hidden"},j_={class:"flex flex-1 dialog-bottom"},U_={class:"flex overflow-y-auto dialog-left"},H_={class:"flex-1"},W_={class:"auth_box"},K_={class:"flex flex-wrap flex-1 p-5 border-top-1"},Z_={class:"flex items-center justify-center h-16"},J_=t.defineComponent({__name:"popup",props:{close:{type:Function},row:{type:Object}},setup(e){const n=e,o=t.ref(),a=t.ref(!1),r=t.ref([]);t.onMounted(()=>{var m,h;A_(),i(),(m=n.row)!=null&&m.showCompany?M_().then(()=>{var _;$a((_=n.row)==null?void 0:_.showCompany).then(()=>{var g;_e.role_id=((g=ke())==null?void 0:g.roleId)||y._.get(_e.role,"0.id",""),u()})}):$a((h=n.row)==null?void 0:h.showCompany).then(()=>{u()})});async function i(){const h=(await ce.get("userInfo")).project_code;le({url:`/${h}-web/pri/get_map_childs`,method:"get",params:{dictCodeStr:"drugstore",other_log_info:{title:"根据code字符串,获取对应的字典项列表(map)"}}}).then(_=>{r.value=_.data.drugstore.map(g=>({...g,show:!1}))})}function l(){var m;$a((m=n.row)==null?void 0:m.showCompany).then(()=>{var h;_e.role_id=y._.get(_e.role,"0.id",(h=ke())==null?void 0:h.roleId),u()})}function u(m=[]){O_().then(h=>{if(o.value&&(o.value.setCheckedKeys(h,!1),_e.menu_id)){const _=_e.menuFlat.find(g=>g.id===_e.menu_id);_&&s(_)}})}async function s(m){if(!y._.isEmpty(m.children))return;const h=m.dict_json?JSON.parse(m.dict_json):[],_=m.data_json?JSON.parse(m.data_json):[];_e.menu_id=m.id,o.value.setCurrentKey(m.id);const{role_id:g,menu_id:p}=_e;if(!g){Me.warning("请选择角色!");return}T_({role_id:g,menu_id:p,dict_json:h,data_json:_})}function c(){if(!o.value)return[];const m=o.value.getCheckedKeys(!1),h=o.value.store.nodesMap;return m.filter(g=>{const p=h[g];return p&&(!p.childNodes||p.childNodes.length===0)})}function d(){ya({title:"提示",message:"快速设置是将【当前用户】所拥有的页面权限,快速设置给指定的角色,请谨慎操作,是否继续?",closeOnClickModal:!1,showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",beforeClose:async(m,h,_)=>{if(m!=="confirm")return _();h.confirmButtonLoading=!0,f().finally(()=>{_()})}})}async function f(){let h={menu_id_str:c().join(),role_id:_e.role_id,company_data:JSON.stringify(r.value)};const g=(await ce.get("userInfo")).project_code;return le({url:`/${g}-web/pri/v2/perminssion/set_prminssion`,method:"post",data:{...h,other_log_info:{title:"保存权限"}}}).then(p=>{p.code==1&&(Me.success("保存成功"),n.close("confirm"))})}return(m,h)=>{const _=t.resolveComponent("el-option"),g=t.resolveComponent("el-select"),p=t.resolveComponent("el-form-item"),v=t.resolveComponent("el-form"),w=t.resolveComponent("bc-icon"),b=t.resolveComponent("el-tree"),C=t.resolveComponent("el-checkbox"),I=t.resolveComponent("el-button"),E=t.resolveComponent("bc-button"),k=t.resolveDirective("loading");return t.openBlock(),t.createElementBlock("div",F_,[t.createVNode(v,{size:"small",class:"flex flex-[0.05] gap-5 el-form"},{default:t.withCtx(()=>[t.createVNode(p,{label:"门店"},{default:t.withCtx(()=>[t.createVNode(g,{modelValue:t.unref(_e).company_id,"onUpdate:modelValue":h[0]||(h[0]=N=>t.unref(_e).company_id=N),placeholder:"请选择",filterable:"",onChange:l,style:{width:"200px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(_e).company,N=>(t.openBlock(),t.createBlock(_,{key:N.company_id,label:N.company_name,value:N.company_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t.createVNode(p,{label:"角色"},{default:t.withCtx(()=>[t.createVNode(g,{modelValue:t.unref(_e).role_id,"onUpdate:modelValue":h[1]||(h[1]=N=>t.unref(_e).role_id=N),placeholder:"请选择",filterable:"",onChange:u,style:{width:"200px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(_e).role,N=>(t.openBlock(),t.createBlock(_,{key:N.id,label:N.role_name,value:N.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t.withDirectives((t.openBlock(),t.createElementBlock("div",j_,[t.createElementVNode("div",U_,[t.createVNode(b,{"highlight-current":"","show-checkbox":"",style:{width:"240px",flex:"1"},ref_key:"treeRef",ref:o,"node-key":"id","empty-text":"暂无数据",data:t.unref(_e).menu,"current-node-key":t.unref(_e).menu_id,onNodeClick:s,onCheck:s},{default:t.withCtx(({data:N})=>[t.createVNode(w,{class:"mr-1",name:N.meta.icon},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(N.meta.title),1)]),_:1},8,["data","current-node-key"])]),t.createElementVNode("div",H_,[t.createElementVNode("div",W_,[h[3]||(h[3]=t.createElementVNode("div",{class:"p-3 bg-[#f1f1f1] text-[#333]"},"数据权限",-1)),t.createElementVNode("div",null,[t.createElementVNode("div",K_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,N=>(t.openBlock(),t.createElementBlock("div",{class:"mr-4",key:N.dict_child_code},[t.createVNode(C,{modelValue:N.show,"onUpdate:modelValue":$=>N.show=$},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(N.show_name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])]))),128))])])])])])),[[k,a.value]]),t.createElementVNode("footer",Z_,[t.createVNode(I,{size:"default",onClick:h[2]||(h[2]=N=>e.close("cancel"))},{default:t.withCtx(()=>[...h[4]||(h[4]=[t.createTextVNode("关闭",-1)])]),_:1}),t.createVNode(E,{type:"primary",size:"default",onClick:d},{default:t.withCtx(()=>[...h[5]||(h[5]=[t.createTextVNode("保存设置",-1)])]),_:1})])])}}}),G_=P._export_sfc(J_,[["__scopeId","data-v-94fd0a23"]]);function Q_(e){return new Promise(n=>{fn(G_,{row:e},{title:"快速设置权限",width:"900px",height:"80%",success:({data:o})=>n(o),showFooter:!1})})}const it=t.ref(""),Nr=t.ref("");function Y_(e,n){it.value=e.projectCode,Nr.value=e.roleId||"";const o=t.ref(!1),a=t.ref(!1),r=t.ref(""),i=t.ref(),l=t.ref(!1),u=t.ref(),s=t.ref();t.onActivated(()=>{x_(),e.showCompany?(m(),I_().then(()=>{Ba(e.showCompany).then(()=>{var E;G.role_id=((E=ke())==null?void 0:E.roleId)||y._.get(G.role,"0.id",""),p()})})):Ba(e.showCompany).then(()=>{p()})});const c=()=>{r.value="",i.value=""},d=()=>{a.value=!1,c()};function f(E){var k;E&&(r.value=E,i.value=(k=s.value.find(N=>N.code==E))==null?void 0:k.name)}async function m(){const E=await ce.get("userInfo"),k=it.value||E.project_code;le({url:`/${k}-web/pri/role/list_role_name`,method:"get",data:{other_log_info:{title:"获取用户信息"}}}).then(N=>{N.code===1&&(s.value=N.data||[])})}function h(){Q_(e)}function _(){a.value=!0}function g(){Ba(e.showCompany).then(()=>{var E;G.role_id=y._.get(G.role,"0.id",(E=ke())==null?void 0:E.roleId),p()})}function p(){B_().then(E=>{if(u.value.getInstance().setCheckedKeys(E,!1),G.menu_id){const k=G.menuFlat.find(N=>N.id===G.menu_id);k&&v(k),n("ready")}})}async function v(E){if(!y._.isEmpty(E.children))return;const k=E.dict_json?JSON.parse(E.dict_json):[],N=E.data_json?JSON.parse(E.data_json):[];G.menu_id=E.id,u.value.getInstance().setCurrentKey(E.id);const{role_id:$,menu_id:S}=G;if(!$){Me.warning("请选择角色!");return}l.value=!0,k_({role_id:$,menu_id:S,dict_json:k,data_json:N}).finally(()=>{l.value=!1})}function w(){const E=u.value.getInstance().getNode(G.menu_id);if(!E){Me.warning("请选择授权菜单!");return}return l.value=!0,ci(E.checked?1:0,{is_batch:1,role_name:i.value,role_id:r.value}).then(k=>{k.code===1&&(a.value=!1,Me.success("保存成功!"),c())}).finally(()=>{l.value=!1})}function b(){const E=u.value.getInstance().getNode(G.menu_id);if(!E){Me.warning("请选择授权菜单!");return}return l.value=!0,ci(E.checked?1:0).then(k=>{G.id=k.data.id,k.code===1&&Me.success("保存成功!")}).finally(()=>{l.value=!1})}function C(){Vo.form=G.form,Vo.table=G.table,o.value=!0}function I(E){E==="cancel"&&(G.form=Vo.form,G.table=Vo.table),o.value=!1}return{isShowPopup:o,loading:l,treeRef:u,submit:I,nodeClick:v,saveData:b,setSelelctAll:C,onCompanyChange:g,onRoleChange:p,onPermissionSync:_,onFastSet:h,isShowAsync:a,get_async_role_id:f,async_role_id:r,onSaveAsync:w,role_name_list:s,onClose:c,oncancel:d}}const X_={class:"systen-auth"},eg={class:"flex flex-col flex-1 p-2 main"},tg={class:"popup-footer"},ng={class:"popup-footer"},og=t.defineComponent({__name:"index",props:{projectCode:{},roleId:{},showCompany:{type:Boolean},showSync:{type:Boolean}},emits:["ready"],setup(e,{emit:n}){const o=e,a=n,{isShowPopup:r,loading:i,treeRef:l,submit:u,nodeClick:s,saveData:c,setSelelctAll:d,onCompanyChange:f,onRoleChange:m,onPermissionSync:h,onFastSet:_,isShowAsync:g,get_async_role_id:p,async_role_id:v,onSaveAsync:w,role_name_list:b,onClose:C,oncancel:I}=Y_(o,a);return(E,k)=>{const N=t.resolveComponent("el-option"),$=t.resolveComponent("el-select"),S=t.resolveComponent("el-form-item"),x=t.resolveComponent("el-button"),D=t.resolveComponent("el-form"),B=t.resolveComponent("bc-icon"),V=t.resolveComponent("el-tree"),L=t.resolveComponent("el-scrollbar"),U=t.resolveComponent("el-tab-pane"),M=t.resolveComponent("el-tabs"),q=t.resolveComponent("bc-divider"),R=t.resolveComponent("vxe-modal"),Z=t.resolveDirective("loading");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",X_,[t.createVNode(D,{size:"small",class:"el-form"},{default:t.withCtx(()=>[e.showCompany?(t.openBlock(),t.createBlock(S,{key:0,label:"门店"},{default:t.withCtx(()=>[t.createVNode($,{modelValue:t.unref(G).company_id,"onUpdate:modelValue":k[0]||(k[0]=O=>t.unref(G).company_id=O),placeholder:"请选择",filterable:"",onChange:t.unref(f)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(G).company,O=>(t.openBlock(),t.createBlock(N,{key:O.company_id,label:O.company_name,value:O.company_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(S,{label:"角色"},{default:t.withCtx(()=>[t.createVNode($,{modelValue:t.unref(G).role_id,"onUpdate:modelValue":k[1]||(k[1]=O=>t.unref(G).role_id=O),placeholder:"请选择",filterable:"",onChange:t.unref(m)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(G).role,O=>(t.openBlock(),t.createBlock(N,{key:O.id,label:O.role_name,value:O.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),t.createElementVNode("div",{style:t.normalizeStyle({display:"flex","justify-content":"flex-end","grid-column":`span ${e.showCompany?2:3} / span 3`})},[t.createVNode(x,{type:"primary",onClick:k[2]||(k[2]=O=>t.unref(_)())},{default:t.withCtx(()=>[...k[12]||(k[12]=[t.createTextVNode("快速设置",-1)])]),_:1}),e.showCompany?(t.openBlock(),t.createBlock(x,{key:0,type:"primary",onClick:k[3]||(k[3]=O=>t.unref(h)())},{default:t.withCtx(()=>[...k[13]||(k[13]=[t.createTextVNode("权限同步",-1)])]),_:1})):t.createCommentVNode("",!0),t.unref(G).menu_id?(t.openBlock(),t.createBlock(x,{key:1,type:"primary",onClick:t.unref(d)},{default:t.withCtx(()=>[...k[14]||(k[14]=[t.createTextVNode("全局设置",-1)])]),_:1},8,["onClick"])):t.createCommentVNode("",!0),t.createVNode(x,{type:"primary",onClick:t.unref(c)},{default:t.withCtx(()=>[...k[15]||(k[15]=[t.createTextVNode("保存",-1)])]),_:1},8,["onClick"])],4)]),_:1}),t.createVNode(q,{class:"flex flex-1 overflow-hidden border-top-1",size:200,direction:"horizontal"},{aside:t.withCtx(()=>[t.createVNode(L,{class:"h-full border-right-1 w-full"},{default:t.withCtx(()=>[t.createVNode(V,{"highlight-current":"","show-checkbox":"",style:{width:"99%"},ref_key:"treeRef",ref:l,"node-key":"id","empty-text":"暂无数据",data:t.unref(G).menu,"current-node-key":t.unref(G).menu_id,onNodeClick:t.unref(s),onCheck:t.unref(s)},{default:t.withCtx(({data:O})=>[t.createVNode(B,{class:"mr-1",name:O.meta.icon},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(O.meta.title),1)]),_:1},8,["data","current-node-key","onNodeClick","onCheck"])]),_:1})]),default:t.withCtx(()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",eg,[t.createVNode(M,{class:"flex-1 el-tabs",modelValue:t.unref(G).tab,"onUpdate:modelValue":k[4]||(k[4]=O=>t.unref(G).tab=O)},{default:t.withCtx(()=>[t.createVNode(U,{label:"字段权限",name:"config",class:"flex-1"},{default:t.withCtx(()=>[t.createVNode(t.unref(f_))]),_:1}),t.createVNode(U,{label:"字典权限",name:"dictionary",class:"flex-1"},{default:t.withCtx(()=>[t.createVNode(t.unref(__))]),_:1}),t.createVNode(U,{label:"数据权限",name:"dataAuth",class:"flex-1"},{default:t.withCtx(()=>[t.createVNode(t.unref(w_))]),_:1})]),_:1},8,["modelValue"])])),[[Z,t.unref(i)]])]),_:1})]),t.createVNode(R,{modelValue:t.unref(g),"onUpdate:modelValue":k[8]||(k[8]=O=>t.isRef(g)?g.value=O:null),className:"custom-popup",title:"请选择角色名称",width:"300",mask:!1,height:"200","show-footer":"",onClose:t.unref(C)},{default:t.withCtx(()=>[t.createVNode($,{modelValue:t.unref(v),"onUpdate:modelValue":k[5]||(k[5]=O=>t.isRef(v)?v.value=O:null),placeholder:"请选择",filterable:"",onChange:t.unref(p)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(b),O=>(t.openBlock(),t.createBlock(N,{key:O.code,label:O.name,value:O.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),footer:t.withCtx(()=>[t.createElementVNode("div",tg,[t.createVNode(x,{size:"default",onClick:k[6]||(k[6]=O=>t.unref(I)())},{default:t.withCtx(()=>[...k[16]||(k[16]=[t.createTextVNode("取消",-1)])]),_:1}),t.createVNode(x,{size:"default",type:"primary",onClick:k[7]||(k[7]=O=>t.unref(w)())},{default:t.withCtx(()=>[...k[17]||(k[17]=[t.createTextVNode("确定",-1)])]),_:1})])]),_:1},8,["modelValue","onClose"]),t.createVNode(R,{modelValue:t.unref(r),"onUpdate:modelValue":k[11]||(k[11]=O=>t.isRef(r)?r.value=O:null),className:"custom-popup",title:"全选面板",width:"1000",height:"600","show-footer":""},{default:t.withCtx(()=>[t.unref(r)?(t.openBlock(),t.createBlock(Wp,{key:0})):t.createCommentVNode("",!0)]),footer:t.withCtx(()=>[t.createElementVNode("div",ng,[t.createVNode(x,{size:"default",onClick:k[9]||(k[9]=O=>t.unref(u)("cancel"))},{default:t.withCtx(()=>[...k[18]||(k[18]=[t.createTextVNode("取消",-1)])]),_:1}),t.createVNode(x,{size:"default",type:"primary",onClick:k[10]||(k[10]=O=>t.unref(u)("confirm"))},{default:t.withCtx(()=>[...k[19]||(k[19]=[t.createTextVNode("确定",-1)])]),_:1})])]),_:1},8,["modelValue"])])}}}),ag=P._export_sfc(og,[["__scopeId","data-v-eb2111df"]]),de=t.reactive({id:"",active:"table",activeId:"",typeId:"form",tableId:"",menu:[],menu_id:"",table:[],form:[]}),To=t.reactive({table:[],form:[]});function rg(){const e={form:[...de.form.map(n=>n.form).flat(),...de.table.map(n=>n.form).flat()],table:de.table.map(n=>n.tables.map(o=>o.data).flat().map(o=>{const a=Array.isArray(o.option)?o.option:[];return[o,...a]}).flat()).flat()};return{form:fi(e.form,"fieldRequired"),table:fi(e.table,"fieldExport")}}function fi(e,n){const o={};return e.forEach(a=>{var r;if(o[a.fieldProp])(r=o[a.fieldProp].children)==null||r.push(a);else{const i={...a,children:[a],[n]:t.computed(()=>i.children.some(l=>!!l[n])),indeterminate:t.computed(()=>ig(i.children,n))};o[a.fieldProp]=i}}),Object.values(o)}function ig(e,n){return e.some(o=>!!o[n])&&!e.every(o=>!!o[n])}function mi(e,n){return e.some(o=>!!t.toValue(o[n]))&&!e.every(o=>!!t.toValue(o[n]))}const lg={class:"h-full flex flex-col"},sg={key:0,class:"item"},cg={class:"flex flex-wrap"},ug={key:1,class:"item"},dg={class:"flex flex-wrap"},fg=t.defineComponent({__name:"index",setup(e,{expose:n}){const o=t.reactive(rg()),a=t.computed(()=>o.form.some(c=>t.toValue(c.fieldRequired))),r=t.computed(()=>o.table.some(c=>t.toValue(c.fieldExport))),i=t.computed(()=>mi(o.form,"fieldRequired")),l=t.computed(()=>mi(o.table,"fieldExport"));function u(c,d,f){d.forEach(m=>{var h,_;f==="fieldRequired"?m.forceRequired||(h=m.children)==null||h.forEach(g=>{g[f]=c}):(_=m.children)==null||_.forEach(g=>{g[f]=c})})}function s(c,d,f){var m;(m=d.children)==null||m.forEach(h=>{h[f]=c})}return n({getData(){}}),(c,d)=>{const f=t.resolveComponent("el-checkbox"),m=t.resolveComponent("hs-scrollbar");return t.openBlock(),t.createElementBlock("div",lg,[t.createVNode(m,{class:"flex-1"},{default:t.withCtx(()=>[o.form.length?(t.openBlock(),t.createElementBlock("div",sg,[t.createVNode(f,{"model-value":t.toValue(a.value),indeterminate:t.toValue(i.value),onChange:d[0]||(d[0]=h=>u(h,o.form,"fieldRequired"))},{default:t.withCtx(()=>[...d[2]||(d[2]=[t.createElementVNode("b",null,"查询条件及表单字段",-1)])]),_:1},8,["model-value","indeterminate"]),t.createElementVNode("div",cg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.form,h=>(t.openBlock(),t.createBlock(f,{key:h.fieldProp,"model-value":t.toValue(h.fieldRequired),indeterminate:t.toValue(h.indeterminate),disabled:t.toValue(h==null?void 0:h.forceRequired)==!0?t.toValue(h.fieldRequired):!1,onChange:_=>s(_,h,"fieldRequired")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.showName),1)]),_:2},1032,["model-value","indeterminate","disabled","onChange"]))),128))])])):t.createCommentVNode("",!0),o.table.length?(t.openBlock(),t.createElementBlock("div",ug,[t.createVNode(f,{"model-value":t.toValue(r.value),indeterminate:t.toValue(l.value),onChange:d[1]||(d[1]=h=>u(h,o.table,"fieldExport"))},{default:t.withCtx(()=>[...d[3]||(d[3]=[t.createElementVNode("b",null,"表格字段",-1)])]),_:1},8,["model-value","indeterminate"]),t.createElementVNode("div",dg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.table,h=>(t.openBlock(),t.createBlock(f,{key:h.fieldProp,"model-value":t.toValue(h.fieldExport),indeterminate:t.toValue(h.indeterminate),onChange:_=>s(_,h,"fieldExport")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.showName),1)]),_:2},1032,["model-value","indeterminate","onChange"]))),128))])])):t.createCommentVNode("",!0)]),_:1})])}}}),Ms=t.defineComponent({__name:"form",props:{modelValue:{required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue");return(o,a)=>{const r=t.resolveComponent("vxe-column"),i=t.resolveComponent("hs-input"),l=t.resolveComponent("hs-switch"),u=t.resolveComponent("vxe-table");return t.openBlock(),t.createBlock(u,{height:"auto","show-overflow":"",data:n.value,size:"mini","row-config":{height:30},editConfig:{trigger:"click",mode:"cell"}},{default:t.withCtx(()=>[t.createVNode(r,{type:"seq",width:"60"}),t.createVNode(r,{field:"fieldName",title:"列字段名称"},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"showName",title:"显示字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"fieldRequired",title:"是否必填"},{default:t.withCtx(({row:s,column:c})=>[t.createVNode(l,{size:"small",disabled:s.forceRequired,modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["disabled","modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])}}}),mg=t.defineComponent({__name:"tables",props:{modelValue:{required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue");return(o,a)=>{const r=t.resolveComponent("vxe-column"),i=t.resolveComponent("hs-input"),l=t.resolveComponent("hs-switch"),u=t.resolveComponent("vxe-table");return t.openBlock(),t.createBlock(u,{height:"auto","show-overflow":"",data:n.value,size:"mini","row-config":{height:30},editConfig:{trigger:"click",mode:"cell"}},{default:t.withCtx(()=>[t.createVNode(r,{type:"seq",width:"60"}),t.createVNode(r,{field:"fieldName",title:"列字段名称"},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"showName",title:"显示字段名称","edit-render":{autofocus:".el-input__inner",autoselect:!0}},{edit:t.withCtx(({row:s,column:c})=>[t.createVNode(i,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t.createVNode(r,{field:"fieldExport",title:"是否导出"},{default:t.withCtx(({row:s,column:c})=>[t.createVNode(l,{size:"small",modelValue:s[c.field],"onUpdate:modelValue":d=>s[c.field]=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])}}}),hg={class:"flex items-center"},pg={class:"relative flex items-center",style:{height:"40px"}},_g=["Key","onClick"],gg=t.defineComponent({__name:"tab",props:{list:{},lineHeight:{default:"2px"},lineColor:{},activeColor:{default:"#398ee5"},defaultColor:{default:"#666"},showLine:{type:Boolean,default:!0}},setup(e){const n=e,o=t.ref(),a=t.reactive({width:"0px",left:"0px",height:n.lineHeight,backgroundColor:n.lineColor}),r=(i,l)=>{de.tableId=l.id,a.width=i.target.offsetWidth+"px",a.left=i.target.offsetLeft+"px"};return t.onMounted(()=>{t.nextTick(()=>{const i=n.list.findIndex(u=>u.id===de.tableId),l=o.value[i];l&&(a.width=l.offsetWidth+"px",a.left=l.offsetLeft+"px")})}),(i,l)=>(t.openBlock(),t.createElementBlock("div",hg,[t.createElementVNode("div",pg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.list,u=>(t.openBlock(),t.createElementBlock("span",{ref_for:!0,ref_key:"tabItems",ref:o,Key:u.id,class:"tab-item",style:t.normalizeStyle({color:u.id===t.unref(de).tableId?e.activeColor:e.defaultColor}),onClick:s=>r(s,u)},t.toDisplayString(u.tableName),13,_g))),256)),e.showLine?(t.openBlock(),t.createElementBlock("span",{key:0,class:"tab-line",style:t.normalizeStyle([a])},null,4)):t.createCommentVNode("",!0)])]))}}),vg=P._export_sfc(gg,[["__scopeId","data-v-b1be156a"]]),yg={class:"flex-1 box-table-wrap",style:{overflow:"hidden"}},bg=t.defineComponent({__name:"tablesWraper",props:{modelValue:{required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),o=t.ref([]);return t.watch(()=>de.tableId,a=>{var r;o.value=((r=n.value.find(i=>i.id===a))==null?void 0:r.data)||[]},{immediate:!0}),(a,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["h-full flex flex-col",n.value.length>1?"table-btn":""])},[n.value.length>1?(t.openBlock(),t.createBlock(vg,{key:0,list:n.value},null,8,["list"])):t.createCommentVNode("",!0),t.createElementVNode("div",yg,[t.createVNode(mg,{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=i=>o.value=i)},null,8,["modelValue"])])],2))}}),wg=P._export_sfc(bg,[["__scopeId","data-v-16dcfa78"]]),kg={class:"h-full flex flex-col systen-table"},Cg={class:"flex items-center pt-2"},Eg={class:"flex-1 pt-2 box-wrap"},Sg=t.defineComponent({__name:"table",props:{modelValue:{type:Array,required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),o={formWidget:Ms,tablesWidget:wg};function a(r){de.tableId=y._.get(n.value,`${t.toValue(r.index)}.tables.0.id`)}return(r,i)=>{const l=t.resolveComponent("hs-empty"),u=t.resolveComponent("hs-button"),s=t.resolveComponent("bc-tabs");return t.openBlock(),t.createElementBlock("div",kg,[n.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(l,{key:0,description:"暂无数据"})),t.createVNode(s,{class:"flex-1",type:"line",label:"config_name",value:"config_unique_id",modelValue:t.unref(de).activeId,"onUpdate:modelValue":i[2]||(i[2]=c=>t.unref(de).activeId=c),tabs:n.value,onTabClick:a},{default:t.withCtx(({height:c,item:d})=>[t.createElementVNode("div",{style:t.normalizeStyle({height:c+"px"}),class:"flex flex-col"},[t.createElementVNode("div",Cg,[t.createVNode(u,{type:t.unref(de).typeId==="form"?"primary":"",size:"small",onClick:i[0]||(i[0]=f=>t.unref(de).typeId="form")},{default:t.withCtx(()=>[...i[3]||(i[3]=[t.createTextVNode("查询条件",-1)])]),_:1},8,["type"]),t.createVNode(u,{type:t.unref(de).typeId==="tables"?"primary":"",size:"small",onClick:i[1]||(i[1]=f=>t.unref(de).typeId="tables")},{default:t.withCtx(()=>[...i[4]||(i[4]=[t.createTextVNode("表格集合",-1)])]),_:1},8,["type"])]),t.createElementVNode("div",Eg,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o[`${t.unref(de).typeId}Widget`]),{modelValue:d[t.unref(de).typeId],"onUpdate:modelValue":f=>d[t.unref(de).typeId]=f},null,8,["modelValue","onUpdate:modelValue"]))])],4)]),_:1},8,["modelValue","tabs"])])}}}),xg=P._export_sfc(Sg,[["__scopeId","data-v-5e947976"]]),Dg={class:"h-full flex flex-col sysytem-form"},Ig={class:"flex items-center pt-2"},Bg={class:"flex-1 pt-2 box-wrap"},Ng=t.defineComponent({__name:"form",props:{modelValue:{type:Array,required:!0,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue");return(o,a)=>{const r=t.resolveComponent("hs-empty"),i=t.resolveComponent("hs-button"),l=t.resolveComponent("bc-tabs");return t.openBlock(),t.createElementBlock("div",Dg,[n.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,description:"暂无数据"})),t.createVNode(l,{class:"flex-1",type:"line",label:"config_name",value:"config_unique_id",modelValue:t.unref(de).activeId,"onUpdate:modelValue":a[1]||(a[1]=u=>t.unref(de).activeId=u),tabs:n.value},{default:t.withCtx(({height:u,item:s})=>[t.createElementVNode("div",{style:t.normalizeStyle({height:u+"px"}),class:"flex flex-col"},[t.createElementVNode("div",Ig,[t.createVNode(i,{type:t.unref(de).typeId==="form"?"primary":"",size:"small",onClick:a[0]||(a[0]=c=>t.unref(de).typeId="form")},{default:t.withCtx(()=>[...a[2]||(a[2]=[t.createTextVNode("表单字段",-1)])]),_:1},8,["type"])]),t.createElementVNode("div",Bg,[t.createVNode(t.unref(Ms),{modelValue:s[t.unref(de).typeId],"onUpdate:modelValue":c=>s[t.unref(de).typeId]=c},null,8,["modelValue","onUpdate:modelValue"])])],4)]),_:1},8,["modelValue","tabs"])])}}}),$g=P._export_sfc(Ng,[["__scopeId","data-v-ea4eae78"]]),Vg=t.defineComponent({__name:"field",setup(e){function n(o){t.nextTick(()=>{de.activeId=y._.get(de,`${t.toValue(o.paneName)}.0.config_unique_id`),de.tableId=y._.get(de,`${t.toValue(o.paneName)}.0.tables.0.id`)})}return(o,a)=>{const r=t.resolveComponent("hs-tab-pane"),i=t.resolveComponent("hs-tabs");return t.openBlock(),t.createBlock(i,{class:"flex-1 hs-tabs",modelValue:t.unref(de).active,"onUpdate:modelValue":a[2]||(a[2]=l=>t.unref(de).active=l),onTabClick:n},{default:t.withCtx(()=>[t.createVNode(r,{label:"表格",name:"table",class:"flex-1"},{default:t.withCtx(()=>[t.createVNode(t.unref(xg),{modelValue:t.unref(de)[t.unref(de).active],"onUpdate:modelValue":a[0]||(a[0]=l=>t.unref(de)[t.unref(de).active]=l)},null,8,["modelValue"])]),_:1}),t.createVNode(r,{label:"表单",name:"form",class:"flex-1"},{default:t.withCtx(()=>[t.createVNode(t.unref($g),{modelValue:t.unref(de)[t.unref(de).active],"onUpdate:modelValue":a[1]||(a[1]=l=>t.unref(de)[t.unref(de).active]=l)},null,8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])}}});async function Tg({menu_id:e}){const n=await ce.get("userInfo"),o=wa.value||n.project_code;return le({url:`/${o}-web/pri/v2/field/get_field_by_menu`,method:"get",params:{menu_id:e,other_log_info:{title:"根据菜单id查询字段信息"}}}).then(a=>{var l;const r=[],i=[];return(l=a.data)==null||l.forEach(u=>{u.config_type==="1"&&r.push(u),u.config_type==="2"&&i.push(u)}),de.active="table",de.activeId=y._.get(r,"0.config_unique_id"),de.tableId=y._.get(r,"0.tables.0.id"),de.table=r,de.form=i,de})}async function Rg(){const{table:e,form:n}=de,o=[...e,...n],a={json_data:JSON.stringify(o),menu_id:de.menu_id};de.id&&(a.id=de.id);const r=await ce.get("userInfo"),i=wa.value||r.project_code;return le({url:`/${i}-web/pri/v2/field/add_field_batch`,method:"post",data:{...a,other_log_info:{title:"添加页面字段信息_批量"}}})}async function Ag(){const e=await ce.get("userInfo"),n=wa.value||e.project_code;return le({url:`/${n}-web/pri/v2/menu/get_menu_list`,method:"get",params:{other_log_info:{title:"获取当前用户菜单列表(树形)"}}}).then(o=>{const a=o;de.menu=a.data})}const wa=t.ref("");function Lg(e){wa.value=e.projectCode;const n=t.ref(!1),o=t.ref(!1),a=t.ref();t.onMounted(()=>{Ag()});async function r(s){if(!y._.isEmpty(s.children))return;de.menu_id=s.id;const{menu_id:c}=de;o.value=!0,Tg({menu_id:c}).finally(()=>{o.value=!1})}function i(){return o.value=!0,Rg().then(s=>{s.code===1&&Me.success("保存成功!")}).finally(()=>{o.value=!1})}function l(){To.form=de.form,To.table=de.table,n.value=!0}function u(s){s==="cancel"&&(de.form=To.form,de.table=To.table),n.value=!1}return{isShowPopup:n,loading:o,treeRef:a,submit:u,nodeClick:r,saveData:i,setSelelctAll:l}}const Mg={class:"systen-fields"},Og={class:"flex-1 flex border-top-1 overflow-hidden"},qg={class:"p-2 main"},zg={class:"popup-footer"},Pg=t.defineComponent({__name:"index",props:{projectCode:{}},setup(e){const n=e,{isShowPopup:o,loading:a,treeRef:r,submit:i,nodeClick:l,saveData:u,setSelelctAll:s}=Lg(n);return(c,d)=>{const f=t.resolveComponent("el-button"),m=t.resolveComponent("el-form"),h=t.resolveComponent("bc-icon"),_=t.resolveComponent("el-tree"),g=t.resolveComponent("el-scrollbar"),p=t.resolveComponent("vxe-modal"),v=t.resolveDirective("loading");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Mg,[t.createVNode(m,{size:"small",class:"h-9",style:{display:"flex","justify-content":"flex-end"}},{default:t.withCtx(()=>[t.unref(de).menu_id?(t.openBlock(),t.createBlock(f,{key:0,type:"primary",onClick:t.unref(s)},{default:t.withCtx(()=>[...d[3]||(d[3]=[t.createTextVNode("全局设置",-1)])]),_:1},8,["onClick"])):t.createCommentVNode("",!0),t.createVNode(f,{type:"primary",onClick:t.unref(u)},{default:t.withCtx(()=>[...d[4]||(d[4]=[t.createTextVNode("保存",-1)])]),_:1},8,["onClick"])]),_:1}),t.createElementVNode("main",Og,[t.createVNode(g,{style:{width:"200px"},class:"border-right-1 h-full"},{default:t.withCtx(()=>[t.createVNode(_,{"highlight-current":"",style:{width:"192px"},ref_key:"treeRef",ref:r,"node-key":"id","empty-text":"暂无数据",data:t.unref(de).menu,onNodeClick:t.unref(l)},{default:t.withCtx(({data:w})=>[t.createVNode(h,{class:"mr-1",name:w.meta.icon},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(w.meta.title),1)]),_:1},8,["data","onNodeClick"])]),_:1}),t.withDirectives((t.openBlock(),t.createElementBlock("div",qg,[t.createVNode(t.unref(Vg))])),[[v,t.unref(a)]])])]),t.createVNode(p,{modelValue:t.unref(o),"onUpdate:modelValue":d[2]||(d[2]=w=>t.isRef(o)?o.value=w:null),className:"custom-popup",title:"全选面板",width:"1000",height:"600","show-footer":""},{default:t.withCtx(()=>[t.unref(o)?(t.openBlock(),t.createBlock(fg,{key:0})):t.createCommentVNode("",!0)]),footer:t.withCtx(()=>[t.createElementVNode("div",zg,[t.createVNode(f,{size:"default",onClick:d[0]||(d[0]=w=>t.unref(i)("cancel"))},{default:t.withCtx(()=>[...d[5]||(d[5]=[t.createTextVNode("取消",-1)])]),_:1}),t.createVNode(f,{size:"default",type:"primary",onClick:d[1]||(d[1]=w=>t.unref(i)("confirm"))},{default:t.withCtx(()=>[...d[6]||(d[6]=[t.createTextVNode("确定",-1)])]),_:1})])]),_:1},8,["modelValue"])])}}}),Fg=P._export_sfc(Pg,[["__scopeId","data-v-32cb5d6e"]]);var Os=(e=>(e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.NONE=5]="NONE",e))(Os||{}),$r=(e=>(e.USER_HANGINGUP="user-hanging-up",e))($r||{}),to=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},Tt=[],bt=[],jg=typeof Uint8Array<"u"?Uint8Array:Array,Vr=!1;function qs(){Vr=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=e.length;n<o;++n)Tt[n]=e[n],bt[e.charCodeAt(n)]=n;bt[45]=62,bt[95]=63}function Ug(e,n,o){for(var a,r,i=[],l=n;l<o;l+=3)a=(e[l]<<16)+(e[l+1]<<8)+e[l+2],i.push(Tt[(r=a)>>18&63]+Tt[r>>12&63]+Tt[r>>6&63]+Tt[63&r]);return i.join("")}function hi(e){var n;Vr||qs();for(var o=e.length,a=o%3,r="",i=[],l=0,u=o-a;l<u;l+=16383)i.push(Ug(e,l,l+16383>u?u:l+16383));return a===1?(n=e[o-1],r+=Tt[n>>2],r+=Tt[n<<4&63],r+="=="):a===2&&(n=(e[o-2]<<8)+e[o-1],r+=Tt[n>>10],r+=Tt[n>>4&63],r+=Tt[n<<2&63],r+="="),i.push(r),i.join("")}function Ro(e,n,o,a,r){var i,l,u=8*r-a-1,s=(1<<u)-1,c=s>>1,d=-7,f=o?r-1:0,m=o?-1:1,h=e[n+f];for(f+=m,i=h&(1<<-d)-1,h>>=-d,d+=u;d>0;i=256*i+e[n+f],f+=m,d-=8);for(l=i&(1<<-d)-1,i>>=-d,d+=a;d>0;l=256*l+e[n+f],f+=m,d-=8);if(i===0)i=1-c;else{if(i===s)return l?NaN:1/0*(h?-1:1);l+=Math.pow(2,a),i-=c}return(h?-1:1)*l*Math.pow(2,i-a)}function zs(e,n,o,a,r,i){var l,u,s,c=8*i-r-1,d=(1<<c)-1,f=d>>1,m=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=a?0:i-1,_=a?1:-1,g=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,l=d):(l=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-l))<1&&(l--,s*=2),(n+=l+f>=1?m/s:m*Math.pow(2,1-f))*s>=2&&(l++,s/=2),l+f>=d?(u=0,l=d):l+f>=1?(u=(n*s-1)*Math.pow(2,r),l+=f):(u=n*Math.pow(2,f-1)*Math.pow(2,r),l=0));r>=8;e[o+h]=255&u,h+=_,u/=256,r-=8);for(l=l<<r|u,c+=r;c>0;e[o+h]=255&l,h+=_,l/=256,c-=8);e[o+h-_]|=128*g}var Hg={}.toString,Ps=Array.isArray||function(e){return Hg.call(e)=="[object Array]"};function cr(){return J.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ut(e,n){if(cr()<n)throw new RangeError("Invalid typed array length");return J.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(n)).__proto__=J.prototype:(e===null&&(e=new J(n)),e.length=n),e}function J(e,n,o){if(!(J.TYPED_ARRAY_SUPPORT||this instanceof J))return new J(e,n,o);if(typeof e=="number"){if(typeof n=="string")throw new Error("If encoding is specified then the first argument must be a string");return ur(this,e)}return Fs(this,e,n,o)}function Fs(e,n,o,a){if(typeof n=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer?function(r,i,l,u){if(i.byteLength,l<0||i.byteLength<l)throw new RangeError("'offset' is out of bounds");if(i.byteLength<l+(u||0))throw new RangeError("'length' is out of bounds");return i=l===void 0&&u===void 0?new Uint8Array(i):u===void 0?new Uint8Array(i,l):new Uint8Array(i,l,u),J.TYPED_ARRAY_SUPPORT?(r=i).__proto__=J.prototype:r=Va(r,i),r}(e,n,o,a):typeof n=="string"?function(r,i,l){if(typeof l=="string"&&l!==""||(l="utf8"),!J.isEncoding(l))throw new TypeError('"encoding" must be a valid string encoding');var u=0|Us(i,l),s=(r=Ut(r,u)).write(i,l);return s!==u&&(r=r.slice(0,s)),r}(e,n,o):function(r,i){if(Rt(i)){var l=0|Tr(i.length);return(r=Ut(r,l)).length===0||i.copy(r,0,0,l),r}if(i){if(typeof ArrayBuffer<"u"&&i.buffer instanceof ArrayBuffer||"length"in i)return typeof i.length!="number"||(u=i.length)!=u?Ut(r,0):Va(r,i);if(i.type==="Buffer"&&Ps(i.data))return Va(r,i.data)}var u;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,n)}function js(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ur(e,n){if(js(n),e=Ut(e,n<0?0:0|Tr(n)),!J.TYPED_ARRAY_SUPPORT)for(var o=0;o<n;++o)e[o]=0;return e}function Va(e,n){var o=n.length<0?0:0|Tr(n.length);e=Ut(e,o);for(var a=0;a<o;a+=1)e[a]=255&n[a];return e}function Tr(e){if(e>=cr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+cr().toString(16)+" bytes");return 0|e}function Rt(e){return!(e==null||!e._isBuffer)}function Us(e,n){if(Rt(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var o=e.length;if(o===0)return 0;for(var a=!1;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return ra(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return Zs(e).length;default:if(a)return ra(e).length;n=(""+n).toLowerCase(),a=!0}}function Wg(e,n,o){var a=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((o===void 0||o>this.length)&&(o=this.length),o<=0)||(o>>>=0)<=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return t1(this,n,o);case"utf8":case"utf-8":return Ws(this,n,o);case"ascii":return Xg(this,n,o);case"latin1":case"binary":return e1(this,n,o);case"base64":return Yg(this,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n1(this,n,o);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function hn(e,n,o){var a=e[n];e[n]=e[o],e[o]=a}function pi(e,n,o,a,r){if(e.length===0)return-1;if(typeof o=="string"?(a=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=r?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(r)return-1;o=e.length-1}else if(o<0){if(!r)return-1;o=0}if(typeof n=="string"&&(n=J.from(n,a)),Rt(n))return n.length===0?-1:_i(e,n,o,a,r);if(typeof n=="number")return n&=255,J.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?r?Uint8Array.prototype.indexOf.call(e,n,o):Uint8Array.prototype.lastIndexOf.call(e,n,o):_i(e,[n],o,a,r);throw new TypeError("val must be string, number or Buffer")}function _i(e,n,o,a,r){var i,l=1,u=e.length,s=n.length;if(a!==void 0&&((a=String(a).toLowerCase())==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(e.length<2||n.length<2)return-1;l=2,u/=2,s/=2,o/=2}function c(h,_){return l===1?h[_]:h.readUInt16BE(_*l)}if(r){var d=-1;for(i=o;i<u;i++)if(c(e,i)===c(n,d===-1?0:i-d)){if(d===-1&&(d=i),i-d+1===s)return d*l}else d!==-1&&(i-=i-d),d=-1}else for(o+s>u&&(o=u-s),i=o;i>=0;i--){for(var f=!0,m=0;m<s;m++)if(c(e,i+m)!==c(n,m)){f=!1;break}if(f)return i}return-1}function Kg(e,n,o,a){o=Number(o)||0;var r=e.length-o;a?(a=Number(a))>r&&(a=r):a=r;var i=n.length;if(i%2!=0)throw new TypeError("Invalid hex string");a>i/2&&(a=i/2);for(var l=0;l<a;++l){var u=parseInt(n.substr(2*l,2),16);if(isNaN(u))return l;e[o+l]=u}return l}function Zg(e,n,o,a){return ka(ra(n,e.length-o),e,o,a)}function Hs(e,n,o,a){return ka(function(r){for(var i=[],l=0;l<r.length;++l)i.push(255&r.charCodeAt(l));return i}(n),e,o,a)}function Jg(e,n,o,a){return Hs(e,n,o,a)}function Gg(e,n,o,a){return ka(Zs(n),e,o,a)}function Qg(e,n,o,a){return ka(function(r,i){for(var l,u,s,c=[],d=0;d<r.length&&!((i-=2)<0);++d)l=r.charCodeAt(d),u=l>>8,s=l%256,c.push(s),c.push(u);return c}(n,e.length-o),e,o,a)}function Yg(e,n,o){return n===0&&o===e.length?hi(e):hi(e.slice(n,o))}function Ws(e,n,o){o=Math.min(e.length,o);for(var a=[],r=n;r<o;){var i,l,u,s,c=e[r],d=null,f=c>239?4:c>223?3:c>191?2:1;if(r+f<=o)switch(f){case 1:c<128&&(d=c);break;case 2:(192&(i=e[r+1]))==128&&(s=(31&c)<<6|63&i)>127&&(d=s);break;case 3:i=e[r+1],l=e[r+2],(192&i)==128&&(192&l)==128&&(s=(15&c)<<12|(63&i)<<6|63&l)>2047&&(s<55296||s>57343)&&(d=s);break;case 4:i=e[r+1],l=e[r+2],u=e[r+3],(192&i)==128&&(192&l)==128&&(192&u)==128&&(s=(15&c)<<18|(63&i)<<12|(63&l)<<6|63&u)>65535&&s<1114112&&(d=s)}d===null?(d=65533,f=1):d>65535&&(d-=65536,a.push(d>>>10&1023|55296),d=56320|1023&d),a.push(d),r+=f}return function(m){var h=m.length;if(h<=gi)return String.fromCharCode.apply(String,m);for(var _="",g=0;g<h;)_+=String.fromCharCode.apply(String,m.slice(g,g+=gi));return _}(a)}J.TYPED_ARRAY_SUPPORT=to.TYPED_ARRAY_SUPPORT===void 0||to.TYPED_ARRAY_SUPPORT,J.poolSize=8192,J._augment=function(e){return e.__proto__=J.prototype,e},J.from=function(e,n,o){return Fs(null,e,n,o)},J.TYPED_ARRAY_SUPPORT&&(J.prototype.__proto__=Uint8Array.prototype,J.__proto__=Uint8Array),J.alloc=function(e,n,o){return function(a,r,i,l){return js(r),r<=0?Ut(a,r):i!==void 0?typeof l=="string"?Ut(a,r).fill(i,l):Ut(a,r).fill(i):Ut(a,r)}(null,e,n,o)},J.allocUnsafe=function(e){return ur(null,e)},J.allocUnsafeSlow=function(e){return ur(null,e)},J.isBuffer=Do,J.compare=function(e,n){if(!Rt(e)||!Rt(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var o=e.length,a=n.length,r=0,i=Math.min(o,a);r<i;++r)if(e[r]!==n[r]){o=e[r],a=n[r];break}return o<a?-1:a<o?1:0},J.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},J.concat=function(e,n){if(!Ps(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return J.alloc(0);var o;if(n===void 0)for(n=0,o=0;o<e.length;++o)n+=e[o].length;var a=J.allocUnsafe(n),r=0;for(o=0;o<e.length;++o){var i=e[o];if(!Rt(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(a,r),r+=i.length}return a},J.byteLength=Us,J.prototype._isBuffer=!0,J.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<e;n+=2)hn(this,n,n+1);return this},J.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<e;n+=4)hn(this,n,n+3),hn(this,n+1,n+2);return this},J.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<e;n+=8)hn(this,n,n+7),hn(this,n+1,n+6),hn(this,n+2,n+5),hn(this,n+3,n+4);return this},J.prototype.toString=function(){var e=0|this.length;return e===0?"":arguments.length===0?Ws(this,0,e):Wg.apply(this,arguments)},J.prototype.equals=function(e){if(!Rt(e))throw new TypeError("Argument must be a Buffer");return this===e||J.compare(this,e)===0},J.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},J.prototype.compare=function(e,n,o,a,r){if(!Rt(e))throw new TypeError("Argument must be a Buffer");if(n===void 0&&(n=0),o===void 0&&(o=e?e.length:0),a===void 0&&(a=0),r===void 0&&(r=this.length),n<0||o>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(a>=r&&n>=o)return 0;if(a>=r)return-1;if(n>=o)return 1;if(this===e)return 0;for(var i=(r>>>=0)-(a>>>=0),l=(o>>>=0)-(n>>>=0),u=Math.min(i,l),s=this.slice(a,r),c=e.slice(n,o),d=0;d<u;++d)if(s[d]!==c[d]){i=s[d],l=c[d];break}return i<l?-1:l<i?1:0},J.prototype.includes=function(e,n,o){return this.indexOf(e,n,o)!==-1},J.prototype.indexOf=function(e,n,o){return pi(this,e,n,o,!0)},J.prototype.lastIndexOf=function(e,n,o){return pi(this,e,n,o,!1)},J.prototype.write=function(e,n,o,a){if(n===void 0)a="utf8",o=this.length,n=0;else if(o===void 0&&typeof n=="string")a=n,o=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n|=0,isFinite(o)?(o|=0,a===void 0&&(a="utf8")):(a=o,o=void 0)}var r=this.length-n;if((o===void 0||o>r)&&(o=r),e.length>0&&(o<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var i=!1;;)switch(a){case"hex":return Kg(this,e,n,o);case"utf8":case"utf-8":return Zg(this,e,n,o);case"ascii":return Hs(this,e,n,o);case"latin1":case"binary":return Jg(this,e,n,o);case"base64":return Gg(this,e,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qg(this,e,n,o);default:if(i)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),i=!0}},J.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var gi=4096;function Xg(e,n,o){var a="";o=Math.min(e.length,o);for(var r=n;r<o;++r)a+=String.fromCharCode(127&e[r]);return a}function e1(e,n,o){var a="";o=Math.min(e.length,o);for(var r=n;r<o;++r)a+=String.fromCharCode(e[r]);return a}function t1(e,n,o){var a=e.length;(!n||n<0)&&(n=0),(!o||o<0||o>a)&&(o=a);for(var r="",i=n;i<o;++i)r+=a1(e[i]);return r}function n1(e,n,o){for(var a=e.slice(n,o),r="",i=0;i<a.length;i+=2)r+=String.fromCharCode(a[i]+256*a[i+1]);return r}function He(e,n,o){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+n>o)throw new RangeError("Trying to access beyond buffer length")}function ct(e,n,o,a,r,i){if(!Rt(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||n<i)throw new RangeError('"value" argument is out of bounds');if(o+a>e.length)throw new RangeError("Index out of range")}function Ao(e,n,o,a){n<0&&(n=65535+n+1);for(var r=0,i=Math.min(e.length-o,2);r<i;++r)e[o+r]=(n&255<<8*(a?r:1-r))>>>8*(a?r:1-r)}function Lo(e,n,o,a){n<0&&(n=4294967295+n+1);for(var r=0,i=Math.min(e.length-o,4);r<i;++r)e[o+r]=n>>>8*(a?r:3-r)&255}function Ks(e,n,o,a,r,i){if(o+a>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function vi(e,n,o,a,r){return r||Ks(e,0,o,4),zs(e,n,o,a,23,4),o+4}function yi(e,n,o,a,r){return r||Ks(e,0,o,8),zs(e,n,o,a,52,8),o+8}J.prototype.slice=function(e,n){var o,a=this.length;if((e=~~e)<0?(e+=a)<0&&(e=0):e>a&&(e=a),(n=n===void 0?a:~~n)<0?(n+=a)<0&&(n=0):n>a&&(n=a),n<e&&(n=e),J.TYPED_ARRAY_SUPPORT)(o=this.subarray(e,n)).__proto__=J.prototype;else{var r=n-e;o=new J(r,void 0);for(var i=0;i<r;++i)o[i]=this[i+e]}return o},J.prototype.readUIntLE=function(e,n,o){e|=0,n|=0,o||He(e,n,this.length);for(var a=this[e],r=1,i=0;++i<n&&(r*=256);)a+=this[e+i]*r;return a},J.prototype.readUIntBE=function(e,n,o){e|=0,n|=0,o||He(e,n,this.length);for(var a=this[e+--n],r=1;n>0&&(r*=256);)a+=this[e+--n]*r;return a},J.prototype.readUInt8=function(e,n){return n||He(e,1,this.length),this[e]},J.prototype.readUInt16LE=function(e,n){return n||He(e,2,this.length),this[e]|this[e+1]<<8},J.prototype.readUInt16BE=function(e,n){return n||He(e,2,this.length),this[e]<<8|this[e+1]},J.prototype.readUInt32LE=function(e,n){return n||He(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},J.prototype.readUInt32BE=function(e,n){return n||He(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},J.prototype.readIntLE=function(e,n,o){e|=0,n|=0,o||He(e,n,this.length);for(var a=this[e],r=1,i=0;++i<n&&(r*=256);)a+=this[e+i]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*n)),a},J.prototype.readIntBE=function(e,n,o){e|=0,n|=0,o||He(e,n,this.length);for(var a=n,r=1,i=this[e+--a];a>0&&(r*=256);)i+=this[e+--a]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*n)),i},J.prototype.readInt8=function(e,n){return n||He(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},J.prototype.readInt16LE=function(e,n){n||He(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},J.prototype.readInt16BE=function(e,n){n||He(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},J.prototype.readInt32LE=function(e,n){return n||He(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},J.prototype.readInt32BE=function(e,n){return n||He(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},J.prototype.readFloatLE=function(e,n){return n||He(e,4,this.length),Ro(this,e,!0,23,4)},J.prototype.readFloatBE=function(e,n){return n||He(e,4,this.length),Ro(this,e,!1,23,4)},J.prototype.readDoubleLE=function(e,n){return n||He(e,8,this.length),Ro(this,e,!0,52,8)},J.prototype.readDoubleBE=function(e,n){return n||He(e,8,this.length),Ro(this,e,!1,52,8)},J.prototype.writeUIntLE=function(e,n,o,a){e=+e,n|=0,o|=0,a||ct(this,e,n,o,Math.pow(2,8*o)-1,0);var r=1,i=0;for(this[n]=255&e;++i<o&&(r*=256);)this[n+i]=e/r&255;return n+o},J.prototype.writeUIntBE=function(e,n,o,a){e=+e,n|=0,o|=0,a||ct(this,e,n,o,Math.pow(2,8*o)-1,0);var r=o-1,i=1;for(this[n+r]=255&e;--r>=0&&(i*=256);)this[n+r]=e/i&255;return n+o},J.prototype.writeUInt8=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,1,255,0),J.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},J.prototype.writeUInt16LE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,2,65535,0),J.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):Ao(this,e,n,!0),n+2},J.prototype.writeUInt16BE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,2,65535,0),J.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):Ao(this,e,n,!1),n+2},J.prototype.writeUInt32LE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,4,4294967295,0),J.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Lo(this,e,n,!0),n+4},J.prototype.writeUInt32BE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,4,4294967295,0),J.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Lo(this,e,n,!1),n+4},J.prototype.writeIntLE=function(e,n,o,a){if(e=+e,n|=0,!a){var r=Math.pow(2,8*o-1);ct(this,e,n,o,r-1,-r)}var i=0,l=1,u=0;for(this[n]=255&e;++i<o&&(l*=256);)e<0&&u===0&&this[n+i-1]!==0&&(u=1),this[n+i]=(e/l>>0)-u&255;return n+o},J.prototype.writeIntBE=function(e,n,o,a){if(e=+e,n|=0,!a){var r=Math.pow(2,8*o-1);ct(this,e,n,o,r-1,-r)}var i=o-1,l=1,u=0;for(this[n+i]=255&e;--i>=0&&(l*=256);)e<0&&u===0&&this[n+i+1]!==0&&(u=1),this[n+i]=(e/l>>0)-u&255;return n+o},J.prototype.writeInt8=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,1,127,-128),J.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},J.prototype.writeInt16LE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,2,32767,-32768),J.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):Ao(this,e,n,!0),n+2},J.prototype.writeInt16BE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,2,32767,-32768),J.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):Ao(this,e,n,!1),n+2},J.prototype.writeInt32LE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,4,2147483647,-2147483648),J.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Lo(this,e,n,!0),n+4},J.prototype.writeInt32BE=function(e,n,o){return e=+e,n|=0,o||ct(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),J.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Lo(this,e,n,!1),n+4},J.prototype.writeFloatLE=function(e,n,o){return vi(this,e,n,!0,o)},J.prototype.writeFloatBE=function(e,n,o){return vi(this,e,n,!1,o)},J.prototype.writeDoubleLE=function(e,n,o){return yi(this,e,n,!0,o)},J.prototype.writeDoubleBE=function(e,n,o){return yi(this,e,n,!1,o)},J.prototype.copy=function(e,n,o,a){if(o||(o=0),a||a===0||(a=this.length),n>=e.length&&(n=e.length),n||(n=0),a>0&&a<o&&(a=o),a===o||e.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-n<a-o&&(a=e.length-n+o);var r,i=a-o;if(this===e&&o<n&&n<a)for(r=i-1;r>=0;--r)e[r+n]=this[r+o];else if(i<1e3||!J.TYPED_ARRAY_SUPPORT)for(r=0;r<i;++r)e[r+n]=this[r+o];else Uint8Array.prototype.set.call(e,this.subarray(o,o+i),n);return i},J.prototype.fill=function(e,n,o,a){if(typeof e=="string"){if(typeof n=="string"?(a=n,n=0,o=this.length):typeof o=="string"&&(a=o,o=this.length),e.length===1){var r=e.charCodeAt(0);r<256&&(e=r)}if(a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!J.isEncoding(a))throw new TypeError("Unknown encoding: "+a)}else typeof e=="number"&&(e&=255);if(n<0||this.length<n||this.length<o)throw new RangeError("Out of range index");if(o<=n)return this;var i;if(n>>>=0,o=o===void 0?this.length:o>>>0,e||(e=0),typeof e=="number")for(i=n;i<o;++i)this[i]=e;else{var l=Rt(e)?e:ra(new J(e,a).toString()),u=l.length;for(i=0;i<o-n;++i)this[i+n]=l[i%u]}return this};var o1=/[^+\/0-9A-Za-z-_]/g;function a1(e){return e<16?"0"+e.toString(16):e.toString(16)}function ra(e,n){var o;n=n||1/0;for(var a=e.length,r=null,i=[],l=0;l<a;++l){if((o=e.charCodeAt(l))>55295&&o<57344){if(!r){if(o>56319){(n-=3)>-1&&i.push(239,191,189);continue}if(l+1===a){(n-=3)>-1&&i.push(239,191,189);continue}r=o;continue}if(o<56320){(n-=3)>-1&&i.push(239,191,189),r=o;continue}o=65536+(r-55296<<10|o-56320)}else r&&(n-=3)>-1&&i.push(239,191,189);if(r=null,o<128){if((n-=1)<0)break;i.push(o)}else if(o<2048){if((n-=2)<0)break;i.push(o>>6|192,63&o|128)}else if(o<65536){if((n-=3)<0)break;i.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;i.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return i}function Zs(e){return function(n){var o,a,r,i,l,u;Vr||qs();var s=n.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");l=n[s-2]==="="?2:n[s-1]==="="?1:0,u=new jg(3*s/4-l),r=l>0?s-4:s;var c=0;for(o=0,a=0;o<r;o+=4,a+=3)i=bt[n.charCodeAt(o)]<<18|bt[n.charCodeAt(o+1)]<<12|bt[n.charCodeAt(o+2)]<<6|bt[n.charCodeAt(o+3)],u[c++]=i>>16&255,u[c++]=i>>8&255,u[c++]=255&i;return l===2?(i=bt[n.charCodeAt(o)]<<2|bt[n.charCodeAt(o+1)]>>4,u[c++]=255&i):l===1&&(i=bt[n.charCodeAt(o)]<<10|bt[n.charCodeAt(o+1)]<<4|bt[n.charCodeAt(o+2)]>>2,u[c++]=i>>8&255,u[c++]=255&i),u}(function(n){if((n=function(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}(n).replace(o1,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(e))}function ka(e,n,o,a){for(var r=0;r<a&&!(r+o>=n.length||r>=e.length);++r)n[r+o]=e[r];return r}function Do(e){return e!=null&&(!!e._isBuffer||bi(e)||function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&bi(n.slice(0,0))}(e))}function bi(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function be(e,n){return e(n={exports:{}},n.exports),n.exports}var Ce=be(function(e,n){var o;e.exports=(o=o||function(a,r){var i=Object.create||function(){function p(){}return function(v){var w;return p.prototype=v,w=new p,p.prototype=null,w}}(),l={},u=l.lib={},s=u.Base={extend:function(p){var v=i(this);return p&&v.mixIn(p),v.hasOwnProperty("init")&&this.init!==v.init||(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var p=this.extend();return p.init.apply(p,arguments),p},init:function(){},mixIn:function(p){for(var v in p)p.hasOwnProperty(v)&&(this[v]=p[v]);p.hasOwnProperty("toString")&&(this.toString=p.toString)},clone:function(){return this.init.prototype.extend(this)}},c=u.WordArray=s.extend({init:function(p,v){p=this.words=p||[],this.sigBytes=v??4*p.length},toString:function(p){return(p||f).stringify(this)},concat:function(p){var v=this.words,w=p.words,b=this.sigBytes,C=p.sigBytes;if(this.clamp(),b%4)for(var I=0;I<C;I++){var E=w[I>>>2]>>>24-I%4*8&255;v[b+I>>>2]|=E<<24-(b+I)%4*8}else for(var I=0;I<C;I+=4)v[b+I>>>2]=w[I>>>2];return this.sigBytes+=C,this},clamp:function(){var p=this.words,v=this.sigBytes;p[v>>>2]&=4294967295<<32-v%4*8,p.length=a.ceil(v/4)},clone:function(){var p=s.clone.call(this);return p.words=this.words.slice(0),p},random:function(p){for(var v,w=[],b=function(k){var k=k,N=987654321,$=4294967295;return function(){var S=((N=36969*(65535&N)+(N>>16)&$)<<16)+(k=18e3*(65535&k)+(k>>16)&$)&$;return S/=4294967296,(S+=.5)*(a.random()>.5?1:-1)}},C=0;C<p;C+=4){var I=b(4294967296*(v||a.random()));v=987654071*I(),w.push(4294967296*I()|0)}return new c.init(w,p)}}),d=l.enc={},f=d.Hex={stringify:function(p){for(var v=p.words,w=p.sigBytes,b=[],C=0;C<w;C++){var I=v[C>>>2]>>>24-C%4*8&255;b.push((I>>>4).toString(16)),b.push((15&I).toString(16))}return b.join("")},parse:function(p){for(var v=p.length,w=[],b=0;b<v;b+=2)w[b>>>3]|=parseInt(p.substr(b,2),16)<<24-b%8*4;return new c.init(w,v/2)}},m=d.Latin1={stringify:function(p){for(var v=p.words,w=p.sigBytes,b=[],C=0;C<w;C++){var I=v[C>>>2]>>>24-C%4*8&255;b.push(String.fromCharCode(I))}return b.join("")},parse:function(p){for(var v=p.length,w=[],b=0;b<v;b++)w[b>>>2]|=(255&p.charCodeAt(b))<<24-b%4*8;return new c.init(w,v)}},h=d.Utf8={stringify:function(p){try{return decodeURIComponent(escape(m.stringify(p)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(p){return m.parse(unescape(encodeURIComponent(p)))}},_=u.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(p){typeof p=="string"&&(p=h.parse(p)),this._data.concat(p),this._nDataBytes+=p.sigBytes},_process:function(p){var v=this._data,w=v.words,b=v.sigBytes,C=this.blockSize,I=4*C,E=b/I,k=(E=p?a.ceil(E):a.max((0|E)-this._minBufferSize,0))*C,N=a.min(4*k,b);if(k){for(var $=0;$<k;$+=C)this._doProcessBlock(w,$);var S=w.splice(0,k);v.sigBytes-=N}return new c.init(S,N)},clone:function(){var p=s.clone.call(this);return p._data=this._data.clone(),p},_minBufferSize:0}),g=(u.Hasher=_.extend({cfg:s.extend(),init:function(p){this.cfg=this.cfg.extend(p),this.reset()},reset:function(){_.reset.call(this),this._doReset()},update:function(p){return this._append(p),this._process(),this},finalize:function(p){p&&this._append(p);var v=this._doFinalize();return v},blockSize:16,_createHelper:function(p){return function(v,w){return new p.init(w).finalize(v)}},_createHmacHelper:function(p){return function(v,w){return new g.HMAC.init(p,w).finalize(v)}}}),l.algo={});return l}(Math),o)}),wi=(be(function(e,n){var o,a,r,i,l,u;e.exports=(r=(a=o=Ce).lib,i=r.Base,l=r.WordArray,(u=a.x64={}).Word=i.extend({init:function(s,c){this.high=s,this.low=c}}),u.WordArray=i.extend({init:function(s,c){s=this.words=s||[],this.sigBytes=c??8*s.length},toX32:function(){for(var s=this.words,c=s.length,d=[],f=0;f<c;f++){var m=s[f];d.push(m.high),d.push(m.low)}return l.create(d,this.sigBytes)},clone:function(){for(var s=i.clone.call(this),c=s.words=this.words.slice(0),d=c.length,f=0;f<d;f++)c[f]=c[f].clone();return s}}),o)}),be(function(e,n){var o;e.exports=(o=Ce,function(){if(typeof ArrayBuffer=="function"){var a=o.lib.WordArray,r=a.init;(a.init=function(i){if(i instanceof ArrayBuffer&&(i=new Uint8Array(i)),(i instanceof Int8Array||typeof Uint8ClampedArray<"u"&&i instanceof Uint8ClampedArray||i instanceof Int16Array||i instanceof Uint16Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Float32Array||i instanceof Float64Array)&&(i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),i instanceof Uint8Array){for(var l=i.byteLength,u=[],s=0;s<l;s++)u[s>>>2]|=i[s]<<24-s%4*8;r.call(this,u,l)}else r.apply(this,arguments)}).prototype=a}}(),o.lib.WordArray)}),be(function(e,n){var o;e.exports=(o=Ce,function(){var a=o,r=a.lib.WordArray,i=a.enc;function l(u){return u<<8&4278255360|u>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(u){for(var s=u.words,c=u.sigBytes,d=[],f=0;f<c;f+=2){var m=s[f>>>2]>>>16-f%4*8&65535;d.push(String.fromCharCode(m))}return d.join("")},parse:function(u){for(var s=u.length,c=[],d=0;d<s;d++)c[d>>>1]|=u.charCodeAt(d)<<16-d%2*16;return r.create(c,2*s)}},i.Utf16LE={stringify:function(u){for(var s=u.words,c=u.sigBytes,d=[],f=0;f<c;f+=2){var m=l(s[f>>>2]>>>16-f%4*8&65535);d.push(String.fromCharCode(m))}return d.join("")},parse:function(u){for(var s=u.length,c=[],d=0;d<s;d++)c[d>>>1]|=l(u.charCodeAt(d)<<16-d%2*16);return r.create(c,2*s)}}}(),o.enc.Utf16)}),be(function(e,n){var o,a,r;e.exports=(r=(a=o=Ce).lib.WordArray,a.enc.Base64={stringify:function(i){var l=i.words,u=i.sigBytes,s=this._map;i.clamp();for(var c=[],d=0;d<u;d+=3)for(var f=(l[d>>>2]>>>24-d%4*8&255)<<16|(l[d+1>>>2]>>>24-(d+1)%4*8&255)<<8|l[d+2>>>2]>>>24-(d+2)%4*8&255,m=0;m<4&&d+.75*m<u;m++)c.push(s.charAt(f>>>6*(3-m)&63));var h=s.charAt(64);if(h)for(;c.length%4;)c.push(h);return c.join("")},parse:function(i){var l=i.length,u=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var c=0;c<u.length;c++)s[u.charCodeAt(c)]=c}var d=u.charAt(64);if(d){var f=i.indexOf(d);f!==-1&&(l=f)}return function(m,h,_){for(var g=[],p=0,v=0;v<h;v++)if(v%4){var w=_[m.charCodeAt(v-1)]<<v%4*2,b=_[m.charCodeAt(v)]>>>6-v%4*2;g[p>>>2]|=(w|b)<<24-p%4*8,p++}return r.create(g,p)}(i,l,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)}),be(function(e,n){var o;e.exports=(o=Ce,function(a){var r=o,i=r.lib,l=i.WordArray,u=i.Hasher,s=r.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=4294967296*a.abs(a.sin(g+1))|0})();var d=s.MD5=u.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,p){for(var v=0;v<16;v++){var w=p+v,b=g[w];g[w]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8)}var C=this._hash.words,I=g[p+0],E=g[p+1],k=g[p+2],N=g[p+3],$=g[p+4],S=g[p+5],x=g[p+6],D=g[p+7],B=g[p+8],V=g[p+9],L=g[p+10],U=g[p+11],M=g[p+12],q=g[p+13],R=g[p+14],Z=g[p+15],O=C[0],z=C[1],j=C[2],T=C[3];O=f(O,z,j,T,I,7,c[0]),T=f(T,O,z,j,E,12,c[1]),j=f(j,T,O,z,k,17,c[2]),z=f(z,j,T,O,N,22,c[3]),O=f(O,z,j,T,$,7,c[4]),T=f(T,O,z,j,S,12,c[5]),j=f(j,T,O,z,x,17,c[6]),z=f(z,j,T,O,D,22,c[7]),O=f(O,z,j,T,B,7,c[8]),T=f(T,O,z,j,V,12,c[9]),j=f(j,T,O,z,L,17,c[10]),z=f(z,j,T,O,U,22,c[11]),O=f(O,z,j,T,M,7,c[12]),T=f(T,O,z,j,q,12,c[13]),j=f(j,T,O,z,R,17,c[14]),O=m(O,z=f(z,j,T,O,Z,22,c[15]),j,T,E,5,c[16]),T=m(T,O,z,j,x,9,c[17]),j=m(j,T,O,z,U,14,c[18]),z=m(z,j,T,O,I,20,c[19]),O=m(O,z,j,T,S,5,c[20]),T=m(T,O,z,j,L,9,c[21]),j=m(j,T,O,z,Z,14,c[22]),z=m(z,j,T,O,$,20,c[23]),O=m(O,z,j,T,V,5,c[24]),T=m(T,O,z,j,R,9,c[25]),j=m(j,T,O,z,N,14,c[26]),z=m(z,j,T,O,B,20,c[27]),O=m(O,z,j,T,q,5,c[28]),T=m(T,O,z,j,k,9,c[29]),j=m(j,T,O,z,D,14,c[30]),O=h(O,z=m(z,j,T,O,M,20,c[31]),j,T,S,4,c[32]),T=h(T,O,z,j,B,11,c[33]),j=h(j,T,O,z,U,16,c[34]),z=h(z,j,T,O,R,23,c[35]),O=h(O,z,j,T,E,4,c[36]),T=h(T,O,z,j,$,11,c[37]),j=h(j,T,O,z,D,16,c[38]),z=h(z,j,T,O,L,23,c[39]),O=h(O,z,j,T,q,4,c[40]),T=h(T,O,z,j,I,11,c[41]),j=h(j,T,O,z,N,16,c[42]),z=h(z,j,T,O,x,23,c[43]),O=h(O,z,j,T,V,4,c[44]),T=h(T,O,z,j,M,11,c[45]),j=h(j,T,O,z,Z,16,c[46]),O=_(O,z=h(z,j,T,O,k,23,c[47]),j,T,I,6,c[48]),T=_(T,O,z,j,D,10,c[49]),j=_(j,T,O,z,R,15,c[50]),z=_(z,j,T,O,S,21,c[51]),O=_(O,z,j,T,M,6,c[52]),T=_(T,O,z,j,N,10,c[53]),j=_(j,T,O,z,L,15,c[54]),z=_(z,j,T,O,E,21,c[55]),O=_(O,z,j,T,B,6,c[56]),T=_(T,O,z,j,Z,10,c[57]),j=_(j,T,O,z,x,15,c[58]),z=_(z,j,T,O,q,21,c[59]),O=_(O,z,j,T,$,6,c[60]),T=_(T,O,z,j,U,10,c[61]),j=_(j,T,O,z,k,15,c[62]),z=_(z,j,T,O,V,21,c[63]),C[0]=C[0]+O|0,C[1]=C[1]+z|0,C[2]=C[2]+j|0,C[3]=C[3]+T|0},_doFinalize:function(){var g=this._data,p=g.words,v=8*this._nDataBytes,w=8*g.sigBytes;p[w>>>5]|=128<<24-w%32;var b=a.floor(v/4294967296),C=v;p[15+(w+64>>>9<<4)]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),p[14+(w+64>>>9<<4)]=16711935&(C<<8|C>>>24)|4278255360&(C<<24|C>>>8),g.sigBytes=4*(p.length+1),this._process();for(var I=this._hash,E=I.words,k=0;k<4;k++){var N=E[k];E[k]=16711935&(N<<8|N>>>24)|4278255360&(N<<24|N>>>8)}return I},clone:function(){var g=u.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,p,v,w,b,C,I){var E=g+(p&v|~p&w)+b+I;return(E<<C|E>>>32-C)+p}function m(g,p,v,w,b,C,I){var E=g+(p&w|v&~w)+b+I;return(E<<C|E>>>32-C)+p}function h(g,p,v,w,b,C,I){var E=g+(p^v^w)+b+I;return(E<<C|E>>>32-C)+p}function _(g,p,v,w,b,C,I){var E=g+(v^(p|~w))+b+I;return(E<<C|E>>>32-C)+p}r.MD5=u._createHelper(d),r.HmacMD5=u._createHmacHelper(d)}(Math),o.MD5)}),be(function(e,n){var o,a,r,i,l,u,s,c;e.exports=(r=(a=o=Ce).lib,i=r.WordArray,l=r.Hasher,u=a.algo,s=[],c=u.SHA1=l.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,f){for(var m=this._hash.words,h=m[0],_=m[1],g=m[2],p=m[3],v=m[4],w=0;w<80;w++){if(w<16)s[w]=0|d[f+w];else{var b=s[w-3]^s[w-8]^s[w-14]^s[w-16];s[w]=b<<1|b>>>31}var C=(h<<5|h>>>27)+v+s[w];C+=w<20?1518500249+(_&g|~_&p):w<40?1859775393+(_^g^p):w<60?(_&g|_&p|g&p)-1894007588:(_^g^p)-899497514,v=p,p=g,g=_<<30|_>>>2,_=h,h=C}m[0]=m[0]+h|0,m[1]=m[1]+_|0,m[2]=m[2]+g|0,m[3]=m[3]+p|0,m[4]=m[4]+v|0},_doFinalize:function(){var d=this._data,f=d.words,m=8*this._nDataBytes,h=8*d.sigBytes;return f[h>>>5]|=128<<24-h%32,f[14+(h+64>>>9<<4)]=Math.floor(m/4294967296),f[15+(h+64>>>9<<4)]=m,d.sigBytes=4*f.length,this._process(),this._hash},clone:function(){var d=l.clone.call(this);return d._hash=this._hash.clone(),d}}),a.SHA1=l._createHelper(c),a.HmacSHA1=l._createHmacHelper(c),o.SHA1)}),be(function(e,n){var o;e.exports=(o=Ce,function(a){var r=o,i=r.lib,l=i.WordArray,u=i.Hasher,s=r.algo,c=[],d=[];(function(){function h(v){for(var w=a.sqrt(v),b=2;b<=w;b++)if(!(v%b))return!1;return!0}function _(v){return 4294967296*(v-(0|v))|0}for(var g=2,p=0;p<64;)h(g)&&(p<8&&(c[p]=_(a.pow(g,.5))),d[p]=_(a.pow(g,1/3)),p++),g++})();var f=[],m=s.SHA256=u.extend({_doReset:function(){this._hash=new l.init(c.slice(0))},_doProcessBlock:function(h,_){for(var g=this._hash.words,p=g[0],v=g[1],w=g[2],b=g[3],C=g[4],I=g[5],E=g[6],k=g[7],N=0;N<64;N++){if(N<16)f[N]=0|h[_+N];else{var $=f[N-15],S=($<<25|$>>>7)^($<<14|$>>>18)^$>>>3,x=f[N-2],D=(x<<15|x>>>17)^(x<<13|x>>>19)^x>>>10;f[N]=S+f[N-7]+D+f[N-16]}var B=p&v^p&w^v&w,V=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),L=k+((C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25))+(C&I^~C&E)+d[N]+f[N];k=E,E=I,I=C,C=b+L|0,b=w,w=v,v=p,p=L+(V+B)|0}g[0]=g[0]+p|0,g[1]=g[1]+v|0,g[2]=g[2]+w|0,g[3]=g[3]+b|0,g[4]=g[4]+C|0,g[5]=g[5]+I|0,g[6]=g[6]+E|0,g[7]=g[7]+k|0},_doFinalize:function(){var h=this._data,_=h.words,g=8*this._nDataBytes,p=8*h.sigBytes;return _[p>>>5]|=128<<24-p%32,_[14+(p+64>>>9<<4)]=a.floor(g/4294967296),_[15+(p+64>>>9<<4)]=g,h.sigBytes=4*_.length,this._process(),this._hash},clone:function(){var h=u.clone.call(this);return h._hash=this._hash.clone(),h}});r.SHA256=u._createHelper(m),r.HmacSHA256=u._createHmacHelper(m)}(Math),o.SHA256)}),be(function(e,n){var o,a,r,i,l,u;e.exports=(r=(a=o=Ce).lib.WordArray,i=a.algo,l=i.SHA256,u=i.SHA224=l.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=l._doFinalize.call(this);return s.sigBytes-=4,s}}),a.SHA224=l._createHelper(u),a.HmacSHA224=l._createHmacHelper(u),o.SHA224)}),be(function(e,n){var o;e.exports=(o=Ce,function(){var a=o,r=a.lib.Hasher,i=a.x64,l=i.Word,u=i.WordArray,s=a.algo;function c(){return l.create.apply(l,arguments)}var d=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],f=[];(function(){for(var h=0;h<80;h++)f[h]=c()})();var m=s.SHA512=r.extend({_doReset:function(){this._hash=new u.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(h,_){for(var g=this._hash.words,p=g[0],v=g[1],w=g[2],b=g[3],C=g[4],I=g[5],E=g[6],k=g[7],N=p.high,$=p.low,S=v.high,x=v.low,D=w.high,B=w.low,V=b.high,L=b.low,U=C.high,M=C.low,q=I.high,R=I.low,Z=E.high,O=E.low,z=k.high,j=k.low,T=N,Q=$,te=S,W=x,K=D,Y=B,ae=V,re=L,fe=U,De=M,Ze=q,me=R,Je=Z,at=O,et=z,gt=j,qe=0;qe<80;qe++){var vt=f[qe];if(qe<16)var lt=vt.high=0|h[_+2*qe],st=vt.low=0|h[_+2*qe+1];else{var St=f[qe-15],ht=St.high,Pe=St.low,Fe=(ht>>>1|Pe<<31)^(ht>>>8|Pe<<24)^ht>>>7,je=(Pe>>>1|ht<<31)^(Pe>>>8|ht<<24)^(Pe>>>7|ht<<25),pt=f[qe-2],Le=pt.high,_t=pt.low,ro=(Le>>>19|_t<<13)^(Le<<3|_t>>>29)^Le>>>6,qn=(_t>>>19|Le<<13)^(_t<<3|Le>>>29)^(_t>>>6|Le<<26),zn=f[qe-7],Pn=zn.high,F=zn.low,H=f[qe-16],X=H.high,ee=H.low;lt=(lt=(lt=Fe+Pn+((st=je+F)>>>0<je>>>0?1:0))+ro+((st+=qn)>>>0<qn>>>0?1:0))+X+((st+=ee)>>>0<ee>>>0?1:0),vt.high=lt,vt.low=st}var oe,ne=fe&Ze^~fe&Je,he=De&me^~De&at,Ie=T&te^T&K^te&K,ue=Q&W^Q&Y^W&Y,ye=(T>>>28|Q<<4)^(T<<30|Q>>>2)^(T<<25|Q>>>7),ze=(Q>>>28|T<<4)^(Q<<30|T>>>2)^(Q<<25|T>>>7),Ue=(fe>>>14|De<<18)^(fe>>>18|De<<14)^(fe<<23|De>>>9),tt=(De>>>14|fe<<18)^(De>>>18|fe<<14)^(De<<23|fe>>>9),It=d[qe],yt=It.high,Lt=It.low,mn=et+Ue+((oe=gt+tt)>>>0<gt>>>0?1:0),io=ze+ue;et=Je,gt=at,Je=Ze,at=me,Ze=fe,me=De,fe=ae+(mn=(mn=(mn=mn+ne+((oe+=he)>>>0<he>>>0?1:0))+yt+((oe+=Lt)>>>0<Lt>>>0?1:0))+lt+((oe+=st)>>>0<st>>>0?1:0))+((De=re+oe|0)>>>0<re>>>0?1:0)|0,ae=K,re=Y,K=te,Y=W,te=T,W=Q,T=mn+(ye+Ie+(io>>>0<ze>>>0?1:0))+((Q=oe+io|0)>>>0<oe>>>0?1:0)|0}$=p.low=$+Q,p.high=N+T+($>>>0<Q>>>0?1:0),x=v.low=x+W,v.high=S+te+(x>>>0<W>>>0?1:0),B=w.low=B+Y,w.high=D+K+(B>>>0<Y>>>0?1:0),L=b.low=L+re,b.high=V+ae+(L>>>0<re>>>0?1:0),M=C.low=M+De,C.high=U+fe+(M>>>0<De>>>0?1:0),R=I.low=R+me,I.high=q+Ze+(R>>>0<me>>>0?1:0),O=E.low=O+at,E.high=Z+Je+(O>>>0<at>>>0?1:0),j=k.low=j+gt,k.high=z+et+(j>>>0<gt>>>0?1:0)},_doFinalize:function(){var h=this._data,_=h.words,g=8*this._nDataBytes,p=8*h.sigBytes;return _[p>>>5]|=128<<24-p%32,_[30+(p+128>>>10<<5)]=Math.floor(g/4294967296),_[31+(p+128>>>10<<5)]=g,h.sigBytes=4*_.length,this._process(),this._hash.toX32()},clone:function(){var h=r.clone.call(this);return h._hash=this._hash.clone(),h},blockSize:32});a.SHA512=r._createHelper(m),a.HmacSHA512=r._createHmacHelper(m)}(),o.SHA512)}),be(function(e,n){var o,a,r,i,l,u,s,c;e.exports=(r=(a=o=Ce).x64,i=r.Word,l=r.WordArray,u=a.algo,s=u.SHA512,c=u.SHA384=s.extend({_doReset:function(){this._hash=new l.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var d=s._doFinalize.call(this);return d.sigBytes-=16,d}}),a.SHA384=s._createHelper(c),a.HmacSHA384=s._createHmacHelper(c),o.SHA384)}),be(function(e,n){var o;e.exports=(o=Ce,function(a){var r=o,i=r.lib,l=i.WordArray,u=i.Hasher,s=r.x64.Word,c=r.algo,d=[],f=[],m=[];(function(){for(var g=1,p=0,v=0;v<24;v++){d[g+5*p]=(v+1)*(v+2)/2%64;var w=(2*g+3*p)%5;g=p%5,p=w}for(g=0;g<5;g++)for(p=0;p<5;p++)f[g+5*p]=p+(2*g+3*p)%5*5;for(var b=1,C=0;C<24;C++){for(var I=0,E=0,k=0;k<7;k++){if(1&b){var N=(1<<k)-1;N<32?E^=1<<N:I^=1<<N-32}128&b?b=b<<1^113:b<<=1}m[C]=s.create(I,E)}})();var h=[];(function(){for(var g=0;g<25;g++)h[g]=s.create()})();var _=c.SHA3=u.extend({cfg:u.cfg.extend({outputLength:512}),_doReset:function(){for(var g=this._state=[],p=0;p<25;p++)g[p]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(g,p){for(var v=this._state,w=this.blockSize/2,b=0;b<w;b++){var C=g[p+2*b],I=g[p+2*b+1];C=16711935&(C<<8|C>>>24)|4278255360&(C<<24|C>>>8),I=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8),(j=v[b]).high^=I,j.low^=C}for(var E=0;E<24;E++){for(var k=0;k<5;k++){for(var N=0,$=0,S=0;S<5;S++)N^=(j=v[k+5*S]).high,$^=j.low;var x=h[k];x.high=N,x.low=$}for(k=0;k<5;k++){var D=h[(k+4)%5],B=h[(k+1)%5],V=B.high,L=B.low;for(N=D.high^(V<<1|L>>>31),$=D.low^(L<<1|V>>>31),S=0;S<5;S++)(j=v[k+5*S]).high^=N,j.low^=$}for(var U=1;U<25;U++){var M=(j=v[U]).high,q=j.low,R=d[U];R<32?(N=M<<R|q>>>32-R,$=q<<R|M>>>32-R):(N=q<<R-32|M>>>64-R,$=M<<R-32|q>>>64-R);var Z=h[f[U]];Z.high=N,Z.low=$}var O=h[0],z=v[0];for(O.high=z.high,O.low=z.low,k=0;k<5;k++)for(S=0;S<5;S++){var j=v[U=k+5*S],T=h[U],Q=h[(k+1)%5+5*S],te=h[(k+2)%5+5*S];j.high=T.high^~Q.high&te.high,j.low=T.low^~Q.low&te.low}j=v[0];var W=m[E];j.high^=W.high,j.low^=W.low}},_doFinalize:function(){var g=this._data,p=g.words,v=(this._nDataBytes,8*g.sigBytes),w=32*this.blockSize;p[v>>>5]|=1<<24-v%32,p[(a.ceil((v+1)/w)*w>>>5)-1]|=128,g.sigBytes=4*p.length,this._process();for(var b=this._state,C=this.cfg.outputLength/8,I=C/8,E=[],k=0;k<I;k++){var N=b[k],$=N.high,S=N.low;$=16711935&($<<8|$>>>24)|4278255360&($<<24|$>>>8),S=16711935&(S<<8|S>>>24)|4278255360&(S<<24|S>>>8),E.push(S),E.push($)}return new l.init(E,C)},clone:function(){for(var g=u.clone.call(this),p=g._state=this._state.slice(0),v=0;v<25;v++)p[v]=p[v].clone();return g}});r.SHA3=u._createHelper(_),r.HmacSHA3=u._createHmacHelper(_)}(Math),o.SHA3)}),be(function(e,n){var o;e.exports=(o=Ce,function(a){var r=o,i=r.lib,l=i.WordArray,u=i.Hasher,s=r.algo,c=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),m=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=l.create([0,1518500249,1859775393,2400959708,2840853838]),_=l.create([1352829926,1548603684,1836072691,2053994217,0]),g=s.RIPEMD160=u.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,k){for(var N=0;N<16;N++){var $=k+N,S=E[$];E[$]=16711935&(S<<8|S>>>24)|4278255360&(S<<24|S>>>8)}var x,D,B,V,L,U,M,q,R,Z,O,z=this._hash.words,j=h.words,T=_.words,Q=c.words,te=d.words,W=f.words,K=m.words;for(U=x=z[0],M=D=z[1],q=B=z[2],R=V=z[3],Z=L=z[4],N=0;N<80;N+=1)O=x+E[k+Q[N]]|0,O+=N<16?p(D,B,V)+j[0]:N<32?v(D,B,V)+j[1]:N<48?w(D,B,V)+j[2]:N<64?b(D,B,V)+j[3]:C(D,B,V)+j[4],O=(O=I(O|=0,W[N]))+L|0,x=L,L=V,V=I(B,10),B=D,D=O,O=U+E[k+te[N]]|0,O+=N<16?C(M,q,R)+T[0]:N<32?b(M,q,R)+T[1]:N<48?w(M,q,R)+T[2]:N<64?v(M,q,R)+T[3]:p(M,q,R)+T[4],O=(O=I(O|=0,K[N]))+Z|0,U=Z,Z=R,R=I(q,10),q=M,M=O;O=z[1]+B+R|0,z[1]=z[2]+V+Z|0,z[2]=z[3]+L+U|0,z[3]=z[4]+x+M|0,z[4]=z[0]+D+q|0,z[0]=O},_doFinalize:function(){var E=this._data,k=E.words,N=8*this._nDataBytes,$=8*E.sigBytes;k[$>>>5]|=128<<24-$%32,k[14+($+64>>>9<<4)]=16711935&(N<<8|N>>>24)|4278255360&(N<<24|N>>>8),E.sigBytes=4*(k.length+1),this._process();for(var S=this._hash,x=S.words,D=0;D<5;D++){var B=x[D];x[D]=16711935&(B<<8|B>>>24)|4278255360&(B<<24|B>>>8)}return S},clone:function(){var E=u.clone.call(this);return E._hash=this._hash.clone(),E}});function p(E,k,N){return E^k^N}function v(E,k,N){return E&k|~E&N}function w(E,k,N){return(E|~k)^N}function b(E,k,N){return E&N|k&~N}function C(E,k,N){return E^(k|~N)}function I(E,k){return E<<k|E>>>32-k}r.RIPEMD160=u._createHelper(g),r.HmacRIPEMD160=u._createHmacHelper(g)}(),o.RIPEMD160)}),be(function(e,n){var o,a,r,i,l,u;e.exports=(a=(o=Ce).lib,r=a.Base,i=o.enc,l=i.Utf8,u=o.algo,void(u.HMAC=r.extend({init:function(s,c){s=this._hasher=new s.init,typeof c=="string"&&(c=l.parse(c));var d=s.blockSize,f=4*d;c.sigBytes>f&&(c=s.finalize(c)),c.clamp();for(var m=this._oKey=c.clone(),h=this._iKey=c.clone(),_=m.words,g=h.words,p=0;p<d;p++)_[p]^=1549556828,g[p]^=909522486;m.sigBytes=h.sigBytes=f,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var c=this._hasher,d=c.finalize(s);c.reset();var f=c.finalize(this._oKey.clone().concat(d));return f}})))}),be(function(e,n){var o,a,r,i,l,u,s,c,d;e.exports=(r=(a=o=Ce).lib,i=r.Base,l=r.WordArray,u=a.algo,s=u.SHA1,c=u.HMAC,d=u.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:s,iterations:1}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,m){for(var h=this.cfg,_=c.create(h.hasher,f),g=l.create(),p=l.create([1]),v=g.words,w=p.words,b=h.keySize,C=h.iterations;v.length<b;){var I=_.update(m).finalize(p);_.reset();for(var E=I.words,k=E.length,N=I,$=1;$<C;$++){N=_.finalize(N),_.reset();for(var S=N.words,x=0;x<k;x++)E[x]^=S[x]}g.concat(I),w[0]++}return g.sigBytes=4*b,g}}),a.PBKDF2=function(f,m,h){return d.create(h).compute(f,m)},o.PBKDF2)}),be(function(e,n){var o,a,r,i,l,u,s,c;e.exports=(r=(a=o=Ce).lib,i=r.Base,l=r.WordArray,u=a.algo,s=u.MD5,c=u.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:s,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,f){for(var m=this.cfg,h=m.hasher.create(),_=l.create(),g=_.words,p=m.keySize,v=m.iterations;g.length<p;){w&&h.update(w);var w=h.update(d).finalize(f);h.reset();for(var b=1;b<v;b++)w=h.finalize(w),h.reset();_.concat(w)}return _.sigBytes=4*p,_}}),a.EvpKDF=function(d,f,m){return c.create(m).compute(d,f)},o.EvpKDF)}),be(function(e,n){var o,a,r,i,l,u,s,c,d,f,m,h,_,g,p,v,w,b,C,I,E,k,N,$;e.exports=void((o=Ce).lib.Cipher||(r=o,i=r.lib,l=i.Base,u=i.WordArray,s=i.BufferedBlockAlgorithm,c=r.enc,c.Utf8,d=c.Base64,f=r.algo,m=f.EvpKDF,h=i.Cipher=s.extend({cfg:l.extend(),createEncryptor:function(S,x){return this.create(this._ENC_XFORM_MODE,S,x)},createDecryptor:function(S,x){return this.create(this._DEC_XFORM_MODE,S,x)},init:function(S,x,D){this.cfg=this.cfg.extend(D),this._xformMode=S,this._key=x,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(S){return this._append(S),this._process()},finalize:function(S){S&&this._append(S);var x=this._doFinalize();return x},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function S(x){return typeof x=="string"?$:E}return function(x){return{encrypt:function(D,B,V){return S(B).encrypt(x,D,B,V)},decrypt:function(D,B,V){return S(B).decrypt(x,D,B,V)}}}}()}),i.StreamCipher=h.extend({_doFinalize:function(){var S=this._process(!0);return S},blockSize:1}),_=r.mode={},g=i.BlockCipherMode=l.extend({createEncryptor:function(S,x){return this.Encryptor.create(S,x)},createDecryptor:function(S,x){return this.Decryptor.create(S,x)},init:function(S,x){this._cipher=S,this._iv=x}}),p=_.CBC=function(){var S=g.extend();function x(D,B,V){var L=this._iv;if(L){var U=L;this._iv=a}else var U=this._prevBlock;for(var M=0;M<V;M++)D[B+M]^=U[M]}return S.Encryptor=S.extend({processBlock:function(D,B){var V=this._cipher,L=V.blockSize;x.call(this,D,B,L),V.encryptBlock(D,B),this._prevBlock=D.slice(B,B+L)}}),S.Decryptor=S.extend({processBlock:function(D,B){var V=this._cipher,L=V.blockSize,U=D.slice(B,B+L);V.decryptBlock(D,B),x.call(this,D,B,L),this._prevBlock=U}}),S}(),v=r.pad={},w=v.Pkcs7={pad:function(S,x){for(var D=4*x,B=D-S.sigBytes%D,V=B<<24|B<<16|B<<8|B,L=[],U=0;U<B;U+=4)L.push(V);var M=u.create(L,B);S.concat(M)},unpad:function(S){var x=255&S.words[S.sigBytes-1>>>2];S.sigBytes-=x}},i.BlockCipher=h.extend({cfg:h.cfg.extend({mode:p,padding:w}),reset:function(){h.reset.call(this);var S=this.cfg,x=S.iv,D=S.mode;if(this._xformMode==this._ENC_XFORM_MODE)var B=D.createEncryptor;else{var B=D.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==B?this._mode.init(this,x&&x.words):(this._mode=B.call(D,this,x&&x.words),this._mode.__creator=B)},_doProcessBlock:function(S,x){this._mode.processBlock(S,x)},_doFinalize:function(){var S=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){S.pad(this._data,this.blockSize);var x=this._process(!0)}else{var x=this._process(!0);S.unpad(x)}return x},blockSize:4}),b=i.CipherParams=l.extend({init:function(S){this.mixIn(S)},toString:function(S){return(S||this.formatter).stringify(this)}}),C=r.format={},I=C.OpenSSL={stringify:function(S){var x=S.ciphertext,D=S.salt;if(D)var B=u.create([1398893684,1701076831]).concat(D).concat(x);else var B=x;return B.toString(d)},parse:function(S){var x=d.parse(S),D=x.words;if(D[0]==1398893684&&D[1]==1701076831){var B=u.create(D.slice(2,4));D.splice(0,4),x.sigBytes-=16}return b.create({ciphertext:x,salt:B})}},E=i.SerializableCipher=l.extend({cfg:l.extend({format:I}),encrypt:function(S,x,D,B){B=this.cfg.extend(B);var V=S.createEncryptor(D,B),L=V.finalize(x),U=V.cfg;return b.create({ciphertext:L,key:D,iv:U.iv,algorithm:S,mode:U.mode,padding:U.padding,blockSize:S.blockSize,formatter:B.format})},decrypt:function(S,x,D,B){B=this.cfg.extend(B),x=this._parse(x,B.format);var V=S.createDecryptor(D,B).finalize(x.ciphertext);return V},_parse:function(S,x){return typeof S=="string"?x.parse(S,this):S}}),k=r.kdf={},N=k.OpenSSL={execute:function(S,x,D,B){B||(B=u.random(8));var V=m.create({keySize:x+D}).compute(S,B),L=u.create(V.words.slice(x),4*D);return V.sigBytes=4*x,b.create({key:V,iv:L,salt:B})}},$=i.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:N}),encrypt:function(S,x,D,B){var V=(B=this.cfg.extend(B)).kdf.execute(D,S.keySize,S.ivSize);B.iv=V.iv;var L=E.encrypt.call(this,S,x,V.key,B);return L.mixIn(V),L},decrypt:function(S,x,D,B){B=this.cfg.extend(B),x=this._parse(x,B.format);var V=B.kdf.execute(D,S.keySize,S.ivSize,x.salt);B.iv=V.iv;var L=E.decrypt.call(this,S,x,V.key,B);return L}})))}),be(function(e,n){var o;e.exports=((o=Ce).mode.CFB=function(){var a=o.lib.BlockCipherMode.extend();function r(i,l,u,s){var c=this._iv;if(c){var d=c.slice(0);this._iv=void 0}else d=this._prevBlock;s.encryptBlock(d,0);for(var f=0;f<u;f++)i[l+f]^=d[f]}return a.Encryptor=a.extend({processBlock:function(i,l){var u=this._cipher,s=u.blockSize;r.call(this,i,l,s,u),this._prevBlock=i.slice(l,l+s)}}),a.Decryptor=a.extend({processBlock:function(i,l){var u=this._cipher,s=u.blockSize,c=i.slice(l,l+s);r.call(this,i,l,s,u),this._prevBlock=c}}),a}(),o.mode.CFB)}),be(function(e,n){var o,a,r;e.exports=((o=Ce).mode.CTR=(a=o.lib.BlockCipherMode.extend(),r=a.Encryptor=a.extend({processBlock:function(i,l){var u=this._cipher,s=u.blockSize,c=this._iv,d=this._counter;c&&(d=this._counter=c.slice(0),this._iv=void 0);var f=d.slice(0);u.encryptBlock(f,0),d[s-1]=d[s-1]+1|0;for(var m=0;m<s;m++)i[l+m]^=f[m]}}),a.Decryptor=r,a),o.mode.CTR)}),be(function(e,n){var o;e.exports=((o=Ce).mode.CTRGladman=function(){var a=o.lib.BlockCipherMode.extend();function r(l){if((l>>24&255)==255){var u=l>>16&255,s=l>>8&255,c=255&l;u===255?(u=0,s===255?(s=0,c===255?c=0:++c):++s):++u,l=0,l+=u<<16,l+=s<<8,l+=c}else l+=1<<24;return l}var i=a.Encryptor=a.extend({processBlock:function(l,u){var s=this._cipher,c=s.blockSize,d=this._iv,f=this._counter;d&&(f=this._counter=d.slice(0),this._iv=void 0),function(_){(_[0]=r(_[0]))===0&&(_[1]=r(_[1]))}(f);var m=f.slice(0);s.encryptBlock(m,0);for(var h=0;h<c;h++)l[u+h]^=m[h]}});return a.Decryptor=i,a}(),o.mode.CTRGladman)}),be(function(e,n){var o,a,r;e.exports=((o=Ce).mode.OFB=(a=o.lib.BlockCipherMode.extend(),r=a.Encryptor=a.extend({processBlock:function(i,l){var u=this._cipher,s=u.blockSize,c=this._iv,d=this._keystream;c&&(d=this._keystream=c.slice(0),this._iv=void 0),u.encryptBlock(d,0);for(var f=0;f<s;f++)i[l+f]^=d[f]}}),a.Decryptor=r,a),o.mode.OFB)}),be(function(e,n){var o,a;e.exports=((o=Ce).mode.ECB=((a=o.lib.BlockCipherMode.extend()).Encryptor=a.extend({processBlock:function(r,i){this._cipher.encryptBlock(r,i)}}),a.Decryptor=a.extend({processBlock:function(r,i){this._cipher.decryptBlock(r,i)}}),a),o.mode.ECB)}),be(function(e,n){var o;e.exports=((o=Ce).pad.AnsiX923={pad:function(a,r){var i=a.sigBytes,l=4*r,u=l-i%l,s=i+u-1;a.clamp(),a.words[s>>>2]|=u<<24-s%4*8,a.sigBytes+=u},unpad:function(a){var r=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=r}},o.pad.Ansix923)}),be(function(e,n){var o;e.exports=((o=Ce).pad.Iso10126={pad:function(a,r){var i=4*r,l=i-a.sigBytes%i;a.concat(o.lib.WordArray.random(l-1)).concat(o.lib.WordArray.create([l<<24],1))},unpad:function(a){var r=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=r}},o.pad.Iso10126)}),be(function(e,n){var o;e.exports=((o=Ce).pad.Iso97971={pad:function(a,r){a.concat(o.lib.WordArray.create([2147483648],1)),o.pad.ZeroPadding.pad(a,r)},unpad:function(a){o.pad.ZeroPadding.unpad(a),a.sigBytes--}},o.pad.Iso97971)}),be(function(e,n){var o;e.exports=((o=Ce).pad.ZeroPadding={pad:function(a,r){var i=4*r;a.clamp(),a.sigBytes+=i-(a.sigBytes%i||i)},unpad:function(a){for(var r=a.words,i=a.sigBytes-1;!(r[i>>>2]>>>24-i%4*8&255);)i--;a.sigBytes=i+1}},o.pad.ZeroPadding)}),be(function(e,n){var o;e.exports=((o=Ce).pad.NoPadding={pad:function(){},unpad:function(){}},o.pad.NoPadding)}),be(function(e,n){var o,a,r,i;e.exports=(r=(a=o=Ce).lib.CipherParams,i=a.enc.Hex,a.format.Hex={stringify:function(l){return l.ciphertext.toString(i)},parse:function(l){var u=i.parse(l);return r.create({ciphertext:u})}},o.format.Hex)}),be(function(e,n){var o;e.exports=(o=Ce,function(){var a=o,r=a.lib.BlockCipher,i=a.algo,l=[],u=[],s=[],c=[],d=[],f=[],m=[],h=[],_=[],g=[];(function(){for(var w=[],b=0;b<256;b++)w[b]=b<128?b<<1:b<<1^283;var C=0,I=0;for(b=0;b<256;b++){var E=I^I<<1^I<<2^I<<3^I<<4;E=E>>>8^255&E^99,l[C]=E,u[E]=C;var k=w[C],N=w[k],$=w[N],S=257*w[E]^16843008*E;s[C]=S<<24|S>>>8,c[C]=S<<16|S>>>16,d[C]=S<<8|S>>>24,f[C]=S,S=16843009*$^65537*N^257*k^16843008*C,m[E]=S<<24|S>>>8,h[E]=S<<16|S>>>16,_[E]=S<<8|S>>>24,g[E]=S,C?(C=k^w[w[w[$^k]]],I^=w[w[I]]):C=I=1}})();var p=[0,1,2,4,8,16,32,64,128,27,54],v=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var w=this._keyPriorReset=this._key,b=w.words,C=w.sigBytes/4,I=4*((this._nRounds=C+6)+1),E=this._keySchedule=[],k=0;k<I;k++)if(k<C)E[k]=b[k];else{var N=E[k-1];k%C?C>6&&k%C==4&&(N=l[N>>>24]<<24|l[N>>>16&255]<<16|l[N>>>8&255]<<8|l[255&N]):(N=l[(N=N<<8|N>>>24)>>>24]<<24|l[N>>>16&255]<<16|l[N>>>8&255]<<8|l[255&N],N^=p[k/C|0]<<24),E[k]=E[k-C]^N}for(var $=this._invKeySchedule=[],S=0;S<I;S++)k=I-S,N=S%4?E[k]:E[k-4],$[S]=S<4||k<=4?N:m[l[N>>>24]]^h[l[N>>>16&255]]^_[l[N>>>8&255]]^g[l[255&N]]}},encryptBlock:function(w,b){this._doCryptBlock(w,b,this._keySchedule,s,c,d,f,l)},decryptBlock:function(w,b){var C=w[b+1];w[b+1]=w[b+3],w[b+3]=C,this._doCryptBlock(w,b,this._invKeySchedule,m,h,_,g,u),C=w[b+1],w[b+1]=w[b+3],w[b+3]=C},_doCryptBlock:function(w,b,C,I,E,k,N,$){for(var S=this._nRounds,x=w[b]^C[0],D=w[b+1]^C[1],B=w[b+2]^C[2],V=w[b+3]^C[3],L=4,U=1;U<S;U++){var M=I[x>>>24]^E[D>>>16&255]^k[B>>>8&255]^N[255&V]^C[L++],q=I[D>>>24]^E[B>>>16&255]^k[V>>>8&255]^N[255&x]^C[L++],R=I[B>>>24]^E[V>>>16&255]^k[x>>>8&255]^N[255&D]^C[L++],Z=I[V>>>24]^E[x>>>16&255]^k[D>>>8&255]^N[255&B]^C[L++];x=M,D=q,B=R,V=Z}M=($[x>>>24]<<24|$[D>>>16&255]<<16|$[B>>>8&255]<<8|$[255&V])^C[L++],q=($[D>>>24]<<24|$[B>>>16&255]<<16|$[V>>>8&255]<<8|$[255&x])^C[L++],R=($[B>>>24]<<24|$[V>>>16&255]<<16|$[x>>>8&255]<<8|$[255&D])^C[L++],Z=($[V>>>24]<<24|$[x>>>16&255]<<16|$[D>>>8&255]<<8|$[255&B])^C[L++],w[b]=M,w[b+1]=q,w[b+2]=R,w[b+3]=Z},keySize:8});a.AES=r._createHelper(v)}(),o.AES)}),be(function(e,n){var o;e.exports=(o=Ce,function(){var a=o,r=a.lib,i=r.WordArray,l=r.BlockCipher,u=a.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=u.DES=l.extend({_doReset:function(){for(var v=this._key.words,w=[],b=0;b<56;b++){var C=s[b]-1;w[b]=v[C>>>5]>>>31-C%32&1}for(var I=this._subKeys=[],E=0;E<16;E++){var k=I[E]=[],N=d[E];for(b=0;b<24;b++)k[b/6|0]|=w[(c[b]-1+N)%28]<<31-b%6,k[4+(b/6|0)]|=w[28+(c[b+24]-1+N)%28]<<31-b%6;for(k[0]=k[0]<<1|k[0]>>>31,b=1;b<7;b++)k[b]=k[b]>>>4*(b-1)+3;k[7]=k[7]<<5|k[7]>>>27}var $=this._invSubKeys=[];for(b=0;b<16;b++)$[b]=I[15-b]},encryptBlock:function(v,w){this._doCryptBlock(v,w,this._subKeys)},decryptBlock:function(v,w){this._doCryptBlock(v,w,this._invSubKeys)},_doCryptBlock:function(v,w,b){this._lBlock=v[w],this._rBlock=v[w+1],_.call(this,4,252645135),_.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),_.call(this,1,1431655765);for(var C=0;C<16;C++){for(var I=b[C],E=this._lBlock,k=this._rBlock,N=0,$=0;$<8;$++)N|=f[$][((k^I[$])&m[$])>>>0];this._lBlock=k,this._rBlock=E^N}var S=this._lBlock;this._lBlock=this._rBlock,this._rBlock=S,_.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),_.call(this,16,65535),_.call(this,4,252645135),v[w]=this._lBlock,v[w+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function _(v,w){var b=(this._lBlock>>>v^this._rBlock)&w;this._rBlock^=b,this._lBlock^=b<<v}function g(v,w){var b=(this._rBlock>>>v^this._lBlock)&w;this._lBlock^=b,this._rBlock^=b<<v}a.DES=l._createHelper(h);var p=u.TripleDES=l.extend({_doReset:function(){var v=this._key.words;this._des1=h.createEncryptor(i.create(v.slice(0,2))),this._des2=h.createEncryptor(i.create(v.slice(2,4))),this._des3=h.createEncryptor(i.create(v.slice(4,6)))},encryptBlock:function(v,w){this._des1.encryptBlock(v,w),this._des2.decryptBlock(v,w),this._des3.encryptBlock(v,w)},decryptBlock:function(v,w){this._des3.decryptBlock(v,w),this._des2.encryptBlock(v,w),this._des1.decryptBlock(v,w)},keySize:6,ivSize:2,blockSize:2});a.TripleDES=l._createHelper(p)}(),o.TripleDES)}),be(function(e,n){var o;e.exports=(o=Ce,function(){var a=o,r=a.lib.StreamCipher,i=a.algo,l=i.RC4=r.extend({_doReset:function(){for(var c=this._key,d=c.words,f=c.sigBytes,m=this._S=[],h=0;h<256;h++)m[h]=h;h=0;for(var _=0;h<256;h++){var g=h%f,p=d[g>>>2]>>>24-g%4*8&255;_=(_+m[h]+p)%256;var v=m[h];m[h]=m[_],m[_]=v}this._i=this._j=0},_doProcessBlock:function(c,d){c[d]^=u.call(this)},keySize:8,ivSize:0});function u(){for(var c=this._S,d=this._i,f=this._j,m=0,h=0;h<4;h++){f=(f+c[d=(d+1)%256])%256;var _=c[d];c[d]=c[f],c[f]=_,m|=c[(c[d]+c[f])%256]<<24-8*h}return this._i=d,this._j=f,m}a.RC4=r._createHelper(l);var s=i.RC4Drop=l.extend({cfg:l.cfg.extend({drop:192}),_doReset:function(){l._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)u.call(this)}});a.RC4Drop=r._createHelper(s)}(),o.RC4)}),be(function(e,n){var o;e.exports=(o=Ce,function(){var a=o,r=a.lib.StreamCipher,i=a.algo,l=[],u=[],s=[],c=i.Rabbit=r.extend({_doReset:function(){for(var f=this._key.words,m=this.cfg.iv,h=0;h<4;h++)f[h]=16711935&(f[h]<<8|f[h]>>>24)|4278255360&(f[h]<<24|f[h]>>>8);var _=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],g=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];for(this._b=0,h=0;h<4;h++)d.call(this);for(h=0;h<8;h++)g[h]^=_[h+4&7];if(m){var p=m.words,v=p[0],w=p[1],b=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),C=16711935&(w<<8|w>>>24)|4278255360&(w<<24|w>>>8),I=b>>>16|4294901760&C,E=C<<16|65535&b;for(g[0]^=b,g[1]^=I,g[2]^=C,g[3]^=E,g[4]^=b,g[5]^=I,g[6]^=C,g[7]^=E,h=0;h<4;h++)d.call(this)}},_doProcessBlock:function(f,m){var h=this._X;d.call(this),l[0]=h[0]^h[5]>>>16^h[3]<<16,l[1]=h[2]^h[7]>>>16^h[5]<<16,l[2]=h[4]^h[1]>>>16^h[7]<<16,l[3]=h[6]^h[3]>>>16^h[1]<<16;for(var _=0;_<4;_++)l[_]=16711935&(l[_]<<8|l[_]>>>24)|4278255360&(l[_]<<24|l[_]>>>8),f[m+_]^=l[_]},blockSize:4,ivSize:2});function d(){for(var f=this._X,m=this._C,h=0;h<8;h++)u[h]=m[h];for(m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<u[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<u[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<u[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<u[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<u[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<u[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<u[6]>>>0?1:0)|0,this._b=m[7]>>>0<u[7]>>>0?1:0,h=0;h<8;h++){var _=f[h]+m[h],g=65535&_,p=_>>>16,v=((g*g>>>17)+g*p>>>15)+p*p,w=((4294901760&_)*_|0)+((65535&_)*_|0);s[h]=v^w}f[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,f[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,f[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,f[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,f[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,f[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,f[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,f[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}a.Rabbit=r._createHelper(c)}(),o.Rabbit)}),be(function(e,n){var o;e.exports=(o=Ce,function(){var a=o,r=a.lib.StreamCipher,i=a.algo,l=[],u=[],s=[],c=i.RabbitLegacy=r.extend({_doReset:function(){var f=this._key.words,m=this.cfg.iv,h=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],_=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];this._b=0;for(var g=0;g<4;g++)d.call(this);for(g=0;g<8;g++)_[g]^=h[g+4&7];if(m){var p=m.words,v=p[0],w=p[1],b=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),C=16711935&(w<<8|w>>>24)|4278255360&(w<<24|w>>>8),I=b>>>16|4294901760&C,E=C<<16|65535&b;for(_[0]^=b,_[1]^=I,_[2]^=C,_[3]^=E,_[4]^=b,_[5]^=I,_[6]^=C,_[7]^=E,g=0;g<4;g++)d.call(this)}},_doProcessBlock:function(f,m){var h=this._X;d.call(this),l[0]=h[0]^h[5]>>>16^h[3]<<16,l[1]=h[2]^h[7]>>>16^h[5]<<16,l[2]=h[4]^h[1]>>>16^h[7]<<16,l[3]=h[6]^h[3]>>>16^h[1]<<16;for(var _=0;_<4;_++)l[_]=16711935&(l[_]<<8|l[_]>>>24)|4278255360&(l[_]<<24|l[_]>>>8),f[m+_]^=l[_]},blockSize:4,ivSize:2});function d(){for(var f=this._X,m=this._C,h=0;h<8;h++)u[h]=m[h];for(m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<u[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<u[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<u[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<u[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<u[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<u[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<u[6]>>>0?1:0)|0,this._b=m[7]>>>0<u[7]>>>0?1:0,h=0;h<8;h++){var _=f[h]+m[h],g=65535&_,p=_>>>16,v=((g*g>>>17)+g*p>>>15)+p*p,w=((4294901760&_)*_|0)+((65535&_)*_|0);s[h]=v^w}f[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,f[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,f[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,f[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,f[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,f[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,f[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,f[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}a.RabbitLegacy=r._createHelper(c)}(),o.RabbitLegacy)}),be(function(e,n){e.exports=Ce}));function Js(){throw new Error("setTimeout has not been defined")}function Gs(){throw new Error("clearTimeout has not been defined")}var Zt=Js,Jt=Gs;function Qs(e){if(Zt===setTimeout)return setTimeout(e,0);if((Zt===Js||!Zt)&&setTimeout)return Zt=setTimeout,setTimeout(e,0);try{return Zt(e,0)}catch{try{return Zt.call(null,e,0)}catch{return Zt.call(this,e,0)}}}typeof to.setTimeout=="function"&&(Zt=setTimeout),typeof to.clearTimeout=="function"&&(Jt=clearTimeout);var bn,Ht=[],Kn=!1,Zo=-1;function r1(){Kn&&bn&&(Kn=!1,bn.length?Ht=bn.concat(Ht):Zo=-1,Ht.length&&Ys())}function Ys(){if(!Kn){var e=Qs(r1);Kn=!0;for(var n=Ht.length;n;){for(bn=Ht,Ht=[];++Zo<n;)bn&&bn[Zo].run();Zo=-1,n=Ht.length}bn=null,Kn=!1,function(o){if(Jt===clearTimeout)return clearTimeout(o);if((Jt===Gs||!Jt)&&clearTimeout)return Jt=clearTimeout,clearTimeout(o);try{Jt(o)}catch{try{return Jt.call(null,o)}catch{return Jt.call(this,o)}}}(e)}}function Qe(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)n[o-1]=arguments[o];Ht.push(new Xs(e,n)),Ht.length!==1||Kn||Qs(Ys)}function Xs(e,n){this.fun=e,this.array=n}Xs.prototype.run=function(){this.fun.apply(null,this.array)};var lo=to.performance||{};lo.now||lo.mozNow||lo.msNow||lo.oNow||lo.webkitNow;function Gt(){}function we(){we.init.call(this)}function ec(e){return e._maxListeners===void 0?we.defaultMaxListeners:e._maxListeners}function i1(e,n,o){if(n)e.call(o);else for(var a=e.length,r=Io(e,a),i=0;i<a;++i)r[i].call(o)}function l1(e,n,o,a){if(n)e.call(o,a);else for(var r=e.length,i=Io(e,r),l=0;l<r;++l)i[l].call(o,a)}function s1(e,n,o,a,r){if(n)e.call(o,a,r);else for(var i=e.length,l=Io(e,i),u=0;u<i;++u)l[u].call(o,a,r)}function c1(e,n,o,a,r,i){if(n)e.call(o,a,r,i);else for(var l=e.length,u=Io(e,l),s=0;s<l;++s)u[s].call(o,a,r,i)}function u1(e,n,o,a){if(n)e.apply(o,a);else for(var r=e.length,i=Io(e,r),l=0;l<r;++l)i[l].apply(o,a)}function ki(e,n,o,a){var r,i,l,u;if(typeof o!="function")throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",n,o.listener?o.listener:o),i=e._events),l=i[n]):(i=e._events=new Gt,e._eventsCount=0),l){if(typeof l=="function"?l=i[n]=a?[o,l]:[l,o]:a?l.unshift(o):l.push(o),!l.warned&&(r=ec(e))&&r>0&&l.length>r){l.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+n+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=n,s.count=l.length,u=s,typeof console.warn=="function"?console.warn(u):console.log(u)}}else l=i[n]=o,++e._eventsCount;return e}function Ci(e,n,o){var a=!1;function r(){e.removeListener(n,r),a||(a=!0,o.apply(e,arguments))}return r.listener=o,r}function Ei(e){var n=this._events;if(n){var o=n[e];if(typeof o=="function")return 1;if(o)return o.length}return 0}function Io(e,n){for(var o=new Array(n);n--;)o[n]=e[n];return o}Gt.prototype=Object.create(null),we.EventEmitter=we,we.usingDomains=!1,we.prototype.domain=void 0,we.prototype._events=void 0,we.prototype._maxListeners=void 0,we.defaultMaxListeners=10,we.init=function(){this.domain=null,we.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Gt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},we.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},we.prototype.getMaxListeners=function(){return ec(this)},we.prototype.emit=function(e){var n,o,a,r,i,l,u,s=e==="error";if(l=this._events)s=s&&l.error==null;else if(!s)return!1;if(u=this.domain,s){if(n=arguments[1],!u){if(n instanceof Error)throw n;var c=new Error('Uncaught, unspecified "error" event. ('+n+")");throw c.context=n,c}return n||(n=new Error('Uncaught, unspecified "error" event')),n.domainEmitter=this,n.domain=u,n.domainThrown=!1,u.emit("error",n),!1}if(!(o=l[e]))return!1;var d=typeof o=="function";switch(a=arguments.length){case 1:i1(o,d,this);break;case 2:l1(o,d,this,arguments[1]);break;case 3:s1(o,d,this,arguments[1],arguments[2]);break;case 4:c1(o,d,this,arguments[1],arguments[2],arguments[3]);break;default:for(r=new Array(a-1),i=1;i<a;i++)r[i-1]=arguments[i];u1(o,d,this,r)}return!0},we.prototype.addListener=function(e,n){return ki(this,e,n,!1)},we.prototype.on=we.prototype.addListener,we.prototype.prependListener=function(e,n){return ki(this,e,n,!0)},we.prototype.once=function(e,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.on(e,Ci(this,e,n)),this},we.prototype.prependOnceListener=function(e,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Ci(this,e,n)),this},we.prototype.removeListener=function(e,n){var o,a,r,i,l;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(!(a=this._events))return this;if(!(o=a[e]))return this;if(o===n||o.listener&&o.listener===n)--this._eventsCount==0?this._events=new Gt:(delete a[e],a.removeListener&&this.emit("removeListener",e,o.listener||n));else if(typeof o!="function"){for(r=-1,i=o.length;i-- >0;)if(o[i]===n||o[i].listener&&o[i].listener===n){l=o[i].listener,r=i;break}if(r<0)return this;if(o.length===1){if(o[0]=void 0,--this._eventsCount==0)return this._events=new Gt,this;delete a[e]}else(function(u,s){for(var c=s,d=c+1,f=u.length;d<f;c+=1,d+=1)u[c]=u[d];u.pop()})(o,r);a.removeListener&&this.emit("removeListener",e,l||n)}return this},we.prototype.removeAllListeners=function(e){var n,o;if(!(o=this._events))return this;if(!o.removeListener)return arguments.length===0?(this._events=new Gt,this._eventsCount=0):o[e]&&(--this._eventsCount==0?this._events=new Gt:delete o[e]),this;if(arguments.length===0){for(var a,r=Object.keys(o),i=0;i<r.length;++i)(a=r[i])!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=new Gt,this._eventsCount=0,this}if(typeof(n=o[e])=="function")this.removeListener(e,n);else if(n)do this.removeListener(e,n[n.length-1]);while(n[0]);return this},we.prototype.listeners=function(e){var n,o=this._events;return o&&(n=o[e])?typeof n=="function"?[n.listener||n]:function(a){for(var r=new Array(a.length),i=0;i<r.length;++i)r[i]=a[i].listener||a[i];return r}(n):[]},we.listenerCount=function(e,n){return typeof e.listenerCount=="function"?e.listenerCount(n):Ei.call(e,n)},we.prototype.listenerCount=Ei,we.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var dt=typeof Object.create=="function"?function(e,n){e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,n){e.super_=n;var o=function(){};o.prototype=n.prototype,e.prototype=new o,e.prototype.constructor=e},d1=/%[sdj%]/g;function f1(e){if(!dr(e)){for(var n=[],o=0;o<arguments.length;o++)n.push(rn(arguments[o]));return n.join(" ")}o=1;for(var a=arguments,r=a.length,i=String(e).replace(d1,function(u){if(u==="%%")return"%";if(o>=r)return u;switch(u){case"%s":return String(a[o++]);case"%d":return Number(a[o++]);case"%j":try{return JSON.stringify(a[o++])}catch{return"[Circular]"}default:return u}}),l=a[o];o<r;l=a[++o])Rr(l)||!Bo(l)?i+=" "+l:i+=" "+rn(l);return i}function tc(e,n){if(Xt(to.process))return function(){return tc(e,n).apply(this,arguments)};var o=!1;return function(){return o||(console.error(n),o=!0),e.apply(this,arguments)}}var Ta,Mo={};function rn(e,n){var o={seen:[],stylize:h1};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),nc(n)?o.showHidden=n:n&&function(a,r){if(!r||!Bo(r))return a;for(var i=Object.keys(r),l=i.length;l--;)a[i[l]]=r[i[l]]}(o,n),Xt(o.showHidden)&&(o.showHidden=!1),Xt(o.depth)&&(o.depth=2),Xt(o.colors)&&(o.colors=!1),Xt(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=m1),ia(o,e,o.depth)}function m1(e,n){var o=rn.styles[n];return o?"\x1B["+rn.colors[o][0]+"m"+e+"\x1B["+rn.colors[o][1]+"m":e}function h1(e,n){return e}function ia(e,n,o){if(e.customInspect&&n&&Oa(n.inspect)&&n.inspect!==rn&&(!n.constructor||n.constructor.prototype!==n)){var a=n.inspect(o,e);return dr(a)||(a=ia(e,a,o)),a}var r=function(h,_){if(Xt(_))return h.stylize("undefined","undefined");if(dr(_)){var g="'"+JSON.stringify(_).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return h.stylize(g,"string")}if(p=_,typeof p=="number")return h.stylize(""+_,"number");var p;if(nc(_))return h.stylize(""+_,"boolean");if(Rr(_))return h.stylize("null","null")}(e,n);if(r)return r;var i=Object.keys(n),l=function(h){var _={};return h.forEach(function(g,p){_[g]=!0}),_}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),Ma(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Ra(n);if(i.length===0){if(Oa(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(La(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(Si(n))return e.stylize(Date.prototype.toString.call(n),"date");if(Ma(n))return Ra(n)}var s,c,d="",f=!1,m=["{","}"];return s=n,Array.isArray(s)&&(f=!0,m=["[","]"]),Oa(n)&&(d=" [Function"+(n.name?": "+n.name:"")+"]"),La(n)&&(d=" "+RegExp.prototype.toString.call(n)),Si(n)&&(d=" "+Date.prototype.toUTCString.call(n)),Ma(n)&&(d=" "+Ra(n)),i.length!==0||f&&n.length!=0?o<0?La(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=f?function(h,_,g,p,v){for(var w=[],b=0,C=_.length;b<C;++b)oc(_,String(b))?w.push(Aa(h,_,g,p,String(b),!0)):w.push("");return v.forEach(function(I){I.match(/^\d+$/)||w.push(Aa(h,_,g,p,I,!0))}),w}(e,n,o,l,i):i.map(function(h){return Aa(e,n,o,l,h,f)}),e.seen.pop(),function(h,_,g){return h.reduce(function(p,v){return v.indexOf(`
8
+ `),p+v.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?g[0]+(_===""?"":_+`
9
+ `)+" "+h.join(`,
10
+ `)+" "+g[1]:g[0]+_+" "+h.join(", ")+" "+g[1]}(c,d,m)):m[0]+d+m[1]}function Ra(e){return"["+Error.prototype.toString.call(e)+"]"}function Aa(e,n,o,a,r,i){var l,u,s;if((s=Object.getOwnPropertyDescriptor(n,r)||{value:n[r]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),oc(a,r)||(l="["+r+"]"),u||(e.seen.indexOf(s.value)<0?(u=Rr(o)?ia(e,s.value,null):ia(e,s.value,o-1)).indexOf(`
11
+ `)>-1&&(u=i?u.split(`
12
+ `).map(function(c){return" "+c}).join(`
13
+ `).substr(2):`
14
+ `+u.split(`
15
+ `).map(function(c){return" "+c}).join(`
16
+ `)):u=e.stylize("[Circular]","special")),Xt(l)){if(i&&r.match(/^\d+$/))return u;(l=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=e.stylize(l,"name")):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=e.stylize(l,"string"))}return l+": "+u}function nc(e){return typeof e=="boolean"}function Rr(e){return e===null}function dr(e){return typeof e=="string"}function Xt(e){return e===void 0}function La(e){return Bo(e)&&Ar(e)==="[object RegExp]"}function Bo(e){return typeof e=="object"&&e!==null}function Si(e){return Bo(e)&&Ar(e)==="[object Date]"}function Ma(e){return Bo(e)&&(Ar(e)==="[object Error]"||e instanceof Error)}function Oa(e){return typeof e=="function"}function Ar(e){return Object.prototype.toString.call(e)}function oc(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function gn(){this.head=null,this.tail=null,this.length=0}rn.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},rn.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},gn.prototype.push=function(e){var n={data:e,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},gn.prototype.unshift=function(e){var n={data:e,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},gn.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},gn.prototype.clear=function(){this.head=this.tail=null,this.length=0},gn.prototype.join=function(e){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=e+n.data;return o},gn.prototype.concat=function(e){if(this.length===0)return J.alloc(0);if(this.length===1)return this.head.data;for(var n=J.allocUnsafe(e>>>0),o=this.head,a=0;o;)o.data.copy(n,a),a+=o.data.length,o=o.next;return n};var p1=J.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function mo(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(n){if(n&&!p1(n))throw new Error("Unknown encoding: "+n)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=g1;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=v1;break;default:return void(this.write=_1)}this.charBuffer=new J(6),this.charReceived=0,this.charLength=0}function _1(e){return e.toString(this.encoding)}function g1(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function v1(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}mo.prototype.write=function(e){for(var n="";this.charLength;){var o=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,o),this.charReceived+=o,this.charReceived<this.charLength)return"";if(e=e.slice(o,e.length),!((r=(n=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(n.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,e.length===0)return n;break}this.charLength+=this.surrogateSize,n=""}this.detectIncompleteChar(e);var a=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,a),a-=this.charReceived);var r;if(a=(n+=e.toString(this.encoding,0,a)).length-1,(r=n.charCodeAt(a))>=55296&&r<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),n.substring(0,a)}return n},mo.prototype.detectIncompleteChar=function(e){for(var n=e.length>=3?3:e.length;n>0;n--){var o=e[e.length-n];if(n==1&&o>>5==6){this.charLength=2;break}if(n<=2&&o>>4==14){this.charLength=3;break}if(n<=3&&o>>3==30){this.charLength=4;break}}this.charReceived=n},mo.prototype.end=function(e){var n="";if(e&&e.length&&(n=this.write(e)),this.charReceived){var o=this.charReceived,a=this.charBuffer,r=this.encoding;n+=a.slice(0,o).toString(r)}return n},Re.ReadableState=ac;var Be=function(e){return Xt(Ta)&&(Ta=""),e=e.toUpperCase(),Mo[e]||(new RegExp("\\b"+e+"\\b","i").test(Ta)?Mo[e]=function(){var n=f1.apply(null,arguments);console.error("%s %d: %s",e,0,n)}:Mo[e]=function(){}),Mo[e]}("stream");function ac(e,n){e=e||{},this.objectMode=!!e.objectMode,n instanceof Et&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||o===0?o:a,this.highWaterMark=~~this.highWaterMark,this.buffer=new gn,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new mo(e.encoding),this.encoding=e.encoding)}function Re(e){if(!(this instanceof Re))return new Re(e);this._readableState=new ac(e,this),this.readable=!0,e&&typeof e.read=="function"&&(this._read=e.read),we.call(this)}function xi(e,n,o,a,r){var i=function(c,d){var f=null;return Do(d)||typeof d=="string"||d==null||c.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f}(n,o);if(i)e.emit("error",i);else if(o===null)n.reading=!1,function(c,d){if(!d.ended){if(d.decoder){var f=d.decoder.end();f&&f.length&&(d.buffer.push(f),d.length+=d.objectMode?1:f.length)}d.ended=!0,la(c)}}(e,n);else if(n.objectMode||o&&o.length>0)if(n.ended&&!r){var l=new Error("stream.push() after EOF");e.emit("error",l)}else if(n.endEmitted&&r){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var s;!n.decoder||r||a||(o=n.decoder.write(o),s=!n.objectMode&&o.length===0),r||(n.reading=!1),s||(n.flowing&&n.length===0&&!n.sync?(e.emit("data",o),e.read(0)):(n.length+=n.objectMode?1:o.length,r?n.buffer.unshift(o):n.buffer.push(o),n.needReadable&&la(e))),function(c,d){d.readingMore||(d.readingMore=!0,Qe(y1,c,d))}(e,n)}else r||(n.reading=!1);return function(c){return!c.ended&&(c.needReadable||c.length<c.highWaterMark||c.length===0)}(n)}dt(Re,we),Re.prototype.push=function(e,n){var o=this._readableState;return o.objectMode||typeof e!="string"||(n=n||o.defaultEncoding)!==o.encoding&&(e=J.from(e,n),n=""),xi(this,o,e,n,!1)},Re.prototype.unshift=function(e){return xi(this,this._readableState,e,"",!0)},Re.prototype.isPaused=function(){return this._readableState.flowing===!1},Re.prototype.setEncoding=function(e){return this._readableState.decoder=new mo(e),this._readableState.encoding=e,this};var Di=8388608;function Ii(e,n){return e<=0||n.length===0&&n.ended?0:n.objectMode?1:e!=e?n.flowing&&n.length?n.buffer.head.data.length:n.length:(e>n.highWaterMark&&(n.highWaterMark=function(o){return o>=Di?o=Di:(o--,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o++),o}(e)),e<=n.length?e:n.ended?n.length:(n.needReadable=!0,0))}function la(e){var n=e._readableState;n.needReadable=!1,n.emittedReadable||(Be("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?Qe(Bi,e):Bi(e))}function Bi(e){Be("emit readable"),e.emit("readable"),Lr(e)}function y1(e,n){for(var o=n.length;!n.reading&&!n.flowing&&!n.ended&&n.length<n.highWaterMark&&(Be("maybeReadMore read 0"),e.read(0),o!==n.length);)o=n.length;n.readingMore=!1}function b1(e){Be("readable nexttick read 0"),e.read(0)}function w1(e,n){n.reading||(Be("resume read 0"),e.read(0)),n.resumeScheduled=!1,n.awaitDrain=0,e.emit("resume"),Lr(e),n.flowing&&!n.reading&&e.read(0)}function Lr(e){var n=e._readableState;for(Be("flow",n.flowing);n.flowing&&e.read()!==null;);}function Ni(e,n){return n.length===0?null:(n.objectMode?o=n.buffer.shift():!e||e>=n.length?(o=n.decoder?n.buffer.join(""):n.buffer.length===1?n.buffer.head.data:n.buffer.concat(n.length),n.buffer.clear()):o=function(a,r,i){var l;return a<r.head.data.length?(l=r.head.data.slice(0,a),r.head.data=r.head.data.slice(a)):l=a===r.head.data.length?r.shift():i?function(u,s){var c=s.head,d=1,f=c.data;for(u-=f.length;c=c.next;){var m=c.data,h=u>m.length?m.length:u;if(h===m.length?f+=m:f+=m.slice(0,u),(u-=h)===0){h===m.length?(++d,c.next?s.head=c.next:s.head=s.tail=null):(s.head=c,c.data=m.slice(h));break}++d}return s.length-=d,f}(a,r):function(u,s){var c=J.allocUnsafe(u),d=s.head,f=1;for(d.data.copy(c),u-=d.data.length;d=d.next;){var m=d.data,h=u>m.length?m.length:u;if(m.copy(c,c.length-u,0,h),(u-=h)===0){h===m.length?(++f,d.next?s.head=d.next:s.head=s.tail=null):(s.head=d,d.data=m.slice(h));break}++f}return s.length-=f,c}(a,r),l}(e,n.buffer,n.decoder),o);var o}function qa(e){var n=e._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,Qe(k1,n,e))}function k1(e,n){e.endEmitted||e.length!==0||(e.endEmitted=!0,n.readable=!1,n.emit("end"))}function $i(e,n){for(var o=0,a=e.length;o<a;o++)if(e[o]===n)return o;return-1}function C1(){}function E1(e,n,o){this.chunk=e,this.encoding=n,this.callback=o,this.next=null}function fr(e,n){Object.defineProperty(this,"buffer",{get:tc(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,n instanceof Et&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||o===0?o:a,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=e.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){(function(l,u){var s=l._writableState,c=s.sync,d=s.writecb;if(function(m){m.writing=!1,m.writecb=null,m.length-=m.writelen,m.writelen=0}(s),u)(function(m,h,_,g,p){--h.pendingcb,_?Qe(p,g):p(g),m._writableState.errorEmitted=!0,m.emit("error",g)})(l,s,c,u,d);else{var f=ic(s);f||s.corked||s.bufferProcessing||!s.bufferedRequest||rc(l,s),c?Qe(Vi,l,s,f,d):Vi(l,s,f,d)}})(n,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new sc(this)}function nt(e){if(!(this instanceof nt||this instanceof Et))return new nt(e);this._writableState=new fr(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev)),we.call(this)}function mr(e,n,o,a,r,i,l){n.writelen=a,n.writecb=l,n.writing=!0,n.sync=!0,o?e._writev(r,n.onwrite):e._write(r,i,n.onwrite),n.sync=!1}function Vi(e,n,o,a){o||function(r,i){i.length===0&&i.needDrain&&(i.needDrain=!1,r.emit("drain"))}(e,n),n.pendingcb--,a(),lc(e,n)}function rc(e,n){n.bufferProcessing=!0;var o=n.bufferedRequest;if(e._writev&&o&&o.next){var a=n.bufferedRequestCount,r=new Array(a),i=n.corkedRequestsFree;i.entry=o;for(var l=0;o;)r[l]=o,o=o.next,l+=1;mr(e,n,!0,n.length,r,"",i.finish),n.pendingcb++,n.lastBufferedRequest=null,i.next?(n.corkedRequestsFree=i.next,i.next=null):n.corkedRequestsFree=new sc(n)}else{for(;o;){var u=o.chunk,s=o.encoding,c=o.callback;if(mr(e,n,!1,n.objectMode?1:u.length,u,s,c),o=o.next,n.writing)break}o===null&&(n.lastBufferedRequest=null)}n.bufferedRequestCount=0,n.bufferedRequest=o,n.bufferProcessing=!1}function ic(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Ti(e,n){n.prefinished||(n.prefinished=!0,e.emit("prefinish"))}function lc(e,n){var o=ic(n);return o&&(n.pendingcb===0?(Ti(e,n),n.finished=!0,e.emit("finish")):Ti(e,n)),o}function sc(e){var n=this;this.next=null,this.entry=null,this.finish=function(o){var a=n.entry;for(n.entry=null;a;){var r=a.callback;e.pendingcb--,r(o),a=a.next}e.corkedRequestsFree?e.corkedRequestsFree.next=n:e.corkedRequestsFree=n}}Re.prototype.read=function(e){Be("read",e),e=parseInt(e,10);var n=this._readableState,o=e;if(e!==0&&(n.emittedReadable=!1),e===0&&n.needReadable&&(n.length>=n.highWaterMark||n.ended))return Be("read: emitReadable",n.length,n.ended),n.length===0&&n.ended?qa(this):la(this),null;if((e=Ii(e,n))===0&&n.ended)return n.length===0&&qa(this),null;var a,r=n.needReadable;return Be("need readable",r),(n.length===0||n.length-e<n.highWaterMark)&&Be("length less than watermark",r=!0),n.ended||n.reading?Be("reading or ended",r=!1):r&&(Be("do read"),n.reading=!0,n.sync=!0,n.length===0&&(n.needReadable=!0),this._read(n.highWaterMark),n.sync=!1,n.reading||(e=Ii(o,n))),(a=e>0?Ni(e,n):null)===null?(n.needReadable=!0,e=0):n.length-=e,n.length===0&&(n.ended||(n.needReadable=!0),o!==e&&n.ended&&qa(this)),a!==null&&this.emit("data",a),a},Re.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Re.prototype.pipe=function(e,n){var o=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,Be("pipe count=%d opts=%j",a.pipesCount,n);var r=!n||n.end!==!1?l:c;function i(p){Be("onunpipe"),p===o&&c()}function l(){Be("onend"),e.end()}a.endEmitted?Qe(r):o.once("end",r),e.on("unpipe",i);var u=function(p){return function(){var v=p._readableState;Be("pipeOnDrain",v.awaitDrain),v.awaitDrain&&v.awaitDrain--,v.awaitDrain===0&&p.listeners("data").length&&(v.flowing=!0,Lr(p))}}(o);e.on("drain",u);var s=!1;function c(){Be("cleanup"),e.removeListener("close",h),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",m),e.removeListener("unpipe",i),o.removeListener("end",l),o.removeListener("end",c),o.removeListener("data",f),s=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||u()}var d=!1;function f(p){Be("ondata"),d=!1,e.write(p)!==!1||d||((a.pipesCount===1&&a.pipes===e||a.pipesCount>1&&$i(a.pipes,e)!==-1)&&!s&&(Be("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,d=!0),o.pause())}function m(p){var v;Be("onerror",p),g(),e.removeListener("error",m),v="error",e.listeners(v).length===0&&e.emit("error",p)}function h(){e.removeListener("finish",_),g()}function _(){Be("onfinish"),e.removeListener("close",h),g()}function g(){Be("unpipe"),o.unpipe(e)}return o.on("data",f),function(p,v,w){if(typeof p.prependListener=="function")return p.prependListener(v,w);p._events&&p._events[v]?Array.isArray(p._events[v])?p._events[v].unshift(w):p._events[v]=[w,p._events[v]]:p.on(v,w)}(e,"error",m),e.once("close",h),e.once("finish",_),e.emit("pipe",o),a.flowing||(Be("pipe resume"),o.resume()),e},Re.prototype.unpipe=function(e){var n=this._readableState;if(n.pipesCount===0)return this;if(n.pipesCount===1)return e&&e!==n.pipes?this:(e||(e=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var o=n.pipes,a=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var r=0;r<a;r++)o[r].emit("unpipe",this);return this}var i=$i(n.pipes,e);return i===-1?this:(n.pipes.splice(i,1),n.pipesCount-=1,n.pipesCount===1&&(n.pipes=n.pipes[0]),e.emit("unpipe",this),this)},Re.prototype.on=function(e,n){var o=we.prototype.on.call(this,e,n);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var a=this._readableState;a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.emittedReadable=!1,a.reading?a.length&&la(this):Qe(b1,this))}return o},Re.prototype.addListener=Re.prototype.on,Re.prototype.resume=function(){var e=this._readableState;return e.flowing||(Be("resume"),e.flowing=!0,function(n,o){o.resumeScheduled||(o.resumeScheduled=!0,Qe(w1,n,o))}(this,e)),this},Re.prototype.pause=function(){return Be("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Be("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Re.prototype.wrap=function(e){var n=this._readableState,o=!1,a=this;for(var r in e.on("end",function(){if(Be("wrapped end"),n.decoder&&!n.ended){var i=n.decoder.end();i&&i.length&&a.push(i)}a.push(null)}),e.on("data",function(i){Be("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&i==null||(n.objectMode||i&&i.length)&&(a.push(i)||(o=!0,e.pause()))}),e)this[r]===void 0&&typeof e[r]=="function"&&(this[r]=function(i){return function(){return e[i].apply(e,arguments)}}(r));return function(i,l){for(var u=0,s=i.length;u<s;u++)l(i[u],u)}(["error","close","destroy","pause","resume"],function(i){e.on(i,a.emit.bind(a,i))}),a._read=function(i){Be("wrapped _read",i),o&&(o=!1,e.resume())},a},Re._fromList=Ni,nt.WritableState=fr,dt(nt,we),fr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,n=[];e;)n.push(e),e=e.next;return n},nt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},nt.prototype.write=function(e,n,o){var a=this._writableState,r=!1;return typeof n=="function"&&(o=n,n=null),J.isBuffer(e)?n="buffer":n||(n=a.defaultEncoding),typeof o!="function"&&(o=C1),a.ended?function(i,l){var u=new Error("write after end");i.emit("error",u),Qe(l,u)}(this,o):function(i,l,u,s){var c=!0,d=!1;return u===null?d=new TypeError("May not write null values to stream"):J.isBuffer(u)||typeof u=="string"||u===void 0||l.objectMode||(d=new TypeError("Invalid non-string/buffer chunk")),d&&(i.emit("error",d),Qe(s,d),c=!1),c}(this,a,e,o)&&(a.pendingcb++,r=function(i,l,u,s,c){u=function(h,_,g){return h.objectMode||h.decodeStrings===!1||typeof _!="string"||(_=J.from(_,g)),_}(l,u,s),J.isBuffer(u)&&(s="buffer");var d=l.objectMode?1:u.length;l.length+=d;var f=l.length<l.highWaterMark;if(f||(l.needDrain=!0),l.writing||l.corked){var m=l.lastBufferedRequest;l.lastBufferedRequest=new E1(u,s,c),m?m.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else mr(i,l,!1,d,u,s,c);return f}(this,a,e,n,o)),r},nt.prototype.cork=function(){this._writableState.corked++},nt.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||rc(this,e))},nt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},nt.prototype._write=function(e,n,o){o(new Error("not implemented"))},nt.prototype._writev=null,nt.prototype.end=function(e,n,o){var a=this._writableState;typeof e=="function"?(o=e,e=null,n=null):typeof n=="function"&&(o=n,n=null),e!=null&&this.write(e,n),a.corked&&(a.corked=1,this.uncork()),a.ending||a.finished||function(r,i,l){i.ending=!0,lc(r,i),l&&(i.finished?Qe(l):r.once("finish",l)),i.ended=!0,r.writable=!1}(this,a,o)},dt(Et,Re);for(var Ri=Object.keys(nt.prototype),za=0;za<Ri.length;za++){var Pa=Ri[za];Et.prototype[Pa]||(Et.prototype[Pa]=nt.prototype[Pa])}function Et(e){if(!(this instanceof Et))return new Et(e);Re.call(this,e),nt.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",S1)}function S1(){this.allowHalfOpen||this._writableState.ended||Qe(x1,this)}function x1(e){e.end()}function D1(e){this.afterTransform=function(n,o){return function(a,r,i){var l=a._transformState;l.transforming=!1;var u=l.writecb;if(!u)return a.emit("error",new Error("no writecb in Transform class"));l.writechunk=null,l.writecb=null,i!=null&&a.push(i),u(r);var s=a._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&a._read(s.highWaterMark)}(e,n,o)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function wt(e){if(!(this instanceof wt))return new wt(e);Et.call(this,e),this._transformState=new D1(this);var n=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(o){Ai(n,o)}):Ai(n)})}function Ai(e,n){if(n)return e.emit("error",n);var o=e._writableState,a=e._transformState;if(o.length)throw new Error("Calling transform done when ws.length != 0");if(a.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function ho(e){if(!(this instanceof ho))return new ho(e);wt.call(this,e)}function Ot(){we.call(this)}dt(wt,Et),wt.prototype.push=function(e,n){return this._transformState.needTransform=!1,Et.prototype.push.call(this,e,n)},wt.prototype._transform=function(e,n,o){throw new Error("Not implemented")},wt.prototype._write=function(e,n,o){var a=this._transformState;if(a.writecb=o,a.writechunk=e,a.writeencoding=n,!a.transforming){var r=this._readableState;(a.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},wt.prototype._read=function(e){var n=this._transformState;n.writechunk!==null&&n.writecb&&!n.transforming?(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform)):n.needTransform=!0},dt(ho,wt),ho.prototype._transform=function(e,n,o){o(null,e)},dt(Ot,we),Ot.Readable=Re,Ot.Writable=nt,Ot.Duplex=Et,Ot.Transform=wt,Ot.PassThrough=ho,Ot.Stream=Ot,Ot.prototype.pipe=function(e,n){var o=this;function a(d){e.writable&&e.write(d)===!1&&o.pause&&o.pause()}function r(){o.readable&&o.resume&&o.resume()}o.on("data",a),e.on("drain",r),e._isStdio||n&&n.end===!1||(o.on("end",l),o.on("close",u));var i=!1;function l(){i||(i=!0,e.end())}function u(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function s(d){if(c(),we.listenerCount(this,"error")===0)throw d}function c(){o.removeListener("data",a),e.removeListener("drain",r),o.removeListener("end",l),o.removeListener("close",u),o.removeListener("error",s),e.removeListener("error",s),o.removeListener("end",c),o.removeListener("close",c),e.removeListener("close",c)}return o.on("error",s),e.on("error",s),o.on("end",c),o.on("close",c),e.on("close",c),e.emit("pipe",o),e};var cc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function I1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function jt(e,n,o,a,r){if(n.subarray&&e.subarray)e.set(n.subarray(o,o+a),r);else for(var i=0;i<a;i++)e[r+i]=n[o+i]}var sa=Uint8Array,Ct=Uint16Array,ca=Int32Array,B1=4,Li=0,Mi=1,N1=2;function ao(e){for(var n=e.length;--n>=0;)e[n]=0}var $1=0,uc=1,V1=2,Mr=29,No=256,bo=No+1+Mr,Zn=30,Or=19,Oi=2*bo+1,wn=15,Fa=16,T1=7,qr=256,dc=16,fc=17,mc=18,hr=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Jo=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],R1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],qi=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Pt=new Array(2*(bo+2));ao(Pt);var po=new Array(2*Zn);ao(po);var wo=new Array(512);ao(wo);var ko=new Array(256);ao(ko);var zr=new Array(Mr);ao(zr);var zi,Pi,Fi,ua=new Array(Zn);function ja(e,n,o,a,r){this.static_tree=e,this.extra_bits=n,this.extra_base=o,this.elems=a,this.max_length=r,this.has_stree=e&&e.length}function Ua(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}function hc(e){return e<256?wo[e]:wo[256+(e>>>7)]}function Co(e,n){e.pending_buf[e.pending++]=255&n,e.pending_buf[e.pending++]=n>>>8&255}function ft(e,n,o){e.bi_valid>Fa-o?(e.bi_buf|=n<<e.bi_valid&65535,Co(e,e.bi_buf),e.bi_buf=n>>Fa-e.bi_valid,e.bi_valid+=o-Fa):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=o)}function At(e,n,o){ft(e,o[2*n],o[2*n+1])}function pc(e,n){var o=0;do o|=1&e,e>>>=1,o<<=1;while(--n>0);return o>>>1}function _c(e,n,o){var a,r,i=new Array(wn+1),l=0;for(a=1;a<=wn;a++)i[a]=l=l+o[a-1]<<1;for(r=0;r<=n;r++){var u=e[2*r+1];u!==0&&(e[2*r]=pc(i[u]++,u))}}function gc(e){var n;for(n=0;n<bo;n++)e.dyn_ltree[2*n]=0;for(n=0;n<Zn;n++)e.dyn_dtree[2*n]=0;for(n=0;n<Or;n++)e.bl_tree[2*n]=0;e.dyn_ltree[2*qr]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function vc(e){e.bi_valid>8?Co(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ji(e,n,o,a){var r=2*n,i=2*o;return e[r]<e[i]||e[r]===e[i]&&a[n]<=a[o]}function Ha(e,n,o){for(var a=e.heap[o],r=o<<1;r<=e.heap_len&&(r<e.heap_len&&ji(n,e.heap[r+1],e.heap[r],e.depth)&&r++,!ji(n,a,e.heap[r],e.depth));)e.heap[o]=e.heap[r],o=r,r<<=1;e.heap[o]=a}function Ui(e,n,o){var a,r,i,l,u=0;if(e.last_lit!==0)do a=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],r=e.pending_buf[e.l_buf+u],u++,a===0?At(e,r,n):(At(e,(i=ko[r])+No+1,n),(l=hr[i])!==0&&ft(e,r-=zr[i],l),At(e,i=hc(--a),o),(l=Jo[i])!==0&&ft(e,a-=ua[i],l));while(u<e.last_lit);At(e,qr,n)}function Wa(e,n){var o,a,r,i=n.dyn_tree,l=n.stat_desc.static_tree,u=n.stat_desc.has_stree,s=n.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=Oi,o=0;o<s;o++)i[2*o]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):i[2*o+1]=0;for(;e.heap_len<2;)i[2*(r=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[r]=0,e.opt_len--,u&&(e.static_len-=l[2*r+1]);for(n.max_code=c,o=e.heap_len>>1;o>=1;o--)Ha(e,i,o);r=s;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ha(e,i,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,i[2*r]=i[2*o]+i[2*a],e.depth[r]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,i[2*o+1]=i[2*a+1]=r,e.heap[1]=r++,Ha(e,i,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(d,f){var m,h,_,g,p,v,w=f.dyn_tree,b=f.max_code,C=f.stat_desc.static_tree,I=f.stat_desc.has_stree,E=f.stat_desc.extra_bits,k=f.stat_desc.extra_base,N=f.stat_desc.max_length,$=0;for(g=0;g<=wn;g++)d.bl_count[g]=0;for(w[2*d.heap[d.heap_max]+1]=0,m=d.heap_max+1;m<Oi;m++)(g=w[2*w[2*(h=d.heap[m])+1]+1]+1)>N&&(g=N,$++),w[2*h+1]=g,h>b||(d.bl_count[g]++,p=0,h>=k&&(p=E[h-k]),v=w[2*h],d.opt_len+=v*(g+p),I&&(d.static_len+=v*(C[2*h+1]+p)));if($!==0){do{for(g=N-1;d.bl_count[g]===0;)g--;d.bl_count[g]--,d.bl_count[g+1]+=2,d.bl_count[N]--,$-=2}while($>0);for(g=N;g!==0;g--)for(h=d.bl_count[g];h!==0;)(_=d.heap[--m])>b||(w[2*_+1]!==g&&(d.opt_len+=(g-w[2*_+1])*w[2*_],w[2*_+1]=g),h--)}}(e,n),_c(i,c,e.bl_count)}function Hi(e,n,o){var a,r,i=-1,l=n[1],u=0,s=7,c=4;for(l===0&&(s=138,c=3),n[2*(o+1)+1]=65535,a=0;a<=o;a++)r=l,l=n[2*(a+1)+1],++u<s&&r===l||(u<c?e.bl_tree[2*r]+=u:r!==0?(r!==i&&e.bl_tree[2*r]++,e.bl_tree[2*dc]++):u<=10?e.bl_tree[2*fc]++:e.bl_tree[2*mc]++,u=0,i=r,l===0?(s=138,c=3):r===l?(s=6,c=3):(s=7,c=4))}function Wi(e,n,o){var a,r,i=-1,l=n[1],u=0,s=7,c=4;for(l===0&&(s=138,c=3),a=0;a<=o;a++)if(r=l,l=n[2*(a+1)+1],!(++u<s&&r===l)){if(u<c)do At(e,r,e.bl_tree);while(--u!=0);else r!==0?(r!==i&&(At(e,r,e.bl_tree),u--),At(e,dc,e.bl_tree),ft(e,u-3,2)):u<=10?(At(e,fc,e.bl_tree),ft(e,u-3,3)):(At(e,mc,e.bl_tree),ft(e,u-11,7));u=0,i=r,l===0?(s=138,c=3):r===l?(s=6,c=3):(s=7,c=4)}}ao(ua);var Ki=!1;function A1(e){Ki||(function(){var n,o,a,r,i,l=new Array(wn+1);for(a=0,r=0;r<Mr-1;r++)for(zr[r]=a,n=0;n<1<<hr[r];n++)ko[a++]=r;for(ko[a-1]=r,i=0,r=0;r<16;r++)for(ua[r]=i,n=0;n<1<<Jo[r];n++)wo[i++]=r;for(i>>=7;r<Zn;r++)for(ua[r]=i<<7,n=0;n<1<<Jo[r]-7;n++)wo[256+i++]=r;for(o=0;o<=wn;o++)l[o]=0;for(n=0;n<=143;)Pt[2*n+1]=8,n++,l[8]++;for(;n<=255;)Pt[2*n+1]=9,n++,l[9]++;for(;n<=279;)Pt[2*n+1]=7,n++,l[7]++;for(;n<=287;)Pt[2*n+1]=8,n++,l[8]++;for(_c(Pt,bo+1,l),n=0;n<Zn;n++)po[2*n+1]=5,po[2*n]=pc(n,5);zi=new ja(Pt,hr,No+1,bo,wn),Pi=new ja(po,Jo,0,Zn,wn),Fi=new ja(new Array(0),R1,0,Or,T1)}(),Ki=!0),e.l_desc=new Ua(e.dyn_ltree,zi),e.d_desc=new Ua(e.dyn_dtree,Pi),e.bl_desc=new Ua(e.bl_tree,Fi),e.bi_buf=0,e.bi_valid=0,gc(e)}function yc(e,n,o,a){ft(e,($1<<1)+(a?1:0),3),function(r,i,l,u){vc(r),Co(r,l),Co(r,~l),jt(r.pending_buf,r.window,i,l,r.pending),r.pending+=l}(e,n,o)}function L1(e){ft(e,uc<<1,3),At(e,qr,Pt),function(n){n.bi_valid===16?(Co(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=255&n.bi_buf,n.bi_buf>>=8,n.bi_valid-=8)}(e)}function M1(e,n,o,a){var r,i,l=0;e.level>0?(e.strm.data_type===N1&&(e.strm.data_type=function(u){var s,c=4093624447;for(s=0;s<=31;s++,c>>>=1)if(1&c&&u.dyn_ltree[2*s]!==0)return Li;if(u.dyn_ltree[18]!==0||u.dyn_ltree[20]!==0||u.dyn_ltree[26]!==0)return Mi;for(s=32;s<No;s++)if(u.dyn_ltree[2*s]!==0)return Mi;return Li}(e)),Wa(e,e.l_desc),Wa(e,e.d_desc),l=function(u){var s;for(Hi(u,u.dyn_ltree,u.l_desc.max_code),Hi(u,u.dyn_dtree,u.d_desc.max_code),Wa(u,u.bl_desc),s=Or-1;s>=3&&u.bl_tree[2*qi[s]+1]===0;s--);return u.opt_len+=3*(s+1)+5+5+4,s}(e),r=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=r&&(r=i)):r=i=o+5,o+4<=r&&n!==-1?yc(e,n,o,a):e.strategy===B1||i===r?(ft(e,(uc<<1)+(a?1:0),3),Ui(e,Pt,po)):(ft(e,(V1<<1)+(a?1:0),3),function(u,s,c,d){var f;for(ft(u,s-257,5),ft(u,c-1,5),ft(u,d-4,4),f=0;f<d;f++)ft(u,u.bl_tree[2*qi[f]+1],3);Wi(u,u.dyn_ltree,s-1),Wi(u,u.dyn_dtree,c-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),Ui(e,e.dyn_ltree,e.dyn_dtree)),gc(e),a&&vc(e)}function ln(e,n,o){return e.pending_buf[e.d_buf+2*e.last_lit]=n>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&n,e.pending_buf[e.l_buf+e.last_lit]=255&o,e.last_lit++,n===0?e.dyn_ltree[2*o]++:(e.matches++,n--,e.dyn_ltree[2*(ko[o]+No+1)]++,e.dyn_dtree[2*hc(n)]++),e.last_lit===e.lit_bufsize-1}function pr(e,n,o,a){for(var r=65535&e|0,i=e>>>16&65535|0,l=0;o!==0;){o-=l=o>2e3?2e3:o;do i=i+(r=r+n[a++]|0)|0;while(--l);r%=65521,i%=65521}return r|i<<16|0}var O1=function(){for(var e,n=[],o=0;o<256;o++){e=o;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;n[o]=e}return n}();function We(e,n,o,a){var r=O1,i=a+o;e^=-1;for(var l=a;l<i;l++)e=e>>>8^r[255&(e^n[l])];return-1^e}var Hn,Tn=0,q1=1,z1=3,Yt=4,Zi=5,vn=0,Ji=1,Rn=-2,P1=-3,Ka=-5,F1=-1,j1=1,Oo=2,U1=3,H1=4,W1=2,Pr=8,K1=9,_r=286,Z1=30,J1=19,G1=2*_r+1,Q1=15,xe=3,en=258,Dt=en+xe+1,Y1=32,Fr=42,gr=69,Go=73,Qo=91,Yo=103,kn=113,fo=666,Ke=1,_o=2,Cn=3,Jn=4,X1=3;function tn(e,n){return e.msg=cc[n],n}function Gi(e){return(e<<1)-(e>4?9:0)}function yn(e){for(var n=e.length;--n>=0;)e[n]=0}function Qt(e){var n=e.state,o=n.pending;o>e.avail_out&&(o=e.avail_out),o!==0&&(jt(e.output,n.pending_buf,n.pending_out,o,e.next_out),e.next_out+=o,n.pending_out+=o,e.total_out+=o,e.avail_out-=o,n.pending-=o,n.pending===0&&(n.pending_out=0))}function Ye(e,n){M1(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,Qt(e.strm)}function Ee(e,n){e.pending_buf[e.pending++]=n}function so(e,n){e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=255&n}function bc(e,n){var o,a,r=e.max_chain_length,i=e.strstart,l=e.prev_length,u=e.nice_match,s=e.strstart>e.w_size-Dt?e.strstart-(e.w_size-Dt):0,c=e.window,d=e.w_mask,f=e.prev,m=e.strstart+en,h=c[i+l-1],_=c[i+l];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(c[(o=n)+l]===_&&c[o+l-1]===h&&c[o]===c[i]&&c[++o]===c[i+1]){i+=2,o++;do;while(c[++i]===c[++o]&&c[++i]===c[++o]&&c[++i]===c[++o]&&c[++i]===c[++o]&&c[++i]===c[++o]&&c[++i]===c[++o]&&c[++i]===c[++o]&&c[++i]===c[++o]&&i<m);if(a=en-(m-i),i=m-en,a>l){if(e.match_start=n,l=a,a>=u)break;h=c[i+l-1],_=c[i+l]}}while((n=f[n&d])>s&&--r!=0);return l<=e.lookahead?l:e.lookahead}function Eo(e){var n,o,a,r,i,l,u,s,c,d,f=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-Dt)){jt(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,n=o=e.hash_size;do a=e.head[--n],e.head[n]=a>=f?a-f:0;while(--o);n=o=f;do a=e.prev[--n],e.prev[n]=a>=f?a-f:0;while(--o);r+=f}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,s=e.strstart+e.lookahead,c=r,d=void 0,(d=l.avail_in)>c&&(d=c),o=d===0?0:(l.avail_in-=d,jt(u,l.input,l.next_in,d,s),l.state.wrap===1?l.adler=pr(l.adler,u,d,s):l.state.wrap===2&&(l.adler=We(l.adler,u,d,s)),l.next_in+=d,l.total_in+=d,d),e.lookahead+=o,e.lookahead+e.insert>=xe)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+xe-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<xe)););}while(e.lookahead<Dt&&e.strm.avail_in!==0)}function Za(e,n){for(var o,a;;){if(e.lookahead<Dt){if(Eo(e),e.lookahead<Dt&&n===Tn)return Ke;if(e.lookahead===0)break}if(o=0,e.lookahead>=xe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),o!==0&&e.strstart-o<=e.w_size-Dt&&(e.match_length=bc(e,o)),e.match_length>=xe)if(a=ln(e,e.strstart-e.match_start,e.match_length-xe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=xe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else a=ln(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(Ye(e,!1),e.strm.avail_out===0))return Ke}return e.insert=e.strstart<xe-1?e.strstart:xe-1,n===Yt?(Ye(e,!0),e.strm.avail_out===0?Cn:Jn):e.last_lit&&(Ye(e,!1),e.strm.avail_out===0)?Ke:_o}function jn(e,n){for(var o,a,r;;){if(e.lookahead<Dt){if(Eo(e),e.lookahead<Dt&&n===Tn)return Ke;if(e.lookahead===0)break}if(o=0,e.lookahead>=xe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=xe-1,o!==0&&e.prev_length<e.max_lazy_match&&e.strstart-o<=e.w_size-Dt&&(e.match_length=bc(e,o),e.match_length<=5&&(e.strategy===j1||e.match_length===xe&&e.strstart-e.match_start>4096)&&(e.match_length=xe-1)),e.prev_length>=xe&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-xe,a=ln(e,e.strstart-1-e.prev_match,e.prev_length-xe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=xe-1,e.strstart++,a&&(Ye(e,!1),e.strm.avail_out===0))return Ke}else if(e.match_available){if((a=ln(e,0,e.window[e.strstart-1]))&&Ye(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ke}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=ln(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<xe-1?e.strstart:xe-1,n===Yt?(Ye(e,!0),e.strm.avail_out===0?Cn:Jn):e.last_lit&&(Ye(e,!1),e.strm.avail_out===0)?Ke:_o}function Bt(e,n,o,a,r){this.good_length=e,this.max_lazy=n,this.nice_length=o,this.max_chain=a,this.func=r}function ev(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ct(2*G1),this.dyn_dtree=new Ct(2*(2*Z1+1)),this.bl_tree=new Ct(2*(2*J1+1)),yn(this.dyn_ltree),yn(this.dyn_dtree),yn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ct(Q1+1),this.heap=new Ct(2*_r+1),yn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ct(2*_r+1),yn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Qi(e){var n,o=function(a){var r;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=W1,(r=a.state).pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Fr:kn,a.adler=r.wrap===2?0:1,r.last_flush=Tn,A1(r),vn):tn(a,Rn)}(e);return o===vn&&((n=e.state).window_size=2*n.w_size,yn(n.head),n.max_lazy_match=Hn[n.level].max_lazy,n.good_match=Hn[n.level].good_length,n.nice_match=Hn[n.level].nice_length,n.max_chain_length=Hn[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=xe-1,n.match_available=0,n.ins_h=0),o}function tv(e,n){var o,a,r,i;if(!e||!e.state||n>Zi||n<0)return e?tn(e,Rn):Rn;if(a=e.state,!e.output||!e.input&&e.avail_in!==0||a.status===fo&&n!==Yt)return tn(e,e.avail_out===0?Ka:Rn);if(a.strm=e,o=a.last_flush,a.last_flush=n,a.status===Fr)if(a.wrap===2)e.adler=0,Ee(a,31),Ee(a,139),Ee(a,8),a.gzhead?(Ee(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),Ee(a,255&a.gzhead.time),Ee(a,a.gzhead.time>>8&255),Ee(a,a.gzhead.time>>16&255),Ee(a,a.gzhead.time>>24&255),Ee(a,a.level===9?2:a.strategy>=Oo||a.level<2?4:0),Ee(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(Ee(a,255&a.gzhead.extra.length),Ee(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=We(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=gr):(Ee(a,0),Ee(a,0),Ee(a,0),Ee(a,0),Ee(a,0),Ee(a,a.level===9?2:a.strategy>=Oo||a.level<2?4:0),Ee(a,X1),a.status=kn);else{var l=Pr+(a.w_bits-8<<4)<<8;l|=(a.strategy>=Oo||a.level<2?0:a.level<6?1:a.level===6?2:3)<<6,a.strstart!==0&&(l|=Y1),l+=31-l%31,a.status=kn,so(a,l),a.strstart!==0&&(so(a,e.adler>>>16),so(a,65535&e.adler)),e.adler=1}if(a.status===gr)if(a.gzhead.extra){for(r=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>r&&(e.adler=We(e.adler,a.pending_buf,a.pending-r,r)),Qt(e),r=a.pending,a.pending!==a.pending_buf_size));)Ee(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>r&&(e.adler=We(e.adler,a.pending_buf,a.pending-r,r)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=Go)}else a.status=Go;if(a.status===Go)if(a.gzhead.name){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(e.adler=We(e.adler,a.pending_buf,a.pending-r,r)),Qt(e),r=a.pending,a.pending===a.pending_buf_size)){i=1;break}i=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,Ee(a,i)}while(i!==0);a.gzhead.hcrc&&a.pending>r&&(e.adler=We(e.adler,a.pending_buf,a.pending-r,r)),i===0&&(a.gzindex=0,a.status=Qo)}else a.status=Qo;if(a.status===Qo)if(a.gzhead.comment){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(e.adler=We(e.adler,a.pending_buf,a.pending-r,r)),Qt(e),r=a.pending,a.pending===a.pending_buf_size)){i=1;break}i=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,Ee(a,i)}while(i!==0);a.gzhead.hcrc&&a.pending>r&&(e.adler=We(e.adler,a.pending_buf,a.pending-r,r)),i===0&&(a.status=Yo)}else a.status=Yo;if(a.status===Yo&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Qt(e),a.pending+2<=a.pending_buf_size&&(Ee(a,255&e.adler),Ee(a,e.adler>>8&255),e.adler=0,a.status=kn)):a.status=kn),a.pending!==0){if(Qt(e),e.avail_out===0)return a.last_flush=-1,vn}else if(e.avail_in===0&&Gi(n)<=Gi(o)&&n!==Yt)return tn(e,Ka);if(a.status===fo&&e.avail_in!==0)return tn(e,Ka);if(e.avail_in!==0||a.lookahead!==0||n!==Tn&&a.status!==fo){var u=a.strategy===Oo?function(s,c){for(var d;;){if(s.lookahead===0&&(Eo(s),s.lookahead===0)){if(c===Tn)return Ke;break}if(s.match_length=0,d=ln(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++,d&&(Ye(s,!1),s.strm.avail_out===0))return Ke}return s.insert=0,c===Yt?(Ye(s,!0),s.strm.avail_out===0?Cn:Jn):s.last_lit&&(Ye(s,!1),s.strm.avail_out===0)?Ke:_o}(a,n):a.strategy===U1?function(s,c){for(var d,f,m,h,_=s.window;;){if(s.lookahead<=en){if(Eo(s),s.lookahead<=en&&c===Tn)return Ke;if(s.lookahead===0)break}if(s.match_length=0,s.lookahead>=xe&&s.strstart>0&&(f=_[m=s.strstart-1])===_[++m]&&f===_[++m]&&f===_[++m]){h=s.strstart+en;do;while(f===_[++m]&&f===_[++m]&&f===_[++m]&&f===_[++m]&&f===_[++m]&&f===_[++m]&&f===_[++m]&&f===_[++m]&&m<h);s.match_length=en-(h-m),s.match_length>s.lookahead&&(s.match_length=s.lookahead)}if(s.match_length>=xe?(d=ln(s,1,s.match_length-xe),s.lookahead-=s.match_length,s.strstart+=s.match_length,s.match_length=0):(d=ln(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++),d&&(Ye(s,!1),s.strm.avail_out===0))return Ke}return s.insert=0,c===Yt?(Ye(s,!0),s.strm.avail_out===0?Cn:Jn):s.last_lit&&(Ye(s,!1),s.strm.avail_out===0)?Ke:_o}(a,n):Hn[a.level].func(a,n);if(u!==Cn&&u!==Jn||(a.status=fo),u===Ke||u===Cn)return e.avail_out===0&&(a.last_flush=-1),vn;if(u===_o&&(n===q1?L1(a):n!==Zi&&(yc(a,0,0,!1),n===z1&&(yn(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),Qt(e),e.avail_out===0))return a.last_flush=-1,vn}return n!==Yt?vn:a.wrap<=0?Ji:(a.wrap===2?(Ee(a,255&e.adler),Ee(a,e.adler>>8&255),Ee(a,e.adler>>16&255),Ee(a,e.adler>>24&255),Ee(a,255&e.total_in),Ee(a,e.total_in>>8&255),Ee(a,e.total_in>>16&255),Ee(a,e.total_in>>24&255)):(so(a,e.adler>>>16),so(a,65535&e.adler)),Qt(e),a.wrap>0&&(a.wrap=-a.wrap),a.pending!==0?vn:Ji)}Hn=[new Bt(0,0,0,0,function(e,n){var o=65535;for(o>e.pending_buf_size-5&&(o=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Eo(e),e.lookahead===0&&n===Tn)return Ke;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var a=e.block_start+o;if((e.strstart===0||e.strstart>=a)&&(e.lookahead=e.strstart-a,e.strstart=a,Ye(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Dt&&(Ye(e,!1),e.strm.avail_out===0))return Ke}return e.insert=0,n===Yt?(Ye(e,!0),e.strm.avail_out===0?Cn:Jn):(e.strstart>e.block_start&&(Ye(e,!1),e.strm.avail_out),Ke)}),new Bt(4,4,8,4,Za),new Bt(4,5,16,8,Za),new Bt(4,6,32,32,Za),new Bt(4,4,16,16,jn),new Bt(8,16,32,32,jn),new Bt(8,16,128,128,jn),new Bt(8,32,128,256,jn),new Bt(32,128,258,1024,jn),new Bt(32,258,258,4096,jn)];var qo=30,nv=12;function ov(e,n){var o,a,r,i,l,u,s,c,d,f,m,h,_,g,p,v,w,b,C,I,E,k,N,$,S;o=e.state,a=e.next_in,$=e.input,r=a+(e.avail_in-5),i=e.next_out,S=e.output,l=i-(n-e.avail_out),u=i+(e.avail_out-257),s=o.dmax,c=o.wsize,d=o.whave,f=o.wnext,m=o.window,h=o.hold,_=o.bits,g=o.lencode,p=o.distcode,v=(1<<o.lenbits)-1,w=(1<<o.distbits)-1;e:do{_<15&&(h+=$[a++]<<_,_+=8,h+=$[a++]<<_,_+=8),b=g[h&v];t:for(;;){if(h>>>=C=b>>>24,_-=C,(C=b>>>16&255)===0)S[i++]=65535&b;else{if(!(16&C)){if(!(64&C)){b=g[(65535&b)+(h&(1<<C)-1)];continue t}if(32&C){o.mode=nv;break e}e.msg="invalid literal/length code",o.mode=qo;break e}I=65535&b,(C&=15)&&(_<C&&(h+=$[a++]<<_,_+=8),I+=h&(1<<C)-1,h>>>=C,_-=C),_<15&&(h+=$[a++]<<_,_+=8,h+=$[a++]<<_,_+=8),b=p[h&w];n:for(;;){if(h>>>=C=b>>>24,_-=C,!(16&(C=b>>>16&255))){if(!(64&C)){b=p[(65535&b)+(h&(1<<C)-1)];continue n}e.msg="invalid distance code",o.mode=qo;break e}if(E=65535&b,_<(C&=15)&&(h+=$[a++]<<_,(_+=8)<C&&(h+=$[a++]<<_,_+=8)),(E+=h&(1<<C)-1)>s){e.msg="invalid distance too far back",o.mode=qo;break e}if(h>>>=C,_-=C,E>(C=i-l)){if((C=E-C)>d&&o.sane){e.msg="invalid distance too far back",o.mode=qo;break e}if(k=0,N=m,f===0){if(k+=c-C,C<I){I-=C;do S[i++]=m[k++];while(--C);k=i-E,N=S}}else if(f<C){if(k+=c+f-C,(C-=f)<I){I-=C;do S[i++]=m[k++];while(--C);if(k=0,f<I){I-=C=f;do S[i++]=m[k++];while(--C);k=i-E,N=S}}}else if(k+=f-C,C<I){I-=C;do S[i++]=m[k++];while(--C);k=i-E,N=S}for(;I>2;)S[i++]=N[k++],S[i++]=N[k++],S[i++]=N[k++],I-=3;I&&(S[i++]=N[k++],I>1&&(S[i++]=N[k++]))}else{k=i-E;do S[i++]=S[k++],S[i++]=S[k++],S[i++]=S[k++],I-=3;while(I>2);I&&(S[i++]=S[k++],I>1&&(S[i++]=S[k++]))}break}}break}}while(a<r&&i<u);a-=I=_>>3,h&=(1<<(_-=I<<3))-1,e.next_in=a,e.next_out=i,e.avail_in=a<r?r-a+5:5-(a-r),e.avail_out=i<u?u-i+257:257-(i-u),o.hold=h,o.bits=_}var Un=15,Yi=852,Xi=592,el=0,Ja=1,tl=2,av=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],rv=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],iv=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],lv=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function go(e,n,o,a,r,i,l,u){var s,c,d,f,m,h,_,g,p,v=u.bits,w=0,b=0,C=0,I=0,E=0,k=0,N=0,$=0,S=0,x=0,D=null,B=0,V=new Ct(Un+1),L=new Ct(Un+1),U=null,M=0;for(w=0;w<=Un;w++)V[w]=0;for(b=0;b<a;b++)V[n[o+b]]++;for(E=v,I=Un;I>=1&&V[I]===0;I--);if(E>I&&(E=I),I===0)return r[i++]=20971520,r[i++]=20971520,u.bits=1,0;for(C=1;C<I&&V[C]===0;C++);for(E<C&&(E=C),$=1,w=1;w<=Un;w++)if($<<=1,($-=V[w])<0)return-1;if($>0&&(e===el||I!==1))return-1;for(L[1]=0,w=1;w<Un;w++)L[w+1]=L[w]+V[w];for(b=0;b<a;b++)n[o+b]!==0&&(l[L[n[o+b]]++]=b);if(e===el?(D=U=l,h=19):e===Ja?(D=av,B-=257,U=rv,M-=257,h=256):(D=iv,U=lv,h=-1),x=0,b=0,w=C,m=i,k=E,N=0,d=-1,f=(S=1<<E)-1,e===Ja&&S>Yi||e===tl&&S>Xi)return 1;for(;;){_=w-N,l[b]<h?(g=0,p=l[b]):l[b]>h?(g=U[M+l[b]],p=D[B+l[b]]):(g=96,p=0),s=1<<w-N,C=c=1<<k;do r[m+(x>>N)+(c-=s)]=_<<24|g<<16|p|0;while(c!==0);for(s=1<<w-1;x&s;)s>>=1;if(s!==0?(x&=s-1,x+=s):x=0,b++,--V[w]==0){if(w===I)break;w=n[o+l[b]]}if(w>E&&(x&f)!==d){for(N===0&&(N=E),m+=C,$=1<<(k=w-N);k+N<I&&!(($-=V[k+N])<=0);)k++,$<<=1;if(S+=1<<k,e===Ja&&S>Yi||e===tl&&S>Xi)return 1;r[d=x&f]=E<<24|k<<16|m-i|0}}return x!==0&&(r[m+x]=w-N<<24|64<<16|0),u.bits=E,0}var sv=0,wc=1,kc=2,nl=4,cv=5,zo=6,da=0,uv=1,dv=2,sn=-2,fv=-3,mv=-4,hv=-5,ol=8,Cc=1,al=2,rl=3,il=4,ll=5,sl=6,cl=7,ul=8,dl=9,fl=10,ml=11,qt=12,Ga=13,hl=14,Qa=15,pl=16,_l=17,gl=18,vl=19,Po=20,Fo=21,yl=22,bl=23,wl=24,kl=25,Cl=26,Ya=27,El=28,Sl=29,Ne=30,pv=31,_v=32,gv=852,vv=592;function xl(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function yv(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ct(320),this.work=new Ct(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ec(e){var n;return e&&e.state?((n=e.state).wsize=0,n.whave=0,n.wnext=0,function(o){var a;return o&&o.state?(a=o.state,o.total_in=o.total_out=a.total=0,o.msg="",a.wrap&&(o.adler=1&a.wrap),a.mode=Cc,a.last=0,a.havedict=0,a.dmax=32768,a.head=null,a.hold=0,a.bits=0,a.lencode=a.lendyn=new ca(gv),a.distcode=a.distdyn=new ca(vv),a.sane=1,a.back=-1,da):sn}(e)):sn}function bv(e,n){var o,a;return e?(a=new yv,e.state=a,a.window=null,(o=function(r,i){var l,u;return r&&r.state?(u=r.state,i<0?(l=0,i=-i):(l=1+(i>>4),i<48&&(i&=15)),i&&(i<8||i>15)?sn:(u.window!==null&&u.wbits!==i&&(u.window=null),u.wrap=l,u.wbits=i,Ec(r))):sn}(e,n))!==da&&(e.state=null),o):sn}var Xa,er,Dl=!0;function wv(e){if(Dl){var n;for(Xa=new ca(512),er=new ca(32),n=0;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(go(wc,e.lens,0,288,Xa,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;go(kc,e.lens,0,32,er,0,e.work,{bits:5}),Dl=!1}e.lencode=Xa,e.lenbits=9,e.distcode=er,e.distbits=5}function kv(e,n){var o,a,r,i,l,u,s,c,d,f,m,h,_,g,p,v,w,b,C,I,E,k,N,$,S=0,x=new sa(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return sn;(o=e.state).mode===qt&&(o.mode=Ga),l=e.next_out,r=e.output,s=e.avail_out,i=e.next_in,a=e.input,u=e.avail_in,c=o.hold,d=o.bits,f=u,m=s,k=da;e:for(;;)switch(o.mode){case Cc:if(o.wrap===0){o.mode=Ga;break}for(;d<16;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(2&o.wrap&&c===35615){o.check=0,x[0]=255&c,x[1]=c>>>8&255,o.check=We(o.check,x,2,0),c=0,d=0,o.mode=al;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",o.mode=Ne;break}if((15&c)!==ol){e.msg="unknown compression method",o.mode=Ne;break}if(d-=4,E=8+(15&(c>>>=4)),o.wbits===0)o.wbits=E;else if(E>o.wbits){e.msg="invalid window size",o.mode=Ne;break}o.dmax=1<<E,e.adler=o.check=1,o.mode=512&c?fl:qt,c=0,d=0;break;case al:for(;d<16;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(o.flags=c,(255&o.flags)!==ol){e.msg="unknown compression method",o.mode=Ne;break}if(57344&o.flags){e.msg="unknown header flags set",o.mode=Ne;break}o.head&&(o.head.text=c>>8&1),512&o.flags&&(x[0]=255&c,x[1]=c>>>8&255,o.check=We(o.check,x,2,0)),c=0,d=0,o.mode=rl;case rl:for(;d<32;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}o.head&&(o.head.time=c),512&o.flags&&(x[0]=255&c,x[1]=c>>>8&255,x[2]=c>>>16&255,x[3]=c>>>24&255,o.check=We(o.check,x,4,0)),c=0,d=0,o.mode=il;case il:for(;d<16;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}o.head&&(o.head.xflags=255&c,o.head.os=c>>8),512&o.flags&&(x[0]=255&c,x[1]=c>>>8&255,o.check=We(o.check,x,2,0)),c=0,d=0,o.mode=ll;case ll:if(1024&o.flags){for(;d<16;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}o.length=c,o.head&&(o.head.extra_len=c),512&o.flags&&(x[0]=255&c,x[1]=c>>>8&255,o.check=We(o.check,x,2,0)),c=0,d=0}else o.head&&(o.head.extra=null);o.mode=sl;case sl:if(1024&o.flags&&((h=o.length)>u&&(h=u),h&&(o.head&&(E=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Array(o.head.extra_len)),jt(o.head.extra,a,i,h,E)),512&o.flags&&(o.check=We(o.check,a,h,i)),u-=h,i+=h,o.length-=h),o.length))break e;o.length=0,o.mode=cl;case cl:if(2048&o.flags){if(u===0)break e;h=0;do E=a[i+h++],o.head&&E&&o.length<65536&&(o.head.name+=String.fromCharCode(E));while(E&&h<u);if(512&o.flags&&(o.check=We(o.check,a,h,i)),u-=h,i+=h,E)break e}else o.head&&(o.head.name=null);o.length=0,o.mode=ul;case ul:if(4096&o.flags){if(u===0)break e;h=0;do E=a[i+h++],o.head&&E&&o.length<65536&&(o.head.comment+=String.fromCharCode(E));while(E&&h<u);if(512&o.flags&&(o.check=We(o.check,a,h,i)),u-=h,i+=h,E)break e}else o.head&&(o.head.comment=null);o.mode=dl;case dl:if(512&o.flags){for(;d<16;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(c!==(65535&o.check)){e.msg="header crc mismatch",o.mode=Ne;break}c=0,d=0}o.head&&(o.head.hcrc=o.flags>>9&1,o.head.done=!0),e.adler=o.check=0,o.mode=qt;break;case fl:for(;d<32;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}e.adler=o.check=xl(c),c=0,d=0,o.mode=ml;case ml:if(o.havedict===0)return e.next_out=l,e.avail_out=s,e.next_in=i,e.avail_in=u,o.hold=c,o.bits=d,dv;e.adler=o.check=1,o.mode=qt;case qt:if(n===cv||n===zo)break e;case Ga:if(o.last){c>>>=7&d,d-=7&d,o.mode=Ya;break}for(;d<3;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}switch(o.last=1&c,d-=1,3&(c>>>=1)){case 0:o.mode=hl;break;case 1:if(wv(o),o.mode=Po,n===zo){c>>>=2,d-=2;break e}break;case 2:o.mode=_l;break;case 3:e.msg="invalid block type",o.mode=Ne}c>>>=2,d-=2;break;case hl:for(c>>>=7&d,d-=7&d;d<32;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",o.mode=Ne;break}if(o.length=65535&c,c=0,d=0,o.mode=Qa,n===zo)break e;case Qa:o.mode=pl;case pl:if(h=o.length){if(h>u&&(h=u),h>s&&(h=s),h===0)break e;jt(r,a,i,h,l),u-=h,i+=h,s-=h,l+=h,o.length-=h;break}o.mode=qt;break;case _l:for(;d<14;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(o.nlen=257+(31&c),c>>>=5,d-=5,o.ndist=1+(31&c),c>>>=5,d-=5,o.ncode=4+(15&c),c>>>=4,d-=4,o.nlen>286||o.ndist>30){e.msg="too many length or distance symbols",o.mode=Ne;break}o.have=0,o.mode=gl;case gl:for(;o.have<o.ncode;){for(;d<3;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}o.lens[D[o.have++]]=7&c,c>>>=3,d-=3}for(;o.have<19;)o.lens[D[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,N={bits:o.lenbits},k=go(sv,o.lens,0,19,o.lencode,0,o.work,N),o.lenbits=N.bits,k){e.msg="invalid code lengths set",o.mode=Ne;break}o.have=0,o.mode=vl;case vl:for(;o.have<o.nlen+o.ndist;){for(;v=(S=o.lencode[c&(1<<o.lenbits)-1])>>>16&255,w=65535&S,!((p=S>>>24)<=d);){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(w<16)c>>>=p,d-=p,o.lens[o.have++]=w;else{if(w===16){for($=p+2;d<$;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(c>>>=p,d-=p,o.have===0){e.msg="invalid bit length repeat",o.mode=Ne;break}E=o.lens[o.have-1],h=3+(3&c),c>>>=2,d-=2}else if(w===17){for($=p+3;d<$;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}d-=p,E=0,h=3+(7&(c>>>=p)),c>>>=3,d-=3}else{for($=p+7;d<$;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}d-=p,E=0,h=11+(127&(c>>>=p)),c>>>=7,d-=7}if(o.have+h>o.nlen+o.ndist){e.msg="invalid bit length repeat",o.mode=Ne;break}for(;h--;)o.lens[o.have++]=E}}if(o.mode===Ne)break;if(o.lens[256]===0){e.msg="invalid code -- missing end-of-block",o.mode=Ne;break}if(o.lenbits=9,N={bits:o.lenbits},k=go(wc,o.lens,0,o.nlen,o.lencode,0,o.work,N),o.lenbits=N.bits,k){e.msg="invalid literal/lengths set",o.mode=Ne;break}if(o.distbits=6,o.distcode=o.distdyn,N={bits:o.distbits},k=go(kc,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,N),o.distbits=N.bits,k){e.msg="invalid distances set",o.mode=Ne;break}if(o.mode=Po,n===zo)break e;case Po:o.mode=Fo;case Fo:if(u>=6&&s>=258){e.next_out=l,e.avail_out=s,e.next_in=i,e.avail_in=u,o.hold=c,o.bits=d,ov(e,m),l=e.next_out,r=e.output,s=e.avail_out,i=e.next_in,a=e.input,u=e.avail_in,c=o.hold,d=o.bits,o.mode===qt&&(o.back=-1);break}for(o.back=0;v=(S=o.lencode[c&(1<<o.lenbits)-1])>>>16&255,w=65535&S,!((p=S>>>24)<=d);){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(v&&!(240&v)){for(b=p,C=v,I=w;v=(S=o.lencode[I+((c&(1<<b+C)-1)>>b)])>>>16&255,w=65535&S,!(b+(p=S>>>24)<=d);){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}c>>>=b,d-=b,o.back+=b}if(c>>>=p,d-=p,o.back+=p,o.length=w,v===0){o.mode=Cl;break}if(32&v){o.back=-1,o.mode=qt;break}if(64&v){e.msg="invalid literal/length code",o.mode=Ne;break}o.extra=15&v,o.mode=yl;case yl:if(o.extra){for($=o.extra;d<$;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}o.length+=c&(1<<o.extra)-1,c>>>=o.extra,d-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=bl;case bl:for(;v=(S=o.distcode[c&(1<<o.distbits)-1])>>>16&255,w=65535&S,!((p=S>>>24)<=d);){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(!(240&v)){for(b=p,C=v,I=w;v=(S=o.distcode[I+((c&(1<<b+C)-1)>>b)])>>>16&255,w=65535&S,!(b+(p=S>>>24)<=d);){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}c>>>=b,d-=b,o.back+=b}if(c>>>=p,d-=p,o.back+=p,64&v){e.msg="invalid distance code",o.mode=Ne;break}o.offset=w,o.extra=15&v,o.mode=wl;case wl:if(o.extra){for($=o.extra;d<$;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}o.offset+=c&(1<<o.extra)-1,c>>>=o.extra,d-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){e.msg="invalid distance too far back",o.mode=Ne;break}o.mode=kl;case kl:if(s===0)break e;if(h=m-s,o.offset>h){if((h=o.offset-h)>o.whave&&o.sane){e.msg="invalid distance too far back",o.mode=Ne;break}h>o.wnext?(h-=o.wnext,_=o.wsize-h):_=o.wnext-h,h>o.length&&(h=o.length),g=o.window}else g=r,_=l-o.offset,h=o.length;h>s&&(h=s),s-=h,o.length-=h;do r[l++]=g[_++];while(--h);o.length===0&&(o.mode=Fo);break;case Cl:if(s===0)break e;r[l++]=o.length,s--,o.mode=Fo;break;case Ya:if(o.wrap){for(;d<32;){if(u===0)break e;u--,c|=a[i++]<<d,d+=8}if(m-=s,e.total_out+=m,o.total+=m,m&&(e.adler=o.check=o.flags?We(o.check,r,m,l-m):pr(o.check,r,m,l-m)),m=s,(o.flags?c:xl(c))!==o.check){e.msg="incorrect data check",o.mode=Ne;break}c=0,d=0}o.mode=El;case El:if(o.wrap&&o.flags){for(;d<32;){if(u===0)break e;u--,c+=a[i++]<<d,d+=8}if(c!==(4294967295&o.total)){e.msg="incorrect length check",o.mode=Ne;break}c=0,d=0}o.mode=Sl;case Sl:k=uv;break e;case Ne:k=fv;break e;case pv:return mv;case _v:default:return sn}return e.next_out=l,e.avail_out=s,e.next_in=i,e.avail_in=u,o.hold=c,o.bits=d,(o.wsize||m!==e.avail_out&&o.mode<Ne&&(o.mode<Ya||n!==nl))&&function(B,V,L,U){var M,q=B.state;q.window===null&&(q.wsize=1<<q.wbits,q.wnext=0,q.whave=0,q.window=new sa(q.wsize)),U>=q.wsize?(jt(q.window,V,L-q.wsize,q.wsize,0),q.wnext=0,q.whave=q.wsize):((M=q.wsize-q.wnext)>U&&(M=U),jt(q.window,V,L-U,M,q.wnext),(U-=M)?(jt(q.window,V,L-U,U,0),q.wnext=U,q.whave=q.wsize):(q.wnext+=M,q.wnext===q.wsize&&(q.wnext=0),q.whave<q.wsize&&(q.whave+=M)))}(e,e.output,e.next_out,m-e.avail_out),f-=e.avail_in,m-=e.avail_out,e.total_in+=f,e.total_out+=m,o.total+=m,o.wrap&&m&&(e.adler=o.check=o.flags?We(o.check,r,m,e.next_out-m):pr(o.check,r,m,e.next_out-m)),e.data_type=o.bits+(o.last?64:0)+(o.mode===qt?128:0)+(o.mode===Po||o.mode===Qa?256:0),(f===0&&m===0||n===nl)&&k===da&&(k=hv),k}var jo,Wn=1,vo=7;function Nt(e){if(e<Wn||e>vo)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function Cv(e,n){for(var o=0;o<e.length;o++)this[n+o]=e[o]}Nt.prototype.init=function(e,n,o,a,r){var i;switch(this.windowBits=e,this.level=n,this.memLevel=o,this.strategy=a,this.mode!==3&&this.mode!==4||(this.windowBits+=16),this.mode===vo&&(this.windowBits+=32),this.mode!==5&&this.mode!==6||(this.windowBits=-this.windowBits),this.strm=new I1,this.mode){case Wn:case 3:case 5:i=function(l,u,s,c,d,f){if(!l)return Rn;var m=1;if(u===F1&&(u=6),c<0?(m=0,c=-c):c>15&&(m=2,c-=16),d<1||d>K1||s!==Pr||c<8||c>15||u<0||u>9||f<0||f>H1)return tn(l,Rn);c===8&&(c=9);var h=new ev;return l.state=h,h.strm=l,h.wrap=m,h.gzhead=null,h.w_bits=c,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=d+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+xe-1)/xe),h.window=new sa(2*h.w_size),h.head=new Ct(h.hash_size),h.prev=new Ct(h.w_size),h.lit_bufsize=1<<d+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new sa(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=u,h.strategy=f,h.method=s,Qi(l)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case vo:i=bv(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}i===0?(this.write_in_progress=!1,this.init_done=!0):this._error(i)},Nt.prototype.params=function(){throw new Error("deflateParams Not supported")},Nt.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===0)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Nt.prototype.write=function(e,n,o,a,r,i,l){this._writeCheck(),this.write_in_progress=!0;var u=this;return Qe(function(){u.write_in_progress=!1;var s=u._write(e,n,o,a,r,i,l);u.callback(s[0],s[1]),u.pending_close&&u.close()}),this},Nt.prototype.writeSync=function(e,n,o,a,r,i,l){return this._writeCheck(),this._write(e,n,o,a,r,i,l)},Nt.prototype._write=function(e,n,o,a,r,i,l){if(this.write_in_progress=!0,e!==0&&e!==1&&e!==2&&e!==3&&e!==4&&e!==5)throw new Error("Invalid flush value");n==null&&(n=new J(0),a=0,o=0),r._set?r.set=r._set:r.set=Cv;var u,s=this.strm;switch(s.avail_in=a,s.input=n,s.next_in=o,s.avail_out=l,s.output=r,s.next_out=i,this.mode){case Wn:case 3:case 5:u=tv(s,e);break;case vo:case 2:case 4:case 6:u=kv(s,e);break;default:throw new Error("Unknown mode "+this.mode)}return u!==1&&u!==0&&this._error(u),this.write_in_progress=!1,[s.avail_in,s.avail_out]},Nt.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===Wn||this.mode===3||this.mode===5?function(e){var n;e&&e.state&&((n=e.state.status)!==Fr&&n!==gr&&n!==Go&&n!==Qo&&n!==Yo&&n!==kn&&n!==fo?tn(e,Rn):(e.state=null,n===kn&&tn(e,P1)))}(this.strm):function(e){if(!e||!e.state)return sn;var n=e.state;n.window&&(n.window=null),e.state=null}(this.strm),this.mode=0)},Nt.prototype.reset=function(){switch(this.mode){case Wn:case 5:jo=Qi(this.strm);break;case 2:case 6:jo=Ec(this.strm)}jo!==0&&this._error(jo)},Nt.prototype._error=function(e){this.onerror(cc[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};var Il=Object.freeze({NONE:0,DEFLATE:Wn,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:vo,Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8,Zlib:Nt}),ie={};Object.keys(Il).forEach(function(e){ie[e]=Il[e]}),ie.Z_MIN_WINDOWBITS=8,ie.Z_MAX_WINDOWBITS=15,ie.Z_DEFAULT_WINDOWBITS=15,ie.Z_MIN_CHUNK=64,ie.Z_MAX_CHUNK=1/0,ie.Z_DEFAULT_CHUNK=16384,ie.Z_MIN_MEMLEVEL=1,ie.Z_MAX_MEMLEVEL=9,ie.Z_DEFAULT_MEMLEVEL=8,ie.Z_MIN_LEVEL=-1,ie.Z_MAX_LEVEL=9,ie.Z_DEFAULT_LEVEL=ie.Z_DEFAULT_COMPRESSION;var Xo={Z_OK:ie.Z_OK,Z_STREAM_END:ie.Z_STREAM_END,Z_NEED_DICT:ie.Z_NEED_DICT,Z_ERRNO:ie.Z_ERRNO,Z_STREAM_ERROR:ie.Z_STREAM_ERROR,Z_DATA_ERROR:ie.Z_DATA_ERROR,Z_MEM_ERROR:ie.Z_MEM_ERROR,Z_BUF_ERROR:ie.Z_BUF_ERROR,Z_VERSION_ERROR:ie.Z_VERSION_ERROR};function pn(e,n,o){var a=[],r=0;function i(){for(var u;(u=e.read())!==null;)a.push(u),r+=u.length;e.once("readable",i)}function l(){var u=J.concat(a,r);a=[],o(null,u),e.close()}e.on("error",function(u){e.removeListener("end",l),e.removeListener("readable",i),o(u)}),e.on("end",l),e.end(n),i()}function _n(e,n){if(typeof n=="string"&&(n=new J(n)),!Do(n))throw new TypeError("Not a string or buffer");var o=ie.Z_FINISH;return e._processChunk(n,o)}function En(e){if(!(this instanceof En))return new En(e);Ve.call(this,e,ie.DEFLATE)}function Sn(e){if(!(this instanceof Sn))return new Sn(e);Ve.call(this,e,ie.INFLATE)}function xn(e){if(!(this instanceof xn))return new xn(e);Ve.call(this,e,ie.GZIP)}function Dn(e){if(!(this instanceof Dn))return new Dn(e);Ve.call(this,e,ie.GUNZIP)}function In(e){if(!(this instanceof In))return new In(e);Ve.call(this,e,ie.DEFLATERAW)}function Bn(e){if(!(this instanceof Bn))return new Bn(e);Ve.call(this,e,ie.INFLATERAW)}function Nn(e){if(!(this instanceof Nn))return new Nn(e);Ve.call(this,e,ie.UNZIP)}function Ve(e,n){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||ie.Z_DEFAULT_CHUNK,wt.call(this,e),e.flush&&e.flush!==ie.Z_NO_FLUSH&&e.flush!==ie.Z_PARTIAL_FLUSH&&e.flush!==ie.Z_SYNC_FLUSH&&e.flush!==ie.Z_FULL_FLUSH&&e.flush!==ie.Z_FINISH&&e.flush!==ie.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||ie.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<ie.Z_MIN_CHUNK||e.chunkSize>ie.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<ie.Z_MIN_WINDOWBITS||e.windowBits>ie.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<ie.Z_MIN_LEVEL||e.level>ie.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<ie.Z_MIN_MEMLEVEL||e.memLevel>ie.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=ie.Z_FILTERED&&e.strategy!=ie.Z_HUFFMAN_ONLY&&e.strategy!=ie.Z_RLE&&e.strategy!=ie.Z_FIXED&&e.strategy!=ie.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Do(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new ie.Zlib(n);var o=this;this._hadError=!1,this._binding.onerror=function(i,l){o._binding=null,o._hadError=!0;var u=new Error(i);u.errno=l,u.code=ie.codes[l],o.emit("error",u)};var a=ie.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(a=e.level);var r=ie.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(r=e.strategy),this._binding.init(e.windowBits||ie.Z_DEFAULT_WINDOWBITS,a,e.memLevel||ie.Z_DEFAULT_MEMLEVEL,r,e.dictionary),this._buffer=new J(this._chunkSize),this._offset=0,this._closed=!1,this._level=a,this._strategy=r,this.once("end",this.close)}Object.keys(Xo).forEach(function(e){Xo[Xo[e]]=e}),dt(Ve,wt),Ve.prototype.params=function(e,n,o){if(e<ie.Z_MIN_LEVEL||e>ie.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=ie.Z_FILTERED&&n!=ie.Z_HUFFMAN_ONLY&&n!=ie.Z_RLE&&n!=ie.Z_FIXED&&n!=ie.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var a=this;this.flush(ie.Z_SYNC_FLUSH,function(){a._binding.params(e,n),a._hadError||(a._level=e,a._strategy=n,o&&o())})}else Qe(o)},Ve.prototype.reset=function(){return this._binding.reset()},Ve.prototype._flush=function(e){this._transform(new J(0),"",e)},Ve.prototype.flush=function(e,n){var o=this._writableState;if((typeof e=="function"||e===void 0&&!n)&&(n=e,e=ie.Z_FULL_FLUSH),o.ended)n&&Qe(n);else if(o.ending)n&&this.once("end",n);else if(o.needDrain){var a=this;this.once("drain",function(){a.flush(n)})}else this._flushFlag=e,this.write(new J(0),"",n)},Ve.prototype.close=function(e){if(e&&Qe(e),!this._closed){this._closed=!0,this._binding.close();var n=this;Qe(function(){n.emit("close")})}},Ve.prototype._transform=function(e,n,o){var a,r=this._writableState,i=(r.ending||r.ended)&&(!e||r.length===e.length);if(!e===null&&!Do(e))return o(new Error("invalid input"));i?a=ie.Z_FINISH:(a=this._flushFlag,e.length>=r.length&&(this._flushFlag=this._opts.flush||ie.Z_NO_FLUSH)),this._processChunk(e,a,o)},Ve.prototype._processChunk=function(e,n,o){var a=e&&e.length,r=this._chunkSize-this._offset,i=0,l=this,u=typeof o=="function";if(!u){var s,c=[],d=0;this.on("error",function(g){s=g});do var f=this._binding.writeSync(n,e,i,a,this._buffer,this._offset,r);while(!this._hadError&&_(f[0],f[1]));if(this._hadError)throw s;var m=J.concat(c,d);return this.close(),m}var h=this._binding.write(n,e,i,a,this._buffer,this._offset,r);function _(g,p){if(!l._hadError){var v=r-p;if(function(C,I){if(!C)throw new Error(I)}(v>=0,"have should not go down"),v>0){var w=l._buffer.slice(l._offset,l._offset+v);l._offset+=v,u?l.push(w):(c.push(w),d+=w.length)}if((p===0||l._offset>=l._chunkSize)&&(r=l._chunkSize,l._offset=0,l._buffer=new J(l._chunkSize)),p===0){if(i+=a-g,a=g,!u)return!0;var b=l._binding.write(n,e,i,a,l._buffer,l._offset,l._chunkSize);return b.callback=_,void(b.buffer=e)}if(!u)return!1;o()}}h.buffer=e,h.callback=_},dt(En,Ve),dt(Sn,Ve),dt(xn,Ve),dt(Dn,Ve),dt(In,Ve),dt(Bn,Ve),dt(Nn,Ve);var Bl={codes:Xo,createDeflate:function(e){return new En(e)},createInflate:function(e){return new Sn(e)},createDeflateRaw:function(e){return new In(e)},createInflateRaw:function(e){return new Bn(e)},createGzip:function(e){return new xn(e)},createGunzip:function(e){return new Dn(e)},createUnzip:function(e){return new Nn(e)},deflate:function(e,n,o){return typeof n=="function"&&(o=n,n={}),pn(new En(n),e,o)},deflateSync:function(e,n){return _n(new En(n),e)},gzip:function(e,n,o){return typeof n=="function"&&(o=n,n={}),pn(new xn(n),e,o)},gzipSync:function(e,n){return _n(new xn(n),e)},deflateRaw:function(e,n,o){return typeof n=="function"&&(o=n,n={}),pn(new In(n),e,o)},deflateRawSync:function(e,n){return _n(new In(n),e)},unzip:function(e,n,o){return typeof n=="function"&&(o=n,n={}),pn(new Nn(n),e,o)},unzipSync:function(e,n){return _n(new Nn(n),e)},inflate:function(e,n,o){return typeof n=="function"&&(o=n,n={}),pn(new Sn(n),e,o)},inflateSync:function(e,n){return _n(new Sn(n),e)},gunzip:function(e,n,o){return typeof n=="function"&&(o=n,n={}),pn(new Dn(n),e,o)},gunzipSync:function(e,n){return _n(new Dn(n),e)},inflateRaw:function(e,n,o){return typeof n=="function"&&(o=n,n={}),pn(new Bn(n),e,o)},inflateRawSync:function(e,n){return _n(new Bn(n),e)},Deflate:En,Inflate:Sn,Gzip:xn,Gunzip:Dn,DeflateRaw:In,InflateRaw:Bn,Unzip:Nn,Zlib:Ve};class Ev{constructor(n,o,a){this.SDKAPPID=n,this.EXPIRETIME=a,this.PRIVATEKEY=o}genTestUserSig(n){return console.log("e",n),this._isNumber(this.SDKAPPID)?this._isString(this.PRIVATEKEY)?this._isString(n)?this._isNumber(this.EXPIRETIME)?(console.log("sdkAppID="+this.SDKAPPID+" key="+this.PRIVATEKEY+" userID="+n+" expire="+this.EXPIRETIME),this.genSigWithUserbuf(n,this.EXPIRETIME,null)):(console.error("expireTime must be a number"),""):(console.error("userID must be a string"),""):(console.error("privateKey must be a string"),""):(console.error("sdkAppID must be a number"),"")}newBuffer(n,o){return J.from?J.from(n,o):new J(n,o)}unescape(n){return n.replace(/_/g,"=").replace(/\-/g,"/").replace(/\*/g,"+")}escape(n){return n.replace(/\+/g,"*").replace(/\//g,"-").replace(/=/g,"_")}encode(n){return this.escape(this.newBuffer(n).toString("base64"))}decode(n){return this.newBuffer(this.unescape(n),"base64")}base64encode(n){return this.newBuffer(n).toString("base64")}base64decode(n){return this.newBuffer(n,"base64").toString()}_hmacsha256(n,o,a,r){let i="TLS.identifier:"+n+`
17
+ `;i+="TLS.sdkappid:"+this.SDKAPPID+`
18
+ `,i+="TLS.time:"+o+`
19
+ `,i+="TLS.expire:"+a+`
20
+ `,r!=null&&(i+="TLS.userbuf:"+r+`
21
+ `);let l=wi.HmacSHA256(i,this.PRIVATEKEY);return wi.enc.Base64.stringify(l)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(n){return n!==null&&(typeof n=="number"&&!isNaN(n-0)||typeof n=="object"&&n.constructor===Number)}_isString(n){return typeof n=="string"}genSigWithUserbuf(n,o,a){let r=this._utc(),i={"TLS.ver":"2.0","TLS.identifier":n,"TLS.sdkappid":this.SDKAPPID,"TLS.time":r,"TLS.expire":o},l="";if(a!=null){let d=this.base64encode(a);i["TLS.userbuf"]=d,l=this._hmacsha256(n,r,o,d)}else l=this._hmacsha256(n,r,o,null);i["TLS.sig"]=l;let u=JSON.stringify(i),s=Bl.deflateSync(this.newBuffer(u)).toString("base64"),c=this.escape(s);return console.log("ret="+c),c}validate(n){let o=this.decode(n),a=Bl.inflateSync(o);console.log("validate ret="+a)}}const Nl=1400829659,Sv=604800,xv="b838ac1178ea1bff2ab8ea72291a2c63709a1b4e2cce2afecc918f12c4912ac3";function Dv(e,n){const o=(n==null?void 0:n.appid)??Nl,a=(n==null?void 0:n.secretkey)??xv,i=new Ev(o,a,Sv).genTestUserSig(e);return{SDKAppID:Nl,userSig:i}}function Sc(e){const n=(a,r)=>{e.value.push({type:a,content:r})};return{addSuccessLog:a=>n("success",a),addFailedLog:a=>n("failed",a),addInfoLog:a=>n("info",a),clearLog:()=>{e.value=[]}}}function Iv(e,n,o,a){const{addFailedLog:r,addSuccessLog:i}=Sc(a);function l(x){r(`Local error: ${x.message}`),n(se.TRTC.EVENT.ERROR,x)}function u(x){r(`User has been kicked out for ${x.reason}`),n(se.TRTC.EVENT.KICKED_OUT,x)}function s(x){const{userId:D}=x;console.log(`远端用户: [${D}] 进入房间`),o.remoteUsersViews.push({userId:D,streamType:"main"}),i(`Remote User [${D}] entered`),n(se.TRTC.EVENT.REMOTE_USER_ENTER,x)}function c(x){let D=o.remoteUsersViews.findIndex(B=>B.userId==x.userId);o.remoteUsersViews.splice(D,1),i(`远端用户: [${x.userId}] 退房事件`),n(se.TRTC.EVENT.REMOTE_USER_EXIT,x)}async function d(x){console.log("%c handleRemoteVideoAvailable >>>","background: blue; color: #fff",x);const{userId:D,streamType:B}=x;try{await t.nextTick(),e.startRemoteVideo({view:D,userId:D,streamType:B,option:{small:!0,receiveWhenViewVisible:!0,viewRoot:document.getElementById("remote-box")}}),i(`Play remote video success: [${D}]`),n(se.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE,x)}catch(V){r(`Play remote video failed: [${D}], error: ${V.message}`)}}function f(x){console.log("远端用户停止发布视频",x);const{streamType:D,userId:B}=x;i(`[${B}] [${D}] video unavailable`),e.stopRemoteVideo({userId:B,streamType:D}),n(se.TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE,x)}function m(x){console.log("远端用户发布了音频",x),i(`[${x.userId}] audio available`),n(se.TRTC.EVENT.REMOTE_AUDIO_AVAILABLE,x)}function h(x){console.log("远端停止发布了音频",x),i(`[${x.userId}] audio unavailable`),n(se.TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE,x)}function _(){i("本地屏幕分享停止事件"),n(se.TRTC.EVENT.SCREEN_SHARE_STOPPED)}function g(x){const{userId:D,volume:B}=x;console.log("event",x),console.log(D===""?`我的音量为: ${B}`:`用户: ${D} 的音量为: ${B}`),n(se.TRTC.EVENT.AUDIO_VOLUME,x)}function p(x){n(se.TRTC.EVENT.NETWORK_QUALITY,x)}function v(x){console.log("自动播放失败:",x),n(se.TRTC.EVENT.AUTOPLAY_FAILED,x)}function w(x){console.log("SDK 和腾讯云的连接状态变更事件:",x),n(se.TRTC.EVENT.CONNECTION_STATE_CHANGED,x)}function b(x){console.log("音频播放状态变更事件:",`${x.userId} player is ${x.state} because of ${x.reason}`),n(se.TRTC.EVENT.AUDIO_PLAY_STATE_CHANGED,x)}async function C(x){const{userId:D,streamType:B,reason:V,state:L}=x;console.log("视频播放状态变更事件:",`${D} - ${B} video player is ${L} because of ${V}`),n(se.TRTC.EVENT.VIDEO_PLAY_STATE_CHANGED,x)}function I(x){console.log("摄像头、麦克风等设备变化的通知事件:",`${x.type}(${x.device.label}) ${x.action}`),n(se.TRTC.EVENT.DEVICE_CHANGED,x)}function E(x){console.log("推流状态变更事件:",`${x.mediaType} ${x.state} ${x.reason}`),n(se.TRTC.EVENT.PUBLISH_STATE_CHANGED,x)}function k(x){n(se.TRTC.EVENT.STATISTICS,x)}function N(x){n(se.TRTC.EVENT.SEI_MESSAGE,x)}function $(x){n(se.TRTC.EVENT.TRACK,x)}return{events:{[se.TRTC.EVENT.ERROR]:l,[se.TRTC.EVENT.KICKED_OUT]:u,[se.TRTC.EVENT.REMOTE_USER_ENTER]:s,[se.TRTC.EVENT.REMOTE_USER_EXIT]:c,[se.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE]:d,[se.TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE]:f,[se.TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE]:h,[se.TRTC.EVENT.REMOTE_AUDIO_AVAILABLE]:m,[se.TRTC.EVENT.SCREEN_SHARE_STOPPED]:_,[se.TRTC.EVENT.AUDIO_VOLUME]:g,[se.TRTC.EVENT.NETWORK_QUALITY]:p,[se.TRTC.EVENT.AUTOPLAY_FAILED]:v,[se.TRTC.EVENT.CONNECTION_STATE_CHANGED]:w,[se.TRTC.EVENT.AUDIO_PLAY_STATE_CHANGED]:b,[se.TRTC.EVENT.VIDEO_PLAY_STATE_CHANGED]:C,[se.TRTC.EVENT.DEVICE_CHANGED]:I,[se.TRTC.EVENT.PUBLISH_STATE_CHANGED]:E,[se.TRTC.EVENT.STATISTICS]:k,[se.TRTC.EVENT.SEI_MESSAGE]:N,[se.TRTC.EVENT.TRACK]:$},handleError:l,handleKickedOut:u,handleRemoteUserEnter:s,handleRemoteUserExit:c,handleRemoteVideoAvailable:d,handleRemoteVideoUnavailable:f,handleRemoteAudioUnavailable:h,handleRemoteAudioAvailable:m,handleScreenShareStopped:_,handleVolumeValue:g,handleNetworkQuality:p,handleAutoplayFailed:v,handleConnectStateChanged:w,handleAudioPlayStateChanged:b,handleVideoPlayStateChanged:C,handleDeviceChanged:I,handlePublishStateChanged:E,handleStatistics:k,handleSEIMessage:N,handleTrack:$}}function Bv(e,n,o){let a=t.markRaw(se.TRTC.create());const r=t.ref([]),i=t.ref("stopped"),l=t.ref(!1),u=t.ref(!1),s=t.ref("stopped"),c=t.ref("stopped"),{addSuccessLog:d,addFailedLog:f}=Sc(r),m=t.ref(!0),h=t.ref(!0),_=t.ref(!0),g=R=>{if(!R.result){m.value=!1;return}R.detail&&(h.value=R.detail.isScreenShareSupported,_.value=R.detail.isSmallStreamSupported)};se.TRTC.isSupported().then(g);const p=t.ref(!1),v=t.ref(!1),w=t.ref(!1),b=()=>{v.value=!v.value,v.value?k():E()},C=()=>{w.value=!w.value,w.value?$():N()},I=async()=>{await L(),p.value=!1,n($r.USER_HANGINGUP)};async function E(){c.value="starting";try{await a.startLocalAudio({mute:!1,option:{microphoneId:o.audioDeviceId}}),c.value="started",d("Local audio started successfully")}catch(R){c.value="stopped",f(`Local audio is failed to started. Error: ${R.message}`)}}async function k(){if(c.value!=="started"){f("The audio has not been started");return}c.value="stopping";try{await a.stopLocalAudio(),c.value="stopped",d("Local audio stopped successfully")}catch(R){c.value="started",f(`Local audio is failed to stopped. Error: ${R.message}`)}}async function N(){s.value="starting";try{await a.startLocalVideo({view:"local",option:{cameraId:o.videoDeviceId,profile:"480p"}}),s.value="started",d("Local video started successfully")}catch(R){s.value="stopped",f(`Local audio is failed to stopped. Error: ${R.message}`)}}async function $(){if(s.value!=="started"){f("The video has not been started");return}s.value="stopping";try{await a.stopLocalVideo(),s.value="stopped",d("Local video stopped successfully")}catch(R){s.value="started",f(`Local video is failed to stopped. Error: ${R.message}`)}}const S=async()=>{try{l.value?(await a.updateLocalAudio({mute:!1}),l.value=!1):(await a.updateLocalAudio({mute:!0}),l.value=!0),d(`Audio Muted: ${l.value}`)}catch(R){console.log("error",R),f(`Mute audio error: ${R.message}`)}},x=async()=>{try{u.value?(await a.updateLocalVideo({mute:!1}),u.value=!1):(await a.updateLocalVideo({mute:!0}),u.value=!0),d(`Video Muted: ${u.value}`)}catch(R){console.log("error==videoMuted",R),f(`Mute video error: ${R.message}`)}},{events:D}=Iv(a,n,o,r),B=(R=!0)=>{let Z=R?"on":"off";for(const O in D)a[Z](O,D[O])};t.watch(()=>i.value,R=>n("change-room-state",R),{deep:!0,immediate:!0}),t.watch(()=>r.value,R=>n("update-log",R),{deep:!0,immediate:!0});async function V(){if(!(e.appId&&e.roomId&&e.userId)){A.ElMessage({message:"请检查参数 appId, userId, roomId 是否输入正确!",type:"error"});return}i.value="entering";try{await a.enterRoom({roomId:Number(e.roomId),sdkAppId:Number(e.appId),userId:e.userId,userSig:e.userSig}),i.value="entered",d(`[${e.userId}] enter room [${e.roomId}] success`),B(),await E(),await N(),p.value=!0}catch(R){i.value="stopped",f(`Enter room ${e.roomId} failed. Error: ${R.message}`)}}async function L(){if(i.value!=="entered"){f("The room has not been entered");return}i.value="exiting";try{B(!1),await a.exitRoom(),await a.stopLocalVideo(),await a.stopLocalAudio(),i.value="exited",o.remoteUsersViews=[],d("Exit room success")}catch(R){i.value="entered",f(`Exit room failed. Error: ${R.message}`)}c.value==="started"&&k(),s.value==="started"&&$(),o.remoteUsersViews=[]}return{trtc:a,logs:r,roomStatus:i,audioMuted:l,videoMuted:u,camStatus:s,micStatus:c,isSupported:m,isShowController:p,isMutedAudio:v,isHideVideo:w,handleAudioMute:b,handleVideoHide:C,handleHangUp:I,handleDestoryTrtc:()=>(a==null||a.destroy(),a=null),handleSwitch1v1Screen:()=>{if(i.value!=="entered")return;const R=document.querySelector(".local-wrapper"),Z=Array.prototype.filter.call(R.childNodes,T=>T.tagName==="DIV")[0],O=document.querySelector(".remote"),z=Array.prototype.filter.call(O.childNodes,T=>T.tagName==="DIV")[0];z&&(R==null||R.appendChild(z)),Z&&(O==null||O.appendChild(Z));const j=(z==null?void 0:z.id)!=="local";if(a.updateLocalVideo({view:"local",option:{small:j,profile:j?"240p_2":"1080p"}}),o.remoteUsersViews.length>0){const T=o.remoteUsersViews[0];a.updateRemoteVideo({view:T.userId,userId:T.userId,streamType:T.streamType,option:{small:!j}})}},getUserSig:()=>e.userSig||Dv(e.userId,{appid:e.appId,secretkey:e.secretKey}).userSig,handleEnter:V,handleExit:L,handleStartLocalAudio:E,handleStopLocalAudio:k,handleStartLocalVideo:N,handleStopLocalVideo:$,toggleAudio:S,toggleVideo:x}}const Nv={key:0,class:"trtc-container"},$v={class:"local-wrapper"},Vv=["id"],Tv={class:"trtc-controller btns flex"},Rv={class:"w-full flex items-center justify-around"},Av={key:1},Lv=t.defineComponent({__name:"bcTrtc",props:{appId:{},secretKey:{},userId:{},roomId:{},userSig:{},logLeave:{default:"WARN"}},emits:[se.TRTC.EVENT.ERROR,se.TRTC.EVENT.KICKED_OUT,se.TRTC.EVENT.REMOTE_USER_ENTER,se.TRTC.EVENT.REMOTE_USER_EXIT,se.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE,se.TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE,se.TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE,se.TRTC.EVENT.REMOTE_AUDIO_AVAILABLE,se.TRTC.EVENT.SCREEN_SHARE_STOPPED,se.TRTC.EVENT.AUDIO_VOLUME,se.TRTC.EVENT.NETWORK_QUALITY,se.TRTC.EVENT.AUTOPLAY_FAILED,se.TRTC.EVENT.CONNECTION_STATE_CHANGED,se.TRTC.EVENT.AUDIO_PLAY_STATE_CHANGED,se.TRTC.EVENT.VIDEO_PLAY_STATE_CHANGED,se.TRTC.EVENT.DEVICE_CHANGED,se.TRTC.EVENT.PUBLISH_STATE_CHANGED,se.TRTC.EVENT.STATISTICS,se.TRTC.EVENT.SEI_MESSAGE,se.TRTC.EVENT.TRACK,"change-room-state","update-log",$r.USER_HANGINGUP],setup(e,{expose:n,emit:o}){const a=e,r=o;se.TRTC.setLogLevel(Os[a.logLeave],!0);const i=t.reactive({audioDeviceId:"",videoDeviceId:"",remoteUsersViews:[]}),l=t.computed(()=>i.remoteUsersViews.length>1),{trtc:u,isSupported:s,isShowController:c,isMutedAudio:d,isHideVideo:f,logs:m,handleAudioMute:h,handleVideoHide:_,handleHangUp:g,handleDestoryTrtc:p,handleEnter:v,handleExit:w,handleSwitch1v1Screen:b,getUserSig:C}=Bv(a,r,i);return n({trtc:u,logs:m,handleDestoryTrtc:p,handleHangUp:g,handleEnter:v,handleExit:w,handleVideoHide:_,handleAudioMute:h,getUserSig:C}),(I,E)=>{const k=t.resolveComponent("bc-icon");return t.unref(s)?(t.openBlock(),t.createElementBlock("div",Nv,[t.createElementVNode("div",{class:t.normalizeClass(["trtc-communicate-wrapper",`trtc-${l.value?"group":"single"}`])},[t.createElementVNode("div",$v,[t.renderSlot(I.$slots,"video-main",{},()=>[E[4]||(E[4]=t.createElementVNode("div",{class:"local-user",id:"local"},null,-1))],!0)]),i.remoteUsersViews.length?(t.openBlock(),t.createElementBlock("div",{key:0,id:"remote-box",class:"remote flex flex-wrap",onClick:E[0]||(E[0]=N=>l.value?null:t.unref(b)())},[t.renderSlot(I.$slots,"video-sub",{list:i.remoteUsersViews},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.remoteUsersViews,N=>(t.openBlock(),t.createElementBlock("div",{class:"remote-user",id:N.userId,key:N.userId},null,8,Vv))),128))],!0)])):t.createCommentVNode("",!0)],2),t.unref(c)?t.renderSlot(I.$slots,"controller",{key:0,isMutedAudio:t.unref(d),isHideVideo:t.unref(f)},()=>[t.createElementVNode("div",Tv,[t.createElementVNode("div",Rv,[t.createElementVNode("div",{class:t.normalizeClass(["icon-box rounded-full",t.unref(d)?" bg-zinc-400/80":" bg-stone-50"]),onClick:E[1]||(E[1]=(...N)=>t.unref(h)&&t.unref(h)(...N))},[t.createVNode(k,{name:t.unref(d)?"ele-Mute":"ele-Microphone",color:t.unref(d)?"#fff":"#333",size:20},null,8,["name","color"])],2),t.createElementVNode("div",{class:"icon-box bg-red-500",onClick:E[2]||(E[2]=(...N)=>t.unref(g)&&t.unref(g)(...N))},[t.createVNode(k,{name:"ele-PhoneFilled",color:"#fff",size:20})]),t.createElementVNode("div",{class:t.normalizeClass(["icon-box flex-items-center justify-center rounded-full",t.unref(f)?" bg-zinc-400/80":" bg-stone-50"]),onClick:E[3]||(E[3]=(...N)=>t.unref(_)&&t.unref(_)(...N))},[t.createVNode(k,{name:t.unref(f)?"ele-VideoPlay":"ele-VideoCamera",color:t.unref(f)?"#fff":"#333",size:20},null,8,["name","color"])],2)])])],!0):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Av,"该浏览器暂不支持音视频通话,请更换浏览器。"))}}}),Mv=P._export_sfc(Lv,[["__scopeId","data-v-2ef63a18"]]),Ov=["srcObject"],qv=["width","height"],zv=t.defineComponent({__name:"bcFace",props:{url:{},width:{default:300},height:{default:300},maxAutoNum:{default:3},radius:{default:"50%"},autocheck:{type:Boolean,default:!0},userId:{}},emits:["success"],setup(e,{expose:n,emit:o}){const a=o,r=e,i=t.computed(()=>({width:`${r.width}px`,height:`${r.height}px`,borderRadius:`${r.radius}`})),{videoInputs:l}=P.useDevicesList({requestPermissions:!0}),u=t.computed(()=>{var w;return(w=l.value[0])==null?void 0:w.deviceId}),s=t.ref(),c=t.ref(),d=t.ref(!1);let f=0,m=0;const{stream:h,start:_,stop:g}=P.useUserMedia({constraints:{video:{deviceId:u.value,width:r.width,height:r.height}}}),p=async(w={})=>{var k,N;const b=(k=c.value)==null?void 0:k.getContext("2d");b==null||b.drawImage(s.value,0,0,r.width,r.height);const C=(N=c.value)==null?void 0:N.toDataURL("image/jpeg"),I=Kl(C),E=new File([I],new Date().getTime()+".jpg");if(r.url){const $=await ce.get("userInfo");return d.value=!0,le({url:`${r.url}`,method:"post",headers:{"Content-Type":"multipart/form-data"},data:y._.assign({file:E,user_id:r.userId||($==null?void 0:$.id)},w)}).then(S=>y._.assign({},S,{file:E,dataURL:C})).finally(()=>{d.value=!1})}else clearTimeout(m),f=0},v=()=>{r.autocheck&&(m=window.setTimeout(async()=>{var w;f<r.maxAutoNum?(w=p())==null||w.then(b=>{a("success",b),(b==null?void 0:b.code)!==1&&(f++,v())}):(clearTimeout(m),f=0,A.ElMessage.error(`已超过最大${r.maxAutoNum}次数人脸识别`))},1e3))};return t.onMounted(()=>{_()}),t.onUnmounted(()=>{g(),clearTimeout(m)}),n({request:p}),(w,b)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(i.value),class:"face_auth"},[t.createElementVNode("div",{class:t.normalizeClass(["face_auth_scan",{show:d.value}])},null,2),t.createElementVNode("video",{ref_key:"videoRef",ref:s,autoplay:"",playsinline:"",srcObject:t.unref(h),onPlay:v},null,40,Ov),t.createElementVNode("canvas",{ref_key:"canvasRef",ref:c,class:t.normalizeClass(["canvas",{show:d.value}]),width:e.width,height:e.height},null,10,qv)],4))}}),Pv=P._export_sfc(zv,[["__scopeId","data-v-d55f2381"]]),Fv={class:"section2"},jv=t.defineComponent({__name:"bcDivider",props:{size:{type:Number},direction:{type:String,default:"vertical"}},setup(e){const n=e,o=t.shallowRef(),a=t.shallowRef(),r=t.shallowRef(),i=t.ref(n.size),{width:l,height:u}=P.useElementSize(r),s=t.computed(()=>i.value??(n.direction==="horizontal"?l.value:u.value)/2),c=t.computed(()=>(n.direction==="horizontal"?l.value:u.value)-s.value),{pressed:d}=P.useMousePressed({target:a,touch:!1}),{elementX:f,elementY:m}=P.useMouseInElement(r),h=t.watch(f,g=>{!d.value||n.direction==="vertical"||(i.value=g)}),_=t.watch(m,g=>{!d.value||n.direction==="horizontal"||(i.value=g)});return t.onBeforeUnmount(()=>{h(),_()}),(g,p)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"containerRef",ref:r,class:"divider__container",style:t.normalizeStyle({flexDirection:e.direction==="horizontal"?"row":"column"})},[t.createElementVNode("div",{ref_key:"asideRef",ref:o,class:"section1",style:t.normalizeStyle({flexBasis:`${s.value}px`})},[t.renderSlot(g.$slots,"aside",{size:s.value},void 0,!0)],4),t.createElementVNode("div",{ref_key:"dividerRef",ref:a,class:t.normalizeClass(["divider",e.direction])},null,2),t.createElementVNode("div",Fv,[t.renderSlot(g.$slots,"default",{size:c.value},void 0,!0)])],4))}}),Uv=P._export_sfc(jv,[["__scopeId","data-v-95303315"]]),Hv={class:"wrap1"},Wv={class:"wrap2"},Kv=t.defineComponent({__name:"index",props:{showFull:{type:Boolean,default:!0}},emits:["save"],setup(e,{emit:n}){const o=t.ref(null),{width:a,height:r}=P.useElementSize(o),i=e,l=t.ref(!1),u=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.ref(null),f=n,m=()=>{var I,E;l.value=!l.value,(I=c==null?void 0:c.value)==null||I.clear(),(E=d==null?void 0:d.value)==null||E.clear()},h=()=>{const I=s.value,E={width:a.value-30,height:200,minWidth:2,maxWidth:6,openSmooth:!1,bgColor:"#ffffff"};c.value=new P.SmoothSignature(I,E)},_=()=>{const I=u.value,E={width:a.value-120,height:r.value-60,minWidth:3,maxWidth:10,openSmooth:!1,bgColor:"#ffffff"};d.value=new P.SmoothSignature(I,E)},g=()=>{c.value.clear()},p=()=>{d.value.clear()},v=()=>{c.value.undo()},w=()=>{d.value.undo()},b=()=>{const I=c.value;if(I.isEmpty()){alert("isEmpty");return}const k=I.getPNG();f("save",k)},C=()=>{const I=d.value;if(I.isEmpty()){alert("isEmpty");return}const N=I.getRotateCanvas(-90).toDataURL();f("save",N)};return t.onMounted(()=>{l.value=i.showFull,setTimeout(()=>{h(),_()},100)}),(I,E)=>(t.openBlock(),t.createElementBlock("div",{class:"h-full w-full sign-finish",ref_key:"signFinish",ref:o},[t.withDirectives(t.createElementVNode("div",Hv,[E[0]||(E[0]=t.createElementVNode("span",{class:"sign-title"},"请在区域内签字",-1)),t.createElementVNode("canvas",{class:"canvas1",ref_key:"canvas1",ref:s},null,512),t.createElementVNode("div",{class:"actions"},[t.createElementVNode("button",{class:"danger",onClick:g},"清除"),t.createElementVNode("button",{class:"warning",onClick:v},"撤销"),t.createElementVNode("button",{class:"primary",onClick:m},"横屏"),t.createElementVNode("button",{class:"success",onClick:b},"保存")])],512),[[t.vShow,l.value]]),t.withDirectives(t.createElementVNode("div",Wv,[t.createElementVNode("div",{class:"actionsWrap"},[t.createElementVNode("div",{class:"actions"},[t.createElementVNode("button",{class:"danger",onClick:p},"清除"),t.createElementVNode("button",{class:"warning",onClick:w},"撤销"),t.createElementVNode("button",{class:"primary",onClick:m},"竖屏"),t.createElementVNode("button",{class:"success",onClick:C},"保存")])]),t.createElementVNode("canvas",{class:"canvas",ref_key:"canvas2",ref:u},null,512)],512),[[t.vShow,!l.value]])],512))}}),Zv=P._export_sfc(Kv,[["__scopeId","data-v-e4691824"]]),Jv={class:"update-name"},Gv={class:"content"},Qv={class:"item"},Yv={class:"item"},Xv={class:"item"},e0={class:"footer"},t0=t.defineComponent({__name:"popup",props:{row:{type:Object},close:{type:Function}},setup(e){var r;const n=e,o=t.ref((r=n.row)==null?void 0:r.show_name);function a(){n.close(o.value)}return(i,l)=>{const u=t.resolveComponent("el-input"),s=t.resolveComponent("el-button"),c=t.resolveComponent("bc-button");return t.openBlock(),t.createElementBlock("div",Jv,[t.createElementVNode("div",Gv,[t.createElementVNode("div",Qv,[l[2]||(l[2]=t.createElementVNode("span",{class:"show-name"},"字段名称:",-1)),t.createTextVNode(t.toDisplayString(e.row.name),1)]),t.createElementVNode("div",Yv,[l[3]||(l[3]=t.createElementVNode("span",{class:"show-name"},"字段键值:",-1)),t.createTextVNode(t.toDisplayString(e.row.field),1)]),t.createElementVNode("div",Xv,[l[4]||(l[4]=t.createElementVNode("span",{class:"show-name"},"显示名称:",-1)),t.createVNode(u,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=d=>o.value=d),clearable:"",placeholder:"请输入",size:"default"},null,8,["modelValue"])])]),t.createElementVNode("footer",e0,[t.createVNode(s,{size:"default",onClick:l[1]||(l[1]=d=>e.close("cancel"))},{default:t.withCtx(()=>[...l[5]||(l[5]=[t.createTextVNode("关闭",-1)])]),_:1}),t.createVNode(c,{type:"primary",size:"default",onClick:a},{default:t.withCtx(()=>[...l[6]||(l[6]=[t.createTextVNode("确定",-1)])]),_:1})])])}}}),n0=P._export_sfc(t0,[["__scopeId","data-v-c8fbb8a5"]]);function o0(e){return new Promise(n=>{fn(n0,{row:e},{title:"修改显示名称",width:500,height:350,zIndex:99999,className:"context-wrap__content",success:({data:o})=>n(o),showFooter:!1})})}var $e=(e=>(e[e.TEXT=1]="TEXT",e[e.DATE=2]="DATE",e[e.NUMBER=3]="NUMBER",e[e.SELECT_R=4]="SELECT_R",e[e.SELECT_M=5]="SELECT_M",e[e.SELECT_T=6]="SELECT_T",e))($e||{}),Wt=(e=>(e[e.INPUT=1]="INPUT",e[e.FIXED=2]="FIXED",e[e.DICT_CODE=3]="DICT_CODE",e[e.DICT_NAME=4]="DICT_NAME",e[e.API=5]="API",e))(Wt||{}),kt=(e=>(e[e.WEI_DU=1]="WEI_DU",e[e.ZHI_BIAO=2]="ZHI_BIAO",e[e.Z_WEI_DU=3]="Z_WEI_DU",e[e.SHAI_XUAN=4]="SHAI_XUAN",e))(kt||{}),zt=(e=>(e.NONE="",e.SUM="sum",e.MAX="max",e.MIN="min",e.AVERAGE="average",e.COUNT="count",e.COUNTDISTINCT="countdistinct",e))(zt||{}),fa=(e=>(e[e.NONE=0]="NONE",e[e.RATE=1]="RATE",e))(fa||{}),ma=(e=>(e[e.NONE=0]="NONE",e[e.STATISTICS=1]="STATISTICS",e))(ma||{}),Gn=(e=>(e[e.NONE=0]="NONE",e[e.ASC=1]="ASC",e[e.DESC=2]="DESC",e))(Gn||{}),no=(e=>(e[e.NONE=0]="NONE",e[e.SUM=1]="SUM",e))(no||{}),nn=(e=>(e[e.HIDE=1]="HIDE",e[e.SHOW=0]="SHOW",e))(nn||{}),ve=(e=>(e[e.COLLECT=0]="COLLECT",e[e.CALC=1]="CALC",e[e.EDIT_NAME=2]="EDIT_NAME",e[e.SORT=3]="SORT",e[e.POINT=4]="POINT",e[e.SUM=5]="SUM",e[e.SHOW=6]="SHOW",e[e.STATISTICS=7]="STATISTICS",e))(ve||{}),Ft=(e=>(e[e.COLUMN=0]="COLUMN",e[e.FILTER=1]="FILTER",e))(Ft||{}),Mn=(e=>(e.AND="AND",e.OR="OR",e))(Mn||{});const a0={[$e.TEXT]:"string",[$e.NUMBER]:"number",[$e.DATE]:"date",[$e.SELECT_R]:"radio_▼",[$e.SELECT_M]:"multiple_▼",[$e.SELECT_T]:"tree_▼"};function xc(e){return a0[e]}const Uo=t.ref(""),r0=[{label:"列配置",value:Ft.COLUMN},{label:"检索配置",value:Ft.FILTER}],Dc=[{label:"无",value:zt.NONE},{label:"求和",value:zt.SUM},{label:"平均",value:zt.AVERAGE},{label:"最大值",value:zt.MAX},{label:"最小值",value:zt.MIN},{label:"计数",value:zt.COUNT},{label:"去重计数",value:zt.COUNTDISTINCT}],Ic=[{label:"无",value:fa.NONE},{label:"占比",value:fa.RATE}],jr=[{label:"无",value:Gn.NONE},{label:"升序",value:Gn.ASC},{label:"降序",value:Gn.DESC}],Ur=[{label:"无",value:no.NONE},{label:"合计",value:no.SUM}],Hr=[{label:"隐藏",value:nn.HIDE},{label:"显示",value:nn.SHOW}],Bc=[{label:"不统计",value:ma.NONE},{label:"统计",value:ma.STATISTICS}],Nc=[{label:"AND",value:Mn.AND},{label:"OR",value:Mn.OR}],i0=[{label:"排序方式",value:ve.SORT,children:jr},{label:"显示名称",value:ve.EDIT_NAME},{label:"是否隐藏",value:ve.SHOW,children:Hr},{label:"分组统计",value:ve.STATISTICS,children:Bc},{label:"底部合计",value:ve.SUM,children:Ur},{label:"小数位数",value:ve.POINT}],l0=[{label:"显示名称",value:ve.EDIT_NAME}],s0=[{label:"汇总方式",value:ve.COLLECT,children:Dc},{label:"占比计算",value:ve.CALC,children:Ic},{label:"排序方式",value:ve.SORT,children:jr},{label:"显示名称",value:ve.EDIT_NAME},{label:"小数位数",value:ve.POINT},{label:"底部合计",value:ve.SUM,children:Ur},{label:"是否隐藏",value:ve.SHOW,children:Hr}],c0={class:"extend-content__text"},u0={key:0},d0=["onClick"],f0=t.defineComponent({__name:"extendItem",props:["data","size"],emits:["click"],setup(e){const n=e,o=t.ref(n.size.right),a=t.ref(n.size.top),r=t.inject("stateSetting",{});t.onBeforeUnmount(()=>{Uo.value=""});function i(c){var f,m;o.value=((m=(f=document.querySelector(".context-box"))==null?void 0:f.getBoundingClientRect())==null?void 0:m.right)||n.size.right;const d=c.target;a.value=n.size.top+d.offsetTop,n.data.children&&n.data.children.length?Uo.value=n.data.label:Uo.value=""}function l(c){const d={[ve.COLLECT]:()=>y._.set(y._.find(r.indicator,{field_key:n.data.data.field_key}),"field_way",c.value),[ve.CALC]:()=>y._.set(y._.find(r.indicator,{field_key:n.data.data.field_key}),"field_proportion",c.value),[ve.SORT]:()=>{y._.set(y._.find(r.columns,{field_key:n.data.data.field_key}),"report_field_sort",c.value),y._.set(y._.find(r.indicator,{field_key:n.data.data.field_key}),"report_field_sort",c.value)},[ve.STATISTICS]:()=>y._.set(y._.find(r.columns,{field_key:n.data.data.field_key}),"report_field_group",c.value),[ve.SUM]:()=>{y._.set(y._.find(r.columns,{field_key:n.data.data.field_key}),"report_field_sum",c.value),y._.set(y._.find(r.indicator,{field_key:n.data.data.field_key}),"report_field_sum",c.value)},[ve.SHOW]:()=>{y._.set(y._.find(r.columns,{field_key:n.data.data.field_key}),"report_field_show",c.value),y._.set(y._.find(r.indicator,{field_key:n.data.data.field_key}),"report_field_show",c.value)}};y._.get(d,n.data.value)&&(y._.get(d,n.data.value)(),t.nextTick(()=>{var f,m;o.value=((m=(f=document.querySelector(".context-box"))==null?void 0:f.getBoundingClientRect())==null?void 0:m.right)||n.size.right}))}function u(c){switch(n.data.value){case ve.COLLECT:return n.data.data.field_way===c.value;case ve.CALC:return n.data.data.field_proportion===c.value;case ve.SORT:return n.data.data.report_field_sort===c.value;case ve.SUM:return n.data.data.report_field_sum===c.value;case ve.SHOW:return n.data.data.report_field_show===c.value;case ve.STATISTICS:return n.data.data.report_field_group===c.value}}function s(){var c,d,f,m,h,_;switch(n.data.value){case ve.COLLECT:return((c=y._.find(Dc,{value:n.data.data.field_way}))==null?void 0:c.label)||"";case ve.CALC:return((d=y._.find(Ic,{value:n.data.data.field_proportion}))==null?void 0:d.label)||"";case ve.SORT:return((f=y._.find(jr,{value:n.data.data.report_field_sort}))==null?void 0:f.label)||"";case ve.POINT:return n.data.data.report_field_point||"";case ve.SUM:return((m=y._.find(Ur,{value:n.data.data.report_field_sum}))==null?void 0:m.label)||"";case ve.SHOW:return((h=y._.find(Hr,{value:n.data.data.report_field_show}))==null?void 0:h.label)||"";case ve.STATISTICS:return((_=y._.find(Bc,{value:n.data.data.report_field_group}))==null?void 0:_.label)||"";default:return""}}return(c,d)=>{const f=t.resolveComponent("bc-icon");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:"extend-content",onMouseenter:i,onClick:d[0]||(d[0]=m=>c.$emit("click"))},[t.createElementVNode("span",c0,[t.createTextVNode(t.toDisplayString(e.data.label)+" ",1),s()?(t.openBlock(),t.createElementBlock("span",u0,"("+t.toDisplayString(s())+")",1)):t.createCommentVNode("",!0)]),e.data.children&&e.data.children.length?(t.openBlock(),t.createBlock(f,{key:0,name:"ele-ArrowRight"})):t.createCommentVNode("",!0)],32),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.unref(Uo)===e.data.label?(t.openBlock(),t.createElementBlock("div",{key:0,class:"context-wrap__content",style:t.normalizeStyle({left:`${o.value}px`,top:`${a.value}px`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data.children,(m,h)=>(t.openBlock(),t.createElementBlock("div",{class:"content__item",key:h,onClick:_=>l(m)},[t.createElementVNode("span",null,t.toDisplayString(m.label),1),u(m)?(t.openBlock(),t.createBlock(f,{key:0,name:"ele-Check",color:"#409eff"})):t.createCommentVNode("",!0)],8,d0))),128))],4)):t.createCommentVNode("",!0)]))],64)}}}),m0=P._export_sfc(f0,[["__scopeId","data-v-22544e98"]]),h0={class:"source-column-cell"},p0={class:"column-title"},_0=["data-column"],g0={class:"tip-icon"},v0=["onClick"],y0=t.defineComponent({__name:"dragItem",props:t.mergeModels({tip:{type:String,default:"标题"},title:{type:String,default:"field_name"},field:{type:String,default:"field_key"},type:{type:String,default:"columns"}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=e,o=t.useModel(e,"modelValue"),a=t.computed({get:()=>o.value,set(u){o.value=u.map((s,c)=>({...s,data_sort:c}))}});function r(u){const s=o.value.findIndex(c=>y._.get(c,n.field)===u);o.value.splice(s,1)}function i(u,s){var c;u.value===ve.EDIT_NAME&&o0({name:y._.get(u,`data.${n.title}`),field:y._.get(u,`data.${n.field}`),show_name:y._.get(u,"data.show_name","")}).then(d=>{d!=="cancel"&&(y._.set(y._.find(o.value,{field_key:u.data.field_key}),"show_name",d),s())}),u.value===ve.POINT&&A.ElMessageBox.prompt("请填写小数位数","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^\d+$/,inputErrorMessage:"请输入数字",draggable:!0,inputValue:(c=y._.find(o.value,{field_key:u.data.field_key}))==null?void 0:c.report_field_point,customClass:"context-wrap__content"}).then(({value:d})=>{y._.set(y._.find(o.value,{field_key:u.data.field_key}),"report_field_point",d)})}function l(u){const s={columns:i0,querys:l0,indicator:s0};return n.type==="columns"&&u.query_type!==$e.NUMBER?y._.get(s,n.type,[]).filter(c=>c.value!==ve.POINT).map(c=>Object.assign(c,{data:u})):y._.get(s,n.type,[]).map(c=>Object.assign(c,{data:u}))}return(u,s)=>{const c=t.resolveComponent("el-empty"),d=t.resolveComponent("bc-icon"),f=t.resolveComponent("bc-context-box");return t.openBlock(),t.createElementBlock("div",h0,[t.createElementVNode("p",p0,t.toDisplayString(e.tip),1),t.createElementVNode("div",{class:"column-cell","data-column":e.type},[a.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:0,"image-size":50})),t.createVNode(t.unref(P.to),{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=m=>a.value=m),animation:300,class:"field-column-wrap"},{default:t.withCtx(()=>[t.createVNode(t.TransitionGroup,{type:"transition",name:"fade"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,m=>(t.openBlock(),t.createBlock(f,{getMenu:()=>l(m),key:t.unref(y._).get(m,n.field),trigger:"click",class:"field-column-item"},{content:t.withCtx(({data:h,size:_,close:g})=>[t.createVNode(m0,{data:h,size:_,onClick:p=>i(h,g)},null,8,["data","size","onClick"])]),default:t.withCtx(()=>[t.createElementVNode("span",g0,t.toDisplayString(t.unref(xc)(m.query_type)),1),t.createElementVNode("span",null,t.toDisplayString(t.unref(y._).get(m,"show_name")||t.unref(y._).get(m,n.title)),1),t.createElementVNode("div",{class:"icon-delete",onClick:t.withModifiers(h=>r(t.unref(y._).get(m,n.field)),["stop"])},[t.createVNode(d,{name:"ele-Delete"})],8,v0)]),_:2},1032,["getMenu"]))),128))]),_:1})]),_:1},8,["modelValue"])],8,_0)])}}}),Ho=P._export_sfc(y0,[["__scopeId","data-v-1d3a2b44"]]);function b0(){const e=t.inject("stateSetting"),n=t.ref("");function o(u){const s=u.target;n.value=(s==null?void 0:s.getAttribute("data-field"))||""}function a(u){const s=u.target.closest(".column-cell");s&&setTimeout(()=>{s.classList.add("drag-enter")})}function r(u){const s=u.target.closest(".column-cell");s&&s.classList.remove("drag-enter")}function i(u){u.preventDefault()}function l(u){var f,m;if(!n.value)return;const s=u.target.closest(".column-cell");if(!s)return;s.classList.remove("drag-enter");const c=s.getAttribute("data-column"),d=y._.cloneDeep(y._.find(e.sourceFields,{field_key:n.value}));if(y._.find(y._.get(e,c),{id:d.id}))return A.ElMessage.warning("该字段已存在");if(c==="columns"&&y._.find(y._.get(e,"indicator"),{id:d.id}))return A.ElMessage.warning("列字段/指标已存在该字段");if(c==="indicator"&&y._.find(y._.get(e,"columns"),{id:d.id}))return A.ElMessage.warning("列字段/维度已存在该字段");if(c==="indicator"&&d.query_type!==$e.NUMBER)return A.ElMessage.warning("只有数值型字段允许拖入指标列中!");c==="columns"&&(d.field_data_type=kt.WEI_DU,d.report_field_sort=Gn.NONE,d.report_field_show=nn.SHOW,d.report_field_group=ma.NONE,d.query_type===$e.NUMBER&&(d.report_field_point=2),d.report_field_sum=no.NONE),c==="indicator"&&(d.field_way=zt.NONE,d.field_data_type=kt.ZHI_BIAO,d.field_proportion=fa.NONE,d.report_field_sort=Gn.NONE,d.report_field_point=2,d.report_field_sum=no.NONE,d.report_field_show=nn.SHOW),c==="drills"&&(d.field_data_type=kt.Z_WEI_DU,d.report_field_show=nn.SHOW),c==="querys"&&(d.field_data_type=kt.SHAI_XUAN,d.report_field_show=nn.SHOW),(f=y._.get(e,c))==null||f.push(d),(m=y._.get(e,c))==null||m.forEach((h,_)=>{h.data_sort=_}),n.value=""}return{fieldItem:n,onDragstart:o,onDragenter:a,onDragleave:r,onDragover:i,onDrop:l}}const w0={class:"node-tree"},k0={class:"node"},C0={key:0,class:"text"},E0={key:1,class:"btns-setting"},S0=t.defineComponent({__name:"nodeTree",props:t.mergeModels({parent:{type:Object,default:()=>({})}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),o=t.inject("addNode"),a=t.inject("addCondition");return(r,i)=>{const l=t.resolveComponent("el-dropdown-item"),u=t.resolveComponent("el-dropdown-menu"),s=t.resolveComponent("el-dropdown"),c=t.resolveComponent("hs-button");return t.openBlock(),t.createElementBlock("div",w0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(d,f)=>(t.openBlock(),t.createElementBlock("div",{key:f,class:"node-tree-content"},[t.createElementVNode("div",{class:t.normalizeClass(["node-tree-item",`level-${d.level}`,{add:d.type!=="add"}])},[d.type==="add"?(t.openBlock(),t.createBlock(s,{key:0},{dropdown:t.withCtx(()=>[t.createVNode(u,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(Nc),m=>(t.openBlock(),t.createBlock(l,{key:m.value,onClick:t.withModifiers(h=>d.relation=m.value,["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:t.withCtx(()=>[t.createElementVNode("span",k0,t.toDisplayString(d.relation),1)]),_:2},1024)):t.createCommentVNode("",!0)],2),d.type==="add"?(t.openBlock(),t.createElementBlock("span",C0,t.toDisplayString(d.nodeName),1)):t.createCommentVNode("",!0),d.children&&d.children.length==0?(t.openBlock(),t.createElementBlock("div",E0,[d.btnType.includes("addCondition")?(t.openBlock(),t.createBlock(c,{key:0,plain:"",type:"primary",size:"small",onClick:t.withModifiers(m=>t.unref(a)(d),["stop"])},{default:t.withCtx(()=>[...i[1]||(i[1]=[t.createTextVNode("添加条件",-1)])]),_:1},8,["onClick"])):t.createCommentVNode("",!0),d.btnType.includes("addNode")?(t.openBlock(),t.createBlock(c,{key:1,plain:"",type:"primary",size:"small",onClick:i[0]||(i[0]=t.withModifiers(m=>t.unref(o)(e.parent),["stop"]))},{default:t.withCtx(()=>[...i[2]||(i[2]=[t.createTextVNode("添加关系",-1)])]),_:1})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.unref(y._).isEmpty(d.children)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock($c,{key:2,class:"node-tree-children",modelValue:d.children,"onUpdate:modelValue":m=>d.children=m,parent:d},null,8,["modelValue","onUpdate:modelValue","parent"]))]))),128))])}}}),$c=P._export_sfc(S0,[["__scopeId","data-v-44c01cd5"]]),x0=t.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:n}){const o=e,a=n,r=t.computed({get:()=>i(o.modelValue),set:c=>{a("update:modelValue",c)}});function i(c){const d=(f,m=1)=>{for(let h of f)h.level=m,h.children&&h.children.length&&d(h.children,m+1)};return d(c),c}function l(c){const d=[];function f(m,h=[]){return m.reduce((_,g)=>(_.push(g),g!=null&&g.children&&g.children.length&&_.push(...f(g.children)),_),h)}return f(c,d),d}function u(c){const f=l(r.value).find(g=>g.nodeId==c.nodeId);if(!f)return;const m=f.children.length,h=P.v4(),_=y._.cloneDeep(f.children);_.splice(m-1,0,{nodeName:"",pId:f.nodeId,nodeId:h,type:"add",btnType:["addCondition","addNode"],relation:Mn.AND,children:[{nodeName:"",pId:h,nodeId:P.v4(),btnType:["addCondition","addNode"],relation:Mn.AND,children:[]}]}),_.length>1&&y._.get(_,"0.children.0.btnType")&&y._.set(_,"0.children.0.btnType",["addCondition"]),f.children=_}function s(c){const f=l(r.value).find(m=>m.nodeId==c.pId);F0(c).then(m=>{f!=null&&f.children&&(f==null?void 0:f.children.length)===1?Object.assign(f,m,{btnType:[],type:"add",children:[]}):Object.assign(c,m,{btnType:[],type:"add",children:[]})})}return t.provide("addNode",u),t.provide("addCondition",s),(c,d)=>(t.openBlock(),t.createBlock($c,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f)},null,8,["modelValue"]))}}),D0=P._export_sfc(x0,[["__scopeId","data-v-140b89c8"]]),I0={class:"sql-wraper"},B0={class:"content"},N0={class:"footer"},$0=t.defineComponent({__name:"popup",props:{sql:{type:String},close:{type:Function}},setup(e){const n=e,o=P.v4(),a=t.ref([{nodeName:"",pId:"",nodeId:o,type:"add",relation:Mn.AND,btnType:["addCondition","addNode"],children:[{nodeName:"",pId:o,nodeId:P.v4(),relation:Mn.AND,btnType:["addCondition","addNode"],children:[]}]}]);function r(){let i="";const l=u=>{for(let s of u)s.type==="add"&&s.nodeName&&(i+=`${s.relation} ${s.nodeName} `),s.children&&s.children.length&&l(s.children)};l(a.value),n.close(i)}return(i,l)=>{const u=t.resolveComponent("el-button"),s=t.resolveComponent("bc-button");return t.openBlock(),t.createElementBlock("div",I0,[t.createElementVNode("div",B0,[t.createVNode(t.unref(D0),{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},null,8,["modelValue"])]),t.createElementVNode("footer",N0,[t.createVNode(u,{size:"default",onClick:l[1]||(l[1]=c=>e.close("cancel"))},{default:t.withCtx(()=>[...l[2]||(l[2]=[t.createTextVNode("关闭",-1)])]),_:1}),t.createVNode(s,{type:"primary",size:"default",onClick:r},{default:t.withCtx(()=>[...l[3]||(l[3]=[t.createTextVNode("确定",-1)])]),_:1})])])}}}),V0=P._export_sfc($0,[["__scopeId","data-v-519bd5a5"]]),T0={class:"sql-wraper"},R0={class:"content"},A0={class:"item"},L0={class:"node"},M0={class:"param-item"},O0={class:"footer"},q0=t.defineComponent({__name:"addCondition",props:{condition:{type:Object,default:()=>({})},close:{type:Function}},setup(e){const n=e,o=t.ref(n.condition);function a(){n.close(o.value)}return(r,i)=>{const l=t.resolveComponent("el-dropdown-item"),u=t.resolveComponent("el-dropdown-menu"),s=t.resolveComponent("el-dropdown"),c=t.resolveComponent("el-input"),d=t.resolveComponent("el-button"),f=t.resolveComponent("bc-button");return t.openBlock(),t.createElementBlock("div",T0,[t.createElementVNode("div",R0,[t.createElementVNode("div",A0,[t.createVNode(s,null,{dropdown:t.withCtx(()=>[t.createVNode(u,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(Nc),m=>(t.openBlock(),t.createBlock(l,{key:m.value,onClick:t.withModifiers(h=>o.value.relation=m.value,["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.label),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",L0,t.toDisplayString(o.value.relation),1)]),_:1}),t.createElementVNode("div",M0,[i[2]||(i[2]=t.createElementVNode("span",{class:"show-name"},"固定值",-1)),t.createVNode(c,{modelValue:o.value.nodeName,"onUpdate:modelValue":i[0]||(i[0]=m=>o.value.nodeName=m),size:"default",clearable:"",placeholder:"请输入"},null,8,["modelValue"])])])]),t.createElementVNode("footer",O0,[t.createVNode(d,{size:"default",onClick:i[1]||(i[1]=m=>e.close("cancel"))},{default:t.withCtx(()=>[...i[3]||(i[3]=[t.createTextVNode("关闭",-1)])]),_:1}),t.createVNode(f,{type:"primary",size:"default",onClick:a},{default:t.withCtx(()=>[...i[4]||(i[4]=[t.createTextVNode("确定",-1)])]),_:1})])])}}}),z0=P._export_sfc(q0,[["__scopeId","data-v-dc17852a"]]);function P0(e){return new Promise(n=>{fn(V0,{sql:e},{title:"添加过滤",success:({data:o})=>n(o),showFooter:!1})})}function F0(e){return new Promise(n=>{fn(z0,{condition:e},{title:"添加条件",width:500,height:300,success:({data:o})=>n(o),showFooter:!1})})}const j0={class:"source-wraper__left"},U0=["data-field"],H0={class:"tip-icon"},W0={class:"source-wraper__right"},K0={key:4,class:"filtrate-cell"},Z0={class:"source-btn"},J0=t.defineComponent({__name:"setting",setup(e){const n=t.inject("refreshTable"),o=t.inject("getReportFields"),a=t.inject("stateSetting",{}),r=t.reactive({value:Ft.COLUMN,list:r0}),{onDragstart:i,onDragenter:l,onDragleave:u,onDragover:s,onDrop:c}=b0();function d(){P0().then(f=>{f!=="cancel"&&(a.sql=f)})}return(f,m)=>{const h=t.resolveComponent("el-option"),_=t.resolveComponent("el-select"),g=t.resolveComponent("el-empty"),p=t.resolveComponent("el-scrollbar"),v=t.resolveComponent("el-segmented"),w=t.resolveComponent("bc-button");return t.openBlock(),t.createElementBlock("div",{class:"source-wraper",onDragstart:m[6]||(m[6]=(...b)=>t.unref(i)&&t.unref(i)(...b)),onDragover:m[7]||(m[7]=(...b)=>t.unref(s)&&t.unref(s)(...b)),onDragenter:m[8]||(m[8]=(...b)=>t.unref(l)&&t.unref(l)(...b)),onDragleave:m[9]||(m[9]=(...b)=>t.unref(u)&&t.unref(u)(...b)),onDrop:m[10]||(m[10]=(...b)=>t.unref(c)&&t.unref(c)(...b))},[t.createElementVNode("div",j0,[t.createVNode(_,{modelValue:t.unref(a).sourceData,"onUpdate:modelValue":m[0]||(m[0]=b=>t.unref(a).sourceData=b),filterable:"",placeholder:"请选择数据集",size:"default",onChange:t.unref(o)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a).sourceList,b=>(t.openBlock(),t.createBlock(h,{key:b.field_key,label:b.field_name,value:b.field_key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),t.createVNode(p,{class:"flex-1"},{default:t.withCtx(()=>[t.unref(a).sourceFields.length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(g,{key:0})),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a).sourceFields,b=>(t.openBlock(),t.createElementBlock("div",{key:b.field_key,"data-field":b.field_key,draggable:"true",class:"field-item"},[t.createElementVNode("span",H0,t.toDisplayString(t.unref(xc)(b.query_type)),1),t.createElementVNode("span",null,t.toDisplayString(b.field_name),1)],8,U0))),128))]),_:1})]),t.createElementVNode("div",W0,[t.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":m[1]||(m[1]=b=>r.value=b),options:r.list,size:"default"},null,8,["modelValue","options"]),t.createVNode(p,{class:"source-section"},{default:t.withCtx(()=>[r.value===t.unref(Ft).COLUMN?(t.openBlock(),t.createBlock(Ho,{key:0,tip:"列字段 / 维度",title:"field_name",field:"field_key",type:"columns",modelValue:t.unref(a).columns,"onUpdate:modelValue":m[2]||(m[2]=b=>t.unref(a).columns=b)},null,8,["modelValue"])):t.createCommentVNode("",!0),r.value===t.unref(Ft).COLUMN?(t.openBlock(),t.createBlock(Ho,{key:1,tip:"列字段 / 指标",title:"field_name",field:"field_key",type:"indicator",modelValue:t.unref(a).indicator,"onUpdate:modelValue":m[3]||(m[3]=b=>t.unref(a).indicator=b)},null,8,["modelValue"])):t.createCommentVNode("",!0),r.value===t.unref(Ft).FILTER?(t.openBlock(),t.createBlock(Ho,{key:2,tip:"列字段 / 检索",title:"field_name",field:"field_key",type:"querys",modelValue:t.unref(a).querys,"onUpdate:modelValue":m[4]||(m[4]=b=>t.unref(a).querys=b)},null,8,["modelValue"])):t.createCommentVNode("",!0),r.value===t.unref(Ft).FILTER?(t.openBlock(),t.createBlock(Ho,{key:3,tip:"列字段 / 钻取",title:"field_name",field:"field_key",type:"drills",modelValue:t.unref(a).drills,"onUpdate:modelValue":m[5]||(m[5]=b=>t.unref(a).drills=b)},null,8,["modelValue"])):t.createCommentVNode("",!0),r.value===t.unref(Ft).FILTER?(t.openBlock(),t.createElementBlock("div",K0,[m[11]||(m[11]=t.createElementVNode("p",{class:"filtrate-cell__title"},"筛选配置",-1)),t.createElementVNode("div",{class:"filtrate-cell__content"},[t.createElementVNode("div",{class:"filtrate-cell__content--item",onClick:d},"自定义筛选配置")])])):t.createCommentVNode("",!0)]),_:1}),t.createElementVNode("div",Z0,[t.createVNode(w,{type:"primary",size:"default",onClick:t.unref(n)},{default:t.withCtx(()=>[...m[12]||(m[12]=[t.createTextVNode("保存配置",-1)])]),_:1},8,["onClick"])])])],32)}}}),G0=P._export_sfc(J0,[["__scopeId","data-v-4457f1dd"]]),Q0={class:"table-wrapter"},Y0=t.defineComponent({__name:"table",setup(e,{expose:n}){const o=t.inject("stateTable"),a=t.inject("stateSetting"),r=t.shallowRef();function i(s){var d,f;const c=((f=(d=t.toValue(o))==null?void 0:d.form)==null?void 0:f.formData)||{};Object.keys(c).reduce((m,h)=>{if(h.startsWith("_")){const[_]=h.split("|");Number(_.slice(1))===$e.DATE&&(m[h]=c[h])}return m},{id:c.id}),s.setQueryData(c,!0),r.value=s}function l(s){console.log(s),console.log("钻取列数据",a==null?void 0:a.drills)}function u(){var s;(s=r.value)==null||s.search()}return n({search:u}),(s,c)=>{const d=t.resolveComponent("bc-table");return t.openBlock(),t.createElementBlock("div",Q0,[t.createVNode(d,{isStatic:!1,data:t.unref(o),onReady:i,onCellClick:l},null,8,["data"])])}}}),X0=P._export_sfc(Y0,[["__scopeId","data-v-c07c0dde"]]);function on({name:e,key:n,btnIcon:o="ele-Search"}){return{id:P.v4(),data:{name:e,key:n,btnIcon:o,isApply:!0,isSlot:!1,isShow:!0,size:"default",type:"primary","loading-icon":"Loading",fieldShow:!0,userFieldShow:!0},sort:1}}function ey(){return[{id:P.v4(),data:{field:"type_checkbox",isSlot:!1,isApply:!0,isShow:!0,returnValueType:"string",width:50,minWidth:50,visible:!0,type:"checkbox",fieldShow:!0,userFieldShow:!0,fixed:"left"},btnData:[],sort:0},{id:P.v4(),data:{field:"type_seq",isSlot:!1,isApply:!0,isShow:!0,returnValueType:"string",width:50,minWidth:50,visible:!0,type:"seq",fieldShow:!0,userFieldShow:!0,fixed:"left"},btnData:[],sort:0}]}function ty({field_key:e,field_name:n,width:o,minWidth:a,query_type:r,report_field_sum:i,report_field_show:l},u){return{id:P.v4(),data:{field:e,title:y._.get(u,`${e}.title`,n),width:y._.get(u,`${e}.width`,o),minWidth:a||n.length*14+40,isSlot:!1,isApply:!0,isShow:l==nn.SHOW,returnValueType:"string",resizable:!0,visible:!0,sortable:!0,fieldShow:!0,userFieldShow:y._.get(u,`${e}.userFieldShow`)??!0,fieldExport:!0,formatAmount:r===$e.NUMBER,formatter:"functionBody=function({row,column}){return row[`${column.field}_name`] || row[column.field]}"},btnData:[],sort:y._.get(u,`${e}.sort`,0),children:[]}}function Vc(e,n,o){return{id:`table_${e}`,baseData:{method:"get",proxy:o.project_code+"-web",requestUrl:o.url||"/pri/report_set/get_list_page_data_info",tableName:"表格配置名称",id:`table_${e}`,config_unique_id:e,isClosedKeyStroke:!1,isCloseInitData:!0,is_apply_page:!0,table_page_data:{currentPage:1,pageSize:20,total:0,pagerCount:7,pageSizes:[10,15,20,50,100]},border:"full",size:"small",stripe:!0,showOverflow:"tooltip",showFooter:n.filter(r=>r.report_field_sum===no.SUM).length>0,isRemoteTotal:!0,scrollX:{enabled:!0,gt:0},scrollY:{enabled:!0,gt:0},rowConfig:{isCurrent:!0,isHover:!0},sortConfig:{multiple:!1,chronological:!1,remote:!0,showIcon:!0}},tableConfig:[...ey(),...n.map(r=>ty(r,y._.get(o,`canche.table_${e}`)))],tableData:[],isStatic:!1}}function ny(e,n){var a,r,i,l,u,s;const o=`_${e.query_type}|${e.field_key}|${e.field_code}`;return{data:{baseData:{label:((r=(a=n==null?void 0:n.canche)==null?void 0:a[o])==null?void 0:r.label)||e.field_name,prop:o,el:"hs-input",isSlot:!1,isApply:!0,isShow:!0,fieldShow:!0,userFieldShow:((l=(i=n==null?void 0:n.canche)==null?void 0:i[o])==null?void 0:l.userFieldShow)||!0},elData:{attrs:{size:"default",type:"text",clearable:!0,placeholder:"请输入"}}},id:P.v4(),sort:((s=(u=n==null?void 0:n.canche)==null?void 0:u[o])==null?void 0:s.sort)||0}}function tr(e,n,o){var r,i,l,u,s,c;const a=`_${e.query_type}|${e.field_key}_${o}|${e.field_code}`;return{data:{baseData:{label:((i=(r=n==null?void 0:n.canche)==null?void 0:r[a])==null?void 0:i.label)||e.field_name,prop:a,el:"bc-input-group",isSlot:!1,isApply:!0,isShow:!0,fieldShow:!0,userFieldShow:((u=(l=n==null?void 0:n.canche)==null?void 0:l[a])==null?void 0:u.userFieldShow)||!0,positionInGroup:o,groupMark:`_${e.query_type}|${e.field_key}`},elData:{attrs:{size:"default",type:"number",clearable:!0,"start-placeholder":"请输入","end-placeholder":"请输入"}}},id:P.v4(),sort:((c=(s=n==null?void 0:n.canche)==null?void 0:s[a])==null?void 0:c.sort)||0}}function $l(e,n){var r,i,l,u,s,c;const o=`_${e.query_type}|${e.field_key}|${e.field_code}`,a={data:{baseData:{label:((i=(r=n==null?void 0:n.canche)==null?void 0:r[o])==null?void 0:i.label)||e.field_name,prop:o,el:"hs-select",isSlot:!1,isApply:!0,isShow:!0,fieldShow:!0,userFieldShow:((u=(l=n==null?void 0:n.canche)==null?void 0:l[o])==null?void 0:u.userFieldShow)||!0},elData:{attrs:{size:"default",clearable:!0,filterable:!0,placeholder:"请选择",multiple:!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,options:[],method:"get",params:"",proxy:`${n==null?void 0:n.project_code}-web`,url:""},groupAttrs:{disabled:!1,isGroupEnabled:!1},optionAttrs:{value:"code",label:"name",disabled:!1}},field_id:P.v4()},id:P.v4(),sort:((c=(s=n==null?void 0:n.canche)==null?void 0:s[o])==null?void 0:c.sort)||0};return $e.SELECT_R===e.query_type&&(a.data.elData.attrs.multiple=!1),$e.SELECT_M===e.query_type&&(a.data.elData.attrs.multiple=!0),Wt.FIXED===e.query_way&&(a.data.elData.attrs.options=new Function("return "+e.query_data||"[]")()),Wt.API===e.query_way&&(a.data.elData.attrs.url=e.query_api,a.data.elData.attrs.params=`{sys_id: '${n==null?void 0:n.sysId}'}`),Wt.DICT_CODE===e.query_way&&(a.data.elData.optionAttrs.value="code",a.data.elData.attrs.url=e.query_api,a.data.elData.attrs.params=`{sys_id: '${n==null?void 0:n.sysId}',dictCode: '${e.query_data}'}`),Wt.DICT_NAME===e.query_way&&(a.data.elData.optionAttrs.value="name",a.data.elData.attrs.url=e.query_api,a.data.elData.attrs.params=`{sys_id: '${n==null?void 0:n.sysId}',dictCode: '${e.query_data}'}`),a}function oy(e,n){var r,i,l,u,s,c;const o=`_${e.query_type}|${e.field_key}|${e.field_code}`,a={data:{baseData:{label:((i=(r=n==null?void 0:n.canche)==null?void 0:r[o])==null?void 0:i.label)||e.field_name,prop:o,el:"bc-tree-search",isSlot:!1,isApply:!0,isShow:!0,fieldShow:!0,userFieldShow:((u=(l=n==null?void 0:n.canche)==null?void 0:l[o])==null?void 0:u.userFieldShow)||!0},elData:{attrs:{"empty-text":"暂无数据","highlight-current":!0,"expand-on-click-node":!0,"check-on-click-node":!0,multiple:!0,"show-checkbox":!0,"check-strictly":!0,indent:16,"item-size":32,props:{value:"code",label:"name",children:"child",disabled:!0},data:"string=",placeholder:"请选择",method:"get",url:"",params:"",proxy:`${n==null?void 0:n.project_code}-web`}},field_id:P.v4()},id:P.v4(),sort:((c=(s=n==null?void 0:n.canche)==null?void 0:s[o])==null?void 0:c.sort)||0};return $e.SELECT_R===e.query_type&&(a.data.elData.attrs.multiple=!1),$e.SELECT_M===e.query_type&&(a.data.elData.attrs.multiple=!0),Wt.FIXED===e.query_way&&(a.data.elData.attrs.data=new Function("return "+e.query_data||"[]")()),Wt.API===e.query_way&&(a.data.elData.attrs.url=e.query_api,a.data.elData.attrs.params=`{sys_id: '${n==null?void 0:n.sysId}'}`),Wt.DICT_CODE===e.query_way&&(a.data.elData.attrs.props.value="code",a.data.elData.attrs.url=e.query_api,a.data.elData.attrs.params=`{sys_id: '${n==null?void 0:n.sysId}'}`),Wt.DICT_NAME===e.query_way&&(a.data.elData.attrs.props.value="name",a.data.elData.attrs.url=e.query_api,a.data.elData.attrs.params=`{sys_id: '${n==null?void 0:n.sysId}'}`),a}function nr(e,n,o){var r,i,l,u,s,c;const a=`_${e.query_type}|${e.field_key}_${o}|${e.field_code}`;return{data:{baseData:{label:((i=(r=n==null?void 0:n.canche)==null?void 0:r[a])==null?void 0:i.label)||e.field_name,prop:a,el:"hs-date-picker",isSlot:!1,isApply:!0,isShow:!0,fieldShow:!0,userFieldShow:((u=(l=n==null?void 0:n.canche)==null?void 0:l[a])==null?void 0:u.userFieldShow)||!0,positionInGroup:o,groupMark:`_${e.query_type}|${e.field_key}`},elData:{attrs:{size:"default",clearable:!1,type:"datetimerange","range-separator":"-",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","default-time":"functionBody=(function() {return [new Date(2000, 1, 1, 0, 0, 0),new Date(2000, 1, 1, 23, 59, 59)]})()",shortcuts:"string=[{text:'本周',value:function(){let md=new Date();const day=md.getDay()||7;const start=new Date(md.getFullYear(),md.getMonth(),md.getDate()+1-day);return[start,md]}},{text:'最近一周',value:function(){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*7);return[start,end]}},{text:'本月',value:function(){const startDate=new Date();startDate.setDate(1);const endDate=new Date();return[startDate,endDate]}},{text:'最近一个月',value:function(){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*30);return[start,end]}},{text:'本季度',value:function(){const date=new Date();var month=date.getMonth();if(month<3){date.setMonth(0)}else if(2<month&&month<6){date.setMonth(3)}else if(5<month&&month<9){date.setMonth(6)}else if(8<month&&month<11){date.setMonth(9)}date.setDate(1);return[date,new Date()]}},{text:'本年',value:function(){const start=new Date();start.setMonth(0);start.setDate(1);return[start,new Date()]}}]","start-placeholder":"开始时间","end-placeholder":"结束时间"},rules:{required:!1}}},id:P.v4(),sort:((c=(s=n==null?void 0:n.canche)==null?void 0:s[a])==null?void 0:c.sort)||0}}function Tc(e,n){const o={[$e.TEXT]:ny,[$e.NUMBER]:tr,[$e.DATE]:nr,[$e.SELECT_R]:$l,[$e.SELECT_M]:$l,[$e.SELECT_T]:oy},a=e.map(u=>u.query_type===$e.DATE?[nr(u,n,"begin"),nr(u,n,"end")]:u.query_type===$e.NUMBER?[tr(u,n,"begin"),tr(u,n,"end")]:y._.get(o,u.query_type)(u,n)).flat(1);let r={},i={};const l=a.reduce((u,s)=>{if(s.data.baseData.groupMark&&["hs-date-picker"].includes(s.data.baseData.el)){const c="custome_field_"+s.data.baseData.groupMark;r[c]||(r[c]=[]),r[c].push(s.data.baseData.prop)}if(s.data.baseData.groupMark&&["bc-input-group"].includes(s.data.baseData.el)){const c="custome_field_"+s.data.baseData.groupMark;i[c]||(i[c]=[]),i[c].push(s.data.baseData.prop)}else{const c=s.data.baseData.prop;u[c]=""}return u},{id:n.reportId});return r=Object.keys(r).reduce((u,s)=>{const[c,d]=r[s];return u[s]=r[s],u[c]=P.hooks$1().format("YYYY-MM-DD")+" 00:00:00",u[d]=P.hooks$1().format("YYYY-MM-DD")+" 23:59:59",u},{}),i=Object.keys(i).reduce((u,s)=>{const[c,d]=i[s];return u[s]=i[s],u[c]="",u[d]="",u},{}),{id:`query_${n.reportId}`,baseData:{labelWidth:"80",size:"default",labelPosition:"left",requireAsteriskPosition:"left",showMessage:!0,inlineMessage:!1,validateOnRuleChange:!0,isSetDictDefaultValue:!0,isSupportShortcutKey:!0},formConfig:a,formData:Object.assign(l,r,i)}}async function ay({querys:e,columns:n,options:o}){var d;const a=await ce.get("userInfo"),r=o.project_code||a.project_code,i=((d=ke())==null?void 0:d.mid)||o.reportId,l=o.reportId,u=[on({name:"查询",key:"search",btnIcon:"ele-Search"}),on({name:"重置",key:"reset",btnIcon:"ele-RefreshLeft"}),on({name:"导出选中",key:"exportSelectedData",btnIcon:"ele-Check"}),on({name:"导出全部",key:"exportAllData",btnIcon:"ele-Download"})],s=await Te({mid:i,id:l}).then(f=>{var _,g,p,v,w;const m=((p=(g=(_=f==null?void 0:f.table)==null?void 0:_.form)==null?void 0:g.formConfig)==null?void 0:p.reduce((b,C)=>(b[C.data.baseData.prop]={label:C.data.baseData.label,userFieldShow:C.data.baseData.userFieldShow,sort:C.sort},b),{}))||{},h=((w=(v=f==null?void 0:f.table)==null?void 0:v.tables)==null?void 0:w.reduce((b,C)=>{var I;return b[C.id]=((I=C==null?void 0:C.tableConfig)==null?void 0:I.reduce((E,k)=>(E[k.data.field]={title:k.data.title,width:k.data.width,userFieldShow:k.data.userFieldShow,sort:k.sort},E),{}))||{},b},{}))||{};return{query:m,table:h}}),c={btns:u,form:Tc(e,{...o,project_code:r,canche:s.query}),tables:[Vc(l,n,{...o,project_code:r,canche:s.table})],mid:i,project_code:r,config_unique_id:l,config_type:"1",config_name:y._.get(n,"0.report_name","报表统计"),is_auth:"1",config_version:1};return dn.value[l]=!0,$s({id:l,mid:i,projectCode:r},c).then(f=>(Ae({mid:i,id:l},y._.cloneDeep({table:c})),f))}async function ry({querys:e,columns:n,options:o}){var f;const a=await ce.get("userInfo"),r=o.project_code||a.project_code,i=((f=ke())==null?void 0:f.mid)||o.reportId,l=o.reportId,u=[on({name:"查询",key:"search",btnIcon:"ele-Search"}),on({name:"重置",key:"reset",btnIcon:"ele-RefreshLeft"}),on({name:"导出选中",key:"exportSelectedData",btnIcon:"ele-Check"}),on({name:"导出全部",key:"exportAllData",btnIcon:"ele-Download"})],s=Tc(e,{...o,project_code:r});s.formConfig.forEach((m,h)=>{m.sort=h});const c=Vc(l,n,{...o,project_code:r});c.tableConfig.forEach((m,h)=>{m.sort=h});const d={btns:u,form:s,tables:[c],mid:i,project_code:r,config_unique_id:l,config_type:"1",config_name:y._.get(n,"0.report_name","报表统计"),is_auth:"1",config_version:1};return dn.value[l]=!0,d}const iy={key:0,class:"contain-left"},ly={class:"contain-wraper"},sy=t.defineComponent({__name:"bcVisual",props:{preview:{type:Boolean,default:!1},project_code:{type:String},reportId:{type:String},sysId:{type:String},dataSetId:{type:String},url:{type:String,default:""}},setup(e){const n=e,o=t.shallowRef(),a=t.ref(!1),r=t.ref(),i=t.reactive({querys:[],columns:[],indicator:[],drills:[],sql:"",sourceData:"",sourceList:[],sourceFields:[],isEmpty:!1});t.onBeforeMount(()=>{n.preview||(d(),n.dataSetId&&(i.sourceData=n.dataSetId,f(i.sourceData),m(n.reportId),c(n.reportId)))});const l=t.watch(()=>n.reportId,g=>{n.preview&&(g?(i.isEmpty=!1,c(g)):(i.isEmpty=!0,r.value=void 0))});t.onBeforeUnmount(()=>{l()});async function u(){var N,$,S,x,D;const{querys:g,columns:p,indicator:v,drills:w,sql:b}=i,C=await ce.get("userInfo"),I=n.project_code||C.project_code,E=n.reportId,k=[...g,...p,...v,...w].map(B=>({report_set_id:E,report_set_type:B.field_data_type,report_field_id:B.id,report_field_way:B.field_way,report_field_proportion:B.field_proportion,report_name_show:B.show_name||B.field_name,data_sort:B.data_sort,report_field_sort:B.report_field_sort,report_field_sum:B.report_field_sum,report_field_point:B.report_field_point,report_field_show:B.report_field_show,report_field_group:B.report_field_group}));await Ae({mid:(N=ke())==null?void 0:N.mid,id:n.reportId},{}),await Ae({mid:($=ke())==null?void 0:$.mid,id:n.reportId},{},`form_query_${n.reportId}`),await Ae({mid:(S=ke())==null?void 0:S.mid,id:n.reportId},{},`table_${n.reportId}`),await le({url:`/${I}-web/pri/v2/field_user/clear_user_field`,method:"post",data:{config_unique_id:n.reportId,menu_id:(x=ke())==null?void 0:x.mid,table_id:`form_query_${n.reportId}`}}),await le({url:`/${I}-web/pri/v2/field_user/clear_user_field`,method:"post",data:{config_unique_id:n.reportId,menu_id:(D=ke())==null?void 0:D.mid,table_id:`table_${n.reportId}`}}),await le({url:`/${I}-web/pri/report_set/save_report_data`,method:"post",data:{id:E,data_set_id:i.sourceData,sql_where_custom:b,data_json:JSON.stringify(k)}}).then(B=>B.code===1?Promise.resolve():Promise.reject()),c()}async function s(g){const p=await ce.get("userInfo"),v=n.project_code||p.project_code,b=(await le({url:`/${v}-web/pri/report_set/get_list_report_config`,method:"get",params:{report_set_id:g}}).then(E=>E.code===1?Promise.resolve(E.data):Promise.reject([])).finally(()=>{a.value=!1})).map(E=>({...E,field_name:E.report_name_show,show_name:E.report_name_show,field_data_type:E.report_set_type})),C=b.filter(E=>E.field_data_type===kt.SHAI_XUAN).sort((E,k)=>E.data_sort-k.data_sort),I=[...b.filter(E=>kt.WEI_DU===E.field_data_type).sort((E,k)=>E.data_sort-k.data_sort),...b.filter(E=>kt.ZHI_BIAO===E.field_data_type).sort((E,k)=>E.data_sort-k.data_sort)];return{querys:C,columns:I}}async function c(g){const p=g||n.reportId;a.value=!0,r.value=void 0;const{querys:v,columns:w}=await s(p);await ay({querys:v,columns:w,options:n}).then(b=>{r.value=b})}async function d(){const g=await ce.get("userInfo"),p=n.project_code||g.project_code;await le({url:`/${p}-web/pri/report_data/get_list_report_data`,method:"get",params:{sys_id:n.sysId}}).then(v=>{i.sourceList=(y._.get(v,"data")||[]).map(w=>({field_name:w.data_set_name,field_key:w.id,query_type:w.data_set_type}))})}async function f(g){const p=await ce.get("userInfo"),v=n.project_code||p.project_code;await le({url:`/${v}-web/pri/report_data/get_list_report_data_field`,method:"get",params:{data_set_id:g}}).then(w=>{if(w.code===1)i.sourceFields=y._.get(w,"data")||[];else return Promise.reject()}).catch(()=>{i.sourceFields=[]})}async function m(g){const p=await ce.get("userInfo"),v=n.project_code||p.project_code;await le({url:`/${v}-web/pri/report_set/get_list_report_set_data`,method:"get",params:{report_set_id:g}}).then(w=>{if(w.code===1){const b=(y._.get(w,"data")||[]).map(C=>({...C,field_name:C.field_name||C.report_name_show,show_name:C.report_name_show,field_proportion:C.report_field_proportion,field_data_type:C.report_set_type,field_way:C.report_field_way,id:C.report_field_id}));i.querys=y._.filter(b,{field_data_type:kt.SHAI_XUAN}).sort((C,I)=>C.data_sort-I.data_sort),i.columns=y._.filter(b,{field_data_type:kt.WEI_DU}).sort((C,I)=>C.data_sort-I.data_sort),i.indicator=y._.filter(b,{field_data_type:kt.ZHI_BIAO}).sort((C,I)=>C.data_sort-I.data_sort),i.drills=y._.filter(b,{field_data_type:kt.Z_WEI_DU}).sort((C,I)=>C.data_sort-I.data_sort)}})}async function h(){var p;r.value=void 0;const g=await Te({mid:(p=ke())==null?void 0:p.mid,id:n.reportId});if(!g)return c().then(()=>{setTimeout(()=>{var v;(v=o.value)==null||v.search()},300)});r.value=g.table}async function _(){const{querys:g,columns:p}=await s(n.reportId);return ry({querys:g,columns:p,options:n})}return t.provide("refreshTable",u),t.provide("getReportList",d),t.provide("getReportFields",f),t.provide("stateTable",r),t.provide("stateSetting",i),t.provide("bcBoxApi",{refreshData:h,getReportBaseConfig:_}),(g,p)=>{const v=t.resolveDirective("loading");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["contain-visual",[{"is-design":!e.preview}]])},[e.preview?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",iy,[t.createVNode(G0)])),t.createElementVNode("div",ly,[i.isEmpty?t.renderSlot(g.$slots,"empty",{key:1},void 0,!0):t.withDirectives((t.openBlock(),t.createBlock(X0,{key:0,ref_key:"visualTableRef",ref:o},null,512)),[[v,a.value]])])],2)}}}),cy=P._export_sfc(sy,[["__scopeId","data-v-cae31cec"]]),uy={BcIcon:ld,BcButton:sd,BcBox:bm,BcRadio:wm,BcCheckbox:km,BcForm:Fm,BcTable:Kh,BcTabs:Xh,BcContextBox:ap,BcSelect:rp,BcTreeSearch:sp,BcTreeSelect:cp,BcAutoComplete:dp,BcGroup:hp,BcInputGroup:gp,BcUpload:Np,BcBreadcrumb:Lp,BcSystemAuth:ag,BcSystemField:Fg,BcTrtc:Mv,BcFace:Pv,BcDivider:Uv,BcSignature:Zv,BcVisual:cy};function dy(e){for(const[n,o]of Object.entries(uy))e.component(n,o)}function fy(e,n){Xe.value=n==null?void 0:n.NEXT_NAME,On.value=n==null?void 0:n.IS_DEV,_a.value=n==null?void 0:n.currentRoute,ga.value=n==null?void 0:n.currentRouter,e.use(rd).use(dy).use(Vl.VxeUIExport).use(ge.VxeTableExport)}exports.ClickOutside=A.ClickOutside;exports.ElAlert=A.ElAlert;exports.ElAnchor=A.ElAnchor;exports.ElAnchorLink=A.ElAnchorLink;exports.ElAside=A.ElAside;exports.ElAutoResizer=A.ElAutoResizer;exports.ElAutocomplete=A.ElAutocomplete;exports.ElAvatar=A.ElAvatar;exports.ElBacktop=A.ElBacktop;exports.ElBadge=A.ElBadge;exports.ElBreadcrumb=A.ElBreadcrumb;exports.ElBreadcrumbItem=A.ElBreadcrumbItem;exports.ElButton=A.ElButton;exports.ElButtonGroup=A.ElButtonGroup;exports.ElCalendar=A.ElCalendar;exports.ElCard=A.ElCard;exports.ElCarousel=A.ElCarousel;exports.ElCarouselItem=A.ElCarouselItem;exports.ElCascader=A.ElCascader;exports.ElCascaderPanel=A.ElCascaderPanel;exports.ElCheckTag=A.ElCheckTag;exports.ElCheckbox=A.ElCheckbox;exports.ElCheckboxButton=A.ElCheckboxButton;exports.ElCheckboxGroup=A.ElCheckboxGroup;exports.ElCol=A.ElCol;exports.ElCollapse=A.ElCollapse;exports.ElCollapseItem=A.ElCollapseItem;exports.ElCollapseTransition=A.ElCollapseTransition;exports.ElColorPicker=A.ElColorPicker;exports.ElConfigProvider=A.ElConfigProvider;exports.ElContainer=A.ElContainer;exports.ElCountdown=A.ElCountdown;exports.ElDatePicker=A.ElDatePicker;exports.ElDescriptions=A.ElDescriptions;exports.ElDescriptionsItem=A.ElDescriptionsItem;exports.ElDialog=A.ElDialog;exports.ElDivider=A.ElDivider;exports.ElDrawer=A.ElDrawer;exports.ElDropdown=A.ElDropdown;exports.ElDropdownItem=A.ElDropdownItem;exports.ElDropdownMenu=A.ElDropdownMenu;exports.ElEmpty=A.ElEmpty;exports.ElFooter=A.ElFooter;exports.ElForm=A.ElForm;exports.ElFormItem=A.ElFormItem;exports.ElHeader=A.ElHeader;exports.ElIcon=A.ElIcon;exports.ElImage=A.ElImage;exports.ElImageViewer=A.ElImageViewer;exports.ElInput=A.ElInput;exports.ElInputNumber=A.ElInputNumber;exports.ElLink=A.ElLink;exports.ElMain=A.ElMain;exports.ElMention=A.ElMention;exports.ElMenu=A.ElMenu;exports.ElMenuItem=A.ElMenuItem;exports.ElMenuItemGroup=A.ElMenuItemGroup;exports.ElMessage=A.ElMessage;exports.ElMessageBox=A.ElMessageBox;exports.ElOption=A.ElOption;exports.ElOptionGroup=A.ElOptionGroup;exports.ElPageHeader=A.ElPageHeader;exports.ElPagination=A.ElPagination;exports.ElPopconfirm=A.ElPopconfirm;exports.ElPopover=A.ElPopover;exports.ElPopper=A.ElPopper;exports.ElProgress=A.ElProgress;exports.ElRadio=A.ElRadio;exports.ElRadioButton=A.ElRadioButton;exports.ElRadioGroup=A.ElRadioGroup;exports.ElRate=A.ElRate;exports.ElResult=A.ElResult;exports.ElRow=A.ElRow;exports.ElScrollbar=A.ElScrollbar;exports.ElSegmented=A.ElSegmented;exports.ElSelect=A.ElSelect;exports.ElSelectV2=A.ElSelectV2;exports.ElSkeleton=A.ElSkeleton;exports.ElSkeletonItem=A.ElSkeletonItem;exports.ElSlider=A.ElSlider;exports.ElSpace=A.ElSpace;exports.ElStatistic=A.ElStatistic;exports.ElStep=A.ElStep;exports.ElSteps=A.ElSteps;exports.ElSubMenu=A.ElSubMenu;exports.ElSwitch=A.ElSwitch;exports.ElTabPane=A.ElTabPane;exports.ElTable=A.ElTable;exports.ElTableColumn=A.ElTableColumn;exports.ElTableV2=A.ElTableV2;exports.ElTabs=A.ElTabs;exports.ElTag=A.ElTag;exports.ElText=A.ElText;exports.ElTimePicker=A.ElTimePicker;exports.ElTimeSelect=A.ElTimeSelect;exports.ElTimeline=A.ElTimeline;exports.ElTimelineItem=A.ElTimelineItem;exports.ElTooltip=A.ElTooltip;exports.ElTour=A.ElTour;exports.ElTourStep=A.ElTourStep;exports.ElTransfer=A.ElTransfer;exports.ElTree=A.ElTree;exports.ElTreeSelect=A.ElTreeSelect;exports.ElTreeV2=A.ElTreeV2;exports.ElUpload=A.ElUpload;exports.ElWatermark=A.ElWatermark;exports.HsConfigProvider=A.ElConfigProvider;exports.HsLoading=A.ElLoading;exports.HsTree=A.ElTree;exports.zhCn=A.zhCn;exports.Colgroup=ge.Colgroup;exports.Column=ge.Column;exports.Grid=ge.Grid;exports.Table=ge.Table;exports.Toolbar=ge.Toolbar;exports.VXETable=ge.VXETable;exports.VxeColgroup=ge.VxeColgroup;exports.VxeColumn=ge.VxeColumn;exports.VxeGrid=ge.VxeGrid;exports.VxeTable=ge.VxeTable;exports.VxeToolbar=ge.VxeToolbar;exports._t=ge._t;exports.clipboard=ge.clipboard;exports.commands=ge.commands;exports.config=ge.config;exports.formats=ge.formats;exports.getConfig=ge.getConfig;exports.getI18n=ge.getI18n;exports.getIcon=ge.getIcon;exports.getTheme=ge.getTheme;exports.globalEvents=ge.globalEvents;exports.globalResize=ge.globalResize;exports.hooks=ge.hooks;exports.install=ge.install;exports.interceptor=ge.interceptor;exports.log=ge.log;exports.menus=ge.menus;exports.modal=ge.modal;exports.print=ge.print;exports.readFile=ge.readFile;exports.renderer=ge.renderer;exports.saveFile=ge.saveFile;exports.setConfig=ge.setConfig;exports.setI18n=ge.setI18n;exports.setIcon=ge.setIcon;exports.setLanguage=ge.setLanguage;exports.setTheme=ge.setTheme;exports.setup=ge.setup;exports.t=ge.t;exports.use=ge.use;exports.validators=ge.validators;exports.version=ge.version;exports.VxeUI=P.VxeUI;exports.Hooxs=xm;exports.HsMessage=Me;exports.HsMessageBox=ya;exports.HsNotification=wr;exports.Utils=jf;exports.configUnidId=Se;exports.getBatchConfig=om;exports.getConfigData=gm;exports.getFormData=aa;exports.getLoadData=oa;exports.isShowItem=mt;exports.mathTool=Rl;exports.resetColumn=Br;exports.showPopupCount=Xn;exports.tableAsyncFun=rt;exports.useHsAdminUi=fy;