@cldemo/ui-kit 1.1.4 → 1.1.5

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 (245) hide show
  1. package/buildLibs/all/index.cjs +1 -1
  2. package/buildLibs/all/index.css +1 -1
  3. package/buildLibs/all/index.js +1 -0
  4. package/buildLibs/mobile/index.cjs +1 -1
  5. package/buildLibs/mobile/index.css +1 -1
  6. package/buildLibs/mobile/index.js +1 -0
  7. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-HfnOtuMz.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-4TeN_Yn-.js} +2 -2
  8. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D9sq4n9i.js → Index.vue_vue_type_script_setup_true_lang-B-T2hoSW.js} +1 -1
  9. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js → Index.vue_vue_type_script_setup_true_lang-BBjneEVa.js} +5 -5
  10. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-gwA_FyLx.js → Index.vue_vue_type_script_setup_true_lang-BIH4-mgs.js} +1 -1
  11. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Bw_jRoEX.js → Index.vue_vue_type_script_setup_true_lang-BVGrVxFC.js} +1 -1
  12. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-B2Ste7lk.js → Index.vue_vue_type_script_setup_true_lang-Bi8DPjJz.js} +1 -1
  13. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BrfAVhNV.js → Index.vue_vue_type_script_setup_true_lang-CMfPrFu4.js} +1 -1
  14. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-88gNFuK4.js → Index.vue_vue_type_script_setup_true_lang-D4je4ahg.js} +3 -3
  15. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C6Zd584S.js → Index.vue_vue_type_script_setup_true_lang-DC1L_0IK.js} +4 -4
  16. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BR0S3Sfl.js → Index.vue_vue_type_script_setup_true_lang-DM74NqhN.js} +8 -8
  17. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D_73B6av.js → Index.vue_vue_type_script_setup_true_lang-DPcqZPoO.js} +2 -2
  18. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Bj1vSCM8.js → Index.vue_vue_type_script_setup_true_lang-DPxMsZuy.js} +2 -2
  19. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRlBvcCg.js → Index.vue_vue_type_script_setup_true_lang-D_eRjg8p.js} +2 -2
  20. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-G8UXhRvM.js → Index.vue_vue_type_script_setup_true_lang-Df0iiX1E.js} +1 -1
  21. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-VjIva6RM.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-DjcrAnYd.js} +2 -2
  22. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Cyi6TkkK.js → Index.vue_vue_type_script_setup_true_lang-UqloO5cR.js} +1 -1
  23. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-6Rsz2dYw.js → Index.vue_vue_type_script_setup_true_lang-ljMopEep.js} +1 -1
  24. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CIA-Kc0M.js → Index.vue_vue_type_script_setup_true_lang-vizZ7Mti.js} +6 -5
  25. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-F9tBnc_7.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-wS3dtCDx.js} +1 -1
  26. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BQXxDHbe.js → Index.vue_vue_type_script_setup_true_lang-x7Q4MNNE.js} +1 -1
  27. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BbD4hLPT.js → Index.vue_vue_type_script_setup_true_lang-xpySjof2.js} +2 -2
  28. package/buildLibs/modules/shared/{List.vue_vue_type_script_setup_true_lang-Chy0eAps.js → List.vue_vue_type_script_setup_true_lang-F-n2xPeF.js} +1 -1
  29. package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-BR8b8AgK.js → One.vue_vue_type_script_setup_true_lang-BPQ-99F1.js} +1 -1
  30. package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-bPEj13DH.js → One.vue_vue_type_script_setup_true_lang-CnkGjequ.js} +1 -1
  31. package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js → Validate.vue_vue_type_script_setup_true_lang-D-BFbuqJ.js} +1 -1
  32. package/buildLibs/modules/ui-kit.css +1 -1
  33. package/buildLibs/styles/Common/IconFont-base.css +3 -3
  34. package/buildLibs/styles/Common/Input-base.css +10 -0
  35. package/buildLibs/styles/Element/ClInputTextarea.css +2 -2
  36. package/buildLibs/styles/Web/ClDatetime.css +2 -1
  37. package/buildLibs/styles/Web/ClInputTag.css +4 -3
  38. package/buildLibs/styles/Web/ClPaginate.css +2 -1
  39. package/buildLibs/styles/Web/ClSelect.css +2 -1
  40. package/buildLibs/styles/Web/ClSelectCascade.css +2 -1
  41. package/buildLibs/styles/Web/ClSelectTree.css +2 -1
  42. package/buildLibs/styles/Web/ClSelectmove.css +2 -1
  43. package/buildLibs/styles/Web/ClTable.css +2 -1
  44. package/buildLibs/styles/Web/ClXeditable.css +4 -3
  45. package/buildLibs/utils/Element/ClButton.cjs +1 -1
  46. package/buildLibs/utils/Element/ClButton.js +1 -1
  47. package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
  48. package/buildLibs/utils/Element/ClCheckbox.js +1 -1
  49. package/buildLibs/utils/Element/ClCheckboxOne.cjs +1 -1
  50. package/buildLibs/utils/Element/ClCheckboxOne.js +1 -1
  51. package/buildLibs/utils/Element/ClClipboard.cjs +1 -1
  52. package/buildLibs/utils/Element/ClClipboard.js +1 -1
  53. package/buildLibs/utils/Element/ClCollapse.cjs +1 -1
  54. package/buildLibs/utils/Element/ClCollapse.js +1 -1
  55. package/buildLibs/utils/Element/ClFormValidate.cjs +1 -1
  56. package/buildLibs/utils/Element/ClFormValidate.js +1 -1
  57. package/buildLibs/utils/Element/ClIconFont.cjs +1 -1
  58. package/buildLibs/utils/Element/ClIconFont.js +1 -1
  59. package/buildLibs/utils/Element/ClInput.cjs +1 -1
  60. package/buildLibs/utils/Element/ClInput.js +1 -1
  61. package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
  62. package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
  63. package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
  64. package/buildLibs/utils/Element/ClInputNumber.js +1 -1
  65. package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
  66. package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
  67. package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
  68. package/buildLibs/utils/Element/ClInputPassword.js +2 -2
  69. package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
  70. package/buildLibs/utils/Element/ClInputSearch.js +1 -1
  71. package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
  72. package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
  73. package/buildLibs/utils/Element/ClModal.cjs +1 -1
  74. package/buildLibs/utils/Element/ClModal.js +1 -1
  75. package/buildLibs/utils/Element/ClRadio.cjs +1 -1
  76. package/buildLibs/utils/Element/ClRadio.js +1 -1
  77. package/buildLibs/utils/Element/ClRadioOne.cjs +1 -1
  78. package/buildLibs/utils/Element/ClRadioOne.js +1 -1
  79. package/buildLibs/utils/Element/ClTags.cjs +1 -1
  80. package/buildLibs/utils/Element/ClTags.js +1 -1
  81. package/buildLibs/utils/Mobile/ClActionSheet.cjs +1 -1
  82. package/buildLibs/utils/Mobile/ClActionSheet.js +1 -1
  83. package/buildLibs/utils/Mobile/ClBackTop.cjs +1 -1
  84. package/buildLibs/utils/Mobile/ClBackTop.js +1 -1
  85. package/buildLibs/utils/Mobile/ClBanner.cjs +1 -1
  86. package/buildLibs/utils/Mobile/ClBanner.js +1 -1
  87. package/buildLibs/utils/Mobile/ClCalendarM.cjs +1 -1
  88. package/buildLibs/utils/Mobile/ClCalendarM.js +1 -1
  89. package/buildLibs/utils/Mobile/ClCell.cjs +1 -1
  90. package/buildLibs/utils/Mobile/ClCell.js +1 -1
  91. package/buildLibs/utils/Mobile/ClCodeLegendM.cjs +1 -1
  92. package/buildLibs/utils/Mobile/ClCodeLegendM.js +2 -2
  93. package/buildLibs/utils/Mobile/ClCropperM.cjs +1 -1
  94. package/buildLibs/utils/Mobile/ClCropperM.js +1 -1
  95. package/buildLibs/utils/Mobile/ClDropdownMenuMItem.cjs +1 -1
  96. package/buildLibs/utils/Mobile/ClDropdownMenuMItem.js +1 -1
  97. package/buildLibs/utils/Mobile/ClGrid.cjs +1 -1
  98. package/buildLibs/utils/Mobile/ClGrid.js +1 -1
  99. package/buildLibs/utils/Mobile/ClNavBar.cjs +1 -1
  100. package/buildLibs/utils/Mobile/ClNavBar.js +1 -1
  101. package/buildLibs/utils/Mobile/ClNoticeBar.cjs +1 -1
  102. package/buildLibs/utils/Mobile/ClNoticeBar.js +1 -1
  103. package/buildLibs/utils/Mobile/ClNotifyM.cjs +1 -1
  104. package/buildLibs/utils/Mobile/ClNotifyM.js +1 -1
  105. package/buildLibs/utils/Mobile/ClNumberKeyboard.cjs +1 -1
  106. package/buildLibs/utils/Mobile/ClNumberKeyboard.js +1 -1
  107. package/buildLibs/utils/Mobile/ClPickerCascader.cjs +1 -1
  108. package/buildLibs/utils/Mobile/ClPickerCascader.js +1 -1
  109. package/buildLibs/utils/Mobile/ClPullToRefresh.cjs +1 -1
  110. package/buildLibs/utils/Mobile/ClPullToRefresh.js +1 -1
  111. package/buildLibs/utils/Mobile/ClRate.cjs +1 -1
  112. package/buildLibs/utils/Mobile/ClRate.js +1 -1
  113. package/buildLibs/utils/Mobile/ClScrollCard.cjs +1 -1
  114. package/buildLibs/utils/Mobile/ClScrollCard.js +1 -1
  115. package/buildLibs/utils/Mobile/ClSharePanel.cjs +1 -1
  116. package/buildLibs/utils/Mobile/ClSharePanel.js +1 -1
  117. package/buildLibs/utils/Mobile/ClSidebarSelect.cjs +1 -1
  118. package/buildLibs/utils/Mobile/ClSidebarSelect.js +1 -1
  119. package/buildLibs/utils/Mobile/ClSteps.cjs +1 -1
  120. package/buildLibs/utils/Mobile/ClSteps.js +1 -1
  121. package/buildLibs/utils/Mobile/ClTabbar.cjs +1 -1
  122. package/buildLibs/utils/Mobile/ClTabbar.js +1 -1
  123. package/buildLibs/utils/Mobile/ClToast.cjs +1 -1
  124. package/buildLibs/utils/Mobile/ClToast.js +1 -1
  125. package/buildLibs/utils/Mobile/__provide__/NotifyM.cjs +1 -1
  126. package/buildLibs/utils/Mobile/__provide__/NotifyM.js +1 -1
  127. package/buildLibs/utils/Mobile/__provide__/Toast.cjs +1 -1
  128. package/buildLibs/utils/Mobile/__provide__/Toast.js +1 -1
  129. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-nAMiORzN.js → Index.vue_vue_type_script_setup_true_lang-2zp0QTNm.js} +1 -1
  130. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DZF2gj7X.js → Index.vue_vue_type_script_setup_true_lang-4I3wTvhS.js} +4 -4
  131. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CW4fM0by.js → Index.vue_vue_type_script_setup_true_lang-5WPoXMwr.js} +1 -1
  132. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js → Index.vue_vue_type_script_setup_true_lang-98sOHlWj.js} +1 -1
  133. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-j7gxlOeM.js → Index.vue_vue_type_script_setup_true_lang-B60Rs_ka.js} +1 -1
  134. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-B-Mbqw1Y.js → Index.vue_vue_type_script_setup_true_lang-B6NmuslZ.js} +1 -1
  135. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-DY3tZQZe.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-B8YAhRda.js} +1 -1
  136. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-De1eNjwC.js → Index.vue_vue_type_script_setup_true_lang-BGwsPv0S.js} +1 -1
  137. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Eczgr-_r.js → Index.vue_vue_type_script_setup_true_lang-BJ_m7Dj5.js} +1 -1
  138. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CsCn637u.js → Index.vue_vue_type_script_setup_true_lang-BM_FJlr9.js} +1 -1
  139. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_YbdXMB.js → Index.vue_vue_type_script_setup_true_lang-BUscvdlk.js} +1 -1
  140. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-UydTJByU.js → Index.vue_vue_type_script_setup_true_lang-BXz7Y87Q.js} +1 -1
  141. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-X8d38eaU.js → Index.vue_vue_type_script_setup_true_lang-BfELTliJ.js} +1 -1
  142. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js → Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js} +6 -5
  143. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BQSP8SA4.js → Index.vue_vue_type_script_setup_true_lang-BwwnFiXJ.js} +1 -1
  144. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DwBf338f.js → Index.vue_vue_type_script_setup_true_lang-C2zOEwJ1.js} +1 -1
  145. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D6kK-vM7.js → Index.vue_vue_type_script_setup_true_lang-C6Ou-vmn.js} +1 -1
  146. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BWeBT0aj.js → Index.vue_vue_type_script_setup_true_lang-C8euOy7Z.js} +2 -2
  147. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DtAy8lm9.js → Index.vue_vue_type_script_setup_true_lang-CAMYF15G.js} +2 -2
  148. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DXPZYc0c.js → Index.vue_vue_type_script_setup_true_lang-CSqU5Nz6.js} +1 -1
  149. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-B0MJO0JM.js → Index.vue_vue_type_script_setup_true_lang-CWwycVzt.js} +3 -3
  150. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-2dwwjiTV.js → Index.vue_vue_type_script_setup_true_lang-Cb8fYSc9.js} +5 -5
  151. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CdYh3Pzs.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-D3Z2BVYR.js} +2 -2
  152. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C67qv3YC.js → Index.vue_vue_type_script_setup_true_lang-DB79nPqn.js} +1 -1
  153. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DZCt32jb.js → Index.vue_vue_type_script_setup_true_lang-DDMwfmi3.js} +2 -2
  154. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dirpq4z0.js → Index.vue_vue_type_script_setup_true_lang-DPpZ2_Sb.js} +1 -1
  155. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIO6Me43.js → Index.vue_vue_type_script_setup_true_lang-DUfxwsAA.js} +1 -1
  156. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CBjEJN0Y.js → Index.vue_vue_type_script_setup_true_lang-Dc4eYcq-.js} +1 -1
  157. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-O_Nltaue.js → Index.vue_vue_type_script_setup_true_lang-DfAoAIa3.js} +1 -1
  158. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CsUYHAm8.js → Index.vue_vue_type_script_setup_true_lang-Dg5pJiPZ.js} +1 -1
  159. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C_exHzjc.js → Index.vue_vue_type_script_setup_true_lang-DulzCj86.js} +8 -8
  160. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DWkYiuK9.js → Index.vue_vue_type_script_setup_true_lang-DvYX7kuB.js} +1 -1
  161. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CATwJnes.js → Index.vue_vue_type_script_setup_true_lang-LeQz80jL.js} +1 -1
  162. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-L4NDsLxm.js → Index.vue_vue_type_script_setup_true_lang-M5y0DMPl.js} +1 -1
  163. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DY4m6Xyj.js → Index.vue_vue_type_script_setup_true_lang-OfqQJV8-.js} +1 -1
  164. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CEBiLDTm.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-OiTdNs2W.js} +2 -2
  165. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-lKDQFZtY.js → Index.vue_vue_type_script_setup_true_lang-S9t4A2yy.js} +1 -1
  166. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-2THK822S.js → Index.vue_vue_type_script_setup_true_lang-SW27GX-g.js} +1 -1
  167. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D4a5Iaue.js → Index.vue_vue_type_script_setup_true_lang-VUD3rCg5.js} +1 -1
  168. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DvN-fBNd.js → Index.vue_vue_type_script_setup_true_lang-ZNpokp-x.js} +1 -1
  169. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CYFgnd30.js → Index.vue_vue_type_script_setup_true_lang-kCemr-ml.js} +1 -1
  170. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D__hI9ud.js → Index.vue_vue_type_script_setup_true_lang-sGJNOVn3.js} +1 -1
  171. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-oovIcT38.js → Index.vue_vue_type_script_setup_true_lang-vVnnJuup.js} +1 -1
  172. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js +1 -0
  173. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ctptavhp.js → Index.vue_vue_type_script_setup_true_lang-yXhOl-Ln.js} +2 -2
  174. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BpG7AHvM.js → Index.vue_vue_type_script_setup_true_lang-ywDP-ayG.js} +1 -1
  175. package/buildLibs/utils/Shared/Index22.css +1 -1
  176. package/buildLibs/utils/Shared/Index8.css +1 -1
  177. package/buildLibs/utils/Shared/Input.css +1 -1
  178. package/buildLibs/utils/Shared/List.css +1 -1
  179. package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-CFCST05R.js → List.vue_vue_type_script_setup_true_lang-B75tAGde.js} +1 -1
  180. package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-CRkZfB8a.js → List.vue_vue_type_script_setup_true_lang-NrDV8bOV.js} +1 -1
  181. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-cviYcHLZ.js → One.vue_vue_type_script_setup_true_lang-BL5CUHVm.js} +1 -1
  182. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-HWXEDCZF.js → One.vue_vue_type_script_setup_true_lang-D3hrzxgT.js} +1 -1
  183. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-CGNfuoKE.js → One.vue_vue_type_script_setup_true_lang-DHPYObdu.js} +1 -1
  184. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-D9zWNf0s.js → One.vue_vue_type_script_setup_true_lang-DxUlP9yq.js} +1 -1
  185. package/buildLibs/utils/Shared/{Validate.vue_vue_type_script_setup_true_lang-W46p_d7L.js → Validate.vue_vue_type_script_setup_true_lang-BYSnGTWU.js} +1 -1
  186. package/buildLibs/utils/Shared/{Validate.vue_vue_type_script_setup_true_lang-Jyse_5LL.js → Validate.vue_vue_type_script_setup_true_lang-DPwcfCQb.js} +1 -1
  187. package/buildLibs/utils/Shared/{index-DgQu20UC.js → index-BjDIq1u8.js} +1 -1
  188. package/buildLibs/utils/Shared/{index-D-7jSnpf.js → index-CBplKIwJ.js} +2 -2
  189. package/buildLibs/utils/Web/ClAnchorNav.cjs +1 -1
  190. package/buildLibs/utils/Web/ClAnchorNav.js +1 -1
  191. package/buildLibs/utils/Web/ClCalendar.cjs +1 -1
  192. package/buildLibs/utils/Web/ClCalendar.js +1 -1
  193. package/buildLibs/utils/Web/ClCodeLegend.cjs +1 -1
  194. package/buildLibs/utils/Web/ClCodeLegend.js +1 -1
  195. package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
  196. package/buildLibs/utils/Web/ClColorPicker.js +3 -3
  197. package/buildLibs/utils/Web/ClCropper.cjs +1 -1
  198. package/buildLibs/utils/Web/ClCropper.js +1 -1
  199. package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
  200. package/buildLibs/utils/Web/ClCropperPreview.js +4 -4
  201. package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
  202. package/buildLibs/utils/Web/ClDateTime.js +1 -1
  203. package/buildLibs/utils/Web/ClDropdownMenu.cjs +1 -1
  204. package/buildLibs/utils/Web/ClDropdownMenu.js +1 -1
  205. package/buildLibs/utils/Web/ClEchartsLineAxisTag.cjs +1 -1
  206. package/buildLibs/utils/Web/ClEchartsLineAxisTag.js +1 -1
  207. package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
  208. package/buildLibs/utils/Web/ClFileUpload.js +1 -1
  209. package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
  210. package/buildLibs/utils/Web/ClInputTag.js +1 -1
  211. package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
  212. package/buildLibs/utils/Web/ClPaginate.js +1 -1
  213. package/buildLibs/utils/Web/ClPreviewExample.cjs +1 -1
  214. package/buildLibs/utils/Web/ClPreviewExample.js +1 -1
  215. package/buildLibs/utils/Web/ClSelect.cjs +1 -1
  216. package/buildLibs/utils/Web/ClSelect.js +1 -1
  217. package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
  218. package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
  219. package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
  220. package/buildLibs/utils/Web/ClSelectMove.js +4 -4
  221. package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
  222. package/buildLibs/utils/Web/ClSelectTree.js +2 -2
  223. package/buildLibs/utils/Web/ClSideMenu.cjs +1 -1
  224. package/buildLibs/utils/Web/ClSideMenu.js +1 -1
  225. package/buildLibs/utils/Web/ClTable.cjs +1 -1
  226. package/buildLibs/utils/Web/ClTable.js +4 -4
  227. package/buildLibs/utils/Web/ClTabs.cjs +1 -1
  228. package/buildLibs/utils/Web/ClTabs.js +1 -1
  229. package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
  230. package/buildLibs/utils/Web/ClXEditable.js +12 -12
  231. package/buildLibs/utils/Web/__provide__/Alert.cjs +1 -1
  232. package/buildLibs/utils/Web/__provide__/Alert.js +2 -2
  233. package/buildLibs/utils/Web/__provide__/Notify.cjs +1 -1
  234. package/buildLibs/utils/Web/__provide__/Notify.js +1 -1
  235. package/buildLibs/utils/Web/__provide__/Preview.cjs +1 -1
  236. package/buildLibs/utils/Web/__provide__/Preview.js +1 -1
  237. package/buildLibs/web/index.cjs +1 -1
  238. package/buildLibs/web/index.css +1 -1
  239. package/buildLibs/web/index.js +1 -0
  240. package/fonts/iconfont.css +7 -3
  241. package/fonts/iconfont.ttf +0 -0
  242. package/fonts/iconfont.woff +0 -0
  243. package/fonts/iconfont.woff2 +0 -0
  244. package/package.json +1 -1
  245. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CFZ5jK-q.js +0 -1
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),fe=require("@cldemo/ui-kit/common/log"),F=require("dayjs"),l=require("@cldemo/ui-kit/common/base"),xe=require("@cldemo/ui-kit/common/globalConfig"),pe=require("@cldemo/ui-kit/common/Element"),Te=require("./List.vue_vue_type_script_setup_true_lang-CFCST05R.js"),he=require("./Index.vue_vue_type_script_setup_true_lang-CFZ5jK-q.js"),ve=require("./language-BJ4aVgHI.js"),Se=require("./Index.vue_vue_type_script_setup_true_lang-j7gxlOeM.js"),we=require("@cldemo/ui-kit/common/day"),Me=require("./Index.vue_vue_type_script_setup_true_lang-D_YbdXMB.js");;/* empty css */;/* empty css */const be=["id"],_e={class:"table-base"},Be={class:"time-head time-head-day",colspan:"7"},$e={class:"time-prev"},Ye=["title"],Ne=["title"],Oe={class:"time-next"},Ie=["title"],Pe=["title"],Re=["aria-disabled","onClick","onKeydown","onMouseover"],Ae=e.defineComponent({name:"ClCalendarsDays",__name:"CalendarsDays",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:f=>!0,onChangeType:f=>!0,onSelectDate:(f,oe)=>!0,onHoverDate:(f,oe)=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,{optPageLanguage:I,getPageLanguage:b}=ve.useLanguage();b("dataTime");const O=e.inject("$DateTimeTop"),x=e.inject("$DateTimeTopBase"),g=e.inject("$DateTimeBase");(!O||!x||!g)&&fe.warn("ClCalendarsDays","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=`calendarsDays-${l.getRandom(5)}`,k=O?.elId?`${O.elId}-calendarsDays-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let c={"panel-calendarsdays":!0};return c=l.getJsonMerge(c,pe.getClassNameJson(v.className)),c}),a=e.reactive({isPrevYear:!1,isPrevMonth:!1,titleYear:"",titleMonth:"",isNextYear:!1,isNextMonth:!1}),m=e.ref([]),s=e.ref([]),t={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},_=()=>{if(!t.viewDate)return;const c=t.viewDate.year(),B=t.viewDate.localeData().monthsShort(t.viewDate),$=t.viewDate.clone().subtract(1,"years").endOf("month"),T=g.checkDataMinMax($,"day"),ie=t.viewDate.clone().subtract(1,"months").endOf("month"),W=g.checkDataMinMax(ie,"day"),j=t.viewDate.clone().add(1,"months").startOf("month"),K=g.checkDataMinMax(j,"day"),H=t.viewDate.clone().add(1,"years").startOf("month"),ce=g.checkDataMinMax(H,"day");a.isPrevYear=!T,a.isPrevMonth=!W,a.titleYear=`${c}${I.value.year}`,a.titleMonth=B,a.isNextMonth=!K,a.isNextYear=!ce},ae=()=>{if(!t.viewDate)return;const c=t.viewDate.localeData(),V=c.weekdaysMin(),B=c.firstDayOfWeek(),$=[];V.forEach((T,ie)=>{$[(7+ie-B)%7]=T}),m.value=$},G=()=>{if(!t.viewDate)return;const c=t.viewDate.clone(),V=t.selectDate,B=c.year(),$=c.month();let T=c.clone().subtract(1,"months");const ie=[];let W=[];T=T.date(T.daysInMonth()).startOf("week");for(let j=0;j<42;j+=1){j>0&&(T=T.add(1,"days"));const K=T.clone(),H=K.date(),ce=T.year()===B&&T.month()<$||T.year()<B,ue=T.year()===B&&T.month()>$||T.year()>B;let ge=V&&T.isSame(V,"day");const p=g.checkDataMinMax(K,"day");let E=!1,M=!1,N=!1;x.isRange&&(t.hoverDate?t.startDate&&t.endDate&&t.startDate.isSame(t.hoverDate,"day")&&t.hoverDate.isBefore(t.endDate,"day")?(E=T.isSame(t.startDate,"day"),M=T.isSame(t.endDate,"day"),N=E||M||T.isAfter(t.startDate,"day")&&T.isBefore(t.endDate,"day")):t.startDate?(E=T.isSame(t.startDate,"day"),N=E||T.isSame(t.hoverDate,"day"),N=N||T.isAfter(t.startDate,"day")&&T.isBefore(t.hoverDate,"day"),M=t.hoverDate.isSame(t.startDate,"day")&&E):t.endDate&&(M=T.isSame(t.endDate,"day"),N=M||T.isSame(t.hoverDate,"day"),N=N||T.isAfter(t.hoverDate,"day")&&T.isBefore(t.endDate,"day"),E=t.hoverDate.isSame(t.endDate,"day")&&M):(E=!!(t.startDate&&T.isSame(t.startDate,"day")),t.endDate&&(M=T.isSame(t.endDate,"day"),N=E||M||!!(t.startDate&&T.isAfter(t.startDate,"day")&&T.isBefore(t.endDate,"day")))),ge=E||M);const Q=pe.getAddClass("day",{old:ce,new:ue,active:ge&&!ce&&!ue&&!p,disabled:p,"date-start":E&&!ce&&!ue,"date-end":M&&!ce&&!ue,"range-in":N&&!ce&&!ue});W.push({cls:Q,day:H,value:H,isDisabled:p,isOld:ce,isNew:ue}),W.length===7&&(ie.push({days:W}),W=[])}s.value=ie},U=(c,V,B)=>{if(!t.viewDate)return;const $=t.viewDate.clone()[c](V,B);i("onChangeDate",$)};let ee=!1;const le=()=>{ee||(ee=!0,e.nextTick(()=>{i("onInitComplete","days")}))},re=()=>{t.selectDate=O.getMomentDate(v.selectValue),t.startDate=O.getMomentDate(v.startValue),t.endDate=O.getMomentDate(v.endValue),t.hoverDate=O.getMomentDate(v.hoverValue)},P=(c,V,B)=>{if(V!==B){const $=O.getMomentDate(V);$&&$.isValid()&&(t[c]=$,re(),ae(),_(),G(),le())}},Z=()=>{if(l.isNonEmptyString(v.viewValue)){const c=O.getMomentDate(v.viewValue);c&&c.isValid()&&(t.viewDate=c,re(),ae(),_(),G(),le())}};e.onMounted(()=>{e.nextTick(()=>{Z()})}),e.watch(()=>v.viewValue,(c,V)=>{P("viewDate",c,V)}),e.watch([()=>v.selectValue,()=>v.startValue,()=>v.endValue],()=>{t.viewDate&&(t.selectDate=O.getMomentDate(v.selectValue),t.startDate=O.getMomentDate(v.startValue),t.endDate=O.getMomentDate(v.endValue),t.hoverDate=O.getMomentDate(v.hoverValue),G())}),e.watch(()=>v.hoverValue,()=>{t.viewDate&&(t.hoverDate=O.getMomentDate(v.hoverValue),x.isRange&&G())}),e.watch([()=>v.minValue,()=>v.maxValue],()=>{t.viewDate&&(_(),G())});const ne=c=>{c.preventDefault(),c.stopPropagation(),U("subtract",1,"years")},z=c=>{c.preventDefault(),c.stopPropagation(),U("subtract",1,"months")},te=c=>{c.preventDefault(),c.stopPropagation(),U("add",1,"months")},D=c=>{c.preventDefault(),c.stopPropagation(),U("add",1,"years")},u=(c,V)=>{c.preventDefault(),c.stopPropagation(),i("onChangeType",V)},h=(c,V)=>{c.preventDefault(),c.stopPropagation(),V.isDisabled||i("onSelectDate","days",V)},S=(c,V)=>{c.preventDefault(),c.stopPropagation(),V.isDisabled||i("onHoverDate","days",V)};return(c,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),id:e.unref(k)},[e.createElementVNode("table",_e,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Be,[e.createElementVNode("span",$e,[a.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(I).prevYear,onClick:ne},[e.createVNode(he._sfc_main,{name:"angle-double-left"})],8,Ye)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isPrevMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"prev-month",title:e.unref(I).prevMonth,onClick:z},[e.createVNode(he._sfc_main,{name:"angle-left"})],8,Ne)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:V[0]||(V[0]=B=>u(B,"years"))},e.toDisplayString(a.titleYear),1),e.createElementVNode("span",{class:"datetime-switch-month",onClick:V[1]||(V[1]=B=>u(B,"months"))},e.toDisplayString(a.titleMonth),1),e.createElementVNode("span",Oe,[a.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(I).nextYear,onClick:D},[e.createVNode(he._sfc_main,{name:"angle-double-right"})],8,Ie)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isNextMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"next-month",title:e.unref(I).nextMonth,onClick:te},[e.createVNode(he._sfc_main,{name:"angle-right"})],8,Pe)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])])]),e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(B,$)=>(e.openBlock(),e.createElementBlock("th",{key:`${C}-week-${$}`},e.toDisplayString(B),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(B,$)=>(e.openBlock(),e.createElementBlock("tr",{key:`${C}-days-${$}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.days,(T,ie)=>(e.openBlock(),e.createElementBlock("td",{key:`${C}-day-${ie}`,role:"gridcell",tabindex:"0","aria-disabled":T.isDisabled,class:e.normalizeClass(T.cls),onClick:W=>h(W,T),onKeydown:[e.withKeys(e.withModifiers(W=>h(W,T),["prevent"]),["enter"]),e.withKeys(e.withModifiers(W=>h(W,T),["prevent"]),["space"])],onMouseover:W=>S(W,T)},e.toDisplayString(T.day),43,Re))),128))]))),128))])])],10,be))}}),Le=["id"],Fe={class:"table-base"},He={class:"time-head time-head-month"},Qe={class:"time-prev"},je=["title"],Ke={class:"time-next"},ze=["title"],Je={class:"time-body-month"},qe=["aria-disabled","onClick","onKeydown","onMouseover"],Ue=e.defineComponent({name:"ClCalendarsMonths",__name:"CalendarsMonths",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:f=>!0,onChangeType:f=>!0,onSelectDate:(f,oe)=>!0,onHoverDate:(f,oe)=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,I=`calendarsMonths-${l.getRandom(5)}`,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=e.inject("$DateTimeTop"),g=e.inject("$DateTimeTopBase"),C=e.inject("$DateTimeBase");(!x||!g||!C)&&fe.warn("ClCalendarsMonths","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const k=x?.elId?`${x.elId}-calendarsMonths-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let D={"panel-calendarsmonths":!0};return D=l.getJsonMerge(D,pe.getClassNameJson(v.className)),D}),a=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),m=e.ref([]),s={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},t=()=>{if(!s.viewDate)return;const D=s.viewDate.year(),u=s.viewDate.clone().subtract(1,"years").endOf("year"),h=C.checkDataMinMax(u,"month"),S=s.viewDate.clone().add(1,"years").startOf("year"),c=C.checkDataMinMax(S,"month");a.isPrevYear=!h,a.titleYear=`${D}${b.value.year}`,a.isNextYear=!c},_=()=>{if(!s.viewDate)return;const D=s.viewDate.clone(),u=C.getFocusDate(),h=s.selectDate,S=D.year(),c=[];D.localeData().monthsShort().forEach((V,B)=>{const $=C.getViewMin(S,B);let T=!!(h&&$.isSame(h,"month")),ie=!!(u&&$.isSame(u,"month"));const W=C.checkDataMinMax($,"month");let j=!1,K=!1,H=!1;g.isRange&&(ie=!1,s.hoverDate?s.startDate&&s.endDate&&s.startDate.isSame(s.hoverDate,"month")&&s.hoverDate.isBefore(s.endDate,"month")?(j=$.isSame(s.startDate,"month"),K=$.isSame(s.endDate,"month"),H=j||K||$.isAfter(s.startDate,"month")&&$.isBefore(s.endDate,"month")):s.startDate?(j=$.isSame(s.startDate,"month"),H=j||$.isSame(s.hoverDate,"month"),H=H||$.isAfter(s.startDate,"month")&&$.isBefore(s.hoverDate,"month"),K=!!(s.hoverDate&&s.hoverDate.isSame(s.startDate,"month"))&&j):s.endDate&&(K=$.isSame(s.endDate,"month"),H=K||$.isSame(s.hoverDate,"month"),H=H||$.isAfter(s.hoverDate,"month")&&$.isBefore(s.endDate,"month"),j=!!(s.hoverDate&&s.hoverDate.isSame(s.endDate,"month"))&&K):(j=!!(s.startDate&&$.isSame(s.startDate,"month")),s.endDate&&s.startDate&&(K=$.isSame(s.endDate,"month"),H=$.isAfter(s.startDate,"month")&&$.isBefore(s.endDate,"month"))),T=j||K),g.layerType==="months"&&(ie=!1);const ce=pe.getAddClass("month",{active:T&&!W,focused:ie,disabled:W,"date-start":j,"date-end":K,"range-in":H});c.push({cls:ce,month:V,isDisabled:W,value:B})}),m.value=c},ae=(D,u,h)=>{if(!s.viewDate)return;const S=s.viewDate.clone()[D](u,h);i("onChangeDate",S)};let G=!1;const U=()=>{G||(G=!0,e.nextTick(()=>{i("onInitComplete","months")}))},ee=()=>{s.selectDate=x.getMomentDate(v.selectValue),s.startDate=x.getMomentDate(v.startValue),s.endDate=x.getMomentDate(v.endValue),s.hoverDate=x.getMomentDate(v.hoverValue)},le=(D,u,h)=>{if(u!==h){const S=x.getMomentDate(u);S&&S.isValid()&&(s[D]=S,ee(),t(),_(),U())}},re=()=>{const D=x.getMomentDate(v.viewValue);D&&D.isValid()&&(s.viewDate=D,ee(),t(),_(),U())};e.onMounted(()=>{e.nextTick(()=>{re()})}),e.watch(()=>v.viewValue,(D,u)=>{le("viewDate",D,u)}),e.watch([()=>v.selectValue,()=>v.startValue,()=>v.endValue,()=>v.hoverValue],()=>{s.viewDate&&(s.selectDate=x.getMomentDate(v.selectValue),s.startDate=x.getMomentDate(v.startValue),s.endDate=x.getMomentDate(v.endValue),s.hoverDate=x.getMomentDate(v.hoverValue),_())}),e.watch([()=>v.minValue,()=>v.maxValue],()=>{s.viewDate&&(t(),_())});const P=D=>{D.preventDefault(),D.stopPropagation(),ae("subtract",1,"years")},Z=D=>{D.preventDefault(),D.stopPropagation(),ae("add",1,"years")},ne=(D,u)=>{D.preventDefault(),D.stopPropagation(),i("onChangeType",u)},z=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onSelectDate","months",u)},te=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onHoverDate","months",u)};return(D,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),id:e.unref(k)},[e.createElementVNode("table",Fe,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",He,[e.createElementVNode("span",Qe,[a.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(b).prevYear,onClick:P},[e.createVNode(he._sfc_main,{name:"angle-left"})],8,je)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:u[0]||(u[0]=h=>ne(h,"years"))},e.toDisplayString(a.titleYear),1),e.createElementVNode("span",Ke,[a.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(b).nextYear,onClick:Z},[e.createVNode(he._sfc_main,{name:"angle-right"})],8,ze)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",Je,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(h,S)=>(e.openBlock(),e.createElementBlock("span",{key:`${I}-month-${S}`,role:"button",tabindex:"0","aria-disabled":h.isDisabled,class:e.normalizeClass(h.cls),onClick:c=>z(c,h),onKeydown:[e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["enter"]),e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["space"])],onMouseover:c=>te(c,h)},e.toDisplayString(h.month),43,qe))),128))])])])])])],10,Le))}}),Ze=["id"],We={class:"table-base"},Ge={class:"time-head time-head-year"},Xe={class:"time-prev"},et=["title"],tt={class:"time-next"},at=["title"],nt={class:"time-body-year"},st=["aria-disabled","onClick","onKeydown","onMouseover"],ot=e.defineComponent({name:"ClCalendarsYears",__name:"CalendarsYears",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:f=>!0,onSelectDate:(f,oe)=>!0,onHoverDate:(f,oe)=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,{optPageLanguage:I,getPageLanguage:b}=ve.useLanguage();b("dataTime");const O=e.inject("$DateTimeTop"),x=e.inject("$DateTimeTopBase"),g=e.inject("$DateTimeBase");(!O||!x||!g)&&fe.warn("ClCalendarsYears","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=`calendarsYears-${l.getRandom(5)}`,k=O?.elId?`${O.elId}-calendarsYears-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let D={"panel-calendarsyears":!0};return D=l.getJsonMerge(D,pe.getClassNameJson(v.className)),D}),a=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),m=e.ref([]),s={startYear:0,viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},t=()=>{if(!s.viewDate)return;const D=`${s.startYear}-${s.startYear+9}`,u=O.getMomentDate({year:s.startYear-1,month:11}),h=O.getMomentDate({year:s.startYear+10,month:0}),S=u?g.checkDataMinMax(u.endOf("month"),"year"):!1,c=h?g.checkDataMinMax(h.startOf("month"),"year"):!1;a.isPrevYear=!S,a.titleYear=D,a.isNextYear=!c},_=()=>{const D=g.getFocusDate(),u=s.selectDate,h=[];for(let S=-1;S<11;S+=1){const c=s.startYear+S,V=g.getViewMin(c),B=S===-1,$=S>9;let T=u?V.isSame(u,"year"):!1,ie=!!(D&&V.isSame(D,"year"));const W=g.checkDataMinMax(V,"year");let j=!1,K=!1,H=!1;if(x.isRange){if(ie=!1,s.hoverDate){const ue=parseInt(s.hoverDate.format("YYYY"),10);s.startDate&&s.endDate&&s.startDate.isSame(s.hoverDate,"year")&&s.hoverDate.isBefore(s.endDate,"year")?(j=c===parseInt(s.startDate.format("YYYY"),10),K=c===parseInt(s.endDate.format("YYYY"),10),H=j||K||c>parseInt(s.startDate.format("YYYY"),10)&&c<parseInt(s.endDate.format("YYYY"),10)):s.startDate?(j=c===parseInt(s.startDate.format("YYYY"),10),H=j||c===ue,H=H||V.isAfter(s.startDate,"year")&&V.isBefore(s.hoverDate,"year"),K=!1):s.endDate&&(K=c===parseInt(s.endDate.format("YYYY"),10),H=K||c===ue,H=H||V.isAfter(s.hoverDate,"year")&&V.isBefore(s.endDate,"year"),j=!!(s.hoverDate&&s.hoverDate.isSame(s.endDate,"year"))&&K)}else j=!!(s.startDate&&V.isSame(s.startDate,"year")),s.endDate&&s.startDate&&(K=V.isSame(s.endDate,"year"),H=V.isAfter(s.startDate,"year")&&V.isBefore(s.endDate,"year"));T=j||K}x.layerType==="years"&&(ie=!1);const ce=pe.getAddClass("year",{old:B,new:$,active:T&&!B&&!$,focused:ie,disabled:W,"date-start":j&&!B&&!$,"date-end":K&&!B&&!$,"range-in":H&&!B&&!$});h.push({cls:ce,year:c,isDisabled:W,value:c})}m.value=h},ae=()=>{s.viewDate&&(s.startYear=Math.floor(s.viewDate.year()/10)*10,t(),_())},G=(D,u,h)=>{s.viewDate&&(s.viewDate=s.viewDate.clone()[D](u,h),ae(),i("onChangeDate",s.viewDate))};let U=!1;const ee=()=>{U||(U=!0,e.nextTick(()=>{i("onInitComplete","years")}))},le=()=>{s.selectDate=O.getMomentDate(v.selectValue),s.startDate=O.getMomentDate(v.startValue),s.endDate=O.getMomentDate(v.endValue),s.hoverDate=O.getMomentDate(v.hoverValue)},re=(D,u,h)=>{if(u!==h){const S=O.getMomentDate(u);S&&S.isValid()?(s[D]=S,le(),ae(),ee()):(s.viewDate=null,s.startYear=0,m.value=[],a.isPrevYear=!1,a.isNextYear=!1,a.titleYear="")}},P=()=>{const D=O.getMomentDate(v.viewValue);D&&D.isValid()&&(s.viewDate=D,le(),ae(),ee())};e.onMounted(()=>{e.nextTick(()=>{P()})}),e.watch(()=>v.viewValue,(D,u)=>{re("viewDate",D,u)}),e.watch([()=>v.selectValue,()=>v.startValue,()=>v.endValue,()=>v.hoverValue],()=>{s.viewDate&&(s.selectDate=O.getMomentDate(v.selectValue),s.startDate=O.getMomentDate(v.startValue),s.endDate=O.getMomentDate(v.endValue),s.hoverDate=O.getMomentDate(v.hoverValue),_())}),e.watch([()=>v.minValue,()=>v.maxValue],()=>{s.viewDate&&(t(),_())});const Z=D=>{D.preventDefault(),D.stopPropagation(),G("subtract",10,"years")},ne=D=>{D.preventDefault(),D.stopPropagation(),G("add",10,"years")},z=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onSelectDate","years",u)},te=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onHoverDate","years",u)};return(D,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),id:e.unref(k)},[e.createElementVNode("table",We,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Ge,[e.createElementVNode("span",Xe,[a.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(I).prevYear10,onClick:Z},[e.createVNode(he._sfc_main,{name:"angle-left"})],8,et)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",null,e.toDisplayString(a.titleYear),1),e.createElementVNode("span",tt,[a.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(I).nextYear10,onClick:ne},[e.createVNode(he._sfc_main,{name:"angle-right"})],8,at)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(h,S)=>(e.openBlock(),e.createElementBlock("span",{key:`${C}-${h.year}-${S}`,role:"button",tabindex:"0","aria-disabled":h.isDisabled,class:e.normalizeClass(h.cls),onClick:c=>z(c,h),onKeydown:[e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["enter"]),e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["space"])],onMouseover:c=>te(c,h)},e.toDisplayString(h.year),43,st))),128))])])])])],10,Ze))}}),it=["id"],lt={class:"times-container"},rt=["title"],ct=["title"],ut={class:"times-clock"},mt={class:"clock-nums"},dt=["aria-disabled","onClick","onKeydown"],ft={class:"clock-pointer"},Dt={class:"clock-am"},ht="2000-01-01",pt=e.defineComponent({name:"ClCalendarsClocks",__name:"CalendarsClock",props:{className:String,selectDay:String,selectValue:String,minValue:String,maxValue:String,isShowPointer:{type:Boolean,default:!0},isShowSubmit:{type:Boolean,default:!1},isShowCancel:{type:Boolean,default:!1},isClickOverlay:{type:Boolean,default:!1}},emits:{onSubmit:f=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,I=`calendarsClock-${l.getRandom(5)}`,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=e.inject("$DateTimeTop"),g=e.inject("$DateTimeTopBase");(!x||!g)&&fe.warn("ClCalendarsClocks","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=x?.elId?`${x.elId}-calendarsClock-${l.getRandom(5)}`:void 0,k=e.reactive({isOpen:!1,activePointer:"hour",activeAm:"am"}),r=e.reactive({hour:!0,hourDisabled:!1,minute:!0,minuteDisabled:!1,minuteShowAddSub:!0,second:!0,secondDisabled:!1}),a=e.reactive({hour:-90,hourMinute:0,minute:-90,minuteSecond:0,second:-90}),m=e.reactive({hour:"00",minute:"00",second:"00"}),s=e.ref([]),t={selectDayDate:null,minDate:null,maxDate:null,timeAngle:{hour:30,minute:6,second:6},num:{hourAm:[0,1,2,3,4,5,6,7,8,9,10,11],hourPm:[12,13,14,15,16,17,18,19,20,21,22,23],minute:[0,5,10,15,20,25,30,35,40,45,50,55],second:[0,5,10,15,20,25,30,35,40,45,50,55]},origValue:{hour:"00",minute:"00",second:"00"},lastValue:{hour:"00",minute:"00",second:"00"},isCheckMin:!1,checkMinDiff:null,min:{hour:0,minute:0,second:0},isCheckMax:!1,checkMaxDiff:null,max:{hour:0,minute:0,second:0}},_=e.computed(()=>{let n={"panel-calendarsclocks":!0,"datetime-times":!0};return n["times-open"]=k.isOpen,n=l.getJsonMerge(n,pe.getClassNameJson(v.className)),n}),ae=e.computed(()=>{const n={"pointer-hour":!0};return n["pointer-active"]=k.activePointer==="hour",n["pointer-disabled"]=r.hourDisabled,n}),G=e.computed(()=>{const n={"pointer-minute":!0};return n["pointer-active"]=k.activePointer==="minute",n["pointer-disabled"]=r.minuteDisabled,n}),U=e.computed(()=>{const n={"pointer-second":!0};return n["pointer-active"]=k.activePointer==="second",n["pointer-disabled"]=r.secondDisabled,n}),ee=e.computed(()=>{const n={"am-am":!0};return n["am-active"]=k.activeAm==="am",n}),le=e.computed(()=>{const n={"am-pm":!0};return n["am-active"]=k.activeAm==="pm",n}),re=e.computed(()=>{const n={"clock-set":!0,"clock-set-hour":!0};return n["clock-set-active"]=k.activePointer==="hour",n["clock-set-disabled"]=r.hourDisabled,n}),P=e.computed(()=>{const n={"clock-set":!0,"clock-set-minute":!0};return n["clock-set-active"]=k.activePointer==="minute",n["clock-set-disabled"]=r.minuteDisabled,n}),Z=e.computed(()=>{const n={"clock-set":!0,"clock-set-second":!0};return n["clock-set-active"]=k.activePointer==="second",n["clock-set-disabled"]=r.secondDisabled,n}),ne=(n,d)=>{t[n]=x.getMomentDate(d)},z=n=>{let d=parseInt(t.lastValue[n],10),y=parseInt(m[n],10),A=0;return n==="hour"?(y===0&&d===23&&(y=24),d===0&&y===23&&(d=24),y-d>6&&(d+=12),d-y>=6&&(y+=12),A=y-d):(y-d>30&&(d+=60),d-y>=30&&(y+=60),A=y-d),A},te=n=>{const y=z(n)*t.timeAngle[n];return a[n]+(y>=360?y%360:y)},D=()=>{const n=te("hour"),d=t.timeAngle.hour*parseFloat((parseInt(m.minute,10)/60).toString()),y=te("minute"),A=t.timeAngle.second*parseFloat((parseInt(m.second,10)/60).toString()),q=te("second");a.hour=n,a.hourMinute=d,a.minute=y,a.minuteSecond=A,a.second=q},u=n=>parseInt(n,10)<12?"am":"pm",h=(n,d)=>{let y=!0;switch(n){case"hour":y=!0;break;case"minute":y=parseInt(m.hour,10)===t[d].hour;break;case"second":y=parseInt(m.hour,10)===t[d].hour&&parseInt(m.minute,10)===t[d].minute;break}return y},S=()=>t.isCheckMin&&t.isCheckMax&&t.checkMinDiff===0&&t.checkMaxDiff===0&&t.min.hour>t.max.hour,c=(n,d)=>{let y=!1;return S()&&n==="hour"?y=d<t.min[n]&&d>t.max[n]:t.isCheckMin&&(t.checkMinDiff===0?h(n,"min")&&(y=d<t.min[n]):t.checkMinDiff<0&&(y=!0)),!y&&t.isCheckMax&&(t.checkMaxDiff===0?h(n,"max")&&(y=d>t.max[n]):t.checkMaxDiff>0&&(y=!0)),y},V=n=>{let d=n;d==="hour"&&(d=k.activeAm==="am"?"hourAm":"hourPm");const y=r[`${n}Disabled`],A=[];t.num[d].forEach((q,X)=>{const se={num:q,cls:"clock-num",isDisabled:!1};se.cls+=` clock-num${X+1} `,se.isDisabled=y?!0:c(n,q),se.isDisabled&&(se.cls+=" clock-nums-disabled "),A.push(se)}),s.value=A},B=n=>{k.activePointer=n,n==="hour"&&(k.activeAm=u(m.hour)),V(n)},$=n=>{let d=null;if(!l.isUndefined(n)&&!l.isUndefined(t.selectDayDate)){const y=t.selectDayDate.clone().format("YYYY-MM-DD 00:00:00"),A=n.clone().format("YYYY-MM-DD 00:00:00");d=x.Dayjs(y).diff(x.Dayjs(A))}return d},T=(n=!0)=>{a.hour=-90,a.hourMinute=0,a.minute=-90,a.minuteSecond=0,a.second=-90,t.lastValue={hour:"00",minute:"00",second:"00"},D(),e.nextTick(()=>{const d=m.hour,y=m.minute,A=m.second;t.lastValue={hour:d,minute:y,second:A},n&&(t.origValue={hour:d,minute:y,second:A})})},ie=(n,d)=>{t.lastValue.hour=m.hour,t.lastValue.minute=m.minute,t.lastValue.second=m.second,m[n]=l.getFillZero(d),D(),v.isShowSubmit||i("onSubmit",`${m.hour}:${m.minute}:${m.second}`)},W=n=>{let d=0,y=0,A=0;if(!l.isEmpty(n)){const q=(l.isEmpty(t.selectDayDate)?x.getNow():t.selectDayDate).format("YYYY-MM-DD"),X=x.getMomentDate(`${q} ${n}`);X&&X.isValid()&&(d=X.hour(),y=X.minute(),A=X.second())}return{HH:d,mm:y,ss:A}},j=()=>{let n=!0,d=!0;const y=l.isEmpty(t.selectDayDate),A=W(v.selectValue),q=A.HH,X=A.mm,se=A.ss;switch(g.layerType){case"hours":n=!1,d=!1;break;case"minutes":d=!1;break}t.isCheckMin=!l.isUndefined(t.minDate),t.isCheckMin&&(t.checkMinDiff=x.checkIsTimes()?0:$(t.minDate),t.min={hour:t.minDate.hour(),minute:t.minDate.minute(),second:t.minDate.second()}),t.isCheckMax=!l.isUndefined(t.maxDate),t.isCheckMax&&(t.checkMaxDiff=x.checkIsTimes()?0:$(t.maxDate),t.max={hour:t.maxDate.hour(),minute:t.maxDate.minute(),second:t.maxDate.second()});const ye=l.getFillZero(q);let ke=l.getFillZero(X),De=l.getFillZero(se);n||(ke="00"),d||(De="00"),t.origValue={hour:ye,minute:ke,second:De},r.hour=!0,r.minute=n,r.second=d,m.hour=ye,m.minute=ke,m.second=De,x.checkIsTimes()||(r.hourDisabled=y,r.minuteDisabled=y,r.secondDisabled=y),g.layerType==="hours"&&(r.minute=!0,r.minuteDisabled=!0,r.minuteShowAddSub=!1),K(),H()},K=()=>{t.lastValue={hour:"00",minute:"00",second:"00"},a.hour=-90,a.hourMinute=0,a.minute=-90,a.minuteSecond=0,a.second=-90},H=()=>{D(),k.activeAm=u(m.hour),V(k.activePointer)},ce=()=>{k.isOpen=v.isShowPointer,ne("selectDayDate",x.checkIsTimes()?ht:v.selectDay),ne("minDate",x.getValueEffective(v.minValue)),ne("maxDate",x.getValueEffective(v.maxValue)),j(),B("hour"),T(),e.nextTick(()=>{i("onInitComplete","times")})},ue=n=>{let d=!1;return r[n]&&!r[`${n}Disabled`]&&(k.isOpen?d=!0:(T(!1),k.isOpen=!0,B(n))),d},ge=(n,d)=>{if(r[n]&&!r[`${n}Disabled`]&&k.isOpen){let y=!0,A=0,q=n==="hour"?23:59;if(t.isCheckMin&&(t.checkMinDiff===0?h(n,"min")&&(A=t.min[n]):t.checkMinDiff<0&&(y=!1)),t.isCheckMax&&(t.checkMaxDiff===0?h(n,"max")&&(q=t.max[n]):t.checkMaxDiff>0&&(y=!1)),y){const X=parseInt(m[n],10);let se=0;S()&&n==="hour"?se=d==="add"?X>=23?0:X+1:X<=0?23:X-1:d==="add"?se=X<A||X>=q?A:X+1:se=X>q||X<=A?q:X-1,c(n,se)||(ie(n,se),B(n))}}};e.onMounted(()=>{e.nextTick(()=>{ce()})}),e.watch(()=>v.selectDay,(n,d)=>{ne("selectDayDate",n),j()}),e.watch(()=>v.minValue,(n,d)=>{const y=x.getValueEffective(n);ne("minDate",y),j()}),e.watch(()=>v.maxValue,(n,d)=>{const y=x.getValueEffective(n);ne("maxDate",y),j()}),e.watch(()=>v.selectValue,(n,d)=>{const y=W(n),A=l.getFillZero(y.HH),q=l.getFillZero(y.mm),X=l.getFillZero(y.ss);(m.hour!==A||m.minute!==q||m.second!==X)&&(m.hour=A,m.minute=q,m.second=X,t.origValue={hour:A,minute:q,second:X},K(),H())});const p=n=>{r[n]&&!r[`${n}Disabled`]&&(B(n),k.isOpen||(T(),k.isOpen=!0))},E=n=>{if(!n.isDisabled){const d=k.activePointer,y=parseInt(m[d],10),A=n.num;A!==y&&ie(d,A)}},M=n=>{k.activeAm=n,k.activePointer="hour";const d=parseInt(m.hour,10);n==="pm"&&d<12?m.hour=l.getFillZero(d+12):n==="am"&&d>=12&&(m.hour=l.getFillZero(d-12)),D(),V("hour")},N=()=>ue("hour"),Q=n=>{let d=!1,y=!1;const A=S();if(t.isCheckMin){if(t.checkMinDiff<0)d=!0,y=!0;else if(t.checkMinDiff===0){const q=parseInt(m[n],10);h(n,"min")&&(d=A?q===t.min[n]:q<=t.min[n])}}if(t.isCheckMax){if(t.checkMaxDiff>0)d=!0,y=!0;else if(t.checkMaxDiff===0){const q=parseInt(m[n],10);h(n,"max")&&(y=A?q===t.max[n]:q>=t.max[n])}}return{subtractDisabled:d,addDisabled:y}},o=n=>(l.isEmpty(n.type)||ge("hour",n.type),{value:m.hour,...Q("hour")}),w=()=>ue("minute"),Y=n=>(l.isEmpty(n.type)||ge("minute",n.type),{value:m.minute,...Q("minute")}),R=()=>ue("second"),L=n=>(l.isEmpty(n.type)||ge("second",n.type),{value:m.second,...Q("second")}),J=()=>{v.isClickOverlay&&k.isOpen&&(x.checkIsTimes()||(k.isOpen=!1),i("onSubmit",`${m.hour}:${m.minute}:${m.second}`))},me=()=>{x.checkIsTimes()||(k.isOpen=!1),i("onSubmit",`${m.hour}:${m.minute}:${m.second}`)},de=()=>{(m.hour!==t.origValue.hour||m.minute!==t.origValue.minute||m.second!==t.origValue.second)&&(t.lastValue.hour=m.hour,t.lastValue.minute=m.minute,t.lastValue.second=m.second,m.hour=t.origValue.hour,m.minute=t.origValue.minute,m.second=t.origValue.second,H()),x.checkIsTimes()||(k.isOpen=!1)};return(n,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(_.value),id:e.unref(C)},[d[15]||(d[15]=e.createElementVNode("div",{class:"datetime-times-inner"},null,-1)),e.createElementVNode("div",null,[e.createElementVNode("div",lt,[e.createElementVNode("div",{class:"times-overlay",onClick:J}),f.isShowCancel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"times-cancel",title:e.unref(b).common.cancel,onClick:de},[e.createVNode(he._sfc_main,{name:"close1"})],8,rt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),f.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:2,class:"times-submit",title:e.unref(b).common.submit,onClick:me},[e.createVNode(he._sfc_main,{name:"check1"})],8,ct)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",ut,[e.createElementVNode("div",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(y,A)=>(e.openBlock(),e.createElementBlock("div",{key:`${I}-clock-${A}`,role:"button",tabindex:"0","aria-disabled":y.isDisabled,class:e.normalizeClass(y.cls),onClick:q=>E(y),onKeydown:[e.withKeys(e.withModifiers(q=>E(y),["prevent"]),["enter"]),e.withKeys(e.withModifiers(q=>E(y),["prevent"]),["space"])]},e.toDisplayString(y.num),43,dt))),128))]),e.createElementVNode("div",ft,[r.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(ae.value),onClick:d[0]||(d[0]=y=>p("hour")),style:e.normalizeStyle({transform:`rotate(${a.hour+a.hourMinute}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.minute?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(G.value),onClick:d[1]||(d[1]=y=>p("minute")),style:e.normalizeStyle({transform:`rotate(${a.minute+a.minuteSecond}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),r.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(U.value),onClick:d[2]||(d[2]=y=>p("second")),style:e.normalizeStyle({transform:`rotate(${a.second}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))]),e.withDirectives(e.createElementVNode("div",Dt,[e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(ee.value),onClick:d[3]||(d[3]=y=>M("am")),onKeydown:[d[4]||(d[4]=e.withKeys(e.withModifiers(y=>M("am"),["prevent"]),["enter"])),d[5]||(d[5]=e.withKeys(e.withModifiers(y=>M("am"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(b).am),35),e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(le.value),onClick:d[6]||(d[6]=y=>M("pm")),onKeydown:[d[7]||(d[7]=e.withKeys(e.withModifiers(y=>M("pm"),["prevent"]),["enter"])),d[8]||(d[8]=e.withKeys(e.withModifiers(y=>M("pm"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(b).pm),35)],512),[[e.vShow,k.activePointer==="hour"]])])]),r.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(re.value),onClick:d[10]||(d[10]=y=>p("hour"))},[e.createVNode(Se._sfc_main,{value:m.hour,"onUpdate:value":d[9]||(d[9]=y=>m.hour=y),size:"small",isClean:!1,disabled:r.hourDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:N,calculationOperateValueCallback:o},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.minute&&r.minuteShowAddSub?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(P.value),onClick:d[12]||(d[12]=y=>p("minute"))},[e.createVNode(Se._sfc_main,{value:m.minute,"onUpdate:value":d[11]||(d[11]=y=>m.minute=y),size:"small",isClean:!1,disabled:r.minuteDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:w,calculationOperateValueCallback:Y},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),r.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(Z.value),onClick:d[14]||(d[14]=y=>p("second"))},[e.createVNode(Se._sfc_main,{value:m.second,"onUpdate:value":d[13]||(d[13]=y=>m.second=y),size:"small",isClean:!1,disabled:r.secondDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:R,calculationOperateValueCallback:L},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],10,it))}}),gt=["id"],Ce=e.defineComponent({name:"ClCalendarsBase",__name:"CalendarsBase",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onSelectDate:f=>!0,onChangeViewValue:f=>!0,onHoverDate:f=>!0,onChangeViewType:f=>!0,onSelectTime:f=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,I=e.inject("$DateTimeTop"),b=e.inject("$DateTimeTopBase");(!I||!b)&&fe.warn("ClCalendarsBase","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const O=I?.elId?`${I.elId}-calendarsBase-${l.getRandom(5)}`:void 0,x=e.computed(()=>{let u={"panel-calendarsbase":!0};return u=l.getJsonMerge(u,pe.getClassNameJson(v.className)),u}),g=e.reactive({currentView:"",viewValue:"",selectValue:"",selectClockDay:"",selectClockTime:""}),C=e.reactive({isShow:!1,isViewDay:!1,isShowClockPointer:!1,isShowClockSubmit:!1,isShowClockCancel:!1,isClockClickOverlay:!1}),k={viewDate:null,selectDate:null,focusDate:null,minDate:null,maxDate:null},r=(u,h)=>{k[u]=l.isString(h)?I.getMomentDate(h):null},a=u=>{const h=Object.keys(u);l.isExistValue(h,"viewValue")&&b.layerView===u.currentView&&i("onChangeViewValue",u.viewValue),h.forEach(S=>{const c=S,V=u[c];l.isExistJsonKey(g,c)&&g[c]!==V&&(g[c]=V),l.isExistJsonKey(k,c)&&(k[c]=V)})},m=(u,h)=>{let S=!1;return l.isEmpty(u)||l.isNaN(u)||(l.isEmpty(k.minDate)||(S=I.Dayjs(u).isBefore(k.minDate,h)),!S&&!l.isEmpty(k.maxDate)&&(S=I.Dayjs(u).isAfter(k.maxDate,h))),S},s=(u,h)=>{let S=0,c=1;if(l.isEmpty(k.minDate))l.isUndefined(h)||(S=h);else{const V=u===k.minDate.year();let B=!0;l.isUndefined(h)?S=V?k.minDate.month():0:(B=h===k.minDate.month(),S=h),c=V&&B?k.minDate.date():1}return I.getMomentDate({year:u,month:S,day:c})??I.getNow().startOf("year")},t=u=>{let h="";switch(u){case"months":h="days";break;case"years":h="months";break;default:h="days";break}return h},_=u=>{const S=(u||k.selectDate||k.viewDate).format("YYYY-MM-DD")+" "+(l.isEmpty(g.selectClockTime)?"00:00:00":g.selectClockTime);return I.Dayjs(S)},ae=(u,h)=>{const S=k.viewDate.clone(),c=parseInt(h.value,10);if(l.isNaN(c))return _(S);let V;switch(u){case"days":{let B=0;h.isNew?B=1:h.isOld&&(B=-1),V=S.month(S.month()+B).date(c);break}case"months":{const B=k.selectDate||S,$=S.month(c);V=$.date(Math.min(B.date(),$.daysInMonth()));break}case"years":V=S.month(0).date(1).year(c);break;default:V=S;break}return _(V)},G=()=>{g.viewValue=k.viewDate.format(b.formatIn),k.focusDate=k.viewDate.clone()},U=u=>{r("selectDate",u==="-1"?"":u);const h=k.selectDate?k.selectDate.format("YYYY-MM-DD"):"";g.selectValue=h,g.selectClockDay=h,g.selectClockTime=k.selectDate?k.selectDate.format("HH:mm:ss"):""},ee=()=>{let u=!1,h=!1,S=!1,c=!1,V=!1,B=!1;g.currentView==="times"?(u=!0,S=!0,B=!1,c=b.isDefault&&b.isShowPopup,V=b.isDefault&&b.isShowPopup,b.layerType==="hours"&&(V=!1,c=!1)):g.currentView==="days"&&(h=b.timeType==="datetime",h&&(V=!0,c=!0,S=!1,B=!0)),C.isShow=u,C.isViewDay=h,C.isShowClockPointer=S,C.isShowClockSubmit=c,C.isShowClockCancel=V,C.isClockClickOverlay=B},le=()=>{g.currentView=b.layerView,k.viewDate=I.getViewDate(v.viewValue),G(),U(v.selectValue),r("minDate",v.minValue),r("maxDate",v.maxValue),ee()};e.onMounted(()=>{e.nextTick(()=>{le()})}),e.watch(()=>v.viewValue,(u,h)=>{k.viewDate=I.getViewDate(u),G()}),e.watch(()=>v.selectValue,(u,h)=>{const S=b.isRange&&u==="-1";let c=u;const V=g.selectClockTime;S&&(c=""),U(c),S&&(g.selectClockTime=V)}),e.watch(()=>v.minValue,(u,h)=>{r("minDate",u)}),e.watch(()=>v.maxValue,(u,h)=>{r("maxDate",u)});const re=u=>{a({currentView:g.currentView,viewDate:u.clone(),viewValue:u.format(b.formatIn)})},P=u=>{g.currentView=u,k.focusDate=k.viewDate.clone(),ee(),i("onChangeViewType",u)},Z=(u,h)=>{const S=ae(u,h),c=S.format("YYYY-MM-DD"),V={};if(b.layerView===u)V.selectDate=S,V.selectValue=c,b.isRange||(V.selectClockDay=c),a(V),i("onSelectDate",c);else{const B=t(u);if(B===u){V.selectDate=S,V.selectValue=c,b.isRange||(V.selectClockDay=c),a(V),i("onSelectDate",c);return}V.viewDate=S.clone().startOf("month"),V.viewValue=V.viewDate.format(b.formatIn),V.currentView=B,a(V),ee(),i("onChangeViewType",V.currentView)}},ne=(u,h)=>{const S=ae(u,h);i("onHoverDate",S)},z=u=>{a({selectClockTime:u}),i("onSelectTime",u)},te=new Set,D=u=>{b.layerView===u&&!te.has(u)&&(te.add(u),i("onInitComplete",u))};return e.provide("$DateTimeBase",{checkDataMinMax:m,getViewMin:s,getFocusDate:()=>k.focusDate&&k.focusDate.clone()}),(u,h)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(O),class:e.normalizeClass(x.value)},[g.currentView==="days"?(e.openBlock(),e.createBlock(Ae,{key:0,viewValue:g.viewValue,selectValue:g.selectValue,startValue:f.startValue,endValue:f.endValue,hoverValue:f.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeDate:re,onOnChangeType:P,onOnSelectDate:Z,onOnHoverDate:ne,onOnInitComplete:D},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):g.currentView==="months"?(e.openBlock(),e.createBlock(Ue,{key:1,viewValue:g.viewValue,selectValue:g.selectValue,startValue:f.startValue,endValue:f.endValue,hoverValue:f.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeDate:re,onOnChangeType:P,onOnSelectDate:Z,onOnHoverDate:ne,onOnInitComplete:D},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):g.currentView==="years"?(e.openBlock(),e.createBlock(ot,{key:2,viewValue:g.viewValue,selectValue:g.selectValue,startValue:f.startValue,endValue:f.endValue,hoverValue:f.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeDate:re,onOnSelectDate:Z,onOnHoverDate:ne,onOnInitComplete:D},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),C.isShow||C.isViewDay?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass({"datetime-days-times":C.isViewDay})},[e.createVNode(pt,{selectDay:g.selectClockDay,selectValue:g.selectClockTime,minValue:f.minValue,maxValue:f.maxValue,isShowPointer:C.isShowClockPointer,isShowSubmit:C.isShowClockSubmit,isShowCancel:C.isShowClockCancel,isClickOverlay:C.isClockClickOverlay,onOnSubmit:z,onOnInitComplete:D},null,8,["selectDay","selectValue","minValue","maxValue","isShowPointer","isShowSubmit","isShowCancel","isClickOverlay"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],10,gt))}}),yt=["tabindex","aria-disabled","onKeydown"],vt=e.defineComponent({name:"ClDateTimeDefault",__name:"DateTimeDefault",props:{className:String,value:String,minValue:String,maxValue:String},emits:{onSelectValue:f=>!0,onInitComplete:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=e.inject("$DateTimeTop"),g=e.inject("$DateTimeTopBase");(!x||!g)&&fe.warn("ClDateTimeDefault","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=e.reactive({isShowSubmit:!1,isSubmitDisplay:!1}),k=e.reactive({day:"",time:""}),r=e.computed(()=>{let P={"panel-date-time-default":!0,"datetime-default":!0,"datetime-panel-body":!0};return P=l.getJsonMerge(P,pe.getClassNameJson(i.className)),P}),a=()=>{const P=x.getMergeDayTime(k.day,k.time),Z=x.checkValue(P);C.isSubmitDisplay=l.isEmpty(k.day)||Z.errMsg.length>0},m=P=>{let Z=!1;g.timeType==="datetime"&&(Z=P==="days"),C.isShowSubmit=Z},s=P=>{let Z="",ne="",z=!0;if(l.isNonEmptyString(P)){const te=x.getMomentDate(P);te&&(Z=te.format("YYYY-MM-DD"),ne=te.format("HH:mm:ss"),z=!1)}k.day=Z,k.time=ne,C.isSubmitDisplay=z,a()},t=()=>{m(g.layerView),s(i.value)},_=()=>{const P=x.getMomentDate(x.getMergeDayTime(k.day,k.time));P&&I("onSelectValue",P)};e.onMounted(()=>{e.nextTick(()=>{t()})}),e.watch(()=>i.value,(P,Z)=>{P!==Z&&s(P)}),e.watch([()=>i.minValue,()=>i.maxValue],()=>{a()});const ae=P=>{k.day=P,a(),g.timeType==="date"&&_()},G=P=>{k.time=P,a(),(g.timeType==="time"||g.timeType==="datetime"&&!C.isSubmitDisplay)&&_()},U=P=>{m(P)},ee=()=>{C.isShowSubmit&&!C.isSubmitDisplay&&_()},le=()=>{I("onInitComplete")};return oe({getValue:()=>{const P=x.getMergeDayTime(k.day,k.time);return x.getMomentDate(P)}}),(P,Z)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ce,{class:e.normalizeClass(r.value),selectValue:f.value,viewValue:f.value,minValue:f.minValue,maxValue:f.maxValue,onOnSelectDate:ae,onOnSelectTime:G,onOnChangeViewType:U,onOnInitComplete:le},null,8,["class","selectValue","viewValue","minValue","maxValue"]),C.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",tabindex:C.isSubmitDisplay?-1:0,"aria-disabled":C.isSubmitDisplay,class:e.normalizeClass({"datetime-days-submit":!0,"days-submit-disabled":C.isSubmitDisplay}),onClick:ee,onKeydown:[e.withKeys(e.withModifiers(ee,["prevent"]),["enter"]),e.withKeys(e.withModifiers(ee,["prevent"]),["space"])]},[e.createElementVNode("span",null,e.toDisplayString(e.unref(b).common.submit),1)],42,yt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),kt=["id"],Vt={class:"calendar-range calendar-left"},wt={class:"calendar-text"},St={class:"time-input-base"},Ct=["value","name"],Mt={class:"calendar-panel"},Et={class:"calendar-range calendar-right"},xt={class:"calendar-text"},Tt={class:"time-input-base"},bt=["value","name"],_t={class:"calendar-panel"},Bt={class:"calendar-range calendar-quick"},$t=["onClick","onKeydown"],Yt={key:0,class:"panel-quick-btn"},Nt=e.defineComponent({name:"ClDateTimeRange",__name:"DateTimeRange",props:{className:String,startValue:String,endValue:String,minValue:String,maxValue:String,rangeQuick:{type:Array,default:()=>[]}},emits:{onSubmit:f=>!0,onCancel:()=>!0,onInitComplete:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,b=`dateTimeRange-${l.getRandom(5)}`,{optPageLanguage:O,getPageLanguage:x}=ve.useLanguage();x("dataTime");const g=e.inject("$DateTimeTop"),C=e.inject("$DateTimeTopBase");(!g||!C)&&fe.warn("ClDateTimeRange","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const k=g?.elId?`${g.elId}-dateTimeRange-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let p={"panel-date-time-range":!0,"panel-range-calendar":!0,"datetime-range":!0,"datetime-panel-body":!0};return p=l.getJsonMerge(p,pe.getClassNameJson(i.className)),p}),a=e.reactive({operateViewDataType:"",selectCount:0,hoverValue:"",activeQuick:"",isCheck:!0,isShowQuickBtn:C.isShowPopup||C.timeType==="datetime",previewStart:"",previewEnd:""}),m=e.reactive({view:"",text:"",name:`input_${l.getRandom(8)}`}),s=e.reactive({view:"",text:"",name:`input_${l.getRandom(8)}`}),t=e.reactive({day:"",time:"",value:""}),_=e.reactive({day:"",time:"",value:""}),ae=e.ref([]),G=(p,E)=>{const M=g.getViewDate(p),N=C.layerView==="years"?10:1,Q=a.operateViewDataType;return M[E](N,Q).format(C.formatIn)},U=(p,E)=>{if(l.isEmpty(p))return"";const M=E==="right"?C.formatOutEnd:C.formatOut;if(l.isString(p)){const N=g.getMomentDate(p);return N?N.format(M):""}return p.format(M)},ee=()=>{const p=g.getMergeDayTime(t.day,t.time);t.value=p,m.text=U(p,"left")},le=()=>{const p=g.getMergeDayTime(_.day,_.time);_.value=p,s.text=U(p,"right")},re=()=>{if(a.selectCount===2){let p="-1";if(!l.isEmpty(t.day)&&!l.isEmpty(_.day)&&!l.isEmpty(ae.value)){const E="YYYY-MM-DD";let M=g.getMomentDate(t.day,E),N=g.getMomentDate(_.day,E);if(M&&N){switch(C.layerType){case"years":if(M=g.getMomentDate(M.startOf("year").format(E),E),N=g.getMomentDate(N.endOf("year").format(E),E),!M||!N){a.activeQuick="-1";return}break;case"months":if(M=g.getMomentDate(M.startOf("month").format(E),E),N=g.getMomentDate(N.endOf("month").format(E),E),!M||!N){a.activeQuick="-1";return}break}const Q=M,o=N;Q&&o&&ae.value.forEach(w=>{w.start&&w.end&&Q.isSame(we.getDayjsObject(w.start).format(E))&&o.isSame(we.getDayjsObject(w.end).format(E))&&(p=w.id)})}}a.activeQuick=p}},P=p=>{const E=t.value,M=_.value,N=l.isEmpty(E),Q=l.isEmpty(M),o=!N&&Q,w=N&&!Q;let Y=!1,R=!1;if(p&&(o||w)){const L=g.getMomentDate(o?E:M);L&&(Y=p.isBefore(L,"day"),R=p.isSame(L,"day"))}return{isStart:o,isEnd:w,isBefore:Y,isSame:R}},Z=p=>{if(a.selectCount===1){const E=p.format("YYYY-MM-DD"),M=t.day,N=_.day,Q=P(p);a.hoverValue=E;let o="",w="";Q.isBefore?(o=E,w=Q.isStart?M:N):(o=Q.isEnd?N:M,w=E),a.previewStart=o,a.previewEnd=w,m.text=U(g.getMergeDayTime(o,t.time),"left"),s.text=U(g.getMergeDayTime(w,_.time),"right")}},ne=p=>{switch(a.previewStart="",a.previewEnd="",a.selectCount){case 0:case 2:{a.selectCount=1,a.activeQuick="",t.day=p,ee(),_.day="",_.time="",_.value="",s.text=U(g.getMergeDayTime(p,""),"right"),a.hoverValue=p;break}case 1:{a.selectCount=2;const E=g.getMomentDate(p);if(!E){a.selectCount=1;break}const M=P(E);M.isSame?(t.day=p,ee(),_.day=p,le()):M.isBefore?(_.day=t.day,_.time=t.time,t.day=p,ee(),le()):(_.day=p,le()),a.hoverValue="";break}}a.selectCount===2&&re()},z=()=>{!a.isShowQuickBtn&&a.selectCount===2&&a.isCheck&&I("onSubmit",{start:t.value,end:_.value})},te=(p,E)=>{const M=g.getMomentDate(E),N=M?M.format("YYYY-MM-DD"):"",Q=M?M.format("HH:mm:ss"):"",o=M?g.getMergeDayTime(N,Q):"";p?(t.day=N,t.time=Q,t.value=o,m.text=U(o,"left")):(_.day=N,_.time=Q,_.value=o,s.text=U(o,"right"))},D=()=>{let p="";switch(C.layerType){case"days":p="months";break;case"months":p="years";break;case"years":p="years";break;default:p="months"}a.operateViewDataType=p;const E=i.startValue||"",M=i.endValue||"",N=!l.isEmpty(E),Q=!l.isEmpty(M);if(a.selectCount=N&&Q?2:N||Q?1:0,m.view=g.getViewDate(E).format(C.formatIn),s.view=G(m.view,"add"),te(!0,E),te(!1,M),C.timeType==="time"){a.selectCount=2;const o=C.layerType==="seconds"?"00:00:00":"00:00";l.isEmpty(m.text)&&te(!0,g.getValueEffective(o)),l.isEmpty(s.text)&&te(!1,g.getValueEffective(o))}u()},u=()=>{let p=[];l.isArray(i.rangeQuick)&&(p=l.getListClone(i.rangeQuick).filter(E=>l.isObject(E)&&l.isNonEmptyString(E.id)),p.length>0&&p.push({id:"-1",text:O.value.common.custom})),ae.value=p},h=()=>{D(),re(),e.nextTick(()=>{e.nextTick(()=>{I("onInitComplete")})})},S=()=>{if(a.selectCount===2){const p=g.checkValue(t.value,_.value);a.isCheck=p.errMsg.length===0}};e.onMounted(()=>{e.nextTick(()=>{h()})}),e.watch([()=>i.startValue,()=>i.endValue],([p,E])=>{te(!0,p),te(!1,E);const M=!l.isEmpty(p),N=!l.isEmpty(E);a.selectCount=M&&N?2:M||N?1:0,a.selectCount!==2&&(a.activeQuick=""),a.hoverValue="",a.previewStart="",a.previewEnd="",re(),S()}),e.watch(()=>i.rangeQuick,()=>{a.operateViewDataType&&u()});const c=()=>{a.hoverValue="",a.previewStart="",a.previewEnd="",m.text=U(g.getMergeDayTime(t.day,t.time),"left"),s.text=U(g.getMergeDayTime(_.day,_.time),"right")},V=p=>{m.view=p,s.view=G(p,"add")},B=p=>{ne(p),S(),z()},$=p=>{t.time=p,ee(),S(),z()},T=p=>{Z(p)},ie=p=>{m.view=G(p,"subtract"),s.view=p},W=p=>{ne(p),S(),z()},j=p=>{_.time=p,le(),S(),z()},K=p=>{Z(p)},H=p=>{if(p.id!=="-1"){if(l.isEmpty(p.start)||l.isEmpty(p.end))return;const E=we.getDayjsObject(p.start),M=we.getDayjsObject(p.end);if(!E.isValid()||!M.isValid()){fe.warn("ClDateTimeRange",`快捷项 "${p.text}" 日期无效,已忽略`);return}let N=E.format("YYYY-MM-DD"),Q=M.format("YYYY-MM-DD");const o=g.checkMinMax(N,Q,"YYYY-MM-DD");if(!o.isStartMax||!o.isEndMin){fe.warn("ClDateTimeRange",`快捷项 "${p.text}" 超出可选范围,已忽略`);return}o.isStartMin||(N=o.minDay),o.isEndMax||(Q=o.maxDay),t.day=N,ee(),_.day=Q,le(),m.view=N;const w=l.isEmpty(Q)?null:g.getMomentDate(Q);s.view=w?w.startOf("month").format(C.formatIn):G(N,"add"),a.hoverValue="",a.previewStart="",a.previewEnd="",a.selectCount=2,a.activeQuick=p.id,S(),z()}},ce=()=>{a.selectCount===2&&a.isCheck&&(I("onSubmit",{start:t.value,end:_.value}),a.isCheck=!1)},ue=()=>{I("onCancel")};return oe({getValue:()=>({start:t.value,end:_.value})}),(p,E)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(k),class:e.normalizeClass(r.value),onMouseleave:c},[e.createElementVNode("div",Vt,[e.createElementVNode("div",wt,[e.createElementVNode("div",St,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:m.text,name:m.name},null,8,Ct),e.createVNode(he._sfc_main,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",Mt,[e.createVNode(Ce,{selectValue:a.selectCount===2?t.value:"-1",startValue:a.previewStart||t.value,endValue:a.previewEnd||_.value,viewValue:m.view,hoverValue:a.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeViewValue:V,onOnSelectDate:B,onOnSelectTime:$,onOnHoverDate:T},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Et,[e.createElementVNode("div",xt,[e.createElementVNode("div",Tt,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:s.text,name:s.name},null,8,bt),e.createVNode(he._sfc_main,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",_t,[e.createVNode(Ce,{selectValue:a.selectCount===2?_.value:"-1",startValue:a.previewStart||t.value,endValue:a.previewEnd||_.value,viewValue:s.view,hoverValue:a.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeViewValue:ie,onOnSelectDate:W,onOnSelectTime:j,onOnHoverDate:K},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Bt,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(M,N)=>(e.openBlock(),e.createElementBlock("li",{key:`${b}-${M.id}-${N}`,role:"button",tabindex:"0",class:e.normalizeClass({active:M.id===a.activeQuick,"calendar-quick-special":M.id==="-1"}),onClick:Q=>H(M),onKeydown:[e.withKeys(e.withModifiers(Q=>H(M),["prevent"]),["enter"]),e.withKeys(e.withModifiers(Q=>H(M),["prevent"]),["space"])]},e.toDisplayString(M.text),43,$t))),128))]),a.isShowQuickBtn?(e.openBlock(),e.createElementBlock("div",Yt,[e.createVNode(Me._sfc_main,{className:"quick-submit",label:e.unref(O).common.submit,size:"small",disabled:a.selectCount!==2||!a.isCheck,onOnClick:ce},null,8,["label","disabled"]),e.createVNode(Me._sfc_main,{className:"quick-cancel",label:e.unref(O).common.cancel,size:"small",color:"grayLight",onOnClick:ue},null,8,["label"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],42,kt))}}),Ot={key:3,class:"datetime-errmsg",role:"alert"},Ee=e.defineComponent({name:"ClDateTimeBase",__name:"DateTimeBase",props:{isDefault:{type:Boolean,default:!1},isRange:{type:Boolean,default:!1},start:String,end:String,minDate:String,maxDate:String,rangeQuick:{type:Array,default:()=>[]},errMsg:{type:Array,default:()=>[]}},emits:{onSelectValue:f=>!0,onClose:()=>!0,onInitComplete:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,b=`clDatetimeBase-${l.getRandom(5)}`,O=e.inject("$DateTimeTop");O||fe.warn("ClDateTimeBase","未找到 $DateTimeTop 注入,请确保组件在 ClDateTime 组件树内使用");const x=e.computed(()=>!!O);i.isDefault===i.isRange&&fe.warn("ClDateTimeBase",`isDefault(${i.isDefault}) 与 isRange(${i.isRange}) 必须恰好一个为 true`);const g=e.useTemplateRef("refEl");let C=!1;const k=e.computed(()=>l.isArray(i.errMsg)&&i.errMsg.length>0),r=t=>{I("onSelectValue",t)},a=()=>{I("onClose")},m=()=>{C||(C=!0,I("onInitComplete"))};return oe({getValue:()=>g.value?g.value.getValue():i.isDefault?l.isNonEmptyString(i.start)?O?.getMomentDate(i.start)??i.start:null:l.isNonEmptyString(i.start)||l.isNonEmptyString(i.end)?{start:i.start,end:i.end}:""}),(t,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.value&&f.isDefault?(e.openBlock(),e.createBlock(vt,{key:0,ref_key:"refEl",ref:g,value:f.start,minValue:f.minDate,maxValue:f.maxDate,onOnSelectValue:r,onOnInitComplete:m},null,8,["value","minValue","maxValue"])):x.value&&f.isRange?(e.openBlock(),e.createBlock(Nt,{key:1,ref_key:"refEl",ref:g,rangeQuick:f.rangeQuick,minValue:f.minDate,maxValue:f.maxDate,startValue:f.start,endValue:f.end,onOnSubmit:r,onOnCancel:a,onOnInitComplete:m},null,8,["rangeQuick","minValue","maxValue","startValue","endValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),k.value?(e.openBlock(),e.createElementBlock("ul",Ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.errMsg,(ae,G)=>(e.openBlock(),e.createElementBlock("li",{key:`${b}-err-${G}`},e.toDisplayString(ae),1))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],64))}}),It=["id"],Pt=["id"],Rt="2000-01-01",At=e.defineComponent({name:"ClDateTime",__name:"Index",props:{id:String,value:String,className:String,placeholder:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:f=>["default","range"].includes(f)},layerType:{type:String,default:"days",validator:f=>["years","months","days","hours","minutes","seconds"].includes(f)},timeType:{type:String,default:"date",validator:f=>["date","time","datetime"].includes(f)},format:String,formatEnd:String,direction:{type:String,default:"left"},minDate:String,maxDate:String,isClear:{type:Boolean,default:!1},rangeQuick:{type:Array,default:()=>[]},isDropdown:{type:Boolean,default:!0},themeStyle:{type:String,default:"default",validator:f=>["default","noBorder"].includes(f)},arrowDirection:{type:String,default:"right"},isUseDropdownArrow:{type:Boolean,default:!0},checkCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:" ~ "},appendContainer:{type:String,default:""}},emits:{"update:value":f=>!0,"update:modelValue":f=>!0,onChange:(f,oe)=>!0,onInit:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=`datetime-${l.getRandom(8)}`,g=i.id,C=e.useTemplateRef("refElDropdownLayer"),k=e.useTemplateRef("refElDatetime"),r=e.reactive({isInit:!1,isDefault:i.theme!=="range",isRange:i.theme==="range",isShowPopup:i.isDropdown,timeType:"",layerType:i.layerType,layerView:"",formatIn:"",formatOut:"",formatOutEnd:"",rangeQuick:[],errMsg:[]}),a=e.reactive({showText:"",start:"",end:""}),m={lastStart:"",lastEnd:""},s=e.computed(()=>{let o=i.arrowDirection;return l.isEmpty(o)&&(o=i.themeStyle==="noBorder"?"left":"right"),o}),t=e.computed(()=>{let o={"panel-date-time":!0};return i.themeStyle==="noBorder"&&(o["datetime-themeStyle-noBorder"]=!0),i.themeStyle==="noBorder"&&l.isEmpty(a.showText)&&(o["datetime-empty"]=!0),i.isDropdown||(o["datetime-noPopup"]=!0,o[`datetime-${i.theme}`]=!0),o=l.getJsonMerge(o,pe.getClassNameJson(i.className)),l.getStringByJson(o," ")}),_=e.computed(()=>`datetime-dropdown datetime-${i.theme} datetime-dropdown-${i.theme}`),ae=e.computed(()=>{let o={"panel-date-time":!0};return o=l.getJsonMerge(o,pe.getClassNameJson(i.className)),`${l.getStringByJson(o," ")} cl-plaintext-value`}),G=e.computed(()=>{const o=a.showText,w=l.isString(i.plaintextSeparator)?i.plaintextSeparator:" ~ ";return!r.isRange||w===" ~ "?o:o.split(" ~ ").join(w)}),U=e.computed(()=>xe.getPlaintextOutText("dateTime",i.plaintextEmptyText,G.value,i.value)),ee=()=>[{id:"today",text:b.value.today,start:F(),end:F()},{id:"yesterDay",text:b.value.yesterDay,start:F().subtract(1,"day"),end:F().subtract(1,"day")},{id:"pastDays7",text:b.value.pastDays7,start:F().subtract(7,"day"),end:F().subtract(1,"day")},{id:"pastDays30",text:b.value.pastDays30,start:F().subtract(30,"day"),end:F().subtract(1,"day")},{id:"mont",text:b.value.montCurrent,start:F().startOf("month"),end:F().endOf("month")},{id:"montLast",text:b.value.montLast,start:F().subtract(1,"month").startOf("month"),end:F().subtract(1,"month").endOf("month")}],le=()=>[{id:"mont",text:b.value.montCurrent,start:F().startOf("month"),end:F().endOf("month")},{id:"montLast",text:b.value.montLast,start:F().subtract(1,"month").startOf("month"),end:F().subtract(1,"month").endOf("month")},{id:"montLately6",text:b.value.montLately6,start:F().subtract(5,"month").startOf("month"),end:F().endOf("month")},{id:"year",text:b.value.yearCurrent,start:F().startOf("year"),end:F().endOf("year")},{id:"yearLast",text:b.value.yearLast,start:F().subtract(1,"year").startOf("year"),end:F().subtract(1,"year").endOf("year")}],re=()=>[{id:"year",text:b.value.yearCurrent,start:F().startOf("year"),end:F().endOf("year")},{id:"yearLast",text:b.value.yearLast,start:F().subtract(1,"year").startOf("year"),end:F().subtract(1,"year").endOf("year")}],P=o=>{const w=l.isEmpty(o.start),Y=l.isEmpty(o.end),R=w?"":F(o.start).format(r.formatIn),L=Y?"":F(o.end).format(r.formatIn),J=r.isDefault?R:w||Y?"":`${R}~${L}`,me=r.isDefault?{value:R}:{start:R,end:L,value:J};return{value:J,info:me}},Z=()=>{C.value&&C.value.setOpen(!1)},ne=()=>r.timeType==="time",z=o=>{if(!o)return"";const w=l.isString(o)?l.trim(o):"";return ne()?/^\d{4}-\d{2}-\d{2}/.test(w)?w:`${Rt} ${w}`:w},te=()=>F(),D=(o,w)=>{let Y=null;if(!l.isEmpty(o)){const R=l.isUndefined(w)?r.formatIn:w;Y=l.isString(o)?F(o,R):F(o),Y&&!Y.isValid()&&(Y=null)}return Y},u=o=>{const w=D(o);return w?w.startOf("month"):te().startOf("month")},h=(o,w,Y)=>{const R=l.isEmpty(Y)?r.formatIn:Y;let L="";if(!l.isEmpty(i.minDate)){const De=D(z(i.minDate));L=De?De.format(R):""}let J="";if(!l.isEmpty(i.maxDate)){const De=D(z(i.maxDate));J=De?De.format(R):""}let me=!0,de=!0,n=!0,d=!0,y=!0,A=!1;const q=l.isEmpty(o),X=l.isEmpty(w);let se;switch(i.layerType){case"years":se="year";break;case"months":se="month";break;case"days":se="day";break;case"hours":se="hour";break;case"minutes":se="minute";break;case"seconds":se="second";break;default:se="day";break}if(!q){const De=F(o);if(De.isValid()&&(l.isEmpty(L)||(me=De.isSameOrAfter(L,se)),l.isEmpty(J)||(de=De.isSameOrBefore(J,se)),!X)){const Ve=F(w);Ve.isValid()&&(l.isEmpty(L)||(n=Ve.isSameOrAfter(L,se)),l.isEmpty(J)||(d=Ve.isSameOrBefore(J,se)),Ve.isBefore(De)&&(y=!1))}}const ye=[],ke=r.isRange?b.value.rangeStartLabel:"";return de?n?(me||ye.push(`${ke}${b.value.checkStartMinLabel}(${D(L,R)?.format(r.formatOut)??L})`),d||ye.push(`${b.value.checkEndMaxLabel}(${D(J,R)?.format(r.formatOut)??J})`)):ye.push(`${b.value.checkEndMinLabel}(${D(L,R)?.format(r.formatOut)??L})`):ye.push(`${ke}${b.value.checkStartMaxLabel}(${D(J,R)?.format(r.formatOut)??J})`),r.isRange&&((q||X)&&(A=!0,ye.push(b.value.checkRangeEmptyLabel)),y||ye.push(b.value.checkStartEndLabel)),{isStartMin:me,isStartMax:de,isEndMin:n,isEndMax:d,isStartEnd:y,isRangeEmpty:A,errMsg:ye,minDay:L,maxDay:J}},S=(o,w,Y)=>{const R=h(o,w||"",Y);return r.errMsg=R.errMsg,C.value&&e.nextTick(()=>{C.value?.calculationPosition()}),R},c=()=>{let o=[];switch(i.layerType){case"days":case"hours":case"minutes":case"seconds":o=r.timeType==="time"?[]:ee();break;case"months":o=le();break;case"years":o=re();break}return o},V=()=>{let o=[];r.isRange&&(l.isArray(i.rangeQuick)&&i.rangeQuick.length>0?o=[...i.rangeQuick]:o=c()),r.rangeQuick=o},B=()=>{["default","range"].includes(i.theme)||fe.warn("ClDateTime",`theme 非法值 "${i.theme}",可选值 default/range`),["years","months","days","hours","minutes","seconds"].includes(i.layerType)||fe.warn("ClDateTime",`layerType 非法值 "${i.layerType}"`),["date","time","datetime"].includes(i.timeType)||fe.warn("ClDateTime",`timeType 非法值 "${i.timeType}"`),["default","noBorder"].includes(i.themeStyle)||fe.warn("ClDateTime",`themeStyle 非法值 "${i.themeStyle}"`)},$=()=>{B();let o="",w="",Y="";switch(i.layerType){case"years":o="date",w="YYYY",Y=i.layerType;break;case"months":o="date",w="YYYY-MM",Y=i.layerType;break;case"days":o="date",w="YYYY-MM-DD",Y=i.layerType;break;case"hours":o=i.timeType==="date"?"datetime":i.timeType,w=o==="time"?"HH:00":"YYYY-MM-DD HH:00",Y=o==="datetime"?"days":"times";break;case"minutes":o=i.timeType==="date"?"datetime":i.timeType,w=o==="time"?"HH:mm":"YYYY-MM-DD HH:mm",Y=o==="datetime"?"days":"times";break;case"seconds":o=i.timeType==="date"?"datetime":i.timeType,w=o==="time"?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss",Y=o==="datetime"?"days":"times";break;default:o="date",w="YYYY-MM-DD",Y=i.layerType;break}r.timeType=o,r.layerView=Y,r.formatIn=o==="date"?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss",r.formatOut=l.isNonEmptyString(i.format)?i.format:w,r.formatOutEnd=l.isNonEmptyString(i.formatEnd)?i.formatEnd:w},T=o=>{let w="",Y="",R="";if(l.isNonEmptyString(o)){if(r.isDefault){const L=z(o),J=F(L);J.isValid()&&(Y=J.format(r.formatIn),w=J.format(r.formatOut))}else if(r.isRange){const L=o.split("~");if(L.length===2){const J=z(L[0]),me=z(L[1]),de=F(J),n=F(me);de.isValid()&&n.isValid()&&(Y=de.format(r.formatIn),R=n.format(r.formatIn),w=`${de.format(r.formatOut)} ~ ${n.format(r.formatOutEnd)}`)}}}a.start=Y,a.end=R,a.showText=w},ie=o=>{let w=!0;if(i.checkCallback&&!l.isEmpty(o)){try{r.isDefault?w=i.checkCallback(o):r.isRange&&(w=i.checkCallback(o.start,o.end))}catch(Y){fe.warn("ClDateTime","checkCallback 回调执行异常,本次选择不生效",Y),w=!1}w=l.isBoolean(w)?w:!0}return w},W=o=>{let w="",Y="",R="",L=!1;if(r.isDefault){if(!l.isEmpty(o)){const de=D(o);de&&(Y=de.format(r.formatIn),w=de.format(r.formatOut))}L=Y!==m.lastStart}else if(r.isRange){if(!l.isEmpty(o)&&!l.isEmpty(o.start)&&!l.isEmpty(o.end)){const de=D(o.start),n=D(o.end);de&&n&&(Y=de.format(r.formatIn),R=n.format(r.formatIn),w=`${de.format(r.formatOut)} ~ ${n.format(r.formatOutEnd)}`)}L=Y!==m.lastStart||R!==m.lastEnd}const J=h(Y,R);let me=!1;return J.errMsg.length===0&&(me=ie(o)),r.errMsg=J.errMsg,C.value&&e.nextTick(()=>{C.value?.calculationPosition()}),{start:Y,end:R,text:w,isChange:L,checkInfo:J,isCheck:me}},j=()=>{$(),V(),T(i.value),e.nextTick(()=>{r.isInit=!0})},K=()=>{const o=k.value?.getValue();let w="",Y="";if(r.isDefault){if(!l.isEmpty(o)){const R=D(o);R&&(w=R.format(r.formatIn))}}else if(r.isRange){const R=o;if(!l.isEmpty(R?.start)&&!l.isEmpty(R?.end)){const L=D(R?.start),J=D(R?.end);L&&J&&(w=L.format(r.formatIn),Y=J.format(r.formatIn))}}return P({start:w,end:Y})};e.onMounted(()=>{e.nextTick(()=>{j()})}),e.watch(()=>i.value,(o,w)=>{o!==w&&(T(o),m.lastStart=a.start,m.lastEnd=a.end)}),e.watch(()=>i.isDropdown,o=>{r.isShowPopup=o}),e.watch([()=>i.theme,()=>i.layerType,()=>i.timeType,()=>i.format,()=>i.formatEnd],()=>{r.isDefault=i.theme!=="range",r.isRange=i.theme==="range",$(),V(),T(i.value),m.lastStart=a.start,m.lastEnd=a.end});const H=o=>{i.disabled||o&&(r.errMsg=[],m.lastStart=a.start,m.lastEnd=a.end,V())},ce=()=>{if(!i.disabled){a.start="",a.end="",a.showText="",m.lastStart="",m.lastEnd="";const o=P(a);I("update:value",o.value),I("update:modelValue",o.value),I("onChange",o.value,o.info)}},ue=o=>{if(!i.disabled){const{start:w,end:Y,text:R,isChange:L,isCheck:J}=W(o);if(J&&(a.start=w,a.end=Y,a.showText=R,m.lastStart=w,m.lastEnd=Y,Z(),L)){const me=P(a);I("update:value",me.value),I("update:modelValue",me.value),I("onChange",me.value,me.info)}}},ge=()=>{Z()};let p=!1;const E=()=>{r.isShowPopup&&C.value&&(C.value.checkIsShowOpen()||C.value.initCompleteOpen()),p||(p=!0,I("onInit"))};return e.provide("$DateTimeTop",{keyIndex:x,elId:i.id,getMomentDate:D,getViewDate:u,getNow:te,checkIsTimes:ne,checkValue:S,checkMinMax:h,getValueEffective:z,getMergeDayTime:(o,w)=>{let Y="";const R=l.isString(o)?l.trim(o):"";let L=l.isString(w)?l.trim(w):"";switch(r.timeType){case"date":Y=R;break;case"time":Y=z(L)||"";break;case"datetime":l.isEmpty(R)||(L=l.isEmpty(w)?"00:00:00":L,Y=`${R} ${L}`);break}return Y},Dayjs:F}),e.provide("$DateTimeTopBase",e.readonly(r)),oe({getValue:()=>K().value,getValueData:()=>K().info,setValue:o=>{T(o),m.lastStart=a.start,m.lastEnd=a.end}}),(o,w)=>f.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(g),class:e.normalizeClass(ae.value)},e.toDisplayString(U.value),11,It)):f.isDropdown?(e.openBlock(),e.createBlock(Te._sfc_main,{key:1,ref_key:"refElDropdownLayer",ref:C,id:e.unref(g),classParent:t.value,classDropDown:_.value,placeholder:f.placeholder,isDisabled:f.disabled,isClear:f.isClear,textLabel:a.showText,textArrowDirection:s.value,dropdownArrowPos:f.direction,isUseDropdownArrow:f.isUseDropdownArrow,appendContainer:f.appendContainer,appendFollowWidth:!1,onOnChangeOpen:H,onOnClear:ce},{textExtend:e.withCtx(()=>[e.createVNode(he._sfc_main,{name:r.timeType==="time"?"clock":"calendar",className:"datetime-icon","aria-hidden":"true"},null,8,["name"])]),dropdown:e.withCtx(()=>[e.createVNode(Ee,{ref_key:"refElDatetime",ref:k,isDefault:r.isDefault,isRange:r.isRange,start:a.start,end:a.end,minDate:f.minDate,maxDate:f.maxDate,rangeQuick:r.rangeQuick,errMsg:r.errMsg,onOnSelectValue:ue,onOnClose:ge,onOnInitComplete:E},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","dropdownArrowPos","isUseDropdownArrow","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:2,id:e.unref(g),class:e.normalizeClass(t.value)},[r.isInit?(e.openBlock(),e.createBlock(Ee,{key:0,ref_key:"refElDatetime",ref:k,isDefault:r.isDefault,isRange:r.isRange,start:a.start,end:a.end,minDate:f.minDate,maxDate:f.maxDate,rangeQuick:r.rangeQuick,errMsg:r.errMsg,onOnSelectValue:ue,onOnClose:ge,onOnInitComplete:E},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Pt))}});exports._sfc_main=At;
1
+ "use strict";const e=require("vue"),fe=require("@cldemo/ui-kit/common/log"),F=require("dayjs"),l=require("@cldemo/ui-kit/common/base"),xe=require("@cldemo/ui-kit/common/globalConfig"),pe=require("@cldemo/ui-kit/common/Element"),Te=require("./List.vue_vue_type_script_setup_true_lang-B75tAGde.js"),he=require("./Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js"),ve=require("./language-BJ4aVgHI.js"),Se=require("./Index.vue_vue_type_script_setup_true_lang-B60Rs_ka.js"),we=require("@cldemo/ui-kit/common/day"),Me=require("./Index.vue_vue_type_script_setup_true_lang-BUscvdlk.js");;/* empty css */;/* empty css */const be=["id"],_e={class:"table-base"},Be={class:"time-head time-head-day",colspan:"7"},$e={class:"time-prev"},Ye=["title"],Ne=["title"],Oe={class:"time-next"},Ie=["title"],Pe=["title"],Re=["aria-disabled","onClick","onKeydown","onMouseover"],Ae=e.defineComponent({name:"ClCalendarsDays",__name:"CalendarsDays",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:f=>!0,onChangeType:f=>!0,onSelectDate:(f,oe)=>!0,onHoverDate:(f,oe)=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,{optPageLanguage:I,getPageLanguage:b}=ve.useLanguage();b("dataTime");const O=e.inject("$DateTimeTop"),x=e.inject("$DateTimeTopBase"),g=e.inject("$DateTimeBase");(!O||!x||!g)&&fe.warn("ClCalendarsDays","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=`calendarsDays-${l.getRandom(5)}`,k=O?.elId?`${O.elId}-calendarsDays-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let c={"panel-calendarsdays":!0};return c=l.getJsonMerge(c,pe.getClassNameJson(v.className)),c}),a=e.reactive({isPrevYear:!1,isPrevMonth:!1,titleYear:"",titleMonth:"",isNextYear:!1,isNextMonth:!1}),m=e.ref([]),s=e.ref([]),t={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},_=()=>{if(!t.viewDate)return;const c=t.viewDate.year(),B=t.viewDate.localeData().monthsShort(t.viewDate),$=t.viewDate.clone().subtract(1,"years").endOf("month"),T=g.checkDataMinMax($,"day"),ie=t.viewDate.clone().subtract(1,"months").endOf("month"),W=g.checkDataMinMax(ie,"day"),j=t.viewDate.clone().add(1,"months").startOf("month"),K=g.checkDataMinMax(j,"day"),H=t.viewDate.clone().add(1,"years").startOf("month"),ce=g.checkDataMinMax(H,"day");a.isPrevYear=!T,a.isPrevMonth=!W,a.titleYear=`${c}${I.value.year}`,a.titleMonth=B,a.isNextMonth=!K,a.isNextYear=!ce},ae=()=>{if(!t.viewDate)return;const c=t.viewDate.localeData(),V=c.weekdaysMin(),B=c.firstDayOfWeek(),$=[];V.forEach((T,ie)=>{$[(7+ie-B)%7]=T}),m.value=$},G=()=>{if(!t.viewDate)return;const c=t.viewDate.clone(),V=t.selectDate,B=c.year(),$=c.month();let T=c.clone().subtract(1,"months");const ie=[];let W=[];T=T.date(T.daysInMonth()).startOf("week");for(let j=0;j<42;j+=1){j>0&&(T=T.add(1,"days"));const K=T.clone(),H=K.date(),ce=T.year()===B&&T.month()<$||T.year()<B,ue=T.year()===B&&T.month()>$||T.year()>B;let ge=V&&T.isSame(V,"day");const p=g.checkDataMinMax(K,"day");let E=!1,M=!1,N=!1;x.isRange&&(t.hoverDate?t.startDate&&t.endDate&&t.startDate.isSame(t.hoverDate,"day")&&t.hoverDate.isBefore(t.endDate,"day")?(E=T.isSame(t.startDate,"day"),M=T.isSame(t.endDate,"day"),N=E||M||T.isAfter(t.startDate,"day")&&T.isBefore(t.endDate,"day")):t.startDate?(E=T.isSame(t.startDate,"day"),N=E||T.isSame(t.hoverDate,"day"),N=N||T.isAfter(t.startDate,"day")&&T.isBefore(t.hoverDate,"day"),M=t.hoverDate.isSame(t.startDate,"day")&&E):t.endDate&&(M=T.isSame(t.endDate,"day"),N=M||T.isSame(t.hoverDate,"day"),N=N||T.isAfter(t.hoverDate,"day")&&T.isBefore(t.endDate,"day"),E=t.hoverDate.isSame(t.endDate,"day")&&M):(E=!!(t.startDate&&T.isSame(t.startDate,"day")),t.endDate&&(M=T.isSame(t.endDate,"day"),N=E||M||!!(t.startDate&&T.isAfter(t.startDate,"day")&&T.isBefore(t.endDate,"day")))),ge=E||M);const Q=pe.getAddClass("day",{old:ce,new:ue,active:ge&&!ce&&!ue&&!p,disabled:p,"date-start":E&&!ce&&!ue,"date-end":M&&!ce&&!ue,"range-in":N&&!ce&&!ue});W.push({cls:Q,day:H,value:H,isDisabled:p,isOld:ce,isNew:ue}),W.length===7&&(ie.push({days:W}),W=[])}s.value=ie},U=(c,V,B)=>{if(!t.viewDate)return;const $=t.viewDate.clone()[c](V,B);i("onChangeDate",$)};let ee=!1;const le=()=>{ee||(ee=!0,e.nextTick(()=>{i("onInitComplete","days")}))},re=()=>{t.selectDate=O.getMomentDate(v.selectValue),t.startDate=O.getMomentDate(v.startValue),t.endDate=O.getMomentDate(v.endValue),t.hoverDate=O.getMomentDate(v.hoverValue)},P=(c,V,B)=>{if(V!==B){const $=O.getMomentDate(V);$&&$.isValid()&&(t[c]=$,re(),ae(),_(),G(),le())}},Z=()=>{if(l.isNonEmptyString(v.viewValue)){const c=O.getMomentDate(v.viewValue);c&&c.isValid()&&(t.viewDate=c,re(),ae(),_(),G(),le())}};e.onMounted(()=>{e.nextTick(()=>{Z()})}),e.watch(()=>v.viewValue,(c,V)=>{P("viewDate",c,V)}),e.watch([()=>v.selectValue,()=>v.startValue,()=>v.endValue],()=>{t.viewDate&&(t.selectDate=O.getMomentDate(v.selectValue),t.startDate=O.getMomentDate(v.startValue),t.endDate=O.getMomentDate(v.endValue),t.hoverDate=O.getMomentDate(v.hoverValue),G())}),e.watch(()=>v.hoverValue,()=>{t.viewDate&&(t.hoverDate=O.getMomentDate(v.hoverValue),x.isRange&&G())}),e.watch([()=>v.minValue,()=>v.maxValue],()=>{t.viewDate&&(_(),G())});const ne=c=>{c.preventDefault(),c.stopPropagation(),U("subtract",1,"years")},z=c=>{c.preventDefault(),c.stopPropagation(),U("subtract",1,"months")},te=c=>{c.preventDefault(),c.stopPropagation(),U("add",1,"months")},D=c=>{c.preventDefault(),c.stopPropagation(),U("add",1,"years")},u=(c,V)=>{c.preventDefault(),c.stopPropagation(),i("onChangeType",V)},h=(c,V)=>{c.preventDefault(),c.stopPropagation(),V.isDisabled||i("onSelectDate","days",V)},S=(c,V)=>{c.preventDefault(),c.stopPropagation(),V.isDisabled||i("onHoverDate","days",V)};return(c,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),id:e.unref(k)},[e.createElementVNode("table",_e,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Be,[e.createElementVNode("span",$e,[a.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(I).prevYear,onClick:ne},[e.createVNode(he._sfc_main,{name:"angle-double-left"})],8,Ye)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isPrevMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"prev-month",title:e.unref(I).prevMonth,onClick:z},[e.createVNode(he._sfc_main,{name:"angle-left"})],8,Ne)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:V[0]||(V[0]=B=>u(B,"years"))},e.toDisplayString(a.titleYear),1),e.createElementVNode("span",{class:"datetime-switch-month",onClick:V[1]||(V[1]=B=>u(B,"months"))},e.toDisplayString(a.titleMonth),1),e.createElementVNode("span",Oe,[a.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(I).nextYear,onClick:D},[e.createVNode(he._sfc_main,{name:"angle-double-right"})],8,Ie)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isNextMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"next-month",title:e.unref(I).nextMonth,onClick:te},[e.createVNode(he._sfc_main,{name:"angle-right"})],8,Pe)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])])]),e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(B,$)=>(e.openBlock(),e.createElementBlock("th",{key:`${C}-week-${$}`},e.toDisplayString(B),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(B,$)=>(e.openBlock(),e.createElementBlock("tr",{key:`${C}-days-${$}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.days,(T,ie)=>(e.openBlock(),e.createElementBlock("td",{key:`${C}-day-${ie}`,role:"gridcell",tabindex:"0","aria-disabled":T.isDisabled,class:e.normalizeClass(T.cls),onClick:W=>h(W,T),onKeydown:[e.withKeys(e.withModifiers(W=>h(W,T),["prevent"]),["enter"]),e.withKeys(e.withModifiers(W=>h(W,T),["prevent"]),["space"])],onMouseover:W=>S(W,T)},e.toDisplayString(T.day),43,Re))),128))]))),128))])])],10,be))}}),Le=["id"],Fe={class:"table-base"},He={class:"time-head time-head-month"},Qe={class:"time-prev"},je=["title"],Ke={class:"time-next"},ze=["title"],Je={class:"time-body-month"},qe=["aria-disabled","onClick","onKeydown","onMouseover"],Ue=e.defineComponent({name:"ClCalendarsMonths",__name:"CalendarsMonths",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:f=>!0,onChangeType:f=>!0,onSelectDate:(f,oe)=>!0,onHoverDate:(f,oe)=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,I=`calendarsMonths-${l.getRandom(5)}`,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=e.inject("$DateTimeTop"),g=e.inject("$DateTimeTopBase"),C=e.inject("$DateTimeBase");(!x||!g||!C)&&fe.warn("ClCalendarsMonths","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const k=x?.elId?`${x.elId}-calendarsMonths-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let D={"panel-calendarsmonths":!0};return D=l.getJsonMerge(D,pe.getClassNameJson(v.className)),D}),a=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),m=e.ref([]),s={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},t=()=>{if(!s.viewDate)return;const D=s.viewDate.year(),u=s.viewDate.clone().subtract(1,"years").endOf("year"),h=C.checkDataMinMax(u,"month"),S=s.viewDate.clone().add(1,"years").startOf("year"),c=C.checkDataMinMax(S,"month");a.isPrevYear=!h,a.titleYear=`${D}${b.value.year}`,a.isNextYear=!c},_=()=>{if(!s.viewDate)return;const D=s.viewDate.clone(),u=C.getFocusDate(),h=s.selectDate,S=D.year(),c=[];D.localeData().monthsShort().forEach((V,B)=>{const $=C.getViewMin(S,B);let T=!!(h&&$.isSame(h,"month")),ie=!!(u&&$.isSame(u,"month"));const W=C.checkDataMinMax($,"month");let j=!1,K=!1,H=!1;g.isRange&&(ie=!1,s.hoverDate?s.startDate&&s.endDate&&s.startDate.isSame(s.hoverDate,"month")&&s.hoverDate.isBefore(s.endDate,"month")?(j=$.isSame(s.startDate,"month"),K=$.isSame(s.endDate,"month"),H=j||K||$.isAfter(s.startDate,"month")&&$.isBefore(s.endDate,"month")):s.startDate?(j=$.isSame(s.startDate,"month"),H=j||$.isSame(s.hoverDate,"month"),H=H||$.isAfter(s.startDate,"month")&&$.isBefore(s.hoverDate,"month"),K=!!(s.hoverDate&&s.hoverDate.isSame(s.startDate,"month"))&&j):s.endDate&&(K=$.isSame(s.endDate,"month"),H=K||$.isSame(s.hoverDate,"month"),H=H||$.isAfter(s.hoverDate,"month")&&$.isBefore(s.endDate,"month"),j=!!(s.hoverDate&&s.hoverDate.isSame(s.endDate,"month"))&&K):(j=!!(s.startDate&&$.isSame(s.startDate,"month")),s.endDate&&s.startDate&&(K=$.isSame(s.endDate,"month"),H=$.isAfter(s.startDate,"month")&&$.isBefore(s.endDate,"month"))),T=j||K),g.layerType==="months"&&(ie=!1);const ce=pe.getAddClass("month",{active:T&&!W,focused:ie,disabled:W,"date-start":j,"date-end":K,"range-in":H});c.push({cls:ce,month:V,isDisabled:W,value:B})}),m.value=c},ae=(D,u,h)=>{if(!s.viewDate)return;const S=s.viewDate.clone()[D](u,h);i("onChangeDate",S)};let G=!1;const U=()=>{G||(G=!0,e.nextTick(()=>{i("onInitComplete","months")}))},ee=()=>{s.selectDate=x.getMomentDate(v.selectValue),s.startDate=x.getMomentDate(v.startValue),s.endDate=x.getMomentDate(v.endValue),s.hoverDate=x.getMomentDate(v.hoverValue)},le=(D,u,h)=>{if(u!==h){const S=x.getMomentDate(u);S&&S.isValid()&&(s[D]=S,ee(),t(),_(),U())}},re=()=>{const D=x.getMomentDate(v.viewValue);D&&D.isValid()&&(s.viewDate=D,ee(),t(),_(),U())};e.onMounted(()=>{e.nextTick(()=>{re()})}),e.watch(()=>v.viewValue,(D,u)=>{le("viewDate",D,u)}),e.watch([()=>v.selectValue,()=>v.startValue,()=>v.endValue,()=>v.hoverValue],()=>{s.viewDate&&(s.selectDate=x.getMomentDate(v.selectValue),s.startDate=x.getMomentDate(v.startValue),s.endDate=x.getMomentDate(v.endValue),s.hoverDate=x.getMomentDate(v.hoverValue),_())}),e.watch([()=>v.minValue,()=>v.maxValue],()=>{s.viewDate&&(t(),_())});const P=D=>{D.preventDefault(),D.stopPropagation(),ae("subtract",1,"years")},Z=D=>{D.preventDefault(),D.stopPropagation(),ae("add",1,"years")},ne=(D,u)=>{D.preventDefault(),D.stopPropagation(),i("onChangeType",u)},z=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onSelectDate","months",u)},te=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onHoverDate","months",u)};return(D,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),id:e.unref(k)},[e.createElementVNode("table",Fe,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",He,[e.createElementVNode("span",Qe,[a.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(b).prevYear,onClick:P},[e.createVNode(he._sfc_main,{name:"angle-left"})],8,je)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:u[0]||(u[0]=h=>ne(h,"years"))},e.toDisplayString(a.titleYear),1),e.createElementVNode("span",Ke,[a.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(b).nextYear,onClick:Z},[e.createVNode(he._sfc_main,{name:"angle-right"})],8,ze)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",Je,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(h,S)=>(e.openBlock(),e.createElementBlock("span",{key:`${I}-month-${S}`,role:"button",tabindex:"0","aria-disabled":h.isDisabled,class:e.normalizeClass(h.cls),onClick:c=>z(c,h),onKeydown:[e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["enter"]),e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["space"])],onMouseover:c=>te(c,h)},e.toDisplayString(h.month),43,qe))),128))])])])])])],10,Le))}}),Ze=["id"],We={class:"table-base"},Ge={class:"time-head time-head-year"},Xe={class:"time-prev"},et=["title"],tt={class:"time-next"},at=["title"],nt={class:"time-body-year"},st=["aria-disabled","onClick","onKeydown","onMouseover"],ot=e.defineComponent({name:"ClCalendarsYears",__name:"CalendarsYears",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:f=>!0,onSelectDate:(f,oe)=>!0,onHoverDate:(f,oe)=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,{optPageLanguage:I,getPageLanguage:b}=ve.useLanguage();b("dataTime");const O=e.inject("$DateTimeTop"),x=e.inject("$DateTimeTopBase"),g=e.inject("$DateTimeBase");(!O||!x||!g)&&fe.warn("ClCalendarsYears","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=`calendarsYears-${l.getRandom(5)}`,k=O?.elId?`${O.elId}-calendarsYears-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let D={"panel-calendarsyears":!0};return D=l.getJsonMerge(D,pe.getClassNameJson(v.className)),D}),a=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),m=e.ref([]),s={startYear:0,viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},t=()=>{if(!s.viewDate)return;const D=`${s.startYear}-${s.startYear+9}`,u=O.getMomentDate({year:s.startYear-1,month:11}),h=O.getMomentDate({year:s.startYear+10,month:0}),S=u?g.checkDataMinMax(u.endOf("month"),"year"):!1,c=h?g.checkDataMinMax(h.startOf("month"),"year"):!1;a.isPrevYear=!S,a.titleYear=D,a.isNextYear=!c},_=()=>{const D=g.getFocusDate(),u=s.selectDate,h=[];for(let S=-1;S<11;S+=1){const c=s.startYear+S,V=g.getViewMin(c),B=S===-1,$=S>9;let T=u?V.isSame(u,"year"):!1,ie=!!(D&&V.isSame(D,"year"));const W=g.checkDataMinMax(V,"year");let j=!1,K=!1,H=!1;if(x.isRange){if(ie=!1,s.hoverDate){const ue=parseInt(s.hoverDate.format("YYYY"),10);s.startDate&&s.endDate&&s.startDate.isSame(s.hoverDate,"year")&&s.hoverDate.isBefore(s.endDate,"year")?(j=c===parseInt(s.startDate.format("YYYY"),10),K=c===parseInt(s.endDate.format("YYYY"),10),H=j||K||c>parseInt(s.startDate.format("YYYY"),10)&&c<parseInt(s.endDate.format("YYYY"),10)):s.startDate?(j=c===parseInt(s.startDate.format("YYYY"),10),H=j||c===ue,H=H||V.isAfter(s.startDate,"year")&&V.isBefore(s.hoverDate,"year"),K=!1):s.endDate&&(K=c===parseInt(s.endDate.format("YYYY"),10),H=K||c===ue,H=H||V.isAfter(s.hoverDate,"year")&&V.isBefore(s.endDate,"year"),j=!!(s.hoverDate&&s.hoverDate.isSame(s.endDate,"year"))&&K)}else j=!!(s.startDate&&V.isSame(s.startDate,"year")),s.endDate&&s.startDate&&(K=V.isSame(s.endDate,"year"),H=V.isAfter(s.startDate,"year")&&V.isBefore(s.endDate,"year"));T=j||K}x.layerType==="years"&&(ie=!1);const ce=pe.getAddClass("year",{old:B,new:$,active:T&&!B&&!$,focused:ie,disabled:W,"date-start":j&&!B&&!$,"date-end":K&&!B&&!$,"range-in":H&&!B&&!$});h.push({cls:ce,year:c,isDisabled:W,value:c})}m.value=h},ae=()=>{s.viewDate&&(s.startYear=Math.floor(s.viewDate.year()/10)*10,t(),_())},G=(D,u,h)=>{s.viewDate&&(s.viewDate=s.viewDate.clone()[D](u,h),ae(),i("onChangeDate",s.viewDate))};let U=!1;const ee=()=>{U||(U=!0,e.nextTick(()=>{i("onInitComplete","years")}))},le=()=>{s.selectDate=O.getMomentDate(v.selectValue),s.startDate=O.getMomentDate(v.startValue),s.endDate=O.getMomentDate(v.endValue),s.hoverDate=O.getMomentDate(v.hoverValue)},re=(D,u,h)=>{if(u!==h){const S=O.getMomentDate(u);S&&S.isValid()?(s[D]=S,le(),ae(),ee()):(s.viewDate=null,s.startYear=0,m.value=[],a.isPrevYear=!1,a.isNextYear=!1,a.titleYear="")}},P=()=>{const D=O.getMomentDate(v.viewValue);D&&D.isValid()&&(s.viewDate=D,le(),ae(),ee())};e.onMounted(()=>{e.nextTick(()=>{P()})}),e.watch(()=>v.viewValue,(D,u)=>{re("viewDate",D,u)}),e.watch([()=>v.selectValue,()=>v.startValue,()=>v.endValue,()=>v.hoverValue],()=>{s.viewDate&&(s.selectDate=O.getMomentDate(v.selectValue),s.startDate=O.getMomentDate(v.startValue),s.endDate=O.getMomentDate(v.endValue),s.hoverDate=O.getMomentDate(v.hoverValue),_())}),e.watch([()=>v.minValue,()=>v.maxValue],()=>{s.viewDate&&(t(),_())});const Z=D=>{D.preventDefault(),D.stopPropagation(),G("subtract",10,"years")},ne=D=>{D.preventDefault(),D.stopPropagation(),G("add",10,"years")},z=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onSelectDate","years",u)},te=(D,u)=>{D.preventDefault(),D.stopPropagation(),u.isDisabled||i("onHoverDate","years",u)};return(D,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),id:e.unref(k)},[e.createElementVNode("table",We,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Ge,[e.createElementVNode("span",Xe,[a.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(I).prevYear10,onClick:Z},[e.createVNode(he._sfc_main,{name:"angle-left"})],8,et)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",null,e.toDisplayString(a.titleYear),1),e.createElementVNode("span",tt,[a.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(I).nextYear10,onClick:ne},[e.createVNode(he._sfc_main,{name:"angle-right"})],8,at)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(h,S)=>(e.openBlock(),e.createElementBlock("span",{key:`${C}-${h.year}-${S}`,role:"button",tabindex:"0","aria-disabled":h.isDisabled,class:e.normalizeClass(h.cls),onClick:c=>z(c,h),onKeydown:[e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["enter"]),e.withKeys(e.withModifiers(c=>z(c,h),["prevent"]),["space"])],onMouseover:c=>te(c,h)},e.toDisplayString(h.year),43,st))),128))])])])])],10,Ze))}}),it=["id"],lt={class:"times-container"},rt=["title"],ct=["title"],ut={class:"times-clock"},mt={class:"clock-nums"},dt=["aria-disabled","onClick","onKeydown"],ft={class:"clock-pointer"},Dt={class:"clock-am"},ht="2000-01-01",pt=e.defineComponent({name:"ClCalendarsClocks",__name:"CalendarsClock",props:{className:String,selectDay:String,selectValue:String,minValue:String,maxValue:String,isShowPointer:{type:Boolean,default:!0},isShowSubmit:{type:Boolean,default:!1},isShowCancel:{type:Boolean,default:!1},isClickOverlay:{type:Boolean,default:!1}},emits:{onSubmit:f=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,I=`calendarsClock-${l.getRandom(5)}`,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=e.inject("$DateTimeTop"),g=e.inject("$DateTimeTopBase");(!x||!g)&&fe.warn("ClCalendarsClocks","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=x?.elId?`${x.elId}-calendarsClock-${l.getRandom(5)}`:void 0,k=e.reactive({isOpen:!1,activePointer:"hour",activeAm:"am"}),r=e.reactive({hour:!0,hourDisabled:!1,minute:!0,minuteDisabled:!1,minuteShowAddSub:!0,second:!0,secondDisabled:!1}),a=e.reactive({hour:-90,hourMinute:0,minute:-90,minuteSecond:0,second:-90}),m=e.reactive({hour:"00",minute:"00",second:"00"}),s=e.ref([]),t={selectDayDate:null,minDate:null,maxDate:null,timeAngle:{hour:30,minute:6,second:6},num:{hourAm:[0,1,2,3,4,5,6,7,8,9,10,11],hourPm:[12,13,14,15,16,17,18,19,20,21,22,23],minute:[0,5,10,15,20,25,30,35,40,45,50,55],second:[0,5,10,15,20,25,30,35,40,45,50,55]},origValue:{hour:"00",minute:"00",second:"00"},lastValue:{hour:"00",minute:"00",second:"00"},isCheckMin:!1,checkMinDiff:null,min:{hour:0,minute:0,second:0},isCheckMax:!1,checkMaxDiff:null,max:{hour:0,minute:0,second:0}},_=e.computed(()=>{let n={"panel-calendarsclocks":!0,"datetime-times":!0};return n["times-open"]=k.isOpen,n=l.getJsonMerge(n,pe.getClassNameJson(v.className)),n}),ae=e.computed(()=>{const n={"pointer-hour":!0};return n["pointer-active"]=k.activePointer==="hour",n["pointer-disabled"]=r.hourDisabled,n}),G=e.computed(()=>{const n={"pointer-minute":!0};return n["pointer-active"]=k.activePointer==="minute",n["pointer-disabled"]=r.minuteDisabled,n}),U=e.computed(()=>{const n={"pointer-second":!0};return n["pointer-active"]=k.activePointer==="second",n["pointer-disabled"]=r.secondDisabled,n}),ee=e.computed(()=>{const n={"am-am":!0};return n["am-active"]=k.activeAm==="am",n}),le=e.computed(()=>{const n={"am-pm":!0};return n["am-active"]=k.activeAm==="pm",n}),re=e.computed(()=>{const n={"clock-set":!0,"clock-set-hour":!0};return n["clock-set-active"]=k.activePointer==="hour",n["clock-set-disabled"]=r.hourDisabled,n}),P=e.computed(()=>{const n={"clock-set":!0,"clock-set-minute":!0};return n["clock-set-active"]=k.activePointer==="minute",n["clock-set-disabled"]=r.minuteDisabled,n}),Z=e.computed(()=>{const n={"clock-set":!0,"clock-set-second":!0};return n["clock-set-active"]=k.activePointer==="second",n["clock-set-disabled"]=r.secondDisabled,n}),ne=(n,d)=>{t[n]=x.getMomentDate(d)},z=n=>{let d=parseInt(t.lastValue[n],10),y=parseInt(m[n],10),A=0;return n==="hour"?(y===0&&d===23&&(y=24),d===0&&y===23&&(d=24),y-d>6&&(d+=12),d-y>=6&&(y+=12),A=y-d):(y-d>30&&(d+=60),d-y>=30&&(y+=60),A=y-d),A},te=n=>{const y=z(n)*t.timeAngle[n];return a[n]+(y>=360?y%360:y)},D=()=>{const n=te("hour"),d=t.timeAngle.hour*parseFloat((parseInt(m.minute,10)/60).toString()),y=te("minute"),A=t.timeAngle.second*parseFloat((parseInt(m.second,10)/60).toString()),q=te("second");a.hour=n,a.hourMinute=d,a.minute=y,a.minuteSecond=A,a.second=q},u=n=>parseInt(n,10)<12?"am":"pm",h=(n,d)=>{let y=!0;switch(n){case"hour":y=!0;break;case"minute":y=parseInt(m.hour,10)===t[d].hour;break;case"second":y=parseInt(m.hour,10)===t[d].hour&&parseInt(m.minute,10)===t[d].minute;break}return y},S=()=>t.isCheckMin&&t.isCheckMax&&t.checkMinDiff===0&&t.checkMaxDiff===0&&t.min.hour>t.max.hour,c=(n,d)=>{let y=!1;return S()&&n==="hour"?y=d<t.min[n]&&d>t.max[n]:t.isCheckMin&&(t.checkMinDiff===0?h(n,"min")&&(y=d<t.min[n]):t.checkMinDiff<0&&(y=!0)),!y&&t.isCheckMax&&(t.checkMaxDiff===0?h(n,"max")&&(y=d>t.max[n]):t.checkMaxDiff>0&&(y=!0)),y},V=n=>{let d=n;d==="hour"&&(d=k.activeAm==="am"?"hourAm":"hourPm");const y=r[`${n}Disabled`],A=[];t.num[d].forEach((q,X)=>{const se={num:q,cls:"clock-num",isDisabled:!1};se.cls+=` clock-num${X+1} `,se.isDisabled=y?!0:c(n,q),se.isDisabled&&(se.cls+=" clock-nums-disabled "),A.push(se)}),s.value=A},B=n=>{k.activePointer=n,n==="hour"&&(k.activeAm=u(m.hour)),V(n)},$=n=>{let d=null;if(!l.isUndefined(n)&&!l.isUndefined(t.selectDayDate)){const y=t.selectDayDate.clone().format("YYYY-MM-DD 00:00:00"),A=n.clone().format("YYYY-MM-DD 00:00:00");d=x.Dayjs(y).diff(x.Dayjs(A))}return d},T=(n=!0)=>{a.hour=-90,a.hourMinute=0,a.minute=-90,a.minuteSecond=0,a.second=-90,t.lastValue={hour:"00",minute:"00",second:"00"},D(),e.nextTick(()=>{const d=m.hour,y=m.minute,A=m.second;t.lastValue={hour:d,minute:y,second:A},n&&(t.origValue={hour:d,minute:y,second:A})})},ie=(n,d)=>{t.lastValue.hour=m.hour,t.lastValue.minute=m.minute,t.lastValue.second=m.second,m[n]=l.getFillZero(d),D(),v.isShowSubmit||i("onSubmit",`${m.hour}:${m.minute}:${m.second}`)},W=n=>{let d=0,y=0,A=0;if(!l.isEmpty(n)){const q=(l.isEmpty(t.selectDayDate)?x.getNow():t.selectDayDate).format("YYYY-MM-DD"),X=x.getMomentDate(`${q} ${n}`);X&&X.isValid()&&(d=X.hour(),y=X.minute(),A=X.second())}return{HH:d,mm:y,ss:A}},j=()=>{let n=!0,d=!0;const y=l.isEmpty(t.selectDayDate),A=W(v.selectValue),q=A.HH,X=A.mm,se=A.ss;switch(g.layerType){case"hours":n=!1,d=!1;break;case"minutes":d=!1;break}t.isCheckMin=!l.isUndefined(t.minDate),t.isCheckMin&&(t.checkMinDiff=x.checkIsTimes()?0:$(t.minDate),t.min={hour:t.minDate.hour(),minute:t.minDate.minute(),second:t.minDate.second()}),t.isCheckMax=!l.isUndefined(t.maxDate),t.isCheckMax&&(t.checkMaxDiff=x.checkIsTimes()?0:$(t.maxDate),t.max={hour:t.maxDate.hour(),minute:t.maxDate.minute(),second:t.maxDate.second()});const ye=l.getFillZero(q);let ke=l.getFillZero(X),De=l.getFillZero(se);n||(ke="00"),d||(De="00"),t.origValue={hour:ye,minute:ke,second:De},r.hour=!0,r.minute=n,r.second=d,m.hour=ye,m.minute=ke,m.second=De,x.checkIsTimes()||(r.hourDisabled=y,r.minuteDisabled=y,r.secondDisabled=y),g.layerType==="hours"&&(r.minute=!0,r.minuteDisabled=!0,r.minuteShowAddSub=!1),K(),H()},K=()=>{t.lastValue={hour:"00",minute:"00",second:"00"},a.hour=-90,a.hourMinute=0,a.minute=-90,a.minuteSecond=0,a.second=-90},H=()=>{D(),k.activeAm=u(m.hour),V(k.activePointer)},ce=()=>{k.isOpen=v.isShowPointer,ne("selectDayDate",x.checkIsTimes()?ht:v.selectDay),ne("minDate",x.getValueEffective(v.minValue)),ne("maxDate",x.getValueEffective(v.maxValue)),j(),B("hour"),T(),e.nextTick(()=>{i("onInitComplete","times")})},ue=n=>{let d=!1;return r[n]&&!r[`${n}Disabled`]&&(k.isOpen?d=!0:(T(!1),k.isOpen=!0,B(n))),d},ge=(n,d)=>{if(r[n]&&!r[`${n}Disabled`]&&k.isOpen){let y=!0,A=0,q=n==="hour"?23:59;if(t.isCheckMin&&(t.checkMinDiff===0?h(n,"min")&&(A=t.min[n]):t.checkMinDiff<0&&(y=!1)),t.isCheckMax&&(t.checkMaxDiff===0?h(n,"max")&&(q=t.max[n]):t.checkMaxDiff>0&&(y=!1)),y){const X=parseInt(m[n],10);let se=0;S()&&n==="hour"?se=d==="add"?X>=23?0:X+1:X<=0?23:X-1:d==="add"?se=X<A||X>=q?A:X+1:se=X>q||X<=A?q:X-1,c(n,se)||(ie(n,se),B(n))}}};e.onMounted(()=>{e.nextTick(()=>{ce()})}),e.watch(()=>v.selectDay,(n,d)=>{ne("selectDayDate",n),j()}),e.watch(()=>v.minValue,(n,d)=>{const y=x.getValueEffective(n);ne("minDate",y),j()}),e.watch(()=>v.maxValue,(n,d)=>{const y=x.getValueEffective(n);ne("maxDate",y),j()}),e.watch(()=>v.selectValue,(n,d)=>{const y=W(n),A=l.getFillZero(y.HH),q=l.getFillZero(y.mm),X=l.getFillZero(y.ss);(m.hour!==A||m.minute!==q||m.second!==X)&&(m.hour=A,m.minute=q,m.second=X,t.origValue={hour:A,minute:q,second:X},K(),H())});const p=n=>{r[n]&&!r[`${n}Disabled`]&&(B(n),k.isOpen||(T(),k.isOpen=!0))},E=n=>{if(!n.isDisabled){const d=k.activePointer,y=parseInt(m[d],10),A=n.num;A!==y&&ie(d,A)}},M=n=>{k.activeAm=n,k.activePointer="hour";const d=parseInt(m.hour,10);n==="pm"&&d<12?m.hour=l.getFillZero(d+12):n==="am"&&d>=12&&(m.hour=l.getFillZero(d-12)),D(),V("hour")},N=()=>ue("hour"),Q=n=>{let d=!1,y=!1;const A=S();if(t.isCheckMin){if(t.checkMinDiff<0)d=!0,y=!0;else if(t.checkMinDiff===0){const q=parseInt(m[n],10);h(n,"min")&&(d=A?q===t.min[n]:q<=t.min[n])}}if(t.isCheckMax){if(t.checkMaxDiff>0)d=!0,y=!0;else if(t.checkMaxDiff===0){const q=parseInt(m[n],10);h(n,"max")&&(y=A?q===t.max[n]:q>=t.max[n])}}return{subtractDisabled:d,addDisabled:y}},o=n=>(l.isEmpty(n.type)||ge("hour",n.type),{value:m.hour,...Q("hour")}),w=()=>ue("minute"),Y=n=>(l.isEmpty(n.type)||ge("minute",n.type),{value:m.minute,...Q("minute")}),R=()=>ue("second"),L=n=>(l.isEmpty(n.type)||ge("second",n.type),{value:m.second,...Q("second")}),J=()=>{v.isClickOverlay&&k.isOpen&&(x.checkIsTimes()||(k.isOpen=!1),i("onSubmit",`${m.hour}:${m.minute}:${m.second}`))},me=()=>{x.checkIsTimes()||(k.isOpen=!1),i("onSubmit",`${m.hour}:${m.minute}:${m.second}`)},de=()=>{(m.hour!==t.origValue.hour||m.minute!==t.origValue.minute||m.second!==t.origValue.second)&&(t.lastValue.hour=m.hour,t.lastValue.minute=m.minute,t.lastValue.second=m.second,m.hour=t.origValue.hour,m.minute=t.origValue.minute,m.second=t.origValue.second,H()),x.checkIsTimes()||(k.isOpen=!1)};return(n,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(_.value),id:e.unref(C)},[d[15]||(d[15]=e.createElementVNode("div",{class:"datetime-times-inner"},null,-1)),e.createElementVNode("div",null,[e.createElementVNode("div",lt,[e.createElementVNode("div",{class:"times-overlay",onClick:J}),f.isShowCancel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"times-cancel",title:e.unref(b).common.cancel,onClick:de},[e.createVNode(he._sfc_main,{name:"close1"})],8,rt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),f.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:2,class:"times-submit",title:e.unref(b).common.submit,onClick:me},[e.createVNode(he._sfc_main,{name:"check1"})],8,ct)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",ut,[e.createElementVNode("div",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(y,A)=>(e.openBlock(),e.createElementBlock("div",{key:`${I}-clock-${A}`,role:"button",tabindex:"0","aria-disabled":y.isDisabled,class:e.normalizeClass(y.cls),onClick:q=>E(y),onKeydown:[e.withKeys(e.withModifiers(q=>E(y),["prevent"]),["enter"]),e.withKeys(e.withModifiers(q=>E(y),["prevent"]),["space"])]},e.toDisplayString(y.num),43,dt))),128))]),e.createElementVNode("div",ft,[r.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(ae.value),onClick:d[0]||(d[0]=y=>p("hour")),style:e.normalizeStyle({transform:`rotate(${a.hour+a.hourMinute}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.minute?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(G.value),onClick:d[1]||(d[1]=y=>p("minute")),style:e.normalizeStyle({transform:`rotate(${a.minute+a.minuteSecond}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),r.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(U.value),onClick:d[2]||(d[2]=y=>p("second")),style:e.normalizeStyle({transform:`rotate(${a.second}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))]),e.withDirectives(e.createElementVNode("div",Dt,[e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(ee.value),onClick:d[3]||(d[3]=y=>M("am")),onKeydown:[d[4]||(d[4]=e.withKeys(e.withModifiers(y=>M("am"),["prevent"]),["enter"])),d[5]||(d[5]=e.withKeys(e.withModifiers(y=>M("am"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(b).am),35),e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(le.value),onClick:d[6]||(d[6]=y=>M("pm")),onKeydown:[d[7]||(d[7]=e.withKeys(e.withModifiers(y=>M("pm"),["prevent"]),["enter"])),d[8]||(d[8]=e.withKeys(e.withModifiers(y=>M("pm"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(b).pm),35)],512),[[e.vShow,k.activePointer==="hour"]])])]),r.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(re.value),onClick:d[10]||(d[10]=y=>p("hour"))},[e.createVNode(Se._sfc_main,{value:m.hour,"onUpdate:value":d[9]||(d[9]=y=>m.hour=y),size:"small",isClean:!1,disabled:r.hourDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:N,calculationOperateValueCallback:o},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.minute&&r.minuteShowAddSub?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(P.value),onClick:d[12]||(d[12]=y=>p("minute"))},[e.createVNode(Se._sfc_main,{value:m.minute,"onUpdate:value":d[11]||(d[11]=y=>m.minute=y),size:"small",isClean:!1,disabled:r.minuteDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:w,calculationOperateValueCallback:Y},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),r.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(Z.value),onClick:d[14]||(d[14]=y=>p("second"))},[e.createVNode(Se._sfc_main,{value:m.second,"onUpdate:value":d[13]||(d[13]=y=>m.second=y),size:"small",isClean:!1,disabled:r.secondDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:R,calculationOperateValueCallback:L},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],10,it))}}),gt=["id"],Ce=e.defineComponent({name:"ClCalendarsBase",__name:"CalendarsBase",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onSelectDate:f=>!0,onChangeViewValue:f=>!0,onHoverDate:f=>!0,onChangeViewType:f=>!0,onSelectTime:f=>!0,onInitComplete:f=>!0},setup(f,{emit:oe}){const v=f,i=oe,I=e.inject("$DateTimeTop"),b=e.inject("$DateTimeTopBase");(!I||!b)&&fe.warn("ClCalendarsBase","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const O=I?.elId?`${I.elId}-calendarsBase-${l.getRandom(5)}`:void 0,x=e.computed(()=>{let u={"panel-calendarsbase":!0};return u=l.getJsonMerge(u,pe.getClassNameJson(v.className)),u}),g=e.reactive({currentView:"",viewValue:"",selectValue:"",selectClockDay:"",selectClockTime:""}),C=e.reactive({isShow:!1,isViewDay:!1,isShowClockPointer:!1,isShowClockSubmit:!1,isShowClockCancel:!1,isClockClickOverlay:!1}),k={viewDate:null,selectDate:null,focusDate:null,minDate:null,maxDate:null},r=(u,h)=>{k[u]=l.isString(h)?I.getMomentDate(h):null},a=u=>{const h=Object.keys(u);l.isExistValue(h,"viewValue")&&b.layerView===u.currentView&&i("onChangeViewValue",u.viewValue),h.forEach(S=>{const c=S,V=u[c];l.isExistJsonKey(g,c)&&g[c]!==V&&(g[c]=V),l.isExistJsonKey(k,c)&&(k[c]=V)})},m=(u,h)=>{let S=!1;return l.isEmpty(u)||l.isNaN(u)||(l.isEmpty(k.minDate)||(S=I.Dayjs(u).isBefore(k.minDate,h)),!S&&!l.isEmpty(k.maxDate)&&(S=I.Dayjs(u).isAfter(k.maxDate,h))),S},s=(u,h)=>{let S=0,c=1;if(l.isEmpty(k.minDate))l.isUndefined(h)||(S=h);else{const V=u===k.minDate.year();let B=!0;l.isUndefined(h)?S=V?k.minDate.month():0:(B=h===k.minDate.month(),S=h),c=V&&B?k.minDate.date():1}return I.getMomentDate({year:u,month:S,day:c})??I.getNow().startOf("year")},t=u=>{let h="";switch(u){case"months":h="days";break;case"years":h="months";break;default:h="days";break}return h},_=u=>{const S=(u||k.selectDate||k.viewDate).format("YYYY-MM-DD")+" "+(l.isEmpty(g.selectClockTime)?"00:00:00":g.selectClockTime);return I.Dayjs(S)},ae=(u,h)=>{const S=k.viewDate.clone(),c=parseInt(h.value,10);if(l.isNaN(c))return _(S);let V;switch(u){case"days":{let B=0;h.isNew?B=1:h.isOld&&(B=-1),V=S.month(S.month()+B).date(c);break}case"months":{const B=k.selectDate||S,$=S.month(c);V=$.date(Math.min(B.date(),$.daysInMonth()));break}case"years":V=S.month(0).date(1).year(c);break;default:V=S;break}return _(V)},G=()=>{g.viewValue=k.viewDate.format(b.formatIn),k.focusDate=k.viewDate.clone()},U=u=>{r("selectDate",u==="-1"?"":u);const h=k.selectDate?k.selectDate.format("YYYY-MM-DD"):"";g.selectValue=h,g.selectClockDay=h,g.selectClockTime=k.selectDate?k.selectDate.format("HH:mm:ss"):""},ee=()=>{let u=!1,h=!1,S=!1,c=!1,V=!1,B=!1;g.currentView==="times"?(u=!0,S=!0,B=!1,c=b.isDefault&&b.isShowPopup,V=b.isDefault&&b.isShowPopup,b.layerType==="hours"&&(V=!1,c=!1)):g.currentView==="days"&&(h=b.timeType==="datetime",h&&(V=!0,c=!0,S=!1,B=!0)),C.isShow=u,C.isViewDay=h,C.isShowClockPointer=S,C.isShowClockSubmit=c,C.isShowClockCancel=V,C.isClockClickOverlay=B},le=()=>{g.currentView=b.layerView,k.viewDate=I.getViewDate(v.viewValue),G(),U(v.selectValue),r("minDate",v.minValue),r("maxDate",v.maxValue),ee()};e.onMounted(()=>{e.nextTick(()=>{le()})}),e.watch(()=>v.viewValue,(u,h)=>{k.viewDate=I.getViewDate(u),G()}),e.watch(()=>v.selectValue,(u,h)=>{const S=b.isRange&&u==="-1";let c=u;const V=g.selectClockTime;S&&(c=""),U(c),S&&(g.selectClockTime=V)}),e.watch(()=>v.minValue,(u,h)=>{r("minDate",u)}),e.watch(()=>v.maxValue,(u,h)=>{r("maxDate",u)});const re=u=>{a({currentView:g.currentView,viewDate:u.clone(),viewValue:u.format(b.formatIn)})},P=u=>{g.currentView=u,k.focusDate=k.viewDate.clone(),ee(),i("onChangeViewType",u)},Z=(u,h)=>{const S=ae(u,h),c=S.format("YYYY-MM-DD"),V={};if(b.layerView===u)V.selectDate=S,V.selectValue=c,b.isRange||(V.selectClockDay=c),a(V),i("onSelectDate",c);else{const B=t(u);if(B===u){V.selectDate=S,V.selectValue=c,b.isRange||(V.selectClockDay=c),a(V),i("onSelectDate",c);return}V.viewDate=S.clone().startOf("month"),V.viewValue=V.viewDate.format(b.formatIn),V.currentView=B,a(V),ee(),i("onChangeViewType",V.currentView)}},ne=(u,h)=>{const S=ae(u,h);i("onHoverDate",S)},z=u=>{a({selectClockTime:u}),i("onSelectTime",u)},te=new Set,D=u=>{b.layerView===u&&!te.has(u)&&(te.add(u),i("onInitComplete",u))};return e.provide("$DateTimeBase",{checkDataMinMax:m,getViewMin:s,getFocusDate:()=>k.focusDate&&k.focusDate.clone()}),(u,h)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(O),class:e.normalizeClass(x.value)},[g.currentView==="days"?(e.openBlock(),e.createBlock(Ae,{key:0,viewValue:g.viewValue,selectValue:g.selectValue,startValue:f.startValue,endValue:f.endValue,hoverValue:f.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeDate:re,onOnChangeType:P,onOnSelectDate:Z,onOnHoverDate:ne,onOnInitComplete:D},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):g.currentView==="months"?(e.openBlock(),e.createBlock(Ue,{key:1,viewValue:g.viewValue,selectValue:g.selectValue,startValue:f.startValue,endValue:f.endValue,hoverValue:f.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeDate:re,onOnChangeType:P,onOnSelectDate:Z,onOnHoverDate:ne,onOnInitComplete:D},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):g.currentView==="years"?(e.openBlock(),e.createBlock(ot,{key:2,viewValue:g.viewValue,selectValue:g.selectValue,startValue:f.startValue,endValue:f.endValue,hoverValue:f.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeDate:re,onOnSelectDate:Z,onOnHoverDate:ne,onOnInitComplete:D},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),C.isShow||C.isViewDay?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass({"datetime-days-times":C.isViewDay})},[e.createVNode(pt,{selectDay:g.selectClockDay,selectValue:g.selectClockTime,minValue:f.minValue,maxValue:f.maxValue,isShowPointer:C.isShowClockPointer,isShowSubmit:C.isShowClockSubmit,isShowCancel:C.isShowClockCancel,isClickOverlay:C.isClockClickOverlay,onOnSubmit:z,onOnInitComplete:D},null,8,["selectDay","selectValue","minValue","maxValue","isShowPointer","isShowSubmit","isShowCancel","isClickOverlay"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],10,gt))}}),yt=["tabindex","aria-disabled","onKeydown"],vt=e.defineComponent({name:"ClDateTimeDefault",__name:"DateTimeDefault",props:{className:String,value:String,minValue:String,maxValue:String},emits:{onSelectValue:f=>!0,onInitComplete:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=e.inject("$DateTimeTop"),g=e.inject("$DateTimeTopBase");(!x||!g)&&fe.warn("ClDateTimeDefault","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const C=e.reactive({isShowSubmit:!1,isSubmitDisplay:!1}),k=e.reactive({day:"",time:""}),r=e.computed(()=>{let P={"panel-date-time-default":!0,"datetime-default":!0,"datetime-panel-body":!0};return P=l.getJsonMerge(P,pe.getClassNameJson(i.className)),P}),a=()=>{const P=x.getMergeDayTime(k.day,k.time),Z=x.checkValue(P);C.isSubmitDisplay=l.isEmpty(k.day)||Z.errMsg.length>0},m=P=>{let Z=!1;g.timeType==="datetime"&&(Z=P==="days"),C.isShowSubmit=Z},s=P=>{let Z="",ne="",z=!0;if(l.isNonEmptyString(P)){const te=x.getMomentDate(P);te&&(Z=te.format("YYYY-MM-DD"),ne=te.format("HH:mm:ss"),z=!1)}k.day=Z,k.time=ne,C.isSubmitDisplay=z,a()},t=()=>{m(g.layerView),s(i.value)},_=()=>{const P=x.getMomentDate(x.getMergeDayTime(k.day,k.time));P&&I("onSelectValue",P)};e.onMounted(()=>{e.nextTick(()=>{t()})}),e.watch(()=>i.value,(P,Z)=>{P!==Z&&s(P)}),e.watch([()=>i.minValue,()=>i.maxValue],()=>{a()});const ae=P=>{k.day=P,a(),g.timeType==="date"&&_()},G=P=>{k.time=P,a(),(g.timeType==="time"||g.timeType==="datetime"&&!C.isSubmitDisplay)&&_()},U=P=>{m(P)},ee=()=>{C.isShowSubmit&&!C.isSubmitDisplay&&_()},le=()=>{I("onInitComplete")};return oe({getValue:()=>{const P=x.getMergeDayTime(k.day,k.time);return x.getMomentDate(P)}}),(P,Z)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ce,{class:e.normalizeClass(r.value),selectValue:f.value,viewValue:f.value,minValue:f.minValue,maxValue:f.maxValue,onOnSelectDate:ae,onOnSelectTime:G,onOnChangeViewType:U,onOnInitComplete:le},null,8,["class","selectValue","viewValue","minValue","maxValue"]),C.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",tabindex:C.isSubmitDisplay?-1:0,"aria-disabled":C.isSubmitDisplay,class:e.normalizeClass({"datetime-days-submit":!0,"days-submit-disabled":C.isSubmitDisplay}),onClick:ee,onKeydown:[e.withKeys(e.withModifiers(ee,["prevent"]),["enter"]),e.withKeys(e.withModifiers(ee,["prevent"]),["space"])]},[e.createElementVNode("span",null,e.toDisplayString(e.unref(b).common.submit),1)],42,yt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),kt=["id"],Vt={class:"calendar-range calendar-left"},wt={class:"calendar-text"},St={class:"time-input-base"},Ct=["value","name"],Mt={class:"calendar-panel"},Et={class:"calendar-range calendar-right"},xt={class:"calendar-text"},Tt={class:"time-input-base"},bt=["value","name"],_t={class:"calendar-panel"},Bt={class:"calendar-range calendar-quick"},$t=["onClick","onKeydown"],Yt={key:0,class:"panel-quick-btn"},Nt=e.defineComponent({name:"ClDateTimeRange",__name:"DateTimeRange",props:{className:String,startValue:String,endValue:String,minValue:String,maxValue:String,rangeQuick:{type:Array,default:()=>[]}},emits:{onSubmit:f=>!0,onCancel:()=>!0,onInitComplete:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,b=`dateTimeRange-${l.getRandom(5)}`,{optPageLanguage:O,getPageLanguage:x}=ve.useLanguage();x("dataTime");const g=e.inject("$DateTimeTop"),C=e.inject("$DateTimeTopBase");(!g||!C)&&fe.warn("ClDateTimeRange","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const k=g?.elId?`${g.elId}-dateTimeRange-${l.getRandom(5)}`:void 0,r=e.computed(()=>{let p={"panel-date-time-range":!0,"panel-range-calendar":!0,"datetime-range":!0,"datetime-panel-body":!0};return p=l.getJsonMerge(p,pe.getClassNameJson(i.className)),p}),a=e.reactive({operateViewDataType:"",selectCount:0,hoverValue:"",activeQuick:"",isCheck:!0,isShowQuickBtn:C.isShowPopup||C.timeType==="datetime",previewStart:"",previewEnd:""}),m=e.reactive({view:"",text:"",name:`input_${l.getRandom(8)}`}),s=e.reactive({view:"",text:"",name:`input_${l.getRandom(8)}`}),t=e.reactive({day:"",time:"",value:""}),_=e.reactive({day:"",time:"",value:""}),ae=e.ref([]),G=(p,E)=>{const M=g.getViewDate(p),N=C.layerView==="years"?10:1,Q=a.operateViewDataType;return M[E](N,Q).format(C.formatIn)},U=(p,E)=>{if(l.isEmpty(p))return"";const M=E==="right"?C.formatOutEnd:C.formatOut;if(l.isString(p)){const N=g.getMomentDate(p);return N?N.format(M):""}return p.format(M)},ee=()=>{const p=g.getMergeDayTime(t.day,t.time);t.value=p,m.text=U(p,"left")},le=()=>{const p=g.getMergeDayTime(_.day,_.time);_.value=p,s.text=U(p,"right")},re=()=>{if(a.selectCount===2){let p="-1";if(!l.isEmpty(t.day)&&!l.isEmpty(_.day)&&!l.isEmpty(ae.value)){const E="YYYY-MM-DD";let M=g.getMomentDate(t.day,E),N=g.getMomentDate(_.day,E);if(M&&N){switch(C.layerType){case"years":if(M=g.getMomentDate(M.startOf("year").format(E),E),N=g.getMomentDate(N.endOf("year").format(E),E),!M||!N){a.activeQuick="-1";return}break;case"months":if(M=g.getMomentDate(M.startOf("month").format(E),E),N=g.getMomentDate(N.endOf("month").format(E),E),!M||!N){a.activeQuick="-1";return}break}const Q=M,o=N;Q&&o&&ae.value.forEach(w=>{w.start&&w.end&&Q.isSame(we.getDayjsObject(w.start).format(E))&&o.isSame(we.getDayjsObject(w.end).format(E))&&(p=w.id)})}}a.activeQuick=p}},P=p=>{const E=t.value,M=_.value,N=l.isEmpty(E),Q=l.isEmpty(M),o=!N&&Q,w=N&&!Q;let Y=!1,R=!1;if(p&&(o||w)){const L=g.getMomentDate(o?E:M);L&&(Y=p.isBefore(L,"day"),R=p.isSame(L,"day"))}return{isStart:o,isEnd:w,isBefore:Y,isSame:R}},Z=p=>{if(a.selectCount===1){const E=p.format("YYYY-MM-DD"),M=t.day,N=_.day,Q=P(p);a.hoverValue=E;let o="",w="";Q.isBefore?(o=E,w=Q.isStart?M:N):(o=Q.isEnd?N:M,w=E),a.previewStart=o,a.previewEnd=w,m.text=U(g.getMergeDayTime(o,t.time),"left"),s.text=U(g.getMergeDayTime(w,_.time),"right")}},ne=p=>{switch(a.previewStart="",a.previewEnd="",a.selectCount){case 0:case 2:{a.selectCount=1,a.activeQuick="",t.day=p,ee(),_.day="",_.time="",_.value="",s.text=U(g.getMergeDayTime(p,""),"right"),a.hoverValue=p;break}case 1:{a.selectCount=2;const E=g.getMomentDate(p);if(!E){a.selectCount=1;break}const M=P(E);M.isSame?(t.day=p,ee(),_.day=p,le()):M.isBefore?(_.day=t.day,_.time=t.time,t.day=p,ee(),le()):(_.day=p,le()),a.hoverValue="";break}}a.selectCount===2&&re()},z=()=>{!a.isShowQuickBtn&&a.selectCount===2&&a.isCheck&&I("onSubmit",{start:t.value,end:_.value})},te=(p,E)=>{const M=g.getMomentDate(E),N=M?M.format("YYYY-MM-DD"):"",Q=M?M.format("HH:mm:ss"):"",o=M?g.getMergeDayTime(N,Q):"";p?(t.day=N,t.time=Q,t.value=o,m.text=U(o,"left")):(_.day=N,_.time=Q,_.value=o,s.text=U(o,"right"))},D=()=>{let p="";switch(C.layerType){case"days":p="months";break;case"months":p="years";break;case"years":p="years";break;default:p="months"}a.operateViewDataType=p;const E=i.startValue||"",M=i.endValue||"",N=!l.isEmpty(E),Q=!l.isEmpty(M);if(a.selectCount=N&&Q?2:N||Q?1:0,m.view=g.getViewDate(E).format(C.formatIn),s.view=G(m.view,"add"),te(!0,E),te(!1,M),C.timeType==="time"){a.selectCount=2;const o=C.layerType==="seconds"?"00:00:00":"00:00";l.isEmpty(m.text)&&te(!0,g.getValueEffective(o)),l.isEmpty(s.text)&&te(!1,g.getValueEffective(o))}u()},u=()=>{let p=[];l.isArray(i.rangeQuick)&&(p=l.getListClone(i.rangeQuick).filter(E=>l.isObject(E)&&l.isNonEmptyString(E.id)),p.length>0&&p.push({id:"-1",text:O.value.common.custom})),ae.value=p},h=()=>{D(),re(),e.nextTick(()=>{e.nextTick(()=>{I("onInitComplete")})})},S=()=>{if(a.selectCount===2){const p=g.checkValue(t.value,_.value);a.isCheck=p.errMsg.length===0}};e.onMounted(()=>{e.nextTick(()=>{h()})}),e.watch([()=>i.startValue,()=>i.endValue],([p,E])=>{te(!0,p),te(!1,E);const M=!l.isEmpty(p),N=!l.isEmpty(E);a.selectCount=M&&N?2:M||N?1:0,a.selectCount!==2&&(a.activeQuick=""),a.hoverValue="",a.previewStart="",a.previewEnd="",re(),S()}),e.watch(()=>i.rangeQuick,()=>{a.operateViewDataType&&u()});const c=()=>{a.hoverValue="",a.previewStart="",a.previewEnd="",m.text=U(g.getMergeDayTime(t.day,t.time),"left"),s.text=U(g.getMergeDayTime(_.day,_.time),"right")},V=p=>{m.view=p,s.view=G(p,"add")},B=p=>{ne(p),S(),z()},$=p=>{t.time=p,ee(),S(),z()},T=p=>{Z(p)},ie=p=>{m.view=G(p,"subtract"),s.view=p},W=p=>{ne(p),S(),z()},j=p=>{_.time=p,le(),S(),z()},K=p=>{Z(p)},H=p=>{if(p.id!=="-1"){if(l.isEmpty(p.start)||l.isEmpty(p.end))return;const E=we.getDayjsObject(p.start),M=we.getDayjsObject(p.end);if(!E.isValid()||!M.isValid()){fe.warn("ClDateTimeRange",`快捷项 "${p.text}" 日期无效,已忽略`);return}let N=E.format("YYYY-MM-DD"),Q=M.format("YYYY-MM-DD");const o=g.checkMinMax(N,Q,"YYYY-MM-DD");if(!o.isStartMax||!o.isEndMin){fe.warn("ClDateTimeRange",`快捷项 "${p.text}" 超出可选范围,已忽略`);return}o.isStartMin||(N=o.minDay),o.isEndMax||(Q=o.maxDay),t.day=N,ee(),_.day=Q,le(),m.view=N;const w=l.isEmpty(Q)?null:g.getMomentDate(Q);s.view=w?w.startOf("month").format(C.formatIn):G(N,"add"),a.hoverValue="",a.previewStart="",a.previewEnd="",a.selectCount=2,a.activeQuick=p.id,S(),z()}},ce=()=>{a.selectCount===2&&a.isCheck&&(I("onSubmit",{start:t.value,end:_.value}),a.isCheck=!1)},ue=()=>{I("onCancel")};return oe({getValue:()=>({start:t.value,end:_.value})}),(p,E)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(k),class:e.normalizeClass(r.value),onMouseleave:c},[e.createElementVNode("div",Vt,[e.createElementVNode("div",wt,[e.createElementVNode("div",St,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:m.text,name:m.name},null,8,Ct),e.createVNode(he._sfc_main,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",Mt,[e.createVNode(Ce,{selectValue:a.selectCount===2?t.value:"-1",startValue:a.previewStart||t.value,endValue:a.previewEnd||_.value,viewValue:m.view,hoverValue:a.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeViewValue:V,onOnSelectDate:B,onOnSelectTime:$,onOnHoverDate:T},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Et,[e.createElementVNode("div",xt,[e.createElementVNode("div",Tt,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:s.text,name:s.name},null,8,bt),e.createVNode(he._sfc_main,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",_t,[e.createVNode(Ce,{selectValue:a.selectCount===2?_.value:"-1",startValue:a.previewStart||t.value,endValue:a.previewEnd||_.value,viewValue:s.view,hoverValue:a.hoverValue,minValue:f.minValue,maxValue:f.maxValue,onOnChangeViewValue:ie,onOnSelectDate:W,onOnSelectTime:j,onOnHoverDate:K},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Bt,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(M,N)=>(e.openBlock(),e.createElementBlock("li",{key:`${b}-${M.id}-${N}`,role:"button",tabindex:"0",class:e.normalizeClass({active:M.id===a.activeQuick,"calendar-quick-special":M.id==="-1"}),onClick:Q=>H(M),onKeydown:[e.withKeys(e.withModifiers(Q=>H(M),["prevent"]),["enter"]),e.withKeys(e.withModifiers(Q=>H(M),["prevent"]),["space"])]},e.toDisplayString(M.text),43,$t))),128))]),a.isShowQuickBtn?(e.openBlock(),e.createElementBlock("div",Yt,[e.createVNode(Me._sfc_main,{className:"quick-submit",label:e.unref(O).common.submit,size:"small",disabled:a.selectCount!==2||!a.isCheck,onOnClick:ce},null,8,["label","disabled"]),e.createVNode(Me._sfc_main,{className:"quick-cancel",label:e.unref(O).common.cancel,size:"small",color:"grayLight",onOnClick:ue},null,8,["label"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],42,kt))}}),Ot={key:3,class:"datetime-errmsg",role:"alert"},Ee=e.defineComponent({name:"ClDateTimeBase",__name:"DateTimeBase",props:{isDefault:{type:Boolean,default:!1},isRange:{type:Boolean,default:!1},start:String,end:String,minDate:String,maxDate:String,rangeQuick:{type:Array,default:()=>[]},errMsg:{type:Array,default:()=>[]}},emits:{onSelectValue:f=>!0,onClose:()=>!0,onInitComplete:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,b=`clDatetimeBase-${l.getRandom(5)}`,O=e.inject("$DateTimeTop");O||fe.warn("ClDateTimeBase","未找到 $DateTimeTop 注入,请确保组件在 ClDateTime 组件树内使用");const x=e.computed(()=>!!O);i.isDefault===i.isRange&&fe.warn("ClDateTimeBase",`isDefault(${i.isDefault}) 与 isRange(${i.isRange}) 必须恰好一个为 true`);const g=e.useTemplateRef("refEl");let C=!1;const k=e.computed(()=>l.isArray(i.errMsg)&&i.errMsg.length>0),r=t=>{I("onSelectValue",t)},a=()=>{I("onClose")},m=()=>{C||(C=!0,I("onInitComplete"))};return oe({getValue:()=>g.value?g.value.getValue():i.isDefault?l.isNonEmptyString(i.start)?O?.getMomentDate(i.start)??i.start:null:l.isNonEmptyString(i.start)||l.isNonEmptyString(i.end)?{start:i.start,end:i.end}:""}),(t,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.value&&f.isDefault?(e.openBlock(),e.createBlock(vt,{key:0,ref_key:"refEl",ref:g,value:f.start,minValue:f.minDate,maxValue:f.maxDate,onOnSelectValue:r,onOnInitComplete:m},null,8,["value","minValue","maxValue"])):x.value&&f.isRange?(e.openBlock(),e.createBlock(Nt,{key:1,ref_key:"refEl",ref:g,rangeQuick:f.rangeQuick,minValue:f.minDate,maxValue:f.maxDate,startValue:f.start,endValue:f.end,onOnSubmit:r,onOnCancel:a,onOnInitComplete:m},null,8,["rangeQuick","minValue","maxValue","startValue","endValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),k.value?(e.openBlock(),e.createElementBlock("ul",Ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.errMsg,(ae,G)=>(e.openBlock(),e.createElementBlock("li",{key:`${b}-err-${G}`},e.toDisplayString(ae),1))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],64))}}),It=["id"],Pt=["id"],Rt="2000-01-01",At=e.defineComponent({name:"ClDateTime",__name:"Index",props:{id:String,value:String,className:String,placeholder:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:f=>["default","range"].includes(f)},layerType:{type:String,default:"days",validator:f=>["years","months","days","hours","minutes","seconds"].includes(f)},timeType:{type:String,default:"date",validator:f=>["date","time","datetime"].includes(f)},format:String,formatEnd:String,direction:{type:String,default:"left"},minDate:String,maxDate:String,isClear:{type:Boolean,default:!1},rangeQuick:{type:Array,default:()=>[]},isDropdown:{type:Boolean,default:!0},themeStyle:{type:String,default:"default",validator:f=>["default","noBorder"].includes(f)},arrowDirection:{type:String,default:"right"},isUseDropdownArrow:{type:Boolean,default:!0},checkCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:" ~ "},appendContainer:{type:String,default:""}},emits:{"update:value":f=>!0,"update:modelValue":f=>!0,onChange:(f,oe)=>!0,onInit:()=>!0},setup(f,{expose:oe,emit:v}){const i=f,I=v,{optPageLanguage:b,getPageLanguage:O}=ve.useLanguage();O("dataTime");const x=`datetime-${l.getRandom(8)}`,g=i.id,C=e.useTemplateRef("refElDropdownLayer"),k=e.useTemplateRef("refElDatetime"),r=e.reactive({isInit:!1,isDefault:i.theme!=="range",isRange:i.theme==="range",isShowPopup:i.isDropdown,timeType:"",layerType:i.layerType,layerView:"",formatIn:"",formatOut:"",formatOutEnd:"",rangeQuick:[],errMsg:[]}),a=e.reactive({showText:"",start:"",end:""}),m={lastStart:"",lastEnd:""},s=e.computed(()=>{let o=i.arrowDirection;return l.isEmpty(o)&&(o=i.themeStyle==="noBorder"?"left":"right"),o}),t=e.computed(()=>{let o={"panel-date-time":!0};return i.themeStyle==="noBorder"&&(o["datetime-themeStyle-noBorder"]=!0),i.themeStyle==="noBorder"&&l.isEmpty(a.showText)&&(o["datetime-empty"]=!0),i.isDropdown||(o["datetime-noPopup"]=!0,o[`datetime-${i.theme}`]=!0),o=l.getJsonMerge(o,pe.getClassNameJson(i.className)),l.getStringByJson(o," ")}),_=e.computed(()=>`datetime-dropdown datetime-${i.theme} datetime-dropdown-${i.theme}`),ae=e.computed(()=>{let o={"panel-date-time":!0};return o=l.getJsonMerge(o,pe.getClassNameJson(i.className)),`${l.getStringByJson(o," ")} cl-plaintext-value`}),G=e.computed(()=>{const o=a.showText,w=l.isString(i.plaintextSeparator)?i.plaintextSeparator:" ~ ";return!r.isRange||w===" ~ "?o:o.split(" ~ ").join(w)}),U=e.computed(()=>xe.getPlaintextOutText("dateTime",i.plaintextEmptyText,G.value,i.value)),ee=()=>[{id:"today",text:b.value.today,start:F(),end:F()},{id:"yesterDay",text:b.value.yesterDay,start:F().subtract(1,"day"),end:F().subtract(1,"day")},{id:"pastDays7",text:b.value.pastDays7,start:F().subtract(7,"day"),end:F().subtract(1,"day")},{id:"pastDays30",text:b.value.pastDays30,start:F().subtract(30,"day"),end:F().subtract(1,"day")},{id:"mont",text:b.value.montCurrent,start:F().startOf("month"),end:F().endOf("month")},{id:"montLast",text:b.value.montLast,start:F().subtract(1,"month").startOf("month"),end:F().subtract(1,"month").endOf("month")}],le=()=>[{id:"mont",text:b.value.montCurrent,start:F().startOf("month"),end:F().endOf("month")},{id:"montLast",text:b.value.montLast,start:F().subtract(1,"month").startOf("month"),end:F().subtract(1,"month").endOf("month")},{id:"montLately6",text:b.value.montLately6,start:F().subtract(5,"month").startOf("month"),end:F().endOf("month")},{id:"year",text:b.value.yearCurrent,start:F().startOf("year"),end:F().endOf("year")},{id:"yearLast",text:b.value.yearLast,start:F().subtract(1,"year").startOf("year"),end:F().subtract(1,"year").endOf("year")}],re=()=>[{id:"year",text:b.value.yearCurrent,start:F().startOf("year"),end:F().endOf("year")},{id:"yearLast",text:b.value.yearLast,start:F().subtract(1,"year").startOf("year"),end:F().subtract(1,"year").endOf("year")}],P=o=>{const w=l.isEmpty(o.start),Y=l.isEmpty(o.end),R=w?"":F(o.start).format(r.formatIn),L=Y?"":F(o.end).format(r.formatIn),J=r.isDefault?R:w||Y?"":`${R}~${L}`,me=r.isDefault?{value:R}:{start:R,end:L,value:J};return{value:J,info:me}},Z=()=>{C.value&&C.value.setOpen(!1)},ne=()=>r.timeType==="time",z=o=>{if(!o)return"";const w=l.isString(o)?l.trim(o):"";return ne()?/^\d{4}-\d{2}-\d{2}/.test(w)?w:`${Rt} ${w}`:w},te=()=>F(),D=(o,w)=>{let Y=null;if(!l.isEmpty(o)){const R=l.isUndefined(w)?r.formatIn:w;Y=l.isString(o)?F(o,R):F(o),Y&&!Y.isValid()&&(Y=null)}return Y},u=o=>{const w=D(o);return w?w.startOf("month"):te().startOf("month")},h=(o,w,Y)=>{const R=l.isEmpty(Y)?r.formatIn:Y;let L="";if(!l.isEmpty(i.minDate)){const De=D(z(i.minDate));L=De?De.format(R):""}let J="";if(!l.isEmpty(i.maxDate)){const De=D(z(i.maxDate));J=De?De.format(R):""}let me=!0,de=!0,n=!0,d=!0,y=!0,A=!1;const q=l.isEmpty(o),X=l.isEmpty(w);let se;switch(i.layerType){case"years":se="year";break;case"months":se="month";break;case"days":se="day";break;case"hours":se="hour";break;case"minutes":se="minute";break;case"seconds":se="second";break;default:se="day";break}if(!q){const De=F(o);if(De.isValid()&&(l.isEmpty(L)||(me=De.isSameOrAfter(L,se)),l.isEmpty(J)||(de=De.isSameOrBefore(J,se)),!X)){const Ve=F(w);Ve.isValid()&&(l.isEmpty(L)||(n=Ve.isSameOrAfter(L,se)),l.isEmpty(J)||(d=Ve.isSameOrBefore(J,se)),Ve.isBefore(De)&&(y=!1))}}const ye=[],ke=r.isRange?b.value.rangeStartLabel:"";return de?n?(me||ye.push(`${ke}${b.value.checkStartMinLabel}(${D(L,R)?.format(r.formatOut)??L})`),d||ye.push(`${b.value.checkEndMaxLabel}(${D(J,R)?.format(r.formatOut)??J})`)):ye.push(`${b.value.checkEndMinLabel}(${D(L,R)?.format(r.formatOut)??L})`):ye.push(`${ke}${b.value.checkStartMaxLabel}(${D(J,R)?.format(r.formatOut)??J})`),r.isRange&&((q||X)&&(A=!0,ye.push(b.value.checkRangeEmptyLabel)),y||ye.push(b.value.checkStartEndLabel)),{isStartMin:me,isStartMax:de,isEndMin:n,isEndMax:d,isStartEnd:y,isRangeEmpty:A,errMsg:ye,minDay:L,maxDay:J}},S=(o,w,Y)=>{const R=h(o,w||"",Y);return r.errMsg=R.errMsg,C.value&&e.nextTick(()=>{C.value?.calculationPosition()}),R},c=()=>{let o=[];switch(i.layerType){case"days":case"hours":case"minutes":case"seconds":o=r.timeType==="time"?[]:ee();break;case"months":o=le();break;case"years":o=re();break}return o},V=()=>{let o=[];r.isRange&&(l.isArray(i.rangeQuick)&&i.rangeQuick.length>0?o=[...i.rangeQuick]:o=c()),r.rangeQuick=o},B=()=>{["default","range"].includes(i.theme)||fe.warn("ClDateTime",`theme 非法值 "${i.theme}",可选值 default/range`),["years","months","days","hours","minutes","seconds"].includes(i.layerType)||fe.warn("ClDateTime",`layerType 非法值 "${i.layerType}"`),["date","time","datetime"].includes(i.timeType)||fe.warn("ClDateTime",`timeType 非法值 "${i.timeType}"`),["default","noBorder"].includes(i.themeStyle)||fe.warn("ClDateTime",`themeStyle 非法值 "${i.themeStyle}"`)},$=()=>{B();let o="",w="",Y="";switch(i.layerType){case"years":o="date",w="YYYY",Y=i.layerType;break;case"months":o="date",w="YYYY-MM",Y=i.layerType;break;case"days":o="date",w="YYYY-MM-DD",Y=i.layerType;break;case"hours":o=i.timeType==="date"?"datetime":i.timeType,w=o==="time"?"HH:00":"YYYY-MM-DD HH:00",Y=o==="datetime"?"days":"times";break;case"minutes":o=i.timeType==="date"?"datetime":i.timeType,w=o==="time"?"HH:mm":"YYYY-MM-DD HH:mm",Y=o==="datetime"?"days":"times";break;case"seconds":o=i.timeType==="date"?"datetime":i.timeType,w=o==="time"?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss",Y=o==="datetime"?"days":"times";break;default:o="date",w="YYYY-MM-DD",Y=i.layerType;break}r.timeType=o,r.layerView=Y,r.formatIn=o==="date"?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss",r.formatOut=l.isNonEmptyString(i.format)?i.format:w,r.formatOutEnd=l.isNonEmptyString(i.formatEnd)?i.formatEnd:w},T=o=>{let w="",Y="",R="";if(l.isNonEmptyString(o)){if(r.isDefault){const L=z(o),J=F(L);J.isValid()&&(Y=J.format(r.formatIn),w=J.format(r.formatOut))}else if(r.isRange){const L=o.split("~");if(L.length===2){const J=z(L[0]),me=z(L[1]),de=F(J),n=F(me);de.isValid()&&n.isValid()&&(Y=de.format(r.formatIn),R=n.format(r.formatIn),w=`${de.format(r.formatOut)} ~ ${n.format(r.formatOutEnd)}`)}}}a.start=Y,a.end=R,a.showText=w},ie=o=>{let w=!0;if(i.checkCallback&&!l.isEmpty(o)){try{r.isDefault?w=i.checkCallback(o):r.isRange&&(w=i.checkCallback(o.start,o.end))}catch(Y){fe.warn("ClDateTime","checkCallback 回调执行异常,本次选择不生效",Y),w=!1}w=l.isBoolean(w)?w:!0}return w},W=o=>{let w="",Y="",R="",L=!1;if(r.isDefault){if(!l.isEmpty(o)){const de=D(o);de&&(Y=de.format(r.formatIn),w=de.format(r.formatOut))}L=Y!==m.lastStart}else if(r.isRange){if(!l.isEmpty(o)&&!l.isEmpty(o.start)&&!l.isEmpty(o.end)){const de=D(o.start),n=D(o.end);de&&n&&(Y=de.format(r.formatIn),R=n.format(r.formatIn),w=`${de.format(r.formatOut)} ~ ${n.format(r.formatOutEnd)}`)}L=Y!==m.lastStart||R!==m.lastEnd}const J=h(Y,R);let me=!1;return J.errMsg.length===0&&(me=ie(o)),r.errMsg=J.errMsg,C.value&&e.nextTick(()=>{C.value?.calculationPosition()}),{start:Y,end:R,text:w,isChange:L,checkInfo:J,isCheck:me}},j=()=>{$(),V(),T(i.value),e.nextTick(()=>{r.isInit=!0})},K=()=>{const o=k.value?.getValue();let w="",Y="";if(r.isDefault){if(!l.isEmpty(o)){const R=D(o);R&&(w=R.format(r.formatIn))}}else if(r.isRange){const R=o;if(!l.isEmpty(R?.start)&&!l.isEmpty(R?.end)){const L=D(R?.start),J=D(R?.end);L&&J&&(w=L.format(r.formatIn),Y=J.format(r.formatIn))}}return P({start:w,end:Y})};e.onMounted(()=>{e.nextTick(()=>{j()})}),e.watch(()=>i.value,(o,w)=>{o!==w&&(T(o),m.lastStart=a.start,m.lastEnd=a.end)}),e.watch(()=>i.isDropdown,o=>{r.isShowPopup=o}),e.watch([()=>i.theme,()=>i.layerType,()=>i.timeType,()=>i.format,()=>i.formatEnd],()=>{r.isDefault=i.theme!=="range",r.isRange=i.theme==="range",$(),V(),T(i.value),m.lastStart=a.start,m.lastEnd=a.end});const H=o=>{i.disabled||o&&(r.errMsg=[],m.lastStart=a.start,m.lastEnd=a.end,V())},ce=()=>{if(!i.disabled){a.start="",a.end="",a.showText="",m.lastStart="",m.lastEnd="";const o=P(a);I("update:value",o.value),I("update:modelValue",o.value),I("onChange",o.value,o.info)}},ue=o=>{if(!i.disabled){const{start:w,end:Y,text:R,isChange:L,isCheck:J}=W(o);if(J&&(a.start=w,a.end=Y,a.showText=R,m.lastStart=w,m.lastEnd=Y,Z(),L)){const me=P(a);I("update:value",me.value),I("update:modelValue",me.value),I("onChange",me.value,me.info)}}},ge=()=>{Z()};let p=!1;const E=()=>{r.isShowPopup&&C.value&&(C.value.checkIsShowOpen()||C.value.initCompleteOpen()),p||(p=!0,I("onInit"))};return e.provide("$DateTimeTop",{keyIndex:x,elId:i.id,getMomentDate:D,getViewDate:u,getNow:te,checkIsTimes:ne,checkValue:S,checkMinMax:h,getValueEffective:z,getMergeDayTime:(o,w)=>{let Y="";const R=l.isString(o)?l.trim(o):"";let L=l.isString(w)?l.trim(w):"";switch(r.timeType){case"date":Y=R;break;case"time":Y=z(L)||"";break;case"datetime":l.isEmpty(R)||(L=l.isEmpty(w)?"00:00:00":L,Y=`${R} ${L}`);break}return Y},Dayjs:F}),e.provide("$DateTimeTopBase",e.readonly(r)),oe({getValue:()=>K().value,getValueData:()=>K().info,setValue:o=>{T(o),m.lastStart=a.start,m.lastEnd=a.end}}),(o,w)=>f.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(g),class:e.normalizeClass(ae.value)},e.toDisplayString(U.value),11,It)):f.isDropdown?(e.openBlock(),e.createBlock(Te._sfc_main,{key:1,ref_key:"refElDropdownLayer",ref:C,id:e.unref(g),classParent:t.value,classDropDown:_.value,placeholder:f.placeholder,isDisabled:f.disabled,isClear:f.isClear,textLabel:a.showText,textArrowDirection:s.value,dropdownArrowPos:f.direction,isUseDropdownArrow:f.isUseDropdownArrow,appendContainer:f.appendContainer,appendFollowWidth:!1,onOnChangeOpen:H,onOnClear:ce},{textExtend:e.withCtx(()=>[e.createVNode(he._sfc_main,{name:r.timeType==="time"?"clock":"calendar",className:"datetime-icon","aria-hidden":"true"},null,8,["name"])]),dropdown:e.withCtx(()=>[e.createVNode(Ee,{ref_key:"refElDatetime",ref:k,isDefault:r.isDefault,isRange:r.isRange,start:a.start,end:a.end,minDate:f.minDate,maxDate:f.maxDate,rangeQuick:r.rangeQuick,errMsg:r.errMsg,onOnSelectValue:ue,onOnClose:ge,onOnInitComplete:E},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","dropdownArrowPos","isUseDropdownArrow","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:2,id:e.unref(g),class:e.normalizeClass(t.value)},[r.isInit?(e.openBlock(),e.createBlock(Ee,{key:0,ref_key:"refElDatetime",ref:k,isDefault:r.isDefault,isRange:r.isRange,start:a.start,end:a.end,minDate:f.minDate,maxDate:f.maxDate,rangeQuick:r.rangeQuick,errMsg:r.errMsg,onOnSelectValue:ue,onOnClose:ge,onOnInitComplete:E},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Pt))}});exports._sfc_main=At;
@@ -3,8 +3,8 @@ import o from "@cldemo/ui-kit/common/base";
3
3
  import ut from "@cldemo/ui-kit/common/Element";
4
4
  import { getPlaintextOutText as pt } from "@cldemo/ui-kit/common/globalConfig";
5
5
  import { a as dt } from "./language-CZZEj4e3.js";
6
- import { _ as ft } from "./Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js";
7
- import { _ as ht } from "./Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js";
6
+ import { _ as ft } from "./Validate.vue_vue_type_script_setup_true_lang-DPwcfCQb.js";
7
+ import { _ as ht } from "./Index.vue_vue_type_script_setup_true_lang-Cb8fYSc9.js";
8
8
  /* empty css */
9
9
  const mt = ["id"], gt = ["id"], Jt = /* @__PURE__ */ tt({
10
10
  name: "ClSelectCascade",
@@ -4,7 +4,7 @@ import { defineComponent as W, ref as b, computed as f, onMounted as X, nextTick
4
4
  import i from "@cldemo/ui-kit/common/base";
5
5
  import { getPlaintextOutText as le } from "@cldemo/ui-kit/common/globalConfig";
6
6
  import ae from "@cldemo/ui-kit/common/Element";
7
- import { _ as I } from "./Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js";
7
+ import { _ as I } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
8
8
  import { t as oe } from "./index-BGMnJZqC.js";
9
9
  const ce = ["id"], re = {
10
10
  key: 0,
@@ -4,7 +4,7 @@ import { defineComponent as X, ref as S, computed as h, onMounted as Y, nextTick
4
4
  import n from "@cldemo/ui-kit/common/base";
5
5
  import { getPlaintextOutText as oe } from "@cldemo/ui-kit/common/globalConfig";
6
6
  import re from "@cldemo/ui-kit/common/Element";
7
- import { _ as I } from "./Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js";
7
+ import { _ as I } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
8
8
  import { t as ce } from "./index-BGMnJZqC.js";
9
9
  const ue = ["id"], de = {
10
10
  key: 0,
@@ -4,7 +4,7 @@ import { defineComponent as Y, useTemplateRef as Z, computed as p, openBlock as
4
4
  import u from "@cldemo/ui-kit/common/base";
5
5
  import ge from "@cldemo/ui-kit/common/Element";
6
6
  import { getPlaintextOutText as he } from "@cldemo/ui-kit/common/globalConfig";
7
- import { _ as X } from "./Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js";
7
+ import { _ as X } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
8
8
  const Ce = ["id"], Se = ["type", "inputmode", "name", "value", "placeholder", "disabled", "readonly"], xe = {
9
9
  key: 0,
10
10
  class: "input-floating-label"
@@ -1 +1 @@
1
- "use strict";var Ie=Object.create;var we=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var Be=(c,O,L,r)=>{if(O&&typeof O=="object"||typeof O=="function")for(let o of ke(O))!Te.call(c,o)&&o!==L&&we(c,o,{get:()=>O[o],enumerable:!(r=xe(O,o))||r.enumerable});return c};var Ce=(c,O,L)=>(L=c!=null?Ie(_e(c)):{},Be(O||!c||!c.__esModule?we(L,"default",{value:c,enumerable:!0}):L,c));const e=require("vue"),G=require("@cldemo/ui-kit/common/log"),n=require("@cldemo/ui-kit/common/base"),N=require("@cldemo/ui-kit/common/Element"),Ve=require("@cldemo/ui-kit/common/globalConfig"),Me=require("./Index.vue_vue_type_script_setup_true_lang-BPTL5eCB.js"),Le=require("./List.vue_vue_type_script_setup_true_lang-CFCST05R.js"),Oe=require("./Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js"),De=require("./One.vue_vue_type_script_setup_true_lang-D9zWNf0s.js"),be=require("./language-BJ4aVgHI.js"),Pe=require("./Index.vue_vue_type_script_setup_true_lang-CFZ5jK-q.js"),Fe=require("./Index.vue_vue_type_script_setup_true_lang-CYFgnd30.js");;/* empty css */const Ae=["id"],Ke={key:0,class:"select-inDropdown-search",role:"search","aria-label":"搜索选项"},Ne={key:2,class:"select-inDropdown-checkboxAll"},Re=["aria-selected","aria-disabled","onClick"],$e={class:"select-inDropdown-item-inner"},qe={key:0,class:"select-inDropdown-checkbox"},He=["innerHTML"],Je={key:5,class:"select-inDropdown-body"},je={class:"select-inDropdown-empty"},Se=35,We=210,ze=20,Ue=e.defineComponent({name:"ClSelectInDropdown",__name:"Dropdown",props:{id:String,disabled:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},isMultiple:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},originalData:{type:Array,default:()=>[]},keyIndex:String,isOpen:{type:Boolean,default:!1},selectId:{type:Array,default:()=>[]},serverCallback:Function},emits:{onChange:c=>!0,onInitComplete:()=>!0,onError:c=>!0},setup(c,{expose:O,emit:L}){const r=e.defineAsyncComponent(()=>import("vue-virtual-scroller").then(l=>(Promise.resolve().then(()=>require("./vue-virtual-scroller-C_hlZMj5.js")),l.RecycleScroller))),o=c,_=L,{optPageLanguage:X,getPageLanguage:Y}=be.useLanguage();Y("common");const T=e.inject("$SelectTop",{}),M=typeof T.getSelectData=="function",E=e.useTemplateRef("refElSearch"),P=e.useTemplateRef("refElScroller"),I=e.useTemplateRef("refElRoot");let S=!0;const w={isScrollLoading:!1,hasMoreData:!0};let f=[],F=0,B=0;const Z=o.id,ee=`select-inList-${o.keyIndex||""}`;let R=!1;const J=e.ref(""),k=e.ref([]),te=e.ref([]);let ne={};const re=l=>{const s=l.id.toString();if(o.isMultiple&&o.isCascade&&l._hasChildren&&M){const p=T.getAllChildIds(s).filter(g=>!T.getSelectValueInfo(g)?.isDisabled);if(p.length===0)return 0;const m=p.filter(g=>n.isExistValue(o.selectId,g)).length;return m===0?0:m===p.length?2:1}return n.isExistValue(o.selectId,s)?2:0},oe=l=>re(l)===2,pe=l=>re(l)===1,he=e.computed(()=>{let l=!1;return te.value.length>0&&o.selectId.length>=te.value.length&&(l=n.isContainArr(o.selectId,te.value)),l}),ge=l=>{if(!l||typeof l!="object")return"";let s=n.isNonEmptyString(o.showDropDownTextFormat)?o.showDropDownTextFormat:"";l._level>=1&&n.isNonEmptyString(o.showDropDownTextFormatSub)&&(s=o.showDropDownTextFormatSub);let a=n.isEmpty(s)?l.name:n.convertStringFormat(s,l);return n.isHtml(a)?n.isEmpty(s)&&n.isHtml(l.name)?a=n.encodeHTML(l.name):a=n.convertStringFormatEncodeHTML(s,l):typeof a=="string"&&a.indexOf("<")>-1&&(a=n.encodeHTML(a)),a},j=l=>{const s=ne[l]||{};if(n.isBoolean(s._isTypeRadio))return s._isTypeRadio;if(M){const a=T.getSelectValueInfo(l);if(n.isBoolean(a?._isTypeRadio))return a._isTypeRadio}return!1},W=()=>{const l=[];ne=n.getJsonByList(k.value),k.value.forEach(s=>{if(!n.isObject(s))return;const a=typeof s.id;if(s.id==null||a!=="string"&&(a!=="number"||!n.isFinite(s.id)))return;const p=s.id.toString();if(!(o.isCascade&&s._hasChildren)&&!j(p)){if(n.isExistValue(l,p))return;s.isDisabled?n.isExistValue(o.selectId,p)&&l.push(p):l.push(p)}}),te.value=l},z=l=>{const s=o.parentKey,a=o.topParentValue,p={};l.forEach(y=>{if(!n.isObject(y)||y.id==null||typeof y.id!="string"&&(typeof y.id!="number"||!n.isFinite(y.id)))return;const x=y[s],V=x!=null&&(typeof x=="string"||typeof x=="number")?x.toString():"";V!==""&&V!==String(a)&&(p[V]||(p[V]=[]),p[V].push(y))});const m=[],g=(y,x,V,C)=>{y.forEach(K=>{const ae=K.id.toString();if(C.has(ae))return;C.add(ae);const $=p[ae]||[];m.push({...K,_level:x,_parentName:V,_hasChildren:$.length>0}),$.length>0&&g($,x+1,K.name,C)})},D=l.filter(y=>{if(!n.isObject(y)||y.id==null||typeof y.id!="string"&&(typeof y.id!="number"||!n.isFinite(y.id)))return!1;const x=y[s],V=x!=null&&(typeof x=="string"||typeof x=="number")?x.toString():"";return n.isEmpty(V)||V===String(a)});return g(D,0,"",new Set),m},ie=(l,s)=>{if(!M)return l;const a=l.filter(C=>C!=null&&C.id!=null&&(typeof C.id=="string"||typeof C.id=="number"&&n.isFinite(C.id))),p=s.filter(C=>C!=null&&C.id!=null&&(typeof C.id=="string"||typeof C.id=="number"&&n.isFinite(C.id))),m=o.parentKey,g=o.topParentValue,D=new Set,y=new Set(a.map(C=>C.id.toString()));a.forEach(C=>{const K=C.id.toString();D.add(K);const ae=new Set;let $=C[m];for(;$!=null&&(typeof $=="string"||typeof $=="number")&&$.toString()!==String(g);){const i=$.toString();if(ae.has(i))break;ae.add(i),y.has(i)||D.add(i),$=T.getSelectValueInfo(i)?.[m]}T.getAllChildIds(K).forEach(i=>{D.add(i)})});const x=p.filter(C=>D.has(C.id.toString())),V=new Set(x.map(C=>C.id.toString()));return D.forEach(C=>{if(!V.has(C)){const K=T.getSelectValueInfo(C);K&&Object.keys(K).length>0&&x.push(K)}}),x},ce=()=>{S&&(S=!1,w.hasMoreData=!0,o.isCascade?(f=[...o.originalData||[]],k.value=z(f)):k.value=n.getListClone(o.originalData).filter(l=>l!=null&&l.id!=null&&(typeof l.id=="string"||typeof l.id=="number"&&n.isFinite(l.id))),W(),ye(),J.value="",e.nextTick(()=>{E.value&&E.value.setValue("")}))},ye=()=>{e.nextTick(()=>{if(P.value&&o.selectId.length>0){const l=k.value.findIndex(s=>s.id!=null&&n.isExistValue(o.selectId,s.id.toString()));l>-1&&P.value.scrollToItem(l)}})},se=l=>{const s=[],a=ne[l]||{},p=o.isCascade&&a._hasChildren;if(o.isMultiple)if(j(l))n.isExistValue(o.selectId,l)?o.selectId.forEach(m=>{m!==l&&s.push(m)}):(o.selectId.forEach(m=>{j(m)||s.push(m)}),s.push(l));else if(p&&M){const m=T.getAllChildIds(l),g=m.filter(y=>!T.getSelectValueInfo(y)?.isDisabled),D=g.length>0&&g.every(y=>n.isExistValue(o.selectId,y));o.selectId.forEach(y=>{m.includes(y)?m.includes(y)&&T.getSelectValueInfo(y)?.isDisabled&&s.push(y):s.push(y)}),D||g.forEach(y=>{n.isExistValue(s,y)||s.push(y)})}else o.selectId.forEach(m=>{m!==l&&s.push(m)}),n.isExistValue(o.selectId,l)||s.push(l);else{if(p&&!o.parentSelectable)return[...o.selectId];s.push(l)}return s},le=l=>{const s=k.value;if(s.length===0)return;let a=-1;const p=J.value;p.length>0?(s.forEach((m,g)=>{m.id.toString()===p&&(a=g)}),a+=l,a<0?a=0:a>=s.length&&(a=s.length-1)):a=0,J.value=s[a].id.toString(),P.value&&P.value.scrollToItem(a)},q=l=>{let s=l.keyCode;if(!n.isUndefined(s))switch(s=s.toString(),s){case"13":{const a=I.value&&l.target instanceof Node&&I.value.contains(l.target);(l.target===document.body||a)&&(l.preventDefault(),l.stopPropagation());break}case"38":l.preventDefault(),l.stopPropagation(),le(-1);break;case"40":l.preventDefault(),l.stopPropagation(),le(1);break}},H=l=>{let s=l.keyCode;if(!n.isUndefined(s))switch(s=s.toString(),s){case"27":M&&T.closeDropdown?.();break;case"13":{const a=J.value;if(!a||o.disabled||!o.isOpen)break;const p=I.value&&l.target instanceof Node&&I.value.contains(l.target);if(l.target!==document.body&&!p||!k.value.some(D=>D.id.toString()===a)||ne[a]?.isDisabled)break;const g=se(a);_("onChange",g);break}}},U=l=>l.map(s=>{const{_level:a,_parentName:p,_hasChildren:m,...g}=s;return g}),ue=async()=>{if(o.serverCallback&&!(w.isScrollLoading||!w.hasMoreData)&&(w.isScrollLoading=!0,o.serverCallback)){const l=++B,s=k.value;try{const a={offset:s.length};if(o.isSearch&&E.value){const D=E.value.getValue();n.isEmpty(D)||(a.search=D)}const p=await o.serverCallback(a);if(l!==B||s!==k.value)return;if(!Array.isArray(p)){G.error("ClSelect","_loadMore 服务端返回数据格式异常(非数组):",typeof p),_("onError","服务端加载失败:返回数据格式异常");return}if(p.length===0){w.hasMoreData=!1;return}const m=new Set(s.map(D=>D?.id?.toString()).filter(Boolean)),g=p.filter(D=>{if(D?.id==null)return!1;const y=typeof D.id;return y!=="string"&&(y!=="number"||!n.isFinite(D.id))?!1:!m.has(D.id.toString())});if(g.length===0){w.hasMoreData=!1;return}o.isCascade?a.search?k.value=z([...k.value,...g]):(f.length===0&&(f=U(k.value)),f.length===0&&(f=[...o.originalData]),f.push(...g),k.value=z(f)):k.value.push(...g),W(),M&&(T.convertListToJson(g),T.refreshDisplayLabels?.())}catch(a){G.error("ClSelect","_loadMore 服务端加载失败:",a),_("onError","服务端加载失败,请稍后重试")}finally{w.isScrollLoading=!1}}},de=()=>{ce(),_("onInitComplete")};e.onMounted(()=>{de()}),e.onBeforeUnmount(()=>{N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1}),e.onDeactivated(()=>{N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1}),e.onActivated(()=>{o.isOpen&&!R&&(N.onListener(window,"keydown",q),N.onListener(window,"keyup",H),R=!0)}),e.watch(()=>o.isOpen,l=>{l?(S=!0,ce()):w.isScrollLoading=!1}),e.watch(()=>o.originalData,l=>{S=!0,o.isCascade?(f=[...l||[]],k.value=z(f)):k.value=n.getListClone(l).filter(s=>s!=null&&s.id!=null&&(typeof s.id=="string"||typeof s.id=="number"&&n.isFinite(s.id))),W(),w.hasMoreData=!0,J.value="",e.nextTick(()=>{E.value&&E.value.setValue("")})});const me=async l=>{const s=++F;B=Math.max(B,s+1);let a=[];if(o.isCascade&&(f=[]),w.hasMoreData=!0,o.serverCallback){try{if(a=await o.serverCallback({search:l,offset:0}),Array.isArray(a)||(G.error("ClSelect","onSearch 服务端返回数据格式异常(非数组):",typeof a),_("onError","服务端搜索失败:返回数据格式异常"),a=[]),s!==F)return;M&&T.convertListToJson(a)}catch(p){G.error("ClSelect","onSearch 服务端搜索失败:",p),_("onError","服务端搜索失败,请稍后重试"),a=[]}if(s!==F)return;o.isCascade&&(a=ie(a,o.originalData),a=z(a))}else{const p=o.originalData.filter(m=>m!=null&&m.id!=null&&(typeof m.id=="string"||typeof m.id=="number"&&n.isFinite(m.id)));if(n.isEmpty(l))a=p;else{o.searchKeyType!=="||"&&o.searchKeyType!=="&&"&&G.warn("ClSelect","onSearch searchKeyType 未知值,已降级为 OR 匹配:",o.searchKeyType);const m=l.toLowerCase(),g=n.isArray(o.searchKey)?o.searchKey:["name"],D=g.length;p.forEach(y=>{const x=[];for(let V=0;V<D;V++){const C=y[g[V]];if(C==null)continue;String(C).toLowerCase().indexOf(m)>-1&&x.push(!0)}if(x.length>0)switch(o.searchKeyType){case"||":a.push(y);break;case"&&":x.length===D&&a.push(y);break;default:a.push(y)}})}o.isCascade&&(n.isEmpty(l)||(a=ie(a,o.originalData)),a=z(a))}k.value=a.filter(p=>p!=null&&p.id!=null&&(typeof p.id=="string"||typeof p.id=="number"&&n.isFinite(p.id))),W(),J.value="",M&&T.calculationDropdownPosition()},fe=l=>{if(!o.disabled&&o.isMultiple){const s=[],a=[];te.value.forEach(g=>{l.value?n.isExistValue(o.selectId,g)||s.push(g):n.isExistValue(o.selectId,g)&&(ne[g]?.isDisabled||a.push(g))});const p=n.getArrClone(o.selectId);a.length>0&&a.forEach(g=>{const D=p.indexOf(g);D>-1&&p.splice(D,1)}),s.length>0&&s.forEach(g=>{n.isExistValue(p,g)||p.push(g)});const m=[];p.forEach(g=>{(!j(g)||n.isExistValue(o.selectId,g))&&m.push(g)}),_("onChange",m)}},Q=l=>{if(l.id==null||typeof l.id!="string"&&(typeof l.id!="number"||!n.isFinite(l.id))||l.isDisabled||o.disabled)return;const s=l.id.toString(),a=se(s);_("onChange",a)};return O({initOpenShow:l=>{l?R||(N.onListener(window,"keydown",q),N.onListener(window,"keyup",H),R=!0):R&&(N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1)}}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inDropdown-container",id:e.unref(Z),ref_key:"refElRoot",ref:I},[c.isSearch?(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(Oe._sfc_main,{ref_key:"refElSearch",ref:E,placeholder:c.searchPlaceholder,disabled:c.disabled,onOnChange:me},null,8,["placeholder","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),c.isMultiple&&c.isCheckBoxAll&&k.value.length>0?(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(De._sfc_main,{forId:`${ee}-cb-all`,label:e.unref(X).checkboxAll,value:he.value,disabled:c.disabled,onOnChange:fe},null,8,["forId","label","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),k.value.length>0?(e.openBlock(),e.createBlock(e.unref(r),{key:4,class:"select-inDropdown-body select-inDropdown-scroller",role:"listbox",style:e.normalizeStyle({height:Math.min(k.value.length*Se,We)+"px"}),items:k.value,"item-size":Se,"key-field":"id",ref_key:"refElScroller",ref:P,onScrollEnd:ue},{default:e.withCtx(({item:a})=>[e.createElementVNode("div",{role:"option","aria-selected":oe(a),"aria-disabled":a.isDisabled||!1,class:e.normalizeClass({"option-selected":oe(a),"option-disabled":a.isDisabled,"option-hoverKeydown":J.value===a.id.toString(),"select-inDropdown-item-child":a._level>=1}),style:e.normalizeStyle({height:Se+"px",paddingLeft:a._level?a._level*ze+"px":void 0}),onClick:p=>Q(a)},[e.createElementVNode("div",$e,[c.isMultiple?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(De._sfc_main,{name:`${ee}-cb`,forId:`${ee}-cb-${a.id}`,value:oe(a),indeterminate:pe(a),disabled:a.isDisabled},null,8,["name","forId","value","indeterminate","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"select-inDropdown-title",innerHTML:ge(a)},null,8,He)])],14,Re)]),_:1},8,["style","items"])):(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",je,e.toDisplayString(e.unref(X).noResultsText),1)]))],8,Ae))}}),Ge=["id"],Xe={class:"select-inTag-title"},Qe={class:"select-inTag-operate"},Ye={class:"select-inTag-body"},Ze=e.defineComponent({name:"ClSelectInTags",__name:"Tags",props:{id:String,showTextFormat:String,selectId:{type:Array,default:()=>[]}},emits:{onRemove:c=>!0},setup(c,{emit:O}){const L=c,r=O,o=L.id,{optPageLanguage:_,getPageLanguage:X}=be.useLanguage();X("common");const Y=e.inject("$SelectTop",{}),T=typeof Y.getSelectData=="function",M=e.computed(()=>T?n.isArray(L.selectId)?Y.getSelectData(L.selectId):[]:[]),E=e.computed(()=>T?M.value.length:0),P=e.computed(()=>n.isArray(M.value)?M.value.some(w=>n.isObject(w)?!(n.isBoolean(w.isDisabled)&&w.isDisabled):!1):!1),I=()=>{const w=M.value;if(!n.isArray(w))return;const f=[];let F=!1;w.forEach(B=>{if(!n.isObject(B))return;(n.isBoolean(B.isDisabled)?!!B.isDisabled:!1)?(typeof B.id=="string"&&!n.isEmpty(B.id)||typeof B.id=="number"&&n.isFinite(B.id))&&f.push(B.id.toString()):F=!0}),F&&r("onRemove",f)},S=w=>{if(!n.isArray(L.selectId)||n.isEmpty(w))return;const f=String(w),F=L.selectId.findIndex(Z=>String(Z)===f);if(F===-1)return;const B=n.getArrClone(L.selectId);B.splice(F,1),r("onRemove",B)};return(w,f)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inTag-container",id:e.unref(o)},[e.createElementVNode("div",Xe,[e.createElementVNode("span",null,e.toDisplayString(e.unref(_).selected)+" "+e.toDisplayString(E.value)+" "+e.toDisplayString(e.unref(_).count),1),e.createElementVNode("span",Qe,[P.value?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,class:"select-inTag-deleteAll",name:"remove",title:e.unref(_).deleteAll,"aria-label":e.unref(_).deleteAll,onClick:I},null,8,["title","aria-label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),e.createElementVNode("div",Ye,[e.createVNode(Fe._sfc_main,{showTextFormat:c.showTextFormat,list:M.value,onOnRemove:S},null,8,["showTextFormat","list"])])],8,Ge))}}),et=["id"],tt={key:0,class:"select-inText-num"},nt=e.defineComponent({name:"ClSelect",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,classDropDown:String,theme:{type:String,default:"default",validator:c=>["default","noBorder"].includes(c)},multiple:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},isShowTag:{type:Boolean,default:!0},arrowDirection:{type:String,default:"right",validator:c=>["left","right"].includes(c)},transitionLeave:{type:String,default:"zoomOutTop"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:c=>["||","&&"].includes(c)},showTextFormat:String,showDropDownTextFormat:String,multipleRealTimeChange:{type:Boolean,default:!1},isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},showDropDownTextFormatSub:String,isOutMerge:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},onOpenBefore:Function,serverCallback:Function,appendContainer:{type:String,default:""}},emits:{"update:value":c=>!0,"update:modelValue":c=>!0,onChange:(c,O)=>!0,onInit:()=>!0,onOpen:c=>!0,onError:c=>!0},setup(c,{expose:O,emit:L}){const r=c,o=L,_=e.useTemplateRef("refElDropdownLayer"),X=e.useTemplateRef("refElList"),Y=e.useTemplateRef("refElTags"),T=`select-${n.getRandom(8)}`,M=r.id,E=e.reactive({isOpen:!1,dropDownPos:"down",tagHeight:"",tagLeft:"",tagDirection:"right"});let P=[],I={};const S={childrenMap:{},parentMap:{},lastChildMap:{},allChildMap:{}},w=e.ref(!1),f=e.ref([]),F=e.ref([]),B=e.ref([]);let Z=!1;const ee=e.computed(()=>n.isNonEmptyString(r.showTextFormat)?r.showTextFormat:r.isCascade?"${name}(${parentName})":""),R=e.computed(()=>{let t={"panel-select":!0};return r.theme==="noBorder"&&(t["select-theme-noBorder"]=!0),t=n.getJsonMerge(t,N.getClassNameJson(r.className)),n.getStringByJson(t," ")}),J=e.computed(()=>`${R.value} cl-plaintext-value`),k=e.computed(()=>{const t=n.isString(r.plaintextSeparator)?r.plaintextSeparator:",";return B.value.join(t)}),te=e.computed(()=>Ve.getPlaintextOutText("select",r.plaintextEmptyText,k.value,r.value)),ne=e.computed(()=>{let t={"select-inDropdown":!0};return r.theme==="noBorder"&&(t["select-inDropdown-noBorder"]=!0),E.isOpen&&r.multiple&&r.isShowTag&&(t["select-inTag-ext"]=!0,t[`select-inTag-${E.tagDirection}`]=!0),t=n.getJsonMerge(t,N.getClassNameJson(r.classDropDown)),n.getStringByJson(t," ")}),re=e.computed(()=>{const t={"select-inTag":!0,"select-inTag-open":E.isOpen};return t[`select-inTag-${E.dropDownPos}`]=!0,t[`select-inTag-${E.tagDirection}`]=!0,t}),oe=t=>{o("update:value",t),o("update:modelValue",t)},pe=(t,i)=>{oe(t),o("onChange",t,i)},he=()=>{Z||(Z=!0,e.nextTick(()=>{o("onInit")}))},ge=t=>{e.nextTick(()=>{o("onOpen",t)})},j=()=>{const t=[];return f.value.forEach(i=>{n.isExistJsonKey(I,i)&&t.push(i)}),t},W=t=>{if(n.isEmpty(t)||!n.isArray(t))return;const i={},u=r.parentKey,h=r.topParentValue;if(t.forEach(d=>{if(!n.isObject(d)){G.warn("ClSelect","_convertListToJson 跳过非对象数据项:",d);return}if(!(typeof d.id=="string"||typeof d.id=="number"&&n.isFinite(d.id))){G.warn("ClSelect","_convertListToJson 跳过无 id 或 id 类型异常的数据项:",d);return}const b=d.id.toString();i[b]=n.getJsonClone(d)}),I=n.getJsonMerge(I,i),r.serverCallback&&!w.value&&!n.isEmpty(i)&&(w.value=!0,r.value!=null&&r.value!==""&&(H(r.value),q())),r.isCascade&&Object.keys(I).forEach(d=>{const v=I[d][u],b=v!=null&&(typeof v=="string"||typeof v=="number")?v.toString():"";if(b!==""&&b!==String(h)){const A=I[b];A?.name&&(I[d].parentName=A.name)}}),r.isCascade&&(z(),r.isOutMerge&&r.multiple&&f.value.length>0)){const d=se(f.value);n.isEqualArr(f.value,d)||(f.value=d,P=d)}if(r.multiple&&f.value.length>1){const d=f.value.filter(v=>{const b=I[v];return n.isBoolean(b?._isTypeRadio)&&b._isTypeRadio});if(d.length>1){const v=d[d.length-1],b=f.value.filter(A=>A===v||!d.includes(A));n.isEqualArr(f.value,b)||(f.value=b,Q())}}f.value.length>0&&(f.value=[...f.value])},z=()=>{const t=r.parentKey,i=r.topParentValue;S.childrenMap={},S.parentMap={},S.lastChildMap={},S.allChildMap={},Object.keys(I).forEach(h=>{const v=I[h][t],b=v!=null&&(typeof v=="string"||typeof v=="number")?v.toString():"";b!==""&&b!==String(i)&&(S.parentMap[h]=b,S.childrenMap[b]||(S.childrenMap[b]=[]),S.childrenMap[b].push(h))})},ie=t=>{const i=(u,h)=>{if(S.lastChildMap[u])return S.lastChildMap[u];if(h.has(u))return[];h.add(u);const d=S.childrenMap[u];if(!d||d.length===0)return S.lastChildMap[u]=[u],[u];const v=[];return d.forEach(b=>{v.push(...i(b,new Set(h)))}),S.lastChildMap[u]=v,v};return i(t,new Set)},ce=t=>{const i=(u,h)=>{if(S.allChildMap[u])return S.allChildMap[u];if(h.has(u))return[];h.add(u);const d=S.childrenMap[u];if(!d||d.length===0)return S.allChildMap[u]=[],[];const v=[];d.forEach(A=>{v.push(A),v.push(...i(A,new Set(h)))});const b=Array.from(new Set(v));return S.allChildMap[u]=b,b};return i(t,new Set)},ye=t=>{if(t.length===0)return[];const i=new Set(t),u=new Set,h=new Set;for(const d of i){const v=S.parentMap[d];v&&!h.has(v)&&u.add(v)}for(;u.size>0;){const d=u.values().next().value;if(u.delete(d),h.has(d))continue;h.add(d);const v=S.childrenMap[d];if(!v||v.length===0)continue;let b=!0;for(const A of v)if(!i.has(A)){b=!1;break}if(b){for(const Ee of v)i.delete(Ee);i.add(d);const A=S.parentMap[d];A&&!h.has(A)&&u.add(A)}}return[...i]},se=t=>{if(t.length===0)return[];const i=[];return t.forEach(u=>{i.push(...ie(u))}),n.getArrUnique(i)},le=t=>!r.isCascade||!r.multiple?t:r.isOutMerge?ye(t):se(t),q=()=>{if(w.value&&!n.isEmpty(f.value)){if(n.isEmpty(I)||r.serverCallback)return;const t=j();if(!n.isEqualArr(f.value,t)){const i=f.value.filter(h=>!t.includes(h));i.length>0&&G.warn("ClSelect","以下 id 在数据列表中不存在,已自动清除:",i),f.value=t,P=t;const u=le(t);oe(u.join(","))}}},H=t=>{if(t!=null&&typeof t!="string"&&(typeof t!="number"||!n.isFinite(t))){G.warn("ClSelect","setValue 收到非预期类型值:",typeof t,t);return}let i=t==null||t===""?[]:t.toString().split(",").filter(h=>h!=="");i=n.getArrUnique(i),r.isCascade&&r.isOutMerge&&i.length>0&&r.multiple&&(i=se(i));let u=n.isEqualArr(f.value,i);u&&(u=i.join(",")===f.value.join(",")),u||(P=i,f.value=i)},U=t=>n.isExistJsonKey(I,t)?n.getJsonClone(I[t]):{},ue=t=>{const i=n.isArray(t)?t:f.value,u=[];return i.forEach(h=>{const d=U(h);n.isEmpty(d)||u.push(d)}),u},de=t=>{const u=r.isCascade&&!r.multiple&&(S.childrenMap[t.id?.toString()]?.length>0||!S.parentMap[t.id?.toString()])&&n.isEmpty(r.showTextFormat)?"":ee.value;let h=n.isEmpty(u)?t.name??"":n.convertStringFormat(u,t);return n.isHtml(h)?h=n.isEmpty(u)?n.encodeHTML(t.name):n.convertStringFormatEncodeHTML(u,t):typeof h=="string"&&h.indexOf("<")>-1&&(h=n.encodeHTML(h)),h},me=t=>{if(n.isNonEmptyString(r.showTextFormat))return n.removeHTMLTags(de(t));const i=n.isString(r.plaintextLevelSeparator)?r.plaintextLevelSeparator:" > ",u=n.isString(t?.name)?t.name:"",h=n.isString(t?.parentName)?t.parentName:"",d=r.isCascade&&n.isNonEmptyString(h)?`${h}${i}${u}`:u;return n.removeHTMLTags(d)},fe=()=>{const t=ue();F.value=t.map(i=>de(i)),B.value=f.value.map(i=>{const u=U(i);return n.isEmpty(u)?i:me(u)})},Q=()=>{const t=j();P=t,f.value=t;const i=le(t),u=i.join(",");let h;if(r.multiple){const d=[];i.forEach(v=>{const b=U(v);n.isEmpty(b)||d.push(b)}),h=d}else h=U(u),n.isEmpty(h)&&(h=null);pe(u,h)},ve=()=>{E.isOpen||!n.isEqualArr(f.value,P)&&Q()},l=()=>{w.value||(w.value=!0,W(r.list),H(r.value),q())},s=()=>{!w.value&&r.list&&r.list.length>0&&l()},a=()=>{import("vue-virtual-scroller").then(()=>{Promise.resolve().then(()=>require("./vue-virtual-scroller-C_hlZMj5.js"))})};e.onMounted(()=>{r.isPlaintext||a(),e.nextTick(()=>{s()})}),e.watch(w,t=>{t&&he()}),e.watch(()=>r.list,(t,i)=>{w.value||(t&&t.length>0||i===void 0)&&(w.value=!0)}),e.watch([()=>r.value,()=>r.list],([t,i],[u,h])=>{const d=i||[];!w.value&&d.length>0&&(w.value=!0),i!==h&&(I={},S.childrenMap={},S.parentMap={},S.lastChildMap={},S.allChildMap={}),W(d),t!==void 0&&H(t),q()}),e.watch([f,()=>r.list],([t,i])=>{i&&i.length>0&&n.isEmpty(I)&&W(i),fe()}),e.watch(()=>r.isOutMerge,()=>{r.isCascade&&r.multiple&&f.value.length>0&&le(j()).join(",")!==String(r.value??"")&&Q()}),e.watch([()=>r.parentKey,()=>r.topParentValue],()=>{r.isCascade&&!n.isEmpty(I)&&z()});const p=t=>{t&&r.disabled||(E.isOpen=t,t?P=f.value:ve(),e.nextTick(()=>{X.value&&X.value.initOpenShow(t)}),ge(t))},m=()=>{r.disabled||(f.value=[],r.multiple&&r.multipleRealTimeChange?Q():ve())},g=t=>{if(E.dropDownPos=t.use.dropDownPos,r.multiple&&r.isShowTag){const i=Y.value?.$el?.offsetWidth||0;E.tagHeight=r.theme==="default"?`${t.original.dropDownHeight+1}px`:`${t.original.dropDownHeight}px`;const u=t.original.winWidth-(t.original.controlOffset.left+t.original.dropDownWidth)>=i?"right":"left";E.tagDirection=u,u==="right"?E.tagLeft=`${t.original.dropDownWidth-1}px`:E.tagLeft=`${(t.original.dropDownWidth-t.original.textWidth+i+1)*-1}px`}},D=t=>{f.value=t,r.multiple?r.multipleRealTimeChange&&Q():_.value?.setOpen(!1)},y=t=>{r.disabled||(f.value=t,Q())},x=t=>{o("onError",t)},V=()=>{_.value&&(_.value.checkIsShowOpen()||_.value.initCompleteOpen())};e.provide("$SelectTop",{getSelectData:ue,getSelectValueInfo:U,getAllChildIds:ce,calculationDropdownPosition:()=>{_.value?.calculationPosition()},convertListToJson:W,closeDropdown:()=>{_.value?.setOpen(!1)},refreshDisplayLabels:()=>{fe()}});const C=()=>{const t=j();return le(t).join(",")};return O({getValue:C,getValueData:()=>{const t=C();if(r.multiple){const u=t?t.split(","):[],h=[];return u.forEach(d=>{const v=U(d);n.isEmpty(v)||h.push(v)}),h}if(!t)return null;const i=U(t);return n.isEmpty(i)?null:i},setValue:t=>{H(t),q()},runInitComplete:()=>{l()}}),(t,i)=>c.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(M),class:e.normalizeClass(J.value)},e.toDisplayString(te.value),11,et)):(e.openBlock(),e.createBlock(Le._sfc_main,{key:1,id:e.unref(M),ref_key:"refElDropdownLayer",ref:_,classParent:R.value,classText:"select-inText",classDropDown:ne.value,placeholder:c.placeholder,isDisabled:c.disabled,isClear:c.isClear,textLabel:F.value.join(","),textArrowDirection:c.arrowDirection,transitionLeave:c.transitionLeave,appendContainer:c.appendContainer,appendFollowWidth:c.theme!=="noBorder",onOpenBeforeCallback:c.onOpenBefore,onOnChangeOpen:p,onOnClear:m,onOnChangePosition:g},{textExtend:e.withCtx(()=>[c.multiple?(e.openBlock(),e.createElementBlock("span",tt,[F.value.length>1?(e.openBlock(),e.createBlock(Me._sfc_main,{key:0,num:F.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),dropdown:e.withCtx(()=>[e.createVNode(Ue,{ref_key:"refElList",ref:X,isSearch:c.isSearch,searchPlaceholder:c.searchPlaceholder,searchKey:c.searchKey,searchKeyType:c.searchKeyType,isMultiple:c.multiple,isCheckBoxAll:c.isCheckBoxAll,showDropDownTextFormat:c.showDropDownTextFormat,showDropDownTextFormatSub:c.showDropDownTextFormatSub,isCascade:c.isCascade,parentSelectable:c.parentSelectable,parentKey:c.parentKey,topParentValue:c.topParentValue,originalData:c.list,keyIndex:T,selectId:f.value,disabled:c.disabled,isOpen:E.isOpen,serverCallback:c.serverCallback,onOnChange:D,onOnInitComplete:V,onOnError:x},null,8,["isSearch","searchPlaceholder","searchKey","searchKeyType","isMultiple","isCheckBoxAll","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","disabled","isOpen","serverCallback"])]),dropdownExtend:e.withCtx(()=>[c.multiple&&c.isShowTag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(re.value),style:e.normalizeStyle({height:E.tagHeight,left:E.tagLeft}),ref_key:"refElTags",ref:Y},[e.createVNode(Ze,{showTextFormat:ee.value,selectId:f.value,onOnRemove:y},null,8,["showTextFormat","selectId"])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","transitionLeave","appendContainer","appendFollowWidth","onOpenBeforeCallback"]))}});exports._sfc_main=nt;
1
+ "use strict";var Ie=Object.create;var we=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var Be=(c,O,L,r)=>{if(O&&typeof O=="object"||typeof O=="function")for(let o of ke(O))!Te.call(c,o)&&o!==L&&we(c,o,{get:()=>O[o],enumerable:!(r=xe(O,o))||r.enumerable});return c};var Ce=(c,O,L)=>(L=c!=null?Ie(_e(c)):{},Be(O||!c||!c.__esModule?we(L,"default",{value:c,enumerable:!0}):L,c));const e=require("vue"),G=require("@cldemo/ui-kit/common/log"),n=require("@cldemo/ui-kit/common/base"),N=require("@cldemo/ui-kit/common/Element"),Ve=require("@cldemo/ui-kit/common/globalConfig"),Me=require("./Index.vue_vue_type_script_setup_true_lang-BPTL5eCB.js"),Le=require("./List.vue_vue_type_script_setup_true_lang-B75tAGde.js"),Oe=require("./Index.vue_vue_type_script_setup_true_lang-98sOHlWj.js"),De=require("./One.vue_vue_type_script_setup_true_lang-DxUlP9yq.js"),be=require("./language-BJ4aVgHI.js"),Pe=require("./Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js"),Fe=require("./Index.vue_vue_type_script_setup_true_lang-kCemr-ml.js");;/* empty css */const Ae=["id"],Ke={key:0,class:"select-inDropdown-search",role:"search","aria-label":"搜索选项"},Ne={key:2,class:"select-inDropdown-checkboxAll"},Re=["aria-selected","aria-disabled","onClick"],$e={class:"select-inDropdown-item-inner"},qe={key:0,class:"select-inDropdown-checkbox"},He=["innerHTML"],Je={key:5,class:"select-inDropdown-body"},je={class:"select-inDropdown-empty"},Se=35,We=210,ze=20,Ue=e.defineComponent({name:"ClSelectInDropdown",__name:"Dropdown",props:{id:String,disabled:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},isMultiple:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},originalData:{type:Array,default:()=>[]},keyIndex:String,isOpen:{type:Boolean,default:!1},selectId:{type:Array,default:()=>[]},serverCallback:Function},emits:{onChange:c=>!0,onInitComplete:()=>!0,onError:c=>!0},setup(c,{expose:O,emit:L}){const r=e.defineAsyncComponent(()=>import("vue-virtual-scroller").then(l=>(Promise.resolve().then(()=>require("./vue-virtual-scroller-C_hlZMj5.js")),l.RecycleScroller))),o=c,_=L,{optPageLanguage:X,getPageLanguage:Y}=be.useLanguage();Y("common");const T=e.inject("$SelectTop",{}),M=typeof T.getSelectData=="function",E=e.useTemplateRef("refElSearch"),P=e.useTemplateRef("refElScroller"),I=e.useTemplateRef("refElRoot");let S=!0;const w={isScrollLoading:!1,hasMoreData:!0};let f=[],F=0,B=0;const Z=o.id,ee=`select-inList-${o.keyIndex||""}`;let R=!1;const J=e.ref(""),k=e.ref([]),te=e.ref([]);let ne={};const re=l=>{const s=l.id.toString();if(o.isMultiple&&o.isCascade&&l._hasChildren&&M){const p=T.getAllChildIds(s).filter(g=>!T.getSelectValueInfo(g)?.isDisabled);if(p.length===0)return 0;const m=p.filter(g=>n.isExistValue(o.selectId,g)).length;return m===0?0:m===p.length?2:1}return n.isExistValue(o.selectId,s)?2:0},oe=l=>re(l)===2,pe=l=>re(l)===1,he=e.computed(()=>{let l=!1;return te.value.length>0&&o.selectId.length>=te.value.length&&(l=n.isContainArr(o.selectId,te.value)),l}),ge=l=>{if(!l||typeof l!="object")return"";let s=n.isNonEmptyString(o.showDropDownTextFormat)?o.showDropDownTextFormat:"";l._level>=1&&n.isNonEmptyString(o.showDropDownTextFormatSub)&&(s=o.showDropDownTextFormatSub);let a=n.isEmpty(s)?l.name:n.convertStringFormat(s,l);return n.isHtml(a)?n.isEmpty(s)&&n.isHtml(l.name)?a=n.encodeHTML(l.name):a=n.convertStringFormatEncodeHTML(s,l):typeof a=="string"&&a.indexOf("<")>-1&&(a=n.encodeHTML(a)),a},j=l=>{const s=ne[l]||{};if(n.isBoolean(s._isTypeRadio))return s._isTypeRadio;if(M){const a=T.getSelectValueInfo(l);if(n.isBoolean(a?._isTypeRadio))return a._isTypeRadio}return!1},W=()=>{const l=[];ne=n.getJsonByList(k.value),k.value.forEach(s=>{if(!n.isObject(s))return;const a=typeof s.id;if(s.id==null||a!=="string"&&(a!=="number"||!n.isFinite(s.id)))return;const p=s.id.toString();if(!(o.isCascade&&s._hasChildren)&&!j(p)){if(n.isExistValue(l,p))return;s.isDisabled?n.isExistValue(o.selectId,p)&&l.push(p):l.push(p)}}),te.value=l},z=l=>{const s=o.parentKey,a=o.topParentValue,p={};l.forEach(y=>{if(!n.isObject(y)||y.id==null||typeof y.id!="string"&&(typeof y.id!="number"||!n.isFinite(y.id)))return;const x=y[s],V=x!=null&&(typeof x=="string"||typeof x=="number")?x.toString():"";V!==""&&V!==String(a)&&(p[V]||(p[V]=[]),p[V].push(y))});const m=[],g=(y,x,V,C)=>{y.forEach(K=>{const ae=K.id.toString();if(C.has(ae))return;C.add(ae);const $=p[ae]||[];m.push({...K,_level:x,_parentName:V,_hasChildren:$.length>0}),$.length>0&&g($,x+1,K.name,C)})},D=l.filter(y=>{if(!n.isObject(y)||y.id==null||typeof y.id!="string"&&(typeof y.id!="number"||!n.isFinite(y.id)))return!1;const x=y[s],V=x!=null&&(typeof x=="string"||typeof x=="number")?x.toString():"";return n.isEmpty(V)||V===String(a)});return g(D,0,"",new Set),m},ie=(l,s)=>{if(!M)return l;const a=l.filter(C=>C!=null&&C.id!=null&&(typeof C.id=="string"||typeof C.id=="number"&&n.isFinite(C.id))),p=s.filter(C=>C!=null&&C.id!=null&&(typeof C.id=="string"||typeof C.id=="number"&&n.isFinite(C.id))),m=o.parentKey,g=o.topParentValue,D=new Set,y=new Set(a.map(C=>C.id.toString()));a.forEach(C=>{const K=C.id.toString();D.add(K);const ae=new Set;let $=C[m];for(;$!=null&&(typeof $=="string"||typeof $=="number")&&$.toString()!==String(g);){const i=$.toString();if(ae.has(i))break;ae.add(i),y.has(i)||D.add(i),$=T.getSelectValueInfo(i)?.[m]}T.getAllChildIds(K).forEach(i=>{D.add(i)})});const x=p.filter(C=>D.has(C.id.toString())),V=new Set(x.map(C=>C.id.toString()));return D.forEach(C=>{if(!V.has(C)){const K=T.getSelectValueInfo(C);K&&Object.keys(K).length>0&&x.push(K)}}),x},ce=()=>{S&&(S=!1,w.hasMoreData=!0,o.isCascade?(f=[...o.originalData||[]],k.value=z(f)):k.value=n.getListClone(o.originalData).filter(l=>l!=null&&l.id!=null&&(typeof l.id=="string"||typeof l.id=="number"&&n.isFinite(l.id))),W(),ye(),J.value="",e.nextTick(()=>{E.value&&E.value.setValue("")}))},ye=()=>{e.nextTick(()=>{if(P.value&&o.selectId.length>0){const l=k.value.findIndex(s=>s.id!=null&&n.isExistValue(o.selectId,s.id.toString()));l>-1&&P.value.scrollToItem(l)}})},se=l=>{const s=[],a=ne[l]||{},p=o.isCascade&&a._hasChildren;if(o.isMultiple)if(j(l))n.isExistValue(o.selectId,l)?o.selectId.forEach(m=>{m!==l&&s.push(m)}):(o.selectId.forEach(m=>{j(m)||s.push(m)}),s.push(l));else if(p&&M){const m=T.getAllChildIds(l),g=m.filter(y=>!T.getSelectValueInfo(y)?.isDisabled),D=g.length>0&&g.every(y=>n.isExistValue(o.selectId,y));o.selectId.forEach(y=>{m.includes(y)?m.includes(y)&&T.getSelectValueInfo(y)?.isDisabled&&s.push(y):s.push(y)}),D||g.forEach(y=>{n.isExistValue(s,y)||s.push(y)})}else o.selectId.forEach(m=>{m!==l&&s.push(m)}),n.isExistValue(o.selectId,l)||s.push(l);else{if(p&&!o.parentSelectable)return[...o.selectId];s.push(l)}return s},le=l=>{const s=k.value;if(s.length===0)return;let a=-1;const p=J.value;p.length>0?(s.forEach((m,g)=>{m.id.toString()===p&&(a=g)}),a+=l,a<0?a=0:a>=s.length&&(a=s.length-1)):a=0,J.value=s[a].id.toString(),P.value&&P.value.scrollToItem(a)},q=l=>{let s=l.keyCode;if(!n.isUndefined(s))switch(s=s.toString(),s){case"13":{const a=I.value&&l.target instanceof Node&&I.value.contains(l.target);(l.target===document.body||a)&&(l.preventDefault(),l.stopPropagation());break}case"38":l.preventDefault(),l.stopPropagation(),le(-1);break;case"40":l.preventDefault(),l.stopPropagation(),le(1);break}},H=l=>{let s=l.keyCode;if(!n.isUndefined(s))switch(s=s.toString(),s){case"27":M&&T.closeDropdown?.();break;case"13":{const a=J.value;if(!a||o.disabled||!o.isOpen)break;const p=I.value&&l.target instanceof Node&&I.value.contains(l.target);if(l.target!==document.body&&!p||!k.value.some(D=>D.id.toString()===a)||ne[a]?.isDisabled)break;const g=se(a);_("onChange",g);break}}},U=l=>l.map(s=>{const{_level:a,_parentName:p,_hasChildren:m,...g}=s;return g}),ue=async()=>{if(o.serverCallback&&!(w.isScrollLoading||!w.hasMoreData)&&(w.isScrollLoading=!0,o.serverCallback)){const l=++B,s=k.value;try{const a={offset:s.length};if(o.isSearch&&E.value){const D=E.value.getValue();n.isEmpty(D)||(a.search=D)}const p=await o.serverCallback(a);if(l!==B||s!==k.value)return;if(!Array.isArray(p)){G.error("ClSelect","_loadMore 服务端返回数据格式异常(非数组):",typeof p),_("onError","服务端加载失败:返回数据格式异常");return}if(p.length===0){w.hasMoreData=!1;return}const m=new Set(s.map(D=>D?.id?.toString()).filter(Boolean)),g=p.filter(D=>{if(D?.id==null)return!1;const y=typeof D.id;return y!=="string"&&(y!=="number"||!n.isFinite(D.id))?!1:!m.has(D.id.toString())});if(g.length===0){w.hasMoreData=!1;return}o.isCascade?a.search?k.value=z([...k.value,...g]):(f.length===0&&(f=U(k.value)),f.length===0&&(f=[...o.originalData]),f.push(...g),k.value=z(f)):k.value.push(...g),W(),M&&(T.convertListToJson(g),T.refreshDisplayLabels?.())}catch(a){G.error("ClSelect","_loadMore 服务端加载失败:",a),_("onError","服务端加载失败,请稍后重试")}finally{w.isScrollLoading=!1}}},de=()=>{ce(),_("onInitComplete")};e.onMounted(()=>{de()}),e.onBeforeUnmount(()=>{N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1}),e.onDeactivated(()=>{N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1}),e.onActivated(()=>{o.isOpen&&!R&&(N.onListener(window,"keydown",q),N.onListener(window,"keyup",H),R=!0)}),e.watch(()=>o.isOpen,l=>{l?(S=!0,ce()):w.isScrollLoading=!1}),e.watch(()=>o.originalData,l=>{S=!0,o.isCascade?(f=[...l||[]],k.value=z(f)):k.value=n.getListClone(l).filter(s=>s!=null&&s.id!=null&&(typeof s.id=="string"||typeof s.id=="number"&&n.isFinite(s.id))),W(),w.hasMoreData=!0,J.value="",e.nextTick(()=>{E.value&&E.value.setValue("")})});const me=async l=>{const s=++F;B=Math.max(B,s+1);let a=[];if(o.isCascade&&(f=[]),w.hasMoreData=!0,o.serverCallback){try{if(a=await o.serverCallback({search:l,offset:0}),Array.isArray(a)||(G.error("ClSelect","onSearch 服务端返回数据格式异常(非数组):",typeof a),_("onError","服务端搜索失败:返回数据格式异常"),a=[]),s!==F)return;M&&T.convertListToJson(a)}catch(p){G.error("ClSelect","onSearch 服务端搜索失败:",p),_("onError","服务端搜索失败,请稍后重试"),a=[]}if(s!==F)return;o.isCascade&&(a=ie(a,o.originalData),a=z(a))}else{const p=o.originalData.filter(m=>m!=null&&m.id!=null&&(typeof m.id=="string"||typeof m.id=="number"&&n.isFinite(m.id)));if(n.isEmpty(l))a=p;else{o.searchKeyType!=="||"&&o.searchKeyType!=="&&"&&G.warn("ClSelect","onSearch searchKeyType 未知值,已降级为 OR 匹配:",o.searchKeyType);const m=l.toLowerCase(),g=n.isArray(o.searchKey)?o.searchKey:["name"],D=g.length;p.forEach(y=>{const x=[];for(let V=0;V<D;V++){const C=y[g[V]];if(C==null)continue;String(C).toLowerCase().indexOf(m)>-1&&x.push(!0)}if(x.length>0)switch(o.searchKeyType){case"||":a.push(y);break;case"&&":x.length===D&&a.push(y);break;default:a.push(y)}})}o.isCascade&&(n.isEmpty(l)||(a=ie(a,o.originalData)),a=z(a))}k.value=a.filter(p=>p!=null&&p.id!=null&&(typeof p.id=="string"||typeof p.id=="number"&&n.isFinite(p.id))),W(),J.value="",M&&T.calculationDropdownPosition()},fe=l=>{if(!o.disabled&&o.isMultiple){const s=[],a=[];te.value.forEach(g=>{l.value?n.isExistValue(o.selectId,g)||s.push(g):n.isExistValue(o.selectId,g)&&(ne[g]?.isDisabled||a.push(g))});const p=n.getArrClone(o.selectId);a.length>0&&a.forEach(g=>{const D=p.indexOf(g);D>-1&&p.splice(D,1)}),s.length>0&&s.forEach(g=>{n.isExistValue(p,g)||p.push(g)});const m=[];p.forEach(g=>{(!j(g)||n.isExistValue(o.selectId,g))&&m.push(g)}),_("onChange",m)}},Q=l=>{if(l.id==null||typeof l.id!="string"&&(typeof l.id!="number"||!n.isFinite(l.id))||l.isDisabled||o.disabled)return;const s=l.id.toString(),a=se(s);_("onChange",a)};return O({initOpenShow:l=>{l?R||(N.onListener(window,"keydown",q),N.onListener(window,"keyup",H),R=!0):R&&(N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1)}}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inDropdown-container",id:e.unref(Z),ref_key:"refElRoot",ref:I},[c.isSearch?(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(Oe._sfc_main,{ref_key:"refElSearch",ref:E,placeholder:c.searchPlaceholder,disabled:c.disabled,onOnChange:me},null,8,["placeholder","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),c.isMultiple&&c.isCheckBoxAll&&k.value.length>0?(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(De._sfc_main,{forId:`${ee}-cb-all`,label:e.unref(X).checkboxAll,value:he.value,disabled:c.disabled,onOnChange:fe},null,8,["forId","label","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),k.value.length>0?(e.openBlock(),e.createBlock(e.unref(r),{key:4,class:"select-inDropdown-body select-inDropdown-scroller",role:"listbox",style:e.normalizeStyle({height:Math.min(k.value.length*Se,We)+"px"}),items:k.value,"item-size":Se,"key-field":"id",ref_key:"refElScroller",ref:P,onScrollEnd:ue},{default:e.withCtx(({item:a})=>[e.createElementVNode("div",{role:"option","aria-selected":oe(a),"aria-disabled":a.isDisabled||!1,class:e.normalizeClass({"option-selected":oe(a),"option-disabled":a.isDisabled,"option-hoverKeydown":J.value===a.id.toString(),"select-inDropdown-item-child":a._level>=1}),style:e.normalizeStyle({height:Se+"px",paddingLeft:a._level?a._level*ze+"px":void 0}),onClick:p=>Q(a)},[e.createElementVNode("div",$e,[c.isMultiple?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(De._sfc_main,{name:`${ee}-cb`,forId:`${ee}-cb-${a.id}`,value:oe(a),indeterminate:pe(a),disabled:a.isDisabled},null,8,["name","forId","value","indeterminate","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"select-inDropdown-title",innerHTML:ge(a)},null,8,He)])],14,Re)]),_:1},8,["style","items"])):(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",je,e.toDisplayString(e.unref(X).noResultsText),1)]))],8,Ae))}}),Ge=["id"],Xe={class:"select-inTag-title"},Qe={class:"select-inTag-operate"},Ye={class:"select-inTag-body"},Ze=e.defineComponent({name:"ClSelectInTags",__name:"Tags",props:{id:String,showTextFormat:String,selectId:{type:Array,default:()=>[]}},emits:{onRemove:c=>!0},setup(c,{emit:O}){const L=c,r=O,o=L.id,{optPageLanguage:_,getPageLanguage:X}=be.useLanguage();X("common");const Y=e.inject("$SelectTop",{}),T=typeof Y.getSelectData=="function",M=e.computed(()=>T?n.isArray(L.selectId)?Y.getSelectData(L.selectId):[]:[]),E=e.computed(()=>T?M.value.length:0),P=e.computed(()=>n.isArray(M.value)?M.value.some(w=>n.isObject(w)?!(n.isBoolean(w.isDisabled)&&w.isDisabled):!1):!1),I=()=>{const w=M.value;if(!n.isArray(w))return;const f=[];let F=!1;w.forEach(B=>{if(!n.isObject(B))return;(n.isBoolean(B.isDisabled)?!!B.isDisabled:!1)?(typeof B.id=="string"&&!n.isEmpty(B.id)||typeof B.id=="number"&&n.isFinite(B.id))&&f.push(B.id.toString()):F=!0}),F&&r("onRemove",f)},S=w=>{if(!n.isArray(L.selectId)||n.isEmpty(w))return;const f=String(w),F=L.selectId.findIndex(Z=>String(Z)===f);if(F===-1)return;const B=n.getArrClone(L.selectId);B.splice(F,1),r("onRemove",B)};return(w,f)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inTag-container",id:e.unref(o)},[e.createElementVNode("div",Xe,[e.createElementVNode("span",null,e.toDisplayString(e.unref(_).selected)+" "+e.toDisplayString(E.value)+" "+e.toDisplayString(e.unref(_).count),1),e.createElementVNode("span",Qe,[P.value?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,class:"select-inTag-deleteAll",name:"remove",title:e.unref(_).deleteAll,"aria-label":e.unref(_).deleteAll,onClick:I},null,8,["title","aria-label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),e.createElementVNode("div",Ye,[e.createVNode(Fe._sfc_main,{showTextFormat:c.showTextFormat,list:M.value,onOnRemove:S},null,8,["showTextFormat","list"])])],8,Ge))}}),et=["id"],tt={key:0,class:"select-inText-num"},nt=e.defineComponent({name:"ClSelect",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,classDropDown:String,theme:{type:String,default:"default",validator:c=>["default","noBorder"].includes(c)},multiple:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},isShowTag:{type:Boolean,default:!0},arrowDirection:{type:String,default:"right",validator:c=>["left","right"].includes(c)},transitionLeave:{type:String,default:"zoomOutTop"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:c=>["||","&&"].includes(c)},showTextFormat:String,showDropDownTextFormat:String,multipleRealTimeChange:{type:Boolean,default:!1},isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},showDropDownTextFormatSub:String,isOutMerge:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},onOpenBefore:Function,serverCallback:Function,appendContainer:{type:String,default:""}},emits:{"update:value":c=>!0,"update:modelValue":c=>!0,onChange:(c,O)=>!0,onInit:()=>!0,onOpen:c=>!0,onError:c=>!0},setup(c,{expose:O,emit:L}){const r=c,o=L,_=e.useTemplateRef("refElDropdownLayer"),X=e.useTemplateRef("refElList"),Y=e.useTemplateRef("refElTags"),T=`select-${n.getRandom(8)}`,M=r.id,E=e.reactive({isOpen:!1,dropDownPos:"down",tagHeight:"",tagLeft:"",tagDirection:"right"});let P=[],I={};const S={childrenMap:{},parentMap:{},lastChildMap:{},allChildMap:{}},w=e.ref(!1),f=e.ref([]),F=e.ref([]),B=e.ref([]);let Z=!1;const ee=e.computed(()=>n.isNonEmptyString(r.showTextFormat)?r.showTextFormat:r.isCascade?"${name}(${parentName})":""),R=e.computed(()=>{let t={"panel-select":!0};return r.theme==="noBorder"&&(t["select-theme-noBorder"]=!0),t=n.getJsonMerge(t,N.getClassNameJson(r.className)),n.getStringByJson(t," ")}),J=e.computed(()=>`${R.value} cl-plaintext-value`),k=e.computed(()=>{const t=n.isString(r.plaintextSeparator)?r.plaintextSeparator:",";return B.value.join(t)}),te=e.computed(()=>Ve.getPlaintextOutText("select",r.plaintextEmptyText,k.value,r.value)),ne=e.computed(()=>{let t={"select-inDropdown":!0};return r.theme==="noBorder"&&(t["select-inDropdown-noBorder"]=!0),E.isOpen&&r.multiple&&r.isShowTag&&(t["select-inTag-ext"]=!0,t[`select-inTag-${E.tagDirection}`]=!0),t=n.getJsonMerge(t,N.getClassNameJson(r.classDropDown)),n.getStringByJson(t," ")}),re=e.computed(()=>{const t={"select-inTag":!0,"select-inTag-open":E.isOpen};return t[`select-inTag-${E.dropDownPos}`]=!0,t[`select-inTag-${E.tagDirection}`]=!0,t}),oe=t=>{o("update:value",t),o("update:modelValue",t)},pe=(t,i)=>{oe(t),o("onChange",t,i)},he=()=>{Z||(Z=!0,e.nextTick(()=>{o("onInit")}))},ge=t=>{e.nextTick(()=>{o("onOpen",t)})},j=()=>{const t=[];return f.value.forEach(i=>{n.isExistJsonKey(I,i)&&t.push(i)}),t},W=t=>{if(n.isEmpty(t)||!n.isArray(t))return;const i={},u=r.parentKey,h=r.topParentValue;if(t.forEach(d=>{if(!n.isObject(d)){G.warn("ClSelect","_convertListToJson 跳过非对象数据项:",d);return}if(!(typeof d.id=="string"||typeof d.id=="number"&&n.isFinite(d.id))){G.warn("ClSelect","_convertListToJson 跳过无 id 或 id 类型异常的数据项:",d);return}const b=d.id.toString();i[b]=n.getJsonClone(d)}),I=n.getJsonMerge(I,i),r.serverCallback&&!w.value&&!n.isEmpty(i)&&(w.value=!0,r.value!=null&&r.value!==""&&(H(r.value),q())),r.isCascade&&Object.keys(I).forEach(d=>{const v=I[d][u],b=v!=null&&(typeof v=="string"||typeof v=="number")?v.toString():"";if(b!==""&&b!==String(h)){const A=I[b];A?.name&&(I[d].parentName=A.name)}}),r.isCascade&&(z(),r.isOutMerge&&r.multiple&&f.value.length>0)){const d=se(f.value);n.isEqualArr(f.value,d)||(f.value=d,P=d)}if(r.multiple&&f.value.length>1){const d=f.value.filter(v=>{const b=I[v];return n.isBoolean(b?._isTypeRadio)&&b._isTypeRadio});if(d.length>1){const v=d[d.length-1],b=f.value.filter(A=>A===v||!d.includes(A));n.isEqualArr(f.value,b)||(f.value=b,Q())}}f.value.length>0&&(f.value=[...f.value])},z=()=>{const t=r.parentKey,i=r.topParentValue;S.childrenMap={},S.parentMap={},S.lastChildMap={},S.allChildMap={},Object.keys(I).forEach(h=>{const v=I[h][t],b=v!=null&&(typeof v=="string"||typeof v=="number")?v.toString():"";b!==""&&b!==String(i)&&(S.parentMap[h]=b,S.childrenMap[b]||(S.childrenMap[b]=[]),S.childrenMap[b].push(h))})},ie=t=>{const i=(u,h)=>{if(S.lastChildMap[u])return S.lastChildMap[u];if(h.has(u))return[];h.add(u);const d=S.childrenMap[u];if(!d||d.length===0)return S.lastChildMap[u]=[u],[u];const v=[];return d.forEach(b=>{v.push(...i(b,new Set(h)))}),S.lastChildMap[u]=v,v};return i(t,new Set)},ce=t=>{const i=(u,h)=>{if(S.allChildMap[u])return S.allChildMap[u];if(h.has(u))return[];h.add(u);const d=S.childrenMap[u];if(!d||d.length===0)return S.allChildMap[u]=[],[];const v=[];d.forEach(A=>{v.push(A),v.push(...i(A,new Set(h)))});const b=Array.from(new Set(v));return S.allChildMap[u]=b,b};return i(t,new Set)},ye=t=>{if(t.length===0)return[];const i=new Set(t),u=new Set,h=new Set;for(const d of i){const v=S.parentMap[d];v&&!h.has(v)&&u.add(v)}for(;u.size>0;){const d=u.values().next().value;if(u.delete(d),h.has(d))continue;h.add(d);const v=S.childrenMap[d];if(!v||v.length===0)continue;let b=!0;for(const A of v)if(!i.has(A)){b=!1;break}if(b){for(const Ee of v)i.delete(Ee);i.add(d);const A=S.parentMap[d];A&&!h.has(A)&&u.add(A)}}return[...i]},se=t=>{if(t.length===0)return[];const i=[];return t.forEach(u=>{i.push(...ie(u))}),n.getArrUnique(i)},le=t=>!r.isCascade||!r.multiple?t:r.isOutMerge?ye(t):se(t),q=()=>{if(w.value&&!n.isEmpty(f.value)){if(n.isEmpty(I)||r.serverCallback)return;const t=j();if(!n.isEqualArr(f.value,t)){const i=f.value.filter(h=>!t.includes(h));i.length>0&&G.warn("ClSelect","以下 id 在数据列表中不存在,已自动清除:",i),f.value=t,P=t;const u=le(t);oe(u.join(","))}}},H=t=>{if(t!=null&&typeof t!="string"&&(typeof t!="number"||!n.isFinite(t))){G.warn("ClSelect","setValue 收到非预期类型值:",typeof t,t);return}let i=t==null||t===""?[]:t.toString().split(",").filter(h=>h!=="");i=n.getArrUnique(i),r.isCascade&&r.isOutMerge&&i.length>0&&r.multiple&&(i=se(i));let u=n.isEqualArr(f.value,i);u&&(u=i.join(",")===f.value.join(",")),u||(P=i,f.value=i)},U=t=>n.isExistJsonKey(I,t)?n.getJsonClone(I[t]):{},ue=t=>{const i=n.isArray(t)?t:f.value,u=[];return i.forEach(h=>{const d=U(h);n.isEmpty(d)||u.push(d)}),u},de=t=>{const u=r.isCascade&&!r.multiple&&(S.childrenMap[t.id?.toString()]?.length>0||!S.parentMap[t.id?.toString()])&&n.isEmpty(r.showTextFormat)?"":ee.value;let h=n.isEmpty(u)?t.name??"":n.convertStringFormat(u,t);return n.isHtml(h)?h=n.isEmpty(u)?n.encodeHTML(t.name):n.convertStringFormatEncodeHTML(u,t):typeof h=="string"&&h.indexOf("<")>-1&&(h=n.encodeHTML(h)),h},me=t=>{if(n.isNonEmptyString(r.showTextFormat))return n.removeHTMLTags(de(t));const i=n.isString(r.plaintextLevelSeparator)?r.plaintextLevelSeparator:" > ",u=n.isString(t?.name)?t.name:"",h=n.isString(t?.parentName)?t.parentName:"",d=r.isCascade&&n.isNonEmptyString(h)?`${h}${i}${u}`:u;return n.removeHTMLTags(d)},fe=()=>{const t=ue();F.value=t.map(i=>de(i)),B.value=f.value.map(i=>{const u=U(i);return n.isEmpty(u)?i:me(u)})},Q=()=>{const t=j();P=t,f.value=t;const i=le(t),u=i.join(",");let h;if(r.multiple){const d=[];i.forEach(v=>{const b=U(v);n.isEmpty(b)||d.push(b)}),h=d}else h=U(u),n.isEmpty(h)&&(h=null);pe(u,h)},ve=()=>{E.isOpen||!n.isEqualArr(f.value,P)&&Q()},l=()=>{w.value||(w.value=!0,W(r.list),H(r.value),q())},s=()=>{!w.value&&r.list&&r.list.length>0&&l()},a=()=>{import("vue-virtual-scroller").then(()=>{Promise.resolve().then(()=>require("./vue-virtual-scroller-C_hlZMj5.js"))})};e.onMounted(()=>{r.isPlaintext||a(),e.nextTick(()=>{s()})}),e.watch(w,t=>{t&&he()}),e.watch(()=>r.list,(t,i)=>{w.value||(t&&t.length>0||i===void 0)&&(w.value=!0)}),e.watch([()=>r.value,()=>r.list],([t,i],[u,h])=>{const d=i||[];!w.value&&d.length>0&&(w.value=!0),i!==h&&(I={},S.childrenMap={},S.parentMap={},S.lastChildMap={},S.allChildMap={}),W(d),t!==void 0&&H(t),q()}),e.watch([f,()=>r.list],([t,i])=>{i&&i.length>0&&n.isEmpty(I)&&W(i),fe()}),e.watch(()=>r.isOutMerge,()=>{r.isCascade&&r.multiple&&f.value.length>0&&le(j()).join(",")!==String(r.value??"")&&Q()}),e.watch([()=>r.parentKey,()=>r.topParentValue],()=>{r.isCascade&&!n.isEmpty(I)&&z()});const p=t=>{t&&r.disabled||(E.isOpen=t,t?P=f.value:ve(),e.nextTick(()=>{X.value&&X.value.initOpenShow(t)}),ge(t))},m=()=>{r.disabled||(f.value=[],r.multiple&&r.multipleRealTimeChange?Q():ve())},g=t=>{if(E.dropDownPos=t.use.dropDownPos,r.multiple&&r.isShowTag){const i=Y.value?.$el?.offsetWidth||0;E.tagHeight=r.theme==="default"?`${t.original.dropDownHeight+1}px`:`${t.original.dropDownHeight}px`;const u=t.original.winWidth-(t.original.controlOffset.left+t.original.dropDownWidth)>=i?"right":"left";E.tagDirection=u,u==="right"?E.tagLeft=`${t.original.dropDownWidth-1}px`:E.tagLeft=`${(t.original.dropDownWidth-t.original.textWidth+i+1)*-1}px`}},D=t=>{f.value=t,r.multiple?r.multipleRealTimeChange&&Q():_.value?.setOpen(!1)},y=t=>{r.disabled||(f.value=t,Q())},x=t=>{o("onError",t)},V=()=>{_.value&&(_.value.checkIsShowOpen()||_.value.initCompleteOpen())};e.provide("$SelectTop",{getSelectData:ue,getSelectValueInfo:U,getAllChildIds:ce,calculationDropdownPosition:()=>{_.value?.calculationPosition()},convertListToJson:W,closeDropdown:()=>{_.value?.setOpen(!1)},refreshDisplayLabels:()=>{fe()}});const C=()=>{const t=j();return le(t).join(",")};return O({getValue:C,getValueData:()=>{const t=C();if(r.multiple){const u=t?t.split(","):[],h=[];return u.forEach(d=>{const v=U(d);n.isEmpty(v)||h.push(v)}),h}if(!t)return null;const i=U(t);return n.isEmpty(i)?null:i},setValue:t=>{H(t),q()},runInitComplete:()=>{l()}}),(t,i)=>c.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(M),class:e.normalizeClass(J.value)},e.toDisplayString(te.value),11,et)):(e.openBlock(),e.createBlock(Le._sfc_main,{key:1,id:e.unref(M),ref_key:"refElDropdownLayer",ref:_,classParent:R.value,classText:"select-inText",classDropDown:ne.value,placeholder:c.placeholder,isDisabled:c.disabled,isClear:c.isClear,textLabel:F.value.join(","),textArrowDirection:c.arrowDirection,transitionLeave:c.transitionLeave,appendContainer:c.appendContainer,appendFollowWidth:c.theme!=="noBorder",onOpenBeforeCallback:c.onOpenBefore,onOnChangeOpen:p,onOnClear:m,onOnChangePosition:g},{textExtend:e.withCtx(()=>[c.multiple?(e.openBlock(),e.createElementBlock("span",tt,[F.value.length>1?(e.openBlock(),e.createBlock(Me._sfc_main,{key:0,num:F.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),dropdown:e.withCtx(()=>[e.createVNode(Ue,{ref_key:"refElList",ref:X,isSearch:c.isSearch,searchPlaceholder:c.searchPlaceholder,searchKey:c.searchKey,searchKeyType:c.searchKeyType,isMultiple:c.multiple,isCheckBoxAll:c.isCheckBoxAll,showDropDownTextFormat:c.showDropDownTextFormat,showDropDownTextFormatSub:c.showDropDownTextFormatSub,isCascade:c.isCascade,parentSelectable:c.parentSelectable,parentKey:c.parentKey,topParentValue:c.topParentValue,originalData:c.list,keyIndex:T,selectId:f.value,disabled:c.disabled,isOpen:E.isOpen,serverCallback:c.serverCallback,onOnChange:D,onOnInitComplete:V,onOnError:x},null,8,["isSearch","searchPlaceholder","searchKey","searchKeyType","isMultiple","isCheckBoxAll","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","disabled","isOpen","serverCallback"])]),dropdownExtend:e.withCtx(()=>[c.multiple&&c.isShowTag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(re.value),style:e.normalizeStyle({height:E.tagHeight,left:E.tagLeft}),ref_key:"refElTags",ref:Y},[e.createVNode(Ze,{showTextFormat:ee.value,selectId:f.value,onOnRemove:y},null,8,["showTextFormat","selectId"])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","transitionLeave","appendContainer","appendFollowWidth","onOpenBeforeCallback"]))}});exports._sfc_main=nt;