@sugarat/easypicker2-client 2.7.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/assets/{data-analysis-CVdTnsNg.js → data-analysis-B61f8OZD.js} +2 -2
  2. package/dist/assets/{data-analysis-CVdTnsNg.js.map → data-analysis-B61f8OZD.js.map} +1 -1
  3. package/dist/assets/{data-analysis-legacy-CrjrJgyN.js → data-analysis-legacy-sXkPNcPD.js} +2 -2
  4. package/dist/assets/{data-analysis-legacy-CrjrJgyN.js.map → data-analysis-legacy-sXkPNcPD.js.map} +1 -1
  5. package/dist/assets/{data-board-CKaKy1IB.js → data-board-BIN3HXKE.js} +2 -2
  6. package/dist/assets/{data-board-CKaKy1IB.js.map → data-board-BIN3HXKE.js.map} +1 -1
  7. package/dist/assets/{data-board-legacy-DfESxuEd.js → data-board-legacy-mqcredpF.js} +2 -2
  8. package/dist/assets/{data-board-legacy-DfESxuEd.js.map → data-board-legacy-mqcredpF.js.map} +1 -1
  9. package/dist/assets/{el-date-picker-cVKa-X4K.js → el-date-picker-B-cvGosU.js} +2 -2
  10. package/dist/assets/{el-date-picker-cVKa-X4K.js.map → el-date-picker-B-cvGosU.js.map} +1 -1
  11. package/dist/assets/{el-date-picker-legacy-CJ2heCkq.js → el-date-picker-legacy-CACCtxzL.js} +2 -2
  12. package/dist/assets/{el-date-picker-legacy-CJ2heCkq.js.map → el-date-picker-legacy-CACCtxzL.js.map} +1 -1
  13. package/dist/assets/{el-dialog-U5Zmt3t3.js → el-dialog-C9wNxcPt.js} +2 -2
  14. package/dist/assets/{el-dialog-U5Zmt3t3.js.map → el-dialog-C9wNxcPt.js.map} +1 -1
  15. package/dist/assets/{el-dialog-legacy-u4KST5yo.js → el-dialog-legacy-CX7a77_4.js} +2 -2
  16. package/dist/assets/{el-dialog-legacy-u4KST5yo.js.map → el-dialog-legacy-CX7a77_4.js.map} +1 -1
  17. package/dist/assets/{el-dropdown-item-flwUs2cH.js → el-dropdown-item-jbdZL0Yj.js} +2 -2
  18. package/dist/assets/{el-dropdown-item-flwUs2cH.js.map → el-dropdown-item-jbdZL0Yj.js.map} +1 -1
  19. package/dist/assets/{el-dropdown-item-legacy-B2fmSGnI.js → el-dropdown-item-legacy-ChoB2YAN.js} +2 -2
  20. package/dist/assets/{el-dropdown-item-legacy-B2fmSGnI.js.map → el-dropdown-item-legacy-ChoB2YAN.js.map} +1 -1
  21. package/dist/assets/{el-form-item-B08Ira7l.js → el-form-item-BhAyaXPT.js} +2 -2
  22. package/dist/assets/{el-form-item-B08Ira7l.js.map → el-form-item-BhAyaXPT.js.map} +1 -1
  23. package/dist/assets/{el-form-item-legacy-CcX_hnMk.js → el-form-item-legacy-DNwgpXzk.js} +2 -2
  24. package/dist/assets/{el-form-item-legacy-CcX_hnMk.js.map → el-form-item-legacy-DNwgpXzk.js.map} +1 -1
  25. package/dist/assets/{el-loading-BMbhg8vq.js → el-loading-D5D_2rI_.js} +2 -2
  26. package/dist/assets/{el-loading-BMbhg8vq.js.map → el-loading-D5D_2rI_.js.map} +1 -1
  27. package/dist/assets/{el-loading-legacy-CRJF51cp.js → el-loading-legacy-CCDpn-BT.js} +2 -2
  28. package/dist/assets/{el-loading-legacy-CRJF51cp.js.map → el-loading-legacy-CCDpn-BT.js.map} +1 -1
  29. package/dist/assets/{el-pagination-D4Wuvfl8.js → el-pagination-DRV4WevC.js} +2 -2
  30. package/dist/assets/{el-pagination-D4Wuvfl8.js.map → el-pagination-DRV4WevC.js.map} +1 -1
  31. package/dist/assets/{el-pagination-legacy-C2E-fHif.js → el-pagination-legacy-CAxn6D5y.js} +2 -2
  32. package/dist/assets/{el-pagination-legacy-C2E-fHif.js.map → el-pagination-legacy-CAxn6D5y.js.map} +1 -1
  33. package/dist/assets/{el-progress-ChbdZpVl.js → el-progress-GDfl1hgb.js} +2 -2
  34. package/dist/assets/{el-progress-ChbdZpVl.js.map → el-progress-GDfl1hgb.js.map} +1 -1
  35. package/dist/assets/{el-progress-legacy-zjlCtRh2.js → el-progress-legacy-C5K3FqLs.js} +2 -2
  36. package/dist/assets/{el-progress-legacy-zjlCtRh2.js.map → el-progress-legacy-C5K3FqLs.js.map} +1 -1
  37. package/dist/assets/{el-select-DP5UYxt3.js → el-select-B9z8VvNb.js} +2 -2
  38. package/dist/assets/{el-select-DP5UYxt3.js.map → el-select-B9z8VvNb.js.map} +1 -1
  39. package/dist/assets/{el-select-legacy-D4o92tvp.js → el-select-legacy-BI1YK9Jv.js} +2 -2
  40. package/dist/assets/{el-select-legacy-D4o92tvp.js.map → el-select-legacy-BI1YK9Jv.js.map} +1 -1
  41. package/dist/assets/{el-switch-legacy-D1AVOg2z.js → el-switch-legacy-CG_sT4XS.js} +2 -2
  42. package/dist/assets/{el-switch-legacy-D1AVOg2z.js.map → el-switch-legacy-CG_sT4XS.js.map} +1 -1
  43. package/dist/assets/{el-switch-DAReoFaC.js → el-switch-oOC_byJv.js} +2 -2
  44. package/dist/assets/{el-switch-DAReoFaC.js.map → el-switch-oOC_byJv.js.map} +1 -1
  45. package/dist/assets/{el-tab-pane-6kk7HB4E.js → el-tab-pane-NvGl_NI0.js} +2 -2
  46. package/dist/assets/{el-tab-pane-6kk7HB4E.js.map → el-tab-pane-NvGl_NI0.js.map} +1 -1
  47. package/dist/assets/{el-tab-pane-legacy-7aEB8qvn.js → el-tab-pane-legacy-usarmKVQ.js} +2 -2
  48. package/dist/assets/{el-tab-pane-legacy-7aEB8qvn.js.map → el-tab-pane-legacy-usarmKVQ.js.map} +1 -1
  49. package/dist/assets/{el-table-column-DsGlAuX3.js → el-table-column-JBAymLKS.js} +2 -2
  50. package/dist/assets/{el-table-column-DsGlAuX3.js.map → el-table-column-JBAymLKS.js.map} +1 -1
  51. package/dist/assets/{el-table-column-legacy-C8A33Lav.js → el-table-column-legacy-BWpnrxZl.js} +2 -2
  52. package/dist/assets/{el-table-column-legacy-C8A33Lav.js.map → el-table-column-legacy-BWpnrxZl.js.map} +1 -1
  53. package/dist/assets/{index-ggQcjFPK.js → index-B0mV367i.js} +2 -2
  54. package/dist/assets/{index-ggQcjFPK.js.map → index-B0mV367i.js.map} +1 -1
  55. package/dist/assets/{index-ShzTlShR.css → index-BOep9MOB.css} +1 -1
  56. package/dist/assets/{index-DjTj_2YG.js → index-BUF8Xxid.js} +2 -2
  57. package/dist/assets/{index-DjTj_2YG.js.map → index-BUF8Xxid.js.map} +1 -1
  58. package/dist/assets/index-BxsJs6HZ.js +2 -0
  59. package/dist/assets/index-BxsJs6HZ.js.map +1 -0
  60. package/dist/assets/{index-Dczz94WX.js → index-Byzqqd86.js} +2 -2
  61. package/dist/assets/{index-Dczz94WX.js.map → index-Byzqqd86.js.map} +1 -1
  62. package/dist/assets/{index-my4zFbcM.js → index-C0niS8Vv.js} +2 -2
  63. package/dist/assets/{index-my4zFbcM.js.map → index-C0niS8Vv.js.map} +1 -1
  64. package/dist/assets/{index-BdVQjSN6.js → index-CHIrZkSk.js} +2 -2
  65. package/dist/assets/{index-BdVQjSN6.js.map → index-CHIrZkSk.js.map} +1 -1
  66. package/dist/assets/{index-CeKw5v7N.js → index-CKIiHmIf.js} +2 -2
  67. package/dist/assets/{index-CeKw5v7N.js.map → index-CKIiHmIf.js.map} +1 -1
  68. package/dist/assets/{index-mKO4gpWB.js → index-Cno4i6lg.js} +2 -2
  69. package/dist/assets/{index-mKO4gpWB.js.map → index-Cno4i6lg.js.map} +1 -1
  70. package/dist/assets/{index-yrncPnXk.js → index-D80lTVeV.js} +3 -3
  71. package/dist/assets/{index-yrncPnXk.js.map → index-D80lTVeV.js.map} +1 -1
  72. package/dist/assets/{index-Caxtv5sl.js → index-DCwrZmag.js} +2 -2
  73. package/dist/assets/{index-Caxtv5sl.js.map → index-DCwrZmag.js.map} +1 -1
  74. package/dist/assets/{index-BK3KKBAN.js → index-DDGYm9L-.js} +2 -2
  75. package/dist/assets/{index-BK3KKBAN.js.map → index-DDGYm9L-.js.map} +1 -1
  76. package/dist/assets/{index-BVM3WMNO.js → index-DEiWe2Bk.js} +2 -2
  77. package/dist/assets/{index-BVM3WMNO.js.map → index-DEiWe2Bk.js.map} +1 -1
  78. package/dist/assets/{index-DkbS1z1O.js → index-DJnltRnr.js} +2 -2
  79. package/dist/assets/{index-DkbS1z1O.js.map → index-DJnltRnr.js.map} +1 -1
  80. package/dist/assets/{index-BMZu8UZ6.js → index-DMIqQLOE.js} +2 -2
  81. package/dist/assets/{index-BMZu8UZ6.js.map → index-DMIqQLOE.js.map} +1 -1
  82. package/dist/assets/{index-BnQi1XPn.js → index-DRHl9KU8.js} +2 -2
  83. package/dist/assets/{index-BnQi1XPn.js.map → index-DRHl9KU8.js.map} +1 -1
  84. package/dist/assets/{index-jSHW6lhR.js → index-Dj5caLYF.js} +2 -2
  85. package/dist/assets/{index-jSHW6lhR.js.map → index-Dj5caLYF.js.map} +1 -1
  86. package/dist/assets/{index-D-JYypPJ.js → index-Dxy6ycv8.js} +2 -2
  87. package/dist/assets/{index-D-JYypPJ.js.map → index-Dxy6ycv8.js.map} +1 -1
  88. package/dist/assets/{index-D6LMez3u.js → index-MTuc20rr.js} +2 -2
  89. package/dist/assets/{index-D6LMez3u.js.map → index-MTuc20rr.js.map} +1 -1
  90. package/dist/assets/{index-q94vR-7W.js → index-bD-fr3vy.js} +2 -2
  91. package/dist/assets/{index-q94vR-7W.js.map → index-bD-fr3vy.js.map} +1 -1
  92. package/dist/assets/{index-DcmA3tsY.js → index-fb67TYJ8.js} +2 -2
  93. package/dist/assets/{index-DcmA3tsY.js.map → index-fb67TYJ8.js.map} +1 -1
  94. package/dist/assets/{index-legacy-DVOM8HaY.js → index-legacy-2G5G7SiF.js} +2 -2
  95. package/dist/assets/index-legacy-2G5G7SiF.js.map +1 -0
  96. package/dist/assets/{index-legacy-DcKfHHls.js → index-legacy-B1WwgC0S.js} +2 -2
  97. package/dist/assets/{index-legacy-DcKfHHls.js.map → index-legacy-B1WwgC0S.js.map} +1 -1
  98. package/dist/assets/{index-legacy-CRq_O11N.js → index-legacy-BN-W2P7-.js} +2 -2
  99. package/dist/assets/{index-legacy-CRq_O11N.js.map → index-legacy-BN-W2P7-.js.map} +1 -1
  100. package/dist/assets/{index-legacy-DasH54g3.js → index-legacy-BZb5uhBF.js} +2 -2
  101. package/dist/assets/{index-legacy-DasH54g3.js.map → index-legacy-BZb5uhBF.js.map} +1 -1
  102. package/dist/assets/{index-legacy-BFfoAOF1.js → index-legacy-BdJHr4yN.js} +2 -2
  103. package/dist/assets/{index-legacy-BFfoAOF1.js.map → index-legacy-BdJHr4yN.js.map} +1 -1
  104. package/dist/assets/{index-legacy-CW0OHQkF.js → index-legacy-BwpR0DP9.js} +2 -2
  105. package/dist/assets/{index-legacy-CW0OHQkF.js.map → index-legacy-BwpR0DP9.js.map} +1 -1
  106. package/dist/assets/{index-legacy-BqL3XK76.js → index-legacy-Cbyz8WHA.js} +2 -2
  107. package/dist/assets/{index-legacy-BqL3XK76.js.map → index-legacy-Cbyz8WHA.js.map} +1 -1
  108. package/dist/assets/{index-legacy-DD6zMGGT.js → index-legacy-Chw6iyCz.js} +2 -2
  109. package/dist/assets/{index-legacy-DD6zMGGT.js.map → index-legacy-Chw6iyCz.js.map} +1 -1
  110. package/dist/assets/{index-legacy-BLKO-78a.js → index-legacy-DC5-MYgp.js} +2 -2
  111. package/dist/assets/{index-legacy-BLKO-78a.js.map → index-legacy-DC5-MYgp.js.map} +1 -1
  112. package/dist/assets/{index-legacy-pP3Pmgbs.js → index-legacy-DM_G6GXF.js} +2 -2
  113. package/dist/assets/{index-legacy-pP3Pmgbs.js.map → index-legacy-DM_G6GXF.js.map} +1 -1
  114. package/dist/assets/{index-legacy-Dt4Eky4l.js → index-legacy-DP3Q6cDA.js} +2 -2
  115. package/dist/assets/{index-legacy-Dt4Eky4l.js.map → index-legacy-DP3Q6cDA.js.map} +1 -1
  116. package/dist/assets/{index-legacy-B4s89tRC.js → index-legacy-DUrsbgNe.js} +2 -2
  117. package/dist/assets/{index-legacy-B4s89tRC.js.map → index-legacy-DUrsbgNe.js.map} +1 -1
  118. package/dist/assets/{index-legacy-BezkAR3b.js → index-legacy-DV-KwU0c.js} +2 -2
  119. package/dist/assets/{index-legacy-BezkAR3b.js.map → index-legacy-DV-KwU0c.js.map} +1 -1
  120. package/dist/assets/{index-legacy-6cMsZS3c.js → index-legacy-DiNZXmUs.js} +2 -2
  121. package/dist/assets/{index-legacy-6cMsZS3c.js.map → index-legacy-DiNZXmUs.js.map} +1 -1
  122. package/dist/assets/{index-legacy-2f3kE3Xe.js → index-legacy-DmJc-LaA.js} +2 -2
  123. package/dist/assets/{index-legacy-2f3kE3Xe.js.map → index-legacy-DmJc-LaA.js.map} +1 -1
  124. package/dist/assets/{index-legacy-CqVgmAMA.js → index-legacy-Dmi-DBK0.js} +2 -2
  125. package/dist/assets/{index-legacy-CqVgmAMA.js.map → index-legacy-Dmi-DBK0.js.map} +1 -1
  126. package/dist/assets/{index-legacy-CslCZVZ0.js → index-legacy-K0GPuvtR.js} +2 -2
  127. package/dist/assets/{index-legacy-CslCZVZ0.js.map → index-legacy-K0GPuvtR.js.map} +1 -1
  128. package/dist/assets/{index-legacy-CUZgiMNa.js → index-legacy-Qibh5ehq.js} +2 -2
  129. package/dist/assets/{index-legacy-CUZgiMNa.js.map → index-legacy-Qibh5ehq.js.map} +1 -1
  130. package/dist/assets/{index-legacy-bElvuK5I.js → index-legacy-gQf30T09.js} +2 -2
  131. package/dist/assets/{index-legacy-bElvuK5I.js.map → index-legacy-gQf30T09.js.map} +1 -1
  132. package/dist/assets/{index-legacy-8BA9X4aO.js → index-legacy-l7TP3X8w.js} +2 -2
  133. package/dist/assets/{index-legacy-8BA9X4aO.js.map → index-legacy-l7TP3X8w.js.map} +1 -1
  134. package/dist/assets/{isEqual-legacy-4dmPHJnc.js → isEqual-legacy-DVLZyo95.js} +2 -2
  135. package/dist/assets/{isEqual-legacy-4dmPHJnc.js.map → isEqual-legacy-DVLZyo95.js.map} +1 -1
  136. package/dist/assets/{isEqual-DdkrQbjH.js → isEqual-pN6Ih18F.js} +2 -2
  137. package/dist/assets/{isEqual-DdkrQbjH.js.map → isEqual-pN6Ih18F.js.map} +1 -1
  138. package/dist/assets/{refresh-CCIG6-IB.js → refresh-BTQLK-UW.js} +2 -2
  139. package/dist/assets/{refresh-CCIG6-IB.js.map → refresh-BTQLK-UW.js.map} +1 -1
  140. package/dist/assets/{refresh-legacy-CchIU9Mh.js → refresh-legacy-Cv7RM_sm.js} +2 -2
  141. package/dist/assets/{refresh-legacy-CchIU9Mh.js.map → refresh-legacy-Cv7RM_sm.js.map} +1 -1
  142. package/dist/assets/{tip-BM0xMiq8.js → tip-DQo-E_Pu.js} +2 -2
  143. package/dist/assets/{tip-BM0xMiq8.js.map → tip-DQo-E_Pu.js.map} +1 -1
  144. package/dist/assets/{tip-legacy-DpAPUNpm.js → tip-legacy-Ci60OMi9.js} +2 -2
  145. package/dist/assets/{tip-legacy-DpAPUNpm.js.map → tip-legacy-Ci60OMi9.js.map} +1 -1
  146. package/dist/assets/validator-CZlzBDi2.js +2 -0
  147. package/dist/assets/{validator-DG4_rB-x.js.map → validator-CZlzBDi2.js.map} +1 -1
  148. package/dist/assets/validator-legacy-D-pC1hkO.js +2 -0
  149. package/dist/assets/{validator-legacy-CN5REdqi.js.map → validator-legacy-D-pC1hkO.js.map} +1 -1
  150. package/dist/index.html +2 -2
  151. package/package.json +4 -3
  152. package/dist/assets/index-ITkwOdUc.js +0 -2
  153. package/dist/assets/index-ITkwOdUc.js.map +0 -1
  154. package/dist/assets/index-legacy-DVOM8HaY.js.map +0 -1
  155. package/dist/assets/validator-DG4_rB-x.js +0 -2
  156. package/dist/assets/validator-legacy-CN5REdqi.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index-Dczz94WX.js","sources":["../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/hooks/use-restore-active/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/directives/trap-focus/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/components/message-box/src/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/components/message-box/src/messageBox.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/components/message-box/index.mjs"],"sourcesContent":["import { watch, isRef } from 'vue';\n\nconst useRestoreActive = (toggle, initialFocus) => {\n let previousActive;\n watch(() => toggle.value, (val) => {\n var _a, _b;\n if (val) {\n previousActive = document.activeElement;\n if (isRef(initialFocus)) {\n (_b = (_a = initialFocus.value).focus) == null ? void 0 : _b.call(_a);\n }\n } else {\n if (process.env.NODE_ENV === \"test\") {\n previousActive.focus.call(previousActive);\n } else {\n previousActive.focus();\n }\n }\n });\n};\n\nexport { useRestoreActive };\n//# sourceMappingURL=index.mjs.map\n","import { nextTick } from 'vue';\nimport '../../utils/index.mjs';\nimport '../../constants/index.mjs';\nimport { EVENT_CODE } from '../../constants/aria.mjs';\nimport { obtainAllFocusableElements } from '../../utils/dom/aria.mjs';\n\nconst FOCUSABLE_CHILDREN = \"_trap-focus-children\";\nconst TRAP_FOCUS_HANDLER = \"_trap-focus-handler\";\nconst FOCUS_STACK = [];\nconst FOCUS_HANDLER = (e) => {\n var _a;\n if (FOCUS_STACK.length === 0)\n return;\n const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault();\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus();\n }\n return;\n }\n const goingBackward = e.shiftKey;\n const isFirst = e.target === focusableElement[0];\n const isLast = e.target === focusableElement[focusableElement.length - 1];\n if (isFirst && goingBackward) {\n e.preventDefault();\n focusableElement[focusableElement.length - 1].focus();\n }\n if (isLast && !goingBackward) {\n e.preventDefault();\n focusableElement[0].focus();\n }\n if (process.env.NODE_ENV === \"test\") {\n const index = focusableElement.indexOf(e.target);\n if (index !== -1) {\n (_a = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a.focus();\n }\n }\n }\n};\nconst TrapFocus = {\n beforeMount(el) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n FOCUS_STACK.push(el);\n if (FOCUS_STACK.length <= 1) {\n document.addEventListener(\"keydown\", FOCUS_HANDLER);\n }\n },\n updated(el) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n });\n },\n unmounted() {\n FOCUS_STACK.shift();\n if (FOCUS_STACK.length === 0) {\n document.removeEventListener(\"keydown\", FOCUS_HANDLER);\n }\n }\n};\n\nexport { FOCUSABLE_CHILDREN, TRAP_FOCUS_HANDLER, TrapFocus as default };\n//# sourceMappingURL=index.mjs.map\n","import { defineComponent, ref, reactive, computed, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, createTextVNode, vShow } from 'vue';\nimport { ElButton } from '../../button/index.mjs';\nimport '../../../directives/index.mjs';\nimport '../../../hooks/index.mjs';\nimport { ElInput } from '../../input/index.mjs';\nimport { ElOverlay } from '../../overlay/index.mjs';\nimport '../../../utils/index.mjs';\nimport { ElIcon } from '../../icon/index.mjs';\nimport '../../focus-trap/index.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport TrapFocus from '../../../directives/trap-focus/index.mjs';\nimport ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';\nimport { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';\nimport { isValidComponentSize } from '../../../utils/vue/validator.mjs';\nimport { useLocale } from '../../../hooks/use-locale/index.mjs';\nimport { useNamespace } from '../../../hooks/use-namespace/index.mjs';\nimport { useZIndex } from '../../../hooks/use-z-index/index.mjs';\nimport { useId } from '../../../hooks/use-id/index.mjs';\nimport { useSize } from '../../../hooks/use-common-props/index.mjs';\nimport { useDraggable } from '../../../hooks/use-draggable/index.mjs';\nimport { useSameTarget } from '../../../hooks/use-same-target/index.mjs';\nimport { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';\nimport { useRestoreActive } from '../../../hooks/use-restore-active/index.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"ElMessageBox\",\n directives: {\n TrapFocus\n },\n components: {\n ElButton,\n ElFocusTrap,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String,\n validator: isValidComponentSize\n },\n modal: {\n type: Boolean,\n default: true\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n closeOnHashChange: {\n type: Boolean,\n default: true\n },\n center: Boolean,\n draggable: Boolean,\n roundButton: {\n default: false,\n type: Boolean\n },\n container: {\n type: String,\n default: \"body\"\n },\n boxType: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"vanish\", \"action\"],\n setup(props, { emit }) {\n const { t } = useLocale();\n const ns = useNamespace(\"message-box\");\n const visible = ref(false);\n const { nextZIndex } = useZIndex();\n const state = reactive({\n autofocus: true,\n beforeClose: null,\n callback: null,\n cancelButtonText: \"\",\n cancelButtonClass: \"\",\n confirmButtonText: \"\",\n confirmButtonClass: \"\",\n customClass: \"\",\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: \"\",\n inputPattern: null,\n inputPlaceholder: \"\",\n inputType: \"text\",\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: \"\",\n message: null,\n modalFade: true,\n modalClass: \"\",\n showCancelButton: false,\n showConfirmButton: true,\n type: \"\",\n title: void 0,\n showInput: false,\n action: \"\",\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: \"\",\n validateError: false,\n zIndex: nextZIndex()\n });\n const typeClass = computed(() => {\n const type = state.type;\n return { [ns.bm(\"icon\", type)]: type && TypeComponentsMap[type] };\n });\n const contentId = useId();\n const inputId = useId();\n const btnSize = useSize(computed(() => props.buttonSize), { prop: true, form: true, formItem: true });\n const iconComponent = computed(() => state.icon || TypeComponentsMap[state.type] || \"\");\n const hasMessage = computed(() => !!state.message);\n const rootRef = ref();\n const headerRef = ref();\n const focusStartRef = ref();\n const inputRef = ref();\n const confirmRef = ref();\n const confirmButtonClasses = computed(() => state.confirmButtonClass);\n watch(() => state.inputValue, async (val) => {\n await nextTick();\n if (props.boxType === \"prompt\" && val !== null) {\n validate();\n }\n }, { immediate: true });\n watch(() => visible.value, (val) => {\n var _a, _b;\n if (val) {\n if (props.boxType !== \"prompt\") {\n if (state.autofocus) {\n focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n state.zIndex = nextZIndex();\n }\n if (props.boxType !== \"prompt\")\n return;\n if (val) {\n nextTick().then(() => {\n var _a2;\n if (inputRef.value && inputRef.value.$el) {\n if (state.autofocus) {\n focusStartRef.value = (_a2 = getInputElement()) != null ? _a2 : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n });\n } else {\n state.editorErrorMessage = \"\";\n state.validateError = false;\n }\n });\n const draggable = computed(() => props.draggable);\n useDraggable(rootRef, headerRef, draggable);\n onMounted(async () => {\n await nextTick();\n if (props.closeOnHashChange) {\n window.addEventListener(\"hashchange\", doClose);\n }\n });\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n window.removeEventListener(\"hashchange\", doClose);\n }\n });\n function doClose() {\n if (!visible.value)\n return;\n visible.value = false;\n nextTick(() => {\n if (state.action)\n emit(\"action\", state.action);\n });\n }\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? \"close\" : \"cancel\");\n }\n };\n const overlayEvent = useSameTarget(handleWrapperClick);\n const handleInputEnter = (e) => {\n if (state.inputType !== \"textarea\") {\n e.preventDefault();\n return handleAction(\"confirm\");\n }\n };\n const handleAction = (action) => {\n var _a;\n if (props.boxType === \"prompt\" && action === \"confirm\" && !validate()) {\n return;\n }\n state.action = action;\n if (state.beforeClose) {\n (_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose);\n } else {\n doClose();\n }\n };\n const validate = () => {\n if (props.boxType === \"prompt\") {\n const inputPattern = state.inputPattern;\n if (inputPattern && !inputPattern.test(state.inputValue || \"\")) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n const inputValidator = state.inputValidator;\n if (typeof inputValidator === \"function\") {\n const validateResult = inputValidator(state.inputValue);\n if (validateResult === false) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n if (typeof validateResult === \"string\") {\n state.editorErrorMessage = validateResult;\n state.validateError = true;\n return false;\n }\n }\n }\n state.editorErrorMessage = \"\";\n state.validateError = false;\n return true;\n };\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs;\n return inputRefs.input || inputRefs.textarea;\n };\n const handleClose = () => {\n handleAction(\"close\");\n };\n const onCloseRequested = () => {\n if (props.closeOnPressEscape) {\n handleClose();\n }\n };\n if (props.lockScroll) {\n useLockscreen(visible);\n }\n useRestoreActive(visible);\n return {\n ...toRefs(state),\n ns,\n overlayEvent,\n visible,\n hasMessage,\n typeClass,\n contentId,\n inputId,\n btnSize,\n iconComponent,\n confirmButtonClasses,\n rootRef,\n focusStartRef,\n headerRef,\n inputRef,\n confirmRef,\n doClose,\n handleClose,\n onCloseRequested,\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t\n };\n }\n});\nconst _hoisted_1 = [\"aria-label\", \"aria-describedby\"];\nconst _hoisted_2 = [\"aria-label\"];\nconst _hoisted_3 = [\"id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_icon = resolveComponent(\"el-icon\");\n const _component_close = resolveComponent(\"close\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_focus_trap = resolveComponent(\"el-focus-trap\");\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n return openBlock(), createBlock(Transition, {\n name: \"fade-in-linear\",\n onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit(\"vanish\")),\n persisted: \"\"\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n \"z-index\": _ctx.zIndex,\n \"overlay-class\": [_ctx.ns.is(\"message-box\"), _ctx.modalClass],\n mask: _ctx.modal\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n role: \"dialog\",\n \"aria-label\": _ctx.title,\n \"aria-modal\": \"true\",\n \"aria-describedby\": !_ctx.showInput ? _ctx.contentId : void 0,\n class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),\n onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),\n onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),\n onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))\n }, [\n createVNode(_component_el_focus_trap, {\n loop: \"\",\n trapped: _ctx.visible,\n \"focus-trap-el\": _ctx.rootRef,\n \"focus-start-el\": _ctx.focusStartRef,\n onReleaseRequested: _ctx.onCloseRequested\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n ref: \"rootRef\",\n class: normalizeClass([\n _ctx.ns.b(),\n _ctx.customClass,\n _ctx.ns.is(\"draggable\", _ctx.draggable),\n { [_ctx.ns.m(\"center\")]: _ctx.center }\n ]),\n style: normalizeStyle(_ctx.customStyle),\n tabindex: \"-1\",\n onClick: _cache[7] || (_cache[7] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n ref: \"headerRef\",\n class: normalizeClass(_ctx.ns.e(\"header\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"title\"))\n }, [\n _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"span\", null, toDisplayString(_ctx.title), 1)\n ], 2),\n _ctx.showClose ? (openBlock(), createElementBlock(\"button\", {\n key: 0,\n type: \"button\",\n class: normalizeClass(_ctx.ns.e(\"headerbtn\")),\n \"aria-label\": _ctx.t(\"el.messagebox.close\"),\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\")),\n onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, [\n createVNode(_component_el_icon, {\n class: normalizeClass(_ctx.ns.e(\"close\"))\n }, {\n default: withCtx(() => [\n createVNode(_component_close)\n ]),\n _: 1\n }, 8, [\"class\"])\n ], 42, _hoisted_2)) : createCommentVNode(\"v-if\", true)\n ], 2)) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"div\", {\n id: _ctx.contentId,\n class: normalizeClass(_ctx.ns.e(\"content\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"container\"))\n }, [\n _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n _ctx.hasMessage ? (openBlock(), createElementBlock(\"div\", {\n key: 1,\n class: normalizeClass(_ctx.ns.e(\"message\"))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 0,\n for: _ctx.showInput ? _ctx.inputId : void 0\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : \"\"), 1)\n ]),\n _: 1\n }, 8, [\"for\"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 1,\n for: _ctx.showInput ? _ctx.inputId : void 0,\n innerHTML: _ctx.message\n }, null, 8, [\"for\", \"innerHTML\"]))\n ])\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 2),\n withDirectives(createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"input\"))\n }, [\n createVNode(_component_el_input, {\n id: _ctx.inputId,\n ref: \"inputRef\",\n modelValue: _ctx.inputValue,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),\n type: _ctx.inputType,\n placeholder: _ctx.inputPlaceholder,\n \"aria-invalid\": _ctx.validateError,\n class: normalizeClass({ invalid: _ctx.validateError }),\n onKeydown: withKeys(_ctx.handleInputEnter, [\"enter\"])\n }, null, 8, [\"id\", \"modelValue\", \"type\", \"placeholder\", \"aria-invalid\", \"class\", \"onKeydown\"]),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"errormsg\")),\n style: normalizeStyle({\n visibility: !!_ctx.editorErrorMessage ? \"visible\" : \"hidden\"\n })\n }, toDisplayString(_ctx.editorErrorMessage), 7)\n ], 2), [\n [vShow, _ctx.showInput]\n ])\n ], 10, _hoisted_3),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"btns\"))\n }, [\n _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {\n key: 0,\n loading: _ctx.cancelButtonLoading,\n class: normalizeClass([_ctx.cancelButtonClass]),\n round: _ctx.roundButton,\n size: _ctx.btnSize,\n onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction(\"cancel\")),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction(\"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t(\"el.messagebox.cancel\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"size\"])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(_component_el_button, {\n ref: \"confirmRef\",\n type: \"primary\",\n loading: _ctx.confirmButtonLoading,\n class: normalizeClass([_ctx.confirmButtonClasses]),\n round: _ctx.roundButton,\n disabled: _ctx.confirmButtonDisabled,\n size: _ctx.btnSize,\n onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction(\"confirm\")),\n onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction(\"confirm\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t(\"el.messagebox.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"disabled\", \"size\"]), [\n [vShow, _ctx.showConfirmButton]\n ])\n ], 2)\n ], 6)\n ]),\n _: 3\n }, 8, [\"trapped\", \"focus-trap-el\", \"focus-start-el\", \"onReleaseRequested\"])\n ], 42, _hoisted_1)\n ]),\n _: 3\n }, 8, [\"z-index\", \"overlay-class\", \"mask\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n });\n}\nvar MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__file\", \"/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue\"]]);\n\nexport { MessageBoxConstructor as default };\n//# sourceMappingURL=index.mjs.map\n","import { h, render, watch, isVNode } from 'vue';\nimport { isClient } from '@vueuse/core';\nimport '../../../utils/index.mjs';\nimport MessageBoxConstructor from './index.mjs';\nimport { hasOwn, isString, isObject } from '@vue/shared';\nimport { isUndefined } from '../../../utils/types.mjs';\n\nconst messageInstance = /* @__PURE__ */ new Map();\nconst initInstance = (props, container, appContext = null) => {\n const vnode = h(MessageBoxConstructor, props);\n vnode.appContext = appContext;\n render(vnode, container);\n document.body.appendChild(container.firstElementChild);\n return vnode.component;\n};\nconst genContainer = () => {\n return document.createElement(\"div\");\n};\nconst showMessage = (options, appContext) => {\n const container = genContainer();\n options.onVanish = () => {\n render(null, container);\n messageInstance.delete(vm);\n };\n options.onAction = (action) => {\n const currentMsg = messageInstance.get(vm);\n let resolve;\n if (options.showInput) {\n resolve = { value: vm.inputValue, action };\n } else {\n resolve = action;\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy);\n } else {\n if (action === \"cancel\" || action === \"close\") {\n if (options.distinguishCancelAndClose && action !== \"cancel\") {\n currentMsg.reject(\"close\");\n } else {\n currentMsg.reject(\"cancel\");\n }\n } else {\n currentMsg.resolve(resolve);\n }\n }\n };\n const instance = initInstance(options, container, appContext);\n const vm = instance.proxy;\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop] = options[prop];\n }\n }\n watch(() => vm.message, (newVal, oldVal) => {\n if (isVNode(newVal)) {\n instance.slots.default = () => [newVal];\n } else if (isVNode(oldVal) && !isVNode(newVal)) {\n delete instance.slots.default;\n }\n }, {\n immediate: true\n });\n vm.visible = true;\n return vm;\n};\nfunction MessageBox(options, appContext = null) {\n if (!isClient)\n return Promise.reject();\n let callback;\n if (isString(options) || isVNode(options)) {\n options = {\n message: options\n };\n } else {\n callback = options.callback;\n }\n return new Promise((resolve, reject) => {\n const vm = showMessage(options, appContext != null ? appContext : MessageBox._context);\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject\n });\n });\n}\nconst MESSAGE_BOX_VARIANTS = [\"alert\", \"confirm\", \"prompt\"];\nconst MESSAGE_BOX_DEFAULT_OPTS = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true }\n};\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n MessageBox[boxType] = messageBoxFactory(boxType);\n});\nfunction messageBoxFactory(boxType) {\n return (message, titleOrOpts, options, appContext) => {\n let title;\n if (isObject(titleOrOpts)) {\n options = titleOrOpts;\n title = \"\";\n } else if (isUndefined(titleOrOpts)) {\n title = \"\";\n } else {\n title = titleOrOpts;\n }\n return MessageBox(Object.assign({\n title,\n message,\n type: \"\",\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType]\n }, options, {\n boxType\n }), appContext);\n };\n}\nMessageBox.close = () => {\n messageInstance.forEach((_, vm) => {\n vm.doClose();\n });\n messageInstance.clear();\n};\nMessageBox._context = null;\n\nexport { MessageBox as default };\n//# sourceMappingURL=messageBox.mjs.map\n","import MessageBox from './src/messageBox.mjs';\nimport './src/message-box.type.mjs';\n\nconst _MessageBox = MessageBox;\n_MessageBox.install = (app) => {\n _MessageBox._context = app._context;\n app.config.globalProperties.$msgbox = _MessageBox;\n app.config.globalProperties.$messageBox = _MessageBox;\n app.config.globalProperties.$alert = _MessageBox.alert;\n app.config.globalProperties.$confirm = _MessageBox.confirm;\n app.config.globalProperties.$prompt = _MessageBox.prompt;\n};\nconst ElMessageBox = _MessageBox;\n\nexport { ElMessageBox, _MessageBox as default };\n//# sourceMappingURL=index.mjs.map\n"],"names":["useRestoreActive","toggle","initialFocus","previousActive","watch","val","_a","_b","isRef","FOCUSABLE_CHILDREN","FOCUS_STACK","FOCUS_HANDLER","focusableElement","EVENT_CODE","goingBackward","isFirst","isLast","TrapFocus","el","obtainAllFocusableElements","nextTick","_sfc_main","defineComponent","ElButton","ElFocusTrap","ElInput","ElOverlay","ElIcon","TypeComponents","isValidComponentSize","props","emit","t","useLocale","ns","useNamespace","visible","ref","nextZIndex","useZIndex","state","reactive","typeClass","computed","type","TypeComponentsMap","contentId","useId","inputId","btnSize","useSize","iconComponent","hasMessage","rootRef","headerRef","focusStartRef","inputRef","confirmRef","confirmButtonClasses","validate","_a2","getInputElement","draggable","useDraggable","onMounted","doClose","onBeforeUnmount","handleWrapperClick","handleAction","overlayEvent","useSameTarget","handleInputEnter","e","action","inputPattern","inputValidator","validateResult","inputRefs","handleClose","onCloseRequested","useLockscreen","toRefs","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","_component_el_icon","resolveComponent","_component_close","_component_el_input","_component_el_button","_component_el_focus_trap","_component_el_overlay","openBlock","createBlock","Transition","$event","withCtx","withDirectives","createVNode","createElementVNode","normalizeClass","args","normalizeStyle","withModifiers","createElementBlock","resolveDynamicComponent","createCommentVNode","toDisplayString","withKeys","renderSlot","createTextVNode","vShow","MessageBoxConstructor","_export_sfc","messageInstance","initInstance","container","appContext","vnode","h","render","genContainer","showMessage","options","vm","currentMsg","resolve","instance","prop","hasOwn","newVal","oldVal","isVNode","MessageBox","isClient","callback","isString","reject","MESSAGE_BOX_VARIANTS","MESSAGE_BOX_DEFAULT_OPTS","boxType","messageBoxFactory","message","titleOrOpts","title","isObject","isUndefined","_","_MessageBox","app","ElMessageBox"],"mappings":"+mBAEA,MAAMA,GAAmB,CA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EAAEjB,EAAS,CACV,QAAAiB,CACN,CAAK,EAAGvB,CAAU,CAClB,CACA,CACAgB,EAAW,MAAQ,IAAM,CACvBnB,EAAgB,QAAQ,CAACiC,EAAGvB,IAAO,CACjCA,EAAG,QAAO,CACd,CAAG,EACDV,EAAgB,MAAK,CACvB,EACAmB,EAAW,SAAW,KCvHtB,MAAMe,EAAcf,EACpBe,EAAY,QAAWC,GAAQ,CAC7BD,EAAY,SAAWC,EAAI,SAC3BA,EAAI,OAAO,iBAAiB,QAAUD,EACtCC,EAAI,OAAO,iBAAiB,YAAcD,EAC1CC,EAAI,OAAO,iBAAiB,OAASD,EAAY,MACjDC,EAAI,OAAO,iBAAiB,SAAWD,EAAY,QACnDC,EAAI,OAAO,iBAAiB,QAAUD,EAAY,MACpD,EACK,MAACE,GAAeF","x_google_ignoreList":[0,1,2,3,4]}
1
+ {"version":3,"file":"index-Byzqqd86.js","sources":["../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/hooks/use-restore-active/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/directives/trap-focus/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/components/message-box/src/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/components/message-box/src/messageBox.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.4.31_typescript@4.9.5_/node_modules/element-plus/es/components/message-box/index.mjs"],"sourcesContent":["import { watch, isRef } from 'vue';\n\nconst useRestoreActive = (toggle, initialFocus) => {\n let previousActive;\n watch(() => toggle.value, (val) => {\n var _a, _b;\n if (val) {\n previousActive = document.activeElement;\n if (isRef(initialFocus)) {\n (_b = (_a = initialFocus.value).focus) == null ? void 0 : _b.call(_a);\n }\n } else {\n if (process.env.NODE_ENV === \"test\") {\n previousActive.focus.call(previousActive);\n } else {\n previousActive.focus();\n }\n }\n });\n};\n\nexport { useRestoreActive };\n//# sourceMappingURL=index.mjs.map\n","import { nextTick } from 'vue';\nimport '../../utils/index.mjs';\nimport '../../constants/index.mjs';\nimport { EVENT_CODE } from '../../constants/aria.mjs';\nimport { obtainAllFocusableElements } from '../../utils/dom/aria.mjs';\n\nconst FOCUSABLE_CHILDREN = \"_trap-focus-children\";\nconst TRAP_FOCUS_HANDLER = \"_trap-focus-handler\";\nconst FOCUS_STACK = [];\nconst FOCUS_HANDLER = (e) => {\n var _a;\n if (FOCUS_STACK.length === 0)\n return;\n const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault();\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus();\n }\n return;\n }\n const goingBackward = e.shiftKey;\n const isFirst = e.target === focusableElement[0];\n const isLast = e.target === focusableElement[focusableElement.length - 1];\n if (isFirst && goingBackward) {\n e.preventDefault();\n focusableElement[focusableElement.length - 1].focus();\n }\n if (isLast && !goingBackward) {\n e.preventDefault();\n focusableElement[0].focus();\n }\n if (process.env.NODE_ENV === \"test\") {\n const index = focusableElement.indexOf(e.target);\n if (index !== -1) {\n (_a = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a.focus();\n }\n }\n }\n};\nconst TrapFocus = {\n beforeMount(el) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n FOCUS_STACK.push(el);\n if (FOCUS_STACK.length <= 1) {\n document.addEventListener(\"keydown\", FOCUS_HANDLER);\n }\n },\n updated(el) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n });\n },\n unmounted() {\n FOCUS_STACK.shift();\n if (FOCUS_STACK.length === 0) {\n document.removeEventListener(\"keydown\", FOCUS_HANDLER);\n }\n }\n};\n\nexport { FOCUSABLE_CHILDREN, TRAP_FOCUS_HANDLER, TrapFocus as default };\n//# sourceMappingURL=index.mjs.map\n","import { defineComponent, ref, reactive, computed, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, createTextVNode, vShow } from 'vue';\nimport { ElButton } from '../../button/index.mjs';\nimport '../../../directives/index.mjs';\nimport '../../../hooks/index.mjs';\nimport { ElInput } from '../../input/index.mjs';\nimport { ElOverlay } from '../../overlay/index.mjs';\nimport '../../../utils/index.mjs';\nimport { ElIcon } from '../../icon/index.mjs';\nimport '../../focus-trap/index.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport TrapFocus from '../../../directives/trap-focus/index.mjs';\nimport ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';\nimport { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';\nimport { isValidComponentSize } from '../../../utils/vue/validator.mjs';\nimport { useLocale } from '../../../hooks/use-locale/index.mjs';\nimport { useNamespace } from '../../../hooks/use-namespace/index.mjs';\nimport { useZIndex } from '../../../hooks/use-z-index/index.mjs';\nimport { useId } from '../../../hooks/use-id/index.mjs';\nimport { useSize } from '../../../hooks/use-common-props/index.mjs';\nimport { useDraggable } from '../../../hooks/use-draggable/index.mjs';\nimport { useSameTarget } from '../../../hooks/use-same-target/index.mjs';\nimport { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';\nimport { useRestoreActive } from '../../../hooks/use-restore-active/index.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"ElMessageBox\",\n directives: {\n TrapFocus\n },\n components: {\n ElButton,\n ElFocusTrap,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String,\n validator: isValidComponentSize\n },\n modal: {\n type: Boolean,\n default: true\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n closeOnHashChange: {\n type: Boolean,\n default: true\n },\n center: Boolean,\n draggable: Boolean,\n roundButton: {\n default: false,\n type: Boolean\n },\n container: {\n type: String,\n default: \"body\"\n },\n boxType: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"vanish\", \"action\"],\n setup(props, { emit }) {\n const { t } = useLocale();\n const ns = useNamespace(\"message-box\");\n const visible = ref(false);\n const { nextZIndex } = useZIndex();\n const state = reactive({\n autofocus: true,\n beforeClose: null,\n callback: null,\n cancelButtonText: \"\",\n cancelButtonClass: \"\",\n confirmButtonText: \"\",\n confirmButtonClass: \"\",\n customClass: \"\",\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: \"\",\n inputPattern: null,\n inputPlaceholder: \"\",\n inputType: \"text\",\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: \"\",\n message: null,\n modalFade: true,\n modalClass: \"\",\n showCancelButton: false,\n showConfirmButton: true,\n type: \"\",\n title: void 0,\n showInput: false,\n action: \"\",\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: \"\",\n validateError: false,\n zIndex: nextZIndex()\n });\n const typeClass = computed(() => {\n const type = state.type;\n return { [ns.bm(\"icon\", type)]: type && TypeComponentsMap[type] };\n });\n const contentId = useId();\n const inputId = useId();\n const btnSize = useSize(computed(() => props.buttonSize), { prop: true, form: true, formItem: true });\n const iconComponent = computed(() => state.icon || TypeComponentsMap[state.type] || \"\");\n const hasMessage = computed(() => !!state.message);\n const rootRef = ref();\n const headerRef = ref();\n const focusStartRef = ref();\n const inputRef = ref();\n const confirmRef = ref();\n const confirmButtonClasses = computed(() => state.confirmButtonClass);\n watch(() => state.inputValue, async (val) => {\n await nextTick();\n if (props.boxType === \"prompt\" && val !== null) {\n validate();\n }\n }, { immediate: true });\n watch(() => visible.value, (val) => {\n var _a, _b;\n if (val) {\n if (props.boxType !== \"prompt\") {\n if (state.autofocus) {\n focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n state.zIndex = nextZIndex();\n }\n if (props.boxType !== \"prompt\")\n return;\n if (val) {\n nextTick().then(() => {\n var _a2;\n if (inputRef.value && inputRef.value.$el) {\n if (state.autofocus) {\n focusStartRef.value = (_a2 = getInputElement()) != null ? _a2 : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n });\n } else {\n state.editorErrorMessage = \"\";\n state.validateError = false;\n }\n });\n const draggable = computed(() => props.draggable);\n useDraggable(rootRef, headerRef, draggable);\n onMounted(async () => {\n await nextTick();\n if (props.closeOnHashChange) {\n window.addEventListener(\"hashchange\", doClose);\n }\n });\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n window.removeEventListener(\"hashchange\", doClose);\n }\n });\n function doClose() {\n if (!visible.value)\n return;\n visible.value = false;\n nextTick(() => {\n if (state.action)\n emit(\"action\", state.action);\n });\n }\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? \"close\" : \"cancel\");\n }\n };\n const overlayEvent = useSameTarget(handleWrapperClick);\n const handleInputEnter = (e) => {\n if (state.inputType !== \"textarea\") {\n e.preventDefault();\n return handleAction(\"confirm\");\n }\n };\n const handleAction = (action) => {\n var _a;\n if (props.boxType === \"prompt\" && action === \"confirm\" && !validate()) {\n return;\n }\n state.action = action;\n if (state.beforeClose) {\n (_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose);\n } else {\n doClose();\n }\n };\n const validate = () => {\n if (props.boxType === \"prompt\") {\n const inputPattern = state.inputPattern;\n if (inputPattern && !inputPattern.test(state.inputValue || \"\")) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n const inputValidator = state.inputValidator;\n if (typeof inputValidator === \"function\") {\n const validateResult = inputValidator(state.inputValue);\n if (validateResult === false) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n if (typeof validateResult === \"string\") {\n state.editorErrorMessage = validateResult;\n state.validateError = true;\n return false;\n }\n }\n }\n state.editorErrorMessage = \"\";\n state.validateError = false;\n return true;\n };\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs;\n return inputRefs.input || inputRefs.textarea;\n };\n const handleClose = () => {\n handleAction(\"close\");\n };\n const onCloseRequested = () => {\n if (props.closeOnPressEscape) {\n handleClose();\n }\n };\n if (props.lockScroll) {\n useLockscreen(visible);\n }\n useRestoreActive(visible);\n return {\n ...toRefs(state),\n ns,\n overlayEvent,\n visible,\n hasMessage,\n typeClass,\n contentId,\n inputId,\n btnSize,\n iconComponent,\n confirmButtonClasses,\n rootRef,\n focusStartRef,\n headerRef,\n inputRef,\n confirmRef,\n doClose,\n handleClose,\n onCloseRequested,\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t\n };\n }\n});\nconst _hoisted_1 = [\"aria-label\", \"aria-describedby\"];\nconst _hoisted_2 = [\"aria-label\"];\nconst _hoisted_3 = [\"id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_icon = resolveComponent(\"el-icon\");\n const _component_close = resolveComponent(\"close\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_focus_trap = resolveComponent(\"el-focus-trap\");\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n return openBlock(), createBlock(Transition, {\n name: \"fade-in-linear\",\n onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit(\"vanish\")),\n persisted: \"\"\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n \"z-index\": _ctx.zIndex,\n \"overlay-class\": [_ctx.ns.is(\"message-box\"), _ctx.modalClass],\n mask: _ctx.modal\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n role: \"dialog\",\n \"aria-label\": _ctx.title,\n \"aria-modal\": \"true\",\n \"aria-describedby\": !_ctx.showInput ? _ctx.contentId : void 0,\n class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),\n onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),\n onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),\n onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))\n }, [\n createVNode(_component_el_focus_trap, {\n loop: \"\",\n trapped: _ctx.visible,\n \"focus-trap-el\": _ctx.rootRef,\n \"focus-start-el\": _ctx.focusStartRef,\n onReleaseRequested: _ctx.onCloseRequested\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n ref: \"rootRef\",\n class: normalizeClass([\n _ctx.ns.b(),\n _ctx.customClass,\n _ctx.ns.is(\"draggable\", _ctx.draggable),\n { [_ctx.ns.m(\"center\")]: _ctx.center }\n ]),\n style: normalizeStyle(_ctx.customStyle),\n tabindex: \"-1\",\n onClick: _cache[7] || (_cache[7] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n ref: \"headerRef\",\n class: normalizeClass(_ctx.ns.e(\"header\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"title\"))\n }, [\n _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"span\", null, toDisplayString(_ctx.title), 1)\n ], 2),\n _ctx.showClose ? (openBlock(), createElementBlock(\"button\", {\n key: 0,\n type: \"button\",\n class: normalizeClass(_ctx.ns.e(\"headerbtn\")),\n \"aria-label\": _ctx.t(\"el.messagebox.close\"),\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\")),\n onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, [\n createVNode(_component_el_icon, {\n class: normalizeClass(_ctx.ns.e(\"close\"))\n }, {\n default: withCtx(() => [\n createVNode(_component_close)\n ]),\n _: 1\n }, 8, [\"class\"])\n ], 42, _hoisted_2)) : createCommentVNode(\"v-if\", true)\n ], 2)) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"div\", {\n id: _ctx.contentId,\n class: normalizeClass(_ctx.ns.e(\"content\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"container\"))\n }, [\n _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n _ctx.hasMessage ? (openBlock(), createElementBlock(\"div\", {\n key: 1,\n class: normalizeClass(_ctx.ns.e(\"message\"))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 0,\n for: _ctx.showInput ? _ctx.inputId : void 0\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : \"\"), 1)\n ]),\n _: 1\n }, 8, [\"for\"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 1,\n for: _ctx.showInput ? _ctx.inputId : void 0,\n innerHTML: _ctx.message\n }, null, 8, [\"for\", \"innerHTML\"]))\n ])\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 2),\n withDirectives(createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"input\"))\n }, [\n createVNode(_component_el_input, {\n id: _ctx.inputId,\n ref: \"inputRef\",\n modelValue: _ctx.inputValue,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),\n type: _ctx.inputType,\n placeholder: _ctx.inputPlaceholder,\n \"aria-invalid\": _ctx.validateError,\n class: normalizeClass({ invalid: _ctx.validateError }),\n onKeydown: withKeys(_ctx.handleInputEnter, [\"enter\"])\n }, null, 8, [\"id\", \"modelValue\", \"type\", \"placeholder\", \"aria-invalid\", \"class\", \"onKeydown\"]),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"errormsg\")),\n style: normalizeStyle({\n visibility: !!_ctx.editorErrorMessage ? \"visible\" : \"hidden\"\n })\n }, toDisplayString(_ctx.editorErrorMessage), 7)\n ], 2), [\n [vShow, _ctx.showInput]\n ])\n ], 10, _hoisted_3),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"btns\"))\n }, [\n _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {\n key: 0,\n loading: _ctx.cancelButtonLoading,\n class: normalizeClass([_ctx.cancelButtonClass]),\n round: _ctx.roundButton,\n size: _ctx.btnSize,\n onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction(\"cancel\")),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction(\"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t(\"el.messagebox.cancel\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"size\"])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(_component_el_button, {\n ref: \"confirmRef\",\n type: \"primary\",\n loading: _ctx.confirmButtonLoading,\n class: normalizeClass([_ctx.confirmButtonClasses]),\n round: _ctx.roundButton,\n disabled: _ctx.confirmButtonDisabled,\n size: _ctx.btnSize,\n onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction(\"confirm\")),\n onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction(\"confirm\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t(\"el.messagebox.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"disabled\", \"size\"]), [\n [vShow, _ctx.showConfirmButton]\n ])\n ], 2)\n ], 6)\n ]),\n _: 3\n }, 8, [\"trapped\", \"focus-trap-el\", \"focus-start-el\", \"onReleaseRequested\"])\n ], 42, _hoisted_1)\n ]),\n _: 3\n }, 8, [\"z-index\", \"overlay-class\", \"mask\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n });\n}\nvar MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__file\", \"/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue\"]]);\n\nexport { MessageBoxConstructor as default };\n//# sourceMappingURL=index.mjs.map\n","import { h, render, watch, isVNode } from 'vue';\nimport { isClient } from '@vueuse/core';\nimport '../../../utils/index.mjs';\nimport MessageBoxConstructor from './index.mjs';\nimport { hasOwn, isString, isObject } from '@vue/shared';\nimport { isUndefined } from '../../../utils/types.mjs';\n\nconst messageInstance = /* @__PURE__ */ new Map();\nconst initInstance = (props, container, appContext = null) => {\n const vnode = h(MessageBoxConstructor, props);\n vnode.appContext = appContext;\n render(vnode, container);\n document.body.appendChild(container.firstElementChild);\n return vnode.component;\n};\nconst genContainer = () => {\n return document.createElement(\"div\");\n};\nconst showMessage = (options, appContext) => {\n const container = genContainer();\n options.onVanish = () => {\n render(null, container);\n messageInstance.delete(vm);\n };\n options.onAction = (action) => {\n const currentMsg = messageInstance.get(vm);\n let resolve;\n if (options.showInput) {\n resolve = { value: vm.inputValue, action };\n } else {\n resolve = action;\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy);\n } else {\n if (action === \"cancel\" || action === \"close\") {\n if (options.distinguishCancelAndClose && action !== \"cancel\") {\n currentMsg.reject(\"close\");\n } else {\n currentMsg.reject(\"cancel\");\n }\n } else {\n currentMsg.resolve(resolve);\n }\n }\n };\n const instance = initInstance(options, container, appContext);\n const vm = instance.proxy;\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop] = options[prop];\n }\n }\n watch(() => vm.message, (newVal, oldVal) => {\n if (isVNode(newVal)) {\n instance.slots.default = () => [newVal];\n } else if (isVNode(oldVal) && !isVNode(newVal)) {\n delete instance.slots.default;\n }\n }, {\n immediate: true\n });\n vm.visible = true;\n return vm;\n};\nfunction MessageBox(options, appContext = null) {\n if (!isClient)\n return Promise.reject();\n let callback;\n if (isString(options) || isVNode(options)) {\n options = {\n message: options\n };\n } else {\n callback = options.callback;\n }\n return new Promise((resolve, reject) => {\n const vm = showMessage(options, appContext != null ? appContext : MessageBox._context);\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject\n });\n });\n}\nconst MESSAGE_BOX_VARIANTS = [\"alert\", \"confirm\", \"prompt\"];\nconst MESSAGE_BOX_DEFAULT_OPTS = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true }\n};\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n MessageBox[boxType] = messageBoxFactory(boxType);\n});\nfunction messageBoxFactory(boxType) {\n return (message, titleOrOpts, options, appContext) => {\n let title;\n if (isObject(titleOrOpts)) {\n options = titleOrOpts;\n title = \"\";\n } else if (isUndefined(titleOrOpts)) {\n title = \"\";\n } else {\n title = titleOrOpts;\n }\n return MessageBox(Object.assign({\n title,\n message,\n type: \"\",\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType]\n }, options, {\n boxType\n }), appContext);\n };\n}\nMessageBox.close = () => {\n messageInstance.forEach((_, vm) => {\n vm.doClose();\n });\n messageInstance.clear();\n};\nMessageBox._context = null;\n\nexport { MessageBox as default };\n//# sourceMappingURL=messageBox.mjs.map\n","import MessageBox from './src/messageBox.mjs';\nimport './src/message-box.type.mjs';\n\nconst _MessageBox = MessageBox;\n_MessageBox.install = (app) => {\n _MessageBox._context = app._context;\n app.config.globalProperties.$msgbox = _MessageBox;\n app.config.globalProperties.$messageBox = _MessageBox;\n app.config.globalProperties.$alert = _MessageBox.alert;\n app.config.globalProperties.$confirm = _MessageBox.confirm;\n app.config.globalProperties.$prompt = _MessageBox.prompt;\n};\nconst ElMessageBox = _MessageBox;\n\nexport { ElMessageBox, _MessageBox as default };\n//# sourceMappingURL=index.mjs.map\n"],"names":["useRestoreActive","toggle","initialFocus","previousActive","watch","val","_a","_b","isRef","FOCUSABLE_CHILDREN","FOCUS_STACK","FOCUS_HANDLER","focusableElement","EVENT_CODE","goingBackward","isFirst","isLast","TrapFocus","el","obtainAllFocusableElements","nextTick","_sfc_main","defineComponent","ElButton","ElFocusTrap","ElInput","ElOverlay","ElIcon","TypeComponents","isValidComponentSize","props","emit","t","useLocale","ns","useNamespace","visible","ref","nextZIndex","useZIndex","state","reactive","typeClass","computed","type","TypeComponentsMap","contentId","useId","inputId","btnSize","useSize","iconComponent","hasMessage","rootRef","headerRef","focusStartRef","inputRef","confirmRef","confirmButtonClasses","validate","_a2","getInputElement","draggable","useDraggable","onMounted","doClose","onBeforeUnmount","handleWrapperClick","handleAction","overlayEvent","useSameTarget","handleInputEnter","e","action","inputPattern","inputValidator","validateResult","inputRefs","handleClose","onCloseRequested","useLockscreen","toRefs","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","_component_el_icon","resolveComponent","_component_close","_component_el_input","_component_el_button","_component_el_focus_trap","_component_el_overlay","openBlock","createBlock","Transition","$event","withCtx","withDirectives","createVNode","createElementVNode","normalizeClass","args","normalizeStyle","withModifiers","createElementBlock","resolveDynamicComponent","createCommentVNode","toDisplayString","withKeys","renderSlot","createTextVNode","vShow","MessageBoxConstructor","_export_sfc","messageInstance","initInstance","container","appContext","vnode","h","render","genContainer","showMessage","options","vm","currentMsg","resolve","instance","prop","hasOwn","newVal","oldVal","isVNode","MessageBox","isClient","callback","isString","reject","MESSAGE_BOX_VARIANTS","MESSAGE_BOX_DEFAULT_OPTS","boxType","messageBoxFactory","message","titleOrOpts","title","isObject","isUndefined","_","_MessageBox","app","ElMessageBox"],"mappings":"+mBAEA,MAAMA,GAAmB,CAACC,EAAQC,IAAiB,CAC7C,IAAAC,EACJC,EAAM,IAAMH,EAAO,MAAQI,GAAQ,CACjC,IAAIC,EAAIC,EACJF,GACFF,EAAiB,SAAS,cACtBK,GAAMN,CAAY,KACnBK,GAAMD,EAAKJ,EAAa,OAAO,QAAU,MAAgBK,EAAG,KAAKD,CAAE,IAMpEH,EAAe,MAAM,CAEzB,CACD,CACH,ECbMM,EAAqB,uBAErBC,EAAc,CAAA,EACdC,GAAiB,GAAM,CAE3B,GAAID,EAAY,SAAW,EACzB,OACF,MAAME,EAAmBF,EAAYA,EAAY,OAAS,CAAC,EAAED,CAAkB,EAC/E,GAAIG,EAAiB,OAAS,GAAK,EAAE,OAASC,GAAW,IAAK,CACxD,GAAAD,EAAiB,SAAW,EAAG,CACjC,EAAE,eAAe,EACb,SAAS,gBAAkBA,EAAiB,CAAC,GAC9BA,EAAA,CAAC,EA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1
- import{d as R,u as V,O as J,Z as B,r as y,c_ as j,o as z,bs as g,i as $,a as s,c as r,b as o,j as i,w as u,e as c,F as b,C as A,t as v,D as f,k as F,E as m,y as I,x as M,v as L,_ as T}from"./index-yrncPnXk.js";import{E as U}from"./el-switch-DAReoFaC.js";import"./validator-DG4_rB-x.js";const Z={class:"user"},q={class:"panel"},G={class:"routes"},H={class:"title"},K={class:"path"},P={class:"config-btn"},Q={class:"config-panel"},W=R({__name:"index",setup(X){const w=V(),C=J(()=>w.options.routes.filter(e=>{var t;return(t=e.meta)==null?void 0:t.allowDisabled})),h=B([]);function k(e){g.addDisabledRoute(e.path,!e.disabled).then(()=>{e.disabled=!e.disabled,m.success("切换成功")})}const n=y(!1),{value:p,updateValue:x}=j(),d=y("");function S(){n.value=!0,d.value=JSON.stringify(p.value,null,2)}async function E(){try{const e=JSON.parse(d.value);p.value=e,await x(),n.value=!1,m.success("保存成功")}catch(e){return m.error("JSON 格式错误")}}return z(()=>{for(const e of C.value)g.checkDisabledRoute(e.path).then(t=>{var l;h.push({path:e.path,name:e.name.toString(),title:e.meta.title,disabled:!!((l=t.data)!=null&&l.status)})})}),(e,t)=>{const l=I,D=U,_=M,N=$("json-viewer"),O=L;return s(),r("div",Z,[o("div",q,[i(l,null,{default:u(()=>[c("禁用路由管理")]),_:1}),o("ul",G,[(s(!0),r(b,null,A(h,a=>(s(),r("li",{key:a.name},[i(D,{"model-value":!a.disabled,style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"},onChange:Y=>k(a)},null,8,["model-value","onChange"]),o("span",H,v(a.title),1),o("span",K,v(a.path)+v(a.path==="/register"?" 关闭后将同时禁用注册功能":""),1)]))),128))]),i(l,null,{default:u(()=>[c("全局配置管理(JSON)")]),_:1}),o("div",P,[n.value?(s(),r(b,{key:1},[i(_,{size:"small",type:"danger",onClick:t[0]||(t[0]=a=>n.value=!1)},{default:u(()=>[c(" 取消 ")]),_:1}),i(_,{size:"small",type:"success",onClick:E},{default:u(()=>[c(" 保存 ")]),_:1})],64)):(s(),f(_,{key:0,size:"small",type:"primary",onClick:S},{default:u(()=>[c(" 更新 ")]),_:1}))]),o("div",Q,[n.value?(s(),f(O,{key:1,modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=a=>d.value=a),autosize:{minRows:2,maxRows:30},type:"textarea"},null,8,["modelValue"])):(s(),f(N,{key:0,value:F(p),"expand-depth":5,copyable:"",boxed:"",sort:""},null,8,["value"]))])])])}}}),se=T(W,[["__scopeId","data-v-1e07da88"]]);export{se as default};
2
- //# sourceMappingURL=index-my4zFbcM.js.map
1
+ import{d as R,u as V,O as J,Z as B,r as y,c_ as j,o as z,bs as g,i as $,a as s,c as r,b as o,j as i,w as u,e as c,F as b,C as A,t as v,D as f,k as F,E as m,y as I,x as M,v as L,_ as T}from"./index-D80lTVeV.js";import{E as U}from"./el-switch-oOC_byJv.js";import"./validator-CZlzBDi2.js";const Z={class:"user"},q={class:"panel"},G={class:"routes"},H={class:"title"},K={class:"path"},P={class:"config-btn"},Q={class:"config-panel"},W=R({__name:"index",setup(X){const w=V(),C=J(()=>w.options.routes.filter(e=>{var t;return(t=e.meta)==null?void 0:t.allowDisabled})),h=B([]);function k(e){g.addDisabledRoute(e.path,!e.disabled).then(()=>{e.disabled=!e.disabled,m.success("切换成功")})}const n=y(!1),{value:p,updateValue:x}=j(),d=y("");function S(){n.value=!0,d.value=JSON.stringify(p.value,null,2)}async function E(){try{const e=JSON.parse(d.value);p.value=e,await x(),n.value=!1,m.success("保存成功")}catch(e){return m.error("JSON 格式错误")}}return z(()=>{for(const e of C.value)g.checkDisabledRoute(e.path).then(t=>{var l;h.push({path:e.path,name:e.name.toString(),title:e.meta.title,disabled:!!((l=t.data)!=null&&l.status)})})}),(e,t)=>{const l=I,D=U,_=M,N=$("json-viewer"),O=L;return s(),r("div",Z,[o("div",q,[i(l,null,{default:u(()=>[c("禁用路由管理")]),_:1}),o("ul",G,[(s(!0),r(b,null,A(h,a=>(s(),r("li",{key:a.name},[i(D,{"model-value":!a.disabled,style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"},onChange:Y=>k(a)},null,8,["model-value","onChange"]),o("span",H,v(a.title),1),o("span",K,v(a.path)+v(a.path==="/register"?" 关闭后将同时禁用注册功能":""),1)]))),128))]),i(l,null,{default:u(()=>[c("全局配置管理(JSON)")]),_:1}),o("div",P,[n.value?(s(),r(b,{key:1},[i(_,{size:"small",type:"danger",onClick:t[0]||(t[0]=a=>n.value=!1)},{default:u(()=>[c(" 取消 ")]),_:1}),i(_,{size:"small",type:"success",onClick:E},{default:u(()=>[c(" 保存 ")]),_:1})],64)):(s(),f(_,{key:0,size:"small",type:"primary",onClick:S},{default:u(()=>[c(" 更新 ")]),_:1}))]),o("div",Q,[n.value?(s(),f(O,{key:1,modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=a=>d.value=a),autosize:{minRows:2,maxRows:30},type:"textarea"},null,8,["modelValue"])):(s(),f(N,{key:0,value:F(p),"expand-depth":5,copyable:"",boxed:"",sort:""},null,8,["value"]))])])])}}}),se=T(W,[["__scopeId","data-v-1e07da88"]]);export{se as default};
2
+ //# sourceMappingURL=index-C0niS8Vv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-my4zFbcM.js","sources":["../../src/pages/dashboard/manage/config/index.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ElMessage } from 'element-plus'\nimport { computed, onMounted, reactive, ref } from 'vue'\nimport { useRouter } from 'vue-router'\nimport { SuperOverviewApi } from '@/apis'\nimport { useSiteAllConfig } from '@/composables'\n\nconst $router = useRouter()\nconst routes = computed(() =>\n $router.options.routes.filter(v => v.meta?.allowDisabled),\n)\nconst showRoutes = reactive<\n {\n path: string\n name: string\n title: string\n disabled: boolean\n }[]\n>([])\n\nfunction handleChangeRoute(r: (typeof showRoutes)[0]) {\n SuperOverviewApi.addDisabledRoute(r.path, !r.disabled).then(() => {\n r.disabled = !r.disabled\n ElMessage.success('切换成功')\n })\n}\n\nconst editConfig = ref(false)\nconst { value: jsonData, updateValue: updateJsonData } = useSiteAllConfig()\n\nconst editJSON = ref('')\n\nfunction handleEditConfig() {\n editConfig.value = true\n editJSON.value = JSON.stringify(jsonData.value, null, 2)\n}\nasync function handleSaveConfig() {\n try {\n const data = JSON.parse(editJSON.value)\n jsonData.value = data\n await updateJsonData()\n editConfig.value = false\n ElMessage.success('保存成功')\n }\n catch (e) {\n return ElMessage.error('JSON 格式错误')\n }\n}\nonMounted(() => {\n for (const r of routes.value) {\n SuperOverviewApi.checkDisabledRoute(r.path).then((v) => {\n showRoutes.push({\n path: r.path,\n name: r.name.toString(),\n title: r.meta.title,\n disabled: !!v.data?.status,\n })\n })\n }\n})\n</script>\n\n<template>\n <div class=\"user\">\n <div class=\"panel\">\n <el-divider>禁用路由管理</el-divider>\n <ul class=\"routes\">\n <li v-for=\"r in showRoutes\" :key=\"r.name\">\n <el-switch\n :model-value=\"!r.disabled\" style=\"\n --el-switch-on-color: #13ce66;\n --el-switch-off-color: #ff4949;\n \" @change=\"handleChangeRoute(r)\"\n />\n <span class=\"title\">{{ r.title }}</span>\n <span class=\"path\">{{ r.path }}{{ r.path === '/register' ? ' 关闭后将同时禁用注册功能' : '' }}</span>\n </li>\n </ul>\n <el-divider>全局配置管理(JSON)</el-divider>\n <div class=\"config-btn\">\n <el-button v-if=\"!editConfig\" size=\"small\" type=\"primary\" @click=\"handleEditConfig\">\n 更新\n </el-button>\n <template v-else>\n <el-button size=\"small\" type=\"danger\" @click=\"editConfig = false\">\n 取消\n </el-button>\n <el-button size=\"small\" type=\"success\" @click=\"handleSaveConfig\">\n 保存\n </el-button>\n </template>\n </div>\n <div class=\"config-panel\">\n <json-viewer\n v-if=\"!editConfig\"\n :value=\"jsonData\"\n :expand-depth=\"5\"\n copyable\n boxed\n sort\n />\n <!-- TODO: JSON editor -->\n <el-input\n v-else\n v-model=\"editJSON\"\n :autosize=\"{ minRows: 2, maxRows: 30 }\"\n type=\"textarea\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n@media screen and (max-width: 700px) {\n .user {\n margin-top: 40px !important;\n }\n}\n\n.user {\n margin: 0 auto;\n}\n\n.panel {\n max-width: 1256px;\n padding: 1em;\n background-color: #fff;\n margin: 10px auto;\n box-sizing: border-box;\n box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);\n border-radius: 4px;\n}\n\n.routes {\n max-width: 500px;\n margin: 0 auto;\n\n li {\n display: flex;\n padding: 20px;\n align-items: center;\n\n .title {\n font-weight: bold;\n margin: 0 10px;\n }\n }\n}\n.config-btn {\n text-align: center;\n}\n.config-panel {\n max-width: 500px;\n margin: 0 auto;\n}\n</style>\n"],"names":["$router","useRouter","routes","computed","v","_a","showRoutes","reactive","handleChangeRoute","r","SuperOverviewApi","ElMessage","editConfig","ref","jsonData","updateJsonData","useSiteAllConfig","editJSON","handleEditConfig","handleSaveConfig","data","onMounted"],"mappings":"0cAOA,MAAMA,EAAUC,IACVC,EAASC,EAAS,IACtBH,EAAQ,QAAQ,OAAO,OAAYI,GAAA,OAAA,OAAAC,EAAAD,EAAE,OAAF,YAAAC,EAAQ,cAAa,CAAA,EAEpDC,EAAaC,EAOjB,CAAA,CAAE,EAEJ,SAASC,EAAkBC,EAA2B,CACnCC,EAAA,iBAAiBD,EAAE,KAAM,CAACA,EAAE,QAAQ,EAAE,KAAK,IAAM,CAC9DA,EAAA,SAAW,CAACA,EAAE,SAChBE,EAAU,QAAQ,MAAM,CAAA,CACzB,CACH,CAEM,MAAAC,EAAaC,EAAI,EAAK,EACtB,CAAE,MAAOC,EAAU,YAAaC,CAAA,EAAmBC,IAEnDC,EAAWJ,EAAI,EAAE,EAEvB,SAASK,GAAmB,CAC1BN,EAAW,MAAQ,GACnBK,EAAS,MAAQ,KAAK,UAAUH,EAAS,MAAO,KAAM,CAAC,CACzD,CACA,eAAeK,GAAmB,CAC5B,GAAA,CACF,MAAMC,EAAO,KAAK,MAAMH,EAAS,KAAK,EACtCH,EAAS,MAAQM,EACjB,MAAML,EAAe,EACrBH,EAAW,MAAQ,GACnBD,EAAU,QAAQ,MAAM,QAEnB,EAAG,CACD,OAAAA,EAAU,MAAM,WAAW,CACpC,CACF,CACA,OAAAU,EAAU,IAAM,CACH,UAAAZ,KAAKP,EAAO,MACrBQ,EAAiB,mBAAmBD,EAAE,IAAI,EAAE,KAAML,GAAM,OACtDE,EAAW,KAAK,CACd,KAAMG,EAAE,KACR,KAAMA,EAAE,KAAK,SAAS,EACtB,MAAOA,EAAE,KAAK,MACd,SAAU,CAAC,GAACJ,EAAAD,EAAE,OAAF,MAAAC,EAAQ,OAAA,CACrB,CAAA,CACF,CACH,CACD"}
1
+ {"version":3,"file":"index-C0niS8Vv.js","sources":["../../src/pages/dashboard/manage/config/index.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ElMessage } from 'element-plus'\nimport { computed, onMounted, reactive, ref } from 'vue'\nimport { useRouter } from 'vue-router'\nimport { SuperOverviewApi } from '@/apis'\nimport { useSiteAllConfig } from '@/composables'\n\nconst $router = useRouter()\nconst routes = computed(() =>\n $router.options.routes.filter(v => v.meta?.allowDisabled),\n)\nconst showRoutes = reactive<\n {\n path: string\n name: string\n title: string\n disabled: boolean\n }[]\n>([])\n\nfunction handleChangeRoute(r: (typeof showRoutes)[0]) {\n SuperOverviewApi.addDisabledRoute(r.path, !r.disabled).then(() => {\n r.disabled = !r.disabled\n ElMessage.success('切换成功')\n })\n}\n\nconst editConfig = ref(false)\nconst { value: jsonData, updateValue: updateJsonData } = useSiteAllConfig()\n\nconst editJSON = ref('')\n\nfunction handleEditConfig() {\n editConfig.value = true\n editJSON.value = JSON.stringify(jsonData.value, null, 2)\n}\nasync function handleSaveConfig() {\n try {\n const data = JSON.parse(editJSON.value)\n jsonData.value = data\n await updateJsonData()\n editConfig.value = false\n ElMessage.success('保存成功')\n }\n catch (e) {\n return ElMessage.error('JSON 格式错误')\n }\n}\nonMounted(() => {\n for (const r of routes.value) {\n SuperOverviewApi.checkDisabledRoute(r.path).then((v) => {\n showRoutes.push({\n path: r.path,\n name: r.name.toString(),\n title: r.meta.title,\n disabled: !!v.data?.status,\n })\n })\n }\n})\n</script>\n\n<template>\n <div class=\"user\">\n <div class=\"panel\">\n <el-divider>禁用路由管理</el-divider>\n <ul class=\"routes\">\n <li v-for=\"r in showRoutes\" :key=\"r.name\">\n <el-switch\n :model-value=\"!r.disabled\" style=\"\n --el-switch-on-color: #13ce66;\n --el-switch-off-color: #ff4949;\n \" @change=\"handleChangeRoute(r)\"\n />\n <span class=\"title\">{{ r.title }}</span>\n <span class=\"path\">{{ r.path }}{{ r.path === '/register' ? ' 关闭后将同时禁用注册功能' : '' }}</span>\n </li>\n </ul>\n <el-divider>全局配置管理(JSON)</el-divider>\n <div class=\"config-btn\">\n <el-button v-if=\"!editConfig\" size=\"small\" type=\"primary\" @click=\"handleEditConfig\">\n 更新\n </el-button>\n <template v-else>\n <el-button size=\"small\" type=\"danger\" @click=\"editConfig = false\">\n 取消\n </el-button>\n <el-button size=\"small\" type=\"success\" @click=\"handleSaveConfig\">\n 保存\n </el-button>\n </template>\n </div>\n <div class=\"config-panel\">\n <json-viewer\n v-if=\"!editConfig\"\n :value=\"jsonData\"\n :expand-depth=\"5\"\n copyable\n boxed\n sort\n />\n <!-- TODO: JSON editor -->\n <el-input\n v-else\n v-model=\"editJSON\"\n :autosize=\"{ minRows: 2, maxRows: 30 }\"\n type=\"textarea\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n@media screen and (max-width: 700px) {\n .user {\n margin-top: 40px !important;\n }\n}\n\n.user {\n margin: 0 auto;\n}\n\n.panel {\n max-width: 1256px;\n padding: 1em;\n background-color: #fff;\n margin: 10px auto;\n box-sizing: border-box;\n box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);\n border-radius: 4px;\n}\n\n.routes {\n max-width: 500px;\n margin: 0 auto;\n\n li {\n display: flex;\n padding: 20px;\n align-items: center;\n\n .title {\n font-weight: bold;\n margin: 0 10px;\n }\n }\n}\n.config-btn {\n text-align: center;\n}\n.config-panel {\n max-width: 500px;\n margin: 0 auto;\n}\n</style>\n"],"names":["$router","useRouter","routes","computed","v","_a","showRoutes","reactive","handleChangeRoute","r","SuperOverviewApi","ElMessage","editConfig","ref","jsonData","updateJsonData","useSiteAllConfig","editJSON","handleEditConfig","handleSaveConfig","data","onMounted"],"mappings":"0cAOA,MAAMA,EAAUC,IACVC,EAASC,EAAS,IACtBH,EAAQ,QAAQ,OAAO,OAAYI,GAAA,OAAA,OAAAC,EAAAD,EAAE,OAAF,YAAAC,EAAQ,cAAa,CAAA,EAEpDC,EAAaC,EAOjB,CAAA,CAAE,EAEJ,SAASC,EAAkBC,EAA2B,CACnCC,EAAA,iBAAiBD,EAAE,KAAM,CAACA,EAAE,QAAQ,EAAE,KAAK,IAAM,CAC9DA,EAAA,SAAW,CAACA,EAAE,SAChBE,EAAU,QAAQ,MAAM,CAAA,CACzB,CACH,CAEM,MAAAC,EAAaC,EAAI,EAAK,EACtB,CAAE,MAAOC,EAAU,YAAaC,CAAA,EAAmBC,IAEnDC,EAAWJ,EAAI,EAAE,EAEvB,SAASK,GAAmB,CAC1BN,EAAW,MAAQ,GACnBK,EAAS,MAAQ,KAAK,UAAUH,EAAS,MAAO,KAAM,CAAC,CACzD,CACA,eAAeK,GAAmB,CAC5B,GAAA,CACF,MAAMC,EAAO,KAAK,MAAMH,EAAS,KAAK,EACtCH,EAAS,MAAQM,EACjB,MAAML,EAAe,EACrBH,EAAW,MAAQ,GACnBD,EAAU,QAAQ,MAAM,QAEnB,EAAG,CACD,OAAAA,EAAU,MAAM,WAAW,CACpC,CACF,CACA,OAAAU,EAAU,IAAM,CACH,UAAAZ,KAAKP,EAAO,MACrBQ,EAAiB,mBAAmBD,EAAE,IAAI,EAAE,KAAML,GAAM,OACtDE,EAAW,KAAK,CACd,KAAMG,EAAE,KACR,KAAMA,EAAE,KAAK,SAAS,EACtB,MAAOA,EAAE,KAAK,MACd,SAAU,CAAC,GAACJ,EAAAD,EAAE,OAAF,MAAAC,EAAQ,OAAA,CACrB,CAAA,CACF,CACH,CACD"}
@@ -1,2 +1,2 @@
1
- import{N as ue,d as P,Q as T,a as S,D as ge,w as M,T as B,V as Ie,bg as Le,k as G,bh as Te,am as I,bi as ee,bj as pe,bk as He,O as v,bl as We,J as Me,ay as ye,aj as ae,b3 as se,r as $,ax as je,ba as De,Z as _e,$ as te,ai as he,o as re,ak as Se,bm as _,I as xe,W as Ee,a8 as Re,a9 as Ve,F as Ce,bn as ke,al as be,b2 as qe,a7 as Fe,b4 as Ge,bo as Ue,aU as J,bp as Je,au as Ke,ao as Qe,bq as Ye,i as Be,c as W,b as j,H as le,e as U,t as Ze,Y as Xe,aE as $e,g as et,u as tt,a1 as nt,j as C,br as ot,_ as at}from"./index-yrncPnXk.js";import{d as st}from"./data-analysis-CVdTnsNg.js";import{d as lt}from"./data-board-CKaKy1IB.js";import{t as ne}from"./aria-nkjrUMQ-.js";const ut={name:"ElCollapseTransition"},rt=P({...ut,setup(e){const o=T("collapse-transition"),n={beforeEnter(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0},enter(t){t.dataset.oldOverflow=t.style.overflow,t.scrollHeight!==0?(t.style.maxHeight="".concat(t.scrollHeight,"px"),t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.maxHeight=0,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},afterEnter(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow},beforeLeave(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.maxHeight="".concat(t.scrollHeight,"px"),t.style.overflow="hidden"},leave(t){t.scrollHeight!==0&&(t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom}};return(t,l)=>(S(),ge(Te,Ie({name:G(o).b()},Le(n)),{default:M(()=>[B(t.$slots,"default")]),_:3},16,["name"]))}});var oe=ue(rt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);oe.install=e=>{e.component(oe.name,oe)};const it=oe;let dt=class{constructor(o,n){this.parent=o,this.domNode=n,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(o){o===this.subMenuItems.length?o=0:o<0&&(o=this.subMenuItems.length-1),this.subMenuItems[o].focus(),this.subIndex=o}addListeners(){const o=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",t=>{let l=!1;switch(t.code){case I.down:{this.gotoSubIndex(this.subIndex+1),l=!0;break}case I.up:{this.gotoSubIndex(this.subIndex-1),l=!0;break}case I.tab:{ne(o,"mouseleave");break}case I.enter:case I.space:{l=!0,t.currentTarget.click();break}}return l&&(t.preventDefault(),t.stopPropagation()),!1})})}},ct=class{constructor(o,n){this.domNode=o,this.submenu=null,this.submenu=null,this.init(n)}init(o){this.domNode.setAttribute("tabindex","0");const n=this.domNode.querySelector(".".concat(o,"-menu"));n&&(this.submenu=new dt(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",o=>{let n=!1;switch(o.code){case I.down:{ne(o.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case I.up:{ne(o.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case I.tab:{ne(o.currentTarget,"mouseleave");break}case I.enter:case I.space:{n=!0,o.currentTarget.click();break}}n&&o.preventDefault()})}},pt=class{constructor(o,n){this.domNode=o,this.init(n)}init(o){const n=this.domNode.childNodes;Array.from(n).forEach(t=>{t.nodeType===1&&new ct(t,o)})}};const mt=P({name:"ElMenuCollapseTransition",setup(){const e=T("menu");return{listeners:{onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,t){ee(n,"".concat(e.namespace.value,"-opacity-transition")),n.style.opacity="1",t()},onAfterEnter(n){pe(n,"".concat(e.namespace.value,"-opacity-transition")),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),He(n,e.m("collapse"))?(pe(n,e.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),ee(n,e.m("collapse"))):(ee(n,e.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),pe(n,e.m("collapse"))),n.style.width="".concat(n.scrollWidth,"px"),n.style.overflow="hidden"},onLeave(n){ee(n,"horizontal-collapse-transition"),n.style.width="".concat(n.dataset.scrollWidth,"px")}}}}});function vt(e,o,n,t,l,y){return S(),ge(Te,Ie({mode:"out-in"},e.listeners),{default:M(()=>[B(e.$slots,"default")]),_:3},16)}var ft=ue(mt,[["render",vt],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function Pe(e,o){const n=v(()=>{let l=e.parent;const y=[o.value];for(;l.type.name!=="ElMenu";)l.props.index&&y.unshift(l.props.index),l=l.parent;return y});return{parentMenu:v(()=>{let l=e.parent;for(;l&&!["ElMenu","ElSubMenu"].includes(l.type.name);)l=l.parent;return l}),indexPath:n}}function ht(e){return v(()=>{const n=e.backgroundColor;return n?new We(n).shade(20).toString():""})}const Ne=(e,o)=>{const n=T("menu");return v(()=>n.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":ht(e).value||"","active-color":e.activeTextColor||"",level:"".concat(o)}))},bt=Me({index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0},popperOffset:{type:Number,default:6}}),me="ElSubMenu";var we=P({name:me,props:bt,setup(e,{slots:o,expose:n}){const t=ye(),{indexPath:l,parentMenu:y}=Pe(t,v(()=>e.index)),d=T("menu"),h=T("sub-menu"),a=ae("rootMenu");a||se(me,"can not inject root menu");const i=ae("subMenu:".concat(y.value.uid));i||se(me,"can not inject sub menu");const m=$({}),x=$({});let w;const K=$(!1),ie=$(),N=$(null),z=v(()=>c.value==="horizontal"&&L.value?"bottom-start":"right-start"),de=v(()=>c.value==="horizontal"&&L.value||c.value==="vertical"&&!a.props.collapse?je:De),L=v(()=>i.level===0),D=v(()=>e.popperAppendToBody===void 0?L.value:!!e.popperAppendToBody),Q=v(()=>a.props.collapse?"".concat(d.namespace.value,"-zoom-in-left"):"".concat(d.namespace.value,"-zoom-in-top")),R=v(()=>c.value==="horizontal"&&L.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","left-start","bottom-start","bottom-end","top-start","top-end"]),E=v(()=>a.openedMenus.includes(e.index)),s=v(()=>{let p=!1;return Object.values(m.value).forEach(g=>{g.active&&(p=!0)}),Object.values(x.value).forEach(g=>{g.active&&(p=!0)}),p}),u=v(()=>a.props.backgroundColor||""),r=v(()=>a.props.activeTextColor||""),b=v(()=>a.props.textColor||""),c=v(()=>a.props.mode),k=_e({index:e.index,indexPath:l,active:s}),Y=v(()=>c.value!=="horizontal"?{color:b.value}:{borderBottomColor:s.value?a.props.activeTextColor?r.value:"":"transparent",color:s.value?r.value:b.value}),Z=()=>{var p,g,f;return(f=(g=(p=N.value)==null?void 0:p.popperRef)==null?void 0:g.popperInstanceRef)==null?void 0:f.destroy()},ce=p=>{p||Z()},V=()=>{a.props.menuTrigger==="hover"&&a.props.mode==="horizontal"||a.props.collapse&&a.props.mode==="vertical"||e.disabled||a.handleSubMenuClick({index:e.index,indexPath:l.value,active:s.value})},H=(p,g=e.showTimeout)=>{var f;p.type!=="focus"&&(a.props.menuTrigger==="click"&&a.props.mode==="horizontal"||!a.props.collapse&&a.props.mode==="vertical"||e.disabled||(i.mouseInChild.value=!0,w==null||w(),{stop:w}=ke(()=>{a.openMenu(e.index,l.value)},g),D.value&&((f=y.value.vnode.el)==null||f.dispatchEvent(new MouseEvent("mouseenter")))))},q=(p=!1)=>{var g,f;a.props.menuTrigger==="click"&&a.props.mode==="horizontal"||!a.props.collapse&&a.props.mode==="vertical"||(w==null||w(),i.mouseInChild.value=!1,{stop:w}=ke(()=>!K.value&&a.closeMenu(e.index,l.value),e.hideTimeout),D.value&&p&&((g=t.parent)==null?void 0:g.type.name)==="ElSubMenu"&&((f=i.handleMouseleave)==null||f.call(i,!0)))};te(()=>a.props.collapse,p=>ce(!!p));{const p=f=>{x.value[f.index]=f},g=f=>{delete x.value[f.index]};he("subMenu:".concat(t.uid),{addSubMenu:p,removeSubMenu:g,handleMouseleave:q,mouseInChild:K,level:i.level+1})}return n({opened:E}),re(()=>{a.addSubMenu(k),i.addSubMenu(k)}),Se(()=>{i.removeSubMenu(k),a.removeSubMenu(k)}),()=>{var p;const g=[(p=o.title)==null?void 0:p.call(o),_(xe,{class:h.e("icon-arrow")},{default:()=>_(de.value)})],f=Ne(a.props,i.level+1),F=a.isMenuPopup?_(Ee,{ref:N,visible:E.value,effect:"light",pure:!0,offset:e.popperOffset,showArrow:!1,persistent:!0,popperClass:e.popperClass,placement:z.value,teleported:D.value,fallbackPlacements:R.value,transition:Q.value,gpuAcceleration:!1},{content:()=>{var A;return _("div",{class:[d.m(c.value),d.m("popup-container"),e.popperClass],onMouseenter:O=>H(O,100),onMouseleave:()=>q(!0),onFocus:O=>H(O,100)},[_("ul",{class:[d.b(),d.m("popup"),d.m("popup-".concat(z.value))],style:f.value},[(A=o.default)==null?void 0:A.call(o)])])},default:()=>_("div",{class:h.e("title"),style:[Y.value,{backgroundColor:u.value}],onClick:V},g)}):_(Ce,{},[_("div",{class:h.e("title"),style:[Y.value,{backgroundColor:u.value}],ref:ie,onClick:V},g),_(it,{},{default:()=>{var A;return Re(_("ul",{role:"menu",class:[d.b(),d.m("inline")],style:f.value},[(A=o.default)==null?void 0:A.call(o)]),[[Ve,E.value]])}})]);return _("li",{class:[h.b(),h.is("active",s.value),h.is("opened",E.value),h.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:E.value,onMouseenter:H,onMouseleave:()=>q(!0),onFocus:H},[F])}}});const gt=Me({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:be(Array),default:()=>qe([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0}}),ve=e=>Array.isArray(e)&&e.every(o=>J(o)),Mt={close:(e,o)=>J(e)&&ve(o),open:(e,o)=>J(e)&&ve(o),select:(e,o,n,t)=>J(e)&&ve(o)&&Je(n)&&(t===void 0||t instanceof Promise)};var yt=P({name:"ElMenu",props:gt,emits:Mt,setup(e,{emit:o,slots:n,expose:t}){const l=ye(),y=l.appContext.config.globalProperties.$router,d=$(),h=T("menu"),a=T("sub-menu"),i=$(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),m=$(e.defaultActive),x=$({}),w=$({}),K=v(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),ie=()=>{const s=m.value&&x.value[m.value];if(!s||e.mode==="horizontal"||e.collapse)return;s.indexPath.forEach(r=>{const b=w.value[r];b&&N(r,b.indexPath)})},N=(s,u)=>{i.value.includes(s)||(e.uniqueOpened&&(i.value=i.value.filter(r=>u.includes(r))),i.value.push(s),o("open",s,u))},z=(s,u)=>{const r=i.value.indexOf(s);r!==-1&&i.value.splice(r,1),o("close",s,u)},de=({index:s,indexPath:u})=>{i.value.includes(s)?z(s,u):N(s,u)},L=s=>{(e.mode==="horizontal"||e.collapse)&&(i.value=[]);const{index:u,indexPath:r}=s;if(!(u===void 0||r===void 0))if(e.router&&y){const b=s.route||u,c=y.push(b).then(k=>(k||(m.value=u),k));o("select",u,r,{index:u,indexPath:r,route:b},c)}else m.value=u,o("select",u,r,{index:u,indexPath:r})},D=s=>{const u=x.value,r=u[s]||m.value&&u[m.value]||u[e.defaultActive];r?m.value=r.index:m.value=s},Q=()=>{Ke(()=>l.proxy.$forceUpdate())};te(()=>e.defaultActive,s=>{x.value[s]||(m.value=""),D(s)}),te(()=>e.collapse,s=>{s&&(i.value=[])}),te(x.value,ie);let R;Fe(()=>{e.mode==="horizontal"&&e.ellipsis?R=Ge(d,Q).stop:R==null||R()});{const s=c=>{w.value[c.index]=c},u=c=>{delete w.value[c.index]};he("rootMenu",_e({props:e,openedMenus:i,items:x,subMenus:w,activeIndex:m,isMenuPopup:K,addMenuItem:c=>{x.value[c.index]=c},removeMenuItem:c=>{delete x.value[c.index]},addSubMenu:s,removeSubMenu:u,openMenu:N,closeMenu:z,handleMenuItemClick:L,handleSubMenuClick:de})),he("subMenu:".concat(l.uid),{addSubMenu:s,removeSubMenu:u,mouseInChild:$(!1),level:0})}re(()=>{e.mode==="horizontal"&&new pt(l.vnode.el,h.namespace.value)}),t({open:u=>{const{indexPath:r}=w.value[u];r.forEach(b=>N(b,r))},close:z,handleResize:Q});const E=s=>{const u=Array.isArray(s)?s:[s],r=[];return u.forEach(b=>{Array.isArray(b.children)?r.push(...E(b.children)):r.push(b)}),r};return()=>{var s,u,r,b;let c=(u=(s=n.default)==null?void 0:s.call(n))!=null?u:[];const k=[];if(e.mode==="horizontal"&&d.value){const ce=Array.from((b=(r=d.value)==null?void 0:r.childNodes)!=null?b:[]).filter(X=>X.nodeName!=="#text"||X.nodeValue),V=E(c),H=64,q=Number.parseInt(getComputedStyle(d.value).paddingLeft,10),p=Number.parseInt(getComputedStyle(d.value).paddingRight,10),g=d.value.clientWidth-q-p;let f=0,F=0;ce.forEach((X,ze)=>{f+=X.offsetWidth||0,f<=g-H&&(F=ze+1)});const A=V.slice(0,F),O=V.slice(F);O!=null&&O.length&&e.ellipsis&&(c=A,k.push(_(we,{index:"sub-menu-more",class:a.e("hide-arrow")},{title:()=>_(xe,{class:a.e("icon-more")},{default:()=>_(Ue)}),default:()=>O})))}const Y=Ne(e,0),Z=_("ul",{key:String(e.collapse),role:"menubar",ref:d,style:Y.value,class:{[h.b()]:!0,[h.m(e.mode)]:!0,[h.m("collapse")]:e.collapse}},[...c,...k]);return e.collapseTransition&&e.mode==="vertical"?_(ft,()=>Z):Z}}});const _t=Me({index:{type:be([String,null]),default:null},route:{type:be([String,Object])},disabled:Boolean}),xt={click:e=>J(e.index)&&Array.isArray(e.indexPath)},fe="ElMenuItem",Ct=P({name:fe,components:{ElTooltip:Ee},props:_t,emits:xt,setup(e,{emit:o}){const n=ye(),t=ae("rootMenu"),l=T("menu"),y=T("menu-item");t||se(fe,"can not inject root menu");const{parentMenu:d,indexPath:h}=Pe(n,Qe(e,"index")),a=ae("subMenu:".concat(d.value.uid));a||se(fe,"can not inject sub menu");const i=v(()=>e.index===t.activeIndex),m=_e({index:e.index,indexPath:h,active:i}),x=()=>{e.disabled||(t.handleMenuItemClick({index:e.index,indexPath:h.value,route:e.route}),o("click",m))};return re(()=>{a.addSubMenu(m),t.addMenuItem(m)}),Se(()=>{a.removeSubMenu(m),t.removeMenuItem(m)}),{Effect:Ye,parentMenu:d,rootMenu:t,active:i,nsMenu:l,nsMenuItem:y,handleClick:x}}});function $t(e,o,n,t,l,y){const d=Be("el-tooltip");return S(),W("li",{class:le([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:o[0]||(o[0]=(...h)=>e.handleClick&&e.handleClick(...h))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(S(),ge(d,{key:0,effect:e.Effect.DARK,placement:"right","fallback-placements":["left"],persistent:""},{content:M(()=>[B(e.$slots,"title")]),default:M(()=>[j("div",{class:le(e.nsMenu.be("tooltip","trigger"))},[B(e.$slots,"default")],2)]),_:3},8,["effect"])):(S(),W(Ce,{key:1},[B(e.$slots,"default"),B(e.$slots,"title")],64))],2)}var Ae=ue(Ct,[["render",$t],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const wt={title:String},kt="ElMenuItemGroup",It=P({name:kt,props:wt,setup(){return{ns:T("menu-item-group")}}});function Tt(e,o,n,t,l,y){return S(),W("li",{class:le(e.ns.b())},[j("div",{class:le(e.ns.e("title"))},[e.$slots.title?B(e.$slots,"title",{key:1}):(S(),W(Ce,{key:0},[U(Ze(e.title),1)],64))],2),j("ul",null,[B(e.$slots,"default")])],2)}var Oe=ue(It,[["render",Tt],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const St=Xe(yt,{MenuItem:Ae,MenuItemGroup:Oe,SubMenu:we}),Et=$e(Ae);$e(Oe);$e(we);const Bt=P({name:"Setting"}),Pt={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Nt=j("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384zm0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256z"},null,-1),At=[Nt];function Ot(e,o,n,t,l,y){return S(),W("svg",Pt,At)}var zt=et(Bt,[["render",Ot]]);const Lt={class:"monitor"},Ht={class:"navs"},Wt={class:"container"},jt=P({__name:"index",setup(e){const o=$("overview"),n=$(!1),t=tt(),l=nt(),y=d=>{l.path.endsWith(d)||t.replace({path:d})};return re(()=>{const d=l.path.split("/").slice(-1)[0];o.value=d}),(d,h)=>{const a=xe,i=Et,m=St,x=Be("router-view");return S(),W("div",Lt,[j("div",Ht,[C(m,{"default-active":o.value,class:"el-menu-nav",collapse:n.value,onSelect:y},{default:M(()=>[C(i,{index:"overview"},{title:M(()=>[U("概况")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(st))]),_:1})]),_:1}),C(i,{index:"user"},{title:M(()=>[U("用户")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(ot))]),_:1})]),_:1}),C(i,{index:"wish"},{title:M(()=>[U("需求")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(lt))]),_:1})]),_:1}),C(i,{index:"config"},{title:M(()=>[U("配置")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(zt))]),_:1})]),_:1})]),_:1},8,["default-active","collapse"])]),j("div",Wt,[C(x)])])}}}),Jt=at(jt,[["__scopeId","data-v-67f8ea8e"]]);export{Jt as default};
2
- //# sourceMappingURL=index-BdVQjSN6.js.map
1
+ import{N as ue,d as P,Q as T,a as S,D as ge,w as M,T as B,V as Ie,bg as Le,k as G,bh as Te,am as I,bi as ee,bj as pe,bk as He,O as v,bl as We,J as Me,ay as ye,aj as ae,b3 as se,r as $,ax as je,ba as De,Z as _e,$ as te,ai as he,o as re,ak as Se,bm as _,I as xe,W as Ee,a8 as Re,a9 as Ve,F as Ce,bn as ke,al as be,b2 as qe,a7 as Fe,b4 as Ge,bo as Ue,aU as J,bp as Je,au as Ke,ao as Qe,bq as Ye,i as Be,c as W,b as j,H as le,e as U,t as Ze,Y as Xe,aE as $e,g as et,u as tt,a1 as nt,j as C,br as ot,_ as at}from"./index-D80lTVeV.js";import{d as st}from"./data-analysis-B61f8OZD.js";import{d as lt}from"./data-board-BIN3HXKE.js";import{t as ne}from"./aria-nkjrUMQ-.js";const ut={name:"ElCollapseTransition"},rt=P({...ut,setup(e){const o=T("collapse-transition"),n={beforeEnter(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0},enter(t){t.dataset.oldOverflow=t.style.overflow,t.scrollHeight!==0?(t.style.maxHeight="".concat(t.scrollHeight,"px"),t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.maxHeight=0,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},afterEnter(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow},beforeLeave(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.maxHeight="".concat(t.scrollHeight,"px"),t.style.overflow="hidden"},leave(t){t.scrollHeight!==0&&(t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom}};return(t,l)=>(S(),ge(Te,Ie({name:G(o).b()},Le(n)),{default:M(()=>[B(t.$slots,"default")]),_:3},16,["name"]))}});var oe=ue(rt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);oe.install=e=>{e.component(oe.name,oe)};const it=oe;let dt=class{constructor(o,n){this.parent=o,this.domNode=n,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(o){o===this.subMenuItems.length?o=0:o<0&&(o=this.subMenuItems.length-1),this.subMenuItems[o].focus(),this.subIndex=o}addListeners(){const o=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",t=>{let l=!1;switch(t.code){case I.down:{this.gotoSubIndex(this.subIndex+1),l=!0;break}case I.up:{this.gotoSubIndex(this.subIndex-1),l=!0;break}case I.tab:{ne(o,"mouseleave");break}case I.enter:case I.space:{l=!0,t.currentTarget.click();break}}return l&&(t.preventDefault(),t.stopPropagation()),!1})})}},ct=class{constructor(o,n){this.domNode=o,this.submenu=null,this.submenu=null,this.init(n)}init(o){this.domNode.setAttribute("tabindex","0");const n=this.domNode.querySelector(".".concat(o,"-menu"));n&&(this.submenu=new dt(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",o=>{let n=!1;switch(o.code){case I.down:{ne(o.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case I.up:{ne(o.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case I.tab:{ne(o.currentTarget,"mouseleave");break}case I.enter:case I.space:{n=!0,o.currentTarget.click();break}}n&&o.preventDefault()})}},pt=class{constructor(o,n){this.domNode=o,this.init(n)}init(o){const n=this.domNode.childNodes;Array.from(n).forEach(t=>{t.nodeType===1&&new ct(t,o)})}};const mt=P({name:"ElMenuCollapseTransition",setup(){const e=T("menu");return{listeners:{onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,t){ee(n,"".concat(e.namespace.value,"-opacity-transition")),n.style.opacity="1",t()},onAfterEnter(n){pe(n,"".concat(e.namespace.value,"-opacity-transition")),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),He(n,e.m("collapse"))?(pe(n,e.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),ee(n,e.m("collapse"))):(ee(n,e.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),pe(n,e.m("collapse"))),n.style.width="".concat(n.scrollWidth,"px"),n.style.overflow="hidden"},onLeave(n){ee(n,"horizontal-collapse-transition"),n.style.width="".concat(n.dataset.scrollWidth,"px")}}}}});function vt(e,o,n,t,l,y){return S(),ge(Te,Ie({mode:"out-in"},e.listeners),{default:M(()=>[B(e.$slots,"default")]),_:3},16)}var ft=ue(mt,[["render",vt],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function Pe(e,o){const n=v(()=>{let l=e.parent;const y=[o.value];for(;l.type.name!=="ElMenu";)l.props.index&&y.unshift(l.props.index),l=l.parent;return y});return{parentMenu:v(()=>{let l=e.parent;for(;l&&!["ElMenu","ElSubMenu"].includes(l.type.name);)l=l.parent;return l}),indexPath:n}}function ht(e){return v(()=>{const n=e.backgroundColor;return n?new We(n).shade(20).toString():""})}const Ne=(e,o)=>{const n=T("menu");return v(()=>n.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":ht(e).value||"","active-color":e.activeTextColor||"",level:"".concat(o)}))},bt=Me({index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0},popperOffset:{type:Number,default:6}}),me="ElSubMenu";var we=P({name:me,props:bt,setup(e,{slots:o,expose:n}){const t=ye(),{indexPath:l,parentMenu:y}=Pe(t,v(()=>e.index)),d=T("menu"),h=T("sub-menu"),a=ae("rootMenu");a||se(me,"can not inject root menu");const i=ae("subMenu:".concat(y.value.uid));i||se(me,"can not inject sub menu");const m=$({}),x=$({});let w;const K=$(!1),ie=$(),N=$(null),z=v(()=>c.value==="horizontal"&&L.value?"bottom-start":"right-start"),de=v(()=>c.value==="horizontal"&&L.value||c.value==="vertical"&&!a.props.collapse?je:De),L=v(()=>i.level===0),D=v(()=>e.popperAppendToBody===void 0?L.value:!!e.popperAppendToBody),Q=v(()=>a.props.collapse?"".concat(d.namespace.value,"-zoom-in-left"):"".concat(d.namespace.value,"-zoom-in-top")),R=v(()=>c.value==="horizontal"&&L.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","left-start","bottom-start","bottom-end","top-start","top-end"]),E=v(()=>a.openedMenus.includes(e.index)),s=v(()=>{let p=!1;return Object.values(m.value).forEach(g=>{g.active&&(p=!0)}),Object.values(x.value).forEach(g=>{g.active&&(p=!0)}),p}),u=v(()=>a.props.backgroundColor||""),r=v(()=>a.props.activeTextColor||""),b=v(()=>a.props.textColor||""),c=v(()=>a.props.mode),k=_e({index:e.index,indexPath:l,active:s}),Y=v(()=>c.value!=="horizontal"?{color:b.value}:{borderBottomColor:s.value?a.props.activeTextColor?r.value:"":"transparent",color:s.value?r.value:b.value}),Z=()=>{var p,g,f;return(f=(g=(p=N.value)==null?void 0:p.popperRef)==null?void 0:g.popperInstanceRef)==null?void 0:f.destroy()},ce=p=>{p||Z()},V=()=>{a.props.menuTrigger==="hover"&&a.props.mode==="horizontal"||a.props.collapse&&a.props.mode==="vertical"||e.disabled||a.handleSubMenuClick({index:e.index,indexPath:l.value,active:s.value})},H=(p,g=e.showTimeout)=>{var f;p.type!=="focus"&&(a.props.menuTrigger==="click"&&a.props.mode==="horizontal"||!a.props.collapse&&a.props.mode==="vertical"||e.disabled||(i.mouseInChild.value=!0,w==null||w(),{stop:w}=ke(()=>{a.openMenu(e.index,l.value)},g),D.value&&((f=y.value.vnode.el)==null||f.dispatchEvent(new MouseEvent("mouseenter")))))},q=(p=!1)=>{var g,f;a.props.menuTrigger==="click"&&a.props.mode==="horizontal"||!a.props.collapse&&a.props.mode==="vertical"||(w==null||w(),i.mouseInChild.value=!1,{stop:w}=ke(()=>!K.value&&a.closeMenu(e.index,l.value),e.hideTimeout),D.value&&p&&((g=t.parent)==null?void 0:g.type.name)==="ElSubMenu"&&((f=i.handleMouseleave)==null||f.call(i,!0)))};te(()=>a.props.collapse,p=>ce(!!p));{const p=f=>{x.value[f.index]=f},g=f=>{delete x.value[f.index]};he("subMenu:".concat(t.uid),{addSubMenu:p,removeSubMenu:g,handleMouseleave:q,mouseInChild:K,level:i.level+1})}return n({opened:E}),re(()=>{a.addSubMenu(k),i.addSubMenu(k)}),Se(()=>{i.removeSubMenu(k),a.removeSubMenu(k)}),()=>{var p;const g=[(p=o.title)==null?void 0:p.call(o),_(xe,{class:h.e("icon-arrow")},{default:()=>_(de.value)})],f=Ne(a.props,i.level+1),F=a.isMenuPopup?_(Ee,{ref:N,visible:E.value,effect:"light",pure:!0,offset:e.popperOffset,showArrow:!1,persistent:!0,popperClass:e.popperClass,placement:z.value,teleported:D.value,fallbackPlacements:R.value,transition:Q.value,gpuAcceleration:!1},{content:()=>{var A;return _("div",{class:[d.m(c.value),d.m("popup-container"),e.popperClass],onMouseenter:O=>H(O,100),onMouseleave:()=>q(!0),onFocus:O=>H(O,100)},[_("ul",{class:[d.b(),d.m("popup"),d.m("popup-".concat(z.value))],style:f.value},[(A=o.default)==null?void 0:A.call(o)])])},default:()=>_("div",{class:h.e("title"),style:[Y.value,{backgroundColor:u.value}],onClick:V},g)}):_(Ce,{},[_("div",{class:h.e("title"),style:[Y.value,{backgroundColor:u.value}],ref:ie,onClick:V},g),_(it,{},{default:()=>{var A;return Re(_("ul",{role:"menu",class:[d.b(),d.m("inline")],style:f.value},[(A=o.default)==null?void 0:A.call(o)]),[[Ve,E.value]])}})]);return _("li",{class:[h.b(),h.is("active",s.value),h.is("opened",E.value),h.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:E.value,onMouseenter:H,onMouseleave:()=>q(!0),onFocus:H},[F])}}});const gt=Me({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:be(Array),default:()=>qe([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0}}),ve=e=>Array.isArray(e)&&e.every(o=>J(o)),Mt={close:(e,o)=>J(e)&&ve(o),open:(e,o)=>J(e)&&ve(o),select:(e,o,n,t)=>J(e)&&ve(o)&&Je(n)&&(t===void 0||t instanceof Promise)};var yt=P({name:"ElMenu",props:gt,emits:Mt,setup(e,{emit:o,slots:n,expose:t}){const l=ye(),y=l.appContext.config.globalProperties.$router,d=$(),h=T("menu"),a=T("sub-menu"),i=$(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),m=$(e.defaultActive),x=$({}),w=$({}),K=v(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),ie=()=>{const s=m.value&&x.value[m.value];if(!s||e.mode==="horizontal"||e.collapse)return;s.indexPath.forEach(r=>{const b=w.value[r];b&&N(r,b.indexPath)})},N=(s,u)=>{i.value.includes(s)||(e.uniqueOpened&&(i.value=i.value.filter(r=>u.includes(r))),i.value.push(s),o("open",s,u))},z=(s,u)=>{const r=i.value.indexOf(s);r!==-1&&i.value.splice(r,1),o("close",s,u)},de=({index:s,indexPath:u})=>{i.value.includes(s)?z(s,u):N(s,u)},L=s=>{(e.mode==="horizontal"||e.collapse)&&(i.value=[]);const{index:u,indexPath:r}=s;if(!(u===void 0||r===void 0))if(e.router&&y){const b=s.route||u,c=y.push(b).then(k=>(k||(m.value=u),k));o("select",u,r,{index:u,indexPath:r,route:b},c)}else m.value=u,o("select",u,r,{index:u,indexPath:r})},D=s=>{const u=x.value,r=u[s]||m.value&&u[m.value]||u[e.defaultActive];r?m.value=r.index:m.value=s},Q=()=>{Ke(()=>l.proxy.$forceUpdate())};te(()=>e.defaultActive,s=>{x.value[s]||(m.value=""),D(s)}),te(()=>e.collapse,s=>{s&&(i.value=[])}),te(x.value,ie);let R;Fe(()=>{e.mode==="horizontal"&&e.ellipsis?R=Ge(d,Q).stop:R==null||R()});{const s=c=>{w.value[c.index]=c},u=c=>{delete w.value[c.index]};he("rootMenu",_e({props:e,openedMenus:i,items:x,subMenus:w,activeIndex:m,isMenuPopup:K,addMenuItem:c=>{x.value[c.index]=c},removeMenuItem:c=>{delete x.value[c.index]},addSubMenu:s,removeSubMenu:u,openMenu:N,closeMenu:z,handleMenuItemClick:L,handleSubMenuClick:de})),he("subMenu:".concat(l.uid),{addSubMenu:s,removeSubMenu:u,mouseInChild:$(!1),level:0})}re(()=>{e.mode==="horizontal"&&new pt(l.vnode.el,h.namespace.value)}),t({open:u=>{const{indexPath:r}=w.value[u];r.forEach(b=>N(b,r))},close:z,handleResize:Q});const E=s=>{const u=Array.isArray(s)?s:[s],r=[];return u.forEach(b=>{Array.isArray(b.children)?r.push(...E(b.children)):r.push(b)}),r};return()=>{var s,u,r,b;let c=(u=(s=n.default)==null?void 0:s.call(n))!=null?u:[];const k=[];if(e.mode==="horizontal"&&d.value){const ce=Array.from((b=(r=d.value)==null?void 0:r.childNodes)!=null?b:[]).filter(X=>X.nodeName!=="#text"||X.nodeValue),V=E(c),H=64,q=Number.parseInt(getComputedStyle(d.value).paddingLeft,10),p=Number.parseInt(getComputedStyle(d.value).paddingRight,10),g=d.value.clientWidth-q-p;let f=0,F=0;ce.forEach((X,ze)=>{f+=X.offsetWidth||0,f<=g-H&&(F=ze+1)});const A=V.slice(0,F),O=V.slice(F);O!=null&&O.length&&e.ellipsis&&(c=A,k.push(_(we,{index:"sub-menu-more",class:a.e("hide-arrow")},{title:()=>_(xe,{class:a.e("icon-more")},{default:()=>_(Ue)}),default:()=>O})))}const Y=Ne(e,0),Z=_("ul",{key:String(e.collapse),role:"menubar",ref:d,style:Y.value,class:{[h.b()]:!0,[h.m(e.mode)]:!0,[h.m("collapse")]:e.collapse}},[...c,...k]);return e.collapseTransition&&e.mode==="vertical"?_(ft,()=>Z):Z}}});const _t=Me({index:{type:be([String,null]),default:null},route:{type:be([String,Object])},disabled:Boolean}),xt={click:e=>J(e.index)&&Array.isArray(e.indexPath)},fe="ElMenuItem",Ct=P({name:fe,components:{ElTooltip:Ee},props:_t,emits:xt,setup(e,{emit:o}){const n=ye(),t=ae("rootMenu"),l=T("menu"),y=T("menu-item");t||se(fe,"can not inject root menu");const{parentMenu:d,indexPath:h}=Pe(n,Qe(e,"index")),a=ae("subMenu:".concat(d.value.uid));a||se(fe,"can not inject sub menu");const i=v(()=>e.index===t.activeIndex),m=_e({index:e.index,indexPath:h,active:i}),x=()=>{e.disabled||(t.handleMenuItemClick({index:e.index,indexPath:h.value,route:e.route}),o("click",m))};return re(()=>{a.addSubMenu(m),t.addMenuItem(m)}),Se(()=>{a.removeSubMenu(m),t.removeMenuItem(m)}),{Effect:Ye,parentMenu:d,rootMenu:t,active:i,nsMenu:l,nsMenuItem:y,handleClick:x}}});function $t(e,o,n,t,l,y){const d=Be("el-tooltip");return S(),W("li",{class:le([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:o[0]||(o[0]=(...h)=>e.handleClick&&e.handleClick(...h))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(S(),ge(d,{key:0,effect:e.Effect.DARK,placement:"right","fallback-placements":["left"],persistent:""},{content:M(()=>[B(e.$slots,"title")]),default:M(()=>[j("div",{class:le(e.nsMenu.be("tooltip","trigger"))},[B(e.$slots,"default")],2)]),_:3},8,["effect"])):(S(),W(Ce,{key:1},[B(e.$slots,"default"),B(e.$slots,"title")],64))],2)}var Ae=ue(Ct,[["render",$t],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const wt={title:String},kt="ElMenuItemGroup",It=P({name:kt,props:wt,setup(){return{ns:T("menu-item-group")}}});function Tt(e,o,n,t,l,y){return S(),W("li",{class:le(e.ns.b())},[j("div",{class:le(e.ns.e("title"))},[e.$slots.title?B(e.$slots,"title",{key:1}):(S(),W(Ce,{key:0},[U(Ze(e.title),1)],64))],2),j("ul",null,[B(e.$slots,"default")])],2)}var Oe=ue(It,[["render",Tt],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const St=Xe(yt,{MenuItem:Ae,MenuItemGroup:Oe,SubMenu:we}),Et=$e(Ae);$e(Oe);$e(we);const Bt=P({name:"Setting"}),Pt={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Nt=j("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384zm0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256z"},null,-1),At=[Nt];function Ot(e,o,n,t,l,y){return S(),W("svg",Pt,At)}var zt=et(Bt,[["render",Ot]]);const Lt={class:"monitor"},Ht={class:"navs"},Wt={class:"container"},jt=P({__name:"index",setup(e){const o=$("overview"),n=$(!1),t=tt(),l=nt(),y=d=>{l.path.endsWith(d)||t.replace({path:d})};return re(()=>{const d=l.path.split("/").slice(-1)[0];o.value=d}),(d,h)=>{const a=xe,i=Et,m=St,x=Be("router-view");return S(),W("div",Lt,[j("div",Ht,[C(m,{"default-active":o.value,class:"el-menu-nav",collapse:n.value,onSelect:y},{default:M(()=>[C(i,{index:"overview"},{title:M(()=>[U("概况")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(st))]),_:1})]),_:1}),C(i,{index:"user"},{title:M(()=>[U("用户")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(ot))]),_:1})]),_:1}),C(i,{index:"wish"},{title:M(()=>[U("需求")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(lt))]),_:1})]),_:1}),C(i,{index:"config"},{title:M(()=>[U("配置")]),default:M(()=>[C(a,null,{default:M(()=>[C(G(zt))]),_:1})]),_:1})]),_:1},8,["default-active","collapse"])]),j("div",Wt,[C(x)])])}}}),Jt=at(jt,[["__scopeId","data-v-67f8ea8e"]]);export{Jt as default};
2
+ //# sourceMappingURL=index-CHIrZkSk.js.map